<?xml version="1.0" encoding="utf-8"?>
<posts>
  <row Id="2" PostTypeId="1" CreationDate="2017-05-23T14:20:02.403" Score="26" ViewCount="5084" Body="&lt;p&gt;Grading currently either takes me a huge amount of time, or gets done in an extremely cursory way.  It occurs to me that, if my students were able to submit code into some sort of autotester, they would find many of their errors before I review their code.  This would mean that I would only have to look for clarity issues, not logic bugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am interested in software that (a) isn't too hard to set up, (b) will allow my students to test whether their code is (at least) to spec, and (c) allows me to quickly cycle through the code from all of the students in a section to look for style issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have looked far and wide, and have not yet found a reasonable system that accomplishes these three goals.  Many universities seem to have robust systems, but they all appear to be home-grown, and unavailable to outsiders.  Is anyone aware of such a system?  I honestly don't even care if it costs money - I just need a solution that makes this task more reasonable.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-06-08T12:19:15.073" LastActivityDate="2019-09-14T19:47:59.430" Title="What autograding software do folks use for Java code?" Tags="|java|grading|auto-graders|" AnswerCount="8" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3" PostTypeId="1" CreationDate="2017-05-23T14:20:35.397" Score="10" ViewCount="550" Body="&lt;p&gt;Let's say I've assigned my Intro to CS class their first group programming assignment. A common problem is that the most invested student in the group will end up doing the majority of the work. At grading time, there are techniques that can be used to determine how much work each individual did--I don't want to focus on that. Instead, I would like to hear if there are any ways to ensure that the group actually divides up tasks proportionately without planning their project for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this possible? If so, how? More importantly, is it possible to do this without external pressure? How can we give them the incentive and tools to really want to cooperate? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assume that the class has been introduced to OOP and has completed a few assignments, but exposure to CS is minimal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus: Is it actually better for the students' education to ensure this or to leave them to their own devices?&lt;/p&gt;&#xA;" OwnerUserId="7" LastEditorUserId="1293" LastEditDate="2018-01-01T13:49:24.240" LastActivityDate="2018-05-28T23:47:04.853" Title="Is it possible to ensure division of labor on a group assignment?" Tags="|group-work|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4" PostTypeId="1" CreationDate="2017-05-23T14:21:14.293" Score="9" ViewCount="679" Body="&lt;p&gt;I am finding it very difficult to create a lab for Objects in Java before we've involved Inheritance and Polymorphism.  The problem, as I see it, is that Inheritance and Polymorphism are basically the motivators for Objects in the first place.  As a result, the labs that I've created have all felt stodgy and artificial. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as an instructional reality, waiting until we have all three ideas in place &lt;em&gt;in a high school environment&lt;/em&gt; simply means biting off too much material.   Are there other ways to think about creating labs for Objects that would support the early understandings required while still being meaningful?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2018-01-01T15:51:14.040" LastActivityDate="2018-01-01T15:51:14.040" Title="Objects Lab Before Inheritance and Polymorphism" Tags="|object-oriented-paradigm|labs|ap-computer-science-a|" AnswerCount="11" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="6" PostTypeId="1" AcceptedAnswerId="81" CreationDate="2017-05-23T14:24:14.790" Score="8" ViewCount="402" Body="&lt;p&gt;This is a subject that I have had a lot of trouble clarifying for students.  I can explain the components well enough, but I have trouble getting kids to connect the big picture of the proof to the smaller parts. Finding a good loop invariant almost seems more art than science, and while I can find them myself, I am at a loss with how to break that step down into coherent procedural steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question is this: how do you go about teaching Induction so that it is both intuitive and masterable?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-05T14:06:54.917" LastActivityDate="2017-06-07T05:46:46.870" Title="Teaching Induction to Prove the Correctness of Algorithms" Tags="|lesson-ideas|cs-theory|induction|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="7" PostTypeId="1" AcceptedAnswerId="295" CreationDate="2017-05-23T14:25:23.343" Score="22" ViewCount="1377" Body="&lt;p&gt;When I was studying, my professors had different approaches when teaching programming to beginners:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Choose a language with which the professor is comfortable and fulfills the course requirements but might not be so popular in the real world. I had this experience with &lt;a href=&quot;https://www.wolfram.com/mathematica/&quot; rel=&quot;noreferrer&quot;&gt;Mathematica&lt;/a&gt; programming. We would spend lots of time dealing with this language and as a result less time dealing with the programming language per se.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teach in a flavor of pseudo-code. This makes it &quot;harder&quot; to commit errors cause by compilers, interpreters and syntax in general and allows the students to focus in the problem. Naturally has the disadvantage that you can't run your code anywhere.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What do most professionals and students prefer when teaching/learning algorithms and basic programming?&lt;/p&gt;&#xA;" OwnerUserId="28" LastEditorUserId="2" LastEditDate="2017-05-23T19:03:31.607" LastActivityDate="2018-05-27T13:19:19.627" Title="Should the first Programming/Algorithms class be taught in pseudo-code?" Tags="|pseudo-code|" AnswerCount="9" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="8" PostTypeId="2" ParentId="4" CreationDate="2017-05-23T14:32:30.653" Score="2" Body="&lt;p&gt;Our first Java class has a prereq of procedural programming, so students already know how to write functions.  We begin by giving an overview of the type system and the basics of reading an API page.  We study the String and BigInteger classes in some depth.  They have seen object-based programming in Python, so the waters here are pretty familiar.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our first big project is to build a simple API. Example: BigFraction, which is a type capable of doing arbitrary-precision rational arithmetic.  Other possibilities:  Vector3D, a 3-d vector class, Complex, a complex number class, and Quaternion, a class for handling quaternions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students learn Javadoc at this time.  They are asked to program with another student's API.  It's quite interesting. &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-05-23T14:32:30.653" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="9" PostTypeId="2" ParentId="4" CreationDate="2017-05-23T14:32:38.713" Score="10" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Inheritance and Polymorphism are basically the motivators for Objects in the first place&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think this is where you're getting stuck. Neither of those are necessarily first-class motivators for Objects, but they are useful things you can do when you have objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Work-in-progress textbook chapter on OOP (aimed at students aged 16-18) and why we use it: &lt;a href=&quot;https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_programming/Object-oriented_programming&quot; rel=&quot;noreferrer&quot;&gt;https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_programming/Object-oriented_programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some alternatives:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Object = Code + Data&quot;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's easy to show examples where global functions cause problems because they accidentally trample on each other's data (they're using the same data, but making assumptions about it)&lt;/li&gt;&#xA;&lt;li&gt;...especially easy/fun to show how two unrelated functions can accidentally choose the same name for their variables (they're using different data, but happen to have chosen same name, e.g. &quot;x&quot; for x-co-ordinate, but also &quot;x&quot; for number-of-items-to-multiply)&lt;/li&gt;&#xA;&lt;li&gt;Via encapsulation (and optionally: hiding) objects wipe-out many of these common, painful, frustrating bugs that beginner programmers often discover themselves when using global functions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&quot;Object = aggregation of functions&quot;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How do you organize your source code when you have more than a few dozen functions? Objects help enormously&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&quot;Object = classification of data&quot; (Object as ADT)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How do you organize your data when you have three different meanings of &quot;x-coordinate&quot;: Position, Velocity, and Acceleration? Objects make it easy to create ad-hoc, named, data-types that massively simplify this problem&lt;/li&gt;&#xA;&lt;li&gt;i.e. Objects-as-Abstract-Datatype&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerDisplayName="user31" LastEditorDisplayName="user31" LastEditDate="2017-05-23T15:39:19.443" LastActivityDate="2017-05-23T15:39:19.443" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="10" PostTypeId="2" ParentId="3" CreationDate="2017-05-23T14:32:49.510" Score="11" Body="&lt;p&gt;&lt;strong&gt;Make each group member explicitly be 'responsible' for one aspect of the project&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's think about &lt;em&gt;why&lt;/em&gt; group work is a useful tool in terms of teaching your students. I'd imagine one of the big reasons you would assign a group task is to &lt;strong&gt;prepare your students for a job&lt;/strong&gt;, working with a team to build a product. In the workplace, you typically have a way of assigning individual roles and responsibilities; if you're building a website, you generally would have someone responsible for design, someone for the backend logic, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should do the same thing here. Specifically require that your students build a plan, with each member being given a role that they are individually responsible for, and before allowing them to proceed, make sure each role is relatively equal in scope. You wouldn't want Alice to have ten times the work of Bob in the plan—it won't give you the scope to analyse each bit of work individually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, each piece of the project likely depends on another, so it's very difficult to isolate each person's contribution individually. That's why I'd suggest not weighting the group work &lt;em&gt;too&lt;/em&gt; highly, because the difficulties of evaluating the outcome far outweigh the benefits of making the group work count for a high percentage of the grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Carnegie Mellon's &lt;a href=&quot;https://www.cmu.edu/teaching/designteach/design/instructionalstrategies/groupprojects/design.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Design &amp;amp; Teach a Course&lt;/em&gt; section&lt;/a&gt; has some useful tips:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In addition to evaluating the work of the group as a whole, ask individual group members to demonstrate their learning via quizzes, independent write-ups, weekly journal entries, etc. Not only does this help you monitor student learning, it helps to prevent the “free-rider” phenomenon. Students are considerably less likely to leave all the work to more responsible classmates if they know their individual performance will affect their grade.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;To create individual accountability, some instructors combine a group project with an individual quiz on relevant material. Others base part of the total project grade on a group product (e.g., report, presentation, design, paper) and part on an individual submission.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You'll need to think about your aims. Do you &lt;strong&gt;want&lt;/strong&gt; to test the group's ability to spot people not contributing as part of the teaching? If so, &lt;strong&gt;don't&lt;/strong&gt; put in those safeguards, and see what happens. If you just want to test their CS knowledge, make sure that you can fairly evaluate individual contributions, as well as the overall result.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-05-23T14:32:49.510" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="11" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T14:41:58.660" Score="18" Body="&lt;p&gt;No, it shouldn't.  It's an appealing idea, but when kids are just starting in programming, one of the few straws they have to grasp at is that it is, on some level, very concrete.  I type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;std::cout &amp;lt;&amp;lt; &quot;Hello World!&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... and out prints &quot;Hello World!&quot;.  Without the ability to run and troubleshoot code, I'm afraid that everything will become abstract, and most students will simply flounder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can choose a language with easier syntax, such as Python, or a visual language like Scratch, but the kids really need something to actually run and manipulate if they are to make early progress.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2018-01-07T09:03:53.107" LastActivityDate="2018-01-07T09:03:53.107" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="12" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T14:46:25.050" Score="8" Body="&lt;p&gt;Textual programming languages exist to help humans write instructions for computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given how many of them we now have access to, you should be able to find at least one, somewhere, that fits with the experience level and understanding of your students, and the set of problems you want them to work with or solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo code's main role at the moment appears to be for bridging the gap between programmers who are fluent in incompatible languages and need a way to express ideas that both of them can understand. That's not the situation with new programmers starting to learn, IMHO.&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastActivityDate="2017-05-23T14:46:25.050" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="13" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T14:50:14.937" Score="3" Body="&lt;p&gt;Pseudo-code feels like one of those things invented before I learnt to code, as a response to the complexity of reading and to a lesser extent writing code in assembler (or even machine code). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it was &lt;em&gt;impossible&lt;/em&gt; to explain a program without recourse to explaining every single term (starting with 'every line needs a number, start off with increments of 10 so you can add more in later'), it made sense to start the explanations with a less formally structured code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, code can be written using drag-and-drop templates, or in fairly readable readable language (with beginner friendly error handling) so there is really no need to introduce pseudo-code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where pseudo code &lt;em&gt;still&lt;/em&gt; makes sense is in a scenario where you need a formalised but more abstract language - for example the architectural definition of an instruction set. Something which you want to be able to write a formal parser for, and still retain human readability.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-23T14:50:14.937" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="14" PostTypeId="1" CreationDate="2017-05-23T14:51:40.050" Score="21" ViewCount="4865" Body="&lt;p&gt;It is spectacularly easy to cheat on CS labs at the high school level and above (roughly ages 14 and up), particularly on short, early assignments.  In fact, there is article in &lt;a href=&quot;https://www.nytimes.com/2017/05/29/us/computer-science-cheating.html&quot; rel=&quot;noreferrer&quot;&gt;today's NY Times&lt;/a&gt; about this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, for a very early assignment, a question might be:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a small program that will ask the user for a word and a number n, and responds by printing out the word n times.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is a rather extreme example, but it could easily be the first part of a lab assignment for a student who has just encountered for loops for the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Detecting cheating here is nonsensical because a huge portion of the resulting code will be nearly identical even if the students didn't cheat. For that reason, I am seeking ways to discourage students from trying to cheat in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some best practices for staving off the flow of plagiarism?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="919" LastEditDate="2017-07-01T23:38:08.557" LastActivityDate="2020-09-07T01:31:21.930" Title="Cheating on labs" Tags="|best-practice|labs|ethics|cheating|" AnswerCount="11" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="15" PostTypeId="5" CreationDate="2017-05-23T15:00:48.303" Score="0" Body="&lt;p&gt;Use this tag for questions specific to using Java in an educational environment. It is not appropriate for general programming questions nor for questions about the Java language itself. Questions appropriate here might involve how specific aspects of the Java language or its tools might be taught effectively, or about educational outcomes of curricula using Java as a basis.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="58" LastEditDate="2017-07-13T17:52:08.260" LastActivityDate="2017-07-13T17:52:08.260" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="16" PostTypeId="4" CreationDate="2017-05-23T15:00:48.303" Score="0" Body="Questions about instruction specific to the programming language Java. Use this tag only when the language used would affect the question significantly (if your question uses Java as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="27" LastEditorUserId="2" LastEditDate="2017-06-13T13:13:58.083" LastActivityDate="2017-06-13T13:13:58.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="17" PostTypeId="1" AcceptedAnswerId="43" CreationDate="2017-05-23T15:00:50.667" Score="43" ViewCount="7801" Body="&lt;p&gt;When teaching recursion, what is the best analogy people use to teach the idea of recursion. There are some &lt;a href=&quot;https://en.wikipedia.org/wiki/Droste_effect&quot; rel=&quot;noreferrer&quot;&gt;nice artistic representations&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/XUyAr.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/XUyAr.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the idea of repeatedly cutting a phone book or dictionary in half until you find a number/word (basically binary search). The only problem is students don't use phone books/paper dictionaries anymore and the artistic representation doesn't imply an end goal/state.&lt;/p&gt;&#xA;" OwnerUserId="48" LastEditorUserId="48" LastEditDate="2017-06-06T14:41:09.347" LastActivityDate="2022-06-08T19:25:13.250" Title="Analogy for teaching recursion" Tags="|recursion|teaching-analogy|" AnswerCount="31" CommentCount="18" ContentLicense="CC BY-SA 3.0" />
  <row Id="18" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T15:02:52.203" Score="5" Body="&lt;p&gt;&lt;strong&gt;No&lt;/strong&gt;, classes should favor actual programming languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, students should should be able to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Run code examples.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Apply code analysis tools to code examples, both to better understand the examples and to become familiar with code analysis.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Experiment with modifying code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However, it's important to select a reasonable language.  Unfortunately some instructors select pet esoteric or proprietary coding systems out of personal preference.  While it's true that students should be able to apply the same skills to the languages that they actually care about, it's a huge disservice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good default language for a course should be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;High-level, unless the course is specifically on low-level concepts.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Provides benefits like pseudo-code while still being real.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Be free to work with using reasonable tools.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Good examples include Java and C#.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Bad examples include Mathematica and Matlab.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have helpful, easy-to-use debugging tools.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students shouldn't have to wonder about why the code doesn't compile or where the mistake in their code is.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Very quick compile times, so students can do rapid trial-and-error.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Generally, prefer strongly typed languages, and avoid unsafe operations.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Personally I'd go for Visual Studio 2017 with C#.  Or, if a significant portion of students use Linux/Apple, then fallback to Java.&lt;/p&gt;&#xA;" OwnerUserId="39" LastActivityDate="2017-05-23T15:02:52.203" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="19" PostTypeId="1" CreationDate="2017-05-23T15:05:29.497" Score="6" ViewCount="614" Body="&lt;p&gt;We have two entry points for programming students here: one is web-oriented and features HTML5/CSS3/ECMA6, and the other is in a robotics environment using LabView.  Both classes address the &quot;big 5&quot;: variables, objects, functions, conditional logic, and iteration.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are thinking about a new entry point for a new audience. What features of the Processing language lend themselves to an introductory course? &lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="919" LastEditDate="2017-06-23T15:37:56.913" LastActivityDate="2017-07-24T18:10:17.047" Title="Using Processing as an entry point in an Introductory Course" Tags="|curriculum-design|processing|" AnswerCount="6" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="21" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T15:07:03.810" Score="7" Body="&lt;p&gt;One of my favorite examples of recursion is evaluating an arithmetic expression.  The downside is that evaluation isn't particularly interesting, but the upside is significant: they've already done it in a programming course!  Usually, you'll very early on cover order of operations and expression evaluation in a programming course--but the algorithm we teach them is recursive &quot;find the innermost expression, evaluate it, then move outwards&quot;.  Here's an example of it in use: &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse143/16au/lectures/power-of-recursion/lecture12-recursion.pdf&quot; rel=&quot;noreferrer&quot;&gt;http://courses.cs.washington.edu/courses/cse143/16au/lectures/power-of-recursion/lecture12-recursion.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="42" LastActivityDate="2017-05-23T15:07:03.810" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="22" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T15:08:55.050" Score="6" Body="&lt;p&gt;Rather than use an analogy, you could give a real world example. The way a tree grows, the shell of a snail, the petals on a sunflower. I believe these are all fine examples - the same solution applied over and over again to a problem until a base case is reached (such as a lack of resources or a height limit at which point water can't be delivered to the leaves)&lt;/p&gt;&#xA;" OwnerUserId="54" LastActivityDate="2017-05-23T15:08:55.050" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="23" PostTypeId="2" ParentId="19" CreationDate="2017-05-23T15:09:41.667" Score="1" Body="&lt;p&gt;&lt;a href=&quot;https://courses.cs.washington.edu/courses/cse120/17sp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The CSP course at UW&lt;/a&gt; uses processing&#xA;The instructor has reported mixed feelings about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stanford is trying out a &lt;a href=&quot;https://explorecourses.stanford.edu/search?view=catalog&amp;amp;filter-coursestatus-Active=on&amp;amp;page=0&amp;amp;catalog=&amp;amp;q=CS+106J%3A+Programming+Methodology+in+JavaScript&amp;amp;collapse=&quot; rel=&quot;nofollow noreferrer&quot;&gt;new course based around Javascript&lt;/a&gt;:  (but it hasn't run yet...)&lt;/p&gt;&#xA;" OwnerUserId="42" LastEditorUserId="58" LastEditDate="2017-05-23T16:01:01.607" LastActivityDate="2017-05-23T16:01:01.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="24" PostTypeId="2" ParentId="14" CreationDate="2017-05-23T15:13:43.763" Score="13" Body="&lt;p&gt;I am a student assistant for some programming courses at bachelor level. What we do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Automated plagiarism tests, that are tailored to the language. The general idea is to strip comments, whitespace, variable and function names, literals, and thus only keep the general structure of a program, i.e. parentheses, curly braces, semicolons, etc. (for C-like, that is). Then compare this 'hash' for all hand-ins, and when you find a match manually check if the programs look alike. For example, the hash of the program below would be something like &lt;code&gt;#&amp;lt;&amp;gt;(,*){(;;--){(&quot;&quot;,);}}&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;void repeat(int n, char *word) {&#xA;    for (; n; n--) {&#xA;        printf(&quot;%s\n&quot;, word);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When plagiarism is suspected, notify the examination board directly (this is a policy, and it helps to show the severity of the issue).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;At the beginning of the course, explicitly mention that we expect students to hand in  alone or in pairs, and that collaboration between groups is OK as long as it remains on an abstract level.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There always remain some people who work together, and often students start groups on social media to exchange solutions. This is typical, especially for first-years courses, and I'm not sure something can be done about it. However, by acting fast (i.e. reporting it quickly, before the next assignment has to be handed in), students are scared off and in later weeks it is much less of a problem for us.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For small programs like your example, it is not always possible to justify a plagiarism accusation, because there are not many ways to write such a program. We usually tend to give students larger tasks and more freedom. For example, not &quot;Here is the skeleton of the Car class, finish the methods &lt;code&gt;drive&lt;/code&gt;, &lt;code&gt;turn&lt;/code&gt; and &lt;code&gt;halt&lt;/code&gt;&quot; but &quot;Choose a suitable representation of a car that can drive, turn and halt.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this is not always possible and especially in beginners courses plagiarism is 1) much more common and 2) much harder to check. This is why we don't give the lab assignments a large share in the final mark (most of the time just pass/fail), and rely on the final exam for an accurate grade. The lab sessions are to practice, it is ultimately up to the students to use them wisely.&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastEditorDisplayName="user24" LastEditDate="2017-05-23T15:22:18.500" LastActivityDate="2017-05-23T15:22:18.500" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="25" PostTypeId="2" ParentId="4" CreationDate="2017-05-23T15:13:46.447" Score="0" Body="&lt;p&gt;Kevin Wayne at Princeton came up with a &lt;a href=&quot;http://nifty.stanford.edu/2012/wayne-guitar-heroine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;GuitarHeroine&quot; assignment&lt;/a&gt; which uses maybe a little too much of these topics.  The version that Stuart Reges uses at &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse143/16wi/handouts/04.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;UW CSE&lt;/a&gt; only requires interfaces.&lt;/p&gt;&#xA;" OwnerUserId="42" LastEditorUserId="150" LastEditDate="2017-07-24T11:52:09.207" LastActivityDate="2017-07-24T11:52:09.207" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="27" PostTypeId="1" CreationDate="2017-05-23T15:18:39.073" Score="21" ViewCount="1734" Body="&lt;p&gt;Should ye ole' fashioned assembly language be taught to help students develop a sense of how actual underlying computational hardware supports/allows running their higher-level or more abstract software?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something with (a limited amount of) a linear address space (global state memory) and a program counter with jumps (conditional control flow or GOTOs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using something like Knuth's MIX, or the CARDIAC cardboard computer (this was actually used to teach programming in an introductory computing for non-programmers course I audited at Berkeley in the late '70's), or perhaps an emulator for an 8-bit retro-computer (such as Apple II or Altair) that can run inside a web browser.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="919" LastEditDate="2017-06-23T15:37:42.663" LastActivityDate="2021-02-28T16:14:48.577" Title="Should assembly language be taught in an introductory course (or soon after)?" Tags="|curriculum-design|assembly|" AnswerCount="12" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="28" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T15:24:14.847" Score="6" Body="&lt;p&gt;I think this heavily depends on the environment. Is this a science university? A middle school? An engineering high school?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo code has its uses. At university level, with years of programming to come, you should use pseudo code - they will need to learn it anyway, and they need to understand the theory without strongly connecting it to one programming language - mostly because all programming languages have their unique idiocy, and it is hard for a beginner to distinguish between the language being weird or the algorithm being complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are teaching kids at elementary/middle schools, then pseudo code is just not rewarding enough. It still has its uses though. For example have them write a pseudo code for each other to use a vending machine (1: select beverage, 2: press button, 3: insert coin, 4: repeat until credit=price etc.). Can be a good introduction to the whole concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that by teaching algorithms through an actual programming language, you are also teaching the language itself. So, like I said, this heavily depends on the environment and the goal of the course.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-05-23T15:24:14.847" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="29" PostTypeId="2" ParentId="14" CreationDate="2017-05-23T15:25:50.120" Score="13" Body="&lt;p&gt;I can only speak from a high school perspective as that is what I teach (14-18 years olds), and I truly feel your concern on this question.  Biggest issues I have in my CS class are distracting websites (YouTube, games, etc) and copying code.  I have certainly not fully conquered the problem but here are a few things that I do that seem to help:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don't assign work that is not to be completed in the lab.&lt;/strong&gt;  I know this is probably a debated issue but I, personally, do not assign any work outside of class time so no homework or projects or anything done outside of the lab.  While there are many reasons for this within the specific context of my high school that are irrelevant to this question, a big benefit is that &lt;strong&gt;&lt;em&gt;I am always present when students are working on labs&lt;/em&gt;&lt;/strong&gt;.  It is much more difficult to copy off of another student when I am monitoring the lab and even harder when I am watching screens from a program like Apple Remote Desktop.  I have found that as long as I actively monitor my classes when they are working on a lab it cuts way down on the copying&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don't have students turn work in, do screen checks instead.&lt;/strong&gt;  This takes some getting used to but the major benefits:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Get's you up walking around the room which helps with monitoring and making sure students aren't looking at each other's screens&lt;/li&gt;&#xA;&lt;li&gt;Easier to compare two adjacent student's code when they are both up on screens right next to each other at the same time and you are right there so they can't just try to hide or minimize&lt;/li&gt;&#xA;&lt;li&gt;More efficient for grading in that you don't have to individually open up files. Just walk up to student, have them run the code, and check that the output is correct&lt;/li&gt;&#xA;&lt;li&gt;NOTE: This does not really work for more complicated, larger, multi-file, projects but you did state in your question that this question was aimed towards the starting, smaller projects which this is perfect for&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assign different assignments.&lt;/strong&gt;  Bear with me, because I know that as soon as someone says &quot;Just create different assignments...&quot; it almost always means more work for the teacher.  But it does not have to be, especially for CS.  For instance, one of my first Java assignments is to code a basic &quot;Area Calculator&quot; that asks for dimensions of a shape and then calculates the area.  What I do is just assign each student a different shape from a pool of about six shapes.  Then I make sure that no consecutive students have the same shape.  When we do the Java MadLibs assignment, I have a few different MadLibs templates that I use, again making sure no consecutive students have the same template.  This really creates no extra work for me other than when I first came up with the assignment, and even then it was totally manageable.  I realize that they could still &quot;copy&quot; off each other to some extent but I have found that this cuts way down on the copying because students realize it would be more work to copy someone else's code and then adapt it, rather than just doing it themselves.  You'd be surprised how small, little teaks to the assignment can dissuade students from copying.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ask students questions about their code.&lt;/strong&gt;  This works particularly well when doing screen checks but just ask basic questions like &quot;What does this line do?&quot; or &quot;Why did you put that there?&quot;.  While this doesn't necessarily cut down on cheating it makes it very easy to identify the students who are copying because they will have the code done but have no idea what any of the lines do.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Position computers so its impossible to &quot;screen snipe&quot;&lt;/strong&gt;.  I know that this is very dependent on the setup of the lab but if at all possible, arrange the workstations so that students do not have direct view of each others screens.  One that I have found works well is to have four computers at a table, each facing different directions, but again I realize this may be impossible (as it is in the lab that I currently teach in), but if it is possible I have found it helps.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are the main things I do and I am sure I am forgetting something but I hope these help and can improve the issues you are having. &lt;/p&gt;&#xA;" OwnerUserId="49" LastEditorUserId="49" LastEditDate="2017-05-23T15:31:23.197" LastActivityDate="2017-05-23T15:31:23.197" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="30" PostTypeId="1" CreationDate="2017-05-23T15:26:30.363" Score="16" ViewCount="719" Body="&lt;p&gt;When I try and teach web development to absolute beginners, I seem to always get a question about the roles of HTML/CSS/JS and about how the browser renders the HTML. It seems to me that the confusion lies in an explanation of what a markup language is as compared to a regular language (e.g. python, C, java, ruby). What is the best way to give an overview of what HTML is while being sure that my students understand HTML as a markup language?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would it be useful to include some of the history of HTML? Preface it by teaching markdown? Or some other way?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="919" LastEditDate="2017-06-23T16:22:29.130" LastActivityDate="2017-06-23T16:22:29.130" Title="How can I convey the idea of a programming language vs. a markup language?" Tags="|lesson-ideas|web-development|markup-languages|introductory-lesson|" AnswerCount="8" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="31" PostTypeId="2" ParentId="14" CreationDate="2017-05-23T15:27:45.963" Score="7" Body="&lt;p&gt;My main tool to prevent plagiarism on short beginner labs is to have a discussion with my students and to under-count them in grading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explain to my students that cheating is a huge problem on CS labs specifically.  I use a news item of a huge number of university freshmen expelled for cheating in a CS class.  (Search as I might, I cannot find the example right now - I will add it in later).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then explain that the largest component of their grade will come from the quizzes and tests, not from their labs.  The labs, as I explain it, are designed to help them do well on their quizzes and tests.  Therefore, kids who cheat on labs are just going to shoot themselves in the foot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I have polled students about cheating, the year prior to this practice, I found that a very tiny portion of my students would admit, on a survey, to having cheated, but 100% reported that others cheated regularly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By contrast, when I did the same poll the following year, almost none would admit to cheating themselves (this is no change), but only about 1/3 said that others cheated regularly.  Needless to say, I kept this change.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="134" LastEditDate="2017-05-24T01:22:40.440" LastActivityDate="2017-05-24T01:22:40.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="32" PostTypeId="2" ParentId="27" CreationDate="2017-05-23T15:28:12.563" Score="23" Body="&lt;p&gt;I think there is &lt;strong&gt;very limited benefit&lt;/strong&gt; in teaching assembly so early, and it's more likely to just scare away your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I started learning programming, I thought bare-metal OS development was really interesting, and I started to learn about it (mainly through &lt;a href=&quot;http://wiki.osdev.org/Main_Page&quot; rel=&quot;noreferrer&quot;&gt;OSDev&lt;/a&gt;). But frankly, assembly was &lt;strong&gt;far&lt;/strong&gt; beyond my level at that point, and it was hard to get &lt;em&gt;anywhere&lt;/em&gt; beyond the tutorials they give. Consider that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Beginners often have problems with learning the &lt;em&gt;syntax&lt;/em&gt; of the language, and the underlying conceptual problems (&lt;em&gt;&quot;how do I design this?&quot;&lt;/em&gt;). Your students may not be ready for that after an introductory class—learning the concepts and thought processes (how to &lt;em&gt;think&lt;/em&gt; like a programmer) is far more important than any language, and assembly only clouds that by making you think about memory, registers, jumps, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Your students probably &lt;strong&gt;won't&lt;/strong&gt; ever need assembly, and they almost certainly won't be writing much unless they go into fields like embedded development, OS development, etc. Even then, it's more likely that C (or a similar low-level language) will be used.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assembly is &lt;strong&gt;intimidating&lt;/strong&gt;. It's not something that it easy to read, understand, and write. Aside from the technical problems of teaching and learning, it's just &lt;em&gt;scary&lt;/em&gt;, and when I tried to learn assembly, it just led to frustration and not a lot of progress.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My opinion is that you should develop the higher-level concepts first, and make sure your students have a solid understanding of how to write code logically. Then, you can begin to 'remove the stabilisers', introduce memory management, and then finally lead to assembly, if that's what you want to teach.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-05-23T15:28:12.563" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="33" PostTypeId="2" ParentId="27" CreationDate="2017-05-23T15:31:14.413" Score="7" Body="&lt;p&gt;Yes: Some machine level behaviour is important at an early stage, to retain a diverse interest in the subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students will find it necessary to understand what a computer is doing 'under the hood', but others will have massive problems understanding how high level constructs can be broken down into simple load/add/store sequences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Web simulators like &lt;a href=&quot;http://www.peterhigginson.co.uk/RISC/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peter Higginson's RISC simulator&lt;/a&gt; definately need to be presented, and I've had good success in modelling a Fetch/Decode/Execute pipeline as a group activity, where assembly language is a key part of enabling the activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I think it is the simple load/store (or RISC) architecture which is the key thing to describe, rather than the details of the assembly language. Using a simple instruction set is just a natural part of explaining this type of architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you focus just on the higher level languages, you'll probably not notice, but the students who have a more practical view of physics/electricity (or just how machines work) will forever be wondering what happens before their code gets to &lt;code&gt;main()&lt;/code&gt;. These are the students who will go on to be embedded developers/ASIC designers or CPU architects (or rocket engineers).&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2018-02-23T08:31:50.347" LastActivityDate="2018-02-23T08:31:50.347" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="34" PostTypeId="2" ParentId="30" CreationDate="2017-05-23T15:31:38.400" Score="3" Body="&lt;p&gt;The best way to explain that HTML is a markup language is to explain that &lt;em&gt;markup languages&lt;/em&gt; are designed not for general-purpose programming, but for processing or presentation of text.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="27" LastEditDate="2017-06-07T20:37:32.853" LastActivityDate="2017-06-07T20:37:32.853" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="35" PostTypeId="1" AcceptedAnswerId="47" CreationDate="2017-05-23T15:32:39.113" Score="6" ViewCount="452" Body="&lt;p&gt;I teach full stack web development because the purpose of the course is to give an overview of how a complete website is created, from SQL for database management to HTML/CSS/JS for front-end to ruby on rails as a backend. Would it be better to teach the front-end (HTML/CSS/JS) first or the back-end (Rails/SQL)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My instincts would suggest front end because the students can type something and immediately see results which can be much more engaging, but teaching JS as the first &quot;real&quot; programming language also bothers me because of the many confusing and missing language features.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="919" LastEditDate="2017-06-23T16:22:21.620" LastActivityDate="2017-09-04T13:11:44.947" Title="When teaching Web Development, should server or client side come first?" Tags="|curriculum-design|web-development|front-end|back-end|" AnswerCount="10" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="36" PostTypeId="2" ParentId="35" CreationDate="2017-05-23T15:38:19.177" Score="4" Body="&lt;p&gt;Starting with frontend does not necessarily mean starting with JS. You could first do HTML and CSS, which is engaging, as you mention. Then proceed to Ruby for the backend (whether Ruby is suitable as a first programming language is another debate), i.e. generating static pages dynamically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JavaScript could come at the end of the course. This is also how things went historically, more or less. I would say this order makes the reasons for JavaScript (faster and smoother interaction, a.o.) stand out better.&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2017-05-23T15:38:19.177" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="37" PostTypeId="2" ParentId="27" CreationDate="2017-05-23T15:39:14.063" Score="8" Body="&lt;p&gt;While there is a natural appeal to teaching assembly programming (hey, we can build everything up from first principals!), early students really need to master sequencing and organization at a higher level first.  There is a surprising amount of abstract thought going on in looping and determining ending conditions even without limiting your branching cases to &lt;code&gt;ZERO&lt;/code&gt; and &lt;code&gt;NEGATIVE&lt;/code&gt;, or having to worry about whether your &lt;code&gt;mod&lt;/code&gt; operation just overwrote the &lt;code&gt;B&lt;/code&gt; register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would avoid doing it as your first activity.  That said, if you &lt;em&gt;do&lt;/em&gt; want to go early into assembly programming, &lt;a href=&quot;https://tomorrowcorporation.com/humanresourcemachine&quot; rel=&quot;noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt; is an extraordinary resource, and we purchased a site license for use at our school.  We currently use it before bringing the kids into &lt;strong&gt;6502&lt;/strong&gt; Assembly.  They get instantly addicted, and it makes many of esoteric the concepts rather visual.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-23T15:39:14.063" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="38" PostTypeId="5" CreationDate="2017-05-23T15:42:32.543" Score="0" Body="&lt;p&gt;Such questions are for problems specific to the &lt;em&gt;first&lt;/em&gt; computing course, not for things that also have wider applicability. It may &lt;strong&gt;not be an appropriate tag&lt;/strong&gt; just because an issue first shows up in early courses. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-08T14:18:46.433" LastActivityDate="2017-07-08T14:18:46.433" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="39" PostTypeId="4" CreationDate="2017-05-23T15:42:32.543" Score="0" Body="Questions related specifically to teaching people who are entirely new to programming. It may not be an appropriate tag just because an issue first shows up in first courses. If you are teaching people who have used a different language, this is not the correct tag. This tag is for questions directed at those teaching students with almost no programming experience and those teaching introductory courses. " OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-07-08T14:18:55.460" LastActivityDate="2017-07-08T14:18:55.460" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="40" PostTypeId="2" ParentId="30" CreationDate="2017-05-23T15:44:00.830" Score="11" Body="&lt;p&gt;I also have this problem frequently.  I use the example of Microsoft Word, and I would say something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Word allows you to give a document the appearance that you'd like.  You can bold, you can center, you can change font sizes.  Word is creating a &lt;em&gt;markup&lt;/em&gt; (in this case, it is generating a type of markup called &lt;em&gt;XML)&lt;/em&gt;.  &quot;Markups&quot; mark up text, just like it sounds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, could you create Word itself &lt;em&gt;in&lt;/em&gt; Word?  You can edit fonts, you can center text... but does any of that give you the capability to make a whole program like Word?  Similarly, you can't use Word to make Firefox, Chrome, or the alarm clock on your phone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Markup languages only format documents, but when you need to actually make a function calculator, or an iPhone app, or a video game, that's when you need code instead.&quot;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-24T05:46:28.303" LastActivityDate="2017-05-24T05:46:28.303" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="41" PostTypeId="2" ParentId="27" CreationDate="2017-05-23T15:48:39.187" Score="5" Body="&lt;p&gt;Which Assembly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Little Man Computer is so consistent and simple it's part of the syllabus for teenagers in UK. There are good (free) web simulators for it, and a large amount of resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ARM assembly is highly consistent, clear, and logical. Any student with a decent grasp of logic should have no problem with it. But I wouldn't teach it as an intro to programming unless your programming course was tightly coupled with sessions on logic and debugging, and your students were mostly selected as being strong in / enthusiastic about pure maths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of programming isn't about logical reasoning (although specific areas e.g. debugging, are almost 100% logical reasoning), and teaching logic-heavy languages is a great way to select for the subset of students that love logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that's your goal, and you're happy with driving away students who would have been strong programmers given time to learn logical reasoning, it's good. If your student intake is - for instance - a subset of a Math class, it's probably not an issue, and they may engage strongly with it.&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastActivityDate="2017-05-23T15:48:39.187" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="42" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T15:51:35.523" Score="3" Body="&lt;p&gt;L-system trees are a fun, clear, simple way to show recursion.&lt;/p&gt;&#xA;&lt;p&gt;e.g.: &lt;a href=&quot;http://www.malsys.cz/Gallery/GetThumbnail/JFI1IzqW/IqdVGQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.malsys.cz/Gallery/GetThumbnail/JFI1IzqW/IqdVGQ&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Ax5uY.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Ax5uY.jpg&quot; alt=&quot;A line drawing of a tree. Each branch looking like a smaller version of the tree.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I've taught this in beginner-level Python lessons, and it only requires a few lines of code to build complete trees. Most students love the artistic outcome - especially that so little code produced so much graphics.&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastEditorUserId="204" LastEditDate="2021-09-02T16:00:52.023" LastActivityDate="2021-09-02T16:00:52.023" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="43" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T15:58:30.917" Score="15" Body="&lt;p&gt;I like to use something that a student can connect with and something that they have to deal with regularly. You could choose any recursive everyday activity, but I like to choose revising an essay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you've already written your essay, and now you want to go back and perfect it. First you read the essay again, then you get feedback from others, then you make the changes, and then you revise the essay unless you consider your essay complete. In pseudocode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function revise(essay) {&#xA;  read(essay);&#xA;  get_feedback_on(essay);&#xA;  apply_changes_to(essay);&#xA;  revise(essay) unless essay.complete?;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After the students understand the basics of what recursion is by following the simple example above or one like it, I'd move on to more sophisticated examples of recursion like a simple sort. Take merge sort for example (this assumes arrays have been taught):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function sort(array) {&#xA;  a = array.first_half;&#xA;  b = array.second_half;&#xA;  sort(a);&#xA;  sort(b);&#xA;  merge(a,b);&#xA;}&#xA;&#xA;function merge(a,b) {&#xA;  final = [];&#xA;  a_counter = 0;&#xA;  b_counter = 0;&#xA;  while (final.length &amp;lt; a.length*2) {&#xA;    if a[a_counter] &amp;lt; b[b_counter] {&#xA;      final.push(a.shift);&#xA;      a_counter++;&#xA;    } else if (b[b_counter] &amp;lt; a[a_counter]) {&#xA;      final.push(b.shift);&#xA;      b_counter++;&#xA;    }&#xA;  }&#xA;  return final;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-23T21:53:40.430" LastActivityDate="2017-05-23T21:53:40.430" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="44" PostTypeId="1" AcceptedAnswerId="48" CreationDate="2017-05-23T16:00:31.340" Score="18" ViewCount="2915" Body="&lt;p&gt;I have been assisting an IT teacher who has recently started teaching computer science to year 7-9s (11-13 year-olds). This year they will just be covering basic client-side web development: HTML, CSS and a bit of JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was shocked to see him, and the kids, writing their HTML in Notepad- it makes code a lot harder to read, and simple typos, such as a missing bracket, almost impossible to spot. Which isn't ideal, especially for beginners. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my own coding, I always use InteliJ or WebStorm, however, I would worry that this might go in the opposite direction, and actually over-complicate things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone got any suggestions of a simple free IDE or text editor for web development for school kids? (It would need to be possible to install on school network).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking maybe something simple like Notepad++, Sublime, or possibly Atom. But would love to here your feedback or suggestions on what might be good for school kids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks very much,&#xA;Alicia Sykes &lt;/p&gt;&#xA;" OwnerUserId="55" LastEditorUserId="55" LastEditDate="2019-08-04T13:06:59.323" LastActivityDate="2023-01-10T13:17:00.137" Title="Recommended IDE for teaching web development to beginners" Tags="|web-development|ide|primary-school|" AnswerCount="10" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="45" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T16:02:37.253" Score="5" Body="&lt;p&gt;To make for a hands-on demonstration, I brought in a set of my son's Mega Bloks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/DHjAV.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/DHjAV.jpg&quot; alt=&quot;Mega Bloks&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I slowly built up a stack of blocks, and using a dry-erase marker, wrote the calling function and its argument on the block itself. With each new call, I &quot;pushed&quot; the function call onto my stack and then &quot;popped&quot; them off one by one as the functions began to return values rather than more function calls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used a basic factorial problem, so my stack of blocks ended up looking something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;--factorial(1)--&#xA;--factorial(2)--&#xA;--factorial(3)--&#xA;--factorial(4)--&#xA;--   main()   -- &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Students could see how one call to factorial relied on other calls and so on until reaching the base case which &quot;tore down&quot; the stack we had just built.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the magical elements of recursion for students is how a function can call itself. The idea of return values and a growing stack of function calls at least gave a tangible and visual example for something that can be abstract and initially challenging to understand.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T16:02:37.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="46" PostTypeId="1" CreationDate="2017-05-23T16:02:52.527" Score="16" ViewCount="860" Body="&lt;p&gt;Dynamic programming is a subject that's notoriously difficult to learn and to teach. It's one thing to educate oneself, say by reading the appropriate chapters in Kleinberg &amp;amp; Tardos or CLRS, and working through a sufficient number of example problems. It's another matter to learn or teach this material in a classroom setting at the high school, undergraduate, or graduate level. Intrinsic to the subject is the skill of identifying the type of problem structure that's amenable to the dynamic programming approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In light of this, what are effective approaches for teaching dynamic programming?&lt;/p&gt;&#xA;" OwnerUserId="62" LastEditorUserId="1293" LastEditDate="2017-09-17T14:05:24.270" LastActivityDate="2017-09-17T14:05:24.270" Title="What are effective approaches for teaching dynamic programming?" Tags="|lesson-ideas|algorithms|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="47" PostTypeId="2" ParentId="35" CreationDate="2017-05-23T16:04:50.637" Score="2" Body="&lt;p&gt;I would definitely start with front-end.  It's possible to avoid many of the warts of javascript by using ECMA6 or only teaching small pieces of the language.  For example, loops and if statements are sane in JS--you don't have to show them the weirdness with == vs. ===.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reason to start with front-end is that modifying pages by editing the DOM is significantly easier than spitting out html with mark-up in it.&lt;/p&gt;&#xA;" OwnerUserId="42" LastActivityDate="2017-05-23T16:04:50.637" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="48" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:05:25.770" Score="28" Body="&lt;p&gt;I find that the best introductory IDE is a lack thereof because, for the most part, the features that an IDE offers (code completion, organization, etc.) are more hurt than help and tend to promote completely unrelated questions, for example, &quot;What is this dropdown under the word I just typed&quot; and other questions about IDE function rather than language functions. Generally IDEs are a distraction to beginners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use a text editor with syntax highlighting such as sublime text, but nothing with too much many extra features. You certainly don't need a full fledged IDE.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="2" LastEditDate="2017-05-23T16:11:35.303" LastActivityDate="2017-05-23T16:11:35.303" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="49" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:11:26.130" Score="2" Body="&lt;p&gt;The answer can be very broad because of personal taste :) But you may want to check &lt;a href=&quot;https://www.visualstudio.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MS Visual Studio IDE&lt;/a&gt; which you can &quot;minimize&quot; for the purpose of education. And then extend if step by step.&lt;/p&gt;&#xA;" OwnerUserId="80" LastEditorUserId="150" LastEditDate="2017-07-24T11:51:33.833" LastActivityDate="2017-07-24T11:51:33.833" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="50" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:13:08.257" Score="10" Body="&lt;p&gt;In the context of front-end development, I suggest looking into &lt;a href=&quot;http://codepen.io&quot; rel=&quot;noreferrer&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each &quot;pen&quot; you can get an instant visual as to how your HTML/CSS/JS affect your page. Additionally, you can immediately begin working in a pen without having to create an account, which may be a factor given the age of your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the very least, it might be a good teaching tool and resource for sharing examples since you can make real-time edits and let students see what happens as a result.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T16:13:08.257" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="51" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:13:24.090" Score="7" Body="&lt;p&gt;I don't think the tool (or learning the tool) should get in the way of learning the initial core of the subject.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students are already comfortable with NotePad (or TextEdit, et.al.), why add to their cognitive load (7+-2) and the number of steps needed in getting their first few lines of Javascript running?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The IDE can come later, when the code no longer fits a small text window.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-06-15T16:19:05.007" LastActivityDate="2017-06-15T16:19:05.007" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="52" PostTypeId="2" ParentId="30" CreationDate="2017-05-23T16:15:33.313" Score="2" Body="&lt;p&gt;I can offer the difference between html and php and/or javascript in sense of web. One is executed to present information, other is executed to make some calculation, logical conclusions. And the result from programming language can be present or not present at all to the enduser&lt;/p&gt;&#xA;" OwnerUserId="80" LastActivityDate="2017-05-23T16:15:33.313" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="53" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:17:55.817" Score="4" Body="&lt;p&gt;You are correct in considering Sublime text, or atom text editor as they are light weight and more importantly will be hassle free for school kids. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one should also keep in mind considering school kids IDEs are too much to learn or get to know how to work on it therefore at these initial stages text-editors like said above and VScode which at least for web-development gives very good support and should be enough for their useage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would highly recommend have a look at &lt;a href=&quot;https://code.visualstudio.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Visual studio code&lt;/a&gt; It's the best light weight text editor/ IDE developed by Microsoft. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Some of the features in VS code:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It has IntelliSense which will help kids to autocomplete code thus for them writing code for them wont be like mugging up syntax and will also highlight error if there are any.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's free so you wont need to buy any licenses &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's lightweight text editor like IDE wont hog up CPU resources unlike Atom &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Comes with lots of plugins with which you can for example : &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag&quot; rel=&quot;nofollow noreferrer&quot;&gt;autotag&lt;/a&gt; which Automatically add HTML/XML close tag.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It comes with integrated terminal from which you can directly check your created website and there are plenty of plugins as well which will auto-refresh that as well as you make code changes in your file.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Though I suppose school kids wont need it but its good to give them some introduction to git how to commit/push and make changes to repos online which will lay strong foundation in them for open source as well. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am not saying others are bad or anything else it's just Sublime text is paid software though you can use unregistered version but it annoy you will its pop-up to buy license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Atom is my second choice after VScode.&lt;/p&gt;&#xA;" OwnerUserId="73" LastActivityDate="2017-05-23T16:17:55.817" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="54" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:17:56.660" Score="11" Body="&lt;p&gt;The latest generation of text editors, e.g. Sublime, Atom, Visual Studio Code, are great, and seem to offer all that one might want from an IDE. I've a soft spot for Atom, but don't rule the others out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option might be to try Jupyter Notebooks in the web browser. Not an IDE in the traditional sense, but a good introduction to playing with code and very useful for scientific computing in their own right.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-23T16:17:56.660" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="55" PostTypeId="2" ParentId="35" CreationDate="2017-05-23T16:19:14.620" Score="0" Body="&lt;p&gt;Client side first allows students to get simple stuff running using a smaller number of required concepts and steps.  So it's probably a lower cognitive load to getting most people started.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-05-23T16:19:14.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="56" PostTypeId="2" ParentId="4" CreationDate="2017-05-23T16:23:50.777" Score="2" Body="&lt;p&gt;My planned approach for AP CS A next year is to have students begin thinking about how to model the world around them using objects. Coming off a year of C programming, the jump to OOP is more a conceptual than a syntactical challenge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One challenge I plan on assigning is to create a class to model a student in high school. What variables are essential? What are key methods for student behavior? What might be public or private? It is completely open-ended and will force students to begin thinking in an object-oriented manner. &lt;em&gt;It will be less of code and more of computational thinking in the OO-context.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After doing this, inheritance will become much clearer. It's one thing to have a Students class, but it is also valuable to create a class for each grade level and extend the superclass accordingly (or to have subclasses based on elementary, high school, college, grad school). The possibilities for design become endless, and effective program/software design can truly begin here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the syntax is important to teach, I see the introduction of objects as a great vehicle for &quot;unplugged&quot; activities that teach the object-oriented mindset.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T16:23:50.777" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="57" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:24:00.383" Score="2" Body="&lt;p&gt;You mention WebStorm. JetBrains has a selection of other IDEs, some specifically targetted at students (e.g. PyCharm Edu - &lt;a href=&quot;https://www.jetbrains.com/pycharm-edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.jetbrains.com/pycharm-edu/&lt;/a&gt; - (The classroom version of PyCharm) defaults to a very simplistic mode, with most/all the advanced features hidden until the teacher enables them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Off the top of my head, you can preconfigure WebStorm similarly - if you're not sure, I'd contact JetBrains directly. In the past, they've been highly responsive to our requests for help with using their products in the classroom.&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastActivityDate="2017-05-23T16:24:00.383" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="58" PostTypeId="2" ParentId="44" CreationDate="2017-05-23T16:24:02.713" Score="5" Body="&lt;p&gt;I go for simple. This year we used either an online editor or the free version of JCreator specifically because they don't have autocomplete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I noticed last year using NetBeans is that students become dependent on autocomplete. When writing code on paper - I teach mostly AP CompSci so paper is necessary - kids would struggle to remember method names and what parameters go where. They were so used to just typing a dot and having everything pop up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This year switching to a simpler editor has made a huge difference. Free response questions were almost universally stronger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've thought about going for Notepad++ next year, although there doesn't seem an easy way to link it to the JDK. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they make it through the first year I don't care what IDE they use. I demo in NetBeans because it's what I'm used to. But I've got students using IntelliJ, Eclipse, NetBeans, or pretty much whatever they want to use. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-23T16:24:02.713" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="59" PostTypeId="1" CreationDate="2017-05-23T16:28:52.300" Score="6" ViewCount="306" Body="&lt;p&gt;Are there any advantages to using small microcontrollers (such as an Arduino, etc.) with tactile, physical I/O (such as buttons, LEDs, robotic actuators, etc.)? For instance, does it help create more interest in learning computer programming, or widen the potential audience among kids and undergrads for going further in their CS education?&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="41" LastEditDate="2018-02-27T08:07:57.090" LastActivityDate="2018-03-11T19:24:22.413" Title="Using microcontrollers in an Introductory course" Tags="|student-motivation|robotics|arduino|physical-computing|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="61" PostTypeId="2" ParentId="14" CreationDate="2017-05-23T16:38:21.497" Score="13" Body="&lt;p&gt;For me, labs are worth very little. The district sets them to be only 10% of the student's average. So I don't worry about them working together. In fact, I encourage it. What I tell students is that as long as they understand the lab when they're finished, it's a successful lab. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, I'm sure there are students that straight copy from their friends. At 10% though, it's not worth worrying about. They'll have tests and quizzes based on the labs and will absolutely bomb those. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For larger projects I only count the actual project as part of the grade. Turning in a working project is 70% of the grade, although I'm thinking of dropping that to 60% next year. The rest of the grade comes from an in class, on paper, free response that's based on what they wrote for the project. If they complete the project and understand what they turned in, the FRQs should be relatively easy. If they copied from a friend, they're going to be hurting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also run big projects through MOSS. Usually just the threat of that is enough to limit straight copying. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-23T16:38:21.497" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="62" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T16:41:28.140" Score="9" Body="&lt;h3&gt;Recursion as a loop&lt;/h3&gt;&#xA;&lt;p&gt;I'd present recursion as a form of a loop rather than being separate thing.  Then, I'd show the students how to covert between flat form and recursive form, and discuss the pro's/con's of using both in implementation.&lt;/p&gt;&#xA;&lt;h3&gt;Flat-vs.-recursive formats rather than examples of recursion&lt;/h3&gt;&#xA;&lt;p&gt;Since any loop can be written in recursive format, there's basically infinitely many examples that could be presented.  But, some seem to make more sense to people in recursive form than others.  Why?&lt;/p&gt;&#xA;&lt;p&gt;This could be a fruitful avenue for class discussion.  For example, another answer here gave the example of fractals - why should fractals be seen as more recursive than, say, counting, when both loops can be written in flat form or recursive form just as easily?  Then what does this imply - should we just always use one form over the other, or do they each have their place?&lt;/p&gt;&#xA;&lt;p&gt;I love discussions like this, and I think that they could make the class fun!&lt;/p&gt;&#xA;&lt;h3&gt;Ideas for coursework (homework/projects):&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;[intro-level]&lt;/em&gt;  Students are given a large number of loops in flat form, then must rewrite them in recursive form.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;[intro-level]&lt;/em&gt;  Students are given a large number of loops in recursive form, then must rewrite them in flat form.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;[college-level]&lt;/em&gt;  Short-answer questions about which form they should use in real-life coding scenarios.  For example, in some situations flat form's much preferable to avoid stack overflows and implement tail-call optimization when not supported by the underlying platform.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;[college/grad-level]&lt;/em&gt;  Write an interpreter or meta-programming function that converts between flat and recursive forms.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="39" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-05-23T16:58:27.177" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="63" PostTypeId="1" CreationDate="2017-05-23T16:43:48.343" Score="10" ViewCount="156" Body="&lt;p&gt;Given the current trends with Moore's law and computer systems design, where even the cheapest cell phones and Raspberry Pi's, etc., are multi-threaded multi-processors, and any gains in performance (per Watt, per dollar, etc.) seem to be heading towards even more concurrent hardware:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How early should the concepts of parallel computation be introduced in computer science education (as the almost required default form of actual programming practice)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the minimum prerequisite concepts before the requirement of concurrent thinking be introduced?&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="124" LastEditDate="2017-05-24T13:24:41.110" LastActivityDate="2017-07-30T17:22:29.213" Title="When should concurrency and parallel multi-processing concepts be introduced?" Tags="|concurrency|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="64" PostTypeId="1" CreationDate="2017-05-23T16:43:57.557" Score="11" ViewCount="188" Body="&lt;p&gt;I'm interested in introducing version control to a HS CS class, and was considering starting with Github since it's a fairly standard tool used by developers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are pre-requisites for understanding version control that I should make sure students master first?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions on other ways to introduce this topic to students are definitely welcome!&lt;/p&gt;&#xA;" OwnerUserId="86" LastEditorUserId="204" LastEditDate="2017-09-11T18:53:07.697" LastActivityDate="2018-03-15T10:46:16.147" Title="on-What are pre-requisites for teaching version control to a high school CS class?" Tags="|github|revision-control|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="65" PostTypeId="2" ParentId="59" CreationDate="2017-05-23T16:54:54.130" Score="5" Body="&lt;p&gt;If the goal is to create more interest in learning programming (as you state above), then Arduinos are not the strongest vehicles for reaching that end. The logic of &lt;code&gt;void setup()&lt;/code&gt; and &lt;code&gt;void loop()&lt;/code&gt; are not immediately accessible nor intuitive to a student brand new to programming. For one who is experienced and/or is inclined toward mechanical/electrical engineering, then Arduinos are fantastic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, I have seen firsthand how a Raspberry Pi can indeed be that inspiring device for wanting to learn more.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;It's a full computer.&lt;/strong&gt; The simple fact that you can spend $35 on a computer (not including peripherals) is mind-blowing to start. The sheer size/cost is initially surprising and piques curiosity. Plus, this makes for a great conversation about operating systems and open source.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Students can level up.&lt;/strong&gt; A student can begin with Scratch, make music with Sonic Pi, make art with Processing, hack Minecraft with Python, learn the basics of the Linux command line, and potentially move on to Java with BlueJ. To me, it is the essence of &quot;low-floor, high-ceiling&quot; when it comes to learning programming.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;GPIO pins unite programming and physical computing.&lt;/strong&gt; A student who becomes adept at Scratch can move on to interacting with lights, buttons, and sensors even from just within Scratch. Using a variety of accessories, such as the Pi Camera or the Sense Hat, students can go from software to hardware seamlessly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I could go on and on, but I think in terms of creating excitement and interest, the Pi is incredibly successful.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T16:54:54.130" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="66" PostTypeId="1" CreationDate="2017-05-23T16:57:27.693" Score="18" ViewCount="395" Body="&lt;p&gt;During the past decade, interest in machine learning has exploded, especially due to the many and growing successes of deep learning approaches using convolutional and other neural networks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To those familiar with a modern artificial intelligence curriculum, say embodied by Russel &amp;amp; Norvig, ML may be safely regarded as a proper subset of AI. Yet due to the increasing popular attention to ML, more and more we bear witness to the conflation of AI and ML; even some computer scientists use AI and ML interchangeably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As CS educators who teach AI courses, how do you develop a balanced curriculum that incorporates ML, yet pays attention to crucial problems like commonsense reasoning and inference, which don't share the spotlight with ML and have so far, in fact, proven resistant to ML approaches, including deep learning? &lt;/p&gt;&#xA;" OwnerUserId="62" LastEditorUserId="150" LastEditDate="2017-06-29T17:35:16.460" LastActivityDate="2017-06-29T17:35:16.460" Title="How does one create a balanced AI curriculum in light of the popularity of Deep Learning?" Tags="|artificial-intelligence|machine-learning|deep-learning|curriculum-design|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="69" PostTypeId="1" CreationDate="2017-05-23T17:13:34.757" Score="14" ViewCount="209" Body="&lt;p&gt;In the words of Andrew Clay Shafer, “In software development, version control is the foundation of every other Agile technical practice.” (Allspaw &amp;amp; Robbins, &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1449377440&quot; rel=&quot;noreferrer&quot;&gt;2010&lt;/a&gt;).  Yet, 57% of CS curricula does not provide practical exposure to it. (&lt;a href=&quot;https://www.youtube.com/watch?v=TFfVrdDTuHM&quot; rel=&quot;noreferrer&quot;&gt;Betz&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I teach the use of source code control as part of an introductory CS class?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To put it another way: How can we introduce source code control early in the curriculum?&lt;/p&gt;&#xA;" OwnerUserId="53" LastEditorUserId="204" LastEditDate="2017-09-11T18:52:39.490" LastActivityDate="2017-09-11T18:52:39.490" Title="How can I integrate teaching source code control (Git/Mercurial/etc) into my introductory CS class?" Tags="|revision-control|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="70" PostTypeId="2" ParentId="64" CreationDate="2017-05-23T17:15:46.047" Score="7" Body="&lt;p&gt;The biggest one for me would be a reason to use version control. When you're writing small lab assignments, version control probably isn't worth all that much. It's when they get to a point where projects become larger than a handful of methods, or when you're working on separate pieces of a larger project with partners that it becomes useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Version control, specifically Git and GitHub, is definitely on my list of new topics to add to my 2nd year course next year. My students are doing collaborative projects right now and it's painful to watch them email code back and forth. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="27" LastEditDate="2017-05-23T18:42:59.117" LastActivityDate="2017-05-23T18:42:59.117" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="71" PostTypeId="2" ParentId="17" CreationDate="2017-05-23T17:24:00.510" Score="7" Body="&lt;p&gt;Rather than use analogy, I think it best to demonstrate the power of recursion on a problem for which the recursive solution is natural and the alternative solutions are an obvious exercise in masochism, to write and especially to prove. Take the Towers of Hanoi problem. When one sees how the problem just cleaves and dissolves into the recursive formulation, that experience of awe will drive one to a deeper and more nuanced exploration of recursion. Elegant expression requires no analogy.&lt;/p&gt;&#xA;" OwnerUserId="62" LastEditorUserId="62" LastEditDate="2017-05-24T02:06:36.360" LastActivityDate="2017-05-24T02:06:36.360" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="72" PostTypeId="2" ParentId="69" CreationDate="2017-05-23T17:28:40.273" Score="10" Body="&lt;p&gt;There are quite a few solutions which allow you to make a VCS part of your teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &lt;a href=&quot;https://classroom.github.com/#&quot; rel=&quot;noreferrer&quot;&gt;GitHub Classroom&lt;/a&gt; allows you to create assignments with some starter code, then invite your students to work on it and submit their changes through Git. They provide a promotional video &lt;a href=&quot;https://www.youtube.com/watch?v=ChA_zph7aao&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;, which shows the workflow with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ksiresearch.org/seke/dms16paper/dms16paper_36.pdf&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Scaffolding Version Control into the Computer Science Curriculum&lt;/em&gt;&lt;/a&gt; states:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;VCS and other professional tools are often introduced&#xA;  later in the educational curriculum, possibly in a software&#xA;  engineering course, generally a second-year or later course,&#xA;  and may not be reinforced through repetition and application&#xA;  in later classes. This is unfortunate, because powerful&#xA;  tools such as VCS can also be difficult for new users and&#xA;  especially those new to programming and software in general.&#xA;  The power and flexibility of new distributed VCS can&#xA;  make them especially challenging, unfriendly, and distracting&#xA;  for students already fully engaged in developing core&#xA;  competencies required in the computer science curriculum.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;They propose &lt;a href=&quot;http://gitsubmit.com/#/&quot; rel=&quot;noreferrer&quot;&gt;GitSubmit&lt;/a&gt; as a helpful solution here, describing it as &quot;A Custom Environment for Introducing&#xA;VCS to Novice Developers&quot;. Clearly, it's helpful here to introduce VCS as soon as possible, to avoid the issues described later in the paper, where higher level students have virtually no experience of using a VCS, despite its importance in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the pedagogical challenges, the presentation &lt;a href=&quot;https://pdfs.semanticscholar.org/47c2/856f9333536e5827c59193e68200d8635c89.pdf&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Challenges and Confusions in Learning Version&#xA;Control with Git&lt;/em&gt;&lt;/a&gt; seems interesting. They conclude:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Introduce authentic/relevant use cases to motivate the use and&#xA;  learning of the system&lt;/li&gt;&#xA;  &lt;li&gt;Authentic practical courses cause students to see the value of&#xA;  VCSs&lt;/li&gt;&#xA;  &lt;li&gt;However, use VCSs throughout the curriculum, as, for instance,&#xA;  limited resources available during authentic project courses may&#xA;  limit how the system is adopted&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-05-23T17:28:40.273" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="73" PostTypeId="2" ParentId="59" CreationDate="2017-05-23T17:29:56.257" Score="8" Body="&lt;p&gt;Microcontrollers can address two important aspects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is bridging the gap between the code, and the real world. Particularly if you have sensors (accelerometer, buttons) and outputs (an LED array, sound, motors). Not just to address the robotics aspect (which can rapidly get complex), but some simple game concepts (patterns, reactions). Nothing which is any harder than doing the same on a Raspberry Pi with a GPIO extension, but potentially cheaper hardware (which is important if it is likely to get fried). Also, if you want a battery powered device, or a small data-logger, a &lt;a href=&quot;http://microbit.org/&quot; rel=&quot;noreferrer&quot;&gt;microbit&lt;/a&gt; is more suitable than a Raspberry-Pi.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For introductory use, I think creating a simple tilt-sensitive animation is a very effective way of making 'coding' seem more real. Yes, the coding gets more complicated if you want to do more - but starting in a block editor or python avoids this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more tactile, less 'black box' approach to coding seems (according to research by the &lt;a href=&quot;http://www.newelectronics.co.uk/electronics-interviews/zach-shelby-heads-the-newly-launched-microbit-educational-foundation/147863/&quot; rel=&quot;noreferrer&quot;&gt;BBC&lt;/a&gt;) seems to provide more up-front interest to less technical students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second aspect is working in a resource-constrained environment. Admittedly this is more a advanced concept to teach, but the microcontroller is 'clearly' a different beast to a laptop or a phone. Having some restrictions sometimes help people to solve problems more easily than giving them the blank sheet of 'plus anything you can find a python library for'. A computer small enough to wear on a lanyard will shift the way students think about what is possible.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-23T17:29:56.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="74" PostTypeId="2" ParentId="64" CreationDate="2017-05-23T17:58:21.243" Score="2" Body="&lt;p&gt;Version control and the associated tool addresses the following (at least)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Backups (for when you lost or deleted something)&lt;/li&gt;&#xA;&lt;li&gt;History of changes (for when you made a mistake and need to go back)&lt;/li&gt;&#xA;&lt;li&gt;Collaborative working (sharing and merging)&lt;/li&gt;&#xA;&lt;li&gt;Reviewing&lt;/li&gt;&#xA;&lt;li&gt;Bug fixing and development on different branches&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As I've written these, I think they're roughly in order of being less obvious or harder to grasp. Everyone is familiar with the need to keep a backup of an essay (we hope) but the idea of going back to look at how something was written at the start of last week's lesson is rather more unique to writing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most obvious prerequisite would be to get to the stage where rather than starting to write a program from scratch, it's better to take something old and re-purpose it. This is roughly the same point where you start to care about loosing something (to start with, code gets better if you write it, throw away and start from scratch again).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although it's slightly tangential, I would also say it is better to talk about review and collaboration before introducing version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think it's as important to be in a position (from the start) to need to explain about switching between different branches, cherry picking, etc. A lot of the really useful ideas come from the head, logs and diffs.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-23T17:58:21.243" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="75" PostTypeId="2" ParentId="2" CreationDate="2017-05-23T18:09:42.113" Score="9" Body="&lt;p&gt;For simple stuff I've used &lt;a href=&quot;http://codingbat.com&quot; rel=&quot;noreferrer&quot;&gt;CodingBat&lt;/a&gt;. They've got an &lt;a href=&quot;http://codingbat.com/author&quot; rel=&quot;noreferrer&quot;&gt;authoring system&lt;/a&gt; buried on the site. It's not terribly difficult to create your own questions, although the &lt;a href=&quot;http://codingbat.com/authoring.html&quot; rel=&quot;noreferrer&quot;&gt;instructions are pretty wordy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you create a problem there are a set of fields to fill in. I'd attach a screenshot, but the network I'm on blocks imgur. I'll try to come back and add an image later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;doc&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the instructions that your students will read. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;hint&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want your students to have the hint button, add some text&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;cases&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;List as many test cases as you want. Separate each parameter that you want to send into the method you're testing with a comma. The expected answer comes at the end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like this for the method below. &lt;code&gt;123&lt;/code&gt; goes into &lt;code&gt;sumEvenDigits&lt;/code&gt; as n and then &lt;code&gt;2&lt;/code&gt; is the expected answer. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;123,2&#xA;2006,8&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;code&lt;/strong&gt;&#xA;Starter code for your students. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int sumEvenDigits(int n) {&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tags&lt;/strong&gt;&#xA;Let's you put questions into categories, specify language, and set a difficulty. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-23T18:09:42.113" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="76" PostTypeId="1" AcceptedAnswerId="78" CreationDate="2017-05-23T18:23:51.483" Score="14" ViewCount="730" Body="&lt;p&gt;Do automatic style hints (like those provided by linters) significantly increase the student's understanding of the language they're learning? I am asking because I assist in a course that uses a language that is not widely used. A linter does not exist yet, and I'm wondering whether it would be worth the effort to make one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, does it matter whether the style hints are provided as you type rather than upon saving or compiling the program?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would love to see quantified studies about this, but personal experience is very welcome too.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Some things I am thinking about for a functional language (examples use Haskell) are listed below, but these are not vital for answering this question. Experience with other paradigms is appreciated as well!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;When parentheses are(n't) needed. A common &lt;em&gt;faux pas&lt;/em&gt; is to surround every application of a constructor with parentheses (&lt;code&gt;(Just 5)&lt;/code&gt;), even when they are not needed, because it is necessary in pattern matches.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Writing &lt;code&gt;int&lt;/code&gt; instead of &lt;code&gt;Int&lt;/code&gt;, making a type variable instead of a concrete type.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using &lt;code&gt;where&lt;/code&gt; clauses for helper functions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Suggesting pattern matches where guards where used (i.e., not checking &lt;code&gt;| x == 5&lt;/code&gt; but using a pattern match where &lt;code&gt;x&lt;/code&gt; is replaced by &lt;code&gt;5&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Recursion that may not terminate. For instance, students tend to get confused writing functions that get no parameters, and end up writing things like &lt;code&gt;instance minBound ... where minBound = minBound&lt;/code&gt;. (Not really a &lt;em&gt;style&lt;/em&gt; hint)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerDisplayName="user24" LastEditorUserId="919" LastEditDate="2017-06-23T16:23:54.657" LastActivityDate="2019-06-10T11:33:02.933" Title="Do automatic style hints help students to understand the language they're learning?" Tags="|best-practice|coding-style|ide|linters|" AnswerCount="3" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="77" PostTypeId="2" ParentId="30" CreationDate="2017-05-23T18:28:40.700" Score="4" Body="&lt;p&gt;The AP CS Principles curriculum defines three elements of an algorithm:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sequencing &lt;/li&gt;&#xA;&lt;li&gt;Selection&lt;/li&gt;&#xA;&lt;li&gt;Iteration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This can be a point of divergence between a markdown language and a programming language. Selection via conditionals and Boolean operators and iteration via loops are constitutive elements of a program, not a document styled with a markup language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A markdown language may use sequencing -- I'm thinking particularly of &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; in HTML -- yet one could not implement an algorithm (using the above three elements) in HTML or CSS. There's (maybe) selection in terms of ids and classes with CSS but not in the sense of Booleans. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the idea that an algorithm solves a computational -- viz. mathematical -- problem allows one to stress the notion of computation itself, which is intrinsic to a programming language and which separates it from the styling of a document.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T18:28:40.700" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="78" PostTypeId="2" ParentId="76" CreationDate="2017-05-23T18:34:23.527" Score="10" Body="&lt;p&gt;In my experience, immediate feedback is helpful in speeding along development, but rarely enhances understanding.  In fact, I am often frustrated with the immense level of help that is provided to my strugglers, because they wind up moving words around until whatever they've written stops being underlined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only exception to this has been for norms that don't cause errors, such as using CAPS for &lt;code&gt;static final&lt;/code&gt; variables in Java.  In those instances, it is very helpful to have some sort of indicator that what they've done isn't perfect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Now that I've seen your edit with examples, it seems like what you are contemplating is basically all of the stuff that I feel is helpful.  In which case, I believe that it could be very helpful!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-24T12:17:55.357" LastActivityDate="2017-05-24T12:17:55.357" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="79" PostTypeId="1" CreationDate="2017-05-23T18:42:46.130" Score="15" ViewCount="425" Body="&lt;p&gt;My first website with a login form had the password hardcoded in the JavaScript code, and if the entered password matched it would redirect to a private URL that was just not linked anywhere, but still public if anyone knew the URL, and yes, that URL was also hardcoded in the JavaScript code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in terms of security this was basically a &quot;Do not read&quot; banner, with the &quot;private&quot; content just written below it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, this is just a specific example of me not knowing any better in the early days of web development. There are many other domains in programming where you might introduce vulnerabilities if you don't think about what you're doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a generic technique to teach students to keep an eye on their code's security, maybe trying to get them into figuratively hacking their own programs and exploit vulnerabilities?&lt;/p&gt;&#xA;" OwnerUserId="69" LastEditorUserId="27" LastEditDate="2017-05-25T10:32:24.913" LastActivityDate="2017-08-10T16:32:56.337" Title="How to raise students' security awareness in programming?" Tags="|web-development|security|" AnswerCount="6" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="80" PostTypeId="1" AcceptedAnswerId="82" CreationDate="2017-05-23T18:44:01.250" Score="10" ViewCount="277" Body="&lt;p&gt;I will be giving a small course on the Python programming language to a group of interns this summer. As I am sure you know, there are many different versions of the Python language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering what to consider when choosing a particular version of the Python programming language. Is choosing the latest version of Python &lt;em&gt;always&lt;/em&gt; the correct decision?&lt;/p&gt;&#xA;" OwnerUserId="99" LastEditorUserId="124" LastEditDate="2017-05-23T22:11:23.740" LastActivityDate="2017-06-14T17:26:48.100" Title="What to consider when choosing version of Python?" Tags="|python|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="81" PostTypeId="2" ParentId="6" CreationDate="2017-05-23T18:56:06.877" Score="8" Body="&lt;p&gt;I think induction should be taught first, and then loop invariants, since you usually need induction to prove that the loop invariant is really an invariant, and also because you need induction for other purposes than just proving that a loop invariant is really an invariant. In fact, in most curricula for Computer Science at university will have some math class that covers induction before a Algorithm Correctness course.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this isn't the case, you might want to teach induction with some other examples first.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, proving that $1+2+\cdots+n = \frac{n(n+1)}{2}$ and a few other, relatively simple induction statements (e.g. sums, divisions, inequalities). If you need to teach recurrence relations as well, then you might introduce them now as well since you sometimes need induction to solve them. I think it is also helpful for the intuition to explain the domino-effect: $P(1)$ implies $P(2)$, $P(2)$ implies $P(3)$, $P(3)$ implies $P(4)$, etc. (also with a concrete example). This also shows the importance of the base case in the induction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, loop invariants. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would again (as always, actually) start with some easy examples, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x=0&#xA;while (x &amp;lt; 2)&#xA;    x = x+1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;with the invariant being $x \leq 2$. How to find this? Well, just go through the loop. In this case this is doable: $x=0$ becomes $x=1$ becomes $x=2$. Now show them you don't really need to do the whole loop if you have &lt;code&gt;while (x&amp;lt;100)&lt;/code&gt;, for example. Now it is time to mention induction again: Since you don't want to write all hundred steps, you can use induction to prove this loop invariant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students now might think they just need to replace the lesser than with lesser than or equals. Show them this isn't true with an example like this (or use lesser than or equals in the statement): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x=0&#xA;while (x &amp;lt; 9)&#xA;    x = x+2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, it is probably time for some complexer examples. &lt;/p&gt;&#xA;" OwnerUserId="111" LastEditorUserId="111" LastEditDate="2017-05-26T19:30:21.757" LastActivityDate="2017-05-26T19:30:21.757" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="82" PostTypeId="2" ParentId="80" CreationDate="2017-05-23T18:56:39.750" Score="19" Body="&lt;p&gt;A few years ago, the answer to this would have been &quot;stick with Python 2; the libraries aren't ready for Python 3 yet&quot;. In many cases, that would have been a deal-breaker, because many of the older libraries were pretty useful, particularly for &lt;a href=&quot;https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-python-3/&quot; rel=&quot;noreferrer&quot;&gt;scientific computation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the story's a bit different now, in 2017. &lt;a href=&quot;http://py3readiness.org/&quot; rel=&quot;noreferrer&quot;&gt;There isn't much of a reason to stick with Python 2&lt;/a&gt;; almost all of the top 360 libraries support it now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few popular resources, like &lt;a href=&quot;https://learnpythonthehardway.org/book&quot; rel=&quot;noreferrer&quot;&gt;Learn Python the Hard Way&lt;/a&gt;, have remained ardently Python 2-only &lt;a href=&quot;https://learnpythonthehardway.org/python3/&quot; rel=&quot;noreferrer&quot;&gt;until recently&lt;/a&gt; (early 2017), and I suspect a lot of old tutorials haven't been updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you stay with Python 2, you miss out on all of the really nice features, like &lt;code&gt;async&lt;/code&gt; and f-strings, which have only been added to the 3.x series.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something to consider, though: Python 2 and 3 are very similar, and learning one will mean you can relatively easily switch to the other. Python 3 just removes the major 'gotchas', like &lt;code&gt;5 / 2 = 2&lt;/code&gt;, or bad things happening when you use Unicode. For beginners, I think it's a great advantage for things to work intuitively (until, of course, you fight with the &lt;a href=&quot;https://stackoverflow.com/questions/39618943/why-does-the-floating-point-value-of-40-1-look-nice-in-python-3-but-30-1-doesn&quot;&gt;floating point representation&lt;/a&gt; issue).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, I don't think you'll experience any problems with Python 3, and it seems logical to me to learn the &lt;em&gt;future&lt;/em&gt; of the language, rather than Python 2, &lt;a href=&quot;https://wiki.python.org/moin/Python2orPython3&quot; rel=&quot;noreferrer&quot;&gt;which is legacy&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-06-14T17:26:48.100" LastActivityDate="2017-06-14T17:26:48.100" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="83" PostTypeId="2" ParentId="79" CreationDate="2017-05-23T19:02:56.920" Score="14" Body="&lt;p&gt;Make it into an assignment/game. Each student creates a project that is passed to another, randomly chosen student, to hack. Give points for both the project and the &quot;hacking&quot; results. The hacking assignment should also be graded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Security has to be taught and the value learned, usually painfully. I have lived through many &quot;no one will do that!&quot; only to have a product, or network, broken because someone did.&lt;/p&gt;&#xA;" OwnerUserId="35" LastActivityDate="2017-05-23T19:02:56.920" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="84" PostTypeId="1" CreationDate="2017-05-23T19:38:55.947" Score="5" ViewCount="92" Body="&lt;p&gt;In a course about Fundamental Computer Science, which includes Turing Machines,&lt;br&gt;&#xA;how many questions like &quot;Construct a Turing Machine that does X&quot; should I include?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There should be at least a few basic constructions, like doubling a string of ones or checking whether a number is even, checking whether one number is larger than another, to show how a Turing Machine works. However, I'm unsure whether to include more difficult problems, like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Given two positive integers, check whether one is divisble by the other.&lt;/li&gt;&#xA;&lt;li&gt;Given a positive integer $n$, check whether $n$ is prime.&lt;/li&gt;&#xA;&lt;li&gt;Given a positive integer $n$, compute the $n$th Fibonnaci number.&lt;/li&gt;&#xA;&lt;li&gt;Given two positive integers $m,n$, calculate $m^n$.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, should I just allow the blank symbol and one other symbol or should I allow any number of symbols? Or maybe a mix. The difficulty will largely depend on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students learn thinking abstractly about these problems. However, this abstract thinking is different from the abstract thinking that is used in most programming activities, so I'm unsure. &lt;/p&gt;&#xA;" OwnerUserId="111" LastActivityDate="2017-10-08T17:20:00.970" Title="In a course about Turing machines, how many questions like &quot;Construct a Turing Machine that does X&quot; should I include?" Tags="|turing-machines|" AnswerCount="1" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="85" PostTypeId="2" ParentId="35" CreationDate="2017-05-23T19:40:00.267" Score="1" Body="&lt;p&gt;Students need at least a cursory understanding of how web pages are built before moving to the back end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last year we did a project where there were groups split into front end design, front end JS, and backend PHP. The JS and PHP groups weren't able to get started without going back and learning the very basics of HTML. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it were me, I'd probably start with basic HTML and CSS and then go to JS to make something interactive and shiny. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-23T19:40:00.267" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="86" PostTypeId="2" ParentId="84" CreationDate="2017-05-23T19:49:48.797" Score="5" Body="&lt;p&gt;I integrate many, many simple TMs into both my lecture and as homework.  I also force them to use descriptors such as $\vdash$ and $\vdash^*$ on their machines.  I've found that it takes a long time for students to get used to basic operations.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have no problem converting a given TM to its tuple members ($\delta$, $\Gamma$, $\Sigma$, etc.), but have surprising trouble seeing the performance implications of transitions on machines that I provide to them.  With practice, they get much better at this, but it takes (in my experience) a surprising amount of practice, both in &lt;em&gt;encoding&lt;/em&gt; and &lt;em&gt;decoding&lt;/em&gt; simple Turing Machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some particular traps for my students have been: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;navigating halting states (since they cannot transition outwards)&lt;/li&gt;&#xA;&lt;li&gt;identifying ending conditions of loops&lt;/li&gt;&#xA;&lt;li&gt;making comparisons between two strings stored on different parts of the tape&lt;/li&gt;&#xA;&lt;li&gt;learning when it is appropriate to overwrite your data.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of these take practice.  I do this in-class so that I can assist and guide, but I also have many hours of facetime with my students.  In a more constrained timeline, I would give out homework assignments instead.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-10-08T17:20:00.970" LastActivityDate="2017-10-08T17:20:00.970" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="87" PostTypeId="2" ParentId="79" CreationDate="2017-05-23T19:54:05.067" Score="2" Body="&lt;p&gt;I would just try to make resources available to them and make sure to give examples of what not to do (e.g. Your example). In terms of resources, I'd provide info about attack vectors, threat models, etc. Specifically I'd provide the OWASP top 10.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-05-23T19:54:05.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="89" PostTypeId="1" CreationDate="2017-05-23T20:14:55.943" Score="16" ViewCount="983" Body="&lt;p&gt;When making more complex programs, it is natural that one needs to run the program to see whether things work and fixing bugs. However, if one makes a lot of mistakes in basic programming, e.g. writing &lt;code&gt;=&lt;/code&gt; instead of &lt;code&gt;==&lt;/code&gt;, this will slow down coding a lot, so it needs to be avoided as much as possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A possible solution to make students learn the basic syntax very well is to have a written test where students need to make small programs that only use basic syntax. Therefore, students need to learn to do these things right the first time, and also know the basic syntax very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will this be effective? Is there a better way?&lt;/p&gt;&#xA;" OwnerUserId="111" LastEditorUserId="919" LastEditDate="2017-06-23T15:37:47.953" LastActivityDate="2018-05-27T22:52:26.933" Title="Should I have written tests on basic programming skills?" Tags="|best-practice|grading|syntax|assessment|" AnswerCount="9" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="90" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T20:20:18.400" Score="2" Body="&lt;p&gt;I think that you could achieve your intended goal more easily simply by waiting. People naturally learn from their mistakes and I think that the wrong equals or no semicolon at the end of a line will stop fairly quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for written assessments, I think that it is next to useless to have a written syntax quiz to catch typographical errors and simple mistakes like these. Learning to catch these mistakes from error messages is almost as important as not making the mistakes in the first place. It's a lesson in how to read an error message as an added bonus.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-05-23T20:20:18.400" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="91" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T20:26:13.307" Score="3" Body="&lt;p&gt;Seems like an objective test early in the year over syntax is a really good way to run off rookies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your kids write enough code, they'll pick up the syntax. After forgetting a semicolon for the 20th time, you start to remember. Trace enough code with = vs == and you'll figure out what's going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's the same way experienced coders pick up new languages. When I first started with Python I would forget to indent or forget colons at the end of loops. Made the same mistake a few times and got used to the syntax. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-23T20:26:13.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="92" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T20:29:02.243" Score="1" Body="&lt;p&gt;You run the risk here of unduly penalising or discouraging students who have dyslexia or other issues which cause them to do badly with this type of trivial test. This sounds a little like the sort of tests that used to be used in job interviews, and are thought to be of little value now...&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-23T20:29:02.243" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="93" PostTypeId="1" AcceptedAnswerId="100" CreationDate="2017-05-23T20:30:50.180" Score="11" ViewCount="1072" Body="&lt;p&gt;I'm currently teaching a introductory programming class in a technological university course (FYI, this is a type of university course that is not a BS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The recommended language to use for this class is C and I'm following this guideline, but I know that most of the students will work as web developers at the end of the course (some of them already works as client support in IT companies), so I want to introduce them to some modern web concepts, but I don't know how.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They will have other classes during the course on other important subjects for web development (like computer networks and software engineering), but won't have any class that teaches modern programming languages for web, like Javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this introductory programming class a good point to introduce some modern web development concepts (maybe with some Javascript snippets together with the C examples for comparison), or would this approach confuse them more than help them?&lt;/p&gt;&#xA;" OwnerUserId="116" LastEditorUserId="58" LastEditDate="2017-06-23T20:41:17.310" LastActivityDate="2019-09-29T00:28:12.630" Title="Should I teach modern web development in an introductory programming course? How?" Tags="|curriculum-design|web-development|undergraduate|javascript|c|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="94" PostTypeId="2" ParentId="19" CreationDate="2017-05-23T20:34:09.153" Score="4" Body="&lt;p&gt;I am currently designing an intro to programming course for middle school students using Processing. In particular, I am using these two resources to focus the curriculum:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1457187086&quot; rel=&quot;nofollow noreferrer&quot;&gt;Make's &lt;em&gt;Getting Started with Processing: A Hands-On Introduction to Making Interactive Graphics&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.raspberrypi.org/learning/introduction-to-processing/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Raspberry Pi Foundation's &quot;Introduction to Processing&quot; Resource&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make's resource moves all the way from simple, one-line programs like &lt;code&gt;ellipse(50, 50, 80, 80);&lt;/code&gt; to OOP, file IO, JSON, data visualization, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To supplement these resources, I am using videos from Daniel Shiffman's YouTube channel &lt;a href=&quot;https://www.youtube.com/user/shiffman/featured&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Coding Train&lt;/a&gt;. Of particular value are his short coding challenges where he completes a programming task in the allotted time while talking through the design process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that Processing's power comes from its scale combined with its ease of entry. I can confidently say that students will be writing &quot;real&quot; code on day zero and getting instant results on something other than the command line. Plus, there's the satisfaction of starting to learn programming with a text-based language instead of something like Scratch which can feel restricting and elementary to some students. And, as Daniel Shiffman's videos show, there's really no stopping how far you can go with it. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-23T20:34:09.153" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="95" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T20:39:36.850" Score="1" Body="&lt;p&gt;Some syntax (and symnantic) errors can produce apparently runnable programs that on casual testing even appear to be correct.  At a certain level, it may be useful to quiz students to see if they can produce syntax (one to maybe 3 or 4 LOC) that is correct by inspection in these areas.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-05-24T16:33:51.440" LastActivityDate="2017-05-24T16:33:51.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="96" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T20:46:28.303" Score="11" Body="&lt;p&gt;As a tool for differentiation, writing out code by hand is absolutely worthwhile. I taught this year in a classroom with whiteboard top desks, and students loved a) getting to writing on their desks (even being encouraged to) while b) learning syntax through multiple modalities. What might catch a student's eye or get instilled in her memory through handwriting is not the same as what she might see in her code in an IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a pragmatic level, the AP CS A Exam requires students to answer free response questions, so it is essential that they be prepared for this task. I would be doing them a disservice to not require some form of written examination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, the extent to which you grade this might be the determining factor in its success. As a formative assessment of syntax and of logical thinking, it works great, but again, unless its specific exam (or interview) preparation, it seems less effective or worthwhile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As noted above, students have to learn how to debug by reading and analyzing error messages. Nonetheless, I don't believe it's so much an either/or here. Use the handwritten assessments to inform instruction and re-teaching and to teach and reinforce concepts in a differentiated manner.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-05-23T20:53:12.800" LastActivityDate="2017-05-23T20:53:12.800" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="97" PostTypeId="2" ParentId="7" CreationDate="2017-05-23T20:57:18.417" Score="1" Body="&lt;p&gt;Perhaps students should be required to at least learn to read pseudo-code.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some algorithms or concept are unsuited for clear expression in some languages (e.g. the ones pre-requisite for the course).  Those concepts might be more simply explainable using a pseudo-code that does not require the clutter of a lot of syntactic sugar or other gymnastics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps they should be allowed pseudo-code for exam or quiz questions in those areas as well.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-05-23T20:57:18.417" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="99" PostTypeId="2" ParentId="89" CreationDate="2017-05-23T23:01:05.287" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a better way?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Consider using an authentic activity that both exercises and motivates the learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, often the author of code has difficulty finding and repairing errors in the code.  You can ask learners to help identify and fix errors in code, provided by you, that is &quot;close&quot; but not quite correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The presence of some errors may be readily disclosed by the compiler; but even those may have error messages that point to lines other than where the actual errors exist.  Students then need to fix the errors appropriately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other errors may pass syntactic checks but produce unintended behavior; such as this inadvertent &quot;empty statement&quot; body of a Java loop.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while(invitations.size() &amp;lt; numberOfAttendees);&#xA;{&#xA;    invitations.add(customInvite());&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This guided learning approach also helps improve the likelihood that all students gain experience with the specific concepts that you intend them to.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2017-05-23T23:01:05.287" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="100" PostTypeId="2" ParentId="93" CreationDate="2017-05-23T23:12:02.510" Score="8" Body="&lt;p&gt;If you want to teach students programming concepts along with web-development (HTML/CSS/JS) you should consider lacing programming examples or lessons with examples of HTML/CSS/JS or similar concepts in both. You could also have HTML/CSS/JS as an extra credit assignment or something the class can do if they're ahead of schedule. This will keep the class motivated to learn HTML/CSS/JS, which you probably shouldn't grade as it's an extra addition to the curriculum. This will teach the class the necessary topics along with them not being bored out of their mind, studying for programming AND web development.&lt;/p&gt;&#xA;" OwnerUserId="129" LastEditorUserId="58" LastEditDate="2017-06-22T15:12:16.690" LastActivityDate="2017-06-22T15:12:16.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="101" PostTypeId="2" ParentId="69" CreationDate="2017-05-23T23:29:34.030" Score="5" Body="&lt;p&gt;(1) We start out by using a repository for dissemination.  That is, students retrieve projects via the version control system.  This familiarizes them with basic tool interaction helps get the kinks out in a low-stakes way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) Then we introduce the use of version control for saving incremental stages of a project.  The motivation is straightforward once students realize they can &quot;back out&quot; changes they've made.  Students also seem to like seeing &quot;differences&quot; between versions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(3) Having established that foundation, students use the version control system to facilitate work on projects in groups.  We establish a few conventions to ease the transition, such as &quot;check in often&quot; and &quot;never break the build&quot;.  Groups are typically of size 3 in my single semester intro course.  (Students have already programmed in pairs prior to group work; but that was done in &quot;pair programming&quot; style using single systems.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have had good success using the &lt;a href=&quot;http://bluej.org&quot; rel=&quot;noreferrer&quot;&gt;BlueJ&lt;/a&gt; integrated learning/development environment which incorporates support for both Git and Subversion.&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2017-05-23T23:29:34.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="102" PostTypeId="5" CreationDate="2017-05-23T23:55:17.103" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-23T23:55:17.103" LastActivityDate="2017-05-23T23:55:17.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="103" PostTypeId="4" CreationDate="2017-05-23T23:55:17.103" Score="0" Body="Questions about teaching HTML/CSS/JS or any language used to serve any kind of content, be it an API, a website, or anything else." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-24T13:25:02.190" LastActivityDate="2017-05-24T13:25:02.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="104" PostTypeId="1" CreationDate="2017-05-24T00:06:19.733" Score="9" ViewCount="277" Body="&lt;p&gt;What works for building programs that are accessible to &quot;non-traditional&quot; CS students and which help to support the students so that they enjoy the class, start seeing themselves as &quot;CS types,&quot; and ultimately succeed in the program and go on in CS?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;References to concrete evidence and past attempts to do the same thing would be appreciated so this doesn't become all speculation and opinion.&lt;/p&gt;&#xA;" OwnerUserId="134" LastEditorUserId="27" LastEditDate="2019-04-10T19:54:40.260" LastActivityDate="2019-04-17T15:06:59.650" Title="Best Practices / Effective Strategies For Building Diversity In High School CS Programs" Tags="|social-context|equity|classroom-environment|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="105" PostTypeId="2" ParentId="17" CreationDate="2017-05-24T00:57:57.477" Score="8" Body="&lt;p&gt;I bought a set of nested Russian dolls (Matryoshka dolls).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Show the assembled set - how many dolls are there? We don't know, but maybe there is one inside - take a look&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Yes, now how many dolls? We don't know, but maybe there is one inside... &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Repeat until there is not a doll inside - this is the bottom of the stack. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now reassemble the stack, counting the dolls as you go.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="136" LastEditorUserId="2" LastEditDate="2017-05-25T05:06:19.803" LastActivityDate="2017-05-25T05:06:19.803" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="106" PostTypeId="1" CreationDate="2017-05-24T01:45:34.143" Score="11" ViewCount="1789" Body="&lt;p&gt;So, I am not interested in which language is &lt;em&gt;better&lt;/em&gt;, because that is a matter of opinion.  What I care about is whether making a switch from Scheme to Haskell will directly help me accomplish my goals.  What programming language concepts does each language bring to the fore?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I am seeking input from folks who have taught using these languages about the kinds of experiences they had.  How did the language features of Haskell or Scheme make your students' experience better (or worse)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For context, my kids come into their junior year knowing Java, C, and Python pretty well.  For their junior year, it was decided that there should be a course in theoretical computer science.  In order to have labs, I further decided that we should move away from imperative programming and expose the kids to a functional language.  So, while the class was not &lt;em&gt;about&lt;/em&gt; functional programming, the kids did quite a lot of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used Scheme (DrRacket, to be specific), but over the course of the year, I found that kids were sneaking &lt;code&gt;set&lt;/code&gt; functions into their labs, which ran (to my thinking) counter to the goals of the class.  I was also a little displeased with the rather unintuitive way that boolean functions and contracts interacted in the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have, as a result, been thinking about migrating over to Haskell.  If I did this, I know that I would need to redesign my labs (and I wonder if the Turing Machines I have them design would suddenly run very slowly!) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, other than not having a &lt;code&gt;set&lt;/code&gt; function, what other benefits might Haskell bring to my students?  I don't mind putting in the work to redesign the course if there is a sufficient benefit.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-24T21:10:37.733" LastActivityDate="2022-01-31T09:12:22.977" Title="Scheme vs Haskell for introducing functional programming" Tags="|functional-programming|language-choice|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="107" PostTypeId="2" ParentId="14" CreationDate="2017-05-24T01:52:32.413" Score="3" Body="&lt;p&gt;If you're routinely setting tasks that are vulnerable to this kind of plagiarism, I'd start by questioning the purpose and value of the tasks - can you alter them to be less closed, more open, without losing the value they were providing to you?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm setting something for homework or similar, it's always a creative task: e.g. &quot;Write a python program to draw the flag of a foreign country of your choice&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&quot;Foreign&quot; = prevents them from all doing the most obvious choice: your current country's flag. &quot;Your choice&quot; = empowers them, but also makes it harder for people to hide behind the claim of accidental coincidence if e.g. 4 students all do the flag of the home country of one of the students' parents. Also easy to evaluate verbally whether it's an accident or not ... etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming shouldn't be too focussed on filling in deterministic, solved problems that are easier to get by copy/pasting off the web. If you set a task that's easy to copy/paste, you should expect students to copy/paste it - and unless an exam board is taking the choice out of my hands, I'd be on the side of the students (assuming they checked it worked, integrated it, and understood it - all those are easy to assess after the fact, but that's a separate question, I think?)&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastActivityDate="2017-05-24T01:52:32.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="108" PostTypeId="1" CreationDate="2017-05-24T02:32:33.657" Score="5" ViewCount="88" Body="&lt;p&gt;I'm working on designing a project where the students will use HTML+CSS to replicate a specific layout which I will give them as a picture. The goal of the project is to allow each student to practice their HTML+CSS skills by implementing the design in a clean way that follows the best practices that I have taught.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would want to give each person a different task (or at least have more than one design so that each person could get a random design to implement). In order to ensure that the assignments I design are challenging, interesting, distinct, and of similar difficulty, what qualities should I try to emphasize? Keep in mind that these students should have a full knowledge of HTML+CSS, so anything can be included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both specific ideas for layouts and CSS/HTML skills to try to include are valuable. Some things that I have thought of have included multi-column layouts, a sticky nav, or notifications/lightboxes.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="150" LastEditDate="2018-01-07T08:54:17.073" LastActivityDate="2018-01-07T08:54:17.073" Title="What qualities should be considered when designing a front end project?" Tags="|web-development|problem-structure|project|front-end|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="109" PostTypeId="2" ParentId="104" CreationDate="2017-05-24T05:33:53.643" Score="10" Body="&lt;p&gt;Three concrete ideas come to mind based on my experience building a CS program essentially from scratch at the high school level:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Have at least one class that has no pre-requisite.&lt;/strong&gt; We have one intro to programming course that any student can register for, including freshmen. Students don't need any background, any strength in math, any previous AP/Honors/accelerated classes. Part of the battle -- maybe the hardest part -- is getting bodies into the seats, and then winning them over from there. Eliminating hurdles as much as possible is one logical step to take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Trust word of mouth.&lt;/strong&gt; I made it my goal to get in front of every possible applicant when promoting our first year of offering AP CS Principles (2016-17). A year ago, I visited math classes and spoke to probably ~700-800 students before course registration. As a result, I received nearly 150 applications. In previous years we could barely muster one full section of AP CS A. If &gt;20 students showed interest in CS, we were doing well. I believe firmly in the &lt;em&gt;Field of Dreams&lt;/em&gt; philosophy: &quot;If you build it, they will come.&quot; Even 5 minutes of enthusiasm was enough to spark a massive up-tick in interest. Last year, we had one small class of CS, this year we had three full classes, and we are expanding to four next year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't let traditional grading get in the way of learning.&lt;/strong&gt; I struggled a lot with this issue this year. I tell students bluntly that programming is hard. It can be frustrating and challenging. So, when it comes time to assessing programs, I let students revise, revise, revise. Essentially, I take a standards-based approach; I don't care so much &lt;em&gt;when&lt;/em&gt; they learn something but &lt;em&gt;that&lt;/em&gt; they learn it. A low grade at the beginning that is difficult to recover from can be more disheartening than anything else and can sap students of the motivation needed to persist through challenging programming work. At the start there has to be a reward for grit and the desire to improve.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-24T05:33:53.643" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="110" PostTypeId="2" ParentId="106" CreationDate="2017-05-24T05:38:51.560" Score="7" Body="&lt;p&gt;I suspect there'll be more universities switching from Scheme to Haskell for introductory functional programming (FP) courses, mainly for the 'real world' appeal of Haskell. I see 15 mentions of Scheme and 16 of Haskell in the recent SIGCSE &lt;a href=&quot;https://docs.google.com/spreadsheets/d/1TQsv1ykVOTSfkeLc21jsx1-f2LRnV94z3OLWcv6I2OM/edit#gid=1852095133&quot; rel=&quot;noreferrer&quot;&gt;programming language poll&lt;/a&gt; results, although Scheme (as Racket) still has the edge in introductory courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've a little FP in one of our A-level (secondary school leaving exam) CS courses in the UK, and Haskell seems the popular choice; indeed I'm not aware of any schools using Scheme for this. I know of one school that's been using Haskell with six year olds(!). In the US at school level, Scheme (as WeScheme) features in &lt;a href=&quot;http://www.bootstrapworld.org/&quot; rel=&quot;noreferrer&quot;&gt;Bootstrap World&lt;/a&gt;, but they're using &lt;a href=&quot;https://code.pyret.org/&quot; rel=&quot;noreferrer&quot;&gt;Pyret&lt;/a&gt; for some courses now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some good Haskell texts around, e.g. Hutton's Programming in Haskell, and Lipovaca's Learn You a Haskell for Great Good! (&lt;a href=&quot;http://learnyouahaskell.com/chapters&quot; rel=&quot;noreferrer&quot;&gt;free online version&lt;/a&gt;), but these are introductions to the language rather than introductions to functional programming - it still seems hard to beat &lt;a href=&quot;https://mitpress.mit.edu/sicp/&quot; rel=&quot;noreferrer&quot;&gt;SICP&lt;/a&gt;, which is Scheme based. What text are you using at present?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly, &lt;a href=&quot;https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.pdf&quot; rel=&quot;noreferrer&quot;&gt;this critique of SICP&lt;/a&gt; from 1987 identifies four issues with Scheme, all of which are addressed in Haskell:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pattern-matching.&lt;/li&gt;&#xA;&lt;li&gt;A syntax close to traditional mathematical notation.&lt;/li&gt;&#xA;&lt;li&gt;A static type discipline and user-defined types.&lt;/li&gt;&#xA;&lt;li&gt;Lazy evaluation. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-24T05:38:51.560" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="111" PostTypeId="2" ParentId="17" CreationDate="2017-05-24T06:00:17.223" Score="30" Body="&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Tower_of_Hanoi&quot; rel=&quot;noreferrer&quot;&gt;Tower of Hanoi&lt;/a&gt; was one of the first ways that I encountered recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/dEbk3.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/dEbk3.png&quot; alt=&quot;Tower of Hanoi, cc by-sa Bin im Garten&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Only one disk can be moved at a time.&lt;/li&gt;&#xA;&lt;li&gt;Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack i.e. a disk can only be moved if it is the uppermost disk on a stack.&lt;/li&gt;&#xA;&lt;li&gt;No disk may be placed on top of a smaller disk.&quot; (from Wikipedia)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;To solve the n disk tower problem:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Solve the n-1 disk tower problem &lt;/li&gt;&#xA;&lt;li&gt;Move the nth disk &lt;/li&gt;&#xA;&lt;li&gt;Solve the n-1 disk tower problem again.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Solving the 1 disk problem is trivial. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can imagine coding this as a nice on-screen or physical computing challenge.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-24T06:00:17.223" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="112" PostTypeId="1" AcceptedAnswerId="119" CreationDate="2017-05-24T06:01:01.980" Score="14" ViewCount="7665" Body="&lt;p&gt;I teach a short introductory unit in my course that uses Scratch to get students familiar with programming concepts before introducing the syntax of a text-based programming language. For context, we move from Scratch to C to Python. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is this: &lt;strong&gt;what can students be taught in Snap!, as another block-based programming environment, that they cannot be taught in Scratch?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read on their site that it Snap! combines Scratch with Scheme, but as the latter is not a language I've studied, I don't quite see the motivation for this combination. &lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-05-25T20:12:46.253" LastActivityDate="2021-12-30T22:21:10.850" Title="What can Snap! do that Scratch cannot?" Tags="|language-choice|scratch|snap|block-based-programming|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="113" PostTypeId="1" AcceptedAnswerId="128" CreationDate="2017-05-24T06:31:43.727" Score="11" ViewCount="672" Body="&lt;p&gt;I am trying to think of a lesson plan about html, and I am looking for a good way to explain the concept of the structure of an &lt;code&gt;html&lt;/code&gt; file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering whether the subject would be better understood if I firstly described &lt;code&gt;xml&lt;/code&gt; in general. What I had in mind is teaching a basic &lt;code&gt;xml&lt;/code&gt; block:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;rootElement&amp;gt;&#xA;    &amp;lt;element withAttribute=&quot;that we can set&quot; scndAttr=&quot;there can be more than 1 attribute&quot;&amp;gt;&#xA;        &amp;lt;subElement otherAttr=&quot;these can also have attributes&quot; /&amp;gt;&#xA;    &amp;lt;/element&amp;gt;&#xA;&amp;lt;/rootElement&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then use this basic block to get into the subject, after which we veer off to &lt;code&gt;html&lt;/code&gt; specific &lt;code&gt;xml&lt;/code&gt;s. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are at a beginner's level, and HTML is the first technology with a structure like this that they will encounter, So this lesson is meant to introduce them to HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, is knowing the concept and basics of &lt;code&gt;xml&lt;/code&gt; structure important and necessary for understanding &lt;code&gt;html&lt;/code&gt;?&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T09:12:58.637" LastActivityDate="2018-10-11T19:33:27.793" Title="Explaining basic html structure" Tags="|lesson-ideas|introductory-lesson|html|xml|" AnswerCount="8" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="114" PostTypeId="1" CreationDate="2017-05-24T06:33:40.037" Score="6" ViewCount="129" Body="&lt;p&gt;Currently, relatively few participate in the national olympiad in informatics (high school) of my country. This is partially because the first round takes a bit of time (up to 40 hours if one wants to reach a perfect score, but 10 hours should be sufficient for a passing score). I'd like to encourage participation in the national olympiad in informatics, because I think that several students are good enough to do well in the olympiad and I think they would like it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I encourage participation?&lt;/p&gt;&#xA;" OwnerUserId="111" LastEditorDisplayName="user193" LastEditDate="2019-01-31T16:48:32.443" LastActivityDate="2019-01-31T16:48:32.443" Title="How to encourage participation in the national olympiad in informatics?" Tags="|secondary-education|extracurricular-club|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="115" PostTypeId="2" ParentId="114" CreationDate="2017-05-24T06:37:43.027" Score="4" Body="&lt;p&gt;Personally, assembling a team (or club etc.) of those students and teach them the relevant material would encourage most (if not all) of them to participate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, finding a guide\mentor who can teach them would give the sense of, for lack of a better word, prestige. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, where I live, there's a national competition and it's very popular, due to the use of the aforementioned method.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-05-24T06:37:43.027" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="116" PostTypeId="2" ParentId="79" CreationDate="2017-05-24T06:47:30.223" Score="4" Body="&lt;p&gt;As mentioned in other answer making education like a game is good idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use SQL Injection as one of the examples, other like password to be word from the web page itself, other can be default username/passwords like root/root, admin/admin and so on. During the class you mention this keyword (SQL for example) and give them as home work URL to dig.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further you can create teams which can try to work together on specific challenge. Also those teams can create some site, program, etc and give to other team as challenge to hack.&lt;/p&gt;&#xA;" OwnerUserId="80" LastActivityDate="2017-05-24T06:47:30.223" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="117" PostTypeId="2" ParentId="113" CreationDate="2017-05-24T07:03:16.130" Score="7" Body="&lt;p&gt;I would avoid starting with something this abstract if the aren't used to it. Doing so might, in my experience, turn away students, especially since the beginning is usually the easiest. If the beginning is hard, they might not understand it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start by explaining the basics like &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, and also images, links, etc. Basically what you need to make a functioning, but not very special site. Then, if you have enough examples of structures like you describe in the question and the students already know these examples, you can show them the general, abstract form. Doing so avoids that they have to learn the examples and the abstract form at the same time.&lt;/p&gt;&#xA;" OwnerUserId="111" LastActivityDate="2017-05-24T07:03:16.130" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="118" PostTypeId="2" ParentId="106" CreationDate="2017-05-24T07:29:31.637" Score="3" Body="&lt;p&gt;Although Scheme does have a &lt;code&gt;set&lt;/code&gt; function, you don't need to allow students to use it. Obviously, &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;print&lt;/code&gt;, &lt;code&gt;begin&lt;/code&gt; and loops are all potentially very useful for debugging, but it's OK to tell them that they are not allowed to &lt;code&gt;set&lt;/code&gt; other than when debugging. Thus, you don't need to change your language if all you want is to stop students from abusing &lt;code&gt;set&lt;/code&gt;, especially if you're doing great with Scheme!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, there are a few problems if you choose Haskell over Scheme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I/O. Either you have to present it as a &quot;black box&quot; without explaining how it works, or you have to explain monads to them, which could be confusing for FP beginners.&lt;/li&gt;&#xA;&lt;li&gt;Stateful programming. Although FP aims to be stateless, oftentimes states are useful in creating real-world programs. Again, to do this in Haskell, you can't get around monads. If students overuse &lt;code&gt;set&lt;/code&gt; and &lt;code&gt;begin&lt;/code&gt;, tell the students they may not use them at all!&lt;/li&gt;&#xA;&lt;li&gt;Cleaner type system. No type classes and the like.&lt;/li&gt;&#xA;&lt;li&gt;Again, SICP and the Little Schemer are really nice; HTDP is also great.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Meanwhile, have you considered the ML family? SML and OCaml could be interesting choices too. ML has mutable references, but no mutable variables; but you don't need to tell them about &lt;code&gt;ref&lt;/code&gt;s!&lt;/p&gt;&#xA;" OwnerUserId="130" LastEditorUserId="130" LastEditDate="2017-05-25T01:08:45.297" LastActivityDate="2017-05-25T01:08:45.297" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="119" PostTypeId="2" ParentId="112" CreationDate="2017-05-24T07:33:23.833" Score="15" Body="&lt;p&gt;The analogy is far from perfect, but Snap! is to Scratch as Mycroft is to Sherlock.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, the big advantage for Snap! is its provision of custom functions rather than just the custom blocks that Scratch 2 offers - Snap! functions return values that can be passed to other functions and so on, making it much easier to implement mathematical ideas and to build up programs by defining rules and relationships rather than sequences of steps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Snap! functions are 'first class citizens', thus functions can be passed to other functions as parameters, or be stored in lists, or (pretty much) whatever, and so Snap! can be used as an introduction to functional programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, Snap! makes it easier to address much more theoretical CS than is convenient in Scratch, without introducing the need for text based programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand... Snap! doesn't have the same rich range of support materials or vibrant support and sharing community that has made Scratch such a success.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-24T07:33:23.833" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="120" PostTypeId="1" AcceptedAnswerId="293" CreationDate="2017-05-24T10:03:52.703" Score="5" ViewCount="184" Body="&lt;p&gt;When teaching database basics to non IT beginners, what is the minimum requirement in theory and technical terms?&lt;br&gt;&#xA;&lt;strong&gt;So what is absolutely necessary to talk about DBs? What helps students grasp the basic idea of relational databases?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Especially with normal forms. NF1-2-3? Boyce-Codd? Or even NF4-5-6 makes sense?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my trainings we don't have a lot of time, we focus on the practice, but since this is a new concept to my students, they will need to understand a few fundamental things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Context:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm holding company trainings. As tasks get more and more complex at corporations, and the general IT literacy is (somewhat, slowly) raising, more and more people are looking for ways to swap out their huge and cumbersome &quot;Excel can do it all&quot; solutions. This either means they start learning VBA programming or they turn towards databases, namely MS Access. The trainings I do are 2-3 day intensive courses with very strong practical focus.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="919" LastEditDate="2017-07-01T20:59:41.263" LastActivityDate="2017-11-08T10:57:26.220" Title="Database theory (normalization) for beginners (adult education, MS Access)" Tags="|cs-theory|databases|industry-training|" AnswerCount="1" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="121" PostTypeId="1" AcceptedAnswerId="125" CreationDate="2017-05-24T10:09:05.030" Score="1" ViewCount="129" Body="&lt;p&gt;I have been an expert &amp;amp; mentor in HTML, CSS, JavaScript. When it comes to teaching new students on how to program using JavaScript, it is straight forward. Students can learn that if you do certain actions, you will be able to get the things right. But often I struggle with teaching CSS or design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are extremely good with HTML structuring and JavaScripts, but when comes to CSS laying out and the &quot;creative&quot; and &quot;design&quot; part, I am not sure how to train them like how I am experienced. Has anyone been through this and is there a way to really &quot;teach&quot; &lt;em&gt;design sense&lt;/em&gt; and &lt;em&gt;creativity&lt;/em&gt; in &lt;em&gt;CSS&lt;/em&gt;?&lt;/p&gt;&#xA;" OwnerUserId="164" LastEditorUserId="104" LastEditDate="2017-06-07T11:27:35.683" LastActivityDate="2017-06-07T11:27:35.683" Title="How to &quot;teach&quot; CSS for students?" Tags="|html|css|javascript|" AnswerCount="2" CommentCount="5" ClosedDate="2017-05-29T12:31:13.150" ContentLicense="CC BY-SA 3.0" />
  <row Id="122" PostTypeId="2" ParentId="44" CreationDate="2017-05-24T10:19:36.757" Score="1" Body="&lt;p&gt;The IT knowledge highly varies, even among small kids. I'd say give them something simple like Notepad++ or EditPlus or Atom for reasons mentioned in &lt;a href=&quot;/a/48/&quot;&gt;@thesecretmaster's answer&lt;/a&gt;, but those 2-3 geeks who are already experimenting with programming should be allowed to use a more complex, professional IDE. You just need to install and agree with the class before getting started on who uses what.&lt;/p&gt;&#xA;&lt;p&gt;Also, consider allowing them (later, after learning the basics!) to use &lt;strong&gt;WYSIWYG&lt;/strong&gt; editors. I'm surprised nobody mentioned that here. Most of those kids will not end up as programmers, they will never in their life will write HTML code ever again. But they still might need to be able to edit a WordPress page or manage their company blog later in their life.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="1035" LastEditDate="2020-08-22T13:36:06.800" LastActivityDate="2020-08-22T13:36:06.800" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="123" PostTypeId="2" ParentId="121" CreationDate="2017-05-24T10:28:39.263" Score="3" Body="&lt;p&gt;I'll let another answerer address the creativity part, but for the design part of your question I can share some insight. I find it useful to ask them to emulate some site that they commonly use, and them make it better in some way. This allows them to practice design by working on and improving already well designed websites. The only qualifier is that you have to approve the websites first, some people will choose badly designed websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another useful idea is to simply explain the basics of UX. In many cases, thats almost as important as regular design, and is certainly influential in how the website is laid out. I'd also talk about how vital testing is, and it could be interesting to have an activity where the students test eachothers websites for usability and give feedback.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-05-24T10:28:39.263" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="124" PostTypeId="2" ParentId="112" CreationDate="2017-05-24T10:34:40.437" Score="6" Body="&lt;p&gt;The biggest features Snap! has that Scratch doesn't are first-class EVERYTHING and functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scratch only lets you create custom command blocks, not reporter or Boolean blocks. This makes Snap! much more suitable for writing algorithms that rely on return values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Snap!, everything is first class. You can pass around scalar values, lists, blocks (and groups of blocks), and even sprites. Try creating a matrix out of Scratch's lists - not easy, but trivial in Snap!.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, Snap! is much better for teaching higher-level programming than Scratch is.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2017-05-24T10:34:40.437" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="125" PostTypeId="2" ParentId="121" CreationDate="2017-05-24T10:34:43.657" Score="5" Body="&lt;p&gt;If you are struggling with &quot;design&quot; and &quot;beautiful&quot; and artistic mumbojumbo, you can still teach CSS while avoiding trying to turn them into pro designers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest example task I can think of is having your students create a simple website with a basic style and another style for the visually impaired (and a button to change between the two styles).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is done, you can have a contest/assignment: you create a simple website (2-3 pages, few images, a menu), and they all have to create 2-3 designs for it in CSS. Then the class can vote for their favourite. Another upside is that finally it won't be the geeks but the artists in the class that shine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for teaching design and creativity, why not ask the help of the art teacher? Maybe you can put together a curriculum for a few classes together? You are a programmer, not a designer, and it is OK to admit it.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-05-24T10:34:43.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="126" PostTypeId="2" ParentId="17" CreationDate="2017-05-24T11:34:02.930" Score="16" Body="&lt;p&gt;The image that I kept in my head when I was learning recursion was from Dr. Seuss: &#xA;&lt;a href=&quot;https://i.stack.imgur.com/NFZVv.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NFZVv.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-05-24T11:34:02.930" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="127" PostTypeId="2" ParentId="108" CreationDate="2017-05-24T11:52:35.700" Score="8" Body="&lt;p&gt;As a student I would find this assignment uninteresting and a waste of my skills. I would feel the professor is just trying to be lazy and not having to properly grade assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they really should know HTML and CSS by now, don't treat them like babies. Just ask them to build a complex responsive page that works as their resume and/or portfolio. They will be glad to make something beautiful and actually interested in your assignment. You can of course set minimum requirements like having transitions and animations, media queries, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My point is: don't create an assignment to try to make your students fail a few points off your check list, but create one that will make all your students interested and proud of their creation.&lt;/p&gt;&#xA;" OwnerUserId="28" LastActivityDate="2017-05-24T11:52:35.700" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="128" PostTypeId="2" ParentId="113" CreationDate="2017-05-24T12:30:51.973" Score="9" Body="&lt;p&gt;How did you begin to teach Java to your students? I bet you didn't start by showing them the &lt;a href=&quot;https://users-cs.au.dk/amoeller/dRegAut/JavaBNF.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Backus-Naur form&lt;/a&gt; that the Java parser follows. Instead, you probably introduced a simple &lt;em&gt;&quot;Hello, world&quot;&lt;/em&gt; program, and slowly built on that with assignments and projects for the students to work on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure you can see the parallel here—teaching XML as a prerequisite for HTML is &lt;strong&gt;not&lt;/strong&gt;, in my opinion, a productive or helpful exercise. XML is a rather boring language; it doesn't &lt;em&gt;do&lt;/em&gt; anything, so you don't get that instant feedback when you write some code, unlike in HTML, where you can see the webpage unfold as you add elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML is also simple enough that you can generally pick it up as you go along; explaining that you start an element with &lt;code&gt;&amp;lt;tag&amp;gt;&lt;/code&gt; and end with &lt;code&gt;&amp;lt;/tag&amp;gt;&lt;/code&gt; should be simple enough, and any mistakes in the markup will be visible when you load the page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a general rule, if you want to teach [insert language here], &lt;strong&gt;you probably don't need to teach a different language first&lt;/strong&gt;; teaching XML to make HTML easier probably won't give you the benefits you're expecting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm rather partial to the typical &lt;em&gt;&quot;Hello, world&quot;&lt;/em&gt; for HTML. Almost certainly, your students will spot that the title is &lt;em&gt;&quot;My First Webpage&quot;&lt;/em&gt;, and I imagine that they'll be able to guess &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; with some guidance.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&#xA;    &amp;lt;head&amp;gt;&#xA;        &amp;lt;title&amp;gt;My First Webpage&amp;lt;/title&amp;gt;&#xA;    &amp;lt;/head&amp;gt;&#xA;    &amp;lt;body&amp;gt;&#xA;        &amp;lt;h1&amp;gt;Hello, world!&amp;lt;/h1&amp;gt;&#xA;    &amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The general structure should be obvious, and you can reinforce it with some tasks, such as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Add a paragraph (&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;) after the heading.&lt;/li&gt;&#xA;  &lt;li&gt;Add this image: [insert image link here] using &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would expect that &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; would need some explanation, because it will be the first element with attributes, and it's self-closing, which is different to all the others.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="3700" LastEditDate="2018-10-11T19:33:27.793" LastActivityDate="2018-10-11T19:33:27.793" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="129" PostTypeId="1" CreationDate="2017-05-24T12:45:17.417" Score="11" ViewCount="891" Body="&lt;p&gt;It’s no secret that despite the phenomenal rise in computing over the last 50 years, women are still not engaging with computer science at the same rate as men.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Girls are less likely to enroll in introductory computer science courses in school and the number of females studying computer science is near an all-time low. Therefore, the vast majority of computer science jobs will be pursued and filled by men.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to Google's &lt;a href=&quot;http://services.google.com/fh/files/misc/diversity-gaps-in-computer-science-report.pdf&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Diversity Gaps in Computer Science&lt;/em&gt; report of 2016:&lt;/a&gt;,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Twice as many male students (34%) as female students (16%) &#xA;  saying they are “very interested” in learning CS in the future, &#xA;  and nearly twice as many female students (24%) as male &#xA;  students (13%) saying they are “not at all interested.”&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/9SZAs.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/9SZAs.png&quot; alt=&quot;Diversity Gaps: How interested are you in learning computer science in the future?&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Since I am very passionate about helping girls and women take an interest in computer science I would like to know the main ideas and theories about what keeps them back from learning it to eventually come up with a solution.&lt;/p&gt;&#xA;" OwnerUserId="170" LastEditorUserId="2" LastEditDate="2017-05-31T08:40:37.883" LastActivityDate="2018-05-30T10:02:01.457" Title="How to get girls more interested in computer science?" Tags="|diversity-gap|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="130" PostTypeId="1" AcceptedAnswerId="132" CreationDate="2017-05-24T12:58:03.360" Score="32" ViewCount="6344" Body="&lt;p&gt;I'm trying to teach why indentation is important, but the student doesn't indent. I asked why he doesn't indent, then he answered &quot;That's because it’s a hassle.&quot;&#xA;It's OK to say &quot;you should indent&quot;, but I want him to understand why indentation is important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you teach why indentation is important?&lt;/p&gt;&#xA;" OwnerUserId="172" LastEditorUserId="27" LastEditDate="2021-01-26T22:40:33.630" LastActivityDate="2021-01-26T22:40:33.630" Title="How to teach the importance of indentation" Tags="|coding-style|" AnswerCount="13" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="131" PostTypeId="2" ParentId="130" CreationDate="2017-05-24T13:13:41.257" Score="9" Body="&lt;p&gt;Indentation is important so that you can see what code will be run based on the existing conditions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for a simple example, consider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (x=0; x&amp;lt;100; x++) {&#xA;    if (item % 2 == 0) {&#xA;         print x;&#xA;         print &quot; is even&quot;;&#xA;    } else {&#xA;         print x;&#xA;         print &quot; is odd&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Looking at this code, without reading it I can see from the indentation alone, that all of the lines will be run during the &lt;code&gt;for&lt;/code&gt; loop.  Without the indentation, I would have to search for matching &lt;code&gt;}&lt;/code&gt;s.  That would be quite slow.  It also shows me that there is an &lt;code&gt;if&lt;/code&gt; condition, and again, it shows me what lines will be run. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without the indentation, the code is very hard to parse.  The longer the routine, the more difficult it will be.  Indentation is the key to manageability and maintainability.  Without indentation, it quickly becomes very hard to fix problems and add new features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is unindented code.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (x=0; x&amp;lt;100; x++) {&#xA;if (item % 2 == 0) {&#xA;print x;&#xA;print &quot; is even&quot;;&#xA;} else {&#xA;print x;&#xA;print &quot; is odd&quot;;&#xA;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To me, it is very clear that I can not tell what is happening in that code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would teach it by examples like this.  You could also take unindented code on a slide and ask them to make a change to the code.  Then ask the same on another slide that has better indentation. They will quickly see the issue on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As pointed out in a comment, do the same activity with a bug in the code.  Asking them to find the bug.  A great example to use for this is a missing or mismatched bracket.&lt;/p&gt;&#xA;" OwnerUserId="174" LastEditorUserId="1293" LastEditDate="2018-03-28T20:47:26.777" LastActivityDate="2018-03-28T20:47:26.777" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="132" PostTypeId="2" ParentId="130" CreationDate="2017-05-24T13:26:18.750" Score="41" Body="&lt;p&gt;It has taken me a long time to get to a point where my students regularly indent properly.  I basically use a 4-part strategy.  &lt;em&gt;(My work here in the context of AP Computer Science, so my examples are all in Java)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, &lt;em&gt;right from the beginning&lt;/em&gt;, and repeatedly, I talk about the two audiences for code: the computer &lt;strong&gt;and people&lt;/strong&gt;.  These two audiences have completely different needs.  I come back to this theme with every new structure that I talk about, discussing coding style and norms with if statements, variable declarations (naming conventions), for loops (hey, why do we avoid break statements?), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I grade most of their labs right in front of them, code-interview style.  The first assignments are always quite simple, so I focus in on indentation, variable names, &lt;em&gt;vertical space&lt;sup&gt;1&lt;/sup&gt;&lt;/em&gt;, and the four Cs: clarity, clarity, clarity, and clarity.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I talk through the clarity of their code in depth and inflict outrageous penalties for unclear code, but allow them to go back and refactor for a better grade with no penalty.  Rinse, lather, and repeat (as needed).  The first lab is always painfully time-intensive to go through, but by lab 3 or 4, much of the code (and the grading!) is fast, smooth, and clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, I provide a few monstrous code examples throughout the year like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int n = 17;&#xA;if (n &amp;lt; 5)&#xA;if (n &amp;gt; 10) System.out.print(&quot;A&quot;);&#xA;else System.out.print(&quot;B&quot;);&#xA;if (n &amp;gt; 17)&#xA;if (n == 17) System.out.println(&quot;C&quot;);&#xA;else System.out.println(&quot;D&quot;);&#xA;else System.out.println(&quot;E&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It doesn't take a rocket scientist to figure out that poor indentation is the one and only reason that this code is so difficult to read and understand.  In case they miss it, I also reinforce this point verbally every time I give examples like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth, the group work that I give requires them to have to provide code to each other, and make sense of what their peers have done.  Over time, they start enforcing norms on each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;strong&gt;Vertical space&lt;/strong&gt;, you ask?  Two reasons: first, because vertical space is used to separate ideas, like paragraphs, and second, because the very &lt;em&gt;mention&lt;/em&gt; of this problem in their code shocks students immediately into thinking about how &lt;em&gt;everything&lt;/em&gt; that they write helps to serve clarity.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-03-28T19:42:13.500" LastActivityDate="2018-03-28T19:42:13.500" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="133" PostTypeId="2" ParentId="130" CreationDate="2017-05-24T13:51:55.883" Score="5" Body="&lt;p&gt;The purpose of indentation (to express the intended control flow) and the value are subtly different things. For a 5 line script, there is really not much value in indentation or comments - the code is a throw-away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real value in cleanly presented code (of which indentation is only a part) comes when a person is reading the code some time after it was written. Maybe it's something you've posted on SO as part of a question, maybe you're asking for help in improving the code from someone else (or explaining how good your code is). Maybe even worse your code is broken and you need to fix it in a hurry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well-presented code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Shows you care about the code and put some effort in to writing it&lt;/li&gt;&#xA;&lt;li&gt;Makes your design intent more clearly visible&lt;/li&gt;&#xA;&lt;li&gt;Helps typographical mistakes stand out&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It may be a hassle (is this an argument for better editors), but the time spent in keeping the code tidy usually pays off by both avoiding and finding bugs faster. Its a different (but related) question to 'would you prefer your code to be really fancy and efficient, or to work properly'? I think this latter problem is maybe easier to explain because it's more tangible.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-24T13:51:55.883" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="134" PostTypeId="1" CreationDate="2017-05-24T14:14:04.353" Score="-1" ViewCount="3152" Body="&lt;p&gt;Many computer science problems can be solved by more than one algorithm. Usually those algorithms have different problem-solving approaches and therefore different strengths and weaknesses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My impression is that some developers focus on choosing the most efficient algorithm when they are for example participating in programming competitions to increase their chances of winning, but this does not always translate to real world applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bad choices (e.g. always using bubble sort for a sorting operation instead of something more efficient) will eventually slow down the application.  But most of the time, what with computers being so fast, better choices don't seem to make a discernible difference.  How can we help teach developers that these choices ultimately do matter, and that they should aim for more efficient algorithms?&lt;/p&gt;&#xA;" OwnerUserId="162" LastEditorUserId="27" LastEditDate="2017-12-14T23:43:14.190" LastActivityDate="2017-12-14T23:43:42.933" Title="How to explain to people the importance of algorithms in computer programming?" Tags="|algorithms|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="135" PostTypeId="2" ParentId="134" CreationDate="2017-05-24T14:17:50.900" Score="0" Body="&lt;p&gt;The importance of algorithms is that it is a form of automation. For example, calculating the Fibonacci Sequence would take a long to time to find n number, but if you create a program that finds that n number, you save a lot of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algorithms, used properly and with caution, can change your program from a 0 to a 100.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can think of an algorithm as a recipe that describes the exact steps needed for the computer to solve a problem or reach a goal. Your recipe would the procedure and the input would be inputs by the user. It's like a flowchart:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/nZeU0.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nZeU0.png&quot; alt=&quot;Flow chart&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="46" LastEditDate="2017-05-24T14:38:34.717" LastActivityDate="2017-05-24T14:38:34.717" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="136" PostTypeId="2" ParentId="129" CreationDate="2017-05-24T14:34:50.987" Score="12" Body="&lt;p&gt;&lt;sup&gt;If you're just looking for the key points on how you can begin to solve the problem, you need only read the second section, but the first section provides valuable context on what the actual problem &lt;strong&gt;is&lt;/strong&gt; and the root causes.&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Why are so few girls interested in Computer Science?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;There is an issue, not limited to CS, but throughout STEM fields (&lt;a href=&quot;https://i.guim.co.uk/img/static/sys-images/Guardian/Pix/pictures/2014/8/14/1408015785255/89e36a28-9fe7-4f9d-b9de-3d689398b257-437x480.png?w=620&amp;amp;q=55&amp;amp;auto=format&amp;amp;usm=12&amp;amp;fit=max&amp;amp;s=15c96e33ccf227319cf1308d6b714174&quot; rel=&quot;noreferrer&quot;&gt;particularly Physics, Mathematics and Computer Science&lt;/a&gt;, according to recent examination statistics) with gender balance, where women are &lt;strong&gt;extremely&lt;/strong&gt; underrepresented. In 2014, only about 10% of entrants for the Computing A-Level were female. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://link.springer.com/article/10.1007/BF00289956&quot; rel=&quot;noreferrer&quot;&gt;Miura (1987)&lt;/a&gt; suggests that women's &lt;a href=&quot;https://en.wikipedia.org/wiki/Self-efficacy&quot; rel=&quot;noreferrer&quot;&gt;self-efficacy&lt;/a&gt; regarding computing is lower, which leads to lower interest in the field and lower uptake at undergraduate level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.cs.cmu.edu/afs/cs/project/gendergap/www/papers/sigcse97/sigcse97.html&quot; rel=&quot;noreferrer&quot;&gt;Fisher, Margolis &amp;amp; Miller (1997)&lt;/a&gt; also propose that women have less previous experience than men in the field—many have already started to self-teach or practice at home, whereas this is less true for women in the study. They also state that, from their interviews, women seemed to appreciate computing &lt;em&gt;more&lt;/em&gt; as they went through their studies, whereas many of the men in the study showed a keen interest as soon as they were introduced to computing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://monoskop.org/images/5/53/Margolis_Jane_Fisher_Allan_Unlocking_the_Clubhouse_Women_in_Computing.pdf&quot; rel=&quot;noreferrer&quot;&gt;Fisher &amp;amp; Margolis (2002)&lt;/a&gt; discuss the &quot;Geek Mythology&quot;—the stereotypical male computer scientist—and its effect on women:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;While the stereotype of the computer science student as someone who is&#xA;  myopically focused on computing is rejected by many male and female students,&#xA;  women report more distress and are more affected by the perceived&#xA;  difference between themselves and their peers. One-third of the male students&#xA;  we’ve interviewed say they differ from the stereotype, that they have&#xA;  a broader range of interests than just computing. But twice as many women&#xA;  (more than two-thirds of those we interviewed) feel different from the&#xA;  stereotype. And 20 percent of the women we interviewed question whether&#xA;  they belong in computer science because they feel they do not share the&#xA;  same intensity in focus and interest that they see in their male peers.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h3&gt;How can this be changed?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://wcer.wisc.edu/docs/working-papers/Working_Paper_No_2016_02.pdf&quot; rel=&quot;noreferrer&quot;&gt;Benbow &amp;amp; Vivyan&lt;/a&gt; point to a pedagogical solution which may benefit:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Pedagogical interactions are an important factor in determining&#xA;  whether students feel included or excluded in a particular educational field, and our findings in&#xA;  this regard confirm results from previous studies. Most significantly, students across our sample&#xA;  reported that working with real-world problems, as well as active instructor encouragement in light of student&#xA;  questions and peer collaboration, made them&#xA;  feel more comfortable and more confident as computer science majors—often despite&#xA;  brogammer-oriented field norms. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are many groups aiming to change the culture around computing, such as &lt;a href=&quot;https://djangogirls.org/&quot; rel=&quot;noreferrer&quot;&gt;Django Girls&lt;/a&gt;, an organisiation running free, one-day courses for girls and women interested in web development with HTML, CSS and Python. Events like this would seem to satisfy the goals of a supporting group of instructors, and a real-world problem to solve, which favours participation from women.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teacher, even changing the classroom environment may help to favour women and girls. &lt;a href=&quot;http://tll.mit.edu/sites/default/files/library/Cheryan_2009.pdf&quot; rel=&quot;noreferrer&quot;&gt;Cheryan, Davies, Plaut &amp;amp; Steele (2009)&lt;/a&gt; state:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;People can make decisions to join a group based solely on exposure to that group’s physical environment.&#xA;  Four studies demonstrate that the gender difference in interest in computer science is influenced by&#xA;  exposure to environments associated with computer scientists. In Study 1, simply changing the objects&#xA;  in a computer science classroom from those considered stereotypical of computer science (e.g., Star Trek&#xA;  poster, video games) to objects not considered stereotypical of computer science (e.g., nature poster,&#xA;  phone books) was sufficient to boost female undergraduates’ interest in computer science to the level of&#xA;  their male peers. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The solution to this problem might not be &lt;strong&gt;one big change&lt;/strong&gt;; rather, lots of little changes might improve participation from girls and women in CS classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trying to create real-world scenarios, in a balanced classroom environment may bring some more success, but it's often hard to know if the solutions you try actually have any effect. Ensuring the culture of the class doesn't become too male-oriented might also help to avoid bias against women in the demographics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be very interested to hear anyone's experiences with applying methods like this, and whether they did seem to make a perceptible difference.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-05-25T16:04:49.763" LastActivityDate="2017-05-25T16:04:49.763" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="137" PostTypeId="1" AcceptedAnswerId="138" CreationDate="2017-05-24T14:35:51.370" Score="13" ViewCount="6540" Body="&lt;p&gt;I was teaching the Octal number system and a student raised the question &quot;Why should we use the octal number system, if we have binary and hexadecimal?&quot; I was very confused, trying to explain the importance of this topic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For context, I am teaching a course about the relationship between hardware and software.&lt;/p&gt;&#xA;" OwnerUserId="46" LastEditorUserId="204" LastEditDate="2017-05-25T22:06:03.033" LastActivityDate="2019-02-10T08:13:17.587" Title="The use of the Octal system" Tags="|number-system|" AnswerCount="8" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="138" PostTypeId="2" ParentId="137" CreationDate="2017-05-24T15:35:23.480" Score="11" Body="&lt;p&gt;The value might not be in knowing octal itself (although as noted in the comments, there is inherent relevance to it). Rather, it might be what learning different bases teaches about abstraction and the representations of numbers in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think of this Essential Knowledge statement from the AP CS Principles curriculum:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;EK 2.1.1G&lt;/strong&gt; Numbers can be converted from any base to any other base.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The transition from decimal to binary is one step, and the move to hexadecimal can be an even bigger jump. To then have students see that there can be base-8 or base-32 or base-60 or base-37 is at times mind-blowing. The design of a particular base system, while not entirely arbitrary, is a design choice that comes with advantages and trade-offs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, this process of conversion to and from different base systems strengthens students understanding of the underlying algorithmic process. The example I share with students is that 100 in any base system is equal to the value of that base squared. (Indeed it verges upon tautology.) Part of that is breaking down the idea of the 1s place being followed by the 10s followed by the 100s, etc. and replacing it with 10^0 followed by 10^1, etc. Replacing 10 with 2, 8, 16, or any other integer becomes trivial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having students see that 100 is not so much &quot;one hundred&quot; but a combination of base numbers and exponents and &lt;em&gt;why that is&lt;/em&gt; is powerful.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-05-24T17:41:36.213" LastActivityDate="2017-05-24T17:41:36.213" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="139" PostTypeId="2" ParentId="134" CreationDate="2017-05-24T15:47:29.833" Score="0" Body="&lt;p&gt;A good way to talk about algorithms is as a series of simple steps that can be repeated. It's similar to the role of a function or routine. Here, everyday examples can be helpful, for example something like autocorrect. Autocorrect is a series of steps repeated over and over.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Select the last word typed&lt;/li&gt;&#xA;&lt;li&gt;Check how similar it is to the other words that the computer knows&lt;/li&gt;&#xA;&lt;li&gt;Check how often the user has used each of these words&lt;/li&gt;&#xA;&lt;li&gt;Suggest the most similar and most used word&lt;/li&gt;&#xA;&lt;li&gt;If the user types a space, make the correction&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It will repeat these steps every time a character is typed. When writing code, it's clearly easier to write:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function check_last_word(text) {&#xA;  word = text.last_word&#xA;  similar_words = get_similar_words(dictionary, word)&#xA;  corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;  text = text - text.last_word + corrected_word&#xA;}&#xA;&#xA;when text_is_changed? {&#xA;  check_last_word(text)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As compared to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;word = text.last_word&#xA;similar_words = get_similar_words(dictionary, word)&#xA;corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;text = text - text.last_word + corrected_word&#xA;sleep until text_is_changed?&#xA;word = text.last_word&#xA;similar_words = get_similar_words(dictionary, word)&#xA;corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;text = text - text.last_word + corrected_word&#xA;sleep until text_is_changed?&#xA;word = text.last_word&#xA;similar_words = get_similar_words(dictionary, word)&#xA;corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;text = text - text.last_word + corrected_word&#xA;sleep until text_is_changed?&#xA;word = text.last_word&#xA;similar_words = get_similar_words(dictionary, word)&#xA;corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;text = text - text.last_word + corrected_word&#xA;sleep until text_is_changed?&#xA;word = text.last_word&#xA;similar_words = get_similar_words(dictionary, word)&#xA;corrected_word = get_most_used_word(word_usage_data, similar_words)&#xA;text = text - text.last_word + corrected_word&#xA;sleep until text_is_changed?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so on. This is not actually an example of an algorithm, but it acts as a good example to show why having a series of repeatable steps is better than simply going through each step each time.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-05-24T15:47:29.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="140" PostTypeId="5" CreationDate="2017-05-24T15:53:02.870" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-24T15:53:02.870" LastActivityDate="2017-05-24T15:53:02.870" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="141" PostTypeId="4" CreationDate="2017-05-24T15:53:02.870" Score="0" Body="Questions about instruction specific to the programming language Processing. Use this tag only when the language used would affect the question significantly (if your question uses Processing as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-13T15:08:42.157" LastActivityDate="2017-06-13T15:08:42.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="142" PostTypeId="2" ParentId="134" CreationDate="2017-05-24T16:21:03.983" Score="3" Body="&lt;p&gt;Any programming is a two step process: deciding how to solve the problem, then implementing that as code on a particular system: choosing or designing an algorithm is the first step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are great ways to illustrate how the choice of algorithm &lt;em&gt;matters&lt;/em&gt;. An introductory one might be search - comparing random, linear and binary algorithms to, for example, find a missing number, or a word in a (printed) dictionary, or a book in a (physical) library. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another might be exploring different sorting algorithms, for example bubble sort and quicksort using &lt;a href=&quot;http://csunplugged.org/sorting-algorithms/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this CS Unplugged activity&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mathematics provides a rich source of contexts, for example asking students to think of an algorithm for finding the greatest common divisor (i.e. highest common factor) for a couple of numbers. Have them try their algorithms out on paper before coding them and then testing with some &lt;em&gt;big&lt;/em&gt; test numbers. &lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-24T16:21:03.983" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="143" PostTypeId="1" CreationDate="2017-05-24T16:33:04.063" Score="7" ViewCount="286" Body="&lt;p&gt;When I create questions in the style of the College Board's AP Computer Science Free Response Questions, I always attempt to create authentic rubrics that reflect how such questions would be graded.  However, I have not found any clear guides about how to do this.  I have noticed a few trends, but I wonder if anyone else has more (or something more definitive):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If a method requires a return, making a return is typically worth a point&lt;/li&gt;&#xA;&lt;li&gt;If parameters are given, utilizing them at all is awarded some points&lt;/li&gt;&#xA;&lt;li&gt;If arrays are present, looping through them with no chance of an &lt;code&gt;ArrayIndexOutOfBoundsException&lt;/code&gt; is awarded 1-2 points. &lt;em&gt;(If you need to loop through a String, that could also go here.)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Dealing with funny edge cases is often worth a point.&lt;/li&gt;&#xA;&lt;li&gt;Utilizing the appropriate methods from other Objects passed in is often awarded a point, though no penalty is made if they &lt;em&gt;successfully&lt;/em&gt; recreate the functionality that the Object would provide.&lt;/li&gt;&#xA;&lt;li&gt;Appropriately comparing two array neighbors without out-of-bounds potential, if it's that kind of problem, would be 1/2 a point, and correctly comparing &lt;em&gt;all&lt;/em&gt; neighbors would be an additional 1/2 point.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can see rubrics for the 2010 exam &lt;a href=&quot;http://apcentral.collegeboard.com/apc/public/repository/ap10_comp_sci_a_scoring_guidelines.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; as a sample.  Obviously, being able to create high-quality AP CS FRQ rubrics would help get the kids used to such grading - it could be the grading style used on exams through the entire course.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-11-01T20:30:17.317" LastActivityDate="2017-11-01T20:30:17.317" Title="Designing rubrics for AP Computer Science-style free response questions" Tags="|grading|ap-computer-science-a|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="144" PostTypeId="2" ParentId="137" CreationDate="2017-05-24T20:44:47.613" Score="3" Body="&lt;p&gt;An octal representation is shorter, in characters, than a binary representation for data with any number of bits greater than one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unlike hexadecimal, an octal representation can be displayed using only numeric characters, of which certain old technologies (such as Nixie tubes and 7-segment LEDs) were capable (back, depending on the students age, perhaps in ancient history).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-05-24T20:44:47.613" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="145" PostTypeId="2" ParentId="130" CreationDate="2017-05-24T20:54:26.277" Score="17" Body="&lt;p&gt;Indentation (in most languages) is just for readability.  This aids in maintainability and other good stuff, all of which an intro student is completely unaware of or uninterested in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it is best taught by making the student read code they have not written.  (e.g. what does this code do?, etc.)  Show them some sufficiently complex, badly formatted examples (maybe even under quiz time pressure), and let them discover for themselves that well formatted (indented) code is much easier to read and understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they will likely be a bit more interested in your description of good code formatting practices.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="27" LastEditDate="2017-06-07T03:47:11.330" LastActivityDate="2017-06-07T03:47:11.330" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="146" PostTypeId="1" CreationDate="2017-05-24T21:17:32.717" Score="20" ViewCount="5710" Body="&lt;p&gt;What is the most effective analogy that you have used or have thought of to teach the object oriented paradigm? Hopefully the analogy can translate well to inheritance as well, and includes the concepts of instance methods, class methods and properties. Even better would be if it also includes the concept of singleton classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar question exists &lt;a href=&quot;https://stackoverflow.com/questions/3141957/a-good-object-oriented-analogy&quot;&gt;on Stack Overflow&lt;/a&gt;. I would like to duplicate it here because on Stack Overflow it was closed an &quot;Not Constructive.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also exists &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/34584/how-to-explain-oop-concepts-to-a-non-technical-person&quot;&gt;on Software Engineering&lt;/a&gt;, where is not closed but it has historical lock. This means that &quot;it is not considered a good, on-topic question for this site.&quot; Again, it should be re-asked here.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-24T21:22:46.627" LastActivityDate="2022-01-14T05:11:15.973" Title="What is a good analogy for the Object Oriented paradigm?" Tags="|object-oriented-paradigm|teaching-analogy|" AnswerCount="18" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="147" PostTypeId="2" ParentId="146" CreationDate="2017-05-24T21:26:45.183" Score="5" Body="&lt;p&gt;I mean, one very clear analogy for Objects is, well, &lt;em&gt;objects&lt;/em&gt;.  But these are special sorts of objects.  You might show some videos like this one to make it clear:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=XCEtl9CfbAU&quot; rel=&quot;noreferrer&quot;&gt;https://www.youtube.com/watch?v=XCEtl9CfbAU&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=exGtj4jjbco&quot; rel=&quot;noreferrer&quot;&gt;https://www.youtube.com/watch?v=exGtj4jjbco&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The objects keeps track of some kind of information (instance variables), can be interacted with only in specified ways (interface), have setters (switch/button) and a getters (lights, your eyes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, we are talking about objects that have the ability to &lt;em&gt;do&lt;/em&gt; things, have interfaces by which you can get them to do them, and don't show you how they work inside.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you have a nice segue into constructing an Object together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What nice about using objects as an analogy for Objects is that, well, that's what they were &lt;em&gt;named&lt;/em&gt; after, so that's really the philosophical conception from the start.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-24T21:26:45.183" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="148" PostTypeId="2" ParentId="146" CreationDate="2017-05-24T21:34:40.177" Score="5" Body="&lt;p&gt;I have thought of different sizes, shapes and colors of boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would work better for younger students, and would work better if you use the box analogy for variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, all boxes are boxes. Some are square and some are round. There are white square boxes and brown square boxes, but they are both square boxes and can both fit similar things. Another example: A filing cabinet or cupboard is basically a box that can hold other boxes (a collection). You can of course use other examples too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Requested examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Inheritance:&lt;/strong&gt; A regular box and a cooler can hold the same types of items and are about the same size, but a cooler, in addition to storing things, keeps them cold.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Instances:&lt;/strong&gt; Get two of the same type of box. Put an object (like a rubber duck) in one, and a similar one (maybe a different rubber duck) in the other. They are separate instances of the same class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Properties:&lt;/strong&gt; From the previous example, the duck in one is yellow and looks like a wizard, and the other one is orange and looks like a tiger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More examples tomorrow, I'm going to bed.&lt;/p&gt;&#xA;" OwnerUserId="119" LastEditorUserId="119" LastEditDate="2017-05-26T21:13:30.213" LastActivityDate="2017-05-26T21:13:30.213" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="149" PostTypeId="2" ParentId="146" CreationDate="2017-05-24T21:37:16.057" Score="4" Body="&lt;p&gt;A good analogy you can use is a human analogy. Everybody is a human, but each of them has a different characteristic. Different eye color, hair color, skin, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody can easily relate to this cause we are all human.&lt;/p&gt;&#xA;" OwnerUserId="46" LastActivityDate="2017-05-24T21:37:16.057" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="150" PostTypeId="2" ParentId="27" CreationDate="2017-05-24T22:31:13.430" Score="5" Body="&lt;p&gt;Teaching how to &lt;em&gt;write&lt;/em&gt; assembly is questionable at best.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching how to &lt;em&gt;read&lt;/em&gt; assembly is IMHO crucial, and comes naturally as a part of C/C++ curriculum. For example, try to explain what atomics are, and how they are not black magic, without referring to concepts from the assembly realm.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2017-05-24T22:31:13.430" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="151" PostTypeId="2" ParentId="46" CreationDate="2017-05-24T23:28:33.543" Score="3" Body="&lt;p&gt;I will draw on my experience as a student of two online courses that have attempted to teach this topic. The first is the &lt;strong&gt;MITx course 6.00.2x&lt;/strong&gt; &lt;em&gt;Introduction to Computational Thinking and Data Science&lt;/em&gt;. The sections of the first unit are (1) optimization and the knapsack problem; (2) decision trees and dynamic programming; and (3) graph problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using optimization and decision trees as lead-ins to dynamic programming made it clear why the approach has value. The decision trees gave a good visual aid that still sticks with me. The course also uses the (somewhat cliché) Fibonacci example to show how memoization drastically speeds up the algorithm, and makes it computationally reasonable for numbers beyond the mid-30s. Here is the YouTube link to the lecture: &lt;a href=&quot;https://www.youtube.com/watch?v=_3B_WuCRjtg&quot; rel=&quot;nofollow noreferrer&quot;&gt;MITx on Dynamic Programming&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also recommend looking into &lt;a href=&quot;https://www.coursera.org/learn/programming-languages-part-b&quot; rel=&quot;nofollow noreferrer&quot;&gt;UW's Coursera offering Programming Languages, Part B&lt;/a&gt;. It focuses on Racket, and its section on memoization mentions dynamic programming in passing. Here are the lecture notes (relevant section starts on p. 15) and video for its materials: &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/unit5notes.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Programming Languages on memoization&lt;/a&gt; and the corresponding &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/13wi/videos/unit5/100_memoization.mp4&quot; rel=&quot;nofollow noreferrer&quot;&gt;lecture video&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-05-25T12:27:29.973" LastActivityDate="2017-05-25T12:27:29.973" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="152" PostTypeId="2" ParentId="146" CreationDate="2017-05-25T02:25:27.287" Score="8" Body="&lt;p&gt;A good analogy might use animals and their classification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Class: think felines. A feline will purr, go out only at night, eat meat, etc. One could think of the methods purr, goOut:time, eat:food, where a valid feline will only accept a night time and food that is meat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inheritance: meanwhile, felines are very different from each other, despite sharing much of the same physiology (implementation). They observe many similar behavior (interface), but different types of cats have different behavior ultimately. A domestic cat's purr will be very different from a tiger's. Meanwhile, a tiger will be able to predate on another animal (think the method predate:), but a cat will not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instance: specific cats. My neighbor's kitten, the tiger in the city zoo, a lion somewhere in Africa, etc.&lt;/p&gt;&#xA;" OwnerUserId="130" LastActivityDate="2017-05-25T02:25:27.287" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="153" PostTypeId="1" CreationDate="2017-05-25T04:42:03.477" Score="8" ViewCount="824" Body="&lt;p&gt;Context: Over the past school year I spent a significant portion of my time preparing to teach AP CS A next year. From choosing textbooks to writing the College Board syllabus, I essentially started from scratch in designing my course. I'm pleased with all aspects of it as it currently stands, but there is one nagging element: the programming environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All students taking AP CS A next year have experience using Cloud9 because that's what we used for C/Python/HTML/CSS this year in AP CSP. Only in the last couple weeks did I discover how easy it is to install the JDK in a Cloud9 workspace and write, compile, and execute programs in Java from the command line. (I had read somewhere a while ago that Java and Cloud9 didn't play nicely.) I had been BlueJ all the way until that point, and I do still very much like BlueJ. However, not having taught the class before, only designed it, here's my (hopefully specific enough) question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Will students lose anything in their understanding of and proficiency with Java, especially in terms of the AP Exam, if the class only uses a command-line environment for program compilation and execution?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many pros/cons to one IDE over another -- a topic which I think is too broad for this community. I just want to make sure, from those who have experience with this course, if there's something that the command-line environment lacks for students that an IDE like BlueJ doesn't lack. I don't want to end up doing students a disservice with respect to the objectives of the course based on this decision.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Cloud9 is a cloud-based IDE, which makes it ideal for my 1:1 Chromebook environment (however, I do have access to a PC lab for additional software, so that is not a restricting factor for me). As they define it, &quot;Cloud9 combines a powerful online code editor with a full Ubuntu workspace in the cloud.&quot; You essentially get a text editor and a terminal for compiling and running programs. I've found that anything I can do via a Linux command line, I can do in Cloud9. It has a number of additional features that make it great for classroom use. I originally chose it because it's the environment used for the CS50 IDE. See more &lt;a href=&quot;https://c9.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-18T21:32:59.910" LastActivityDate="2017-07-23T16:19:07.217" Title="Command-line Java in AP CS A" Tags="|java|ap-computer-science-a|ide|command-line|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="154" PostTypeId="1" CreationDate="2017-05-25T05:06:17.207" Score="1" ViewCount="194" Body="&lt;p&gt;I teach an introductory Scratch class to a group of elementary-school students. Most of the focus is on having fun creating simple games, but i still try to introduce a little higher-level programming as well, so that they have the tools when they decide they need them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some relatively easy games that require using a list that i can assign them?&lt;br&gt;&#xA;Ideally it should be something that can be done in an hour-long lesson. &lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditDate="2017-05-25T14:50:21.550" LastActivityDate="2017-05-25T14:50:21.550" Title="What kind of game (in Scratch) would require use of a list?" Tags="|scratch|arrays|" AnswerCount="2" CommentCount="5" ClosedDate="2017-05-26T00:07:05.673" ContentLicense="CC BY-SA 3.0" />
  <row Id="155" PostTypeId="2" ParentId="114" CreationDate="2017-05-25T08:53:10.827" Score="1" Body="&lt;p&gt;Set students tasks inside your lessons that are similar to the Olympiad(or as extension/home tasks for your most able). A good selection come from &lt;a href=&quot;http://projecteuler.net/index.php?section=problems&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://projecteuler.net/index.php?section=problems&lt;/a&gt; and &lt;a href=&quot;http://codingbat.com/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://codingbat.com/python&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="48" LastActivityDate="2017-05-25T08:53:10.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="156" PostTypeId="2" ParentId="154" CreationDate="2017-05-25T08:55:50.320" Score="1" Body="&lt;p&gt;You could create a spelling game where the set words get increasingly more difficult. The words will be stored as a list and a loop is used to cycle through the words as they answer the questions.&lt;/p&gt;&#xA;" OwnerUserId="48" LastActivityDate="2017-05-25T08:55:50.320" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="157" PostTypeId="2" ParentId="129" CreationDate="2017-05-25T09:35:59.207" Score="5" Body="&lt;p&gt;I have been involved with teaching coding to students aged 8+ in Ireland for the past few years. Gender balance is something we've thought about plenty, but (as other commenters have noted) there doesn't seem to be a silver bullet, or anything close to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where we have managed to shift our numbers somewhat it's been by heavily over-representing girls in our advertising for classes (no prizes for originality there...) and, more dramatically, by just going into all-girls schools and running classes there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(FWIW: classes went from 16% female to 21% female when we made more of a point of advertising with lots of girls in our pictures (that excludes classes run in single sex schools - so just the public, mixed classes). On &amp;lt;300 students, and with only those two data points, we can't infer much, but it moved in the right direction at least).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more interesting bit for me has been that there isn't a dramatic difference in interest levels in the subject once you actually get the girls into classes. This could be seen as selection bias in our &quot;public facing&quot; classes, where anyone can sign their kids up (maybe we only get the girls who are really enthusiastic already?) but it holds up in schools where we run after-school activities that attract similar ~50% participation in both the boys and girls schools where we've run classes. Boys don't &lt;em&gt;like&lt;/em&gt; coding more than girls, they just (for some reason) &lt;em&gt;actually do it&lt;/em&gt; more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've also noticed that gender balance seems to get worse as kids get older, so the key does seem to be getting them at a younger age. Getting the parents on board is crucial too - especially when it comes to the younger groups, I can't make sense of the imbalance except to say that it comes down to parents choosing &quot;gender appropriate&quot; hobbies/activities for their kids. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course, the probably obvious point: it's a cycle, currently vicious but could become virtuous in time if enough women can be persuaded into the career. &lt;/p&gt;&#xA;" OwnerUserId="188" LastActivityDate="2017-05-25T09:35:59.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="158" PostTypeId="2" ParentId="154" CreationDate="2017-05-25T09:48:36.313" Score="4" Body="&lt;p&gt;A variant on the usual random drill and practice test would be to pre-populate with the questions and answers, then remove question and answer from each as they get answered correctly, allowing players to get more practice on the questions they get wrong. Here's &lt;a href=&quot;https://scratch.mit.edu/projects/76203808/&quot; rel=&quot;nofollow noreferrer&quot;&gt;an example for times tables&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try something for an adventure game, building up an inventory of items collected in a list. Another possibility would be an adaptive 20 questions style game, adding additional questions into a database (of sorts) as the player gets to the end of a branch of the tree.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-25T09:48:36.313" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="159" PostTypeId="2" ParentId="153" CreationDate="2017-05-25T10:09:13.153" Score="2" Body="&lt;p&gt;Java's core, from my experience, is writing large (or many, or both &lt;code&gt;;)&lt;/code&gt;) classes and files (whilst preserving &lt;a href=&quot;https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)&quot; rel=&quot;nofollow noreferrer&quot;&gt;SOLID&lt;/a&gt; principles) and then running a rather complex program, composed of those classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to this, working only with a command-line environment is somewhat losing that part of java, and might damage the students' understanding of Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This being said, Java 9, which will soon be released, has &lt;a href=&quot;https://en.wikipedia.org/wiki/JShell&quot; rel=&quot;nofollow noreferrer&quot;&gt;JShell&lt;/a&gt;, which incorporates a command-line environment. So it will be a 2-in-1 package. There's a pre-release version available so that you can get familiar with it (and then with teaching it). But until it's released, in my opinion it's better to work in an IDE such as eclipse or IntelliJ.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T16:19:07.217" LastActivityDate="2017-07-23T16:19:07.217" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="160" PostTypeId="2" ParentId="63" CreationDate="2017-05-25T11:33:08.080" Score="5" Body="&lt;p&gt;We're introducing some aspects of parallel processing quite early on in Scratch. Each sprite has its own script which appears to execute in parallel with those of the others. Scratch has a broadcast and receive message protocol, and support for shared as well as private variables and lists. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Children might encounter this in a maze game, perhaps programming a number of similar ghosts to chase the player's avatar. It's also useful for agent-based modelling, e.g. the spread of an epidemic through a population. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, it's not true multi-threading, as all of Scratch runs inside Flash, inside the browser, on just the one core, but I doubt those using Scratch will be aware of, or care about, the distinction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does, though, lead to potential difficulties in 'graduating' from Scratch to a text-based language such as Python - young Scratchers who've been used to programming in parallel in Scratch can find it hard to adjust to doing just one thing at a time in introductory Python programming.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-05-25T11:33:08.080" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="161" PostTypeId="1" AcceptedAnswerId="165" CreationDate="2017-05-25T11:39:47.080" Score="25" ViewCount="2065" Body="&lt;p&gt;Is there a good beginner's programming language, specifically designed for learners, maybe even kids?&lt;br&gt;&#xA;Something beginners can sink their teeth into and get results quickly. Results that are more than a &quot;Hello world!&quot; or a program that adds two integers. Something easy to use, but a thing that can guide them through the basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Phrogram (née KPL) was a good example, but it has sadly died (see pics at bottom; simple interface, simple codes, yet they look and feel like a modern programming environment and language - in small).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe it is an existing mainstream programming language with a simplified IDE, maybe it is a full learner's solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Just a few ideas what to look for in a beginner's language&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object oriented (ComLogo is funny, but has nothing to do with today's actual programming)&lt;/li&gt;&#xA;&lt;li&gt;Good IDE (intellisense and built-in help)&lt;/li&gt;&#xA;&lt;li&gt;Simple IDE with preferably a &quot;Run&quot; button - they can learn about translation and interpreter later (Visual Studio is amazing, but pretty intimidating for a beginner.)&lt;/li&gt;&#xA;&lt;li&gt;Should be visual (commad line will never be too appealing to kids)&lt;/li&gt;&#xA;&lt;li&gt;Should be free of language oddities and paradoxes (this is where most actual programming languages fail IMO)&lt;/li&gt;&#xA;&lt;li&gt;The list goes on; should encourage the use of indentation, should require variable declaration, should be memory safe...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Examples from Phrogram:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/tcutR.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/tcutR.jpg&quot; alt=&quot;Phrogram example code&quot;&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/1kAi5.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/1kAi5.jpg&quot; alt=&quot;Phrogram interface&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="919" LastEditDate="2017-07-08T13:58:14.227" LastActivityDate="2018-05-03T06:26:52.313" Title="Programming languages specifically designed for beginners" Tags="|best-practice|language-choice|" AnswerCount="13" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="162" PostTypeId="2" ParentId="114" CreationDate="2017-05-25T11:42:19.687" Score="4" Body="&lt;p&gt;One approach is to host a contest for your students yourself. You can either 'force' participation by including it in the lesson program or make it extra-curricular, where you can give additional incentive by handing out 'bonus points' to grades for all participating students. For the students that are good enough and enjoy your contest, the contest can strongly encourage them to participate in the olympiad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An advantage of this approach is that you not only encourage the students you think are 'suitable' for the olympiad, but simultaneously have an activity that can motivate &lt;em&gt;the other students&lt;/em&gt; into programming and algorithmic thinking and, ultimately, your course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main disadvantage is that this will take time and some skill to pull it off successfully. This may be less daunting than it seems: you can get questions from various sources and relatively small contests need no complicated submission software. However, I'll refrain from discussing further how to host such a competition; that would be worth a question on its own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then again, I agree with @Itamar Green that you likely need &lt;strong&gt;someone&lt;/strong&gt; to deliberately invest time to encourage the students, so it is likely the time has to be spent anyway.&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2017-05-25T11:42:19.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="163" PostTypeId="2" ParentId="146" CreationDate="2017-05-25T11:56:57.047" Score="4" Body="&lt;pre&gt;&lt;code&gt;Wheeled vehicles&#xA; |-human-propelled&#xA; ||- unicycle&#xA; ||- bicycle&#xA; ||- tricycle&#xA; |-animal-propelled&#xA; ||- cart&#xA; ||- carriage&#xA; ||- ...&#xA; |- motor-propelled&#xA; ||- motorcycle&#xA; ||- car&#xA; ||- ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This allows you to explore both subclassing and composition.&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2017-05-25T14:38:21.533" LastActivityDate="2017-05-25T14:38:21.533" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="164" PostTypeId="2" ParentId="129" CreationDate="2017-05-25T12:33:17.760" Score="3" Body="&lt;p&gt;I've heard that making the introduction to computers as more hands-on and practical is better for engaging girls than simply sitting at a keyboard and coding. One relevant entry point might be the cheap modern 3D printers (made possible by a $5 control board), which have all sorts of non-software applications - and maybe generate less bias than robots.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this sense, working with microcontrollers and focusing on embedded applications should be beneficial. There is also scope to pull in a wider range of applications in this way (health, environmental monitoring, other sciences, education) which makes the final employment benefit of taking a Computer Science course easier to grasp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe girls are more conscious of making longer-term career plans, so showing them the diversity of roles where Computer Science is applicable will also help. The chain from remote data collection through to data analytics (and the underlying stack) is massive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure if there is much evidence to support the value of an mcu approach yet (some, for sure, but I think it's early).&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-25T12:33:17.760" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="165" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T12:59:48.000" Score="21" Body="&lt;p&gt;&lt;a href=&quot;http://scratch.mit.edu&quot; rel=&quot;noreferrer&quot;&gt;Scratch&lt;/a&gt; is a visual block-based drag-and-drop programming language designed specifically for learners, especially children. It's created by the Lifelong Kindergarten Group at the MIT Media Lab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The language and IDE are pretty much completely connected. Here's how I see it checking off your bullet points:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object oriented: It has sprites, but it's debatable whether it's truly object oriented. It can serve as an introduction to the concept though.&lt;/li&gt;&#xA;&lt;li&gt;Good IDE: Yes. There's a help toolbar on the right side.&lt;/li&gt;&#xA;&lt;li&gt;Simple IDE with run button: Yes.&lt;/li&gt;&#xA;&lt;li&gt;Visual: It's completely visual and drag-and-drop. Typing is only needed for numbers and strings, essentially.&lt;/li&gt;&#xA;&lt;li&gt;Free of language oddities and paradoxes: I'm not sure exactly what type of oddities and paradoxes you're thinking of, but Scratch tries to be helpful and avoid breaking your code whenever possible. The blocks themselves are pretty intuitive and self-explanatory.&lt;/li&gt;&#xA;&lt;li&gt;Other:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Indentation: Since it's not text based, this is less important, but control structures (conditions and loops) do get their code indented.&lt;/li&gt;&#xA;&lt;li&gt;Variable declaration: All variables must be defined before use.&lt;/li&gt;&#xA;&lt;li&gt;Memory safe: Yes, it runs in Flash in the browser (next version plans to move to JS). You don't have any control over actual memory usage in your program.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Scratch was my first language, and I've been teaching it as a first language for the past several years. It's great for teaching the concepts without worrying about annoying little things like syntax.&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="2" LastEditDate="2017-05-25T22:33:36.593" LastActivityDate="2017-05-25T22:33:36.593" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="166" PostTypeId="5" CreationDate="2017-05-25T13:27:05.890" Score="0" Body="&lt;p&gt;Different languages have different features, and these choices have real educational implications.  For instance, Java may be considered a better language to teach Object Oriented principles than ASM, while Processing might be a better language for teaching about art and sound.  &lt;a href=&quot;/questions/tagged/language-choice&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;language-choice&amp;#39;&quot; rel=&quot;tag&quot;&gt;language-choice&lt;/a&gt; questions seek the pedagogic implications of choosing different languages in the most objective way possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to encourage high-quality answers, questions tagged with &lt;a href=&quot;/questions/tagged/language-choice&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;language-choice&amp;#39;&quot; rel=&quot;tag&quot;&gt;language-choice&lt;/a&gt; should outline the relevant targets or goals that should be met within the learning environment.  &lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-25T22:33:46.947" LastActivityDate="2017-05-25T22:33:46.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="167" PostTypeId="4" CreationDate="2017-05-25T13:27:05.890" Score="0" Body="Questions related to the choice of programming languages for different learning environments" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-25T22:33:30.080" LastActivityDate="2017-05-25T22:33:30.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="168" PostTypeId="2" ParentId="137" CreationDate="2017-05-25T13:52:14.797" Score="4" Body="&lt;p&gt;It's &lt;em&gt;necessary&lt;/em&gt; to know about octal because some compilers and tools will interpret multi-digit numbers with leading zeros differently to how many people will read them. Tracking down this sort of bug is very hard (as in spoken language where two people interpret words differently - maybe a useful analogue to work into a conversation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found two other relevant questions on SE:&#xA;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/98692/where-are-octals-useful&quot;&gt;https://softwareengineering.stackexchange.com/questions/98692/where-are-octals-useful&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2609426/in-what-situations-is-octal-base-used&quot;&gt;https://stackoverflow.com/questions/2609426/in-what-situations-is-octal-base-used&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first identifies quite a lot of genuine legacy applications, which seem to be driven in the main by resource constraints which are not likely to be so relevant any more. The second question doesn't add anything more that I can see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About the only time where Octal could be useful is in packing more separate items into a 32 bit register, and I'm struggling to decide if this is just obvious or actually a useful concept. It's closely related to ideas like video encoding, where RGB can be packed as 5,5,6 bits - but I'm not aware of this leading to the use of octal in the representations. Video is of course one of the areas today where resource constraints are very real (8.3 Mp per frame@60 Hz).&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-05-25T13:52:14.797" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="169" PostTypeId="2" ParentId="143" CreationDate="2017-05-25T14:11:54.360" Score="3" Body="&lt;p&gt;In the weeks leading up to the test I typically only use the actual past tests for exactly that reason. But even when I don't use the released FRQs I still grade on a 9 point scale so they get used to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a few more that tend to come up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For return methods, create a variable of the correct type, do something to it, and return it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a constructor, it should initialize the instance variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On full class problems - either write a full class, extend an abstract, or implement an interface - it's usually a point or two for the class signature. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Utilizing the appropriate methods from other Objects passed in is&#xA;  often awarded a point, though no penalty is made if they successfully&#xA;  recreate the functionality that the Object would provide.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sometimes. And sometimes they explicitly say that you must use the previous method for credit. #3 on the test this year did that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a negative rubric point for any of the penalties. Destruction of data, unexpected side effects, returning from a void, that sort of thing. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-25T14:11:54.360" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="170" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T15:07:11.417" Score="1" Body="&lt;p&gt;&lt;a href=&quot;http://www.drjava.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dr. Java&lt;/a&gt; is simple IDE for Java that is designed for students. Dr. Java insist you press the 'compile' button before the 'run' button, but that is all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A nice feature is a basic console that allows you to REPL, as in an interpreted language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, Dr. Java supports some more advanced features (without cluttering the screen), such as automated testing and code coverage with JUnit and a debugger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To create visual output in Java, you can use the &lt;a href=&quot;http://www.turtlegrafik.ch/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turtle Graphics&lt;/a&gt; package, which visualizes the path a 'turtle', let's call him Joe, walks, according to the commands you gave Joe in Java (e.g. joe.forward(100), joe.right(90), etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although full-featured Java can be a bit daunting for the beginner, the tools I mentioned can be used to keep it simple enough to teach programming. (Turtle Graphics is, iirc, how I was introduced to programming in high-school) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An advantage of this approach over using a language designed only to learn programming, is that this approach more easily gives access to more advanced learning tools, as more people use Java than very specific learning languages.&lt;/p&gt;&#xA;" OwnerUserId="154" LastActivityDate="2017-05-25T15:07:11.417" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="171" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T15:12:07.653" Score="21" Body="&lt;p&gt;I would consider teaching in &lt;a href=&quot;https://www.python.org/&quot; rel=&quot;noreferrer&quot;&gt;Python&lt;/a&gt; if you wanted to give your students a taste of programming in a text-based language—pretty much the only type of language used professionally. A visual programming language like Scratch is probably better for younger groups, and teaches the underlying programming concepts well, but you will reach a point where you &lt;strong&gt;must&lt;/strong&gt; write in a text-based programming language. There are very few programmers who work professionally in visual programming languages, so Python provides a nice 'first step'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I would specifically recommend &lt;strong&gt;Python 3&lt;/strong&gt;, because it has far fewer 'oddities' that you'd like to avoid. I've briefly discussed this &lt;a href=&quot;https://cseducators.stackexchange.com/a/82/2&quot;&gt;here&lt;/a&gt; in comparison to Python 2; it seems like a no brainer to teach in Python 3, which is much more intuitive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding your constraints:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object-oriented&lt;/strong&gt;: Python supports OOP, but does not enforce it. If you want to initially teach procedural programming, then move on to OOP, Python will allow you to do that. Other languages like Java &lt;strong&gt;require&lt;/strong&gt; OOP, with all the boilerplate that comes with it, but Python gives you the flexibility to write either way.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;IDE support&lt;/strong&gt;: The default IDE, IDLE, is frankly poor. PyCharm, Jetbrains' IDE, is far superior and does support intelligent auto-complete, although the professional edition does come at a cost. &lt;a href=&quot;https://www.jetbrains.com/pycharm-edu/&quot; rel=&quot;noreferrer&quot;&gt;PyCharm Edu&lt;/a&gt;, however, is free and open source. It's also worth considering &lt;a href=&quot;https://cseducators.stackexchange.com/a/48/2&quot;&gt;whether you need an IDE at all&lt;/a&gt;!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual element&lt;/strong&gt;: Initially, I suspect it'll be far easier to teach your students to write text-based programs. Don't underestimate what you can make on the command line, though—quizzes, guessing games and joke scripts are all low hanging fruit. Al Sweigart's &lt;a href=&quot;https://inventwithpython.com/inventwithpython_3rd.pdf&quot; rel=&quot;noreferrer&quot;&gt;*Invent Your Own Computer Games with Python&lt;/a&gt; might be a helpful resource to teach using PyGame for the visual element, but it will be much more verbose than command-line programs and will probably require some teaching to get to that level. You might find it helpful to &lt;a href=&quot;http://interactivepython.org/runestone/static/thinkcspy/PythonTurtle/OurFirstTurtleProgram.html&quot; rel=&quot;noreferrer&quot;&gt;use the &lt;code&gt;turtle&lt;/code&gt; library&lt;/a&gt; for something to play with, and get instant feedback.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Language oddities&lt;/strong&gt;: Python is relatively intuitive, and was designed with &lt;a href=&quot;https://www.python.org/about/gettingstarted/&quot; rel=&quot;noreferrer&quot;&gt;specific consideration for beginners&lt;/a&gt;. The &lt;a href=&quot;https://stackoverflow.com/questions/588004/is-floating-point-math-broken&quot;&gt;floating point calculations&lt;/a&gt; might cause some confusion, but other than that, most operations work as you'd expect.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Indentation&lt;/strong&gt;: Python &lt;strong&gt;enforces&lt;/strong&gt; indentation, otherwise your code just won't run at all. The discipline that Python creates will probably be helpful for future, less strict languages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory safety&lt;/strong&gt;: Nothing to worry about here.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Declaring variables in advance&lt;/strong&gt;: This point &lt;em&gt;isn't really required&lt;/em&gt; for Python—you generally don't declare variables in advance; you just create them as needed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Consider the benefits of a text-based language: once your students master it, they understand a &lt;strong&gt;general-purpose&lt;/strong&gt; programming language used in industry. If you master Scratch, you &lt;em&gt;still&lt;/em&gt; have to go through this step anyway to learn a text-based language.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-05-25T15:42:37.137" LastActivityDate="2017-05-25T15:42:37.137" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="172" PostTypeId="1" AcceptedAnswerId="175" CreationDate="2017-05-25T15:56:56.273" Score="7" ViewCount="701" Body="&lt;p&gt;When I teach front end web development, it always happens that I start the year with a bunch of students who are ready to redesign Facebook on day 1. With expectations like that, it's always a letdown when I start talking about what a tag is, what a markup language is, CSS priorities, code quality, and generally the details of how good design is implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I stop students from dropping off and losing interest? This is especially pertinent to me because my class is extracurricular and is something interested kids can take if they want to, but if they get bored they can just stop coming. The kids are in high school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, I'd think that my activities could be changed to be more exciting and let the students do more from the get go, I'm just not sure how I could do that.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-23T20:29:06.850" LastActivityDate="2017-06-23T20:29:06.850" Title="How can I maintain interest in front end?" Tags="|secondary-education|web-development|front-end|student-motivation|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="173" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T15:57:46.477" Score="11" Body="&lt;p&gt;Processing probably ticks a lot of your boxes. It's essentially a framework built on top of Java and shipped with its own IDE (also free and open source). A lot of the boiler plate code that normally exists in Java (package and include statements and so on) is hidden by default, so it's very clean for newbies (you can import extra packages later if you need to in the normal way). As straightforward as you'd want it to be to put together simple versions of classic games, like Pong below, which I think of as a good barometer for a teaching language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/xzWZy.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/xzWZy.gif&quot; alt=&quot;IDE on left, intermediate project on right&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Object oriented&lt;/strong&gt;: fully featured Java under the hood&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Good IDE (intellisense and built-in help)&lt;/strong&gt;: Not always perfect, but the latest version has auto-complete and auto-indenting functionality which is about as much as I want younger students to have. Little beyond that, which can be frustrating, but on balance I think it hits a nice sweet spot of simplicity and functionality. One button to compile and run.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Should be visual&lt;/strong&gt;: very easy to draw shapes on screen. Can make a circle follow the mouse in six lines (including two that are just brackets). Not as easy as something like Scratch, but about as easy as I can imagine a full fat programming language being. By week 5 with a young class we have them working with mouse coordinates, colours and random numbers to put together simple animations like the below (super simple to look at here, but lots of little achievements the kids love along the way to keep it interesting. Also need semicolons, brackets, etc all correct for this)&#xA;&lt;a href=&quot;https://i.stack.imgur.com/RQlYt.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/RQlYt.gif&quot; alt=&quot;Simple lesson with Processing - shape onscreen moving and flashing&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Should be free of language oddities and paradoxes&lt;/strong&gt;: depends on what exactly you mean. Java probably fails this test by some reasonable measures, but that's a broader conversation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The list goes on; should encourage the use of indentation, should require variable declaration, should be memory safe...&lt;/strong&gt;: The language/IDE don't demand indentation, but it's made pretty easy to do. Requires variable declarations, is memory safe. Also provides plenty of headroom to grow into for even the most advanced students.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;We've used it with students as young as 8. On the whole we've concluded that age 10-11 is a sweet spot for starting with this kind of thing (as against something like Scratch). Some 8-year-olds can definitely get to grips with Processing, but most get a little frustrated after the first 5-10 lessons at how slow progress can be. In particular the reliance on coordinates can be a very high bar for younger students to cross. &lt;/p&gt;&#xA;" OwnerUserId="188" LastActivityDate="2017-05-25T15:57:46.477" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="174" PostTypeId="1" AcceptedAnswerId="183" CreationDate="2017-05-25T16:18:27.437" Score="4" ViewCount="71" Body="&lt;p&gt;So, I am preparing to teach about P and NP for the first time.  I know that I need to teach about Mapping Reducibility (aka One-to-One Reducibility).  Can anyone recommend a set of algorithms that are easy to use to clearly illustrate the idea?  The algorithms in this first brush with the topic don't, themselves, have to be NP - I just want to show a remapping that is extremely clear in order to impart the concept.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-25T22:22:24.097" Title="Presenting Mapping Reducibility (for P vs NP)" Tags="|lesson-ideas|complexity-theory|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="175" PostTypeId="2" ParentId="172" CreationDate="2017-05-25T16:27:17.627" Score="4" Body="&lt;p&gt;Assuming that you have reasonably motivate students in the first place, the first rule of motivation is to explain the goal, and where that fits into a larger framework.  So, if you're teaching CSS, you might show the kind of final product that you expect them to be able to make by the end of the course &lt;em&gt;on day 1&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also explain the limits.  Something like, &lt;em&gt;&quot;CSS doesn't let you make the websites interactive on it's own, but it's how we design the pages themselves, and it's a pre-requisite skill if you EVER want to be able to make those more involved, interactive web sites.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little bit of contextualization goes a long way in keeping people interested, because we naturally lose interest when it feels like something is meandering and purposeless.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-25T16:27:17.627" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="176" PostTypeId="2" ParentId="146" CreationDate="2017-05-25T16:59:02.830" Score="4" Body="&lt;p&gt;I'd turn the lesson on its head. Say, I am writing a game and I need to track what's going on. To start my game is going to feature a &quot;good guy&quot; running around fighting &quot;bad guys&quot;. So I write &lt;code&gt;Good guy&lt;/code&gt; and &lt;code&gt;Bad guy&lt;/code&gt; classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unsurprisingly, these classes contain a lot of similar code. They both move, etc. so we can take that code and break it out into a common base class...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... and just keep extending the metaphor. Bad Guy's need AI, Good Guys need control input, etc.&lt;/p&gt;&#xA;" OwnerUserId="35" LastActivityDate="2017-05-25T16:59:02.830" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="177" PostTypeId="2" ParentId="146" CreationDate="2017-05-25T17:28:12.770" Score="2" Body="&lt;p&gt;A class is a small-program, an object is an instance of the small-program. A program is a collection of small-programs, that work together to achieve something bigger. A bit like Unix (bit different), where small-programs are connected with pipes. Objects are connected by messages, and you have to compile to link things together.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-05-25T17:28:12.770" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="178" PostTypeId="2" ParentId="112" CreationDate="2017-05-25T17:48:08.740" Score="9" Body="&lt;p&gt;The middle column is Snap!. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Snap! you can create your own C-shaped blocks, as well as functions (see range block), this is in addition to the procedures that can be done in scratch. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I could not get the last one to work, but some times you only need to get the image. However the others do work (fully functional). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/uyNNI.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/uyNNI.png&quot; alt=&quot;python from scratch&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-25T08:30:24.273" LastActivityDate="2017-07-25T08:30:24.273" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="179" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T18:32:36.560" Score="3" Body="&lt;p&gt;Although out-of-style, historically, BASIC was designed for the education of non-STEM college students, is time tested, and probably allowed one of the highest ever programming literacy rates among the total base of personal computer users at one time.  It might be the programming language from which a student is most likely to able to get homework help from their parents or grandparents.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;BASIC can be run, interactively, without any IDE or editor, and is currently supported on the most primitive computing platforms (Grandpa's Apple II) as well as emulations within contemporary web browsers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In spite of Dijkstra's complaints, many successful computer programmers and entrepreneurs (including now billionaires) first learned to program in BASIC, many as kids, on their own.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-07-07T16:00:24.723" LastActivityDate="2017-07-07T16:00:24.723" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="180" PostTypeId="1" CreationDate="2017-05-25T18:46:41.210" Score="13" ViewCount="353" Body="&lt;p&gt;Should some portion of introductory CS curriculum include something about the history of computers, especially with respect to Moore's law and what that might imply about the growth of computing power?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would this help give students a perspective regarding the potential of how computing and programming might change in the near future, based on how things have changed in the past?&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="76" LastEditDate="2017-06-11T05:02:27.453" LastActivityDate="2017-07-10T15:15:59.533" Title="What are the merits of including the history of computers in the entry level curriculum?" Tags="|social-context|computer-history|" AnswerCount="6" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="181" PostTypeId="2" ParentId="161" CreationDate="2017-05-25T18:58:59.857" Score="4" Body="&lt;p&gt;Teaching strategies are indicative of learning. This is as much part of learning to programming. Students need direction and to be given instruction, not just to be sat in front of a computer hoping that learning will be automatic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grover and Basu would agree block programming is a great introduction, but their research shows that students have general difficulties understanding programming constructs, whether using text-based or block programming language, and calls for application of learning strategies “[balancing] constructionism with other pedagogical approaches that foster deeper learning of problem solving activities and computing concepts… Activities that require students to describe what is happening” (Grover &amp;amp; Basu, 2017, p. 271 - 272). &lt;a href=&quot;https://www.researchgate.net/publication/314296105_Measuring_Student_Learning_in_Introductory_Block-Based_Programming_Examining_Misconceptions_of_Loops_Variables_and_Boolean_Logic&quot; rel=&quot;nofollow noreferrer&quot;&gt;Measuring Student Learning in Introductory BlockBased Programming: Examining Misconceptions of Loops, Variables, and Boolean Logic&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="146" LastEditorUserId="146" LastEditDate="2017-05-26T15:18:22.927" LastActivityDate="2017-05-26T15:18:22.927" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="182" PostTypeId="2" ParentId="174" CreationDate="2017-05-25T19:03:30.010" Score="1" Body="&lt;p&gt;A fairly simple reduction goes from Hamiltonian Cycle to the Travelling Salesman Problem (TSP). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Hamiltonian Cycle problem on instance $G$ asks whether there exists a tour of some unweighted, undirected graph $G$. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;TSP on instance $(G,k)$ asks whether there exists a tour in the weighted, complete graph $G$, of length at most $k$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reduction is as follows:&lt;br/&gt;&#xA;Given the unweighted graph $G$, construct complete weighted graph $G'$ on the same vertices as $G$. Set the weights such that an edge in $G'$ has weight $0$ if the edge was in $G$ and set the weight to $1$ otherwise. The results of the reduction is the TSP instance $(G', 0)$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since any tour in $G'$ is of length zero if and only if it is a tour using only the vertices in $G$, it follows that the answer to the instance for TSP is 'yes' if and only if the answer to the instance for Hamiltonian Cycle is 'yes'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this reduction can be computed in polynomial time, this also shows that TSP is NP-hard if Hamiltonian Cycle  is NP-hard. (Both Hamiltonian Cycle and TSP are known to be NP-hard problems)&lt;/p&gt;&#xA;" OwnerUserId="154" LastEditorUserId="154" LastEditDate="2017-05-25T22:22:24.097" LastActivityDate="2017-05-25T22:22:24.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="183" PostTypeId="2" ParentId="174" CreationDate="2017-05-25T19:14:29.313" Score="3" Body="&lt;p&gt;Considering that you teach HS students, many of the reduction examples &quot;off the market&quot; might be conceptually a bit too complex, and can be confusing even for many college students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest that you choose an example between very similar problems, like the (polynomial time) reduction from 4SAT to 3SAT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what are 4SAT and 3SAT? SAT is the &lt;strong&gt;Boolean satisfiability problem&lt;/strong&gt;, or, given a Boolean formula phi, we want to decide if there is a solution to the equation phi = true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These equations are usually written in &lt;em&gt;conjunctive normal form&lt;/em&gt;, or a series of conjunctions of disjunctions, like: &quot;(a or b or c) and (c or d)&quot;. When each clause has 3 terms, the problem is called 3SAT. When each clause has 4, it's called 4SAT. Now you might get a sense how one could reduce from 4SAT to 3SAT. One possible reduction (which is extremely simple) is described &lt;a href=&quot;https://math.stackexchange.com/questions/571618/convert-4-sat-to-3-sat&quot;&gt;here&lt;/a&gt; on the Math SE. &lt;/p&gt;&#xA;" OwnerUserId="130" LastEditorUserId="130" LastEditDate="2017-05-25T19:25:46.100" LastActivityDate="2017-05-25T19:25:46.100" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="184" PostTypeId="2" ParentId="153" CreationDate="2017-05-25T19:16:06.320" Score="6" Body="&lt;p&gt;Similar to @ncmathsadist, I use both command-line environments and IDEs, and I have only found them enhancing each other.  We do most of our work in IDEs, but a few assignments are done in CLIs every year to ensure that students slowly gain some familiarity with those environments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reasons for IDEs:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Convenience&lt;/li&gt;&#xA;&lt;li&gt;Easy integration with GitHub&lt;/li&gt;&#xA;&lt;li&gt;Error highlighting (though I &lt;a href=&quot;https://cseducators.stackexchange.com/a/78/27&quot;&gt;have some issues&lt;/a&gt; with this)&lt;/li&gt;&#xA;&lt;li&gt;Ease with packages and project integration&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Reasons for CLIs:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There are still plenty of important computing platforms (including both iOS and Windows!) that ultimately reduce down to CLIs.&lt;/li&gt;&#xA;&lt;li&gt;Good luck explaining the &lt;strong&gt;string[] args&lt;/strong&gt; in &lt;code&gt;public static void main(String[] args)&lt;/code&gt; if students don't have any experience in CLIs.&lt;/li&gt;&#xA;&lt;li&gt;Even a little POSIX familiarity goes a long way.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-25T19:42:07.640" LastActivityDate="2017-05-25T19:42:07.640" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="185" PostTypeId="1" AcceptedAnswerId="230" CreationDate="2017-05-25T19:20:27.040" Score="4" ViewCount="238" Body="&lt;p&gt;I think that the use of some logic programing language like Prolog, for example, could be a good way to explain the &lt;a href=&quot;https://en.wikipedia.org/wiki/Logic_in_computer_science&quot; rel=&quot;nofollow noreferrer&quot;&gt;symbolic/mathematical logic&lt;/a&gt; concepts but also apply this concepts in a real programming world, however, but I'm not getting it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that Prolog &lt;a href=&quot;https://www.quora.com/What-are-the-real-life-uses-of-Prolog&quot; rel=&quot;nofollow noreferrer&quot;&gt;are not largely used in real applications&lt;/a&gt;. I tried to use &lt;a href=&quot;https://www.cs.nmsu.edu/ALP/2011/03/natural-language-processing-with-prolog-in-the-ibm-watson-system/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this IBM's NLP&lt;/a&gt; as an example, but this pattern matching exercise does not covers much concepts from mathematical logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is: How can I use programming to instruct students in topics related to symbolic/mathematical logic?&lt;/p&gt;&#xA;" OwnerUserId="116" LastEditorUserId="204" LastEditDate="2018-03-12T09:54:08.660" LastActivityDate="2018-03-12T09:54:08.660" Title="Do I need Prolog to teach logic concepts?" Tags="|language-choice|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="186" PostTypeId="2" ParentId="180" CreationDate="2017-05-25T20:10:48.997" Score="6" Body="&lt;p&gt;There are some history topics that link really well with computing - for example a history of communication, taking in writing, printing, semaphore, the telegraph and Morse code etc, through to the internet and the web. The &lt;a href=&quot;https://www.gov.uk/government/publications/national-curriculum-in-england-history-programmes-of-study/national-curriculum-in-england-history-programmes-of-study#key-stage-1&quot; rel=&quot;noreferrer&quot;&gt;English history curriculum for 5-7 year olds&lt;/a&gt; suggests that pupils compare William Caxton and Tim Berners Lee. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another great topic would be cryptography, perhaps starting with the Caesar cipher, mono-alphabetic and poly-alphabetic substitutions, Enigma, Colossus and other work at Bletchley Park, public / private key encryption (with applications to SSL), some of the contemporary issues around privacy and perhaps a look ahead to quantum cryptography.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;YMMV, but I think context like these may make these topics more engaging than a straight history of computing unit.&lt;/p&gt;&#xA;" OwnerUserId="44" LastEditorUserId="44" LastEditDate="2017-05-25T20:25:56.127" LastActivityDate="2017-05-25T20:25:56.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="188" PostTypeId="2" ParentId="172" CreationDate="2017-05-25T23:56:57.670" Score="5" Body="&lt;p&gt;As Choirbean noted, this is fundamentally a question of motivation. I don't think it's about making something more &quot;exciting.&quot; That is, the secret is not in something extrinsic, which is what makes this such a challenging issue whether it be front-end development or really any topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I draw on &lt;a href=&quot;https://www.ted.com/talks/dan_pink_on_motivation&quot; rel=&quot;noreferrer&quot;&gt;Daniel Pink's TED Talk&lt;/a&gt; whenever I think about getting students to do something. The gist is that there are &quot;three elements of true motivation -- autonomy, mastery, and purpose.&quot; The key to start is autonomy; students need that freedom of choice to get personally invested and be motivated by more than a grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can speak to autonomy with front-end development based on a project I did this year. I assign two HTML/CSS assignments. For each, they can make anything they want the subject of their pages: a travel destination, a TV show, a sports team, &lt;em&gt;anything&lt;/em&gt;. That was the key. They were so excited about describing something they loved that they were invested enough in the topic to work on the HTML/CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The requirements of the first assignment were the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DOCTYPE&lt;/li&gt;&#xA;&lt;li&gt;html tags&lt;/li&gt;&#xA;&lt;li&gt;head tags&lt;/li&gt;&#xA;&lt;li&gt;body tags &lt;/li&gt;&#xA;&lt;li&gt;title element &lt;/li&gt;&#xA;&lt;li&gt;header element&lt;/li&gt;&#xA;&lt;li&gt;paragraph element&lt;/li&gt;&#xA;&lt;li&gt;proper filename &lt;/li&gt;&#xA;&lt;li&gt;bonus: comment with HTML definition&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As you can see, it was elementary. That way they had mastery of HTML basics (i.e. the DOM) and could then grow to build something more sophisticated and aesthetically pleasing. With the second, they had to include the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;table&lt;/li&gt;&#xA;&lt;li&gt;link to external website&lt;/li&gt;&#xA;&lt;li&gt;button&lt;/li&gt;&#xA;&lt;li&gt;two divs (with div IDs)&lt;/li&gt;&#xA;&lt;li&gt;list&lt;/li&gt;&#xA;&lt;li&gt;heading&lt;/li&gt;&#xA;&lt;li&gt;paragraph&lt;/li&gt;&#xA;&lt;li&gt;three images&lt;/li&gt;&#xA;&lt;li&gt;text not left-aligned&lt;/li&gt;&#xA;&lt;li&gt;two fonts&lt;/li&gt;&#xA;&lt;li&gt;three colors&lt;/li&gt;&#xA;&lt;li&gt;additional HTML feature&lt;/li&gt;&#xA;&lt;li&gt;additional CSS feature&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Nowhere did I grade the subject matter of their sites. Rather, I focused on the skills they needed to demonstrate competency in and let them prove to me -- in whatever form they liked -- that they were indeed competent in them. That freedom, to me, made the difference in motivating students to want to complete this work.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-25T23:56:57.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="189" PostTypeId="2" ParentId="137" CreationDate="2017-05-26T01:27:09.057" Score="8" Body="&lt;p&gt;Sometimes you just want to group your bits 3 at a time instead of 4.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Octal groups 3 bits per digit. Hexadecimal groups 4 bits per digit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example Unix file permissions are written in octal because each group of 3 bits represents read, write and execute for either the user, group, or &quot;other people&quot;.  That is, the permissions 110110000 represent permissions &lt;code&gt;rw-rw---&lt;/code&gt; on the mask &lt;code&gt;rwxrwxrwx&lt;/code&gt; where the group of 3 maps to (user, group, other).  You can write it as 110110000, octal 660 or symbolically &lt;code&gt;ug=rw&lt;/code&gt;. 6 always means read, write, but not execute no matter what position it is in. The position always means who is affected. However writing it in hexadecimal would be useless: 1B0 doesn't visually indicate to the reader what the permissions are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In hardware systems grouping 3 bits at a time makes sense when many controllers each have 3 bits of value.  An octal number like 0123 means send 001 to the first controller, 010 to the second controller, and 011 to the third controller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Older computers were not 16-, 32-, or 64-bit but instead were often 9-bit or 36-bit.  In that case, octal makes more sense because each group of 3 bits was a digit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reading older code often requires knowing octal because older code uses octal for many of the reasons listed above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT --- and even with recent code, you may encounter problems as &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; january = 01;&#xA; february = 02;&#xA; ...               // disaster waiting to happen&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/221797/reasoning-behind-the-syntax-of-octal-notation-in-java&quot;&gt;https://softwareengineering.stackexchange.com/questions/221797/reasoning-behind-the-syntax-of-octal-notation-in-java&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="53" LastEditorUserId="2103" LastEditDate="2019-02-10T08:13:17.587" LastActivityDate="2019-02-10T08:13:17.587" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="190" PostTypeId="2" ParentId="180" CreationDate="2017-05-26T02:00:11.697" Score="8" Body="&lt;p&gt;To give another perspective, when teaching an intro to web development course it's very useful to teach things in a way similar to how they were discovered and contextualize the different concepts in history. It's easy to understand why HTML is a markup language rather than a full fledged language when you consider the time: The Web was used for serving plain text pages, and they wanted a little markup to make it nicer. HTML was born. When styling become larger than HTML could encompass, CSS was born. When interactions wanted to be built in, JS was born, etc. Otherwise you can get into extended discussions about why the front-end environment is the way it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In cryptography it's the same way. By following the history you can see the mistakes of those before you, and thus avoid those mistakes. Crypto is all about the cycle of making a new algorithm then having it broken, and the arms race that it causes. History illustrates common pieces of advise, like to avoid security by obscurity, and history also shows why perfect forward secrecy is needed. It shows the need for key exchange, and shows the relationship between unsolved math problems and crypto. All of these are great reasons to teach crypto in chronological order, from the oldest discoveries to the newest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would guess that this sense of parallels between the order in which things are invented and the order in which things are taught exists in other fields as well, and so teaching history along with the normal coursework could be very useful.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-26T02:08:24.960" LastActivityDate="2017-05-26T02:08:24.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="191" PostTypeId="2" ParentId="161" CreationDate="2017-05-26T02:22:14.353" Score="7" Body="&lt;p&gt;I had great success by teaching kids (8 to 11 years old) to set up their sites. First, plain HTML to understand how model maps to presentation; then CSS to see how boring stuff can be factored out; then javascript to make pages alive; then CGI to do magic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important parts were&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;immediate tangible reward: Hey look at my page!&lt;/li&gt;&#xA;&lt;li&gt;no big words (&lt;em&gt;object&lt;/em&gt; doesn't say much to a kid)&lt;/li&gt;&#xA;&lt;li&gt;all is done in a notepad, with the message that fancy tools are not really necessary&lt;/li&gt;&#xA;&lt;li&gt;toolchain is introduced pretty late, when a kid is ready&lt;/li&gt;&#xA;&lt;li&gt;CGI is a Creative Gentle Introduction to real programming, because they are already hooked, and want more&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course all of that happened in late 90es. Still I believe the strategy is sound even now.&lt;/p&gt;&#xA;" OwnerUserId="182" LastEditorUserId="182" LastEditDate="2017-05-26T02:29:40.620" LastActivityDate="2017-05-26T02:29:40.620" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="192" PostTypeId="5" CreationDate="2017-05-26T02:44:57.250" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-26T02:44:57.250" LastActivityDate="2017-05-26T02:44:57.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="193" PostTypeId="4" CreationDate="2017-05-26T02:44:57.250" Score="0" Body="For questions regarding front-end web development. This includes HTML, CSS, and Javascript in any of their iterations. This does not include Graphical User Interfaces of other varieties, only those rendered in a web browser. This also does not include user experience/Interaction and behavioral prediction as they apply to web development." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-26T18:24:26.203" LastActivityDate="2017-05-26T18:24:26.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="194" PostTypeId="5" CreationDate="2017-05-26T02:59:39.797" Score="0" Body="&lt;p&gt;The object oriented paradigm is the pattern of code reuse by using templates. These templates are called classes. From a template (class) an instance of the class can be created, which would be something that is a part of that class. For example, an instance of Dog would be a specific Dog, for example my pet Fido. Fido would be an instance of the Dog class. Here, Fido would be an object with the class Dog. Dog is not an object, it is a class which is a template for creating Dog objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, classes have inheritance. This is where the characteristics of one class can be passed on to another, or inherited by it. For example, a Dog class could inherit from an Animal class. Any animal has a species. This means that because Dog inherits from Animal, every Dog will also have a species. A dog may also have a breed. If Dog inherits from Animal, that doesn't mean that every Animal also has a breed. You could also construct a Rat class which inherits from the Animal class. That also would not have a breed, because it doesn't inherit from dog, but it would have a species because it inherits from Animal. The Rat class could have a property called tooth_length.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every class can have methods and properties. These are pretty much what they sound like. For the Dog class, it could have a few properties like breed, bark, name, owner, age, alive, and color. The Dog could also have methods, for example it could have a greet method where is will print it's name, owner and breed. It could have a birthday method which would increment it's age by 1. It could have a death method that would change alive to false.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every class must have an initialization method, also called a constructor, which is how an instance is created. The arguments to the initialization method are used to create all the initial properties of an instance. For example, when a dog it initialized, alive could be initialized to true while breed, age, and bark could be set through arguments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, the object oriented paradigm (OO) is about how different objects can be created as instances of classes, and how each class is made up of properties and methods.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-26T18:23:54.807" LastActivityDate="2017-05-26T18:23:54.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="195" PostTypeId="4" CreationDate="2017-05-26T02:59:39.797" Score="0" Body="For question regarding the teaching of the object oriented paradigm. This can also be used in conjunction with more specific tags such as inheritance and classes." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-26T18:24:36.160" LastActivityDate="2017-05-26T18:24:36.160" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="196" PostTypeId="5" CreationDate="2017-05-26T03:44:11.680" Score="0" Body="&lt;p&gt;In order to facilitate targeted discussion, good questions in this category would:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;have highly specific desired outcomes from the lesson&lt;/li&gt;&#xA;&lt;li&gt;provide detailed context about the background of the students&lt;/li&gt;&#xA;&lt;li&gt;detail the topic that that will be taught&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A lesson idea is a lesson plan or idea which details how to teach a lesson designed to teach students a specific coding paradigm, concept or skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lesson idea is the structuring of such a plan. A lesson plan details the course of instruction.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="2395" LastEditDate="2017-08-03T19:56:58.873" LastActivityDate="2017-08-03T19:56:58.873" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="197" PostTypeId="4" CreationDate="2017-05-26T03:44:11.680" Score="0" Body="Questions with this tag relate to planning lessons for a specific purpose, such as teaching some coding paradigm or skill. Planning lessons in Computer Science depends on the context and level of the students. If it is a lesson which introduces a new topic, the tag [introductory-lesson] may also be appropriate." OwnerUserId="150" LastEditorUserId="2" LastEditDate="2017-08-03T21:06:51.093" LastActivityDate="2017-08-03T21:06:51.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="198" PostTypeId="1" CreationDate="2017-05-26T04:23:47.207" Score="7" ViewCount="340" Body="&lt;p&gt;If we are to believe Daniel Pink, autonomy is one of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Drive:_The_Surprising_Truth_About_What_Motivates_Us&quot; rel=&quot;nofollow noreferrer&quot;&gt;fundamental aspects of motivation&lt;/a&gt;, so integrating student choice is extremely valuable if I want my students to remain highly engaged.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that at certain times (such as after the AP test in AP Computer Science), it is very nice to allow students to choose a project in a very open-ended way.  &lt;em&gt;Want to work in Unity?&lt;/em&gt;  Go for it.  &lt;em&gt;Want to create an Android app?&lt;/em&gt;  Perfect.  &lt;em&gt;Want to make an SMS-based game using Twilio?&lt;/em&gt;  No problems here.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you also occasionally make room for highly open-ended projects like this, how do you ensure that the lab time is not wasted?  I will place my answer below, but I am extremely interested in how others do this.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-20T20:39:21.000" LastActivityDate="2017-06-20T20:46:01.983" Title="How do you structure broad, open-ended, freely chosen projects so that students use class time wisely?" Tags="|labs|project|student-motivation|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="199" PostTypeId="2" ParentId="198" CreationDate="2017-05-26T04:23:47.207" Score="5" Body="&lt;p&gt;The first step is for the students to design their own projects.  I give them a timeframe, and make clear that they will be held accountable (within reason) for finishing the project.  I don't just accept the project proposals blindly - there is a negotiation here.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's an odd twist to this step, actually: I often have to persuade the students to lower their sights a little bit, because they often have a poor sense of how long their grand idea will actually take. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any changes after my approval, however, must run through me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every other Monday, the students and I negotiate/create biweekly mini-milestones.  They know how many weeks they have to complete the entire project, and they then tell me what they feel they can get done within a week.  It has to be highly specific (so that it can be evaluated), and both the students and I must feel that it would mark sufficient progress towards their overall project goal.  &lt;em&gt;(In my experience, I find that I simply accept their goals directly about 75% of the time, and in the remaining 25%, I have to steer students towards easier goals about as often as harder ones.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the actual evaluation takes place, if they have met the goal, then they only need to tell me what they intend to accomplish for the next week.  If they have not met their goal, then we have a more in-depth conversation to figure out how to recover so that the project still reaches completion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the mechanics of it.  A few interesting takeaways:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;One of the greatest joys of the entire enterprise is just getting a chance to ask them questions during the weekly check-ins.  I've personally never created a Chrome extention, a Unity game, a Flash game, or an iOS app, so getting to ask questions about the model code they've found, and the changes that they are making, teaches me quite a lot.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using this structure, I don't have to weight the final project itself as heavily as you might think.  If the mini-milestones are well-formed, then the projects almost always come out very well.  In the few instances where it does not, the mini-milestone structure has ensured good work throughout, and there is typically some external factor that got in the way.  The grading seems to be more fair this way.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-20T20:46:01.983" LastActivityDate="2017-06-20T20:46:01.983" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="200" PostTypeId="2" ParentId="198" CreationDate="2017-05-26T11:22:06.917" Score="2" Body="&lt;p&gt;The way I would do it is have two options, which branch out into whatever the student wants. That makes the choice easier for some students.&lt;/p&gt;&#xA;&lt;p&gt;For example, two options could be:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Your project should use networking (Sockets and so on, or access to internet for whichever reason) in whichever way you want. This can be a chat application with gui, a lan-based board game etc.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go wild. If you have an idea which might not fall into the previous category, then go for it. No limitations. However, the student should write documentation and eventually create a javadoc (if using java, but the idea is the documentation or API output, along with the code itself).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;A teacher\educator can replace the networking in the first option with anything, so long as they teach it. These two branch out, so the students develop self-learning and other skills.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-05-26T11:22:06.917" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="201" PostTypeId="1" CreationDate="2017-05-26T14:00:29.137" Score="16" ViewCount="1020" Body="&lt;p&gt;I'm sure we've all had this kind of conversation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Student:&lt;/strong&gt; Mr. Choirbean, my code is crashing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Teacher:&lt;/strong&gt; Okay, what error is it giving you when you crash?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Student:&lt;/strong&gt; Error message?  Was there one of those? I don't know what it said.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Teacher:&lt;/strong&gt; &lt;em&gt;(sighs)&lt;/em&gt; Okay, there's always an error message.  Let's run it again and see...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students who can find and fix their own bugs are empowered and more successful. So, how do you foster independence in your budding debuggers?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-26T17:48:54.923" LastActivityDate="2018-05-27T15:23:53.723" Title="Teaching students to hunt for and debug their own errors" Tags="|debugging|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="202" PostTypeId="2" ParentId="201" CreationDate="2017-05-26T14:12:02.193" Score="11" Body="&lt;p&gt;I was a Girls Who Code mentor this year. The exercises provided by GWC included &quot;debug this program&quot; activities on a regular basis, so students got used to reading and understanding error messages. By the end of the year, when they were doing their own project, they were quite competent at debugging.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-05-26T14:12:02.193" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="203" PostTypeId="1" AcceptedAnswerId="291" CreationDate="2017-05-26T15:04:19.167" Score="11" ViewCount="622" Body="&lt;p&gt;I have created a basic computer education project for an audience of elderly students (over 50 years old).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course is very basic, with lessons from &quot;How to turn on/off your home computer&quot; to &quot;Create your first e-mail&quot; to basic use of the Microsoft Office suite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the end of those classes, some students started to look for a more advanced course, covering topics such as programming. With them in mind, we were trying to define a basic CS/programming curriculum for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the challenges here is the students' expectations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;With a hands-on/bootcamp approach we can intimidate some of them who want the course just for curiosity and not to get a new career;&lt;/li&gt;&#xA;&lt;li&gt;On the other hand, a very theoretical course will not meet the expectations of these students who want a career change or something similar.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I know that is impossible meet everyone's expectations, but does anyone have any previous experience in the creation of a programming curriculum for an elderly audience? How can we balance the students' expectations?&lt;/p&gt;&#xA;" OwnerUserId="116" LastEditorUserId="1166" LastEditDate="2017-06-23T21:20:17.157" LastActivityDate="2017-06-23T21:20:17.157" Title="Programming curriculum for elderly students" Tags="|curriculum-design|adult-education|" AnswerCount="6" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="204" PostTypeId="2" ParentId="201" CreationDate="2017-05-26T15:30:21.473" Score="6" Body="&lt;p&gt;Because debugging can be learned very easily through experiance, I'd try and help the students self-correct when they make mistakes. When correcting mistakes, ask the students to type the corrections themselves, so that the corrections will be better ingrained in their minds. Also try to correct them by leading them through the debugging process. You can lead them through by asking questions, like &quot;What line does the error message refer to?&quot; &quot;What is that line supposed to do?&quot; etc. Eventually, they will start following the steps themselves, and will learn to do it without your help.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-26T15:51:12.617" LastActivityDate="2017-05-26T15:51:12.617" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="205" PostTypeId="2" ParentId="201" CreationDate="2017-05-26T16:13:19.623" Score="13" Body="&lt;p&gt;Debugging is more a craft, an art, than a science. That's where the pedagogical challenge lies.&lt;/p&gt;&#xA;&lt;p&gt;That said, here are a handful of tools/techniques I used to varying success:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Model the debugging process.&lt;/strong&gt; I would project sample working code, break that code, and talk through the error messages (and how to read them). Trying to instill the patience and thoroughness required is harder than explaining the actual errors.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Give students broken code...&lt;/strong&gt; One of the first review activities I did at the end of a unit involved having students correct broken code. Missing semi-colons, commas in for-loop declarations where semi-colons should be, misspelled function names, errant brackets. This is the opposite of the above, and students should work in both directions: &lt;em&gt;break working code; fix broken code.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;...to correct by hand.&lt;/strong&gt; This is where differentiation can shine. It might take reading printed code to recognize where there is a problem. Take time to fix errors off the screen in order to make them more recognizable on the screen.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Not all errors are created equal.&lt;/strong&gt; Just because a program runs doesn't mean it's free from bugs. This can be the most pernicious because everything appears to be correct on the surface. The &lt;a href=&quot;http://greenteapress.com/thinkjava6/html/thinkjava6018.html&quot; rel=&quot;noreferrer&quot;&gt;Debugging appendix of &lt;em&gt;Think Java&lt;/em&gt;&lt;/a&gt; is a great resource for this issue. Having students categorize errors into types further solidifies the understanding of bugs and how to eradicate them.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;When in doubt, print yourself a message.&lt;/strong&gt; While it can lead to messy code as debugging messages get commented out, I'd rather a student have messy, working code with signs of thoughtful debugging than clean code that is broken or incorrect vis-a-vis its spec.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In the end, students need to build their pattern recognition, and that comes with a lot of time and a lot of focused practice. There is also an inevitable connection among debugging skill, programming environment, and language. My students were better at C than Python when it came to fixing their programs. That's due to several factors: C being less forgiving, Python feeling simpler leading to carelessness, and the IDE trying to be helpful with errors as students wrote Python. In C, it took the compilation step to find an error whereas Python would identify warnings immediately, a &amp;quot;feature&amp;quot; that muddied the debugging process.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-05-26T16:13:19.623" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="206" PostTypeId="1" CreationDate="2017-05-26T17:42:51.670" Score="17" ViewCount="2762" Body="&lt;p&gt;One of my goals is to minimize homework.  My high school students are high performing, grade conscious, and constantly stressed out as it is.  Many of them fall into the &quot;Ivy League or bust&quot; camp, which is a tremendous amount of pressure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, when I give labs, I try to give sufficient class time that a majority of kids will be able to finish it with no more than a couple of hours of outside work.  That means that I provide lab periods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certain students have a lot of natural acuity for CS, and seem to finish labs &lt;em&gt;far&lt;/em&gt; faster than the rest of the group.  If I provide seven lab periods for a lab in AP Computer Science, I may reach my homework time target goals, but there will often be one kid who gets the lab done by the middle of the second period.  What strategies do you use to deal with these kids?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-11T14:58:43.070" LastActivityDate="2018-05-29T14:38:45.713" Title="Dealing with students who complete labs very quickly" Tags="|secondary-education|labs|best-practice|differentiation|" AnswerCount="12" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="207" PostTypeId="2" ParentId="206" CreationDate="2017-05-26T18:12:13.343" Score="21" Body="&lt;p&gt;I have 3 tiers of labs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First are the required labs. They're worth 100 points each and every one must do these. If they don't do one, it goes in the gradebook as a zero. These are also the labs that I think are the best of each topic for practicing what they need to work on. My calendar is based on how much time I expect 90 plus percent of the students need to finish this set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second and third tiers are bonus and challenge labs. They're worth 110 and 125 points respectively. If a student does these they go in the gradebook. If not, the grade is omitted so there's no penalty for not getting them done. These tend to be extensions of the required labs, but might be a little more difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally the students that are the fast finishers are also the ones that like doing the labs, so throwing a few more their direction will keep them working. Plus, it's an AP class so the 10 or 25 extra points on a lab grade will be a motivator. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a page with a &lt;a href=&quot;https://compsci.rocks/computer-science-enrichment-activities/&quot; rel=&quot;nofollow noreferrer&quot;&gt;list of websites&lt;/a&gt; they can go to if they're finished with all 3 sets of labs. It links out to sites like code.org, codecademy, Code Combat, and CodingBat. Sites that are related, but a little more fun than just cranking out labs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I'll also let students come up with independent projects to work on. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2017-08-23T23:13:15.640" LastActivityDate="2017-08-23T23:13:15.640" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="208" PostTypeId="2" ParentId="206" CreationDate="2017-05-26T19:27:09.310" Score="2" Body="&lt;p&gt;This answer primarily applies to the United States, but it should be useful for other countries as well, as the training pages from the USACO (United States of America Computing Olympiad) are accessible to anyone and also because other nations might have similiar programmes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the students are finished, ask them to participate in the &lt;a href=&quot;http://train.usaco.org/usacogate?a=Uzkuh3bk4Om&quot; rel=&quot;nofollow noreferrer&quot;&gt;online training program&lt;/a&gt; of the USACO. The disadvantage is that students already need to know C/C++/Java/Pascal (one of them) reasonably well, and they should also have some experience with algorithmic problem solving or have a lot of talent for it, since it doesn't start at the beginning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I think that a good result in one of the USACO contests (which is seperate from the training program, but the training program certainly helps to do well) should help to get into these universities, but I have no experience with that, so I can't be sure. I think the USACO contests/training are also less focused on math than ProjectEuler is. &lt;/p&gt;&#xA;" OwnerUserId="111" LastActivityDate="2017-05-26T19:27:09.310" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="209" PostTypeId="2" ParentId="27" CreationDate="2017-05-27T02:11:14.670" Score="3" Body="&lt;p&gt;CS50 AP -- the adaptation I teach for AP CS Principles -- has a lesson on the compilation process in C. The full scope of the lesson can be found &lt;a href=&quot;https://ap.cs50.net/curriculum/2/compiling/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the lesson provides a broad overview of the process, it does expose students to the steps needed to go from source code to assembly code to machine code. As a result it makes understanding assembly relevant. It could very easily be used as a stand-alone lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The programming challenge for this lesson -- &lt;a href=&quot;http://docs.cs50.net/2016/ap/problems/reverse/reverse.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Reverse Engineer&lt;/a&gt; -- focuses on the very basics of understanding assembly and tasks students with translating assembly instructions into a small C program. It's certainly not a full unit, but something of this scope does give a good introduction to assembly and allows it to be a reference point as the class progresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the intro level this is probably the right amount of assembly to use: just enough to make them aware of it (and to motivate further study) but not too much that it creates more confusion than understanding.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-27T02:11:14.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="210" PostTypeId="2" ParentId="203" CreationDate="2017-05-27T06:47:43.700" Score="2" Body="&lt;p&gt;Age in itself may not be the significant characteristic. For example, it is common for our undergraduate computer science classes to include students over age 50 as they constitute part of our demographic (in which the average age of undergraduates is 23 years).  Perhaps key issues are student background and preparedness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might consider approaches successfully used for &quot;broadening participation&quot; in computer science, regardless of the age group to which they were initially applied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of the kinds of resources that might be applicable include &lt;a href=&quot;http://www.exploringcs.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Exploring Computer Science&lt;/a&gt; and &lt;a href=&quot;http://csunplugged.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="128" LastActivityDate="2017-05-27T06:47:43.700" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="211" PostTypeId="1" CreationDate="2017-05-27T07:32:59.593" Score="12" ViewCount="758" Body="&lt;p&gt;One of the most challenging concepts to instill in new CS students is 0-indexing (indeed, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/213/real-life-examples-of-0-indexing&quot;&gt;the pedagogy of this fact probably merits its own discussion&lt;/a&gt;). Another difficult topic -- although a slightly more advanced one -- is pointers. (I'm thinking particularly of programming in C.) With this question I'm wondering if part of the difficulty is the syntactic sugar in C that allows the following to be equivalent:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// declare array of 5 ints on the stack&#xA;int num[5];&#xA;&#xA;// use array notation to change first element&#xA;num[0] = 42;&#xA;&#xA;// use pointer arithmetic to change first element&#xA;*(num + 0) = 42;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;With array notation, we are explicit with 0-indexing, but the logic of it isn't apparent. Yet, with pointer arithmetic, it's more clear (I think...) why we use 0: the pointer stores the base address, so dereferencing the pointer brings us to that address which is where the array logically begins.&lt;/p&gt;&#xA;&lt;p&gt;Comfort with this leads to the topic of memory management on the heap with something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// declare array of 5 ints on the heap&#xA;int *num = malloc(sizeof(int) * 5);&#xA;&#xA;// use pointer arithmetic to change first element&#xA;*num = 42;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I am toying with expanding my introduction on arrays next year to include this particular use of pointers. I recognize that it would involve taking roughly a single lesson on arrays and expanding to something closer to a week-long series to tie all of these ideas together.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;However, is it worth putting aside the syntactic sugar in order to understand more accurately the indexing of arrays? On the other hand, does the introduction of pointers and memory complicate the process so much so that confusion about arrays will increase rather than decrease?&lt;/strong&gt; (I'm thinking this is a &amp;quot;lesson idea feedback&amp;quot; discussion.)&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2021-06-02T05:24:51.830" LastActivityDate="2021-06-02T05:24:51.830" Title="Lesson Idea: Arrays, Pointers, and Syntactic Sugar" Tags="|lesson-ideas|arrays|c|syntax|abstraction|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="212" PostTypeId="1" CreationDate="2017-05-27T07:39:27.567" Score="12" ViewCount="554" Body="&lt;p&gt;When structuring a Computer Science curriculum, which prepares students most effectively for a career in technology today? Consider the following scenarios over a student's college career:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Starting with low level languages like ASM and C, working toward higher level (i.e. more forgiving) languages like Java, Python, etc.&lt;/li&gt;&#xA;&lt;li&gt;Starting with higher level languages and then diving deeper into lower level ones.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="215" LastEditorUserId="215" LastEditDate="2017-05-27T16:50:28.480" LastActivityDate="2018-05-27T14:10:45.777" Title="Is it more effective to teach low level languages before high level ones or vice versa?" Tags="|curriculum-design|" AnswerCount="6" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="213" PostTypeId="1" CreationDate="2017-05-27T07:40:34.477" Score="45" ViewCount="4672" Body="&lt;p&gt;It can be perplexing for students to begin counting at 0 when they enter a CS class. I made it a point over and over to talk about &quot;Day 0&quot; and &quot;Week 0&quot; in the opening days and weeks just to build familiarity with the idea. Even so, I sought when explaining this idea to ground it in some real-life/non-CS example where we as humans use 0-indexing naturally and possibly without knowing it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: &lt;strong&gt;where can we find 0-indexing outside of CS and grounded in everyday human experience?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll share the one example I can think of below (&lt;a href=&quot;https://stackoverflow.blog/2011/07/01/its-ok-to-ask-and-answer-your-own-questions/&quot;&gt;Q&amp;amp;A style&lt;/a&gt;), but I'd love to hear more, potentially better, examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[Note: This question relates to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/211/lesson-idea-arrays-pointers-and-syntactic-sugar&quot;&gt;another I just posed&lt;/a&gt;.]&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-07-15T18:12:17.727" LastActivityDate="2022-05-29T18:06:22.103" Title="Real life examples of 0-indexing" Tags="|lesson-ideas|arrays|abstraction|" AnswerCount="21" CommentCount="16" ContentLicense="CC BY-SA 3.0" />
  <row Id="214" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T07:40:34.477" Score="44" Body="&lt;p&gt;Ages in the United States (&lt;a href=&quot;https://en.wikipedia.org/wiki/East_Asian_age_reckoning&quot; rel=&quot;noreferrer&quot;&gt;it's not the same around the world&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first year of life, children are 0 years old. Only after completion of a year is the age changed to 1. By this logic, a child in his/her second year of life is 1 just as the second element of an array is found at index 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: another example is the counting of centuries. An event occurring in the 100s would be in the second century.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit #2&lt;/strong&gt;: watching the Champions League Final, I just thought of another: the timing of soccer. A goal scored during the 20th minute is scored while 19:xx is on the clock.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-03T19:15:34.200" LastActivityDate="2017-06-03T19:15:34.200" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="215" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T09:32:56.477" Score="37" Body="&lt;p&gt;An analogy that will work well in Europe, but not in North America:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://commons.wikimedia.org/wiki/File:Internal_lift_control_panel.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Internal_lift_control_panel.jpg/320px-Internal_lift_control_panel.jpg&quot; alt=&quot;Lift Control Panel&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Image licensed under the CC BY-SA 3.0 by &lt;a href=&quot;https://commons.wikimedia.org/wiki/User:Bidgee&quot; rel=&quot;noreferrer&quot;&gt;Bidgee&lt;/a&gt; of Wikimedia Commons.&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Floors (in European countries) are typically numbered with 0 (or G) as the ground floor, then 1 as the first floor above ground, etc. This could easily be compared to a list/array of floors, with &lt;code&gt;floors[0]&lt;/code&gt; being ground, &lt;code&gt;floors[1]&lt;/code&gt; being the first floor, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this analogy won't work particularly well in North American countries, as their convention is to number the ground floor as 1. Nevertheless, the visual element of a building and lift numbered from zero could serve as an intriguing example to illustrate zero-based indexing.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-05-27T09:32:56.477" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="216" PostTypeId="2" ParentId="212" CreationDate="2017-05-27T09:49:15.997" Score="4" Body="&lt;p&gt;Well, straight-forward: It depends:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If the low level language you are thinking about teaching has complex code paradigms and is very abstract, then teaching it first would not be a good idea. &lt;/li&gt;&#xA;&lt;li&gt;However, if your low level language is one that caused newer, high level language to be created, then teaching the low level language can aid the students in understanding some core concepts of the newer language. They might be able to spot those concepts in other languages, too (making a sentence like &quot;oh, just like in &lt;code&gt;&amp;lt;insert low level name here&amp;gt;&lt;/code&gt;!&quot; quite common)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Personally, if I faced a low level language like the one described in &lt;code&gt;2&lt;/code&gt;, I would only teach a few things. The students needn't be &quot;fluent&quot; in the low level language, as it isn't widely used in the &quot;career market&quot;. I am not quite sure how widely C is used, but I am pretty sure that it is used less than C# or java (and certainly less than python).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in essence, knowing the main ideas of the low level languages &lt;em&gt;can&lt;/em&gt; be useful, but it is less important and useful than knowing high level languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for a foundation for building knowledge, it goes back to teaching the main ideas of low level languages (rather than teaching the entire language), and then teaching the high level languages. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-05-27T17:18:03.117" LastActivityDate="2017-05-27T17:18:03.117" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="217" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T10:15:27.293" Score="1" Body="&lt;h2&gt;An example from thermodynamics: the study of heat and temperature.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In thermodynamics there are 4 laws, numbered from zero. Look to see when your pupils study this in physics (science). You now have cross curricular linking, which is also good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like Asimov's 0th law of robotics, the zeroth low of thermodynamics was added after the other 3: “The zeroth law was not initially recognized as a law, as its basis in thermodynamical equilibrium was implied in the other laws. The first, second, and third laws had been explicitly stated prior and found common acceptance in the physics community. Once the importance of the zeroth law for the definition of temperature was realized, it was impracticable to renumber the other laws, hence it was numbered the zeroth law.” — &lt;a href=&quot;https://en.wikipedia.org/wiki/Thermodynamics#Laws_of_thermodynamics&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Thermodynamics#Laws_of_thermodynamics&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;&lt;p&gt;Zeroth law of thermodynamics: If two systems are in thermal equilibrium with a third system, they are in thermal equilibrium with&#xA;  each other. This law helps define the notion of temperature.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;First law of thermodynamics: When energy passes, as work, as heat, or with matter, into or out from a system, the system's internal&#xA;  energy changes in accord with the law of conservation of energy.&#xA;  Equivalently, perpetual motion machines of the first kind are&#xA;  impossible.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;Second law of thermodynamics: In a natural thermodynamic process, the sum of the entropies of the interacting thermodynamic systems&#xA;  increases. Equivalently, perpetual motion machines of the second kind&#xA;  are impossible.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;Third law of thermodynamics: The entropy of a system approaches a constant value as the temperature approaches absolute zero. With the&#xA;  exception of non-crystalline solids (glasses) the entropy of a system&#xA;  at absolute zero is typically close to zero, and is equal to the&#xA;  logarithm of the product of the quantum ground states.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Extract from &lt;a href=&quot;https://en.wikipedia.org/wiki/Laws_of_thermodynamics&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Laws_of_thermodynamics&lt;/a&gt;&#xA;Text is available under the Creative Commons Attribution-ShareAlike License&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-05-28T08:45:43.193" LastActivityDate="2017-05-28T08:45:43.193" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="219" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T10:23:25.643" Score="1" Body="&lt;p&gt;This one in related to computing, but sufficiently different, as it related to the social side. You can link it in by teaching the social side before indexing.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;The freedom to run the program as you wish, for any purpose (freedom 0).&lt;/li&gt;&#xA;  &lt;li&gt;The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a&#xA;  precondition for this.&lt;/li&gt;&#xA;  &lt;li&gt;The freedom to redistribute copies so you can help your neighbour (freedom 2).&lt;/li&gt;&#xA;  &lt;li&gt;The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance&#xA;  to benefit from your changes. Access to the source code is a&#xA;  precondition for this.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Extract from &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.gnu.org/philosophy/free-sw.en.html&lt;/a&gt; (Creative Commons Attribution-NoDerivatives 4.0 International License).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-05-28T08:47:58.413" LastActivityDate="2017-05-28T08:47:58.413" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="220" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T10:48:23.780" Score="2" Body="&lt;p&gt;For anyone old enough (&amp;gt;30years):&lt;/p&gt;&#xA;&lt;p&gt;In the UK a few years back we had only a few TV channels, first 1, then 2, they slowly increased to 5: BBC1, BBC2, ITV, channel 4, and eventually channel 5 The TVs typically had 10 numbered slots (sometimes 8). We would but the channels into the slots 1 = BBC1, 2 =  BBC2, 3 = ITV, 4 = channel-4, 5 = channel-5. So where to but the video recorder ( a device to record TV shows for later viewing). If we use slot 6 and the TV companies finally add a 6th channel, then we will have to move it, so if the TV has a slot zero, then we put it in slot there.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Eventually we suddenly got a load more, with digital TV (Freeview).&#xA;This story ignores, payed for channels (satellite and cable).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2022-05-29T17:43:49.670" LastActivityDate="2022-05-29T17:43:49.670" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="221" PostTypeId="2" ParentId="212" CreationDate="2017-05-27T10:55:14.257" Score="3" Body="&lt;p&gt;Similar to Itamar Green's answer, if I designed a course this way, I would only focus on one or two tasks in the lower level language.  But even so, I might avoid this approach for introductory students.  There is a beautiful course on Coursera that takes this approach called &lt;a href=&quot;https://www.coursera.org/learn/build-a-computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nand to Tetris&lt;/a&gt;.  It is deservedly well-reviewed, but it is not appropriate for total newbies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that, at least for introductory students, lower-level languages often require you to have a fair amount of rather abstract knowledge about how numbers and memory work.  Taking 'C' as en example, we might add two positive numbers and get the correct answer (yay!), a negative number (integer overflow), or a &lt;em&gt;smaller&lt;/em&gt; positive number (truncation).  These are all important issues worthy of discussion in a broader CS curriculum, but are highly technical for students who haven't necessarily mastered the oddly-ordered format of a &lt;strong&gt;for&lt;/strong&gt; loop yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course, when you do get to loops, since they're beginners, they'll make infinite loops.  And when you do that, you might well try to write outside of your allocated memory area, and you wind up with the infamous &lt;code&gt;Segfault&lt;/code&gt;, which is both very unhelpful for beginners (who &lt;a href=&quot;https://cseducators.stackexchange.com/questions/201/teaching-students-to-hunt-for-and-debug-their-own-errors&quot;&gt;already aren't great&lt;/a&gt; at reading error messages), and sometimes feels like the only damned error you ever get while writing in C.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-27T16:18:21.657" LastActivityDate="2017-05-27T16:18:21.657" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="222" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T10:59:44.757" Score="24" Body="&lt;h1&gt;The clock (24 hours system)&lt;/h1&gt;&#xA;&lt;p&gt;If we look at the clock, we have two examples of counting hours. The 24 hour system starts at 0. The 12 hour system is interesting, neither starting at 0 or 1.&lt;/p&gt;&#xA;&lt;h2&gt;The 12-hour clock&lt;/h2&gt;&#xA;&lt;p&gt;In the 12-hour clock system we start at 12 and make our way up to 11.&lt;/p&gt;&#xA;&lt;p&gt;This needs some explanation. The 12 hour clock has a funny way of counting, that you may not have noticed. It goes &lt;code&gt;12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11&lt;/code&gt;. (look carefully at a clock that has AM and PM indicators. Without these, then it is just a regular circular (mod 12) counting system.) &lt;code&gt;12am, 1am, 2am, 3am, 4am, 5am, 6am, 7am, 8am, 9am, 10am, 11am 12pm, 1pm, 2pm, 3pm, 4pm, 5pm, 6pm, 7pm, 8pm, 9pm, 10pm, 11pm&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h1&gt;The 24-hour clock:&lt;/h1&gt;&#xA;&lt;p&gt;In the 24-hour clock things are simpler. Numbers just go up, until we get to the end of the day (mod 24). However we start with zero, this may be to keep it backward compatible with the 12-hour system, but also makes the time of day, be the elapsed time since the start of the day (see other answers that stat that starting at zero is just how you measure things).&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$00\colon{}00\colon{}00$&lt;/span&gt; → &lt;span class=&quot;math-container&quot;&gt;$23\colon{}59\colon{}59.99\dot9$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note I have finally found an advantage of daylight shifting time. In the summer noon is at 13:00, and midnight at 1-oclock. This makes the 12hour system start at 1: i.e 1, 2, 3 … 11, 12; (instead of 12, 1, 2, 3 … 11). However AM and PM are now wrong, as the meridian does not move.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-08-30T13:50:22.673" LastActivityDate="2020-08-30T13:50:22.673" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="223" PostTypeId="2" ParentId="201" CreationDate="2017-05-27T11:07:49.330" Score="1" Body="&lt;p&gt;Making mistakes causes your brain to grow, see &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also explain that the error messages are there to help you, some one put in effort to get the computer to do that. They can not fix it for you (they do not know what you want it to do), but they can try to help you see what is wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often when a pupil calls me over for help. They will, as I arrive clear the error message. Some times they even close the program (thus loosing all of there work).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the problem stems from calling error messages “Errors”. Pupils (and often experienced programmers), then try instead of minimising errors, to minimise error messages. This is achieved, by ignoring them, deleting them, choosing techniques and languages that minimise them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need therefore to embrace error messages. And as my first point says embrace errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let you pupils see you make mistakes (don't prepare everything up front), let them see how you deal with them.  &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-05-27T11:14:44.797" LastActivityDate="2017-05-27T11:14:44.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="224" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T11:08:20.380" Score="48" Body="&lt;p&gt;You can get at this concept very intuitively in strings before you ever get to arrays.  Take a string like &quot;hello world&quot; and ask them a subtle-sounding point: does the string begin here: &lt;code&gt;&quot;*hello world&quot;&lt;/code&gt;, or here: &lt;code&gt;&quot;h*ello world&quot;&lt;/code&gt;.  They'll certainly be able to identify the correct answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then ask, &lt;em&gt;&quot;how far from the start of the string do we have to go to get to the 'h'?  Answer in a number of characters. Do we have to move 5 characters away? 3? 1?&quot;&lt;/em&gt;  Again, they should be able to identify 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, it's time for the big reveal.  (My description here is in Java)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;When I want to get at that first character, &lt;code&gt;h&lt;/code&gt;, I do it with &lt;code&gt;myString.charAt(0)&lt;/code&gt;.  Given what we just discussed, why do you think I would use &lt;code&gt;0&lt;/code&gt;, and not &lt;code&gt;1&lt;/code&gt;?&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, they will naturally move to the idea that it is at the beginning, and that we have moved no steps from the beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;Excellent.  This is an example of an&lt;/em&gt; &lt;strong&gt;&lt;em&gt;index value.&lt;/em&gt;&lt;/strong&gt;  &lt;em&gt;And, in Java, when we do index values, we don't count from '1', we actually count the DISTANCE from the start.  So, if we want the first character, we move no distance.  And how far do we move to get the 3rd character? ...&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you later get to arrays, you can remind them of the concept, and just say that it is being used again here.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-15T15:37:37.950" LastActivityDate="2017-06-15T15:37:37.950" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="225" PostTypeId="2" ParentId="211" CreationDate="2017-05-27T11:17:12.100" Score="10" Body="&lt;p&gt;This is a &lt;em&gt;great&lt;/em&gt; explanation of why 0-indexing exists. As someone who barely knows what a pointer is, your explanation made perfect sense. If you wanted to dumb it down a little you could phrase it as:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When you create an array, the variable you assign that array to is actually a pointer to the first element. Lets create an array &lt;code&gt;num&lt;/code&gt;. When you want to modify the array, to get a pointer to the first element you want to add 0 to &lt;code&gt;num&lt;/code&gt;, because &lt;code&gt;num&lt;/code&gt; points to the first element. For the second element, you add 1 to &lt;code&gt;num&lt;/code&gt; because &lt;code&gt;num&lt;/code&gt; is a pointer to the first element and the second is one after the first. Then for the third element, you add 2 to `num, and so on, so that the first is adding 0, the second is adding 1, and the third is adding 2.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A useful resource is &lt;a href=&quot;https://web.archive.org/web/20171112035729/https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/pointer.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this website&lt;/a&gt; which explains how &lt;code&gt;num[i]&lt;/code&gt; is syntactic sugar for pointer arithmetic (&lt;code&gt;*(num+i)&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that this discussion will increase clarity and be very useful because it makes sense as a logical way to implement arrays and revels a cool thing about the language. I'm not sure that you have to talk about memory, but talking about pointers is certainly worthwhile for this example.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="104" LastEditDate="2018-05-29T16:32:10.717" LastActivityDate="2018-05-29T16:32:10.717" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="226" PostTypeId="1" AcceptedAnswerId="227" CreationDate="2017-05-27T11:36:21.047" Score="4" ViewCount="112" Body="&lt;p&gt;In Ruby, the vast majority of usage is in web backends, 99% of the time with a framework called Ruby on Rails. My problem with rails is that it is full of &quot;magic,&quot; wherein you type a command, and suddenly 100 LoC are written for you, or where magic methods make forms for you that include both your JS and CSS. There is another framework called Sinatra which is much closer to the reality of what is happening. I really like that it doesn't have very much &quot;magic,&quot; but it also isn't used very much in the real world. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which would be a better choice for introducing students to Ruby backend web development?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="27" LastEditDate="2017-05-28T02:33:19.327" LastActivityDate="2017-05-28T02:33:19.327" Title="Ruby backend framework choice: Ruby on Rails vs Sinatra" Tags="|language-choice|curriculum-design|ruby|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="227" PostTypeId="2" ParentId="226" CreationDate="2017-05-27T11:56:04.413" Score="3" Body="&lt;p&gt;Personally, I'd introduce &lt;a href=&quot;https://github.com/sinatra/sinatra&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sinatra&lt;/a&gt; first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which one of these is going to be easier to explain? Sinatra's &quot;Hello World&quot; example...&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;require 'sinatra'&#xA;&#xA;get '/' do&#xA;  'Hello world!'&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or &lt;a href=&quot;http://guides.rubyonrails.org/getting_started.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;all the boilerplate that Rails generates&lt;/a&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ rails new commandsapp&#xA; create&#xA; create  README.md&#xA; create  Rakefile&#xA; create  config.ru&#xA; create  .gitignore&#xA; create  Gemfile&#xA; create  app&#xA; ...&#xA; create  tmp/cache&#xA; ...&#xA;    run  bundle install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(and that's just from the script that generates everything!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would imagine that Rails would feel a little bit overwhelming for a beginner to web development. It brings a lot of baggage with it, like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot; rel=&quot;nofollow noreferrer&quot;&gt;MVC pattern&lt;/a&gt; and a lot of handy generators that are useful &lt;em&gt;to experienced developers&lt;/em&gt;, but hide the logic to a learner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems logical to me to teach using Sinatra first, and then &lt;em&gt;let your students realise&lt;/em&gt; what the problems are. They'll be more inclined to go through the process of learning Rails, with all the extra boilerplate involved, if they see &lt;em&gt;why&lt;/em&gt; using an opinionated MVC framework is useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For trivial backend applications, like you'll probably be developing at first, RoR is overkill, and there are too many concepts that you'd have to teach before actually getting to make anything. I'm a fan of teaching from the basics in this case—showing why each additional layer of libraries and frameworks is needed is far more valuable thank saving some time by skipping Sinatra. And, of course, the motivation to &lt;em&gt;make something&lt;/em&gt; can be more easily satisfied by starting with Sinatra, and you can later introduce the 'batteries included' framework of Rails.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-05-27T11:56:04.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="228" PostTypeId="1" AcceptedAnswerId="243" CreationDate="2017-05-27T12:03:27.483" Score="10" ViewCount="343" Body="&lt;p&gt;As is often the case, there is usually more than one way to approach a problem or task. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, my students use what they were taught in the lessons (which is expected). When they stumble upon a problem (e.g. a project that has parts that they are unsure how to approach) they very often get stuck. This is because they haven't been taught some specific thing that is related.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the students to be more independent in their learning, and to look for that other approach on their own. How can I structure a lesson that would foster independence and give the students the ability to look for a new approach when needed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students' level is somewhat advanced high school level. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="27" LastEditDate="2017-05-30T16:54:14.393" LastActivityDate="2017-07-19T15:45:52.587" Title="Encourage students to be independent" Tags="|lesson-ideas|curriculum-design|" AnswerCount="6" CommentCount="8" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="229" PostTypeId="2" ParentId="203" CreationDate="2017-05-27T12:38:20.123" Score="1" Body="&lt;p&gt;As mentioned before age is generally speaking not significant for this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that the safest bet is an hands-on/bootcamp approach, since a very theoretical course may just scare away both people who take the course just for curiosity and those who want a career change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think one of the key aspects here is which programming languages and tools you decide to use.&lt;/p&gt;&#xA;" OwnerUserId="118" LastEditorUserId="76" LastEditDate="2017-05-27T18:28:49.843" LastActivityDate="2017-05-27T18:28:49.843" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="230" PostTypeId="2" ParentId="185" CreationDate="2017-05-27T12:52:20.003" Score="7" Body="&lt;p&gt;Logic is a tool for distinguishing true and false statements. If a statement is proved, then it is true. If its negation is proved, then it is false. Hence the core skill is checking whether a proof is correct and finding/inventing a proof of a statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prolog is based on a subset of logic. A Prolog implementation finds proofs automatically. IMHO, anybody should learn how to find proofs by hand and have a bit of practice before using any automatic prover. Prolog is so weak that it can't find even simple theorems that are of interest, like theorems of Peano's Arithmetic. Moderately complex statements, like the axiom of induction, can't even be expressed in Prolog. No wonder that&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I tried to use this IBM's NLP as an example, but this pattern matching&#xA;  exercise does not covers much concepts from mathematical logic.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Prolog surely is an example application of logic, but it is too weak to show what mathematical logic is. A proof assistant is a better way. Prolog is not the only application of logic. Other options are reasoning about programs, hardware, and computer systems, proof assistants and provers, and Artificial Intelligence.&lt;/p&gt;&#xA;" OwnerUserId="160" LastEditorUserId="160" LastEditDate="2017-05-27T16:29:39.647" LastActivityDate="2017-05-27T16:29:39.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="231" PostTypeId="2" ParentId="213" CreationDate="2017-05-27T12:58:03.413" Score="11" Body="&lt;p&gt;I don't see &lt;strong&gt;anything&lt;/strong&gt; confusing in 0-based indexing. In fact, it seems that 0-based indexing is not less natural for humans than 1-based indexing. Humans use 1-based indexing just because of following some long-standing, but weird tradition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember that when I was a pre-school child (&amp;lt;7 years old) and has not been yet influenced by social traditions of numbering (I didn't visit a kindergarten), I used a &lt;strong&gt;mixed numbering scheme&lt;/strong&gt;. For example, when we had in our house a lot of guests sitting around a table, and I was crawling under the table, plotting some childish prank — and I needed to make an association between torsos (I see above the table when I'm out of under-the-table area) and pairs of legs (I see when I'm under the table); I don't remember what prank I was planning, but I strongly remember that to remember a position of a victim-guest, I used scheme like &quot;&lt;strong&gt;three+one&lt;/strong&gt;&quot;:&lt;br&gt;&#xA;&lt;img src=&quot;https://i.stack.imgur.com/FaMoz.png&quot; alt=&quot;&amp;quot;three+one&amp;quot; numbering&quot;&gt; &lt;sup&gt;(picture based on &lt;a href=&quot;//thenounproject.com/icon/880687/&quot; rel=&quot;noreferrer&quot;&gt;&quot;Break&quot; by Llisole&lt;/a&gt; (&lt;a href=&quot;//creativecommons.org/licenses/by/3.0/us/&quot; rel=&quot;noreferrer&quot;&gt;cc&lt;/a&gt;))&lt;/sup&gt;&lt;br&gt;&#xA;I.e. neither referring this guest as third, nor referring him as fourth was not enough intuitive for me. Indeed: &quot;three&quot; is a number of guests &lt;em&gt;before&lt;/em&gt; him — not his position; &quot;four&quot; is a number of guests &lt;em&gt;including&lt;/em&gt; him — not his position; probably, if I knew fractional numbers at that time, I'd referred him as &quot;3½-th&quot;, but I didn't.&lt;br&gt;&#xA;&lt;sub&gt;I remembered this episode well, because when I was running to another room to take equipment needed for prank, muttering &quot;three plus one&quot; to myself aloud (not to forget it), the same age girl who was one of guests shouted &quot;four&quot; — which annoyed me very much (&quot;f@#k, I know how to add much larger numbers, but '3+1' is a position specification rather than just sum&quot;).&lt;/sub&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;0-based stuff is preferrable everywhere, where &lt;strong&gt;gauges&lt;/strong&gt; are used. You start time from zero (you say &quot;0 hours&quot; at midnight, not &quot;1 hour&quot;; &quot;0 minutes&quot; when a new hour starts, not &quot;1 minute&quot;; &quot;0 seconds&quot; when a new minute starts, not &quot;1 second&quot;), temperature from zero, distance from zero, etc. What really confuses is actual discrepancy between 0-based and 1-based, not the 0-based itself; for example, I needed some time at school to realize why people usually call it &quot;&lt;em&gt;&amp;lt;N+1&gt;&lt;/em&gt;-th second&quot; (&quot;minute&quot;, &quot;hour&quot;, etc) when it's still &quot;0:00:&lt;em&gt;&amp;lt;N&gt;&lt;/em&gt;&quot; on stopwatch:&lt;br&gt;&#xA;&lt;img src=&quot;https://i.stack.imgur.com/klYpB.png&quot; alt=&quot;Time scale: time range from 0:00:&amp;lt;N&amp;gt; to 0:00:&amp;lt;N+1&amp;gt; is usually called as &amp;lt;N+1&amp;gt;-th second&quot;&gt;&lt;br&gt;&#xA;&lt;sub&gt;IMHO: Nothing would break if some day people will finally switch to 0-based indexing; even vice versa, it would become much more intuitive and comfortable — a stopwatch shows &quot;0:00:&lt;em&gt;&amp;lt;N&gt;&lt;/em&gt;&quot;, so let's call it &quot;&lt;em&gt;&amp;lt;N&gt;&lt;/em&gt;-th second&quot; (not &quot;&lt;em&gt;&amp;lt;N+1&gt;&lt;/em&gt;-th&quot;); but some-why people had chosen this weird way of 1-based indexing long ago.&lt;/sub&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR: In 0-based indexing we count items &lt;em&gt;before (up to, but excluding)&lt;/em&gt; current; in 1-based indexing we count items &lt;em&gt;through (up to and including)&lt;/em&gt; current. Neither way is in fact intuitive (for a child that has free choice). Both ways need to be learned.&lt;/p&gt;&#xA;" OwnerUserId="216" LastEditorUserId="216" LastEditDate="2017-05-27T14:42:45.387" LastActivityDate="2017-05-27T14:42:45.387" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="232" PostTypeId="2" ParentId="211" CreationDate="2017-05-27T13:37:06.623" Score="11" Body="&lt;p&gt;You overestimate the complexity of 0-based indexing a lot. &lt;a href=&quot;//cseducators.stackexchange.com/a/231/216&quot;&gt;There is nothing complex in 0-based indexing&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;On the other side, the topic of the pointers is relatively complex. I don't think it has any sense to introduce pointers earlier, than at the time when a pupil would be ready to fully feel their usefulness and use them in practice. Especially in languages like C, where the syntax of pointers is quite weird (I mean: it was a quite illogical decision for language creators to use the same syntax for arrays and pointers; as they actually have almost nothing in common: an array is usually a large-sized object containing one or more items of a specific type, a pointer is a tiny-sized object that doesn't contain even a single item, it contains only the address; pointers to items and &lt;em&gt;pointers to arrays&lt;/em&gt; should have some convergence, but pointers to items and &lt;em&gt;arrays&lt;/em&gt; — no more than, for example, a pointer to the item of a specified type and &lt;em&gt;a structure whose first member is of specified type&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="216" LastEditorUserId="216" LastEditDate="2021-05-26T03:56:34.497" LastActivityDate="2021-05-26T03:56:34.497" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="233" PostTypeId="2" ParentId="161" CreationDate="2017-05-27T14:26:52.613" Score="6" Body="&lt;p&gt;A variant of the Racket programming language with the DrRacket IDE is used in the &lt;a href=&quot;https://www.edx.org/course/how-code-simple-data-ubcx-htc1x#!&quot; rel=&quot;noreferrer&quot;&gt;course &quot;How to Code&quot;&lt;/a&gt; by Gregor Kiczales.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;Object oriented (ComLogo is funny, but has nothing to do with today's actual programming).&quot; The object-oriented paradigm is not stressed in the course. &quot;Actual programming&quot; kind of conflicts with &quot;learning programming&quot;.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Good IDE (intellisense and built-in help).&quot; DrRacket has built-in help, syntax highlighting, variable binding highlighting, automatic indentation.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Simple IDE with preferably a &quot;Run&quot; button.&quot; Yes.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Should be visual (command line will never be too appealing to kids).&quot; I guess you mean that programming problems should be about graphics. There is a graphics library, and the first problem is to combine a picture from geometric primitives.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Should be free of language oddities and paradoxes (this is where most actual programming languages fail IMO).&quot; I don't understand this.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Should require variable declaration.&quot; Every variable should be bound somewhere in the code, of course. The type is not declared. Racket has dynamic type system.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Should be memory safe.&quot; Yes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="160" LastActivityDate="2017-05-27T14:26:52.613" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="235" PostTypeId="1" CreationDate="2017-05-27T17:45:53.660" Score="6" ViewCount="175" Body="&lt;p&gt;I have student who is attempting an independent study next year in audio processing. Her goals involve detecting the meter of a song. Thus could be done through machine learning, or through other forms of AI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While she will eventually be creating a science fair project, she has asked for advice on what to study over the summer in order to make the most of next year. I have no experience in this realm. I know that she had not yet taken AP Statistics, but I also don't know how much statistical knowledge is really necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As some context, she is a rising high school junior who has already taken AP Computer Science, and a course on C and Assembly Programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone advise on how I can guide her?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-27T17:52:46.050" LastActivityDate="2017-06-24T11:25:48.710" Title="Self guided learning about audio processing" Tags="|curriculum-design|artificial-intelligence|self-learning|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="236" PostTypeId="2" ParentId="228" CreationDate="2017-05-27T17:53:45.590" Score="3" Body="&lt;p&gt;I think it's hugely beneficial to &lt;strong&gt;create projects that require use of a certain language or technology&lt;/strong&gt;, or in other words, don't leave students to their own devices to solve a problem. As a student, I found that learning Java and then moving to &quot;weird&quot; languages like Ocaml really expands how you think of how to solve a problem. Knowing JavaScript is pretty much a requirement in web development. Learning Python can expose students to beautiful, concise ways of solving problems, and opens the door to a lot of machine learning libraries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't count how many times I've read about some technology, dismissed it, then was forced to use it somewhere, and came out thinking, &quot;Huh, that's pretty cool&quot;&lt;/p&gt;&#xA;" OwnerUserId="215" LastActivityDate="2017-05-27T17:53:45.590" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="237" PostTypeId="2" ParentId="235" CreationDate="2017-05-27T17:58:48.890" Score="3" Body="&lt;p&gt;Yes, it requires quite a bit of mathematical knowledge, and some understanding of the different AI techniques out there (neural networks etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could tell her that a good way to go about it is first choosing the form of AI she would like to learn (here you can mention neural networks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, she should try to learn about the mathematics behind the AI form she chose (computers eventually only compute, so there's math in it). For audio processing, neural networks are, in my opinion, ideal because their input can only be a collection of numbers. The key point of this part is thorough understanding of the field, which is necessary for later understanding &lt;em&gt;how&lt;/em&gt; to use those tools correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step is learning how to convert audio (maybe &lt;code&gt;.mp3&lt;/code&gt; files) to something that the chosen AI can work with. From there it's specific to the AI that she would choose, but the previous step ensures that she'll know what to do with that converted information (for neural networks - train them on that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It really comes down to the second step. That's the biggest part, and that's where the self learning really comes into play. From what you say, I doubt she'll find it overly complex and difficult.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T11:25:48.710" LastActivityDate="2017-06-24T11:25:48.710" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="239" PostTypeId="2" ParentId="161" CreationDate="2017-05-27T19:24:20.500" Score="3" Body="&lt;p&gt;My list:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Scratch&lt;/li&gt;&#xA;&lt;li&gt;Python&lt;/li&gt;&#xA;&lt;li&gt;Visual Basic (it was my first)&lt;/li&gt;&#xA;&lt;li&gt;I imagine HTML, though I was taught it with a WYSIWYG&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.codecademy.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codecademy.com/&lt;/a&gt; has a good list of beginner programming languages, and extensive tutorials on most. There was a website which my teacher signed me up to which I forgot the name of. Maybe you can get a MicroBit, &lt;a href=&quot;http://microbit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://microbit.org/&lt;/a&gt;, and have them program those. It has click-and-point programming system, a Javascript one, a Python one and a touchscreen compatible one which is a nightmare to use on a computer.&lt;/p&gt;&#xA;" OwnerDisplayName="user223" LastActivityDate="2017-05-27T19:24:20.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="240" PostTypeId="2" ParentId="130" CreationDate="2017-05-27T19:31:08.620" Score="6" Body="&lt;p&gt;Just teach them Python. That'll work as the whole system relies on indentation and a lack of it will cause errors.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if a &amp;gt; b:&#xA;print(&quot;Hello, World&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This will give the aptly named &quot;indentation error.&quot; It will create a habit in them to always indent everything. I certainly have it. Just typing the example killed me. &lt;/p&gt;&#xA;" OwnerDisplayName="user223" LastActivityDate="2017-05-27T19:31:08.620" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="241" PostTypeId="2" ParentId="226" CreationDate="2017-05-27T20:42:14.553" Score="2" Body="&lt;p&gt;I think I can answer this via analogy with Python and a surface-level knowledge of Ruby and Sinatra, having skimmed the docs for the latter. From what I can tell the following holds true (although I'd gladly be corrected if it's too reductive):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Sinatra : Ruby on Rails :: Flask : Django&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you want a full framework for Ruby, you go with RoR; if for Python, Django.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I taught my students the basics of Flask this year, and using &lt;a href=&quot;http://pythonhow.com/building-a-website-with-python-flask/&quot; rel=&quot;nofollow noreferrer&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world&quot; rel=&quot;nofollow noreferrer&quot;&gt;great&lt;/a&gt; &lt;a href=&quot;https://exploreflask.com/en/latest/&quot; rel=&quot;nofollow noreferrer&quot;&gt;tutorials&lt;/a&gt;, I found I could get students up and running with a basic Flask page in no time at all. It was a powerful and simple way to combine HTML/CSS with Python without having to set up virtual environments or do any configuration beyond installing the framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From an educational/pedagogical perspective, I see two advantages to Sinatra:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It allows students to build something quickly and thus get their hands dirty with more hands-on experience. As a result... &lt;/li&gt;&#xA;&lt;li&gt;It scaffolds understanding of frameworks as preparation for later use of Rails.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Scaffolding concepts in programming is essential to avoid that conceptual leap that is a hair too great. The logic of &lt;code&gt;Ruby -&amp;gt; Sinatra -&amp;gt; Rails&lt;/code&gt; shows a logical progression of increasing complexity. It also affords those interested and more experienced students an additional challenge. Understand Sinatra? Move on to Rails. The extension for further learning is also an important factor to weigh. Where do you want all students to end up in terms of competence? What about this who want to and/or who can exceed that expectation?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-27T20:42:14.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="242" PostTypeId="2" ParentId="146" CreationDate="2017-05-27T21:38:35.693" Score="3" Body="&lt;p&gt;I'm in the midst of a PennX course on edX called &lt;a href=&quot;https://courses.edx.org/courses/course-v1:PennX+SD1x+2T2017/info&quot; rel=&quot;nofollow noreferrer&quot;&gt;Software Development Fundamentals&lt;/a&gt; taught using Java, and they gave the analogy of parts of speech.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Objects -&gt; Nouns&lt;/li&gt;&#xA;&lt;li&gt;Methods -&gt; Verbs (i.e. Actions)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think you could expand it (without going too far with the metaphor) as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Properties -&gt; Adjectives&lt;/li&gt;&#xA;&lt;li&gt;Class and (instance or subclass) -&gt; Common noun and proper noun&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This analogy is strengthened by the use of &quot;is-a&quot; and &quot;has-a&quot; in the context of OOP. The transition from natural language constructs to OOP (or vice versa) may aid in discussions of class design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a Car object could be a blue Honda Civic, the adjectives blue and Honda corresponding to properties set upon instantiation and the noun Civic either being the variable name of the instance or a subclass. Using natural language also helps with &lt;code&gt;instanceof()&lt;/code&gt; as students will hopefully see relatively intuitively that a Civic is quite clearly a car, but a car is not necessarily a Civic. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-27T21:38:35.693" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="243" PostTypeId="2" ParentId="228" CreationDate="2017-05-27T21:56:30.917" Score="8" Body="&lt;p&gt;I think there's a few different skills students need for independence, and they require quite different teaching approaches. Independence is the end result but you can't teach it directly. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Confidence. They need to think it's possible to try out a new toolset and make something. Guiding them prescriptively through a variety of different new tools is a good way to do this, as with @BrDaHa's answer. i.e. Don't teach independence as such but show through example that different and new approaches are possible and not too difficult. Once they've achieved several different projects, even tiny ones, with different technologies they'll be more confident to explore different options rather than use the same thing every time. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Abstract understanding. The hard bit of programming is thinking about problems and solutions in the right way. Once you know conceptually what you want to do it's much less scary to go find a tool to implement that well, and that conceptual understanding will help guide you through using a new tool. Teaching CS generally addresses this, plus a specific focus on systems design. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ability to learn something they don't already know. Reading documentation, using stack overflow, reading blog posts and books. Students need to learn each of these, they're different skills, and they're often not taught well or at all in CS courses. When you can do these things then approaching a new tech is fun rather than daunting. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Appreciate there's different tools for different jobs. You need to demonstrate, or better have them experience, that some technologies are great for some things and not others. So they know there's worthwhile in exploring different tech. On the one hand, when you have a hammer everything looks like a nail. Conversely though, it's often a lot faster to use a tool you know than learn a whole new one for a small job, even if that tool is 'better'. Negotiating that trade off is an important part of general software development. Part of the fun of being a developer. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="57" LastActivityDate="2017-05-27T21:56:30.917" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="244" PostTypeId="2" ParentId="180" CreationDate="2017-05-27T21:57:17.847" Score="1" Body="&lt;p&gt;I think the ancient history is less relevant to a general curriculum, the context that many of us learnt to program with is not likely to help students understand the environment they will be working in in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, Mores law does not predict the future (and is expected to only continue with step changes in tech beyond 5nm).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What probably is relevant is to look back 10 years, and see how phones have changed, how battery tech has improved, how everyone carries broadband with them, sat-phones cover the whole planet, and many houses have well over 20 Mb Internet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So not only are computers near enough free (outside of supercomputer) but they are far better connected. This is fairly new, and things are still changing, but you ought to be able to demonstrate some comparisons which are accessible and help students imagine how things might change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Domestic drones are my current best example of tech which has only recently been accessible at a sensible price. &lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-06-11T16:43:14.357" LastActivityDate="2017-06-11T16:43:14.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="245" PostTypeId="2" ParentId="228" CreationDate="2017-05-28T07:41:10.260" Score="3" Body="&lt;p&gt;There is an argument for facilitated and directed learning to encourage independence. Students should be allowed to discuss problems and options with their peers in order to make judgements; evidence shows that adults tend to interfere with that process. Ensure activities are hands on and try pairing students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may be of interested to help structure a critical thinking approach - Search Kivunjas article Using Dear Bono's Six Thinking Hats Model to Teach Critical Thinking and Problem Solving Essential for Success in the 21st Century Economy.&lt;/p&gt;&#xA;" OwnerUserId="146" LastActivityDate="2017-05-28T07:41:10.260" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="246" PostTypeId="5" CreationDate="2017-05-28T09:19:53.347" Score="0" Body="&lt;p&gt;High school students learning Computer Science can be at any level. The level will vary with the school. Typically high school is when students are first introduced to Computer Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag is especially relevant for questions relating to subject matter taught in High School as well as for appropriate methodologies for the associated age group. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-08-03T20:14:05.307" LastActivityDate="2017-08-03T20:14:05.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="247" PostTypeId="4" CreationDate="2017-05-28T09:19:53.347" Score="0" Body="Questions about CS teaching to high school level students. This should be used when the context or level of the answer or question is that of high school students. In many cases, an AP tag is more appropriate because AP classes are typically taught in high school." OwnerUserId="150" LastEditorUserId="2395" LastEditDate="2017-08-03T20:12:02.573" LastActivityDate="2017-08-03T20:12:02.573" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="248" PostTypeId="1" AcceptedAnswerId="259" CreationDate="2017-05-28T09:21:45.020" Score="12" ViewCount="676" Body="&lt;p&gt;Automatic grading is great for saving time on marking programming tasks, so there's more time to focus on actual &lt;em&gt;teaching&lt;/em&gt;, but I've noticed a few flaws. Since work is essentially marked based on passing unit tests, thoughtful design often gets ignored, and excessively complex solutions are considered just as good as elegant ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently read &lt;a href=&quot;http://gregorulm.com/automatic-grading-of-code-submissions-in-moocs-isnt-perfect-either/&quot; rel=&quot;noreferrer&quot;&gt;this article&lt;/a&gt; about how this is a problem on MITx—instead of this solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return max(min(hi,x),lo)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A student wrote this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1 * lo + 0 * x + 0 * hi # too low&#xA;0 * lo + 1 * x + 0 * hi # in range&#xA;0 * lo + 0 * x + 1 * hi # too high&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Automatic testing would find these equivalent,  but clearly one is incomprehensible and the other is relatively logical and sound.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also recognised in &lt;a href=&quot;http://www.cs.tufts.edu/~nr/cs257/archive/stephen-edwards/automated-feedback.pdf&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Using Test-Driven Development in the Classroom&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Despite its classroom utility, an automatic grading strategy like&#xA;  the one embodied in the Curator also has a number of shortcomings:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Students focus on output correctness first and foremost;&#xA;  all other considerations are a distant second at best (design,&#xA;  commenting, appropriate use of abstraction, testing one's&#xA;  own code, etc.). This is due to the fact that the most immediate&#xA;  feedback students receive is on output correctness [...]&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Is there any way of evaluating code style and design automatically (or at least detecting very poor solutions)? I've thought about using some static code analysis to try and evaluate solutions (e.g. &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;noreferrer&quot;&gt;cyclomatic complexity&lt;/a&gt;, or tools like &lt;a href=&quot;https://github.com/mre/awesome-static-analysis&quot; rel=&quot;noreferrer&quot;&gt;these&lt;/a&gt;), although I've not tried them yet. Are there any reliable solutions to this, or must it be done manually? Does static code analysis help in any way?&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="1705" LastEditDate="2017-07-06T16:48:00.280" LastActivityDate="2017-07-06T19:14:46.687" Title="How can I discourage poor design while using automatic grading of submissions?" Tags="|grading|coding-style|auto-graders|" AnswerCount="7" CommentCount="8" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="249" PostTypeId="2" ParentId="211" CreationDate="2017-05-28T09:46:38.627" Score="4" Body="&lt;p&gt;I am not advocating teaching pointers to explain 0-indexing (see mine and other's answers on your other question for how to do that). However, if we have good reason to teach pointers, here is a tip that helped me when I was learning. I have also shared these ideas with other pupils, and they started to make progress.&lt;/p&gt;&#xA;&lt;p&gt;I find code involving pointers confusing: is it a pointer, or is it the real thing. To help me with this I adopted a little bit of &lt;a href=&quot;https://en.wikipedia.org/wiki/Hungarian_notation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hungarian notation&lt;/a&gt; (I don't generality advocate Hungarian notation in strongly typed languages, but for pointers, it is a great help.&lt;/p&gt;&#xA;&lt;h2&gt;Prerequisite&lt;/h2&gt;&#xA;&lt;p&gt;It is important to ensure that all variables and routines have good names:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Routines that do something (change something), should not return a value and should have a verb name (or verb phrase). (one style would allow returning of status, this is needed in non-object-oriented programming.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Booleans should be adjectives (start with is, has was (no future tense).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Variables and routines returning a non-boolean value, should be a noun (or noun phrase).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;The notation&lt;/h2&gt;&#xA;&lt;p&gt;Append a &lt;code&gt;_pt&lt;/code&gt; to the end of the name of all pointers.&lt;/p&gt;&#xA;&lt;h2&gt;Explanation&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;int numberOfCats     /*  numberOfCats is an integer*/&#xA;int *numberOfDogs_pt /* *numberOfDogs_pt is an integer*/&#xA;&#xA;&#xA;numberOfCats  /*a real integer*/&#xA;&amp;amp;numberOfCats /*a pointer to an integer*/&#xA;&#xA;*numberOfDogs_pt /*a real integer, like what was declared*/&#xA;numberOfDogs_pt  /*a pointer, as in its name*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you see a &lt;code&gt;*???_pt&lt;/code&gt; then you can cancel out the &lt;code&gt;*&lt;/code&gt; and the &lt;code&gt;_pt&lt;/code&gt;, it is in this context, not a pointer, but I can drop the &lt;code&gt;*&lt;/code&gt; to make it a pointer. Where a variable does not have a &lt;code&gt;_pt&lt;/code&gt;, there is no &lt;code&gt;*&lt;/code&gt; to drop, however, I can add a &lt;code&gt;&amp;amp;&lt;/code&gt;. &lt;code&gt;&amp;amp;&lt;/code&gt; works as the opposite of a &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;*&amp;amp;numberOfCats&lt;/code&gt; is same as &lt;code&gt;numberOfCats&lt;/code&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Hope this is useful.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="9154" LastEditDate="2021-05-28T15:40:24.843" LastActivityDate="2021-05-28T15:40:24.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="250" PostTypeId="2" ParentId="248" CreationDate="2017-05-28T10:47:29.220" Score="3" Body="&lt;p&gt;I would recommend looking into a &lt;a href=&quot;https://stackoverflow.com/questions/49716/what-is-static-code-analysis&quot;&gt;static code analyzer&lt;/a&gt; or &lt;a href=&quot;https://stackoverflow.com/questions/8503559/what-is-linting#8503586&quot;&gt;linter&lt;/a&gt; for whichever language you are using. These are designed to examine code for any unintelligible code and to make sure that the code follows the best practices. For example, a code analyzer or linter may suggest that you limit your line length, keep your methods small, and reduce unnecessary complexity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, while this sound very useful, this is something that you have to be careful with and configure very carefully, because some of the metrics that are used can trigger it when the code is actually fine. It may be good enough for your situation to simply give the code analyzer to your students and let them use it to optimize their code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do use a static code analyzer or linter, I'd recommend setting the limits high for how much room the students have for mistakes, because the contortions to get around a strange reason their assignment was poorly graded could make things much worse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From some quick research, it seems like the most widely used python linter is &lt;a href=&quot;https://www.pylint.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;pylint&lt;/a&gt;. From a quick glance at the docs, it seems to fit your goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a rubyist, I use &lt;a href=&quot;https://github.com/bbatsov/rubocop&quot; rel=&quot;nofollow noreferrer&quot;&gt;rubocop&lt;/a&gt; which is both a linter and static code analyzer.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-28T11:13:21.810" LastActivityDate="2017-05-28T11:13:21.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="251" PostTypeId="1" AcceptedAnswerId="253" CreationDate="2017-05-28T10:52:17.370" Score="7" ViewCount="351" Body="&lt;p&gt;I run a workshop with a few students. They often do large projects alone that they inevitably run into trouble with. That's completely normal, it's why they need some help in the workshop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the instructor, I usually spot the issue and solution pretty quickly. I try and nudge the student in the correct direction, but they don't always get it. After a while, I become personally invested in the project, and I may end up just implementing the fixes I suggest myself (while they watch), and because they aren't responsible for the implementation, they gain less that than if I had let them do it. This happens especially when I help them with the initial design and architecture of the program, as I end up feeling a little like it's mine too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make myself pull back a little and not do the work for them?&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="58" LastEditDate="2017-05-28T10:56:20.900" LastActivityDate="2017-06-15T18:46:45.893" Title="How to avoid getting emotionally attached to my students' projects?" Tags="|social-context|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="252" PostTypeId="2" ParentId="251" CreationDate="2017-05-28T11:01:26.517" Score="2" Body="&lt;p&gt;While sometimes it may be hard to step back from a particularly interesting student project, you just have to remember that your role on the project is just as vital as theirs: A teacher.  As a teacher, your job is to explain and teach so that they can actually create an implementation. Even though you don't touch the code, the project couldn't be completed without you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may also be helpful to step back during the design phase, because if you haven't been responsible for the design, you feel less like the project is your baby. Also, maybe start your own projects. If you are getting engaged in everything that your students do, then maybe you should become invested in some new project of your own to serve as a distraction from what your students are doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is OK it &lt;em&gt;guide&lt;/em&gt; the student to a solution, and even guide very closely. It's good to get the student to understand how their code could be better by simply asking questions about them. Questions are good, because they help the students understand what is going on and the help you as a tool to guide them. If you simply confine yourself to asking questions, even very specific ones, like &quot;Why wouldn't you put the code between lines 23 and 27 into it's own method?&quot;, because that's better than telling them how to do it or doing it yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may also be helpful to you to remember that the maintainer of the project will be the student, and so they &lt;em&gt;have&lt;/em&gt; to know how it works. If they don't, although the project may look good when it leaves your workshop, it will fall apart because the projects owner won't be able to maintain the code when inevitably it has to be changed.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-28T11:10:17.493" LastActivityDate="2017-05-28T11:10:17.493" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="253" PostTypeId="2" ParentId="251" CreationDate="2017-05-28T11:01:41.193" Score="5" Body="&lt;p&gt;I think this an essential and main part of teaching programming and cs (and teaching in general). The ability to hold the answer and guide the student to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do is try to follow the thought process of the student. When working with them to help them find the problem, I ask various questions (usually &quot;what do &lt;em&gt;you&lt;/em&gt; thing is causing this?&quot; etc.) and by their answers it's possible to see what sentences would guide them to the solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This method works great (that sound out of the sky but it's based on student feedback) as it allows the student to feel that they found it on their own. I find that they also learn to spot issues on their own afterwards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, it's worthwhile remembering that you are the instructor, and not the student. And that the project is a student's project, so keeping that in mind often helps with holding back from doing the work yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However when all else fails, showing the students how you might do it could be a last (&lt;strong&gt;last&lt;/strong&gt;) resort. Just be sure to explain every step you're doing, so that the student understands. I cannot express enough how bad this last resort is. But if it gets to that, make sure you're not doing their work, but rather show them something similar&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-05-28T11:05:19.343" LastActivityDate="2017-05-28T11:05:19.343" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="254" PostTypeId="2" ParentId="203" CreationDate="2017-05-28T11:18:02.937" Score="0" Body="&lt;p&gt;Have you considered teaching Debian Gnu/Linux. This is a Unix operating system, and consists of only &lt;a href=&quot;https://en.wikipedia.org/wiki/Free_software&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free Software&lt;/a&gt;, that is software that allows you to be free, including the freedoms to use, study, modify, and distribute (for any price).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has may advantages:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Freedom to use in the way that why want.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The system is written for the user. Not for the company that made it, for media companies, for advertisers, or for the NSA.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Ease of use&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It is now easier to use that Microsoft's Windows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It has a very nice windowing system (a choice of several, I like kde, but gnome is simpler), more powerful, and more consistent to use that Microsoft's.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It also has a very nice command-line interface: much, much better than Microsoft's cmd. This is used by intermediates and experts as is much easier, for most tasks, than a graphical interface. Most people use both, as they are well integrated.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Good for beginner, intermediates and experts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Microsoft has successfully optimized their software to be easy to use for beginners, specifically the first few weeks. After that while we, as experts, usually know how to do things, it is a lot of effort. Also there are a lot of surprises for beginners and intermediates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Microsoft's Windows , if there is no button to click, then you choose, don't do it, or get visual studio out, and write a C#/VB program. In Unix there as a gradual path from beginner to expert.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Easy to learn&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Because it is more consistent, it is easier to learn. When I put Debian on my dad's computer, he stopped phoning to ask for help. He just used it. Before this I could go around to see him, and he would explain what he was trying to do and how he was trying to do it. I would often have to say, you seem to be doing it all correct, I have no idea why it does not work. I eventually got fed up and installed Debian.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Learn it once&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Unix improves, but they ensure that it stays backward compatible. What I learnt is 1991 is still (98%) applicable today. However this has not held it back (some people disagree), at least it has not held it back enough to allow Microsoft to catch up.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Lots of software&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You think space is big, but that is peanuts compared to Gnu/Linux.&#xA;Debian currently has ≈ 43,000 packages (180GB, but you will not need it all, ½GB for a good system, I am a power user and mine in 15GB): These include Office tools, web-browsers, web-servers, software-development tools, etc, etc …&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Uses less resource&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Installing Apache warns 540 kB additional disk space will be used.&#xA;Mono Develop (Like visual studio, written by novel) warns 13.6 MB of additional disk space will be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are big programs, that do as least as much as the Microsoft equivalent. Apache is currently the worlds most popular web-server.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What's a Virus&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A virus is something that attacks through vulnerabilities in the operating system. Unix culture is to fix the vulnerabilities. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="150" LastEditDate="2017-06-12T04:51:49.093" LastActivityDate="2017-06-12T04:51:49.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="255" PostTypeId="5" CreationDate="2017-05-28T11:37:21.930" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-28T11:37:21.930" LastActivityDate="2017-05-28T11:37:21.930" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="256" PostTypeId="4" CreationDate="2017-05-28T11:37:21.930" Score="0" Body="For questions regarding the data storage structure of an Array. This can range from their standard indexing to their usage in comparison to other data structures. Arrays are an ordered list of elements which are usually all of the same type. Nested arrays can contain arrays as elements." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-05-29T19:50:22.230" LastActivityDate="2017-05-29T19:50:22.230" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="257" PostTypeId="2" ParentId="113" CreationDate="2017-05-28T12:16:19.317" Score="3" Body="&lt;h2&gt;Use Russian dolls&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Russian dolls nest inside each other, much line block of code in almost all modern programming language (maybe all post “goto considered harmful” languages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Russian dolls nest like this &lt;code&gt;[({&amp;lt;&amp;gt;})]&lt;/code&gt;, in programming we can also nest like this &lt;code&gt;[][]&lt;/code&gt; &lt;em&gt;no nesting&lt;/em&gt;, this&lt;code&gt;[()()]&lt;/code&gt; or this&lt;code&gt;[()({}{})({&amp;lt;&amp;gt;&amp;lt;&amp;gt;})]&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used Russian dolls to &lt;strong&gt;help&lt;/strong&gt; to explain the idea of nesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ZOnRW.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ZOnRW.jpg&quot; alt=&quot;Russian dolls, open showing the smallest in the middle &quot;&gt;&lt;/a&gt; From &lt;a href=&quot;http://maxpixel.freegreatpicture.com/Traditional-Russian-Toy-Russian-Doll-Russian-1090697&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://maxpixel.freegreatpicture.com/Traditional-Russian-Toy-Russian-Doll-Russian-1090697&lt;/a&gt; CC0 Public Domain &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-05-28T12:56:46.253" LastActivityDate="2017-05-28T12:56:46.253" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="258" PostTypeId="2" ParentId="113" CreationDate="2017-05-28T12:51:44.987" Score="1" Body="&lt;h2&gt;Use Snap to model it.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/x4Z5M.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/x4Z5M.png&quot; alt=&quot;Use Snap to model any language&quot;&gt;&lt;/a&gt; — see this code here &lt;a href=&quot;http://snap.berkeley.edu/snapsource/snap.html#present:Username=rdelorenzi&amp;amp;ProjectName=html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://snap.berkeley.edu/snapsource/snap.html#present:Username=rdelorenzi&amp;amp;ProjectName=html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-05-28T12:51:44.987" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="259" PostTypeId="2" ParentId="248" CreationDate="2017-05-28T13:16:23.773" Score="9" Body="&lt;p&gt;I am a strong advocate for &lt;em&gt;code interviews&lt;/em&gt;.  I make principles of style into about 50% of a lab grade (though I do permit kids to go back and refactor after an interview for full credit.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some context, I discuss regularly that there are &lt;em&gt;two audiences of code:&lt;/em&gt; computers, and people, and that these audiences have very different needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since my high school class is structured with lab periods, I will grade lab 1 during lab 2 work times (and so on). This gives me class time to get my interviews done. At the start, the code needs a lot of work. However, by the time we have arrived at lab 3, the kids are &lt;em&gt;mostly&lt;/em&gt; creating crystal clear code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't drop that autograder! Even with code interviews, it is still tremendously useful. Having a good autograder means that, during the interview, I &lt;em&gt;only&lt;/em&gt; need to look for style issues. I can assume that even the strangest of their code (and boy, is there ever strange code at the beginning!) produces the correct output.  That permits the interview process to focus in, laser-like, on how well the student wrote for the second audience.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-28T13:16:23.773" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="260" PostTypeId="2" ParentId="113" CreationDate="2017-05-28T16:07:30.360" Score="4" Body="&lt;p&gt;To elaborate on my comment, I suggest approaching both (but HTML first) by way of the DOM. W3 Schools has a tutorial on both &lt;a href=&quot;https://www.w3schools.com/js/js_htmldom.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML&lt;/a&gt; and &lt;a href=&quot;https://www.w3schools.com/xml/dom_intro.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;XML&lt;/a&gt; using this model for conceptualizing the structure of HTML/XML documents. The XML tutorial stresses the importance of knowing this structure:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Understanding the DOM is a must for anyone working with HTML or XML.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is a screenshot of a slide I used when introducing the structure of HTML (thanks to CS50 AP):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ZDFhz.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ZDFhz.png&quot; alt=&quot;HTML DOM Screenshot&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's elementary, but with this basic structure it is easy to visualize nesting, siblings, and paths of traversal. Also, from a stylistic perspective vis-a-vis indentation, each child equals one further tab in, so this structure also makes it possible to address code style. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result I wouldn't say one needs to know XML before HTML. Instead, one should know the structure common to both to be effective with either.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-28T16:07:30.360" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="261" PostTypeId="1" AcceptedAnswerId="270" CreationDate="2017-05-28T16:54:06.450" Score="9" ViewCount="1020" Body="&lt;p&gt;I'm trying to think of an analogy to explain how static members, references and objects work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have in mind is saying that static is like the number of computers in the world. That parameter isn't related to any &lt;strong&gt;specific&lt;/strong&gt; computer, but rather to Computer in general. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I feel like this might confuse students, partly due to the name &lt;code&gt;static&lt;/code&gt; (i.e. something that doesn't move).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest an analogy that shows what &lt;code&gt;static&lt;/code&gt; means in everyday things? Preferably something that high-school students can relate to and understand.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-05-29T07:09:20.560" LastActivityDate="2017-07-07T15:18:26.020" Title="Analogy for static objects (or members)" Tags="|java|teaching-analogy|secondary-education|static|" AnswerCount="7" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="262" PostTypeId="5" CreationDate="2017-05-28T17:02:05.817" Score="0" Body="&lt;p&gt;Analogies and metaphors are a great way to teach complicated ideas or concepts in computer science. Some analogies are more clear than others, and questions with these tags are usually asking for analogies to use for teaching a specific concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Complex coding concepts often lead to students understanding the subject incorrectly. Analogies can help explain the subject in an easy-to-understand way that the students can relate to. So analogies are also somewhat specific to the level of the students in question (high-school, university etc.).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-07-06T15:27:59.003" LastActivityDate="2017-07-06T15:27:59.003" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="263" PostTypeId="4" CreationDate="2017-05-28T17:02:05.817" Score="0" Body="Questions looking for analogies with which to teach computer science principles or concepts, or questions discussing specific teaching analogies for such computer science principles or concepts. Metaphors used in teaching is also an appropriate topic here. " OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-07-06T15:38:57.350" LastActivityDate="2017-07-06T15:38:57.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="264" PostTypeId="2" ParentId="261" CreationDate="2017-05-28T17:26:06.623" Score="0" Body="&lt;p&gt;Building upon the &lt;a href=&quot;https://cseducators.stackexchange.com/a/152/166&quot;&gt;animal classification analogy&lt;/a&gt; for OOP in general, if you consider felines as a whole to be a class, then a static member could be &lt;code&gt;family = &quot;Felidae&quot;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2017-05-28T17:26:06.623" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="265" PostTypeId="2" ParentId="261" CreationDate="2017-05-28T18:12:10.620" Score="5" Body="&lt;p&gt;One way to approach this might be to have students identify what they all have in common and what they each possess individually. That which is common -- like the school they are attending or the class (and maybe grade level) they are in -- should be &lt;code&gt;static&lt;/code&gt;. That which is not -- like name or age -- should not be static. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also go into sufficient and necessary conditions. For example, a necessary condition for something being a bicycle is having two wheels, but it's not sufficient because you could have a two-wheeled motorcycle. To model a class &lt;code&gt;Bicycle&lt;/code&gt;, you could make its necessary conditions into static variables, such as &lt;code&gt;static int numWheels&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-28T18:12:10.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="266" PostTypeId="2" ParentId="248" CreationDate="2017-05-28T18:28:58.600" Score="2" Body="&lt;p&gt;I don't think you can just by using an auto grader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use an auto grader to tell me if the code solves the problem it's supposed to solve. And I tell my students that any code that solves the given problem is correct. Some people write a 2 line solution, some write a 50 line solution. But I don't consider either one more correct than the other. Generally the shorter solution takes more mental work and the longer solution takes more physical work (typing). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I will go back and look at the submissions. Since the auto grader has checked it, I don't have to worry about whether the code builds or gets the right answer. That takes out the time consuming, boring part for me and lets me focus on style and any tips that I can give. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess, especially early in the year, I don't want to penalize students for a working solution that might not be as clean or elegant as another student's. There's enough frustration in a first year course without worrying too much about style and efficiency.  &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-28T18:28:58.600" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="267" PostTypeId="2" ParentId="113" CreationDate="2017-05-28T18:50:10.477" Score="1" Body="&lt;p&gt;HTML is primarily a markup language, not a document structure. XHTML, which we use almost exclusively these days, is both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that means HTML is much easier to explain than XHTML. You can markup anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can write something &lt;strong&gt;(and markup this bit:)&lt;/strong&gt; with markup &lt;strong&gt;(:finished markup)&lt;/strong&gt; without knowing or caring anything about &lt;em&gt;document&lt;/em&gt; structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once people are happy with markup, it's easier to introduce them to document structure - you're giving &quot;the whole document&quot; some markup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;N.B.: this is, of course, how most people learnt HTML back before XHTML existed; new students today possibly get forced through a harder route, going straight to XHTML, thanks to the predominance of XHTML in real-world use.&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastEditorUserId="27" LastEditDate="2017-05-30T01:52:10.730" LastActivityDate="2017-05-30T01:52:10.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="268" PostTypeId="2" ParentId="261" CreationDate="2017-05-28T22:32:43.613" Score="6" Body="&lt;p&gt;I use school colors and principal's name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone comes in tomorrow and says your principal is no longer Mr. Smith, it's now Ms. Jones then that change is made for every object (student) in the school. You don't have to go to each individual student and tell them that their principal has changed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It worked really well this year because we did get a new principal. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-05-28T22:32:43.613" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="269" PostTypeId="2" ParentId="248" CreationDate="2017-05-29T07:03:48.333" Score="6" Body="&lt;p&gt;Harvard's &lt;a href=&quot;http://cs50.wiki/file/view/Grading+CS50.pdf&quot; rel=&quot;noreferrer&quot;&gt;grading policy for CS50&lt;/a&gt; is worth looking into. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are four components for the grade on problem sets (each of which involves submitting code). The overall grade is calculated as scope * (3 * correctness + 2 * design + 1 * style)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Scope&lt;/strong&gt;: to what extent does the code implement the features required by the specification? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Correctness&lt;/strong&gt;: to what extent is the code consistent with the specifications and free of bugs? This is done by the check50 autograder, and it's essentially unit testing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Style&lt;/strong&gt;: to what extent is your code readable (i.e., commented and indented with variables aptly named)? there's a component for formatting: I think in Harvard's case these marks are awarded by teaching assistants, but basic static analysis or linting might suffice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;: essentially, is this good code in terms of clarity, efficiency, logic, elegance - again, Harvard use TAs to award these grades, and it's hard to see a machine (or an inexperienced grader) being able to award these marks accurately any time soon. If you were determined to use automatic grading, I guess you could do something with run times for test data or the more sophisticated forms of static analysis. A compromise might be the use of peer-assessment and a detailed, criteria based rubric: peer assessment might have other benefits.&lt;/p&gt;&#xA;" OwnerUserId="44" LastEditorUserId="44" LastEditDate="2017-05-29T07:09:30.300" LastActivityDate="2017-05-29T07:09:30.300" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="270" PostTypeId="2" ParentId="261" CreationDate="2017-05-29T10:25:16.320" Score="6" Body="&lt;h3&gt;Static members belong to the type, not the instance&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Static members are best seen as belonging to the type rather than the instance.  If you're inside a class, it can be harder to see:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Animal&#xA;{&#xA;    static int moveSpeed = 4;&#xA;    int currentLocation = 10;&#xA;&#xA;    void Walk()&#xA;    {&#xA;        //  Can you tell which variable is static without looking above?&#xA;        currentLocation += moveSpeed;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But it's easier to see in an external scope where the member needs to be called:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void Foo()&#xA;{&#xA;    var animal = new Animal();&#xA;&#xA;    var x1 = animal.moveSpeed;       //  Invalid - .moveSpeed belongs to the type, not a specific animal&#xA;    var x2 = animal.currentLocation; //  Valid&#xA;    var x3 = Animal.moveSpeed;       //  Valid&#xA;    var x4 = Animal.currentLocation; //  Invalid - the type Animal doesn't have some common value for currentLocation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;See &lt;code&gt;static&lt;/code&gt; members through the compiler's eyes&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In languages like C#/Java, the compiler makes all methods &lt;code&gt;static&lt;/code&gt; during the compilation process.  Instance methods get an extra argument added to their method signature that specifies &lt;code&gt;this&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Animal&#xA;{&#xA;    //  In source code, as before:&#xA;    void Walk()&#xA;    {&#xA;        currentLocation += moveSpeed;&#xA;    }&#xA;&#xA;    //  More explicit source code:&#xA;    void Walk()&#xA;    {&#xA;        this.currentLocation += Animal.moveSpeed;&#xA;    }&#xA;&#xA;    //  How the compiler sees it:&#xA;    static void Walk(Animal this)&#xA;    {&#xA;        this.currentLocation += Animal.moveSpeed;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Analogies&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Since &lt;code&gt;static&lt;/code&gt; methods are those that don't vary with an instance, you can compare them to personal qualities about people vs. impersonal qualities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when students hand in a math test, if the answer to a problem is $5$, then that's the correct answer for all students.  &lt;em&gt;But&lt;/em&gt;, Bob should write &quot;Bob&quot; on his exam, while Sally should write &quot;Sally&quot; on her exam - that varies with the instance of the student.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&lt;code&gt;static&lt;/code&gt; relativity&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Analogies can get tricky because &lt;code&gt;static&lt;/code&gt;-ness is relative.  This isn't easy to reproduce in simple type systems like used in Java/C#, but it's apparent in languages with more meta-programming features, e.g. Ruby, where a type is itself an instance of another type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For an analogy, consider a class &lt;code&gt;Dog&lt;/code&gt;.  You might say that all &lt;code&gt;Dog&lt;/code&gt;'s have &lt;code&gt;.Legs = 4;&lt;/code&gt;, but that they can have differing &lt;code&gt;.Weights&lt;/code&gt;.  From this perspective, &lt;code&gt;.Legs&lt;/code&gt; is static.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, &lt;code&gt;Dog&lt;/code&gt; can itself be an instance of a class, &lt;code&gt;Animal&lt;/code&gt;.  From the perspective of &lt;code&gt;Animal&lt;/code&gt;, &lt;code&gt;.Legs&lt;/code&gt; isn't static, but rather varies with the instances of &lt;code&gt;Animal&lt;/code&gt; - and the instance called &lt;code&gt;Dog&lt;/code&gt; just happens to have &lt;code&gt;.Legs=4;&lt;/code&gt;, but the instance called &lt;code&gt;Human&lt;/code&gt; has &lt;code&gt;.Legs=2;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Static relativity won't make sense if students are just learning Java/C#-like type systems, but some students might ask questions that bring it up anyway.  For example, if you give &lt;code&gt;.Legs&lt;/code&gt; as an example, students might ask how to handle a more general type where &lt;code&gt;.Legs&lt;/code&gt; can vary - this can be explained through a meta-class structure.&lt;/p&gt;&#xA;" OwnerUserId="39" LastEditorUserId="39" LastEditDate="2017-06-01T13:57:40.390" LastActivityDate="2017-06-01T13:57:40.390" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="271" PostTypeId="2" ParentId="172" CreationDate="2017-05-29T19:12:14.537" Score="5" Body="&lt;p&gt;I teach game programming, and I have a very similar issue.  Day 1: They want to make Overwatch, and on Day 2-End of the year, they want to play overwatch.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually start the year with an explanation of the parts that go into professional development and then explain that we are only scratching the surface of what is required to develop an AAA game, you might try the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them a bit about how the web works, that there are engineers who work on the various parts, and that is their full-time job, and that they work in teams to create the functionality that you see on popular websites. Giving them this perspective can help them understand better how they can plan an important role in the development of websites by learning the material that you are about to teach them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might dissect YouTube. Talk about the native applications, the FE web applications (the player, the profile, my channel);  the back end, the streaming service, the storage service, etc.  Discuss how they need servers in every region of the world! &lt;/p&gt;&#xA;" OwnerUserId="174" LastActivityDate="2017-05-29T19:12:14.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="272" PostTypeId="1" CreationDate="2017-05-29T20:06:36.970" Score="8" ViewCount="242" Body="&lt;p&gt;Next year will be my first year teaching AP CS A. While I've spent a lot of time preparing by choosing textbooks, picking an IDE, and writing the syllabus, I'm not yet settled on my workflow for how to push out assignment instructions/starter code and how to collect work back. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I registered for GitHub Classroom with an education account, but I haven't yet had a chance to explore its resources and would like to hear from those who have used it. I can easily collect files via our LMS or Google Classroom. I just have doubts that that method is the most efficient for either me or my students. Also, this past year, CS50 took care of the distribution code, so I didn't have to worry about that. Now I do need to consider how I can get files to students efficiently if needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What workflow do you follow for the submission of student work, particularly in the context of Java files? Do you provide students with starter code? If so, how?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-15T12:59:28.850" Title="Workflow for Code Submission" Tags="|java|ap-computer-science-a|github|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="273" PostTypeId="5" CreationDate="2017-05-29T20:15:22.383" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/AP_Computer_Science&quot; rel=&quot;nofollow noreferrer&quot;&gt;Advanced Placement Computer Science&lt;/a&gt; (APCS) is a United States secondary school multi-course curriculum in which high-school students can earn University credit through study and a standardized exam. Questions appropriate for this tag should be specific to that curriculum and how to teach it. Note that the College Board publishes extensive materials and has a mailing list for APCS teachers. &lt;a href=&quot;https://apcommunity.collegeboard.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Membership is available there&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="694" LastEditDate="2020-09-25T21:05:57.520" LastActivityDate="2020-09-25T21:05:57.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="274" PostTypeId="4" CreationDate="2017-05-29T20:15:22.383" Score="0" Body="Questions related to the course AP Computer Science A taught with the Java programming language." OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-05-31T23:32:59.823" LastActivityDate="2017-05-31T23:32:59.823" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="275" PostTypeId="5" CreationDate="2017-05-29T20:20:46.630" Score="0" Body="&lt;p&gt;These can be questions about work flow and process, grading policies, or strategies for fair, meaningful, and efficient grading.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-31T23:32:39.553" LastActivityDate="2017-05-31T23:32:39.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="276" PostTypeId="4" CreationDate="2017-05-29T20:20:46.630" Score="0" Body="Grading questions ask how to properly, effectively, and fairly assign grades to labs, assignments, and exams." OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-31T10:52:25.480" LastActivityDate="2017-05-31T10:52:25.480" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="277" PostTypeId="5" CreationDate="2017-05-29T21:04:11.670" Score="0" Body="&lt;p&gt;An algorithm is a set of ordered instructions based on a formal language that has a finite number of instructions to solve a problem. An algorithm does not have to be deterministic - there are many random-based algorithms, e.g. QuickSort which selects the pivot element randomly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An algorithm can be expressed in many ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a sequence of instructions&lt;/li&gt;&#xA;&lt;li&gt;As a block-scheme&lt;/li&gt;&#xA;&lt;li&gt;As a code in an existing or new programming language&lt;/li&gt;&#xA;&lt;li&gt;As a piece of text in a human language&lt;/li&gt;&#xA;&lt;li&gt;As a realization in a formal model of computation such as a Turing machine&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;An algorithm can solve a class of problems. For example, both &lt;em&gt;&quot;product of 1 and 3&quot;&lt;/em&gt; and &lt;em&gt;&quot;product of 4 and 5&quot;&lt;/em&gt; are problems in the same class: &lt;em&gt;&quot;product of two integer numbers.&quot;&lt;/em&gt; Furthermore, a given class of problems can generally be solved by a variety of algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A key algorithm classification is known as &lt;a href=&quot;http://en.wikipedia.org/wiki/Computational_complexity_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithm Complexity&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another important step of algorithm design is &lt;em&gt;proof of correctness&lt;/em&gt;. Algorithms should actually provide correct results for any instance of the problem. We should always take care that all the conditions where the proposed algorithm might &lt;em&gt;fail&lt;/em&gt; are covered. This can be done using several techniques, for example &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Model_checking&quot; rel=&quot;nofollow noreferrer&quot;&gt;Model Checking&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Correctness_(computer_science)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Assertion&lt;/a&gt;&lt;/em&gt;, and &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Loop_invariant&quot; rel=&quot;nofollow noreferrer&quot;&gt;Loop Invariant&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Related Links&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Additional resources on algorithms include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithm on Wikipedia&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://computer.howstuffworks.com/question717.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithm on Howstuffworks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://xlinux.nist.gov/dads/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dictionary of Algorithms and Data Structures&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/pedrovgs/Algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms implementations 1 - Github&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/prakhar1989/Algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms implementations 2 - Github&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.khanacademy.org/computing/computer-science/algorithms/intro-to-algorithms/v/what-are-algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;What is an algorithm and why should you care? (video) on Khan Acadamy&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastEditorUserId="104" LastEditDate="2017-06-01T02:13:06.730" LastActivityDate="2017-06-01T02:13:06.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="278" PostTypeId="4" CreationDate="2017-05-29T21:04:11.670" Score="0" Body="This tag is for questions about presenting specific algorithms or general principles of algorithmic design and analysis to students.  It IS NOT for questions about writing or fixing algorithms.&#xD;&#xA;" OwnerUserId="104" LastEditorUserId="27" LastEditDate="2017-06-10T06:49:34.040" LastActivityDate="2017-06-10T06:49:34.040" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="279" PostTypeId="2" ParentId="4" CreationDate="2017-05-29T22:24:08.240" Score="5" Body="&lt;p&gt;After students have explored java's string and math classes I introduce a group project called &quot;Mathey&quot;.  Each group is to write as many math functions that they can think of and assemble them into their own class.  Students seem to like this and are very competitive in coming up with useful math functions and enjoy showing off their work and creativity when demonstrating their class to their peers.&lt;/p&gt;&#xA;" OwnerUserId="238" LastActivityDate="2017-05-29T22:24:08.240" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="280" PostTypeId="2" ParentId="198" CreationDate="2017-05-29T23:11:56.060" Score="2" Body="&lt;p&gt;This was one of the biggest challenges of teaching AP CS Principles: students were allotted 12 hours of time in class to work on the Create Task. This task involved them designing a program of their own choosing with no real teacher influence. That absolute freedom was a bit of a struggle to manage since students were working on a variety of projects at different levels of completion and motivation.&lt;/p&gt;&#xA;&lt;p&gt;Here are some insights students shared with me after the fact when I asked them how I can &amp;quot;increase the effectiveness of the 20 hours of in-class work on these projects [Explore and Create Tasks]&amp;quot; next year:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;Setting more goals per class would have been helpful in order to&#xA;space out work.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Next year to increase the effectiveness, you could&#xA;have somewhat-stricter small due dates for pieces of the project so&#xA;you can check up on the progress of the students. This does not have&#xA;to be graded, but you could still be able to see where everyone is&#xA;regarding the tasks.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;You should first make everyone set a goal for&#xA;each class period so that they can map out how they want to use their&#xA;20 hours so they don't think they have more time than they actually&#xA;do.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;After each day, prompt the students to make a checklist for the&#xA;next class period, so that they know what their goal is for that day.&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Key take-aways: goal-setting (both big and small), breaking the task into smaller pieces, assessing work at the end of each day to prepare for the next, keeping them accountable, deterring procrastination (as much as feasibly possible).&lt;/p&gt;&#xA;&lt;p&gt;Heeding student feedback, I plan to incorporate more formal check-ins along the way next year using &lt;a href=&quot;http://docs.cs50.net/2016/fall/project/project.html#specifications&quot; rel=&quot;nofollow noreferrer&quot;&gt;the outline of the CS50 Final Project&lt;/a&gt; to guide how I structure the time. The four components of the final project are Pre-Proposal; Proposal; Status Report; and Implementation. Since I have four weeks, each component will be able to match the weekly progression quite nicely.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, when in doubt, I trust student feedback to tell me what worked and what didn't. That trust is key in my reflection on areas of success and areas for growth and in my improvement as an educator.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-05-29T23:11:56.060" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="281" PostTypeId="2" ParentId="185" CreationDate="2017-05-29T23:47:55.023" Score="3" Body="&lt;p&gt;If the goal is to &quot;explain the symbolic/mathematical logic concepts&quot; which underlie computers and computing, then I cannot recommend enough the opening chapters of &lt;a href=&quot;http://nand2tetris.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nand2Tetris&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal of the book/course is to understand every layer of abstraction from a program written in a Java-like language down to the fundamental logic gates upon which everything else is built. The opening chapter spends time discussing the most common logic gates and their respective truth tables. The initial challenge involves forming a &lt;code&gt;Not&lt;/code&gt; gate using only &lt;code&gt;Nand&lt;/code&gt; gates. From there, students must build &lt;code&gt;And&lt;/code&gt;, &lt;code&gt;Or&lt;/code&gt;, and &lt;code&gt;Xor&lt;/code&gt; along with &lt;code&gt;Mux&lt;/code&gt; and &lt;code&gt;Dmux&lt;/code&gt;. The relevance to &quot;real application&quot; is immediate: these are the most foundation for understanding how things work at the absolute lowest level of computer hardware. The assignment is certainly one that stresses symbolic and mathematical logic in a real-world context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book is split into two parts, each of which has a corresponding course on Coursera. You can also read the first six chapters of the book &lt;a href=&quot;http://nand2tetris.org/course.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;, so the first three chapters, which focus heavily on logic and low-level hardware, are all available at no cost.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-29T23:47:55.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="282" PostTypeId="1" CreationDate="2017-05-30T00:50:29.610" Score="5" ViewCount="264" Body="&lt;p&gt;I created a group lab where one student makes a random maze generator, one student makes a corresponding maze solver, and the last student calls the methods created by both students and creates an animated maze walker.  Currently, the students are told to use &lt;strong&gt;Prim's algorithm&lt;/strong&gt; for maze generation, though I am open to any of these other algorithms as well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Kruskal's&lt;/li&gt;&#xA;&lt;li&gt;Recursive Backtracker&lt;/li&gt;&#xA;&lt;li&gt;Aldous-Broder&lt;/li&gt;&#xA;&lt;li&gt;Growing Tree&lt;/li&gt;&#xA;&lt;li&gt;Hunt-and-Kill&lt;/li&gt;&#xA;&lt;li&gt;Wilson's&lt;/li&gt;&#xA;&lt;li&gt;Eller's&lt;/li&gt;&#xA;&lt;li&gt;Cellular Automaton&lt;/li&gt;&#xA;&lt;li&gt;Recursive Division&lt;/li&gt;&#xA;&lt;li&gt;Sidewinder&lt;/li&gt;&#xA;&lt;li&gt;Binary Tree&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In practice, about 10% of students use other algorithms besides Prim's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the maze solver, I teach my students about &lt;strong&gt;breadth-first search&lt;/strong&gt;, and for next year, I would like to expand this a bit and teach them about &lt;strong&gt;depth-first search&lt;/strong&gt; as well.  However, I would also like to give them a real shot at &lt;strong&gt;A*&lt;/strong&gt;, since it is a much, much better algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am looking for is how to get them to see the difficult piece of &lt;strong&gt;A*&lt;/strong&gt;: how a heuristic concretely &lt;em&gt;fits&lt;/em&gt; within the algorithm and gets us to a solution.  My target is for 25% of the students to choose to use A* next year.  I don't care which heuristics we use, but I would like them to see something that they can understand quite concretely (as I believe firmly in engendering concrete understandings before abstract understandings) and I would like them to understand the difference between an admissible and an inadmissible heuristic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For context, I do this all during my &lt;strong&gt;AP Computer Science class&lt;/strong&gt;, so it is in &lt;strong&gt;Java&lt;/strong&gt;, however the question is really about &lt;strong&gt;A*&lt;/strong&gt;, so I am not adding those tags in.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Edit&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Mike Zamansky posted a response to this question &lt;a href=&quot;http://cestlaz.github.io/posts/a-star-is-born&quot; rel=&quot;nofollow noreferrer&quot;&gt;on his incredible blog&lt;/a&gt; and it knocked my socks off! I'm going to integrate a lot of his approach into my own next year.  I would accept his answer, but it's not on this site, so the best I can do from here is link to it.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="58" LastEditDate="2017-06-29T14:58:40.917" LastActivityDate="2017-06-29T14:58:40.917" Title="Introducing A* Search Algorithm" Tags="|lesson-ideas|algorithms|" AnswerCount="2" CommentCount="7" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="283" PostTypeId="2" ParentId="198" CreationDate="2017-05-30T01:05:56.177" Score="4" Body="&lt;p&gt;I have students complete a long-term project over a very wide spectrum of CS and applied ICT areas. Each student has one project of their own choice and design. Topics proposed by students at present include architectural design, phone apps, animation, video and sound, typography, robotics, coding, story-telling, website, and research projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use two main strategies to encourage good use of time and thus meaningful progress. These are reflective learning journals and group meetings. A bonus is that this scrutiny discourages plagiarism. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students keep a reflective learning journal in OneNote that they share with me, and I expect at least three meaningful entries describing what they are doing (photos, screenshots, video, etc) per week. Along with moving around the classroom, this is my primary check of on-task progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also run meetings with about 6 - 10 students in a group (every 3 weeks or so), where each student describes what they are doing, obstacles, and solutions. These meetings are a cross between the &lt;a href=&quot;https://en.wikipedia.org/wiki/Harkness_table&quot; rel=&quot;nofollow noreferrer&quot;&gt;Harkness Method&lt;/a&gt; and Dragon's Den/Shark Tank, where students have to front up and own their project and their progress. Other students (and me) chime in with thoughts and suggestions. I call these meetings &quot;The Table&quot;, and ask students - what are you going to bring to The Table? Are you ready for The Table?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find students need to be taught/cued in to the reflective learning journal and The Table, but once they have experience and confidence they respond very well. Both the learning journal and The Table are graded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This frees me to be able to move around the room interacting with individual students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To summarize, I find that a triangulation between learning journal, The Table, and classroom interaction is an effective way to promote and monitor effective progress in individualized project settings.&lt;/p&gt;&#xA;" OwnerUserId="136" LastActivityDate="2017-05-30T01:05:56.177" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="284" PostTypeId="5" CreationDate="2017-05-30T01:13:09.023" Score="0" Body="&lt;p&gt;The old saw of teaching yourself is, &quot;great student, terrible teacher.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions in this category are meant to help fill this gap.  Whether looking for resources, or an ordered list of topics needed to achieve the final goal, these questions are meant to provide assistance to the auto didactically inclined.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-06-22T10:43:41.007" LastActivityDate="2017-06-22T10:43:41.007" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="285" PostTypeId="4" CreationDate="2017-05-30T01:13:09.023" Score="0" Body="Questions regarding teaching a topic to yourself. Use this tag to ask about ways and methods of teaching which apply to teaching yourself." OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-06-22T10:42:43.683" LastActivityDate="2017-06-22T10:42:43.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="286" PostTypeId="2" ParentId="272" CreationDate="2017-05-30T01:34:32.003" Score="5" Body="&lt;p&gt;Here is my system.  I give it top marks for &lt;strong&gt;ease of sharing&lt;/strong&gt;, but one downside is that it does not do any kind of autograding without some scripting on my part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I purchased a paid subscription to Dropbox.  This allows me to set up read-only folders.  At the beginning of the term, I copy/paste all of the names from the course into an Excel spreadsheet and collect an email address from every student for a Dropbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then create a series of folders using a &lt;code&gt;.bat&lt;/code&gt; file (I am a Windows user), generated with a function like &lt;code&gt;=&quot;mkdir &quot;&quot;APCS 1 - &quot;&amp;amp;A2&amp;amp;&quot;, &quot;&amp;amp;B2&amp;amp;&quot;&quot;&quot;&quot;&lt;/code&gt;.  This creates lines like &lt;code&gt;mkdir &quot;APCS 1 - Johnson, Cathy&quot;&lt;/code&gt; I copy and paste this group into a &lt;code&gt;.txt&lt;/code&gt; file, rename it to &lt;code&gt;.bat&lt;/code&gt;, and - voilà! - I can double-click to create a directory for every student in my class section.  I run the batch file in some subdirectory of the &lt;strong&gt;Dropbox&lt;/strong&gt; folder so that they will ultimately be sharable.  I then go through and share each of these folders with the respective student with write privileges. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I create one last folder, something like &lt;code&gt;AP Computer Science Section 1&lt;/code&gt;.  I then copy and paste the email addresses themselves into the share box for this folder, but only allow &lt;strong&gt;read priveleges&lt;/strong&gt;.  Now, I can drop my assignments into to class folder (which is basically instantaneous), and I receive my submissions through their private folders.  I get everything timestamped, and don't have to log into any websites to get the assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One more side-benefit of this arrangement is that when I need to send a file to some student, we already have a shared folder that I can drop it into.  No need for emailed attachments.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-05-30T01:40:36.393" LastActivityDate="2017-05-30T01:40:36.393" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="287" PostTypeId="1" AcceptedAnswerId="7027" CreationDate="2017-05-30T02:20:17.633" Score="6" ViewCount="222" Body="&lt;blockquote&gt;&#xA;&lt;h1&gt;What is a User Script?&lt;/h1&gt;&#xA;&lt;p&gt;Useful tasks like improving layout, fixing bugs, automating common tasks and adding new functions can all be done by userscripts. More complicated userscripts can create mash-ups by combining information from different websites or embedding new data into a web page, e.g. to add reviews or price comparisons to a shopping website.&lt;/p&gt;&#xA;&lt;p&gt;Source: &lt;a href=&quot;https://github.com/OpenUserJs/OpenUserJS.org/wiki/Userscript-beginners-HOWTO#what-is-a-user-script&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/OpenUserJs/OpenUserJS.org/wiki/Userscript-beginners-HOWTO#what-is-a-user-script&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;A user script is programming that modifies the appearance or behavior of an application. A user script for a Web site, for example, can customize the way that content will display in the host browser.&lt;/p&gt;&#xA;&lt;p&gt;Source: &lt;a href=&quot;http://whatis.techtarget.com/definition/user-script&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://whatis.techtarget.com/definition/user-script&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'm planning out a curriculum for my web development class next year, and based on &lt;a href=&quot;https://cseducators.stackexchange.com/questions/172/how-can-i-maintain-interest-in-front-end?noredirect=1#comment429_172&quot;&gt;a comment&lt;/a&gt; by &lt;a href=&quot;https://cseducators.stackexchange.com/users/41/sean-houlihane&quot;&gt;Sean Houlihane&lt;/a&gt; I realized that userscripts could be useful as a teaching tool so that students can see results immediately, and actually make use of their front-end skills as soon as they know the basics.&lt;/p&gt;&#xA;&lt;p&gt;Before I would introduce my students to this, they'd have to understand the basics of HTML/CSS/JS. If my students already have basic knowledge, how useful could userscripts be as a teaching tool and what are some ways in which I could use them?&lt;/p&gt;&#xA;&lt;p&gt;Some potential issues that I foresee are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It'll be complicated. For a major website, the stylesheet could be thousand LoC.&lt;/li&gt;&#xA;&lt;li&gt;Minification. Especially for JS. It makes it very challenging to modify existing code if it has been minified. Even when re-prettified, it can still have terrible variable and method naming.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Working around these issues, what are some uses for userscripts as a teaching tool and in the classroom?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2021-07-30T23:36:38.533" Title="Are userscripts a good teaching tool?" Tags="|lesson-ideas|web-development|front-end|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="288" PostTypeId="2" ParentId="113" CreationDate="2017-05-30T02:31:25.610" Score="4" Body="&lt;p&gt;I think that it's relevant to mention the ADEPT method of teaching here...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/C8KIk.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/C8KIk.png&quot; alt=&quot;ADEPT Methodology&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps one of the best ways I've found to explain these concepts to students is that of human anatomy... head, body, feet (foot).&lt;/p&gt;&#xA;" OwnerUserId="241" LastEditorUserId="241" LastEditDate="2017-10-30T01:17:11.537" LastActivityDate="2017-10-30T01:17:11.537" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="289" PostTypeId="2" ParentId="287" CreationDate="2017-05-30T07:01:49.377" Score="3" Body="&lt;p&gt;I think there's one step between knowledge of HTML/CSS and writing userscripts: knowledge of Developer Tools in Chrome, especially the &quot;Elements&quot; tab. One demonstration students loved seeing was when I &quot;changed&quot; the school website. I simply right-clicked, selected &quot;Inspect&quot;, and modified the text. I had to explain to students that I didn't really change the page but that I modified it locally and could &quot;restore&quot; it by refreshing, but it was a lasting demonstration, something they continued to bring up throughout the semester. (This demo also relates to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/93/how-can-i-teach-introduce-modern-web-development-in-an-introductory-programming&quot;&gt;what I said here about the value of CodePen&lt;/a&gt; because you can see your work live.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if there are thousands of LoC, you can get right to where your element is and see the entire path down the &quot;tree&quot; to this element. One fun demonstration is to show students how to &quot;delete&quot; a pop-up from a site or remove an ad or some other obstruction/intrusion by inspecting the page to &quot;search and destroy&quot; what you want to get rid of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider Bloom's taxonomy here. You have an opportunity to move up the ladder as follows: &lt;code&gt;Comprehension/Knowledge (basic HTML/CSS) --&amp;gt; Application/Analysis (Developer Tools/Inspect) --&amp;gt; Synthesis/Creation (Userscripts)&lt;/code&gt;. This progression is important to keep in mind so as to adequately prepare students for creating something meaningful of their own, and I think the study of how popular sites are structured will aid in this process. Hacking away for fun at a page may give them an idea for what would be cool to script themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The teaching benefit is such that you can unleash students' seemingly unlimited creativity as they write helpful scripts for their own personal browsing experience. Yet, as you note, it does not come without challenges and must be approached methodically.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-30T07:01:49.377" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="290" PostTypeId="2" ParentId="248" CreationDate="2017-05-30T09:12:45.780" Score="5" Body="&lt;p&gt;First let me say that I think it is a good idea to automate as much as possible, and that there are tools that will help this.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The mystery test&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;However my experience with professionals is that there will always be a few that try to defeat the checker, not maliciously (they just don't get it; they are minimising error-messages, not minimising errors). So full automation may not be possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Add a few unpublished tests: If pupils meet the specification the test will pass, but you don't tell them the test or the result until grades are awarded.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Style award&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You don't need to spend a lot of time on the manual part. If the style is good then it should make sense immediately (top marks), or mostly make sense (medium), does that work? (zero marks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Award a style grade 0,1 or 2 based on a quick look at the code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Big-O&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have seen on &lt;a href=&quot;https://codility.com/programmers/lessons/1-iterations/&quot; rel=&quot;noreferrer&quot;&gt;codility&lt;/a&gt; where they automate everything. There last test is always to check &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_O_notation&quot; rel=&quot;noreferrer&quot;&gt;big-O&lt;/a&gt;. They run the code on a big data set, to check that run time does not increase worse then expected. They always tell the candidate what big-O to aim for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always have a test to check big-O. Tell pupils upfront, that order to expect.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-05-30T09:12:45.780" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="291" PostTypeId="2" ParentId="203" CreationDate="2017-05-30T10:09:05.790" Score="5" Body="&lt;p&gt;If the students in this course are the same ones, or similarly educated, that finished the last course, you could be over thinking the issue. They don't yet have the exposure to &lt;em&gt;know&lt;/em&gt; they want to become programmers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Design the next course as an &lt;em&gt;Introduction to Programming&lt;/em&gt;. To borrow from the course catalog for &lt;a href=&quot;http://www.kctcs.edu/~/media/System_Office/student/2016-17%20Catalog/221-384_Course_Descriptions_KCTCSCatalog_2016-17.ashx&quot; rel=&quot;noreferrer&quot;&gt;KCTCS&lt;/a&gt; pg. 253:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Computational Thinking&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Promotes understanding of computer programming and &#xA;  logic by teaching students to think like a computer. Covers &#xA;  skills needed to develop and design language-independent &#xA;  solutions to solve computer-related problems. Covers &#xA;  development and design basics including use of variables, &#xA;  control and data structures, and principles of command-&#xA;  line and object-oriented languages.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That should give the enough knowledge to choose programming as a second career if they want. As an alternative, you could do web page development. That gives a faster return on their work, and allows you to also cover programming using JavaScript. Web page creation is something that more of your audience can potentially utilize in personal life, without having to make a career out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a third course you could get into the theory and &quot;nitty-gritty&quot; of programming.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-05-30T10:09:05.790" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="292" PostTypeId="2" ParentId="261" CreationDate="2017-05-30T10:34:10.203" Score="3" Body="&lt;p&gt;An example of &lt;code&gt;static&lt;/code&gt;, &quot;preferably something that high-school students can relate to and understand&quot;, would be the instructor. Each period for the &lt;code&gt;Computer&lt;/code&gt; class has different students, different times, maybe different assignments (to prevent cheating) but the instructor stays the same. It's still a member, since the &lt;code&gt;English&lt;/code&gt; class has a different instructor (also &lt;code&gt;static&lt;/code&gt; to the &lt;code&gt;English&lt;/code&gt; class, of course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Side benefit: you can also use the keyword &lt;code&gt;class&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="58" LastEditDate="2017-05-30T10:53:05.670" LastActivityDate="2017-05-30T10:53:05.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="293" PostTypeId="2" ParentId="120" CreationDate="2017-05-30T10:55:53.130" Score="5" Body="&lt;p&gt;Based on the comments, the minimum for theory and technical is how the nomenclature of MS Access relates to Excel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they've been doing everything in Excel anyway, they've developed habits for, or against, normalization that you're not going to break in a couple days, intensive or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they haven't discovered the pitfalls of redundant data in Excel, they probably won't in MS Access either. If they have, then they've already learned the lesson, and developed their own methods of &quot;normalization.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can bring it up, and have resources available for them to access, online in their own time, if they develop the interest in &quot;doing it right.&quot; Otherwise, concentrate on helping them become fluent in MS Access, an hopefully reduce the calls for help you get when they don't remember &lt;em&gt;how that works&lt;/em&gt; in two weeks.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-05-30T10:55:53.130" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="294" PostTypeId="2" ParentId="4" CreationDate="2017-05-30T11:11:57.507" Score="7" Body="&lt;p&gt;A benefit to OOP often overlooked is encapsulation. The object has data and methods (knows things and does things) that elements outside the object neither have access to, nor even know exists. Only the exposed elements (methods) can be used by other elements to get the expected results. (However that happens.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build the lab around the &quot;mystery&quot; of an object's contents. Create a class they can implement, without having the source, only the methods. Have them experiment with that interface to see how easy it is to get results without having to create the &quot;inner workings&quot; of the object. Then have them recreate that class. The only requirements being that it look and act the same from outside the class. How they get it to generate the same results is independent work. Lastly, compare different versions, having the students swap their version with other students' versions and see the possibilities of interoperability, and the beginnings of how &quot;libraries&quot; are built and maintained.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-05-30T11:11:57.507" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="295" PostTypeId="2" ParentId="7" CreationDate="2017-05-30T12:03:08.027" Score="12" Body="&lt;h1&gt;Yes, the first algorithms class should be taught in pseudo-code&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;(And teach logic tables too.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the objective of the class is to teach algorithms and programming, not a programming language, the pseudo-code is the way to focus on the objectives, not the tools. Flow charting &lt;em&gt;can&lt;/em&gt; be included, but need not be either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programs written in pseudo-code don't have syntax errors, or compile-time errors. They don't have strict type-classing or confusingly abbreviated function names. They only have logic and design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a program is written in pseudo-code it can be &quot;run&quot; on your desktop, the real one, not the metaphor created by Xerox (yes, Xerox, in 1970). Doing such a so-called &quot;Hand-check&quot; helps find logic errors and develops a better understanding of programming theory than jumping right into a formal language, no matter how &quot;simple&quot; it is. It's also a convenient skill to have as a functioning programmer for the occasions when logic error do get compiled and the environment does not include a step debugger. Some employers still test for that skill. (see the &lt;a href=&quot;https://www.kent.ac.uk/careers/tests/computer-test.htm&quot; rel=&quot;noreferrer&quot;&gt;University of Kent's remarks&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For simple instruction on how to hand-check code see &lt;a href=&quot;http://users.csc.calpoly.edu/~jdalbey/101/Resources/codetrace.html&quot; rel=&quot;noreferrer&quot;&gt;this&lt;/a&gt; from Dr. John Dalbey of CalPoly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, to allow a veteran educator to weigh in I'll mention the &lt;a href=&quot;https://blogs.msdn.microsoft.com/alfredth/2007/06/22/programming-proverbs-21-hand-check-the-program-before-running-it/&quot; rel=&quot;noreferrer&quot;&gt;blog of Alfred Thompson about Hand-checking&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until computers can do &lt;em&gt;what we mean&lt;/em&gt; we have to live with them doing &lt;em&gt;what we tell them&lt;/em&gt;, and that's going to involve errors in how we say what we mean.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="793" LastEditDate="2017-06-15T16:49:39.820" LastActivityDate="2017-06-15T16:49:39.820" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="296" PostTypeId="2" ParentId="282" CreationDate="2017-05-30T15:23:55.290" Score="5" Body="&lt;p&gt;You could show them the results with a given heuristics function, that has a single parameter which impacts how the heuristic function affects the cost estimate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;estimate = D * (horizontal_distance + vertical_distance)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;where the &lt;code&gt;distance&lt;/code&gt; is the one between the current node and the goal (quite straight forward in a maze, albeit not such a good choice for the heuristic)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, &lt;code&gt;D&lt;/code&gt; is a parameter that will, in essence, decide how influential the heuristic is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use this example with a number of different &lt;code&gt;D&lt;/code&gt; values and show the student how the chosen path changes (if it finds it at all) as you change &lt;code&gt;D&lt;/code&gt;. This will show the students how the heuristic changes the decision making. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another heuristic you could use is one that counts the number of steps, in the direction of the goal, that can be taken before the solver hits a wall of the maze (the usefulness depends on how dense the maze is).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-05-30T15:23:55.290" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="297" PostTypeId="5" CreationDate="2017-05-30T15:53:25.070" Score="0" Body="&lt;p&gt;Assembly is a low-level programming language which closely corresponds to computer instructions. There are many different varieties of assembly languages which are each for different processors.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-12T04:45:06.580" LastActivityDate="2017-06-12T04:45:06.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="298" PostTypeId="4" CreationDate="2017-05-30T15:53:25.070" Score="0" Body="For questions about teaching any assembly language or teaching hardware level concepts where a knowledge of assembly would be relevant. Use this tag only when the language used would affect the question significantly (if your question uses an assembly language as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-06-13T15:00:09.473" LastActivityDate="2017-06-13T15:00:09.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="299" PostTypeId="1" CreationDate="2017-05-30T16:39:13.243" Score="8" ViewCount="958" Body="&lt;p&gt;Thanks to feedback in &lt;a href=&quot;https://cseducators.stackexchange.com/questions/211/lesson-idea-arrays-pointers-and-syntactic-sugar&quot;&gt;this thread&lt;/a&gt;, I'm beginning to plan how to integrate a &lt;strong&gt;basic&lt;/strong&gt; introduction to pointers into my unit on arrays. Here's a sample program I just wrote up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;&#xA;int main(void)&#xA;{&#xA;    int number = 42;&#xA;    printf(&quot;Value of number: %d\n&quot;, number);&#xA;    printf(&quot;Address of number: %p\n&quot;, &amp;amp;number);&#xA;&#xA;    int *pNumber = &amp;amp;number;&#xA;    printf(&quot;Value of number pointer: %p\n&quot;, pNumber); &#xA;    printf(&quot;Value at address of number pointer: %d\n&quot;, *pNumber);    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will probably add comments before actually presenting it and making it available to students. Seeing how the address of &lt;code&gt;number&lt;/code&gt; and the value of &lt;code&gt;pNumber&lt;/code&gt; always correspond will hopefully reinforce how pointers work. The first and last line will match as well. The idea is to show as clear and simple an example as possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question comes in two parts:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Is this an appropriate example for introducing pointers?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you have suggestions for similar simple examples of basic pointer&#xA;usage?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="76" LastEditorUserId="283" LastEditDate="2017-07-19T17:02:09.747" LastActivityDate="2021-03-28T16:40:19.440" Title="Simple Pointer Examples in C" Tags="|lesson-ideas|c|pointers|code-example|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="300" PostTypeId="5" CreationDate="2017-05-30T17:04:52.757" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-30T17:04:52.757" LastActivityDate="2017-05-30T17:04:52.757" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="301" PostTypeId="4" CreationDate="2017-05-30T17:04:52.757" Score="0" Body="Questions about using concrete code examples when teaching." OwnerUserId="76" LastEditorUserId="58" LastEditDate="2017-05-31T14:25:15.213" LastActivityDate="2017-05-31T14:25:15.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="302" PostTypeId="1" CreationDate="2017-05-30T19:43:37.223" Score="14" ViewCount="2095" Body="&lt;p&gt;I first heard of Parsons Problems thanks to &lt;a href=&quot;http://csteachingtips.org/tip/use-parsons-problems-quizzes-and-tests-assess-student-understanding-code&quot; rel=&quot;noreferrer&quot;&gt;CS Teaching Tips&lt;/a&gt;. They define these problems as follows:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Parsons problems are problems where students build programs from&#xA;  ordering small chunks of provided code.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;An example can be found &lt;a href=&quot;http://runestoneinteractive.org/LearningAtScale/parsons.html&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I research these, I see very little in terms of classroom resources. I find a handful of articles discussing them but not many examples of them in practice. On the surface, these problems -- emphasizing logic and structure separate from syntax -- could be a great activity at varying levels of experience and ability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What skills or concepts have you used (or would you use) Parsons Problems to teach/reinforce?&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-29T06:11:35.770" LastActivityDate="2018-03-04T19:41:32.780" Title="Effectiveness of Parsons Problems" Tags="|lesson-ideas|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="303" PostTypeId="2" ParentId="235" CreationDate="2017-05-30T21:07:37.760" Score="3" Body="&lt;p&gt;Most audio analysis would be done in the frequency domain. Signal (including audio) can be seen as a set of samples in the time domain, or the frequency domain. Fourier showed that any signal can be created by adding together a set of sine waves. Often it is easier to analyse a signal in the frequency domain, especially questions about frequency, such as meter (I am not 100% sure what this is, but from the wikipedia article on meter, it seems to be a frequency thing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I would suggest, that a &lt;a href=&quot;https://en.wikipedia.org/wiki/Fast_Fourier_transform&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fourier transform&lt;/a&gt; would be one of the early steps. Then the rest of the code would be analysing frequencies. There are usually good libraries (they exist for C and python, I am not sure about other languages), for doing this.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="2" LastEditDate="2017-06-18T11:50:29.283" LastActivityDate="2017-06-18T11:50:29.283" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="304" PostTypeId="2" ParentId="14" CreationDate="2017-05-30T21:34:18.510" Score="2" Body="&lt;p&gt;In addition to all of the great answers here, one further tool to consider is MOSS (Measure of Software Similarity), which has been released for free to educators by Stanford: &lt;a href=&quot;https://theory.stanford.edu/~aiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://theory.stanford.edu/~aiken/moss/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can currently analyze code in C, C++, Java, C#, Python, Visual Basic, Javascript, FORTRAN, ML, Haskell, Lisp, Scheme, Pascal, Modula2, Ada, Perl, TCL, Matlab, VHDL, Verilog, Spice, MIPS assembly, a8086 assembly, a8086 assembly, MIPS assembly, and HCL2.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-30T21:34:18.510" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="305" PostTypeId="2" ParentId="299" CreationDate="2017-05-30T23:34:36.720" Score="6" Body="&lt;p&gt;What you have there is an excellent start, and is completely appropriate.  I would go next into a puzzle to try to get them hooked.  I would type the following code in front of them on your projector, and ask them to pair with a neighbor to try to figure out what will happen next.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;(Note, for this to work properly, you must turn off stack security in &lt;code&gt;gcc&lt;/code&gt;, which according to &lt;a href=&quot;https://unix.stackexchange.com/a/46721&quot;&gt;this somewhat dated post&lt;/a&gt; might involve the flags &lt;code&gt;-fno-stack-protector&lt;/code&gt; and &lt;code&gt;-fno-stack-protector-all&lt;/code&gt;.)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;&#xA;int main() {&#xA;    int a = 15;&#xA;    int b = 30;&#xA;    int c = 45;&#xA;&#xA;    int *whatsthis = &amp;amp;a;&#xA;    printf(&amp;quot;whatsthis is: %d\n&amp;quot;,*whatsthis);&#xA;&#xA;    whatsthis = whatsthis + 4;&#xA;    printf(&amp;quot;whatsthis is: %d\n&amp;quot;,*whatsthis);&#xA;&#xA;    return 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;em&gt;(Depending on your compiler and environment, you may have to muck around with the code a bit to get &lt;code&gt;45&lt;/code&gt; as your output for the second &lt;code&gt;printf&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;If your kids are like mine, they probably won't be able to figure this out.  But once you compile it and execute, ask them to go back to their neighbor and try to figure out what in the world happened.&lt;/p&gt;&#xA;&lt;p&gt;At this point, several of the groups should be able to figure out that it has something to do with the ints being stored next to each other, and, if pressed just a bit, that the number &lt;code&gt;4&lt;/code&gt; was derived using the byte size of an &lt;code&gt;int&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This gives you a perfect segue into arrays.  Since you're taking all of this trouble to go into some depth (using references to get at arrays), I would try for a few takeaways from the lesson:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pointer arithmetic means changing the address you're looking at.&lt;/li&gt;&#xA;&lt;li&gt;The actual formula used to find the location of spot &lt;code&gt;n&lt;/code&gt; in an array (which shows why that first address needs to be &lt;code&gt;0&lt;/code&gt;: &lt;code&gt;(startlocation + (n * itemsize))&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Therefore, indexing in arrays can be characterized as a distance from the start.&lt;/li&gt;&#xA;&lt;li&gt;Array items are packed together with &lt;em&gt;no wasted space&lt;/em&gt; and &lt;em&gt;no separators&lt;/em&gt; between the data.&lt;/li&gt;&#xA;&lt;li&gt;That, in fact, these are the &lt;em&gt;only two tools that computers possess&lt;/em&gt; to locate themselves in memory: having items packed next to each other so that they can go from one item to the next, to the next, or saving pointers in memory so that we can go back to places later.  Every other thing that computers do with memory can be reduced to one of these two actions.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-03-28T16:40:19.440" LastActivityDate="2021-03-28T16:40:19.440" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="306" PostTypeId="2" ParentId="14" CreationDate="2017-05-30T23:49:18.470" Score="2" Body="&lt;p&gt;I just got a chance to read the article you linked to. As a teacher of CS50 AP, I can attest to the numerous solutions that are available online for all things CS50. It's almost unfair for a student trying to remain ethical when Google suggests appending &quot;solution&quot; to a query like &quot;cs50 mario.&quot; Even a search without &quot;solution&quot; will often return a link to code on GitHub before the actual CS50 pset specs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few things I will do next year...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Continue to allow students to exercise the &quot;regret clause&quot; as I did&#xA;this year&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Utilize revision history - the Cloud9 IDE has a full history of each&#xA;keystroke with a timestamp as a sort of built-in version control&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add just enough variation to assignments to distinguish one section's&#xA;specs from the other and from CS50 itself&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Grade the code but weigh more heavily reflection assignments on that&#xA;code/assignment&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As I prepare students for the AP Exam, I have to give them practice with written responses on their code for the Explore Task. I plan on assigning reflection components and looking more closely at comments that document student thinking and trying to grade process over product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paramount to all of this though is creating a classroom where students genuinely want to work through programming challenges. They have to know they will receive support when they struggle and hit a road block. I do my best to be available via office hours, especially before a big assignment is due, and sometimes knowing that they have a place to look for help other than Google makes a big difference.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-30T23:49:18.470" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="307" PostTypeId="1" CreationDate="2017-05-30T23:54:56.270" Score="11" ViewCount="377" Body="&lt;p&gt;One of the problems that my students will stumble upon every year is trying to create or initialize variables within an &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; block.  Why, oh why, can't they perform an operation like this?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (someBooleanCondition){&#xA;    int x = 7;&#xA;} else {&#xA;    int x = 0;&#xA;}&#xA;System.out.println(x);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After all, they reason that &lt;code&gt;x&lt;/code&gt; has been created and initialized &lt;em&gt;no matter what&lt;/em&gt;. This year, I discovered a nice way of explaining why this operation does not work. I will be posting my answer below, and I am also curious to see if others have different explanations that they use with their students (or corrections to mine).&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-21T16:07:33.210" LastActivityDate="2017-08-04T12:43:27.167" Title="How to illustrate scope problem when creating variables inside `if` statements in Java" Tags="|java|ap-computer-science-a|scope|" AnswerCount="7" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="308" PostTypeId="2" ParentId="307" CreationDate="2017-05-31T00:15:03.513" Score="5" Body="&lt;p&gt;I teach my students a bit about the stack as part of the very first lesson of the year.  As a result, &lt;em&gt;they are aware coming in&lt;/em&gt; that primitive variables are stored next to one another in the stack during runtime, and that the names of the primitive variables that we use in our code are removed by the compiler, and replaced with memory locations.  They are also aware by this time that the stack is populated in the order in which variables are declared.  Thus, I show them the following code, and ask a simple question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (someBooleanCondition){&#xA;    int v = 18;&#xA;    int x = 7;&#xA;} else {&#xA;    int x = 0;&#xA;    int v = o;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If we now wanted to run &lt;code&gt;System.out.println(x)&lt;/code&gt;, it is true that &lt;code&gt;x&lt;/code&gt; has a &lt;em&gt;value&lt;/em&gt;, but what is its &lt;em&gt;location&lt;/em&gt;?  If &lt;code&gt;someBooleanCondition&lt;/code&gt; is true, &lt;code&gt;x&lt;/code&gt; will be at the higher of the two addresses, whereas if it is false, &lt;code&gt;x&lt;/code&gt; will be at the lower of the two addresses  How would the compiler know where to direct &lt;code&gt;System.out.println&lt;/code&gt; to find &lt;code&gt;x&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, the scope of variables declared during &lt;code&gt;if&lt;/code&gt; statements must be local to that &lt;code&gt;if&lt;/code&gt; statement, and cannot be used outside of it.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-05-31T00:15:03.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="309" PostTypeId="2" ParentId="299" CreationDate="2017-05-31T02:04:29.940" Score="8" Body="&lt;p&gt;I would teach the use of arrays and array indices first (with pictures of a long row of physical mailboxes, or school lockers, etc.)  Then later explain that all of a computer's and/or C program's (process) memory can be thought of as one big array with a pointer being a form of index (locker number) into that (virtual) memory array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then draw a picture of how arrays of char (bytes) might be allocated in memory.  And then show why pointers might be necessary in order to tell a standard string function how to find (or modify) a substring in an arbitrary C string array.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-07-19T20:04:53.757" LastActivityDate="2017-07-19T20:04:53.757" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="310" PostTypeId="2" ParentId="307" CreationDate="2017-05-31T04:18:12.533" Score="8" Body="&lt;p&gt;I like to use an analogy from &lt;em&gt;Finding Nemo&lt;/em&gt;.  I tell them their programming language has the same problem Dory has - short-term memory loss.  When a variable is declared within a block, Java will forget about the variable (just like Dory) after reaching the end of the the block.  So a block declares the &quot;scope&quot; of Dory's short term memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been concerned that students would think that the variables assigned in a block would lose their value after the block has ended, but I've never run into that problem for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's interesting about your example is that it won't even compile without the print statement!  Java doesn't allow you to have a single declaration statement in an if or loop.&lt;/p&gt;&#xA;" OwnerUserId="265" LastEditorUserId="76" LastEditDate="2017-07-21T16:41:22.130" LastActivityDate="2017-07-21T16:41:22.130" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="311" PostTypeId="2" ParentId="307" CreationDate="2017-05-31T06:12:58.940" Score="6" Body="&lt;p&gt;I explain this with a saying:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What happens in the block stays in the block&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now, this isn't exactly how it works, but the idea is that the students remember that what they create in a block, is accessible only inside the block. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(shouldGoIntoBlock){&#xA;    int x=10;//created in the block&#xA;    System.out.println(&quot;printed from if body: &quot;+ x);&#xA;else{&#xA;    int x=-7;//created in the block&#xA;    System.out.println(&quot;printed from else body: &quot;+ x);&#xA;}&#xA;System.out.println(&quot;printed outside of blocks: &quot;+x);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And they see in eclipse that the last print errors in compile time. That shows them that &lt;code&gt;what's created in the block stays in the block&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I show them that there will also be an error if we define &lt;code&gt;x&lt;/code&gt; before the &lt;code&gt;if-else&lt;/code&gt; block, but the last line won't error. So they see that order of creation matters. Afterwards, I show them that creating &lt;code&gt;x&lt;/code&gt; &lt;strong&gt;after&lt;/strong&gt; the &lt;code&gt;if-else&lt;/code&gt; block and &lt;strong&gt;before&lt;/strong&gt; the last print, then there are no errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The vast majority of the students understand the idea this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They don't learn the stack segment of the computer at that time, but they see that order matters, and that makes learning about the stack easier for them when they learn it later in the year.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-05-31T06:12:58.940" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="312" PostTypeId="2" ParentId="302" CreationDate="2017-05-31T06:28:35.547" Score="1" Body="&lt;p&gt;I would use it to introduce them to working on large projects, that incorporate many parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Parsons Problems force the students to think how separate code segments bond and interact. They would have to think about getting those parts to work together. This teaches them the mindset of working on large projects. It can be used to teach them proper structure of projects: Every part of the project is stored in a separate package, and Parsons Problems are convenient to teach them that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could give them a repository of code segments, that can only be changed a bit, and they need to use some or all of those segments in order to create a program of your choosing (e.g. a simple chat with gui, hangman with gui or other programs that have more than one part). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, making it into a group-project would teach them how to work together and divide the work on the different parts between the group members.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-05-31T06:28:35.547" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="313" PostTypeId="5" CreationDate="2017-05-31T07:01:23.797" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/HTML&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML&lt;/a&gt; (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was invented by Sir &lt;a href=&quot;https://en.wikipedia.org/wiki/Tim_Berners-Lee&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tim Berners-Lee&lt;/a&gt; while at &lt;a href=&quot;https://en.wikipedia.org/wiki/CERN&quot; rel=&quot;nofollow noreferrer&quot;&gt;CERN&lt;/a&gt; to enable researchers to share their findings. The latest version for HTML is &lt;a href=&quot;https://www.w3.org/TR/html/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML5.1&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts written in languages such as JavaScript which affect the behavior of HTML web pages.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Syntax&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;HTML is written in the form of elements consisting of tags (and their attributes) enclosed in angle brackets (e.g., &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;), within the web page content. Angle brackets are also referred to as left and right guillemets or chevrons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML tags most commonly come in pairs. The first is known as the &lt;em&gt;opening tag&lt;/em&gt; and the second, which includes a forward slash, as the &lt;em&gt;closing tag&lt;/em&gt; (e.g., &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;). Various types of content, such as text or additional HTML elements, can be contained within these tags. Some tags, however, are unpaired, and these are known as &lt;em&gt;empty elements&lt;/em&gt; or &lt;em&gt;self-closing&lt;/em&gt; tags. They may or may not include the slash (e.g., &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All these tags are used collectively to form an HTML document. Web browsers read these documents, interpret each of their HTML tags, and then render the corresponding visual and/or audible display in the form of a webpage.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Standards&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;HTML standards, as well as those for many other web technologies, are maintained by the &lt;a href=&quot;http://www.w3.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;World Wide Web Consortium&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML4 was introduced in 1997, and the latest iteration, HTML5, was recently developed by the W3C. What W3C calls &lt;em&gt;HTML5&lt;/em&gt; is a subset of the HTML-Living-Standard which is specified by the &lt;a href=&quot;https://whatwg.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Web Hypertext Application Technology Working Group&lt;/a&gt; (WHATWG).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The language specification and standards documents for HTML5 are &lt;a href=&quot;http://www.w3.org/TR/html5/&quot; rel=&quot;nofollow noreferrer&quot;&gt;available online&lt;/a&gt; from the W3C.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;FAQ&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_element_list&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML5 Elements List&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/documentation/html/topics&quot;&gt;HTML documentation on Stack Overflow&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;References:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.w3.org/wiki/HTML/Specifications&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C HTML/Specifications&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.w3schools.com/default.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3Schools Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://html.spec.whatwg.org/multipage/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML-Living-Standard&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://validator.w3.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C HTML Validator&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en/HTML/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML Reference at the Mozilla Developer Network (MDN)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.webplatform.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;WebPlatform&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://dev.windows.com/en-us/microsoft-edge-for-devs&quot; rel=&quot;nofollow noreferrer&quot;&gt;Web development features - IE Dev Center&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://reference.sitepoint.com/html&quot; rel=&quot;nofollow noreferrer&quot;&gt;SitePoint HTML Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.way2tutorial.com/html/tutorial.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;Way2Tutorial HTML Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.w3.org/community/webed/wiki/Main_Page&quot; rel=&quot;nofollow noreferrer&quot;&gt;Web Education Community Group Wiki&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.w3.org/TR/WCAG20/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C Web Content Accessibility Guidelines&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://dev.w3.org/html5/html-author/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML5 Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Free HTML Books:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.info/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dive Into HTML5&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.htmldog.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML Dog Tutorials&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://learn.shayhowe.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Shay Howe's Learn to Code HTML &amp;amp; CSS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://chimera.labs.oreilly.com/books/1234000001654/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML5 Canvas&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2017-05-31T10:34:03.857" LastActivityDate="2017-05-31T10:34:03.857" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="314" PostTypeId="4" CreationDate="2017-05-31T07:01:23.797" Score="0" Body="Use this tag for questions about teaching HTML or using HTML in the classroom. DO NOT use this tag for questions or help with HTML itself.  HTML (Hyper Text Markup Language) is the standard markup language used for structuring web pages and formatting content. HTML describes the structure of a website semantically along with cues for presentation, making it a markup language, rather than a programming language." OwnerUserId="104" LastEditorUserId="27" LastEditDate="2019-05-17T10:28:42.143" LastActivityDate="2019-05-17T10:28:42.143" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="315" PostTypeId="5" CreationDate="2017-05-31T07:03:21.210" Score="0" Body="&lt;p&gt;The curriculum in CS courses determines what the students learn in the course, as well as the order. It is important for the the order of subjects to be chosen wisely, to create continuity in the learning and to provide review of past material and new material that builds upon past material in equal measure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions tagged with this tag are related to structuring a curriculum, and should contain the context or level of the students. The curriculum outlines the skills, performances, attitudes, and values students are expected to learn from schooling. It includes statements of desired student outcomes, descriptions of materials, and the planned sequence that will be used to help students attain the outcomes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Curriculum can be ordered into a &lt;a href=&quot;https://en.wikipedia.org/wiki/Curriculum#Definitions_and_interpretations&quot; rel=&quot;nofollow noreferrer&quot;&gt;procedure&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Diagnosis of needs - what the course is supposed to teach.&lt;/li&gt;&#xA;&lt;li&gt;Formulation of objectives - what has to be taught in order to get to the goal defined in step 1.&lt;/li&gt;&#xA;&lt;li&gt;Selection of content - which subjects should be covered.&lt;/li&gt;&#xA;&lt;li&gt;Organization of content - in what order should the subjects be taught.&lt;/li&gt;&#xA;&lt;li&gt;Selection of learning experiences - how should each subject be taught.&lt;/li&gt;&#xA;&lt;li&gt;Organization of learning experiences - organizing the lessons and exercises for each subject.&lt;/li&gt;&#xA;&lt;li&gt;Determination of what to evaluate and of the ways and means of doing it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On this site, questions generally relate to steps 4,5 and 6.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="2395" LastEditDate="2017-08-03T19:57:25.843" LastActivityDate="2017-08-03T19:57:25.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="316" PostTypeId="4" CreationDate="2017-05-31T07:03:21.210" Score="0" Body="The curriculum of a Computer Science course is a sequence of planned subjects that the students will be taught in the course. This tag should be used for questions asking for guidance on designing parts of that sequence, the entire sequence or questions related to the preferred order in which to teach subjects. Question relating to a single lesson should NOT receive this tag." OwnerUserId="150" LastEditorUserId="2395" LastEditDate="2017-08-03T19:57:38.900" LastActivityDate="2017-08-03T19:57:38.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="317" PostTypeId="5" CreationDate="2017-05-31T07:12:19.923" Score="0" Body="&lt;p&gt;&lt;a href=&quot;//wikipedia.org/wiki/Cascading_Style_Sheets&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/a&gt;, or &lt;strong&gt;Cascading Style Sheets&lt;/strong&gt;, is a language used to control the visual presentation of documents written in a markup language, including &lt;strong&gt;HTML&lt;/strong&gt;, &lt;strong&gt;XML&lt;/strong&gt;, &lt;strong&gt;XHTML&lt;/strong&gt;, &lt;strong&gt;SVG&lt;/strong&gt; and &lt;strong&gt;XUL&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The visual presentation of HTML was originally defined by HTML attributes, but HTML 4 deprecated these attributes as CSS was introduced to separate the control of the visual presentation from content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A basic CSS document is made of rule sets. Each rule set starts with a &lt;a href=&quot;//www.w3.org/TR/css3-selectors/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;selector&lt;/strong&gt;&lt;/a&gt;, a pattern that matches elements in an &lt;strong&gt;HTML&lt;/strong&gt; or &lt;strong&gt;XML&lt;/strong&gt; document, and is followed by a block of zero or more property declarations that define the presentation of the matching elements. For example:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* This is a comment */ &#xA;&#xA;a {                             /* Select all &amp;lt;a&amp;gt; elements (HTML links), */&#xA;    color: orange;              /* change their text color to orange, */&#xA;    background-color: pink;     /* their background color to pink, */&#xA;    text-decoration: none;      /* and remove the underline. */&#xA;}&#xA;&#xA;a:hover {                       /* Select all &amp;lt;a&amp;gt; elements which are currently being hovered over */&#xA;    color: red;                 /* change the color to red */&#xA;    text-decoration: underline; /* and add an underline again */&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The simple example above also illustrates the &lt;em&gt;cascading&lt;/em&gt; element of CSS. When you hover over a link (i.e., an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element) in &lt;a href=&quot;//www.htmldog.com/guides/cssbeginner/applyingcss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;an HTML page with this style sheet applied to it&lt;/a&gt;, &lt;em&gt;both&lt;/em&gt; rules apply. Because of the first rule, the link will have a pink background. But, since the &lt;code&gt;a:hover&lt;/code&gt; selector is more specific, its &lt;code&gt;color&lt;/code&gt; and &lt;code&gt;text-decoration&lt;/code&gt; properties override those from the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; rule set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;//www.w3.org/TR/CSS2/cascade.html#cascade&quot; rel=&quot;nofollow noreferrer&quot;&gt;cascading order&lt;/a&gt; defines how &lt;a href=&quot;//www.stuffandnonsense.co.uk/archives/css_specificity_wars.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;specificity&lt;/a&gt; and other factors determine which property value is applied to an element.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Selector precedence and specificity&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Each component of a CSS selector can be based on one of three possible attributes of an HTML element:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The element's ID (from the &lt;code&gt;id&lt;/code&gt; attribute)&lt;/li&gt;&#xA;&lt;li&gt;The name of one of the element's classes (in the &lt;code&gt;class&lt;/code&gt; attribute)&lt;/li&gt;&#xA;&lt;li&gt;The element's tag name&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Selectors using an ID selector have higher priority than selectors using class names, and selectors using a class name have higher priority than selectors using tag names. This is called selector precedence. &lt;code&gt;!important&lt;/code&gt; can be used to override the selector precedence. Whenever possible though, higher specificity should always be used instead of &lt;code&gt;!important&lt;/code&gt;, in order to prevent overrides on any other styles that might need to be added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Creates an anchor with a class of class1 and an ID of anchor1 --&amp;gt;&#xA;&amp;lt;a class=&quot;class1&quot; id=&quot;anchor1&quot;&amp;gt;Sample&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a {                 /* any anchor element */&#xA;    color: orange;&#xA;}&#xA;&#xA;.class1 {           /* any element with class name class1 */&#xA;    color: red;&#xA;}    &#xA;&#xA;#anchor1 {          /* the element with id anchor1 */&#xA;    color: green;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&#xA;&#xA;&lt;p&gt;In the above example, the color of the string &quot;Sample&quot; will be green.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repeated occurrences of the same selector also increase specificity, as noted in the &lt;a href=&quot;http://www.w3.org/TR/css3-selectors/#specificity&quot; rel=&quot;nofollow noreferrer&quot;&gt;Selectors Level 3 W3C Recommendation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.class1.class1 {    /* repeated class selector */&#xA;    font-weight: bold;&#xA;}&#xA;&#xA;.class1 {&#xA;    font-weight: normal;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here the repeated selector has higher specificity than the singular selector and the &lt;code&gt;font-weight&lt;/code&gt; of our sample string will be bold.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;//developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Cascade_and_inheritance#Specificity&quot; rel=&quot;nofollow noreferrer&quot;&gt;MDN&lt;/a&gt;,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Specificity is basically a measure of how specific a selector is — how many elements it could match. [...] element selectors have low specificity. Class selectors have a higher specificity, so [classes] will win against element selectors. ID selectors have an even higher specificity, so [IDs] will win against class selectors.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Complex selectors can be created from joining multiple simple ones together. It is also possible to style elements depending on an attribute:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* The first &amp;lt;a&amp;gt; element inside a &amp;lt;p&amp;gt; element that's next to an &amp;lt;h3&amp;gt; element&#xA;   that's a direct child of #sidebar matches this rule */&#xA;#sidebar &amp;gt; h3 + p a:first-of-type {&#xA;    border-bottom: 1px solid #333;&#xA;    font-style: italic;&#xA;}&#xA;&#xA;/* Only &amp;lt;img&amp;gt; elements with the 'alt' attribute match this rule */&#xA;img[alt] {&#xA;    background-color: #F00;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A CSS rule specificity calculator is available &lt;a href=&quot;//specificity.keegan.st/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. It may help when a project has one or multiple large CSS files.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Inheritance&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Inheritance is a key feature in CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inheritance is the mechanism by which properties are applied not only to a specified element, but also to its descendants. In general, descendant elements automatically inherit text-related properties, but box-related properties are not automatically inherited.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Properties that are inherited by default are &lt;code&gt;color&lt;/code&gt;, &lt;code&gt;font&lt;/code&gt;, &lt;code&gt;letter-spacing&lt;/code&gt;, &lt;code&gt;line-height&lt;/code&gt;, &lt;code&gt;list-style&lt;/code&gt;, &lt;code&gt;text-align&lt;/code&gt;, &lt;code&gt;text-indent&lt;/code&gt;, &lt;code&gt;text-transform&lt;/code&gt;, &lt;code&gt;visibility&lt;/code&gt;, &lt;code&gt;white-space&lt;/code&gt; and &lt;code&gt;word-spacing&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Properties that are usually not inherited are &lt;code&gt;background&lt;/code&gt;, &lt;code&gt;border&lt;/code&gt;, &lt;code&gt;display&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt; and &lt;code&gt;clear&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, and &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;margin&lt;/code&gt;, &lt;code&gt;min&lt;/code&gt;/&lt;code&gt;max-height&lt;/code&gt;/&lt;code&gt;width&lt;/code&gt;, &lt;code&gt;outline&lt;/code&gt;, &lt;code&gt;overflow&lt;/code&gt;, &lt;code&gt;padding&lt;/code&gt;, &lt;code&gt;position&lt;/code&gt;, &lt;code&gt;text-decoration&lt;/code&gt;, &lt;code&gt;vertical-align&lt;/code&gt; and &lt;code&gt;z-index&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is worth noting that &lt;a href=&quot;//www.w3.org/wiki/Inheritance_and_cascade#Forcing_inheritance&quot; rel=&quot;nofollow noreferrer&quot;&gt;any property can be inherited&lt;/a&gt; by using the &lt;a href=&quot;//developer.mozilla.org/en-US/docs/Web/CSS/inherit&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;inherit&lt;/code&gt;&lt;/a&gt; property value. This should be used with care, however, since Internet Explorer (up to and including version 7) doesn’t support this keyword. As an example:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/* Set the color of &amp;lt;p&amp;gt; elements to a light blue */&#xA;p {&#xA;    color: #C0FFEE;&#xA;}&#xA;&#xA;/* Set the color of #sidebar to a light red */&#xA;#sidebar {&#xA;    color: #C55;&#xA;}&#xA;&#xA;/* &amp;lt;p&amp;gt; elements inside #sidebar inherit their parent's color (#C55) */&#xA;#sidebar p {&#xA;    color: inherit;&#xA;}&#xA;&#xA;&#xA;/* You may also override inherited styles using the !important keyword */&#xA;#sidebar p:first-of-type {&#xA;    color: orange !important;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;References&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//en.wikipedia.org/wiki/Cascading_Style_Sheets#CSS_3&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS3&lt;/a&gt; (CSS3 is the latest standard for CSS)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//en.wikipedia.org/wiki/Cascading_Style_Sheets&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3.org/TR/CSS2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C CSS2.1 Specification&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3.org/TR/css3-selectors/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C CSS3 Selectors Specification&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3.org/TR/css3-mediaqueries/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C CSS3 Media Queries Specification&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3.org/Style/CSS/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C Cascading Style Sheets home page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//way2tutorial.com/css/tutorial.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;Way2Tutorial CSS Tutorial&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//reference.sitepoint.com/css&quot; rel=&quot;nofollow noreferrer&quot;&gt;SitePoint CSS Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//htmldog.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML Dog: HTML and CSS Tutorials&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//dev.opera.com/articles/view/27-css-basics/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cascading Style Sheets on the Web Standards Curriculum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The 30 CSS Selectors you Must Memorize&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3.org/TR/WCAG20/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C Web Content Accessibility Guidelines&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//dochub.io/#css/&quot; rel=&quot;nofollow noreferrer&quot;&gt;DocHub Instant Documentation Search&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//devdocs.io/css/&quot; rel=&quot;nofollow noreferrer&quot;&gt;DevDocs - Documentation Searching Service&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3schools.com/css/default.asp&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;w3schools CSS Tutorials&quot;&gt;W3Schools CSS Tutorials&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//learnlayout.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learn CSS Layouts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.w3schools.com/cssref/trysel.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Demonstration of all combination of CSS selectors by w3schools&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//css-tricks.com/almanac/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS-Tricks Almanac - A list of all CSS selectors with example and explanation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//developer.mozilla.org/en-US/docs/Web/CSS&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mozilla Development Network - CSS&lt;/a&gt; - Includes a CSS Reference, Tutorials, CSS3 Demos, and links to development tools&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Video Tutorial&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.codeschool.com/courses/css-cross-country&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeSchool CSS Screencast&lt;/a&gt; - Learn the fundamentals &amp;amp; foundational elements of CSS with CSS Cross-Country&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Validation&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//jigsaw.w3.org/css-validator/&quot; rel=&quot;nofollow noreferrer&quot;&gt;W3C CSS Validation Service&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//csslint.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS Lint&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;//www.cssportal.com/css-validator/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS Portal&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2017-05-31T10:33:42.690" LastActivityDate="2017-05-31T10:33:42.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="318" PostTypeId="4" CreationDate="2017-05-31T07:12:19.923" Score="0" Body="CSS (Cascading Style Sheets) is a language used to describe the presentation of documents written in various markup languages, including HTML (Hyper Text Markup Language) and XML (Extensible Markup Language), and SVG elements. Use this tag for issues involving the teaching of CSS, or its use in the classroom. DO NOT use this tag for questions about CSS or its syntax." OwnerUserId="104" LastEditorUserId="104" LastEditDate="2017-05-31T10:32:00.360" LastActivityDate="2017-05-31T10:32:00.360" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="319" PostTypeId="5" CreationDate="2017-05-31T13:41:36.153" Score="0" Body="&lt;p&gt;&lt;em&gt;Undergraduate&lt;/em&gt; is a US term for students studying at a college or university for a Bachelor's degree. Students are about 18-21 years old and, in the US, typically study a variety of subjects with one primary: the major. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students may begin their undergraduate program with little or no background in CS but others may have a quite extensive background, especially in programming, less so in theoretical subjects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that in other countries (e.g. GB) the terms college and university are not interchangeable as they tend to be in the US. See the &lt;a href=&quot;https://cseducators.meta.stackexchange.com/questions/204/what-are-common-terms-used-in-education-in-different-countries&quot;&gt;terminology meta post&lt;/a&gt; for disambiguation. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-07T19:48:41.987" LastActivityDate="2017-09-07T19:48:41.987" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="320" PostTypeId="4" CreationDate="2017-05-31T13:41:36.153" Score="0" Body="For questions about teaching Computer Science at an undergraduate level. Use this tag to clarify the level of the students being taught, but ensure that you provide as much context about their ability and experience in the question." OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-05-31T17:32:52.040" LastActivityDate="2017-05-31T17:32:52.040" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="321" PostTypeId="2" ParentId="302" CreationDate="2017-05-31T14:50:41.610" Score="5" Body="&lt;p&gt;I used a Parsons problem to teach functions. I used Google Slides to put different colored text boxes on one slide and gave the students instructions to arrange the text boxes in the proper order. A screenshot of what the activity looked like is below:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/aZB6H.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/aZB6H.png&quot; alt=&quot;Screenshot of Parsons problem&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted students to have experience with the ordering of function calls in C. There are technically two correct ways to approach this, but because I specify the requirement to use each block, there's only solution here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/EftpX.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/EftpX.png&quot; alt=&quot;Solution to Parsons problem&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seeing how information gets passed from function to function and how to lay out the structure was helpful for students. Focusing on those skills outside of/separate from the syntax helped because students only had to worry about one thing at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I look ahead to next year, I want to do more of these problems, especially when teaching loops and sorting algorithms. They are quick and simple to make and differentiate instruction effectively. In the context of AP CSP, they provide great practice for the AP Exam which includes a number of code samples to read and understand.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-05-31T14:50:41.610" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="322" PostTypeId="5" CreationDate="2017-05-31T16:10:25.620" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-31T16:10:25.620" LastActivityDate="2017-05-31T16:10:25.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="323" PostTypeId="4" CreationDate="2017-05-31T16:10:25.620" Score="0" Body="Questions about instruction specific to the programming environment Scratch. Scratch is a programming language for creating games and animations in a graphical interface. Use this tag only when the language used would affect the question significantly (if your question uses Scratch as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-06-13T14:56:04.360" LastActivityDate="2017-06-13T14:56:04.360" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="324" PostTypeId="5" CreationDate="2017-05-31T16:13:36.227" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-05-31T16:13:36.227" LastActivityDate="2017-05-31T16:13:36.227" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="325" PostTypeId="4" CreationDate="2017-05-31T16:13:36.227" Score="0" Body="Questions related to teaching how to debug code. Debugging is the process of identifying and removing errors (potential or otherwise) from code. Bugs are defects that prevent correct operation of a program or system." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-05-31T20:35:35.637" LastActivityDate="2017-05-31T20:35:35.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="326" PostTypeId="2" ParentId="66" CreationDate="2017-05-31T16:38:44.203" Score="3" Body="&lt;p&gt;I suppose the design of the curriculum revolves around the goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the objective is to prepare students to enter the field as researchers, then the &lt;em&gt;balance&lt;/em&gt; needs to favor the research that's active (and probably employable.) Where that fits into the AI picture as a whole is helpful. What limitations it has, and the missing pieces it doesn't solve are important to recognize, but have less weight than the targeted areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the objective is to provide an overview, or survey, of the AI field, then deep learning and machine learning are only promising avenues to solve part of the puzzle. A &lt;em&gt;balance&lt;/em&gt; in this case should include the history as well. Including the previous &quot;promising avenues&quot; that didn't deliver all they were supposed to deliver. Temper enthusiasm with reason and perspective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Showing how the lesser-known areas are important, as well as their resistance to current approaches can help too. Even if the students will enter ML, a big-picture view will help them know where they're going.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-05-31T16:38:44.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="327" PostTypeId="1" CreationDate="2017-06-01T02:09:21.283" Score="25" ViewCount="5291" Body="&lt;p&gt;My students are all highly inclined to take notes on their computers.  There are some obvious advantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The students absolutely prefer it.&lt;/li&gt;&#xA;&lt;li&gt;They can easily search through their notes later.&lt;/li&gt;&#xA;&lt;li&gt;Since their computers are out, we can easily do code-alongs or other short coding exercises.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However, I also read that &lt;a href=&quot;https://www.scientificamerican.com/article/a-learning-secret-don-t-take-notes-with-a-laptop/&quot; rel=&quot;noreferrer&quot;&gt;taking notes on a computer&lt;/a&gt; leads to poor retention and comprehension.  I have been considering banning computerized notes, and requiring either handwritten note taking or telling students to forego notetaking altogether, and simply giving them my powerpoints after the lecture is over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the advantages and disadvantages of such a classroom policy.  Which is better?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-11T14:53:46.523" LastActivityDate="2020-01-19T15:17:43.407" Title="Note-taking policy: laptops, or by hand?" Tags="|best-practice|notes|" AnswerCount="16" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="328" PostTypeId="2" ParentId="327" CreationDate="2017-06-01T03:20:02.047" Score="27" Body="&lt;p&gt;Neither is &lt;em&gt;better&lt;/em&gt;. What is true for one student may not be for another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Studies can show trends. Students are &lt;em&gt;not&lt;/em&gt; trends; they are &lt;em&gt;individuals&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example I encountered today that seems to go against that &lt;em&gt;wisdom&lt;/em&gt;, I caught a news piece about a local girl in the Scripps National Spelling Bee. As she spelled the word she was moving her fingers in a weird fashion. Half-way through the word I recognized what she was doing. She was &quot;typing&quot; the word as she spelled it. She was able to remember how to spell the word by remembering how she would type it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have personally attended classes with someone who &quot;doodled&quot; their notes. She drew random-looking doodles, not pictures or pictographs, as the instructor presented. Later she was able to translate her doodles better than I could translate my long-hand notes. She also scored better on the fact-based questions than most of the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one major drawback to laptop note taking in class, however: noise. Few keyboards are truly silent, and the key noise, even if it's just the sound of fingernails hitting the plastic, can be &lt;em&gt;very&lt;/em&gt; distracting to other students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're willing to allow it, and school policy does not prohibit it, a third option is audio recording.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've only been in one classroom where computers were allowed to be on, and it was distracting. I've never allowed them to be used when I lecture, or even during study time unless it's also lab time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What seems to work best for situations involving lots of data, especially where layout and syntax can be significant, is to provide the lecture material in some manner after the lecture has been delivered. That could be done via Google Drive, or some other online source. Online access allows the student to retrieve it when they need it without having to access it immediately after the lecture. It also helps for the disadvantaged students that may not have laptops to bring to school. They can access it from the library, or any other source of online access.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-01T03:20:02.047" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="329" PostTypeId="2" ParentId="172" CreationDate="2017-06-01T05:06:20.983" Score="1" Body="&lt;p&gt;Another element to add to the solution is to slightly delay the HTML tags. You can start with a WYSIWYG web page tool. In that they create the web page that meets your listed objectives. Then you can switch from the visual results into the raw HTML. Using the generated HTML you can demonstrate simple changes to the code that are then visible in the rendered page. Add in simple CSS next, and they can witness the explosion of possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can do that yourself on a large-screen, or projector, in a short demonstration first, then have them do it themselves, while making it all fit into one class session, that would be good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional tool would be a server for the room that each has a directory on that they can &quot;publish&quot; their page, and you can display it on the projector. Any simple server would work, even IIS on Windows XP could handle the task. That provides them with the chance to have their work on display as well, giving a nice ego boost, and likely increasing their investment in learning more to make it better.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-01T05:06:20.983" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="330" PostTypeId="1" CreationDate="2017-06-01T05:12:51.317" Score="6" ViewCount="152" Body="&lt;p&gt;One of the blessing and curses of teaching CS is the plethora of materials freely available online. MOOCs on edX and Coursera. Tutorials on Khan Academy and Codecademy. Certifications through freeCodeCamp. Those sites barely scratch the surface of what is available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How, if at all, do you integrate these or similar resources into particular areas of your curriculum? Does this integration work well for increasing student learning?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2021-02-24T12:56:20.957" Title="Supplementing Curriculum with Online Resources" Tags="|curriculum-design|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="331" PostTypeId="2" ParentId="330" CreationDate="2017-06-01T05:35:20.663" Score="2" Body="&lt;p&gt;It can often be good or bad, but that depends entirely on you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you happen to find resources on those sites that align with your curriculum, great. You just need to be sure they don't contradict each other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If one of the resources on one site is covered by one in another site with a different example, your students might be confused by that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would do is go from site to site and for each subject in the curriculum, and select the site which explains that subject as closely as possible to what is to be taught in class. Then I would direct the students to those sites for each subject, should they need more examples or details. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-01T12:44:28.937" LastActivityDate="2017-06-01T12:44:28.937" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="332" PostTypeId="5" CreationDate="2017-06-01T06:00:40.813" Score="0" Body="&lt;p&gt;GitHub is a web based version of git. It is used for version control in projects with multiple people, or as an internet hosting service. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Git works with repositories, and each repository has branches. Repositories are created with a &lt;code&gt;master&lt;/code&gt; branch, but more can be created manually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;GitHub provides a web interface for viewing a git repository.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Git, changes are &lt;em&gt;pushed&lt;/em&gt; to the remote repository. When creating a &lt;em&gt;local branch&lt;/em&gt;, pushing will result in the creation of a remote branch, create from the local one. After making changes in the code, one can create a &lt;em&gt;commit&lt;/em&gt;, which summarizes the changes made. Commits are pushed to the remote branch. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Branches don't have to be synchronized with one another (and usually are not). After pushing commits to some branch (which isn't &lt;code&gt;master&lt;/code&gt;), it is possible to &lt;em&gt;pull&lt;/em&gt; those commits from the branch into &lt;code&gt;master&lt;/code&gt;. This is called a &lt;em&gt;pull request&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone can create a pull request. Only those who were given permission by the owner of the repository can &lt;em&gt;merge&lt;/em&gt; a pull request. If there are &lt;em&gt;merge conflicts&lt;/em&gt;, e.g. each version (&lt;code&gt;master&lt;/code&gt; and the branch) has different code in the same place (changes that can be committed by other developers working in that repository), then they need to be resolved before a merge is possible. They have to be resolved manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once a pull request is merged, all the commits from the pulled branch will be added to &lt;code&gt;master&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;GitHub makes those common actions very convenient. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-01T18:43:07.663" LastActivityDate="2017-06-01T18:43:07.663" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="333" PostTypeId="4" CreationDate="2017-06-01T06:00:40.813" Score="0" Body="Questions related to teaching about working in the web based version control repository manager GitHub. " OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-01T10:57:22.880" LastActivityDate="2017-06-01T10:57:22.880" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="334" PostTypeId="2" ParentId="327" CreationDate="2017-06-01T12:22:00.567" Score="8" Body="&lt;p&gt;I think that in many cases the act of writing does help in the act of understanding and learning so there is a value to taking notes (which is also a problem when there are powerpoint handouts - particularly when the teacher basically just reads the slides).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, I seem to retain more when hand writing notes unless I focus on the note taking when typing on the computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The computer is also an inferior device for note taking in terms of annotations, images, equations etc. although that might not always be true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another point to consider is &quot;does the kid type?&quot; If a student has to think about the keys they're hitting it takes focus away from the material. This might sound silly but when we write by hand, we just write we don't think about the letters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, we have the distraction component. Not only for the kids with the computer who may or may not be distracted but also for the kids neighbors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the day, Gypsy Spellweaver got it just right by saying &quot;Studies can show trends. Students are not trends; they are individuals.&quot; - this is my problem with most education &quot;research&quot; (intentionally in quotes). It's really a case by case thing. There have been classes where I've had to ask students not to take notes on computer but many more where   it's worked well.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-01T12:22:00.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="335" PostTypeId="1" CreationDate="2017-06-01T13:33:47.917" Score="9" ViewCount="561" Body="&lt;p&gt;My school is BYOD (Bring Your Own Device).  This has a lot of benefits in terms of technology, but it also gives us no control over what is on the laptops kids bring into class.  During lab time, kids will often try to sneak in game playing.  This year, I made a policy that, if I catch someone playing a video game during class, they will owe me a small project.  This has reduced game playing quite a bit from my previous technique (which was just telling them to cut it out), but the problem persists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you prevent kids from playing games during lab periods and during lectures?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-01T20:47:02.650" Title="Video Games during class" Tags="|classroom-management|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="336" PostTypeId="2" ParentId="307" CreationDate="2017-06-01T13:40:17.443" Score="3" Body="&lt;p&gt;Java, like C/C++ has block scope.  When you create a variable in a block, the stack pointer moves to make room for it.  When the block ends, the stack pointer moves back. This makes the variable inaccessible.  It will be overwritten the next time the stack pointer moves over it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python and JavaScript have function scope.  Note, however that in ECMA 6, the &lt;code&gt;let&lt;/code&gt; construct gives variables block scope.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-01T13:40:17.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="338" PostTypeId="2" ParentId="335" CreationDate="2017-06-01T20:26:27.343" Score="2" Body="&lt;p&gt;I wonder if it's worth pointing students to games that might help with CS ideas. Some examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://s3-eu-west-1.amazonaws.com/rpi-magazines/issues/full_pdfs/000/000/003/original/HelloWorld02.pdf#page=46&quot; rel=&quot;nofollow noreferrer&quot;&gt;Boolean logic gates&lt;/a&gt; in Minecraft, and indeed Python scripting in &lt;a href=&quot;https://minecraft.net/en-us/edition/pi/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Minecraft&#xA;Pi edition&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://tomorrowcorporation.com/humanresourcemachine&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://twolivesleft.com/CargoBot/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cargo Bot&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zachtronics.com/infinifactory/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Infinifactory&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zachtronics.com/tis-100/&quot; rel=&quot;nofollow noreferrer&quot;&gt;TIS-100&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://codecombat.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code Combat&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm sure there are plenty of others. Not sure I'd use them in every lesson, but they might be a useful incentive towards more purposeful use of the devices they bring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know one school where in free time pupils are only allowed to play games they've coded themselves...&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-06-01T20:26:27.343" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="339" PostTypeId="1" CreationDate="2017-06-01T20:26:36.617" Score="15" ViewCount="1066" Body="&lt;p&gt;I'm guessing everyone here, high school teachers at least, have spent at least one period in the past year working with a class when you either don't have working computers or a working internet connection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what are you go to activities when the computers aren't working?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a couple, but am curious what I'm missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Worksheets&lt;/strong&gt; - I use 'em, but I don't really like 'em. I do keep a set of worksheets printed though just in case nothing is working. They're generic enough that it really doesn't matter what topic we're on. And they work well for emergency sub plans.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://csunplugged.org&quot; rel=&quot;noreferrer&quot;&gt;&lt;strong&gt;CS Unplugged&lt;/strong&gt;&lt;/a&gt; - I 've got the &lt;a href=&quot;http://csunplugged.org/binary-numbers/&quot; rel=&quot;noreferrer&quot;&gt;count the dots activity&lt;/a&gt; printed out. One set on normal sized paper for me to demo with and a dozen sets printed on business cards for students to practice with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Human Sorting&lt;/strong&gt; - I line up the kids and we go over sorting algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure I'm missing some really good ideas. Let's hear them...&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-17T15:52:52.710" Title="Computers are down; what's in your bag of tricks for teaching CS when they can't get on a computer?" Tags="|lesson-ideas|secondary-education|" AnswerCount="9" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="340" PostTypeId="1" CreationDate="2017-06-01T20:35:47.647" Score="7" ViewCount="243" Body="&lt;p&gt;I probably should have asked this last week since we just finished up finals today. But, there's always next year :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you create a final exam that is a valid assessment of an entire year or computer science, but can still be completed in a couple of hours? Ideally I think a large-ish scale project would be the best assessment of where the kids are. But two hours just isn't enough time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a fan of throwing 2 hours worth of multiple choice questions at students. Sure, I could probably come up with 75 or 100 multiple choice tracing questions. Make sure there are some recursive tracings and it could easily hit 2 hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other side though is coming up with a coding assignment that is doable in 2 hours. To do that you'd probably have a few of the upper students finishing in 15 minutes. Sort of the same issue as the discussion we had a few days ago on &lt;a href=&quot;https://cseducators.stackexchange.com/questions/206/dealing-with-students-who-complete-labs-very-quickly&quot;&gt;students finishing labs quickly&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I normally do a hybrid of the two, and it works okay. A multiple choice section that should take about half the period and a couple of simple coding questions for the other half. This semester I only had one student that had to stop because time was up, although a few stopped themselves early because they knew that had done well enough for the average they wanted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my 2nd and 3rd year courses I normally do a take home project, but I don't think that would work as well in my first year AP-A course. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-07T08:48:40.150" Title="Final exam advice" Tags="|ap-computer-science-a|secondary-education|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="341" PostTypeId="2" ParentId="335" CreationDate="2017-06-01T20:47:02.650" Score="5" Body="&lt;p&gt;I semi jokingly tell my students at the beginning of the year they can play any game they want on the computers, as long as they write it first. It at least gets a laugh.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me it takes two things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One, I need to be able to see their screens. Given, this is probably much easier with school provided devices. When I moved into the classroom I'm in all of the student seats were facing forward with the monitors facing away from the teacher. First thing I did was push all the desks to the wall so that the monitors are facing the center of the room. I can see almost every monitor from almost any spot in the room. This also helps getting to students to help them since I don't have to squeeze through rows. It does help that I have a pretty big classroom though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And two, I need to keep them busy. What I've found is that once there's a student playing games it spreads. And the first one usually isn't playing because they're screwing around. They're probably done with their assignments. I throw more assignments at a class than most students will be able to finish - some are extra credit. I also have a list of enrichment activities that they work on when done with labs - Coding Bat, Code Combat, Project Euler, making their own game, that sort of thing. That way there's always something CompSci related to work on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are partially BYOD in that kids are free to bring their devices, but aren't required to. There's always a handful of students that prefer to work from their own notebooks. My rule on that is that they're free to do so, until I catch them screwing around on something else. Then, they have to use the school computers. For most, that's enough incentive to keep on task. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-01T20:47:02.650" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="342" PostTypeId="1" AcceptedAnswerId="345" CreationDate="2017-06-01T21:23:50.670" Score="17" ViewCount="1311" Body="&lt;p&gt;In my experience, people who have programmed before, whether they're professional or not, almost always consider imperative programming to be obvious. They're usually skeptical that a concept such as variable assignment could be difficult to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, in my limited experience (teaching Programming 101, and with people learning to write simple scripts), students who are beginning to learn about programming do find the concept difficult. Given a program like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x := 2;&#xA;print(x);&#xA;if some_condition() then x := 3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;many students struggle with the concept that &lt;code&gt;print(x)&lt;/code&gt; will not print 3 even if &lt;code&gt;some_condition()&lt;/code&gt; is true. Writing assignment using &lt;code&gt;=&lt;/code&gt; may make the difficulty more widespread.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is difficulty with imperative programming correlated with certain backgrounds? For example, do students with a strong mathematical background struggle more because they have some prior concept of equality? Do students with more computer time struggle less because they're more used to the concept of a state change (even if they can't formulate it in these terms of course)?&lt;/p&gt;&#xA;" OwnerUserId="124" LastEditorUserId="27" LastEditDate="2017-06-29T02:27:35.513" LastActivityDate="2017-06-30T15:23:48.813" Title="What makes imperative programming easier or harder to learn?" Tags="|imperative-programming|programming-paradigms|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="343" PostTypeId="2" ParentId="339" CreationDate="2017-06-01T21:29:10.987" Score="3" Body="&lt;p&gt;It depends so much on what we're covering.  In principle, anything which gets them &lt;em&gt;doing&lt;/em&gt; or &lt;em&gt;moving&lt;/em&gt; also gets them learning.  Here are a few more ideas:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Describe some small amount of code that could be written to the students (like, &amp;quot;imagine we are creating a recursive method that returns the number of even numbers in our linked list&amp;quot;, or &amp;quot;create a method that will print the letters of a phrase scrambled by evens, and then odds, so &amp;quot;hello, world&amp;quot; would print &amp;quot;hlo olel,wrd&amp;quot;.  Ask them to come up with &lt;em&gt;as many test cases as they can&lt;/em&gt; for the unwritten method in 120 seconds.  (Test cases are hard!)  Spend some time writing good student results on the board together.  (Did they test for an empty string? A null list? A singleton string?, etc...)&lt;/p&gt;&#xA;&lt;p&gt;Then have them hand-code the method.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them some tricky code, and have them do a thorough trace-through to see if they can understand what it is doing.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-01T21:29:10.987" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="344" PostTypeId="2" ParentId="339" CreationDate="2017-06-01T23:24:17.477" Score="10" Body="&lt;p&gt;There are lots of great activities at &lt;a href=&quot;http://csunplugged.org/&quot; rel=&quot;noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; that do not require a computer. Excellent activities in their own right, you don't have to wait for the days when systems are out. Well worth exploring these resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This resource is provided by the Computer Science Department at the University of Canterbury, New Zealand, and shared under Creative Commons BY-NC-SA 4.0 licence. &lt;/p&gt;&#xA;" OwnerUserId="136" LastActivityDate="2017-06-01T23:24:17.477" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="345" PostTypeId="2" ParentId="342" CreationDate="2017-06-02T01:39:32.003" Score="15" Body="&lt;p&gt;This is a topic very close to my heart.  I think that the skeptical attitude you've alluded to simply comes from the fact that most people were taught imperative programming first (and some were never exposed to any other paradigms at all).  Turing's Machine was easier to conceive of as a physical, mechanical device than Church's $\lambda$, and it is presumably by this historical accident that mutability rules the day almost everywhere.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not even remotely convinced that imperative programming is more obvious or intuitive than functional programming.  In my experience, setting values is a consistent cognitive trap for students, and one that I have to treat with great care.  My very first unit for AP is modeled rather loosely after &lt;a href=&quot;http://www.intuitor.com/student/Q1_Comp_Sci_Objectives.php&quot; rel=&quot;noreferrer&quot;&gt;Tom Rogers' phenomenal opening AP unit&lt;/a&gt;, &lt;strong&gt;&lt;em&gt;Java Ain't Algebra&lt;/em&gt;&lt;/strong&gt;, which takes exactly this issue head on.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my (by now heavily modified) version of Roger's mini-unit, I make explicit that values can change, spend time tracing them, show why &lt;code&gt;x = 4 + 7&lt;/code&gt; is not the same as &lt;code&gt;x - 4 = 7&lt;/code&gt;, and spend a lot of time making clear that the programmer's&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;=&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;is only barely related to the mathematical&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$=$.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also begin to explore the runtime stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teachers often miss that this even needs to be covered because, once they are thoroughly inculcated in imperative programming, it can become hard to even see why this is hard in the first place.  The variable &lt;code&gt;x&lt;/code&gt; was &lt;code&gt;4&lt;/code&gt;, but now it is &lt;code&gt;5&lt;/code&gt;.  What could be simpler?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But of course, students exposure to variables prior to CS comes from algebra.  And in algebra, when we say that $x + 3 = 7$, we mean that $x = 4$, and it cannot suddenly become $5$.  We can &lt;em&gt;solve for values&lt;/em&gt;, but we cannot alter them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the takeaway: &lt;strong&gt;if we, as teachers, don't make explicit how very different it is to be able to change values&lt;/strong&gt;, a certain percentage of students don't ever fully pick up this idea.  They'll get hazy bits and pieces of the idea, but have trouble operating, and ultimately fall behind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, they don't appear to get noticeably lost until far later in the year, but by then, it is &lt;em&gt;very hard&lt;/em&gt; to get them back on track.  (When I take on a new tutee in the months leading up to the AP test, this is one of the first areas I check if they seem generally lost.)  I have also come to believe that this is one of the key ideas that most CS teachers miss, and is responsible for a substantial portion of computer science's very bimodal results with students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a real cognitive load to considering not the value of &lt;code&gt;x&lt;/code&gt;, but the value of &lt;code&gt;x&lt;/code&gt; &lt;em&gt;right now&lt;/em&gt;, and having to both track that value and figure out when to change it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In spite of what this all sounds like, I'm not suggesting that functional programming is necessarily easier; it has its own cognitive load, since suddenly we are contemplating many, many simultaneous &lt;code&gt;x&lt;/code&gt;'s taking place during recursive calls.  It's almost as if learning to talk to something as alien as a computer is always going to be a bit tricky :)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-02T18:17:16.447" LastActivityDate="2017-06-02T18:17:16.447" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="346" PostTypeId="2" ParentId="340" CreationDate="2017-06-02T02:02:02.317" Score="1" Body="&lt;p&gt;I had a rather odd solution to this back when I taught at a school that had no material beyond AP.  I figured that they worked their butts off for the AP test, and (especially juniors and seniors) were often burnt out.  So I had them free-build a project (ie. no new curricular material after the AP test)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the final exam, I made a very odd test.  There was no material that they had learned up until that point at all - everything consisted of standalone activities that they would learn during the exam itself from texts I provided.  So, there would be a long explanatory text of some concept in CS that they hadn't learned, and then some simple problems.  (I chose regular expressions, a teensy bit of functional programming in ML, and coding in Java for memory efficiency, but you could do any topics that you want them to learn about as long as you can create or find a good explanatory text)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They were allowed to ask each other questoins about understanding the text I provided, but not about the questions they had to answer, and they were not allowed to refer to the internet.  The only questions I would answer were clarifying questions about the exam itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The grading worked like this: whatever their grade average was for the year in my class was theor 0% on this exam &lt;em&gt;as long as they clearly made an effort to complete the exam&lt;/em&gt;.  (No attempt would be graded as a 0 score)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, whatever their % on the exam was would be added to their 0 score.  So, if their average for the year to date was 85%, and they scored a 50% on the exam (a relatively high score), they would receive a final grade on the exam of 92.5%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The advantages for them:&lt;/strong&gt; no studying, and they learned a bunch of material in a highly focused 2-hour session.  &lt;strong&gt;The advantages for me:&lt;/strong&gt; no complaining, no review sessions, and they could work on their projects until the end of the terms.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-02T02:02:02.317" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="347" PostTypeId="1" AcceptedAnswerId="403" CreationDate="2017-06-02T06:19:29.097" Score="5" ViewCount="213" Body="&lt;p&gt;I am designing an introductory level programming class to be taught using Processing this summer. I have only four weeks and 90 minutes a day with students. Given my student demographic (middle schoolers), I am not anticipating getting much beyond the basics of the coordinate system, basic color options (stroke, fill, RGB values), variables, and loops. Since it will have more of a summer camp feel (i.e. fun, no homework), I want the approach to be engaging and hands-on. Rather than try to introduce a lot of programming concepts, I want students to have a portfolio of cool designs they have made by the time the class ends. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the current list of projects I have slated for our four weeks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use three ellipses to make a Mickey Mouse silhouette (simple, but will require much iteration to perfect coordinate placement)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a basic sketch of a house (imagine those elementary school simple triangle-topped rectangles with square windows and a chimney...something like that) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Design a Lego family (based on &lt;a href=&quot;https://courses.cs.washington.edu/courses/cse120/17sp/asmts/lego_family.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this UW assignment&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Explore logo design through both redesigning an existing logo and creating an original logo (based on &lt;a href=&quot;https://courses.cs.washington.edu/courses/cse120/17sp/labs/04/logo.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this UW assignment&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These four will probably culminate in some sort of original creative project as a synthesis of all the concepts we will study.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I'm wrapping up my design of this course, I'd like to get input on these and any other simple, engaging assignments in Processing. What other beginner-level assignments in Processing would interest a student new to programming?&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-29T06:11:14.970" LastActivityDate="2017-06-29T06:11:14.970" Title="Assignments for Introductory Level Processing" Tags="|curriculum-design|processing|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="348" PostTypeId="2" ParentId="339" CreationDate="2017-06-02T06:52:14.513" Score="2" Body="&lt;p&gt;This is an activity we typically do when learning about algorithms at the beginning of the year, but it's fun and more advanced students will hopefully do a better job at it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Part One&lt;/strong&gt;: One volunteer comes to the front of the class. She sees a simple drawing on a piece of paper of several shapes (triangle, square, circle in one example) next to each other with slight spaces in between them. Everyone else in class has merely a blank sheet. Her task is to get them to reproduce what only she sees. The catch is that everyone else in class has to think like a computer and make no assumptions. Saying &quot;draw a circle&quot; or &quot;make a line&quot; won't accomplish the task. (Side note: this could be a great way to differentiate imperative and declarative languages, but that's a separate topic.) Computers need to be told to put pen to paper, lift pen, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Part Two&lt;/strong&gt;: A different volunteer comes to the front of the room. The task is reversed. Everyone else has a drawing in front of them, and they need to communicate with the volunteer to get her to draw it properly on the whiteboard in the front of the room. The same rules apply. Classic &quot;bugs&quot; that come up here are not instructing the student to take the cap off the pen and not having her lift her pen correctly to complete the drawing, which is typically a stick figure with a word bubble message. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both activities are engaging, and do give a number of opportunities to step in and talk about assumptions we as humans make and about abstractions that we may take for granted, like &quot;draw a shape.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got this idea from my time taking CS50 and being trained to teach CS50 AP. You can see this activity demonstrated at Harvard &lt;a href=&quot;https://youtu.be/l76Cz8RLO54?t=21m26s&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, there's always the classic &quot;Peanut Butter and Jelly Sandwich&quot; activity although this one is hard to do at the last minute. Watch the CS50 at Yale demo &lt;a href=&quot;https://youtu.be/UuFWYOnHwGM?t=12m49s&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-02T08:15:35.060" LastActivityDate="2017-06-02T08:15:35.060" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="349" PostTypeId="1" CreationDate="2017-06-02T07:07:09.197" Score="28" ViewCount="2060" Body="&lt;p&gt;You've just demoed your first bit of code in whatever language you're teaching. The requisite &quot;hello, world&quot; has been said. The program has been compiled (or interpreted) and run. Now what?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There has to be a program that follows &quot;hello, world&quot; that builds upon the basics of printing one line on the screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is the logical next step in an introduction to a new language and possibly to programming as a discipline in general? We all know program #0; what's program #1 and why?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I know this is subjective, but I'm hoping it leans the good way. I'm trying to ascertain the scaffolding at an introductory level. Once the cliched example is complete (not that it doesn't have a lot to teach in and of itself), what makes sense as the next curricular step? I think the need for justification based on experience, expertise, and facts helps it from being too broad, but I'm happy to revise if necessary.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-29T06:12:03.380" LastActivityDate="2022-01-07T17:57:04.837" Title="What program follows &quot;hello, world&quot;?" Tags="|curriculum-design|introductory-lesson|" AnswerCount="17" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="350" PostTypeId="2" ParentId="339" CreationDate="2017-06-02T08:28:22.897" Score="8" Body="&lt;p&gt;Lots of things you can do via role-play, e.g. simulations of how a processor works, how the internet work, how e-mail works etc, but also playing through some scenarios or dilemmas in online safety.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plenty of scope for debating broader moral and ethical issues around CS, including AI: What should Audi's programmers and managers have done? Should end-to-end encryption be available? What rules should a self-driving car be programmed to follow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;20 questions, or something simpler such as guess my number?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lots of fun with hand-drawn graphs, e.g. minimal spanning trees, shortest paths or the travelling salesman problem.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-06-02T08:28:22.897" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="351" PostTypeId="2" ParentId="349" CreationDate="2017-06-02T11:31:13.687" Score="13" Body="&lt;p&gt;I did a (rather unscientific) study of a few popular tutorials for Python to see what they did after &quot;Hello, world&quot;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://learnpythonthehardway.org/book/ex3.html&quot; rel=&quot;noreferrer&quot;&gt;Learn Python the Hard Way&lt;/a&gt; introduces expressions (&lt;code&gt;25 + 30&lt;/code&gt;, &lt;code&gt;5 + 7 &amp;gt; 3 + 1&lt;/code&gt;), and implicitly hints at types (although never mentions them by name in the chapter after &quot;Hello, world&quot;).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.codecademy.com/courses/introduction-to-python-6WeG3/0/1&quot; rel=&quot;noreferrer&quot;&gt;Codecademy&lt;/a&gt; introduces variables (assignment), then types, then reassigning variables.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://automatetheboringstuff.com/chapter1/&quot; rel=&quot;noreferrer&quot;&gt;Automate the Boring Stuff with Python&lt;/a&gt; introduces expressions and types.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://developers.google.com/edu/python/introduction&quot; rel=&quot;noreferrer&quot;&gt;Google's Python introduction&lt;/a&gt; introduces assignment, expressions, and very quickly moves on to functions. The pace of their tutorial seems &lt;em&gt;a lot&lt;/em&gt; faster than the others I checked.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, purely from what other tutorials and resources do, it seems that expressions are the most important next step. Notably, none of the resources I tested introduce &lt;code&gt;input()&lt;/code&gt; in the next step—clearly, it's more important to learn about variables and how to store values from functions first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If these resources are to be trusted, the best second program would look a little like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print('5 + 2 is', 5 + 2)&#xA;print('5 is less than 4?', 5 &amp;lt; 4)&#xA;eight = 2 * 4&#xA;print(&quot;2 * 4 is eight?&quot;, eight == 8) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that in this example, you subtly introduce the fact that comparing values is done with &lt;code&gt;==&lt;/code&gt;, not &lt;code&gt;=&lt;/code&gt;, and there's a link to &lt;code&gt;bool&lt;/code&gt; values, &lt;code&gt;int&lt;/code&gt; types, etc. Whether you explicitly mention them at first is up to you—some resources do recommend it, and some don't.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-02T11:31:13.687" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="352" PostTypeId="2" ParentId="349" CreationDate="2017-06-02T12:41:34.363" Score="4" Body="&lt;p&gt;The next step is to introduce the type system.  Students need to know what kinds of data are &quot;understood&quot; by a language.  The &quot;Hello World&quot; program gets the ball rolling because you can ask, &quot;How is text stored? Are there other types of data that can be stored as well?&quot;&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-02T12:41:34.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="353" PostTypeId="1" CreationDate="2017-06-02T13:00:54.460" Score="5" ViewCount="572" Body="&lt;p&gt;On advanced Excel courses I teach attendees how to use the macro recorder. I also start VBA beginner trainings with the recorder and analysing the recorded code. I find the macro recorder a good entry point to learning VBA and programming. I'm always struggling with exercises though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What exercises do you use when teaching MS Office macro recorder? Exercises that make sense in the real word. (E.g. creating a macro that writes &quot;Hello World&quot; in the active cell is fun and educational, but completely pointless in the real world.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main goal here is to give them a feel for the rigid sort of thinking macros and programming requires, and also to whet their appetite for macro programming, to show them how mundane tasks can be automated.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="12659" LastEditDate="2022-11-12T12:00:23.653" LastActivityDate="2022-11-12T12:00:23.653" Title="Excel macro recorder exercises" Tags="|lesson-ideas|programming|exercises|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="354" PostTypeId="2" ParentId="353" CreationDate="2017-06-02T13:15:39.463" Score="2" Body="&lt;p&gt;I'll start by adding the exercises I'm currently using, but please don't let this stop you from posting more!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a macro that inserts a header row. (Story: &quot;Every day I download a csv file. Always the same structure, but it is missing the header row. I want a macro that inserts a formatted header above my data.&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Number formatting macro (Story: &quot;I regularly use a certain currency format, and I hate having to dig through menus to get it. I want a shortcut for it.&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Date stamp macro (&quot;I want a macro that puts the current date into the selected cell. I always want the current date, but I want it to stay the same and not change every day.&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Fill empty cells from above (&quot;I need a macro that fills all the empty cells in the selected region with the value above the empty cells. A good use case is a pivot table that has been pasted as values, and is missing the values in the first column.&quot;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On the more complex side, I have an exercise where I ask them to create a macro to copy entire rows from one sheet to the first empty row in another one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a few more, but they are totally artificial practice exercises.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-06-02T13:15:39.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="355" PostTypeId="2" ParentId="349" CreationDate="2017-06-02T15:39:05.413" Score="23" Body="&lt;p&gt;When I was teaching and mentoring first-time students, what got them &lt;strong&gt;really excited for the first time&lt;/strong&gt; was seeing their name in lights. Write a program that allows a student to enter their name, then print it on the screen 10 times (or 10,000).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It introduces the concept of &lt;strong&gt;variables and variable types&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;It shows how computers interact with the outside word by &lt;strong&gt;accepting input&lt;/strong&gt; from the students&lt;/li&gt;&#xA;&lt;li&gt;It introduces &lt;strong&gt;basic looping and conditional statements&lt;/strong&gt; in a really simple example&lt;/li&gt;&#xA;&lt;li&gt;It shows how &lt;strong&gt;math and computation&lt;/strong&gt; works in a computer without simply spitting out basic algebra. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The best part is the students don't have to understand 100% of the program to start picking out the individual parts. The basic program flow is somewhat intuitive. You can start &lt;em&gt;without&lt;/em&gt; the loop and add it in later as you introduce the concepts. This simple exercise is straightforward enough to teach the underlying concepts of how programming works in a somewhat entertaining, interactive application. &lt;/p&gt;&#xA;" OwnerUserId="23" LastEditorUserId="23" LastEditDate="2017-06-16T20:49:18.653" LastActivityDate="2017-06-16T20:49:18.653" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="356" PostTypeId="5" CreationDate="2017-06-02T17:00:03.077" Score="0" Body="&lt;p&gt;Note that some exercises only work in certain contexts and/or with certain preparation by the instructor. Some exercises have issues that the frequent user might know about but that an adopter might not. In asking questions about exercises it might be a good idea to request that the answers be given in context with caveats and exceptional cases explained. Be sure in your question to mention what objectives and/or outcomes you are trying to achieve when using the exercises that might be given in answers.   &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T18:19:57.667" LastActivityDate="2017-07-13T18:19:57.667" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="357" PostTypeId="4" CreationDate="2017-06-02T17:00:03.077" Score="0" Body="Questions related to programming exercises that are meant to increase students' skills. Use this tag to ask questions about exercises related to a specific skill or skill-set. " OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-02T18:49:53.397" LastActivityDate="2017-06-02T18:49:53.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="358" PostTypeId="1" AcceptedAnswerId="362" CreationDate="2017-06-02T20:40:06.890" Score="3" ViewCount="470" Body="&lt;p&gt;While there's plenty of existing material and resources to help you decide on the next techie to hire, I could find very little for assessing the skill of children/teenagers at programming. &lt;a href=&quot;http://resources.kodable.com/public/cs_standards_2017.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;This&lt;/a&gt; is the only proposal that I've found, but it's been created by a private company.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question regards standards for general knowledge in programming, so there are no specific language requirements - it could be based on pseudo-code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What high-quality standards are out there?&lt;/p&gt;&#xA;" OwnerUserId="282" LastEditorUserId="104" LastEditDate="2017-07-08T19:30:44.827" LastActivityDate="2017-07-08T19:30:44.827" Title="Assessing programming skills of students under 18 years" Tags="|assessment|" AnswerCount="2" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="359" PostTypeId="2" ParentId="14" CreationDate="2017-06-02T21:30:12.530" Score="4" Body="&lt;p&gt;One option is to have a short closed-book in-class quiz after each lab assignment to test each student's understanding (which is a good thing to do even in the absence of cheating). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your sample problem, you might ask them to fill in the blanks to complete code to solve a comparable problem or to answer multiple choice questions about a short program you provide. I've used Moodle for these quizzes, which makes grading trivial.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-02T23:36:18.257" LastActivityDate="2017-06-02T23:36:18.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="360" PostTypeId="1" AcceptedAnswerId="361" CreationDate="2017-06-02T21:40:07.187" Score="7" ViewCount="219" Body="&lt;p&gt;One skill I teach students in Java 1 is how to use a debugger, specifically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;single-stepping through code&lt;/li&gt;&#xA;&lt;li&gt;using breakpoints&lt;/li&gt;&#xA;&lt;li&gt;viewing the values of variables&lt;/li&gt;&#xA;&lt;li&gt;going up and down the call stack&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have been unable to come up with good programs for them to use when learning to use the debugger. Specifically, I would like to provide them with a program with a bug that they're unlikely to find just by looking at the code but can find with a debugger.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2019-07-31T18:12:50.637" Title="What are good sample programs for learning to use a debugger?" Tags="|java|labs|debugging|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="361" PostTypeId="2" ParentId="360" CreationDate="2017-06-02T21:57:19.243" Score="3" Body="&lt;p&gt;A few Java specific examples come to mind:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Using &lt;code&gt;%&lt;/code&gt; with a negative number - I recently came across this and had to remember how Java treats modulus v. remainder (cf. &lt;a href=&quot;https://stackoverflow.com/questions/5385024/mod-in-java-produces-negative-numbers&quot;&gt;this thread&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Listing switch statements without the proper &lt;code&gt;break;&lt;/code&gt; at the end of each case - maybe something that can be seen right away, but stepping through each line would be good to visualize this process&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Integer division is also a classic - using the conventional Celcius-to-Fahrenheit (or vice versa) conversion program with the formula broken down over several lines would force them to see line by line what is happening when you evaluate &lt;code&gt;9/5&lt;/code&gt; or &lt;code&gt;5/9&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Operations with increment/decrement operators in prefix and/or postfix position throughout a program - I like this one a lot because of how variables may change without that change always being seen&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'll edit and add ideas as more occur to me.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-02T21:57:19.243" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="362" PostTypeId="2" ParentId="358" CreationDate="2017-06-02T22:04:10.430" Score="4" Body="&lt;p&gt;There are four places I would suggest looking if your concern is the K-12 environment:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.iste.org/standards/standards&quot; rel=&quot;nofollow noreferrer&quot;&gt;ISTE Standards&lt;/a&gt; (Note: there are standards here for multiple audiences, including students, teachers, and computer science educators)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.csteachers.org/page/CSTA_Standards&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSTA Standards&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://secure-media.collegeboard.org/digitalServices/pdf/ap/ap-computer-science-principles-course-and-exam-description.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS Principles Course Description&lt;/a&gt; (Revised for 2017-18)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://secure-media.collegeboard.org/digitalServices/pdf/ap/ap-computer-science-a-course-description.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS A Course Description&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These would probably be the best places to start. I suggest working your way from the top down since the standards as listed progress in what I see as an increasing order of complexity/rigor.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-02T22:04:10.430" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="363" PostTypeId="2" ParentId="14" CreationDate="2017-06-03T00:25:59.953" Score="3" Body="&lt;p&gt;All the work we've done on in-flow peer review (see, for instance, our &lt;a href=&quot;http://cs.brown.edu/~sk/Publications/Papers/Published/ccfhkptw-in-flow-peer-review/&quot; rel=&quot;nofollow noreferrer&quot;&gt;working group report&lt;/a&gt;) is aimed in part at this question. Overall, I believe we should rethink our curricula, pedagogy, and assessments so that we stop viewing plagiarism as a huge problem, but instead creatively think about alternate educational practices.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:25:59.953" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="364" PostTypeId="2" ParentId="261" CreationDate="2017-06-03T00:29:16.433" Score="1" Body="&lt;p&gt;Here's an answer that will not make you happy. If you need an &lt;em&gt;analogy&lt;/em&gt;, maybe the concept is too complex to be taught? The literature on CS education does not show a lot of support for analogical teaching; in fact, analogies often get in the way and create as much confusion as they help. People have pointed to the need to have clear and crisp &lt;em&gt;notional machines&lt;/em&gt; instead. If your notional machine doesn't include static members, you should enhance it so it does; because if it continues to not include them, then no amount of analogical reasoning is going to get students unstuck when they come to reading, tracing, and debugging programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the real question is, what does your notional machine say about static members?&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:29:16.433" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="365" PostTypeId="2" ParentId="185" CreationDate="2017-06-03T00:33:53.617" Score="3" Body="&lt;p&gt;It's very difficult to answer this question without more context, like grade level/age/etc. At Brown some years ago we introduced a class called &lt;a href=&quot;http://cs.brown.edu/courses/cs195y/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logic for Systems&lt;/a&gt; that offers a variety of tools for teaching logic very effectively, with the express goal of enticing students who are otherwise uninterested in theory, formalism, and so on. We did this by, in essence, inverting the traditional &quot;logic in computer science&quot; course on its head and (roughly speaking) doing its material in reverse order. The class has been a huge success. However, these materials may be of no use to you depending on the level at which you work.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:33:53.617" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="366" PostTypeId="2" ParentId="161" CreationDate="2017-06-03T00:38:10.087" Score="10" Body="&lt;p&gt;The &lt;a href=&quot;http://racket-lang.org/&quot; rel=&quot;noreferrer&quot;&gt;Racket&lt;/a&gt; team has argued that &lt;em&gt;no&lt;/em&gt; language that is suitable for writing any real software is great for beginners: they contain too many warts, legacy features, complex corners, etc. And that includes Racket itself. We have therefore created a series of &lt;em&gt;student languages&lt;/em&gt; that are carefully designed subsets of the full language ideal for student use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of it this way. Open an introductory programming textbook that uses some language &lt;em&gt;L&lt;/em&gt;. Start at the beginning. Does it use all of &lt;em&gt;L&lt;/em&gt; on page 1? Or page 10? Or even page 100? No! It begins with a very small subset of &lt;em&gt;L&lt;/em&gt;, then grows that subset chapter by chapter, and even by the end may have exposed you to only a small part of &lt;em&gt;L&lt;/em&gt; (if &lt;em&gt;L&lt;/em&gt; is a language in industrial use). This is not only sensible, it's what we implicitly expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now ask yourself why your programming environment doesn't do the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In contrast, that's what Racket does. The languages that come bundled with the main IDE, DrRacket, are tied to the text &lt;a href=&quot;http://htdp.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;How to Design Programs&lt;/em&gt;&lt;/a&gt;. Other textbook authors have provided their own languages too, and it's easy for instructors to create their own to match whatever they are teaching.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:38:10.087" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="367" PostTypeId="2" ParentId="349" CreationDate="2017-06-03T00:40:41.627" Score="5" Body="&lt;p&gt;You program with images, create the flags of several countries, then lay them over backgrounds, then animate them, and build up to a game. You can do all that in the first week or so of your course if you have the right curriculum. See, for instance, the prologue of &lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/HtDP2e/part_prologue.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;How to Design Programs&lt;/em&gt;&lt;/a&gt; (second edition).&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:40:41.627" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="368" PostTypeId="2" ParentId="339" CreationDate="2017-06-03T00:43:31.590" Score="3" Body="&lt;p&gt;Depends on your curriculum design. &lt;a href=&quot;http://www.bootstrapworld.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bootstrap&lt;/a&gt; is designed with the assumption that students will (and &lt;em&gt;should&lt;/em&gt;) be away from their computer some of the time, so they can think and design calmly instead of just hacking away at their keyboards. In Bootstrap, the worksheets are central to how students are encouraged to do their work, and it's why the Bootstrap:Algebra curriculum has shown really good transfer from programming to algebra skills (specifically, solving word problems). So I don't view worksheets as a nuisance to bear because the network is down; rather, they can be an integral part of the problem-solving process, asking students to do something contemplative and methodical. (Of course, you have to believe that being contemplative and methodical are actually positive attributes…)&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-03T00:43:31.590" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="369" PostTypeId="2" ParentId="358" CreationDate="2017-06-03T01:47:40.113" Score="1" Body="&lt;p&gt;In addition to what Peter wrote, the American Computer Science League (ACSL) has wonderful pseudo-code based standards for high-school age students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-03T01:47:40.113" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="370" PostTypeId="2" ParentId="360" CreationDate="2017-06-03T02:20:10.120" Score="2" Body="&lt;p&gt;I would try to focus in on the kinds of errors that beginner programmers get stuck on, to imitate as closely as possible the kind of situation that they would want a debugger for.  So, I might code this method, which contains exactly the sort of subtle mistake 101 students regularly make, right in front of them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static boolean compare (String a, String b){&#xA;    boolean same  = true;&#xA;    for(int k = 0; k &amp;lt; a.length(); k++){&#xA;        if (a.charAt(k) != b.charAt(k))&#xA;            same = false;&#xA;    }&#xA;    return same;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...If someone starts to mention some errors, pretend that you are simply too focused on coding to deal with them right now.  &lt;em&gt;Please don't interrupt!  We are creating very important code right now, and it takes concentration!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would then follow up by putting in some tests, one at a time.  Have a big reaction when the first two tests go well, appear to get a little flustered by the third test, and become quite upset when the fourth test crashes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static void main(String[] args) {&#xA;    System.out.println(compare(&quot;&quot;,&quot;&quot;));&#xA;    System.out.println(compare(&quot;cat&quot;,&quot;dog&quot;));&#xA;    System.out.println(compare(&quot;car&quot;,&quot;carport&quot;));&#xA;    System.out.println(compare(&quot;fortress&quot;,&quot;for&quot;));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I would announce that, as a mistake has clearly been made, and as there is clearly &lt;em&gt;no one in the room even remotely smart enough to figure out what it is,&lt;/em&gt; this is now a moment to go to the debugger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The theatrics are a bit of my own manner in the classroom, but also serve a purpose here.  I want to get around the handful of quicker students who will spot the error right away with a bit of a wink that lets them know that they are perfectly smart, but not to ruin this for everyone else.  I want to keep them quiet long enough to let us get through the debugging process together.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Afterwards, I would acknowledge that anyone who saw the error was perfectly clever, but that the debugger is important because they will, without any doubt, encounter bugs that they will have trouble locating.  The debugger is one important part of the toolset that they will need to right the ship when it starts to go askew in the future.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-03T03:41:30.217" LastActivityDate="2017-06-03T03:41:30.217" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="371" PostTypeId="2" ParentId="342" CreationDate="2017-06-03T02:29:12.943" Score="6" Body="&lt;p&gt;The difference may be partially related to whether or not the student has a mental model of the machine (as in simple, possibly physically mechanical, computing hardware), rather than more abstract symbology (algebra).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Changing the bits on a Turing machine tape, or the wheels on a Babbage engine, or the display of a pocket calculator, or the position of the beads on an abacus, as one carries out a sequence of steps, clearly shows how and when state changes, and the visible difference at different steps (program counter values) in the algorithm or program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algebraic notation hides the turning of the gears, or the ticking of the (computer's) clock, and thus hides imperative state changes to variable values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Possibly for this reason, I've seen simplified assembly language (CARDIAC cardboard computer, with 10 instructions and 10 memory locations) taught near the beginning of introductory CS for non-majors courses, before delving into higher level programming language constructs (Lisp/Scheme, et.al.)&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-06-03T02:51:50.890" LastActivityDate="2017-06-03T02:51:50.890" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="372" PostTypeId="1" CreationDate="2017-06-03T02:39:04.223" Score="5" ViewCount="156" Body="&lt;p&gt;When my students move up to junior year, they make a series of transitions: from programming to theoretical computer science, and from imperative to functional programming.  We use &lt;strong&gt;DrRacket&lt;/strong&gt;, and one of the goals of the course is to give them a very broad exposure to theoretical computer science.  Part of that is choosing labs that can be coded using the tools that they have learned so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are already familiar with linked lists, Big $O$, $\Omega$, and $\Theta$, binary trees, the runtime stack, BFS and DFS before they arrive at this class.  They have also been exposed to recursion a fair amount (though most of them are not highly skilled at it yet)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first lesson with them in Racket is called &lt;em&gt;&quot;Cons, Car, Cdadr, and Contracts&quot;&lt;/em&gt; and it contains exactly the sorts of material you would expect from that title.  I have created a lab that makes them use these tools, but adds up to no further significance.  What I &lt;em&gt;want&lt;/em&gt; is an algorithm that has some theoretical significance and that they can do with those tools.  The algorithm itself can come from any part of computer science - I just want it to be something &lt;em&gt;worth&lt;/em&gt; exposing them to in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lab goals would thus be two-fold: first, to give them a chance to play around with and familiarize themselves with the beginnings of Racket.  Second, I want to give them a chance to learn about an important algorithm.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-29T02:30:43.523" LastActivityDate="2017-06-29T02:30:43.523" Title="Significant algorithm from CS for DrRacket that emphasize cons, car, and cdr" Tags="|lesson-ideas|algorithms|functional-programming|scheme|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="373" PostTypeId="2" ParentId="14" CreationDate="2017-06-03T06:56:11.640" Score="8" Body="&lt;p&gt;At Denison, our intro class has labs designed around real world problems, and involves lab reports. This makes it a lot harder to cheat. We're not saying &quot;implement quicksort&quot;, we're saying &quot;write a simulation to check Tom Schelling's Nobel prize winning work, then write a 2-3 page paper explaining what you found.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, students will still try to get help from each other or from the TAs. In my syllabus, I write some very explicit rules about what kinds of help is and is not allowed. Then, I give them a take-home quiz on the syllabus and it includes 2 case studies (&quot;Jill was working on her lab when ...did a violation of the honor code occur?&quot;). After making this change, and discussing the case studies in class after students hand in the quiz, cheating went down. By the way, I really like this syllabus quiz idea. It lets me spend the first day of class doing some active learning and setting the tone for the semester, rather than going over the syllabus. And it gives students a free quiz grade to force them to actually read the syllabus.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-06-03T06:56:11.640" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="374" PostTypeId="2" ParentId="327" CreationDate="2017-06-03T07:05:06.083" Score="12" Body="&lt;p&gt;I agree with the comment from thesecretmaster. I've observed a lot of CS classes at Denison in the last few years (part of our peer mentoring program for new professors) and I'm convinced students do not have the ability to resist using their computers to check facebook, email, MLB, etc. Even for very engaging lectures, students will still drift to these websites. Worse, when one student does it, others sitting behind them also start to go to facebook. I think it's this logic of &quot;I know this is wrong, but Billy's doing it, so I guess that means I can too&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result of witnessing this behavior on so many occasions, I don't allow laptops to be open if I'm at the front of the room talking. I usually have worksheets for students and I force them to get a binder to organize all the worksheets over the semester. If it's a lecture without a worksheet, I tell them to take notes in their binder. If a computer appears, I'll ask the student to put it away till the coding part of class. After the lecture/activity, I'll say &quot;okay, now it's your turn. Get your laptops out and do problem 4 on the sheet.&quot; Then it's clear we have a laptop part of class and a non-laptop part, every day. When their laptops are out, I'm walking around helping them with bugs or when they get stuck, so they don't dare open facebook. Our classes have 24 students, and this seems to work.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-06-03T07:05:06.083" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="375" PostTypeId="1" CreationDate="2017-06-03T07:10:51.037" Score="7" ViewCount="308" Body="&lt;p&gt;I want to set up a fully functional web server in the classroom. I will be using a separate computer provisioned with Apache, MySQL, Tomcat, PHP, Perl, etc. I want to have each student in the class able to have their own working directory. I also want to have a pair of sharing directories. One where they can access, without changing, lesson-based material, and one where they can upload content for others to access, and where collaborative projects can be built.  I intend that each student's personal directory will migrate with them as they progress through the courses, for those that do continue.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Situation:&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Single classroom&lt;/li&gt;&#xA;&lt;li&gt;Between 25 and 35 students in each period&lt;/li&gt;&#xA;&lt;li&gt;Desktop computers available for each student&lt;/li&gt;&#xA;&lt;li&gt;The students are not required to utilize the same computer each day (most, but not all, do so however)&lt;/li&gt;&#xA;&lt;li&gt;All the desktops will have the same tools, including FTP client for accessing the &quot;server&quot;&lt;/li&gt;&#xA;&lt;li&gt;Courses are at three different levels, but are all Web Development&lt;/li&gt;&#xA;&lt;li&gt;The system will be used, independently, by 5 different class periods.&lt;/li&gt;&#xA;&lt;li&gt;Not all students are guaranteed to have home Internet access&lt;/li&gt;&#xA;&lt;li&gt;Personal laptops are allowed, but not required&lt;/li&gt;&#xA;&lt;li&gt;The tools on the desktops are able to be installed on their personal laptops if desired (no proprietary software involved)&lt;/li&gt;&#xA;&lt;li&gt;Students are allowed to use their own selected tools (editor, IDE, etc.) on their personal laptops&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Assertions:&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The school's administration has approved this project&lt;/li&gt;&#xA;&lt;li&gt;The network admin has created a VLAN for the classroom&lt;/li&gt;&#xA;&lt;li&gt;All security concerns have been, and will be, addressed by the IT department&lt;/li&gt;&#xA;&lt;li&gt;The server aspects of the system will be configured, and maintained by me&lt;/li&gt;&#xA;&lt;li&gt;The system will be kept properly updated, this includes Apache as well as the supporting software such as the DB, PHP, Ruby, etc.&lt;/li&gt;&#xA;&lt;li&gt;Any and all licenses are such that everything proposed is &quot;above-board&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How much access should I allow the students to files (theirs, the common directory, and lesson-based directory)? I.e.: should they be able to access them from outside the classroom and/or school's network? And, should they be allowed to create a public-facing web page/site as part of the server's function?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that full access from anywhere will allow them to work on projects outside of class without having to move files back and forth with thumb drives. That will also mean that I can give them larger assignments as homework rather than having their coding work only be labs. I'm also considering that the ability to have their own website will give them greater investment in the class, and greater desire to learn things to make their &quot;Own&quot; website better, and stand out more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, IT claims they can handle the setup and security for any of the ideas I've presented them, so security and maintenance are not issues, just how it may affect their education.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also wondering if it's better to configure the server with the latest stable packages, or if I should make it closer to what most low-end shared hosting accounts have. The shared-hosting environment is what they most likely will encounter if they choose to do something personal on the Web now. Doing so, however, will restrict some of what I can demonstrate with newer packages.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-29T04:27:30.273" Title="In-class server access limits" Tags="|student-motivation|classroom-management|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="376" PostTypeId="1" AcceptedAnswerId="383" CreationDate="2017-06-03T08:10:19.823" Score="4" ViewCount="99" Body="&lt;p&gt;In some programming languages, many data structures use &lt;code&gt;Node&amp;lt;T&amp;gt;&lt;/code&gt; (The examples in the question are in Java, but I suppose they are similar in other languages):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Node&amp;lt;T&amp;gt; {&#xA;    T info;&#xA;    Node&amp;lt;T&amp;gt; next;&#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have seen students stare at the board\screen, perplexed, whenever this is introduced. They are confused by this implementation, because it is &lt;em&gt;&quot;Defining something with itself&quot;&lt;/em&gt; (like saying &quot;&lt;strong&gt;white&lt;/strong&gt; is the color of things that are &lt;strong&gt;white&lt;/strong&gt;-hot&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have difficulty understanding how a class can have a property of itself.&#xA;How could I explain to them why this is valid in programming? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This issue makes it hard for them to understand data structures like &lt;code&gt;List&lt;/code&gt;,&lt;code&gt;Queue&lt;/code&gt; etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Context: they are high-school students learning java, and are familiar with primitive types and a bit of OOP.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="76" LastEditDate="2017-06-13T01:49:45.343" LastActivityDate="2017-06-14T11:10:08.343" Title="Introducing self containing objects (Node)" Tags="|object-oriented-paradigm|data-structure|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="377" PostTypeId="2" ParentId="376" CreationDate="2017-06-03T09:26:07.400" Score="2" Body="&lt;p&gt;The sample is &lt;em&gt;not&lt;/em&gt; &quot;defining something with itself.&quot; Rather it is defining two different kinds of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first line: &lt;code&gt;public class Node&amp;lt;T&amp;gt; {&lt;/code&gt; is beginning the definition of a &lt;em&gt;template&lt;/em&gt; for things to be made later. That definition will be handled at compile time. The third line: &lt;code&gt;Node&amp;lt;T&amp;gt; next;&lt;/code&gt; sets up an &lt;em&gt;object&lt;/em&gt; that will be instantiated using some template. Later in the compile process, when the object is created, Java will look in the table for the &lt;em&gt;template&lt;/em&gt; called &quot;Node&quot; that can handle some type. Since, by then, the complete template will exist, there's no problem. The key point here is that &lt;code&gt;next&lt;/code&gt; is not a &lt;em&gt;template&lt;/em&gt;, it is &lt;em&gt;object&lt;/em&gt; that &lt;strong&gt;will&lt;/strong&gt; use the &lt;code&gt;Node&amp;lt;T&amp;gt;&lt;/code&gt; &lt;em&gt;template&lt;/em&gt; when it is created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you also define &lt;code&gt;public class Node2&amp;lt;T&amp;gt; extends Node&amp;lt;T&amp;gt;&lt;/code&gt;, then at run time, &lt;code&gt;next&lt;/code&gt; could refer to the &lt;em&gt;template&lt;/em&gt; &lt;code&gt;Node&amp;lt;T&amp;gt;&lt;/code&gt;, or the &lt;em&gt;template&lt;/em&gt; &lt;code&gt;Node2&amp;lt;T&amp;gt;&lt;/code&gt;. Exactly which it is will be determined when the &lt;code&gt;next&lt;/code&gt; object is instantiated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it hasn't already been covered, that would be an opportune time to cover early and late binding.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-03T09:26:07.400" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="378" PostTypeId="1" AcceptedAnswerId="390" CreationDate="2017-06-03T09:26:11.590" Score="4" ViewCount="3277" Body="&lt;p&gt;After teaching inheritance and implementation (&lt;code&gt;implements&lt;/code&gt; vs &lt;code&gt;extends&lt;/code&gt; in Java) and overriding methods and basic OOP (classes and interfaces), as well as polymorphism (up/downcasting) I want to give the students some exercises to practice this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, I have the famous &lt;code&gt;Animal -&amp;gt; Mammal&lt;/code&gt; example, as well as &lt;code&gt;Human -&amp;gt; Teacher&lt;/code&gt;, &lt;code&gt;Human -&amp;gt; Student&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am trying to think of new examples and exercises to practice the subjects mentioned. To give a better notion of what I'm looking for, the &lt;code&gt;Animal&lt;/code&gt; exercise looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public abstract class Animal implements AnimalActions {&#xA;    private String name, family;&#xA;    private double weight;&#xA;&#xA;    public Animal(String name, String family, double weight) {&#xA;        this.name = name;&#xA;        this.family = family;&#xA;        this.weight = weight;&#xA;    }&#xA;}&#xA;&#xA;interface AnimalActions {&#xA;    public void eat();&#xA;&#xA;    public void sleep();&#xA;&#xA;    public void makeSound();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Mammal extends Animal {&#xA;    public Mammal(String name, String family, double weight) {&#xA;        super(name, family, weight);&#xA;    }&#xA;&#xA;    @Override&#xA;    public void eat() {&#xA;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void sleep() {&#xA;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void makeSound() {&#xA;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This covers many things and is useful for teaching. However, this doesn't go very far if I make it into a practice exercise. What exercises do others give students in this subject? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are in high school.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1166" LastEditDate="2017-06-21T20:20:31.560" LastActivityDate="2017-06-21T20:20:31.560" Title="Basic OOP practice exercises for inheritance and polymorphism" Tags="|lesson-ideas|object-oriented-paradigm|exercises|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="379" PostTypeId="2" ParentId="378" CreationDate="2017-06-03T16:36:06.083" Score="3" Body="&lt;p&gt;You could have a hierarchy based on an abstract class or interface &lt;code&gt;Car&lt;/code&gt;, with implementations/subclasses for &lt;code&gt;ElectricCar&lt;/code&gt;, &lt;code&gt;HybridCar&lt;/code&gt;, &lt;code&gt;GasBurningCar&lt;/code&gt;, etc. This illustrates that there can be very different implementations for an interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each class would have different additional members. For example, a &lt;code&gt;GasBurningCar&lt;/code&gt; could have a maximum amount of gas (in gallons or liters), represented as an &lt;code&gt;int&lt;/code&gt; or &lt;code&gt;double&lt;/code&gt;, or it could have a field of type &lt;code&gt;GasTank&lt;/code&gt;. Having members gives students practice with has-a relationships, in addition to is-a relationships.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could discuss trade-offs in whether an individual car model, such as Prius, should be an instance of &lt;code&gt;HybridCar&lt;/code&gt; or a subclass.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-03T16:36:06.083" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="380" PostTypeId="1" AcceptedAnswerId="393" CreationDate="2017-06-03T16:50:02.020" Score="12" ViewCount="948" Body="&lt;p&gt;I teach undergraduate programming project courses and have traditionally given the same project grade (about 45% of the semester grade) to everyone on each team, unless a team member's participation was clearly minimal, in which case I deduct points from that student's project grade, but I do not add points to other teammates'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student complained about their grade not reflecting the amount of work they put in, which was substantially more than their other teammates. I can sympathize with the complaint, although I pointed out to the student that I had followed the syllabus and project grading guide and that they had learned more and would get a better letter of recommendation than students who contributed less.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like for students' project grades to reflect their contributions, but just grading projects is time-consuming and difficult enough. What ways have teachers found to provide individual grades on team projects?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-23T22:42:21.807" Title="How to provide individual grades for group project work?" Tags="|grading|project|" AnswerCount="6" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="381" PostTypeId="2" ParentId="347" CreationDate="2017-06-03T17:12:37.523" Score="2" Body="&lt;p&gt;I've been doing quite a bit of searching on my own the past week or so on this and just discovered a new great resource to share. It came from &lt;a href=&quot;https://github.com/blog/2368-teaching-recursion-with-fractals-at-lowell-high-school&quot; rel=&quot;nofollow noreferrer&quot;&gt;this GitHub blog post&lt;/a&gt; about Art Simon's work at Lowell High School. There are links to each of his course's curricula for &lt;a href=&quot;https://apcsprinciples.github.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS Principles&lt;/a&gt; and &lt;a href=&quot;https://apcslowell.github.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS A&lt;/a&gt;, both of which use Processing. (Brief tangent: including Processing in AP CS A seems like a brilliant idea. You get the benefit of Java syntax and OOP with the payoff of Processing's visuals.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two great introductory-level assignments I found there:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/APCSPrinciples/OlympicRings&quot; rel=&quot;nofollow noreferrer&quot;&gt;Olympic Rings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/APCSPrinciples/Penguin&quot; rel=&quot;nofollow noreferrer&quot;&gt;Penguin&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-03T17:12:37.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="382" PostTypeId="2" ParentId="380" CreationDate="2017-06-03T17:25:01.767" Score="2" Body="&lt;p&gt;I have met teachers that deal with that issue like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, teach the students about version control, and introduce &lt;a href=&quot;https://github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt;, and tell them that they need to create an account. Then say that each group should have their projects in a repository. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then ask the students to provide a link to the repository, along with the project. This allows you to see on GitHub how much work each student contributed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;GitHub allows you to see a person's contribution (# of commits etc.), so this method is quite convenient.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-03T17:25:01.767" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="383" PostTypeId="2" ParentId="376" CreationDate="2017-06-03T17:58:02.200" Score="2" Body="&lt;p&gt;A visual demonstration might help. Let's say for the purpose of this in-class demo that the generic &lt;code&gt;T&lt;/code&gt; is an object of class &lt;code&gt;Student&lt;/code&gt; and you are demonstrating a (singly or doubly) linked list.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Have students from a line in front of the class, so they are next to each other and facing the rest of the class. &lt;/li&gt;&#xA;&lt;li&gt;Explain how each object here is clearly an instance of the &lt;code&gt;Student&lt;/code&gt; class. (This should be relatively obvious.)&lt;/li&gt;&#xA;&lt;li&gt;Now ask the class to brainstorm how this order could be preserved in memory, i.e. how each student could know what other student is to his/her right and left (if there is such a student).&lt;/li&gt;&#xA;&lt;li&gt;Hopefully students will recognize that they will want to know the name of that student (i.e. that &lt;code&gt;Student&lt;/code&gt; object) and thus should store the (one or two) adjacent students' names as &lt;code&gt;Node&amp;lt;T&amp;gt; next&lt;/code&gt; (and possibly &lt;code&gt;Node&amp;lt;T&amp;gt; prev&lt;/code&gt; if doubly linked).&lt;/li&gt;&#xA;&lt;li&gt;Model this behavior by having students point to the student on their left with their right arm and the student on their right with their left arm, forming a chain of linked students.&lt;/li&gt;&#xA;&lt;li&gt;Emphasize at this point that the order is preserved because each object contains within it as a property the name of its neighboring object(s).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To extend this example in the context of linked lists, you can insert and remove nodes and see if students can figure out how to preserve order without orphaning part of the list.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-03T17:58:02.200" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="384" PostTypeId="2" ParentId="380" CreationDate="2017-06-03T19:13:24.757" Score="2" Body="&lt;p&gt;I've been pondering the same problem, and I've come up with an experiment to try next year: let the students discuss the division of labor among themselves, but once they've decided how to proceed, they should write down what they came up with and submit that to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't pull these back out unless it's needed, but if there is trouble, it gives you an easy way to grade the individual contributions.  Also, if the lower contributions of one student prevented the project from getting completed, or forced the other students to have to do more, you now possess the justification for giving the worker bees full credit even on a partially completed project.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-03T19:13:24.757" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="385" PostTypeId="2" ParentId="372" CreationDate="2017-06-03T19:40:13.410" Score="2" Body="&lt;p&gt;I learned Racket using the material taught by the UW MOOC on Coursera Programming Languages, Part B, which is modeled after &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this UW course&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the relevant helpful documents, which do provide an introduction to the language along with quite advanced material which involves implementing a programming language within Racket:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Notes for &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/unit5notes.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unit 5&lt;/a&gt; and &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/unit6notes.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unit 6&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/hw4.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Homework 4&lt;/a&gt; and &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/hw5.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Homework 5&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The materials in this course are heavy on recursion, so some of the earlier exercises in Homework 4 may help your students with this concept while getting them comfortable with basic Racket exercises.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also can't speak highly enough of the free, self-paced course materials for &lt;a href=&quot;https://berkeley-cs61as.github.io/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;UC Berkeley's CS61AS&lt;/a&gt; found on the &quot;Textbook&quot; tab. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two additional resources may spark some ideas as well:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.cems.uvm.edu/~rsnapp/teaching/cs32/racket.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example programs in Racket&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://jeapostrophe.github.io/2013-04-15-astar-post.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;A* Search in Racket&lt;/a&gt; (this relates to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/282/introducing-a-search-algorithm&quot;&gt;one of your other posts&lt;/a&gt; as well - two birds with one stone?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-03T19:40:13.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="386" PostTypeId="5" CreationDate="2017-06-03T23:40:34.917" Score="0" Body="&lt;p&gt;Functional programming is a paradigm in which computations are carried out on values, primarily by creating and evaluating functions that return those values. Typically, a function is itself a value and so functional languages are highly recursive, both in definition and in execution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thought process when programming functionally is normally quite different than imperative programming as it normally proceeds without the C notion of a variable (i.e. a &lt;em&gt;mutable&lt;/em&gt; association between a name and a value). &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-07T21:07:55.800" LastActivityDate="2017-09-07T21:07:55.800" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="387" PostTypeId="4" CreationDate="2017-06-03T23:40:34.917" Score="0" Body="For questions relating to teaching the functional programming paradigm. A few examples of languages which support this paradigm are Haskell, Scheme, Lisp, Racket, OCaml, Clojure, ML, and Erlang." OwnerUserId="76" LastEditorUserId="1293" LastEditDate="2017-09-07T21:07:55.800" LastActivityDate="2017-09-07T21:07:55.800" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="388" PostTypeId="5" CreationDate="2017-06-03T23:40:57.527" Score="0" Body="&lt;p&gt;C is a general-purpose computer programming language used for operating systems, libraries, games and other high performance work. It is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system. The language is standardised as ISO 9899.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although C was designed for implementing system software, it is also widely used for developing portable application software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C is one of the most widely used programming languages of all time and there are very few computer architectures for which a C compiler does not exist. C has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C. Other languages that have been greatly influenced by C are C#, Objective-C, and Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching C is often taught in introductory courses to Computer Science, as a way to prepare students to learning other popular language which have been influenced by C. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T15:02:21.760" LastActivityDate="2017-06-11T15:02:21.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="389" PostTypeId="4" CreationDate="2017-06-03T23:40:57.527" Score="0" Body="Questions about instruction specific to the programming language C. Use this tag only when the language used would affect the question significantly (if your question uses C as an example, but does not focus on the language itself, you need not use the tag). " OwnerUserId="150" LastEditorUserId="27" LastEditDate="2017-06-13T13:14:49.690" LastActivityDate="2017-06-13T13:14:49.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="390" PostTypeId="2" ParentId="378" CreationDate="2017-06-04T00:20:31.333" Score="2" Body="&lt;p&gt;One example that isn't necessarily exciting but would allow for a lot of class design is a &lt;code&gt;Shape&lt;/code&gt; interface. From there let's say you have &lt;code&gt;Quadrilateral&lt;/code&gt;, &lt;code&gt;Ellipse&lt;/code&gt;, and &lt;code&gt;Triangle&lt;/code&gt; as classes which implement &lt;code&gt;Shape&lt;/code&gt;. You could do some really cool things by including as methods formulas for area and perimeter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, within &lt;code&gt;Quadrilateral&lt;/code&gt;, you could further subclass into &lt;code&gt;Parallelogram&lt;/code&gt; (and further with &lt;code&gt;Rhombus&lt;/code&gt; and &lt;code&gt;Rectangle&lt;/code&gt; and &lt;code&gt;Square&lt;/code&gt;?), &lt;code&gt;Trapezoid&lt;/code&gt;, and &lt;code&gt;Kite&lt;/code&gt;. Students will clearly see the relationship of &lt;code&gt;Shape -&amp;gt; Quadrilateral -&amp;gt; Parallelogram -&amp;gt; Rectangle -&amp;gt; Square&lt;/code&gt;. This will also hammer home the ideas that a subclass IS-A class as in a square IS-A rectangle and that the inverse (a class IS-A subclass) is not true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can lead to fun, but important design conversations. Do you indeed make a subclass for &lt;code&gt;Square&lt;/code&gt;, or do you have an &lt;code&gt;isSquare()&lt;/code&gt; method on &lt;code&gt;Rectangle&lt;/code&gt; testing for equality of length and width?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second example is this: give the students this challenge. Just as we are coming up with examples of how to categorize objects with IS-A relationships, so too should students come up with their own system of inheritance. I would bet that they would come up with some pretty inventive ideas. Moreover, the power of class design in OOP will &quot;stick&quot; if they come up with the system from the ground up.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-04T00:20:31.333" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="391" PostTypeId="2" ParentId="106" CreationDate="2017-06-04T00:40:24.990" Score="7" Body="&lt;p&gt;As the kids these days would say, you're doing it wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me explain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I've commented elsewhere, every &quot;full language&quot; has a whole bunch of things that educators would find inconvenient or undesirable. Your Haskell students can use monadic state or UnsafePerformIO too! So Haskell is &quot;just as bad&quot; in principle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's why Racket (in an explicit departure from Scheme) gives you the means to define your own languages, and DrRacket ships with several student pedagogic languages already built in. The first few grow in power to the point of being very powerful — but not having &lt;code&gt;set!&lt;/code&gt; at all. Only near the end of the pedagogic language tower do you find &lt;code&gt;set!&lt;/code&gt; (and its structure mutation variants). Until then, the feature is literally not present. For instance, in BSL (Beginning Student Language), here's a program interaction:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;gt; (define x 3)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&amp;gt; (set! x 5)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;set!: this function is not defined&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;DrRacket is saying &quot;you've put something in the function application position called &lt;code&gt;set!&lt;/code&gt; and I don't know what it is&quot; — the same error as if you had written &lt;code&gt;(foo x 5)&lt;/code&gt; instead. That is, it's not even saying &quot;sorry, I don't allow you to use state yet&quot;; it's saying &quot;state literally does not exist in my world&quot;. Because, at that level, it honestly does not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the sense in which you're doing it wrong is that you're using the wrong language level. Your programming environment ships with languages that explicitly preclude the use of state. Instead of using them, you're giving your students the full, unrestricted force of an language in industrial use. It's no surprise that they will find various features in there that you don't want them to. (Sadly, there are no &quot;language levels&quot; for Haskell that can keep students from some of the ugly corners of that language, but the principle applies to every language.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many more trade-offs between using Racket and Haskell, but this one is easily addressed. (Note that I said Racket, because it's Racket's enhancements over Scheme that enable us to create these kinds of language levels. And with very little effort, you could too, if you didn't like the ones we provide.)&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-04T00:40:24.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="392" PostTypeId="1" AcceptedAnswerId="394" CreationDate="2017-06-04T01:04:38.467" Score="4" ViewCount="460" Body="&lt;p&gt;I love the CodingBat platform and plan to integrate it throughout my course next year. Yet, since it will be my first year with AP CS A and I have not yet had a chance to study past years' FRQs, I'm not sure which sections I should focus on more than others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your experience, what sections of CodingBat are most helpful in terms of preparing students for the FRQs on the AP Exam?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: I am asking about the problems already on the site, not ones I could author myself -- that's a separate topic as I see it.)&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-23T15:08:05.147" Title="Most beneficial CodingBat problems for AP CS A FRQs" Tags="|java|ap-computer-science-a|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="393" PostTypeId="2" ParentId="380" CreationDate="2017-06-04T01:25:56.240" Score="12" Body="&lt;p&gt;In &quot;&lt;a href=&quot;http://www.cs.ubc.ca/wccce/Program03/papers/Gardner-Group/Gardner-Group.htm&quot; rel=&quot;noreferrer&quot;&gt;Assessing Individual Contributions to Group Software Projects&lt;/a&gt;&quot; (WCCCE '03), William Gardner discusses a number of strategies for adjusting team programming project grades for individual performance and ends by recommending a &quot;share-out&quot; approach:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The essence of share-out is that each student is conceptually given a&#xA;  pot of points, and must allocate them among their peers based on some&#xA;  stated criteria. The allocation then represents that student’s&#xA;  numerical evaluation of his or her team members.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In order to provide a straightforward, effective criterion for the&#xA;  sharing out, each student was given 100 points and told to allocate&#xA;  them according to the amount of credit each team member deserved in&#xA;  terms of the total project work. The term “credit” was intentionally&#xA;  selected to be both intuitive and elastic, a single metric that could&#xA;  easily serve as a proxy for time and quality of effort....&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Students were required to give themselves at least 100/N points, in&#xA;  recognition that there would likely be little enthusiasm for&#xA;  self-incrimination, but then the self-evaluations were not averaged in&#xA;  with those of the team members. With this constraint in place, ethical&#xA;  struggles over whether to admit one’s own poor performance were&#xA;  shunted aside. If some students really performed poorly, their team&#xA;  members could do the dirty work; their own confessions were not&#xA;  required, nor could their grade be inflated by making phony claims.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The paper provides further details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update: Since the paper is 14 years old, I contacted the author to ask if he has any updates. He kindly replied that he had not taught a software engineering course since then so had no further experience to report and that he stands by his recommendation.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-06T15:15:25.407" LastActivityDate="2017-06-06T15:15:25.407" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="394" PostTypeId="2" ParentId="392" CreationDate="2017-06-04T01:27:32.500" Score="2" Body="&lt;p&gt;They've got an AP-1 category which is based on past FRQs. Not the whole question, but pieces. I'd make sure you hit every one in that category during the year. The String-2 and Array-2 are also good. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use CodingBat and similar questions as warm-ups all year long. We start pretty much as soon as students are able to fill in a method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty much anything that involves looping through strings or arrays will help them with the test in May. Usually 2 or 3 of the FRQs involve iterating through some type of list structure and doing something with the values. I try to get my students to a point where they really don't have to think about loops, they just type on when they need it. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-04T01:27:32.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="395" PostTypeId="2" ParentId="282" CreationDate="2017-06-04T06:10:00.540" Score="7" Body="&lt;p&gt;I usually teach &lt;a href=&quot;https://algorithmicthoughts.wordpress.com/2012/12/15/artificial-intelligence-uniform-cost-searchucs/&quot; rel=&quot;noreferrer&quot;&gt;Uniform Cost Search&lt;/a&gt; (UCS) before A*, since it is basicaly A* without the heuristic (and it reduces to BFS when all costs = 1, so it is pretty straightforward to explain). Then I teach A* and show them animated examples of the explored nodes in comparison to UCS (&lt;a href=&quot;http://www.redblobgames.com/pathfinding/a-star/introduction.html&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt; you can find excellent interactive examples). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this step, one analogy I like to use is about mazes: Imagine yourself inside a maze from which you must find the exit, but you have no idea where it is. This is UCS. Now imagine there is no ceiling in the maze (like the Harry Potter one), and there is a tower in the exit which can be seen from anywhere in the maze. Now you can make more informed decisions in your search, biasing choices in that direction. This is A*.&lt;/p&gt;&#xA;" OwnerUserId="313" LastActivityDate="2017-06-04T06:10:00.540" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="396" PostTypeId="1" AcceptedAnswerId="407" CreationDate="2017-06-04T06:42:23.273" Score="4" ViewCount="96" Body="&lt;p&gt;Teaching programming is a great part of mentoring FRC (FIRST Robotics Competition) teams. For teaching how to program a robot (Specifically, a &lt;a href=&quot;http://www.ni.com/en-il/support/model.roborio.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;RoboRIO&lt;/a&gt;), I first (unintended pun: &lt;a href=&quot;https://www.firstinspires.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;FIRST&lt;/a&gt;) need to teach various paradigms (OOP, Generics etc.). There is a need to find ways to teach necessary but general concepts before diving into programming the robot itself (e.g. motor controls and such). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching Java paradigms in the classical and rather abstract sense usually confuses the students because they don't see any connection to robotics. As a result, students have difficulty understanding the subject (they aren't exactly at a level to learn that, so older team members try to teach it in a way that would make it easier). If they saw how these concepts integrated into programming the robot, then they would hopefully understand the subjects and their applications better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is this: how can I teach those programming concepts in the specific context of FIRST Robotics? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students have a bit of experience with loops and types, but nothing more complex. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="76" LastEditDate="2017-06-05T06:57:28.853" LastActivityDate="2017-06-05T07:45:15.767" Title="Teaching coding paradigms and concepts with specific context" Tags="|java|frc|robotics|first|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="397" PostTypeId="5" CreationDate="2017-06-04T06:58:25.273" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://www.firstinspires.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;FIRST&lt;/a&gt; (For Inspiration and Recognition of Science and Technology) is an international, non profit organization which has made it it's purpose to inspire children and teenagers (ages 6 to 18) to study and pursue careers in STEM (Science, Technology, Engineering and Mathematics) fields. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The organization operates &lt;a href=&quot;https://en.wikipedia.org/wiki/For_Inspiration_and_Recognition_of_Science_and_Technology#Activities&quot; rel=&quot;nofollow noreferrer&quot;&gt;four&lt;/a&gt; competitions, one of which is FIRST Robotics Competition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teams participating in  &lt;a href=&quot;https://www.firstinspires.org/robotics/frc&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;FIRST&lt;/em&gt; Robotics Competition&lt;/a&gt; build a robot and program it. This tag is meant for questions about teaching and guiding those teams in programming the robot. They can program the robot in either &lt;a href=&quot;https://en.wikipedia.org/wiki/Java_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/C%2B%2B&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/LabVIEW&quot; rel=&quot;nofollow noreferrer&quot;&gt;Labview&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information and details can be found &lt;a href=&quot;https://wpilib.screenstepslive.com/s/4485&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;, a website that provides explanations on using the programming library with which teams program their robots: WPIlib. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-04T12:39:15.890" LastActivityDate="2017-06-04T12:39:15.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="398" PostTypeId="4" CreationDate="2017-06-04T06:58:25.273" Score="0" Body="Questions related to mentoring and teaching Computer Science to First Robotic Competition (FRC) teams. This tag is not to be used for general questions about FRC (acronym) teams except for those about teaching Computer Science to them." OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2022-08-15T14:23:22.097" LastActivityDate="2022-08-15T14:23:22.097" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="399" PostTypeId="2" ParentId="396" CreationDate="2017-06-04T10:25:41.953" Score="1" Body="&lt;p&gt;What I like to do is to first teach them the code that will actually make the robot move/do whatever it's supposed to do, then from that point I'd teach them the structures that can be used to make it more interesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if the motor is represented by the &lt;code&gt;DcMotor myMotor&lt;/code&gt;, I'd first go with the simple &lt;code&gt;myMotor.setPower(1)&lt;/code&gt;, just to get them to have a moment where they actually made it do something. From there, I'd add things like looping and I'd teach it the same way I'd teach it to other students, but here the thing being done might be checking the controller for changes in input to change the power for the motor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another route you could try (since the context is FIRST) is teaching &lt;code&gt;myMotor.setPower&lt;/code&gt; first, then carrying on by explaining all the template code which surrounds it. The &lt;a href=&quot;https://github.com/ftctechnh/ftc_app&quot; rel=&quot;nofollow noreferrer&quot;&gt;FIRST repo&lt;/a&gt; has a template of the code you can use, and explaining to students how it works could be a useful teaching tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also disagree with your premise that &quot;there is a need to find ways to teach necessary concepts before diving into programming the robot itself.&quot; As someone on a small FIRST Tech Challenge team, I was the first person who actually learned to code the robot. The way I learned was first by copy pasting things from the various templates provided and using Android Studios suggestions. From there, I found out about how to do various other concepts from the google.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-04T10:25:41.953" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="400" PostTypeId="1" CreationDate="2017-06-04T10:40:46.307" Score="14" ViewCount="680" Body="&lt;p&gt;As someone who likes to advocate for best practices like correct use of VCS, indentation, sufficient commenting, and testing, I try and integrate them when I teach. But for all of these things, my students always ask me why they need to do it for projects of the relatively small size and short duration they're working on. They're right that it isn't necessary, but I don't know how else to teach it and get them to practice it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What ways do you find effective to introduce programming best practices? How do you ensure that your students continue to use them?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="150" LastEditDate="2017-06-28T05:09:59.037" LastActivityDate="2017-07-13T15:59:45.977" Title="How can I show the value of best practices?" Tags="|lesson-ideas|best-practice|coding-style|" AnswerCount="11" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="401" PostTypeId="2" ParentId="400" CreationDate="2017-06-04T10:55:27.797" Score="5" Body="&lt;p&gt;You can introduce the idea of best practices. Show them examples of right vs wrong for each of the practices you want to teach them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void method(){&#xA;System.out.println(&quot;this is incorrect indentation&quot;);&#xA;String example=&quot;It makes the code difficult to read.\n&quot;;&#xA;example+=&quot;If you can't read the code, you'll see how difficult it is to work on it&quot;;&#xA;int x=5;&#xA;if(&quot;this is completely bad: 5&quot;.contains((&quot;&quot;+x)))&#xA;System.out.println(&quot;because there's no indentation.&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then show the best practice code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void betterMethod(){&#xA;    System.out.println(&quot;this is the correct way to do indentation&quot;);&#xA;    String example=&quot;It makes the code very easy to read.\n&quot;;&#xA;    example+=&quot;If you can read the code, you'll see how easy it is to work on it&quot;;&#xA;    int x=5;&#xA;    if(&quot;this is the best practice: 5&quot;.contains((&quot;: &quot;+x)))&#xA;        System.out.println(&quot;because the indentation is good&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this idea works for other best practices: show the bad and emphasize just how bad it is (you might want to exaggerate the &quot;badness&quot; of the worst-practice code). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, show them the correct way to do it. It's better if both examples give the same output. that way students see how much easier it becomes when applying best practices:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example for comments and meaningful naming:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the bad example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int[] b = {1,3,4,6,7,9,11,2,5,8};&#xA;int a = 0;&#xA;Arrays.sort(b);&#xA;double s=0;&#xA;for(int i=0;i&amp;lt;b.length;i++) {&#xA;    System.out.print(b[i]+&quot;,&quot;);&#xA;    s+=b[i];&#xA;    if(a&amp;lt;b[i] &amp;amp;&amp;amp; i&amp;lt;=b.length/2) {&#xA;        a=b[i];&#xA;    }&#xA;}&#xA;System.out.println();&#xA;System.out.println(a);&#xA;System.out.println(s/b.length);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the better way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;//create array of numbers&#xA;int[] numberArray = {1,3,4,6,7,9,11,2,5,8};&#xA;&#xA;//create variable for median&#xA;int median = 0;&#xA;&#xA;//sort array&#xA;Arrays.sort(numberArray);&#xA;&#xA;//create variable for average&#xA;double average=0;&#xA;&#xA;//iterate over array&#xA;for(int i=0;i&amp;lt;numberArray.length;i++) {&#xA;    //print sorted array, each number in a different iteration of the loop.&#xA;    System.out.print(numberArray[i]+&quot;,&quot;);&#xA;    //sum numbers in array, one by one.&#xA;    average+=numberArray[i];&#xA;    //if the current value of the median variable is smaller than the current &#xA;    //value in the array, and the loop hasn't passed the middle yet, set the median variable&#xA;    //to be the current value in the array &#xA;    if(median&amp;lt;numberArray[i] &amp;amp;&amp;amp; i&amp;lt;=numberArray.length/2) {&#xA;        median=numberArray[i];&#xA;    }&#xA;}&#xA;&#xA;System.out.println();&#xA;//print results&#xA;System.out.println(median);&#xA;//calculate and print calculation&#xA;System.out.println(average/numberArray.length);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before showing the correct way, ask if anyone can see what this program does. It would be difficult for most. Then show the best-practice version, and they'll see just how better it is.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-04T11:15:24.030" LastActivityDate="2017-06-04T11:15:24.030" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="402" PostTypeId="2" ParentId="400" CreationDate="2017-06-04T11:17:44.483" Score="5" Body="&lt;p&gt;Maybe the easiest way to &lt;strong&gt;practice&lt;/strong&gt; is to have an element of peer review. I find it's much easier as a reviewer to insist on good practice and make 'helpful' suggestions than to follow these rules myself. You might need to be careful to balance the level of reviewer and reviewee though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Justifying the time spent is probably harder. Some of these might work:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you plan ahead, you can have students look back at some of their code from 6 months previous - but that  isn't necessarily an introduction to the art.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mention that people will use some of these decorations as a proxy for code quality. This will benefit them both when you're marking their code, when it comes to making contributions to a group project (or trying to get their idea across) and when they're working. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Explain that even if the code isn't functionally perfect, code that has been written nicely tends to be much easier to debug and improve than something that is badly presented.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Demonstrating the &lt;strong&gt;practical&lt;/strong&gt; value I think is not really possible at an introductory level because you won't have the example to try and debug, etc. More, this could be something to re-enforce every so often by 'presenting' the wrong example code 'by mistake' - maybe for rewards if that's appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you can also show any audience that a well presented piece of work (in any subject) is likely to be better received than something handed in on a bit of scrap paper that looks like the dog slept on it. Making the comparison between something written, and some code is probably important. They won't have the opportunity to hand in some code which is scribbled in pencil, and may not appreciate that &lt;strong&gt;untidy code actually looks&lt;/strong&gt; this &lt;strong&gt;bad&lt;/strong&gt; to an experienced eye. The extreme of this is in a professional environment, where your code will be judged &lt;strong&gt;not ready for review&lt;/strong&gt; unless it passes an automated lint and style check (far more strict than &lt;em&gt;compiles with no warnings&lt;/em&gt;)&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-06-06T06:57:26.773" LastActivityDate="2017-06-06T06:57:26.773" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="403" PostTypeId="2" ParentId="347" CreationDate="2017-06-04T12:31:11.980" Score="4" Body="&lt;p&gt;I did a 4 half day &quot;camp&quot; for two high school girls a couple summers ago. We spent the first two days doing Processing programs. Etch-A-Sketch and Tron are a couple good assignments for beginners. The Etch-A-Sketch simulation leads nicely into making a game based on the light cycle scene in the movie Tron. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cscamp.github.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here is some information about what we did in the camp&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="316" LastEditorUserId="58" LastEditDate="2017-06-04T13:01:27.820" LastActivityDate="2017-06-04T13:01:27.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="404" PostTypeId="2" ParentId="400" CreationDate="2017-06-04T16:35:03.303" Score="0" Body="&lt;p&gt;Best practices are sometimes best taught in conjunction with or after one teaches a problem or solution area where lack of best practices can cause bad things to happen.  Show them, or better yet let them experience, the bad things that can happen first, after violating a certain practice.  Make them value the practice.  Otherwise you might be creating blind followers of unsupported dogma or the latest methodology fads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In engineering labs, we often broke things (with a loud bang) in conjunction with the learning theory on how to design things that didn't fall down.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-04T16:35:03.303" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="405" PostTypeId="2" ParentId="400" CreationDate="2017-06-05T00:44:39.587" Score="6" Body="&lt;p&gt;&lt;em&gt;Best Practices&lt;/em&gt; serves two purposes, allowing future maintainers (which easily could be themselves) to understand what the code is supposed to do, and helping the them avoid errors, and find errors while writing the code. Not all parts of &lt;em&gt;best practices&lt;/em&gt; serve both purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the avenue to take is focus on reduction of errors first. That targets their self-interest in that it makes their work easier, and maybe their grades better. (Broken code won't earn as many points as working code.) To demonstrate the &quot;finding errors&quot; create some sample programs written without best practices, and some with best practices. In both sets make similar errors - logic, syntax, etc. - in different places. It's especially helpful if the compiler/interpreter gives errors that include line numbers that can be misleading, such as when the error is a missing close brace, and the error gives the last line of the function, the point where it becomes obvious that it won't be found. Finding the error in one should be easier than in the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In class the added benefit of being readable is that &lt;em&gt;you&lt;/em&gt; can spot the errors more easily, and probably understand what they were trying to do, and help them understand the missed concepts better. A benefit to them in the &lt;em&gt;here and now&lt;/em&gt; of the class, not some possible future work environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, you can change focus to the usefulness of best practices for maintaining code. Again, using sample code in both good and bad style, have code that needs to be modified. You can change the conditions of some logic, add some functionality to existing routines, and need to add a new function that utilizes an existing function that is, in one case, well documented, and in the other, not even self-documented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is their second year/semester/term, then you also use the review of their own code from the past, as suggested by @Sean in his answer. If it's a project they've done for you, or another class you have input from, then you can plan to have them make controlled modifications to it as suggested above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, find samples of code that do follow best practices, but are also styled with enough difference that you can show that &lt;em&gt;best practices&lt;/em&gt; is not a rigid &lt;em&gt;fill-in-the-blank&lt;/em&gt; template, but a set of guidelines that make things easier. Within those guidelines there is still plenty of room for them to develop their own unique style, and to shine in their own way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;take away&lt;/em&gt; should be that best practices and &lt;em&gt;clean&lt;/em&gt; code are a tools for making their programming easier, but is not a cage that makes everything look the same and removes individuality.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="27" LastEditDate="2017-06-26T21:46:02.017" LastActivityDate="2017-06-26T21:46:02.017" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="406" PostTypeId="2" ParentId="307" CreationDate="2017-06-05T01:56:28.943" Score="2" Body="&lt;p&gt;Something that might be helpful is using computers. Files created on the school computer in the classroom don't exist anywhere else. The file can be copied somewhere else, just like passing it back from a function copies the data, not the variable, to the caller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To demonstrate inner block access to variables at higher level you can use Google Drive, or something similar. A file on Google Drive can be edited using the web interface, so the local computer has access to the data. Still, the data belongs to Google Drive, so any other computer can also access it and change it. Just like all the loops and blocks in the current subroutine have access to data that belongs to the routine, or anything that is has access to from an even higher level. (The last part might be language dependent, and not apply in the language you utilize, and can be dropped.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second option is just to use the directory structure of the computer itself. Creating &lt;code&gt;/home/mine/Documents/computer_class/project_1/notes.txt&lt;/code&gt; will show &lt;code&gt;file not found&lt;/code&gt; if you try to access &lt;code&gt;/home/mine/Documents/computer_class/notes.txt&lt;/code&gt;. [Or for Windows &lt;code&gt;C:\Users\mine\Documents\Computer Class\Project 1\notes.txt&lt;/code&gt; can't be edited using &lt;code&gt;C:\Users\mine\Documents\Computer Class\notes.txt&lt;/code&gt;.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to bear in mind is that not all languages enforce variables to be scoped at that granular of a level, or at all. In addition, how that scope is enforced, or implemented, can also be language dependent. If the language in use has been dissected by the class, then using its internal process can explain &lt;em&gt;why&lt;/em&gt; it happens in that case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless the students will &lt;em&gt;always&lt;/em&gt; be using that language, even after school, I think it's important to also make them aware that those rules may, or may not, apply, and that when they don't apply &lt;em&gt;side effects&lt;/em&gt; can become an issue. In some cases the value isn't &lt;code&gt;undefined&lt;/code&gt;, as in non-existent, rather it can be &lt;code&gt;undetermined&lt;/code&gt;, as in &lt;em&gt;something&lt;/em&gt; is there, but not sure what.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-05T01:56:28.943" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="407" PostTypeId="2" ParentId="396" CreationDate="2017-06-05T07:45:15.767" Score="4" Body="&lt;p&gt;Based on my two years of involvement with FIRST, I have a few suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Teach students to read the documentation.&lt;/strong&gt; &lt;a href=&quot;https://wpilib.screenstepslive.com/s/4485/m/13809&quot; rel=&quot;nofollow noreferrer&quot;&gt;This site&lt;/a&gt; covers Java programming for the 2017 FRC Control System. FIRST programming, while requiring general programming skills, is specialized for the roboRIO and for the competition as a whole. We ran into a couple issues this year whose solutions were found by methodically reading through these documents. There can be a rush to jump right to coding, but it is essential to understand the WPI library and its API fully. This also serves the purpose of seeing which programmers have the discipline to follow documentation to the letter. Having the patience and thought to do so is a necessary condition for being a successful programmer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a simple chassis for coding/driving practice.&lt;/strong&gt; Each year's game has its unique twists and challenges. However, underneath the superstructure  is a drive base that in many cases can be used from year to year with slight modifications. Treat this as essentially a learning robot. Give it working code, let students drive it, then teach the code itself. Make changes from one run to the next. Since the code has immediate, real-world consequences, show the results of minor changes in action. This way you can then go back to the classroom/IDE knowing that students have a context in which to operate. Have them observe and reflect on what happens from run to run when one variable, say, is changed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Research other teams' code.&lt;/strong&gt; Most, maybe all, strong FRC programs have well-developed websites and numerous GitHub repositories. Look at best practices from these teams. Reach out to them. Have students try to read and understand their code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ultimately, students need to know Java, and understanding classes and objects, inheritance and polymorphism, will be as needed with FRC as anywhere else. However, to help them see how Java applies specifically to FRC, start with something that drives and work backward from there. Maybe start with #2, move back to #1, and lead them to #3, maybe even with examples you have found of how teams use the WPI library in different ways. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-05T07:45:15.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="408" PostTypeId="1" CreationDate="2017-06-05T14:11:49.800" Score="9" ViewCount="1073" Body="&lt;p&gt;This is in line with a &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6/teaching-induction-to-prove-the-correctness-of-algorithms&quot;&gt;prior question I asked&lt;/a&gt; about teaching induction, but this is specific to the loop invariant step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not had great success helping my students see how to choose a loop invariant that will (1) always be correct (ie. actually &lt;em&gt;be&lt;/em&gt; a loop invariant) and (2) create the structure that will allow them to actually prove that the algorithm in question will be able to behave correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal mental process is simply to look at the final item you are trying to prove, and figure out what property of the loop will mimic that statement.  While this seems to work well enough as an idiosyncratic process for me, it does not translate into a clear thought-process for the students who don't 'get it' naturally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have an idea about how to approach this with students to make it obvious?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-08T08:09:01.420" Title="Teaching loop invariant choice" Tags="|lesson-ideas|cs-theory|induction|" AnswerCount="7" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="409" PostTypeId="2" ParentId="400" CreationDate="2017-06-05T15:44:54.663" Score="10" Body="&lt;p&gt;I've faced resistance too. Here are some ideas:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students would not turn in an assignment to an English teacher that was not properly punctuated and proofread, even if that teacher will be the only reader. They should not turn in an assignment to a CS teacher that is not properly formatted, documented, and tested.&lt;/li&gt;&#xA;&lt;li&gt;Companies want to hire programmers capable of writing scalable programs. I can write a much stronger letter of recommendation for students who do well at this. (Adapt to college letters of recommendation for high school students.)&lt;/li&gt;&#xA;&lt;li&gt;Rhetorically ask why people try their best when practicing CPR on a dummy.&lt;/li&gt;&#xA;&lt;li&gt;When I interviewed job candidates for Google, I asked questions about testing. It would be hard for candidates to answer well without having practiced writing tests.&lt;/li&gt;&#xA;&lt;li&gt;Give prizes for and share examples of student code that follows best practices. (Get a student's permission before sharing their code.)&lt;/li&gt;&#xA;&lt;li&gt;Show them disastrous bugs that came from not following best practices, such as &lt;a href=&quot;https://www.quora.com/What-are-real-life-examples-of-problems-due-to-missing-braces-in-software/answers/7507516?srid=WDN&quot; rel=&quot;noreferrer&quot;&gt;this one&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-05T15:44:54.663" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="410" PostTypeId="1" CreationDate="2017-06-05T18:25:19.277" Score="7" ViewCount="319" Body="&lt;p&gt;We are considering integrating our processors design and architecture course with our assembly programming course by using the same processor for both. The processor class (which does its work in Logisim) does not have to necessarily implement the entire processor used by the assembly class.  A usable subset would be fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The assembly class focuses on stack operations, function calls, and PC operations, so any assembly language that we move to would have to support these as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, our assembly class uses 6502, which has 6 registers (including flags), and a very limited number of commands.  This might end up being our best choice for integrating into processors, as I have not found anything simpler yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as the processor design class is concerned, 8-bit machines are about twice as good as 16-bit machines, and about 4x as good as 32-bit machines, and I'd like to keep the number of registers down to a manageable number.  6502's 6 registers is pretty reasonable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only assembly language for beginners that I have found is ACSL assembly, but it lacks a memory bus entirely (so no stack).  Are there other languages that I am overlooking?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-05T20:35:18.977" LastActivityDate="2018-01-22T17:20:04.910" Title="Good beginning assembly language for teaching about stack function calls" Tags="|language-choice|assembly|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="412" PostTypeId="1" CreationDate="2017-06-05T23:47:54.437" Score="6" ViewCount="268" Body="&lt;p&gt;I am in the process of developing a new course focused entirely on Raspberry Pi. The goal is to make it a summer-school elective equivalent to one semester (i.e. one class meeting over the summer == one week of class during the school year). The course is in its beginning stages, but my goal is to essentially make a &quot;textbook&quot; out of Raspberry Pi. The course is to make it project-based and hands-on and to work my way from the ground up assuming no prior knowledge of programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is my current course outline:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unit 0: Computational Thinking with Scratch&lt;/li&gt;&#xA;&lt;li&gt;Unit 1: Programming as Art with Processing and Sonic Pi&lt;/li&gt;&#xA;&lt;li&gt;Unit 2: Programming in Python&lt;/li&gt;&#xA;&lt;li&gt;Unit 3: Hacking Minecraft with Python&lt;/li&gt;&#xA;&lt;li&gt;Unit 4: Learning the Command Line&lt;/li&gt;&#xA;&lt;li&gt;Unit 5: Intro to OOP with Greenfoot and BlueJ &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am confident in starting with Scratch, Processing, and Sonic Pi and concluding with OOP. However, I am unsure of the order of Units 2-4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Does it make more sense to introduce the Linux command line (and the shell/scripting in general) &lt;em&gt;before&lt;/em&gt; Python or &lt;em&gt;after&lt;/em&gt; Python?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-13T01:43:00.460" LastActivityDate="2017-06-13T01:43:00.460" Title="Scope and Sequence for Raspberry Pi Course" Tags="|curriculum-design|raspberry-pi|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="413" PostTypeId="2" ParentId="412" CreationDate="2017-06-06T00:31:43.333" Score="5" Body="&lt;p&gt;I would teach the command line first. Both units 2 and 3 require use of python, which I wouldn't teach before the command line because it is normally run from the command line. I'd also teach the command line earlier because I find that it makes students more comfortable knowing it. It could also be useful because you could teach some command line utilities to connect to the pi and that we prepare the students to learn about networking further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, teaching shell scripting opens many doors into computer science that I'm sure a few of your students will happily explore. Once you know the command line you can learn how to write command line utilities, explore networking,  process management, and so much more. I think it'd be more effective to get this vital information to students earlier rather than later.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-06T00:31:43.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="414" PostTypeId="2" ParentId="2" CreationDate="2017-06-06T03:39:52.590" Score="5" Body="&lt;p&gt;I use &lt;a href=&quot;http://vpl.dis.ulpgc.es/&quot; rel=&quot;nofollow noreferrer&quot;&gt;VPL&lt;/a&gt; (Virtual Programming Lab) for Moodle. In my case, it is just used for the introductory PHP classes (since HTML and DB interactions aren't possible), but it supports a wide range of languages, including Java. If you have Moodle available in your school, it is just a matter of installing the plugin. Then you're able to create your own tasks and define test cases in plain-text files. Everything is available from the activity interface itself. If you know a bit of shell script, it is even possible to perform more checks on the code, including style checks (you can even deny a submission if it doesn't match your criteria).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a test cases file for a program that sums 2 values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;case = 1&#xA;input =1&#xA;2&#xA;output =3&#xA;case = 2&#xA;input =3&#xA;4&#xA;output =7&#xA;case = 3&#xA;input =5&#xA;6&#xA;output =11&#xA;case = 4&#xA;input =-1&#xA;-2&#xA;output =-3&#xA;case = 5&#xA;input =-2&#xA;1&#xA;output =-1&#xA;case = 6&#xA;input =0&#xA;6&#xA;output =6&#xA;case = 7&#xA;input =7&#xA;0&#xA;output =7&#xA;case = 8&#xA;input =-10&#xA;6&#xA;output =-4&#xA;case = 9&#xA;input =10&#xA;-9&#xA;output =1&#xA;case = 10&#xA;input =100&#xA;-200&#xA;output =-100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;VPL also supports automatic file comparison for plagiarism detection.&lt;/p&gt;&#xA;" OwnerUserId="313" LastEditorUserId="313" LastEditDate="2017-06-06T12:38:24.567" LastActivityDate="2017-06-06T12:38:24.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="415" PostTypeId="1" CreationDate="2017-06-06T03:55:51.077" Score="7" ViewCount="199" Body="&lt;p&gt;When demoing code in class, I have tried at least three different methods of instruction:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Write code live and have students type along&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write code live and have students follow my logic while only I type and narrate my thinking&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Start with a full working demo and analyze an already written program&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In all circumstances students can access the programs on GitHub after class. Moving forward, I would like to develop a more consistent and effective approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What instructional methods are most effective for teaching with sample programs?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-06T21:04:35.863" Title="Instructional Methods for In-class Code Demos" Tags="|lesson-ideas|curriculum-design|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="416" PostTypeId="2" ParentId="415" CreationDate="2017-06-06T09:27:33.187" Score="4" Body="&lt;p&gt;I think this depends on the curriculum and goal. If the goal is &lt;em&gt;not&lt;/em&gt; to teach them specific algorithms, but to teach them problem solving, then have &lt;strong&gt;them&lt;/strong&gt; write the code first. I come from adult education, and this approach works fine there for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I do is I give gradually more complex exercises, and give them time to develop a solution. I also give them a few keywords, commands that they will likely need. I go around and help with individual solutions. They are allowed to work together, communicate, help each other if they want to. They can use the help, internet, the course book, whatever they can get their hands on.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means a lot more work for the teacher, as you have to run around, understand different approaches, and not force your solution on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I find a particularly good or interesting solution, I show it to the class (after everyone has finished).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only solve the program in front of the class once everyone has a solution. (Pretty disappointing, but even this way I see some of them just delete their working solution and mindlessly copy mine.) I always try to emphasize there is no &lt;em&gt;one good solution&lt;/em&gt;. There might be better, faster solutions, but as long as theirs is correct and works, it is a good solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the inevitable speed differences in the group, instead of giving one exercise, I give 3-4. The first is the mandatory, the rest is extra. (Maybe for + points or such to motivate them; luckily in adult education I don't need the extra external motivation.) When the last person finishes (or gives up) the main exercise, that is when time is up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I say the most effective way for teaching with sample programs is let them try, fail, suffer, find their own way, then finally succeed. Don't spoonfeed them.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-06-06T09:27:33.187" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="417" PostTypeId="2" ParentId="415" CreationDate="2017-06-06T09:46:05.817" Score="2" Body="&lt;p&gt;A good &lt;em&gt;method&lt;/em&gt; will involve all three modes, in combination with each other. The mode will depend on the objective of the demo and the size of the code. If the students are not touch typists, there's going to be some, possibly hard to spot, errors, and entering a 50 line code segment will take a significant portion of the available time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For small, basic sections of code, having a type-along can work. Especially if you're inserting segments, and changing parts, as the design evolves. You won't want to have them constantly typing the same basic parts every time you do a type-along session, however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some cases, you might want to do a larger demo of the small code. First is them watching you do the work, as you demonstrate some concept. Second, you do a type-along demo, where they &lt;em&gt;help&lt;/em&gt; demonstrate the concept just learned from the solo demo, as the class writes a second piece collectively. Lastly, as lab, they apply the concept to a third code, following a problem statement you give them, but they develop the solution themselves with minimal guidance from you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For moderate sized code, have the skeleton pre-typed, and available for download before the lecture, then work through the section that is the target of the class session. Concepts that have already been mastered need not be retyped each session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you get to the point where you are re-factoring code, or combining previous sections with new content, you can have that available for download as well, but do the demo without them typing. While doing the demo, you should also limit your typing. Have what you want to type ready, and to a copy/paste of the proper blocks. They presumably will be familiar with the concepts in the smaller sections, and the the objective is combining them to create a larger concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last version is to distribute completed code for them to analyze, except that it's not fully working code - it's broken. The task is to find the error using the clues the compiler/interpreter gives. Of course, that means trying to design &lt;em&gt;broken&lt;/em&gt; code that fails the way you want it to. &lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-06T09:46:05.817" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="418" PostTypeId="2" ParentId="410" CreationDate="2017-06-06T10:13:30.607" Score="5" Body="&lt;p&gt;Go with the 6502. Its market penetration and popularity has generated a lot of resources over the years, giving you more to work with. Looking into the &quot;home-brew CPU&quot; realm should supply significant material to make reproducing the 6502 in Ligisim fairly easy. It already has a small instruction set (around 150 operations) that includes stack operations. There are also several assemblers available that will allow you to cross-assemble the code on a PC and load it into the 6502.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a bonus for the students, because of its popularity, there should be a few programs in the wild that you can get for the architecture students to run after they build the processor. Of course, that means they'd have to implement the whole processor, but it also gives them the boost of making the processor that will run a &quot;real&quot; program off the Internet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a bonus for you, since you've already been using it for the assembly class, you already have the materials, lessons, and experience for the assembly class and can concentrate on building lessons for the design class.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-06T10:13:30.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="419" PostTypeId="2" ParentId="415" CreationDate="2017-06-06T11:03:29.883" Score="3" Body="&lt;p&gt;There seems little value in students copying code off a display, but much in watching the teacher model how they &lt;em&gt;think&lt;/em&gt; about the task, talking through the problem solving process of coding, as well as debugging (in the case of, ahem, deliberate, mistakes), iterative development and refactoring. I think this works if it's editing a longer program or writing short examples. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say good practice would include sharing the code produced, via Github or elsewhere, as well as screencasting the talking through of the development process itself.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-06-06T11:03:29.883" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="420" PostTypeId="2" ParentId="415" CreationDate="2017-06-06T13:06:55.377" Score="4" Body="&lt;p&gt;All of those tools are useful, and for slightly different things.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write code live and have students type along&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a great tool when you want to discuss a simple algorithm. Having the kids type prevents them from completely zoning out, and it also gives them a first check in understanding the algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that surprised me when I first started doing this was that kids who don't understand what you've written often make typos at this stage &lt;em&gt;(sometimes rather odd ones)&lt;/em&gt;, and have to raise their hands for help getting theirs to compile or run correctly.  Having to deal with typos and such gives you an immediate sense of who needs help, and keeps the kids engaged.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write code live and have students follow my logic while only I type and narrate my thinking&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a perfect tool for illustrating debugging techniquss and common errors. This tool is effective  a time you want to do something foolish before showing the students how to fix it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start with a full working demo and analyze an already written program&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a great option when you want the kids to get the gist of an algorithm, but don't care if they get all of the details yet.  I will often do this when I am starting a complex algorithm that I intend to do in several passes, or if my only goal with the algorithm is exposure.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would also add a 4th option, which is the one I actually use most frequently:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create starter code together (as per #1), and have the class go off and try to figure out how to implement the next step of the algorithm on their own before doing it together.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Going back and forth in a &quot;student-tries, teacher-models&quot; manner keeps the kids deeply engaged with the algorithm all the way through the lesson, as they are thinking through the problem (possibly with the help of a neighbor), and then coming back to you to see how they did.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-06T13:06:55.377" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="421" PostTypeId="1" CreationDate="2017-06-06T14:30:21.853" Score="5" ViewCount="177" Body="&lt;p&gt;I teach university students and would like to start teaching prospective developers. As such, I have been thinking about the core differences between these two audiences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that students are sometimes less motivated and less prepared, while developers are more experienced and sometimes really enthusiastic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this correct? And if so, how should this difference impact my methods of instruction?&lt;/p&gt;&#xA;" OwnerUserId="274" LastEditorUserId="150" LastEditDate="2017-06-20T13:05:05.933" LastActivityDate="2017-06-20T13:05:05.933" Title="What should be the difference between a university course and developer training?" Tags="|student-motivation|adult-education|" AnswerCount="3" CommentCount="8" ClosedDate="2017-06-12T23:47:44.427" ContentLicense="CC BY-SA 3.0" />
  <row Id="422" PostTypeId="2" ParentId="421" CreationDate="2017-06-06T14:57:14.727" Score="4" Body="&lt;p&gt;Rather crudely you might see the differences as being:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A university&lt;/strong&gt; - students engaged in study, where study is an &lt;a href=&quot;http://www.newmanreader.org/works/idea/&quot; rel=&quot;nofollow noreferrer&quot;&gt;end in itself&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Developer training&lt;/strong&gt; - students engaged in study, where being job ready is the end goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What does this mean in practice? Developer training might be more inclined towards studying using the latest technologies (Javascript, Rust etc). Whilst University might tend more towards studying conceptual understanding (Matrices, Functional programming) and place less importance on the programming language (some unis teach with Fortran, Delphi etc.). You might also get courses at universities that don't appear so immediately applicable to job roles (courses on provability of programs, compiler creation), whilst developer training might be shorn of any course that isn't in high demand by the industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However. Working in the UK, the job readiness of a university degree is seen as a major indicator of the 'success' of a university course. We have the British Computer Society &lt;a href=&quot;http://wam.bcs.org/wam/coursesearch.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;accrediting courses&lt;/a&gt; and universities are ranked on the &lt;a href=&quot;https://www.thecompleteuniversityguide.co.uk/league-tables/rankings?s=Computer%20Science&quot; rel=&quot;nofollow noreferrer&quot;&gt;employment rate&lt;/a&gt; of their students. So in reality, there might be no difference at all.&lt;/p&gt;&#xA;" OwnerUserId="48" LastEditorUserId="48" LastEditDate="2017-06-06T15:09:29.550" LastActivityDate="2017-06-06T15:09:29.550" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="423" PostTypeId="2" ParentId="421" CreationDate="2017-06-06T15:28:46.373" Score="5" Body="&lt;p&gt;Colleges and universities in the United States are required by our accreditors to have explicit learning goals and assess our effectiveness at meeting them. (I assume there are similar rules in other countries.) For example, here's how my upper-division Programming Languages course satisfies goals:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;College-wide goals&lt;/strong&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Students will learn to think critically&lt;/strong&gt;, which they will demonstrate by&#xA;analyzing the behavior of programs in diverse languages without executing them.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Students will learn to develop and realize their own creative visions across the arts and sciences&lt;/strong&gt;, which they will demonstrate by choosing the appropriate programming language or abstractions for a task&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Students will learn to communicate responsibility and effectively&lt;/strong&gt;, which they will demonstrate by justifying choices among and within programming languages.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Computer science department goals&lt;/strong&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Design and write a correct computer program&lt;/strong&gt;, which they will demonstrate by writing programs both in and implementing new programming languages&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Understand how computer systems (including architecture, operating&#xA;systems, networks, and compilers) work&lt;/strong&gt;, which they will demonstrate by&#xA;adding languages features to an interpreter.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;General education goals for quantitative and computational reasoning&lt;/strong&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Translate problems into the language of mathematics and computer science,&#xA;and solve them by using mathematical and computational methods and&#xA;tools&lt;/strong&gt;, which they will demonstrate by writing and reasoning about programs in novel programming languages.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Understand the structure and development of logical arguments&lt;/strong&gt;, which they will demonstrate by analyzing the behavior of programs in diverse&#xA;languages without executing them.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I were to teach a course in industry, I would be under no obligation to meet any goals other than those advertised for the course.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-15T01:12:24.613" LastActivityDate="2017-06-15T01:12:24.613" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="424" PostTypeId="2" ParentId="378" CreationDate="2017-06-06T16:51:45.733" Score="2" Body="&lt;p&gt;I have used an example of a &lt;code&gt;machine&lt;/code&gt; which has a serial number and a state. It can be turned on and off, it can be told to give out its serial number. A &lt;code&gt;bMachine&lt;/code&gt; can be powercycled (inheritance from &lt;code&gt;machine&lt;/code&gt;). There is a &lt;code&gt;machinedesk&lt;/code&gt; which contains &lt;code&gt;machines&lt;/code&gt;. They can self check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worked through a whole range of 'things' that the objects could do to demonstrate everything in the AQA A-level spec in Python. I then got students to take what I had demonstrated and build joke machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of this is the &lt;strong&gt;context&lt;/strong&gt; - students struggle to see why on earth you would model an animal whilst they can see a simple extension to allow these objects to control actual machines.&lt;/p&gt;&#xA;" OwnerUserId="348" LastEditorUserId="41" LastEditDate="2017-06-06T17:49:02.760" LastActivityDate="2017-06-06T17:49:02.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="425" PostTypeId="2" ParentId="375" CreationDate="2017-06-06T16:56:55.157" Score="1" Body="&lt;p&gt;Go latest - why not? Public facing - I'd say just make them all sign a terms of use agreement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great plan - at the moment I don't really get to do much web work due to the courses I teach - if I did, I would totally love this. Particularly if you can get a retired server rather than just a PC, I reckon kids would buy in to it bigstyle!&lt;/p&gt;&#xA;" OwnerUserId="348" LastEditorUserId="76" LastEditDate="2017-06-06T17:47:16.543" LastActivityDate="2017-06-06T17:47:16.543" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="426" PostTypeId="2" ParentId="339" CreationDate="2017-06-06T16:58:50.050" Score="1" Body="&lt;p&gt;I have a load of bags of matchboxes (I bought like 1,000 plain white ones from Amazon). Each bag has about 16 matchboxes, and each one has letters drawn on to it. They can just grab a bag for each pair of kids and demonstrate searching and sorting, really easily. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One day I must write up my brown box computer somewhere - great programming tool without computers!&lt;/p&gt;&#xA;" OwnerUserId="348" LastEditorUserId="2" LastEditDate="2017-06-06T17:30:24.373" LastActivityDate="2017-06-06T17:30:24.373" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="427" PostTypeId="2" ParentId="349" CreationDate="2017-06-06T17:00:33.963" Score="-2" Body="&lt;p&gt;Historically, &lt;code&gt;Hello, &amp;lt;name&amp;gt;&lt;/code&gt;, but I think I'm going to go with something like hangman, snake, guess the number... I'm leaning more and more to &quot;hacking&quot; existing programs rather than learning bit by bit. &lt;/p&gt;&#xA;" OwnerUserId="348" LastActivityDate="2017-06-06T17:00:33.963" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="428" PostTypeId="2" ParentId="228" CreationDate="2017-06-06T17:07:43.403" Score="4" Body="&lt;p&gt;The best &quot;win&quot; I've had with this is drawing on tables. I gave challenges to my Y12s (about a dozen students). While talking through the problems I was annotating ideas, flowcharting, tracing etc on the tables beside them with a board marker.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now when I give them a problem they grab a table from the centre of the room and start drawing out ideas. And because they're 'winning' with what they're doing they start going above and beyond.&lt;/p&gt;&#xA;" OwnerUserId="348" LastEditorUserId="41" LastEditDate="2017-06-06T17:46:11.050" LastActivityDate="2017-06-06T17:46:11.050" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="429" PostTypeId="2" ParentId="380" CreationDate="2017-06-06T18:14:54.047" Score="1" Body="&lt;p&gt;This is one of the reasons I rarely make use of group work in teaching. It is a minefield of problems. Would it be possible to get students to produce a document prior to starting work agreeing who is going to do what? Alternatively in exam boards team leaders are provided with suggested grades based on what the system says individual markers have done (error rate, completion rate, etc) and then the team leader is asked to award grades to the individual markers, varying from suggested grades if necessary. Could this approach be made to work for your situation?&lt;/p&gt;&#xA;" OwnerUserId="348" LastActivityDate="2017-06-06T18:14:54.047" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="430" PostTypeId="1" AcceptedAnswerId="432" CreationDate="2017-06-06T19:59:30.563" Score="22" ViewCount="4216" Body="&lt;p&gt;I teach a high school student who has already developed an understanding of the language used in my curriculum and causes difficulties. The lectures and programming projects in the curriculum bore this student, and as a result, he doesn't cooperate when it comes to doing the coding labs and projects. He simply doesn't agree to do the work. An obvious &quot;solution&quot; is simply to give him a low grade, but it is not an ideal solution, because he has readily mastered the material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, what techniques can I employ to encourage him to work on projects and to cooperate? Alternatively, what changes can I make to project guidelines for such students?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tests reflect that the student knows the material (though it is clear that he is disdainful of the way it is taught).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-01T14:35:54.600" LastActivityDate="2021-12-15T18:39:34.237" Title="Problematic student at a very high level" Tags="|secondary-education|best-practice|student-motivation|differentiation|" AnswerCount="13" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="431" PostTypeId="2" ParentId="430" CreationDate="2017-06-06T20:24:06.940" Score="12" Body="&lt;p&gt;You said he refuses to work, but has mastered the material. How do you know he's mastered the material? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had students like this in the past. They'll finish 2 weeks worth of assignments in a day and a half. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Talk to them. See what interests them about programming. The few times that this has come up, the student had something specific they wanted to build. It was well above what was expected in class, but it was still programming, so still related. We came up with a plan for them to work on their pet project, which always required that they finish the assignments I gave first. Then, they're free to build their project. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-06T20:24:06.940" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="432" PostTypeId="2" ParentId="430" CreationDate="2017-06-06T20:41:23.153" Score="35" Body="&lt;p&gt;The best way to deal with this kind of student is to &lt;strong&gt;head it off at the pass&lt;/strong&gt;.  If you can get the student at the beginning, you can often prevent the problem from festering in the first place. I have a student coming in next year who I have already been warned will have this problem, and I plan to show this to my class on the first day:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/vskFN.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/vskFN.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will then say something like, &lt;em&gt;&quot;For whom is this situation unfair?&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the kids point to the fish, I will point out that it is &lt;em&gt;just as unfair to the monkey&lt;/em&gt;.  I will then ask them to talk to a neighbor and figure out why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will finish up by saying that I have a promise for the fish of the class: everyone who puts in the work &lt;em&gt;will be able to climb the tree&lt;/em&gt;.  That's MY job.  However, I have to find a way to be fair to the monkeys as well.  That means that I must reserve the right to try to find ways to push them to get better in my classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are in that position, and can get the work done very easily, and find that I give them harder work, I ask a few things of them: &lt;strong&gt;(1)&lt;/strong&gt; understand that this is fairer than it may initially feel, and &lt;strong&gt;(2)&lt;/strong&gt; understand that this comes from a place of actually caring about them as people. Making more appropriate assignments for them is harder for me as well. If I didn't care about them as people, I could just let them get away with the minimum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In essence, then, I am trying to recast making differentiated, harder assignments into something that the students will understand as both a loving act, and one that respects them deeply as individuals.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-12T15:23:20.750" LastActivityDate="2017-06-12T15:23:20.750" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="433" PostTypeId="2" ParentId="378" CreationDate="2017-06-06T20:46:57.073" Score="1" Body="&lt;p&gt;You could have different implementations of a bit of hardware, e.g. printer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or a concept such as sorting. sort ⇐ bubble sort, sort ⇐ merge sort, sort ⇐ insertion sort, sort ⇐ quick sort, sort ⇐ a hybrid sort, …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A stack implemented with an array and with a linked list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A queue implemented with an array (circular buffer) and with a linked list.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Objects are not always objects. We need to remember and teach, that not all Objects (in Object orientation), are objects. Some are algorithms (The sort algorithm, so still a noun ).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-06T20:52:13.077" LastActivityDate="2017-06-06T20:52:13.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="434" PostTypeId="2" ParentId="380" CreationDate="2017-06-06T20:51:24.777" Score="4" Body="&lt;p&gt;I also like group programming projects (usually pairs, so some of the mutual grading ideas, which I like, don't apply). What I do is have an early phase of the project be a co-authored &quot;plan&quot; document that crucially, includes specific tasks for each member. I make the assumption that they can divide the work equitably or that they can re-negotiate later. Later in the semester, if one partner is lagging behind (and I have one or two such occurrences every semester), I have a way to verify that one person did more and so can adjust the grade accordingly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, yes, this does add to the work of grading, and I try to default to equal grades when I can. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am thinking of doing in the future is to have the &quot;plan&quot; document include contingency planning: what the team will do if someone is unable to do their share of the work. I will point out that rarely does someone slack off due to laziness; it's more often due to distractions from personal illness, death in the family, and other issues. That helps avoid some of the embarrassment of saying &quot;I didn't do what I said I would.&quot;&lt;/p&gt;&#xA;" OwnerUserId="374" LastActivityDate="2017-06-06T20:51:24.777" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="435" PostTypeId="2" ParentId="415" CreationDate="2017-06-06T21:04:35.863" Score="2" Body="&lt;p&gt;I have also experimented a bit with having a student do the typing that is displayed to the class, following my instructions. Student chosen at random. This can be a good way to assess how well the students are following what you are saying, and how well they've internalized the syntax and rules needed for the example. Just need to keep it fair and maybe avoid students who you know are really struggling...&lt;/p&gt;&#xA;" OwnerUserId="392" LastActivityDate="2017-06-06T21:04:35.863" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="437" PostTypeId="1" CreationDate="2017-06-06T21:23:13.987" Score="7" ViewCount="231" Body="&lt;p&gt;I frequently teach CS1 and CS1-and-a-half in a very diverse, working-class,  commuter public sector college. I have my students to work in small groups (2 or 3) on their larger homework programming projects. The students rarely know each other from outside class, and I take it upon myself to assign them to the groups. With the best of intentions and considerable misgivings I use demographics and to-date academic performance to construct the teams: same gender, different ethnic background, similar academic performance. This seems to &quot;work&quot; but maybe that sense is merely expectation-fullfillment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do others use these criteria, or opposite ones? I'm curious to learn of others' experiences and possibly perspectives I haven't considered.&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="27" LastEditDate="2017-06-29T02:36:45.420" LastActivityDate="2018-05-28T13:49:04.583" Title="Demographics in Programming Teams in Early CS Courses" Tags="|best-practice|project|group-work|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="438" PostTypeId="2" ParentId="6" CreationDate="2017-06-06T21:25:42.820" Score="3" Body="&lt;p&gt;One big struggle is getting CS students to &lt;strong&gt;care&lt;/strong&gt; about induction.  Proving correctness doesn't really count as motivation, when &quot;passing the tests&quot; seems so much approachable and the extra benefits from proving correctness just don't seem worth the extra effort. On the other hand, if induction could be practically useful in &lt;strong&gt;designing&lt;/strong&gt; algorithms in the first place, that seems to provide more motivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's essentially the approach used in Udi Manber's fantastic 1988 CACM article: &lt;a href=&quot;http://dl.acm.org/citation.cfm?id=50091&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Using induction to design algorithms&quot;&lt;/a&gt;.  (He later expanded this into a full textbook called &quot;Introduction to Algorithms: A Creative Approach&quot;.)  One caution for both the article and the book is you can't just throw these at students and assume that they already know induction, but instead probably need to review/teach induction at the same time. &lt;/p&gt;&#xA;" OwnerUserId="387" LastActivityDate="2017-06-06T21:25:42.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="440" PostTypeId="2" ParentId="408" CreationDate="2017-06-06T21:36:13.043" Score="2" Body="&lt;p&gt;At the CS1 level that I teach, I focus a lot on the &lt;em&gt;role&lt;/em&gt; and the precise &lt;em&gt;meaning&lt;/em&gt; of variables and encourage comments at the point of declaration that attempt to make these clear, especially variables that are involved in loops. Since the meaning of a variable changes as the loop body is executed, we &quot;agree&quot; to use the entry point as the standard point of reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is admittedly not using the post-condition to derive the invariant which in turn would be used (in principle) to derive the code itself; but it helps students understand and check their code, and I hope lays the foundation for any exposure to semi-formal methods they might encounter in the future. Combining the termination condition with the assigned meanings of the variables allows me to make reference to the idea of program proofs. Admittedly, the bottom 2/3 of the class is rather lost there, but the top 1/3 is generally tantalized.&lt;/p&gt;&#xA;" OwnerUserId="394" LastEditorUserId="394" LastEditDate="2017-06-06T22:01:56.370" LastActivityDate="2017-06-06T22:01:56.370" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="441" PostTypeId="2" ParentId="437" CreationDate="2017-06-06T21:45:53.850" Score="4" Body="&lt;p&gt;I avoid using &lt;a href=&quot;http://www.legislation.gov.uk/ukpga/2010/15/section/4&quot; rel=&quot;nofollow noreferrer&quot;&gt;protected characteristics&lt;/a&gt; for any kind of group/class allocation. Personally, I apply a similar approach that I use in experimental research: the &lt;a href=&quot;http://stattrek.com/statistics/dictionary.aspx?definition=Randomized%20block%20design&quot; rel=&quot;nofollow noreferrer&quot;&gt;randomized block design&lt;/a&gt;. Typically, I use levels of prior relevant experience, either self-reported by the students at their point of admission or their grade for their pre-requisite class, as the blocks.&lt;/p&gt;&#xA;" OwnerUserId="372" LastActivityDate="2017-06-06T21:45:53.850" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="442" PostTypeId="2" ParentId="46" CreationDate="2017-06-06T21:46:18.743" Score="5" Body="&lt;p&gt;I have a contrary view.  Dynamic programming and it's close cousin memoization are actually pretty easy to teach.  It's true that students frequently struggle mightily with dynamic programming, but I strongly believe that it's usually not the actual dynamic programming that they're struggling with, but rather the underlying recursive relationships.  If I help them review recursion and give them lots (and lots and lots) of practice coming up with the kinds of brute-force recursive algorithms that dynamic programming replaces, then taking the extra step to dynamic programming is relatively straightforward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think dynamic programming is a perfect example where skill B depends on skill A, and we mis-attribute student weakness with B, when the real weakness is with skill A instead.&lt;/p&gt;&#xA;" OwnerUserId="387" LastActivityDate="2017-06-06T21:46:18.743" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="443" PostTypeId="2" ParentId="430" CreationDate="2017-06-06T21:58:30.797" Score="2" Body="&lt;p&gt;Ask him if there are any projects of interest he'd like to work on.  I'd try to engage the student in research of some sort but he would still be required to demonstrate proficiency/mastery of the topics in the course.&lt;/p&gt;&#xA;" OwnerUserId="416" LastActivityDate="2017-06-06T21:58:30.797" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="444" PostTypeId="2" ParentId="437" CreationDate="2017-06-06T22:35:59.757" Score="3" Body="&lt;p&gt;An interesting approach, which I have both used, and experienced as a student, is to make it truly random, and obviously so. Use a deck of playing cards split to match class size and how you want the divisions to be. For groups of 2-4, use the the face values with the correct number of suits and numbers removed to make the division equal. If it's a large class and you want groups of larger sets you can group the results some other way, say even red suits, odd red suits, even black suits, and odd black suits, to make 4 teams. Have the cards pre-selected for that class, but shuffle in class, and allow the students to select their cards one by one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grouping the students by knowledge can have negative effects two ways. First the &quot;advanced&quot; students don't get to see how others might think, and secondly the less advanced students receive the message that they aren't as good as the other students. Mixing them helps the &quot;behind&quot; students learn from the &quot;advanced&quot; ones, and the advanced students learn more by &quot;explaining&quot; it to the others. The benefit to both is that they get to see how other people view the project, and get insights into different modes of thinking, and probably programming.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-06T22:35:59.757" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="445" PostTypeId="2" ParentId="430" CreationDate="2017-06-06T22:36:20.087" Score="9" Body="&lt;p&gt;A few ideas...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Scaffold your problem sets.&lt;/strong&gt; CS50 -- and by extension CS50 AP -- sections students according to &quot;less comfortable&quot; and &quot;more comfortable&quot; tracks. (&lt;a href=&quot;http://docs.cs50.net/2016/fall/psets/2/pset2.html#what-to-do&quot; rel=&quot;noreferrer&quot;&gt;See what they do here for pset2.&lt;/a&gt;) Giving students options, especially in terms of difficulty level, is a key. This may involve creating problems with additional, optional components, which will be additional work on your part, but it also gives opportunities for other students to extend their learning. I also love what they include in their syllabus:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Know that CS50 draws quite the spectrum of students, including &quot;those&#xA;  less comfortable,&quot; &quot;those more comfortable,&quot; and those somewhere in&#xA;  between. However, what ultimately matters in this course is not so&#xA;  much where you end up relative to your classmates but where you, in&#xA;  Week 11, end up relative to yourself in Week 0.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Each student’s final grade is individually determined at term’s end.&#xA;  Remarkable effort and upward trending are considered, as is input from&#xA;  the teaching fellows. The course does not have pre-determined cutoffs&#xA;  for final grades. The course is not graded on a curve. Those less&#xA;  comfortable and somewhere in between are not at a disadvantage&#xA;  vis-à-vis those more comfortable.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Do you reward a student who knows everything from the start and doesn't show any signs of progress with a student who knows nothing at the start but makes dramatic progress? That's a huge philosophical question to consider in terms of how you assess student learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Give him additional, empowering responsibilities.&lt;/strong&gt; Find a way for him to have a special role in the class. Use this advanced knowledge as a strength for you to use. When giving time to work in class, have him be a source of answers to his peers' questions. Better yet, have him lead a walkthrough where he has to teach a mini-lesson for how to approach a particular assignment. If he's going to be bored during a lecture, encourage him to write a sample program or two for use in direct instruction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Make him complete the same work in a different language.&lt;/strong&gt; Have him complete the same assignment, but in a language different from the one assigned. This will require him to learn different programming idioms, libraries, and paradigms. A solution in an imperative language would be much different from one in a functional language. No one is an expert at every language, so there's always a new challenge to be had with a different language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a much smaller level, you could require challenges on a site like HackerRank either in the language of the class or a new one entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have two Java-specific suggestions...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Have him learn a lower-level language (e.g. C) in which to implement the program.&lt;/li&gt;&#xA;&lt;li&gt;Challenge him to leave the object-oriented world and learn a functional language in which to complete the assignment.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-07T04:54:27.807" LastActivityDate="2017-06-07T04:54:27.807" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="446" PostTypeId="2" ParentId="327" CreationDate="2017-06-06T22:36:57.917" Score="5" Body="&lt;p&gt;I absolutely allow students to take notes on laptops and always did worse when I didn't have that option as a student. Most students can type faster and (obviously) neater than they can write. I've experienced and heard from others that they'll be so focused on writing everything the lecturer is writing or typing that they won't actually listen and process and be able to ask useful questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the trends vs individuals is key and that means letting individuals have both options. If students are inclined to not pay close attention, they'll either check Facebook or daydream or fall asleep anyway. Further, advanced students may be bored when you are discussing something they already understand. I personally would rather students show up and participate for half the time than not show up at all or fall asleep. It seems to me a good opportunity to help them develop as learners and people by encouraging them to listen because they know it will be valuable to them, not because you have trapped them in a room. Obviously it's naive to think all students will manage that, but as mentioned previously, if they aren't going to pay attention, taking away their laptops won't stop them.&lt;/p&gt;&#xA;" OwnerUserId="422" LastActivityDate="2017-06-06T22:36:57.917" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="447" PostTypeId="1" AcceptedAnswerId="449" CreationDate="2017-06-07T00:38:30.610" Score="5" ViewCount="178" Body="&lt;p&gt;When I teach metaprogramming like dynamically defining methods and method delegation, students usually understand what it is fairly quickly because it's simply a dynamic way of doing something they've already done. I now want to assign them a project that utilizes the metaprogamming I've taught. I'm having trouble thinking of a project to assign them which would be made significantly easier by using metaprogramming. The only use I know of is in a DSL. Creating a DSL is a rather large project to assign a group of high school students, so I'd prefer something smaller.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically this project is for fairly advanced students working with ruby, but more general answers are better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what projects could you assign to illustrate the utility of metaprogramming?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-09-06T11:13:24.440" LastActivityDate="2017-09-06T11:13:24.440" Title="What are good projects for metaprogramming?" Tags="|ruby|metaprogramming|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="448" PostTypeId="1" CreationDate="2017-06-07T00:52:28.390" Score="8" ViewCount="200" Body="&lt;p&gt;I am designing a blocks-based language to use in my classrooms and summer camps. Since I am using the &lt;a href=&quot;https://developers.google.com/blockly/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blockly&lt;/a&gt; framework, I am able to choose my own colors for the blocks and am looking for information to guide my selection. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I find the number of colors in Scratch and Snap! and others to be overwhelming, and I hypothesize that young learners don't rely much on a block's color as much as its shape. But this is pure speculation—I welcome any reports from the front line or pointers to studies about block color.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Particularly, I'm interested in the method of grouping and organising the blocks into the color groups, rather than selecting the colors themselves: how should I select groups in order to help students understand each block's purpose? Are there any proven approaches of grouping certain types of blocks (e.g. flow control) together, or is the choice relatively arbitrary? Does the color choice have more of an impact than the shape and way of connecting blocks together?&lt;/p&gt;&#xA;" OwnerUserId="435" LastEditorUserId="2" LastEditDate="2017-06-08T17:04:02.993" LastActivityDate="2017-06-08T17:44:15.650" Title="Colors in Blocks-based Languages" Tags="|block-based-programming|" AnswerCount="3" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="449" PostTypeId="2" ParentId="447" CreationDate="2017-06-07T01:12:45.097" Score="4" Body="&lt;p&gt;During lecture, my students and I recreate Javascript objects in Ruby. In Javascript, these two lines are synonymous:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;config['indent'] = 2;&#xA;config.indent = 2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ruby doesn't support this duality natively, but metaprogramming makes it possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We create a class &lt;code&gt;AutoObject&lt;/code&gt; that internally stores a dictionary to hold all of the object's properties. Its &lt;code&gt;method_missing&lt;/code&gt; consults this dictionary when something like &lt;code&gt;config.indent&lt;/code&gt; is executed. If the method name suggests an assignment, it updates the dictionary. If it's a read of an existing property, it returns the value. Otherwise we raise an exception.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the automatic properties are in place, it's not much more work to add serialization and file I/O. By the end, we are reading and writing configuration files that are useful for any application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;ActiveRecord does something similar when it automatically creates an object and its interface based only on the database schema.&lt;/p&gt;&#xA;" OwnerUserId="435" LastActivityDate="2017-06-07T01:12:45.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="450" PostTypeId="2" ParentId="349" CreationDate="2017-06-07T04:23:40.813" Score="3" Body="&lt;p&gt;I agree with the answer proposing Hello name, and the answer that proposes students inputting their name and then repeating it x times. Then a conditional can be introduced that does or does not print their name depending on some boolean expression or similar. At this point, we would have introduced: types, input (and output), repetition, conditionals, and possibly some mathematics. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-07T04:23:40.813" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="451" PostTypeId="1" AcceptedAnswerId="453" CreationDate="2017-06-07T05:11:09.097" Score="30" ViewCount="5644" Body="&lt;p&gt;Context: CS1-style, intro programming class, using an interpreted language (Python).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will get a hand raised asking &quot;Why are we learning recursion? Is it good programming practice?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My response is typically:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We are learning recursion since reducing problems into smaller problems is a key skill, and recursion is just an example of reducing a problem to a self-similar smaller problem.&lt;/li&gt;&#xA;&lt;li&gt;Also, no, recursion not universally better design. Often, calling functions repeatedly like this wastes space on the stack and the implementation can be much less efficient. Our recursive formulation of factorial for example, is a terrible design. Unless you know the recursion depth is bound by something small (think: logarithmic) and resultant implementation is much simpler, then its not worth it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Students seem deflated with that response. Why learn something that is not very practical, or is often inefficient? Why learn something that is 'sometimes simpler' when (to them) it seems actually like a counter-intuitive design?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question(s): how do I get students excited about recursion? How do I better motivate studying recursion? Can I better / more naturally express those conditions under which (or those languages for which) recursion is not a poor design choice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is challenging once you accept that CS1 students likely: know nothing about functional languages, where recursion is more natural; don't know anything about side-effect free design or mathematical proofs of correctness; are not using recursive data structures yet; etc. It feels like the 'benefits' of recursion are hard to express to a CS0/CS1 audience.&lt;/p&gt;&#xA;" OwnerUserId="475" LastEditorUserId="104" LastEditDate="2017-07-08T22:21:58.200" LastActivityDate="2017-07-20T21:44:24.517" Title="How to respond when students ask &quot;is recursion good practice&quot;?" Tags="|lesson-ideas|student-motivation|recursion|" AnswerCount="13" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="452" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T05:19:22.743" Score="1" Body="&lt;p&gt;I feel it is very bad to say &quot;no, don't ever use this&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For recursion, the second most important detail is to have an &lt;code&gt;exit statement&lt;/code&gt;. That is the condition upon which the recursion terminates. So long as the exit statement is good, recursion is a very, very powerful tool.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def thing(position, str):&#xA;    if position == 0:&#xA;        print(str)&#xA;        return str&#xA;    else:&#xA;        print(&quot;single letters: &quot;+thing(position-1, str[:,position]))&#xA;        return thing(position-1, str[:,position])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This has a well defined exit statement, that will be met, because every call decreases &lt;code&gt;position&lt;/code&gt; by 1, and the exit checks if &lt;code&gt;position&lt;/code&gt; is 0. Which eventually happens for any positive integer value being decremented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This shows that recursion is very useful, BUT it &lt;strong&gt;must&lt;/strong&gt; have a good exit statement. So saying &quot;it's horrible in any programming language&quot; is &lt;em&gt;very&lt;/em&gt; misleading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in essence, the main point is showing how important choosing a good exit statement is. It has to be one that must be met, simply because of the recursive action (in the example, the &lt;code&gt;position-1&lt;/code&gt; parameter being passed, and the &lt;code&gt;position==0&lt;/code&gt; check).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NOTE: this is code adapted from java, so it might have inaccuracies. Feel free to correct them.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-07T05:19:22.743" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="453" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T05:32:12.567" Score="20" Body="&lt;p&gt;Quite honestly, I would be upfront with them about the debate. Send them to a couple other SE threads:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/9386375/efficiency-recursion-vs-loop&quot;&gt;Efficiency: recursion vs loop&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1011448/necessary-uses-of-recursion-in-imperative-languages&quot;&gt;“Necessary” Uses of Recursion in Imperative Languages&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/149167/are-functional-languages-better-at-recursion&quot;&gt;Are functional languages better at recursion?&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This now becomes a teachable moment on a number of levels: imperative v. functional languages, recursion v. iteration, &quot;expense&quot; of function calls on the stack. Students appreciate being shown the messy truth behind topics that are sometimes treated reductively and simplistically. Let them wade in the mire and see what they think about these debates. Have them analyze the arguments they mind on here; now they are thinking on much higher, more sophisticated level about program design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key line that I take away from all of these is this one: &quot;You almost never use recursion for performance reasons. you use recursion to make the problem more simple&quot; (top answer to the first post I linked to). &lt;strong&gt;It's often times an exercise in &lt;em&gt;thinking&lt;/em&gt; more so than &lt;em&gt;programming&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a pragmatic perspective, discuss use cases for something like merge sort and quicksort (recursive) v. bubble sort (iterative). Throw in traversing tree structures as well. There is a time and a place for thinking recursively. Iteration is not always the best choice to make.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last, from an aesthetic perspective, based on my time studying SML, there is a beauty, an elegance, an aesthetic to a well-written recursive function. It's clean, clear, easy-to-understand. If part of code quality is its readability, then recursion has an aesthetic quality to it that a for-loop arguably does not.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-07T05:32:12.567" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="454" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T05:36:44.870" Score="15" Body="&lt;p&gt;When I teach recursion, even if I am not at a point in the curriculum where it is possible to introduce trees in coding problems, I always at least provide a high level discussion of trees, and the way that recursion is a natural way to process anything organized in a tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone that has worked with files and folders/directories on a computer is already familiar with a kind of tree.    Adding up the amount of disk space used, or the number of files, is naturally recursive.    Web pages, XML and JSON data are other very practical examples of data that has a tree shape and where we frequently use recursion, in practice, for real, to do processing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tell my students that while a list or array can be processed either with a loop or with recursion, and its a choice as to which to use, &#xA;with a tree, its almost always much easier to write a recursive algorithm, and folks almost always do, in practice.&lt;/p&gt;&#xA;" OwnerUserId="480" LastActivityDate="2017-06-07T05:36:44.870" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="455" PostTypeId="2" ParentId="6" CreationDate="2017-06-07T05:46:46.870" Score="4" Body="&lt;p&gt;I have been teaching theoretical CS to math teachers (don't ask why...). I assumed that they were comfortable with numerical induction and therefore the transition to structural induction (on a computation as in proving invariants) wouldn't be difficult. I was wrong on both counts. It seemed to me that this is partly because they encountered induction in a very narrow context. This year I showed them that - even in mathematics - induction is so much more than n to n+1. For example, to prove unique factorization of integers, four inductive proofs are needed (even if some of them are implicit). The transition to structural induction seemed easier this year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have prepared a document &quot;The Many Guises of Induction&quot; which may help others dealing with this subject. It can be downloaded from &lt;a href=&quot;http://www.weizmann.ac.il/sci-tea/benari/mathematics&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.weizmann.ac.il/sci-tea/benari/mathematics&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="481" LastActivityDate="2017-06-07T05:46:46.870" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="456" PostTypeId="5" CreationDate="2017-06-07T06:03:33.727" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://www.firstinspires.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;FIRST&lt;/em&gt;&lt;/a&gt; (For Inspiration and Recognition of Science and Technology) is an international, non profit organization which has made it it's purpose to inspire children and teenagers (ages 6 to 18) to study and pursue careers in STEM (Science, Technology, Engineering and Mathematics) fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each year a new competition or mission is revealed for each on of &lt;em&gt;FIRST&lt;/em&gt;'s programs. FLL (&lt;em&gt;FIRST&lt;/em&gt; Lego League), FTC (&lt;em&gt;FIRST&lt;/em&gt; Tech Challenge) and &lt;a href=&quot;https://cseducators.stackexchange.com/tags/frc/info&quot;&gt;FRC&lt;/a&gt; teams build and program robots for the competition (or mission, for &lt;em&gt;FIRST&lt;/em&gt; Lego League). More information can be found &lt;a href=&quot;https://www.firstinspires.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. The teams work on these robots during the &lt;em&gt;build season&lt;/em&gt; (a few months; each program has a different length of the build season)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag is for questions related to teaching, guiding and mentoring &lt;em&gt;FIRST&lt;/em&gt; teams in programming and computer science. Questions regarding a specific program in &lt;em&gt;FIRST&lt;/em&gt; (One of the aforementioned four programs) should use the relevant tag, instead. (e.g. use &lt;a href=&quot;/questions/tagged/frc&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;frc&amp;#39;&quot; rel=&quot;tag&quot;&gt;frc&lt;/a&gt; for questions related to mentoring &lt;em&gt;FIRST&lt;/em&gt; Robotics Competition teams in programming and computer science).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-07T09:44:18.870" LastActivityDate="2017-06-07T09:44:18.870" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="457" PostTypeId="4" CreationDate="2017-06-07T06:03:33.727" Score="0" Body="Questions related to teaching, guiding and mentoring teams in the different FIRST programs (FLL jr. FLL, FTC, FRC) in the computer science aspect." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-07T09:43:58.807" LastActivityDate="2017-06-07T09:43:58.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="458" PostTypeId="5" CreationDate="2017-06-07T07:31:20.460" Score="0" Body="&lt;p&gt;Often students are self motivated to learn, but not always. A push from an instructor is sometimes needed. But it is more important to &quot;set the conditions&quot; for learning so that students become naturally motivated to learn. This tag is for questions related to increasing student motivation and student engagement. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-18T20:11:14.097" LastActivityDate="2017-09-18T20:11:14.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="459" PostTypeId="4" CreationDate="2017-06-07T07:31:20.460" Score="0" Body="Questions about motivating students to study, participate, or take interest in the field of Computer Science. This tag can be used to ask questions regarding motivating students in the context of Computer Science (e.g. motivating them to self-teach or to work with others etc. as well as motivating them to study Computer Science)" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-09-18T20:11:14.097" LastActivityDate="2017-09-18T20:11:14.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="460" PostTypeId="2" ParentId="340" CreationDate="2017-06-07T08:48:40.150" Score="1" Body="&lt;p&gt;Rather than doing one large full-on project, do several smaller, focused coding segments that are not complete programs. Use the stated course objectives as a guide and create problems designed to show mastery of the listed points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Find a problem statement that can be done reasonably well in both a loop and recursion, have them write both versions&lt;/li&gt;&#xA;&lt;li&gt;Have them create a set of classes that has a abstract base class, two instantiatable  classes, and at least one that inherits from one of the instantiatable classes&lt;/li&gt;&#xA;&lt;li&gt;Give the specs for a class, without the implementation, and have them solve a problem using that class&lt;/li&gt;&#xA;&lt;li&gt;Provide some broken code and have them find, and fix, the error(s)&lt;/li&gt;&#xA;&lt;li&gt;Give a procedure and have them modify it to handle a new feature, or expanded parameters&lt;/li&gt;&#xA;&lt;li&gt;Give an overly large procedure and have them re-factor it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All things that demonstrate some subset of their skills, but don't require writing a complete program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus for them: If they choose a career in code, is that they'll find a lot of their professional time is spent doing similar tasks. Teams might make a program, but each coder only does a part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonuses for you: You can see what concepts seem to have been the hardest to implement and can adjust your syllabus for the next term. The scope of each problem is small enough that you can grade them, collectively, faster than trying to evaluate an entire program, which will of necessity contain lots of standard code that's really boiler plate - such as the includes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Problems for you: You have to decide what concepts to test where, and you have to create new questions every term that still test the same concepts.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-07T08:48:40.150" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="462" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T09:21:40.710" Score="0" Body="&lt;p&gt;To answer this question I would say it depends on the context. For something such as Quick sort then yes, however if recursion could be replaced by iterating a function call then it is often easier for a programmer to identify a particular point in a program and where it has been executed (useful for debugging).  It all depends on the level of confidence in the programmer, and the actual requirement for recursion to solve the problem.&lt;/p&gt;&#xA;" OwnerUserId="498" LastActivityDate="2017-06-07T09:21:40.710" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="463" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T10:35:28.810" Score="4" Body="&lt;p&gt;Having a discussion about the plusses and minuses can be valuable, but sometimes what you need is a motivating example. It's true that loops and recursion are equivalent in the sense that they can provably accomplish the same tasks.  However, some problems are simply astoundingly easier with recursion, such as iterating through a tree, or finding all of the anagrams of a set of letters.  I mention this second example because it can be brought up in a introductory class long before trees come into the picture.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-07T10:35:28.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="464" PostTypeId="2" ParentId="400" CreationDate="2017-06-07T11:18:54.093" Score="3" Body="&lt;p&gt;Good coding style and practices are part of the student's grade. I post a style guidelines document ( naming conventions, indentation, etc) and dedicate 10 points of their programming projects to following those guidelines. In addition, I dedicate 10 points to &quot;elegance&quot; -- writing efficient code and communicating well with the user. Similarly, a student doesn't get credit for a lab until the code is clean, as well as correct. This establishes good habits from the beginning. &lt;/p&gt;&#xA;" OwnerUserId="500" LastActivityDate="2017-06-07T11:18:54.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="465" PostTypeId="2" ParentId="448" CreationDate="2017-06-07T12:29:56.937" Score="6" Body="&lt;p&gt;Students use the colors for more than just interpreting the purpose of the block.  In my introductory classes, the color assists early-learners with locating the blocks within an extensive collection of choices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When give a chunk of pre-existing code to recreate, a block's color helps communicate where in the collection to look for it.&lt;/p&gt;&#xA;" OwnerUserId="505" LastActivityDate="2017-06-07T12:29:56.937" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="466" PostTypeId="2" ParentId="130" CreationDate="2017-06-07T14:22:00.510" Score="4" Body="&lt;p&gt;Like most things in CS, learning the 'why' of good code formatting is a gradual process. In CS1 and CS2 we mostly say &quot;just do it or else you lose points&quot;. (I do go on to gently explain to them that I want to give them the most partial credit possible and that I can't do that if I can't read their code. They usually get the hint.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enforcing those good practices early, even under threat of penalty, pays off in their junior and senior years. That's when the understanding part kicks in -- when they're working on larger projects, sometimes with others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When your juniors are critiquing the formatting of sample code from a visiting professor you know you're getting through. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using an IDE like Eclipse (which can do 80-90% of the formatting for you) and a tool like Checkstyle helps tremendously. It's not a substitute for understanding why we do it, but it makes it less of a hassle for the stubborn students.&lt;/p&gt;&#xA;" OwnerUserId="536" LastActivityDate="2017-06-07T14:22:00.510" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="467" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T15:57:32.687" Score="4" Body="&lt;p&gt;In addition to the other good answers already provided, I want to add that students should learn recursion because they will encounter it in real life. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any one of them who goes on to program for a living will at some point need to understand, maintain, or debug a recursive function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So they must be able to recognize recursion, understand how it works, see when it's broken, and know how to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;em&gt;is&lt;/em&gt; generally agreed that looping is better than recursing - &lt;em&gt;when&lt;/em&gt; you can actually get the job done with a loop. But there are times when it is far easier to crack the nut with recursion rather than a loop. And as a programmer, you must be armed for those times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, recursion is cool. :-D&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2017-06-07T17:54:18.070" LastActivityDate="2017-06-07T17:54:18.070" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="469" PostTypeId="1" CreationDate="2017-06-07T16:03:57.537" Score="5" ViewCount="207" Body="&lt;p&gt;From an instructor perspective (Middle School or High School), Is there a method, or a set of guidelines, for grading early coders' projects that could enhance good coding practices as the students advance further into computer science?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are any &quot;online practice sites&quot; or &quot;auto-graders&quot; worthy enough to look at for daily or lab project/practice?&lt;/p&gt;&#xA;" OwnerUserId="545" LastEditorUserId="27" LastEditDate="2017-06-11T14:53:29.103" LastActivityDate="2017-06-11T19:02:01.770" Title="Suggestions for encouraging good Coding Practices?" Tags="|grading|best-practice|auto-graders|coding-style|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="470" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T16:08:10.477" Score="2" Body="&lt;p&gt;When teaching students who are old enough or invested enough to care about performance (the younger ones typically do not), I introduce it like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;We can either make code that's easy for us to write, or easy for the computer to execute. You choose. If you're feeling lazy, and performance isn't an issue, recursion is perfect: you will finish writing it sooner, and you'll have fewer bugs. If you're working on a performance-critical problem, use loops: they are much faster and more efficient for the computer, and although it'll take you more effort to write, it might make the difference between &quot;fast enough&quot; and &quot;too slow to be useful&quot;&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I also add:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;In computer game development, more than half of what you see is fake. The skill is in deciding what things you can fake and the player/user will never notice, versus the things you have to do correctly or else they will see the gaps and be disappointed&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(there are many rich media examples of game-development hacks that have been exposed and been written about. E.g. search for &quot;game glitches&quot;, &quot;game programming hacks&quot;, etc. My go-to example at the moment is to pick images from this article: &lt;a href=&quot;http://www.gamesradar.com/you-think-fallout-train-hack-was-bad-your-games-are-made-lies/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.gamesradar.com/you-think-fallout-train-hack-was-bad-your-games-are-made-lies/&lt;/a&gt; )&lt;/p&gt;&#xA;" OwnerDisplayName="user31" LastActivityDate="2017-06-07T16:08:10.477" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="471" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T16:11:10.087" Score="1" Body="&lt;p&gt;A professional programmer could go most of her or his career without having to resort to it. The pros, some problems/algorithms are just not very tractable outside of a recursive approach (I usually assign the flood fill algorithm in my AP or post-AP classes). These tend to be rare. Cons, very prone to error, the algorithms may not be particularly intuitive and in most cases can be replaced with an iterative approach. Besides Flood Fill, the recursive solution to the Tower of Hanoi problem is another powerful illustration of how powerful a recursive algorithm can be.&lt;/p&gt;&#xA;" OwnerUserId="548" LastActivityDate="2017-06-07T16:11:10.087" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="472" PostTypeId="2" ParentId="469" CreationDate="2017-06-07T16:24:20.917" Score="5" Body="&lt;p&gt;We use the Eclipse plugin Checkstyle. The plugin is configured with a set of rules (defaults styles are available with the plugin), and then generates a set of warnings for any violations of these rules. Toward the end of our CS1, we introduce students to the tool (the students have been taught our expectations throughout the semester). After they are introduced to the plugin, all of their remaining projects will lose points if they have Checkstyle warnings in their project submission (e.g., one points off per warning to a max of 10 points). Checkstyle gives them immediate feedback as they are writing code (in the same way compiler warnings/errors are presented in Eclipse) with the loss of points as incentive to not just ignore the warnings. This practice is continued in CS2 from the start of the semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This experience is at University level, but should be applicable to anyone using Eclipse in an AP CS A or similar course.&lt;/p&gt;&#xA;" OwnerUserId="549" LastActivityDate="2017-06-07T16:24:20.917" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="473" PostTypeId="1" CreationDate="2017-06-07T17:06:37.317" Score="8" ViewCount="260" Body="&lt;p&gt;I would like my students to get the most out of the course by experiencing an agile development structure in their projects. Currently I give 5 assignments, each building on the previous one and adding to the complexity of the final product. Although this is far from letting students experience &quot;real&quot; agile development, it is a first step. How can I incorporate an agile development methodology backbone to the course, letting students experience it first-hand? The courses are taught in Python (CS1) and Java (CS2) and this is an Applied Information Technology program.&lt;/p&gt;&#xA;" OwnerUserId="554" LastEditorUserId="1293" LastEditDate="2017-09-17T14:03:19.527" LastActivityDate="2021-01-12T03:42:21.377" Title="How can I incorporate agile development into CS1/CS2 courses?" Tags="|curriculum-design|agile-development|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="474" PostTypeId="2" ParentId="451" CreationDate="2017-06-07T17:38:51.550" Score="4" Body="&lt;p&gt;For any language/compiler that supports tail-call optimisation, there is no use of the stack for recursion. So you can implement &lt;code&gt;while True:&lt;/code&gt; recursively. In these languages recursion is used more. In python it is used less, unless the depth is (as you said) O(log n). However the design may be easier done using recursion, and you can always convert recursion into iteration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some languages/compilers that support tail call optimisation.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;C/gcc &lt;/li&gt;&#xA;&lt;li&gt;C++/gcc &lt;/li&gt;&#xA;&lt;li&gt;lisp/any &lt;/li&gt;&#xA;&lt;li&gt;Eiffel/some &lt;/li&gt;&#xA;&lt;li&gt;Prolog/any &lt;/li&gt;&#xA;&lt;li&gt;Scala/any — for direct tail calls (sometimes)&lt;/li&gt;&#xA;&lt;li&gt;Scheme/any&lt;/li&gt;&#xA;&lt;li&gt;JavaScript - ECMAScript 6.0&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;some that don't&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Python/most&lt;/li&gt;&#xA;&lt;li&gt;C#/all&lt;/li&gt;&#xA;&lt;li&gt;VB.net/all&lt;/li&gt;&#xA;&lt;li&gt;Java&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-13T18:43:47.717" LastActivityDate="2017-07-13T18:43:47.717" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="476" PostTypeId="2" ParentId="469" CreationDate="2017-06-07T20:59:52.417" Score="2" Body="&lt;p&gt;I use an online auto grader for probably 95% of the assignments my students - high school, AP-A - do in class. Before that I would run unit tests on the submitted code and then leave comments. But I've found that the immediate feedback, especially on smaller assignments, helps them learn to solve the problems on their own. Plus, it saves me from having to look at 10 or 15 versions of their code. I typically only look at the one that works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For style, I'll leave comments on completed assignments when it's bad. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've found really helps though is to not help them with questions if the code is a mess. Especially early in the year &quot;clean up your code, and I'll come back&quot; is my stock answer if it's messy. After a couple times they'll clean it up on their own, and usually they'll figure out the problem on their own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have specific rules other than it's easy to follow. Coding styles tend to be pretty subjective - braces on the same line, or the next line; should the brace be indented; should an else be on the same line as the brace closing the if. I tell them it's like handwriting. If it's neat, it's easier to read. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will show examples, both good and bad, anonymously on the board. Some kids don't understand what a good snippet of code looks like. But almost everyone can agree on messy code. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-07T20:59:52.417" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="477" PostTypeId="1" CreationDate="2017-06-07T21:45:33.547" Score="5" ViewCount="317" Body="&lt;p&gt;I'm teaching CS0 again this fall. This is an introductory course, entirely separate from CS1. It is for non-majors. It doesn't lead to additional coursework or prepare students for CS1 (it's not a prerequisite for anything), so it has no specific goals beyond educating students in concepts of computation and computing. I am specifically asking for recommendations on topics to cover to better help students understand computation and computing, and ideally topics that students who perceive themselves &quot;forced&quot; to take the course will find least objectionable. Below, I will describe what I intend to include, what I am considering adding, and what has been unsuccessful in the past. I am looking for comments/thoughts on any of these things and/or additions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the general education student learning outcomes (SLOs) I have to satisfy/evaluate, I have significant constraints, but I generally want to rethink the course. My goal is to help students appreciate computation and computational thinking and to understand basics of computing systems. I also want to structure the course around labs (although it's not a lab course). I'm going to use Danny Hillis' &lt;em&gt;The Pattern on the Stone&lt;/em&gt;, but I'll be adding significant detailed material that Hillis doesn't cover. I am also going to use  Don Norman's &lt;em&gt;The Design of Everyday Things&lt;/em&gt;, which I use in my CS0 major course, to introduce designing/planning/functional decomposition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are things I've covered on computing/computational thinking and might bring back:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basic computer architecture&lt;/li&gt;&#xA;&lt;li&gt;Boolean logic&lt;/li&gt;&#xA;&lt;li&gt;Finite state machines&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's what I have covered on design and plan to bring back:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Norman's concept of &quot;design thinking&quot;&lt;/li&gt;&#xA;&lt;li&gt;Theory of mind&lt;/li&gt;&#xA;&lt;li&gt;OODA loop&lt;/li&gt;&#xA;&lt;li&gt;User testing&lt;/li&gt;&#xA;&lt;li&gt;Ethics&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some things I might add:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Number systems and base conversion&lt;/li&gt;&#xA;&lt;li&gt;AI/ML concepts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some things that have gone very, very poorly, but I would like to include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basic prob/stat&lt;/li&gt;&#xA;&lt;li&gt;Programming basics &amp;amp; AppInventor&lt;/li&gt;&#xA;&lt;li&gt;Process-oriented design&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The typical student for this course has already decided to be miserable; we're typically able to turn a few heads, but many of the students have gone years without math, so a big chunk of the course is necessarily applied arithmetic and algebra. The ones who are willing to engage with trial &amp;amp; error tend to be effective in AppInventor, but they're precious few.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts about what to cover, what not to cover, and how to cover things effectively, are welcome!&lt;/p&gt;&#xA;" OwnerUserId="568" LastEditorUserId="1166" LastEditDate="2017-06-21T20:20:19.423" LastActivityDate="2017-06-30T18:53:24.847" Title="What are good/bad topics for a non-major CS0 course?" Tags="|curriculum-design|cs0|" AnswerCount="3" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="478" PostTypeId="2" ParentId="146" CreationDate="2017-06-08T04:33:37.143" Score="2" Body="&lt;p&gt;At the point in my CS1 class where we discuss OOP, my students are somewhat comfortable with the procedural paradigm. So, we first reflect on that before talking about OOP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Procedural solutions&lt;/strong&gt;: moving pieces of data around and manipulating them. I go back to a &lt;em&gt;cooking analogy&lt;/em&gt; and compare programs to &lt;em&gt;recipes&lt;/em&gt;: break eggs, add flour, beat those, add vanilla, etc. I say we think about programs in terms of basic ingredients (inputs), containers (variables), moving these around (control flow) and doing things to them (operations).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;OOP&lt;/strong&gt;: I draw heavily from Yegge's &lt;a href=&quot;https://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kingdom of the Nouns&lt;/a&gt; to describe OOP, since I think it is both a good description and a hard criticism of OOP. The &quot;Noun is King&quot; and we design everything around that. Yegge has lots of good analogies directly in his description, but I don't employ all these at first. I do emphasize that we design everything around some &quot;Big Nouns.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My primary working example of a &quot;Big Noun&quot; is a &lt;code&gt;Whale&lt;/code&gt;, and I try to bring analogies back to this when possible.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;Whale&lt;/code&gt; class is a category of animal, whereas &lt;code&gt;bruce = Whale()&lt;/code&gt; and &lt;code&gt;sally = Whale()&lt;/code&gt; are both instances of &lt;code&gt;Whale&lt;/code&gt;. The analogy is that instances are like &lt;em&gt;individuals&lt;/em&gt; (the human-like names are very intentional).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also tap into a secondary analogy: a class is like a &lt;em&gt;cookie cutter&lt;/em&gt; and the cookies are instances. Students find the idea of &quot;stamping out&quot; an instance by &quot;using the class&quot; to be fairly intuitive. Bonus: whale cookie cutters can keep the main analogy going. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Member functions are &lt;em&gt;verbs&lt;/em&gt; (analogous to objects being Nouns): &lt;code&gt;bruce.eat(fish)&lt;/code&gt; and &lt;code&gt;sally.sing()&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondary analogy: methods are like &lt;em&gt;little remora&lt;/em&gt; who are attached to the whale and do stuff for it, like &lt;code&gt;sally.clean()&lt;/code&gt;. All verbs only exist if they are attached to some noun.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Data members are data that relate to the noun. The extension of the analogy is that they are &lt;em&gt;adjectives&lt;/em&gt; that describe the whale: &lt;code&gt;bruce.weight_in_tons = 200&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondary analogy: these are data &lt;em&gt;inside the whale&lt;/em&gt;, like ambergris or Pinocchio. The data go into the whale, maybe its transformed or grows while inside the whale, maybe they get spit back out later, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Inheritance: as others have suggested, the analogy is &lt;em&gt;animal taxonomy&lt;/em&gt;. A &lt;code&gt;BlueWhale&lt;/code&gt; is a &lt;code&gt;Whale.&lt;/code&gt; All &lt;code&gt;BlueWhale&lt;/code&gt; have a blowhole (like other wales) but they also have baleen, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Its not a perfect analogy, but I get mileage out of it.&lt;/p&gt;&#xA;" OwnerUserId="475" LastActivityDate="2017-06-08T04:33:37.143" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="479" PostTypeId="1" AcceptedAnswerId="500" CreationDate="2017-06-08T05:54:29.043" Score="3" ViewCount="153" Body="&lt;p&gt;As a special lesson, I would like to show students the very basic idea of genetic\evolutionary algorithms. I let them play a bit in &lt;a href=&quot;http://rednuht.org/genetic_cars_2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;a genetic algorithm online&lt;/a&gt; game, to get the idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I teach them the main concepts (Population, individual with genes, mutation, crossover, fitness etc.) and I introduce the &lt;a href=&quot;https://en.wikipedia.org/wiki/Travelling_salesman_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;Traveling Salesman Problem&lt;/a&gt;. Then I go through solving TSP with genetic algorithm with them, so they see it in action and in practice. However I'm out of practice exercises.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I am looking for problems that have a solution which can vary in its &quot;goodness&quot;, and its goodness can be judged by some requirements. To explain this, take the example of a timetable for tests over a month. a solution is a random time table. a good solution is one where tests are suffeciently spaced so that students have time to revise. in the &lt;a href=&quot;http://rednuht.org/genetic_cars_2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;game&lt;/a&gt;, &lt;strong&gt;a&lt;/strong&gt; solution is just any vehicle, but a &lt;strong&gt;good&lt;/strong&gt; solution, is one that gets far. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I am not necessarily looking for an answer that shows any previous knowledge about genetic algorithms (though it is appreciated &lt;code&gt;;)&lt;/code&gt;), just any problem as described above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What kinds of exercises\problems such as those are used? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students&#xA; are high-school students learning in java, and they are familiar with OOP. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T12:23:18.790" LastActivityDate="2017-06-09T08:48:22.993" Title="Genetic Algorithm enrichment lesson" Tags="|java|secondary-education|exercises|genetic-algorithm|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="480" PostTypeId="5" CreationDate="2017-06-08T06:44:57.970" Score="0" Body="&lt;p&gt;Genetic Algorithms use &lt;a href=&quot;https://en.wikipedia.org/wiki/Evolution#Darwinian_revolution&quot; rel=&quot;nofollow noreferrer&quot;&gt;Darwin's theory of evolution&lt;/a&gt; to model a solution to a problem, then combine solutions in a population of solutions in order to find the most fitting solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main points of Genetic Algorithms are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Individual: a representation of a solution to a problem. The representation can be expressed as a binary sequence (known as &lt;em&gt;&lt;code&gt;genes&lt;/code&gt;&lt;/em&gt;). Individuals have a &lt;code&gt;fitness&lt;/code&gt; which is a set of rules\requirements predefined by the programmer. The &lt;code&gt;fitness&lt;/code&gt; is a measure of how good the solution is.&lt;/li&gt;&#xA;&lt;li&gt;Population: a collection (with fixed size) of individuals. Initialized randomly.&lt;/li&gt;&#xA;&lt;li&gt;Mutation and Crossover: An individual's &lt;code&gt;genes&lt;/code&gt; can be slightly modified with a small probability, thus mutating the individual. Crossover is the process of combining the &lt;code&gt;genes&lt;/code&gt; of two individuals (there are multiple ways to perform Mutation and Crossover).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The algorithm is iterative, and in each iteration, the &lt;code&gt;fitness&lt;/code&gt; of individuals in the population is calculated and the most fitting solutions are selected, and perform a Crossover. After this, a new population is generated, and the average (and overall) &lt;code&gt;fitness&lt;/code&gt; is greater than that of the previous population. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More explanation and an implementation in &lt;code&gt;Java&lt;/code&gt; can be found &lt;a href=&quot;http://www.theprojectspot.com/tutorial-post/creating-a-genetic-algorithm-for-beginners/3&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;tutorial for beginner genetic algorithm in java&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A visualization can be seen &lt;a href=&quot;http://rednuht.org/genetic_cars_2/&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Genetic algorithm in action&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T10:47:16.927" LastActivityDate="2017-06-08T10:47:16.927" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="481" PostTypeId="4" CreationDate="2017-06-08T06:44:57.970" Score="0" Body="Questions related to teaching genetic or evolutionary algorithms. Genetic algorithms are algorithms based upon Darwin's theory of evolution. They are used to find a good solution from an evolving population of solutions." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T10:47:07.037" LastActivityDate="2017-06-08T10:47:07.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="482" PostTypeId="5" CreationDate="2017-06-08T06:52:35.247" Score="0" Body="&lt;p&gt;Some students aren't very effective in retaining information about what they learn in class, whether lecture or more active learning. Traditionally, students make some kind of notations, perhaps copying what the professor writes or says. Some students try to rely on memory alone, usually ineffectively. Use this tag for questions that can give students better habits on recording course materials, no matter what the medium. Paper has the advantage that it doesn't require a device to read. Electronic notations are compact. There are tradeoffs. But the key is good student study habits. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-12-14T01:09:32.473" LastActivityDate="2017-12-14T01:09:32.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="483" PostTypeId="4" CreationDate="2017-06-08T06:52:35.247" Score="0" Body="Questions related to what students write during lectures. This tag should be used for questions about student note-taking in lectures and for questions about any way a student can store the information obtained during a lesson. Notes can be anything from pencil and paper to audio recording to videos provided by the instructor." OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-06-08T14:21:25.190" LastActivityDate="2017-06-08T14:21:25.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="484" PostTypeId="2" ParentId="302" CreationDate="2017-06-08T07:54:51.680" Score="2" Body="&lt;p&gt;We use Parsons puzzles when teaching robotics:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/xYy7p.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/xYy7p.png&quot; alt=&quot;Parsons puzzles for Thymio robot&quot;&gt;&lt;/a&gt;&#xA;The student has to select which of the three event blocks on the right causes the behavior specified in the question.&#xA;This example is for the Thymio robot with the VPL programming environment but similar puzzles could be developed in any block environments.&lt;/p&gt;&#xA;" OwnerUserId="481" LastActivityDate="2017-06-08T07:54:51.680" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="485" PostTypeId="5" CreationDate="2017-06-08T10:51:02.413" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-08T10:51:02.413" LastActivityDate="2017-06-08T10:51:02.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="486" PostTypeId="4" CreationDate="2017-06-08T10:51:02.413" Score="0" Body="Questions related to student projects in the fields of computer science. Use this tag to ask about structuring project guidelines for students, or to ask questions that deal with an aspect of projects in computer science." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T12:29:28.320" LastActivityDate="2017-06-08T12:29:28.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="487" PostTypeId="5" CreationDate="2017-06-08T11:09:58.963" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Deep_learning#Definitions&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Wikipedia article for Deep learning&quot;&gt;Deep learning&lt;/a&gt; is a category of machine learning algorithms that use many layers of nonlinear processing units (sometimes referred to as neurons) for feature extraction and transformation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each successive layer uses the output from the previous layer as input. The algorithms may be supervised or unsupervised and applications include pattern analysis (unsupervised) and classification (supervised).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is recommended to read more information on &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_neural_network&quot; rel=&quot;nofollow noreferrer&quot;&gt;Neural Networks&lt;/a&gt; before dealing with Deep Learning, as it is an extension of neural networks.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T12:29:15.020" LastActivityDate="2017-06-08T12:29:15.020" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="488" PostTypeId="4" CreationDate="2017-06-08T11:09:58.963" Score="0" Body="Questions related to teaching students about deep learning, many-layered artificial neural networks and other machine learning algorithms. " OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-08T12:29:21.857" LastActivityDate="2017-06-08T12:29:21.857" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="489" PostTypeId="2" ParentId="30" CreationDate="2017-06-08T11:17:54.333" Score="2" Body="&lt;p&gt;I &lt;a href=&quot;http://milesberry.net/2014/05/there-is-more-to-the-new-computing-curriculum-than-just-coding/&quot; rel=&quot;nofollow noreferrer&quot;&gt;describe programming&lt;/a&gt; as a two-step process, of algorithm + coding. I.e. deciding how to solve a problem, and then implementing that approach in a particular language on a particular system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you have one without the other? Yes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are occasions, particularly in the realm of unplugged approaches to computational thinking, when we'll think about algorithm-like solutions without any intention of automating them (e.g. the jam / PBJ / chocolate sandwich thing, or an effective way to play a board or card game).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other occasions when we'll write in a code that a computer understands without their being any actual algorithm to implement - markdown, HTML, XML, json etc, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think HTML is a great way to get students thinking of a formally specified language, and seeing some immediate effect from their coding, without the additional cognitive load of implementing an algorithmic solution.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-06-08T11:17:54.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="490" PostTypeId="5" CreationDate="2017-06-08T11:24:36.550" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-08T11:24:36.550" LastActivityDate="2017-06-08T11:24:36.550" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="491" PostTypeId="4" CreationDate="2017-06-08T11:24:36.550" Score="0" Body="Questions related to the use of websites or applications for automated grading of student assignments.  Such sites or programs are known as &quot;auto-graders&quot;. Use this tag to ask about the use of &quot;auto-graders&quot; for various assignments or assessments." OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-06-08T14:21:18.820" LastActivityDate="2017-06-08T14:21:18.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="492" PostTypeId="1" AcceptedAnswerId="495" CreationDate="2017-06-08T15:04:39.093" Score="7" ViewCount="462" Body="&lt;p&gt;I've noticed that &quot;all&quot; OS textbooks present the Critical-Section Problem with examples of code that are in infinite loops.  E.g.,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (true) {&#xA;    // code here to do the entry section protocol&#xA;&#xA;    // critical section here&#xA;&#xA;    // code here to do the exit section protocol&#xA;&#xA;    // remainder section&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why is this?  From my experience there can be many processes that run and enter critical sections (inspecting and updating shared variables) where the code is not in an infinite loop.  This business of always have code in loops seem to unnecessarily complicate matters for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something I'm just not understanding about this concept?&lt;/p&gt;&#xA;" OwnerUserId="391" LastEditorUserId="124" LastEditDate="2017-06-10T19:49:11.360" LastActivityDate="2017-06-10T19:49:11.360" Title="Why is the critical-section problem always presented with code in infinite loops?" Tags="|concurrency|operating-systems|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="493" PostTypeId="1" CreationDate="2017-06-08T15:13:46.243" Score="3" ViewCount="265" Body="&lt;p&gt;Since this is a very hot topic, I would love to offer an elective in Blockchain technology next year (and possibly in cryptocurrencies as well).  I know that my students are already very enthusiastic about the topic, so it would be a well-attended course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I know basically nothing about this topic right now, and what I've found has been quite confusing.  It seems very hard to find an entry point, particularly since I ultimately want enough technical and mathematical background to create a meaningful course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone recommend a way to approach this material?  Essentially, this would be a curriculum of self-learning.  What are the topics to tackle, and in what order can they be learned without having to do a straight &quot;drop into the deep end&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, recommendations for good resources that work through the topic in an organized are always appreciated, as they are very useful in the creation of an ultimate curriculum.  I prefer written (or audio) materials to videos, but I am open to anything that works through the material in a comprehensible way.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-10T21:23:28.260" LastActivityDate="2017-06-10T22:04:24.113" Title="Learning about the Blockchain" Tags="|curriculum-design|self-learning|resource-request|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="494" PostTypeId="1" CreationDate="2017-06-08T16:12:49.963" Score="7" ViewCount="243" Body="&lt;p&gt;What would you recommend as the best resources for learning and teaching about Deep Learning?  These could include tools (e.g. &lt;a href=&quot;https://www.tensorflow.org/&quot; rel=&quot;noreferrer&quot;&gt;TensorFlow&lt;/a&gt;), &lt;a href=&quot;http://deeplearning.net/tutorial/&quot; rel=&quot;noreferrer&quot;&gt;tutorials&lt;/a&gt;, books (e.g. &lt;a href=&quot;http://www.deeplearningbook.org/&quot; rel=&quot;noreferrer&quot;&gt;Deep Learning&lt;/a&gt;), MOOCs (e.g. &lt;a href=&quot;https://www.udacity.com/course/deep-learning--ud730&quot; rel=&quot;noreferrer&quot;&gt;Udacity's&lt;/a&gt;), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm working to put together a list of best resources for an upcoming issue of &lt;a href=&quot;http://sigai.acm.org/aimatters/&quot; rel=&quot;noreferrer&quot;&gt;AI Matters&lt;/a&gt;. What I'm looking for is the best of the best entry points into an understanding of deep learning. Nothing even so specific as convolutional networks is necessary. As an educator, I am motivated to collect and share the best first footholds for giving students and professionals a start for the mighty climb that is highly motivated by recent achievements. As far as audience, I envision undergraduate intro AI through adult professional.&lt;/p&gt;&#xA;" OwnerUserId="589" LastEditorUserId="589" LastEditDate="2017-06-09T14:08:47.607" LastActivityDate="2018-03-15T17:23:12.943" Title="Deep Learning Teaching Resources" Tags="|machine-learning|deep-learning|resource-request|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="495" PostTypeId="2" ParentId="492" CreationDate="2017-06-08T16:47:57.710" Score="9" Body="&lt;p&gt;One reason infinite loops are used could be so the problem can't be solved by letting one thread complete the code before the other thread starts it. With infinite loops, no thread ever completes the code. Of course, using a bounded buffer has the same effect.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-08T16:47:57.710" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="496" PostTypeId="2" ParentId="448" CreationDate="2017-06-08T17:33:06.750" Score="4" Body="&lt;p&gt;The colour of a block is a 'way in' for students, helping them to figure out what type of block they have. Ultimately, the important thing here is that there are logical &lt;strong&gt;categories&lt;/strong&gt; of blocks—the colours just provide a way of visually showing what category a block is in, without an information overload of &lt;em&gt;too much text&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://ccl.northwestern.edu/testsite/2014/Weintrop%20and%20Wilensky%20-%202015%20-%20To%20Block%20or%20Not%20to%20Block,%20That%20is%20the%20Question%20St.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;To Block or not to Block, That is the Question: Students’&#xA;Perceptions of Blocks-based Programming&lt;/em&gt;&lt;/a&gt; makes a great case for well thought-out categories:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The utility of the organization and ease of&#xA;  browsing of the blocks was evident throughout the interviews. For&#xA;  example, during an interview with a grade ten student, we asked if&#xA;  he could draw a square on the screen, he successfully did so, but&#xA;  relied on the &lt;code&gt;forever&lt;/code&gt; block in his program. When asked how he&#xA;  would change his program so it would be possible to draw a&#xA;  second square next to the first, he opened, the Control category&#xA;  where looping blocks were stored, read through the blocks, and&#xA;  said “I’m not really sure, I think it's in the tab somewhere&#xA;  though,” showing how the organization of the blocks within the&#xA;  environment can support novices in constructing programs. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your concern of 'too many blocks' is a real, valid one:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Scratch strives to minimize the number of command blocks while still supporting&#xA;  a wide range of project types. One might argue that flexibility, programmer&#xA;  convenience, and extra features are more important than a small command set.&#xA;  However, in Scratch, unlike a text-based language, every command consumes&#xA;  screen space in the command palettes, so there is a higher “cost” to increasing&#xA;  the command set. Adding more commands requires either adding more categories&#xA;  or forces the user to scroll down to see all the commands within a given&#xA;  category. Either way, a larger command set makes it harder to find a given&#xA;  command in the palettes.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;— &lt;a href=&quot;http://s3.amazonaws.com/academia.edu.documents/6721160/scratchlangandenvironment.pdf?AWSAccessKeyId=AKIAIWOWYYGZ2Y53UL3A&amp;amp;Expires=1496945599&amp;amp;Signature=I2ZK4KcwZgoq5Gm437VxSxZHsHc%3D&amp;amp;response-content-disposition=inline%3B%20filename%3DThe_Scratch_Programming_Language_and_Env.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Scratch Programming Language&#xA;  and Environment&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Scratch even actively &lt;strong&gt;removes&lt;/strong&gt; blocks to ensure that the number of blocks and categories doesn't get too large—if students can't find a block, it may as well not exist at all. This links well to the issue of colour: too many categories will mean that you begin to reach an unreasonable amount of colours. I suspect anything more than about 10 or 15 colours would be excessive (Scratch 2.0 &lt;a href=&quot;https://wiki.scratch.mit.edu/wiki/Block_Categories&quot; rel=&quot;nofollow noreferrer&quot;&gt;has 10 categories&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, &lt;strong&gt;shape&lt;/strong&gt; also has an important place:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Novice programmers identify the shape of blocks as a&#xA;  key feature that makes block-based programming easy. In&#xA;  an interview with students that had programmed in both&#xA;  Snap! and Java, four out of nine students said the shape of&#xA;  blocks was a key reason for why block-based programming&#xA;  is easy&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;— &lt;a href=&quot;https://canvas.auckland.ac.nz/files/869920/download?download_frd=1&amp;amp;verifier=1gFIy9nSx7VwVP4MfJ5PtrcSvN94jUznjqAK6Wpk&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tackling the Transition from Block-based to Text-based&#xA;  Programming Languages&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Typically, these guidelines apply:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shape&lt;/strong&gt; works well to show &lt;em&gt;syntactic constructs&lt;/em&gt;—a block with a gap in the middle clearly has an effect on the blocks inside (e.g. an &lt;code&gt;if&lt;/code&gt; block). It can also effectively denote 'type' (e.g. Scratch uses a hexagon to represent a boolean, and the shape gives a hint of the expressions that can produce booleans)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Colour&lt;/strong&gt; works best to show &lt;em&gt;category&lt;/em&gt;—all green blocks obviously have a similar purpose, and students quickly recognise that.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Too many&lt;/strong&gt; shapes and colours just lead to confusion; try and have the &lt;strong&gt;least&lt;/strong&gt; amount of shapes and categories while remaining logical and consistent.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-08T17:33:06.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="497" PostTypeId="2" ParentId="448" CreationDate="2017-06-08T17:44:15.650" Score="3" Body="&lt;p&gt;I, too, was going to form part of my answer around the article Aurora shared on the development of Scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Snap! makes its debt to Scratch explicit. In the &lt;a href=&quot;http://snap.berkeley.edu/about.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;About&quot; section&lt;/a&gt;, the its creators discuss their design choices for that which is an extension from Scratch:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Visual Representation for Advanced Ideas&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Part of the genius of Scratch is the way it uses pictures to represent&#xA;  ideas such as loops, Booleans, and threads. The three different block&#xA;  shapes, for example, aren’t just a way to prevent syntax errors;&#xA;  they’re a way to teach the idea that some procedures return values and&#xA;  others don’t.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In Snap! we extend this visual teaching to ideas that have previously&#xA;  been considered too hard for young learners. For example, the&#xA;  screenshot on our home page includes this picture of a list of blocks.&#xA;  Experienced Scratch programmers will never have seen anything quite&#xA;  like this before, but they recognize the pictorial representation of a&#xA;  list in Scratch, and they know what blocks look like, and so it’s&#xA;  immediately obvious to them what they’re seeing. They realize without&#xA;  explicit teaching that blocks, which they’ve until then used only as&#xA;  program control elements, can also be used as data.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://snap.berkeley.edu/SnapManual.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Snap! Manual&lt;/a&gt;, while probably more information than you want or need, does also discuss the logic behind its color and shape choices. In particular, Section I and Section X provide explanation and justification of the design of the Snap! environment. I would think that in any original or modified design of a block-based language, using the development of Scratch and Snap! to inform your own is as research-based as you can get.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-08T17:44:15.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="498" PostTypeId="1" CreationDate="2017-06-09T00:04:58.180" Score="6" ViewCount="317" Body="&lt;p&gt;Perusing Twitter just now, I saw this tweet from the @CSTeachingTips account, and it got me thinking about the general topic of homework as it applies to our discipline:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Downsize homework because, like a job, students should be able to do&#xA;  the work during business hours.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I personally struggled a lot with what and how much homework to assign my AP students this past year. I wanted it to be effective and not just &quot;homework-for-homework's-sake.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found students worked more effectively on coding when I was in the room and they could ask for help. If they hit a brick wall at home, they were stuck until a) they got to class the next day or b) they received an email from me (presuming they took the time to send one and I got it in time to reply in a timely manner). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, the content required in an AP class, especially CS50 AP, &lt;em&gt;seems&lt;/em&gt; to necessitate some work be done at home. There's a lot to cover, and class minutes are at a premium, so if homework can reinforce the day's work and/or give a head start for the next day, it's worth it. Yet, as with the tweet's sentiment, I want to honor the lives of students outside of just my classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my question, I'm thinking particularly of honors-level HS students (either AP CSP or AP CS A - I think this would apply roughly equally to both). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What homework assignments do you and your students find beneficial? What type/amount of work done at home is most effective for increasing student learning?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-10T18:08:31.573" LastActivityDate="2017-06-10T18:27:53.547" Title="Homework Policy for Advanced/Honors Students" Tags="|ap-computer-science-a|homework|ap-cs-principles|" AnswerCount="3" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="499" PostTypeId="2" ParentId="498" CreationDate="2017-06-09T01:44:56.507" Score="1" Body="&lt;p&gt;For starters, since it's primarily AP students that your question focuses on, homework will become a standard of life soon, and adjusting to the demands of that now can't hurt. Specifically, in the US, at the college and university level you can expect that every hour of class time is expected to be accompanied by three hours of study time outside of class. That's why 12 credit hours, in most places, is considered as a &quot;full-time&quot; class load. Admittedly, some courses may require less, and others more, which can also vary by student. Yet, the average will still come out to around 36 hours of out-of-class study time for 12 hours of in-class time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the early portion of the term, homework assignments need not be coding-based work. Rather, they can be assignments that are based on the textbook, and lectures, that are designed as reflection for students. Reading assignments to be discussed at the beginning of the next class, or questions asked at the end of class that will be quizzed in the next session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the first quarter of the term, or there about, coding assignments should become the norm. During the week, relatively small sections should be expected, with the Friday assignment being a larger work. The amount of thought, if not work, involved should increase as the term progresses. If the assignments are chosen such that there are three or four &quot;projects&quot; for one assignment, design most to be reinforcement of &lt;em&gt;two&lt;/em&gt; sessions prior, and only one, or at most two, that cover the &quot;new&quot; material. The material from two sessions prior is the foundation that should be available, and that they have had an additional class session to raise questions, and see how it was built upon in the last session. Therefore, they should have less confusion about that material and only need to &quot;do the work&quot; for the assignment. The one assignment that does cover the new material can be discussed at the opening of the next class session, and the students should be encouraged to try discovering for themselves, from the textbook, class notes, or Google, how to resolve what they don't understand in doing that assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, however, you are going to make yourself available via email after school hours, you should still have &quot;office hours&quot; during which you will be open to emails, and able to respond, and outside of which you will not respond. AS an example, from 5pm to 7pm you will accept emails, and reply by 7:30pm, or sooner. Anything received prior to 5pm will not be handled until then, and anything received after 7pm will be &quot;collected&quot; and addressed in class the next day. On weekends, and holidays, you could have longer hours, or multiple windows of time available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All students should be learning the material from class. They should also be learning how to &quot;think&quot; for themselves as well. Those in AP classes, in any discipline, should be able to think independently even more so.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-09T01:44:56.507" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="500" PostTypeId="2" ParentId="479" CreationDate="2017-06-09T03:53:45.633" Score="3" Body="&lt;p&gt;Classification problems are reasonable candidates.  For instance, I wrote a GA that looked at the &lt;a href=&quot;https://archive.ics.uci.edu/ml/datasets/mushroom&quot; rel=&quot;nofollow noreferrer&quot;&gt;mushroom dataset&lt;/a&gt; taken from the &lt;a href=&quot;https://archive.ics.uci.edu/ml/about.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;UCI Machine Learning Repository&lt;/a&gt; with the goal of classifying an unknown mushroom as safe or poisonous based on its traits.  Each candidate solution encoded a series of rules (Red cap means poisonous, blue spores are safe). During the learning phase I used a portion of the dataset, but to perform the final evaluation I used the full set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That particular dataset might not be well suited to the high-school level, as it has missing values on some entries, but there are a lot of other datasets. Also, numerical data is generally easier to encode than categorical data. That being said, it was a fun dataset to use - &lt;em&gt;&quot;Hey look, after fixing that bug my GA poisons us 15% less often!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that, it might be worth deliberately looking at a variety of problems including some that are poor candidates for GAs in order to demonstrate their relative strengths &amp;amp; limitations.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2017-06-09T03:53:45.633" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="501" PostTypeId="2" ParentId="479" CreationDate="2017-06-09T08:48:22.993" Score="0" Body="&lt;p&gt;I'm adding an answer to show what sort of things I'm looking for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of such a problem could be fitting coefficients for a polynomial​ function. We have a dataset of &lt;code&gt;(X,Y)&lt;/code&gt;, and the highest power of the polynomial. Then a solution is a set of numbers (number of parameters is the highest power). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;fitness&lt;/code&gt; of a solution could be &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;fitness := 1.0/(sum(dataset's Y - polynomial's Y, for each X in dataset))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is an introductory genetic algorithm to give the idea, before going into more complex exercises.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-09T08:48:22.993" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="502" PostTypeId="1" AcceptedAnswerId="520" CreationDate="2017-06-09T10:30:43.060" Score="12" ViewCount="1785" Body="&lt;p&gt;We all know &lt;a href=&quot;https://xkcd.com/292/&quot; rel=&quot;noreferrer&quot;&gt;goto is the spawn of satan&lt;/a&gt;. To learners though, it seems easy and quick. In simple, short program codes having a goto or two won't turn the code into unreadable spaghetti code. So students have a hard time understanding why they shouldn't use jump statements. Even if they believe that I (the teacher) strongly believe it is bad practice, they won't &quot;internalize&quot; this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current strategy is elegantly forgetting about jump statements altogether. I don't tell them these things exist, hoping by the time they discover, they'll be used to coding right. Not only Goto, but also loop or subroutine/function exit statements (although I do use these from time to time in the darkness of my room, but I always feel dirty when doing so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I teach them jump statements? If yes, how do I make them feel just how bad they are? Give them a huge code with many jump statements and have them try to understand? What is your strategy?&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="150" LastEditDate="2017-07-11T08:52:04.253" LastActivityDate="2017-07-18T20:19:13.927" Title="How to teach students not to use jump statements" Tags="|curriculum-design|best-practice|coding-style|" AnswerCount="9" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="503" PostTypeId="1" AcceptedAnswerId="504" CreationDate="2017-06-09T10:37:04.287" Score="7" ViewCount="190" Body="&lt;p&gt;Currently the only thing I'm teaching for the naming of identifiers is &quot;be consistent&quot;. Then I go ahead and use the Hungarian notation consistently, and show them a few other conventions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a notation suggested for learners?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should the use of a consistent naming convention be part of the grading, or am I putting too much emphasis on this?&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="27" LastEditDate="2017-07-11T17:03:35.523" LastActivityDate="2017-07-11T17:03:35.523" Title="Teaching identifier naming conventions" Tags="|coding-style|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="504" PostTypeId="2" ParentId="503" CreationDate="2017-06-09T10:58:09.417" Score="2" Body="&lt;p&gt;I think that naming conventions are very important. It can be useful to explain that it makes the code much easier to understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the beginning (1 or 2 tests after introducing the convention), you should take just a few points off if the name of a variable or method doesn't tell you anything about it (e.g. calling the sum of an array &lt;code&gt;num&lt;/code&gt; or &lt;code&gt;a&lt;/code&gt; instead of &lt;code&gt;sum&lt;/code&gt; or preferably &lt;code&gt;arraySum&lt;/code&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should tell them that you will take a few points for it. After a short amount of time, you'll find that you don't need to take points off for bad naming, because students will learn that it is important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, just one or two points for bad naming should do the trick. However it is necessary to explain why it's important for their code to be easily understandable).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-09T10:58:09.417" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="505" PostTypeId="1" AcceptedAnswerId="510" CreationDate="2017-06-09T11:14:07.767" Score="8" ViewCount="744" Body="&lt;p&gt;Many students do not see the purpose of following conventions (indentation, naming, comments, etc.) which make the code much easier to read and review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students can learn to follow conventions, but often it is because they were simply told &quot;That's how you do it&quot;, or by points being taken off assignments due to these things. Such conventions exist to make it easier for others to read and makes it possible for them to understand what it does, without too much effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students understood why the conventions exist and the reasons for writing easy-to-read code, they would write code which is easier to review. So my question is how can I teach the students the need for those conventions, so that they understand why it's important to write code that is easy to review.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd rather they didn't lose points in tests for not following conventions, because then they do learn the conventions but they don't understand the reason for those conventions.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-07-13T04:58:48.030" LastActivityDate="2017-07-13T04:58:48.030" Title="The importance of writing understandable code" Tags="|coding-style|" AnswerCount="4" CommentCount="15" ClosedDate="2017-06-12T23:47:05.743" ContentLicense="CC BY-SA 3.0" />
  <row Id="506" PostTypeId="2" ParentId="505" CreationDate="2017-06-09T11:17:23.373" Score="2" Body="&lt;p&gt;Give them some good and bad code. Ask them to modify it to do something else in addition. Let them see for themselves that it's much easier to understand well-written code than poorly written.&lt;/p&gt;&#xA;" OwnerUserId="166" LastActivityDate="2017-06-09T11:17:23.373" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="507" PostTypeId="2" ParentId="498" CreationDate="2017-06-09T12:17:05.880" Score="2" Body="&lt;p&gt;My students are already slammed with homework, so when possible, I try not to add to their misery.  I have done some formal polling of my students several years back, so I have used real data to balance my own approach.  Of course, as of this writing, I cannot find those numbers any more, so I will be working from rough memory here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mentally aim for 50% of the kids to be able to finish labs during provided lab time. In reality, it is usually closer to 15-20% of the kids who are able to finish the labs during the provided lab periods, but there remains a large portion are able to complete their work in &amp;lt;3 hours of outside work (something like 60%).  Only the remaining 20-25% had substantial work from the labs.  While I offer help outside of class, I have not found a reasonable way to prevent this problem; kids who are slow at labs will always take more time than I can provide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I am teaching a brand-new course with a brand-new curriculum, all bets are off, as I have very little sense of how long the activities will take.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I once found a Williams College professor's labs posted online, and she added a short question to the end of every lab to the effect of, &quot;How long did this portion of the lab take you?  This answer will have no bearing on your grade, it is only used to help me adjust student workloads in future years.&quot;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-09T12:17:05.880" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="508" PostTypeId="5" CreationDate="2017-06-09T12:24:30.307" Score="0" Body="&lt;p&gt;Homework, or homework assignments, are tasks given to students, as a means of practicing or learning certain subjects in the curriculum. The students should complete these assignments at home, though that is for the teacher to decide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Homework assignments aid the students with understanding the materials of the course of class, and can help them with increasing their learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more information regarding homework, see the Wikipedia article about &lt;a href=&quot;https://www.wikipedia.org/wiki/Homework&quot; rel=&quot;nofollow noreferrer&quot;&gt;Homework&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-09T14:20:53.397" LastActivityDate="2017-06-09T14:20:53.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="509" PostTypeId="4" CreationDate="2017-06-09T12:24:30.307" Score="0" Body="Questions related to various homework assignments given in a computer science class or course. Use this tag to ask questions about giving homework to students. Do Not use this tag to ask homework questions." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-09T14:20:44.257" LastActivityDate="2017-06-09T14:20:44.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="510" PostTypeId="2" ParentId="505" CreationDate="2017-06-09T13:45:14.683" Score="9" Body="&lt;p&gt;There are a ton of blog posts and several books on the topic of readable code, containing far more eloquent and complete arguments than one can make here (or that I could come up with myself). Depending on their level it's well worth sharing some extracts of well-written texts directly to show the importance of understandable code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most fundamental reasoning behind readable code is that &lt;strong&gt;people need to read code&lt;/strong&gt;, not just computers. Or like @ben-i says &lt;a href=&quot;https://cseducators.stackexchange.com/a/132/57&quot;&gt;here&lt;/a&gt;: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;First, &lt;em&gt;right from the beginning&lt;/em&gt;, and repeatedly, I talk about the&#xA;  two audiences for code: the computer &lt;strong&gt;and people&lt;/strong&gt;. These two&#xA;  audiences have completely different needs. I come back to this theme&#xA;  with every new structure that I talk about, discussing coding style&#xA;  and norms with if statements, variable declarations (naming&#xA;  conventions), for loops (hey, why do we avoid break statements?), etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Novice programmers typically give their total focus to getting code to do what they want: make it compile and then give the right output. That's really hard when you're starting out, and it's understandable that they give 'working' priority over any other qualities like 'readability'. As they mature, programmers learn that making some code work isn't the only goal. Once you can write code that works you realise there are other things to achieve too, which is where all other sorts of software engineering practices come in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Readability is super important because &lt;strong&gt;most code will be read many many times more than it will be written&lt;/strong&gt;. I think this is the most important message to get across, and it drives all the different aspects like formatting &amp;amp; naming. I suggest teaching and discussing this core concept and keep coming back to it whenever talking about a new aspect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's one thing to get students to understand the importance, but another thing to make them bother to do it when 'getting it working' is so much more an immediate problem. To some extent that's fine, but even novice programmers should be taught the value of writing readable code because it makes their own coding easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess there's a few approaches that can be used in tandem: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Discuss why it's important. Perhaps a sports analogy: when you're starting out with &lt;em&gt;[insert sport here]&lt;/em&gt; you just care about hitting the ball &lt;em&gt;(etc)&lt;/em&gt;. But the top sportspeople in the world spend all their time honing their technique to get better results. Writing readable code is one of the things that professional programmers spend time improving and perfecting all their careers. It makes you better. It makes you faster. It lets you achieve far greater things. It helps you work as a team. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Break down different aspects of readability and give exercises on them, the simplest being to have students write and also review code where the approach hasn't been followed at all, e.g. with indenting, bad variable naming, bad comments, etc. Get them to desk-check the execution or result of some poorly written code versus well-written code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have them read &amp;amp; discuss articles about readability &amp;amp; maintainability. Depending on what level the students are at they should given reading about this and discuss it in class, even just to appreciate that it's an important ongoing topic in the CS community.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mark them down for various aspects of poor readability. Even if they just follow the rules for the benefit of marks that's better than not doing it; gets them into the practice and at some point they'll appreciate it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have them review other students code regularly, either in a group or individual setting. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teach the benefit of readable code &lt;em&gt;as you're writing it&lt;/em&gt;. Once you're writing more than a trivial piece of code you always have to re-read it and think about what's going on. It's difficult even for the original author to read poorly-written code; by following guidelines to write readable code they will actually find it easier to write code. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="57" LastActivityDate="2017-06-09T13:45:14.683" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="511" PostTypeId="2" ParentId="494" CreationDate="2017-06-09T13:56:51.953" Score="4" Body="&lt;p&gt;The first thing that must be discussed in the matter, is the mathematics involved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deep learning is first and foremost a mathematical model. An overview of this big subject is given quite well in its &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_neural_network#Theoretical_properties&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia article&lt;/a&gt;. The page showcases a summary of the subject, as well as links to more resources (2 birds in 1 go).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain the mathematical model, I recommend reading this &lt;a href=&quot;http://cdn.intechweb.org/pdfs/14881.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;article&lt;/a&gt;. This gives a relatively good basis of understanding for neural networks (which are a &quot;supertype&quot; of deep learning algorithm). Afterwards, page 4 of the article is a good place from which to progress towards Deep learning. For example, the neural network in the image from that page:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/DMGB5.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/DMGB5.png&quot; alt=&quot;simple neural network&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what if we had more than 1 hidden layer? Now &lt;strong&gt;that's&lt;/strong&gt; classified as &lt;em&gt;deep learning&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A short google search for &quot;deep learning neural networks&quot; gives this handy &lt;a href=&quot;http://neuralnetworksanddeeplearning.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;website&lt;/a&gt;. It, too, gives a brief summary of the mathematics, increasing understanding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading these articles and that website, you and your students should be good to go, and start gaining hands-on experience. Usually, the basic example for a deep learning algorithm is to fit a linear function to a dataset of points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another article (again, found through google search) &lt;a href=&quot;http://deeplearning.net/tutorial/deeplearning.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;explains&lt;/a&gt; the subject with more specific information. I recommend reading it to gain greater understand of the subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because links sometimes go broken, it might be a good idea to download those articles (they are pdf files). Then again, they were found with straight forward google searches, so that's more reliable, especially in such a quickly evolving field.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-09T13:56:51.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="512" PostTypeId="2" ParentId="503" CreationDate="2017-06-09T14:15:57.097" Score="3" Body="&lt;p&gt;There is a difference between having a clear convention for making identifier names (CamelCase, under_sep, abrev) and mandating that redundant information is provided in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also the challenge that what is good for beginners isn't necessarily what makes sense for an experienced developer, and maybe your preference changes depending on the language you're coding in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The critical aim is for intelligibility. Showing some examples is very useful, and even if Hungarian notation is not &lt;em&gt;in vogue&lt;/em&gt; in general, it forms a good reference to practice with. By all means deduct marks for inconsistent, wrong (by context) or random naming, but be careful about enforcing a single style without good reason. You wouldn't want to turn out students programmed to antagonise the Linux kernel maintainer...&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-06-09T14:15:57.097" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="513" PostTypeId="2" ParentId="492" CreationDate="2017-06-09T15:34:32.080" Score="5" Body="&lt;p&gt;&quot;processes that run and enter critical sections ... where the code is not in an infinite loop&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Processes are generally components of a reactive system (like an OS) that are designed to be non-terminating (hopefully, otherwise we call it a &quot;crash&quot;!). So even if the code of the process doesn't contain an infinite loop, the process will be invoked an indefinite number of times (a better term to use than &quot;infinite loop&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could give the example of your students' phones: Android and iOS are non-terminating, until you switch the phone off or the battery becomes empty. You don't expect Facebook to terminate so you can waste as much time as you like scrolling through posts :-).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better explanation may be somewhat technical. Ask what the specification of the program is. For a terminating program, the specification is functional: the precondition is (say) x&gt;=0 and the postcondition is y=sqrt(x). For critical sections, the specification is in terms of (1) invariants: &lt;em&gt;always&lt;/em&gt; at most one job is being printer on an individual printer, (2) liveness conditions: if a job is ready, &lt;em&gt;eventually&lt;/em&gt; it will be printed.&lt;/p&gt;&#xA;" OwnerUserId="481" LastActivityDate="2017-06-09T15:34:32.080" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="514" PostTypeId="1" CreationDate="2017-06-09T16:09:02.803" Score="8" ViewCount="882" Body="&lt;p&gt;Abstract classes are peculiar things.  Consider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public abstract class Shape {&#xA;    String name;&#xA;    protected Point startPoint;&#xA;&#xA;    public Shape(String name){&#xA;        this.name = name;&#xA;    }&#xA;&#xA;    public String getName(){&#xA;        return name;&#xA;    }&#xA;&#xA;    public abstract double getArea();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The classic way to explain them is to say that &lt;em&gt;they are like interfaces, but can implement methods&lt;/em&gt;.  But explaining this way seems counter to their essential nature, and forces us to devolve into a series of random-factoid comparisons between interfaces and Abstract classes.  (Interestingly, the &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html&quot; rel=&quot;noreferrer&quot;&gt;JavaDoc commits this particular sin&lt;/a&gt;.)  At no point in that discussion do we even try to get at the intuitive heart of what abstract classes &lt;em&gt;really are&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, classes can also be declared &quot;abstract&quot; even if everything is fully implemented and there are no abstract methods at all, which the programmer can do simply to make sure that the class cannot be instantiated directly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This lends itself to a different kind of explanation.  We could say that &quot;Abstract classes represent abstract ideas, so that means that we can't instantiate them, and they can declare methods that must be implemented by child-classes.&quot;  But, of course, they can have constructor methods.  This seems mysterious until you realize that &lt;strong&gt;they are instantiated&lt;/strong&gt; during constructor-chaining, so saying that they can't ever be instantiated is really not true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can think of no explanation for abstract classes that really gets to their essential nature.  Has anyone else found an elegant way to describe them?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-10T06:20:41.397" LastActivityDate="2017-07-23T11:15:05.487" Title="Analogy for abstract classes" Tags="|java|object-oriented-paradigm|teaching-analogy|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="515" PostTypeId="2" ParentId="514" CreationDate="2017-06-09T16:37:33.047" Score="4" Body="&lt;p&gt;It all came about, because the creators of Java looked at C++ and saw that it did not implement multiple inheritance safely (where as it was repeated inheritance that was unsafe, but they did not realise. And it is just C++'s implementation that makes it difficult to do repeated inheritance safely), and so decided that multiple inheritance was unsafe. They therefore decided to not have multiple inheritance in Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They then used abstract classes and interfaces, in place of deferred classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A deferred class is one concept, but Java has two keywords &lt;code&gt;interface&lt;/code&gt; and &lt;code&gt;abstract&lt;/code&gt; to implement them. A deferred class is one that can not be instantiated; It may have zero or more abstract methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Java when all of the methods are abstract, then we make it an interface, so as to allow multiple (interface) inheritance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore an analogy for an &lt;code&gt;abstract class&lt;/code&gt; and for an &lt;code&gt;interface&lt;/code&gt; is a &lt;code&gt;deferred class&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An analogy for a &lt;code&gt;deferred class&lt;/code&gt; is just a class that is not finished, but is useful to be inherited from (for reuse).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-22T08:30:41.620" LastActivityDate="2017-07-22T08:30:41.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="516" PostTypeId="2" ParentId="502" CreationDate="2017-06-09T17:03:18.350" Score="5" Body="&lt;p&gt;&lt;strong&gt;Use a language that has no jumps.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C, C++, Java, C# all have jumps (&lt;code&gt;break&lt;/code&gt;, &lt;code&gt;continue&lt;/code&gt;, &lt;code&gt;return&lt;/code&gt;), though they have eliminated the most harmful jumps (even &lt;code&gt;goto&lt;/code&gt; in C, you can not leave the subroutine). Most languages still have return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eiffel is a good object oriented language that has completely eliminated jumps, and many other harmful language features. At the same time as being easier to learn and use, it is more powerful that most other OO languages. (the down side is the lack of some special purpose libraries.) &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-10T07:47:13.070" LastActivityDate="2017-06-10T07:47:13.070" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="517" PostTypeId="1" CreationDate="2017-06-09T20:43:04.213" Score="10" ViewCount="94" Body="&lt;p&gt;I've been spending a lot of time lately using both $\LaTeX$ and Markdown and have found them incredibly useful. Some colleagues were blown away by some work I'm doing with $\LaTeX$. The more I think about my own use of them, the more I think about teaching/learning markup languages on a general level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the merits of teaching languages like $\LaTeX$ and Markdown in a computer science class? Are they appropriate there? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen the personal and professional value of these languages, but I'm wavering on if and how they fit into a formal CS course. (HTML is obviously relevant for its intrinsic connection to web development, so my question is really focused on other languages like the two aforementioned ones.)&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="58" LastEditDate="2017-06-09T21:08:45.517" LastActivityDate="2017-06-25T14:17:08.420" Title="Teaching Other Markup Languages" Tags="|latex|markdown|markup-languages|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="518" PostTypeId="2" ParentId="502" CreationDate="2017-06-09T21:02:51.700" Score="6" Body="&lt;p&gt;&lt;strong&gt;Make them suffer through debugging spaghetti code.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Come up with a few examples that make liberal use of the language features you don't want them to use. 100-150 lines of code with 1 or 2 small bugs because of these statements will be a nightmare for them to sort through. Make it a sort of game, too. Have students compete in groups to see who can debug the programs the quickest, and give them, say, three different ones to solve in a particular allotted amount of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the lesson, show programs that accomplish the same goal in a more readable, debuggable format. This is the &lt;em&gt;via negativa&lt;/em&gt; approach to teaching: show students how bad a choice &lt;code&gt;X&lt;/code&gt; is, so they are inspired to do &lt;code&gt;not-X&lt;/code&gt;, i.e. the good practice. It will really hit him if they have to struggle through what happens when best practices aren't followed.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-09T21:02:51.700" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="519" PostTypeId="2" ParentId="503" CreationDate="2017-06-09T21:34:49.580" Score="4" Body="&lt;p&gt;Some of the best information I have heard about how to name variables, methods, etc. comes from the Stanford MOOC on iTunes: &lt;a href=&quot;https://itunes.apple.com/us/course/developing-ios-10-apps-with-swift/id1198467120&quot; rel=&quot;nofollow noreferrer&quot;&gt;Developing iOS 10 Apps with Swift&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first couple lectures, the professor talks through how to build a calculator app (and does so in front of the class in real time) and does a fantastic job of demonstrating why he is naming things the way he is. The essence, as he explains it, is this: a statement in code should read like an English sentence. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the early requirements for the first assignment is to read through the &lt;a href=&quot;https://swift.org/documentation/api-design-guidelines/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Swift API Guidelines&lt;/a&gt;. Admittedly, this is designed for the Swift language, but there are lessons to take away from this for any language. The naming can be verbose at times, but such verbosity might improve code comprehension as students will have to know what a variable or method does in order to name it properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even just the following two would be a great start for most students:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&quot;Clarity is more important than brevity.&quot;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&quot;Write a documentation comment for every declaration. Insights gained by writing documentation can have a profound impact on your design, so don’t put it off.&quot;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-09T21:34:49.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="520" PostTypeId="2" ParentId="502" CreationDate="2017-06-09T21:39:48.710" Score="20" Body="&lt;p&gt;I don't believe that your question is entirely valid; some languages &lt;em&gt;require&lt;/em&gt; jumping.  The first principle, therefore, is to &lt;strong&gt;&lt;em&gt;follow the norms of your language&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I suspect that you are asking about languages that discourage (but do not ban) jumping, such as Java, or C++.  In these cases, I agree with Peter that the solution is to give them the negative learning experience of having to parse code with bad jumping usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would only add two things to what he said:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Do not teach about &lt;code&gt;break&lt;/code&gt; statements and &lt;code&gt;jump&lt;/code&gt; statements if you can avoid it until they really have have absorbed the norms of looping.  This can take some time.  If kids start using them earlier than you would like, simply tell the students that, while such statements have a time and place, please avoid using them for now.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As an idea for an exercise, just make some code that has for loops and replace them with awful &lt;code&gt;while(true)&lt;/code&gt; loops.  For instance, consider this &lt;em&gt;bit of foul excrement&lt;/em&gt;, which will print out the first 10 Fibonacci numbers:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int daffyDuck = 10;&#xA;int[] bugs = new int[daffyDuck];&#xA;bugs[0] = 0;&#xA;bugs[1] = 1;&#xA;int whynot = -1;&#xA;while(true){&#xA;    whynot = whynot+1;&#xA;    int whistlersmother = 0;&#xA;    if (whynot == 10) break;&#xA;    int animeRocks = 0;&#xA;    while(true){&#xA;        if (whynot-animeRocks &amp;lt;= 2) &#xA;            whistlersmother += bugs[animeRocks];&#xA;        animeRocks++;&#xA;        if(animeRocks&amp;gt;whynot)&#xA;            break;&#xA;    }&#xA;    bugs[whynot] = whistlersmother;&#xA;    System.out.print(bugs[whynot]+&quot;,&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Give it to your students, but don't tell them what it does.  Give them a chance to attempt to trace it.  Tell them that they only have 4 minutes (240 seconds!)&lt;sup&gt;&lt;b&gt;1&lt;/b&gt;&lt;/sup&gt; to figure out what it does!  Presumably, they will struggle mightily to figure it out, but mention that, if anyone thinks that they've solved it (and can back that up), not to call anything out, but to instead raise their hand.  If anyone does call you over, ask the to whisper the answer into your ear, and if they get it right, ask them to silently try to re-write the code segment in a way that would be easier to follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, give the class a new version, with another 240 seconds.  Do not mention that it is exactly the same code as before, but with nicely-defined loops (and modified variable names).  Once again, tell them not to call out the answers.  The process here should be the same.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    int n = 10;&#xA;    int[] f = new int[n];&#xA;    f[0] = 0;&#xA;    f[1] = 1;&#xA;    for(int c = 0; c &amp;lt; f.length; c++){&#xA;        int s = 0;&#xA;        for(int j = 0; j &amp;lt;= c; j++){&#xA;            if (c-j &amp;lt;= 2) &#xA;                s += f[j];&#xA;        }&#xA;        f[c] = s;&#xA;        System.out.print(f[c]+&quot;,&quot;);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And finally, give them this version, same 240 seconds, same procedure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    int fib_nums_to_print = 10;&#xA;    int[] fibonacciNums = new int[fib_nums_to_print];&#xA;    fibonacciNums[0] = 0;&#xA;    fibonacciNums[1] = 1;&#xA;    for(int currentNum = 0; currentNum &amp;lt; fibonacciNums.length; currentNum++){&#xA;        int sum_so_far = 0;&#xA;        for(int j = 0; j &amp;lt;= currentNum; j++){&#xA;            if (currentNum-j &amp;lt;= 2) &#xA;                sum_so_far += fibonacciNums[j];&#xA;        }&#xA;        fibonacciNums[currentNum] = sum_so_far;&#xA;        System.out.print(fibonacciNums[currentNum]+&quot;,&quot;);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At this point, you can reveal, for those that hadn't figured it out yet, that all 3 of these bits of code were the same function.  Ask them what made the later versions easier.  They should be able to pinpoint the two problems pretty easily.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Point out that loops can grow to be very, very large - hundreds, or even thousands of lines of code long.  Ask them why the &lt;code&gt;while(true)&lt;/code&gt; version of the loop would be especially problematic in longer code examples. Ask them where, in their opinion, would it be best in such long code for the coder to make clear when the loop will actually end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of which brings us to the final principle: we want to be able to figure out, at least in 99.9% of the cases, the basic logic of what will cause a loop to terminate &lt;em&gt;at the moment that the loop is declared&lt;/em&gt;, because otherwise, we are left hunting and guessing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;b&gt;1&lt;/b&gt;&lt;/sup&gt; - Any time you mention the number of seconds along with the number of minutes, the kids suddenly feel time pressure.  It's a very consistent trick to get the kids to focus on a short task.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-17T15:25:59.470" LastActivityDate="2017-07-17T15:25:59.470" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="521" PostTypeId="2" ParentId="494" CreationDate="2017-06-09T21:51:58.447" Score="3" Body="&lt;p&gt;From the perspective of MOOCs, a great place to start is MITx's &lt;a href=&quot;https://www.edx.org/course/introduction-computational-thinking-data-mitx-6-00-2x-5&quot; rel=&quot;nofollow noreferrer&quot;&gt;6.00.2x: Introduction to Computational Thinking and Data Science&lt;/a&gt; found on edX. It uses Python to introduce the study of data science and does not presume more than a beginner level of either Python or data science (although 6.00.1x, the first part of the course, is helpful for those who no experience whatsoever).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The penultimate unit focuses on Machine Learning using the following outline:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What is Machine Learning&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;K-Nearest Neighbors&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Clustering&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;K-Means&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For me it provided a successful introduction in two ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It defined machine learning with clear, simple examples&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It made me want to learn more about the subject&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For students who wish to study deep learning, a simple introduction to what machine learning even means and how it works at the simplest, most mundane of levels is a great jumping off point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, CS50 at Harvard changed languages this year to include Python. As a result, they did a whole lecture on machine learning and deep learning in Python. A much more self-contained example, this lecture would certainly be another value starting point for beginning a dive into this discipline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links to CS50: &lt;a href=&quot;https://video.cs50.net/2016/fall/lectures/7&quot; rel=&quot;nofollow noreferrer&quot;&gt;Week 7 Lecture Video&lt;/a&gt; and &lt;a href=&quot;http://docs.cs50.net/2016/fall/notes/7/week7.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Week 7 Lecture Notes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-10T06:50:37.193" LastActivityDate="2017-06-10T06:50:37.193" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="522" PostTypeId="2" ParentId="517" CreationDate="2017-06-09T23:16:29.747" Score="4" Body="&lt;p&gt;Next year I'm planning on having some of my second and third year students build an API that can then be used by students in our mobile development classes, and possibly web development classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hadn't thought of this before reading your post, but I think I may have part of the requirements be that they write documentation for the API so that the other classes can use it without having direct interaction with the authors. Since git, and specifically GitHub, is part of the task it makes sense that the documentation should be written in markdown. Seems like a good excuse to go over it in class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple years ago I had a student that started teaching themselves Latex as part of an independent project. His goal was to create a calculus equation solver. He did fairly well learning Latex, but I'm not sure how I would go about bridging that in to a full class project. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-09T23:16:29.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="524" PostTypeId="2" ParentId="514" CreationDate="2017-06-10T09:07:36.230" Score="3" Body="&lt;p&gt;You can explain it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Abstract classes are theoretical\conceptual blueprints for a building. When you want to create a concrete (no pun intended) blueprint out of the conceptual one, you are likely to make some modifications here and there, but essentially you'd be bound to the conceptual blueprints. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you did, in fact, create a blueprint using the conceptual idea, so in a way you did instantiate it when you created the child bluprints. This is the same with the classes: The abstract class isn't created, but a child is created and because of they way polymorphism works (a class extending another class effectively makes the child into the parent's type), you are in a way &quot;instantiating&quot; the abstract class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This analogy gives the idea that by creating the child class, you instantiate the abstract class in constructor-chaining.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-10T09:24:09.557" LastActivityDate="2017-06-10T09:24:09.557" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="525" PostTypeId="2" ParentId="514" CreationDate="2017-06-10T09:44:05.400" Score="8" Body="&lt;p&gt;The rules for abstract classes are the same as for other classes, with a few minor differences:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An abstract class &lt;em&gt;may&lt;/em&gt; have methods that do not have a body&lt;/li&gt;&#xA;&lt;li&gt;An abstract class has to be sub-classed, at some level, to a non-abstract class before you can instantiate an object&lt;/li&gt;&#xA;&lt;li&gt;It is not legal to &lt;strong&gt;directly&lt;/strong&gt; instantiate an object of an abstract class&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With an abstract base class that has abstract methods, or methods without bodies, all of those methods must be implemented in the subclass, at some level, before instantiation of an object is allowed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, imagine the school's official letterhead. At the top is the school logo, name, address, and maybe their motto. Everyone sending an official letter from the school is supposed to use the same letterhead, and they should use the same style and format as other official letters. Sometimes it's allowed to &lt;em&gt;add to&lt;/em&gt; the top, such as when the principal gets to add his name to the letterhead, but others are not supposed to do that. To make it easier for everyone to follow the same format at style, the secretary created a &quot;sample&quot; letter for everyone to use. Still some people just didn't get it right, especially the Athletics Department, who used a totally different letterhead. Finally, to end the problem the principle made one, perfect, letter. Instead of real information, however, he used place holders. It looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;The School of Choice        $School of Choice$          342-54-87971&#xA;15 Our Plaza, NE      $Best Students &amp;amp; Best Teachers$   342-54-87915 fax&#xA;Best Town, Milan              $Better Grades$           @school_of_choice&#xA;&#xA;From: {your name here}                                     {today's date}&#xA;&#xA;TO: {name of recipient}&#xA;    {address of recipient}&#xA;    {address line 2}&#xA;&#xA;Subject: {subject goes here}&#xA;&#xA;&#xA;{your letter goes here&#xA;&#xA;Mauris ut mattis dolor. Donec mollis arcu a augue varius, eu pharetra&#xA;ante gravida. Sed ut posuere mi, vitae luctus urna. Vestibulum porta, &#xA;velit quis facilisis hendrerit, nibh magna faucibus urna, a pellentesque&#xA;arcu nisi a tortor. Suspendisse nec maximus lorem. Maecenas convallis &#xA;lorem quis neque fringilla, sit amet fermentum justo rutrum. Maecenas.&#xA;&#xA;Vivamus elementum consequat semper. Nullam consectetur nunc quis turpis &#xA;scelerisque pellentesque. Proin blandit, nulla a imperdiet vestibulum, &#xA;odio dui tempor neque, sit amet vehicula magna nibh in tortor. Fusce nec&#xA;sapien vitae nibh faucibus hendrerit. Nam fermentum egestas arcu in&#xA;vulputate. Proin vulputate metus libero.&#xA;&#xA;}&#xA;&#xA;                                                www.school-of-choice.edu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This &quot;letter&quot; is saved on the school's network where any faculty member can access it, but students cannot. (It wouldn't be right for students to send out &quot;official&quot; letters would it?) The &quot;letter&quot; is also made read only. When a teacher needs to send a note to your parents (oops!) they can Word and load this letter template. They cannot save the template because it's read-only, [it is an &lt;code&gt;abstract&lt;/code&gt; letter] but they can save a copy of it with a new name [a &lt;code&gt;subclass&lt;/code&gt; of the letter]. Still, if they just printed this, and mailed it, it would look really bad for the teacher [it is still an &lt;code&gt;abstract&lt;/code&gt; letter]. In order to make the letter &quot;legal&quot; to send, all the &lt;strong&gt;&lt;code&gt;{your name here}&lt;/code&gt;&lt;/strong&gt; type things have to be replaced with real information [replace the &lt;code&gt;abstract&lt;/code&gt; methods with real ones]. If the teacher's department has its own web page on the school's site, then it can replace the last line, &lt;code&gt;www.school-of-choice.edu&lt;/code&gt; with the full page address &lt;code&gt;www.school-of-choice.edu/comp-sci/&lt;/code&gt; [override a base class method]. Now that everything is replaced it is &quot;legal&quot; to print the letter [instantiate it], and send it to your parents. (Yikes!).&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="150" LastEditDate="2017-06-10T09:47:53.247" LastActivityDate="2017-06-10T09:47:53.247" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="526" PostTypeId="2" ParentId="494" CreationDate="2017-06-10T09:46:30.280" Score="2" Body="&lt;p&gt;This is only a partial answer as the scope of deep learning is vast and usually requires some fundamentals/prerequisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google Developers Youtube channel has a playlist&#xA;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLOU2XLYxmsIIuiBfYad6rFYQU_jL2ryal&quot; rel=&quot;nofollow noreferrer&quot;&gt;Machine Learning Recipes with Josh Gordon&lt;/a&gt; which while not definitive of deep learning, provides a very accessible introduction to the field, especially to a younger audience without getting too deep/technical into the mathematics. It uses Python (albeit version 2) and popular high level libraries as sci-learn and transiting to TensorFlow.&lt;/p&gt;&#xA;" OwnerUserId="581" LastActivityDate="2017-06-10T09:46:30.280" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="527" PostTypeId="1" AcceptedAnswerId="530" CreationDate="2017-06-10T12:40:26.110" Score="6" ViewCount="960" Body="&lt;p&gt;In most languages, there are many different types of loops. The most common ones seem to be for loop, while loops, and do while loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the best way to illustrate the differences between the loops, not in terms of syntax, but in terms of recommended usage. For example, a while loop with an iterator variables can usually be replaced by a for loop. A &lt;code&gt;while true&lt;/code&gt; loop with a break statement at the end could be better expressed as a do while loop. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get my students to use the correct loops in each situation? How can I show them when a loop can be better expressed in another form?&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="58" LastEditDate="2017-06-10T13:48:48.923" LastActivityDate="2017-06-22T11:02:08.990" Title="How to teach which loop should be used" Tags="|lesson-ideas|looping|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="528" PostTypeId="2" ParentId="514" CreationDate="2017-06-10T13:24:55.270" Score="2" Body="&lt;p&gt;I tend to begin with an example of a class which allows us to share behaviors with related child classes for which there is no clear parent that you would want to use (your &lt;code&gt;Shape&lt;/code&gt; class is a good example of this). The example I typically use is that of a &lt;code&gt;Student&lt;/code&gt; class and an &lt;code&gt;Instructor&lt;/code&gt; class, with a &lt;code&gt;Person&lt;/code&gt; abstract that they can each inherit from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We then talk about the mechanical details of abstracts, and how they differ from interfaces. To motivate how they relate to interfaces, and should be used differently, I tend to lean on the &quot;is-a&quot; nature of inheritance, rather than the behavior-oriented nature of interfaces. Talking about method implementation is no longer a good motivator, since as of Java 8, interfaces can implement default methods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This illustrates practical and technical differences, while emphasizing how proper use of abstracts and interfaces plays into good application design. &lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2017-06-10T13:24:55.270" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="529" PostTypeId="2" ParentId="505" CreationDate="2017-06-10T13:31:25.543" Score="3" Body="&lt;p&gt;The best motivator for my classes on this has been to conduct a code review of a recent assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I take one or two student-submitted solutions to an assignment, and as a class we go through and read them, and try to understand what the author intended. Along the way, we discuss things the author did well, along with things they the author could improve. Readability is usually the number 1 issue with the reviewed programs, especially early in a course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using an actual program from a student in the class can be problematic because that student can feel called-out, while other students may be reluctant to criticize a classmate's code. Thus, I pull a solution from a previous class, and everybody knows that it is such.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think introducing the idea of readability at the right time is important. Students won't internalize the idea early on in a first programming course, when they're grappling with new, abstract concepts, and can barely get their programs to work. I start regularly discussing readability around the time we introduce functions.&lt;/p&gt;&#xA;" OwnerUserId="138" LastActivityDate="2017-06-10T13:31:25.543" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="530" PostTypeId="2" ParentId="527" CreationDate="2017-06-10T13:35:33.473" Score="8" Body="&lt;p&gt;Use the &lt;code&gt;for&lt;/code&gt; when you know how many times to execute it, such as counting, or iterating over an array. Use &lt;code&gt;while&lt;/code&gt; or &lt;code&gt;do .. while&lt;/code&gt; if you don't. The choice between &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;do .. while&lt;/code&gt; is if you need to do the loop one time before the test use &lt;code&gt;do ... while&lt;/code&gt; otherwise use &lt;code&gt;while&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A full explanation can be found on Stack Overflow in &lt;a href=&quot;https://stackoverflow.com/a/2950945/7412956&quot;&gt;this&lt;/a&gt; accepted answer.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-10T13:35:33.473" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="531" PostTypeId="2" ParentId="421" CreationDate="2017-06-10T13:46:02.363" Score="6" Body="&lt;p&gt;I teach and develop curriculum at a training-oriented nonprofit, and have taught in an academic setting as well. Here are some of the ways that I try to approach trainings for professional developers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Remembering that trainings are for practitioners, and as such, the lessons should be oriented toward objectives that will be immediately useful in their work. So, for example, with entry-level developers we de-emphasize (and sometimes leave out completely) topics such as concurrency and algorithm analysis.&lt;/li&gt;&#xA;&lt;li&gt;In general, relate the presentation of topics as much as possible to how they will be used on the job. With assignments, this can be essentially a linguistic slight-of-hand: state assignment tasks as user stories, provide a narrative for the assignment that aligns with workplace practices (&quot;The client has asked for feature X, and your team lead has tasked you with this feature&quot;), etc.&lt;/li&gt;&#xA;&lt;li&gt;Using current, professional-grade tools: Git+GitHub, widely-used IDEs, professional-grade databases (e.g. &lt;em&gt;not&lt;/em&gt; DBs like SQLite).&lt;/li&gt;&#xA;&lt;li&gt;Using as supplemental (and sometimes primary) resources that professional developers use. In particular, we emphasize use of official documentation and references.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These approaches often are employed in an academic setting, but they are essential (in my view) in a training setting, where developers will highly optimize their own learning toward direct, practical application. As the instructor, it's my job to make clear the connection between the material and their day-to-day work.&lt;/p&gt;&#xA;" OwnerUserId="138" LastEditorUserId="138" LastEditDate="2017-06-15T04:17:06.577" LastActivityDate="2017-06-15T04:17:06.577" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="532" PostTypeId="2" ParentId="527" CreationDate="2017-06-10T14:02:42.607" Score="5" Body="&lt;p&gt;I find that a useful way of teaching the different types of loops is simply giving examples and asking student to express them more concisely. For example, I'd give my students a loops of the format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;i = 0&#xA;while (i &amp;lt; 100) {&#xA;  # Some code here&#xA;  i++&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I'd ask them to simplify it to something more like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (i=0; i &amp;lt; 100; i++) {&#xA;  # Some code here&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For while loops, you can also teach the difference between while and do while with examples, for example you can show your students an example of the format:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (true) {&#xA;  # Some code here&#xA;  break if some_boolean&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And try to get them to correct it to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do&#xA;  # Some code here&#xA;while (!some_boolean)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As a bonus, this also teaches how to clean up code, which is another valuable skill.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-10T14:02:42.607" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="533" PostTypeId="2" ParentId="527" CreationDate="2017-06-10T14:33:24.730" Score="7" Body="&lt;p&gt;I teach them while loops, for loops, and for each loops; in that order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've found is that while loops tend to make the most sense for students. The idea of while I'm hungry, eat pizza is something they understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, forgetting to change the condition is really common so we wind up with a lot of infinite loops. I sell for loops as a loop where is harder to forget to change the counter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tell them for each loops are a less codey way of iterating, but generally only work if you want to start at the beginning at look at every element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As long as the code works, the only time I care what kind of loop they use is when we first introduce that type. During the while loop labs they have to use while loops. Once we've covered loops, it's their call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't explicitly cover do while loops as a topic, but they do show up in a couple of project shells.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students settle on for loops when it's their choice.&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-10T14:33:24.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="534" PostTypeId="2" ParentId="498" CreationDate="2017-06-10T18:27:53.547" Score="2" Body="&lt;p&gt;I never explicitly assign homework. It's easier on everyone, and I don't think that they're getting that much out of homework anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We spend a majority of our in class time working on labs and projects. What I noticed is that most confusion can be cleared up with a 30 second conversation with me or another student. If the same thing came up at home it would take at least a couple of emails back and forth, and it's usually much more difficult to explain that way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, sometimes students don't finish assignments by the due date and need to work on it at home. But my calendar isn't designed for that to be the norm for a majority of students. And pretty much everyone will study for a test at home the night before. But I don't assign review assignments or anything like that, so nothing is required. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-10T18:27:53.547" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="535" PostTypeId="2" ParentId="493" CreationDate="2017-06-10T19:25:22.980" Score="1" Body="&lt;p&gt;Try this as a trivialised example in order to help people get their head around some of the ideas. It's not strictly accurate, but I think it will help with understanding the concept.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Start with a short message (in text) and round up to a multiple of 16 bytes, padding with spaces.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Replace the final space with a non-space character&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take the m5sum of the result, and look only at the last digit. If this is '1', you're done and have finished the block.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you're not done, go back to step 2, and modify your non-space trailing padding.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;After finishing a block, you can append a new message, pad again, and repeat the process of modifying the whole message to achieve the target hash.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In practice, the hash function is expensive to calculate (and will have far fewer collisions meaning many iterations will be required to search for a suitable padding section).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although a single block could be modified, once the modified block has been wrapped into a subsequent block, a couple of times, the compute cost of re-writing an older message grows significantly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this generates is a publicly readable message, which can't be re-written in the future (and everyone can verify the accuracy or an old message).&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-06-10T22:04:24.113" LastActivityDate="2017-06-10T22:04:24.113" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="536" PostTypeId="2" ParentId="212" CreationDate="2017-06-11T02:51:55.350" Score="2" Body="&lt;p&gt;It may depend on the background of the student. If you are teaching business, language, or liberal arts majors to code, I would use high level languages. These are more like English, and conceptually more accessible to these types of students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were teaching hard-core math and science students, I might use low level languages. For instance, students studying assembler languages will understand the difference between &quot;accumulation&quot; and addition, and be better prepared to understand commands like X=X+1. Even at the most elementary level of &quot;machine&quot; languages, these students are more likely to understand &quot;bits and bytes&quot; than the students described in the previous paragraph.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T02:51:55.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="537" PostTypeId="2" ParentId="206" CreationDate="2017-06-11T03:19:53.137" Score="4" Body="&lt;p&gt;I am basing my answer on my own high school experience, some decades ago. I was a junior in a CS class composed mostly of seniors. The format for a five day week was two days of lecture, three days of in class &quot;labs,&quot; with the teacher as a &quot;floater,&quot; moving from one group of students to another to help out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even though I was a year younger than most of the other students, progressed faster, and eventually had my own labs and my own half day tutorial (out of the three lab days), meaning that I completed more modules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To keep them challenged, you may want to give your best students extra labs (and some extra instruction), half a period out of those seven. They may even have their own grading scale, but you may need to &quot;curve&quot; it in such a way to make sure that they get the grades they would have gotten in the regular course; e.g. a B in the &quot;special&quot; section equates to an A in the regular course. In a sense, it would be a class within a class.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T03:19:53.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="538" PostTypeId="2" ParentId="27" CreationDate="2017-06-11T03:43:41.220" Score="2" Body="&lt;p&gt;To me, it depends on whether you are really teaching computer &quot;science&quot; or coding/programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is a genuine &quot;science&quot; course for math and hard science majors, I would teach assembly language early. It underpins the logic structures of most computer languages and many important commands, so if your students are interested in data structures and management, and the &quot;logic&quot; of computation (down to things like electric circuits and networks), assembly language is the way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, it is not suitable for &lt;em&gt;most&lt;/em&gt; students. Here, you are talking about &quot;cross over&quot; users who are more interested in coding which they will use to create programs than the underlying science. Put another way, these students want to learn &quot;what&quot; rather than &quot;why.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, if I were structuring a college department, I would offer an assembly language &lt;em&gt;option&lt;/em&gt; but not be surprised if only a few students took advantage of it. &lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T03:43:41.220" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="539" PostTypeId="2" ParentId="349" CreationDate="2017-06-11T03:52:47.100" Score="7" Body="&lt;p&gt;I was taught that there were three main aspects of programming:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;input-output,&lt;/li&gt;&#xA;&lt;li&gt;computation, and&lt;/li&gt;&#xA;&lt;li&gt;logic/control&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&quot;Hello world&quot; is an &quot;input-output&quot; function, specifically a &quot;print&quot; command. The next thing I would teach is a simple computation, even something like &lt;code&gt;1+1=2&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;X=1&#xA;Y=X+X&#xA;Print Y&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="613" LastEditorUserId="104" LastEditDate="2017-06-11T04:03:14.337" LastActivityDate="2017-06-11T04:03:14.337" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="540" PostTypeId="5" CreationDate="2017-06-11T06:23:39.960" Score="0" Body="&lt;p&gt;The history of computers is the development of computing and computer hardware or software throughout the years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computing dates to &lt;a href=&quot;https://en.wikipedia.org/wiki/History_of_computing_hardware#Ancient_era&quot; rel=&quot;nofollow noreferrer&quot;&gt;early times&lt;/a&gt;, but when teaching about the history of computers it is more common to begin with &lt;a href=&quot;https://en.wikipedia.org/wiki/History_of_computing_hardware#Punched_card_data_processing&quot; rel=&quot;nofollow noreferrer&quot;&gt;punch cards&lt;/a&gt; as the earliest form of programming a device. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, the principal of the first modern computer was described by &lt;a href=&quot;https://en.wikipedia.org/wiki/Alan_Turing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Alan Turing&lt;/a&gt;. One of the first electronic general purpose computers ever made was &lt;a href=&quot;https://en.wikipedia.org/wiki/ENIAC&quot; rel=&quot;nofollow noreferrer&quot;&gt;ENIAC&lt;/a&gt;, which was about the size of an entire room, and was built in 1946. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In 1947 the first transistor was built, allowing the construction of more complex computers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few years later, in 1954, the first &lt;a href=&quot;https://en.wikipedia.org/wiki/High-level_programming_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;High-level&lt;/a&gt; programming language, &lt;a href=&quot;https://en.wikipedia.org/wiki/FORTRAN&quot; rel=&quot;nofollow noreferrer&quot;&gt;FORTRAN&lt;/a&gt;, was created. From there the field of computers and computing quickly developed into what we know today. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A list of milestones in the development of computers can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Timeline_of_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T08:40:01.203" LastActivityDate="2017-06-11T08:40:01.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="541" PostTypeId="4" CreationDate="2017-06-11T06:23:39.960" Score="0" Body="Questions related to teaching the history of computers in a Computer Science course or class. Use this tag for questions about teaching aspects of the history of computers for various purposes (such as introduction to Computer Science or as enrichment lessons)" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T08:38:36.023" LastActivityDate="2017-06-11T08:38:36.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="542" PostTypeId="5" CreationDate="2017-06-11T06:34:04.723" Score="0" Body="&lt;p&gt;The Raspberry Pi is a single board computer. The device is used in many fields, such as robotics, as well as promoting the teaching of basic computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Raspberry Pi (Sometimes abbreviated as R-Pi) has a number of models. It has the basic structure of a computer, and can have a UNIX based operating system installed on it. The device is distributed with &lt;a href=&quot;https://en.wikipedia.org/wiki/Raspbian&quot; rel=&quot;nofollow noreferrer&quot;&gt;Raspbian&lt;/a&gt;, a Debian based Linux Distribution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Raspberry Pi is mainly programmed in &lt;a href=&quot;https://en.wikipedia.org/wiki/Python_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Scratch_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T10:31:24.467" LastActivityDate="2017-06-11T10:31:24.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="543" PostTypeId="4" CreationDate="2017-06-11T06:34:04.723" Score="0" Body="Questions related to teaching about Raspberry Pi. Use this tag to ask questions about teaching students how to program and use a Raspberry Pi. Do Not use this tag for general questions about said device." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T08:38:18.890" LastActivityDate="2017-06-11T08:38:18.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="544" PostTypeId="1" AcceptedAnswerId="547" CreationDate="2017-06-11T06:51:16.510" Score="10" ViewCount="5438" Body="&lt;p&gt;When teaching Interfaces (in Java, for example), it is common to describe them as a contract. Which means that if a class implements an interface, it has to use the methods in the interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, the students are shown the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public interface Edible {&#xA;&#xA;    public boolean hasNuts();&#xA;    public void eat();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class PeanutbutterSandwich implements Edible {&#xA;&#xA;    //now  we have to implement the methods in Edible&#xA;    public boolean hasNuts(){&#xA;        return true; //just as an example&#xA;    }&#xA;    public void eat(){&#xA;        if(hasNuts())&#xA;            System.out.println(&quot;I contain nuts!&quot;);&#xA;        else&#xA;            System.out.println(&quot;I don't contain nuts!&quot;);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem with this example is that students don't always see how the interface acts as a contract. How could I explain the analogy in a better way, maybe with a different example that can show this in a better way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are high school level, and are familiar with polymorphism, but not with abstract classes. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-11-17T07:47:45.800" LastActivityDate="2023-01-03T08:27:07.110" Title="Explaining how an Interface is a contract" Tags="|secondary-education|java|teaching-analogy|object-oriented-paradigm|interface|" AnswerCount="10" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="545" PostTypeId="5" CreationDate="2017-06-11T07:02:15.803" Score="0" Body="&lt;p&gt;In the Object Oriented Paradigm, an interface (sometimes called &lt;a href=&quot;https://en.wikipedia.org/wiki/Protocol_(object-oriented_programming)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Protocol&lt;/a&gt;) is a means for unrelated objects to communicate with one another. An interface defines method signatures, and those methods must be be present in any object which &lt;em&gt;implements&lt;/em&gt; the interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interfaces can be thought of a description of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Methods that &lt;em&gt;are&lt;/em&gt; used by the object.&lt;/li&gt;&#xA;&lt;li&gt;Arguments that those methods receive.&lt;/li&gt;&#xA;&lt;li&gt;The return type of those methods.&lt;/li&gt;&#xA;&lt;li&gt;Invariants that are not changed by those methods.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;More information about interfaces (specifically in &lt;code&gt;java&lt;/code&gt;, but also contains details which are not language-specific) can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Interface_(Java)&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T08:39:34.170" LastActivityDate="2017-06-11T08:39:34.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="546" PostTypeId="4" CreationDate="2017-06-11T07:02:15.803" Score="0" Body="Questions related to teaching about interfaces in the object oriented paradigm. A class implementing an interface is considered to have &quot;signed a contract&quot;, which ensures that has methods described in the interface. DO NOT use this tag to ask about interfaces in general, OR about user interface." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T08:38:28.110" LastActivityDate="2017-06-11T08:38:28.110" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="547" PostTypeId="2" ParentId="544" CreationDate="2017-06-11T07:45:38.010" Score="8" Body="&lt;p&gt;A few things jump out from the &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/java/concepts/interface.html&quot; rel=&quot;noreferrer&quot;&gt;official Java documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as an example goes, the idea of a Remote as an interface works really well based on this explanation.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Methods form the object's &lt;em&gt;interface&lt;/em&gt; with the outside world; the&#xA;  buttons on the front of your television set, for example, are the&#xA;  interface between you and the electrical wiring on the other side of&#xA;  its plastic casing. You press the &quot;power&quot; button to turn the&#xA;  television on and off.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Using topics like design or hardware might be a good direction to go since a discussion of UI could build up into a more abstract understanding of the notion of an interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is important to note that this documentation makes use of the same contract analogy you mention:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Implementing an interface allows a class to become more formal about&#xA;  the behavior it promises to provide. Interfaces form a &lt;em&gt;contract&lt;/em&gt; [emphasis added]&#xA;  between the class and the outside world, and this contract is enforced&#xA;  at build time by the compiler.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To implement an interface is to promise, to guarantee, that the class will come through on its end of the bargain and implement everything in the interface. The idea of a contract is already a successful analogy, so I wouldn't try to necessarily reinvent the wheel here lest you introduce more confusion with a different analogy. You could have students use the word promise if contractual language does not hit home for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting it in the context of friendship and promises being made might make them understand an interface in a better way than legal agreements and contracts. Ultimately, simple, relevant examples that clearly illustrate &lt;em&gt;why&lt;/em&gt; interfaces are of value and how they are central to human-computer interaction will probably be of more value than a different, clever analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may find &lt;a href=&quot;https://stackoverflow.com/questions/3355408/explaining-interfaces-to-students&quot;&gt;this since-closed discussion on SO&lt;/a&gt; of value.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-11T07:45:38.010" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="548" PostTypeId="1" CreationDate="2017-06-11T07:56:15.683" Score="3" ViewCount="232" Body="&lt;p&gt;Last summer I was excited to get my hands on a &lt;a href=&quot;http://www.makeymakey.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Makey Makey&lt;/a&gt;. I played around with it for a couple days, but it ended up just gathering dust for most of the year. The same goes for a &lt;a href=&quot;http://www.sphero.com/sphero&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sphero SPRK&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They were fun to play around with, but they weren't overtly connected to what I was teaching, so I didn't prioritize finding creative ways to integrate them. However, I get the sense that there was some untapped instructional potential in these devices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there lessons and demonstrations using only one Makey Makey or Sphero that can effectively illustrate CS concepts? Moreover, do they have a place in a CS class?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking mainly for short, self-contained lesson ideas since I only have one of each; a classroom set would necessitate a separate question.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-06-11T16:47:23.343" LastActivityDate="2017-06-21T03:53:20.780" Title="Teaching with just a single Makey Makey and Sphero" Tags="|lesson-ideas|secondary-education|student-motivation|makey-makey|sphero|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="549" PostTypeId="2" ParentId="544" CreationDate="2017-06-11T08:55:08.397" Score="6" Body="&lt;p&gt;I believe that using the term &quot;contract&quot; is hurting more than helping. Most students in that age-range have no personal experience with contracts, so the term is too abstract or remote. Secondly, using contract to &quot;define&quot; the rules for using an interface is likely to lead to a circular definition when you define what a contract is. To increase comprehension for the students it is better to use something they already understand in explaining new concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using an analogy for how &lt;code&gt;implement&lt;/code&gt; in the class declaration relates to the &lt;code&gt;interface&lt;/code&gt; you could try using a survey form as an example. A fill-in-the-blank survey has no right or wrong answers, only questions that need an answer, but the answer has to be the right kind. A question about favorite color should not be answered with &quot;scuba diving&quot;. If the form has five questions, and only four are answered, it is incomplete and thrown out as unusable, and no credit is given for doing it. In &lt;code&gt;interface&lt;/code&gt; declaration is the same way. It lists the methods, their return types and their parameters, but they are blank methods that don't do anything. When the class declaration &lt;code&gt;implements&lt;/code&gt; that interface it has to fill in all the blanks and how they are filled in has to match how the interface declared them, the same return type and the same number and type of parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they have a grasp on the rules for using interfaces you can use interfaces to explain what a contract is, and how using an interface is part of fulfilling a contract.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-11T08:55:08.397" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="550" PostTypeId="5" CreationDate="2017-06-11T09:22:54.910" Score="0" Body="&lt;p&gt;Coding Conventions is the name given to a programming style widely agreed upon, within the software development community. These conventions can be different for different programming languages. Conventions &lt;a href=&quot;https://en.wikipedia.org/wiki/Coding_conventions#Common_conventions&quot; rel=&quot;nofollow noreferrer&quot;&gt;generally&lt;/a&gt; include meaningful names for variables and fields, indentation where needed (exceptions are language such as Python or Matlab, in which indentation defines scope blocks) etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can be thought of programming rules of thumb. Coding Conventions are not enforced by the &lt;a href=&quot;https://en.wikipedia.org/wiki/Compiler&quot; rel=&quot;nofollow noreferrer&quot;&gt;compiler&lt;/a&gt; and are meant to make a program easier to debug and review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching these conventions at an early level of the students is important for embedding these conventions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links to the conventions of various languages can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Coding_conventions#External_links&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T14:39:05.307" LastActivityDate="2017-06-11T14:39:05.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="551" PostTypeId="4" CreationDate="2017-06-11T09:22:54.910" Score="0" Body="Questions related to teaching coding conventions that are used in programming languages. Different programming languages have their own conventions; for questions about teaching coding conventions in a specific language, use the relevant language tag, as well." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T14:39:14.733" LastActivityDate="2017-06-11T14:39:14.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="552" PostTypeId="2" ParentId="548" CreationDate="2017-06-11T10:39:56.177" Score="3" Body="&lt;p&gt;I've not used either of those two devices, apart from a brief play with a Sphero, controlled from a phone. Clearly they have a niche, but I'm not sure they are the best choices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Robotics is obviously a huge subject, and there are plenty of simple robot platfoms available. I think starting simple is maybe best, rather than introducing the control loops and sensor feedback that is presumably present in Sphero. If you have a Sphero, then you should probably be using it as an example of current state-of-the-art for a semi-autonomous robot and explore the evolution of this technology and it's potential applications in 5 to 10 years time. Robot vaccum cleaners, surveilance drone for the elderly, that sort of thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MakeyMakey looks like a USB I/O (or input only) faker. In vogue nowadays as a &lt;a href=&quot;http://hackwhiz.com/2015/03/evilduino-usb-hack-tool/&quot; rel=&quot;nofollow noreferrer&quot;&gt;hacking device&lt;/a&gt;. In the PC era, this would have been a fairly essential route to interfacing the real world to some software (as we used to with parallel printer ports in the distant past). I feel things have moved on now, and we're either using a Raspberry Pi with GPIO (and some powerful python libraries), of a micro:bit (and micro-python). So to find a MakeyMakey application which fits your course, you might want to look at micro:bit lesson ideas (where none of the sensors or LEDs are necessary). Really, though, I think MakeyMakey's scope is quite limited (unless I misunderstood). You could program it as an arduino - probably the easiest application is for data logging in a science application. Log voltages as a capacitor is charging/discharging, or temperature in a classroom, something along those lines. To keep it self-contained, maybe you'd need to brainstorm around the applications of connecting the real world to the software world again (can you spot that I'm an embedded developer?). You could take it into the security realm (never connect anything to a USB port you care about), but that's a bit of a can of worms...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If these subjects seem like a bad fit for the material you're teaching at the moment, all the more reason to try and incorporate some of it. The rise of very powerful microcontrollers (Cortex-M3 ran doom back in 2005, and is 10x smaller now), and ubiquitous wireless network connections make distributed sensors and actors just as important part of applied computing as online shopping. It's likely that the different areas will appeal to different individuals.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="150" LastEditDate="2017-06-11T13:13:32.410" LastActivityDate="2017-06-11T13:13:32.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="553" PostTypeId="2" ParentId="505" CreationDate="2017-06-11T13:27:55.613" Score="0" Body="&lt;p&gt;Have the students read (actual) code of varying qualities written by others. Then they should be tasked with reviewing/critiquing/modifying it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they are placed in the readers' shoes, they will better understand the importance of making code readable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Surprisingly, the better students at this are often the English, language, and some liberal arts types, because they are used to working with parsing, declensions, and grammar. It might be the math types that give this aspect of the job short shrift because they are used to thinking &quot;conceptually.&quot;&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T13:27:55.613" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="554" PostTypeId="5" CreationDate="2017-06-11T13:29:16.083" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-11T13:29:16.083" LastActivityDate="2017-06-11T13:29:16.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="555" PostTypeId="4" CreationDate="2017-06-11T13:29:16.083" Score="0" Body="Engaging students in lessons using engaging rhetoric, activities, and other thing which cause or could cause student to be more focused and interested in the task at hand or the class." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T15:05:11.800" LastActivityDate="2017-06-11T15:05:11.800" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="556" PostTypeId="5" CreationDate="2017-06-11T13:33:02.837" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-11T13:33:02.837" LastActivityDate="2017-06-11T13:33:02.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="557" PostTypeId="4" CreationDate="2017-06-11T13:33:02.837" Score="0" Body="A syntax for marking up text to allow it to be rendered more elegantly. Usually they're designed to be equally readable as a plain text file and as a rendered document. Markdown (used by github) is an example of a markup language." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T15:53:17.843" LastActivityDate="2017-06-11T15:53:17.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="558" PostTypeId="2" ParentId="544" CreationDate="2017-06-11T13:33:47.640" Score="2" Body="&lt;p&gt;An interface &quot;isn't&quot; a contract. But it &lt;em&gt;embodies&lt;/em&gt; a contract. Implicitly if not explicitly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple example is when you go to Kinko's (FedEx), and you click on the end of the opening interface that you agree with the terms of use. In turn, Kinko's agrees to provide you with a bunch of computer services, express or implied, for the money you are paying them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other interfaces don't necessarily have a paywall, but they usually have terms and conditions (going both ways), plus the requirement that you provide at least a minimum of ID to use them.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T13:33:47.640" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="559" PostTypeId="5" CreationDate="2017-06-11T13:35:16.200" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-11T13:35:16.200" LastActivityDate="2017-06-11T13:35:16.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="560" PostTypeId="4" CreationDate="2017-06-11T13:35:16.200" Score="0" Body="This tag is for questions related to the teaching of version control and its use in education. Version control is a system for managing, controlling and identifying the version of software being run / deployed.&#xD;&#xA;&#xD;&#xA;It is often confused with revision control. However they are two different concepts. Though sometimes a revision control tool can be used as part of the version control process." OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-09-11T19:07:09.523" LastActivityDate="2017-09-11T19:07:09.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="561" PostTypeId="5" CreationDate="2017-06-11T13:36:27.023" Score="0" Body="&lt;p&gt;Differentiated instruction involves a student-centered approach to the classroom. &lt;a href=&quot;https://en.wikipedia.org/wiki/Differentiated_instruction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt; provides a good starting definition for it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Differentiated instruction and assessment (also known as&#xA;  differentiated learning or, in education, simply, differentiation) is&#xA;  a framework or philosophy for effective teaching that involves&#xA;  providing different students with different avenues to learning (often&#xA;  in the same classroom) in terms of: acquiring content; processing,&#xA;  constructing, or making sense of ideas; and developing teaching&#xA;  materials and assessment measures so that all students within a&#xA;  classroom can learn effectively, regardless of differences in ability.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="76" LastEditDate="2017-06-28T18:05:49.487" LastActivityDate="2017-06-28T18:05:49.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="562" PostTypeId="4" CreationDate="2017-06-11T13:36:27.023" Score="0" Body="Use this tag to discuss techniques for differentiated instruction. This is NOT the calculus concept of differentiation." OwnerUserId="58" LastEditorUserId="76" LastEditDate="2017-06-28T18:05:49.487" LastActivityDate="2017-06-28T18:05:49.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="563" PostTypeId="2" ParentId="502" CreationDate="2017-06-11T13:45:25.647" Score="4" Body="&lt;p&gt;Fundamentally, this is a question of the level of abstraction and the most natural way to express something in a language. Modern high level languages generally have safer ways of expressing a concept than using a branch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the low level, assembler language is pretty dependant on branches. You can get some way with conditional execution as a way of hiding small branches, but one of the most critical elements of a processor's performance is it's branch predictor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there is a dilema, the conditional branch is a key part of control flow at the machine level - but easy to maintain and debug code will use control flow constructs which clearly express the designer's intent and are best placed for future scalability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should also be the case that relying more on the high-level control flow constructs gives a compiler more scope to deal well with a variety of different target architectures - this might be something you could link into showing how sometimes it is not just other humans reading your code that matter, occasionally a machine needs to be able to re-organise your code efficiently.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-06-11T13:45:25.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="564" PostTypeId="5" CreationDate="2017-06-11T14:30:03.547" Score="0" Body="&lt;p&gt;Coding Conventions is the name given to a programming style widely agreed upon, within the software development community. These conventions can be different for different programming languages. Conventions &lt;a href=&quot;https://en.wikipedia.org/wiki/Coding_conventions#Common_conventions&quot; rel=&quot;nofollow noreferrer&quot;&gt;generally&lt;/a&gt; include meaningful names for variables and fields, indentation where needed (exceptions are language such as Python or Matlab, in which indentation defines scope blocks) etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can be thought of programming rules of thumb. Coding Conventions are not enforced by the &lt;a href=&quot;https://en.wikipedia.org/wiki/Compiler&quot; rel=&quot;nofollow noreferrer&quot;&gt;compiler&lt;/a&gt; and are meant to make a program easier to debug and review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching these conventions at an early level of the students is important for embedding these conventions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Links to the conventions of various languages can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Coding_conventions#External_links&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T14:39:08.883" LastActivityDate="2017-06-11T14:39:08.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="565" PostTypeId="4" CreationDate="2017-06-11T14:30:03.547" Score="0" Body="Questions related to teaching coding conventions that are used in programming languages. Different programming languages have their own coding conventions. For questions about teaching coding conventions in a specific language, use the relevant language tag, as well." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-11T14:39:00.400" LastActivityDate="2017-06-11T14:39:00.400" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="566" PostTypeId="5" CreationDate="2017-06-11T14:38:47.417" Score="0" Body="&lt;p&gt;&lt;strong&gt;Mark&lt;sub&gt;down&lt;/sub&gt;&lt;/strong&gt; is a &lt;em&gt;syntax&lt;/em&gt; where &lt;sub&gt;it&lt;/sub&gt; &lt;sup&gt;is&lt;/sup&gt; possible to use normal characters to mark&lt;sup&gt;&lt;strong&gt;up&lt;/strong&gt;&lt;/sup&gt; a document with &lt;strong&gt;bold&lt;/strong&gt;, &lt;em&gt;italics&lt;/em&gt;, &lt;code&gt;code formatting&lt;/code&gt;, &lt;kbd&gt;and&lt;/kbd&gt; &lt;a href=&quot;/questions/tagged/much&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;much&amp;#39;&quot; rel=&quot;tag&quot;&gt;much&lt;/a&gt; &lt;sub&gt;&lt;sub&gt;m&lt;/sub&gt;&lt;/sub&gt;&lt;sub&gt;o&lt;/sub&gt;&lt;sup&gt;r&lt;/sup&gt;&lt;sup&gt;&lt;sup&gt;e&lt;/sup&gt;&lt;/sup&gt;. &lt;kbd&gt;&lt;strong&gt;&lt;em&gt;&lt;a href=&quot;/questions/tagged/you-can-even-use-many-at-once&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;you-can-even-use-many-at-once&amp;#39;&quot; rel=&quot;tag&quot;&gt;you-can-even-use-many-at-once&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/kbd&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes it's &lt;strike&gt;not&lt;/strike&gt; &lt;em&gt;acceptable&lt;/em&gt; to use &lt;strong&gt;markdown&lt;/strong&gt; to such an extent.&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also link to things &lt;a href=&quot;https://meta.stackexchange.com/questions/3122/formatting-sandbox&quot;&gt;like the formatting sandbox&lt;/a&gt; or &lt;a href=&quot;https://meta.stackexchange.com/questions/1939/kbd-elements-are-way-too-intrusive/1974#1974&quot;&gt;the castle&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;sub&gt;Markdown is always welcome&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T15:53:26.350" LastActivityDate="2017-06-11T15:53:26.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="567" PostTypeId="4" CreationDate="2017-06-11T14:38:47.417" Score="0" Body="Markdown is a markup language which is very widely used in programming documentation. It is used by github, gitlab, stack exchange,  and many other documentation engines. It's also used in every major blogging platform. This tag should be used for questions about teaching the markdown syntax and for comparisons with other markup languages." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T15:43:41.207" LastActivityDate="2017-06-11T15:43:41.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="568" PostTypeId="5" CreationDate="2017-06-11T14:42:35.367" Score="0" Body="&lt;p&gt;&quot;Best practices&quot;, in our context, consist of strategies and tricks that are known to be highly effective in the computer science classroom.  These can be on a grand scale, such as curricular strategies and lesson ideas, or on a small scale, such as simple tricks that can help in focusing students on a task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best practices are methods and techniques which teacher can employ to increase student understanding of a subject, or to make classroom management easier. These techniques can include Teacher clarity, and discussions and &lt;a href=&quot;https://www.edutopia.org/blog/5-highly-effective-teaching-practices-rebecca-alber&quot; rel=&quot;nofollow noreferrer&quot;&gt;more&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that some &lt;em&gt;best practice&lt;/em&gt; teaching practices are captured as &lt;a href=&quot;https://en.wikipedia.org/wiki/Pedagogical_patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt;, in which a community process consisting of experienced educators works with an author to improve the &lt;em&gt;pattern&lt;/em&gt;. As with design patterns, a Pedagogical Pattern consists of (among other things) a problem statement and solution, along with the &lt;em&gt;forces&lt;/em&gt; that lead to the selection of the solution from among possibilities. One aspect of the patterns process is the assignment of a &lt;em&gt;shepherd&lt;/em&gt; to work with the author over several iterations (edits). The process culminates in a final vetting at a &lt;a href=&quot;https://hillside.net&quot; rel=&quot;nofollow noreferrer&quot;&gt;PLoP&lt;/a&gt; conference. &lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2018-04-10T14:02:01.177" LastActivityDate="2018-04-10T14:02:01.177" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="569" PostTypeId="4" CreationDate="2017-06-11T14:42:35.367" Score="0" Body="Use this tag for questions about best practices in the classroom. This is an educational term, and does not refer to best practices in coding style. (Instead, see the coding-conventions tag). Some questions with this tag ask for advice on comparing the advisability of two or more possible teaching practices, for example. " OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2018-04-10T14:02:01.177" LastActivityDate="2018-04-10T14:02:01.177" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="570" PostTypeId="2" ParentId="517" CreationDate="2017-06-11T16:09:23.203" Score="3" Body="&lt;p&gt;To elaborate on why @RyanNutt said, a CS student should learn markdown and/or latex because they should be using those industry-standard tools to document their code. To teach them, you could integrate teaching markdown with teaching git and teaching documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you assigned a project, you could assigned students to write documentation as extra credit or as a part of the project. As a part of this, you could ask that the documentation be in markdown because that is the industry standard. The students can then push their finished work to a git provider (like &lt;a href=&quot;https://github.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt;) and see their full project as it would be in the &quot;real world.&quot;&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-11T16:09:23.203" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="571" PostTypeId="2" ParentId="180" CreationDate="2017-06-11T16:13:51.200" Score="5" Body="&lt;p&gt;In short, yes. When introducing students to programming and how a computer works, historical perspective can prove highly valuable in several areas. Consider this one image of Margaret Hamilton next to NASA code:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/SQqCU.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/SQqCU.jpg&quot; alt=&quot;Margaret Hamilton next to NASA code&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Encapsulated here are several important ideas:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Women played an essential role in the development of the space program (&lt;em&gt;Hidden Figures&lt;/em&gt; also brought this fact to the cultural forefront recently)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The term &lt;em&gt;computer&lt;/em&gt; used to refer to the person, not the machine.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Languages have developed from low-level to high-level in significant ways, so we stand on the shoulders of abstraction when we program today.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This leads to a discussion of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Apollo_Guidance_Computer&quot; rel=&quot;noreferrer&quot;&gt;Apollo Guidance Computer&lt;/a&gt; itself. Low-level details like a 16-bit 2.048 MHz processor on a &lt;em&gt;70-pound machine&lt;/em&gt; contrasts heavily with the magnitudes of order faster devices we have now. There's a great perspective to be gained, especially in terms of speed and memory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional resource I'd recommend for integrating the historical development of computers and computing is Brian Kernighan's book &lt;em&gt;D is for Digital&lt;/em&gt;. It weaves in historical information throughout as a way of explaining just how we have arrived where we are now. Its examples are even more recent, so it provides an insight into just how much and how fast advancement has been recently. My students are reading part of it for summer reading, and here is the guide I made with sample questions that might related to your goal of teaching history: &lt;a href=&quot;https://github.com/cs50sacramento/source-code-17-18/blob/master/DIsForDigitalReadingGuide.pdf&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;D is for Digital&lt;/em&gt; Reading Guide&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-11T16:13:51.200" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="572" PostTypeId="5" CreationDate="2017-06-11T16:35:19.530" Score="0" Body="&lt;p&gt;Use this question for guidance on organizing lab activities in teaching CS. It is also appropriate for seeking ideas for meaningful labs on specific topics. Labs are normally run with either the instructor or an assistant present so that students may get guidance while working. Labs may involve individual or group work. Labs also often produce some &quot;product&quot; as the outcome of the activity. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2018-01-01T15:43:26.973" LastActivityDate="2018-01-01T15:43:26.973" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="573" PostTypeId="4" CreationDate="2017-06-11T16:35:19.530" Score="0" Body="For questions about labs. Labs are hands-on full class period activities where students are given an objective that they have to reach and the tools to reach it. Lab work can extend beyond the lab and become homework." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-20T15:30:33.200" LastActivityDate="2017-06-20T15:30:33.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="574" PostTypeId="5" CreationDate="2017-06-11T16:37:18.857" Score="0" Body="&lt;p&gt;Ruby is a modern object oriented programming language. It is dynamically typed, has a familiar syntax, and rich libraries. There are some things that it supports better than other similar languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions that for teaching things that depend in some way on Ruby itself, not just general object-oriented concepts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag is not for general Ruby questions. Nor is this site. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-06T11:45:34.420" LastActivityDate="2017-09-06T11:45:34.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="575" PostTypeId="4" CreationDate="2017-06-11T16:37:18.857" Score="0" Body="This tag is for questions about teaching Ruby specific concepts. Use this tag only when the language used would affect the question significantly. If your question uses Ruby as an example, but does not focus on the language itself consider a more general tag instead." OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-09-06T11:45:34.420" LastActivityDate="2017-09-06T11:45:34.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="576" PostTypeId="5" CreationDate="2017-06-11T16:38:45.403" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-11T16:38:45.403" LastActivityDate="2017-06-11T16:38:45.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="577" PostTypeId="4" CreationDate="2017-06-11T16:38:45.403" Score="0" Body="For questions relating to teaching robot construction or robot programming. This tag can also be used for robotics competitions like the FIRST Robotics Competition. Usually there will also be a competition specific tag." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T21:36:47.397" LastActivityDate="2017-06-11T21:36:47.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="578" PostTypeId="5" CreationDate="2017-06-11T16:51:34.897" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-11T16:51:34.897" LastActivityDate="2017-06-11T16:51:34.897" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="579" PostTypeId="4" CreationDate="2017-06-11T16:51:34.897" Score="0" Body="For question about the concept of a function calling itself, also known as recursion. It can also be used for recursive algorithms.&#xD;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-11T21:36:53.080" LastActivityDate="2017-06-11T21:36:53.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="580" PostTypeId="2" ParentId="180" CreationDate="2017-06-11T17:08:42.353" Score="2" Body="&lt;p&gt;First, remember that every course should have a through-line - a central story that it tells. This story is what provides coherence to the pieces. If history is part of that &lt;em&gt;central story&lt;/em&gt;, then the answer to your question is self-apparent. For instance, the information obviously belongs in a &lt;em&gt;Social History of Computing in Society&lt;/em&gt; course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions like this arise, however, when the material in question doesn't comfortably nestle inside that core through-line.  In those instances, I recommend the following approach:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Non-curricular &quot;extras&quot; are wonderful if they substantially enhance or broaden students' perspectives, but don't bog things down too much.  So: if it's &lt;em&gt;really&lt;/em&gt; valuable, make sure you can keep it short and to the point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question, then, is whether the cost to the pacing of the class is overridden by the generalized benefit of gaining some context.  Since these extras aren't a part of the central story of a class, and aren't cornerstone pieces of the key course goals, they &lt;em&gt;inherently&lt;/em&gt; slow down the pacing of the course and muddy that central through-line.  If you enter into too many side-paths, the central message of the course can get truly lost, and the whole course will begin to feel rudderless.  A few diversions down side-paths can be enriching, but too many destroy the arc of the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're unsure about whether your through-line is being communicated, you can poll students about the &lt;em&gt;purposes&lt;/em&gt; of the various exercises and lessons  &lt;em&gt;how do they all fit into the bigger picture?&lt;/em&gt;  If your students seem to know what's going on, you're in good shape.  If the results are more mixed, I would spend time re-telling your big story, and steer clear of side pursuits until the central line is firmly reestablished.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-10T15:15:59.533" LastActivityDate="2017-07-10T15:15:59.533" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="581" PostTypeId="2" ParentId="502" CreationDate="2017-06-11T18:40:18.487" Score="3" Body="&lt;p&gt;I would say to introduce jump statements as late as possible in the learning process. Start with a language like Eiffel that has no jump statements, then progress to others like Java and C, where their use is highly restricted. Then introduce a &quot;case&quot; where jump statements are widely used, and let them suffer through it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you want to introduce students to an &quot;innocent&quot; period with no jump statements, and then later, to more sophisticated applications where such statements are used. Many students will then elect to retain their &quot;innocence&quot; (to the degree possible), while others will opt to &quot;take their chances.&quot;&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T18:40:18.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="582" PostTypeId="2" ParentId="469" CreationDate="2017-06-11T19:02:01.770" Score="1" Body="&lt;p&gt;In my high school class, decades ago, all programs had to be submitted to a fellow student of choice for a &quot;peer review&quot; and critique before being submitted to the teacher. People took these reviewing tasks seriously, because the score for the review was the same as the score for the underlying program itself. That tended to improve the coding practices of both parties by aligning their interests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first semester, the highest grade was earned by the person with most reviews. That was true even though he submitted relatively few programs himself. Instead, he had become the &quot;go to&quot; person for reviewing others' work, and his &quot;best practices&quot; permeated the rest of the class.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-11T19:02:01.770" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="583" PostTypeId="1" AcceptedAnswerId="585" CreationDate="2017-06-11T23:07:08.337" Score="13" ViewCount="3221" Body="&lt;p&gt;In general, there are two ways arguments can be passed to a function. Functions can either be passed a reference to an object, or the value of that object. This is something that my students often struggle to understand, and I struggle to explain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some good analogies for pass by reference and pass by value? What are some pseudo-code (or real code) examples I could show that would function differently in a pass by reference language and a pass by value language?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is already covered &lt;a href=&quot;https://stackoverflow.com/questions/373419/whats-the-difference-between-passing-by-reference-vs-passing-by-value&quot;&gt;on Stack Overflow&lt;/a&gt;, but I'd like to get some answers more specifically about how to &lt;em&gt;teach&lt;/em&gt; it and less about what the designation is.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="76" LastEditDate="2017-06-13T05:38:17.370" LastActivityDate="2020-11-07T17:40:10.153" Title="What is a good analogy for pass by value vs by reference?" Tags="|lesson-ideas|teaching-analogy|" AnswerCount="12" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="584" PostTypeId="2" ParentId="583" CreationDate="2017-06-11T23:07:08.337" Score="4" Body="&lt;p&gt;A good analogy for this is passing a document of some sort to a friend. Here is how the analogy goes: I have a document. I want to give you (my friend) the document so you can make some changes and I can get those changes from you. How would I do this? There are two possible ways:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a pass by reference language, there would only be one document that I have. I would share that document with you so that we both can access it and change it. You could make your changes, and I would already have the same document, so I'd already have all your changes because we've been working on the exact same document. In psudo-code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_document = &quot;Hello World!&quot;;&#xA;&#xA;function make_your_changes(document) {&#xA;  document = document + &quot; With Changes!&quot;;&#xA;  return document;&#xA;}&#xA;&#xA;make_your_changes(my_document);&#xA;my_document == &quot;Hello World! With Changes!&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In a pass by value language, I'd have to duplicate the document and give you a copy. You'd then make your changes and give your copy to me. I'd then have to use your document rather than mine, because your copy would have the changes. In this case, there would two copies of the document. They would have been then same when I gave a copy of my document to you. You'd have to give a different document back to me with your changes. Importantly, we end up with two different documents. In pusdo-code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_document = &quot;Hello World!&quot;;&#xA;&#xA;function make_your_changes(document) {&#xA;  document = document + &quot; With Changes!&quot;;&#xA;  return document;&#xA;}&#xA;&#xA;your_document = make_your_changes(my_document);&#xA;my_document == &quot;Hello World!&quot;;&#xA;your_document == &quot;Hello World! With Changes!&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-12T20:50:33.697" LastActivityDate="2017-06-12T20:50:33.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="585" PostTypeId="2" ParentId="583" CreationDate="2017-06-11T23:28:56.630" Score="7" Body="&lt;p&gt;The canonical example (at least in C) involves swapping two values:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;&#xA;void swapByValue(int a, int b)&#xA;{&#xA;    int temp = a;&#xA;    a = b;&#xA;    b = temp;&#xA;}&#xA;&#xA;void swapByReference(int *a, int *b)&#xA;{&#xA;    int temp = *a;&#xA;    *a = *b;&#xA;    *b = temp;&#xA;}&#xA;&#xA;int main(void)&#xA;{&#xA;    int a = 13;&#xA;    int b = 42;&#xA;&#xA;    printf(&quot;a is %d\n&quot;, a);&#xA;    printf(&quot;b is %d\n\n&quot;, b);&#xA;&#xA;    printf(&quot;Swapping...\n&quot;);&#xA;    swapByValue(a, b);&#xA;    printf(&quot;a is now %d\n&quot;, a);&#xA;    printf(&quot;b is now %d\n&quot;, b);&#xA;    printf(&quot;Not swapped!\n\n&quot;);&#xA;&#xA;    printf(&quot;Swapping...\n&quot;);&#xA;    swapByReference(&amp;amp;a, &amp;amp;b);&#xA;    printf(&quot;a is now %d\n&quot;, a);&#xA;    printf(&quot;b is now %d\n&quot;, b);&#xA;    printf(&quot;Swapped!\n&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In terms of analogies and to further your own, you could talk specifically about sharing privileges on Google Drive (assuming that is something your students are familiar with). When I pass by value, I in effect give someone the right to copy the original (i.e. &quot;Can view&quot; rights) and make whatever changes they would like. Those changes have no bearing on my original copy, and the other person would now have to explicitly &lt;em&gt;return&lt;/em&gt; the favor and give me &quot;Can view&quot; rights to see the work. With passing by reference, I am giving direct access to the original (i.e. &quot;Can edit&quot; rights). You can now modify the original without needing to &lt;em&gt;return&lt;/em&gt; anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of sharing right should be universal enough beyond just Google: the privileges of read-only v. editing should resonate enough. However, I would caution that this might be another area where analogies may not clarify things as much as one might hope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the C example, it's clear - even before explaining the syntax - that one function swaps values successfully and one does not. Students can now work backwards and problem solve to identify why they think one works and one doesn't. As a result showing a working example where one function passes by value and one does not may be a better teaching tool. This would enable a more Socratic approach where you as the instructor can pose questions about why they think one does something different from the other and in turn they may come to understand the syntax for themselves before you formally teach them anything. If you compare the two functions, the only difference is the use of &lt;code&gt;*&lt;/code&gt; throughout &lt;code&gt;swapByReference&lt;/code&gt; and the fact that it is called with an ampersand in front of each argument. That creates a teachable moment in terms of syntax.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-11T23:28:56.630" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="586" PostTypeId="2" ParentId="583" CreationDate="2017-06-12T00:23:14.667" Score="0" Body="&lt;p&gt;I have N sheets of paper taped to the wall, labeled #1, #2, #3, etc. to N.  Each sheet of paper has different words or animal pictures (etc.) on it, but is turned over so you can't see it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To let you read what's on one of these sheets of paper, I can do two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I can copy the contents (&quot;value&quot;) of what's on one of the sheets of paper, and hand the copy to you, and let you read and write on your copy.  If you do write on your copy, note that the sheet on the wall remains unchanged by you.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I can tell you the number of the selected sheet on the wall, and let you go to the wall, turn the sheet over so you can see the contents, and read and write on that sheet of paper.  The number of the selected sheet of paper is its &quot;reference&quot;.  I get to see your changes (whether I want them or not!).  Note that if there is a ton of stuff on the sheet of paper, the reference is a lot shorter and easier to give you than redrawing all the stuff onto a copy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-06-12T00:29:37.590" LastActivityDate="2017-06-12T00:29:37.590" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="587" PostTypeId="2" ParentId="79" CreationDate="2017-06-12T00:28:41.780" Score="1" Body="&lt;p&gt;I would have a &quot;guest lecturer&quot; who was a cybersecurity professional teach one class. (Maybe I would give a test on the lecture the following day.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most CS instructors are aware of security problems connected with software, but not all of them understand the hardware issues. Unless you happen to have a professional cybersecurity background, you may be better off &quot;farming out&quot; that one session to someone that does. In such matters, you want to present an integrated view, or at least one that is as fully integrated as you can make it.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-06-12T00:28:41.780" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="588" PostTypeId="2" ParentId="502" CreationDate="2017-06-12T00:42:44.073" Score="3" Body="&lt;p&gt;Teach them to use jump statements (but only within suitable contexts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Jumps are perfectly normal in assembly language, machine code, and state machines (Turing machine advance tape by N).  Teach jumps in languages that require them, and the alternatives in languages where there are more readable alternatives that avoid complexity and spaghetti issues in larger than trivial programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching how their code is actually executed, show how the high-level structured control flow constructs are more readable versions that directly map to jump and conditional control flow jumps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For advanced CS students, show how jumps can create a directed network where it is much harder to evaluate whether or not the network is even deterministic, much less what it does.  Compared to loops and other structured constructs.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-12T00:42:44.073" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="589" PostTypeId="2" ParentId="203" CreationDate="2017-06-12T01:35:35.257" Score="1" Body="&lt;p&gt;If the goal is simply to handle two types of audiences, you can structure the entire course that way - suggest that every class member choose a path.  The rough outlines of the course will be the same, but the assignments will be rather different.  Those who are looking for a lighter introduction won't have to understand every word said in class, whereas those on the more serious track will be expected to keep up and speak up if they run into trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two-path courses are a little harder to design, but can pay off handsomely, with courses that everyone feels comfortable and learns in.  It's hard to give more specific advice about how to split tracks until a general topic is chosen.  (Phone app programming?  Intro to Java?  HTML/CSS/SQL/Javascript?)  The bulk of the split-curriculum planning then goes topic by topic, lab by lab.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-12T01:35:35.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="590" PostTypeId="1" CreationDate="2017-06-12T12:12:08.410" Score="5" ViewCount="657" Body="&lt;p&gt;My students struggle terribly with Eclipse, and with any form of version control. I want them to use Eclipse with Git, but I am struggling myself to find a way to set it up that would make sense to a student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to do is have them put  entire Eclipse projects (without the binaries) on GitHub. I want them to use the eGit plugin because if I ask them to use the command line, they will never do it. Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment. The other method would be to put the repository (and .git) under the Eclipse project. This, I think, would be less confusing to students, but when I try that, I get all kinds of nasty warning messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?&lt;/p&gt;&#xA;" OwnerUserId="623" LastEditorUserId="2" LastEditDate="2017-06-16T19:45:14.007" LastActivityDate="2017-06-16T19:45:14.007" Title="How can I set up Eclipse/eGit/GitHub in a way that is easy for students?" Tags="|git|eclipse|egit|" AnswerCount="3" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="591" PostTypeId="2" ParentId="590" CreationDate="2017-06-12T12:25:30.067" Score="2" Body="&lt;p&gt;I ran into a similar challenge of simplifying the use of source control with my students.  I ended up switching over to the JetBrains suite -- IntelliJ in the case of Java.  The software is free for students/teachers and integrates very, very easily with Github.  No command line required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you will need to install git.exe on your machine.  Rather than using the GitHub desktop install, I have found the git-scm.com to be less troublesome.  Github desktop installs in a user/version based directory and makes configuration inside JetBrains a challenge.  Git-scm installs in a standard Program Files directory.&lt;/p&gt;&#xA;" OwnerUserId="192" LastActivityDate="2017-06-12T12:25:30.067" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="592" PostTypeId="1" CreationDate="2017-06-12T14:55:07.350" Score="4" ViewCount="411" Body="&lt;p&gt;Students first see &lt;code&gt;switch&lt;/code&gt;/&lt;code&gt;case&lt;/code&gt; as a second syntax for &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt;, but eventually they should see its strength in creating cascades.  I know of the traditional example of printing a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cumulative_song&quot; rel=&quot;nofollow noreferrer&quot;&gt;cumulative song&lt;/a&gt;, like &quot;Twelve Days of Christmas&quot;, and below I've placed some code I use to illustrate the difference in use-case between &lt;code&gt;if&lt;/code&gt; statements and &lt;code&gt;switch&lt;/code&gt; cases.  It nicely prints out all 108 lines of the song &lt;em&gt;Alouette&lt;/em&gt; in 44 lines of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only other motivating example I can think of is a graduated tax calculator (based on the US Federal Income Tax), where cascades can be a nice way to approach the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These examples are fine, but it's not enough to get the lightbulb to &lt;em&gt;flick on&lt;/em&gt; for most of my students.  What I need is a few more motivating examples that really show students why &lt;code&gt;switch&lt;/code&gt;/&lt;code&gt;case&lt;/code&gt; is useful.  What other examples show this clearly?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    System.out.println(&quot;Alouette, gentille alouette,\n&quot;&#xA;            + &quot;Alouette, je te plumerai.\n&quot;);&#xA;&#xA;    for(int verse = 1; verse &amp;lt;= 8; verse++){&#xA;        if(verse == 1){&#xA;            System.out.println(&quot;Je te plumerai la tête.\nJe te plumerai la tête.&quot;);&#xA;        } else if (verse == 2){&#xA;            System.out.println(&quot;Je te plumerai le bec.\nJe te plumerai le bec.&quot;);&#xA;        } else if (verse == 3){&#xA;            System.out.println(&quot;Je te plumerai les yeux.\nJe te plumerai les yeux.&quot;);&#xA;        } else if (verse == 4){&#xA;            System.out.println(&quot;Je te plumerai le cou.\nJe te plumerai le cou.&quot;);&#xA;        } else if (verse == 5){&#xA;            System.out.println(&quot;Je te plumerai les ailes.\nJe te plumerai les ailes.&quot;);&#xA;        } else if (verse == 6){&#xA;            System.out.println(&quot;Je te plumerai les pattes.\nJe te plumerai les pattes.&quot;);&#xA;        } else if (verse == 7){&#xA;            System.out.println(&quot;Je te plumerai la queue.\nJe te plumerai la queue.&quot;);&#xA;        } else if (verse == 8){&#xA;            System.out.println(&quot;Je te plumerai le dos.\nJe te plumerai le dos.&quot;);&#xA;        }&#xA;&#xA;        switch(verse){&#xA;            case 8:&#xA;                System.out.println(&quot;Et le dos! Et le dos!&quot;);&#xA;            case 7:&#xA;                System.out.println(&quot;Et la queue! Et la queue!&quot;);&#xA;            case 6:&#xA;                System.out.println(&quot;Et les pattes! Et les pattes!&quot;);&#xA;            case 5:&#xA;                System.out.println(&quot;Et les ailes! Et les ailes!&quot;);&#xA;            case 4:&#xA;                System.out.println(&quot;Et le cou! Et le cou!&quot;);&#xA;            case 3:&#xA;                System.out.println(&quot;Et les yeux! Et les yeux!&quot;);&#xA;            case 2:&#xA;                System.out.println(&quot;Et le bec! Et le bec!&quot;);&#xA;            case 1: &#xA;                System.out.println(&quot;Et la tête! Et la tête!&quot;);&#xA;            default: &#xA;                System.out.println(&quot;Alouette! Alouette!\n&quot;&#xA;                        + &quot;Ah-ah-ah-ah\n&quot;);&#xA;        }&#xA;&#xA;        System.out.println(&quot;Alouette, gentille alouette,\n&quot;&#xA;                + &quot;Alouette, je te plumerai.\n&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-08T19:03:07.047" LastActivityDate="2017-07-08T19:03:07.047" Title="Motivating examples for switch/case in Java" Tags="|lesson-ideas|branching|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="593" PostTypeId="2" ParentId="592" CreationDate="2017-06-12T19:44:49.650" Score="2" Body="&lt;p&gt;The example that instantly comes to mind is Blackjack. See the code excerpt below for an extended example in C (even though it's C, the syntax will pretty much hold true for Java as well):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int cardValue(char card)&#xA;{&#xA;    int aceValue = -1;&#xA;&#xA;    if (card == 'A')&#xA;    {&#xA;        do&#xA;        {&#xA;            printf(&quot;What value would you like Ace to be?\n&quot;);&#xA;            printf(&quot;Type 1 or 11: &quot;);&#xA;            aceValue = GetInt();&#xA;        } while (aceValue != 1 &amp;amp;&amp;amp; aceValue != 11);&#xA;    }&#xA;&#xA;    switch (card)&#xA;    {&#xA;        case '2':&#xA;            return 2;&#xA;        case '3':&#xA;            return 3;&#xA;        case '4':&#xA;            return 4;&#xA;        case '5':&#xA;            return 5;&#xA;        case '6':&#xA;            return 6;&#xA;        case '7':&#xA;            return 7;&#xA;        case '8':&#xA;            return 8;&#xA;        case '9':&#xA;            return 9;&#xA;        case 'T':&#xA;        case 'J':&#xA;        case 'Q':&#xA;        case 'K':&#xA;            return 10;&#xA;        case 'A':&#xA;            return aceValue;&#xA;        default:&#xA;            return -1;&#xA;    }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This function takes in a character corresponding to the card's value. I used a single &lt;code&gt;char&lt;/code&gt; as the data type for each card, so I needed a function that took in a card's name (i.e. letter) and returned its value. Were I to design this again, I would probably reduce it down to one &lt;code&gt;return&lt;/code&gt; statement and have a variable represent something like &lt;code&gt;cardValue&lt;/code&gt; (and in that case I'd need to use &lt;code&gt;break&lt;/code&gt; statements, which I currently omit thanks to &lt;code&gt;return&lt;/code&gt;). That said, the &lt;code&gt;switch&lt;/code&gt; statement is a clear example where you don't want a bunch of &lt;code&gt;if-else&lt;/code&gt; statements. For the face cards that would be redundant. There's a nice mix of those cases that &quot;fall through&quot; and those that don't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using card games where cards share the same value is a fun, but realistic example for students to see the value of a switch statement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll share one other short example where students have to implement a command-line calculator in C and used &lt;code&gt;switch&lt;/code&gt; to identify which operation to perform. Here's the &lt;code&gt;switch&lt;/code&gt; from there:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    switch (argv[2][0]) {&#xA;        case 'x':&#xA;            printf(&quot;%f\n&quot;, numOne * numTwo);&#xA;            break;&#xA;        case '/':&#xA;            printf(&quot;%f\n&quot;, numOne / numTwo);&#xA;            break;&#xA;        case '+':&#xA;            printf(&quot;%f\n&quot;, numOne + numTwo);&#xA;            break;&#xA;        case '-':&#xA;            printf(&quot;%f\n&quot;, numOne - numTwo);&#xA;            break;&#xA;        case '%':&#xA;            mod = numOne - (numTwo * modNum);&#xA;            printf(&quot;%f\n&quot;, mod);&#xA;            break;&#xA;        default:&#xA;            printf(&quot;Usage: &amp;lt;operation&amp;gt; must be x, /, +, -, or %%\n&quot;);&#xA;            return 1;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With this example the clarity of the code is made much stronger by virtue of the case statements for each operation. From a readability perspective, it makes it clear how the operations are separated out by showing so visually.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-12T19:44:49.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="594" PostTypeId="5" CreationDate="2017-06-12T20:42:38.683" Score="0" Body="&lt;p&gt;Block based programming languages are often used as an introduction to programming for young students. These languages tend to make use of colors to indicate various categories of blocks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some prominent examples of block based programming languages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://snap.berkeley.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Snap!&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-12T21:03:25.583" LastActivityDate="2017-06-12T21:03:25.583" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="595" PostTypeId="4" CreationDate="2017-06-12T20:42:38.683" Score="0" Body="For questions about creating or teaching block based programming languages. These questions can be about structures used in block based languages, colors used, and teaching methods with these languages." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-12T21:03:20.687" LastActivityDate="2017-06-12T21:03:20.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="596" PostTypeId="5" CreationDate="2017-06-12T20:44:37.680" Score="0" Body="&lt;p&gt;Students are often assigned to work in groups or teams. The groups can be self organizing or not. Usually a group is formed to produce some product, but it may be otherwise; learning collectively, for example. Use this tag for questions about assigning, organizing, and evaluating groups of students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag is not intended for questions about students working together improperly. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2018-03-06T13:53:19.607" LastActivityDate="2018-03-06T13:53:19.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="597" PostTypeId="4" CreationDate="2017-06-12T20:44:37.680" Score="0" Body="For questions about creating, organizing, and monitoring groups, especially student teams. These questions can relate to methods of assigning students, equity in work distribution, ensuring that groups are staying on track, and anything else related to group assignments." OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2018-03-06T13:53:19.607" LastActivityDate="2018-03-06T13:53:19.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="598" PostTypeId="1" AcceptedAnswerId="600" CreationDate="2017-06-12T20:56:35.710" Score="8" ViewCount="285" Body="&lt;p&gt;My students are pretty confused by lambda calculus. I'm looking for a way to start them off. Is there some image or analogy for lambda calculus that I can use to help them understand in the beginning?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My kids are college sophomores, and I would just like to give them a clear way to start thinking about it.&lt;/p&gt;&#xA;" OwnerUserId="631" LastEditorUserId="631" LastEditDate="2017-06-12T21:11:57.173" LastActivityDate="2017-06-13T02:19:33.600" Title="How can I explain lambda calculus to my class?" Tags="|teaching-analogy|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="599" PostTypeId="1" CreationDate="2017-06-12T21:02:41.043" Score="3" ViewCount="143" Body="&lt;p&gt;During our year-end exit interviews with our outgoing seniors, the students made an explicit request to include some graph theory within our curriculum.  This seems like an excellent idea, but the only place where we can fit it is in AP CS A&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, graph theory is not within the AP curriculum &lt;em&gt;per se&lt;/em&gt;, but I wonder if there is some way to shoe-horn &lt;em&gt;at least a bit of it&lt;/em&gt; into a lab somewhere.  Even so, I am having trouble finding a spot within the AP curriculum.  Obviously, AP CS A focuses a great deal on arrays, loops, and objects.  There's not a heavy emphasis on recursion (though it is present).  Is there somewhere where graph theory can find some kind of &quot;fit&quot; within an AP class?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; I'm unable to find a clean, succinct list of topics covered in AP for those unfamiliar, but this teacher's site has a list of &lt;a href=&quot;http://www.intuitor.com/student/AP_CompSci_I_Syl.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;unit headings&lt;/a&gt; that could serve as a very quick overview.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-13T13:06:01.200" LastActivityDate="2017-07-23T15:02:07.070" Title="Integrating Graph Theory into AP CS A" Tags="|ap-computer-science-a|labs|graph-theory|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="600" PostTypeId="2" ParentId="598" CreationDate="2017-06-12T22:52:48.440" Score="4" Body="&lt;p&gt;One totally intuitive way to introduce the concept is with Excel formulas.  So, imagine in &lt;code&gt;A1&lt;/code&gt;, we have the value &lt;code&gt;10&lt;/code&gt;.  In &lt;code&gt;B1&lt;/code&gt;, we have the formula &lt;code&gt;=power(A1,2)&lt;/code&gt;, and in &lt;code&gt;B2&lt;/code&gt;, we have the formula &lt;code&gt;=(A1+A1)/A1&lt;/code&gt;.  So, at this point, our sheet looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        A   B   C&#xA;    1   10  100&#xA;    2       2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In actuality, we have now created a literal, and two lambda expressions: $10$, $(\lambda x.(power\, x\, 2))$ and $(\lambda x.(/\, (+\, x\, x)\, x))$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, let's add a formula into &lt;code&gt;C1&lt;/code&gt;.  That formula will be: &lt;code&gt;=B1+1&lt;/code&gt;.  This is a third $\lambda$ expression: $(\lambda x.(+\, x\, 1))$.  Our sheet now looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;        A   B   C&#xA;    1   10  100 101&#xA;    2       2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since we are pointing &lt;code&gt;C1&lt;/code&gt; to &lt;code&gt;B1&lt;/code&gt;, which itself points to &lt;code&gt;A1&lt;/code&gt;, we have now created $(\lambda x.(+\, x\, 1))\, (\lambda x.(power\, x\, 2))\, 10$, which resolves now in exactly the way you would expect from the Excel formulas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$(\lambda x.(+\, x\, 1))\, (\lambda x.(power\, x\, 2))\, 10$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$(\lambda x.(+\, x\, 1))\, (power\, 10\, 2)$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$(+\, (power\, 10\, 2)\, 1))$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$(+\, 100\, 1))$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$101$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simply re-pointing &lt;code&gt;C1&lt;/code&gt; to &lt;code&gt;B2&lt;/code&gt; gives us a new lambda expression:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$(\lambda x.(+\, x\, 1))\, (\lambda x.(/\, (+\, x\, x)\, x))\, 10$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which again, resolves to 3 as you would expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's nice here is that if you get rid of the 10 in &lt;code&gt;A1&lt;/code&gt; (you must replace it with a non-number so that Excel does not convert it to 0), you will get &lt;code&gt;#VALUE&lt;/code&gt;, because you have created a $lambda$ expression, but not fed in the rightmost value.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-13T02:19:33.600" LastActivityDate="2017-06-13T02:19:33.600" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="601" PostTypeId="5" CreationDate="2017-06-13T00:46:00.057" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-13T00:46:00.057" LastActivityDate="2017-06-13T00:46:00.057" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="602" PostTypeId="4" CreationDate="2017-06-13T00:46:00.057" Score="0" Body="For questions about teaching to adults. The applies equally to questions about those who didn't grow up with computer and questions about computer savvy adults who wish to begin their careers though a boot camp or some other means. This tag does not apply to anyone younger than college age." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-13T01:30:51.760" LastActivityDate="2017-06-13T01:30:51.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="603" PostTypeId="5" CreationDate="2017-06-13T00:52:28.943" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-13T00:52:28.943" LastActivityDate="2017-06-13T00:52:28.943" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="604" PostTypeId="4" CreationDate="2017-06-13T00:52:28.943" Score="0" Body="Questions about techniques to organize and run a classroom at the scale of the entire classroom. Questions about group work should NOT receive this tag, they should be tagged group-assignment." OwnerUserId="58" LastEditorUserId="27" LastEditDate="2017-06-13T02:31:20.577" LastActivityDate="2017-06-13T02:31:20.577" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="605" PostTypeId="5" CreationDate="2017-06-13T01:08:07.263" Score="0" Body="&lt;p&gt;An IDE is a specialized kind of programming environment that usually combines file management with compilation and execution of programs. Examples are Greenfoot, BlueJ, Eclipse, and Netbeans among many others. An IDE can be specific to a language, such as DRScheme (Racket) or generalized like Eclipse. Use this tag for questions about teaching specifically with IDEs or resource requests about IDEs for specific purposes. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-11-22T19:12:19.400" LastActivityDate="2017-11-22T19:12:19.400" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="606" PostTypeId="4" CreationDate="2017-06-13T01:08:07.263" Score="0" Body="For questions about teaching IDE (Integrated Development Environment) usage, questions about how IDEs fit into the classroom environment, questions about when it is appropriate to use an IDE to teach and questions about introducing IDEs to students." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-13T02:56:19.413" LastActivityDate="2017-06-13T02:56:19.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="607" PostTypeId="5" CreationDate="2017-06-13T01:15:14.210" Score="0" Body="&lt;p&gt;Git is a software repository and version control system that can be used for distributed software projects, such as open source projects. It can also be used to disseminate software in a class setting and to allow access by groups of people. This tag is for questions relating to the teaching of the system, not for technical questions or questions comparing this system to other, similar, systems. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-10-14T20:06:06.073" LastActivityDate="2017-10-14T20:06:06.073" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="608" PostTypeId="4" CreationDate="2017-06-13T01:15:14.210" Score="0" Body="For questions about teaching students to use the Git version control system. This tag should NOT be used for questions about version control systems generally." OwnerUserId="58" LastEditorUserId="27" LastEditDate="2017-06-13T02:56:10.340" LastActivityDate="2017-06-13T02:56:10.340" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="609" PostTypeId="5" CreationDate="2017-06-13T01:23:31.797" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-13T01:23:31.797" LastActivityDate="2017-06-13T01:23:31.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="610" PostTypeId="4" CreationDate="2017-06-13T01:23:31.797" Score="0" Body="For questions about teaching theoretical aspects of computer science." OwnerUserId="58" LastEditorUserId="27" LastEditDate="2017-06-13T02:43:23.670" LastActivityDate="2017-06-13T02:43:23.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="611" PostTypeId="2" ParentId="592" CreationDate="2017-06-13T04:26:23.293" Score="3" Body="&lt;p&gt;Consider why you might prefer to use a &lt;code&gt;switch&lt;/code&gt; in a production environment:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Fall through processing. The blackjack example given by @Peter is a good example of this because it mirrors how we think about the problem: all of the face cards fall into the same case &amp;amp; the code follows suit. Be careful with this though, it's easy to abuse this to get terser code at the expense of readability&lt;/li&gt;&#xA;&lt;li&gt;Default handlers. Personally, I find this most useful not in a 'single moment of code', but over a series of refinements. For instance, it's common to not have all your logic to handle multiple situations in place when you start coding, but it's also easy to miss a special case that you meant to add later. A default handler is a convenient &amp;amp; concise way to stub out code that you haven't yet gotten to.  Default handlers for that throw an exceptions or log the event can help avoid silent failures &amp;amp; are less likely to get 'coded out' by an mistakenly adding or removing an &lt;code&gt;if&lt;/code&gt; or &lt;code&gt;else&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Maintainability. I find it safer to add &amp;amp; remove code from a &lt;code&gt;switch&lt;/code&gt; statement than an &lt;code&gt;if / else if / else&lt;/code&gt; block as I'm more likely to accidentally omit an &lt;code&gt;else&lt;/code&gt; from an &lt;code&gt;else if&lt;/code&gt; than I am to omit a &lt;code&gt;break&lt;/code&gt; from a &lt;code&gt;switch&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As per Joshua Bloch's &lt;em&gt;Effective Java&lt;/em&gt;: &quot;Switches on enums are good for augmenting external enums types with constant-specific behavior.&quot; For example if you cannot change the source for an Operation enum, but need add support for an inverse method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static Operation inverse(Operation op){&#xA;   switch(op){&#xA;      case PLUS:   return Operation.MINUS;&#xA;      case MINUS:  return Operation.PLUS;&#xA;      case TIMES:  return Operation.DIVIDE;&#xA;      case DIVIDE: return Operation.TIMES;&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;Readability. I find a moderately sized &lt;code&gt;switch&lt;/code&gt; statement easier to grok than an equivalent &lt;code&gt;if / else if / else&lt;/code&gt; block.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;When possible, avoid contrived examples for motivating usage. Instead, show where you (or someone else) used a &lt;code&gt;switch&lt;/code&gt; &amp;amp; discuss why it was preferable.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2017-06-13T04:26:23.293" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="612" PostTypeId="1" AcceptedAnswerId="632" CreationDate="2017-06-13T07:04:28.157" Score="7" ViewCount="337" Body="&lt;p&gt;This year I will teach students about lambda expressions (in java). I am trying to explain how they are interpreted by the JVM and what they unfold into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String firstString = &quot;this is a lambda example!&quot;;&#xA;String secondString = &quot;and we compare to this, as well&quot;;&#xA;Function&amp;lt;String, Double&amp;gt; comparison = (String third) -&amp;gt;&#xA;        (third.compareTo(firstString) + third.compareTo(secondString)) / 2.0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would create a function that gives the average of the comparison between a given string and &lt;code&gt;firstString&lt;/code&gt; and &lt;code&gt;secondString&lt;/code&gt;. I've tried to explain to a selection of students (as a Proof of Concept of my planned lesson, so only 4-5 students) that lambda expressions just make things look better but they think that it's a new way to do this. I am trying to explain that lambda expressions are simply a shortened way to write something a bit bigger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is, how do I explain what lambda expressions exactly are, in such a way that shows the students how these expressions are interpreted by Java? &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-12-18T15:43:39.497" LastActivityDate="2017-12-18T15:43:39.497" Title="How to explain lambda expressions" Tags="|lambda-expressions|" AnswerCount="2" CommentCount="7" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="613" PostTypeId="2" ParentId="583" CreationDate="2017-06-13T09:12:30.507" Score="9" Body="&lt;p&gt;Since I was tired of the easy IT examples which all revolved around sharing files and documents, I started using the following analogies to explain pass by value and by reference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My cat (&quot;Mr Doorknob&quot;) sometimes wanders off to my neighbour. They call him &quot;Cirmi&quot;, but of course he is still the same cat. If they feed him, he comes home fat and satisfied, if their dog licks him, he comes home covered in saliva.&lt;br&gt;&#xA;This is a bit like passing a variable by reference: they might give him a different name, but it is the same cat. Whatever is done to the passed cat in the neighbour's garden will be visible on the cat when he finally comes home. (I actually like this because it helps them understand the &quot;different name thing&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for passing by value, my neighbours really liked my new sunshade. They asked me where I got it from, and they bought one themselves. It looked identical in the beginning, but theirs got pooped on by a bird. This, obviously, didn't affect mine, it is still as shiny and clean as it was.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Many things can be used as analogy for pass by reference: renting books from a library, and seeing the marks in it someone else made; lending some item to a friend, etc.&lt;br&gt;&#xA;I find it harder to come up with real life examples for passing by value, but one example is photo copying course notes, or artists (or forgers) copying famous paintings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, lending someone my course notes VS letting them make a copy of my course notes, then see them pour coffee over the notes while they are learning from it - in case one, my originals are ruined, in case two, my originals are safe. (Instead of pouring coffee, we can have them add improvements/comments to the notes, to make it positive instead of negative).&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-06-13T09:12:30.507" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="614" PostTypeId="5" CreationDate="2017-06-13T14:54:40.347" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-13T14:54:40.347" LastActivityDate="2017-06-13T14:54:40.347" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="615" PostTypeId="4" CreationDate="2017-06-13T14:54:40.347" Score="0" Body="Use this tag only when the language used would affect the question significantly (if your question uses Python as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-13T15:46:21.353" LastActivityDate="2017-06-13T15:46:21.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="616" PostTypeId="5" CreationDate="2017-06-13T14:56:05.103" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-13T14:56:05.103" LastActivityDate="2017-06-13T14:56:05.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="617" PostTypeId="4" CreationDate="2017-06-13T14:56:05.103" Score="0" Body="Use this tag only when the language used would affect the question significantly (if your question uses Snap! as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-13T15:04:28.040" LastActivityDate="2017-06-13T15:04:28.040" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="618" PostTypeId="2" ParentId="477" CreationDate="2017-06-13T15:27:02.690" Score="4" Body="&lt;p&gt;My recommendation is draw from Brian Kernighan's course at Princeton that is designed for a similar audience to what you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the course material from &lt;a href=&quot;http://www.cs.princeton.edu/courses/archive/fall14/cos109/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fall 2014&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few key lines from the course summary:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This course is meant for humanities and social sciences students who&#xA;  want to understand how computers and communications systems work and&#xA;  how they affect the world we live in. No prior experience with&#xA;  computers is assumed, and there are no prerequisites. ...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The labs are complementary to the lectures, though intended to&#xA;  reinforce the basic ideas. They will cover a spectrum of practical&#xA;  applications; two of the labs are a gentle introduction to programming&#xA;  in Javascript.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The course will have fundamentally the same structure as in previous&#xA;  years, but lectures, case studies and examples change every year&#xA;  according to what's happening.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When teaching it, he used the book &lt;em&gt;D is for Digital&lt;/em&gt;, which I assign to my AP CS Principles students. That AP class is similar in spirit to a CS0. He just recently released a new edition of the book called &lt;em&gt;Understanding the Digital World&lt;/em&gt;. Here is its ToC:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Part I: Hardware &#xA;    What's in a Computer? &#xA;    Bits, Bytes, and Representation of Information &#xA;    Inside the CPU &#xA;    Wrapup on Hardware &#xA;Part II: Software &#xA;    Algorithms &#xA;    Programming and Programming Languages &#xA;    Software Systems &#xA;    Learning to Program &#xA;    Wrapup on Software &#xA;Part III: Communications &#xA;    Networking &#xA;    The Internet &#xA;    The World Wide Web &#xA;    Data and Information &#xA;    Privacy and Security &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Kernighan is great at drawing from real-world examples, examples that would speak to the lives of students. His writing is accessible, and he covers a lot of ground successfully. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-13T15:27:02.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="619" PostTypeId="2" ParentId="612" CreationDate="2017-06-13T16:44:45.333" Score="0" Body="&lt;p&gt;In this case, what you're doing is expressed in a slightly clearer way in ruby:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;someList.each do |element|&#xA;  print element&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What you're doing is passing &lt;code&gt;forEach&lt;/code&gt; a block which it is to run on every element of &lt;code&gt;someList&lt;/code&gt;, and to run the block on every element with the element stored in the variable &lt;code&gt;l&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a way that this could have been expressed, which could add clarity:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (i=0;i &amp;lt; someList.length;i++) {&#xA;  l = someList[i];&#xA;  System.out.println(l+&quot;&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another possibility using &lt;a href=&quot;https://stackoverflow.com/q/7763131/1544337&quot;&gt;Java's for-each&lt;/a&gt; is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (Elem l : someList) {&#xA;  System.out.println(l + &quot;&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastEditorDisplayName="user24" LastEditDate="2017-06-13T19:37:35.863" LastActivityDate="2017-06-13T19:37:35.863" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="620" PostTypeId="2" ParentId="19" CreationDate="2017-06-13T17:07:46.277" Score="2" Body="&lt;p&gt;My team and I have used Processing for an intro experience a couple of times. The first was for rising ninth graders when I designed Google CAPE 2010. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There were a number of reasons for the decision to use processing but the bottom line is, at the end of the day, it worked very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have since used processing for the intro experience for the CSTUY SHIP summer program and again, it works well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with any platform / language, you have to make some choices - Processing lends itself to graphics without GUI support so if you want to really be text or GUI based that could be an issue. We also had some compatibility issues with either the sound or video library (I forget which) but that said, the fact that on supported platforms, it was easy to access these features was a plus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the reasons we chose processing:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The community (not as important now as it was then since there are more alternatives)&lt;/li&gt;&#xA;&lt;li&gt;Java as the core language (this meant that we bought into the oop idea but we could also say &quot;the language used in APCS-A which for a summer program was a selling point)&lt;/li&gt;&#xA;&lt;li&gt;A number of interesting libraries to use.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I've never used Processing for a school year class intro experience but there's no reason why it couldn't be used.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-13T17:07:46.277" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="621" PostTypeId="2" ParentId="599" CreationDate="2017-06-13T17:31:38.000" Score="2" Body="&lt;p&gt;I think the best place it could go would be whenever 2D arrays are introduced.  You could use them to represent the &lt;a href=&quot;https://en.wikipedia.org/wiki/Adjacency_matrix&quot; rel=&quot;nofollow noreferrer&quot;&gt;adjacency matrix&lt;/a&gt; of a graph and use that to begin answering all kinds of graph theory questions.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You potentially could also cover it after going through class design and ArrayLists if you want to create a Vertex, Edge, and Graph classes... but I think this might get a little too complicated for AP A (they haven't even done LinkedLists yet!)&lt;/p&gt;&#xA;" OwnerUserId="265" LastActivityDate="2017-06-13T17:31:38.000" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="622" PostTypeId="1" CreationDate="2017-06-13T18:42:20.633" Score="10" ViewCount="719" Body="&lt;p&gt;Many beginners strive to solve given problems, without thinking about efficiency of solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider such Python code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;data = [int(n) for n in input().split()]&#xA;max_el = max(data)&#xA;&#xA;# count multiplicity of every element in data&#xA;counting_table = [data.count(i) for i in range(max_el+1)]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This solution seems elegant, but is in fact $O(max(data) \cdot len(data))$, while a solution with $O(len(data))$ is possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What heuristics can I teach to detect such code which could be done asymptotically faster? What are the most illustrative examples of how a poorly-crafted algorithm which can't tackle a bit more data than anticipated?&lt;/p&gt;&#xA;" OwnerUserId="639" LastEditorUserId="639" LastEditDate="2017-06-13T19:06:46.957" LastActivityDate="2022-02-08T18:22:46.220" Title="How to bring attention to computational complexity?" Tags="|algorithms|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="623" PostTypeId="2" ParentId="599" CreationDate="2017-06-13T18:42:24.323" Score="4" Body="&lt;p&gt;You may very well have some examples where you can discuss state machines and hence state diagrams, that is, graphs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you're creating a game with a computer controlled character, that character might be in different states: pursue, search, attack &amp;lt;-- you can introduce a graph representing the states and transitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote about this a bit here: &lt;a href=&quot;https://cestlaz.github.io/posts/2012-12-17-layers-of-a-lesson.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cestlaz.github.io/posts/2012-12-17-layers-of-a-lesson.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a class that goes beyond the APCS-A curriculum and do more recursion, you can look at a maze solver (as I do), knights tour, etc - this lets you discuss searching the state space graph - DFS (and allude to alternatives including heuristic search and such), paths, etc. You can also talk about circuits and cycles (knights tour variants)&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="237" LastEditDate="2017-06-14T22:19:33.153" LastActivityDate="2017-06-14T22:19:33.153" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="624" PostTypeId="2" ParentId="622" CreationDate="2017-06-13T18:59:57.587" Score="3" Body="&lt;p&gt;For any algorithm, if you give it a large input it will fail to complete in a short time. For example, in the case of sorting algorithms, insertion sort is far less efficient than quicksort. But on a small array, insertion sort will finish almost instantaneously. On larger arrays, you'd see insertion sort get exponentially slower, and quicksort stay fairly quick. But regardless of the algorithm, eventually you can give a large enough input that it will take years to complete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To directly answer your question, I think insertion sort is a &quot;textbook example&quot; of a quick to think of but inefficient algorithm. There are certainly faster algorithms, but even they, on a large enough input, will fail to complete in a reasonable time.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What is heuristics to detect such code which could be done asymptotically faster?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There really isn't a way besides practice to detect when a problem could be solved with a more efficient algorithm.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-13T18:59:57.587" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="625" PostTypeId="2" ParentId="622" CreationDate="2017-06-13T19:21:40.560" Score="2" Body="&lt;p&gt;A useful example is sorting. &lt;a href=&quot;https://en.wikipedia.org/wiki/Quicksort&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quicksort&lt;/a&gt; becomes $O(n^2)$ in the worst case, and for big data that's even more relevant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if we look at &lt;a href=&quot;https://en.wikipedia.org/wiki/Merge_sort&quot; rel=&quot;nofollow noreferrer&quot;&gt;Merge Sort&lt;/a&gt;, its worst case is $O(n\,log_2(n))$. So for sorting large amounts of data, choosing the correct algorithm (and so implementing an algorithm in a clever way) allows the program to work with much larger data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More examples can be found in this &lt;a href=&quot;http://bigocheatsheet.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strike&gt;Cheat&lt;/strike&gt; Helpful sheet&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-14T16:52:51.607" LastActivityDate="2017-06-14T16:52:51.607" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="626" PostTypeId="2" ParentId="622" CreationDate="2017-06-13T19:42:43.803" Score="2" Body="&lt;p&gt;To my knowledge, the only way to know if a more efficient solution exists is to find a correspondence to a problem with a known optimal algorithm. In general, practice &amp;amp; experience are necessary to develop efficiency mindfulness. One way to encourage it is to ask your students how their solutions would scale &amp;amp; where they expect it to fail. If you get a variety of solutions, discuss how &amp;amp; why they differ.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also bear in mind that the most efficient code isn't always the best, especially for general development. Clarity, maintainability and cost (development time required) are also real world factors. Even if you're teaching an algorithm analysis course, there's more than one measure of efficiency: calculations, program size &amp;amp; memory requirements are often at odds with each other. Discuss the trade-offs.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2017-06-13T19:42:43.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="627" PostTypeId="2" ParentId="622" CreationDate="2017-06-13T19:50:21.763" Score="3" Body="&lt;p&gt;I think it's important that over time, students develop an understanding of how their choices as well as langauge (and library) implementation choices can affect run time. I think this basic understanding is much more important than memorizing a bunch of run times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I take my students through some problems that lead to them &quot;discovering&quot; hidden complexities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm linking to two blog posts I wrote about the subject:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cestlaz.github.io/posts/2013-03-23-Who_won_the_election-Quadratic_to_Linear_Time.md&quot; rel=&quot;nofollow noreferrer&quot;&gt;Who won the election - quadratic to linear time&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cestlaz.github.io/posts/2014-11-17-hidden-complexity.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hidden Complexity&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-13T19:50:21.763" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="628" PostTypeId="1" AcceptedAnswerId="633" CreationDate="2017-06-13T19:51:53.660" Score="60" ViewCount="24520" Body="&lt;p&gt;In some CS courses (especially undergraduate and high school courses) the tests and the final exam are written on paper without the use of a computer.&#xA;But if the students are in a CS course, shouldn't they be allowed to use the computer? If some mistakes are difficult enough to not be noticeable while writing code on a computer, they are nearly impossible to be found while writing code on paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is, are there any advantages in doing written tests on paper, and is this the best approach?&lt;/p&gt;&#xA;" OwnerUserId="118" LastEditorUserId="2" LastEditDate="2017-06-13T20:30:26.317" LastActivityDate="2017-07-01T20:24:23.900" Title="Should CS students be doing their tests on paper?" Tags="|secondary-education|grading|undergraduate|" AnswerCount="24" CommentCount="18" ContentLicense="CC BY-SA 3.0" />
  <row Id="629" PostTypeId="2" ParentId="628" CreationDate="2017-06-13T20:09:35.347" Score="19" Body="&lt;p&gt;Speaking as a former student and as a coder: yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps there's an element of in-my-day geezerism here, but under the assumption that by &quot;on a computer&quot; you mean &quot;in an IDE&quot; I'll point out that when you have to write it out, you don't get:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;syntax highlighting&lt;/li&gt;&#xA;&lt;li&gt;autocomplete&lt;/li&gt;&#xA;&lt;li&gt;as-you-type compiler checking&lt;/li&gt;&#xA;&lt;li&gt;new project wizards (&quot;What was the signature for &lt;code&gt;main&lt;/code&gt; again?&quot;)&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Remembering to end every line with a semicolon without the benefit of syntax highlighting may seem like tedious detail, but if by the final you haven't picked up that habit, doesn't that indicate something about you as a coder?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you say that as a teacher you don't care about the semicolons, you just want to see the algorithm, then fine. Don't count off when they're missing. But don't let it be a &quot;gimme&quot;.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-06-13T20:09:35.347" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="630" PostTypeId="2" ParentId="2" CreationDate="2017-06-13T21:15:11.967" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Note: I'm one of the founders of CodeHS.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you check out CodeHS, we have a system for writing autograders using Java. You can write unit test specific problems that test the output of a specific method or write generic autograders for any Java program if you want to test more complex things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can read more about them here: &lt;a href=&quot;https://medium.com/read-write-code/these-are-the-autograders-you-ve-been-looking-for-bda0fa8fd8a&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://medium.com/read-write-code/these-are-the-autograders-you-ve-been-looking-for-bda0fa8fd8a&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also see the documentation for our autograder framework &lt;a href=&quot;https://static.codehs.com/gulp/543c38430f2c5b3629343f8fc4d25596c12303c6/javadoc/autograders/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="91" LastEditorUserId="1397" LastEditDate="2017-06-29T19:28:38.867" LastActivityDate="2017-06-29T19:28:38.867" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="631" PostTypeId="2" ParentId="628" CreationDate="2017-06-13T21:21:10.477" Score="12" Body="&lt;p&gt;Speaking as a former student, a coder &amp;amp; a teacher: yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to the points raised by G. Ann, I would add the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Problems on tests are typically far simpler than full real world problems. It's reasonable to expect increased attention to detail (missing semicolons, etc) when there are fewer details to attend to.&lt;/li&gt;&#xA;&lt;li&gt;In a writing class with long answer question, I would expect proper use of grammar &amp;amp; punctuation. Common programming syntax is not different enough to warrant special treatment.&lt;/li&gt;&#xA;&lt;li&gt;The instructor is free to adjust the distribution of points as they see fit. I typically gave most of the points if the general shape of the solution was correct &amp;amp; held some points back for students who could provide compile ready answers. Different course / class /teacher combinations may have different needs. Good teachers adjust things as needed to provide the best possible learning experience they can provide.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Regarding OP's comment about advanced course - I found advanced courses don't lend themselves well to asking programming questions on exams. Students should have covered programming concepts in intro courses. I prioritize concepts over implementation details in upper course exams &amp;amp; leave the implementation details for implementation assignments / projects.&lt;/p&gt;&#xA;" OwnerUserId="16" LastActivityDate="2017-06-13T21:21:10.477" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="632" PostTypeId="2" ParentId="612" CreationDate="2017-06-13T22:09:13.713" Score="5" Body="&lt;p&gt;A lambda is an anonymous function.  Java handles lambdas via a feat of type inference.  What you have done is to assign a lambda to a variable of interface type. You may only do this if the interface is a functional interface, i.e., it is an interface that specifies exactly one [non-defaullt] method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you do this assignment, the compiler assumes that the lambda is the method specified by the interface that is they type of the variable.  It is here that type inference occurs.  An object of unnamed type implementing the interface is crated and your variable now points at it.  The compiler will reject your code if the argument list or return type of the lambda is incompatible with the interface.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will find lambdas to be splendid if you are doing event-driven programming.  In fact the JavaFX framework takes big advantage of this feature.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-13T22:09:13.713" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="633" PostTypeId="2" ParentId="628" CreationDate="2017-06-13T22:44:22.180" Score="50" Body="&lt;p&gt;&lt;em&gt;Edit: This relatively high voted answer seems to be confusing to some, as it does not seem to give a clear answer. TL;DR: yes, doing tests on paper is usual at least in my university, at least many years ago. My anecdotal experience means to give a background where this might be coming from, together with the title &quot;CS!=coding&quot;. The last section at the end gives my opinion on why it is a good thing.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;CS != coding&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You also have to acknowledge that CS is not coding; coding is not CS. You can have &lt;em&gt;great&lt;/em&gt; coders who have not the faintest idea about CS (and vice versa:  &lt;a href=&quot;https://cseducators.stackexchange.com/questions/628/should-cs-students-be-doing-their-tests-on-paper/633#comment1297_633&quot;&gt;rubdos mentions&lt;/a&gt; the example of Alan Turing himself, who died around the time the first programming languages were invented). I can't remember whether in my CS studies I ever wrote actual real world code in a test. Lambda calculus, sure, and other formal stuff (more like mathematic formulae/proofs than programming).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do clearly remember that coding/programming was not part of the curriculum. It was assumed that people who went to study CS already were able to program. At that time, Java 1 was around the corner, and my university offered a voluntary 2-week Java crash course &lt;em&gt;before&lt;/em&gt; the actual semester started. I did not take part (having a few other real world programming languages under my belt at that time), and never missed it. There was a bit of programming during some practical courses, but here also the profs assumed that everything we needed to know we'd pick up ourselves. And right they were.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Funnily enough, one of my profs was very active in the Java community, and used it to motivate proofs in temporal logic / correctness. But that was &lt;em&gt;very&lt;/em&gt; much theoretical, about concepts and principles - &quot;coding&quot; had nothing to do with it whatsoever. It was more about &quot;how do you create a compiler&quot; instead of &quot;how to you write a program&quot;. That's what university level CS is about, after all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hence, as it was not part of the curriculum (being assumed to be known as a matter of course), no need to ask about it in a test; hence no reason to use a computer in tests, not any more than in any other field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: this answer is my experience from university level CS education; it somewhat applies to earlier levels as well, in my opinion - it is more important to teach the principles than the actual coding; and a test would be better served with checking that they understand roughly what it's all about instead of writing perfect syntactic code with a pencil. I'd rather have a pupil explain what a basic design pattern is, instead of showing the actual code for a simple &lt;code&gt;for&lt;/code&gt; loop. Programming languages come and go, principles stay (adjust to your own curriculum of course).&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2017-06-19T09:15:36.470" LastActivityDate="2017-06-19T09:15:36.470" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="634" PostTypeId="2" ParentId="628" CreationDate="2017-06-13T23:55:11.230" Score="54" Body="&lt;p&gt;100% yes. In beginning courses, it's practically a cognitive requirement.  Let me see if I can break down for you why it is so important.  It comes down to &lt;em&gt;what we can know that the student knows.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say we have a student who is a rather mediocre coder and who, to be honest, really has no idea what is going on in class. We're going to give him a problem in Java, which is to go through an array of &lt;code&gt;int&lt;/code&gt;s, add all of the numbers in said array, and return the result.  We're also going to let him use an IDE to build it, so that he can find syntax errors and spot-check himself for silly errors by running the code.  The first thing he writes is this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for(z=array[0], z &amp;lt; array, z+1){&#xA;    z=array[0];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, how much can we say that he actually knows?  I can forgive that he used commas in his for loop.  I might even, depending on his background, forgive that he forgot to declare &lt;code&gt;z&lt;/code&gt;.  But what can be said about the fact that he set &lt;code&gt;z&lt;/code&gt; to &lt;code&gt;array[0]&lt;/code&gt; instead of to &lt;code&gt;0&lt;/code&gt;?  Or that he is comparing &lt;code&gt;z&lt;/code&gt; to &lt;code&gt;array&lt;/code&gt; instead of &lt;code&gt;array.length()&lt;/code&gt;, or that he is never actually changing &lt;code&gt;z&lt;/code&gt; in his &lt;code&gt;z+1&lt;/code&gt; statement? These are mistakes of comprehension, not syntax.  What, also, can I say about the fact that he keeps setting &lt;code&gt;z&lt;/code&gt; to &lt;code&gt;array[0]&lt;/code&gt; over and over again?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact is that, if he writes this into an IDE, a few things will happen.  A bunch of code will light up red.  A red line will remind him that he forgot to make a return.  Another red line will tell him that &lt;code&gt;z &amp;lt; array&lt;/code&gt; is not possible, because they are of different types.  So, he will start typing things until the red lines go away.  &lt;em&gt;Does he necessarily understand the things he is changing, or has he been trained, Pavlovian-like, to change code that has been underlined in red?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As he makes some red lines disappear, new red lines pop up.  He then turns his attention to those until he makes all the red disappear, and now he has this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int g = 0;&#xA;for(int z=array[0]; z&amp;lt;array.length; z=z+1){&#xA;    g=array[0];&#xA;}&#xA;return g;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code is much, much better.  It's still not perfect.  But, given the flaws in his first draft, do we have any reason to believe that he really understands this new version and why it is actually better?  Or is he just changing code until the red goes away?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, he runs it, and it immediately ends by returning the value &lt;code&gt;0&lt;/code&gt;.  So, since he still has about 5 minutes left to his exam time, he starts just changing things at random.  He changes his &lt;code&gt;int z&lt;/code&gt; to be &lt;code&gt;= 0&lt;/code&gt;.   Now he starts getting a number returned!  He tries putting &lt;code&gt;g&lt;/code&gt; into &lt;code&gt;g=array[0]&lt;/code&gt;, then he puts &lt;code&gt;z&lt;/code&gt; into it.  Now he has &lt;code&gt;g=array[z]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He dithers about a bit, and finally adds a &lt;code&gt;+&lt;/code&gt; in there.  He now has the correct code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int g = 0;&#xA;for(int z=0; z&amp;lt;array.length; z=z+1){&#xA;    g+=array[z];&#xA;}&#xA;return g;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;He turns it in to the teacher, who says, &quot;Boy, he sure understood this!  That's one student that I don't need to give any extra attention to, because he is in great shape in my class!&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The takeaway questions then are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How well does the student understand the material?&lt;/li&gt;&#xA;&lt;li&gt;How well does the student's grade reflect that?&lt;/li&gt;&#xA;&lt;li&gt;How much worse are the odds that the student will now receive the extra help that he so desperately needs?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;We need tests that actually show what you &lt;em&gt;really know&lt;/em&gt;, which is not always the same thing as what you can &lt;em&gt;produce with prompting help from an IDE&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-21T10:30:54.230" LastActivityDate="2017-06-21T10:30:54.230" CommentCount="18" ContentLicense="CC BY-SA 3.0" />
  <row Id="635" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T03:11:34.543" Score="12" Body="&lt;p&gt;Speaking as a former student, a former competitive programmer, a real world programmer, yes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forcing student to write code on paper is not pointless. It has following benefits:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Giving you syntax awareness, avoid computer generated code. Therefore giving you deeper understanding of the concept.&lt;/li&gt;&#xA;&lt;li&gt;You will find a way to write shorter code, since you can't copy-paste.&lt;/li&gt;&#xA;&lt;li&gt;You will be more careful, since you can't undo/redo. You will develop the habbit of drawing the concept before going into the code. My personal experience is, don't open IDE before you have a solid solution in paper.&lt;/li&gt;&#xA;&lt;li&gt;Pen &amp;amp; paper is always nice for sketching up idea. You should get used to them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="665" LastEditorUserId="665" LastEditDate="2017-06-14T03:22:17.813" LastActivityDate="2017-06-14T03:22:17.813" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="636" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T04:57:30.013" Score="10" Body="&lt;p&gt;Your question has an implicit assumption: that CS is programming and what you're learning (and will always learn) in CS is programming. That's not necessarily true. Even though an introductory course &quot;teaches&quot; a language, probably something like Python, C/C++, or Java, in actuality you're learning a type of programming language, a procedural language (control flow) or OO. Ask someone who's learned Scheme as their first programming language how different it is from C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following on from intro, a data/discrete structures class (the second class in CS) could be taught language agnostically, but really you're learning things like sets, relations, and combinatorics which can all be tested about conceptually. Anything beyond discrete depends on the class. An OS or networking class could have C as the required language since it's &quot;systems&quot; class, along with an upper-level undergraduate/first-year graduate database class. And exams in those classes aren't about programming, rather more along the lines of &quot;When is a semaphore better than a mutex?&quot; or &quot;What's CIDR and why is it important?&quot; If your DB professor is unkind, they'll ask you to give pseudo-code for a B+ tree and ask you a relational algebra question. Graphics sometimes introduces OpenGL, but concepts are taught and tested mathematically, something along the line of given a 8x8 grid of values, what's the interpolated value at some point in the grid. Volume rendering is expressed as solving an integral. Image processing can be taught as a signal class, i.e. use PDEs. Scientific computing could ask why is Householder more stable than Gram-Schmidt. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turning towards other CS things, algorithms (runtime complexity) and theory (abstract machines, automata) are all done with pencil and paper. Ultimately, the higher you go, the less programming is taught and more concepts are taught and then expressed through programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR Yes.&lt;/p&gt;&#xA;" OwnerUserId="667" LastActivityDate="2017-06-14T04:57:30.013" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="637" PostTypeId="2" ParentId="27" CreationDate="2017-06-14T06:33:40.000" Score="5" Body="&lt;p&gt;I don't think there's much point teaching students to write assembly code purely for the sake of it. There are more useful and productive tools / languages / concepts that would be a better use of time. However, I'm a big fan of giving students some exposure to assembly code in order to teach some key concepts rather than skills:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keen students often want to know the answer to the following questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) How does a computer actually work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) What makes one computer faster than another?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's hard to answer those questions fully without having a clear grasp of the fetch / decode / execute cycle. If students understand how computers store and process instructions there are huge consequences on the programs they can go on to create in terms of efficiency, reliability, performance and robustness. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the 'introductory course' is an intro to programming generally, I'd probably avoid assembler. If it's an introduction to Computer Science which includes more than just writing code, I'd say some exposure to assembler is pretty essential. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;http://tanks.withcode.uk/&quot; rel=&quot;noreferrer&quot;&gt;tanks.withcode.uk&lt;/a&gt;  as a Little Man Computer CPU simulator that controls little tanks that students have to program around an obstacle course. At the end of that module I don't really mind if students can't remember how to write LMC code but I do expect them to be able to explain the fetch / execute cycle. The brighter students will also be able to explain the performance and security implications of the Von Neumann processor architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This &lt;a href=&quot;https://www.youtube.com/watch?v=9JgtS8XH-X0&quot; rel=&quot;noreferrer&quot;&gt;video&lt;/a&gt; explains how LMC assembly can help explain some key CS concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If nothing else, briefly exposing students to assembler programming makes them appreciate how much easier writing code is in a high-level language. &lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-14T06:33:40.000" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="638" PostTypeId="1" CreationDate="2017-06-14T06:47:43.477" Score="5" ViewCount="478" Body="&lt;p&gt;This year I am planning to shift from teaching Swing for graphics, to teaching JavaFX. As JavaFX ideally uses the MVC design pattern, I thought it would help students understand how to use JavaFX if they learnt about MVC. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While teaching the various controls, views and goodies in JavaFX is relatively trivial and straightforward, teaching MVC isn't so simple. So I am trying to intuitively explain MVC in the context of JavaFX. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What example applications in javaFX can I use to show them the MVC cycle?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/MVC-Process.svg/500px-MVC-Process.svg.png&quot; alt=&quot;cycle image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That image explains what the cycle is, but students have difficulty in seeing how it works in practice in a javaFX application. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-27T10:22:36.770" LastActivityDate="2017-06-27T10:22:36.770" Title="Introducing the MVC pattern along with JavaFX" Tags="|curriculum-design|lesson-ideas|java|mvc|" AnswerCount="2" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="639" PostTypeId="1" AcceptedAnswerId="640" CreationDate="2017-06-14T07:39:23.480" Score="7" ViewCount="910" Body="&lt;p&gt;While reviewing someone's code I found many problems, such as writing lots of loops instead of a single loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example let's take the case of basic square matrix multiplication. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both matrices can be created in a single loop (with user input). Instead people write one loop for each matrix, so they are unaware of Loop Optimization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another problem is creating lots of variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are very bad practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to can I teach them the importance of code optimization?&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="150" LastEditDate="2017-06-14T08:19:32.333" LastActivityDate="2017-07-24T10:16:30.020" Title="How to teach to write optimized code" Tags="|coding-style|" AnswerCount="5" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="640" PostTypeId="2" ParentId="639" CreationDate="2017-06-14T08:31:17.197" Score="3" Body="&lt;p&gt;In most cases, writing optimized code is actually easier to write (and to debug) than code which isn't optimized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to show them this, then you can show them a comparison between optimized code and their code. For the example you gave (this is pseudo-code):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# matrix creation, lets assume that they are 2x2 matrices.&#xA;firstMatrix := empty 2x2 array of doubles. &#xA;secondMatrix := empty 2x2 array of doubles. &#xA;for i from 0 to 4:&#xA;    # ask user to enter number for first matrix at (i/2,i%2).&quot;  (0,0) for the top-left value in the matrix&#xA;    print &quot;enter number for first matrix at (&quot; +(i / 2)+&quot;,&quot;+i % 2+&quot;).&quot;&#xA;    firstMatrix(i / 2, i % 2) = user_input()&#xA;    # ask user to enter number for second matrix at (i/2,i%2).&quot;  (0,0) for the top-left value in the matrix&#xA;    print &quot;enter number for second matrix at (&quot; +(i / 2)+&quot;,&quot;+i % 2+&quot;).&quot;&#xA;    secondMatrix(i / 2, i % 2) = user_input()&#xA;&#xA;# matrices now initialized&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Notice that the pseudo-code has only 1 loop that creates both matrices. So that's the optimized code, as you referred to it in your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, that code uses a minimal number of variables. So that's two for the price of one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then if you show them that writing code like that is shorter, and easier to understand, they'll start to write more optimized code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, you can point them to sites that show optimized code vs. non optimized code from the perspective of complexity, as well as readability. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-14T08:31:17.197" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="641" PostTypeId="2" ParentId="639" CreationDate="2017-06-14T09:22:10.383" Score="5" Body="&lt;p&gt;First kind of optimisation is taking things out, a 2017 GCSE exam question had something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;FOR i=1 to len (string)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Len()&lt;/code&gt; will be called every time you go round the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trick here is to help the student spot things that don't change from one iteration of the loop to another. They need to be moved out and stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This leads to another kind of optimization, &lt;em&gt;trading space for speed&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;length=Len(string)&#xA;for i=1 to length&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This uses up a small amount of space, but saves repeated calls to &lt;code&gt;Len()&lt;/code&gt;. The rule to teach is that if something 'expensive' to calculate is done repeatedly, then store it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another, teachable, but unlikely to be in exams is divide and conquer.&#xA;For instance working out $x^y$. It's tempting to write a loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;t=x&#xA;For i = 2 to y&#xA;    t = t * x&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However we can see that $x * x$, i.e. squaring it, takes the same time as any other multiplication, but gets us twice as far, so we get something like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while y &amp;gt; 1&#xA;  if y is even then x*x , y = y /2&#xA;  if x is odd then x*t , y = y-1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The most mathematically challenging is dodging non-linear effects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The time taken to sort a set of numbers goes up faster than the size, i.e. an array that is twice as big will take more than twice as long. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That means breaking it up into smaller arrays, sorting them and merging can turn a problem that grows as the square of the size of the array ($O(n^2)$), to one that's about $n \log_2{n}$ which is still non linear but a lot faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few rules of thumb:&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is easier to make correct code fast, than to fix buggy fast code.&lt;/li&gt;&#xA;&lt;li&gt;Premature optimization cause programmers to age prematurely.&lt;/li&gt;&#xA;&lt;li&gt;Better algorithms beat better processors.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="683" LastEditorUserId="27" LastEditDate="2017-06-14T19:25:20.270" LastActivityDate="2017-06-14T19:25:20.270" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="642" PostTypeId="2" ParentId="27" CreationDate="2017-06-14T09:43:29.563" Score="4" Body="&lt;p&gt;We need to separate the ideal of teaching a student how to be a fully competent assembly programmer, from the utility of using machine-level things like stacks and registers to help them build a model in their mind of what is going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For any given model of program execution, like flow charts or state diagrams, some students will take to it easily others will struggle. So I see the main issue is picking the model of execution that helps the student understand it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some things like pointers and arrays map directly to a &lt;em&gt;mechanical&lt;/em&gt; view of the program and its data. Function calls can be thought of as nested sheets of variables and some students are fine with that. Others find it too abstract and the mechanical view of function calls where addresses are pushed into a what is in effect an array called the stack is &lt;em&gt;easier&lt;/em&gt; to understand (for some) even though it has far more working parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me this is an example of deeper issue, in teaching we must use our judgement in choosing a high level description of some part of a programming which has fewer parts, each of which is harder to grasp, or to explain a mechanism of a larger number of smaller pars, each of which is easier to understand.&lt;/p&gt;&#xA;" OwnerUserId="683" LastEditorUserId="150" LastEditDate="2017-06-20T11:47:10.203" LastActivityDate="2017-06-20T11:47:10.203" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="643" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T09:47:13.447" Score="4" Body="&lt;p&gt;Some students (like me and my teenager) write slowly and almost unreadably, so nowadays it is common to allow them to use a keyboard for exams. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer based exams &lt;em&gt;can&lt;/em&gt; be made better than paper, in terms of drilling down to the edge of the students understanding based on their answers.&lt;/p&gt;&#xA;" OwnerUserId="683" LastActivityDate="2017-06-14T09:47:13.447" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="644" PostTypeId="2" ParentId="376" CreationDate="2017-06-14T09:54:13.543" Score="2" Body="&lt;h2&gt;Reference&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The existing answers seem to be missing the word &quot;reference&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem would be real if that &lt;code&gt;Node&amp;lt;T&amp;gt;&lt;/code&gt; attribute were (like in a C++ &lt;code&gt;struct&lt;/code&gt;) really a &quot;physical&quot; node, right in there. But it is not - it is just a reference pointing to an actual object somewhere else on the heap. Nothing special about that, the fact that it happens to be the same type as defined currently does not hurt at all since all references are just the same if you look at them closely (i.e., a placeholder).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Trees&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It may help to introduce the abstract tree data structure, without referencing (sic) any particular programming language.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Real world&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Also, real world examples are plentiful. Books regularly contain references to other books. Papers contain references to other papers. People know other people (have a &quot;reference&quot; in their brain) without having little people sitting inside their skull. And so on. &lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2017-06-14T11:10:08.343" LastActivityDate="2017-06-14T11:10:08.343" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="645" PostTypeId="2" ParentId="583" CreationDate="2017-06-14T10:11:26.410" Score="1" Body="&lt;p&gt;I like the analogy of sending a file by email. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When emailing a file you have two options:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) You can send an email with an attachment that someone can download and edit. Any changes they make wont affect you or anyone else unless they send it back. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Alternatively you can send a link to a file on Google Docs or some other cloud hosting provider. Any changes that the recipient makes will affect the sender and anyone else who looks at the file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Passing a parameter by reference is like emailing a link to a cloud-hosted file. You should do this if you're sending large amounts of data to avoid duplication. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Passing a parameter by value is like sending an email with an attachment. You should do this if a particular person / part of the program needs their own copy of the data / file in a way that doesn't interfere with anyone else / other parts of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both have their uses if you're aware of the implications. &lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-14T10:11:26.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="647" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T11:42:53.240" Score="8" Body="&lt;p&gt;When I went to college, we had 2 exams. A practical and a theory exam. The practical was on the computer and we could use all resources including the internet. The theory exam was basically what you describe a paper and pen closed book exam where we would either write code or find the error in some pre-written. There were also standard question as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see value in both methods. If I were teaching a course, I would probably do the same thing. Give a relatively hard practical exam (because students have all resources at their disposal) and also give them a written test. This will not only test their memory of syntax, but also give them a chance to really build something.&lt;/p&gt;&#xA;" OwnerUserId="691" LastActivityDate="2017-06-14T11:42:53.240" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="648" PostTypeId="2" ParentId="146" CreationDate="2017-06-14T12:30:07.017" Score="2" Body="&lt;p&gt;There are various analogies that work well, such as different kinds of vehicles. However I think you should quickly move towards discussing something that can actually be programmed. For example, you can discuss a system for tracking different types of employees. Game programming also fits the object-oriented paradigm well. You can first discuss the concepts of different types of game characters, and then go ahead and actually program it. (Perhaps initially students can use Greenfoot or a game maker program to create the game.)&lt;/p&gt;&#xA;" OwnerUserId="697" LastActivityDate="2017-06-14T12:30:07.017" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="649" PostTypeId="2" ParentId="46" CreationDate="2017-06-14T12:51:21.757" Score="8" Body="&lt;p&gt;I think it's really about breaking down the concepts into smaller pieces. First a student needs to understand recursion well, then they can understand memoization and dynamic programming. It's hard to just jump into  e.g. the knapsack problem without first having worked through simpler problems. After one gets practice with the basic concepts, dynamic programming isn't inherently so difficult. Here's a basic way one can break it down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Recursion&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As an alternative to loops&lt;/li&gt;&#xA;&lt;li&gt;Binary search&lt;/li&gt;&#xA;&lt;li&gt;Divide and conquer&lt;/li&gt;&#xA;&lt;li&gt;Backtracking&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Memoization&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Backtracking can be inefficient. Why not cache the results as you go through them?&lt;/li&gt;&#xA;&lt;li&gt;Simple problems, such as reaching a specific sum with certain coins.&lt;/li&gt;&#xA;&lt;li&gt;Can then consider harder problems, where a 2D array is required.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Dynamic programming (DP)&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Consider the coin sum problem again. How would one be solve it manually for the numbers 1 - 10? Can this &quot;build-up&quot; solution be put into code?&lt;/li&gt;&#xA;&lt;li&gt;Solving more advanced problems with dynamic programming instead of recursion/memoization.&lt;/li&gt;&#xA;&lt;li&gt;Identifying problems for DP approaches - Partially this comes with experience of solving a few different problems. But there's a standard pattern one can recognize - if a recursive solution can be used to get a solution very inefficiently (by repeatedly searching through the same subproblems), then memoization and DP can be used to make it more efficient. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(If you're interested, I also created a free &lt;a href=&quot;https://www.learneroo.com/modules/71/nodes/398&quot; rel=&quot;nofollow noreferrer&quot;&gt;tutorial on Recursion&lt;/a&gt; that breaks it down as above with programming challenges.)&lt;/p&gt;&#xA;" OwnerUserId="697" LastEditorUserId="697" LastEditDate="2017-06-18T11:26:02.353" LastActivityDate="2017-06-18T11:26:02.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="650" PostTypeId="1" AcceptedAnswerId="652" CreationDate="2017-06-14T14:39:51.450" Score="9" ViewCount="5554" Body="&lt;p&gt;For GCSE CS in the UK, students have to analyse, design, code, test and review a solution to a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the design section of their project, students have to plan out the algorithm for each part of their coded solution. They can choose to use pseudocode or flow charts as long as they show the logic and programming constructs that they'll use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://qualifications.pearson.com/en/qualifications/edexcel-gcses/computer-science-2016.coursematerials.html#filterQuery=category:Pearson-UK:Category%2FSpecification-and-sample-assessments&quot; rel=&quot;noreferrer&quot;&gt;Here's a link&lt;/a&gt; to a typical task that students have to complete&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question is this:&lt;/strong&gt; which is &lt;em&gt;better&lt;/em&gt; for planning a set of algorithms: pseudocode or flow charts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &lt;em&gt;better&lt;/em&gt; I mean faster, more accurate, easier to understand and/or gives a better chance of scoring higher marks.&lt;/p&gt;&#xA;" OwnerUserId="674" LastEditorUserId="104" LastEditDate="2017-06-14T15:47:27.323" LastActivityDate="2018-12-05T08:21:36.650" Title="Pseudocode or Flowcharts?" Tags="|algorithms|pseudo-code|flowcharts|" AnswerCount="5" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="651" PostTypeId="2" ParentId="622" CreationDate="2017-06-14T15:22:10.150" Score="4" Body="&lt;p&gt;One technique I use for sorting algorithms follows after &lt;a href=&quot;https://video.cs50.net/2016/fall/lectures/3?t=25m58s&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS50's demonstrations&lt;/a&gt; of the differences among bubble sort, selection sort, and insertion sort. I have 8 students line up in the following order:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;4 - 2 - 6 - 8 - 1 - 3 - 7 - 5&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here, 4 represents index 0 of an array of numbers I'd like to sort. I literally walk them through the algorithms, and they can see how much walking I have to do up and down the &quot;array&quot; in order to get it sorted. When it comes time to examine the code for these algorithms, I remark on the use of &lt;code&gt;for&lt;/code&gt; loops and how nested &lt;code&gt;for&lt;/code&gt; loops lead to $O(n^2)$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We compare the iterative approach with the recursive approach of merge sort (which certainly could be added to the &quot;walking&quot; demo), which goes back to something we discuss on Day 0 about linear v. binary search. I have students explore this &lt;a href=&quot;https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;visualization tool&lt;/a&gt;. There are also a number of videos on YouTube I draw from that compare algorithms sorting the same data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students also have to complete an assignment called &lt;a href=&quot;http://cdn.cs50.net/ap/1516/problems/3/4/3-4.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sort Race&lt;/a&gt;, which requires them to implement sorting algorithms and test them against data sets of varying types: reversed, already sorted, all sorted but one, and random. When they see algorithms take a significant amount of time on an already sorted list, they get why it's not the preferred solution and can then go back to the code to see what slows it down (and what doesn't slow down others in some cases).&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-14T15:22:10.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="652" PostTypeId="2" ParentId="650" CreationDate="2017-06-14T15:35:38.633" Score="10" Body="&lt;p&gt;Neither is always better, and both have their strengths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of scoring higher marks as a criteria for better is going to be unpredictable without knowing who is granting those marks. Someone who is heavily in favor of one style over the other may grant higher marks to low quality uses of their favored style than they would to high quality answers in the other style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of being &lt;em&gt;faster&lt;/em&gt; is both personal and situational. If someone is more comfortable using one over the other, they will usually be faster with that style, whichever it is. Some projects seem to do better in one style than they do in the other, even when the person doing the project is proficient in both styles. This is related to the strengths and weakness of each style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo code is more free-form, and allows one to concentrate on how to solve the problem or design the algorithm without having to choose the proper symbol to draw, or how to leave room for other branches on the chart. Pseudo code is also closer to the programming statements that will be used, eventually, to implement the algorithms, and can speed up the coding process. Being free-form makes it harder to spot missed checks on conditionals. It is also harder to see the overall pattern of a larger algorithm in pseudo code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flowcharts diagram the algorithm in a visual manner that makes the entire algorithm visible. When the logic gets complex, this visual representation enhances the ability to trace all branches and confirm that every conditional has been fully handled. It can also show cases where things are getting to complex, and need to be re-factored. The downside to this visual representation is that the creator frequently needs to interrupt their work on the algorithm to make adjustments to the chart, or to redraw sections that no longer fit on the page/screen they are using. These points are even greater detractors when the flowcharts are created on paper rather than in a program designed for flowcharts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The apparent speed gains from pseudo code's closeness to the final language can be offset by the error checking, and corrections needed, but not spotting logic error in the planning, which is one of the strengths of a flowchart. In addition, the &lt;em&gt;larger picture&lt;/em&gt; view provided by the flowchart that can lead to re-factoring, can lead to more compact and efficient code, which is a &lt;em&gt;gain&lt;/em&gt; every time the program is executed, even if it took longer to code the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally the students should be taught each method, using exercises that are both a good fit and a bad fit for that method. After leaning the two methods they should have exercises that help them learn how to select the proper one for a given situation. While it may not be appropriate for the classroom, often a programmer on a larger project will use both methods: the flowchart to see the whole picture, and plan the program's overall flow, and pseudo code for many of sections seem to be compact or straight forward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line is that the best one to choose is the one that gets the job done right the first time. A fast solution, which then needs lots of corrections is not so fast after all, and a pretty &lt;em&gt;picture&lt;/em&gt; of the program can still have logic errors if the programmer is not looking at the real problem the correct way.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-14T15:35:38.633" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="654" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T16:37:22.997" Score="24" Body="&lt;p&gt;Although most of the answers here seem to be in agreement that coding tests should be done on paper, I would like to offer a different opinion. Any test that includes coding would benefit the student, and most likely the teacher, if it was done on a computer with an IDE for the appropriate language rather than on paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the question contains the tags for High School and Undergrad, I will focus on tests which are common in lower level programming classes which are often focused on a single language and contain significant amounts of coding based questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a few of reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Writing is messy&lt;/strong&gt; - Not everyone has the best penmanship skills. This is not just an issue of readability, on a paper test space is often a premium and so creates an issue for anyone who is not able to write small enough to fit the entire solution in the space provided. I have had at least a few instances I can recall where I miscalculated the number of rows my solution would need, prompting me to either erase parts of my code to make the writing more condensed, or else doing an awkward scrawl in the corner to fit the last line. This could be solved by providing sufficient space for the question, but since this is completely reliant on the instructor's assumptions about the intended solution and the size of the writing this assumption rarely hits the mark.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Writing is slow&lt;/strong&gt; - It's been a while since I sat down and wrote anything of any significant length, but it's always painfully apparent whenever I do that my typing speed has far outpaced my ability to write. Not to mention that after a few pages, my hand starts to cramp from the unusual strain. In the age of smart phones and PCs, I imagine this is representative of the majority of the population, and should be moreso for CS focused individuals. Tests are timed. Forcing a student to use a slower method of recording information adds additional strain which can resolve itself in many different ways. Typos, bad naming practices, less readable code, take your pick. Worse, it creates a sense of pressure, where even if you know exactly what you need to write for a perfect answer you are limited by how fast you can get it down on the paper.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Writing is not representative of their past experience in the course&lt;/strong&gt; - I will lean on my undergrad teaching assistant experience here to say that students rarely have to write any code on paper throughout the course, except for tests. All homework assignments are submitted online to ensure the submission timestamp matches the due date. Instructor notes that include code are available online to streamline the lecture process. All coding is done on the computers in the lab portion of the course. Major coding assignments are also done on the computer, as the first check(and a decent chunk of the grade) is &quot;Does it run?&quot;. And then they get to the test and suddenly all those skills and muscle memory they've built up over the course of the semester is not directly applicable to the problem at hand. There are too many things that IDEs simplify that simply go unnoticed until you have to do without. And while some may say that that is exactly how it should be during the learning process...&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Writing is not representative of real world experience&lt;/strong&gt; - I can happily say that besides a couple of interviews, I have not had to write out my code out on a sheet of paper. I have used a white board on occasion to brainstorm ideas or write out chunks of code for others, but I was not required to present a solution that was polished enough to work &quot;as is&quot; if typed into a computer. Because it's not the syntax that's at the crux of the job. It's the ability to reason through and come up with a solution to a particular problem within the bounds of the programming language(s) you are using. The syntax is secondary. It's why APIs, and other manuals exist out there. It is not your job to memorize the names of the methods of all the libraries that are available to you. All you need is to know which does what, and how to best leverage them to achieve the solution you are trying to implement. Unfortunately, written tests treat syntax as part of the grade. And if you can't recall the name of that one conversion method part of the Integer class? That will usually cost you quite the chunk of points. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, in conclusion, I believe there are significant downsides to forcing students to take tests that require coding solutions in the written format. Paper tests enforce memorization and a focus on the syntax of the language rather than concentrating on the problem solving and abstract thinking that is at the heart of programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This answer is based on my experience with the US educational system, and so may not be directly applicable to other countries.&lt;/p&gt;&#xA;" OwnerUserId="715" LastActivityDate="2017-06-14T16:37:22.997" CommentCount="14" ContentLicense="CC BY-SA 3.0" />
  <row Id="655" PostTypeId="2" ParentId="17" CreationDate="2017-06-14T16:58:11.397" Score="7" Body="&lt;p&gt;I've used Carl Burch's analogy several times&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Somebody is a Jew if she is Abraham's wife Sarah, or if his or her mother is a Jew. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.cs.cmu.edu/~cburch/survey/recurse/index.html&quot; rel=&quot;noreferrer&quot;&gt;He has a nice set of pages at CMU&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="723" LastActivityDate="2017-06-14T16:58:11.397" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="656" PostTypeId="2" ParentId="622" CreationDate="2017-06-14T17:01:10.710" Score="1" Body="&lt;p&gt;Just like @Peter, I also begin computational complexity when I introduce sorting and searching.  I touch back upon it at various times throughout the year.&lt;/p&gt;&#xA;&lt;p&gt;(Even though the topic is not part of the AP Computer Science A curriculum, I present the concepts within that course.)&lt;/p&gt;&#xA;&lt;p&gt;It's important to note that we don't go into great depth; my main learning target is to give them an intuitive sense of constant, logarithmic, linear, and quadratic growth.&lt;/p&gt;&#xA;&lt;p&gt;During my first sorts/searches lecture, I have them figure out the &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\Omega$&lt;/span&gt;, and &lt;span class=&quot;math-container&quot;&gt;$\Theta$&lt;/span&gt; (where applicable) for every sort I present. We do, in order:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Linear search&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Binary search&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I use these two to introduce the concept of algorithmic efficiency and those three functions, and the shortcuts we can take when we figure them out &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Then they practice on the following sorts:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bubble Sort&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Insertion Sort&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Selection Sort&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bogosort&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Later on, when we do a maze solver, I touch on algorithmic complexity again, and yet again when we look at &lt;strong&gt;mergesort&lt;/strong&gt; (after we have done recursion).  And yet again when we talk about adding and removing elements from the front and back of linked lists and array lists.  (There is actually quite a bit of practice in this exercise)&lt;/p&gt;&#xA;&lt;p&gt;I have found that, with one lecture and a bit of practice spread throughout the year, the students seem to pick up the concept well.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-02-08T18:22:46.220" LastActivityDate="2022-02-08T18:22:46.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="657" PostTypeId="5" CreationDate="2017-06-14T17:09:02.713" Score="0" Body="&lt;p&gt;The MVC (or Model-View-Controller) design pattern is used for implementing a user interface. An application following this design is divided into three components which interact with one another in a cycle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first component is the &lt;em&gt;Model&lt;/em&gt;. The model represents the core of the application. It stores data, preforms logic operations and does not depend on the user input. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The model receives information from the second component: The &lt;em&gt;Controller&lt;/em&gt;. The Controller converts the user input and information from the user interface to information needed by the Model. It executes changes in the information stored in the Model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Controller is used by the user, in response to changes made by the Model in the third component: The &lt;em&gt;View&lt;/em&gt;. The View is the interface itself. Updated by the Model, which is changed by the Controller, which is used by the user in response to changes in the View. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This cycle is how the MVC design pattern works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-14T17:27:00.773" LastActivityDate="2017-06-14T17:27:00.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="658" PostTypeId="4" CreationDate="2017-06-14T17:09:02.713" Score="0" Body="Questions related to teaching the Model-View-Controller design pattern. Use this tag when you have a question about teaching various aspects of the MVC design pattern." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-14T17:27:03.657" LastActivityDate="2017-06-14T17:27:03.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="659" PostTypeId="2" ParentId="19" CreationDate="2017-06-14T17:23:57.967" Score="-1" Body="&lt;p&gt;Bret Victor offers some excellent criticism of specifically Processing (and Javascript) as a language/environment for learning to program, in his wonderful (like almost everything he produces) &lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learnable Programming&lt;/a&gt; essay, with respect to things like readability, making computation visible, decomposition and recomposition and more. It's a must-read!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;JavaScript and Processing are poorly-designed languages that support&#xA;  weak ways of thinking, and ignore decades of learning about learning.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="646" LastActivityDate="2017-06-14T17:23:57.967" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="660" PostTypeId="1" AcceptedAnswerId="684" CreationDate="2017-06-14T17:46:53.653" Score="4" ViewCount="670" Body="&lt;p&gt;I have been asked to teach a single half hour lesson at a new school for an interview. The topic I was given was &quot;something on computational thinking.&quot; The students are 13 years old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first half of the lesson the students wouldn't be using computer, and for the second half they would be on a computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not been given any objectives for this lesson (WALT or WILF).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part seems easy, I plan on using something from &lt;a href=&quot;http://csunplugged.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://csunplugged.org&lt;/a&gt;. However the 2nd part seems harder. In the past I have connected it to programming, but the class has little programming experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do in the second half of my lesson, where the students have access to computers? I'd prefer to avoid a programming task because the students have no background in it and I only have 30 minutes.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="58" LastEditDate="2017-06-14T18:48:33.950" LastActivityDate="2017-06-15T20:32:08.463" Title="Interview lesson on &quot;Computational Thinking&quot;" Tags="|lesson-ideas|computational-thinking|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="661" PostTypeId="5" CreationDate="2017-06-14T17:49:45.200" Score="0" Body="&lt;p&gt;Links for new, add a description&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Computational_thinking&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Computational_thinking&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://barefootcas.org.uk/barefoot-primary-computing-resources/concepts/computational-thinking/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://barefootcas.org.uk/barefoot-primary-computing-resources/concepts/computational-thinking/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-14T18:15:14.293" LastActivityDate="2017-06-14T18:15:14.293" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="662" PostTypeId="4" CreationDate="2017-06-14T17:49:45.200" Score="0" Body="Computational thinking is about looking at a problem in a way that a computer can help us to solve it." OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-14T18:15:28.650" LastActivityDate="2017-06-14T18:15:28.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="663" PostTypeId="2" ParentId="17" CreationDate="2017-06-14T18:35:17.247" Score="4" Body="&lt;p&gt;I think a computational joke is in order to help students get started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All numbers are interesting, for a function $F()$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$F(0)$ is interesting because it's the first number.&#xA;$F(F(0))$ i.e. 1 is interesting because it's either interesting or if not interesting is the first non-interesting number and therefore interesting. $$F(F(F(0)))$$ is interesting because...&lt;/p&gt;&#xA;" OwnerUserId="683" LastEditorUserId="58" LastEditDate="2017-06-14T19:13:50.963" LastActivityDate="2017-06-14T19:13:50.963" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="664" PostTypeId="2" ParentId="180" CreationDate="2017-06-14T18:52:17.167" Score="2" Body="&lt;p&gt;I enjoy computing history and some of the mankier bits of Computing history are partly my fault, I'm even holding a dinner in the City to mark the 50th anniversary of Real Time Computing &lt;a href=&quot;https://www.eventbrite.co.uk/e/real-time-computing-50-years-on-and-50-years-hence-tickets-32702374683&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.eventbrite.co.uk/e/real-time-computing-50-years-on-and-50-years-hence-tickets-32702374683&lt;/a&gt;, but it's a hobby, not a subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, there are no good texts to provide the 'common thread' that some people desire. Some books do incidents well, but I've never seen a thematic text of any value, some are interesting, but mostly because they are wrong in novel ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, to be done properly it is astonishingly hard. I've written IT history professionally and you find yourself explaining the economics of chip fabrication in the context of Agile vs Waterfall software development methodologies. Unless you can do this, today and without further research and not scratch your head on why they are related, you aren't qualified. I don't think I'm qualified either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, it's a cop out. Teaching logic, applying set theory, expounding of floating point, the legalities of licencing, O(N) notation, and why in the name of god does VB do &lt;em&gt;that&lt;/em&gt; is &lt;em&gt;hard&lt;/em&gt;. History is comfortable and easy. There are no nasty error messages on the screen saying you are wrong, the kids understand stories they are told about heroes and everyone goes home happy. But not educated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computing history's big. Computing is a big thing that has been big for a long time. All you really can teach is a few anecdotes, fine but that's not a theme. There are themes, but they require a huge level of investment in time by a teacher if they are to avoid merely spouting corporate propaganda or uncritically propagating the heroic myths of Hopper and Lovelace. Imagine yourself pointing out that Hopper helped fight the Vietnam war and Lovelace was a drug addict who helped on a colossal failed government funded computer project. If you're not pointing out the bad as well as the good, then why not just shoe them Disney's Frozen instead ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I enjoy history, I even write some, but don't pretend it is useful &lt;em&gt;to the student&lt;/em&gt; and that has to be the measure of any structure &lt;/p&gt;&#xA;" OwnerUserId="683" LastActivityDate="2017-06-14T18:52:17.167" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="665" PostTypeId="2" ParentId="212" CreationDate="2017-06-14T19:10:18.910" Score="1" Body="&lt;p&gt;A bigger question I have experienced is: Should we start with Procedural and then Object Oriented or the other way around? (We long decided to start with Console and then go to Windows later, because jumping straight in to Windows is like throwing them in the deep end of a pool with no water in it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Starting with Object Oriented is just too weird and abstract. It does not teach people how computers work. So, they must learn some procedural concepts (decisions and loops) first. Once they can actually write some kind of program that takes some thought and they can use methods and parameters, then you can introduce Classes. (The pool that has water in it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To answer your question&lt;/strong&gt;, we have settled on C# as the most likely thing they will use in the workplace (along with a dose of SQL and database concepts). As a former C and assembly programmer, I explain all along how it all grew out of C which grew out of earlier languages. I make sure they have some idea of the low level functioning of the computer all the way through. Without that, what in the hello-world do they really know?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we do get around to Windows, I can't resist showing them the canonical message-loop program from Petzold's book in 1990. Yes, C#.Net is a wonderful thing! At the end of the curriculum we invert everything they have learned by teaching them ASP.Net: no persistent state, no Main(), no nothing familiar... (Aaaaaaahhhhh! The pool on a spaceship with no bottom at all.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is very effective.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-06-14T19:23:47.780" LastActivityDate="2017-06-14T19:23:47.780" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="666" PostTypeId="1" AcceptedAnswerId="4295" CreationDate="2017-06-14T19:54:40.297" Score="8" ViewCount="2724" Body="&lt;p&gt;I'm familiar with two schools of thinking for approaching an introductory level class in an object oriented language: objects-late, and objects-early.  In objects-late, you teach various procedural aspects (variables, loops, boolean manipulations, etc) before you delve into objects at all, and then use objects as a way to organize larger chunks of code.&lt;/p&gt;&#xA;&lt;p&gt;In objects-early, you begin with the object-oriented paradigm, and then delve into method construction, and finally into the procedural aspects of coding that way.&lt;/p&gt;&#xA;&lt;p&gt;I truly don't understand this second approach or its merits.  What are potential benefits of beginning with objects, and how can you structure the early parts of a course in order to even permit this?&lt;/p&gt;&#xA;&lt;h1&gt;Important note&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;I know that Buffy's answer (the one that I accepted) is quite long, but it is also one of the most comprehensive and insightful things I have ever read on StackExchange.  If you are interested in this question, his answer, while long, is worth the time to read and absorb. Sometimes, life brings us unexpectedly beautiful things, and the best we can do is appreciate them and be grateful.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-05T18:03:27.660" Title="Justification for an objects-early approach to introductory programming" Tags="|object-oriented-paradigm|objects-first|" AnswerCount="9" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="667" PostTypeId="2" ParentId="666" CreationDate="2017-06-14T20:13:55.340" Score="4" Body="&lt;p&gt;I looked into this very issue when I researched different books/curricula to consider integrating into my AP CS A course. One of the books I discovered was &lt;em&gt;Objects First with BlueJ&lt;/em&gt; (&lt;a href=&quot;https://www.bluej.org/objects-first/&quot; rel=&quot;nofollow noreferrer&quot;&gt;book website&lt;/a&gt;). Here is an excerpt from their justification:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;One of the reasons for choosing BlueJ was that it allows an approach&#xA;  where teachers truly deal with the important concepts first. 'Objects&#xA;  early' has been a battle cry for many textbook authors and teachers&#xA;  for some time. Unfortunately, the Java language does not make this&#xA;  noble goal very easy. Numerous hurdles of syntax and detail have to be&#xA;  overcome before the first experience with a living object arises. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;With BlueJ, this is not a problem. A student can create an object and&#xA;  call its methods as the very first activity! Because users can create&#xA;  and interact with objects directly, concepts such as classes, objects,&#xA;  methods and parameters can easily be discussed in a concrete manner&#xA;  before looking at the first line of Java syntax.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can access the first two chapters of the book &lt;a href=&quot;https://www.bluej.org/objects-first/evaluation.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; as an evaluation of the approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you explore those chapters, you'll see that there is a lot of starter code provided for students. (Indeed, you can download the code for all the projects from the website for your perusal.) That is the key for how you structure a course this way. Students have to have pre-baked programs that they can interact with. BlueJ as an IDE makes this extremely easy with its graphical interface for creating objects and calling methods. If Eclipse were your IDE of choice (or if you preferred to compile via CLI), then this wouldn't work nearly as well if at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea it seems is that students can start to understand methods, return values, parameters, etc. by exploring a fully functioning example a program that follows the principles of OOP. Additionally, all syntax is taught in the context of classes and objects. That said, it is dependent on the choice of IDE and the ability for students to work with already-completed programs.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-14T20:13:55.340" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="668" PostTypeId="2" ParentId="638" CreationDate="2017-06-14T20:32:48.487" Score="3" Body="&lt;p&gt;I'd use the following analogy connecting MVC to a teacher's gradebook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the context of MVC, the actual gradebook with a complete record of every student's grade on each assignment is your &lt;code&gt;Model&lt;/code&gt;. Students may have their individual grade rendered in the &lt;code&gt;View&lt;/code&gt;, but they would never have access to the entire database (for obvious reasons). A &lt;code&gt;Controller&lt;/code&gt;, say in a school's learning management system, would select the appropriate grades to display to the specific student. A student could then choose only to render her quizzes or her homework assignments to focus on specifically those grades. In that instance a user action in the &lt;code&gt;View&lt;/code&gt;, through say a dropdown, would modify what appears thanks to logic in the &lt;code&gt;Controller&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with all analogies, it is an imperfect comparison. However, this general concept will be something (nearly) all students are familiar with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The iTunes U course on Developing iOS 10 Apps with Swift has a great lecture on MVC. The lecture video and slides are available &lt;a href=&quot;https://itunes.apple.com/us/course/developing-ios-10-apps-with-swift/id1198467120&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image below from Apple also gives a succinct summary of the relationships among the three components.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/VlPKo.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/VlPKo.png&quot; alt=&quot;MVC Diagram&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-14T20:32:48.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="669" PostTypeId="2" ParentId="272" CreationDate="2017-06-14T20:55:34.950" Score="0" Body="&lt;p&gt;On CodeHS we have a very streamlined system for submitting and managing student work. You can use our courses, or if you want, create your own assignments and starter code. The students can run the Java code all in the web browser (or if you'd like in your own IDE), and then when they click submit it goes into your grading queue. No need for folders, emails, printing, scp, dropbox, it all just works. You can easily run it and test it, you can also create your own graders if you'd like. There's also an easy to use grading queue for doing code review on each problem which can be customized how you like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think in a lot of cases it is helpful to provide students with some basic starter code, but that can vary depending on what type of assignment you are doing.&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2017-06-14T20:55:34.950" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="670" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T21:02:23.333" Score="14" Body="&lt;p&gt;As a student who went through 4 years of undergraduate in computer science, writing &lt;strong&gt;all&lt;/strong&gt; my exams on paper, I do think there are advantages to a paper exam.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you need an IDE to tell you the things that are missing, then do you &lt;em&gt;really&lt;/em&gt; know your material and syntax?.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Having an environment to test your code over and over isn't really practical for examination purposes or the real world. You should understand the obvious cases and edge cases while writing your solution.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As a lot has already mentioned, CS is not &lt;em&gt;purely&lt;/em&gt; coding. From personal experience, I would say my undergrad was 75/25 split between theory/coding. Anyone can code, but learning the theory behind algorithms and best practices is why we are &lt;strong&gt;computer scientists.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Continuing on the point above, courses with heavy programming involved usually had a 60/40 split on grading where 60% weight is from code and only 40% from paper exam.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is &lt;strong&gt;a lot&lt;/strong&gt; easier to ask high level questions such as draw a 2-3-4 Tree, how a certain step in heapify or graph theory looks on paper than on a computer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To address your point of mistakes being too difficult to detect even with a computer, then it is even harder on paper. No, as a graduate and TA, I can tell you when I'm grading first/second year exams, I can clearly see if they do not understand a certain subject or leaving out edge cases. We &lt;strong&gt;do not&lt;/strong&gt; deduct marks for brace brackets, semi-colons, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In conclusion, I think you are mixing the concept of coding challenges such as ones from &lt;a href=&quot;https://leetcode.com&quot; rel=&quot;noreferrer&quot;&gt;Leet Code&lt;/a&gt; where it is purely coding based, with a discipline that incorporate a lot of theory and algorithms &lt;/p&gt;&#xA;" OwnerUserId="747" LastEditorUserId="58" LastEditDate="2017-06-14T21:23:44.623" LastActivityDate="2017-06-14T21:23:44.623" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="671" PostTypeId="2" ParentId="666" CreationDate="2017-06-14T21:05:20.647" Score="7" Body="&lt;p&gt;Students latch on to the familiar which is usually what they're introduced to first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So... teach objects first and unless you work hard at it, the kids will tend to use an OOP hammer on every problem regardlessof appropriateness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach procedural / language constructs first and the kids will tend to write HUGE main functions and static methods if left to their own devices (assuming Java).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The truth is that you can do it either way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've done objects first, start with a simple object - maybe a &quot;greeter&quot; that returns as string that says hello:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Greeter{&#xA;  public String returnGreeting(){&#xA;   return &quot;Hello&quot;;&#xA;   }&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then you can add an instance variable, constructor, setters etc. to build up the tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then add language constructs in your classes.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-14T21:05:20.647" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="672" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T21:10:26.247" Score="10" Body="&lt;p&gt;Having taken and TA'd for classes which use both approaches, I would have to say that it all depends on what you want to see from the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the side of having paper exams, it has already been mentioned that CS!=Programming.  If you're trying to test concepts of CS, there doesn't have to be a single line of code written on the exam, and a paper exam will probably give you a lot more insight into how a student is doing on comprehension than allowing them to use an IDE during an exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that vein, you can ask:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;multiple-choice questions&lt;/strong&gt; (hard to write well, but can be extremely useful in large classroom situations)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;open-ended&lt;/strong&gt; &quot;explain to me how you would think about this&quot; questions (some people mentioned handwriting being a problem, but in grading 100's of students' papers, I never found one I really had a hard time reading)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;human-computer&lt;/strong&gt; &quot;what would the state of the program be after X iterations&quot; questions (tests recall knowledge, which is sometimes all you need to tell how well they're picking up a specific language)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;fill-in-the-blanks in code&lt;/strong&gt;, e.g. &quot;I'm trying to write a summation program; what needs to go in the blanks for the program to compile and run correctly?&quot; (allows you to test specifics of syntax knowledge without worrying whether they're just re-enacting Ben's scenario)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On the side of computer exams, I've had a few of those too, and I think they can be useful in making sure your programming assignments actually taught what you meant to teach.  I had a Data Structures professor who gave us so much sample code &quot;to get us started&quot; on our homework that most of the class failed and had to retake the final exam which was done on a computer, in an IDE.  The class had gotten used to waiting for the &quot;starter code&quot; before starting their homework, so when the final exam asked us to write a stack instead of the linked-list we had written for the homework, most of them were stumped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to have &quot;programming&quot; exams (possibly to test the sort of behavior I just mentioned), then I would suggest that comments should count for a large portion of the grade.  This does two things: it allows students who are not quite as fast at churning out code to explain their solution, and it makes it so that that inevitable debugging nightmare that you know to look for but they don't doesn't have to completely tank their grade.  It also gets them in the habit of commenting in code, so please, for the sake of every professional developer out there, &lt;em&gt;grade their comments!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, it's a lot harder to write, and to grade, a &quot;program this now&quot; type of test that actually tests the concepts of CS than a paper one.  As I said, I have one very salient exception to that rule in my experience, and if you're worried about academic dishonesty, programming tests on a computer that can't access the Internet are sadly about the only thing you can do.  But if you have the option of a paper exam, it's usually a better fit for the subject.&lt;/p&gt;&#xA;" OwnerUserId="744" LastActivityDate="2017-06-14T21:10:26.247" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="673" PostTypeId="2" ParentId="339" CreationDate="2017-06-14T21:11:07.277" Score="1" Body="&lt;h1&gt;Pseudocode&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This may not be the best solution but I thought I'd give it a go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently undergoing (albeit painfully) a Computer Science GCSE. I really enjoy the coding and the computer side of it, compared to things such as planning and testing. Especially documenting tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, recently we've had a flurry of lessons where only the teacher has logged onto the computer because we were learning to write &lt;strong&gt;pseudocode&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when our teacher told us that we were doing this, a collective groan rose from the class. No-one wants to be writing out how to do basic tasks, right? And yet, having now done 3 or 4 lessons on it, I feel as though it has really improved the way I look at a task and break it down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I think teaching pseudocode can be a very helpful thing and a perfect opportunity to do so would be... you guessed it, when the computers are down!&lt;/p&gt;&#xA;" OwnerUserId="749" LastEditorUserId="58" LastEditDate="2017-06-16T18:46:54.123" LastActivityDate="2017-06-16T18:46:54.123" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="674" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T21:22:56.900" Score="12" Body="&lt;p&gt;Maybe some complementary points to what as already been said (as a CS assistant professor, giving both theoretical and practical courses).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Even for practical courses (those which involve coding), writing code on paper is good. The point is &lt;strong&gt;not&lt;/strong&gt; to fill your page with boilerplate code (and I cannot stress that enough). Writing sequence of Java imports or mystical incantations to setup say a Map/Reduce transformation in Hadoop on paper makes absolutely zero sense. However, being able to write correct application logic and being aware of implementation aspects (some object can actually be null, problems with side-effects...) is a must. The hard part (which is actually an art I have not fully mastered yet), is to make exams that tests theses aspects without the noise and being of course lenient about small syntactic mistakes (missing ; capitalization and so on). At some level, what I want to test is this: &quot;Here is a problem (from which I have abstracted the noise for you). Can you solve it with programming, without having to compile it 10 times until there are no more syntax/type errors and without running it a 100 times with printfs all around to see why this does not work ?&quot;. Because if the student can do that, then I know (s)he will be able to take it to the next step and generalize it to harder problems or use it in other contexts. If a student takes whatever is in the lecture notes, paste it in an IDE and fiddle with it until it somehow works, I cannot make the same guarantee. Also, you cannot copy/paste on paper, which forces you to think about your code and write it in a terser manner. I have to initialize an array. Ok I'll write a loop rather than cut/and paste 25 lines and change each one.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Conversely, even for theoretical classes (complexity/calculability, type-systems, logic , ...), I think it is good to have a bit of coding. Write a lambda calculus interpreter. A small (even naive) SMT solver. Code several sorting algorithms and try to see what constants are hidden inside your big O. Is the impact of sorting in place noticeable without resorting to having to copy your data? In highly advanced courses (in particular type systems and logic) you only &lt;em&gt;really&lt;/em&gt; see what's going on when you can test large examples. Pen and paper only take you so far.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="746" LastEditorUserId="27" LastEditDate="2017-06-14T21:25:39.473" LastActivityDate="2017-06-14T21:25:39.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="675" PostTypeId="2" ParentId="272" CreationDate="2017-06-14T21:37:42.420" Score="1" Body="&lt;p&gt;I wrote a series of posts on how I use raw GitHub with my classes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cestlaz.github.io/posts/sigcse-2017-github-1/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part 1&lt;/a&gt; - Introducing your students to GitHub by using it as a method for distributing code to your class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cestlaz.github.io/posts/sigcse-2017-github-2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part 2&lt;/a&gt; - Having students submit homework and small assignments using GitHub - this has them adding content to GitHub and sets the stage to teach them about &quot;playing well with others.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cestlaz.github.io/posts/sigcse-2017-github-3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part 3&lt;/a&gt; - Taking the kids from working on solo projects to collaborating with classmates and leveraging things like version history&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://cestlaz.github.io/posts/sigcse-2017-github-4/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part 4&lt;/a&gt; - Talks about some of the pedagogical benefits I've discovered while working with Git and GitHub with my classes.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="237" LastEditDate="2017-06-15T12:59:28.850" LastActivityDate="2017-06-15T12:59:28.850" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="676" PostTypeId="2" ParentId="666" CreationDate="2017-06-14T21:40:29.797" Score="4" Body="&lt;p&gt;Objects can be more intuitive than procedural programming for children.  Think about the huge success that &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MIT's Scratch&lt;/a&gt; has had in introducing programming concepts at all ages.  To pick up the basics, all you need is an understanding that &quot;if I tell the sprite to move, it will move; if I tell it to speak, it will speak; if I tell a second sprite to move, the first one won't.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On your question about &quot;how would you restructure a class&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first Java teacher started by telling us about how we could create a Frog in Java.  He then went on to tell us that we could give the Frog a variable so that we knew how many legs the Frog had.  Then he talked about creating a Frog named Kermit who has 2 legs, and a Frog named Bob who has 4 legs (assumably Bob is not an anthropomorphic Frog).  He talked about keeping track of where the Frog is in space, and then adding methods that allow the Frog to jump to other places.  We slowly built up the idea that an object can have state, identity, and behavior, without having to resort to hardly any procedural code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's actually pretty easy to teach this way, as long as you remember that you haven't taught things like variables and flow of control, and you don't assume the students know more than you've taught them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mike is definitely right about the &quot;one size fits all&quot; hammer problem, although I'm not sure when an OOP solution isn't appropriate. ;-)&lt;/p&gt;&#xA;" OwnerUserId="744" LastActivityDate="2017-06-14T21:40:29.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="677" PostTypeId="2" ParentId="130" CreationDate="2017-06-14T21:54:24.267" Score="2" Body="&lt;p&gt;Sometimes early students will just have trouble with this. there doesn't have to be pressure to get this all right at the beginning. by the second semester maybe, but at the beginning they should mainly just focus on writing code that works. but you can model good indentation to show them how much cleaer it is and they should pick it up naturally over time. &lt;/p&gt;&#xA;" OwnerUserId="631" LastActivityDate="2017-06-14T21:54:24.267" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="678" PostTypeId="2" ParentId="628" CreationDate="2017-06-14T23:49:50.033" Score="6" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;If some mistakes are difficult enough to not be noticeable while writing&lt;br&gt;&#xA;   code on a computer, they are nearly impossible to be found while writing &#xA;   code on paper&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't see how this follows in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It depends, of course, on what the test is testing: if the test is about finding the &lt;em&gt;one&lt;/em&gt; incorrect value in a 2000-entry trig table I would expect a computer would be of help, but that's not what a CS test usually looks like, is it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I expect a good test would in general measure the student's understanding of a topic, not their ability to mechanically carry out repetitive tasks.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So, my question is, are there any advantages in doing written tests on&#xA;  paper, and is this the best approach?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am going to take a shot in the dark here and make an assumption about your question: your question is about &lt;em&gt;programming&lt;/em&gt; and the &quot;test&quot; is writing a program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under that assumption I would answer with a loud &quot;yes&quot; - you'd want students to be able to &lt;em&gt;reason&lt;/em&gt; about programs and convince themselves of the soundness of their reasoning, not just go by trial and error until they converge to a working program by sheer chance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's, after all, no way to program in real life.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I would &lt;em&gt;also&lt;/em&gt; have a lab test to measure the student's ability to actually compile and run a program and/or launch a debugger - after all, once you've produced a correct program you still need to compile it to be useful...&lt;/p&gt;&#xA;" OwnerUserId="757" LastActivityDate="2017-06-14T23:49:50.033" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="679" PostTypeId="2" ParentId="130" CreationDate="2017-06-15T00:01:40.400" Score="9" Body="&lt;p&gt;Lots of good comments here.  Showing bad code and asking them to understand it will particularly drive the point home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've taken to having coding standards in my courses.  No one followed them until there were points attached, of course.  Initially, it was protect my eyesight, but it helps the students write clearer code.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have a couple exercises I do when students ask what the big deal is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Exercise 1:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Grab a book off my shelf in the office.&lt;/li&gt;&#xA;&lt;li&gt;Open the book and hold it in front of them and count backwards from 3.  &lt;/li&gt;&#xA;&lt;li&gt;Close the book and take in their bewildered look.&lt;/li&gt;&#xA;&lt;li&gt;Ask them what they can tell me about what was on the pages of the&#xA;book.  Often they'll say &quot;nothing,&quot; but then I ask, were there any figures, sections, pragraphs?&lt;/li&gt;&#xA;&lt;li&gt;They'll start to say things like &quot;there was a graph on the right hand page at the top, and ... 2 subsections.&quot;  Me:  Did the graph have a legend or title?  Them:  &quot;Yes, sure, both.&quot;  Were there subsubsections?  Were they just single paragraphs?  You do need to a pick a book that isn't just pages of text, but most academic books work fine.  (You can cheat and look at the pages first to pick something that isn't a 2-page paragraph.)&lt;/li&gt;&#xA;&lt;li&gt;Then I ask how they knew all this in just a few seconds.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The take away is:  We use physical formatting to help the reader understand the structure of a document at a subconscious level --- you don't have to read it, and you can identify the components and key relationships almost instantly.  Then you can use your intellectual effort to understand what's there rather than &quot;Is this one of the items that goes with that thing?&quot;  Publishers have figured these things out and honed their skills for centuries.  Alas, self publishing and the web means there are a lot of poorly designed documents around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For programming, you don't want anyone to use their conscious thought to answer easy things like &quot;Is this statement controlled by a test in a conditional?  In a loop?  Is this a function call or a special syntactic thing?  How many arguments are there for this function?&quot;  There are enough things you'll have to think hard about, and it's inconsiderate to make your reader spend their valuable time and energy on mundane items like this.  That reader might be you in 4 or 5 days even, when you've found a bug and can't quite remember what's going on in this part of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Exercise 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Print out some code and then put it some distance away.  E. g., stand it up on the marker tray of a white board and back up until the text is too blurry to read.  I used to say 10 feet, but my eyes are bad enough now I can just take my glasses off.  Just ask the students when they can't really read most of the words.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the code is formatted in a way that is considerate of a human reader, we can tell how many functions there are, which functions have loops, which have nested conditionals, all without reading any text at all.  We can even pick out the more complicated functions and sometimes even spot opportunities for refactoring based on common shapes!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Side note:  I had a blind student once who was a fantastic programmer.  I hired him as a TA, and he was superb at that, too.  He was once hanging out around my office when I was talking to a student about these things, and he blurted out &quot;I don't know why you people need that stuff!  It's just 'space, space, space, space,...' and it's annoying.&quot;  It's true:  he takes in programs in a necessarily linear way, and he makes structures in his head that I cannot fathom.  I program, and teach my seeing students to program, by drawing lots of pictures.  I have no idea what he has in his mind, but it sure works!  I wish I knew how he did it.&lt;/p&gt;&#xA;" OwnerUserId="752" LastActivityDate="2017-06-15T00:01:40.400" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="680" PostTypeId="2" ParentId="628" CreationDate="2017-06-15T00:04:31.823" Score="8" Body="&lt;p&gt;I think this question is perhaps mis-framed or at least misleadingly framed. Fundamentally, the question an educator has to answer is: what knowledge do you want your students to demonstrate? Once you know that, the next question is how do you strip away all other distractions so that whatever product you evaluate gives you a good proxy for what knowledge your students actually acquired? The real issue here is how to tailor the evaluation medium to the desired learning outcome. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think written-response tests (regardless of whether they are &quot;written&quot; with Word or a pencil) are tremendously valuable because they let you probe the degree to which students understand the theory. For the same reason, I think significant programming assignments are also tremendously valuable because they offer different information: is the student able to translate theory into working code? This approach gives you a much broader view of the student and gives you the opportunity to understand any inconsistencies. E.g: a student does awesome on coding assignments but sucks at written tests, maybe there's a learning disability that could be better accommodated?&lt;/p&gt;&#xA;" OwnerUserId="758" LastActivityDate="2017-06-15T00:04:31.823" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="681" PostTypeId="2" ParentId="349" CreationDate="2017-06-15T00:29:47.913" Score="9" Body="&lt;p&gt;After &quot;Hello World&quot; it becomes &quot;Hello \$name&quot; where \$name is provided by user.  After basic I/O and &quot;it compiles and runs&quot;, then it is time for loops and logic.  I typically like a variation on fizzbuzz:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Print the numbers 1 through 100, if the number is evenly divisible by 3 print &quot;fizz&quot; next to the number, if evenly divisible by 5 print &quot;buzz&quot; next to the number, if evenly divisible by both 3 and 5 then print &quot;wahoo!&quot; next to the number.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="662" LastEditorUserId="2" LastEditDate="2017-06-16T19:43:30.307" LastActivityDate="2017-06-16T19:43:30.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="682" PostTypeId="1" CreationDate="2017-06-15T01:34:08.190" Score="7" ViewCount="127" Body="&lt;p&gt;At my current school site (high-school level, 14-18 year olds), I am the only full-time CS teacher. While I don't mind working on my own, there are occasions where I think that collaborating on lessons (or a small part of one lesson) with colleagues would be beneficial. One opportunity I'd like to explore further is interdepartmental collaboration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of yet, I'm not entirely sure of how this would look. I do think it would be possible to co-teach a lesson with a colleague from another department. Alternatively, it would be feasible to take the &quot;guest speaker&quot; approach and either visit a colleague's class or have a colleague visit mine. This at least creates content connections between curricula where relevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there concepts at the introductory or AP levels of high school computer science that are appropriate for or lend themselves to this kind of collaboration? What other disciplines are good fits for collaboration with CS, and where does CS expertise fit within them?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-16T06:44:41.443" Title="Opportunities for Interdepartmental Collaboration" Tags="|curriculum-design|collaboration|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="683" PostTypeId="2" ParentId="682" CreationDate="2017-06-15T02:05:06.630" Score="6" Body="&lt;p&gt;Some ideas to ruminate on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With you as the guest in another department, thoughts are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$\LaTeX$ presented to a writing class, preferably one where they've already had to submit three or more papers that were graded on presentation as well as English usage&lt;/li&gt;&#xA;&lt;li&gt;Web design (for portfolio usage maybe) to any arts or photography class&lt;/li&gt;&#xA;&lt;li&gt;Mathematica, if available, to any advanced mathematics or lab sciences class&lt;/li&gt;&#xA;&lt;li&gt;SQL (any flavor) to any business-related classes, if any exist at your school&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At these engagements you can show how the program can be used in real-world application to what they are learning, and/or be useful to them in their class now. Best of breed for that would be the use of $\LaTeX$ for the writing class - freeing them from formatting and presentation details to work on their writing skills&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As a guest in the computer class, you could look for any instructors that rely on computer programs in their course material. Especially useful would be any that employ a program that is Free/OpenSource software. (If it is hosted on GitHub where they can also look at, that's even better.) A good candidate might be an art class that uses GIMP.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you find a significant portion of your students have a common interest in another field, you could engage that department for a collaborator who can show how the computer is used in their field, even if it's not applied in the classroom itself. (Of course that could also include teaching those instructors as well, so that they are in a position to understand the tools at least as well and the students they teach.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Lastly, to get things rolling, you could offer to do a session or two in another class to teach their students extra features of the Office software that they use, if any, with the students. Lab science classes probably need at least Excel for processing and presenting measurement data from experiments.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The first set of ideas is to present how the use of computers can help them &lt;em&gt;now&lt;/em&gt; with their classwork. The second set is to show your students the application of what they are learning in your class to things they already know, or will be taking soon. The third set of ideas shows how computers are being used in the work-a-day world to make things easier, or better, in the field they are really interested in. The final idea is a method of beginning the idea of collaboration in your school before the other instructors realize it's even possible.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-15T02:05:06.630" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="684" PostTypeId="2" ParentId="660" CreationDate="2017-06-15T03:18:47.793" Score="7" Body="&lt;p&gt;I would like to suggest my absolute favorite lesson from my intro to CS class. I usually teach it over two class periods, the first being &quot;unplugged&quot; and the second on the computers, but I think you can cut some corners and still offer a valuable experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overview: &quot;How do computers sort things?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start by asking what computers are good at. The answers vary a lot and you usually have to guide them towards &quot;counting&quot;, &quot;adding/subtracting/multiplying/dividing&quot;, &quot;true and false&quot; and &quot;comparison&quot;. If you've done a unit on binary, it's helpful to link that in with the last two and let them show you why it is so easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I talk a bit about how sorting is absolutely fundamental to Computer Science. I spend a little time explaining how almost any significantly complex program they have ever used will sort something at some point. It's a great algorithm to start with because it is so visual and so intuitive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we're going to have a tournament to see who can sort the numbers from 1-16 the fastest. At this point I have them fold and cut a piece of paper into 16 pieces and number them, but in the interests of time, you should do that yourself and just bring in enough sets for ((the number of kids) / 2). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pair off the students and give each pair a set of numbers from 1-16 and tell them to put them in a line in front of them in random order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One partner is going to be the &quot;computer&quot;. They can not talk and they are &quot;blind&quot; (they can not arbitrarily choose specific numbers). They can only point to two pieces of paper at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other partner is the &quot;program&quot;. The can only say &quot;switch&quot; or &quot;stay&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The partners have to come up with an algorithm such that the &quot;computer&quot; points at two numbers at a time and moves from one pair of numbers to the next pair in a consistent and logical fashion. The &quot;program&quot; tells the computer whether to switch those numbers or leave them where they are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all of the groups will come up with bubble sort. Occasionally, one group will come up with selection sort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I put them in head-to-head competition, with the numbers randomized the same way for both groups to keep it fair. Winners play winners until the champions are crowned. Usually there is some sort of prize at the end (chocolate goes over well with 13 year-olds :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second 30-minutes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the crux of the problem for you, as you mentioned: they don't have any programming experience or accounts. So my recommendation would be to ask them to set up Scratch accounts for the students in advance, or (possibly even better) you can just set up 15 &quot;test&quot; accounts and have the skeleton program ready to go in each one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a big fan of pair programming, so I keep them in the same pairs that they were in for the competition. I set a repeating 4-minute timer on the board to change the &quot;driver&quot; (on the keyboard) with the &quot;navigator&quot; (helping figure it out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask my students to &quot;remix&quot; this program: &lt;a href=&quot;https://scratch.mit.edu/projects/125507639/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://scratch.mit.edu/projects/125507639/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for those that need a little more scaffolding (or have less time, like yours), you could include a little more code, like this: &lt;a href=&quot;https://scratch.mit.edu/projects/125587510/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://scratch.mit.edu/projects/125587510/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their goal, obviously, is to sort the blocks. How much you let them struggle and how much help you give is obviously up to you, but I can not express the satisfaction you'll get when you start hearing the shouts of &quot;I GOT IT!&quot;. I like to err on the side of the struggle. I try to explain that if they are not frustrated, they are not learning - they're just doing what they already know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are done early (or want to continue with a harder challenge after class), they can try the &quot;sorting 300 starter&quot; in my Scratch Shared Projects. It allows for more a random assortment blocks, negative numbers, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once most (or all) of the students have a working program (or you have 5 minutes left), bring them back in to talk more about the power of sorting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What kinds of things do we sort all the time in our daily lives?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if you are sorting REALLY HEAVY objects (buckets of sand) instead of just pieces of paper? Would you use a different algorithm? Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also show them this great visualization of different algorithms: &lt;a href=&quot;https://www.toptal.com/developers/sorting-algorithms/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.toptal.com/developers/sorting-algorithms/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have any questions at all, please feel free to contact me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&#xA;John&lt;/p&gt;&#xA;" OwnerUserId="661" LastEditorUserId="661" LastEditDate="2017-06-15T20:32:08.463" LastActivityDate="2017-06-15T20:32:08.463" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="685" PostTypeId="2" ParentId="666" CreationDate="2017-06-15T04:20:12.050" Score="7" Body="&lt;p&gt;I'd definitely go for objects-late, or even &lt;strong&gt;objects-never&lt;/strong&gt; in the introductory course (as you seem to mean &quot;class-based OOP&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To teach programming, and work with a particular language, you first need to establish the basic syntax and builtin types and operators. (If there's a REPL, you can start with expression syntax and keep statements for later). You'll want to start with numbers (integers) and booleans - basic math and logic, the evaluation of which most students will know from their electronic calculators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then introduce variables, to &quot;give names to things&quot; - a concept which most of them will already know from math education as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now there's three important next steps, which you can teach in any order and depth:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Mutation&lt;/strong&gt;: assignment statements, loop syntax, IO&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Abstraction&lt;/strong&gt;/&lt;strong&gt;Modularity&lt;/strong&gt;: function declarations and calls, local variables&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data structures&lt;/strong&gt;: objects - and by that I mean POJOs for Java and structs for C&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Along with those, you can introduce more advanced topics like references/pointers, recursion, DRY, object identity, interfaces, and further builtin data types (e.g. strings), as far as you see fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With those concepts, they will know what programming is all about and what you can do with it. &lt;a href=&quot;https://www.joelonsoftware.com/2005/12/29/the-perils-of-javaschools-2/&quot; rel=&quot;noreferrer&quot;&gt;Grokking pointers and recursion is considered hard enough&lt;/a&gt; to probably be the conclusion of an introductory course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think there's any reason to teach classes (data + methods), encapsulation, inheritance, file modularisation and other code organisation methods yet. The OOP mentality has its merits for designing larger systems, but that's not what will happen in an introductory class.&lt;/p&gt;&#xA;" OwnerUserId="660" LastEditorUserId="660" LastEditDate="2017-06-15T11:47:02.137" LastActivityDate="2017-06-15T11:47:02.137" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="686" PostTypeId="2" ParentId="130" CreationDate="2017-06-15T11:38:26.403" Score="3" Body="&lt;p&gt;I did some debugging with year 10 students in Python and put some logical errors in there, so that they could see that the code had to be indented to run properly and achieve the correct result. I've also used a visualiser to show that if the code isn't indented properly, that it won't run correctly and complete as expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pythontutor.com/visualize.html#mode=edit&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.pythontutor.com/visualize.html#mode=edit&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="778" LastActivityDate="2017-06-15T11:38:26.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="687" PostTypeId="2" ParentId="682" CreationDate="2017-06-15T12:39:30.133" Score="2" Body="&lt;p&gt;Science classes would  be my immediate thought, where data can be collected to support experimentation. The most obvious metrics being weather, sunlight, etc. for biology type things (not my subject, so I'm a bit weak on examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In physics, accurate timing and acceleration are easy to sample, so that can also be linked to experiments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In design, you might collect and analyse strain data or measure force distribution.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-06-15T12:39:30.133" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="688" PostTypeId="2" ParentId="682" CreationDate="2017-06-15T12:47:54.920" Score="2" Body="&lt;p&gt;If your kids can do web development - particularly programatic web development (say using something like flask, ruby on rails etc.) then an easy entry point is with history or social studies or even English - instead of having the kid do a 10 page paper on blah blah blah, have them make a web presence on blah blah blah. This can be a richer more interesting and in fact interactive experience rather than a paper and it's easier to share with the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the web site is programatically generated, the student can also do analytics, stats, etc as part of the project.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-15T12:47:54.920" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="689" PostTypeId="2" ParentId="583" CreationDate="2017-06-15T14:45:22.177" Score="4" Body="&lt;p&gt;I start by talking about &lt;strong&gt;Addresses&lt;/strong&gt;. (pointers) (shh!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, we took a long detour trying to avoid the pointer concept, but it has failed, because, well, addressing is part of how computers &lt;em&gt;work&lt;/em&gt;. So, when I talk about Classes and Objects, the very first thing that comes up is the difference between the instance, and the variable that I use to reference it. I explain this by saying:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Object is like my house, it exists somewhere.&lt;br&gt;&#xA;The Reference to it is like writing the &lt;em&gt;address&lt;/em&gt; down on paper.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I throw the paper away, the house is still there, but I might not know how to get there anymore. I can make copies of the address / paper, but there is still only one house.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I say that pass-by-reference is giving you the address so that you can go there and do things to it. Passing by value is like giving you your own &lt;em&gt;copy&lt;/em&gt;, and what you do does not affect the original. This seems to be well-received.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-06-15T14:45:22.177" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="690" PostTypeId="1" CreationDate="2017-06-15T16:08:33.187" Score="25" ViewCount="9434" Body="&lt;p&gt;I teach 13-14 year old boys an &quot;Introduction to Computer Science&quot; course.  For most of them, it is their first structured coding experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before we even touch an IDE, I have them walk through problems like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Devise an algorithm that calculates a user’s paycheque. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The program will begin by welcoming the user.&lt;br&gt;&#xA;  It will then ask the user to input their hours worked.&lt;br&gt;&#xA;  It will then ask them to input their rate of pay.&lt;br&gt;&#xA;  It will then calculate their total pay.  You may assume no deductions due to taxes, fees, dues, etc...&#xA;  The program will then exit with an appropriate exit message.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The correct answer usually looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Begin&#xA;  print welcome&#xA;  input hours&#xA;  input rate&#xA;  pay = hours * rate&#xA;  print pay&#xA;  print goodbye&#xA;End&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A progression to flowcharts then follows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess what I'm asking the group is &quot;&lt;strong&gt;How do you teach students of this age and ability to think algorithmically?&lt;/strong&gt;&quot;. I've been teaching C.S. to this age group and ability level for about 15 years or so now.  I find that the problem statement/algorithm/flowchart model is about 95% effective.  I'd estimate that only 5% of the students that I encounter can't break the problem statement/pseudocode barrier. I'm always looking to solve this problem so any constructive criticism this group can offer is greatly appreciated. Even age appropriate resources would be deeply helpful.&lt;/p&gt;&#xA;" OwnerUserId="797" LastEditorUserId="76" LastEditDate="2017-06-15T19:09:30.103" LastActivityDate="2017-06-28T13:54:39.620" Title="How can I help my students to think algorithmically?" Tags="|algorithms|pseudo-code|" AnswerCount="17" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="691" PostTypeId="2" ParentId="213" CreationDate="2017-06-15T16:27:34.600" Score="2" Body="&lt;p&gt;A common example I use is centuries/years. We start with the first century on a range of 0-100 years. Or the first year of a century, which always ends in 00. It describes the amount of x that has passed, not the n-th x.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The word &quot;first&quot; is the confusing thing for beginners I feel. &lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2017-06-15T16:27:34.600" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="692" PostTypeId="2" ParentId="130" CreationDate="2017-06-15T16:37:02.470" Score="1" Body="&lt;p&gt;Indentation can be used as a visual queue for processes. Whenever there is a bug in the code, it is possible to more easily spot it (again, visually, not just by understanding). Especially wrongly placed curly braces are easy to find this way.&lt;/p&gt;&#xA;" OwnerUserId="799" LastActivityDate="2017-06-15T16:37:02.470" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="693" PostTypeId="1" CreationDate="2017-06-15T17:01:49.950" Score="11" ViewCount="1258" Body="&lt;p&gt;This question is specific for teachers of the United States College Board's AP Computer Science Principles class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a block based programming language that allows for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Procedures that return values&lt;/li&gt;&#xA;&lt;li&gt;For each that will iterate through lists&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In addition, we are to teach basic 2D robot programming with commands such as TURN_AROUND(), MOVE(), TURN_RIGHT() etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My research has come up with &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer&quot;&gt;MIT's Scratch IDE&lt;/a&gt;; but I was wondering if there is a better choice for high school students.&lt;/p&gt;&#xA;" OwnerUserId="790" LastEditorUserId="76" LastEditDate="2017-06-15T17:03:30.023" LastActivityDate="2017-08-09T07:53:56.573" Title="Looking for a block-based programming language for AP CS P" Tags="|block-based-programming|ap-cs-principles|" AnswerCount="7" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="694" PostTypeId="2" ParentId="693" CreationDate="2017-06-15T17:07:45.010" Score="11" Body="&lt;p&gt;You will probably want to look into &lt;a href=&quot;http://snap.berkeley.edu&quot; rel=&quot;noreferrer&quot;&gt;Snap!&lt;/a&gt;. It was built upon Scratch and would probably meet your needs. This is from its About page:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Snap! (formerly BYOB) is a visual, drag-and-drop programming language.&#xA;  It is an extended reimplementation of Scratch (a project of the&#xA;  Lifelong Kindergarten Group at the MIT Media Lab) that allows you to&#xA;  Build Your Own Blocks. It also features first class lists, first&#xA;  class procedures, and continuations. These added capabilities make&#xA;  it suitable for a serious introduction to computer science for high&#xA;  school or college students.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Additionally, I asked a question a few weeks ago about the differences between Scratch and Snap!. You might find this discussion helpful: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/112/what-can-snap-do-that-scratch-cannot&quot;&gt;&quot;What can Snap! do that Scratch cannot?&quot;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: In the context of AP CS Principles, it may also be helpful to know there is a full curriculum available from Berkeley that utilizes Snap!. It is called &lt;a href=&quot;http://bjc.berkeley.edu/&quot; rel=&quot;noreferrer&quot;&gt;The Beauty and Joy of Computing&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-15T18:06:24.767" LastActivityDate="2017-06-15T18:06:24.767" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="695" PostTypeId="2" ParentId="690" CreationDate="2017-06-15T17:12:21.577" Score="14" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How do you teach students of this age and ability to think algorithmically?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't really think there's a silver bullet to this problem. To be able to think algorithmically, &lt;strong&gt;you need to solve lots of problems, over and over&lt;/strong&gt;. Some students will naturally have the ability to be able to describe algorithms without much teaching, but it's not a universal skill, and it comes at different rates for different people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an ideal world, adapting the level of difficulty of the algorithms to design would be useful: get an easy algorithm right, and then move on to a harder one, until you get stuck, and then go back down until you master algorithm design for even complex problems. However, that would require a lot of attention to do in person, so to get that level of support, you need an automated solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend &lt;a href=&quot;https://www.codewars.com/&quot; rel=&quot;noreferrer&quot;&gt;Codewars&lt;/a&gt; as a good tool to practice solving simple problems that scale up in difficulty—I had great fun trying some myself a while back. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A task (kata) is given with instructions, example outputs and (usually) pre-made unit tests.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You input your solution, test it, then submit. Codewars runs it against (hidden) tests to make sure the solution is valid, and then if so, you gain points.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can create 'Clans' (perhaps for your class) so a league table is shown—the gamification might be a good motivator for some.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difficulty of the kata increases as you get better (and harder kata give higher rewards), so the difficulty should ramp up and help students develop their skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This, of course, does require students to be relatively comfortable with the &lt;em&gt;syntax&lt;/em&gt; of at least one programming language. If you've not taught any of the language itself yet, you probably should do that before you teach algorithmic thinking—a basic handle on how a programming language is used would probably be useful so that students can understand what an algorithm can and can't do.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-15T17:12:21.577" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="696" PostTypeId="2" ParentId="590" CreationDate="2017-06-15T17:29:37.690" Score="4" Body="&lt;p&gt;To me it sounds like your students lack an understanding of the fundamentals of IDEs and Git.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if I ask them to use the command line, they will never do it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If they don't know &lt;code&gt;git init&lt;/code&gt; and &lt;code&gt;git clone (origin)&lt;/code&gt; then I'm sorry, they do not know Git, they should learn this first (along with push, pull, commit, status, fetch).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is another problem in itself. The high level explanation is you only need package level codebase with only the src, the bin is generated by Eclipse. You still need to create a project in Eclipse and then import the package. Any further problems should be asked on StackOverflow.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The other method would be to put the repository (and .git) under the Eclipse project.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;NO! The .git is generated by &lt;code&gt;git init&lt;/code&gt;. Do not copy any configuration, especially hidden files from project to project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you are jumping the gun here. Eclipse and Git should be separate lessons. If they are confused by both then that just means they need to learn what each of them are, before combining them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest:&#xA;&lt;li&gt;Teach Eclipse, how to create projects, what packages mean, how to import, etc.&#xA;&lt;li&gt;Teach Git, init, clone, pull, commit, push, status, fetch using Terminal or CommandLine for Git. Depending on the age group you might want to teach them how to resolve conflicts, what decentralized means, branching, pull requests, etc.&#xA;&lt;li&gt;Now teach them Eclipse Marketplace, download plugin and integrate Git with Eclipse.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As all my professors do it, you need to create the repository with the project for each student and have each student clone and import into Eclipse. I'm not an educator so I don't know if there is an existing setup available online. However, I do think this is actually a very &lt;i&gt;trivial&lt;/i&gt; task if they understand Eclipse and Git.&lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-06-15T17:29:37.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="697" PostTypeId="2" ParentId="690" CreationDate="2017-06-15T17:53:56.550" Score="4" Body="&lt;p&gt;So far in my career, when I have a student who just &lt;em&gt;doesn't seem to get it&lt;/em&gt; (and there is no obvious discernible cause) it very often comes down to one of two problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is &lt;strong&gt;mutability&lt;/strong&gt;, which I wrote a little piece about &lt;a href=&quot;https://cseducators.stackexchange.com/a/345/27&quot;&gt;here&lt;/a&gt;.  Kids who can't easily trace how values will change need explicit practice in this concept before they will really be able to follow what is going on in imperative languages, and it can take a surprising amount of practice to help them to really &lt;em&gt;get&lt;/em&gt; it.  The fact that it's so easy to describe is disarming, because we think they get it.  And the kind of extremely simple code that we might use to determine understanding often doesn't trigger the kinds of incorrect responses that would naturally call teachers to action.  However, as soon as the code itself starts gaining any complexity, having a cloudy notion of mutability is a game-stopper, pure and simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second is &lt;strong&gt;simple motivation&lt;/strong&gt;.  For the kids who aren't so quick with CS at the start, not being willing to put extra thought and effort into the topic halts their growth.  I don't have a lot of generalized insight into how to fix this one.  When I have unmotivated kids, they mostly just kind of muddle through.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-16T13:54:11.600" LastActivityDate="2017-06-16T13:54:11.600" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="698" PostTypeId="2" ParentId="693" CreationDate="2017-06-15T18:17:14.070" Score="2" Body="&lt;p&gt;Not strictly block based, but I like &lt;a href=&quot;http://codesters.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codesters&lt;/a&gt; as a nice midway point. It has a DnD interface but the blocks you drop become Python code.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-15T18:17:14.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="699" PostTypeId="2" ParentId="690" CreationDate="2017-06-15T18:18:28.510" Score="7" Body="&lt;p&gt;The problem as described is simply translation from one firm of words to another, so in some senses, students may not really grasp what you are asking for. I think a more important thing to ask for is to construct algorithms from a less structured problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A flow chart is just another way to write the algorithm, not really a progression - and not necessarily useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect one major challenge with thinking algorithmically is the ability to break down the problem into the &lt;strong&gt;right number&lt;/strong&gt; of steps, with those steps at the &lt;strong&gt;right level&lt;/strong&gt; of abstraction. People often tend to focus on either the parts that they know, or the parts that they don't know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An approach that may help is &lt;em&gt;successive refinement&lt;/em&gt; where you try to sub-divide the problem in small steps. Inputs and outputs being an obvious thing to try first. The aim is to avoid getting stuck in the minute details, or blocked on a part that you don't know where to begin. Progress on one area will often give some ideas about how to solve another.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-06-15T20:06:29.463" LastActivityDate="2017-06-15T20:06:29.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="700" PostTypeId="2" ParentId="251" CreationDate="2017-06-15T18:46:45.893" Score="2" Body="&lt;p&gt;Perhaps you can remind yourself by thinking of times that someone helped by not helping?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I was in college (30 years ago), I was struggling with a bug in the Lab (we had computer labs back then) and the TA could clearly see the bug but she did not offer any guidance. Because I knew &lt;em&gt;she&lt;/em&gt; saw the problem immediately, I knew it was solvable. Because she didn't say anything, I knew she believed I could find it. It took a while, but I eventually tracked down a simple memory overrun error in C (wrote one past the end of an array on to the next declared variable). Silence is one 'guardrail' that I could go to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other extreme would be explaining everything to someone every time they ask. We call that &quot;spoon feeding&quot; and it is awful. The student learns... to be dependent, and I can't think by the end of the day and the other students are about ready to kill because they can't think during class either. This is more like &quot;the third rail&quot; so we won't go there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once TAed an introductory programming college class for non-majors. I very quickly learned to spot every kind of error they made. My goal was to stay between the rails: help, but let them learn. It is a difficult dance, and depends heavily on circumstances. Sometimes I give a generous prompt knowing that they are bound to come across the same thing again. I am not so arrogant as to think that I will determine the outcome of their experience.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-06-15T18:46:45.893" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="701" PostTypeId="2" ParentId="690" CreationDate="2017-06-15T19:05:37.353" Score="18" Body="&lt;p&gt;Rather than giving them processes to model algorithmically, have them start coming up with algorithms for everyday activities. Here is the formal assignment I have students complete: &lt;a href=&quot;http://cdn.cs50.net/ap/1516/problems/0/2/0-2.html&quot; rel=&quot;noreferrer&quot;&gt;CS50 AP - Everyday Algorithms&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They begin with a simple pseudocode example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1   look out the window&#xA;2   if it is raining outside&#xA;3      put on your rain boots&#xA;4      put on your raincoat&#xA;5   go outside&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;After they get comfortable with pseudocode, students write their own simple algorithm:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Okay, now you’ve learned a lot about algorithms and pseudocode.&#xA;  Perhaps we should try writing a few—three, to be precise. First, write&#xA;  up algorithms (both in sentence form and in pseudocode) for how to:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;&lt;p&gt;brush one’s teeth&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;eat an orange&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;Next, think of something that you do every day or nearly every day.&#xA;  Write an algorithm in sentence form and in pseudocode for how to do&#xA;  the thing you’re thinking of.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Students will take more ownership and may understand it new ways if they are coming up with the processes to model based on something important to them. While your example certainly works well, what about students for whom getting a paycheck is unfamiliar territory? You want to use a student's prior knowledge to your advantage, so the focus is solely on the algorithm, not the algorithm &lt;em&gt;and&lt;/em&gt; some other idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another essential element I found to getting students to think algorithmically is to model it in all things I do at the start of the year. Everything is a process as follows: &lt;code&gt;input -&amp;gt; algorithm -&amp;gt; output&lt;/code&gt;. Let's say I want to take attendance or assign seats. I think out loud with an algorithmic process. My input is an uncounted group of students, and my desired output is a counted group as a means of attendance. Here's the algorithm I use, which I borrow from &lt;a href=&quot;http://cdn.cs50.net/2015/fall/lectures/0/f/notes0f/notes0f.html&quot; rel=&quot;noreferrer&quot;&gt;CS50's first lecture at Yale&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1 stand up and assign yourself the number 1&#xA;2 pair off with someone standing, add your numbers together, and adopt the sum as your new number&#xA;3 one of the pair should sit down; the other goes back to step 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The value of this exercise is it gets student moving. &lt;strong&gt;Differentiation is essential for teaching students to think in a new way. Get them moving and talking to each other. Make it relevant to their everyday experience.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-18T14:56:49.703" LastActivityDate="2017-06-18T14:56:49.703" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="702" PostTypeId="2" ParentId="690" CreationDate="2017-06-15T19:36:16.457" Score="7" Body="&lt;p&gt;Thinking algorithmically isn't always natural.  In an algorithm, you're going to write down everything the computer is going to, then hit &quot;go&quot; and step away for a few microseconds while the computer does it.  In most of our lives, there's more back-and-forth in our interactions, so it takes a while to get used to thinking in this one-pass approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something I think would be helpful is an origami game.  It's &lt;em&gt;really&lt;/em&gt; hard, but an excellent introduction to thinking like this.  The game works like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Teams are split into two groups (minimum team size of 2, obviously)&lt;/li&gt;&#xA;&lt;li&gt;One group is given a folded origami creation and pictoral instructions on how to make it.&lt;/li&gt;&#xA;&lt;li&gt;That group must create &lt;em&gt;written&lt;/em&gt; (not pictural) instructions to make the object.&lt;/li&gt;&#xA;&lt;li&gt;Those instructions are then given to the second half of the team, who have to create the orgami from those instructions.  They do not get to see the pictorial instructions nor what the final product should look like.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;A few rounds through that will quickly teach them what works and what doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also makes you &lt;em&gt;really&lt;/em&gt; appreciate your debugger!&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-06-15T19:36:16.457" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="703" PostTypeId="2" ParentId="693" CreationDate="2017-06-15T23:27:33.803" Score="1" Body="&lt;p&gt;On &lt;a href=&quot;http://codehs.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeHS&lt;/a&gt; we have a block-to-text based programming environment and a full curriculum for &lt;a href=&quot;https://codehs.com/info/curriculum/apcsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS Principles&lt;/a&gt; that you can use for JavaScript. It has a unit to teach JavaScript, including functions and lists among other topics, and also starts with a unit on Karel the Dog. Karel the Dog is a JavaScript implementation of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Karel_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karel programming language&lt;/a&gt;, which is very similar to the style of problems on the AP CSP exam. Karel knows the commands&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;move();&lt;/code&gt;&#xA;&lt;code&gt;putBall();&lt;/code&gt;&#xA;&lt;code&gt;takeBall()&lt;/code&gt;;&#xA;&lt;code&gt;turnLeft()&lt;/code&gt;; and later &lt;code&gt;turnAround();&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially it is the same as 2D robot programming but with a dog instead of a robot, which is a bit friendlier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use this with blocks or text - it's just in JavaScript, and you or students can also easily build their own worlds. Hope that helps!&lt;/p&gt;&#xA;" OwnerUserId="745" LastActivityDate="2017-06-15T23:27:33.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="704" PostTypeId="2" ParentId="30" CreationDate="2017-06-15T23:38:44.657" Score="5" Body="&lt;p&gt;Markup languages are for giving names to things. How can be different between 'languages', with, for example, &lt;em&gt;HTML&lt;/em&gt; and &lt;em&gt;XML&lt;/em&gt; using &lt;code&gt;&amp;lt;tags&amp;gt;&amp;lt;/tags&amp;gt;&lt;/code&gt;, &lt;em&gt;Markdown&lt;/em&gt; using special characters around text, and $\LaTeX$ using dollar signs (&lt;code&gt;$&lt;/code&gt;) around text and key words. No matter how it's done, all the markup language is doing is giving some kind of name to the thing, usually text, that it is attached to. Using a markup language is the same as using labels under the paintings in the museum. They mean nothing by themselves. They only have meaning once someone reads them, if they are in a language the reader understands. Markup text only has 'meaning' when read by a program that understands that language, interprets the tags, or other markup, and then following programmed instructions of what to do with the text the markup has named.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming languages, on the other hand, are instructions to the computer about what to do. Programs are written in text, often in the same text editor used for writing markup text. They are then compiled, or interpreted, to create &lt;em&gt;machine code&lt;/em&gt; that the computer will follow. Once created, the program will follow the instructions it was given, even if that's not what the programmer intended.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of using markup could be the following image. It has what you need to know to change a flat tire on a car or truck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ovaqT.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ovaqT.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notice that everything is there, but it doesn't help you figure out how to change a flat tire. What's really needed is &lt;em&gt;instructions&lt;/em&gt; not names. Compare the following. Not in any &lt;em&gt;programming&lt;/em&gt; language. Just a list of instructions. In this case the instructions are &lt;em&gt;executed&lt;/em&gt; by a person, not a computer. Still, the instructions enable one to change a tire, while the images that have &lt;em&gt;markup&lt;/em&gt; on them don't help any on their own.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;How to Change Tires&#xA;     1. Find a Safe Location&#xA;     2. Turn on Your Hazard Lights&#xA;     3. Apply the Parking Brake&#xA;     4. Apply Wheel Wedges&#xA;     5. Remove the Hubcap or Wheel Cover&#xA;     6. Loosen the lug nuts&#xA;     7. Place the Jack Under the Vehicle&#xA;     8. Raise the Vehicle With the Jack&#xA;     9. Unscrew the Lug Nuts&#xA;    10. Remove the Flat Tire&#xA;    11. Mount the Spare Tire on the Lug Bolts&#xA;    12. Tighten the Lug Nuts by Hand&#xA;    13. Lower the Vehicle and Tighten the Lug Nuts Again&#xA;    14. Lower the vehicle completely&#xA;    15. Replace the Hubcap&#xA;    16. Stow All Equipment&#xA;    17. Check The Pressure in the Spare Tire&#xA;    18. Take Your Flat Tire to a Technician&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;&lt;sup&gt;Adapted from &lt;a href=&quot;http://www.bridgestonetire.com/tread-and-trend/drivers-ed/how-to-change-a-flat-tire&quot; rel=&quot;noreferrer&quot;&gt;How to Change a Flat Tire&lt;/a&gt; by &lt;a href=&quot;http://www.bridgestonetire.com/&quot; rel=&quot;noreferrer&quot;&gt;Bridgestone Americas Tire Operations, LLC&lt;/a&gt;.&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-15T23:38:44.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="705" PostTypeId="2" ParentId="30" CreationDate="2017-06-15T23:52:12.513" Score="2" Body="&lt;p&gt;Other answers have already talked about the expressive power of a programming language over a markup language. I want to add the following as to help the kids understand the limitations of a markup language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They all know Google Docs or Word or some other word processor, I tell them that these are basically the same as HTML. If you have bold in a document, somewhere internally, there's a marker to start and stop the bold. When you type C-b it inserts that invisible marker and then C-b again turns it off. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also show them this by loading a simple web page and then showing its source (and sometimes editing it in the developer tools). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most kids know that a word document is not a program and showing the analogy this way helps make the connection.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-15T23:52:12.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="706" PostTypeId="1" CreationDate="2017-06-16T00:02:05.043" Score="10" ViewCount="508" Body="&lt;p&gt;I'm curious to hear people's experiences with allowing (or disallowing) students to use copy and paste in code when learning as beginners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel like there are two kinds of copy/pasting.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Copying code you found somewhere in docs or on the internet and pasting it into your code&lt;/li&gt;&#xA;&lt;li&gt;Utilizing copy paste with your own code to write similar code more quickly&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I see some upsides and downsides to both, so I'm wondering what other instructors have learned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Upside to allowing it. It's a useful tool for moving quickly and everyone who writes code professionally would use it.&lt;/li&gt;&#xA;&lt;li&gt;Downside: students who are beginners could really use the practice typing everything out&lt;/li&gt;&#xA;&lt;li&gt;Downside: it makes it much easier to copy code you find somewhere without needing to understand it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What are other instructors' experiences and insights? Do you allow your students to use copy and paste?&lt;/p&gt;&#xA;" OwnerUserId="91" LastEditorUserId="58" LastEditDate="2017-07-12T01:07:01.293" LastActivityDate="2017-07-12T14:14:01.087" Title="Thoughts on copying and pasting code?" Tags="|classroom-management|plagiarism|" AnswerCount="6" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="707" PostTypeId="2" ParentId="706" CreationDate="2017-06-16T00:34:40.507" Score="6" Body="&lt;p&gt;I let the kids cut and paste code but with the following caveats:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;They must cite the source (be it a classmate, another student or a site like StackOverflow)&lt;/li&gt;&#xA;&lt;li&gt;There has to be enough of their project that is their own code to show mastery of whatever the assignment's all about&lt;/li&gt;&#xA;&lt;li&gt;At times, I encourage them to use others code (and libraries) to enhance their projects, that is, add features that they otherwise wouldn't have had&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="237" LastEditorUserId="237" LastEditDate="2017-06-16T15:29:28.510" LastActivityDate="2017-06-16T15:29:28.510" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="708" PostTypeId="2" ParentId="706" CreationDate="2017-06-16T00:50:44.597" Score="4" Body="&lt;p&gt;In my class, the only rules I set are that kids may not give code to each other, either directly or indirectly.  I also set a &quot;rule of thumb&quot; that if student A needs help from student B on a portion of a lab, student B must have finished that portion, and may look at student A's (relevant) work, but that A may not look at B's work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the logic here is that I already consider labs to be &quot;suspect&quot; with regards to plagiarism, so the giant brunt of their grades come from tests and quizzes.  The labs, then, are primarily a tool that the kids should use to prepare for the assessment.  I explain this to them often, and point out that not fully understanding their own lab is a great way to shoot themselves in the foot.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-16T00:50:44.597" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="709" PostTypeId="2" ParentId="706" CreationDate="2017-06-16T00:56:49.930" Score="4" Body="&lt;p&gt;I think it is fine, as long as it isn't an essential part. It saves time, and the students can learn from professionals, and can learn new ways of doing something that they never would have thought of. Also, it helps you become a more efficient coder, and if you borrow someone else's functions that is more efficient it makes the rest of your program faster, and it saves a lot of time that could be spent on the main goal, not just some function that was already created before. Don't reinvent the wheel!&lt;/p&gt;&#xA;" OwnerUserId="825" LastActivityDate="2017-06-16T00:56:49.930" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="710" PostTypeId="2" ParentId="628" CreationDate="2017-06-16T02:18:05.543" Score="9" Body="&lt;p&gt;As much as I hate the fact that we need to consider this, paper and pencil makes it harder to cheat.  Even if you restrict them to using lab computers and not their own laptops, and cut off networking to the room, it'd be easy to smuggle in a USB key with entire books worth of notes and the source code from every one of their labs and projects.  (Yes, with enough effort, you could lock down the computers to the point where they can't even mount a USB key, but the logistics are a lot trickier to manage than just scanning the room periodically to see if anyone's got a small library of cheat sheets on their desk.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I don't think that this should be the only factor considered, or even a deciding one, but other answers have covered various &lt;a href=&quot;https://cseducators.stackexchange.com/a/654/827&quot;&gt;pros&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/a/634/827&quot;&gt;cons&lt;/a&gt; well enough already, and this is a factor that hasn't been mentioned yet.)&lt;/p&gt;&#xA;" OwnerUserId="827" LastActivityDate="2017-06-16T02:18:05.543" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="711" PostTypeId="2" ParentId="590" CreationDate="2017-06-16T05:57:52.327" Score="2" Body="&lt;p&gt;I teach Java to high school students as well using Eclipse.  You don't have to teach command line (much to the dismay of professionals here). Egit works fine. GitHub offers an education teacher account where you can control all of the git accounts for the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm going to make up a step by step instructions for using Egit/Eclipse.  It's not too bad; I was able to easily clone the repo at home to work on assignments that were started in the classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to understand that unlike old source control (SVN), github is designed to setup a local repo that is different than your workspace; and that repo is pushed to the cloud one; and pulled when you want it back.  So when students save to the cloud, it's this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;workspace ====commit====&gt; localrepo ====push====&gt; github cloud repo&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and when they want to continue working at home they have to clone the repo and import into their workspace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To the people here complaining that ignoring the command line is blasphemy... COME ON... we teach tons of 14 year olds and want to encourage them.  GUI is the way to go for most of them.&lt;/p&gt;&#xA;" OwnerUserId="833" LastActivityDate="2017-06-16T05:57:52.327" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="712" PostTypeId="2" ParentId="690" CreationDate="2017-06-16T06:14:39.580" Score="5" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;One thing that helps in my experience (albeit with older students) is to give a pseudo-code cheat-sheet and insist that the problem has to be solved only using the building blocks on the sheet. In particular, you must insist that anything that is not on the list must be written using the building blocks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if at some point they need to fill an array with something, there is no magical &quot;fill the array&quot; step. The students have to first define it in terms of increment, for loops, or whatever you have in the pseudo-language. And that is the hard part. What do you allow in your pseudo-code? Side effects? Functions vs Procedure? By-value, and by-reference parameter passing? It all depends.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One way to reach the point where you can actually write pseudo-code, is to start from slightly more general problem statements, then refine it in smaller steps, and then again, until you arrive toward something that is pseudo-code. In your example I would start the exercise by asking just &lt;strong&gt;&quot;Devise an algorithm that calculates a user’s paycheque based on the hourly rate and the number of hours.&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would let the student work collectively while guiding them and only let them do the actual last step (English -&gt; pseudo-code) individually. And gradually help them less and less. For instance a student might say &quot;oh you multiply early rate by number of hours and done&quot;. Yes but where do you get the rate and hours from? &lt;em&gt;&quot;Huh? Maybe I need to read them from somewhere or ask the user&quot;&lt;/em&gt;. And what do you do with the result ? &lt;em&gt;&quot;Oh yes&#xA;that's right I have to display it&quot;&lt;/em&gt; etc... And then when you have all the bits, put them in order and express them using pseudo-language.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="746" LastEditorUserId="27" LastEditDate="2017-06-16T10:48:57.683" LastActivityDate="2017-06-16T10:48:57.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="713" PostTypeId="2" ParentId="682" CreationDate="2017-06-16T06:44:41.443" Score="2" Body="&lt;p&gt;To the already excellent answers given here, I'd suggest adding the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;While guest lectures are important, they might not be easy to setup. Someone has to take time outside their schedule, prepare a lecture and so on (if your colleagues are as willing as you are then no problem, but that might be an obstacle). In that respect I think doing transdisciplinary projects are easier to start collaboration. You do something e.g. with the Physics teachers and you only ask them to review your project text, and add pointers to their own teaching material were relevant.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some topics: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Physical simulations (with visualisation) is incredibly fun. For instance simulate a bouncing ball (with rebound, and collision with other balls, they can play with gravity, then elasticity then friction...) And the nice thing is you can achieve excellent result using the plain old equation used by the Physics teacher (these are not used as is in game engines for accuracy and performance reason of course, but you can still do some fun stuff that looks reasonable).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Obviously in math anything related to plotting functions (like a nice gui with zooming etc...) is nice.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;One of the cool thing is that (1) they get to better understand the topic of the other course (provided you double check with your colleagues that you don't state anything foolish !) but it also allows you to introduce some CS problems : the computer is a discrete machine, you need to approximate numbers, this leads to errors which lead to graphical glitches etc...&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2017-06-16T06:44:41.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="714" PostTypeId="2" ParentId="690" CreationDate="2017-06-16T07:09:30.097" Score="4" Body="&lt;p&gt;Even though it can be complicated, recursion gives a great algorithmic view of problems. I have seen quite a few students start to think in an algorithmic way after I introduce recursion (just very simple problems such as printing the individual characters of a string. I'll refer to this exercise as an example task throughout the answer). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gives them the basic idea of what thinking in an algorithmic way means. I go with them every step of the way, and make sure that they all understand exactly what's going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I go on to saying that the core of algorithmic thinking is breaking a problem into smaller problems that are very similar to one another (sort of like doing an operation on a tree; you preform on a node, and then on it's children, and so on). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually I find it useful to have a classroom discussion on how one deals with big problems/tasks. I lead them to the conclusion that they need to break it into smaller problems, conceptually, before they can write a code that tackles the big problems. This gets the notion of treating problems as a collection of easy tasks that are solved one at a time in a similar manner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After saying this, I remind them the small recursive task from the beginning. All the program does is print the first letter of the given string. That's easy to the point of ridiculous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, the students understand that algorithmic thinking is just breaking a problem into smaller problems that they know how to solve. A part of algorithmic thinking is turning the input into a form or structure that they can handle in an easy way. This is shown in the example task by turning a string, which is a bit more complex than a single character, into a single character. This is the process of simplification of the problem, which is essential in algorithmic thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From students' feedback, this method works very well. In fact some students start searching (pun intended) for search algorithms and they quickly find and use alpha-beta pruning, minmax and others. They really get the idea of thinking algorithmically. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-16T07:09:30.097" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="715" PostTypeId="2" ParentId="706" CreationDate="2017-06-16T10:09:13.590" Score="1" Body="&lt;p&gt;I don't think that student learn that much from just running someone else's code without going through it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copy &amp;amp; pasting can be really useful for sharing code that has been deliberately 'broken': you can demonstrate / explain code that is working and then introduce deliberate mistakes for students to find and fix when they copy / paste.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way they get the speed advantages of copy / paste but they also have to engage their brains whilst getting experience debugging. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can give students code to copy that they then have to comment / adapt / extend.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-16T10:09:13.590" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="716" PostTypeId="5" CreationDate="2017-06-16T10:26:24.517" Score="0" Body="&lt;p&gt;Pseudo code is an abstraction over the typical statements and structures of programming languages but with many details left out. It is possible to think of it as a &lt;em&gt;sketching mechanism&lt;/em&gt; for the creation and documentation of algorithms, in particular, and programs in general. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no formal, generally accepted form of pseudo code, with users adopting and adapting things to meet their needs. Statements in pseudo code can be high level or low, well understood or not. Depending on how much detail is included in a particular pseudo code there may be a great deal of work still to be done to implement the ideas in an executable program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some forms of pseudo code have become moderately widely used, however. One example is the language used in David Gries' &lt;em&gt;The Science of Programming&lt;/em&gt;, which is adapted from the notations used by Edsger Dijkstra in many papers. The book (and Dijkstra's papers) used the notations in the classic way, to develop algorithms and show a logical process for their development. The technique depends heavily on the analysis and exploitation of pre- and post-conditions. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-29T12:21:31.887" LastActivityDate="2017-09-29T12:21:31.887" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="717" PostTypeId="4" CreationDate="2017-06-16T10:26:24.517" Score="0" Body="&quot;Pseudo code&quot; is a way to write down algorithms in a human-understandable, program-like form. It can be used to draft or explain algorithms independent of a concrete programming language. The statements used are often similar to the ones existing in concrete programming languages. Use this tag for questions related to the teaching of pseudo-code. " OwnerUserId="793" LastEditorUserId="1293" LastEditDate="2017-09-29T12:21:31.887" LastActivityDate="2017-09-29T12:21:31.887" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="718" PostTypeId="5" CreationDate="2017-06-16T10:30:37.833" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-16T10:30:37.833" LastActivityDate="2017-06-16T10:30:37.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="719" PostTypeId="4" CreationDate="2017-06-16T10:30:37.833" Score="0" Body="Questions regarding code style (i.e. topics like indentation, naming, vertical alignment) and how to teach it" OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-06-16T15:00:53.647" LastActivityDate="2017-06-16T15:00:53.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="720" PostTypeId="5" CreationDate="2017-06-16T10:33:39.297" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-16T10:33:39.297" LastActivityDate="2017-06-16T10:33:39.297" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="721" PostTypeId="4" CreationDate="2017-06-16T10:33:39.297" Score="0" Body="EGit is an Eclipse plugin providing support for the version control system Git. It is based on JGit, a Git library written in Java." OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-06-16T15:01:06.133" LastActivityDate="2017-06-16T15:01:06.133" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="722" PostTypeId="5" CreationDate="2017-06-16T10:41:09.073" Score="0" Body="&lt;p&gt;Flowcharts were invented in the early days of programming to try to capture the logic flow of a program. They were deemed necessary when languages had only low-level statements, closely modeling the actual machine operations. It was too difficult to develop programs at the time, due to the limitations of human thinking - memory especially. The key element of a flow chart is a decision &quot;box&quot; that notes the details of some logic operation. Depending on the evaluation of the logical expression, the &quot;flow&quot;, represented by arrows, moves to some other element of the computation, perhaps a process or another decision. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When languages developed higher level features such as &lt;code&gt;if-then&lt;/code&gt; and &lt;code&gt;while-do&lt;/code&gt;, it was discovered that flowcharts have too many degrees of freedom to be truly reliable. While originally developed as a methodology of creating a program design, they later evolved into an automatically generated documentation of a design created otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flow charts may be used in limited cases for small and relatively simple things, but for large programs they are now less used. The danger of unrestrained flow charts is in the degrees of freedom they embody, making it possible, even easy, to create designs beyond human comprehension and hence programs that are unreliable and unmaintainable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When &lt;em&gt;structured languages&lt;/em&gt; such as Pascal and (arguably) C were created, a diagramming method called Structured Flowcharts was also created, but it bears little resemblance to the classic flowchart. By design, structured flowcharts have many fewer degrees of freedom than the original, hence are safer to use. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-29T12:10:33.043" LastActivityDate="2017-09-29T12:10:33.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="723" PostTypeId="4" CreationDate="2017-06-16T10:41:09.073" Score="0" Body="A flowchart is a diagram displaying a program's logic &quot;flow&quot; by using different boxes for decisions, statements, operations and routines which are connected by arrows. This tag is for questions related to the teaching of flowcharts. Structured flowcharts are a separate mechanism, also used for design, but with little resemblance to the classic flowchart. " OwnerUserId="793" LastEditorUserId="1293" LastEditDate="2017-09-29T12:10:33.043" LastActivityDate="2017-09-29T12:10:33.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="724" PostTypeId="2" ParentId="583" CreationDate="2017-06-16T11:07:40.967" Score="0" Body="&lt;p&gt;Pass by reference: &quot;Can I have your phone number?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pass by value: &quot;Can I have your phone?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is that 'things' have both a physical form, but also a meta form. Humans have a body, and a name. The physical form is the thing itself, in all its nuance and complexity, and is heavyweight and non-trivial to duplicate. The meta form is a mere reference to physical, and therefore lightweight and easy to reproduce. I have only one phone, and creating a duplicate of it would be a non-trivial thing to do, but I can give my phone number out to millions of people with little cost.&lt;/p&gt;&#xA;" OwnerUserId="851" LastEditorUserId="58" LastEditDate="2017-06-24T03:22:53.343" LastActivityDate="2017-06-24T03:22:53.343" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="725" PostTypeId="2" ParentId="690" CreationDate="2017-06-16T11:37:48.260" Score="6" Body="&lt;p&gt;Sounds like you've tried everything already, but here are some suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use a scenario / problem that every student can relate to&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Most of my lower ability 13-14 year old boys don't have much experience of wages, tax and jobs. Writing an algorithm for making a perfect cup of tea doesn't do much for them either. Drawing a flow chart for &lt;strong&gt;how to irritate a teacher&lt;/strong&gt; and comparing it to &lt;strong&gt;how to get a merit / positive / reward / whatever the equivalent in your school&lt;/strong&gt; is always a memorable lesson.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them lots of practice at understanding pseudocode before asking them to write it&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Getting students to physically act out instructions can be time consuming and patronising but can also be really helpful for students struggling to visualise the sequence. Getting students to take turns giving instructions to sort numbers (bits of paper stuck to a wall) is a good way of doing this. Alternatively, you can set some challenges &lt;a href=&quot;http://tools.withcode.uk/ks4pseudo/&quot; rel=&quot;noreferrer&quot;&gt;like this&lt;/a&gt; so students can work through the process of following instructions, ideally with instant feedback if they get each one right.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them broken algorithms to fix&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This works really nicely as a team activity. First, students work in pairs to diagnose and fix problems in algorithms you give them and then they design algorithms for each other with some obvious mistakes. The mistakes could be using the wrong symbols in a flowchart (leading to a discussion about syntax errors), writing a statement that doesn't really make sense (leading to a discussion about needing crystal clear, unambiguous instructions) or writing an instruction that's just plain wrong (leading to a discussion about logical errors)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-16T11:37:48.260" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="726" PostTypeId="2" ParentId="4" CreationDate="2017-06-16T12:48:23.730" Score="1" Body="&lt;p&gt;I would give them labs that can later be reused for polymorphism. For example, introduce class signatures for &lt;code&gt;Apple&lt;/code&gt;,&lt;code&gt;Banana&lt;/code&gt;,&lt;code&gt;Cake&lt;/code&gt;,&lt;code&gt;Dinner&lt;/code&gt;. Then you say that they need to implement a system of a &lt;code&gt;Dinner&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Dinner{&#xA;    //store the banana objects and apple objects &#xA;    //        (you can say that an array is useful here, as the dinner can't contain 20,000 apples.&#xA;    //and also a collection of cake objects&#xA;&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And ask them to implement a system which allows the creation (which means they would have to write a constructor) of a &lt;code&gt;Dinner&lt;/code&gt;. Then they should write methods for the &lt;code&gt;Dinner&lt;/code&gt; object, so that one can add apples, bananas and cakes to the diner (this can be tricky; they'd need to keep an index for the arrays) and methods for when a customer orders a cake etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This assignment covers objects, including composition (no pun intended) and methods etc. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-12-18T15:39:00.053" LastActivityDate="2017-12-18T15:39:00.053" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="727" PostTypeId="1" CreationDate="2017-06-16T13:34:58.013" Score="11" ViewCount="507" Body="&lt;p&gt;I was talking to a student today, and explaining that NP problems are hard to solve, but easy to verify.  I used password encryption/decryption as an example, but he got stuck.  He was unable to fathom how, given the hash, you couldn't just reverse your steps backwards to the password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started explaining a bit about encryption, but I came to think that my example was fundamentally not a very good one.  My goal is not to get into the weeds with encryption, my goal is to be able to explain what an NP problem is in a really intuitive way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is a clear analogy or example to describe NP?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-04-30T17:39:46.500" Title="Intuitive example of an NP problem" Tags="|teaching-analogy|complexity-theory|" AnswerCount="7" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="728" PostTypeId="1" CreationDate="2017-06-16T14:05:32.067" Score="15" ViewCount="2263" Body="&lt;p&gt;These days, we've got all this fancy, new-fangled technology. We've got live coding, we've got presentations, we've got remote desktop adapted for classroom use. There seems to be a tool for every teaching problem. But when should we ignore the KnowledgeInjector&lt;strong&gt;2000&lt;/strong&gt;&lt;sup&gt;TM&lt;/sup&gt; and instead use the good old blackboard?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, which concepts are easier to explain with a blackboard and how would you use a blackboard to explain them?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-10-11T18:29:43.257" LastActivityDate="2017-10-11T18:29:43.257" Title="When should I scrap my projector for a blackboard?" Tags="|classroom-infrastructure|" AnswerCount="7" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="729" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T14:19:47.947" Score="4" Body="&lt;p&gt;One example is the front end web development concept of the box model. For those who do not know what the box model is, here is a graphic:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/uWkEw.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/uWkEw.gif&quot; alt=&quot;The box model&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that there is no real way to explain it without drawing it out. Usually, when I teach this, I've already covered basic HTML and CSS syntax, including a few properties (e.g. &lt;code&gt;background&lt;/code&gt;). I like to give the example of creating a span with some text inside, so I draw on the board:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Hello Class!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'll then explain that the browser sees that as the &quot;content&quot; of the element, and draws a box around it, so I draw a box around it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;|---------|&#xA;| Content |&#xA;|---------|&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'll also point out that the browser draws a box around the entire element:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;|-----------------|&#xA;|                 |&#xA;|   |---------|   |&#xA;|   | Content |   |&#xA;|   |---------|   |&#xA;|     Element     |&#xA;|-----------------|&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then I'll explain that the browser need to how much space to give the element on the outside and how much space it needs to give the content, which introduces padding and margin, and finally I'll add a border, finishing my explanation.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-16T14:19:47.947" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="730" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T14:19:57.313" Score="3" Body="&lt;p&gt;You can use a blackboard with a fun on board example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good way to explain what the computer does while executing a recursive method, is to debug a (simple) recursive method. This is done by hand (on the blackboard) by going through the method line by line, and with every recursive call, going down 1 line (on the board) and indenting. Then going through the method line by line, with the parameters passed from the recursive call. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is done recursively, and when a &lt;code&gt;return&lt;/code&gt; statement is met, you go down 1 line (again, on the board) and &quot;unindent&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is great way to explain recursion. The students see on the board the process done by the computer. While drawing it on a computer and projecting it does show the final result, the process itself might be lost on the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also some value to seeing how the call stack works, but that's a side bonus. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another nice bonus to this is a situation where one runs out of space while going down lines on the board. That's when the instructor should turn dramatically towards the students and say &quot;And that, is what &lt;em&gt;stack overflow&lt;/em&gt; means.&quot;&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-16T14:29:09.510" LastActivityDate="2017-06-16T14:29:09.510" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="731" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T14:25:43.340" Score="6" Body="&lt;p&gt;My poor blackboard&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; only gets light use nowadays, I'm afraid.  Coding examples are usually too large to put up there, all of my intricate diagrams are clarified with (judicious!) animations in PowerPoint, and my debugging gets demonstrated live on the projector screen.  The humble blackboard has seen its role reduced in CS classrooms as the years have gone by.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It still has its place, though!  Improvised diagrams go up there, such as when a student asks an unexpected question about a linked list.  And pulling a struggling kid up to the board (during individual work time, &lt;em&gt;not as some form of humiliation)&lt;/em&gt; can give us space, both mental and physical, to work through a conceptual problem together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, in more advanced CS coursework, we start veering back towards the mathematical, where the blackboard is still king.  Well, maybe not the king anymore, but at least a Marquess or an Earl.  Working through problems and proofs at the blackboard keeps the pace slower than a PowerPoint and gives the students that much more time to absorb the material, and asking students to write up the answers to in-class questions allows us to have class discussions around the results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there's one more place where the board comes in handy: harder labs, especially the kind that kids have a hand in designing themselves.  &lt;em&gt;I've found that my students naturally gravitate to the board when they need to brainstorm or work through a particularly tricky problem.&lt;/em&gt;  Something about having all that space to think and try frees the mind.  Paper just doesn't seem to do this same trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The blackboard may be dying, but it ain't dead yet.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; Okay, technically I use a whiteboard in my classroom. I'd prefer a blackboard, but I don't get that choice in real life. But I get my choice here and now, in this very answer, and &lt;em&gt;blackboard, I choose you.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-16T14:25:43.340" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="732" PostTypeId="2" ParentId="727" CreationDate="2017-06-16T14:52:45.273" Score="6" Body="&lt;p&gt;Map coloring is a very nice example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is NP to find if the graph is planar or not (you can reduce the map coloring if a graph is planar or not), but it is relatively easy to see if the colored map has &amp;lt;= 4 colors.&lt;/p&gt;&#xA;" OwnerUserId="868" LastActivityDate="2017-06-16T14:52:45.273" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="733" PostTypeId="1" CreationDate="2017-06-16T15:00:49.430" Score="12" ViewCount="940" Body="&lt;p&gt;In my institution we are close to starting a new graduate level program for game development. However, this program will accept non-digital game designers or other non-experts (real architects who are into interactive design), too. Therefore, the programming course must cover inexperienced programmers (an introductory course for adults who have bachelor's). At the same time, it is preferable if it also includes tools for expert programmers who may also have bachelor's in computer science (this part is optional).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The program is designed to be generic. So, some people may prefer to come up with 3D games using an engine, while others prefer to instantiate board games for children. As you may see, programming is not the aim as in CS courses, but just another tool, here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What language might be a good choice to teach inexperienced programming in the game domain?&lt;/p&gt;&#xA;" OwnerUserId="868" LastEditorUserId="104" LastEditDate="2017-07-13T08:37:16.380" LastActivityDate="2017-07-13T08:37:16.380" Title="What would be a good first choice to teach game programming to beginners?" Tags="|language-choice|game-design|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="734" PostTypeId="2" ParentId="690" CreationDate="2017-06-16T15:07:39.793" Score="8" Body="&lt;p&gt;I remember a demonstration from early in my first college CS course (this was in 1998, almost 20 years ago!), where the professor brought in a loaf of bread, a butter knife, a jar of peanut butter, and a jar of jelly. He then asked the class to give him instructions to make a peanut butter sandwich, with predictably hilarious results. After we had finally created the first messy sandwich, he had us repeat the exercise, but this time we had to record the steps on the board in advance. Then he followed the steps, again with hilarious results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point, of course, was to first teach us that computer will always take things literally, always do exactly what you tell them, and that mistakes early in the process can cause good instructions later on to have bad results. It's important that &lt;em&gt;both&lt;/em&gt; the algorithm be correct, and that each instruction that composes the algorithm is correct. It also demonstrated the degree to which we rely on common abstractions and idioms that are often not perfectly represented in the computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the college age, I felt like it was kind of simplistic for us. But for 13-14 year olds this would be perfect.&lt;/p&gt;&#xA;" OwnerUserId="871" LastEditorUserId="871" LastEditDate="2017-06-16T15:13:33.010" LastActivityDate="2017-06-16T15:13:33.010" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="735" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T15:41:09.840" Score="4" Body="&lt;p&gt;The last time I used a whiteboard as a whiteboard was to describe a maze building algorithm. It was a small-ish board that I put on the ground and drew a grid. I then stepped in a square and we walked (literally and algorithmically) through the algorithm where I built the maze. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whiteboard on the front of my room gets used sometimes when I want to write over examples. I'll project and then annotate what's there. But that's rare, and it's usually covered up with a large projector screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, my handwriting is terrible and my classroom is large enough that it's tough to see anything I write from the back. So that's probably part of the reason. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somewhat related story here...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I interviewed, before I saw the classroom, the AP that was interviewing me was very apologetic that there wasn't a Smartboard in the classroom. They had just gone through a rebuild and reconfigured most of the classrooms, and most had a Smartboard. Mine had &quot;just a normal screen.&quot; When I walked in I was good with the screen. It's almost floor to ceiling and covers probably 80% of the width of my room. Much better than a little Smartboard. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-16T15:41:09.840" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="736" PostTypeId="2" ParentId="733" CreationDate="2017-06-16T15:59:49.113" Score="5" Body="&lt;p&gt;There are commercial flavours of the BASIC language that specialise in creating games; I remember briefly playing with Blitz Basic many many years ago and found it easy to work with, but there are numerous competing products you might want to also consider.  Despite dramatically reducing the complexity of creating games, absolute beginners are still going to have to do a lot of coding before they get to the point where they can create more than ultra-trivial games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A non-commercial option would be to use Python and Pygame.  Python is a fairly modern and friendly language, often used in schools as a first language, and Pygame is a fairly popular (and therefore well supported/documented) extension.  Again, absolute novices will need to do a lot of work with Python before they reach the Pygame level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a way of making the grunt work of learning to code more interesting/rewarding for novices, you might want to investigate games that feature editors for building new levels.  These editors often use scripting for game events (Lua I believe is a popular language in such cases), meaning novices can learn to code by augmenting an existing game rather than building their own game from scratch.  The issue here is that transitioning away from writing event scripts to writing full game code may be traumatic, particularly as it will almost certainly require learning a new language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course Scratch (and its various siblings/clones) offers a way of covering the theory behind coding in a rewarding and friendly way, without actually 'writing' any code.  Given its popularity, no doubt there are plenty of resources to help transition students from Scratch to 'real' languages such as Python.&lt;/p&gt;&#xA;" OwnerUserId="851" LastActivityDate="2017-06-16T15:59:49.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="737" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T16:18:57.297" Score="13" Body="&lt;p&gt;Shifting to the blackboard/whiteboard from the projector serves two main purposes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Slows down the pace of instruction.&lt;/strong&gt; I can type much faster than I can write on the whiteboard. However, this is not always a good thing. When I'm discussing something complex or want to ensure my instruction does not move too quickly, I shift to writing things out. This forces me to be more thoughtful with timing and often times has prevented me from giving students more information than was necessary for a particular lesson.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shifts focus from code to concept.&lt;/strong&gt; As I say in a lot of my answers, differentiation is key. Staring at code to understand a concept is not always going to make it sink in. By writing on the board, I often times can draw close attention to a concept (i.e. recursion or variables) outside of its context within a program. When introducing something new and/or something complex, this helps me ensure that students understand the &lt;em&gt;thing&lt;/em&gt; before they code that &lt;em&gt;thing&lt;/em&gt;. For example, with recursion, I draw out stack frames, naming each one with its function name and arguments and drawing arrows with values passed in and values returned. The magic of a few lines of code that calculates a factorial becomes a little less opaque when there's a visual abstraction to which students can connect the code. Additionally, introducing variable assignment to beginners, especially something like &lt;code&gt;x = x + 1;&lt;/code&gt;, works well on the whiteboard where I can number the steps, translate it into &quot;English&quot; underneath, use different colors, etc. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;: It's not always a game of either/or. Projecting code onto a whiteboard mixes the modalities: students can see &quot;real code,&quot; but that same code can then be analyzed and annotated by hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my own unique context in a classroom with whiteboard-top desks, I can have students write down what I write down when I use the whiteboard. It becomes a shared task since we are all doing the same thing and forces me outside of the &quot;sage on the stage&quot; paradigm for a minute. Instead of lecture and fast-typing, I can participate along with them in writing on a whiteboard. This has as much to do with engagement and classroom environment as it does with pedagogy.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="150" LastEditDate="2017-06-16T16:21:04.577" LastActivityDate="2017-06-16T16:21:04.577" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="738" PostTypeId="2" ParentId="728" CreationDate="2017-06-16T16:40:39.313" Score="10" Body="&lt;p&gt;I'm working in TCS, so my lectures are relatively mathematical.&#xA;For me, it's a rather clear split:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Definitions, Inference Systems, etc.: Projector (+ lecture notes)&lt;/li&gt;&#xA;&lt;li&gt;Lemmas, Theorems: Projector (+ lecture notes)&lt;/li&gt;&#xA;&lt;li&gt;Proofs: Blackboard (+ lecture notes)&lt;/li&gt;&#xA;&lt;li&gt;Examples: Blackboard&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The advantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I save some time compared to a blackboard-only lecture.&lt;/li&gt;&#xA;&lt;li&gt;I can refer to definitions and lemmas on the projector while presenting proofs or examples on the blackboard (while proving Thm. 3.7: &quot;... and now we can use Lemma 3.4 &lt;em&gt;[shows Lemma 3.4 on the projector]&lt;/em&gt; and we get a contradiction ...&quot;)&lt;/li&gt;&#xA;&lt;li&gt;I have the necessary amount of space for proofs (much more than using a projector).&lt;/li&gt;&#xA;&lt;li&gt;I present proofs and examples at a reasonable speed.&lt;/li&gt;&#xA;&lt;li&gt;I can point to the blackboard with my hands, which is much more effective than using a laser pointer (&quot;... and now we compare this subterm &lt;em&gt;[marks some text with the left hand]&lt;/em&gt; and that subterm &lt;em&gt;[marks some text with the right hand]&lt;/em&gt; ...&quot;).&lt;/li&gt;&#xA;&lt;li&gt;I can improvise examples whenever necessary.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="877" LastEditorUserId="877" LastEditDate="2017-06-16T16:50:28.800" LastActivityDate="2017-06-16T16:50:28.800" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="739" PostTypeId="2" ParentId="733" CreationDate="2017-06-16T17:55:14.843" Score="2" Body="&lt;p&gt;We used processing in our summer program. It's a 4 week full day Mon-Fri program for rising 9 - 12 graders with no experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that time frame, they're able to learn some good CS fundamentals and write a nice project and games are the most common projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Processing isn't a game development platform per se so that is both an advantage (teaching core cs using essentially Java) and a disadvantage (no built in game support although Processing is made for graphical applications that are dynamic with respect to time).&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-16T17:55:14.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="740" PostTypeId="2" ParentId="733" CreationDate="2017-06-16T18:13:06.330" Score="14" Body="&lt;p&gt;For those interested in 3D (though, it can be used in 2D) game making with an engine, I would suggest teaching &lt;a href=&quot;https://unity3d.com/&quot; rel=&quot;noreferrer&quot;&gt;Unity&lt;/a&gt;. It's an engine and a platform for creating games. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unity can be used with C# and Javascript, which means that those who choose to use it will also have some experience with some very popular high-level programming languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, Unity is, in part, a graphical engine. This means that the game is made in a graphical way, and the student can decide how much coding would be involved (Unity has an asset store, in which some scripts can be used. Some are free and others are not). This allows students to be comfortable with the game they are making, and they decide how much programming they do. This&#xA; degree of freedom is often very beneficial for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A portion of making a game in unity involves designing, and artistic work. This can be a very convenient environment for the students who are into interactive design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall, Unity fits the bill by being flexible and answering each students needs and areas of interests and expertise. So I think that it is a very good choice to start with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my experience, it's quite enjoyable to make games with it just for the sake of playing around with the software. This isn't too relevant to the question, but students who enjoy working on projects are more likely to make great projects.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-16T18:13:06.330" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="741" PostTypeId="5" CreationDate="2017-06-16T19:00:16.457" Score="0" Body="&lt;p&gt;Instructors often have teaching problems/issues for which some resource would help. Often they have no knowledge of what the resource might be (a language or tool or a set of exercises, perhaps), but they are pretty sure that such resources must exist. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag to solicit references to resources and their usages. The questioner should be quite specific about the need to be addressed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those answering these questions are strongly encouraged to post only one resource per answer, answering multiple times if necessary. An exception might occur for a single answer giving a set of closely related resources. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-05T21:59:13.130" LastActivityDate="2017-09-05T21:59:13.130" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="742" PostTypeId="4" CreationDate="2017-06-16T19:00:16.457" Score="0" Body="For questions requesting teaching/classroom resources for a specific topic or lesson. To get a good answer, ensure your request is specific to a certain type of resource, and does not invite excessively broad or opinion-based answers. Check some of the highly voted example questions in this tag to see how to ask a good 'resource request'." OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-06-16T22:46:19.587" LastActivityDate="2017-06-16T22:46:19.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="743" PostTypeId="2" ParentId="339" CreationDate="2017-06-16T19:09:02.310" Score="0" Body="&lt;p&gt;I kept a copy of Amelia Bedilia around to read, when I was at a school where the power would go out.  If the power was out long enough, we would do pseudocode algorithms, or something of that sort until the power turned back on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also had a set of identical LEGO cars and kept one set of instructions, and did sort of a network simulation to have groups build the cars by carrying instructions from the &quot;server&quot; (who had the one set of instructions).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also keep some of what Dan Meyer calls &quot;Tiny Games&quot; in my back pocket, for any time that the internet is down or we can't get on computers. Not all of them are explicitly CS related, but I think the logical thinking is useful. &#xA; &lt;a href=&quot;http://blog.mrmeyer.com/2013/tiny-math-games/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://blog.mrmeyer.com/2013/tiny-math-games/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="884" LastActivityDate="2017-06-16T19:09:02.310" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="744" PostTypeId="2" ParentId="693" CreationDate="2017-06-16T19:19:59.837" Score="2" Body="&lt;p&gt;Code.org has a CS Principles curriculum available for free, and I think this would meet your needs.  &lt;a href=&quot;https://studio.code.org/courses/csp&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://studio.code.org/courses/csp&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never used it with a class, but it starts with an implementation of blockly (&lt;a href=&quot;https://developers.google.com/blockly/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://developers.google.com/blockly/&lt;/a&gt;) and transitions to Javascript in Units 3 and 5.  It also allows students to create apps, using AppLab.  It starts with a turtle and moves through to user interfaces and beyond.&lt;/p&gt;&#xA;" OwnerUserId="884" LastActivityDate="2017-06-16T19:19:59.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="745" PostTypeId="2" ParentId="203" CreationDate="2017-06-16T19:25:48.190" Score="2" Body="&lt;p&gt;I've personally had a lot of enjoyment from doing something like FreeCodeCamp (&lt;a href=&quot;https://www.freecodecamp.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.freecodecamp.com&lt;/a&gt;) and wonder if older adults might like starting out with something like simple web design.  It seems like most people probably have a reason to make a website, and knowing the basics of web design helps to understand how the internet works.  The nice thing about FreeCodeCamp is that it is self-paced and has some theory, so if people want to keep going toward a career that is an option, but if not, there is no pressure.&lt;/p&gt;&#xA;" OwnerUserId="884" LastActivityDate="2017-06-16T19:25:48.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="746" PostTypeId="2" ParentId="628" CreationDate="2017-06-16T19:45:52.647" Score="5" Body="&lt;p&gt;Depends on the course.  For more theoretical CS courses, paper and pencil would be fine.  But for the more &quot;hands on&quot; language courses that involve coding, a computer-based exam would be best so the students can concentrate on the thinking part of creating code and not on memorizing all the syntax nuances.  There are too many in modern languages for anyone to remember.  If all that is expected is to write &quot;pseudocode&quot; to demonstrate knowledge of an algorithm or design pattern, paper and pencil would be fine.&lt;/p&gt;&#xA;" OwnerUserId="888" LastActivityDate="2017-06-16T19:45:52.647" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="747" PostTypeId="2" ParentId="161" CreationDate="2017-06-16T20:00:52.263" Score="4" Body="&lt;p&gt;&lt;a href=&quot;https://www.greenfoot.org/door&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; is an IDE for Java which was created for teaching purposes. It displays a graphical &quot;world&quot; (a two dimensonal rectangle with configurable background) in which &quot;actors&quot; can be created, deleted, react to user input and move.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is using Java and is therefore object-oriented, which could be demonstrated by placing multiple actors of the same class in a world. Additionally, extending classes is visualized using a tree diagram and has to be done from the beginning on as each &quot;actor&quot; has to be a subclass of the abstract &lt;code&gt;Actor&lt;/code&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As stated on the &lt;a href=&quot;https://www.greenfoot.org/overview&quot; rel=&quot;nofollow noreferrer&quot;&gt;overview page of Greenfoot&lt;/a&gt;, it has auto-completion and a built-in access to documentation, which is (as far as I remember) quite good. The auto-completion seems to work good as well (I've just done a quick test). Auto-indentation is also included, but has to be triggered manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has a &quot;Compile&quot; button but seems to compile automatically after saving so if you want to run your project, you can just press the &quot;Run&quot; button.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to language oddities you could say it has all oddities Java has - relevant for starters might be the &lt;code&gt;==&lt;/code&gt; or &lt;code&gt;equals&lt;/code&gt; problem when comparing strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally always enjoy working with Greenfoot, but depending on (mental) age and programming interest of your students, a &lt;a href=&quot;https://cseducators.stackexchange.com/a/165/793&quot;&gt;graphical language like Scratch&lt;/a&gt; could be a better (more motivating) choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a sidenote: Greenfoot has recently introduced the &quot;Stride&quot; language which introduces its own syntax, forces indentation by being a bit more graphical and can be (only) used through shortcuts. I haven't extensively tested it yet, but didn't want to leave it unmentioned.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-06-16T20:00:52.263" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="748" PostTypeId="2" ParentId="690" CreationDate="2017-06-16T20:49:59.810" Score="2" Body="&lt;p&gt;Do you know about the initiative called Scratch?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a visual and algorithmical language, it can be useful as an introductory subject for your students.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In scratch you can visually build loops, conditionals, functions, and return events, it's a whole language that is more approachable to beginners, and maybe might incite more their inquisitive nature. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It helps by literally making them shape visually an algorithm or program, they could also share it with fellow students and get other's code from the community, it also has some fun features such as running a loop to play sounds or images.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also used briefly in &lt;strong&gt;CS50: Introduction to Computer Science&lt;/strong&gt; from Harvard.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to give it a try, it could help your students, especially since they are so young.   &lt;/p&gt;&#xA;" OwnerUserId="892" LastEditorUserId="27" LastEditDate="2017-06-16T21:02:02.713" LastActivityDate="2017-06-16T21:02:02.713" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="749" PostTypeId="2" ParentId="690" CreationDate="2017-06-17T00:23:23.827" Score="7" Body="&lt;p&gt;I'm a bit confused by your question.  Your exercise seems to involve some combination of…&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Requirements gathering: what are the inputs, outputs, and formulas?&lt;/li&gt;&#xA;&lt;li&gt;Translating the requirements to a conceptual model&lt;/li&gt;&#xA;&lt;li&gt;Translating the conceptual model to pseudocode&lt;/li&gt;&#xA;&lt;li&gt;Translating the pseudocode to code&lt;/li&gt;&#xA;&lt;li&gt;Translating the pseudocode or code back to a flowchart (Why?  In decades of programming experience, I've almost never found flowcharts to be useful.  If anything, they encourage an if-then-goto mentality, which is the opposite of &lt;a href=&quot;https://mitpress.mit.edu/sicp/&quot; rel=&quot;noreferrer&quot;&gt;what you want to aim for&lt;/a&gt;.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's not clear from your question which parts of the exercise are provided to the students as givens, and which parts you expect the students to perform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, &quot;Devise an algorithm that calculates a user’s paycheque&quot; is &lt;em&gt;much&lt;/em&gt; too open-ended a question for a beginner!  All of those steps expect students to produce some output starting from a blank slate, which can be intimidating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, I'm not convinced that this exercise teaches useful &lt;em&gt;computer science&lt;/em&gt; concepts.  It may be a useful demonstration of what programmers do, but that's not quite the same thing.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As an alternative, I suggest giving exercises where the inputs, outputs, and expected behaviour are obvious.  The correctness of the response should be easily testable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For kids, you could try &lt;a href=&quot;https://codecombat.com&quot; rel=&quot;noreferrer&quot;&gt;Code Combat&lt;/a&gt; or &lt;a href=&quot;https://code.org/learn&quot; rel=&quot;noreferrer&quot;&gt;Code.org's exercises&lt;/a&gt;.  Some of the exercises can be done in visual programming environments using drag-and-drop blocks (like &lt;a href=&quot;https://scratch.mit.edu&quot; rel=&quot;noreferrer&quot;&gt;Scratch&lt;/a&gt; or &lt;a href=&quot;https://snap.berkeley.edu&quot; rel=&quot;noreferrer&quot;&gt;Snap&lt;/a&gt;), eliminating the fear that some students encounter when asked to write something starting with an empty screen.  If you're looking for more &quot;traditional&quot; programming environments, you could try &lt;a href=&quot;https://en.wikipedia.org/wiki/Karel_%28programming_language%29&quot; rel=&quot;noreferrer&quot;&gt;Karel&lt;/a&gt; exercises, which have been ported to a variety of programming languages.  These exercises all encourage students to develop algorithms — mainly to move characters on a board in a specified pattern.  In contrast to your open-ended exercise, these are highly guided activities, which gradually increase in difficulty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once students have mastered the concept of developing algorithms to solve problems with extremely well specified inputs and outputs, then they can be asked to apply those ideas to real-life problems, where the inputs are not fixed, the scope is unclear, and requirements are negotiable.&lt;/p&gt;&#xA;" OwnerUserId="897" LastEditorUserId="897" LastEditDate="2017-06-17T01:47:39.527" LastActivityDate="2017-06-17T01:47:39.527" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="750" PostTypeId="2" ParentId="727" CreationDate="2017-06-17T06:42:52.477" Score="8" Body="&lt;p&gt;If your student has tried it once, you can use sudoku as an example (it does not work so well if the student has never heard of it). &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Given a completed sudoku grid, write a program that verifies that it is valid: your student can probably write this simple program in a few minutes, or if you give the answer see that it is really easy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Given an incomplete sudoku grid, write a program that completes it. Much harder (although semi-naive backtracking works well for 9x9 grids)!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It gets even better because, if you already gave the Map coloring (or graph coloring example), you can show easily that a 9x9 sudoku is just a particular instance of graph coloring and this becomes a good example for NP-&lt;em&gt;completeness&lt;/em&gt;. (Just remark that a 9x9 sudoku is just a graph where each vertex corresponds to a cell in the sudoku, and an edge between two vertices means that the two corresponding cells are in the same row, column or block. Once a graph is built, try to 9-color it).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2017-06-17T06:42:52.477" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="751" PostTypeId="2" ParentId="690" CreationDate="2017-06-17T07:04:54.353" Score="2" Body="&lt;p&gt;&lt;a href=&quot;http://blog.karhatsu.com/2014/09/experiences-from-programming-with-kids.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here's an enlightening blog post&lt;/a&gt; about teaching programming to elementary school age children. They started without any computers at all by &quot;programming&quot; the teacher to walk from one corner of the class to the other using few simple commands. They then proceeded to use the &lt;a href=&quot;http://turtle-roy.herokuapp.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turtle Roy&lt;/a&gt; online programming environment which works like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Logo_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logo programming language&lt;/a&gt; and teaches you to think algorithmically, with visual results that are immediately visible.&lt;/p&gt;&#xA;" OwnerUserId="906" LastActivityDate="2017-06-17T07:04:54.353" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="752" PostTypeId="2" ParentId="639" CreationDate="2017-06-17T11:23:51.843" Score="3" Body="&lt;p&gt;The best encouragement is demonstrating how some simple changes can result in orders of magnitude improvements for a specific task. The best example I've seen took a synthetic benchmark, and between un-optimised 'C' and 10 lines or so of hand-crafted NEON assembler (together with a cheap re-arrangement of the base dataset), resulted in something like a 1:30,000 speedup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This &lt;a href=&quot;https://youtu.be/GPpD4BBtA1Y&quot; rel=&quot;nofollow noreferrer&quot;&gt;video&lt;/a&gt; was one example I found quickly, it's aimed at showing how you can help the compiler when writing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you've established the &lt;strong&gt;value&lt;/strong&gt; of optimised code, then you can go on to address where optimisations make sense. Code that only runs once might be best written for reliability and readability, code like memcpy may well be hand-optimised down to the level of machine micro-architecture. Code written for portability might be optimised differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When people try to optimise code by intuition, it is easy to make the wrong trade-offs. Most obviously when it comes to cache utilisation, but there are plenty of other micro-architectural traps which are less visible. Benchmarking is a critical part of optimisation (and this underpins the &lt;strong&gt;value&lt;/strong&gt; message). There will be optimisation folklore which no longer holds with modern hardware and modern compilers - and sometimes hinders the compiler or readability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you really need to focus on teaching (after you have set the scene for how optimal code is good), is simple, cleanly structured code. At most levels, letting the compiler do its job is the important thing. In the example of repeating a static calculation, the detail could equally be 'written like this, you seem to expect the size to be changing - is that what you meant to convey', rather than 'you do realise the compiler only needs to evaluate that once'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The opposite end of the scale is using a genuine resource constrained platform (as many of us learnt with), but these can be misleading with single level memory architectures and simple pipelines. In the MCU domain, interrupt latency is likely to be the limiting resource, rather than memory bandwidth (unless you're bit-banging a VGA output at the same time as running a 6502 emulator).&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-06-17T11:23:51.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="753" PostTypeId="2" ParentId="628" CreationDate="2017-06-17T12:22:40.877" Score="-2" Body="&lt;p&gt;Yes. If you use a computer to take a test, for instance, you will have the tendency to code and check the program if the software is already there else you verify your answers on the Internet. As a skilled programmer, you can take tests manually and to the coding part you can shorten it. The school and college tests are just to ensure that you can remember the concept well. &lt;/p&gt;&#xA;" OwnerUserId="914" LastEditorUserId="2" LastEditDate="2017-06-17T12:31:31.157" LastActivityDate="2017-06-17T12:31:31.157" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="754" PostTypeId="1" AcceptedAnswerId="788" CreationDate="2017-06-17T13:29:19.577" Score="8" ViewCount="566" Body="&lt;p&gt;I constantly have to struggle with freeing myself from two hindrances to my teaching: 1) The way I learned about computers, starting almost 40 years ago, and, 2) Amnesia of how I learned some concepts (like variables) that seem just too obvious now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Initially, I taught myself most of the time, long before I started college. Mostly I wrote simple self-challenge projects to print shapes on a PDP-11 terminal, because bigger kids monopolized the 2 Apple ][s at my high school. I had no internet (it came along after I was a 'Senior' Programmer Analyst), no textbooks, no magazines even, and no one I knew had any interest. So, my co-instructor often says that she has never met anyone else self-taught to that degree. I both remember how I learned, and cannot recall not understanding basic (ha ha) concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now, I am faced with people with no such strong drive to learn for its own sake, people with no desire to get shapes to print on the screen (but it is so much fun!) and the internet lapping at their screens. The final blow was seeing how the Visual Studio &lt;em&gt;AutoCorrupt&lt;/em&gt; is tormenting them before they can even finish typing a single line! &quot;Crush, Kill, Destroy!&quot; (famous quote from &lt;em&gt;Lost In Space&lt;/em&gt;. Even my jokes are old.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With my co-instructor, we bring two radically different backgrounds and approaches to teaching. It is like a marriage of a rational person and an intuitive one (me, if you can't tell by my writing). But we are both a bit lost about how to motivate students to work through discovering an algorithm for themselves instead of &quot;&lt;em&gt;Bad artists copy, Great artists steal.&lt;/em&gt;&quot; (Picasso)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you teach, differently from how you learned? How do you overcome your own blinders?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="104" LastEditDate="2017-06-28T05:48:40.140" LastActivityDate="2017-08-21T04:10:49.650" Title="How is your teaching affected by how you learned?" Tags="|best-practice|self-learning|" AnswerCount="3" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="755" PostTypeId="2" ParentId="690" CreationDate="2017-06-17T15:10:39.187" Score="5" Body="&lt;p&gt;I just finished up 8th grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took an Intro to Engineering/Robotics class as an elective this past semester. I have programmed (mainly in Python 3) before this class, and I was mainly excited for the Robotics part. When we started, the teacher talked to us about how the computer takes things very literally, etc, etc, and then - he had us pretend he was the robot. So he told us to &quot;program&quot; him to get to the door. Someone forgot to tell him to turn, so he literally walked into a wall. Another person got him too close to the door, so when someone else told him to lift up his arm - hit the door. So he walked us through that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then he gave us very simple exercises - turn the motor on at such and such speed for this time, and then stop it, and had us write out the pseudo code, check it with him, and then turn it into regular code, and so on. As the problems got more complex, the pseudo code got more and more important. One problem, the full solution's code was much more complex, and so he had most people do it an easier way, but he let me try the full solution, so I worked on it, and he had me diagram a part up on the whiteboard for him, and so on, and it worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess the point is, give an illustration - like the PB&amp;amp;J one that seems to be popular, or this one, and then emphasize pseudocode as they solve simple problems, and eventually, as the problems get more complex, it will serve them well. The key is to have them do tons of programming, and eventually it will come more naturally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea is to do a form of code golf - have people come up with solutions, pick a slower/longer solution, and encourage ideas to make it more efficient, and so on, until you have a much more ideal piece of code. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-17T15:10:39.187" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="756" PostTypeId="1" AcceptedAnswerId="784" CreationDate="2017-06-17T15:18:25.603" Score="20" ViewCount="2159" Body="&lt;p&gt;When people learn programming in a school setting, tests show a &quot;two hump&quot; tendency. Some students race ahead and grasp it relatively well and others struggle. Apparently this is more pronounced in programming than in other areas, like math or language. It seems to occur at all age levels and circumstances, and throughout a curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you observe this? If so, do you have any explanations, and any ways to address it? It seems to be particular to programming, so it is our problem to deal with.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="919" LastEditDate="2017-06-23T01:22:27.263" LastActivityDate="2017-07-10T21:02:01.587" Title="Do you see the &quot;Bimodal Distribution&quot; too?" Tags="|best-practice|student-motivation|" AnswerCount="5" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="757" PostTypeId="2" ParentId="733" CreationDate="2017-06-17T15:19:08.267" Score="4" Body="&lt;p&gt;Python (probably Python 3) would be a great option. Python is a very user-friendly language, perfect for beginner programmers (it also enforces good practices like indentation, etc). That being said, Python has many fantastic tools for experienced programmers, and is a very flexible language. It also has the already mentioned Pygame extension. Python is also widely used outside of the classroom, meaning it might be more useful to have experience with it than, say, BASIC or Scratch or game-specific platforms. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-17T15:19:08.267" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="758" PostTypeId="2" ParentId="130" CreationDate="2017-06-17T15:39:28.470" Score="6" Body="&lt;h2&gt;A quick exercise&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Write the most garbled code of your life (I know, I feel your pain) - terrible variable/function names, no indentation, code-golfed lines here and there, weird tricks, no comments, and so on.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Insert a small, barely-noticeable-in-good-code error.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask your students to find the error. (If you wish, tell them that this exercise is graded as motivation, or whatever.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go out for lunch, play a couple games of Monopoly, do some work on that coding project....then come back. Ask who has found the error. Ask why no  one has found the error. They will probably say that the code is terrible and hideous and convoluted.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Show them the same piece of code beautified - good variable/function names, indention, no code-golfing, comments, etc. Ask them to find the same error.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Explain the exact differences - i.e., the exact things you did to make the code hideous/good.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Admonish them to always do things the right way and use indentation or else they will go blind from terror and agony at a young age.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;A language solution&lt;/h2&gt;&#xA;&lt;p&gt;Force them to use Python for a few months. Never will you need to worry again.&lt;/p&gt;&#xA;&lt;h2&gt;A more painful exercise&lt;/h2&gt;&#xA;&lt;p&gt;Give students a longer term project. Let them indent or not indent to their hearts content. Say you don't care. Then listen to the whining from the students about how they don't know what they meant to do and that they need to start over because they didn't finish the project in one sitting. Step in from on high and explain the wonders of indentation again.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-17T15:39:28.470" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="759" PostTypeId="2" ParentId="17" CreationDate="2017-06-17T15:47:46.587" Score="3" Body="&lt;p&gt;Google recursion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/BIFA7.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/BIFA7.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a recursive link! Ah, google easter eggs...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you can maybe give them a problem that depends on recursion - like, say, a multiplication algorithm of some sort (I saw one somewhere that used recursion and was pretty simple - I'll edit to add it if I find it) to give a more programming oriented example. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-17T15:47:46.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="760" PostTypeId="2" ParentId="339" CreationDate="2017-06-17T15:52:52.710" Score="0" Body="&lt;p&gt;A kind of fun one might be to have a little kit of electronic components handy - transistors, LEDs, a couple of batteries, as fits the size of your class. You can build logic gates and then use these to build, say a half-adder, or whatever, and start abstracting from there, to introduce computer architecture, or you can use it to solve some sort of simple problem, or introduce truth tables, or whatever. It's also a fairly compact thing to store for those unfortunate occasions.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-17T15:52:52.710" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="761" PostTypeId="1" AcceptedAnswerId="767" CreationDate="2017-06-17T15:53:09.620" Score="10" ViewCount="751" Body="&lt;p&gt;I teach in a classroom where students sit at desks with dual monitors in front of them. The students face my desk at the front of the room, I cannot see their screens. Due to the height of the screens (set by our Accommodations staff) I can hardly see their faces when I am sitting down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I lecture, I use a projector to show one of my screens for programming examples, good links, videos, etc. I also project pages of the textbook and other printed materials. But I am not used to students sitting at desks with computers: when I was in school we didn't have them, and in college we had standard lecture rooms. There was nowhere else to look, really, except at the only moving thing in the room - the Instructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often, when I talk, the students are looking down... At their notes? The book? Something else? I can hardly see them behind their screens anyway (&lt;em&gt;must&lt;/em&gt; they be raised up all the way?) I try to present vital points on at least 3 different days, but sometimes nobody &quot;gets it&quot;, or only one or two do. Is it my teaching, or their attention? Do you experience this also and if so, what do you do? I have trouble giving firm directives due to my personality tendencies.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2020-01-15T14:55:28.097" Title="Do your students pay attention when you speak?" Tags="|adult-education|classroom-management|" AnswerCount="11" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="762" PostTypeId="2" ParentId="430" CreationDate="2017-06-17T16:00:32.357" Score="3" Body="&lt;ol&gt;&#xA;&lt;li&gt;Figure out some simple way to let him test out of a unit - a quicker program to show he knows his stuff, a simple conversation with you, something that doesn't require much effort.&lt;/li&gt;&#xA;&lt;li&gt;Ask him what he wants to do first - he might want to work on some impressive projects of his own.&lt;/li&gt;&#xA;&lt;li&gt;If he doesn't have any ideas, gather some challenging project ideas, and show them to him - they could be learning a language like lisp and writing some project in that, or they could be implementing an algorithm in a paper, or they could be... you get the idea.&lt;/li&gt;&#xA;&lt;li&gt;To include the cooperation aspect, get him started on an open-source project as well of his choosing, or let another advanced, interested student work with him on his challenging project.&lt;/li&gt;&#xA;&lt;li&gt;If he's disdainful of the way it's taught, you could challenge him to teach the class for a day.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastEditorUserId="150" LastEditDate="2017-06-17T17:38:20.787" LastActivityDate="2017-06-17T17:38:20.787" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="764" PostTypeId="1" AcceptedAnswerId="773" CreationDate="2017-06-17T16:13:51.803" Score="5" ViewCount="205" Body="&lt;p&gt;Is there a good online course that covers computer architecture at an undergrad level?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just finished 8th grade. I know a bit about computer architecture and logic gates, but not a ton. I know the basics of single-variable calculus and linear algebra, and I program a decent amount, mainly in Python 3, though I have experience with versions of C (used for Arduino, for example). I have looked at Assembly code but never programmed in it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like the course to be decently cheap, and it would be nice if it has a sense of legitimacy such that I have a shot at getting it to count for credit/go on my transcript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommendations would be appreciated. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="41" LastEditDate="2017-09-21T11:13:13.393" LastActivityDate="2017-09-21T11:13:13.393" Title="Undergrad level computer architecture course" Tags="|resource-request|self-learning|architecture|" AnswerCount="1" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="765" PostTypeId="2" ParentId="30" CreationDate="2017-06-17T16:26:09.910" Score="0" Body="&lt;p&gt;HTML/markup languages can write things you put in. Python/programming languages can calculate the things to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex (numbers 1-10):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;1, 2, 3, 4, 5, 6, 7, 8, 9, 10&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(list(range(1,10)))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ex (collatz conjecture):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p&amp;gt;5,16,8,4,2,1&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;vs.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = 5&#xA;print(x)&#xA;while x &amp;gt; 1:&#xA;    if x%2 == 0:&#xA;        x= x/2&#xA;    else:&#xA;        x = 3x + 1   &#xA;    print(x)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I used Python 3 for my example programming language.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-17T16:26:09.910" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="767" PostTypeId="2" ParentId="761" CreationDate="2017-06-17T16:37:38.707" Score="5" Body="&lt;p&gt;As I am not a teacher, I can't tell you any experiences, so I'll just give my thoughs on how I would deal with such a situation. I know this is not exactly what you asked for, but I hope it can be at least partially helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the situation consists of two perspectives: First of all, how you feel; secondly, how you think the students should feel and behave.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To the first point I have to admit I don't have a lot of experience: I imagine it can frustrating to teach when nobody seems to listen. This will probably be dependent on the self-confidence of the teacher and can be a greater or a smaller problem. This is something you can say to your students in a message like &quot;I'm feeling frustrated if you don't listen to me, could you please do so?&quot;. Formulating a message like this often helps the addressed persons to understand your feelings and is more likely to work than an unpersonal message, it would additionally not have to be a &quot;firm&quot; message if you don't like to give one (you'd just talk like you'd normally talk about your feelings).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To the second point I would say you don't have a lot to do. You try to let them profit from your knowledge and the effort you have made to work into your curriculum, so your lessons are an opportunity for them. If they decide not to follow them, it's only their problem. You could point out once or twice that this could have consequences for them you can't regulate (such as not passing final exams or not having the knowledge they apparently wanted to gain). After that, you don't have to say anything more to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a student perspective I could say to you that students find many ways to get distracted in front of the computer, even if they value you and your lessons. This happened to me at least once as a student in a class where I really liked the teacher but somehow thought it would be &quot;cool&quot; to do something else - the teacher then noticed it and asked my to either focus on him or turn of the monitors. I followed his request because I thought over it again and noticed I was really interested in the topic.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-06-17T16:37:38.707" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="769" PostTypeId="2" ParentId="761" CreationDate="2017-06-17T18:11:48.800" Score="4" Body="&lt;p&gt;From what I have seen, students who sit with a laptop (and this should be the same for your case, because the point is about having their own computer, and you can't see the screen) very rarely listen to the instructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They might be working on their own projects, but some might be playing games, browsing websites and doing other non-related things. This hinders their progress, because they have no idea what the instructor teaches, having listened to only 5-10 minutes in the best case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some teachers forbid the usage of laptops in the class (yes, even in CS classes; unless it's a lab lesson). This is less practical for you, but if the computers where put in front of the students by the institution, I'm sure you can ask the relevant department to make it so that the computer at the teacher's desk can &quot;take over&quot; all of the screens. This allows you to make sure that the students either look at the screen, or at you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students wont like this, to say the least. But students who come to class have to understand that it's not time to play or browse websites. Again, it's up to you to decide how much time you force their screens to show what the instructor's computer shows. During labs, it's highly advised not to &quot;take over&quot; their screens. For the sake of those who do want to learn and be there, letting them have free reign in labs is a good aid to their learning. (Besides, those students might appreciate it very much if they can see what you are showing with the projector, but on their screen, so they don't have to crane their necks to see over their screens)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It comes down to the students understanding that just because computer screens are there, one doesn't &lt;strong&gt;have&lt;/strong&gt; to use them. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-17T18:11:48.800" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="770" PostTypeId="1" AcceptedAnswerId="772" CreationDate="2017-06-17T18:21:36.837" Score="6" ViewCount="287" Body="&lt;p&gt;How would you explain pointers and their use to high school students with some prior knowledge in programming, mainly in Python, but very limited knowledge of C? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this isn't a duplicate of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/299/simple-pointer-examples-in-c&quot;&gt;Simple Pointer Examples in C&lt;/a&gt;, because here I'm asking for an explanation of how they work, not an example of them working.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-17T21:22:19.027" LastActivityDate="2017-06-19T15:29:55.620" Title="Explaining pointers to highschoolers" Tags="|secondary-education|pointers|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="771" PostTypeId="2" ParentId="761" CreationDate="2017-06-17T18:29:44.617" Score="8" Body="&lt;p&gt;Ask them to switch their screens off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They don't like it if you do it too often or for too long but it's surprisingly effective, saves you having to repeat yourself unnecessarily and forces you to try to make your instructions clear and concise. If you can't see their screens you can always tell by the glare from their screens on their faces who hasn't followed instructions.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-17T18:29:44.617" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="772" PostTypeId="2" ParentId="770" CreationDate="2017-06-17T19:19:55.607" Score="9" Body="&lt;p&gt;A prerequisite to understanding pointers is a basic understanding of memory. At least on the broadest level, students need to know that when they declare a variable in their programs, that variable is stored somewhere, so they can use it, access it, update it, etc. Where that variable is stored also has some address, so it can be located (specific addressing techniques need not be introduced yet). The specifics of heap v. stack, memory size (int v. long long), and other such concepts are not necessary to understand what a pointer is (but they certainly would help). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All this background established, here is the easy way to think of pointers:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A pointer is a variable that contains an address of a variable.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Simple enough on the surface. That sentence comes from Chapter 5 of K&amp;amp;R (&lt;em&gt;The C Programming Language&lt;/em&gt; by Kernighan and Ritchie). This chapter has a great explanation of pointers and arrays, and I would highly recommend it for an understanding of pointers, at least in the context of C. One key point for C is the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Since C passes arguments to functions by value, there is no direct way&#xA;  for the called function to alter a variable in the calling function.&#xA;  ... Pointer arguments enable a function to access and change objects&#xA;  in the function that called it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now, to get into the details of pointer arithmetic, passing by reference, syntactic sugar vis-a-vis arrays, pointers do become more complicated. However, always keep in mind the simple definition that gets at their essence: pointers store addresses for other locations in memory.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-17T19:28:44.270" LastActivityDate="2017-06-17T19:28:44.270" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="773" PostTypeId="2" ParentId="764" CreationDate="2017-06-17T19:41:02.280" Score="5" Body="&lt;p&gt;My go-to answer for this topic is &lt;a href=&quot;http://nand2tetris.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nand2Tetris&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are 2 Coursera courses (&lt;a href=&quot;https://www.coursera.org/learn/build-a-computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part I&lt;/a&gt; and &lt;a href=&quot;https://www.coursera.org/learn/nand2tetris2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part II&lt;/a&gt;) that match the curriculum of the program. The first course does not require any programming background. Its focus is on computer architecture (logic gates, half-adders, full-adders, ALUs, RAM, ROM). The second focuses on a virtual machine and a compiler for a high-level, Java-like language (and thus does require some programming knowledge). The essence is that you understand every level of a computer from the &lt;code&gt;NAND&lt;/code&gt; gate up to a &lt;code&gt;&quot;hello, world&quot;&lt;/code&gt; program in a Java-like language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to the Coursera courses, there's a companion textbook and a full suite of software. The list of topics is below:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Boolean Logic&lt;/li&gt;&#xA;&lt;li&gt;Boolean Arithmetic&lt;/li&gt;&#xA;&lt;li&gt;Sequential Logic&lt;/li&gt;&#xA;&lt;li&gt;Machine Language&lt;/li&gt;&#xA;&lt;li&gt;Computer Architecture&lt;/li&gt;&#xA;&lt;li&gt;Assembler&lt;/li&gt;&#xA;&lt;li&gt;VM I: Stack Arithmetic&lt;/li&gt;&#xA;&lt;li&gt;VM II: Program Control&lt;/li&gt;&#xA;&lt;li&gt;High-Level Language&lt;/li&gt;&#xA;&lt;li&gt;Compiler I: Syntax Analysis&lt;/li&gt;&#xA;&lt;li&gt;Compiler II: Code Generation&lt;/li&gt;&#xA;&lt;li&gt;Operating System&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The course is typically a lower-division, one-semester, university course. The site contains a &lt;a href=&quot;http://nand2tetris.org/about/Nand2Tetris%20syllabus.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;sample syllabus&lt;/a&gt;, which might help justify it being rewarded with some form of academic credit.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-17T21:46:38.827" LastActivityDate="2017-06-17T21:46:38.827" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="774" PostTypeId="5" CreationDate="2017-06-17T19:52:14.440" Score="0" Body="&lt;p&gt;Pointers take two forms in modern computing languages. There is the view of languages like C in which a pointer is a direct reference to a location and can be manipulated as if it is an unsigned integer, say to step through an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a more abstract view, the reference, in which &quot;something like&quot; a pointer is used to get access to a value, perhaps an object. This is a non-computational view of &quot;pointer.&quot; In languages like Java, the implementation of a reference is purposely left undefined. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since questions involving pointers and references often confuse the two, one tag is appropriate for both, but question proposers are encouraged to distinguish as far as  possible between the concepts, consistent with the intent of the question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this tag (and this site) is not appropriate for theoretical aspects, but for the use in effective teaching. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-24T00:54:35.053" LastActivityDate="2017-07-24T00:54:35.053" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="775" PostTypeId="4" CreationDate="2017-06-17T19:52:14.440" Score="0" Body="Questions related to teaching about pointers or references. Use this tag to ask about teaching various aspects and points regarding pointers." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T20:57:14.767" LastActivityDate="2017-07-23T20:57:14.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="776" PostTypeId="2" ParentId="770" CreationDate="2017-06-17T20:13:21.277" Score="6" Body="&lt;p&gt;I set the stage from the beginning. When we first do variables, I draw a big box and call it the computers memory and then draw a small box of memory and say &quot;it's at some address&quot; (having already explained that memory is set up so you can identify each piece with a number) so when we say:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;x = 20&lt;/code&gt; (or &lt;code&gt;int x = 20&lt;/code&gt; or whatever)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I draw something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;x&#xA;100&#xA;____&#xA;|   |&#xA;|   |&#xA;-----&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;explaining that we have a block of memory at location 100 large enough to store an int (in this case) and we can get to it using the identifier x.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;x=10&lt;/code&gt; takes the 10 and stores it in the memory&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;a = x + 5&lt;/code&gt;   looks to see that x is an identifier to memory 100, we get the 10 then add 5 and then store it in the box referred to by a (which is at memory location 108.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;x         a&#xA;100       108  &#xA;____      ____&#xA;|   |     |   |&#xA;|10 |     | 20|&#xA;-----     -----&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This sets the stage for pointers later on. When we get to pointers, we merely have to explain that the box holds a number that refers to another memory address or location:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;&#xA;*p             i&#xA;100            108&#xA;-------        ------&#xA;| 108 |        | 49 |&#xA;|     | -----&gt; |    |&#xA;-------        -------&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;all the while using lots of drawings and arrows. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, when we talk about functions, I don't formally describe the stack but talk about it and then the memory for parameters and locals is in a subsection of memory allocated for that function call.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="104" LastEditDate="2017-06-19T00:17:27.730" LastActivityDate="2017-06-19T00:17:27.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="777" PostTypeId="2" ParentId="690" CreationDate="2017-06-17T20:27:55.413" Score="0" Body="&lt;p&gt;Algorithmic thinking can perhaps best be taught completely apart from coding in the classes given programming language(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might have one student tell another student how to solve a fairly easy problem on a whiteboard, but only communicating one step at a time using a constrained set of commands, for instance only one input, one arithmetic operation step, or one saved result at a time.  Maybe have the algorithm developer write out the steps while the operator student is out of the room, them have the operator come back into the room and execute the written algorithm on the whiteboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One example might be averaging N numbers, where student A writes an algorithm, student B later provides the numbers one at a time, then student C uses the algorithm to compute a result, while the class watches.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-17T20:27:55.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="778" PostTypeId="2" ParentId="706" CreationDate="2017-06-17T20:41:06.613" Score="0" Body="&lt;p&gt;Item #2, a form of code re-use, especially if it is tested known working lines of code, is usually considered to be a good software engineering practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copying a line or two from the official documentation might in some cases be considered the proper way to learn or to code.  Some professional IDEs do this automagically in the auto-complete hints.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Copying from a web search or stackoverflow requires supervision or auditing.  The instructor needs to confirm that the student understands (what it does, the algorithm, etc.) and has checked what they are copying against more official (for the language, library, etc.) documentation.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-17T20:41:06.613" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="779" PostTypeId="2" ParentId="728" CreationDate="2017-06-17T20:50:23.193" Score="1" Body="&lt;p&gt;There may be a psychological-physiological learning advantage to having students see solutions or code presented at nearly the same rate as the student would write or type in the code themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having N steps appear (especially if it exceeds 7+-2 cognitive units), all at once, might overload a student's short term memory, and thus can result in some of the information being nearly invisible, and thus harder to learn from that projection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative would be to use presentation software to animate the projection so that the code (or algorithms, etc.) appears sequentially in time at a slow enough rate to talk through each step or component.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-17T20:50:23.193" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="780" PostTypeId="1" CreationDate="2017-06-17T22:11:56.417" Score="9" ViewCount="165" Body="&lt;p&gt;I'm doing small group tutoring for an undergraduate course next semester and I'd like to gather feedback from students to improve my skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some questions I should ask the students in order to get useful feedback?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to do this with a quick (anonymous) Google form at the end of each session, but I'm open to other ideas about how to collect data.&lt;/p&gt;&#xA;" OwnerUserId="930" LastActivityDate="2017-06-18T00:10:27.220" Title="What to gather feedback on?" Tags="|best-practice|undergraduate|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="781" PostTypeId="2" ParentId="756" CreationDate="2017-06-17T22:38:07.350" Score="7" Body="&lt;p&gt;&lt;strong&gt;No&lt;/strong&gt;, bimodality is a myth.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h3&gt;&lt;a href=&quot;http://www.cs.toronto.edu/dcs/documents/p113-patitsas.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Evidence That Computer Science Grades Are Not Bimodal&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;It is commonly thought that CS grades are bimodal. We statistically analyzed 778 distributions of final course grades from a large research university, and found only 5.8% of the distributions passed tests of multimodality. We then devised a psychology experiment to understand why CS educators believe their grades to be bimodal.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;On the other hand, 100-level course are more likely to bimodal:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Of the 45 classes which were multimodal, 16 were 100- level classes (35%), 5 were 200-level (11%), 12 were 300-level (27%), and 12 were 400-level (27%). For comparison, in the full set of 778 classes, 171 were 100-level (22%), 165 were 200-level (21%), 243 were 300-level (31%), and 199 were 400-level (26%).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We can then break down the bimodality by course-level:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;+--------------+-----------------+&#xA;| Course Level | Percent Bimodal |&#xA;+--------------+-----------------+&#xA;|          100 | 9%              |&#xA;|          200 | 3%              |&#xA;|          300 | 5%              |&#xA;|          400 | 6%              |&#xA;+--------------+-----------------+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Still, we see that even 100-level courses are unlikely to be bimodal.&lt;/p&gt;&#xA;" OwnerUserId="930" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-28T06:31:26.093" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="782" PostTypeId="2" ParentId="780" CreationDate="2017-06-17T22:46:36.523" Score="4" Body="&lt;p&gt;Take everything with a grain of salt - if they like you they'll tend to be kind in their evaluations. It's also really easy to have anonymous surveys that yield ridiculously positive results (see the &quot;analytics&quot; used by just about any after school, drop in, or summer CS program for examples - using questions like &quot;are you more or less likely to take another CS course&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever I do an anonymous eval I do a few things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Figure out a way to make it anonymous but to also make sure everyone submits one. Once I wrote a system that they could audit that collected responses and emails then scrambled the answers and sent it to me with a list of who responded separately another time I had the students send the results to a trusted third party.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask the kids for the good and the bad. I tell them that even the worst teacher does some good and even the best does some things wrong. I tell them that it's also nice to see some positive and if I only asked and got the negative it would be just to depressing :-)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The bad is important so I know what to change but the good is also important so I know what to keep.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I tell the kids that saying something is bad is ok. Better is why it's bad but even better is a suggestion as to how to change it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If possible you want to follow up with the kids a semester or year later (if not longer). The perspective of time can really change opinions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-17T22:46:36.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="783" PostTypeId="2" ParentId="780" CreationDate="2017-06-17T22:49:45.867" Score="3" Body="&lt;p&gt;&lt;strong&gt;Getting feedback from students is the best thing you can do to improve your craft as a teacher.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I end every week with an exit ticket (and the course as a whole with one), and it is often the highlight of my week reading students' responses. I tell students that feedback from me is the way they improve as students and so to is their feedback the way I improve as their teacher. Understand though that the motivation of your own growth should always be &lt;strong&gt;improvement in student learning&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Include several straightforward questions about the relevant subject matter. These are ungraded &quot;formative assessments.&quot; In other words, these are means by which you can see if your students actually understand what you taught them. It is no good for students to enjoy your class but not actually learn anything, and &lt;strong&gt;just because you taught it doesn't mean they learned it&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you are teaching the binary number system, give them a few small sample conversion problems to answer on the form (and yes, Google Forms is my absolute favorite and preferred means for gathering and analyzing this data, but you could certainly do this without them). See if they can actually do what you have been teaching. I would then follow up these short practice questions to test for understanding with questions such as the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In terms of my instructions, what worked and what didn't?&lt;/li&gt;&#xA;&lt;li&gt;Are you comfortable with your ability with this week's subject matter?&#xA;(Using a Likert scale is handy - I remove the &quot;Neutral&quot; option, so students have to &quot;pick a side.&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Comment on the pace of instruction.&lt;/li&gt;&#xA;&lt;li&gt;Did I provide you with sufficient examples?&lt;/li&gt;&#xA;&lt;li&gt;What questions or comments do you still have about the material?&lt;/li&gt;&#xA;&lt;li&gt;The objective of today was for you learn X. Do you think that goal has been achieved?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are great resources on exit tickets online. A quick Google search for &quot;exit tickets&quot; will give you some great examples. &lt;a href=&quot;https://www.brown.edu/about/administration/sheridan-center/teaching-learning/effective-classroom-practices/entrance-exit-tickets/sample&quot; rel=&quot;nofollow noreferrer&quot;&gt;This page&lt;/a&gt; from Brown University has more sample questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note on anonymity&lt;/strong&gt;: None of my surveys is anonymous. I work hard to build an environment where students know I am actively working hard to hone my own craft and that I trust them and am humble enough to reflect on their feedback. I've had many occasions where following up with a student is necessary to make sure I can respond appropriately to their feedback. Students respond positively when are invested in their respective; if you show you are working hard for them, more often that not, they work hard in return.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-17T22:49:45.867" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="784" PostTypeId="2" ParentId="756" CreationDate="2017-06-17T23:09:07.093" Score="9" Body="&lt;p&gt;Ah, the famous &lt;a href=&quot;http://blog.acthompson.net/2014/01/reverse-bell-curve-in-programming.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;bimodal distribution&lt;/a&gt; in computer science!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I took my first CS class in college, I frequently helped out a fellow student in my section who struggled mightily, spending unreasonably long amounts of time on seemingly simple labs. We made very little headway together. &lt;em&gt;In spite of a semester-long effort bordering on the heroic, the student just couldn't seem to&lt;/em&gt; &lt;strong&gt;&lt;em&gt;get&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;programming.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked my professor about it late in the semester, and he said that there were a certain number of these students every semester, and that he didn't really know how to help them.  He said that, if they didn't withdraw and kept working, he would let them go with grades of &lt;strong&gt;C&lt;/strong&gt; instead of the &lt;strong&gt;F&lt;/strong&gt;s they actually earned on their exams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw it again years later, as I started teaching my first computer science courses.  In every class, there were some number of kids who &lt;strong&gt;&lt;em&gt;just didn't get it&lt;/em&gt;&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I was not alone!  Others were seeing it, too, and there was even an unpublished research paper that started to make the rounds on the internet called &lt;a href=&quot;http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Camel has Two Humps&lt;/a&gt;, which asserted both the bimodal nature of the field and that they had created a test that could predict &lt;em&gt;who would be able to &quot;get&quot; it&lt;/em&gt;.  That paper was hardly the beginning of the story.  In fact, professors have been &lt;a href=&quot;https://ai2-s2-pdfs.s3.amazonaws.com/c222/28778080cf9916ef0ba0e4b476aa370d4864.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;investigating this bimodality for years&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lately, however, the story has been changing.  The author of the original unpublished study &lt;a href=&quot;http://retractionwatch.com/2014/07/18/the-camel-doesnt-have-two-humps-programming-aptitude-test-canned-for-overzealous-conclusion/&quot; rel=&quot;nofollow noreferrer&quot;&gt;issued a partial retraction&lt;/a&gt;, and researchers began looking at far larger datasets of introductory CS grades.  It turns out that that bimodal distrubution is &lt;a href=&quot;http://www.cs.toronto.edu/dcs/documents/p113-patitsas.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;not really bimodal after all&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;So what is going on?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;When we teach programming, we want our kids to be able to program.  So we test them on programming, and we want to heavily weight our grades on, well, &lt;em&gt;whether or not they can obtain the proper output&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate this, let's take a hypothetical problem prompt, and some sample answers.  The question, which will be in an introductory Java class, will read, &quot;Create a function called &lt;code&gt;makeN&lt;/code&gt; that, given a number &lt;code&gt;n&lt;/code&gt;, fills and returns an array with $n$ sequential values&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer 1:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int makeN(){&#xA;    array[n] = 0;&#xA;    array++; // until its done&#xA;    makeN = array;&#xA;    return makeN;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer 2:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int[] makeN(int n){&#xA;    int[] array;&#xA;    for(n &amp;lt; array.length; n++)&#xA;        array[n] = n;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer 3:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int[] makeN(int n){&#xA;    int[] array = new array(n);&#xA;    for(int x = 0; x &amp;lt; n.length; x++){&#xA;        array[x] = x;&#xA;    }&#xA;    return array;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer 4:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int[] makeN(int n){&#xA;    int[] array = new int[n];&#xA;    for(int x = 0; x &amp;lt; array.length; x++){&#xA;        array[x] = x;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There's a clear progression among these answers, and they represent vastly different levels of understanding.  Unfortunately, our topic requires students to be able to pull together &lt;em&gt;many different concepts&lt;/em&gt; in order to do almost anything.  If we were to grade by whether the answer fulfills the prompt, &lt;em&gt;they would all receive the same grade.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually have come to believe that, in a good rubric for a coding example, &quot;actually produces the proper final output&quot; should either not be present at all, or should be worth a miniscule amount of credit.  A good rubric will capture attempts at portions of the algorithm, and successfully achieving steps of the algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example above may have been extreme, and I doubt if most teachers would award exactly the same grade to answer 4 as they would to answer 1, I this cognitive bias certainly exists (I possess it myself), and it seems perfectly plausible to me that examples 1 and 2 might receive almost identical grades.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trick to get out of bimodal thinking, then, is to break down the skills into smaller subskills, and break those down into further and further tiny understandings.  This has two benefits: first, you see the clearer progression among your students, and two, head-scratchers like answer #1 become actionable, and you can see how to help the student to improve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Student #1 may never quite get to a complete picture during your class - &lt;em&gt;he or she clearly has a lot to learn!&lt;/em&gt; - but it is unreasonable to the student (and to you) to demand basically 100% comprehension in order to avoid failure.  And taking a partial understanding as a partial success &lt;strong&gt;shouldn't just apply to the student.&lt;/strong&gt; It's the teacher's success, too.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-08T15:50:06.540" LastActivityDate="2017-07-08T15:50:06.540" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="785" PostTypeId="2" ParentId="780" CreationDate="2017-06-18T00:10:27.220" Score="2" Body="&lt;p&gt;I actually wrote an Action Research paper on getting student feedback as part of my administrative license coursework.  Student feedback is an incredible tool to use to improve professionally!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to add on to Peter's answer, I have not had good results with anonymous surveys.  I've found that, although there may be some freeing of tongues associated with anonymity, most of my students (at least at the high school level) mostly take the opportunity for a freedom they are often more interested in: freedom from creating thoughtful answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explain to them that if they really don't feel comfortable writing something, that they don't have to, but that no one is asking me to do this. I just want to make my courses as good as they can be for them and for future students.  I also mention that I hope that they think enough of me (and feel respected enough by me) to know that I would never alter someone's grade on account of honest feedback.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask the same five questions in every class.  The questions are a very loose adaption of Liz Lerman's gorgeous feedback system for dance classes, by moving from positive to negative, and introspective to outward-facing.  If I want any additional questions (such as Likert-scale questions, or something else particularly course-specific) I put them at the top before this main set:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What did you do well this (year/grading period/semester/etc)?&lt;/li&gt;&#xA;&lt;li&gt;What could you have done better?&lt;/li&gt;&#xA;&lt;li&gt;What did I do well?&lt;/li&gt;&#xA;&lt;li&gt;What could I have done better?&lt;/li&gt;&#xA;&lt;li&gt;Are there any other comments?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If I feel a course floundering, I also have been known to ask for feedback mid-semester in order to diagnose the problem and correct course.  I have received very thoughtful (and sometimes powerful) responses to these questions over the years.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-18T00:10:27.220" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="786" PostTypeId="1" AcceptedAnswerId="822" CreationDate="2017-06-18T07:01:20.447" Score="6" ViewCount="204" Body="&lt;p&gt;I am trying to prepare lessons about the five &lt;a href=&quot;https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)&quot; rel=&quot;nofollow noreferrer&quot;&gt;SOLID&lt;/a&gt; principles of Object Oriented Programming to high school students that have learned about polymorphism, abstract classes and interfaces. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'm not sure how to properly explains the &lt;a href=&quot;https://en.wikipedia.org/wiki/Open/closed_principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;O (Open/close)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot find a satisfactory explanation as to why it's ideal or important to write software (or APIs) that is open for extension and closed for modification. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an analogy, I was thinking about a model of a house in a city. The municipality provides a list of things that have to be, and cannot be changed, but each household can paint their house or make small changes in some things​. I feel this analogy doesn't explain the principal in the right way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What other analogies can I use to explain Open/Close?&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="104" LastEditDate="2017-06-19T03:18:01.780" LastActivityDate="2017-06-19T20:56:29.380" Title="Principles of SOLID in OOP" Tags="|secondary-education|teaching-analogy|object-oriented-paradigm|solid-principles|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="787" PostTypeId="1" CreationDate="2017-06-18T07:08:19.167" Score="9" ViewCount="1954" Body="&lt;p&gt;My school director has given me the opportunity to redesign the layout of our school's IT lab to better suit my classes.  Currently the computers are in the &quot;inverted U&quot; layout listed &lt;a href=&quot;http://www.brighthub.com/computing/hardware/articles/52714.aspx&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt; so that I can monitor students' monitors but not their faces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that this makes classroom management difficult (I teach grades 6-9).  Students frequently get distracted by what is on their neighbors' computers, and every student can see every other student's monitor without much effort.  It also makes individual work like quizzes/exams basically impossible.  If I have to make an announcement I am making it to the backs of students' heads.  Students have to turn their whole chairs around (we don't have office chairs) to pay attention to a lesson, which means they can't comfortably take notes on what I am saying or what I write on the board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently debating with myself between three layouts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;computers in clusters of four (the four-leaf clover layout from the link above)&lt;/li&gt;&#xA;&lt;li&gt;computers in rows such that students face the front of the room and monitors face the back, like &lt;a href=&quot;https://s-media-cache-ak0.pinimg.com/originals/e1/8e/e7/e18ee70a616a922eb9539d831e75c638.jpg&quot; rel=&quot;noreferrer&quot;&gt;this&lt;/a&gt; (I would then teach from the front, and when students had work time I would move to the back to monitor the screens)&lt;/li&gt;&#xA;&lt;li&gt;computers in four rows: one row against each side wall (students facing the walls), two rows together in a center island (students facing each other), such that I would have an oblique view of the monitors from the front of the room and students would have to rotate about 90 degrees to face forward.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="938" LastEditorUserId="27" LastEditDate="2020-12-16T03:07:12.090" LastActivityDate="2020-12-16T03:07:12.090" Title="What is the best layout for a Middle School computer lab?" Tags="|classroom-management|classroom-environment|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="788" PostTypeId="2" ParentId="754" CreationDate="2017-06-18T08:43:16.183" Score="6" Body="&lt;p&gt;Basically, you have to throw away your preconceptions and develop and refine new intuitions based on your teaching experience and your students' backgrounds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I started off teaching I was severely limited by an expectation that I'd be teaching students much like myself - students who enjoyed math and abstract problem-solving, and who had some kind of background or at least prior interest in programming (I started off at age 10 in BASIC on my Commodore 64).  When that wasn't the case I found myself in a bit of trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way I teach now involves collecting and analyzing student data to find out what their challenges are and experimenting with different ways to help them overcome those challenges, and also what their interests are and how I can change the course to cater more to those interests.  I collect feedback in the form of quizzes and projects but also I just ask the students what was easy for them and what was difficult, what they liked and what they didn't like, and then the next year I modify the course slightly to take all of this feedback into account.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over time, the course gets better.  I find ways to work around the most difficult material until the students are both conceptually ready for it and confident enough in their programming abilities to actually attempt it and not give up right away when they hit their first bump.  I find ways to include more things of the type that students like and find fun and interesting, even if I personally don't find those things fun or interesting at all.  Programming is so big and flexible that there are usually numerous ways into a problem, and luckily I get to make my own curriculum so I am free to explore all of those ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one example, I've found that my students find variable manipulation and iteration monstrously difficult but have no problem with event-driven programming.  I've therefore had more success when starting students off with simple event-driven projects (like, make a browser-based multiple choice quiz in JavaScript) than with the kinds of math challenges (calculate the nth Fibonacci number) that I enjoyed as a student.  I personally find math problems easier and more rewarding than messy UI stuff and JS DOM manipulation, but the kids seem to really enjoy making a nicely decorated quiz to show off to their friends.  Also, most of my kids hate and fear math, which I find sad but have very little influence over.  I later try to work in simple variable manipulation and iteration by building on students' already successful projects once I have their interest and confidence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as a general strategy: Try to vary the order in which concepts are introduced and see if one order works better than another.  Try to identify the conceptual building blocks that students who fail to learn the concepts are lacking, and try to find ways to teach those building blocks - or put off teaching more difficult concepts until students have more confidence and problem-solving experience.  Try to give students projects that both motivate them and teach concepts and skills that you want them to learn.  When in doubt, simpler but more feasible and authentic projects are often better than more rigorous/complex projects that students may not even complete or will complete and then never look at again.  You'll know you're successful when students tell you something like &quot;I made a quiz to teach my little sister the 50 state capitals&quot;.&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2017-06-18T08:43:16.183" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="789" PostTypeId="2" ParentId="113" CreationDate="2017-06-18T10:15:36.130" Score="2" Body="&lt;p&gt;My students are already familiar with Word documents by the time I get them (Grade 6 is when I start them on HTML) so those are the most common analogy that I use in my classes.  I explain that HTML was invented as a way to share documents over the internet.  I review document parts and compare examples in Word and HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I typically start students with a Hello World example as several other answers have mentioned.  Let students have that quick feedback from their browsers and get into the habit of making stuff.  When it comes to anything more than a simple paragraph or two - especially the potentially messy nested elements like lists and tables - I fall back on that Word analogy.  I consistently refer to HTML files as documents and reinforce the names of document parts that Word and HTML have in common (like headings, paragraphs, images, tables, lists, etc.).  I demonstrate making a table in Word first and introduce the &quot;row&quot;, &quot;header&quot;, and &quot;data&quot; vocabulary to motivate the tr, th, and td abbreviations and give them meaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also use spatial metaphors (for example, I tell students to make sure their head is &quot;above&quot; their body) and enforce fairly strict indentation rules so that students can see which elements are &quot;inside&quot; each other.  I make sure students open and close tags and elements, and I frequently reinforce &quot;element&quot; and &quot;tag&quot; and related vocabulary words.  I introduce parent/child/sibling a little later and tree diagrams a little later, with the family tree being the most obvious analogy there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I give students lists of things to check for - for example, are all of their tags closed?  All of their elements?  Are all of their element names spelled correctly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I basically build up from the practical and familiar towards the abstract and unfamiliar - and over time and practice that structure becomes much more obvious and familiar.&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2017-06-18T10:15:36.130" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="790" PostTypeId="2" ParentId="690" CreationDate="2017-06-18T11:11:27.410" Score="2" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Practice.  Thinking algorithmically is a skill, and skills develop with focused practice over time.  All of the relevant-to-life examples in previous answers are forms of practice that will result in some skills transfer to computer algorithms and also maintain student interest.  You could add some basic mathematical algorithms that students know to the pool of practice exercises.  Work through the algorithms for addition and subtraction and translate them into pseudocode.  Something like &quot;sort a deck of cards&quot; is perhaps an ideal example because sorting is something that people sometimes do in real life and also something that we actually program computers to do (unlike &quot;make a PB&amp;amp;J&quot; or &quot;perform addition in base 10&quot;).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Practice exercises should be assessed by the teacher and used to help identify areas where students are having conceptual difficulties with the material.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also give students a simple algorithm for debugging their code, which both reinforces algorithm following and also teaches the separate valuable skill of debugging their code.  Steps could include &quot;read the error message&quot;, &quot;check for syntax errors&quot;, &quot;google the error message&quot;, &quot;explain your problem out loud to a rubber duck&quot;, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teach subskills.  &quot;Thinking algorithmically&quot; is a huge skill with many subskills.  Break algorithmic thinking into its subskills and teach them individually:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Identify inputs and outputs.  &lt;/li&gt;&#xA;&lt;li&gt;Identify repetition/repeatable steps.&lt;/li&gt;&#xA;&lt;li&gt;Identify success and failure conditions.&lt;/li&gt;&#xA;&lt;li&gt;Identify problems that lend themselves to an algorithmic solution and reframe problems in ways that clarify what the algorithm needs to do.&lt;/li&gt;&#xA;&lt;li&gt;Select and employ an algorithmic strategy to attempt to solve a problem.&lt;/li&gt;&#xA;&lt;li&gt;Test potential solutions on a number of datasets.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Learning and practicing these subskills explicitly will help to ensure that students are thinking and communicating very clearly about the problems they are trying to solve an the methods they are trying to use.  This clear thought and communication is really the only way that students have a hope of understanding more complicated and abstract problems and solutions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teach strategies.  Iteration and recursion, divide-and-conquer, dynamic programming, greedy algorithms.  I found a &lt;a href=&quot;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=4&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0ahUKEwiyx57emcfUAhUGvhQKHaOxDSwQFgg4MAM&amp;amp;url=https%3A%2F%2Fwww.cis.upenn.edu%2F~matuszek%2Fcit594-2007%2FLectures%2F27-algorithm-types.ppt&amp;amp;usg=AFQjCNGRn6TenIDttsYL66V6Wq2nAFKHlQ&amp;amp;sig2=KjcKY08LIswt7q8c72Y4Og&quot; rel=&quot;nofollow noreferrer&quot;&gt;power point presentation&lt;/a&gt; with some basic algorithm types and simple examples that demonstrate those types, many of which could be adapted for students at that age level.  For example, the four-color map algorithm could actually be done by students on paper, and can be a lot of fun (I've used the four-color theorem in lessons before and the kids loved it); the counting money algorithm (make a certain amount of money with the least number of coins and bills) could also be very accessible and relevant for students.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="938" LastEditorUserId="150" LastEditDate="2017-06-18T11:15:25.773" LastActivityDate="2017-06-18T11:15:25.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="791" PostTypeId="1" AcceptedAnswerId="802" CreationDate="2017-06-18T11:31:25.460" Score="27" ViewCount="24548" Body="&lt;p&gt;I'm looking for examples to give my students when lecturing about stacks, for use-cases of the stack in programming and life.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I've been thinking of a pole of rings (when you can insert or remove rings from the top).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My students are high school students I'm teaching next year for their matriculation exam. They have only some basic knowledge in procedural programming and the tip of the iceberg in Object-Oriented stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas for more analogies or examples?&lt;/p&gt;&#xA;" OwnerUserId="77" LastEditorUserId="76" LastEditDate="2017-06-18T18:53:36.093" LastActivityDate="2021-04-24T11:43:40.370" Title="What are some good examples of using a stack data structure?" Tags="|teaching-analogy|data-structure|" AnswerCount="19" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="792" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T11:34:05.910" Score="17" Body="&lt;p&gt;A stack of trays in a cafeteria. I also like the pole of rings analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the trays, you can pop (take a tray) and push (return it when you're done). You can see what the top tray (first item) is (ex. what color), and see if the stack is empty. Non-stack operations such as getting a count of the trays are non-trivial. It is also impossible to insert or remove a tray from a random position.&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditDate="2017-06-18T12:19:36.753" LastActivityDate="2017-06-18T12:19:36.753" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="793" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T11:41:13.910" Score="10" Body="&lt;p&gt;I like the pez dispenser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the stack of papers (where the actual human interaction is never to take the top item but rather to take the second from the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point you have to talk about pancakes and the fact that people don't actually eat them as a stack -- they frequently destroy stack integrity by cutting top to bottom. I personally use a stack of pancakes as a queue, extracting one at a time from the btotom as it soaks up syrup but I've been told I'm an odd one :-)&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-18T11:41:13.910" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="794" PostTypeId="5" CreationDate="2017-06-18T11:44:52.947" Score="0" Body="&lt;p&gt;SOLID principals are 5 principals, with the acronym SOLID (made from 5 separate acronyms):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Responsabilty Principle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Classes should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open\Closed Principle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software entities should be open for extension, but closed for modification.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Liskov Substitution Principle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Objects in a program should be replaceable with instances of their subtypes, without altering the correctness of that program.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interface Segregation Principle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many interfaces for specific purposes are better than one general-purpose interface.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dependency Inversion Principle:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code should depend upon abstractions and not concretions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These are the basic principles of object oriented programming. Applying these principles often makes the code easier to maintain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag is for questions about &lt;em&gt;teaching&lt;/em&gt; these principles.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-18T14:39:15.113" LastActivityDate="2017-06-18T14:39:15.113" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="795" PostTypeId="4" CreationDate="2017-06-18T11:44:52.947" Score="0" Body="Questions related to teaching the five principals of the Object Oriented Paradigm, known as SOLID. Use this tag to ask about teaching these principals or guiding students to use these principals. " OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-18T14:39:04.697" LastActivityDate="2017-06-18T14:39:04.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="796" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T11:54:22.643" Score="16" Body="&lt;p&gt;A rather interesting analogy is that of a firearms magazine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if we look at this picture:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Caroline-chargeur-plein-p1000499b.jpg/157px-Caroline-chargeur-plein-p1000499b.jpg&quot; alt=&quot;a magazine&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy to see that bullets can be inserted from the top, and only the topmost bullet is accessible. Such is a stack. A magazine works by LIFO (Last In First Out), and so does a Stack. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, the four (five&lt;sup&gt;1&lt;/sup&gt;) basic operations of a Stack are applicable: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Push - adding a new element (bullet) to the top.&lt;/li&gt;&#xA;&lt;li&gt;Pop - remove the top element (bullet) from the stack (in the analogy, this is like shooting).&lt;/li&gt;&#xA;&lt;li&gt;Peek - looking at the first element of the stack (checking to make sure that the topmost bullet is correctly placed)&lt;/li&gt;&#xA;&lt;li&gt;Check if Empty - check if the stack is empty (in the analogy, this operation is checking if there are bullets left)&lt;br&gt;&lt;/li&gt;&#xA;&lt;li&gt;(Initializing the stack - creating a new stack)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;The initializing of the stack isn't exactly a special operation a stack can do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A stack is something used in programming when you need to keep a record of the history of versions. For example, many text editors use a stack data structure to save the changes made to the file. Also, revisions of posts on Stack Exchange have some form of a Stack (funny coincidence, isn't it?) to save the revisions (though I think the SE system uses partial functionality of a stack. I'll check that and edit this post when I have a definite answer about this particular part).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The very obvious usage of stack is, of course, the stack segment of computer memory. The call stack is, well, a call &lt;strong&gt;stack&lt;/strong&gt;. (more on this can be seen &lt;a href=&quot;http://jcsites.juniata.edu/faculty/kruse/cs240/images/stacka1.gif&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another handy example is the browser back button. The browser has a stack with the links (technically, sort of cached versions) of pages you've been to. When pressing the &quot;back&quot; button, the stack's &lt;code&gt;pop&lt;/code&gt; function is called, and you get redirected to that. When a link is pressed, a new element is &lt;code&gt;pushed&lt;/code&gt; onto the stack. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-18T12:56:04.297" LastActivityDate="2017-06-18T12:56:04.297" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="797" PostTypeId="1" AcceptedAnswerId="806" CreationDate="2017-06-18T14:01:34.140" Score="6" ViewCount="371" Body="&lt;p&gt;When teaching an intermediate or advanced highschool programming class that also touches on general CS concepts (algorithms, etc), what are the benefits of explaining low-level computer architecture? How much added understanding of programming/computer science does a student get when learning about logic gates, for example?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question isn't a duplicate of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/212/is-it-more-effective-to-teach-low-level-languages-before-high-level-ones-or-vice&quot;&gt;Is it more effective to teach low level languages before high level ones or vice versa?&lt;/a&gt; as it's asking about logic gates, registers, instruction set architectures, etc, and the benefits of teaching those in a programming class, not about low level programming languages in particular.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-18T15:16:08.240" LastActivityDate="2017-06-20T17:30:27.403" Title="Benefits of explaining low-level architecture in a programming class" Tags="|curriculum-design|secondary-education|architecture|" AnswerCount="5" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="798" PostTypeId="2" ParentId="628" CreationDate="2017-06-18T14:04:12.643" Score="4" Body="&lt;h1&gt;It depends.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;As an undergraduate student, based on experience of exams that have been mostly paper based, I'd say:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more 'theoretical' exam questions (describing algorithms, reasoning about time complexity, designing automata etc) paper is absolutely the way to go. It's the best way to handle mathematical questions and it's easy to clearly lay out an answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this doesn't mean paper is a good way to assess knowledge of &lt;strong&gt;programming languages&lt;/strong&gt;. I've had a few exam questions require me to write over a page of C or Java code, and these are just a pain. As an example, one question asked for a UML diagram to be converted into object oriented code. This would have been better assessed by asking &quot;State the visibility of the field X on the entity Y?&quot; or &quot;Write a method signature for X&quot; - having to write reams of boilerplate code in an exam is not a good use of time and isn't at all a good indicator of the candidate's ability to work in an actual software engineering role (which I assume is what's supposed to be being assessed, because it's most certainly not CS theory).&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2017-06-18T14:04:12.643" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="799" PostTypeId="5" CreationDate="2017-06-18T14:05:20.433" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-18T14:05:20.433" LastActivityDate="2017-06-18T14:05:20.433" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="800" PostTypeId="4" CreationDate="2017-06-18T14:05:20.433" Score="0" Body="This tag is for questions about computer architecture - a set of rules and methods describing the structure and functionality of a computer system. This may cover instruction set architecture design, logic design, computer organization, or other related topics." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-18T14:39:08.373" LastActivityDate="2017-06-18T14:39:08.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="801" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T14:50:43.873" Score="7" Body="&lt;p&gt;The &quot;real-life&quot; examples are pretty clearly delineated here already, but since you asked for examples in programming as well, I'll add one to the list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stacks can be used to build calculators. There's a great assignment in CS50 AP called &lt;a href=&quot;http://docs.cs50.net/2016/ap/problems/calc/2/calc2.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Calc 2.0&lt;/a&gt;. Students build a command-line calculator in C using a stack to store the numbers passed in by the user. Additionally, it's an opportunity to teach students about prefix notion as opposed to their normal use of infix notation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem specification explains why this approach is worth pursuing:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Visually, this approach of &quot;finding the rightmost operator&#xA;  and applying it to the two numbers to its right&quot; is an intuitive way&#xA;  for humans to parse prefix notation, but computers can be a bit&#xA;  smarter about this, without ever having to look at each operand or&#xA;  operator more than once, if instead we store all the information in a&#xA;  stack as we see it.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If the computer parsed this input by starting at the right side (aka&#xA;  the last element of &lt;code&gt;argv&lt;/code&gt;) and pushing numbers onto a stack as it came&#xA;  across them, then when it came upon an operation all that would need&#xA;  to happen is to pop the top two numbers off the stack, apply the&#xA;  operation, and push the result back on!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is the boilerplate they are given for building a stack:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;typedef struct&#xA;{&#xA;   int size;&#xA;   float nums[MAXNUMS];&#xA;}&#xA;stack;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's a simple struct, but since students can easily error-check their own work with simple math, this assignment provides a great way to actually start using a stack for something meaningful that also builds on students' prior knowledge. &lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-18T17:04:05.197" LastActivityDate="2017-06-18T17:04:05.197" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="802" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T16:25:17.877" Score="24" Body="&lt;p&gt;I once had to implement a limited undo function (undo changes to the current field, or addition/deletion of records).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lists of undo deltas (one for field changes and one for records) were stored as stacks.&lt;/p&gt;&#xA;" OwnerUserId="949" LastActivityDate="2017-06-18T16:25:17.877" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="803" PostTypeId="2" ParentId="761" CreationDate="2017-06-18T16:48:33.700" Score="2" Body="&lt;p&gt;Before our teacher started talking, he'd tell us to turn to the front (for the people on the sides, see diagram below) or tell us to shut off our computers for the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our classroom was set up similarly, and as our teacher was talking up front, he'd walk up and down the middle aisle a little bit, and if he saw someone not focused because of their computer, he'd go over, still talking, and use a quick keyboard shortcut to log them out. Of course, it wasn't a large class, so it wasn't as difficult to keep track of everyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classroom looked something like this (&lt;code&gt;-&lt;/code&gt; is a computer, &lt;code&gt;|&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt; are walls; the teacher's desk was at the back, while whiteboards/etc were up at the front): &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;_________________________&#xA;|                       |&#xA;|------          -------|&#xA;|-                     -|&#xA;|-                     -|&#xA;|------          -------|&#xA;|-                     -|&#xA;|-                     -|&#xA;|                       | &#xA;|_______________________|&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Everyone would be kind of chuckling that he did that. It was a way of doing something without out loud calling them out, interrupting the class, or anything like that. The kids he did it to were obviously mildly embarrassed, but not a ton, and they paid attention. So - I think it worked pretty well.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-18T16:48:33.700" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="804" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T16:52:53.563" Score="6" Body="&lt;p&gt;In practice, many calculators employ the &lt;a href=&quot;https://en.wikipedia.org/wiki/Shunting-yard_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Shunting Yard algorithm&lt;/a&gt; to evaluate mathematical expressions as per the rules of BODMAS. The algorithm makes use of stacks to push and pop operators based on precedence and position.&lt;/p&gt;&#xA;" OwnerUserId="951" LastEditorUserId="951" LastEditDate="2017-07-12T11:22:52.233" LastActivityDate="2017-07-12T11:22:52.233" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="805" PostTypeId="2" ParentId="693" CreationDate="2017-06-18T17:01:22.197" Score="0" Body="&lt;p&gt;&lt;a href=&quot;http://www.slnova.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;StarLogo Nova&lt;/a&gt; is another MIT project. It's block based like scratch, but I personally find it much nicer to use, and it allows (I think) for more complex programs. It is more simulation oriented than scratch, but you can still make just about anything with it. Also, it has a flying turtle for a logo:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/MDNB0.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/MDNB0.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's got a nice setup for classes - each user has a profile with a public and a private gallery. You can add collaborators to projects, set up some form of &quot;class&quot; on the system, though I don't know quite what that entails, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of the coding environment with some code for a project I did in it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/54YRI.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/54YRI.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the left, you have a menu with the different coding blocks, the drop down has categories very similar to those in scratch. The tabs on top of the coding section are basically for the different &quot;agents&quot; and for the &quot;world&quot;. This program, if you're wondering why there's a &quot;Killers&quot; tab, is to simulate an epidemic. There's support for all sorts of things - procedures that return values, movement of &quot;turtles&quot; which are basically robots on the screen, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of the section of the screen that shows the result of your program:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ayvyv.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ayvyv.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This shows the level of complexity you can get too - you can have output graphs and number boxes, input sliders, etc. You can also keep it very simple - the two things that are pretty much always there are the &quot;setup&quot; and &quot;forever&quot; buttons. This screenshot was taken right after &quot;setup&quot; was pressed - it initialized the turtles, widgets, breeds in the right proportions, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd definitely recommend this language.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-18T17:01:22.197" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="806" PostTypeId="2" ParentId="797" CreationDate="2017-06-18T17:01:41.447" Score="3" Body="&lt;p&gt;&lt;strong&gt;TL;DR Understanding the levels of abstraction in a computer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My AP Computer Science Principles course teaches three languages: Scratch, C, and Python. One of the 7 Big Ideas for the course is &lt;strong&gt;abstraction&lt;/strong&gt;. At the end of the course, I emphasize how Scratch exists at the highest level of abstraction relative to the other two as a block-based language and how the Python interpreter we use is written in C. Connecting this to lower levels of a computer, we form a chain that looks like this (from high to low):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Scratch&#xA;Python&#xA;C&#xA;Assembly Language&#xA;Machine Code&#xA;Logic Gates&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Obviously for the purposes of the class, it is a bit of a simplification as we don't cover instruction sets or adders and ALUs or assembly language specifically. However, as an introduction, students can begin to form a conception as to how a computer operates at each level. This lays the foundation for further study as students look ahead to pursuing computer science in college.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Despite any potential future benefit, I take this more philosophical approach to this topic: &lt;strong&gt;there is an intrinsic benefit and reward to looking &quot;under the hood&quot; at how things &lt;em&gt;actually&lt;/em&gt; work; in that sense learning lower levels of computer architecture is an end in and of itself.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To contextualize my class as a whole, I use the following quote at the top of my syllabus:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Any sufficiently advanced technology is indistinguishable from&#xA;  magic.&quot; -Arthur C. Clarke&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Learning how charges of electricity on transistors can be constructed to form logic gates, which in turn form the building blocks for computer architecture -- that is magical. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-18T17:01:41.447" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="807" PostTypeId="2" ParentId="797" CreationDate="2017-06-18T17:36:54.960" Score="1" Body="&lt;p&gt;Regarding architecture specifically, I don't see a tremendous benefit in high-school level programming classes.  However, at just one level or so of higher abstraction, discussing the principles of memory management as it applies to programs they write (such as stack and heap operation, how function calls are handled, etc) can make a big difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is very hard to describe why tail recursion is important, or the operational output of &lt;code&gt;(mystring == mystring2)&lt;/code&gt; in Java, or even what the code below accomplishes without discussing some lower level operation of the computer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static void main(String[] args) {&#xA;    int[] v = new int[1];&#xA;    v[0] = 5;&#xA;    mystery(v);&#xA;    System.out.println(v[0]);&#xA;}&#xA;&#xA;public static void mystery(int[] a){&#xA;    a[0] = 7;&#xA;    a = new int[10];&#xA;    a[0] = 10;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-18T17:36:54.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="808" PostTypeId="2" ParentId="791" CreationDate="2017-06-18T18:02:57.180" Score="4" Body="&lt;p&gt;Much of what has been said already is wonderful.  I would like to point out that Mike's Pez dispenser visualization is brilliant, and lends itself to a direct lesson with manipulables.  You can take a few of them into an actual classroom, mix up various Pez colors, and show all of the standard operations of a stack in a way that they can physically play with.  &lt;code&gt;Pop&lt;/code&gt;, &lt;code&gt;push&lt;/code&gt;, &lt;code&gt;peek&lt;/code&gt;, and &lt;code&gt;isEmpty&lt;/code&gt; are all clearly defined operations in a real life Pez dispenser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the kids wash their hands, and then use tiny bits of paper that the kids write on and place on top of a pez brick prior to loading it into the dispenser, and you will have a natural toy with all of the standard operations.  And it goes without saying that the kids will love to eat the results of each &lt;code&gt;pop&lt;/code&gt; operation as they sort out their algorithms.  :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also wanted to add that if your kids are familiar with linked lists, that is a great way to show a stack implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where stacks matter a tremendous amount in my instruction is in AP Computer Science A when talking about variable storage and scope, and in our Data Structures course when we talk about how function calls operate.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-19T01:51:17.890" LastActivityDate="2017-06-19T01:51:17.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="809" PostTypeId="2" ParentId="17" CreationDate="2017-06-18T18:05:35.370" Score="20" Body="&lt;p&gt;Can't claim it's my own idea but I can embellish it a little...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine you are entering a cinema. You sit down in a row but realise you had to sit in row 20. Being a lazy computer scientist in an already full theatre of other computer scientists (they're all there watching War Games again) you decide to recursively determine your row. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You ask the person in front. Trouble is they didn't check either. So again being lazy they ask the person in front of them. This continues until the bottom row is reached. This person knows they are in row 1 (they are there with a computer scientist friend but they aren't a computer scientist so they start counting at 1 not 0).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is passed back to the person who asked, who being a computer scientist can add 1 to the number this person told them. This carries on until the original person asking finds out that the row in front of them is 31 and that must mean they are in 32.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He doesn't move though as he converts the value to hex to convince himself that it is row 20. He likes efficiency!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Cheo, C. (2015). 40 Key Computer Science Concepts Explained In Layman’s Terms. [Online] Available at: &lt;a href=&quot;http://carlcheo.com/compsci&quot; rel=&quot;noreferrer&quot;&gt;http://carlcheo.com/compsci&lt;/a&gt;&lt;/em&gt; &lt;/p&gt;&#xA;" OwnerUserId="956" LastEditorUserId="956" LastEditDate="2017-06-18T18:30:11.057" LastActivityDate="2017-06-18T18:30:11.057" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="810" PostTypeId="2" ParentId="761" CreationDate="2017-06-18T18:39:11.243" Score="3" Body="&lt;p&gt;I always insisted that they look at me. I explained that the only way I could tell they were listening was if they were making eye contact with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That and making sure screens are turned off. &lt;/p&gt;&#xA;" OwnerUserId="956" LastActivityDate="2017-06-18T18:39:11.243" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="811" PostTypeId="2" ParentId="583" CreationDate="2017-06-18T18:43:49.237" Score="1" Body="&lt;p&gt;Pass by reference. You change the original and everyone sees. For example drawing on the Mona Lisa ruins it for everybody.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pass by value. You take a photo of the Mona Lisa and you can do what you want with it as the original is still in the state you found it in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/JJiu5.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/JJiu5.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="956" LastEditorUserId="-1" LastEditDate="2020-03-08T20:06:42.220" LastActivityDate="2020-03-08T20:06:42.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="812" PostTypeId="1" AcceptedAnswerId="894" CreationDate="2017-06-18T21:32:33.107" Score="44" ViewCount="9296" Body="&lt;p&gt;Part of what I love about the particular adaptation I use for AP CS Principles — CS50 AP — is that my curriculum teaches students basic Linux shell commands in the Cloud9 IDE. Students learn things like &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;mkdir&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, and &lt;code&gt;zip&lt;/code&gt; (just to name a few).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, at the beginning of the year, it is challenging to motivate &lt;em&gt;why&lt;/em&gt; the command line is a powerful tool to learn. They just take my word for it even though it is a big struggle. It is much more frustrating for beginners than a GUI and has no forgiveness for a mistyped character.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you communicate the value of the command line to your students? Are there specific examples you use that effectively illustrate the power of a CLI?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This question is not a duplicate of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/153/command-line-java-in-ap-cs-a&quot;&gt;Command-line Java in AP CS A&lt;/a&gt; (although it is tangentially related) as that question asked whether or not a CLI &lt;em&gt;should&lt;/em&gt; be taught in AP CS A. This one is focusing on how it can be motivated when it &lt;em&gt;has&lt;/em&gt; to be taught regardless of course.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="124" LastEditDate="2017-08-15T18:54:19.480" LastActivityDate="2023-03-18T13:13:44.130" Title="How to teach the value of the command line in high school?" Tags="|lesson-ideas|command-line|" AnswerCount="22" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="813" PostTypeId="2" ParentId="812" CreationDate="2017-06-18T21:48:17.247" Score="22" Body="&lt;p&gt;I can't speak to cloud9 but I've always taught on Linux and am a CLI wonk. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I do is differentiate between user friendly and learner friendly. GUI interfaces are learner friendly - they're easy to learn but they're not user friendly because they're not that powerful. They're basically program loaders. You load your program, work in it, exit, next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Shell is a little less learner friendly (although the fish shell is amazing from the learning point of view) but it is amazingly user friendly because it allows the user to do all sorts of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to model this over the course of my classes and I try to provide examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, if I wanted to resize a bunch of gifs in a directory, I might show the class something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ls *gif | while read i &#xA;do&#xA;  f=`basename $i .gif`&#xA;  convert $i -resize 200x200 smaller-$f.gif&#xA;done&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you make it useful to them, they'll appreciate it more and use it more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote a few blog posts over the years with examples including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pre-processing and cleaning up dirty downloaded data&lt;/li&gt;&#xA;&lt;li&gt;processing info from google forms (downloaded as csv)&lt;/li&gt;&#xA;&lt;li&gt;operating on many files across directories&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The posts can be found here: &lt;a href=&quot;https://cestlaz.github.io/categories/cli/&quot; rel=&quot;noreferrer&quot;&gt;https://cestlaz.github.io/categories/cli/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="237" LastEditDate="2017-06-19T10:08:29.173" LastActivityDate="2017-06-19T10:08:29.173" CommentCount="19" ContentLicense="CC BY-SA 3.0" />
  <row Id="815" PostTypeId="2" ParentId="153" CreationDate="2017-06-18T22:47:12.157" Score="3" Body="&lt;p&gt;With respect to APCS-A there won't be a difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I'm not overly fond of IDEs or one trick pony environments so I've encouraged our students to use an editor. I'm an Emacs wonk but the kids also use Vim, Sublime, DrJava (which is a lightweight IDE) and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In APCS-A they won't be getting to HUGE programs and to be honest, in my experience, an IDE like Eclipse provides too much and is too cumbersome for APCS_A. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I obviously don't know much about your specific situation (you, your kids, etc) but my general recommendation for APCS-A would be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start with a super simple IDE like Dr.Java&lt;/li&gt;&#xA;&lt;li&gt;Possibly transition them to an editor which will serve them well no matter what language they develop in.&lt;/li&gt;&#xA;&lt;li&gt;If you're going to use an IDE look at something reasonably lightweight like the JetBrains free stuff.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I personally don't like BlueJ because while it's really nice for showing object relations the tool doesn't travel with them as they go beyond APCS-A and as I'm not a big OOP guy, I think it might push kids into thinking that every problem should be looked at an OO nail even more than APCS-A does regularly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another advantage about using the command line and less specific tools is that you can teach the kids more of what's really going on rather than having the IDE abstract it.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-18T22:47:12.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="816" PostTypeId="2" ParentId="787" CreationDate="2017-06-18T23:23:40.350" Score="4" Body="&lt;p&gt;A modification to the traditional classroom arrangement that is relatively simple is to replace the straight tables with half hexagon tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Place them so that the center seat is facing the front of the room and the other two seats will only need to pivot 60 degrees from their screens to see the front. The students will still be able to look at other screens, but not without being obvious about it. It naturally groups the students into teams of three for when you have team-based assignments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can have a pair of mirrors installed in the two rear cournes near the ceiling. In the mirrors you will be able to see basically what they have on their screens. Reading it, or even knowing for sure what it is won't be possible, however, you will be able to tell if it's what should be there. Games and videos will have a totally different look from an IDE, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set the tables into a normal &lt;em&gt;rank and file&lt;/em&gt; arrangement with a gap between each column that allows you to walk between the students when seated. (The gap with students in their chairs will be less than it looks like with empty seats.) In this arrangement you can get to any student's station to assist them when needed. In addition, because of the geometry of the half hex layout, the gap between neighboring students is increased, allowing more room for you to reach the table top without disturbing either student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Half hexagon tables are available in some different set ups. You can use the standard, non-computer style that may even be in storage already. I've found some online that are designed, nominally, for computer use, and a bit larger to accomodate the keyboard and monitor space requirements better. I've also found one that's designed completly for computer workstations, including a keyboard tray and a cage for the tower. (Links at the end.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not knowing the constraints of the classroom itself, I can only give a sample layout. Allowing for 36 students, you could arrange the room similar to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/9edoq.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/9edoqm.png&quot; alt=&quot;Room arrangement&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few desks I've found online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fairly basic version, with enough room for standard keyboard and monitor:&lt;br&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/Kl1MW.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Kl1MWt.jpg&quot; alt=&quot;Basic table&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;sup&gt;From &lt;a href=&quot;http://www.k-log.com/product-swc-000&quot; rel=&quot;nofollow noreferrer&quot;&gt;K-Log&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar version, sculped to enhance the feeling of &quot;my&quot; space.:&lt;br&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/1csM4.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/1csM4t.jpg&quot; alt=&quot;Sculpted table&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;sup&gt;From &lt;a href=&quot;http://www.k-log.com/product-pmw-3b&quot; rel=&quot;nofollow noreferrer&quot;&gt;K-Log&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic version slightly Modified to have a notch that makes pole-drops fit better:&lt;br&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/UdZIq.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UdZIqt.jpg&quot; alt=&quot;Pole notched&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;sup&gt;From &lt;a href=&quot;https://www.worthingtondirect.com/computer-furniture/24580-40-x-80-x-2232h-cluster-work-center.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Worthington Direct&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full-blown computer lab desks, including keyboard trays and CPU cages:&lt;br&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/zTcuB.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/zTcuBt.jpg&quot; alt=&quot;Light version&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;sup&gt;From &lt;a href=&quot;http://www.k-log.com/product-paw-3b&quot; rel=&quot;nofollow noreferrer&quot;&gt;K-Log&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And a personal favorite:&lt;br&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/mQIHQ.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/mQIHQt.jpg&quot; alt=&quot;My Pick&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;sup&gt;From &lt;a href=&quot;https://www.worthingtondirect.com/computer-furniture/1500b-46dx96wx2731h-charcoal-three-station-unit-w-black-legs.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Worthington Direct&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-18T23:23:40.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="817" PostTypeId="2" ParentId="797" CreationDate="2017-06-18T23:42:53.290" Score="2" Body="&lt;p&gt;A touch of some minimal explanation of logic gates, binary numbers, state machines and the processor-memory divide helps make computing seem less like magic, and more like technology (something of which they could become designers in the future).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One doesn't need to teach actually using assembly language to explain how a basic fetch execute cycle works.  Etc.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-06-19T01:39:22.673" LastActivityDate="2017-06-19T01:39:22.673" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="818" PostTypeId="2" ParentId="787" CreationDate="2017-06-19T00:00:34.497" Score="3" Body="&lt;p&gt;You may address your primary concern with the privacy filters (as low as $7.99 apiece) without changing the layout at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the school director gave you not only an opportunity, but a budget as well, I'd recommend to invest it in good chairs. An ability to adjust height is immensely important.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2017-06-19T00:00:34.497" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="819" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T00:29:19.167" Score="2" Body="&lt;p&gt;Teach the command line as part of a brief history of computing.  Let them know how good they have it, not having to punch cards and wait overnight, or use a command line on a clanking teletype over a remote 110 baud link.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-19T00:29:19.167" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="820" PostTypeId="2" ParentId="787" CreationDate="2017-06-19T00:41:29.597" Score="5" Body="&lt;p&gt;The features that should guide your classroom layout are &lt;em&gt;visibility&lt;/em&gt;, &lt;em&gt;accessibility&lt;/em&gt;, and &lt;em&gt;distractibility&lt;/em&gt; — maximizing the first two, and minimizing the third.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Visibility&lt;/strong&gt; is simple: every student should be able to face forward easily with unobstructed view, and I should be able to see every student's face.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;, here, means that I should be able to get to every student quickly, and that students should be able to work with each other when I assign pair-programming tasks or ask them to discuss a question with neighbors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those first two considerations already rule out front- or rear-facing rows, and some cluster arrangements as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding &lt;strong&gt;distractibility&lt;/strong&gt;: From years of teaching and observing other teachers, I take as an axiom that lecturing to students who are looking at computer screens is an effectively pure waste of time. This has corollaries:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Screens should be less than about 120° from facing the front of the room — ruling out rear-facing screens.&lt;/li&gt;&#xA;&lt;li&gt;Lectures should be short and focused.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At this point I should give some context about my classes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The first cue I teach the students is &quot;screens off!&quot;, and I say this whenever I need to address the class as a whole. (If I'm interrupting work, I first give an advance warning so they can find a stopping point and save their work.)&lt;/li&gt;&#xA;&lt;li&gt;I ask students to bring a notepad and writing tools, for drawing or taking notes while their monitor is off.&lt;/li&gt;&#xA;&lt;li&gt;I aim to limit lecture time to ten-minute chunks at most, punctuated with pair discussions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Because I have the students turn off their monitors, my lectures must require either no handwritten note-taking, or minimal note-taking (which then requires me to give some explicit instruction on how to take notes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I have taught in labs with traditional rows (students facing forward, monitors back), clusters, and variations on the &quot;inverted U&quot; design you're talking about. Currently my lab is set up with student workstations all along the left and right walls, so that &lt;strong&gt;students are all facing the wall while working, and the computers are all facing inwards&lt;/strong&gt; — very much like the last option you described, only without a central island (because the room is too small for one). &lt;strong&gt;This is my preferred layout.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I would endorse the last option you suggested, of computers along the side walls, with an optional cluster of side-facing machines in the center of the room.&lt;/p&gt;&#xA;" OwnerUserId="965" LastActivityDate="2017-06-19T00:41:29.597" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="821" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T02:35:23.587" Score="2" Body="&lt;ul&gt;&#xA;&lt;li&gt;In Australia at least, many supermarkets store shopping trolleys in a dead-end corral. So when you get a trolley for your shopping it will be the last one someone previously pushed into the corral.&lt;/li&gt;&#xA;&lt;li&gt;The paper into a photocopier tray&lt;/li&gt;&#xA;&lt;li&gt;For a Biblical reference: &lt;a href=&quot;http://biblehub.com/matthew/20-16.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Matthew 20:16&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The way many of us process interruptions. We pause one task to focus on the interruption. We might pause that task to work on a subsequent interruption. Repeat for as many levels as you want. And then as each task is completed we return to the previous interrupt level.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="970" LastEditorUserId="27" LastEditDate="2017-06-19T03:06:09.273" LastActivityDate="2017-06-19T03:06:09.273" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="822" PostTypeId="2" ParentId="786" CreationDate="2017-06-19T03:26:53.213" Score="4" Body="&lt;p&gt;The primary drive behind the open/close principle was to avoid having to update programs that used a library when changes were made to that library. Or, in other words, to enforce &lt;em&gt;backward compatibility&lt;/em&gt; for old programs that used a library. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By not modifying the object (the &lt;em&gt;close&lt;/em&gt; half) any code that uses the object according to the documented API, will &lt;strong&gt;always&lt;/strong&gt; work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By allowing extension of the object (the &lt;em&gt;open&lt;/em&gt; half) new features, data, methods, etc., can be added to the functionality of the object to handle new uses for the object, or its subclasses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combining both means that the existing object, that almost fits the needs, can be enhanced to be useful in a new program, and still be used by the old programs, without needing to recode the old programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A common API that most high school students are familiar with is the telephone. It is going to be a very rare high school student who has never used a push-button telephone, including the &quot;buttons&quot; on the screen of a smart phone. So it is something that's well within the prior experience for those students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The twelve standard buttons on the push-button telephone haven't been changed since the Western Electric model 2500 was introduced in 1968. The latest model smart phone still uses the same layout, and it still works the same (from the user's perspective), even if it's now a touch-sensitive screen rather than twelve physical buttons. They way on made a phone call in 1968 using a push-button phone, and they way one makes a phone call now with a smart phone is the same. It has not been modified. What you can &lt;em&gt;do&lt;/em&gt; with those same twelve buttons, or simulated buttons on the smart phone, has been greatly extended. Sending text messages is only one change of many. There's no guessing what else those buttons might be extended to do, using new methods or new data. No matter what &lt;em&gt;new&lt;/em&gt; extensions are added, the original will not be modified.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-19T03:26:53.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="823" PostTypeId="2" ParentId="761" CreationDate="2017-06-19T03:38:33.300" Score="1" Body="&lt;p&gt;Bonus points for pop quiz questions about something you just explained from the front of the room.  Randomly done.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-19T03:38:33.300" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="824" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T04:49:40.243" Score="19" Body="&lt;p&gt;One way to show them the value of the command line would be to juxtapose doing a task with a GUI and with the command line. You could do something like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a directory with mixed content (eg. text files, audio files and images).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask your students to perform these actions via a GUI, then via the command line:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Move any text file that contains the word &quot;business&quot; or &quot;work&quot; to a directory called &quot;work&quot;&lt;/li&gt;&#xA;&lt;li&gt;Select all the audio files and move them to their own &quot;music&quot; directory.&lt;/li&gt;&#xA;&lt;li&gt;Select all the images and move them to their own &quot;images&quot; directory.&lt;/li&gt;&#xA;&lt;li&gt;Compress all audio files that are larger than 2MB into a zip or gzip.&lt;/li&gt;&#xA;&lt;li&gt;Make a sub-directory within images and move all files that contain the words &quot;family&quot;, &quot;trip&quot;, &quot;mom&quot;, &quot;dad&quot; in the file name to a &quot;personal&quot; directory.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;They will soon come to appreciate the fact that this can be easily scripted with a few lines of BASH:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mkdir -p work music images ./images/personal&#xA;mv `grep -Ril 'business\|work' .` ./work&#xA;mv *.mp3 ./music&#xA;for type in png gif jpg; do mv *.$type images; done&#xA;find ./music -size +2000 -print0 | xargs -0 tar -zcf large_music_files.tgz&#xA;find -E . -regex '.*(family|trip|mom|dad).*' -not -path &quot;./images/personal&quot; -exec mv {} images/personal \;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="976" LastActivityDate="2017-06-19T04:49:40.243" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="825" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T06:13:03.463" Score="5" Body="&lt;p&gt;Simply put: the command line can do things which the GUI apply &lt;strong&gt;cannot&lt;/strong&gt;. In Windows this is easily seen. CMD can perform operations that no other &lt;em&gt;GUI based&lt;/em&gt; tool can. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Linux there aren't many graphical tools anyway, but the terminal is by far the simplest way to get things done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To show them the strength of the command line, explain that GUI tools don't always specify the error message (depends on the error), should one occur. Command line does (regardless of which error occurred). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way to motivate the students would be to say that the terminal can do anything that any graphical tool can, and the reverse is not true. This would show them just how useful it is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, the terminal can override anything.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-20T16:09:03.970" LastActivityDate="2017-06-20T16:09:03.970" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="826" PostTypeId="2" ParentId="447" CreationDate="2017-06-19T06:21:58.223" Score="2" Body="&#xA;&#xA;&lt;p&gt;The obvious introductory example would be re-implementing &lt;a href=&quot;http://ruby-doc.org/core/Module.html#method-i-attr_reader&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Module#attr_reader&lt;/code&gt;&lt;/a&gt; / &lt;a href=&quot;http://ruby-doc.org/core/Module.html#method-i-attr_writer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Module#attr_writer&lt;/code&gt;&lt;/a&gt; / &lt;a href=&quot;http://ruby-doc.org/core/Module.html#method-i-attr_accessor&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Module#attr_accessor&lt;/code&gt;&lt;/a&gt;, which after all are typically the first example of metaprogramming a Ruby programmer comes in contact with:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;module MyAttrAccessor&#xA;  def attr_reader(*attrs)&#xA;    attrs.each do |attr|&#xA;      define_method(attr) do p instance_variable_get(:&quot;@#{attr}&quot;) end&#xA;    end&#xA;  end&#xA;&#xA;  def attr_writer(*attrs)&#xA;    attrs.each do |attr|&#xA;      define_method(:&quot;#{attr}=&quot;) do |val| p instance_variable_set(:&quot;@#{attr}&quot;, val) end&#xA;    end&#xA;  end&#xA;&#xA;  def attr_accessor(*attrs)&#xA;    attrs.each do |attr|&#xA;      p attr&#xA;      attr_reader attr&#xA;      attr_writer attr&#xA;    end&#xA;  end&#xA;&#xA;  Module.prepend self&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, you could add validation, for example, which dynamically looks for validator methods named after the attribute, i.e. &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;validated_attr_writer :foo&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would create a method &lt;code&gt;foo=&lt;/code&gt; which sets an instance variable &lt;code&gt;@foo&lt;/code&gt;, but only if it passes validation, which is defined as a set of methods named &lt;code&gt;foo_must_be_*&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result could look something like this:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Module&#xA;  def validated_attr_writer(*attrs)&#xA;    attrs.each do |attr|&#xA;      define_method(:&quot;#{attr}=&quot;) do |val|&#xA;        raise ArgumentError unless methods.grep(/^#{attr}_must_be/).all? {|meth| &#xA;          send(meth, val) }&#xA;        instance_variable_set(:&quot;@#{attr}&quot;, val)&#xA;      end&#xA;    end&#xA;  end&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="945" LastActivityDate="2017-06-19T06:21:58.223" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="827" PostTypeId="2" ParentId="447" CreationDate="2017-06-19T06:33:21.837" Score="1" Body="&lt;p&gt;A documentation system similar to Python's, where documentation isn't stored in the source text, but as dynamic data inside of instance variables of the documented objects themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also allows you to talk about Ruby's object model, e.g. the fact that methods aren't objects and thus you can't store the documentation of a method inside the method, you have to store it somewhere else (e.g. in the module the method is defined in).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The API looks a bit like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Foo&#xA;  doc 'This method does something totally interesting.'&#xA;  def bar(*) end&#xA;end&#xA;&#xA;Foo.show_doc(:bar)&#xA;#=&amp;gt; 'This method does something totally interesting.'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The implementation looks something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;module MethodAddedHook&#xA;  private&#xA;&#xA;  def method_added(meth)&#xA;    (@__doc__ ||= {})[meth] = @__last_doc__ if @__last_doc__&#xA;    @__last_doc__ = nil&#xA;    super&#xA;  end&#xA;end&#xA;&#xA;class Module&#xA;  prepend MethodAddedHook&#xA;&#xA;  def show_doc(meth)&#xA;    instance_variable_get(:@__doc__)[meth]&#xA;  end&#xA;&#xA;  private&#xA;&#xA;  def doc(str)&#xA;    @__last_doc__ = str&#xA;  end&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="945" LastActivityDate="2017-06-19T06:33:21.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="828" PostTypeId="2" ParentId="797" CreationDate="2017-06-19T08:08:19.213" Score="2" Body="&lt;p&gt;Describing the low level architecture at the level of what the machine is able to do can greatly help some students to identify with the task of coding. If you do this, I think you also need to consider how to describe the link between this internal machine architecture, and the external (analogue) world. I don't think it's necessary to go into great detail, just describe the basic load/store/add as a very simple process which is powerful because it can be performed extremely rapidly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm dubious about the value of going down to the level of logic gates or transistors. These are not the elements that processors are designed with (not for maybe 20 years), and seem like a little bit too much detail to present until you are at a point where manipulating and minimising logical equations makes sense. A simple assembly code expresses the right sort of low level unit, and there are plenty of examples of mechanical programmable machines that you can draw on (via you-tube) to demonstrate that the magic is realisable.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-06-19T08:08:19.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="829" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T08:26:01.103" Score="6" Body="&lt;p&gt;From an administrative perspective, a lot of Linux servers don't have a GUI in order to reduce the resource usage.  Doing anything on them will require knowledge of the command line, or knowledge of an automation tool like Ansible so they can be configured correctly.  The value of knowing CLI is being able to administer servers without a GUI, or be able to administrate them faster. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A one I use when bringing junior developers on board is get them to navigate to a specific directory.  Usually the webroot (I use Debian servers, so /var/www/html).  because you know where you're going, &lt;code&gt;cd /var/www/html&lt;/code&gt; is a lot faster than:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;click the file manager&lt;/li&gt;&#xA;&lt;li&gt;navigate up to &lt;code&gt;/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;click &lt;code&gt;var&lt;/code&gt; (wait for loading)&lt;/li&gt;&#xA;&lt;li&gt;click &lt;code&gt;www&lt;/code&gt; (wait for loading)&lt;/li&gt;&#xA;&lt;li&gt;click &lt;code&gt;html&lt;/code&gt; (wait for loading)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That's a basic example I use.  If they can get on board with that, it's generally a lot easier to get them to appreciate that whilst they may find the GUI easier to start, when you know the commands you'll end up using 80-90% of the time, the cli is so much faster.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2017-06-19T08:26:01.103" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="830" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T08:28:42.190" Score="11" Body="&lt;p&gt;The &lt;strong&gt;value&lt;/strong&gt; of the command line can clearly be demonstrated by looking at a simple gui configuration task, which might take 5 or 10 screenshots, &lt;em&gt;and still be ambiguous&lt;/em&gt; in comparison to 'open a shell and paste these 2 lines of text'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This doesn't encourage students to use the command line themselves, but starts to explain to them why it is valuable. You can draw parallels with using keyboard macro shortcuts in comparison to using a mouse - it's faster when it doesn't involve moving your hands as far (even if it requires learning the right set of shortcuts). Beginners won't want to start off by learning the short-cuts, but might become familiar with Ctrl-F for 'find' if they need to search for a few things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, with a mobile device, the command line (or keyboard shortcuts) are not the most obvious step. However, there are plenty of things with a phone that can only be done using adb, or become easier to do (or script) once you have adb available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shell commands, and shell scripting is just another tool. Trying to force students to use it too early is probably counterproductive - you need a scenario where they have to use it before they will be able to start to accept it. This doesn't mean you shouldn't yourself drop into using the command line when they can see you, but you're not explicitly teaching with your actions.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-06-19T08:36:45.740" LastActivityDate="2017-06-19T08:36:45.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="831" PostTypeId="5" CreationDate="2017-06-19T08:42:53.200" Score="0" Body="&lt;p&gt;Command Line interfaces are a means of issuing commands to a computer by successive lines of text (known as &lt;em&gt;command lines&lt;/em&gt; or &lt;em&gt;commands&lt;/em&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These commands have a defined structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;command name&amp;gt; &amp;lt;option&amp;gt; &amp;lt;parameters&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Different Command Line interfaces have their own list of &lt;code&gt;&amp;lt;command name&amp;gt;&lt;/code&gt;s which they use. For example, Linux terminal uses &lt;code&gt;ls&lt;/code&gt; to &lt;em&gt;list&lt;/em&gt; files and Windows CMD uses &lt;code&gt;dir&lt;/code&gt; to list files in a &lt;em&gt;directory&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Command-line_interface&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-19T14:54:17.677" LastActivityDate="2017-06-19T14:54:17.677" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="832" PostTypeId="4" CreationDate="2017-06-19T08:42:53.200" Score="0" Body="Questions related to teaching about command line interfaces (Linux terminal, Windows CMD, bash etc.). Use this tag to ask about teaching the how and why of using command lines." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-19T14:54:20.447" LastActivityDate="2017-06-19T14:54:20.447" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="833" PostTypeId="1" AcceptedAnswerId="834" CreationDate="2017-06-19T10:28:01.137" Score="7" ViewCount="931" Body="&lt;p&gt;During the summer I am teaching a programming workshop for students in a high school computer science major. The purpose of the workshop is to introduce them to image processing, and to have them experience using it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally, an image processing library is necessary (teaching in java, so probably JavaCV, though I might go for python and then just do openCV, but the question isn't about library choice). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These libraries do calculations with relatively advanced mathematics. Things that are aren't taught in the school, nor anything close to the level of math they know (It requires knowledge of matrix multiplication and many other things). &#xA;The students are at an advanced level in mathematics (calculus, algebra, vectors and a few other things). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I teach the mathematics behind those computations, before teaching the image processing material? I think they &lt;em&gt;can&lt;/em&gt; understand the math, if it is taught. Is that knowledge necessary to understanding how those libraries work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The image processing in question is feature extraction, edge detection etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of a mathematical background is how to write an algorithm to compute the determinant of a matrix, or one for matrix multiplication etc. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-19T10:53:49.450" LastActivityDate="2017-06-22T08:17:55.430" Title="Introducing image processing - Should I teach the math" Tags="|curriculum-design|secondary-education|image-processing|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="834" PostTypeId="2" ParentId="833" CreationDate="2017-06-19T10:41:12.887" Score="9" Body="&lt;p&gt;I would tread lightly here for a few reasons:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;The math is not strictly necessary.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The students signed up for an image processing workshop in the context of programming.  The core skill that they expect to come out with is the ability to program graphics manipulations.  Spending a substantial portion of this time learning about the underlying math, certainly important in a full semester's undergraduate or graduate coursework, only moves very slowly towards what they (presumably think) they signed up for.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Some kids get turned off by math.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;One of the unstated goals of every course is to both show the value of the field, and hope that the student wants to go on with the material and learn further.  That means that we want them to like it.  Using a voluntary summer workshop to emphasize the more abstract parts of the material may turn many of them away from graphical processing entirely.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;So, don't do any math then?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Actually, I would not say that.  I would touch on a some of the underlying mathematics, but briefly, and (because it is a summer workshop) with the simple goal of illustrating that there is important material that isn't too difficult to tackle if they eventually want to go further into the topic.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-19T10:41:12.887" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="835" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T11:12:34.483" Score="4" Body="&lt;p&gt;Here are couple of examples which don't employ objects resembling real-life stack:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Russian doll (matryoshka).  It is a stack if you use the relationship &lt;code&gt;contained_in(BiggerDoll, SmallerDoll)&lt;/code&gt; as a model for stack.  &lt;code&gt;push&lt;/code&gt; in this context would be equivalent to encasing a stack of Russian dolls in a yet bigger Russian doll, &lt;code&gt;pop&lt;/code&gt; would be equivalent to opening the outermost doll and extracting the remaining dolls.&lt;/li&gt;&#xA;&lt;li&gt;Literary figure &quot;story within a story&quot; (or &quot;dream within a dream&quot;), although the analogy is a little imprecise since any &quot;inner&quot; story can be observed from an &quot;outer&quot; story.  The examples of such stories are plentiful, but since this should appeal to high-school students, I think, the movie Inception (the one starring DiCaprio) could be used. In this movie, the &lt;code&gt;push&lt;/code&gt; is when the characters enter a dream, and &lt;code&gt;pop&lt;/code&gt; is when they wake up from the dream.  Characters must wake up from their dreams in the exact reverse order from the one in which they entered them.&lt;/li&gt;&#xA;&lt;li&gt;Palindrome.  I.e. the way to recognize one by &lt;code&gt;push&lt;/code&gt;ing half of it on a stack and then &lt;code&gt;pop&lt;/code&gt;ing the other half.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1000" LastEditorUserId="1000" LastEditDate="2017-06-19T11:31:30.493" LastActivityDate="2017-06-19T11:31:30.493" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="836" PostTypeId="2" ParentId="833" CreationDate="2017-06-19T11:49:51.177" Score="6" Body="&lt;p&gt;I've never taught image processing with a library, only with direct array manipulation so take my thoughts in that context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ben's correct in that some kids are turned off by math and it's true that the math isn't strictly necessary but the other side is that some kids will find a basic understanding empowering and, as a friend of mine always says &quot; never use a tool you couldn't write yourself&quot; - there's a benefit to understanding what's going on under the hood.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, being a summer program, you don't have the luxury of temporarily losing them, you've got one shot so Ben's points are really important to consider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other side, depending on your audience, and only you can judge that  you can teach some of the math or at least the intuition behind the math.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, we reading about edge detection, you'll see things like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Take the derivative of the color gradient using a 3x3 kernel....&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;or something similar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But at the core, what every description is really saying is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If the color changes a lot from one pixel to another then it's probably part of an edge.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Kids can easily see this (particularly if you first convert the image to gray scale. They can easily get the concepts and even write a simple edge detector with none of the hard math or terminology. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The matrix stuff can be shown mechanically for computational efficiency if you want to show it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't teach the math first but depending on the audience I'd probably try to get some in. &lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="150" LastEditDate="2017-06-22T08:17:55.430" LastActivityDate="2017-06-22T08:17:55.430" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="837" PostTypeId="2" ParentId="628" CreationDate="2017-06-19T12:06:41.880" Score="1" Body="&lt;h1&gt;Save the trees&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Requiring the exam be completed with pen and paper is a ridiculous anachronism.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are teaching something practical, like, say, Java 101, there is absolutely no point in asking a student to write Java code on paper.  Nobody, not a single person, needs this.  Why not use clay tablets if you are going for hard labor?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you teach something like automata theory, then use a language capable of embedding proofs of what you teach, and require that students complete their tests by submitting proofs in that language. There is not a single reason why computer scientist wouldn't know how to use the most widely available form of computer as a tool in her work.  And if proofs aren't possible or are too difficult, then use code that illustrates the solution.  Anything other than that is &quot;hot air&quot;; feels unjust and discriminating due to the randomness of the opinion of the person responsible for verifying such test.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Some background info&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I've studied CS and was briefly a TA. I had to submit exercises in Java written in pen on paper.  I also saw the exercises submitted by other students.  None had even a correct number of opening and closing brackets, let alone other typos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My other background is in printing and typography.  Having worked for a while in a publishing house, I assure you that the number of mistakes in mathematical and programming-related books is astronomical when compared to regular prose.  It is not humanly possible to verify handwritten formulas in reasonable time.  Every single textbook I had on subjects like math and CS had dozens of mistakes that I was able to discover, and the denser the material, the more mistakes there were.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are prominent mathematicians like Vladimir Voevodsky who try to change this situation by developing better foundations for automating proofs.  I believe that this is the way to go.&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2017-06-19T12:06:41.880" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="838" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T12:17:48.890" Score="8" Body="&lt;p&gt;&lt;strong&gt;Here, take this pen. Now sell it to me.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with the above well-known interview question, the value of a given tool can be most appreciated when one has no other alternatives than to use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show your students that in productive systems and real-life environments such as server farms and data centers &lt;em&gt;there is no such thing as a GUI&lt;/em&gt; (or very rarely). The &lt;strong&gt;value&lt;/strong&gt; of using the command line in these cases is therefore very high indeed.&lt;/p&gt;&#xA;" OwnerUserId="1004" LastActivityDate="2017-06-19T12:17:48.890" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="839" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T13:01:13.453" Score="3" Body="&lt;p&gt;In my view, a good computer science example for stack-oriented processing is &lt;a href=&quot;https://en.wikipedia.org/wiki/PostScript#The_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;the PostScript language&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;Hello world&lt;/code&gt; example from the Wikipedia page shows the Reverse Polish (postfix) notation used in PostScript (similar to the &lt;a href=&quot;http://docs.cs50.net/2016/ap/problems/calc/2/calc2.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS50 AP Calc 2.0&lt;/a&gt; Peter showed in his answer that uses prefix notation):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;%!PS&#xA; /Courier             % name the desired font&#xA; 20 selectfont        % choose the size in points and establish &#xA;                      % the font as the current one&#xA; 72 500 moveto        % position the current point at &#xA;                      % coordinates 72, 500 (the origin is at the &#xA;                      % lower-left corner of the page)&#xA; (Hello world!) show  % stroke the text in parentheses&#xA; showpage             % print all on the page&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Input tokens would be pushed on a stack as they are parsed, and when an operator or command is encountered that needs &lt;em&gt;n&lt;/em&gt; arguments, the upper &lt;em&gt;n&lt;/em&gt; tokens would be popped from the stack, used for calculation or function execution and any result pushed on the stack again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can even better be seen in the example that draws a line, using a conversion from PostScript points to millimeters:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/mm {360 mul 127 div} def&#xA; 0 0 moveto&#xA; 0 40 mm lineto stroke&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first line defines¹ a conversion function &lt;code&gt;mm&lt;/code&gt; which is used in the third line to draw a vertical line 40 mm long. The function pops the top element from the stack, multiplies it with 360, divides it by 127 and pushes the result on the stack again.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;¹ In fact, the &lt;code&gt;def&lt;/code&gt; command, which defines a function, will &lt;em&gt;not&lt;/em&gt; put its result back on the stack but into a dictionary which is used to look up commands.&lt;/p&gt;&#xA;" OwnerUserId="1005" LastActivityDate="2017-06-19T13:01:13.453" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="840" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T14:38:17.617" Score="5" Body="&lt;p&gt;This won't work for all students, but some will likely be familiar with the very popular collectable card game &lt;a href=&quot;https://en.wikipedia.org/wiki/Magic:_The_Gathering&quot; rel=&quot;noreferrer&quot;&gt;Magic: The Gathering&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this game, spells are cast to &lt;strong&gt;&quot;the stack&quot;&lt;/strong&gt;, with the last spell cast resolving first.  During resolution of the stack, more spells may be cast to the top of the stack.&lt;/p&gt;&#xA;" OwnerUserId="1012" LastActivityDate="2017-06-19T14:38:17.617" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="841" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T14:49:12.913" Score="4" Body="&lt;p&gt;Infrastructure as Code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the configuration of your infrastructure (presumably via CLI) cannot be reduced to code and checked into source control, then you are setting yourself (and your employer) up for failure.&lt;/p&gt;&#xA;" OwnerUserId="1014" LastActivityDate="2017-06-19T14:49:12.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="842" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T14:53:57.650" Score="2" Body="&lt;p&gt;I am not a computer science educator at all, but this question immediately reminded me of Leo Brodie's book &lt;em&gt;Starting Forth&lt;/em&gt; from 1981 (!) with some cute &lt;a href=&quot;https://www.forth.com/starting-forth/1-forth-stacks-dictionary/#The_Stack_Forth8217s_Workspace_for_Arithmetic&quot; rel=&quot;nofollow noreferrer&quot;&gt;visualizations of stack manipulations&lt;/a&gt;. This links up with @Dubu's answer about &lt;em&gt;the PostScript language&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1011" LastActivityDate="2017-06-19T14:53:57.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="843" PostTypeId="2" ParentId="770" CreationDate="2017-06-19T15:29:55.620" Score="1" Body="&lt;p&gt;Pointers are simply variables which are used to store  memeory addresses of another variables. &#xA;for example suppose we have a integer variable &#xA; int a =10;&#xA;then the value 10 i.e. is stored at a memory cell which can be accessed with the help of a pointer. With the help of pointer we can directly access the value the variable to which the pointer is pointing.&lt;/p&gt;&#xA;" OwnerUserId="1017" LastActivityDate="2017-06-19T15:29:55.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="844" PostTypeId="2" ParentId="761" CreationDate="2017-06-19T15:31:50.817" Score="8" Body="&lt;p&gt;As &lt;strong&gt;thesecretmaster&lt;/strong&gt; once intoned, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/327/note-taking-policy-laptops-or-by-hand&quot;&gt;&quot;Just from my experience as a student, computer out == doing whatever you want.&quot;&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kids won't learn from you if they won't give you their attention. And a quick glance into a restaurant, with faces aglow from phone screens, is enough to demonstrate that prioritizing attention to a person instead of a screen is hard for anybody, &lt;em&gt;even if they like you and are interested in what you have to say.&lt;/em&gt;  How much much harder must it be for a kid who is only half-interested in the first place?  So the first thing to do is to heed the advice of &lt;strong&gt;pddring&lt;/strong&gt;: get those screens turned off!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to pull in their focus, here are a few additional techniques you might use:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Get physical.&lt;/em&gt;&lt;/strong&gt; Even though high school kids resist physical activities in class, any time you can get them using their bodies, they will be engaged.  Have them imitate the shape of a graph with their hands.  Tell them to stand up and figure out with a partner how to mime recursion, or whatever concept you've just discussed.  Use &lt;a href=&quot;https://cseducators.stackexchange.com/a/808/27&quot;&gt;manipulables&lt;/a&gt; whenever you can.  Honestly, even doing an elementary-school style &lt;em&gt;&quot;stand up and shake it out&quot;&lt;/em&gt; can bring your kids back to you.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thumbs-up: comprehension self-ratings.&lt;/em&gt;&lt;/strong&gt;  After almost every concept I teach, I have my kids &lt;em&gt;show me thumbs&lt;/em&gt;.  Thumbs-up means that they think they get it.  Thumbs-down means they're lost, and thumbs to the side means they're feeling a little fuzzy.  This immediate feedback allows me to target the kids who know they need help right away.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Modified pop-quizzes.&lt;/em&gt;&lt;/strong&gt; One technique I used regularly in my old job was &lt;em&gt;semi-announced pop-quizzes&lt;/em&gt;.  If attention was floundering, I would announce that a pop quiz was &lt;em&gt;possible&lt;/em&gt; in the next 10 minutes.  I only actually ran a pop quiz about 20-25% of the time.  Most of the time, the kids clicked in, and I didn't need to.  The quizzes themselves didn't count for a lot, but the mere threat of them provided a very easy tool to gain total, focused attention at moments when I really needed it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Pair, explain, ask.&lt;/em&gt;&lt;/strong&gt;  This is a modification of the traditional &lt;em&gt;pair and share&lt;/em&gt;, and is useful for concepts that you are already pretty sure that your kids don't entirely get.  (I will use this in place of &lt;strong&gt;thumbs-up&lt;/strong&gt; when I want to get a difficult point across).  Ask kids to explain the concept we just learned to a neighbor, and announce the number of seconds available for the activity (why seconds? See footnote &lt;a href=&quot;https://cseducators.stackexchange.com/questions/502/how-to-teach-students-not-to-use-jump-statements/520#520&quot;&gt;here&lt;/a&gt;).  You'll get an immediate flurry of activity, and if you listen, you'll hear some very productive discussion going on.  As soon as they're done, ask if any groups still have questions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Keep it silly.&lt;/em&gt;&lt;/strong&gt;  Even the driest topics are made more palatable with a dose of the silly.  Mary Poppins got this right. &lt;em&gt;&quot;Just a spoonful of sugar...&quot;&lt;/em&gt;  It doesn't have to be world-class humor.  It just needs to be off-kilter enough to keep the kids guessing a little about where you will go next.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I hope that something above will give you (and your students!) a much-needed lifeline.  Attention is something we must constantly monitor as teachers, and it never gets easy.  But when it gets super frustrating, and you want to strangle your students for being off in outer space somewhere, try to remember that &lt;em&gt;you actually like these kids,&lt;/em&gt; and it'll all be worth it in the end. :)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-19T15:58:45.360" LastActivityDate="2017-06-19T15:58:45.360" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="845" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T16:23:57.680" Score="8" Body="&lt;p&gt;These are some experiences I've had, highlighting the power of the command line:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some programs print status messages as they run, if they were called from the command line, that otherwise would never be seen. This particular advantage of the CLI helped the developer of the logic analyzer I use to determine that the file it captured was corrupted.&lt;/li&gt;&#xA;&lt;li&gt;Sometimes GUIs are just too confusing. There are many times when I'm looking for setting in a GUI app that I can't find, so I go back to the CLI version of the app.&lt;/li&gt;&#xA;&lt;li&gt;It's easier to see output or feedback from programs on the CLI, especially if you're writing your own tool. Shell scripts are especially handy for file manipulation or output redirection.&lt;/li&gt;&#xA;&lt;li&gt;Also, you can set or change any configuration settings on a command line.&lt;/li&gt;&#xA;&lt;li&gt;There have been times when I forgot all the passwords on old computers I had, so I was forced to hack into them at boot-time to change their root passwords.&lt;/li&gt;&#xA;&lt;li&gt;Another thing I encountered in the past is when I had to reconfigure&#xA;certain settings on a computer without being able to view any display&#xA;or output of any kind. By going to a console on that computer, I was&#xA;able to type the correct commands to get it to do what I wanted it&#xA;to. Then it was ok.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are just situations I've encountered in which a command line was absolutely required to get the job done. There are so many more. Also, if you're a keyboard commando, it's just easier and quicker to get certain things done by using the command line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess my whole point here is: if all else fails, there's always the command line.&lt;/p&gt;&#xA;" OwnerUserId="1020" LastActivityDate="2017-06-19T16:23:57.680" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="846" PostTypeId="2" ParentId="690" CreationDate="2017-06-19T16:43:40.230" Score="7" Body="&lt;p&gt;Since all the other great answers are all given, let me mention a minor one.  &lt;a href=&quot;http://www.folj.com/lateral/&quot; rel=&quot;noreferrer&quot;&gt;Lateral thinking Puzzles&lt;/a&gt; are good for this.  They help to teach children to think in a different manner by themselves and encourage general problem solving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, they can be used to teach one important part of algorithms, the need for rigor in your statements, if one chooses to go that route.  Pick some of the easier lateral thinking puzzles, but threaten to answer questions exactly as a computer will.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You find that many times people ask questions different then they intend to.  They phrase things wrong, or they hear one answer but assume you meant something else.  If you are very &lt;em&gt;very&lt;/em&gt; exact in your answering you can make a puzzle hard to solve simply because people interpert your answers very different from what you literally said.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also include things like &quot;does not computer&quot; for questions that aren't well phrased, some 'standard' ammusing response to questions that are not yes or no questions. etc.  Most importantly, remember in your head some examples where you can see the children misunderstood your answers or made ralse presumptions.  Then after a puzzle is solved show them their mistakes and explain to them how they lacked rigour in their questions and how that lead to confusion, it's a good analogy for how you need to approach computers that are 100% literal and do exactly what you told them to, but not always what you meant for them to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works best with &quot;false assumpiton&quot; puzzles that are written in such a way as to trick people into assuming something about the premis that wasn't said.  for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use a pronoun to refer to someone who is also refered to by name, so they presume two people are relevant instead of one person refered to in two ways (aliasing!)&lt;/li&gt;&#xA;&lt;li&gt;Any puzzle that doesn't use humans as the premise, &quot;Tom killed Jerry but no one cared, why?&quot;, because Tom and Jerry are a cat and mouse.&lt;/li&gt;&#xA;&lt;li&gt;Trick someone by confusing sex, talk about &quot;Alice and Kris&quot; doing something where people presume Kris is male and the puzzle the mystery is obvious if one realizes Kris is female.&lt;/li&gt;&#xA;&lt;li&gt;Other presumptions that are false.  Maybe Alice and Kris went out on a date together, they saw a movie and then went out to eat, but after the dinner Kris refused to pay for Alice dinner and left immediately without giving Kris a ride back home.  He proceed to complain about how horrible his date was to everyone the next day at school.  Alice wasn't upset by any of this, why not?&quot;, turns out their both female and on a double date, Alice's dinner and ride home was provided by the boy she was dating and isn't offended that Kris didn't like the boy she dated.  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This sort of questions teach the children to learn to check their presumptions and how to ask properly rigorous questions to verify information, even get's them into the mindset needed to debug broken code by knowing what to ask to narrow down a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've used these sort of things to prepare young kids for the mindset required for programming, but these were kids I was mentoring and spent a bit of time with.  It takes a little time to do a puzzle with kids, and while I found they helped me to communicate programming ideas I don't know if they provide so much benefit as to warrant class time spent on them?  If nothing else these could be good things to do during 'dead' time, before class officially starts, on the bus during a field trip, while waiting outside during a fire alarm, etc to entertain kids while sneaking in some extra training.&lt;/p&gt;&#xA;" OwnerUserId="1008" LastActivityDate="2017-06-19T16:43:40.230" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="847" PostTypeId="2" ParentId="639" CreationDate="2017-06-19T17:13:05.693" Score="11" Body="&lt;p&gt;you not going to like this answer, but &lt;em&gt;Don't teach it!!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least, don't teach it unless your teaching a 300-400 level course in college.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most code optimization is very tiny benefit, especially since modern compilers are able to do many of the optimizations for you and it's entirely possible for someone to optimize wrongly an slow something down instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More importantly code optimization takes time and often leads to less readable code, which is bad.  It's very rare that any optimization other then algorithmic (Big O level) ones will ever be needed, and code readability is a huge and important factor of every program.  You don't want to teach students to sacrifice readable, maintainable, and testable code for theoretical optimizations that often will not have a noticeable impact on rate that the code runs.  Leave that to be learned in upper level coding courses only after they are able to write solid readable code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only type of optimization I would every worry about teaching is Big O level algorithmic optimizations, and even then I probably wouldn't worry too much about that until their in 200 level college courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For low level courses I would demonstrate the difference between quick sort and some naive sort, to show algorithms can matter, and not much else.  Maybe give a quick example of a nested loop being much slower then two non nested loops, but I would not be emphasizing writing code efficiently, only showing that efficiency concepts exist, it's up to later classes for students to understand and make efficiency decisions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At 200 level courses I would start stressing how things could be optimized algorithmically to some degree.  You would likely be teaching more about different container types, linked lists vs arrays vs hash maps, so just explaining these algorithms in a way that touches on why one would use one over the other is good.  You will be teaching them how skilled programmers use tricks to gain efficiency benefits by demonstrating the common algorithms they cam up with, which is great.  However, the emphasis now is less about coming up with great algorithms themselves, and mostly knowing that algorithm decisions can matter and they should be picking the best collection/tool for the job based off of it's algorithmic efficiency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At 200 level you can also start to point out particularly horrible Big O mistakes.  The most obvious example would be including a nested for loop that does not need to be nested.  Telling your students &quot;try not to have multiple loops inside each other if you can avoid it, especially not if each of them can be large&quot; is okay at this level.  Give an example of why nested loops can be absurdly slow and how you can avoid it is okay, often this can be tied in with picking the right tool for the job by showing how iterating over an array once with a precompute phase to put stuff in a hash map before a second iteration is faster then the nested loop, and look here is a demonstration of another reason to use a hash map.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;at 300 level courses your ready for a course that focuses entirely on algorithms, this one course should explain Big O vs Big Omega etc, give means of measuring algorithmic complexity, and really hammer in that algorithms matter.  From this point on always bring up algorithmic complexity and ways to make better algorithms, their ready to adjust for this.  However, still be quick to point out when an optimization was needlessly complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometime around 300/400 level optimization considerations other then algorithmic can be tackled as well.  I would suggest tying this in with study of the physical limitations of a computer though.  When you study how memory actually works you can give an example of how, for example, ensuring you access data 'nearby' each other to avoid cache hits is useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this level of class I suggest explaining how the computer works and how this affects optimization decisions.  Then give them an 'unoptimized' piece of code and tell them to optimize it.  Write some automated testing scripts that will run the same code 1000 times on a large sample size, compare wall clock before/after it's run, and figure out the average speed of the code, then tell them you want them to provide N boost to it's runtime.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had one such project where I got something like a 25 x speed increase when doing math on a 3 dimensional cube where we had to consider the content of each 'touching' cube.  The biggest increase was changing the logic to minimize cache hits, but things like loop unrolling and replacing methods with macros also came into play, these was using a C compiler with all optimizations disabled.  It really helped to show how drastic optimization can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's important to always stress readable code is most important and that premature optimization is bad, repeat constantly to only optimize proven slow points and to test your code to identify where the slowdowns occur before trying to optimize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your not teaching high level courses though, just don't do it.  It's likely to lead to worse code most of the time and just adds an extra thing for students to learn and get confused about.  Focus on their writing good maintainable code and only after they have mastered that should they worry about 'efficient' code.&lt;/p&gt;&#xA;" OwnerUserId="1008" LastActivityDate="2017-06-19T17:13:05.693" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="848" PostTypeId="2" ParentId="628" CreationDate="2017-06-19T18:03:08.483" Score="4" Body="&lt;p&gt;I guess I’m late to the party, but I feel like there’s still a bit missing from the discussion. It’s too easy to say “CS != Programming” and get a round of applause. It’s also too easy to try to generalized from our own experiences: most of our students are not going to grow up to frequent csEducators.stackexchange. I think Winterborne, Ben I, and notquitezeus are right to &lt;strong&gt;start by thinking about who our students actually are, and what our course goals are&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of our students are at the introductory level, so let’s focus there. At my small, liberal arts college, the current intro CS student does not fit the stereotype of even a few years ago. Most are interested in something other than CS, but want to learn a bit of CS to be more effective at their other major. They are probably weaker on average than students who took CS when CS was a smaller discipline “only for the elite.” I for one, want to welcome these students to the CS world. My main course goals are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Give them a positive experience.&lt;/li&gt;&#xA;&lt;li&gt;Convince them that CS is everywhere, and empower them to use it.&lt;/li&gt;&#xA;&lt;li&gt;Encourage them to take even more CS. The intro course is not meant to be all-encompassing.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I try to avoid outdated teaching methodologies that historically would have pushed these newcomers out of the field (and, unfortunately, historically pushed out women and minorities in particular). I’m talking about things like macho programming challenges or extremely difficult labs that require all-nighters. For me, the jury is out regarding whether exams should be on paper or with a computer. I totally agree with Winterborne’s point that “&lt;strong&gt;Writing is not representative of their past experience in the course&lt;/strong&gt;.” Many students hate the pencil and paper exams, don't feel empowered by them, and don't want to take more CS after the exam, running contrary to my course goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the class focus is on algorithms and computational problem solving, rather than programming, exams still tend to be 10 questions of the form &quot;write a function to compute ...&quot;. Many of the answers on this thread seem to go against IDEs, but the OP didn’t mention IDEs at all. I’m not convinced that an exam in something like IDLE would really give me less info than a paper exam. It would give me different info. By allowing students to actually run their code, &lt;strong&gt;an exam in IDLE would let me test their ability to quickly come back from a mistake&lt;/strong&gt;, rather than brute force memorization skills. &lt;strong&gt;It would test their ability to understand and respond to error messages&lt;/strong&gt;. Crucially, I believe working in IDLE on the exam (as they spend most of their time in the class, HW, and labs doing) would &lt;strong&gt;reduce test anxiety and stereotype threat&lt;/strong&gt;, and this does line up with my course goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the downsides? Sure, error messages will point out their syntax errors so they can fix them. But that’s fine with me, because I’m testing ability to come up with algorithms, not knowledge of syntax. Exams meant to test syntax would run counter to my course goals. How about Ben’s example of confusing items and indices? This is certainly a common mistake. For some, it’s because they are rushed and sloppy. For others, it’s because they really don’t know the difference. I think that, even if they are getting help from error messages, I’ll detect the 2nd group of students. They are the same students who might not even realize a loop is required, and error messages are not going to help with that. Also, if Ben is concerned about detecting just how lost they are, he could have the computers record the history of error messages generated as students take the test, and could automatically browse it for particularly bad errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not saying I necessarily think exams in IDLE are better than on paper. My colleagues are all against this idea. But I made a similar switch in Statistics and I'm convinced it was the right move. It allowed me to test students' abilities to synthesize resources I'd given them to quickly conduct a new applied data analysis. It traded rote memorization in return for an environment where students can showcase their skills and can go as in-depth as they want. CS is obviously different, but for me at least, this question deserves more thought.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-06-19T18:03:08.483" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="849" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T18:31:16.390" Score="3" Body="&lt;p&gt;In addition to the experiences I (Nate W above) had of requiring the CLI, there was one more important one that I forgot to mention, although it isn't as relevant today as it was in the past: using a serial interface to communicate with a computer when the monitor or video system was not working. This is similar to the last point on my list above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a situation once in which I had to connect a null-modem cable between two computers in order to fix xorg.conf on one of them. CLIs are such wonderful and powerful tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CLIs are just there. As long as your computer (and/or operating system) runs, it's always there. It won't let you down. Probably the best way to teach the power of the command line is to have someone fix their GUI using their CLI ;)&lt;/p&gt;&#xA;" OwnerUserId="1020" LastEditorUserId="27" LastEditDate="2017-06-20T10:40:12.620" LastActivityDate="2017-06-20T10:40:12.620" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="850" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T18:40:32.430" Score="15" Body="&lt;p&gt;The back button on a web browser is an excellent example of a stack implementation that is easily understood even by non-experts and easily demonstrated in a class.  You can illustrate the stack in diagrams, and you can show it in action in a browser.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a user visits a new web page, the current page gets pushed onto the stack.  When the user clicks the back button, the last page pushed onto the stack is popped off of the stack and loaded in the browser window.  When all of the pages are popped off of the stack, the back button grays out, indicating that the stack is empty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the forward button also uses a stack, but it works on a slightly different basis.  Clicking the back button pushes the current page on the stack and clicking the forward button pops the top page off of the stack.  Visiting a new page without clicking either button automatically empties the forward button stack.&lt;/p&gt;&#xA;" OwnerUserId="1025" LastActivityDate="2017-06-19T18:40:32.430" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="851" PostTypeId="2" ParentId="791" CreationDate="2017-06-19T19:52:21.700" Score="14" Body="&lt;p&gt;&lt;strong&gt;Check whether a string of parentheses is balanced or not&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, return &lt;code&gt;True&lt;/code&gt; for these input strings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;(()())&#xA;([]{{}}[])&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;but &lt;code&gt;False&lt;/code&gt; for these strings:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;(()&#xA;([)(])&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can solve this using recursion, but a very efficient and clear solution would be to iterate over the string, whenever you encounter an opening symbol, you &lt;code&gt;push&lt;/code&gt; it into the stack. Whenever you encounter a closing symbol you &lt;code&gt;pop&lt;/code&gt; from the stack and check that that the types match.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;http://interactivepython.org/runestone/static/pythonds/BasicDS/SimpleBalancedParentheses.html&quot; rel=&quot;noreferrer&quot;&gt;here for a Python implementation&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1032" LastActivityDate="2017-06-19T19:52:21.700" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="852" PostTypeId="2" ParentId="761" CreationDate="2017-06-19T20:02:10.123" Score="2" Body="&lt;p&gt;I also have trouble giving &quot;firm directives&quot;. Remember that if the kids need that from you, you owe it to them to be firm. Even if they don't like it at the time, they will respect you more, and not less.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really like your quote about love. Hopefully that's why we're in this field.&lt;/p&gt;&#xA;" OwnerUserId="631" LastEditorUserId="150" LastEditDate="2017-06-20T10:16:58.637" LastActivityDate="2017-06-20T10:16:58.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="853" PostTypeId="2" ParentId="812" CreationDate="2017-06-19T20:33:08.003" Score="11" Body="&lt;p&gt;I learned the value of CLI on the job, where we would test our code, installers, etc. on multiple machines with multiple OSs. Many server Linuxes do not have GUI to begin with, but even if dealing with a Mac it is much easier to use responsive text terminal, rather then slow-as-molasses VNC. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also helps that while GUIs are pretty different between different OSs (and even different version of the same OS can have some stuff moved around), CLIs for the most part are very similar (at least between Linuxes and Macs) so if you know, say, Git commands (as one should if there are going to be a programmer) you can start using anywhere without learning a new GUI each time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same thing for editing and compiling your stuff, if all you know is VS or XCode and suddenly you need to compile your program on Linux, what do you do? But if you take the trouble to make a make file yourself, you know exactly what's going on, what libs you're linking against and such, and in a lot of cases you don't even need to modify it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line is knowing CLI gives one the ability to work with multiple systems pretty comfortably, which maybe is not something that happens a lot in school, but at work is pretty common, many companies like their products to be multiplatform&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biggest advantage of CLI, though is that you can set the terminal background to black and letters to green, so that even when you're doing some pretty mundane stuff like extracting an archive or copying files or whatever, you'll look like a badass movie hacker, so there is that&lt;/p&gt;&#xA;" OwnerUserId="1034" LastEditorUserId="1034" LastEditDate="2017-06-19T20:45:59.547" LastActivityDate="2017-06-19T20:45:59.547" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="854" PostTypeId="2" ParentId="786" CreationDate="2017-06-19T20:56:29.380" Score="2" Body="&lt;p&gt;SOLID being a set of principles pertaining to OO programming, I don't think (but I'd love to be proven wrong) that you can find a &quot;real life&quot; analogy that will at the same time:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;convey the spirit of the open/close principle correctly&lt;/li&gt;&#xA;&lt;li&gt;be understandable by &lt;em&gt;high school students&lt;/em&gt; (my gut feeling is that in some domains such as engineering or maybe law you could find such analogies but I'm not sure).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Rather you could use some software that they use everyday as an analogy (and that they understand really well). Here are some examples:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A web browser. The application in itself is &lt;em&gt;closed&lt;/em&gt;. It consists of a fixed executable that performs a set of tasks in a particular way (displaying web pages). Anything on the system that needs to display a web page can just ask the browser to display it and it will always work. However, the behaviour of the browser can be altered (e.g. ad blocking, social media integration, etc...) through browser extensions. You don't need to recompile the browser (i.e. generate a new program) for that to work. The browser has hooks in its code that allows another program (the extension) to alter its behaviour or add a new functionality.&lt;/li&gt;&#xA;&lt;li&gt;A media player. It supports a particular sets of input media formats. When a new format becomes available, one just needs to install a codec for the new format to be taken into account, without changing the media player itself.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The key point here is that although the module (class, web browser, media player) can be extended, the decision to enable extension has to be taken when the module is being developed (i.e. before it is closed). In statically typed OO programming this amounts to allow for a class to be extended by future code (e.g. no final in Java). Dynamic languages (in particular prototype based ones) such as Javascript or Python do not allow you to (easily) close a module. The user can always overwrite a method, access all fields, remove some (thus breaking existing code).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2017-06-19T20:56:29.380" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="855" PostTypeId="2" ParentId="791" CreationDate="2017-06-20T01:50:41.263" Score="2" Body="&lt;h1&gt;The call stack&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;They've presumably already learned about functions, so if you use that as the example, you both teach them about stacks &lt;em&gt;and&lt;/em&gt; give them a deeper understanding of how functions work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would take it in two main phases, using code similar to this as an example.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;h(c) {&#xA;    print(c)&#xA;    return&#xA;}&#xA;&#xA;g(b) {&#xA;    h(b + 3)&#xA;    print(&quot;foo&quot;)&#xA;    return&#xA;}&#xA;&#xA;f(a) {&#xA;   x = 42&#xA;   g(x)&#xA;   h(x)&#xA;   print(&quot;bar&quot;)&#xA;   return&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First, focus on how the return always knows to transfer control to the statement after the line the function was called on.  So for instance, the return from &lt;code&gt;h&lt;/code&gt; might go to either &lt;code&gt;g&lt;/code&gt; or &lt;code&gt;f&lt;/code&gt;, depending on where it was called from, and in the former case, &lt;code&gt;g&lt;/code&gt; in turn knows where &lt;em&gt;it&lt;/em&gt; was called from.  If the language they're using is one that prints the call stack when it crashes, they're probably already somewhat familiar with this.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure they fully understand how the control flow works first, then bring in the concept of a stack and explain how you can implement function calls by storing the return addresses on the stack whenever you call a function, and popping them whenever you return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they understand that, you &lt;em&gt;might&lt;/em&gt; want to proceed to explain how parameters are stored on the stack.  That might confuse them a bit, though, since you can't access elements other than the one on top in a &quot;theoretically pure&quot; stack, but you do when accessing values in the stack frame. I would probably just mention to them that the reality is a bit more complicated than what you just described, but save the details for a later lesson.&lt;/p&gt;&#xA;" OwnerUserId="827" LastActivityDate="2017-06-20T01:50:41.263" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="856" PostTypeId="2" ParentId="797" CreationDate="2017-06-20T02:43:51.643" Score="4" Body="&lt;p&gt;Students should understand the importance of the memory hierarchy, including how caches use temporal and spatial locality to tremendously speed up memory accesses. Otherwise, a student would not know there is any difference between:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 1000000; i++) {&#xA;    for (int j = 0; j &amp;lt; 1000000; j++) {&#xA;        arr[i] += j;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and the logically equivalent reordered code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int j = 0; j &amp;lt; 1000000; j++) {&#xA;    for (int i = 0; i &amp;lt; 1000000; i++) {&#xA;        arr[i] += j;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The difference is that, in the first piece of code, each array element is retrieved from memory once and placed in either a register or the cache, from which it is operated on a million times. Ignoring spatial locality (which would apply equally to both versions), the total number of reads from memory would be 1,000,000, and the total number of writes would be 1,000,000.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the second version of code, each array element is fetched from memory once for each value of &lt;code&gt;j&lt;/code&gt;. The total number of reads from memory would be 1,000,000 x 1,000,000 (10^12); the total number of writes would be the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Per &lt;a href=&quot;https://gist.github.com/jboner/2841832&quot; rel=&quot;nofollow noreferrer&quot;&gt;Latency Numbers Every Programmer Should Know&lt;/a&gt;, a main memory access takes about 100 ns; an L1-cache reference takes .5 ns. Accessing a register adds no time to instruction execution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ignoring the times for the writes (which may not be in the critical path) and spatial locality (which applies the same to both versions) and assuming that &lt;code&gt;a[i]&lt;/code&gt; is stored in a register, the data memory access time for the first is 10^6 * 100 ns = .1 s. The data memory access time for the second is 10^12 * 100 ns = 10^5 s.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-20T17:30:27.403" LastActivityDate="2017-06-20T17:30:27.403" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="857" PostTypeId="2" ParentId="812" CreationDate="2017-06-20T04:20:29.933" Score="10" Body="&lt;p&gt;My reasons for using a CLI might be different from yours.  As an educator you'll be most convincing when you can point out the advantages of the CLI that are most meaningful to you.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Off the top of my head, the reasons to use a CLI over a GUI are &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;unambiguousness. There's no &quot;click that option. No, THAT one.&quot;&lt;/li&gt;&#xA;&lt;li&gt;repeatability. &lt;/li&gt;&#xA;&lt;li&gt;scriptability.  This is a cousin of repeatability - you can collect tasks into script files.&lt;/li&gt;&#xA;&lt;li&gt;embeddability.  CLI tasks can be called from other CLI tasks.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's easy to invent scenarios that show these facets that work for you.  If you have a class of facebook nuts, for example, one case I like is to have one kid up at a computer+projected screen login to Facebook and navigate to a friend's FB page. That friend (also in class) then describes out loud to the class how they would use the GUI to download all their profile pics, artwork etc.  Then you show them something like the FB CLI and how it can do it all in one hit (see &lt;a href=&quot;https://github.com/vhpoet/facebook-cli&quot; rel=&quot;noreferrer&quot;&gt;one of several fb cli on github&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another example I like is to show a folder with a few hundred Word files and ask our they would convert each one to PDF. Then demonstrate LibreOffice in headless mode converting them all.&lt;/p&gt;&#xA;" OwnerUserId="1050" LastActivityDate="2017-06-20T04:20:29.933" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="858" PostTypeId="2" ParentId="791" CreationDate="2017-06-20T05:29:54.547" Score="1" Body="&lt;p&gt;Packing a suitcase:  the items last to be packed are the first to come out (assuming you place items directly on top of each other)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of others:&#xA;-- A stack of papers&#xA;-- A stack of chairs&lt;/p&gt;&#xA;" OwnerUserId="1052" LastActivityDate="2017-06-20T05:29:54.547" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="859" PostTypeId="2" ParentId="812" CreationDate="2017-06-20T10:01:07.267" Score="12" Body="&lt;p&gt;Not a demonstration, but maybe a nice thought to tell your students. I read a nice analogy a few months ago, linked from a question somewhere on stackexchange:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a computer only with a GUI is like communication without using one of humanity's biggest accomplishments: language. It does have it bonuses; you can communicate to other people simply by pointing at things, without knowing their language. But your communication will be very limited; you will only be able to communicate about things that you see. If you want to mention something that is not there at that moment, you are lost. It is also very difficult to express complex ideas or relationships without language and pointing alone. Try giving someone shopping instructions by pointing alone. Then try the same with a pen, paper, and a language you both know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The analogy is not that bad (but maybe my example of the shopping list is?). It gives you an idea of the advantages you can gain by using the console. It also gives you an idea of work you have to put into it: you have to learn a completely new language. As is with natural languages, you will be able to do simple things on the console pretty quickly; but understanding a philosophical discussion between to studied people in their field of expertise will take you years of practise, and you might still need to look up quite a few things to get all details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I found the answer I was mentioning on UX, so credit to @ShreevatsaR there: &lt;a href=&quot;https://ux.stackexchange.com/a/102018/102548&quot;&gt;https://ux.stackexchange.com/a/102018/102548&lt;/a&gt; &amp;ndash; also there is a longer article from 1996 linked and quoted there, which might be worth reading: &lt;a href=&quot;https://www.nngroup.com/articles/anti-mac-interface/&quot; rel=&quot;noreferrer&quot; title=&quot;The Anti-Mac Interface by Jakob Nielsen&quot;&gt;The Anti-Mac Interface by Jakob Nielsen&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1056" LastEditorUserId="1056" LastEditDate="2017-06-20T11:00:13.850" LastActivityDate="2017-06-20T11:00:13.850" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="860" PostTypeId="1" CreationDate="2017-06-20T10:20:16.337" Score="29" ViewCount="13739" Body="&lt;p&gt;I have been considering taking a visual programming language, such as &lt;strong&gt;Snap!&lt;/strong&gt;, to my high school students as a way to make some of the concepts we delve into a little more &lt;em&gt;fun&lt;/em&gt;.  The kids themselves already have a pretty substantial background in Java, Python, C and 6502 assembly, and many of them are also familiar with the JS/PHP/SQL stack for web dev.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a very strong feeling that they won't consider a block-based language to be a &lt;em&gt;real language&lt;/em&gt;, even though it contains typing, parameters, lambdas, etc. How do I get past the initial hump and persuade them that this is worth their time?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-02-04T17:04:46.563" Title="How do I convince my students that visual programming is real programming?" Tags="|block-based-programming|" AnswerCount="14" CommentCount="28" ContentLicense="CC BY-SA 3.0" />
  <row Id="861" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T10:38:11.507" Score="7" Body="&lt;p&gt;Here I would go to Microsoft's &lt;a href=&quot;https://en.wikipedia.org/wiki/Project_Spark&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Spark&lt;/a&gt; (even though it is discontinued, I think it is still downloadable. I have a local copy, so I'm not sure. But it's worth a shot)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Project spark is Microsoft's &quot;experiment&quot; as a game for making games. It is visual. And you can say block based. It's not like Scratch or Snap!, but it is visual. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It makes game creation quite easy, (there are limitations on the game models that can be used and other stuff, but that's not too relevant for this answer) and is very good to teach programming. Types, Objects, Methods and many other things can be taught with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used it for a while, and it is a &lt;em&gt;real language&lt;/em&gt;. I suggest you try it, and maybe search videos in youtube that show aspects of Project Spark. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A sneak peak to the block programming (or &quot;&lt;em&gt;Kode&lt;/em&gt;&quot;) of Project spark:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/tOnlX.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/tOnlX.png&quot; alt=&quot;Kode&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The kode (not a typo) is fairly straight forward and self-explanatory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: It is discontinued, but can still be used. It is free, and a very good way to learn programming concepts (as well as a good way to have fun)&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-21T09:56:55.990" LastActivityDate="2017-06-21T09:56:55.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="862" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T11:40:46.750" Score="4" Body="&lt;p&gt;Full disclosure: I'm generally not a fan of DnD programming languages in high school (maybe even late middle school) and I think DnD languages are frequently used by stem oil salesmen and used incorrectly so I'm frequently down on them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More disclosure: DnD languages can be real languages and can be properly and soundly used in educational settings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok, now to answer the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the easiest way is to head over to code.org and show them their DnD language which has a convenient &quot;show code&quot; button which will show the Javascript (a real language!!! &lt;code&gt;:-)&lt;/code&gt;) equivalent to the blocks. You now have a platform to talk about how the block based language visually described the same code but visually (as opposed to textually with indentation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.codesters.com/coding-platform/&quot; rel=&quot;nofollow noreferrer&quot;&gt;codesters.com&lt;/a&gt; also has a pseudo DnD environment and while I like codesters very much, their DnD doesn't really feel like block based programming since it's really text chunk based - I'm a fan but I don't know if it would help in your situation.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="58" LastEditDate="2017-06-21T01:43:58.687" LastActivityDate="2017-06-21T01:43:58.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="863" PostTypeId="2" ParentId="27" CreationDate="2017-06-20T11:52:19.733" Score="3" Body="&lt;p&gt;I haven't seen this in the thread yet so I thought I'd add it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't been in any environment where I've felt that starting low level makes sense but I've met others that do. YEARS ago  Noam Nisan and Shimon Schocken wrote &lt;a href=&quot;http://www.nand2tetris.org/book.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Elements of Computing System&lt;/a&gt; which builds things from the ground up and I recently learned about &lt;a href=&quot;http://www.nand2tetris.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this course&lt;/a&gt; using the book. I haven't vetted the course but it might be a useful resource.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="150" LastEditDate="2017-06-20T11:54:10.373" LastActivityDate="2017-06-20T11:54:10.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="864" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T12:01:57.867" Score="24" Body="&lt;p&gt;Two thoughts:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I'd start with telling them why you think it's worth their time.  Whatever I or anyone else says on here, you're the one who thought it would be fun and worthwhile, and you must have reasons for that.  Your reasons are more authentic and probably more applicable to your students than our reasons will be. Just be straight with the kids about what they are.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You mentioned assembly, C, Java, and Python, which means that the kids not only have experience with &quot;real&quot; languages, but they have experiences with languages with a wide range of abstraction.  You can present DnD/block programming languages as yet another level of abstraction, in which common language structures (blocks and certain bits of syntax) are abstracted visually rather than textually.  This is not so radically different from what Python does when it visually presents code blocks as indented regions rather than as text sandwiched between curly brackets.  You can point out the similarities between the block interpreter and the Python interpreter. You can compare the power, efficiency, learning curve, and programmer time requirements for each language and maybe even make a nice chart on the board.  This will reinforce the idea that when comparing Snap! to Python to C, they really are comparing apples to apples.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="938" LastEditorUserId="150" LastEditDate="2017-06-20T12:06:19.487" LastActivityDate="2017-06-20T12:06:19.487" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="865" PostTypeId="2" ParentId="761" CreationDate="2017-06-20T13:08:40.287" Score="3" Body="&lt;p&gt;When possible, move around the classroom and address students from different areas but make sure you are stationary when giving direct instructions. I find that having a wireless mouse really helps as I can perform basic commands from anywhere in the room.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, ask for screens off followed by &quot;I'm still waiting for &lt;em&gt;3&lt;/em&gt; screens to be turned off&quot;. This will usually kick-start students into turning their (or a neighbor's) screen off.&lt;/p&gt;&#xA;" OwnerUserId="890" LastEditorUserId="150" LastEditDate="2017-06-20T13:15:34.967" LastActivityDate="2017-06-20T13:15:34.967" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="866" PostTypeId="2" ParentId="812" CreationDate="2017-06-20T13:40:58.933" Score="7" Body="&lt;p&gt;The most obvious reason why CLI is important is because it is a pre-requisite for future concepts taught in Universities and for work. CLI itself is a very powerful tool as it gives you access to the file system and perform a variety of useful tasks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the top of my head, one key feature of CLI is that you can perform SSH in order to send, copy, and explore files from a remote to local. You can also check system log files for issues and configurations. This is different than sharing screens and remote connect because we are talking about access to file systems and opening a pipe to your own computer for filestreams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extending further, CLI is the basis of multiple mainstream applications such as Git, Node, and NPM. As developers, we move away from running executable to setup our development environment and applications, therefore it is imperative what we know and understand CLI. For example, setting up AngularJS or React (two of the hottest front-end technologies) is as simple as npm install ... as posed to unzipping from Git and running a whole bunch of scripts. Now moving on to Git, any seasoned developer will tell you that nothing is better than CLI for Git. Sure there are a lot of UIs for Git, but they are not as feature rich as the CLI and often times buggy. You can't get away with being a developer and not use some form of source control, so it is good to get familiar with CLI early in your life.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, the biggest &lt;i&gt;non-reason&lt;/i&gt; would be how cool you look in-front of non-programmers programming in that black and white terminal ;)&lt;/p&gt;&#xA;" OwnerUserId="747" LastEditorUserId="204" LastEditDate="2019-06-09T18:23:33.253" LastActivityDate="2019-06-09T18:23:33.253" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="867" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T13:46:03.200" Score="5" Body="&lt;p&gt;It isn't very &quot;fun&quot;, but there are visual languages widely used in the industry. For example the &lt;a href=&quot;https://en.wikipedia.org/wiki/Function_block_diagram&quot; rel=&quot;nofollow noreferrer&quot;&gt;FBD&lt;/a&gt; language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From Wikipedia:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Function Block Diagram (FBD) is a graphical language for programmable logic controller design, that can describe the function between input variables and output variables. A function is described as a set of elementary blocks. Input and output variables are connected to blocks by connection lines.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;EDIT: here my try at a real example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here in Germany Siemens-hardware and -software is widely used in a wide variety of factories, power plants and most other aspects of automation. The programming languages the PLCs of Siemens are programmed with are based on the &lt;a href=&quot;https://en.wikipedia.org/wiki/IEC_61131&quot; rel=&quot;nofollow noreferrer&quot;&gt;IEC 61131&lt;/a&gt; and the &lt;a href=&quot;https://de.wikipedia.org/wiki/EN_61131#Teil_3:_Programmiersprachen_.28EN_61131-3:2014-06.29&quot; rel=&quot;nofollow noreferrer&quot;&gt;EN 61131&lt;/a&gt; (German). They are called &lt;strong&gt;FUP&lt;/strong&gt; (function plan, looks like Flipflops, I had those in my electrical engineering studies), &lt;strong&gt;KOP&lt;/strong&gt; (contact-plan, looks like a circuit diagram), &lt;strong&gt;GRAPH&lt;/strong&gt; (flowchart-style), AWL (really basic Statements) and SCL (a high language based on another language... i think pascal).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first three of those are all graphical and most people simply use whatever fits them the most. You can translate those languages into each other with a simple click, within some borders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several IDEs used, but the most common is TIA-Portal (that's kinda new for newer PLCs of the S7-series), Simatic Manager (older S7-series) and an even older one I don't know the exact Name of for the S5-series. The naming process of Siemens is extremely weird and a world of itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Siemens is used in other countries too, but of course I don't exactly know how much in detail.&lt;/p&gt;&#xA;" OwnerUserId="1064" LastEditorUserId="1035" LastEditDate="2017-11-29T18:07:01.887" LastActivityDate="2017-11-29T18:07:01.887" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="868" PostTypeId="1" AcceptedAnswerId="891" CreationDate="2017-06-20T13:53:41.403" Score="29" ViewCount="14237" Body="&lt;p&gt;I am an engineering student in computer science and recently my parents asked me to explain a bit what I do, which is their way of asking &lt;strong&gt;&quot;What is coding?&quot;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have no idea of what coding is, what languages are, lines of codes etc, and I wanted to explain briefly how it all works. I wanted to explain &lt;strong&gt;what a programming language is&lt;/strong&gt; and &lt;strong&gt;how it is used&lt;/strong&gt; to write algorithms, make computations... To me it seems very logical that the interpreter reads lines of code from top to bottom, understanding the statements of a particular language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find the right words and nice examples to help them understand globally how it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I explain this idea to them?&lt;/p&gt;&#xA;" OwnerUserId="1065" LastEditorUserId="5" LastEditDate="2017-06-21T10:17:38.137" LastActivityDate="2017-07-14T17:43:03.127" Title="How to explain what code is to my parents?" Tags="|layperson|" AnswerCount="18" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="869" PostTypeId="2" ParentId="868" CreationDate="2017-06-20T14:39:51.253" Score="4" Body="&lt;p&gt;Well, I would personally suggest you to show them the first lecture of &lt;a href=&quot;https://www.edx.org/course/introduction-computer-science-harvardx-cs50x&quot; rel=&quot;nofollow noreferrer&quot;&gt;Harvard CS50&lt;/a&gt; class and believe me they will not leave it without completing all of them. It is one of the best structured course for any student (well in this case you can call your parents as students :p) irrespective of the background of the person. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have an interactive environment called as &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt; in which you can design new interesting projects. Have a look at some featured projects, they are very good!&lt;/p&gt;&#xA;" OwnerUserId="1068" LastEditorUserId="150" LastEditDate="2017-06-20T15:52:47.387" LastActivityDate="2017-06-20T15:52:47.387" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="870" PostTypeId="2" ParentId="868" CreationDate="2017-06-20T14:59:57.013" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;What is coding ?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A set of instructions written in human readable language (at least to developers) that is executed to perform a task or goal.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;what a programming language is&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;High level: Just like any language that exists in the world today, it has it's own alphabet, syntax and grammar that is for communication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technical: First off I just want to note that some languages are interpreted while some are compiled, as for their differences I believe it's off-topic. The idea is that your &quot;code&quot; is tokenized based on the language's alphabet and syntax and formatted into a parsing tree. The parsing tree is then translated into some intermediate code. Lastly the compiler translates the intermediate code into source code or machine code that can be executed by the CPU.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;how it is used&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Since programming languages are made for humans to easily learn and write in, it is like writing a book. We choose alphabets of the language and write meaningful segments that perform tasks whether it is to loop over an array or read some files. &lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-06-20T14:59:57.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="871" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T15:20:52.000" Score="4" Body="&lt;p&gt;You used two key words here: &quot;persuade&quot; and &quot;convince.&quot; Let's approach this issue from the perspective of the three Aristotelian rhetorical appeals: logos, ethos, and pathos.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logos&lt;/strong&gt;: Appeal to their reason as programmers. Have them create a program in Scratch or Snap!, and as they add each block, have them write the corresponding line(s) of code in a language of their choice. DnD is merely an interface for &quot;real code&quot; that is in fact being executed underneath the hood. Have them use their proficiency to attempt to reconstruct what might actually be happening. For example, how does one of these programs handle event-listening? How can something that looks so simple on the surface actually be running a number of more complex processes that are abstracted away? You could even start by having them focus on just the logic of their program without the implementation of the graphical implementation of the language (i.e. treating a graphic as part of a pre-constructed whose logic they don't need to worry about). Then, have them consider the sprites themselves. If they're still not convinced, give them the assignment of designing their own DnD language/interface/block and color system based on Java, Python, or C (or even assembly (!)).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ethos&lt;/strong&gt;: Appeal to two big names in computer science: Harvard and UC Berkeley. Harvard begins their famed and incredibly well-designed &lt;a href=&quot;https://cs50.harvard.edu&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS50&lt;/a&gt; course with Scratch. They introduce computer science at the university (viz. Ivy League) level with a couple weeks of DnD programming. It clearly plays an important pedagogical role in the course. Similarly, Berkeley's &lt;a href=&quot;http://cs10.org/su17/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS10&lt;/a&gt; utilizes Snap!. They build almost an entire course around this environment because it is important to emphasize the thinking behind and the logic of programming languages, not the interface or the syntax. (This is a nice time to remind students that &quot;computer science != coding&quot;.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pathos&lt;/strong&gt;: Appeal to the incredible complexity of some DnD programs, and let them simply feel amazed. Here is one program I just found called &lt;a href=&quot;https://scratch.mit.edu/projects/164324717/#editor&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Landscape Generation&quot;&lt;/a&gt; in Scratch. Here's quite a bit going on here that is far beyond dragging some simple blocks around. If something like that doesn't impress them, send them to the &lt;a href=&quot;https://scratch.mit.edu/explore/projects/games/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Games&lt;/a&gt; tab and have them explore those and encourage them to &quot;See inside&quot; to examine what went into designing the game. Snap! doesn't have as easy a database of sample programs to explore (at least none that I can find). However, the same logic should apply to Scratch and Snap!. There is incredibly impressive work being done in both environments, work that clearly demands a level of skill that goes far beyond what beginners are capable of. If you really want to blow the away, show them &lt;a href=&quot;https://scratch.mit.edu/projects/116739847/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pokemon Go&lt;/a&gt; in Scratch (Harvard used this in Week 0 last fall).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastEditorUserId="150" LastEditDate="2017-06-20T15:58:55.843" LastActivityDate="2017-06-20T15:58:55.843" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="872" PostTypeId="1" AcceptedAnswerId="875" CreationDate="2017-06-20T16:00:37.923" Score="8" ViewCount="2394" Body="&lt;p&gt;I've run into the issue in the past that students don't test their code, and get into a huge mess when they can't find out what's not working. How can I prove to them (before something like this happens) that testing code is important?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This is a class of high school students, grades 9-12 (ages 14-18). The class is mostly made up of sophomores, but has students from all grade levels. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is in the United States.&lt;/p&gt;&#xA;" OwnerUserId="12" LastEditorUserId="12" LastEditDate="2017-06-20T17:18:57.877" LastActivityDate="2017-07-03T03:09:54.377" Title="How to stress the importance of testing code?" Tags="|lesson-ideas|secondary-education|" AnswerCount="11" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="873" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T16:14:02.797" Score="5" Body="&lt;p&gt;The first problem my students always have with this is that they don't even understand &lt;em&gt;how&lt;/em&gt; to test their code.  They've run the program, and it works.  So... it must work.&lt;/p&gt;&#xA;&lt;p&gt;I have two approaches to this, and while they definitely help, I will also be keeping an eye out on the other answers for more pointers.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The first is simply to create test-cases together.  I have not made as formal a lesson about this as I would like to, but I opportunistically will create tests with the class when we code together on the projector.&lt;/p&gt;&#xA;&lt;p&gt;Thinking about this now, I would want to create a few methods with some non-obvious flaws (such as breaking on empty lists, odd numbers of items in an array, null entries within an array, negative numbers, etc), and provide .jar files with no source code.  Ask students to find the errors, and then reflect together on what kinds of tests were helpful.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have one truly awful lab I assign, where I make one student per group of three create an extremely thorough testing class for a larger set of classes coded by their peers.  Through some fairly thorough (albeit informal) polling, the students who have to go through that portion of the lab say that they have a much better idea of how to test code (though they do &lt;em&gt;not&lt;/em&gt; come out enthusiastic about it.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-20T16:14:02.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="874" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T16:27:47.287" Score="2" Body="&lt;p&gt;A good way of doing this is showing them (via example) how important it is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A small piece of code in a lab period can be used to show them how everything falls apart if you don't test your code. Going by:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Bugs are small beings, so you need to look for them with a magnifying glass&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Testing is the magnifying glass. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using a piece of code that, at first glance, looks just fine. Show them that for the input it was made for (but not exclusively for that input) the code works smoothly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, given some input (which the program &lt;em&gt;should theoretically&lt;/em&gt; be able to handle), the code fails miserably. The key point is the &lt;em&gt;should theoretically&lt;/em&gt;. It &lt;em&gt;should&lt;/em&gt;, but without testing it, it might as well be that it &lt;strong&gt;&lt;em&gt;can't&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example usually shows why it's important to do tests even where no problems &lt;em&gt;should&lt;/em&gt; appear. Because, again, bugs are small things that create big problems.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-20T16:27:47.287" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="875" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T16:32:29.163" Score="12" Body="&lt;p&gt;&lt;strong&gt;Introduce &lt;a href=&quot;https://en.wikipedia.org/wiki/Test-driven_development&quot; rel=&quot;noreferrer&quot;&gt;test-driven development&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TDD and agile methods of development are very popular at the minute, and for good reason — you know, ahead of time, exactly what each part of the program must achieve, and you can confidently say that the program will work as intended as long as your tests are thorough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that sometimes, the confusion begins when students aren't actually sure what they're trying to achieve in the first place, so they're reluctant to test because the code is already so fragile. TDD helps to ensure that there is a &lt;strong&gt;clear specification of behaviour for the code&lt;/strong&gt;, so the students are clear on what &lt;em&gt;should&lt;/em&gt; happen, and that the code they're written &lt;strong&gt;fulfils the specification&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make it clear that &lt;strong&gt;testing is part of the project&lt;/strong&gt; in your lessons, and it should help to solve some problems. When students are asked to write a program, they may not realise that writing some tests along with the project (or even beforehand, as in TDD) is a good idea. Having the &lt;em&gt;red-green-refactor&lt;/em&gt; cycle would seem helpful here; it will give your students confidence that their code works as intended, and then the ability to clean up and improve their code without breaking it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.researchgate.net/profile/Christopher_Jones51/publication/234788469_Test-driven_development_goes_to_school/links/551438ec0cf23203199d0c03.pdf&quot; rel=&quot;noreferrer&quot;&gt;Test-Driven Development Goes To School&lt;/a&gt; was interesting reading while I wrote this answer. They evaluated the effects of teaching using TDD at several university courses, with generally mixed/positive results. At Virginia Polytechnic Institute:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Code correctness measured as the number of defects per&#xA;  thousand lines of code was only 38 for the TDD group compared to 70 for those not using&#xA;  test-driven development &lt;/li&gt;&#xA;  &lt;li&gt;65.3% of students either agreed&#xA;  or strongly agreed that TDD increased their confidence in the correctness of their code.&lt;/li&gt;&#xA;  &lt;li&gt;67.3% either agreed or strongly agreed that TDD increased their confidence&#xA;  when making changes to their code base. &lt;/li&gt;&#xA;  &lt;li&gt;Test completeness was 93.6% for&#xA;  TDD; 90.0% for non-TDD.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Of course, there is the overhead of writing the tests and understanding how to use a unit testing framework. For smaller projects, this might be an excessive overhead, but for most non-trivial projects, test-driven development can still be useful. If you're only developing a few functions, you might only need a few tests, and it's great preparation for industry, where TDD is very common.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in short, don't just stress the importance of testing and hope they listen, &lt;em&gt;integrate it into your teaching&lt;/em&gt;. If writing good tests is the norm in your class, it's far more likely that rigorous tests will be written.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-20T16:32:29.163" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="876" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T16:51:30.647" Score="1" Body="&lt;p&gt;Tell them a story like this, if you build a boat are you going to cross the big sea straight ahead ? What happens then if you have a leak ? That's what big men do to educate, parrables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How is it important for your students?&#xA;What does it matter to them &lt;strong&gt;now&lt;/strong&gt;, what does it matter to them &lt;strong&gt;in the end&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some want to be educated, some just want their degree, some want both, and some want none (these one shall be your masters). From these four categories you can make two categories: those that listen to you and those who do not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the purpose of stressing out one matter or another, I think you have two ways, you can either repeat it over and over or teach them a lesson once and for all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's so hard to find good examples that it's better to use off subjects ones.&#xA;Do you go on a trip without checking your gas? Are you attacking your enemies without checking your gear?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end all of your students will find peace because the ones you think you lost just found another way.&lt;/p&gt;&#xA;" OwnerUserId="1078" LastEditorUserId="150" LastEditDate="2017-06-21T17:38:08.620" LastActivityDate="2017-06-21T17:38:08.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="877" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T17:15:49.057" Score="11" Body="&lt;p&gt;Here's how I explained it to my students after teaching with App Inventor during a pre-college summer program:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With textual programming languages, your program won't work if you have a semicolon or even a space character (in Python) out of place. This can be frustrating, especially for beginners. They might conclude that programming is about punctuation, when it isn't; it's about logic, design, teamwork, and problem-solving.  The argument for starting with visual programming languages is to expose beginners to the essence of computer science, rather than the superficial issue of placement of curly braces, &lt;a href=&quot;https://www.google.com/url?hl=en&amp;amp;q=http://dilbert.com/strip/1994-06-08&amp;amp;source=gmail&amp;amp;ust=1498065010889000&amp;amp;usg=AFQjCNExkzCVGvBc2cd4Wr435FJl6toMwA&quot; rel=&quot;nofollow noreferrer&quot;&gt;colons&lt;/a&gt;, etc. If they enjoy it, they can go on to learn those things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use an analogy, programming with blocks is like writing stories with &lt;a href=&quot;http://magneticpoetry.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;word magnets&lt;/a&gt;. On the positive side, you don't need to worry about spelling or punctuation; on the negative side, your vocabulary is limited.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programmers disagree about whether using languages like App Inventor (or Scratch or Alice) is really programming/coding. To me, it is, since the logic is there.  I don't see a fundamental difference between using a mouse and using a keyboard. That would be like saying that &lt;a href=&quot;https://en.wikipedia.org/wiki/Jean-Dominique_Bauby&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jean-Dominique Bauby&lt;/a&gt; wasn't a real author because he used blinks instead of a keyboard or pen.  (See also these &lt;a href=&quot;http://dilbert.com/strip/1992-09-08&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dilbert&lt;/a&gt; and &lt;a href=&quot;http://www.explainxkcd.com/wiki/index.php/378:_Real_Programmers&quot; rel=&quot;nofollow noreferrer&quot;&gt;xkcd&lt;/a&gt; cartoons.) To be fair, not everyone agrees with me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nonetheless, I can understand the frustration of students who wanted to learn &quot;real coding&quot; and &lt;a href=&quot;https://cs.stackexchange.com/questions/539/visual-programming-languages/545#545&quot;&gt;why visual programming languages tend to be used just by beginners&lt;/a&gt;. One of the most common questions about App Inventor is: Why can't I see and modify the Java code created by App Inventor? The answer is that App Inventor doesn't create Java code; it creates something called byte code that is not human readable. Learning textual programming languages is incredibly useful and fulfilling; it's like moving from &lt;a href=&quot;http://www.hasbro.com/litebrite/en_US/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lite Brite&lt;/a&gt; to an unlimited set of paints and brushes. I hope that some of you go on to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I am one of the creators of App Inventor.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2018-02-04T17:04:46.563" LastActivityDate="2018-02-04T17:04:46.563" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="878" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T17:33:55.560" Score="11" Body="&lt;p&gt;You could use some environment that lets you switch between blocks and text and work in both. That way, students can see firsthand that the code in the blocks converts to textual &quot;real&quot; code. This can help them understand the leap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's one example of blocks switching with text on a Karel program on CodeHS (Note: I'm one of the founders of CodeHS)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Kgj2k.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Kgj2k.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="91" LastEditorUserId="91" LastEditDate="2017-06-29T15:30:24.033" LastActivityDate="2017-06-29T15:30:24.033" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="879" PostTypeId="2" ParentId="868" CreationDate="2017-06-20T17:38:06.217" Score="3" Body="&lt;p&gt;I think I would explain it like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What is a programming language?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd say, it is a &lt;strong&gt;set of instructions&lt;/strong&gt;&lt;sup&gt;1&lt;/sup&gt; (a &quot;language&quot;, the words are the operators, sentences are expressions and so on) to &lt;strong&gt;tell a computer what it should do&lt;/strong&gt;. There are instructions to do basic arithmetic or calculations, instructions you can use to interact with the user, and instructions that can control the program's flow, for example by repeating other instructions or branching, so it does different things when confronted with different inputs.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How is it used to make computations?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As with the human languages, there are multiple programming languages. To develop in a certain language you usually &lt;strong&gt;write (text) files containing the instructions&lt;/strong&gt; (you could now mention how this looks in a programming language you like). These text files are read and executed by the computer. Depending on whether the language is low- or high-level, the computer might need additional software (the interpreter) to understand the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often, developers use so called &lt;strong&gt;IDEs&lt;/strong&gt; which make development easier as they offer hepful features (for example, automatically creating instruction(s) you normally use a lot or immediately pointing out errors).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What is coding?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is just the process of &lt;strong&gt;making a program&lt;/strong&gt;. The combined instructions that eventually make up your program are often called &quot;&lt;strong&gt;code&lt;/strong&gt;&quot; by developers, so they use the verb &quot;(to) code&quot; to describe the process of writing down instructions to solve a particular task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; As &lt;a href=&quot;https://cseducators.stackexchange.com/users/1151/brian-h&quot;&gt;Brian H.&lt;/a&gt; pointed out in &lt;a href=&quot;https://cseducators.stackexchange.com/posts/comments/1474&quot;&gt;his comment&lt;/a&gt;, a more precise definition of a programming language would be &quot;a set of syntactical and grammatical rules bundeled with a &lt;a href=&quot;https://en.wikipedia.org/wiki/Standard_library&quot; rel=&quot;nofollow noreferrer&quot;&gt;standard library&lt;/a&gt; that provides instructions to tell the computer what to do&quot;. However, as you asked for an explanation in layman's terms, I wouldn't recommend this definition to explain what a programming language is.&lt;/p&gt;&#xA;" OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-06-26T06:54:58.783" LastActivityDate="2017-06-26T06:54:58.783" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="880" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T19:25:04.873" Score="5" Body="&lt;p&gt;One approach could be to use their classmates for assistance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assign a project.  Explain that each person is going to do the project, and then they will hand the resulting code over to another student (probably randomly assigned).  That student will then test the code.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The writer will get credit for whether or not the code worked correctly.&lt;/li&gt;&#xA;&lt;li&gt;The verifier will get credit for correctly identifying whether the code worked or did not.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;An interesting variant on this might be to offer extra credit for verification tasks.  Students may submit their work early and have their work put in a pile of programs to verify.  Students may choose to do verification for extra credit, in which case they are assigned a random program from the pile.  To get the extra credit they either need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Declare that the program works, and it in fact works when you (the teacher) test the program.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You may require some documentation showing how thorough the testing was.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Document a test case which demonstrates that the program fails which the teacher agrees with.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the latter case, the program is kicked back to the original writer, along with the results of this Q&amp;amp;A test.  The results will probably be a lot of programs where the original writer relies on the verifier to do the testing, but these are also the students who are going to need some extra-credit to make up for their poor scores on the programs, so hopefully they'll try to verifiy some other student's code.  If they do, they'll learn the value of testing that way!&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-06-20T19:25:04.873" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="881" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T19:46:15.390" Score="0" Body="&lt;p&gt;You could try giving them some problems from competitive programming websites (You can find some very simple problems) which usually give you some sort of test input and also outline the boundaries of which the program must run. Typically in the sample input, they will include test cases that sit near the boundaries of whatever it is you need to solve.&lt;/p&gt;&#xA;" OwnerUserId="1088" LastActivityDate="2017-06-20T19:46:15.390" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="882" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T20:35:53.910" Score="3" Body="&lt;p&gt;I would take Cort Ammon's suggestion a step further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cover the ideas behind testing - I show both TDD and what I actually do which is constantly test my code as I develop. Then give a two part project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part 1 - the students implement some library of functions/objects etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part 2 - each kid builds something using another kids library. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kids are graded on how well and well documented their code is for the next person. This encourages thorough testing as well as well written clear code.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-20T20:35:53.910" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="883" PostTypeId="2" ParentId="872" CreationDate="2017-06-20T21:04:43.193" Score="0" Body="&lt;p&gt;You could use some examples, like &lt;a href=&quot;https://en.wikipedia.org/wiki/Cluster_(spacecraft)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ariane 5 catastrophe&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The greater horizontal acceleration caused a data conversion from a&#xA;  64-bit floating point number to a 16-bit signed integer value to&#xA;  overflow and cause a hardware exception. Efficiency considerations had&#xA;  omitted range checks for this particular variable, though conversions&#xA;  of other variables in the code were protected. The exception halted&#xA;  the reference platforms, resulting in the destruction of the flight.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1093" LastActivityDate="2017-06-20T21:04:43.193" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="884" PostTypeId="2" ParentId="812" CreationDate="2017-06-20T21:10:00.363" Score="3" Body="&lt;p&gt;I have had students work in summer internships; feedback I get from companies tells me that familiarity with the command-line interface is extremely valuable.  The command-line interface is very much a part of &quot;real world&quot; programming practice.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We run a student computing server at NCSSM using Red Hat Enterprise Linux; all of our beginning students learn to work on this server.   My introductory class does an early unit on UNIX commands.  I have a project in which students place code in a simple shell script that does various types of sorting and searching on a scrabble dictionary text file.  This demonstrates that the shell is programmable, extensable, and that it can automate all sorts of tasks.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of our students become very conversant with Linux and wind up running it on their PCs.   Quite a few find that once they learn it, the vi editor is fast and very efficient.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-20T21:10:00.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="885" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T21:16:35.720" Score="2" Body="&lt;h1&gt;Have your students write a visual programming editor.&lt;/h1&gt;&#xA;&lt;p&gt;It sounds like your students are pretty savvy, so what better way to show them how awesome a visual editor can be than to have them build their own!  There are many benefits to this approach.&lt;/p&gt;&#xA;&lt;h2&gt;Relevancy&lt;/h2&gt;&#xA;&lt;p&gt;They're creating software to make them more efficient at what they already do and love.&lt;/p&gt;&#xA;&lt;h2&gt;Flexibility&lt;/h2&gt;&#xA;&lt;p&gt;The students can choose their preferred language.&lt;br /&gt;&#xA;This could also be a solo or a group project.&lt;/p&gt;&#xA;&lt;h2&gt;Pay-Off&lt;/h2&gt;&#xA;&lt;p&gt;This is an assignment with some legs.  It's not something that will go into a folder and be forgotten.  They can use it on their next assignment or in their own personal projects!&lt;/p&gt;&#xA;" OwnerUserId="1094" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-20T21:16:35.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="886" PostTypeId="2" ParentId="791" CreationDate="2017-06-20T21:33:41.320" Score="2" Body="&lt;p&gt;A stack can be used to verify that an HTML document is well-formed.  You begin with an empty stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a tag opens (say &amp;lt;p&amp;gt;), the tag's type, in this case, &quot;p&quot;, onto the stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a tag is self-closing, do nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a tag closes, (say &amp;lt;/p&amp;gt;), check to see that it matches the tag on the top of the stack by peeking at it.  If there is a match, pop the stack.  If there is a mismatch, emit an error message telling where the error lurks in the HTML file you are scanning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, at any time in the process you find an empty stack, report an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are still tags on the stack, you have unclosed tags; report an error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the stack is empty, your HTML file has balanced tags. &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-20T21:33:41.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="887" PostTypeId="2" ParentId="812" CreationDate="2017-06-20T21:37:55.223" Score="7" Body="&lt;p&gt;The are a couple of things that make the command line superior to GUI interfaces:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Command history&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The one killer feature (in my opinion). If you remember that you have performed a command before, and remember anything about that command you can quickly find it by typing &lt;code&gt;^R&lt;/code&gt; and do a backward incremental search through the command history. Or you can press up/down arrow until you find the command you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the shell only had this single feature going for it, I would still use it above a GUI, any day. (But there is sooo much more...)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Pipes&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Piping the output of one command into the next makes for powerful combinations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Say that I have a large directory of files, of which I suspect some are identical, but with different names?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following commands will can be used to (line 1): compute a list of checksums; then (in line 2) create a list of all the checksums that are repeated more than once; and (in line 3) display all files (and their checksum) that are occur multiple times. That line 2 there is a killer line! :)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;md5sum * &amp;gt;checksums&#xA;sort checksums | cut -f1 | uniq -c | grep -v '^ *1 ' | sed 's/^.* //' &amp;gt;doubled&#xA;grep -fdoubled checksums&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(BTW, teaching this to your student you should caution them that lines with newlines and spaces may fare badly in the above process.)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Scriptability&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I guess I sorta touched on this in the above heading, but there is so much more than just pipes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stuff like &lt;code&gt;while read LINE; do ...; done &amp;lt;FILE&lt;/code&gt; and &lt;code&gt;for *.txt; do ...; done&lt;/code&gt;, and functions are really all nifty stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combining functions and pipes to produce filters of various kinds is also neat and nifty. For example, you could type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;trim() { sed 's/^ *//; s/ *$//' }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and thereafter you can use &lt;code&gt;cat FILE | trim&lt;/code&gt; to output a file with all its leading and trailing whitespace removed.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Language-Like Fluency&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;scriptability&lt;/em&gt; and &lt;em&gt;pipes&lt;/em&gt; points above combine to something new and powerful, which I usually compare to language fluency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a GUI your reacting to elements presented to you, if there isn't a button or menu option for something onscreen then that functionality does not exist for you. You're sorta piggybacking on your sense of direction, or ability to navigate through space to find your way. &quot;Oh, I'm here, that means I can click &lt;em&gt;that&lt;/em&gt; menu, to get &lt;em&gt;that&lt;/em&gt; window to pop up, so I can select &lt;em&gt;that&lt;/em&gt; tab, which does what I want.&quot; – You're forever &lt;em&gt;navigating&lt;/em&gt; around, using recognition to see where you are and what your options are right here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A CLI, on the other hand, gives you a &lt;em&gt;language&lt;/em&gt;. A whole vocabulary which you can use creatively to express stuff, and which you can expand with your own scripts and functions (such as, for example the &lt;code&gt;trim&lt;/code&gt; function above).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of this language you use often, and so it becomes part of your active vocabulary (&lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; and most of the other basic file and directory commands come to mind). Other stuff you recognize by sight, but might not come to mind as you're looking for a solution (or come to mind only partially – which is where the command history comes into play) so its more of a passive vocabulary to you.&lt;/p&gt;&#xA;" OwnerUserId="1092" LastActivityDate="2017-06-20T21:37:55.223" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="888" PostTypeId="2" ParentId="693" CreationDate="2017-06-20T21:52:56.227" Score="0" Body="&lt;p&gt;Python has a turtle graphics module that is quite a bit of fun to play around with.   It is simple to use and you can have your students write functions to drive it and to draw custom graphical elements such as stars. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Turtle graphics can be used to make looping visual.  You can also add an event-driven element by making your drawing panels mouse-sensitive.   The Python site has complete documentation.  Tough exercise: Draw an American flag.  Easier: Draw a Texas flag; making a five-sided star is a fun puzzle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can incorporate this into your class and experiment with it a variety of levels.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-20T21:52:56.227" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="889" PostTypeId="2" ParentId="868" CreationDate="2017-06-20T21:57:36.533" Score="3" Body="&lt;p&gt;In addition to the excellent definitions already provided, consider taking a slightly different approach or at least augmenting it a bit. This comes back to good pedagogy: I wouldn't give students definitions without context. Moreover, I would support whatever concept I want to get across, no matter how broad or narrow, with &lt;strong&gt;specific examples and implementations&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain programming to someone who has no idea what it means, it is necessary to have short blocks of code at the ready. Explaining it in the abstract probably won't be too successful. Relatively straightforward ideas like printing &quot;hello, world&quot; or the even numbers from 1-100 or the sum of the integers 1-50 would show the bare minimum of logical and computational ability. Maybe even something relatively intuitive like bubble sort or linear search. From there, compiling the program - assuming a language like C or Java - would at least allow you to explain the notion of &lt;strong&gt;translation&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to use the metaphor that computers &quot;speak&quot; binary, but I speak C (or Python or Java or...). I need to translate what I want to accomplish into the language that the computer can understand. You can explain compilers/interpreters as a kind of translator that understands both computer-speak and human-speak and knows how to take your thoughts and turn them into &quot;words&quot; that the computer can understand. (You can optionally include the idea of assembly and instruction sets, but again, that's probably beyond the scope of this conversation.)&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-20T21:57:36.533" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="890" PostTypeId="2" ParentId="628" CreationDate="2017-06-20T22:00:05.613" Score="3" Body="&lt;p&gt;Our program teaches top-down design.  This is an iterative process in which a text editor is indispensable.  You stub in functions and methods, spec them out, and then write test code for them.  After this, you begin writing code. If a method or function gets too complex, you refactor into reasonable-sized chunks.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does not work well on paper.  Stuff you put on paper is &quot;dead.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of our assessment is paper and pencil; this is fine for the small stuff. A lot of our assessment comes in in the form of projects.  For this, we assign complete projects of escalating complexity.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-20T22:00:05.613" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="891" PostTypeId="2" ParentId="868" CreationDate="2017-06-20T23:05:49.830" Score="44" Body="&lt;p&gt;Coding is like writing a recipe for the computer to follow so that it solves your problem. The computer &quot;reads&quot; each step, and follows it, eventually reaching a solution. Some programs are better than others, just like some recipes are better than others - they are faster, they produce a better result, etc. Programmers aren't really the cooks, though - the computer itself produces the result. The programmers are more like the cookbook authors, producing the recipes (programs) for the computer to follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I don't know about you, but I've followed a recipe before, and there have been times where I've been left wondering, &quot;Have I put in 2 or 3 cups of flour?&quot; or having mixed in an extra couple of chocolate chips (quite by accident, of course). A computer doesn't have these problems. It can make your &quot;recipe&quot; much more swiftly and accurately than you can. However, this gives you no excuse for providing the wrong recipe. No amount of accuracy will make brussels sprouts into ice cream, unfortunately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/868/how-to-explain-what-code-is-to-my-parents#comment1503_891&quot;&gt;@dckuehn&lt;/a&gt; brings up a great point. No analogy is perfect, and this one is no &lt;em&gt;exception&lt;/em&gt; (heheh). Whereas, in a recipe, you really try hard not to vary the input so as not to vary the output, most programs take different kinds of input and produce different kinds of output, according to the same rule. Sort of like you can put a bunch of different cookies in the oven to bake them - not the same input, not the same output, but a fairly similar process inbetween.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="1091" LastEditDate="2017-06-22T22:35:44.607" LastActivityDate="2017-06-22T22:35:44.607" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="892" PostTypeId="2" ParentId="860" CreationDate="2017-06-20T23:37:10.293" Score="9" Body="&lt;p&gt;I was at this camp one summer, and it was a programming camp for building models of different systems. I was super excited - I'd already been programming on Khan Academy and Codecademy. So I walk in, and they say that we'll be using this language called StarLogo Nova. We open our chromebooks, go to the site - and I begin questioning things, because I figure out pretty quickly that it's a drag and drop language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had (have?) a dislike for drag and drop languages - I had tried Scratch after doing what I considered &quot;real&quot; programming, and I didn't like it. However, that class changed my mind. We created a model of an epidemic, a model of an ecosystem - and I was hooked. I literally still occasionally take a look at those programs when I'm in the mood and add new features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The about-face was because, I think, it felt useful. I felt more able to create something cool in StarLogo Nova than Scratch. So I guess, I'd say to first, pick a good, fun DnD language, and second, build something cool in it and show it to them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also go into the idea of higher vs lower level programming languages, with DnD languages just another step higher than something like Python. Assembly is no more &quot;real&quot; a coding language than Python is. (If anything, it's the other way round =P)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All this being said, &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Don%27t_stuff_beans_up_your_nose&quot; rel=&quot;noreferrer&quot;&gt;don't stuff beans up your nose&lt;/a&gt; - your students may not even be thinking any less of DnD languages and may have quite a bit of fun without you saying anything at all.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-20T23:37:10.293" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="893" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T00:03:22.150" Score="16" Body="&lt;p&gt;The best way to explain coding to someone is &lt;em&gt;very&lt;/em&gt; dependent on their background.  You really need to tailor the story to fit what they understand.  That being said, they're parents so...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coding is a way to give instructions to the computer, telling it what to do.  Think about the instructions you leave for a babysitter.  They tell the babysitter exactly what needs to happen while they are away.  Now, despite some appearances, the computer is not very smart.  It doesn't have good common sense.  Think of it like the first babysitter they ever hired.  Surely they wrote up a massive document with every last little tiny detail about how to take care of you, emergency contacts, emergency emergency contacts (in case the emergency contacts can't be reached), food allergies, medicine allergies, allergic reactions to allergy medications.  You name it.  They made sure every last detail was covered, so the babysitter had instructions to handle whatever may be encountered while they are away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, computers are fast.  Really really fast.  They did a billion things while you read this sentence.  As far as this computerized babysitter is concerned, it's not like your parents are gone for a night - it's like they're gone for a month.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now have them imagine the manifest they would have typed up for this brand new babysitter, babysitting you for the first time, for a month.  Imagine all of the precise instructions laid out in the best order the can manage so that the babysitter can just check off each instruction, line by line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's coding.  I have a feeling they appreciate &lt;code&gt;for&lt;/code&gt; loops right about now.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-06-21T00:03:22.150" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="894" PostTypeId="2" ParentId="812" CreationDate="2017-06-21T00:23:39.450" Score="15" Body="&lt;p&gt;You can't &lt;em&gt;teach&lt;/em&gt; the value of the command line. You can, however, &lt;em&gt;sell&lt;/em&gt; it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students have at least one of two primary goals in any class:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Get good grades (pass the class)&lt;/li&gt;&#xA;&lt;li&gt;Learn something they like&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are not mutually exclusive, and may change as the class progresses in their relative positions. For the students who's motivating goal for the class is primarily passing the class, the command line is not likely to have &lt;em&gt;value&lt;/em&gt;. For the students that are interested in learning the subject, the command line &lt;em&gt;can&lt;/em&gt; become valuable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People make &lt;em&gt;value&lt;/em&gt; judgments &quot;&lt;a href=&quot;http://www.econlib.org/library/Topics/College/margins.html&quot; rel=&quot;noreferrer&quot;&gt;on the margin&lt;/a&gt;,&quot; students just as much as adults. The &quot;power&quot; of the CLI as opposed to a GUI, is not a selling point for students yet. The things they can do, even in a GUI, is so far beyond what they've done before that even a couple magnitudes of extra power is immaterial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students have a limited amount of time and effort they are willing to devote to learning material from &lt;em&gt;all&lt;/em&gt; their classes. They will always do a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cost%E2%80%93benefit_analysis&quot; rel=&quot;noreferrer&quot;&gt;cost benefit analysis&lt;/a&gt; to parcel their time between courses. For your students, the CLI won't have any value until they reach their own conclusion that their substantial effort to learn it, as something extra to their normal studies, is justified by what they &lt;em&gt;think&lt;/em&gt; they will gain from it. (For the students that have not used the CLI very much it will be like learning an additional programming language, so, &lt;em&gt;yes&lt;/em&gt;, it will involve substantial effort to learn. We know the utility of it, they don't. Yet.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What might make a difference to them is seeing how much easier it is to accomplish &quot;simple&quot; and common tasks in the CLI than in a GUI. Don't &quot;race&quot; them with you doing a task in the CLI and them in the GUI; that's not fair, and they'll know that. (You can probably do it in a GUI faster than they could in the CLI anyway.) Don't &quot;teach&quot; them the CLI, show them. Lead by example. Use the CLI &lt;em&gt;anytime&lt;/em&gt; you can, even when you'd rather use a GUI personally. Organizing your files, creating directories, doing configurations, etc. If the CLI is your &lt;em&gt;goto&lt;/em&gt; tool for everyday tasks that they would normally use a GUI for, especially once they realize that it really is easier and faster that way, they will begin to think about it, and eventually consider it as a possibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your lesson plan for the term, leave some slack time which you can utilise to teach the CLI. Keep it &quot;on tap,&quot; rather than listing it somewhere in the plan, so that you can divert into those lessons whenever the class seems ready. Each class is likely to reach the decision point at different times, and teaching it before that point is likely to be lost on them, and wasted time for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the &quot;sale&quot; has been made you can use many of the ideas given here, which I'm not going to collect as I expect that more will arrive anyway. Placing them in some kind of order for increasing complexity, leading to batch/bash scripting could be a good plan.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-21T00:23:39.450" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="895" PostTypeId="2" ParentId="833" CreationDate="2017-06-21T00:55:26.020" Score="2" Body="&lt;p&gt;I find that classes are usually divided into a few groups: the kids who are really interested and want the math, the kids who just want to make the thing do the other thing, and the kids who don't really have any interested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on this distinction, you'll see that some kids want the math, and others don't. The best way to deal with this in my experience is to give the interested kids a quick (5-10 minute) tangent into the math, and make sure to provide a list of &quot;further reading&quot; and resources so that kids can look into it on their own, if they want to take that initiative. Optionally, you could reward that with extra credit to encourage even the less math interested kids to learn about it.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-21T00:55:26.020" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="896" PostTypeId="2" ParentId="872" CreationDate="2017-06-21T01:01:11.993" Score="2" Body="&lt;p&gt;I'd recommend giving them a test suite with their assignments from the beginning. That way, from the start they'll understand that testing code is something that can be done. The more interested students will probably go ahead and look at the test suite and maybe ask questions about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you get to decently large assignments, you can take a day or two and show them how the &quot;grader&quot; (test suite) actually works. Then you can have them write test suites for their own assignments in advance, for example you can write a test suite in class, and tell them that their homework is to made a program that passes those tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, the students will get a gradual introduction and really see test suites in action for the whole year while they gradually gain a better understand of what's happening &quot;under the hood&quot;.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-21T01:01:11.993" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="897" PostTypeId="2" ParentId="548" CreationDate="2017-06-21T03:53:20.780" Score="4" Body="&lt;p&gt;I'm not sure what grade level you are teaching and what languages you are using in your classes, so I'll just give some general answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you have one Sphero, you might want to try something like &lt;a href=&quot;http://blogs.sas.com/content/sascp/2016/11/15/sas-codesnaps-a-new-way-to-code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeSnaps&lt;/a&gt; that would let paired students or even individual students create code for the Sphero using printed blocks. When the code is complete, one device and one Sphero could be used to test the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Makey Makeys are more for demonstration of circuits and electronics rather than CS concepts and having only one Makey Makey is very limiting. The CS concepts would be in whatever program the student created that will be controlled by the Makey Makey. One thing that you could do is to have students work on designing a controller for a game they have created. The controller would be hooked up to the Makey Makey once it and the game are complete. This would require that students understand the basics of creating a circuit in order to design their controllers and give them a payoff for creating a game that uses arrow keys and the space bar. If you don't want to get into the &quot;making&quot; part, then perhaps you could just use the Makey Makey hooked up to a presentation computer that students use to demonstrate games they have created. If you are interested in how other educators are using Makey Makeys, there are some great ideas in the &lt;a href=&quot;https://www.facebook.com/groups/makeymakeyeducators/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Facebook Makey Makey Educators Group&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="762" LastActivityDate="2017-06-21T03:53:20.780" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="898" PostTypeId="2" ParentId="473" CreationDate="2017-06-21T08:11:46.077" Score="8" Body="&lt;p&gt;&lt;strong&gt;Don't.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Agile is great, but it's mostly about how to manage the development process, interact between the different parties involved, communicate status and break down larger projects of work into achievable segments. When you're trying to understand what a loop/function/class/object/etc is there's really no need to also think about the software engineering issues for larger projects, teams, etc. Students only have capacity to learn so much and I'd argue it's counterproductive to have them spend some of their attention on learning agile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By all means talk about it if you're looking at software engineering practices, but it shouldn't be a focus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test driven development &lt;em&gt;might&lt;/em&gt; be ok to teach, although I suspect it will just complicate things for new students. &lt;/p&gt;&#xA;" OwnerUserId="57" LastActivityDate="2017-06-21T08:11:46.077" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="899" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T08:54:09.130" Score="7" Body="&lt;p&gt;My explanation would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The computer isn't some machine that can do a lot of intelligent things. Rather it is very dumb, but can execute instructions carefully, very fast and without getting bored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance: given the task of adding up all numbers from 1 to 1 million, a human probably wouldn't make it past 100 without making some mistake and getting bored with it. A computer happily performs this task in a couple of milliseconds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The job of the coder is to supply the computer with a detailed set of instructions to perform some task - this is the program or application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not &quot;the computer&quot; that makes an error, usually it is the programmer that didn't forsee some combination of events and thus didn't provide instructions for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions are in some computer language, of which there are many, each with it's own strengths and weaknesses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;br&gt;&#xA;Of course there is a formula to calculate the sum of consecutive numbers. This strengthens the point: a human might think &quot;there has got to be a simpler way&quot; and figure it out, a computer would never think that. It blindly continues counting (and still finishes sooner than the human with the formula).&lt;/p&gt;&#xA;" OwnerUserId="1126" LastEditorUserId="1126" LastEditDate="2017-07-14T17:43:03.127" LastActivityDate="2017-07-14T17:43:03.127" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="900" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T09:41:03.457" Score="11" Body="&lt;p&gt;I tend to describe code as a contract. Most people know that if you read a contract, it's not in English - it's in &quot;legalese&quot;. Legalese is a language that looks mostly like English, but it's full of odd phrases and very specific wording, and the punctuation is different. Contracts are written this way because each phrase has been interpreted by a court to mean something very specific, and so contracts will use the same precise wording so that they will be interpreted by a court in the way the lawyer wants.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming languages often look kind of like English too; they use English words, but have different structures and punctuation. This is because a compiler is like a court: it will interpret these specific phrases in a specific way, and each phrase will add a certain piece of behaviour to the program that the compiler produces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A contract can have loopholes or grey areas. These are places where the wording of the contract is unclear, isn't an accurate representation of what the lawyer or their client wanted, or doesn't cover a certain scenario, which means that what happens is either up to the court, or not governed by the contract. For the lawyer, either of these scenarios is bad. A good lawyer can write you a contract with no loopholes or grey areas, but it can be very difficult, because legalese can be hard to read, the law is very complex, and some scenarios are very detailed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A program can have loopholes and grey areas too: we call them &quot;bugs&quot;. These are places where your code doesn't tell the computer what to do in a particular scenario, or it describes something that actually isn't quite what you wanted. A good programmer can write you a program with no bugs, but it's often very hard to do, because code can be hard to read, computers are very complicated, and the program might be doing a lot of very intricate things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;great&lt;/em&gt; lawyer can write a contract that has no loopholes or grey areas, but is still relatively easy to read, even by someone who isn't a lawyer. This is good for the client, because they can understand their contract, but also for the law firm, because it means that any lawyer can understand the contract and make amendments without missing something subtle and introducing a loophole.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;em&gt;great&lt;/em&gt; software engineer can write a program that has no bugs, but is still relatively uncomplex and easy to read. This is good for the client, because it means their program is easier to review and verify correct, but also for the software company, because it mean that any programmer can read the program and make alterations without missing something subtle and introducing a bug.&lt;/p&gt;&#xA;" OwnerUserId="1129" LastActivityDate="2017-06-21T09:41:03.457" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="901" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T10:54:19.390" Score="1" Body="&lt;p&gt;Code is like the rules of a game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance &lt;em&gt;Hangman&lt;/em&gt;. Explaining how the game works step by step is almost writing a computerprogram in pseudocode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - Player 1 randomly picks a word out of a list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - He writes down a number of dashes corresponding to the number of letters in the word.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3 - He askes player 2 to guess a letter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4 - Does the letter occur in the word or not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5 - Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose is not to really write the program, although 'we programmers' can  probably picture it by now, certainly the part where the the computer is the one thinking of a word for the other player to guess.&lt;/p&gt;&#xA;" OwnerUserId="1011" LastEditorUserId="1011" LastEditDate="2017-06-21T11:49:43.137" LastActivityDate="2017-06-21T11:49:43.137" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="902" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T11:45:48.363" Score="1" Body="&lt;p&gt;I'm a programmer and when people ask me to explain what I do, I usually say that computers talk in bits, right? Zeros and ones. And it's hard for a human to understand that, so there are this tools called &lt;strong&gt;programming languages&lt;/strong&gt; that are able to translate a more human-like text into zeros and ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that programming languages have lots of rules and each programming languages has it's own structure and rules (just like normal languages!) our job as programmers is to know this rules and play with them in order to get what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example time!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say that we choose as our tool the Python programming language (not to be confused with the snake)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And our goal is to print 10 times on the screen &quot;Hi&quot;&#xA;We as smart programmers know that in python if we say:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(&quot;Hi&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It will show &quot;Hi&quot; on the screen, but it doesn't solve our problem, right? We want to see it 10 times in the screen, so we as &lt;em&gt;VERY&lt;/em&gt; smart programmers tell python:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;print(&quot;Hi&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And our goal is accomplished!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;But&lt;/em&gt; it's quite tiring to copy and paste that much code, so we as &lt;strong&gt;super&lt;/strong&gt; programmers we know python's syntax and rules so we do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for x in range(1, 10):&#xA;    print(&quot;Hi&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And &lt;strong&gt;super saiyan&lt;/strong&gt; programmers will do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(&quot;Hi\n&quot; * 10)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt;&#xA;Programmers are human beings trying to talk to computers through very strict and sometimes mean translators. But it's fun though!&lt;/p&gt;&#xA;" OwnerUserId="118" LastActivityDate="2017-06-21T11:45:48.363" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="903" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T12:30:45.913" Score="0" Body="&lt;p&gt;Tell them that you are making a computer work as per instructions, and the instructions we give are a sets of rules(syntax) with which one is able to produce many logical structures. Then explain that an engineer like you tries to think about the best possible logic to instruct the computer to do a specific task (such as &quot;printing multiplication tables from 1 to 100 in a few seconds&quot;). &lt;/p&gt;&#xA;" OwnerUserId="1138" LastEditorUserId="27" LastEditDate="2017-06-21T12:43:49.427" LastActivityDate="2017-06-21T12:43:49.427" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="904" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T12:36:17.183" Score="4" Body="&lt;p&gt;I've been a professional Software Developer for about 30 years, and a hobby programmer before that going back to the 70's. So I've been asked this a lot, and have had time to try lots of approraches. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main issue is that you are talking a different universe than most everyone else's experience. In a social situation, you have one or two sentences before the eyes start to glaze over, so you can't really go into detail. So after decades of experimentation, the explanation I now give for what I do is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I tell the computer what to do. It flips me off &lt;em&gt;(or insert&#xA;  offensive invective here to taste)&lt;/em&gt; and merrily does something else.&#xA;  Then I spend the rest of the day trying to figure out why.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I once gave this explanation to a room full of public school teachers, and got the rather amusing response:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;That's the same as teaching!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think they are actually onto something there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Mythical_Man-Month&quot; rel=&quot;nofollow noreferrer&quot;&gt;Brooks' Mythical Man Month&lt;/a&gt;&lt;sup&gt;*&lt;/sup&gt; devotes the last half of its first chapter to roughly this question (the sections titled &lt;a href=&quot;http://home.adelphi.edu/sbloch/class/adages/joy.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;The Joys of the Craft&lt;/em&gt; and &lt;em&gt;The Woes of the Craft&lt;/em&gt;&lt;/a&gt;). I think what I wrote above is actually about the best possible tl;dr of Brooks' text. But if someone is really interested in reading 18 paragraphs about it, send them the link above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;* - Generally considered The Bible of Software Engineering. As Brooks himself quipped, this is because &quot;everybody quotes it, some people read it, and a few people go by it&quot;.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="1139" LastEditorUserId="1139" LastEditDate="2017-06-21T13:48:27.607" LastActivityDate="2017-06-21T13:48:27.607" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="905" PostTypeId="1" CreationDate="2017-06-21T13:45:08.590" Score="5" ViewCount="119" Body="&lt;p&gt;In the scope of my PhD work, I am developing a teaching assistant tool. These tools are used in the context of lab classes to gather &quot;snapshots&quot; from the student's code using one plug-in in the IDE of their choice (in my case, Eclipse and all JetBrains IDEs). The code snapshots are analyzed/processed, and several metrics may be used to determine the performance of the student as well as if s/he is doing plagiarism, and many other things.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone using a similar tool (e.g. Retina, TestMyCode, ...)? If the answer is YES, how is it working for you? If the answer is NO, why not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that they are quite familiar in Academia, but not so much in the “real world”. &lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="76" LastEditDate="2017-06-21T15:26:45.000" LastActivityDate="2017-06-26T22:18:52.403" Title="Do you use any teaching assistant tool in your CS1 lab classes?" Tags="|secondary-education|lecture-tools|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="906" PostTypeId="2" ParentId="327" CreationDate="2017-06-21T13:48:43.273" Score="4" Body="&lt;p&gt;I encourage my students to keep notes on paper, but I have them use their computers when we are experimenting with code.  We do a lot of code examples in class.   Standard practice is for them to open their programming environments as soon as they arrive so their computers are ready for business.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our kids have laptops. When I want them to take notes on paper or I want them to focus specifically on what I am doing, I say, &quot;It's time to put your computer at 'third mast';&quot;  this means to put the lid down not all the way so their desktop session is undisturbed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most studens find this combination to be effective. &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-21T13:48:43.273" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="907" PostTypeId="2" ParentId="860" CreationDate="2017-06-21T14:15:41.110" Score="1" Body="&lt;p&gt;Just because you are using abstraction does not mean it is no longer programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything above actually flipping the bits by hand is us just being lazy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My only objection to using an obscure language just for fun is. Why learn it if I would not use it in real life later?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially I’d say. As long as the problem to be solved is fun. I.e. Not how to implement a solution using a recurs7function, I’d say you are grand. Especially if there is text or graphics output involved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Blinkenlights are fun.&lt;/p&gt;&#xA;" OwnerUserId="1148" LastEditorUserId="1148" LastEditDate="2017-06-21T18:07:46.390" LastActivityDate="2017-06-21T18:07:46.390" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="908" PostTypeId="1" CreationDate="2017-06-21T14:38:01.537" Score="9" ViewCount="599" Body="&lt;p&gt;I understand the advantages of test-driven development, but should unit testing be taught/used in CS1 (the introductory class) for computer science students learning?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware of researchers saying that &quot;YES&quot; it can and should be taught, but in the &quot;real world&quot;, is anyone using it in their CS1 classes? Do the students write the tests or are they provided with the assignments?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="104" LastEditDate="2017-07-13T08:46:08.770" LastActivityDate="2019-05-26T09:09:44.570" Title="Should unit testing be taught in introductory programming classes?" Tags="|curriculum-design|undergraduate|unit-testing|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="909" PostTypeId="2" ParentId="905" CreationDate="2017-06-21T14:43:35.810" Score="2" Body="&lt;p&gt;I am a TA at a University and yes we do use code snapshot tools but for confidentiality reasons I cannot tell you which one we use. It works extremely well for checking plagiarism, but that's about it. I don't know what other metrics you obtain, but I think it is pretty hard to trust someone's code without reviewing with them. We also automark their code and provide a grade and use this to track progress, but this is only a portion of their overall mark.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your comments - My big question is that it seems that they are familiar in the Academia, but not so much in the “real world”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a common issue, don't be alarmed. Continuing from my above point, during code reviews, I find that many students are unable to clearly explain what their code is doing. Part of the blame is that students use trial and error approach until they come up with some code that works. Since they are actually unsure what was wrong to begin with, they cannot explain why these &quot;trials&quot; fixed their problems. Hence, we have code reviews to get a more realistic view of the understanding of students as well as reiterate concepts to students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;b&gt;EDIT:&lt;/b&gt; Weekly assignments are meant to be 2 hour workload and are purely automarked, while bigger assignments spanning 3-5 weeks are the ones we perform code reviews on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To address your second question, we have weekly assignments that weigh very little for the sole purpose of &quot;practice&quot; assignments. The student submits their code and it is run against an automarker I write for feedback. We do track improvements on every run of the automarker to see roughly how much a student is able to improve their code in 1 run. We usually run only 2 automarkers and the second run is their final mark.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a final note, I recommend a Code Reviewer as a teaching assistant tool. Students post a segment of their code into the system and either professors, teaching assistants, or even fellow peers can highlight questionable code and write comments. This allows students to learn the &quot;what&quot;, &quot;where&quot; and &quot;why&quot; their code has problems and &quot;how&quot; to fix them. My arguement is that codesnap shots are good for checking against plagurism, but other metrics can't really reflect whether or not the students are learning from their mistakes.&lt;/p&gt;&#xA;" OwnerUserId="747" LastEditorUserId="747" LastEditDate="2017-06-21T15:18:17.573" LastActivityDate="2017-06-21T15:18:17.573" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="910" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T14:57:13.870" Score="1" Body="&lt;p&gt;Here is a fun, interactive, and impressively comprehensive-yet-easily-digestible article that covers all the basics of programming/CS for laypersons. It even explains many of the professional aspects of what a being employed as a programmer entails beyond just the theoretical and technical aspects. It's where I usually send people with a similarly un-technical background who display a curiosity about programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1156" LastEditorUserId="1156" LastEditDate="2017-06-21T15:02:19.620" LastActivityDate="2017-06-21T15:02:19.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="911" PostTypeId="2" ParentId="908" CreationDate="2017-06-21T15:04:08.643" Score="2" Body="&lt;p&gt;That depends entirely on the context of your CS1 course. Are you teaching unit testing suite to your students? If you haven't learned something then how can you use it? If unittest is part of the curriculum, then definitely students should use it. At my University, students are formally introduced to the &lt;code&gt;JUnit&lt;/code&gt; suite during 2nd year, and thus for all their &lt;b&gt;Java&lt;/b&gt; projects they are required to have their own testing suite. As for their &lt;b&gt;C&lt;/b&gt; projects, we do not require unittesting because &lt;code&gt;gdb&lt;/code&gt; is already enough hair pulling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your question, no we are not using unit testing in CS1 because it has not been formally taught yet.&lt;/p&gt;&#xA;" OwnerUserId="747" LastEditorUserId="747" LastEditDate="2017-06-21T15:20:21.327" LastActivityDate="2017-06-21T15:20:21.327" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="912" PostTypeId="2" ParentId="872" CreationDate="2017-06-21T17:18:18.973" Score="3" Body="&lt;p&gt;I think it is important to stress that computers &quot;do what you tell them, not what you think you tell them&quot;.  From there, testing is a way to see if what you've told them to do is what you think you've told them to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would do this by comparing it to something they understand.  At that age group, it could be something completely unrelated to computers.  For example, do &lt;a href=&quot;http://www.centexeweek.org/activities/peanut-butter-and-jelly&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Peanut Butter and Jelly Sandwich Experiment&lt;/a&gt; where one student writes down how to make a PB&amp;amp;J sandwich and a different student follows those instructions exactly. (the results are usually &lt;em&gt;not&lt;/em&gt; a sandwich).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, I would try to teach testing not as a &quot;thing you do at the end&quot; but something you do along the way.  A professional programmer tests their code every few lines.  I start my programs as a &quot;Hello, world!&quot; program and I run it just to make sure I have my headers and other boilerplate correct. Then I replace the &quot;Hello, world!&quot; statement with a few lines that implement the basics of the program (maybe just open the file and close it). I then test that. I keep doing these iterations along the way. (A good explanation of this is in &#xA;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/020161586X&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Practice of Programming&lt;/a&gt; by Kernighan and Pike.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students learn to test after every few lines they'll learn faster, be less frustrated as they code, and gain more satisfaction from coding.  They'll learn faster, because they'll get faster feedback.  They'll be less frustrated because they won't have dozens (or hundreds?) of errors to deal with at a time.  They'll gain more satisfaction because their code will work better.&lt;/p&gt;&#xA;" OwnerUserId="53" LastActivityDate="2017-06-21T17:18:18.973" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="913" PostTypeId="2" ParentId="860" CreationDate="2017-06-21T17:39:03.057" Score="13" Body="&lt;p&gt;Everyone uses high-level languages these days, and we let compilers do the grunt work.  Block-based programming is just a kind of IDE with a slightly different autocomplete mechanism.  Block-based code can be trivially transpiled to textual form.  After they complete an exercise, you can have them perform that conversion to textual code or pseudocode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To debunk the &quot;Real programmers don't use _____&quot; fallacy, you could discuss what happens when you take that mentality to its logical extreme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://xkcd.com/378/&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://imgs.xkcd.com/comics/real_programmers.png&quot; alt=&quot;XKCD 378: Real Programmers&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="897" LastActivityDate="2017-06-21T17:39:03.057" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="914" PostTypeId="1" CreationDate="2017-06-21T17:56:31.293" Score="15" ViewCount="1136" Body="&lt;p&gt;Teaching 8th graders using App Inventor through Project Lead the Way's ICS 1 curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am interested in moving the students towards a deeper understanding of the power of CS to improve people lives. We are a high poverty school and I think it would be good for our program for students to make things that were useful to their classmates and community. PLTW has a basic framework for this that involves asking friends and family about needs and then designing based on these user stories. This past year, however, I ended up with 6 different apps that fart when you tap a picture (not completely accurate, but basically). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions for developing a sense of responsibility and more interesting, powerful student designed projects?&lt;/p&gt;&#xA;" OwnerUserId="1079" LastEditorUserId="76" LastEditDate="2017-06-21T18:03:52.367" LastActivityDate="2017-06-29T03:51:53.417" Title="How do I scaffold students toward building meaningful projects?" Tags="|student-motivation|project|block-based-programming|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="915" PostTypeId="2" ParentId="908" CreationDate="2017-06-21T18:19:13.777" Score="4" Body="&lt;p&gt;I'm going to start my answer the same way as &lt;a href=&quot;https://cseducators.stackexchange.com/a/911/1166&quot;&gt;the only other answer so far&lt;/a&gt; and say it depends on the context of the course, but head in a different direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact that you're calling the course CS1 implies that it's the start of a chain or tree of courses. A CS1 for a traditional theoretical CS course of study will be different than a CS1 for a newer style programming-oriented program will be different than a CS1 for a &quot;zero to job-ready&quot; boot camp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more traditional curriculum likely won't involve unit testing, as it will focus more on theory and algorithms and less on practical coding. The newer, more hands-on ones involve a component of learning good practices for both programming in general and usually specific languages as well, and so some coverage of unit testing is often appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you remain in the (now-minority) group of people who aren't convinced of the wonders of developers adhering to Test-Driven Development (TDD), it's a concept that most developers are at least familiar with, so it's important to make your students aware of it (if not in CS1 then at some point).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a real-world example: the semi-famous UC Berkeley Engineering Software as a Service intro-level course, which has been MOOC-ed, and &lt;a href=&quot;http://www.saasbook.info/&quot; rel=&quot;nofollow noreferrer&quot;&gt;its award-winning accompanying book&lt;/a&gt;, covers unit testing quite heavily.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="27" LastEditDate="2017-06-21T18:25:42.337" LastActivityDate="2017-06-21T18:25:42.337" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="916" PostTypeId="2" ParentId="914" CreationDate="2017-06-21T18:20:39.923" Score="10" Body="&lt;p&gt;For context, I teach high school students as part of a 4-year high school &lt;em&gt;computer science major&lt;/em&gt;.  My students do, during their 4th year, a full-year project for a client who has a need.  (The clients do not pay for this, they provide a client experience for our budding developers.)  At the end, we have a big event with presentations, outside judges, and a lucheon. I've been playing with the formula for this class for a number of years (and I am still tinkering!), but here are a few takeaways I can share with you that would apply to younger kids and shorter projects:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Pose a challenge to the 8th graders to address a particular world problem.  (You should choose the problem).  It could be global hunger, or too much partisanship, or not enough kids with access to education.  Tell them that their application should address this problem.  Give them three research resources that they can use to explore the issue further.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make other projects possible only if they write a few paragraphs about why the problem they wish to address is important, and how they intend to address the problem.  They must include a reference to 3 sources about the problem that they want to address.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get outsiders to come in for a culminating event and &quot;judge&quot; the final projects.  (The outsiders can be other teachers from your building, your administrators, or true outsiders.)  Let the kids prepare a short presentation about their project, science-fair style, and let the judges walk around with a rubric and talk to the students.  Having people from the outside world come in is a powerful motivator (and will prevent a lot of the fart-joke responses).  Similarly, contact your local newspaper and see if they can send someone in for a small write-up.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give a certificate to the winner, or even a small trophy.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As they work, have each student (or group) create small milestones that they must meet.  These are the core of the evaluation process.  New milestones are created on the same day as the old ones are graded.  They must be very specific, and you must agree to them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In the following year, you can choose a new problem to address, and you will have a few example projects from the first year.  By choosing only one or two very strong projects (and saving the newspaper writeup), you can really set the tone the second year.  This project will now be a big deal, and kids will take it very seriously!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-21T18:20:39.923" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="917" PostTypeId="1" AcceptedAnswerId="946" CreationDate="2017-06-21T18:44:51.027" Score="5" ViewCount="1806" Body="&lt;p&gt;My university has decided that it should give a core (that is compulsory) statistics class to its computer science undergraduates.  This opens the interesting question of what should be in such a class that everyone has to take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I know most CS degrees don't currently contain statistics classes so it's hard to compare to what already exists.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does anyone have any experience of this and what would people&#xA;  recommend for a new statistics class for computer science students?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1168" LastEditorUserId="793" LastEditDate="2017-06-21T18:58:55.223" LastActivityDate="2022-04-21T20:26:36.340" Title="What statistics should be in a computer science degree?" Tags="|curriculum-design|undergraduate|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="918" PostTypeId="1" CreationDate="2017-06-21T18:53:44.410" Score="11" ViewCount="385" Body="&lt;p&gt;I was at a party a few days ago with a doctor (the medical kind, not the research kind) who was thinking about writing a computer program to solve a scheduling problem at work. Someone introduced him to me because I have a CS degree and worked as a software engineer for a few years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It wasn't long before we moved on from the specific problem he had (for which the answer was &quot;hire a freelancer&quot; or at least &quot;I can't solve this for you just standing here with a beer and without a computer&quot;) to talking about computer science in general. To his credit, he asked good questions, picked up on the answers immediately, and asked smart follow-ups. But a lot of stuff that's second nature to us CS people was totally new and surprising to him.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The big one, which isn't surprising in hindsight but which we didn't get to until late in the conversation, was that computer science isn't the same as programming. There was also the fact that complexity/Big-O makes a real difference, and that the Halting Problem/unsolvability exists. It kinda made me feel like I wasn't a great ambassador for CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My actual question here is: how do you explain computer science to people when you have not a year or a semester, but just an hour, or even only five minutes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(This question might be a little outside the typical scope for this site, but it's still relatively early in the beta, so I figured let's give it a shot.)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="1166" LastEditDate="2017-06-22T15:39:08.950" LastActivityDate="2017-06-30T00:14:36.000" Title="How can I explain the difference between CS and coding to a layperson?" Tags="|cs-theory|layperson|" AnswerCount="6" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="919" PostTypeId="2" ParentId="918" CreationDate="2017-06-21T19:26:49.723" Score="11" Body="&lt;p&gt;I regularly have to explain what &lt;em&gt;computer science&lt;/em&gt; is to parents, and I have lately settled into this explanation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technology keeps changing all the time. You get used to the menus in Microsoft Word, and then they change it to the Ribbon. You learn to program buttons in Java using Applets, and then Applets get removed from every major browser as a security risk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there are some things that &lt;em&gt;never&lt;/em&gt; change, because they're in the realms of mathematics, or they are fundamental organizing principles.  For instance, computer right now work in binary, 1s and 0s.  The properties of binary numbers themselves aren't going to change no matter what new technology comes around tomorrow.  We might create a computer that's not based on binary, but the properties of binary itself are fixed.  This is the realm of computer science.  Computer science is the foundational stuff that doesn't change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's highly mathematical, highly theoretical, and there are a lot of proofs involved, but when you study computer science, you are studying the deeper question in the nature of computation itself, and that's stuff that never gets dated.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-21T19:26:49.723" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="920" PostTypeId="2" ParentId="206" CreationDate="2017-06-21T19:33:28.767" Score="2" Body="&lt;p&gt;In my country we don't have &quot;lab&quot; classes... We simply have classes. In this classes we start by introducing the concepts and then give the students assignments to practice those concepts. I also have to deal with some very &quot;fast-paced&quot; students. For these students I always have some aditional more advanced assignments prepared. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For deeper information on this subject you may check this report from the 2010 ITICSE conference:  &lt;a href=&quot;https://eprints.soton.ac.uk/271328/1/iticse-10-wgSubmitted.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://eprints.soton.ac.uk/271328/1/iticse-10-wgSubmitted.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-06-21T19:33:28.767" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="921" PostTypeId="2" ParentId="914" CreationDate="2017-06-21T19:43:32.880" Score="5" Body="&lt;p&gt;Since you said that it is a &quot;high poverty school,&quot; I assume that some students may have some financial/material needs... So, you could suggest the development of an app that allows the students to anonymously post things that they are in need of (a pair os shoes, one math book, food, ...) and let other more fortunate students (also anonymously) provide what they need.   &lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-06-21T19:43:32.880" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="922" PostTypeId="2" ParentId="327" CreationDate="2017-06-21T19:48:47.250" Score="5" Body="&lt;p&gt;I strongly agree with the first two lines of &lt;a href=&quot;https://cseducators.stackexchange.com/a/328/1166&quot;&gt;Gypsy Spellweaver's answer&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Neither is &lt;em&gt;better&lt;/em&gt;. What is true for one student may not be for another.&lt;/p&gt;&#xA;&lt;p&gt;Studies can show trends. Students are &lt;em&gt;not&lt;/em&gt; trends; they are &lt;em&gt;individuals&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;(emphasis original)&lt;/p&gt;&#xA;&lt;p&gt;Sure, laptops have their benefits. When typing, I can put down far more words per minute than when hand-writing, plus I don't have to worry about legibility dropping. I usually open up to a notepad program and nothing else when in this situation.&lt;/p&gt;&#xA;&lt;p&gt;But in most cases, the temptation is too great. After that browser's already open, it takes a lot to focus back on the lesson. A lot of people never even start there. I've been in graduate school classes with students who had their laptops open to full-screen Facebook, and next to 50-year-old career changers paying for second degrees doing the same thing. On the other hand, some of the most successful moderators on Stack Overflow and Stack Exchange are teenagers (or, at least, were, when they were elected). I think the answer here comes down to the maturity level of the specific students you happen to have in your class, which is something only you can know.&lt;/p&gt;&#xA;&lt;p&gt;I see the value in &amp;quot;code-alongs&amp;quot; and other in-class coding exercises, but I don't buy that laptops are essential for such activities. There are several alternatives.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Pencil and paper. Have 'em write it out instead of typing it out. Students are likely to push back on this because of some misguided association between computers and code, but let's face it, computer science is ultimately more about thought processes than the act of coding. If your brain understands the reason why that recursion works, does it really matter whether you wrote it on paper or on a screen?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A separate computer lab. I've been fortunate enough to always attend and work at schools that offer computer labs. Often, they were adjacent to or at least near CS classrooms. If that's the case for you, you could &amp;quot;save up&amp;quot; the code examples from the lecture portion of your class (maybe have the students write out some quick ideas as pseudocode) before heading into the lab to try them out. That was very effective for lower-level CS classes when I was a student.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No-stress pop quizzes. If you don't have a lab, you could always fall back on a technique other disciplines have been using for years: the in-class, ungraded survey. Introduce a new concept, then put up a slide with a multiple-choice option and say &amp;quot;Which of these is the correct way to implement what we just talked about in Java?&amp;quot; One option might have a syntax error, another might have an off-by-one error, that sort of thing. When I was an undergrad, I had to buy a fancy electronic &amp;quot;clicker&amp;quot; that was set up to interface with a receiver in the lecture hall so my response could be tracked for a participation grade. For a smaller class, I like the idea of holding up colored or numbered cards. (This also keeps people engaged throughout lectures... not to imply that you're a boring teacher!)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Discussion. Always a mixed bag of an option, but you can try taking pair programming to the extreme and writing the code &amp;quot;on the big screen&amp;quot; by soliciting input from the students.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-21T19:48:47.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="923" PostTypeId="2" ParentId="908" CreationDate="2017-06-21T20:12:21.800" Score="4" Body="&lt;p&gt;It depends on what you mean by &quot;used.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The student projects might not lend themselves to TDD  in that the early assignments will probably be very small and if the end up writing 90% of the project as tests and 10% as their stuff it could be deflating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, they should at least be familiar with TDD but that doesn't mean it has to or should be in CS1. The most important thing to get across early w/r to testing is not TDD in particular but the importance of thorough testing. I've never been a big TDD person but that doesn't mean I Don't test my code constantly throughout development - that's the important concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What might be a good idea is to expose them to TDD in that when you give an assigment, give it with the tests / test framework. I played with this a little last year and plan to do it more next year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When giving  a lab or homework, give it with the tests - kindof like having them use an online grader but they get and see the grader.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later on, if time and projects permit, they can add some of their own tests or perhaps even do the TDD thing whole hog.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-21T20:12:21.800" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="924" PostTypeId="2" ParentId="860" CreationDate="2017-06-21T20:44:20.263" Score="2" Body="&lt;h1&gt;Real-world motivation&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I have a neutral opinion on visual programming. I have dabbled in it and decided that I am not interested. &lt;em&gt;But&lt;/em&gt;. It is simply a tool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tools are complicated to motivate. Just enter any room of programmers and give them the exercise to, once and for all, decide on whether vi or Emacs is better. You might as well ask them to choose the new Pope...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, in my opinion, an intelligent person (which your pupils certainly are!) does not need to actually be fond of or deeply knowledgeable of a tool to appreciate its merits. In the same vein as being able to learn about war and famine (which are decidedly not fun), they should be able to learn about Visual Programming even if you do not find a &quot;fun&quot; exercise for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you can easily teach them that there is a place for almost every tool. Visual Programming has its place in certain niches (depending on viewpoint, obviously) where you just do not need the expressive power of a general programming language. For example, if you are into Business Process Management, you can achieve a &lt;em&gt;lot&lt;/em&gt; with visual programming. If you are using one of the game engines which focus on higher level creation, the same is true. A program like Blender can go far with a very domain-specific visual &quot;programming&quot; for what it does (physics simulation and so on). CAD/CAM systems are largely &quot;programmed&quot; with very, very domain specific visual tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pick a few nice examples, and maybe you find some open source / free visual programming environments where they just play around, as a bonus. Even if they never touch them again, they will at least know that such things exist, and they may appreciate that &lt;em&gt;somebody&lt;/em&gt; out there (who, likely, would never &quot;program&quot; anything at all, if they couldn't do it visually) puts them to good use.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;&quot;Convince&quot;?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Try not to convince them. Show them what is &lt;em&gt;real&lt;/em&gt;, what &lt;em&gt;exists&lt;/em&gt;, and that in itself should be convincing enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might sound like nitpicking, but in the business world, if people start to try to &quot;convince&quot; someone of something, then it's usually a red flag. I prefer if they show me that something so I can understand and appreciate (or deny) it myself.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2017-06-22T05:40:42.983" LastActivityDate="2017-06-22T05:40:42.983" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="925" PostTypeId="2" ParentId="27" CreationDate="2017-06-21T21:08:08.823" Score="3" Body="&lt;p&gt;To very loosely paraphrase a famous man, &quot;it depends on what the definition of 'teach' is.&quot; A few other answers have sort of approached this point, but none have quite said it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a difference between introducing the fact that assembly language exists and explaining the purpose it serves, and going all out and instructing students in the meaning of each assembly instruction and having them write complete programs in assembly language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, assembly language is scary, but that alone isn't a good reason to shy away from teaching it. Many people who haven't been exposed to computer science think the entire field is intimidating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For decades now, novices have basically had the options of learning to code in either high-level programming languages or REALLY-high-level programming languages*. Naturally, that leads to some disconnect about what's actually going on between the code and the processor. It's important for programmers to know that that space is filled by an ordered, understandable process, not magic. But anything more than that (and, arguably, even that much) can wait until after the introductory level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assembly is, quite frankly, too low-level for the kinds of thinking that introductory courses are intended to develop. The idea is to get students thinking about loops and lists and stacks and trees; algorithms and data structures. Talking about moving values from register to register hides the forest for the, um, other kind of trees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once students get past the first few courses and decide they want to stick with the program, then throw assembly into the mix along with other &quot;necessary but more advanced&quot; topics, like P/NP, I say.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;* Compare to &quot;once upon a time,&quot; when the default newbie programming language was C, which was a lot closer to assembly, and my answer might have been different.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="27" LastEditDate="2017-06-21T21:13:38.183" LastActivityDate="2017-06-21T21:13:38.183" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="926" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T21:25:04.023" Score="2" Body="&lt;p&gt;A programmer writes the instructions for a computer to do its job. A program is a set of instructions for it to follow to accomplish or aid in performing a task. Sometimes the instructions can be rather abstract things like skipping certain instructions or doing others over and over. The programmer assembles instructions into smaller groups that accomplish a part of the task, called a subroutine (or function, method, etc). These are used as building blocks from which they construct the larger program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, in one sentence: If computers are magic then coding is writing the spells.&lt;/p&gt;&#xA;" OwnerUserId="1183" LastActivityDate="2017-06-21T21:25:04.023" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="927" PostTypeId="1" CreationDate="2017-06-21T22:00:31.637" Score="15" ViewCount="735" Body="&lt;p&gt;I saw a question about how to deal with high performing students, and although I think it is very important, the problem that we are facing in my school is the exact opposite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a high number of ghost students (approx. 25%) and also a large number of students dropping or failing in a second year OOP Java class (approx. 50%).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the dropping/failing students have passed CS1 (intro to programming with C) and CS2 (data structures with C). The problem is that they passed with a low grade (10 or 11 in a 0-20 scale) and in some cases, they are enrolling in the OOP class for the 5th or 6th time and have had CS1 and CS2 a long time ago. The main issue is that they've forgotten the most basic programming concepts, and each year it is getting worse. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should the teacher do? &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;assume that the students know the basis and just keep on moving forward. (knowing in advance that most will fail)&lt;/li&gt;&#xA;&lt;li&gt;reserve the first weeks to recap the “forgotten concepts”.&lt;/li&gt;&#xA;&lt;li&gt;Advise the students to enroll in CS1/CS2 again.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Anyone else has this problem? What have you done? Did it work?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="8651" LastEditDate="2020-01-04T04:12:40.493" LastActivityDate="2020-09-30T18:36:08.410" Title="How to deal with very low performing students?" Tags="|struggling-students|differentiation|" AnswerCount="7" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="928" PostTypeId="2" ParentId="206" CreationDate="2017-06-21T22:23:58.473" Score="5" Body="&lt;p&gt;The other answers are good, but there's another angle you could take that hasn't been mentioned: make the early finisher(s) your temporary lab assistant(s). Assuming that what they turned in was suitably bug-free (not that I ever submitted a lab super-early with a critical error still in the code, no way no sir) and depending on the personalities/temperaments of the individual students in your class, you can have students who have finished a given lab help students who haven't finished it yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few benefits to this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It's well-known that different people explain things differently, and different explanations work for different people. So well-known that I'm not even uncomfortable saying that without a citation. Someone who's having trouble with the lab because of not understanding the way you explained a concept, through no fault of yours, might do better with someone else's explanation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Even if the student's explanation is somehow a carbon copy of yours, there's still value in it coming from a peer rather than a teacher/authority figure.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This benefits the &quot;lab assistant,&quot; too; nothing reinforces understanding/command of material like teaching it to someone else.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;From a purely numbers view, you've now got two (or three, or four) people in the lab to answer questions instead of just yourself.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would reiterate that the viability of this strategy depends enormously on the individual students you have. They all have to respect each other, be ethical, and buy into the system, and probably like each other a fair bit as well. But in your specific case, I'm not concerned, based on&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;high performing, grade conscious, and ... 'Ivy League or bust'&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a bonus, the job automatically lasts for exactly the right amount of time.  You can offer the assistants some extra credit per day worked, if you're that kind of teacher.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-21T22:23:58.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="929" PostTypeId="2" ParentId="860" CreationDate="2017-06-21T22:28:04.260" Score="4" Body="&lt;p&gt;A lot of people are talking about how visual scripting is a higher abstraction, and that's all the difference, and the debate has moved more to a question of &quot;is visual scripting 'real' programming?&quot; The general consensus appears to be that yes, DnD languages are still real languages, and sure, it's a higher abstraction, but what does that mean?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a value to higher abstraction that no one seems to be mentioning, and that's the speed of it. When you remove details, you can write more, in the same amount of time. It's why we compare Python to C as 1 line for every 6. The value of visual scripting for people who are experienced programmers is the speed at which you can develop. This is an incredibly important factor in development, especially when smaller teams try to produce large, complex software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good example of a visual scripting system is the Playmaker extension for the Unity game engine. Every Unity developer and their grandmother uses it, and for good reason. It allows them to rapidly prototype ideas and build complex systems in hours instead of weeks. And once the prototyping phase is done? The system they built is production-ready in most cases. Time is a very expensive resource in the software industry. If the cost of time needed to perfectly optimize your game in C is more expensive than the slight loss in efficiency you'll have for a fraction of the development time, it's a foolish business decision to ignore the option which enables you to make more money.&lt;/p&gt;&#xA;" OwnerUserId="1191" LastActivityDate="2017-06-21T22:28:04.260" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="930" PostTypeId="2" ParentId="868" CreationDate="2017-06-21T23:06:28.793" Score="0" Body="&lt;p&gt;Coding/Programming is interacting with a computer or device with a language the computer can translate and actually use, because computers and other devices don't understand human languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes those interactions are things like asking questions, or taking notes to keep track of things, or looking up old information wherever you put it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programs are big collections of those designed interactions to achieve a specific goal, like, make a spreadsheet, send an email, or draw an object in three dimensions on the screen -- stuff like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming languages are just languages that humans code with so computers know how to translate and use their designed interactions. Those languages are usually a mix of human words and symbols to help with the creation of those instructions for those interactions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The computer/device only cares about the instructions, not the language used to make those instructions, so it takes those translated, coded interactions as instructions for a language that the computer knows how to use that we humans can't really read without help of a translator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Coders/Programmers are basically the middle-men to help with communication and action between machines and humans.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1193" LastEditorUserId="1193" LastEditDate="2017-06-21T23:12:06.617" LastActivityDate="2017-06-21T23:12:06.617" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="931" PostTypeId="2" ParentId="927" CreationDate="2017-06-21T23:27:42.240" Score="11" Body="&lt;p&gt;One elegant way to deal with this sort of problem (though it does take a lot of work) is to create a self-explanatory review packet (including a practice quiz!), give it out on day one, and promise that there will be a quiz on its contents during the second week of class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You then don't need to spend another minute on the material in class, at least for that first week. (&lt;em&gt;Especially&lt;/em&gt; for that first week. They should not feel hand-held at first! See below...) You might want to make help available during office hours, however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has a second benefit, which is that you can set a recommendation for withdrawal from the class. I would give this a soft sell: &lt;em&gt;&quot;if you can't achieve an 80% on this quiz, then the kindest thing I can do is to recommend that you drop the class. It's not to be mean, but you WILL NOT have a good time here if you haven't reasonably mastered these concepts.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By putting the onus of weeding poorly performing students back on the students themselves, you will (hopefully!) find that you get very little resistance. And folks who choose to stay on anyway will be making an active choice to work very hard going forward (or suffer the consequences).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The big brunt of the work need only be done one time; the review packet and the practice quiz can be the same every semester. It is only the quiz itself that need be changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this should weed out some of the lowest performers (and give many others a much-needed review), if the students are as low-performing as you say, it might not hurt to touch on some of the harder concepts that people get stuck on when you come to them again in the class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully you'll have much better performance in the course going forward. Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2019-12-23T18:54:13.637" LastActivityDate="2019-12-23T18:54:13.637" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="932" PostTypeId="2" ParentId="918" CreationDate="2017-06-21T23:46:52.050" Score="3" Body="&lt;p&gt;Computer science is a discipline of problem solving. I use this phrase from CS50 often (mainly because I teach an adaption of it): &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;inputs -&amp;gt; algorithms -&amp;gt; outputs&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From &lt;a href=&quot;http://docs.cs50.net/2016/fall/notes/0/week0.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;the official CS50 notes from last year's Week 0 lecture&lt;/a&gt;, the following three bullets explain what this phrase means:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;&lt;p&gt;At the end of the day, computer science is about problem solving:&#xA;  taking some inputs (the problem we might be trying to solve) and&#xA;  creating some outputs (perhaps a solution to the problem).&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;Between those inputs and outputs is what we might call a &quot;black box,&quot;&#xA;  something that solves the problem for us even if we might not know or&#xA;  care &lt;em&gt;how&lt;/em&gt; it solves them.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;&lt;strong&gt;Algorithms&lt;/strong&gt; are sets of instructions to solve particular problems.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is what I use on Day 0 when I welcome students to my class and at Back-to-School Night presentations to parents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your &quot;pitch&quot; has enough time for an example, the canonical CS50 example -- one which my students remember vividly from Day 0 since it involves ripping up a phone book -- is to pose the question asking how to find a name in a phone book. You could approach the problem linearly and go page by page (correct but slow). You could look at two pages at a time to double the efficiency (incorrect without checking a potentially skipped-over page). You could divide and conquer by examining the middle page and throwing away the half you no longer need (logarithmic efficiency). Even something as simple as looking up a name in a phone book allows for discussing linear v. binary search, computational complexity, debugging, sorting (since the book comes pre-sorted). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an alternative to the phone book example (since it's more effective with an actual phone book and not in the abstract), say this: &quot;Think of a number between 1 and 1024. I guarantee I will get it in 10 guesses or fewer.&quot; A computer scientist will conquer that challenge every time.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-21T23:46:52.050" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="933" PostTypeId="2" ParentId="914" CreationDate="2017-06-22T00:19:02.140" Score="5" Body="&lt;p&gt;I think @Ben I.'s suggestions are great, but let me present a completely different take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't prepare them for science fairs, prepare them for industry.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Introduce them to git/open source/collaboration by creating an &quot;open source&quot; project on github, involving whatever languages you're using. Open issues and have students assemble into teams and work together to solve problems.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;After some time doing #1, help them find their own open-source projects (see &lt;a href=&quot;http://www.firsttimersonly.com/&quot; rel=&quot;noreferrer&quot;&gt;first timers only&lt;/a&gt;). Be there to assist, but let them give it a go.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Help them explore prominent (most widely used in industry) languages even if they aren't in your curriculum - let them dabble in web design in a Java-focused class, for instance.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Prepare throughout for a &quot;final exam&quot; - an &quot;interview&quot; and accompanying project with people from companies. Help them arrange internships for bonus points! Teach them about interviewing, resumes, professionality - none of it is gonna hurt.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Let them know that the end result is going to be hopefully a chance at an internship - aka, to &lt;em&gt;make money&lt;/em&gt; and become &quot;real, live programmers&quot;. I think that'll remove most if not all of the fart-jokes. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-22T00:19:02.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="934" PostTypeId="2" ParentId="868" CreationDate="2017-06-22T01:18:48.777" Score="6" Body="&lt;p&gt;Simple: you let one of the best science teachers of all time explain it to them for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=EKWGGDXe5MA&quot; rel=&quot;noreferrer&quot;&gt;Here's a video of Richard Feynman&lt;/a&gt; introducing computers to a non-technical audience at some new-age retreat back in the 80s. Starts by explaining how computers work from the inside out, and goes on into heuristics and AI, all in his signature style of great analogies (army of filing clerks, dumber but faster).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As someone who had never come in touch with coding throughout my education, this lecture gave me quite a few &lt;em&gt;Aha!&lt;/em&gt; moments and single-handedly encouraged me to start dabbling with programming.&lt;/p&gt;&#xA;" OwnerUserId="1198" LastActivityDate="2017-06-22T01:18:48.777" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="935" PostTypeId="2" ParentId="206" CreationDate="2017-06-22T02:57:29.997" Score="3" Body="&lt;p&gt;I try to think of challenge add ons for most projects. A student who finishes early will be asked to add more. I will either make some suggestions or challenge the student to make the project more theirs. Most students who finish early want to do more. I have some handouts of things we don't cover generally because of time and I will hand a student one of them (hoe to add images for example) and ask them to add features.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-22T02:57:29.997" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="936" PostTypeId="2" ParentId="347" CreationDate="2017-06-22T03:03:11.043" Score="1" Body="&lt;p&gt;One project I like is to have students draw a shape with a specified number of sides. They can enter the number of sides and have the turtle draw it. Middle school students might have to be taught to divide 360 by the number of sides to get the turn angle but after that they should be all set. It lets you introduce simple variables and how they can be used to control loops. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you add a small turn after the shape is drawn and put another loop around the first one you can get some interesting designs as well. And they learn nest loops is a way that makes sense to them.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-22T03:03:11.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="938" PostTypeId="5" CreationDate="2017-06-22T05:49:00.800" Score="0" Body="&lt;p&gt;Image processing is the analysis and manipulation of images, through code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image processing uses mathematical operations on an image, or a sequence of images, to perform the analysis or manipulations. Analysis that can be done are edge detection, object detection. Manipulations that can be performed are image smoothing or sharpening, image compression and more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image processing is used for classification of images into groups, pattern recognition etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information on image processing can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Digital_image_processing#Tasks&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-22T14:57:51.793" LastActivityDate="2017-06-22T14:57:51.793" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="939" PostTypeId="4" CreationDate="2017-06-22T05:49:00.800" Score="0" Body="Questions related to teaching about image processing. Use this tag to ask about various aspects or methods of instruction regarding image processing. " OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-22T14:57:56.650" LastActivityDate="2017-06-22T14:57:56.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="940" PostTypeId="5" CreationDate="2017-06-22T05:57:23.310" Score="0" Body="&lt;p&gt;Introductory teaching differs from regular teaching in pace, number of examples, and other teaching parameters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students in an introductory lesson can have knowledge or experience in Computer Science, but not in the specific material of the subject in question. The teaching method in such lessons should accommodate to this situation by being slower.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A slower pace means repeating a part of the subject a number of times, and guaranteeing that students understand the new material. The more examples used, the better students understand the subject.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-22T14:58:05.803" LastActivityDate="2017-06-22T14:58:05.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="941" PostTypeId="4" CreationDate="2017-06-22T05:57:23.310" Score="0" Body="Questions related to introducing a subject, paradigm, concept etc., in a specific lesson. Use this tag only for asking about a specific lesson for introducing a specific subject." OwnerUserId="150" LastEditorUserId="2" LastEditDate="2017-08-03T21:06:45.853" LastActivityDate="2017-08-03T21:06:45.853" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="942" PostTypeId="5" CreationDate="2017-06-22T06:18:16.537" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-22T06:18:16.537" LastActivityDate="2017-06-22T06:18:16.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="943" PostTypeId="4" CreationDate="2017-06-22T06:18:16.537" Score="0" Body="Questions asking for help to explain computer sciene or specific computer sciene topics in layman's terms." OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-06-22T10:42:58.937" LastActivityDate="2017-06-22T10:42:58.937" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="944" PostTypeId="2" ParentId="206" CreationDate="2017-06-22T08:40:02.170" Score="2" Body="&lt;p&gt;I agree with @Alfred Thompson - I've had a great amount of success simply providing 'challenge questions'. At first I thought that nobody in their right mind would bother with them, as they have no points or another incentive, but it seems that those with the ability to do so that well they finish early also come with enough incentive to just try things for 'fun' or for 'the challenge'. Perhaps this is why they are good enough to finish early in the first place. I also rarely get questions from students attempting my challenge questions. They just do them! Note: I'm speaking mostly from a first-year at university level here. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-22T08:40:02.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="945" PostTypeId="2" ParentId="146" CreationDate="2017-06-22T08:57:37.450" Score="2" Body="&lt;p&gt;I might be in minority here, but I hate using THINGS as analogy to classes. Classes are about abstracting behavior, and THINGS are not behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in my opinion, best way to give people idea about OOP is to start with some complex behavior and show them how that behavior can be structured into classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Idea that immediately comes to mind is to start with some complex, procedural code and use refactoring to create class structure out of it. This will allow students to contrast and compare two possible ways how code can be structured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Few things I would expect from this code. First I would expect there to be a complex method, with lots local variables and lots of code accessing those variables. This could then be refactored into class with local variables turned into fields and whole method split into smaller methods, each having access to the fields.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next I would expect there to be some plain data structure, with code operating on this data structure. Maybe the above step would extract a method that works only with this data structure, and then that method could be moved into the data structure, making it a proper class. This could also work by introducing private fields, as the internals of the data structure might really be accessed by it's member method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next thing I would expect is some kind of switch that decided what calculation is used based on some kind of external parameter. This could be extracted first into individual class with method and then into class hierarchy with inheritance/interface, with concrete implementation passed in instead of &quot;type&quot; discriminator. To make it more complex, each of those calculations might want different input parameter, which might create complex method parameters, but would be simple if each concrete &quot;calculation&quot; class has it's own parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, this will show classes are just different way how to structure behavior and that there might be classes that don't have noun (or a thing) associated with them.&lt;/p&gt;&#xA;" OwnerUserId="1214" LastActivityDate="2017-06-22T08:57:37.450" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="946" PostTypeId="2" ParentId="917" CreationDate="2017-06-22T09:30:53.690" Score="4" Body="&lt;p&gt;My first thought to provide a bit of something for you to go on was CS2013: The ACM/IEEE Joint Curriculum Guidelines for Undergraduate Degree Programs in Computer Science. This is available at &lt;a href=&quot;https://www.acm.org/education/CS2013-final-report.pdf&quot; rel=&quot;noreferrer&quot;&gt;https://www.acm.org/education/CS2013-final-report.pdf&lt;/a&gt;. I've copied out two relevant passages from that here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Computer science curricula should be designed to provide students with the flexibility to work across many disciplines. Computing is a broad field that connects to and draws from many disciplines, including mathematics, electrical engineering, psychology, statistics, fine arts, linguistics, and physical and life sciences. Computer Science students should develop the flexibility to work across disciplines.&quot; (p.20)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Similarly, while we do note a growing trend in the use of probability and statistics in computing (reflected by the increased number of core hours on these topics in the Body of Knowledge) and believe that this trend is likely to continue in the future, we still believe it is not necessary for all CS programs to require a full course in probability theory for all majors. (p.50)&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is worth searching that document for 'statistics'. It is mentioned in many other areas, but mostly as something learned in other areas such as Networks, HCI, Cryptography, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The December 2013 issue of ACM Inroads had a good article (&lt;a href=&quot;http://dl.acm.org/citation.cfm?id=2537777&quot; rel=&quot;noreferrer&quot;&gt;http://dl.acm.org/citation.cfm?id=2537777&lt;/a&gt;) on the role of mathematics in CS. This included a section on &quot;The Current State of Mathematics in Computer Science Curricula&quot;. The article states that &quot;The most-connected mathematical topic [to CS] by far is probability and statistics&quot; and has some references to such. They also present the mathematics requirements of 25 'high quality' CS programs. Stats and Prob was required for 15, Calculus for 21 and Discrete Mathematics for 22.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dl.acm.org/citation.cfm?id=1240202&quot; rel=&quot;noreferrer&quot;&gt;http://dl.acm.org/citation.cfm?id=1240202&lt;/a&gt; discusses statistics in liberal arts CS curricula. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Searching the CITIDEL syllabus collection (citidel.villanova.edu/ then look for syllabus collection) for 'statistics' might be worth a try, although the website has been varying between unresponsive to slow to responsive lately. Also, some of the material in there is a bit dated, but then again, statistics dates fairly well! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that in 2013 60% of sampled 'high quality' CS programmes had statistics, maybe it is more prevalent than you think. Perhaps the best way to obtain the most up to date information is to check the websites of several good CS programmes and hope that if they include statistics, the syllabi are available online. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-22T09:30:53.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="948" PostTypeId="1" AcceptedAnswerId="986" CreationDate="2017-06-22T09:51:04.233" Score="4" ViewCount="249" Body="&lt;p&gt;Before I turned 19 I just kind of... fell into coding. I used to think programming was something incredibly hard that only child prodigies and people with a 160+ IQ could do. (A view often reinforced by Hollywood stereotypes.) And I thought that I just wasn't smart enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since getting into programming,${}^1$ I have learned that even a monkey could take up coding. (Seeing some code, it seems in fact, they do.) This is not evident to many outsiders, however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently have a friend that is about to finish school and she has no idea what to do with her life. I am trying to encourage her to give coding a shot. I know she would be great at it as she's one of the smartest people I know, even if she won't believe it. Just like younger me, however, she thinks she's too dumb to have a chance at coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do I convince her to give it a shot?${}^2$ What tools are there to show her it is much easier than it looks at a glance?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;${}^1$I just kind of happened to get into coding via databases, but that is a rather unusual path to take and not one I would recommend to start out with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;${}^2$I don't want to pressure her into a career in programming; if she decides it's not for her, that's fine, but basic coding knowledge is surely not a bad skill to have.&lt;/p&gt;&#xA;" OwnerUserId="1216" LastEditorUserId="104" LastEditDate="2017-06-22T23:26:53.613" LastActivityDate="2017-06-24T06:52:22.043" Title="Overcoming a friend's self-discouragement" Tags="|student-motivation|layperson|" AnswerCount="7" CommentCount="4" ClosedDate="2017-06-25T12:10:22.727" ContentLicense="CC BY-SA 3.0" />
  <row Id="949" PostTypeId="2" ParentId="349" CreationDate="2017-06-22T10:54:15.767" Score="7" Body="&lt;p&gt;I've always used Hello name&quot; as part of Hello World. It's easy enough for most students and makes the program more fun. After Hello World I use a conversion program. For example Fahrenheit to Celsius. That makes a lot of sense in the US but might not in other countries. But there are many conversions that make local sense in other parts of the world. Pounds Sterling to Euros perhaps. Students often like money problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conversion programs involve both input and output but add the introduction of assignment statements and calculations.  More involved calculations allow for a review of the order of operations (one reason I use Fahrenheit to Celsius). Students get interesting results if they don't set up the formula correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conversion programs also let one introduce testing early in the game. Sure the program compiled, ran, and gave you an answer but how to you know it is the right answer?&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-22T10:54:15.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="950" PostTypeId="2" ParentId="527" CreationDate="2017-06-22T11:02:08.990" Score="4" Body="&lt;p&gt;I introduce loops by showing them loops in the physical world. For example I have a student take 7 steps - counting loop. An other student walks to a specified point - while/until loop. We talk about how these loops work in our minds before we talk about how they work in code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many daily activities can be discussed in terms of loops and we discuss several. Eating is a good &quot;loop&quot; with several possible indicators of when to stop. When you are full or when you are out of food or when you don't have more time to eat (end of lunch bell rang.) Steps can be counted or one can tell that they are at the top. Even better what happens if you &quot;stop&quot; early or late.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concepts first and syntax later.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-22T11:02:08.990" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="951" PostTypeId="2" ParentId="948" CreationDate="2017-06-22T11:11:31.927" Score="4" Body="&lt;p&gt;I am not sure if I agree with the &quot;monkey&quot; part! Maybe everyone is capable of writing some code. Building serious apps is another thing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, show her the code.org website, and let her play around for a while. If she does not like, then probably she is not fitted for this &quot;monkey thing&quot; :)&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-06-22T11:11:31.927" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="952" PostTypeId="1" CreationDate="2017-06-22T11:46:52.630" Score="15" ViewCount="6714" Body="&lt;p&gt;Is asking students to debug code better than asking them to write code, if the goal is to give students a strong basis in creating error-free code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my point of view, when we ask them to write a program by giving some scenario, they will write some code.  Most probably, this code will contain errors. Then they will correct them after debugging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we ask them to debug other's code, they will be more careful, they have to pass through various scenarios and they will become very strong in syntax while correcting mistakes and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;While teaching coding, after some point, can I ask them to debug code rather than continue writing code?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which will make them stronger at coding?&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="58" LastEditDate="2017-06-24T10:29:24.573" LastActivityDate="2017-09-04T18:35:05.443" Title="Is asking students to debug existing code better than having them write new code?" Tags="|debugging|" AnswerCount="12" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="956" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T11:57:25.220" Score="3" Body="&lt;p&gt;Writing code is essential, and a part of that is debugging (your own) code. If you can't debug your own code, you won't get very far, unless you write perfect code the first time, every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Debugging someone else's code introduces students to things that debugging their own can't - different styles, and different approaches to problem solving, that perhaps they would not come up with on their own. So debugging someone else's code helps you write better code for yourself. You learn what is good, what works, and what is bad, and doesn't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as for learning another natural language (written), you can get fairly far writing and correcting your own words, but at some point, you'll benefit from reading (and possibly correcting) someone else's words. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to answer your question, yes, I see no problem in having students debug code (that isn't theirs). In fact, I would almost go as far as to say you should. But I wouldn't say that debugging code is more important than writing code. I would say it is part of writing code.  &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-22T11:57:25.220" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="957" PostTypeId="2" ParentId="628" CreationDate="2017-06-22T12:04:49.470" Score="1" Body="&lt;p&gt;Simply - yes, but not always. Paper-based programming exams make students think differently than they do in front of their editor. What's wrong with that? Nothing (as long as it isn't always that way). What's the benefit? Thinking differently. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-22T12:04:49.470" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="958" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T12:19:14.663" Score="15" Body="&lt;p&gt;I give students targeted debugging exercises to make them aware of common &lt;em&gt;traps&lt;/em&gt; that they can fall into while coding, and I believe that this is beneficial to them.  Certain errors come up all of the time, and pointing them out can be a real time-saver for students when they code their own labs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also give out small bits of badly-formatted code, with poor variable names, indentation, etc.  But these are always to call attention to the importance of good coding practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I do not emphasize either of these activities heavily; the ability to conceive of algorithms is still of the utmost importance, and I don't want to halt students' growth along this more important axis.  And switching entirely into debugging might (perversely) not help them learn the most important skill of debugging, which is to test with extreme regularity as you work, since you are providing them with fully implemented (bad) code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, &lt;em&gt;yes&lt;/em&gt;, by all means, give students limited, carefully targeted debugging exercises.  But don't switch completely over to this activity.  Finding bugs is important, but it is only one skill that a budding developer needs.  &lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-22T12:19:14.663" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="959" PostTypeId="2" ParentId="948" CreationDate="2017-06-22T12:45:00.303" Score="2" Body="&lt;p&gt;What do you like about programming? Think of something you saw/did when you were starting out that inspired you. I remember during my undergrad when one of my professors all of a sudden one day wrote a program that output itself. I was blown away! Why didn't I think of that? What could I do with that? That was it for me! If your friend is like you, she might be inspired by similar things to you, and the &lt;strong&gt;personal approach coming from you, not from a website/book/whatever&lt;/strong&gt;, is something that no website/book/whatever can do. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-22T12:45:00.303" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="960" PostTypeId="2" ParentId="172" CreationDate="2017-06-22T13:20:41.683" Score="1" Body="&lt;p&gt;In my client-side dev classes, I start by introducing the HTTP protocol so that the students can understand what really happens when they click one link or type one URL. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I start with the flow:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Structure (HTML5) - Look (CSS) - Behaviour (JS)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have three assignments which are in fact 3 iterations of the same: the first is the site with only the structure, then they add the look, and finally add some features like a store or something where they have to use JS / localstorage / JSON ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has worked for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if your students are eager for more, you can build a REST API, provide them the basic HTML/CSS/JS concepts, and ask the students to develop a front-end for that App.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The number of hours that you have available will influence what you can do.&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-06-22T13:20:41.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="961" PostTypeId="1" CreationDate="2017-06-22T14:44:50.527" Score="8" ViewCount="844" Body="&lt;p&gt;I've observed an unusual thing happen when teachers try to introduce Test-Driven Development (TDD) or Behavior-Driven Development (BDD) to their classes. Even though the teachers invariably encourage it and present it as a useful strategy, students come out of the class with mixed feelings or actively opposed to using TDD/BDD in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason they give for this is time. And in a way, it makes sense. TDD and BDD have high upfront setup costs in selecting framework (e.g. JUnit or Cucumber), adding test hooks/libraries into the code (your &lt;code&gt;import org.junit.Test&lt;/code&gt;s), thinking up test cases for all the various scenarios, and then of course actually writing all the tests themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In industry, this isn't so bad, because tests are essentially infinitely reusable, so the cost of that work can be amortized over months or even years. For a class project though, the entire thing from start to finish is only going to be a handful of weeks long at best. So the students see all of the cost and only a small slice of the benefit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, students sort of pick up on a perverse incentive to &lt;strong&gt;not&lt;/strong&gt; use TDD/BDD because the benefits don't justify the cost. So, how can I convince students that those strategies really are good choices, when simply forcing them to use them and saying &quot;it works better in the real world, I promise&quot; isn't cutting it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen &lt;a href=&quot;https://cseducators.stackexchange.com/questions/872/how-to-stress-the-importance-of-testing-code&quot;&gt;How to stress the importance of testing code?&lt;/a&gt;, but the answer there is just &quot;use TDD.&quot; It's not &lt;em&gt;wrong&lt;/em&gt;, but it's also not helpful for my particular question.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="12659" LastEditDate="2022-11-12T13:27:28.443" LastActivityDate="2023-05-29T20:15:16.307" Title="How to overcome the TDD/BDD time fallacy" Tags="|curriculum-design|student-motivation|student-perceptions|unit-testing|agile-development|" AnswerCount="10" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="962" PostTypeId="2" ParentId="961" CreationDate="2017-06-22T14:47:50.090" Score="8" Body="&lt;p&gt;I believe that the reason why students tend to come out opposed to using TDD/BDD (testing) is because they've been assigned to use it when it isn't necessary. Testing a &quot;Hello World&quot; program is 100% a waste of time. Tests only become useful when you have a reasonably complex program. The way that you can avoid students disliking testing is by not assigning it on projects when it isn't needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A specific way in which you could do this would be by combining all the project you would assign over the year into one larger cumulative project. Eventually, as they're writing code, you can be fairly certain that they'll induce bugs or begin to find manual testing to be a pain. Once that starts happening, you can introduce automated testing to relieve that pain. That way, they'll see testing as a way to save work rather than create more of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, I think the issue may be with this part:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;TDD and BDD have high upfront setup costs in ... thinking up test cases for all the various scenarios.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you are spending time thinking of test scenarios, you're doing TDD wrong. You should never just take time to think of test cases. You should think about how you want each new piece of code to behave, and then testing should be a way of writing down how you want it to behave. That's just good planning, and you should be thinking about that anyways.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-22T15:00:19.523" LastActivityDate="2017-06-22T15:00:19.523" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="963" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T14:58:10.963" Score="4" Body="&lt;p&gt;I agree that learning to debug code written by someone else is a critical skill, but I do not think it can replace having to write and debug your own code.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing your own code is a critical design exercise and students need to continue to develop their design skills.  Debugging is a critical skill, but if students cannot create and debug efficient code on their own, they will not be able to code independently.&lt;/p&gt;&#xA;" OwnerUserId="1232" LastActivityDate="2017-06-22T14:58:10.963" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="965" PostTypeId="2" ParentId="918" CreationDate="2017-06-22T15:10:39.537" Score="5" Body="&lt;p&gt;I would explain it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, you have to solve problems on your daily basis. It may be a time problem, like &quot;how do I get these five tasks done it just 1 hour?&quot; or &quot;how can I stack these boxes so that they all fit into the cupboard?&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science is in many ways equal to solving these problems, only that the problems are of a little more mathematical and logical manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One rather common problem of computer science is &quot;how do I sort a list of numbers?&quot;. When a person is given this task, he or she will most likely pick out the lowest or highest number first, put it onto the sorted list and continue from the start until no numbers remain in the unsorted list. This is one solution for the sorting problem, and computer scientists often have to solve this task too. As you can imagine, like described above, it will take a relatively long time to sort all the numbers, as you will repeatedly look at all numbers to sort out the lowest / highest one. So one person once thought &quot;how could I solve this problem faster?&quot; and maybe created an algorithm to solve the task for example twice as fast as the original approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solving problems, not only using the most intuitive way which often tends to be very slow, but thinking about a more complex and strategical approach, to get a given task done as fast as possible, this is a major part of computer science.&lt;/p&gt;&#xA;" OwnerUserId="1233" LastActivityDate="2017-06-22T15:10:39.537" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="966" PostTypeId="2" ParentId="927" CreationDate="2017-06-22T15:54:25.907" Score="4" Body="&lt;p&gt;I do tend to review some basic topics at the start of a semester to get a handle on what students have forgotten or never learned completely. After that I don't use class time as I expect students to make some efforts on their own. I teach high school so I may handhold a bit more than a university professor. In my case that means I schedule time for helping students during their free periods or before or after school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional resources, especially for review topics, are often helpful. I don't think that written resources work for everyone. I record a lot of the presentations I give for early topics and make them available for students. Lately I am trying to find videos by other people who, I hope, explain things differently than I do in hopes of reaching different students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An other option is to use peer tutors to help struggling students. Often peers who already understand a topic can make it understandable in ways that would not occur to me.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-22T15:54:25.907" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="967" PostTypeId="2" ParentId="961" CreationDate="2017-06-22T17:19:50.463" Score="6" Body="&lt;p&gt;The whole point of TDD is to try and reduce the number of defects in software. If your students are confident enough to think that they won't benefit from automated testing, fine — but &lt;strong&gt;have some tests prepared&lt;/strong&gt; to run on their code to ensure that it's actually correct. If they fail your tests (which you need not specify in advance), then their solution is not a complete, working one, and they need to go back and figure out what went wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I imagine you could gamify this a little bit if you wanted — &lt;a href=&quot;https://cseducators.stackexchange.com/a/695/2&quot;&gt;I've talked about Codewars before&lt;/a&gt;, which uses 'hidden' unit tests to see if your solution works or not. You could do the same with your students' submissions, but you might not even need to use a framework to do that. You mentioned web services — why not just &lt;a href=&quot;https://en.wikipedia.org/wiki/Black-box_testing&quot; rel=&quot;noreferrer&quot;&gt;black-box test&lt;/a&gt; it a little to see what happens when you put in unusual results — does it fail when it should? You could even try &lt;a href=&quot;https://en.wikipedia.org/wiki/Fuzzing&quot; rel=&quot;noreferrer&quot;&gt;fuzzing&lt;/a&gt; the code to see if completely random nonsense produces the right response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially: &lt;strong&gt;make the costs in the class the same as in industry — defective code is not a valid solution to your assignments.&lt;/strong&gt; In a job, a serious bug might cost your employer a large sum of money. You could emphasise that in your classes, and show them cases where testing has not been done, leading to huge amounts of cost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you follow TDD, you shouldn't really be spending much more time testing, unless your students replace the &lt;em&gt;writing tests before writing code&lt;/em&gt; with just &lt;em&gt;writing code without testing&lt;/em&gt;. Otherwise, surely the costs are very similar in terms of time if the tests get written either way? That is, of course, ignoring the productivity benefits of having tests that you can rely on while writing your code, so TDD might even be &lt;em&gt;quicker&lt;/em&gt;!&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-22T17:19:50.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="968" PostTypeId="2" ParentId="868" CreationDate="2017-06-22T17:26:34.223" Score="1" Body="&lt;p&gt;Coding is like writing an instruction or assembly manual for a product.  Tell your parents its like them writing a manual for assembling something like a bicycle.&lt;/p&gt;&#xA;" OwnerUserId="1247" LastEditorUserId="27" LastEditDate="2017-06-22T17:30:10.853" LastActivityDate="2017-06-22T17:30:10.853" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="969" PostTypeId="2" ParentId="400" CreationDate="2017-06-22T17:40:20.233" Score="2" Body="&lt;p&gt;Here is an amusing exercise.  Have your students build an API for extended precision rational arithmetic, BigFraction.java.  Ask them to javadoc it and to have all of the basic goodies (toString, equals, add, subtract, multiply, divide, pow, etc).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now take these APIs and assign as second project:  Solve some problems with BigFraction (compute harmonic numbers, bernoulli numbers, etc) using another student's .class file (no they can't see the code) and their javadoc.   This often has entertaining results and it cements the idea that documenting programs enhances their usefulness.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-22T17:40:20.233" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="970" PostTypeId="2" ParentId="146" CreationDate="2017-06-22T17:51:31.893" Score="15" Body="&lt;p&gt;I've &lt;em&gt;got&lt;/em&gt; to jump in here and talk about my experience having to help a former boss understand why the project he wanted to do wasn't possible in the time available. It came down to incompatible data types and he just couldn't see why I couldn't convert from one to the other (he wanted to do real-time motion capture using an XBox Kinect to animate a 3D mesh of the circulatory system and thought &lt;a href=&quot;https://xkcd.com/1425/&quot; rel=&quot;noreferrer&quot;&gt;this was easy&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ben I.'s answer touches on this too, but I can add to it.  He says this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The objects keeps track of some kind of information (instance variables), can be interacted with only in specified ways (interface), have setters (switch/button) and a getters (lights, your eyes).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There's more to it than that.  In this electrical engineering paradigm (which should be familiar to most), a light switch that has two states is the most basic example.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has output: &lt;code&gt;bool isOn()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;It has a method of supplying input: &lt;code&gt;toggle()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Underneath it has an implementation of what &lt;code&gt;toggle()&lt;/code&gt; does and how that affects the return value of &lt;code&gt;isOn()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Buttons can also be described in this manner:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has output: &lt;code&gt;bool isOn()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;It has a method of supplying input: &lt;code&gt;push()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Underneath it has an implementation which differs from &lt;code&gt;Switch&lt;/code&gt; slightly: after &lt;code&gt;push()&lt;/code&gt; is called the output is &lt;code&gt;true&lt;/code&gt; for a short duration, then automatically returns to &lt;code&gt;false&lt;/code&gt;. That is, the user must continue to interact with the button in order for the output to be true.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A knob also has similar features, although different types are involved:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has output: &lt;code&gt;float getValue()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;It has input: &lt;code&gt;twistTo(float v)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Underneath it has an implementation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But here's where it gets interesting:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens if we define an object that implements &lt;em&gt;both&lt;/em&gt; &lt;code&gt;Knob&lt;/code&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;code&gt;Button&lt;/code&gt;? We should expect the following description:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has output: &lt;code&gt;float getValue()&lt;/code&gt;,&lt;code&gt;bool isOn()&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;It has input: &lt;code&gt;twistTo(float v)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Underneath it has an implementation&lt;/li&gt;&#xA;&lt;li&gt;After input is supplied, &lt;code&gt;isOn()&lt;/code&gt; becomes true, then after a duration becomes false again. In order to keep &lt;code&gt;isOn()&lt;/code&gt; returning true forever, we must continue interacting with the object.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What do we end up with?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/YVp2z.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/YVp2z.png&quot; alt=&quot;A timer switch&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can twist it to set the value, which turns the output on and displays the value. Then after a duration &lt;em&gt;defined by that value&lt;/em&gt; it turns itself off again. As the homeowner we don't care &lt;em&gt;how&lt;/em&gt; it was implemented only that they can interact with it in a certain way (defined by those interfaces) to get the desired behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And yes, I'd present that to students in that manner. Describe the simple items (button, toggle, knob, timer) and then ask the students to figure out what happens when two of them are combined. The epiphany moment when it clicks will do wonders. That's the difference between being told and being taught.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can expand on this analogy quite far, as well: Three-way switches, time-locks, missile launch confirmation (you need to press two buttons at the same time), sliders, gauges...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then...you can get to events. Instead of treating the wires in the analogy as hard links in code (&lt;code&gt;while(switch.isOn()) { ... }&lt;/code&gt;), you can treat them as events: when the switch changes state, that update propagates to all objects listening for it and they handle the state change as &lt;em&gt;their&lt;/em&gt; implementation dictates (&lt;code&gt;switch.addListener(this.doWhenToggled)&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classic &quot;cats are felines, felines are mammals, mammals are animals&quot; hierarchy only gets you so far and provides a very poor and rigid understanding of Object Oriented Programming that causes new programmers to tend towards Do-Everything Objects (where do float planes fit in the &quot;boat extend vehicle, plane extends vehicle&quot; hierarchy? Clearly the only solution is to make all &lt;code&gt;vehicles&lt;/code&gt; drive, fly, and float and just disable the ones we don't need!) rather than through a composition of interfaces (say, &lt;code&gt;FloatPlane extends BaseAircraft implements IWaterCraft&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that sort of thinking messed &lt;em&gt;me&lt;/em&gt; up for a number of years. Heck, I'm &lt;em&gt;still&lt;/em&gt; recovering from it: I still can't read inline lambda expressions natively, I have to decompose them, and it often takes me several minutes. Same thing goes for creating interfaces, I often have to go the &quot;cats are felines&quot; road until I hit a spot where I realize &quot;I want to use this code on both cats &lt;em&gt;AND&lt;/em&gt; cars&quot; because they both share some property that doesn't exist in the common class (and shouldn't) and I have to refactor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, refactoring is a good thing. Give your students a powerful IDE and teach them how to use the refactoring tools. Eclipse is the &lt;em&gt;god&lt;/em&gt; of these , offering an astounding &lt;em&gt;fourteen&lt;/em&gt; different options, including &quot;Extract Interface&quot; and &quot;Use base type where possible.&quot;  Even if they make a mistake, now they know how to fix it in moments rather than hours. No one wants to (and no one will) spend hours fixing an inheritance problem that can be solved by a quick copy and paste; &quot;code duplication, meh, never hurt me.&quot;&lt;/p&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2017-06-22T17:51:31.893" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="971" PostTypeId="2" ParentId="918" CreationDate="2017-06-22T18:04:46.537" Score="6" Body="&lt;p&gt;I'll attempt a self-answer here, based on hindsight and a few previous experiences where I went in knowing I wanted to do this.&lt;/p&gt;&#xA;&lt;p&gt;I've found that starting off with an analogy helps a lot of the time. Friends and co-workers have reported similar results in my super unscientific poll. The one we use is along the lines of&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Computer science has as much to do with programming as architecture has to do with bricklaying&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;CS is to coding as astronomy is to telescopes&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It can be helpful to try to make the analogy with the listener's own profession, as long as it doesn't backfire by derailing the conversation.&lt;/p&gt;&#xA;&lt;p&gt;This then leads into&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Computer science is an academic field. It's theoretical. Programming is more practical; it's a tool.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In my story above, I segued from this into the Halting Problem and efficiency. Looking back, I think that was too big of a jump, at least when presented as abstract concepts. I like the phone book example mentioned in &lt;a href=&quot;https://cseducators.stackexchange.com/a/932/1166&quot;&gt;Peter's answer&lt;/a&gt;. I think I'd modify it this way:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;One big part of computer science is &amp;quot;algorithms,&amp;quot; which is a fancy word for &amp;quot;figuring out a good way to do things.&amp;quot; A good example of this is finding someone's number in the phone book. You could just open the book to random places and hope you get lucky. You could start on page one and start reading straight through until you find the person you want. You could take advantage of the alphabetical sorting and index to see what page the people with similar names start on.&lt;/p&gt;&#xA;&lt;p&gt;Using the index is clearly smarter than repeatedly picking random pages. Coming up with these better ways to do things; that's computer science. The details get really complicated (and are a big part of the field) but it turns out that what seem like small differences in efficiency, or memory usage, or other factors like that, can make a &lt;strong&gt;huge&lt;/strong&gt; difference how good an algorithm is in the real world.&lt;/p&gt;&#xA;&lt;p&gt;Now, once you have the plan, you might want to tell someone else how to do it. I could tell someone the exact same phone book search plan in English, or Spanish, or Hindi. I could tell a computer how to do it in C++, or Java, or Ruby. Programming is just a way of communicating instructions to a computer, the same way human languages are a way of communicating information to other people.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The downside of this answer is that it doesn't get into the mathematical foundation of CS, or how CS is about unchanging fundamental concepts. But I'm beginning to think that's not a big problem... such topics might be beyond the scope of a five-minute intro for a complete layperson.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-22T18:04:46.537" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="972" PostTypeId="2" ParentId="927" CreationDate="2017-06-22T19:13:55.747" Score="6" Body="&lt;p&gt;I face the same issue every year. In France where I teach, University is basically free and, in some bachelor curricula you can repeat the year and re-enrol in courses you have not validated as much as you like (almost).&#xA;At some point, there is little that the &lt;strong&gt;teacher&lt;/strong&gt; can do.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Allocating say the first lecture and first lab to rehash the basics works for some students (those who are willing to get better). Actually grading this first lab might be an incentive to have the student work on it.&lt;/li&gt;&#xA;&lt;li&gt;Asking them to re-enrol in a prerequisite course does not work so well since it means that it increases the workload and they only touch the interesting concepts at the end of the semester, and mean while they continue to fail in your course.&lt;/li&gt;&#xA;&lt;li&gt;In some cases, I have seen  students genuinely becoming better when they are paired with a good student and that the latter actually takes the time to explain what's going on, like a private tutor. But that is more a result of the guidance of the good student than something the teacher does, and I think a teacher should not expect a good student to act as a tutor. But favouring this kind of  pairing (by making it explicit in the grading that a student &quot;helping&quot; another one may get a bonus) could work. Such grading say for a project needs to be devised carefully though.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ultimately, this is something that needs to be addressed at the level of the degree itself, for all courses. For any course, 10/20 (or whatever passing grade) should only mean, &lt;strong&gt;this student actually knows the bare minimum to enrol in next years courses&lt;/strong&gt;. This needs to be a curriculum-wide decision. But it can be hard in some countries since often courses are aggregated in &quot;blocks&quot; and you can pass as long as the average on a block is a passing grade (while you may very well have failed a course in the block). At his/her level, the only thing a teacher can do is to be stricter and rather fail borderline students than pass them (so as to not send these &quot;sure to fail&quot; students to more advanced courses yet).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2017-06-22T19:13:55.747" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="973" PostTypeId="1" AcceptedAnswerId="989" CreationDate="2017-06-22T19:22:19.977" Score="24" ViewCount="11766" Body="&lt;p&gt;I teach my freshmen Binary because I'm old school I guess. I do want them to know how data is stored and that means Binary to me. How do others feel? Is it a &lt;em&gt;must learn early&lt;/em&gt; or a &lt;em&gt;nice to have if there is room?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="541" LastEditorUserId="104" LastEditDate="2017-06-22T23:29:02.747" LastActivityDate="2021-12-20T22:55:39.757" Title="How important is learning Binary for first-year college students?" Tags="|curriculum-design|" AnswerCount="12" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="974" PostTypeId="2" ParentId="860" CreationDate="2017-06-22T19:33:30.740" Score="3" Body="&lt;p&gt;First and foremost, don't let &lt;em&gt;your feeling&lt;/em&gt; about &lt;em&gt;their feelings&lt;/em&gt; affect your judgement.  It seems to me that most kids want to learn new things, they want to be 'beta testers' and on the cutting edge.  Visual programming is something relatively new, let them be an early adopter as this new form of programming matures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More importantly though, programming isn't about the &lt;em&gt;process&lt;/em&gt; of programming.  Programming is about &lt;strong&gt;accomplishing a goal&lt;/strong&gt;. We can use different programming 'tools' to accomplish our goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different languages make the process easier just like having a screw driver gets a screw in the wood easier than using an awl. And planing is easier with a planer than with a claw hammer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps instead of convincing them what is better, have them do various exercises and let them choose their own tool set.  Of course the exercises should do something interesting and in some or most cases allow the visual tool to save time. The grade should be given on the finished product - not which tool was used to accomplish the goal.  If you have short exercises, have them do them in class and when the visual tool is faster, those students will be done sooner. Let them decide how they want to spend their time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember the goal - it isn't just to learn a language, it is to teach students how to make good decisions and (hopefully) those lessons carry over into everyday life.&lt;/p&gt;&#xA;" OwnerUserId="1252" LastActivityDate="2017-06-22T19:33:30.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="975" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T19:42:23.013" Score="3" Body="&lt;p&gt;In an Introductory class I would hope to see it at least mentioned. As they get deeper into a CS curriculum then they should become more adept at moving between Binary, Hex and Decimal (as well as Ascii, UTF-8, etc.) so that they have an understanding of how the computer they code for consumes their code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll need to structure it so you don't get too derailed. Binary can be a course unto itself as you shift into math, even Big vs Little endian can cause headaches early on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also mentioned &quot;storage&quot;. Both Text and &quot;binary files&quot; (think EXE, SO, DLLs etc.) have OS variations that you could look at. Perhaps you meant over the wire; so more XML, JSON, and/or HTTP - all interesting aspects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd advise keeping it on topic, focused, and clearly understandable by your audience.&lt;/p&gt;&#xA;" OwnerUserId="35" LastActivityDate="2017-06-22T19:42:23.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="976" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T19:44:04.863" Score="14" Body="&lt;p&gt;In the engineering world, being able to read, understand, debug and add on to existing code is MUCH more valuable skill than writing code from scratch.  Too often, programmers will opt to rewrite a block of code from scratch rather than (or being intimidated by) spending the time to understand the existing code.  This leads to re-introducing bugs that have already been fixed before - not in the code itself, but in the understanding of ALL of the requirements of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a tip for those programmers - if your code seems much simpler, there is a good chance you left out something important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I would vote for putting the emphasis on students learning to read, understand and then debug or augment existing code.&lt;/p&gt;&#xA;" OwnerUserId="1253" LastActivityDate="2017-06-22T19:44:04.863" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="977" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T20:13:17.737" Score="6" Body="&lt;p&gt;When teaching first year CS students, I very briefly touch on Binary -- basically just explaining that 1 means on, 0 means off, and what it means to have a number of base X (i.e. I go over why Decimal numbers work the way they do in relation to Binary).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this depends greatly on the curriculum at your institution, but I have never found students to struggle later in their education due to someone skimping on Binary their first year -- as such, I err on the side of letting them explore it deeper in subsequent classes.&lt;/p&gt;&#xA;" OwnerUserId="1099" LastActivityDate="2017-06-22T20:13:17.737" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="978" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T20:29:12.500" Score="5" Body="&lt;p&gt;In my experience, kids need a second exposure to binary before it starts to really sink in. During sophomore and junior years, we use binary heavily for certain key moments at my school, so that freshman exposure is absolutely vital.  I still have to present it a second time when they are sophomores, but I can only imagine how much harder all of that material would be without the benefit of covering it the first time.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-22T20:29:12.500" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="979" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T20:40:28.983" Score="2" Body="&lt;p&gt;During my 4 years of school debugging was never taught to us. We were only quickly shown that if we get an error, set a break point, see where it breaks and you know &#xA;where the error is. Looking back, I can understand why we didn't cover debugging and it was because there was so much material to teach that there just was not any time to cover it. &#xA;As a student, struggling to learn all the new concepts provided, I appreciated the fact that I did not have to learn another concept, especially one that required one to understand&#xA;the IDE I was using. I agree that debugging is a necessary skill for programming but I don't think it should be a requirement. I think the teacher should drill debugging into the&#xA;student’s heads by making it a part of their own routine. When teaching a lecture, as an example, if you declare all your class properties before typing out the methods, this is a habit &#xA;that students notice and will copy. Once you are done typing your class, instead of creating another class, why not set a few break points, and run the app. Show your students how you&#xA;are stepping through the methods and making sure you are getting the correct output. This workflow will teach the students that the debugger is not only for errors but it is&#xA;a common practice for a programmer to write piece by piece.&lt;/p&gt;&#xA;" OwnerUserId="1255" LastActivityDate="2017-06-22T20:40:28.983" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="980" PostTypeId="2" ParentId="952" CreationDate="2017-06-22T20:40:46.930" Score="7" Body="&lt;p&gt;I tend to think that CS education should be done in multiple stages (to be repeated as the students progress in skill):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;teach them theory&lt;/li&gt;&#xA;&lt;li&gt;show them good code&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;as an example&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;have them write code&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it's implied that they will need to do SOME debugging to &quot;evolve&quot; their code to a working state&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;have them debug others' not-so-good code&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Start with the theory.  Once they start to understand that, show them good examples.  Many folks learn well by example; this helps them &quot;solidify&quot; their understanding of the theory and gives them some idea of how it SHOULD look / work.  Then, get them writing code; no amount of theory and example can replace this.  After all that, start showing them some not-so-good code to debug and clean up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember the famous quote by Brian Kernighan:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Tackling complex debugging, when they haven't developed enough skill yet, will be overly-challenging.  Let them build some proficiency THEN start building the debugging skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would agree that good debugging skills are critical.  A quote from Maurice Wilkes:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;By June 1949 people had begun to realize that it was not so easy to get programs right as at one time appeared. I well remember when this realization first came on me with full force.&#xA;  The EDSAC was on the top floor of the building and the tape-punching and editing equipment one floor below. [...] It was on one of my journeys between the EDSAC room and the punching equipment that &quot;hesitating at the angles of stairs&quot; the realization came over me with full force that a good part of the remainder of my life was going to be spent in finding errors in my own programs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I wish I could say that my career was different.  The only difference is that much of the code I maintain is written by others.  A good part of the remainder of MY life will be spent finding errors in my own programs AND those of others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they've developed good debugging skills on one &quot;level&quot; of programming complexity, repeat the cycle for the next level.  Consider debugging skills the &quot;boss challenge&quot; before they've &quot;leveled up&quot; and are ready for the next skill level.&lt;/p&gt;&#xA;" OwnerUserId="948" LastEditorUserId="948" LastEditDate="2017-06-23T20:01:27.650" LastActivityDate="2017-06-23T20:01:27.650" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="981" PostTypeId="2" ParentId="961" CreationDate="2017-06-22T21:16:18.947" Score="2" Body="&lt;p&gt;The first mistake teachers usually make is not changing the point of view:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unittests should be recognizes as &quot;verifies &lt;em&gt;what my code does&lt;/em&gt;&quot; and &lt;strong&gt;not&lt;/strong&gt; as  &quot;verifies my code &lt;em&gt;is right&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unittests are &lt;em&gt;executable specification&lt;/em&gt;. With your set of unittests you can &lt;em&gt;prove&lt;/em&gt; which parts of the requirements you really implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to teach that to students could be like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split you students in teams of two.&lt;/li&gt;&#xA;&lt;li&gt;give each team a separate task to implement. This task should be too big to be completed.&lt;/li&gt;&#xA;&lt;li&gt;force half of the teams to do TDD, let the others go without tests.&lt;/li&gt;&#xA;&lt;li&gt;at the last day let the teams change their results so  that TDD teams get the task of another TDD team and the &quot;no tests&quot; teams also change their results.&lt;/li&gt;&#xA;&lt;li&gt;let the teams work on the inherited project for half a day.&lt;/li&gt;&#xA;&lt;li&gt;after haft of the day do the same change as in the morning but this time give the TDD teams a &quot;no tests&quot; project and vice versa. &lt;/li&gt;&#xA;&lt;li&gt;Let them start with the same project state as in the morning and complete this newly inherited project. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The lessons leaned will be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;without the unittests you first have to learn what the code already does by &lt;em&gt;manually&lt;/em&gt; testing it. This is some effort even for small projects. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;with unittest in contrast you can simply &lt;em&gt;read&lt;/em&gt; what the code already does and start implementing new behavior right away.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1256" LastActivityDate="2017-06-22T21:16:18.947" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="982" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T21:18:40.637" Score="27" Body="&lt;p&gt;I see no reason to teach binary in an &lt;em&gt;introductory&lt;/em&gt; programming class. It is not generally needed (see exceptions below) when programming in high-level languages, which is usually what is taught to freshmen students. If you have extra time in your course, rather than introducing binary, why not introduce them to other areas of CS that freshmen don't usually see, such as human-computer interaction, algorithms, computing history, Moore's Law, assistive technology, internationalization, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach binary when there's a need to: in Computer Architecture, which is a required (2nd- or 3rd-year) course in our undergraduate CS minor and major. It is absolutely necessary in that class, to understand how processors work, how caches work, and how numbers and Unicode characters are represented. I don't teach Computer Networks but could imagine its being taught there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a curriculum does not include Computer Architecture, students should still learn enough about binary numbers and floating point encoding so they know why floating-point arithmetic is inexact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If/when you do teach binary, teach them how to count on their fingers in binary.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/mRXBu.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/mRXBu.jpg&quot; alt=&quot;Illustration of counting in binary on fingers&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I give extra credit in Computer Architecture for counting up to 31 on one hand. Just be careful...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/6HVee.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/6HVee.gif&quot; alt=&quot;Cartoon in which teacher demonstrating binary on his hands is disciplined for giving students the finger&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;http://www.smbc-comics.com/?id=2807&quot; rel=&quot;noreferrer&quot;&gt;this cartoon&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-25T14:05:14.867" LastActivityDate="2017-06-25T14:05:14.867" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="983" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T21:38:42.720" Score="3" Body="&lt;p&gt;Understanding binary, hex, and octal numbers contributes to insight on the workings of computers, although octal numbers are fading in importance in comparison to hex numbers.  Here are a few reasons&lt;/p&gt;&#xA;&#xA;&lt;p&gt;File permissions are managed with octal digits.  The command&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod 644 file.txt&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;uses three octal digits to set the visibility of the file.  (4 read, 2 write, 1 execute so the 6 means read/write for the user and the 4s mean read permission for the group and others)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Colors are represented by hex codes; a color and its transparency are represented in a 32 bit integer (8 bits for red, green, blue, and alpha [transparency]. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Memory addresses are output as hex code. It is indispensable for every beginning programmer to be aware of the meaning of memory addresses.  Note that Python and Java variables are basically..... pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hex and octal numbers are conveniences for humans because they shorten a number's representation.  Everything stored in the computer and the file system consists of one-dimensional streams of bits.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-06-22T21:38:42.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="984" PostTypeId="2" ParentId="961" CreationDate="2017-06-22T21:50:46.183" Score="6" Body="&lt;p&gt;Give an assignment to write a function or class, and give stub code that includes tests. Initially all the tests fail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the students know that these and other similar tests will determine score of their assignment. Encourage students to write further tests if they want to know their code is correct.&lt;/p&gt;&#xA;" OwnerUserId="1172" LastEditorUserId="27" LastEditDate="2017-06-22T22:00:05.247" LastActivityDate="2017-06-22T22:00:05.247" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="985" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T22:14:52.887" Score="4" Body="&lt;p&gt;Binary is ESSENTIAL for designing digital logic, so be sure to include it for students who plan to become electronic engineers working in digital design. &lt;/p&gt;&#xA;" OwnerUserId="1264" LastActivityDate="2017-06-22T22:14:52.887" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="986" PostTypeId="2" ParentId="948" CreationDate="2017-06-22T23:24:54.697" Score="2" Body="&lt;p&gt;First, try setting up some sort of &quot;coding hangout time&quot; - you and her can practice coding together. You can help her when she gets stuck, and encourage her. It's always good to have a buddy in what you're doing =)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, start with the right things. Try a little visual programming first, using hour of code programs, or a language like Python, which will teach good practice (indentation, etc) and remove worries like memory control, which make it harder for new learners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, start small. The classic hello world program in Python is literally &lt;code&gt;print(&quot;Hello world!&quot;)&lt;/code&gt;. From there, maybe go to things like adding, or using variables. I particularly enjoy &lt;a href=&quot;https://www.codecademy.com/learn/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codecademy's&lt;/a&gt; course - problems with instructions. And remind her that you'll be willing to help when you have time, and so will people on sites like stack exchange (Codecademy also has a forum, though I haven't really used it). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To conclude - show, don't tell. Don't tell her she can code, show her she can code.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-22T23:24:54.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="987" PostTypeId="2" ParentId="973" CreationDate="2017-06-22T23:34:03.377" Score="12" Body="&lt;p&gt;I introduce binary on Day 1 (if not Day 0). However, in my class, &lt;strong&gt;learning binary is not an end in and of itself: it is a means for understanding the fundamental concept of abstraction.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teacher of AP CS Principles, I follow the College Board standards for the course. In that sense I have to teach binary, decimal, and hexadecimal, and conversions between and among them. The first &quot;Enduring Understanding&quot; under &quot;Big Idea 2 - Abstraction&quot; focuses on digital representation of data:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Students will understand that...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;EU 2.1&lt;/strong&gt; A variety of abstractions built on binary sequences can be used to represent all digital data.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Having taught them binary, we can discuss storage limitations of different data types, floating-point imprecision (as Ellen mentioned), use cases for different bases such as octal and hexadecimal, and file signatures, among many other topics. We use &lt;code&gt;xxd&lt;/code&gt; to investigate a bitmap (and dive deeper into color representation) and to examine the metadata stored in pictures taken on a cell phone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do I think binary-for-binary's sake is worth it? Probably not. It's a lot of work for not a huge pay-off for a beginner programmer, and it's easy enough to look up a binary-decimal converter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it worth it to understand binary in terms of the larger context of abstraction and to be comfortable occasionally looking at and deciphering representations of it (along with octal or hex)? &lt;strong&gt;Absolutely. It's how all digital data is represented, and the groundwork should be there in some form from the start.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-22T23:34:03.377" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="989" PostTypeId="2" ParentId="973" CreationDate="2017-06-23T03:57:08.950" Score="25" Body="&lt;p&gt;Binary is fundamental to programming, but this has a lot more to do with &lt;em&gt;logic&lt;/em&gt; than just with data storage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computers work on &quot;yes greater than no&quot; or &quot;no greater than yes.&quot;  There are only two choices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Boolean logic has only two truth values, &quot;true&quot; or &quot;false.&quot;  Boolean logic is fundamental to computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In more advanced CS subjects such as information theory or security, you have such a concept as &quot;bits of entropy.&quot;  On a theoretical conceptual level this has nothing to do with data storage or even number systems and has everything to do with actual binary mathematics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do anything with hardware, boolean logic and binary become essentially intertwined and totally indispensable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, if you are typing on a computer or doing &lt;em&gt;anything with text, ever, ever,&lt;/em&gt; on computers, you are dealing with character sets.  As a programmer there are &lt;a href=&quot;https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/&quot; rel=&quot;noreferrer&quot;&gt;certain things that you MUST KNOW about character sets&lt;/a&gt;.  :)  Understanding those things requires a grasp of using bits and bytes to store data, and how much information can be stored in them (256 distinct bytes), which goes back to information theory.  And also finally comes to data storage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can abstract away the hard stuff sometimes, but you're teaching &lt;strong&gt;Computer Scientists.&lt;/strong&gt;  Not part-time kiddie hackers who don't know or care how the magic happens.  Do you want them using &lt;a href=&quot;https://www.joelonsoftware.com/2001/12/11/back-to-basics/&quot; rel=&quot;noreferrer&quot;&gt;Shlemiel the painter's algorithm&lt;/a&gt; due to their ignorance?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, &lt;a href=&quot;https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/&quot; rel=&quot;noreferrer&quot;&gt;all abstractions are leaky&lt;/a&gt;.  And binary isn't even an implementation detail.  It's &lt;em&gt;totally fundamental&lt;/em&gt; to understanding computers at &lt;em&gt;any&lt;/em&gt; level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't imagine teaching Boolean logic without teaching binary, or teaching binary without teaching Boolean logic.  As for the actual binary place value system, it's really not that hard.  I've taught this stuff successfully to seven year olds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hex and octal are less mandatory but provide useful comparison and contrast to help understand the binary place value system itself.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: Binary is a &lt;em&gt;must learn early&lt;/em&gt; in CS and any related subject.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't be like the handwriting teacher teaching &quot;traveling ovals&quot; for months and months when his students can't even write their own names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's have some &lt;em&gt;professional&lt;/em&gt; computer scientists who know their basics rock solid, please.  :)&lt;/p&gt;&#xA;" OwnerUserId="1103" LastActivityDate="2017-06-23T03:57:08.950" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="991" PostTypeId="2" ParentId="973" CreationDate="2017-06-23T06:10:52.240" Score="2" Body="&lt;p&gt;I feel it is important to know binary. Some students find it enjoyable (and some might even use it in their projects to encode and decode custom data) and those who don't simply ignore it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's good to teach it because a) it gives students the notion of how computers actually work (they know it works with electricity, so 0 is low current, 1 is high current) and b) it's useful in coding, as they can use it to serialize data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, if there's time, teaching &lt;em&gt;how it can be used&lt;/em&gt; is good, and not only &lt;em&gt;what it is&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-23T06:10:52.240" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="992" PostTypeId="1" CreationDate="2017-06-23T14:09:21.110" Score="10" ViewCount="329" Body="&lt;h1&gt;Context&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The main consensus in most compsci programs I have been at is that a sizable amount of students is inherently unable to learn how to code. &lt;a href=&quot;https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/&quot; rel=&quot;noreferrer&quot;&gt;An old entry on Jeff Atwood's blog&lt;/a&gt; summarizing the issue cites &lt;a href=&quot;http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf&quot; rel=&quot;noreferrer&quot;&gt;this 2006 article by Saeed Dehnadi and Richard Bornat&lt;/a&gt;, claiming:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Formal logical proofs, and therefore programs – formal logical proofs that particular computations&#xA;  are possible, expressed in a formal system called a programming language – are &lt;em&gt;utterly meaningless&lt;/em&gt;.&#xA;  To write a computer program you have to come to terms with this, to accept that whatever you&#xA;  might want the program to mean, the machine will blindly follow its meaningless rules and come to&#xA;  some meaningless conclusion. In the test the consistent group showed a pre-acceptance of this fact:&#xA;  they are capable of seeing mathematical calculation problems in terms of rules, and can follow those&#xA;  rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning&#xA;  where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal&#xA;  with it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It even goes on as to propose some of the prospective students to be advised away from compsci courses:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;7 Conclusion&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;There is a test for programming aptitude, or at least for success in a first programming course. We&#xA;  have speculated on the reasons for its success, but in truth we don’t understand how it works any&#xA;  more than you do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Today, I found a &lt;a href=&quot;http://www.eis.mdx.ac.uk/staffpages/r_bornat/papers/camel_hump_retraction.pdf&quot; rel=&quot;noreferrer&quot;&gt;retraction from Richard Bonat&lt;/a&gt;, claiming his conclusions were affected by his mental health issues:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;2 How it happened&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;Though it’s embarrassing, I feel it’s necessary to explain how and why I came to write “The camel has two&#xA;  humps” and its part-retraction in (Bornat et al., 2008). It’s in part a mental health story.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In autumn 2005 I became clinically depressed. My physician put me on the then-standard treatment for&#xA;  depression, an SSRI. But she wasn’t aware that for some people an SSRI doesn’t gently treat depression,&#xA;  it puts them on the ceiling. I took the SSRI for three months, by which time I was grandiose, extremely&#xA;  self-righteous and very combative – myself turned up to one hundred and eleven. I did a number of very&#xA;  silly things whilst on the SSRI and some more in the immediate aftermath, amongst them writing “The&#xA;  camel has two humps”. I’m fairly sure that I believed, at the time, that there were people who couldn’t learn&#xA;  to program and that Dehnadi had proved it. The paper doesn’t exactly make that claim, but it comes pretty&#xA;  close. Perhaps I wanted to believe it because it would explain why I’d so often failed to teach them. It was&#xA;  an absurd claim because I didn’t have the extraordinary evidence needed to support it. I no longer believe&#xA;  it’s true.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h1&gt;Question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I've been a TA for compsci courses in three colleges and, in all of them, &lt;em&gt;transparency&lt;/em&gt; was a core value: past exams, classes, and &lt;strong&gt;grades&lt;/strong&gt; were made available from the very beginning. Failure rates were never lower than 30%, often beating failure rates for subjects widely regarded as more difficult, such as physics or calculus. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the one hand, some students might feel discouraged to put in the effort to learn knowing that they have a high likelihood of failing. On the other hand, it might be beneficial for them to know hiccups are expected and perhaps compsci might not be the way for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions are: do students benefit from knowing most of them will likely fail the subject? Should they be informed that there might be a high chance they won't advance past CS101?&lt;/p&gt;&#xA;" OwnerUserId="78" LastEditorUserId="58" LastEditDate="2017-07-13T16:28:23.263" LastActivityDate="2017-08-22T04:03:08.720" Title="Can sharing learning stats be beneficial to guide beginner students?" Tags="|best-practice|student-motivation|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="993" PostTypeId="2" ParentId="992" CreationDate="2017-06-23T14:48:13.273" Score="5" Body="&lt;p&gt;We had a question recently that also touched on some of these &lt;a href=&quot;https://cseducators.stackexchange.com/questions/756/do-you-see-the-bimodal-distribution-too&quot;&gt;same issues&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a fan of expressing that the material can be difficult, as it sets the tone and prepares students to work hard in a course. However, if failure rates are as high as you suggest, then that suggests something is going seriously wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For context, I teach at a high school where kids apply during 8th grade into 4-year majors. They are tested in math and literacy, and we interview them to see if they are generally engaged kids. We do not evaluate them on programming or CS background, because most of the 8th graders have none.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If accepted, they cannot change their major at any point. That means that our CS kids will have a 4 year CS curriculum that builds upon itself, and it gives us teachers a very powerful motivation not to lose kids at the beginning. It simply isn't a viable option. A freshman who gets lost will probably remain lost for their next 3 years in the school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not every kid remains enthusiastic  about CS. That's okay! They applied to the school when they were quite young, and many move on to other interests.  However, over the last 3 years, we have had exactly one student not pass the AP test as a sophomore, and that student was dealing with significant mental health challenges that also brought about high absenteeism.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, a university program is not under the same constraints, and not every student at every institution can be classified as &quot;gifted&quot; (whatever that actually means), so I can absolutely accept that our results might be an outlier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, virtually everybody &lt;em&gt;can&lt;/em&gt; learn to code. It comes down to what work the student puts in, and how well the instructor breaks down the concepts and designs the course materials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My general advice to achieve high passing rates is to create good supporting materials to use with kids who struggle, and to break things down (and make connections explicit) far beyond what you would think you would need to. I know that that advice is quite vague!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you are ever unsure about how to break down an idea really clearly, ask around. &lt;em&gt;(Heck, I could tell you about this one website devoted completely to getting answers to the problems of CS educators ... ;-)&lt;/em&gt; But please don't accept a 30% failure rate as the norm, or even as acceptable. So much more is possible!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-23T14:48:13.273" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="994" PostTypeId="5" CreationDate="2017-06-23T15:40:15.390" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-23T15:40:15.390" LastActivityDate="2017-06-23T15:40:15.390" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="995" PostTypeId="4" CreationDate="2017-06-23T15:40:15.390" Score="0" Body="The Arduino is a microcontroller often used in robotics or hobbyist projects. It has multiple ports for sensors and electronics to be attached and can also be programmed using a derivative of C. Questions using this tag should ask about using it in the classroom; questions about the workings of the Arduino should go to Arduino Stack Exchange." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-23T19:11:15.327" LastActivityDate="2017-06-23T19:11:15.327" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="996" PostTypeId="5" CreationDate="2017-06-23T15:41:55.800" Score="0" Body="&lt;p&gt;Instructors can evaluate and assess the work of students in many ways, formal and informal. Assessment may lead to marking/grading or be used in counseling and advising students. Assessment can result in numeric/comparative measures or in written or spoken advice to the student. Work can be assessed by the instructor or by the student's peers, such as members of a group. Assessment can be done orally or via written work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Importantly, an assessment evaluates the work of the student, not the student him or herself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tests, are only one form used to assess the knowledge of students. Questions using this tag can ask about practices for creating or giving assessments of various types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag should not be used for course evaluation or assessment of instructors. There is an alternate tag, &lt;a href=&quot;/questions/tagged/tests&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;tests&amp;#39;&quot; rel=&quot;tag&quot;&gt;tests&lt;/a&gt; that focuses on the narrower forms of assessment. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2018-04-15T18:48:06.363" LastActivityDate="2018-04-15T18:48:06.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="997" PostTypeId="4" CreationDate="2017-06-23T15:41:55.800" Score="0" Body="Assessment is the process of evaluating student work. It can take the form of tests and exams or be much broader. It can be formal or informal and can be a component of grading or can be disjoint from formal evaluations. This is distinct from evaluating the course itself or its instructor(s). " OwnerUserId="919" LastEditorUserId="1293" LastEditDate="2018-04-15T18:41:30.167" LastActivityDate="2018-04-15T18:41:30.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="998" PostTypeId="2" ParentId="952" CreationDate="2017-06-23T16:22:41.613" Score="3" Body="&lt;p&gt;I've been a software engineer for over 25 years and in my opinion, the two skills are just different.  What you need to know and how you spend your time is very different when conceiving of a new design or code, or fixing something that exists. The two are both required to some extent on most projects but are very different activities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things about software is that there are usually 2, 3, or maybe 10 different ways to do the same thing.  Inevitably opinions will vary about what is &quot;best&quot; and there is often no single &quot;best&quot; because there are trade-offs and questions of style, and often several similar technologies that can achieve the same result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most people prefer to write new code because it's more &quot;fun&quot; and they get to learn and do the things the way they think is best.  It is kind of like building an electric train set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would wager that on an actual software project, code is read or changed 10 time as often as it is written, so about 90% of the time spent is on understanding and debugging.  Debugging is often easier since it does not require as comprehensive knowledge of the technology or code.  Debugging an existing system is often a good way of learning a new technology and is where new team members are usually started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have worked with very smart engineers who just could not stand to fix existing code and every time they were asked to fix something they rewrote it, because their opinions about what was &quot;best&quot; were so strong and rigid.  This in my opinion is self-indulgent and on an actual project where time and money are limited resources it can be very inefficient and wasteful.  Good engineers write good code but good team members know when you just have to fix something and move on vs. when a major overhaul is really needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With all this in mind I think it is important to put existing code in front of students and require them to understand and debug it, not only to get it working correctly but to see how other people do things and what choices other engineers make, and also to understand that on an actual job they'll be expected to fix things fairly efficiently.  They will probably find that they agree with some approaches and disagree with others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the same time students should be in a situation where they must &quot;debug a blank sheet of paper&quot; where they get to do the fun stuff, but then also find that it is very hard to make choices that end up being the right choices for the project long term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way of achieving both goals would be to have all of the students write their own code for part of the project, and then exchange code and problems so that they are then debugging someone else's code, and having their own code debugged.  On a real project this is often done with team code reviews which, if done right, can provide valuable feedback to everyone, both the coder and reviewer.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-23T16:22:41.613" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="999" PostTypeId="2" ParentId="89" CreationDate="2017-06-23T16:43:28.733" Score="3" Body="&lt;p&gt;After reading the answers here I'm left thinking...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about doing classroom code review?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is, have the students take the assignment they've completed, print it out, hand it to someone else, then have the students review the code they now have in front of them.  When everything thinks they're done, have them switch papers &lt;em&gt;yet again,&lt;/em&gt; getting a third set of eyes on things (one coder, two reviewers).  Each reviewer would write their name on it as having reviewed it as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hear tales of how marvelous code review is, but I've never had to participate on it in any sort of official setting (i.e. for a job, as a classroom assignment...) but I think this would be a good way to introduce the concept.  It's often hard to spot mistakes in one's own code, so having to look for errors in someone else's tends to be easier, as well as letting people see alternative approaches to problems (&quot;What's this syntax here, &lt;code&gt;return i&amp;gt;0?list[i]:null&lt;/code&gt;? I've never seen this before&quot;).&lt;/p&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2017-06-23T16:43:28.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1000" PostTypeId="2" ParentId="917" CreationDate="2017-06-23T16:44:28.810" Score="4" Body="&lt;p&gt;I recently completed the &lt;a href=&quot;https://courses.edx.org/courses/course-v1:MITx+6.00.2x_7+1T2017/&quot; rel=&quot;noreferrer&quot;&gt;MITx MOOC 6.00.2x&lt;/a&gt;, which is modeled after an introductory programming class in Python at MIT. The course addressed the following topics from statistics that integrate nicely with computer science (especially data science and machine learning):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Confidence Intervals&lt;/li&gt;&#xA;&lt;li&gt;Variation&lt;/li&gt;&#xA;&lt;li&gt;Distributions&lt;/li&gt;&#xA;&lt;li&gt;Probability&lt;/li&gt;&#xA;&lt;li&gt;Sample Sizes&lt;/li&gt;&#xA;&lt;li&gt;Standard Error&lt;/li&gt;&#xA;&lt;li&gt;Central Limit Theorem&lt;/li&gt;&#xA;&lt;li&gt;Goodness of Fit&lt;/li&gt;&#xA;&lt;li&gt;Model Predictions and Overfitting&lt;/li&gt;&#xA;&lt;li&gt;Cross-Validation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Depending on the level of students and their familiarity with some basic concepts from statistics, I would also recommend looking at HackerRank's &lt;a href=&quot;https://www.hackerrank.com/domains/tutorials/10-days-of-statistics&quot; rel=&quot;noreferrer&quot;&gt;10 Day of Statistics&lt;/a&gt; challenge. While the pedagogy isn't the greatest, it does scaffold nicely from mean, median, and mode through standard deviation and distributions to end up at linear regression and correlation coefficients. There is also some discussion of probability along the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taken together, these two examples provide some big picture concepts to address that are fundamental to stats and that have relevance for computer science and programming.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-23T16:44:28.810" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1001" PostTypeId="2" ParentId="961" CreationDate="2017-06-23T16:58:40.650" Score="5" Body="&lt;p&gt;The point of TDD, like many of the other answers have been saying, isn't really to test the code and find bugs, but to codify your requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having requirements that are codified is useful when you have a &lt;em&gt;lot&lt;/em&gt; of requirements that need to be tested that all intersect each other (like in many industry projects), and when those requirements are going to change very often (which is one of the key assumptions of Agile). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be tricky to recreate the first condition in a school setting. Instead, lets focus on the second one: Throughout the project, introduce new requirements that overwrite and contradict earlier ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They might start with:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;we need to do A, B and C.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Once they finish that, mix things up:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;we need to do A, C, E and F. Instead of B we need to do D instead. And&#xA;  D shouldn't change how A and C work.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If they have good unit tests, it should be relatively easy to refactor and change their implementation. If they don't, they'll have a bad time trying to wade through their legacy code.&lt;/p&gt;&#xA;" OwnerUserId="1294" LastActivityDate="2017-06-23T16:58:40.650" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1002" PostTypeId="2" ParentId="917" CreationDate="2017-06-23T17:09:46.270" Score="3" Body="&lt;p&gt;I think that statistics courses are most useful for computer scientists who are anticipating a career in research. While statistics can be useful for professional developers that knowledge is not as critical as it is for researchers. The CS2013: The ACM/IEEE Joint Curriculum Guidelines for Undergraduate Degree Programs in Computer Science breaks knowledge units into three broad categories.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Things every CS department should offer &lt;/li&gt;&#xA;&lt;li&gt;Things that every CS Department should offer 85-90% of  &lt;/li&gt;&#xA;&lt;li&gt;Electives&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Statistics falls into the third category. I would not make statistics a required course but if you are going to do so I would suggest you look at the sort of topics you most want researchers to know. Ideally you are providing your students with the knowledge to properly evaluate research so that they can make informed decisions based on it. You'd probably want a deeper level for people actually doing research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FWIW I was on the CS2013 task force but opinions here are my own and I am not speaking for the task force.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-06-23T17:09:46.270" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1003" PostTypeId="2" ParentId="952" CreationDate="2017-06-23T17:20:12.930" Score="2" Body="&lt;p&gt;There's a lot of discussion about how people who work in industry spend a lot of time working with other people's code. That's true, but in my opinion, the key skill for dealing with other people's code is skill at refactoring. If you're going to teach new developers how to work with code developed by others, a class on refactoring would be invaluable.&lt;/p&gt;&#xA;" OwnerUserId="1296" LastActivityDate="2017-06-23T17:20:12.930" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1005" PostTypeId="2" ParentId="952" CreationDate="2017-06-23T18:02:26.867" Score="2" Body="&lt;p&gt;Neither is &quot;better&quot; or &quot;worse&quot; - just different. Writing your own code and understanding someone else's code well enough to debug and improve it are definitely distinct skills, both of which are necessary to be successful in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems like people are rarely given a lot of experience in the latter skill in college, and some curricula don't teach debugging techniques very well (especially to students that are just starting out). (I actually think that Eric Lippert's &lt;a href=&quot;https://ericlippert.com/2014/03/05/how-to-debug-small-programs/&quot; rel=&quot;nofollow noreferrer&quot;&gt;article&lt;/a&gt; on debugging should be mandatory reading in college curricula).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, really, it can't be either/or - both are necessary, especially if debugging assignments are accompanied by instruction in debugging techniques.&lt;/p&gt;&#xA;" OwnerUserId="1299" LastActivityDate="2017-06-23T18:02:26.867" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1006" PostTypeId="2" ParentId="35" CreationDate="2017-06-23T18:12:50.570" Score="2" Body="&lt;h1&gt;Front end&lt;/h1&gt;&#xA;&lt;p&gt;First teach HTML along with inline styles(it is a bad practice though).&lt;/p&gt;&#xA;&lt;p&gt;Because it is very less strict in syntax. You can skip the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag or anything even if you didn't closed the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; at bottom it show the desired output.(It is a bad practise though)&lt;/p&gt;&#xA;&lt;p&gt;So, when you introduce such a language to students, they will wonder because even if they did some mistake, they got output. So they have much more interest to learn HTML.&lt;/p&gt;&#xA;&lt;p&gt;Then introduce them CSS and ask to stop using inline styles.&lt;/p&gt;&#xA;&lt;p&gt;in HTML itself, we are using some styles like &lt;code&gt;height=&lt;/code&gt; and so on. Introduce them CSS and ask to change such styles to CSS (for example &lt;code&gt;height:&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Also introduce some good tricks like transforms.&lt;/p&gt;&#xA;&lt;h3&gt;Then show them some templates / themes&lt;/h3&gt;&#xA;&lt;p&gt;I suggest show some themes from themeforest or some site and say they all build using HTML and CSS. So, they are much more interested in learning this.&lt;/p&gt;&#xA;&lt;p&gt;Then give a them an intro to JavaScript&lt;/p&gt;&#xA;&lt;p&gt;Saying JavaScript is an essential part of Web Designing. Many Libraries like jQuery and packages like Node JS are using JavaScript.&lt;/p&gt;&#xA;&lt;h2&gt;I would like to quote a good word from my tutor&lt;/h2&gt;&#xA;&lt;p&gt;Before that, I know only PHP, HTML and CSS. I didn't knew JS much. In my college, my tutor once told in class that the structure of JS function names are&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If the function name consist of more than one words, then the first word should start with lower case and remaining words should start with upper case.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Example&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;getElementById&#xA;   ^      ^ ^&#xA;querySelectorAll&#xA;     ^       ^&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That give me a clear idea on JavaScript and at present, I am working on a Front End Developer.&lt;/p&gt;&#xA;&lt;p&gt;So the order comes from Easy HTML -&amp;gt; Medium CSS -&amp;gt; Little tough JS&lt;/p&gt;&#xA;&lt;h1&gt;Then Server side&lt;/h1&gt;&#xA;&lt;p&gt;PHP is a very easy server side scripting language to learn when comparing with JSP, ASP and NodeJS.&lt;/p&gt;&#xA;&lt;p&gt;Teach PHP first (the basic arithmetic, logical, string and such operations).&lt;/p&gt;&#xA;&lt;p&gt;Then teach PHP mysql interaction(Don't use the deprecated &lt;code&gt;mysqli&lt;/code&gt; function).&lt;/p&gt;&#xA;&lt;p&gt;Then teach them the language you are supposed to teach(ASP or JSP or NodeJS or Ruby or Python or whatever it is) as suggested by the Institution.&lt;/p&gt;&#xA;&lt;p&gt;Finally, introduce them plugins in front end and frameworks in back end by saying that &lt;strong&gt;Now you have a base on everything. There are plugins which help you to do all the tasks&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3&gt;Note:&lt;/h3&gt;&#xA;&lt;p&gt;Don't introduce plugins first. It may destroy their skills.&lt;/p&gt;&#xA;&lt;p&gt;If a plugin is deprecated and if they didn't have enough experience or knowledge in it's base language, they will suffer a lot to migrate.&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-24T05:50:25.377" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1007" PostTypeId="2" ParentId="35" CreationDate="2017-06-23T19:07:56.143" Score="3" Body="&lt;p&gt;The title here almost feels like a trick question to me. Not that it's intentionally trying to mess with people, but &quot;which one first&quot; is a bit of a false dichotomy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a somewhat unfortunate example, but it's the one I was reminded of. Long, long ago, in the ancient history of Stack Overflow, there was a... kinda rude and presumptuous question about a web developer who didn't understand that the web involves separate server and client machines. If you have 10k rep on Meta Stack Exchange, you can still see it: &lt;a href=&quot;https://meta.stackexchange.com/questions/41660/convincing-a-stack-overflow-user-to-switch-careers&quot;&gt;MSE post 41660&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Granted, to be ultra-pedantic, you can't physically teach two concepts simultaneously, so &lt;em&gt;technically&lt;/em&gt; either front-end or back-end will have to be first lesson. But as a practical matter, for all intents and purposes, the two topics go hand-in-hand. Teaching only one and not the other for any significant length of time may have some use, but I wouldn't call it web development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More recently, I have seen front-end vs. back-end start to be replaced by top-down vs. bottom-up, which I have to say I prefer. In short, &quot;bottom-up&quot; would be &quot;here's what the OSI stack is, these are the protocols the Internet uses, you can set up off-the-shelf software like Ruby on Rails to handle a lot of the underlying stuff for you and then write your logic in Ruby and presentation in HTML/CSS.&quot; Top-down is just the reverse of that. It's like when you start someone with &quot;Hello, world!&quot; in Java, and tell them to blindly copy &lt;code&gt;System.out.println(&quot;Hello, world!&quot;);&lt;/code&gt; but not to worry about what &lt;code&gt;System&lt;/code&gt; or &lt;code&gt;out&lt;/code&gt; mean for the first few lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be fair, my more recent experiences have been with more advanced students, not intro high school or college students without any prior experience. But I still believe in my fundamental point: you can't show people only half of a picture (even if you add the other half in later) and expect them to absorb its full value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for your JavaScript comment, it's been a few years since the last time I cracked it open, but I'd recommend giving &lt;em&gt;JavaScript: The Good Parts&lt;/em&gt; a read. It's by Douglas Crockford himself, and under 150 pages long.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-23T19:07:56.143" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1008" PostTypeId="2" ParentId="400" CreationDate="2017-06-23T19:34:52.003" Score="1" Body="&lt;p&gt;One of the first principle to realize is that the students are not only learning from what you teach, they are also learning from what you &lt;em&gt;do&lt;/em&gt;. They won't buy into a practice that you aren't following yourself. Would you purchase a Lincoln Towncar from a salesman that drives a Honda CRV to work every day? Your students &lt;em&gt;are&lt;/em&gt; watching you, and they are evaluating you. Use that to enhance the lessons, not diminish them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every time you produce &quot;throw-away&quot; code in demonstrations, problems, or handouts, make sure that &lt;em&gt;&lt;strong&gt;you&lt;/strong&gt; have followed&lt;/em&gt; whatever &quot;best practices&quot; you are trying to get them to follow. Then, don't make them create &quot;throw-away&quot; code. It might be the next lesson, it might not be for two weeks farther into the term, but as much as possible have the code created in one lesson be applied or modified in a later lesson. Emphasize your set of best practices early on, and help them understand them with code reviews on the earliest assignments that focus on those practices. For later assignments, place less emphasis on the review of best practices, and more on the code itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not knowing the language, and course objectives, I can't layout a definitive plan for the scaffolding. I'm sure that if you work backwards from the larger projects, you can design smaller projects that cover the earlier material that can end up in the finished version of the large one(s). If the students have enough time, and new material, between writing, and then reusing a program, they will see the benefits of best practices. Either from the hard work of rediscovering what the old ones do, or being able to easily see what they do from reading them if they did use best practices earlier. Of course, if they get to see other students' work, or have to figure out what other code does without best practices, that helps. Having to reuse their own code (when they think &lt;em&gt;I'll always know what this does&lt;/em&gt;) will drive the point home in a firm, and memorable way.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Practice&lt;/em&gt; best practices&lt;/li&gt;&#xA;&lt;li&gt;Code reviews that explain best practices&lt;/li&gt;&#xA;&lt;li&gt;Avoid &quot;throw-away&quot; code in examples and projects where possible&lt;/li&gt;&#xA;&lt;li&gt;Scaffold projects to include earlier work&lt;/li&gt;&#xA;&lt;li&gt;Have &quot;memory loss&quot; time between reuse of some code&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-06-23T19:34:52.003" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1009" PostTypeId="2" ParentId="35" CreationDate="2017-06-23T19:35:16.773" Score="1" Body="&lt;p&gt;I'll probably elaborate more on this in a blog post at some point but I usually do the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simple HTML (load from file, no styling)&lt;/li&gt;&#xA;&lt;li&gt;Simple baclend - I usually use Flask&lt;/li&gt;&#xA;&lt;li&gt;More backend&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;templates&lt;/li&gt;&#xA;&lt;li&gt;programatically making a web page&lt;/li&gt;&#xA;&lt;li&gt;simple forms (GET/POST)&lt;/li&gt;&#xA;&lt;li&gt;Sessions&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Styling on the front end&lt;/li&gt;&#xA;&lt;li&gt;Using Web APIS&lt;/li&gt;&#xA;&lt;li&gt;Databases&lt;/li&gt;&#xA;&lt;li&gt;Simple JS&lt;/li&gt;&#xA;&lt;li&gt;A whole lot more front end combined with functional JS&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-23T19:35:16.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1010" PostTypeId="2" ParentId="952" CreationDate="2017-06-23T19:58:02.863" Score="2" Body="&lt;p&gt;Even though I'm not an educator, I work with programming and personally I don't think that you should teach your students on how to debug (don't curse me!).&#xA;What I'd do is to present them the debugger and say what it is for, followed by a practical example. Then I'd give them code with bug(s) and tell them that they should use a debugger help them find the error (maybe a code with integer overflow problem). Probably I'd do that in one class, like 50 minutes of duration tops. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my point of view, teaching how to debug is as useless as having a whole class on how to compile a program (on introductory courses). &lt;/p&gt;&#xA;" OwnerUserId="1304" LastEditorUserId="1304" LastEditDate="2017-06-23T20:58:12.270" LastActivityDate="2017-06-23T20:58:12.270" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1011" PostTypeId="5" CreationDate="2017-06-23T20:19:49.127" Score="0" Body="&lt;p&gt;This tag is for questions relating to teaching primary-school or elementary-school students (kindergarten through fifth grade in most parts of the U.S.). The age range of the students will generally be somewhere from ages five to eleven.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use to indicate the ability level of the students in your question, as this will affect the answer users give. Avoid using with other age-range tags, such as &lt;a href=&quot;/questions/tagged/highschool&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;highschool&amp;#39;&quot; rel=&quot;tag&quot;&gt;highschool&lt;/a&gt; or &lt;a href=&quot;/questions/tagged/undergraduate&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;undergraduate&amp;#39;&quot; rel=&quot;tag&quot;&gt;undergraduate&lt;/a&gt; - your question should either be specific to one age group or applicable across most if not all age groups.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="1035" LastEditDate="2020-01-01T12:11:38.770" LastActivityDate="2020-01-01T12:11:38.770" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1012" PostTypeId="4" CreationDate="2017-06-23T20:19:49.127" Score="0" Body="This tag is for questions relating to teaching primary-school or elementary-school students, or generally ages five to eleven. Use to indicate the ability level of the students in your question, as this will affect the answer users give. Avoid using with other age-range tags, such as [highschool] or [undergraduate] - your question should either be specific to one age group or applicable across most if not all age groups." OwnerUserId="919" LastEditorUserId="1035" LastEditDate="2020-01-04T04:12:28.093" LastActivityDate="2020-01-04T04:12:28.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1013" PostTypeId="2" ParentId="973" CreationDate="2017-06-23T20:39:08.563" Score="8" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Student: My program is adding a list of positive ints in a loop, but the total ends up negative!  What happened?&lt;/p&gt;&#xA;&lt;p&gt;Teacher: &lt;code&gt;int&lt;/code&gt; can only store numbers up to &lt;code&gt;Integer.MAX_VALUE&lt;/code&gt;, after which it wraps around to negative values.&lt;/p&gt;&#xA;&lt;p&gt;Student: Huh?  Why do we call it &lt;code&gt;int&lt;/code&gt; then?  That's not how integers work!&lt;/p&gt;&#xA;&lt;p&gt;Teacher: Uh, well, it's an abstraction, but some abstractions aren't perfect.&lt;/p&gt;&#xA;&lt;p&gt;Student: [&lt;em&gt;looks up &lt;code&gt;Integer.MAX_VALUE&lt;/code&gt;&lt;/em&gt;...]  Why is the maximum value 2147483647?  That's a pretty arbitrary number.&lt;/p&gt;&#xA;&lt;p&gt;Teacher: Computers represent integers in binary... [mini-lecture follows]&lt;/p&gt;&#xA;&lt;p&gt;Student: Okay, fine.  But &lt;code&gt;Integer.MIN_VALUE&lt;/code&gt; is -2147483648; why isn't it symmetric?  What happens if we negate &lt;code&gt;Integer.MIN_VALUE&lt;/code&gt;, then?&lt;/p&gt;&#xA;&lt;p&gt;Teacher: [two's complement mini-lecture]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;You may or may not want to teach a specific lesson on binary (and octal and hex, and depending on your students, the concept of place value in general), but your students are going to run into leaky abstractions at some point, and you should be prepared to provide just-in-time education.&lt;/p&gt;&#xA;&lt;p&gt;If you're working in a language with arbitrary-precision integers, you get to delay this line of questioning until your students wonder why addition suddenly gets slower once the values get large enough.  General understanding of how values are physically represented will also help students with questions like &amp;quot;My program runs great on my desktop, but when I tried to run it on a Raspberry Pi, it runs out of memory.  How can I make it use less memory?&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="1102" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-23T20:39:08.563" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1014" PostTypeId="2" ParentId="19" CreationDate="2017-06-23T20:51:45.993" Score="0" Body="&lt;p&gt;According to a semi-recent survey paper by Pears et al.&lt;sup&gt;1&lt;/sup&gt;,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;During the last four decades, many languages have been used for teaching introductory programming. The language choice is usually made locally, based on factors such as faculty preference, industry relevance, technical aspects of the language, and the availability of useful tools and materials.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;On these criteria, Processing doesn't look too bad.&lt;/p&gt;&#xA;&lt;h2&gt;Faculty preference&lt;/h2&gt;&#xA;&lt;p&gt;What can I say to you about your own preference? I would just advise thinking about what you hope to achieve with the course. As I've said elsewhere on this site, a traditional computer science program, a zero-to-job-ready boot camp, and a short-track for non-majors might have intro courses with very different objectives, and that's as it should be.&lt;/p&gt;&#xA;&lt;h2&gt;Industry relevance&lt;/h2&gt;&#xA;&lt;p&gt;Relevance is kind of a hidden benefit here. I've never heard of any big companies writing serious enterprise projects in Processing. However, it is based on plain old Java, which remains one of the most widely used languages today. In fact, it's sort of a best-of-both worlds situation.&lt;/p&gt;&#xA;&lt;p&gt;Pears et al. tell the story of RIT dropping Eiffel because students didn't want to learn a language that they couldn't use after graduation, but also note that one big downside of Java is that it come with a lot of syntactic baggage that gets in the way of learning actual computer science (algorithmic thinking, how data structures work, etc.). Processing strips away a bit of the syntax that Java beginners find overwrought while still being &lt;em&gt;basically&lt;/em&gt; the popular language that they will be able to use in the real world.&lt;/p&gt;&#xA;&lt;h2&gt;Technical aspects&lt;/h2&gt;&#xA;&lt;p&gt;Not much to say here beyond what was in the previous section. Processing is very graphics-oriented. It'll be up to you to design a curriculum that teaches CS concepts using graphics-oriented tools.&lt;/p&gt;&#xA;&lt;h2&gt;Tools and materials&lt;/h2&gt;&#xA;&lt;p&gt;There's plenty here. A solid official website at processing.org with documentation and tutorials, a relatively small but respectable &lt;a href=&quot;https://stackoverflow.com/questions/tagged/processing&quot;&gt;community on Stack Overflow&lt;/a&gt;, a subreddit, and a FOSS culture that has ported Processing to other languages/platforms.&lt;/p&gt;&#xA;&lt;p&gt;Simon Fraser University recently ran &lt;a href=&quot;http://www.cs.sfu.ca/CourseCentral/166/tjd/intro.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;an intro course using Processing&lt;/a&gt;. I have no special insight there, I found it by a simple web search. But if you're interested, maybe you could reach out.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sub&gt;1: Pears, A., Seidman, S., Malmi, L., Mannila, L., Adams, E., Bennedsen, J., ... &amp;amp; Paterson, J. (2007). A survey of literature on the teaching of introductory programming. &lt;em&gt;ACM SIGCSE Bulletin, 39&lt;/em&gt;(4), 204-223.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-23T20:51:45.993" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1015" PostTypeId="2" ParentId="948" CreationDate="2017-06-23T22:30:59.653" Score="1" Body="&lt;p&gt;What are your friend's major worries about coding? If it's just the difficulty, I would maybe show her something drag-and-drop such as &lt;a href=&quot;http://appinventor.mit.edu/explore/&quot; rel=&quot;nofollow noreferrer&quot;&gt;App Inventor&lt;/a&gt;. While an actual career in the field would most likely involve programming using code instead of blocks, I think showing her what she can build using a block-based language could help her realize how approachable the field can be.&lt;/p&gt;&#xA;" OwnerUserId="1251" LastActivityDate="2017-06-23T22:30:59.653" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1016" PostTypeId="2" ParentId="93" CreationDate="2017-06-23T22:34:11.813" Score="6" Body="&lt;p&gt;I think it depends on what the goals for the course are.  You are teaching an intro programming course, so what are the students expected to know when they finish?  Data types and structures, loops, functions, syntax, etc?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so you don't need to teach web development skills as part of this since arguably HTML, CSS, etc. are not really &quot;programming&quot; in the computer science sense.  Also the technologies and languages available in web development are lightweight and limited compared to back end technologies and so using them to teach programming concepts is like teaching someone to cook using prepared food.  It has been said that &lt;a href=&quot;https://coderanch.com/t/456377/a/401/javascript-java.jpg&quot; rel=&quot;noreferrer&quot;&gt;&quot;Java is to JavaScript as ham is to hamster&quot;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, basic text-only coding can be boring and may not be very accessible to many people.  The advantage of front-end technologies is that they are literally visible and people can see the results of their programming efforts as something besides text in an editor.  Also if the goal is to provide people with the shortest path to a possible job, it is probably far easier to teach them the basics of web development than it is to teach them true software engineering and computer science concepts.  Which isn't to say that these concepts are always needed on a job.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-23T22:34:11.813" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1017" PostTypeId="2" ParentId="917" CreationDate="2017-06-23T22:43:59.947" Score="3" Body="&lt;p&gt;I got my CS degree in the 1990's and at the time (and perhaps still today) there was a lot of crossover between math and CS.  By just taking the minimum math requirements to meet my CS degree I was one math class away from a math minor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subsequently in 25+ years as a software engineer I have never used most of that math, the only math I've actually used is geometry, trig, and probability/statistics. Especially these days with &quot;big data&quot; being a popular topic in computer science, and map/reduce being a primary technique, the concepts of frequency, concentration, correlation, regression, distribution, expected values, etc. are very applicable to problems that you see every day.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the type of thinking and reasoning you need for stats and probability is much more applicable to real-world problems since it has more to do with estimation, approximation and trends.  One of the faults in my opinion with math is that you are often expected to arrive at a single clear and concise answer, when in fact few real world problems are solved that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conversely I've never once used all of that calculus (which is a shame because I liked it) and related math.  It was fun to take and probably a good (extended) mental exercise and weed-out for students but I think the stats and probability should have been emphasized a lot more than it was.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-23T22:43:59.947" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1018" PostTypeId="2" ParentId="35" CreationDate="2017-06-24T00:47:15.170" Score="1" Body="&lt;p&gt;True full stack from the base install of an OS with an IP address up to the next StackExchange?  Multiple classes.. HTML+CSS is always first, then Linux Admin, Back End Coding, and Pure SQL. Only order requirement with the last 3 is that Pure SQL has to be done before Back End Coding, but some of the Linux admin stuff could help with solving issues OR using neat new and exciting stuff when it comes to the back end....&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;HTML+CSS+Javascript+ styling stuff like jquery and bootstrap and such&lt;/li&gt;&#xA;&lt;li&gt;Pure SQL class - mysql-workbench+mysql server or similar, nothing but&#xA;queries from simple selects up to complex joins, how data relates,&#xA;good db design, etc.  If possible, some info on basic server&#xA;management - managing rights and users on the sql-server level (not&#xA;host OS level), backups, restoring backups, exporting/importing&#xA;databases, etc.&lt;/li&gt;&#xA;&lt;li&gt;Linux Administration for LAMP stack, ROR stack, whatever platform you are teaching to.  Installing the system and services, configuring them, backing them up, mail, dns, webserver, etc.  Use freely available materials and have the students spend their &quot;book money&quot; on a \$5 per month linode and a \$12/year domain.&lt;/li&gt;&#xA;&lt;li&gt;The back end programming - PHP+SQL, ROR, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="662" LastActivityDate="2017-06-24T00:47:15.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1019" PostTypeId="2" ParentId="927" CreationDate="2017-06-24T01:23:50.790" Score="6" Body="&lt;p&gt;I noticed that most of the answers focus on the things (topics, lectures, etc.) I have found that it is helpful to focus on the students. I normally ask them for a one-on-one chat and ask them why are they here? What do they like / not like about CS? This normally opens an opportunity for making their experience more engaging for them. It also identifies those that really want to succeed, and those that don't. In my experience the students that end up dropping out are the ones that actually want to (or don't really care). It's worth knowing who really does want to succeed, and who doesn't. &lt;/p&gt;&#xA;" OwnerUserId="466" LastActivityDate="2017-06-24T01:23:50.790" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1020" PostTypeId="2" ParentId="992" CreationDate="2017-06-24T01:57:10.283" Score="4" Body="&lt;p&gt;30% is really troubling. Not to say that it's your fault, or the students', but there is some sort of impedance mismatch going on. In some learning communities you have the challenges of hard material and a student body that is not prepped for success and is easily discouraged. I see this a lot in bodies that have to (eg) hold down a job to survive or are the first in their family to go the school. There's something akin to survivors guilt going on I sometimes feel. Anyway, try looking into different more collaborative models like pairing everyone up with a study buddy and offering collaboration based problem sets instead of lone student homework challenges. Good luck! &lt;/p&gt;&#xA;" OwnerUserId="1050" LastActivityDate="2017-06-24T01:57:10.283" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1021" PostTypeId="2" ParentId="948" CreationDate="2017-06-24T01:57:18.940" Score="2" Body="&lt;p&gt;I want to focus on this part of your question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What tools are there to show her it is much easier than it looks at a&#xA;  glance?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It reminded me of this blog post from Scott Hanselman: &lt;a href=&quot;https://www.hanselman.com/blog/StopSayingLearningToCodeIsEasy.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Stop saying learning to code is easy.&quot;&lt;/a&gt; The entire post is relevant for this topic, but I'll just excerpt this paragraph:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When we tell folks - kids or otherwise - that programming is &lt;strong&gt;easy&lt;/strong&gt;,&#xA;  what will they think when it gets difficult? &lt;strong&gt;And it will get&#xA;  difficult.&lt;/strong&gt; That's where people find themselves saying &quot;well, I guess&#xA;  I'm not wired for coding. It's just not for me.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I tell my students often that programming is difficult, frustrating, annoying, and challenging. However, I also explain that there is a reward to programming that is unlike that of any other discipline I've experienced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you rock an essay in English, say, you feel good, but the chances of you coming back to your excellent analysis of Hester Prynne in &lt;em&gt;The Scarlet Letter&lt;/em&gt; over and over again are quite slim. (I say that with all the affection of a former English teacher.) Yet, if you write a cool program, especially one that it is an original idea, chances are you will revisit it, expand it, and/or play with it often. &lt;strong&gt;There's great satisfaction that comes with the staying power of a working computer program.&lt;/strong&gt; You can actually &lt;em&gt;use&lt;/em&gt; the fruit of your labor when learning programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just keep in mind what Heather said above in her first point: don't let your friend make this a solo effort. Be a mentor, a Virgil to her Dante. Guide her along this journey (should she choose to make it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when in doubt about where to start, choose this: &lt;a href=&quot;https://video.cs50.net/2016/fall/lectures/0&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS50 Week 0 Lecture - Fall 2016&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-24T01:57:18.940" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1022" PostTypeId="2" ParentId="952" CreationDate="2017-06-24T05:41:19.060" Score="3" Body="&lt;p&gt;I would say that it is helpful to have them write their own code in the beginning to better understand the processes that go into writing for an application. It gives them a strong basis and practice with finding errors in the code they're most aware of: their own. Think about it; if they already know their thought process and procedure as to what needs to be done, then they can try as many times as is needed to get that code working perfectly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it is also a fact of life in CS that if you work for anything but a start-up or SaaS company you are almost certainly going to be doing more &lt;em&gt;maintaining&lt;/em&gt; of legacy code than actually creating of new stuff. By showing the students how to look through the code of others and find the issues in it, you are giving them practical experience for what will more than likely end up being the majority of their career.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest having students both write new and debug others' code, starting with writing their own and after a semester shifting gears to maintenance/debugging of faulty code.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-24T05:41:19.060" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1023" PostTypeId="1" CreationDate="2017-06-24T06:15:53.247" Score="3" ViewCount="133" Body="&lt;p&gt;Privacy is a very big issue in the present world. People unknowingly share personal information and pictures on social media and have to face many issues. Nowadays even 14 to 15-year-old people have social media accounts. They tend not to be aware of the privacy threats (mainly for girls).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While giving an introduction to the Internet, should I give them a quick brief about the privacy too or should I give it later?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal opinion is to give it in the first time, but I am not sure what an expert would advise.&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="1314" LastEditDate="2017-06-24T12:54:00.020" LastActivityDate="2017-06-24T12:54:00.020" Title="While giving an introduction to the Internet, should I talk about the risks?" Tags="|security|" AnswerCount="1" CommentCount="6" ClosedDate="2017-06-25T02:00:08.870" ContentLicense="CC BY-SA 3.0" />
  <row Id="1024" PostTypeId="5" CreationDate="2017-06-24T06:18:36.943" Score="0" Body="&lt;p&gt;Back-end is also known as server side. It stores global data, status of users and many more details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many server side scripting languages for example PHP, JSP, ASP, Node.js, etc.&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="2" LastEditDate="2017-06-24T10:38:34.580" LastActivityDate="2017-06-24T10:38:34.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1025" PostTypeId="4" CreationDate="2017-06-24T06:18:36.943" Score="0" Body="Back-end is also known as server side. This controls the flow of a website or application which runs by communicating with server." OwnerUserId="97" LastEditorUserId="2" LastEditDate="2017-06-24T10:38:31.023" LastActivityDate="2017-06-24T10:38:31.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1026" PostTypeId="2" ParentId="1023" CreationDate="2017-06-24T06:28:31.273" Score="7" Body="&lt;p&gt;Yes.  You should absolutely identify the specific risks of each technology or tool that you are going to teach and discuss those risks before you assign students to use those technologies or tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exact form of these warnings depends on what exactly you are introducing and the age of the students.  This is also a decision that should be made in the context of a school-wide policy on information technology.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're teaching TCP/IP to college freshmen, there's obviously no reason to go off on a tangent about the dangers of sexting.  If you're teaching sixth graders how to use your school's library databases, it's probably not appropriate for you to bring up many of the dangers of the internet.  So of course keep the warnings relevant and age-appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you're assigning students to create a class blog, you should give them instruction about not putting certain personal details on it, about dealing with spam, about creating and protecting a secure password.  If you're using a social media group (like a facebook group for the class) you should remind students about school policies that apply to the group (about swearing, offensive materials, cyber-bullying, cheating).  If you're teaching php development for a database app, you should warn students about SQL injection attacks and other common security risks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that it's unlikely that you'll encounter students who haven't already used the internet.  My son is four and he's a big fan of YouTube already.  So remember that you aren't really introducing &quot;the internet&quot; - you're introducing a specific tool or technology.  Your obligation is to teach the risks of that technology.&lt;/p&gt;&#xA;" OwnerUserId="938" LastActivityDate="2017-06-24T06:28:31.273" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1027" PostTypeId="2" ParentId="583" CreationDate="2017-06-24T06:30:32.140" Score="0" Body="&lt;p&gt;The way I keep the 2 straight is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can quote a source in 2 ways. I can either &lt;strong&gt;refer&lt;/strong&gt; to it, while still adding my own ideas and tailoring the information to fit my needs, or just take the information at face &lt;strong&gt;value&lt;/strong&gt; and show it to you while keeping my thoughts to myself.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-24T06:30:32.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1028" PostTypeId="2" ParentId="948" CreationDate="2017-06-24T06:42:57.820" Score="2" Body="&lt;p&gt;Well, I know that starting out it is encouraging to do something simple that still has use. I would recommend trying to set your friend up with an easy to read language like vb.net and helping them through some simple programs that can show them the uses of programming (a personal favorite is an interest calculator with textboxes to put in the principal amount and interest rate).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please give her warning though that while there are easy things in programming, there is also a difficult side. And if she shows interest but seems discouraged by the prospect of the challenging side, point out that there are sites like Stack Overflow where there are others who've probably dealt with the problem who are willing to help.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-24T06:42:57.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1029" PostTypeId="2" ParentId="948" CreationDate="2017-06-24T06:52:22.043" Score="1" Body="&lt;h1&gt;I agree with your first part.&lt;/h1&gt;&#xA;&lt;p&gt;A trained monkey can code&lt;/p&gt;&#xA;&lt;h2&gt;Show this to her&lt;/h2&gt;&#xA;&lt;p&gt;and say If a monkey can write code, then why can't you.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/4RhTo.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4RhTo.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Some encouraging things you should tell&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;World's first programmer was a lady, &lt;a href=&quot;https://en.wikipedia.org/wiki/Ada_Lovelace&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ada Lovelace&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The previous CEO of Yahoo was a lady, &lt;a href=&quot;https://en.wikipedia.org/wiki/Marissa_Mayer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Marissa Mayer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So, A Girl can be a good programmer.&lt;/p&gt;&#xA;&lt;h3&gt;Regarding to Smartness&lt;/h3&gt;&#xA;&lt;p&gt;There is a great article in this site about college dropped out programmers.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.itworld.com/article/2827248/it-management/tech-s-10-most-famous-college-dropouts.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tech's 10 most famous college dropouts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ask her to read it.&lt;/p&gt;&#xA;&lt;p&gt;Programming is really an another world. The &lt;strong&gt;Logic&lt;/strong&gt; and the &lt;strong&gt;choosing of correct language and method&lt;/strong&gt; matters. Smartness is a plus but not necessary.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;em&gt;image courtsey : &lt;a href=&quot;http://cdn2.hubspot.net/hubfs/174241/code_monkey.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://cdn2.hubspot.net/hubfs/174241/code_monkey.jpg&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Affiliation disclosure : I am in no way affiliated to the blog mentioned above nor to wikipedia&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-06-24T06:52:22.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1030" PostTypeId="1" AcceptedAnswerId="1086" CreationDate="2017-06-24T07:01:41.703" Score="3" ViewCount="378" Body="&lt;p&gt;I am preparing to teach students python, in addition to java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, I test a proof of concept (POC) of my teaching with a handful of students, so as to know if my lesson plans are good (I teach the lesson to 4-6 students of varying skill and then I ask them for feedback). This time, the students were introduced to Python, after they were taught Java (They were taught OOP and basic I\O).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the POC lesson in python, the feedback I received showed the difficulty in understanding the difference between Python and Java. Python felt so different (and rightly so) to the students, and they couldn't quite understand how it works, when compared to java. They know java has the runtime environment which runs compiled code, but they don't know how python runs the code they write. This difference I'm referring to. That isn't the only difference they had difficulty with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in an attempt to make the introductory lesson in python to the rest of the students, I am trying to explain those differences beforehand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can make the transition\introduction from java to python more smooth?&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T08:46:37.593" LastActivityDate="2017-06-25T10:22:43.673" Title="Transition from Java to Python" Tags="|lesson-ideas|secondary-education|introductory-lesson|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1031" PostTypeId="5" CreationDate="2017-06-24T07:19:32.093" Score="0" Body="&lt;p&gt;Eclipse is an &lt;a href=&quot;https://en.wikipedia.org/wiki/Integrated_development_environment&quot; rel=&quot;nofollow noreferrer&quot;&gt;IDE&lt;/a&gt; that can be used to create programs in many programming languages and primarily is used to program in Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eclipse has many releases and plug-ins which can be installed into it, allowing it to be used for developing many things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eclipse has a Version Control Plugin, named EGit, which allows working with a Git repository for version control&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T07:35:49.300" LastActivityDate="2017-06-24T07:35:49.300" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1032" PostTypeId="4" CreationDate="2017-06-24T07:19:32.093" Score="0" Body="Question related to teaching with the development environment Eclipse. Use this tag to ask questions about teaching how to use eclipse, and teaching in eclipse. Do not use this tag for questions about eclipse, apart from using it as a teaching tool." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T07:35:46.167" LastActivityDate="2017-06-24T07:35:46.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1033" PostTypeId="5" CreationDate="2017-06-24T07:48:21.797" Score="0" Body="&lt;p&gt;JavaScript is a dynamically typed scripting language. It is used in many area like client-side scripting, server-side scripting (e.g. NodeJS), mobile application development (Ionic), and computer application development (Electron).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The huge number of JavaScript libraries make it popular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the popular JS libraries and tools are, among many others,&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;jQuery&lt;/li&gt;&#xA;&lt;li&gt;AngularJS&lt;/li&gt;&#xA;&lt;li&gt;NodeJS&lt;/li&gt;&#xA;&lt;li&gt;React&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Javascript is object oriented, but not class-based. It is unrelated to Java, except for the name. A new object is created from an existing object by describing new and changed features. The general term for this is &lt;em&gt;prototype based&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While javascript is a general purpose programming language, it is mostly used for scripting web applications, originally at the client end but now also at the server side. Most modern browsers provide support of javascript execution. Unfortunately it can also be an attack vector. &lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="1293" LastEditDate="2017-09-30T16:57:04.883" LastActivityDate="2017-09-30T16:57:04.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1034" PostTypeId="4" CreationDate="2017-06-24T07:48:21.797" Score="0" Body="JavaScript (Not to be confused with Java) is a dynamically typed web programming language. Used in both Server side and Client side. The Server side scripting language NodeJS make use of JavaScript. Use this tag for questions about teaching javascript, not for technical questions about programming in javascript. " OwnerUserId="97" LastEditorUserId="1293" LastEditDate="2017-09-30T16:57:04.883" LastActivityDate="2017-09-30T16:57:04.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1035" PostTypeId="2" ParentId="1030" CreationDate="2017-06-24T08:12:01.253" Score="4" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Use the Python module &lt;code&gt;dis&lt;/code&gt; to show students Python's bytecode alongside Java's bytecode. Avoid the &quot;compiled v. interpreted&quot; rabbit hole to start (because it may lead to more confusion than clarity) and instead show students what's actually happening underneath the hood.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Begin by defining &quot;bytecode&quot; in the context of Python. Here is the &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-bytecode&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python 3 documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Python source code is compiled into bytecode, the internal&#xA;  representation of a Python program in the CPython interpreter. The&#xA;  bytecode is also cached in &lt;code&gt;.pyc&lt;/code&gt; files so that executing the same file&#xA;  is faster the second time (recompilation from source to bytecode can&#xA;  be avoided). &lt;em&gt;This “intermediate language” is said to run on a virtual&#xA;  machine that executes the machine code corresponding to each bytecode.&lt;/em&gt; [emphasies added]&#xA;  Do note that bytecodes are not expected to work between different&#xA;  Python virtual machines, nor to be stable between Python releases.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That might sound to students not too dissimilar from their experience with Java and its use of a virtual machine. Also, take a close look at the documentation for the &lt;code&gt;dis&lt;/code&gt; module.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's consider this very short Python program &lt;code&gt;test.py&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(&quot;Hello, CSEducators.SE!&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If I run the command &lt;code&gt;python -m dis test.py&lt;/code&gt;, I see the following Python bytecode:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  1           0 LOAD_NAME                0 (print)&#xA;              3 LOAD_CONST               0 ('Hello, CSEducators.SE!')&#xA;              6 CALL_FUNCTION            1 (1 positional, 0 keyword pair)&#xA;              9 POP_TOP&#xA;             10 LOAD_CONST               1 (None)&#xA;             13 RETURN_VALUE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, let's write &lt;code&gt;Test.java&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Test {&#xA;    public static void main(String args[]) {&#xA;        System.out.println(&quot;Hello, CSEducators.SE!&quot;);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I run &lt;code&gt;javac Test.java&lt;/code&gt; then &lt;code&gt;javap -v Test.class&lt;/code&gt;. Here's a small part of what I see:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  public static void main(java.lang.String[]);&#xA;    flags: ACC_PUBLIC, ACC_STATIC&#xA;    Code:&#xA;      stack=2, locals=1, args_size=1&#xA;         0: getstatic     #2                  // Field java/lang/System.out:Ljava/io/PrintStream;&#xA;         3: ldc           #3                  // String Hello, CSEducators.SE!&#xA;         5: invokevirtual #4                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V&#xA;         8: return        &#xA;      LineNumberTable:&#xA;        line 3: 0&#xA;        line 4: 8&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is only a small part of it; the full output leaves a lot to explore. Nonetheless, at this point, students will see fewer differences than similarities (hopefully).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, consider this SO question: &lt;a href=&quot;https://stackoverflow.com/questions/3265357/compiled-vs-interpreted-languages&quot;&gt;&quot;Compiled vs. Interpreted Languages&quot;&lt;/a&gt;. It's not quite so black-and-white, and forcing it into a pure dichotomy may do more harm than good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Let it be a bit messy. That's what learning is all about.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-24T08:12:01.253" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1036" PostTypeId="1" AcceptedAnswerId="1062" CreationDate="2017-06-24T09:03:08.343" Score="5" ViewCount="123" Body="&lt;p&gt;After teaching Priority Queues, I want to give the students some notion of what it looks like when they are used in code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two approaches and I am unsure about which would serve my goal better:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Show them a number of examples where a Priority Queue is used (task management, patient treatment etc.) and for each one discuss how the priority queue impacts the performance or efficiency.&lt;/li&gt;&#xA;&lt;li&gt;Let them be creative and try to think of a use for a priority queue, and let them implement that usage on their own (a lab period).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Obviously, each option has its merits. I am wondering which one would increase understanding more. The first option shows them uses and the reasoning behind that usage, which is great for understanding the subject. On the other hand, option 2 lets them experience it first hand, which is (almost) always good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am torn between these two. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-24T17:00:02.250" Title="Priority Queue practice vs examples" Tags="|lesson-ideas|best-practice|priority-queue|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1037" PostTypeId="1" CreationDate="2017-06-24T11:27:02.507" Score="32" ViewCount="6041" Body="&lt;p&gt;There are some students who are very good at coding. They can crack any logic problem at their level. But they aren't very good at CS theory. They can code better than their classmates, but they're indifferent about the theory, displaying an attitude of &quot;I don't care&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, theory means there are various theory papers are presented in the syllabus such as &quot;Theory of Computation&quot; which talks about NFA, DFA, Turing machines, etc. Another example is Artificial Intelligence, which talks about ES, Fuzzy logic, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I handle such students?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are at a 17-19 age group.&lt;/p&gt;&#xA;" OwnerUserId="97" LastEditorUserId="58" LastEditDate="2017-06-24T17:48:16.213" LastActivityDate="2017-08-29T17:47:00.780" Title="How to handle students who excel at coding but aren't interested in theory" Tags="|classroom-management|" AnswerCount="11" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1038" PostTypeId="2" ParentId="1037" CreationDate="2017-06-24T11:55:53.497" Score="19" Body="&lt;p&gt;I suggest 2 possibilities: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Talk to them.&lt;/strong&gt; Explain that at some point, they won't be able to rely on just being able to code well. For AI theory, at some point the algorithms are dependent on so many parameters, making it impossible to write working code without knowing what each parameter does. (A simple example for this is neural networks. The simple ones have ~5 or more parameters which need to be fine tuned). If they know the theory, then they'll be able to write good code much faster, with fewer bugs and mistakes. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Throw them in the water.&lt;/strong&gt; If the other approach doesn't work then you can just give them an assignment, an assignment to show them that they simply can't go too far without learning the theory. I personally like examples from machine learning theories (Also, it's one of the fields I'm more familiar with). If you ask them to write a genetic algorithm, they'd quickly find out that they need to learn the &lt;a href=&quot;https://en.wikipedia.org/wiki/Genetic_algorithm#Genetic_operators&quot; rel=&quot;nofollow noreferrer&quot;&gt;various methods in the field&lt;/a&gt;. They'll be lost without learning those. The same is true for anything in the field of Deep Learning. If you give them such an assignment, and let them work on it for a while, they might produce results that are not too bad. However, if they were to read and learn the theory, they would produce far better results. As pointed out, it's important to give them an assignment that is authentic, and preferably something that is used in &quot;real life&quot; (like advanced search algorithms, which require heuristic functions, which in turn require&lt;sup&gt;1&lt;/sup&gt; knowing some theories)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The main idea is stressing the necessity of knowing the theory, and making it clear that as the project becomes more complicated (and as the project they make are at higher levels), the need to know the theory grows exponentially. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another nice example is heuristic functions. Most students find these very difficult to learn and use, without in-depth learning of the theory behind it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;PS:&#xA;I used to be a student like the ones you described, and I went through 1 (self-reflection-ish) and 2 and I fully understood that theory is necessary.&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Well, maybe not &lt;em&gt;require&lt;/em&gt;, but sure makes it easier and faster to write and debug.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-26T16:11:59.797" LastActivityDate="2017-06-26T16:11:59.797" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1039" PostTypeId="2" ParentId="473" CreationDate="2017-06-24T12:43:58.287" Score="5" Body="&lt;p&gt;Agile is about more than software engineering. The individual practices of, for example XP, are just good programming practice. In addition they can be incorporated into your pedagogy. Test First, for example, helps students to get it right, but also to avoid writing things unnecessarily. &quot;Just make the test pass.&quot; Likewise, Pair Programming can be used to make the learning a more social process and to help students help each other get over the inevitable humps. But that assumes you, the teacher, enforce switching of roles, both within a pair and within the entire class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can, especially in early assignments, provide the tests, or at least some of them. The negative aspect of this is that the tests include the names of public methods of the classes as well as class names. This implies that you have done some of the design of the solution already. This has positive pedagogical implications for beginners who often are stuck on a blank page, not knowing where to begin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, here, you can present early problems as a &quot;product backlog&quot; rather than a long description of the problem. Again, this implies that you have decomposed the problem yourself into meaningful chunks. This too is helpful to the beginner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you don't need to think about Agile Development in the large, just about which practices enhance student learning. In general, take a more explicit role as Customer/Product Owner so that student program becomes a conversation. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-24T12:43:58.287" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1040" PostTypeId="2" ParentId="952" CreationDate="2017-06-24T12:52:23.877" Score="1" Body="&lt;p&gt;If you mean by &quot;debugging&quot; teaching students to use a debugger, I wouldn't do that. However, having students finish or repair a program that you create is a useful early exercise. In particular, you can give them a program larger than they would be expected to write themselves. It needs to have excellent design/coding. But you have either removed or carefully broken a few parts before you give it to them. The errors introduced can be quite simple (missing punctuation) or more complex. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students get to (a) read code (b) see good design (c) interpret compiler diagnostics (d) grapple with structure - assuming the program has some length. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This idea is discussed in the book &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns: Advice for Educators&lt;/a&gt;, where it is called &quot;Fixer Upper&quot;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-04T18:35:05.443" LastActivityDate="2017-09-04T18:35:05.443" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1041" PostTypeId="2" ParentId="1037" CreationDate="2017-06-24T12:56:51.963" Score="13" Body="&lt;p&gt;It sounds like these students may be perfectly suited to a wide range of roles in a professional environment, just not the most glamorous or 'obvious' jobs. Ultimately, everyone finds their level and a good team often has a mix. Given that these students are close enough to employment they should already have started thinking about what sort of jobs they are expecting to be looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They need to decide if the theoretical stuff is something they need to be able to handle (and get a good mark in the course), or if they need to start widening their skills elsewhere, or focusing on something more narrow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obvious as it seems, you need to explain to them (and their peers) that in 5 years time, the state of the art will have moved on. More coding tasks will be automated, and new fields will be emerging. Not all of them will be architecting the next big thing, but they might be working on a part of it, or testing it, or rolling it out, selling it or supporting it. Theory will help in all of these areas, so they shouldn't write it off as irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To expand on how this is different from say maths as a subject at the same level, most of the maths being learnt at that level is (a) likely to have a practical application for many careers (as complimentary knowledge most of the time) and (b) form useful practice in the art. Maths (even at engineering degree level) remains a completely practical subject, whereas CS has a slightly tricky mix - consider the paths to degrees in theoretical physics and practical (discrete component) electronic engineering. &lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-08-29T17:47:00.780" LastActivityDate="2017-08-29T17:47:00.780" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1043" PostTypeId="2" ParentId="89" CreationDate="2017-06-24T14:14:47.857" Score="6" Body="&lt;p&gt;I think having kids write code by hand can be incredibly worthwhile, but be careful of how you assess it. I wouldn't take points off for mistakes that would be easily caught by a compiler such as a missing semicolon or mixing up length and size. I also wouldn't take points off for mistakes students might make when writing code by hand that show they know what they're doing such as using &lt;code&gt;≤&lt;/code&gt; instead of &lt;code&gt;&amp;lt;=&lt;/code&gt; or the words &lt;code&gt;AND&lt;/code&gt;/&lt;code&gt;OR&lt;/code&gt; instead of &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;/&lt;code&gt;||&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that being said, if you are trying to see if your students understand a basic concept of algorithm, having them write a short segment of code by hand can really help show their true understanding.&lt;/p&gt;&#xA;" OwnerUserId="1251" LastEditorUserId="150" LastEditDate="2017-06-24T14:16:54.543" LastActivityDate="2017-06-24T14:16:54.543" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1044" PostTypeId="2" ParentId="1037" CreationDate="2017-06-24T14:25:32.757" Score="12" Body="&lt;p&gt;Just like any field, the theoretical aspects of it can be inaccessible and a bit dry, I would say especially to kids this age.  AI, automata, and computational theory are often college masters level courses, indicating that not only do you need some years of background in the mechanics in order to appreciate the theory, but you just need to be older and more mature.  I didn't get into AI until my 4th year of a BS in CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I think kids should come out of classes with more than just coding skills, I don't think they should be expected to necessarily know a whole lot of theory.  If you do introduce theory, I think it should be something that they can more easily relate to.  For example rather than starting with the high level theory of NFA and DFA you could start with regular expressions, which are an embodiment of NFA's.  Once they grasp regular expressions, you can give them a peek behind the curtain and show how they are implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly you could start with encryption and cryptography which can serve as an intro to that kind of theory.  I think the most applied type of AI these days is machine learning, and that can be introduced by starting with &quot;big data&quot; technologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many software engineers go a long way in their careers, or perhaps their entire careers, without an understanding or appreciation for theory.  Everyone must at some point grasp architecture, design, and larger concepts than coding but theory doesn't always come into play.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-24T14:25:32.757" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1045" PostTypeId="2" ParentId="473" CreationDate="2017-06-24T14:30:19.203" Score="4" Body="&lt;p&gt;I think it is a good idea to introduce students to Agile concepts, since they're likely to see this in the real world.  However I wouldn't dwell on it too much.  Some people, even on real projects, get so caught up in the lingo, point systems, tools, etc. that managing a project takes on a life of its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lightweight Agile process that would fit into a classroom situation could be as simple as 1 or 2 week sprints, with a planning meeting at the beginning where tasks are estimated, brief daily morning meetings (scrums), and a post-mortem on the last day.  Scrums should be brief, focusing on tasking and eliminating blockers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This kind of process really only applies to team situations so if the students are working solo it might not reveal much to them.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastEditorUserId="27" LastEditDate="2017-06-24T18:39:46.960" LastActivityDate="2017-06-24T18:39:46.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1046" PostTypeId="2" ParentId="1030" CreationDate="2017-06-24T14:35:53.927" Score="3" Body="&lt;p&gt;If the students are getting caught up on the difference between a compiled vs. interpreted language (the difference you've described), I would say that they're missing the forest for the trees somewhat.  While this is an important difference in the languages, there is a lot more to the comparison of the two besides this.  They both have a lot of the same common concepts, especially with the streaming API's introduced in Java 8 which are similar to Python's comprehensions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it can be an interesting discussion to understand how two languages that both reduce source code to bytecodes can be different, but in terms of learning to program in both of them that is probably not something that needs to be emphasized.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-24T14:35:53.927" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1047" PostTypeId="2" ParentId="1036" CreationDate="2017-06-24T15:53:57.340" Score="1" Body="&lt;p&gt;I would recommend that you let them figure it out themselves, then explain how to improve upon it. That way some students are certain to have the wrong implementation or a non-optimal one, and that gives you a way to begin talking about &lt;em&gt;why&lt;/em&gt; student X's algorithm is wrong, and from there you can move into the theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, this allows students to learn from their mistakes and learn from each others mistakes, which is almost always beneficial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also give them a completed application with only the priority queue implementation removed and ask them to replace it.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-24T15:56:12.367" LastActivityDate="2017-06-24T15:56:12.367" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1048" PostTypeId="2" ParentId="1037" CreationDate="2017-06-24T15:55:00.420" Score="8" Body="&lt;p&gt;Performance is definitely a good angle, in addition to some of the great answers here discussing e.g. regular expressions as a way to deal with automata. It's a way of relating the more practical programming to the theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could start by presenting the pseudo-code for a naive approach to solving something the assignment problem (you can do it naively in $O(n!)$ by checking every possible combination and their costs if I recall correctly), or sorting (Bogosort!). It might be sufficient to just graph the running times for various inputs if you'd like to avoid difficult complexity analysis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, introduce some better algorithms. The Hungarian method is a particular favorite of mine. &lt;em&gt;Don't&lt;/em&gt; just explain the theory behind it, show some example applications and have the students implement it. Have them realize how much faster a solution can be found. This is a great way to demonstrate the importance of some of the more theoretical study to those who enjoy the practical programming work more.&lt;/p&gt;&#xA;" OwnerUserId="916" LastEditorUserId="150" LastEditDate="2017-06-24T15:56:03.083" LastActivityDate="2017-06-24T15:56:03.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1049" PostTypeId="1" AcceptedAnswerId="1076" CreationDate="2017-06-24T16:06:48.973" Score="8" ViewCount="167" Body="&lt;p&gt;As part of my Computer Science degree, we covered UML in quite a bit of depth as part of a software engineering module. Whilst some parts did seem useful, a lot of it was interesting but not very practical. The specification itself was also not very accessible when I tried to read it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that said, I've never come across UML being used a lot in the context of an actual software engineering role (perhaps with the exception of sequence diagrams to model protocols). Sometimes a vaguely UML-ish class diagram might be drawn on the whiteboard, but it's very informal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that most CS degrees will incorporate some amount of software engineering theory alongside the usual computation theory and data structures etc. style modules, to what extent (if any) should UML be covered?&lt;/p&gt;&#xA;" OwnerUserId="916" LastEditorUserId="150" LastEditDate="2017-06-24T16:08:30.747" LastActivityDate="2017-06-24T23:50:26.533" Title="To what extent should UML be covered in the context of a degree?" Tags="|object-oriented-paradigm|undergraduate|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1050" PostTypeId="2" ParentId="927" CreationDate="2017-06-24T16:22:56.600" Score="1" Body="&lt;p&gt;You can provide some sort of anonymous public feedback channel with which students can communicate with you and their classmates. A wiki works well for this. You can get information that a student may not be willing to share face to face. You can ask questions yourself on this channel to prompt useful responses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this sounds risky, it really isn't. If a student vents, his/her classmates will probably correct the record. But a shy/underperforming student may feel empowered by having such an option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It needs to be both public and anonymous, however. If it isn't public you might get only the venting and not a more complete picture. If it isn't anonymous you won't learn some important things, though it is also useful for students asking for clarification of points made in class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used this successfully over several years. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-24T16:22:56.600" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1051" PostTypeId="2" ParentId="327" CreationDate="2017-06-24T16:25:19.437" Score="3" Body="&lt;p&gt;As an undergraduate student, I like to take my notes in LaTeX. Whilst I can write the LaTeX on paper (and then type it up later) it is nice to have the opportunity to use an IDE to be able to compile the document and preview it. I do this for a few different reasons: I can type faster than I can write, and often the pace of the lecture makes it difficult to take notes on paper. LaTeX is also great for typesetting math and I have a set of common commands/environments I use for including reading material references, tips for the examination etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the year, it's easy to put together a set of revision notes. This makes it significantly easier to type up past exam question answers too: once you've typeset a few NFAs/DFAs with TikZ it gets easier! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few disadvantages with this. I will admit there have been times in some modules where I've been distracted by IRC or reddit. I've then had to revisit that material prior the exam with little to no notes. Additionally, sometimes I'm not familiar with the area of mathematics we are covering, and have to resort to looking up how to typeset certain things. I'm generally getting better though, and this approach makes it really easy to share question attempts and notes with others.&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2017-06-24T16:25:19.437" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1052" PostTypeId="1" CreationDate="2017-06-24T16:31:15.653" Score="4" ViewCount="149" Body="&lt;p&gt;I've been thinking of starting a programming club - I know some people who would be interested and I think it would be a fun thing to do. This club would probably meet once or twice a week for a couple of hours and would have upper middle schoolers and early highschoolers (so maybe 13 - 16, somewhere in there). I'm in the same age bracket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the fun is just working with other people on projects of your choosing, but it would also be nice to spend some time sharing knowledge - some members might want to talk about their project and what they learned doing it, others might want to talk about a particularly useful feature of a language, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some ideas I'm considering:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;One day a week is for learning and sharing, another day is for programming. Advantage - 50-50 split, people would learn a lot. Disadvantage: kind of annoying for people who want to consistently work on a project.&lt;/li&gt;&#xA;&lt;li&gt;Have the club start with a couple of days coming up with project ideas and forming groups to work on it, work on the projects for about a month or a set length of time, and then spend a couple of days sharing. Advantage - lots of time programming, people get to share their work. Disadvantage - not really a space for people talking about non-project related things.&lt;/li&gt;&#xA;&lt;li&gt;A mix of the above - #2, but when someone wants to talk about something really cool they've learned/discovered, some period of time is set up where everyone can learn about it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;How should time be split between these two activities so everyone has a good time but people still have an opportunity to share what they're working on? Would one of the above approaches work well, or would a different approach work better?&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T16:37:51.633" LastActivityDate="2017-08-29T18:27:31.567" Title="Balance between teaching and projects in a club" Tags="|curriculum-design|project|extracurricular-club|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1053" PostTypeId="2" ParentId="1052" CreationDate="2017-06-24T16:43:38.843" Score="2" Body="&lt;p&gt;I am suggesting another idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Split 60-40 but not in a way as mentioned in the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keeping people talk for a day and make the other entire day for programming is quiet boring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do programming for 2-3 hours, then like a break, conduct the Tech-Talk for an hour or one and half hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the thing actually done by software developers in industry. But the tech talk is not hosted officially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they will interested very much with this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they do coding for 3 hours, they will start to feel boring. Then when they entered to Tech Talk session, they will active again. After one hour, they again start feel boring and then when they start programming, it will be fine.&lt;/p&gt;&#xA;" OwnerUserId="97" LastActivityDate="2017-06-24T16:43:38.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1054" PostTypeId="5" CreationDate="2017-06-24T16:47:53.107" Score="0" Body="&lt;p&gt;An extracurricular club is a gathering of people who are interested in a particular topic. Clubs generally have some members who are leaders of the club; the number of leaders is dependent on the size of the club. The leaders may be elected, or they may just be the de-facto leaders, again depending on the size and formality level of the club.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T16:51:20.013" LastActivityDate="2017-06-24T16:51:20.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1055" PostTypeId="4" CreationDate="2017-06-24T16:47:53.107" Score="0" Body="Use for questions about teaching in the context of an out-of-school club. This can be used whether or not the club is affiliated with any set school. Please specify the size of the club in your question. Only use for clubs focused on some aspect of computer science." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T16:51:22.833" LastActivityDate="2017-06-24T16:51:22.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1056" PostTypeId="5" CreationDate="2017-06-24T16:53:41.237" Score="0" Body="&lt;p&gt;Artificial intelligence (commonly abbreviated as AI) is a field of computer science which deals with programs which perform actions based on input from the environment, in order to achieve some goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The term is used when describing a machine (or program) which mimics human cognitive actions, such as learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The field of AI has many applications, such as recognizing spoken words, robotics and many more &lt;a href=&quot;https://en.wikipedia.org/wiki/Applications_of_artificial_intelligence&quot; rel=&quot;nofollow noreferrer&quot;&gt;applications&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More details, as well as some specific information on subjects in the field, can be seen &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_intelligence&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T17:01:18.727" LastActivityDate="2017-06-24T17:01:18.727" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1057" PostTypeId="4" CreationDate="2017-06-24T16:53:41.237" Score="0" Body="Questions related to teaching how to create and work with artificial intelligence. Use this tag to ask about teaching various methods and techniques of artificial intelligence." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-24T17:01:22.787" LastActivityDate="2017-06-24T17:01:22.787" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1058" PostTypeId="2" ParentId="146" CreationDate="2017-06-24T16:55:12.503" Score="4" Body="&lt;p&gt;Lots of the answers here focus too much (imo) on inheritance. I find that I write better code when I think of OO as primarily supporting composition, not inheritance. In this view, a good analogy is an automobile. It is made up of many parts (objects) that interact in interesting ways to provide a functionality. You can substitute nearly any manufactured product, say a computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you program this way you find that your hierarchies are very shallow and your classes are composed of many parts defined by other classes. It also minimizes the tendency to have class fields mostly primitives that are specifically manipulated by this class, instead having actions deferred to the other classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, a gas pedal doesn't need to know anything about an engine, but both are parts of a whole. Likewise, recursively, the parts in the composition are themselves composed from simpler things. Eventually you get down to primitives (ints and strings) but hopefully not for a long time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An added benefit of this world view is that you can, for the longest time, write the program using names associated with the problem space rather than the solution space. So a car has a GasPedal with a method press, rather than having an int that is just directly manipulated by the automobile object. I find naming according to the problem space, not the solution space also helps one communicate with users/product owners who, themselves, think in that space. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A consequence of this view, perhaps not obvious, is that the solution begins at the top level, adding classes for the parts as you find the need for them. This, as opposed to building lots of small &quot;parts&quot; classes speculatively hoping that they will fit. It also fits well with test first programming style. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-24T16:55:12.503" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1059" PostTypeId="2" ParentId="1052" CreationDate="2017-06-24T16:56:12.280" Score="5" Body="&lt;p&gt;I am currently a co-leader of a programming/FIRST club at my high school, and for us the key has been project based learning. We are always working on something. It might not be relevant to our upcoming competition, but we always contextualize lessons in terms of what we're working on. That way everyone stays interested in the current project and sees the utility in the lesson being taught.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-24T16:56:12.280" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1060" PostTypeId="5" CreationDate="2017-06-24T16:57:45.453" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-24T16:57:45.453" LastActivityDate="2017-06-24T16:57:45.453" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1061" PostTypeId="4" CreationDate="2017-06-24T16:57:45.453" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-24T16:57:45.453" LastActivityDate="2017-06-24T16:57:45.453" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1062" PostTypeId="2" ParentId="1036" CreationDate="2017-06-24T17:00:02.250" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Let them be creative&lt;/strong&gt; and try to think of a use for a priority queue, and let them implement that usage &lt;strong&gt;on their own.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you want something to stick, heed your own advice in bold: &quot;Let them be creative ... on their own.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students can use their own creative powers to synthesize everything they've been taught, then they've truly learned it. &quot;Show and discuss&quot; is not necessarily a bad approach, but it won't have nearly the same long-lasting effect as putting the onus on students. If you're the one working, you're the one learning, so if you're the own showing, you're really the one doing most of the work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus, why not do both? Start with option #2 then analyze their own work with option #1. As with most things, it's not either/or. Imagine if the efficiency conversation were about their own implementations, not some you had shown them. That would be a powerful set of lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One heuristic I apply to my own lesson planning is this: is this lesson giving students the option to take ownership of the material? When you challenge them to create, you are giving them that opportunity to -- and challenging them to -- take ownership of their learning.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-24T17:00:02.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1063" PostTypeId="5" CreationDate="2017-06-24T17:01:32.063" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-24T17:01:32.063" LastActivityDate="2017-06-24T17:01:32.063" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1064" PostTypeId="4" CreationDate="2017-06-24T17:01:32.063" Score="0" Body="Use for the document preparation system LaTeX and not for the material. LaTeX is a markup language commonly used in academia to prepare documents due to its system for preparing mathematical equations, among other things. Do not use for questions about how LaTeX works; such questions belong on TeX.SE." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T17:09:54.343" LastActivityDate="2017-06-24T17:09:54.343" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1065" PostTypeId="5" CreationDate="2017-06-24T17:16:47.740" Score="0" Body="&lt;p&gt;The &lt;a href=&quot;https://www.sphero.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sphero&lt;/a&gt; is a spherical robot toy which is controlled by a smartphone or tablet or by programming. This tag can also be used for the related &quot;Ollie&quot; toy, which is of the same design except it is cylindrical, and the SPRK, which is again of a similar design except that it is see-through.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-06-24T17:31:57.323" LastActivityDate="2017-06-24T17:31:57.323" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1066" PostTypeId="4" CreationDate="2017-06-24T17:16:47.740" Score="0" Body="For questions about using the Sphero robot toy in the process of educating students in Computer Science. Use this tag for questions about how to use the Sphero in lessons or teaching. Do not use this tag for technical questions about the device itself; consider contacting their support site in that case." OwnerUserId="919" LastEditorUserId="2" LastEditDate="2017-06-24T17:31:52.313" LastActivityDate="2017-06-24T17:31:52.313" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1067" PostTypeId="5" CreationDate="2017-06-24T17:20:28.527" Score="0" Body="&lt;p&gt;Graph theory is a field of mathematics that is the study of graphs, or nodes connected by lines. The development of algorithms to handle graphs is a field of research in computer science, and graphs can also be used to represent problems in computer science.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="58" LastEditDate="2017-06-24T17:23:24.400" LastActivityDate="2017-06-24T17:23:24.400" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1068" PostTypeId="4" CreationDate="2017-06-24T17:20:28.527" Score="0" Body="Please don't use to ask questions about graph theory, or algorithms relating to graph theory; such questions belong on Mathematics or Computer Science." OwnerUserId="919" LastEditorUserId="58" LastEditDate="2017-06-24T17:23:07.607" LastActivityDate="2017-06-24T17:23:07.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1069" PostTypeId="5" CreationDate="2017-06-24T17:32:32.527" Score="0" Body="&lt;p&gt;The Makey Makey kit is comprised of a USB cable for connection to a computer, alligator clips and wires, and a circuit board. The Makey Makey kit has been used to, for example, connect the letters in alphabet soup to the various keys on the keyboard. &lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T17:36:26.953" LastActivityDate="2017-06-24T17:36:26.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1070" PostTypeId="4" CreationDate="2017-06-24T17:32:32.527" Score="0" Body="Makey Makey is an electronics kit often used by hobbyists for the purpose of connecting everyday objects to a computer program. Do not use for questions about Makey Makey itself; instead, use for questions about how to use Makey Makey in a teaching setting." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-24T17:37:17.720" LastActivityDate="2017-06-24T17:37:17.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1071" PostTypeId="5" CreationDate="2017-06-24T17:35:47.543" Score="0" Body="&lt;p&gt;Unit testing is a method to test code for errors, and to see if the code is ready to use. It is commonly automated.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="204" LastEditDate="2017-10-18T14:36:04.797" LastActivityDate="2017-10-18T14:36:04.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1072" PostTypeId="4" CreationDate="2017-06-24T17:35:47.543" Score="0" Body="For Questions related to teaching about Unit Testing.&#xD;&#xA;&#xD;&#xA;Do not use for questions about unit testing itself, but for questions about how to use unit testing in the classroom. e.g. teaching Unit Testing, or using Unit Testing to aid learning." OwnerUserId="919" LastEditorUserId="204" LastEditDate="2017-10-18T14:36:04.797" LastActivityDate="2017-10-18T14:36:04.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1073" PostTypeId="2" ParentId="638" CreationDate="2017-06-24T20:53:53.250" Score="3" Body="&lt;p&gt;The model you use in teaching MVC can be extremely simple so that the student can focus on the details of the views and controllers. One of the simplest, (copied with permission from &lt;a href=&quot;http://csis.pace.edu/~bergin/mvc/mvcgui.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Joseph Bergin at Pace University&lt;/a&gt;) is a temperature converter: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class TemperatureModel extends java.util.Observable {&#xA;&#xA;    public double getF(){return temperatureF;}&#xA;&#xA;    public double getC(){return (temperatureF - 32.0) * 5.0 / 9.0;}&#xA;&#xA;    public void setF(double tempF)&#xA;    {   temperatureF = tempF;&#xA;        setChanged();&#xA;        notifyObservers();&#xA;    }&#xA;&#xA;    public void setC(double tempC)&#xA;    {   temperatureF = tempC*9.0/5.0 + 32.0;&#xA;        setChanged();&#xA;        notifyObservers();&#xA;    }&#xA;&#xA;    private double temperatureF = 32.0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since it extends &lt;code&gt;Observable&lt;/code&gt;, it can add any observer. The link shows code for several examples. They aren't JavaFX, but I'm sure you can adapt them simply enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The model is easy enough to extend to other temperature systems if desired. If you want to include Absolute temperatures, it might be advantageous to change the internal representation to that. Since the interface wouldn't change (except for the new methods) you can demonstrate separation of interface from implementation as well. I suspect that if you are teaching MVC that they have already learned that, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-25T10:50:46.180" LastActivityDate="2017-06-25T10:50:46.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1074" PostTypeId="2" ParentId="63" CreationDate="2017-06-24T21:04:25.320" Score="10" Body="&lt;p&gt;If we don't introduce parallel/concurrent thinking early, our students can develop a sequential mindset that makes it hard for them to make the shift later. The rest of this is in the context of a college/university CS curriculum...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multithreading can be discussed in CS1 if the students build GUIs, since the GUI needs its own thread to maintain responsiveness while the main thread is handling time-consuming GUI events.  But most GUI libraries do this multithreading for you, so the students don't have to do it themselves -- you can talk about what's going on under the surface, but the students don't gain any hands-on experience and it's unclear to me how much they take away if they don't have to do it themselves. But there are schools that take this approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We introduce students to multithreading in CS2 (&lt;em&gt;Data Structures&lt;/em&gt;), using Just-In-Time pedagogy.  The basic idea is to give the students a problem that requires them to store a &lt;em&gt;lot&lt;/em&gt; of data in a data structure (e.g., an organism's genome in a C++ vector or a Java ArrayList, or a really big image to be processed) -- enough data that processing the data sequentially takes 5-15 seconds.  This is an eternity for todays students and they get impatient waiting so long for their program to solve the problem.  We leverage that impatience and use it as motivation for introducing multithreading and parallel execution as a means of speeding up the program. We think the CS2 (&lt;em&gt;Data Structures&lt;/em&gt;) course is the first time there is a natural motivation for introducing multithreading, since that's the first time you can store enough data to really motivate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our CS3 course is an &lt;em&gt;Algorithms&lt;/em&gt; course, so we continue the exposure there by introducing parallel versions of searching and sorting algorithms, graph algorithms, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our fourth course is &lt;em&gt;Programming Languages&lt;/em&gt;, where we spend 1-2 weeks on languages that provide features for parallel / concurrent execution.  For example, we contrast languages that expect threads to communicate via shared memory (and the different mechanisms to synchronize those accesses: semaphores, locks, condition variables, monitors) with languages that have threads communicate via message passing (e.g., Erlang, Scala).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our sixth course is &lt;em&gt;OS &amp;amp; Networking&lt;/em&gt;, where spend several weeks exploring the implementation of the features needed to do all of this: threads, processes, semaphores, locks, condition variables, message-passing systems, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The upshot is that parallel and concurrency topics are &quot;sprinkled&quot; throughout our curriculum, rather than being confined to a single course.  (We also offer a junior-senior elective course that focuses solely on parallel computing, so that students who want more can dig deeper into the subject.) That's one way to do it.&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-06-24T21:04:25.320" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1075" PostTypeId="2" ParentId="63" CreationDate="2017-06-24T22:23:59.410" Score="2" Body="&lt;p&gt;Given the type of software development that occurs these days, such as on mobile phones and with &quot;big data&quot; technologies, I think concurrency, threading, etc. should be introduced very early.  Basically as soon as you start talking about what a program is, how it's invoked or executed, and what happens when it completes, I would discuss all that in the context of a concurrent environment.  You don't necessarily need to get into all of the details initially but I would try to avoid teaching new students that all programs are sequential and uninterruptible. &lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-24T22:23:59.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1076" PostTypeId="2" ParentId="1049" CreationDate="2017-06-24T23:50:26.533" Score="8" Body="&lt;p&gt;From my software engineering experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of it is useful some is not. It was put together by a committee of organisations that had a product to sell. (state machines got in there because a committee member had a state-machine editor.) A lot of other useful stuff was missed out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take what is useful, leave the rest, and use stuff from elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing unified about it. I have used mainly class diagrams, some dataflow (I think it may be called), but as you say not too much formality. We never passed them through a linter. At one time we were drawn in to using them to create code. This was an expensive lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the diagrams (may be all) existed before the UML. I tell my pupils that some of the diagrams are useful, but also look else where. I tell them which ones I have found useful. And I tell them what I have said here: there is nothing special about the UML (or the process of collecting together, arbitrarily, some diagrams notations).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-06-24T23:50:26.533" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1077" PostTypeId="2" ParentId="1037" CreationDate="2017-06-25T01:55:33.603" Score="10" Body="&lt;p&gt;Don't try to &lt;strong&gt;handle&lt;/strong&gt; them. &#xA;Give them exceedingly hard problem that you think cannot be solved without understanding the theory. When they come back to you, unable to solve the problem, then explain how theory can make it easy to solve. On the other hand, if they come back, able to solve it without having to understand the theory then you would've learned something new. &lt;/p&gt;&#xA;" OwnerUserId="1326" LastActivityDate="2017-06-25T01:55:33.603" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1078" PostTypeId="7" CreationDate="2017-06-25T03:22:06.713" Score="0" Body="&lt;ul&gt;&#xA;    &lt;li&gt;Specific issues related to Computer Science Education&lt;/li&gt;&#xA;    &lt;li&gt;Real problems or questions that you’ve encountered&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="58" LastEditDate="2017-06-25T03:22:06.713" LastActivityDate="2017-06-25T03:22:06.713" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1079" PostTypeId="1" CreationDate="2017-06-25T03:38:04.140" Score="11" ViewCount="1557" Body="&lt;p&gt;I teach a course on hacking every other year.  It's a very difficult class, and it only attracts kids who are really enthusiastic about delving deep into the bowels of &lt;code&gt;gdb&lt;/code&gt;, stackframes, format string vulnerabilities, buffer overflow attacks, and the like. &lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the beginning, I give a short lecture talking about ethics.  The basic analogy that I draw is to a locksmith: a good locksmith can get into your car, and can get into your house. But an honest locksmith does not, because the lock that is in place communicates that he or she is not supposed to enter.  Thus, a good lock is there to keep out honest people.&lt;sup&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/sup&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, we arrive at this fine distinction: if a security feature is designed to keep you out, even if that security feature is very poorly implemented, then it is almost always unethical to circumvent it. Therefore, we should only study hacking using &quot;practice locks&quot;, such as programs in our virtual machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question, then, is &lt;em&gt;is this a sufficient message to impart?&lt;/em&gt;  If not, what more need be said?  Bear in mind that it is not actually a course &lt;em&gt;in ethics per se&lt;/em&gt;.  I really can't spare more than about 15-20 minutes to impart the most important ideas, so I really want to make that short time count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;¹&lt;/strong&gt;  The course largely emphasizes security holes from the 90's and the 00's. This isn't to prevent them from being able to work in modern system, but because you can study the attacks we focus on in relatively pure forms using virtual machines from that time, so we don't have to spend time working around more advanced security features. And learning about those attacks in any depth is already plenty hard!&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;²&lt;/strong&gt; The lock may not be effective against, say, a determined burglar. But it helps people who generally &lt;em&gt;wish&lt;/em&gt; to stay honest avoid temptation and conquer moments of ethical weakness.&lt;/sup&gt; &lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="919" LastEditDate="2017-07-01T23:32:21.320" LastActivityDate="2021-12-28T13:21:44.837" Title="How do I teach ethics in hacking?" Tags="|security|social-context|ethics|" AnswerCount="6" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1080" PostTypeId="2" ParentId="1079" CreationDate="2017-06-25T03:50:50.033" Score="0" Body="&lt;p&gt;Talking about ethics in hacking is very different than talking about ethics in any other field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In hacking, when you talking about ethics, they will listen but when they learn how to keep anonymity, they become curious &lt;strong&gt;I know how to stay anon. No one can  me or touch me. Then why should I still follow the ethics? Let's use our power&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;the about e is not applicable for all students but many of them&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recall a thing happened in my college life,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of my friend asked my another friend how to get Facebook password, at that time, there was a small vulnerability existed. He didn't teach him. He requested many times and promised that he want it to hack someone's account because of there was a small issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He taught the trick and later, the new person, hacked his account :P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, just telling about ethics is not enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should say, &lt;strong&gt;at what extend you are trying to protect your anonymity, you can be caught if you do something wrong.&#xA;Even if you are in TOR network, they can still catch you.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to make some fear in the mind of students that doing such things in wrong purpose is a crime and once caught, they have to pay a huge amount fine plus may get jail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ethics + fear can make it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But ethics alone, not in the case of hacking.&lt;/p&gt;&#xA;" OwnerUserId="97" LastActivityDate="2017-06-25T03:50:50.033" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1081" PostTypeId="2" ParentId="1037" CreationDate="2017-06-25T04:52:23.530" Score="3" Body="&lt;p&gt;First off, I would like to touch base upon the mention of the Question's Comments &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are you trying to produce good programmers or good theoreticians? Making one ruins the other. ~Kevin Krumwiede&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As an avid Programmer and Theoretician (both in my spare time), I can clearly state, that, with my Logical Mind, it is very difficult to grasp at new theories without first ripping them apart and reconstructing them myself, figuring out WHY they work, HOW they work, and WHAT is broken that requires the modification of my Mathematical Formula which I've Constructed and Applied to the Simulation. It makes things very difficult to explain to me, because I simply can not for the life of me figure out why it is broken.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as a way to explain Theoretical Application to Coding, perhaps it might be easiest to go Old School on them using &lt;code&gt;Variable Arrays&lt;/code&gt; and &lt;code&gt;ForEach Loops&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have 500 Items to Sort through, and pair up, you could do it Logically, writing out a single line of Code for each and every available option, but if I'm not mistaken, that would be 500 to the 500th power number of lines of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not Impossible, by a long shot, but is takes much longer than explicitly stating the 500 items within a few simple Groups, and running a &lt;code&gt;ForEach Loop&lt;/code&gt; on the Array you have created, which if my estimates aren't too far off, might be around 2,500 lines of code depending upon the Grouping layout.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sheer workload difference might jog them out of their lack of interest, but your real challenge is yet to come, You will also want to provide some type of applicable example to keep their attention.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are Logical like I am, they will have one major Deal Breaker for whether or not they should actually attempt to learn it, it is simple in practice, very optimal in application, and created for efficiency of Brainpower (as ironic as that might sound to you, I'll get back to that in a sec):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can I use this to improve my Build?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Try asking them for an example of what they are working on in their spare time, see if you can get the Class involved in improving their Program, similar to what everyone does here on StackOverflow, or to put it into more familiar terms: Brainstorm and Think Tank their Projects in order to display Practical Application of the Theories, they will absorb it like a Sponge once they find out it is useful to their interests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back to the Brainpower Optimization comment, I realize you find it odd that their lack of interest in such things would be a Mechanism to actually improve Brain Performance, but if you pay really close attention, you might notice that some of the more optimized students seem to be more forgetful, absentminded, or simply focus on whatever interests them (sound familiar?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There have been a few studies done on this subject already, I forget if the Larger Scale Studies are already ongoing or if they are still gathering Funding, but initial results have shown extremely promising results, along with studies of behaviors of some of the most notable scientific minds in our distant past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Einstein for example was noted as stating that he never Memorized how to get Home from Work, he never saw the need for it as someone would always Drive him Home, so why would he need to learn their Job? The Logic behind why is that he had better things to think about, such as his work, which we've come to reference long after he has died. The Theory behind the Logic is that he had more Brain available to apply to his Active field, because he didn't fill it up with things he never used, such as the path Home, that is what the Study is trying to figure out specifically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have anything that needs Editing/Correcting in this Answer, let me know in the Comments and I'll edit accordingly should you not feel up for suggesting the Edit yourself.&lt;/p&gt;&#xA;" OwnerUserId="1329" LastActivityDate="2017-06-25T04:52:23.530" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1082" PostTypeId="2" ParentId="1079" CreationDate="2017-06-25T05:04:22.383" Score="4" Body="&lt;p&gt;I would go about detailing how much profit a white hacker can get, seeing as many security companies hire them as test attackers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If any of the kids are tempted be unethical things, then explain that far greater profit can be achieved with greater ease if one chooses to use their learning for good. So that's that (for any student saying &quot;But I can make a lot of money from hacking&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, appeal to their sentiment. Ask them how they'd feel if someone could simply type some stuff in some place, and then gain access to &lt;strong&gt;ALL&lt;/strong&gt; their personal information. This includes but is most certainly not limited to: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Address&lt;/li&gt;&#xA;&lt;li&gt;phone numbers&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;photos&lt;/em&gt;, which includes any private photos they might have anywhere that is accessible from the internet.&lt;/li&gt;&#xA;&lt;li&gt;their parents' credit cards &lt;/li&gt;&#xA;&lt;li&gt;any gamers there: their steam account (that'll scare some of them)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;After this shock, explain that each one of those has a security measure taken to protect that information. So if they want to hack that stuff, explain that there are people more or less like themselves on the other side. Hacking is never attacking a computer, it's attacking a person on the other side. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this can be in addition to what you already plan to say to them. I think that most, if not all, would get the message of the ethics. They'll understand that those protective measures are there for a reason.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-25T05:04:22.383" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1083" PostTypeId="2" ParentId="1079" CreationDate="2017-06-25T05:15:58.207" Score="3" Body="&lt;p&gt;This seems insufficient to me, because of the following example at a minimum:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In small towns, people do not lock their doors, or at least they did in bygone days of yore, or so the story goes. If you steal from a house where the door is unlocked, is that suddenly somehow not unethical? What if there was no door on the house at all? If the stuff was just lying around out in the open at a campground?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm getting at is, you said&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if a security feature is designed to keep you out, even if that security feature is very poorly implemented, then it is almost always unethical to circumvent it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;but I would posit that it is generally accepted to be unethical to intrude upon even systems with no security features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my own cybersecurity training, I have also been made to sign documents at the beginnings of classes saying that violations of ethical guidelines would be severely punished, by course failure, institutional sanctions and/or legal action. I don't remember the exact terms but they were along the lines of using any systems to hack any systems without explicit permission of the targeted systems' owners. Nor do I know how enforceable they really were, but they made good symbolic points, after the end of the ethics discussions and before the start of any practical security material.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-25T05:15:58.207" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1084" PostTypeId="2" ParentId="1030" CreationDate="2017-06-25T08:40:03.563" Score="2" Body="&lt;p&gt;Java and Python are actually more similar than you've probably thought, as long as students get over the concrete syntax. As I've said in the comments, &quot;compiled&quot; and &quot;interpreted&quot; are properties of specific implementations, not of languages; in case of Java (Oracle JDK/OpenJDK) and Python (CPython), this distinction is very blur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the key difference is that Java is &lt;em&gt;statically typed&lt;/em&gt;, but Python is &lt;em&gt;dynamically typed&lt;/em&gt;. This means that there are no type errors unless you actually run the code. Your students will know that this method wouldn't work in Java:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public _____ foo (int x) &#xA;{&#xA;     if (x &amp;gt; 0) {&#xA;         return 1;&#xA;     } else {&#xA;         return &quot;non-positive&quot;;&#xA;     }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They would know that this code wouldn't compile; &lt;code&gt;foo&lt;/code&gt; must return an &lt;code&gt;int&lt;/code&gt; or a &lt;code&gt;String&lt;/code&gt;, but not &quot;either&quot; or &quot;both&quot;. This is because values must have predefined types in Java, i.e. static typing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the Python counterpart to this would work perfectly, because Python values do not have types that are predefined, and values get types only when we actually get them. This, I believe, is really what you meant by &quot;interpreted&quot; vs &quot;compiled&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, don't let students miss out on Python's awesome features, such as simultaneous assignment, &lt;code&gt;lambda&lt;/code&gt; expressions, and list comprehension. Enjoy! &lt;/p&gt;&#xA;" OwnerUserId="130" LastEditorUserId="150" LastEditDate="2017-06-25T08:41:52.187" LastActivityDate="2017-06-25T08:41:52.187" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1085" PostTypeId="2" ParentId="1079" CreationDate="2017-06-25T09:06:44.897" Score="11" Body="&lt;p&gt;I like your locksmith comparison, but I don't agree with the following assertion:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;From there, we arrive at this fine distinction: if a security feature is designed to keep you out, even if that security feature is very poorly implemented, then it is almost always unethical to circumvent it. Therefore, we should only study hacking using &quot;practice locks&quot;, such as programs in our virtual machines.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What is wrong is to use your hacker skills &lt;strong&gt;in order to&lt;/strong&gt; perform unethical actions. Hacking per se is not unethical, as it is not ethical or unethical to use a key to open a door. For the sake of comparison, a locksmith &lt;em&gt;can&lt;/em&gt; ethically use her skills to open the door to &lt;em&gt;your&lt;/em&gt; apartment... if you called her after you lost your keys. But if she opens the same door when you're away in order to steal your stuff, the same action becomes unethical, because the goal is now different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside the goal, one has to think about the yield of a hacking attempt, i.e. what one would do when he actually found a weak point in a system. Let me illustrate this with an example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was a student, I was talking with my friend about IT security and we started talking about SQL Injection. Long story short, I tried to connect to the University website using his name and &lt;code&gt;&quot; OR 1 = &quot;1&lt;/code&gt; as a password, and it worked. I got access to his account, his personal information, and, if I remember well, his e-mails. This is the actual hacking action, which, by itself, is not ethical or unethical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, I had an ethical choice:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I could behave unethically and use this weak point to my advantage. For instance, I could push further, trying to connect to the system as a teacher, in order, for instance, to change my grades, or even sell a service to other students to “improve” their grades for a small fee. I could also spy on other students, stealing their personal information.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Or I could contact IT security staff, telling that they have a slight issue. This would be ethical.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Or I could do nothing, which would be an ethically-neutral action.¹&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Same hacking action leads to three different yields with very different ethical aspects associated with them.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if a security feature is designed to keep you out&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What about a system which has no security features? Would you feel ethical doing whatever you want simply because security was not implemented?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take an example of online games where each player competes against others. One system implemented a cheat protection system which could be easily circumvented given enough programming skills. Another system has no cheat protection whatsoever. How would cheating be unethical only in the first system, but not the second one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking the same example of video games, imagine a different game where the competition notion doesn't exist—there is no online mode, and the score of an individual player is irrelevant for others. The system has a cheat protection system. Why would hacking this system be unethical?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Therefore, we should only study hacking using &quot;practice locks&quot;, such as programs in our virtual machines.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What about the locksmith who's opening the door of my apartment because I lost my keys?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;¹ By the way, I did the ethical choice and contacted the staff. The staff never replied, not even to thank me, which taught me two things: ethical choices are rarely rewarded and if someone is acting ethically just to get a reward, he's not that ethical after all.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="1334" LastActivityDate="2017-06-25T09:06:44.897" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1086" PostTypeId="2" ParentId="1030" CreationDate="2017-06-25T10:22:43.673" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How can make the transition\introduction from java to python more smooth?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That's an interesting question, because usually it's done the other way around - you learn Python, which IMO is the simpler language to learn, and then get introduced to Java.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;They know java has the runtime environment which runs compiled code, but they don't know how python runs the code they write. This difference I'm referring to&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't think that's the real problem when switching from Java to Python. Python's model is actually &lt;em&gt;simpler&lt;/em&gt; to understand - write some source code, run it, done. The compilation step is nicely hidden, even though it's there, too. There is no difference between Java and Python in that respect - Java compiles to the Java Virtual Machine, and Python compiles (if you're using CPython) to the CPython Bytecode Interpreter. Both are virtual machines, although the JVM is targeted by other languages (Python, for example, in the Jython  variant), while the CPython Bytecode Interpreter is a virtual machine that only exists for Python, and AFAIK doesn't do JIT - but PyPy does.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Using Jython to transition from Java to Python&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You could use Jython to make the transition smoother. Jython will allow your students to use the full Java API (all the classes they already know, including I/O) in Python. The full Java API is callable from Python source code if you use Jython.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would discourage using Jython to that purpose, because your students will have trouble separating out the two languages. They will have difficulties identifiying what is Python and what is Java, and they'll question the use of Python if all it offers (from their viewpoint) is another syntax to access the same library functions.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Focus on the differences&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I'd suggest you build your python lessons by focusing on the differences between Python and Java:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't start by introducing classes and OOP in Python, for example, because unlike Java, you don't need them to write simple programs.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead of OOP, you could discuss other programming styles. Start with simple procedural style, or baffle the students with functional programming.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you've taught the students the standard c-like for-loop that increases a variable in Java, explain to the students how Python's for loop is fundamentally different from that because it's not there to increase a counter; rather it &lt;em&gt;iterates&lt;/em&gt; over a collection of things (or something that can be enumerated). Then show them how lists can be iterated over using Python's for loop, but so can strings. That could be a good way to start a discussion about python's data model.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You'll need to talk about static/dynamic typing. Explain to the students that while in Java it's variables that are typed, in Python only &lt;em&gt;values&lt;/em&gt; have types. Show them how that makes it very easy to build prototypes, and allows for a degree of freedom unparalleled by statically typed languages, but also makes it easy to make mistakes the compiler can't catch. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that this approach only works if your students already have a good understanding of what programming is, and how to do it in Java. If they're still struggling with learning the basics, introducing a second language IMO would be a bad idea, but also this approach wouldn't work very well - in that case, I'd suggest focusing on the similarities instead.&lt;/p&gt;&#xA;" OwnerUserId="1336" LastActivityDate="2017-06-25T10:22:43.673" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1087" PostTypeId="2" ParentId="1037" CreationDate="2017-06-25T12:03:37.243" Score="8" Body="&lt;p&gt;Does a good car mechanic have the ability and talent to forge a good wrench?  Does a good doctor have the ability to build an X-ray machine?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer coding is like any other discipline.  There are objects you are going to need for a project that make use of an advanced theory (such as sorting theory) and you are going to know right off that you could spend 3 years creating just that module, or spend a little money and buy a module already made by someone who's got multiple doctorates in the field and did it better than you ever could.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students are just shrugging when presented with the theory it is most likely because they intrinsically understand that their skill level is not anywhere near high enough to be any good at writing something that would address that theory, let alone understanding it.  So they have no interest in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Giving them an assignment designed to make them fall on their face in my experience is going to do either 1 of 2 things.  First they will give up and fail and be even more convinced that they shouldn't be interested in theory.  Second, they will figure out you are trying to out-fox them and do what I did when I got those kinds of assignments - read the textbooks that were like 3 levels higher than the class which contained the answers, then come back with an answer that not only answered the original question but then proceeded to dissect it and explain why it was a terribly poor question to begin with because it did a lot of hand-waving and made a lot of assumptions that might not hold true in any situation.  Then be reinforced that they don't need to bother with the theory since they made the teacher look bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you might try is appealing to their competitive instincts.  Divide them into 2 teams with the top coders split up on different teams mixed in with the slower and worse coders who might be better at the theory and setup a contest to see who could write a better app.  Once the top coders see that their teammates who are actually paying attention to learning the theory have something to contribute, they might start to feel differently.  You can pick an app that is sufficiently broad that it encompasses all the theories you want them to learn.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2017-06-25T12:03:37.243" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1088" PostTypeId="2" ParentId="1079" CreationDate="2017-06-25T12:16:29.673" Score="6" Body="&lt;p&gt;First please be very cognizant of the term &quot;hacking&quot;  Some of what you are describing is &quot;cracking&quot; not &quot;hacking&quot;  The techniques may be the same but the intent is different.  I think you are having problems with this because you yourself aren't comfortable with making this distinction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You cannot prevent someone who is rotten to the core from taking your class and abusing what they learned so don't beat yourself up trying to head that off.  If they are rotten they will make you think they are an angel with a halo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead why don't you assign them as the very first assignment, to write a short 1-2 page paper on &quot;what does the difference between cracking and hacking mean to me&quot;  Then take the best 5 responses that have the most clearly thought out positive morals, and distribute them to the class.  That would likely get the point across better then you saying &quot;cracking is bad, don't do it&quot; when they see their peers don't think it's acceptable.  And you might even get a few pearls in, like someone writing about how an identity thief stole money from them and how violated they felt.  Behind every successful crack there is a victim and if you can get them to empathize with the victim rather than the cracker, you have done the best you can do.&lt;/p&gt;&#xA;" OwnerUserId="1340" LastActivityDate="2017-06-25T12:16:29.673" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1089" PostTypeId="2" ParentId="517" CreationDate="2017-06-25T14:17:08.420" Score="3" Body="&lt;p&gt;Well, depending on how many papers you have your class write, you can give them a quick crash course in $\LaTeX$ and have them write the papers (or whatever other written material) in it. As others have said, another good idea is to write documentation in markdown or $\LaTeX$. Also, depending on the class, using $\LaTeX$ might be nice so you can read the math equations more easily (this being for more advanced, theoretical classes) when grading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started using $\LaTeX$ because on Physics.SE when I edit, I needed to figure out the commands for various symbols (there can be some quite math heavy posts, and sometimes newer users don't use any MathJax at all, or post a picture), at which point I found out about Detexify, and then from there TeX.SE, and - well - I figured out I really enjoy it. From there I started teaching myself and now I can do some passably nice documents. So that's another thing to consider - some people in the class may start using it due to your classes and find that they really enjoy it so they learn more on their own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One resource that may be useful if you do start using $\LaTeX$ more regularly is &lt;a href=&quot;https://www.sharelatex.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ShareLaTeX&lt;/a&gt; which is an online editor, which also has documentation for basic tasks in $\LaTeX$, and - more importantly for a teacher - sharing and history abilities, though I believe the more advanced ones require some sort of premium account. You can also put documents in a Github repository or pull them out of a repository, I believe.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-25T14:17:08.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1090" PostTypeId="1" AcceptedAnswerId="1104" CreationDate="2017-06-25T16:29:04.357" Score="8" ViewCount="650" Body="&lt;p&gt;As a student primarily experienced with imperative and object-oriented languages, my first few hours learning Haskell at university were a bit of a struggle. There's a real shift involved in terms of how you approach problem solving and concepts like pure functions, side effects, currying, higher order functions etc. were very new to me and took me a while to properly grasp and begin using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did eventually get the hang of it, and now happily write production code in Scala that uses a lot of these techniques. I think it can result in incredibly elegant code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'm curious: is there is a way to make the initial struggle easier? I've seen some suggestions that students should &lt;em&gt;start with&lt;/em&gt; a functional language - but I don't think it's reasonable to assume all of the students won't have prior knowledge of working in an imperative language.&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2022-02-16T18:50:32.817" Title="How should the paradigm shift associated with functional programming be approached?" Tags="|undergraduate|functional-programming|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1091" PostTypeId="2" ParentId="502" CreationDate="2017-06-25T16:42:31.333" Score="4" Body="&lt;p&gt;Don't talk about them until far, far into the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the time I found out about GOTOs (inadvertently, reading some algorithm in a paper) I was already very used to loops, and I was able to see an easy way to rewrite that part of the algorithm using a list comprehension (Python). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the same way, don't introduce GOTOs in the course until your students are well able to use other techniques that can be used to rewrite code with GOTOs. Maybe spend some time rewriting code using GOTOs so they get used to that and the fact that there's nearly always a better way to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to teach mainly using a language like Python, which doesn't have a built-in GOTO function.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-25T16:42:31.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1092" PostTypeId="1" AcceptedAnswerId="1097" CreationDate="2017-06-25T17:09:14.277" Score="27" ViewCount="3478" Body="&lt;p&gt;A number of the assignments I've completed during the course of my undergraduate degree have been assessed partially using automated tests. These have never been available to students prior to the assignment submission, but I know this isn't the case at some universities. It would seem difficult to me to get less than 100% if all the test cases used for grading were released prior to the assignment deadline (provided the student gave enough time to the assignment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some cases, the feedback I've received has indicated that my submission failed a number of automated tests - but the test cases were never made available to students and I was left unsure as to what I had done wrong in my work and how I could improve next time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other cases, the test cases were made available &lt;em&gt;after&lt;/em&gt; the assignment grades were released. I much preferred this approach, because I could see exactly where I'd gone wrong and the whole process felt fairer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should automated test cases be released and if so, at what point should they be released? &lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2017-07-01T19:55:50.060" Title="Should test cases be made available to students for assessed assignments?" Tags="|undergraduate|grading|homework|" AnswerCount="9" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1093" PostTypeId="2" ParentId="961" CreationDate="2017-06-25T17:45:25.967" Score="1" Body="&lt;p&gt;I'd like to add two notes. First is that if &lt;strong&gt;you&lt;/strong&gt; write both the unit tests and the code, then all they test is that the code does what &lt;strong&gt;you&lt;/strong&gt; think it is supposed to do, not what it is &lt;em&gt;actually&lt;/em&gt; supposed to do. That is why Acceptance Tests are also used in agile development to test that the code does what the client/customer thinks it is supposed to do. With an imperfect understanding of requirements (or an incomplete test suite) you can pass all the tests and still not have a valid program. Also, if you write the tests &lt;em&gt;after&lt;/em&gt; the code, then all they test is that the code does what the code does. That is a waste of time, of course, except, perhaps, for regression. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, in the context of a course, if you are lucky enough to be able to project a computer screen for all to see then you can spend part of a class period developing a small application (100 or so lines) in front of the class, perhaps with a student &quot;navigator&quot; showing how TDD actually works. Bit of test, bit of code, repeat. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also expect that the number of lines of code in tests exceeds the number of lines in the application itself. That is normal. But if you use an adequate programming environment it isn't a burden. Especially since something like Eclipse will fill in the application method skeletons from what it finds in the tests (assuming JUnit, at least). Think of the test framework as your low level design space, where you design the public interface of  your classes. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-25T21:22:51.510" LastActivityDate="2017-06-25T21:22:51.510" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1094" PostTypeId="2" ParentId="213" CreationDate="2017-06-25T18:02:54.510" Score="8" Body="&lt;p&gt;Exponents representing the values of the digits in positional number systems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. the-arabic-system / denary / the-system-you-learnt-in-primary-school.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10³  10² 10¹ 10⁰&#xA;1000 100 10  1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or binary&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;2³ 2² 2¹ 2⁰&#xA;8  4  2  1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The binary example in binary&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10¹¹ 10¹⁰ 10¹ 10⁰&#xA;1000 100  10  1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This was @GypsySpellweaver idea, see comment.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-06-25T18:02:54.510" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1095" PostTypeId="2" ParentId="1092" CreationDate="2017-06-25T18:19:44.417" Score="18" Body="&lt;p&gt;I've always released a number of test cases for the purposes of clarity. I do have to double- and triple-check that my unpublished test cases are nevertheless &lt;em&gt;unambiguously&lt;/em&gt; specified in the documentation I provided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I am a computer science teacher, not a mystery novelist. It would never occur to me to deduct points for test cases that are not provided in advance without also telling the student what the test case in question is at the moment of the deduction. That seems plum crazy to me; how would the students learn this way? &lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-25T18:19:44.417" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1096" PostTypeId="2" ParentId="1092" CreationDate="2017-06-25T18:20:23.127" Score="5" Body="&lt;p&gt;The only time I would not provide them, is if you are asking the students to derive test cases. You should not be testing to see if they can guess the test cases. Success criteria, should always be made available. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exceptions, have most test cases available to pupils, but have one or two extra, but ensure that there is enough info in the question to derive it. One of the secret tests should be to test big O of the solution (as codility do on their on-line tests. They seem to specify the big-O for every question, but not the test).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Afterwards make it very clear where they lost grades (codility does not public the code for their tests, but does tell you what it tests, e.g. failed test of &lt;code&gt;O(n²)&lt;/code&gt;. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-25T18:33:52.103" LastActivityDate="2017-06-25T18:33:52.103" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1097" PostTypeId="2" ParentId="1092" CreationDate="2017-06-25T18:22:53.127" Score="50" Body="&lt;p&gt;My best practice would be to provide students with test cases and require them to submit additional test cases with their code. Then run everyone's test cases against everyone's code. Let the students know that they will get extra credit if their tests break anyone's code. That will put them in a mindset of creating tough tests and writing bullet-proof code, rather than stopping when the pass the provided tests.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-25T18:22:53.127" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1098" PostTypeId="2" ParentId="1092" CreationDate="2017-06-25T18:39:14.573" Score="10" Body="&lt;p&gt;&lt;em&gt;TL;DR: If there's no special reason against it, release them before the assignments are done. If you'd like to keep them secret to the students while developing, I would still recommend releasing them after the assignment for the students to help them to evaluate their mistakes.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think whether and when the test cases should be released depends on a few factors.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Not releasing the test cases&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You say that the assignments were only partially assessed by the unit tests, so in my understanding this means that there is somebody having a look at the source code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If (and only if) the assessment was fully automated and there were no human beings looking at the source code, you should not release the test cases before the assignment as otherwise it would be possible that somebody just created a program that has the required outputs for the test cases hard-coded and chooses the right one (using some kind of map or dictionary) depending on the input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you plan to put the same (auto-graded) assignment again on students in e.g. multiple courses, you might also want to avoid releasing the test cases after the assignment - otherwise students that have completed the assignment could be able to hand the required test cases through to the students that haven't yet completed the assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you however change the unit tests for an auto-graded system after releasing them (i.e. each course has it's own set of unit tests for the same task), then you could release them after the assignment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Releasing the test cases before the assignment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I can imagine a situation where it's neccessary to release the test cases and to do this before the assignment: If you're doing &lt;a href=&quot;https://en.wikipedia.org/wiki/Test-driven_development&quot; rel=&quot;noreferrer&quot;&gt;test-driven development&lt;/a&gt;. In this case having all the unit tests available to everybody would be essential as otherwise the whole strategy wouldn't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, the test cases could help students as they are examples of the program's in- and output if they have trouble understanding the specification (as specifications can benefit from examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would even go further and would recommend you to release the test cases before the assignment in almost any case unless you have specific reasons against it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Releasing it after the assignment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This could be an option if you want the students to figure out the algorithm without having examples (not sure when this is required, but maybe there are some sort of tasks that require that) but you want them to give a chance to review their mistakes after the assignment is done. I would always try to release them at the latest when the assignment is done.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-06-25T18:39:14.573" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1099" PostTypeId="1" AcceptedAnswerId="1102" CreationDate="2017-06-25T19:07:02.830" Score="23" ViewCount="5109" Body="&lt;p&gt;When I first started working with floating point arithmetic, issues like the one illustrated in the sample below both frustrated and confused me:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;scala&amp;gt; (1f/3)*3d // admittedly a bit contrived using 1f&#xA;res0: Double = 1.0000000298023224&#xA;scala&amp;gt; res0 == 1.0&#xA;res1: Boolean = false&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I was used to mathematics, and a calculator which used fixed point arithmetic - an environment in which the answers were always &quot;right&quot; (to a given number of decimal places)! The way most programming languages handled decimal numbers felt &lt;em&gt;broken&lt;/em&gt; and almost certainly useless for storing monetary values or for use in scientific code. I didn't appreciate the trade-off being made in terms of speed and space by taking the approach IEEE 754 did until much later on when I looked at the specification in detail and the analogy with standard scientific form was brought up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At what stage should students be introduced to how floating point numbers are stored, and (more importantly) how can the motivations for this approach be properly conveyed?&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2021-12-27T19:45:05.540" Title="How should floating point inaccuracies be explained and justified?" Tags="|number-system|" AnswerCount="7" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="1100" PostTypeId="2" ParentId="1099" CreationDate="2017-06-25T19:27:50.090" Score="9" Body="&lt;p&gt;Even fairly early coders need to understand some limited form of why &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    double a = 1.000001;&#xA;    double b = 0.000001;&#xA;    System.out.println((a-b)==1.0);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;ultimately prints &lt;code&gt;false&lt;/code&gt;, and how to avoid this problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a more serious understanding of &lt;strong&gt;IEEE 754&lt;/strong&gt; can wait.  I have my kids implement this standard (just the number representation, no arithmetic) as an elective after they have already learned about two's complement, big and little endian, and how a logical-gate 8-bit adder works.  Before they've had some time to live with and understand how binary numbers work, they won't have much of a chance of appreciating how floating point is dealt with on any serious level.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-25T19:27:50.090" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1101" PostTypeId="2" ParentId="327" CreationDate="2017-06-25T19:49:11.033" Score="7" Body="&lt;p&gt;In classroom sessions where I use presentations, prior to the session, I provide the students with access to a PDF of the presentation in which I have replaced select keywords, definitions, and other important items with blank lines.  The goal is to keep the students engaged by having them write in the missing parts.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students print paper copies of these PDFs and fill in the blanks on those paper copies.  But the past couple of semesters, a handful of students who own MS Surface or tablet devices with a stylus have been bringing those devices to class, downloading the PDF to their device, and using their stylus to write their notes directly onto the PDF.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This practice &lt;em&gt;might&lt;/em&gt; provide the best of both worlds: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;These students (writing with a stylus on a tablet or Surface) would seemingly be engaging the same cognitive processes as students who are writing longhand on a piece of paper. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;These students also have to write a lot less than students who (for whatever reason) do not avail themselves of the PDF and try to write everything down. That &lt;em&gt;should&lt;/em&gt; provide them with extra cognitive space to synthesize and understand the material. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;These students would have most of the advantages of those with a laptop -- searchable notes, access to Internet resources, etc. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One disadvantage is that unlike laptop users, these students cannot code directly on their device.  However, this can be mitigated if the instructor has students use their browsers to access a web/cloud-based IDE (e.g., Cloud9, Koding, etc.).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course the Surface/tablet users also suffer some of the same disadvantages as laptop users (e.g., distractions, temptation to multitask, etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have any solid data on how these students perform compared to students who use pencil-and-paper (or laptops) -- the number of these students is too small to generate statistically significant results -- but if the numbers were sufficiently large, it would be interesting to study how these students do compared to a) their peers using pencil-and-paper, and b) students taking notes on laptops.&lt;/p&gt;&#xA;" OwnerUserId="1321" LastEditorUserId="1321" LastEditDate="2017-06-25T19:56:35.013" LastActivityDate="2017-06-25T19:56:35.013" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1102" PostTypeId="2" ParentId="1099" CreationDate="2017-06-25T20:11:04.230" Score="24" Body="&lt;p&gt;If your students can understand why:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$\frac{1}{3} = 0.\dot{3}$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;then you can explain simply why floating point calculations are &quot;broken&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you divide one by three on a simple calculator, you can observe that it usually shows 0.333333333... until it runs out of digits (unless you have a more advanced calculator that can show recurring digits like &lt;a href=&quot;https://i.ytimg.com/vi/BF74WoLp6NE/hqdefault.jpg&quot; rel=&quot;noreferrer&quot;&gt;this&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can explain that the phenomenon observed here is because of the same thing: one third in floating point is an &lt;strong&gt;infinitely repeating&lt;/strong&gt; sequence:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$ \frac{1}{3} = 0.0\overline{10}_2$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we could store that fully, then multiplying it by three would indeed give us one, as expected. But, like our naive calculator, we don't store all the bits in the sequence, so you end up with a slight inaccuracy. Pointing out that&#xA;$ 0.333333333 \times 3 = 0.999999999$ should be enough to illustrate the point that with an infinitely repeating decimal, you will not get the correct answer unless all the digits are taken account of (and you'll always be ever so slightly off the correct value, no matter which approximation you use).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should then be clear to them that unless you use the exact value of $\frac{1}{3}$ in the binary representation, you will also get inaccuracies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something to note is that &lt;strong&gt;a finite decimal may be a repeating binary fraction&lt;/strong&gt; (a significant example is $\frac{1}{10}$, which is $0.1_{10}$, but $0.0\overline{0011}_2$), but &lt;a href=&quot;https://math.stackexchange.com/a/261989/378985&quot;&gt;not vice versa&lt;/a&gt;. Clearly, because of this, seemingly finite decimal numbers added together can lead to an infinite binary fraction, and hence an imprecise answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students are also familiar with &lt;strong&gt;scientific notation&lt;/strong&gt;, then explaining the floating point system of a significant and mantissa should also be relatively painless. Since floating point can represent both &lt;strong&gt;very small&lt;/strong&gt; and &lt;strong&gt;very large&lt;/strong&gt; numbers, representing numbers as $\text{significand} \times 2^{\text{exponent}}$ is the most flexible option. You need not elaborate much further than that, though, I don't think. As &lt;a href=&quot;https://cseducators.stackexchange.com/a/1100/2&quot;&gt;Ben I.&lt;/a&gt; mentions, a functional knowledge of floating point is needed, but the internals are probably not needed at this stage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see any reason why you &lt;em&gt;shouldn't&lt;/em&gt; introduce the reason why floating point numbers are inaccurate to them quite early on — it's probably worse &lt;em&gt;not&lt;/em&gt; to tell them, and leave them to be &lt;strong&gt;very&lt;/strong&gt; confused when their program doesn't work because of the tiny inaccuracies ruining comparisons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think &lt;a href=&quot;http://floating-point-gui.de/basic/&quot; rel=&quot;noreferrer&quot;&gt;floating-point-gui.de&lt;/a&gt; does a great job at explaining, very concisely, without any implementation details (and you can read on about the details &lt;strong&gt;if you want&lt;/strong&gt;). Using that as a resource may be helpful to find the right level to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to give your students something to play around with and get an understanding of the format of IEEE 754 floating point, you could try &lt;a href=&quot;https://www.h-schmidt.net/FloatConverter/IEEE754.html&quot; rel=&quot;noreferrer&quot;&gt;this floating point number converter&lt;/a&gt; which will show the representation of any number you enter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might also be wise to introduce a strategy to solve this problem—&lt;a href=&quot;http://floating-point-gui.de/errors/comparison/&quot; rel=&quot;noreferrer&quot;&gt;epsilon values&lt;/a&gt;. It should be relatively straightforward to explain that you just compare if a number is 'close' to what you expected with a floating point operation, rather than exactly equal; there are plenty of resources available that explain epsilon values further if necessary.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-06-26T19:14:21.367" LastActivityDate="2017-06-26T19:14:21.367" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="1103" PostTypeId="2" ParentId="1092" CreationDate="2017-06-25T20:50:40.587" Score="4" Body="&lt;p&gt;Test cases are a great tool for students relatively new to the discipline. Since I teach CS50 AP, my students have access to the command-line tool &lt;code&gt;check50&lt;/code&gt;, which they can run for nearly all the programs they write at the beginning of the year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my students who are new to the discipline, this helps them understand the need to read the problem specification thoroughly since each test case connects directly to something they are asked to implement. It's a relatively simple tool: if a test passes, they'll see a green &lt;code&gt;:)&lt;/code&gt;; if it fails, a red &lt;code&gt;:(&lt;/code&gt;; if something unexpected, a yellow &lt;code&gt;:|&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the difficult and the size of the programs scale, students have to stop relying on the tool and instead have to test their code thoroughly based on a careful, thorough reading of &lt;em&gt;exactly&lt;/em&gt; what they are being asked to do. Scaffolding in this way shifts the onus over the course of the year: they are given each test case in the beginning, but as the year progresses, it is more and more their responsibility to test their code for all possible inputs. This gradual transition works well. Here's how CS50 explains it when students reach the first assignment -- one which uses random numbers -- for which there is no &lt;code&gt;check50&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When ready to check the correctness of your program officially with&#xA;  &lt;code&gt;check50&lt;/code&gt;...well, you can’t. Reason being that the way the staff&#xA;  solution generates random numbers might in fact be different from your&#xA;  own, even though both do properly generate sets of random numbers.&#xA;  It’s up to you to determine that your program produces:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;&lt;p&gt;the correct number of pseudorandomly generated numbers,&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;each of which is greater than or equal to 0 and also less than (and&#xA;  not equal to) &lt;code&gt;max&lt;/code&gt;, and&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;li&gt;&lt;p&gt;that if your program is run with the same seed value multiple times,&#xA;  the list of numbers it generates is identical from run to run.&lt;/p&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;Not having access to &lt;code&gt;check50&lt;/code&gt; for this problem is actually a good&#xA;  thing. It’s a bad idea to get into the habit of testing your code with&#xA;  &lt;code&gt;check50&lt;/code&gt; before testing it yourself. (And definitely don’t get into an&#xA;  even worse habit of only testing your code with &lt;code&gt;check50&lt;/code&gt;!) Suffice it&#xA;  to say &lt;code&gt;check50&lt;/code&gt; doesn’t exist in the real world, so running your code&#xA;  with your own sample inputs, comparing actual output against expected&#xA;  output, is the best habit to get into sooner rather than later.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Truly, don’t do yourself a long-term disservice!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a final point on this topic, &lt;code&gt;correctness&lt;/code&gt; (passing each test case) is only one of four axes I use to assess their work. I also look at &lt;code&gt;scope&lt;/code&gt; (attempting to implement all aspects of a program), &lt;code&gt;design&lt;/code&gt; (efficiency of logic/algorithm(s) in a program), and &lt;code&gt;style&lt;/code&gt; (readability vis-a-vis variable names, indentation, etc.). If you only grade on getting the code right, then I could see not providing test cases for every test case. However, if there is a bigger picture to assess in terms of code style and design, then I see no problem in giving as much information up front in order to aid student learning.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-25T20:50:40.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1104" PostTypeId="2" ParentId="1090" CreationDate="2017-06-25T20:53:14.093" Score="7" Body="&lt;p&gt;Any true paradigm shift requires &lt;em&gt;literally&lt;/em&gt; re-wiring the brain. Thinking functionally is not the same as thinking procedurally (for example). The neural pathways of the brain need to be connected appropriately for the new paradigm to become natural. When you were a kid you were, if typical, used to walking and running. Then you probably got a bicycle (or a skateboard if you are young enough). You tried, you fell down, you tried again. Your brain got used to the subtle balancing required. Swimming - same deal. Differentiation - same deal. Haskell - same deal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an instructor, the above implies that you should provide guided practice at the beginning - a skateboard park for the mind. If your students solve a lot of simple problems (not syntactical, but logical) they will skin their knees on these but if they are &lt;em&gt;well chosen&lt;/em&gt; will get the skills. In scheme, reversing a list with only &lt;em&gt;head&lt;/em&gt; and &lt;em&gt;tail&lt;/em&gt; is simple enough. Doing it in linear time takes a bit more skill, but the technique is both cool and satisfying. Writing the code wires the brain. And, like riding a bicycle, it is hard to un-learn it once you get it, since the brain is now different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, make it possible for the students to fall a lot, but to get up without getting discouraged. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To add a bit of specificity to this. Assuming you know the paradigm well yourself, what are its 100 most important techniques? Can you come up with a 10-30 minute exercise for each of them? Try to have each exercise focus on just one thing (mostly anyway). These are your Etudes. Can you come up with 10 exercises for each of the 100 techniques, even if they vary only slightly? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Acknowledgement: At SIGCSE 2004, Owen Astrachan (of Duke) convinced Microsoft Research, through Jane Prey, to give every attendee the book &lt;em&gt;The Art of Changing the Brain&lt;/em&gt; by James E Zull. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-25T21:03:56.520" LastActivityDate="2017-06-25T21:03:56.520" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1105" PostTypeId="1" AcceptedAnswerId="1111" CreationDate="2017-06-25T20:55:21.887" Score="2" ViewCount="377" Body="&lt;p&gt;I have some students in highschool who already understand programming concepts (generally), and are fairly familiar with Python's syntax and logic, and have a beginning awareness of OOP in Python. I'd like them to get a quick crash course in Ruby for fun and general awareness of the language. The intent is to be able to write basic code in Ruby, both for web applications and back end applications using Rails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be a web course, or website I could have them read, that would bring them up to speed in the basics of Ruby so they could start writing code in it? I'd like it to be free. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;(I'm self-teaching, but this is rephrased as if I was teaching a class.)&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-25T21:39:39.203" LastActivityDate="2017-06-26T00:27:33.573" Title="A quick ruby crash course" Tags="|self-learning|resource-request|ruby|" AnswerCount="2" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="1106" PostTypeId="1" CreationDate="2017-06-25T20:59:49.067" Score="5" ViewCount="408" Body="&lt;p&gt;How can I best get students started with an open source project that they would be interested in and welcomed to? I'd prefer that the project is focused on building a piece of software, perhaps a command line based one. My students are high schoolers and are interested mainly in Python, though they are open to exploring other languages. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;(I'm self-teaching, but this is rephrased as if I was teaching a class.)&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="575" LastEditDate="2017-07-01T08:43:37.710" LastActivityDate="2018-06-02T11:03:24.293" Title="Starting open source" Tags="|secondary-education|python|" AnswerCount="9" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="1107" PostTypeId="2" ParentId="1106" CreationDate="2017-06-25T21:16:06.040" Score="10" Body="&lt;p&gt;Since you specifically mention high-schoolers getting started with open source, i have to recommend the &lt;a href=&quot;https://developers.google.com/open-source/gci/&quot; rel=&quot;noreferrer&quot;&gt;Google Code-In&lt;/a&gt;. I participated all 4 years as a high-schooler and really learned a lot about open source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The contest essentially has a dozen or so open-source organizations provide &quot;bite-size&quot; tasks. Each task is mentored, so the students have someone specific to ask questions of. There are both coding tasks and non-coding tasks (documentation, QA, outreach).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The contest itself lasts for only a month and a half (December-January), but the hope is that people get into it and stick around with the open-source projects they contributed to. Many of the grand prize winners do exactly that. See, for example, &lt;a href=&quot;https://opensource.googleblog.com/2015/04/google-code-in-2014-wrap-up-with-drupal.html&quot; rel=&quot;noreferrer&quot;&gt;this blog post&lt;/a&gt; by one of the 2014 winners. You can also read &lt;a href=&quot;http://scikcd.blogspot.co.il/2016/01/thoughts-on-google-code-in-2015.html&quot; rel=&quot;noreferrer&quot;&gt;my blog post&lt;/a&gt;, though i didn't win.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For university students, there is the &lt;a href=&quot;https://developers.google.com/open-source/gsoc/&quot; rel=&quot;noreferrer&quot;&gt;Google Summer Of Code&lt;/a&gt;, which is a similar idea with a rather different format. You must apply to be accepted, and do a single large task, and get paid a stipend.&lt;/p&gt;&#xA;" OwnerUserId="166" LastEditorUserId="166" LastEditDate="2017-06-26T08:43:07.613" LastActivityDate="2017-06-26T08:43:07.613" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1108" PostTypeId="2" ParentId="1105" CreationDate="2017-06-25T21:20:19.237" Score="3" Body="&lt;p&gt;I'd recommend that you look into &lt;a href=&quot;https://sinatrarb.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;sinatra&lt;/a&gt; or one of the tutorials that are linked from &lt;a href=&quot;https://www.ruby-lang.org/en/documentation/quickstart/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the ruby docs&lt;/a&gt;. They also have a specific tutorial in the docs for &lt;a href=&quot;https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/&quot; rel=&quot;nofollow noreferrer&quot;&gt;moving to ruby from another language&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I'd recommend sinatra is because it is an intro to what ruby is mainly used for in the real world: Web Development. A huge part of ruby is &lt;a href=&quot;http://rubyonrails.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ruby on rails&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A very interesting thing about ruby that you'll learn from the beginning is it's approach to OO. The simple phrasing is &quot;everything is an object&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enjoy ruby, it's a pretty great language.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-06-25T21:20:19.237" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1109" PostTypeId="1" CreationDate="2017-06-25T21:38:44.683" Score="4" ViewCount="262" Body="&lt;p&gt;At the end of the year, there is a gap between the AP Exam for AP Computer Science A and the last class meeting. Since students don't have to take a final after the AP Exam, there's not a lot of motivation for additional graded work. Nonetheless, I want to make the time meaningful, so my plan is to put together a short unit on Alan Turing, his contributions to CS, Turing Machines, Turing-completeness, the importance of the Halting Problem, the Turing Test, etc. Hopefully, I can integrate clips from &lt;em&gt;The Imitation Game&lt;/em&gt; as well to increase engagement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The unit as a whole would last a little over a week and would be engaging (as something post-AP Exam in May has to be). This would be for a small class of students just having completed two years of AP Computer Science and very likely studying CS in college. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there short lessons/units you have on Alan Turing that students respond well to? If you've taught some of the above concepts before (TMs, Halting Problem, Turing Test, etc.), what classroom resources do you have to explain them in a short, student-friendly manner?&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-06-28T04:29:15.213" LastActivityDate="2017-06-29T02:44:22.180" Title="Curriculum Design for a Unit on Alan Turing and His Impact on CS" Tags="|lesson-ideas|curriculum-design|resource-request|student-motivation|turing-machines|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1110" PostTypeId="2" ParentId="1109" CreationDate="2017-06-25T21:50:31.773" Score="3" Body="&lt;p&gt;With only a few weeks, it's hard to cover much in depth, but you can skim the surface of a few topics.  I would focus the unit by talking about the problem of computability that Turing and Church (and others) were facing.  It's a nice problem, because it is easy to describe in broad strokes, and the implications border on the mystical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would then go on as a class to look at how Turing attempted to explore the problem.  I would start with creating Finite State Machines, and run a few class periods of this to help them get the hang of it.  I might mention, but not really explore, the idea of a grammar, and talk about the equivalence of FSMs with regular expressions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I would skip PDAs and move right into Turing Machines.  Have them spend some time building them in class, and finally introduce the Busy Beaver problem with &lt;a href=&quot;https://www.youtube.com/watch?v=CE8UhcyJS0I&quot; rel=&quot;nofollow noreferrer&quot;&gt;this video&lt;/a&gt;.  Be prepared to stop and talk a few times during it to help them keep up to speed. The payoff at the end is totally worth it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would finish up by describing the Halting Problem, and talk a bit about what the implications of an Oracle would be if it could somehow exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the very end of the unit, I might mention that Turing created his solution using mutability as a core idea, but that there was another approach created by Church, Turing's mentor from Princeton, that used pure mathematical functions to accomplish the same thing.  The two of them proved that their systems were equally powerful in the Church-Turing Thesis.  And as funny as it sounds to have computation without mutability, there is an entire branch of programming languages devoted to exactly this approach called &lt;em&gt;functional languages&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously just mentioning this won't get them to understand functional languages, but it will set the stage for them later on in their undergrad CS years to appreciate why they are learning functional programming in the first place.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-25T21:50:31.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1111" PostTypeId="2" ParentId="1105" CreationDate="2017-06-26T00:27:33.573" Score="5" Body="&lt;p&gt;This is a different sort of answer than what you may be hoping for, but I'd really recommend that you deepen your knowledge of Python first. Learn to be pythonic, learn its OOP aspects. Learn its dynamic aspects. Become a Python Wizard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this advice, since you are fairly new at this, is that there is a danger that you will try to learn too many languages too soon and start to think of them syntactically only. There are a lot of &quot;java programmers&quot; for example, who only write C code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give an analogy from another field. I used to be a very good photographer. I had one manual film camera with a light meter and three lenses. One was a zoom lens since I wanted to backpack with not too much equipment. At that point I could take really nice photos. Artistic. Later I got lots of cameras, lots of lenses, lots of other &quot;stuff&quot; and my ability to really take good photos went down, not up. Too many tools in your tool box is not a help, especially for a beginner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, build skill first, then branch out. One big idea is called &quot;creativity under constraint&quot;. How much can you do if you artificially restrict your tool set? It sounds dumb at first, but with fewer tools your brain becomes your best and most powerful tool. Suppose your language didn't have loops. What can you still do? Recursion of course, but in an OOP language there are other options. Suppose, instead, it didn't have any sort of selection statements (if/switch...). Can you still write any program? Some become very difficult to write, but attempting to do this increases your brain power. Big Idea here. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-26T00:27:33.573" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1112" PostTypeId="2" ParentId="1099" CreationDate="2017-06-26T00:28:29.307" Score="4" Body="&lt;p&gt;Here are a few more ideas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Point out that that only $2^{32}$ values can be represented in 32 bits (or $2^{64}$ values in 64 bits), while there are an infinite number of real numbers. Therefore, not all real numbers can be represented exactly. For example, if you take the smallest positive number that can be represented exactly and divide it by 2, you can't represent it exactly (by definition).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain that floating-point numbers are represented as the sum of powers of 2. Have them compute relatively easy values, such as $1\frac{3}{4} = 1 + \frac{1}{2} + \frac{1}{4}$. Ask them to represent $\frac{1}{3}$ as the sum of powers of 2. They will not be able to.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-26T14:05:08.933" LastActivityDate="2017-06-26T14:05:08.933" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1113" PostTypeId="2" ParentId="1037" CreationDate="2017-06-26T05:55:48.007" Score="7" Body="&lt;p&gt;One approach that seems to work relatively well with a course I helped TA was to have students work on several homework assignments that put the theory they were learning to practical use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example... &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Have students implement their own regular expressions engine and make a simplified version of grep at the end of your unit on finite automata. (Depending on how challenging you want to make it, you could have them implement their own parser, a grammar for regexes, and an NFA to DFA converter, or some subset of the above).&lt;/li&gt;&#xA;&lt;li&gt;If you cover things like modular arithmetic, have them implement RSA (perhaps on top of a bignum library they also build, to up the challenge).&lt;/li&gt;&#xA;&lt;li&gt;If you're covering propositional logic, perhaps try having them encode complex problems/puzzles into logical constraints, and have them use an SMT solver like z3 to solve them, and point out that attempting to code up solutions to the same problems directly would either be much more inefficient or would be much harder to implement correctly. (You could have them write a generalized solver for sudoku or battleship or any number of other puzzles...). Assignments like these also sidestep the &quot;why do we need theory when we can just use a library or whatever&quot; objection, since the interface to these tools requires understanding theory!&lt;/li&gt;&#xA;&lt;li&gt;This is more suitable for a data structures and algorithms course, but if you're going to cover graphs (and relations?), maybe have them implement a simplified version of git or something. That said, if your students are unfamiliar with how to use version control, this probably isn't a great idea.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can calibrate the difficulty of these assignments to an appropriate level for your students by implementing pieces of the assignment for them. (For example, for the z3 thing, I'd probably host your own instance of z3 on a server somewhere and provide students with some pre-written code that calls out to it, since actually installing z3 is a bit of a PITA.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Giving these sorts of assignments seemed to have the effect of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Partially satisfying the students who are more interested in programming over theory.&lt;/li&gt;&#xA;&lt;li&gt;Showing that theory can be applied to actual, concrete, real-world programs.&lt;/li&gt;&#xA;&lt;li&gt;Helping humble some of the students who are a bit too over-confident and think being merely good at coding is enough to help them get by.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;That said, I wouldn't try and &quot;throw them in the deep end&quot;, as some of the other answers are suggesting. You want these assignments to be fun, not an exercise in frustration -- after all, the last thing you want to do is to make your students associate theory with frustration!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within our course, we also tried to emphasize the point that theory isn't some abstract, distant thing that's irrelevant for most programming applications, but can be deeply intertwined with practice and is in fact often &lt;em&gt;necessary&lt;/em&gt; if you want to work many interesting problems within computer science. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even adjust many traditional assignments to make them connect more strongly with CS. For example, if you cover structural induction, have students use structural induction to prove the correctness of (extremely simplified) Haskell or ML-ish programs. Or, perhaps try and have them use program verification tools like &lt;a href=&quot;https://github.com/Microsoft/dafny&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dafny&lt;/a&gt; to prove the correctness of basic programs (though TBH, asking them to work with Dafny or other formal verification tools might have the net effect of scaring them away from theory even more...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Disclaimer: I didn't come up with most of these project ideas -- I stole most of them from &lt;a href=&quot;https://courses.cs.washington.edu/courses/cse311/17sp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this course&lt;/a&gt; at my university.)&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-06-26T16:05:01.103" LastActivityDate="2017-06-26T16:05:01.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1115" PostTypeId="2" ParentId="1099" CreationDate="2017-06-26T08:09:46.570" Score="23" Body="&lt;p&gt;In my experience, the most confusing aspect here is not that there are rounding errors. Students should already have an understanding that there are physical limits that keep us from calculating with infinite precision all the time. What is confusing though is that these rounding errors occur in cases that might seem trivial to students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is important to understand here is that there are real numbers which do have a finite representation in decimal, but lead to an infinite representation when being converted to binary. &lt;code&gt;0.1&lt;/code&gt; is probably the canonical example here. &#xA;Students are used to thinking in base 10, so the most surprising rounding errors are those, where the operation still stays within the number of a couple of significant decimal digits, and therefore looks completely harmless when writing it down on paper, but still blows up because the numbers cannot be represented exactly in binary. Think: $0.1 + 0.2 - 0.3 \neq 0$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hammering this single point home should be enough to convince students that floats can lead to surprising rounding errors. The more challenging task is then to restore their faith in floats by explaining that the behavior of floats is still completely deterministic and one can actually give exact bounds for the expected rounding errors produced by a specific calculation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, many programming languages these days have support for &lt;a href=&quot;https://stackoverflow.com/questions/4825824/hexadecimal-floating-constant-in-c&quot;&gt;hex float literals&lt;/a&gt;, which allow specifying float literals in base 16, eliminating potential rounding errors when converting the base 10 numbers from the source code to the base 2 numbers used by the machine. You still can get rounding errors on each calculation, but knowing what the numbers look like to the machine makes it much more predictable when to expect such rounding errors. Also, most of these calculation rounding errors are actually not due to the machine being unable to calculate exactly, but rather the fact that the result of the calculation can not be represented exactly in float. So the result is often really the closest to the correct result that you can possibly achieve with the chosen representation.&lt;/p&gt;&#xA;" OwnerUserId="1370" LastEditorUserId="1370" LastEditDate="2017-06-26T08:34:05.167" LastActivityDate="2017-06-26T08:34:05.167" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1116" PostTypeId="2" ParentId="1037" CreationDate="2017-06-26T09:31:56.663" Score="5" Body="&lt;p&gt;&lt;strong&gt;Point of view from someone like them&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm someone who's similar to the students you're describing, so I'd like to share my views on this topic. I'm slightly older, so I have more experience bruteforcing problems that could be solved more quickly with a faster algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Through my years of education, I got very bored with learning things that I thought were meaningless and I liked to have a very deep understanding. I realized I just can't remember everything at the level I wanted to if I didn't practice them in my everyday projects, so I only practiced what I thought would be useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got myself a job as a software ENGINEER (eventually architect later), I am no expert in searching algorithms, so I left the theory and complex algorithm to the searchers/very specialized developers: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tree/Stacks/...  algorithm  (node rotating, ...) ? I don't remember them, however I remember that they're common structure to solve common problems I might face and their implementation exists in pretty much every language. &lt;/li&gt;&#xA;&lt;li&gt;Regular Expression/Compilation : I know they exists and are tools for solving specifics problems, I am very unlikely to need an advanced usage enough to need the theory.&lt;/li&gt;&#xA;&lt;li&gt;Data Mining ? I wouldn't be able to code again a Kernel SVM machine, however I do remember how to built around an application that need that: Normalization of data, learning/validation/test data with randomness, lambda-regression for correlation analysis.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Your students may have have set themselves the same kind of goal than me, leave the theory to searchers. However if they don't bother with theory, they must at least remember than what you present exists and there is no need to reinvent the wheel when it has already being done thoroughly tons of times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To summarize : you need to aim for different levels of what you want them to remember, because most of them won't go for a career that requires huge theorical knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;About developers that redo the wheel instead of using libraries/framework&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On my side, the first time I saw Hibernate (ORM), I trashed it and did all the request myself. Because I wanted to do well, I wrote up all the unit test for that. In the end, it took me a very long time testing that every fields was being inserted/updated correctly. So when I saw Hibernate come back to me, I definitively took the time to learn about it because doing it again would be : &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;a waste of time writing everything + tests&lt;/li&gt;&#xA;&lt;li&gt;a very boring thing to do.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So here is something you might try : make them write something and make write and tests like a real system. Everything they coded by themselves must be tested. Then make them use a library/Framework, of course everything the library /framework do, you don't test it. They will understand the huge earn of time and most of all : using a tools to do a job you will do many times over your career saves you from doing a lot of boredom and not interesting things.&lt;/p&gt;&#xA;" OwnerUserId="1375" LastEditorUserId="1375" LastEditDate="2017-06-26T10:52:25.013" LastActivityDate="2017-06-26T10:52:25.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1117" PostTypeId="2" ParentId="1106" CreationDate="2017-06-26T12:00:15.747" Score="3" Body="&lt;p&gt;Another possibility, assuming that you can find someone with more experience to mentor you, is to explore organizations in your town/city. There are many public and service organizations that do good work but may be a bit overcome by technology. If you explore possibilities with one or two of them you might be able too come up with a project of suitable scope that will help them do some good. In my town, for example, we have an agency dedicated to helping people through difficulties, financial and otherwise. Any funds they obtain (grants, donations) are dedicated to the work they do, not their own infrastructure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a mentor, you could start your own project and make it open source. Elsewhere here you asked a question about projects for a CS Club. This might be a possibility for such a group. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Managing your own project yourselves, however, is a lot of work. You will need a mentor, perhaps someone who can give you initial credibility. It could be one of your teachers, but it could also be someone at a local computing firm. Explore the possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Acknowledgement. Ward Cunningham (&lt;a href=&quot;http://www.c2.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.c2.com&lt;/a&gt;) once suggested something like this. He was focused on tax supported public utilities (local water companies, say) that have unmet computing needs and little expertise. They also pay a lot for their IT needs that could be better spent on their main goals. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-26T12:19:25.810" LastActivityDate="2017-06-26T12:19:25.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1118" PostTypeId="1" CreationDate="2017-06-26T12:00:45.427" Score="4" ViewCount="107" Body="&lt;p&gt;I am trying to think of a way to demonstrate how a multi-client server works, from the aspect of the broadcast messages sent from the server in response to a message from one of the clients.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought of making a small demonstration with cups and strings, having 4 to 5 &lt;a href=&quot;https://en.wikipedia.org/wiki/Tin_can_telephone&quot; rel=&quot;nofollow noreferrer&quot;&gt;cups on strings&lt;/a&gt; which are all connected to a main hub, rather than to each other. The hub is simply a closed box with holes where the other end of each line goes to, and a cup sized hole at the top. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students speak into the cup, all the students hear what was said, because it was a broadcast from the main hub. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this example sounds cool, I am not sure if it covers all&lt;sup&gt;1&lt;/sup&gt; sides of a multi-client server. What differences between a multi-client and the cup-string-hub example should I point out? (e.g. one of the differences I found is protocols, which the example doesn't exactly convey). I am talking about back-end differences, and not front-end ones.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;There are many things to cover, but I'm referring to the basics, as this is a first lesson in the subject of multi-client servers. They have tackled single client servers, so it's not an intro lesson.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-03T11:22:18.857" LastActivityDate="2017-07-03T11:22:18.857" Title="Multi-client to server connection demonstration" Tags="|secondary-education|teaching-analogy|server-client|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1119" PostTypeId="2" ParentId="1099" CreationDate="2017-06-26T14:02:49.683" Score="2" Body="&lt;p&gt;As a student myself, I had a course about how processing and encoding works where we had a detailed part about operations in different bases and how &lt;code&gt;floats&lt;/code&gt; and &lt;code&gt;doubles&lt;/code&gt; differ from one another by the number of bytes allocated, and how the computer's different ways of encoding floating numbers can be done by hand to get a grasp of it, but this wasn't until my third year, after having a first introduction to operations in different bases during my second year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only basic understanding of numbers in different bases and knowledge of the fact that &lt;code&gt;floats&lt;/code&gt; are coded on a given number of bits is necessary to understand why it may be a problem, you could use the example of scientific calculations, where precision is important to make students get the stakes. But if you want students to really understand it fully, I think training operations in different bases and making them try by hand floating numbers coding and rounding may be necessary to get how frequent approximations are and how trivial calculations can give an answer different than what's expected, but more time consuming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you want a playful and yet well explained way to teach students how those imprecisions work and how it may affect programs, here is a 10 min long video about floating numbers imprecision in mario 64 that's really well explained : &lt;a href=&quot;https://www.youtube.com/watch?v=9hdFG2GcNuA&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=9hdFG2GcNuA&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1386" LastEditorUserId="41" LastEditDate="2017-06-27T14:29:25.827" LastActivityDate="2017-06-27T14:29:25.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1120" PostTypeId="2" ParentId="961" CreationDate="2017-06-26T14:23:45.233" Score="0" Body="&lt;p&gt;I think students might fail to appreciate the benefits of TDD if they are working primarily alone.  They probably just view it as an impediment to doing the &quot;fun stuff&quot;, up-front grunt work they have to do before they can start coding.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in the real world many developers fail to appreciate the benefits of thinking about testing up front until they've been through a few projects and see the chaos that can ensue when insufficiently tested code gets deployed to upper environments and/or production.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the full software lifecycle, time will be spent identifying bugs and fixing them.  If you employ TDD and write test-driven code, you spend the time up front.  If instead you just start hacking away, don't test your code, and throw it over to the testing group, time will still be spent finding and fixing bugs.  It might not be spent by you but someone, somewhere will hopefully discover your bugs through testing, filing bugs, and fixing bugs.  But it's usually more time effective to think about it up front.  So while spending time doing TDD may seem annoying, it usually leads to overall time savings from the perspective of the entire project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TDD in my opinion addresses two challenges that are present on almost every software project:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) It's hard to collect requirements, document them, and turn them into test cases with a sufficient amount of detail that the software can be tested against actual requirements.  While it may sound simple, many requirements are identified through conversations, meetings, industry research, ideas, etc. In a team environment, not everyone is aware of every requirement.  And usually business people don't make good developers, developers don't make good testers, and testers don't make good business people, but all 3 groups have to work together.  And nobody wants to write a super long and comprehensive requirements document and try to keep it up to date, and documentation tends to become obsolete immediately.  Test driven development tries to address this by making every developer and team member part of the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) This last point is probably the most important point, many developers prefer only to do the &quot;fun stuff&quot; which is the coding, and have a tendency to assume that things like testing, accuracy, performance, integration, etc. are &quot;someone else's problem&quot;.  They can develop a mentality of writing code, doing limited testing, and then checking it in, assuming that someone else will somehow complete it.  Some people say that this is the difference between being &quot;done&quot; and &quot;done done&quot;.  Software needs to be &quot;done done&quot; before it can work correctly but many developers only get it &quot;done&quot;.  TDD serves to address this problem by introducing a different mindset to the team, to make every developer aware that their code must be tested, and requires them to understand the context within which their code was developed and participate in all aspects of the software lifecycle and not just the coding.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-26T14:23:45.233" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1121" PostTypeId="1" CreationDate="2017-06-26T14:32:25.447" Score="4" ViewCount="193" Body="&lt;p&gt;I'd like to create a college-level AI course based on the &lt;a href=&quot;https://www.wired.com/2012/03/ff_aiclass/&quot; rel=&quot;noreferrer&quot;&gt;famous&lt;/a&gt; &lt;a href=&quot;https://www.udacity.com/course/intro-to-artificial-intelligence--cs271&quot; rel=&quot;noreferrer&quot;&gt;AI MOOC&lt;/a&gt; created by Peter Norvig and Sebastian Thrun. My reasoning is that I wouldn't be able to create lectures as good as theirs, especially because I'm not particularly knowledgeable about AI. (The last AI course I took was in the early 90s.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would teach a &quot;flipped&quot; course in which the students watched lectures on their own, and we used class time to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;prepare them for upcoming material they might have trouble understanding (based on my knowledge of their background).&lt;/li&gt;&#xA;&lt;li&gt;answer questions or elaborate on recently presented material.&lt;/li&gt;&#xA;&lt;li&gt;supervise group work to apply what they've learned.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Beyond these general principles, I have no idea how to teach a flipped course. Can anyone offer guidance or resources, both in general or for this specific course?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-06T10:30:22.927" Title="How to teach a flipped course based on the AI MOOC?" Tags="|curriculum-design|resource-request|artificial-intelligence|" AnswerCount="3" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1122" PostTypeId="2" ParentId="927" CreationDate="2017-06-26T14:33:54.907" Score="1" Body="&lt;p&gt;I know that this might not be the answer that you're looking for but I have been a software engineer for over 20 years and I feel that coding and software engineering is just simply not for everyone.  I believe that it takes a certain mindset and interest to grasp and pursue coding and software, and this is more true the more sophisticated the topic.&lt;/p&gt;&#xA;&lt;p&gt;This is not to say that software engineers individually or as a group are smarter than other people, which I don't think is true either.  My wife has a master's degree in a non-technical field (I myself have only a BS in CS), and when I try to describe what I do at work her eyes just glaze over.  She will sometimes watch over my shoulders as I'm working and all she says is, &amp;quot;wow your job is really tedious!&amp;quot;.  This is just how it seems to her.&lt;/p&gt;&#xA;&lt;p&gt;I know countless people in the industry who started out as developers and did it for a year or two even though they did not like it, and later moved on into other related positions such as project manager, trainer, technical writer, etc.  Doing hard core problem solving 5-10 hours a day dealing with things that are only in your mind and don't exist in the real world isn't something that everyone can relate to.&lt;/p&gt;&#xA;&lt;p&gt;Edit: One more comment on this. Since I wrote this answer 3 years ago my kids have gotten into high school and are starting to decide what they want to pursue in college. They are both very advanced in math, my son completed calculus as a high school junior and just took the SAT and got an 800 in math. He is of the generation that is surrounded by technology and uses it every day.  However he has zero interest in coding or even software or IT. He sees what I do and has tried it but just doesn't like it. I am sure he is technically intelligent enough to do it if he had to but he has tried it and just finds it boring and uninteresting. I think kids and their parents and teachers should just be realistic about whether or not coding is something the kid genuinely wants to do or if they are doing it because someone told them it would get them a good job one day.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastEditorUserId="1292" LastEditDate="2020-09-25T21:03:44.720" LastActivityDate="2020-09-25T21:03:44.720" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="1123" PostTypeId="2" ParentId="1106" CreationDate="2017-06-26T14:41:38.870" Score="1" Body="&lt;p&gt;Depending on what you are trying to teach, Java has a very extensive and comprehensive open source community, and one way to introduce students to this is to come up with a technology &quot;stack&quot; which will probably be made up of 5-10 different open source technologies.  You could either start from scratch and introduce one open source technology after another to build up a full working application, or start with a partial project and add new technologies to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A typical stack is a database such as MySQL, an application lawyer such as Spring, and a front end / HTML technology such as Angular.  This kind of application might be more accessible to students because they'd be writing a web application that they can view in their browser.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-26T14:41:38.870" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1124" PostTypeId="2" ParentId="327" CreationDate="2017-06-26T14:44:43.677" Score="2" Body="&lt;p&gt;I've been a software engineer for over 20 years and over time I have finally gotten out of the habit of taking notes by hand.  Part of this is because my handwriting is terrible, and part of it is that I am literally always in front of a computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not find that I retain information any worse when take notes on the computer, and I type much faster than I can write so I can record more information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I am a doodler and a visual thinker and being able to draw pictures and diagrams is important for me to understand, remember and communicate things. It is hard to find good programs on the computer that let you do this as easily as whipping out a pen and paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my kids elementary school, they stopped teaching cursive in favor of typing.  I think that speaks volumes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do let the kids use a computer you will need to lock that down somehow or they will be surfing the web or playing games or texting their friends.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-26T14:44:43.677" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1125" PostTypeId="2" ParentId="1118" CreationDate="2017-06-26T15:24:26.307" Score="2" Body="&lt;p&gt;If your students are old enough to own phones and send text messages, then perhaps you could use group-texting as an example?  One person in the group sends a message to the others; the message goes off to the company's server, which broadcasts the message to the people in the group?  Depending on their age, that might be an example to which they could relate and that would engage them...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess it depends on how deeply you want to go.  You could delve into the details of &lt;a href=&quot;https://en.wikipedia.org/wiki/Broadcasting_(networking)&quot; rel=&quot;nofollow noreferrer&quot;&gt;broadcasting&lt;/a&gt; vs &lt;a href=&quot;https://en.wikipedia.org/wiki/Multicast&quot; rel=&quot;nofollow noreferrer&quot;&gt;multicasting&lt;/a&gt;, in which the sender of the message (the server in your example) sets the correct bits in each packet and the underlying network takes care of ensuring that the right packets get to the right clients.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is no network-level support for broadcasting or multicasting, a &quot;broadcast&quot; among N clients can still be done fairly efficiently in a distributed manner, without involving a server. For example, suppose N is 8, the clients are numbered 0-7, and 0 (which could be your server) wants to broadcast a message.  Then...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;At time 1: 0 sends the message to 4 &lt;/li&gt;&#xA;&lt;li&gt;At time 2: 0 sends the message to 2 and 4 sends it to 6 &lt;/li&gt;&#xA;&lt;li&gt;At time 3: 0 sends the message to 1, 2 sends it to 3, 4 sends it to 5, and 6 sends it to 7&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This approach can &quot;broadcast&quot; a message among N clients in &lt;em&gt;O(lg(n))&lt;/em&gt; steps, so long as the network allows different clients to send simultaneously.  What's happening there is quite different from your cups-and-string demo...&lt;/p&gt;&#xA;" OwnerUserId="1321" LastEditorUserId="150" LastEditDate="2017-06-29T14:32:16.163" LastActivityDate="2017-06-29T14:32:16.163" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1126" PostTypeId="1" CreationDate="2017-06-26T15:50:11.917" Score="31" ViewCount="7346" Body="&lt;p&gt;I teach at Mills, a women's college near Silicon Valley with a high number of students of color. We do a great job of preparing students technically -- they do very well on the job market and then in their jobs. What I am unsure of is how to prepare students for the transition from a nurturing, feminist liberal arts environment to industry, which is not only more rough-and-tumble for everyone but can include bias based on &lt;a href=&quot;https://www.theatlantic.com/magazine/archive/2017/04/why-is-silicon-valley-so-awful-to-women/517788/&quot; rel=&quot;noreferrer&quot;&gt;sex&lt;/a&gt;, &lt;a href=&quot;https://www.dailydot.com/via/black-woman-tech-industry/&quot; rel=&quot;noreferrer&quot;&gt;race&lt;/a&gt;, &lt;a href=&quot;https://www.usatoday.com/story/tech/columnist/2016/09/15/silicon-valleys-not-so-secret-bias-ageism/90120616/&quot; rel=&quot;noreferrer&quot;&gt;age&lt;/a&gt;, etc., which may cause them to &lt;a href=&quot;http://www.kaporcenter.org/tech-leavers/&quot; rel=&quot;noreferrer&quot;&gt;leave the tech industry&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I prepare my students to not have their careers derailed by mistreatment in industry?&lt;/strong&gt; I don't want to just scare them out of the major or make them fearful by mentioning discrimination without providing a solution.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-26T16:10:11.270" LastActivityDate="2017-07-13T16:38:32.207" Title="How to prepare students for bias in industry" Tags="|equity|" AnswerCount="9" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="1127" PostTypeId="2" ParentId="1126" CreationDate="2017-06-26T16:06:15.870" Score="8" Body="&lt;p&gt;As a male high school teacher in a gender-mixed school, there are certain limits to what I can add here, but it is an issue that I care deeply about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first source of information would be the girls themselves.  I would create a poll for graduates of the program, because they will have the most insight into whether they were really prepared for whatever obstacles they encountered.  I would ask them:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how they are faring generally&lt;/li&gt;&#xA;&lt;li&gt;whether they are still in the field of computing, whether they were well prepared technically&lt;/li&gt;&#xA;&lt;li&gt;whether they were well prepared to handle bias in industry, and &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;(most important)&lt;/strong&gt; I would ask them follow-up questions for suggestions on how to improve the program, especially with regards to being prepared for bias.  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These follow-up questions presumably have the potential to be the single most important source of &lt;em&gt;actionable&lt;/em&gt; information for you and for your program.  These are really the only women who know how effective what you have done thus far has been.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I currently do with my very few female and minority students is simply to emphasize to them that they are needed in this field, and to offer support if they ever feel that they need it.  So far, no one has taken me up on this offer. This could either indicate that they feel comfortable, or that they do not feel like I could help them, or that they do not wish to approach me specifically. (I hope it is the first option, and I &lt;em&gt;certainly&lt;/em&gt; hope it is not the last one.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are tough issues, and they're getting a lot of national attention, but I have not seen many good answers. I am hopeful that the discussion here will bring new insights.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-26T17:38:05.883" LastActivityDate="2017-06-26T17:38:05.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1128" PostTypeId="5" CreationDate="2017-06-26T16:11:04.473" Score="0" Body="&lt;p&gt;Questions on Equity will concern methods for ensuring fair treatment of all students regardless of the student's individual situation or characteristics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Equity is especially important for factors outside the individual student's control, such as race or sex, but it is not limited to that. Factors such as poverty and societal discrimination are known to have negative impact on outcomes that can be mediated by some educational practices. The same is true of certain medical conditions, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Equity questions can include guidance on aiding members of underrepresented groups succeed in the classroom, but also beyond. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T11:57:11.083" LastActivityDate="2017-07-13T11:57:11.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1129" PostTypeId="4" CreationDate="2017-06-26T16:11:04.473" Score="0" Body="Questions on promoting fairness, especially the inclusion of groups underrepresented in computer science." OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-26T16:24:23.480" LastActivityDate="2017-06-26T16:24:23.480" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1130" PostTypeId="2" ParentId="1126" CreationDate="2017-06-26T16:34:24.423" Score="13" Body="&lt;p&gt;As part of our department's colloquium series, we've started holding an annual free showing of a movie that depicts bias, and encouraging &lt;em&gt;all&lt;/em&gt; of our students to attend.  This showing is in the evening, publicized, and open to the community. We invite local high school students, especially those from under-represented groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last September, we showed &quot;CODE: Debugging the Gender Gap&quot;, and followed it with a panel of female software developers from local tech companies discussing their experiences, and fielding questions/comments from the audience.  It was quite successful -- 10pm came and people didn't want to leave.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are still deciding what we'll do this year, but are leaning toward showing &quot;Hidden Figures&quot;.  Back in December, several students and I saw it in the theater, and it is &lt;em&gt;very&lt;/em&gt; engaging -- there were audible gasps from our students during some of the scenes. The only downside is that because it depicts events that happened 50+ years ago when bias and discrimination were more overt, it will likely take some extra work to show the students that it is still an issue today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The companies in our industrial-advisory board are very interested in increased diversity; one of them generously sponsors these showings by purchasing the DVD with the necessary public-viewing license (as opposed to the home-viewing license that comes with normal DVDs).&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-06-26T16:34:24.423" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1131" PostTypeId="2" ParentId="1126" CreationDate="2017-06-26T16:52:11.610" Score="7" Body="&lt;p&gt;If your students excel in what they do and in their careers, treating them in a biased way would hold significantly less ground. There may well be 2-3 people who mistreat them, but their supervisors won't care about their background simply because they have seen that they get the job done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students are prepared to make an effort to prove that their gender\age\race or anything bias being thrown at them is completely irrelevant. By doing so, not only will they better themselves, they completely invalidate bias arguments thrown at them. Even if at first their supervisors are the biased ones, sticking to their goal and excelling at their careers would either get them higher than the supervisor (perhaps by switching work places to a better position somewhere) or the supervisor would change their minds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The core of my suggestions is to explain how being dedicated and motivated often solves the bias people in the industry, and as an added bonus, they gain from it regardless of the bias people. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching the value of hard work should do the trick. For a highly dedicated person, very high performance requirements (such as ones that dispute any relevance of one's age\gender\race or anything bias being thrown at them) are more a motivator than a discouraging factor.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-26T17:25:55.687" LastActivityDate="2017-06-26T17:25:55.687" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="1132" PostTypeId="2" ParentId="1126" CreationDate="2017-06-26T17:15:10.850" Score="11" Body="&lt;p&gt;While not a member of your target group, I've thought about this for years. One of the best things you can do is make sure that the students have both strong ties while students (duh), but also a permanent way for them to communicate, form communities, and take action throughout the rest of their lives. Long ago, Carnegie Mellon, I think, promised every student that their university email address would never disappear. They would be able to communicate with each other and the U in perpetuity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my institution we did something similar with one group (doctoral students) but for a different reason. We provide an email distribution list that every student belongs to and that is always available. The students have formed incredibly strong bonds across the country and across graduation years. They mostly use it to help each other find more satisfying employment when needed, but also to ask for and get supports of various kinds. Community can be a powerful thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such an online community also makes it easy to find previous graduates to return to talk to students as well as to mentor one another both personally and professionally. Faculty should also be involved in this, not just the alumni office. Nor would I limit it to a subset of students. Given the age of the college, I'm sure you have many graduates in positions of power and influence. Get them into the picture. Wellesley College has been good about this, I think. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long term, however, discrimination dies hard and rears up from the dead, so work to put and keep the zombie in the grave.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-26T17:15:10.850" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1133" PostTypeId="2" ParentId="1092" CreationDate="2017-06-26T17:40:25.213" Score="5" Body="&lt;p&gt;&lt;strong&gt;Yes, Absolutely&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test cases are necessary to communicate what you expect the student's program to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, instructors create 3-5 test cases and make at least 2 visible to the students. That way, students know what is expected but can't tailor their solution to just those test cases as they still need to accommodate for the hidden ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test cases must include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Exact stdout (output printed on the console)&lt;/li&gt;&#xA;&lt;li&gt;Clear indication of what will be user input using stdin&lt;/li&gt;&#xA;&lt;li&gt;Any files available to the student to read from (remember to tell the students what the name of the file is and the formatting of it)&lt;/li&gt;&#xA;&lt;li&gt;Any files that the student is expected to write (tell them what path they should write to and how they should format their files)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an example of a test case that is provided to students on &lt;a href=&quot;http://www.autogradr.com&quot; rel=&quot;noreferrer&quot;&gt;AutoGradr&lt;/a&gt;:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/0nUIe.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/0nUIe.png&quot; alt=&quot;Test Cases on AutoGradr.com&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2017-06-26T17:40:25.213" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1134" PostTypeId="2" ParentId="1126" CreationDate="2017-06-26T17:51:25.927" Score="24" Body="&lt;p&gt;[I asked the question. Even though I don't have the full answer, I want to share what we do, in case it is helpful.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Role Models&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Throughout the entire graduate and undergraduate programs, there are female professors and guest speakers, including women of color. In lecture, I highlight the work of all types of people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Connecting Students to Support Communities&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When surveying students at the beginning of the semesters to get their preferred name, contact information, pronouns, etc., I ask them to optionally provide demographic information that can help me match them with conferences and special programs for which they are eligible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We encourage students to attend the &lt;a href=&quot;https://ghc.anitaborg.org/&quot; rel=&quot;noreferrer&quot;&gt;Grace Hopper Celebration of Women in Computing&lt;/a&gt;, the &lt;a href=&quot;http://tapiaconference.org/&quot; rel=&quot;noreferrer&quot;&gt;ACM Richard Tapia Celebration of Diversity in Computing&lt;/a&gt;, &lt;a href=&quot;https://lesbianswhotech.org/&quot; rel=&quot;noreferrer&quot;&gt;Lesbians Who Tech&lt;/a&gt; summits, &lt;a href=&quot;https://alterconf.com/&quot; rel=&quot;noreferrer&quot;&gt;AlterConf&lt;/a&gt;, etc., and we subsidize their attendance. In some cases, faculty attend with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fighting the Impostor Syndrome&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I educate students about the &lt;a href=&quot;http://geekfeminism.wikia.com/wiki/Impostor_syndrome&quot; rel=&quot;noreferrer&quot;&gt;Impostor Syndrome&lt;/a&gt;, repeatedly. I tell them that it is normal to feel overwhelmed and incompetent at times. It does not mean they don't belong in CS; it means they're being challenged. When I correct students' mistakes, I let them know that I've made the mistake too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Direct Discussion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When an event is in the news and on students' minds, such as the publication &lt;a href=&quot;https://www.susanjfowler.com/blog/2017/2/19/reflecting-on-one-very-strange-year-at-uber&quot; rel=&quot;noreferrer&quot;&gt;Susan Fowler's essay about Uber&lt;/a&gt;, I mention it in class and provide context. (On the negative side, her experience was awful. On the positive side, people are listening to her, which would not have been the case in the past.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the capstone course this spring, I assigned students the following readings (which, in hindsight, were overwhelming):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.theatlantic.com/magazine/archive/2017/04/why-is-silicon-valley-so-awful-to-women/517788/&quot; rel=&quot;noreferrer&quot;&gt;Why is Silicon Valley So Awful to Women?&lt;/a&gt; by Liza Mundy, &lt;em&gt;The Atlantic&#xA;Monthly&lt;/em&gt;, April 2017. &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.susanjfowler.com/blog/2017/2/19/reflecting-on-one-very-strange-year-at-uber&quot; rel=&quot;noreferrer&quot;&gt;Reflecting On One Very, Very Strange Year at Uber&lt;/a&gt; by Susan J. Fowler, February 19, 2017. &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.usatoday.com/story/tech/columnist/2016/09/15/silicon-valleys-not-so-secret-bias-ageism/90120616/&quot; rel=&quot;noreferrer&quot;&gt;Silicon Valley's not-so-secret bias: Ageism&lt;/a&gt; by Jon Swartz, &lt;em&gt;USA Today&lt;/em&gt;, September 15, 2016. &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://boingboing.net/2016/03/15/squarespace-exec-told-staffer.html&quot; rel=&quot;noreferrer&quot;&gt;Squarespace staffer claims exec told them &quot;you’re so black, you blend into the chair&quot;&lt;/a&gt; by Rob Beschizza, March 15, 2016. &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://jezebel.com/5991792/woman-in-tech-tweets-about-sexist-dudes-in-tech-dude-get-fired-internet-meltdown-ensues&quot; rel=&quot;noreferrer&quot;&gt;Woman in Tech Tweets About Sexist Dudes in Tech. Dude Gets Fired. Internet Meltdown Ensues&lt;/a&gt; by Lindy West, Jezebel, March 21, 2013. [I chose this article for the summary of events, not the subsequent analysis. I told students they could stop reading after Richards' firing.] &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.npr.org/2011/02/14/133599768/ask-for-a-raise-most-women-hesitate&quot; rel=&quot;noreferrer&quot;&gt;Ask For A Raise? Most Women Hesitate&lt;/a&gt;&#xA;by Jennifer Ludden, All Things Considered, February 8, 2011.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I asked them to write a one-page essay with their reactions to the readings and suggested the following optional questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are you concerned about your work environment after Mills? &lt;/li&gt;&#xA;&lt;li&gt;Have&#xA;people ever told you it will be easier or harder for you to get hired&#xA;because of your sex, race, age, or other non-work-related&#xA;characteristic? Do you think they are right? &lt;/li&gt;&#xA;&lt;li&gt;Why do you think people&#xA;sometimes stay so long in bad work situations? &lt;/li&gt;&#xA;&lt;li&gt;Have you or anyone you&#xA;cared about experienced mistreatment in the workplace? Was it&#xA;remedied? &lt;/li&gt;&#xA;&lt;li&gt;Have you ever negotiated a job offer or raise? How did you&#xA;feel about your experience? &lt;/li&gt;&#xA;&lt;li&gt;Are there other articles on these topics&#xA;that you've read and would recommend? If so, cite and summarize them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Their answers allowed me to discuss their specific concerns with them individually and in class. For example, some women of color worried that they would be given jobs for which they were not qualified, either directly from companies or through special programs targeting minorities. I let them know that I (a white woman from an upper-class background) got my first programming job through family connections: I was qualified for it, but there's no way I would have been considered (fresh out of high school) without connections. If their families lack connections (which is overwhelmingly the case for my students), they should take advantage of other ways to get a foot in the door, paying it forward later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Alumnae Examples&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the day we discussed the above readings, a recent graduate came to speak about her job and how she successfully advocated for herself, such as not letting herself get interrupted and telling people when they attributed to someone else an idea that she had originally suggested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pre-coaching for Industry&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I advised students that they should maintain a network inside and outside their company, keep their resume up-to-date, and save some of their money (if possible) so they can move if necessary. If a bad situation arises, they should consult their support network for perspective/affirmation, document everything offsite, and not blindly trust HR or management. I let them know they could also come to us any time for advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Career Counseling&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students are considering accepting jobs, I steer them to companies with good reputations for their treatment of people like them and where we have alumnae or friends in mid-level or senior positions who can help them. If a student gets an offer from a company I don't know, I use my network (LinkedIn, Systers, etc.) to find out the company's reputation.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-26T17:51:25.927" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="1135" PostTypeId="2" ParentId="400" CreationDate="2017-06-26T18:40:21.067" Score="1" Body="&lt;p&gt;&lt;strong&gt;Coding style has to be part of the grade&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this to work, students need to know that they have written bad code or are not following industry standard guidelines. You should introduce them to lint tools so they can make it part of their workflow earlier in the learning process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some of the lint tools that we use:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Python: &lt;a href=&quot;https://www.pylint.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;pylint&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;C++: &lt;a href=&quot;https://github.com/google/styleguide/tree/gh-pages/cpplint&quot; rel=&quot;nofollow noreferrer&quot;&gt;cpplint&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Java: &lt;a href=&quot;http://checkstyle.sourceforge.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;checkstyle&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The easier you make it for students to know where they have gone wrong, the more likely it is that they'll improve their code. I suggest automating this in some way to make it part of their submission.&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2017-06-26T18:40:21.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1136" PostTypeId="2" ParentId="1099" CreationDate="2017-06-26T18:57:39.607" Score="9" Body="&lt;p&gt;A few points:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do not call the discrepancies rounding errors&lt;/li&gt;&#xA;&lt;li&gt;Do not confuse students with epsilon math&lt;/li&gt;&#xA;&lt;li&gt;Do not obsess on teaching them exactly how IEEE floats are stored&lt;/li&gt;&#xA;&lt;li&gt;Do not show them examples of the problem without explaining why things happened the way they did&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Teach them this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Floats are confusing precisely because the way they are stored and the way they are represented is incompatible.  The values don't always translate 1 to 1. Some values that are easy to represent can't be stored faithfully with finite memory. So they are converted (not rounded) to the closest storable value available. Sometimes this goes completely unnoticed because when that stored value is converted (not rounded) back to a representation it ends up being the same representation it had before it went in. However, if math is done on this value then it's done on the stored value. The new stored value might get lucky and convert back to the correct representation. It might not. It's this &quot;might&quot; thing that makes this so hard. I can run tests on numbers thinking I got back what I put in so it must store exactly only to have my heart broken when I do math with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1.03 - .42&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;gives&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0.6100000000000001&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;On their own 1.03 and .42 convert in and out of memory fine despite not being perfectly stored. Their difference is ALMOST right. It just doesn't happen to convert the way we hoped. Other math can put us at this same stored value that expects exactly this representation. There's no perfect way to round it. We simply don't know any more at this point than what was stored. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;.01 - .02&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;gives a perfect&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;-0.01&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Why? Because we got lucky. The information that was lost in conversion just happened to not be enough to matter once it was converted back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hate problems that are hard to diagnose because I keep getting &quot;lucky&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you can throw a lot of math and diagrams at this problem trying to explain how floats are stored but the thing to teach is how to know which numbers can't be stored perfectly.  Because the computer isn't going to tell you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's the students expectation of how floats will behave that you want to cultivate. They shouldn't expect them to behave like calculators. They shouldn't expect them to be useless. They should expect if you can't get to a number by addition and dividing by 2 that the numbers are going to be fuzzy. That's fine for scientific measurements that just want to be close. Not good for accounting that cares as much about pennies as dollars. A base 10 currency won't always store precisely. Though if you can find a currency that is always divided by 2 then floats will keep your accountant happy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/2j72n.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/2j72n.png&quot; alt=&quot;ruler with inches&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show them a ruler with inches on it. Floats can store inch fractions  perfectly. This should debunk the myth that floats have rounding errors. Entering these into a computer and doing math on them is a good exercise because it forces the student to do the conversion by hand. These conversions will all happen without discrepancies. You can even challenge the students to try to catch the computer doing inch fraction math wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to teach this with drafting rulers. You can get one that has decimal inches. Put the decimal inch ruler next to the fraction inch ruler. Show them how some numbers match up but others don't.  The decimal inch ruler represents what you see and what you type. The fraction inch ruler represents what is stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/R146f.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/R146f.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even get students to reproduce the same kinds of errors by having them take measurements of values from the decimal ruler on the fraction ruler and trying to convert back. They'll quickly notice that some convert back easily while others don't. Well, as long as you don't let them simply remember how the story started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find links to other resources in my earlier posts &lt;a href=&quot;https://softwareengineering.stackexchange.com/a/344327/131624&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="1401" LastEditDate="2017-06-27T16:11:50.217" LastActivityDate="2017-06-27T16:11:50.217" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1137" PostTypeId="2" ParentId="1092" CreationDate="2017-06-26T19:29:23.267" Score="2" Body="&lt;p&gt;I would say that all test cases &lt;strong&gt;don't&lt;/strong&gt; need to be given, as long as the tests are not the only grading component. &lt;br&gt;&lt;br&gt; If a teacher gives clear instructions for what a program should and should not do without specific test cases, students have to be able to come up with their own test cases which is good experience. Programming for test cases is never a good idea, and if that is what students are focusing on, it can lead to shortcuts or lazy code. &lt;br&gt;&lt;br&gt; If a program fails a test case, the input or actions that failed should be given. Then a student has to run their program themselves to find out why it is failing. If given the test case instead, it is usually more obvious what was being tested for and therefore easier to find the error (which is less debugging experience).&lt;/p&gt;&#xA;" OwnerUserId="1402" LastActivityDate="2017-06-26T19:29:23.267" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1138" PostTypeId="2" ParentId="1121" CreationDate="2017-06-26T20:00:38.820" Score="4" Body="&lt;p&gt;I've hated the term flipped classroom since I first heard it. It was as if those young kid teachers invented a new way of teaching that us old folks could never have done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We had flipped classrooms back in the day - it was called homework. When the history teacher said &quot;watch the debate&quot; - flipped classroom. Reach Act IV of the play? - flipped classroom. Reach Chapter 5 and try to do exercises 1-3? - flipped classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you'll have similar issues with the MOOC but your homework are the videos and related content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some thoughts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Will all the kids watch the videos? How will you handle it if a number don't or if they superficially watch it. There are embedded exercises but you can still &quot;skim&quot; the video and get through those. You'll want to have a plan if this happens.&lt;/li&gt;&#xA;&lt;li&gt;The lectures are pretty good (I went through the MOOC when it first came out) but there are a number of holes and ambiguities. If you haven't already, go through all the videos with a teachers eye and you'll find a number of holes that the kids can fall through unless they think exactly the same way Norvig and Thrun are teaching.&lt;/li&gt;&#xA;&lt;li&gt;This may have changed since I went through the MOOC but it was designed for individual participants working in isolation. Most of the exercises and the programming assignments thus are solo you'll want to work out group projects in advance to supplement what they're asking.&lt;/li&gt;&#xA;&lt;li&gt;This also might have been addressed but there were a number of ambiguities in the lectures (depending on ones interpretation) which became clear after doing the online quizes (and depending on your interpretation, maybe getting them wrong) - this can be disheartening for a kid - you want to prepare them for this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That's all I can think of for now.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-06-26T20:00:38.820" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1139" PostTypeId="2" ParentId="1092" CreationDate="2017-06-26T21:00:13.373" Score="1" Body="&lt;p&gt;Some of it depends on the level of the student. There's obviously a big difference between a freshman just starting out, a senior about to graduate, and someone who's been in industry for awhile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that, once your students are in industry, they're going to be expected to be able to write code that passes QA, and it's usually &lt;em&gt;not&lt;/em&gt; the case that QA will supply them with a bunch of unit tests in advance. This being the case, it's essential that people learn to test their own stuff before they graduate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm of the opinion that students should be taught how to write proper unit tests as early as possible. This should eventually progress to other kinds of automated testing over time as appropriate, such as Selenium or Coded UI tests. It's also useful to be aware of major testing techniques and terminology, such as &lt;a href=&quot;https://en.wikipedia.org/wiki/Boundary-value_analysis&quot; rel=&quot;nofollow noreferrer&quot;&gt;boundary value analysis&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this said, it's probably helpful to give new students tests early on and then slowly &quot;wean&quot; them off of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was in college, some of my instructors would also suggest test cases as part of the assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also agree with @EllenSpertus's suggestions for having students submit test cases as part of the assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For learning purposes, you could start students out with &quot;here's a piece of code, suggest 5 test cases for this&quot; or &quot;here's some code, write some unit tests for it.&quot; Again, you could start with giving them specific things to test for and progressively decreasing the amount you give them &quot;up front&quot; with the goal of eventually getting to &quot;give me whatever automated tests you think are reasonable with your assignment&quot; and grading them on how good and thorough the tests are.&lt;/p&gt;&#xA;" OwnerUserId="1299" LastActivityDate="2017-06-26T21:00:13.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1140" PostTypeId="2" ParentId="248" CreationDate="2017-06-26T21:34:33.387" Score="3" Body="&lt;p&gt;&lt;strong&gt;Using lint tools is the correct answer. But not the easy one.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of people here have suggested (and correctly so) to use a static code analyzer or linter. However, these tools can overwhelm students, especially beginners, with a lot of information that they may not understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest using an auto grading tool that incorporates lint reports in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, here is a lint report that &lt;a href=&quot;http://www.autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;we&lt;/a&gt; provide automatically to students after they make a submission:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/djr7m.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/djr7m.png&quot; alt=&quot;Lint Report on AutoGradr.com&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It gives students an overview on how they did using the star ratings. Additionally, it provides clear and actionable items on how to improve their code quality.&lt;/p&gt;&#xA;" OwnerUserId="1397" LastEditorUserId="27" LastEditDate="2017-06-26T21:37:21.297" LastActivityDate="2017-06-26T21:37:21.297" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1141" PostTypeId="2" ParentId="905" CreationDate="2017-06-26T22:13:00.370" Score="3" Body="&lt;p&gt;When I was a TA, we used tools to &lt;strong&gt;automatically&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Collect submissions and run them against set of predefined test cases&lt;/li&gt;&#xA;&lt;li&gt;Give instant feedback to students on how they did based on the test cases they passed/failed&lt;/li&gt;&#xA;&lt;li&gt;Give feedback on the quality of their code&lt;/li&gt;&#xA;&lt;li&gt;Generate plagiarism reports&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For plagiarism, we used &lt;a href=&quot;https://theory.stanford.edu/~aiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MOSS&lt;/a&gt;. For everything else, we developed a tool called &lt;a href=&quot;http://www.autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2017-06-26T22:13:00.370" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1142" PostTypeId="2" ParentId="905" CreationDate="2017-06-26T22:18:52.403" Score="1" Body="&lt;p&gt;We don't use code snapshot tools at Mills because our class sizes are small enough (usually &amp;lt;25) that professors and TAs know how individual students are doing. If students are having trouble, they're likely to email me their own snapshot with a request for help. :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds like such tools would be useful in larger programs.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-26T22:18:52.403" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1143" PostTypeId="1" AcceptedAnswerId="1144" CreationDate="2017-06-27T10:57:35.613" Score="17" ViewCount="4509" Body="&lt;p&gt;Students building websites in a high-school computer science major (using &lt;code&gt;HTML&lt;/code&gt;, &lt;code&gt;javascript&lt;/code&gt;, &lt;code&gt;jsp&lt;/code&gt; and &lt;code&gt;MySQL&lt;/code&gt;) don't seem to understand the dangers of SQL injections. I try to explain that unchecked SQL statements can really ruin their databases, but just telling them doesn't get the message through. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students build small websites as a project, and they work on that project for one semester (they do this during the 2&lt;sup&gt;nd&lt;/sup&gt; semester. In the first one they are taught &lt;code&gt;HTML&lt;/code&gt;, &lt;code&gt;css&lt;/code&gt;, &lt;code&gt;javascript&lt;/code&gt;, &lt;code&gt;jsp&lt;/code&gt; and &lt;code&gt;MySQL&lt;/code&gt;. &lt;sup&gt;&lt;sub&gt;Rather efficient, isn't it?&lt;/sub&gt;&lt;/sup&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The project guidelines specify they need login and registration pages, and a users database (among other requirements). After teaching how a login\sign up page might work I explain a bit about SQL injection. However, the students simply don't see the dangers SQL injection poses. I explain that I can cause the entire &lt;code&gt;users&lt;/code&gt; table to be deleted just by signing in, but just saying it apparently isn't enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I demonstrate the dangers of SQL injection? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: This &lt;em&gt;isn't&lt;/em&gt; a self-learning question (details can be found in the comments).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-27T15:58:10.713" LastActivityDate="2020-06-19T15:56:00.317" Title="Demonstrating the possible dangers of SQL injection" Tags="|lesson-ideas|secondary-education|sql-injection|" AnswerCount="8" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="1144" PostTypeId="2" ParentId="1143" CreationDate="2017-06-27T11:13:07.917" Score="37" Body="&lt;p&gt;The best way to show your students that their work is vulnerable to SQL injection is to demonstrate it. I'd suggest that you challenge the students to &quot;hack&quot; each others projects using SQL injection. You could then give bonus points for the students who are able to find the most vulnerabilities and for the students who didn't leave that attack vector open.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would be a fun way for students to learn by doing. This activity could also serve as an intro to what SQL injection is. Students could discover what SQL injection is themselves, and have a fun time doing it while also getting feedback on how their own code is weak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then go on to discuss the broader consequences of SQL injection with the entire class and go into real life instances of SQL injection vulnerabilities.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-27T15:59:06.857" LastActivityDate="2017-06-27T15:59:06.857" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1146" PostTypeId="2" ParentId="1143" CreationDate="2017-06-27T14:17:38.697" Score="7" Body="&lt;p&gt;I would allow them to create initial websites without any mention of security at first. I would also have created your own web site (using exactly the same techniques and technologies) in advance.  (Doing it in advance allows you time to plan out and test a SQL injection attack string that will work the first time - this way you can avoid the initial trial-and-error &lt;em&gt;fuzzing&lt;/em&gt; when you do your actual demonstration.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After they have created their sites, I would pull up my own site, and use it to talk through &lt;em&gt;whatever elements&lt;/em&gt; of html, css, javascript, jsp and MySQL you would like to call attention to.  After you have gone through your lesson, it's time for the big reveal.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would ask the class something along the lines of, &quot;how much did we worry about security when we made these sites?&quot;  And then follow up with &quot;and the reason that matters is because... check this out.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perform the SQL injection attack. Drop a table, break the site, change a password... just make sure that the result is fairly dramatic.  Watch their jaws drop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, you could turn around and do exactly the lab activity that thesecretmaster suggested in his answer.  The demonstration and the lab together would form a powerful lesson in the importance of sanitizing your inputs.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-06-27T15:55:17.630" LastActivityDate="2017-06-27T15:55:17.630" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1147" PostTypeId="2" ParentId="1143" CreationDate="2017-06-27T14:43:44.473" Score="11" Body="&lt;p&gt;If you search 'computerphile SQL injection' on google, it should bring you to the link below. The man in this video explains SQL injection very clearly and uses a practical example as well by breaking into a vulnerable website he created for the video's purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ciNHn38EyRc&quot; rel=&quot;noreferrer&quot;&gt;https://www.youtube.com/watch?v=ciNHn38EyRc&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLEASE NOTE HE USES MySQL in this video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He explains SQL injection by first showing how the information transfers between the client and server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once he shows how the site is vulnerable to SQL injection, he starts off searching for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;';--&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;He explains how the above command will show all the products his test website offers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After querying all the products, he searches for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;hammer' AND 1 = SLEEP(2);--&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a special part of the video because he's actually identifying whether or not the website uses MySQL by using the &lt;code&gt;SLEEP(seconds)&lt;/code&gt; command. The &lt;code&gt;SLEEP(seconds)&lt;/code&gt; command works correctly, so he knows the website uses MySQL. This is an example of blind sql injection (which he also explains).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He then shows how you can exploit SQL testing purposes to locate hidden information by searching for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;hammer' UNION (SELECT 1,2,3 FROM dual);--&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The fact that he can output this query successfully proves he can find more sensitive information such as user passwords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He then shows just how serious SQL injection can be by searching for&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;hammer' UNION (SELECT TABLE_NAME, TABLE_SCHEMA, 3 FROM information_schema.tables);--&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;He now has shown every table the website's database has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually he gets to the page where passwords are stored. To be practical, he does hash the passwords so people don't think all passwords are simply stored in plain text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I explained this well enough!&lt;/p&gt;&#xA;" OwnerUserId="1455" LastEditorUserId="150" LastEditDate="2017-06-27T15:07:48.533" LastActivityDate="2017-06-27T15:07:48.533" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1148" PostTypeId="2" ParentId="1106" CreationDate="2017-06-27T15:10:20.347" Score="5" Body="&lt;p&gt;Before contributing to an open source project it can be useful to become familiar with the tools and concepts involved in version control systems.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Write some code that is unfinished with some deliberate mistakes and share it with your students on GitHub&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get your students to clone / download your code, find and fix the bugs then talk about the problems with having so many different versions of the same code in the classroom.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get your students to fork your code into their own repositories and commit their own changes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Discuss code and commenting conventions and why they're necessary (e.g. &lt;a href=&quot;https://www.python.org/dev/peps/pep-0008/&quot; rel=&quot;noreferrer&quot;&gt;PEP8&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get your students to go back and recommit their code in line with the conventions discussed&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask your students to issue a pull request on your code so that their changes can be contributed to the original resource.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Once they've been through that process in a safe and controlled environment they'll be much more confident joining in with an open source project. It can be intimidating jumping in for the first time, no matter how friendly and supportive the contributors are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also want to look at &lt;a href=&quot;https://classroom.github.com/&quot; rel=&quot;noreferrer&quot;&gt;GitHub Classroom&lt;/a&gt; which automates the process of creating, sharing and collecting programming assignments from students.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-27T15:10:20.347" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1149" PostTypeId="2" ParentId="1143" CreationDate="2017-06-27T15:24:09.007" Score="18" Body="&lt;p&gt;A couple suggestions - &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The classic xkcd comic about Bobby Tables:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/jXOyV.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jXOyV.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shown, complete with the &lt;a href=&quot;https://www.explainxkcd.com/wiki/index.php/327:_Exploits_of_a_Mom&quot; rel=&quot;noreferrer&quot;&gt;explain xkcd&lt;/a&gt; article can provide a nice, humorous introduction that will get them to start paying to attention.&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;Sites like &lt;a href=&quot;https://www.hackthissite.org/missions/basic/&quot; rel=&quot;noreferrer&quot;&gt;hack this site&lt;/a&gt; are completely legal and allow users to experiment and learn about vulnerabilities (in this case, using them to solve levels and challenges, but it will teach them how to avoid them in their own code). You do need to create an account to access any of the challenges, but it's a great site. I'm pretty terrible at it, but it's fun to try to figure out. Multiple challenges in the basic level involve SQL injection.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Let them try it on their own programs or on a dummy website or two that you set up.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-27T15:24:09.007" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1150" PostTypeId="1" AcceptedAnswerId="1161" CreationDate="2017-06-27T16:33:19.743" Score="15" ViewCount="5830" Body="&lt;p&gt;We are trying to get more pupils doing computer science in years 10→11 (UK GCSE) (14→15 years old) and years 12→13 (UK A-level) (16→17years old).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As there are a lot of university educators around here, I was wondering if you can tell me what university courses would benefit, or have an element of computer science or programming, in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am mostly interested in non-computer-science courses, as I think pupils will know that high school computer science leads to university computer science. However, one very thorough answer on computer science courses would also be useful and appreciated.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: I am also interested in other pathways (jobs, etc.) that may use computer science or programming. And these would be welcome also.  &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-06-27T17:11:16.670" LastActivityDate="2017-07-13T15:47:26.343" Title="Uses of high school Computer Science: where can it lead other than university CS?" Tags="|student-motivation|" AnswerCount="13" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1151" PostTypeId="2" ParentId="690" CreationDate="2017-06-27T16:41:28.567" Score="4" Body="&lt;p&gt;The biggest problem is moving students to a difficult algorithm before they have mileage with simple ones.&#xA;The best way I've found is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;a.  Go over the classic small algorithms, especially array and string based.&#xA; - e.g. find the sum, min, max, do a swap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. give students many small algorithmic problems to solve. I use the exercises at codingbat.com which were written Nick Parlante, a lecturer at Stanford. I give a lot of level 1 problems, and can usually get them to level 2 near the end of the semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I do is, every lab has a prelab consisting of a bunch of code interspersed with print statements, asking &quot;What does this code print?&quot; I believe that tracing code strengthens students' algorithmic thinking as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, homework assignments before the lab with code tracing and writing code snippets also help students a lot.&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2017-06-27T16:41:28.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1152" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T16:44:20.287" Score="12" Body="&lt;p&gt;Knowledge of programming is extremely useful.  One of my programming students at the &lt;a href=&quot;https://en.wikipedia.org/wiki/North_Carolina_School_of_Science_and_Mathematics&quot; rel=&quot;noreferrer&quot;&gt;North Carolina School of Science and Mathematics&lt;/a&gt; wound up at the &lt;a href=&quot;https://en.wikipedia.org/wiki/University_of_North_Carolina&quot; rel=&quot;noreferrer&quot;&gt;University of North Carolina&lt;/a&gt;.  She took CS courses and she was involved with the school of public health and studied epidemiology. The ability to handle and visualize huge data sets is central in that field.  This fall, she will be at MIT in the Neuroengieering Ph. D program.  She has several publications to her credit as an arriving grad student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming gives you power to research, to filter information for valuable nuggets, and to process large sets of data and find pattern and order in them.  It's indescribably valuable.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="2" LastEditDate="2017-06-27T16:48:09.043" LastActivityDate="2017-06-27T16:48:09.043" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1153" PostTypeId="2" ParentId="1126" CreationDate="2017-06-27T16:54:17.623" Score="3" Body="&lt;p&gt;I would remind them, there are many CS jobs out there. Actively watch out for a bad environment and seek a good environment. You can always leave a job and get another if the environment is bad. (It might be worth trying to manage but it might not - don't discount the penalty of a stressful job in terms of health and happiness).&lt;/p&gt;&#xA;" OwnerUserId="1462" LastActivityDate="2017-06-27T16:54:17.623" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1154" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T16:55:29.150" Score="7" Body="&lt;p&gt;I think the skills learned doing basic computer science can be contributed to any course that requires critical thinking, especially if you are teaching the students how to program. In college right now, I am using prior python knowledge to help automate my maths class (possibly not particularly what you were shooting for but I think it is something to bring up to get kids to join the class). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Friends in economical fields have delved into R for helping them conduct research. I think any science or forward moving degree (I see less help in the world of history) can really see benefit of the computational mindset. David Malan of Harvard's CS50 (one of the most highly thought of intro to comp sci classes in the world) says that CS50 is Harvard's quintessential course, no matter your major. &lt;/p&gt;&#xA;" OwnerUserId="1463" LastActivityDate="2017-06-27T16:55:29.150" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1155" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T17:04:40.290" Score="2" Body="&lt;p&gt;Computer science is a bit unlike math, history and other fields. For reasons that are, perhaps, as much historical as pedagogical or anything else, CS doesn't generally follow the &quot;taught to very young children (i.e. six-year-olds) and then developed through primary and secondary schools&quot; model. As a result, high school and university CS courses often cover the same ground; at the introductory course level, at least. The difference is that universities, where students are expected to choose a major, have the opportunity to offer more courses with greater depth and breadth as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Introductory courses, whether in high school or university, typically cover fundamental principles such as basic data structures and the importance of algorithms, and involve some programming. I have no personal experience with &quot;programmer boot camp&quot; programs, but I would think that HS CS coursework would be a good head start for such non-degree-granting developer-job-training programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also very common for academics in non-CS fields to find themselves writing small computer programs to assist themselves with their research on an ad hoc basis, for tasks such as data processing/manipulation or statistical analysis. Having some knowledge of a programming language and the importance of Big-O from high school would be helpful for that as a, say, research assistant to a chemistry professor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also know someone as an undergrad who once had a take-home final exam in a civil engineering course where the entire exam was to perform a complex calculation about deformation of a beam under certain conditions (soil, beam material, weather, etc.) The professor's goal was to make the students apply concepts from throughout the course in what should have been some pretty drawn-out calculations. My friend knew a bit of programming and, using all the appropriate engineering concepts, wrote a little program to pop out the correct answer for him. The professor gave him full marks.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-27T17:04:40.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1156" PostTypeId="2" ParentId="1143" CreationDate="2017-06-27T17:18:35.393" Score="6" Body="&lt;p&gt;A good way to should this would be to do a two part assignment (don't tell the students it's a two part assignment though). For the first part, have them do something fairly simple, but give them a library to interface with their sql databases. Code that library with a SQL Injection vulnerability (this way you won't have to go hunting for one in each app).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Invite the students to walk through the first part of the project with you during office hours or during class. It'll work better if other students don't get the surprise, but I'm not sure how that would work in a high school setting. During the demonstration, trigger your sql injection vulnerability to wipe the database (If you feel like being nice, you can take a snapshot). They might panic a bit, but tell them not to worry about it, you'll go over it in the next class. In the next class, explain the purpose of your sql library and how it opened them up to an injection. For the second part of the assignment, have them turn in copy of your library, but with the injection vulnerability fixed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will not only teach them about sql injection, but might have the nice side effect of teaching them to be aware that even if their code is fine, libraries provided to them might not be perfectly secure. If you want to explicitely mention this though, it wouldn't be a bad idea to also explain the pitfalls of ahering to &lt;a href=&quot;https://en.wikipedia.org/wiki/Not_invented_here&quot; rel=&quot;noreferrer&quot;&gt;Not Invented Here Syndrome&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1456" LastActivityDate="2017-06-27T17:18:35.393" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1157" PostTypeId="1" AcceptedAnswerId="1160" CreationDate="2017-06-27T17:28:33.880" Score="9" ViewCount="2231" Body="&lt;p&gt;I will be student teaching an AP Computer Science Principles class next year and have run into an issue. All of the high schools around us are using the Code.org curriculum but from talking to students who took the class 2016-2017, they remarked that code.org was very poorly setup and very remedial. These were students with background in CS and they seemed bored of block programming and so-called 'spoon feeding' but I am stuck deciding to stick with Code.org and try to figure out a way to make it more interesting for the more advanced students, or to use an alternative like &lt;a href=&quot;https://ap.cs50.net/&quot; rel=&quot;noreferrer&quot;&gt;https://ap.cs50.net/&lt;/a&gt; a class that is more difficult by review but seemingly more rewarding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR - Should code.org be used for APCSP and should I personally make it more difficult for the more experienced students, or should I use a more difficult curriculum and give more help to new students?&lt;/p&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="76" LastEditDate="2017-06-27T17:32:55.113" LastActivityDate="2018-08-03T15:51:48.990" Title="Curriculum choice for AP Computer Science Principles" Tags="|curriculum-design|secondary-education|ap-cs-principles|" AnswerCount="5" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1158" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T17:30:31.950" Score="7" Body="&lt;p&gt;Consider the US-based College Board's class AP Computer Science Principles. It argues that CS is &quot;the new literacy&quot;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Whether it’s 3-D animation, engineering, music, app development,&#xA;  medicine, visual design, robotics, or political analysis, computer&#xA;  science is the engine that powers the technology, productivity, and&#xA;  innovation that drive the world. Computer science experience has&#xA;  become an imperative for today’s students and the workforce of&#xA;  tomorrow.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The goal behind the course, at least how I teach it, is ultimately to show students how widespread the value and impact of CS are. I know that many students who take the class here don't necessarily intend to study computer science in college. The adaptation I teach -- CS50 AP -- makes a point of creating assignments that are inspired by real-world topics. From the CS50 syllabus:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Problem sets inspired by real-world domains of biology, cryptography,&#xA;  finance, forensics, and gaming.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thinking skills aside (since I think everyone here would argue for the value of logical, order thinking learned through computer science and programming), there is tremendous relevance for computer science and medicine (a huge draw for my students) or for CS and music. The more our world gets digitized, the greater the importance of understanding technological growth and knowing how to work within digital innovation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another part of it too is this (and getting students to believe this is tough): &lt;strong&gt;there might be relevance you see later that you couldn't possibly predict now.&lt;/strong&gt; Not everything you study or learn has an obvious connection to a future class. Who knows what field will change because of technology in the next 5-10 years. By studying computer science, though, you can be ready for wherever that evolution takes us.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-27T17:30:31.950" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1159" PostTypeId="2" ParentId="1157" CreationDate="2017-06-27T18:05:20.363" Score="6" Body="&lt;p&gt;Code.org is definitely meant to &lt;em&gt;introduce&lt;/em&gt; more and more students to Computer Science. Students who are already familiar with the basics and want to learn more are likely to get bored with Code.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have instructors who use CS50 AP curriculum which serves as a great pre-req to what students will learn in college. The assignments focus on algorithms, design, data structures, networking etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest using assignments from the CS50 AP curriculum and providing the proper tools to students to encourage self learning practicing in their own time outside of the classroom.&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2017-06-27T18:05:20.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1160" PostTypeId="2" ParentId="1157" CreationDate="2017-06-27T18:12:45.257" Score="8" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Teach CS50 AP.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I taught AP CSP this past year, and I cannot speak highly enough for the curriculum that CS50 has written for this course. I'll try to enumerate its strengths as objectively as possible:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It actually feels like a legitimate AP course in the sense that it is a college course (the most popular one at Harvard and I believe the most popular MOOC as well) adapted for high school. The connection to Harvard adds great legitimacy to the curriculum and engages students.&lt;/li&gt;&#xA;&lt;li&gt;The curriculum scaffolds nicely for beginners or students with a little background (especially Python). The language progression from Scratch to C to Python helps students build a foundation in computational thinking and progress towards more advanced programming constructs, culminating in building engaging web apps.&lt;/li&gt;&#xA;&lt;li&gt;The resources available are unparalleled. CS50 has every lecture on video from every past iteration of the course. There are video shorts for every important concept along with additional study pages. Plus, there are communities &lt;a href=&quot;http://cs50.stackexchange.com&quot;&gt;here on SE&lt;/a&gt; and on Reddit.&lt;/li&gt;&#xA;&lt;li&gt;It is about more than programming. CS50's three pillars are &quot;accessibility, rigor, and culture.&quot; It brings all students to the table, challenges them, and also creates a classroom environment that stress community over competition. Events like CS50 Puzzle Day set it apart from any other class out there, AP or not.&lt;/li&gt;&#xA;&lt;li&gt;The teacher support is incredible. I'm a part of a community online of other CS50 AP teachers, and it was invaluable throughout this past year. They constantly reach out and cultivate connections among teachers of the course. &lt;/li&gt;&#xA;&lt;li&gt;The course stress student growth. As they say on their syllabus, &quot;what ultimately matters in this course is not so much where you end up relative to your classmates but where you, in Week 11, end up relative to yourself in Week 0.&quot; This stress on a growth mindset approach is perfect for beginners.&lt;/li&gt;&#xA;&lt;li&gt;Students are more than prepared for the AP Exam.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I could keep going on and on, but this is sufficient for now. I believe strongly in CS50 and CS50 AP. The edX course CS50 quite literally changed my life. As one of their shirts says, I am &quot;CS50 Proud.&quot;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-27T18:12:45.257" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1161" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T18:27:04.690" Score="19" Body="&lt;p&gt;The &lt;a href=&quot;https://university.which.co.uk/advice/choosing-a-course/what-is-the-russell-group&quot; rel=&quot;noreferrer&quot;&gt;Russell Group&lt;/a&gt; of Universities has published a useful &lt;a href=&quot;https://www.russellgroup.ac.uk/media/5272/informedchoices-print.pdf&quot; rel=&quot;noreferrer&quot;&gt;list of recommended A level subjects for different degree options&lt;/a&gt; which suggests that other than a CS degree, CS A level is recommended for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Aeronautical Engineering&lt;/li&gt;&#xA;&lt;li&gt;Biochemistry&lt;/li&gt;&#xA;&lt;li&gt;Biology&lt;/li&gt;&#xA;&lt;li&gt;Chemical Engineering&lt;/li&gt;&#xA;&lt;li&gt;Chemistry&lt;/li&gt;&#xA;&lt;li&gt;Civil Engineering&lt;/li&gt;&#xA;&lt;li&gt;Economics&lt;/li&gt;&#xA;&lt;li&gt;Electrical / Electronic Engineering&lt;/li&gt;&#xA;&lt;li&gt;Engineering (General)&lt;/li&gt;&#xA;&lt;li&gt;Geology&lt;/li&gt;&#xA;&lt;li&gt;Materials Science&lt;/li&gt;&#xA;&lt;li&gt;Maths&lt;/li&gt;&#xA;&lt;li&gt;Mechanical Engineering&lt;/li&gt;&#xA;&lt;li&gt;Medicine&lt;/li&gt;&#xA;&lt;li&gt;Optometry&lt;/li&gt;&#xA;&lt;li&gt;Orthoptics&lt;/li&gt;&#xA;&lt;li&gt;Physics&lt;/li&gt;&#xA;&lt;li&gt;Psychology&lt;/li&gt;&#xA;&lt;li&gt;Sociology&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Problem solving and computational thinking is a hugely transferable skill in itself.  Almost any science / engineering route through academia into the workplace is greatly benefited by the ability to write / modify some code that will process data efficiently and generate exactly the sort of analysis / evidence that you require.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a substantive part of a Psychology degree involves collecting and processing statistical data. Even without the logical and analytical benefits of CS, the ability to write code to automate the analysis of that data immediately gives you huge advantage over peers without any CS skills.&lt;/p&gt;&#xA;" OwnerUserId="674" LastEditorUserId="674" LastEditDate="2017-06-27T18:45:16.403" LastActivityDate="2017-06-27T18:45:16.403" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1162" PostTypeId="2" ParentId="1126" CreationDate="2017-06-27T18:40:54.363" Score="-2" Body="&lt;p&gt;Cheap and dirty trick: dress to fit in as much as possible. Nerdy glasses, geeky t-shirts, short-sleeved shirts and other staples of the computer geek uniform show that you belong, and work to diminish the perceived otherness that the average developer/programmer might attribute to those who do not look like them. &lt;/p&gt;&#xA;" OwnerUserId="1472" LastActivityDate="2017-06-27T18:40:54.363" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1163" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T18:56:18.780" Score="7" Body="&lt;p&gt;I concur with the existing answers that every field of study benefits from at least a basic understanding of CS and ability to program, but to give some specific examples:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Mathematics&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;CS grew out of maths, and is still closely related. To give a specific example of a mathematics course which includes programming, see the &lt;a href=&quot;https://www.maths.cam.ac.uk/undergrad/catam/IB&quot; rel=&quot;noreferrer&quot;&gt;Computational Projects Manual&lt;/a&gt; of the Cambridge maths tripos.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Science&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Computer models are used to turn theory into predictions which can then be tested experimentally; and programming can also be useful for analysing data. This is particularly obvious in some fields (e.g. particle physics: just look at the computing power used by CERN), but even biology, which doesn't require mathematics for undergrad admission, has a lot of modelling. I know one post-doc virologist who wanted me to look at his R code to see whether it could be made more efficient, because his models took over a day to run and it was a bottleneck, and another doctoral student in oncology who similarly has models that take over a day to run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also includes sciences which a school pupil might not think of, such as linguistics: see Mark Liberman's &lt;a href=&quot;http://languagelog.ldc.upenn.edu/nll/index.php?s=%22breakfast+experiment%22&quot; rel=&quot;noreferrer&quot;&gt;breakfast experiments&lt;/a&gt; on Language Log.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it's not just research-level science which benefits. I studied CS at Cambridge and the first year was 50% natural sciences, so I effectively did a minor in physics in the first year. I did a bit of programming in one of the practical labs.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Postscript&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I should add: I didn't study CS at school, and in fact I deliberately chose not to take CS A-level because I knew I wanted to read it at Cambridge and they preferred applicants &lt;em&gt;not&lt;/em&gt; to have done it. I think they had a low opinion of A-level teaching and didn't want to unteach whatever errors people had learnt. I'm not sure whether that has changed.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastEditorUserId="1219" LastEditDate="2017-06-27T19:04:03.840" LastActivityDate="2017-06-27T19:04:03.840" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1164" PostTypeId="2" ParentId="400" CreationDate="2017-06-27T19:55:21.397" Score="0" Body="&lt;p&gt;I would explain to them that while the projects now are short term and never updated/maintained, if they go into it further they will REALLY appreciate their prior work to comment and indent properly. The way I would try to show this is by making them go back later in the year/semester and make them do revisions to old projects. My teacher did this and it caused me to not only comment my code, but archive very well because review 1 can also be 4,5,7, and 8.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-27T19:55:21.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1165" PostTypeId="2" ParentId="1109" CreationDate="2017-06-27T20:04:13.417" Score="2" Body="&lt;p&gt;I would, given the time period you have, show the entire film. It's an excellent movie, only strays slightly from the actual story of the Turing machine, and is fairly accurate (the only discrepancy I found was that Turing's boss begged him to work on it instead of Turing going to them about it). After the film I would discuss the discrepancies and how &quot;Christopher&quot; was used as reference and evolved to the first computers.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastEditorUserId="1309" LastEditDate="2017-06-29T02:44:22.180" LastActivityDate="2017-06-29T02:44:22.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1166" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T21:18:05.307" Score="3" Body="&lt;p&gt;I'm not an educator, so I'll have to approach this from the &quot;other pathways&quot; part of the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest with you, it is very applicable in areas unrelated to run of the mill contracted/corporate programmer and I personally feel like depending on what you intend to do after college/university, may even be better suited for something to minor in with a major in something to gain concrete domain knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At a former job while I was in college, another employee and I would work on small, very function specific applications that made our tasks easier. After a while, others with similar job functions were using the applications too. At the time, I think I had an introductory course and he was self taught, but some value was obtained from it for ourselves and our coworkers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So that's the programming aspect of it, but at a very fundamental level development is about breaking up a problem into smaller parts, solving them (or in some case mitigating if that's the best one can do), and then piecing them together with whatever &quot;glue&quot; is needed to properly connect them into a full piece. A lot of times, whenever there are &quot;panicky&quot; situations at work or at home, my best course is to attack smaller components in this manner and that allows for us to resolve things that seem bigger than they probably are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that at some point, a basic level of computer science will be part of the core curriculum or at least a generally available elective. In the same way that English/Language Arts tends to make you a better writer which assists in taking notes, problem analysis, etc. and mathematics (sometimes subconsciously) helps with daily tasks, I think programming gives you tools that assist with problem solving and also give you an extra avenue to create tools to make tasks in life easier (a carpenter could write something to help with on the fly calculations, for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to pitch it to students that they could be on the pathway to being developers, yes, it could put them in that direction (or possibly informs them that being a developer may not be what they &lt;em&gt;really&lt;/em&gt; want to be when they grow up which is just as valuable). But I think if you approach it as programming is a discipline in trying to make one's life easier by limiting long term effort on repeated computational tasks and generally being a stronger problem solver, I think you'll get the most leverage out of it among the more pragmatic students who may not be interested in programming as a career path.&lt;/p&gt;&#xA;" OwnerUserId="1477" LastActivityDate="2017-06-27T21:18:05.307" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1167" PostTypeId="2" ParentId="1150" CreationDate="2017-06-27T21:31:11.563" Score="3" Body="&lt;p&gt;Some of the simpler parts of CS entail:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;factoring code into functions&lt;/li&gt;&#xA;&lt;li&gt;composition of functions into larger pieces of functionality&lt;/li&gt;&#xA;&lt;li&gt;loops&lt;/li&gt;&#xA;&lt;li&gt;if / then / else logic&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I learned the basics of all of these in high school, mostly dealing with AppleSoft Basic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me explain how my high-school level CS skills benefited me, long before pursuing a degree in same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before starting college classes toward a degree, I worked for a temp agency.  They quickly discovered they could send me to any client struggling with Lotus 1-2-3 (ok, so I'm revealing my age :-) and I'd knock it out of the park.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was pretty adept at algebra so spreadsheets were more like toys than tools.  I quickly learned how to record macros.  Because I knew about factoring and composition, I was able to create small macros which would do certain functions, then test those macros, confirming that they worked the way I expected.  I could then create other macros which could compose one or more smaller macros into larger pieces of functionality.  Macros could also do loops ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lotus had functions which did if / then / else logic.  Once you got the hang of them, you could do some pretty advanced stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With macros, and my skills at that point, I could make Lotus get up and dance.  It was programming, after all, but nothing which needed college-level CS training.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple contracts I did as a temp:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The client had a bunch of data entry into a spreadsheet (rows in a spreadsheet can be queried as a simple database).  I quickly discovered which columns were unique and which were repeated.  I'd:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;key in the unique stuff&lt;/li&gt;&#xA;&lt;li&gt;key in the repeated stuff just once&lt;/li&gt;&#xA;&lt;li&gt;create macros to copy / paste as needed&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It blew the client away just how fast I could get data into a spreadsheet.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The client had put together a spreadsheet to calculate depreciation on a large number of items.  They needed someone to sit there and (manually) run hundreds of iterations of:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;calculating the sheet&lt;/li&gt;&#xA;&lt;li&gt;copying data around&lt;/li&gt;&#xA;&lt;li&gt;calculating totals&lt;/li&gt;&#xA;&lt;li&gt;stashing those somewhere&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I automated the process (macros, loops, if / then / else).  I sat there for over 3 hours while the machine did all the work.  They didn't gripe; they were expecting to have to pay someone a full day to get that done.  I got it done after lunch.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've had multiple occasions in my life where companies brought me in as a temp, decided they REALLY liked my skills, and hired me.  Why did they like my skills? I could type fast, I'm reasonably personable and, if something could be programmed / automated, I could usually figure out how to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These constitute basic CS skills; I hadn't made it to college yet.  I was able to do some pretty advanced things with the typical office software of the time.  Even if I hadn't pursued a degree in CS, these skills gave me a leg up in just about any career / field of endeavor which used computers.  How many careers / fields do NOT use computers, these days? How many of us, seeking employment, would NOT like a leg up on other candidates?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did, eventually, pursue a CS degree.  While I was in college, I was acquainted with a young woman who was studying to become an actuary.  She was taking programming courses in C++ because the actuarial groups she'd talked to said they wrote their own analysis software in C++.  Of course, actuarial is VERY heavy in Mathematics, which @Peter Taylor has mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're trying to motivate teenagers to develop these skills, showing them how even basic-level skills can improve their desirability to employers should get them thinking.&lt;/p&gt;&#xA;" OwnerUserId="948" LastEditorUserId="948" LastEditDate="2017-06-27T23:26:48.767" LastActivityDate="2017-06-27T23:26:48.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1168" PostTypeId="2" ParentId="327" CreationDate="2017-06-27T23:35:57.090" Score="25" Body="&lt;p&gt;I recently had a group of students that didn't take notes at all. They were in University classes and no one, apparently, had taught them how to learn. I asked one student why, and he just pointed to his head - it's here. But of course photographic memory isn't true for all but a vanishingly small proportion of our students. In order to learn something you need to be engaged with it, not just watch it pass by. I'm pretty sure that court stenographers don't retain anything of the court proceedings they record. It is just mechanical. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stay tuned for my solution, below. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worry, and think the research supports me, that typing notes in class is just mechanical. Like hi-lighting lines in a textbook. Little if anything is learned &lt;em&gt;then&lt;/em&gt;. If you lecture and just want the students to transmit your ides to their computers, then just give them the lectures as rich text. But having something in your computer (or on wikipedia) isn't the same as having it in your head. So, as an instructor, you should ask yourself what it is that you want the students to be able to do with the information you transmit. Do you just want them to have it available? Or do you want them to be able to truly know it and act on it. If the latter, then you need to help them learn to be more active and engaged in their learning - as my students were not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually take notes on things by computer. But my only goal is to keep access to it, not to truly know it. No problems. If I want to know something I solve problems or write code using it. Learning is doing. Doing is learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing by hand is much better than typing, even with bad penmanship. The brain is more engaged and you are changing the wiring of the brain as you do it. However, that isn't enough. You have to &lt;strong&gt;do&lt;/strong&gt; something with those notes if you want to learn it. If you just write it out and file it, little is learned. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was my solution:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I made sure every student had a &lt;a href=&quot;http://www.43folders.com/2004/09/03/introducing-the-hipster-pda&quot; rel=&quot;noreferrer&quot;&gt;Hipster PDA&lt;/a&gt;, which cost almost nothing as the U was happy to give each student a binder clip and they were happy enough to go in together to purchase the cards. Students were encouraged to put a sentence or two on a (fresh) card when they heard a key idea. For the last minute or so of each class I'd ask a few students to read to me from the cards of the day one key idea from the lecture (though it wasn't usually true lecturing). I might comment, usually, just by saying yes or no (or maybe &lt;strong&gt;YES&lt;/strong&gt;). At the beginning of the next class I'd ask for the three most important ideas from the previous class. Or perhaps, ask for a one sentence summary of the previous lecture. Out come the cards...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also encouraged the students to prepare a summary card for each lecture. Just one card. Just a couple of sentences, not the tiny print we used to use when allowed to bring a sheet of notes to an exam (remember that?). Just big ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, I encouraged students to use the pda in other courses and to carry it about with  them. They spent time on subways, generally, so the pda provided an easy way to review the day's activities and learning or prepare for the upcoming day. The valedictorian in my undergraduate class used this trick. He was never without a few cards for review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students don't need to capture every word in most cases and if they really do, then give it to them straight. I'm sure you heard the joke &quot;The purpose of a lecture is to transmit the instructor's notes to the student's notebook without going through the mind of either.&quot; Make it active. With my students it was actually kind of campy - an in-group ritual. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I also lectured from my own hipster pda and kept a card for each student, etc. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A separate reason for taking notes by hand with a good pen or pencil on good paper: It will be hard to convince your students of this, but they may need (as I have needed) to review notes taken 40 years or more ago. My student lecture notes were put into folders and filed away. I recently needed and was able to find a paper I wrote as a high-school student about 1961. Paper lasts, digital media is problematic. The physical media may deterioriate but the file formats may not be available in a few years. How much important stuff do you have on floppy disks? How about 8&quot; floppy disks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd especially recommend archiving notes on paper for any student planning an academic career. This is most important, of course, for your major courses, but also for things you love the most. Paper lasts. See:  &lt;a href=&quot;https://xkcd.com/1909/&quot; rel=&quot;noreferrer&quot;&gt;https://xkcd.com/1909/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On November 22, 2017, the New York Times published a &lt;a href=&quot;https://www.nytimes.com/2017/11/22/business/laptops-not-during-lecture-or-meeting.html&quot; rel=&quot;noreferrer&quot;&gt;piece in Business Day&lt;/a&gt;. Here is the money quote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;But a growing body of evidence shows that over all, college students learn less when they use computers or tablets during lectures. They also tend to earn worse grades. The research is unequivocal: Laptops distract from learning, both for users and for those around them. It’s not much of a leap to expect that electronics also undermine learning in high school classrooms or that they hurt productivity in meetings in all kinds of workplaces.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The author is Susan Dynarski is a professor of education, public policy and economics at the University of Michigan.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As an update: I've just been given information that a certain large university has banned laptops from the classroom. My correspondent, who wishes to remain anonymous, points out the following information: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ban improves grades and also students are fine with it&#xA;&lt;a href=&quot;https://www.insidehighered.com/news/2018/05/11/ohio-state-professors-technology-ban-finds-positive-reaction-and-results&quot; rel=&quot;noreferrer&quot;&gt;https://www.insidehighered.com/news/2018/05/11/ohio-state-professors-technology-ban-finds-positive-reaction-and-results&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even students not using electronics seem harmed if others do:&#xA;&lt;a href=&quot;https://www.insidehighered.com/news/2018/07/27/class-cellphone-and-laptop-use-lowers-exam-scores-new-study-shows&quot; rel=&quot;noreferrer&quot;&gt;https://www.insidehighered.com/news/2018/07/27/class-cellphone-and-laptop-use-lowers-exam-scores-new-study-shows&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.sciencedirect.com/science/article/pii/S0360131512002254&quot; rel=&quot;noreferrer&quot;&gt;https://www.sciencedirect.com/science/article/pii/S0360131512002254&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Humans simply cannot multitask &#xA;&lt;a href=&quot;https://www.npr.org/templates/story/story.php?storyId=95256794&quot; rel=&quot;noreferrer&quot;&gt;https://www.npr.org/templates/story/story.php?storyId=95256794&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://hbr.org/2010/12/you-cant-multi-task-so-stop-tr&quot; rel=&quot;noreferrer&quot;&gt;https://hbr.org/2010/12/you-cant-multi-task-so-stop-tr&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multitasking may actually damage  your brain&#xA;&lt;a href=&quot;https://www.entrepreneur.com/article/288829&quot; rel=&quot;noreferrer&quot;&gt;https://www.entrepreneur.com/article/288829&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They report that they run &quot;active lectures&quot; (talk a bit, then students work on problems in small groups, repeat), and have compared electronic and paper approaches. Paper works just fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ban is working great. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-04T00:58:19.133" LastActivityDate="2018-10-04T00:58:19.133" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1170" PostTypeId="2" ParentId="1150" CreationDate="2017-06-28T00:45:01.633" Score="3" Body="&lt;p&gt;Well, I'm not an educator, but a student, and I'm in the United States (early highschool, so 14-16 ish). I find several advantages from coding.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It's very relaxing. Well, in a sense. I find it enjoyable to solve problems using programming. Debugging, while not &lt;em&gt;quite&lt;/em&gt; as relaxing, is still enjoyable - I'm solving simple problems. It feels good to get a program working. And if you've ever been in a state of programming &quot;flow&quot; - where the code just kinda flows right off the fingertips - you know you want that to happen again. It's a great feeling.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's useful. I was in Algebra year before last (mid-middle school) and we were solving quadratics. I solved the problems, then wrote a quick program and used it to double check my work. I like using it on the Euler Problems as well - very fun. So it's quite relevant to mathematics.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As for topics it's relevant with - I'd say almost anything. You can write a program that solves a math problem, a research question in just about any science, makes a document look nice and neat (ahem, LaTeX, I'm looking at you), waters your plants while you're away (with the help of a cheap microcontroller like the Arduino), etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So engineering, math, science of any type, writing, art - I kid you not about the last. Computer generated fractals are just about the most beautiful thing I've ever laid eyes on. Oh, and animation - think movies like Toy Story, and so on. Hello, computer science! Think of how many ways computers are used in your daily life. Think of how many people applied the principles of programming and CS to make those things work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could keep going, but to conclude - computer science and programming also improves general problem solving skills. And you get the nice &lt;em&gt;whoa&lt;/em&gt; factor when you show a friend your latest creation. So, um, yeah - please include as much CS stuff as possible in your curriculum. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-28T00:45:01.633" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1171" PostTypeId="2" ParentId="3" CreationDate="2017-06-28T03:10:28.543" Score="1" Body="&lt;p&gt;Aurora's answer is excellent, but I do feel I have one thing to add that's very specific to CS: this is a wonderful opportunity to use (or abuse, depending on your perspective) version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of great reasons to introduce your students to version control, most of which I will not mention because they not directly relevant to the OP's question. The one reason that is relevant: I've had students use GitHub, and as a result have been able to see exactly who was committing which bits of code and at what times. That solves your immediate problem of ensuring that everyone is contributing to the project, or at the very least, allowing you to identify those who didn't contribute their fair share/only made &quot;easy&quot; updates like code formatting or comment changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also helped me to see who was having problems with the assignments in... not exactly real time, but definitely as the assignments were progressing, rather than after the due date (when it would have been too late to help) or 100% dependent on the students asking for help. I as a TA/recitation leader could then help people when things were more manageable and prevent problems from compounding or a chorus of last-day requests for emergency help and extensions from arising.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I realize that this sounds more like &quot;determine how much work each individual did&quot; than &quot;divides up tasks proportionately.&quot; However, experience has shown me that if you tell people about this system upfront, the students will in fact end up dividing the tasks up proportionately. Just having them know that they're being watched seems to be enough motivation to achieve your goal, in practice.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-28T03:10:28.543" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1172" PostTypeId="2" ParentId="1121" CreationDate="2017-06-28T05:04:32.157" Score="2" Body="&lt;p&gt;I can offer some general advice as I looked into the flipped approach back when I used to teach English several years back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.edudemic.com/guides/flipped-classrooms-guide/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Teachers Guide to Flipped Classroom&lt;/a&gt; is an excellent resource to begin with in terms of providing pedagogical guidance. The three cited benefits are as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Flipped learning keeps students more engaged.&lt;/li&gt;&#xA;&lt;li&gt;Teachers provide more personalized attention.&lt;/li&gt;&#xA;&lt;li&gt;Students can work at their own pace.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What I experienced - and what I've seen colleagues experience - is that these three &quot;benefits&quot; cannot always be assumed (obviously). In my view, they really hinge on the first one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asking students to watch a 45-minute lecture, especially if it's not done by you, can seem like you are phoning it in by outsourcing the instructional work of the course. Also, if students are lost five minutes in, you essentially lose them for their &quot;homework&quot; and the next class meeting because that time for application has to be spent explaining the lecture, i.e. doing what a non-&quot;flipped class&quot; already does. Thus, videos can be a far cry from keeping students engaged; they can just build resentment. However, if you recorded your own lectures, or in this case, your own commentary/follow-up to a lecture, you would demonstrate your own investment in the video content of the course and might increase buy-in that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students detect authenticity in us very quickly, so I think it's imperative with this approach to explain how you envision your role as instructor in this pedagogical model. When flipped learning works, those latter two benefits shine. The classroom becomes a dynamic place for interaction among students and between teacher and students. But if #1 fails, the rest become moot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the article states, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;[the flipped classroom is] about moving the more passive&#xA;  elements of learning (watching a lecture, reading a chapter, etc.)&#xA;  outside of the classroom, so that more class time is available for&#xA;  interactive, hands-on learning.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In sounds good in theory and &lt;em&gt;can&lt;/em&gt; be good in practice. The challenge is making sure those passive elements are well-received and are instructionally sound and effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As another resource, the hashtag &lt;code&gt;#flipclass&lt;/code&gt; is a great place for exploring flipped classroom content on Twitter. There is a weekly chat every Monday from 5-6 PST (IIRC). &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-06-28T05:04:32.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1173" PostTypeId="2" ParentId="754" CreationDate="2017-06-28T05:41:33.937" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How do you teach, differently from how you learned? How do you overcome your own blinders?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Start by learning a new concept the other way. If you're mainly self-taught, take a college/university course for something you don't know. (Maybe as part of your continuing education requirement if your system requires that.) If you've been mainly educated using the traditional methods, learn a new subject independently, using books, and other non-class style resources. (Online courses, and MOOCs are probably not in that list.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this is best if it's something you don't know, and maybe even aren't really curious about, but still related to CS. This will give you the experience of learning using the &quot;other&quot; method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, find some courses taught by instructors who learned CS both ways, self-taught and traditionally taught, and set in on their classes. This time it's not to learn the material, but to observe their teaching style, and how the students respond and learn from that style. Compare and contrast their styles relative to each other, and relative to your style of instruction. For this portion, it's preferable that you already know the subject material, while not being an &quot;expert&quot; in it. (You don't want to fall into the trap of evaluating their material of information, but their presentation of it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, find some people who are proficient in something you know, or better, teach, that learned that subject. One who learned it in a traditional setting, and one who is self-taught in it. Another instructor is useful for this. At least as useful, and probably more so, would be someone who uses that knowledge professionally outside the educational arena. Have them explain some of the concepts to you, especially concepts that your students seem to struggle with. This should be in an informal setting, such as over coffee, or lunch, rather than in a classroom environment. It can even be other users here on Stack Exchange, especially if you know them from the Stack Overflow, Code Review, or Computer Science sites. (For that you could create a new chat room where you would not be disturbing a regular chat room, and have a transcript available as a benefit.) Again, the point is not to learn the material, but to discover how they &quot;see&quot; it, and they attempt to explain what they &quot;see.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After these three studies are done, your blinders are probably already gone. You can now see how others understand and conceptualize the material, and how they present it to others. Applying that knowledge to yourself, you can see what strengths there are to how you learned, and how to leverage those when teaching. You can also find what weaknesses there are, and how to overcome, or avoid, them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With luck, you will also have managed to encounter at least one person who operates best in each of the three (&lt;a href=&quot;https://en.wikipedia.org/wiki/Learning_styles#Learning_modalities&quot; rel=&quot;nofollow noreferrer&quot;&gt;VAK/VARK&lt;/a&gt;) learning styles, and can incorporate discoveries about that into your teaching as well. There is even an online, 20 question, survey you (or your students) can take to find out which style, if any, you favor on the &lt;a href=&quot;http://www.educationplanner.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;EducationPlanner&lt;/a&gt; website &lt;a href=&quot;http://www.educationplanner.org/students/self-assessments/learning-styles-quiz.shtml&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mention the learning modality since you can have &quot;blinders&quot; on here just as you can from the way you learned, and such are likely even harder to spot or overcome. For some extra reading on the modalities affecting students try this paper by &lt;a href=&quot;https://drive.google.com/file/d/0ByzGdQ5Guq0gODlQRkUwSlZOX2c/view?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gholami and Bagheri&lt;/a&gt;. With respect to online courses read &lt;a href=&quot;https://drive.google.com/file/d/0ByzGdQ5Guq0gSGVVZDEya2kzLUU/view?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Burns&lt;/a&gt;. For a third perspective see  &lt;a href=&quot;https://drive.google.com/file/d/0ByzGdQ5Guq0gbGpvVGFOelRnN1k/view?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fedynich, Bradley, and Bradley&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="150" LastEditDate="2017-06-28T05:47:21.913" LastActivityDate="2017-06-28T05:47:21.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1174" PostTypeId="5" CreationDate="2017-06-28T06:41:27.627" Score="0" Body="&lt;p&gt;Supplying SQL statements to an SQL database, is on some websites (very rare nowadays) an unchecked operation, meaning that the statements are immediately passed onto the database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows people to pass their own statements to the database. Consider a login form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[Input box: for username] ____________&#xA;[Input box: for password] ____________&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If supplying a correct &lt;code&gt;(username,password)&lt;/code&gt; match, the user will login to their account. But what if one supplied the following in the Username input:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;myUsername OR &quot;&quot;=&quot;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And in the password field:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;myPassword OR &quot;&quot;=&quot;&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so the sql statement sent to the database would be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT * FROM Users WHERE username='myUsername' OR &quot;&quot;=&quot;&quot; AND password='myPassword' OR &quot;&quot;=&quot;&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which results in the entire users table, since &lt;code&gt;OR &quot;&quot;=&quot;&quot;&lt;/code&gt; is &lt;strong&gt;always&lt;/strong&gt; true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is known as SQL injection.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-28T09:45:46.007" LastActivityDate="2017-06-28T09:45:46.007" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1175" PostTypeId="4" CreationDate="2017-06-28T06:41:27.627" Score="0" Body="Questions related to teaching about SQL injection and how to prevent it." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-28T09:45:56.533" LastActivityDate="2017-06-28T09:45:56.533" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1176" PostTypeId="2" ParentId="1143" CreationDate="2017-06-28T07:39:18.917" Score="3" Body="&lt;p&gt;YouTube has many videos about SQL injection, live demos etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When starting to explain sql injection, this &lt;a href=&quot;https://www.youtube.com/watch?v=v_wyUp_jBrs&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube video&lt;/a&gt; would be a good choice in my opinion because it has a very simple source code and offers extreme vulnerability by having full login access after injection. So it should be clear at first sight for students why this is a real big problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's a good and easy to understand example, especially for people who are not aware of sql injection threats. The example server code is written in PHP but so easy that's should be no problem to read for anybody able to write jsp files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why is this a good video for students not aware about SQL injection?&lt;/strong&gt; (in a nutshell) &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;Ups&quot; effect &lt;em&gt;(after SQL injection the attacker is able to login)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Very simple to example, so easy to understand&lt;/li&gt;&#xA;&lt;li&gt;Author does explain steps with drawings&lt;/li&gt;&#xA;&lt;li&gt;All sources and data are visible inside video&lt;/li&gt;&#xA;&lt;li&gt;To try this out there is no special &quot;magic&quot; hacktool necessary, just brain + computer and keyboard&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A description of the steps inside the video:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a SQL table called &quot;users&quot; having &quot;username&quot; and &quot;password&quot; as columns in a database.&lt;/li&gt;&#xA;&lt;li&gt;create a &quot;loginform.html&quot;:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA; &#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;form action=&quot;loginpage.php&quot; method=&quot;POST&quot;&amp;gt;&#xA;  Username: &amp;lt;input type=&quot;text&quot; name=&quot;username&quot;/&amp;gt;&#xA;  Password: &amp;lt;input type=&quot;text&quot; name=&quot;password&quot;/&amp;gt;&#xA;  &amp;lt;input type=&quot;submit&quot;/&amp;gt;&#xA;&amp;lt;/form&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create a &quot;loginpage.php&quot;:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;?php &#xA;// create connection to database&#xA;$mysqli = new mysqli(&quot;localhost&quot;, &quot;dbuser&quot;,&quot;password&quot;,&quot;databasename&quot;);&#xA;&#xA;// fetch post data to variables&#xA;$user = $_POST['username'];&#xA;$pwd  = $_POST['password'];&#xA;&#xA;// create (vulnerable) SQL&#xA;$sql = &quot;SELECT * from users where username = '$user' and password = '$pwd'&quot;;&#xA;&#xA;// execute SQL&#xA;$result = $mysqli-&amp;gt;query($sql);&#xA;&#xA;// handle login&#xA;if ( $fetched_row = $result-&amp;gt;fetch_row() ){&#xA;    // found a row for given username with password...&#xA;    echo &quot;login successful!&quot;;&#xA;}else{&#xA;    echo &quot;login failed&quot;;&#xA;}&#xA;&#xA;// close connection&#xA;$mysqli-&amp;gt;close();&#xA;&#xA;?&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;hack the page by entering &lt;code&gt;no_one&lt;/code&gt; as user name and enter &lt;code&gt;' OR ''='&lt;/code&gt; as password. When submit button is pressed login is successful. The reason is the resulting SQL:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;select * from user where username='no_one' and password='' OR ''=''&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It should be very easy to adopt the PHP example to a JSP variant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What the solution?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use prepared statements...&lt;br&gt;&#xA;In Java/JSP and also in PHP it comes out of the box, but has to be used...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1492" LastEditorUserId="41" LastEditDate="2017-06-28T18:06:14.530" LastActivityDate="2017-06-28T18:06:14.530" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1177" PostTypeId="2" ParentId="146" CreationDate="2017-06-28T10:07:16.193" Score="1" Body="&lt;p&gt;Another analogy which comes to mind is buildings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt;: You never build a building. You build a house, an apartment building or an office building. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Polymorphism and Inheritance&lt;/strong&gt;: An apartment building is a building, but also implements the &#xA; functions of &lt;code&gt;Habitat&lt;/code&gt;. That would be an interface. So, you have&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;interface Habitat;&#xA;abstract class Building;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class ApartmentBuilding extends Building implements Habitat{...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And this shows the basic construct (he, unintended pun) of OOP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A singleton can be &lt;code&gt;EmpireStateBuilding&lt;/code&gt;. There's only one, and if someone's asking for one, a reference to the existing one is given. Just before it was built, asking for &lt;strong&gt;an&lt;/strong&gt; &lt;code&gt;EmpireStateBuilding&lt;/code&gt; would create one single &lt;code&gt;EmpireStateBuilding&lt;/code&gt;. So it's a singleton.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the has-a relationship can be explained with a &lt;code&gt;Wall&lt;/code&gt; object. Our &lt;code&gt;abstract Building&lt;/code&gt; &lt;strong&gt;has a&lt;/strong&gt; collection of &lt;code&gt;Wall&lt;/code&gt;s. A wall is not abstract, but rather concrete (pun #2), and can also be extended (pun #3?) to a &lt;code&gt;InnerWall&lt;/code&gt; or &lt;code&gt;OuterWall&lt;/code&gt;. The &lt;code&gt;GreatWallOfChina&lt;/code&gt; is a singleton extending &lt;code&gt;Wall&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this analogy covers most of what's discussed when teaching OOP.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-28T10:07:16.193" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1178" PostTypeId="2" ParentId="1143" CreationDate="2017-06-28T11:14:49.993" Score="6" Body="&lt;p&gt;I liked &lt;a href=&quot;http://blog.ioactive.com/2013/03/sql-injection-in-wild.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this article&lt;/a&gt; by Gunter Ollmann, and his &lt;a href=&quot;https://twitter.com/gollmann/status/313393642922442752&quot; rel=&quot;nofollow noreferrer&quot;&gt;accompanying tweet&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I think it could be used to get the idea across of how someone tried to attack a traffic offences database using SQL injection. Obviously the traffic camera system is doing optical character recognition on vehicles' number plates, and the attacker hoped he could inject a DROP DATABASE command. It is uncertain whether the attack worked or not.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/5OOIq.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/5OOIq.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1505" LastEditorUserId="1505" LastEditDate="2020-06-19T15:56:00.317" LastActivityDate="2020-06-19T15:56:00.317" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="1179" PostTypeId="2" ParentId="1150" CreationDate="2017-06-28T11:18:29.700" Score="2" Body="&lt;p&gt;Learning Latin or Geometry is useful even to students who will never need to translate Latin manuscripts or plan a moon landing, and I think the same goes for computer science. As with Latin or Geometry, the main skill that Computer Science encourages is a disciplined approach to problem solving by collecting evidence and making logical inferences from the evidence (technically, I suppose it's programming that encourages that rather than Computer Science per se, but I'm assuming that Computer Science involves a large dose of programming). One thing I notice on StackOverflow is that you can generally tell an inexperienced programmer by the fact that they lack these problem-solving skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's not just problem-solving in the sense of discovering the cause of an observed effect: it's creative problem-solving in an engineering sense -- devising an artefact with a required set of properties. And that of course involves the ancillary skills of teamwork, communication, and planning. Another benefit is that creating things that demonstrably work is enormously confidence-boosting, and one thing that many teenagers really need most is to have their confidence boosted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realise I'm answering the question here from the perspective &quot;how will the study of computer science make you a more effective person&quot;, rather than &quot;how will it be viewed by people who are assessing your qualifications for particular career or further study choices&quot;. In an ideal world the answer would be the same, but if you're asking how a qualification in CS is valued in industry or academia, I'm afraid I don't know the answer.&lt;/p&gt;&#xA;" OwnerUserId="1506" LastActivityDate="2017-06-28T11:18:29.700" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1180" PostTypeId="1" CreationDate="2017-06-28T13:36:41.587" Score="-1" ViewCount="830" Body="&lt;p&gt;I take it as the &lt;strong&gt;Prime Directive&lt;/strong&gt; that I must teach every student in every class session. You may disagree, but I'm not asking to debate that question, but to look for how it might be accomplished, assuming it is, at least, a goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't about lecture, per se. I'm not sure I believe it is possible to teach everyone with just lecture, since we all learn differently. So this isn't about what &quot;level&quot; at which to pitch the course. Suppose you wanted to give &lt;em&gt;something&lt;/em&gt; to &lt;em&gt;everyone&lt;/em&gt; in every class period. How would you proceed?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's assume that your class contains people of different background, preparation, and ability. Let's &lt;strong&gt;not&lt;/strong&gt; assume that everyone needs to get the &lt;em&gt;same&lt;/em&gt; thing out of each class, but something that will advance their own learning. Let's also assume that helping those with little motivation is not the main issue. I'm also not looking for a way that &lt;em&gt;guarantees&lt;/em&gt; the result, but for techniques that make it highly likely to be achieved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some ideas about this, of course. Active Learning is my big hammer. Teamwork also. Paired learning (not just pair programming) maybe, though I'd love to hear from anyone who has experimented with that (either successfully or unsuccessfully). I've done &lt;em&gt;Paired Teaching&lt;/em&gt; with a co-instructor in which each of us does different things and takes control at different times, with different students likely preferring one of us over the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once had two students who had failed a compiler course, never having had a positive educational experience land at the very top of the class in the following term. The other students there, one of my highest performing groups ever (on technical issues anyway), were very angry, accusing me of putting &quot;ringers&quot; in the class to make them look bad. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note for the record that I have over 40 years of teaching experience and still can only begin to approach this, though I do believe that it is the prime directive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing in the Academia list seems similar to this, and I'm interested in CS specific ideas. I think it would be  different in, say, teaching Russian Language, or Poetry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not looking for a definitive answer, but for ideas for how to structure the whole teaching process so that you reach everyone. But I'm also not looking for debate, but for practical suggestions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="283" LastEditDate="2017-06-28T14:52:31.723" LastActivityDate="2017-06-28T17:27:05.227" Title="How do you teach EVERY student?" Tags="|curriculum-design|best-practice|differentiation|" AnswerCount="2" CommentCount="16" ClosedDate="2017-06-28T18:23:03.383" ContentLicense="CC BY-SA 3.0" />
  <row Id="1181" PostTypeId="2" ParentId="1150" CreationDate="2017-06-28T13:43:03.673" Score="1" Body="&lt;p&gt;I have seen people with some background in, but not necessarily extreme proficiency in, programming be successful in the following fields:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;IT project management. Having some technical background helps the managers relate better to the staff and perform better risk analysis and planning.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Financial analysis.  I have met literally dozens of people who have a strong background in finance, business and/or math, and have light coding skills, and became Excel power users and perform sophisticated financial analysis in their jobs.  This requires some basic coding skills (data structures, flow control) but also substantial background in the business and finance.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Training.  Trainers are usually competent programmers but tend to have more breadth than depth.  Successful training requires a lot of other skills that developers do not usually have including presentation skills, talking to a group, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-28T13:43:03.673" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1183" PostTypeId="2" ParentId="1180" CreationDate="2017-06-28T13:53:29.467" Score="5" Body="&lt;p&gt;I am not sure if your post is a statement or a question.  However it is my opinion (after more than 25 years in the software industry) that some topics are just not for everyone, and computer science and programming is one of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is an admirable goal to strive to teach every student in every class, but a more realistic goal might be to improve each student's understanding in some way in every class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to the focus on STEM in schools and the prevalence of software/IT related jobs, I think an idea has emerged that anyone can be a software developer if they are simply taught well and if they apply themselves.  I unfortunately don't believe that this is the case.  To me it is somewhat like singing or running.  Some people can naturally sing in tune and others can comfortably run a few miles at a good pace.  You can hold singing or running classes and you can definitely improve anyone's ability to do either.  But you aren't going to teach every single person to have perfect pitch or to run a 5 minute mile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science / software engineering is a hard science and in my opinion requires a certain type of thinking, problem solving, patience, and fascination with things that exist only in your mind. It also tends to require long hours of concentrated effort usually working alone.  While I believe most people can learn enough about the topic to at least have an appreciation for it, this kind of activity is simply not something that everyone can do successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know many people that I readily admit are far more intelligent than me and have skills that I will never have who are successful in fields such as law, medicine, business, education, and music.  Some of them have tried programming or engineering and did not like it which is why they pursued other fields.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-28T13:53:29.467" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1186" PostTypeId="1" AcceptedAnswerId="1195" CreationDate="2017-06-28T14:26:03.160" Score="18" ViewCount="7283" Body="&lt;p&gt;Occasionally I have students who are 'overmotivated': they put way too much effort in to trying to memorize every word of the textbook, every idea, each diagram I draw... They spend all of their off hours, all evening and weekend, reading, rereading, underlining, highlighting, going over the same pages again and again. I look at their textbook and nearly every word is underlined and/or highlighted!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I project the textbook, there might be a few lines or words on each page that I have underlined, which I explain. I try to cover those vital ideas at least three times on different days and in different ways. There are parts of textbooks where I say &quot;skip this, we will get to it later.&quot; These students then come to me with questions about that. I am fine if they want to learn it now instead of later, but I am not fine if they are struggling, drowning in concepts, burning themselves in to the ground, and they try to take on that needless idea that I told them to skip.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you do with students like this? I am in the USA, so I am not expecting this level of intensity. It is working against these students' progress.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-03T15:55:55.733" LastActivityDate="2017-08-03T15:55:55.733" Title="Dealing with students who are overly motivated" Tags="|student-motivation|differentiation|" AnswerCount="9" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1187" PostTypeId="2" ParentId="3" CreationDate="2017-06-28T14:31:26.223" Score="2" Body="&lt;p&gt;Break the project up into separate, independent components that must work together and assign each one to a different person or group.  This simulates how software is written in the industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could be one person doing a different layer of the stack (front end, middle tier, database), or it could be different stacks/services that must operate together (one to authenticate, one to place an order, one to fulfill an order, one to send a receipt, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using contract driven development, the project could start with a spec being defined for how the different parts of the system will operate with one another and then each developer or team would be responsible for their part and no other parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use version control such as git it is also a simple matter to see who checked in what code, and how often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience in over 25 years in the software industry, 80% of the work is usually done by 20% of the people, sometimes even more extreme (90/10 or 95/5).  The best developers are not 10% or 20% more productive than the worst, but 10x or 20x.  Too many people get good at asking other people to do their work for them rather than doing it themselves.  I think it would be great to teach every student to pull their own weight.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2017-06-28T14:31:26.223" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1188" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T14:36:59.930" Score="6" Body="&lt;p&gt;It would really depend on the student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest that you see if it those students get better grades (compared to others that do the expected amount of work). Also, it might be worth looking out for signs of breakdowns, or anxiety (usually expressed in hurried complaints about workload). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they get better grades and don't collapse from the work, then I would think that everything is ok.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if they don't get better grades (I'd define that as 1-2 tests that are below their average) or are showing signs of breakdowns, I'd talk to them and say that they are putting more effort than is needed (and healthy). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They might protest that &quot;I'm ok&quot;, but that might be an attempt to convince themselves. If they do this, then you should point out that the curriculum is designed in a specific way, and they are overworking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also advise them to put the additional effort into expanding their knowledge of other things, in addition to the &quot;Vanilla&quot; curriculum. This might not work with all students, but for some, it's like presenting a good opportunity.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-28T14:36:59.930" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1189" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T14:41:40.790" Score="11" Body="&lt;p&gt;It seems like the students are trying to learn all they can using the resources you've provided. Memorization in the way you describe strikes me as a sign that the students don't have enough work to do and are hungry for more knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of allowing the students to memorize every word of the textbook, I'd give them something better to do. Why don't you try providing additional reading with each assignment, or additional extra credit opportunities? You could also invite the students to meet with you so you can tutor them in more advanced topics. They seem to really want more work, so give them what they want!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of a student who is doing badly despite trying to learn everything you give them, I'd give them personal attention to make sure they understand the topic. You could recommend that they find you during a free period or during your office hours to discuss where they are struggling in the coursework. That will allow you to more throughly evaluate the problem and establish a plan that will help the specific student in question.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-28T15:11:17.427" LastActivityDate="2017-06-28T15:11:17.427" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1190" PostTypeId="2" ParentId="1143" CreationDate="2017-06-28T15:20:13.863" Score="2" Body="&lt;p&gt;I like the ideas of a two part assignment, but this would be my suggestion:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Semester 1 : Run the project as before and mark it as expected, for example out of 20.&lt;/li&gt;&#xA;&lt;li&gt;Semester 2 : Explain security, including SQL injection. Set them the task of hardening their semester one projects, and tell them that you will be remarking the project. This time they start off with their mark from semester one, and you will then deduct the following:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1 point for listing the schema.&lt;/li&gt;&#xA;&lt;li&gt;1 point for listing the users.&lt;/li&gt;&#xA;&lt;li&gt;1 point for listing plaintext passwords.&lt;/li&gt;&#xA;&lt;li&gt;1 point for cracking hashed passwords.&lt;/li&gt;&#xA;&lt;li&gt;1 point for changing a password and then logging in.&lt;/li&gt;&#xA;&lt;li&gt;2 points for deleting the users.&lt;/li&gt;&#xA;&lt;li&gt;2 points for dropping the user table.&lt;/li&gt;&#xA;&lt;li&gt;4 points for dropping the entire database.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Finally if they think security isn't important then relate this recent story that ignorance really isn't bliss &lt;a href=&quot;https://arstechnica.com/security/2017/03/firefox-gets-complaint-for-labeling-unencrypted-login-page-insecure/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Firefox gets complaint for labeling unencrypted login page insecure&lt;/a&gt;. Read the comments to see how quickly it went from story to passwords and credit card details obtained to database dropped to web site hosed.  &lt;/p&gt;&#xA;" OwnerUserId="1513" LastEditorUserId="1513" LastEditDate="2017-06-28T16:02:57.380" LastActivityDate="2017-06-28T16:02:57.380" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1191" PostTypeId="2" ParentId="1150" CreationDate="2017-06-28T15:22:48.333" Score="6" Body="&lt;p&gt;At my university in Canada, all students in their first year of engineering are required to take a basic programming class, regardless of the type of engineering you intend to specialize in. I have been told that a similar rule is in place in different engineering schools. In my personal experience I have also benefited from programming knowledge in statistics, math (proofs), and philosophy (critical thinking and logic). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an aside, another good reason to take CS that is unrelated (or at least indirectly related) to school courses is the ability to look at small gadgets and gizmos and think to yourself &quot;I could build that&quot;. It's empowering. It gives you the ability to watch movies and chuckle to yourself when you realize that the writers sometimes don't know much about computers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I forgot that it is common now to learn programming in GIS (Geographical Information Systems) too.&lt;/p&gt;&#xA;" OwnerUserId="1512" LastEditorUserId="1512" LastEditDate="2017-07-13T15:47:26.343" LastActivityDate="2017-07-13T15:47:26.343" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1192" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T15:27:35.213" Score="5" Body="&lt;p&gt;It appears that the student(s) in question don't really &lt;em&gt;want&lt;/em&gt; to do what they are doing, but feel like they &lt;em&gt;have to&lt;/em&gt;; this answer addresses that. Be sure to consider that maybe your student(s) just really want to learn the extra stuff, and don't block them from doing that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Emphasize the power of summary. In a world with the internet, no one needs to memorize every concept, but just understand the basics, or what to google when you need something. I can't tell you how many times I've looked up details on Stack Overflow, and then using that finished my program. Tell them that the important thing is to understand the big ideas, and be able to implement them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they don't respond to that, try to spend a couple of days teaching completely without the book, and asking your students to not use it. Summarize up front, &lt;em&gt;hand out&lt;/em&gt; notes with the points you want, and then let them go on the lab work. Tell them that the notes you have handed out are all they should need, along with occasionally googling something. If they are taking notes beyond that, tell them there's a problem. Hopefully that gives them an idea of what they need to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also - a textbook with every sentence highlighted doesn't point out the more important things - it's just annoying to read. Perhaps you can show a quick example - plain page, overhighlighted page, judiciously highlighted page - in a one-on-one with those students.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-06-28T15:27:35.213" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1193" PostTypeId="1" CreationDate="2017-06-28T15:41:46.110" Score="3" ViewCount="134" Body="&lt;p&gt;In a class for highschool students, should I talk about new, active, and exciting fields of CS to inspire them to perhaps further pursue CS or just get them more interested, or would it be better to stick to the basics? If the answer is that it's a good idea, please elaborate with an example of a subfield that would be good to talk about and why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a field might be quantum computing - covering maybe the basic ideas and mathematics, and giving them some resources to explore, and a nice simulator like &lt;a href=&quot;http://algassert.com/quirk#circuit=%7B&amp;quot;cols&amp;quot;:[]%7D&quot; rel=&quot;nofollow noreferrer&quot;&gt;this one&lt;/a&gt; to play with (or would that be going into too much depth?). Talking about molecular computing would also be an option.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-28T20:38:53.580" LastActivityDate="2017-06-30T05:59:13.620" Title="Talking about new/active subfields of CS to inspire students" Tags="|secondary-education|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1194" PostTypeId="2" ParentId="1193" CreationDate="2017-06-28T15:53:23.180" Score="5" Body="&lt;p&gt;I think a really interesting one would be the idea of cryptocurrency, this may not be what you are looking for particularly, but it is a new horizon that is bringing many new ideas to tech. Ideas to cover, the block chain, the &lt;a href=&quot;https://techcrunch.com/2017/06/24/coinbase-is-reimbursing-losses-caused-by-the-ethereum-flash-crash/&quot; rel=&quot;noreferrer&quot;&gt;ethereum flash crash&lt;/a&gt;, the anonymity (or lack thereof) of cryptocurrency, regulation of cryptocurrency. How mining works. The list goes on and on&lt;/p&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="150" LastEditDate="2017-06-28T17:12:00.000" LastActivityDate="2017-06-28T17:12:00.000" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1195" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T16:01:15.643" Score="17" Body="&lt;p&gt;I don't think this is really a CS problem - though of course some individuals do get &quot;addicted&quot; to computing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The root of the problem is that these students don't know how to study - and ironically, it's quite likely that the education system they are progressing through has never even &lt;em&gt;tried&lt;/em&gt; to teach them that basic skill. But you don't have time to teach them that, &lt;em&gt;and&lt;/em&gt; teach the contents of your CS course as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students who have found everything &quot;easy&quot; since the start of their education are often the worst sufferers - eventually they hit the brick wall where just listening to the teacher and &quot;getting it&quot; with no effort doesn't work any more, and then they are completely lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best solution would be to try to get a general &quot;how to study&quot; course into the curriculum for every student - or at the least, start your course by giving them some guidelines (including notes to refer back to!) on the study strategies that work, and those that don't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can only lead the horse to the water - as somebody once said, &quot;Homo sapiens has a fundamental design defect: most members of the species can &lt;em&gt;learn&lt;/em&gt;, but none of them can be &lt;em&gt;taught&lt;/em&gt;.&quot;&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2017-06-28T16:01:15.643" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1196" PostTypeId="2" ParentId="1180" CreationDate="2017-06-28T17:21:16.540" Score="1" Body="&lt;p&gt;Since I'm looking for techniques to advance a goal, not debate about the goal, let me give an example. It isn't definitive, but there isn't a definitive answer to the question &quot;How do YOU do x?&quot;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;One way to involve students at any level in a programming course is to use pair programming. However, for it to work you need to set parameters. If the students always get to choose their own partners they will usually choose people similar to themselves, including ability level. So, at least some of the time I need to either assign pairs or randomize (and track) pairs. I need to assure that each student takes and fulfills their current role (driver or navigator) faithfully and that they switch roles often. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal in the class room is learning, not maximizing locs/hour. So slowing down the process for a bit is an acceptable cost (to me).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do I think this works? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantages for the two students, when mismatched, are different, but symmetric. The weaker student gets to watch the superstar up close and maybe contribute a bit. Even saying &quot;I don't understand why you did that&quot; is a contribution, making the stronger student evaluate &lt;em&gt;and explain&lt;/em&gt; his/her choices. The stronger student benefits from these small challenges both technically and socially. They will eventually, in whatever career they choose, need to interact intelligently with others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also have evidence that students working in pairs (on programming or other work) tend to be &lt;em&gt;much&lt;/em&gt; more creative than when working separately. And the &quot;weaker&quot; student may have things to contribute that you haven't considered and are unlikely to until you put them in a situation where they can glow a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One challenge is having an extremely arrogant student who refuses to work with anyone who is &quot;beneath&quot; them. That person has a lot to learn, though not in a technical sense, perhaps. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-28T17:27:05.227" LastActivityDate="2017-06-28T17:27:05.227" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1197" PostTypeId="2" ParentId="1193" CreationDate="2017-06-28T17:26:42.427" Score="4" Body="&lt;p&gt;If you're able to discuss some relatively complex mathematics (compared to what you might generally teach at this level), &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_neural_network&quot; rel=&quot;noreferrer&quot;&gt;artificial neural networks&lt;/a&gt; are fascinating to discuss and work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ever wanted to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.hexahedria.com/2015/08/03/composing-music-with-recurrent-neural-networks/&quot; rel=&quot;noreferrer&quot;&gt;create a program to generate music (that doesn't sound horrible)&lt;/a&gt;? &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=qv6UVOQ0F44&quot; rel=&quot;noreferrer&quot;&gt;beat Super Mario World&lt;/a&gt; without actually programming each step?&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.boredpanda.com/computer-deep-learning-algorithm-painting-masters/&quot; rel=&quot;noreferrer&quot;&gt;pretend to be Picasso&lt;/a&gt; without having any artistic talent?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are an immense number of use cases for neural networks (although there is a lot of hype around the subject with some unrealistic promises!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would imagine a basic grasp of calculus and a firm understanding of the basics (syntax, algorithmic thinking, etc) would be necessary, although it would depend on what depth you wanted to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could discuss superficially by just &lt;a href=&quot;http://www.explainthatstuff.com/introduction-to-neural-networks.html&quot; rel=&quot;noreferrer&quot;&gt;introducing the structure of a neural network&lt;/a&gt;, but many of the really interesting applications require a more in-depth knowledge (i.e. linear algebra/matrices) to fully appreciate the topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course &lt;a href=&quot;https://www.coursera.org/learn/neural-networks&quot; rel=&quot;noreferrer&quot;&gt;Neural Networks for Machine Learning&lt;/a&gt; seems highly relevant here, and it might be worth examining the topics covered to see how it may be possible to teach this. I don't think it's something you can really skim if you want to actually get to the &lt;em&gt;good stuff&lt;/em&gt;, but if you don't have time, showing some examples and providing resources for your students might still be worthwhile if they want to put in the time themselves.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-06-28T17:26:42.427" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1198" PostTypeId="1" AcceptedAnswerId="1201" CreationDate="2017-06-28T17:32:29.967" Score="9" ViewCount="641" Body="&lt;p&gt;First: I'm a coder, not a teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I led a 4-session &quot;Coding for Teens&quot; class at a local library this month using Khan Academy (KA). I'm contemplating scheduling another series maybe in August but I'm struggling with why they would actually need me for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The KA curriculum is pretty complete and self-contained. I was able to add value by filling in some facts about how variables work that KA didn't get into. But beyond that I'm wondering why I'm even there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would try doing some class-participation exercises at the board but KA is self-paced &amp;amp; the students are at very different places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the 4th session I had them do a class evaluation &amp;amp; they all (full-disclosure: only 3 of my 6 showed up to the final session) gave the class high marks in general and expressed interest in another series, but if I do this I'd like to feel like I add more value than a mannequin would. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case it helps, my &quot;teens&quot; are a mixed group of girls and boys from middle-school to dual high school/college enrollment. And I have one &quot;teen&quot; whom I suspect no longer actually qualifies, but it seems rude to ask &amp;amp; I don't really care.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, IMO this question is distinct from &lt;a href=&quot;https://cseducators.stackexchange.com/questions/330/supplementing-curriculum-with-online-resources&quot;&gt;that one&lt;/a&gt; because that question is about supplementing a curriculum with KA (or others) whereas I'm asking how to supplement KA. &lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="76" LastEditDate="2017-06-28T18:17:05.380" LastActivityDate="2017-06-29T01:47:15.057" Title="How to supplement Khan Academy" Tags="|curriculum-design|extracurricular-club|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1199" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T17:45:18.953" Score="4" Body="&lt;p&gt;Depending on your overall situation you might consider asking the student to collaborate with you on something that uses their skills. I'm assuming that they aren't too overextended by their study patterns. Or you could ask a small number of students with similar tendencies to work on something together, giving them orthogonal skills. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One simple example comes to mind. Ask them to write problems and exercises for you that you &quot;might&quot; want to use in the future. To make it more interesting and useful, ask for solutions as well. But ask for a couple of paragraphs of writing on each, in which the student evaluates the question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you write academic papers another avenue opens of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat. This was just a thought experiment. I haven't tried this, though I have had graduate students work on projects that I needed done, and once took two of them to a conference. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-28T17:45:18.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1200" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T17:53:04.447" Score="3" Body="&lt;p&gt;It sort of sounds to me like those students don't have a good understanding of how to effectively study computer science and programming. In that case, it might be worth explicitly taking some time in front of the class to explain what effective and ineffective study habits specifically look like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I would try emphasizing the following things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Programming/CS isn't about memorization, and is more about problem-solving. Memorizing a bunch of facts isn't going to be super helpful/cost effective, and will only give them the illusion of learning. (You can back this up by giving them 'cheat sheets'/allowing them to make cheat sheets for any exams you give).&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead, emphasize the best way to study is via practice. The metaphor I like using is that learning to code is sort of like exercising or learning to play the violin -- while reading about exercising or music theory or whatever can be helpful, you do need to hit the gym/pull out your violin at the end of the day if you actually want to improve. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use this opportunity to emphasize the importance of doing well on their homework (assuming your homeworks are actually designed this way). You can further emphasize this by providing lots of practice exercises (perhaps via an online tool, so they can test their code?) and by adjusting your grade distribution so homework/labs/projects makes up a non-trivial portion of their final grade.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Talk about passive vs active learning, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It might even be worth making the textbook optional or actually just saying outright it's not worth spending time reading it to try and further drive in the point. If you're going to do this though, you should make sure you give them plenty of other resources to make up for it -- provide really good lecture notes/slides, give them plenty of (optional?) practice problems, have lots of office hours/an online discussion board or something so it's easy for students to get help, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a caveat, these suggestions are from my experiences teaching &quot;intro to programming&quot; style courses that focus mostly on algorithmic thinking at the undergraduate level. I'm not sure exactly what your courses are like, so my suggestions might not perfectly match your student's needs and will need some adjustments.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-06-28T17:53:04.447" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1201" PostTypeId="2" ParentId="1198" CreationDate="2017-06-28T18:42:46.483" Score="11" Body="&lt;p&gt;I think you might be underselling your sessions a bit -- understanding how to effectively independently learn is a non-trivial skill that not everybody has mastered, and just being available to facilitate things and answer questions can be very valuable to your students. Having regular sessions that impose some structure and providing a small community of peers who share similar interests can also be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, one idea is that you could perhaps try and help guide your students towards working on their own, independent projects. I've found that students (especially ones who are self-teaching) often have difficulty applying what they've learned to build programs on their own -- it seems making the jump from working on guided exercises to fully independent projects is non-trivial for many people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you could do is try and make sure your students all make it over that &quot;jump&quot; in some fashion. One idea for doing this might be to slowly start weening students off Khan Academy and have them work on a mini-project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, here are some of the things I've found seem to make that &quot;jump&quot; hard for beginners (and so are things you can help with):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Idea formation:&lt;/strong&gt; beginners often find it difficult to imagine what's even possible with code (if statements and loops feel very far removed from websites, mobile apps, games, etc to a novice), and to understand how to connect their existing interests to code. (If a student is interested in games, sure, that's an obvious connection, but seeing how to write code to do things related to music, English, politics, knitting, sports, etc can be non-obvious.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you can do here is provide example project ideas, help students brainstorm, and perhaps do some preliminary research yourself so you can point students in interesting directions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project planning and problem decomposition:&lt;/strong&gt; your students will likely need help scoping out a project and creating a realistic timeline appropriate to their level of progress and the amount of time they have. You can help them identify how to break up their idea into smaller, more manageable sub-goals, suggest some initial tasks, help them outline their overall program structure, etc...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setup:&lt;/strong&gt; most projects will need students to install libraries and setup their dev environment in more sophisticated ways then most tutorials cover. They will definitely need your help here -- setup can be incredibly frustrating, even for experienced devs!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Independent learning:&lt;/strong&gt; Learning how to work through tutorials, read documentation, and compose effective google queries are all skills that more or less need to be trained. This usually happens implicitly through experience, but just being available to answer questions, give impromptu mini-lectures on related topics, etc can make things go much more smoothly for the students. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debugging:&lt;/strong&gt; Same sort of thing; debugging is hard, you can teach them strategies, help prevent them from being frustrated...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That said, you'll have to plan this carefully to avoid overloading your students. It's very likely that many of them practice coding only during your sessions and weren't planning on coding in their spare time (since it's the summer, after all!). Ideally, you should try and motivate them to work outside your sessions, but you should prepare contingency plans if that doesn't end up happening. Trying to complete even a small project in only 4 to 5 sessions will likely be a bit of a stretch, depending on how long your sessions are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can perhaps partially solve this by talking to your current students about these concerns to try and get buy-in if you're planning on having your next sessions be a continuation, or to directly state your expectations when advertising your sessions or something.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-06-28T21:49:46.070" LastActivityDate="2017-06-28T21:49:46.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1202" PostTypeId="2" ParentId="1198" CreationDate="2017-06-28T19:26:09.293" Score="4" Body="&lt;p&gt;First of all, kudos to you for being willing to support learning in your community! This is awesome work, and I'm always glad to hear someone is pitching in to help kids learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't be so sure that you're not adding value. There is a principle of teaching that you can use to guide a lot of your action in the classroom: we learn by doing. &lt;em&gt;If the student does, then the student learns. If the teacher does, then the teacher learns.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you've created is a structure where the students are doing basically 100% of the learning. You are there to check in, make sure they are safe, give guidance and support if they get stuck,  help keep the kids focused, and provide additional food for thought to kids who get really into it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't a bad thing, this is a nearly ideal learning situation. Celebrate your success, and always keep an eye out for ways you can continue to help the kids develop and grow.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-28T19:26:09.293" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1203" PostTypeId="2" ParentId="1186" CreationDate="2017-06-28T19:31:43.560" Score="1" Body="&lt;p&gt;The easiest way to address them is to simply let them know when they've hit the grade ceiling especially when you know for sure you're going to curve. Grades are numbers rather than ranks and I have no way of knowing that my 82% is the highest grade in the class. Most people tone it down a notch or two when you make it clear that they're looking at a solid 100% and &quot;remind&quot; them that's as high as it gets, especially in high school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Going in front of the whole class and saying &quot;the highest grade is 82%&quot; isn't necessarily a good idea because then it stands to reason that there's a built in 18% curve and borderline students will routinely cut back on their effort. It's best to have these sorts of conversations one-on-one and remember to take detailed notes for your own benefit. &lt;/p&gt;&#xA;" OwnerUserId="1527" LastActivityDate="2017-06-28T19:31:43.560" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1204" PostTypeId="2" ParentId="1106" CreationDate="2017-06-28T20:50:24.267" Score="3" Body="&lt;p&gt;There's some upfront work before you can contribute to an open source project. First, you have to find one. There are tons of open source software projects on &lt;a href=&quot;https://github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt;. Another source is the &lt;a href=&quot;https://www.apache.org/foundation/getinvolved.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Apache Software Foundation&lt;/a&gt;. Keep in mind that the complexity of the software and the students' skill sets will play factor in finding a match. Next, you need to learn &lt;em&gt;how&lt;/em&gt; to contribute. To contribute on GitHub, you need a good understanding of the GitHub website and of course &lt;a href=&quot;https://git-scm.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Git itself&lt;/a&gt;. In GitHub, you typically fork the repo that you want to contribute to, make the changes to your forked version, create a &lt;em&gt;pull request&lt;/em&gt; to the original owner, discuss the changes with the owner, make more changes, repeat. When ready, the owner accepts the pull request and the contribution is official. This process alone can be intimidating to a new programmer. One easy way to contribute to open source is to fix errors in documentation (e.g., a README.md file). The Apache Software Foundation offers different ways for people to contribute too, not just coding. Once you have some experience, you can make more substantial contributions. &lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-06-28T20:50:24.267" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1205" PostTypeId="1" CreationDate="2017-06-28T23:08:31.760" Score="34" ViewCount="18796" Body="&lt;p&gt;As a TA, the usual workflow for grading programming assignments for an introductory course would be:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Some instructors used email as a submission mechanism (yes, really.)&lt;/li&gt;&#xA;&lt;li&gt;So, search for submissions in email and download every submission&lt;/li&gt;&#xA;&lt;li&gt;Organize it to make grading easier later on&lt;/li&gt;&#xA;&lt;li&gt;Go into each directory, compile it. Realize it doesn't work.&lt;/li&gt;&#xA;&lt;li&gt;If I email the student, I get a response 'Works on my computer'&lt;/li&gt;&#xA;&lt;li&gt;Debug it and make it compile on my computer&lt;/li&gt;&#xA;&lt;li&gt;Due to lack of test cases, every student has demonstrated their work with their own version of output on the console&lt;/li&gt;&#xA;&lt;li&gt;Decipher their output and hopefully they get a good grade&lt;/li&gt;&#xA;&lt;li&gt;Partial grading is hard because I have to dig through the code and see what parts are done and how far away they are from a working solution&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;All in all, it takes about 7-10 minutes per submission &lt;em&gt;if&lt;/em&gt; I do things carefully. 100 students, 3 programming problems = 300 submissions. 10 mins per submission = 3000 minutes = 2 days of continuous grading. Impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have heard instructors make scripts, use some tools. Sometimes, they get super strict on the output of the program so they can grade it easily. Worse, they make problems easier so it's easier to grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I automate this efficiently?&lt;/p&gt;&#xA;" OwnerUserId="1397" LastEditorUserId="27" LastEditDate="2019-02-18T20:25:27.940" LastActivityDate="2022-05-12T10:12:49.863" Title="How can I automate the grading of programming assignments?" Tags="|grading|auto-graders|" AnswerCount="11" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="1206" PostTypeId="2" ParentId="2" CreationDate="2017-06-29T00:01:51.087" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Disclaimer: I am one of the authors of this &lt;strong&gt;free&lt;/strong&gt; service.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR: Use &lt;a href=&quot;http://www.autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr.com&lt;/a&gt; which has been battle tested in university classrooms&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;AutoGradr lets you create your own labs and projects&lt;/li&gt;&#xA;&lt;li&gt;Labs: small, bite-sized questions to help students get familiar to a new concept. Students work in AutoGradr's web IDE and get instant feedback.&lt;/li&gt;&#xA;&lt;li&gt;Projects: suitable for more complex questions where students can work in their own IDEs (Visual Studio, Eclipse etc.). They upload their solutions to AutoGradr and get instant feedback.&lt;/li&gt;&#xA;&lt;li&gt;AutoGradr provides instant feedback to students allowing them to know their mistakes and make a better submission before it ever gets to you.&lt;/li&gt;&#xA;&lt;li&gt;AutoGradr provides report on code quality to both students and instructors. Students can make newer attempts to improve their submission.&lt;/li&gt;&#xA;&lt;li&gt;Instructors never have to write code to automate the grading.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;AutoGradr projects have test cases that define what the program output must be. Test cases can either be visible or hidden. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test cases can contain user input via stdin or files. Students can write to files and have them automatically tested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/4QVZ3.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4QVZ3.png&quot; alt=&quot;Project on AutoGradr&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;AutoGradr's instant feedback tells student how their output differed from the expected output. They can make multiple attempts to fix any issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/tFWWR.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/tFWWR.png&quot; alt=&quot;AutoGradr Feedback&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Students and instructors can see report on code quality. Students can fix their code quality issues and make newer submissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/jRbe2.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jRbe2.png&quot; alt=&quot;AutoGradr Lint Report&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1397" LastEditorUserId="58" LastEditDate="2017-06-29T00:06:00.907" LastActivityDate="2017-06-29T00:06:00.907" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1207" PostTypeId="2" ParentId="1198" CreationDate="2017-06-29T01:47:15.057" Score="1" Body="&lt;p&gt;Thank you for taking the initiative to help educate young students who have an interest in programming. Without people to encourage them, many teens who have real potential in the field simply fall through the cracks and end up working in other industries that they aren't so well-suited to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't underestimate yourself or your impact on these kids. Even though it may seem like Khan is doing everything, just having the security net of a professional is &lt;em&gt;hugely&lt;/em&gt; relieving when you start out. And even though the course is rather self-paced, a lot of teens lack the self-discipline to actually proceed and progress in something abstract like coding and just by being there you motivate these students to put in the effort.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-29T01:47:15.057" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1208" PostTypeId="2" ParentId="1205" CreationDate="2017-06-29T01:49:45.480" Score="9" Body="&lt;p&gt;Yikes, that doesn't sound like a fun way to grade. Sounds about like what I do with students that are competing in &lt;a href=&quot;http://acsl.org&quot; rel=&quot;noreferrer&quot;&gt;ACSL&lt;/a&gt; competitions. But that's only 6 or 7 students, 4 times a year. I can't imagine trying it with 100 students all year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I'm doing, and what I've done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Online Autograder&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I'm doing now. Kids login to Canvas and it launches an LTI tool embedded in an assignment. They do their coding in Chrome and click the Test button when they're ready. They can keep testing until their happy with the grade. Grades get sent back to Canvas. I still have to transfer them to our actual gradebook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can then go back and download the submissions if I want to look at them for style or tips. Generally I try and do this with everybody on at least one lab per lab set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've found is that students average about 11 submissions before they move on to the next lab. I only grade the last one, although I'll go back and look to see how they progressed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Downside to this is that it works well for smaller labs, but not as much with larger projects. I can break down large projects into pieces that they can check, but eventually there has to be a full project turned in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;JUnit Tests&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I moved online I would write a JUnit test for every lab, and usually I'd write two. One that I would include with the starter code and one, more in depth, that I would use to test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students could run the test code as many times as they wanted. Then, they'd submit their solutions and I'd run it against the other test code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Biggest downside is it was pretty time consuming to write unit tests for every lab. I've gotten pretty quick, but it's still a time suck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Walk around&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not ideal, but I can pick up a lot about students' code by walking around the room and watching them code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do this a lot with projects to get a feel for where the kids are on the project. By the time it's turned in I've already got a pretty good idea on what they've done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doesn't scale well though. Biggest class I've ever had was 34 students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;Participation Grades&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes I fall into this trap, especially with my second and third year students. I give them labs, they work on their labs, and I assume that they're done correctly if they've been working in class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only saving grace on this one is that labs are worth very little and tests make up a majority of their averages. So even with gimmie grades on labs, they can still get hammered on the tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admittedly not a good solution, and one that I'm trying to work my way out of next year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Eyeball It&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Skim the code and see if you think it works. Same as the participation, this only really works with smaller assignments and when labs aren't worth all that much. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-29T01:49:45.480" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1209" PostTypeId="2" ParentId="918" CreationDate="2017-06-29T02:16:52.943" Score="4" Body="&lt;p&gt;Dealing with (my) parents who are not particularly aware of computers or the difference between a server and a database, I believe I have a fairly simple answer for this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Computer science&lt;/em&gt; is the theory and study of how computers work, algorithms (in layman's terms, a process to solve a problem), and how to think like a computer in order to manipulate it to do what you/the client/whoever want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Programming&lt;/em&gt; is the actual act of applying the theory and manipulation of the machine. They often get mixed up because programming is such an integral part of CS but is, in fact, only a part of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This explanation in some form has had a fairly positive response to me. Or, if you're particularly pressed for time: &quot;Programming is part of computer science, but CS is a lot more focused on the understanding of how the computer works.&quot;&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-29T02:16:52.943" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1210" PostTypeId="2" ParentId="733" CreationDate="2017-06-29T02:34:22.903" Score="1" Body="&lt;p&gt;I would probably say Python or Ruby, being that they are fairly easy languages to read and learn for beginners while still being worth their salt for CS pros.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another suggestion if you prefer a graphics-oriented course is using Javascript in the Unity engine is the best way to go. There is a graphical element (creator's choice of 2D or 3D) to the course then for the architects/engineers while still implementing a very heavily used and recruited programming language at the student's discretion.&lt;/p&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-29T02:34:22.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1211" PostTypeId="2" ParentId="349" CreationDate="2017-06-29T02:41:44.083" Score="4" Body="&lt;p&gt;I think that a reasonable next step is showing them variables with an I/O basis. Things like: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;using &quot;Hello, world!&quot; or something similar as a string and printing it&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;using integers and showing students the different operators for the language (add/subtract/multiply/divide/modulus division/integer division)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1309" LastActivityDate="2017-06-29T02:41:44.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1212" PostTypeId="2" ParentId="914" CreationDate="2017-06-29T03:51:53.417" Score="3" Body="&lt;p&gt;Find a real project (or series of small projects) that your students can do, and build up their skills and resume's together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, back in 1988(ish), a high school computer class won a contract from the Canadian National Parks service to build a tourist kiosk system. It saved the parks service money, gave the students an industry project that they could put on their resume, and brought in cash to support the (then) fledgling computer science program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not directly related to computers, but related in a general sense to encouraging a degree of professionalism, I manage a weekly webcast that is primarily crewed by teens. My oldest technician is 17, and the youngest is 11. For the most part, when they take their stations they become professionals (yeah, they're still teens so there's a certain amount of goofing around that goes on, but a team of adults will goof around just as much).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every week, their skills are live streamed to the world. In addition to technical skills, they learn management, team building, and customer relations. The occasional paid engagement as 1099 contractors (US tax code - self employed) is a definite bonus for them. In the long term, there is nothing like graduating from high school with 5 years of industry experience to raise the demand for a recent graduate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at partnering with a consultancy that uses 1099's, or other government agencies that would find a win-win situation working with your students.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-06-29T03:51:53.417" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1213" PostTypeId="2" ParentId="1157" CreationDate="2017-06-29T04:16:12.930" Score="3" Body="&lt;p&gt;Just wanted to chime in here. I'm a bit biased as one of the founders of CodeHS, but I think you should take at look at the &lt;a href=&quot;https://codehs.com/info/curriculum/apcsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeHS AP CS Principles&lt;/a&gt; course we made. Here are a number of reasons why I think it's pretty great:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It's free. You just need a free CodeHS account to track and save your work. Students and teachers can access the entire course for free, including numerous supplemental materials.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The CodeHS teacher community has created thousands more practice problems and playlists to supplement the default materials, so there is always so much more you can do.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's customizable, so if you want to add in your own lessons, activities, or quizzes, you can add them into the system and track student work all in the same place--even writing your own autograders to give students instant feedback.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Students who really excel can proceed at their own pace and study ahead even into any of the rest of the numerous courses, so there's no limit to how much you can learn.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Because students can move at their own pace and teachers can track their progress, students can be taught individually to their current level as opposed to only teaching to the average or the bottom.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's College Board Endorsed, which required a rigorous review process, so you know that it covers all of the required topics and will prepare you to ace the exam.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There is a pro version that comes with even more resources, support, and numerous time saving tools for grading, code review, tracking student progress, and more&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Most importantly, we care. We want you and your students to be successful and learn, so we're always listening to our teachers, gathering feedback, and making improvements to the courses and curriculum. If you have suggestions&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="91" LastEditorUserId="91" LastEditDate="2017-06-29T15:28:57.750" LastActivityDate="2017-06-29T15:28:57.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1214" PostTypeId="2" ParentId="1150" CreationDate="2017-06-29T04:21:26.417" Score="1" Body="&lt;p&gt;If you want to see some examples of people using computer science across many industries, you can check out this &lt;a href=&quot;https://medium.com/coding-in-the-wild&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coding in the Wild&lt;/a&gt; blog that we put together at CodeHS (I'm one of the founders of CodeHS) to get some stories of how real people use coding to help their work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students should be aware that even if their true interest lies in some other field, coding will almost certainly help them in that field, and I think the blog highlights that well.&lt;/p&gt;&#xA;" OwnerUserId="91" LastEditorUserId="91" LastEditDate="2017-06-29T15:27:51.797" LastActivityDate="2017-06-29T15:27:51.797" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1215" PostTypeId="2" ParentId="375" CreationDate="2017-06-29T04:27:30.273" Score="1" Body="&lt;p&gt;I'm going to start with a bit of definition, since industry terminology is somewhat in flux. &quot;Server&quot; means &quot;an instance of an operating system and its contents&quot;. &quot;Host&quot; means &quot;the hardware on which servers run&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can pick up decent retired hosts for under $600 on Ebay (2 x 8 core i7, 96GBRAM, 6TB HDD, 2 GPU's)  Fire one up with Ubuntu server and LAMP stack.  This is comparable to what you would get if you bought bare metal on a low end cloud system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, Ubuntu server comes with the OpenStack MAAS components as one of the primary models of installation. (&lt;a href=&quot;https://docs.ubuntu.com/maas/2.2/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.ubuntu.com/maas/2.2/en/&lt;/a&gt;) .  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With three hosts, you can set up a cloud just like the big players do.  OpenStack was open sourced by Citrix, from a subset of the same code base that major hosting providers use. Being able to get hand-on with the metal of a real virtual cloud system using the same lineage of tooling as AWS, 1 and 1, or BlueMix would be a win/win.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd use the latest LTS installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that setup, you could carve out personal or project virtual machines, and the students could get up close and personal with the cloud.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A word of caution - hosts are LOUD! a &quot;quiet&quot; host's fan sounds like the engine on an F16, versus a 747. A soundproof rack is important if you plan to put this in a classroom, or any closer than the next county.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-06-29T04:27:30.273" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1217" PostTypeId="2" ParentId="342" CreationDate="2017-06-29T12:01:41.950" Score="2" Body="&lt;p&gt;I think that both the question and the answers to date conflate two things that can be separated: imperative programming and programming with primitive data. These are not the same thing and thinking of them as one leads to some of the difficulties. Programs don't all have to be C-like programs from 1980. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using modern languages (java, python, ruby, scala...) the instructor can, instead, create a virtual world in which students have their first programming experiences. So, rather than first introducing strings (&quot;hello world&quot;) and ints (with their operations - and the limitations of those operations) students can program with &quot;things of interest.&quot; While my own preference is to have them learn OOP principles early on, that isn't necessarily implied by having a virtual world. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the Karel series of books (&lt;em&gt;Karel the Robot&lt;/em&gt;, Richard Pattis) and its successors in Java, Python, and Ruby the students first introduction is with a few primitive actions (move, turnLeft, ...) and one kind of primitive &quot;value&quot; (beeper). The world is very rich - provably a Turing Machine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using such a world, this one or one of your own devising, you can present the computing model you prefer to students with very little distracting detail (maxInt...). You can then teach program logic and structure separate from that detail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the students have a basic grasp of the &quot;fundamentals&quot; (i.e. not int and string) you can introduce those concepts incrementally. But it is amazing how much you can teach without explicit counting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One feature of the Karel books that may be a plus or a minus is that, while they give a good foundation in computation, they are not intended to have enough material for a complete course, either at secondary or university level. One person I know is working to build a complete course around Karel J Robot, but I think that is a bit optimistic. But they are good for an introduction, at least: a short course or the first third-half of a regular course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-29T12:01:41.950" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1218" PostTypeId="1" CreationDate="2017-06-29T13:39:31.347" Score="18" ViewCount="4071" Body="&lt;p&gt;I teach at a 4-year liberal arts college near Silicon Valley. Our stronger grads are able to get programming jobs straight out of college. In addition to preparing them well academically, I've worked as a software engineer and, while in industry, interviewed software engineering candidates, so I can coach students on interview skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not every CS major is a strong programmer, at least at that stage of their life. What other good jobs can I suggest to students who aren't great at or don't enjoy programming, and how can I prepare them for these jobs? FWIW, many of our students have strong writing and interpersonal skills.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="58" LastEditDate="2017-06-30T02:12:05.023" LastActivityDate="2017-06-30T14:03:48.867" Title="How can I prepare CS majors for non-programming jobs?" Tags="|careers|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1219" PostTypeId="2" ParentId="1205" CreationDate="2017-06-29T13:55:22.930" Score="18" Body="&lt;p&gt;The degree of automation that you can achieve depends on how you want to grade. The most valuable type of grading (to a student) does not only cover whether the code works or not, but also offers suggestions as to how to make it better, including readability, design, and so no. And that you cannot totally automate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can (and should) automate basic setups, compilation, and  tests, and generally remove as much grading-boilerplate as possible via automation. Todo so, the first step is to make sure that students will follow certain reproducibility guidelines. In my case,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The instructions for assignments always include a &lt;strong&gt;specific test environment and test command&lt;/strong&gt;, that &lt;em&gt;must&lt;/em&gt; run. So for example, this could be &quot;jdk 1.7 as installed in the lab&quot; + &quot;javac of your .java files&quot;. This allows me to ignore &quot;works for me in my place&quot; excuses -- unless it works in the test environment, it will not receive a passing grade. Note that this is generally not a the development environment; that may be eclipse or whichever other IDE they choose. I generally try to stick to the lowest common bare-metal standard.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;JUnit or other &lt;strong&gt;unit-testing&lt;/strong&gt; frameworks are great to assert minimal performance. You can either request them to write their own tests (make sure to specify what these should cover), or provide them with pre-written tests (more effort, but hopefully more in-depth testing). Ryan Nutt's &lt;a href=&quot;https://cseducators.stackexchange.com/a/1208/913&quot;&gt;answer&lt;/a&gt; also offers good suggestions. Unit-testing is huge not only because it helps you to grade, but also because it makes students aware of their own errors; they will then fix these errors &lt;em&gt;before&lt;/em&gt; submitting the assignments, which is a clear win-win.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mandating &lt;strong&gt;command-line&lt;/strong&gt; friendly &lt;strong&gt;build tools&lt;/strong&gt; (maven, scons, makefiles, scripts, ...) really helps to quickly pass the above tests.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Students must use an online submission system (eg.: Moodle task) to upload their code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Afterwards, in my grading setup, &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I download all submissions for the assignment, and each will be nicely tucked into files named after the uploading student. I then run a small shell script that extracts each submission into a single folder. After significant frustration, the script has been tweaked to deal with .7z, .rar, and .tgz archives instead of the requested .zip files. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I write small per-assignment scripts that I can point at a submission and will &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;open my favorite IDE pointing at the submission&lt;/li&gt;&#xA;&lt;li&gt;compare it side-by-side with previous submissions by the same author, assuming that this is an incremental project, using meld or a similar visual diff tool.&lt;/li&gt;&#xA;&lt;li&gt;launch any corresponding unit tests to see if anything fails&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I then write a per-assignment check-list of items that I want to look at in each submission. This gets refined until I have graded 5 or so, when it sort of stabilizes. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Finally, I get to grade the bulk of submissions, writing comments for students as I go, and often copying and pasting comments from previous submissions. When all are graded (and not before, because I sometimes have to backtrack or refine grading criteria), I copy-and-paste comments and grades to the online submission tool so that students can see them. The most frequent mistakes make the bulk of the next lecture.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So essentially I recommend standardizing as much as possible, and investing some time into per-assignment automation, in order to speed up actual grading. &lt;/p&gt;&#xA;" OwnerUserId="913" LastActivityDate="2017-06-29T13:55:22.930" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1220" PostTypeId="2" ParentId="1218" CreationDate="2017-06-29T14:46:45.070" Score="11" Body="&lt;p&gt;&lt;strong&gt;Sci/Tech journalism&lt;/strong&gt;&lt;br&gt;&#xA;There's a common complaint that people in science journalism, who may have journalism or English academic backgrounds, are okay at writing but vastly underinformed about the computers (or physics, or chemistry, or other subject matter) they're writing about. I've seen it firsthand, and while there are of course exceptions, the complaint is justified in many cases. Your students would have a big advantage in this field because of their technical backgrounds, especially since you mention writing and interpersonal skills. Some basic journalism and psychology coursework might be handy, in my opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tech writing&lt;/strong&gt;&lt;br&gt;&#xA;Also in the writing category, there's the field known simply as technical writing. Technical writers often deal with creating documentation or manuals but may work on any specialized, um, writing that is technical. In my experience, these people often have either English backgrounds, with most of the rest having technical backgrounds, and whichever one you have, you're perceived as not having enough of the other. There's no running around and interviewing strangers as there is with journalism, so brushing up on writing skills on paper is the first thing I'd recommend here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Requirements engineering&lt;/strong&gt;&lt;br&gt;&#xA;Adjacent to that is requirements engineering. Reqs engineers are on technical teams and work with programmers but don't do any coding themselves. They think bigger-picture about what the needs of systems will be, communicating with customers and developers and other relevant people (I suppose I should say &quot;stakeholders&quot; but that feels so business jargon) to figure out what a project should do, what it reasonably can do, and how it should do those things (and also, what it shouldn't do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't often seen requirements discussed at the undergrad level, but they're also not full-on graduate programs. Not that I think you're looking to recommend grad school here anyways. If finding and taking the one graduate requirements course isn't an option, I'm not sure what I could recommend to prepare for this one. Having a CS background will be a huge advantage, and I would almost say necessity, for such a position, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Evangelism&lt;/strong&gt;&lt;br&gt;&#xA;An answer that may be a bit more specific to your students specifically, based on your description of your school and your other activity on this site: evangelism. You don't need to be sitting in front of a computer writing code to care about the pipeline problem. The main issue with this answer is that there don't seem to be many places where you can get paid to work on this. Organizations that deal with diversity issues tend to be non-profits that lean heavily on volunteers.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="-1" LastEditDate="2017-06-29T19:00:05.243" LastActivityDate="2017-06-29T19:00:05.243" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1221" PostTypeId="2" ParentId="1218" CreationDate="2017-06-29T15:09:45.487" Score="8" Body="&lt;p&gt;IT jobs tend to require much less in the way of programming skills. A few of these include: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;System Administrator: keeping a company's servers, desktops, ... operational and secure&lt;/li&gt;&#xA;&lt;li&gt;Network Administrator: keeping a company's network operational and secure &lt;/li&gt;&#xA;&lt;li&gt;Website Administrator: keeping a company's website operational and secure&lt;/li&gt;&#xA;&lt;li&gt;Database Administrator: maintaining and administering a company's databases, including writing queries to extract information from the DB.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of these require technical skills in the specific area, so your curriculum would probably need to provide courses to equip students with those skills. For example, if your department offers a database course, it might provide students with the skills to get hired as a DB Admin (or developer) somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also &quot;IT/Helpdesk Technician&quot; jobs, in which the person helps people at the company who are having trouble with their desktop, laptop, or other computing devices. These require people skills, problem-solving skills, and a knowledge of the devices and/or the software on those devices, but little if any programming. If you can get students internships performing this role -- either at your college or at a local company -- that can provide a path to these jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also job titles like &quot;Project Manager&quot; that require people skills, plus an understanding of how the technology works and what it is capable of, but not the skills to create that technology. These people generally supervise software developers, and act as go-betweens between the developers and the clients, but don't do any actual programming themselves.  We have a Software Engineering course in which students work in 4-6 person teams to complete a group project. One person serves as the Project Manager for that project, so they get a bit of training in this role; it's difficult to give all the students this opportunity in the confines of a single semester course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing there are others, but those are some that come to mind.&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-06-29T15:09:45.487" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1222" PostTypeId="2" ParentId="342" CreationDate="2017-06-29T16:52:29.483" Score="1" Body="&lt;p&gt;My earlier answer focused on overall program structure, not assignment and mutable state explicitly. The originator was focused otherwise, on assignment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the difficulties for beginners, I think, is that taking a Turing Machine view, or a program stack view, or a mail-box cubby hole view is that it isn't natural for students. Without criticizing that view, let me give a different one that I think is stronger. I don't think of a variable as a &quot;box&quot; into which I can put a value, changing the value later (when allowed). Instead, I think of a variable as just a reference to a value. Using the originators notation, I see&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x:=3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and think that x references a value, 3.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x:=4;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so x references a different variable (not that 3 &quot;becomes&quot; 4) and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x:=x+1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is just compute a new value using x and then let x refer to the new value;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This, of course is the same reference model we use in other languages (OOP, functional) for things. A variable is just a name (not a box) the name can refer to different values at different times/contexts (Buffy is me here, Buffy is you there). Different names can refer to the same object at the same time (Angel is me and also Buffy is me). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assignment does nothing more than reassign a name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I recommend this mental model for &lt;em&gt;beginners&lt;/em&gt;, and believe it has substance even for advanced programmers (e.g. me). However, at some point you do want to show the map to machine states, but that is a different issue. If I do that too early, then I ask the students to carry around two different models of computation, one based on logic and another, different one, based on machines. I prefer to keep it simple for the beginner and so try to focus on just the logical (higher level) model. But it takes some work to have a consistent model.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a general principle, I don't believe that every beginner must recapitulate the entire history of computing in the first course. Said another way, there are lots of things that I know, but it would be counterproductive to tell students. Their path needn't be my path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, my comments in the earlier answer about separating concerns still holds. A virtual world can free the student from also needing to learn the issues and side effects, etc. of primitive data. Assignment can involve &quot;interesting values&quot; as it does in other computing models. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It just occurred to me that a discussion of &lt;a href=&quot;https://en.wikipedia.org/wiki/Haddocks&amp;#39;_Eyes&quot; rel=&quot;nofollow noreferrer&quot;&gt;Haddock's Eyes&lt;/a&gt; can be valuable for making the distinction between a name and the thing to which the name applies (also aliasing, ...). x isn't 3, x is a name that refers to 3. 3 itself is a number. (or if you want to delve deeper  - a symbol representing a number...)&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-30T15:23:48.813" LastActivityDate="2017-06-30T15:23:48.813" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1223" PostTypeId="2" ParentId="66" CreationDate="2017-06-29T17:31:20.527" Score="2" Body="&lt;p&gt;A very interesting way to design a curriculum would be to in 3-lesson blocks. A block deals with a specific subject. A small list of various subjects in the field of AI can be found at the bottom of the answer (I put it there because it contains information that might be confusing if not explained beforehand).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 3 lessons for each block are formatted like so:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Introduction lesson. Here it would be good to show real world usages of the subject being introduced.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Background lesson. Here you should teach the background (Mathematical or otherwise necessary background knowledge). This step is very important. Without it, very few students will be able to keep up. For some subjects, this part of the block can stretch to a double lesson (usually when the teaching pace indicates that one lesson won't be enough).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A bit of hands-on experience with the tool\subject. This can be a small task or project the the students do. Usually a lab lesson.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Decision trees.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Hidden Markov Models. (the second part of the block is &lt;em&gt;especially&lt;/em&gt; important for this one)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Neural networks. This one can stretch to two separate blocks (maybe one for feedforward neural networks and another for convolutional or recurrent neural networks)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Genetic algorithms. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As for commonsense, reasoning and inference, you can explain about Turing tests, which are simple for humans that have commonsense (hopefully &lt;code&gt;;)&lt;/code&gt;) but are very hard for most, if not all, MLs to complete successfully. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-29T17:31:20.527" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1224" PostTypeId="1" CreationDate="2017-06-29T17:32:50.570" Score="3" ViewCount="141" Body="&lt;p&gt;My college requires students earning a bachelor's of science (BS) degree to take a CS course. Currently, they take the same course as CS majors: a typical Java 1 course. What would be a more useful course for students majoring in the life sciences (as almost all of our BS students are)? Some of the students hope to become doctors or veterinarians, others medical researchers.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-06-29T18:30:35.037" Title="What intro CS coursework is most useful for life science students?" Tags="|curriculum-design|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1225" PostTypeId="2" ParentId="1224" CreationDate="2017-06-29T17:43:32.413" Score="1" Body="&lt;p&gt;While I truly love Java, it may not be the best choice here. Something with a lighter footprint in which small(ish) problems can be quickly solved. Python moves in that direction. Even AppleScript or an equivalent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;People in the life sciences have computational needs, but the small problems probably outweigh the big ones. A while ago, a course in Unix Shell programming (pipes and filters) would be the way to go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But fundamentally, the course should be about problem solving. How do you conceptualize your problem, how do you decompose it into chewy bits? If you can get there, you can get someone with deeper tech skills to help you program it as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dare I suggest spreadsheet programming? It is pretty powerful actually, and solves many needs and also has some of the abstraction facilities we promote and some of the debugging requirements that we teach. Recursion is possible if you want to go wild. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-29T17:59:58.310" LastActivityDate="2017-06-29T17:59:58.310" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1226" PostTypeId="1" AcceptedAnswerId="1246" CreationDate="2017-06-29T17:47:31.153" Score="17" ViewCount="3211" Body="&lt;p&gt;While teaching OOP in a high school CS major (in java), it is important (and part of the curriculum in any case) to explain &amp;quot;&lt;em&gt;what is the meaning of this &lt;code&gt;public&lt;/code&gt; and &lt;code&gt;private&lt;/code&gt;?&lt;/em&gt;&amp;quot; (A question voiced by many students).&lt;/p&gt;&#xA;&lt;p&gt;The usual explanation is a technical one:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Something &lt;code&gt;public&lt;/code&gt; is accessible from anywhere.&lt;/li&gt;&#xA;&lt;li&gt;Something &lt;code&gt;private&lt;/code&gt; is, well, private.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;protected&lt;/code&gt; ??&lt;/li&gt;&#xA;&lt;li&gt;default access (when no other access modifier is given).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As for &lt;code&gt;protected&lt;/code&gt;, the students know about inheritance but the explanation of &amp;quot;it can be accessed by things down the inheritance tree&amp;quot; doesn't really get the idea through. Examples only show it so far and only works for a number of students.&lt;/p&gt;&#xA;&lt;p&gt;So this got me thinking: How can access levels be explained in an intuitive way to high school students?&lt;/p&gt;&#xA;&lt;p&gt;Note: I'm not only asking about &lt;code&gt;protected&lt;/code&gt;, that is my main problem when explaining access levels.&lt;/p&gt;&#xA;&lt;h2&gt;Clarification&lt;/h2&gt;&#xA;&lt;p&gt;I am talking about access modifiers for objects and methods, not classes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Example extends JFrame{ //the public in this line is not what I'm asking about.&#xA;    private int x; //this is the kind of private asked about&#xA;    protected void paintComponents(Graphics g){ //and this is also the kind being asked about.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2023-12-01T17:29:38.747" Title="Explaining access levels and visibility in OOP" Tags="|secondary-education|teaching-analogy|java|object-oriented-paradigm|" AnswerCount="11" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1227" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T17:52:55.923" Score="1" Body="&lt;p&gt;I have a distinct memory of my college CS teacher saying &quot;only your friends can touch your &lt;code&gt;private&lt;/code&gt;s&quot;. The context was C++, and yes there was an accompanying eyebrow waggle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meaning was pretty clear &amp;amp; I still remember it after &gt;15 years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you may have to tone it down some for high school, but the analogy to one's privates could be useful.&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2017-06-29T18:42:17.070" LastActivityDate="2017-06-29T18:42:17.070" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1228" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T17:53:19.343" Score="-3" Body="&lt;p&gt;I think a good way of looking at it is like legislation in the United states. Public would be national law, it impacts everyone in the country. Private is like state or city level law, much smaller scope. Now, all this legislation fits into the protected category because of ex post facto (after the fact in Latin). If you do something legal, and later it becomes illegal, you cannot get charged for the previous action. One can only be charged if the crime is committed after the legislation is passed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;(PUBLIC, protected) National level: Pot is completely illegal.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;(PRIVATE, protected) Colorado: Pot is legal for medicinal and recreative use.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1463" LastEditorUserId="919" LastEditDate="2017-07-15T14:11:32.583" LastActivityDate="2017-07-15T14:11:32.583" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1229" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T18:16:43.177" Score="2" Body="&lt;p&gt;Unfortunately this question depends on the language. I'll give a general discussion but focus on Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;public is, as you say visible from any code in the program (and in the original java concept that meant visible across the globe com.sun.java.Foo.x can be found on your computer - or could be, anyway, in theory). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;private can mean (a) visible from anywhere in this class (java) or (b) visible only from this specific object. Object level private is an interesting idea, not often implemented. Usually &quot;private&quot; means class level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In java, not giving any indication (blank) means visible anywhere in this package and this only means something if all your code is in one package or another. In scala (blank) means public. BTW, it should be in a package. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;protected means visible throughout this package AND ALSO visible in subclasses of this class defined outside this package. This is dangerous to use, since it is broader than (blank). It is useful for library code, however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I didn't really give an intuitive answer. For beginners the visibilities should really be public or private. Protected is for libraries primarily and they aren't doing that, I think, and blank is a way to build buggy code since the visibility across their various classes is likely to get them in trouble. So,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Public - like the library&lt;br&gt;&#xA;Protected - like the book shelf in your team's workspace&lt;br&gt;&#xA;Private - like my bookshelf at home. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also that the purpose of visibility, the intention of language designers, is to restrict who (which programmers) can reference code, not which code can reference code. It is intended to facilitate teams working on different parts of a large application and permitting them to work in a namespace (say a class, or a package) in which the work of other programmers doesn't impede progress. Negotiation need to occur only at the boundaries, not over every name everywhere in a (say) 30 million line program. Generally a single programmer (or pair) is, at any given time, responsible for a class. A small team, perhaps, for a package. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-30T13:29:57.017" LastActivityDate="2017-06-30T13:29:57.017" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="1230" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T18:25:12.023" Score="2" Body="&lt;p&gt;I like to draw classes as boxes within each other to describe inheritance (ignoring multiple inheritance). So if &lt;code&gt;Dog&lt;/code&gt; and &lt;code&gt;Cat&lt;/code&gt; inherit from &lt;code&gt;Animal&lt;/code&gt;, I'd have a box labeled &lt;code&gt;Animal&lt;/code&gt; containing a &lt;code&gt;Dog&lt;/code&gt; box and a &lt;code&gt;Cat&lt;/code&gt; box. Inside each box, I'd have 2 sections: Public methods and private methods (and protected methods, which I won't talk about in this answer). Then, using this box drawing, I could indicate that the public methods can get out of the box and be made publicly available, whereas the private methods can't get out of their boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/UpAW5.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UpAW5.png&quot; alt=&quot;Boxes with labels and arrows to where the methods can be called from&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This same idea could also be expressed as a tree structure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Animal&#xA;   change_name (public)&#xA;   Dog&#xA;      bark (public)&#xA;      validate_name (private)&#xA;   Cat&#xA;      meow (public)&#xA;      validate_name (private)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In that case, public methods can change levels of the tree in either direction, and private methods cannot exit their level (or move to a different class in their level. This part is clearer with boxes).&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-06-29T18:46:06.030" LastActivityDate="2017-06-29T18:46:06.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1231" PostTypeId="2" ParentId="1224" CreationDate="2017-06-29T18:30:35.037" Score="4" Body="&lt;p&gt;I'll say upfront, I'm familiar with both life sciences and CS, but I've never applied one to the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In life sciences, computing is used for a lot of heavy processing. Stuff in genomics and molecular modeling, for example. It's not fast work. Efficiency, then, must be important for researchers to know about. The course you're designing should cover Big-O and and related topics in its discussion of algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That theory won't be much use if the researcher can't communicate with the computer. I'd say Java may not be the best language to use. The upside that's usually cited is that it's very common, and similar to other languages in industry, but these students aren't going to be professional programmers, so that doesn't really count for much here. With Java, you'll also be spending a lot of time teaching semantics about the language itself rather than CS principles; time you can't afford to waste if you get only a single course with these students. Alternatives: Python seems to be used more in science, and Ruby has a nice learning curve. Both are well-established languages with plenty of documentation and communities available online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doctors and vets who are frontline healthcare provider types rather than in-the-lab researcher types are more likely to be users of software than writers of it. Depending on specialty, they'll be dealing with assorted medical records suites and similar programs. They should understand principles of cybersecurity, including more technical things like how passwords really work (or, just as important, fail, e.g. lack of salting or e-mailing in plaintext) and what makes them important as well as less technical ones such as social engineering, which are often both easier and more effective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://imgs.xkcd.com/comics/security.png&quot; alt=&quot;inline image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Thanks, &lt;a href=&quot;https://www.xkcd.com/538/&quot; rel=&quot;nofollow noreferrer&quot;&gt;xkcd 538&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doctors and researchers are already looking at images on computer screens a lot, and I don't think I'm predicting the future too much by saying that's only going to increase. Understanding how lossy compression works, or JPEG format tradeoffs, and why the &quot;zoom in and clean that up&quot; CSI magic from TV doesn't happen in real life could be useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond all &lt;em&gt;that&lt;/em&gt;, there are some fundamentals that everyone should know, life sciences or not. The basics of how a computer operates, so that it's not a mysterious magical process between pressing keys or tapping the screen and pixels lighting up. Some brief coverage of programming, algorithms and data structures. The fact that no matter how fast we make computers, there are some problems they can't solve, and we can prove that using math (even if you don't go through the proof itself). &lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-29T18:30:35.037" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1232" PostTypeId="2" ParentId="17" CreationDate="2017-06-29T18:45:31.720" Score="2" Body="&lt;p&gt;Came across this one. I simply loved it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hofstadter%27s_law&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hofstadter's Law&lt;/a&gt;: It always takes longer than you expect, even when you take into account Hofstadter's Law.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is especially good when explaining debugging a recursive method, or the call stack. When you reach the end of the sentence, you go to the definition of Hofstadter's Law (If you are a compiler). And this goes on and on (essentially a stack overflow).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-01-14T19:50:55.080" LastActivityDate="2018-01-14T19:50:55.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1233" PostTypeId="1" CreationDate="2017-06-29T19:40:29.597" Score="4" ViewCount="333" Body="&lt;p&gt;When I had grant money or worked in industry, I was a member of the &lt;a href=&quot;http://www.acm.org/&quot; rel=&quot;noreferrer&quot;&gt;Association for Computing Machine&lt;/a&gt; (ACM) and the &lt;a href=&quot;http://sigcse.org/sigcse/&quot; rel=&quot;noreferrer&quot;&gt;Special Interest Group on Computer Science Education&lt;/a&gt; (SIGCSE), which holds several annual conferences and publishes &lt;a href=&quot;http://inroads.acm.org/&quot; rel=&quot;noreferrer&quot;&gt;ACM Inroads&lt;/a&gt;. Now that I'm no longer publishing in CS education, am focused on teaching, and would have to pay for membership out of my own pocket, I'm wondering if membership is worthwhile. What do SIGCSE members or non-members in situations similar to mine think?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-04T15:10:32.793" Title="Is it worthwhile for college professors to join SIGCSE?" Tags="|acm|sigcse|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1234" PostTypeId="5" CreationDate="2017-06-29T19:41:48.920" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-06-29T19:41:48.920" LastActivityDate="2017-06-29T19:41:48.920" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1235" PostTypeId="4" CreationDate="2017-06-29T19:41:48.920" Score="0" Body="For questions concerning the Association for Computing Machinery, &quot;the world's largest educational and scientific computing society&quot;." OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-29T20:14:19.337" LastActivityDate="2017-06-29T20:14:19.337" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1236" PostTypeId="5" CreationDate="2017-06-29T19:43:03.750" Score="0" Body="&lt;p&gt;&lt;a href=&quot;http://sigcse.org/sigcse/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SIGCSE website&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-29T19:46:39.997" LastActivityDate="2017-06-29T19:46:39.997" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1237" PostTypeId="4" CreationDate="2017-06-29T19:43:03.750" Score="0" Body="For questions concerning the ACM Special Interest Group on Computer Science Education." OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-06-29T19:46:21.077" LastActivityDate="2017-06-29T19:46:21.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1238" PostTypeId="1" CreationDate="2017-06-29T19:49:22.617" Score="5" ViewCount="91" Body="&lt;p&gt;I just saw &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1233/is-it-worthwhile-for-college-professors-to-join-sigcse&quot;&gt;this question&lt;/a&gt; about SIGCSE for college professors, and it made me curious about whether it is a good organization for high school teachers.  I am currently a member of my local CSTA, which I find to be of some value.  Are there additional benefits from SIGCSE that could help me in my classroom practice?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: I would love to hear from current or past members of the organization, but please avoid ad copy and the like. This is &lt;em&gt;not intended&lt;/em&gt; as a promotional question.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-30T14:47:20.387" Title="Is it worth it for high school teachers to join SIGCSE?" Tags="|sigcse|" AnswerCount="3" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1239" PostTypeId="2" ParentId="1233" CreationDate="2017-06-29T19:58:54.837" Score="4" Body="&lt;p&gt;I would say yes, definitely. It is a great bunch of well informed and friendly people. The conferences are very valuable, including the panel discussions, demos, and tutorials. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SIGCSE conference is also a place at which some of your students might publish and, if they are interested in teaching as a career, meet people who can help them. The people who go to the conference have broad interest in CS as a whole, not just teaching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the questions that you ask here would find ready answers in the SIGCSE community. Many things done and discussed in the community would enhance your own teaching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;SIGCSE also has an international conference (ITICSE) at which people from lots of places, but mostly Europe, come together annually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't care to get conference proceedings, etc, on paper, an electronic only option is available and very inexpensive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a long time member, never an officer, frequent reviewer. I've maintained membership even after retirement, though I've withdrawn from other, more technical, SIGS. Worth it, always. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me add that ethics and related topics are often in the Inroads magazine and a number of members are strongly focused on ethics (say, Don Gotterbarn)&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-29T20:22:12.327" LastActivityDate="2017-06-29T20:22:12.327" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1240" PostTypeId="2" ParentId="17" CreationDate="2017-06-29T20:01:03.087" Score="6" Body="&lt;p&gt;I demonstrated this recursion example in class. I draw a large square on the board and ask a student to picture it like a 3x3 grid (like Tic-Tac-Toe). Then the student outlines the center square. Next, the student looks at the other eight squares and repeats the process in each of them. And so on. And so on. That illustrates the process. If you do this in a program, you get the window below. And here's a Java program I wrote to create that window: &lt;a href=&quot;https://github.com/CoachEd/JavaExamples/blob/master/Recursion/Squares.java&quot; rel=&quot;noreferrer&quot;&gt;Squares.java&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/sJLvK.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/sJLvK.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-06-29T20:01:03.087" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1241" PostTypeId="2" ParentId="1233" CreationDate="2017-06-29T20:15:23.260" Score="1" Body="&lt;p&gt;It depends on what you want to get out of it. There are plenty of CS outreach opportunities that don't require a membership fee:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://code.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code.org&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Annual scholars day at the university&lt;/li&gt;&#xA;&lt;li&gt;Hackathons&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.meetup.com/topics/computer-science/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Meetups&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;CS Advisory Committe (does your university have one?)&lt;/li&gt;&#xA;&lt;li&gt;Your university's ACM or IEEE chapter&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://coderdojo.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CoderDojo&lt;/a&gt; (up to high school level)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-06-29T20:15:23.260" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1242" PostTypeId="2" ParentId="1238" CreationDate="2017-06-29T20:19:09.933" Score="3" Body="&lt;p&gt;I've known many HS teachers who have joined and become valued members. I think it is most useful for those contemplating further graduate study and seeking contacts and research ideas and such. Some have gone on to earn doctorates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, for your stated goal, you will find that the members there, while not focused on secondary education, will have a lot to contribute to your programming and general CS classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;SIGCSE folk are especially interested in APCS. The curriculum gets developed by many of these people, as do supporting materials (case studies), and many, many of them are AP graders. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CSTA, of course, is more directly focused on your needs. But SIGCSE can help you learn early of educational trends before they become embodied in curricula. You can even participate in the development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, Greenfoot, an interesting Java environment for beginners, as well as BlueJ (more advanced), were developed by a team led by members (Michael Kölling and his team). He does tutorials, etc. at the SIGCSE and ITICSE conferences. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-06-29T20:19:09.933" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1243" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T20:31:20.047" Score="1" Body="&lt;p&gt;Unless this is an honors programming class, access modifiers may be difficult to understand. I usually start with &lt;em&gt;public&lt;/em&gt; vs. &lt;em&gt;private&lt;/em&gt; and provide a simple case. For example, it is usually a bad idea to make an instance variable &lt;em&gt;public&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Person {&#xA;  public int age;   &#xA;  public static void main(String[] args) {      &#xA;    Person p = new Person();        &#xA;    p.age = -99; //bad, but legal       &#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Instead, make &lt;em&gt;age&lt;/em&gt; private and provide public accessor methods:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Person {&#xA;  private int age;&#xA;  public static void main(String[] args) {&#xA;    Person p = new Person();&#xA;    p.setAge(22); //nice.       &#xA;  }&#xA;&#xA;  public void setAge(int age) {&#xA;    if (age &amp;lt; 0) {&#xA;        System.err.println(&quot;error - bad age: &quot; + age);&#xA;        age = 0;&#xA;    } else&#xA;        this.age = age;&#xA;  }&#xA;&#xA;  public int getAge() {&#xA;    return age;&#xA;  } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-06-29T20:31:20.047" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1244" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T20:37:06.587" Score="1" Body="&lt;p&gt;I use phone numbers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You know your cell phone number, and I don't. That makes it a private instance variable. I have no way to get it without you telling it to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it was a public instance variable, instead of you knowing it and me not, it would be tattooed on your forehead. Then, when the creepy guy who wants to ask you out sees you in the hall he can look at your forehead, get your number, and put it in his phone. Congrats, you have your very own stalker. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you do want to give out your phone number to some people, just as long as you can control who gets it. For that you need to keep the instance variable private, but make a public getter / accessor method like getPhoneNumber(). Now you can do whatever you want to decide if you want to share your phone number with the guy in the hall. Is he creepy? Does he have nice friends? Is he missing teeth? Does he drive a nice car? It's up to you to decide. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then we backtrack a bit. Tattooed on your forehead is a little over simplified. If it was truly public, anyone could change it. It's more like it was written with washable Crayola marker. Works as a hook for why we need both accessors and modifiers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach mainly AP-A in high school, so those are the only two modifiers I really worry about. We brush on protected when we get a little deeper into inheritance, but by that point they've got public / private down pretty well so it's a short hop. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-06-29T20:37:06.587" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1245" PostTypeId="2" ParentId="1218" CreationDate="2017-06-29T21:10:13.807" Score="1" Body="&lt;p&gt;A CS graduate with good writing and people skills might want to look into entry level product or project management positions. Adding a few business management courses might help with that.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-06-29T21:10:13.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1246" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T21:21:14.540" Score="32" Body="&lt;p&gt;Here's an analogy that I've used for several years, and that students seem to understand. It doesn't focus on the rules, but why we have public and private and protected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Most of you know that I live down at the beach. If you find yourself riding past my house, and it's hot outside, you might come to my front door, knock and ask if you could have a soda. I don't live in a gated community, so anyone can come to my front door and knock. My front door is public. However, you can't open the front door, walk right in to my kitchen, open the refrigerator door, and help yourself to a soda! My refrigerator door is not public.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My children and grandchildren, however, who live next door, think nothing of walking into the house and getting anything they like out of the refrigerator. In our house, the refrigerator is protected; my family can directly access it, but the general public cannot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not everything in our family is protected, though. My kids know that going upstairs, finding my Visa card, and charging a new book at Amazon, isn't permitted. My Visa card, and the contents of my wallet, are private. No one else can access them directly; they have to make a request.&quot;&lt;/p&gt;&#xA;" OwnerUserId="1554" LastActivityDate="2017-06-29T21:21:14.540" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1247" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T21:36:03.057" Score="2" Body="&lt;p&gt;The fact that OO languages support public and private methods and data members is a crucial, important design choices.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to get a full, deep understanding of how OO programming works, it is crucial to understand both how they work, and when you'd want to use them, which is another way of explaining why they are in the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the analogies in the answers so far can help students learn &quot;how they work&quot;, but I wonder whether they break down at some point in explaining &quot;when&quot; to make something public or private, and therefore the &quot;why&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the problem is that we often teach with classes such as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Student {&#xA;  // data members&#xA;  private int idNum;&#xA;  private String name;&#xA;&#xA;  // getters&#xA;  public int getIdNum() { return idNum; }&#xA;  public String getName() { return name; }&#xA;&#xA;  // setters&#xA;  public void setIdNum(int idNum) { this.idNum = idNum; }&#xA;  public void setName(String name) { this.name = name; }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem here is that in this class, given that the getters and setters simply provide direct access to reading and writing a primitive value, it is very difficult to argue that they add any value.     To come up with a justification for why name and idNum are private, we have to use arguments that are not very convincing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It becomes easier to see if you have an abstract data type such as a Dictionary with keys and values that allows insertion and deletion, where it can be implemented (internally) in many different ways: linked lists, hash tables, balanced lookup trees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can show that by keeping the details of the internal state private, it is possible to swap out different implementations without needing to change the code that uses the data structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, of course, this is a much more sophisticated example.   It requires more understanding of &quot;where we are headed down the road&quot; then students are typically equipped to understand, or teachers are in a position to explain, if/when students encounter Java as a first programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is the reason that, from where I sit, Java is an excellent choice of second, or third language, for students that have already done enough programming to appreciate the need for data abstraction and information hiding, because they've tried to write fairly complex programs without those tools.      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is, however, a poor choice of language to teach first, because it requires students to &quot;accept on faith&quot; many principles of OOP that they have no motivation, reason, or background to understand yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am fully aware that this is an iconoclastic point of view, and &quot;fighting words&quot; for many of the OOP true believers.   I'm fully prepared for the backlash. :-)&lt;/p&gt;&#xA;" OwnerUserId="480" LastActivityDate="2017-06-29T21:36:03.057" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1248" PostTypeId="2" ParentId="1233" CreationDate="2017-06-29T21:40:46.300" Score="2" Body="&lt;p&gt;The information on the SIGCSE mailing list is well worth the $25/year SIGCSE fee.  Better yet, this discount you get off the SIGCSE conference registration is more than the cost of joining SIGCSE.&lt;/p&gt;&#xA;" OwnerUserId="504" LastActivityDate="2017-06-29T21:40:46.300" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1249" PostTypeId="2" ParentId="1226" CreationDate="2017-06-29T21:48:55.360" Score="12" Body="&lt;p&gt;Ooh, this is one of my favorite lessons!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't introduce &lt;strong&gt;package private&lt;/strong&gt; and &lt;strong&gt;protected&lt;/strong&gt; in the same lesson as &lt;strong&gt;private&lt;/strong&gt; and &lt;strong&gt;public&lt;/strong&gt;, because there are 3 principles that I want them to absorb that ultimately motivate the entire system.  My lesson introduces a few more ideas than just permissions (it's really how I get started with Ojects), but the key ideas of encapsulation also lie therein.  The lesson works roughly like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students &lt;em&gt;always&lt;/em&gt; default to wanting everything to be &lt;code&gt;public&lt;/code&gt;, so I provide a motivating example for why this is a bad idea.  The entire set of steps is rather long, but I will create the setup and give a broad outline of how I proceed from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, up on the projector, I create a point object:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Point{&#xA;    public double x;&#xA;    public double y;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I next create a &lt;code&gt;Geometry&lt;/code&gt; class into which I put my &lt;code&gt;public static void main(String[] args)&lt;/code&gt;.  I create a point, and show them how to use direct access of public variables: &lt;code&gt;myPoint.x&lt;/code&gt; and &lt;code&gt;myPoint.y&lt;/code&gt;.  At this point, we have basically created a struct.  When it comes time to print out a few of these points, I create a &lt;code&gt;toString()&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I create a rectangle class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Rectangle{&#xA;    public Point p1;&#xA;    public Point p2;&#xA;    public double area;&#xA;&#xA;    public Rectangle(&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.... right here, I stop, and ask the class how we should create our two points.  This is when I get to the &lt;strong&gt;Motivating Principle #1: it is the responsibility of an object to care for and ensure its own variables&lt;/strong&gt;.  Which leads to the question: who should directly set the actual &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; values in each of the two points, the &lt;code&gt;Point&lt;/code&gt; object, or the &lt;code&gt;Rectangle&lt;/code&gt;?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given principle #1 (which I have not yet justified), we opt for the &lt;code&gt;Point&lt;/code&gt; object.  So, before we continue with &lt;code&gt;Rectangle&lt;/code&gt;, we go back and create a constructor for &lt;code&gt;Point&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Before we resume this narrative, the astute reader will notice that the seeds of our destruction are already present in those &lt;code&gt;public&lt;/code&gt; variables!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My next stop is to finish the &lt;code&gt;Rectangle&lt;/code&gt; constructor:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    public Rectangle(double x1, double y1, double x2, double y2){&#xA;        p1 = new Point(x1,y1);&#xA;        p2 = new Point(x2,y2);&#xA;        area = Math.abs(x1-x2) * Math.abs(y1-y2);&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We are almost ready to blow everything up.  I go back to &lt;code&gt;Geometry&lt;/code&gt;, create a &lt;code&gt;Rectangle&lt;/code&gt;, and then... &lt;em&gt;modify its area!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Rectangle r = new Rectangle(0.0,0.0, 1.0,1.0);&#xA;System.out.println(r.area);&#xA;r.area = Math.PI;&#xA;System.out.println(r.area);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At this point, we get to some obvious questions: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is the area still correct?  And&lt;/li&gt;&#xA;&lt;li&gt;who is responsible to prevent this sort of malfeasance, anyway?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Looking at principle #1, we discover that, though the fault probably likes with &lt;code&gt;Geometry&lt;/code&gt;, the real responsibility here lies with &lt;code&gt;Rectangle&lt;/code&gt;.  This immediately motivates a series of cascading changes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We make those &lt;code&gt;Point&lt;/code&gt;s and the &lt;code&gt;area&lt;/code&gt; variables &lt;em&gt;private&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;We create a getter for Area.&lt;/li&gt;&#xA;&lt;li&gt;We create setters for &lt;code&gt;Rectangle&lt;/code&gt;s &lt;code&gt;Point&lt;/code&gt;s.&lt;/li&gt;&#xA;&lt;li&gt;We make &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; private in &lt;code&gt;Point&lt;/code&gt;, and make getters (but no setters - we just use the constructor here)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In the follow-up discussion, we get to &lt;strong&gt;Motivating Principle #2: always provide the least permissions that you can get away with.&lt;/strong&gt;  This is what prevents trouble, and helps Objects to guarantee their part of Principle 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally, I bring them to my &lt;strong&gt;Warning Principle #3: getters and setters are how we grant access to a shielded variable, but if you've created an unmodified (straight/unfiltered) getter and an unmodified setter on the same variable, &lt;em&gt;you are doing it wrong&lt;/em&gt;, and you have just made a public variable.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What follows is a series of short Object-design tasks in which I tell them to sketch out, for a series of theoretical private instance variables, appropriate getters and setters.  After each one, we put a student's answer up and I let the kids discuss/critique/defend what is up on the projector.  This gives us a chance to practice our three principles together, and really drives the point home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I give this lesson high marks, historically, for squelching both &lt;code&gt;public&lt;/code&gt; instance variables, and de-facto &lt;code&gt;public&lt;/code&gt; created by unfiltered getters and setters on the same variable. Instead, I have found that students generate much more thoughtful object designs.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-06-29T21:48:55.360" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1250" PostTypeId="2" ParentId="1218" CreationDate="2017-06-29T21:54:42.897" Score="3" Body="&lt;p&gt;Other specialties that are in demand and need a good CS background but not just programming (but having some programming skills helps)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Performance Engineer&lt;/li&gt;&#xA;&lt;li&gt;Devops/Automation Engineer&lt;/li&gt;&#xA;&lt;li&gt;QA (Test engineer, maybe tied to automation, build, devops)&lt;/li&gt;&#xA;&lt;li&gt;Security Engineer&lt;/li&gt;&#xA;&lt;li&gt;data/database specialist (non-sql, sql, cloud object store,distributed file systems),&lt;/li&gt;&#xA;&lt;li&gt;Data scientist (get info from large data sets)&lt;/li&gt;&#xA;&lt;li&gt;Project mgt for software projects&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1558" LastActivityDate="2017-06-29T21:54:42.897" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1251" PostTypeId="2" ParentId="1233" CreationDate="2017-06-29T22:00:20.117" Score="2" Body="&lt;p&gt;There's a difference between CS and CS Education. SIGCSE is not the only organization focused on pedagogical and curricular CS issues but it is arguably the leading such organization in the world. It provides a steady stream of useful teaching ideas and is a venue where new curriculum is developed and existing curriculum reshaped. &lt;/p&gt;&#xA;" OwnerUserId="394" LastActivityDate="2017-06-29T22:00:20.117" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1252" PostTypeId="2" ParentId="2" CreationDate="2017-06-29T22:05:10.253" Score="5" Body="&lt;p&gt;The textbook I use (Horstmann's Java for Everyone) has an autograder that the author has written. He has posted many of the exercises from his textbooks. You can find it at:&#xA;&lt;a href=&quot;http://horstmann.com/codecheck&quot; rel=&quot;noreferrer&quot;&gt;Cay Horstmann's CodeCheck autograder&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an &lt;a href=&quot;http://horstmann.com/codecheck/authoring.html&quot; rel=&quot;noreferrer&quot;&gt;authoring page&lt;/a&gt; that shows how to write your own problems. I've found this to be the easiest of all the tools I've tried when it comes to creating my own assignments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The report page that is displayed when the students solve a problem includes the source code. Students may download a jar file with the results and submit that, but I just find it easier to have them print to pdf using their browser, and then upload that to our learning management system (Canvas). I can then browse through their code relatively quickly (although I still have to manually type in the grades while I'm doing that.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Someone has written an &lt;a href=&quot;https://bitbucket.org/danielmai/code-check-homework-grading&quot; rel=&quot;noreferrer&quot;&gt;Grading tool for CodeCheck and Canvas&lt;/a&gt; that downloads the uploaded jar files, allows you to comment on them locally and then uploads the grades back to Canvas. I found, however, that simply browsing the PDF printouts was more effective for me. &lt;/p&gt;&#xA;" OwnerUserId="1554" LastActivityDate="2017-06-29T22:05:10.253" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1253" PostTypeId="2" ParentId="2" CreationDate="2017-06-29T22:54:16.987" Score="6" Body="&lt;p&gt;I would recommend &lt;a href=&quot;https://repl.it/site/classrooms&quot; rel=&quot;nofollow noreferrer&quot;&gt;repl.it classroom&lt;/a&gt; It allows creation of a course and assignments within that course. Assignments can be auto-graded using unit testing (JUnit) or by providing inputs and comparing expected outputs against actual outputs. Students get feedback on what test cases passed and which did not. These can then be converted directly into student grades.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a screenshot of one CodingBat problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/K9taG.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/K9taG.png&quot; alt=&quot;repl.it classroom building an assignment&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repl.it also has the advantage of being completely cloud based -- no IDEs to install locally. Teachers and students both get free accounts. Java is just one of a dozen or more supported languages (Python, JavaScript, PHP, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The developers are really responsive -- I've had several conversations with Amjad Masad on Twitter -- and they take feedback seriously.&lt;/p&gt;&#xA;" OwnerUserId="1561" LastEditorUserId="58" LastEditDate="2018-02-03T12:44:06.340" LastActivityDate="2018-02-03T12:44:06.340" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1254" PostTypeId="2" ParentId="2" CreationDate="2017-06-29T23:56:54.007" Score="1" Body="&lt;p&gt;We've been using &lt;a href=&quot;http://web-cat.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Web-CAT&lt;/a&gt;.  It's ok.  It certainly motivates students to read error messages more closely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Here are three things that have bugged me about Web-CAT:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I remember having difficulty determining exactly where my unit tests were supposed to be uploaded; there's a user folder and an assignment folder, and one something's in the wrong place it's hard to just move it.&lt;/li&gt;&#xA;&lt;li&gt;In three years, I still haven't found how to get it to accept &quot;Type arrayname[]&quot; as opposed to &quot;Type[] arrayname&quot;; students hate losing those two points.&lt;/li&gt;&#xA;&lt;li&gt;Students sometimes have to click around a little to find report details, and the UI doesn't always make clear what's clickable.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1564" LastEditorUserId="1564" LastEditDate="2017-06-30T13:08:59.140" LastActivityDate="2017-06-30T13:08:59.140" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1255" PostTypeId="2" ParentId="918" CreationDate="2017-06-30T00:14:36.000" Score="2" Body="&lt;p&gt;I don't know if this will help you, but I often find myself in the position of explaining the difference between CS and IT to students / prospective students / parents, and I use the experience of being a one-time emergency medical technician to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I compare the difference between CS and IT to the difference between medical doctors and EMTs.  As an EMT, I was required by law to follow the protocols established by physicians, who get to do the experimenting and the researching and the paper-writing.  As an IT worker, you will be handed a set of tools (databases, operating systems, programming languages) and have to work with what the researchers (the Computer Scientists) come up with.  The world needs IT workers as much as they need EMTs, so it isn't less, just different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not perfect, but I teach at a two-year school, so it's enough to get students thinking about which major to choose.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastActivityDate="2017-06-30T00:14:36.000" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1256" PostTypeId="2" ParentId="1238" CreationDate="2017-06-30T00:53:29.977" Score="3" Body="&lt;p&gt;I started teaching CS in higher ed and knew of ACM. CSTA was not really around when I joined SIGCSE. I think that both are great for K-12 CS teachers. I am not directly in the classroom today, but I am more involved in policy I consider both organizations critical for that work. For example, many states are now implementing CS standards. The amazing continuity between K-12 CS educators and the collegiate level is apparent in discussions is both groups.  The SIGCSE listserve, gives me daily information. The CSTA newsletter gives me less frequent and newsworthy articles. It is very easy to use both resources to show that the effort to support CS education in K-12 is of use, as the standards are in line with the content and pedagogy in higher ed.&lt;/p&gt;&#xA;" OwnerUserId="511" LastActivityDate="2017-06-30T00:53:29.977" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1257" PostTypeId="2" ParentId="349" CreationDate="2017-06-30T01:17:31.960" Score="6" Body="&lt;p&gt;There's absolutely no reason your first program needs to be &lt;code&gt;&quot;hello world&quot;&lt;/code&gt; in the first place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can start with values of various kinds, and show how to combine them to create more interesting values. For instance, in &lt;em&gt;How to Design Programs&lt;/em&gt;, we start out with numbers, strings, &lt;em&gt;and&lt;/em&gt; images. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty quickly students can start to create interesting pictures: e.g., flags of various countries, or a scene (imagine a beach with a tree and a sun). Now they can start to change the size of that flag or parts of that scene (e.g., the sun is at different positions). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next they can make a function that given a parameter, produces the flag or scene at that time (by using the parameter to calculate the position of the sun). Now they supply this to a function called &lt;code&gt;animate&lt;/code&gt; and they have their first animation. From there they can go on to much more sophisticated animations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, we think a rocket launching off a pad — a good metaphor for their education — is a pretty nice follow-up, and not that hard to do. The book's prologue (&lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/HtDP2e/part_prologue.html&quot; rel=&quot;noreferrer&quot;&gt;http://www.ccs.neu.edu/home/matthias/HtDP2e/part_prologue.html&lt;/a&gt;) shows this progression.&lt;/p&gt;&#xA;" OwnerUserId="290" LastActivityDate="2017-06-30T01:17:31.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1259" PostTypeId="1" CreationDate="2017-06-30T04:17:38.067" Score="3" ViewCount="76" Body="&lt;p&gt;What are activities that have been successfully used to integrate student learning across life science and computer science for ages 14-18? (Note &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1262/cs-conncetions-to-life-sciences-for-ages-11-14&quot;&gt;related question for ages 11-14&lt;/a&gt;.) The question seeks classroom-tested activities which:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reinforce or &lt;strong&gt;teach computer science&lt;/strong&gt; age-appropriate knowledge, skills, concepts, and practices&lt;/li&gt;&#xA;&lt;li&gt;Reinforce or &lt;strong&gt;teach life science&lt;/strong&gt; age-appropriate knowledge, skills, concepts, or practices&lt;/li&gt;&#xA;&lt;li&gt;Demonstrate the &lt;strong&gt;interdisciplinary impact&lt;/strong&gt; of computer science in the life sciences&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Engage&lt;/strong&gt; students with active learning&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-06-30T07:16:49.450" LastActivityDate="2017-07-01T00:30:57.203" Title="CS connections to Life Science for ages 14-18?" Tags="|secondary-education|" AnswerCount="0" CommentCount="0" FavoriteCount="0" ClosedDate="2017-07-01T00:31:13.073" ContentLicense="CC BY-SA 3.0" />
  <row Id="1260" PostTypeId="1" CreationDate="2017-06-30T04:47:59.000" Score="15" ViewCount="4038" Body="&lt;p&gt;Competitive programming is mainly about problem-solving skills. Students are given a problem and they have to write a short program to solve it. The students are given a problem for which they have to solve within the stipulated time. Efficiency or maintainability or portability of the code is not graded; however, the is a fixed amount of time given for each program to run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example problem: &lt;a href=&quot;https://www.codechef.com/LTIME49/problems/SHDWCMP&quot; rel=&quot;noreferrer&quot;&gt;https://www.codechef.com/LTIME49/problems/SHDWCMP&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This kind of programming does not require a thorough knowledge of the language (for example, in C++, you'd never need to use classes or templates or anything as such) but it requires the student to be able to find ways to convert a word problem into a coding problem.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;How do you go about training a student for competitive programming? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teaching the language is not very hard but how do you improve someone's problem-solving ability?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="140" LastEditorUserId="140" LastEditDate="2017-06-30T15:16:05.210" LastActivityDate="2020-08-05T10:31:10.010" Title="How to teach competitive programming?" Tags="|secondary-education|best-practice|" AnswerCount="9" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1261" PostTypeId="2" ParentId="1193" CreationDate="2017-06-30T05:42:49.183" Score="1" Body="&lt;p&gt;&lt;strong&gt;Yes. Teaching parallel algorithms is especially productive.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Introducing cutting edge fields can engage students. Like anything, it should be done using active learning techniques (&lt;a href=&quot;http://www.pnas.org/content/111/23/8410.full.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Freeman et al. 2014&lt;/a&gt;) and within &quot;proximal development.&quot; Of &quot;cutting edge&quot; fields that are useful to introduce early in the pipeline (i.e., high school or earlier)', I think &lt;strong&gt;parallel processing&lt;/strong&gt; is one of the most important. I say this for three reasons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. &quot;Mulch&quot; required for later&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some ways of thinking require early introduction to nurture later growth. Parallel and distributed computing may be one such area, based on visionaries' opinions and evidence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a.  Visionaries opinions: Pappert and Resnick both suggested parallel and decentralized thinking an area in which CS for young students could alter how the student years later thinks about phenomena and how they solve problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. Evidence: At the 2016 International Symposium on Parallel and Distributed Computing, I heard described an &lt;a href=&quot;https://nsf.gov/awardsearch/showAward?AWD_ID=1143533&quot; rel=&quot;nofollow noreferrer&quot;&gt;unpublished study&lt;/a&gt; assessing three groups of students in their tendency to solve problems with parallelism in mind. The assessment asked students to describe a procedure for making a peanut butter and jelly sandwich and then asked for a procedure to make 10,000 peanut butter and jelly sandwiches.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students who had taken &lt;strong&gt;no CS&lt;/strong&gt; course &lt;strong&gt;frequently&lt;/strong&gt; described a parallel algorithm.&lt;/li&gt;&#xA;&lt;li&gt;Students who had taken a &lt;strong&gt;traditional CS1&lt;/strong&gt; university course &lt;strong&gt;infrequently&lt;/strong&gt; described a parallel algorithm.&lt;/li&gt;&#xA;&lt;li&gt;Students who had taken a &lt;strong&gt;parallelism-enhanced CS1&lt;/strong&gt; university course &lt;strong&gt;frequently&lt;/strong&gt; described a parallel algorithm.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Present and Future Importance of Parallelism&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;a. After an advance in hardware capability, a corresponding advance in devices and software on the market takes place ~10 years later (Kurzweil, The Singularity is Near). A large portion of software on the market still does not take best advantage of multicore processors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;b. In writing a curriculum for CS Principles, I asked some 200 tech leaders,  &quot;What changes would you make to the post-secondary CS curriculum to better suit your needs?&quot; Soft skills, parallel processing, version control, and distributed databases were topics that came up most frequently in these answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. Accessible in High School&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Various people have put forward ideas appropriate to the age level, and the high school CS teaching community can probably also draw additional ideas from &lt;a href=&quot;https://grid.cs.gsu.edu/~tcpp/curriculum/?q=edupar17&quot; rel=&quot;nofollow noreferrer&quot;&gt;EduPar&lt;/a&gt;, an annual conference for teaching parallelism and distributed computing at the university level.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://faculty.knox.edu/dbunde/pubs/apcs.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Bunde 2012 CS4EDU&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://csinparallel.org/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS in Parallel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;An unplugged activity from Dan Garcia: Ask a team of 4-6 to design an algorithm and execute it with human hands to sort a shuffled standard deck of cards into a particular order. This activity was in &lt;a href=&quot;http://bjc.edc.org/bjc-r/course/bjc4nyc.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Beauty and Joy of Computing&lt;/a&gt; (BJC) and Garcia, one of the principal investigators on BJC told me he felt this was the BJC activity he regarded as most successful and engaging, though I don't see it in the current version.&lt;/li&gt;&#xA;&lt;li&gt;A compendium being created by &lt;a href=&quot;https://nsf.gov/awardsearch/showAward?AWD_ID=1143533&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chuck Weems&lt;/a&gt; from U Mass Amherst&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-06-30T05:59:13.620" LastActivityDate="2017-06-30T05:59:13.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1262" PostTypeId="1" CreationDate="2017-06-30T05:43:30.923" Score="3" ViewCount="260" Body="&lt;p&gt;I'm looking for activities that can integrate computer science into lessons about DNA, RNA, and proteins in a middle school (ages 12 to 14) science class. Our school is using the NGSS and CSTA standards. The students understand a few basic concepts about these topics, but they're generally beginners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The activities should&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reinforce or teach computer science age-appropriate knowledge, skills, concepts, and practices&lt;/li&gt;&#xA;&lt;li&gt;Reinforce or teach about DNA, RNA, or protein molecules and the processes that relate to them&lt;/li&gt;&#xA;&lt;li&gt;Demonstrate the interdisciplinary nature of computer science &lt;/li&gt;&#xA;&lt;li&gt;Engage students with active learning&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="919" LastEditDate="2017-07-15T15:44:37.317" LastActivityDate="2017-07-17T22:59:11.647" Title="How to integrate CS when learning about DNA/RNA/protein" Tags="|curriculum-design|cross-discipline|biology|" AnswerCount="4" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1263" PostTypeId="2" ParentId="104" CreationDate="2017-06-30T05:47:20.117" Score="4" Body="&lt;p&gt;There are some good ideas in &lt;a href=&quot;https://cseducators.stackexchange.com/a/109/1166&quot;&gt;Peter's answer&lt;/a&gt;, but I notice that they all imply or at least come from the perspective of the student being the actor. In many cases, this is just fine. In some other cases, the students may need more of a push, or may need to have some obstacles removed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has been reported that teachers themselves may try to steer students away from, among other things, advanced courses when they suspect a poor fit. According to &lt;a href=&quot;http://www.washingtonpost.com/wp-dyn/content/article/2009/06/07/AR2009060702117.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;a 2009 article&lt;/a&gt; by noted education journalist Jay Mathews,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A recent Fordham Institute survey revealed that only 38 percent of AP teachers believe &quot;the more students taking AP courses, the better,&quot; while &lt;strong&gt;52 percent said &quot;only students who can handle the material&quot; should take AP&lt;/strong&gt;. One of my favorite bloggers, Fairfax County instructional technology specialist Tim Stahmer of assortedstuff.com, frequently says too many unprepared students are being channeled into AP and urged to go to college.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, the rest of the article points out that even when supposedly unprepared students are given access to advanced courses, they have overall better outcomes. In many high schools, computer science is still seen as an advanced elective, similar to the AP courses described above. Even if the goal is not college prep, there is value in providing some exposure to another field, particularly CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting more students into classes may benefit from getting faculty and administration buy-in. This is obviously especially true if teachers, guidance counselors or principals are initially discouraging/blocking some students from taking CS courses, but even if that's not happening, some active encouragement can only help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title of the question also mentions diversity. &quot;Diversity&quot; is a broad term, but given the context of this site (and to simplify research) I'm assuming for the purposes of this question that you mean racial and gender diversity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Research on diversity and education covers a lot of ground, but speaking broadly and relatively, it shows that (at least in the USA) minority students are treated worse. A few random examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://s3.amazonaws.com/academia.edu.documents/11712529/1994_Overrep_JSE.pdf?AWSAccessKeyId=AKIAIWOWYYGZ2Y53UL3A&amp;amp;Expires=1498805087&amp;amp;Signature=MxP0QAGaxWi3V6b0QNAitEjnQOs%3D&amp;amp;response-content-disposition=inline%3B%20filename%3DArtiles_A.J._and_Trent_S.C._1994_._Overr.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Overrepresentation of Minority Students in Special Education: A Continuing Debate&lt;/a&gt; (PDF)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://people.terry.uga.edu/mustard/courses/e4250/Dee-AEF.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Teacher like Me: Does Race, Ethnicity, or Gender Matter?&lt;/a&gt; (PDF)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.twotowns.org/Tenenbaum.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Are teachers' expectations different for racial minority than for European American students? A meta-analysis.&lt;/a&gt; (PDF)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The above is relevant because, where it is taking place, school staff may not even realize that their actions are reducing CS diversity. In other words, it is unconscious bias. Eliminating &quot;gatekeepers&quot; and having &quot;suggest that all students register&quot; policies can help with this.&lt;/p&gt;&#xA;" OwnerUserId="1166" LastEditorUserId="1166" LastEditDate="2017-06-30T14:14:37.487" LastActivityDate="2017-06-30T14:14:37.487" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1264" PostTypeId="2" ParentId="1262" CreationDate="2017-06-30T06:08:10.843" Score="3" Body="&lt;p&gt;&lt;strong&gt;Create a phylogenetic tree&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pick any human protein. &lt;/li&gt;&#xA;&lt;li&gt;Use NCBI to obtain a 200-500 base pair sequence of mRNA for that protein in homo sapiens.&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;https://www.ncbi.nlm.nih.gov/nuccore/?term=homo%20sapiens%20keratin%20mrna&quot; rel=&quot;nofollow noreferrer&quot;&gt;NCBI&lt;/a&gt; to BLAST that sequence against NCBI database. BLAST is an alignment algorithm. &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;While the supercomputer runs, discuss alignment as a computer science problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;GitHub uses an alignment algorithm to create the &quot;diff&quot;; MS Office programs use alignment algorithms to compare two files, displaying the results similar to &quot;show track changes&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Select the best match from each of the top ten or twenty species. Download the set of matching mRNA sequences in FASTA format.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Upload the data in the desktop program Molecular Evolution Genetics Analysis (&lt;a href=&quot;http://www.megasoftware.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MEGA&lt;/a&gt;) and use MEGA to create a phylogenetic tree, showing the most likely evolutionary relationships among the species based on the bit of data about that single protein.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This activity has been used in &lt;a href=&quot;http://dl.acm.org/citation.cfm?id=2832918&quot; rel=&quot;nofollow noreferrer&quot;&gt;one of the endorsed CS Principles curricula&lt;/a&gt; and is often implemented by AP bio teachers. Nuances in how to teach phylogenetic trees and the impact of these choices on student understanding of the biology concepts is reported in &lt;a href=&quot;https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3763020/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Smith 2013&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-01T03:32:33.247" LastActivityDate="2017-07-01T03:32:33.247" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1265" PostTypeId="2" ParentId="1262" CreationDate="2017-06-30T06:40:47.007" Score="3" Body="&lt;p&gt;Code.org, partnered with Project GUTS, has a &lt;a href=&quot;https://code.org/curriculum/science&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS in Middle School Science curriculum&lt;/a&gt; which includes a Life Science Module. This uses &lt;a href=&quot;http://www.slnova.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;StarLogo Nova&lt;/a&gt; for modeling and includes unplugged activities as well.&lt;/p&gt;&#xA;" OwnerUserId="762" LastEditorUserId="762" LastEditDate="2017-06-30T06:46:15.680" LastActivityDate="2017-06-30T06:46:15.680" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1266" PostTypeId="2" ParentId="1262" CreationDate="2017-06-30T07:28:11.133" Score="4" Body="&lt;p&gt;&lt;strong&gt;Create a DNA-like representation for the alphabet&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This activity establishes a background experience that can later be used when teaching that DNA and computer data are sequences of discrete values. Each student picks three colors and creates a 27-character table showing all permutations of &quot;codons&quot; of the colors, akin to the 4^3 DNA codons representing amino acids. This activity was implemented in a U.S. grade 7 science classroom. An example of the student work is shown below, although the printed worksheet was revised after the pilot to make more explicit connections to both computer science and genetics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sample student work: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/gll1K.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/gll1K.png&quot; alt=&quot;student work sample&quot;&gt;&lt;/a&gt;  &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-06-30T17:45:09.473" LastActivityDate="2017-06-30T17:45:09.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1267" PostTypeId="2" ParentId="349" CreationDate="2017-06-30T07:51:48.983" Score="4" Body="&lt;p&gt;I very much like &quot;The Devil and Daniel Webster&quot;, as introduced to me by Devika Subramanian. It connects programming to mathematics, and introduces lists, loops, and if conditions in a fairly simple wait, with an interesting story.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lecture notes I've found for them are below, but the problem is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The devil made a proposition to Daniel Webster. The devil proposed paying Daniel for services in the following way:&quot;On the first day, I will pay you \$1,000 early in the morning. At the end of the day, you must pay me a commission of $100. At the end of the day, we will both determine your next day's salary and my commission. I will double what you have earned at the end of the day, but you must double the amount that you pay me. Will you work for me for a month?&quot;&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://sites.google.com/site/publiccomp140site/week-1/the-devil-and-daniel-webster-lecture-notes&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sites.google.com/site/publiccomp140site/week-1/the-devil-and-daniel-webster-lecture-notes&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1571" LastActivityDate="2017-06-30T07:51:48.983" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1268" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T08:52:33.650" Score="8" Body="&lt;p&gt;Learning and teaching competitive programming depends a lot on what level the students already have. The first step is getting to know basic features of a programming language, preferably C, C++ or Pascal, since some contests require to use one of these. Out of these, C++ is used most.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These basic features include at least: variables, strings, input and output, if and else, while, for, basic manipulation of arrays. In fact, this is usually enough to (theoretically) be able to solve every problem. Of course, built-in sorting functions and things like inteprenting characters as numbers are useful as well. As you say, this is mostly just knowing, and less insight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Improve someone's problem-solving ability is in the beginning mainly practising, for the problems you don't really need any textbook algorithm or other, more complicated techniques. Besides explaining solutions to problems that the student can't solve &lt;em&gt;but already tried sufficiently hard&lt;/em&gt;, there is not very much to teach. The &quot;tried sufficiently hard&quot; is important: you learn this problem-solving ability the best when doing this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, on a higher level (e.g. National Final Round, or even the IOI), the students need some standard textbook algorithms (e.g. Dijkstra's algorithm) and other techniques, and you can teach this. You can find all the topics you might want to teach in the IOI syllabus. &lt;/p&gt;&#xA;" OwnerUserId="111" LastEditorUserId="111" LastEditDate="2017-06-30T09:38:22.723" LastActivityDate="2017-06-30T09:38:22.723" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1269" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T09:16:39.373" Score="5" Body="&lt;p&gt;You need to help your students develop &lt;a href=&quot;https://cseducators.stackexchange.com/q/690/2&quot;&gt;algorithmic thinking&lt;/a&gt;, I would think. As wythagoras mentions, there isn't really an easy way to teach this—like many skills, it is best developed by practising, doing lots of different problems across a broad range of topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've mentioned &lt;a href=&quot;https://www.codewars.com/&quot; rel=&quot;noreferrer&quot;&gt;Codewars&lt;/a&gt; in a previous answer, and there are various other 'online judges' available in the &lt;a href=&quot;https://github.com/tayllan/awesome-algorithms#online-judges&quot; rel=&quot;noreferrer&quot;&gt;awesome-algorithms&lt;/a&gt; list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to teach some of the most common algorithms that can just be 'slotted in' to a problem, there are some resources available under the &lt;a href=&quot;https://github.com/tayllan/awesome-algorithms#websites&quot; rel=&quot;noreferrer&quot;&gt;'Websites'&lt;/a&gt; section. This is the bit where you &lt;strong&gt;can&lt;/strong&gt; help—teaching sorting algorithms through &lt;a href=&quot;https://cseducators.stackexchange.com/q/339/2&quot;&gt;'human sorting'&lt;/a&gt; is entertaining and does help to introduce and reinforce the algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, you can't &lt;strong&gt;teach&lt;/strong&gt; problem-solving in the same way as just teaching a specific topic, but you can facilitate it through adapting your lessons to &lt;em&gt;require&lt;/em&gt; some problem-solving rather than just telling your students what they need to learn directly. Giving them the resources to practise writing algorithms from a text-based 'design brief' is probably the best you can do here, so I highly recommend it for your problem.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-06-30T09:48:20.427" LastActivityDate="2017-06-30T09:48:20.427" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1270" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T09:20:37.567" Score="7" Body="&lt;p&gt;I'll answer the second part before the first one:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt;. Many problems, at varying difficulties. Just starting to solve them, from the start, and sticking to it. The variation in the problems gives students a very handy skill set for solving problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the competitive programming, Project Euler is arguably still useful here. But I think it would be even better to form a few groups of students (2-3 students per group). Ask each group to write a program\algorithm that would complete some task (such as pathfinding or something similar) and the algorithm that completes the task in the best way (you can decide how to define &quot;best&quot;, but I'd go for minimal complexity and execution time) wins. This teaches them teamwork as well.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-06-30T09:20:37.567" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1271" PostTypeId="2" ParentId="17" CreationDate="2017-06-30T12:19:37.620" Score="3" Body="&lt;p&gt;I hesitated to answer since most of the answers given are already so good. However, I've also used &lt;a href=&quot;https://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly&lt;/a&gt; as an introduction, though it isn't precisely recursive. It is more focused on a list as a stack, which leads naturally to recursion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my class we occasionally had &quot;Choir Practice&quot; in which I'd ask a number of students to participate in various &quot;games.&quot; For this exercise I'd give each of them a Script card. Starting with only myself and one student, I'd do one verse of the poem, then &quot;push&quot; another student on to the stack and continue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start (with one student) and say:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;There was an old woman who swallowed a fly,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then point to the one student who reads his/her script card. The first says:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;I don't know why she swallowed a fly, Perhaps she'll die.(Take a bow.)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then, &quot;pushing&quot; the second student (now I have a stack of two), I'd say:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;There was an old woman who swallowed a spider, That wriggled and jiggled and tickled inside her,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd point to the (new) stack top who would read the script:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;She swallowed the spider to catch the fly, (point to the next person)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc for as long as you like. &quot;Pointing&quot; to a person is passing them the message to read (sing-act) their own script. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on how you talk about the exercise you can use it to reinforce lists, stacks and/or recursion. Note the base case (...take a bow). The &quot;message&quot; sent is recursive, though. You can also explore what happens without a base case in your follow up discussion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bit foolish, but my University students tended to like it even if they did roll their eyes a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that such &quot;active learning&quot; exercises always require follow up discussion in which you point to the mapping between the elements of the game and the lesson to be learned and students get to unwind any puzzlement. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here is a &lt;a href=&quot;https://drive.google.com/open?id=0B8yuv5DJXhC7b255aEE5SExkSlk&quot; rel=&quot;nofollow noreferrer&quot;&gt;link to the card deck&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-30T15:55:25.060" LastActivityDate="2017-06-30T15:55:25.060" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1272" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T12:59:36.293" Score="3" Body="&lt;p&gt;Having coached several teams that have been beaten soundly by Steve Skiena's teams, I will recommend his &lt;a href=&quot;https://smile.amazon.com/Programming-Challenges-Contest-Training-Computer/dp/0387001638/ref=smi_www_rco2_go_smi_g2609328962?_encoding=UTF8&amp;amp;%2AVersion%2A=1&amp;amp;%2Aentries%2A=0&amp;amp;ie=UTF8&quot; rel=&quot;nofollow noreferrer&quot;&gt;book on Amazon&lt;/a&gt;.  The Table of Contents includes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Data Structures&lt;/li&gt;&#xA;&lt;li&gt;Sorting&lt;/li&gt;&#xA;&lt;li&gt;Combinatorics&lt;/li&gt;&#xA;&lt;li&gt;Number Theory&lt;/li&gt;&#xA;&lt;li&gt;Graph Algorithms&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;None of these chapters will turn a beginner into an expert, but with a bit of prerequisite knowledge, it can help bridge the gap between &quot;good student in class&quot; and &quot;good programming contestant&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastEditorUserId="1564" LastEditDate="2017-06-30T14:55:43.357" LastActivityDate="2017-06-30T14:55:43.357" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1273" PostTypeId="2" ParentId="1226" CreationDate="2017-06-30T13:18:26.957" Score="13" Body="&lt;p&gt;What my teachers used was the following example, which is pretty simple and most people understood.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your father orders a pizza. The delivery guy arrives and expects payment. The &lt;code&gt;wallet&lt;/code&gt; containing the money belongs to the object &lt;code&gt;father&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the wallet is &lt;code&gt;private&lt;/code&gt;, then you have to get your father to open it and pay.&lt;br&gt;&#xA;If the wallet is &lt;code&gt;protected&lt;/code&gt;, you can go and pay the pizza guy.&lt;br&gt;&#xA;If the wallet is &lt;code&gt;public&lt;/code&gt;, the pizza guy takes it and pays himself&lt;/p&gt;&#xA;" OwnerUserId="1579" LastEditorUserId="1579" LastEditDate="2017-06-30T13:22:45.727" LastActivityDate="2017-06-30T13:22:45.727" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1274" PostTypeId="2" ParentId="1205" CreationDate="2017-06-30T13:38:01.757" Score="4" Body="&lt;p&gt;&lt;em&gt;(I am submitting 2 answers, because they are very different takes on the same problem, and merging them together would be of little value)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a full-automation setup I have used in a C++ data-structures subject.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Install an automated answer judge (say, &lt;a href=&quot;https://www.domjudge.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;domjudge&lt;/a&gt; or &lt;a href=&quot;https://mooshak.dcc.fc.up.pt/&quot; rel=&quot;nofollow noreferrer&quot;&gt;mooshack&lt;/a&gt;). Setup username/password pairs for each of your students. Configure the judge to only accept answers in your chosen programming language.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide your students with exact specifications of the compilation environment used by the judge. If you want full build reproducibility, run the judges on virtual machines and provide copies of these to your students; however, specifying the exact compiler version and OS is generally enough.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Spend significant time preparing each problem statement, resource limits (time and memory), and the sample and validation inputs and outputs. (Great) examples of problems designed for automated judging can be found at the &lt;a href=&quot;https://uva.onlinejudge.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;UVA site&lt;/a&gt;. Note that they come without validation inputs and outputs; I have not found open repositories with full questions, but there are several repositories of enthusiast users with working answers.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Open the contest and watch the answers roll in. Be prepared to find &amp;amp; fix errors in the problem statement or input/output files unless you were very, very careful when writing them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Fully-automatic validation leaves no room for error on either your part (statement, input-output specs) or the student's (off-by-a-comma is a wrong answer). For these reasons I recommend pairing up with someone who can double-check that statements are clear and that tries to solve problems before opening time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To prepare a single statement, I generally&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;write a draft of the statement, with sample input and output&lt;/li&gt;&#xA;&lt;li&gt;code a reference answer&lt;/li&gt;&#xA;&lt;li&gt;code an input-generator that can create valid but random inputs of configurable sizes&lt;/li&gt;&#xA;&lt;li&gt;generate a few nice-looking inputs and run them through the reference answer to get the validation input-output pairs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is a lot of work (around 2hrs for each problem, QA included); but afterwards marginal grading cost is effectively 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that nothing prevents students from copying each other's answers (although you could run answers through a plagiarism-detection program). You should be aware that cheating unless conditions are tightly controlled is quite easy.&lt;/p&gt;&#xA;" OwnerUserId="913" LastEditorUserId="913" LastEditDate="2017-06-30T13:44:20.453" LastActivityDate="2017-06-30T13:44:20.453" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1275" PostTypeId="5" CreationDate="2017-06-30T13:40:11.143" Score="0" Body="&lt;p&gt;Game design is a field in Computer Science, which deals with techniques, aspects, tools, etc. for designing games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The field incorporates visual design as well as game mechanics and design patterns of games. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Game design starts with design a World.&lt;br&gt;&#xA;A world is the universe of the game. The lore, background and theme. Designing a world creates guiding ideas for the rest of the game design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next is the initial design of a System.&#xA;The System is a set of rules and patterns that guide the game creation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information about game design can be found &lt;a href=&quot;https://en.wikipedia.org/wiki/Video_game_design&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-30T14:09:12.440" LastActivityDate="2017-06-30T14:09:12.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1276" PostTypeId="4" CreationDate="2017-06-30T13:40:11.143" Score="0" Body="Questions related to teaching about game design concepts, teaching how to work with game design tools and teaching various aspects of designing games." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-06-30T14:09:08.930" LastActivityDate="2017-06-30T14:09:08.930" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1277" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T13:52:20.360" Score="2" Body="&lt;p&gt;It takes theory and practice. Theory involves learning algorithms, programming concepts, and when/why/how to use them. It's important to have lots of practice. This is easier when it's fun, for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://robocode.sourceforge.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Robocode&lt;/a&gt; - think &lt;em&gt;BattleBots&lt;/em&gt;, but in Java&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://code.google.com/codejam/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Code Jam&lt;/a&gt; - many archived problems, some easy, some hard&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;King of the Hill&lt;/em&gt; - this is a &lt;a href=&quot;https://bitbucket.org/CoachEd/mysqlchallenge&quot; rel=&quot;nofollow noreferrer&quot;&gt;game I developed&lt;/a&gt; where students battle to insert many records into a simple MySQL table. The student with the most records at the end wins. This is probably the most fun learning activity I have ever presented.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-06-30T13:52:20.360" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1278" PostTypeId="2" ParentId="1218" CreationDate="2017-06-30T13:53:31.483" Score="2" Body="&lt;p&gt;I just noticed that most of the answers here, while good, don't answer the originators question: How can I ....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestions, all of which are hard work: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you don't have a &quot;club&quot; for your majors start one so they can talk about issues guided by yourself and others you invite. Even if the club is mostly technical, have a &quot;career night&quot; occasionally. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Bring in industry folk you know. Arrange for students to chat with them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Work to make contacts with those industry folk, of which you have an abundance where you are. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do field trips with one or two students to sites in which you arrange to meet with (a) tech types and (b) management types and (c) executive types, in order to let the students get a handle on what the needs are and how they might fit in to various organizations. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once you make contact try to use electronic communication (or other things) to maintain the conversation. Push it in the direction of mentoring if possible. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;More...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'll repeat part of my earlier comment. A person who can ask the &lt;em&gt;right&lt;/em&gt; question is as valuable as a person who can answer it. A philosopher can manage programmers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't a complete answer, of course. But the basis of the answer is &quot;communication&quot; and &quot;personal contact.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And most likely, they &lt;strong&gt;are&lt;/strong&gt; prepared, so it is mostly a problem of finding a good and rewarding match. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-06-30T14:03:48.867" LastActivityDate="2017-06-30T14:03:48.867" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1279" PostTypeId="2" ParentId="1233" CreationDate="2017-06-30T14:03:36.427" Score="3" Body="&lt;p&gt;Part of the answer depends on where one is in his/her career and the type of institution that one works at.  If one is non-tenured and at the beginning of his/her career in a hard-core CS department at a heavily research-oriented institution, I would say no.  Many such institutions do not even recognize acceptance at papers at educational conferences when evaluating applications for tenure.  As David A. wrote above, there is a big difference between CS and CS Ed.  If one is in this category, he/she should speak to the Dept. Chair and/or Chair of the P&amp;amp;T Committee carefully about what counts and what doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my institution it took me four tries over 14 years to get promoted from associate to full professor in part because my work was all in CS Ed.  This is despite the fact that I had an extensive publication record, including many papers at SIGCSE.  I would be happy to share my three rejection letters with anyone interested.  (My email address is in my profile.)  They may very well be the most complimentary letters you will ever see with respect to teaching and service.  But until I ramped up the research aspect of my work and got support from the NSF, had doctoral students doing research in other areas, and got a book published by Oxford University Press, I was unpromotable in the eyes of the P&amp;amp;T Committee.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if one is not in such a situation, I would say yes.  I have benefited greatly both personally and professionally from my association with people I have met through SIGCSE.  As &quot;Buffy&quot; wrote: &quot;It is a great bunch of well informed and friendly people. The conferences are very valuable, including the panel discussions, demos, and tutorials.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't regret one bit of the path of my academic career.  I am now retired, but former students still contact me to get together for lunch or email me to ask my opinion on issues in their lives.  One former student even hired my barbershop quartet to perform at his grandmother's 100th birthday celebration! :)  Being a member of SIGCSE gave me support for my teaching activities and helped make me a better educator.  In a very few years no one will care about or cite my publications, but the relationships I have built with some students through my teaching will last for the rest of my life.&lt;/p&gt;&#xA;" OwnerUserId="1580" LastEditorUserId="27" LastEditDate="2017-07-04T15:10:32.793" LastActivityDate="2017-07-04T15:10:32.793" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1280" PostTypeId="2" ParentId="477" CreationDate="2017-06-30T14:43:43.103" Score="6" Body="&lt;p&gt;Since you've described this a standalone course, I'd treat it as a &quot;computer literacy&quot; sort of thing. I wrote another answer yesterday that got me thinking about what topics everyone should know about computer science, which I'm adapting here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like that you're starting with basic computer architecture. People should understand that there are logical rules and processes between them pressing on the keyboard or clicking the mouse and pixels lighting up on the screen. A logical step from there might be basic network architecture, for the same reason; just as the inside of a computer doesn't work by magic, neither do e-mails move from one computer to another that way. (Do people still write e-mails? Maybe Facebook or Twitter posts&lt;sup&gt;1&lt;/sup&gt; instead?) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also agree with your choice of DOET. It was a part of my own CS education in the distant past, though I didn't realize it until I read the book years later on my own and found a particular section to be very familiar. From there, you might also discuss basic security topics, such as passwords; why they're important, how they work, and how they can fail. Obligatory &lt;a href=&quot;https://www.xkcd.com/936/&quot; rel=&quot;noreferrer&quot;&gt;xkcd 936&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://imgs.xkcd.com/comics/password_strength.png&quot; alt=&quot;inline image&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also &lt;a href=&quot;https://security.stackexchange.com/questions/6095/xkcd-936-short-complex-password-or-long-dictionary-passphrase&quot;&gt;Security SE's post about that comic&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick mention of the fact that there are problems computers can't solve, no matter how fast we make processors. Not necessarily the whole, heavy mathematical proof, just the concept (again) that computers aren't magic boxes. Maybe a mention of the fact that even though computers are fast, efficiency still matters for computer algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least some cursory coverage of programming, algorithms, and data structures should be included, as they are fundamentals of the practical side of things. I've never used AppInventor, but I looked it up just now and it seems like it would do that job. I'm curious why you say it's gone poorly in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AI and ML are cool topics, but I don't see a ton of promise in adding them to the course, given that your students are, by your own description, intending to be miserable, largely uninterested in CS and unlikely to be directly applying what they learn. There is a bit of human element here, which, to be perfectly frank, I probably didn't spend enough time thinking about. Your course plan already seems full to bursting, but if you can make the time, maybe start out day one by asking the students what they hope to get out of the course? It'll be a long and draining semester for everyone, including you, if the students' initial expectation of misery doesn't change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1: Actually, the first &quot;relatable, common type of web traffic&quot; example I thought of was Netflix movies, but they're technically a terrible example, because &lt;a href=&quot;https://www.washingtonpost.com/news/the-switch/wp/2014/02/23/comcasts-deal-with-netflix-makes-network-neutrality-obsolete/?utm_term=.bf8f229112f4&quot; rel=&quot;noreferrer&quot;&gt;Netflix avoids backbone peering&lt;/a&gt;. I thought that might be beyond the scope of your course, but I guess that's up to you.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="1166" LastActivityDate="2017-06-30T14:43:43.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1281" PostTypeId="2" ParentId="1238" CreationDate="2017-06-30T14:47:20.387" Score="4" Body="&lt;p&gt;Yes! (with some qualifications.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Benefits (most apply to conference attendance):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;connections with other teachers to share ideas and experience&lt;/li&gt;&#xA;&lt;li&gt;research results on CS teaching practices/methods&lt;/li&gt;&#xA;&lt;li&gt;TIME away from class to reflect and plan&lt;/li&gt;&#xA;&lt;li&gt;broader perspective on new/existing computing curricula&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(especially honest feedback on others' experience with CS material/curricula)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;perspective on what is out there for your students in computing careers and in college&lt;/li&gt;&#xA;&lt;li&gt;information-dense listserv (you hear about sites like this one)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However, most of the sessions/listserv posts are still geared toward research on college classes, so you have to be picky about sessions at the conference. There is a K-12 track for sessions, which makes things easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more K-12 sessions every year, and more K-12 educators attending as well. This year my district (Chicago Public Schools) had 20 people attend, and there were a good number of other (mostly high school) teachers from other districts. Two of this year's keynotes (Gail Chapman and Mitch Resnick) were people whose main impact has been in the K-12 space, and next year's theme is CS for All, so they really recognize the importance of what is happening in high school and earlier grades.&lt;/p&gt;&#xA;" OwnerUserId="1583" LastActivityDate="2017-06-30T14:47:20.387" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1282" PostTypeId="1" AcceptedAnswerId="1284" CreationDate="2017-06-30T15:07:05.837" Score="12" ViewCount="3919" Body="&lt;p&gt;In beginner programming environments, I have noticed an essential difference in style for handling user interaction. Scratch and Alice are event-driven, while Processing and Greenfoot, for lack of a better term, are poll-driven. In the event-driven case, when the user clicks the mouse on something or types a key, a method is called to handle the event. In the poll-driven case, in order to respond to user actions, the programmer puts if statements into an update method that is called every frame to poll the input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to use these beginning programming environments in beginning classes, especially for game programming. I'm not sure which approach is better, though. Event-driven programming is easier for programming GUIs, but poll-driven programming is better for simulations. Neither one seems best for all types of games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which approach will work the best for programming games for beginners? If I wanted to design my own environment, which style should I use? Are there any other styles?&lt;/p&gt;&#xA;" OwnerUserId="587" LastEditorUserId="58" LastEditDate="2017-07-13T16:29:44.520" LastActivityDate="2023-03-07T21:23:14.467" Title="Event-driven or polling for beginning programming environments?" Tags="|language-choice|programming-paradigms|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1283" PostTypeId="2" ParentId="1262" CreationDate="2017-06-30T15:31:03.623" Score="4" Body="&lt;p&gt;Building off Bennett Brown's answer about creating an &quot;alphabet&quot; with DNA...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is being researched how to efficiently store data in DNA. Here's some thoughts you can cover:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The efficiency of DNA - a vial around the size of your pinky finger can store a petabyte of DNA (see &lt;a href=&quot;https://mozy.com/blog/misc/how-much-is-a-petabyte/&quot; rel=&quot;noreferrer&quot;&gt;how much is a petabyte?&lt;/a&gt; and &lt;a href=&quot;https://www.youtube.com/watch?v=tBvd7OSDGgQ&quot; rel=&quot;noreferrer&quot;&gt;this fascinating lecture&lt;/a&gt; by one of the eminent researchers in the field)&lt;/li&gt;&#xA;&lt;li&gt;The scientific method - multiple papers have been written (I'll try to find a couple of the better ones) continually advancing the field; one of the later ones, about an encoding system called DNA Fountain approaches I think 86% of the theoretical limit for how much information can be stored in a nucleotide.&lt;/li&gt;&#xA;&lt;li&gt;The structure of DNA - what a deoxyribonucleotide is (phosphate group, base, etc) and how it is copied and created in the cell. Here also, you can make a foray into the sequencing and synthesis of DNA - a group called Oxford Nanotech is starting to make smaller, handheld synthesizers using nanopores (links will be added) and then there's Illumina's more classic method of fluorescence sequencing. You can talk about why synthesis is so hard - in the cell, a &quot;primer&quot;, or strand of already created DNA, is needed to use DNA polymerase, the enzyme that helps &quot;zip&quot; together the nucleotides.&lt;/li&gt;&#xA;&lt;li&gt;Information theory, storage, and density. Talk about how Shannon realized that the amount of information in a message depends on how surprising it is - you know more when I say that &quot;the sky is green&quot; versus &quot;the sun rises in the east&quot;. You can also talk about how efficiency is measured - how many units of information per unit volume (in DNA storage's case, bits per nucleotide). So, in English, efficiency (actually called information density) would have the unit volume be each letter. Let them explore, and try to create a more efficient alphabet - I'm guessing they'll gravitate towards something like Chinese, where whole concepts, phrases, words, and so on are represented by characters - i.e., a large character set, but each character holds a whole lot of data.&lt;/li&gt;&#xA;&lt;li&gt;Error correction, and how scientists are doing that in DNA. Homopolymers (i.e., 'aa', 'gg', etc) are a problem to be avoided in encoding systems. You could explain error correction in normal data, like checksums, and so on. &lt;/li&gt;&#xA;&lt;li&gt;Addressing, and how that's used in random access. Why random access is important in DNA storage. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I could keep going (I'm just a bit excited about this field), but it would be well worth the doing to explain the various encoding systems used in research, and let them explore - who knows, they might come up with a great system of their own! I will add links as I have more time.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-06-30T15:36:20.037" LastActivityDate="2017-06-30T15:36:20.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1284" PostTypeId="2" ParentId="1282" CreationDate="2017-06-30T15:43:56.093" Score="7" Body="&lt;p&gt;On the face of it, event-driven programming seems far easier to explain. &lt;em&gt;&amp;quot;This code will run when the button is clicked&amp;quot;&lt;/em&gt; seems obvious, and similarly, visual environments that favour this technique seem relatively intuitive:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/6mgte.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/6mgte.png&quot; alt=&quot;Scratch 'When this sprite clicked' block&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&#xA;&lt;sub&gt;(source: &lt;a href=&quot;https://wiki.scratch.mit.edu/w/images/2.0_When_This_Sprite_Clicked.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;mit.edu&lt;/a&gt;)&lt;/sub&gt;&lt;/p&gt;&#xA;&lt;p&gt;It would seem obvious to explain that the code below that block runs when the sprite is clicked.&lt;/p&gt;&#xA;&lt;p&gt;Similarly, in Node.js, an event-driven programming language:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;app.get('/', function (req, res) {&#xA;  res.send('Hello World!')&#xA;})&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;With some basic knowledge of the framework used (&lt;a href=&quot;https://expressjs.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Express&lt;/a&gt;), you can tell that when the &lt;code&gt;/&lt;/code&gt; route is accessed, &lt;code&gt;Hello World!&lt;/code&gt; will be sent.&lt;/p&gt;&#xA;&lt;p&gt;So, without looking too deeply, event-driven programming is the obvious choice. But, this isn't the end of the story. If you're not used to event-driven programming, the fact that your code might not run in the order you expect is very confusing.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;fs.readFile('foo', 'utf8', function (err,data) {&#xA;    console.log(data);&#xA;});&#xA;console.log('Hello!')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Two things will print here: the contents of &lt;code&gt;foo&lt;/code&gt; and the word 'Hello!'—but which prints first? The answer is: &lt;strong&gt;you can't tell&lt;/strong&gt;, despite the intuition that many students have that would suggest the order is file then 'Hello!'.&lt;/p&gt;&#xA;&lt;p&gt;Event-driven programming starts to encounter a lot of these 'gotchas' because it's difficult to predict in which order things will happen. Ideally, each event wouldn't need to consider any other event happening, but in practice it is necessary.&lt;/p&gt;&#xA;&lt;p&gt;Let's say you wanted to end the game if your spaceship was touching two others at once. With events, you could need to subscribe to 'Touching [spaceship1]?' and 'Touching [spaceship2]?' and synchronise them (not terribly straightforward). But polling like so would be far easier—for each update loop, just test &lt;code&gt;if(touching(spaceship1) &amp;amp;&amp;amp; touching(spaceship2))&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Getting to your original question, I would personally &lt;strong&gt;introduce event-driven programming first&lt;/strong&gt;, since it's so straightforward for trivial use-cases. As the problems start to appear with events, then introducing polling in an update loop would be wise. Most of the major introductory programming environments seem to follow that (Scratch -&amp;gt; Greenfoot, etc). The same principle should apply to your own environment, I think—consider your audience and what they'll be using your own environment for, and you'll have an answer that suits you.&lt;/p&gt;&#xA;&lt;p&gt;You might also find &lt;a href=&quot;https://gamedev.stackexchange.com/questions/12146/polling-vs-event-driven-input?noredirect=1&amp;amp;lq=1&quot;&gt;Polling vs event driven input&lt;/a&gt; on Game Development Stack Exchange interesting for reference on the problems faced by professional game designers regarding events vs polling.&lt;/p&gt;&#xA;&lt;p&gt;The only alternative, perhaps, would be to &lt;a href=&quot;https://gamedev.stackexchange.com/a/21721/96963&quot;&gt;batch events from inputs&lt;/a&gt; so that they can be handled in the next update loop—that's something to consider if you're looking for another way of handling the issue, but it is more complex than the others.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="1035" LastEditDate="2023-03-07T21:23:14.467" LastActivityDate="2023-03-07T21:23:14.467" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1285" PostTypeId="2" ParentId="1260" CreationDate="2017-06-30T16:04:51.870" Score="2" Body="&lt;p&gt;Websites such as &lt;a href=&quot;https://www.codeeval.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codeeval.com&lt;/a&gt; and &lt;a href=&quot;https://coderbyte.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://coderbyte.com&lt;/a&gt; are great for students to practise this type of competitive programming activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to prepare them for that type of competitive challenge it can be good fun to create opportunities for competition and collaboration early on when you're introducing new programming concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Split students into groups&lt;/li&gt;&#xA;&lt;li&gt;Give all students some code that is deliberately incomplete or broken.&lt;/li&gt;&#xA;&lt;li&gt;Award points to the first person who fixes the errors or completes the challenge&lt;/li&gt;&#xA;&lt;li&gt;Once someone in the team has finished, their job is to support the other students without touching their mouse or keyboard. Award points to the first whole team to complete the challenge.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can get a fast-paced, fun lesson where there's enough challenge to get the brightest students being competitive with enough support for those who take more time to understand and complete the work.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-06-30T16:04:51.870" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1286" PostTypeId="2" ParentId="1205" CreationDate="2017-06-30T18:01:15.003" Score="7" Body="&lt;p&gt;The key to efficient grading of assignments is to build easily gradable assignments in the first place. This does &lt;em&gt;not&lt;/em&gt; imply easier problems, but, as unit testing makes code testable, this kind of discipline makes assignments gradable. Like many of the suggestions here, JUnit test cases are an important factor, but to use them you need to more completely specify the assignment (e.g. what functions/methods to write, etc.) For higher level grading, you can build a facade method that takes a big string as input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two tools that I use for auto-grading of assignments: &lt;a href=&quot;https://repl.it/site/classrooms&quot; rel=&quot;noreferrer&quot;&gt;repl.it classroom&lt;/a&gt; and &lt;a href=&quot;http://web-cat.cs.vt.edu/Web-CAT/WebObjects/Web-CAT.woa&quot; rel=&quot;noreferrer&quot;&gt;Web-CAT&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Repl.it classroom is good for small assignments. It's a SaaS-based development environment that supports dozens of different languages. You can set up a course and put assignments in it complete with descriptions, test cases (unit-test or output-based), and progress reporting. Repl.it also supports LTI integration for most course management systems like Moodle, Blackboard, Canvas, etc. This is fantastic for homework.&lt;/li&gt;&#xA;&lt;li&gt;Web-CAT is good for large lab assignments. Students code in their own IDE (Eclipse, BlueJ, etc) and then submit the files for automatic grading. This uses JUnit heavily, although there are some plugins for output-based grading. Web-CAT is highly opinionated and wants students to write their own test cases and testing metrics are part of the students' grades. You can get access to Web-CAT for your institution through &lt;a href=&quot;http://www.cs.vt.edu/user/edwards/&quot; rel=&quot;noreferrer&quot;&gt;Stephen Edwards&lt;/a&gt; at Virginia Tech or you can &lt;a href=&quot;https://sourceforge.net/projects/web-cat/&quot; rel=&quot;noreferrer&quot;&gt;download and install it&lt;/a&gt; on your own server.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See also, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2/what-autograding-software-do-folks-use-for-java-code/&quot;&gt;this similar thread&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1561" LastActivityDate="2017-06-30T18:01:15.003" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1287" PostTypeId="2" ParentId="477" CreationDate="2017-06-30T18:53:24.847" Score="3" Body="&lt;p&gt;I'd really recommend adding some materials on security and cryptography. You don't need to get into the nitty gritty details of how it's implemented. I think that everyone should learn a bit (pun intended) about what encryption is and how and why security works so they can be informed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think what's particularly practical would be a lesson on how to use the internet safely. Topics like http vs https, not using the same password for everything, etc.&lt;/p&gt;&#xA;" OwnerUserId="91" LastActivityDate="2017-06-30T18:53:24.847" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1288" PostTypeId="2" ParentId="1282" CreationDate="2017-07-01T01:55:03.307" Score="3" Body="&lt;p&gt;It almost entirely depends on the context of the function within the program and the program within its usage context. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my general approach:&#xA;If only one event can happen at one time, especially if events are infrequent, use polling. This reduces the amount of function references needed when they would be unnecessary and also cuts down on the instantaneous overhead when an event occurs. This makes polling ideal for programs like timers, which are only waiting for one event to happen. Of course, one could also write a timer that schedules the buzzer at the appropriate time or one that binds a function that checks whether the correct amount of CPU cycles has passed every tick, but this uses references and possibly pointers where they are simply not needed. Polling is also ideal for graphical &lt;em&gt;update&lt;/em&gt; (but not necessarily input) methods, where the screen is updated at a regular interval whether anything happens or not - otherwise the GPU would be receiving too many instantaneous drawing calls, especially in applications such as graphics-intensive games, and this way the FPS stays fairly consistent. Additionally, polling should be used when the output of the controlling function or event cannot be predicted: if you are designing a website and are creating a &quot;Latest Threads&quot; module for it, unless you are going to use something fancy like Pusher or React to update the module for all users, you don't know if you should update the module's HTML until you know the list of threads: in this case, polling &lt;em&gt;must&lt;/em&gt; be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Event handling, on the other hand, is better for largely event-driven programs where, for example, the computer is waiting for users to perform a task. Event handlers are especially useful when multiple events can occur at one time or in quick succession, as event handlers are generally fired asynchronously, meaning that even if one event handler takes a whole second to finish executing, other event handlers do not have to wait that one second before running. This is ideal for the input aspects of video games, where a player could press the &lt;em&gt;forward&lt;/em&gt; and &lt;em&gt;left&lt;/em&gt; buttons at the same time, while also falling down a hole and being shot at. Each of these is at least one event, and it would be pretty bad if the game had to wait for the user to stop pressing the forward button before processing the left button before processing that they fell down a hole: they could theoretically delay the entire game by pressing a button. Event handling avoids this problem entirely, but blocking events can still be implemented easily enough if the programmer so desires.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, despite appearances, polling-driven programs are generally less efficient than event-driven programs. Imagine the graph of time vs. CPU consumption for a purely polling-based program versus a purely event-based program. A polling-driven program's graph would show small spikes at regular intervals: every so often, it checks if a certain value is set and, optionally, if certain other conditions are met. If so, it calls a function and runs it. This would add an even larger spike whenever the event is called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now imagine the graph for a purely event-based program: when only considering the event handler, the graph is flat: no functions related to the event are being called. Once a user activates an event, the event calls the handling function, creating a single spike.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, in practice, an event-driven program would probably be more CPU-intensive simply because it is inferrable that it uses more event handlers which likely execute more often - but it would nonetheless be considered better practice to use event handlers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bottom line: It depends on context. Whichever one is more logical to use should be used. A program can use a mix of polling and instantaneous event handling as well, but there is a trade-off when you use a high amount of polling-based functions, even when they execute in their own threads: this will only solve the problem of blocking, not CPU consumption. Generally speaking, event-driven programs are more efficient if they are a feasible option, but polling-based functions are simpler and almost every program has to use them to some degree. Even the Microsoft XNA Framework uses an Update() function which is called every tick to update a window, as opposed to updating a single element when it changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For beginning users, polling is certainly easier to understand, but practicality should be kept in mind: even if you don't teach your students the &lt;em&gt;how&lt;/em&gt; of event-driven programming, make sure to teach them the &lt;em&gt;whats&lt;/em&gt; and the &lt;em&gt;whys&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1596" LastEditorUserId="1596" LastEditDate="2017-07-01T03:22:17.580" LastActivityDate="2017-07-01T03:22:17.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1289" PostTypeId="2" ParentId="1282" CreationDate="2017-07-01T04:26:55.863" Score="7" Body="&lt;p&gt;This is a technical response, rather than a response of a teacher for beginner students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the big &quot;aha&quot; moments for me was understanding that they are the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Under the covers, for a long time &quot;event driven&quot; systems were actually polling.  There was a loop hidden in the framework that polled and dispatched the events. In the early days of Windows and the MacIntosh, you always had a main event loop that looked something like this;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (!done) {&#xA;    event = fetchNextEvent ();&#xA;    dispatchEvent (event);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hardware interrupts pushed data into a cyclical queue from multiple sources. the events identified what kind of event they were and carried ancillary data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the fetchNextEvent function would fetch the next unread event from the queue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The dispatchEvent function was essentially a big case statement (if ... then ... else ... to beginners) that routed the event to the correct object, which ultimately handled the event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When macintosh and Windows 2 hit the market, as an experienced programmer I had a hard time trusting the event driven frameworks, until I had traced into the framework to the point that I saw the main event loop and what the event dispatcher was doing. After that, it was natural to write everything in an event driven model, even for console applications on systems like the Commodore 64, Atari 800, or IBM PC (yes, the original one) that you had to write your own event queues and dispatchers for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The event driven model makes for leaner (measured in kilobytes of deployed code), cleaner code (eliminates lots of decision points) and is much more flexible and reliable.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-07-01T04:26:55.863" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1290" PostTypeId="1" AcceptedAnswerId="1292" CreationDate="2017-07-01T08:44:16.167" Score="13" ViewCount="2745" Body="&lt;p&gt;This question is really aimed to teachers, especially in high school courses (but everyone is welcome to share some ideas). If you have a student that really does not like Computer Science, what should you do?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Encourage him, he might find his passion in CS&lt;/li&gt;&#xA;&lt;li&gt;Talk to his parents and tell them maybe he should be in a course more of his liking&lt;/li&gt;&#xA;&lt;li&gt;Try to find common ground between what he likes and CS (this one is actually very hard to do if you want to comply with the curriculum)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'm most interested in the answers for a course that is &lt;strong&gt;required&lt;/strong&gt;, but answers for courses that are optional would also be of interest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think this question is not suitable here or should be rephrased, please tell me so in the comments.&lt;/p&gt;&#xA;" OwnerUserId="118" LastEditorUserId="2" LastEditDate="2017-07-01T14:54:31.887" LastActivityDate="2017-07-01T18:38:47.910" Title="How to deal with students that don't like CS?" Tags="|secondary-education|best-practice|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1291" PostTypeId="2" ParentId="1106" CreationDate="2017-07-01T11:28:50.573" Score="-3" Body="&lt;p&gt;You might want to look at these two sites, which are specifically designed for getting students involved in open source projects:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://teachingopensource.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://teachingopensource.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://foss2serve.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://foss2serve.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="248" LastActivityDate="2017-07-01T11:28:50.573" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1292" PostTypeId="2" ParentId="1290" CreationDate="2017-07-01T13:14:53.737" Score="6" Body="&lt;p&gt;This is hard to answer, since you already provide much of the solution in the question. I'm not sure that 1. is likely to be successful (good luck, though) but the others are pretty good. The answer is probably highly dependent on whether the student is in secondary school or university. In secondary every student has limited options and is required by various rules to take specific courses. University students have (in an ideal world) more, but not complete, freedom. But a secondary student might hate History, for example, rather than CS, but they still need to take it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give a bit of background before saying some things about talking to parents. The background is actually ammunition for you. While I was studying for the doctorate in mathematics, the market was heavenly. The US pushed students into maths and the sciences because of Sputnik. We signed up in droves and the government and industry provided wonderful opportunities for graduates. However this ended completely and catastrophally one year before I finished. There were NO jobs for mathematicians anywhere - especially in good university teaching positions. I was lucky enough to get a position after many (many) tries, but soon switched my focus to computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of the above is that you will never have any control over what the economy will be like when you are ready to enter the market. It could be good or bad. However, my story isn't a sad one, as, over time, I was able to develop a rich and rewarding (and well-paid) career. So, things get bad, but they also get better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back to &quot;talking to parents&quot;. I'm guessing that the parents (likely the father, but why be sexist) think that the kid (ageism?) will have a great career in CS. Maybe true, maybe not. But, rather than trying to convince the parent(s) try to explore with them their reasons. In secondary school, unless it is an expensive private (in Britain that would be &quot;public&quot;) school the parent has less leverage withholding funds. That gives you more freedom. The student still must be supported, somehow. But for secondary school students, explorations with the parent(s) is probably necessary, but ask first, rather than suggest first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At university, I've had exactly this situation but there your third option can be a great one. Study CS if you must to keep the funds flowing but also study what you love (history, philosophy, ...). If you know about this student situation, through student conferencing, you can perhaps guide the student to use their (required by daddy/mommy) CS skills in furtherance of their personal goals through wisely chosen projects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More ammunition: you only get one life. You need to make it a good life, richly personally rewarding. At every step of your life you will face constraints of various kinds and you need to choose a path in light of those constraints. Some of the constraints are incredibly unfair (poverty, racism, sexism, ...) but the life you live is your own. Help your students see that and help them find their path; &lt;em&gt;their&lt;/em&gt; path. Maybe you can help the parent see that and move toward a more realistic view of the future and a more supportive relationship with your student. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nobody promised you teaching would be easy or straightforward. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More ammunition: Some students will &lt;em&gt;intentionally&lt;/em&gt; fail in a situation such as you describe. It is a real danger. It can lead, perhaps, to clinical depression. So, you may need to get someone at the school with the necessary skills to get into the conversation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another incident, which may shed light on your particular situation (or not). I once had two students come to me, together, for advice. They wanted to know whether they should study Computer Science or Information Systems. I started to talk about the differences between the two fields (what people do). They stopped me. What they wanted to know was in which field they would make more money. That was their only concern. They would have chosen one over the other for a few more dollars in (initial?) salary. Their situation was a bit special. They were fairly recent immigrants from a country in which they were part of a minority severely discriminated against - including economic discrimination. Remembering that, they felt a special need to focus on just money. My advice to them was the same -- make a good life for yourself. Do what you love if you have the opportunity. As a teacher, it is good to be aware of such things when you give advice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And on the flip side, you can start out in a flying economy and get a big hit later. I have a friend who is a superstar, Fellow of the ACM - their highest &quot;ranking&quot; of members, who had done a lot of great things. However, when Sun Microsystems collapsed, so did much of his career, though he's redirected his efforts and kept to his real goals. He was once considered &quot;one of the (three) crown jewels&quot; at Sun. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-01T16:33:07.713" LastActivityDate="2017-07-01T16:33:07.713" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1293" PostTypeId="2" ParentId="1290" CreationDate="2017-07-01T15:08:50.553" Score="6" Body="&lt;p&gt;In an ideal world, helping a student to find a passion in CS would be great. But for some people, a subject conflicts so much with their abilities and interests that it's not likely they'll ever &lt;em&gt;enjoy&lt;/em&gt; the subject with a real passion. And &lt;strong&gt;that's fine&lt;/strong&gt;. You can't force someone to like a subject—it's an exercise in futility—but, if you're willing to put the effort in and understand what the student is interested in, you could make your course more relevant to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a curriculum that's very rigid, you might not have much scope for changing your materials too much, but it would help to know exactly what your student likes or dislikes. For example, if your student finds the mathematical side of CS difficult, you might be able to change your teaching to use analogies and ideas from other subjects. Perhaps you could think of a program as a 'recipe', or a 'script', if that helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you need to  be mindful not to take analogies too far, or focus your teaching so much on one person that it becomes detrimental to others. In a large class, you might not really be able to change a lot, but if you have time, you could discuss multiple ways of thinking about a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words: &lt;strong&gt;try to teach &lt;em&gt;relevant&lt;/em&gt; content, and do the best you can for that student&lt;/strong&gt;. But if they have no intention of pursuing the subject, there is only so much you can do for them, and some of the topics in the curriculum might be irrelevant to them. And, with teaching, &lt;a href=&quot;https://youtu.be/7vsCAM17O-M?t=29&quot; rel=&quot;noreferrer&quot;&gt;the curriculum marches relentlessly on&lt;/a&gt;, whether everyone understands or not. If you're able to deliver more personalised teaching, you probably can make a bigger effect, but it might be infeasible.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-07-01T15:08:50.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1294" PostTypeId="2" ParentId="430" CreationDate="2017-07-01T15:14:00.200" Score="3" Body="&lt;p&gt;I suspect that there is something more to the situation, the student is unhappy about things beyond just your class. Talk with your superior, they might already be aware. Possibly talk with the parents, but they might not know what the cause of the issue is, or wish to deflect it onto you (if it has to do with home life).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Throughout my schooling, until I got to college, I was depressed, unmotivated, or even resisted schoolwork. My parents tried everything: getting angry and forceful with me, getting angry at the school, changing schools twice... There might not in fact be &lt;em&gt;anything&lt;/em&gt; that anyone can do to improve the situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case, it is just like the scene of two cats trying to maneuver around each other without causing a fight. Wait for better days.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-01T15:14:00.200" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1295" PostTypeId="2" ParentId="430" CreationDate="2017-07-01T16:19:03.173" Score="4" Body="&lt;p&gt;No one has yet mentioned the long term effects on the student. If the person wants to explore computing as a career they need people skills, not just technical skills. But that is a lesson your entire class needs, not just this one person. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Highly valued people in the computing industry spend most of their time and effort working with other people -- and not just in coding teams. Design, estimation, managing large code bases, etc. all require people skills. There are a few  people who are absolute horrors personally who are valued, but those are extremely rare and need unique skills. For everyone else, learn to communicate, to offer and to accept advice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a somewhat different scale, but perhaps related, I know a few people who are successful but also Extremely Introverted. But they have worked to overcome their tendency to withdraw and so their introversion isn't always obvious. Introversion is good if you draw power from your own thoughts and considerations, but it can be a handicap if you need to act outwardly in the world and haven't learned how. So, if that is the real issue here, deal with it as such. For the record, I am very introverted by nature. It cost me a lot early on until I learned how to deal with it. The scariest thing for me was to state my opinions. Perhaps you didn't notice that here :-).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the entire class, field trips to local tech industries can be helpful so that students (all of them) can see what really happens. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-01T16:19:03.173" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1296" PostTypeId="1" AcceptedAnswerId="1298" CreationDate="2017-07-01T16:28:45.760" Score="13" ViewCount="613" Body="&lt;p&gt;I'm sure we can agree that there are some parts of theoretical CS that are unlikely to change - topics such as computation theory (Turing machines, automata) will be useful and applicable for many years to come, [or at least until quantum computing becomes hugely pervasive]! I think a strong theoretical base is extremely important and I greatly enjoyed the modules I took at university which covered this sort of theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most courses do include a practical aspect, though. One of my frustrations as a student who started at university with experince in professional software engineering in industry, was that a lot of the more practical content was incredibly outdated, not in line with industry best practices or just downright irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a concrete example, I took a web development module in 2015 which focussed on PHP 4, taught us to write code riddled with XSS, CSRF and SQLi vulnerabilities and didn't place any emphasis on architecture design. Some parts of the course were useful (such as the primer on how HTTP works at a protocol level) but it was obvious the same slide deck had been reused year after year and I came away feeling like I'd wasted my time. Some of these details seem to be out of the lecturer's hands and determined by the department, but the end result is still the same. I do realise web is perhaps one of the worst areas for this, but it's equally applicable when e.g. introducing Java and not covering the &quot;new&quot; generics support, or the more functional features in Java 8. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can educators do to try and prevent this from becoming too big an issue? I think trying to keep up with each new shiny JavaScript framework that becomes momentarily popular is unrealistic and useful for neither student nor educator - but there must be some middle ground. Should these sort of modules be entirely theoretical to avoid this problem, or perhaps collaboration with industry could be sought out to explain how things really work in practice?&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2017-07-09T06:50:05.380" Title="How should educators ensure their curriculum remains relevant over time?" Tags="|curriculum-design|undergraduate|" AnswerCount="6" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1297" PostTypeId="2" ParentId="1290" CreationDate="2017-07-01T16:39:35.367" Score="14" Body="&lt;p&gt;On the first day of class, I ask students how Google search can work -- returning an answer to any query over billions of web pages in a fraction of a second. Usually someone mutters &quot;magic&quot;. I say, &quot;That's right. What else would you call it when putting together words and symbols enables you to control powerful entities?&quot; Computer programs, I argue, are spells, and robotics is transfiguration. The wizardry in Harry Potter isn't real, but computer science is. Whatever you want to do, computer programming will make you more powerful. (The good people at Code.org similarly call coding a superpower.) I challenge students to name a field of interest, and I tell them how computer science can be applied to it. Whatever your goals are, I say, being able to create computer programs will help you achieve them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within the bounds of the curriculum, try to come up with applications that interest the students, and help them keep their eyes on the prize. Stress that they're going from the majority who only knows how to use other people's programs to the minority that can create programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't say how well this would go over in a high school class, but it seems effective in workshops for high schoolers and for classes at the college level. Of course, as Aurora0001 pointed out, CS isn't for everyone, so there will be some students who don't respond well, but you should be able to capture the imaginations and respect of many students by making sure they understand they're not moving semicolons around, they're exerting god-like power. :-)&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="2" LastEditDate="2017-07-01T17:05:41.557" LastActivityDate="2017-07-01T17:05:41.557" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1298" PostTypeId="2" ParentId="1296" CreationDate="2017-07-01T16:55:59.137" Score="8" Body="&lt;p&gt;I see you are in the UK. I think the constraints are different in different places and at different levels. But most of the examples you give are of the ephemera of computing - current languages, frameworks. That may be a misplaced focus. There are other topics, more fundamental, that increase in value over time: encryption, quantum computing, Big Data, Massively Parallel computing, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to teach within some current framework, of course, but also to think about how you are preparing your students for taking a wider view. I used Java/Eclipse for a long time, but realize that it wasn't a &quot;forever&quot; solution. I don't think I really did enough preparing for the day when Eclipse won't be available (or desirable), however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one concrete thing you may be able to do, subject to constraints, is to have one &quot;Over the Horizon&quot; course, named that, perhaps, or &quot;Bleeding Edge Computing&quot; maybe. It covers the latest and greatest even if you know that the topics may not have the legs to last. A more boring name, but probably a good focus, is &quot;Current Trends in Computing.&quot; Students are warned in such a class that this may seem &quot;cool&quot; today, but &quot;cold&quot; tomorrow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second thing, not quite the same, is to rotate a series of courses on the rising but likely important things, as listed above, that you can't justify putting into the curriculum as a continuing course. Big Data one term, Quantum Computing the next, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second solution is much more work, of course, since the course development is harder and maybe won't be amortized over several years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third choice is just to let one Prof (in rotation) teach whatever he/she think is the most interesting thing they know and work on. &quot;Professor Williams' Current Research&quot; or something. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for yourself, go to a lot of conferences (constraints again). Visit the real world when/where possible to see what goes on in the trenches. See what is going on now. Experiment a bit as time permits. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-01T16:55:59.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1299" PostTypeId="1" CreationDate="2017-07-01T16:57:03.177" Score="9" ViewCount="1988" Body="&lt;p&gt;The word &lt;code&gt;function&lt;/code&gt; has different meanings in math and computer science. For example, &lt;code&gt;f(x) = rand(1)&lt;/code&gt; is a valid (pseudocoded) CS function, but it is not a mathematical function because it has multiple possible return values for a given argument. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When and how is it most effective to bring the students' attention to the contrast? In teaching physics, it is a general principle that when possible a student should experience a phenomenon before being given words to describe it. (E.g., have students feel a torque before defining &quot;torque&quot;.) (Arons, A. 1997. Teaching introductory Physics. New York, NY: Wiley). Presumably, there is a benefit to be obtained by introducing math functions, CS functions, and the contrast in a particular order and using a particular approach to active learning, but I am unaware of any published result to that effect. What ideas and data can people contribute to this question?&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="58" LastEditDate="2017-07-11T02:34:02.730" LastActivityDate="2019-02-26T23:29:44.283" Title="Teaching &quot;math function&quot; vs. &quot;CS function&quot;" Tags="|best-practice|mathematics|" AnswerCount="5" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="1300" PostTypeId="1" AcceptedAnswerId="1309" CreationDate="2017-07-01T17:06:12.917" Score="28" ViewCount="5853" Body="&lt;p&gt;Consider the following three uses of equality:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In mathematics, the statement $x = x^2$&lt;/li&gt;&#xA;&lt;li&gt;In Python, the statement &lt;code&gt;x = x**2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;In Python, the expression, &lt;code&gt;x == x**2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The math statement is a constraining assertion restricting x to the set $\{0, 1\}$; the Python assignment always evalutes the right side and assigns to the left side; the Python expression always returns True or False. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When and how should the differences be pointed out to students? Are there examples producing unexpected results that are especially effective in causing students to abandon the idea that these three meanings of equality are equivalent?&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-03T20:01:32.023" LastActivityDate="2017-08-25T18:38:50.597" Title="How do I teach &quot;math equality&quot; vs. &quot;CS assignment&quot; vs. &quot;CS equality logic operator&quot;?" Tags="|mathematics|variables|" AnswerCount="13" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="1301" PostTypeId="1" CreationDate="2017-07-01T17:18:15.130" Score="7" ViewCount="674" Body="&lt;p&gt;The concept of an integer data type is not equivalent to the math concept of the set of integers. For example, in many programming languages the expressions &lt;code&gt;3.&lt;/code&gt; and $2^{10^{10000}}$ are math integers but (for different reasons) are not an integer data type. This potentially creates confusion for students in the age range of 8-16 years old who may be learning both the math and CS concepts of integer at once. What are effective ways to have students experience the distinct concepts so they reinforce each other rather than create confusion? &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="919" LastEditDate="2017-07-01T22:15:08.647" LastActivityDate="2017-07-16T21:13:03.620" Title="Teaching &quot;CS integer&quot; vs. &quot;math integer&quot;" Tags="|secondary-education|mathematics|data-types|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1302" PostTypeId="1" CreationDate="2017-07-01T17:55:22.987" Score="6" ViewCount="188" Body="&lt;p&gt;Pair programming rather than solo programming is best practice in the CS classroom. Online IDEs like Cloud9 allow both members in the pair to work in a shared environment like google docs: working with independent keyboards and mice. What are effective practices for students working side-by-side to collaborate in such an environment?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've experimented in my classroom and have arrived at my own solution, but I think the question deserves crowd creativity and crowd evaluation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I've experimented with Cloud9 in both online and onsite instruction, with different results. This question is about students working onsite, side-by-side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Background:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extensive use of pair programming in the K-12 environment is best practice over solo programming. Pair programming increases persistence and engagement, and reduces frustration and boredom. See for example &lt;a href=&quot;http://www.tandfonline.com/doi/abs/10.1080/08993408.2011.579808&quot; rel=&quot;noreferrer&quot;&gt;Hanks et al. (2011) Pair programming in education: A literature review. &lt;em&gt;Computer Science Education&lt;/em&gt; &lt;strong&gt;21&lt;/strong&gt;:2.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Schools are increasingly using Chromebooks, which preclude a locally installed IDE. Computer science is being taught in an increasing number of sections on a school's master schedule, precluding instruction exclusively in a desktop computer lab environment. Effectively teaching programming using Chromebooks is important. &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-07-06T15:47:05.357" Title="How to adapt pair programming to a shared terminal environment like Cloud9?" Tags="|pair-programming|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1303" PostTypeId="2" ParentId="1300" CreationDate="2017-07-01T17:57:25.803" Score="6" Body="&lt;p&gt;All of the below is meant to be thoughts/analogies/illustrations to help explain the difference (meant to be said to students) but in reality, this is all dependent on the level of your students.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The expression &lt;code&gt;x == x**2&lt;/code&gt; in python is a &quot;test&quot; - is it true, or is it not? Much like when defining a set, you have $\{x|x&amp;gt;2\}$ (i.e., x is only included &lt;em&gt;iff&lt;/em&gt; $x&amp;gt;2$) - a test to see if something should be included in the set, whereas in python, it is often used to check if something should be done. In this line of reasoning, you could write a program to define a set, expanding on what exactly the mathematical notation means:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if x &amp;gt; 2:&#xA;    list.append(x)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In other words, &lt;code&gt;if x &amp;gt; 2 is True&lt;/code&gt; then &lt;code&gt;do list.append(x)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, the expression &lt;code&gt;x = 5&lt;/code&gt; in python is an &quot;assignment&quot; - this is equal to this, no need for argument. *This is much like in math assigning $x = 5$ or something of the sort. We can later use &lt;code&gt;x&lt;/code&gt; to represent 5, much like in an equation $x+5$, given the above definition, we know that the result is $10$, because we are using $x$ to represent $5$. A common analogy is that of the buckets - a bucket has &lt;code&gt;x&lt;/code&gt; painted on it and whatever is in the bucket is what &lt;code&gt;x&lt;/code&gt; represents. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, things get more complicated from there - what if &lt;code&gt;x = x**2&lt;/code&gt;? Then, you take what &lt;code&gt;x&lt;/code&gt; was previously defined as, square it, and then &lt;em&gt;redefine&lt;/em&gt; &lt;code&gt;x&lt;/code&gt; as equal to the new thing. For example, let's &quot;run&quot; the following program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = 5&#xA;print(x)&#xA;x = x**2&#xA;print(x)&#xA;x = x**2&#xA;print(x)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What will we see? Well, it is quite obvious that the first thing printed is &quot;5&quot;; I doubt there will be much confusion there. Now, the next line is squaring the previous &lt;code&gt;x&lt;/code&gt;, i.e., squaring 5 ($5^2$) and then setting that equal to &lt;code&gt;x&lt;/code&gt;, so now we basically have the line of code &lt;code&gt;x = 5**2&lt;/code&gt; - which produces 25. All very well and good, now we do the same thing - so we basically have &lt;code&gt;x = 25**2&lt;/code&gt; or 625. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference between those two and what they mean is a very useful and important distinction, but to be honest I think it's not completely unintuitive. Once explained the former is a test and the latter a definition, I think students will catch on fairly quickly with a reminder here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now we come to your last (well, first) type of equality. $x = x^2$ is a statement of definition, but it can also be manipulated. In python &lt;code&gt;x = x**2&lt;/code&gt; is a definition, and it accesses the &lt;em&gt;previous definition&lt;/em&gt; of &lt;code&gt;x&lt;/code&gt; to &quot;solve&quot; it, like we did above. However, to solve $x = x^2$, we move terms around the equals sign - this is a quadratic, so we get $0 = x^2 - x$ and we can factor out the $x$ so $0 = x(x - 1)$ so using the zero product property one gets $x=0$ or $x=1$. We can solve equations like this in Python, but that's not automatically done when you define &lt;code&gt;x = x**2&lt;/code&gt;, instead it uses previous definitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope that conveys what you are wanting, but I really don't think you need to bring up your first definition of equality - the rules of that have been drummed into them from math class, and the new rules of equality appear distinctly enough that I doubt they will be confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, all of the above is with a nice, good language like Python. &lt;em&gt;Some&lt;/em&gt; other languages have &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, and &lt;code&gt;===&lt;/code&gt;. I'm not qualified to get into that, but this might not be valid for such craziness.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As for &lt;em&gt;when&lt;/em&gt; this all should be pointed out - the uses for these concepts are so fundamental, this really is almost day 1 (maybe day 2) of class - install/open the IDE/whatever, learn how to print, then start with variables. This is one of the most important things to learn in a language like python - how to use variables and manipulate them to your advantage.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-02T18:30:46.907" LastActivityDate="2017-07-02T18:30:46.907" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1304" PostTypeId="2" ParentId="1301" CreationDate="2017-07-01T18:06:44.527" Score="7" Body="&lt;p&gt;This might be an interesting way to do it, but here goes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give your students a blank sheet of paper. Have them &lt;em&gt;write out&lt;/em&gt; &quot;3&quot;. Then have them &lt;em&gt;write out&lt;/em&gt; $2^{10^{1000}}$. Most will probably stare at you blankly. A few clever/sassy ones will just write out the exponential notation. Tell them that just as they write out numbers a little differently depending on size, the computer stores numbers a little differently depending on &lt;em&gt;type&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a number has a decimal point, it treats it differently from a number like 1 or 2, and it treats &lt;em&gt;that&lt;/em&gt; differently from a really large number and it treats all of these differently from something like a string. This is the whole reason that you have to convert between types when you ask for a number as &lt;code&gt;input()&lt;/code&gt; in python and then get a &lt;code&gt;TypeError&lt;/code&gt; when you try to add it - instead you must add &lt;code&gt;float(input())&lt;/code&gt; or &lt;code&gt;int(input())&lt;/code&gt;. It's the computer's way of making life easier for itself, just like we make lives easier for ourselves using exponential notation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, by now hopefully they've realized that the world of math doesn't directly translate to some of its uses. Math is a very abstract thing, though it describes many things remarkably well. Pure math is very different from most math they've seen, and I think they understand the difference, for the same reason they understand the difference between &lt;code&gt;x = x**2&lt;/code&gt; and $x = x^2$. It's a different context, so it has a different meaning.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T22:17:24.690" LastActivityDate="2017-07-01T22:17:24.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1305" PostTypeId="2" ParentId="1299" CreationDate="2017-07-01T18:21:53.200" Score="3" Body="&lt;p&gt;In mathematics a function is a constrained relation between two sets. You can illustrate that in a number of ways. The constraint implies consistence of operation and uniqueness of result. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you discuss relations (in math) as well as functions it may be easier to get beginning students to grok it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In most computing languages, a function is an operation that produces a value (and possibly side effects - horror). There is nothing in the definition of a Java function about constraint, not even that successive invocations with the same input produce the same values. A java function is a machine. Drop in 0 or more inputs, turn the crank, get some outputs. You can illustrate that by drawing a machine with an input hopper, and output spigot and a crank. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students who know math have a lot of problems early on with things that look like math but are not. Other questions in the &quot;hopper&quot; currently explore other aspects (equality, variables)&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-01T18:21:53.200" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1306" PostTypeId="2" ParentId="17" CreationDate="2017-07-01T18:31:03.850" Score="8" Body="&lt;p&gt;Although there already is many great answers, one analog I found helpful was the dictionary lookup analogy (this is different than the dictionary binary search analogy). It goes like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets say you want to know what the word &quot;long&quot; means. You look up the word in dictionary.com find that it means &quot;having considerable linear extent in space.&quot; Lets say for the sake of example that you do not know what &quot;linear&quot; and &quot;extent&quot; means. Then you would look up those words definitions. If theres any word in those definitions that you don't know, you would look that up in the dictionary and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In code, it'll look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static void lookupInDictionary(String word){&#xA;   String definition = getDefinition(word);&#xA;   if(understandsAllWordsIn(definition)){&#xA;       return;&#xA;   } else {&#xA;       for(String word: wordsNotUnderstood(definition)){&#xA;           lookupInDictionary(word);&#xA;       }&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can also use this to teach infinite recursion. Lets say this was the dictionary:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&#xA;Hello: Hi&#xA;Hi: Hello&#xA;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If one tried to call &lt;code&gt;lookupInDictionary(&quot;Hello&quot;)&lt;/code&gt; or &lt;code&gt;lookupInDictionary(&quot;Hi&quot;)&lt;/code&gt;, it would recurse infinitely.&lt;/p&gt;&#xA;" OwnerUserId="1609" LastEditorUserId="150" LastEditDate="2017-07-01T18:48:08.057" LastActivityDate="2017-07-01T18:48:08.057" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1307" PostTypeId="2" ParentId="1290" CreationDate="2017-07-01T18:38:47.910" Score="4" Body="&lt;p&gt;I teach at a HS with majors.  Students apply into their major as 8th graders, and may not switch once admitted and matriculated. Many of the kids have never programmed at all when they apply, so we run into this problem regularly.  The teachers in my department are all fairly popular, so we don't have a huge number of kids who dislike computer science, but ever year there are a handful who discover, right near the beginning, that CS is not their favorite activity.  Nevertheless, they are &lt;em&gt;stuck with us&lt;/em&gt; for the duration of a 4-year core curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a system, this is terribly motivating for both teacher and student; losing a kid during their freshman year will make the next three years impossible.  Thus, we expend a great deal of effort making sure that the lessons themselves are as crystal clear as they can be.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not dial back the standards for kids in a required class.  The great strength of a required class is that you can hold students to high standards.  However, you must &lt;em&gt;always&lt;/em&gt; create a path by which those standards can be met.  For us, that can involve once (or even twice) weekly meetings with struggling students, conferences with parents, additional worksheets or small assignments, heart-to-heart discussions with students, or pairing with a tutor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I make multiple versions of assessments to allow students who did not master the material a second chance.  (This comes not with a subtraction to the final grade, but rather with a lowered maximum possible grade on the assessment.)  The test-retest model, especially early in the term, is another tool I have to make sure that I don't lose a kid on the early, prerequisite concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes kids who are really struggling come in expecting to fail and wishing to evade or let it go.  You always want to make sure that they're on the same team as you are, so to some degree, I treat these meetings as recruitment meetings.  When working with the struggling students, always keep the emphasis om empathy, love and on what can be done.  If you give them extra assignments, explain how the assignment will help them, and why you feel it necessary that they go through these extra steps. You can assure them that it is extra work for you, too, and that you only give them this work because you want to help them succeed.  And, most of the time, at least in my experience, they will.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-01T18:38:47.910" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1308" PostTypeId="2" ParentId="1301" CreationDate="2017-07-01T18:48:02.847" Score="3" Body="&lt;p&gt;If your students are mathematically inclined, you could simply think of the variable type as a constraint on the value contained inside of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;int&lt;/code&gt; represents $x \in \mathbb{Z}$ (and depending on your type's size, $-2^n \leq x &amp;lt; 2^n$ for a signed integer and $0 \leq x &amp;lt; 2^n$ for an unsigned integer)&lt;/li&gt;&#xA;&lt;li&gt;The set of values that may be held by a &lt;code&gt;float&lt;/code&gt; is a much larger set than $\mathbb{Z}$, but &lt;strong&gt;$\mathbb{Z}$ is a subset of the float set&lt;/strong&gt;, which is why an integer can be stored in a float, but not vice versa.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In other words, if $\mathbb{F}$ is the set of values representable by a floating point number, $\mathbb{Z} \subseteq \mathbb{F}$ (the integers are a subset of the values represented by floats). Or, if you want an image to show:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Venn_A_subset_B.svg/155px-Venn_A_subset_B.svg.png&quot; alt=&quot;Image of subset&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Image by Booyabazooka of &lt;a href=&quot;https://en.wikipedia.org/wiki/Subset#/media/File:Venn_A_subset_B.svg&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt; (public domain)&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether this explanation is useful would depend on your students' proficiency with mathematics and set theory. For younger years, you could simply skip the subset discussion and show a Venn diagram to represent the idea that a float &lt;strong&gt;can&lt;/strong&gt; be an integer, but an integer type &lt;strong&gt;can only represent an integer&lt;/strong&gt;—&lt;em&gt;not all floats are whole numbers, but all whole numbers can be floats&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue of large integers not being represented by integers in some languages is more difficult to explain without stating the way that integers are stored. In many curricula, binary representation of integers is covered quite early, and if that's the case, explaining why &lt;code&gt;int&lt;/code&gt; types can't hold extremely long integers is straightforward.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-07-01T18:48:02.847" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1309" PostTypeId="2" ParentId="1300" CreationDate="2017-07-01T18:55:27.690" Score="21" Body="&lt;p&gt;I actually cover this idea in my very first lesson in AP Computer Science, because I have found that students find the different uses of &lt;code&gt;=&lt;/code&gt; to be confusing, indeed.  I run a unit based on Tom Roger's unit, &lt;a href=&quot;http://www.intuitor.com/student/Q1_Comp_Sci_Objectives.php&quot; rel=&quot;noreferrer&quot;&gt;Java Ain't Algebra&lt;/a&gt;, and I also talk about it a little &lt;a href=&quot;https://cseducators.stackexchange.com/a/345/27&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do this right at the beginning because, if mutability is not made explicit, students do &lt;em&gt;not&lt;/em&gt; seem to exhibit a total loss of comprehension or ability right away, but rather, very slowly slip further and further behind.  They will never be able to articulate what they find confusing about the material, because every piece seems to make sense when looked at in isolation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The confusion itself stems from simply not realizing that there &lt;em&gt;are&lt;/em&gt; articulably different uses of equality in the first place.  In my experience, simply pointing it out is actually enough to stem the tide of the confusion.  (You gave a perfectly wonderful explanation in the question itself.)  Then, two or three more times over the first few weeks of class, I will gently remind them that &lt;em&gt;this equals&lt;/em&gt; (some code statement we are examining) is a &lt;em&gt;mutating&lt;/em&gt; equals, not the &lt;em&gt;constraining&lt;/em&gt; equals of mathematics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have not had problems from students in this regard since I began this practice.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-01T18:55:27.690" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1310" PostTypeId="2" ParentId="1300" CreationDate="2017-07-01T18:56:24.727" Score="8" Body="&lt;p&gt;I'm going to explore an orthogonal concept that sheds light on the question at hand: What is a variable? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In mathematics a variable is a representative for some value, a name. It may be a name for something we know or don't (abstraction comes in here). In an equation, the variable is sometimes called an &quot;unknown&quot;. But that isn't precisely true. An equation is a constraint on which values are appropriate for reference. That is because our typical use of equations is to find solutions (i.e. the set of values for which the constraint is true). The value is only &quot;unknown&quot; if we haven't (or can't) solve the equation. But, in math, a variable is misnamed in that (again, normally - there can be exceptions) the value doesn't &quot;vary&quot;. So the math terminology is an historic accident to some extent, not absolute &quot;truth.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In computing, on the other hand, a variable refers to a value (also), but the value referred to CAN change over time (or with context). So in computing a variable varies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In math a variable refers to something (or a set of somethings) that doesn't change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In computing a variable can refer to different things as a computation proceeds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in maths = represents a relationship. But in Java = (Pascal :=, somewhere else &amp;lt;-, a favorite of mine to see, but harder to type on most keyboards) represents an action: changing a reference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in java == is an imperfect representation of maths =. It is a relationship (has value true or false). (imperfect since, while 1 == 0.2 + 0.2 + 0.2 + 0.2 + 0.2 is true, 2 == 0.2 + 0.2 + 0.2 + 0.2 + 0.2 + 0.2 + 0.2 + 0.2 + 0.2 + 0.2 is false)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the confusion of some beginning students who &quot;know&quot; some math and are learning computing is that they don't understand the math well enough. So giving them a solid understanding of what $x^2 - 2x + 1 = 0$ means to a mathematician may help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that Ritchie and Thompson just hated Pascal's := (too many keystrokes) and so wanted to simplify it when they created C. But, in their defense, they may have been programming on a card punch where only 80 characters were permitted per card and mistakes were costly (repunch the entire card). Typing one extra character slowed down the programmer too much (unless you were lucky enough to employ a keypunch operator). The issue of thinking speed v typing speed is lessened now, but it doesn't go away. However, it is still true that typing is not what makes programming hard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy (in java) to illustrate the difference between = and ==. Suppose x and y are boolean variables. Then if(x==y), and if(x=y) are both legal, but very different in effect (unless they are not, of course). Fortunately some modern development environments issue a warning when you try something legal but probably incorrect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for the record, there are situations in java where you do need to make an assignment in the &quot;test&quot; of an if or while; doing I/O, for example, where certain conventions require it. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String line = null; &#xA;while ((line = reader.readLine()) != null)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-02T08:10:44.333" LastActivityDate="2017-07-02T08:10:44.333" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="1311" PostTypeId="2" ParentId="1300" CreationDate="2017-07-01T19:28:36.920" Score="16" Body="&lt;p&gt;When I have taught this, I have said that &lt;code&gt;=&lt;/code&gt; in programming is just a different thing to &lt;code&gt;=&lt;/code&gt; in maths. It's unfortunate that someone (I say &quot;some idiot&quot;, you might not want to use such language) decided to re-use &lt;code&gt;=&lt;/code&gt; for assignment in programming, but now we are stuck with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming, while it looks like maths, is more like a series of instructions. &lt;code&gt;x=5&lt;/code&gt; means the action &quot;Give the variable &lt;code&gt;x&lt;/code&gt; the value &lt;code&gt;5&lt;/code&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;==&lt;/code&gt; is more like maths, in that it &lt;code&gt;x==5&lt;/code&gt; checks if &lt;code&gt;x&lt;/code&gt; is &lt;code&gt;5&lt;/code&gt;. However, it is still an instruction, it means &quot;Tell me if x equals 5&quot;, while usually in maths &lt;code&gt;x=5&lt;/code&gt; asserts that &lt;code&gt;x&lt;/code&gt; is equal &lt;code&gt;5&lt;/code&gt;, rather than checks if it is true.&lt;/p&gt;&#xA;" OwnerUserId="1611" LastActivityDate="2017-07-01T19:28:36.920" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="1312" PostTypeId="2" ParentId="1296" CreationDate="2017-07-01T19:32:44.357" Score="3" Body="&lt;p&gt;Basically, you can't, unless you have some teaching staff who are actively involved in industry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anybody who has spent say 10 years working their way through the academic system from undergraduate to lecturer is at least &lt;strong&gt;20&lt;/strong&gt; years out of date, and probably more like 30 years: 10 for their time isolated from the &quot;real world&quot; in academia, plus another 10 or 20 because what they were taught as an undergrad was out of date when they were taught it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This may also explain why so much terrible code, and so many terrible textbooks, are written in academia - but that's a different issue!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect this problem is basically incurable. As a working programmer, I have lost count of the number of languages I've learned (and mostly forgotten again!) over the decades, but it's about one every 18 months on average. I don't see any way that a teaching organization could handle that pace of continuous change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another significant difference between industry and academia is that the people constantly learning &quot;new stuff&quot; in industry aren't learning it because they want to say up to date with the latest research. They are learning it because &lt;em&gt;they need to use it&lt;/em&gt;. For all I know, the &lt;em&gt;next&lt;/em&gt; language I need to learn might be COBOL, to understand some legacy system! In the past I've had to learn enough ALGOL 68 to understand some algorithms in an old published paper, at least 30 years after the language was effectively dead and buried! &lt;/p&gt;&#xA;" OwnerUserId="1352" LastEditorUserId="1352" LastEditDate="2017-07-01T19:44:29.363" LastActivityDate="2017-07-01T19:44:29.363" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1313" PostTypeId="2" ParentId="1296" CreationDate="2017-07-01T19:47:01.493" Score="9" Body="&lt;p&gt;As a wise man once said, &lt;em&gt;&quot;We are preparing students to solve problems that don't exist / using technologies that haven't been invented.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with alephzero in the sense that you can't avoid this issue.  Every sign is that technologies will keep changing rapidly, at least for the foreseeable future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is why we must always keep our instruction oriented towards concepts, not languages.  The syntaxes for arrays and lists will differ in different languages, but the trade-offs between the two remain the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One easy way to keep the emphasis on the conceptual is to utilize more than one language.  Over the first 3 years of our major, all students work in Python, Java, C, 6502 Assembly, and Scheme.  Additional languages are used for electives, depending on the nature of the course content.  By providing a more varied exposure, students can easily come to differentiate the underlying concepts from the syntaxes of the languages they are learning.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-01T19:47:01.493" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1314" PostTypeId="2" ParentId="628" CreationDate="2017-07-01T19:49:28.910" Score="1" Body="&lt;p&gt;One boring answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One big advantage of making students sit in a room in silence and write on a piece of paper is the best way of know of to ensure that the student has learnt the material, and is not paying someone to do all their work for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course this isn't a perfect system, but it is better than most things we have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question of why do those exams on paper instead of on a computer is often for boring reasons -- it is still hard to lock down a computer sufficiently to ensure no cheating, and also ensure it won't crash mid-exam. Paper has no such issues.&lt;/p&gt;&#xA;" OwnerUserId="1611" LastActivityDate="2017-07-01T19:49:28.910" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1315" PostTypeId="2" ParentId="1092" CreationDate="2017-07-01T19:55:50.060" Score="2" Body="&lt;p&gt;I think you should release test cases which test all of the functionality you want, but have private tests which test different different but similar inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This ensures students have not just poked their code until exactly the tests have passed and then stopped. However, I find that when students are not given a test for functionality in advance they will often fail because they interpreted the spec differently -- it is in my experience extremely hard to pin down every corner in a specification, while saying to students &quot;if in doubt, pass the tests&quot; often helps clear up many corner cases.&lt;/p&gt;&#xA;" OwnerUserId="1611" LastActivityDate="2017-07-01T19:55:50.060" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1316" PostTypeId="2" ParentId="628" CreationDate="2017-07-01T20:24:23.900" Score="1" Body="&lt;p&gt;This thread is so long that I'm not sure that I picked up every point made, but I want to add an orthogonal thought that I missed if it is present. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any &lt;em&gt;timed&lt;/em&gt; exam, whatever the technology, old or new, will advantage some students and disadvantage others. Time itself can be the mind killer. I don't have a real answer for how to overcome it, other than to be constantly aware of it, and compromise when needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students are not like you. They are nothing like you. They are very little like one another, actually, with different learning modalities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, toward the end of my career I deemphasized formal exams (even finals when possible) in favor of papers and projects. Yes, I know that there are dangers with that as well, especially plagiarism. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-01T20:24:23.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1317" PostTypeId="2" ParentId="1300" CreationDate="2017-07-01T21:56:56.687" Score="7" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;When and how should the differences be pointed out to students?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When: As soon as you introduce one of those operators...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the &quot;how&quot; - I'd try to not beat around the bush, so to speak, but to point out straight away that only because we use the same symbol, they still have &lt;em&gt;completely&lt;/em&gt; different meanings.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there examples producing unexpected results that are especially effective in causing students to abandon the idea that these three meanings of equality are equivalent?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd say it is important to be very clear about the fact that these are &lt;em&gt;not&lt;/em&gt; &quot;three equalities&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;=&lt;/code&gt; in these three statements are completely different (e.g.: mathematical constraint &amp;lt;=&gt; assignment operation &amp;lt;=&gt; equality expression) and have no particular relationship with each other except for using the same symbol and some vague, indirect and maybe confusing similarities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is a great time to introduce related concepts:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Operations and expressions are quite different in languages, especially imperative ones. Python is one of the few languages I never touched, but this would be very clear and easy to show in Java, C, Pascal (where expressions and operations are very much separated). A different imperative example would be Ruby, where almost everything is an expression, even &quot;if ... then ... else&quot;. Or, in the extreme, you have LISP, where only very, very few things indeed exist which are not expressions. Obviously, you'd have to take whatever languages your pupils know, for that...&lt;/li&gt;&#xA;&lt;li&gt;There is no particular reason to assume that any given symbol used in a programming language needs to have any specific semantics, nor, that every semantic has the same symbol in every language. The designers of the language can more or less do whatever they want (for example &lt;code&gt;.&lt;/code&gt; vs. &lt;code&gt;-&amp;gt;&lt;/code&gt; for method calls, in different languages, or check out the &lt;code&gt;===&lt;/code&gt; operator in Ruby, or &lt;code&gt;=~&lt;/code&gt; in Perl, etc.).&lt;/li&gt;&#xA;&lt;li&gt;Depending on the knowledge of your students, you could add even more uses of the &lt;code&gt;=&lt;/code&gt;, e.g. in modern functional languages like Haskell (definition, pattern matching), or in something like Prolog (where equality is complicated on a whole new level). But I guess that's a bit too much if they're concerned with the basics, still. Maybe an addendum for the over-achievers. ;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2017-07-02T10:16:25.860" LastActivityDate="2017-07-02T10:16:25.860" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1318" PostTypeId="5" CreationDate="2017-07-01T22:19:58.990" Score="0" Body="&lt;p&gt;Computer Science touches on Mathematics in many ways and grew out of mathematical concerns. While CS has now gone beyond math in a number of areas there are some aspects that students do well to know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions relating to teaching topics at the conjunction of Math and CS and for questions related to the usage of math within CS. This can include things like operator precedence at the simple end and computational complexity at the more theoretical end of the spectrum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, importantly, that this site is dedicated to CS Education so questions should relate closely to the teaching of topics, not the theoretical aspects. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-06T00:05:48.463" LastActivityDate="2017-09-06T00:05:48.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1319" PostTypeId="4" CreationDate="2017-07-01T22:19:58.990" Score="0" Body="Use this tag for questions about the teaching of mathematics as it applies to computer science, or mathematics concepts in the context of computer science. DO NOT use for questions about pure mathematics or deriving equations or such matters; those questions belong on Mathematics.SE (or graduate-level questions on MathOverflow). Instead, " OwnerUserId="919" LastEditorUserId="1293" LastEditDate="2017-09-06T00:05:48.463" LastActivityDate="2017-09-06T00:05:48.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1320" PostTypeId="5" CreationDate="2017-07-01T22:21:38.680" Score="0" Body="&lt;p&gt;The term &quot;variable&quot; has many meanings. In particular the meaning in mathematics is distinct from that in computer science. In mathematics, variables are also called &quot;unknowns&quot; and are typically used to define functions or to specify values through equations. In computer science, however, the term generally means an association between a name and a value where the value associated may vary over time. Often the term refers to a named memory location, but there are other consistent notions as well. In math, variables don't actually vary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions relating to teaching the CS concept of variable including representation. The tag is also suitable for questions related to the different notions of &quot;variable&quot; in different languages. For example, in Scheme, the notion is closer to that of mathematics than is the case with C.&lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-06T00:14:05.420" LastActivityDate="2017-09-06T00:14:05.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1321" PostTypeId="4" CreationDate="2017-07-01T22:21:38.680" Score="0" Body="Please use this tag in the context the teaching of computer science, where a variable may be thought of as a storage location paired with an identifier (a name) which holds a value that can be retrieved by referencing the name. Do not use in the context of mathematics, where a variable is an unknown to be solved for." OwnerUserId="919" LastEditorUserId="1293" LastEditDate="2017-09-06T00:14:05.420" LastActivityDate="2017-09-06T00:14:05.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1322" PostTypeId="5" CreationDate="2017-07-01T22:25:45.337" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-01T22:25:45.337" LastActivityDate="2017-07-01T22:25:45.337" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1323" PostTypeId="4" CreationDate="2017-07-01T22:25:45.337" Score="0" Body="Use this tag for questions about computer science teaching in the context of courses given to workers in the workplace or in a workplace-related setting. Do not use for industry training that isn't about computer science or for teaching in a purely educational setting. DO NOT use in the context of preparing students for industry; this is training for people already in industry." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T22:40:21.387" LastActivityDate="2017-07-01T22:40:21.387" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1324" PostTypeId="5" CreationDate="2017-07-01T22:27:16.347" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-01T22:27:16.347" LastActivityDate="2017-07-01T22:27:16.347" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1325" PostTypeId="4" CreationDate="2017-07-01T22:27:16.347" Score="0" Body="A data type is a classification which tells the computer how the program intends to use the data. Use for questions about instruction that involves type (boolean, string, integer, etc). " OwnerUserId="919" LastEditorUserId="27" LastEditDate="2017-07-01T22:51:29.643" LastActivityDate="2017-07-01T22:51:29.643" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1326" PostTypeId="2" ParentId="1299" CreationDate="2017-07-01T22:38:02.513" Score="2" Body="&lt;p&gt;A function in mathematics is a &quot;mapping&quot; between one set and another set (in the non-strict definition, I think it suffices for this discussion). For example, a function $f: X \rightarrow Y$ where $X = \{a, b\}$ and $Y = \{1, 2\}$ could very well just be that $a = 1$ and $b = 2$. The key thing is you take one value $x\in X$ and you get &lt;em&gt;one&lt;/em&gt; value $y\in Y$ (there are other constraints, but I have no wish to double check them or go into an in-depth mathematical discussion here). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A function in computer science (at least the ones I'm used to, in for example Python) are just a set of commands that can take some inputs, produce some outputs, and do some things along the way. For example, the Python equivalent of $f$ above would be &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def someFunction(x):&#xA;    if x == 'a':&#xA;        return 1&#xA;    elif x == 'b':&#xA;        return 2&#xA;    else:&#xA;        return 'Stop messing with this pseudocode example, will ya?'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But another function could be &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def anotherFunction(x, y, z):&#xA;    localVar = x+y&#xA;    list = []&#xA;    list.append(localVar)&#xA;    print(&quot;this function does all the things&quot;)&#xA;    return sum(list) + z&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The above, while a pretty useless function (I'm terrible at thinking up functions with no purpose =P), does a lot more things than a function in math does. It does some things on the side, returns some stuff, takes multiple inputs and outputs, and so on. It's a complicated beast. Heck, you can even write a function like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def yetAnotherFunction():&#xA;    print('yay')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That doesn't take any inputs or return anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess, what I'm saying is - I think the two are so different, I'm not really sure there's a ton to be gained by exploring the contrast. A function in computer science is a module of code that can be called, perhaps with inputs, and does some stuff, maybe returning something. A function in math is a very strictly defined thing: you put something in, and you get only one thing out.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-01T22:38:02.513" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1327" PostTypeId="1" AcceptedAnswerId="1334" CreationDate="2017-07-01T22:42:22.077" Score="6" ViewCount="464" Body="&lt;p&gt;Under what circumstances is it ethical for teachers to teach the existence of a tool such as &lt;a href=&quot;https://mxtoolbox.com/SuperTool.aspx?action=scan%3astackoverflow.com&amp;amp;run=toolpage#&quot; rel=&quot;noreferrer&quot;&gt;MXtoolbox&lt;/a&gt;? Under what circumstances is it legal and ethical to use a superficial scan with protocol-adhering requests to scan a target that is not your own?&lt;/p&gt;&#xA;&lt;p&gt;Portscanning a school district's web or mail server is likely to be regarded as hostile under any circumstances without working with the school's IT department. Students are likely to do so if they know about such a tool, even if warned about the consequences.&lt;/p&gt;&#xA;&lt;h3&gt;Background:&lt;/h3&gt;&#xA;&lt;p&gt;The Computer Fraud and Abuse Act (CFAA) makes it a felony to access computer resources that are not your own without written permission from the owner if such access causes $5000 damage or more. The CFAA identifies as damages the cost to investigate any potentially unauthorized use and harden the resource against such future access.&lt;/p&gt;&#xA;&lt;p&gt;No one has ever been found guilty under the CFAA for portscanning, but only one judge has ever ruled on the matter and it is considered ambiguous under the law if it involves thousands of ports across thousands of computers, especially if the scan uses requests that do not conform to the expectations of the protocol at each corresponding port.&lt;/p&gt;&#xA;&lt;p&gt;Ports and protocols are important concepts early in a student's learning. Tools like MXtoolbox perform non-damaging scans and send a dozen or so requests, one of which is identical to directing a web browser to the target.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-01T23:42:12.340" Title="Classroom use of a limited port scan in the wild?" Tags="|security|ethics|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1328" PostTypeId="1" CreationDate="2017-07-01T22:50:10.417" Score="7" ViewCount="230" Body="&lt;p&gt;Without guidance, students will sometimes spend a large amount of time on a computer science assignment in a portion of the assignment that does not engage CS skills and knowledge. An example is a student who spends a lot of time creating costumes using the drawing tools in Scratch. The problem can include code, however, such as a student who has established expertise in simple conditionals but continues to build out an adventure game using repeated application of the same pattern without gaining any conceptual ground.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What practices do teachers use to successfully retain the student engagement driving a student to exert ongoing effort but redirect their effort to realize greater gains in learning skills and knowledge intended by the teacher?&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-07-02T13:43:40.623" Title="How to communicate expectations around &quot;rabbit holes&quot;?" Tags="|classroom-management|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1329" PostTypeId="2" ParentId="1328" CreationDate="2017-07-01T22:58:38.410" Score="1" Body="&lt;p&gt;Well, in terms of your second example - inefficient code, because it's &quot;easier&quot; - try doing a code golf style game. Whoever gets the shortest code on an assignment, project, lab, or whatever goes on a leaderboard, for extra points. This may help improve coding knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the other problem - well, if it's on the student's time they are doing this, then it's theirs to spend. Perhaps show them how they can iterate - starting by creating a quick stick figure for a character and then improving it once the key stuff - the code - is done. Make sure you also have clear expectations - it needs to be neat, but not a work of art.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if they are &quot;going down a rabbit hole&quot; by adding extra features to a project in the code, I would encourage that, again perhaps on a leaderboard of some sort (for &quot;most well-done&quot; project, or something like that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in summary - it depends on the rabbit hole. Make sure there are clear expectations and challenge them to push themselves with leaderboards/competition/extra credit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: As Buffy points out in the comments, there is too much of a good thing. In industry, there is no need for &quot;extra features&quot; - you do what the client wants, no more, no less. And code golfing taken too far can lead to terrible pieces of code - of course as the teacher, one would have to accept only &quot;golfed&quot; solutions with good variable names, etc.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T23:25:32.027" LastActivityDate="2017-07-01T23:25:32.027" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1330" PostTypeId="2" ParentId="1327" CreationDate="2017-07-01T23:22:12.167" Score="4" Body="&lt;p&gt;It's certainly ethical to teach the &lt;em&gt;existence&lt;/em&gt; of such tools. It's only unethical if the teacher neglects to teach the legality of these tools along with their existence, or if the teacher advises students to use the tool in an unethical way. It's rare that a tool is not ethical, it's more common that a use of the tool is not ethical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's ethical because the students could also find it on their own and get in legal trouble, or they could here it from you and at least know the risks in advance.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-07-01T23:22:12.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1331" PostTypeId="1" AcceptedAnswerId="1341" CreationDate="2017-07-01T23:27:13.520" Score="14" ViewCount="6556" Body="&lt;p&gt;What would be a good way to describe ports?  I learned about it using this analogy, but it seems pretty inadequate to me:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;IP addresses are like street addresses of apartment buildings, and ports are like the apartments therein.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IP addresses are not segmented as a street address is, and second, apartments don't seem at all analogous to ports in terms of behavior.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-07-02T13:06:52.913" LastActivityDate="2017-07-06T23:58:16.833" Title="What would be a good analogy for IP addresses and ports?" Tags="|teaching-analogy|networks|" AnswerCount="8" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1332" PostTypeId="2" ParentId="1331" CreationDate="2017-07-01T23:34:44.787" Score="2" Body="&lt;p&gt;I'd put a slight tweak on your analogy and go digital: email.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In email, your email address is your IP address. It comes in multiple parts, similar to IP blocks. There are many addresses under one domain, there are many domains under 1 TLD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a message is sent to an email address, it gets sent something pretended to the title, for example &quot;Re&quot; and &quot;Fwd&quot;. That's similar to the port. They're all going to the same place, but it indicates something about the email that the computer can use to help process it.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-07-01T23:34:44.787" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1333" PostTypeId="2" ParentId="1327" CreationDate="2017-07-01T23:36:09.433" Score="3" Body="&lt;p&gt;Teaching about the existence of such tools is totally ethical.  We need people who understand computer security, period.  Mentioning the law is also almost self-apparently necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my district, I am lucky, because I can get folks from the district IT staff to run the port scanner in front of my hacking class and discuss the results themselves.  No one in my prior district would have allowed such an activity (or, for that matter, a hacking class in the first place).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In situations where IT would not be as understanding, I would recommend discussing the tool, discussing the ramifications, and going to YouTube to find an example of someone using your tool of choice.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-01T23:36:09.433" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1334" PostTypeId="2" ParentId="1327" CreationDate="2017-07-01T23:36:56.653" Score="4" Body="&lt;p&gt;In general is is unethical to teach people skills that they &lt;em&gt;intend&lt;/em&gt; to employ to harm others. That said, it is hard to know the intent of your students. Do you have Beavis and Butthead in your class? Pretty problematic then. But many people the age of secondary school students make a lot of judgment mistakes. (The human race probably wouldn't exist if most people that age didn't take risks.) So you need to be cautious. Some of my undergraduate classmates were pretty off-the-wall. (We had a mad-bomber who mostly blew up harmless things.) Teaching how to make high explosives in his Chem class would be irresponsible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you want to teach dangerous tools, you need to provide a safe environment (likely &lt;em&gt;not&lt;/em&gt; the wild) and give legal and ethical guidance with strong warnings about consequences. I'll second @thesecretmaster's answer. But even if you aren't responsible for the actions of others, your life could be ruined if someone goes off the rails with things you teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is controversy in the industry about the place of white-hat hackers, for example. They may mean good and may do good, but bad things happen and some are in jail. Tread carefully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teachers in martial arts are cautioned not to take on a student who displays traits of a bully. It is clearer to see there, of course. That tradition is at least a thousand years old. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-01T23:36:56.653" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1335" PostTypeId="5" CreationDate="2017-07-01T23:37:25.200" Score="0" Body="&lt;p&gt;In general usage &lt;a href=&quot;http://en.wiktionary.org/wiki/ethics&quot; rel=&quot;nofollow noreferrer&quot;&gt;ethical&lt;/a&gt; is used to describe standards of behavior between individuals, while moral or immoral can describe any behavior. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although the terms ethics and morality may sometimes be used interchangeably, philosophical ethicists often distinguish them, using ethics to refer to theories and conceptual studies relating to good and evil and right and wrong, and using morality and its related terms to refer to actual, real-world beliefs and practices concerning proper conduct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://dictionary.reference.com/browse/ethics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dictionary definition&lt;/a&gt; from Reference.com&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the rules of conduct recognized in respect to a particular class of&#xA;  human actions or a particular group, culture, etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;that branch of philosophy dealing with values relating to human&#xA;  conduct, with respect to the rightness and wrongness of certain&#xA;  actions and to the goodness and badness of the motives and ends of&#xA;  such actions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Medical_ethics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Medical ethics&lt;/a&gt; is a system of moral principles that apply values and judgments to the practice of medicine. As a scholarly discipline, medical ethics encompasses its practical application in clinical settings as well as work on its history, philosophy, theology, and sociology.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Professional_ethics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Professional ethics&lt;/a&gt; encompass the personal and corporate standards of behaviour expected of professionals&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note :&lt;/em&gt; This tag wiki has content adapted from Wikipedia, used under the CC-BY-SA 3.0 license. Most of this tag wiki and usage guidance is adapted from the academia wiki and guidance for the same tag, which can be found &lt;a href=&quot;https://academia.stackexchange.com/tags/ethics/info&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T23:43:41.587" LastActivityDate="2017-07-01T23:43:41.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1336" PostTypeId="4" CreationDate="2017-07-01T23:37:25.200" Score="0" Body="On the moral code or ethical policy of computer science educators, including values such as avoidance of cheating or plagiarism; maintenance of academic standards; and honesty in teaching, use of materials and resources, or research." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T23:43:44.603" LastActivityDate="2017-07-01T23:43:44.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1337" PostTypeId="2" ParentId="1327" CreationDate="2017-07-01T23:40:12.523" Score="7" Body="&lt;p&gt;I taught a Cisco networking class for a couple of years and we had to stay off of the district network any time we were doing networking stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I did was build a separate network in the middle of my room with old computers. Ran network drops from there to the racks in the back of the room so we could hook into switches, routers, and stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once we got to the point where they knew how to program routers over IP instead of wiring directly in I started messing with them. For one of the labs I closed the ports they needed on the router. One student figured it out and started scanning ports on the router to see if I had changed it. I had. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We spent a lot of time going over the reasons you would want to do certain things like port scanning. When it's the right thing to do and when it's not. I also posted links to several articles about people getting arrested for computer crimes each week. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since our network was segregated, we could do pretty much anything we wanted to on it though. A couple of times I setup a web server and had them try and break in. My personal favorite though was having a student put their iPhone on our network and had about 20 computers constantly pinging it. You could watch the battery meter dropping and by the end the phone was seriously hot. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-07-01T23:40:12.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1338" PostTypeId="5" CreationDate="2017-07-01T23:41:35.710" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-01T23:41:35.710" LastActivityDate="2017-07-01T23:41:35.710" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1339" PostTypeId="4" CreationDate="2017-07-01T23:41:35.710" Score="0" Body="Use for questions about student cheating, and how to prevent it or deal with it. This tag may be used with the ethics tag." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-01T23:43:36.213" LastActivityDate="2017-07-01T23:43:36.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1340" PostTypeId="2" ParentId="1331" CreationDate="2017-07-02T00:33:14.727" Score="12" Body="&lt;p&gt;I used seats in the room. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classroom has an address. So, if someone wanted to come and talk to one of the students they would come down the hall and into my room. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, that only gets them to the room (server). They need to talk to a specific person, so they go to seat 17 so they can talk to Bob. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So Bob's socket is &lt;code&gt;room.123:17&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried once to continue and the floor became cable runs, each hallway was a subnet, the corners were routers, and the school map was DNS. That pushed it a little too far :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did find though that most kids had at least a passing understanding of ports. Most of them had opened ports on their home routers to play games over the internet. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-07-02T00:33:14.727" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1341" PostTypeId="2" ParentId="1331" CreationDate="2017-07-02T00:33:26.017" Score="9" Body="&lt;p&gt;I don't think the address metaphor is that off-the-mark -- real addresses are more segmented then IP addresses, true, but I don't know if that's really that much of a conceptual barrier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding ports, I would tweak your metaphor slightly -- a port is more like an apartment number, rather then the apartment itself. That is, the port just serves as an additional piece of information that's a part of your overall address, and can be used to route the mail to the appropriate apartment resident once your mail arrives. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I guess to extend the metaphor, the people who live in the apartments are programs, and whoever sorts the mail at the apartment is like the operating system.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What might also help is to explain that at the end of the day, a port is literally just a 16 bit int, nothing more, and that it's up to the receiving computer to do something reasonable with that number. If you emphasize that a port is just a number, it might make it a little easier for your students to independently derive what exactly you can and can't do with ports. After all, there are only so many things you can do with a single piece of metadata.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative/complementary approach might be to focus less on metaphors and instead focus on motivating why we'd need ports in the first place. I'd personally start from the top down, and explain things like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start by explaining how IP addresses are used to route packets.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Explain that once a computer finally receives a packet, we're still not done: the operating system need to figure out which currently-running program to give it to, if at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might also be a good moment to ask your students to discuss and try coming up with a solution themselves -- hopefully, most of them will independently realize they need to include metadata of some kind. You can turn this into a mini-design lesson: an ideal solution should be simple, minimizes packet size, is future-proof, flexible, doesn't break the transport layer abstraction...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Tell them about ports, and explain that was the solution people ended up coming up with. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The hope is that focusing more on motivation will allow your students to acquire a reasonable conceptual model of how network protocols tend to work, even if they forget the exact details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this approach also does a better job of answering the implicit &quot;why?&quot; question people have when learning new things. (Why ports? Why IP addresses? Why TCP? Why abstract things like this? Why is everything so complicated? etc.) Basically, confront it head-on by presenting things in a problem/motivation -&gt; solution approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat: this approach might just be a reflection of how I personally like learning things, so YMMV.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-02T00:49:10.163" LastActivityDate="2017-07-02T00:49:10.163" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1342" PostTypeId="2" ParentId="1328" CreationDate="2017-07-02T00:36:18.267" Score="4" Body="&lt;p&gt;Wish I had a good answer, but I can sympathize with your Scratch example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I started doing was just giving up on the first day we did Scratch. I would show them the drawing tools before we did any coding. Spent about 5 minutes showing how to make sprites and backgrounds and then gave them the rest of the period to play, with the understanding that was the only day that they had to just play around and doodle. Day two, we start coding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Worked fairly well. It was at least better after I started doing this than before. I think the novelty of it wore off when they were allowed to goof off for a day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Haven't taught Scratch in a few years, but I noticed the same thing happening with Jeroo. Kids love painting the island with flowers and water. The last lab in the set is one where they get to build their own lab, and make their own island. I think having that to look forward to helps. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2017-07-02T00:45:04.887" LastActivityDate="2017-07-02T00:45:04.887" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1343" PostTypeId="2" ParentId="1300" CreationDate="2017-07-02T00:42:07.130" Score="12" Body="&lt;p&gt;If your students are coming from a math background, teach them that in most programming languages, all variables have a hidden subscript on them corresponding to a time/step-number (i.e. they're functions of time), and something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$x = x^2$&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;really means something like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[Let] $x_{t+1} = x_t^2$&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You might clarify that such a rule for $x_{t+1}$ only applies for values of $t$ where the &quot;current position&quot; (another hidden variable; make an analogy with a &quot;program counter&quot; register if you like) in the program is at that statement, and that, implicitly in the absence of any assignment to a variable $v$, $v_{t+1} = v_t$.&lt;/p&gt;&#xA;" OwnerUserId="1327" LastEditorUserId="1327" LastEditDate="2017-07-02T00:51:04.900" LastActivityDate="2017-07-02T00:51:04.900" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1344" PostTypeId="2" ParentId="1079" CreationDate="2017-07-02T03:09:29.530" Score="1" Body="&lt;p&gt;If students are learning penetration tools and techniques, they should first be required to learn, at a minimum:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is illegal and the civil, criminal, and professional penalties (I have students sign a statement that they have been told that any attempt to achieve unauthorized access to computing resources can result in felony conviction with penalties exceeding $10,000 and 5 years in prison, even for a novice failure. The statement includes the fact that a &quot;victim&quot; can count as &quot;damages&quot; any costs to investigate the incident and improve their own readiness and defense-- at the crackers' expense. The statement acknowledges that attempts are highly likely to be caught and may result in lifelong exclusion from professional careers including plumbing, electrical, and teaching -- and certainly cyber work.) &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A handful of true stories about people who have been prosecuted, including at least one person from each category:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A person intending to break the law (e.g. Kevin Mitnick)&lt;/li&gt;&#xA;&lt;li&gt;A person not intending to break the law (at times, Masters of Deception)&lt;/li&gt;&#xA;&lt;li&gt;A person whose action slid from innocent to less than innocent (e.g. Daniel Spitler and Andrew Auerheimer)&lt;/li&gt;&#xA;&lt;li&gt;A person who caused real damage without intending to do so (perhaps a person already described in the previous three cases)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ethics education should include teacher presentation, student discussion, and student writing. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I believe that it is typical for a first semester in cybersecurity at the post-secondary level to include 2+ weeks of law and ethics prior to covering tools or techniques. The consensus of professionals at the &lt;a href=&quot;https://www.k12cybersecurityconference.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;NICE cyber conference&lt;/a&gt; was that extensive ethics education should precede any instruction on penetration and that ethics education should be ongoing through the course, integrated into exercises and instruction.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-02T06:02:45.063" LastActivityDate="2017-07-02T06:02:45.063" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1345" PostTypeId="2" ParentId="1300" CreationDate="2017-07-02T03:10:21.500" Score="6" Body="&lt;p&gt;I always introduce programming by saying, &quot;The computer can only do 5 things: fetch from memory, store in to memory, arithmetic, test, and jump (modify the Program Counter).&quot; &lt;em&gt;As it was in the beginning, is now and ever shall be, world without end, Amen, Amen.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assignment means store in to memory. Equality is a test. Done. I think we need to &lt;strong&gt;emphasize how computers actually work&lt;/strong&gt; right from the beginning, and then these misconceptions never arise.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-02T03:10:21.500" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1346" PostTypeId="2" ParentId="1300" CreationDate="2017-07-02T05:40:28.243" Score="4" Body="&lt;p&gt;I've not tried the following, so I'm unable to vouch for their effectiveness, but if you're looking for suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Avoid assigning variables directly (i.e. x = y) &lt;/li&gt;&#xA;&lt;li&gt;Hide the implementation in functions that have semantically clear names (e.g. x.Assign(y) ), although this assumes an object-oriented approach. Something like: x = Int.Create(y) uses assignment but the function may make it less likely to be confused with an equality assertion.&lt;/li&gt;&#xA;&lt;li&gt;Similarly functions can be used to test for equality in favour of ==&lt;/li&gt;&#xA;&lt;li&gt;Use addition assignment: +=, which is behaves as I intuitively expected an assignment to.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course the above will only buy you some time before assignment and equality checks need to be explained properly, but it gives the students some time to adapt to programming without being overwhelmed with too many new concepts at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the course it might be appropriate to use languages like J, which uses =:, or f# where the 'let' keyword is used to indicate the = is an assignment (though, possibly confusingly, a single = is also used to test equality).&lt;/p&gt;&#xA;" OwnerUserId="1621" LastEditorUserId="1621" LastEditDate="2017-07-02T05:43:32.300" LastActivityDate="2017-07-02T05:43:32.300" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1347" PostTypeId="1" CreationDate="2017-07-02T09:02:03.870" Score="26" ViewCount="6354" Body="&lt;p&gt;I tried hard, in the latter part of my career, reach every student in every class period that I taught. That this may be an unreachable goal is of little interest to me. I think that I &lt;em&gt;must&lt;/em&gt; do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems common to teach to some perceived ideal level, especially in courses that depend fundamentally on traditional lecture. Some teachers focus on the best students, hoping the &quot;average&quot; students will do ok and largely ignoring the less-than-average. Some teach to &quot;the middle&quot; - at least, as they perceive it. Few seem to aim for the bottom, leaving the best students to learn on their own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to give everyone something to advance their learning in each class period. Not everyone in a course will want or need the same things.  I want to give them each the things that they will judge valuable. I have a few ideas, most involving &lt;em&gt;active learning&lt;/em&gt; techniques and student teams, following a structure into which each student can fit their own goals, and find satisfaction achieving those goals. Traditional A-F grading is a poor vehicle for this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think spending a lot of effort on reaching the unreachable is productive. Some students will be in your class for the wrong reasons and may be uninterested in any reasonable of success. To make this achievable, make the following assumptions: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The student population is diverse in background, preparedness, skill, and drive. &lt;/li&gt;&#xA;&lt;li&gt;The students have different personal goals. &lt;/li&gt;&#xA;&lt;li&gt;All students want to learn&lt;/li&gt;&#xA;&lt;li&gt;All students can be convinced to put some effort into the process. &lt;/li&gt;&#xA;&lt;li&gt;It is the student who will judge whether he/she learned something of value.  &lt;/li&gt;&#xA;&lt;li&gt;The &quot;something&quot; learned can be different for each student.   &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The somewhat transcendental question is: &lt;em&gt;How can I convince others to reach for this goal?  How can we be convinced to try to set the conditions so that they can all be reached - continuously in every class period?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-04T19:29:31.270" LastActivityDate="2017-10-08T17:48:47.650" Title="How can I convince my fellow CS teachers that reaching every student is a worthwhile goal?" Tags="|curriculum-design|best-practice|undergraduate|differentiation|" AnswerCount="9" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1348" PostTypeId="2" ParentId="1331" CreationDate="2017-07-02T13:17:47.260" Score="4" Body="&lt;p&gt;You can consider an IP number to be analogous to a business's telephone number (reaching the main switchboard), and the port number to be the telephone extension number for one person. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This probably works better when there is no direct-dial to a specific person, and the main number is handled by an automated system.&lt;/p&gt;&#xA;" OwnerUserId="1628" LastActivityDate="2017-07-02T13:17:47.260" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1349" PostTypeId="2" ParentId="1347" CreationDate="2017-07-02T13:27:19.373" Score="2" Body="&lt;p&gt;Why should you try to teach every interested student and assist them in reaching their different personal goals?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you've already given the answer in your question: &lt;strong&gt;Because each of them is genuinely interested in learning something.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion, one of the wonderful things about schools is that they are designed to be places where knowledge is spread. People who already know something about a topic (often these people are the teachers, but even this doesn't have to be the case every time) share their knowledge with people who want to gain knowledge about this topic (usually the students). In reality, this principle is sometimes hard to encounter: As there are usually a lot of required courses in most school systems, you'll always have students who aren't interested in learning something, but are just forced to attend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, as I want to focus on the idealism here, I think the reason why teachers should try to teach everyone who is interested is because teaching every interested person is the primary objective of a school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When discussing this question with some others, it might be good to reach a consensus on the level of the discussion: I could imagine that somebody argues with you about this question assuming you are talking about a given, realistic situation and wants to convince you that in certain situations it's (as you also already stated) just not possible or incredibly difficult to teach everybody.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-07-02T13:27:19.373" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1350" PostTypeId="2" ParentId="1300" CreationDate="2017-07-02T13:36:28.067" Score="4" Body="&lt;p&gt;I would generalise this, because other symbols and terminology are also affected (&quot;&gt;&quot; or textual statements such as commands).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start by explaining that symbols and terms in &lt;strong&gt;each&lt;/strong&gt; language have meanings specific to that language. They may overlap or have similarities, but never assume that just because a symbol or word has some meaning in one language or scenario, that it has the same meaning in another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Then use &quot;=&quot; as an example of this general rule&lt;/strong&gt;. This &lt;em&gt;changes&lt;/em&gt; &quot;=&quot; from &quot;a problem affecting one situation&quot; into &quot;a classic example of a really important rule that applies to all of computer science&quot; and into a memorable learning point. You can then pick a few other examples if the students need it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will prepare them for the idea that different languages often &lt;em&gt;also&lt;/em&gt; have different philosophies, approaches to, and ways of representing even superficially similar programming structures.&lt;/p&gt;&#xA;" OwnerUserId="1629" LastEditorUserId="1629" LastEditDate="2017-07-02T16:59:30.043" LastActivityDate="2017-07-02T16:59:30.043" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1351" PostTypeId="2" ParentId="1328" CreationDate="2017-07-02T13:37:01.930" Score="5" Body="&lt;p&gt;There is another sort of rabbit hole, one that your best students can fall in to. I once had a situation in which students were programming with a certain library that provided a simulation - a virtual world. They had certain exercises designed to teach specific thought processes; think recursion, or design patterns, but it could be lots of things. Some of the best students figured out that they could get the right answer, not by programming within the simulation, but by re-programming the library itself to make the exercise trivial. They got the right answer by rewiring the foundation. But the intent was to help them rewire their brains. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is hard to condemn such students, of course. They were very clever. They learned &lt;em&gt;something&lt;/em&gt;. But the worry is that what they learned helped them avoid learning something else that may be more important in the long run. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case the solution was that I tightened up the simulator (which made it better/more secure), but I also needed to assure that they did in fact learn the lesson of the day. It isn't that they did anything wrong, or learned the wrong thing, just that they may have failed to learn something important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same situation would apply if a student, asked to write a program with some hard bits, modified the compiler to make those bits easy. Good that they teach themselves something about compilers, but bad if the hard bits held some important insights that programming around them left them in the dark about. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I sometimes have to tell a few (usually good) students that the purpose of programming exercises isn't to produce a program, but to produce learning. Usually, if I needed the program I could write a pretty good one myself. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-02T13:43:40.623" LastActivityDate="2017-07-02T13:43:40.623" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1352" PostTypeId="2" ParentId="1347" CreationDate="2017-07-02T13:46:41.153" Score="10" Body="&lt;p&gt;The easiest way to set the conditions so that they can all be reached continuously in every class period is to make the conditions so easy that all can achieve them with very little effort. However, this is not at all motivational and sells the students short of being stretched, inspired and challenged. Dumbing-down the curriculum so that all succeed can get great results on paper but is counter-productive in the long term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good lesson almost should contain some objectives that can be reasonably achieved by all students whilst also featuring others that create scope for curiosity and intrigue for the fastest/brightest learners. Any teacher knows this isn't easy:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Differentiation by depth of understanding&lt;/strong&gt;: Projects contain some tasks where students just have to recall / replicate a demonstrated skill or fact. Other tasks require independent analysis, evaluative judgement and opportunities to create their own solutions. Most teacher trainees are told to study &lt;a href=&quot;http://www.nwlink.com/~donclark/hrd/bloom.html&quot; rel=&quot;noreferrer&quot;&gt;Bloom's Taxonomy&lt;/a&gt; for this.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;e.g. &lt;strong&gt;All&lt;/strong&gt; students have to be able to spell and define the word &quot;algorithm&quot;.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Most&lt;/strong&gt; students need to be able to be able to follow a bubble sort algorithm to sort a stack of cards&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Some&lt;/strong&gt; students should be able to explain when and why an insertion sort algorithm might be more suitable than a bubble sort.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Differentiation by difficulty&lt;/strong&gt;: Tasks for any given topic / project start easy and get progressively harder (as in more complex / open ended)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;e.g. Drawing images on a BBC micro:bit: &lt;a href=&quot;https://create.withcode.uk/python/ra&quot; rel=&quot;noreferrer&quot;&gt;https://create.withcode.uk/python/ra&lt;/a&gt;. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Challenges written in the comments under the code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Differentiation by quantity&lt;/strong&gt;:  Students are asked to complete similar tasks all assessing the same skills. Some complete a few whilst others complete more. Repetition is helpful to embed understanding but too much repetition just to keep students busy isn't particularly helpful.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;e.g. Testing binary / denary / hex conversion: &lt;a href=&quot;http://tools.withcode.uk/binarychallenge/&quot; rel=&quot;noreferrer&quot;&gt;http://tools.withcode.uk/binarychallenge/&lt;/a&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Differentiation by support&lt;/strong&gt;: All students complete the same task but some are provided with templates / resources / additional advice whilst others are challenged to work more independently.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This can be very time consuming to prepare and is sometimes perceived as unfair: those given additional support miss out on the chance to reach the higher grades and those not given the support can feel hard done by.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Differentiation by responsibility&lt;/strong&gt;: Some students are assigned additional responsibilities (support other students in group work / create revision questions based on topics covered / spotting errors or suggesting improvements in support resources). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Ultimately, I don't think it's a question of choosing a particular type of student to pitch the level of difficulty to. As teachers we have to be deliberate in our planning and delivery so that there's something even the least confident student can leave having achieved but also some bait dangled tantalisingly just out of reach for those who want to discover for themselves. All that, whilst not neglecting the majority of students who find themselves in the middle of the two extremes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Realistically, my answer to your question is that we &lt;strong&gt;can't&lt;/strong&gt; guarantee every condition will be reached continuously in every class period for every student. I can't anyway. But it's worth giving it a try - it makes teaching more fun as well as more productive.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-07-02T13:46:41.153" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1353" PostTypeId="2" ParentId="1331" CreationDate="2017-07-02T14:02:04.423" Score="1" Body="&lt;p&gt;How about IP addresses being countries and ports being sea ports? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the UK it works well because there are so many different sea ports that students recognise from looking at an online map of the British Isles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can extend the metaphor by talking about firewalls blocking off access to ports (e.g. sea blockades during WWII) or increasing security by removing external access (landlocked countries don't need to worry about sea invasion). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main advantage over an address / flat number analogy is that you can extend it by talking about different types of ports (e.g. airports) for different protocols (e.g. UDP / TCP) with various implications for speed / reliability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No analogy is perfect though - students who want to understand it fully should have experience using or hosting different services on the same server.&lt;/p&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-07-02T14:02:04.423" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1354" PostTypeId="2" ParentId="1347" CreationDate="2017-07-02T14:45:44.333" Score="5" Body="&lt;p&gt;I would argue most teachers do &lt;strong&gt;want&lt;/strong&gt; to reach every motivated student in their classes; the issue tends to be that there &lt;em&gt;isn't enough time to tailor the teaching to each individual student&lt;/em&gt;. So, in answer to your title question, I don't think you need to convince other teachers that you &lt;em&gt;should&lt;/em&gt; reach everyone; but instead argue &lt;em&gt;how to effectively reach everyone&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As discussed in &lt;a href=&quot;https://www.youtube.com/watch?v=7vsCAM17O-M&quot; rel=&quot;noreferrer&quot;&gt;this fascinating CGP Grey video&lt;/a&gt; (who, incidentally, was a teacher—of Physics, not CS, though), the style of teaching adopted in most subjects hasn't changed for hundreds of years — a subject expert discusses the material in the curriculum, which marches on whether you understand or not. That leaves most students either &lt;em&gt;bored&lt;/em&gt; because they're ahead, or &lt;em&gt;confused&lt;/em&gt; because they're behind.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Problem&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;With 20 or 30 students in front of you, and a lesson that might only be an hour long, there isn't really a lot of leeway to reach each student individually. $$\frac{1 \text{ hour}}{30 \text{ students}} = 2 \text{ minutes}/\text{student}$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, you have to deliver material to &lt;em&gt;the whole group&lt;/em&gt;. Generally:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The topic you want to teach has &lt;strong&gt;prerequisite knowledge&lt;/strong&gt;. Some students won't have a firm understanding of it by the time they reach your lesson; others will be beyond it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Students &lt;strong&gt;learn at different rates&lt;/strong&gt;. The most able students will have mastered the new material much quicker than the least.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There is a &lt;strong&gt;fixed amount of content to learn during the term&lt;/strong&gt;, and so you can only spend so much time on a certain topic.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's pretty certain that few students will be in the same place. So, you can either:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Go over existing material to bring the least able students up to speed, then teach your content. The more able students then have nothing to do, and get bored.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Tell the least able students to catch out outside of lesson (so &lt;em&gt;without any guidance from you&lt;/em&gt;, meaning they still might not be able to catch up)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Aim for a middle ground to reinforce existing knowledge (but in a way that is more challenging than just revisiting previous content, e.g. the hardest question from last lesson becomes the first this lesson).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now we've discussed what the problem is, and what most people would do to solve it, you should be able to see why lessons don't &lt;em&gt;actually reach every student, despite no-one actively aiming &lt;strong&gt;not&lt;/strong&gt; to reach everyone&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Solution&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I can't really promise a straightforward solution that works &lt;em&gt;now&lt;/em&gt;, and reaches more students without a lot more effort. &lt;a href=&quot;https://cseducators.stackexchange.com/a/1352/2&quot;&gt;pddring's ideas&lt;/a&gt; are excellent, and you should strongly consider providing different 'routes'  of challenge so that all students can take &lt;em&gt;something&lt;/em&gt; away from your instruction. At the very least, you probably need to ensure that students understand enough to build on the concept you've taught (e.g. understanding syntax to a reasonable level before moving on to constructing more complex algorithms). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The holy grail is the 'Digital Aristotle' that CGP Grey talks about, but I don't think it's entirely here yet. Some Internet resources like &lt;a href=&quot;http://www.khanacademy.org/&quot; rel=&quot;noreferrer&quot;&gt;Khan Academy&lt;/a&gt; provide excellent self-paced resources and self-test questions which might be helpful to use if students need to work on things at home, so that they do have the prerequisite knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In essence, there are two options to reach more students: &lt;em&gt;provide different teaching for different abilities of students&lt;/em&gt;, or &lt;em&gt;try to make sure everyone is on the same page &lt;strong&gt;before&lt;/strong&gt; they get to your lesson&lt;/em&gt;. I feel that I've written a lot without actually proposing a real solution, but it's extremely difficult to solve this problem. If you're willing to put in the time, you can provide different levels of difficulty in each lesson, which would at least ensure that the vast majority of abilities are taught well, but I think that the future lies in computers adapting a curriculum just to your students. If you find a platform where you can put tasks that adapt to a student's ability, it may be worth considering so that you can challenge every student to reach their potential.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-07-02T15:00:57.327" LastActivityDate="2017-07-02T15:00:57.327" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1355" PostTypeId="2" ParentId="1347" CreationDate="2017-07-02T14:48:21.723" Score="46" Body="&lt;p&gt;Please &lt;strong&gt;don't&lt;/strong&gt;...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;...give the students who are ahead more of the same kind of work to do. Please. That's just &lt;em&gt;boring&lt;/em&gt;. If they get it, they get it.&lt;/li&gt;&#xA;&lt;li&gt;...make groups by mixing the students who are ahead with the students who are behind - often, the students who are ahead won't teach the behind students, but will just do the whole thing themselves. I say this from personal experience, and my friends' experience.&lt;/li&gt;&#xA;&lt;li&gt;...categorize students by listening to them, or watching them, or their friends, or anything like that. I know one of the shyest people ever in class, but with her friends, she's talkative, and excited about tons of different things. I know another person who isn't classified as &quot;gifted&quot; by my school, but we have had multiple very interesting talks about physics. There's also people out there with autism or Asperger's (I know one there, too) who have a harder time with some things that to us seem &quot;normal&quot; but are actually quite intelligent.&lt;/li&gt;&#xA;&lt;li&gt;...listen to stereotypes (this goes with the previous point) - the girl in our school that was voted &quot;most likely to be an olympian&quot; is also in the gifted program, and so on. The nerd stereotype also isn't often fulfilled - I have friends who are very intelligent but also dress nicely, do not have trouble with social interaction, etc. Though of course, people can fulfill the nerd stereotype, or whatever stereotype. Just be able to see past that.&lt;/li&gt;&#xA;&lt;li&gt;...think that those who are a little behind aren't working hard, or aren't interested. There's people out there who don't care, but those people often hide from sight those who do. &lt;/li&gt;&#xA;&lt;li&gt;...expect less of certain groups. It is hard to rise above expectations. I remember reading about an experiment that was done, where teachers were given a student group (none of whom were gifted) and were told that a few students were gifted. By the end, they &lt;em&gt;were&lt;/em&gt; gifted, because the teachers had treated them differently. From personal experience - I've been given assignments that were just kind of easy (for a lot of people). Did those people go for the really hard option (not provided for extra credit)? No. Why would you? I certainly didn't. Have high expectations for everyone. (According to BenI., this is called the &lt;a href=&quot;https://www.uni-muenster.de/imperia/md/content/psyifp/aeechterhoff/sommersemester2012/schluesselstudiendersozialpsychologiea/rosenthal_jacobson_pygmalionclassroom_urbrev1968.pdf&quot; rel=&quot;noreferrer&quot;&gt;Pygmalion Effect&lt;/a&gt;.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Know&lt;/strong&gt;...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;...that reaching every person takes more work than aiming at a medium. There's no curriculum that can be created in advance that will tell you about the student who's got dyslexia, the student who's tired of school because it's too easy, the student who is tired of being looked at as average, the student who has depression...every student is different. These are people we're talking about here, with personalities, hopes, and dreams.&lt;/li&gt;&#xA;&lt;li&gt;...I have been &lt;em&gt;inspired&lt;/em&gt; by teachers. Why is it important to reach every student? Because you will never know what will happen when you do. I once talked to someone who was kind of interested in physics about, I don't even remember, quantum mechanics, I think. I'm definitely a nerd, so I was really excited talking about it. And they said, &quot;You have any books you can loan me?&quot; That was kind of an understatement =P We've had multiple physics conversations since then. &lt;/li&gt;&#xA;&lt;li&gt;...Be &lt;strong&gt;EXCITED&lt;/strong&gt;! You get to show the next generation why your subject is awesome! I know it sounds exaggerated, but people feed off of excitement. Have you ever been in a baseball game, and the whole crowd is cheering, and even though normally you wouldn't bother, you're up on your feet chanting with everybody? I have a teacher who is so incredibly excited about their class. They joke around, they jump up and they make their point, you can just tell that they &lt;em&gt;love&lt;/em&gt; what they do. I mean, you chose this for a job. Make it fun. Love what you do, and I guarantee you people will notice.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Often, an amazing way to persuade people is by showing them. As they say, a picture is worth a thousand words (though I'd say a demonstration is worth ten thousand). So, in this case, try to show other teachers with your class. One of my teachers is kind of an amazing guy. He teaches 8th grade science. So he made up a few songs, and &lt;em&gt;sang&lt;/em&gt; them in front of the class (which to a bunch of adolescent awkward teenagers was kind of jaw-dropping), and taught us about the layers of the Earth that way. And he told stories to make a point. I really think everyone in the class liked him, as a person at least. And he told us at the beginning of the year that every one of us could get an A, if we worked hard enough, that he would make sure of that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the other thing about this is most teachers, I think, know that they should try to reach everyone. It's a matter of doing it. Another teacher of mine pulled a couple of us aside and told us we were to be her guinea pigs - she was trying to start figuring out a system to start trying to reach some of the different levels of students. So I'd say, most people recognize it - then take the plunge! &lt;strong&gt;Ask students to help you&lt;/strong&gt; out. In the end, though, it's the teacher's choice to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I should point out - yes, there are kids out there who are total jerks, or who seem not to have picked up that yes, they are in 9th grade, and yes, acting like a 3 year old is no longer an option, but there are also tons of kids out there who are more mature than some adults. Please, don't blow us off.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-10-08T17:48:47.650" LastActivityDate="2017-10-08T17:48:47.650" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1356" PostTypeId="2" ParentId="1296" CreationDate="2017-07-02T15:43:17.813" Score="6" Body="&lt;p&gt;Educators have to agree that's we're teaching skills, not technology.  Reaching that agreement is harder than you might think.  It's especially hard in the web-development area.  (Disclaimer: that's distant from my area.)  What are the key questions or skills that have lasting value?  Here are some speculations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What does it mean to split a computation between database, server, and client-side browser?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How do you manage the cost tradeoff between fast loading (which means don't bloat your web pages with scripts and frameworks) versus rich interaction within the browser (which requires some sort of scripting)?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In five years, new languages/tools/frameworks will be fashionable.  What are the skills needed to work with a large API, continually changing, and too complex to master?  (Good luck with that one.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In my own area, programming languages, I don't have to speculate.  I know that the important things are functions, types, and objects (maybe also modules).  I am confident that in thirty years, these things will still be important.  And I can teach these things without using the latest technologies: Scheme, ML, and Smalltalk were all known and usable in 1980.  The newest &quot;technology&quot; I teach is actually the math (syntactic methods of semantics popularized around 1995).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you don't see here are the traps avoided.  I don't have to worry about teaching currently fashionable languages like Swift, Rust, or Go.  I don't have to worry about whether I am teaching the &quot;right&quot; version of Python.  To avoid this trap, I had to do an enormous amount of intellectual work.  Such work may not be rewarded, as universities tend to focus their rewards on research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A final trap for educators: in the US at least, courses focused on timeless skills are much less popular than courses focused on currently fashionable technology.  Many students are short-term optimizers, and they want something they believe they can use.&lt;/p&gt;&#xA;" OwnerUserId="1635" LastActivityDate="2017-07-02T15:43:17.813" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1357" PostTypeId="1" AcceptedAnswerId="1364" CreationDate="2017-07-02T16:35:42.110" Score="5" ViewCount="731" Body="&lt;p&gt;In most fields instructors spend a lot of time on the Content of a course. Often this is phrased as Delivering Content, or Completing the Syllabus. The traditional picture, whether valid or not, is an instructor (single) broadcasting Content to students (multiple). I wonder if this is a common view of CS education. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a course like Data Structures, there a lot of things (content) that the student has to learn: Stacks, Sets, Trees, ... along with common algorithms. Normally there is a syllabus that lists all these things in some rational order. &quot;Covering it&quot; is a sort of meta-constraint (or sometimes a hard constraint) on the instructor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the compiler course, the Content is more about technique than facts, of course, but those techniques possibly &lt;em&gt;are&lt;/em&gt; the content: scanning, parsing, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I guess the question that I would most like advice on here is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;If you could order your goals in a typical undergrad course where&#xA;  would &quot;Deliver&#xA;  the Content&quot; fit?&lt;/strong&gt; High, Low? What, if anything, would be above it? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What would be the effect on your students if you move that goal up? down? remove it altogether? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another aspect of this is how much control does/should the professor have in the flow of the course; especially in content delivery? Absolute? None? What balance works for you? &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="2" LastEditDate="2017-07-02T17:27:06.947" LastActivityDate="2017-07-03T01:56:00.710" Title="How important is &quot;delivering the content&quot; of a course?" Tags="|best-practice|undergraduate|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1358" PostTypeId="2" ParentId="1296" CreationDate="2017-07-02T17:43:34.643" Score="2" Body="&lt;p&gt;One way is to have an industry advisory committee consisting of alumni or friends of your institution. (I was on such a committee for a community college when I worked in industry.) Once a year, the committee meets with faculty to learn about the current curriculum and suggest changes based on their active professional knowledge of the field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way is for faculty members to spend sabbatical years in industry. I learned more about software engineering from a year at Google than from my entire formal education.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-02T17:43:34.643" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1359" PostTypeId="2" ParentId="1357" CreationDate="2017-07-02T18:00:40.250" Score="6" Body="&lt;p&gt;Let's consider your Data Structures course example. The material from there is used throughout CS, and more advanced courses probably expect you to have completed Data Structures already, and will assume understanding. If the instructor never actually introduces to all the data structures that the syllabus lists, then your later course will be &lt;strong&gt;assuming knowledge that the student doesn't necessarily have&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It depends what exactly you mean by not making content King—if you simply don't teach some of the material and don't mention it much, then &lt;strong&gt;your students won't know it&lt;/strong&gt;. However, something to consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What is the goal of your course? To ensure that your students &lt;em&gt;know&lt;/em&gt; the material so that they can build on it, or to encourage your students to apply their knowledge?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want students to be able to apply what they know to unfamiliar concepts without your support, then definitely don't spoonfeed everything. However, it might be wiser to introduce all of the standard content, and then allow them to apply their knowledge on more obscure concepts.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, you could first introduce an array, then ask about a bitmap (which you might not cover in your instruction, so you can test them).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Will the material be needed later on? Would it be problematic if students didn't learn all the material? If so, perhaps it's best to cover the content in your class to ensure that they do understand.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In an ideal world, you might give students a problem, and let them explore solutions to it rather than actually covering the content directly. For example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can we represent pairings between two variables in a data structure? Can it be done in $\mathcal{O}(1)$ time?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Instead, a lot of the time, the content is just 'fed' to the students directly.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here is a hash table. It does X, Y and Z. It is useful because W.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Given a large amount of time, actually rediscovering some solutions to common problems would help your students to think critically and understand why certain design choices have been made in CS. But &lt;strong&gt;you could spend years rediscovering things that are already known, and sometimes just telling allows you to move on more quickly&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Removing 'the content' completely from the course would essentially render it pointless—if there's no goal (&lt;em&gt;&quot;in this course, we will learn X&quot;&lt;/em&gt;), the course wouldn't really seem to help anyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a summary of my views: &lt;strong&gt;delivering the content is practically a requirement&lt;/strong&gt; given the time constraints of most courses, rather than letting students investigate things for themselves. Perhaps changing this would provide some benefits, but the current system has emerged because it's pretty efficient as passing on knowledge, even though some students don't benefit &lt;em&gt;as much as they could&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-07-02T18:00:40.250" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1360" PostTypeId="2" ParentId="1347" CreationDate="2017-07-02T18:54:10.153" Score="8" Body="&lt;p&gt;You probably can't. Each person has learned certain things in life that make them different.  Most people simply are self centered idiots(regardless of what a piece of a paper says or how well they can do on an exam). Most people do not have the human connection that is the fundamental point of it all anyways. You could try to explain to them in a logical fashion, discussing evolution, religion, philosophy, psychology, etc, but if they have no interest in these subjects then they will not understand it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All humans have is each other and the human network is broken and dysfunctional.  The problem you see is fundamental and exists on many levels and in many different areas. The governments, the churches/religious institutions, the education system, amazon(both it's business model and the companies that put their products on to sell), parents, the lawn guy, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Humans do things and they do them for reasons, but they generally fail at understanding the true purpose of those reasons as they relate to others, which then come back to the relation to themselves(you could call it karma, but it is simple physics(every action as an equal and opposite reaction, and, after all, we are, at the very least, just atoms)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our social structure is centered around the ego and self-gratification with nearly complete disregard for the consequences. We, as individuals, attempt to maximize our own happiness, and the only way to do that is to deprive someone else of theirs. E.g., A billionaire surely is not &quot;worth&quot; any more than a millionaire, or even someone that is broke, yet our societies seem them as worth more and we end up with a positive feedback cycle that amplifies the worst behaviors. The billionaire has the ability to control much larger factors in the world and influence it, regardless of that persons actual ability to do the right thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g., millions of companies simply create products to sale to make money so the owners can spend the money on material things to make themselves &quot;happy&quot;(which usually is some form on instant gratification). These companies sell products to people that are, too, trying to gain happiness. In the transaction, resources are wasted. e.g., you buy a product and eventually that product ends up in a landfill... and the cycle repeats. After many generations all our natural resources will have been converted in to things that end up in landfills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What does this have to do with your specific issue? Everything. The mentality you are fighting is built in to the system and is amplified by all means. Your coworkers are just small companies that do the same thing. They are blind to the ultimate effects of their actions and simply follow the status quo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try to change them, but chances are they do not want to be changed nor listen to reason nor do the right thing(which, generally requires them to give up some of their happiness, or pursuit of happiness, for the betterment of humanity).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion, is that you simply do what you feel is right and try to maximize your effect vs effort. That means: Instill in your students the desire to help other human beings and that happiness actually comes from others(as does sadness, emotional pain, etc). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make the environment as fun and interesting as you can, but always keep in mind the ultimate reason for it all(which is not so they can go out and make big bucks, because that just creates more unhappiness in the world, in which they will be part of).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Human beings are amazing creatures and the learning part of it is easy when there is a purpose to do so. The reason my kids in America are idiots is not because they actually are but because the system is broke. Almost all teachers are broke(they only care about drawing a paycheck, they are generally are frustrated with the system(the administration, who only cares about making money) and the students(who are confused and not properly educated to achieve what they want). But when there is a true purpose, we learn very easily and can accomplish amazing things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The money game ruins all in the long run. Focus on meaningful things and simply try to get that across to your students. You can't help every student either. It is neither practical nor responsible, but this does not mean you do not try, you simply plant the seed and water it. You can do the same to your fellow coworkers, but chances are it would be even more of a waste of time. If you are a leader time, you can try to lead them to &quot;water&quot;, but you must take a stand and be willing to go through that mess(which, if you can do, is worth it, and it needs to be done, but ultimately you can only do some much in life. Choose your battles).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must realize, and I think you do, that the system is broke. If it were not broke, you would have never brought up the issue and we would not be experiencing the effects. Most either do not know the system is broke or do not know how to fix it and hence are not willing to try(which is the problem, because to have something you must build it, building it is the only way to achieve anything. You must build happiness, you must build love, you must build greatness... and the bigger it is, the longer it takes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, simply try new things, don't be afraid. No one is god and no one has the right answers yet(because if they did, it would be working). If someone tells you(like a coworker) that X won't work, tell them to fuck off and do X anyways(if you feel it is the right thing to do). They, generally, are people that do not want to &quot;rock the boat&quot; and are either afraid of change or too short sighted or ignorant to predict the effects of X. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you end up coming up with something that works, you will create a trend and start something good... and that is the goal. People are sheep/followers and they need leaders. Leaders are people that believe in something more than other human beings. But those are extremes and we can always become stronger at what we are(or weaker; e.g., a follower can become a weaker follower and hence a stronger leader over time if they invest the time to do so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as specifics about students, You will just have to work that out on your own. There are no general principles except the human and evolutionary characteristics(like, we generally learn by repetition/patterns. We learn best when we see a purpose in what we are learning, humans are social creatures, we all want to &quot;achieve&quot;, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think if you engage students and allow them to have a voice, that will get them interested in participation. e.g., you have many different types of students. Some are just very eager to do things and less ego based. Some are very ego based. Some are &quot;smart&quot; and some &quot;stupid&quot;. Some are not interested in what they are doing but do it for other reasons(money, family, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can engage each student and find out what drives them and use that in a constructive way then you've won at least half the battle. This is not actually hard to do. Simply invest your time(which most teachers don't because they are lazy and pathetic, not their fault, of course) and observe each student. If, say, you have a student that seems to be uninterested in the material. Find out what they like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g., Suppose the student is really in to comics. You know this because you seen him bring them to class. You can engage him on it a little to find out more and see if he is interested in it. If not, you need to find out what it is. It shouldn't be hard. If the student is really shy and reserved then you might have to find out a different approach(eventually you will get good at this and it will occur very quickly). Since CS and comics do not directly work together, you have to make a bridge for that student. If you don't know anything about comics you could get the student to bridge the gap for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g., Suppose you are studying operating systems and it is a very technical thing like a task switching on the 386. Well, your student is going to be more interested in comics than that, surely. But if you could, say, devise a way get him to combine the two then he will be more interested in learning the topic. If you wrap it up in a comic icing, it will be more likely to bite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g., Ask him if he how he would create a character that would, say, be a computer. Maybe a specific comic episode would be some nemesis hacking in to his OS and planting a virus that hijacks the task switching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;or whatever. If you allow him to build off his own interests and merge them with other things that he is not too interested in(simply because he doesn't know about it enough to be), then he is much easier to bridge the two. Knowledge is not created but modified. We learn by building off what we already know, not by spontaneous emission.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for that particular student, his project could be to create a comic that uses the task switching principles in some creative way. The important thing is, that they must be correct(hence, he will have to research). If he doesn't seem to interested, you can show him that his comic book heroes put a lot of work in to researching their stuff when they write them, and that might make him realize it will require some work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another student will require some different approach. As a teacher, that is your job... and it is work and requires you to learn too(if, as a teacher, you are not learning, then you are not a teacher. Remember, everything is equal and opposite... yin/yang... balance). Humans are imitators. If a teacher is willing to learn then the students will see/feel that and also become better learners... having them &quot;teach&quot; is a good way to amplify that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the student seems like he works better in a group, then you could build a project taking that in to account. Utilizing each students strengths and balancing them with their weaknesses is the best way to learn. You do not work on your strengths, that is useless. Balance is the key, and to do that we must work on our weaknesses. This might involve some clever problem solving to get it to work. When you just stick kids together and tell them to do something, it rarely works on an individual level. One kid that is good at X does X and never learns Y. The other kid good at Y does Y and never learns X. You must get the first kid to do Y but he thinks he is doing X, the other kid facilitates the first kid learning Y and vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These types of things are true teaching. &quot;Modern&quot; teaching is broke and does the exact opposite of what is desired. Throwing information at students is useless because information is not the problem. If that were the case, then it would only take about 1 week for students to learn what they now spend months in a classroom trying to learn. They'd just read books and work a bunch of problems and then be &quot;masters&quot; of it. The problem is, they don't see any point in doing it and hence don't engage their full mental capacities to learn. Even those that are interested generally have issues that slow them down(e.g., bad at math because they are not interested in math but love CS... which they try to get stronger at CS but are weak at math and because CS is predicated on math, they never really can progress after some point. They actually need to love math just as much as CS and learn just as much and become balanced, then their rate of learning CS will become much faster... but then they hate English and reach that plateau and have the same problem).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in parting, I'd simply say, focus on the students and find a way(there is a way, it can be done). Your coworkers, if unwilling, will just slow you down and waste your time. They are far more corrupted than your students because they've been in the broken system far longer. If you come up with a way that works, they will eventually realize it and start to change. You can only change someone by example as very few can do so through logic alone. Give someone hope, purpose, and a means and they can change the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[This was all off the cuff so you'll have to not get bogged down in the grammar errors, etc. I'm to lazy to go back and edit, sorry.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Additional thoughts about having students(or people in general, work in groups).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, we know that each human being is has both unique/distinct and similar/identical characteristics. We also know that certain behaviors, traits, beliefs, experiences, etc complement each other and contradict each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These must be taken in to account as much as feasible to optimize the result(after all, what we are trying to do is develop an algorithm, a mathematical solution to a problem, albeit, a problem that is theoretically infinitely complex).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could try to formulate something specific but I think, because of the complexity, you have to go mainly off instinct and &quot;feel&quot;. Eventually you might learn certain patterns that work in general but I can't offer anything that would probably be of any use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because we cannot describe every characteristic each student(which, ultimately, this applies to humans in general, think of your own experiences both as a student, a teacher, etc), we can't even begin to understand how those different characteristics between each student interact(we obviously know some general principles such as two ego maniacs generally won't get along because they will fight for the singular spot of &quot;leader&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what we really have is an experiment that must take place. I will try to describe what I would do if I were a teacher to optimize the students learning about life(since the actual subject matter is secondary and only is suppose to support that).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Day 1&quot; - I have N students. The first goal is to find the quickest solution to get to understand each one individual so I can make proper choices about them and how to do my job as effective as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, each student needs to do the same. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'd first explain this stuff to them saying why we are doing what we do. I'd explain about my self also. Basically this gives them a &quot;model&quot; to go by. I'd talk about my own life and experiences. I've be blunt and real about things. Sugar coating things doesn't help them. They will be full fledged &quot;adults&quot; soon so the better they understand what life really is the better off they will be. I'd try not to be boring and try only to hit the most useful points that will help them. Comedy is good but it has to be in moderation and not contrived. Also, it should involve movement. Take a walk. A classroom is inherently static, non-inspiring, and non-cerebral(generally speaking). If you want to engage them, you must engage their senses, we remember best when we &quot;feel&quot; it(meaning our senses are active).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, this sets everything up and lays a foundation. Humans are inherently very perceptive and will pick up on all behaviors and traits, then filter them. While, we can't be perfect, we can do a better job than what is usually done(just imagine all the teachers you had that didn't doing anything for you vs the ones that did. The ones that did were doing something better than those that didn't, on some level... at least. But, of course, your own view is distorted so don't ignore the ones that didn't, they might have effected someone else with a different personality in a good way).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd then break the students in to large groups. Here, the goal is to work on the principle that humans feel safer when in groups rather than when &quot;all eyes are on me&quot;. (although extroverts generally like that, they will get their chance)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, a round table type of discussion could be had. Very informal but with purpose. e.g., about life, about learning the subject matter, etc. Allow students to acclimate to what is going and to become less defensive by interacting with those around them. Not a lot of time has to be spent doing this, it's purpose is less informational and more emotional(comfort), but things can be learned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I'd break the group in to smaller groups and do similar things. Shuffling people around, observing. I'd continue this process in some form or another in to smaller ground(possibly one on one if time permits, but it is not necessary to go that small).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I'd have the students introduce themselves individually to the whole group and sort of do the same thing that I did in the first place. They can talk about their life, their goals, what they do for fun, etc. Take notes, this is where you get information to make more informed decisions. They are learning to be leaders, interpersonal skills, etc. Make it clear that awkwardness, embarrassment, etc are all normal but we learn to overcome these things by doing things that make us feel that way. You must try your best to make them feel comfortable so they can relax. Physical and emotional tension is not good because it cuts off both mental and physical capabilities(musicians know this well).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also have a one on one with each student so I can learn specifics about them. This is where most of the relevant information(and previous ideas about them can be clarified or abandoned) comes from. Taking notes helps. You are more of a psychologist at this point trying to understand the individual problem of the kid and also trying to help them understand how to break out of their bad habits(in subtle ways).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of this method and order(rather than starting with the last first, which is wrong), is because it is logical with human behavior. Generally, most classes just through you to the wolfs. What this does is create more imbalance in an individual. If you are shy and introverted, you generally end up with more anxiety. If you are an extrovert, you become more of an extrovert. Balance is not achieved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By starting with less tension, and because of human behavior/psychology, we can control the tension. While an introvert may still have some anxiety, it will be far less because they know the people around them better. They will be more comfortable in the long run. Extroverts will learn to listen a little more, since they generally do not have anxiety problem in groups, so it is not a big deal to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whole point of the process is to form as much of an open channel of communication and equality as possible. Get try to get the students in to a mode of thinking that is beneficial to everyone around them. Kids are very smart, if you explain things to them properly(that is logically, possibly with real evidence), they will except it(knowledge isn't about &quot;understanding&quot; but about acceptance/believe).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may take a day, a week, a month to do and might be an ongoing thing. It is an investment that is worth far more than simply doing what most classes do which is try to get the material fed in to the students. Why? Because, again, the material is not the issue. We learn instantaneously when the right conditions are met, and we must meet those conditions before learning can take place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind two things: 1. I may speak in black in white sometimes but everything is a spectrum and everything falls somewhere in between the extremes. 2. The students have to be made aware of why things are being done differently from what they expect. This mentally prepares them for something new and will also excite them and allow them to behave differently. You must explain things, things that are not normally discussed in class(specially CS) such as mentality(why we behave the way we do), etc. You must also tailor all this stuff to be age appropriate and context dependent but the underlying foundation must be laid, regardless. 2nd graders need to be explained in wording that they understand while college students will require different explanations using different terminology, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point one starts moving in to the point of the course, the material the students are expected to know. But having the proper foundation is key. What is the point of them learning if they use it for &quot;evil&quot; purposes, so to speak?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if we have succeeded in our goals, that part should now be much easier, and for all time to come. They will benefit in their whole life. While, one could argue that such things should be done in preparatory classes and such, I think that is wrong. These are foundational problems that must be dealt with and because the educational system is so broke we must attack it head on. All the schooling in the world is useless if it's humanity dies off because everyone is killing each other over greed, ignorance, etc. Humans are already the most intelligent creatures on this planet but also the most reckless and hateful, so &quot;education&quot;(knowledge hoarding) is not really as important as many think. We already have the ability to basically solve almost all our problems, so formal education isn't really going to help us more than that... what humanity needs is education in the human element, so to speak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, once such a system has been applied, students should feel comfortable around each other(more so, if not, then new techniques must be applied to create that effect) and be more open to ideas and learning and just about life in general.  Once you get to that point, and can reduce the ego(which, for some students, and depending on age, you might have to spend extra time on the individual basis).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students want to learn, they will learn, regardless if they are in groups or not. Any student that is imbalanced in X, if supported will become balanced. With technology today, a teacher doesn't really even have to teach... they must simply open the students mind in to the concept of learning. If you can excite the student to have the desire to learn, regardless if you teach them any &quot;material&quot; they will simply learn it on their own by getting on the internet and finding the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefor, that is why I think it is far more important to work on the psychological and social foundations first.. which are almost entirely neglected in the &quot;modern&quot; education system. No doubt because most teachers only partially know their subject material and hence, are also clueless as the students about what really is going on. Hence they just stand up in front of a chalk board or computer screen and imitate what they experienced as a student rather than trying to understand their true purpose in the human experience. I'm not condemning these people, but simply pointing out that they are products of a broken system so too are broken. Some of us get it, I think you are one. Simply do your best and never give up, regardless of the masses that want you to join them. If you fail, you fail and are no different, but if you try you have a chance of &lt;em&gt;more&lt;/em&gt; success and are helping build something that will get humanity in to a much better place than what it currently is(and which the greatness that we have achieved is due to people like us that existed in the past and paved the way for us... The current state of affairs is unfortunate but not due to the ones that tried but due to the ones that didn't).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, best of luck! ;)&lt;/p&gt;&#xA;" OwnerUserId="1638" LastEditorUserId="1638" LastEditDate="2017-07-02T20:31:18.703" LastActivityDate="2017-07-02T20:31:18.703" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1361" PostTypeId="2" ParentId="1357" CreationDate="2017-07-02T19:00:17.023" Score="4" Body="&lt;p&gt;Firstly, I would say that some things &lt;em&gt;do&lt;/em&gt; come before content. Student safety and well being, for one. If you are so focused on content you can't see that a student is having serious problems (bullying, home life, etc) then that's no good. A student must be able to &quot;ingest&quot; the content being presented, and they can't really do that if they aren't well fed, feeling safe, tired, sad, &quot;antsy&quot; or feeling like moving (seriously - ever tried going from P.E. right into a test?), etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let's say that first step is fulfilled, and a student is able to pay attention. The next thing I'd say is presentation. This is the difference between plopping up the quadratic formula on the board in Algebra I and having every student write it in their notes and move on, and explaining it, perhaps with some examples, or whatever. In both cases, the students &quot;get&quot; the information, but unless they are devoted textbook readers and question-askers, I doubt they'd actually understand it and be able to use it. Of course, this doesn't necessarily mean just explaining it, this means keeping the student's attention, it means slideshows, videos, activities, demonstrations - things other than just the robot droning teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, practice. What use is information if it can't be used? Problems, labs, and so on, are just as important as the content itself. You can't have a presentation or a problem about nothing - there has to be some substance to it. But the content won't get through with the presentations and it won't be useful without the problems. But safety and well-being of the students comes above it all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, study strategies are important, and so are the prerequisites for the content. These are things, which, if the students don't understand, will make things a lot harder for them. There's probably also things I haven't thought of here - this was supposed to be a general overview and then got a little longer than I thought =) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So: is content king? No, content alone cannot do much. It must be coupled with a student ready and able to learn, a good presentation, and practice to solidify the content and make it useful.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-02T19:00:17.023" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1362" PostTypeId="2" ParentId="1357" CreationDate="2017-07-02T20:45:33.630" Score="1" Body="&lt;p&gt;I'll bite. I discuss this with my co-instructor constantly. We have a goal: our adult students need to be hireable in about a year. Our institution covers soft skills, fitness and job search along with the program of study. We want them to get a job at the end, or get redirected as soon as we can see that this program is not a good fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how do you get an adult with no background hired as a programmer in a year? There are over 100 high level languages in common use. We could focus on Windows, other OS, web applications, etc. We chose C# and Windows and ADO as our track. This is still a steep road for a non-programmer to undertake.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We agree that they need exposure to the fundamental concepts, to know how to find things, and remember that the dimly-recalled thing is probably the answer. &lt;strong&gt;Our analogy is to make lots of &quot;hooks they can hang ideas on&quot;&lt;/strong&gt; rather than creating a big systematic worldview. That is how we both learned and had programming careers. Someone once said that &lt;em&gt;it is more important to have the right ideas than to have the ideas right&lt;/em&gt;. If you try the right sort of solution, you will be able to deal with errors. But if you start in the wrong place entirely, or have no idea where to start, then that is worse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With tools like Intellisense, you can see all the parts of a class when you need to, and then can choose the Search method or whatever. The &quot;hook&quot; concept is to know it is there, not memorize &lt;em&gt;what-all&lt;/em&gt; is there. With enough basic concepts, you can assemble the needed details. The two of us have a general idea of which concepts are essential and which can wait to be added / discovered later. Also, we have a ranking of what is more vital, so if a group takes longer than expected, we can defer or drop some things. This is based on an intuitive overview, not a big, pre-structured plan.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-07-02T21:05:14.203" LastActivityDate="2017-07-02T21:05:14.203" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1363" PostTypeId="1" CreationDate="2017-07-02T21:57:54.067" Score="13" ViewCount="501" Body="&lt;p&gt;How are novices' mental models of variable storage affected by programming language choices? Most Intro to CS teachers (I think) do not delve with breadth and depth into details of how variable names are tied to data and datatype. As a result, some students create pieces of their own mental model of how the computer is storing these variable names, data, and data type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What mental models of memory storage in general (and for sequences in particular) are typical in students who learn Python first vs. students who learn another language first- one that treats arrays more like C does?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several single-university studies (&lt;a href=&quot;http://www.tandfonline.com/doi/full/10.11120/ital.2011.10010086&quot; rel=&quot;noreferrer&quot;&gt;e.g. Jayal et al. 2015&lt;/a&gt;) have found that a post-secondary sequence that starts out with Python and then transitions to Java performs as well as a sequence that starts in Java. &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1030/transition-from-java-to-python&quot;&gt;Another question&lt;/a&gt; asks how to optimize that transition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python has particular elements that do not correspond well to Java, however. Negative indices (with which &lt;code&gt;a=[1, 2, 4, 6]&lt;/code&gt; means that &lt;code&gt;a[-1]&lt;/code&gt; is &lt;code&gt;6&lt;/code&gt;) and slices (with which &lt;code&gt;a[1:3]&lt;/code&gt; is &lt;code&gt;[2, 4]&lt;/code&gt;) are commonly found in code students stumble upon on the Internet, making it somewhat useful to mention these language features when teaching about lists and strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python's native types don't include a type in which pointer arithmetic can be exploited for speed, though the &lt;code&gt;numpy&lt;/code&gt; library offers an array. I suspect that when students learn about Java arrays, they probably build a mental model that fairly closely matches how arrays are stored in memory in C. Python does not actually store lists in a sequence of equally sized memory blocks; &lt;code&gt;[3, 'a', 5.2]&lt;/code&gt; is a perfectly valid list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does the mixed-type sequence or slicing or negative indexing in Python change a student's initial mental model for lists, arrays, and other sequences?&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="58" LastEditDate="2017-07-11T02:43:19.017" LastActivityDate="2017-07-13T20:43:31.470" Title="Do Python and Java lead students to construct different mental models of memory?" Tags="|java|python|variables|" AnswerCount="3" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1364" PostTypeId="2" ParentId="1357" CreationDate="2017-07-02T23:08:02.570" Score="4" Body="&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: &lt;em&gt;This answer is not long, but it is not meant to be skimmed.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important goal is to make emotionally healthy, capable, empowered adults who can solve the problems that life throws at them in the future.  We don't get to know what those problems are. Many of the problems don't exist yet. We don't get to know what tools will be available to solve the problems. Many of the tools don't exist yet.  All of which leaves us with the central challenge: we ultimately must teach our students to be adaptive, flexible thinkers and learners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flexibility comes from learned patterns of thinking (literally patterns and formations of neurons that allow us to easily integrate similar future patterns of thinking) and from meta-learning knowledge (e.g. &quot;I am capable of learning new material when I need to by breaking things down into steps&quot;, or &quot;I tend to learn more easily from books than from videos&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course material, then, is somewhat secondary to the central concern. Carefully chosen, however, it becomes the motivation for the more central learning.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is important: every school that I've ever heard of offering a class like &quot;study skills&quot; eventually dropped it.  Directly studying how to learn does not appear to serve us well. We need rich systems to engage with, and we then come to the meta-learning slowly  and in due time.  That is what the course material accomplishes for us. It is the rich set of motivating material with which we can empower people to solve the problems of the future.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-02T23:08:02.570" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1365" PostTypeId="2" ParentId="1363" CreationDate="2017-07-02T23:53:37.080" Score="3" Body="&lt;p&gt;I'm pretty sure that a general answer isn't possible here and it depends too much on at least (a) what the student has seen before, and (b) how the prof and other available materials describe things. In strong OOP languages (or with a strong OOP style in a weaker language), I can give students a mental model of computation that doesn't depend on a map to a machine. There is no post office boxes metaphor or equal size boxes, etc. The student can go quite a long while with this model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, all data can be owned by objects and each object has a dictionary (informal concept) that maps variable names to values. The dictionary may be editable (variables) or not (constants). An array can be defined as a function from an index set [1..n] to some set of values. The function may be modifiable, or not. etc. A variable isn't a box, but a mutable reference to a value. A constant isn't a box (or even a value) but an immutable reference to a value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My reason for doing this is that when they &lt;em&gt;depend on&lt;/em&gt; a machine memory model and when they are presented with a problem they have to (1) map the high level concept in Ruby/Python/Java into the machine model, (2) think about how it works there and then (3) map it back to the code level. Avoiding the maps altogether seems to be an order of magnitude simpler. Just give them a single, &lt;em&gt;high level&lt;/em&gt; model in which they can think consistently without errors of interpretation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But yes, many teachers were taught with a C-like model and so solve most problems in a C-like way, so they teach their students to do that as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me, a somewhat more interesting question (for your java &amp;lt;-&gt; python example) is, does learning to program in a language with fewer rules but more dependence on style and testing for correctness (python) first &lt;em&gt;help or hinder&lt;/em&gt; later programming in a language with lots of enforced rules that even make some legal problems illegal (since the type checker isn't omniscient). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OR, does learning to get along with the type police (java) first, &lt;em&gt;help or hinder&lt;/em&gt; later learning in a free world, where certain types of correctness are suddenly on the back of the programmer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python programmer like to rail against the java checker. But they can also fall into holes that the java compiler would shunt them around. I like types and the checks they provide, but you may not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course, it matters more for some students than others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, your model is unlikely to be a very close match with reality anyway. How many levels of cache? It is a low level artificial construct. I prefer a high level artificial construct. Of course I &lt;em&gt;really&lt;/em&gt; had to know those things, just after the Chicxulub incident when I was writing FORTRAN. But at least the dinosaurs were gone. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-02T23:53:37.080" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="1366" PostTypeId="2" ParentId="1357" CreationDate="2017-07-03T01:56:00.710" Score="2" Body="&lt;p&gt;&quot;Active learning&quot; teaching techniques in STEM courses increase performance by half a standard deviation compared to traditional instruction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The National Academy of Sciences (an authoritative source) published a review of literature (an article which puts together all articles that meet date and study characteristics criteria) on active learning vs. traditional lecture in university STEM courses. The metastudy concluded that the data were so conclusive that it is no longer ethical to conduct such human experiments in which half the university students receive traditional instruction. The metastudy suggested that subsequent studies should instead drop the traditional-classroom control group and pit one active learning technique against another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Freeman et al. (2014). Active learning increases student performance in science, engineering, and mathematics. Proceedings of the National Academy of Sciences 111:23. Retrieved from &lt;a href=&quot;http://www.pnas.org/content/111/23/8410.full&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.pnas.org/content/111/23/8410.full&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-07-03T01:56:00.710" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1367" PostTypeId="5" CreationDate="2017-07-03T02:05:49.413" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-03T02:05:49.413" LastActivityDate="2017-07-03T02:05:49.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1368" PostTypeId="4" CreationDate="2017-07-03T02:05:49.413" Score="0" Body="Empirical questions have a correct answer determined by data, which may or may not yet exist. A &quot;correct&quot; answer might be selected based on data available so far and mentioned so far, but the correct answer is &quot;out there,&quot; perhaps not yet sufficiently measured and reported.&#xD;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-03T08:56:52.697" LastActivityDate="2017-07-03T08:56:52.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1369" PostTypeId="2" ParentId="1157" CreationDate="2017-07-03T02:53:55.877" Score="3" Body="&lt;p&gt;Your curriculum for CS Principles should &lt;strong&gt;evolve over time&lt;/strong&gt; as your students' background evolves over time. If your students' background is not evolving from year to year, your district is implementing CS too late in the K-12 sequence. That is, if your AP CSP is a 10th grade course, a 2017 crop of 10th graders might be new to programming and you can softball and differentiate your instruction in order to &lt;strong&gt;avoid preparatory privilege&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In designing a CS program, school districts should aim for CS experiences and achievement in elementary and middle schools (ages 6-14) such that a 10th grade (age 15-16) course should be full of students who have already created and debugged a program. If that's your use case, rigorous projects can be achieved across the CS Principles framework of objectives. On the other hand, if a school district is just starting to develop a CS program, CS Principles is not an unreasonable place to start. Indeed, most CS Principles curricula assume no CS background knowledge. There are still lots of schools that don't teach CS, so most students transferring into a district require this differentiation anyway.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2018-07-23T15:47:24.600" LastActivityDate="2018-07-23T15:47:24.600" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1370" PostTypeId="2" ParentId="872" CreationDate="2017-07-03T03:09:54.377" Score="0" Body="&lt;p&gt;Use a rubric, even for a small assignment, that requires:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;two or three incrementally developed, working versions of code&lt;/li&gt;&#xA;&lt;li&gt;one non-working version of code with a explanation of the error and how it was identified.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I distribute starter code with a filename like &lt;code&gt;assignment_6_imageArtist_YourNames_v0&lt;/code&gt; and ask that teams turn in files labelled with the names and &lt;code&gt;v1&lt;/code&gt;, &lt;code&gt;v2&lt;/code&gt;, and &lt;code&gt;v3&lt;/code&gt; and the non-working version &lt;code&gt;v1.1&lt;/code&gt; or &lt;code&gt;v2.5&lt;/code&gt; for example. &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-07-03T03:09:54.377" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1371" PostTypeId="2" ParentId="1363" CreationDate="2017-07-03T03:50:13.870" Score="5" Body="&lt;p&gt;I am not aware that cognitive modeling of memory structures in early programming education has been directly studied, so anything that I say here is entirely speculative.  However, I suspect that the models themselves would somewhat depend on teacher presentation, and would otherwise be relatively stable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take negative indexing as an example.  A reasonable initial cognitive model for a list would be some sort of cycle.  If it is later explained as an array with indexing performed with a modular operation, then we have moved our conception to some sort of line.  When we even later explain about memory references and data size, then we can finish the picture as an array (line) of fixed size memory references, each pointing to a different object in the heap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are only so many simple physical shapes that we can use to represent these ideas.  Which actual conceptualization a student takes will depend on their maturity in the subject matter and on how the data structure is presented by the instructor.  I don't see any reason to believe that the initial choice of language would have any substantive, lasting impact on these cognitive models as the student matures in their understanding.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-03T03:50:13.870" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1372" PostTypeId="2" ParentId="211" CreationDate="2017-07-03T03:51:20.317" Score="6" Body="&lt;p&gt;&lt;strong&gt;Draw ongoing attention to the potentially confusing point by banning cardinal descriptions of an element's position.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Avoid referring to the &quot;first element&quot; or &quot;second element&quot; and talk only about &quot;element at index 0&quot; or &quot;at index 1.&quot; Insist that your students speak only of indices and not of position in a sequence. If you ever use cardinal numbers in human language, you might get it right (&quot;the second element is the element at index 1&quot;) but beginners will stumble, as you point out. If you correct with a smile when a student speaks to refer to an element with cardinal numbers, the class will join you in &quot;catching&quot; cardinal language. While there's nothing wrong with cardinal language, a playful &quot;ban&quot; gives students the opportunity to think through the point of confusion every time someone speaks about an index.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question as to &quot;does teaching pointer arithmetic reduce student mistakes related to 0-indexing&quot; is an empirical question. I don't know, but I'm suggesting another treatment, the playful ban. My evidence is mere anecdotal experience that this works in my classroom with my teaching style. There does not exist, to my knowledge, any report in the CS ed literature comparing students in a class that &quot;prohibits&quot; cardinal description by friendly censors vs. a class that does no such thing. As CS educators, we have a long way to go before we can boast of a compendium of empirically derived pedagogical content knowledge. Physics has the tome I envy: a 4-pound 11-pt-font book summarizing peer-reviewed measurement of effects of classroom nuances like this. Please, CS ed, produce something akin to &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0471137073&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Teaching Introductory Physics&lt;/em&gt;&lt;/a&gt;. Guzdial's &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1627053514&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Learner-centered Design of Computing Education&lt;/em&gt;&lt;/a&gt; is a wonderful book, but we have a long way to go to match the physics education community's understanding of their craft. &lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-03T15:50:53.547" LastActivityDate="2017-07-03T15:50:53.547" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1373" PostTypeId="1" AcceptedAnswerId="1392" CreationDate="2017-07-03T10:37:08.407" Score="4" ViewCount="1535" Body="&lt;p&gt;While lambda expressions in java 8 are really cool in action, the school curriculum offers no exercises in this. So essentially, students never actually learn &lt;em&gt;how to use&lt;/em&gt; lambda expressions and the java 8 functional interfaces that go with it when teaching in java (i.e. &lt;code&gt;Stream&lt;/code&gt;, &lt;code&gt;Predicate&lt;/code&gt; etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few periods for labs and practice which can be devoted for lambda expressions, but I am not sure what kind of labs I can make, which are &lt;em&gt;focused&lt;/em&gt; on lambda expressions (not only &lt;em&gt;utilizing&lt;/em&gt; them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I &lt;em&gt;did&lt;/em&gt; think of is asking them to perform a number of tasks:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;given a &lt;code&gt;List&lt;/code&gt; of &lt;code&gt;String&lt;/code&gt; and some condition (not coded as a &lt;code&gt;Predicate&lt;/code&gt;, yet...), return a &lt;code&gt;List&lt;/code&gt; of all strings that meet the condition. This exercise is meant as a starter. Just to get them going.&lt;/li&gt;&#xA;&lt;li&gt;Here the fun starts &lt;code&gt;Stream&lt;/code&gt;ing. They are given a list of objects (which I wrote) that each have a String and an Integer. They need to return a list of the integers from those objects. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The problem is that those two are very short, and are introductory. I am trying to think of other exercises or tasks which are almost entirely with lambda expressions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which kind of exercises could I give the students that would both show them just how cool lambda expressions and the functional API are, but also give them plenty of hands-on experience with what Java's functional API has to offer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(PS, the students are high school students)&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-03T12:51:58.440" LastActivityDate="2017-07-15T17:52:15.433" Title="Lambda expressions exercises and practice" Tags="|secondary-education|java|exercises|lambda-expressions|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1374" PostTypeId="5" CreationDate="2017-07-03T11:01:57.297" Score="0" Body="&lt;p&gt;Pair Programming is a work method describing two programmers working on the same machine. This technique is an agile development technique, and so the effectiveness of this techniques relies on collaborative effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Pair Programming, one of the programmers writes the code, whilst the other reviews his work as it is written. The one who reviews also keeps in mind the direction of work; he thinks of improvements and ways to deal with potential future bugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Pair Programming two people work together at one screen, with one doing the actual coding (taking a microscopic view) and the other overlooking and commenting on the developing program. The latter person naturally takes a wider, more strategic, view of the code and comments as necessary on adherence to standards and conventions as well as reminding the other of past decisions. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-07-13T20:27:22.753" LastActivityDate="2017-07-13T20:27:22.753" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1375" PostTypeId="4" CreationDate="2017-07-03T11:01:57.297" Score="0" Body="Questions use this tag appropriately if they concern the costs and benefits of using pair programming within the education context. Questions about how to introduce pair programming into teaching are also a good fit here. More general questions of the usefulness of pair programming, say in industry, are more appropriate elsewhere.  " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T20:27:16.187" LastActivityDate="2017-07-13T20:27:16.187" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1376" PostTypeId="2" ParentId="1302" CreationDate="2017-07-03T11:22:59.390" Score="1" Body="&lt;p&gt;I tend to avoid multiple students working on the same code simultaneously (Google Docs style) because it's really difficult to assess what has been done by each student or to stop one student dominating whilst the other doesn't understand what's happening. Either that or students tend to get distracted by what the other is writing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said that, you could try:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One person writes code whilst the other writes comments. This forces the two to discuss both what they're doing and what they're planning to do next.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other paired programming techniques that don't involve simultaneous access:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Allocating a 'driver' and a 'navigator' to each pair of students: the navigator isn't allowed to touch the mouse of keyboard. The driver has to follow the navigator's instructions. Students swap after a set time. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Sabotage and share: get students to make deliberate syntax / runtime / logical errors in their code then share a link to their code in a shared document / forum. Get students to record each error they find and fix. Award points per bug fixed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="674" LastActivityDate="2017-07-03T11:22:59.390" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1377" PostTypeId="2" ParentId="1331" CreationDate="2017-07-03T12:04:37.737" Score="2" Body="&lt;p&gt;As a former student I'd like to confess that for me these attempted analogies about the ports just made a simple thing sound mysterious and in retrospect had absolutely zero insight whatsoever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What about saying instead that TCP/IP is just a program running on your computer like everything else and ports are just an integer in its configuration.&lt;/strong&gt; That'd be a start.&lt;/p&gt;&#xA;" OwnerUserId="1626" LastActivityDate="2017-07-03T12:04:37.737" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1378" PostTypeId="2" ParentId="1300" CreationDate="2017-07-03T12:49:48.903" Score="6" Body="&lt;p&gt;I don't teach CS in any official capacity but I have tutored a number of friends and colleagues on the basics. I find that differentiating the language I use when describing the different concepts helps a lot, for instance:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mathematical &lt;code&gt;x=x*x&lt;/code&gt; = &quot;X equals X squared&quot;&lt;/li&gt;&#xA;&lt;li&gt;Assignment &lt;code&gt;x=x*x&lt;/code&gt; = &quot;X is made equal to X squared&quot;&lt;/li&gt;&#xA;&lt;li&gt;Comparison &lt;code&gt;x==x*x&lt;/code&gt;= &quot;Test if X is equal to X squared&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Using the above terms when talking through code I have never been asked to explain the difference between assignment and comparison. YMMV&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this stemmed from the first language I was taught academically was pascal where the assignment operator is &lt;code&gt;:=&lt;/code&gt; and comparison is &lt;code&gt;=&lt;/code&gt;, having that difference caused me to internally narrate my code in this way, which has helped my understanding and my vocabulary when explaining to others.&lt;/p&gt;&#xA;" OwnerUserId="1123" LastActivityDate="2017-07-03T12:49:48.903" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1379" PostTypeId="2" ParentId="1373" CreationDate="2017-07-03T13:16:05.327" Score="5" Body="&lt;p&gt;One of the interesting things added to java in v8 is functional interfaces. Previously java only matched things up and verified correctness by type (type names). With functional interfaces, java now looks at the structure of code in certain situations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can add examples to this answer to clarify if anyone asks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One interesting feature you can add is a method to do simple repetition. I like to teach a lot of things before if and while, but sometimes you just need repetition and the most common sort is a constant-number-of-iterations loop. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@FunctionalInterface&#xA;public interface LocalCommand  &#xA;{    &#xA;    public void accept();&#xA;&#xA;}&#xA;&#xA;/**&#xA; *  Repeat a method a given number of times&#xA; * @param howMany number of times to repeat the method&#xA; * @param what the method itself, as a Command. Especially useful in Java 8&#xA;*/&#xA;public static void repeat(int howMany, LocalCommand what){&#xA;    for (int i = 0; i &amp;lt; howMany; ++i){&#xA;        what.accept();&#xA;    } &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void aCommand(){&#xA;    // do something interesting&#xA;}&#xA;&#xA;repeat(3, aCommand()); // structural matching with the functional interface&#xA;repeat(3, () -&amp;gt; {aCommand();}); //lambda expression   &#xA;repeat(3, () -&amp;gt; {System.out.println(&quot;Hello&quot;);}); //lambda expression&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In java 8 you don't need to ever explicitly say that aCommand is, in fact, aCommand and you don't need a new enclosing type to implement the functional interface. You don't even need to specifically say that it is a functional interface, Java will grok it by structure alone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With repeat(...) in my library I can do repetition before I need to talk about &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; loops.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I used only the simplest case of a functional interface here. You can use Consumers, etc just as well with only a bit more complexity. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-03T13:39:45.187" LastActivityDate="2017-07-03T13:39:45.187" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1380" PostTypeId="1" AcceptedAnswerId="1432" CreationDate="2017-07-03T13:21:13.607" Score="7" ViewCount="271" Body="&lt;p&gt;Normally, Java 2 is a prerequisite for my Computer Architecture course. I gave permission to a strong student who has only taken Java 1 to take Computer Architecture, provided that she learn the basics recursion over the summer. (In Computer Architecture,  the student write recursive programs in assembly language.) Can anyone recommend a free online source where she can pick up, and ideally practice, elementary recursion? The only language she knows is Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I modified my question to make more clear that I am only asking about elementary recursion. (I teach about recursion, in depth, in a more advanced course, Programming Languages, in the functional programming unit.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ended up recommending to the student:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Any of&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://introcs.cs.princeton.edu/java/23recursion/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Recursion section&lt;/a&gt; of &lt;a href=&quot;http://introcs.cs.princeton.edu/java/home/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Programming in Java&lt;/a&gt; by  Robert Sedgewick and Kevin Wayne, recommended by ItamarG3&lt;/li&gt;&#xA;&lt;li&gt;Chapters 17 and 18 of &lt;a href=&quot;http://www.toves.org/books/java/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Programming via Java&lt;/a&gt; by Carl Burch&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://study.cs50.net/recursion&quot; rel=&quot;nofollow noreferrer&quot;&gt;Recursion&lt;/a&gt; in &lt;a href=&quot;https://study.cs50.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS50 Study&lt;/a&gt;, recommended by Peter&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codingbat.com/java/Recursion-1&quot; rel=&quot;nofollow noreferrer&quot;&gt;Recursion-1 problems&lt;/a&gt; from &lt;a href=&quot;http://codingbat.com/java&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt;, recommended by Peter&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-06T14:36:03.390" LastActivityDate="2017-07-06T14:36:03.390" Title="Where can a student independently learn elementary recursion, preferably in Java?" Tags="|java|resource-request|recursion|" AnswerCount="6" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="1381" PostTypeId="2" ParentId="1373" CreationDate="2017-07-03T13:22:37.790" Score="1" Body="&lt;p&gt;A second example of fairly simple lambda expressions that lets you delve into some interesting side discussions is the problem of reversing a linked list in linear time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy to use list 'head', 'tail', and 'cons' to write a method, putlast, that puts the head of a list at its tail, removing it from the head, but otherwise leaving the elements intact. This function runs in linear time on a linked list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy to write reverseList using putLast, but it is quadratic in time and a discussion is useful to students if you are doing this sort of thing at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a bit more challenging to write a linear-time reverseList. The technique is very cool and teaches a lot about functional programming, not using intermediate variables to hold things. I won't give away the secret here as it is a mind expander to discover it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-03T13:22:37.790" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1382" PostTypeId="2" ParentId="1380" CreationDate="2017-07-03T13:29:38.480" Score="3" Body="&lt;p&gt;Eric Roberts wrote a great little book: &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0471701467&quot; rel=&quot;nofollow noreferrer&quot;&gt;Thinking Recursively&lt;/a&gt;. Hard to do better than that. He's a master. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whoa. Not cheap. Disclaimer - I'm not him and he doesn't give me kickbacks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll try to add something free, but you, the prof, should get a copy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://duckduckgo.com/?q=programming+recursively&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://duckduckgo.com/?q=programming+recursively&lt;/a&gt; may be all you need, actually.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-03T13:35:21.793" LastActivityDate="2017-07-03T13:35:21.793" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1383" PostTypeId="1" CreationDate="2017-07-03T14:36:45.407" Score="10" ViewCount="1095" Body="&lt;p&gt;Many of us use or have used Pair Programming in the classroom. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://www.agilealliance.org/glossary/pairing&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.agilealliance.org/glossary/pairing&lt;/a&gt; for a discussion if you like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://tandfonline.com/doi/abs/10.1080/08993408.2011.579808&quot; rel=&quot;nofollow noreferrer&quot;&gt;@BennettBrown has pointed to research showing its advantages&lt;/a&gt;, but not all users may have had positive experiences. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have tried it, what have you experienced both on the positive side and the negative side. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps more important is what else do you need to do in structuring your course to make up for any disadvantages or support any advantages. These might involve ensuring fairness in sharing work or in grading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tend to use it at every level, but there may be issues you see in various courses. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The answers seem to indicate a fair amount of misunderstanding of Pair Programming. It is not just two people assigned to a task. That can lead to division of labor, which often fails. If two people just divide up the work and do it unwisely, they have the additional task of integrating their work which can be very difficult. Neither is it one person just working and the other just &quot;reviewing&quot;. It is a much more cooperative endeavor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to really understand Pair Programming, the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0201745763&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pair Programming Illuminated&lt;/a&gt; is a great place to start. If you want to see Pairing integrated into a complete Agile Programming workflow of a small team, &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0321278658&quot; rel=&quot;nofollow noreferrer&quot;&gt;Extreme Programming Explained&lt;/a&gt; is good. I actually prefer the first edition if you can find it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-26T00:45:17.633" LastActivityDate="2018-06-26T01:00:06.163" Title="What advantages/disadvantages have you seen with Pair Programming in the classroom" Tags="|best-practice|classroom-management|pair-programming|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="1384" PostTypeId="2" ParentId="1347" CreationDate="2017-07-03T14:43:10.790" Score="2" Body="&lt;p&gt;I know this is mostly in discussion of Computer Science, but I'll speak on experience from a high school class that wasn't really my speed but was similarly &quot;results based&quot; (Building Construction) as I think this ties in with what you're saying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Honestly, I don't recall &lt;em&gt;why&lt;/em&gt; I signed up for it. Maybe it was to learn something, I have no idea. Also, the group of kids in my class, while peers, weren't exactly the group I felt most bonded with. The instructor was also a traditional Southern guy (this was in Alabama, although I never really felt part of all of that). So this would probably be a textbook &quot;glaze over&quot; scenario.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the instructor was very interested in what he was teaching and projected as such. Little by little, the coursework became more appealing (and you're essentially, safely as that was the primary thing preached, cutting wood constantly so there's that destructive inner-child itch that gets scratched) and I started to do better. By the end of the course, as a class we had to go to some lady's house and work on a storage enclosure. I did a few of the beams like others in the class did. There were some who were entrusted to do more. And there was no resentment to that group because they were top students, for the class, and you kind of expect them to be &quot;rewarded&quot; with the more important tasks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the day, and this isn't &quot;looking back&quot; rationalization or anything, I was content with where I was at: entering the class, I'd probably be one of the least likely to absorb anything from it/poor performers, but I did attain enough that I'd probably be &quot;average/above-average&quot; (think I had a low A or high B, but this was years ago) after all was said and done. I think the point I'm trying to make is essentially: engage the students, absolutely, but also don't assume that the end goals are the same across your classroom. If you want to chat with them individually to figure out what they are hoping to gain from your class and tailor your interactions with them around that, sure, go for it. Finding out what they intend to get out of the class could also help you in coaxing some of the harder to reach to trust in the curriculum.&lt;/p&gt;&#xA;" OwnerUserId="1477" LastEditorUserId="1477" LastEditDate="2017-07-03T14:57:16.943" LastActivityDate="2017-07-03T14:57:16.943" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1385" PostTypeId="2" ParentId="1383" CreationDate="2017-07-03T14:49:50.963" Score="4" Body="&lt;p&gt;I give 11 lab assignments in CS 1, and I assign partners for the first four or five so that students get to know each other, and then I let them choose their partners, or choose to work alone.  I try to discourage them from working alone, but some students just don't want to deal with people, and I feel bad forcing them.  (I also give six projects, worth more collectively than the 11 labs are, and they must work on these separately.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all anecdotal, because I only teach one section of CS 1 a semester, but: I don't see any patterns.  Some more socially awkward students find the right partner and have lots of success building skills and confidence during the semester, whereas others don't, and struggle alone for the rest of the semester.  Frequently, students who come in with previous knowledge (say, those taking the class the second time) will ignore their partners, or do the work and hand them the answer; but others seem to have the &quot;teaching gene&quot; and almost act like TAs for me with the weaker students.  It depends a lot on who the students are, and how lucky I get when I pair them up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do give each student a questionnaire the first day, so that I can try to match up the students with similar experience, or students that have already passed Calc I, or something, but (again, based on anecdotal data with a very small $n$) none of these seems to have much of an effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll be watching this discussion to see if anyone has done a lot of research on who to match up with whom, because I haven't figured it out yet.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastActivityDate="2017-07-03T14:49:50.963" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1386" PostTypeId="2" ParentId="1331" CreationDate="2017-07-03T15:04:41.337" Score="1" Body="&lt;p&gt;Using physical addresses is misleading - it would be clearer to use an email address, or a phone number. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If people still had &lt;a href=&quot;https://en.wikipedia.org/wiki/Plain_old_telephone_service&quot; rel=&quot;nofollow noreferrer&quot;&gt;POTS&lt;/a&gt; (telephone) in the house, you have segmented (area code) dynamic addresses, and 'mum, dad, youngest child etc.' which could represent ports - which are ways of reaching the same type of person in each house.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this analogy, you can explain that people's phone number sometimes changes (but doesn't have to, even if they move location), and there are many different ways of addressing a set of people who might be in a house. Depending on who is at home, a different person might actually handle any specific call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When someone places an outgoing call, you'd see which house the call was coming from, but not who (until they identify themselves).&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-07-03T15:16:14.107" LastActivityDate="2017-07-03T15:16:14.107" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1387" PostTypeId="2" ParentId="1300" CreationDate="2017-07-03T15:25:53.857" Score="1" Body="&lt;p&gt;The programmer's &lt;code&gt;x == x**2&lt;/code&gt; is the exact same statement as the mathematics $x=x^2$: it is a statement that can be either True or False. Most people are just rather cavalier in their usage of the mathematics version:  They'll just STATE that $x=x^2$ and then derive $x \in \{0,1\}$, but what they are really doing is writing a proof that if the statement $x=x^2$ is True, then the statement $x \in \{0,1\}$ is also True.  Notably, the statement $x=x^2$ does NOT simply constrain $x \in \{0,1\}$, since one might very well start out a mathematical argument as &quot;Suppose that $x=x^2$ is False....&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real difference is in the control structures surrounding the statement.  &lt;code&gt;if...then&lt;/code&gt; in programming is a control structure, whereas &lt;code&gt;if...then&lt;/code&gt; in mathematics is simply another statement that can be either True or False.... i.e. mathematics is generally concerned with the logical implications of $x=x^2$ being either True or False, whereas programmers are generally concerned with the difference of what they will show on a screen when &lt;code&gt;x==x**2&lt;/code&gt; or &lt;code&gt;x!=x**2&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="1661" LastActivityDate="2017-07-03T15:25:53.857" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1388" PostTypeId="2" ParentId="1383" CreationDate="2017-07-03T15:46:02.353" Score="2" Body="&lt;p&gt;I have seen pair programming both succeed spectacularly and fail miserably. The difference comes from a combination of a few factors, which are, in a way, the advantages and disadvantages of Pair Programming.&lt;/p&gt;&#xA;&lt;p&gt;One clear advantage is that both students in the pair get experience in writing code, and later reviewing code. (The pair programming I saw had students switching places every so often). This is a great way to give students the skills of coding and reviewing.&lt;/p&gt;&#xA;&lt;p&gt;Reviewing a peer's code can give the reviewing student 1) a broader perspective of code writing and 2) a toolbox for self-evaluation. So pair programming is very good for the reviewer.&lt;/p&gt;&#xA;&lt;p&gt;The programmer gets a lot of hands on experience, and also learns an essential tool, which I sometimes call &lt;em&gt;&amp;quot;Evaluation in Runtime&amp;quot;&lt;/em&gt;. This means that the programmer learns how to evaluate their work as they go, because they are given feedback from the reviewer. So the coder gets a lot of experience and some very important skills, which is great.&lt;/p&gt;&#xA;&lt;br&gt;&#xA;&lt;h3&gt;But,&lt;/h3&gt;&#xA;&lt;p&gt;It is &lt;em&gt;crucial&lt;/em&gt; that the paired students get along. If they have problems working together &lt;em&gt;at the beginning&lt;/em&gt;, it might escalate to a very difficult situation indeed.&lt;br /&gt;&#xA;All those amazing things I described earlier would all crumble to bits. So you have to be on the lookout for potential fights early on.&lt;/p&gt;&#xA;&lt;p&gt;This means that you'd probably need to see them working, and giving them &lt;em&gt;both&lt;/em&gt; tips on how to work together (such as telling the programmer that the reviewer sees things differently, and that they should listen to one another).&lt;/p&gt;&#xA;&lt;p&gt;If conflicts between the two arise, you might be able to re-pair &lt;sub&gt;(unintended pun. Well maybe it was intended)&lt;/sub&gt; those two, possibly with another problematic pair.&lt;/p&gt;&#xA;&lt;p&gt;It's also a good skill to learn how to work with people you'd rather not work with. But this situation is, as I see it, a last resort.&lt;/p&gt;&#xA;&lt;p&gt;And for ensuring fairness in sharing work, instruct the students to switch places every half hour or so. Depending on how much time you have, it's ideal that each students has as much experience in both position.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-03T16:14:57.497" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1389" PostTypeId="2" ParentId="1380" CreationDate="2017-07-03T16:07:52.890" Score="4" Body="&lt;p&gt;Often times, google is our best of friends &lt;sup&gt;&lt;sub&gt;(&lt;a href=&quot;https://blog.codinghorror.com/trouble-in-the-house-of-google/&quot; rel=&quot;noreferrer&quot;&gt;I hope&lt;/a&gt;)&lt;/sub&gt;&lt;/sup&gt;. A rather simple search leads to a very informative site: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://introcs.cs.princeton.edu/java/23recursion/&quot; rel=&quot;noreferrer&quot;&gt;http://introcs.cs.princeton.edu/java/23recursion/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is very thorough, and explains many use-cases for recursion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another very handy resource is, inevitably, Stack Overflow: &lt;a href=&quot;https://stackoverflow.com/questions/1247945/understanding-recursion-in-java&quot;&gt;this question&lt;/a&gt; also provides some information, but it is rather specific. Instead of staying there, one can navigate to the Related Questions section, and from there choose a promising question (usually the one with the highest votes, but not always) and reading it. And so on, and so on... (recursively &lt;code&gt;;)&lt;/code&gt;). &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-03T16:07:52.890" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1390" PostTypeId="1" CreationDate="2017-07-03T16:36:27.267" Score="9" ViewCount="228" Body="&lt;p&gt;First offered in 2016-17 (previously in pilot), the &lt;a href=&quot;https://apstudent.collegeboard.org/apcourse/ap-computer-science-principles&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS Principles assessment&lt;/a&gt; includes two open-ended through-course performance tasks and a timed paper exam containing multiple choice and multiple response questions. This question is about preparing students for the timed paper exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What strategies are effective ways to prepare for this exam? &#xA;What resources are available? How much if any class time should teachers plan on for going over practice questions along the way and in a spring review? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Calibration:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously it depends on student skills and knowledge coming in, on school environment, and on pass rate expectations. I'm trying to ask for advice useful to a typical teacher, but I also want answers aligned to the CS-4-All inclusive philosophy. So for the purpose of this question, please assume &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A school unremarkable in academic skills (not a magnet school, just average)&lt;/li&gt;&#xA;&lt;li&gt;All students in the school take the course as 10th graders with previous exploratory exposure to CS&lt;/li&gt;&#xA;&lt;li&gt;All students take the exam (e.g. district pays all costs)&lt;/li&gt;&#xA;&lt;li&gt;The teacher wants a higher percentage of students to score 4 or 5 than the percentage of 4s and 5s awarded to examinees overall. (&lt;a href=&quot;https://i.redd.it/gb77mf4iz86z.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;36% in 2017&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-06T14:19:20.600" LastActivityDate="2017-07-07T18:44:07.477" Title="What are effective ways to prepare students for the AP CS Principles Exam?" Tags="|secondary-education|ap-cs-principles|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1391" PostTypeId="2" ParentId="1380" CreationDate="2017-07-03T17:32:58.760" Score="1" Body="&lt;p&gt;This doesn't answer your question, but might be a resource for your course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back when (don't ask) Scot Drysdale (Dartmouth) and David Levine (Saint Bonaventure) had a great exercise for assembly language:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Animal&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write an assembly language program whose execution results in writing a true copy of itself elsewhere in memory and then executing the copy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A refinement is to erase (zero out) the original. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is recursion without a base case, of course, though you could trick it up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt; you can also give it a payload, which could be nasty, so beware and discuss. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also an example, in assembly, of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Quine_(computing)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quine&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Great fun too (sans payload).&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-03T20:54:36.143" LastActivityDate="2017-07-03T20:54:36.143" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1392" PostTypeId="2" ParentId="1373" CreationDate="2017-07-03T17:54:29.170" Score="2" Body="&lt;p&gt;One idea might be to borrow SQL-related exercises -- find problems asking the reader to come up with some sort of SQL query to find information, and rephrase the problem and ask students to come up with an equivalent query using only Java's functional interface and lambda expressions. (I wouldn't bother telling students these questions were originally about SQL).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Translating basic SELECT queries would be pretty straightforward, I imagine -- implementing things like JOIN or GROUPBY would be a little trickier, I imagine. (You can do join by doing something like &lt;code&gt;seq1.stream().flatMap(a -&amp;gt; seq2.stream().filter(b -&amp;gt; a.id == b.id).map(b -&amp;gt; combine(a, b))&lt;/code&gt; and group-by using &lt;code&gt;Collectors.groupingBy&lt;/code&gt;. The API isn't as elegant as it could be here, but I suppose that's Java for you.). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make it even trickier by asking them to translate the equivalent of nested queries or asking them to extract information from multiple lists at once (e.g. multiple 'tables'), instead of just one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stepping away from data manipulation, something else you could do is to introduce students to GUI frameworks or webserver backends or anything else that's event-driven -- &lt;a href=&quot;http://code.makery.ch/blog/javafx-8-event-handling-examples/&quot; rel=&quot;nofollow noreferrer&quot;&gt;event handlers&lt;/a&gt; are one example of a place where lambdas and method references shine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My last idea is a bit of a stretch, but you could perhaps ask students to invent (or use) a mini-DSL involving lambda expressions in some way. This would be a bit more involved -- the exercise would be less about using Java's already existing interface, and more about writing their own. (It's a shame that Java doesn't have anything like C#'s extension methods, otherwise this would be much easier since you can trivially augment the existing API, which can be pretty handy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need ideas for DSLs, you can maybe take inspiration from functional languages like Haskell and how they use higher-level constructs like monads and functors to build quite interesting abstractions and simplify things like error handling. I wouldn't use the word &quot;monad&quot; or &quot;functor&quot; at any point though, and you'll probably need to be careful to avoid accidentally making your exercise more about manipulating generics instead of lambdas.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-03T18:01:59.343" LastActivityDate="2017-07-03T18:01:59.343" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1394" PostTypeId="1" CreationDate="2017-07-03T21:35:48.017" Score="10" ViewCount="1314" Body="&lt;p&gt;What are engaging sources of data with which students can explore, develop questions, analyze, and draw conclusions in an intro CS course? I'm looking for flat files like XLSX or CSV, or relational databases in an environment that permits selection and export of a flat file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kelly Powers asked (nearly) this question in the &lt;a href=&quot;https://listserv.acm.org/SCRIPTS/WA-ACMLPX.CGI?A0=CSTA-MEMBERS&quot; rel=&quot;noreferrer&quot;&gt;CSTA-members listserv&lt;/a&gt; in May 2017 and got 14 answers in a couple of days, which I'll consolidate and extend in an answer here.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-30T15:23:13.590" LastActivityDate="2017-07-31T17:45:54.807" Title="Good datasets for intro CS courses?" Tags="|resource-request|databases|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1396" PostTypeId="2" ParentId="1394" CreationDate="2017-07-03T21:45:43.753" Score="7" Body="&lt;p&gt;I'm going to clean this up later, but am posting the verbatim work of the CSTA members so others can chime in with additional bullets. I'm aiming to have one resource per bullet: Resources name, link, annotation, example ideas for projects&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;How about CSV Data Sets at &lt;a href=&quot;https://vincentarelbundock.github.io/Rdatasets/datasets.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://vincentarelbundock.github.io/Rdatasets/datasets.html&lt;/a&gt;&#xA;Maybe there’s something there which would appeal to MS kids. (Joe Kmoch)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look at the Mondial database, supposedly based on the CIA's World Fact Book. (&lt;a href=&quot;https://www.dbis.informatik.uni-goettingen.de/Mondial/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.dbis.informatik.uni-goettingen.de/Mondial/&lt;/a&gt;) It's in various  formats other than CSV (various relational databases, XML, etc)  but should easily be exported to CSV form ( see &lt;a href=&quot;http://www.convertcsv.com/sql-to-csv.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.convertcsv.com/sql-to-csv.htm&lt;/a&gt;) . It's got dozens of relations, and is sizable enough so that you really do need to query it via a program to answer questions. (Doug H)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There are some links on my BigData webpage ( under #4.) that could be a lot of fun&#xA;&lt;a href=&quot;https://sites.google.com/a/pgcps.org/livecode/big-data/bigdata---projects&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sites.google.com/a/pgcps.org/livecode/big-data/bigdata---projects&lt;/a&gt; (Cyril Pruszko PGCPS)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I had fun in the past using First Fleet. See firstfleet.uow.edu.au (Andrew Williams and Simon Carter)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Titanic passenger lists (Simon Carter)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://ww2.amstat.org/censusatschool/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Census at School&lt;/a&gt; asks lots of different questions of hundreds of thousands of U.S. students and has data by grade and state. My students have used the data for linear regression and chi-square tests. (Andrea DePaolo)&lt;p&gt;CensusAtSchool data works well with middle schoolers. I had 7th graders measure their height and armspan and add their own data to the CensusAtSchool's set using a googlesheet. (BB) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the UK, publicly accessible historic weather data is useful and offers some lovely cross curricular links to science, maths and geography: &lt;a href=&quot;http://www.metoffice.gov.uk/public/weather/climate-historic/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.metoffice.gov.uk/public/weather/climate-historic/&lt;/a&gt; &#xA;I think something rather more comprehensive in the US is available here: &lt;a href=&quot;https://www.ncdc.noaa.gov/cdo-web/datasets&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ncdc.noaa.gov/cdo-web/datasets&lt;/a&gt; (Miles Berry)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.data.gov/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.data.gov/&lt;/a&gt;  (Ty Davis)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Wikipedia has some extractable data &lt;a href=&quot;https://www.tableau.com/about/blog/2016/2/excavating-data-gems-wikipedia-50966&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.tableau.com/about/blog/2016/2/excavating-data-gems-wikipedia-50966&lt;/a&gt; &#xA;(Ken Price in Tasmania)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Tuva labs tuvalabs.com (Jon Mannion) is an entire data exploration environment with curriculum and a browser-based interface that allows students to drag various variables from a data set onto axes, akin to SPSS or Fathom.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://stats.oecd.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://stats.oecd.org/&lt;/a&gt; has some OECD datasets&#xA;(Ken Price in Tasmania)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Google also has a Public Data Directory at &lt;a href=&quot;https://www.google.com/publicdata/directory&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.google.com/publicdata/directory&lt;/a&gt; and a data exploring tool.&#xA;(Ken Price in Tasmania)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What about Bart, A. C., Whitcomb, R., Kafura, D., Shaffer, C. A., &amp;amp; Tilevich, E. (2017, March). Computing with CORGIS: Diverse, Real-world Datasets for Introductory Computing. In Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education (pp. 57-62). ACM.&#xA;CORGIS Datasets Project&#xA;&lt;a href=&quot;https://think.cs.vt.edu/corgis/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://think.cs.vt.edu/corgis/&lt;/a&gt;  (Francesco Maiorana)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here are some additional links from my bookmarks&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://www.kdd.org/kdd-cup&quot; rel=&quot;nofollow noreferrer&quot;&gt;KDD Cup&lt;/a&gt; is an ~annual competition for the public, aimed at grad students and professionals. Past year's competitions are on the website, usually with the data, and middle schoolers could use the data for easier tasks than the KDD Cup challenge posed. &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.kaggle.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kaggle&lt;/a&gt; is akin to and overlapping the KDD Cup.&lt;/li&gt;&#xA;&lt;li&gt;Teenagers like music. &lt;a href=&quot;https://labrosa.ee.columbia.edu/millionsong/tasteprofile&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Million Song Data set&lt;/a&gt; could be used to compare song length by artist, for example. &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;An image makes for a nice large data set and motivates students to understand nested loops, conditionals, the accumulator pattern, and the best-so-far pattern. I have students pick their own image and decide upon their own task for data analysis (e.g., range of brightness or number of pixels that meet a color criterion) and manipulation (e.g. change brightish yellows to magenta.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://concord.org/projects/codap&quot; rel=&quot;nofollow noreferrer&quot;&gt;CODAP&lt;/a&gt;, the Common Online Data Analysis Platform. A project of the Concord Consortium, led by the person who led development of Fathom, a stats software for K-12. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I wish there was a women's basketball version of this set of links:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;NFL plays in CSV: &lt;a href=&quot;http://archive.advancedfootballanalytics.com/2010/04/play-by-play-data.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://archive.advancedfootballanalytics.com/2010/04/play-by-play-data.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;News article about Big Data in sports, reading across the curriculum: &lt;a href=&quot;https://blogs.wsj.com/cio/2013/02/06/big-data-in-big-sports/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://blogs.wsj.com/cio/2013/02/06/big-data-in-big-sports/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Programmers' discussion thread about handling football data: &lt;a href=&quot;https://news.ycombinator.com/item?id=5002974&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://news.ycombinator.com/item?id=5002974&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Social Security Administration offers CSV files of &lt;a href=&quot;https://www.ssa.gov/OACT/babynames/limits.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;name frequencies by birth gender and year&lt;/a&gt;. State-level files are also available by gender and year.&lt;/li&gt;&#xA;&lt;li&gt;The UC Irvine Center for Machine Learning and Intelligent Systems has the &lt;strong&gt;Motherlode&lt;/strong&gt; &lt;a href=&quot;http://archive.ics.uci.edu/ml/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Machine learning repository of datasets&lt;/a&gt;. You can search by domain (e.g. life science), by the data set size, or by the type of task students would typically do with that data.  &lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;GapMinder has raw &lt;a href=&quot;http://www.gapminder.org/data/&quot; rel=&quot;nofollow noreferrer&quot;&gt;data files&lt;/a&gt; of World Health Organization data as well as an &lt;a href=&quot;/#$majorMode=chart$is;shi=t;ly=2003;lb=f;il=t;fs=11;al=30;stl=t;st=t;nsl=t;se=t$wst;tts=C$ts;sp=5.59290322580644;ti=2013$zpv;v=0$inc_x;mmid=XCOORDS;iid=phAwcNAVuyj1jiMAkmq1iMg;by=ind$inc_y;mmid=YCOORDS;iid=phAwcNAVuyj2tPLxKvvnNPA;by=ind$inc_s;uniValue=8.21;iid=phAwcNAVuyj0XOoBL_n5tAQ;by=ind$inc_c;uniValue=255;gid=CATID0;by=grp$map_x;scale=log;dataMin=194;dataMax=96846$map_y;scale=lin;dataMin=23;dataMax=86$map_s;sma=49;smi=2.65$cd;bd=0$inds=;example=75&quot;&gt;online tool&lt;/a&gt; for exploring the data along with interesting examples. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://exoplanets.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Exoplanets databases&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Current Population Survey (CPS) asks 60,000 U.S. households each  month about income and employment. You can download &lt;a href=&quot;https://www.census.gov/programs-surveys/cps/data-detail.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CPS data tables&lt;/a&gt; and can create your own table with the &lt;a href=&quot;https://www.census.gov/cps/data/cpstablecreator.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CPS table creator&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A similar question on &lt;a href=&quot;https://www.quora.com/Where-can-I-find-large-datasets-open-to-the-public&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quora&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Earthquakes&lt;/strong&gt; From USGS, &lt;a href=&quot;https://earthquake.usgs.gov/earthquakes/map/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://earthquake.usgs.gov/earthquakes/map/&lt;/a&gt; allows the user to filter earthquakes by location, date, and magnitude and &lt;a href=&quot;https://earthquake.usgs.gov/earthquakes/search/&quot; rel=&quot;nofollow noreferrer&quot;&gt;download a CSV&lt;/a&gt;. The website has built-in geographic visualization. (Contributed to PLTW CS Principles course by Nathan Nolte)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-30T15:41:39.127" LastActivityDate="2017-07-30T15:41:39.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1397" PostTypeId="1" AcceptedAnswerId="4316" CreationDate="2017-07-03T22:18:11.390" Score="5" ViewCount="337" Body="&lt;p&gt;The overall distribution of scores for the first AP CSP (Computer Science Principles) exam was recently &lt;a href=&quot;https://www.reddit.com/r/APStudents/comments/6jvibw/ap_csp_score_distribution/&quot; rel=&quot;nofollow noreferrer&quot;&gt;released&lt;/a&gt;, and I'm wondering how much is described there about students' performance when their classrooms used Code.org vs. Beauty and Joy vs. Mobile vs. all the other flavors out there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a site/blog post that compiles/reports the scores by curriculum?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know it's a bit early to ask, but maybe this will prompt the creation of such a resource :)&lt;/p&gt;&#xA;" OwnerUserId="1583" LastEditorUserId="1293" LastEditDate="2017-10-09T16:57:46.550" LastActivityDate="2018-02-10T19:45:32.943" Title="Is there a compilation of AP CSP scores by curriculum?" Tags="|secondary-education|grading|ap-cs-principles|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1398" PostTypeId="2" ParentId="1383" CreationDate="2017-07-03T22:34:10.070" Score="2" Body="&lt;p&gt;I've been in groups before, and multiple people were supposed to code. It was a system where you had to be on the same computer for it to work. It fairly well approximated pair programming - we were discussing out loud, and one person was watching the other giving suggestions, and the other was coding. The people in the group that I was mostly working with weren't annoying, and a couple were semi-friends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It was terrible.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd programmed before the class and the other student hadn't, so I was a bit better. That made it even harder, because the other student was less likely to, say, use a function, or make some aspect simpler, or whatever - so I felt like I was taking over too much to fix something, or suggest a better solution, and I ended up doing more of the coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a time limit, obviously, so since I was faster at coding (and I also could keyboard, whereas the other student couldn't), the other student often was like, &quot;hey, we need to get this done, you obviously know how to do it - just do it&quot;. The teacher stepped in and put the other student at the keyboard, but since a. the other student couldn't keyboard, (just pecked) and b. both of us now felt even more rushed, because the rest of the group had finished some of the mechanical aspects (we were in an engineering course creating a &quot;elevator&quot; type thing), the whole thing just got worse.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-03T22:34:10.070" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1399" PostTypeId="2" ParentId="1383" CreationDate="2017-07-03T23:43:29.187" Score="1" Body="&lt;p&gt;You asked for my experience, so:&lt;br&gt;&#xA;30 years ago in my last year of a BS CS (Engr) program, we had a 3 term course where we wrote a compiler for a simplified language, including producing 68020 assembly language. This course required us to work in pairs for most of the coding. There was an odd number of students so there was one triple of women as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the students had encountered each other before, so they paired up with someone they knew. But I had transferred from another college a year back, so I looked across the room at the only available person and we introduced ourselves. Over time she became a close friend, then a girlfriend. We were so close in fact that we would argue heatedly in the terminal rooms, which shocked some of our classmates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We shared the design and coding pretty equally, but often worked apart. I never got used to her tendency to set the foreground color vivid blue and the background vivid red. Our compiler actually worked at the end - which was unusual - and I think it passed all the requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I never did any pair programming again, because for the most part, I was working on solo projects at the company I worked for. I was also one of only 3 programmers who knew C and so did not have to use Cobol, like the 30 other programmers (most of whom were women). I do work very closely now with my co-instructor where I teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I do not use it as a teaching technique in our (very small) classes, I can't report on advantages and disadvantages. I have never felt that it would help our students to work in that way. From my experience as a student, it is great if your partner is also... your partner, so to speak, but that was probably not intended by the curriculum.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-03T23:43:29.187" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1401" PostTypeId="2" ParentId="1390" CreationDate="2017-07-04T03:48:31.603" Score="2" Body="&lt;p&gt;Personal disclaimer: the best preparation for the exam is first to ensure that students master course content. &lt;strong&gt;If you have an AP CSP-aligned curriculum, then every day is a day of exam preparation.&lt;/strong&gt; This touches on the biggest struggle I felt as a first-year AP teacher: am I teaching them computer science, or am I preparing them for a computer science exam? The ideal situation for me -- and the personal resolution I reached -- is that quality instruction, assessment and feedback, and student engagement with a rigorous curriculum (CS50 AP in my case) are the key elements to focus on for ensuring student success on the AP Exam. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I did utilize a number of resources throughout the year:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The full-length sample exam provided through AP Course Audit (a secure document)&lt;/li&gt;&#xA;&lt;li&gt;The 22 sample questions from the course description&lt;/li&gt;&#xA;&lt;li&gt;The prep book &lt;a href=&quot;http://ngl.cengage.com/search/productOverview.do?N=201%204294918395%204294891947&amp;amp;Ntk=P_EPI&amp;amp;Ntt=1499832493128398661517952725151949887199&amp;amp;Ntx=mode%2Bmatchallpartial&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fast Track to a 5&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The online paid resource &lt;a href=&quot;https://www.albert.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Albert.io&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'll enumerate how I used each of them and for simplicity refer to them by the number listed above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I pulled questions from #1 throughout the year. The first unit covered a basic intro to binary, so as a short formative assessment, I gave students the four sample questions they could answer having studied the basics of base systems. This was within the first two weeks, so right away we could talk about exam-style questions, specifically the ones that required selecting two right answers. I used sample questions a few more times during the first semester, but I didn't make it a priority (see disclaimer above). However, on the last day of class in the fall, I gave students a modified exam. We had studied three of the six Big Ideas tested on the multiple-choice exam in depth, so I selected questions equivalent to half the exam (enough for the allotted time and perfect for matching the pace of the real exam) and surprised them with this practice exam. There was no warning; students just had to trust what they had learned up to that point. We started the second semester going over this exam. I did an item analysis over break, so I could hone in on strengths and weaknesses and address them in the spring. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the second semester, I started to use #3 at certain sporadic moments. Since The Internet is arguably the most fact-driven of the Big Ideas, I used it as a resource for designing an exam on my Internet unit. Students were encouraged to buy it, but it was not a requirement. So much time in the second semester is taken up by Explore and Create that the multiple choice test is a lower priority until after spring break. Based on this year's Easter timing and AP schedule, I had two weeks of classes to devote strictly to exam preparation. &lt;strong&gt;This amount of time was more than adequate to build students' confidence and familiarity with the exam format.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;During these final two weeks of prep, I went through each question from #2, discussing how each Big Idea could be assessed. As a class we went through each Big Idea on the exam and connected the learning objectives to potential exam questions. The sample questions were great talking points for reviewing course content. I also gave an in-class exam using all the questions from #1 that didn't make it on the first practice exam. I paced it such that students had the same time/question that they would have on the exam. I wanted to make sure students had seen every official practice question and had the opportunity to ask about each one, especially the ones from the secure document that they couldn't take out of the classroom. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last big exam review I did was an optional exam review the Saturday before the exam. I had &gt;50% attendance, and by the end the students felt more than prepared for the exam, and I felt confident I had done enough to get them ready for it. That day (and the following week) I made heavy use from #3 and #4. We basically went Big Idea by Big Idea, gaining more practice and focusing on particular tips and tricks for each. In particular, we went through a number of the robot questions and those questions that required analyzing segments of code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the course, I asked students how prepared the felt for the multiple choice. To a person they said that we had done ample review and that they felt confident in how they had done. (Now I will know more about specific students later this week when the scores come out for teachers, but I do value this piece of student feedback.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line: trust the quality of your instruction and your curriculum. Extra resources are nice, but the College Board's official practice is sufficient for getting students ready. A little exposure in the first semester and a week or two of focused multiple-choice review is plenty. Given that students will also prepare for the exam in the work they do for Explore and Create, they will be plenty prepared by course end. Also, &lt;strong&gt;the more students read, write, and understand code on whatever language you use, the stronger they will be come exam time; there is no substitute for this.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-04T03:48:31.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1402" PostTypeId="2" ParentId="1347" CreationDate="2017-07-04T07:07:38.877" Score="0" Body="&lt;p&gt;I think the main way to convince your fellow teachers is to show off your success, one way or another. Show projects involving students which were unlikely to succeed in the beginning of the year to the school public. Let colleagues visit your lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having other teachers visit is perhaps most effective. The reason is that leaving some students behind, bored and usually unsuccessful &amp;mdash; as standard teaching does &amp;mdash; is painful and unsatisfying &lt;em&gt;also for the teacher.&lt;/em&gt; Seeing that it is possible to teach in a way which inspires all may be a pivotal moment for some. A good class is a memorable experience, and I believe for both involved parties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which brings me to a remark regarding the means to reach all students. As a student I encountered a few exceptional teachers (hello Mr. Grude). Interestingly, they were not distinguished by specific methods like group work vs. lecture, or hands-on vs. theory. Instead they all had a few things in common. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, they loved their subject. That's probably the most important bit. If you try to teach something you are not enthusiastic about you will never be an extraordinary teacher. Contagious enthusiasm is almost a &quot;self-runner&quot;, as we say in German.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this means interacting with people it helps if the teacher has a love for people, and students in particular. I don't think it's a requirement &amp;mdash; I can picture a totally nerdy guy who still awes his students &amp;mdash;, but it certainly helps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another interpersonal skill which may be a requirement with male teenagers is some physical presence and personal authority. You can't afford to lose control too much. Loving music or birds and bees doesn't make up for having a tiny voice and little self-confidence in such a shark basin.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastActivityDate="2017-07-04T07:07:38.877" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1403" PostTypeId="2" ParentId="206" CreationDate="2017-07-04T07:15:06.013" Score="2" Body="&lt;p&gt;Give the students extra work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know, so far this sounds a bit redundant with some of the other answers.  And I desire not to compete with them (their input is great and may be better), but I offer some more suggestions that may be useful (perhaps requiring some adaptation to fit your situation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Idea #1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, start teaching these fast students more than the subject matter.  Help teach them to be a team, and to help others.  The way to do this is to have them be officially declared a classroom assistant, so that other students can know that they are welcomed and encouraged to seek those students.  This ends up being a great preparation method for the actual workplace, caring about your co-worker who isn't achieving quite as fast can result in overall team improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Idea #2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example: I was way over-qualified compared to my peers in one particular class.  The class was designed to cover half of a book.  The instructor told me to just stop paying attention to the class, and work on my own pace, with the goal being to complete the entire book except chapter 12.  Chapter 12 was using Trigonometry functions, and I didn't yet take Trig, so that chapter would have been infeasible for me.  Although I slacked off during some partial class periods, I ended up just barely achieving the goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nowadays, with the Internet as an available resource, if a student is way more advanced than the classmates, consider placing that student on a special program that will use up the student's extra time.  This could involve encouraging the student to spend time in &quot;study hall&quot; (catching up in another subject where the student may be less ahead), or learning about an entirely different topic (learning another language like HTML/CSS/JavaScript or AutoHotkey, computer networking, remote systems management, learning another language).  The student may appreciate the special program, and end up learning something else quite useful.&lt;/p&gt;&#xA;" OwnerUserId="1676" LastEditorUserId="58" LastEditDate="2017-07-04T12:34:07.273" LastActivityDate="2017-07-04T12:34:07.273" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1404" PostTypeId="2" ParentId="1347" CreationDate="2017-07-04T08:43:40.727" Score="0" Body="&lt;p&gt;Are you trying to win an argument, or help your fellow CS teachers improve?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask this because this goal you've chosen for yourself and others seems to be pretty arbitrary.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;that they can all be reached - continuously in every class period?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What about Kahn Academy? Kahn Academy reaches students and non-students even outside the classroom time periods. Furthermore, it allows them to come back years later to refresh and retest their knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about Richard Feynman? Granted, he didn't teach CS, but his Physics lectures are still being watched to this day by tens of thousands of people each year. Was he able to reach every single person in his lectures? That, I do not know. But he's still a great inspiration to many teachers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One Astronomy/Astrophysics Professor, Alex Filippenko, I had was so enthusiastic about his field, he would host many free lectures and other free events throughout the year, in addition to his regular teaching and research duties which he already had many, where everyone, even non-students were welcome to attend and participate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If he was your colleague, would you argue with him that he's doing it wrong because he didn't draw the same arbitrary line in the sand as you did?&lt;/p&gt;&#xA;" OwnerUserId="1195" LastEditorUserId="1195" LastEditDate="2017-07-04T10:16:48.793" LastActivityDate="2017-07-04T10:16:48.793" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1405" PostTypeId="2" ParentId="1347" CreationDate="2017-07-04T11:29:56.460" Score="-1" Body="&lt;p&gt;Unpopular but : Not everyone is the same and reaching &quot;all&quot; is unachievable in the great majority of cases. Live with it. While you never want to leave people behind it's also the responsibility of the weaker students (often merely as a result of lack of application than ability) to keep up - possibly by seeking you out for extra tuition or possibly that 2 minute chat that can &quot;reveal all&quot;. You are doing your good students a disservice if you ignore them and &quot;slow up&quot; for political gain and social media darling awards and pats on the back from fellow lecturers who think forging ahead something somehow &quot;bad&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1680" LastActivityDate="2017-07-04T11:29:56.460" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1406" PostTypeId="1" AcceptedAnswerId="1407" CreationDate="2017-07-04T18:33:50.320" Score="5" ViewCount="312" Body="&lt;p&gt;Computer Science lends itself to a variety of different assessment methods - from the more practical assignment based programming problems, to the more formal final exams that cover the theoretical content. More formative assessments give students and educators the ability to improve learning and teaching whilst it is ongoing, but there is usually some concept of a &quot;high-stakes&quot; summative exam in most courses. I'm sure we can all agree that portions of one module (e.g. on data structures) will be exceptionally useful in later modules, and so it makes sense to do as much as possible to help students master these concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often (from my own experience as a student), the &quot;feedback&quot; from the summative exam is a simple number or grade, which isn't broken down by assessment component. Further, there is usually no way to see the exam script or any form of mark scheme or question breakdown, which makes it difficult to improve in the general context of the university degree. The summative exam does nothing other than provide a coarse measure of the candidate's performance during the exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this sort of status quo widespread throughout undergraduate level CS, and what can be done to give students the opportunity to learn from and reflect on these sort of assessments? Should a more formative approach be taken for the majority of each module?&lt;/p&gt;&#xA;" OwnerUserId="916" LastActivityDate="2017-07-05T09:57:14.313" Title="How should students be encouraged to reflect and improve after summative assessment?" Tags="|undergraduate|assessment|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1407" PostTypeId="2" ParentId="1406" CreationDate="2017-07-04T18:57:42.067" Score="5" Body="&lt;p&gt;First, I dispute your statement that &lt;em&gt;&quot;the summative exam does nothing other than provide a coarse measure of the candidate's performance during the exam.&quot;&lt;/em&gt;  Assessments are not merely chances for us to discover how the students are doing, they are also &lt;a href=&quot;http://www.nytimes.com/2011/01/21/science/21memory.html?src=tptw&quot; rel=&quot;nofollow noreferrer&quot;&gt;useful in the learning process itself&lt;/a&gt;.  They provide a focus for study, and they provide vital motivators for &lt;a href=&quot;http://mrbartonmaths.com/resourcesnew/8.%20Research/Memory%20and%20Revision/The%20Critical%20Importance%20of%20Retrieval%20for%20Learning.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;memory retreival&lt;/a&gt;, and they provide the stakes that allow strong enough emotions to trigger memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now, as for your question itself&lt;/strong&gt;, I have also particularly struggled with summative assessments, and I ultimately concluded that I did not really believe in the model, and could not administer strict summative assessments in good conscience.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've pinpointed the problem perfectly: once you've given a summative assessment, where do you go from there?  Instead, I utilize a test-retest model for all assessments provided throughout the year.   Every retest is provided with a lower maximum attainable grade.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my current institution, I have calibrated this at 6 points per makeup.  (At a previous institution, I used 8 points.)  This is not a deduction, it is a cap.  So, earning a 65 on a first makeup will net you a 65, but earning a 98 will net you a 94.  My goal is to encourage targeted study, so I do not allow for further makeup penalties.  This means that the highest grade always wins, so you cannot lose points by taking a makeup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I also create a practice quiz or test for every assessment.  This approach certainly involves a lot of work on my part (as I am &lt;em&gt;always&lt;/em&gt; making 3 versions for practice-test-retest, and sometimes have to create 4, or even 5, assessments), but I love the net results I get in my class.  &lt;strong&gt;This system has virtually eliminated students falling seriously behind.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have a rule that students who fall below a certain grade (a) &lt;em&gt;must&lt;/em&gt; take a makeup, and (b) must check in with me or a pre-approved student (roughly a TA) before they are allowed to take it.  This prevents the problem that some students have of simply taking makeup after makeup, with no appreciable improvement from one exam to the next.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-04T20:15:09.347" LastActivityDate="2017-07-04T20:15:09.347" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1408" PostTypeId="1" AcceptedAnswerId="1416" CreationDate="2017-07-04T20:05:51.640" Score="17" ViewCount="6919" Body="&lt;p&gt;I'm currently teaching Python, to three 12-year-olds. They have no experience at all, and my task is to introduce them to programming concepts, and to Python. I'm fairly experienced in programming, and I'll be starting my third year of computer science at university next year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm trying to ask here is, how do I get my mindset to their level? They struggle with understanding what a variable is, have trouble understanding flow of the program. What can I demonstrate to make them understand better?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've already tried introducing variables, print function, and some flow controlling through conditionals (all came together in a little calculator), but I seem to fail at making it easy for them to understand.&lt;/p&gt;&#xA;" OwnerUserId="1688" LastEditorUserId="204" LastEditDate="2018-11-09T10:49:51.683" LastActivityDate="2020-10-03T22:55:11.473" Title="How do I approach teaching Python to 12-year-olds as a first-time teacher?" Tags="|lesson-ideas|python|introductory-lesson|" AnswerCount="10" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="1409" PostTypeId="2" ParentId="1406" CreationDate="2017-07-04T20:11:15.840" Score="2" Body="&lt;p&gt;The &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/B008PVQDCA&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt; community has collected and published quite a lot of work on Feedback. The book referenced describes practices that have been vetted by the community. There are many more as well. Not all are related to exam grading, of course. Some that apply here are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Kinds of Exam  &lt;/li&gt;&#xA;&lt;li&gt;Self Test  &lt;/li&gt;&#xA;&lt;li&gt;Own Words&lt;/li&gt;&#xA;&lt;li&gt;Reduce Risk&lt;/li&gt;&#xA;&lt;li&gt;Differentiated Feedback  &lt;/li&gt;&#xA;&lt;li&gt;Mock Exam&lt;/li&gt;&#xA;&lt;li&gt;Grade It Again, Sam&lt;/li&gt;&#xA;&lt;li&gt;Fair Grading&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other idea, that I don't think have yet been captured as patterns are thing like having students submit questions for an upcoming exam, probably with some reward for good questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pedagogical patterns community has continued the work also. Especially in the assessment area. A couple of workshops have been held in Europe, for example. Christian Köppe at the Han University in The Netherlands has been one of the drivers of the recent work. Newcomers welcome, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree, however, that a completely summative assessment has little value and gives you little guidance for improvement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But to the specifics of the question. If your class isn't too big, you could meet individually with those who need to improve. You could let students form small discussion groups (say 3 students each) to discuss answers on the exam. They need not reveal how they did, but could discuss how they approached the questions. Or you could meet with a small group rather than individuals to discuss the future and strategies for improvement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, if the assessment vehicle is poor you need to work to improve that. It is possible for questions to be so bad that students are misled by them. I've written one or two of those in the past (alas). &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Some of the recent work can be found here: &lt;a href=&quot;http://hillside.net/eduplop/patterns-publications/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://hillside.net/eduplop/patterns-publications/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-05T09:57:14.313" LastActivityDate="2017-07-05T09:57:14.313" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1410" PostTypeId="1" CreationDate="2017-07-05T02:51:19.497" Score="29" ViewCount="6996" Body="&lt;p&gt;How do you encourage students to benefit from code reviews you give them, rather than being discouraged or responding defensively?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-09T05:34:20.413" Title="How do you encourage students to take criticism of their code constructively?" Tags="|student-motivation|" AnswerCount="14" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="1411" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T05:01:17.517" Score="5" Body="&lt;p&gt;Being a relatively young tutor (and soon to be informal teacher), I have quite a few examples of bad code that I wrote not too long ago. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have no such code then you can simply write some (purposefully buggy and bad), then show it to your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of this is to explain that had you not taken criticism of that code constructively, your own learning would be impaired. Because one never actually stops learning, I'm sure you can find recent examples of this and use them. Why, even this site &lt;em&gt;might&lt;/em&gt; be an example. If you received criticism on an answer or question, then to actually &quot;learn from your mistakes&quot; you'd have to take criticism constructively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, it's important to make them see that without criticism, they have no feedback, and with no feedback whatsoever, it is literally impossible to learn (I'll also add that if they know a bit of machine learning or neural networks then you can use that example: without feedback, neural networks learn so slowly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also important that you give your criticism in a constructive way (I'm sure you do but one should keep it in mind) and then explain to the students that criticism should be taken constructively, because it means there's room for improvement, and the criticism is the key to opening the door to that room.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I saw many students (that studied with me or that I tutored) who were encouraged to take criticism constructively because they were shown by the teacher (who was sometimes myself) just how important it is.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-05T05:01:17.517" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1412" PostTypeId="2" ParentId="1408" CreationDate="2017-07-05T06:34:40.127" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Full disclosure: I'm one of the founders of CodeHS.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We have a python course on CodeHS that you can try. The curriculum is free to use, and you can sign up as a teacher account to be able to see your students' code and test out their programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can see more about the course here: &lt;a href=&quot;https://codehs.com/info/curriculum/intropython&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://codehs.com/info/curriculum/intropython&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's designed for high schoolers, but the first unit teaches Tracy the Turtle, which is a turtle graphics implementation in python in the browser that's really visual and accessible for younger students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You learn to teach the turtle to move around the canvas and draw different shapes like this:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/z1lDI.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/z1lDI.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="91" LastActivityDate="2017-07-05T06:34:40.127" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1413" PostTypeId="2" ParentId="1300" CreationDate="2017-07-05T07:32:28.913" Score="2" Body="&lt;p&gt;The way I explain it in my lectures is slightly different from what I have read in the other responses. I think there is one important piece of implicit information missing so far: the difference between imperative and declarative programming.&#xA;Since the difference between the two is hardly ever shown explicitly but is often important to understand what's going on and avoid bugs I focus on that concept early on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case the issue is that the equals sign means something different in declarative code (i.e. the maths statement) and in imperative code (the two python examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The mathematical statement &quot;x=x*x&quot; doesn't do anything. It declares a rule that shall be fulfilled by the following calculations, but it doesn't perform any immediate action. It is not fixed to a certain point in time - as soon as you write it down it was practically in existence before anyone performed the first actual calculation.&#xA;The same applies to declarative code in computer programming. When you declare a new class it simply exists whenever a line of code is run. There is no defined point in time when it is created (unlike imperative construction of object prototypes as in Lua or JavaScript).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two python lines on the other hand are imperative, they perform an action at the time when they are called. I don't know about Python, but in most languages both operators are actually just shortcuts for a &quot;normal&quot; function definition like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bool operator==(a,b)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;so there is a clearly defined order in which the involved expressions are evaluated and there is a clear task to be performed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know the difference there is basically no room for ambiguity left.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2017-07-05T07:32:28.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1414" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T07:44:46.103" Score="25" Body="&lt;p&gt;Here a few techniques I use in my class when giving feedback on student code:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a rubric.&lt;/strong&gt; CS50 has a clear grading approach: code is assessed along the four axes of scope, correctness, design, and style. Within style for example, I might focus particularly on readability vis-à-vis indentation. If a student is marked down on this item, she knows exactly what she missed and why she may have lost points. The clearer the criteria of evaluation, the better the student response to being assessed on said criteria. I also think it's valuable to share rubrics in advance. Only seeing it after the fact can make students feel like how they were being graded was being kept a secret, which can lead to resentment of feedback. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid &quot;you&quot; statements.&lt;/strong&gt; This is something I caught myself doing and tried to correct as the year went on. Let's say I'm reviewing a student's code, and I'm commenting on the naming of variables. I might be tempted to say, &quot;&lt;em&gt;You&lt;/em&gt; have unclear variable names here.&quot; That frames it as an assessment of the student, not of the code, which does not set the right dynamic. I try to make sure I say something like this now: &quot;&lt;em&gt;Your program&lt;/em&gt; has unclear variable names here&quot; or &quot;to improve &lt;em&gt;your code&lt;/em&gt;, make &lt;em&gt;your program's&lt;/em&gt; variable names more precise.&quot; The goal is give feedback on the code, not the coder, so language should reflect that focus. (Side note: with how personally code reviews can be taken, I think how we frame the language of assessment is essential to building proper classroom culture when it comes to grades and feedback.) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reward revision.&lt;/strong&gt; This one is possibly more applicable at the high school level, but I think it does matter in terms of building a culture of receptiveness to code review feedback. Allowing students to revise their work gave me the ability to see students improve their work based on my commentary. In my mind this is what education is all about: inspiring a continual learning process. The pragmatics will vary from context to context, but requiring some sort of revision or reflection or allowing students to &quot;recover&quot; some/all lost points communicates to them that at the end of the day, you want them to be better programmers. Grades take a backseat to learning. Again, this might make less sense for university students, but in my class this approach goes a long way in terms of students constantly working on improving their craft. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-05T07:44:46.103" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="1415" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T08:03:14.747" Score="11" Body="&lt;p&gt;I have always enjoyed the fact that as a programming teacher I have almost no need to invest time into building up authority (at least not when teaching young adults). Unlike many other fields we always have a computer at hand that will tell us about the mistakes we make, and as soon as we are talking about more complex topics like code design there is always an explanation why something is considered good or bad style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result is that I don't see any need to express negativity in my code reviews. I know that good programmers will think of sub-optimal code as horrible mistakes, that's what drives us to improve our code constantly and not be fine with anything that works.&#xA;But for students getting something to run and do what they want it to is often a huge achievement, not just subjectively but also objectively. If the code doesn't do what they want they will be open for suggestions anyway, so this question will most likely be about situations where the student may argue that &quot;it's working, so why bother listen to your advice?&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution I found for myself is to avoid arbitrary rules. Don't tell students what they &quot;have to do&quot; unless they actually have to do it in order to get something to run. Otherwise they will immediately see that what you are telling them is factually wrong, since they didn't do it your way and it still runs, so apparently they didn't &quot;have to do&quot; it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead try to illustrate the upsides and downsides of their solution and your alternative solution. In most cases it's easy to come up with a simple test that allows you to demonstrate the benefits of your suggestions. For example if it's about code design have the student rewrite a short paragraph according to your suggestions and then ask someone who doesn't know the code and wasn't involved in the conversation to summarize what the code does. Usually the improvement will be quite obvious.&#xA;If your advice was good and you communicated it the right way the student will be proud that they were able to improve their code, since the whole demonstration revolved around the code the student rewrote and the reaction they got. You and your authority (i.e. the things that might trigger pride and make the student eager to prove you wrong) are out of the equation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's not about code design but about things like architecture illustrate it with a reasonable change request that would be more difficult to implement with the &quot;bad&quot; architecture you want to argue against.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course tests like these will fail sometimes and the &quot;improved&quot; code will not work better, but if that's the case and you don't see a flaw in the way your suggestions were implemented, then this may actually teach you that your advice isn't as powerful as you thought it was, and reflecting that to the students in a mature way will even improve the respect the students have, because you are demonstrating that it's not you against them, it's all of you against the hard facts.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2017-07-05T08:03:14.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1416" PostTypeId="2" ParentId="1408" CreationDate="2017-07-05T08:11:09.350" Score="13" Body="&lt;p&gt;Check out the Python books written by Al Sweigart. His homepage &lt;a href=&quot;http://inventwithpython.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Invent with Python&lt;/a&gt; includes some great, free resources that are geared to the age range of your students. In particular he focuses on creating games which is, in my experience, an effective hook. Two books to use to inform your teaching are the following (in order):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://inventwithpython.com/invent4thed/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Invent Your Own Computer Games with Python&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://inventwithpython.com/pygame/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Making Games with Python &amp;amp; Pygame&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You can read the books for free online and download each one's respective source code.&lt;/p&gt;&#xA;&lt;p&gt;I've spent time teaching the age range in question, and most students just starting out aren't really fascinated by the finer details of variables, loops, and conditionals. They want to see something happen, to make the computer do something &lt;em&gt;fun&lt;/em&gt;. Games are the perfect vehicle for this to take place.&lt;/p&gt;&#xA;&lt;p&gt;Part of what makes Al's approach inviting is that there is a lot of supplied code that students can then customize. They might not get why variables matter at first, but if it becomes a discussion about tracking the level of a game or the current high score (or a list of all-time high scores), then the students' interest will be piqued.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="9565" LastEditDate="2020-10-03T22:55:11.473" LastActivityDate="2020-10-03T22:55:11.473" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1417" PostTypeId="2" ParentId="1380" CreationDate="2017-07-05T09:50:28.087" Score="1" Body="&lt;p&gt;Sorry for another answer that doesn't fully answer your question, but I have found that the following explanation helps some students so much that they need less practical excercises to understand recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I explain it as a technique for problem solving I give one riddle as an example, because at least for me and everyone I have talked to this riddle is so complicated to answer that you need to simplify it using recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you already know it, some people consider it the most difficult riddle there is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On an island there are 100 people, each with blue eyes. On this island there is the rule that anyone who finds out that they have blue eyes must leave on the next ferry (there's one ferry per day), so each of the 100 inhabitants doesn't know their eye color. Given that they see 99 people with blue eyes everyone must assume that they might be the only one with a different eye color.&#xA;Since you don't speak about eye color on that island the situation stays like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now there is a guest on the island, and since he enjoyed his stay he makes a speech when he is about to leave, and as a joke he thought that he gave them a &quot;hint&quot; that contains only information that they already know, so he tells them that there is at least one person with blue eyes on the island.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The riddle is: What happens next?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now as I said the only way I can argue about an answer is by using recursion, because for recursion you need two things: a trivial case and a way to deduce a more complicated case from the trivial case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this riddle the trivial case would be if there was only one person living on the islane. In that case when they were told that there was at least one person with blue eyes it would have to be that one person and they would leave the island on the next ferry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way to deduce fron the simple case to a more complex one is to look at the situation with two people on the island, because each of the two persons is observing one person, so each is looking at the trivial case. In the situation with two people there are two possible outcomes: if one of the two has non-blue eyes then the other person is performing the trivial case, because it doesn't matter whether they are the only person on the island or if there are other persons without blue eyes. Persons without blue eyes change the trivial case as much as stones or trees. One of the two persons will see that there is no person with blue eyes in sight and will have to deduce that they are the one person with blue eyes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if the second person also has blue eyes the first person will NOT leave the island on the next ferry. That can only mean that they were seeing a person with blue eyes (otherwise they would have had to behave like the trivial case), so when there are two people with blue eyes they both observe that the other one is not leaving on the next ferry and they are both leaving on the second ferry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have understood that you can extrapolate to 100 people who will have to leave after 100 days when they observe that no one left after 99 days.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It usually takes quite a while until everyone accepts the solution, but I have received good feedback by many students who agreed that it convinced them that there are cases where recursion makes them able to solve a problem that otherwise they couldn't.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2017-07-05T09:50:28.087" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1418" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T11:42:39.587" Score="6" Body="&lt;p&gt;There are both personal and technical aspects to this question. First, on a personal level:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you have an informal, friendly relationship with your students, or a formal one. If your relationship is strictly formal and you are seen as an &quot;authority figure&quot; you need to be much more careful here. I could do things with students that, for example, my very proper European dissertation advisor could never get away with. Even if your students think of you as a bit goofy (&quot;tells eye-rolling jokes&quot;, &quot;very punny&quot;) you can do dramatic things. Part of the mythology around my teaching persona is that I once held my nose and dropped a student paper into the trash. I don't think it happened, actually, but it was the kind of thing that &quot;might&quot; have happened. If the personal relationship is strong you can move upward from that and your message will be remembered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, being constantly dramatic is probably counterproductive, as it loses its force if used too often. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are more formal, or a new teacher without a myth (yet), use more structured means, such as, for example, what @Peter♦ suggests here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the more technical side you can prepare ahead some reusable materials that you can use to make various points. If a student is using terrible variable names (a former student of mine used NSFW references exclusively) give them a program in which you have obfuscated names (&lt;code&gt;v1&lt;/code&gt;, &lt;code&gt;v2&lt;/code&gt;, ...) and ask for an analysis. Two pages of code will be enough. If the problem is poor structure, give them one with (much) worse structure and ask for an analysis. In other words, show them, in a dramatic way, the effect of the kind of errors they are making. If you are teaching OO Java, for example, a program with the &quot;one true method&quot; solving all, can be pretty dramatic. Nest those selection statements to the max. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such programs can have use year after year, so you can amortize the development cost. You can even use old student programs that have been disguised, perhaps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the problem is a failure to meet the requirements, giving them a few tests to pass can help, but this may be harder to amortize. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have industry experience an/or connections, perhaps you can show them samples of poor coding that had an effect on the organization. If you still have colleagues there (or former students) perhaps they can help with samples. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Echoing @Peter♦, make it about the work, not about the student. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In a slightly different direction, I think that you can't &quot;tell&quot; a student to &quot;not be discouraged.&quot; It isn't something you can teach with words, especially in the moment of need. You can talk about it in general before the need arises, of course. However, when the student needs specific guidance, it isn't likely to be useful to say &quot;this is terrible, but don't be discouraged&quot;. You have to get them to &lt;em&gt;Embrace Correction&lt;/em&gt;. And if you Embrace Correction yourself, accepting feedback from students and acting on it, it can help. At the moment of need, advise so that emotion and personal feelings don't come in to the picture. You want the student to carry away &quot;my program can be improved&quot;, not &quot;I need improvement.&quot; &amp;lt; opinion &gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1705" LastEditDate="2017-07-06T16:25:08.530" LastActivityDate="2017-07-06T16:25:08.530" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="1419" PostTypeId="1" AcceptedAnswerId="1426" CreationDate="2017-07-05T13:48:52.463" Score="6" ViewCount="3555" Body="&lt;p&gt;I think that it is vital to introduce each subject area with a few handy, even if limited, images or concepts that make the idea clear. Here is how I introduce SQL (in part):  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SQL takes a set of data and transforms it in to a new set: a two-dimensional result. Stop reading until you have memorized that, because it is the whole point. Every outcome of an SQL statement (with a few exceptions) is a new Table. That table might be printed on the screen and disappear, or it might be stored in to a new table, or it could be used to update an existing table, or it could be used as input to a program which could do… anything. But, it is a two-dimensional table, and nothing more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think that this is the very first concept that needs to lodge in their awareness if they are to make any progress at all. Perhaps it is incomplete, incorrect, too literal, doesn't use the right word (the correct word for Table is 'Relation') and so on. But we have to start somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll compare a database table to a table in Excel, because my students are more familiar with Excel. I'll compare SQL to a command line interface, because my students already know about command line interfaces. Are there better metaphors or analogies to teach SQL and relational database concepts?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="58" LastEditDate="2017-07-16T17:40:03.317" LastActivityDate="2021-03-19T13:54:29.387" Title="What is a good analogy to introduce databases and SQL?" Tags="|teaching-analogy|introductory-lesson|sql|" AnswerCount="4" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="1420" PostTypeId="2" ParentId="1408" CreationDate="2017-07-05T14:45:10.810" Score="7" Body="&lt;p&gt;I agree with Peter. It needs to be fun, and games really help. It doesn't take much to exercise basic programming concepts such as variables, loops, selection, input, and output. I would start with simple games like Tic-Tac-Toe and Number Guessing Game. Implementing a simple AI would be fun. I've found that in-class programming contests work well too. For example, I've asked students to race to finish a fairly simple program. Another fun project is to use TkInter to allow students to play with graphics. Visual assignments tend to be more fun than stdout. &lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-05T14:45:10.810" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1421" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T15:00:54.707" Score="6" Body="&lt;p&gt;I would stress that code reviews occur frequently in industry, both formal and informal. Even senior software developers have code reviews. They are not just for improving code quality. Code reviews also communicate changes and teach other developers. One important lesson I learned early on in my career is that there's &lt;em&gt;always&lt;/em&gt; someone who knows more than you. You are hurting yourself if you don't learn from them. Of course it shouldn't be all criticism. I often highlight innovative, elegant, and efficient coding examples. The &lt;a href=&quot;https://www.gottman.com/blog/the-positive-perspective-dr-gottmans-magic-ratio/&quot; rel=&quot;noreferrer&quot;&gt;Magic Ratio&lt;/a&gt; apples in classrooms too.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-05T15:00:54.707" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1422" PostTypeId="2" ParentId="1380" CreationDate="2017-07-05T15:25:39.343" Score="0" Body="&lt;p&gt;Recursion is sometimes difficult for students to grasp. It's important to understand the concept before implementing it in any programming language. My college professor said that recursion may not make sense today, next week, or next year. But one day it will come to you, maybe when you least expect it. I show &lt;a href=&quot;http://www.itcuties.com/wp-content/uploads/2014/05/ITCuties-Java-recursion-iteration.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;this image&lt;/a&gt; to help students think recursively. Next, I'll start with a simple recursive program to calculate the factorial of a number. In class, I simulate recursive calls with pieces of paper. I start by writing fact(10) = 10 * fact(9) on a piece of paper. Then I write fact(9) on a new piece of paper and pass it to a student. The student adds to it by writing fact(9) = 9 * fact(8), writes fact(8) on a new piece of paper, and passes it to another student. This process continues until a student must calculate fact(1), which is simply 1. Then all the papers bubble back up to me, and I calculate the final answer. But even with these relatively simple examples, sometimes it takes time to understand recursion. More simple examples help.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-05T15:25:39.343" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1423" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T16:02:31.570" Score="20" Body="&lt;p&gt;My year 4 teacher at primary school taught me how to shade rounded objects - by doing so on a picture I had been working on for quite some time.&lt;br&gt;&#xA;I recognise now that it did improve the picture, but I was &lt;em&gt;furious&lt;/em&gt; at the time; because I had lost control of my work, and I didn't want or feel the need for the help at that time.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two points that I think this exemplifies:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don't take control of the work away from the student.  It can prevent them from wanting to improve it, as it isn't 'theirs' any more&lt;/li&gt;&#xA;&lt;li&gt;Show them what can be improved, and how to do it, to encourage them to recognise faults and improve their own work.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;One thing you could do, if you see common problems, is to generate your own examples of poor quality code, and get them to improve it themselves. In doing so, they will learn to recognise the problems with their own work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If feasible, find something that requires criticism to be taken on-board to show them the positives that come from improving their code - e.g. if your students are having problems with correct indentation: &quot;This week class, we are going to introduce ourselves to python&quot;.&lt;/p&gt;&#xA;" OwnerUserId="993" LastEditorUserId="1705" LastEditDate="2017-07-06T17:00:30.483" LastActivityDate="2017-07-06T17:00:30.483" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1425" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T16:45:51.733" Score="10" Body="&lt;p&gt;Feedback can be intrinsically threatening, and people are open to feedback only under the right conditions.  Here is an &lt;a href=&quot;https://open.buffer.com/how-to-give-receive-feedback-work/&quot; rel=&quot;noreferrer&quot;&gt;excellent article&lt;/a&gt; that discusses the psychology of feedback.  In their summary, feedback can be received when:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The feedback provider is credible in the eyes of the feedback recipient.&lt;/li&gt;&#xA;&lt;li&gt;The feedback provider is trusted by the feedback recipient.&lt;/li&gt;&#xA;&lt;li&gt;The feedback is conveyed with good intentions.&lt;/li&gt;&#xA;&lt;li&gt;The timing and the circumstances of giving the feedback are appropriate.&lt;/li&gt;&#xA;&lt;li&gt;The feedback is given in an interactive manner.&lt;/li&gt;&#xA;&lt;li&gt;The feedback message is clear.&lt;/li&gt;&#xA;&lt;li&gt;The feedback is helpful to the recipient.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As for the classroom context, I believe that the two most important things have already been said by Peter and Buffy: keep the focus on the code, not on the student, and make sure that you have a warm relationship with your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What little piece I would add would be that, &lt;em&gt;given the above&lt;/em&gt;, if the things you are asking your students to do have self-apparent value, then the resistance never appears in the first place.  If they don't have self-apparent value, then asking the question &quot;how can I make sure my students are receptive to what I have to say&quot; is the wrong question, something more fundamental is missing in the presentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My biggest victory in this regard was when I figured out how to teach about coding style.  I could not &lt;em&gt;for the life of me&lt;/em&gt; figure out how to present it as something with intrinsic value.  The code that we worked on was all short enough that it hardly mattered, the kids were perfectly able to understand their &lt;em&gt;own&lt;/em&gt; code, and my protestations aside, the kids couldn't see any good reason to put thought and effort into indentation, variable names, function names, clean organization, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I outlined how I eventually solved that problem &lt;a href=&quot;https://cseducators.stackexchange.com/a/132/27&quot;&gt;here&lt;/a&gt;.  By the time I finally had it sorted out, the kids started to see &lt;em&gt;intrinsic value&lt;/em&gt; to clarity in their code, so the suggestions I gave to help them achieve that end were no longer met with resistance.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-05T16:45:51.733" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1426" PostTypeId="2" ParentId="1419" CreationDate="2017-07-05T16:52:17.320" Score="5" Body="&lt;p&gt;Beware. &quot;The One True Lecture&quot; is an oxymoron. I have a horror story about trying to create such a lecture to teach elementary statistics. It was perfect in every way and explains sampling without ambiguity. It. Was. Perfect - for me. A generous evaluation of it would suggest I reached maybe 15% of my students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem was (and often is) &quot;Your students are not like you.&quot; Recognize that even if they are bright and hard working (like yourself), they may not learn in the same way you do. &lt;em&gt;Learning Modalities&lt;/em&gt; is the term of art. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of trying to find a straight and direct path from where your students are to some target/goal, plan a twisty path instead (and have the path make visits to the &lt;em&gt;Active Learning&lt;/em&gt; shrine, I think). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many instructors have had the experience of walking out of a lecture feeling terrible about it. They said the wrong thing in the wrong way. They stumbled. They struggled with student questions. They wrote stupid-stupid code on the board and had to backtrack and patch it up. Then later they bumped into one or more of the students who thanked them for the wonderful lecture. I've been there. Part of that is learning &lt;em&gt;how&lt;/em&gt; to get up after a fall, which is an important lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you have part of the solution in your question. After your first &quot;Statement of Principles&quot;, draw them a picture to illustrate it, even if the &quot;picture&quot; is a metaphor. So:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SQL takes a set of data and transforms it in to a new set: a two-dimensional result.  &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Show picture of a map between sets..  (imagine a picture here)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;AND/OR, use the &lt;em&gt;In Their Own Words&lt;/em&gt; Pedagogical Pattern and have one or two of the students tell you back what you just said in their own words.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Let the visual learners into the game as well as the aural learners and readers. Do this sort of thing a lot. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-05T18:25:34.377" LastActivityDate="2017-07-05T18:25:34.377" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1427" PostTypeId="1" CreationDate="2017-07-05T18:40:44.690" Score="8" ViewCount="201" Body="&lt;p&gt;A few years back I taught in a lab equipped with a SMART Board.  I typically only used it as a regular whiteboard and the only benefit I could identify was that I didn't finish every lesson with ink on my fingers from absentmindedly erasing the odd illegible letter here and there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the downside, it was something of an attractive nuisance for the kids with shorter attention spans, and writing on it was less precise and natural than writing with an ink marker.  On balance I would probably have gotten rid of it, given the choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am being offered the chance to have a SMART Board installed in my lab.  I can't think of how it could really be useful in teaching CS but then I am a bit of a Luddite when it comes to ed tech in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My curriculum focuses on web design (HTML/CSS/JS) and I am looking at bringing in Scratch and/or Python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So am I wrong about it just being a fancy, overpriced wall hanging?  Are there actual uses or benefits of a SMART Board in teaching CS that I'm just not seeing?  How have you used SMART Boards in your classes?&lt;/p&gt;&#xA;" OwnerUserId="938" LastEditorUserId="1293" LastEditDate="2017-10-11T18:28:13.383" LastActivityDate="2017-10-11T18:28:13.383" Title="What are the benefits/uses of a SMART Board in CS education (or are there none)?" Tags="|classroom-infrastructure|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1428" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T18:53:22.843" Score="3" Body="&lt;p&gt;&lt;strong&gt;Tl/Dr&lt;/strong&gt;: Interact with each student individually.  Also, I wrote this answer mostly because I wanted to have fun with the list of students at the end.  It probably shows, but hopefully it's useful!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I haven't seen your interaction style with your students.  I don't know where the challenges exist.  However, one thing I have found to be &lt;em&gt;generally&lt;/em&gt; true is that the phrase &quot;take criticism constructively&quot; is a tricky one.  It's so easy to put all the onus on the receiver of the criticism, insisting that they take it &quot;constructively.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think some of what makes it hard is that the phrase doesn't include the provider of the criticism.  It, instead, focuses on the &quot;criticism,&quot; like it's already out in the open.  Now the ability to take criticism like this and turn it into something constructive &lt;em&gt;is&lt;/em&gt; an important life skill, but the thing about life skills is that they take a lifetime to develop.  You might have a few hours with the students for a year, if that.  You can show them the path towards how to take criticism constructively, but you can't expect them to walk all that far down it in a year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key, like anything else in teaching or the rest of life, is individual attention to the students.  You have to look at what's going on in their minds.  And, of course, I strive to say this with the utmost humility: for me, this is a life skill that's going to take a lifetime... and sometimes it feels like it'll take two or three.  But that's okay.  I still feel like I can say the phrase and have the phrase be true, even when I strugle with doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I have found very effective is to take the word &quot;constructively&quot; literally and see how far I can run with it.  Consider the &quot;stationary&quot; points in the mind of a young student -- the things which are moving slow enough to be worth directing.  Some of them are already constructed.  They're stationary things like facts and beliefs which are already there.  You can't constructively criticize those, because they're already constructed.  They're done.  All you can do to change them is be destructive.  All you can do is tear them down and then try to show them what they should build up in its place.  Doing so is certainly part of teaching, but it's not &quot;constructive criticism.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other stationary point is more interesting, and far harder to see.  These are the energetic holes in their lives where something could be constructed.  These happen during growing up, and they also happen when an individual decides one of their beliefs shouldn't be so solid and tears it up.  They then hold onto that potential looking for something to build in its place.  This is where constructive criticism is tremendously powerful.  If you can resolve something in their mind just by suggesting somewhere to put their load, the students will rapidly accept your offer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this version of constructive criticism requires something in their mind already -- a desire to construct.  You have to look for where they want to construct things, and make it happen.  Consider the following students:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Alice&lt;/strong&gt; has already decided she's going to be a programmer when she grows up.  Accordingly, she's already got a thirst to learn from you simply because you're the CS teacher.  A student such as this may give you great opportunities for constructive criticism.  You may be able to provide her &quot;breadcrumbs&quot; guiding her and refining her skills, each time just barely within her reach.  You might suggest she look at design patterns, when the rest of the class is struggling over &lt;code&gt;private&lt;/code&gt; vs &lt;code&gt;public&lt;/code&gt;.  Also, because she's already interested, she's going to be inspecting anything along her career path carefully.  If you help her put something down, and it lands in the wrong place, she will unearth it and try again.  Give her suggestions about how to shoot for the stars, and she'll construct a bridge to get there.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bob&lt;/strong&gt; is in the process of going through lots of life changes.  Everything is in flux for him.  Maybe his voice cracks, maybe his code doesn't compile on the latest release of RHEL.  Bob might be interested in finding some stability from the course.  Perhaps you can show him how programming can help him think in ways which anchors pieces of his life.  Perhaps you can show him how programming is a stable life that he might enjoy.  Give him suggestions about how to build rock-solid code which won't break.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Charlie&lt;/strong&gt; is the outsider in this communication.  He's just the football jock who got stuck in a CS course.  Maybe he doesn't really need programming at all.  However, he does need leadership skills.  See if there's a way to structure a group project such that having a strong leader is useful, even if they're not all that strong at writing software.  Perhaps there's some customer interactions that need to take place?  I mean, we all know the customer is a mythical beast whose feet never touch the ground, right?  As it turns out, in customer relationships, there's rarely a &quot;right&quot; answer nailed down in stone.  Everything has some potential to change, which makes constructive criticism easier.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Eve&lt;/strong&gt;.  There's always an Eve.  Slightly malicious, always trying to find ways to cheat.  Eves are tough.  That's why she's always trying to eavesdrop on our public key encryption.  But everyone is &lt;a href=&quot;https://xkcd.com/177/&quot; rel=&quot;nofollow noreferrer&quot;&gt;human&lt;/a&gt;.  I'd say find your own way for dealing with each Eve, but if you can remember that they're human, it's certainly possible to make it work.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-07-05T18:53:22.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1429" PostTypeId="2" ParentId="1427" CreationDate="2017-07-05T19:38:10.440" Score="2" Body="&lt;p&gt;I had a smart board at previous school. I used it when we did scratch, and it worked fairly well for that. Not as useful when teaching typed languages. But the screen was pretty small relative to the size of my room so it was tough to see from the back of the room.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My room now doesn't have a smart board, but has a very large projector screen and it's way better because it's way bigger. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although, I do sort of miss the smart board when kids present projects. It was great for demoing game projects.&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-07-05T19:38:10.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1430" PostTypeId="1" AcceptedAnswerId="1434" CreationDate="2017-07-05T19:56:47.033" Score="14" ViewCount="564" Body="&lt;p&gt;Java 9 and 10 were both released recently -- Java 9 was released on Sep. 21&lt;sup&gt;st&lt;/sup&gt;, 2017 and Java 10 was released on Mar. 21&lt;sup&gt;st&lt;/sup&gt; 2018. These two releases contain some very big changes: Java becomes modular and has REPL, various APIs have been improved, and Java now supports type inference. However, the changes are, partly, meant to allow backwards compatibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently my school teaches using Java 8 (but for it's worth, it might have been Java 6). I am considering switching to using the latest version of Java in the curriculum, but I'm not sure how useful it would be for the students, in comparison to the current curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The school teachers are very open to updating the curriculum, so it's simply a question about benefits students might gain if we were to upgrade the curriculum to use the latest version of Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what significant benefits would the students gain if they were taught Java 10 (and also the effect of a Java 10 centered curriculum)?&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="732" LastEditDate="2018-03-21T23:40:02.917" LastActivityDate="2018-03-26T16:12:08.200" Title="The impact of switching to Java 10" Tags="|curriculum-design|java|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1431" PostTypeId="2" ParentId="1410" CreationDate="2017-07-05T21:29:47.930" Score="2" Body="&lt;p&gt;I don't see why the same practices in the industry wouldn't apply to students. Professionals don't come pre-loaded with firmware to handle code-&lt;em&gt;&lt;strong&gt;reviews&lt;/strong&gt;&lt;/em&gt; :) Here's been some of my experiences both giving and receiving code reviews:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Prove you're right if telling someone they're wrong. Making a baseless assertion up-front is equivalent to, &quot;I told you so,&quot; until proven otherwise.&lt;/li&gt;&#xA;&lt;li&gt;Show how the code will break if you think it will break. Don't just spout rhetoric in favor of different way to do it.  &lt;/li&gt;&#xA;&lt;li&gt;Don't add your improvements to the list of changes needed. Keep necessary changes and improvements separate. If the coder likes your improvements, they will implement them. &lt;/li&gt;&#xA;&lt;li&gt;Appeal to their vanity by showing them how you can make their code even better instead of showing all its pitfalls. Learning new tricks is easier than losing bad habits.&lt;/li&gt;&#xA;&lt;li&gt;If you think something is wrong but you can't prove it, ask questions about its use instead of making assumptions. Even a solid educated guess gone-wrong can make a code review less constructive from that point on, and waste your time in the process.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;edit:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Emphasis on code-&lt;em&gt;&lt;strong&gt;reviews&lt;/strong&gt;&lt;/em&gt;. &lt;a href=&quot;https://cseducators.stackexchange.com/users/124/gilles&quot;&gt;Gilles&lt;/a&gt; brings up some good points when taking into consideration more in-depth criticism of code in the form of code-&lt;em&gt;&lt;strong&gt;audits&lt;/strong&gt;&lt;/em&gt;. These steps above are not the steps I would take for a code-audit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In regards to the main difference between the two and how to interact with people, I would say it has more to do with understanding the core intent of the code and figuring out where it falls short and coming up with more elegant solutions. For example, someone might accidentally re-invent something from C++11's &lt;code&gt;&amp;lt;algorithm&amp;gt;&lt;/code&gt; library to help sort something from their class. In a code-review, I would mention this and advise you to remove it and replace it, but in an &lt;em&gt;audit&lt;/em&gt;, I would &lt;em&gt;tell&lt;/em&gt; you to fix it and remove the redundant code, because of the conversation's scope and the relationship's connotation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm auditing your code, it's usually because of one of these reasons: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It was requested ad-hoc for no specified reason   &lt;/li&gt;&#xA;&lt;li&gt;Critical/frequent problems originating from a certain module or modules too often   &lt;/li&gt;&#xA;&lt;li&gt;It was scheduled  &lt;/li&gt;&#xA;&lt;li&gt;It was requested by the dev   &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's &lt;em&gt;usually&lt;/em&gt; #4 and if you're playing with some fast and loose code cowboys, #2. So, in both of those scenarios you're basically the mentor/master and less of a peer. You're not there for the thumbs up/down, you're there to &lt;em&gt;take charge&lt;/em&gt; and in some cases, &lt;em&gt;teach&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;edit 2:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Expanding on code audits and analysis as well as quality, I feel the living legend John Carmack does a good job describing it: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;The &lt;strong&gt;most important&lt;/strong&gt; thing I have done as a programmer in &lt;strong&gt;recent years&lt;/strong&gt;&lt;/em&gt;&#xA;  &lt;em&gt;is to aggressively &lt;strong&gt;pursue static code analysis&lt;/strong&gt;&lt;/em&gt;. Even more valuable&#xA;  than the hundreds of serious bugs I have prevented with it is the&#xA;  change in mindset about the way I view software reliability and code&#xA;  quality.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;It is important to say right up front that &lt;strong&gt;quality isn't everything&lt;/strong&gt;&lt;/em&gt;,&#xA;  and acknowledging it isn't some sort of moral failing. &lt;em&gt;&lt;strong&gt;Value is what&#xA;  you are trying to produce&lt;/strong&gt;&lt;/em&gt;, and quality is only one aspect of it,&#xA;  intermixed with cost, features, and other factors. There have been&#xA;  plenty of hugely successful and highly regarded titles that were&#xA;  filled with bugs and crashed a lot; pursuing a Space Shuttle style&#xA;  code development process for game development would be idiotic. &lt;em&gt;&lt;strong&gt;Still,&lt;/strong&gt;&lt;/em&gt;&#xA;  &lt;em&gt;&lt;strong&gt;quality does matter&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Original publication URL: &lt;a href=&quot;http://altdevblogaday.com/2011/12/24/static-code-analysis/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://altdevblogaday.com/2011/12/24/static-code-analysis/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Working &quot;reprint&quot; as on 2017: &lt;a href=&quot;http://www.gamasutra.com/view/news/39328/InDepth_Static_Code_Analysis.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.gamasutra.com/view/news/39328/InDepth_Static_Code_Analysis.php&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1193" LastEditorUserId="1193" LastEditDate="2017-07-07T22:19:30.647" LastActivityDate="2017-07-07T22:19:30.647" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="1432" PostTypeId="2" ParentId="1380" CreationDate="2017-07-05T23:01:50.693" Score="4" Body="&lt;p&gt;&lt;em&gt;For learning recursion...&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student with some programming experience might just need a brief tutorial. Since I teach CS50 AP, I make use of CS50 Study which has a page dedicated to recursion &lt;a href=&quot;https://study.cs50.net/recursion&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;. There is a slideshow with speaker notes as an overview, tips and tricks for using recursion, and sample problems with solutions. The language in question is C, but any student who knows Java will find the syntax familiar. Additionally, on YouTube the &lt;a href=&quot;https://www.youtube.com/watch?v=Mv9NEXX1VHc&quot; rel=&quot;noreferrer&quot;&gt;Computerphile video on recursion&lt;/a&gt; is excellent as a supplement to this page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;For practicing recursion...&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a bit surprised this hasn't come up already, but &lt;a href=&quot;http://codingbat.com/java&quot; rel=&quot;noreferrer&quot;&gt;CodingBat&lt;/a&gt; has a handful of recursion exercises in Java ranging from the most basic to some that are quite challenging. There are two sections of problems: &lt;a href=&quot;http://codingbat.com/java/Recursion-1&quot; rel=&quot;noreferrer&quot;&gt;Recursion-1&lt;/a&gt; and &lt;a href=&quot;http://codingbat.com/java/Recursion-2&quot; rel=&quot;noreferrer&quot;&gt;Recursion-2&lt;/a&gt;. The site doesn't have much in the way of a tutorial (other than solutions to the first two exercises), so it's mainly useful as a practice tool. The nice thing for an instructor is that students can log in to track their progress. If you do want the student to complete &lt;em&gt;x&lt;/em&gt; number of problems, you can verify completion by having her either print out her progress while logged in or share her account with you so you can see what has been completed from the teacher view. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-05T23:01:50.693" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1433" PostTypeId="2" ParentId="1427" CreationDate="2017-07-05T23:20:54.480" Score="5" Body="&lt;p&gt;I've been in rooms with smartboards that aren't dry erase marker safe which means if the smartboard goes down the board space is lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never used a smartboard but think I get the most bang for the buck with a projector onto a whiteboard. We can project sites, code, etc and also annotate by writing on the board directly (although the annotations can't easily be saved other than by taking a picture).&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-07-05T23:20:54.480" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1434" PostTypeId="2" ParentId="1430" CreationDate="2017-07-06T01:20:46.097" Score="20" Body="&lt;h1&gt;General overview on updating to Java:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;First, a general observation about updating to Java. Previous versions of Java used to be released about once two years or so. As of 2017, Java has switched to a &lt;a href=&quot;https://www.infoq.com/news/2017/09/Java6Month&quot; rel=&quot;nofollow noreferrer&quot;&gt;bi-yearly release schedule&lt;/a&gt;: there will be a new version of Java released every March and September. Each release is also guaranteed to receive two updates (one update per each quarter of the year) before they are no longer supported.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plan is to also to have a long-term support release (LTS release) once every three years. Java 8 currently is special-cased to be supported until 2025, Java 11 (which will be released in September 2011) will be the first regular LTS release. Java 11 will be supported until at least 2021.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this all means is that you should be cautious about updating to Java 9 or 10. They may have useful features, but they also have a shelf-life of only 6 months. Java, in theory, is designed to always backwards-compatible, but there are always going to be bugs and breaking changes, so it will likely be less of a hassle if you just wait until whatever the next LTS is going to be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, you should definitely test your assignments and course infrastructure to make sure there are no kinks or bugs anywhere. The major players ought to be reasonably up-to-date, but if you require the students to use specific plugins or libraries, there may be unexpected breakages. (I found this out the hard way).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;General overview on updating to Java 9 and 10:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In my opinion, Java 9 and 10 are mostly incremental improvements over Java 8, particularly from a pedagogical point of view. Specifically, Java 9 does not introduce any major or breaking changes to the language itself. Java 10 added support for variable type inference, which is a nice convenience but not too big of a change (for now?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a quick summary of the changes I think I worth highlighting in particular:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Language changes and major new features:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java 9 introduced a REPL called &quot;jshell&quot;. This is probably the most relevant and useful change from a pedagogical point of view.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 10 introduced variable type inference -- e.g. if you type &lt;code&gt;var a = new StringBuilder()&lt;/code&gt;, the variable &lt;code&gt;a&lt;/code&gt; will be inferred to be of type StringBuilder. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although this feature may be worth mentioning, I think it's also safe to largely ignore -- see the section below for more discussion. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 9 introduced a new module system (Project Jigsaw). Although this this is a potentially major change to Java/the Java ecosystem, it's unlikely to impact your curriculum in the near future and is probably not something worth teaching (see below). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At most, if you want to be super-precise when explaining how Java works, it might be worth mentioning Java now includes an extra &quot;linking&quot; stage which is necessary when using multiple modules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking forward a few years, project Jigsaw (which, among other things, lets you bundle together a &lt;em&gt;subset&lt;/em&gt; of the JRE) could mean that Java could see more usage in robotics and embedded systems, which may in turn increase the number of educational resources available in that area. This is just a hypothesis, though.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Minor new features and quality-of-life improvements:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java 9 supports Unicode 8.0; Java 8 supported 6.2. This is potentially useful for teachers and students from non-English speaking countries. Unicode 8 also supports a wider range of emoji, which your students may or may not care about. Java 10 followed this up with &lt;a href=&quot;http://openjdk.java.net/jeps/314&quot; rel=&quot;nofollow noreferrer&quot;&gt;some additional minor improvements&lt;/a&gt; also related to internationalization.&lt;/li&gt;&#xA;&lt;li&gt;Some of the new APIs might make it easier for you to write tooling and infrastructure -- in particular, the external processes API and the stack-walking API.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Interfaces in Java may now contain private methods. This may slightly affect how you teach ADTs, Java abstract classes, Java interfaces, and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also be able to use this new feature to actually help &lt;em&gt;minimize&lt;/em&gt; the amount of time you spend having to teach Java. That is, Java currently has two mechanisms for encoding the notion of an abstract data type: interfaces, and abstract classes. Depending on the kinds of assignments you give out, you may have needed to explain how to use both. Now that interfaces are slightly more powerful, it's possible you may be able to adjust your assignments and skip having to explain abstract classes altogether.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 9 and 10 together introduce a variety of convenience methods for more conveniently creating and copying collection types -- e.g. &lt;code&gt;List.of(a, b, c, ...)&lt;/code&gt;, which creates an immutable list, and &lt;code&gt;List.copyOf(list)&lt;/code&gt;, which creates an (immutable) copy of the given list.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Other changes:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java applets are deprecated in favor of &quot;&lt;a href=&quot;https://docs.oracle.com/javase/9/deploy/migrating-java-applets-jnlp.htm#JSDPG-GUID-1F95EBB3-D5CB-434A-B069-2261900738F5&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java web start&lt;/a&gt;&quot;, whatever that is. This may or may not be relevant to your course.&lt;/li&gt;&#xA;&lt;li&gt;Strings are no longer implemented using an array of chars and are now stored in a more compact form. This will have no visible impact (apart from improving performance), but it does mean saying &quot;Strings are implemented using an array of chars&quot; is technically a lie (again...).&lt;/li&gt;&#xA;&lt;li&gt;The way foreach loops were translated to bytecode was actually &lt;a href=&quot;https://bugs.java.com/view_bug.do?bug_id=JDK-8175883&quot; rel=&quot;nofollow noreferrer&quot;&gt;slightly buggy&lt;/a&gt; and could prevent garbage collection in some cases -- this issue was fixed in Java 10. This is unlikely to affect you and your students, perhaps unless you are deliberately asking them to work on assignments that ask them to manipulate large amounts of data.&lt;/li&gt;&#xA;&lt;li&gt;Java 10 added a few extra features to make using and configuring Java on Docker containers nicer, which may make instrumenting and sandboxing student code slightly easier. &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#JDK-8146115&quot; rel=&quot;nofollow noreferrer&quot;&gt;More details&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Details: Changes in Java 9&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Here is the document describing the full list of new features in Java 9: &lt;a href=&quot;https://docs.oracle.com/javase/9/whatsnew/toc.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.oracle.com/javase/9/whatsnew/toc.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you skim through, the majority of the features should have no real impact for both the average Java programmer and for students -- they add additional options for tweaking the compilation and deployment process, and some API refinements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are, however, a few features worth talking about in more detail:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;jshell, the new REPL tool&lt;/strong&gt;: this is probably the most useful change, pedagogically speaking. There were a few Java REPLs floating around before, but none of them were very polished or easily usable, from what I understand -- most of them were built into IDEs instead of being available as a standalone tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this is only a tool, and not an actual change to Java, this would effect only how you present your curriculum, and not the curriculum itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One potential blocker to using this in a classroom setting is that jshell, to the best of my understanding, is a command-line based tool, which isn't immediately accessible to beginners. It'll probably take a little bit of time before the tool is nicely bundled and packaged up in a GUI that students can easily use. It's possible this'll be resolved by September, though.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Jigsaw, the new module system&lt;/strong&gt;: while this change is exciting from a technical point of view, my opinion is that it shouldn't really change anything in a typical CS1 and CS2 curriculum. Your students will likely have their hands full trying to learn how to write programs that are only one or two files long at most -- once they're ready to start working on large projects where modules are actually necessary, they'd likely be technologically mature enough to understand how the module system works relatively quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think focusing on the new module system any earlier then that would be a mistake -- I feel fairly strongly that CS1 and CS2 should be focusing on teaching the core fundamentals of computer science and problem-solving rather then the quirks and foibles of any one particular programming language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do want to incorporate modules into your curriculum, the best place to do it would probably be after students are comfortable with objects and packages: you can introduce this change as an additional tool for encapsulation that lets &quot;encapsulate&quot; many packages, in the same way packages let you encapsulate many objects. Alternatively, you could introduce them as a refinement over standard jars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third place you might introduce or revisit modules is when talking about graphs -- dependency management is an application of graphs and resolving dependencies can &lt;a href=&quot;https://blog.codefx.org/java/jar-hell/&quot; rel=&quot;nofollow noreferrer&quot;&gt;notoriously difficult in practice&lt;/a&gt; (dependency resolution is often, in fact, &lt;a href=&quot;https://research.swtch.com/version-sat&quot; rel=&quot;nofollow noreferrer&quot;&gt;NP-complete&lt;/a&gt;), and it might be interesting to explore different ways programming languages attempt to solve this problem from a software engineering perspective. This is probably too much and too abstract for intro courses, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, I imagine the main thing to watch out for is tooling and infrastructure changes, and various 3rd party tools and libraries adapt to these changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on how precise you want to be, you may also need to adjust your explanations of how the Java works (on a high level) to your student -- Java 9 introduces a new &quot;linking&quot; stage which is necessary when using multiple modules. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we look forward beyond the immediate future, another thing that you might want to watch out for (not in the immediate future, but perhaps several years down the line) is for educational resources and various libraries that allow you to use Java on embedded systems. You can, of course, already do this (Raspberry Pis support arbitrary programming languages, FIRST Robotics supports Java, etc), but one of the benefits of Project Jigsaw is that it's now possible to bundle a &lt;em&gt;subset&lt;/em&gt; of the JRE into an application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was previously not possible, and I can see people leveraging this to try and make Java run on platforms it was previously unable to run (or making it run more efficiently on existing platforms). I think it'll take some time before we see meaningful results in this area (if at all), but perhaps something worth keeping an eye on.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Internationalization changes&lt;/strong&gt;: Java 9 now supports &lt;a href=&quot;http://www.unicode.org/versions/Unicode8.0.0/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unicode 8.0&lt;/a&gt;; Java 8 supported Unicode 6.2. This change adds approximately 10,555 new characters, 29 scripts, and 42 blocks, which I imagine would be useful if you're teaching programming in a non-English speaking country.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somewhat more relevantly, Unicode 8.0 supports a wider range of emoji, which seems like the sort of thing that could leverage to make an entertaining set of lessons and homework assignment, especially for students at the K-12 level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth noting the latest version of the Unicode standard is actually 10.0, so Java 9 still isn't fully caught up.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;API changes&lt;/strong&gt;: most of the API changes are minor. The streams API gained three or four more utility methods, the collections library has some new &lt;a href=&quot;http://openjdk.java.net/jeps/269&quot; rel=&quot;nofollow noreferrer&quot;&gt;convenience factory methods&lt;/a&gt; which might be handy, the process API seems to be much improved (though your students were unlikely to be using that anyways). I suppose you, the instructor, could use the new process API to write better tooling and infrastructure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing to perhaps keep an eye on is the &lt;a href=&quot;http://openjdk.java.net/jeps/266&quot; rel=&quot;nofollow noreferrer&quot;&gt;reactive streams&lt;/a&gt; interfaces. It appears that the plan is for various 3rd party libraries to implement libraries based on these interfaces, helping increase interoperability. This, by itself, doesn't really seem worth teaching, but programming languages &lt;em&gt;do&lt;/em&gt; seem to be adding enhanced support for asynchronous programming as of late. (e.g. Python has async-await keywords now, Node.js grew popular a few years ago in part because it had a good story for asynchronous programming at the time...). The takeaway seems to be that async programming is an increasingly popular paradigm -- in that case, it might be worth teaching it to your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I don't know if Java is the most appropriate language to do this in, or if this is an appropriate topic for intro courses. If you're going to do this, if at all, it should be probably relatively late, once you're convinced your students are ready to learn additional paradigms beyond imperative and OOP. You could maybe introduce this earlier if you cover web programming if you really want, since asynchronicity comes up everywhere in that subdomain, but this seems sort of moot, if you're teaching Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing to perhaps keep an eye on is the new &lt;a href=&quot;http://openjdk.java.net/jeps/259&quot; rel=&quot;nofollow noreferrer&quot;&gt;Stack-walking API&lt;/a&gt;. You (the instructor) could perhaps leverage this API to provide students with better tooling to help them debug their code or to allow you to perform more fine-grained analysis when writing automatic grading scripts.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Language changes&lt;/strong&gt;: the language changes also seem to be &lt;a href=&quot;https://docs.oracle.com/javase/9/whatsnew/toc.htm#JSNEW-GUID-825576B5-203C-4C8D-85E5-FFDA4CA0B346&quot; rel=&quot;nofollow noreferrer&quot;&gt;relatively minor&lt;/a&gt;. The main thing that might be worth mentioning is that private interface methods are now allowed, and that using underscore as an identifier is deprecated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you previously needed to teach students how to use both abstract classes and interfaces (e.g. if you want them to extend some code you provided for an assignment), this change may be enough to let you convert over to just using interfaces, possibly letting you avoid needing to talk about abstract classes entirely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strings are also no longer implemented using a char array -- rather, they're implemented using a &lt;a href=&quot;http://openjdk.java.net/jeps/254&quot; rel=&quot;nofollow noreferrer&quot;&gt;byte array with an encoding field&lt;/a&gt; to improve on space efficiency and possibly performance. This, of course, makes absolutely no difference to the end-user, since the API is completely unchanged, but it does mean saying &quot;Strings are implemented as an array of chars&quot; is technically a lie, again. This statement is now completely true only in Java 7 and 8.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Applets are deprecated&lt;/strong&gt;: Java web applets are deprecated in favor of &quot;&lt;a href=&quot;https://docs.oracle.com/javase/9/deploy/migrating-java-applets-jnlp.htm#JSDPG-GUID-1F95EBB3-D5CB-434A-B069-2261900738F5&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java web start&lt;/a&gt;&quot;, whatever that is. I imagine most people aren't using web applets anymore, but if you are, upcoming versions of Java might be breaking changes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Details: Changes in Java 10&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The changes landed in Java 10 are comparatively smaller (which makes sense -- Java 9 was released about two years after Java 8; Java 10 was released about 6 months after Java 9). You can find a full list of changes at the following two documents:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://cr.openjdk.java.net/~iris/se/10/latestSpec/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://cr.openjdk.java.net/~iris/se/10/latestSpec/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some changes worth talking about:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Java now has &lt;a href=&quot;http://openjdk.java.net/jeps/286&quot; rel=&quot;nofollow noreferrer&quot;&gt;variable type inference&lt;/a&gt;. That is, it's now legal to do:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var foo = new MyLongObjectType();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is treated as being exactly equivalent to doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MyLongObjectType foo = new MyLongObjectType();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a nice feature, but (IMO) is really only a minor quality-of-life improvement especially since it's unlikely you'll have excessively long class names in a pedagogical setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This feature also interacts oddly with the diamond operator. For example, the following code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var foo = new ArrayList&amp;lt;&amp;gt;();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...is treated equivalently to doing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ArrayList&amp;lt;Object&amp;gt; foo = new ArrayList&amp;lt;&amp;gt;();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is unfortunate for two reasons: (a) the inference engine is not smart enough to infer the correct inner type based on context (b) the inference engine will always default to inferring the specific type instead of the interface type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these reasons, I think variable type inference is (currently) more trouble then it's worth to teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This may change in the future though, if Java were to one day add &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/anonymous-types&quot; rel=&quot;nofollow noreferrer&quot;&gt;anonymous types a la C#&lt;/a&gt; -- type inference plus ad-hoc anonymous types is a potent combination that you can leverage to write code in a much more fluent way then Java currently allows. (No more having to create a bunch of one-off classes everywhere!)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 10 (and Java 9) added a variety of convenience methods revolving around creating and using various collection types in cleaner ways. The two releases taken together have added the following methods:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;List.of(a, b, c, ...)&lt;/code&gt;: creates an immutable list&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Set.of(a, b, c, ...)&lt;/code&gt;: creates an immutable set&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Map.of(k1, v1, k2, v2, ...)&lt;/code&gt;: creates an immutable map (up to a fixed number of key-value pairs)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Map.of(entry(k1, v1), entry(k2, v2), ...)&lt;/code&gt;: creates an immutable map containing an arbitrary number of key-value pairs. Requires you to statically import the &lt;code&gt;Map.Entry.entry&lt;/code&gt; method.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;List.copyOf(list)&lt;/code&gt;, &lt;code&gt;Set.copyOf(set)&lt;/code&gt;, and &lt;code&gt;Map.copyOf(map)&lt;/code&gt;: creates an immutable (shallow) copy of the underlying data structure. If the data structure is already an immutable list/set/map, it's returned unchanged (no copy is made).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Optional.getOrThrow()&lt;/code&gt;: equivalent to &lt;code&gt;Optional.get()&lt;/code&gt;, but is now the preferred name.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are all minor changes, but they might serve as a good opportunity to have a discussion about the current trend towards preferring immutable data structures/an immutable style of programming.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A memory leak related to foreach loops are now fixed -- the generated bytecode now explicitly sets the implicit iterator to null, which can help prevent memory leaks in some cases. This may potentially affect assignments where students need to manipulate large amounts of memory (and is also an interesting case study of how you can find bugs in even seemingly well-used and well-tested code).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The javadocs tool has seem some minor improvements -- there's a &lt;code&gt;@summary&lt;/code&gt; tag now; there's an &lt;code&gt;--overridden-methods=VALUE&lt;/code&gt; flag you can use to group documentation about inherited methods with no spec change together. &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#JDK-8185371&quot; rel=&quot;nofollow noreferrer&quot;&gt;More details&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 10 added a few extra features to make using and configuring Java on Docker containers nicer, which may make instrumenting and sandboxing student code slightly easier. &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#JDK-8146115&quot; rel=&quot;nofollow noreferrer&quot;&gt;More details&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Java 10 removed several methods from the standard library -- however, it looks like they were all obscure and relatively unused methods, so it seems this is unlikely to be a breaking change for anybody. &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#Removed&quot; rel=&quot;nofollow noreferrer&quot;&gt;Full list&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;And finally, I think it's also worth briefly mentioning changes that do &lt;em&gt;not&lt;/em&gt; appear to be a part of Java 9 and 10. From what I can tell, value generics (e.g. &lt;code&gt;List&amp;lt;int&amp;gt;&lt;/code&gt;), value types, and reified generics appears to be have been deferred to Java 10. These proposed changes to how Java's generics function, had they been included in Java 9,  &lt;em&gt;would&lt;/em&gt; have required some changes to a Java-based curriculum, but alas, not yet, it seems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe there were also some plans for adding new APIs for JSON manipulation, and money/currency stuff, but those also seem to have been deferred.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's unclear if these proposed changes will land by Java 11, but if so, that version of Java would be the one to keep an eye on.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2018-03-21T23:32:15.833" LastActivityDate="2018-03-21T23:32:15.833" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1435" PostTypeId="2" ParentId="1410" CreationDate="2017-07-06T01:27:44.550" Score="2" Body="&lt;p&gt;Don't actually do it. Often students code with time limits and/or when they are tired. This means that some implementations are done because they're faster to implement or because changing the current implementation would require too much time, or the student didn't even stop to think about other implementations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that said, instead of giving a critique, provide a suggestion. Ask what led to that implementation, and (most of the times) they'll realize they could have done differentely in x,y,z. Then, ask what they feel about another implementation and its pros/cons and what could be used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the goal is to have a student learn to code, help him get his thinking process in order, not his code.&lt;/p&gt;&#xA;" OwnerUserId="63" LastActivityDate="2017-07-06T01:27:44.550" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1436" PostTypeId="2" ParentId="1410" CreationDate="2017-07-06T03:12:34.803" Score="-1" Body="&lt;p&gt;To borrow from Agile practice, you can adapt a form of the &#xA; &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;https://martinfowler.com/bliki/PrimingPrimeDirective.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Prime Directive&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always lead with it before looking at the product/code/process. It can feel repetitive, and even elementary. So it helps to&#xA;rotate the reader of the quote, and open it to team discussion with new members.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its value grew and became more appreciated every time a retrospective&#xA;revolved around a significant incident/bug/crisis. It gets the team&#xA;past &lt;strong&gt;blame&lt;/strong&gt;, toward the mindset of self-improvement. Before learning the prime directive, I experienced the blame aspect of code reviews consistently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&#xA;Adding the &lt;a href=&quot;http://www.retrospectives.com/pages/retroPrimeDirective.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;quote here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The purpose as I understand it is to&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a &lt;strong&gt;Safe Zone&lt;/strong&gt;. Nothing leaves the room. Eliminate fear.&lt;/li&gt;&#xA;&lt;li&gt;Treat the code as a product of the team, not one engineer.&lt;/li&gt;&#xA;&lt;li&gt;Action not attitude. Focus team energy on productive analysis and improvement&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Feedback&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As mentioned by Ben-I. In a lot of ways, code reviews are feedback (to the team). In feedback, there is an opening to achieve alignment.&#xA; &lt;a href=&quot;http://stoneandheen.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Thanks for the Feedback p.232, Stone&amp;amp;Heen&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The opening is important because it sets the conversation's tone and trajectory.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and further&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You're not telling the feedback giver what they can or can't say; you're working to clarify the mutual purpose of the conversation and suggesting a two-way exploration. This helps you get aligned for the rest of the conversation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also in feedback, both giving/receiving benefit from practice. In the same way it helps improve your speech delivery, Toastmasters utilize a Evaluator role to practice judging speakers. Have students practice &lt;em&gt;giving&lt;/em&gt;, and &lt;em&gt;performing&lt;/em&gt; code reviews.&lt;/p&gt;&#xA;" OwnerUserId="1720" LastEditorUserId="1720" LastEditDate="2017-07-08T22:06:35.380" LastActivityDate="2017-07-08T22:06:35.380" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1437" PostTypeId="2" ParentId="1430" CreationDate="2017-07-06T08:28:40.323" Score="5" Body="&lt;p&gt;(this is my first answer here, so I hope it's good)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If Java 9 is meant, as you say, to allow better compatibility for older programs, then there shouldn't really be any difference in the way you teach. Some of the features added in Java 9 are just additions to things put in Java 8. You said your school teaches Java 8 but &quot;&lt;em&gt;but for it's worth, it might have been Java 6&lt;/em&gt;&quot;, so I think there shouldn't be a difference in the way you teach java 9. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you are thinking of adding things that are new in Java 9 to your teaching, then you should introduce modular programming as the very first thing. You said 'school', so I'm assuming you teach in a high-school. For high school students modular programming can be a difficult thing to understand. So make sure you teach that before teaching how Java 9 uses it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I think your students would learn a lot if you taught them the stream API which, as Michael0x2a said in his answer gained utility methods. Java's stream API is meant to be used with $\lambda$ expressions. This means that teaching the stream API gives your students experience with $\lambda$ expressions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In conclusion,&lt;br&gt;&#xA;Java 9 gives your students an introduction to a number of programming techniques (modular system, $\lambda$ expressions etc.) that can be useful for them after school.&lt;/p&gt;&#xA;" OwnerUserId="1705" LastEditorUserId="2" LastEditDate="2017-07-06T19:22:20.047" LastActivityDate="2017-07-06T19:22:20.047" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1438" PostTypeId="5" CreationDate="2017-07-06T08:50:17.987" Score="0" Body="&lt;p&gt;Priority Queues are a queue data structure where each element has a priority, and higher priority elements are dealt with before those with lower priority.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Priority queues are useful to handle tasks which can be urgent or not very urgent. For example treating patients in a hospital can be a priority queue:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The severity of the condition is the priority. Patients that have more severe conditions are treated &lt;b&gt;before&lt;/b&gt; patients with less severe conditions.&lt;/p&gt;&#xA;" OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-06T11:28:46.130" LastActivityDate="2017-07-06T11:28:46.130" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1439" PostTypeId="4" CreationDate="2017-07-06T08:50:17.987" Score="0" Body="Priority Queue is a queue data structure where elements are ordered by their priority. Questions using this tag can ask about teaching how to use this data structure." OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-06T11:28:51.553" LastActivityDate="2017-07-06T11:28:51.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1440" PostTypeId="2" ParentId="1390" CreationDate="2017-07-06T09:15:05.537" Score="1" Body="&lt;p&gt;Timed and multiple choice means that the students have to work quickly. This means that there is a simple (easier said then done) solution: improving their quick thinking skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many different ways to improve quick thinking but i think that a very nice way to practice this is to give your students code with no comments and ask them to debug it, as fast as they can. This would be a class period and you wont take points if they miss bugs or take too long. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each code you give them let them ten minutes to debug it and then give them the next code. This will get them in the mood of working quickly, and thinking fast. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This exercise is designed to teach students how to think fast and how to solve problem in a small number of minutes. &lt;/p&gt;&#xA;" OwnerUserId="1705" LastActivityDate="2017-07-06T09:15:05.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1441" PostTypeId="2" ParentId="1121" CreationDate="2017-07-06T10:30:22.927" Score="0" Body="&lt;p&gt;Some members of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Pedagogical_patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt; community have worked on Flipped Courses. Christian Köppe et al. have written three recent papers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.koeppe.nl/publications/koppe-2015-europlop-fcpatterns.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.koeppe.nl/publications/koppe-2015-europlop-fcpatterns.pdf&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.koeppe.nl/publications/koppe-plop15-fcpatterns.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.koeppe.nl/publications/koppe-plop15-fcpatterns.pdf&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.koeppe.nl/publications/Koppe-VikingPLoP16-FCPatterns.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.koeppe.nl/publications/Koppe-VikingPLoP16-FCPatterns.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-06T10:30:22.927" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1442" PostTypeId="5" CreationDate="2017-07-06T12:40:03.710" Score="0" Body="&lt;p&gt;A careers is a person's track in a field. Starting from their education in the field and proceeding with which job positions they held in the field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student's career choice is highly dependent on the education they receive, making the teachers' role significant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mostly, a person will stay in a single career for their entire life (until retirement). This means that whatever career they choose, they should be certain of their choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Encouraging students to pursue careers in computer sciences is a great part of teaching computer science, and so a teacher in a CS course should know how to encourage them to be in the field of computer science as a career (if that is the purpose of the course).&lt;/p&gt;&#xA;" OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-06T14:02:00.827" LastActivityDate="2017-07-06T14:02:00.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1443" PostTypeId="4" CreationDate="2017-07-06T12:40:03.710" Score="0" Body="Careers are tracks of studies and professional jobs people work in during their lives. Questions using this tag can ask about careers students in a computer science course can pursue. " OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-06T14:02:05.903" LastActivityDate="2017-07-06T14:02:05.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1444" PostTypeId="1" AcceptedAnswerId="1449" CreationDate="2017-07-06T14:12:53.093" Score="13" ViewCount="4369" Body="&lt;p&gt;My biggest challenge each semester is keeping students engaged in class. It's obvious that most of them would rather be somewhere else. I don't know if it's the students, my lecture, or both. I wish I had the resources to present a lecture &lt;a href=&quot;https://www.youtube.com/watch?v=9Io6EO491h8&quot; rel=&quot;noreferrer&quot;&gt;this way&lt;/a&gt;. I believe that generating interest is just as important as the content itself, because this builds a passion for CS that will fuel future learning. &lt;strong&gt;How do you make your CS lectures more interesting?&lt;/strong&gt; &lt;/p&gt;&#xA;" OwnerUserId="1529" LastEditorUserId="1293" LastEditDate="2017-10-11T18:28:38.840" LastActivityDate="2017-10-11T18:28:38.840" Title="How do you make your CS lectures more interesting?" Tags="|student-motivation|" AnswerCount="7" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1445" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T14:12:53.093" Score="5" Body="&lt;p&gt;Here are some things I do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Less wordy PowerPoint slides (7x7 rule)&lt;/li&gt;&#xA;&lt;li&gt;Writing on the board instead of slides&lt;/li&gt;&#xA;&lt;li&gt;YouTube videos&lt;/li&gt;&#xA;&lt;li&gt;Interactive lessons - &lt;em&gt;students follow along by editing programs&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Jeopardy! - &lt;em&gt;to review for tests&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Greet every student by name&lt;/li&gt;&#xA;&lt;li&gt;Programming games and contests - &lt;em&gt;works well, but can't do it all the time&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Humor - &lt;em&gt;with limited success&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These techniques help, but I feel like I can do more.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-06T14:12:53.093" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1446" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T14:22:46.763" Score="6" Body="&lt;p&gt;Adding to the already given list, I had good results using &lt;a href=&quot;http://trypingo.com/&quot; rel=&quot;noreferrer&quot;&gt;PINGO&lt;/a&gt;.&#xA;It's a little tool that let's you do small quizzes within the lecture. Students will use their mobile phones to give their answers (no registration required for them). I usually do one or to quizzes after each small topic - resulting in 5 to 10 quizzes per 90min lecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The result can be shown immediately using a projector. If the share of wrong questions is too high (I usually used a threshold of about 25%) I can try to explain the topic differently and clarify on misconceptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students appreciated the interactivity and direct feedback. As the quizzes are done anonymously, so nobody can be blamed for wrong answers. This usually led to about 3/4 of the students participating (100+ students in the audience) and oftentimes to an active discussion about the results afterwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remarks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm not affiliated in any way to that project.&lt;/li&gt;&#xA;&lt;li&gt;I'm using the tool in an introductory course in university.&lt;/li&gt;&#xA;&lt;li&gt;There are probably many other similar tools, but so far I just used Pingo.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1062" LastActivityDate="2017-07-06T14:22:46.763" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1447" PostTypeId="2" ParentId="1302" CreationDate="2017-07-06T15:03:46.860" Score="1" Body="&lt;p&gt;If you are using Cloud9 and you want them to be working on the same code at the same time (Google Docs-style), you can have one user share their workspace with the other (with read/write permission). There is a &quot;share&quot; button in the upper-right hand corner. We have successfully used this for group projects on Cloud9.&lt;/p&gt;&#xA;" OwnerUserId="661" LastActivityDate="2017-07-06T15:03:46.860" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1448" PostTypeId="2" ParentId="1302" CreationDate="2017-07-06T15:47:05.357" Score="1" Body="&lt;p&gt;Paired programming is very effective at work too. We use &lt;em&gt;Skype for Business&lt;/em&gt; to share screens (i.e., editor/output windows) and communicate in real time. If you don't have Skype, you can use &lt;a href=&quot;https://slack.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Slack&lt;/a&gt;. Add &lt;a href=&quot;https://github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt; or &lt;a href=&quot;https://bitbucket.org/product&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bitbucket&lt;/a&gt; to quickly share code, and you have a very collaborative environment.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-06T15:47:05.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1449" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T16:09:39.110" Score="20" Body="&lt;p&gt;&lt;em&gt;Kill 'em with clarity.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a working memory that borders on handicapped, which has forced me into a solution that I have not seen others do.  This is going to sound like total anti-orthodoxy, but I actually focus very heavily on my Powerpoints to keep things moving and breezy, and it really can work!  Fair warning, though: doing this well takes a tremendous number of hours to pull off.  It is not unusual for me to throw 2-4 hours into making a single slide.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started with &lt;a href=&quot;http://blog.ted.com/10-tips-for-better-slide-decks/&quot; rel=&quot;noreferrer&quot;&gt;TED's powerpoint recommendations&lt;/a&gt;.  Many of the top talks there utilize PowerPoints, but take a look at those slides and you'll see something funny: there is virtually no text at all.  The &lt;em&gt;7x7&lt;/em&gt; rule (no more than 7 lines of text, no more than 7 words per line) doesn't make for interesting slides.  I aim for no more than 5 words &lt;em&gt;altogether&lt;/em&gt;, and 0 words is even better.  (I don't always attain this, but that's the goal.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My slides consist almost exclusively of graphics and figures for discussion.  The graphics are often heavily animated.  Very little of the animation is aimed at being cute or funny.  The huge majority is designed to make sure that the concepts are &lt;strong&gt;&lt;em&gt;extremely clear&lt;/em&gt;&lt;/strong&gt;.  So, I might construct a graph in small segments based on the order in which I wish to discuss the parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, when I talk about how two dimensional arrays are stored in memory, I begin with a graphical representation of how I suspect my students typically imagine it, and then have pieces fly out or fade in, slowly replacing the fictitious model with the correct systems one at a time, giving me a chance to talk about each new element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing I build into the slides is the activities I want the kids to do.  &quot;Try this exercise!&quot;  &quot;Look at this prompt and work with a partner.&quot;  &quot;First one to write the correct answer on the board wins!&quot;  This was at first a nod to my terrible memory, but it has actually helped the pacing in my classroom as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The whole enterprise is &lt;em&gt;very highly choreographed&lt;/em&gt;, and after every lecture I give, I make notes on any place where kids seemed to fall off.  If it slowed down or became unclear at any point, I rework that section, often very thoroughly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are still limits, and it is still lecture.  After about 30 minutes, kids will still start to very seriously drift if they don't have other things to do. However, the feedback I have received about clarity has been very consistent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One addition I intend to make this year is pre-made notes for every lecture with blanks for them to fill in as we go, and integrated exercises that they can work on at various times throughout the lesson.  (Again, this is all highly choreographed.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I like about the system is that, as I hone it over the years, it really does get more and more effective.  It also provides me with a nice set of resources that I can share if students need to review material.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-07T12:58:59.710" LastActivityDate="2017-07-07T12:58:59.710" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="1450" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T16:22:56.127" Score="8" Body="&lt;p&gt;First, &lt;em&gt;no one thing&lt;/em&gt; that you can do will solve your issue. You need to have variety. If you &lt;em&gt;just&lt;/em&gt; speak you reach a small percentage and lose others. If you just write on the board, same deal. If you &lt;em&gt;just&lt;/em&gt; use powerpoint, same deal (maybe worse). If you just show youtube videos, etc etc. You need to use a variety of things. Good advice is not to &quot;lecture&quot; for more than about 10 minutes at a time without introducing some other, reinforcing, activity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for the above advice has to do with attention span but also with the fact that different people learn differently and few of your students will (can) learn like you do. If you are teaching you probably have a set of characteristics that, while not unique, aren't very widely shared. So don't try to teach people just like yourself. Look up &lt;em&gt;Learning Modalities&lt;/em&gt; (the term of art). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, and more important, is that learning requires a physical change in the brain itself. There is &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1579220541&quot; rel=&quot;noreferrer&quot;&gt;research&lt;/a&gt; on this (both pedagogical and medical). In order for that rewiring to take place the student needs to be engaged with the material, not just watch it pass by in a lecture. One of the best ways to force this engagement is to use Active Learning techniques and Teamwork.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you can give a short lesson and then give the students an activity that reinforces it. Let them ask questions. Make them answer questions. Let them work together to come up with a good question. Write a program. .... Lots of tricks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, don't expect that anything you say or teach just once will be actually learned. You need to reinforce everything you say by returning to it later; not necessarily with a second lecture and not immediately, but some sort of reinforcement. One of the tricks I use is to introduce (maybe in an exercise) a dead-simple version of a sophisticated topic early in the course. Students hear a few words of terminology and get a feel for what is going on without knowing everything. Then later, return to the topic in depth. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, many compiler courses start with a very simple first project that has all of the phases of compilation in a few hundred lines. Students see how the pieces fit together. Then move on to discuss things in detail, scanning, parsing, etc. Eugene Wallingford recently discussed this, explicitly, on his &lt;a href=&quot;http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2017-06.html#e2017-06-29T16_03_06.htm&quot; rel=&quot;noreferrer&quot;&gt;blog&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me also note, self plagiarizing from my answer &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1419/what-is-a-good-analogy-to-introduce-databases-and-sql&quot;&gt;here&lt;/a&gt;, that :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beware. &quot;The One True Lecture&quot; is an oxymoron. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trying to achieve it is a sure way to lose everyone. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-06T16:29:35.363" LastActivityDate="2017-07-06T16:29:35.363" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1451" PostTypeId="2" ParentId="248" CreationDate="2017-07-06T19:14:46.687" Score="4" Body="&lt;p&gt;Adding static code analysis can be useful in determining if students have &quot;over-engineered&quot; the solution. While dynamic testing can show that the program produces the correct output, there are many examples of correctly working programs that I would not consider acceptable. Students can sometimes miss an important concept that you are attempting to assess, but work around their misunderstanding by adding additional code that wasn't necessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done some testing of this by looking at code complexity (cyclomatic/McCabe and Halstead) numbers, state space, and LOC. For these values to be useful as a guide, the instructor must know expected value ranges for typical solutions to a given problem. These can be found by using exemplar solutions, either created by the instructor, or even identified from student submissions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In cases where correctly working submissions have been written &quot;incorrectly&quot;, I will address the situation with the student and make sure they understand the concept that they appeared to dodge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If anyone's interested, I discussed this some, and included an example of this problem, in a SIGCSE paper a few years ago. If you want a copy of the paper, just email me - raymond dot pettit at acu dot edu: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Raymond Pettit, John Homer, Roger Gee, Susan Mengel, and Adam Starbuck. 2015. An Empirical Study of Iterative Improvement in Programming Assignments. In Proceedings of the 46th ACM Technical Symposium on Computer Science Education (SIGCSE '15). ACM, New York, NY, USA, 410-415. DOI: &lt;a href=&quot;http://dx.doi.org/10.1145/2676723.2677279&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dx.doi.org/10.1145/2676723.2677279&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2017-07-06T19:14:46.687" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1452" PostTypeId="2" ParentId="1410" CreationDate="2017-07-06T19:58:08.687" Score="10" Body="&lt;p&gt;I have all of my students read &lt;a href=&quot;https://docs.google.com/document/d/18e0zklTPKzMS9LkzUTIUGEYoMdt86U-Xjwcum5TABQw/edit#heading=h.ohrh5dps3opt&quot; rel=&quot;noreferrer&quot;&gt;Keeping Perspective&lt;/a&gt;, a section of &lt;a href=&quot;https://docs.google.com/document/d/18e0zklTPKzMS9LkzUTIUGEYoMdt86U-Xjwcum5TABQw/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;So you want a code review...&lt;/a&gt;, which I wrote when working on an open source project. It's short enough that I'll excerpt it here:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Keeping Perspective&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/nOhwy.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nOhwy.png&quot; alt=&quot;October 12, 2001 Hackles cartoon&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I began working at Google when on sabbatical after having been granted&#xA;  tenure early at Mills College, where I had been working since becoming&#xA;  MIT$^3$ (SB, SM, and PhD).  As a professor, I had been the sole judge of&#xA;  others’ code.  I expected to sail through my first code review and&#xA;  hear that they had never seen such excellent code before.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;That’s not what happened.  To give you an idea of what did, here is&#xA;  the art that was created from my suffering, since reshared by many&#xA;  other Googlers:&lt;/p&gt;&#xA;  &#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;&lt;strong&gt;The &lt;a href=&quot;http://en.wikipedia.org/wiki/K%C3%BCbler-Ross_model&quot; rel=&quot;noreferrer&quot;&gt;Five Stages&lt;/a&gt; of Dealing with a Code Review&lt;/strong&gt;&lt;/p&gt;&#xA;    &#xA;    &lt;ol&gt;&#xA;    &lt;li&gt;Disbelief: &quot;How could someone find so much to complain about in my code?!&quot; &lt;/li&gt;&#xA;    &lt;li&gt;Anger: &quot;How dare someone suggest that a hash-map of hash-maps isn't an efficient way of storing data?&quot; &lt;/li&gt;&#xA;    &lt;li&gt;Bargaining: &quot;Maybe if I add the comments the reviewer requested in one file, I won't have to fix the tricky Unicode issues in another.&quot; &lt;/li&gt;&#xA;    &lt;li&gt;Depression: &quot;There was so much wrong with my code.  How can I show my face to the person who reviewed my code?&quot; &lt;/li&gt;&#xA;    &lt;li&gt;Acceptance: &quot;Wow, my code is a lot better due to the feedback.  This is a useful process, although I bet it's occasionally painful for everyone.&quot;&lt;/li&gt;&#xA;    &lt;/ol&gt;&#xA;    &#xA;    &lt;p&gt;It’s much better not &lt;a href=&quot;http://abstrusegoose.com/381&quot; rel=&quot;noreferrer&quot;&gt;to take suggestions personally&lt;/a&gt;.&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I also try to model an openness to feedback by soliciting suggestions on how to improve my teaching and putting them into practice immediately. (To see how well I succeed at this goal, I add this question to the end-of-semester evaluations: &quot;The instructor responds well to and incorporates student feedback.&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I begin code reviews by congratulating students on what they've accomplished and telling them I'll show them how to make their code even better (as suggested by kayleeFrye_onDeck).&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-06T20:08:23.643" LastActivityDate="2017-07-06T20:08:23.643" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1453" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T20:26:01.570" Score="7" Body="&lt;p&gt;&lt;strong&gt;Don't go too far!&lt;/strong&gt; Technology isn't the solution to your problems. I say this because I honestly have seen teachers who see technology as this magical god that will swoop in and save them from their troubles. A lecture that's pure powerpoint and talking and example can be great, and a lecture that's got every little tech widget and infographic and diagram can be a drag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real solution is to think about what you want to say, and say it well. I had a math teacher. He had fifty minutes for class. Most of the time, he spent only fifteen to twenty minutes on the lesson, and then let kids get going on the homework, and spent that time bopping around helping those who needed it. Everyone loved that class, because he explained things succinctly and well. Note that that &lt;em&gt;was&lt;/em&gt; an &quot;advanced&quot; class, but I really think that things are no different in normal classes. I'm not saying you should use only part of your class time - I'm saying you should be succinct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's said that if you give a man a fish, you feed him for a day, and if you teach a man to fish, you feed him for a lifetime (excepting that one SMBC comic). I would adapt it to say that if you spoonfeed facts, you teach them for an A, if you let them discover facts, you teach them for life. So the more examples, interactive work, and intuitive explanation you've got the better. There was a day in geometry where we were talking about arcs. The teacher put the formula for arc length up on the board. I looked at it and started zoning out, like, where did &lt;em&gt;that&lt;/em&gt; come from? And when I went home that day, I ended up looking up what the definition of a radian was, and I figured out how to derive it. I will never, ever forget the formula for arc length, or how to derive that $2\pi \text{ rad} = 360^\circ$. Ever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Practice your delivery, and nail your presentation. Like @BenI. says, don't give them a wall of text - give them animations and diagrams, that aren't gimmicky, but say what they need to say. Exercises, follow alongs, challenges, all good. Over reliance on tech to hold attention - bad. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-06T20:26:01.570" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1454" PostTypeId="2" ParentId="1430" CreationDate="2017-07-06T21:30:27.330" Score="4" Body="&lt;p&gt;The changes are not huge.  However, all of us will like JShell a whole lot.  Java 8 was where the big changes occurred.  I only forsee small changes in how I do things.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-06T21:30:27.330" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1455" PostTypeId="2" ParentId="1260" CreationDate="2017-07-06T21:34:17.323" Score="2" Body="&lt;p&gt;I think you should develop your practice plans based on the competition that you're preparing for. I'm a high school teacher that has brought teams of students to &lt;a href=&quot;http://www.lockheedmartin.com/us/who-we-are/community/codequest.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lockheed Martin's Code Quest&lt;/a&gt; for the past several years. Many of the problems can be solved by students towards the end of their year in AP CS. The additional training my students need is with File I/O. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best way to do that? A quick chalk-talk on I/O and then practice old Code Quest problems. Project Euler problems are excellent challenging programming problems, but they won't prepare my students nearly as well as old Code Quest problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a look at what contest your students are competing in and work old problems (often readily available on the contest's website). Simulating the experiences that your students will encounter at competition is their best practice. &lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2017-07-06T21:34:17.323" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1456" PostTypeId="1" CreationDate="2017-07-06T21:34:46.847" Score="23" ViewCount="4465" Body="&lt;p&gt;On open source projects and industry teams, there are often detailed style guides about how many spaces should be used for indents, line continuation, etc., and whether braces should go on their own line. While I have my preferences (such as spaces around binary operators), I acknowledge they are somewhat arbitrary. Should I require students to follow a standard for assignments and team projects (perhaps conventions of their own choosing), or should I ignore these as trivialities?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I would enforce more important conventions, such as proper indentation, appropriate naming, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/b9VkB.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/b9VkB.png&quot; alt=&quot;December 10, 2001, Hackles cartoon, in which 2 programmers dispute formatting of curly braces&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-17T18:33:48.160" Title="Should teachers enforce standardization of spacing and braces?" Tags="|coding-style|" AnswerCount="10" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1457" PostTypeId="2" ParentId="1456" CreationDate="2017-07-06T22:01:02.887" Score="22" Body="&lt;p&gt;Our two deities are &lt;strong&gt;clarity&lt;/strong&gt; and &lt;strong&gt;efficiency&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Standardization makes a great deal of sense in industry, where large numbers of programmers may work with the same lines of code and must be able to make sense of each others' choices. However, I don't see value in enforcing particular style guides in an educational setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different companies can require different norms.  If your students eventually enter the industry, a style guide is easy to read through if they can code, and is irrelevant if they can't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I teach my kids to worry about indentation, vertical spacing, variable names, etc, I teach them to always use this question as their foundation and their guiding star: &lt;em&gt;&quot;what does&lt;/em&gt; &lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;choice communicate?&quot;&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is honestly already quite a lot to tackle, and I have found that my kids really do start working quite hard and thinking quite deeply about how to make sure that every line of code is as clean and clear as it can be.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If my students can learn to scale this mountain, why would I ask for 4 spaces in place of a tab?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-17T18:33:48.160" LastActivityDate="2017-07-17T18:33:48.160" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1458" PostTypeId="2" ParentId="1456" CreationDate="2017-07-06T22:36:22.653" Score="16" Body="&lt;p&gt;I think placing some emphasis on style and conventions is important, yes -- learning how to follow style guides is a skill worth training and learning to be detail-oriented is an important meta-skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I think it's fine to introduce some leniency by allowing students to use whatever convention they want &lt;em&gt;as long as they're consistent&lt;/em&gt;, especially for things like curly brace placement or tabs vs spaces. If the goal is to train students to acquire a sense of craftmanship, having them demonstrate they know how to be consistent is enough, I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some formatting rules do seem to be more universal though (across languages and style guides), such as adding spaces around binary operators. It's probably worth enforcing rules like those, to make sure students acquire correct &quot;muscle memory&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the answer to your question might also vary depending on age -- the older students are, the more we should expect from them. In particular, once students are at the undergrad level, they're basically adults and expecting them to be detail-oriented seems pretty reasonable to me, especially if they plan on doing CS as a career. After all, sloppiness in the small often tends to translate into sloppiness in the large, and churning out students who think it's ok to cut corners seems somewhat irresponsible to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One middle ground between enforcing and ignoring convention would be to provide students with a linter (which they can perhaps tune with your permission?). If you make students responsible for turning in code that perfectly passes the linter as a binary pass/fail sort of thing, you'll make sure standards are maintained without putting too much pressure on the students. This also has the added benefit of being more representative of how development is actually done in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would probably introduce these tools only after your students have had a chance to develop a sense of consistency and craftsmanship, though.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-07T19:43:35.747" LastActivityDate="2017-07-07T19:43:35.747" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1459" PostTypeId="2" ParentId="1456" CreationDate="2017-07-06T22:59:11.377" Score="7" Body="&lt;p&gt;I tell my students this.  Pick a style and be consistent.  You will see religious wars over&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for(...)&#xA;{&#xA;    code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for(...){&#xA;    code&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both are FINE. Pick one and be consistent.  I find the first easier to use because it makes finding curly brace errors butt simple.  But some prefer the other and that is AOK with me.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="732" LastEditDate="2017-07-07T00:47:32.687" LastActivityDate="2017-07-07T00:47:32.687" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="1460" PostTypeId="2" ParentId="1444" CreationDate="2017-07-06T23:00:44.853" Score="2" Body="&lt;p&gt;My students love event-driven programming and GUIs.  These become objects of fascination and obsession.  And they are a great vehicle for teaching inheritance.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-06T23:00:44.853" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1461" PostTypeId="2" ParentId="1331" CreationDate="2017-07-06T23:58:16.833" Score="1" Body="&lt;p&gt;Our department is small enough and close-knit enough that most of my students have seen the CS mail room across from the CS main office. A mail room that has a wall of slots, one for each faculty and staff in the department. I tweak the address metaphor and talk about how the mail slot is analogous to a port. Address (IP) gets the letter (packet) to the right building (computer), while the name on the address gets the letter (packet) to the right person (port/service).&lt;/p&gt;&#xA;" OwnerUserId="536" LastActivityDate="2017-07-06T23:58:16.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1462" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T00:46:56.127" Score="4" Body="&lt;p&gt;The simple way is to use an IDE that does it for you - say Eclipse. Then you can be a bit sloppy for a few minutes and get it cleaned up. You can define the style you like in the options. You can pass your code to a buddy who has a different style and it gets transformed with a click or two. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one option you have is to suggest to your students that they &quot;ain't writing crap&quot;. They are writing literature. They are writing poetry. If it is beautiful you will find it easier to live with. E. E. Cummings cared a lot about indentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A coding style is a garment that you live in. It should be a comfortable one. Make it so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A friend who is a lisp expert claims he can see the intent of a piece of lisp code (properly indented and parenthesized) at a glance. He means it literally. All he sees is the pattern of indentation. I have a guess that you can reach that level in Python. Java being less compact in general might not enable that as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you can sometimes see that a piece of code is &lt;em&gt;broken&lt;/em&gt; by glancing at its indentation structure. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Old person horror story. I once worked in Pascal on IBM mainframe terminals. You put a space before every semicolon since the search function would only work on contiguous blocks so mumble and mumble; required different searches. You always &quot;spaced out&quot; every identifier and regretted it when you didn't.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-07T00:46:56.127" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1463" PostTypeId="1" AcceptedAnswerId="1481" CreationDate="2017-07-07T02:36:46.213" Score="9" ViewCount="461" Body="&lt;h1&gt;Background:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is the first unit in junior year for a course in theoretical computer science.  Prior to this, the students have already had AP CS A and a mish-mash of other topics.  They have, by this point, studied:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Python (as their introduction to programming)&lt;/li&gt;&#xA;&lt;li&gt;Java for AP CS A (loops, arrays, object design, recursion, polymorphism)&lt;/li&gt;&#xA;&lt;li&gt;6502 Assembly (for stack operation, including recursion again)&lt;/li&gt;&#xA;&lt;li&gt;C (largely for pointers)&lt;/li&gt;&#xA;&lt;li&gt;Additional things in Java (e.g. trees, linked lists, tries, Hashmaps, generics) and some algorithms (such as BFS, DFS, Huffman Encoding, Conway's Game of Life, Prim's, etc)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This course, then, is a year of theoretical computer science.  The first unit is background mathematics that they will need during the rest of the course, and it focuses on boolean algebra and sets.  The requested Unit Review here is for my boolean algebra opening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general goals are to help the students gain serious familiarity with algebraic manipulations and with the symbols themselves.  After these lessons, we will move onto Conjunctive and Disjunctive Normal Forms, fairly substantial algebraic manipulations involving 5-10 steps, and then into logic gates for a gentle introduction to computer circuitry, so it is important that they come out prepared for that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Word of warning:&lt;/strong&gt; The unit below has some serious weaknesses, as you will see.  Please be gentle!  This year will be my second time giving these lessons, and while I have made a series of improvements from what I did this last September, there is still a long way to go.  There is a lot of lecture, and I would really like to make it more engaging when I do it again27.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Curriculum&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lesson one:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We begin our foray into boolean algebra by converting our Java boolean symbols to formal math symbology: &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; to $\land$, &lt;code&gt;||&lt;/code&gt; to $\lor$, and &lt;code&gt;!&lt;/code&gt; to $\lnot$.  We then discuss how &lt;code&gt;!=&lt;/code&gt; is essentially $\oplus$, and begin our discussion of $\Longleftrightarrow$ as being a near approximation of &lt;code&gt;==&lt;/code&gt; (with a promise that we will come back to this again, because we are not done with it yet). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We then introduce tautologies (such as $B \lor \lnot B$), and go over their truth tables.  I finally provide them with an extremely short homework worksheet where they have to circle the boolean statements that are tautologies.  (It also provides practice with all of the symbols we have discussed)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lesson two:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We review lesson 1, and then introduce the concept of &lt;em&gt;contradictions&lt;/em&gt; as the opposite of tautologies, go over their truth tables, and look at the obvious contradiction $B \land \lnot B$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask them to create two tautologies with a partner, the more creative the better, walk around, and ask for a number of students to write interesting ones on the board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We move on to $A \Rightarrow B$, discuss its meaning and truth table, and then ask what in Java is similar?  I first propose:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; if (A)&#xA;     B = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We talk about this for awhile, and talk about why, though it may seem like a reasonable choice at first, it is not really the same idea.  We then spend some time on the hardest idea of &lt;em&gt;implies:&lt;/em&gt; what we mean when we say that $False \Rightarrow True$ is $True$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, I take a break to introduce the way I approach proofs in this class.  Over the course of the year, certain very important proofs must be reproduced by a student chosen at random during the following period.  This forces the students not to ignore these proofs, and helps them to internalize both the mathematical symbols that I need them to gain fluency with, and some very clever proof techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I spend a substantial chunk of time then doing a formal proof that $False \Rightarrow True \equiv True$.  I finish the class with a second, informal, and intuitive proof of the same (which they will not need to reproduce.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lesson 3:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We review from the prior day, and a student is called up to reproduce the proof.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We then spend about 15 minutes going over &lt;em&gt;necessary&lt;/em&gt; and &lt;em&gt;sufficient&lt;/em&gt; in depth, and re-examine both $\Longleftrightarrow$ and $\Rightarrow$ through this new lense.  During this process, I introduce $\Longleftrightarrow$ more properly as $(A \Rightarrow B) \land (A \Leftarrow B)$ and as &lt;strong&gt;iff&lt;/strong&gt;, and we talk about the similarities that $\Longleftrightarrow$ shares with $\equiv$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I go over &lt;strong&gt;DeMorgan's Laws&lt;/strong&gt;, and briefly cover 5 more symbols: ∀, ∃, |, ∈, and ∴.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, I give them &lt;em&gt;English statements&lt;/em&gt; to translate to &lt;em&gt;mathematical statements&lt;/em&gt;, and &lt;em&gt;mathematical statements&lt;/em&gt; to translate to &lt;em&gt;English statements&lt;/em&gt;, one at a time.  &lt;em&gt;We use the following format:&lt;/em&gt; I provide an exercise, they work on it with a buddy or on their own while I bounce around the room offering help, and then I go over how we do it.  The final exercise is to translate Goldbach's Conjecture (which I do not identify to them until after the translation work is done) from boolean symbology into English:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;$\forall n|n \gt 2 \wedge (\frac{n}{2}) \in \mathbb{N}$, &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;$\exists (m,ℓ)\,\,|\,\, m \in P \wedge ℓ \in P \wedge m+ℓ=n$&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As they leave, I give them a homework assignment with practice problems in very simple 1- or 2-step boolean algebraic reductions (including applying DeMorgan's Law), translating statements from English back and forth into symbols, creating truth tables from algebraic statements, and creating algebraic statements from truth tables.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Request&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is my opener for the year, and it is &lt;em&gt;so. very. dry.&lt;/em&gt;  There is also very little activity!  I am already aware that I've got a real snoozer here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This material must to come first in the year for large-scale organizational reasons, but I would really like ideas to make it more engaging. &lt;em&gt;I am also particularly seeking out ideas for &lt;strong&gt;active learning&lt;/strong&gt; and ways to utilize &lt;strong&gt;pair partners&lt;/strong&gt; to improve both engagement and mastery.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-07-07T08:32:25.890" LastActivityDate="2017-07-09T13:45:49.227" Title="Unit Review for boolean algebra" Tags="|cs-theory|curriculum-review|boolean-algebra|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1464" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T03:31:49.703" Score="0" Body="&lt;p&gt;All my workplaces have had a set style-guide and expected me to follow it. In some cases failure to follow the style would result in the build system complaining and lots of finger-pointing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your goal is to teach students how to code as a career, then set an arbitrary style-guide and enforce it. Even better would be to use different styles for each assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach your students that any modern IDE worth using can be configured to require a style, and they shouldn't be wasting time trying to do such things manually.&lt;/p&gt;&#xA;" OwnerUserId="1197" LastEditorUserId="150" LastEditDate="2017-07-07T06:45:45.350" LastActivityDate="2017-07-07T06:45:45.350" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1465" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T03:32:23.057" Score="2" Body="&lt;p&gt;Simple answer: Yes.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Standardization matters, arbitrary or not.  &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Imagine if some chose to use punctuation in writing, and some didn't... talk about a nightmare of confusion.  &lt;/li&gt;&#xA;&lt;li&gt;A basic standardization of code writing usually results with a higher efficiency when having to go back through the code for removals or additions... it will also make the job of whomever is grading the work that much easier.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'd compare a basic standardization of spacing and braces to the same principal of basic training in the military.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basic training is there to teach one the basics, of which many things taught are not likely to be used by the unit one ends up in, as they will have their own ways of doing things.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;So while an arbitrary business or project may have it's own standardization, one should still be taught a basic standardization of spacing, braces, and indentation.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1751" LastActivityDate="2017-07-07T03:32:23.057" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1466" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T07:56:48.353" Score="0" Body="&lt;p&gt;As always once you start looking into a topic you will find that there's a whole history and reasoning behind it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example the infamous issue of where to place an opening curly bracket does actually make a difference. Placing it on the start of the next line creates a more symmetric image, since both the opening and the closing bracket are at the same indentation level, so this style makes more sense in languages where symmetry is important, like (old-fashioned) C++ with its patterns like new and delete, setup and shutdown, etc.. Using &quot;symmetric&quot; curly braces makes it easier to spot memory or reference leaks when you use objects that need to be cleaned up manually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand in languages where you use a lot of anonymous functions like JavaScript or in programming styles that make extensive use of lambda functions there are actually cases where placing the opening curly bracket makes you more prone to bugs. Also I would argue that the readability is improved, since the function body is just part of one value, so to show that you are writing declarative code inside imperative code you may want to place the new line behind the opening curly bracket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like that there's a rationale behind almost every coding style decision, so what I do and what I recommend is that you talk about the reasoning behind different styles and then let the students choose a style of their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only things I would grade in papers and examns would be whether the coding style is consistent and adequate. For example every now and then I find code that was copy-pasted from the internet, which in itself is not an issue, but most tutorials optimize the code for readability on a web page, which of course is very different from what you would do in an IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end don't forget that as soon as you start combining languages there is hardly ever one consistent coding style, so you will have to make up your mind which style you want to use anyway.&lt;/p&gt;&#xA;" OwnerUserId="1695" LastActivityDate="2017-07-07T07:56:48.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1467" PostTypeId="2" ParentId="1444" CreationDate="2017-07-07T08:59:59.643" Score="6" Body="&lt;p&gt;I'll just throw in my two cents from a student perspective - the lectures I follow most closely are the ones which are interactive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;No matter how good a person can present a subject, if I can somehow interact with the subejct (starting from having to think for 2 minutes about possible solutions all the way to a &quot;coding contest&quot; over the course of 2 weeks) the motivation and the learning process are taken to a entirely different level.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had fantastic lectures during which the professor &quot;only&quot; talked / showed powerpoint slides, but I had even better ones where the prof might not have had  the same rethoric ability, but was able to integrate students and lead them to &lt;strong&gt;interact with the subject on their own.&lt;/strong&gt;  (not on an obligatory basis - obligatory tasks often killed curiosity to go further/look outside the box, at least in my case)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;voluntary coding challenge (less than X characters / elegant solutions / etc)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Playful learning (a prof used a 2D jump-and-run game, that you had to add to by developing it yourself - e.g. change the variable &quot;maxJumpHeight&quot; to be able to jump over an obstacle in the 2D game-world.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Challenging discussions on how / why to do something in what way&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The main problem I guess is, that all of this can be very &lt;strong&gt;time-consuming&lt;/strong&gt;.&#xA;So I guess at some level you need to balance it, introduction with a (e.g.) playful learning approach, to catch motivation for coding, enhance interest in the subject, then &quot;powerpoint&quot; lectures to explain how it all works. &lt;/p&gt;&#xA;" OwnerUserId="1761" LastActivityDate="2017-07-07T08:59:59.643" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1468" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T09:16:46.257" Score="1" Body="&lt;p&gt;Often times students (i am speaking of high-school leveled) dont like to be constraned too much. The important conventions you do enforce should be enough.&#xA;If you add more to it then the students might be feeling that you are demanding too much from them and they might enjoy classes less. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However if you still think that spacing is important to you then i suggest letting the students code in a IDE that has auto formatting abilities (*for example intellij Ctrl+Alt+L and eclipse Ctrl+Shift+F, which might suit you because i understand from your last questions that you teach java).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In those IDE the students are responsible for doing correct naming and and some other conventions. Indentation becomes the only thing you need to make sure they learn. If you do choose this method then just make sure they understand why its important to format the code properly. If you want to know how to make them understand it, i'm sure you can ask that here.&lt;/p&gt;&#xA;" OwnerUserId="1705" LastActivityDate="2017-07-07T09:16:46.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1469" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T12:43:02.210" Score="2" Body="&lt;p&gt;I briefly discuss spacing, braces, and general readability. Then I open Eclipse and demonstrate [Ctrl]+a, [Ctrl]+i. This instantly indents your code according to a default standard (which is configurable). Since there are so many concepts to cover in class and limited time, this is one shortcut we take.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastEditorUserId="1529" LastEditDate="2017-07-07T12:55:26.060" LastActivityDate="2017-07-07T12:55:26.060" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1470" PostTypeId="2" ParentId="1463" CreationDate="2017-07-07T13:37:58.727" Score="3" Body="&lt;p&gt;I've found a lot of success giving real world (often times very silly) examples of boolean algebra to give them a more intuitive understanding in addition to the pure algebraic laws. An example would be &quot;If it rains tomorrow, I will bring an umbrella so I will stay dry&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a simple A -&gt; B:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it rains tomorrow then I will bring an umbrella, I will stay dry (T -&gt; T = T)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it rains tomorrow then I will not bring an umbrella, I will not stay dry (T -&gt; F = F)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it does not rain tomorrow then I will bring an umbrella, I will stay dry (F -&gt; T = T)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it does not rain tomorrow then I will not bring an umbrella, I will stay dry (F -&gt; F = T)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using DeMorgan's we know A -&gt; B = !A V B. We can say A = it will rain tomorrow, B = bringing an umbrella and whether you stay dry or not is the equivalent of the resulting truth table value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can incorporate students in coming up with these silly examples, and having them figure out how the narrative would look like to reflect the truth table values. In addition, pairs can come up with scenarios and test each other's knowledge. (This was during 2nd year University too! So it's never too old to get silly)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly as a remark, I did not see you mention some Laws of Boolean Algebra such as Associative, Commutative, Idempotent, Identity, and Distributive. I think it's worth while to introduce these laws during lesson 1 or 2 because solving boolean algebra down the road is built off of these fundamentals.&lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-07-07T13:37:58.727" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1471" PostTypeId="1" AcceptedAnswerId="1503" CreationDate="2017-07-07T14:23:59.757" Score="3" ViewCount="158" Body="&lt;p&gt;&lt;b&gt;Disclaimer:&lt;/b&gt; I am teaching in Canada and therefore I am unfamiliar with the American AP CS A and AP CS P curricula that others may have talked about. In my school board at least, it is still very grey what exactly to teach in AP CS. Essentially this is a grade 12 course continuing from grade 11 (which taught variables, arrays, loops, functions and simple inheritance). The goal of AP as posed to regular is to focus more on OOP, specifically SOLID principles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that out of the way, here's the situation. I am teaching a summer course to high school students who want an enriched Computer Science course in order to succeed in University. This is the first time this course is offered during the summer (and my first time teaching this course). This week, I decided to go over some review of Java basics to gauge the overall knowledge of my class. Ironically enough, everyone seemed to know variables and access modifiers, but as I began going over some Inheritance, students became confused over static variables, static space and where variables were.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I drew out a simple memory model and showed where static, heap, stack and meta-space. I could already tell there were a lot of blank faces &lt;em&gt;(okay, let's back track)&lt;/em&gt;. I essentially explained that things declared in the static space are global to the project and belong to a class as posed to instances. However, surprise surprise, I spent majority of this week helping students with &quot;non static variable cannot be referenced in a static context&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the rest of the term, I am wondering if I should devote a week to thoroughly explaining what exactly the static keyword means, what static space is and the Java memory model, or continue with the material (as there is a lot to cover) and just try to stray away from involving static space and variables in my examples?&lt;/p&gt;&#xA;" OwnerUserId="747" LastEditorUserId="27" LastEditDate="2017-07-07T17:32:40.050" LastActivityDate="2017-07-07T22:13:41.293" Title="Should Java Static space and Memory Model be a part of AP CS" Tags="|curriculum-design|secondary-education|static|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="1472" PostTypeId="1" CreationDate="2017-07-07T14:40:45.400" Score="3" ViewCount="48" Body="&lt;p&gt;In the final report of their internship, the students of our school must have one chapter where they &quot;document&quot; the developed work. When using the “waterfall” methodology, they usually have one sub-section for each stage: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;requirements&lt;/li&gt;&#xA;&lt;li&gt;detailed design&lt;/li&gt;&#xA;&lt;li&gt;implementation&lt;/li&gt;&#xA;&lt;li&gt;tests&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What if an agile methodology like XP or SCRUM is used? Every year we have the same problem, as some teachers say it should be done one way, while others say the exact opposite. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-07T15:07:53.213" Title="How to document the developed work using an agile methodology?" Tags="|agile-development|documentation|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1473" PostTypeId="2" ParentId="1472" CreationDate="2017-07-07T14:50:38.510" Score="2" Body="&lt;p&gt;In SCRUM, during the end of each sprint, there is a &lt;b&gt;Sprint Retrospective&lt;/b&gt; and &lt;b&gt;Spring Review&lt;/b&gt;. Important artifacts from the two should be extracted into this report, as it reflects the &quot;developed work&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure the scope of what you require from your students for documenting the work, is it for the whole internship, or just one cycle? In any case, because Agile is done incrementally, they can just write one template per sprint they've completed.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sprint Number&lt;/li&gt;&#xA;&lt;li&gt;Sprint velocity&lt;/li&gt;&#xA;&lt;li&gt;List of stories completed&lt;/li&gt;&#xA;&lt;li&gt;Did it meet success criteria (definition of done and agile manifesto)&lt;/li&gt;&#xA;&lt;li&gt;Notes from sprint review&lt;/li&gt;&#xA;&lt;li&gt;Notes from sprint retrospective&lt;/li&gt;&#xA;&lt;li&gt;Implementation strategies (if it is required by you)&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-07-07T14:50:38.510" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1474" PostTypeId="2" ParentId="1472" CreationDate="2017-07-07T14:57:23.380" Score="1" Body="&lt;p&gt;Agile doesn't mean &quot;don't plan&quot;, so there should be plenty to talk about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have your students developed &lt;a href=&quot;http://www.extremeprogramming.org/rules/userstories.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;user stories&lt;/a&gt;? Can they talk about these? For example, let's take this example user story:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As a teacher, I want to automatically mark assignments so I'm not spending time checking code that could be done automatically.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It might be worthwhile to encourage your students to consider how and why they wrote their user stories as they did. You can check that they're not developing user stories that are too broad (&lt;a href=&quot;https://www.mountaingoatsoftware.com/blog/stories-epics-and-themes&quot; rel=&quot;nofollow noreferrer&quot;&gt;too many epics&lt;/a&gt; rather than stories) as they go along if you want to provide some support and prevent them from being too unrealistic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you should probably be estimating the amount of work for each user story, ask them to document that so you can check it. Unrealistic timings—or no timings at all—should be caught early so that you can make sure they finish the project on time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you follow the '&lt;a href=&quot;https://en.wikipedia.org/wiki/Extreme_programming_practices#Release_planning&quot; rel=&quot;nofollow noreferrer&quot;&gt;planning game&lt;/a&gt;' of XP, then you can also look at how the requirements were sorted by risk and value. Yet another point to document and mark if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned by &lt;a href=&quot;https://cseducators.stackexchange.com/a/1473/2&quot;&gt;Kaneki&lt;/a&gt;, sprint retrospectives provide time for your students to reflect on their progress. Encourage them to use this wisely in place of a huge specification detailing implementations, tests, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, there's &lt;strong&gt;loads&lt;/strong&gt; to document about Agile, but you might not need to write everything on paper. If it's easier for you, consider just being a part of the retrospective meetings and looking at how these go instead of meticulously writing down every detail. &lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-07-07T14:57:23.380" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1475" PostTypeId="2" ParentId="1472" CreationDate="2017-07-07T15:07:53.213" Score="0" Body="&lt;p&gt;If the system is object-oriented, you can use UML class diagrams to document the design. Eclipse has a plugin called &lt;a href=&quot;http://www.objectaid.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ObjectAid&lt;/a&gt; that generates these diagrams from the source code (no additional work required).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students can generate professional documentation from their source code. There is &lt;a href=&quot;https://www.npmjs.com/package/jsdoc&quot; rel=&quot;nofollow noreferrer&quot;&gt;jsdoc&lt;/a&gt; for JavaScript and &lt;a href=&quot;https://www.tutorialspoint.com/java/java_documentation.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;javadoc&lt;/a&gt; for Java. These require specific comments and tags, but it's well worth it. Source code documentation is important for future development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For all types of diagrams, there's &lt;a href=&quot;https://www.draw.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;draw.io&lt;/a&gt;, &lt;a href=&quot;https://balsamiq.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Balsamiq&lt;/a&gt;, PowerPoint, Visio, and many more. A picture is worth a thousand words.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-07T15:07:53.213" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1476" PostTypeId="5" CreationDate="2017-07-07T15:10:11.153" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-07T15:10:11.153" LastActivityDate="2017-07-07T15:10:11.153" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1477" PostTypeId="4" CreationDate="2017-07-07T15:10:11.153" Score="0" Body="For questions about schooling in the specific context of Canada, and Canada's schooling system or another variable specific too Canada. Do not apply to questions where you are located in Canada but this doesn't change your question. " OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-07T17:21:34.373" LastActivityDate="2017-07-07T17:21:34.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1478" PostTypeId="2" ParentId="261" CreationDate="2017-07-07T15:18:26.020" Score="0" Body="&lt;p&gt;Historically, the word 'static' was chosen to indicate something &quot;statically typed&quot; or defined, that is: known at compile time, in contrast to 'dynamic' - known at run-time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The word is a bit obscure these days, but with that explanation, they will understand the real point - known at compile time. &lt;strong&gt;Relate it to the word 'stationary'&lt;/strong&gt; - not going anywhere - which has the same root.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-07T15:18:26.020" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1479" PostTypeId="1" AcceptedAnswerId="2513" CreationDate="2017-07-07T15:19:03.297" Score="6" ViewCount="757" Body="&lt;p&gt;I have been having trouble finding a good resource (ideally a video) or analogy that helps me to explain how the Internet and the World Wide Web work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It does not need to be too in-depth. Only enough to cover how web pages are made available to the end user, and how HTTP requests work on the surface. Preferably,  something that isn't over 10 minutes long and that the student can understand without prior knowledge of Web Development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for a first lecture at an &quot;Introduction to the Web&quot; course, where students with zero experience in coding are introduced to HTML, CSS, JavaScript, and usability/accessibility topics. Explaining how the Web works in a concise yet effective manner that sticks has been my biggest challenge so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first lecture, I ended up using a combination of all suggestions. I used Code.org's videos, but they turned to be a bit too lengthy for the attention spans of my students, so in the next opportunity, I will address this a bit differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will not go in depth into how the Internet works and how the data is transferred, but I will use the buses/highways analogy more superficially or even as an add-on explanation instead. I may go into what the DNS is, but that's about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a Front-End Web Development course that only goes as far as using JavaScript with JQuery, potentially touching on a little bit of what is AJAX, the extra details are unnecessary, so rather than focusing on how the Internet works, I can focus on how Web sites work, or more specifically, what happens behind the scenes from the moment you type in &quot;www.google.com&quot; in the web browser, until the web page is rendered and ready to consume.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important bit for my students, perhaps, is to be aware that every asset on a page involves a new request, something more that must be downloaded. And that every element in your HTML document must be &quot;translated&quot; and drawn by the browser. Thus, it is all these assets that must be gathered, and the number of elements to draw onto the browser tab or window, that we need to take into account when developing these pages, because the more of them we have, the longer it takes for the browser to load or update the page.&lt;/p&gt;&#xA;" OwnerUserId="1770" LastEditorUserId="1770" LastEditDate="2017-07-20T17:01:21.970" LastActivityDate="2017-07-20T17:01:21.970" Title="Explaining how the Internet and the World Wide Web work" Tags="|lesson-ideas|teaching-analogy|resource-request|" AnswerCount="5" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1480" PostTypeId="2" ParentId="1479" CreationDate="2017-07-07T15:29:40.240" Score="2" Body="&lt;p&gt;One analogy I use in my intro class is transportation. The Internet is the roads, bridges, and highways. The World Wide Web is the cars and trucks that travel along these routes, carrying cargo to/from different places.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-07T15:29:40.240" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1481" PostTypeId="2" ParentId="1463" CreationDate="2017-07-07T15:44:25.493" Score="3" Body="&lt;p&gt;I don't know if I have a solid answer to the main thrust of your question, but I do have some one-off suggestions that may or may not be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, something you could try integrating into your lessons is some kind of meta-narrative about why proofs are useful in the first place. This seems to be a very common concern from students in the discrete maths course that I help teach (especially since they've been mostly programming up to that point) -- &lt;a href=&quot;https://cseducators.stackexchange.com/q/1037/732&quot;&gt;this post&lt;/a&gt; made earlier might be applicable (though idk if I fully agree with all of the answers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second thing you could try doing is squashing your first and second lessons into one. If your students are already familiar with that many programming languages, I think they'll also be pretty familiar with boolean symbols, and won't find truth tables terribly hard (or interesting).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might then be more fruitful to cover tautologies, contradictions, and contingencies around the same time -- might as well cover all of the related definitions at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think focusing on implications for some time would be useful, though. That seems to be a very challenging concepts for students to fully grasp -- see &lt;a href=&quot;https://matheducators.stackexchange.com/q/353/5155&quot;&gt;How to teach logical implication&lt;/a&gt; for more details. Making students do challenging exercises that the &lt;a href=&quot;https://en.wikipedia.org/wiki/Wason_selection_task&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wason selection task&lt;/a&gt; to see if they really grok implication may also help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You mentioned you briefly cover first-order logic (symbols like ∀, ∃, |, ∈, and ∴). I think those merit more time -- those also seem to be challenging concepts for students to grasp (in particular, what they mean, how variable scoping works, how to correctly use rules like ∀-introduction, ∀-elimination, and the like). One good challenge question for your students is to ask them whether or not $\forall x \, \exists \, y P(x, y)$ and $\exists y \, \forall x \, P(x, y)$ have same or differing truth values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also save teaching what ∈ for when you formally introduce sets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, one way to perhaps make your lessons more exciting is to introduce homework/introduce problems that involve solving logic puzzles, particularly ones that are challenging to reason through normally. Have your students start by converting the constraints into logical propositions then have them simplify them until they're able to find an answer. This lets them practice their English to logic skills and their logic manipulation skills in a hopefully more fun setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want, you can even take this one step further and turn it into a programming assignment by asking them to generate constraints they then feed into a SAT solver like z3. (For example, take sudoku -- you can make each cell a variable, define 9 predicates that encode whether or not a cell contains a number or not, then define a whole bunch of implications encoding relationships between relevant pairs of cells). This lets them see more concretely how propositional logic is relevant to computer science, and also lets them play around with a cool piece of tech.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-07-07T15:44:25.493" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1482" PostTypeId="1" AcceptedAnswerId="1484" CreationDate="2017-07-07T15:54:41.360" Score="4" ViewCount="209" Body="&lt;p&gt;I am an experienced programmer that has just started teaching. I am struggling to see how to introduce selection to my programming classes. None of the examples that I have seen so far are good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am struggling to find examples other than the ones below. (These are more advanced than I need.)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Termination condition for recursion (We don't do recursion until upper years of school, exams do not need it).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Input validation (Again the exams say don't worry about checking input (I think this is a mistake, as it leads to cowboy programmers)).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both of these are only in the syllabus from UK year 12. I am teaching from UK year 7.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you help with good examples, and exercises that my younger pupils can use?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;year 7 is age 11-12&#xA;year 12 is age 16-17&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="27" LastEditDate="2017-07-08T17:55:55.583" LastActivityDate="2017-07-10T11:40:37.940" Title="Uses of selection in programming (if, switch etc)" Tags="|branching|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1483" PostTypeId="2" ParentId="1482" CreationDate="2017-07-07T16:07:59.910" Score="0" Body="&lt;p&gt;One of the early examples I usually use is a quadratic equation solver using the quadratic formula. Since many languages don't like that old square root of a negative number thing it's a nice place for a conditional. &lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-07-07T16:07:59.910" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1484" PostTypeId="2" ParentId="1482" CreationDate="2017-07-07T16:08:20.900" Score="3" Body="&lt;p&gt;There are endless examples that illustrate selection. As you know, most useful programs have at least one selection statement. I've found that some students struggle with the concept, so I start small and pick examples that resonate with students, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    if (hungry)&#xA;        System.out.println(&quot;Eat a sandwich.&quot;);&#xA;&#xA;    if (age &amp;gt; 17)&#xA;        System.out.println(&quot;You can vote.&quot;);&#xA;    else&#xA;        System.out.println(&quot;You cannot vote.&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For a &lt;em&gt;switch&lt;/em&gt; statement, I like to show some type of menu:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    switch(choice) {&#xA;    case 0:&#xA;        System.out.println(&quot;Balance Inquiry.&quot;);&#xA;        break;&#xA;    case 1:&#xA;        System.out.println(&quot;Transfer&quot;);&#xA;        break;&#xA;    case 2:&#xA;        System.out.println(&quot;Withdrawal&quot;);&#xA;        break;  &#xA;    case 3:&#xA;        System.out.println(&quot;Deposit&quot;);&#xA;        break;          &#xA;    default:&#xA;        System.out.println(&quot;Quit&quot;);&#xA;        break;          &#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-07T16:08:20.900" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1485" PostTypeId="2" ParentId="1482" CreationDate="2017-07-07T16:10:31.953" Score="2" Body="&lt;p&gt;If you want something very elementary: Write a program that determines the age of a person, where the person's date of birth and the current date are given. For simplicity assume that both dates have already been split into three integer variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The age is the difference of the years minus 1, if the current date comes before the birthday in the calendar, otherwise it's the difference of the years.).&lt;/p&gt;&#xA;" OwnerUserId="877" LastActivityDate="2017-07-07T16:10:31.953" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1486" PostTypeId="2" ParentId="1456" CreationDate="2017-07-07T16:43:03.297" Score="1" Body="&lt;p&gt;While all of these are important, some are more important than others.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Local consistency over global consistency.&lt;/li&gt;&#xA;&lt;li&gt;Style over the one true style.&lt;/li&gt;&#xA;&lt;li&gt;Automation over completeness. (that is settle for a simple set of rules, that can be automated).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I have worked of projects where every file had its own style. It was not a problem to read, but when a file had many styles it was. Switching style may take experience. There is more buy in when a person is involved with the decision. Therefore each pupil should choose a style and stick with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also easier if problems are found automatically and as early as possible. Therefore use an IDE that does it for you. Then as a second level of defence use a lint tool that detects problems. If these two can to do it then it is usually not worth it. However there is still a lot of judgement, that can not so easily be put into rules.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-07T16:43:03.297" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1487" PostTypeId="2" ParentId="1410" CreationDate="2017-07-07T16:47:35.083" Score="3" Body="&lt;p&gt;I think this question boils down into two generic parts:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to criticise in a way that doesn't trigger defensive behaviour, and;&lt;/li&gt;&#xA;&lt;li&gt;How to teach them how to handle criticism&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think the first port of call would be to bring up the subject of handling criticism &lt;em&gt;as a dedicated class session&lt;/em&gt;, including &lt;em&gt;how to extract useful feedback from poor criticism&lt;/em&gt;, and &lt;em&gt;how to make criticism&lt;/em&gt; (which they would be expected to do in the event of a code review, both reviewer and reviewee). They're adults, bring them on the level of both giving and receiving, and they should understand both sides.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other side of the fence, how to criticise I find boils down into two categories:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Subjective (EG this could look nicer)&lt;/li&gt;&#xA;&lt;li&gt;Objective (EG if you don't implement this, it will crash, and bad things will happen)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Subjective&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On subjective criticisms, I find making 'speculative' recommendations passively works best, especially with reasoning listed. So say Joey forces all his code onto a single line, you'd say:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Joey, I've noticed that in this code, everything is on a single line! I think maybe - just a suggestion - having it on multiple lines might make it easier for other people to read.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Joey has a couple of choices here. He can consider you've got a fair point, and might go for it, or, better yet, Joey will present the list of arguments as to why he has it on a single line (maybe 'no-one else will see my code' or 'I'm doing a contest on fewest bytes used on code gold'). At which point you can either explain why not building it for other people in mind is bad, or concede there is a reasoning behind it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This approach I find is excellent in team situations because the suggestions aren't forced, and it allows people to argue for/against a particular criticism. A dialogue occurs, instead of an argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Objective&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where real problems begin. It's not because Joey has made an error, but if he continues with the error, stuff will catch on fire, the world is going to end and goto loops will become fashionable again. As a result, you're required to put your foot down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before approaching, I find it works extremely well if the opening dialogue starts 'this is nothing personal, &lt;em&gt;but&lt;/em&gt;...'. Psychologically, people think it's reverse psychology and thus terrible, but when you point to the code, this helps reinforce it's actually not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The criticism should be kept short, matter-of-fact 'if this happens it will do this' (if this has no try-catch and it throws an exception, the stack is going to crash and the system will go boom). Explain what-why and how to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can help reduce the sense of it being a personal failure (the main driver of being defensive) by either indicating it's a common problem or that it's a hard problem to spot. Joey might still get defensive, however: trick is to not rise to the argument.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This is nothing personal, but, in line 232 of main.cpp, I've noticed that a try-catch statement is missing, which means exceptions are not being handled. If an exception isn't handled here, function ProcessArray might throw a memory allocation error which will cause the program to crash.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Joey might defensively respond:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;But on modern machines a memory allocation error is bound to never occur, so there's no need for a try-catch statement. Besides, I'm doing it for readability!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;At which point you sidestep the approaching argument, and simply return to matter-of-fact and a clean exit:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Good programming standards dictate that programs gracefully exit in the event of a major error, as crashing might impact the systems, if any, that rely upon it, especially to not crash. Operating Systems are a prime example of this. You might find a different workaround for this problem.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I find some people hate being told what to do, and will spurn it even if it's the most logical choice. By alerting Joey to the problem, the solution, the reasons for that solution and the fact there might be other solutions, allows Joey to see the problem as an impersonal thing for him to solve (he didn't create the mem alloc error: he has to solve it), he has one known solution, and the freedom to research other unknown solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Joey can either see your solution as the easiest, might devise his own solution (which might be surprising - as a student, he should be learning, not merely copying), or might just choose to ignore it, in which case he suffers the consequences (bonus points if you can create a scenario that causes the error), including any subsequent markdowns on program's performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Final trick&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to be really hands off, there is one question that will get most people to reconsider a piece or line of code that doesn't require explanation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What happens if&lt;/strong&gt; ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens if this ProcessArray hits a mem alloc error?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens if this switch statement encounters an unknown case?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;etc&lt;/p&gt;&#xA;" OwnerUserId="1772" LastActivityDate="2017-07-07T16:47:35.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1488" PostTypeId="2" ParentId="1260" CreationDate="2017-07-07T16:53:07.637" Score="3" Body="&lt;p&gt;When I participated in the ACM International Collegiate Programming Contest back in college, our preparation involved a LOT of practice. We poured through the ACM-ICPC archives and worked on doing the old problems. Our adviser went over a few key algorithms and concepts that we'd almost certainly run into (searches, sorts, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would highly suggest looking at the &lt;a href=&quot;https://icpcarchive.ecs.baylor.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACM-ICPC Live Archive&lt;/a&gt; for an insane amount of sample programming problems.&lt;/p&gt;&#xA;" OwnerUserId="1773" LastActivityDate="2017-07-07T16:53:07.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1489" PostTypeId="2" ParentId="408" CreationDate="2017-07-07T17:10:50.463" Score="2" Body="&lt;p&gt;A great resource for the instructor to learn the max about invariants is to go to the master. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/038790641X&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Gries, The Science of Programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It isn't a book for novice learners, though. But understanding what is in this book will help you a lot in teaching programming via invariants. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;He reveals all. He and his son have an undergrad text book also, that might not be quite as deep as this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, David shows how to develop good invariants from postconditions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-07T17:58:24.750" LastActivityDate="2017-07-07T17:58:24.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1490" PostTypeId="2" ParentId="408" CreationDate="2017-07-07T17:47:49.717" Score="3" Body="&lt;p&gt;Firstly, I believe that if the thought process is clear to &lt;em&gt;you&lt;/em&gt;, then going through that process with your students, &lt;strong&gt;out loud&lt;/strong&gt;, clearly and slowly, can help them understand what it is that you are trying to convey. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go through that process for a number of various examples, which show how &lt;em&gt;you&lt;/em&gt; decide on a loop invariant in the varying situations (yes, that pun was intended).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whilst detailing every step in the thought process, you should elaborate on the things that are necessary for a loop invariant to be good. An example of what this means in the case of induction: There's the base case, and that should be relatively easy to understand. Then the hypothesis. From here the &quot;oddities&quot; begin. Go through the inductive step multiple times (it is a &lt;em&gt;loop&lt;/em&gt;, after all &lt;code&gt;;)&lt;/code&gt;), and show them, explicitly, that the invariant really is &lt;strong&gt;invariant&lt;/strong&gt;. A few inductive steps should make it clear how the invariant doesn't change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there it would depend on how many befuddled faces are looking at the board. If a relatively large portion of the class didn't grasp it, then repeat (note: this is kind of a loop invariant. You always check the same thing) the inductive steps' explanation. This is also useful to show how the algorithm behaves, because essentially you are debugging it&lt;sup&gt;1&lt;/sup&gt;, and so it shows how the invariant dictates the behavior. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen the measure of student understanding of complex concepts being mostly &lt;code&gt;Confused&lt;/code&gt; or &lt;code&gt;Understood&lt;/code&gt; and there isn't much middle ground. When it looks like most students are less shocked then you can go through the last inductive step ($n-1$) and show how the loop invariant is still true, but it becomes false after going through the last step. This shows how the invariant choice no less than &lt;strong&gt;&lt;em&gt;defines&lt;/em&gt;&lt;/strong&gt; the algorithm's behavior.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Technically you're just executing the code line by line like a computer, but the point of what I said doesn't change.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-07T17:47:49.717" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1491" PostTypeId="2" ParentId="408" CreationDate="2017-07-07T17:51:58.587" Score="6" Body="&lt;p&gt;Let's start with the term &quot;Loop Invariance&quot;. It is a property of a loop that is true before and after each iteration, thus in-variant, non-changing. So then, what is the &lt;i&gt;purpose&lt;/i&gt; of the loop invariance in proving algorithm correctness? That is, it is a predicate about what the loop is supposed to do. Thus with proof by induction on this predicate shows the correctness of this algorithm. I know this is still very theory heavy so let's break this down even more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple insertion sort. The &lt;i&gt;purpose&lt;/i&gt; of insertion sort is to sort an array. Therefore the loop invariance would be that after each i-th iteration, the array is sorted up to the i-th element. The magic here is that instead of looking at the nested for i, j, loops of the algorithm you are choosing the loop invariance that contributes to the goal of the algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer (1). There is no sure guarenteed way to choose the correct loop invariance unless you are very experienced in algorithm correctness through countless examples. The best approach is to choose the segment of code that is actually doing what the algorithm is trying to do. Such as the example above, sorted up to the i-th element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2). I believe this has to do with the proof itself, rather than understanding the loop invariance. Structurally, to prove that the algorithm is correct, you would have to use proof by induction (either simple, or complete) to pove the loop-invariance and the fact that the algorithm actually terminates. Usually proof of termination is a 1 liner, such as when i &gt; array.length, loop will terminate.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;simply to look at the final item you are trying to prove, and figure out what property of the loop will mimic that statement.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I can tell you are very intelligent as this is something only someone who truly understands algorithms and proof of correctness can say. It is actually very difficult for younger students to see this as they are tunnel-visioned by the actual loops in the code instead of the bigger picture. Instead, I think what you are trying to convey is to look for &quot;what part of the code is doing what the algorithm is meant to do&quot;&lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-07-07T17:51:58.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1492" PostTypeId="2" ParentId="408" CreationDate="2017-07-07T17:57:41.277" Score="4" Body="&lt;p&gt;To give an explanation of this requires a problem in which to frame the discussion. I propose the Dutch National Flag problem, likely first proposed by Dijkstra, but I'm not positive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I'll pose the problem first and discuss the solution using invariants.&lt;/strong&gt;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt; Taken from The Science of Programming.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have an array of n elements. Each element is a color, red, white, or blue. You want to &quot;sort&quot; the array so that all of the low index cells are red, all of the high index sells are blue, with the white cells between them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The number of tests should be kept to a minimum. Cells may be permuted with swap (only). The algorithm you develop should require only a single pass over the array and be linear time.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This answer is in process and will be updated. If you want to try to solve it in the interim, the precondition is that the colors are randomly arranged and the postcondition is as described above: [red*, white*, blue*]&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Discussion:&lt;/strong&gt; There are many ways to develop a loop invariant, as discussed in Gries. One way is to weaken the postcondition. I will use [red*, white*, any*, blue*] as the weakened condition and the loop invariant. Such an array configuration can be described with three variables:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;lastRed  &#xA;index  &#xA;firstBlue  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The definition of these is as follows: Every cell from &lt;code&gt;0&lt;/code&gt; through &lt;code&gt;lastRed&lt;/code&gt; is RED. Every cell from &lt;code&gt;lastRed + 1&lt;/code&gt; through &lt;code&gt;index - 1&lt;/code&gt; is WHITE. Every cell from &lt;code&gt;lastBlue&lt;/code&gt; through the end is BLUE&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To establish the invariant prior to the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;lastRed = -1;&#xA;index = 0;&#xA;firstBlue = flag.length; // flag is the array variable, initially random. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With these definitions, the invariant is true with the array in state [ any* ].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; The solution is to run a loop that takes the any* section from &quot;all&quot; to &quot;empty&quot;. You can do that either by (a) increasing &lt;code&gt;index&lt;/code&gt;, which breaks the invariant, and then re-establishing the invariant, or (b) by decreasing &lt;code&gt;firstBlue&lt;/code&gt; and re-establishing. Looking at $flag[index]$ will tell you what to do. Swap two cells as needed. A three case &quot;switch&quot; or equivalent is the body of the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The invariant along with &lt;code&gt;index == firstBlue&lt;/code&gt; is the postcondition. Therefore the while loop test condition is &lt;code&gt;index &amp;lt; firstBlue&lt;/code&gt; QED&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that it is a linear pass over the array, but with two variables moving toward each other from the end. Cool as a moose. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note 1: The Science of Programming book has many other ideas for coming up with an invariant. This was just one possibility. The book is well organized around that idea. In general, though, the invariant of a loop &lt;em&gt;emerges&lt;/em&gt; somehow from the pre and/or postconditions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note 2: It shouldn't take much, after doing this exercise, to convince a student that with four values instead of three it is only a bit harder to &quot;sort&quot; in linear time. Actually, any list/array of values from a finite set can be sorted in linear time. Radix sort works, of course, but so does this. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-08T00:19:49.947" LastActivityDate="2017-07-08T00:19:49.947" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1493" PostTypeId="1" CreationDate="2017-07-07T18:41:22.800" Score="22" ViewCount="2757" Body="&lt;p&gt;Through the years I had several students that clearly were not fitted for computer science. Some of them ended up by dropping the program after a few years, some of them are still there struggling year after year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess that one of the main problems is that they shouldn’t even have started the program, but due to unemployment of other programs, and the permanent media coverage on the lack of IT professionals, they end up enrolling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I am aware of 5-10 students that are on their 7th, 8th and further years on a 3 year program. And some of them are getting worse every year. So, they are basically spending their parents’ money and could be doing something more productive instead of just being there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some cases, it just makes me sad to see that they are absolutely unable to progress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is: has any of you ever had to tell a student that s/he should probably enroll in a different program?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I am aware of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1290/how-to-deal-with-students-that-dont-like-cs&quot;&gt;this question&lt;/a&gt; about CS class, my question is about the entire program.&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1776" LastEditDate="2017-07-07T20:27:31.027" LastActivityDate="2017-08-30T22:49:11.253" Title="How to tell a student that s/he should enroll in a different program?" Tags="|student-motivation|" AnswerCount="9" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1494" PostTypeId="2" ParentId="1390" CreationDate="2017-07-07T18:44:07.477" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Note: I'm one of the founders of CodeHS&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We made a free review course on CodeHS that you can try out. It has hundreds of practice multiple choice problems broken down by topic as well as a complete practice exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, it's helpful to practice answering questions that use the pseudocode language because it has some quirks and may be new to students. You wouldn't want to first encounter it on the exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can learn more and get started here: &lt;a href=&quot;https://codehs.com/info/curriculum/apcsp_review&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://codehs.com/info/curriculum/apcsp_review&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="91" LastActivityDate="2017-07-07T18:44:07.477" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1495" PostTypeId="2" ParentId="756" CreationDate="2017-07-07T18:49:38.380" Score="3" Body="&lt;p&gt;There is this research paper &quot;&lt;strong&gt;Learning edge momentum:&#xA;A new account of outcomes in CS1&lt;/strong&gt;&quot; by Anthony Robins that is much focused on that subject... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the abstract:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Compared to other subjects the typical introductory programming (CS1)&#xA;  course has higher than usual rates of both failing and high grades,&#xA;  creating a characteristic bimodal grade distribution.  In this paper I&#xA;  explore two possible explanations.  The conventional explanation has&#xA;  been that learners naturally fall into populations of programmers and&#xA;  non-programmers.  A review of decades of research, however, finds&#xA;  little or no evidence to support this account.  I propose an&#xA;  alternative explanation, the learning edge momentum (LEM) effect. &#xA;  This hypothesis is introduced by way of a simulated model of grade&#xA;  distributions, then grounded in the psychological and educational&#xA;  literature.  LEM operates such that success in acquiring one concept&#xA;  makes learning other closely linked concepts easier (whereas failure&#xA;  makes it harder). This interaction between the way that people learn&#xA;  and the tightly integrated nature of the concepts comprising a&#xA;  programming language creates an inherent structural bias in CS1 which&#xA;  drives students towards extreme outcomes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-07T18:49:38.380" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1496" PostTypeId="2" ParentId="1493" CreationDate="2017-07-07T19:05:41.073" Score="9" Body="&lt;p&gt;I wouldn't tell my students such thing because of two things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One, I can never be sure enough. I don't see the whole picture. They are struggling in my courses, maybe many of my colleagues say they are struggling in their courses too, but they might turn out to be amazing web or UI designers later. Or maybe they have a God given talent in some obscure mathematical field that will be really valuable in the near future in robotics. I can never know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing is that saying something like this can do irreversible damage. A professor telling a student that they are not good enough for a given field is just brutal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are you trying to achieve? If you really want to help them, you need to get to know them very well, have a few beers together, have some long talks, find out why they even started CS, and very carefully help them realize they have other options. But to be honest, I'd rather spend the little free time I have with students that excel, and help them get even better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my short answer is: don't tell them. You can't know for sure, and it is really not you who should enlighten them. That is what friends and family are for. Help them if you can, and fail them in your course if they are below expectations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Now I'd give a very different answer if you were teaching future teachers. But since these folks are only hurting themselves on the long run if you are right...)&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-07-07T19:05:41.073" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1497" PostTypeId="2" ParentId="1493" CreationDate="2017-07-07T19:46:12.070" Score="26" Body="&lt;p&gt;Don't tell them anything. Ask pointed questions.  Ask why they chose this course, or this major.  Ask where they expect to be in a year or in five years.  Make them talk through their plans.  Let them find the gaps in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This past semester, I asked every single student that came in to my office to change majors to CS (or to IT) the same first question: &quot;Why?&quot;  Some students had a great immediate answer, and I signed the form right away.  With others, we had a 20 minute conversation.  Some of them said they're in it for the money, and I would say things like &quot;You'll make more money as a plumber, and you don't need college for that.&quot;  &quot;Oh, but my dad said-&quot;  &quot;But what do &lt;em&gt;you&lt;/em&gt; want?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's like helping them learn to debug.  Let them come to the decision.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastActivityDate="2017-07-07T19:46:12.070" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1498" PostTypeId="5" CreationDate="2017-07-07T19:48:07.567" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Software_documentation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Documentation&lt;/a&gt; of code is a description of how the code works and/or what it does. It is considered a good coding practice to document your code, because it makes reading it clearer and simpler. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Documentation should be making the operation of a program easy to understand without going too deep into details. There are many tools to create a document from a project. Some languages, such as java, have tools supplied by the developers to create documentation. &lt;/p&gt;&#xA;" OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-07T20:07:47.553" LastActivityDate="2017-07-07T20:07:47.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1499" PostTypeId="4" CreationDate="2017-07-07T19:48:07.567" Score="0" Body="Documentation is a description of code written in day to day language. Questions using this tag can ask about teaching how to write proper documentation." OwnerUserId="1705" LastEditorUserId="1705" LastEditDate="2017-07-07T20:07:56.643" LastActivityDate="2017-07-07T20:07:56.643" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1500" PostTypeId="2" ParentId="1493" CreationDate="2017-07-07T20:57:33.477" Score="8" Body="&lt;p&gt;First and foremost, I applaud the love you have for your students. It is clear that you care for them deeply. I have no doubt that this desire to honor them as human beings works its way into your classroom and your private interactions with the students, and I have no doubt that this makes a real difference in many of their lives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I am unfamiliar with the norms of your country, so I don't know how well my answer will translate to a new situation.  Therefore, what I say might not be entirely correct in your circumstance&lt;sup&gt;1&lt;/sup&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if I could bear it at all, &lt;em&gt;I would not tell them anything&lt;/em&gt;.  I recognize that it can be heartbreaking to watch someone flounder year after year, but as a teacher, I do not feel that it is my place. I would, instead, speak to my administration.  Are there guidance or scheduling counselors or deans?  This kind of life advice should, ideally, come from someone above the level of a classroom teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I absolutely could not bear it, then the situation is somewhat different.  This is now less than ideal! But if I simply could not hold it in, &lt;em&gt;and&lt;/em&gt; I had the kind of warm relationship with the student where such an overture would be welcome, I might find a good moment and ask them about their goals, and ask them why they feel that they have been stuck in a 3-year program for 8 years.  &lt;strong&gt;And then I would really listen closely to what they say next.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on what they say, I might offer to help them in any way that I can, and I might further mention that there is no shame in switching majors.  Their only obligation is to find something that they can be good at, could enjoy, and could help others with.  If one program is not working, they should not allow the sunk cost fallacy to hold them in place, because they only get one life to live, and there is no reason to live it trapped in a box that they have made for themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;em&gt;You see? Here I pretend here that my wisdom would be sufficient in my own circumstance. I do not consider myself so wise, nor so lucky! This kind of situation is very hard, and you have my sympathies.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-07T20:57:33.477" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1501" PostTypeId="2" ParentId="430" CreationDate="2017-07-07T20:59:53.820" Score="5" Body="&lt;p&gt;Mastering the material is less than half of what it takes to be a great engineer. Showing up and doing the work - even when it is phenomenally boring - is critical. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Giving him a pass will not in any way prepare him for a career in this field. If he's not willing to do the BS tasks, he shouldn't pass. If you feel so inclined, give him the final and base his entire grade off of that, and he'll become someone else's problem later. BUT, as an educator - especially at this level - your goal should be not only to develop mastery of the material, but to imbue a good work ethic and a sense of responsibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Case in point: I hate changing diapers, but I love being a parent. Guess what I do quite frequently, and how fun that part is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've met quite a few very intelligent people who work menial jobs because the industry won't adapt to their demands, because their boss was &quot;a moron,&quot; etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this were a university-level course, he would fail. A (small-ish) part of high school is about preparing for university, and for life afterward. If this student winds up in my class at university, with this attitude, he will fail. Communication is key - talk to the kid about this - but excess accommodation (outside of disabilities) is NOT doing him, or anyone else, any favors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from teaching, I've worked in embedded systems, EE, web, and games. The latter is the most accepting of this resistance to structure, but even that has its limits. You have to do the job you're given. If you're lucky, you can turn that into the job you want. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is FAR better that the student learn this now, rather than coasting on your compassion, understanding and attempts to help until, one day when the training wheels come off, he falls flat on his face. Help, in this case, may be teaching him a lesson. It sucks, but I'd rather have learned that lesson at 16 than 30. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck, and I admire the question. Far too many teachers just don't care.  &lt;/p&gt;&#xA;" OwnerUserId="1777" LastEditorUserId="1777" LastEditDate="2017-07-07T21:05:13.063" LastActivityDate="2017-07-07T21:05:13.063" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="1502" PostTypeId="2" ParentId="1471" CreationDate="2017-07-07T21:12:25.227" Score="2" Body="&lt;p&gt;If one understands objects, fields, and variables, static fields should be easy to understand (e.g. as fields of a &quot;class object&quot;). And if one does not understand objects, one can not apply OOP or software design, which makes it very hard (maybe even impossible) to really understand that material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, a solid and accurate understanding of objects, fields and variables seems worth investing into even at the price of covering less of the official curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am however not sure the memory spaces of the JVM are the best tool to communicate this, because your students may not know what memory spaces are. After all, memory spaces are like objects in that they host variables, so if people are unaware that variables exist in a scope and are bound to its lifetime, naming that scope &quot;memory space&quot; rather than &quot;object&quot; won't help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, when Java programmers say &quot;Memory Model&quot;, they often refer to the &lt;a href=&quot;http://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4&quot; rel=&quot;nofollow noreferrer&quot;&gt;so named chapter&lt;/a&gt; in the Java Language Specification, which gives a formal mathematical model for memory as seen by concurrently executing threads. That would probably be too advanced for your course ;-)&lt;/p&gt;&#xA;" OwnerUserId="1775" LastActivityDate="2017-07-07T21:12:25.227" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1503" PostTypeId="2" ParentId="1471" CreationDate="2017-07-07T22:13:41.293" Score="3" Body="&lt;p&gt;&lt;code&gt;Static&lt;/code&gt; is within the AP subset and is fair game for the examination.  Oddly enough, the memory model of Java that operates here is not, so students &lt;em&gt;could&lt;/em&gt;, hypothetically, memorize a series of arbitrary rules and be fine here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think it seems silly to teach about &lt;code&gt;static&lt;/code&gt; without at least giving a passing understanding of how memory works, then you and I are on the same page.  However, in this instance, I provide a simplified (and terribly inefficient!) view of memory usage, because I don't want to delve too far down this rabbit hole in what is essentially an introductory class.  (Especially because we haven't yet covered the all-important idea of passing &lt;code&gt;this&lt;/code&gt; as a parameter.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a picture of the PowerPoint slide with the setup itself (sans animation).  Also not seen is another slide that says, &quot;Hey class, when can a &lt;em&gt;lie&lt;/em&gt; serve the &lt;em&gt;truth?&lt;/em&gt; ... &lt;strong&gt;Right now!&lt;/strong&gt;&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/H9DrT.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/H9DrT.gif&quot; alt=&quot;my false model of static&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more slides, and quite a bit of discussion.  But in essence, this model allows me to ask discussion questions like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why are there 3 &lt;code&gt;Doubler&lt;/code&gt;s in memory?&lt;/li&gt;&#xA;&lt;li&gt;Why is there only one &lt;code&gt;count&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;What did &lt;code&gt;static&lt;/code&gt; actually accomplish?&lt;/li&gt;&#xA;&lt;li&gt;What would happen if we called &lt;code&gt;val++&lt;/code&gt; from inside &lt;code&gt;method()&lt;/code&gt;. Is there any reasonable way for Java to interpret this?&lt;/li&gt;&#xA;&lt;li&gt;What would happen if we called &lt;code&gt;count++&lt;/code&gt; from inside &lt;code&gt;doubleVal()&lt;/code&gt;?  Is there any reasonable way for Java to interpret this?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now, as for the situation you are in, it sounds like you've already devoted a lot of time to this.  I would not spend a great deal more time on &lt;code&gt;static&lt;/code&gt;.  There is a &lt;em&gt;lot&lt;/em&gt; in the exam, and &lt;code&gt;static&lt;/code&gt; is not heavily tested.  I might do one more quick attempt to try to clarify this idea, but then move on.  There is, as you said, plenty else to do.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-07T22:13:41.293" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="1505" PostTypeId="2" ParentId="408" CreationDate="2017-07-08T01:28:45.903" Score="1" Body="&lt;p&gt;Thinking of invariants shifts the focus of analysis from the &lt;em&gt;how&lt;/em&gt; of detailed steps to the &lt;em&gt;what&lt;/em&gt; in the essence of the problem. By lifting our eyes from the how, a unifying concept of the problem and its solution can emerge. As Dijkstra said, our brains are not really sufficient to the task of programming, and so we must find ways to ease the cognitive load, through techniques like &quot;Separation of Concerns&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at a problem abstractly, it is usually possible to set aside a lot of detail when first thinking about it. For example, I knew that a multi-threaded server would need some kind of Counting Semaphore to cap the number of simultaneous threads. I probably could have said something to that effect without knowing anything about programming. I &lt;em&gt;assumed&lt;/em&gt; its characteristics, and later figured out how to construct one using a Mutex and Condition Variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be easy to find examples of everyday processes that are concisely described using invariants. A teeter-totter is constrained by the fact that the heights of the two sides have to sum to (roughly) a constant. A process that manages a buffer must ensure that the used plus unused amounts sum to the size of the array. Is it correct to say that in NP-type problems, we know the invariants / constraints, but not an algorithm?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I come up with better examples, I will improve this answer. Qapla'!&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-08T01:28:45.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1506" PostTypeId="2" ParentId="1493" CreationDate="2017-07-08T02:52:13.780" Score="6" Body="&lt;p&gt;In the catalog at the liberal arts college at which I teach, we state that students must earn at least a B- in the following early courses to major in Computer Science:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java 1 &lt;/li&gt;&#xA;&lt;li&gt;Java 2&lt;/li&gt;&#xA;&lt;li&gt;Discrete Mathematics 1&lt;/li&gt;&#xA;&lt;li&gt;Data Structures and Algorithms&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Because the standards are explicit, it is clear that it's nothing personal if we say a student cannot continue in the major. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the student really is interested in computer science, I tell her this might not be the right time in her life for her to do it (not that she's incapable of ever doing it) and advise her on retaking courses, with any appropriate accommodations. I might also advise her on related majors in which she might be more successful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have no way of stopping a student from continuing to take CS courses (as long as she has passed the prerequisites), but the policy sends a strong message that they should choose a different major.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-08T02:52:13.780" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="1507" PostTypeId="2" ParentId="76" CreationDate="2017-07-08T05:14:12.057" Score="3" Body="&lt;p&gt;This reminds me very much of a similar discussion from the distant past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Meat&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Human perception is colored by expectations. Transposed letters, misspellings, and wrong punctuation are all easy for a human reader to miss because our perception is geared to fill in for the unexpected. We are all aware of these internet memes that build on the understanding that any misspelled word is readable provided it starts and ends with the correct letter, and has all of the other letters that are required somewhere in the middle, regardless of order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Real time syntax highlighting and linting helps to expose those errors when they can be easily resolved, when the programmer is still thinking about the problem at hand. By preventing extra effort and distraction, it is a direct aid to understanding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compile time linting is better than nothing, but I remember spending hours poring over lint print outs for C programs (yep - C, not C++, not even ANSI C) for hours, making one edit, then rerunning the lint to find the next error. It was better than nothing, but not by much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At one point in time. applications were written in a single language (COBOL, FORTRAN, PASCAL, etc). In a project of any scale today, you will use at least three programming languages (Example: SQL, Java, and Javascript). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The programming language is a tool, not an end in and of itself. Each language expresses specific thought patterns more effectively than the others. In industry, it is not uncommon for me to pick up a language just enough to accomplish a particular task and never work with it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything that reduces the time I need to spend learning the language is a benefit to me. Conversely, any language that I spend enough time in, I will learn in some depth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would expect the same to apply to students, since in this field we are always students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Long Stories - read at your own risk&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it was the 1980's (or early 1990's), the same question was asked about the use of debuggers. Conventional wisdom was that the debugger would interfere with the reasoning process and students would not learn the material. A few rebels in academia held that in industry solving the problem faster was what was paying the bills, so debuggers should be used in classes just like in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, since this was a discussion in academic circles, someone (hey it's been a few decades, sorry no citation) did a controlled study where an entry level CS class was taught by a professor, half the lab classes were required to use the debugger, and half were required to NOT use the debugger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much to everyone's surprise, not only did the use of the debugger not impede student grasp of the material, it actually gave them deeper insights into what the system was doing when they ran code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fast forward three decades or so, there is a reason that we use syntax highlighting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned programming on teletype and monochrome terminals, and I'm usually oblivious to color, so when I ran into an issue where my syntax highlighting didn't work I figured &quot;no problem, I'm olde schoole&quot; and went to work. It took me about 2 minutes to realize that without the syntax highlighting, the code that was nicely formatted to the language manual was nearly unreadable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I, having learned before syntax highlighting was an option and with decades of continuous industry experience, have trouble reading code without syntax highlighting, I pity the poor novice. &lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-07-08T05:14:12.057" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1508" PostTypeId="2" ParentId="408" CreationDate="2017-07-08T08:09:01.420" Score="1" Body="&lt;p&gt;Do it in code, so that pupils can play with it. This code will throw an exception if the invariant is not met. Show how this can be useful in finding bugs in the program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book a touch of class by Bertrand Meyer, is very good for teaching Object Oriented Programming and has examples (can't remember how many, but it is where I leant it).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;loop_example is&#xA;   −− A loop example...&#xA;   local&#xA;      count: INTEGER&#xA;   do&#xA;      from&#xA;         count := 1&#xA;      invariant&#xA;         count &amp;gt;= 1&#xA;         count &amp;lt;= 101&#xA;      variant&#xA;         101 − count&#xA;      until&#xA;         count &amp;gt; 100&#xA;      loop&#xA;         io.put_integer (count)&#xA;         io.put_new_line&#xA;         count := count + 1&#xA;      end -- loop&#xA;  end -- method&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The book has the philosophy that exceptions are only used for program bugs. variance, invariance, preconditions, and post conditions. Everything else should be checked traditionally. You will be surprised at how much simpler this makes things. You hardly ever see or use a catch clause. The philosophy makes it easy to get things right: if you forget to check an input, or have an out by one error, then the program will tell you that you have a bug, and tell you where it is.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-08T08:09:01.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="1509" PostTypeId="1" CreationDate="2017-07-08T10:21:08.200" Score="9" ViewCount="731" Body="&lt;p&gt;As probably we all experience, plagiarism is very common in CS. I know that there are several types of plagiarism ranging from simply submitting a copy of the colleagues’ code to other highly sophisticated mechanisms. In my experience, the most common is indeed the simplest one. The student just grabs the code from another colleague and eventually change the names of the variable, and submits the solution (some students don’t even do that!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there are several systems that are easily capable of detecting this type of plagiarism, they do it mainly when the student submits the final version of the code. Some other tools, are capable of detect plagiarism and notify the student about that (as if they didn’t already know that!). &#xA;In most cases the use of an anti-plagiarism tool will act mainly to support punitive measures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although it is not the main focus, as part of my PhD work, I am working in a tool that analyses the source code as it is being written and is able to detect plagiarism in “real-time”. This way, the teacher can be notified about students that are performing plagiarism even before their final solution is submitted, giving the teacher time to act and avoid the punitive measures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My biggest question is: What should the teacher do with that information? Will this be efficient? &lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1293" LastEditDate="2017-07-08T13:59:25.350" LastActivityDate="2017-07-08T17:04:48.943" Title="What should a teacher do with information about plagiarism before the final submission" Tags="|best-practice|plagiarism|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="1510" PostTypeId="2" ParentId="1509" CreationDate="2017-07-08T12:08:07.963" Score="6" Body="&lt;p&gt;I assume that somewhere you discuss plagiarism and the social good of respecting the IP of others. If not, plagiarism detection is just a &quot;gotcha&quot; that doesn't really benefit the students or your relationship with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following suggestion is offered tentatively, and might require tuning. It might also require research on the effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the tool is good enough to tell &lt;em&gt;you&lt;/em&gt; in real time that something bad is occurring, it is also good enough to tell the student at that moment. So you could build that feature into the tool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, there is, then, the danger that a student could game the system, modifying things just enough that the warning goes away. So it might be necessary for the warning given the student to also warn that not every &quot;violation&quot; will be reported to the student but will be reported to the instructor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat: This was &quot;seat of the pants - in the moment&quot; design. I can't claim it is best practice. It is, however, based on the principle that fairness and communication are positive attributes in education. Help the student grow in many dimensions, not just the technical. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In your discussions with students about plagiarism, be sure to include the concept of &lt;em&gt;self plagiarism&lt;/em&gt; which many don't recognize as a problem since it doesn't violate IP rules. But &lt;em&gt;does&lt;/em&gt; make derived research and attribution more difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, like any lesson, it needs to be reinforced. Very little that you do just &lt;em&gt;once&lt;/em&gt; will actually be learned. Active learninig is reinforcing as lecture is not. Class discussions about plagiarism and its tradeoffs (short term gain - long term  pain) might be useful. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-08T15:28:59.780" LastActivityDate="2017-07-08T15:28:59.780" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="1511" PostTypeId="2" ParentId="161" CreationDate="2017-07-08T14:10:42.863" Score="2" Body="&lt;p&gt;I am not sure if this is really what you are looking for, but there is also &lt;a href=&quot;https://developers.google.com/blockly/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blocky&lt;/a&gt; from Google which is kind of similar to Scratch, and lets you see the source code produced by the block in different programming languages (JavScript, Python, PHP, Dart, Lua). Blocky is used in several projects like code.org.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If Java is OK for you, than you can consider the &lt;a href=&quot;https://www.bluej.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;BlueJ&lt;/a&gt; IDE which is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A free Java Development Environment designed for beginners, used by&#xA;  millions worldwide&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-08T14:10:42.863" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2511" PostTypeId="1" CreationDate="2017-07-08T15:35:53.740" Score="8" ViewCount="2323" Body="&lt;p&gt;As a college professor, I am often asked for letters of recommendation by my CS majors. I have templates, for whether the student is applying for grad school, for an internship, for a scholarship, etc. Each of my letters ends up being 1.5-2 pages. When I read letters, they are often much shorter, sometimes only a paragraph. I have no experience with CS jobs outside academia, and I'm starting to worry the letters I'm writing are too long (though I do have a good track record of students getting what they applied for). First question (with an eye towards CS internships or jobs especially):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(1) How long are your letters of recommendation?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Another question is scalability. Each letter I write takes me about 1 hour, and the original templates took longer (probably 3-4 hours each). Every year, more and more students are asking me for letters, so I wonder if I should find a way to do it faster. Hence my 2nd question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(2) How long does it take you to write a letter of recommendation?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="294" LastEditorUserId="294" LastEditDate="2017-07-08T19:26:05.490" LastActivityDate="2021-01-12T23:09:08.717" Title="Best practices for letters of recommendation in CS" Tags="|best-practice|advising|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2512" PostTypeId="2" ParentId="1493" CreationDate="2017-07-08T16:03:24.893" Score="5" Body="&lt;p&gt;To basically repeat some of what others said, hopefully shorter:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't you dare tell them what they should do.  Like who to marry, that is their choice.  Just tell them what you do know: &quot;These are the skills that I find most successful people in this field have...&quot; &quot;Here is what I'm seeing when I assess your current skills...&quot;  Leave it up to them to decide how they, once informed, want to handle incongruities.&lt;/p&gt;&#xA;" OwnerUserId="1676" LastActivityDate="2017-07-08T16:03:24.893" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2513" PostTypeId="2" ParentId="1479" CreationDate="2017-07-08T16:14:49.603" Score="2" Body="&lt;p&gt;An analogy which I find useful is &lt;strong&gt;buses&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;One side (server) puts information on a bus and sends the bus to the other side (client\user end). The buses are loaded with data which is a sequence of &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt;&lt;sup&gt;1&lt;/sup&gt;. Each sequence has a passenger before it, and that passenger is used to identify &lt;em&gt;what sort of data&lt;/em&gt; was loaded onto the bus.&lt;/p&gt;&#xA;&lt;p&gt;This passenger says whether the data is for creating an HTML file or a CSS stylesheet etc. Now this bus is loaded with everything the server needs to pass to the client, so the bus departs.&lt;/p&gt;&#xA;&lt;p&gt;Assuming there's a connection, the bus will reach the desired client, because the driver knows the way. This is important to explain, because that's a way to explain how ip addresses and ports work. The client is the final stop and the address of a stop is the ip for that stop.&lt;/p&gt;&#xA;&lt;p&gt;When the bus gets to the client, the passengers leave the bus and you can explain here that each message (passenger) knows the order they should be in (like a passenger's id or something similar. This is just to avoid going to deep into synchronization etc.).&lt;/p&gt;&#xA;&lt;p&gt;The data is then arranged into order and by using the information in the header and the client knows how to parse it (just like a person waiting for someone to get off at a specific stop knows how to greet the person).&lt;/p&gt;&#xA;&lt;h3&gt;and yet&lt;/h3&gt;&#xA;&lt;p&gt;This is the kind of explanation one gives to complete novices. It might have inaccuracies or things that are out of date.&lt;/p&gt;&#xA;&lt;p&gt;Another thing about this analogy is that the bus can be used to explain a protocol if you say that the amount of data is limited, and that the buses have indices but this might be too confusing for people who are completely new to all of this.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Secondly:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that the students have an idea of how information is transmitted between two computers, you can go into explaining that the internet is almost the same, but on a &lt;strong&gt;much bigger&lt;/strong&gt; scale.&lt;/p&gt;&#xA;&lt;p&gt;You can explain the various headers that exist in HTTP with &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_HTTP_header_fields&quot; rel=&quot;nofollow noreferrer&quot;&gt;this list&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Eventually, the every bus that arrives at the client is sent back with a response saying &amp;quot;I arrived at the client...&amp;quot; and the response includes details on the time it took or other things which the client might send to the server.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Because the students are new to this, you can simply keep it at that, without explaining &lt;em&gt;why&lt;/em&gt; those specific numbers or why this is they way it's been done.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-08T16:14:49.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2514" PostTypeId="2" ParentId="1479" CreationDate="2017-07-08T16:47:06.803" Score="2" Body="&lt;p&gt;Since you mentioned that ideally you were looking for a video, a few years ago I used to show a video to my students: &lt;strong&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=x9XWxD6cJuY&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Good Warriors of the Net - IP for Peace&lt;/a&gt;&lt;/strong&gt; . It is a bit old, but the main concepts are there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another that I used to show my students was: &lt;a href=&quot;https://www.youtube.com/watch?v=7_LPdttKXPc&quot; rel=&quot;nofollow noreferrer&quot;&gt;How the Internet Works in 5 Minutes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grab the popcorns! :)&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-08T16:47:06.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2515" PostTypeId="2" ParentId="1509" CreationDate="2017-07-08T17:04:48.943" Score="3" Body="&lt;p&gt;Based on response to my comment, I will answer regarding the narrow aspect of this question that matters to me:&lt;br&gt;&#xA;Students just beginning often 'help' each other or work together. If the only thing they can see is a nail, their solutions all look remarkably like the same hammer. It is not so much that they are doing something wrong as that they are not doing several things right - 1) realizing they don't know enough to teach others, 2) discovering answers for themselves (probably the &lt;em&gt;most vital&lt;/em&gt; need at their level) and 3) asking me to explain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know what they don't know if they don't tell me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This is vastly more important&lt;/strong&gt; than the idea of 'cheating', and it deserves a word that makes us all want to rush to help instead of rushing to judgement. As we know, naming things properly &lt;em&gt;matters&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for teaching being a way to learn, great, if you are willing to take responsibility for that person's career outcome. &lt;em&gt;&quot;Helping someone is the same thing as messing with them.&quot;&lt;/em&gt; (from The Hotel New Hampshire)&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-08T17:04:48.943" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2516" PostTypeId="2" ParentId="1419" CreationDate="2017-07-08T17:07:54.340" Score="7" Body="&lt;p&gt;I think that to understand the SELECT queries, the &lt;strong&gt;Who is Who? / Guess Who?&lt;/strong&gt; game could serve as a nice metaphor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/jRU0f.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jRU0f.jpg&quot; alt=&quot;guess who game board&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of the game is: you have a group of pictures of persons with different facial features. One gamer selects one of them and the other gamer has to make questions to try to eliminate the ones that are not relevant and try to guess which one the other gamer has chosen. It is kind of like what you do in the WHERE part of the SELECT...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;SELECT faces &#xA;FROM board &#xA;WHERE hair = white &#xA;AND has glasses &#xA;AND has a mustache &#xA;... &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Maybe this game is now so popular currently... it sure was when I was a kid.&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1144" LastEditDate="2017-07-08T20:17:20.160" LastActivityDate="2017-07-08T20:17:20.160" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2517" PostTypeId="2" ParentId="2511" CreationDate="2017-07-08T17:23:55.083" Score="5" Body="&lt;p&gt;I write a paragraph saying who I am, and where and how long I have taught.  This is standard for all letters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I write a brief second paragraph stating how long and in what capacities I have known the student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then answer these four questions from an old Columbia form. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A.  Please tell us about the candidate's intellectual qualities and&#xA;academic work.  We are interested in the nature of his or her motivation for scholarship, breadth, and depth of intellectual interest, originality, and&#xA;capacity for growth.  Cite specific examples where appropriate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;B. What are your impressions of the candidate's character and maturity?&#xA;How do fellow students, teachers and you regard him as a person compared with&#xA;contemporaries?  Does the candidate show open--mindedness toward opinions,&#xA;values, and backgrounds different from his own?  Does he have any special&#xA;strengths, weaknesses or problems of which we should be aware?  We would&#xA;welcome any additional comments you think might be helpful to us.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C. What has been the candidate's most valuable contribution to your&#xA;class?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;D. Do you have any reason to doubt this student's integrity?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, I have a closing paragraph that looks like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for taking the time to read this letter.  If you have questions,&#xA;please send me e-mail at XXXX@gmail.com; this account is entirely separate&#xA;from the school and you may communicate in complete confidence.  You may also call me at home in the evening at 919-XXX-XXXX.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My work phone and address appear in the head of the letter.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-08T17:23:55.083" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2518" PostTypeId="2" ParentId="1482" CreationDate="2017-07-08T17:34:32.157" Score="1" Body="&lt;p&gt;I suppose that a traffic light is a very good example and easy to understand by your target audience.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (light is green) &#xA;    go&#xA;else if (light is yellow) &#xA;    stop and go&#xA;else [if (light is red)] &#xA;    stop &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1144" LastEditDate="2017-07-08T19:53:34.057" LastActivityDate="2017-07-08T19:53:34.057" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2519" PostTypeId="2" ParentId="2511" CreationDate="2017-07-08T18:15:03.723" Score="4" Body="&lt;p&gt;I spend up to many hours on each student. (Subsequent letters for the same student require only minor modification.) Mine range from a few paragraphs for students I don't know well to 2 pages for a student who has greatly impressed me and is being considered for something very important. (This is not too onerous, since I teach at a small liberal arts college.)&lt;/p&gt;&#xA;&lt;p&gt;If a student is applying for a job (or scholarship) at a company that has employed our graduates, I will explicitly compare the candidate to those graduates. In the programming project course, I ask students to do peer evaluations, and I quote these in letters of recommendation.&lt;/p&gt;&#xA;&lt;p&gt;As someone who reads letters of recommendation (for graduate admission), I like letters that contain details, such as &amp;quot;2nd highest score in a class of 40&amp;quot; or &amp;quot;strongest major in 2 years&amp;quot; or &amp;quot;created a website for the computer club using X, Y, and Z&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Something that eases writing letters of recommendation is having a student bring in their resume, transcript, and any other information that will help me write a strong letter. If a student's grades are not good, I ask if there were any extenuating factors and what I can say about them. For example, I might say that a student's grades were low one semester because of health problems (or personal problems) that have since been dealt with. I believe mitigating circumstances sound better when coming from a recommender than from the student.&lt;/p&gt;&#xA;&lt;p&gt;Some things to keep in mind when writing a letter of recommendation (that nobody warned me about):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;In the United States, &lt;a href=&quot;https://en.wikipedia.org/wiki/Family_Educational_Rights_and_Privacy_Act&quot; rel=&quot;nofollow noreferrer&quot;&gt;FERPA&lt;/a&gt; bars college/university officials (including faculty) from sharing information about students' enrollment and grades without their consent. Since realizing that, I've explicitly asked students if I can share this information. (I really should get consent in writing.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If a student uses non-traditional pronouns at school, ask what pronouns to use in letters of recommendation. Some students are only partly out. Ditto for whether students are parents, older than traditional age, etc. Some students are happy for that information to be shared (especially as part of a narrative about their academic career); some aren't. Of course, their preferences should be respected.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Watch out for &lt;a href=&quot;https://www.ncwit.org/sites/default/files/resources/avoidingunintendedgenderbiaslettersrecommendation.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;gender bias (or other types of bias) in letters of recommendation&lt;/a&gt;. For example, don't say that a female student is &amp;quot;a lovely person&amp;quot; (something I've been tempted to say) if you wouldn't say that about a male student who has the same behavior. Women are just as likely as men to display gender bias. Another common (well-intentioned) faux pas is &lt;a href=&quot;http://www.nytimes.com/2007/02/04/weekinreview/04clemetson.html?fta=y&quot; rel=&quot;nofollow noreferrer&quot;&gt;describing people of color as &amp;quot;articulate&amp;quot;&lt;/a&gt;, something that has become a cliché. (It is fine to describe a student of any race as &amp;quot;an exceptional speaker&amp;quot;.) Make sure you hold all students to the same standards and discuss the same attributes (not focusing more on women's personalities than men's, or vice versa). See &lt;a href=&quot;https://www.cerias.purdue.edu/site/images/uploads/Discrimination_gender_memo_07-12.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;this memo from Prof. Anita Jones to CS faculty at University of Virginia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2021-01-12T23:09:08.717" LastActivityDate="2021-01-12T23:09:08.717" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="2520" PostTypeId="1" AcceptedAnswerId="2521" CreationDate="2017-07-08T19:50:10.517" Score="3" ViewCount="284" Body="&lt;p&gt;It is said that metaphors can do more harm than good, and I agree that other methods should be developed, like the &quot;notional machine&quot; idea. However, computer science is not like anything else, because it is a constructed reality. It therefore seems like the best way to teach it is to show students how a new concept is similar to or related to things they are already familiar with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you do to work around the the problems of using metaphors to teach, such as students' cultural divergence (and therefore ability to understand the metaphor)?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="919" LastEditDate="2017-07-15T14:16:54.920" LastActivityDate="2017-07-15T15:09:05.263" Title="Avoiding difficulties when teaching with metaphors" Tags="|teaching-analogy|classroom-management|student-motivation|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2521" PostTypeId="2" ParentId="2520" CreationDate="2017-07-08T21:00:58.813" Score="4" Body="&lt;p&gt;I think you pretty much &lt;em&gt;need&lt;/em&gt; to use metaphor/analogy initially. The students need a &lt;em&gt;hook&lt;/em&gt; to get called into the game. You make a good point, though, about finding metaphors that work with the generation of students you are teaching. It isn't so much a problem if you teach the same things (same sort of things even) over many years as you can evolve along with your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One &lt;a href=&quot;https://en.wikipedia.org/wiki/Pedagogical_patterns&quot; rel=&quot;noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; is Consistent Metaphor, which suggests that the &lt;em&gt;parts&lt;/em&gt; of the thing being taught needs to map onto the &lt;em&gt;parts&lt;/em&gt; or elements of the metaphor. This may be easiest if you use a Physical Analogy (another pedagogical pattern) as the parts of the analogy object are often pretty obvious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But without metaphor you are pretty much limited to technical detail, which can be hard to &lt;em&gt;visualize&lt;/em&gt; and map to a mental model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, every metaphor has limits. You need to make the students aware of the limits. This is how &lt;code&gt;A&lt;/code&gt; is like &lt;code&gt;B&lt;/code&gt;. This is how &lt;code&gt;A&lt;/code&gt; is NOT like &lt;code&gt;B&lt;/code&gt;. Equally important, or students can go astray. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-08T21:00:58.813" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2522" PostTypeId="2" ParentId="2520" CreationDate="2017-07-09T00:25:54.213" Score="5" Body="&lt;p&gt;I love to make jokes and allusions. Here are some examples of ways I handle my increasing age difference from my students:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Explaining the reference&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When describing how assembly language programmers compete to shave instructions off an operation (such as calculating absolute value), I tell students about the old game show &lt;a href=&quot;https://en.wikipedia.org/wiki/Name_That_Tune&quot; rel=&quot;nofollow noreferrer&quot;&gt;Name That Tune&lt;/a&gt; and sometimes even show them a clip.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Challenging students to recognize the allusion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After teaching students about big-endian and little-endian, I ask if anyone recognizes where the references is from. If a student successfully guesses Gulliver's Travels (from the terms or from the images I include), they get a prize. If not, I explain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Learning students' culture&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a sample app from my mobile development course (to demonstrate design docs), I designed a variant on Pokemon Go where students get and evolve professors by meeting with them. I paid someone on Fiverr to create Pokemon-like images of me.&lt;a href=&quot;https://i.stack.imgur.com/kj1lz.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/kj1lz.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create memes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students seem to enjoy memes. Here are some that I've created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one is about L2 caches:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/ZjF5l.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ZjF5l.png&quot; alt=&quot;Meme showing Xzibit, with text: &amp;quot;Yo dawg, I heard you like caches so I put a cache on your cache so you can check your cache while checking your cache.&amp;quot;&quot;&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/B7W67.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/B7W67.png&quot; alt=&quot;Meme with Austin Powers, with text: &amp;quot;I noticed you using == to compare floating-point values. I too like to live dangerously.&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-09T17:36:31.967" LastActivityDate="2017-07-09T17:36:31.967" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2523" PostTypeId="2" ParentId="1410" CreationDate="2017-07-09T05:34:20.413" Score="3" Body="&lt;p&gt;There have been many great answers so far, so I'll be brief. The students of mine who have difficulty with accepting criticism are often in a &quot;fixed mindset&quot; rather than a &quot;growth mindset&quot;, with terminology from &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0345472322&quot; rel=&quot;nofollow noreferrer&quot;&gt;Carol Dweck&lt;/a&gt;. Most of my students have been high achievers all their lives. Some have got their self-worth bound up with being &quot;good at&quot; computer science (this is a &quot;fixed&quot; mindset). For those, criticism is interpreted as an attack on their self-worth. The other answers are trying to give ways to phrase criticism so it won't be interpreted in this way. I propose, trying to change the students (switching them to &quot;growth&quot; mindsets), so that they realize that they can always get better, and view constructive criticism as a way to do so. This is obviously a lot more work, but I think it's possibly the most valuable thing we can really teach our students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our college president is a big fan of this work of Dweck, so he made a campus-wide push to help students make this switch. They learn about Dweck's work during orientation, and then students are put into &quot;advising circles&quot; that meet once or twice a week for their first semester on campus. The circle has a faculty advisor, and 12 students. It's 1 credit (1/4 of a full course). The advisor can give students things to read, or journaling assignments. So far, it seems to be helping. Our retention rate is up, and there are fewer confrontational students. Generally speaking, if I have a problem student, I think one of the best ways to change his behavior is to put him in a situation where his peers point that he is the only one with a problem. The advising circles help with that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Incidentally, I think the president initiated this move with the writing program in mind. Many students are resistant to criticism about their writing skills, and humanities professors have been dealing with this forever. I'll bet there is a lot we can learn from them, and I wonder if they also have journals for humanities-educators, where we could read what they've come up with.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-07-09T05:34:20.413" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2524" PostTypeId="2" ParentId="756" CreationDate="2017-07-09T06:19:20.937" Score="4" Body="&lt;p&gt;I do see a bimodal distribution in my intro CS classes, especially on harder tests. I also see something very similar when I teach statistics, and (to a slightly lesser extent) calculus. I think it has much more to do with student preparation coming in, rather than innate ability. I also think it has to do with &quot;test anxiety,&quot; since it's much more pronounced on tests rather than on labs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are you aware of &lt;a href=&quot;https://en.wikipedia.org/wiki/Stereotype_threat&quot; rel=&quot;nofollow noreferrer&quot;&gt;stereotype threat&lt;/a&gt;? This is the observation that, if you put a minority group into a situation where there is a stereotype about how they will perform, then their performance will bias towards the stereotype. For example, if students get the idea that your tests are testing their innate abilities in the subject, then students from groups that are usually perceived as &quot;bad at&quot; math/cs/stats (e.g. women, non-Asian minorities) will do worse, even when you control for actual differences in skill between students (e.g. via comparison to non-test grades in the class). This has been demonstrated by study after study. And the sad thing is, there's almost nothing you can do about it. It's not like you only &quot;trigger&quot; the stereotype threat by saying something when you hand the test out. The threat is already there in student minds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For my classes, one thing I've done is get rid of &quot;test&quot; and replace them by &quot;quizzes&quot; (which are still worth 30% of the course grade). Each quiz is lower stakes (three equal one test), so I hoped the threat would be less. It doesn't seem to have worked. I also try to convince students in data science that no one is innately good at this, because it's a brand new field. This seems to have helped much more. I did the same in calculus, pitching the course as &quot;totally different than what you did in high school&quot;, because of it's computational and conceptual focus. This seems to have helped. So, I guess my suggestion is to try and shake students out of the mindset that there are &quot;those who can and those who can't&quot;, to de-emphasize exams, and to make sure the intro class is designed to also accommodate students with weaker high school backgrounds. This may reduce the bimodal distribution.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-07-09T06:19:20.937" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2525" PostTypeId="2" ParentId="1479" CreationDate="2017-07-09T06:21:00.530" Score="1" Body="&lt;p&gt;I gave the following EDRi paper to my students, and they found it very clear. I also had them write a 2 page essay explaining how the internet works, and that also helped them digest the paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://edri.org/files/2012EDRiPapers/how_the_internet_works.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://edri.org/files/2012EDRiPapers/how_the_internet_works.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-07-09T06:21:00.530" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2526" PostTypeId="2" ParentId="1296" CreationDate="2017-07-09T06:50:05.380" Score="4" Body="&lt;p&gt;I think about this question a lot. I agree that, if faculty are teaching things close to their research area, then courses should be naturally updated. The issue is: what do you do if your department has no one in a certain research area, but still wants to offer courses in that area? A similar problem comes up in Buffy's answer: who is going to teach the &quot;Bleeding Edge computing&quot; course?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can ask some poor junior professor to try and develop a course on new things where no one has expertise, but it's a huge amount of work for that person, and doesn't solve the problem of the course becoming outdated as that field develops. I say &quot;junior professor&quot; because a senior professor seems less likely to do course development like this, because they have families, they have administrative responsibilities, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The person who develops the new course can, of course, go to lots of conferences and maybe even give up part of their sabbatical to learn more about the topic (e.g. by working at Google). But that just makes the burden on this person even greater. I think this problem can only be solved with help from the administration. Specifically, I think CS faculty should have a lower teaching load than faculty in other parts of campus, to make these kinds of curricular renewal a real part of their job. Otherwise, it's too tempting to just develop the course once and teach it the same way forever (as folks in many other departments seem to do).&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2017-07-09T06:50:05.380" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2527" PostTypeId="2" ParentId="1463" CreationDate="2017-07-09T13:45:49.227" Score="2" Body="&lt;p&gt;A couple of ideas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1st day&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start by getting everybody up and moving. Have people form sets - say, a set of colors, with everybody wearing a different color, or a set of ages - but remind them that they can't have two people representing the same color in the set. Perform different operations with the human sets - intersections, unions, etc. After a couple of exercises like this, show them the formal notation for sets and match it to what exactly they were doing (i.e., when you created a new set of only the people that were in both sets, you were performing an operation called an intersection, which you can notate as $A\cap B$, etc). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully you can get far enough into set theory such that you can reach DeMorgan's Law. Another good thing to introduce would be proofs - you could, for example, do the proof of DeMorgan's Law, or a simpler topic in set theory. As you continue with set theory and set theory notation, let them experiment with Python's set type - maybe your exercises could have them solve simple set problems on paper and with Python, and also a little work with proofs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2nd day&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This day is talking about truth tables, logic gates, and boolean symbols. A couple of ideas for making this part less dry:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Include some information about George Boole and why his work was such a success - I particularly like Martin Gardner's &lt;em&gt;Logic Machines and Diagrams&lt;/em&gt;; it provides some entertaining history.&lt;/li&gt;&#xA;&lt;li&gt;Put logic gates (and all the notation that goes with them) in the context of the rest of the computer - I enjoy Crash Course's Computer Science series of videos; the relevant one can be found &lt;a href=&quot;https://www.youtube.com/watch?v=gI-qXk7XojA&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;After the history and the introduction of logic gates, perhaps let them mess around with logic gates trying to create their own &quot;circuits&quot; that do something. (If you wish, let them test it out with some transistors, batteries, LEDs, or whatever.) Obviously, this is hard, so as they start complaining about difficulty, introduce the notation as an easier way to keep track of it. For example, let them sketch out truth tables for different gates, (perhaps testing them). At this stage you can also show them how the symbols they are using connect to the notation in Java/Python. The exercises probably should get them fairly familiar with the notation and truth tables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3rd day&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where everything gets put together. The first part of the class could be devoted to putting English language and notation together, starting with an introduction of the notation, and then an activity with partners contributing phrases to each other to translate, or picking a phrase from a movie for the class to translate (easier phrases preferred, obviously). Cover tautologies and contradictions, and advance through to translating Goldbach's conjecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second part of class would then be devoted to the one thing left in your plan of the first three days - the formal proof that $False\Rightarrow True\equiv True$. Since you've already done a formal proof, ask for suggestions, let students complete simple half-finished statements in the proof, and so on. The exercises would basically be the same as your original third-day exercises, along with some tautology practice, perhaps.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-09T13:45:49.227" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2528" PostTypeId="2" ParentId="2511" CreationDate="2017-07-09T17:40:17.370" Score="2" Body="&lt;p&gt;I keep my letters of recommendation short (half page); HR (human resources) are only interested in validation. The second interview -- typically in front of the hiring manager-- will go into greater depth. My signature reflect my credentials; my composition reflects my education. Employers aren't interested in me; they are interested in my proposed candidate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How Long to write? I collaborate with my students. I provide them a rough draft template, and request their input on other facts they wish to reveal. Unfortunately, 90% accept my rough  draft as final copy.&lt;/p&gt;&#xA;" OwnerUserId="1801" LastActivityDate="2017-07-09T17:40:17.370" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2529" PostTypeId="2" ParentId="1479" CreationDate="2017-07-09T20:52:56.330" Score="1" Body="&lt;p&gt;The videos on the code.org YouTube channel are some of the most helpful I've found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7&quot; rel=&quot;nofollow noreferrer&quot;&gt;How The Internet Works playlist&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1810" LastEditorUserId="58" LastEditDate="2017-07-10T02:14:02.533" LastActivityDate="2017-07-10T02:14:02.533" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2530" PostTypeId="1" AcceptedAnswerId="2533" CreationDate="2017-07-09T22:54:17.117" Score="6" ViewCount="157" Body="&lt;h1&gt;Background&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is mid-year in a course for HS juniors in theoretical computer science.  The unit is about Information Theory.  We were using the &lt;a href=&quot;https://en.wikipedia.org/wiki/Balance_puzzle&quot; rel=&quot;noreferrer&quot;&gt;coin-weighing problem&lt;/a&gt; as something of a motivator for the entire enterprise, as a deep understanding of that problem would also engender a pretty reasonable understanding of the purpose and use of the four axioms of Information Theory:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I(p) ≥ 0&lt;/li&gt;&#xA;&lt;li&gt;I(1) = 0&lt;/li&gt;&#xA;&lt;li&gt;I(p1 * p2) = I(p1) + I(p2)&lt;/li&gt;&#xA;&lt;li&gt;I is continuous and monotonic&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In the lectures prior to this lab, we cover the coin problem, the axioms themselves, some of the derived properties of the axioms, bits, trits &lt;em&gt;(including the Soviet Setun computers)&lt;/em&gt;, nats, and Hartleys, how much information is present in random and constrained events, the concept or entropy, and how to calculate the storage requirements of a theoretically maximal lossless data compression given some set of rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In covering the coin problem itself, we actually visit it three times, spread out among the lessons above.  At first, I simply introduce the problem and have the kids try to solve it for some small numbers of coins.  Later, we revisit the coin problem and show how we would solve some larger problems, and draw some generalized conclusions from these solutions.  Finally, at our third visit, we derive a generalized algorithm for what steps you could use to figure out a next optimal weighing.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Lab&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The lab is in Scheme, and asks students to create a function that provides the proper weighings to solve a game.  The entire lab write-up comes in at a whopping &lt;em&gt;8 pages&lt;/em&gt;, so I won't put that all here, but this is the opening that describes the problem:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Your goal is to create a function called &lt;code&gt;playgame&lt;/code&gt; that takes arguments like so:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;(define sampleGame '((u . 1) (u . 2) (u . 3) (u . 4) (G . 5)))&lt;/code&gt;&lt;BR&gt;&#xA;   &lt;code&gt;(playgame 4 'H sampleGame)&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In the game example above, the real answer is that coin 4 is heavy.  But coming into the problem, coins 1-4 are unknown, and coin 5 is a reference coin.  The data encodings are like so:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;code&gt;'u – unknown, could be light, heavy, or good&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;'l – could be light or good (heavy has been eliminated as a possibility)&lt;/code&gt;&lt;BR&gt;&#xA;   &lt;code&gt;'h – could be heavy or good (light has been eliminated as a possibility)&lt;/code&gt;&lt;BR&gt;&#xA;   &lt;code&gt;'L – coin is Light.  This is a final answer state.&lt;/code&gt;&lt;BR&gt;&#xA;   &lt;code&gt;'H – coin is Heavy.  This is a final answer state.&lt;/code&gt;&lt;BR&gt;&#xA;   &lt;code&gt;'G – coin is good.&lt;/code&gt;&lt;BR&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;All games with &lt;code&gt;'G&lt;/code&gt; are considered to be equivalent, so a designation of no false coins can be made with any coin number.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The function call above would have an output like:&lt;BR&gt;&#xA;  &lt;code&gt;Game of ((u . 1) (u . 2) (u . 3) (u . 4) (G . 5))&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;With real answer that coin 4 is H&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;Move 0: (((u . 4) (u . 1)) ((G . 5) (u . 2)) ((u . 3)))&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;result: ((h . 4) (h . 1) (G . 5) (l . 2) (G . 3))&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;Move 1: (((h . 4)) ((h . 1)) ((G . 5) (l . 2) (G . 3)))&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;result: ((H . 4) (G . 1) (G . 5) (G . 2) (G . 3))&lt;/code&gt;&lt;BR&gt;&#xA;  &lt;code&gt;Game finished in 2 moves&lt;/code&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;There are many possible ways to get the answer.  In your lab, don’t be concerned with whether you are weighing coin 4 vs coin 1 instead of coin 2 versus coin 4.  What matters is that every move is legal, and that your weighings will always find the answer within the minimum number of steps.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What follows on that same page is a recap (and explanation) of the algorithm for figuring out the next move that we derived together in class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lab itself turned out to be &lt;em&gt;extremely difficult&lt;/em&gt;, even when I did it on my own.  I don't like to shrink back from course targets.  I would prefer to scaffold until every student can meet the goal.  So, I had to find a way to make it more manageable.  I arrived at the following strategy, which I confess I thought quite innovative at the time:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created the lab itself in segments, each with more hints, discussion, and code organization.  If you ultimately read through the entire lab write-up, you would eventually the method header and description for every one of the 28 functions in my own personal (idiosyncratic) solution, as well as additional hints, thoughts, and alerts to some programming traps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the bottom of each section, I had a message like this: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you stop here and complete the problem correctly, you will be able to earn &lt;strong&gt;100%&lt;/strong&gt;. &lt;BR&gt;&#xA;  If you go on to the next page, you will only be able to earn &lt;strong&gt;94%&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The notion was to allow for self-selected scaffolding to make the lab more possible. The earnings per section were originally set to 105, 100, 94, and 80.  (The big gap for the last section was because the last section basically just laid out every little detail.)  This setup, I believed, would provide a challenge to those who could handle it, and support for those who needed.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How things went down&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the lab went live, it did not go at all as I expected.  The students at my highly selective school were far, far more resistant to going on to the next section than I had anticipated, and preferred instead to work at a level that was inappropriately hard.  Most students refused to go below 100% for any reason whatsoever, and the students who could really have benefited from the 80% section would not go past 94%.  Some students never completed the lab at all, ironically garnering a zero in an attempt to avoid a 94%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More perturbing to me were assertions that there were other students who were cheating, since the sections you actually read were on your own honor.  My protestations that my solution was, in fact, highly idiosyncratic (and therefore it would be easy to tell) did nothing to dispel this idea.  Later, upon analysis, I did find at least one student who definitely did read beyond the section that he declared, but that was all I was able to find.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This whole episode took a tremendous amount of class time, and ate substantially into the good will I had built over the last two years with the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Innovation?  Meet near-abject failure.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Request&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I have already made a pass at addressing some of the problems the kids identified for this next school year.  First of all, I have integrated the coin problem far more tightly into the lecture materials.  I have further added new hints and clarifications across the entire text of the lab, and I have changed the point values for the sections to: 105, 100, 96, and 90.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With these modifications, the lab will be incrementally better on a number of fronts.  However, I can't help but think that my approach is foundationally wrong here.  I don't see how to entirely avoid many of the problems that I encountered the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I scaffold the lab more appropriately &lt;em&gt;without retreating on the final product?&lt;/em&gt;  I believe that the exercise has real value, and I don't want to simply retreat into lab material that is inherently less rich.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="919" LastEditDate="2017-07-09T23:12:25.943" LastActivityDate="2017-07-10T06:22:49.143" Title="Review of Information Theory Lab" Tags="|labs|materials-review|information-theory|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2531" PostTypeId="2" ParentId="2530" CreationDate="2017-07-09T23:52:02.740" Score="3" Body="&lt;p&gt;I would maybe flip the order in which students approach the problem -- rather then going from harder to easier, start from easier to harder. That is, start by having your students solve a simpler version of the problem for partial points, then guide them steadily towards a more and more generalized solution until they have a finished product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would probably be easier for them to grasp, for starters, since it mirrors how the material itself was presented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Going from simple to complex would also align incentives correctly -- currently, your assignment is set up such that students get the impression that they are in effect &lt;em&gt;punished&lt;/em&gt; for admitting they don't understand and need extra assistance. Naturally then, they're going to want to avoid that hit, either by refusing to read ahead, or by cheating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this particular case, I would also take the allegations of cheating seriously. If your students are intelligent, it would be pretty easy for them to read ahead, take the gist of your solution, and re-write it in their own style to avoid accusations of plagiarism. It costs them very little to do so (even if they don't carefully follow your hints, just skimming them would be useful), and there's relatively low risk they'll be caught.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, there's the honor code, but not all students will follow it (and the students who do will feel punished for being honest) -- IMO it's better to just set the assignment up so cheating is difficult to begin with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, a few more ideas for lowering the difficulty curve without compromising on material:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split the assignment part and make it a multi-part assignment. Have students complete the relevant portions after the corresponding lecture. This gives them more time to think through the problem, and should help lower the overall difficulty curve while still covering the same material.&lt;/li&gt;&#xA;&lt;li&gt;Make this a partner project -- this sounds like the sort of project where brainstorming and collaborating with others can be very helpful to begin with, so it might perhaps be worth just embracing it.&lt;/li&gt;&#xA;&lt;li&gt;Re-write the assignment so students are completing it in a language they're already familiar with. I'm uncertain if this is your student's first real exposure to Scheme (and functional-style languages in general), but if it is, consider moving back to a language they're comfortable with to remove some of the incidental difficulty.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-07-09T23:52:02.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2532" PostTypeId="1" CreationDate="2017-07-10T04:57:12.373" Score="4" ViewCount="184" Body="&lt;p&gt;I often see students at levels varying from really bad to incredibly clever. The students in the middle of the scale fit to curriculum perfectly (as it is meant to be for them). The students at either end of the scale are more difficult to teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet, it is clear that all students have another field/skill ( often not related to computers) which they are remarkably good in that field. For example one of the students has a musical understanding such as I have never seen (as an example of this, he can create piano adaptions for Green Day songs and says it was &quot;easy&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These skills are neither a hindrance nor do they aid the students, but that doesn't have to be the case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the students are not too good in Computer science, their &quot;secondary&quot; skill might be useful for aiding them. I have not been able to think of a good way to use their secondary skills to assist them in learning computer science. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In what ways can these skills can be taken into account when dealing with such students (at either end of the scale)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The students are in high school and know only the basics in java, such as primitive types, arrays, loops and &lt;code&gt;Scanner&lt;/code&gt;)&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-10T10:24:58.580" LastActivityDate="2017-07-10T11:34:17.350" Title="Working with students with specific secondary skill" Tags="|secondary-education|best-practice|differentiation|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2533" PostTypeId="2" ParentId="2530" CreationDate="2017-07-10T06:22:49.143" Score="4" Body="&lt;p&gt;I love the idea that you've created a lab using a classic logic puzzle. If you don't already, it might also be beneficial if you could give a real-world problem that the same logic, or concept, has been, or could be, used to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got a few ideas about changing how the lab, and its grading, breaks down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, it just &lt;em&gt;feels&lt;/em&gt; wrong to have the reduction in potential points for advancing through the &quot;hints&quot; and is even more questionable knowing that it's on the honor system to self-report how far the student went into the hints.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking it's better to develop a rubric for grading the final project. Possibly disseminate it, or its basics, with the initial introduction of the lab project. Build into that the appropriate penalties and bonuses based on what you want them to learn, and how that fits into the total course objectives. Completing the project successfully, including all of the target objectives, should be a full-credit project. Penalties ought to be levied for failure to meet stated goals, or demonstrate targeted proficiencies. Bonuses, of course, a assessed for &lt;em&gt;above and beyond&lt;/em&gt; work. As a compensation for the loss of good will from the prior experiment, the more transparent, and objective, the rubric is, the better off you will be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the scaffolding of the project points, a possibility is to do a timed-release of the &quot;hint&quot; sections, with an advanced notice of when the next section will be released, and what it will pertain to. Those students who think they have solved the issue addressed in the pending section release can &quot;lock-in&quot; their solution by submitting their current work on that issue before the release. When the final project is in, you can compare what they &quot;locked-in&quot; with what they finally submitted, and determine if they adjusted their work to fit the released hint, or merely to correct flaws they would have found without the hint. Thereby, cheating, and self-reporting, are circumvented, and you can award bonuses in the final review for having successfully utilized their original solution (but no penalties for switching to the hint version). Each section release can have its own, unique, bonus weighted to its importance to course/project objectives and/or level of advancement from the course baseline. Overall, I think it's probably best to keep such bonuses relatively small, allowing for a total project value to be 110/100 points. The benefits of the bonus points, hopefully, will only be to compensate for points lost to other criteria in the rubric.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One point I'm unclear on is the timing or the project relative to the entire term for the course, and if it's able to be adjusted. What I'm thinking here, is that the project specs, rubric, and other details can be released fairly early in the term, and the students can have the project as a continual &quot;go to&quot; when they are ahead of the curve on other minor assignments. As the term progresses, you can present concepts that are important to the course objectives, and relate the same concepts to the ongoing project. This will allow them to learn and practice the concepts in your normal flow. Then repeat that learning on their version of the project. The timed release of &quot;hints&quot; and sections could then be set for a few days, or a week, after the pertinent concept is covered in the curriculum. Time enough for them to, possibly, find their own solution, yet not so long as to delay the full project to the point of becoming unsolvable in the remaining time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an additional point, the last section you released, with the essentially complete solution, no matter how idiosyncratic, should probably &lt;em&gt;not&lt;/em&gt; happen. If, for whatever reason, the student cannot complete the project successfully, they simply will not get the points for the project. If the breakdown of the solution is such that you can award, per the rubric, points-per-section, then an incomplete project need not become a complete loss. They can earn points for the sections, or methods, they did successfully implement. Giving wrong answers on a test, or only completing a portion of a timed test, will not earn full marks. Neither should a project that the student is unable to complete.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a parting thought, the reluctance to proceed beyond the 100% section probably should have been anticipated. Your student body is not going to respond in a typical fashion, just because they are a select group. They don't dare risk loosing their status as a member of that select group by achieving sub optimal marks. In addition, the perception of students in that age range is that going into the field as developers is a &quot;high stakes&quot; realm. &lt;em&gt;Shades of Facebook and Twitter here.&lt;/em&gt; Anything, such as low marks, that could threaten that future potential, either as an active developer or select university admissions, is to be avoided like the plague. Since they cannot conceive of failure as a possibility, they don't see the loss of 6 points as insurance against failure, but as an admission of inferiority, or unsuitability for becoming a developer. (You don't need insurance against something that cannot happen, such as a zombie apocalypse. For them, failure seems impossible, so no insurance is necessary.)&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-10T06:22:49.143" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2534" PostTypeId="2" ParentId="2532" CreationDate="2017-07-10T10:05:12.603" Score="2" Body="&lt;p&gt;It is not clear for me what &quot;computer science&quot; means for you. Is it at High School level?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is the case, you could try to introduce some of the mechanics behind &quot;digital music&quot;. How it is processed from analog to digital. How it is compressed, how it is reproduced, ... What does it mean to be 8bit or 16bit, the bit-rate, the sampling frequency...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students are more into drawing/painting, you could do the same with image formats.&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-10T10:05:12.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2535" PostTypeId="2" ParentId="2532" CreationDate="2017-07-10T11:34:17.350" Score="2" Body="&lt;p&gt;I'm assuming that you do &lt;em&gt;not&lt;/em&gt; want an answer that says &quot;form three groups and teach them separately.&quot; I wouldn't want that either. I particular it reinforces things that should not be reinforced - in every one of the groups you describe. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution depends on many things including the size of the group and your own &quot;power&quot; within the educational system. In the best of all worlds you don't have to have a solution that scales, but you do have sufficient freedom to do non-standard things. A novice teacher needs to justify everything. A tenured full professor can do as s/he pleases in many places. But with 40+ students, there are limits. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;One thing I would think about trying is to turn the class into a science fair with students or groups of students proposing projects that fit their interest but also require learning what you have on the syllabus, say programming, data structures, etc. There might be few lectures. A &quot;flipped classroom&quot;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A milder proposal is to have the course closer to whatever your standard is, but include a project (maybe individual, maybe team) that the students propose. Students propose a project, you negotiate the boundaries and eventually approve. If you can make this a large part of the grading/marking system, all the better. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are really constrained, however, just force teamwork on them so that people with different interests and different skill levels must work together. Here your job may be the wise overseer who keeps things going forward if there are conflicts or imbalance. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Notice that all of the suggestions here include teamwork, at least potentially.  Students need  to learn things but at this age they also need to learn, and have reinforced, appropriately positive things about themselves. With older students socialization becomes, perhaps, less important, but as they get closer to the working world, teamwork becomes more important. &amp;lt; opinion &gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-10T11:34:17.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2536" PostTypeId="2" ParentId="1482" CreationDate="2017-07-10T11:40:37.940" Score="1" Body="&lt;p&gt;I think of a factory where you decide upon requirements which type of object to build:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;LuquidsContainer produceByRequirement(String requirement1,String requirement2){&#xA;   if(&quot;can be closed&quot;.equals(requirement1){&#xA;      if(&quot;keeps temperature&quot;.equals(requirement2){&#xA;         return new ThermosCan();&#xA;      } else {&#xA;         return new Bottle();&#xA;      }&#xA;   } else {&#xA;      if(&quot;individual use&quot;.equals(requirement2){&#xA;         return new Glass();&#xA;      } else {&#xA;         return new Flagon();&#xA;      }&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1256" LastActivityDate="2017-07-10T11:40:37.940" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2537" PostTypeId="1" CreationDate="2017-07-10T12:13:03.953" Score="6" ViewCount="339" Body="&lt;p&gt;One way to extend the reach of your best students is to have an &lt;em&gt;Honors Program&lt;/em&gt; that, perhaps, runs over several years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One model is to have a special program to which students are invited. Participation extends over several years, perhaps with separate classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you have experience with such a program, either as a participant, faculty member, or creator, what was the model and what worked and didn't in your program.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was a faculty member for students in one such program but had little influence on its general structure. Students could designate any course(s) in the curriculum as honors option. If the professor agreed, then the student and prof made a mini contract for extra work in the class. This was sort of small scale from my perspective but worked well in my (limited) experience. There were no special lectures for these students and the other students weren't affected. The honors student had to do more to earn an A in the course, but that was part of the contract. I had to design a more complex project for the (compiler course) students was the only real difference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was an undergrad at a liberal arts college we had a general honors program. I studied math and philosophy, but the program was tailored to the liberal arts. Students were invited at the end of the first year (of four). A faculty committee was responsible for invitations, though I suspect that a student could petition for entry. Every term the program had a different theme, literature, science, psychology, history, etc. depending on faculty interest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students read a book on the topic of the term each week and met in seminar for a few hours once a week. The faculty said little as the students discussed the book. At the end of the second year of the program (third year of study) one of the seminars was public, held in an auditorium, with a reception following. These were well attended. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final year was different. We developed a &quot;thesis&quot; paper in our major study area, so mine was in the philosophy of math area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since my major was fairly narrow (but also required science study) I cam away with a nearly perfect Liberal Arts education. The only area of the Medieval University course of study that I missed was Astronomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the honors courses were in addition to the regular student load. The courses were pretty intense, so could lead to burnout. Also, someone already studying, say philosophy, didn't get as much &quot;broadening&quot; as I did since they already studied many of the HP topics anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I liked that Honors Program model, then and now, but here I'm more interested in something specialized for Computer Science students. I think that both small scale and large scale programs are interesting and might serve as models for others to consider. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Much later, I helped design a doctoral program in computing that had many features of the above honors model. Three years, two of study and one of dissertation. The years were calendar years with no breaks and dissertation topics were expected to be ready to go by the beginning of the third year. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My personal context is the United States where undergraduates take many courses in many fields with one chosen as a specialty. My examples are from the US of course. However, other places, in which students are much more specialized as undergraduates have, in my view, similar needs: foster a good learning environment for the best students who want to go beyond and can use faculty guidance. What would an &quot;honors&quot; program look like in such a situation? &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-20T13:40:49.127" LastActivityDate="2017-09-27T23:26:06.473" Title="What are good models for an Honors Program for CS students?" Tags="|best-practice|student-motivation|differentiation|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2538" PostTypeId="1" CreationDate="2017-07-10T15:40:04.457" Score="5" ViewCount="447" Body="&lt;p&gt;I'm going to be working through a textbook on discrete mathematics that has a special focus on computer science. My only resources are the textbook (which, in its defense, has answers to the odd numbered problems in the back, and &quot;self-tests&quot; with answers) and the great and powerful Google. Since I don't have a teacher per-se to help me, are there any things I should do to help keep myself focused and retaining the information I read? I'm planning on doing every single odd-numbered problem, but are there extra projects I could be doing (programming or whatever) to reinforce aspects of it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book is &lt;em&gt;Discrete Mathematical Structures&lt;/em&gt;, 5th edition, by Kolman, Busby, and Ross. Chapters are &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Fundamentals (covering set theory, matrices, etc)&lt;/li&gt;&#xA;&lt;li&gt;Logic&lt;/li&gt;&#xA;&lt;li&gt;Counting&lt;/li&gt;&#xA;&lt;li&gt;Relations and digraphs&lt;/li&gt;&#xA;&lt;li&gt;Functions &lt;/li&gt;&#xA;&lt;li&gt;Order relations and structures&lt;/li&gt;&#xA;&lt;li&gt;Trees&lt;/li&gt;&#xA;&lt;li&gt;Topics in graph theory&lt;/li&gt;&#xA;&lt;li&gt;Semigroups and groups&lt;/li&gt;&#xA;&lt;li&gt;Languages and finite-state machines&lt;/li&gt;&#xA;&lt;li&gt;Groups and coding&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-10T20:12:03.520" LastActivityDate="2017-07-10T20:12:03.520" Title="Tips for self-study with just a textbook and google" Tags="|best-practice|self-learning|mathematics|textbook|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2539" PostTypeId="2" ParentId="2538" CreationDate="2017-07-10T15:57:09.127" Score="3" Body="&lt;p&gt;Your general plan seems good: Do a lot of exercises. An old proverb (Chinese, but maybe more general) is that you don't know something until you've practiced it ten thousand times. (Rule of 10,000). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found wikipedia to be quite good, but not perfect, for questions on mathematics. Be a little skeptical if anything seems a bit strange in an article there. I once came upon an article that seemed sketchy in part - just a paragraph or two in the middle of a long piece. I came back in an hour or two and it was gone. A professional isn't likely to be misled, but a student should be just a bit cautious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, take notes. What are the most important three ideas in this section/chapter? Don't try to re-write the book, just abstract the gems. Highlighting has less impact since your brain is less engaged. You want to do things while self studying that are &quot;active&quot; enough that your neurons get rearranged. This is why the exercises are especially good. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-10T15:57:09.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2540" PostTypeId="1" CreationDate="2017-07-10T16:36:24.460" Score="10" ViewCount="697" Body="&lt;p&gt;The class meets just 8 times for 2.5 hours weekly, aimed at 7-8th graders with very basic programming skills.  Possibilities off the top of my head: computer learning (neural nets and/or genetic algorithms), constraint/logic based programming (well, it came out of AI, right?), a Brief History of AI, and/or basic game states and alpha-beta pruning.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I probably can't fit it all in, and I don't want to make it so difficult as to be discouraging.&lt;/p&gt;&#xA;" OwnerUserId="1015" LastActivityDate="2017-07-16T20:24:32.787" Title="What would be reasonable to include in an Introduction to AI class for a 7th-8th grade after school program?" Tags="|curriculum-design|lesson-ideas|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2541" PostTypeId="2" ParentId="2540" CreationDate="2017-07-10T16:46:45.660" Score="6" Body="&lt;p&gt;I don't have a lot of insight into your overall problem, but there is a resource you might consider. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a simple game, The French Military Game, in which a person plays against the computer. The totality of game information is small enough that the computer can remember every position in every game played, so it doesn't make the same mistakes in subsequent games. While it is a known win for the human player, after 6 or so plays it is very difficult to beat the computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The game is available (Java) in a couple of forms at the &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;noreferrer&quot;&gt;Greenroom&lt;/a&gt;, a place for educators using &lt;a href=&quot;https://www.greenfoot.org/door&quot; rel=&quot;noreferrer&quot;&gt;Greenfoot&lt;/a&gt;. Membership is open to any interested teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The FMG once appeared in Creative Computing, now defunct, as an Apple II BASIC game. It uses a bit of math, but ok at the level you are interested in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is, at best, a simple, even naive, introduction to machine learning.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I'm not associated with Greenfoot or the Greenroom. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The game is also discussed with code in &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0985154306&quot; rel=&quot;noreferrer&quot;&gt;Beyond Karel J Robot&lt;/a&gt; though that book probably isn't a good resource for your class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another user here (@Ben_I.) points to &lt;a href=&quot;http://www.huffmancoding.com/code/fmg/&quot; rel=&quot;noreferrer&quot;&gt;an applet version&lt;/a&gt; with a brief explanation of the game.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-10T18:34:45.387" LastActivityDate="2017-07-10T18:34:45.387" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2542" PostTypeId="1" CreationDate="2017-07-10T17:13:59.337" Score="9" ViewCount="199" Body="&lt;p&gt;Some students find themselves falling behind in a course but still have the desire to do well. Some colleges provide a definite system of tutors in which such students can get additional help. What are good models, in your experience, for such systems?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some questions you might want to answer in giving a model are&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are the tutors other students or professionals?&lt;/li&gt;&#xA;&lt;li&gt;How are the tutors selected?&lt;/li&gt;&#xA;&lt;li&gt;Are tutors or sessions supervised formally in any way?&lt;/li&gt;&#xA;&lt;li&gt;Are tutors paid? If so in what way? (money, academic credit, ...)&lt;/li&gt;&#xA;&lt;li&gt;What are the scheduling issues? What works and what does not?&lt;/li&gt;&#xA;&lt;li&gt;Are the tutors and tutees matched with each other in any specific way?&lt;/li&gt;&#xA;&lt;li&gt;Is tutoring one-one or one-many, generally?&lt;/li&gt;&#xA;&lt;li&gt;Does the student need a &quot;ticket&quot; to join, say a recommendation from a prof?&lt;/li&gt;&#xA;&lt;li&gt;Can you get any measure of success?&lt;/li&gt;&#xA;&lt;li&gt;How do the tutors benefit other than formal pay?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What models have you seen or been part of that might be used elsewhere?&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-17T04:54:09.540" Title="What are good models for a Tutorial System for lagging CS students?" Tags="|best-practice|undergraduate|differentiation|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2543" PostTypeId="1" AcceptedAnswerId="2545" CreationDate="2017-07-10T17:35:44.793" Score="2" ViewCount="65" Body="&lt;p&gt;In my school, we have to produce a report for each pupil each term. These reports have a grade for behaviour, attitude to learning (so far so good), and predicted grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was at University studying to be a teacher, we learnt that summative feedback leads to poorer outcomes and formative feedback leads to good outcomes. (See Carol Dweck's TED talk for an introduction on this.) I even read one study that shows that summative feedback undoes the good of formative feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, I want to find a way to do this, that: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is accurate (though not necessarily precise)&lt;/li&gt;&#xA;&lt;li&gt;Does not disturb the kids from learning too much&lt;/li&gt;&#xA;&lt;li&gt;And, more importantly, is quick and requires little effort&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-11T19:19:07.357" LastActivityDate="2017-07-11T19:19:07.357" Title="How to make term reports, easy to do (and secondly effective, and accurate)" Tags="|grading|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2544" PostTypeId="2" ParentId="2543" CreationDate="2017-07-10T17:50:45.550" Score="3" Body="&lt;p&gt;I can't find any indication that summative feedback undoes the good of formative feedback.  Where did you see that study?  In any case, there is a good summary of strong, replicated findings about summative testing &lt;a href=&quot;https://www.forskningsradet.no/servlet/Satellite?c=Rapport&amp;amp;cid=1250822859733&amp;amp;lang=en&amp;amp;pagename=kunnskapssenter%2FHovedsidemal&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The great good of formative assessment is that it provides an &lt;em&gt;actionable point of reflection&lt;/em&gt; for students.  They can see how they are doing, and they can see how to improve their performance going forward.  The term reports you mention sound like a great tool for that first criterion.  What is missing is something along the lines of &lt;em&gt;and here's how the student can do [even] better going forward.&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I could, I would add this little &lt;em&gt;something to grow on&lt;/em&gt; into each Term Report.  To be most effective, these items should be directly actionable, not merely general.  (e.g. &lt;em&gt;&quot;Study for a make-up for ____ and do a very careful job on our upcoming project&quot;&lt;/em&gt; instead of &lt;em&gt;&quot;Have a better attitude and respect fellow students&lt;/em&gt;&quot;.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-10T17:50:45.550" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2545" PostTypeId="2" ParentId="2543" CreationDate="2017-07-10T18:04:59.913" Score="4" Body="&lt;p&gt;I've always admired the Swiss' education system of teaching kids where they rarely have examinations, but rather through constructive assignments and homeworks to teach students. At a conference I've attended, I heard a quick introduction on &lt;a href=&quot;https://en.wikipedia.org/wiki/Gamification_of_learning&quot; rel=&quot;noreferrer&quot;&gt;gamification of education&lt;/a&gt; and I am trying this out with some students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I proposed:&#xA;&lt;li&gt;Assesments (excluding exams and final project, due to curriculum and school board constraints) have unlimited re-tests, limited to once a week.&#xA;&lt;li&gt;0.5 credit is awarded for 50%+ and 1.0 credit is awarded for 80%+&#xA;&lt;li&gt;At the end of the term, their number of credit earned is divded by total number of credits for a &quot;term work&quot; grade worth x% of their final mark&#xA;&lt;li&gt;The goal here is for students to not worry about a 50, 60, 70, 80, 90 or 100, but rather track their progress through completion of content. I believe the unlimited retries gives incentive for students who are falling behind to realize early and catch up immediately, rather than later. This is to avoid the mentality of giving up because it is &quot;too late&quot; or &quot;wait for next test&quot;.&#xA;&lt;li&gt; To some degree, I believe in the innate competitive nature of CS students transferred from love for gaming&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe this method (with modification to suit your needs) meets what you are looking for.&#xA;&lt;li&gt;Accurate enough to give a % mark because you track progression. Although I foresee multiple 100% with this method&#xA;&lt;li&gt;Does not disturb students because they are well aware of their progress, and know they can make improvements rather than blankly stare at an unfortunate poor test 1&#xA;&lt;li&gt;Quick and low effort - I just use an excel macro and export to show my class after each week their progress&lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-07-10T18:04:59.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2546" PostTypeId="2" ParentId="2542" CreationDate="2017-07-10T18:24:39.183" Score="2" Body="&lt;p&gt;This is from a high school, so it's not quite the same...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our school has free tutoring one night every week for any students that want to show up. Typically it's parents that know the subjects. A writer might tutor Literature, an engineer might tutor physics; that sort of thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they'll also have student tutors, and most organizations like &lt;a href=&quot;https://en.wikipedia.org/wiki/National_Honor_Society&quot; rel=&quot;nofollow noreferrer&quot;&gt;National Honor Society&lt;/a&gt; will give their members volunteer hours for tutoring. One of the first things on my task list for early in the school year is to find a couple of upper level students that would make good tutors and connect them with the organizers of the tutoring. Past that, I don't do anything other than suggest it to students or parents that ask about extra tutoring. I've heard good things though. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are the tutors other students or professionals?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Both. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How are the tutors selected?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Some sign up on their own, some we ask to help out. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are tutors or sessions supervised formally in any way?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not by the school&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are tutors paid? If so in what way? (money, academic credit, ...)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Student tutors might get volunteer hours for service organizations. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the scheduling issues? What works and what does not?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No clue. It's setup and kids show up if they want. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are the tutors and tutees matched with each other in any specific way?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;First come, first serve&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is tutoring one-one or one-many, generally?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;One to how ever many show up&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does the student need a &quot;ticket&quot; to join, say a recommendation from a prof?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Nope, they just show up&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can you get any measure of success?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Never tried. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do the tutors benefit other than formal pay?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Service hours. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="1719" LastEditDate="2017-07-17T04:54:09.540" LastActivityDate="2017-07-17T04:54:09.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2547" PostTypeId="1" CreationDate="2017-07-10T18:41:18.590" Score="74" ViewCount="19130" Body="&lt;p&gt;Over the course of the CS major at my school, especially in years two and three (roughly equivalent to years 1 and 2 at a university), as I introduce my students to significant advances in Computer Science, I include some information about the scientists who were instrumental in making those advances. This includes people such as Church, Turing, von Neumann, Knuth, Babbage, Chomksy, Dijkstra... all prominent CS luminaries. They are also all male.  Over the three years that I teach my students, I want to be able to paint a more accurately balanced picture of the field than &lt;em&gt;there have been zero contributions by women&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also research that back up the assertion that, in the interests of helping to encourage females to enter the STEM fields, it is important to include &lt;em&gt;&lt;a href=&quot;http://katecarruthers.com/2010/04/the-importance-of-role-models-who-look-like-us/&quot; rel=&quot;noreferrer&quot;&gt;&quot;people who look like me&quot;&lt;/a&gt;&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Who, then, are scientists that are, or were, prominent in the field of computer science &lt;em&gt;and whose important work is appropriate to incorporate into the early years of a CS degree?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not intend to hit them over the head with this, and I do not want to emphasize interesting biographical excerpts, since it is not a history of CS course. I want to emphasize the &lt;strong&gt;CS itself&lt;/strong&gt; and only introduce the relevant scientists as part of the CS concept being discussed. This means that not every female computer scientist is appropriate, even if they did prominent work. Even with these more limited choices, the clear subtext should be that women really have added important things to this field.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-14T21:39:11.190" LastActivityDate="2017-07-17T14:26:24.743" Title="Advances in CS appropriate for CS1 and CS2 made by female computer scientists" Tags="|social-context|equity|" AnswerCount="18" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2548" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T18:48:13.417" Score="65" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Ada_Lovelace&quot; rel=&quot;noreferrer&quot;&gt;&lt;strong&gt;Ada Lovelace&lt;/strong&gt;&lt;/a&gt; is considered the first programmer - pretty good introduction to a CS class. As Wikipedia puts it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;She was the first to recognise that the machine had applications&#xA;  beyond pure calculation, and created the first algorithm intended to&#xA;  be carried out by such a machine. As a result, she is often regarded&#xA;  as the first to recognise the full potential of a &quot;computing machine&quot;&#xA;  and the first computer programmer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So you could also talk about her when you talk about algorithms. She also did some early work explaining how Babbage's machines worked:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;During a nine-month period in 1842–43, Lovelace translated the Italian mathematician Luigi Menabrea's article on Babbage's newest proposed machine, the Analytical Engine. With the article, she appended a set of notes. Explaining the Analytical Engine's function was a difficult task, as even many other scientists did not really grasp the concept and the British establishment was uninterested in it. Lovelace's notes even had to explain how the Analytical Engine differed from the original Difference Engine. Her work was well received at the time; the scientist Michael Faraday described himself as a supporter of her writing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;She also realized the potential of computers for things other than just number crunching, which Babbage himself did not think about. As computer historian &lt;a href=&quot;https://en.wikipedia.org/wiki/Doron_Swade&quot; rel=&quot;noreferrer&quot;&gt;Doron Swade&lt;/a&gt; put it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In Babbage's world his engines were bound by number...What Lovelace saw—what Ada Byron saw—was that number could represent entities other than quantity. So once you had a machine for manipulating numbers, if those numbers represented other things, letters, musical notes, then the machine could manipulate symbols of which number was one instance, according to rules. It is this fundamental transition from a machine which is a number cruncher to a machine for manipulating symbols according to rules that is the fundamental transition from calculation to computation—to general-purpose computation—and looking back from the present high ground of modern computing, if we are looking and sifting history for that transition, then that transition was made explicitly by Ada in that 1843 paper.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Finally, she also thought about (and dismissed) artificial intelligence:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;She wrote that &quot;The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. It can follow analysis; but it has no power of anticipating any analytical relations or truths.&quot; This objection has been the subject of much debate and rebuttal, for example by Alan Turing in his paper &quot;Computing Machinery and Intelligence&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also see &lt;a href=&quot;http://bygeekgirl.com/7-female-coders-who-paved-the-way-for-women-in-tech/&quot; rel=&quot;noreferrer&quot;&gt;this website&lt;/a&gt; for other women to consider. &lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="919" LastEditDate="2017-07-16T15:10:05.990" LastActivityDate="2017-07-16T15:10:05.990" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2550" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T19:21:58.440" Score="39" Body="&lt;p&gt;One of my favorite iconoclastic point-outs is &lt;a href=&quot;https://www.nasa.gov/content/dorothy-vaughan-biography&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dorothy Vaughan&lt;/a&gt;. One of the USA space program's first computer programmers, who was originally hired as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Human_computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;computer&lt;/a&gt;. She was an African-American who grew up under segregation. In spite of this, her direct contributions to the space program and computer programming are large. Her influence on many others, who also were instrumental, was enough to create many more luminaries for NASA. Katherine Johnson, the primary subject of the book and movie &lt;em&gt;Hidden Figures&lt;/em&gt; (Dorothy is also in the book and movie), was influenced by her.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I consider Dorothy to be an iconoclastic point-out because she didn't come from &quot;money&quot;, didn't have any &quot;advantages&quot; or handouts, she did it all herself. She obviously was a female in a &lt;em&gt;man's world&lt;/em&gt; and did it well. Not only did she learn and use FORTRAN, she also taught it to other computers (also female) who became programmers for NASA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact that she was in the space program helps &lt;em&gt;recommend&lt;/em&gt; her to students. Many students, even if not interested in space themselves, still seem to hold people in the space fields as &lt;em&gt;higher&lt;/em&gt; than others. I can't say why but I'm not afraid to use that to their own advantage.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="919" LastEditDate="2017-07-16T20:09:42.220" LastActivityDate="2017-07-16T20:09:42.220" CommentCount="1" CommunityOwnedDate="2017-07-17T00:08:15.230" ContentLicense="CC BY-SA 3.0" />
  <row Id="2551" PostTypeId="1" CreationDate="2017-07-10T19:55:18.010" Score="26" ViewCount="22017" Body="&lt;p&gt;The question kind of says it all. Imagine that for an assignment you receive two or more similar submissions (e.g. programs). What will you do? Annul all the works? What if you know for certain who was the original author?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably this is already in your schools’ code of conduct. In my school it is not and I sometimes don’t really now what to do.  &lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2017-07-13T09:58:58.243" Title="When a student submits a work that is a copy from a colleague, should you also punish the student that made the work?" Tags="|plagiarism|" AnswerCount="14" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2552" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T19:59:29.053" Score="91" Body="&lt;p&gt;I think Rear Admiral &lt;a href=&quot;https://en.wikipedia.org/wiki/Grace_Hopper&quot; rel=&quot;noreferrer&quot;&gt;Grace Hopper&lt;/a&gt; is perhaps the easiest to explain to new students, and to tie in with an important advancement in computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to discuss the transition from early programming in machine language to programming in higher level languages. I'll usually show the students some machine code that I will tediously decrypt. Then I show and talk about assembly languages. Then I'll make a point that &quot;there has to be a better way&quot;. Then I'll introduce Grace Hopper and her ideas about compiled languages. Showing a little COBOL code with English words and contrasting it to the equivalent machine code is striking.&lt;/p&gt;&#xA;" OwnerUserId="1737" LastEditorUserId="919" LastEditDate="2017-07-16T16:48:07.970" LastActivityDate="2017-07-16T16:48:07.970" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2553" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T20:05:40.497" Score="27" Body="&lt;p&gt;This would depend on context, in my opinion. Given you know the identity of both the original author and the plagiarist, consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Did the original author &lt;strong&gt;facilitate&lt;/strong&gt; the plagiarism, or was the code plagiarised without the original author's knowledge? Can you tell?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clearly, if the original author was the victim of someone peeking over their shoulder, or just blatantly copying code files, then they should not be punished. But if they gave help to others &lt;strong&gt;despite being told that this is inappropriate&lt;/strong&gt;, then they are equally guilty of misconduct.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's easy for me to write this, but in practice determining whether the plagiarism was with or without consent is more difficult. I would be inclined to give the benefit of the doubt if there is any chance that one party did not intentionaly cheat.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is there any record of the students cheating previously? If so, that might be a guide.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would be keen to avoid punishing someone who might not have done anything wrong, but some others might not give the benefit of the doubt. It's certainly not easy to tell what exactly has gone on when two very similar works are handed in, but if you can rule out any copying without the author's awareness &lt;strong&gt;with certainty&lt;/strong&gt;, then you must assume that the author facilitated cheating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you haven't made clear what the difference is between helping and cheating, then you can't really punish anyone &lt;em&gt;fairly&lt;/em&gt;—if you don't clearly lay out your expectations, then you can't enforce strict rules.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2017-07-10T20:05:40.497" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2554" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T20:08:57.793" Score="6" Body="&lt;p&gt;I have 3 usual responses at my small institution:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If two students cooperated, I ignore it the first time, after that I&#xA;talk with them.&lt;/li&gt;&#xA;&lt;li&gt;If one copied from another, possibly by looking in my &quot;In Box&quot; (on my desk), I talk with that person.&lt;/li&gt;&#xA;&lt;li&gt;I report it to the Administrator in charge of Students.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;We have only a few dozen students and one Administrator, so it is a small problem and gets dealt with quickly. Usually, if someone is getting excessive help from other students or is copying things, they end up not being able to do this coursework and we can redirect them to another program.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-10T20:08:57.793" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2555" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T20:12:24.183" Score="11" Body="&lt;p&gt;As outlined in my syllabus, both the contributor and the receiver have committed an integrity violation, and both will be punished. For me to feel that this is fair for everyone, I make sure to be very clear of the rules early in the course. I have a section in my syllabus that directly addresses &quot;helping&quot; other students. I have a list of actions that constitute integrity violations. But I also have a list of actions that are permissible in attempting to help other students. This has proven useful for the stronger student that truly does want to help their struggling colleague. It also gives the stronger partner a reference that they can show their struggling partner when they feel they are being pressured to help too much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I have instances of a student using another student's code, I will go back to the syllabus and cite the specific actions that were violated. The &quot;supplier&quot; may think that the punishment outlined in the syllabus is too harsh, but I rarely have a student now who denies that they violated a stated rule. And the punishment was known before the offense took place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is all assuming that you know one student was the supplier for another. I only pursue this if I have a extremely high level of confidence that this happened. Usually with submitted programming assignments, there are enough artifacts in the digital file (white spacing, identical inconsistencies, etc.) to be confident of copying.&lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2017-07-10T20:12:24.183" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="2558" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T20:29:24.600" Score="3" Body="&lt;p&gt;It depends on the situation and your school's policy on academic integrity. At my school, it clearly states that authors may not &lt;strong&gt;knowingly&lt;/strong&gt; permit other students to submit their work. You may want to ask your school to update its policy to include a clause like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will have to determine if authors know if other students submitted their work. The author could be a student in the current class or another class. The author could be a stranger online. In a previous class, I suspected that one student submitted another student's program. This was confirmed when I saw that the filename included the original student's first and last name. After discussing this with both students, I resolved it. I can't say that I follow a hard and fast rule. I think it depends on the situation (severity of the violation, actions of both parties, etc.).&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-10T20:29:24.600" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2559" PostTypeId="2" ParentId="2540" CreationDate="2017-07-10T20:34:12.023" Score="4" Body="&lt;p&gt;I'll share a few things that I have done in the past to expose students to interesting AI topics without having them write working programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) To discuss expert systems and rules-based systems, have the students write out a list of rules (their best strategy) for playing tic-tac-toe (or another simple game that they should all be able to play well). After finishing their own set of rules, have them swap with a partner and attempt to lose, but still following the rules that were handed to them. This exercise has shown the difficulty in creating expert systems and exposes that we have so many assumptions that we don't realize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) I really like Reinforcement Learning and created an activity where students are given a simple two-player game in which one student plays against the learning agent. The learning agent starts off choosing between actions with equal probability of selection. After a game is won or lost, the probabilities for actions taken that game or increased or decreased respectively. I implement this by using sets of colored tokens that can be removed or added to. For this activity to work, the game was be brief; the one I created never has more than 3 moves for the RL agent, it can only visit 14 possible states. I print out each of these states and tape the pictures to 14 different cups. The legal actions are color-coded with the colored tokens in the cups. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) Ant Colony Optimization is interesting and accessible. I'll show pictures from Marco Dorigo's experiments with actual ants and bridges. We'll discuss the concept of minimal spanning trees and some real world applications for them. The I'll end up using an online ant colony simulator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want more detail about any of these, I'd be glad to share my experiences and more details. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're looking specifically for something they can program that exhibits intelligent behavior, you'll be extremely limited. One option might be an accessible robot kit (Mindstorms, etc) and have students work on obstacle avoidance, color detection, etc.&lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2017-07-10T20:34:12.023" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2560" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T20:42:51.043" Score="2" Body="&lt;p&gt;If your school does not have a code of conduct, then you need to write a set of understandings that you can give out to your classes.  Ultimately, there are no &lt;em&gt;fair&lt;/em&gt; responses without some kind of memorandum of understanding. In there, you will outline what you consider to be cheating, and where, exactly, the lines are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to take a slightly different approach, the lack of a school policy also creates an interesting opportunity for you to get a lot of student buy-in for a strong policy on cheating.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the beginning of the year, show a few CS plagiarism policies to your students, and ask each student to write their own example of a policy that they would consider to be both fair and enforceable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;During the next period, have each student pair and share, and debate each other for 3 minutes, and then rate the other student's policy on a few key metrics.  Then have them switch to a new pairing and do the same.  Once every kid has rated a few policies, have them rate their own.  Collect all of the policies, and say that you will go over the top 3 policies along with some of your own comments the next day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On day 3, you now have the makings of a very healthy debate, and the setup for a class vote on a policy.  You will need some sort of structure to facilitate (and vote on) document modifications, and an overall vote for adoption. What you will wind up with is a document that the students created democratically, that they can take ownership of, and that they will back.  You've also started a very healthy relationship between your students and your course.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-10T20:48:28.367" LastActivityDate="2017-07-10T20:48:28.367" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2561" PostTypeId="2" ParentId="2540" CreationDate="2017-07-10T20:54:52.620" Score="4" Body="&lt;p&gt;I built a light but fun AI project using the Twitter developer API and a simple Python program to bring my dog Maggie to Twitter. If you send a direct message to &lt;a href=&quot;https://twitter.com/maggielistens&quot; rel=&quot;nofollow noreferrer&quot;&gt;@maggielistens&lt;/a&gt;, you'll see what I mean. This program uses a version of an old program from the 60s called &lt;em&gt;Eliza&lt;/em&gt;. It acts like a therapist by responding to your commments and questions. It uses regular expressions and text replacement to appear like a real person. It won't pass the Turing Test, but it's a fun way to get students interested in AI and programming.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-10T20:54:52.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2562" PostTypeId="2" ParentId="756" CreationDate="2017-07-10T21:02:01.587" Score="1" Body="&lt;p&gt;In my experience, some semesters I have had very clear bimodal grade distributions in introductory programming courses. Other semesters have seen something close to even distributions. Overall, my grades have show tendacy towards bimodal in introductory courses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certainly, &quot;The Camel Has Two Humps&quot; and &quot;Learning Edge Momentum&quot; are an important part of this discussion and I'm glad to see that they've already been mentioned (we've got some good people on this site!). At the ACM SIGCSE 2016 conference, there was a lively panel discussion focused on &quot;Should all of your students be able to pass your programming course?&quot;, or some similar title. Many participants felt strongly that believing in the bi-modal distribution and the often related belief that &quot;some students can learn this, but some students just can't&quot; has been a convenient way for CS teachers dodge responsibility. Others had very strong feelings in other directions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, it seems that some students show up for a first programming course already having good problem-solving skills (you may even want to expand that to computational thinking skills). Other students don't have these skills. For the students that do have these skills already, they are simply learning language and syntax to connect to concepts that they already have. But for students who don't start off with strong problem-solving skills, they are trying to learn two very different and difficult things simultaneously.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My analogy is this: I could take a class on how to speaking Chinese (I currently know nothing about the Chinese language). Alternatively, I could take a class that teaches the rules and strategies of the sport of Cricket (I currently know very little about the sport of Cricket). For those programming students who do not have good problem-solving skills walking in to the first class, and no prior programming experience, they are faced with trying to understand Cricket, but explained primarily in Chinese. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As someone who occasionally teaches introductory programming, I like to think that I teach problem-solving in the course, but I'm afraid I often focus too much on the syntax and mechanics of the language, and just assume that students will pick up on the problem-solving as we go along. And while teaching, I'm often tempted to believe that all students understand what we are doing as soon as I see 3 or 4 students nod consent. &lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2017-07-10T21:02:01.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2563" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T21:12:04.343" Score="19" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hedy_Lamarr&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hedy Lamarr&lt;/a&gt;, the famous actress, worked with &lt;a href=&quot;https://en.wikipedia.org/wiki/George_Antheil&quot; rel=&quot;nofollow noreferrer&quot;&gt;George Antheil&lt;/a&gt; during World War II to create a radio system for the US Navy that was safe from jamming by the Axis powers, contributing greatly to the development of &lt;a href=&quot;https://en.wikipedia.org/wiki/Frequency_hopping&quot; rel=&quot;nofollow noreferrer&quot;&gt;frequency hopping&lt;/a&gt;, or switching a signal between many frequency channels, which is used quite a bit in current day network design, Wi-Fi, Bluetooth, and and other technologies. This work lead them to be inducted into the National Inventors Hall of Fame in 2014. You could mention her and her work when you learn about and discuss networking and how it is implemented.&lt;/p&gt;&#xA;" OwnerUserId="1823" LastEditorUserId="919" LastEditDate="2017-07-16T14:30:53.653" LastActivityDate="2017-07-16T14:30:53.653" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2565" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T22:35:18.203" Score="11" Body="&lt;p&gt;&lt;a href=&quot;http://sunnyday.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nancy G. Leveson&lt;/a&gt; is a pioneer in software safety.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read her article, co-authored with Clark S. Turner, on the Therac-25 Accidents as an undergraduate and found it approachable and interesting. (She co-taught Software Engineering the quarter I took it.)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;An Investigation of the Therac-25 Accidents&quot; by Nancy G. Leveson &amp;amp; Clarck S. Turner. &lt;em&gt;IEEE Computer&lt;/em&gt; July 1993. &lt;a href=&quot;http://www.cs.umd.edu/class/spring2003/cmsc838p/Misc/therac.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.cs.umd.edu/class/spring2003/cmsc838p/Misc/therac.pdf&lt;/a&gt;, &lt;a href=&quot;http://ieeexplore.ieee.org/document/274940/?reload=true&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://ieeexplore.ieee.org/document/274940/?reload=true&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Medical Devices: The Therac-25&quot;, Appendix A of &lt;em&gt;Safeware&lt;/em&gt; by Nancy Leveson. &lt;a href=&quot;http://sunnyday.mit.edu/papers/therac.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://sunnyday.mit.edu/papers/therac.pdf&lt;/a&gt;, &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0201119722&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/dp/0201119722/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;She has also, as Ellen Spertus points out, been active in helping other women become computer scientists.&lt;/p&gt;&#xA;" OwnerUserId="1827" LastEditorUserId="919" LastEditDate="2017-07-16T16:49:29.310" LastActivityDate="2017-07-16T16:49:29.310" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2566" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T22:43:30.407" Score="42" Body="&lt;p&gt;You should probably teach &lt;a href=&quot;https://en.wikipedia.org/wiki/Barbara_Liskov&quot; rel=&quot;noreferrer&quot;&gt;&lt;strong&gt;Barbara Liskov&lt;/strong&gt;&lt;/a&gt; and her &lt;a href=&quot;https://stackoverflow.com/a/56904/541686&quot;&gt;substitution principle&lt;/a&gt; in an introductory CS class. Oh, and she also &lt;a href=&quot;http://amturing.acm.org/award_winners/liskov_1108679.cfm&quot; rel=&quot;noreferrer&quot;&gt;won&lt;/a&gt; some random award... like a Turing award or something... =P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Barbara Liskov was one of the first women to be granted a doctorate in computer science in the United States and &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;has led many significant projects, including the Venus operating system, a small, low-cost and interactive timesharing system; the design and implementation of CLU; Argus, the first high-level language to support implementation of distributed programs and to demonstrate the technique of promise pipelining; and Thor, an object-oriented database system.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most famously, she developed the Liskov substitution principle, which is a principle in object oriented programming &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;stating that, in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e. an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of T (correctness, task performed, etc.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;She won the Turing award for her work developing languages and principles that led to object oriented programming. She was also inducted into the National Inventors Hall of Fame in 2012. She also won the John von Neumann medal for &quot;fundamental contributions to programming languages, programming methodology, and distributed systems&quot;.&lt;/p&gt;&#xA;" OwnerUserId="823" LastEditorUserId="919" LastEditDate="2017-07-16T20:07:07.557" LastActivityDate="2017-07-16T20:07:07.557" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2567" PostTypeId="2" ParentId="2547" CreationDate="2017-07-10T23:00:23.550" Score="32" Body="&lt;p&gt;&lt;a href=&quot;http://people.csail.mit.edu/shafi/&quot; rel=&quot;noreferrer&quot;&gt;Shafi Goldwasser&lt;/a&gt; is the 2012 &lt;a href=&quot;http://amturing.acm.org/award_winners/goldwasser_8627889.cfm&quot; rel=&quot;noreferrer&quot;&gt;Turing award laurete&lt;/a&gt;, together with Silvio Micali. The two are considered to be more-or-less the founders of the modern theory of cryptography. They were the first to provide a satisfactory definition of &quot;when should an encryption scheme be considered secure?&quot; and &quot;when should a function be considered pseudo-random&quot;, and to come up with notion of &quot;zero-knowledge proofs&quot;, a concept that is both amazing on the conceptual level and very useful on the practical level (some of those works were joints works with other people).&lt;/p&gt;&#xA;" OwnerUserId="1535" LastEditorUserId="1535" LastEditDate="2017-07-11T20:43:55.057" LastActivityDate="2017-07-11T20:43:55.057" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2568" PostTypeId="2" ParentId="2551" CreationDate="2017-07-10T23:01:54.003" Score="2" Body="&lt;p&gt;I would recommend the same punishment for each party, for several reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If you get two near-identical projects, it can be nearly impossible to determine which was the original.  If you can only punish the one who copied, then you won't be able to punish anyone without determining which is which, and people can cheat with impunity.&lt;/li&gt;&#xA;&lt;li&gt;Suppose that Alice and Bob are friends in the same class, and Alice asks Bob to let her copy an assignment.  If it's known in advance that there will be no consequences for Bob even if they get caught, there's some social pressure to go along with it.  But if both are punished, Bob can simply say he isn't willing to take the risk.  The policy makes Bob less likely to aid in cheating and also lessens any social consequences for doing the right thing if he would have done so anyway. &lt;/li&gt;&#xA;&lt;li&gt;Helping someone else cheat &lt;em&gt;is&lt;/em&gt; unethical, so I have no problem punishing someone who does so willingly.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But we do want to avoid punishing someone who unknowingly helps someone cheat.  There are two likely scenarios here:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Alice looks at Bob's assignment when Bob isn't paying attention.  This is less of a problem in CS than it would be elsewhere, due to the large number of coding assignments; a quick glance generally won't be enough.  But for instances where it might be... The students &lt;em&gt;are&lt;/em&gt; informed that keeping their work from being copied is their own responsibility, but if a small enough portion of the answer is copied that this is a plausible scenario, I'd probably give them the benefit of the doubt anyway (especially since small similarities can happen by coincidence).&lt;/li&gt;&#xA;&lt;li&gt;Alice and Bob collaborate a bit more than they should have, but don't actually intend to &lt;em&gt;cheat&lt;/em&gt;.  I'm perfectly okay with students discussing assignments so long as they're helping each other learn the material instead of just copying answers, but sometimes the line between the two isn't perfectly clear.  My policy here is to insist that if students collaborate (or ask for help on stackoverflow, for that matter), they cite their sources on the assignment.  If too much of the answer came from another source, I might take off a few points or have them redo the assignment (or more likely, just let them know that in the future, they need to do more of the work on their own), but as long as they're honest about where it came from, there's no ethical violation.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="827" LastActivityDate="2017-07-10T23:01:54.003" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2569" PostTypeId="2" ParentId="2551" CreationDate="2017-07-11T00:01:48.550" Score="0" Body="&lt;p&gt;As someone who had a friend accused of cheating, because someone's assignment was very similar, but who knew nothing of that person, the solution is simple.  Take them both and assign them two very similar, but just slightly different problems of a similar type to the one given.  If they can both do them, it's coincidence.  If one can and one can't, you have identified the cheater.  If they &lt;em&gt;both&lt;/em&gt; can't, then maybe they helped each other too much, &lt;em&gt;or&lt;/em&gt; both got their work from some 3rd party.&lt;/p&gt;&#xA;" OwnerUserId="1832" LastActivityDate="2017-07-11T00:01:48.550" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2570" PostTypeId="2" ParentId="2547" CreationDate="2017-07-11T00:02:36.167" Score="15" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Adele_Goldberg_(computer_scientist)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Adele Goldberg&lt;/a&gt; was one of the seven programmers that developed Smalltalk, one of the first object oriented programming languages - so nice for your OOP unit. Many concepts developed by her team became the basis of graphical user interfaces. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many other women listed at Wikipedia's &lt;a href=&quot;https://en.wikipedia.org/wiki/Women_in_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;women in computer programming&lt;/a&gt; page that you could draw from.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-14T20:25:14.240" LastActivityDate="2017-07-14T20:25:14.240" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2571" PostTypeId="2" ParentId="2551" CreationDate="2017-07-11T00:22:26.007" Score="13" Body="&lt;p&gt;I have a somewhat different suggestion. Make every infraction an opportunity for learning, not a punishment scenario. Young people (&amp;amp; others) mess up. They get into &quot;situations&quot; and make dumb decisions. It is in the nature of growing up. You can't (severely) punish young people for making young people mistakes. And any punishment that doesn't stress learning is counterproductive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've written elsewhere on this site that if the young weren't risk takers then the human race would still be in the trees and just prey animals. The young put themselves at risk so that the baboons didn't feast on the infants and old ones. Live with it. It is part of our nature, mediated by intelligence for the most part, but still there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That doesn't mean you can't put a scare into an offender (as a lion would do). But your primary job as a teacher is to teach the students the lessons that they need, not just facts or technical skills. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repeated infractions and overall disdain for the rules or their fellow students is a different matter requiring more formal measures. So do infractions that hurt other people in some way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give a personal anecdote. When in college a fellow student and I committed a somewhat different sort of infraction. The faculty were of several minds with some simply dismissing it as &quot;kids!&quot; and one wanting us expelled. There were meetings and a committee that called us to account. After we suitably (and honestly) abased ourselves we were let go with an informal probation. It was very enlightening as well as embarrassing. My co-perpetrator graduated at the top of our class and I wasn't terribly far behind. So it worked out. (No creatures, human or otherwise, were harmed by our little escapade, so it was a simpler case). And I must have grown up wanting to emulate the way I was treated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the punishment for academic dishonesty should involve something that assures that the lesson of the assignment is learned as well as learning why the rules are important. Sometimes doing a similar assignment and writing an essay on honesty or whatever is appropriate. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It took me a while, but I learned over the course of my career that the main job is to teach students, not to judge them. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-11T00:31:58.647" LastActivityDate="2017-07-11T00:31:58.647" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2572" PostTypeId="2" ParentId="503" CreationDate="2017-07-11T02:52:12.180" Score="2" Body="&lt;p&gt;I teach the &quot;standard&quot; conventions for the language, where they exist. For Java, I use the &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-135099.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;original Sun naming conventions&lt;/a&gt; and &lt;a href=&quot;https://google.github.io/styleguide/javaguide.html#s5-naming&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Java Style Guide&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More important that standard capitalization (which I require) are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using a noun for class names.&lt;/li&gt;&#xA;&lt;li&gt;Using a verb for method names (with certain stereotypical exceptions, such as &lt;code&gt;toString&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Choosing good names for classes and methods helps students think clearly. As the great Josh Bloch &lt;a href=&quot;https://www.infoq.com/articles/API-Design-Joshua-Bloch&quot; rel=&quot;nofollow noreferrer&quot;&gt;says&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Names matter. Strive for intelligibility, consistency, and symmetry.&#xA;  Every API is a little language, and people must learn to read and&#xA;  write it. If you get an API right, code will read like prose.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If it's hard to find good names, go back to the drawing board. Don't&#xA;  be afraid to split or merge an API, or embed it in a more general&#xA;  setting. If names start falling into place, you're on the right track.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The care put into a variable name should be proportional to its lifetime. I consider a single letter &lt;code&gt;i&lt;/code&gt; appropriate for an integer loop variable&lt;sup&gt;1&lt;/sup&gt; or a short-lived temporary variable, while classes and members&lt;sup&gt;2&lt;/sup&gt; should be named carefully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Footnotes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In Programming Languages, I tell students that, in Fortran 77, the default type of a variable starting with &lt;code&gt;I&lt;/code&gt;, &lt;code&gt;J&lt;/code&gt;, &lt;code&gt;K&lt;/code&gt;, &lt;code&gt;L&lt;/code&gt;, &lt;code&gt;M&lt;/code&gt;, or &lt;code&gt;N&lt;/code&gt; is integer, while variables starting with any other character are reals. In either case, the default can be overridden with an explicit declaration. That sets up the joke: &quot;Fortran is of great theological importance, because GOD is real (unless declared integer).&quot;&lt;/li&gt;&#xA;&lt;li&gt;I recently learned about the deprecated &lt;a href=&quot;https://blog.codinghorror.com/new-programming-jargon/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Smurf Naming Convention&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-11T02:52:12.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2573" PostTypeId="2" ParentId="2551" CreationDate="2017-07-11T03:10:03.907" Score="3" Body="&lt;p&gt;Having been in a similar situation myself as a student (once upon a time) might I suggest a different strategy - one that doesn't immediately punish either party?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2551/when-a-student-submits-a-work-that-is-a-copy-from-a-colleague-should-you-also-p/2553#comment3988_2553&quot;&gt;Jeutnarg's comment&lt;/a&gt; above about source control. Firstly, you absolutely &lt;strong&gt;do not&lt;/strong&gt; want to encourage budding learners to be secretive with their code as that leads to far greater problems down the line. I appreciate some of these commercial tools may cost money to host private repositories but I would say that there's more harm than good can come from punishing a student for using a public repository. (&lt;em&gt;It's worth pointing out at this stage that many online apps give student and educational accounts out for either very little money, or for free.&lt;/em&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this situation, I'd use this exact scenario as an opportunity - get them to write docs, or interview them one-on-one about the code. Ask them questions about the functionality, the expected output, and then discuss the plagiarism aspect directly with each student. Give them an opportunity to resubmit the work (or an entirely new piece) on their own but if the same thing happened in future, then take the steps toward punishment. If you take the route of a careless mistake (publishing code online when it should have been private), this is a perfect opportunity to explain how dependencies and open source libraries work. If they took the route of actively &quot;cheating&quot; (I know of not one single programmer that hasn't copied and pasted directly from Stack Overflow at one point in their career) then give them a second chance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice? Speak to them directly. Perhaps both had issues with the material, or with teaching style, or perhaps even one was completely lazy and went for the easy route... but you'll never know until asking them directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt; Our entire class got flunked because one student had copied various functions from other people's code. That and we used a few functions from the text book verbatim. I found this really demoralising and unfair as, although the functions were copied verbatim, that was the best way, &lt;em&gt;that we knew of at the time&lt;/em&gt;, for that &quot;thing&quot; to be done. Long story short, the student that went around copying everyone had difficulty with the teaching method - and all it took was a couple of simple one-on-one sessions with the tutor to resolve... after we all had to resit the entire course though. That guy ended up dropping out due to the pressure of an entire class hating him. Don't let that happen to your student(s).&lt;/p&gt;&#xA;" OwnerUserId="1841" LastActivityDate="2017-07-11T03:10:03.907" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2574" PostTypeId="2" ParentId="2547" CreationDate="2017-07-11T03:52:32.120" Score="7" Body="&lt;p&gt;While some may have varying opinions, I am a big admirer of &lt;a href=&quot;https://en.wikipedia.org/wiki/Lynn_Conway&quot; rel=&quot;noreferrer&quot;&gt;Lynn Conway&lt;/a&gt;. She originally began her career at IBM and invented pioneering technologies that were eventually used in modern &lt;a href=&quot;https://en.wikipedia.org/wiki/Out-of-order_execution&quot; rel=&quot;noreferrer&quot;&gt;dynamic execution&lt;/a&gt; microarchitectures. After being fired for revealing her intention to transition to a female gender role, she essentially was forced to &quot;reboot&quot; her career from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some years later, at Xerox PARC, she coauthored the &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0201043580&quot; rel=&quot;noreferrer&quot;&gt;seminal textbook on VLSI design&lt;/a&gt; with &lt;a href=&quot;https://en.wikipedia.org/wiki/Carver_Mead&quot; rel=&quot;noreferrer&quot;&gt;Carver Mead&lt;/a&gt;. Many of the design principles from this textbook are still valid today on modern nanometer scale semiconductor fabrication processes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is unfortunate that Lynn Conway was forced to restart her career anew but it perhaps serves as an example of what one might be able to accomplish if one perseveres.&lt;/p&gt;&#xA;" OwnerUserId="1842" LastActivityDate="2017-07-11T03:52:32.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2575" PostTypeId="2" ParentId="2551" CreationDate="2017-07-11T04:45:35.673" Score="3" Body="&lt;p&gt;To kind of back up comments from others, I'll share something that happened to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote an assembler for the 6800 for a software tools class, about 1985 or so. I put lot of work into it, partly because I have a bad habit of trying to do too much, and partly because I had a 6800 protoboard I wanted to be able to write programs for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the TAs for the class was a really cute redhead I had a crush on (which may or may not be relevant). She looked at my completed work and convinced herself it must have been beyond my ability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was not party to the discussion with the prof and the other TA that determined the course of action she took, but the upshot was that she contacted me and arranged to meet me in the lab to ask me questions about my code. She had the listing and I did not. She also asked about the design process and the coding process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was not under pressure about my code, but I was under a different kind of pressure. She was still able to determine to her satisfaction that I had written the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The school did have a policy on doing your own work. That is something your school should develop, and should use your situation to get started with. They also had a policy about the process of investigating infractions, and the prof and she followed it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think my point is that a face-to-face interview, teacher has the source, student does not, can allow the teacher to determine whether or not the student really knows what is there in the way that the author of the code should.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2017-07-11T04:45:35.673" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2576" PostTypeId="2" ParentId="2547" CreationDate="2017-07-11T08:20:50.550" Score="13" Body="&lt;p&gt;I'd also consider &lt;a href=&quot;https://en.wikipedia.org/wiki/Margaret_Hamilton_(scientist)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Margaret Hamilton&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/WbM2L.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/WbM2L.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Aside from the awesome nerdy picture, she has&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;published over 130 papers, proceedings, and reports about&#xA;  the 60 projects and six major programs in which she has been involved.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;She was also awarded the Presidential Medal of Freedom by President Obama for her work on NASA's Apollo missions developing on-board flight software. She had many areas of expertise you could mention her in the context of:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Her areas of expertise include systems design and software development, enterprise and process modelling, development paradigm, formal systems modeling languages, system-oriented objects for systems modelling and development, automated life-cycle environments, methods for maximizing software reliability and reuse, domain analysis, correctness by built-in language properties, open-architecture techniques for robust systems, full life-cycle automation, quality assurance, seamless integration, error detection and recovery techniques, man-machine interface systems, operating systems, end-to-end testing techniques, and life-cycle management techniques.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;However, one thing she did stands out as something you could emphasize, and that was her work on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Universal_Systems_Language&quot; rel=&quot;nofollow noreferrer&quot;&gt;Universal Systems Language&lt;/a&gt;, which used the concept of Development Before the Fact (DBTF). Basically, it was a system to help plan software programs. Since this is something beginner programmers often don't do but should, this sort of idea is the perfect thing to emphasize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She also emphasized making software as reliable as possible:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Dr. Paul Curto, senior technologist who nominated Hamilton for a NASA Space Act Award, called Hamilton's work &quot;the foundation for ultra-reliable software design.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Her work making the Apollo 11 onboard systems as reliable as possible likely saved the mission from failure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She also gave the whole field of software engineering a sense of legitimacy...and a name:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;During this time at MIT, she wanted to give their software &quot;legitimacy&quot;, just like with other engineering disciplines, so that it (and those building it) would be given its due respect; and, as a result she made up the term “software engineering” to distinguish it from other kinds of engineering.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1853" LastEditorUserId="919" LastEditDate="2017-07-16T20:21:30.847" LastActivityDate="2017-07-16T20:21:30.847" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2577" PostTypeId="1" AcceptedAnswerId="2598" CreationDate="2017-07-11T09:05:08.780" Score="4" ViewCount="281" Body="&lt;p&gt;With my informal Coding for Teens group, I like to start each session with a puzzle that we do as a group. My reasoning is that programming is not primarily about semicolons and syntax, but about logical thinking. And logical thinking can be demonstrated and honed with puzzles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far I've used grid puzzles (Alice, Betty, Carol, and Dawn have dates with Roger, Steve, Tim, and Ulmer...), and I'm thinking about using the Towers of Hanoi (obviously that's a one-session puzzle), but I'm wondering if there are other formats that are good for this type of group activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear, I'm not asking for a list of specific puzzles / links. I'm asking for puzzle &lt;em&gt;types&lt;/em&gt;. For instance, if I were asking for puzzle types that hone language and / or lateral thinking, &quot;crossword puzzle&quot; might be a good answer.&lt;/p&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2017-07-11T12:18:33.927" LastActivityDate="2017-07-17T00:15:28.650" Title="Best puzzle type to foster logical thinking" Tags="|best-practice|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2578" PostTypeId="2" ParentId="2551" CreationDate="2017-07-11T11:18:33.597" Score="5" Body="&lt;p&gt;There is another way to approach this sort of problem, but it requires that you have the authority or power to modify the basic structure of the course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually prefer to structure a course in such a way that this sort of problem can't arise. To do this requires that you encourage or even require students to work together, either in pairs or in larger teams. Work is submitted by the team. A naive approach to this won't work, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A weaker proposal is to let students help one another pretty freely, but require that all collaborators be named in any submission. A subtle form of this is to let students collaborate, but not share code. However, you need a strong and well written &lt;em&gt;Code of Conduct&lt;/em&gt; for this to work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue, as I implied in my earlier answer to this question, is that learning must take place. Some problems given to students have a &lt;em&gt;crux&lt;/em&gt; point and seeing it allows the student to have an &lt;em&gt;A Ha&lt;/em&gt; moment that can be very powerful. The &lt;a href=&quot;https://cseducators.stackexchange.com/a/1492/1293&quot;&gt;Dutch National Flag&lt;/a&gt; exercise has such a crux with a key insight that can broaden the education of any student. It is a shame to deny this moment to any student, which is one of the reasons we often require our students to work alone. However, if the student doesn't arrive at the denouement in a timely manner her/his learning may be slowed. And students often panic in the face of deadlines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was much younger and teaching mathematics, I really believed that students should work strictly alone so that they could have such insights. I believed that, even though, at that time it was becoming increasingly common for working mathematicians to work in groups rather than alone. In fact, one of the reasons that I left math for CS is that I was teaching at a place at which there was no opportunity for local collaboration and the synergy it brings. This was before the internet of course (but we had left stone tools behind, thankfully). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a dilemma here, of course. We want each student to learn. We need to permit them to advance. Insight is good and aids this. Getting &quot;stuck&quot; inhibits it. In my view the way to cut the Gordian Knot here is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Teach in such a way that there are more opportunities for &lt;em&gt;a ha&lt;/em&gt; moments.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are many many opportunities, then the fact that student A helps B get through the crux on one such doesn't deny B the opportunity on the next one. There  is evidence in the Pair Programming community (Agile Addicts) that pairing aids synergy, and doesn't leave anyone behind. Different people can contribute different things at different times and all advance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some additional points:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, teamwork is a valuable, even required, skill for most employment. It doesn't come naturally to many any more or less than programming in a functional style (for example) does. It can be taught and needs to be practiced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, knowing who the collaborators are, by design, lets you assign marks fairly. But you should arrange it so that people don't always work with the same partners. Students then learn less about teamwork and you have a harder time knowing who is shining and who needs a bit more polishing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do this sort of thing, it is also useful, perhaps required, that you let the students give some sort of evaluation of their team-mates. Students are reluctant to do this of course, but it can be arranged if you make it positive for them. If you ask &quot;How did your buddy do?&quot; you are likely to not get useful information. However you can do the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students are paired have them fill out an evaluation with two questions&lt;br&gt;&#xA;* What was your partners chief contribution?&lt;br&gt;&#xA;* What was your own chief contribution? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make this a part of every paired assignment. If you have a student who answers &quot;nothing&quot; to the first question you learn something. If you have a student who &lt;em&gt;always&lt;/em&gt; answers this way you learn something else. Both likely require a response from you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In larger groups, have each student fill out a questionnaire at the end with questions like, supposing a group of five, for example,&lt;br&gt;&#xA;* Who were the three most valuable members of your team, possibly including yourself?&lt;br&gt;&#xA;* What was the main contribution of each of the people named above?&lt;br&gt;&#xA;* What was your own main contribution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure the students know about this, including the questions themselves, before the first group assignment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you allow collaboration, as in my &quot;weaker&quot; proposal at the top of this, you can also have collaborators fill out such an evaluation and submit it with the work. It doesn't add much to your work, as such submissions are usually short, but it does give you a better picture of individual progress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An anecdote is instructive. I once had a group of students in a class and one of them seemed to be slacking. He didn't contribute much to discussions and didn't have great responses. However, on a fairly large project, he was the one named by every other member as the key to getting the work done. Since their work was done outside my view, I'd have missed this entirely. He got a big boost, of course, as he had earned it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-11T11:18:33.597" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2579" PostTypeId="2" ParentId="2577" CreationDate="2017-07-11T12:24:20.427" Score="1" Body="&lt;p&gt;There are many forms of &lt;strong&gt;Boolean decision logic&lt;/strong&gt;, so identifying the best type to use for a particular problem would be a useful exercise. When Boolean conditional expressions are combined, they are in families, like:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Similar conditions combined using And &amp;amp; Or (x=7 And y!=3)  &lt;/li&gt;&#xA;&lt;li&gt;Different types of conditions (x=3 And y='george')  &lt;/li&gt;&#xA;&lt;li&gt;Range tests for numbers&lt;/li&gt;&#xA;&lt;li&gt;Equality tests using a Switch/Case&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then you can show &lt;strong&gt;methods to lay out a solution:&lt;/strong&gt; decision tables, decision trees, Karnaugh maps, etc. This provides experience in classifying problems. An example like a high-low guessing game can lead to surprising results: figuring out a number from 1 to 99 in only 6 tries is interesting. Then explain binary search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of the puzzle is to choose among types of solutions, also appropriate tools for analyzing it.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-07-11T12:29:33.467" LastActivityDate="2017-07-11T12:29:33.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2580" PostTypeId="2" ParentId="2547" CreationDate="2017-07-11T12:30:42.103" Score="8" Body="&lt;p&gt;To expand your terms of reference for &quot;people who look like me&quot;, you should definitely include &lt;a href=&quot;https://en.wikipedia.org/wiki/Sophie_Wilson&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sophie Wilson&lt;/a&gt; (born Roger Wilson).  She was one of the major developers of the Acorn Atom, and later designed the instruction set for the ARM1.  Virtually every mobile phone in the world uses ARM devices derived from her work, which makes her pretty damn significant in terms of CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was lucky enough to meet her briefly at the &quot;Beeb@30&quot; event a few years ago. I'm aware that for her, the fact that she transitioned is very much a past event. But for younger trans people, she may provide a figurehead to show that your gender identity does not limit your ability to realise your potential. Ceilingcat's answer below also references Lynn Conway as another similar example.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastEditorUserId="919" LastEditDate="2017-07-16T16:51:07.463" LastActivityDate="2017-07-16T16:51:07.463" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2581" PostTypeId="2" ParentId="2547" CreationDate="2017-07-11T13:18:52.617" Score="24" Body="&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Radia_Perlman&quot; rel=&quot;noreferrer&quot;&gt;Radia Perlman&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;She is most famous for her invention of the spanning-tree protocol (STP) [...]. She also made large contributions to many other areas of network design and standardization, such as link-state protocols, including TRILL, which she invented to correct some of the shortcomings of spanning-trees.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;She also wrote a poem about STP :)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I think that I shall never see&lt;br&gt;&#xA;  A graph more lovely than a tree.&lt;br&gt;&#xA;  A tree whose crucial property&lt;br&gt;&#xA;  Is loop-free connectivity.&lt;br&gt;&#xA;  A tree that must be sure to span&lt;br&gt;&#xA;  So packets can reach every LAN.&lt;br&gt;&#xA;  First, the root must be selected.&lt;br&gt;&#xA;  By ID, it is elected.&lt;br&gt;&#xA;  Least-cost paths from root are traced.&lt;br&gt;&#xA;  In the tree, these paths are placed.&lt;br&gt;&#xA;  A mesh is made by folks like me,&lt;br&gt;&#xA;  Then bridges find a spanning tree.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1869" LastEditorUserId="25" LastEditDate="2017-07-13T16:34:45.927" LastActivityDate="2017-07-13T16:34:45.927" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2582" PostTypeId="2" ParentId="2537" CreationDate="2017-07-11T13:27:07.540" Score="2" Body="&lt;p&gt;Although it is not exactly what you are looking for, here, some of the best students are invited to join a research group even if they are in an early stage in their studies (say 1st year). It is not a program per se, but it is a way to motivate the best students and take some advantage of their knowledge. Most of the time the students are paid. &lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1293" LastEditDate="2017-09-19T11:40:04.743" LastActivityDate="2017-09-19T11:40:04.743" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2583" PostTypeId="1" CreationDate="2017-07-11T13:31:08.750" Score="7" ViewCount="130" Body="&lt;p&gt;We are trying to implement a course where students develop web apps using PHP+AgileUI (no HTML, JavaScript or CSS) with a strong emphasis on &quot;object oriented&quot; approach, designing business logic and reuse of UI components.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to the practical tasks, we are undecided. Should we encourage students to work in teams to achieve project together, or should we make them submit their unique work? Since most of the work is in PHP, there are no design/frontend/backend separation, we have a feeling that some students may &quot;miss out&quot; on some skills if another team-mate implements it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another hand - teamwork is crucial in software design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you recommend - should we design material for teams or individual?&lt;/p&gt;&#xA;" OwnerUserId="1871" LastEditorUserId="2" LastEditDate="2017-07-11T15:16:49.097" LastActivityDate="2017-07-11T15:16:49.097" Title="Working on practical projects as a team - good or bad?" Tags="|best-practice|student-motivation|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2584" PostTypeId="2" ParentId="2583" CreationDate="2017-07-11T14:11:01.707" Score="1" Body="&lt;p&gt;In my experience, group projects are valuable, but in any group of more than 2 people it is almost guaranteed that some students will put in more effort than others. So my recommendation is simply to make 2 person groups.&#xA;There are many things to be learned about coding as a team even with a single teammate, but the work won't be so diluted that students would completely miss out on the key aspects of the course.  &lt;/p&gt;&#xA;" OwnerUserId="1511" LastActivityDate="2017-07-11T14:11:01.707" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2585" PostTypeId="2" ParentId="2583" CreationDate="2017-07-11T14:21:28.650" Score="1" Body="&lt;p&gt;I think it depends on the goals of the course. Does your course have specific objectives for working in a team? Is the primary goal to learn some aspect of programming? I teach a software practicum course where students must collaborate like a real software engineering team using an Agile Development Methodology. All the work they do is shared. Learning to work in a team is an important skill. But if the primary goal of the course is to teach programming fundamentals, web development, game programming, etc., then I would lean toward individual assignments. It's so crucial to practice programming. You can maximize this with individual assignments.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-11T14:21:28.650" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2586" PostTypeId="1" CreationDate="2017-07-11T14:21:48.797" Score="1" ViewCount="194" Body="&lt;p&gt;When I was learning to program I was building a &quot;DVD Rental&quot; application for the kiosk that would store information about disks, who borrowed them and when they had to return them. Having a simple-to-understand task motivated me to build an app and show to the owners of the kiosk.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm assisting a web app programming school with helping to design curriculum and I'd like to include some practical apps into the course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I want students to develop business thinking. New SaaS idea? App to help people. App to help businesses.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I already have some app ideas but I am always looking for more. What was the first app you've built?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Criteria&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Our course is focused on business web apps, so no games.&lt;/li&gt;&#xA;&lt;li&gt;Tasks should be simple to explain and familiar to students (14-18 years old)&lt;/li&gt;&#xA;&lt;li&gt;Real-life application or attempt to solve a problem.&lt;/li&gt;&#xA;&lt;li&gt;Focus on &quot;client requirements&quot; and not &quot;implementation&quot;&lt;/li&gt;&#xA;&lt;li&gt;Simple tasks, limited to 5 data entity types (or tables).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You are welcome to use any of those apps to teach students about data models, databases, relations, UI / persistence. (Note: we use &lt;a href=&quot;https://github.com/atk4/ui&quot; rel=&quot;nofollow noreferrer&quot;&gt;Agile UI&lt;/a&gt; platform)&lt;/p&gt;&#xA;" OwnerUserId="1871" LastEditorUserId="150" LastEditDate="2017-07-11T17:47:27.897" LastActivityDate="2017-07-11T17:47:27.897" Title="Best Training App Ideas" Tags="|project|" AnswerCount="2" CommentCount="5" ClosedDate="2017-07-11T18:11:50.627" ContentLicense="CC BY-SA 3.0" />
  <row Id="2587" PostTypeId="2" ParentId="2586" CreationDate="2017-07-11T14:24:56.137" Score="2" Body="&lt;h2&gt;The Librarian&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Application to help your local library to organise book catalogue and offer students a way to check which books they have checked out from the library.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Who will use this app?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This app will have two interfaces and two user roles. The first role is a &quot;Librarian&quot;, a person who uses a computer inside a library for one of the following tasks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;registering new books and editing number of each book.&lt;/li&gt;&#xA;&lt;li&gt;registering students&lt;/li&gt;&#xA;&lt;li&gt;assigning borrowed books to the students&lt;/li&gt;&#xA;&lt;li&gt;noting down returned books&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The second user role is Student, who have account and password, allowing the following tasks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;see which books you have borrowed and when they are expiring&lt;/li&gt;&#xA;&lt;li&gt;extend borrowed books&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Data Model&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;We need to have the following models:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All the books (includes ISSN, title, author as well as number of copies)&lt;/li&gt;&#xA;&lt;li&gt;Student (student code, password, email)&lt;/li&gt;&#xA;&lt;li&gt;Librarians (librarian code, password, email)&lt;/li&gt;&#xA;&lt;li&gt;&quot;Borrowed book&quot; (record for each borrowed book, date when borrowed, date when book must be returned, link to student and link to a book)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Reports&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;A Librarian should also be able to see several reports:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;List of Student ordered by a number of &quot;Borrowed books&quot; which are Overdue&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1871" LastActivityDate="2017-07-11T14:24:56.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2588" PostTypeId="2" ParentId="2586" CreationDate="2017-07-11T14:29:40.600" Score="2" Body="&lt;h2&gt;Money Lending&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Application to help a single user manage money which he have lent out to his friends. This is a single-user application, so log-in is not required.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Who will use this app?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;A single user will have this app installed on his personal computer. He will open the app every time he lends money to someone. He needs to enter the name of the friend and amount he is lending. Later, he can see a list of friends and amounts. The following tasks should be available:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See a list of Friends and total amount lent.&lt;/li&gt;&#xA;&lt;li&gt;Click on the name of the friend to see when and how much was lent.&lt;/li&gt;&#xA;&lt;li&gt;Lend to a new friend - Enter friends name, amount and date when they must return a loan.&lt;/li&gt;&#xA;&lt;li&gt;Lend more money to the same friend - click on friends name, enter the amount of additional loan and date when they must return.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Data Model&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;We need to have the following models:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Friends (name of the friend, total_lent, total_repaid and total_due)&lt;/li&gt;&#xA;&lt;li&gt;Loans, how much is loaned, and date, due date and how much is repaid.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Reports&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Just a single report:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;List friends who are due to repay loans which they haven't repaid.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1871" LastActivityDate="2017-07-11T14:29:40.600" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2589" PostTypeId="2" ParentId="2583" CreationDate="2017-07-11T14:35:41.377" Score="4" Body="&lt;p&gt;Ultimately it comes down to if the work &lt;b&gt;can be done alone&lt;/b&gt;? The purpose of group work should not be so that everyone has less work to do, but rather if the original work could not be done within the given span by a single person. In the workforce, you're most likely to be working in a team and contribute to iterative releasts (Agile Methodologies). If your expectation is that because you're in a group, you don't have to work as hard compared to working alone, then you are set to fail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion would be to design a project such that bi-weekly or monthly iterations are presented, building up towards the final product. Incorporate Agile Methodologies into this as it is very useful in the workforce and teaches team management / tracking. Groups should be no bigger than 3-4, otherwise it is too big to be efficient. The number of hours required for the project should be big enough that everyone is kept busy. Of course some will do more than others, however one person should not be able to do the entire project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is too heavy for your course, then I'd suggest stick with single person projects as there is no merit to group work.&lt;/p&gt;&#xA;" OwnerUserId="747" LastActivityDate="2017-07-11T14:35:41.377" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2590" PostTypeId="2" ParentId="2577" CreationDate="2017-07-11T14:46:53.630" Score="4" Body="&lt;p&gt;A fun and useful puzzle type is logical operators. Anything and everything that uses logical operators, and the more complex your operator, the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working out how a mysterious logical operator works is a great way to increase, well, &lt;em&gt;logical&lt;/em&gt; thinking. You really have to figure out what's the logical output. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example puzzle would be:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Input: A B C (binary values)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(((A or b) or (not C)) and (C or (not (A and B))))&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then they need to figure out how this thing works. Building a truth table, figuring out tautologies or how one parameter can completely change what the operator does. ( I think C is like that, in the above example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A very, very important skill this teaches is tautologies. Sometimes programming needs to be tautologous. The question of whether the program works should be true for &lt;strong&gt;every&lt;/strong&gt; input which is allowed. While that isn't always possible (practical-wise), striving for bug-free code is, as I see it, a good thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also interesting to show the students how a very simple set of blocks (and,or,not) can be used to construct unbelievably complicated things; and to work out how those things work, the students have to develop logical thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So logical operators overall improve a number of aspects of logical thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(It doesn't add too much, but my personal experience has shown me that puzzles such as these are one of the only things that taught me logical thinking).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-11T14:46:53.630" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2591" PostTypeId="2" ParentId="2537" CreationDate="2017-07-11T16:32:21.103" Score="5" Body="&lt;p&gt;First, I will describe my university's program, and then I will give my thoughts on its efficacy as a participant of this program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My university makes a distinction between the general &quot;University Honors&quot; program and specific &quot;Honors in the Major&quot; programs. Students are invited to the honors program based on particular GPA requirements, which then need to be maintained to remain in the program. You can complete University Honors without completing Honors in the Major (although the latter fulfills the second criterion for the former, which I will elaborate on below), but not the other way around. Honors in the Major has specific requirements for each particular major (although almost always means writing a thesis on some form of undergraduate research), whereas University Honors is standardized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The criteria for fulfilling University Honors are two-fold: First, the student must fulfill 12 semester hours of honors courses. This can be done in several ways: taking specific honors courses/seminars (which are intended to provide a broad, liberal arts education), courses in their major which have been designated as honors, or as you describe, contracting a course to count for honors credit. This entails approaching a professor and agreeing on an honors project to complete by the end of the semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other criteria that must be filled is what is called &quot;experiential learning&quot;. This involves getting &quot;12 semester hours&quot; via doing things like participating in undergraduate research, getting internships, being a TA, etc. It's a fairly extensive list, with each particular experience counting for a different amount according to the duration/time commitment involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, I think the latter portion of this program is much more effective than the first. It incentivizes students to apply themselves beyond immediate academic rewards, a trap that I have noticed many honors students fall into -- obsessing over their GPA at the expense of everything else. The first is relatively trivial -- the requirement can be fulfilled during a single semester, and often is -- and honors courses are not excessively difficult when compared to their regular counterparts at my university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the purpose of an honors program should be aligned more towards the second criterion if the intention is to create exceptional students. If the focus is mostly on courses, you risk trivializing the program (in my case) or burning out your students through excessive work (in your case). I think putting the emphasis on ensuring students apply themselves, rather than just taking more difficult courses, is a better model for developing students personally and professionally.&lt;/p&gt;&#xA;" OwnerUserId="1768" LastActivityDate="2017-07-11T16:32:21.103" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2592" PostTypeId="2" ParentId="451" CreationDate="2017-07-11T16:39:53.353" Score="0" Body="&lt;p&gt;Yes, Recursion is good practice.&lt;br&gt;&#xA;Many problem statements are recursive in essence: the best, most concise, clear and provably correct way to state the problem uses a recursive reference. But a recipe is not the meal, so to speak, and how we solve a problem can be different from how it is stated. It is often necessary to find a way to &lt;em&gt;restate&lt;/em&gt; the problem into iterative terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Induction restates something into a base case, a &quot;case for N&quot; and a statement about how to go to &quot;N + 1&quot;. This is how recursion can be transformed into iteration, usually by identifying &lt;em&gt;invariants&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are all vitally important to being able to analyze and eventually code any inductive or recursive problem. It is necessary to see it in different ways to get at the best solution. So, the &lt;em&gt;practice&lt;/em&gt; makes for a more perfect solution.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-11T16:39:53.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2594" PostTypeId="1" AcceptedAnswerId="2596" CreationDate="2017-07-11T19:26:23.620" Score="8" ViewCount="240" Body="&lt;p&gt;While trying to teach myself the topic of reinforcement learning, I find many sites, books, people and other resources with information about that subject. (I am trying to learn the subject from those resources).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, some resources contradict each other or conflict with one another. While sometimes it's easy to see what isn't correct (when there is a contradiction, there's often one version that's more accurate, for example), sometimes it's not so easy. Then there are times when there are simply different resources for the same topic in the field, and I cannot decide from which it might be better to learn reinforcement learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to be able to judge or evaluate which resources about reinforcement learning could be better &lt;em&gt;to learn from&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware that it's near impossible to say &quot;this is the best one&quot;, but what I'm looking for is a method for choosing the resource from which I can learn the most. This means that in an introduction, resources which go into very fine details are not as good as ones that gives an overview of the subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a way, I'm asking &lt;strong&gt;how can I build a curriculum for myself based entirely on resources that deal with reinforcement learning (books, sites, people etc.) to guide my learning of a subject of which I know very little?&lt;/strong&gt; Judging one resource over another is one of the only things which are making the learning difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is relevant to reinforcement learning specifically because it's a quickly changing field. New practices/techniques and resources are being generated very rapidly. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I can see that the question itself is very long, but that's meant to keep it focused on what my problem really is: some resources are better than others &lt;em&gt;when it comes to&lt;/em&gt; &lt;strong&gt;&lt;em&gt;learning a new subject&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;in a quickly evolving field&lt;/em&gt;...&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-07-23T22:25:18.813" LastActivityDate="2017-07-23T22:25:18.813" Title="Evaluating resources for teaching myself reinforcement learning" Tags="|lesson-ideas|self-learning|artificial-intelligence|reinforcement-learning|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2595" PostTypeId="2" ParentId="2542" CreationDate="2017-07-11T20:13:25.330" Score="1" Body="&lt;p&gt;Here are my answers, from the perspective of an undergraduate majoring in computer science and engineering. The engineering college provides free tutoring 6 days a week from 6pm to 9pm.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are the tutors other students or professionals?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The tutors are all other students.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How are the tutors selected?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The tutors apply and are interviewed. The interview consists of one prepared problem and one unprepared problem, both taken from areas they claim to be able to tutor. They then have to mock tutor their interviewer.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are tutors or sessions supervised formally in any way? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No. Students come in and ask for help in a subject, and tutors assist them. If a tutor has nothing to do, they usually do their own homework.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are tutors paid? If so in what way? (money, academic credit, ...)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes. Tutors make somewhere around \$10 an hour to $15 an hour, depending on subjects, expertise, etc. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the scheduling issues? What works and what does not?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are none that I am aware of.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are the tutors and tutees matched with each other in any specific way?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No -- it's entirely informal. You do not need to sign up for an appointment or anything, you just walk in.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is tutoring one-one or one-many, generally?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It depends on the demand and subject area. Prior to exams or important homework assignments it will usually be one-many. Less common subjects attract fewer students.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does the student need a &quot;ticket&quot; to join, say a recommendation from a prof?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No -- it's open to anyone.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can you get any measure of success?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what is meant by this. University analytics seems to indicate that students who go to tutoring do significantly better than students who do not. Otherwise, attendance is logged, and is usually fairly high -- showing that students clearly think it helps.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do the tutors benefit other than formal pay?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;On off weeks, tutors often get plenty of time to work on their own homework while getting paid. Additionally, if they are part of the honors program, it can count for credit in that regard, and tutoring is a great way to become a TA later (and many of the tutors are also TAs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the way the engineering college has set up this system is an efficient use of resources. It's lamentable that our regular CS program does not have anything of the sort. The CS department maintains a list of approved tutors (anyone can apply online, fill out a form, and be approved as long as they meet a sufficient course grade for the courses they want to tutor). There is no formal training whatsoever and close to no oversight from the university itself. This results in incredibly variable tutoring experiences. Additionally, the system itself is poorly known, and I doubt most students would be willing to pay a private tutor 15-30 dollars an hour to quite possibly get no help other than a brief explanation of the answer to their assignment. Of course, this is speculation on my part, but I think if the computer science department were willing to budget some money to set up a system like the one I've described, it would be a great investment. It would ease the load on TAs and professors (as an aside, I recall prior to one homework deadline in my data structures class, my professor and TA for that class had 30-40 people lined up for an office with four chairs), ostensibly reduce cheating, and improve understanding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, that's just my opinion -- but I have no reason to believe the former model would not work for common computer science courses as well.&lt;/p&gt;&#xA;" OwnerUserId="1768" LastActivityDate="2017-07-11T20:13:25.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2596" PostTypeId="2" ParentId="2594" CreationDate="2017-07-11T21:27:56.250" Score="5" Body="&lt;p&gt;If self-learning is a goal, you don't need to necessarily choose &lt;em&gt;between&lt;/em&gt; resources at all.  I had to self-teach a tremendous amount of material this year, and to do so, I roughly borrowed the methodology from Barry Farber's incredible &lt;em&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1567315437&quot; rel=&quot;noreferrer&quot;&gt;How To Learn Any Language&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea is to grab multiple &lt;em&gt;(quality)&lt;/em&gt; resources of different kinds, and begin to work through &lt;em&gt;all&lt;/em&gt; of them.  Do a little bit of each one every day, and make all of these activities as active as possible.  (For instance, create flashcards of concepts you want to review.  While reading physical books, don't be afraid to &lt;em&gt;underline&lt;/em&gt; things you don't understand and revisit older underlines.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every content creator attempts to get at the material in a way that they feel emphasizes what is most important. This means that you end up learning multiple central conceits, and you develop a deep and capable understanding relatively quickly. If you find yourself getting stuck on one source, do your underlining, and move on to the next one.  The next day, you can revisit the first source with the new understandings that you have gained from the other resources, and thereby continue to progress.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-11T21:27:56.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2597" PostTypeId="2" ParentId="2594" CreationDate="2017-07-11T22:56:56.777" Score="4" Body="&lt;p&gt;As a self-learner you have the extra burdens of resource selection and course design. You can lighten the load by sharing in the work of others. Find universities doing courses and research in the subject and review their course materials and source selections. For the cutting edge things, find papers that have been subjected to peer review, and are sufficiently current to maintain their relevance  to current methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I support open data and open science, this may be a case where you need to access the material behind a pay-wall, and the expense might be justified.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, after all methods have failed to help you select the best resources you might have simply attempt to implement the different suggestions and evaluate them for correctness, completeness and relevance to your situation.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-11T22:56:56.777" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2598" PostTypeId="2" ParentId="2577" CreationDate="2017-07-11T23:25:53.203" Score="1" Body="&lt;p&gt;&lt;strong&gt;There are a &lt;em&gt;wealth&lt;/em&gt; of various puzzle types.&lt;/strong&gt;  Most great puzzles are rooted in discrete mathematics of some sort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will name both classic puzzles and more recent puzzles; in some cases I will provide specific links as not all good puzzles have been around long enough to have multiple forms/generic names, but I am not affiliated with any puzzle creators.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Good puzzles can foster thinking in the following areas and many others:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Combinatorics&lt;/li&gt;&#xA;&lt;li&gt;Graph Theory&lt;/li&gt;&#xA;&lt;li&gt;Topology&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But more to the point, &lt;em&gt;some&lt;/em&gt; puzzles are tricky to analyze and give birth to entirely &lt;em&gt;new&lt;/em&gt; fields of study.  The history of Graph Theory is an interesting example, as a puzzle (Seven Bridges of Königsberg) really prompted the entire subject.  So looking at fields of math to find interesting puzzles is, in a way, backwards.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Block sliding puzzles, such as &quot;Rush Hour&quot; (the most popular name) or &quot;Unblock Me&quot; (a free mobile app version).  This puzzle has even been the subject of CS studies such as &lt;a href=&quot;http://www.ulb.ac.be/di/algo/secollet/papers/crs06.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;computing the &lt;em&gt;hardest&lt;/em&gt; Rush Hour puzzle&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Block sliding puzzles with numbers or pictures (like the &quot;Tile Game&quot; in the Mac OS &quot;Dashboard&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Drawing puzzles that involve drawing a figure without lifting the pencil or retracing one's path, much like the Seven Bridges of Königsberg as mentioned above.  &quot;One Touch Draw&quot; is a good mobile app execution of the idea, which adds its own twists in later puzzles (one-way paths and other aspects).  There are ways to analyze such puzzles for easy victory, and the &lt;em&gt;student&lt;/em&gt; has to develop them.&lt;/li&gt;&#xA;&lt;li&gt;Towers of Hanoi, as you already mentioned.&lt;/li&gt;&#xA;&lt;li&gt;&quot;Free the string&quot; type puzzles—this may not relate very well to programming, but it is certainly interesting from a topological standpoint.  They definitely require logical thought.&lt;/li&gt;&#xA;&lt;li&gt;Sudoku.  The logical methods of attack possible on Sudoku games are &lt;em&gt;quite&lt;/em&gt; intricate.  Good CS students should be capable of developing many of the attacks themselves with no prompting or teaching.&lt;/li&gt;&#xA;&lt;li&gt;A game I can't find the name for, played on a rectangular grid of squares (of whatever size) with a number above each column and beside each row, where you must draw an orthogonal (taxicab geometry) path across the squares from the top left corner to the bottom right, in such a way that the number of squares touched in each column/row matches the number above/beside that column/row.&lt;/li&gt;&#xA;&lt;li&gt;There are two puzzle apps made by Pyrosphere that are (so far as I know) original, and quite unique &lt;em&gt;and&lt;/em&gt; simple, and are &lt;em&gt;excellent&lt;/em&gt; for logical thought.  (Similar to Sudoku in the logical attacks possible, but they have not been analyzed in books so you must develop your &lt;em&gt;own&lt;/em&gt; analysis.)  One is &lt;a href=&quot;http://pyrosphere.net/lazors/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lazors&lt;/a&gt;; the other is &lt;a href=&quot;http://pyrosphere.net/weaver/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Weaver&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&quot;How many triangles in this diagram?&quot;-type puzzles.  These are great for demanding a clear sequential approach as you &lt;em&gt;can't&lt;/em&gt; accurately count the triangles otherwise.*&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Then there are other not-quite-puzzles that don't really &lt;em&gt;require&lt;/em&gt; intense logical thought to do, but which are &lt;em&gt;great&lt;/em&gt; for logical analysis.  Games like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Checkers (of course)&lt;/li&gt;&#xA;&lt;li&gt;Set (card game)&lt;/li&gt;&#xA;&lt;li&gt;Spot It (card game) - there's a &lt;a href=&quot;https://stackoverflow.com/q/6240113/5419599&quot;&gt;post on SO about the math behind this game&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm sure I've left out an awful lot of them.  I collect such things; this is just off the top of my head.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;*A great joke I read elsewhere on Stack Exchange: How many legs does a cow have?  Twelve: Two on the right, two on the left, two in front, two in the back, and one at each corner.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="1103" LastEditorUserId="1103" LastEditDate="2017-07-11T23:31:46.097" LastActivityDate="2017-07-11T23:31:46.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2599" PostTypeId="2" ParentId="1126" CreationDate="2017-07-12T00:00:06.597" Score="4" Body="&lt;h2&gt;First, tell them that it happens.&lt;/h2&gt;&#xA;&lt;p&gt;I can tell you I have had one awkward conversation with someone on stack exchange in chat in terms of nerdy interests and gender; thankfully someone I know (from SE) stepped in and helped me out. And that was a minimally offensive sort of conversation.&lt;/p&gt;&#xA;&lt;p&gt;Letting your students know that they are not alone is a good first step, and will encourage them to reach out to others who probably have had similar experiences. Just talking about it, and not feeling like maybe it &lt;em&gt;is&lt;/em&gt; just you is important.&lt;/p&gt;&#xA;&lt;h1&gt;Second, tell them that it's not right.&lt;/h1&gt;&#xA;&lt;p&gt;Reassure them that what's happening isn't because of them. There's people out there that for some reason (background, personal belief, whatever) are of the mindset that gender (or age, race, etc) does play a role in ability in certain fields.&lt;/p&gt;&#xA;&lt;h1&gt;Solutions&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Tell them about role models - people who have experienced it, but pushed through. Think the movie/book Hidden Figures, or colleagues of yours, or even you yourself.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them  people to contact (like yourself, or other students) that are role models or who have gone through it.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Encourage them to not care what other people think. They chose to go into computer science for a reason - because they enjoy it, probably. Don't let other people stop you from doing what you love. Of course, this doesn't mean that words or actions aren't painful - it's to encourage them to push through that and just do what they've trained to do.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them ways to respond, i.e., going to HR/management/something within the company, documenting it, things to say, etc.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Tell them that they are part of the group that's working toward stopping it. Get them angry, and ready to do something about it if they encounter it, not just blow it off&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Seek a good environment. With so many companies needing programmers, they can pick the good ones.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-12T00:00:06.597" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2601" PostTypeId="2" ParentId="2551" CreationDate="2017-07-12T06:01:51.893" Score="-1" Body="&lt;p&gt;&lt;em&gt;Note: This answer specifically applies to programming-based assignments&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a student, and I'd just like to add my opinion here. We're taught programming in school using &lt;strong&gt;Turbo C++&lt;/strong&gt;. Yeah. That ancient compiler which hasn't been updated in &lt;em&gt;decades&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Needless to say, when we search for help and find samples of code on the internet, most of the code doesn't even compile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to add to that, our teachers... Aren't always able to teach very well, due to time constraints or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I happen to be one of the the best students in class, and often my classmates will ask me to help them out. Whenever possible I'll take a look at their code and point out mistakes, but that's tough to do with a few dozen students in the class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So sometimes I'll leave my code up and let the students take reference from it, but ask them to write the code themselves. Sure, there are a few kids who just straight up copy it, but I feel that the number of students &lt;strike&gt;benefiting&lt;/strike&gt; learning from it outweighs that.&lt;/p&gt;&#xA;" OwnerUserId="1912" LastEditorUserId="1912" LastEditDate="2017-07-12T10:20:13.027" LastActivityDate="2017-07-12T10:20:13.027" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2602" PostTypeId="1" CreationDate="2017-07-12T10:34:25.223" Score="11" ViewCount="953" Body="&lt;p&gt;I am aware of some teachers that own or collaborate with IT companies, so sometimes the assignments that they provide, to the students, are supposed to solve a specific problem that the company may have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I believe that it is always better to solve a real problem, than to use the same old training problems, is this ethical? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that, probably, the schools have their own intellectual property rules, but who should be the owner of the code? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can a teacher use the code freely? Can the student use the code freely? What is your experience on this?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="204" LastEditDate="2017-07-12T16:23:36.693" LastActivityDate="2017-10-17T09:55:29.280" Title="Who should own the intellectual property on a program developed in classes?" Tags="|best-practice|ethics|intellectual-property|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2603" PostTypeId="2" ParentId="2602" CreationDate="2017-07-12T12:02:41.823" Score="5" Body="&lt;p&gt;Who &lt;em&gt;should&lt;/em&gt; and who &lt;em&gt;does&lt;/em&gt; are often different. There are laws and contracts to consider as well as &quot;common law.&quot; In my own view, forcing a faculty member to give up all rights to the intellectual property (IP) that he/she develops is just &lt;em&gt;wrong&lt;/em&gt;. However the law is the law. Contracts intervene. A program developed in a class for a client is normally done under contract and the client likely owns everything. But you know this going in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a faculty member can't, morally at least, appropriate a student's work unless contracts are in place. Faculty member should, of course, give proper attribution for anything used and also seek permission if there is something useful to be reused. I don't think it is wise for a professor to assume otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possibly useful suggestion is to ask the students at the beginning of a term to agree that code they write is done so under GPL or similar license. But it needs to be agreed to. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, though, &quot;if you create it, you own it&quot;. That is probably not universal, but widely held. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In situations in which contract or the law &lt;em&gt;do&lt;/em&gt; give faculty rights to IP created by students everyone is better served, I think, if the faculty member still respects the more general rights of the student. Just because you &lt;em&gt;can&lt;/em&gt; appropriate someone else's work doesn't imply that you &lt;em&gt;should&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if the professor provides the question and guidance in the solution, he/she may have some IP rights to the product. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it is worth, companies also appropriate the work of employees, but under contract. That is mostly well justified and needed, but there are some variations on it that are also immoral in my view. Preventing a researcher from ever working on the same problems after employment ends should not be allowed in a contract and such should be struck down. But, then, I'm not a lawyer or judge. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Beyond the narrow question it is possible to think &quot;outside the box.&quot; If a faculty member normally publishes work on a website he/she can, with the student's permission, publish a student's work under the student's name. This gives the student some visibility and adds a bit of the professor's reputation to that of the student, providing a boost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also heard of situations in which a student and prof go into business together based on joint work. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-12T12:25:42.023" LastActivityDate="2017-07-12T12:25:42.023" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2604" PostTypeId="2" ParentId="2551" CreationDate="2017-07-12T12:25:00.277" Score="2" Body="&lt;p&gt;I've been on the end that my work was copied. Or rather, I sent my solution to a classmate (as I needed help with a bug), discussed it, and later found out that another classmate had &lt;em&gt;exactly&lt;/em&gt; the same code as I sent to the first classmate, with the same comments, bugs and variable names (which, knowing me and my bad naming standards/hygiene at the time, would definitely have called out that it was not his code) and all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I am happy that I was not punished, I believe that the teacher should at least have talked with me about it. As it was now, I had to deal with &quot;should I call out on my friend(s)?&quot;, &quot;Do I dare tell the teacher that I let both of them copy my code?&quot;, &quot;If I call out on the second guy, what will happen with the first that I asked for help?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice: Talk to the student, the very least. It'll save them a lot of stress. I would only annul all the works if you believe that the copying is widespread.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should mention though that we was encouraged to help each other, so that I asked the first guy for help was not strange. What was as bit on the line was the fact that I &lt;em&gt;sent&lt;/em&gt; him the entirety of my code. If that's the case with your students, then I would really advice NOT to annul all the works. It make them much less prone to help each other in the future, and it would just create harsh feelings.&lt;/p&gt;&#xA;" OwnerUserId="1923" LastActivityDate="2017-07-12T12:25:00.277" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2605" PostTypeId="2" ParentId="2602" CreationDate="2017-07-12T12:34:41.003" Score="3" Body="&lt;p&gt;In the software practicum that I teach, students develop new software for a real customer. My school has a standard software license agreement that the students, customer, and I &lt;strong&gt;must&lt;/strong&gt; sign at the start of the semester. The agreement basically gives ownership to everyone involved. The software becomes, in a sense, open source. The agreement has two separate clauses. One gives more &quot;ownership&quot; to the customer. There is some flexibility; one past customer worked with the university to modify the agreement. Also, students could hire their own lawyers to represent them. But I have yet to see that happen.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-12T12:34:41.003" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2606" PostTypeId="2" ParentId="706" CreationDate="2017-07-12T14:14:01.087" Score="0" Body="&lt;p&gt;I'm late to the discussion, but here are two reasons against copying and pasting code:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I believe something is lost when you simply copy and paste code. They say that to learn a definition of a word, you read it, say it, and write it. So I think typing code definitely adds value, especially when IDEs like Eclipse have autocomplete and syntax checking. Typing is a learning experience.&lt;/li&gt;&#xA;&lt;li&gt;Unless you are copying from a raw format, copy and paste could bring in invalid characters. For example, try copy and pasting &lt;em&gt;&quot;hello world&quot;&lt;/em&gt; from Microsoft Word to your favorite code editor. You'll see invalid double-quote characters pasted.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-12T14:14:01.087" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2607" PostTypeId="2" ParentId="2602" CreationDate="2017-07-12T14:57:10.483" Score="3" Body="&lt;p&gt;The 'best' approach is debatable, but you could argue that the easiest approach is to use a &lt;a href=&quot;https://en.wikipedia.org/wiki/Permissive_software_licence&quot; rel=&quot;nofollow noreferrer&quot;&gt;permissive license&lt;/a&gt; which places few restrictions on who can use the code and what they can do with it. Commercial organisations may have preferences for the particular license you chose, and may be concerned about any obligations that the licence places on them or their future (potentially revenue generating) use of the code. GPL for example is more restrictive about the licensing of derivative works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Doing nothing (in the absence of any underlying agreements) is unlikely to make the code free-for-all, generally copyright remains with the student (and any other contributors).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A proprietary licence might be acceptable if the project is sufficiently interesting, but is legally more complex to draft.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless of the approach you take, you might want to make sure that if your license affects the student's default rights as the creator of the work, then they are in a position to agree to grant the new license. This in itself ought to be part of the syllabus you're teaching.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-07-12T14:57:10.483" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2608" PostTypeId="2" ParentId="2547" CreationDate="2017-07-12T15:02:25.327" Score="4" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Joanna_Rutkowska&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Joanna Rutkowska&lt;/strong&gt;&lt;/a&gt; is a Polish security expert. She created a &quot;blue pill&quot; attack and explained it at the Black Hat Briefings conference in Las Vegas, and also worked with another programmer on Qubes OS, a security oriented desktop Xen distribution. She would be relevant to a discussion of computer security and making ones' programs secure (sanitizing inputs, etc). She's also a more current figure than most people listed already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a nice resource listing others see &lt;em&gt;Female innovators at work&lt;/em&gt; by Danielle Newnham from Apress 2016, in which she presents 20 living women on top of technology. For my classes I always look for diversity of women to present (age, race, tech field, alive/historical, etc) in order to help dismantle the monolithic gender view.&lt;/p&gt;&#xA;" OwnerUserId="1927" LastEditorUserId="919" LastEditDate="2017-07-16T16:42:43.543" LastActivityDate="2017-07-16T16:42:43.543" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2609" PostTypeId="2" ParentId="2602" CreationDate="2017-07-12T16:20:35.023" Score="-1" Body="&lt;p&gt;The lawyers of most organisations, write the contracts as if they are about property rights, and to protect their own rights. The organisation does not want to loose their own property rights.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However software is not like apples: If I have an apple, and you have an apple, and then we swap apples, then we both have one apple. If I have a program, and you have a program, and we both give each other a copy of the program, then we both have two programs. The programs have not diminished. Therefore to give one person rights we do not have to take them away form another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore with software there is no need to deprive others, for you to have a right over it. (software/music/etc is not property.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best way to do this, and protect the students is to allow the pupil to keep her/his copyright, and only giving copyright to the school, with a clause that they can not re-licence (This only gives the school power to prosecute infringement, but not to abuse their power. The pupil could not be prosecuted, as it is impossible for them to infringe the copyright, as they are a full copyright holder. You will need to see a lawyer for advice on this. Or better to talk to the FSF).&#xA;And then to use the GPL licence (a copyleft licence). Other licences, including the MIT licences (that are permissive), but &lt;strong&gt;especially proprietary licences&lt;/strong&gt; can abuse the power that the school (or anyone else) has over the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This imbalance of power, may also invalidate any contract that you may think you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that a permissive licence is just as bad in this situation, as it can use this permission to take advantage; &#xA;It would allow the school to create proprietary derivatives, of the pupils work. As the school may be in a better position to sell the software, this may not be fair.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where as a copyleft licence such as the GPL, makes it much harder to take advantage of the author.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any work that is licensed under the GPL gives &lt;strong&gt;anyone&lt;/strong&gt; that has a copy of the program the following freedoms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The freedom to run the program as you wish, for any purpose (freedom 0).&lt;/li&gt;&#xA;&lt;li&gt;The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.&lt;/li&gt;&#xA;&lt;li&gt;The freedom to redistribute copies so you can help your neighbor (freedom 2).&lt;/li&gt;&#xA;&lt;li&gt;The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;However there freedoms are immutable, no one can, legally, distribute it without also giving these freedoms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;\begin{array}{|l|l|l|}&#xA;\hline&#xA;&amp;amp; Student\  has\ copyright &amp;amp; Student\ does\ not\ have\ copyright \\&#xA;\hline&#xA;Propratory  &amp;amp; Student\ can\ use,\ modify,\ distribute. &amp;amp; \\                                                                           &#xA;\hline&#xA;GPL         &amp;amp; Anyone\ can\ use,\ modify,\ distribute. &amp;amp; Anyone\ can\ use,\ modify,\ distribute. \\&#xA;\hline&#xA;Permissive&amp;amp; Anyone\ can\ use,\ modify,\ distribute. &amp;amp; Anyone\ can\ use,\ modify,\ distribute. \\&#xA;\hline&#xA;\end{array}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;\begin{array}{|l|l|l|}&#xA;\hline&#xA;&amp;amp; Student\  has\ copyright &amp;amp; Student\ does\ not\ have\ copyright \\&#xA;\hline&#xA;Propratory  &amp;amp; Student\ can\ fork\ and\ change\ licence. &amp;amp; \\                                                                           &#xA;\hline&#xA;GPL         &amp;amp; Student\ can\ fork\ and\ change\ licence. &amp;amp; \\&#xA;\hline&#xA;Permissive&amp;amp; Anyone\ can\ fork\ and\ change\ licence. &amp;amp; Anyone\ can\ fork\ and\ change\ licence. \\&#xA;\hline&#xA;\end{array}&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-17T09:55:29.280" LastActivityDate="2017-10-17T09:55:29.280" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2610" PostTypeId="1" AcceptedAnswerId="2611" CreationDate="2017-07-12T19:30:02.810" Score="4" ViewCount="171" Body="&lt;p&gt;I know where to find &lt;a href=&quot;https://nsf.gov/statistics/2016/nsb20161/#/figures&quot; rel=&quot;noreferrer&quot;&gt;the percentage of CS bachelor's degrees going to women in the US (Figure 2-16)&lt;/a&gt; and &lt;a href=&quot;http://cra.org/crn/wp-content/uploads/sites/7/2017/05/2016-Taulbee-Survey.pdf&quot; rel=&quot;noreferrer&quot;&gt;the percentage of CS bachelor's degrees going to people of different ethnicities at research universities in the US and Canada participating in the Taulbee Survey (Table B-3)&lt;/a&gt;. Where, if anywhere, can I find the percentage of bachelor's degree in CS, ideally over time, broken down by both ethnicity and gender?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-14T22:46:17.067" Title="Where can I find a breakdown by race and gender of US CS bachelor's degrees?" Tags="|equity|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2611" PostTypeId="2" ParentId="2610" CreationDate="2017-07-12T19:34:52.843" Score="2" Body="&lt;p&gt;Two possible sources are&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Statistical_Abstract_of_the_United_States&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Statistical Abstract of the United States&lt;/a&gt; (SAUS) &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;a href=&quot;https://datausa.io/profile/cip/110701/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Data USA&lt;/a&gt; website. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Unfortunately SAUS went dark in 2012 but back additions can be found at the &lt;a href=&quot;https://www.census.gov/library/publications/time-series/statistical_abstracts.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Census Bureau&lt;/a&gt;. The latest numbers are old, but not yet irrelevant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry that this is just links, but I don't know what else to say. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T09:29:35.573" LastActivityDate="2017-07-13T09:29:35.573" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2612" PostTypeId="1" CreationDate="2017-07-12T21:22:01.887" Score="12" ViewCount="12331" Body="&lt;p&gt;I will have my new incoming CS freshmen (HS) for a week-long summer orientation in August. The kids don't know each other yet, so Ice Breakers are in order! Has anyone encountered fun, physical CS-themed games for helping kids to loosen up and get to know one another?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Criteria:&lt;/em&gt; the students are not required to come in with &lt;em&gt;any&lt;/em&gt; background, though they will be learning some very basic programming concepts over the course of the week that we see them.  Ideal games would either directly expose kids (in a non-technical way) to CS concepts, or could be referenced later (days, weeks, months, or years) in lessons to help explain concepts down the line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answers where you have direct experience with the game (and can vouch that it is fun!) are doubly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-13T02:37:40.070" LastActivityDate="2022-08-22T18:49:14.097" Title="CS-oriented Ice-Breaker Games" Tags="|active-learning|" AnswerCount="10" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2613" PostTypeId="2" ParentId="2610" CreationDate="2017-07-12T21:27:49.927" Score="5" Body="&lt;p&gt;the Taulbee report &lt;a href=&quot;http://cra.org/wp-content/uploads/2015/01/Data-Trends-Women-in-Computing-Sloan.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;An-In Depth Examination of Data and &#xA;Trends Regarding Women in Computing&lt;/a&gt; provides summary data on computing degrees by ethnicity &amp;amp; gender for 2013 in Table 2 on pg 20 and cites the &lt;a href=&quot;https://en.wikipedia.org/wiki/Integrated_Postsecondary_Education_Data_System&quot; rel=&quot;nofollow noreferrer&quot;&gt;Integrated Postsecondary Education Data System (IPEDS)&lt;/a&gt; as their data source. You can either filter through their data online or download it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Data are available starting with the 1980-81 collection year for the Complete data files and Custom data files functions, which zip the data into comma separated value (*csv). Beginning with the 2010-11 collection year, data for each collection year are compiled into an Access database.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Some tips for using their online data statistics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Try using the 'Statistical Tables' option on the 'Use the Data' page&lt;/li&gt;&#xA;&lt;li&gt;When select institutions, if you select 'By variables', there's an entry called 'Completions' which has an option for reporting 'Number of students receiving awards/degrees, by race/ethnicity and gender'&lt;/li&gt;&#xA;&lt;li&gt;After that, select the specific gender/ethnicity info you're filtering for &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditDate="2017-07-14T02:10:13.107" LastActivityDate="2017-07-14T02:10:13.107" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2614" PostTypeId="2" ParentId="2612" CreationDate="2017-07-12T21:44:46.820" Score="9" Body="&lt;p&gt;David Levine and a few colleagues at St Bonaventure developed what is called the &lt;a href=&quot;http://www.cs.sbu.edu/dlevine/RolePlay/roleplay.html&quot; rel=&quot;noreferrer&quot;&gt;First Day Role Play&lt;/a&gt; that sounds like what you want provided that your course will have OOP elements. They have a paper on it in the ACM Digital Library, I believe. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a large movement in &lt;a href=&quot;https://www.cs.cmu.edu/~CompThink/&quot; rel=&quot;noreferrer&quot;&gt;Computational Thinking&lt;/a&gt; that is directed mostly at youngsters to help them think computationally without programming. Some of their activities might be useful to you. &lt;a href=&quot;https://www.cs.cmu.edu/~CompThink/&quot; rel=&quot;noreferrer&quot;&gt;https://www.cs.cmu.edu/~CompThink/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The song/poem &lt;a href=&quot;https://cseducators.stackexchange.com/a/1271/1293&quot;&gt;There was an old lady who swallowed a fly&lt;/a&gt; mentioned in the recursion analogy page is another possibility. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-12T21:44:46.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2615" PostTypeId="2" ParentId="2612" CreationDate="2017-07-12T22:02:07.833" Score="14" Body="&lt;p&gt;Get them to line up (preferably on a wooden gym bench), then get then ask them to get into alphabetical order. You can use this to help learn names, and to introduce sorting algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could also recommend &lt;a href=&quot;http://csunplugged.org&quot; rel=&quot;noreferrer&quot;&gt;CS-unplugged&lt;/a&gt;, it is part of the computational thinking, so aimed at very young pupils (primary school &amp;lt; age 11years old), but can also be used with older students.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="150" LastEditDate="2017-07-19T12:24:53.147" LastActivityDate="2017-07-19T12:24:53.147" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2617" PostTypeId="2" ParentId="451" CreationDate="2017-07-13T00:28:56.977" Score="4" Body="&lt;p&gt;An introductory programming class is a good place to familiarize students with some real-world issues in programming apart from the more popular ones. Using recursion is just one example of how they might address them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming for the long haul (whether it's for production or to support one's own research, for example) is not always about obtaining the best performance in terms of computer resource use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recursion is just one example of how to overcome a programming obstacle in order to satisfy an immediate objective. In cases where the most intuitive understanding of a problem is in terms of recursion, then there are reasons to use recursion:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Software maintainability requires writing code that can be understood by follow-on developers. Recursion may represent the easiest formulation that makes that piece of software understandable so that it can be maintained at some later date.&lt;/li&gt;&#xA;&lt;li&gt;Even if you know there is a more resource efficient way to do something, there might not be time to implement it to completion and still meet the immediate needs of a project. Recursion might be an expeditious way to move forward.&lt;/li&gt;&#xA;&lt;li&gt;There may be bigger coding challenges in other areas, and spending time optimizing now when it can be done later might result in these bigger problems being completely missed, causing serious consequences.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So recursion becomes another tool that helps a programmer get where he needs to be in terms of function and maintainability. Once those two factors have been addressed, then, if time and budget permits, then the software can be optimized in other areas (hopefully why still being functional AND maintainable).&lt;/p&gt;&#xA;" OwnerUserId="1945" LastActivityDate="2017-07-13T00:28:56.977" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2618" PostTypeId="2" ParentId="2551" CreationDate="2017-07-13T09:58:58.243" Score="2" Body="&lt;p&gt;As mentioned, there are likely institutional guidelines for students handing in duplicated work. In my university this typically led to both students drawing the short straw (and as a result it nearly never happened).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming the work is clearly not made independent, and you are not worried that the work may have been copied due to a weakness in the security of the university (and its way of working), then both parties are likely involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I would recommend you to be strict and simply both give them zero points. &#xA;If one of the students has been unjustly treated he will likely complain. If a he can indeed indicate how he was not at fault you can always become more lenient (and moving in the reverse direction is likely not something you want to do).&lt;/p&gt;&#xA;" OwnerUserId="1951" LastActivityDate="2017-07-13T09:58:58.243" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2619" PostTypeId="5" CreationDate="2017-07-13T10:46:10.657" Score="0" Body="&lt;p&gt;In an &lt;a href=&quot;https://en.wikipedia.org/wiki/Active_learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Active Learning&lt;/a&gt; situation a student isn't a passive consumer of lecture materials. The student participates in some way such as playing an educational game, or working in a small group to formulate questions for the instructor. Student research on course topics is another example. Student writing (rather than reading), for example, can be used to help the student &quot;construct&quot; ideas and leads to positive outcomes. Active Learning is an outgrowth of &lt;a href=&quot;https://en.wikipedia.org/wiki/Constructivism_(philosophy_of_education)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Constructivism&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T11:57:20.377" LastActivityDate="2017-07-13T11:57:20.377" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2620" PostTypeId="4" CreationDate="2017-07-13T10:46:10.657" Score="0" Body="Active Learning concerns educational activities in which the student takes a participatory role in the process. Active Learning may include educational games, discussion groups, writing, teamwork, and the like. It grows out of a Constructivist view of education. Questions here might involve how to achieve active learning and tools to facilitate it. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T11:56:59.063" LastActivityDate="2017-07-13T11:56:59.063" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2621" PostTypeId="2" ParentId="908" CreationDate="2017-07-13T12:02:29.030" Score="7" Body="&lt;p&gt;I'll assume that you mean a first programming course that uses a language (Java...) that has well integrated testing tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you just use unit testing as an add-on then I'd guess the proper answer is no. There are other things the student could be doing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you are willing and able to modify your teaching a bit then unit testing can be a big win. I've used it in teaching introductory programming to adults for years (since back when Extreme Programming was young). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do two things. First, I give out assignments differently at the beginning. Rather than giving students a narrative to describe a programming exercise or project, in which they must first decompose the description into tasks, I give them the task list itself. In Agile Programming language, I give them a small product backlog or story-card deck. The tasks are numbered in a logical (do this first) order so that when the backlog is completed the project is done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I'm using a bit more than just unit testing. Other &quot;personal&quot; agile programming practices are employed, including pair programming. I also act at the student's Customer, answering questions as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second thing I do: On the first day of class I do a demo project in public. I start with a small number of &quot;stories&quot;; tasks that decompose a simple project. I pick out a student (volunteer or other) and we pair program on a laptop connected to a projector so all can watch. I start out as the &quot;driver&quot; with control of the keyboard and my student is the &quot;navigator&quot;. He or she may know nothing of programming, or very little. We look at the first story, discuss it a bit to get a &quot;picture&quot;/analogy/metaphor. I then fire up Eclipse, start a new project add JUnit to the project and write a test for just that one card. It fails of course. So then we (my nav and I) write app code to make that test pass. Repeat. At some  point we switch roles and the student becomes driver and I act as a very helpful navigator. If the class isn't too large you can also open &quot;navigation&quot; (comments, questions,...) to the class as a whole, to get them used to the process of aiding the driver. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along the way I discuss what we are doing at each step (go &quot;meta&quot;). This can take up much of the period, but if you have enough time you can distribute the code you've done to the class. They can pair and work on the next story as you wander about giving help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, they see unit testing and pair programming and build on the test-first philosophy in an integrated way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing, that works well with this is that, when you assign them a project, you can give out a unit test suite along with the product backlog. In other words, you write the unit tests and they make them pass. The down side of this, however, is that the tests contain identifiers from the app (class and method names for example). In the big picture, the test suite is your low-level design space where you decide on such things. If you write a test for the &quot;increment&quot; method, you will normally do it before you even have a stub for the method. In writing the tests you discover the name as well as the args it should have and its return type. If you give the tests initially you have already done this step and so need to teach it a bit later. Maybe by the 3rd exercise. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-13T12:02:29.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2622" PostTypeId="2" ParentId="2612" CreationDate="2017-07-13T15:16:55.913" Score="7" Body="&lt;p&gt;A fun exercise is giving the teacher directions to, say, get to and open the classroom door. Of course, the teacher must act like a computer. My engineering teacher did this and it was rather entertaining because one kid forgot to tell him to stop at one point. Another fun exercise in this vein involves having the students tell you how to make a PB&amp;amp;J. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another cool thing is having them play with a robot or major project past years have done - that excites people, even if it isn't super CS related, and provides them with a taste of the awesomeness of your class =)&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-13T15:16:55.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2623" PostTypeId="2" ParentId="400" CreationDate="2017-07-13T15:59:45.977" Score="2" Body="&lt;p&gt;&lt;strong&gt;The best way to learn is by doing.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have heard of teachers developing a bit of code as a class to the point where something is working properly for everyone, then deliberately breaking something and running a light obfuscation tool on it. Then the students are tasked with reading through code without comments and with meaningless variable names, trying to fix it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another alternative is to show two short code snippets in class, one with descriptive names and one with non-descriptive names and ask the class to determine the output of each, one after the other. Time how long it takes for at least half the class to find an answer and then (in most cases) they will see it takes much longer when you have to decipher non-standard code. I remember learning pointers in C in this way.&lt;/p&gt;&#xA;" OwnerUserId="1512" LastActivityDate="2017-07-13T15:59:45.977" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2624" PostTypeId="2" ParentId="1126" CreationDate="2017-07-13T16:38:32.207" Score="5" Body="&lt;p&gt;Another suggestion in addition to the many great suggestions provided above would be to &lt;em&gt;encourage them to define where their line is in terms of what they feel is unacceptable behavior&lt;/em&gt;. Ask them to think about how they would respond to grey-area discrimination (e.g. a supervisor hasn't said anything discriminatory about women/POC but appears to go out of their way to avoid giving them challenging/interesting tasks or responsibility/autonomy). Encourage them to not just sit and worry, but to be proactive and prepared. Doing so can increase confidence in these situations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also encourage them to put themselves in &quot;role model positions&quot; for younger women and people of color. When I was in university I worked on our local science fair committee as a project mentor in software engineering and electronics. I made connections with high school girls who were passionate about science. In doing so I unintentionally gave myself more purpose to succeed and be successful in science so I could help conquer that bias for them.&lt;/p&gt;&#xA;" OwnerUserId="1512" LastActivityDate="2017-07-13T16:38:32.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2625" PostTypeId="5" CreationDate="2017-07-13T18:11:50.853" Score="0" Body="&lt;p&gt;The College Board has a &lt;a href=&quot;https://advancesinap.collegeboard.org/stem/computer-science-principles&quot; rel=&quot;nofollow noreferrer&quot;&gt;complete description&lt;/a&gt; of the course and its expected outcomes. They also maintain a &lt;a href=&quot;https://apcommunity.collegeboard.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;mailing/discussion list&lt;/a&gt; for teachers. It requires membership, which is readily available to teachers. Note that this course normally has programming, but the focus is wider. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T18:20:17.373" LastActivityDate="2017-07-13T18:20:17.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2626" PostTypeId="4" CreationDate="2017-07-13T18:11:50.853" Score="0" Body="APCS-Principles is a specific United States secondary school course that might earn University credit. It is intended to be a rigorous college-level course in the foundations of computing. Questions appropriate for this tag should address the teaching of this course specifically. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T18:20:24.433" LastActivityDate="2017-07-13T18:20:24.433" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2627" PostTypeId="2" ParentId="130" CreationDate="2017-07-13T18:55:55.513" Score="3" Body="&lt;ul&gt;&#xA;&lt;li&gt;indentation&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;value&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;shows grouping&lt;/li&gt;&#xA;&lt;li&gt;makes code easier to read&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;see also&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;paragraphing&lt;/li&gt;&#xA;&lt;li&gt;good symbol names (variables and methods)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;related subjects&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;literacy / English&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;is like&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;bullet lists&lt;/li&gt;&#xA;&lt;li&gt;poetry&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-13T18:55:55.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2628" PostTypeId="2" ParentId="2547" CreationDate="2017-07-13T19:53:08.947" Score="7" Body="&lt;p&gt;Can't believe no one mentioned &lt;a href=&quot;https://people.csail.mit.edu/lynch/&quot; rel=&quot;noreferrer&quot;&gt;Nancy Lynch&lt;/a&gt; at MIT of &lt;a href=&quot;https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf&quot; rel=&quot;noreferrer&quot;&gt;FLP&lt;/a&gt; fame, a pioneer in distributed systems theory. The FLP is an impossibility result about obtaining consensus in a distributed system with potentially faulty processes (or, more succinctly, processes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good way to introduce in CS would be discussing concurrency and having the students try to implement a 'simple' system that does deterministically sequential writes and then break them. Nothing like trying to get computers to agree on the temporal sequence of events to make you feel pain in your bones at the mention of the concept. Threads are bad enough.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastEditorUserId="1790" LastEditDate="2017-07-14T16:42:29.430" LastActivityDate="2017-07-14T16:42:29.430" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2629" PostTypeId="5" CreationDate="2017-07-13T19:56:50.337" Score="0" Body="&lt;p&gt;Questions on Codes of Conduct (Honor Codes) may be appropriate here if they focus on students appropriating the work of others. Suggested responses to plagiarism can include both punishment and the teaching of appropriate lessons. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Self-Plagiarism is also appropriate here for situations in which students re-use older work without attribution. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-13T20:14:22.540" LastActivityDate="2017-07-13T20:14:22.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2630" PostTypeId="4" CreationDate="2017-07-13T19:56:50.337" Score="0" Body="Questions on Plagiarism include not only how to respond to clear, and not so clear, instances of it, but also how to structure a course so as to minimize its occurrence. " OwnerUserId="1293" LastEditorUserId="283" LastEditDate="2017-07-13T20:23:19.837" LastActivityDate="2017-07-13T20:23:19.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2631" PostTypeId="2" ParentId="1363" CreationDate="2017-07-13T20:43:31.470" Score="5" Body="&lt;p&gt;I think that this is an interesting question, and one the textbooks often ignore or treat as unimportant. I've noticed it because I end up teaching Python, Java and C++ and have seen how my student's mental models lead to misunderstandings in their code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the three things that seem the hardest for my students to understand:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In Python, where everything is a reference, variables act differently depending on their mutability. If you assign a list to a different list variable, the behavior is different that if you assign an int to a variable.&lt;/li&gt;&#xA;&lt;li&gt;In Java, which has both &quot;shoebox&quot; variables for its primitive types and implicit references for everything else, students struggle to juggle two different object models as well; instead of mutable:immutable, they have value (primitive) types and reference types.&lt;/li&gt;&#xA;&lt;li&gt;C++: where everything is a value type, students must deal with the cost of implicit copies.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Most often students deal with these differences via memorization. I think actually understanding how the data is stored makes those differences a little easier to understand and to remember. &lt;/p&gt;&#xA;" OwnerUserId="1554" LastActivityDate="2017-07-13T20:43:31.470" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2632" PostTypeId="1" AcceptedAnswerId="4303" CreationDate="2017-07-13T21:10:27.140" Score="41" ViewCount="6709" Body="&lt;p&gt;So, in C-style languages, the &lt;code&gt;for&lt;/code&gt; loop has a funny little syntax:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 100; i++) {&#xA;    // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If we order these sections in a natural, intuitive fashion, we would get something like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for (1; 2; 3) {&#xA;    4&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;... which is how students seem to feel like things should be ordered.  But, of course, the real execution order is &lt;code&gt;1, 2, 4, 3, 2, 4, 3, 2, 4, 3, 2, 4, 3...&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;What tricks have you developed for helping students make sense of &lt;code&gt;for&lt;/code&gt; loops at the very start?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="2047" LastEditDate="2020-10-06T03:15:50.237" LastActivityDate="2022-05-11T15:40:20.763" Title="Teaching the humble for loop" Tags="|best-practice|looping|" AnswerCount="14" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="2633" PostTypeId="2" ParentId="130" CreationDate="2017-07-13T21:14:44.060" Score="4" Body="&lt;p&gt;I think the student's response, &quot;because it's a hassle&quot;, is interesting and worth a little more thought. When I am helping students in our Computer Center, I'm amazed at how difficult their code is for me to read, often because of indentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since our IDE automatically provides indentation (and the programmer's text editor that student can use does as well), I can't for the life of me figure out how students are even able to enter code without correct indentation; during lecture, when I type some examples of poorly formatted code, it is quite a bit of work to stop the editor from automatically formatting it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only two things I've actually seen cause this are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Copy and paste from another part of the code or from an email or discussion post where the original was not formatted.&lt;/li&gt;&#xA;&lt;li&gt;Using the space bar instead of the tab key when tabs are needed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Even then, it seems that students must do a lot of extra work to end up with non-indented code. I'd like to hear about what other instructors have observed.&lt;/p&gt;&#xA;" OwnerUserId="1554" LastActivityDate="2017-07-13T21:14:44.060" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2634" PostTypeId="2" ParentId="2632" CreationDate="2017-07-13T21:15:21.673" Score="58" Body="&lt;p&gt;Show then how the loop can be unfolded into a while loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int i = 0 // Step 1&#xA;while (i&amp;lt; 100) { // Step 2&#xA;    // Do something&#xA;    i++ // Step 3&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Explain that the order is derived from that unfolding.&lt;/p&gt;&#xA;&lt;p&gt;You could start out by only teaching while loops, forcing them to make these while loops with iterators, then showing that for loops are a condensed of those while loops with incrementing variables.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="2047" LastEditDate="2020-10-05T22:17:12.710" LastActivityDate="2020-10-05T22:17:12.710" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="2635" PostTypeId="2" ParentId="2547" CreationDate="2017-07-13T21:25:55.230" Score="4" Body="&lt;p&gt;First, &lt;a href=&quot;https://en.wikipedia.org/wiki/Klara_Dan_von_Neumann&quot; rel=&quot;nofollow noreferrer&quot;&gt;Klari von Neumann&lt;/a&gt;.  If you've read &quot;Turing's Cathedral,&quot; you know that a lot of the software for the ENIAC, WRT calculations for the early atomic bombs, were written by her.  Her husband was the renowned computer scientist John von Neumann, but while he came up with a lot of the theory, she did much of the coding which made him look so good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they were creating the MANIAC computer, it was not uncommon for her to approach the hardware engineers and ask if they could add an instruction which implemented a certain sequence of instructions, because her programming was using that sequence often and adding an instruction in hardware would shrink the size of the program (memory was &lt;em&gt;hideously&lt;/em&gt; expensive, back then).  Quite often, when she asked, she had very well-reasoned arguments for it so the hardware engineers would add it.  As such, you could also regard her as the creator of CISC instruction sets.&lt;/p&gt;&#xA;" OwnerUserId="948" LastEditorUserId="919" LastEditDate="2017-07-16T16:00:18.090" LastActivityDate="2017-07-16T16:00:18.090" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2638" PostTypeId="2" ParentId="2632" CreationDate="2017-07-13T23:12:10.047" Score="9" Body="&lt;p&gt;It's about setting boundary conditions first. Provide them with a more concrete example, like filling a glass of milk. You kind of need a glass or container (let me know the next time you pour milk right on the counter) and that glass is some amount full. We'll just treat it as empty. Then, you stop filling the glass when it's full (or half full or whatever), unless you want milk everywhere.&lt;/p&gt;&#xA;&lt;p&gt;Within those boundary conditions, you pour the milk jug. That is, mentally, you're thinking (in not so many terms):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;repeat following until checks make you stop pouring milk&#xA;check: fullness of glass&#xA;check: how close the fullness is to the wanted end fullness&#xA;add some milk&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That's exactly how a for loop thinks. It needs your conditions &lt;em&gt;first&lt;/em&gt;, and then what you want to repeat while those conditions are true. (Yes, &lt;em&gt;while&lt;/em&gt; - just like a while loop. I personally agree with thesecretmaster in that it makes a lot of sense to introduce while loops before for loops.) As you're pouring, you're constantly rechecking the level of the milk - &amp;quot;updating&amp;quot; a variable in your head as you act. So, if you were asking a computer to fill a glass of milk:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;import milk&#xA;for (float glassFullness = 0; glassFullness &amp;lt; 1; glassFullness+=0.1) {&#xA;    milk.Fill()&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That could, of course, also be written&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;import milk&#xA;float glassFullness = 0;&#xA;while (glassFullness &amp;lt; 1) {&#xA;    milk.Fill()&#xA;    glassFullness+=0.1&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;They're doing the same things; the for loop is just a condensed version.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Tl;dr: a for loop looks for the boundary conditions, and then does what it needs to do, rechecking with a redefined variable accounting for the change that has been made. You input what change needs to be made to the variable to account for the action.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="2047" LastEditDate="2020-10-06T03:16:30.680" LastActivityDate="2020-10-06T03:16:30.680" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="2639" PostTypeId="2" ParentId="2632" CreationDate="2017-07-13T23:27:43.903" Score="3" Body="&lt;p&gt;However, don't neglect the fact that the first and last of the three sections between the parentheses can have (in C, anyway) multiple statements separated by commas (comma is an operator in C).&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for(int i = 0, j = 100; i &amp;lt; 100; i++, j = 2 * j + i) {&#xA;    //do something strange&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can write quite a lot of a program in a single &lt;code&gt;for&lt;/code&gt; statement. The final section needn't just increment or decrement things. Arbitrary complexity is possible. Probably not a good idea to encourage it, however. But students reading code of others may come across it, so should be aware.&lt;/p&gt;&#xA;&lt;p&gt;One use of this is to iterate over a two (or more) dimensional array in a single &lt;code&gt;for&lt;/code&gt; statement.&lt;/p&gt;&#xA;&lt;p&gt;Because of the complexity, it is probably best to show how it maps to a while statement as suggested in another answer here&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="2047" LastEditDate="2020-10-05T19:57:02.583" LastActivityDate="2020-10-05T19:57:02.583" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="2640" PostTypeId="5" CreationDate="2017-07-14T00:43:23.647" Score="0" Body="&lt;p&gt;Apply this tag to questions concerning the appropriate use of collaboration at all levels in education. For inappropriate collaboration see the [plagiarism] tag. Collaboration could be for research or for curriculum creation and the like. Collaboration could also apply to certain student projects, especially those that might result in a paper or product. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag is not intended for questions concerning normal group projects in classes, see the [group-assignment] tag.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="58" LastEditDate="2017-07-14T00:55:44.560" LastActivityDate="2017-07-14T00:55:44.560" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2641" PostTypeId="4" CreationDate="2017-07-14T00:43:23.647" Score="0" Body="This tag is intended for questions about the appropriate use of collaboration in education. Collaboration could be between faculty members, between students, or between faculty and students. It is not appropriate for questions on plagiarism and similar topics. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-14T00:55:57.603" LastActivityDate="2017-07-14T00:55:57.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2642" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T04:59:28.217" Score="26" Body="&lt;p&gt;I teach &lt;code&gt;for&lt;/code&gt; loops using the following pseudocode, which we then translate into actual code:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (initialization; condition; update)&#xA;{&#xA;    statement;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This logic helps justify why the order goes &lt;code&gt;1, 2, 4, 3&lt;/code&gt; to start. I explain it as follows: a variable can only be initialized once so it happens first and never again. After that the variable is tested against the condition. If the condition is true, then the code proceeds to the statement. Only then will it reach update. If the first conditional test fails, the update code is never executed.&lt;/p&gt;&#xA;&lt;p&gt;I have found that &lt;code&gt;for&lt;/code&gt; loops are one of the few constructs that benefit most directly from drawing a flowchart. Using the visual diagram will help this logic become clearer.&lt;/p&gt;&#xA;&lt;p&gt;Another benefit of teaching the &lt;code&gt;for&lt;/code&gt; loop this way is that it becomes trivial to translate it into &lt;code&gt;while&lt;/code&gt; or &lt;code&gt;do-while&lt;/code&gt; with the same pseudocode constructs.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;// while loop&#xA;initialization;&#xA;while (condition)&#xA;{&#xA;    statement;&#xA;    update;&#xA;}&#xA;&#xA;// do-while loop&#xA;initialization;&#xA;do&#xA;{&#xA;    statement;&#xA;    update;&#xA;} while (condition);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Once I do this, I can focus on each of these four parts, so students understand the different components that make up a loop regardless of the structure thereof.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="2047" LastEditDate="2020-10-06T03:18:19.900" LastActivityDate="2020-10-06T03:18:19.900" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="2643" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T06:31:05.473" Score="8" Body="&lt;p&gt;Theoretically, I teach the while loop first. Others have already explained how and why, but I'll go ahead with an example:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;void showRating( int rating )&#xA;{&#xA;    int i = 0;&#xA;    while ( i &amp;lt; rating )&#xA;    {&#xA;        putchar( '*' );&#xA;        ++i;&#xA;    }&#xA;    putchar( '\n' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Some of the examples will be better expressed as for loops, and that's where I introduce the for loop, as a way of containing the essential elements in a concise construct. I might ask what happens if I forget to increment &lt;em&gt;i&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;void showRating( int rating )&#xA;{&#xA;    int i = 0;&#xA;    while ( i &amp;lt; rating )&#xA;    {&#xA;        putchar( '*' );&#xA;    }&#xA;    putchar( '\n' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And we compile it and run it.&lt;/p&gt;&#xA;&lt;p&gt;Then I show how the for loop might help us not forget the counter:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;void showRating( int rating )&#xA;{&#xA;    int i;&#xA;    for ( i = 0; i &amp;lt; rating; ++i )&#xA;    {&#xA;        putchar( '*' );&#xA;    }&#xA;    putchar( '\n' );&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Too often, people think first of counting when they think of loops, and that's why they jump to the for loop first. But the C for loop is not really the counted loop that BASIC has led us to believe it is. And the English grammar for the word is not limited to counting, either.&lt;/p&gt;&#xA;&lt;p&gt;So I'll throw some for loops in that don't strictly count.&lt;/p&gt;&#xA;&lt;p&gt;I also teach the pun on forever that used to be the standard flag for an indeterminate loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for( ;; )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I'm likely to teach the post-test do ... while loop after having shown an indeterminate loop with a break at the end:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for ( ;; )&#xA;{&#xA;    /* Always executes once. */&#xA;    if ( condition ) break;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now I would want to use something concrete here so I can show that it really always executes once, but I don't have time to make something up today.&lt;/p&gt;&#xA;&lt;p&gt;Then I can show them the do .. while loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;do&#xA;{&#xA;    /* Always executes once. */&#xA;} while ( !condition );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Somewhere along in here I'll introduce the faux style thing about bracket placement and warn them not to argue with the managers about where to place them.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastEditorUserId="2047" LastEditDate="2020-10-05T22:17:24.873" LastActivityDate="2020-10-05T22:17:24.873" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="2644" PostTypeId="2" ParentId="2547" CreationDate="2017-07-14T10:05:46.643" Score="4" Body="&lt;p&gt;With &lt;a href=&quot;https://en.wikipedia.org/wiki/Random_early_detection&quot; rel=&quot;nofollow noreferrer&quot;&gt;RED&lt;/a&gt; (Random Early Detection or Random Early Drop) &lt;a href=&quot;https://en.wikipedia.org/wiki/Sally_Floyd&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sally Floyd&lt;/a&gt; was a pioneer in the field of Active Queue Management algorithms. She is also co-author of many important RFCs (SACK, ECN). She received the IEEE Internet Award in 2005 and the ACM SIGCOMM Award in 2007.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also in the field of AQM, &lt;a href=&quot;https://en.wikipedia.org/wiki/Kathleen_Nichols&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kathleen Nichols&lt;/a&gt; is a co-author of the CoDel algorithm. She discovered bugs in RED, and co-authored an unpublished paper on RED called &quot;&lt;a href=&quot;https://gettys.wordpress.com/2010/12/17/red-in-a-different-light/&quot; rel=&quot;nofollow noreferrer&quot;&gt;RED in a Different Light&lt;/a&gt;&quot;, where a toilet tank was used as an example of a servo system.&lt;/p&gt;&#xA;" OwnerUserId="1920" LastEditorUserId="1920" LastEditDate="2017-07-14T10:26:18.087" LastActivityDate="2017-07-14T10:26:18.087" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2646" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T14:09:32.880" Score="4" Body="&lt;p&gt;I am not an educator, but I hope my answer will be helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In B.A.S.I.C, which I learned as a child, there are &quot;for-to-step&quot; loops and their argument order is the same as C style languages. I have to remember them like this in order to keep it right for myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is QBASIC&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;FOR counter = start TO end [STEP]&#xA;    [Statement Block] &#xA;NEXT counter&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;FOR i= 100 TO 0 STEP -1&#xA;    PRINT i &#xA;NEXT i&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This helps me personaly understand what's happening in those loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing you might try is an alteration of what you posted above:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; for (1; //initialize&#xA;      2; /* are we done? */ 4 /*increment*/){&#xA;      3 //do the work&#xA; } // finish&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1984" LastEditorUserId="1984" LastEditDate="2017-07-15T17:17:48.200" LastActivityDate="2017-07-15T17:17:48.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2647" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T14:46:21.073" Score="3" Body="&lt;p&gt;I love thesecretmaster's answer of showing the mapping between the two loops (and I will almost certainly do that in the future). However, as an AP Computer Science A teacher, I teach in Java, and there is a subtle trap in saying that&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 100; i++) {&#xA;    // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is equal to&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int i = 0;&#xA;while (i &amp;lt; 100) {&#xA;    // do something&#xA;    i++;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The two loops are identical, but of course there is one subtle but important difference: the scope of &lt;code&gt;i&lt;/code&gt; (and its corresponding pollution of the namespace).  Java considers the int declared in the first section of the for-loop header to be declared &lt;em&gt;in the loop&lt;/em&gt;, and therefore out of scope once the loop ends.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;while&lt;/code&gt; loop is really equivalent to this loop in C:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int i;&#xA;for (i = 0; i &amp;lt; 100; i++) {&#xA;    // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you are to take the path of mapping equivalencies between the loops, you really should also point out this trap.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:59.610" LastActivityDate="2020-10-06T03:17:59.610" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="2649" PostTypeId="2" ParentId="868" CreationDate="2017-07-14T16:35:00.173" Score="0" Body="&lt;p&gt;When people asked me what I did, when I was a programmer/software engineer. I would tell them one of these.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I am an author.&lt;/li&gt;&#xA;&lt;li&gt;I write instruction manuals for computers. No not manuals on how to use computers, manuals &lt;strong&gt;for&lt;/strong&gt; computers: The computers read the manuals, so that they know what to do.&lt;/li&gt;&#xA;&lt;li&gt;I write poetry for computers.&lt;/li&gt;&#xA;&lt;li&gt;I teach computers, how to be medical pumps. (My last job was programming medical pumps).&lt;/li&gt;&#xA;&lt;li&gt;I am a wizard, I recite magic spells at computers, and they do what I want.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-14T16:35:00.173" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2650" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T17:18:14.863" Score="8" Body="&lt;p&gt;&lt;strong&gt;&lt;em&gt;tl;dr&lt;/em&gt;–&lt;/strong&gt;  A &lt;code&gt;for&lt;/code&gt; loop is just a &lt;code&gt;while&lt;/code&gt; loop that has extra slots for a pre-loop statement and a post-loop-run statement.  Since they're pretty much the same thing just written differently, a &lt;code&gt;for&lt;/code&gt; loop is best understood as &lt;a href=&quot;https://en.wikipedia.org/wiki/Syntactic_sugar&quot; rel=&quot;nofollow noreferrer&quot;&gt;syntactic sugar&lt;/a&gt; that's useful when it increases the readability of the code.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes new programmers are worried about performance, thinking that syntactic sugar might be less efficient.  That's not the case; the compiler really doesn't care how you write these loops, it's all the same to it.  So, students should be told to just write whichever's cleaner in the current context.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Homework/test question idea:&lt;/strong&gt;  Have students convert a &lt;code&gt;for&lt;/code&gt; loop into an equivalent &lt;code&gt;while&lt;/code&gt; loop, or a &lt;code&gt;while&lt;/code&gt; loop into an equivalent &lt;code&gt;for&lt;/code&gt; loop.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Mapping between &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;.&lt;/h3&gt;&#xA;&lt;p&gt;The &lt;code&gt;for&lt;/code&gt; loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (prestatement; condition; poststatement)&#xA;{&#xA;    // loop body&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is equivalent to the &lt;code&gt;while&lt;/code&gt; loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;{&#xA;    prestatement;&#xA;    while (condition)&#xA;    {&#xA;        // loop body&#xA;        poststatement;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;, where:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;prestatement&lt;/code&gt; is an executable statement that happens only once, before the loop starts.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If omitted, then the loop just doesn't do anything extra before starting.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;condition&lt;/code&gt; is a &lt;code&gt;Boolean&lt;/code&gt; expression that's evaluated at the start of each loop execution, breaking if &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If omitted, then there's no break check there.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;poststatement&lt;/code&gt; is an executable statement that happens after the end of each loop execution.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If omitted, then the loop just doesn't do anything extra after each execution.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Note on scope.&lt;/h3&gt;&#xA;&lt;p&gt;Even though&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;    int i = 0;&#xA;    int i = 0;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is illegal code because we can't declare &lt;code&gt;i&lt;/code&gt; twice in the same scope,&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;{&#xA;    int i = 0;&#xA;}&#xA;{&#xA;    int i = 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is legal because both &lt;code&gt;i&lt;/code&gt;'s are in different scopes.&lt;/p&gt;&#xA;&lt;p&gt;This scoping issue is why we have the &lt;code&gt;while&lt;/code&gt; statement above wrapped in extra &lt;code&gt;{}&lt;/code&gt;'s, since the &lt;code&gt;prestatement&lt;/code&gt; belongs in that scope.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Note on &lt;code&gt;continue&lt;/code&gt;.&lt;/h3&gt;&#xA;&lt;p&gt;The keyword &lt;code&gt;continue&lt;/code&gt; can &lt;code&gt;goto&lt;/code&gt; the end of a loop's body.&lt;/p&gt;&#xA;&lt;p&gt;We can rewrite this behavior more explicitly:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Make the implicit-label explicit by writing it out.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Rewrite &lt;code&gt;continue;&lt;/code&gt; as &lt;code&gt;goto [label's name];&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (long i=0; i &amp;lt; 1000; ++i)&#xA;{&#xA;    if (i % 8 == 0) { continue; }&#xA;    //  rest of body&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;becomes&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (long i=0; i &amp;lt; 1000; ++i)&#xA;{&#xA;    if (i % 8 == 0) { goto end_of_body; }&#xA;    //  rest of body&#xA;end_of_body:&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If we then rewrite this as a &lt;code&gt;while&lt;/code&gt; loop, it'd be&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;{&#xA;    long i = 0;&#xA;    while (i &amp;lt; 1000)&#xA;    {&#xA;        if (i % 8 == 0) { goto end_of_body; }&#xA;        //  rest of body&#xA;end_of_body:&#xA;        ++i;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That said, generally &lt;code&gt;goto&lt;/code&gt; and related mechanisms (e.g., &lt;code&gt;continue&lt;/code&gt;) are discouraged.  Presumably students ought to understand how they work, though it's generally best to avoid new usage.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;&lt;code&gt;for&lt;/code&gt; loops can omit parts.&lt;/h3&gt;&#xA;&lt;p&gt;Might seem weird at first glance, but&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (;;) { }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is actually perfectly legal code!  Since it omits a &lt;code&gt;break&lt;/code&gt; condition and doesn't do anything, it's basically an infinite loop that runs forever without doing anything.&lt;/p&gt;&#xA;&lt;p&gt;In C#, it doesn't consume CPU time, but it also blocks the thread from progressing.  For example,&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (;;) { }    //  Infinite loop&#xA;foo();          //  Never happens because the above loop never ends&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="39" LastEditorUserId="39" LastEditDate="2020-11-20T03:29:35.483" LastActivityDate="2020-11-20T03:29:35.483" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="2651" PostTypeId="1" CreationDate="2017-07-14T20:36:36.527" Score="5" ViewCount="1297" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; It's been quite a while since I posted this question, and in the intervening time, I have come to love the foreach loop. However, in order to avoid invalidating answers, I leave the text unchanged below:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I personally dislike the &lt;code&gt;foreach&lt;/code&gt; loop, so I tend to avoid them when I program.  However, in spite of this preference, I still end up teaching about them as part of the &lt;strong&gt;AP Computer Science A&lt;/strong&gt; curriculum.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; for (Type item : iterableCollection) {&#xA;      // Do something&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I am particularly interested in experiences from those who have actually taught this in a classroom (though, as always, pedagogic thoughts from others are also welcome).  What do you do to teach about the limitations, costs, and advantages of this loop structure?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will put my own answer below alongside the others.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="12659" LastEditDate="2022-11-12T11:59:34.617" LastActivityDate="2022-11-12T11:59:34.617" Title="Teaching the tradeoffs of the foreach loop" Tags="|programming|java|looping|" AnswerCount="12" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2653" PostTypeId="2" ParentId="2632" CreationDate="2017-07-14T21:20:17.140" Score="7" Body="&lt;p&gt;I think the way to teach it is not by talking about order of operation, but by teaching the overall concept of a looping. The &lt;code&gt;for&lt;/code&gt; header contains the steps that are generally common to looping: initialize iteration variables, test whether the loop should proceed, and update variables between iterations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As others have suggested, you could start by teaching &lt;code&gt;while&lt;/code&gt; loops, since they have simpler structure. Then you could point out that many of these loops have some common structure: they initialize a variable before starting, and update that variable at the end of the body. This is so common that we have a special &lt;code&gt;for&lt;/code&gt; statement that encapsulates it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also useful as an illustration of modularity, which is a cornerstone of good programming. Whenever you find yourself doing similar things over and over, give that thing a name and encode it as a function, macro, structure/class, etc. In this case, it's just happening at a higher level, in language design: much of the evolution of languages over the decades has been finding common programming patterns and creating languages that have them as built-in operations and/or functions (e.g. &lt;code&gt;foreach&lt;/code&gt; in PHP).&lt;/p&gt;&#xA;" OwnerUserId="1471" LastActivityDate="2017-07-14T21:20:17.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2654" PostTypeId="2" ParentId="2651" CreationDate="2017-07-14T22:04:57.010" Score="28" Body="&lt;p&gt;I think the advantages are huge, overwhelming.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They avoid&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;off by one errors - the bane of the novice programmer &lt;/li&gt;&#xA;&lt;li&gt;needing to allocate an explicit iterator - avoiding adding names to the namespace. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They enable  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;thinking about iteration at a higher level than just counting&lt;/li&gt;&#xA;&lt;li&gt;compact coding  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I use them whenever available. The collection knows its members. Just ask it to yield them up. It is a brilliant design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programs in object-oriented languages like java should not have to all look like C programs, nor should the programmer have to always dip to the level of C to use them. C is a better assembler (for the pop-11). But few programs need that mind-set. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preference is to teach concepts from the top-down. Higher level thinking means (in part) &quot;closer to the language of the problem&quot;. Then, when necessary go to a lower level - closer to the machine or closer to the level of the solution. In practice you seldom need to go down the scale very far for students to get it. And you never need to recapitulate the entire history of computing to have students understand how to work in modern languages, whatever the paradigm. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I actually try to move even further up the abstraction scale as illustrated in this  post &lt;a href=&quot;https://cseducators.stackexchange.com/a/1379/1293&quot;&gt;https://cseducators.stackexchange.com/a/1379/1293&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I include this in a library so that students learning other things can do simple iterations even before loops are discussed. It is quite useful to be able to do something a fixed number of times without formally counting it. However, it is only especially useful if you want to delay &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; so that you can teach, say, object-oriented abstraction principles.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-04T02:21:14.323" LastActivityDate="2018-02-04T02:21:14.323" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2655" PostTypeId="2" ParentId="2651" CreationDate="2017-07-14T22:06:42.987" Score="3" Body="&lt;p&gt;&lt;strong&gt;Part 1&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I introduce the &lt;code&gt;foreach&lt;/code&gt; loop, I do it the context of a lecture on ArrayLists and wrapper classes.  I first just kinda slip it in unannounced:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double total = 0.0;&#xA;for (double currentValue : myDoubles)&#xA;    total += currentValue;&#xA;System.out.println(total);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then we turn to it and begin to break it apart a little.  I first compare it to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int j = 0; j &amp;lt; myDoubles.size(); j++){&#xA;    double currentValue = myDoubles.get(j);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;.  But then I tell the students that there is a hidden limitation.  I want to see if they can spot it, and I provide them with three re-writing exercises (that are also practice exercises on the prior concepts) to help them find it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Exercise 1:&#xA;double total = 0.0;&#xA;for (int j = 0; j &amp;lt; myDoubles.size(); j++){&#xA;    total += myDoubles.get(j);&#xA;&#xA;// Exercise 2:&#xA;for (double currentValue : myDoubles)&#xA;   total += currentValue;&#xA;&#xA;// Exercise 3:&#xA;for (int j = 1; j &amp;lt; myDoubles.size(); j++){&#xA;   if (myDoubles.get(j) &amp;lt; myDoubles(get(j-1))&#xA;        return false;&#xA;return true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When the last one turns out to be impossible, we discuss the limits imposed by not having a sentinel value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Part 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We revisit &lt;code&gt;foreach&lt;/code&gt; loops later in the year when we deal with multi-dimensional arrays.  Towards the end of that lesson, they are given this task:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For some int[][] ma, fill every element with the value 3.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We discuss the standard &lt;code&gt;for&lt;/code&gt; loop solution:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int y = 0; y &amp;lt; ma.length; y++)&#xA;    for (int x = 0; x &amp;lt; ma[y].length; x++)&#xA;        ma[y][x] = 3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And then I bring them back to &lt;code&gt;foreach&lt;/code&gt; with this pretty-looking thing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for(int[] outer : ma)&#xA;    for(int x : outer)&#xA;        x = 3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... which, of course, doesn't work at all. I ask the kids to pair up and try to figure out &lt;em&gt;why&lt;/em&gt; before we all come back together to have a discussion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example brings us right to the heart of copy-by-value (and provides another chance for us to revisit references).  I consider the discussion over only when the students seem to understand why the nested &lt;code&gt;foreach&lt;/code&gt; doesn't work, but this loop does:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for(int[] outer : ma)&#xA;    for(int x=0, x&amp;lt;outer.length; x++)&#xA;        outer[x] = 3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-14T22:06:42.987" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2658" PostTypeId="1" CreationDate="2017-07-14T23:10:11.943" Score="5" ViewCount="103" Body="&lt;p&gt;I'm reading quite a bit about quantum computing, especially optical quantum computing. Part of the problem is even the all-encompassing bible of quantum computing (Nielsen and Chuang, Quantum Computing and Quantum Computation) has only 10 pages on this particular physical realization. Other textbooks, by the time they're published, are already out of date. Hello, reading scientific papers!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, there's a problem associated with that - results are retracted, new ones encompass and expand upon old, and papers are rather notorious for being difficult to slog through. Having slogged through a few myself, I can tell you that notoriety is well-deserved. Worse (for the self-learner), most papers are focused on only a specific problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All this isn't to say that papers are bad, just that sometimes other materials can be nice, and learning from just papers is difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can one find materials other than papers to learn from in a developing field?&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-15T22:58:14.640" Title="Learning in a developing field" Tags="|curriculum-design|resource-request|self-learning|quantum-computing|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2659" PostTypeId="2" ParentId="2651" CreationDate="2017-07-14T23:16:54.683" Score="4" Body="&lt;p&gt;To do something like the following with foreach...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// Exercise 3:&#xA;for (int j = 1; j &amp;lt; myDoubles.size(); j++){&#xA;   if (myDoubles.get(j) &amp;lt; myDoubles.get(j-1))&#xA;        return false;&#xA;return true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;consider the following, expressed as a static method&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static boolean isSorted(ArrayList&amp;lt;Integer&amp;gt; values){&#xA;    boolean first = true;&#xA;    Integer previous = Integer.MIN_VALUE;&#xA;    for(Integer value: values){&#xA;        if(first){&#xA;            first = false;&#xA;        } else {&#xA;            if (value &amp;lt; previous){&#xA;                return false;&#xA;            } &#xA;        }&#xA;        previous = value;               &#xA;    }&#xA;    return true;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I won't try to argue that this is simpler, however it does illustrate some important techniques useful elsewhere. The processing of the first element is handled explicitly, often important to do. In the original &lt;code&gt;for loop&lt;/code&gt; version it is handled by starting at 1, which is easy to miss. The other technique is the handing off of a current value to a previous reference. There are a couple of other simpler things here, such as MIN_VALUE (which isn't used, but avoids an uninitialized value - that will fail the &amp;lt; test also). A slight modification would work for Doubles, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2020-01-23T15:40:33.157" LastActivityDate="2020-01-23T15:40:33.157" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="2660" PostTypeId="1" CreationDate="2017-07-14T23:18:29.973" Score="6" ViewCount="155" Body="&lt;p&gt;(Note: related question &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2658/learning-in-a-developing-field&quot;&gt;here&lt;/a&gt;, not duplicate.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm reading quite a bit about quantum computing, especially optical quantum computing. Part of the problem is even the all-encompassing bible of quantum computing (Nielsen and Chuang, &lt;em&gt;Quantum Computing and Quantum Information&lt;/em&gt;) has only 10 pages on this particular physical realization. Other textbooks, by the time they're published, are already out of date. Hello, reading scientific papers!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, there's a problem associated with that - results are retracted, new ones encompass and expand upon old, and papers are rather notorious for being difficult to slog through. Having slogged through a few myself, I can tell you that notoriety is well-deserved. Worse (for the self-learner), most papers are focused on only a specific problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As in, I've read 10 pages of incomprehensible text before (think half an hour for the 10 pages, if I'm really, really lucky) just to figure out one fact, and then looked at another paper that casts doubt on that fact. Add the whole issue of paywalls to the business, and it only gets worse. (I'm not a university student, though I am lucky enough to be within driving distance of a decently sized university, but not everyone is.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Papers often lead me down rabbit holes as well - tracing citations (I could tell a few entertaining stories about that alone), looking up terms (&quot;oh, that's what you meant...well, why didn't you &lt;em&gt;say&lt;/em&gt; that?&quot;), and going down that oh-so-fun Wikipedia trail. You know, look up word, read third word on page, click on &lt;em&gt;that&lt;/em&gt;, then continue until somehow you end up at &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy&quot; rel=&quot;nofollow noreferrer&quot;&gt;philosophy&lt;/a&gt; (ironically, the previous page doesn't end up at philosophy, if I did it correctly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can learning from papers be made a little less painful? Things like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What tips do you have to get the most bang for your buck reading a paper and retaining that understanding? &lt;/li&gt;&#xA;&lt;li&gt;How do you help restrain the rabbit hole?&lt;/li&gt;&#xA;&lt;li&gt;How do you know when a paper's trustworthy?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Answers don't need to cover all of the above, but be along those lines.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T13:05:53.370" LastActivityDate="2017-07-15T13:05:53.370" Title="Learning from research papers in a developing field" Tags="|self-learning|quantum-computing|scientific-papers|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2661" PostTypeId="2" ParentId="2660" CreationDate="2017-07-14T23:34:09.423" Score="2" Body="&lt;p&gt;The problem you pose is a difficult one. Every graduate student researching for her/his dissertation faces it. Suppose you have a particular paper in hand and want to learn from it. The normal solution can be expressed recursively:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;method research(Paper x, Author y){&#xA;    if(y == IsaacNewton){&#xA;        read(x);&#xA;    } else {&#xA;        foreach(Paper paper: referencesOf(x)){&#xA;            research(paper, paper.author());&#xA;        }&#xA;        read(x);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The search space is humungous, but at least tree-like (well, mostly). Sometimes you can prune the tree. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that in an area that hasn't yet &quot;shaken out&quot;, with secondary sources already existing, you are left with primary sources only. And notice that the recursion is bottom up. You read the older papers first just to learn the terminology used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope I didn't err in the algorithm. It has been years and years since I personally had to execute it. But I feel your pain, still. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-14T23:34:09.423" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2662" PostTypeId="2" ParentId="2651" CreationDate="2017-07-14T23:41:52.227" Score="10" Body="&lt;p&gt;I think foreach loops are great, and are almost always preferred over for loops. While for loops are fundamental material and definitely should be covered, they're sort of infrequently used in practice -- when iterating, we almost always iterate over lists and other collective (and it's generally considered bad practice to modify a data structure you're iterating over anyways, so it's no big deal if we lose that -- see the recent trend towards functional programming and immutable data structures).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(After all, there's a reason why languages like Python basically got rid of for loops in favor of foreach loops! Generally, when you're looping, it's because you're looping over lists, sets, collections, or infinite generators.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, it would probably be a bad idea to introduce foreach loops immediately. In the courses I help teach, we wait until we've introduced the following concepts first:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Using regular for loops&lt;/li&gt;&#xA;&lt;li&gt;OOP&lt;/li&gt;&#xA;&lt;li&gt;Using basic data structures (ArrayList, LinkedList, Stack, Queue, etc)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Once we hit that point, we typically do the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start by talking about sets and maps (in a previous lesson).&lt;/li&gt;&#xA;&lt;li&gt;Intentionally run into a limitation: if hash sets are inherently unordered, and the concept of getting the &quot;i-th&quot; element of a hashset is simply undefined, how do we iterate over it? This serves as a great motivator for why we need a new looping concept (if you introduce foreach loops earlier, students are likely to brush this off by treating as only a mildly more convenient form of a for loop, which is missing the point).&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Rather then jumping into foreach loops, we detour by talking about iterators. Time permitting, we implement a basic one for an arraylist we previously wrote together in class -- the goal is to demystify each step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have students use Scanners to do file IO/string parsing in previous assignments, so they usually get the hang of using iterators pretty quickly/find they have a good intuition for using iterators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we're feeling really ambitious, we can discuss this lets us implement data structures that are infinitely long.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;But of course, iterators are pretty clunky, so that serves as good motivation for the final part of the lesson: foreach loops. We introduce the notion of &quot;syntactic sugar&quot;, and demonstrate how Java internally rewrites the foreach loop into a while loop using an iterator. (This helps demystify a lot of the &quot;magic&quot; of foreach loops for students). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We finish by talking about some of the limitations of foreach loops (e.g. you can't modify the collection you're iterating over) and discuss stylistically when you should use for loops vs iterators vs foreach loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have time, this would also perhaps be a good place to discuss how it can be useful to intentionally &lt;em&gt;limit&lt;/em&gt; what you can do in order to gain something in exchange. In this case, we exchange the ability to modify our data structure in exchange for cleaner and more readable code and the ability to iterate over a wider variety of data structures. This actually echos some of our earlier discussions on hashmaps/hashsets -- by removing &quot;indexability&quot;, we were able to get faster lookups.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;All of this usually takes about one hour-long lesson, assuming you've covered basic usage of maps and sets in a previous lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, to help reinforce the point, we start mandating that students use foreach loops whenever possible on their homework, and start deducting points if they use for loops in places where it's not the best option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The very next homework assignment requires students to manipulate and iterate over sets and maps, so in practice it's almost impossible for students to lose points for this.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-15T00:05:51.463" LastActivityDate="2017-07-15T00:05:51.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2663" PostTypeId="2" ParentId="2651" CreationDate="2017-07-14T23:55:39.037" Score="2" Body="&lt;p&gt;You should definitely teach foreach loops. Why?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Foreach loops are the main type of loop in Python.&lt;/li&gt;&#xA;&lt;li&gt;Python is the awesomest.&lt;/li&gt;&#xA;&lt;li&gt;Therefore foreach loops are important.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;All &quot;joking&quot; aside, foreach loops are &lt;em&gt;super&lt;/em&gt; useful - I use them all the time. They're the difference between&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = 0&#xA;while x &amp;lt; len(list):&#xA;    print(list[x])&#xA;    x+=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for i in list:&#xA;    print(i)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This illustrates a couple nice things about foreach loops:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Very short, clean code.&lt;/li&gt;&#xA;&lt;li&gt;Less variables to keep track of - nice for any programmer, let alone novices.&lt;/li&gt;&#xA;&lt;li&gt;Much easier to iterate through lists/arrays/dictionaries/strings or perform batch operations.&lt;/li&gt;&#xA;&lt;li&gt;Allows you to introduce list comprehensions much more easily (what's a list comprehension but a condensed foreach loop?), and everyone knows list comprehensions are the best thing since sliced lists.&lt;/li&gt;&#xA;&lt;li&gt;Very commonly used in awesome programming languages like Python. (Seriously, though, Python's pretty commonly used - best to be prepared for using it.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T00:11:19.693" LastActivityDate="2017-07-15T00:11:19.693" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2664" PostTypeId="2" ParentId="2660" CreationDate="2017-07-15T00:05:28.873" Score="5" Body="&lt;p&gt;Seems like a developing field is a discussion that a community of researchers engages in.  To participate, you'd need to:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Speak the language, e.g. know about quantum computing terminology.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Know the background, e.g. quantum physics and computational theory.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once you have some basis for understanding the discussion, then you focus on getting your own ideas straight.  In the end, it's really all about you; sharing research results really isn't a goal so much as a duty to be performed when/if you become the foremost authority on some particular understanding.&lt;/p&gt;&#xA;&lt;p&gt;If you're a younger student, you've probably got a lot to learn and develop before you can really enter that arena.  But, if you're interested in it anyway, it seems like you could do two things:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Focus on the well-agreed-upon concepts.  You don't need to understand them or even be able to use them just yet, but have them in the back of your mind as you progress in your more foundational studies.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take note of the skills and tools that seem to be most useful in the current community.  For example, if the field seems to be best-attacked through a particular branch of mathematics or using particular computational tools, then you might want to put acquiring those skills on your to-do list.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;Getting to Philosophy&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Papers often lead me down rabbit holes as well - tracing citations (I could tell a few entertaining stories about that alone), looking up terms (&amp;quot;oh, that's what you meant...well, why didn't you say that?&amp;quot;), and going down that oh-so-fun Wikipedia trail. You know, look up word, read third word on page, click on that, then continue until somehow you end up at &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy&quot; rel=&quot;nofollow noreferrer&quot;&gt;philosophy&lt;/a&gt; (ironically, the previous page doesn't end up at philosophy, if I did it correctly).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Definitely, Philosophy is exactly where you want to end up!  Anyone who can't trace their field back to Philosophy hasn't understood it so much as memorized it.&lt;/p&gt;&#xA;&lt;p&gt;If you know exactly how to get from basic philosophical principles to the current state-of-the-art, then you can really claim to understand the field.&lt;/p&gt;&#xA;&lt;h3&gt;Questions&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What tips do you have to get the most bang for your buck reading a paper and retaining that understanding?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Lots of profiling.  For all anyone knows, that random gibberish full of typos and conspiracy theories on Reddit is the deepest, most correct theory of physics ever.  But, since it's &lt;em&gt;probably&lt;/em&gt; not and there's only so much time in the day, your bets are better hedged by focusing on content that appears to be of higher quality.&lt;/p&gt;&#xA;&lt;p&gt;To that end, you should develop a bunch of prejudices over what's likely to be better content, then selectively focus on it.  Sure, if you're truly out of stuff to read, then maybe you'll end up going through that weird Reddit post; or, if you've got too much good stuff to read, you might not even be able to make time for Einstein's words.  It's all relative.&lt;/p&gt;&#xA;&lt;p&gt;Examples of common prejudices:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Prefer scholarly sources for widely understood concepts.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Prefer blogs and communications from top-experts for the-very-latest commentary.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Well-formatted over poorly-formatted.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Thoughtful over thoughtless.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Analytically precise over vague.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How do you help restrain the rabbit hole?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Follow the rabbit hole down as far as you can go without losing sight of the light of day.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Understand where you've ended up, and build a solid foundation there.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Build back up 'til you're out of the rabbit hole, standing on more solid ground.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Rinse and repeat, iteratively falling down further and building back up more.  The more you do this, the greater your understanding grows.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How do you know when a paper's trustworthy?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;They never are.  Whenever you read a textbook - even the best-known ones in well-developed fields, e.g. introductory Calculus - never just trust it.  Put each word on trial, and absorb only the ones that you can't tear down.&lt;/p&gt;&#xA;&lt;p&gt;You often need to memorize large amounts of content without first thoroughly scrutinizing it.  All of this content should carry a red flag in your head that labels it as unscrutinized claims.  If there should come a time where you really need that information, or want to build upon it, you should really scrutinize it first.&lt;/p&gt;&#xA;" OwnerUserId="39" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-15T05:13:52.420" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2665" PostTypeId="2" ParentId="666" CreationDate="2017-07-15T00:57:36.100" Score="5" Body="&lt;p&gt;I'm not a teacher, but my experience is that OO (and other related encapsulation techniques) teach you to write &lt;em&gt;what&lt;/em&gt; you want the computer to do, while procedural coding teaches you to write &lt;em&gt;how&lt;/em&gt; you want the computer to do it.  OO is a powerful way to ignore the &lt;em&gt;how&lt;/em&gt; until you need it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result, anyone learning in an objects-early approach is going to struggle unless there's some benefit to learning to think this way.  If your course starts with several helpful libraries (like perhaps a sprite-manipulation library), it could benefit from object-early (or any form of early encapsulation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, the challenge I've had with object-late is the side effect of telling the computer &lt;em&gt;how&lt;/em&gt; to do tasks: you get used to the idea of telling the computer &lt;em&gt;exactly&lt;/em&gt; what to do.  The mental models which are built around telling the computer exactly what to do are tricky unless you're willing to take the time to push all the way down to the transistor level.  At some point you have to admit that you're just telling the computer what to do and you trust that it knows how to do it.  Objects-early teaches you that lesson from day one.  Objects-late teaches it later.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-07-15T00:57:36.100" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2666" PostTypeId="2" ParentId="2547" CreationDate="2017-07-15T04:26:34.133" Score="3" Body="&lt;p&gt;Here is a list of answers from the comments on the question and some low quality answers. If you want to turn them into complete answers, please make sure to address the achievements &lt;strong&gt;and, more importantly&lt;/strong&gt; the way these people could be mentioned in a CS class.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;There are plenty of notable females in computer gaming such as Carol Shaw - considered the first woman in the computer gaming industry and Dona Bailey - the creator of the Centipede game – B540Glenn&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In addition to the historical greats that have been mentioned (Ada Lovelace, Grace Hopper, Hedy Lamarr) you may want to look at modern stuff - aparently RedHat has a &quot;women in open source&quot; award - redhat.com/en/about/women-in-open-source - and recently(?) announced winners – ivanivan&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There were some pretty advanced hacking done by en.wikipedia.org/wiki/Joanna_Rutkowska but I am not sure that this is what qualifies for the question – Sarge Borsch&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are willing to consider practitioners in the field in addition to those who advanced CS as a science, I would nominate Margaret Hamilton (flight software for the Apollo space program) as someone who did very important work and a bit more recently than some of the people who are usually named (e.g. Lovelace, Hopper). You might also want to consider Jean Sammet (COBOL development team; first female president of the ACM) who passed away recently. – njuffa&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Other practitioners of note: The ENIAC programmers, a team of six female programmers active at the dawn of electronic computing. – njuffa&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you're willing to widen to mathematicians as well, Emmy Noether contributed a ton to abstract algebra, which has impacts in CS (depending on your field). – apnorton&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There's also Judith M. S. Prewitt, who invented the Prewitt operator to detect edges in images – user45891&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Kay McNulty, who invented the subroutine - Brad Johnson&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Betty Snyder, who invented the merge sort generator - Brad Johnson&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I know this is partially off-topic but it might be worth mentioning tragic history of Turing for the LGBT+ community for 'people like me'. I'm sure most people do know story of Turing but for those who don't know - he was forced to take hormone to reduce libido as homosexuality was considered a crime back then - or at least mental illness. It is assumed that he committed suicide because of that. It was only posthumously when UK government pardoned him and issued an apology. – Maciej Piechotka&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Betty Jennings (&lt;a href=&quot;https://en.wikipedia.org/wiki/Jean_Bartik&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jean Bartik&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Marlyn Wescoff&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Fran Bilas&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Elise Shutt&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ruth Lichterman&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ida Rhodes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lois Haibt&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Frances_E._Allen&quot; rel=&quot;nofollow noreferrer&quot;&gt;Frances Allen&lt;/a&gt; is a pioneer in the field of optimizing compilers. Later she became a thought leader at IBM as well as a strong supporter of education. There is an &lt;a href=&quot;http://www-03.ibm.com/ibm/history/witexhibit/wit_hall_allen.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;oral history page&lt;/a&gt; at IBM. Fran is in the &lt;a href=&quot;http://www-03.ibm.com/ibm/history/witexhibit/wit_hall.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;IBM Hall of Fame&lt;/a&gt; with many other women. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Susan Merritt's early work was in algorithms. Among other things she proposed a &lt;a href=&quot;http://archivedemo.cnx.org/contents/562add45-fff3-48b8-80dd-bb3f305eef9c%405/design-patterns-for-sorting&quot; rel=&quot;nofollow noreferrer&quot;&gt;taxonomy of sorting algorithms&lt;/a&gt; that is very useful as a mental model for beginners learning about sorting. She also did work on  Algorithms for &lt;a href=&quot;https://rd.springer.com/article/10.1007/BF00625277?no-access=true&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra's Longest Upsequence Problem&lt;/a&gt; which is pretty easy to state. Later in her career she became the founding Dean of the Seidenberg School of Computer Science and Information Systems at Pace University (NY) where she became a national leader in post-secondary education in the US. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="58" LastEditorUserId="1293" LastEditDate="2017-07-16T21:05:45.710" LastActivityDate="2017-07-16T21:05:45.710" CommentCount="0" CommunityOwnedDate="2017-07-15T04:26:34.133" ContentLicense="CC BY-SA 3.0" />
  <row Id="2667" PostTypeId="2" ParentId="2651" CreationDate="2017-07-15T10:52:11.813" Score="9" Body="&lt;p&gt;There is much discussion here about how a traditional &lt;code&gt;for&lt;/code&gt; seems more powerful than a &lt;code&gt;foreach&lt;/code&gt;, but a traditional &lt;code&gt;for&lt;/code&gt; with sentinel value can only be used to iterate over an indexable collection. Data structure like sets and maps are prevalent, and iterating over them by index would be technically and conceptually absurd. (You've already outlined places where &lt;code&gt;for&lt;/code&gt; is invaluable, but it's applicability is technically limited to only a few (granted, extremely common) types).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, good code expresses intent, which is why we have types like 'bag' which may seem just like an inferior list/vector: if you have data which is conceptually unordered, then you are imposing a layer of complexity on the mapping between code and reality by using a outwardly ordered data structure (e.g. &lt;code&gt;ArrayList&lt;/code&gt;)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... &lt;code&gt;foreach&lt;/code&gt; is about enumerating/iterating over collections, and expresses the intent &lt;em&gt;much&lt;/em&gt; more clearly and succinctly than a traditional &lt;code&gt;for&lt;/code&gt; loop, which is just a familiar and tidy way of expressing an equivalent while loop. &lt;code&gt;foreach&lt;/code&gt; lets you exploit the &lt;code&gt;ICollection&lt;/code&gt;, or &lt;code&gt;Iterable&lt;/code&gt;, or &lt;code&gt;IEnumeable&lt;/code&gt; abstraction, which is fundamental to reusable collection handling code (I'm a C#er, not sure what the Java interfaces are called).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others have already detailed why &lt;code&gt;foreach&lt;/code&gt; is great for maintainability (aside from expressing the intent of the code better, it's &lt;em&gt;so much harder&lt;/em&gt; to get wrong, and even &lt;em&gt;easy&lt;/em&gt; to get right), and I would agree/suggest that you should typically use a &lt;code&gt;foreach&lt;/code&gt; whenever you can quickly work out how to do so. For example, if you need to keep track of the previous value in the loop (see Buffy's answer), this is readable and easy enough to write in a &lt;code&gt;foreach&lt;/code&gt; loop that the benefits of having a more general purpose piece of code (&lt;code&gt;foreach&lt;/code&gt; will work on any collection) will be of sufficient value to eclipse any perceived greater clarity in the for loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll just add that even if you are throwing together code you don't expect other people to see, or to even look at yourself in the future, writing at a high level of abstraction helps to prevent errors, and gives your type system the best chance of catching mistakes for you. If you are just iterating over the values in a collection (which happens &lt;em&gt;a lot&lt;/em&gt;) then use a &lt;code&gt;foreach&lt;/code&gt; loop &lt;em&gt;because&lt;/em&gt; it is less powerful: you've told the code that you don't want to modify the collection, now when you try to, your language can scream and shout at you (that's its job!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Just for reference, I'm a C#er who has done a lot of (C#) code-golf. I love traditional &lt;code&gt;for&lt;/code&gt;-loops, and can surely read and write them quicker than most: both loops are applicable in many places in the real world; &lt;code&gt;foreach&lt;/code&gt; usually wins out where they overlap.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1333" LastEditorUserId="58" LastEditDate="2017-07-15T11:20:44.057" LastActivityDate="2017-07-15T11:20:44.057" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2668" PostTypeId="5" CreationDate="2017-07-15T13:41:26.127" Score="0" Body="&lt;p&gt;Questions may take the form of asking about such things as dealing with diverse student groups, both generally and specifically. Likewise, questions about how computing fits into the wider goals of society are welcome here. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T13:46:03.493" LastActivityDate="2017-07-15T13:46:03.493" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2669" PostTypeId="4" CreationDate="2017-07-15T13:41:26.127" Score="0" Body="This tag is appropriate for issues relating to teaching the social context of computing. Questions about how education issues fit into, and can affect, the wider social climate are also appropriate. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T13:46:25.607" LastActivityDate="2017-07-15T13:46:25.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2670" PostTypeId="5" CreationDate="2017-07-15T13:47:17.883" Score="0" Body="&lt;p&gt;This tag is for questions related to such things as &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; loops and similar constructs in the various programming languages taught in Computer Science. Questions specific to recursion are not appropriate. Appropriate use questions are fine, as are questions about effective teaching methods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comparison of looping vs recursion are appropriate, but consider adding other tags as well, such as &lt;a href=&quot;/questions/tagged/recursion&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;recursion&amp;#39;&quot; rel=&quot;tag&quot;&gt;recursion&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T13:52:09.407" LastActivityDate="2017-07-15T13:52:09.407" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2671" PostTypeId="4" CreationDate="2017-07-15T13:47:17.883" Score="0" Body="Use this tag for questions related to teaching and learning the various forms of repetition in computer programming. Tradeoffs between the various semantic forms can be discussed. This tag is not appropriate for specific recursion questions, though questions relating to comparison of recursive vs repetitive solutions might be. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T13:52:13.393" LastActivityDate="2017-07-15T13:52:13.393" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2673" PostTypeId="5" CreationDate="2017-07-15T17:04:12.067" Score="0" Body="&lt;p&gt;This tag is appropriate for teaching selection structures of all forms. Questions of loops are best tagged with &lt;a href=&quot;/questions/tagged/looping&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;looping&amp;#39;&quot; rel=&quot;tag&quot;&gt;looping&lt;/a&gt;, however. Questions about nesting and how to teach tradeoffs and avoidance of nesting structures are also appropriate. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T17:22:10.923" LastActivityDate="2017-07-15T17:22:10.923" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2674" PostTypeId="4" CreationDate="2017-07-15T17:04:12.067" Score="0" Body="This tag can be appropriately applied to questions on teaching and using `if` and `switch` statements along with similar constructs in other languages. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T17:22:07.620" LastActivityDate="2017-07-15T17:22:07.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2675" PostTypeId="5" CreationDate="2017-07-15T17:37:56.023" Score="0" Body="&lt;p&gt;Quantum computing is a method of computing making use of quantum mechanical effects to make the solving of some problems more efficient.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Theory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As a classical computer is composed of bits, which can be 0 or 1, a quantum computer is composed of quantum bits, or qubits. They can be 0, 1, or anywhere inbetween. Because quantum computing is based on quantum mechanics, much of the math behind quantum computing can be represented using linear algebra. The inbetween states can thus be represented as linear combinations of the basis states $|0\rangle$ and $|1\rangle$, so a state $|\psi\rangle$ of a qubit can be written $|\psi\rangle = \alpha|0\rangle+\beta|1\rangle$. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since states of qubits can be represented as vectors, the gates applied to them can be represented as linear transformations, or matrices. As all gates in classical computing can be constructed from a few gates, all gates in quantum computing can be constructed from single-qubit gates and the controlled-NOT or CNOT gate. Single qubit gates include the NOT gate, the Hadamard gate, phase shift gates, and others.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Construction&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Circuit-based&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;There are many different ways to construct a quantum computer, called realizations. Among these include various forms of optical quantum computing, using photons to represent qubits and optical components such as phaseshifters, beamsplitters, and sometimes nonlinear components like Kerr media and Fabry-Perot cavities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another popular type is ion trap quantum computing, which uses ions trapped by complex electromagnetic fields. Lasers manipulate the state of the ions, which act as qubits. Another type is nuclear magnetic resonance computing, which uses the spins of nuclei to represent qubits. Besides these, there are many other types of quantum computing, using quantum dots, superconduction, or other methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another important consideration is noise and decoherence. Due to these, error-correction schemes have been created to account for changes in qubits' state.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Adiabatic&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Another type of quantum computing is adiabatic quantum computing, which is very different from the types described so far. It finds the minima of systems to find the solution. This could be useful in problems such as the traveling salesman problem.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Usefulness&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While you will never use a quantum computer to check your email, several algorithms have been created which make quantum computers impressively useful, such as Shor's algorithm, which can find the prime factorization of numbers in polynomial time, revolutionizing the field of cryptography. Grover's algorithm can more efficiently search databases.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T18:49:27.203" LastActivityDate="2017-07-15T18:49:27.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2676" PostTypeId="4" CreationDate="2017-07-15T17:37:56.023" Score="0" Body="Use for questions about teaching quantum computing in computer science questions. Don't use for questions about quantum computing itself - those questions belong on another site, probably Mathematics, Physics, or Computer Science. " OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T18:08:20.597" LastActivityDate="2017-07-15T18:08:20.597" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2677" PostTypeId="2" ParentId="2594" CreationDate="2017-07-15T17:38:49.827" Score="2" Body="&lt;p&gt;If you want to start with a single source, I would suggest the book, &quot;Reinforcement Learning: An Introduction&quot; by Sutton and Barto. The authors have an established history and a track record for publishing peer-reviewed articles in the field. While this book is dated, published in 1998, I have not found a better introduction to the field yet. Before you can understand the latest developments in the filed of RL, you need to understand the basics and be able to distinguish between various approaches. Jumping in right away to the latest publications in the field would likely be very difficult to follow. I acknowledge that I likely have bias, having used this book as a Ph.D. student, then using it later as a professor.&lt;/p&gt;&#xA;" OwnerUserId="1737" LastActivityDate="2017-07-15T17:38:49.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2678" PostTypeId="5" CreationDate="2017-07-15T17:38:52.193" Score="0" Body="&lt;p&gt;Data and Program abstraction are fundamental concepts. Even choosing appropriate names for methods and functions can fall under this tag. Questions of higher level vs lower level thinking patterns are especially welcome. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that abstraction can work at both a high level (classes, objects, functions) and a low level (abstracting away details of machine implementation). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-16T12:46:19.023" LastActivityDate="2017-07-16T12:46:19.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2679" PostTypeId="4" CreationDate="2017-07-15T17:38:52.193" Score="0" Body="This tag is for all questions on using and teaching abstraction, such as data abstraction. It is also appropriate for questions related to using abstraction to build and improve program structure, i.e. functional abstraction." OwnerUserId="1293" LastEditorUserId="76" LastEditDate="2017-07-15T18:20:57.953" LastActivityDate="2017-07-15T18:20:57.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2680" PostTypeId="5" CreationDate="2017-07-15T17:39:37.320" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-15T17:39:37.320" LastActivityDate="2017-07-15T17:39:37.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2681" PostTypeId="4" CreationDate="2017-07-15T17:39:37.320" Score="0" Body="For questions about teaching using formal, academic papers or teaching the writing of technical papers. Questions in this vein may be more appropriate on Academia." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T18:27:49.090" LastActivityDate="2017-07-15T18:27:49.090" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2682" PostTypeId="5" CreationDate="2017-07-15T17:44:18.137" Score="0" Body="&lt;p&gt;Biology is the study of living organisms. It is a vast field, with many branches, such as genetics, ecology, botany, zoology, and cell theory.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T18:27:45.440" LastActivityDate="2017-07-15T18:27:45.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2683" PostTypeId="4" CreationDate="2017-07-15T17:44:18.137" Score="0" Body="This tag can be used with tags like cross-discipline to ask about how to teach computer science in a biology class, or alongside biology. Do not use for biology questions; those belong on Biology.SE." OwnerUserId="919" LastEditorUserId="919" LastEditDate="2017-07-15T18:49:33.500" LastActivityDate="2017-07-15T18:49:33.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2684" PostTypeId="5" CreationDate="2017-07-15T17:44:51.823" Score="0" Body="&lt;p&gt;There are at least two reasons for wanting to consider cross discipline teaching. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Improve education in our field&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Improve computational thinking in other fields&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For the first idea, it is helpful to look at the problems faced in other fields and see how solving those problems can enhance the learning of our CS students. To do this requires some knowledge about how professionals in those fields normally work on computational problems. The fields need not be scientific. Literature and History, for example, now make use of big-data techniques. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the second idea, we can help instructors in other fields get the technical help they may need to answer their own questions and to teach the necessary computational techniques to their students. This can be at the elementary school level through graduate school. Collaborations such as this benefit both the other field and our own. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-08T12:20:02.650" LastActivityDate="2017-09-08T12:20:02.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2685" PostTypeId="4" CreationDate="2017-07-15T17:44:51.823" Score="0" Body="For questions about teaching computer science alongside another subject or in cooperation with a professional from another field." OwnerUserId="919" LastEditorUserId="1293" LastEditDate="2017-09-08T12:21:07.247" LastActivityDate="2017-09-08T12:21:07.247" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2686" PostTypeId="2" ParentId="1373" CreationDate="2017-07-15T17:52:15.433" Score="2" Body="&lt;p&gt;I think the most critical thing about lambda functions is that they enable the convenient use of &lt;code&gt;map&lt;/code&gt; and &lt;code&gt;filter&lt;/code&gt; functions on collections and streams. Exercises in using these (and their equivalents in &lt;code&gt;Optional&lt;/code&gt;, which is perhaps just as important, allowing us to get rid of &lt;code&gt;null&lt;/code&gt; as it does) are probably the best way of showing what you can achieve with lambda functions.&lt;/p&gt;&#xA;" OwnerUserId="848" LastActivityDate="2017-07-15T17:52:15.433" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2687" PostTypeId="1" CreationDate="2017-07-15T19:40:14.383" Score="11" ViewCount="3471" Body="&lt;p&gt;What is the best way to take notes when self-studying? I myself swing rather wildly between writing down everything and writing nothing. Obviously, neither is a good approach. I also have troubles with the neatness of my notes, especially because my handwriting isn't exactly pretty. What tips do you recommend for taking good, neat, understandable notes?&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-16T12:18:00.883" Title="Note-taking for self-studying" Tags="|self-learning|notes|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2688" PostTypeId="2" ParentId="2687" CreationDate="2017-07-15T20:45:55.400" Score="5" Body="&lt;p&gt;There are two reasons (at least) for note taking   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;creating a shorter, abstracted, version of your sources that you can save to return to later without recapitulating your whole education.   &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;learning something about the topic - getting it in to your head. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For the former, you can type up notes as you go. Try to focus on the main points, not the detail. Leave lots of references in your notes so that you &lt;em&gt;can&lt;/em&gt; easily return to the source as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if your objective is to actually learn the material from an operational perspective - using it - then typing up notes doesn't help nearly as much. Writing out things long hand is much better - but you may need to practice with the pen. And the fact that it is &lt;em&gt;slow&lt;/em&gt; is also an advantage, since you engage with the material over a longer period. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are studying for a field in which you want to become a professional, take notes by hand with a pen on good paper. In fifty years you will still be able to use those notes whereas the computer notes are likely inaccessible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for long hand writing (even printing) is that your brain is more engaged in the process than it is with typing. That is how you learn - engaging the brain, not the motor muscles in your hands (unless you are learning a physical act like rock climbing or a martial art, where muscle memory is equally important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, to learn some subjects you need to also use the knowledge you are gaining. In math you solve a lot of problems. In CS you write a lot of programs. I History you pose a lot of theses. Whatever is appropriate, but it involves problem solving and &lt;em&gt;creation&lt;/em&gt; in some way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://cseducators.stackexchange.com/a/1168/1293&quot;&gt;https://cseducators.stackexchange.com/a/1168/1293&lt;/a&gt; for additional comments, including the other answers to the same question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you search this site for &quot;changing the brain&quot; other hints will reveal themselves. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-15T20:54:41.147" LastActivityDate="2017-07-15T20:54:41.147" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2689" PostTypeId="2" ParentId="2687" CreationDate="2017-07-15T20:54:02.080" Score="4" Body="&lt;p&gt;Optimal note-taking depends on the goal.  For example, if all you want is to pass a quiz next week, then a quick, flimsy style's more appropriate.  Here, I'll write about taking notes that a life-long learner intends to keep-and-extend into life as a researcher.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Always typed; never written&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Electronic notes are &lt;strong&gt;&lt;em&gt;vastly&lt;/em&gt;&lt;/strong&gt; superior to hand-written notes because:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They can be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;backed up;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;transferred;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;searched (e.g. &lt;code&gt;Ctrl&lt;/code&gt;+&lt;code&gt;F&lt;/code&gt; in documents);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;modified (e.g. add sections, fix mistakes);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;arbitrarily annotated (e.g. adding &quot;Comments&quot; in MS Office applications).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They're cleaner and consistent.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can carry all of them with you always.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A library can fit into a storage device the size of a small coin (e.g. a micro SD card) and kept on a cloud storage account.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Contain active content, such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;links to websites;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;spreadsheets (e.g. Excel sheets can be embedded in Word documents);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;calculations (e.g. the MS Mathematics add-in for Word);&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;and also inactive content like images.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Spell check and grammar check are helpful.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You can use formatting.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Simple formatting like &lt;strong&gt;bold&lt;/strong&gt;/&lt;em&gt;italics&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;More complex formatting is possible through features like &quot;Styles&quot; in MS Word.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tip:  If you don't have it already, you should add styles like &lt;code&gt;code style&lt;/code&gt; to your default style set in your favorite word processor.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Neatly organized with other note materials, like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Downloaded journal articles.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Spreadsheets/databases.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Source code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Date everything&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Everything should be dated; ideally, you'd prefix all filenames with a time stamp of when they were created (originally - not just when the actual file was transferred/copied/downloaded/etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, use &lt;a href=&quot;https://en.wikipedia.org/wiki/ISO_8601&quot; rel=&quot;noreferrer&quot;&gt;ISO 8601&lt;/a&gt; for time stamps and other dates.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/xlbhS.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/xlbhS.png&quot; alt=&quot;xkcd 1179: &amp;quot;ISO 8601&amp;quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-&lt;a href=&quot;https://xkcd.com/1179/&quot; rel=&quot;noreferrer&quot;&gt;&quot;ISO 8601&quot;, xkcd&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Dates are important for a few reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They help you trace through your notes to find something that you recall but need to reread.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Especially in research, understandings constantly change.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to know if your notes or downloaded papers are from a month ago or 10 years ago; it really matters.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;But you still usually want to keep old stuff.  It can help you both trace conceptual histories and aide you in recalling something that you've seen before.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can help you establish the context other authors are in.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If another author writes a lot in a field, their own understanding will evolve in time.  If they contradict themselves over the years, comparing dates can help, because their more recent opinions are generally the result of having gone through a shift in understanding and likely to be more well-considered than their earlier opinions.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Try to keep the formatting future-proof&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You want your notes to endure, so avoid systems that might break in a few years as best you can.  Sometimes document formats like PDF make sense despite being proprietary, though it's best to avoid relying on them as much as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tips:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Avoid relying on third-party solutions whenever you can't easily-and-reliably convert away from them at any time without losing the prior content.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;MS Office applications can often save to open-format variants, so they're an example of something that you can migrate away from.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;But, MS Office add-ins that rely heavily on VBA or other Office-specific mechanisms are far less reliable and migratable, so avoid reliance on them as much as possible.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Avoid third-party solutions that you can't verify for security.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You may not care about security &lt;em&gt;now&lt;/em&gt;, but as you get further into your career and start developing content that you need secure, the potential for a backdoor (whether intentional or due to bugs) may force you away from software that'd otherwise have been nice to use.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Print webpages to files, e.g. using print-to-PDF that many browsers now offer.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Websites can go down or have their content change.  Sure, you might be able to try to look them up on an archiving service with varying degrees of success, but that slows you down.  So, &lt;em&gt;do&lt;/em&gt; save/keep the links, but &lt;em&gt;also&lt;/em&gt; cache a copy of the current version that you've found useful.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Remotely back up.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Keep your notes on various devices - not just separate files on the same computer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Thumb drives aren't known for their reliability, so don't rely on them as absolute security measures, &lt;em&gt;but&lt;/em&gt; if you copy to several thumb drives stored in different locations, that's one cheap way to get a significantly reduced risk profile.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cloud storage accounts can also help.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h3&gt;Absorb non-electronic notes&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you do have non-electronic note materials; e.g., hand-written notes, images, lab book notes, or handouts from a class; if they're potentially important, try to get them on the computer.  Scanning them or snapping a picture with your phone can be better-than-nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Optical_character_recognition&quot; rel=&quot;noreferrer&quot;&gt;Optical character recognition (OCR)&lt;/a&gt; can help make some hand-written notes into electronic copies.  It's not particularly reliable or stress-free just yet, but as long as you have something for future OCR to work on, it remains an increasingly useful tool.&lt;/p&gt;&#xA;" OwnerUserId="39" LastActivityDate="2017-07-15T20:54:02.080" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2690" PostTypeId="2" ParentId="2658" CreationDate="2017-07-15T22:58:14.640" Score="3" Body="&lt;p&gt;I find conferences are good for learning in new fields. Most of them cater to academics but many industry researchers present at them as well. For example Microsoft Research sends people to a lot of mostly academic conferences. ACM and IEEE Computer Society both have conferences. Besides the papers that are presented, often including more material and details than the written papers, there is the opportunity to discuss recent developments with practitioners.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-07-15T22:58:14.640" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2691" PostTypeId="1" AcceptedAnswerId="2700" CreationDate="2017-07-15T23:59:59.657" Score="40" ViewCount="11945" Body="&lt;p&gt;Many instructors teaching with Java started their education using earlier languages such as C or C++ in which pointers are essential. Pointers, however, are not a Java concept, though those same instructors may think of, for example, object references as pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How important is it to teach pointers in a first Java course&lt;/strong&gt; assuming the students don't have much of a prior programming background?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think it is important, say why, but also say how much of pointers do you think should be taught. Just as a metaphor/analogy? Or also including, say, pointer arithmetic?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think it is not important say why also.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that both Python and Ruby are similar to Java in lacking the &quot;pointer&quot; concept. References might be implemented as pointers or not, but the definition of reference is actually abstract in these languages.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I take &quot;pointer&quot; to mean the actual machine address of some entity that might, in principle, be manipulated as an integer, whereas &quot;reference&quot; is a more abstract concept that implies that the entity may be accessed via the reference however implemented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Java language definition is careful not to discuss the implementation of references, explicitly disassociating them from the C-like notion of pointer.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1314" LastEditDate="2017-07-18T22:16:07.950" LastActivityDate="2021-02-21T21:01:51.763" Title="Is it important to teach pointers in a first course using Java?" Tags="|best-practice|object-oriented-paradigm|pointers|" AnswerCount="20" CommentCount="18" ContentLicense="CC BY-SA 3.0" />
  <row Id="2692" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T00:15:45.337" Score="9" Body="&lt;p&gt;As someone who learned to program with ruby, I think that the concept of how a reference to an object works under the hood is &lt;em&gt;vital&lt;/em&gt;. Having the knowledge that &quot;under the hood&quot; my variables may be represented as pointers to values makes certain things much easier to understand. For example, in ruby:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a = Object.new&#xA;b = a.clone&#xA;c = a&#xA;c == b #=&amp;gt; false&#xA;c == a #=&amp;gt; true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Behavior like this could be seen as mind boggling: Why are 2 empty Objects the same, but the other 2 are not? But when given the conceptual knowledge that a pointer is a reference to a value this can be understood because &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; both point to the same Object in memory, while &lt;code&gt;b&lt;/code&gt; points to a different object. Thus they have different Object IDs (&lt;code&gt;a.object_id == b.object_id #=&amp;gt; false&lt;/code&gt;) and:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Define a setter and getter for the test variable&#xA;a.instance_exec { def self.test; @test; end; def self.test=(new_val); @test=new_val; end }&#xA;a.test = &quot;Foo&quot;&#xA;c.test == &quot;Foo&quot; #=&amp;gt; true&#xA;b.test == &quot;Foo&quot; #=&amp;gt; NoMethodError&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In summary, I think that it's very important to include the concept of what a pointer is in the class, but there's no need to go into the down and dirty details unless the students will actually have to work with pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basics of what a pointer is (an integer memory address) should still be mentioned, because that gives basis to the otherwise abstract concept of a &quot;reference&quot;. Students tend to find it useful to actually understand what's going on in hardware in that case.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-07-16T21:45:54.207" LastActivityDate="2017-07-16T21:45:54.207" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2693" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T00:59:27.827" Score="44" Body="&lt;p&gt;Learning about references is important, but I don't feel that learning about pointers is that important for &lt;strong&gt;beginning&lt;/strong&gt; Java students. Certainly intermediate students will need to understand them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I started learning about pointers, I had a hard time grasping them at all until I learned assembly language. Once I learned assembly (for any processor), pointers made sense. It helped that I learned PDP-11 assembly at about the same time I learned C.  Since C is essentially structured PDP-11 assembly language, I was easily able to see the relationship between the pointer structures and the compiled code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java hides the concept of a pointer sufficiently deeply that I would be hard pressed to explain it with java. I can explain java structures in terms of pointers, but have difficulty expressing it the other way around. For teaching pointers and pointer concepts, I would probably use C (yep - plain old C, without the ++) and the x86 assembly language as a starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, it's easy to explain that the JVM is built in C, and java object references are implemented as pointers.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditDate="2017-07-16T01:31:24.033" LastActivityDate="2017-07-16T01:31:24.033" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2694" PostTypeId="2" ParentId="502" CreationDate="2017-07-16T01:27:32.903" Score="3" Body="&lt;p&gt;I would challenge not teaching the correct use of &quot;goto&quot; as being a failure in the curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned programming in BASIC, and learned (eventually) to write clean structured code even though the only way to define flow was through &quot;goto&quot; and the nearly equally evil &quot;gosub&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;COBOL is still the most widely used language in industry. For those who think it's dead or dying, read this link: &lt;a href=&quot;https://cis.hfcc.edu/faq/cobol&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cis.hfcc.edu/faq/cobol&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With 5 billion lines of code being added each year, it is still one of the most important programming languages in the industry ecosystem (as much as I hate to admit it). Due to the aging workforce, a COBOL programmer fresh out of college can jump into a $75K per year entry level position.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The primary flow control feature of COBOL is the &quot;perform&quot; statement. Since COBOL has no concept of scope or stack, everything is global to the program. A java programmer would be tempted to read &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;perform 0990-do-input through 0990-do-input-end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;as comparable to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;doInput();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Unlike java, the paragraph defined between the tags 0990-do-input and 0990-do-input-end has no scope. The behavior of the perform is to execute a jmp to the paragraph, then a jmp back to the point after which it was called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the &quot;perform&quot; statement is essentially a &quot;goto&quot;, &quot;structured programming&quot; is still a very big deal for COBOL programmers, even though the rest of the world is working in languages that won't compile unless the code is &quot;structured&quot; far beyond the way that a COBOL programmer means it.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-07-16T01:27:32.903" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2695" PostTypeId="2" ParentId="2687" CreationDate="2017-07-16T08:08:58.090" Score="2" Body="&lt;p&gt;I find note taking to be the most useful when it's done in the bullet journal way in real time. Make points while listening closely, write down the few terms which resonate, leave space for the rest(which you can write as revision after class). Make the notes well spaced, so that you can also add a few key points which you learnt yourself.&lt;/p&gt;&#xA;" OwnerUserId="2029" LastEditorUserId="58" LastEditDate="2017-07-16T11:56:10.723" LastActivityDate="2017-07-16T11:56:10.723" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2696" PostTypeId="2" ParentId="2687" CreationDate="2017-07-16T12:13:09.347" Score="2" Body="&lt;p&gt;From what I have read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of us agree that digital information is more accessible.&#xA;Some of us agree that paper is more durable.&#xA;Some have stated that writing will produce better memories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will just add a few bits.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't waste your time trying to make notes, for reference, that are already in the books. Use books and the internet for this.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write down anything that surprises you.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write down references.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Summarize your notes every evening, then again at the end of the week, then again at the end of a term. Each time making them shorter.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now that we are going to summarize our notes, we can start by writing on paper in lessons, and summarize to computer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If we use a computer, then use open formats.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If we use a computer, then use a revision control system.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If we use a computer, then synchronize our data everywhere. In computer security there are two main concerns&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don't let the wrong people get hold of confidential/secret information: for this use encryption.&lt;/li&gt;&#xA;&lt;li&gt;Don't lose information, for this copy data everywhere.(use a synchronization system that treats data as immutable).&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2017-07-16T12:18:00.883" LastActivityDate="2017-07-16T12:18:00.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2697" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T12:59:08.360" Score="3" Body="&lt;p&gt;As someone who is self-taught with Python, I'd say it depends on where your students are at. If they're beginning students - no, I don't think you need too. But as your students advance, it becomes a better idea. First, it's a good idea for programmers to understand multiple languages, including languages that use pointers. Second, the term is often thrown around on forums or in books - it's good to know the lingo. Finally, when I did learn the basics of what a pointer was, it was useful for understanding how memory worked - it's good to understand the basics of lower level actions the computer takes to make your program run.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-16T12:59:08.360" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2698" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T13:49:50.920" Score="16" Body="&lt;p&gt;No&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of the way that you learn, you think of them as fundamental, to the way references work. They are not. References do not have to work this way.&#xA;[I would still agree that pointers are fundamental to understanding memory in Von Neumann / Harvard architecture.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java uses references. You can think of these as being pointers, that must point to a valid object of the correct type or to the null object. But there are other ways to thing of references, e.g. like indexes, or like references (in a book or urls). You don't even need to know what is inside.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other languages don't have references. E.g stack based languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore they are not fundamental in any way.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My thought on types of references in Object Orientated Programming. See &lt;a href=&quot;https://richarddelorenzi.wordpress.com/2009/08/10/types-of-reference/&quot; rel=&quot;noreferrer&quot;&gt;https://richarddelorenzi.wordpress.com/2009/08/10/types-of-reference/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A reference is free or fixed:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I fixed reference can not be reassigned.&#xA;e.g. reference in (C++), const pointer (C++)&lt;/li&gt;&#xA;&lt;li&gt;A free reference can be reassigned.&#xA;e.g. pointer in (C++), reference in (C#, Java, python …)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A reference is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;not null-able: Can point to a valid object: e.g. Eiffel reference&lt;/li&gt;&#xA;&lt;li&gt;null-able: Can point to a valid object or null. e.g. Java, C#, python, Traditional Eiffel, Eiffel null-able reference&lt;/li&gt;&#xA;&lt;li&gt;radical: Can point anywhere. e.g.  pointer, and even a reference in (C++)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A reference refers to something that is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Constant&lt;/li&gt;&#xA;&lt;li&gt;Mutable&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-17T17:01:42.267" LastActivityDate="2017-07-17T17:01:42.267" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2699" PostTypeId="1" AcceptedAnswerId="2744" CreationDate="2017-07-16T15:41:00.050" Score="6" ViewCount="1068" Body="&lt;p&gt;One of the most influential texts in computer science is &lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt;. Before changing to a Python-based approach, MIT used this book for their introductory programming course. It is freely available with a number of resources thanks to the &lt;a href=&quot;https://mitpress.mit.edu/sicp/&quot; rel=&quot;noreferrer&quot;&gt;textbook site&lt;/a&gt;. When perusing &lt;a href=&quot;https://mitpress.mit.edu/sicp/adopt-list.html&quot; rel=&quot;noreferrer&quot;&gt;the list of schools using &lt;em&gt;SICP&lt;/em&gt;&lt;/a&gt;, I see that all of them are universities/colleges, which leads me to my question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is &lt;em&gt;SICP&lt;/em&gt; appropriate for an advanced high school computer science course?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I'm thinking of students who have taken two years of AP Computer Science, so they would have completed a year of CS50 AP and a year of Java. I see that UC Berkeley has &lt;a href=&quot;https://berkeley-cs61as.github.io/&quot; rel=&quot;noreferrer&quot;&gt;a self-paced CS class&lt;/a&gt; that works through it. I understand that some things are at the university level for a reason, but I am trying to bridge the gap between post-AP CS classes in high school and intro CS classes in college.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-08-07T17:47:28.670" LastActivityDate="2018-10-11T14:30:19.693" Title="Is SICP appropriate for an advanced high school CS course?" Tags="|curriculum-design|resource-information|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2700" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T16:16:04.027" Score="31" Body="&lt;p&gt;For a beginning course: &lt;strong&gt;&lt;em&gt;no&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have helped clarify behavior for fellow students who got lost by an instructor who explained things in terms of pointers. I have programmed in C, and most of my current programming is done in Rust; I understand pointers and what problems they are best suited to solve. But in Java, you don't have any access to pointers, so explaining pointers only serves to muddy the waters for a student trying to grep the &lt;em&gt;way a computer thinks&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I take the position that a intro-level course should only cover programming, and the actual science of computer science should be postponed to at earliest 102. But my college also lacks a Software Engineering track, and I would argue most people pursuing a CS education actually want that instead of the science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, Java uses &lt;em&gt;pass by reference&lt;/em&gt;. I know exactly what anyone who cares about terminology and grew up in C/++ is thinking as soon as I say that: Java is &lt;em&gt;pass reference by value&lt;/em&gt;. But this is inconsistent with Java's own mental model.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the mental model I have shared multiple times to great effect with students who failed to understand Java's Objects the first time:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A variable is a binding to a value. Thus, when you do &lt;code&gt;Animal c = new Cat();&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt; is a binding to the constructed &lt;code&gt;Cat&lt;/code&gt;. This binding is transparent, and when you use it, you are talking directly to the bound object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in order to facilitate resource sharing, when you pass this object as a parameter to a method, a new binding is created. This binding is to the same object, but is a new binding, so assignment to the binding does not effect the old one (the &lt;em&gt;pass by value&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But because these two bindings are bound to the same object, there is &lt;em&gt;only one object&lt;/em&gt;. This means that mutating this object by using its fields or methods will have the effect that the object the original binding is bound to also changes, because they are the same object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that nothing about this mental model breaks on primitives (or the quasi-primitive String), since primitives can only be changed by reassigning. A slightly higher-level course, or even later in the course once students &lt;em&gt;understand&lt;/em&gt; the shared resource concept, can mention that primitives aren't bindings but rather just their value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once binding misdirection gets multiple layers deep (Objects containing Objects containing etc), it can be useful to talk about and diagram name bindings as a pointer to a value, but that's as far as I go. Stack/Heap doesn't need to be discussed in a Java class: the GC and no stack allocated objects mean that just &quot;somewhere in memory&quot; is all that really needs to be mentioned on object storage until you're at an advanced level where cache coherency or GC overload matters.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Post Script:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've called Java &lt;em&gt;pass by reference&lt;/em&gt; here, which will (and has) riled up a bunch of people who want &lt;em&gt;pass by reference&lt;/em&gt; to only mean what is expressed in C as &lt;code&gt;function(&amp;amp;name)&lt;/code&gt;, which Java is not doing. As such, it may be better to call it &lt;em&gt;pass by resource sharing&lt;/em&gt;, &lt;em&gt;pass by resource binding&lt;/em&gt;, or &lt;em&gt;pass by binding&lt;/em&gt;. In C's definition, you are passing a &lt;em&gt;copy&lt;/em&gt; of the &lt;em&gt;reference&lt;/em&gt; by &lt;em&gt;value&lt;/em&gt; (&lt;code&gt;function(&amp;amp;*name)&lt;/code&gt;). By my reading of Java, though, I argue that we are passing by the reference to the value, because the binding is not separate from the value. This is a terminology problem, and unfortunately, even in a field that relies on unambiguous interpretations, we do overload our terminology.&lt;/p&gt;&#xA;" OwnerUserId="2025" LastEditorUserId="2025" LastEditDate="2017-07-20T02:05:16.683" LastActivityDate="2017-07-20T02:05:16.683" CommentCount="16" ContentLicense="CC BY-SA 3.0" />
  <row Id="2701" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T18:32:43.807" Score="1" Body="&lt;p&gt;Learning pointers is not vital for learning Java, although references become very important once arrays or class instances are introduced given the importance between a reference type or a native type makes when cloning instances (shallow vs. deep copying), passing parameters into methods, or discussions regarding instance hash writing (needed for some of the ordered containers).&lt;/p&gt;&#xA;" OwnerUserId="1565" LastActivityDate="2017-07-16T18:32:43.807" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2702" PostTypeId="2" ParentId="2699" CreationDate="2017-07-16T19:14:32.473" Score="5" Body="&lt;p&gt;The book is quite deep. I'd only consider it in secondary school if the students typically go off to top universities, MIT, Cambridge, Berkeley, or similar. Otherwise, I's strongly suggest that they get a deeper knowledge of whatever language they already know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java version 8 has extensions that permit learning much about functional programming, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning lots of languages shallowly isn't really a path to success. Of course Scheme and Java are sufficiently unlike that studying both opens new thought processes to the student that learning both Java and Ruby would not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But learning how to become a true expert in one language gives you a powerful tool for whatever you want to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is often a shock when a top student at a top secondary school winds up at, say MIT and finds themselves just average. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-16T19:14:32.473" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2703" PostTypeId="2" ParentId="1419" CreationDate="2017-07-16T19:15:01.313" Score="3" Body="&lt;p&gt;As requested by @heather, comment converted to answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When my daughter was 6 I introduced her to Ruby and Postgresql because she wanted to know what i did at work. She soon lost interest, but the analogy I used for her was &quot;cubbies&quot; like she stored her stuff in at kindergarten. Cubbies come in blocks, which are assembled into larger installations. A database is just a very large wall of cubbies, and the DML side of SQL is about getting stuff into or out of the cubbies. DDL side of SQL is making the rules about what is allowed to be put into the cubbies&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-07-16T19:15:01.313" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2704" PostTypeId="2" ParentId="2540" CreationDate="2017-07-16T20:24:32.787" Score="4" Body="&lt;p&gt;I would recommend at least teaching genetic algorithm techniques. The basic principles of heredity, mutation, and selection is fairly easy to grasp, and the ability to watch the intermediate steps between the first iteration and the last can be fascinating to watch. Building the DNA portion of the code requires some intuition though, so problems have to be picked carefully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The later chapters of Daniel Shiffman's &lt;em&gt;The Nature of Code&lt;/em&gt;, especially &lt;a href=&quot;http://natureofcode.com/book/chapter-9-the-evolution-of-code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chapter 9. The Evolution of Code&lt;/a&gt;, is a great resource for basic AI principles based in biological principles.&lt;/p&gt;&#xA;" OwnerUserId="2040" LastActivityDate="2017-07-16T20:24:32.787" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2705" PostTypeId="2" ParentId="2691" CreationDate="2017-07-16T20:45:35.550" Score="6" Body="&lt;p&gt;Pointers as used in C and C++ are a fairly specific implementation of a general concept. The details of that particular implementation are mostly irrelevant--even to people using C and/or C++, many of the details are generally irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general concept is indirection (and dereferencing). Indirection arises in many forms; pointers are one version of it--but so are (for only one example) foreign keys in a SQL database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The strength (and weakness) of pointers in C and C++ is that they're a relatively general implementation of indirection. On one hand, this means that when a student has learned them, most other (more restricted) forms of indirection are fairly easy and straightforward to deal with. On the other hand, it also means that they're a fairly daunting problem for many people approaching indirection for the first time. Pointers in C and C++ are also (for one example) a common place in which the pre- and post-increment and -decrement operators are used--so when students are supposed to be learning about indirection, it's easy for them to get side-tracked into truly ugly details about the degree to which C and C++ specify (and more to the point, mostly &lt;em&gt;don't&lt;/em&gt; specify) sequencing of these operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I think I got somewhat lucky in my timing in learning about such things. The first language in which I was exposed to pointers was Pascal. It had (still has, for the relatively few who still use it) a relatively clean implementation of indirection. You can dynamically allocate an object, and what you get back is a pointer. You can then dereference that pointer to get to the object you allocated. You can do things like assigning and passing pointers as parameters--but that's pretty much it. You don't get into a lot of other details about things like pointer arithmetic that are fairly central to C, but basically irrelevant to the core concept of indirection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java, of course, is a poor choice of vehicles for teaching this concept (or much of anything else, but I digress). It attempts to hide the concept of indirection, which makes it more difficult to teach. At the same time, what it provides is (at best) an extremely leaky abstraction. A language that claims it doesn't use pointers, but does use &lt;code&gt;NullPointerException&lt;/code&gt;s leads to confusion, not enlightenment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that you're apparently already using Java, perhaps it wouldn't be too much of a stretch to provide your students with at least a little exposure to Clojure. This will let you do at least a little exploration of indirection without getting into a lot of ugly details about C and C++ that are difficult to avoid, but irrelevant to the underlying concept.&lt;/p&gt;&#xA;" OwnerUserId="2043" LastActivityDate="2017-07-16T20:45:35.550" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2706" PostTypeId="2" ParentId="1301" CreationDate="2017-07-16T21:13:03.620" Score="1" Body="&lt;p&gt;Show them how integers are actually represented in a computer. This has the benefit of also helping to explain integer underflow and overflow. In addition, it provides the opportunity later on to actually write a program that can convert from one number format to the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two's complement system is not very difficult, and provides a good insight to some of the tricks that computers use to do basic operations. As a CS student, I think that these &quot;go behind the scenes&quot; opportunities help to generate a better appreciation for all the interesting problems students will encounter in the future in CS and Computer Engineering.&lt;/p&gt;&#xA;" OwnerUserId="2040" LastActivityDate="2017-07-16T21:13:03.620" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2707" PostTypeId="2" ParentId="992" CreationDate="2017-07-16T21:57:52.023" Score="4" Body="&lt;p&gt;I'm so glad you found the retraction. I am often surprised at how far that (non-peer reviewed) paper has spread, and how few people know about its retraction. I imagine you've also seen the more recent &lt;a href=&quot;https://computinged.wordpress.com/2016/04/13/where-cs-teachers-see-bimodality-guest-blog-post-from-elizabeth-patitsas/&quot; rel=&quot;nofollow noreferrer&quot;&gt;work calling bimodal distributions in CS grades into question&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the topic of motivation, I found the relevant chapter in &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0470484101&quot; rel=&quot;nofollow noreferrer&quot;&gt;How Learning Works&lt;/a&gt; to be very useful (search &quot;Thermodynamics&quot; in &quot;Look Inside&quot;). There is a case study of a professor faced with a similar dilemma about sharing poor past grades, and then a breakdown of the various factors that influence students' motivation. In short, a supportive environment, student self-efficacy, and student value in learning the material are all needed in order to produce motivation. Making students feel that they may fail even if they put in effort will almost certainly lead to a lack of motivation, leading to poor learning. Luckily, it's possible to address all three factors in the classroom. Personally, my tool of choice has been active, collaborative learning activities like Peer-Led Team Learning and Peer Instruction---always from high-quality sources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe NCWIT at one point recommended that professors make the overall grade distributions public &lt;em&gt;during&lt;/em&gt; the course, so that students could have a realistic view of where they stand. This is for students who may think they are not cut out for CS, when in fact they are doing well in relation to their classmates. Think of the classic case where a female student gets a B and thinks she is terrible at CS, while a male student is pulling a C and still maintains his enthusiasm and drive.&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-16T21:57:52.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2708" PostTypeId="2" ParentId="2632" CreationDate="2017-07-16T22:12:01.673" Score="6" Body="&lt;p&gt;I used to have a role where I supported college students in CS1. I developed the following exercises to address this exact issue:&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Counting code executions&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/dEQsbm.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/dEQsbm.png&quot; alt=&quot;Peer Instruction exercise about for loops&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Text version:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;How many times do each of the following pieces of code execute?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int sum = 0;&#xA;int i;&#xA;for(i = 1 /*A*/; i &amp;lt; 5 /*B*/; i = i + 1 /*C*/)&#xA;{&#xA;    sum = sum + i; /*D*/&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Hint: translate a while loop -- the pieces should execute the same number of times as the do here.&lt;/p&gt;&#xA;&lt;h1&gt;Translating loops&lt;/h1&gt;&#xA;&lt;p&gt;Work on each of these individually first, then partner up. Switch partners between exercises.&lt;/p&gt;&#xA;&lt;p&gt;A. Convert this while loop into a for loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int k = 0;&#xA;while (k &amp;lt; 7) {&#xA;    cout &amp;lt;&amp;lt; &amp;quot;Hola &amp;quot; &amp;lt;&amp;lt; k &amp;lt;&amp;lt; endl;&#xA;    k = k + 2;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What is the output of the loop?&lt;/p&gt;&#xA;&lt;p&gt;What is the value of &lt;code&gt;k&lt;/code&gt; after the loop completes?&lt;/p&gt;&#xA;&lt;p&gt;Watch your peer leader be a human compiler on this loop.&lt;/p&gt;&#xA;&lt;p&gt;B. Convert this for loop into a while loop&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (int countdown = 10; countdown &amp;gt;= 0; countdown--) {&#xA;    cout &amp;lt;&amp;lt; &amp;quot;T-minus &amp;quot; &amp;lt;&amp;lt; countdown &amp;lt;&amp;lt; endl;&#xA;}&#xA;cout &amp;lt;&amp;lt; &amp;quot;BLASTOFF!!!&amp;quot; &amp;lt;&amp;lt; endl;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What is the value of the countdown after the loop completes?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you teach very well maybe the questions are too easy, but in my setting they led to a lot of improvement. Notice that I included a counter increasing by something other than 1, and a loop counting downwards, since my students often didn't see examples like that in class.&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:43.100" LastActivityDate="2020-10-06T03:17:43.100" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="2709" PostTypeId="2" ParentId="2542" CreationDate="2017-07-16T23:22:29.330" Score="6" Body="&lt;p&gt;When I started my last job, there were many problems with the CS &quot;tutors&quot; at the CC and university I worked at:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tutors actually didn't know the content that well themselves.&lt;/li&gt;&#xA;&lt;li&gt;Tutors &quot;explained&quot; a lot, and used the sessions as hangout time with other buddies, or as a sort of show-off time.&lt;/li&gt;&#xA;&lt;li&gt;Attendance at tutoring sessions was (unsurprisingly) low.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If no one knows the content, no one knows how to teach the content, and no one is welcoming to new students, what can you do?? I opted for a fairly time-intensive solution because it fit within my role, but others may benefit from at least parts of this model.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started a &lt;strong&gt;Peer-Led Team Learning&lt;/strong&gt; program, with training in &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;CS content&lt;/li&gt;&#xA;&lt;li&gt;CS pedagogical techniques &lt;/li&gt;&#xA;&lt;li&gt;supportive culture&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;PLTL Leaders didn't just hold tutoring hours. They also led weekly PLTL sessions where they helped students learn CS in a structured setting. This provided a way for students to meet the Leaders, and a context that ensured the students learned something and that the Leaders were trained. PLTL leaders also helped out in the classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PLTL is a proven model with a &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0130288055&quot; rel=&quot;noreferrer&quot;&gt;handbook&lt;/a&gt;, a &lt;a href=&quot;https://sites.google.com/site/quickpltl/pub-database&quot; rel=&quot;noreferrer&quot;&gt;research tradition&lt;/a&gt;, and &lt;a href=&quot;http://pltlis.org/&quot; rel=&quot;noreferrer&quot;&gt;support&lt;/a&gt;. I had to make my own exercises for CS1 / CS2, but the model for how to run a PLTL program is already well-established---simply follow the handbook. PLTL emphasizes collaborative work (usually on paper), and Leaders prompt and direct students, but do not give away the answers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being a PLTL leader was advertised as a high-status position, a leader in both content knowledge &lt;em&gt;and&lt;/em&gt; professionalism. I was inspired by &lt;a href=&quot;https://www2.cs.arizona.edu/slprogram/&quot; rel=&quot;noreferrer&quot;&gt;Section Leader programs&lt;/a&gt; at many universities. PLTL Leaders were paid hourly. At the university, I was able to set up a system of interviews to hire new PLTL leaders--this gave another level of professionalism, and also gave students much needed practice in whiteboarding and interviewing, even if they didn't get the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Weekly trainings bootstrapped the tutors' content and pedagogical knowledge. We worked through the packet of problems for that week's PLTL session ahead of time as a group. This ensured that everyone knew the content, and also knew how to prompt students to solve the problems. We practiced pedagogical techniques like tracing code, drawing memory diagrams, and prompting students to collaborate. We typically spent 30 minutes talking about issues like making sure students didn't feel afraid of looking stupid or asking questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This model does require buy-in from instructors to motivate PLTL attendance. Some CS1/CS2 teachers made PLTL attendance mandatory, others offered extra credit. In an ideal world, the CS1 / CS2 teachers would write the PLTL materials and help run the program, but it fell on me in my setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over time, student coordinators took over running the training sessions. Once problem sets were developed, they were re-used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Starting this program was one of the highlights of my job. I'm happy to say that these students did become a strong part of the department's culture over the 2.5 years I ran the program, raising the bar for what professors thought their students could be capable of. Many of those students now have great jobs in industry. &lt;a href=&quot;https://twitter.com/katieirenec/status/730866698086055936&quot; rel=&quot;noreferrer&quot;&gt;I miss 'em :')&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-16T23:22:29.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2710" PostTypeId="1" AcceptedAnswerId="2717" CreationDate="2017-07-17T00:13:54.703" Score="8" ViewCount="508" Body="&lt;p&gt;As an tutor for introductory CS classes, I often come across students that have a very rigid understanding of a programming language up to what they have been taught so far. This most often manifests itself when they ask the question &quot;I can do that? I thought that...&quot;. I've most often seen this when showing students that branching and looping statements can be nested. It has even occurred when dealing with parenthesis and order of operations in mathematical expressions. As a concrete example, in Python many containers allow access via brackets:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# dictionaries&#xA;foo = dict()&#xA;foo[&quot;a&quot;] = 10&#xA;foo[&quot;a&quot;]&#xA;# deques&#xA;bar = deque('asdf')&#xA;bar[0]&#xA;# and many more...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;These students usually repeatedly struggle with this every time a new construct is introduced, as they fail to see how certain concepts from one part of the language extend to the other parts. In this case, it is that brackets are used for accessing elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, how can I influence the student's thinking process from &quot;This language only allows me to do this&quot; into &quot;Can this language do this?&quot;, and help them expand upon what they have already seen and understood?&lt;/p&gt;&#xA;" OwnerUserId="2040" LastActivityDate="2017-07-17T15:10:56.627" Title="How can I help students develop intuition about a programming language?" Tags="|undergraduate|syntax|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2712" PostTypeId="1" AcceptedAnswerId="2715" CreationDate="2017-07-17T00:54:35.037" Score="12" ViewCount="882" Body="&lt;p&gt;In my experience (working with college freshmen mostly), I've tried to emphasize precise vocabulary about the concepts and syntax related to creating and changing variables. This is wording like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;identifier&lt;/li&gt;&#xA;&lt;li&gt;declare&lt;/li&gt;&#xA;&lt;li&gt;initialize&lt;/li&gt;&#xA;&lt;li&gt;assignment&lt;/li&gt;&#xA;&lt;li&gt;token&lt;/li&gt;&#xA;&lt;li&gt;execute&lt;/li&gt;&#xA;&lt;li&gt;compiler&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My reasoning is that these words are immediately necessary to understand error messages, intermediately necessary to Google things, and necessary in the long term to communicate to other programmers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, some teachers I've talked to try to avoid this type of language because they feel it introduces another barrier to their students' understanding. I guess they'd say I'm trying to introduce compiler concepts too early.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's your view? How do you know when there's too much jargon?&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="27" LastEditDate="2017-07-17T22:45:32.987" LastActivityDate="2017-07-25T01:12:16.603" Title="Jargon/Vocab about variables--- yes or no?" Tags="|introductory-lesson|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2713" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T01:37:23.230" Score="3" Body="&lt;p&gt;Use the vocabulary for the things that are directly relevant to what the students are learning, so they can intelligently talk about what they are doing. This means that students should definitely know the verbs associated with programming. Variables need to be declared, objects need to be instantiated, and programs need to be compiled/interpreted. You can't really talk about code without these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about the nouns? I usually don't focus much presenting on these. Unless the they aren't native English speakers, students will (eventually) understand what an identifier or token is without much input from the lecturer. There are nouns you should obviously go over, however, such as variables, objects, and data type. &lt;/p&gt;&#xA;" OwnerUserId="2040" LastEditorUserId="27" LastEditDate="2017-07-17T01:52:25.083" LastActivityDate="2017-07-17T01:52:25.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2714" PostTypeId="2" ParentId="2710" CreationDate="2017-07-17T01:50:50.950" Score="4" Body="&lt;p&gt;If the student is asking such questions, then we're already off to a great start.  You have meta-cognitive learners!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I must caution you to be reasonable about your expectations.  You write that &lt;em&gt;&quot;these students usually repeatedly struggle with this every time a new construct is introduced, as they fail to see how certain concepts from one part of the language extend to the other parts.&quot;&lt;/em&gt; This is perfectly normal. For students who don't naturally think as programmers, there is no &lt;em&gt;magic bullet&lt;/em&gt; that will prevent us from having to expound on new data types.  That is what teaching is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we &lt;em&gt;can&lt;/em&gt; do is make sure that the understandings that students develop now are rich enough that they can at least be useful later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest that you are asking how to get students roughly to levels 3-4 on &lt;a href=&quot;https://www.edutopia.org/blog/webbs-depth-knowledge-increase-rigor-gerald-aungst&quot; rel=&quot;noreferrer&quot;&gt;Webb's Depth of Knowledge&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is the care, then you must first make sure that your students are comfortable in their level 1 and level 2 knowledge.  A question like, &lt;em&gt;&quot;can we&lt;/em&gt; &lt;strong&gt;&lt;em&gt;do&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;that?&quot;&lt;/em&gt; is a level 1 question.  The students must &lt;em&gt;see&lt;/em&gt; the forms, and they must be able to &lt;em&gt;reproduce&lt;/em&gt; the forms.  That means exposure (which is possibly what you were trying to get away from?) to many uses and contexts for the data structure or algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Level 2 involves comparing and contrasting, summarizing, predicting, and describing.  We often learn levels 1 and 2 simultaneously.  &lt;em&gt;However, just because students often learn these together does not mean that we as teachers are free to avoid teaching both.&lt;/em&gt;  We cannot assume knowledge from a student until we have tested it.  In a tutoring session, that can be very informal, but we do need to make sure that level 2 is really intact if we are to make reasonable headway into level 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Level 3 (quote &lt;a href=&quot;https://www.polk-fl.net/staff/professionaldevelopment/documents/WebbKeynote.ppt&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;) &quot;requires deep understanding exhibited through planning, using evidence, and more demanding cognitive reasoning&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask your students to analyze and compare two different approaches. Ask them to solve larger, multi-step problems.  Check in for understanding on every part of the problem.  Ask them to generalize, explain the structure, and connect these ideas to other ideas, either from other data structures, or from other fields entirely.  This last part is especially important; drawing connections between this information and older information (particularly from other fields) creates a rich intellectual landscape from which students may draw in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sorry that there is no magic bullet, but hopefully this should bring the students the fluidity you desire.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-17T01:50:50.950" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2715" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T02:00:54.577" Score="10" Body="&lt;p&gt;Some of these words are entirely necessary, some (such as tokenize) you might want to avoid early on.  However, I would suggest this as a guiding principle: use vocabulary as is necessary to get at the core goals you hold for your students, but do not emphasize vocabulary for its own sake.  A great visualization or metaphor at the very start &lt;em&gt;(after all, freshmen!)&lt;/em&gt; will take your students much further along than a series of fine distinctions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a fun little article about &lt;a href=&quot;http://nymag.com/scienceofus/2016/06/10-extremely-precise-words-for-emotions-you-didnt-even-know-you-had.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;10 Extremely Precise Words for Emotions You Didn’t Even Know You Had&lt;/a&gt;.  The title is correct; when you read through the article, you will find emotions that you have experienced, but never described.  Nevertheless, you were able to experience the emotions perfectly fully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, with the help of a great diagram or metaphor, students will be able to utilize concepts that are more advanced than they can fully describe.  That's okay - great even! - and later coursework can help them nail down finer distinctions as they advance.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-25T01:12:16.603" LastActivityDate="2017-07-25T01:12:16.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2716" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T02:04:06.023" Score="6" Body="&lt;p&gt;Certainly mention the vocabulary, but I wouldn't make it mandatory to learn the words or use them correctly in class. What matters is that the students understand the concepts that go with the words, not that the know the dictionary definitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Introduce all the vocabulary when it comes up in class, but don't be a stickler, especially early on. Let the students get a feel for the different types, so that they have concepts to associate the words with, rather than associating the words with (possibly incorrect) ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also make sure to draw the distinctions when talking about the different types, so that the students mentally understand the different types conceptually before actually assigning vocab to the concepts.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-07-17T02:04:06.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2717" PostTypeId="2" ParentId="2710" CreationDate="2017-07-17T04:12:05.740" Score="5" Body="&lt;p&gt;I think this is a structure of knowledge problem. I suspect the disconnect is that you have organized your knowledge in a way your students haven't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You understand that strings, lists, dicts, and deques are all something called containers. You also understand that all containers can be accessed with &lt;code&gt;[]&lt;/code&gt;. Therefore, it's straightforward to consider that &lt;code&gt;[]&lt;/code&gt; could be applied to any new container you come across.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But do your students understand this organization of types in terms of containers? I bet they don't yet. They are still thinking about each type as an individual entity, disconnected from others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Experts' knowledge is organized much more effectively than novices'—— that's what it means to be an expert. (Cite: &lt;a href=&quot;https://www.nap.edu/read/9853/chapter/5#32&quot; rel=&quot;noreferrer&quot;&gt;Relevant section from How People Learn&lt;/a&gt;, &lt;a href=&quot;https://www.csun.edu/science/ref/reasoning/how-students-learn/2.html&quot; rel=&quot;noreferrer&quot;&gt;summary from Cal State Northridge&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, novices' understanding is tightly tied to shallow features like syntax. It will take a while for them to see the deeper organizational features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can help your students become more like experts by explicitly helping them organize their knowledge. If it's not overwhelming for the students, teach them what a container is and what all containers have in common. More generally, connect concepts together to help support students' development of those expert-level connections. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-17T04:12:05.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2718" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T04:44:16.053" Score="4" Body="&lt;p&gt;Maybe you are thinking about memory management and pointer arithmetics. There is no need for that in the first course.&lt;/p&gt;&#xA;&lt;p&gt;However I think that it is important to teach students that in Java object are created on heap and you have named pointers (which they call references) that you pass by value when you call a method (similarity with C language).&lt;/p&gt;&#xA;&lt;p&gt;So Java does have pointers. What Java lacks, is pointer arithmetic.&#xA;For example if you define an object like this: &lt;code&gt;Integer pointsToAnInt = 5&lt;/code&gt; that will create a pointer 'pointsToAnInt' to a location in memory that contains number 5.&lt;/p&gt;&#xA;&lt;p&gt;If you say &lt;code&gt;pointsToAnInt = null;&lt;/code&gt; and then call &lt;code&gt;pointsToAnInt.intValue();&lt;/code&gt; you will get &lt;strong&gt;&lt;code&gt;NullPointerException&lt;/code&gt;&lt;/strong&gt; because that &lt;strong&gt;pointer&lt;/strong&gt; points to null.&lt;/p&gt;&#xA;&lt;p&gt;From the Java language specification:&#xA;&lt;a href=&quot;http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chapter 4. Types, Values, and Variables&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;An object is a class instance or an array. The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So for marketing reasons Java didn't mention pointers and they called them references but essentially you use pointers and you can get &lt;code&gt;NullPointerException&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand C++ can pass values by references which Java cannot because &lt;a href=&quot;https://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value&quot;&gt;Java is pass by value&lt;/a&gt;. So references should be something different but in Java a reference to an object is just a pointer to that object and you pass that pointer by value through stack while objects are created on heap and they are garbage collected when there are no more pointers that point to them.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&#xA;By using &lt;code&gt;sun.misc.Unsafe&lt;/code&gt; you can convert an int to an arbitrary address of an entity. In that case you can also have pointer arithmetic. In my personal experience telling people that Java does not have pointers did a great damage to understanding Java and introduced confusion among people to think that Java is pass-by-reference.&lt;/p&gt;&#xA;&lt;p&gt;In C# you can pass by reference with &lt;code&gt;ref&lt;/code&gt; keyword so you can make a swap function that you cannot make in Java &lt;code&gt;static void SwapStrings(ref string s1, ref string s2)&lt;/code&gt;. If you omit keyword &lt;code&gt;ref&lt;/code&gt; then you get the same behavior like in Java and that is &lt;strong&gt;pass by value&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2054" LastEditorUserId="2054" LastEditDate="2021-01-29T21:51:38.687" LastActivityDate="2021-01-29T21:51:38.687" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="2719" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T04:58:46.583" Score="4" Body="&lt;p&gt;Commonly, the jargon I see in class (former student, new to being a teacher assistant) is meant to serve one single purpose: increasing student understanding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems relatively straightforward, but it is not as simple. The jargon is meant to make expressions and keywords easier to explain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If one explains the jargon ahead of time (each subject has its related jargon explained before delving deep into the material) then one can use the jargon &lt;em&gt;while&lt;/em&gt; teaching, which is a powerful aid. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you explain what you mean by &quot;declare&quot; and &quot;identifier&quot;, then whenever you use those words, it's as if you used the &quot;new&quot; keyword in java. Java knows &lt;strong&gt;exactly&lt;/strong&gt; how to deal with that keyword. Your students will know precisely what to do when you say &quot;create a declaration for so and so with an assignment to such and such...&quot;. This worked wonders with students I have worked with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key point is to &lt;em&gt;explain your jargon&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-17T04:58:46.583" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2720" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T14:15:48.983" Score="7" Body="&lt;p&gt;I think you're asking the wrong question. In my opinion the right questions are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is it important to teach pointers at some point in the curriculum?&lt;/li&gt;&#xA;&lt;li&gt;If so, which courses in the curriculum are most suitable for teaching them? (Plural to cover cases where some of the courses are optional, or where students may not grasp the concept the first time and may need reinforcement later).&lt;/li&gt;&#xA;&lt;li&gt;Are there any courses which are taught earlier and which will suffer from students not understanding them?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think it should be self-evident that pointers don't need to be taught in the first programming course: if it isn't, then consider that the first course may use e.g. Haskell, and it would be crazy to try teaching pointers using Haskell. (Of course, if the first programming course uses C then question 3 becomes relevant).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a stronger statement can be made: it may be that the best course to teach them isn't a programming course at all. If pointers were mentioned at all in the university CS course I studied then it was either in &lt;em&gt;Computer Architecture&lt;/em&gt; or &lt;em&gt;Comparative Programming Languages&lt;/em&gt; (probably in the lecture on BCPL).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question 1 is something that we can debate without additional context. But we can't answer questions 2 and 3 unless you supply considerably more detail about the curriculum. And since the question posed is really a subquestion of questions 2 and 3, I don't think we can give you a useful answer to the question as stated.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-07-17T14:15:48.983" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2721" PostTypeId="2" ParentId="2547" CreationDate="2017-07-17T14:26:24.743" Score="2" Body="&lt;p&gt;If you just throw out a few token examples and move on, I'm afraid you won't be giving a true picture of the situation. Those famous women didn't just come out of nowhere. There were thousands of women working in the field behind the exceptional cases. Women were a vital, irreplaceable part of the early history of computing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Originally &lt;a href=&quot;https://en.wikipedia.org/wiki/Human_computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;computer&quot; was a job title&lt;/a&gt;, not a type of machine. For the first half of the 20th Century, probably the vast majority of computers were in fact female.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/33PlS.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/33PlS.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&#xA;Here's a picture from 1949 of the &quot;Computer Room&quot; at the NACA High Speed Flight Station (now NASA Armstrong Flight Research Center).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the managers were (of course) men, the staff who worked at Bletchley Park during WWII decrypting the German codes &lt;a href=&quot;https://en.wikipedia.org/wiki/Women_in_Bletchley_Park&quot; rel=&quot;nofollow noreferrer&quot;&gt;were largely women&lt;/a&gt; (8,000 of them, or 75% of the work force).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/k8YGk.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/k8YGk.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&#xA;Here's a picture of the Mark 2 Colossus (one of the first programmable electronic computers) at Bletchley Park during WWII, with its operators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important thing to note here is that the present situation where women stereotypically aren't into math or computing &lt;strong&gt;is entirely cultural&lt;/strong&gt;. Back when we had a different culture, things were different. This is likely the reason why so many pioneers in the field of computing were women.&lt;/p&gt;&#xA;" OwnerUserId="1139" LastActivityDate="2017-07-17T14:26:24.743" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2722" PostTypeId="2" ParentId="2710" CreationDate="2017-07-17T15:06:14.333" Score="1" Body="&lt;p&gt;One of the issues with new students is that they are likely to think at a very concrete level. To program effectively, just as to be good at math, students need to be able to understand and form abstractions. In other words the students need to start to think at a higher level so that the concrete detail can be largely ignored most of the time. But this only works if the abstractions are accurate and compose-able. So to follow up on the &lt;a href=&quot;https://cseducators.stackexchange.com/a/2717/1293&quot;&gt;answer of user @nova&lt;/a&gt; let me suggest that using analogy and/or metaphor is a useful way to do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the specific case you mention (access to members of a collection) you can use your classroom itself as the collection and the names of the students as keys. Or, for arrays and such like you can &quot;number the seats&quot; and refer to &quot;the student in seat 5&quot; for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Building nested structures is another thing you mentioned. Russian Nesting Dolls (Matryoshka) can be useful for this. Structures inside structures. A box full of boxes can be imagined. An &quot;if&quot; box inside a &quot;while&quot; box, for example. You could use a  physical analogy, a projected image, or just &quot;imagine a box full of other boxes that may contain yet more boxes.&quot; Lots of things so that the student gets a mental picture without looking at the concrete details of code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I'm guessing that you have mental pictures for most of the things you are trying to teach. Figure out a way to share them. Even more powerful is to suggest some metaphor or mental image and then ask the students for something similar in their &quot;Own Words&quot; (&lt;a href=&quot;https://en.wikipedia.org/wiki/Pedagogical_patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Pedagogical Pattern&lt;/a&gt;). In hearing the answer you can get an idea of their level of comprehension and correct it or move on. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-17T15:06:14.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2723" PostTypeId="2" ParentId="2710" CreationDate="2017-07-17T15:10:56.627" Score="2" Body="&lt;p&gt;Well, my first thought is an analogy. Lots of things follow patterns, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;English is a massive, complicated, crazy language, that often disobeys its own rules. (Python is much nicer.) But it, like most languages, has certain patterns. Like tenses, for instance - I drank some milk earlier tonight, but I'll drink some water tomorrow, and I'm drinking juice right now. There's other patterns, too - we don't often use 'methinks', but 'I think', or while texting, abbreviating words quite a bit as in 'lol' or 'ttyl'. We often prefer to use first person when talking, but second person in commercials, and a mix of third and first person in books. Roots in words can help you figure out the word's meaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In math, most operations have an inverse (subtraction and addition, multiplication and division, multiplying a matrix by a matrix and multiplying an inverse of a matrix by a matrix, etc). Operations involving apples and objects tend to involve integers, while bank accounts use numbers that can be represented as a ratio. Formulas involving circles tend to include $\pi$. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In physics, quantum mechanics involves more linear algebra, and it all uses calculus. Papers in physics tend to be more theoretical or more experimental, and experimental ones must show the statistical significance of their results. Physicists tend to be either theoretical or experimental, not both (a famous example being Pauli's ability to break experiments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Python, brackets with an index or value are used to access elements of a variable commonly, things can often be shortened to make them cleaner and more efficient. Readability and indentation is a must. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use these patterns to jump to conclusions all the time - figuring out words from roots and context, parsing out the pronunciation of a word using phonics, guessing at the meaning of a particular symbol in math, generalizing results, and extending them. Python is no different. Picking out patterns and generalizing is right quite often, and is faster than painstaking trial and error, or reading through every word of documentation.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My second thought is pointed exercises. Have them access variables in a dictionary in a myriad of exercises. After quite a few exercises have them access a part of a string. They'll probably unthinkingly do brackets - and it won't break. Be nearby so you can point this out. Do more exercises with different variable types and point out the connection each time. Do this with other things besides the brackets. Ask questions like, &quot;Where is this syntax familiar from?&quot; or &quot;Have you seen this technique before?&quot; or &quot;Does this look familiar?&quot;. Eventually, they'll catch on. Have them do something completely different (like nesting loops, etc) and watch while it &lt;em&gt;doesn't&lt;/em&gt; break. Encourage them to experiment. &lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-17T15:10:56.627" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2724" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T15:11:32.070" Score="4" Body="&lt;p&gt;It's a balance, as with all things. Concepts are of course more important than vocabulary, but it's awfully hard to convey your questions and ideas without vocabulary. Just look at some old math papers (like, &lt;em&gt;really&lt;/em&gt; old, before the invention of the plus sign old) to see what I mean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of checks to make sure concepts are coming first:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure they know what the vocab means. I've read books where jargon and words were used in a confusing and improper manner. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure they can generally explain &lt;em&gt;without&lt;/em&gt; the vocab to another person, maybe not in your class. That's often the true test of understanding. There's a great story about Richard Feynman that he was trying to prepare a lecture on an advanced topic for an undergraduate audience, but he later told a faculty member that he couldn't break it down to that level, meaning that he didn't understand it well enough. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A couple of checks to make sure they know enough vocab:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Can they figure out most compiler/interpreter errors? (Most) Python errors, for example, are fairly clear, so if they know some vocab, they should be able to figure most out.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can they find the answer to their problem using google? A student who is having a problem with a for loop but does not know that it is called a for loop will have a hard time finding a solution.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can they follow the discussion in a simpler scientific paper, or later chapters in their textbook, or are do they have to keep a dictionary by at all times?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-17T15:11:32.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2725" PostTypeId="5" CreationDate="2017-07-17T16:01:04.590" Score="0" Body="&lt;p&gt;Data Encapsulation and Data Abstraction are general terms for the collection of homogeneous and heterogeneous data into a single structure. Data Structures are concrete realizations of the concept. Many languages provide a rich set of structures in the language or, more usually, in associated libraries. Not all useful structures are provided, however, so the programmer sometimes needs to build her or his own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Homogeneous structures contain data of the same type. Heterogeneous structures contain data of possibly different types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The operations of data structures typically, but not necessarily, include insertion and removal. Some support highly structured organization (sorted lists) and others only loose collections (sets). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often, but not necessarily, data in the structure is accessed for usage elsewhere rather than having the structure itself provide all operations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag does not envision that an object in an object-oriented programming language is a data structure. There are better tags available. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-17T16:03:07.730" LastActivityDate="2017-07-17T16:03:07.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2726" PostTypeId="4" CreationDate="2017-07-17T16:01:04.590" Score="0" Body="This tag is for questions related to both data abstraction/encapsulation in general and for the usage of the various data structures provided by language or built by programmers. Stack and Queue are classic examples. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-17T16:03:05.120" LastActivityDate="2017-07-17T16:03:05.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2727" PostTypeId="5" CreationDate="2017-07-17T16:13:53.510" Score="0" Body="&lt;p&gt;Advising students is a normal part of any teacher's job at all levels. Students are often puzzled about small things and large. They need good advice. Sometimes the advice you need to give them is unwelcome, so be sure you are right before you speak or write. It is a profound responsibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions here can be about how and when to give advice as well as about the appropriateness of advice in certain contexts. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-17T17:05:43.763" LastActivityDate="2017-07-17T17:05:43.763" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2728" PostTypeId="4" CreationDate="2017-07-17T16:13:53.510" Score="0" Body="This tag is for all questions related to advising students as well as for such things as recommendation letters. Advice includes that for specific classes, for choosing or changing major concentrations, employment advice and the like. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-17T17:05:47.687" LastActivityDate="2017-07-17T17:05:47.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2729" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T16:23:01.693" Score="8" Body="&lt;p&gt;No, you don't need to talk about pointers in an introductory Java class. You should talk about &lt;strong&gt;references&lt;/strong&gt;, but even then you should keep it at a very high level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best tutorial on references I've seen is &lt;a href=&quot;http://www.javaranch.com/campfire/StoryCups.jsp&quot; rel=&quot;noreferrer&quot;&gt;Cup Size -- a story about variables&lt;/a&gt; and its follow up &lt;a href=&quot;http://javaranch.com/campfire/StoryPassBy.jsp&quot; rel=&quot;noreferrer&quot;&gt;Pass-by-Value Please&lt;/a&gt;. These talk about variables as cups that can hold different items, and references as remote controls that you can put in a cup. You can have two remote controls in two cups that control the same TV, and replacing one of the remote controls with another one that controls a different TV doesn't affect the first TV at all. This also clears up the misconception that Java is &quot;pass-by-reference for objects&quot; when in fact Java is always pass-by-value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this kind of high-level language is what you should be using. You shouldn't get into the low-level details, and you shouldn't even use the word &lt;em&gt;pointer&lt;/em&gt; at all.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-17T16:23:01.693" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2730" PostTypeId="1" AcceptedAnswerId="2732" CreationDate="2017-07-17T19:05:25.547" Score="8" ViewCount="756" Body="&lt;p&gt;I have a class undergraduate students (2nd and 3rd year) who have had at least two terms of college/university level programming courses using a procedural programming language (typically C++), and often a term or two in other languages, also procedural. They have usually, though not a requirement, taken programming in high school, which was also based on one or another of the procedural languages. In the other computer classes they might have taken, or be taking concurrently, they have a procedural language as a secondary exposure. For example, the web design classes use JavaScript and PHP extensively. Bottom line is that these students are well versed (indoctrinated) in the imperative paradigm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I have to teach them functional programming, and help them to adjust to a new way of thinking about the problems and solutions. In other words, I want them to be able to write a Scheme program, not a C++ program &lt;em&gt;translated&lt;/em&gt; into Scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So then, the question here is this: &lt;em&gt;in the switch from procedural to functional programming, what are the critical &quot;habits&quot; to change in the students' minds so that they are able to grasp the functional paradigm enough to get them programming in the new language rather than writing old programs in the new style?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2017-07-18T01:33:55.130" LastActivityDate="2017-09-01T22:27:00.243" Title="What 'procedural' habits to break when teaching 'functional' programming?" Tags="|functional-programming|programming-paradigms|imperative-programming|scheme|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2731" PostTypeId="2" ParentId="2730" CreationDate="2017-07-17T19:37:24.650" Score="3" Body="&lt;p&gt;When I created my course for Scheme (under not dissimilar circumstances from yours), I used &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0262560992&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Little Schemer&lt;/a&gt; as my primary source.  The book itself rapidly became too dense for my HS students, so I designed my lessons around each chapter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My course, then, like the book, took the students slowly through a very foreign landscape. We took no effort to &lt;em&gt;translate&lt;/em&gt; imperative programming at all.  Instead, we were &lt;code&gt;cons&lt;/code&gt;ing and &lt;code&gt;cdadr&lt;/code&gt;ing up a storm, playing with lists, playing with atoms, and creating tiny programs in this alien (elephant-ridden) landscape together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was a downside to this, however: because it was presented in a truly functional paradigm, my students did &lt;em&gt;not&lt;/em&gt; advance quickly, and did not become nearly as capable in Scheme as they were in Java, Javascript, or C.  They just couldn't get the breadth and depth of experience within the functional idiom over the course of two months that they could with imperative programming in two years. Nevertheless, the work that they did truly was native Scheme.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-17T19:37:24.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2732" PostTypeId="2" ParentId="2730" CreationDate="2017-07-17T20:10:27.940" Score="4" Body="&lt;p&gt;I undertook this study myself about a year ago. I started working through the Programming Languages MOOCs on Coursera (&lt;a href=&quot;https://www.coursera.org/learn/programming-languages-part-a/home&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part A&lt;/a&gt; &lt;a href=&quot;https://www.coursera.org/learn/programming-languages-part-b/home&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part B&lt;/a&gt; &lt;a href=&quot;https://www.coursera.org/learn/programming-languages-part-c/home&quot; rel=&quot;nofollow noreferrer&quot;&gt;Part C&lt;/a&gt;), which are based on &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;a UW course of the same name&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I didn't really know what I was getting into, but it sounded interesting. Before I knew it, I was learning a radically different approach to programming first with SML and now with Racket (Ruby is up next). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some of the key ideas that were a major departure from my having programmed in C and Python:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Avoid mutation.&lt;/strong&gt; Over and over again the professor emphasizes why mutation is a bad thing (or at least potentially problematic). From the world of C where I learned about declaring and updating variables almost immediately, this forced me to think differently about the information my programs contained and processed.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Don't call them variables.&lt;/strong&gt; As a continuation of the above, they aren't variables (because after all they shouldn't &lt;em&gt;vary&lt;/em&gt; because they don't mutate); rather, call them &quot;value bindings.&quot; Moreover, these value bindings exist in an &lt;em&gt;environment&lt;/em&gt;. This latter idea is essential (and has only recently sunk in) for understanding function closures.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Think recursively.&lt;/strong&gt; Of the 3+ assignments I've completed for Part A and Part B, thinking recursively has been an essential component for creating elegant, efficient solutions. Indeed, in some cases it's been the &lt;em&gt;only&lt;/em&gt; way to solve a problem thanks to the goal of avoiding mutation. This is not to say that recursion doesn't exist in other languages (because it obviously does), but it's been a more fundamental element to the design of solutions using functional programming languages.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Those are my big three; I'm sure there are more. Obviously understanding anonymous functions, higher-order functions, first-class functions, and all that comes with them (e.g. currying) is what functional programming entails. However, this content wasn't a &quot;rewiring of old habits&quot; in the same way that the above points were.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it's worth, I appreciate what C has taught me about what happens on a lower level, but I think studying a functional language &lt;em&gt;qua&lt;/em&gt; an approach to programming has made me an overall better programmer.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-17T20:10:27.940" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2734" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T20:20:51.610" Score="4" Body="&lt;p&gt;Here is what it is important to know early.  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Primitive type variables store their value directly (I say:  &quot;Primitive types point directly at their values.&quot;)&lt;/li&gt;&#xA;&lt;li&gt;Object type variables store the &lt;em&gt;location&lt;/em&gt; of their objects in memory.  I say: &quot;Object variables know &lt;em&gt;where&lt;/em&gt; their object is in memory.   &lt;/li&gt;&#xA;&lt;li&gt;Java is a strictly pass-by-value language in this sense:  functions get a &lt;em&gt;copy&lt;/em&gt; of the value stored by the variable passed them.  &lt;/li&gt;&#xA;&lt;li&gt;If you pass a variable pointing at a mutable object to a function, and the function changes that object's state (e.g. remove an item from an ArrayList), the object itself is changed.  Why?  Because you passed that object's location in memory to the function and the callee used a mutator method on that object.  BANG!  Object state is changed.&lt;/li&gt;&#xA;&lt;li&gt;In reference to the last item, you can treat variables pointing to primitive types as if they were pointing at immutable objects, since a copy of the variable's value is made and the original cannot be changed.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Knowing these things early saves a lot of confusion.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-17T20:20:51.610" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2735" PostTypeId="2" ParentId="2712" CreationDate="2017-07-17T21:33:23.093" Score="2" Body="&lt;p&gt;I think it's actually really important to use the jargon and stress understanding. A lot of the common mistakes students make have a root cause of misunderstanding the difference between, say, declaring and calling a function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students have the vocab list and the jargon at their fingertips, it makes it actually possible to have debugging discussions that will help students learn.&lt;/p&gt;&#xA;" OwnerUserId="91" LastActivityDate="2017-07-17T21:33:23.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2736" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T22:19:05.070" Score="13" Body="&lt;p&gt;What is important is to teach students the difference between Java objects, and Java variables.  There are thousands of questions on &lt;a href=&quot;https://stackoverflow.com&quot;&gt;Stack Overflow&lt;/a&gt; asked by students and by junior developers who do not understand the difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we write &lt;code&gt;Foobar f = new Foobar(...)&lt;/code&gt;, it's &lt;em&gt;much&lt;/em&gt; easier to say that &lt;code&gt;f&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; a &lt;code&gt;Foobar&lt;/code&gt; than it is to say that &lt;code&gt;f&lt;/code&gt; &lt;em&gt;holds a reference to&lt;/em&gt; a &lt;code&gt;Foobar&lt;/code&gt;---I am guilty of taking that shortcut all the time---but nobody can get past the beginner stage until they learn that non-primitive Java variables only ever hold object references, and that the objects themselves only exist in a far-away place called &quot;the heap.&quot;&lt;/p&gt;&#xA;" OwnerUserId="1269" LastEditorUserId="1269" LastEditDate="2017-07-19T13:34:21.887" LastActivityDate="2017-07-19T13:34:21.887" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2737" PostTypeId="2" ParentId="2691" CreationDate="2017-07-17T22:22:26.223" Score="11" Body="&lt;p&gt;A related (rhetorical) question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Should C students be taught the [machine language] idea of reusing a pointer as a CPU instruction if the value happens to line up?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The speaker in a Functional Programming talk I recently saw discussed part of the history of programming languages, and the opinion &lt;em&gt;seriously held&lt;/em&gt; by some at one time that &lt;em&gt;assembly language&lt;/em&gt; was too far abstracted because it didn't allow you to reuse CPU instruction codes as pointers and vice-versa if the values lined up.  :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also related (classic): &lt;a href=&quot;http://www.catb.org/jargon/html/story-of-mel.html&quot; rel=&quot;noreferrer&quot;&gt;The Story of Mel&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, the follow-up: &lt;strong&gt;How is that fundamentally different from teaching Java students pointer arithmetic?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Of course, this is a trick answer, because I &lt;strong&gt;do&lt;/strong&gt; think both concepts (pointer arithmetic and reusing pointers as instructions) should be taught to Java students &lt;em&gt;as ideas.&lt;/em&gt;  As part of the &lt;em&gt;history&lt;/em&gt; of the subject, and the layers of abstraction underneath the level they're working at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you shouldn't make them actually &lt;em&gt;do&lt;/em&gt; any pointer arithmetic.  It's totally sufficient that they understand that there is such a thing and have some idea about roughly how it was done.  It's just a significance that they're not going to actually &lt;em&gt;use&lt;/em&gt; in Java, so it's good background, but don't overdo it.  It's not closely related to what you're teaching them to &lt;strong&gt;DO.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students need to have:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;An excellent mastery on the &lt;em&gt;practical&lt;/em&gt; skills they need to code in Java, and&lt;/li&gt;&#xA;&lt;li&gt;A clear enough &lt;em&gt;understanding&lt;/em&gt; of the theory and underlying concepts and background of what they are doing that &lt;strong&gt;they&lt;/strong&gt; won't become obsolete after some new CS breakthrough or new language or new industry direction.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Does the concept of pointer arithmetic belong in a &lt;em&gt;FIRST&lt;/em&gt; class on Java?  That depends considerably on how long the course is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say in a full semester course it would deserve perhaps a ten minute discussion at some point fairly well into the course, just for some comparative approach to Java's references and to emphasize that pointers &lt;em&gt;are&lt;/em&gt; still used under the hood.  And so that your students understand that there &lt;em&gt;are&lt;/em&gt; other ways to do things than how Java does them.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;(The balance between theoretical and practical knowledge I am advocating here is well conveyed in &lt;a href=&quot;http://www.appliedscholastics.org/results.html&quot; rel=&quot;noreferrer&quot;&gt;Mr. Hubbard's Study Technology&lt;/a&gt;, which I highly recommend for all educators and students.)&lt;/p&gt;&#xA;" OwnerUserId="1103" LastEditorUserId="1103" LastEditDate="2017-07-17T22:37:47.623" LastActivityDate="2017-07-17T22:37:47.623" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2739" PostTypeId="2" ParentId="2651" CreationDate="2017-07-18T01:47:16.670" Score="0" Body="&lt;p&gt;I like this loop. A lot.  You don't go out of bounds.  It eliminates an important source of errors. I encourage its use when iterating through collections. I also ask students who make collections to implement Iterable so that they can use the collections &lt;code&gt;for&lt;/code&gt; loop on their custom collection.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-18T01:47:16.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2740" PostTypeId="2" ParentId="2691" CreationDate="2017-07-18T01:51:33.363" Score="3" Body="&lt;p&gt;No. Java and Smalltalk were designed as true object oriented languages.  Bjarne Stroustrup who defined and wrote the C++ programming language also had the goal of object orientation but had to carry the baggage of the procedural and scripted C programming language due to the installed user base.  If he had gotten rid of pointers and other ool polluters, it would have involved a much greater overhaul of the compilers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The compilers are the main workload when designing a new programming language since you have to write a customized compiler for each hardware and OS platform, which is very non-trivial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would avoid teaching not just pointers but all OOL polluters for the following reasons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Times have changed and your students may be beginners now, but eventually they will be writing code to perform:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;writing classes for inheritable exception handling, remember for each feature of a program, you have to typically write 5 - 10 exception handling classes. Well designed software would handle errors so well that they would be invisible to the user.  When things do go wrong, an analyst will have a much easier time with inheritable and extendable exception classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Object design for artificial intelligence &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of the above require pure knowledge of OOL. Pointers would just confuse them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can teach pointers to a hacking class.&lt;/p&gt;&#xA;" OwnerUserId="2075" LastActivityDate="2017-07-18T01:51:33.363" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2742" PostTypeId="2" ParentId="2612" CreationDate="2017-07-18T09:56:54.843" Score="2" Body="&lt;p&gt;The board game &quot;Robo Rally&quot;, published by Avalon Hill, is good for getting people to think about simple programming as well as being fun for up to 8 players.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea is to navigate robots around a factory, with a limited set of instructions, such as move forwards n, rotate left/right etc. There are traps and walls, as well as other robots that you have to contend with.&lt;/p&gt;&#xA;" OwnerUserId="2082" LastActivityDate="2017-07-18T09:56:54.843" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2743" PostTypeId="2" ParentId="2691" CreationDate="2017-07-18T16:24:45.270" Score="1" Body="&lt;p&gt;I think, no and yes. Students should know that somewhere in Memory lies an object with the values involved. They don't need to know that an internal representation is likely a memory address. Concepts that are alien to Java such as offsets and such can be ignored.&lt;/p&gt;&#xA;" OwnerUserId="2089" LastActivityDate="2017-07-18T16:24:45.270" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2744" PostTypeId="2" ParentId="2699" CreationDate="2017-07-18T17:51:15.227" Score="7" Body="&lt;p&gt;First, I love SICP. I took and later TA'd 6.001. Like many MIT grads, I tried to teach it where I became a professor, and, like most who attempted it, decided not to do so again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main reason it is rarely successful outside of MIT isn't the difference in student quality but the difference in the support the school can offer. If I remember correctly, at MIT, there were three lectures a week, two recitation sections, one tutorial section (approximately 4 students meeting for an hour with a graduate TA), and many staffed lab hours. A high school or small college cannot generally provide that level of support. Also, when taught outside MIT, it is usually as a junior-level course, and students still usually find it overwhelming. (An exception is UC Berkeley, which taught it successfully for many years at the freshman level.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not saying a high school class could not succeed, just that it would be very difficult, and the amount of work required would be exceptional. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might also be hard to motivate students to work so hard on something so abstract, when they could be learning app development, computer games, or another more immediately rewarding topic with less effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, I would advise &lt;em&gt;against&lt;/em&gt; using SICP for a class at the high school level, although I do think it is possible to supervise an independent study with a sufficiently motivated and sophisticated individual or small group of students.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2018-10-11T14:30:19.693" LastActivityDate="2018-10-11T14:30:19.693" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2745" PostTypeId="5" CreationDate="2017-07-18T17:52:17.087" Score="0" Body="&lt;p&gt;Students often have difficulty knowing where a declaration or definition of an identifier/token applies in a program. Different language use different models. Even different flavors of a language use different models (Common Lisp v Scheme). Apply this tag to such questions, both for the operational detail and for the theoretical underpinnings. Even implementation questions are welcome. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At a concrete level name visibility in general might be appropriate, say packages in Java and namespaces in several languages. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-18T17:59:24.493" LastActivityDate="2017-07-18T17:59:24.493" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2746" PostTypeId="4" CreationDate="2017-07-18T17:52:17.087" Score="0" Body="This tag is intended for all questions related to name/identifier scoping in the various languages used in teaching. It can also be used for questions concerning the kind of scoping (e.g. lexical v. dynamic). " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-18T17:59:28.397" LastActivityDate="2017-07-18T17:59:28.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2748" PostTypeId="2" ParentId="502" CreationDate="2017-07-18T20:19:13.927" Score="2" Body="&lt;p&gt;I'll add another (slightly) dissenting view. Years ago I read &lt;a href=&quot;http://cs.stanford.edu/people/eroberts/papers/SIGCSE-1995/LoopExits.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Eric Roberts' paper&lt;/a&gt; on the &quot;loop-and-a-half&quot; problem and was convinced by his evidence that students find it considerably easier to correctly write loops (especially indefinite sentinel loops) when allowed to exit from the middle of a loop (using a break in the case of Java or C++).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I also am careful to explain that break has to be handled with care, providing them with &lt;a href=&quot;http://users.csc.calpoly.edu/~jdalbey/SWE/Papers/att_collapse.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;an article on the 1990 AT&amp;amp;T collapse&lt;/a&gt;, attributed to a misplaced break statement. I though of this article when I noticed a popular Java technical blog promoting &quot;labeled breaks&quot; to jump out of a nested if statement. I certainly avoid teaching my students things like that.&lt;/p&gt;&#xA;" OwnerUserId="1554" LastActivityDate="2017-07-18T20:19:13.927" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2749" PostTypeId="1" CreationDate="2017-07-18T20:29:40.977" Score="4" ViewCount="142" Body="&lt;p&gt;Thanks to working with Racket recently, I've been spending a lot of time learning about and implementing non-trivial macros. In the process, I have been thinking about ways to apply this skill to my teaching. In particular, I teach students C (in the context of CS50 AP) and would like to show them &lt;strong&gt;simple but useful examples of macros in C&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see the potential benefit as two-fold: 1) it would be helpful for discussing the C pre-processor when I teach the stages of compilation, and 2) it might help students write/understand code with information abstracted away in macros.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What lesson ideas (with code examples hopefully) do you have for introducing students to macros in C?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-20T13:35:15.833" Title="Lesson ideas for introducing macros in C" Tags="|lesson-ideas|introductory-lesson|ap-cs-principles|c|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2750" PostTypeId="1" CreationDate="2017-07-18T21:36:55.223" Score="7" ViewCount="2355" Body="&lt;p&gt;I've been thinking about &lt;em&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/1366/27&quot;&gt;active learning&lt;/a&gt;&lt;/em&gt;, and I am inspired by &lt;a href=&quot;https://cseducators.stackexchange.com/a/2527/27&quot;&gt;Heather's answer&lt;/a&gt; to my earlier &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1463/unit-review-for-boolean-algebra&quot;&gt;boolean algebra curriculum review&lt;/a&gt;.  This may also be a good question for math teachers who have experience teaching algebra.  How do you avoid lecturing, and get the kids &lt;em&gt;doing a lot of activity&lt;/em&gt;, even when there is so much material to cover?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here is my actual question:&#xA;&lt;strong&gt;What are techniques to get at boolean algebra using active learning?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-31T18:33:59.680" Title="Active learning for boolean algebra" Tags="|lesson-ideas|active-learning|boolean-algebra|" AnswerCount="8" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2751" PostTypeId="2" ParentId="2750" CreationDate="2017-07-18T21:51:34.690" Score="7" Body="&lt;p&gt;&lt;strong&gt;Build logic gates out of dominoes.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start off by showing &lt;a href=&quot;https://www.youtube.com/watch?v=lNuPy-r1GuQ&quot; rel=&quot;noreferrer&quot;&gt;this video from Numberphile&lt;/a&gt; in whole or in part. In it is a demonstration of how to use dominoes to model logical operations of a computer. It begins with a simulation of an &lt;code&gt;AND&lt;/code&gt; gate and writes out its corresponding truth table. This is followed by the same process with &lt;code&gt;XOR&lt;/code&gt;, which then allows for the construction of a half adder and in conclusion a full adder. (You may also share &lt;a href=&quot;https://www.youtube.com/watch?v=OpLU__bhu2w&amp;amp;feature=youtu.be&quot; rel=&quot;noreferrer&quot;&gt;this video&lt;/a&gt; with students, which contains an elaborate, 10000-domino construction. Per the YouTube description, &quot;The result was a Domino Computer capable of automatically adding numbers. It can take any two four-digit binary numbers and return the five-digit binary sum.&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then challenge students to build elementary logic gates themselves (you might need a lot of dominoes, but I bet it would be worth it in the long run). You could start by having them come up with designs for &lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, &lt;code&gt;NAND&lt;/code&gt;, &lt;code&gt;NOT&lt;/code&gt;, &lt;code&gt;XOR&lt;/code&gt;, etc. on their own. Depending on how this goes, consider using &lt;a href=&quot;http://www.think-maths.co.uk/sites/default/files/downloads/think_maths_domino_computer_worksheets.pdf&quot; rel=&quot;noreferrer&quot;&gt;this resource&lt;/a&gt; to help guide the design of gates in dominoes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After students create these gates, consider giving them longer Boolean expressions to model and solve using dominoes. This would also be a clever way of showing how DeMorgan's Law works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The level of complexity knows almost no bounds with this approach. I could see some students, especially those with a love for computer science, who would thrive doing a hands-on, constructive activity like this.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-07-19T06:09:48.930" LastActivityDate="2017-07-19T06:09:48.930" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2752" PostTypeId="2" ParentId="2612" CreationDate="2017-07-18T22:47:25.837" Score="2" Body="&lt;p&gt;You could have them act out &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fizz_buzz&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fizz Buzz&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Players generally sit in a circle. The player designated to go first says the number &quot;1&quot;, and each player thenceforth counts one number in turn. However, any number divisible by three is replaced by the word &lt;em&gt;fizz&lt;/em&gt; and any divisible by five by the word &lt;em&gt;buzz&lt;/em&gt;. Numbers divisible by both become &lt;em&gt;fizz buzz&lt;/em&gt;. A player who hesitates or makes a mistake is eliminated from the game.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Make it more interesting by adding rules as you go: multiples of &lt;code&gt;7&lt;/code&gt; become &lt;em&gt;bang&lt;/em&gt;, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will also allow you to introduce a program that executes Fizz Buzz when you teach about loops.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-07-18T23:38:34.157" LastActivityDate="2017-07-18T23:38:34.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2753" PostTypeId="2" ParentId="2612" CreationDate="2017-07-18T23:14:13.993" Score="5" Body="&lt;p&gt;Another game that comes to mind is &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Nim&quot; rel=&quot;noreferrer&quot;&gt;Nim&lt;/a&gt;&lt;/strong&gt;. It has a lot of interesting variations, and I particularly enjoy the subtraction game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the subtraction game, you start at &lt;code&gt;N&lt;/code&gt; and two players take turns subtracting &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;, or &lt;code&gt;3&lt;/code&gt; from the total. The goal is to force the other player to remove the last number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could play against the whole class. Let the students pick a starting number (let's say &lt;code&gt;11&lt;/code&gt;). You take away &lt;code&gt;2&lt;/code&gt;, so the total is &lt;code&gt;9&lt;/code&gt;. The students take away &lt;code&gt;3&lt;/code&gt;, so the total is &lt;code&gt;6&lt;/code&gt;. You take away &lt;code&gt;1&lt;/code&gt;, so the total is &lt;code&gt;5&lt;/code&gt;. Students take away &lt;code&gt;1&lt;/code&gt;, so the total is &lt;code&gt;4&lt;/code&gt;. You take away &lt;code&gt;3&lt;/code&gt; so the total is &lt;code&gt;1&lt;/code&gt;. The students lose! Play a few rounds, letting the students choose the starting number each time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a trick that makes this game very easy, but it's hard to spot if you've never seen it before. Students will realize that they can't win if it's their turn and they have &lt;code&gt;5&lt;/code&gt;, because no matter what they pick you'll be able to leave them with &lt;code&gt;1&lt;/code&gt; in your next turn. Can they extrapolate and realize that they can't win if they have &lt;code&gt;9&lt;/code&gt;, because you can always leave them with &lt;code&gt;5&lt;/code&gt;? What number allows you to force them to &lt;code&gt;9&lt;/code&gt;? (Hint: the trick involves modulo.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like this game so much because you can use it to talk about basic AI topics. For example, you could start by creating a program that plays against a human player by just choosing randomly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or you could take the modulo trick and create a program that plays a perfect game each time. Or you could add variation by adding some randomness to the computer's choices instead of always choosing the correct answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more advanced example is a program that solves this using weighted averages that it adjusts after every game (so it &quot;learns&quot; from experience and thinks about the game in the same way humans do: it can &quot;know&quot; that &lt;code&gt;5&lt;/code&gt; is bad without &quot;understanding&quot; the underlying trick).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then make this AI program face off against the perfect computer player. The weighted average computer will &quot;learn&quot; pretty fast. Compare this to what happens if you make this AI program face off against the randomized computer player. The weighted average program will have a much harder time against the randomized player!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, Nim is a simple game that you can easily play against students, gives them a fun &quot;ah-ha!&quot; moment, and leads pretty naturally to more advanced topics.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-18T23:14:13.993" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2754" PostTypeId="2" ParentId="2750" CreationDate="2017-07-19T00:35:03.147" Score="7" Body="&lt;p&gt;The activity that occurred to me was categorical &lt;a href=&quot;https://en.wikipedia.org/wiki/Logic_puzzle&quot; rel=&quot;noreferrer&quot;&gt;logic puzzles&lt;/a&gt; where you're given a list of hints and have to figure out a set of facts using a grid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These puzzles are solved by breaking the hints down into boolean expressions and then filling in the grid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Logic_grid.png/200px-Logic_grid.png&quot; alt=&quot;logic puzzle&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hints are things like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ada owns a computer but does not wear a green hat.&lt;/li&gt;&#xA;&lt;li&gt;The person who wears a blue hat does not own a horse.&lt;/li&gt;&#xA;&lt;li&gt;The owner of the boat either has a black or white hat.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Which you have to break down into boolean expressions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;Ada.ownsComputer = true;&lt;/code&gt; &lt;code&gt;Ada.wearsGreenHat = false;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;BlueHat.ownsHorse = false;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Boat.wearsGreenHat = false;&lt;/code&gt; &lt;code&gt;Boat.wearsBlueHat = false;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You have to understand the implicit relationships of the hints: if you know somebody wears a green hat, then you know they don't wear a blue hat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even go a step further and have students create their own puzzles.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-19T00:35:03.147" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2755" PostTypeId="2" ParentId="2750" CreationDate="2017-07-19T01:54:24.747" Score="5" Body="&lt;p&gt;I used a card game activity to review Boolean expressions in a CS1 context. You may be able to adapt to involve more abstract propositions and more complex operators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;tl;dr&lt;/strong&gt; Students play a card game in small groups. They choose proposition and operator cards from their hands to create true or false statements.&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Proposition cards have text like:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No one is on their cell phone&lt;/li&gt;&#xA;&lt;li&gt;I speak Spanish&lt;/li&gt;&#xA;&lt;li&gt;x % 2 == 1;&lt;/li&gt;&#xA;&lt;li&gt;((Teacher)) once did ((funny thing))&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Have fun personalizing to your class :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Operator cards have text like:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;AND (&amp;amp;&amp;amp;)&lt;/li&gt;&#xA;&lt;li&gt;OR (||)&lt;/li&gt;&#xA;&lt;li&gt;NOT (!)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here is a version of the rules:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each white card has a statement (in English or in code) that is either true or false. Each colored card has one of three logical operators: AND, OR or NOT. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The game is played as follows. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Each player starts with 6 cards, 3 white and 3 colored. &lt;/li&gt;&#xA;&lt;li&gt;Someone picks a random int for the value of x.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When it is your turn, &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Flip a coin to determine whether you are trying to make an expression that evaluates to true (heads) or false (tails).&lt;/li&gt;&#xA;&lt;li&gt;If you can make such a logical expression using at least 3 of your cards, put down the expression in front of you and draw new cards to replace those you put down.&lt;/li&gt;&#xA;&lt;li&gt;Otherwise, trade in one of your cards for a card of the same color.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The first person to put down at least 12 cards wins!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I found this game in some old PLTL CS materials: &lt;a href=&quot;http://www.pltlcs.org/sigcse10/&quot; rel=&quot;noreferrer&quot;&gt;http://www.pltlcs.org/sigcse10/&lt;/a&gt; --&gt; Sample PLTL Sessions materials &gt; Logic&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-19T01:54:24.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2756" PostTypeId="2" ParentId="2749" CreationDate="2017-07-19T05:56:29.577" Score="3" Body="&lt;p&gt;It is useful to create a macro to compute the maximum operation. The advantages of a macro over a function are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;performance (which we all know is important to C programmers, although they can use an &lt;code&gt;inline&lt;/code&gt; function)&lt;/li&gt;&#xA;&lt;li&gt;polymorphism (C won't allow you to have a single or multiple functions named &lt;code&gt;max&lt;/code&gt; for different numeric types)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The implementation turns out to be nontrivial. The first version is likely to be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#define MAX(a,b) (a &amp;gt; b ? a : b)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This has two problems. The first is the lack of parentheses, which can lead to incorrect order of operations. For example,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MAX(c &amp;amp;&amp;amp; d, 1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would become&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(c &amp;amp;&amp;amp; d &amp;gt; 1 ? c &amp;amp;&amp;amp; d : 1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;whose meaning is the same as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(c &amp;amp;&amp;amp; (d &amp;gt; 1)) ? (c &amp;amp;&amp;amp; d) : 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This problem can be fixed by changing the definition to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#define MAX(a,b) ((a) &amp;gt; (b) ? (a) : (b))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An additional problem is that evaluating &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; may have side effects. Consider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;MAX(++c, ++d)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This expands into:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;((++c) &amp;gt; (++d) ? (++c) : (++d))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As described &lt;a href=&quot;https://stackoverflow.com/a/5323810/631051&quot;&gt;on our sister site&lt;/a&gt;, a better version is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#define MAX(a,b) ({&#xA;    typeof (a) _a = (a);\&#xA;    typeof (b) _b = (b); \&#xA;    _a &amp;gt; _b ? _a : _b; })&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This, of course, is ugly and will not work if you have variables named &lt;code&gt;_a&lt;/code&gt; and &lt;code&gt;_b&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm afraid I've done the opposite of what you've requested and provided an argument against C macros. (I use the above argument before teaching Scheme's hygienic macros so students appreciate them.)&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-19T05:56:29.577" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2757" PostTypeId="1" AcceptedAnswerId="2771" CreationDate="2017-07-19T07:16:22.070" Score="5" ViewCount="569" Body="&lt;h3&gt;Background:&lt;/h3&gt;&#xA;&lt;p&gt;This lesson should give a firm foundation for graphics in &lt;code&gt;Swing&lt;/code&gt; in java to students in high school who know OOP in java (&lt;code&gt;extends&lt;/code&gt;, &lt;code&gt;implements&lt;/code&gt; and &lt;code&gt;abstract&lt;/code&gt;, as well as composition). They are in the school's CS major. This year they need to create a project which is a part of their final grade in the CS major, and part of the requirements are a visible GUI. As of such, a lesson plan was created to teach them one of the ways of making GUI in java. However, this lesson doesn't teach what goes on in the background of java GUI. (unintended pun)&lt;/p&gt;&#xA;&lt;h3&gt;What I have:&lt;/h3&gt;&#xA;&lt;p&gt;Currently the lesson plan is as follows:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Purpose:&lt;/em&gt; To teach the basics of creating GUI in java, for the students' final project.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Needed knowledge:&lt;/em&gt; Object Oriented Programming, as taught in previous grade (In the previous grade they were taught the concepts listed in the Background section)&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Needed materials:&lt;/em&gt; Computers, preferably one per student (Students can bring their laptops), Internet connection.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Procedure:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Explain the basic objects inside the &lt;code&gt;Swing&lt;/code&gt; library: &lt;code&gt;JFrame&lt;/code&gt;, &lt;code&gt;JPanel&lt;/code&gt; etc.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Explain the &lt;code&gt;Container&lt;/code&gt; object in &lt;code&gt;AWT&lt;/code&gt;, and elaborate on how &lt;code&gt;Swing&lt;/code&gt; is &lt;strong&gt;heavily&lt;/strong&gt; dependent on &lt;code&gt;AWT&lt;/code&gt;. All* objects in &lt;code&gt;Swing&lt;/code&gt; are children of objects in &lt;code&gt;AWT&lt;/code&gt;. Also explain the &lt;code&gt;Component&lt;/code&gt; class object.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Show that &lt;code&gt;Container&lt;/code&gt; essentially &lt;em&gt;contains&lt;/em&gt; (hence the fancy name) other &lt;code&gt;Component&lt;/code&gt;s and that creates a GUI.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Show the students a simple GUI for a chat application (&lt;strong&gt;no server-client, just the gui!&lt;/strong&gt;) which composes of a &lt;code&gt;JButton&lt;/code&gt;, &lt;code&gt;JTextField&lt;/code&gt; (for entering messages), &lt;code&gt;JTextPane&lt;/code&gt; (chat history) and &lt;code&gt;JLabel&lt;/code&gt;. This step includes showing them the code.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;let them work for the remaining time (45 mins plus &lt;code&gt;45-time_it_took_to_get_to_this_step&lt;/code&gt;) on creating a gui of their own, of their choosing, which can have &lt;em&gt;any&lt;/em&gt; &lt;code&gt;Swing&lt;/code&gt; object they find. The GUI &lt;strong&gt;must&lt;/strong&gt; have &lt;code&gt;JLabel&lt;/code&gt;, &lt;code&gt;JButton&lt;/code&gt; and &lt;code&gt;JTextField&lt;/code&gt;. Other than that, go wild.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;My problem:&lt;/h3&gt;&#xA;&lt;p&gt;This lesson shows absolutely &lt;em&gt;nothing&lt;/em&gt; about what Java does in the background for the GUI. I am talking about the intensive OOP the goes on in the &lt;code&gt;JFrame&lt;/code&gt; class, and the incredible flexibility with everything extending &lt;code&gt;JContainer&lt;/code&gt; (allows &lt;code&gt;JButton&lt;/code&gt;, &lt;code&gt;JLabel&lt;/code&gt; and many others to be treated almost identically).&lt;/p&gt;&#xA;&lt;p&gt;How could I extends one (or more) of the above steps, or possibly add a new one, that will teach these parts of java GUI? I find that these parts are important for anyone who wants to make Java GUI. Would simply saying what I have written in the previous paragraph be enough?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sub&gt;*Haven't checked, but never seen one that isn't.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-24T21:33:10.920" Title="Lesson plan for teaching java graphics" Tags="|java|introductory-lesson|lesson-review|" AnswerCount="3" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2758" PostTypeId="2" ParentId="2757" CreationDate="2017-07-19T11:17:11.933" Score="2" Body="&lt;p&gt;The lesson looks pretty good to me. First, the last part, extending the lesson to show how the power of &lt;code&gt;JFrame&lt;/code&gt; class is harnessed in the backend. Don't. 1) The students are presumed to already understand the OOP involved, and how the &lt;code&gt;extends&lt;/code&gt; concept works. 2) Give them the remaining time, as you've indicated, to work on the project assigned. 3) Allowing them to explore what they learned, and maybe get a second sense about the power hiding under the hood will make them more receptive, and more curious, about that power, and its source. So, make that a separate lesson for the next class period.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I can think of to make it &lt;em&gt;possibly&lt;/em&gt; better, is to add some structure, or expectations, to the assignment. Possibly present a limited set of GUI templates to reproduce, allowing the students to pick the one they like to implement. Possibly add some constraints, such as that it must include 2 previously undiscussed objects from the library&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-19T11:17:11.933" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2759" PostTypeId="2" ParentId="302" CreationDate="2017-07-19T11:50:27.883" Score="4" Body="&lt;p&gt;I think Parsons problems offer a low-cognitive load way to offer practice for just about any code-writing topic. I think they are especially good when students start learning a certain code pattern, and would be overwhelmed by too many details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ebooks written on the &lt;a href=&quot;http://runestoneinteractive.org/about.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Runestone platform&lt;/a&gt; can have Parsons problems embedded in them. Teachers can choose to &lt;a href=&quot;http://runestoneinteractive.org/customcourse.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;use and potentially adapt&lt;/a&gt; one of &lt;a href=&quot;http://runestoneinteractive.org/library.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;many existing ebooks&lt;/a&gt;, or &lt;a href=&quot;http://runestoneinteractive.org/build/html/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;write their own from scratch&lt;/a&gt;. Multiple ebooks contain Parsons problems you could use directly or adapt:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://interactivepython.org/runestone/static/JavaReview/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CS A ebook&lt;/a&gt;, using Java (&lt;a href=&quot;http://interactivepython.org/runestone/static/JavaReview/ArrayBasics/ArrayParsonsPractice.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;http://interactivepython.org/runestone/static/StudentCSP/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CSP ebook&lt;/a&gt;, using Python  (&lt;a href=&quot;http://interactivepython.org/runestone/static/StudentCSP/CSPWhileAndForLoops/whileCount.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example&lt;/a&gt; (scroll down a bit))&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://interactivepython.org/runestone/static/thinkcspy/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to Think Like a Computer Scientist&lt;/a&gt;, using Python (&lt;a href=&quot;http://interactivepython.org/runestone/static/thinkcspy/PythonTurtle/OurFirstTurtleProgram.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example&lt;/a&gt; (scroll down a bit))&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here's an example of the look and feel of these problems:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/qaQMo.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/qaQMo.png&quot; alt=&quot;Parsons problem example&quot;&gt;&lt;/a&gt;&#xA;(Note that this problem provides indentation information, but others on Runestone do not, allowing students to choose their own indentation -- this is known as a &lt;a href=&quot;http://www.jite.org/documents/Vol10/JITEv10IIPp119-132Ihantola944.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;2D Parsons problem&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent development is in the process of adding cool new features to these Parsons problems within Runesone&lt;a href=&quot;http://dl.acm.org/citation.cfm?id=2960342&amp;amp;CFID=961977804&amp;amp;CFTOKEN=52327789&quot; rel=&quot;nofollow noreferrer&quot;&gt; [reference]&lt;/a&gt;, like &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;paired distractors&lt;/em&gt;  - a tile that works is paired with a similar tile that doesn't work, and students must choose between them&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;dynamic adaptation&lt;/em&gt; - the difficulty of the problem changes based on the user's performance&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;accessibility&lt;/em&gt; - Parsons problems can be completed with the keyboard only, helping those who can't use a mouse &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="2045" LastEditDate="2017-07-19T12:13:35.397" LastActivityDate="2017-07-19T12:13:35.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2760" PostTypeId="2" ParentId="2750" CreationDate="2017-07-19T12:04:37.003" Score="2" Body="&lt;p&gt;&lt;a href=&quot;http://www.peerinstruction4cs.org/peer-instruction-advice/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peer Instruction&lt;/a&gt; materials exist for Discrete Math, for instance &lt;a href=&quot;http://www.peerinstruction4cs.org/2014/01/28/discrete-mathematics-peer-instruction-materials/#more-640&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cynthia Lee's Peer Instruction questions from Stanford&lt;/a&gt;. You may be able to adapt some of the questions to fit your needs for a HS course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To your first point, I find Peer Instruction to be an excellent balance of lecture and active learning. There is direct content delivery, but it is short, and punctuated by active Peer Instruction questions that get students talking and allow the instructor to know that the students are actually thinking :)&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-19T12:04:37.003" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2761" PostTypeId="2" ParentId="2612" CreationDate="2017-07-19T12:07:29.690" Score="2" Body="&lt;p&gt;The ice breaker used in my school is a brainstorming:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each student throws in something they know about computer science. They each say their names and what they know. It's &lt;strong&gt;&lt;em&gt;very important&lt;/em&gt;&lt;/strong&gt; to explain that it's good if some students know some things, but it's not the goal. Make absolutely sure no student feels bad that he\she doesn't know anything about cs.&lt;br&gt;&#xA;To do this, you can say &lt;em&gt;&quot;Hey, it's great that you don't have background! Why? because you are here to &lt;strong&gt;learn&lt;/strong&gt;&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way, students know the names of other students, and also they know names of stuff in computer science. It's introductory in both senses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not so much of a game, but it can be made into one:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Each students is assigned an index.&lt;/li&gt;&#xA;&lt;li&gt;Each student gives their name and knowledge $\,\,\,$&lt;sub&gt;(does this count as &#xA;alliterative?)&lt;/sub&gt;$\,\,\,$ &lt;/li&gt;&#xA;&lt;li&gt;A random number generator gives the index of the next student in the &quot;game&quot;.&lt;/li&gt;&#xA;&lt;li&gt;repeat steps 2-3 &lt;strike&gt;until a fine dough&lt;/strike&gt; until all students are familiar with each other.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;you can mix it up a bit $\,\,\,$&lt;sup&gt;&lt;sub&gt;(I'm sorry for the cooking recipe jargon in this last part)&lt;/sub&gt;&lt;/sup&gt;$\,\,\,$ by changing what students say when their turn comes. They can possibly give their favorite color &lt;em&gt;and something they know about CS&lt;/em&gt;. Pairs of &lt;code&gt;&amp;lt;? extends PersonalInfo,? extends CSBackgroundInfo&amp;gt;&lt;/code&gt; are usually a good way to go about this.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-19T12:07:29.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2762" PostTypeId="2" ParentId="2757" CreationDate="2017-07-19T12:21:19.467" Score="1" Body="&lt;p&gt;There are two things you can do (surely more, of course) that will enhance the overall education of your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First is to discuss the general situation of nested structures and the relationship to trees and to recursion. The frame contains Panels which contain Panels, which contain... down to some non-recursive things like Buttons. This lesson, when generalized from the specific GUI layout case, is important for understanding modern languages and how they are compiled and processed. It also gives them the background to understand web page layouts, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second big topic you can introduce here, assuming you haven't already, is Design Patterns, both programming and architecture patterns. Understanding the &lt;a href=&quot;https://en.wikipedia.org/wiki/Observer_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;Observer&lt;/a&gt; pattern is essential to Java GUI programming for example. Once they have seen one pattern in some detail (perhaps a truncated version) you have the power to discuss others. The Java libraries are completely full of design patterns since Java and Design Patterns sort of grew up together. The Java i/o libraries depend fundamentally on the decorator pattern, for example and the students likely already know about Iterator, but perhaps not the full structure of it and why it works and other solutions to the problem are sub-optimal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, if you discuss Observer in some detail you have an entry into the &lt;a href=&quot;https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot; rel=&quot;nofollow noreferrer&quot;&gt;Model-View-Controller&lt;/a&gt; architectural pattern (MVC). So it is quite rich. MVC is also used in the Web architecture as well, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you introduce Patterns to your students you have a way to talk about reusable software at a much higher level than just &quot;reusing classes&quot;, which has a lot of issues and often leads to ugly and unusable software. Reusing proven designs, however, is a much more important idea. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-19T12:21:19.467" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2763" PostTypeId="2" ParentId="2612" CreationDate="2017-07-19T12:31:07.290" Score="1" Body="&lt;p&gt;Although I frequently use a variation on the TV show &lt;em&gt;Jeopardy&lt;/em&gt; as a review of terminology later in a course, with everyone serving as contestant, it could be adapted to your needs here. One of the things you would like to know is the current state of knowledge of your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things you may do when teaching is motivate the study of a new topic by using analogy/metaphor for various technical issues. I envision a Jeopardy game in which the Answers are various social memes and real life situations for which the student &quot;contestants&quot; think up questions. This can be fun, building some sort of &quot;We are the Champions&quot; mindset in the whole class, but also gives you a sense of what will work later and what might not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Building the software to support such a game is pretty easy as it needn't be very sophisticated. However, thinking up the &quot;Answers&quot; requires time and thought in this case. You might be able to find supporting software for Jeopardy online as it is a fairly commonly used educational tool. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-19T12:31:07.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2764" PostTypeId="2" ParentId="2749" CreationDate="2017-07-19T12:35:09.180" Score="8" Body="&lt;p&gt;I introduce &lt;strong&gt;C&lt;/strong&gt; macros as a convenient way of using a single source file that can be used both when debugging code in development and for final delivery, without having to edit and and edit out test/debug code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am doing it, in particular, in the context of using the compiler development tools flex and bison, but it would be equally valid when using just &lt;strong&gt;C&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, say some particular function returns a value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return(THIS_VALUE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The student may find it helpful to know what that value is. They could use an interactive debugger, in an IDE (such as Visual Studio), or a stand-alone debugger, such as gdb. Mentioning this makes them aware of the variety of development tools available to professional developers. I also mention that it can also be done without such tools, and code developers need to be aware of these wider varieties of debugging mechanisms. I indicate one of the primitive methods of doing is to add a &lt;code&gt;printf&lt;/code&gt;, such as this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;printf(&quot;%d\n&quot;,THIS_VALUE);&#xA;return(THIS_VALUE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I show, using an example (in flex actually), how this can be helpful. I then explain some of the risks and weaknesses in doing this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We spawn two versions of the code, a production and debug version of the code&lt;/li&gt;&#xA;&lt;li&gt;We have to keep editing the prints in and out and may miss some&lt;/li&gt;&#xA;&lt;li&gt;We may make typos and not actually print the value being returned!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I then illustrate with using the &lt;strong&gt;preprocessor&lt;/strong&gt;, which they may or may not have encountered:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#ifdef DEBUG&#xA;printf(&quot;The Value is: %d\n&quot;,THIS_VALUE);&#xA;#endif&#xA;return(THIS_VALUE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I then explain how this can be enabled by using flags in &lt;code&gt;make&lt;/code&gt; or &lt;code&gt;gcc&lt;/code&gt; or other such tools. The next stage in the explanation shows what can happen when this debug coding happens in many many places:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ONE:&#xA;#ifdef DEBUG&#xA;printf(&quot;The Value is: %d\n&quot;,THIS_ONE_VALUE);&#xA;#endif&#xA;return(THIS_ONE_VALUE);&#xA;&#xA;TWO:&#xA;#ifdef DEBUG&#xA;printf(&quot;The Value is: %d\n&quot;,THIS_TWO_VALUE);&#xA;#endif&#xA;return(THIS_TWO_VALUE);&#xA;&#xA;THREE:&#xA;#ifdef DEBUG&#xA;printf(&quot;The Value is: %d\n&quot;,THIS_THREE_VALUE);&#xA;#endif&#xA;return(THIS_THREE_VALUE);&#xA;&#xA;/* The code does not really look like this. I'm just making paradigms */&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I point out how really poor this code is, and how it should be &lt;strong&gt;re-factored&lt;/strong&gt;. This provides an opportunity for discussing re-factoring code and the options available. One option that will immediately occur to the student might be to use some form of procedure or function, like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int Trace(int The_Argument)&#xA;{&#xA;#ifdef DEBUG&#xA;printf(&quot;The Value is: %d\n&quot;,The_Argument);&#xA;#endif&#xA;return(The_Argument); &#xA;}&#xA;&#xA;ONE:&#xA;   return(Trace(THIS_ONE_VALUE));&#xA;TWO:&#xA;   return(Trace(THIS_TWO_VALUE));&#xA;THREE:&#xA;   return(Trace(THIS_THREE_VALUE));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Students can see that this re-factoring may have improved the code, but now has inefficiencies that the original did not. It also has become &lt;em&gt;type specific&lt;/em&gt;, as types were introduced for the first time (not quite true as the format is typed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point Macros can be introduced as a neat and useful way of conditionally including debug code with the problems of editing statements in and out from the source. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#ifdef DEBUG&#xA;       #define RETURN(x) printf(&quot;Returning &quot; #x &quot;: %d&quot;,x); return(x)&#xA;#else&#xA;       #define RETURN(x) return(x)&#xA;#endif&#xA;&#xA;ONE:&#xA;   RETURN(THIS_ONE_VALUE);&#xA;TWO:&#xA;   RETURN(THIS_TWO_VALUE);&#xA;THREE:&#xA;   RETURN(THIS_THREE_VALUE);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This then enables me to explain about the concepts of Macros versus functions. It also shows &lt;strong&gt;C&lt;/strong&gt; &lt;em&gt;stringification&lt;/em&gt; and initiates further discussion of these techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm now ready to point them at some more professional discussions of the value of Macros, and in particular I like Jonathan Leffler's Stack Overflow &lt;a href=&quot;https://stackoverflow.com/a/1644898/4370109&quot;&gt;answer&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I reinforce this by putting in the specification of their assignment that their code should implement certain specific debug flags which I will enable when assessing their work. They have to then master the technique to get grade points, in addition to having just working code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, now they know about Macros, I can talk about inline functions, how a Macro can be used to define one, based on the examples above. It also enables me to talk about compiler optimisations and how the compiler might introduce inlining itself without explicit macros from the programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This is part of a compilers course so such topics will be core knowledge for them).&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="694" LastEditDate="2017-07-19T14:34:29.080" LastActivityDate="2017-07-19T14:34:29.080" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2765" PostTypeId="2" ParentId="2691" CreationDate="2017-07-19T12:54:04.067" Score="3" Body="&lt;p&gt;This is a tricky issue and where I think  using a bit of formal semantics may help. Of course you don't want to introduce Greek letters and inference rules for undergrads but the concepts should be laid out clearly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important thing I do early when presenting a programming language is to distinguish between syntax (how you write) and semantics (how things run. I later divide it into static semantics --typing-- and dynamic semantics). So here, as others have said, introducing &lt;em&gt;pointers&lt;/em&gt; is not a good thing and goes against the spirit of Java (pointers don't exist). &lt;em&gt;But&lt;/em&gt; you should present something namely what a &lt;em&gt;value&lt;/em&gt; is in Java. The notion of value is fundamental. What is the result  when a particular piece of code (syntax) is evaluated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Java constants of primitive types are their own values, but Objects on the other hand evaluate to a unique identity (whether you want to say that this identity is the memory address depends on your students and their backgrounds). It's a bit abstract but it allows you to explain several behaviours of the language. For instance, if you pass an object as argument to a method and perform mutation, the object is mutated (although the language is &quot;call by value&quot;, since the value of the object is its unique ID, the modification occur on this particular object, not a copy). Conversely, even if you create two instances of the same class with the same internal content (say &lt;code&gt;Point p1 = new Point(0,0)&lt;/code&gt; and &lt;code&gt;Point p2 = new Point(0,0)&lt;/code&gt;) both objects will compare unequal (with &lt;code&gt;==&lt;/code&gt;).&#xA;Which then allows you to also introduce why you should compare String object with .equals and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact that some languages allow to manipulate this unique identity (pointers, pointer arithmetic etc…) is orthogonal, and imho should not be used to justify the behaviour of Java. It can certainly help as an analogy if the students have prior background in C/C++ but introducing a foreign low-level concept is not way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, you should not introduce pointers &lt;em&gt;but&lt;/em&gt; this is not an excuse to not to explain precisely what is going on (call by value semantics with value being unique identities for Objects).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2017-07-19T12:54:04.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2766" PostTypeId="2" ParentId="2691" CreationDate="2017-07-19T14:47:32.857" Score="2" Body="&lt;p&gt;Some people use the term &quot;pointers&quot; to describe Java references. References definitely do need to be described (though they should be called references rather than pointers). Fields, variables, and parameters of class type are often treated as though they hold instances, but they never actually do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reference-type variables can hold four different kinds of things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A reference to an object &lt;em&gt;that will never change&lt;/em&gt; (often an immutable type like &lt;code&gt;String&lt;/code&gt;), which is used to encapsulate the contents thereof.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A unshared reference to an object, which could be mutable, used to encapsulate the contents thereof.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A reference to an object that is &quot;owned&quot; by the entity holding the reference, but which may also identified by references held by other entitites that don't own it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A reference to an object that is &quot;owned&quot; by some other entity.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The Java language makes no distinction among these different categories of references, but one cannot reasonably expect to write code which is efficient and correct without knowing which category every reference belongs to.  In the first two situations, code may treat a reference-type variable as though it holds the object identified thereby, but a programmer must know which of those two situations applies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If field &lt;code&gt;arr&lt;/code&gt; of some object holds a reference to an &lt;code&gt;int[]&lt;/code&gt; containing {1,2,3}, and one wants &lt;code&gt;arr&lt;/code&gt; to hold a reference to an array holding {1,2,4}, there are two ways of accomplishing that: change the third item of the &lt;code&gt;int[]&lt;/code&gt;, or create a new &lt;code&gt;int[]&lt;/code&gt; holding {1,2,4} and store a reference to that in &lt;code&gt;arr&lt;/code&gt;.  Either approach may be correct, but if one doesn't know into which category &lt;code&gt;arr&lt;/code&gt; belongs, one won't know which approach to use.&lt;/p&gt;&#xA;" OwnerUserId="2073" LastEditorUserId="2073" LastEditDate="2017-07-19T16:41:11.977" LastActivityDate="2017-07-19T16:41:11.977" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2767" PostTypeId="2" ParentId="299" CreationDate="2017-07-19T14:58:45.680" Score="4" Body="&lt;p&gt;I would use more visual examples that target conceptual knowledge first. I would do a TON of memory diagrams with code tracing. Then, introduce the idea of pointers as memory addresses like you do in your example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am a big fan of &lt;a href=&quot;http://cslibrary.stanford.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nick Parlante's pointer materials&lt;/a&gt;. I know they are vintage at this point, but I haven't found anything better at explaining pointers conceptually or at targeting common pointer errors like dereferencing pointers that don't point to anything (&lt;em&gt;seg fault!&lt;/em&gt;). &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Binky Pointer Fun video&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This claymation video (&lt;a href=&quot;http://cslibrary.stanford.edu/104/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Original webpage&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=5VnDaHBi8dM&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube version in C&lt;/a&gt;) is hilarious and a crowd-pleaser, but also explains pointers conceptually---without talking about memory addresses explicitly. For that reason, it has versions in C, C++, Java, and more.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Three Pointer Rules&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is my version of Nick Parlante's Three Pointer Rules. Definitely see the &lt;a href=&quot;http://cslibrary.stanford.edu/106/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pointer Basics document&lt;/a&gt; for full details and the original rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1) Drawing Pointers and Pointees&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Draw a pointer as a box. [C-specific modification] Before it points to anything, that box has a &quot;?&quot; in it. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int *x;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/7P5Oam.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/7P5Oam.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you allocate memory (make a pointee), draw it in the heap. Setting that pointee equal to x makes an arrow go from the pointer to the pointee.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = malloc(sizeof(int));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/rUMd9m.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/rUMd9m.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dereferencing changes the pointee---the thing the pointer points to (see next rule)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;*x = 42;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/PKaOkm.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/PKaOkm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2) Dereferencing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The dereference operation starts at the pointer and &lt;strong&gt;follows&lt;/strong&gt; its arrow&#xA; over to access its pointee. &lt;strong&gt;Important: The dereference operation on a&#xA; pointer only works if the pointer has a pointee&lt;/strong&gt; -- the pointee must be&#xA; allocated and the pointer must be set to point to it. You will save students so many seg faults if you emphasize this!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3) Pointer Assignment&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pointer assignment between two pointers makes them point to the same&#xA; pointee. So the assignment y = x; makes y point to the same pointee as&#xA; x.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Connecting Pointer rules to code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To drive it home, walk through code line-by-line while drawing diagrams. Have students work on their own code tracing and diagrams in groups. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that Nick Parlante emphasizes dynamically allocated memory in his code examples (&lt;code&gt;malloc&lt;/code&gt;), and avoids the &quot;address of&quot; operator &lt;code&gt;&amp;amp;&lt;/code&gt; . I think this is a smart choice because it's what is most common in real code. But of course &lt;code&gt;&amp;amp;&lt;/code&gt; can be introduced in this method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some simple sample code snippets to start the walk-throughs and memory drawings:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// non-pointer code&#xA;double num;&#xA;num = 42.7;&#xA;printf(num);&#xA;&#xA;// pointer code&#xA;double* num_ptr;;&#xA;num_ptr = malloc(sizeof(double));&#xA;*num_ptr = 42.7;&#xA;printf(*num_ptr);&#xA;&#xA;// Binky's code&#xA;int* x;&#xA;int* y;&#xA;x = malloc(sizeof(int));&#xA;*x = 42;&#xA;*y = 13; // yes it crashes, but that's the point &amp;gt;:)&#xA;y = x;&#xA;*y = 13;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="2045" LastEditDate="2017-07-19T16:47:21.757" LastActivityDate="2017-07-19T16:47:21.757" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2768" PostTypeId="2" ParentId="228" CreationDate="2017-07-19T15:43:21.477" Score="3" Body="&lt;p&gt;I don't think there are shortcuts here—the students just need more foundational knowledge before they can be independent. It takes significant expertise to be able to transfer knowledge to new contexts [&lt;a href=&quot;https://www.nap.edu/read/9853/chapter/6&quot; rel=&quot;nofollow noreferrer&quot;&gt;ref&lt;/a&gt;]. Novices have shallow knowledge that is closely tied to shallow features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an expert, you have insight into meaningful patterns in your area of expertise. You have also seen many, many different problems and cases that you can relate to current problem-solving. Your knowledge is organized in terms of its applicability to new problems [&lt;a href=&quot;https://www.nap.edu/read/9853/chapter/5&quot; rel=&quot;nofollow noreferrer&quot;&gt;ref&lt;/a&gt;]. It seems so straightforward from your perspective!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But think about the challenges facing novices. To them, the problem looks different than anything they've seen because they don't recognize the generalities. Do they even know what words to Google?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with other posters that confidence is necessary. Knowing good resources to use (e.g. user-friendly documentation) also helps. But most important is foundational knowledge. Teach your students well, with many examples, and as they learn more they will begin to seek out knowledge on their own. &lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-19T15:43:21.477" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2769" PostTypeId="2" ParentId="228" CreationDate="2017-07-19T15:45:52.587" Score="0" Body="&lt;p&gt;Early in the process, you should emphasize using and applying documentation.  Once the students begin to gain this skill, they can explore APIs and libraries that interest them.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-07-19T15:45:52.587" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2771" PostTypeId="2" ParentId="2757" CreationDate="2017-07-19T16:44:50.357" Score="5" Body="&lt;p&gt;You could extend (heh) your lesson to include &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/uiswing/painting/&quot; rel=&quot;nofollow noreferrer&quot;&gt;custom painting&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you do this by extending &lt;code&gt;JComponent&lt;/code&gt; or &lt;code&gt;JPanel&lt;/code&gt; and overriding the &lt;code&gt;paintComponent()&lt;/code&gt; function. This is how &quot;real&quot; Swing components draw themselves, and it gives students a window into how everything works behind the scenes. You could have them draw  basic scenes, animations, or even games. Or you could have them create custom components like &lt;a href=&quot;http://happycoding.io/examples/java/swing/circle-button&quot; rel=&quot;nofollow noreferrer&quot;&gt;circular buttons&lt;/a&gt; (disclaimer: I wrote this example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have enough time, you might want to split this into multiple lessons: start with basic Swing, then do a lesson on input listeners, then do a lesson on custom painting. At the end of those lessons they'll have enough knowledge to create some pretty fun programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also urge you to stick with functional GUIs instead of using a non-functional chat application. Make a fun calculator that does something like convert dog years, or create a basic game that plays rock-paper-scissors. Encourage students to make these as interesting as possible. IMHO this is much more engaging than a non-functional example gui.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-07-24T21:33:10.920" LastActivityDate="2017-07-24T21:33:10.920" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2772" PostTypeId="2" ParentId="2651" CreationDate="2017-07-19T16:59:17.913" Score="3" Body="&lt;p&gt;I don't think you should teach the &lt;code&gt;foreach&lt;/code&gt; loop and then point out all of its &quot;flaws&quot; when compared to a traditional &lt;code&gt;for&lt;/code&gt; loop. You should treat them both as tools, and different tools are used for different tasks. Maybe teach them a bit of the history (traditional &lt;code&gt;for&lt;/code&gt; came first, then &lt;code&gt;foreach&lt;/code&gt; was added in Java 5) and show them an example of when it would be best to use each.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that you seem to be skipping over a third looping mechanism, which the &lt;code&gt;foreach&lt;/code&gt; loop is based on: the &lt;code&gt;Iterator&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compare two tasks, like printing out every value in an &lt;code&gt;ArrayList&lt;/code&gt; and removing all elements that match a certain criteria (for example, values that are less than 0). Show them how you'd do (or how it's not possible to do) each task in all &lt;strong&gt;three&lt;/strong&gt; types of loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the simple printing task, the &lt;code&gt;foreach&lt;/code&gt; loop is perfect. Using a traditional &lt;code&gt;for&lt;/code&gt; loop or an &lt;code&gt;Iterator&lt;/code&gt; is probably overkill for this task. But with the task of removing elements, the &lt;code&gt;foreach&lt;/code&gt; loop will throw an exception! If you're using a traditional &lt;code&gt;for&lt;/code&gt; loop, you have to loop backwards or be very careful about which index you're looking at (otherwise you might skip elements). And an &lt;code&gt;Iterator&lt;/code&gt; is probably best suited for this task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is that everything in programming should be treated as a tool. A tool isn't inherently better or worse than other tools, it's just better suited for specific tasks. Talk about those tasks.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-19T16:59:17.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2773" PostTypeId="2" ParentId="2699" CreationDate="2017-07-19T17:00:39.003" Score="6" Body="&lt;p&gt;Absolutely, the book is a gem. &#xA;It's filled with great insightful stuff right from the foreword.&#xA;One such gem:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now, as to why I consider this book appropriate for High-School CS is this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;essential material to be addressed by a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, nor even the mathematical analysis of algorithms and the foundations of computing, but rather the techniques used to control the intellectual complexity of large software systems &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The book doesn't focus on learning the language but instead on solving some problem. It builds from a explaining basic primitive type to using those to create abstractions and complex stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The language used, Scheme (a dialect of lisp), is great for this purpose. The authors explain various concepts clearly. &#xA;&lt;a href=&quot;https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1.4&quot; rel=&quot;nofollow noreferrer&quot;&gt;here's&lt;/a&gt; a good example explaining compound procedures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, as pointed out by fellow community folks here, managing the material is a bit hard and I believe that one don't have to cover the entirety of the book but cover enough so that people can infer as how to solve a particular problem given to them.&lt;/p&gt;&#xA;" OwnerUserId="38" LastEditorUserId="38" LastEditDate="2017-07-28T10:17:34.577" LastActivityDate="2017-07-28T10:17:34.577" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2774" PostTypeId="2" ParentId="2632" CreationDate="2017-07-19T20:03:37.467" Score="4" Body="&lt;p&gt;Maybe the&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (int i=0; i&amp;lt;10; i++)&#xA;{ ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;loops seems funny when you compare it to the &amp;quot;interval&amp;quot; loop of other languages, like Pascal's&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;for I:=1 to 10 by 1 do&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;but the C for loop was designed as a much more general linguistic mechanism than loops with counters.&lt;/p&gt;&#xA;&lt;p&gt;The objective was to keep all elements of the &amp;quot;control&amp;quot; of the loop together on one side for better maintenance, and the body of the loop on the other side.&lt;/p&gt;&#xA;&lt;p&gt;So we have a lot of additional common idioms, like&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;for (char *ptr = string; ptr != '\O'; ptr++) { ... }&#xA;&#xA;for (struct Cell *p = first; p != NULL;  p = p-&amp;gt;next) { ... }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The loop over an interval is only an instance.  Maybe the problem is in the overuse of counters in the exercices for beginners (even when the range-based for loop is available). A survival from good old Fortran programming :-) ?&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2020-11-20T18:57:32.193" LastActivityDate="2020-11-20T18:57:32.193" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2775" PostTypeId="2" ParentId="1427" CreationDate="2017-07-19T20:50:39.133" Score="3" Body="&lt;p&gt;Although you may think mine is a less than serious answer, the best example I have seen for the use of a smart-board in computer science is in a &lt;a href=&quot;https://youtu.be/XV-7J5y1TQc?t=1m10s&quot; rel=&quot;nofollow noreferrer&quot;&gt;video from De Pauw University&lt;/a&gt;, when they implement a time machine to explain program code debugging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I just love it, and show it to my students every year!&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2017-07-19T20:50:39.133" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2776" PostTypeId="2" ParentId="1186" CreationDate="2017-07-19T21:27:17.137" Score="3" Body="&lt;p&gt;Although there are many good answers, some aspects of this problem have been overlooked. There are other categories of students who put too much effort in memorising every detail, and they could not be classified as &lt;strong&gt;overmotivated&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have &lt;a href=&quot;https://academia.stackexchange.com/questions/63915/how-to-deal-with-a-student-who-most-likely-has-a-mental-condition-and-keeps-arg/63919#63919&quot;&gt;professional experience&lt;/a&gt; of working with both groups. The first you should consider are those on the Autistic Spectrum. I find that in Computer Science this group is often more highly representative than in other academic subject areas. Students on the Autistic Spectrum would have difficulty separating relevant facts and details from the minutiae. They may also have a degree of obsessive interest in the detail of the subject and memorise detail for its own sake. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another group of students who may do this are those that are completely lost or disengaged. They may not have been paying attention in class and their solution to getting grades is to mindlessly try to store everything by rote, without regard to its relevance or purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My anecdote on this comes from when I taught a course on computer programming for Arts and Social Science students. Very few of them wanted to be there; the class was large (many hundreds), but passing credits was a requirement of their degree program. In order to reach out to them I used many paradigms of programming that I felt they could relate to. I explained that programs were like cooking recipes or knitting patterns. To illustrate this my slides (and notes) including cuttings from recipes and knitting patterns I picked up at home. The result was that many students memorised both the recipe and knitting pattern, but still could not explain what a computer program actually was. I still grin at it today, as the recipe was Ken Hom's &lt;em&gt;Chicken in Paper&lt;/em&gt;. I still wonder why they thought that memorising that would help them pass the computing paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do not have experience in recognising or teaching students on the Autistic Spectrum but you teach computer science, I think you would find further reading or training in this area may be helpful to you.&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="694" LastEditDate="2017-07-19T21:38:22.690" LastActivityDate="2017-07-19T21:38:22.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2777" PostTypeId="1" CreationDate="2017-07-19T22:50:45.787" Score="7" ViewCount="247" Body="&lt;p&gt;Over the past couple days I've had my first opportunity to dive into App Inventor. It has quite frankly blown my mind. I had always (mistakenly) grouped it with Scratch, Snap!, etc. as &quot;just another drag-and-drop environment.&quot; It is that &lt;em&gt;but so much more&lt;/em&gt; (I can finally see that now). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I am wondering where it best fits into a typical high school sequence of CS courses. I could see it being anything from a semester-long intro elective for students with no background to an advanced app development class for students who have completed AP CS A (and thus are quite competent with OOP and Java). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Where does a class focused on App Inventor fit into the high school CS curriculum, and what are the merits of it having said placement?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-24T15:49:12.547" Title="Placement of App Inventor in high school CS curriculum" Tags="|curriculum-design|secondary-education|app-inventor|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2779" PostTypeId="1" CreationDate="2017-07-20T01:35:18.017" Score="13" ViewCount="210" Body="&lt;p&gt;I've faced this issue a few times as I've mentored undergraduate students and been unsure how to help weigh the options. A senior computer science major wants to teach CS as a career. However, they are unsure what steps to take to make it happen. The context is the United States, and typically they are open to considering teaching at any level, but unsure how to weigh their options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;What are the possible pathways?&lt;/em&gt;&lt;/strong&gt; Should they get a teaching credential? In what? Should they get a Master's degree? Should they reach out to private or charter schools that don't necessarily require a credential?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;What are the outlooks for the possible pathways?&lt;/em&gt;&lt;/strong&gt; What's the prognosis for getting hired at a high school? Will they need to also teach math or another subject? Should they consider more creative teaching paths (maybe bootcamps or makerspaces)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you advise such a student?&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-23T18:12:57.363" Title="How should I advise an undergraduate who wants a career teaching CS?" Tags="|careers|" AnswerCount="6" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2780" PostTypeId="2" ParentId="2779" CreationDate="2017-07-20T02:01:32.147" Score="0" Body="&lt;p&gt;Don't.  America has developed a disregard for teachers that is revolting.  There are too many great careers for people who are able at coding.  Right now, reactionary state leges are stripping tenure, pensions, and benefits from teachers. Join the teacher corp today and receive an inferior deal.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly, I think this will get a whole lot worse before it improves.  I think it is going to be incredibly tough for the next generation of teachers.&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="21" LastEditDate="2017-07-20T02:22:32.877" LastActivityDate="2017-07-20T02:22:32.877" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2781" PostTypeId="2" ParentId="2779" CreationDate="2017-07-20T02:04:39.553" Score="5" Body="&lt;h1&gt;The Technical&lt;sup&gt;&lt;sup&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/sup&gt;&lt;/sup&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Across the nation, many states have either legislated (or are currently in the process of legislating) mandatory CS instruction, so this is a fantastic time to find a job in CS education.  In general, there are two paths into the classroom (at least in the public schools).&lt;/p&gt;&#xA;&lt;p&gt;The first way is to go back to school and get a traditional education degree.  There are many graduate degree options available in every state to accomplish this.  The degree program will also typically walk you through the process of getting your teaching license within your state (though details for licensure in ever state is but a few search terms away!)&lt;/p&gt;&#xA;&lt;p&gt;The second path is often called &lt;em&gt;alternate route&lt;/em&gt; (though some states may have different names for it).  Typically, an alternate route position is created by working directly with a &lt;em&gt;school&lt;/em&gt; that would like to hire you even though you have no license, and then working with the state through them. There may be a background check needed before you are even allowed to apply. Again, your students should search for &lt;em&gt;&amp;quot;alternate route,&lt;/em&gt; &lt;em&gt;&lt;strong&gt;StateName&amp;quot;&lt;/strong&gt;&lt;/em&gt; to get a sense of the procedure and requirements for their target state.&lt;/p&gt;&#xA;&lt;h1&gt;The Emotional&lt;/h1&gt;&#xA;&lt;p&gt;Tell them to be prepared for a very steep learning curve when they enter the classroom as a teacher.  While attrition rates are &lt;em&gt;nowhere near&lt;/em&gt; the &lt;a href=&quot;https://edsource.org/2015/half-of-new-teachers-quit-profession-in-5-years-not-true-new-study-says/83054&quot; rel=&quot;noreferrer&quot;&gt;fabled 50%&lt;/a&gt;, they are still quite high, and there are many, many reasons for it.&lt;/p&gt;&#xA;&lt;p&gt;The first several years are physically and emotionally punishing. In my experience (at three schools so far), getting started at a new school or in a new position requires an absolutely breathtaking amount of work just to survive for a few years.  During my first three years as a teacher, it was not unusual for me to be in my school building from 7:30am until 11pm, only to report back the next morning and do the same thing all over again.  Weekends were for planning, and vacations were for catching up on mountains of grading.&lt;/p&gt;&#xA;&lt;p&gt;Along with all of that work and exhaustion also comes the emotional roller-coaster.  The highs are exhilarating and the lows can be quite dark.  If you can make it through the first couple of years, it really does get easier, and you can switch out of &amp;quot;fight or flight&amp;quot; and really start honing your craft.  That is when the magic really starts :)&lt;/p&gt;&#xA;&lt;h1&gt;Finally&lt;/h1&gt;&#xA;&lt;p&gt;Tell them to join professional associations (like the CSTA).  And, no matter how much they need a break, go to at least one conference during their first year.  Those conferences will bring them a million ideas, give them a chance to meet other teachers, and also remind them of how very sweet that light at the end of the tunnel is.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;And tell them to find some place they can go to with questions to help them deal with all of the bumps and pains along the way.  Perhaps even...&lt;/strong&gt; &lt;em&gt;&lt;strong&gt;this very site?&lt;/strong&gt;&lt;/em&gt; &lt;strong&gt;;-)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;&lt;sup&gt;&lt;b&gt;1&lt;/b&gt;&lt;/sup&gt; - My knowledge base is primarily in the state of New Jersey, but I have reason to believe that many states work very similarly.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-20T02:04:39.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2782" PostTypeId="2" ParentId="1186" CreationDate="2017-07-20T07:47:57.863" Score="2" Body="&lt;p&gt;I was overly motivated, but in a slightly different sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the software tools class I took required building an assembler. I picked up the assembly language for the prototyping board I owned (M6800) and worked out the entire grammar, then built the whole thing. It had a few bugs due to my being new to C, but it ran well enough to cause one of the TAs to worry that I had copied existing commercial code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did it that way because I could, and I wanted the experience. And because I was scared of working with other students. If I had my own problem to work on, I had an excuse to work by myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It took enough time that I ran out of time to do the other project, a threaded-interpreter language. I implemented a full Forth for that, as well, but I ended up turning it in late. (And my performance in the industry has unfortunately reflected what I did there.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students tend to do what they have confidence they can do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need to have a section of the course that covers problem solving, where, as others have suggested, you don't use any text. I would even suggest you tell them to just bring ten or so blank pieces of paper, a pencil, and an eraser, and joke about taking points off for having highlighters out. (Make sure they know it's just a joke.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The project is simple. Say the problem is a shoe ordering app, and you know it needs x, y, z, and a mini-app that converts shoe sizes used in different markets. Lay out the stubs for x, y, and z, and ask them how the conversion mini-app fits in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the students direct it. Don't lead. Make sure you go out of your way to ask the highlighter abusers to make suggestions, but don't tease them if they get stuck. Get several suggestions and then get a consensus and move ahead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the students write it. Once it's working, let them critique it. Let this cover several classes, and keep the current source where the students can copy it and play with it on their own. Strongly urge them to do so, and maybe even strongly hint that there is a test question hidden in the parts not covered in class. (Just one, and not too many points, of course.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And probably set aside x, y, and z once the mini-app is done, for a later project which might never come.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of this is to deny them the material to highlight, of course, but also to expose them to basic problem solving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's a large class, you might think there are too many students. Or if it's a small class, you might think that you won't have anyone that will respond. These problems work out in practice, if you are willing to communicate with the students as you go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might help to build the thing yourself before you start, but that might also leave you tempted to do too much leading. You have to decide on that one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have problems communicating because of the room, say it's too big and has too poor acoustics for them all to hear you, you've found one of the factors, right there.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2017-07-20T07:47:57.863" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2783" PostTypeId="2" ParentId="2691" CreationDate="2017-07-20T10:01:40.160" Score="1" Body="&lt;p&gt;You need to teach about the &lt;strong&gt;&lt;em&gt;references&lt;/em&gt;&lt;/strong&gt;, regardless how you call them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you do not see the reference as a pointer, you absolutely need to explain what the reference is, as otherwise no student will understand the things going on behind &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a.x = 1;&#xA;b = a;&#xA;b.x = 2;&#xA;a.x == // WTF?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or, with arrays:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a[0] = 1;&#xA;b = a;&#xA;b[0] = 2;&#xA;a[0] == // WTF?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And it is really not the best idea just to keep secret from the students how the values would change. These cases are frequent in Java code, they are far from the corner cases nobody needs to care about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the reference is easiest to explain in terms &quot;it is the address in computer memory&quot;. Maybe a reference is also something deeply fundamentally else but I still need to see the easier understandable explanation and, well ... it just is, unless we start talking abut the physical, virtual address, address translation, handles that need to be resolved into addresses and other advanced concepts.&lt;/p&gt;&#xA;" OwnerUserId="2110" LastEditorUserId="2110" LastEditDate="2017-07-20T10:08:55.767" LastActivityDate="2017-07-20T10:08:55.767" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2784" PostTypeId="2" ParentId="2779" CreationDate="2017-07-20T13:06:45.070" Score="3" Body="&lt;p&gt;Well first, get a bachelor's degree in CS. Then it depends on the student's goals:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Work in industry first&lt;/strong&gt;. The job outlook for computer science graduates is bright. Salaries are high too. Get a full-time, then go back and teach part-time. I know someone who teaches high school full-time and works part-time in the afternoons. He's very busy, so it's not for everyone. Most universities supplement their faculty with adjunct professors (&lt;em&gt;Warning: they don't get paid much&lt;/em&gt;). In my experience, a master's degree is required. Some companies will pay for it though. Companies may also offer teaching opportunities to train other employees or clients.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Teach HS right away&lt;/strong&gt;. Public high schools usually require a teaching certification. Some private high schools may not, but they may want a master's degree.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Get a PhD in CS&lt;/strong&gt;. To become a full-time faculty member at a university, you'll need a PhD. That's more time and money spent on education. But this is the path if research and presence at a university is your goal. A friend of mine received a grant that is paying for his PhD. But this requires that he lives and works at the university for a period of time.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Teach online&lt;/strong&gt;. There are many opportunities to teach CS online. It's a competitive job hunt, but definitely possible. Again, a master's is usually required to teach undergraduate level CS classes. Online interactions with students is less personal, and the pay isn't great.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-20T13:06:45.070" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2785" PostTypeId="2" ParentId="299" CreationDate="2017-07-20T13:26:08.943" Score="4" Body="&lt;p&gt;Obviously, beginners in C will have to deal with addresses and pointers really soon.&lt;/p&gt;&#xA;&lt;p&gt;First, you owe them an explanation about &lt;strong&gt;addresses&lt;/strong&gt; for&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int aNumber;&#xA;scanf (&amp;quot;%d&amp;quot;, &amp;amp; aNumber);   // an address  &#xA;printf(&amp;quot;%s&amp;quot;,   aNumber);   // a value&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;which will appear in your first examples. So the &amp;quot;address of&amp;quot; operator is known from the start.&lt;/p&gt;&#xA;&lt;p&gt;Second, &lt;strong&gt;pointers&lt;/strong&gt; appear as soon as you define functions with parameters &amp;quot;by reference&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Defining functions is a fundamental activity in programming. It is about giving names to pieces of code, thus introducing &amp;quot;user defined abstractions&amp;quot; to reduce the complexity of problems. And choosing them well so they can be reused. So the introduction of functions should come very quickly.&lt;/p&gt;&#xA;&lt;p&gt;Third: historically arrays (in prehistoric C) were introduced after pointers. An array is (was) simply a pointer automatically initialized with the address of the first byte of an empty space automatically allocated on the call stack. Later in C it became a constant pointer (except in function parameters....). This poor conception explains why arrays in C have a strange status (you can't assign them like structures, for example - but when you pass them as arguments, you don't need the stinking &amp;amp;) which is a difficulty for beginners.  Maybe the problem is with the arrays, not with pointers.&lt;/p&gt;&#xA;&lt;p&gt;Four: As long as you use pointers for arguments transmission, you don't have any necessity to talk about dynamic allocation, which is an entirely different topic.  Except you use a pointer to store the result of malloc().&lt;/p&gt;&#xA;&lt;p&gt;And last: another point is the data structures built from pointers (linked lists, trees,...) and the basic algorithms.&lt;/p&gt;&#xA;&lt;p&gt;EDIT: as an answer to your question: in general I try to avoid artificial examples, because students don't see the link with their usual programming tasks. Function that modify their arguments are more natural: swapping/ordering things, modifying a struct, etc.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="1035" LastEditDate="2021-03-17T05:56:39.660" LastActivityDate="2021-03-17T05:56:39.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2786" PostTypeId="2" ParentId="2749" CreationDate="2017-07-20T13:35:15.833" Score="2" Body="&lt;p&gt;If you look at the &lt;em&gt;header files for the stdio library&lt;/em&gt; (maybe this was true long ago and is no longer, but I can't help with that), you will find how the FILE structure is implemented. It is fascinating to see how the pros create something low-level like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are macros to get and put characters, and manage a buffer. This is more efficient than using a function. When I was building a database transaction server (like a web server), I knew I would need a way to get and put chars on a socket connection, and I knew it needed to be efficient. So, I basically copied the macros out of my favorite version of FILE in the stdio and renamed my structure WIRE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I learned is that it is difficult to fit a complex macro in to the syntax requirements of an expression. This can be solved using the Comma Operator in place of the semicolon. This is why I say, &quot;I knew I had mastered C when I found a vital use for the comma operator.&quot; It is a great line at parties, haw haw&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-20T13:35:15.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2787" PostTypeId="1" AcceptedAnswerId="2814" CreationDate="2017-07-20T14:10:17.513" Score="4" ViewCount="502" Body="&lt;p&gt;If you had to recommend a single book to introduce &lt;em&gt;the way programmers think&lt;/em&gt; to anyone, but it had to be from outside the field of CS, what would it be?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For programmers, my hands down, all-time, crushing winner would be &quot;Becoming a Technical Leader&quot; by Gerald M. Weinberg, which is mainly about self-development but still for an already technical audience. When I was in High School ,the book &lt;strong&gt;&quot;Godel, Escher, Bach&quot;&lt;/strong&gt; by Douglas R. Hofstadter had just come out, and we had an entire course devoted to it. It is probably one of the most quoted books of all time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What one book (besides &quot;Alice in Wonderland&quot;) conveys the mindset and enjoyment of mental processes similar to programming, to a non-technical person? What is it that makes this book important/vital?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-07-20T14:28:17.090" LastActivityDate="2018-08-05T16:56:31.760" Title="What non-programming book is vital for learning the CS mindset?" Tags="|teaching-analogy|resource-request|adult-education|computational-thinking|textbook|" AnswerCount="5" CommentCount="15" ClosedDate="2017-07-21T15:38:16.667" ContentLicense="CC BY-SA 3.0" />
  <row Id="2788" PostTypeId="2" ParentId="2730" CreationDate="2017-07-20T14:19:12.760" Score="1" Body="&lt;p&gt;&lt;em&gt;&quot;The real voyage of discovery consists not in seeking new landscapes, but in having new eyes.&quot;&lt;/em&gt; -- Marcel Proust&lt;br&gt;&#xA;The first language I had to use in College (BS Engineering curriculum) was APL. The next was Lisp. My prior exposure was mainly Apple ][ BASIC and a bit of 6502 assembler, and some PDP-11 scripting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my view is that you don't need to undo &lt;em&gt;any&lt;/em&gt; procedural habits, &lt;em&gt;if&lt;/em&gt; the language is so wildly different from procedural that the students are entirely lost in a new landscape with no familiar landmarks &lt;em&gt;whatsoever&lt;/em&gt;. It worked for me.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-20T14:19:12.760" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2789" PostTypeId="5" CreationDate="2017-07-20T16:32:07.300" Score="0" Body="&lt;p&gt;Different institutions start out a student's early education in different ways.  There is more or less of a dependence on programming, but at some point a language and its underlying paradigm is chosen. Some prefer an imperative model for student programming, some a functional, others an object-oriented model. The instructors may or may not be intimately familiar with the paradigm they are expected to teach and so may need advice, both on methodology and on, say student exercises. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, most institutions will want to at least visit other paradigms than the one they depend on for the bulk of instruction. Again, there arise both a question of faculty preparation and the need for effective materials for students. This tag is appropriate for all such question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions about the underlying meaning or philosophy of any given paradigm are arguably appropriate, but likely not the underlying theory. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-20T18:54:41.517" LastActivityDate="2017-07-20T18:54:41.517" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2790" PostTypeId="4" CreationDate="2017-07-20T16:32:07.300" Score="0" Body="This tag is for all questions about programming paradigms, including but not limited to: introducing a new paradigm, advantages/disadvantages of a paradigm, how to help students learn a new paradigm different from the one they know, etc. It is generally not appropriate for theoretical questions about paradigms.. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-20T18:21:39.760" LastActivityDate="2017-07-20T18:21:39.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2791" PostTypeId="2" ParentId="2779" CreationDate="2017-07-20T16:42:11.480" Score="3" Body="&lt;p&gt;In many ways the most important reason to choose a profession is that you are &lt;em&gt;driven to it&lt;/em&gt;. In many ways the most important characteristic of a good  teacher is &lt;em&gt;desire&lt;/em&gt;, including a desire to learn. If you have that, it is likely a good choice. My own heart wouldn't let me do anything but teach. This developed pretty early, certainly by my undergraduate days. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't do it for money. You can earn more doing something different, certainly. Don't do it for general societal acclaim. In the US too large a fraction of the population despise teachers, thinking of them as &quot;takers at the public trough.&quot; Only do it if your makeup compels you to do it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the same is true in many fields. Don't study Philosophy or Music because you think it will give you a &quot;career.&quot; Do it because you love it and no substitute will suffice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you &lt;em&gt;are&lt;/em&gt; driven to a particular field, let no obstacle stop you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is good to have a backup for which a broad education helps. The world changes as do the perceived needs. There was a time when mathematicians were in great demand, followed by a time when they needed to know how to service cars. Up and down, maybe up again later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may be outing myself here, but I once told a group of APCS graders that they were the &quot;greatest people on earth&quot; for the dedication they showed to education and to their students. Wild cheers, of course. I hope they were cheering themselves, not the speaker. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;(If you recognize the above scenario, remember and respect that I'm anonymous here, please.)&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-20T17:04:50.840" LastActivityDate="2017-07-20T17:04:50.840" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2792" PostTypeId="2" ParentId="299" CreationDate="2017-07-20T16:44:59.443" Score="4" Body="&lt;p&gt;Yours is a fine first lesson, although it does not show the value of pointers. I would suggest also demonstrating how pointers can be used to implement a swap function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask the students (or step them through) what this code does:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void swap(int x, int y) {&#xA;    int temp = x;&#xA;    x = y;&#xA;    y = temp;&#xA;}&#xA;&#xA;int main() {&#xA;    int a = 1;&#xA;    int b = 2;&#xA;    printf(&quot;Before calling swap(): a = %d, b = %d\n&quot;, a, b);&#xA;    swap(a, b);&#xA;    printf(&quot;After calling swap(): a = %d, b = %d\n&quot;, a, b);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you know, the local variables &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; do not get changed, because C uses call by value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that point, I show and discuss this cartoon:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/HTC5n.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/HTC5n.gif&quot; alt=&quot;Cartoon in which doctor tells patient: &amp;quot;Your x-ray shows a broken rib, but we fixed it with photoshop.&amp;quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;a href=&quot;https://www.jantoo.com/cartoon/07634755&quot; rel=&quot;nofollow noreferrer&quot;&gt;This cartoon&lt;/a&gt; might be too risqué.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then teach and step through the correct way to write and call a swap procedure:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void swap(int *x, int *y) {&#xA;    int temp = *x;&#xA;    *x = *y;&#xA;    *y = temp;&#xA;}&#xA;&#xA;int main() {&#xA;    int a = 1;&#xA;    int b = 2;&#xA;    printf(&quot;Before calling swap(): a = %d, b = %d\n&quot;, a, b);&#xA;    swap(&amp;amp;a, &amp;amp;b);&#xA;    printf(&quot;After calling swap(): a = %d, b = %d\n&quot;, a, b);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This provides a simple demonstration of the benefits of pointers and will help them understand why primitives (not counting pointers) are passed by value, while everything else appears to be passed by reference.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-07-20T16:44:59.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2793" PostTypeId="1" AcceptedAnswerId="2798" CreationDate="2017-07-20T17:39:52.357" Score="21" ViewCount="2911" Body="&lt;p&gt;This is a question for those of you who have an intro class before AP Computer Science (or maybe even just an intro class). What order do you teach the topics in your intro class? I start with if statements, then go in the following order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;While Loops&lt;/li&gt;&#xA;&lt;li&gt;Variables (I do some hand-waving with variables before this point)&lt;/li&gt;&#xA;&lt;li&gt;For Loops&lt;/li&gt;&#xA;&lt;li&gt;Arrays&lt;/li&gt;&#xA;&lt;li&gt;OOP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I used to start with variables a few years ago, but students seemed to have trouble getting the concept that early in the course. I'm not sure if I should go back to that now that I have more teaching experience and have a better idea of how to teach variables.&lt;/p&gt;&#xA;" OwnerUserId="1251" LastActivityDate="2020-12-04T21:08:35.140" Title="Order to Teach Topics in an Intro Programming Class" Tags="|curriculum-design|variables|" AnswerCount="8" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="2795" PostTypeId="2" ParentId="2793" CreationDate="2017-07-20T17:55:26.790" Score="3" Body="&lt;p&gt;My answer, for the past 20 years is&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;OOP - but primarily as enabling composition, not inheritance. The notion of a class as a &quot;bundle of behavior&quot;. Inheritance via interfaces, not classes, or the equivalent when not in a statically typed language. &lt;/li&gt;&#xA;&lt;li&gt;reference variables (no primitive data)&lt;/li&gt;&#xA;&lt;li&gt;Some design patterns to reinforce good OOP thinking (Strategy especially)&lt;/li&gt;&#xA;&lt;li&gt;problem solving ......&lt;/li&gt;&#xA;&lt;li&gt;collections (list, set, ...) Not ALL collections, just enough. &lt;/li&gt;&#xA;&lt;li&gt;selection&lt;/li&gt;&#xA;&lt;li&gt;recursion if I can manage it. &lt;/li&gt;&#xA;&lt;li&gt;looping - while before for, but iterators before all.  &lt;/li&gt;&#xA;&lt;li&gt;recursion here if not earlier&lt;/li&gt;&#xA;&lt;li&gt;.....&lt;/li&gt;&#xA;&lt;li&gt;primitive data (int, char, ...)&lt;/li&gt;&#xA;&lt;li&gt;arrays&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The focus is on design and on building things, not mathematical puzzles. This needs a graphical system in which to work. Greenfoot is a good UI for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also. Classes should be simple and methods (very) short and very simple. At statement number 5 in a method I start to itch. Put the complexity into the interactions between objects, not in the methods of the class. This may be the most transformational message of all, here.  Another way to think of it is to capture &quot;state&quot; in the program counter, not in fields and variables - the &quot;state of the computation&quot;, not in explicitly &quot;remembered&quot; values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this &quot;mind set&quot; is radically different from that of a C or even (the typical) C++ programmer. It is as radical as the mindset of a functional programmer. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-20T17:55:26.790" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="2796" PostTypeId="2" ParentId="2793" CreationDate="2017-07-20T17:56:16.090" Score="6" Body="&lt;p&gt;In &lt;a href=&quot;https://mitpress.mit.edu/sicp/full-text/book/book.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt; (&lt;em&gt;SICP&lt;/em&gt;)&lt;/a&gt;  (a book, video series, and university course), they do not cover variable mutation until around half way. They covered what seemed like everything I know before this. Including functions (not procedures) and object orientation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My thought are that these partial sequences makes sense: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;statements → sequences → functions → parametrised functions → just about everything else → variable mutation&lt;/p&gt;&#xA;&#xA;&lt;p&gt;infinite loops → bounded loops &lt;code&gt;for each&lt;/code&gt; → unbounded loops &lt;code&gt;for(int i=0; i&amp;lt;10; i++)&lt;/code&gt; (while this is bounded, the construct is unbounded).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;non-mutating variables (possibly function parameters) → selection&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If these partial sequences are correct (work), then they need to be interleaved to make a sequence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;SICP&lt;/em&gt; may do it a bit different, so worth a look.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="76" LastEditDate="2017-07-20T21:49:58.303" LastActivityDate="2017-07-20T21:49:58.303" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2797" PostTypeId="2" ParentId="2793" CreationDate="2017-07-20T18:24:35.783" Score="1" Body="&lt;p&gt;In touch of class — Bertrand Meyer, He start with the big stuff: object orientation, working programs. And then breaks it down toward the detail.&#xA;So an top down approach, as opposed to the often seen bottom up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. bounded loops (foreach) before unbounded loops (and how to implement bounded loops using unbounded once).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using objects before creating them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can not see how to teach by starting with explaining each of the bricks, before teaching how to but the bricks together. I think it is better to explain what a house is, and then break it down, to explain how to make one, and as you do this explain the properties of the bricks.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-20T18:24:35.783" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2798" PostTypeId="2" ParentId="2793" CreationDate="2017-07-20T18:25:45.250" Score="11" Body="&lt;p&gt;I think this depends entirely on the programming language you use. Or maybe more accurately, you should choose a language that allows you to introduce the concepts in the order you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use a language called &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, which is built on top of Java and allows you to create visual, animated programs without any boilerplate code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd start with &lt;strong&gt;calling functions&lt;/strong&gt;. Here's an entire Processing program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ellipse(20, 30, 40, 50);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This program shows a window and draws a 40x50 oval at coordinates &lt;code&gt;20,30&lt;/code&gt;. There are other functions in Processing. Have the students draw a basic scene.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I'd talk about &lt;strong&gt;using variables&lt;/strong&gt;. Processing has a few predefined variables that come in handy:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;size(500, 500);&#xA;ellipse(width/2, height/2, 200, 200);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This program creates a 500x500 window and shows a circle in the middle of it. Have the students modify their scenes so they stretch to fit the screen, using the &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I'd talk about &lt;strong&gt;creating variables&lt;/strong&gt;. Have students create their own variables that allow them to move their scene around, or easily change the color, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then comes &lt;strong&gt;creating functions&lt;/strong&gt;. Here's an example program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void setup(){&#xA;   size(500, 500);&#xA;}&#xA;&#xA;void draw(){&#xA;   ellipse(mouseX, mouseY, 25, 25);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This program shows a window that draws a circle wherever the mouse is, 60 times per second.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully this gives you an idea of Processing and the general approach. From here I'd cover these topics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Debugging&lt;/li&gt;&#xA;&lt;li&gt;If Statements&lt;/li&gt;&#xA;&lt;li&gt;Animation&lt;/li&gt;&#xA;&lt;li&gt;For Loops&lt;/li&gt;&#xA;&lt;li&gt;Arrays&lt;/li&gt;&#xA;&lt;li&gt;User Input&lt;/li&gt;&#xA;&lt;li&gt;Using Objects&lt;/li&gt;&#xA;&lt;li&gt;Creating Classes&lt;/li&gt;&#xA;&lt;li&gt;ArrayLists&lt;/li&gt;&#xA;&lt;li&gt;Images&lt;/li&gt;&#xA;&lt;li&gt;Libraries&lt;/li&gt;&#xA;&lt;li&gt;Deploying your code&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I've put together a series of tutorials that cover all of these topics, available at &lt;a href=&quot;http://HappyCoding.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;HappyCoding.io&lt;/a&gt;. I'd be happy to help adapt these tutorials into an introductory curriculum.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-07-24T22:28:41.650" LastActivityDate="2017-07-24T22:28:41.650" CommentCount="14" ContentLicense="CC BY-SA 3.0" />
  <row Id="2799" PostTypeId="2" ParentId="2787" CreationDate="2017-07-20T19:01:52.420" Score="3" Body="&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Software Requirements and Specifications&lt;/em&gt; — Michael Jackson&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;The Mythical Man Month, revisited&lt;/em&gt; — Fredrick Brooks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both are software engineering books, however they are very approachable for non computer-scientists / software-engineers. They both have a set essays of various aspects of software engineering.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Examples from the books&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;De-skilling from &lt;em&gt;SRS&lt;/em&gt;:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;SRS&lt;/em&gt; talks about the introduction of structured programming, and the introduction of the number zero and the Arabic number system, in to the Roman empire, along with its methods for adding, subtracting, multiplying, and dividing. And how the mathematicians, that where super skilled university graduates, that worked in the markets working out the total price of sales (adding, multiplying), went on strike, because they thought they would be out of a job. Well the army just killed them all, and the next generations moved on to invent calculus and other more interesting stuff. (my account of when calculus was invented may be out by a few years).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Brilliance (&lt;em&gt;SRS&lt;/em&gt;):&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a: “Bob is brilliant”&lt;/li&gt;&#xA;&lt;li&gt;b: “Yes he does the most amazing stuff, even he does not understand it”&lt;/li&gt;&#xA;&lt;li&gt;a: “What about kate?”&lt;/li&gt;&#xA;&lt;li&gt;b: “We thought she would be brilliant, but she has not proved her self yet. Every time we give her something hard, it turns out to be easy. Her solutions are simple, even the most junior people understand how she did it.”&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Mythical Man Month (&lt;em&gt;MMM&lt;/em&gt;):&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just one of the chapter is MMM. Talks about how if it takes 1 man 2 hours to dig a hole, it will not necessarily be true that 2 men will take 1 hour. He also states that if you add people toward the end of the project (which is what normally happens), then the project will take longer.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="76" LastEditDate="2017-07-21T15:31:31.390" LastActivityDate="2017-07-21T15:31:31.390" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2800" PostTypeId="1" AcceptedAnswerId="2813" CreationDate="2017-07-20T19:28:18.960" Score="6" ViewCount="437" Body="&lt;p&gt;One of the next big thing that will get people interested are block-chain based technology. Many people are asking about &quot;WTH is blockchain&quot; and it seems that this will be asked quite a lot in coming days, both from CS and non-CS folks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I love explaining particulars using an analogy. Is there some analogy that I could use to eli5 to non-CS folks that are curious?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Really appreciate answers, as I will simply link to this question for people asking about blockchains)&lt;/p&gt;&#xA;" OwnerUserId="38" LastEditorUserId="27" LastEditDate="2017-07-20T19:47:34.373" LastActivityDate="2017-07-21T20:22:17.050" Title="How do I explain blockchain using an analogy?" Tags="|teaching-analogy|layperson|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2801" PostTypeId="2" ParentId="2787" CreationDate="2017-07-20T19:29:48.763" Score="3" Body="&lt;p&gt;I find &lt;a href=&quot;https://en.wikipedia.org/wiki/Henry_Petroski&quot; rel=&quot;nofollow noreferrer&quot;&gt;Henry Petroski's&lt;/a&gt; book &lt;a href=&quot;https://www.amazon.co.uk/d/Books/Engineer-Human-Failure-Successful-Design-Henry-Petroski/0679734163&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;To Engineer is Human - The Role of Failure in Successful Design&quot;&lt;/a&gt; a useful read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also suggest &lt;a href=&quot;https://en.wikipedia.org/wiki/Tracy_Kidder&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tracy Kidder's&lt;/a&gt; &lt;a href=&quot;https://www.amazon.co.uk/Soul-New-Machine-Tracy-Kidder-ebook/dp/B00FOQS8AO/ref=la_B000AQ8T3E_1_2?s=books&amp;amp;ie=UTF8&amp;amp;qid=1500578601&amp;amp;sr=1-2&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;The soul of a new machine&quot;&lt;/a&gt;, but mainly because I was there...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also suggest &lt;a href=&quot;https://www.amazon.co.uk/Scam-About-Popular-Online-Offline-ebook/dp/B01MZE4XUT/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1500578660&amp;amp;sr=1-1&amp;amp;keywords=scam&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Scam: Find Out All About Popular Online and Offline Scams and How to Avoid Them&quot;&lt;/a&gt; which can be an eyeopener for the naive student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also endorse &lt;a href=&quot;https://en.wikipedia.org/wiki/Fred_Brooks&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fred Brooks'&lt;/a&gt; &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0201006502&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;The Mythical Man month&quot;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sure my shelf has a few more...&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="283" LastEditDate="2017-07-21T00:32:43.900" LastActivityDate="2017-07-21T00:32:43.900" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2802" PostTypeId="2" ParentId="2800" CreationDate="2017-07-20T19:39:13.860" Score="1" Body="&lt;p&gt;It is like a set of legal precedents, where each one refers to previous ones, and adds a bit. To understand the latest one, you must walk the chain, and try to work out what is now true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Old precedents can not be edited, but new ones can supersede (by saying it is like the old one except that …). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Precedents  are created in local courts, there is no need for the legislature of central court to be involved. Then these new precedents can be distributed to other courts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If two courts create a precedent concurrently, then this needs to be considered when interpreting. A new court hearing may be formed to merge precedents creating a new document, that links back to the two that need merging. Thus all precedents have 1 or more parents (except the root, this is a statute), and 0 or more children. However a precedent can not know about its children, as when a new child is added, the precedent can not be changed (as it is immutable).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="104" LastEditDate="2017-07-21T20:22:17.050" LastActivityDate="2017-07-21T20:22:17.050" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2803" PostTypeId="2" ParentId="2793" CreationDate="2017-07-20T20:11:47.233" Score="4" Body="&lt;p&gt;I am of the school of thinking that starting at an abstract level causes too many students to consider computation as inscrutable magic.  And that can lead to broken mental models and buggy ideas about how to code stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A 1970's vintage UC Berkeley Intro to Computing course (for non-EECS majors) used a cardboard computer with pencil-and-eraser-mutable memory cells ( &lt;a href=&quot;https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation&lt;/a&gt; ). The professor also talked about physical adding machines (maybe Pascaline or abacus equivalents) before diving into coding in an HLL.  Programming became something that controlled a visualizable machine, not math that became transmuted by magic incantations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start there (at a very non-abstract level), and then show how modern HLL's make it so much easier to solve higher level problems.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-07-21T23:33:30.463" LastActivityDate="2017-07-21T23:33:30.463" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2804" PostTypeId="2" ParentId="2787" CreationDate="2017-07-20T20:13:54.590" Score="3" Body="&lt;p&gt;Since you said non-programming, rather than non-CS I'd like to add a couple of very small books by V.J Rayward-Smith: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;A First Course In Formal Language Theory&lt;/em&gt;   &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;First Course in Computability&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both books give an excellent, compact, introduction to important topics and important background for upper-level courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both are available at &lt;a href=&quot;https://www.goodreads.com/author/show/2098504.V_J_Rayward_Smith&quot; rel=&quot;nofollow noreferrer&quot;&gt;GoodReads&lt;/a&gt;. Hard copies are a bit hard to come by. I treasure my copies.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, there are, I think, only a few books on computing that qualify for the tag &quot;Literature&quot;. One is &lt;a href=&quot;https://www.abebooks.com/book-search/isbn/0130830984/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;On Pascal Compilers&lt;/em&gt;, by Per Brinch Hansen&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &lt;em&gt;Godel, Escher, Bach&lt;/em&gt; is hard to beat for a general book on deep thinking. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-20T20:24:14.917" LastActivityDate="2017-07-20T20:24:14.917" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2805" PostTypeId="2" ParentId="451" CreationDate="2017-07-20T20:45:12.193" Score="2" Body="&lt;p&gt;The practical interest of recursion is obvious to the students when they are presented with problems where the underlying data structure is, for example,  tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For exemple : figures that can be circles, squares, or group of figures.  Or directories containing files and directories.   XML nodes, etc. Recursive descent to evaluate an expression...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They don't even ask how to process them by iterative programs. Obviously good (and best) practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classical examples about numbers are counterproductive : factorial, fibonacci, etc. as the students (mostly) already know instantly how to express them with loops. So why should they spend efforts learning how to do it painfully a &quot;less natural&quot; way ? &lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-07-20T21:04:10.873" LastActivityDate="2017-07-20T21:04:10.873" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2806" PostTypeId="2" ParentId="451" CreationDate="2017-07-20T21:44:24.517" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Why are we learning recursion? Is it good programming practice?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Most things in programming should be thought of as &lt;strong&gt;tools&lt;/strong&gt;. Languages are tools. Algorithms are tools. Various approaches are tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different tools are for different jobs. A carpenter learns about a hammer, a saw, a wrench, etc because sometimes the hammer will be the best tool for the job, sometimes it'll be the saw, and sometimes it'll be the wrench. Sometimes, the best tool will be something the carpenter has never used before! But the more tools they already know, the easier it'll be to learn about new tools. Having learned about a wrench makes it easier to learn about a screwdriver when you need to. So learning about a tool is never wasted time: even if we don't use the tool every day, it helps us learn about stuff we need to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's why we learn about a bunch of different things in programming. Sometimes a loop will be the best tool. Sometimes a recursive function will be the best tool. Sometimes we'll even come across new ideas and approaches! And we can use the tools we've already learned about to help learn about these new tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So even if recursion doesn't solve every problem (just like a hammer doesn't cover everything a carpenter has to do), it's still worth learning about because it adds a tool to our toolbelt.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-20T21:44:24.517" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2807" PostTypeId="2" ParentId="2750" CreationDate="2017-07-20T22:04:31.870" Score="1" Body="&lt;p&gt;I like these ideas for building logic circuits. Some of them are already covered in other answers, but not all.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dominoes — as in peters answer&lt;/li&gt;&#xA;&lt;li&gt;People ( I would love to see some ideas on this, as I suspect it to be very powerful)&lt;/li&gt;&#xA;&lt;li&gt;Electronic — logic gates&lt;/li&gt;&#xA;&lt;li&gt;Discrete Electronics — e.g. the &lt;a href=&quot;https://www.youtube.com/watch?v=lNa9bQRPMB8&quot; rel=&quot;nofollow noreferrer&quot;&gt;mega processor&lt;/a&gt; is made of just discrete transistors, resistors, leds, and other discrete components (no integrated circuits).&lt;/li&gt;&#xA;&lt;li&gt;Hydraulics&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pneumatics:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once played with a pneumatic piston and switch set, and managed to implement many simple digital and logic devices. These included &lt;code&gt;Astable multi-vibrator&lt;/code&gt; (an oscillator), &lt;code&gt;mono-stable multi-virbartor&lt;/code&gt; (a device that does not want to stay on/off), &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, &lt;code&gt;nand&lt;/code&gt;, &lt;code&gt;nor&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The set included indicator lights (Not lights but colours that where pushed up against a frosted cover, to make them visible); Switches (that would allow air to flow); pistons, and pipes. The closes to this that I have seen since is minecraft.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was at around this time that I realised that the distinction between electronics, mechanics, and software, was false. It is all informatics (sometimes hardware, sometimes software).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-31T07:55:19.117" LastActivityDate="2017-07-31T07:55:19.117" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2808" PostTypeId="1" CreationDate="2017-07-20T22:22:06.357" Score="8" ViewCount="576" Body="&lt;p&gt;Why do some instructors delay teaching mutation due to considering it to be a more difficult concept? (than functional or recursive concepts, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is very likely that, back in the 8-bit PC days, many thousands of 8 to 12 year olds learned to code in Tiny Basic or other &quot;street&quot; BASIC implementations (where there weren't even local variables or other easy recursion or functional semantic support).  How could these kids do so if variable mutation was a difficult concept?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or is the spaghetti code they often produce a result of not really understanding the concept itself?  (rather than just the software engineering downsides)&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2021-09-02T05:54:36.020" Title="Why would mutation be considered by some as a difficult concept to grasp?" Tags="|curriculum-design|variables|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2809" PostTypeId="2" ParentId="2750" CreationDate="2017-07-20T22:44:09.117" Score="1" Body="&lt;p&gt;Another fun exercise is implementing &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt; using only &lt;code&gt;nand&lt;/code&gt; gates (or &lt;code&gt;nor&lt;/code&gt; gates). This proves that &lt;a href=&quot;https://neovlsi.wordpress.com/2009/03/06/what-is-a-universal-gate-and-why-nand-is-called-a-universal-gate/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;nand&lt;/code&gt; is universal&lt;/a&gt;. You can demonstrate that &lt;code&gt;nor&lt;/code&gt; is universal then ask them to show that &lt;code&gt;nand&lt;/code&gt; is (or vice versa).&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-31T16:02:26.180" LastActivityDate="2017-07-31T16:02:26.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2810" PostTypeId="2" ParentId="2779" CreationDate="2017-07-20T23:26:37.737" Score="1" Body="&lt;p&gt;I'm going to be honest - I'd question them first. Maybe suggest tutoring to see if they like it, and really trying to get at what they want to do. If they want to teach at a university and also do research, that's one thing. If they want to teach at a highschool or middle school, that's quite another. An example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've emailed a professor at a university near me. He does extensive research, especially in molecular computing and so forth, and he emailed me apologizing for not responding sooner because he had been working with a colleague in Spain on a research project. &lt;em&gt;(::jaw drops in awe::)&lt;/em&gt; He also teaches a few classes at the university. This is at a pretty good public university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In contrast, I've taken a class under a teacher in my middle school in engineering/robotics/programming. It was a pretty good course, I must say, but I should point out: he taught three engineering/robotics/programming classes a day, three math classes, and then had a prep period. He also supervised the mock trial club and the robotics club, and I think he might coach a sport too. He as far as I know does not do research. This is at a really good public school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quite different. If your student wants to do the latter or the former, fair enough! Both are good pursuits. Just make sure they know what they're getting into. Things might be better or worse depending on whether the school is public, private, what area it's in, etc. Also, maybe they really just want to do research, or maybe lead a team in industry. On the other hand, it's perfectly okay to change careers - I know multiple people who have done it - so maybe they want to do one thing and then another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's all fine, but just make sure they know that they want to do, and that they've tried doing it. Also, point out that they might want to take some education focused classes along with their main classes.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-20T23:26:37.737" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2811" PostTypeId="2" ParentId="2793" CreationDate="2017-07-21T00:09:48.060" Score="10" Body="&lt;p&gt;I'm self-taught, but here are my thoughts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;0. Language&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned using a combination of Python (once I started to get more serious about programming, I actually don't remember how I stumbled across it) and JavaScript. Consequently, I have good indentation habits, and I haven't had to worry about problems you do have to worry about with some lower level languages. It also allows you to dabble in OOP but also not if you don't want to, which is also nice. Here's the general order of events for me, as best as I can remember it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. Motivation&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Drawing shapes in JavaScript, printing things in Python, all stuck out to me as &quot;whoa, cool&quot; moments that made me want to keep going. I also saw cool projects that others had made on Khan Academy, where I started learning. It was exciting, and I wanted to be able to do all the stuff that the other users did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Printing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is almost step -1, but just thought I'd point it out here. This is also useful for the next thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. Variables&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, you can progress from&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print(&quot;Hello, World!&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print_this = &quot;Hello, World!&quot;&#xA;print(print_this)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I learned using the classic buckets analogy - when you define a variable, you put something in a bucket that's labelled whatever you name the variable. When you call the variable elsewhere, the computer looks for the name, and grabs whatever's inside the bucket.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. &lt;code&gt;if&lt;/code&gt; statements&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This again builds off the previous concept - for example, you might do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;print_this = &quot;Hello, World!&quot;&#xA;do_i_print = True&#xA;if do_i_print == True: #this can also be written as 'if do_i_print:'&#xA;    print(print_this)&#xA;else:&#xA;    print(&quot;Nobody's home!&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Project 1&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All learning is more fun when it's motivated by something. With the information students have learned so far, they can now create a choose-your-own-adventure story with the introduction of one simple built-in in python - &lt;code&gt;input()&lt;/code&gt;. For example, a very simple one might be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;first_choice = input(&quot;Your sister is missing when you wake up. Do you go to the kitchen to eat first, or go straight out to the barn to check if she's there? Input 'barn' or 'kitchen': &quot;)&#xA;if first_choice = 'barn':&#xA;    print(&quot;You found your sister!&quot;)&#xA;elif first_choice = 'kitchen':&#xA;    print(&quot;Your mom scolds you for being a glutton and sends you to do your chores. Maybe you can find your sister later.&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You might also introduce basic input sanitization, and tell them this is what working programmers have to consider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5. Numbers/math&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Previously, you've used strings in the variables. Now, generalize to other types of variables - numbers, which can be whole or with decimals (integers and floats), lists, etc. Starting with numbers, you can then teach math operations (this'll become useful in a couple of steps). For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;my_num = 5&#xA;print(my_num**2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;6. Functions&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can now generalize the previous step - &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a = 5&#xA;b = 2&#xA;&#xA;def multiply(a, b):&#xA;    return a*b&#xA;&#xA;multiply(a, b)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Project 2&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, a bigger project, and one they'll really enjoy (or at least, nerdy me did). If this is early highschool or middle school, they'll appreciate a program to solve quadratic equations for them. (I can provide my own, probably overly long solution if you want. Provide bonus points if they get their program to accommodate imaginary numbers. Hint: it has to do with the difference between the square root functions in &lt;code&gt;math&lt;/code&gt; and &lt;code&gt;cmath&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;7. More types - lists and dictionaries&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lists can be fun for later projects. Lists should probably be explained first, and then dictionaries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;8. &lt;code&gt;while&lt;/code&gt; loops&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, we can do something to all the elements in a list, which flows nicely into 9 and 10. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;classmates = ['Bob', 'Jerry', 'Joe', 'Anna', 'Joan', 'Teresa']&#xA;ages = []&#xA;counter = 0&#xA;while counter &amp;lt; len(classmates):&#xA;    student = classmates[counter]&#xA;    print(student)&#xA;    age = input(&quot;What is the age of &quot; + student + &quot;?&quot;)&#xA;    ages.append(age)&#xA;    counter+=1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Rather a poor example, because that really should be a dictionary, but then you could I suppose do &lt;code&gt;dict(zip(classmates, ages))&lt;/code&gt; - either way, it's a poor scheme. I'll try to replace it if I think up something better. Anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;9. &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;foreach&lt;/code&gt; loops&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, this gets shorter. For loops progress from while loops:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;classmates = ['Bob', 'Jerry', 'Joe', 'Anna', 'Joan', 'Teresa']&#xA;ages = []&#xA;for(i = 0; i &amp;lt; len(classmates); i++):&#xA;    student = classmates[i]&#xA;    print(student)&#xA;    age = input(&quot;What is the age of &quot; + student + &quot;?&quot;)&#xA;    ages.append(age)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, you could just do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;classmates = ['Bob', 'Jerry', 'Joe', 'Anna', 'Joan', 'Teresa']&#xA;ages = []&#xA;for student in classmates:&#xA;     print(student)&#xA;     age = input(&quot;What is the age of &quot; + student + &quot;?&quot;)&#xA;     ages.append(age)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Project 3&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now, another project! This one you can do something in the lines of &lt;a href=&quot;https://www.codecademy.com/courses/python-beginner-en-qzsCL/0/1?curriculum_id=4f89dab3d788890003000096&quot; rel=&quot;nofollow noreferrer&quot;&gt;codecademy's python project&lt;/a&gt; - using functions, dictionaries, lists, math, etc - to build a project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;10. OOP&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think I understand/have used OOP enough to suggest analogies/etc, but I do suggest introducing it last along with an accompanying project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Project 4&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OOP focused project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;11. Exploration&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From here, perhaps let them explore. One kid might be excited for robotics, another, for the theoretical stuff, another, for scientific programming, another, game programming. Perhaps an ideal method: a unit on programming to control peripherals, using, say, the arduino, a unit on some theoretical stuff - logic gates, truth tables, and so forth, and a unit on specific programming applications - GUIs, game programming, scientific programming, websites - and allowing students to dabble in all of these.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="793" LastEditDate="2017-07-24T18:48:53.970" LastActivityDate="2017-07-24T18:48:53.970" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2812" PostTypeId="2" ParentId="2808" CreationDate="2017-07-21T00:10:10.990" Score="4" Body="&lt;p&gt;I'll give a general answer that you need to think about before it really registers. It applies to both the OOP case and the more C-like case. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;A program with a high percentage of immutable values is easier to reason about and modify.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once something gets a value/state in one part of the program it has that state throughout. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm not sure that &quot;harder to teach or grasp&quot; is the right metric here, but what produces a better program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Deeply nested selection structures are difficult to grasp because you can't simply point to a place in the code and know what is true and what is false. You have to mentally trace the code to understand what is going on. You can avoid that with immutables, though a few other things are needed for a full picture. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note that assignment isn't &lt;em&gt;essential&lt;/em&gt; for computation. I.e. The lambda calculus is Turing Complete without it. This is the basis of pure functional programming. But the same idea can be applied elsewhere, as well, so this isn't a call to only program in that paradigm. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-21T00:25:17.017" LastActivityDate="2017-07-21T00:25:17.017" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2813" PostTypeId="2" ParentId="2800" CreationDate="2017-07-21T00:59:55.283" Score="4" Body="&lt;p&gt;Use a classroom activity, then present that as the analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An old campfire activity, for those that remember it. A growing story that nobody knows the end of, or even if it &lt;em&gt;will&lt;/em&gt; end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The objective is to create a story, with everyone adding their parts, in turn. Someone starts the story by saying a few lines, and ending mid-sentence, just before some action happens. The next person repeats what the first persons said, and has to finish that sentence with something that makes sense, and then continues the story, using their own idea, since they don't know what the first person was thinking. Like the first person, the second stops mid-sentence in what they're saying. The third person repeats everything the second said (which includes what the first one said), and finishes the sentence left incomplete by the second. Adding more lines to the story, this person also ends mid-sentence. It continues in a similar fashion with each person repeating the whole story from the beginning, adding a couple lines, and ending mid-sentence. At some point the &quot;next&quot; person will not be able to repeat, even in their own words, the story so far, and the chain fails, hence ending. If it happens to be too short, or if not every student has had the opportunity to participate, a new story may be started, and try again. Once everyone has had a chance to participate, in as many rounds as you deem appropriate, you can pick up the chain and finish the sentence, and the story, bringing it to a successful completion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the story, or stories, have run their course, you can relate the process to a blockchain. Each piece (except the first) depends upon the preceding piece, and is meaningless without it. If, at any point, someone in the chain doesn't hold up their part of the &quot;contract,&quot; by completing the previous sentence, the story is ruined. Still, even without an end, everything up to the last incomplete sentence remains valid, and can be traced back to the original piece.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is totally non-technical, so it will not be of value in discussing blockchain implementations. It will, however, be memorable, and the students should be able to grasp the concepts behind a blockchain implementation when you do present it.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-21T00:59:55.283" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2814" PostTypeId="2" ParentId="2787" CreationDate="2017-07-21T02:14:51.603" Score="5" Body="&lt;p&gt;The hardest part of determining anything in computer science is the requirements first.  If you don't know what the program should do, then there is no way to do it correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, Winnie the Pooh is a wonderful book on the matter.  It clearly describes time and time again how simple misunderstandings of the base assumptions lead to absurdities of action.  From tracking a woozle of one's own making (and debugging where the error was actually being originated) to trying to define a heffalump and building something completely wrong as a result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the summary of Winnie the Pooh in &quot;In which Christoffer Robin gives a Pooh party, and we say good-bye&quot; we realize that our jobs as writers of code is to take the stuff of dreams and make it into reality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Winnie the Pooh has the advantage over many other books by being accessible by all levels of readers and can often be found in less expensive books compared to many other textbooks. &lt;/p&gt;&#xA;" OwnerUserId="2120" LastActivityDate="2017-07-21T02:14:51.603" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2816" PostTypeId="2" ParentId="2808" CreationDate="2017-07-21T02:39:58.523" Score="6" Body="&lt;p&gt;I personally teach mutation almost immediately.  However, I agree with Buffy that &lt;em&gt;more difficult&lt;/em&gt; is not really the metric people are using to decide to teach mutation later.  It is about giving certain key habits a chance to grow and develop before you get there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most people find recursion naturally more difficult than a loop.  There is no reason why this must be, and folks who learned recursion first will often find the difficult one to be the standard imperative loop.  If you begin a student in a programming world without mutability, what habits will grow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certainly recursion will come quite naturally.  So will linked lists and trees.  And certain sloppy habits will be naturally avoided, such as this balderdash:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;System.out.println(&quot;You found &quot; + hotdogs + &quot;hotdogs!&quot;);&#xA;System.out.println(&quot;How many glasses of water will you drink?&quot;);&#xA;hotdogs = myScan.nextInt();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ultimately, there is a deeper philosophical statement being made by the instructor about which habits they would like to inculcate and foster at the very root of their students' thinking.  These patterns of thought, it is presumed, will modify the initial ways that the students approach problems even later in life.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know of any research that backs this up, but, of course, much of what we try to impart to our students is not from research, but from intuition. And, who knows?  They might be right about this one.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-21T02:39:58.523" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2817" PostTypeId="2" ParentId="2808" CreationDate="2017-07-21T04:30:29.557" Score="4" Body="&lt;p&gt;The concept of a variable is not hard in and of itself, but it is the first conceptual hurdle for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that in common usage we use the same symbol for comparison and immutable facts as we use for assignment. By the time we start kids with computer programming they are steeped in algebra where &quot;=&quot; means &quot;is the same as&quot;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1 + 1 = 2&#xA;5 - 3 = 2&#xA;(x+y)² = x² + 2xy + y²&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Being steeped in algebra, when they see this construct:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = x + 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They automatically want to reduce it algebraically and solve for x&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(x-x) = 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which reduces to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0 = 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is nonsense, and they realize that, and get confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When programming most languages use &quot;=&quot; as an assignment, where it should be read as &quot;becomes equal to&quot;. Back when I started (in the 8 bit days before PC's), BASIC handled this by requiring the &quot;LET&quot; statement, so it read more like algebra, but the LET keyword was a cue that we were making an assignment.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10 LET X = 10&#xA;15 LET X = X + 23&#xA;20 IF x = 33 THEN GOTO BLABLABLA&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The LET notation was cumbersome, so most dialects of BASIC introduced the &quot;implied let&quot;. If you started the statement with a variable, it was implicitly a &quot;LET&quot; statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algol, Pascal, and some other language of the day introduced the &quot;:=&quot; operator (read as &quot;becomes equal to&quot;) to keep a distinction between assignment and comparison.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x := 10;&#xA;x := x + 23;&#xA;if x = 33 then writeln(&quot;Bla bla bla&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;C and its descendents were created for brevity rather than easy reading. They distinguish assignment from comparison by having the most common operation require the fewest keystrokes. Once you started programming in C, you were already thinking like a programmer rather than like an algebra major.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = 10;&#xA;x += 23;&#xA;if (x == 33) fprintf(stdout, &quot;Bla bla bla&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Spaghetti code is often the result of not understanding the problem, although an attempt to treat variables as immutables when it is not appropriate would certainly contribute. Even experienced programmers will create spaghetti code if they don't understand the problem, or if the problem changes sufficiently over time. If you don't believe me, walk into any enterprise shop with custom processes and start reading code.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-07-21T04:30:29.557" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2818" PostTypeId="1" CreationDate="2017-07-21T05:12:55.700" Score="5" ViewCount="683" Body="&lt;p&gt;I attended an AP workshop this week to prepare for teaching AP CS A this coming school year. It gave me my first glimpse of Swing, which has now piqued my interest about including some GUI components in my course (something I had heretofore not anticipated). There are a couple other excellent questions/comments here about frameworks for GUIs in Java: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/638/introducing-the-mvc-pattern-along-with-javafx&quot;&gt;Introducing the MVC pattern along with JavaFX&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2757/lesson-plan-for-teaching-java-graphics&quot;&gt;Lesson plan for teaching java graphics&lt;/a&gt;. All this got me thinking...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Which framework is more appropriate for students learning Java as a part of the AP CS A curriculum?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for something that allows students to get up and running relatively quickly and easily with something small yet meaningful. It won't be able to become a huge component of the class, so I'm hoping one or the other is more suited for somewhat fast learning appropriate for high school AP students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I hope I'm not unknowingly wading into a religious war akin to emacs/vim or tabs/spaces...&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-08-07T17:46:26.417" LastActivityDate="2017-08-07T17:46:26.417" Title="Framework choice for AP CS A students: Swing or JavaFX?" Tags="|java|ap-computer-science-a|resource-information|swing|javafx|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2819" PostTypeId="2" ParentId="2818" CreationDate="2017-07-21T06:37:22.220" Score="5" Body="&lt;p&gt;Disclaimer: some &lt;em&gt;do&lt;/em&gt; consider this a war like emacs/vim. I don't.&lt;/p&gt;&#xA;&lt;p&gt;I'll quote you on this: &amp;quot;I'm looking for something that allows students to get up and running relatively quickly and easily with something small yet meaningful&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;From this: JavaFX. Along with IntelliJ, and &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-info-2157684.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scene Builder&lt;/a&gt;, students can build a GUI very, very quickly. The FXML file which &amp;quot;creates&amp;quot; the GUI also gives an introduction to XML file structure.&lt;/p&gt;&#xA;&lt;p&gt;It also teaches many Java 8 things. This is vague, but here are some examples:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A lot of lambda expressions.&lt;/li&gt;&#xA;&lt;li&gt;Work with &lt;code&gt;Collection&lt;/code&gt;. The students would need to use the collections in java 8, if they learn JavaFX. This is handy, because those classes are obviously useful outside of AP CS A&lt;/li&gt;&#xA;&lt;li&gt;The Stream API (which gets buffed in Java 9, coming out soon) has a lot of usage as well in JavaFX.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I could continue this rant forever, but the main point is that JavaFX is self-dependent, which means that it only requires itself and java, unlike Swing, which requires AWT.&lt;/p&gt;&#xA;&lt;p&gt;I hope this give you some idea about putting a GUI library in your curriculum.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;As was pointed out in a comment, JavaFX has an added bonus: It's more likely to become the library your students would use, if their careers lead them to doing GUI in Java. I say this because &lt;a href=&quot;http://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html#6&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oracle said so&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h3&gt;6. Is JavaFX replacing Swing as the new client UI library for Java SE?&lt;/h3&gt;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The link contains more details, but the core of that part of the faq is that it &lt;strong&gt;is&lt;/strong&gt; a replacement. (Which is in no way saying that Swing will not be included in future Java releases, because of backwards compatibility).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-23T14:46:33.597" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2820" PostTypeId="2" ParentId="2808" CreationDate="2017-07-21T09:19:35.743" Score="2" Body="&lt;p&gt;It is not assignment that is confusing, it is mutation. I too, grew up in the 1980s programming 8bit ZX-Spectrums, and 32bit Amigas (How far we have come).&lt;/p&gt;&#xA;&lt;p&gt;But when I watched the Structure and Interpretation of Computer Programs videos. I realised that mutation was &lt;strong&gt;mostly&lt;/strong&gt; bad, and should be avoided. While mutation is a bit confusing (Usually use of &lt;code&gt;=&lt;/code&gt;, though a language could use &lt;code&gt;:=&lt;/code&gt;), it does not stop there, it then leads to all sort of bugs, and hard to read code. Even for an expert.&lt;/p&gt;&#xA;&lt;p&gt;Even though we can write programs with a lot of mutation, I know we can, I did. However, it is better, quicker, to write them with less mutation.&lt;/p&gt;&#xA;&lt;p&gt;What ever we teach first, students will subconsciously believe is the most important.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I also think that selection is overused, except we need it if we use recursion. And we need it latter to process inputs.&lt;/p&gt;&#xA;&lt;p&gt;Once I realised that any program can be written without mutation, without selection (except to get out of recursion), and with only two unbounded loops (if you have lambdas and full multiple inheritance), my programs got better. A lot better, nearly bug free.&lt;/p&gt;&#xA;&lt;p&gt;Alternatives to full-multiple-inheritance include: (I don't know all the names)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Duck-typing&lt;/li&gt;&#xA;&lt;li&gt;Prototype based OO&lt;/li&gt;&#xA;&lt;li&gt;The one in kotlin, where you define interfaces. (it is like specifying the inheritance late)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2021-09-02T05:54:36.020" LastActivityDate="2021-09-02T05:54:36.020" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="2821" PostTypeId="2" ParentId="2787" CreationDate="2017-07-21T10:00:29.980" Score="4" Body="&lt;h2&gt;The timeless way of building — Christopher Alexander (&lt;a href=&quot;https://www.patternlanguage.com/patterns/justsostory.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.patternlanguage.com/patterns/justsostory.html&lt;/a&gt;)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is a 3 volume book that includes A Pattern Language. This set of books is probably one of the most influential book from outside of computing to affect computing. It was the seed that started Patterns. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The volume A Pattern Language has about 250 pattern on architecture, ranging from world scale, through countries, regions, towns, building, shelves, to screws. (It also states that by no means is this all of them. Where as the 1st pattern book on programming had about 20 patterns and declared that to be all of them. It got better after that.)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Nature of Order — Christopher Alexander (&lt;a href=&quot;http://www.natureoforder.com/overview.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.natureoforder.com/overview.htm&lt;/a&gt;)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This explores nature and architectural styles, and demonstrates:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The beauty of a design can be fairly and with repeatability, judged: to do this ask how it makes you feel, avoid intellect. You will need to practice to be good at it, but most people (80%) agree on the simple ones (in blinded trials). The other 20% just argue that it is silly, this can not be done. After several round almost everyone is in agreement.&lt;/li&gt;&#xA;&lt;li&gt;There are about 15 properties that occur in nature and good design.&lt;/li&gt;&#xA;&lt;li&gt;By using these 15 properties you can create good designs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;He also extends on Darwin (it is not random, there is a lot of order. Therefore the probability of it happening by chance is better than you would think).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 15 properties are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;LEVELS OF SCALE is the way that a strong center is made stronger partly by smaller strong centers contained in it, and partly by its larger strong centers which contain it.&lt;/li&gt;&#xA;&lt;li&gt;STRONG CENTERS defines the way that a strong center requires a spatial field-like effect, created by other centers, as the primary source of its strength.&lt;/li&gt;&#xA;&lt;li&gt;BOUNDARIES is the way in which the field-like effect of a center is strengthened by the creation of a ring-like center, made of smaller centers which surround and intensify the first. The boundary also unites the center with the centers beyond it, thus strengthening it further.&lt;/li&gt;&#xA;&lt;li&gt;ALTERNATING REPETITION is the way in which centers are strengthened when they repeat, by the insertion of other centers between the repeating ones.&lt;/li&gt;&#xA;&lt;li&gt;POSITIVE SPACE is the way that a given center must draw its strength, in part, from the strength of other centers immediately adjacent to it in space.&lt;/li&gt;&#xA;&lt;li&gt;GOOD SHAPE is the way that the strength of a given center depends on its actual shape, and the way this effect requires that even the shape, its boundary, and the space around it are made up of strong centers.&lt;/li&gt;&#xA;&lt;li&gt;LOCAL SYMMETRIES is the way that the intensity of a given center is increased by the extent to which other smaller centers which it contains are themselves arranged in locally symmetrical groups.&lt;/li&gt;&#xA;&lt;li&gt;DEEP INTERLOCK AND AMBIGUITY is the way in which the intensity of a given center can be increased when it is attached to nearby strong centers, through a third set of strong centers that ambiguously belong to both.&lt;/li&gt;&#xA;&lt;li&gt;CONTRAST is the way that a center is strengthened by the sharpness of the distinction between its character and the character of surrounding centers.&lt;/li&gt;&#xA;&lt;li&gt;ROUGHNESS is the way that the field effect of a given center draws its strength, necessarily, from irregularities in the sizes, shapes, and arrangements of other nearby centers.&lt;/li&gt;&#xA;&lt;li&gt;GRADIENTS is the way a center is strengthened by a graded series of different-sized centers which then “point” to the new center and intensify its field effect.&lt;/li&gt;&#xA;&lt;li&gt;ECHOES is the way that the strength of a given center depends on similarities of angle and orientation and systems of centers forming characteristic angles thus forming larger centers, among the centers it contains.&lt;/li&gt;&#xA;&lt;li&gt;THE VOID is the way that the intensity of every center depends on the existence of a still place–an empty center–somewhere in its field.&lt;/li&gt;&#xA;&lt;li&gt;SIMPLICITY AND INNER CALM is the way the strength of a center depends on its simplicity–on the process of reducing the number of different centers which exist in it, while increasing the strength of these centers to make them weigh more.&lt;/li&gt;&#xA;&lt;li&gt;NON-SEPARATENESS is the way the life and strength of a center is merged smoothly-sometimes even indistinguishably–with the centers that form its surroundings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Examples in programming (not from the book)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;THE VOID: The space made my indentation and blank lines (paragraphing).&lt;/li&gt;&#xA;&lt;li&gt;BOUNDARIES: When we use contracts, each method has a strong boundary, that is of similar size to the implementation 1:1 to 1:3.&lt;/li&gt;&#xA;&lt;li&gt;DEEP INTERLOCK AND AMBIGUITY: are the contract part of the method/callee or of the caller.&lt;/li&gt;&#xA;&lt;li&gt;GRADIENTS: each layer in the design should be &lt;strong&gt;about&lt;/strong&gt; 3× more abstract than the layer below.&lt;/li&gt;&#xA;&lt;li&gt;ALTERNATING REPETITION: Test driven development, see &lt;a href=&quot;https://cseducators.stackexchange.com/a/4869/204&quot;&gt;https://cseducators.stackexchange.com/a/4869/204&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some languages, and some source code, exhibit the 15 properties more than others. I have noticed that there is a correlation — the higher it exhibits these properties, the easier it is to write powerful, bug free software.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How Building Learn — Stewart Brand&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This covers piecemeal growth: Creating a design one step at a time (like agile). Don't design it all up front; learn as you build, so that you can make a better design. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-08-05T16:56:31.760" LastActivityDate="2018-08-05T16:56:31.760" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="2822" PostTypeId="5" CreationDate="2017-07-21T15:55:37.810" Score="0" Body="&lt;p&gt;JavaFX is a new (Java 8) library for graphical applications that is more clearly based on the Model View Controller architecture than is Swing. Use this tag for questions relating to the merits and usage of &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;JavaFX&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technical questions about JavaFX are probably better directed to other StackExchange sites. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-21T16:27:01.990" LastActivityDate="2017-07-21T16:27:01.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2823" PostTypeId="4" CreationDate="2017-07-21T15:55:37.810" Score="0" Body="This tag is appropriate for all questions relating to the JavaFX graphical library. Questions on educational usage of the library are appropriate as are questions on the relative merits of JavaFX to other Java libraries, such as Swing in the teaching environment. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-21T16:26:52.947" LastActivityDate="2017-07-21T16:26:52.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2824" PostTypeId="2" ParentId="307" CreationDate="2017-07-21T17:18:52.293" Score="1" Body="&lt;p&gt;Another benefit of block-level scope is that because variables defined in a block go out of scope at the end of that block, their values are then eligible for garbage collection (assuming no other variables point to them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Expand your example to use some really big object that takes up a lot of memory:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (someBooleanCondition){&#xA;    ReallyBigObject rbo = getReallyBigObject();&#xA;    rbo.doSomeProcessing();&#xA;} else {&#xA;    ReallyBigObject rbo = getOtherReallyBigObject();&#xA;    rbo.doSomeOtherProcessing();&#xA;}&#xA;&#xA;//rbo is out of scope and can be garbage collected!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With the way Java works, the really big object goes out of scope at the end of the &lt;code&gt;if&lt;/code&gt; or &lt;code&gt;else&lt;/code&gt; block it's declared in. That means it can be garbage collected, and that's awesome because we don't have to worry about it anymore!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's possible to have function-level scope (like JavaScript), so the students' intuition isn't &lt;strong&gt;wrong&lt;/strong&gt;. It's just that Java chose a set of rules to allow garbage collection to happen sooner rather than later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as a result, this also means that you can't use a variable outside of its scope.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-07-21T20:17:23.513" LastActivityDate="2017-07-21T20:17:23.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2825" PostTypeId="2" ParentId="2777" CreationDate="2017-07-21T17:27:39.140" Score="1" Body="&lt;p&gt;I'm planning on using in a course called Mobile Application Development. I like that it is easy to use and syntax is less of an issue. As it has a focus on Android apps that attracts students. I plan on using the time I save on syntax to spend more time on design issues which I think is often under taught.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a Mobile Apps version of the AP CS Principles course as well. I hear lots of good things about it but have not looked at it too closely myself.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-07-21T17:27:39.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2826" PostTypeId="2" ParentId="2818" CreationDate="2017-07-21T17:28:59.307" Score="2" Body="&lt;p&gt;Like everything else in programming, it's a mix of tradeoffs:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Benefits of Swing:&lt;/strong&gt; There are a metric ton of tutorials and examples on the web. It still has a very active community here on Stack Overflow.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Downsides of Swing:&lt;/strong&gt; It's old, and it looks old. It's not being actively developed anymore. (But it's not deprecated either.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Benefits of JavaFX:&lt;/strong&gt; It's new(er), and it's being actively developed.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Downsides of JavaFX:&lt;/strong&gt; There are fewer tutorials and examples on the web, and many of them are outdated because JavaFX is under active development. I also find it more complicated than Swing, but maybe that's just me.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Which framework is more appropriate for students learning Java as a part of the AP CS A curriculum?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't think either one is very obviously better or worse than the other. They're very similar in a lot of ways, especially if you haven't used either one at all yet. Honestly the best thing you can do is try out a few hello world programs in both and see which one you like better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will also say that neither one of these is used extensively in the real world. Everything is either a web app or a mobile app. I can only think of a couple of Java-based desktop applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also add a shout-out to &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, which is a Java-based language (which can be used as a Java library) that makes it easy to create visual, animated programs without all of the boilerplate that Swing or JavaFX require. Might not be right for your class, but definitely worth checking out.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-21T17:28:59.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2827" PostTypeId="2" ParentId="307" CreationDate="2017-07-21T17:39:26.750" Score="3" Body="&lt;p&gt;You should be able to copy/paste block of codes that does not use other variables. But in your examples what if you want to copy/paste that to a code that already declared x? It would not work&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String x = &quot;Ben I.&quot;;&#xA;... a lot of code&#xA;...&#xA;...&#xA;if (someBooleanCondition){&#xA;    int x = 7;&#xA;} else {&#xA;    int x = 0;&#xA;}&#xA;System.out.println(x);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In that case you want to print Ben I.&#xA;In block scope very often you need to use temporary variables to help you in some calculations and if you declared them in block then you want them to be cleared from stack when you get out of the block.&lt;/p&gt;&#xA;" OwnerUserId="2054" LastEditorUserId="2054" LastEditDate="2017-08-04T12:43:27.167" LastActivityDate="2017-08-04T12:43:27.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2828" PostTypeId="1" AcceptedAnswerId="3019" CreationDate="2017-07-21T18:10:47.500" Score="10" ViewCount="1211" Body="&lt;p&gt;Database normalization is needlessly clouded by over-explanation. I reviewed a wide array of web articles and several textbooks before starting to teach it. After I became thoroughly familiar with the point of it in my own terms and then understood the rules, I reduced the rules down to this list:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;1NF eliminate repeating values and columns.  &lt;/li&gt;&#xA;&lt;li&gt;Assign a Primary Key.  &lt;/li&gt;&#xA;&lt;li&gt;2NF all attributes depend on all parts of a Composite PK.  &lt;/li&gt;&#xA;&lt;li&gt;3NF each attribute depends only on the PK.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In lecture, I literally scribble this on the whiteboard then work through examples. I assign a couple problems from a textbook and ask them to explain every step that they use, in a simple text document. Some get it fairly well, which is good enough for me. Others seem to get no traction at all and hand in a long, wandering story which repeats the statement of the rules in various ways, but not effectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides stating the rules &lt;em&gt;this tersely&lt;/em&gt;, walking through examples and pointing to the vital sentences in the textbook, are there other ways to convey this kind of material? (This could be similar to other technical topics which have a simple 'core' but are abstract and hard to learn.)&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="2395" LastEditDate="2017-08-03T20:07:42.483" LastActivityDate="2019-11-28T09:02:43.277" Title="How can I make database normalization more clear?" Tags="|lesson-ideas|teaching-analogy|databases|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2829" PostTypeId="2" ParentId="2828" CreationDate="2017-07-21T18:44:33.680" Score="7" Body="&lt;p&gt;There are some things you can only &quot;get&quot; by having repetition wear it into your brain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems to me like a clear use case for first making them do it the hard way. So, construct a non-normalized schema and make them walk, painfully, through keeping everything in synch. Done right, they will be thoroughly sick of it after just a few updates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, step by step introduce the normal forms, and look at how much easier updates are at each step.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-07-21T18:44:33.680" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2831" PostTypeId="2" ParentId="544" CreationDate="2017-07-21T20:23:22.027" Score="1" Body="&lt;p&gt;Java (and most other languages) interfaces are not contracts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The contract on Eat is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I take no data&lt;/li&gt;&#xA;&lt;li&gt;I return no data&lt;/li&gt;&#xA;&lt;li&gt;you can call me under any situation&lt;/li&gt;&#xA;&lt;li&gt;I will not crash/throw (most languages don't even have this)&lt;/li&gt;&#xA;&lt;li&gt;I will do what ever seem like a good idea to me&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I.E. there is no contract. They don't see it because it is not there. Without pre and post conditions, there are no promises, there is no contract.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example of a contract may look like this (I have to make up some syntax).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public interface Edible {&#xA;&#xA;    public boolean isEdible();&#xA;    public boolean isEaten();&#xA;    public void eat() &#xA;       precondition: isEdible();&#xA;       postcondition: isEaten();&#xA;    end&#xA;&#xA;    invariant:&#xA;       isEaten() implies isEdible();&#xA;    end&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-21T22:37:18.953" LastActivityDate="2017-07-21T22:37:18.953" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2833" PostTypeId="2" ParentId="2828" CreationDate="2017-07-21T22:42:04.993" Score="2" Body="&lt;p&gt;I think that the &quot;problem first&quot; approach applies here.  Rules like normal form weren't handed down from on high; they were &lt;em&gt;developed&lt;/em&gt; as logical solutions to actual existing problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One key principle from a &lt;a href=&quot;http://www.appliedscholastics.org/l-ron-hubbard/teaching.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;favorite article on teaching&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Coax into action the student’s mind to &lt;strong&gt;&lt;em&gt;derive&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;establish&lt;/em&gt;&lt;/strong&gt; all data which can be derived or established from the axioms or theories.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In application of this, I wouldn't even teach someone the normal forms as the first step.  I would mention that there are different ways of structuring your relations, and that there are rules to follow which lead to a logical structure, and that we would get to them shortly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;basic&lt;/em&gt; axiom I would teach is that each piece of information should be stored in only &lt;em&gt;one&lt;/em&gt; place, so that it can't go out of sync (become inconsistent).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I would get some student interaction going and get the students to give examples of pieces of information they would keep track of.  &lt;a href=&quot;https://wiki.documentfoundation.org/images/0/02/Base_tutorial.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;This PDF was my first introduction to database design.&lt;/a&gt;  Borrowing and expanding an example from that, I might ask students: what information would they would want to track for a database of books?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Title and author are obvious.  Some others will be mentioned: Page count.  Publication date.  Publication format.  Publisher.  How about &quot;language&quot;?  ISBN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Author's date of birth and date of death may be mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing these out across a chalkboard and start considering the matter further with a few examples and the huge number of problems with having a &lt;em&gt;single&lt;/em&gt; relation will all of these attributes will become apparent:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens when a book has more than one author collaborating?  What happens when multiple books were written by the same author, and then the author dies (and you have to update &quot;date of death&quot; in multiple places)?  What happens when the same book was published more than once, in different years, by different publishers, with different formats and page counts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you wouldn't throw all those problems at them at the same time.  But gradually, little by little, you could decompose that giant &quot;BOOKS&quot; relation into a database with &lt;em&gt;all&lt;/em&gt; originally mentioned attributes, but in proper normal form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you're doing it &lt;em&gt;really&lt;/em&gt; well, your students would do all the normalizing, even if they don't know the rules they're following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After any particular student suggestion (like making a separate &quot;authors&quot; relation to hold such information as dates of birth and death), I could then acknowledge it, validate it, and then present the general rule.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In short, rather than dumping data and explanations on top of them, I would get them to &lt;em&gt;look&lt;/em&gt; and derive and establish the data for themselves, so they could really use it.  Only &lt;em&gt;then&lt;/em&gt; might I add additional explanation.&lt;/p&gt;&#xA;" OwnerUserId="1103" LastActivityDate="2017-07-21T22:42:04.993" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2834" PostTypeId="2" ParentId="2828" CreationDate="2017-07-21T22:59:12.567" Score="1" Body="&lt;p&gt;It seems that the presentation of the material is done well. Given that the problems assigned from the textbook are in a sequence that increases with complexity, there isn't much you can change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A possibility is to assign one problem at a time, going over the results of it before moving to the next one. That way, maybe, you can find out where the ones without traction are skidding out of control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you have said, they intuitively know how separating things makes sense already. If not included in the lecture, you could explain the trade-offs between doing the normalization (the design work), and storage space for the extra tables vs. the potential savings in coding and possible duplication of data. To emphasize that point you might have some examples of code (or pseudo code) to handle both a normalized and non-normalized version of the same dataset and the storage requirements for a sample dataset at each level of normalization. Take what they know &quot;intuitively&quot; and make it explicit.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-21T22:59:12.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2835" PostTypeId="2" ParentId="1106" CreationDate="2017-07-22T00:35:33.253" Score="3" Body="&lt;p&gt;GitHub has &lt;code&gt;good-first-issue&lt;/code&gt; and &lt;code&gt;help-wanted&lt;/code&gt; labels that indicate issues that would be particularly good for novices. More info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/collections/choosing-projects&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to choose (and contribute to) your first open source project&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://help.github.com/articles/helping-new-contributors-find-your-project-with-labels/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Helping new contributors find your project with labels&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/showcases/great-for-new-contributors&quot; rel=&quot;nofollow noreferrer&quot;&gt;Great for new contributors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://help.github.com/articles/finding-open-source-projects-on-github/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Finding open source projects on GitHub&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/search?l=&amp;amp;q=state%3Aopen+label%3Ahelp-wanted&amp;amp;ref=advsearch&amp;amp;type=Issues&amp;amp;utf8=%E2%9C%93&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a link to a search page that lists every open issue with the &lt;code&gt;help-wanted&lt;/code&gt; label. &lt;a href=&quot;https://github.com/search?q=label%3Agood-first-issue+state%3Aopen&amp;amp;type=Issues&amp;amp;ref=advsearch&amp;amp;l=&amp;amp;l=&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is one for the &lt;code&gt;good-first-issue&lt;/code&gt; label. You can further refine these lists to focus on a specific language or look for keywords that you're interested in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way you might approach this is to find an open-source project that's maintained by something you already use. For example, did you know that &lt;a href=&quot;https://github.com/spotify&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spotify&lt;/a&gt; and &lt;a href=&quot;https://github.com/Netflix&quot; rel=&quot;nofollow noreferrer&quot;&gt;Netflix&lt;/a&gt; both have GitHub accounts with a bunch of repos?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, keep in mind that there is no such thing as too small of a contribution. Found a typo in the documentation? Cool, make a pull request that corrects it! Have a feature request or bug report? File an issue for it! Then start commenting on other people's issues. Maybe start looking into the code if you find one that sounds manageable.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-06-01T21:09:43.877" LastActivityDate="2018-06-01T21:09:43.877" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2836" PostTypeId="2" ParentId="146" CreationDate="2017-07-22T08:47:53.743" Score="2" Body="&lt;p&gt;When I saw a software engineer, I always ended up using personal pronouns, when talking about classes and objects. “He does this, and tells her, then she …”. They are like people working together. And sometime they model objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore classes are used to model subjects and objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We often, for hard problems, would get a team together and act out a scene to work out what the software should do. Some of the roles where played by the software developers, others by index cards, boxes, a calculator (to represent a math library), and various other props. We would act a scene several times, making improvements until it worked. We would then make notes, and then go away and implement the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We did not make any distinction (consciously) of subject vs object. Objects can be a bit subjecty and subjects can be a bit objecty.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-22T08:47:53.743" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2837" PostTypeId="5" CreationDate="2017-07-22T12:58:49.843" Score="0" Body="&lt;p&gt;Intellectual property (IP) takes many forms. Major aspects are copyright and licensing (including fair use), trademarks, trade secrets, and patents. Some of these aspects have implications in education, including how the IP of others should be respected and how to protect one's own creations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that questions specifically about plagiarism should be tagged &lt;a href=&quot;/questions/tagged/plagiarism&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;plagiarism&amp;#39;&quot; rel=&quot;tag&quot;&gt;plagiarism&lt;/a&gt; instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not every discussion of IP makes clear which aspect applies in a given situation and different laws apply to each of these. Posters are encouraged in their questions to be clear about which aspect of IP is being asked about. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-22T19:51:50.727" LastActivityDate="2017-07-22T19:51:50.727" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2838" PostTypeId="4" CreationDate="2017-07-22T12:58:49.843" Score="0" Body="This tag is for questions that discuss various aspects of intellectual property: copyright/licensing/fair-use, trademarks, trade secrets, and patents. Questions might concern how to protect one's creations and how to respect the creations of others. The tag is not, however, for theoretical discussions, but for questions related to the educational process. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-22T13:41:00.373" LastActivityDate="2017-07-22T13:41:00.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2842" PostTypeId="2" ParentId="1037" CreationDate="2017-07-22T17:06:26.250" Score="2" Body="&lt;p&gt;Make the theory relevant to coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, discuss the theory of sorting, and show them a proof of asymptotic optimality, to drive home the message that some problems are provably unsolvable (given certain constraints), and that recognizing such situations is essential if one does not want to waste one's time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the syllabus constrains you to teach more abstract theory, I'd cover the various models of computation only as far as necessary to discuss the interesting theorems. For instance, the halting problem can be stated and proven to be undecidable in a model of computation your students are already familiar with, rather than a model of computation that is only ever used in theory.&lt;/p&gt;&#xA;" OwnerUserId="1775" LastEditorUserId="1775" LastEditDate="2017-07-22T17:07:01.527" LastActivityDate="2017-07-22T17:07:01.527" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2844" PostTypeId="1" CreationDate="2017-07-22T19:23:09.170" Score="6" ViewCount="74" Body="&lt;p&gt;I am learning  various topics on my own, and so is another person that I know. We were planning on studying together around four days a week, a half an hour at a time (perhaps to be increased if all goes well) to help motivate each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, we're studying entirely different topics. Like, not even machine learning and complexity classes different. More like accounting and computer science different. What are some ways to motivate each other and improve each others learning even though we're not learning the same things and we don't have a ton of interest in each other's topic?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggested occasionally sharing a &quot;big idea&quot; the other learned, but I was wondering if there were some other things we could do.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-23T12:03:02.010" Title="Using another person to motivate" Tags="|self-learning|group-work|cross-discipline|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2845" PostTypeId="1" CreationDate="2017-07-22T21:17:49.530" Score="7" ViewCount="661" Body="&lt;p&gt;In creating a general introductory course on computers or computing (programming and/or CS), does one mostly present high level concepts (recursion, computational complexity, concurrency, etc.), practical concepts (write some code in language X that accomplishes Y), or low level concepts (bits and bytes, logic gates, wire and blink some LEDs)?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If more than one conceptual level (which I assume is necessary to some degree), in what mix or proportion?  And what order might be best for what purposes or goals of the course?  How does one get students started and intested?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This earlier &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class&quot;&gt;question&lt;/a&gt; is about the order of teaching, but before ordering, it helps to clarify the content of that which is to be ordered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, have instructors found benefit including any other semi-related material, such as was discussed in this &lt;a href=&quot;https://cseducators.stackexchange.com/questions/180/what-are-the-merits-of-including-the-history-of-computers-in-the-entry-level-cur&quot;&gt;previous question on the history of computing&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-07-23T03:36:23.093" LastActivityDate="2017-07-24T19:13:06.960" Title="Teaching high-level versus low-level concepts" Tags="|curriculum-design|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2846" PostTypeId="2" ParentId="2845" CreationDate="2017-07-22T22:12:18.810" Score="2" Body="&lt;p&gt;&lt;strong&gt;Context is King&lt;/strong&gt;&lt;br&gt;&#xA;Explain the problem that a technique is aiming to solve. Then show in outline how the algorithm or practice really, perfectly solves it. CS is one area where humans can, at times, actually do something perfectly. Then take them back to the imperfect world where things do not usually go so smoothly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lady Lovelace is Queen&lt;/strong&gt;&lt;br&gt;&#xA;Definitely show the history so that we can answer the question &quot;What am I here-after?&quot; Without reasons, without 'why', we don't know the point and how precious this learning is to humanity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;It is based in a world built on rules&quot;&lt;/strong&gt;&lt;br&gt;&#xA;All the rules are simple, at base, or something as dumb as a rock could not follow them. There is no mystery, no magic in the functionings of an electrical machine. It is all invented, by us, we understand it, we control it. &lt;em&gt;Show the bone-simple rules early on.&lt;/em&gt; Binary bits encode everything that can be digitized. All the computations can be achieved with NAND logic. 3 types of statements. 5 things a CPU can do. Indirect Reference...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Complexity is in Layers&lt;/strong&gt;&lt;br&gt;&#xA;&quot;A problem cannot be solved at the level it was conceived on.&quot; Even simple problems are made simpler by composing relationships of defined things. Define a layer that solves some aspect of the problem, and other layers that solve other aspects. Anything else is spaghetti. This is not magic, it is where you use your smarts to make dumb things work together to do smart things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to answer, &quot;Begin at the beginning, go on until you reach the end, then&lt;/p&gt;&#xA;&#xA;&lt;p&gt;STOP&lt;br&gt;&#xA;ENDS&lt;br&gt;&#xA;END&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-22T22:12:18.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2847" PostTypeId="2" ParentId="146" CreationDate="2017-07-22T22:30:28.293" Score="3" Body="&lt;p&gt;One classic example (not original with me, used by many of my colleagues) comes from using modeling compounds (e.g. Play-Doh), and the many tools that come with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short: you take raw memory (the Play-Doh), apply a class definition to it (one of the cutout forms), and you get an instance of an object (a Play-Doh shape).   You can make multiple instances (multiple shapes) by re-using the class definition on new memory forms.   Each instance can have different attributes (colors) but still belongs to the same class (collection of objects made from the same cutout).&lt;/p&gt;&#xA;" OwnerUserId="2134" LastActivityDate="2017-07-22T22:30:28.293" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2848" PostTypeId="2" ParentId="514" CreationDate="2017-07-22T22:42:19.927" Score="2" Body="&lt;p&gt;You can think of it from the bottom-up perspective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're making a program for a fast-food restaurant.   So you have a Hamburger class, a FrenchFry class, a Soda class, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, you realize that there are lots of similarities in all of those classes.   They all have mass, calorie counts, prices, and so on.   So it makes sense to have a parent class called Food where those common items can be defined once and inherited by all of the other classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Except, of course, one shouldn't be able to instantiate the Food class directly.   Food items should belong to an identifiable subclass like Hamburger or FrenchFry.   (Insert school cafeteria joke here.)&lt;/p&gt;&#xA;" OwnerUserId="2134" LastEditorUserId="58" LastEditDate="2017-07-22T23:02:22.437" LastActivityDate="2017-07-22T23:02:22.437" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2849" PostTypeId="2" ParentId="2845" CreationDate="2017-07-22T22:52:23.597" Score="3" Body="&lt;p&gt;In an introductory course, start with the practical stuff, and build up or down as needed. All the theory in the world will do you no good if you cannot apply it, and while bits, bytes, and logic gates are all very well and good, it is hard to see the forest for the trees that far down. History can also help provide context and motivation, so weave that in with the practical stuff ('this method was discovered/invented by so-and-so') but remember, again, the practical stuff is your meat and potatoes.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-22T22:52:23.597" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2850" PostTypeId="2" ParentId="2651" CreationDate="2017-07-23T02:24:42.500" Score="3" Body="&lt;p&gt;Addressing the subquestion regarding limitations of &lt;code&gt;foreach&lt;/code&gt;: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been a reader for the AP Computer Science A exam since 2004.  The most common mistake we see in student solutions regarding &lt;code&gt;foreach&lt;/code&gt; loops deals with two important limitations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;foreach&lt;/code&gt; loops lose any association between items in an ordered collection (e.g. array, &lt;code&gt;ArrayList&lt;/code&gt;) and their indexes.   If the core algorithm requires knowing the location of an item as well as its value (e.g. returning the index of an item in an &lt;code&gt;ArrayList&lt;/code&gt;), &lt;code&gt;foreach&lt;/code&gt; loops are usually inappropriate.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;foreach&lt;/code&gt; loops cannot modify the base collection while iterating over it.   If the core algorithm requires changing the base collection, the &lt;code&gt;foreach&lt;/code&gt; loop is inappropriate.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2134" LastActivityDate="2017-07-23T02:24:42.500" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2851" PostTypeId="5" CreationDate="2017-07-23T02:54:57.987" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-23T02:54:57.987" LastActivityDate="2017-07-23T02:54:57.987" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2852" PostTypeId="4" CreationDate="2017-07-23T02:54:57.987" Score="0" Body="Use for questions about training and education designed for job readiness that is not in the normal academic setting. Includes vocational training, vocational rehabilitation, and displaced worker retraining." OwnerUserId="104" LastEditorUserId="104" LastEditDate="2017-07-23T04:56:03.693" LastActivityDate="2017-07-23T04:56:03.693" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2853" PostTypeId="2" ParentId="2844" CreationDate="2017-07-23T03:40:41.963" Score="2" Body="&lt;p&gt;I feel that this is a good idea. It is like having a &lt;em&gt;workout buddy&lt;/em&gt;: you help each other stay committed. You can &quot;be genuinely interested in&quot; what the other person is learning, and what they find interesting about it, by listening (quote from &lt;em&gt;How to make friends and influence people&lt;/em&gt; by Dale Carnegie). Appreciate their experience. Everyone finds that supportive and motivating, and it uplifts you as well, by thinking about someone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This qualifies as &lt;em&gt;people savvy&lt;/em&gt; which is vital. I call it &quot;Hetaira Archetype traits&quot; (caring, supportive, appreciating, encouraging) after Jung's description of this aspect of personality. A friend of mine once said to me, &quot;It takes all kinds of people to make a world&quot;, which I needed reminding.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Mind is made calm by cultivating attitudes of &lt;em&gt;friendliness&lt;/em&gt; toward the&#xA;  happy, &lt;em&gt;compassion&lt;/em&gt; for the unhappy, &lt;em&gt;delight&lt;/em&gt; in the virtuous, and&#xA;  &lt;em&gt;disregard&lt;/em&gt; toward the wicked.&lt;br&gt;&#xA;  -- The Yoga Sutras of Patanjali&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-07-23T03:40:41.963" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2854" PostTypeId="2" ParentId="544" CreationDate="2017-07-23T04:11:39.293" Score="8" Body="&lt;p&gt;This answer draws on Java examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start the interface discussion with a mechanical SATA hard drive in my hand. I discuss the interface called SATA and its universality across devices. I expand this with some digital images of SATA on an optical disc drive as well as a solid state hard drive. Some discussion follows regarding the variety of brands and companies but also the assurance of SATA's common functionality that makes it possible for everyone to play nice together and make reliable components that work across so many devices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students verbally list some functions of the SATA interface. I prompt them by asking what all these devices are required to do: read data, write data. Depending how long you want to spend on this and how it matches your curriculum, you get more information from them - what parameters might those functions have etc. Talk about data storage or bits and bytes if its relevant, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the while, I've listed these functions on the board. Finally, when I think we're done brainstorming, I wrap them in curly brackets and label it an interface. Be careful not to attempt an implementation of any of the functions. That doesn't belong in an interface. (Aside, digging into some Java interface source code, I was surprised to learn of the default function introduced in Java 8 - a lot of things surprised me really when I started digging into the Java source.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is my hook for the interface lesson. Next, I jump into all the textbook examples like Edible, Animal, or whatever other abstractions you're going to see at this point in a textbook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, whether the textbook likes it or not, I slap a Comparable vs Comparator (Java) problem on all of them and make them sort some Geometric objects or something. I spend the next 30 minutes walking around helping students comprehend compiler error messages like &quot;Triangle and Rectangle don't implement the Comparable interface&quot; or &quot;Triangle must implement Comparable.compareTo&quot; or something like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inevitably, many questions about how compareTo works or should work come up. I explain -1, 0, 1 for &amp;lt;, ==, &gt; respectively but then I will show them the source code for java.lang.String or wherever that is, and discuss how Comparable strings actually use the difference between ASCII character codes to compare characters. If not GeometricObjects, ask them how they would sort themselves - height? GPA? grade level? Obviously we need a Comparator for each property if multiple different sorts are needed. It may help to demonstrate that Collections.sort(arrayList) of complex objects won't work with Comparability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When trying to nail the point, &quot;Always program to an interface,&quot; my go-to example is the List interface. I say &quot;Because it's easier to maintain later. If you change the interface, the compiler will require you fix all the implementing classes.&quot; I instantiate a few, Vector, LinkedList, ArrayList, with only the interface on the left hand side of the instantiation, List = ArrayList, for example. I show them the source code for the List interface in Java but with Oracle's comments removed so it's just a list of functions. I then show them the same set of common functionality across all implementing classes, only now it's listed in the Eclipse intellisense. This point about always program to an interface is apparently only worth mentioning because those who stay with programming will hear it again some day and you've laid almost a foundation. It's not a point I would spend too much time on with high school students. I drop the phrase and expect they'll hear it again if they carry on with software development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... and right before I think they get it, time demands that we move on to something else. Hopefully some later assignments revisit the interface.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastEditorUserId="2122" LastEditDate="2017-07-23T05:33:57.853" LastActivityDate="2017-07-23T05:33:57.853" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2855" PostTypeId="2" ParentId="514" CreationDate="2017-07-23T11:15:05.487" Score="1" Body="&lt;p&gt;I'd try something like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;As we have seen, it can be useful to move common fields or methods to a common super type, so we have to write (and debug) it only once.&lt;/p&gt;&#xA;&lt;p&gt;However, sometimes the common behavior is only a small part of an object that does not have a meaningful existence on its own. Java therefore allows us to declare abstract classes. Abstract classes are incomplete in that they do not have to implement all the methods they declare. As a consequence, they can not be instantiated on their own. However, if we implement the methods in a subclass, we can instantiate that one, and thereby use the shared code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'd gloss over people making classes abstract only to prevent their instantiation, as I consider it a questionable practice.&lt;/p&gt;&#xA;&lt;p&gt;As for interfaces, how about:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;While interfaces can be used to share a contract (public methods), classes can additionally share implementation (fields, constructors, and non-public members), but are less flexible for implementing classes (a class may implement many interfaces, but extend only a single class).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If you're feeling adventurous, you may expand on the diamond problem to explain the reason for this restriction, but that is probably too technical at this level.&lt;/p&gt;&#xA;" OwnerUserId="1775" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-23T11:15:05.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2856" PostTypeId="2" ParentId="544" CreationDate="2017-07-23T11:20:53.650" Score="3" Body="&lt;p&gt;I have a bit of a quibble here. The only thing enforced by Java when implementing an interface is the &lt;em&gt;structure&lt;/em&gt; of the class implementing it. The intent of the interface programmer isn't enforceable. Good names will help &lt;em&gt;express&lt;/em&gt; the intent, but not enforce it. Good javadoc comments will convey more of the intent, but again it isn't enforceable. Absent some compiler/runtime enforcement mechanism of pre and post-conditions and invariants it is pretty unlikely that this will change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other languages do, of course, provide such a mechanism which leads to design by contract. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, what we CAN teach our students is to program to the &lt;em&gt;intent&lt;/em&gt; of the code we are working with and not just its structure. And that is always true, not just when implementing an interface. So, In my class the interface of the original post here wouldn't be acceptable, coming without clarifying javadoc comments. It is a contract (only) if you treat it as such. But lots of human interactions are similar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;BTW, students writing subclasses (which IMO is too often done poorly) break the intent of the superclass as well as the structure. Among other things, subclassing by adding public features makes Liskov's Substitution Principle impossible to obey. If you need to &lt;em&gt;cast&lt;/em&gt;, your code is probably broken. I'll wait for a good question about subclassing in Java-like languages to talk about why that is. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-23T11:20:53.650" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2857" PostTypeId="2" ParentId="2844" CreationDate="2017-07-23T12:03:02.010" Score="3" Body="&lt;p&gt;I would suggest that you start each &quot;session&quot; with each one of you going over what was learnt in the previous session. Devote ~15 mins for it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not &lt;em&gt;in spite&lt;/em&gt; of the fact that you &lt;em&gt;&quot;don't have a ton of interest in each other's topic&quot;&lt;/em&gt;, but &lt;strong&gt;because&lt;/strong&gt; of it. This &quot;review&quot; of the last session gives, as I see it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You are exposed to some other field. Who knows? you might end up finding interest in it. Even if you don't having someone listen to one's recount of one's learning provides a platform for a &lt;em&gt;sanity check&lt;/em&gt;. The person telling their friend checks each part of what was learnt, as they talk.&lt;/li&gt;&#xA;&lt;li&gt;It makes it easy to &quot;get back in the game&quot;, and you continue learning after those 15 minutes, as though the previous session was just moments ago. This is especially useful, and is overall what makes this suggestion worthwhile. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Plus, showing interest in what your friend is learning is nice, and no one&lt;sup&gt;1&lt;/sup&gt; ever got hurt from learning something new in an unrelated field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To elaborate on what I wrote as &lt;code&gt;1.&lt;/code&gt; above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;sanity check&lt;/em&gt; and telling about what you learnt are also useful, because ideally, you'd lower the stem of details. You'd want to keep it to examples and simple explanations. This is extremely good for your own learning&lt;sup&gt;2&lt;/sup&gt; because as you explain the material, after reducing the number of details and making it simple, you &lt;strong&gt;focus on the core&lt;/strong&gt; of what you learnt. It might be difficult at first, but that's why you each have 15 minutes. Don't be afraid to extend it to 20 if need be. This is a very important part of my suggestion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over time you'll be able to extract the core of the material more quickly, and that's a useful skill, unrelated to learning in pairs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend this technique (you can modify it to your hearts content; I won't hold it against you &lt;code&gt;:P&lt;/code&gt;). I employed this method with a friend and, although we were both studying CS (but different branches; I was studying machine learning and statistic approaches and he was studying networking), it was very useful (also self-learners &lt;code&gt;;)&lt;/code&gt;) to both learning the subjects and the aforementioned skill.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;&#xA;&lt;sup&gt;1&lt;/sup&gt;That's probably incorrect, but it's highly unlikely that listening to what a friend learnt in accounting would do any damage.&lt;br&gt;&#xA;&lt;sup&gt;2&lt;/sup&gt;and for your friends, when they talk about what they learnt&#xA;&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-23T12:03:02.010" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2858" PostTypeId="5" CreationDate="2017-07-23T12:34:01.410" Score="0" Body="&lt;p&gt;Lesson reviews are a useful way to spot problems in one's lesson plan. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixing issues in a lesson plan is, on occasion, not easy. Asking for peer review on a lesson plan can give a direction for fixing said issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a review &lt;strong&gt;requires&lt;/strong&gt; an existing lesson plan. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lesson plan can be reviewed for effectiveness, efficiency, points of focus, or for other improvements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions tagged with this tag &lt;em&gt;must&lt;/em&gt; follow this format:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Sections of a question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. A &lt;em&gt;clear&lt;/em&gt; title&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title should identify the lesson plan, and the basic purpose of the review (e.g. &quot;Focus and streamline a unit about finite state machines&quot;, or &quot;Help a lesson about object design dovetail into a unit on Prolog&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. The background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where we want to know information about the class, the age of the students, their knowledge background, and where this lesson or unit fits into a broader scheme.  &lt;em&gt;Without clear information here, answers will be untargeted.&lt;/em&gt;  Give as much relevant background as you can to help answerers focus their answers on &lt;strong&gt;your direct problem.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. The lesson plan as it now stands&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Provides an outline or sketch of the current lesson or unit plan, including links to (or a description of) the curricular materials used.  This section might be on the longer side; that's okay! It's hard for answerers to comment on plans that they have no access to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. The actual question itself&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The asker must provide specific goals for the critique.  Don't worry about making things too narrow.  If answerers see other problems in the unit or lesson, they can always add that information into their answer anyway.  The question for the asker is, &lt;em&gt;at minimum, what do you really need the answerer to address in order to help you improve this lesson?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again, &lt;em&gt;we want specifics&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Good&lt;/strong&gt; (specific):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are my worksheets supporting my lab well?&lt;/li&gt;&#xA;&lt;li&gt;My students in the past have done well with ___, but I want to find a way of better supporting &lt;em&gt;(other idea that students have had trouble with)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;My next unit is on information theory. Is there some way that I can integrate the coin problem &lt;em&gt;here&lt;/em&gt; in a way that is also organic to this unit? &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bad&lt;/strong&gt; (vague):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is this lesson plan good?&lt;/li&gt;&#xA;&lt;li&gt;Can you see any ways to improve the lesson?&lt;/li&gt;&#xA;&lt;li&gt;What else should I do?&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The relevant meta post about this tag can be found &lt;a href=&quot;https://cseducators.meta.stackexchange.com/questions/187/introducing-the-new-tags-curriculum-review-lesson-review-and-materials-re&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T13:48:47.750" LastActivityDate="2017-07-23T13:48:47.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2859" PostTypeId="4" CreationDate="2017-07-23T12:34:01.410" Score="0" Body="Questions that request a review for a lesson plan. Use this tag for asking specific questions about your lesson plan. Before using this tag, please read about it in the mentioned meta post. This tag has a very definite format, outlined in the full tag wiki. If you use this tag, you should not also use the lesson ideas tag." OwnerUserId="150" LastEditorUserId="27" LastEditDate="2017-07-25T05:19:33.200" LastActivityDate="2017-07-25T05:19:33.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2860" PostTypeId="5" CreationDate="2017-07-23T12:34:20.733" Score="0" Body="&lt;p&gt;Curriculum reviews are a useful way to spot problems in one's curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixing issues in a curriculum is, on occasion, not easy. Asking for peer review on a curriculum can give a direction for fixing said issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a review &lt;strong&gt;requires&lt;/strong&gt; an existing curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A curriculum can be reviewed for effectiveness, efficiency, points of focus, or for other improvements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions tagged with this tag &lt;em&gt;must&lt;/em&gt; follow this format:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Sections of a question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. A &lt;em&gt;clear&lt;/em&gt; title&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title should identify the curriculum, and the basic purpose of the review.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. The background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where we want to know information about the class, the age of the students, their knowledge background, and where this curriculum fits into a broader scheme.  &lt;em&gt;Without clear information here, answers will be untargeted.&lt;/em&gt;  Give as much relevant background as you can to help answerers focus their answers on &lt;strong&gt;your direct problem.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. The curriculum as it now stands&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Provides an outline or sketch of the current curriculum, including links to (or a description of) the curricular materials used.  This section might be on the longer side; that's okay! It's hard for answerers to comment on plans that they have no access to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. The actual question itself&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The asker must provide specific goals for the critique.  Don't worry about making things too narrow.  If answerers see other problems in the curriculum, they can always add that information into their answer anyway.  The question for the asker is, &lt;em&gt;at minimum, what do you really need the answerer to address in order to help you improve this curriculum?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again, &lt;em&gt;we want specifics&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Good&lt;/strong&gt; (specific):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are my worksheets supporting my lab well?&lt;/li&gt;&#xA;&lt;li&gt;My students in the past have done well with ___, but I want to find a way of better supporting &lt;em&gt;(other idea that students have had trouble with)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;My next unit is on information theory. Is there some way that I can integrate the coin problem &lt;em&gt;here&lt;/em&gt; in a way that is also organic to this unit? &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bad&lt;/strong&gt; (vague):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is this curriculum good?&lt;/li&gt;&#xA;&lt;li&gt;Can you see any ways to improve the curriculum?&lt;/li&gt;&#xA;&lt;li&gt;What else should I do?&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The relevant meta post about this tag can be found &lt;a href=&quot;https://cseducators.meta.stackexchange.com/questions/187/introducing-the-new-tags-curriculum-review-lesson-review-and-materials-re&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T13:48:51.253" LastActivityDate="2017-07-23T13:48:51.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2861" PostTypeId="4" CreationDate="2017-07-23T12:34:20.733" Score="0" Body="Questions that request a review for a curriculum. Use this tag for asking specific questions about your curriculum. Before using this tag, please read about it in the mentioned meta post. This tag has a very definite format, outlined in the full tag wiki. If you use this tag, you do not need to use the curriculum design tag." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-25T05:19:47.960" LastActivityDate="2017-07-25T05:19:47.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2862" PostTypeId="5" CreationDate="2017-07-23T14:06:15.020" Score="0" Body="&lt;p&gt;Syntax is the set of rules by which a programmer must abide. Each programming language has it's own syntax, though some languages share syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code that doesn't abide by the syntax will cause errors during compile. This is known as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Syntax_error&quot; rel=&quot;nofollow noreferrer&quot;&gt;Syntax Error&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The syntax might define &lt;a href=&quot;https://en.wikipedia.org/wiki/Reserved_word&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;keywords&lt;/em&gt;&lt;/a&gt;, which have a specific meaning and usage. Most programming languages treat the word &lt;code&gt;for&lt;/code&gt; as a keyword which identifies a &lt;a href=&quot;https://en.wikipedia.org/wiki/For_loop&quot; rel=&quot;nofollow noreferrer&quot;&gt;for loop&lt;/a&gt;. Using a keyword as a name for variables is a syntax error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching the use of correct syntax as early as possible is very important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information on Syntax can be found in the &lt;a href=&quot;https://en.wikipedia.org/wiki/Syntax_(programming_languages)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia article for Syntax&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T14:20:08.863" LastActivityDate="2017-07-23T14:20:08.863" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2863" PostTypeId="4" CreationDate="2017-07-23T14:06:15.020" Score="0" Body="Questions related to teaching about programming language syntax. Use this tag to ask about teaching the usage of correct syntax or to ask questions involving it." OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-09-06T17:47:49.883" LastActivityDate="2017-09-06T17:47:49.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2864" PostTypeId="2" ParentId="2818" CreationDate="2017-07-23T14:17:27.277" Score="2" Body="&lt;p&gt;I'm going to suggest that you don't use either Swing or JavaFX for an AP CS course. Instead, I'm going to suggest that you use &lt;a href=&quot;http://introcs.cs.princeton.edu/java/stdlib/javadoc/StdDraw.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Princeton's Standard Draw library&lt;/a&gt;. It does a great job of abstracting all of the ugly canvas and window setup that traditionally comes along with Swing or JavaFX. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have leveraged their library for multiple projects throughout the year and my students never complained about not understanding the graphics side of the projects. Full disclosure: StdDraw isn't as powerful as Swing of JavaFX, but why bring a nail gun to a job when a simple little hammer will do the trick? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use StdDraw within the first couple of weeks in the course and it simplifies the process for both teacher and student, while still allowing you to focus on the important learning outcomes. Plus their API is easy to read and serves as a great introduction to students about how to read documentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; The easiest library to add graphics to your project and for your students' use is &lt;a href=&quot;http://introcs.cs.princeton.edu/java/stdlib/javadoc/StdDraw.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Princeton's Standard Draw library&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1743" LastEditorUserId="1743" LastEditDate="2017-07-23T14:23:17.443" LastActivityDate="2017-07-23T14:23:17.443" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2865" PostTypeId="5" CreationDate="2017-07-23T14:30:13.097" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-23T14:30:13.097" LastActivityDate="2017-07-23T14:30:13.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2866" PostTypeId="4" CreationDate="2017-07-23T14:30:13.097" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-23T14:30:13.097" LastActivityDate="2017-07-23T14:30:13.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2867" PostTypeId="2" ParentId="599" CreationDate="2017-07-23T15:02:07.070" Score="0" Body="&lt;p&gt;After 2D arrays is a good place.  We have them represent the adjacency matrix of a graph and create an adjacency list.  The students work through Warshall's, Floyd's, and Dijkstra's algorithms.  Then we wrap up with implementing DFS and BFS.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-23T15:02:07.070" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2868" PostTypeId="2" ParentId="392" CreationDate="2017-07-23T15:08:05.147" Score="2" Body="&lt;p&gt;CodingBat helps students make the connection between method calls and method headers.  The first time I put a student (either a teenager or a brand new-to-programming teacher in one of my workshops) in front of CodingBat, they try to use the parameter value in their solution instead of using the argument in the method header.  I also value the site for encouraging students to go through the tests in order to find their bugs.  I want that experience to translate into them making up test cases to check their work for when they are writing their own methods on paper.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-23T15:08:05.147" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2869" PostTypeId="2" ParentId="1394" CreationDate="2017-07-23T15:28:38.453" Score="4" Body="&lt;p&gt;The National Oceanic and Atmospheric Administration (NOAA) has plenty of climate data sets (&lt;a href=&quot;https://www.ncdc.noaa.gov/cdo-web/datasets&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ncdc.noaa.gov/cdo-web/datasets&lt;/a&gt;).  I've used them with students to predict how many school days we may miss in February based on historical data.  Recently, I heard that the latest named tropical storm in the Atlantic is a three-letter name so I started wondering about hurricane names.  I might use a hurricane name data set for an assignment this coming school year.  Weather seems to hold my students interest.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditDate="2017-07-23T15:41:53.040" LastActivityDate="2017-07-23T15:41:53.040" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2870" PostTypeId="2" ParentId="1394" CreationDate="2017-07-23T15:42:35.907" Score="5" Body="&lt;p&gt;I've been a big fan of Twitter for this type of project since 2014.  You could use an API to pull some news feeds and turn them into a flat file for use with students.  My students have found researching politicians interesting - especially to see if the subjects of their tweets match the issues they claim to care most about.  I use the Twitter 4J API for this.  &lt;a href=&quot;http://twitter4j.org/en/&quot; rel=&quot;noreferrer&quot;&gt;http://twitter4j.org/en/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditDate="2017-07-23T17:37:22.770" LastActivityDate="2017-07-23T17:37:22.770" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2871" PostTypeId="1" AcceptedAnswerId="2963" CreationDate="2017-07-23T16:00:01.133" Score="3" ViewCount="109" Body="&lt;p&gt;I teach an Android development course to students who have had two full years of Java experience - including a year of data structures.  In the past, my students have used services such as Firebase, Parse, and Couchbase to store their data.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently, I've had some experience with Cupboard for Android (&lt;a href=&quot;https://bitbucket.org/littlerobots/cupboard&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bitbucket.org/littlerobots/cupboard&lt;/a&gt;) which maps Java classes to database tables and maps Java class member variables to the table columns.  Cupboard allowed me to create, modify, delete, and query my SQLite database using instantiated objects instead of writing SQL every time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I have a new interest in learning SQLite and in turn teaching it to my students.  I am looking for recommendations of resources for an intro unit on SQLite. &lt;/p&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditDate="2017-07-23T20:07:29.487" LastActivityDate="2017-07-27T12:52:52.230" Title="Ideas for introducing databases to Android development students" Tags="|java|self-learning|resource-request|databases|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2873" PostTypeId="2" ParentId="206" CreationDate="2017-07-23T17:33:55.850" Score="4" Body="&lt;p&gt;I'm a big fan of giving fast-finishers choice.  I make one thing abundantly clear to the students from the beginning: if class is 90 minutes long, everyone works on the topics of our course for that amount of time and credit is only given for the class assignments.  No extra credit for extra learning.  When the students complain that they are doing more work than others, I remind them that they are all working for 90 minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The options I provide are as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Help others &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I make this a choice, because as a fast-finisher myself in grade school, I was always told to do this when I was done with my work.  While I enjoyed it very much, I wish I had been encouraged to dive deeper into the topic at hand.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Think about ways to change the assignment or its requirements and then tweak the code to satisfy the requirements.&lt;/li&gt;&#xA;&lt;li&gt;Create a suite of test cases to try and break your classmates' code.&lt;/li&gt;&#xA;&lt;li&gt;Enrich yourself by reading up more on the topic at hand.  (For instance, if we are covering loops, perhaps read about all the different types of loops, especially the ones we don't cover in our curriculum and implement them.&lt;/li&gt;&#xA;&lt;li&gt;Visit a website like others have mentioned and work some problems. (ProjectEuler, Advent of Code, and Code Forces are popular with my students)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-23T17:33:55.850" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2874" PostTypeId="1" CreationDate="2017-07-23T17:46:19.690" Score="7" ViewCount="214" Body="&lt;p&gt;When I show my code to students I tutor, they ask about &lt;em&gt;&quot;all those things in my code&quot;&lt;/em&gt;, which refers (quite vaguely) to things such as shortened &lt;code&gt;if&lt;/code&gt;s, post\preincrement etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are confused by these things, but once I explain those things, I see that the students constantly use them (not in excess).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This got me wondering what are some of the benefits of teaching syntactic sugar &lt;strong&gt;during&lt;/strong&gt; regular teaching (as part of the lesson plans in the curriculum). What might the students gain from learning syntactic sugar during lessons?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples of things I had in mind:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int x;&#xA;if(condition){&#xA;    x=5;&#xA;} else{&#xA;    x=2;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is identical to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int x = condition ? 5 : 2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Also:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int epoch = 0;&#xA;&#xA;do{&#xA;    someEpochDepenentOperation(epoch,x);&#xA;} while(++epoch &amp;lt; 100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int epoch = 0;&#xA;&#xA;do{&#xA;    someEpochDepenentOperation(epoch,x);&#xA;    epoch++;&#xA;} while(epoch &amp;lt; 100);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-31T14:42:58.077" Title="Teaching syntactic sugar" Tags="|curriculum-design|secondary-education|syntax|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2875" PostTypeId="1" CreationDate="2017-07-23T17:54:01.313" Score="55" ViewCount="16193" Body="&lt;p&gt;As shown by &lt;a href=&quot;http://www.randalolson.com/2014/06/14/percentage-of-bachelors-degrees-conferred-to-women-by-major-1970-2012/&quot; rel=&quot;noreferrer&quot;&gt;the following graph&lt;/a&gt;, the percentage of bachelor's degrees going to women in the US has increased over time in almost every major, with the dramatic exception of CS, which &lt;a href=&quot;http://www.computerworld.com/article/2474991/it-careers/women-computer-science-grads--the-bump-before-the-decline.html&quot; rel=&quot;noreferrer&quot;&gt;peaked in 1984 at 37%&lt;/a&gt;, then fell drastically, never to rise again above 20%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/BfAWh.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/BfAWh.png&quot; alt=&quot;Graph showing percentage of bachelor&amp;#39;s degrees conferred to women in the US by major (1970-2012)&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why are the numbers for CS so different from every other field?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is relevant to CS education for those who want to make sure that students have equal opportunity regardless of gender.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Clarification&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since some readers seem to have misunderstood my question, let me be explicit that I am not asking why fewer women than men study CS, nor do I mean to imply that people should not be free to change their own majors. I am asking why the proportion of CS bachelor's degrees in the United States going to women fell dramatically after 1984. &lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-25T22:27:21.283" LastActivityDate="2017-08-10T19:47:16.553" Title="Why did the percentage of CS bachelor's degrees going to women peak in 1984?" Tags="|social-context|equity|" AnswerCount="15" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2876" PostTypeId="2" ParentId="2875" CreationDate="2017-07-23T18:11:21.143" Score="46" Body="&lt;p&gt;Obviously, there is no way to definitively know the answer to this question.  But my &lt;a href=&quot;http://www.npr.org/sections/money/2014/10/21/357629765/when-women-stopped-coding&quot; rel=&quot;noreferrer&quot;&gt;favorite theory&lt;/a&gt; has to do with the advent of the home PC, and the original marketing of computer games to boys.  The strongest support for this theory is the timing, which means that I must now give the obligatory caveat that &lt;a href=&quot;http://www.tylervigen.com/spurious-correlations&quot; rel=&quot;noreferrer&quot;&gt;correlation is not causation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the theory goes like this: as the home PC started to sell, the good folks in marketing had to choose which groups they would target with their limited ad dollars.  The earliest games that came out involved balls and shooting anyway, so young boys were chosen as the target market.  And thus began a generation of young boys who logged hundreds or thousands of hours with computers, with no corresponding boost for the girls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As this generation of children reached university age, more boys signed up for computing majors, and professors began to tailor their classes towards this majority of people who already had some background.  Girls who did come in often felt like fish out of water (and abandoned the major), leaving us where we are today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It &lt;a href=&quot;http://www.latimes.com/local/lanow/la-me-ln-harvey-mudd-tech-women-adv-snap-story.html&quot; rel=&quot;noreferrer&quot;&gt;does not have to be so&lt;/a&gt;.  There are inroads being made into this problem, and I am hopeful that with the total infusion of computers into all of our lives that is going on now, the timing is right for this problem to begin to fix itself, as the experience differential has begun to level out.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-23T22:32:33.773" LastActivityDate="2017-07-23T22:32:33.773" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2877" PostTypeId="2" ParentId="2779" CreationDate="2017-07-23T18:12:57.363" Score="2" Body="&lt;p&gt;One suggestion would be to find a job at a private school where it is more likely that they will not have to have a teaching certification.  If they enjoy their time there, then I would suggest becoming certified, if only to make themselves more easily employed by public schools in the future.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are public schools that will hire a teacher with the sufficient background knowledge and no certification under a provisional certification, often giving them 3 years to complete their certification.  This is another viable option, but one will never know if this is possible for a particular school unless they talk with the hiring personnel at each potential school.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-23T18:12:57.363" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2878" PostTypeId="2" ParentId="2845" CreationDate="2017-07-23T18:26:35.867" Score="4" Body="&lt;p&gt;There is no single answer to this question, as the best approach will depends &lt;em&gt;very much&lt;/em&gt; on the goals of the instruction.  If you have adults who have entered into a 4-week intensive in order to change careers, then it may be natural to focus almost entirely on the concrete (by this I mean to stick almost exclusively to the level of abstraction engendered by the language you are teaching in.)  By contrast, if your goal is to teach about how computational thinking impacts many fields, then you will have a natural lead-in to far more abstract thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal, where I teach, starts with the premise that I am training my students for &lt;strong&gt;&lt;em&gt;the future&lt;/em&gt;&lt;/strong&gt;.  My kids have all been labelled as &lt;em&gt;gifted&lt;/em&gt; (whatever that means, exactly), and many of them really will be the leaders of tomorrow.  Not all of them will go into software development. Therefore, my fundamental need is to create flexible, powerful thinkers and leaders of tomorrow.  To paraphrase a video I once saw: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;We are preparing our students to solve problems that aren't yet problems using technologies that don't yet exist.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, what can give students the tools for this kind of flexible thinking?  Do we then want to focus on the abstract or the concrete?  I would suggest that, if the goal is to create deeper expertise, the initial approach &lt;em&gt;is almost entirely irrelevant.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that &lt;a href=&quot;https://www.nap.edu/read/9853/chapter/5&quot; rel=&quot;nofollow noreferrer&quot;&gt;expert thinkers work differently than novices&lt;/a&gt;.  What it takes to become an expert is to revisit many different levels of thought repeatedly.  As Buffy says in &lt;a href=&quot;https://cseducators.stackexchange.com/a/2883/27&quot;&gt;his answer&lt;/a&gt;, &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;...the student's education should not be linear, with each thing taught completely only once. Things should be reinforced repeatedly, with each turn of the spiral adding new concepts to old, but those new concepts themselves returned to later, each spiral reinforcing older lessons as well.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Over the course of these visitations and re-visitations to the various layers of abstraction, the ideas between the layers become &lt;em&gt;highly interconnected&lt;/em&gt;.  These interconnections are what ultimately allow for fast, flexible thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, where you start can be dictated by secondary goals. Whichever layer you ultimately choose to begin with, the most important principle would be to ensure that you are creating a rich, foundational set of &lt;em&gt;intellectual hooks&lt;/em&gt; that later layers can connect into.  That is what will serve your students best in the long run.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-23T21:30:31.220" LastActivityDate="2017-07-23T21:30:31.220" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2879" PostTypeId="2" ParentId="2875" CreationDate="2017-07-23T18:59:03.627" Score="22" Body="&lt;p&gt;Not having been around at the time, I searched timelines and came up with some interesting data:&lt;/p&gt;&#xA;&lt;p&gt;As Ben said, marketing targeted men. Advertisements featured boys on personal computers. That was how it started.&lt;/p&gt;&#xA;&lt;p&gt;IBM and Apple marketed the first personal computers in 1977. Apple launched the Apple II and advertised their new product. Their ads, as stated, featured men using the brand new computer&lt;sup&gt;&lt;a href=&quot;https://www.theatlantic.com/entertainment/archive/2015/06/clear-the-kitchen-table-how-apple-and-ibm-marketed-the-first-personal-computers/396047/&quot; rel=&quot;noreferrer&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;. IBM soon followed suite. Apple's product might well have contributed to the effect displayed by the graph in the question.&lt;/p&gt;&#xA;&lt;p&gt;To quote reference &lt;a href=&quot;https://www.engadget.com/2014/10/20/what-happened-to-all-of-the-women-coders-in-1984/&quot; rel=&quot;noreferrer&quot;&gt;#1&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Kenney continued, &amp;quot;What's so striking about them, besides the super-cheesy 80s music, is men and boys. In this Commodore 64 ad, there's sort of this dorky 12-year-old, sitting at this computer, and he gives this finger salute to the camera. In fact, in most of these ads, it's just men, all men.&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This shows us how things started.&lt;br /&gt;&#xA;From there, social media, and social trends took it to worse levels. Movies, books and other media showed men as computer geeks.&lt;/p&gt;&#xA;&lt;p&gt;A study of Carnegie Mellon's Computer Science degree path shows that half of the women in the program ended up quitting, and more than half of them were on the Dean's List.&lt;/p&gt;&#xA;&lt;p&gt;So, effectively, it was marketing which piled things up with advertisements featuring men exclusively. &amp;quot;Cultural&amp;quot; changes lit the pile up and it's been burning since.&lt;/p&gt;&#xA;&lt;p&gt;Later on, towards the 2000s, this trend continued (but the &amp;quot;fire&amp;quot; was burning lower than in 1985).&lt;/p&gt;&#xA;&lt;p&gt;Recent efforts have been &lt;a href=&quot;https://www.codefellows.org/blog/1984-year-women-left-coding/&quot; rel=&quot;noreferrer&quot;&gt;successful&lt;/a&gt;, and with the rising awareness to the issue, it looks like a solvable one.&lt;/p&gt;&#xA;&lt;p&gt;So effectively, the reason for the difference is a process. One that marketing started, and the social narrative took to a higher level. But that can be changed, and a part of education is teaching students to help change this narrative.&lt;/p&gt;&#xA;&lt;h3&gt;References:&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;J. Conditt, &amp;quot;What happened to all of the women coders in 1984&amp;quot;, &lt;a href=&quot;https://www.engadget.com/2014/10/20/what-happened-to-all-of-the-women-coders-in-1984/&quot; rel=&quot;noreferrer&quot;&gt;link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;D. Sims, &amp;quot;How Apple and IBM Marketed the First Personal Computers&amp;quot;, &lt;a href=&quot;https://www.theatlantic.com/entertainment/archive/2015/06/clear-the-kitchen-table-how-apple-and-ibm-marketed-the-first-personal-computers/396047/&quot; rel=&quot;noreferrer&quot;&gt;link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;D. F., Smith, &amp;quot;Did the Computer Science Gender Gap Begin in 1984?&amp;quot;, &lt;a href=&quot;https://edtechmagazine.com/higher/article/2014/11/did-computer-science-gender-gap-begin-1984&quot; rel=&quot;noreferrer&quot;&gt;link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-24T15:35:01.547" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="2880" PostTypeId="2" ParentId="2874" CreationDate="2017-07-23T19:06:49.703" Score="3" Body="&lt;p&gt;The ?: operator is not syntactic sugar (OK in most languages it is, and no guarantees/checks are made). It is a different construct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if predicate then action1 else action2&lt;/code&gt; is procedural&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;predicate ? value1 : value1&lt;/code&gt; or &lt;code&gt;value1 if predicate else value2&lt;/code&gt; is functional&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first does something, the second evaluates to something. The value is that the functional form tells you that you are doing something functional, that there are no side effects. Thus making the code easier to read (once you have the vocabulary).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int x;&#xA;if(condition){&#xA;    x=5;&#xA;} else{&#xA;    x=2;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;the reader must ask, can x remain uninitialized? What are all the values that x can take? Does anything else change or happen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where as for this example&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int x = condition ? 5 : 2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We see that we initialize x, to 5 or 2. That is it. We could also write&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;const int x = condition ? 5 : 2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This tells us that x is x: it never changes.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-23T19:16:03.863" LastActivityDate="2017-07-23T19:16:03.863" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2881" PostTypeId="5" CreationDate="2017-07-23T20:15:56.393" Score="0" Body="&lt;p&gt;Teaching material reviews are a useful way to spot problems in one's materials. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Materials are the presentation, instruction notes and other teaching aids which are used when teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the right teaching material is, on occasion, not easy. Asking for peer review on a the materials used can give a direction for fixing said issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a review &lt;strong&gt;requires&lt;/strong&gt; an existing materials. This is a review, not a request to create materials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Materials can be reviewed for impact on instruction, efficiency, usefulness, or for other improvements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions tagged with this tag &lt;em&gt;must&lt;/em&gt; follow this format:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Sections of a question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. A &lt;em&gt;clear&lt;/em&gt; title&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The title should identify the materials, and the basic purpose of the review.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. The background&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where we want to know information about the class, the age of the students, their knowledge background, and where these materials are used.  &lt;em&gt;Without clear information here, answers will be untargeted.&lt;/em&gt;  Give as much relevant background as you can to help answerers focus their answers on &lt;strong&gt;your direct problem.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. The materials as they now stands&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Provides an outline or sketch of the currently used materials.  This section might be on the longer side; that's okay! It's hard for answerers to comment on plans that they have no access to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. The actual question itself&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The asker must provide specific goals for the critique.  Don't worry about making things too narrow.  If answerers see other problems in the curriculum, they can always add that information into their answer anyway.  The question for the asker is, &lt;em&gt;at minimum, what do you really need the answerer to address in order to help you improve these materials?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once again, &lt;em&gt;we want specifics&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Good&lt;/strong&gt; (specific):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are my worksheets supporting my lab well?&lt;/li&gt;&#xA;&lt;li&gt;My students in the past have done well with ___, but I want to find a way of better supporting &lt;em&gt;(other idea that students have had trouble with)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;My next unit is on information theory. Is there some way that I can integrate the coin problem &lt;em&gt;here&lt;/em&gt; in a way that is also organic to this unit? &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bad&lt;/strong&gt; (vague):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are these materials good?&lt;/li&gt;&#xA;&lt;li&gt;Can you see any ways to improve the materials?&lt;/li&gt;&#xA;&lt;li&gt;What else should I do?&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The relevant meta post about this tag can be found &lt;a href=&quot;https://cseducators.meta.stackexchange.com/questions/187/introducing-the-new-tags-curriculum-review-lesson-review-and-materials-re&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T20:28:23.907" LastActivityDate="2017-07-23T20:28:23.907" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2882" PostTypeId="4" CreationDate="2017-07-23T20:15:56.393" Score="0" Body="Questions that request a review for teaching materials. Use this tag for asking specific questions about your teaching materials. Before using this tag, please read about it in the mentioned meta post. This tag has a very definite format, outlined in the full tag wiki." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T20:28:20.900" LastActivityDate="2017-07-23T20:28:20.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2883" PostTypeId="2" ParentId="2845" CreationDate="2017-07-23T20:18:23.797" Score="10" Body="&lt;p&gt;TL;DR Build a world, let the students program in that world.&lt;/p&gt;&#xA;&lt;p&gt;This is largely a history lesson which, at the end, will give hints about how to teach students to become effective in a modern OOP language quickly.&lt;/p&gt;&#xA;&lt;p&gt;A deeper principle than &lt;em&gt;Higher to Lower abstraction&lt;/em&gt;, however, is the principle of teaching in a Spiral manner. This principle says that the student's education should not be linear, with each thing taught completely only once. Things should be reinforced repeatedly, with each turn of the spiral adding new concepts to old, but those new concepts themselves returned to later, each spiral reinforcing older lessons as well.&lt;/p&gt;&#xA;&lt;p&gt;Another principle here is that students learn by doing, not by listening or reading. There are a few exceptions, of course, and teachers often fall into the exceptional class, but it is rare. I've written in answer to other questions here that learning involves physical, biological changes in the brain, requiring reinforcement. There is supporting research of course.&lt;/p&gt;&#xA;&lt;h2&gt;History&lt;/h2&gt;&#xA;&lt;p&gt;With that, let me take you back to about 1975 or so. The language Pascal existed then, but C did not. Pascal was not, at that time widely used in education. FORTRAN was. Early attempts to teach using Pascal resulted in &amp;quot;poorly spelled FORTRAN&amp;quot; programs, since that matched the thought processes of programmers and teachers well versed in FORTRAN. It is said that a new paradigm only takes hold after the people holding to the old one die out. This was actually the case with the Theory of Relativity in Physics. Einstein was dismissed (that &amp;quot;clerk&amp;quot;) by the superstars of the physics establishment until Poincaré's influence waned (and he died).&lt;/p&gt;&#xA;&lt;p&gt;Pascal was created with the purpose of having a tool to directly implement Procedural Programming (PP). The essence of PP is this. Envision a Problem, P, as decomposed into a set of sub-problems, P1, P2, .... The sub problems have one of two characteristics. Either they can be immediately solved, Sk = solutionOf(Pk), or they can be, recursively, decomposed into yet smaller problems. Additionally it is assumed in PP, that there is a Known Composition method for putting the solutions to the smallest, undecomposed, problems together into a solution of the larger problem of which they are a part. In other words, decompose into sub problems going down and then recompose solutions going up.&lt;/p&gt;&#xA;&lt;p&gt;Thus, a Pascal program was intended to look like a collection of simple procedures that invoked other simple procedures until you reach a state in which the lowest level procedures can be written in the primitives of the language. This was also called Top Down analysis and programming.&lt;/p&gt;&#xA;&lt;p&gt;HOWEVER, early Pascal programs didn't look like that. There was a single massive procedure, or even just a BEGIN ... END. block that did everything, with only trivial parts factored out, usually those things that needed to be executed more than once. Hence, misspelled FORTRAN. Advice in early teaching materials was to factor out a procedure when it could be used several times, otherwise just inline the logic.&lt;/p&gt;&#xA;&lt;p&gt;That was the state of affairs in about 1980. Then something magic happened. Richard (Rich) Pattis wrote a book called &lt;em&gt;Karel the Robot&lt;/em&gt; (1981) that showed how it could be done. The book came with a simulation program in which students could write &amp;quot;Karel Programs&amp;quot;. The Robot Programming Language defined in the book and accepted by the simulator did not reveal primitive, machine level, constructs such as integer and real. There was a single robot that moved in a virtual grid-like world. There were five primitive actions: move (one block), turnleft (90 degrees), pickbeeper, putbeeper, and turnoff. Nothing else. beepers (a primitive kind of thing with no behavior) could be carried but there was no protocol for asking how many the robot carried. That was implicit in the program state, not something that could be queried. Beepers could also be found on the corners of the world. It was an error to try to pickbeeper with no beepers present.&lt;/p&gt;&#xA;&lt;p&gt;In addition to the five primitives, the robot had a rudimentary sensing capability. It could sense a beeper on the same corner and it could sense a wall directly in front. Trying to move through a wall is a program error.&lt;/p&gt;&#xA;&lt;p&gt;Notably, the robot programming language has no variables. Repeat: no variables. You can treat a corner, conceptually, as something like a variable since it can have several beepers and that can be treated something like an integer, but there is no protocol for converting it to an actual integer, and no way to build it.&lt;/p&gt;&#xA;&lt;p&gt;With these tools, the programmer is able to write procedures (returning nothing) and predicates (returning booleans). There were no parameters of the procedures. Using the sensing capabilities, the student can utilize selection and looping to build sophisticated programs. Karel the Robot defined a Turing Complete language. More important, the book had a wonderful set of exercises. My contention is that if a student could solve every problem in the book they could, with their learned creativity, write any computer program (Turing Complete, remember). The book built programming skill, not just familiarity with machine concepts and language features.&lt;/p&gt;&#xA;&lt;p&gt;The book has five chapters and in the original it was possible to cover it all in a bit over two weeks, at which point the path to Pascal was trivial. But at that point students could already produce a correctly structured PP program. No more misspelled FORTRAN.&lt;/p&gt;&#xA;&lt;p&gt;The result is that students, in their first turn around the spiral, learn program structure with few low level details (five primitives, procedures, predicates, if, and while). The second edition of KtR by Pattis, Stehlik, and Roberts (1995) contains the first edition and adds specific hints on PP such as how to go about the problem decomposition and how to build IF and WHILE structures. But you can do anything. Sorting is fun, with beepers standing in as a kind of surrogate for integers, though you can't really count. Recursion is supported, though not discussed in the original. An interesting problem is to search an infinite space for a beeper.&lt;/p&gt;&#xA;&lt;h2&gt;Creativity Under Constraint&lt;/h2&gt;&#xA;&lt;p&gt;Another aspect of the teaching philosophy underlying this principle of &lt;em&gt;Creativity Under Constraint&lt;/em&gt;. A naive view is that you can do more with more tools. However, learning to use a few tools to a very high level of skill builds mental structure that a fuller tool set will not. If a student depends on solving the next problem with the next tool, they will be a bit lost when there are no more tools available and you have to really &lt;em&gt;think&lt;/em&gt;.  Creativity Under Constraint tries to avoid this.&lt;/p&gt;&#xA;&lt;p&gt;As a simple example, consider poetry. If I ask you to write a &lt;em&gt;poem&lt;/em&gt; you have few constraints. But that problem is hard hard. But if I ask you to write a Haiku, I give you constraints, but I also give you guidance and structure. The problem, though constrained, is actually easier (but not trivial, of course). This is a &lt;strong&gt;Big Idea&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It was vital that KtR provided this rigidly constrained world in which programming occurred, but not so rigidly constrained that &lt;em&gt;any&lt;/em&gt; programming idea could not be expressed.&lt;/p&gt;&#xA;&lt;p&gt;And of course, no one suggest you should only and always write Haiku.&lt;/p&gt;&#xA;&lt;h2&gt;Paradigm Shift&lt;/h2&gt;&#xA;&lt;p&gt;It is natural when a new paradigm arises (Relativity, Procedural Programming, OOP, Functional) for the practice to be thrown into a state of flux for a while, but hopefully not forever. The paradigm shift from a simpler form of imperative programming (FORTRAN) to PP was long and hard. Rich provided a tool that showed the way. It was widely adopted and helped teachers over the hump.&lt;/p&gt;&#xA;&lt;p&gt;The interesting thing about a true paradigm shift is that it renders the earlier paradigm obsolete. A mounted knight in shining armor stood no chance of success against Henry V and his army of peasant longbowmen. And in turn &lt;em&gt;they&lt;/em&gt; stood no chance against properly deployed musketeers. But deploying longbowmen the same way you deploy knights is just dumb.&lt;/p&gt;&#xA;&lt;p&gt;In CS, however, a paradigm shift may not have such a profound effect, but over time, it will. Actually the last English king who was fully trained as a knight was Henry VIII and that was about 100 years after Henry V and the battle of Agincourt.&lt;/p&gt;&#xA;&lt;p&gt;But, my way of thinking and teaching is to treat a (lesser) paradigm shift as if it were truly profound. Learn it. Adopt it. Teach it. Your students will be looking forward, of course, not back. And as I've said here before, my job isn't to teach them what I know, but what they need to know. Today that is a good solid view of OOP, for the most part.&lt;/p&gt;&#xA;&lt;p&gt;And, programs no longer look like FORTRAN, but they, sadly, too often look like Pascal.&lt;/p&gt;&#xA;&lt;h2&gt;The Present State&lt;/h2&gt;&#xA;&lt;p&gt;We have gone through another Paradigm Shift, though it is now quite old, but too many people have not made the jump to OOP from PP. Too many programs are just PP programs with a few classes. Moreover, I see methods that are too long and too complex, putting the complexity into the methods themselves, rather than into interactions between objects viewed as bundles of behavior. Java, and later languages enable this, but using it effectively is an acquired habit (and taste).&lt;/p&gt;&#xA;&lt;p&gt;The successors to KtR are Object Oriented. Karel J Robot (java), Karel R Tuesday (ruby), and Monty Karel (python), by Bergin, Stehlik, Roberts, and Pattis, all provide a structure, along with a simulation, in which good OO programs can be written using inheritance and composition, but with only a few ideas other than the essential ones. None of the books use integer primitives in any way. Variables are references to objects. These books are more complex than the original and require about half of a first course to cover. But at the end, the student has a clear grasp of the &lt;em&gt;structure&lt;/em&gt; of an OOP program and can think about problem decomposition into a set of interacting objects. (These books permit the creation of several robots, not just one.) Once they deeply learn what is presented in the books it is a relatively easy task to introduce lower level concepts (int, array, ...) but also things like Collections and within reach. One drawback of the OOP Karel books is that inheritance is, perhaps, overemphasized, at the expense of composition of objects to build other objects. My personal view is that OOP enables composition primarily and inheritance secondarily, though the latter is more obvious in the syntax provided. Early on, however, Polymorphism is discussed deeply and implemented via composition using primarily the Strategy design pattern. Concurrency is also discussed briefly, since there are multiple robots.&lt;/p&gt;&#xA;&lt;p&gt;Another feature/bug of the current books is that they use the actual languages (Java, Ruby, Python), rather than a constrained subset. While only a subset is taught, instructors are free to add things not in the books, such as integer valued variables and counting. This is a mistake, as the example below will demonstrate. One of the important (vital) choices of the designers what what NOT to teach or even include in the book. The Java book has a follow up, however, which fills in quite a lot for a full course.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Example:&lt;/h2&gt;&#xA;&lt;p&gt;To illustrate some of the above ideas and extend them a bit also, consider an exercise from Karel the Robot.&lt;/p&gt;&#xA;&lt;p&gt;The robot, Karel, is at a corner facing East. Somewhere directly in front of the robot is a beeper (possibly even on the same corner). The Karel's task is to move to the beeper, pick it up, turnleft and move the same distance that was traveled to get to the beeper initially and put it down again.&lt;/p&gt;&#xA;&lt;p&gt;Note: no variables, no integers, no counting is possible, except via recursion with the count held in the runtime stack, implicitly. And, of course, the previous sentence is an explicit hint.&lt;/p&gt;&#xA;&lt;p&gt;The advantages of this are legion. You have a deep way to talk about recursion, especially the fact that recursion has two &amp;quot;phases&amp;quot;: winding - to get to the base case, and unwinding - to return all the calls. To do this exercise you need to do actual work in both phases, so you can talk about the fact that both are useful (and can introduce tail recursion which this example does NOT exhibit).&lt;/p&gt;&#xA;&lt;p&gt;It is interesting in a way in which a standard recursive computation of, say, Fibonacci numbers is not.&lt;/p&gt;&#xA;&lt;p&gt;It is an interesting problem because solving it changes the brain of the solver. However. If the student already knows how to count and has tools (int variables...) to solve it, this problem is completely boring and adds nothing (other than a bit of reinforcement) to changing the brain.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, later on, the instructor can return to this example (around the spiral) when counting is later taught and show how counting both simplifies it and makes it more dangerous, since such things as off by one errors are now more likely.&lt;/p&gt;&#xA;&lt;p&gt;So, what seems simple, becomes profound because it is introduced into a constrained system. The constraints both give guidance/structure AND deepen learning in ways foreseen (we hope) by the designer.&lt;/p&gt;&#xA;&lt;p&gt;Copacetic.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;: While Pascal set out to be the &amp;quot;best&amp;quot; language for  PP, it turned out to have flaws, especially for team based work. Modula-2 is much better, but is a true successor. However, it took lots of users writing lots of Pascal software to reveal the flaws. C++ started out as a better C+Simula. Object Pascal (from Apple) started out as a simpler Smalltalk, and Java is in that family, as are Python, Ruby, and Scala.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-23T21:55:43.660" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2884" PostTypeId="2" ParentId="353" CreationDate="2017-07-23T20:31:50.707" Score="2" Body="&lt;p&gt;One extremely handy macro is creating names ranges.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start recording&lt;/li&gt;&#xA;&lt;li&gt;Select the range you want to name&lt;/li&gt;&#xA;&lt;li&gt;Press the &quot;create named range&quot; in the &quot;formulas&quot; tab&lt;/li&gt;&#xA;&lt;li&gt;give name&lt;/li&gt;&#xA;&lt;li&gt;stop recording.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Voila. This has many uses in real life&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another one might be creating a table with headers.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Record&lt;/li&gt;&#xA;&lt;li&gt;Select the table&lt;/li&gt;&#xA;&lt;li&gt;detect the headers with &quot;format as table&quot; and check &quot;my table has headers&quot;&lt;/li&gt;&#xA;&lt;li&gt;stop recording.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Voila #2.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-23T20:31:50.707" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2885" PostTypeId="5" CreationDate="2017-07-23T20:50:28.837" Score="0" Body="&lt;p&gt;&lt;em&gt;Lecture tools&lt;/em&gt; are the set of software tools used in lectures and can benefit or detract from the quality of the lecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good lecture tools can help facilitate student understanding. Graphical software that illustrates the operation of an algorithm (algorithm visualization) is an example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lecture tools can also include software that gathers information from students as they work to facilitate lectures. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-10-11T18:34:26.403" LastActivityDate="2017-10-11T18:34:26.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2886" PostTypeId="4" CreationDate="2017-07-23T20:50:28.837" Score="0" Body="Questions related to software tools and materials used by teachers in lectures and to manage classes. Use this tag to ask about advantages or disadvantages of some tools." OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-10-11T18:34:26.403" LastActivityDate="2017-10-11T18:34:26.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2887" PostTypeId="5" CreationDate="2017-07-23T20:52:17.773" Score="0" Body="&lt;p&gt;Questions here might be about the use of specific database products in education, about introducing databases into teaching, and even how to find sufficiently large and interesting datasets for students to explore. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All sorts of database systems might be discussed, relational, for example, and nosql. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, however that there is a separate tag &lt;a href=&quot;/questions/tagged/sql&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;sql&amp;#39;&quot; rel=&quot;tag&quot;&gt;sql&lt;/a&gt; for questions specific to sql and relational querying. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-23T21:32:48.067" LastActivityDate="2017-07-23T21:32:48.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2888" PostTypeId="4" CreationDate="2017-07-23T20:52:17.773" Score="0" Body="Questions related to teaching about databases, tools for using them, platforms etc. Use this tag to ask about various aspects of databases." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T20:57:34.330" LastActivityDate="2017-07-23T20:57:34.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2889" PostTypeId="5" CreationDate="2017-07-23T20:55:11.357" Score="0" Body="&lt;p&gt;Lambda expressions, anonymous functions, have recently been introduced into Java and are important features of other languages including Scala. A language doesn't need to be a functional language (e.g. Scheme) to take advantage of lambda expressions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to introducing lambda expressions into education, including examples of use and proper usage. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag is not for theoretical questions related to lambda expressions or the lambda calculus. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-23T21:32:58.143" LastActivityDate="2017-07-23T21:32:58.143" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2890" PostTypeId="4" CreationDate="2017-07-23T20:55:11.357" Score="0" Body="Questions related to teaching lambda expressions. Use this tag to ask about teaching how to use lambda expressions. Not to be confused with lambda calculus." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T20:57:26.423" LastActivityDate="2017-07-23T20:57:26.423" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2891" PostTypeId="5" CreationDate="2017-07-23T21:12:27.707" Score="0" Body="&lt;p&gt;Machine Learning (often abbreviated as &lt;em&gt;ML&lt;/em&gt;) is a branch of Artificial intelligence, which deals with programs that learn how to solve specific problems or sets of problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many techniques in the field: Neural Networks, Genetic algorithms etc.&#xA;The field is quickly changing, as new technologies and techniques are being created. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the methods used in ML are based on mathematical operations and computations. For example, edge detection in image processing uses Matrix Multiplication, and neural networks are mathematical models for computing outputs for given inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, teaching sub fields of ML requires teaching (or background knowledge) of these mathematical tools and techniques.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T21:13:52.093" LastActivityDate="2017-07-23T21:13:52.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2892" PostTypeId="4" CreationDate="2017-07-23T21:12:27.707" Score="0" Body="Questions related to teaching subjects in the field of Machine Learning. Use this tag to ask about various aspects of teaching a specific subfield of Machine Learning." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-23T21:13:47.350" LastActivityDate="2017-07-23T21:13:47.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2893" PostTypeId="2" ParentId="380" CreationDate="2017-07-23T22:42:21.807" Score="1" Body="&lt;p&gt;While, in general, I prefer that students on a team get the same grade for the work (see below) I also ask each student on a team to fill out a questionnaire at the end. The questions are simple. Assuming a team of about five, I'll ask each student to name the three most valuable members of the team and to list the contribution of each. They may name themselves as one of the three and are told that. I also ask each &quot;What was your own principal contribution?&quot;. For a pair, I ask each, to give the partners main contribution and their own. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The reason for a default equal grade is to have the system encourage sharing and contributing. In Agile Development, one of the key ideas is that the Team shares in the success and reward of the project. It is not up to the team's manager to pick winners and losers on a team. I extend that idea to the classroom. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I keep my eyes open, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, most teams do much of their work outside my view. I seldom respond positively to complaints about team members (and get only a few), reminding the complainer that it is also their responsibility to foster team work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the students need to know that the &quot;product&quot; I'm most interested in isn't their program (or whatever) but the learning. If the project &quot;fails&quot; the students can still succeed. The educational process should be a &quot;safe zone&quot; where you are not yet expected to perform at a professional level. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-23T22:42:21.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2894" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T01:13:02.040" Score="17" Body="&lt;p&gt;I find it amazing that nobody here even mentioned the possibility that men simply find programming much more interesting than women do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question can only be answered with a hypothesis so I will give you mine:&lt;br&gt;&#xA;In the 80's personal computers became more common; boys liked them, girls didn't. There that's it, that's the whole explanation, the simplest and using Occam's razor the better one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of ItamarG3's answer supports my hypothesis:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A study of Carnegie Mellon's Computer Science degree path shows that half of the women in the program ended up quitting, and more than half of them were on the Dean's List.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Why did they quit? Because they didn't like it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to the rest of his answer and the other answer I find the whole notion of advertisements creating reality ridiculous. Advertisers base their ads on reality, not the other way around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will finish with a personal anecdote:&lt;br&gt;&#xA;When I was a kid in the early 90's I went to an evening school. Part of the curriculum was programming and all the boys immediately liked it. &lt;br&gt;It wasn't advertised in any way and there was certainly absolutely nothing done by the teachers that would imply that it is more for boys than for girls. &lt;br&gt;Because we liked it so much we pushed for more and more programming lessons until at some point it became more or less a programming school, no girls remained at that point...&lt;/p&gt;&#xA;" OwnerUserId="2149" LastEditorUserId="27" LastEditDate="2017-07-24T01:28:51.507" LastActivityDate="2017-07-24T01:28:51.507" CommentCount="29" ContentLicense="CC BY-SA 3.0" />
  <row Id="2895" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T07:42:53.913" Score="16" Body="&lt;p&gt;Computing was historically a female-dominated field. &quot;Computers&quot; used to be mostly women working out mathematical calculations. With the advent of mechanical and then electrical computers (during WW2, when men were sparse already), these women were drafted to do the data entry and cross-checking. When input complexity evolved from entering numbers into a calculator to actual programming, it took a while for men to realize that it required actual thinking. There's a famous Grace Hopper quote about how women are naturals at programming because scheduling assembler instructions is just like dinner planning. Up to the 70s, most men wouldn't touch a keyboard because &quot;typing is for their secretaries&quot;. Programming was something you did while you waited for marriage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the &quot;computer revolution&quot; started and people realized how important programming was becoming, there was a massive influx of men into the field. I wouldn't be surprised if in absolute numbers, there are still more women in CS today than in 1984...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further reading:&#xA;&lt;a href=&quot;http://mentalfloss.com/article/53160/meet-refrigerator-ladies-who-programmed-eniac&quot; rel=&quot;noreferrer&quot;&gt;http://mentalfloss.com/article/53160/meet-refrigerator-ladies-who-programmed-eniac&lt;/a&gt;&#xA;&lt;a href=&quot;https://www.theatlantic.com/business/archive/2016/09/what-programmings-past-reveals-about-todays-gender-pay-gap/498797/&quot; rel=&quot;noreferrer&quot;&gt;https://www.theatlantic.com/business/archive/2016/09/what-programmings-past-reveals-about-todays-gender-pay-gap/498797/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2157" LastActivityDate="2017-07-24T07:42:53.913" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2896" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T08:20:03.737" Score="6" Body="&lt;p&gt;While I have not seen any compelling evidence ether way. I as wondering if there is a true underlying gender element, or at least to deep to be fixed locally (with in CS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder if this is related to “what are female roles?” and “What is a computer?”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first question, the answer is getting broader over time, so I don't think the answer lies here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the 2nd this seems to change a lot.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An automation controller (Jacquard).&lt;/li&gt;&#xA;&lt;li&gt;A calculator (Babbage) (where the name came from).&lt;/li&gt;&#xA;&lt;li&gt;A type-writer.&lt;/li&gt;&#xA;&lt;li&gt;A fairground game.&lt;/li&gt;&#xA;&lt;li&gt;A postal system.&lt;/li&gt;&#xA;&lt;li&gt;A news paper.&lt;/li&gt;&#xA;&lt;li&gt;A drawing sketch pad.&lt;/li&gt;&#xA;&lt;li&gt;A a telephone.&lt;/li&gt;&#xA;&lt;li&gt;A reference library.&lt;/li&gt;&#xA;&lt;li&gt;A TV.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As our view of what a computer is changes, it affects who wants to be involved. However a computer is all of these (and more), and it is non of there. It is a modelling machine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore we need to show what computers can do, “what is in it for me?”. Use grate examples to engage with our students. (The more important question is not “Why did it happen?”, but “how do we fix it?”. Though the first question is an important step to the 2nd.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have recently been watching some videos by Bret Victor &lt;a href=&quot;https://www.youtube.com/watch?v=8pTEmbeENF4&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;The future of programming&quot;&gt;https://www.youtube.com/watch?v=8pTEmbeENF4&lt;/a&gt;, making programming more like just using a computer, and making just using a computer more like programming. No need to program, to be able to automate a task. I was thinking that if his views come true, then there will be new different roles, for different people. Some of these may be liked more by women.&#xA;[Sorry I have struggled to put in to words what is in the Bret Victor videos. As I write this apology, I realise that that is exactly the point he was making.]&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-24T19:27:29.713" LastActivityDate="2017-07-24T19:27:29.713" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2897" PostTypeId="1" CreationDate="2017-07-24T09:03:34.140" Score="60" ViewCount="12447" Body="&lt;p&gt;I like Git, or at least the idea of it. However I can not get my head around how to use it. Therefore I would not like to teach it.&lt;/p&gt;&#xA;&lt;p&gt;(This question is about learning to use Git. Not about comparing it to other revision control systems.)&lt;/p&gt;&#xA;&lt;p&gt;I have used a range of revision control systems: SCCS, ClearCase, RCS, CVS, and Subversion. I then tried to learn Git. In reading the manuals I got a full understanding of its internals. I even managed to use it, but after a few days I would forget how to use it. The interface seems unintuitive. I then adopted Mercurial (&lt;code&gt;hg&lt;/code&gt;) — a similar, but easier to use revision control tool.&lt;/p&gt;&#xA;&lt;p&gt;I have noticed that Git is very popular, and maybe superior to Mercurial (internally, if not from a usability point of view). And am therefore thinking of giving it another go.&lt;/p&gt;&#xA;&lt;p&gt;What can I do to make this journey easier for me?&lt;/p&gt;&#xA;&lt;p&gt;What good user interfaces should I adopt?&lt;/p&gt;&#xA;&lt;p&gt;I am not interested in proprietary tools; All tools should be &lt;strong&gt;Free Software / Open Source&lt;/strong&gt;. They need to be available for &lt;strong&gt;GNU/Linux&lt;/strong&gt; and &lt;strong&gt;Microsoft Windows&lt;/strong&gt; (I have to use the latter at work).&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Who are the learners?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Myself (&lt;strong&gt;a software engineer &amp;gt; 20 years experience of revision control systems&lt;/strong&gt;).&lt;/li&gt;&#xA;&lt;li&gt;My pupils (age 11 to 18), if I find it easy enough to learn my self.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;My preference for user interfaces are&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unix (GNU/Linux) command line.&lt;/li&gt;&#xA;&lt;li&gt;Unix (GNU/Linux) GUI.&lt;/li&gt;&#xA;&lt;li&gt;Microsoft's Windows GUI.&lt;/li&gt;&#xA;&lt;li&gt;Microsoft's command line.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So it is important, for me, to have a good command line tool, on my GNU/Linux machine. And important to have a good, and the same, GUI on GNU/Linux and Microsoft Windows.&lt;/p&gt;&#xA;&lt;h2&gt;My goals&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;To use the tool to store the history of my, and pupils, projects.&lt;/li&gt;&#xA;&lt;li&gt;To be able to look at past history.&lt;/li&gt;&#xA;&lt;li&gt;To be able to revert to past state.&lt;/li&gt;&#xA;&lt;li&gt;To merge and resolve conflicts.&lt;/li&gt;&#xA;&lt;li&gt;To not be un-necassarily serprised.&lt;/li&gt;&#xA;&lt;li&gt;To never think, that life would be easier without it.&lt;/li&gt;&#xA;&lt;li&gt;Have a smooth progression from the basics (that should be very easy), to the complex (that should be as complex as necassary, but no more).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/57pAQ.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/57pAQ.png&quot; alt=&quot;XKCD comic. Man gesturing to a laptop: &amp;quot;This is Git. It tracks collaborative work on projects through a beautiful distributed graph theory tree model.&amp;quot; Woman: &amp;quot;Cool. How do we use it?&amp;quot; Man: &amp;quot;No idea. Just memorize these shell commands and type them to sync up. If you get errors, save your work elsewhere, delete the project, and download a fresh copy.&amp;quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I am not against command-line usage (it is my favourite way to use the computer), I am against cryptic, hard to remember commands, that have surprising results.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="5" LastEditDate="2023-05-21T08:36:43.537" LastActivityDate="2023-05-21T08:36:43.537" Title="How do I teach git to a teenager" Tags="|resource-request|self-learning|revision-control|git|" AnswerCount="24" CommentCount="22" ContentLicense="CC BY-SA 4.0" />
  <row Id="2899" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T09:05:42.117" Score="24" Body="&lt;p&gt;Women just like some majors more than others.  For whatever reason, they dominate (&lt;a href=&quot;http://www.npr.org/sections/money/2014/10/28/359419934/who-studies-what-men-women-and-college-majors&quot; rel=&quot;noreferrer&quot;&gt;source&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Health Professions;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Social Work;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Education;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Psychology;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;outnumbering men by at least 3-to-1 in all of those fields.  Each woman who spends all of her time studying to become a doctor is a woman who isn't studying to be a computer scientist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The clear common ground between those four fields is that they're highly social and focused on helping others.  By contrast, men dominate the fields that are perceived to be the least social, i.e. Computer Science and Engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also some variation based on how math-heavy a field is; for example, women are relatively more likely to do Biology than Physics.  But, that effect doesn't appear to dominate.  For example, women are fairly well-represented in Math and Physics.  Also, women may choose Biology more often because it's a popular major for students planning to go to med school.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Asking students directly&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If you're an instructor in high school or college, then you have direct access to students around the time that they're making their study choices.  So, asking them what they want to do and why seems like a good path toward personal understanding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're probably going to hear stuff like &quot;&lt;em&gt;I want to help others&lt;/em&gt;&quot; more from the women and &quot;&lt;em&gt;I like computers&lt;/em&gt;&quot; more from the men.  Ultimately, their major will be their choice, so it's all about understanding what they want.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Two big peaks for CS degree obtainment, regardless of gender&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Looks like CS degree granting has gone through two big peaks during this time:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.computerworld.com/article/2474991/it-careers/women-computer-science-grads--the-bump-before-the-decline.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;a href=&quot;https://i.stack.imgur.com/wOeIw.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/wOeIw.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first peak, around 1985, is before my time.  However it's my impression that there was a major loss of momentum around those years.  The term &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/AI_winter&quot; rel=&quot;noreferrer&quot;&gt;AI winter&lt;/a&gt;&quot; was coined in 1984, suggesting that pessimism was prevalent enough to assign it a name in discussion.  Presumably this pessimism dissuaded incoming college students from selecting CS, causing the drop a few years later when they graduated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That second peak looks like it's centered around 2004/2005, suggesting that students were really optimistic about Computer Science around 2000/2001.  And those years were the peak of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Dot-com_bubble&quot; rel=&quot;noreferrer&quot;&gt;dot-com bubble&lt;/a&gt;, which started its clear burst in late-2000.  It seems probable that the dot-com bubble bursting dissuaded incoming students from going into CS then, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Females in specific also followed this trend, and had the same peaks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/KFmLO.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/KFmLO.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The peaks look more pronounced for women; presumably if we had a graph of just men, we'd see their enrollment had a milder response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd speculate that this implies that women cared more about the optimism/pessimism about Computer Science happening at the time than men did.  This is, optimism had a stronger pull to get women in, then pessimism also pushed them out harder.  This push/pull effect can be seen in the relative CS degree obtainment plot:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/BfAWh.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/BfAWh.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As shown, women chose CS relatively more often until the peaks, then relatively chose other majors after the peaks.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Not a bad thing&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So women like being medical professionals more than programmers - &lt;strong&gt;&lt;em&gt;awesome!&lt;/em&gt;&lt;/strong&gt;  As long as people are freely choosing what they want to do, then that's exactly what we should be striving for.&lt;/p&gt;&#xA;" OwnerUserId="39" LastEditorUserId="39" LastEditDate="2017-07-24T09:44:27.410" LastActivityDate="2017-07-24T09:44:27.410" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2900" PostTypeId="2" ParentId="639" CreationDate="2017-07-24T10:16:30.020" Score="5" Body="&lt;p&gt;Optimisation should not be taught as part of a general programming course. It should be taught as part of compiler design. This is because:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Compilers are better at optimisation than humans.&lt;/li&gt;&#xA;&lt;li&gt;Premature optimisation gets in the way of the compiler, and can lead to less optimal code.&lt;/li&gt;&#xA;&lt;li&gt;Premature optimisation makes the code harder to read, and maintain, leading to more bugs, and long term degradation of the code (slower code).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That said, this is how to optimise, this is what should be taught.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Optimise for readability.&lt;/li&gt;&#xA;&lt;li&gt;Big O: There is not much your compiler can do to help you here. Choosing a good algorithm makes the biggest difference. Therefore optimise for big O.&lt;/li&gt;&#xA;&lt;li&gt;First get it to work: passing all tests. Then get it to work fast.&lt;/li&gt;&#xA;&lt;li&gt;Only apply manual optimisations if there is a &lt;strong&gt;need&lt;/strong&gt; for it.&lt;/li&gt;&#xA;&lt;li&gt;When doing an optimisation, measure, optimise, measure, compare.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The rest is detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are teaching optimisation techniques, then after teaching, why not to do it, you should start with techniques and patterns that always work. Look these up in a good book on optimisation, as most of the time intuition is wrong. And remember measure, optimise, measure, compare.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-24T10:16:30.020" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2901" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T11:02:03.860" Score="9" Body="&lt;p&gt;It probably won't fit particulary good for you, as you want the same GUI on every platform, but I want to suggest GitHub Desktop for future readers, who don't have the platform requirement.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;GitHub Desktop&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://desktop.github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub Desktop&lt;/a&gt; (&lt;a href=&quot;https://github.com/desktop/desktop&quot; rel=&quot;nofollow noreferrer&quot;&gt;source code available on GitHub&lt;/a&gt;) is a graphical Git client by GitHub, available for Mac and Windows. It's especially designed to integrate with the hoster GitHub, but should also work with other Git hosters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's intuitive to use the version-control features of GitHub Desktop, which could be an advantage in your case, as this helps against forgetting commands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It, however, does not follow the concepts of Git closely - so you will encounter some things that may be intuitive in GitHub Desktop, but appear strange to Git users who know e.g. the command line interface. As &lt;a href=&quot;https://cseducators.stackexchange.com/users/1091/steven-vascellaro&quot;&gt;Steven Vascellaro&lt;/a&gt; points out in &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2897/how-to-make-git-easy-to-learn#comment5973_2901&quot;&gt;his comment&lt;/a&gt;, this could be a major downside when wanting to learn Git:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm hesitant to recommend GitHub Desktop to a new user trying to learn Git. Similar to using BlueJ for Java, it can be very difficult to transition to a different client after getting used to GitHub Desktop. It obfuscates many important parts of the traditional Git workflow.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I would therefore recommend GitHub Desktop to Windows users that want an easy and intuitive way to manage Git (e.g. because they have to use it inside their company) without having to deal much with the sometimes counter-intuitive (looking) concepts of Git.&lt;/p&gt;&#xA;" OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-07-25T11:10:57.123" LastActivityDate="2017-07-25T11:10:57.123" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="2902" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T11:14:40.853" Score="15" Body="&lt;p&gt;If you already use an IDE, this could be the right way for you:&lt;/p&gt;&#xA;&lt;h2&gt;Git support in your IDE&lt;/h2&gt;&#xA;&lt;p&gt;Many IDEs come bundled with Git support:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://code.visualstudio.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Visual Studio Code&lt;/a&gt; has maybe the best Git integration I've ever seen.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://eclipse.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Eclipse&lt;/a&gt; uses &lt;a href=&quot;https://www.eclipse.org/egit/&quot; rel=&quot;nofollow noreferrer&quot;&gt;EGit&lt;/a&gt; for Git integration.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;https://www.jetbrains.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;JetBrains IDEs&lt;/a&gt; (IntelliJ, PyCharm etc.) also provide Git support.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All of those IDEs run on most common platforms (e.g. Linux, Mac, Windows) and look more or less the same there. This would mean you can use the Git client you know at home and at work if you use the same IDE at both places.&lt;/p&gt;&#xA;&lt;p&gt;Normally, the Git support integrates quite well with the programming workflow. The Git clients are often quite mighty, but always accessible using a comfortable GUI, which could help as there are no terminal commands to memorize. However, you should keep the Git concepts in mind - depending on the IDE, the built-in Git client will follow those concepts more or less closely.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I personally use the built-in Git integration of various IDEs in my day-to-day work and am very happy with it, so I could recommend it to everyone who doesn't want to experiment but just wants to have a good-working Git client.&lt;/p&gt;&#xA;" OwnerUserId="793" LastEditorUserId="793" LastEditDate="2022-08-09T19:22:08.697" LastActivityDate="2022-08-09T19:22:08.697" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="2903" PostTypeId="1" AcceptedAnswerId="2904" CreationDate="2017-07-24T11:22:06.240" Score="18" ViewCount="1986" Body="&lt;p&gt;This year I'll be an unofficial teacher assistant in the CS class of 9th graders.&lt;/p&gt;&#xA;&lt;h2&gt;Background&lt;/h2&gt;&#xA;&lt;p&gt;This question is about a curriculum for introducing students to programming in java.&lt;/p&gt;&#xA;&lt;p&gt;The students are in 9th grade (14-15 years old) and are not expected to have any background whatsoever in computer science (usually some do have, but that's not relevant to the curriculum. Differentiating it is something relatively easy at this stage).&lt;/p&gt;&#xA;&lt;p&gt;This curriculum spans 2 terms (1 year - Sept. to June), and is meant to build a firm foundation for students. The subject is compulsory in 9th grade. I have some doubts regarding the ordering of the subjects in the curriculum.&lt;/p&gt;&#xA;&lt;h2&gt;How it stands&lt;/h2&gt;&#xA;&lt;p&gt;Students are initially introduced to computers in general.&lt;/p&gt;&#xA;&lt;p&gt;The first lesson is always brainstorming: &lt;em&gt;&amp;quot;What is computer science?&amp;quot;&lt;/em&gt;. It's established from there that programming (&amp;quot;computer science is writing code&amp;quot; is usually a response of a few students) is writing something, and then converting it into binary (it's expected that they know that the binary numbering system &lt;em&gt;exists&lt;/em&gt;). The students use the remaining time (&lt;span class=&quot;math-container&quot;&gt;$\pm$&lt;/span&gt;10 minutes) to write the famous:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public static void main(String[] args){ //we don't explain this line&#xA;    System.out.println(&amp;quot;Hello, World!&amp;quot;); //sometimes we use a Hebrew alternative:&#xA;    System.out.println(&amp;quot;!שלום, עולם&amp;quot;);//which is literally the translation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That's the first lesson. From here, I'll list the subjects (each one is a subject, and not a separate lesson; lessons are ignored, I only address the subjects of the curriculum) taught (the language used to teach is Java)&lt;/p&gt;&#xA;&lt;p&gt;   0. (First Lesson) introduction and simple printing of text&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Simple Eclipse console Input\Output and user input (print what the user inputs etc.) as well as variables (just primitives, and just &lt;code&gt;int&lt;/code&gt;,&lt;code&gt;double&lt;/code&gt;,&lt;code&gt;char&lt;/code&gt; and &lt;code&gt;String&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mathematical operators: &lt;code&gt;+&lt;/code&gt;,&lt;code&gt;-&lt;/code&gt;,&lt;code&gt;*&lt;/code&gt;,&lt;code&gt;/&lt;/code&gt; as well as &lt;code&gt;%&lt;/code&gt;. The curriculum has an option to teach increment  as well as &lt;code&gt;+=&lt;/code&gt;, &lt;code&gt;-=&lt;/code&gt; and the rest.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Conditionals: &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;if\else&lt;/code&gt; and nested &lt;code&gt;if&lt;/code&gt;s. Also &lt;code&gt;boolean&lt;/code&gt; is introduced.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;switch-case&lt;/code&gt;. Not much to say about this at this level.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;Math&lt;/code&gt; library. This is one of the things that caused me to doubt the order of things in the curriculum.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;for&lt;/code&gt; loops and various uses. Arrays are not taught in the curriculum &lt;strong&gt;at all&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;while&lt;/code&gt; loops.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Nested loops.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;functions. yes, functions:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;static returnType functionName ( parameters)&#xA;{&#xA;    //operations&#xA;    return returnValue;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;That's it.&lt;/p&gt;&#xA;&lt;h2&gt;Doubts&lt;/h2&gt;&#xA;&lt;p&gt;I spotted a few issues in the curriculum. First and foremost: Where are all the arrays? I want to include arrays, but I'm not sure where\instead of what.&lt;/p&gt;&#xA;&lt;p&gt;Teaching &lt;code&gt;for&lt;/code&gt; after arrays seems better than before, because then I can show the &lt;code&gt;foreach&lt;/code&gt; in the same lesson. They are essentially the same (but not 100% equivalent. Concurrent modifications is something beginners aren't ready for). So I am uncertain about the order of the subjects.&lt;/p&gt;&#xA;&lt;p&gt;Secondly: Functions. Again, why? I want to remove them from the curriculum (students learn about them in the following years anyway, as part of OOP), but this might do more damage than good. Students might want to know, after an entire year, what &lt;em&gt;exactly&lt;/em&gt; is the meaning of the &lt;code&gt;public &lt;strong&gt;static&lt;/strong&gt; &lt;em&gt;void&lt;/em&gt; &lt;em&gt;&lt;strong&gt;main&lt;/strong&gt;&lt;/em&gt;&lt;/code&gt; from lesson 1.&lt;/p&gt;&#xA;&lt;p&gt;Functions can explain that, but other than that, it's pointless at this stage (because they'll learn it anyway, should they major in CS).&lt;/p&gt;&#xA;&lt;p&gt;So, does the order of subjects in the curriculum, as it stands, make sense (keeping in mind that arrays are not covered at all)?&lt;/p&gt;&#xA;&lt;p&gt;Note: this question is not a duplicate of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793&quot;&gt;this one&lt;/a&gt;, simply because I already have a curriculum, and I am asking for a review of it. I'm also asking about specific aspects of my curriculum, and not general &amp;quot;hand wave-ish&amp;quot; things.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-04T19:13:09.993" Title="The order of subjects in beginner's curriculum" Tags="|secondary-education|java|curriculum-review|" AnswerCount="9" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="2904" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T11:53:42.237" Score="7" Body="&lt;p&gt;I once wrote a course to introduce Java. My order of topics was as follows: (Note: Those are not lessons, just the order I've written the topics down).&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Obligatory Hello World, console output&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Comments&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This is something missing in the curriculum you provided. I don't know how important it really is, but I like the idea to introduce comments because I usually use them in the following examples.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Variables, data types (the primitives and &lt;code&gt;String&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This already includes &lt;code&gt;boolean&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Arrays&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here they are. I've just explained them as some kind of list where you could store multiple variables of the same type (half a page in my script).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Operators (mathematical, but also logical)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Reading user input&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When writing the course, I put it here; but looking over it again, I'm not particulary happy with it. I think it's a good idea to keep reading user input where it is in your curriculum.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Conditionals (&lt;code&gt;if&lt;/code&gt;, &lt;code&gt;else if&lt;/code&gt;, &lt;code&gt;else&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I don't explain &lt;code&gt;switch/case&lt;/code&gt; here.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;Loops (&lt;code&gt;while&lt;/code&gt; and &lt;code&gt;for&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Basic exception handling&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Here I only explain &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt; as a way to do something (like printing a message) when &quot;there are errors with a part of the program&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Writing and reading text files&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The course continues with a second part about OOP.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;When comparing it to your curriculum, I think there are many good elements in it. However, here are a few things I noticed:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The &lt;code&gt;Math&lt;/code&gt; library&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If there's no special need for it (e.g. class has just discussed trigonometry in Maths and now wants to implement something using a trigonometric function) I wouldn't include it in a starters' curriculum.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;switch/case&lt;/code&gt; statements&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm not sure whether you really need to introduce them that early. However, if there's enough time, I also don't see a problem with it. I think I'd just drop it if there are issues with time.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Arrays&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As said, they are missing in this curriculum. If you drop the Math library and/or &lt;code&gt;switch/case&lt;/code&gt; statements (for the reasons given above), I think you could integrate this instead. Students should already feel comfortable dealing with variables now, so the &quot;lists of variables&quot; can be introduced on a safe basis.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I think it's a good idea to introduce them before loops, so you can show looping over arrays in the lesson you also introduce loops.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Functions&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When designing my course, I haven't really thought of them. However, the idea teaching &quot;functions&quot; is probably not that bad: Students now know a way how to structure a program's flow and write reusable code without having to dig into object-oriented-programming.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;On the other hand, this could also be interpreted as downside: As Java is a strictly object oriented language, it might be bad introducing functions before introducing the concepts of OOP.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To sum up, the curriculum given by you sounds quite good to me. Except for the adjustments proposed above, I don't see much that needs to be changed.&lt;/p&gt;&#xA;" OwnerUserId="793" LastEditorUserId="793" LastEditDate="2017-07-31T14:51:12.713" LastActivityDate="2017-07-31T14:51:12.713" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2905" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T11:55:26.660" Score="5" Body="&lt;p&gt;If the set of &quot;allowable&quot; topics is set by a ministry, then you have no power to do anything better, but it is misguided. Tinkering around the edges of an inadequate set will have some effect, but not a lot, I'm afraid. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is this. Students taught this way will solve math-y problems for quite a while before they see more interesting problems. They will build up strong reinforcement patterns that &quot;&lt;strong&gt;this&lt;/strong&gt; is the way we program&quot;. Then later, when given a difficult problem they will default to those patterns again and their solutions will look like C code even in more modern languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One reason that this dominates is that the student has two problems, one is to decompose the problem &lt;em&gt;somehow&lt;/em&gt; and the other is to put a solution together. If both problems are hard then they get lost. But if they have already built up strong reinforcement patterns on the second part they can use their mental energy on the first part. But since they &quot;&lt;em&gt;know&lt;/em&gt; how to program&quot; (i.e. C) then they will just code it that way to minimize their overall effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preference is to turn it around (though recognizing that you may not have that opportunity), so that students think first about problems and how to decompose them (into objects in my case - OOP). Then they build up the reinforcement patterns on that, so it becomes &quot;obvious&quot; to them and they spend their effort on the coding part. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The overall result is better programs, since they are more likely to have better problem decomposition into small parts that are more easily coded anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I've seen the effect of this kind of learning in industrial practice. While consulting to IBM is was approached by a team member (an employee - and a good and smart one) who wanted me to look at his code. My practice was not to do that since my charter was to talk about higher level process, but he was a good kid so I consented. He showed me a bit of code (less than 2 pages) and started out by saying he could no longer understand it (his own code). It was written (Java) using the tools you describe above. The code was one method that consisted of some deeply nested structure that would be difficult to untangle. Factoring out helper methods (a la Procedural Programming) would be difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first response was that I wouldn't have started out trying to write anything that looked in any way like that, and that by the time we got to the point of solving the particular problem the method attacked, we would already have a decomposition into parts that made the required (set of) methods quite trivial too write and to understand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The overall effect of what you propose is that you are, in the long run, reinforcing poor habits of thought. Or at least, poorer than the alternatives allow. That sounds like just opinion, I know, until you consider the effect of reinforcement and the tendency to fall back on what you know &quot;best&quot; which is often what you learned &quot;first&quot;, since you've practiced it the longest time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;tl;dr You are starting with the machine and with machine level solutions. Instead, start with problems and their decomposition. Assuming you can. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-24T12:29:59.967" LastActivityDate="2017-07-24T12:29:59.967" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2906" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T12:16:46.853" Score="12" Body="&lt;p&gt;We teach AP CS assuming that our students come to us with no prior computing background. Being that the language for AP CS A is Java, we plan our sequencing accordingly. We don't follow the approach of starting with &lt;code&gt;Hello, world.&lt;/code&gt; and user input because I think it (&lt;code&gt;main&lt;/code&gt;, &lt;code&gt;System.out.println&lt;/code&gt;, and &lt;code&gt;Scanner&lt;/code&gt;) produces too much of a cognitive load at once . I always try to minimize hand waving as much as possible in the early parts of a CS course to help students build their confidence in navigating code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While Eclipse is commonly used in industry and higher academia, an introductory course isn't industry or higher academia. So we use an IDE that is more appropriate for the new learner. We utilize &lt;a href=&quot;https://www.bluej.org/&quot; rel=&quot;noreferrer&quot;&gt;BlueJ&lt;/a&gt; to begin demystifying Java from the very first day of class. Thanks to BlueJ, we don't have to discuss &lt;code&gt;main&lt;/code&gt; or making tester/runner classes to run our code. In our post-AP CS course we can introduce IntelliJ or Eclipse, once the students can comfortably grasp the idea of multiple classes and project directories. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our decision to introduce objects early was inspired by &lt;a href=&quot;https://www.bluej.org/objects-first/&quot; rel=&quot;noreferrer&quot;&gt;Dr. Kolling's book's&lt;/a&gt; sequencing and the fact that Java is the language taught in AP CS. Others may chime in by saying they think objects should be introduced late. I disagree for the reasons previously mentioned. Should we leave AP and teach Python or Javascript, I would wait until later in the course to introduce OOP. That being said, here is our general outline:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Introduction to OOP&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is a class and what is an object?&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Writing Java Classes&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What makes up a Java class?&lt;/li&gt;&#xA;&lt;li&gt;Fields&lt;/li&gt;&#xA;&lt;li&gt;Constructors &lt;/li&gt;&#xA;&lt;li&gt;Methods&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Conditionals&lt;/li&gt;&#xA;&lt;li&gt;Logical Operators&lt;/li&gt;&#xA;&lt;li&gt;Java Math and the Math Class&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;At this point it's September and my students can navigate an entire Java class and the hand waving of &lt;code&gt;public static void main(String[] args)&lt;/code&gt; is gone. That's hugely important and beneficial.&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;Classes as Data Types for Other Classes&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Encapsulation&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Strings&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;1D Arrays&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Looping&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;2D Arrays&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The ArrayList Class&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Inheritance, Abstract Classes, and Interfaces&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Algorithms&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Recursion&lt;/li&gt;&#xA;&lt;li&gt;Searching&lt;/li&gt;&#xA;&lt;li&gt;Sorting&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Keep the students in mind. Remember where they are coming from and that your goal isn't to turn them into CS researchers or software engineers in a single year. Expose them to the content in an order that appropriately challenges them, while avoiding the statement &quot;You can ignore that for now&quot; as much as possible. &lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2017-07-24T12:16:46.853" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2907" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T13:21:52.440" Score="3" Body="&lt;p&gt;I learned to program by looking at simple program that did things, working out a bit about how they work, and changing them.   So I learned a little bit about each topic in some random order as my overall understanding increased.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore maybe start with LOGO and the class having some &lt;strong&gt;fun&lt;/strong&gt; with a Turtle moving about the floor, then loops etc can be introduced along with &quot;if&quot; assuming the Turtle has some sensors on it.  Once the students start having fun you can move onto the formal topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise you risk having everyone that has not already learned that programming is fun from their come computers not seeing the point of learning programming.&lt;/p&gt;&#xA;" OwnerUserId="2171" LastActivityDate="2017-07-24T13:21:52.440" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2908" PostTypeId="2" ParentId="4" CreationDate="2017-07-24T14:04:45.120" Score="1" Body="&lt;p&gt;This example was suggested to me by Ward Cunningham (of wiki fame). He and his son turned their home into a dungeon game. It had three kinds of objects: Rooms, Actors, and Things. The things could be found in a Room and carried by an Actor. Things had some behavior that could be employed by the Actor. Actors could move between rooms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One &quot;interesting&quot; thing is a Transporter. A transporter can be found somewhere and &quot;pickedUp&quot;. In some other room (or maybe the same) it can be &quot;activated&quot;. Later on, if the Transporter is again &quot;activated&quot; it immediately transports the Actor (and maybe her party) back to the room in which it was first activated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find this object interesting since if you don't care about polymorphism you just set a firstUse flag and then query it later to see which action happens at &quot;activate&quot;. However, it has a much more interesting solution. If the action is represented by a Strategy object instead of a flag, the Strategy determines what will happen at activation. The Transporter has-a Strategy. The currentStrategy can be swapped for another, defining a different action. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this teaches both composition as well as polymorphism, but doesn't need inheritance other than from an interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also modify the behavior of a Strategy using the Decorator Pattern, again without inheritance, but emphasizing composition. A Decorator of Strategies both is-a Strategy and it has-a Strategy that it employs. The concepts here are simple, deep, and applicable in other places. In particular repeated &quot;decoration&quot; is normally stack-like, itself a useful concept. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, students as well as yourself can come up with other kinds of Things that might be fun to work with. Note the similarity to Lego. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refs &lt;a href=&quot;https://en.wikipedia.org/wiki/Strategy_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;Strategy Design Pattern&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Decorator_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;Decorator Pattern&lt;/a&gt;. BTW, Decorators have uses other than strategy-decorators. It is an independent concept. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also suggest that you find a way to tailor your Actors via composition, rather than by inheritance. Strategies can be used for this also. Different actors need not be defined by subclasses, but by objects they &quot;carry&quot; and to which their actions are deferred. For example an immovable-actor can have its &quot;move&quot; method deferred to a no-op object. A &quot;flying-actor&quot; to a ... etc. Lego, again. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-24T14:04:45.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2909" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T14:05:36.973" Score="5" Body="&lt;p&gt;I would be concerned that there isn't any material on &lt;strong&gt;planning&lt;/strong&gt;. In a course that has the goal of building a strong foundation for students, teaching the process of specifying and planning a solution before implementing it will pay huge dividends.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I am a fan of the course order in &lt;a href=&quot;https://sites.google.com/site/cs127a/rick-s-book-2&quot; rel=&quot;noreferrer&quot;&gt;Rick Mercer's CS1 Textbook&lt;/a&gt;. Chapter 1 is &lt;em&gt;Program Development&lt;/em&gt;. It could be summed up as &amp;quot;plan before you code&amp;quot;. Of course, Mercer has more specific steps which really show the value.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Phases of Program Development and related Activities&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Analysis&lt;/em&gt;:  Understand the problem.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Design&lt;/em&gt;:  Develop a solution&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Implementation&lt;/em&gt;:  Make the solution run on a computer&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2&gt;Analysis&lt;/h2&gt;&#xA;&lt;p&gt;This can be summarized in a few steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Read and re-read the problem statement&lt;/li&gt;&#xA;&lt;li&gt;Determine what the inputs are&lt;/li&gt;&#xA;&lt;li&gt;Determine what the outputs are&lt;/li&gt;&#xA;&lt;li&gt;Write down information on the inputs and outputs, including names and sample values&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Problem             Data Name       Input or Output   Sample Data&#xA;-------             ----------      ---------------   ------------&#xA;Count how often     aBardsWork      Input             Much Ado About Nothing&#xA;Shakespeare wrote   theWord         Input             the&#xA;a particular word   howOften        Output            220&#xA;in a particular &#xA;play&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Design&lt;/h2&gt;&#xA;&lt;p&gt;This is where the algorithm is figured out, and psuedocode is written. It's also a great place to introduce common patterns in solutions, like the &lt;strong&gt;Input, Process, Output&lt;/strong&gt; pattern so common in beginner programs.&lt;/p&gt;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Three-Step Pattern     Pattern Applied to a Specific Algorithm&#xA;------------------     ---------------------------------------&#xA;1. Input               1. Obtain test1, test2, and finalExam&#xA;2. Process             2. Compute courseGrade&#xA;3. Output              3. Display courseGrade&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This step could further elaborate on the details of the Process step, of course.&lt;/p&gt;&#xA;&lt;h2&gt;Implementation&lt;/h2&gt;&#xA;&lt;p&gt;This is where you finally code! But note that the previous steps require no knowledge of syntax at all. Those steps could be learned in the first few days of class before a single &lt;code&gt;static void main(String[] args)&lt;/code&gt; is ever seen.&lt;/p&gt;&#xA;&lt;p&gt;Here's the full outline of &lt;a href=&quot;https://sites.google.com/site/cs127a/rick-s-book-2&quot; rel=&quot;noreferrer&quot;&gt;Rick Mercer's CS1 text&lt;/a&gt; (aimed at college freshmen):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Program Development&lt;/li&gt;&#xA;&lt;li&gt;Java Fundamentals&lt;/li&gt;&#xA;&lt;li&gt;Objects and JUnit&lt;/li&gt;&#xA;&lt;li&gt;Methods&lt;/li&gt;&#xA;&lt;li&gt;Selection&lt;/li&gt;&#xA;&lt;li&gt;Repetition&lt;/li&gt;&#xA;&lt;li&gt;Arrays&lt;/li&gt;&#xA;&lt;li&gt;Search and Sort&lt;/li&gt;&#xA;&lt;li&gt;Classes with Instance Variables&lt;/li&gt;&#xA;&lt;li&gt;An Array Instance Variable&lt;/li&gt;&#xA;&lt;li&gt;Two Dimensional Arrays&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-24T14:05:36.973" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2910" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T14:42:55.820" Score="2" Body="&lt;p&gt;The first resource I give to students is this one: &lt;a href=&quot;https://try.github.io/levels/1/challenges/1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://try.github.io/levels/1/challenges/1&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've heard great things about &lt;a href=&quot;http://patchwork.github.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Github Patchwork&lt;/a&gt; - a mentored workshop for beginners.  You may want to look into this for your students if that makes sense for your situation.  At the bottom of the Patchwork site, you will find some additional guides and resources.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-24T14:42:55.820" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2911" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T14:51:50.850" Score="5" Body="&lt;p&gt;I suspect in the US it is a generational issue. A 22 year old woman graduating in 1984 would have been born in 1962 to parents who belonged to the &lt;a href=&quot;https://en.wikipedia.org/wiki/Silent_Generation&quot; rel=&quot;noreferrer&quot;&gt;Silent Generation&lt;/a&gt;. A 22 year old woman graduating in 1988 have parents who were &lt;a href=&quot;https://en.wikipedia.org/wiki/Baby_boomers&quot; rel=&quot;noreferrer&quot;&gt;Babyboomers&lt;/a&gt;. These two generations have vastly different values, and they raised their children with a different set of values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I look at the graph, it seems like Engineering and CS follow a similar trajectory, with Engineering not reaching a peak as high as that of CS, but still peaking around 84, then showing a declining interest. Perhaps these fields were not viewed as &quot;feminine&quot; by those raised by baby boomer parents, and unintentionally imbuing young women and men with gender roles making young men more inclined to like CS. In contrast, silent generation would be less likely to view CS with a gender stereotype; instead they would view it as a good or bad career for their children, with less regard for whether CS was &quot;feminine&quot; enough for their little girls.  As a child of Baby boomers myself, I certainly could spot the difference in children of parents born in the early 1950's and the children those born in the late 1930's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the children of boomers - Gen X - become parents and their children are entering University, we might see this change. Somehow, though, it seems unlikely considering that many engineering and CS undergrads are international students anyways.&lt;/p&gt;&#xA;" OwnerUserId="2173" LastEditorUserId="150" LastEditDate="2017-07-24T15:53:50.070" LastActivityDate="2017-07-24T15:53:50.070" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2912" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T15:38:46.417" Score="18" Body="&lt;p&gt;First, realize that you can't learn everything about Git all at once. Learn the basics to get you going. Learn the other commands as needed. Practice a lot. Git is &lt;em&gt;awesome&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that you learn Git from the terminal. That will build an appreciation for the IDE plugins and GUIs later. Plus, it's helpful to understand what's going on under the hood. Here is a good interactive Git &lt;a href=&quot;https://try.github.io/levels/1/challenges/1&quot; rel=&quot;noreferrer&quot;&gt;tutorial&lt;/a&gt;. Here's another, more comprehensive &lt;a href=&quot;https://www.atlassian.com/git/tutorials&quot; rel=&quot;noreferrer&quot;&gt;one&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download a Git client for Windows here: &lt;a href=&quot;https://git-scm.com/&quot; rel=&quot;noreferrer&quot;&gt;https://git-scm.com/&lt;/a&gt; . This will give you a light bash terminal that you're already familiar with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Mac&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try a Git command from a Mac terminal. It will prompt you to install Git (if needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Gnu/Linux&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of distros come with git. To install on any Debian based system, such as Ubuntu type &lt;code&gt;sudo apt-get install git&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What's really going on?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a great video on what's really going on in Git. I highly recommend it: &lt;a href=&quot;https://maryrosecook.com/blog/post/git-from-the-inside-out-talk&quot; rel=&quot;noreferrer&quot;&gt;https://maryrosecook.com/blog/post/git-from-the-inside-out-talk&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Connecting to GitHub, Bitbucket, etc.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Soon, you'll want to connect your computer to a Git server. These instructions will help you create a local, public SSH key that you can paste into your GitHub, Bitbucket accounts. This will give you access to your remote repos. By the way, you can create &lt;em&gt;free&lt;/em&gt; accounts at &lt;a href=&quot;https://github.com/&quot; rel=&quot;noreferrer&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://bitbucket.org/product&quot; rel=&quot;noreferrer&quot;&gt;Bitbucket&lt;/a&gt;, or &lt;a href=&quot;https://gitlab.com/users/sign_in&quot; rel=&quot;noreferrer&quot;&gt;GitLab&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastEditorUserId="58" LastEditDate="2017-07-25T00:42:56.837" LastActivityDate="2017-07-25T00:42:56.837" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2913" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T15:38:51.833" Score="3" Body="&lt;p&gt;I learned by using StackOverflow and just by being thrown into it. As others have stated using GitHub through an IDE or Desktop version is much easier than the command line. Later on I also found &lt;a href=&quot;https://www.codecademy.com/learn/learn-git&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Codecademy git tutorial&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer this method of teaching because its hands on, teaches the user how to use the command line and commands. It also helps with plenty of reference and information as you try these commands in a &quot;live&quot; like environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After I learned how to use Git and GitHub I found the above source and it really solidified my knowledge and I hope it does the same for you.&lt;/p&gt;&#xA;" OwnerUserId="2180" LastEditorUserId="58" LastEditDate="2017-12-13T01:25:58.253" LastActivityDate="2017-12-13T01:25:58.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2915" PostTypeId="2" ParentId="2777" CreationDate="2017-07-24T15:46:15.583" Score="3" Body="&lt;p&gt;The AP course that @AlfredThompson referred to is the Mobile CSP course. It's a&#xA;complete College Board-endorsed &lt;a href=&quot;http://course.mobilecsp.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;course&lt;/a&gt; for the new AP CS Principles course and is entirely based on App Inventor.  It comes with a complete set of lessons for students (Creative Commons-licensed) as well as lesson plans and professional development (PD) resources for teachers.  The MobileCSP project has been providing PD for high school teachers throughout the U.S. since 2013 and has now trained around 500 teachers. For more information about the project, see &lt;a href=&quot;http://mobile-csp.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;this site&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2182" LastEditorUserId="150" LastEditDate="2017-07-24T15:49:12.547" LastActivityDate="2017-07-24T15:49:12.547" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2916" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T15:49:35.370" Score="4" Body="&lt;p&gt;&lt;em&gt;Pure ordering&lt;/em&gt; should be dictated by how you intend to interconnect the ideas. For instance, I use arrays as a motivating example for &lt;code&gt;for&lt;/code&gt; loops, so it makes sense to introduce arrays to my students before &lt;code&gt;for&lt;/code&gt; statements.  Think about segues, motivating examples, and lab assignments, and a sensible order should emerge on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions of &lt;em&gt;what to include&lt;/em&gt;, however, are not so simple.  Your major curricular goals now become central considerations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The curriculum you've shown us looks like a pretty reasonable objects-last approach to beginning Java.  I do agree with you that arrays are pretty fundamental, though, particularly when utilizing an objects-last approach, as they are the only tool prior to objects that allow you to deal with variable amounts of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one additional red flag (for me) that you may want to mention to the instructor. Nowhere in your write-up is a discussion of mutability, with all of the cognitive traps that it brings. Mutability is often the &lt;em&gt;secret trap&lt;/em&gt; that kids fall into, because &lt;code&gt;x = x + 1&lt;/code&gt; is not a sensible algebraic statement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is not specifically discussed, beginning programmers will take what they know about equality and apply it in an ad-hoc manner to code. Sometimes they get it right, sometimes they get it wrong, and there may be little consistency, &lt;em&gt;even with the same student&lt;/em&gt; from one moment to another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is because, if mutability is not explicitly taught, folks just kind of drift &lt;em&gt;between&lt;/em&gt; all of the contradictory ideas about &lt;code&gt;=&lt;/code&gt; that start to float around in their minds, fuzzing from one idea to another, without any fully concrete sense of what it really is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This notion has been discussed already fairly extensively on this site (such as  my write-up &lt;a href=&quot;https://cseducators.stackexchange.com/a/345/27&quot;&gt;here&lt;/a&gt;, or this question &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1300/how-do-i-teach-math-equality-vs-cs-assignment-vs-cs-equality-logic-operat&quot;&gt;here&lt;/a&gt;.) If you don't call attention to the idea of &lt;code&gt;=&lt;/code&gt; as an &lt;em&gt;operation&lt;/em&gt;, very different from the declaritive $=$ that kids know from math, they may never dig back out if that hole.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-24T15:49:35.370" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2917" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T16:24:00.380" Score="1" Body="&lt;p&gt;When I was in my final year of university I threw together a quick Git cheat sheet for some fellow students I was working with who were struggling with basic use of Git. The cheatsheet is available as a &lt;a href=&quot;https://bitbucket.org/snippets/robb-gosset/xKzKa/git-cheat-sheet&quot; rel=&quot;nofollow noreferrer&quot;&gt;bitbucket snippet&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that Atlassian has a freely available git gui client for Mac and Windows called &lt;a href=&quot;https://www.sourcetreeapp.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;sourcetree&lt;/a&gt;, I've found it pretty intuitive to learn and use. Following on from that there's another tool called &lt;a href=&quot;http://www.syntevo.com/smartgit/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SmartGit&lt;/a&gt; which is freely available for non-commercial use and runs on all major operating systems (Win, Mac, Linux). This is an incredibly powerful git tool which gives you access to most of the functionality that Git offers, however it is a proprietary piece of software which you have to pay for if you want to use it for commercial purposes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I get by using the console commands for 99% of my work, the only time I break out a GUI is when I mess up and need to roll back changes, or for doing other complex operations.&lt;/p&gt;&#xA;" OwnerUserId="1123" LastEditorUserId="204" LastEditDate="2017-07-24T21:14:07.290" LastActivityDate="2017-07-24T21:14:07.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2918" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T16:42:44.583" Score="4" Body="&lt;p&gt;I remember initially struggling with Git.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My main problem (and I'm sure I'm not the only one) was not understanding what the various operations actually &lt;em&gt;did&lt;/em&gt; to the DAG, blindly typing obscure commands instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that &lt;strong&gt;if you think in terms of the DAG&lt;/strong&gt;, you will be able to master git very quickly, and even make sense of some apparently unintuitive behaviour [*].&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that any tools that help think in terms of the DAG would be helpful -- but I don't know firsthand of any GUI that really shines at this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2921&quot;&gt;FallenNode's answer&lt;/a&gt; gives you the gem that is &lt;a href=&quot;http://learngitbranching.js.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;LearnGitBranching&lt;/a&gt;, which serves this very purpose. I can't recommend it enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll go against other answers and suggest that the command line is good enough for a beginner, &lt;em&gt;if&lt;/em&gt; you take the time to understand what the commands do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;git-cola&lt;/code&gt; is a super lightweight GUI, free as in speech, almost certainly shipped by your distro, that you might find useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Useful resources:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://try.github.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://try.github.io&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://git-scm.com/book&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://git-scm.com/book&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://nvie.com/posts/a-successful-git-branching-model/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://nvie.com/posts/a-successful-git-branching-model/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;[*] &lt;em&gt;I'll give just one such example:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;git cherry-pick nameofsomebranch&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;But&quot;, &lt;em&gt;you say,&lt;/em&gt; &quot;I thought that you could cherry-pick commits, not branches.&quot;&#xA;&lt;em&gt;Why this works (and what it does!) is left as an exercise ;)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="757" LastEditorUserId="757" LastEditDate="2017-12-14T06:25:21.660" LastActivityDate="2017-12-14T06:25:21.660" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2919" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T17:28:55.227" Score="14" Body="&lt;h1&gt;1) Use the built-in Git GUI&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Git actually includes a &lt;a href=&quot;https://git-scm.com/docs/git-gui&quot; rel=&quot;noreferrer&quot;&gt;built-in user interface&lt;/a&gt; known as git-gui which is great for novices learning Git for the first time.&lt;/strong&gt; It's fairly simple to use, comes &lt;a href=&quot;https://git-scm.com/downloads&quot; rel=&quot;noreferrer&quot;&gt;standard with Git&lt;/a&gt;, and is available on Windows, Mac OS X, and Gnu/Linux.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Git-gui has a very simple interface that &lt;strong&gt;visually displays&lt;/strong&gt; the process of staging files, creating commits, viewing project history, amending the last commit, creating branches, local merging, fetching/pushing to remote repositories. &lt;strong&gt;It also includes easy access to Git Bash in your command line of choice&lt;/strong&gt; for more advanced commands or, more commonly, manually correcting any errors that may occur. (And let's be honest, that happens a lot when using Git)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I like most about Git GUI is that, since it comes as a built-in feature of Git, &lt;strong&gt;it doesn't make any attempts to oversimplify or obfuscate the process&lt;/strong&gt;. Each action can be easily understood as a standard git command.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://git-scm.com/downloads&quot; rel=&quot;noreferrer&quot;&gt;Download Git for Windows/Mac/Linux/Solaris&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/AJtMd.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/AJtMd.png&quot; alt=&quot;Git Gui screenshot&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;2) Contribute to an existing project&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I first learned Git because I wanted to contribute to the &lt;a href=&quot;https://github.com/dolphin-emu&quot; rel=&quot;noreferrer&quot;&gt;Dolphin Emulator&lt;/a&gt;. It was a program I used very often to play my favorite games, and was something I wanted to see actively grow. I ended up joining the project's IRC chat room, which was filled with friendly developers willing to lend me a helping hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having a project backed backed by a group of passionate developers really helped me contribute and learn, because I had a well-managed project which set my standards high not just for Git, but for how any team-project should be organized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, &lt;a href=&quot;https://github.com/explore&quot; rel=&quot;noreferrer&quot;&gt;find a project you are passionate about&lt;/a&gt; on GitHub, setup the code to run locally on your own PC, and don't be afraid to ask for help on any issues that come up along the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;No contribution is too small, &lt;a href=&quot;https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3154&quot; rel=&quot;noreferrer&quot;&gt;even if it's just changing the wording for a single menu option&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1091" LastEditorUserId="1091" LastEditDate="2017-12-06T23:23:49.313" LastActivityDate="2017-12-06T23:23:49.313" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2920" PostTypeId="2" ParentId="19" CreationDate="2017-07-24T18:10:17.047" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What features of the Processing language lend themselves to an introductory course?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In a nutshell: Processing makes it easy to create visual, animated, interactive (read: fun and engaging) programs without all of the boilerplate code that other languages require.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here's a full executable Processing program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ellipse(50, 50, 25, 25);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This program will show a window that displays a circle. Students can very easily change the parameters to see what happens. Can they draw a smaller circle? Can they move it left or right? This allows you to pretty easily talk about functions and parameters, as well as pointing them to other functions in the reference. In pretty much no time at all, you can have them looking stuff up in the reference to draw a scene or a character.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a slightly more advanced program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void setup(){&#xA;  size(500, 500);&#xA;}&#xA;&#xA;void draw(){&#xA;   ellipse(mouseX, mouseY, 25, 25);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This program shows a 500x500 window, and 60 times per second it draws a circle wherever the mouse is. This allows users to &quot;draw&quot; with the trail left by the circles. This leads you to pretty easily talk about stuff like &lt;code&gt;if&lt;/code&gt; statements and user input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These programs are much more engaging than the typical hello world programs of other languages. Think about all the boilerplate code that you'd need in Java or JavaScript to get a window with a 60 fps draw loop and user input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Processing also lends itself to &quot;graduating&quot; to other languages pretty easily. It's built on top of Java, so it leads to developing &quot;pure Java&quot; or even using Processing as a Java library. And it can be deployed as JavaScript using Processing.js, which leads to developing HTML and JavaScript (which circles back to developing P5.js).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other than that, I love the community built around Processing: it's geared more towards artistic and creative coding, and makes an effort to be inclusive and welcoming to novices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I've written a series of tutorials on Processing available at &lt;a href=&quot;http://HappyCoding.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;HappyCoding.io&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-24T18:10:17.047" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2921" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T18:12:06.670" Score="52" Body="&lt;p&gt;I highly recommend this tutorial: &lt;a href=&quot;http://learngitbranching.js.org/&quot; rel=&quot;noreferrer&quot;&gt;http://learngitbranching.js.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It uses a visual representation of the internal state combined with actual commands in a sandbox environment along with a step by step walk-through that I found really helpful in wrapping my head around what each command actually did when I was new to Git.&lt;/p&gt;&#xA;" OwnerUserId="1485" LastActivityDate="2017-07-24T18:12:06.670" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2922" PostTypeId="2" ParentId="583" CreationDate="2017-07-24T18:34:53.820" Score="1" Body="&lt;p&gt;The best tutorial on pass-by-value vs pass-by-reference I've seen is &lt;a href=&quot;http://www.javaranch.com/campfire/StoryCups.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cup Size -- a story about variables&lt;/a&gt; and its follow up &lt;a href=&quot;http://javaranch.com/campfire/StoryPassBy.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pass-by-Value Please&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These talk about variables as cups that can hold different items, and references as remote controls that you can put in a cup. You can have two remote controls in two cups that control the same TV, and replacing one of the remote controls with another one that controls a different TV doesn't affect the first TV at all.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-07-24T18:34:53.820" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2923" PostTypeId="2" ParentId="2845" CreationDate="2017-07-24T19:13:06.960" Score="2" Body="&lt;p&gt;For a general introductory course, the answer is &lt;strong&gt;mostly practical&lt;/strong&gt;.&#xA;High level concepts are abstract and difficult to grasp. Low level concepts may appeal to the strong math student, but can be a road block to the average student. I see value in focusing on code that students can write and run and see  results. This is more likely to hook them and encourage the students to want to learn more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, we cannot avoid the low level concepts and CS is all about layers of abstraction, so we cannot honestly give students an introduction to this field without hitting bits, bytes, and abstraction. Students in an intro class should see the practical value of understanding bits and bytes. These are terms used in consumer products and data plans; my students appreciate learning what a megabyte is and how much information it can store. I don't get many &quot;when will I ever need this?&quot; questions.&lt;/p&gt;&#xA;" OwnerUserId="2197" LastActivityDate="2017-07-24T19:13:06.960" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2924" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T20:06:22.330" Score="3" Body="&lt;p&gt;If you're an unofficial TA, why are you the one coming up with the curriculum? Anyway, my review is inline:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;introduction and simple printing of text&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I wouldn't limit this to printing text. I would frame it as a lesson on &lt;strong&gt;calling functions&lt;/strong&gt;. Printing text is one example. Showing a simple dialog box is another example. Come up with a list of basic functions, and get them into the habit of looking stuff up in that list. Basically you're training them to look stuff up in &lt;a href=&quot;https://docs.oracle.com/javase/8/docs/api/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Java API&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Simple Eclipse console Input\Output and user input (print what the user inputs etc.) as well as variables (just primitives, and just int,double,char and String).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I would absolutely not start them out in Eclipse. Start them out with a basic text editor and the command line. They need to understand what the compiler is doing, and how their code is being run. Eclipse is great for advanced coding, but it hides way too much of the fundamentals to start out in.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Mathematical operators: +,-,*,/ as well as %. The curriculum has an option to teach increment as well as +=, -= and the rest.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Make sure you teach these in an engaging way. Have them write programs that play simple math games like higher-lower or the subtraction game.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Conditionals: if, if\else and nested ifs. Also boolean is introduced.&#xA;switch-case. Not much to say about this at this level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Boolean needs to come before &lt;code&gt;if&lt;/code&gt; statements.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Math library. This is one of the things that caused me to doubt the order of things in the curriculum.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I don't know why you need to treat this as a separate thing. Include it in the &amp;quot;mini-reference&amp;quot; that you give them on the first day.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;for loops and various uses. Arrays are not taught in the curriculum at all&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The use cases for &lt;code&gt;for&lt;/code&gt; loops in a command-line environment are not very engaging, but if you're stuck with &amp;quot;pure Java&amp;quot; then I guess that's a problem you're going to have throughout the course.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;while loops.&lt;/p&gt;&#xA;&lt;p&gt;Nested loops.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You should teach nesting as soon as possible, as it's always a point of confusion. Start with nested &lt;code&gt;if&lt;/code&gt; statements above.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;functions. yes, functions&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Not sure why you're saying &amp;quot;yes, functions&amp;quot; here, but this is a reasonable thing to include. I would maybe go a step further and try to get to creating classes.&lt;/p&gt;&#xA;&lt;p&gt;Here is the order I suggested in my answer to the related &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt; question:&lt;/p&gt;&#xA;&lt;p&gt;Instead of using &amp;quot;pure Java&amp;quot;, I would use a language called &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, which is built on top of Java (and can be used as a Java library) and allows you to create visual, animated programs without any boilerplate code.&lt;/p&gt;&#xA;&lt;p&gt;Even if you can't use Processing, here's the order I would talk about topics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Calling Functions&lt;/li&gt;&#xA;&lt;li&gt;Using Variables&lt;/li&gt;&#xA;&lt;li&gt;Creating Variables&lt;/li&gt;&#xA;&lt;li&gt;Creating Functions&lt;/li&gt;&#xA;&lt;li&gt;Debugging&lt;/li&gt;&#xA;&lt;li&gt;If Statements&lt;/li&gt;&#xA;&lt;li&gt;Animation&lt;/li&gt;&#xA;&lt;li&gt;For Loops&lt;/li&gt;&#xA;&lt;li&gt;Arrays&lt;/li&gt;&#xA;&lt;li&gt;User Input&lt;/li&gt;&#xA;&lt;li&gt;Using Objects&lt;/li&gt;&#xA;&lt;li&gt;Creating Classes&lt;/li&gt;&#xA;&lt;li&gt;ArrayLists&lt;/li&gt;&#xA;&lt;li&gt;Images&lt;/li&gt;&#xA;&lt;li&gt;Libraries&lt;/li&gt;&#xA;&lt;li&gt;Deploying your code&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These topics can be covered in Java, albeit with a ton more boilerplate code than if you used Processing.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-25T16:41:40.750" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2925" PostTypeId="2" ParentId="2903" CreationDate="2017-07-24T20:17:00.143" Score="3" Body="&lt;p&gt;Consider that the best way to teach Java might not be to teach Java (at first). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For several programming languages (those that were not designed for pedagogy/teaching), starting with a teaching language or environment, and segueing later to the more arcane/abstract coding syntax, might be the easier path, and leave less students out in the cold (or typing magic incantations with near zero understanding).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-07-24T20:17:00.143" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2926" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T20:17:16.043" Score="-1" Body="&lt;p&gt;The real reason is more about the social issues: if you are a smart girl (or a smart boy) the rest see you as something bad (nerd, stuck up or other things), but it is worse for girls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you see at home also makes a difference: my mother had a job and she said that I did not need to take crap from any man, so I am the biggest nerd in the planet (and proud of it).  &lt;/p&gt;&#xA;" OwnerUserId="2200" LastEditorUserId="919" LastEditDate="2017-07-24T20:23:45.337" LastActivityDate="2017-07-24T20:23:45.337" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2927" PostTypeId="2" ParentId="1106" CreationDate="2017-07-24T20:32:32.903" Score="3" Body="&lt;p&gt;The OpenHatch wiki has &lt;a href=&quot;http://wiki.openhatch.org/Open_Source_Comes_to_Campus/Curriculum/Finding_a_Project&quot; rel=&quot;nofollow noreferrer&quot;&gt;an excellent article on finding an Open Source project&lt;/a&gt;. I summarize their recommended process here:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step 1: Brainstorming Projects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Make a list of potential projects by doing some searches inspired by the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What open source software do you use? Consider that software and related projects.&lt;/li&gt;&#xA;&lt;li&gt;Is there a project whose goals you find compelling? For instance, humanitarian projects or projects relating to a hobby or field of interest.&lt;/li&gt;&#xA;&lt;li&gt;Are there any people you know who work on open source projects? Maybe you can join them. &lt;/li&gt;&#xA;&lt;li&gt;Check out curated lists, like the &lt;a href=&quot;https://summerofcode.withgoogle.com/organizations/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Summer of Code mentoring projects&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Step 2: Researching Projects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now look up key information about each potential project:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;website url &lt;/li&gt;&#xA;&lt;li&gt;source repository url &lt;/li&gt;&#xA;&lt;li&gt;mailing list &lt;/li&gt;&#xA;&lt;li&gt;IRC channel&lt;/li&gt;&#xA;&lt;li&gt;contributor guide &lt;/li&gt;&#xA;&lt;li&gt;installation guide&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Step 3: Evaluating Projects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Use that information to evaluate the project:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Is this project active?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When was the last issue reported?  &lt;/li&gt;&#xA;&lt;li&gt;When was the last commit?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;How responsive are the maintainers?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How long does it take a maintainer to respond to an issue?&lt;/li&gt;&#xA;&lt;li&gt;Is the maintainer giving feedback on pull requests and helping people submit appropriate requests?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Is the community welcoming?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read through their mailing list archives, or lurk on their IRC channel to see how newcomers are treated. &lt;/li&gt;&#xA;&lt;li&gt;When people have questions, are they answered patiently or ignored? &lt;/li&gt;&#xA;&lt;li&gt;Check out a Code of Conduct, if the project is large enough. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Step 4: Contacting Projects&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;At this point you probably have a favorite project or two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Say hello on the IRC channel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them you're new to the community and interested in contributing. You can ask:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What do they like about the project? How long have they been involved?&lt;/li&gt;&#xA;&lt;li&gt;Are there any issues that people are especially keen to see being worked on?&lt;/li&gt;&#xA;&lt;li&gt;Is there anything particularly complicated or difficult that might be an obstacle to contributing? How would they suggest dealing with that?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Find an issue you might want to tackle or a bug to reproduce&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read through the project's issue tracker. If you find an issue you'd like to work on, leave a comment on the thread saying you'd like to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also leave a comment on the tracker about reproducing a bug. Make sure to include relevant information about the version of the project you're using, the system you're on, and other potential factors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A final word from OpenHatch:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A quick note: you might wonder why we asked you to find multiple&#xA;  projects. The truth is that finding a good open source project is a&#xA;  lot like dating or finding a job. It often doesn't work out on the&#xA;  first try. That doesn't mean you're a bad contributor or that the&#xA;  project is a bad project - it may just be a bad fit, or bad timing. So&#xA;  keep an open mind, and keep trying projects until you find one that&#xA;  you really enjoy contributing to.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-07-24T20:32:32.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2928" PostTypeId="2" ParentId="2875" CreationDate="2017-07-24T20:39:44.930" Score="4" Body="&lt;p&gt;The fall in CS degrees seems to match a rise in women getting degrees in business, psychology, science, and biology, which might be due to a higher proportional interest in those fields.  Easier to use personal computers, which arrived in 1984 to '86 timeframe, and which could help solve problems in those other fields might have made those other fields more attractive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That would also be about the time the tail end of the post-war &quot;baby boom&quot; would be graduating.  Perhaps the youngest siblings in that demographic, or later those from smaller families, have different personalities leading to different interests (in careers, etc.) than first borns and older siblings in larger families raised during that boom.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-07-24T20:48:23.750" LastActivityDate="2017-07-24T20:48:23.750" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2929" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T21:00:28.617" Score="2" Body="&lt;p&gt;There are a few cornerstones to master to establish a good foundation for understanding and using Git.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of git is to control the history and versions of text files. There are two main problems, cooperative writing and controlling edits. E-mailing zip files is terribly inefficient. Edit/Undo is quite limited (no branching) in Microsoft Word or a typical editor - but with Git you get to create different versions as snapshots in time, edit features independently, rollback edits, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Inner Workings&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This need not be excessive. The fundamental building block here is the text file 'diff'. Then it is understanding a commit is just a node on a tree where the nodes are connected via diff's. Branches just point towards a commit. This is simple model to understand git.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Visualization&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When working with git, you can get lost. For reassurance on what actions to take, a quick look at the history is incredibly helpful. This need not necessitate a GUI, in fact I recommend terminal. Add these aliases to your ~/.gitconfig for help visualizing the source.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[alias]&#xA;    lol = log --graph --decorate --pretty=oneline --abbrev-commit&#xA;    lola = log --graph --decorate --pretty=oneline --abbrev-commit --all&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;By fostering these fundamentals, the only thing between novice and expert is experience.&lt;/p&gt;&#xA;" OwnerUserId="2176" LastActivityDate="2017-07-24T21:00:28.617" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2930" PostTypeId="2" ParentId="2897" CreationDate="2017-07-24T22:06:57.020" Score="5" Body="&lt;h2&gt;Help students make improvements to a toy website with git &amp;amp; Github&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have taught git and Github basics with &lt;a href=&quot;http://wiki.openhatch.org/Open_Source_Comes_to_Campus/Practicing_Git&quot; rel=&quot;noreferrer&quot;&gt;this activity from OpenHatch&lt;/a&gt;. It was successful for helping students learn git basics: clone, add, commit, push, and pull, as well as Github basics: making an account and repo, submitting an issue, and making a pull request.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the activity, small groups work to improve a small website housed in &lt;a href=&quot;https://github.com/openhatch/github-website-editing-demo&quot; rel=&quot;noreferrer&quot;&gt;a Github repo&lt;/a&gt;. The site is also hosted on Github, so they can see changes immediately. &lt;a href=&quot;https://github.com/openhatch/github-website-editing-demo/issues&quot; rel=&quot;noreferrer&quot;&gt;Issues are available in the repo&lt;/a&gt; for students to claim and then work on. Students really see the difference between running the site locally and seeing the version hosted on Github.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It requires some setup before hand, since students interface with a real Github repo. But it's worth it, since students get to use git in a realistic way (and so they have contextualized knowledge!). Another bonus is that no specific programming language is required, since students can modify text in HTML to complete tasks, or hack some javascript for the most advanced tasks.&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="2045" LastEditDate="2017-07-24T22:54:25.427" LastActivityDate="2017-07-24T22:54:25.427" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2931" PostTypeId="5" CreationDate="2017-07-24T22:27:13.953" Score="0" Body="&lt;p&gt;Women and minorities are not well represented in CS and other technical fields in the US and in some other countries. It isn't universal, however. While some may believe that this is due to some inherent trait, there is no evidence of this and a lot of contrary evidence. Anyone can succeed in any field if given a proper (welcoming and supportive) environment. The problem is serious and long-standing in the US. It is also, unfortunately, self enforcing. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2018-05-31T14:32:08.650" LastActivityDate="2018-05-31T14:32:08.650" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2932" PostTypeId="4" CreationDate="2017-07-24T22:27:13.953" Score="0" Body="Diversity Gap refers to the fact that in some countries with a diverse population, such as the US, certain groups, especially minorities, but also women, are not represented equally in CS education, nor in the workplace. Use this tag for questions relating to how educators can overcome this gap. " OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2018-05-31T14:32:08.650" LastActivityDate="2018-05-31T14:32:08.650" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2933" PostTypeId="1" CreationDate="2017-07-25T00:20:12.833" Score="13" ViewCount="509" Body="&lt;p&gt;I'm currently preparing to teach a course on data structures and algorithms. In my past experiences helping teach similar courses, I've noticed that many students find it challenging to &quot;hold multiple layers of abstraction&quot; in their head. This problem manifests in several different ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students find it challenging to transition from working on assignments where they need to implement only one or two classes to larger projects involving multiple, interlocking classes.&lt;/li&gt;&#xA;&lt;li&gt;Students find it challenging to understand in full detail how more complex data structures work.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To help make this more concrete, I'll pick a specific lesson/assignment I'm developing: having students implement a hashmap with separate chaining as a part of a larger project (in Java).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to successfully implement just the hashmap, students need to understand that the hashmap has several different &quot;layers&quot; of abstraction.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The Map abstract data type (ADT): in particular, understanding the difference between the ADT and this particular implementation.&lt;/li&gt;&#xA;&lt;li&gt;The key: understand what it means for a key to be hashable (both in general and within Java).&lt;/li&gt;&#xA;&lt;li&gt;The hashmap internals: understanding what we do with hashed keys, resizing strategies, etc.&lt;/li&gt;&#xA;&lt;li&gt;The chain: Understand that the chain can again be abstracted (we can use any map other then a hashmap for the chain).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;And of course, once they're done, students need to successfully use the data structures they've written to complete some other task which might have even more layers of abstraction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I want students to develop the ability to selectively &quot;abstract&quot; and ignore different parts of a project when implementing something to reduce mental overhead. Some students seem to intuitively grok this idea but others instead try and hold the entire data structure (or project!) in their head, have a compulsive need to read &lt;em&gt;all&lt;/em&gt; instructor provided code, etc, and quickly become overwhelmed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this particular case, I've observed students seem prone to becoming confused by where the hashing logic lives, or losing sight of what the map ADT is asking them to implement in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of this is certainly solvable by just explaining hashmap more effectively, but my core question is this: &lt;strong&gt;What are some strategies for helping students become more comfortable working with multiple layers of abstraction? How can I help students develop the meta-skill of being comfortable with abstraction?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd welcome answers discuss potential strategies in context of this hashmap example as well as answers that address the more general question.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-25T13:01:58.243" LastActivityDate="2017-07-28T16:52:57.877" Title="How to teach students to work with multiple layers of abstraction?" Tags="|undergraduate|data-structure|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2934" PostTypeId="2" ParentId="2933" CreationDate="2017-07-25T04:54:51.713" Score="4" Body="&lt;p&gt;Trial and error, as well as practice, are usually the best way to get students to be comfortable with &lt;em&gt;anything&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;All&quot; you have to do is give them time and plenty of opportunities to use multiple layers of abstraction. They will find it difficult at first, but after a while they'll become noticeably better at it, and eventually they would be quite ok with using many levels of abstraction. They'll develop that mindset by trial and error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With all trial and error, a system of feedback is needed (to know when a trial is an error). You are their system, in the beginning. At first, you have to guide them very closely, only by giving feedback on their work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is crucial. If you don't give feedback, then it might as well be &quot;error and error&quot; (in their eyes). If you give too much feedback then they might not develop the wanted mindset, or worse, they would be confused about abstraction even more, setting them back even further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you're task is twofold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Give them as many opportunities to work on such abstractions&lt;/li&gt;&#xA;&lt;li&gt;At first, you have to give them the right amount of feedback on their work.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's not easy, but it's a good way to get students to develop this skill\mindset on their own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added bonus: You can go over this process with them (i.e. literally explain to them what it is that you did to get them to develop this mindset) and tell them that this method can be used to learn any skillset, and the important bit is the feedback in the beginning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By feedback, I am referring to actual code review. Give them feedback based on their work. Don't be too harsh, but don't be too forgiving. I cannot say exactly how lenient you should be, but you can let intuition guide you, seeing as you know the students better than I do ;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whilst giving feedback, remember that you are trying to get them comfortable with abstraction. In that spirit, give very positive feedback for good use of abstractions and multiple levels of it. Don't focus on other design problems you might spot, because that might confuse the students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This feedback shouldn't be expressed in grades. Better to give, as I said, an actual code review, focusing on the abstractions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for not being too forgiving: If you spot a severe abstraction problem (something that might throw runtime exceptions because the abstraction isn't abstract enough, and special cases break the abstract system), then point out what sort of special cases might cause the abstraction to crumble&lt;sup&gt;1&lt;/sup&gt;. This gets the students into the mindset of making things as abstract as possible, and only dealing with concepts. The more, the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, encourage them to give it a try. For some, the word &lt;em&gt;abstraction&lt;/em&gt; might sound threatening. At first it might be, and that's ok. As they work with it more and more (trial and error), they'll be more comfortable with it.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;If it can &lt;em&gt;crumble&lt;/em&gt; then it was neither concrete enough, nor abstract enough. It's a pun...&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-25T15:43:18.850" LastActivityDate="2017-07-25T15:43:18.850" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2935" PostTypeId="2" ParentId="2933" CreationDate="2017-07-25T09:00:03.483" Score="8" Body="&lt;h2&gt;Link to real life&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;“Who has came to school by bicycle?”&lt;br/&gt;&#xA;“OK so we need to know how to make a bicycle”&lt;br/&gt;&#xA;“What time did you get up? It must have taken a long time to build the bicycle?”&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take it to the limit; be absurd. So the pupils tell you “You don't need to know all this to get to school.” Agree with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;“Any one here ever fix a bicycle?” — “yes”&lt;br/&gt;&#xA;“So you have to fix it every time you ride?” — “no”&lt;br/&gt;&#xA;“But you do have to think about how it work, the inner tubes, the oil, the gears, every time you ride it, right?” — “no”&lt;br/&gt;&#xA;“Why not?”&lt;br/&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Link to past experience, in subject&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;“Now what about a &lt;code&gt;print&lt;/code&gt; statement, we need to know how that work to be able to use it, right?” — “no”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;“So over the next few days/week we are going to be looking at a more complex system than before. We can not hold it in your head all at the same time. So I am going to ask you to do what the professionals do: don't try to remember/understand it all at the same time. We only need to understand ‘how’ for the bit we are working on. It is enough to understand ‘what’ for the bits that this uses”&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This is only the 1st draft of an idea, and not tried with a class.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-26T08:16:42.043" LastActivityDate="2017-07-26T08:16:42.043" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2936" PostTypeId="2" ParentId="2875" CreationDate="2017-07-25T10:00:01.223" Score="-1" Body="&lt;p&gt;Very likely due to the influence of Grace Hopper.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;1964: Hopper was awarded the Society of Women Engineers Achievement Award, the Society’s highest honor, “In recognition of her significant contributions to the burgeoning computer industry as an engineering manager and originator of automatic programming systems.”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;1969: Hopper was awarded the inaugural Data Processing Management Association Man of the Year award (now called the Distinguished Information Sciences Award).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Likely young women reaching college age at about 1984 would have heard of her and been inspired by her example in years previous. After about then she was no longer making the news, so fewer signed up. This is only speculation of course!&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;1971: The annual Grace Murray Hopper Award for Outstanding Young Computer Professionals was established in 1971 by the Association for Computing Machinery.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;1973: First American and the first woman of any nationality to be made a Distinguished Fellow of the British Computer Society.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Taken from Wikipedia.&lt;/p&gt;&#xA;" OwnerUserId="2232" LastEditorUserId="150" LastEditDate="2017-07-25T20:17:45.897" LastActivityDate="2017-07-25T20:17:45.897" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2939" PostTypeId="2" ParentId="2897" CreationDate="2017-07-25T12:50:00.770" Score="6" Body="&lt;p&gt;Oh, you're almost exactly like I was about a year ago. I understood simple version control, and had a good handle on mercurial (thanks to &lt;a href=&quot;http://hginit.com/&quot; rel=&quot;noreferrer&quot;&gt;http://hginit.com/&lt;/a&gt;). I had even convinced my then company and manager to switch from CVS to mercurial, so handling a DVCS wasn't really the issue. But for whatever reason I could not wrap my head around git. And then I wound up at another position where I was in the role of agitating for an improved version control system, and git was the only other option and I had to learn. And the absolute best resource I found for understanding git at a conceptual level was &lt;a href=&quot;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0ahUKEwi_noz9uKTVAhUlxoMKHWfSCWcQyCkIKDAA&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1ffBJ4sVUb4&amp;amp;usg=AFQjCNGtT3vLapyMNS-6a3Fl7fEVTaRlJw&quot; rel=&quot;noreferrer&quot;&gt;Git for Ages 4 and Up&lt;/a&gt; a roughly 1 and a half hour video that used tinker toys to explain git. That video was what finally started making things click for me. From there playing around in the command line and poking through some of the tutorials others have linked made a lot more sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a good understanding of how a linked list data structure works at a low level, I found it helps to think of a git repository like a big linked list of your code at various states. And branches, tags and all the other stuff that goes with it are pointers to those states in the list. Using git is all about manipulating those pointers. But watch that video, it's probably the best &quot;intro to how git works&quot; I've ever come across and doesn't delve too deep into any specifics of the implementation at the time, so even though it's a few years old now, it's still plenty relevant. Lastly, I would recommend if you're already comfortable with the command line that you use the command line while you're learning, and only use GUI tools to show you a visual state of the repository. Understanding the individual commands makes some of the abstractions that the GUI tools use less confusing.&lt;/p&gt;&#xA;" OwnerUserId="2238" LastActivityDate="2017-07-25T12:50:00.770" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2940" PostTypeId="2" ParentId="2875" CreationDate="2017-07-25T14:02:58.500" Score="5" Body="&lt;p&gt;As computer science degrees began to turn into software engineering careers the programs began to take on the culture and workstyle of engineering programs. Unfortunately this often means women &lt;a href=&quot;http://news.mit.edu/2016/why-do-women-leave-engineering-0615&quot; rel=&quot;noreferrer&quot;&gt;face gender stereotypes and marginalizing behavior&lt;/a&gt; at the hands of their peers. I believe this is why efforts to improve enrollment for women in these programs continues to fail and women who graduate with engineering degrees will leave or never enter the field.&lt;/p&gt;&#xA;" OwnerUserId="2244" LastActivityDate="2017-07-25T14:02:58.500" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2941" PostTypeId="2" ParentId="2875" CreationDate="2017-07-25T16:09:23.923" Score="4" Body="&lt;p&gt;There is one thing this graph is assuming and is certainly glossed over in the all of the answers is that a Computer Science degree has not meant the same thing at all over the years and may in fact have different meanings depending at what school that degree is earned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example: I was enrolled at SDSM&amp;amp;T back in 1989 as a CS major.  But, their idea of Computer Science stemmed from an Electrical Engineer perspective.  Programming seemed to be only an afterthought and only in support of teaching physical AND/OR gates at it's most basic level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fast forward a few years and a CS degree seems to imply programmer and not chip level engineer.&lt;/p&gt;&#xA;" OwnerUserId="2248" LastActivityDate="2017-07-25T16:09:23.923" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2942" PostTypeId="1" AcceptedAnswerId="2972" CreationDate="2017-07-25T17:41:44.613" Score="12" ViewCount="701" Body="&lt;p&gt;As shown by the following graph, the percentage of U.S. college students earning bachelor's degrees in CS peaked in 1986, with the percent of freshmen planning to major in CS peaking for the classes of 1986 and 1987.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/g4JYi.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/g4JYi.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why was there a precipitous fall after these years? As always, claims should be backed by data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question is relevant to CS departments planning to understand and plan for changes in enrollment. This question is related to, but different from, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2875/why-did-the-percentage-of-cs-bachelors-degrees-going-to-women-peak-in-1984&quot;&gt;this question about gender distribution of CS majors&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-25T20:07:16.117" LastActivityDate="2017-08-08T20:03:10.350" Title="Why did interest in CS majors plummet in the United States after the mid-80s?" Tags="|student-motivation|social-context|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2943" PostTypeId="2" ParentId="2875" CreationDate="2017-07-25T21:39:48.457" Score="0" Body="&lt;p&gt;This is less of an answer, since we don't have enough data to hypothesize. However, we do see that the total number of applicants decrease, and begin to rebound for men.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question may not be why it decreases for women, but why does it increase for men?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, we have to evaluate the other opportunities women of the time would have had. Were there any significant changes in financial aid? Was there a disparity after 1984 or a trend incentivising women to go into other fields?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe shouldn't be so quick to assume that women were suddenly disinterested or disadvantaged. &lt;/p&gt;&#xA;" OwnerUserId="2260" LastActivityDate="2017-07-25T21:39:48.457" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2944" PostTypeId="2" ParentId="2933" CreationDate="2017-07-26T00:10:21.620" Score="3" Body="&lt;p&gt;tl;dr Build the layers with appropriate scaffolding, either top-down or bottom-up.&lt;/p&gt;&#xA;&lt;p&gt;The goal is to understand an abstraction layer architecture. The teaching method is to have students build it layer by layer.&lt;/p&gt;&#xA;&lt;p&gt;Here is a suggestion that you can adapt to quite a few situations, though it takes some work as well as some consideration of tradeoffs. The basic idea is that the students implement all of the levels of the abstraction stack in sequence starting either at the top or the bottom. I'll assume you are programming in Java. It translates pretty directly into similar languages, but with more work for dissimilar languages.&lt;/p&gt;&#xA;&lt;p&gt;Envision, a three layer stack. In practice it could have any number of layers, but three is enough to show the strategy. I'll call the three layers&lt;/p&gt;&#xA;&lt;h2&gt;The Abstraction Layer Model&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Attic&lt;/li&gt;&#xA;&lt;li&gt;The Main Floor&lt;/li&gt;&#xA;&lt;li&gt;The Basement&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The Basement is the lowest level, most concrete layer and the Attic is the highest layer. The Attic might represent a true API intended for others to use (such as the Map interface) and the Basement is a low-level, even physical layer, perhaps. In practice, The Basement provides services to the layer above through a set of public methods. The Main Floor is written in terms of services provided by the Basement and itself provides services to the layer above via its own public methods.&lt;/p&gt;&#xA;&lt;p&gt;You can work either top-down or bottom-up. However, before you can take advantage of this teaching strategy you need to build some scaffolding for the students to use. How much you have to do depends on whether you work top-down or bottom-up.&lt;/p&gt;&#xA;&lt;h2&gt;Advantages and Disadvantages of Top-Down&lt;/h2&gt;&#xA;&lt;p&gt;To work top-down, students build first the Attic with the Basement coming last.&lt;/p&gt;&#xA;&lt;p&gt;If your students work from the top down it will be easier for them to understand the reasons for doing all this work, since the services that they are building are at a level that they might find useful in their work. The lower levels, though in reality more concrete, are more opaque since they aren't normally visible to the programmer directly.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand you actually need to do more work yourself for this as the normal Java tools don't give you as much support. I'll explain below.&lt;/p&gt;&#xA;&lt;h2&gt;Advantages and Disadvantages of Bottom-Up&lt;/h2&gt;&#xA;&lt;p&gt;To work bottom-up the students will build the Basement layer first and the Attic last.&lt;/p&gt;&#xA;&lt;p&gt;The advantage of this is that normal unit testing tools (JUnit) make it easy for you to provide the required scaffolding.&lt;/p&gt;&#xA;&lt;p&gt;However, the students may find this less satisfying as the things they will build at the beginning may not be as obviously useful. This is mitigated by showing them how the parts will eventually fit together before they start. They need some overview information.&lt;/p&gt;&#xA;&lt;h2&gt;Building Bottom-Up&lt;/h2&gt;&#xA;&lt;p&gt;To have the students build the Basement layer, simply decide on the interface between that layer and the Main Floor. These are the services that the Basement layer must implement. Use JUnit to write tests against this interface, simulating the Main Floor, sending known values to the Basement Services and making assertions about the values returned.&lt;/p&gt;&#xA;&lt;p&gt;Students then build the Basement and make those tests pass. Make the test suite public so that they can write their own tests, however. Everything is open and available for inspection.&lt;/p&gt;&#xA;&lt;p&gt;The Basement Layer may consist of several classes, some, perhaps, unrelated to others at the same level. For example, in a hash map, the actual Hasher might be at this level but the storage mechanism might be independent. You will need tests for each of the services, perhaps distributed over the classes.&lt;/p&gt;&#xA;&lt;p&gt;Once the Basement is built, do the same for the next level up. Create the interface between the Attic and the Main Floor in JUnit and then have the students implement the Main Floor, providing those services, but using services of the Basement layer they already built.&lt;/p&gt;&#xA;&lt;p&gt;To build the Attic, just repeat. The public API of the whole system is given a test suite and the students build the Attic using services of the Main Floor.&lt;/p&gt;&#xA;&lt;h2&gt;Building Top-Down&lt;/h2&gt;&#xA;&lt;p&gt;Building Top-Down requires more work since JUnit isn't available, though you may be able to find some Stub Testing tools.&lt;/p&gt;&#xA;&lt;p&gt;The basic idea is that you first define the interface between one layer and the one below and then provide a &lt;em&gt;Stub&lt;/em&gt; (set of) class(es) that implement that interface but accept known values and return known values when services are required of it.&lt;/p&gt;&#xA;&lt;p&gt;To build the Attic, then, when the Main Floor doesn't yet exist, first develop the interface between the two. You then give them a Stub that they can use in writing the Attic. They will need to use the services of the Main Floor, but instead will be writing against the Stub's services with well known behavior.&lt;/p&gt;&#xA;&lt;p&gt;When they are ready to write the Main Floor, give students a Basement Stub to that provides the services that the Main floor needs but using well determined &amp;quot;test&amp;quot; values.&lt;/p&gt;&#xA;&lt;p&gt;Finally the Basement layer is written without additional stubbing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt; to avoid chaos when a stub is replaced by the actual layer code it will be essential that you &lt;em&gt;also&lt;/em&gt; have a sufficient test suite in JUnit so that you know that what arrives at the outermost level actually makes sense.&lt;/p&gt;&#xA;&lt;p&gt;Note that some development environments, such as Eclipse, will create a stub class for a given interface (or set of interfaces). The stub will have methods that ignore arguments and produce default values. You can tailor these, of course.&lt;/p&gt;&#xA;&lt;h2&gt;Caveats and Advice&lt;/h2&gt;&#xA;&lt;p&gt;Note that in both of these methods as described above, the instructor is the one who defines the interface between layers. This lessens the work of the student, of course, but is in some ways less satisfying. One can, instead, have group discussions in which the instructor leads the class to the development of the interfaces (actual Java interfaces) that form the boundaries between the layers. If you use this method, you will need to build your infrastructure after this discussion, but it may be little more than renaming things you built earlier in preparation. However, these class discussions also give you a way to talk about the layer separation.&lt;/p&gt;&#xA;&lt;p&gt;And note that large software systems with such an architecture are often built this way with different teams working on the different layers, with someone like an architect defining the boundary APIs. And not again, that in some such situations, with many layers, efficiency dictates at some point that intermediate layers might be combined or eliminated. But, for teaching this initially don't permit that or your students may wind up building a &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_ball_of_mud&quot; rel=&quot;nofollow noreferrer&quot;&gt;Big Ball of Mud&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;CF: &lt;a href=&quot;https://en.wikipedia.org/wiki/Test_stub&quot; rel=&quot;nofollow noreferrer&quot;&gt;Test Stub&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Mock_object&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mock Object&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;An Example&lt;/h2&gt;&#xA;&lt;p&gt;If you do the above on a sophisticated problem (building a hash map) it could take up a fair amount of class/exercise time. If you want to do it in about one class period, here is an example.&lt;/p&gt;&#xA;&lt;p&gt;The Attic provides a service that produces the means of collections of random numbers with a given distribution; say Binomial. It calls &amp;quot;down&amp;quot; to get the collections.&lt;/p&gt;&#xA;&lt;p&gt;The Main Floor produces the collections themselves when asked. The collection could be represented by, say, an Iterator.&lt;/p&gt;&#xA;&lt;p&gt;The Basement produces a single value from the required distribution. It could even provide services for several distributions: Uniform, Binomial, ...&lt;/p&gt;&#xA;&lt;p&gt;Other variations are possible. The attic, could, for example, provide the collection as a sorted list, rather than just a statistic about it. You can also add other intermediate layers, of course.&lt;/p&gt;&#xA;&lt;p&gt;Note that each layer here is pretty trivial to build. Beware that you don't give the impression that all such uses have this property. Also note that what we really have here is akin to a Unix pipe, simply because it is so simple.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-26T10:29:04.163" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2945" PostTypeId="2" ParentId="2942" CreationDate="2017-07-26T01:11:06.483" Score="11" Body="&lt;p&gt;The Atari VCS game E.T. came out in December 1982, which led to the start of &lt;a href=&quot;https://en.wikipedia.org/wiki/North_American_video_game_crash_of_1983&quot; rel=&quot;nofollow noreferrer&quot;&gt;North American video game crash of 1983&lt;/a&gt;, the end of a video game software industry boom.  That market fell from 3.2B to perhaps 100M (in U.S. dollars) in just a couple years. Programmers were being laid off in droves.  Boxed software was being sent to landfill. Software and computer startups were starved for capital, or went under.  Game software developers lost much of their temporary &quot;rock star&quot; status.  That business event may have discouraged lots of kids from picking or sticking with a major where employment would have to come from a visibly crashed job market.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The dot-com stock market crash of 2000 (which also led to a vast number of computer industry related job lay-offs) probably had a similar effect on CS graduations after 2003.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just after the '83 video game crash, easier-to-use personal computers (Mac, Amiga, Wintel, et.al.) were being introduced, which may have allowed end-user (business, science, etc.) productivity to increase faster than the number of software jobs previously required to support that productivity, thus making alternate (non CS) careers possibly more valuable, or more interesting to students, than CS related ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added: The steep rise starting near 1980 is coincident with the PR leading into and through the IPO of Apple Computer (et.al.).  Computer magazines were becoming thick with ads.  Lots of kids wanted to either become a personal computer start-up company stock option millionaire, or at least work for one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Added: The Netscape IPO (and PR about the millionaire programmers it created) in late '95 looks like it was a just a few years before a similar steep rise in CS graduation rates.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-08-08T20:03:10.350" LastActivityDate="2017-08-08T20:03:10.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2946" PostTypeId="1" CreationDate="2017-07-26T02:57:15.390" Score="6" ViewCount="191" Body="&lt;p&gt;I find javascript to be a very pretty and neat language, once you understand how everything fits into a larger structure, which takes a lot of time and experience to understand. For many who haven't seen this inner beauty (for example, many of my JS students), they notice all kinds of &quot;language quirks&quot;, which you can find enumerated all over the internet:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;&quot;           ==   &quot;0&quot;           // false&#xA;0            ==   &quot;&quot;            // true&#xA;0            ==   &quot;0&quot;           // true&#xA;false        ==   &quot;false&quot;       // false&#xA;false        ==   &quot;0&quot;           // true&#xA;false        ==   undefined     // false&#xA;false        ==   null          // false&#xA;null         ==   undefined     // true&#xA;&quot; \t\r\n&quot;    ==   0             // true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://bonsaiden.github.io/JavaScript-Garden/#types.equality&quot; rel=&quot;nofollow noreferrer&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every language has its quirks (although few are as famous as JS in that regard), so what are some ways you've found effective to get students to focus on larger concepts instead of getting hung up on language quirks?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="283" LastEditDate="2017-07-26T17:11:39.340" LastActivityDate="2017-07-27T21:23:49.060" Title="Working around language quirks" Tags="|conceptual-frameworks|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2947" PostTypeId="2" ParentId="2946" CreationDate="2017-07-26T03:19:38.123" Score="3" Body="&lt;p&gt;In essence, you have two choices.  You can embrace the quirks, or you can hand-wave them away.&lt;/p&gt;&#xA;&lt;h1&gt;Embrace&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;&amp;quot;Now, take a look at this code. What do you think it will do? Let's check it ou--- whoa!  What in the world just happened?  Turn to your neighbor and see if you can figure out what's going on.&amp;quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Give them a moment to get their thoughts outlined, and then have them come back, and together discuss what is actually happening.&lt;/p&gt;&#xA;&lt;h1&gt;Dismiss&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;&amp;quot;So, you may want to be careful to avoid doing X.  For now, I recommend that you stick with Y.  X isn't wrong, but it has some unexpectedly complex behaviors, and we don't have time to go into them.  If you want to see for yourself when X is better, Google is absolutely available to you!  For the purposes of our assignments, however, I can promise you that you won't need it to be successful.&amp;quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1&gt;How to choose?&lt;/h1&gt;&#xA;&lt;p&gt;The main characteristic that I use to choose when to do a deep dive and when to skip it is by looking at whether the deep dive will support the goals of my class.  If it will give us a chance to practice using concepts that are important to the overall goals, then I will usually take the time to dive in.  Otherwise, I will probably skip it.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-26T03:19:38.123" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2948" PostTypeId="2" ParentId="2897" CreationDate="2017-07-26T04:39:12.520" Score="2" Body="&lt;p&gt;I learned Git several years ago by reading &lt;a href=&quot;https://git-scm.com/book/en/v2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pro Git&lt;/a&gt;. I found that the first three chapters contain about 90% of what I use on typical projects. The rest is just gravy if you want to dig into more details. All of its examples are command-line and use Linux conventions. Since the Windows version of Git comes with Git Bash, this is not a problem. Most documentation will use the same terminology as the command-line tools, so learning them is crucial. Learning the command-line also helps in understanding GUI tools as well.&lt;/p&gt;&#xA;" OwnerUserId="1591" LastActivityDate="2017-07-26T04:39:12.520" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2949" PostTypeId="2" ParentId="2946" CreationDate="2017-07-26T04:49:36.523" Score="2" Body="&lt;p&gt;If you don't want the students to get hung up on the language quirks for the language you are teaching, there are probably many ways to &quot;work around&quot; them. If you don't want the students to get hung up on the language quirks for the next language they have to use, either in school or out, and when you are not there to help, then you've really only got one choice. Teach them to understand &lt;em&gt;why&lt;/em&gt; the quirks exist, and what is happening &quot;behind the scenes&quot; that makes them &quot;work.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;Embrace&lt;/strong&gt; option given in the &lt;a href=&quot;https://cseducators.stackexchange.com/a/2947/104&quot;&gt;answer&lt;/a&gt; by &lt;a href=&quot;https://cseducators.stackexchange.com/users/27/ben-i&quot;&gt;Ben I.&lt;/a&gt; is a good example of how to do that. Show the &quot;unexpected&quot; behavior, then lead them on a path of discovery to explain the anomaly just observed. By discovering it they will &lt;em&gt;own&lt;/em&gt; it, and be better able to discover the reasons for other anomalies when they are encountered elsewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By taking the &lt;strong&gt;Embrace&lt;/strong&gt; route you are not only teaching the language in use at the time, you are also helping the students to develop reasoning skills. Skills that will help them reach their potential in whatever direction life takes them. A good Computer Science program &lt;em&gt;can&lt;/em&gt; teach programming, in one language or another, as well as other computer science pathways. It can also teach, and hone, reasoning and analytic skills that are useful in many fields that are totally unrelated to computers, or even science. This is one of the common reasons (not the only, nor necessarily the main reason) that many schools, and school systems, have introduced Computer Science programs to their curriculum. Don't waste the opportunity to help your students develop those valuable skills by side-stepping, or hand-waving away, the quirks, which make such wonderful &quot;teaching moments.&quot;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-26T04:49:36.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2951" PostTypeId="2" ParentId="2946" CreationDate="2017-07-26T06:49:18.243" Score="6" Body="&lt;p&gt;One strategy that's sort of similar to the &quot;embrace&quot; strategy described in the other answers is &quot;acknowledge&quot; -- not only do you explore the quirk, you explicitly acknowledge that it's a flaw or mistake in the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all, languages are designed by humans, and humans are ultimately fallible creatures: I think it's ok to acknowledge in some cases that the language designers messed up, or were working under assumptions and constraints that are no longer relevant today. This lets you work in teaching moments about:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The importance of planning and the realities of software maintenance/backwards compatibility&lt;/li&gt;&#xA;&lt;li&gt;The fact that everybody makes mistakes and its ok&lt;/li&gt;&#xA;&lt;li&gt;Demonstrate what balanced technical criticism looks like (as opposed to the annoying sort of &quot;language fanboyism&quot; some students seem to pick up) &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can then amp back up the enthusiasm after you've moved past the quirk and returned to the actual content to help emphasize what you ultimately think is important and worth focusing on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To return back to your original question, I think whether or not you actually discuss quirks or brush over them depends on to what degree the quirks impact your students' ability to successfully write code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, take the &lt;code&gt;a == b&lt;/code&gt; vs &lt;code&gt;a === b&lt;/code&gt; thing in JavaScript. I would argue that sort of quirk is ultimately irrelevant in the grand scheme of things: the &quot;always use &lt;code&gt;a === b&lt;/code&gt;&quot; rule is almost always what you want, so I would probably spend only a minute or so talking about the quirk (I'd probably spend most of that minute cracking jokes about JS, honestly), finish by mandating students must always use &lt;code&gt;a === b&lt;/code&gt;, then move on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other cases, trying to paper over or ignore quirks would be irresponsible. One example of this might be JavaScript's Byzantium rules on how exactly the &lt;code&gt;this&lt;/code&gt; keyword is scoped. This issue actually does come up fairly frequently in practice (especially once you start mixing together object-oriented and functional style code), so is something you probably do actually need to cover in some detail -- at the very least, you need to give students a good set of rules of thumb they can apply. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another example might be &lt;code&gt;a == b&lt;/code&gt; vs &lt;code&gt;a.equals(b)&lt;/code&gt; in Java -- this distinction strikes at the core of several fundamental Java topics and so must probably be taught in detail at some point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are unfortunately some quirks that fall into a middle ground: not so easily brushed aside, but not really worth spending time explaining (for example, the broken interaction between Java arrays and generics). In those cases, it might be worth just engineering your homework assignments so students simply never run into those quirks, or just writing that portion of the assignment for them, with comments for the curious.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-07-26T17:24:00.437" LastActivityDate="2017-07-26T17:24:00.437" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2952" PostTypeId="2" ParentId="2875" CreationDate="2017-07-26T06:49:52.197" Score="4" Body="&lt;p&gt;I suspect that it mostly has to do with 2 peculiarities of the era.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Computer training programs which started ending in the early 80's (recession and layoffs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Training in touch typing aka &quot;business&quot; classes in high school making computers &quot;women's work&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Through the late 70's into the early 80's, there simply weren't enough people of any gender to fill all the new computer roles.  So, companies like Westinghouse and Penelec (that I have first-hand knowledge of--but it applied to most companies of reasonable size) were basically paying for any warm body who wished to train on computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were a man, these new &quot;computer&quot; jobs probably weren't much of a step up.  Working at Bethlehem Steel probably paid better.  However, for a bunch of women who had been relegated to secretarial or factory floor support roles which effectively had little career path, these computer jobs were very much an improvement.  In addition, most computer jobs had a typing component, and practically all women coming out of high school went through at least one course which included typing.  This is something that men of the era would also regard as &quot;women's work&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The recession clobbered a lot of businesses in 1981, so they killed all their training programs that were feeding women into computers.  Of course, once the steel mills took a beating at the same time, these &quot;computer&quot; jobs didn't look so bad to the men anymore, either, so they started entering into the field from the bottom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, roughly 4 years after 1980/1981 (the amount of time to complete a CS degree), you see women peak and then it starts to decline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please do remember, though, that recessions were a bit more &quot;phased&quot; in the days before Internet time.  Different sectors went down at different times.  This is as opposed to now where a recession hits everything effectively simultaneously.&lt;/p&gt;&#xA;" OwnerUserId="2273" LastActivityDate="2017-07-26T06:49:52.197" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2953" PostTypeId="1" CreationDate="2017-07-26T08:04:23.047" Score="5" ViewCount="1042" Body="&lt;p&gt;After learning recursion in class, students take a test (a few lessons for teaching the subject, and then a test), and are then given a grade. The test is on paper, and I can't change that fact.&lt;br&gt;&#xA;All tests are written on paper, but the questions on the test are subject to changes, and those are the changes being asked about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These students are in a CS major in High School.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides asking them to write recursive functions for a variety of purposes (tree traversal\search etc.), their knowledge is also tested by asking them to trace by hand (on paper, without a computer) a given recursive function (usually one that does string manipulations).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static int permutation(String prefix, String str){&#xA;    int n = str.length();&#xA;    if (n == 0) {&#xA;        System.out.println(prefix);&#xA;        return 1;&#xA;    }&#xA;    else {&#xA;        int sum=0;&#xA;        for (int i = 0; i &amp;lt; n; i++)&#xA;            sum+=permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));&#xA;        return sum;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and it is called in some &lt;code&gt;main&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static void main(String[] args) {&#xA;    System.out.println(permutation(&quot;&quot;, &quot;abcde&quot;));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is an example for how their tracing should look like (this image is not related to the permutation example above, but it serves to explain how they trace the recursion)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/FwMn5.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/FwMn5.png&quot; alt=&quot;recursive tracing&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They essentially trace the call stack (and they know this; they know that effectively that's what they are doing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I have some doubts about this method of testing (specifically the tracing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, would testing students like this be useful? By that I mean: does it actually indicate understanding of recursion and\or increase their ability to understand recursive functions they see?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not, then how else can their knowledge of recursion be tested in a written test?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tests are given because that's how the students are taught:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;They study a subject (in this case, recursion)&lt;/li&gt;&#xA;&lt;li&gt;they are tested on that subject.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's no bigger goal, no project that they use it in (yet). They learn it because it's part of the curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Clarification&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question isn't about teaching recursion, nor is it about the specific example I gave. It's about whether the described test method (on an exam) would actually be able to test the students' knowledge about recursion.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-26T16:46:18.797" LastActivityDate="2017-07-26T16:46:18.797" Title="Testing students on recursion - tracing by hand" Tags="|secondary-education|grading|recursion|exams|" AnswerCount="2" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="2954" PostTypeId="2" ParentId="2946" CreationDate="2017-07-26T09:00:08.510" Score="1" Body="&lt;p&gt;In Bertrand Myers book/course (I have only read the book) “Touch of Class”, he deals with this, by first teaching a language with few quirks (Eiffel). Then at the end of the course/book, after all of the concepts have been learnt, he teaches C♯, Java, C and C++, by teaching how to translate Eiffel code into each of these. It is at this point that he would cover the quirks of the languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He has claimed that it is quicker to teach Eiffel then all 4 of the other languages at the end, than it is to teach any one of them from the start.&#xA;Unfortunately I can not give testimony to this, as I already knew C, C++, and several other languages by the time I learnt Eiffel. However I now realise that I did not truly know C++, until I first learnt Eiffel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore first &lt;strong&gt;avoid&lt;/strong&gt;, by using a better language such as Eiffel, and then &lt;strong&gt;embrace&lt;/strong&gt; by teaching how the other language(s) relate to Eiffel. (&lt;em&gt;See other answers on how to embrace.&lt;/em&gt;)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-26T09:00:08.510" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2955" PostTypeId="2" ParentId="2953" CreationDate="2017-07-26T09:30:00.317" Score="4" Body="&lt;h2&gt;No&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This may be a good way to test understanding of function calls, and the stack. However I don't think it helps much with recursion. As when we design we need to abstract. To do this we need to be able to think without having to keep all of the detail in our heads. We need to focus only on externally visible behaviour, not internal details.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Yes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Having said that. I think it could be useful to look at the stack, if we are considering the consequences of different algorithms, and recursion patterns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example both of your examples, the recursion only reduces by one. Therefore the recursion depth is O(n). If you do not have tail-call optimisation then this could lead to a stack-overflow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nether of you examples would allow for tail-call optimisation: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The first is not linearly-recursive, but as long as the input data is small, would not be a problem. &lt;/li&gt;&#xA;&lt;li&gt;The 2nd, has all of the complexity in the return path, and in practice n could be very high. This would be a problem. This example could be rewritten to allow for tail-call optimisation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: Java, C#, Python … do not have tail call optimisation (I heard Java may now have it for direct recursion). C, and C++ may have it (gcc does). Scheme and all functional languages do have it. If your language does not have it. Then a tail-call recursive function can be re-written using the trampoline pattern. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-26T09:30:00.317" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="2956" PostTypeId="2" ParentId="2953" CreationDate="2017-07-26T13:11:38.223" Score="0" Body="&lt;p&gt;Tracing helps students really understand what's happening in the recursive calls. It's also an important tool for when they develop their own recursive functions. If it helps to trace regular function calls, then it helps to trace recursive ones too.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-26T13:11:38.223" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2957" PostTypeId="2" ParentId="2946" CreationDate="2017-07-26T13:18:42.350" Score="1" Body="&lt;p&gt;It depends on the programming level of the students. In my case, students are just starting out with Java. I tell them to ignore the quirks and multiple ways of doing things (e.g., adding 1 to an int var). Find a way the works and go with it. Then discover the different ways as you progress with the language. These students are new to basic programming concepts and problem solving. Language syntax shouldn't stand in their way.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2017-07-26T13:18:42.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2958" PostTypeId="1" AcceptedAnswerId="2960" CreationDate="2017-07-26T18:14:43.830" Score="7" ViewCount="557" Body="&lt;p&gt;When mentioning operator precedence for AND / OR, I explained it wrongly. I re-explained it properly using the idea of &lt;em&gt;binding&lt;/em&gt;: the operator &quot;binds tightly&quot; to the two expressions immediately on either side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My incorrect explanation was based on me thinking of a complex expression as a tree, with AND as the root. For example, this fake expression:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;expr1 OR expr2 AND expr3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;behaves as if there are parentheses around &lt;code&gt;expr2 AND expr3&lt;/code&gt;, but the &quot;tree view of precedence&quot; with AND being &quot;more&quot; would put the parentheses around the OR expression. I didn't explain my wrong idea to the students, but it is an error that I sometimes make in my thinking - it makes sense to me!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way of explaining precedence to avoid this ambiguity than to say &lt;strong&gt;&quot;it binds tightly&quot;&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I encountered this when teaching SQL, but the question is not really about Boolean operators or Math, it is about Precedence in general as implemented in many languages. (If I had been showing a math example I would have unconsciously followed the rules of Algebra, but Booleans are not as common in my life.) A common synonym for Precedence is &quot;Order Of Operations&quot;, but in SQL there is not supposed to be an 'order'. This is especially so with Booleans, because they just yield T/F and so there is no sense of left-to-right or anything.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-07-26T19:19:52.200" LastActivityDate="2017-09-10T12:23:46.930" Title="Avoiding confusion about precedence" Tags="|teaching-analogy|mathematics|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="2959" PostTypeId="2" ParentId="2958" CreationDate="2017-07-26T18:36:17.937" Score="4" Body="&lt;p&gt;You can use an analogy of priority queues (maybe a hospital, if it isn't too gruesome; perhaps a queue for ordering work tasks)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A nurse doesn't need a patient to have some indicator that they are supposed to be treated before some other patients (these indicators are the parenthesis). There's simply a known treatment order, based on the urgency of the treatment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all patients need equally urgent treatment, then they are treated according to the order of their appearances (the ones who &quot;check in&quot; first are the ones treated first).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nurses know how urgent a new patient's treatment is, and so does the compiler. For java, it goes like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;1. postfix    expr++ expr--&#xA;2. unary  ++expr --expr +expr -expr ~ !&#xA;3. multiplicative * / %&#xA;4. additive   + -&#xA;5. shift  &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&#xA;6. relational &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= instanceof&#xA;7. equality   == !=&#xA;8. bitwise AND    &amp;amp;&#xA;9. bitwise exclusive OR   ^&#xA;10. bitwise inclusive OR  |&#xA;11. logical AND   &amp;amp;&amp;amp;&#xA;12. logical OR    ||&#xA;13. ternary   ? :&#xA;14. assignment    = += -= *= /= %= &amp;amp;= ^= |= &amp;lt;&amp;lt;= &amp;gt;&amp;gt;= &amp;gt;&amp;gt;&amp;gt;=&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(Taken from &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Oracle Docs&lt;/a&gt;, numbering is mine. Originally has table)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In effect, the function and member call are before all other operators. So &lt;code&gt;.&lt;/code&gt; is of precedence &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The nurse (compiler) knows in which order to actually treat (execute\write to bytecode) the various levels or urgency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different languages might have different ordering, but the analogy of a nurse ordering the treatment based on urgency would still hold. In the example you gave, it's more &quot;urgent&quot; to deal with the &lt;code&gt;AND&lt;/code&gt; than it is with &lt;code&gt;OR&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in SQL, some operators are dealt with before others. Some operators require expressions on both sides, and some don't (select only needs from the right, while AND needs from both sides).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-26T19:37:00.990" LastActivityDate="2017-07-26T19:37:00.990" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2960" PostTypeId="2" ParentId="2958" CreationDate="2017-07-26T18:39:36.630" Score="5" Body="&lt;p&gt;Actually, your tree explanation is fine, except that it is the low precedence operators closer to the root. In Java, the &quot;.&quot; operator is the strongest/highest and the assignment operators are the lowest precedence. The arithmetic operators are all higher precedence (bind tighter) than the booleans, with &amp;amp;&amp;amp; having higher precedence than ||&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A semi-official list is here: &lt;a href=&quot;http://operator-precedence.com/java&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://operator-precedence.com/java&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact many compilers will translate an expression (the entire program, in fact) into a tree structure either explicitly or implicitly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, &quot;binding tightly&quot; is pretty traditional for an explanation also. The scope of an operator is limited by the end of the expression or the occurrence of a &lt;em&gt;lower&lt;/em&gt; precedence operator. Therefore the RHS of the OR in your example is the end of the expression, but the LHS of the AND is bounded by the OR operator. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the tree explanation work from lower to higher. In the &quot;binding tightly&quot; work from the higher to the lower precedence operator. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Odd historical note: To a logician, AND is logical &quot;multiplication&quot; and OR is logical &quot;addition&quot;, hence the typical relationship in programming languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, Pascal took that idea a bit too far and OR had the same precedence as addition with AND having the same precedence as multiplication, requiring parentheses in many more expressions than you would like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, having to write things explicitly in a programming language is usually a good thing as it lessens the likelihood of an oversight error. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-26T20:29:10.540" LastActivityDate="2017-07-26T20:29:10.540" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2961" PostTypeId="2" ParentId="2958" CreationDate="2017-07-26T21:39:09.647" Score="3" Body="&lt;p&gt;1st remind pupils of BIDMAS, they learn this is arithmetic class, around the age of 11years old. Though in programming it is usually BIMDAS. Though this only makes a difference when there are rounding errors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching boolean algebra, use a+b (or), a.b (and), as opposed to a∨b (or), a∧b (and). The second makes much more sense when relating boolean logic to set theory. However the first makes more sense when relating to algebra. The precedence is the same. All of the algebraic manipulations are the same, except 1+1=1. Now show that all of the rules in the book can be derived from these. Back this up by creating truth tables. Then practice. Then add de Morgan’s Theorem. Then practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When mixing logic, and arithmetic or any other complex combination (if you are not 100% sure, Or think that other will not be, or other languages do it differently, or you suspect that the may do, or just because you want to), then use parenthesis.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-27T10:34:12.073" LastActivityDate="2017-07-27T10:34:12.073" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="2963" PostTypeId="2" ParentId="2871" CreationDate="2017-07-27T12:52:52.230" Score="2" Body="&lt;p&gt;SQlite is small and as the name suggest &quot;lite&quot; is great for storing data for mobile applications. Apart from that It can easily be used for other small scale web applications without hiccups (100k or more rows). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The official &lt;a href=&quot;https://developer.android.com/training/basics/data-storage/databases.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;guide&lt;/a&gt; is great. Also checkout the &lt;a href=&quot;https://developer.android.com/reference/android/database/sqlite/package-summary.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;reference&lt;/a&gt; of the sqlite package once you are comfortable with using SQlite.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.vogella.com/tutorials/AndroidSQLite/article.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt;'s a tutorial that provides step-by-step guide. &lt;/li&gt;&#xA;&lt;li&gt;Also the sqlite page have some &lt;a href=&quot;https://www.sqlite.org/android/doc/trunk/www/index.wiki&quot; rel=&quot;nofollow noreferrer&quot;&gt;docs&lt;/a&gt; for Android Bindings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That said, SQlite is one of the most tested(tests are larger than code itself) and have a brilliant code base which makes it very suitable for mobile applications.&lt;/p&gt;&#xA;" OwnerUserId="38" LastActivityDate="2017-07-27T12:52:52.230" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2965" PostTypeId="1" AcceptedAnswerId="2968" CreationDate="2017-07-27T16:35:24.620" Score="22" ViewCount="4717" Body="&lt;p&gt;How do you handle it when you make a mistake while teaching? I used to get confused, stammer, blush, etc. But now I just pause and notice that something is incorrect, then correct it if I can figure it out, or say that I will get back to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2958/avoiding-confusion-about-precedence&quot;&gt;one of my questions&lt;/a&gt; on this site, I said that I taught something wrongly and a student raised a question about it. I stopped and said I would sort it out, but didn't try then to correct it because I wasn't sure why I had made the mistake. The students have a very limited capacity to handle ambiguous or conflicting info while they are learning new things, so I usually try to say only what is essential at the moment. Dijkstra wrote about &quot;the limited size of our skulls&quot; and I mention that frequently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My skull is definitely limited, and I forget more than I know at any given moment. So every year I need to refresh my memory of details. That is why if something doesn't work or I can't recall something then I demonstrate how to find it again or figure it out. Every year the software changes, the textbook is different, I am using different teaching notes or web sites, and on and on, so I am never completely on top of what is about to be shown in class. I used to reprimand myself, try to prepare better, make more notes, try out all the examples first and so on, but really, the workplace (to which they are going) is not a rehearsal, so I am &lt;em&gt;&quot;modeling what I am teaching&quot;&lt;/em&gt;. Maybe I come off as a 'cowboy' sometimes, but I enjoy teaching a lot more than I used to!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;I am a man foolish in heart, dull and confused.&lt;br&gt;&#xA;  Other men are full of light; I alone seem to be in darkness.&lt;br&gt;&#xA;  Other men are alert; I alone am listless.&lt;br&gt;&#xA;  I am unsettled as the ocean, drifting as though I had no stopping-place.&lt;br&gt;&#xA;  All men have their usefulness; I alone am stupid and clownish.&quot;&lt;br&gt;&#xA;  -- The Tao Te Ching of Lao Tzu&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What I really enjoy is figuring out &lt;em&gt;why&lt;/em&gt; I made the mistake and saying that, not to pass blame or even blame myself, but because &lt;em&gt;understanding&lt;/em&gt; is what matters. How do you, by example, teach your students to &quot;learn from others mistakes, because you haven't got time to make them all yourself&quot;?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="27" LastEditDate="2017-07-27T17:49:02.920" LastActivityDate="2017-08-01T13:13:34.500" Title="The Tao of TeaChing (Making Mistakes in Front of the Class)" Tags="|best-practice|teaching-analogy|" AnswerCount="9" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="2966" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T16:46:26.030" Score="22" Body="&lt;p&gt;If I catch it quickly and can easily explain the error, I use it as an example of failing up. &quot;Ooops, look at me, here's my mistake, here's how I can learn from it.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students catch it, and I'm not immediately sure who is right, I make a note to do some research and come back to it in the next class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I don't realize it until class is over, I make sure to correct it the next day so that I don't reinforce a misconception.&lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2017-07-27T16:46:26.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2967" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T17:03:52.490" Score="8" Body="&lt;p&gt;I have been adding: “make lots of mistakes” to my student's lesson objectives. I have been asking “What does it mean when we make a mistake?” [That we are learning. That we are trying hard.] &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When programming: “What strategies can we adopt, to help us when it does not work?”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a pupil asks what angle should the turtle turn to make a triangle. “What angle for a square? Is it bigger or smaller than that? [smaller] Try it? [Oh that went the wrong way]. Try bigger then. [That is still not correct.] Ok so it is bigger than 90 and smaller than 180. Let us write these two numbers here. What could we guess next? (At the end of this, they have done a binary search. Have learnt how mistakes can be used to get where you want to go. And can reuse this strategy, so are more independent.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a merit system, so I always give a +1 to any pupil that spots a mistake I make.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also model programming the may I do it, with lots of mistakes. But lots of testing so that the mistakes are caught early. I don't always present code that is done. There is a creative myth that people create things in one big bang. Where in reality we do lots of tiny steps, and correct at each step. Model this to your students. And explicitly tell them about it. Get a volunteer (preferable one that thinks them do not make mistakes), put a blind fold on them, and get them to walk down a corridor, with out touching the sides. To touch the sides is a mistake. Then discuss why they can do this when their eyes are open. Is it because they 100% avoid deviating, or do they correct errors? &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-27T21:08:55.357" LastActivityDate="2017-07-27T21:08:55.357" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2968" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T17:15:37.263" Score="10" Body="&lt;p&gt;The teaching philosophy I came to as a young teacher (i.e. in my first year) was that I would ground myself in two qualities: passion and humility. (I've since added gratitude as an important third, but that's another topic.) &lt;strong&gt;Humility is essential regardless of the discipline.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teachers are, after all, human. We make mistakes. We forget. We may occasionally forget whether a language uses &lt;code&gt;else if&lt;/code&gt; or &lt;code&gt;elsif&lt;/code&gt; or &lt;code&gt;elif&lt;/code&gt;. The difference for us though is that we also model what it means to be a student. The phrase &quot;life-long learner&quot; is a bit cliche, but it does speak to an important truth: &lt;strong&gt;teachers should always model what it means learn&lt;/strong&gt;. Part of that is showing an innate curiosity and interest with respect to the subject manner. Another aspect is never being okay with resigning oneself to just not knowing something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I make a mistake, I acknowledge it, but I do not stop there. If I err when it comes to, say, operator precedence (&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2958/avoiding-confusion-about-precedence&quot;&gt;a recent topic here&lt;/a&gt;), I do all the research I can to crystallize that concept in mind and re-teach it so that it is just as clear for my students. I want my students to see that as their teacher, I too am always learning. The classroom should be a safe place to fail, to make mistakes, because of the role said failure can play in the learning process. &lt;strong&gt;It's fine to make a mistake; it's not fine to be okay with it.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, one thing that can be meaningful in class is to show old code I have written. When I look back at some of the first CS50 solutions I wrote, I absolutely cringe. However, they can be effective teaching tools since students are beginners as well. Explicitly teaching prior &quot;mistakes&quot; emphasizes the benefit of reflecting on past work and the importance of having a &quot;growth mindset.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: one caveat would be that some things just aren't okay to mistake. For example, a teacher of Java probably should know the difference between &lt;code&gt;System.out.print()&lt;/code&gt; and &lt;code&gt;System.out.println()&lt;/code&gt;. There's a level of basic competence that should be mistake-free, but when it comes to more complicated material or language nuances, then there's a little more freedom I think. Where that line is...there might be a bit of grey.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-27T17:15:37.263" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2969" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T17:35:43.463" Score="14" Body="&lt;p&gt;Mistakes are fine. We are human, we make mistakes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, one of the worst things you can do in teaching is to &lt;em&gt;never&lt;/em&gt; make a mistake and to &lt;em&gt;always&lt;/em&gt; say &lt;em&gt;exactly&lt;/em&gt; the right thing. This is pretty much guaranteed to reduce the fraction of students who actually learn. A lot of things in CS need to be approached from various, more or less accurate, directions, zeroing in on the truth. Since your students learn differently, and likely differently than you, more of them are likely to pick up the thread somewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, the &lt;em&gt;most&lt;/em&gt; valuable thing you can do, at least &lt;em&gt;occasionally&lt;/em&gt; is to work &lt;em&gt;live&lt;/em&gt; in front of your students, stumbling through the forest to find the spring of knowledge. If you always do the right thing, your students will get the impression that everything is &lt;em&gt;supposed to be easy.&lt;/em&gt; But then they ask &lt;em&gt;why am I finding it so hard?&lt;/em&gt;. Working live lets them know that they need to go through this search for truth, not just having it served up to them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you make mistakes, it will seem more natural and expected when they make mistakes, rather than seeing it as some personal failing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the approach you describe is very good, actually. Ack the problem, put in a placeholder, promise to get back and then do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to be a famous teacher, find a way to reward stumper questions from your students. You will probably increase attention and participation in your class. Maybe for a real &quot;head-slapper&quot; everyone gets ten bonus points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, it is also bad if you are &lt;em&gt;never&lt;/em&gt; correct, but you knew that, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-27T17:35:43.463" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="2970" PostTypeId="1" CreationDate="2017-07-27T17:44:37.420" Score="9" ViewCount="290" Body="&lt;p&gt;One unit of CS50 AP's curriculum focuses on three main sorting algorithms: bubble sort, selection sort, and insertion sort. There is also discussion of something more efficient like merge sort. One programming assignment has students write the code in C to each of the three &quot;simpler&quot; sorting algorithms. Students get clear pseudocode of how each works, but they are left to work out the code on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In contrast I just started working through Princeton's excellent Algorithms course on Coursera (&lt;a href=&quot;https://www.coursera.org/learn/algorithms-part1/home&quot; rel=&quot;noreferrer&quot;&gt;Algorithms, Part I&lt;/a&gt;). The first unit there focused on quick find, quick union, and weighted quick union. The algorithms -- both in pseudocode and in Java -- were given by the instructor; the programming assignment (&lt;a href=&quot;http://coursera.cs.princeton.edu/algs4/assignments/percolation.html&quot; rel=&quot;noreferrer&quot;&gt;Percolation&lt;/a&gt;) involved the correct use of weighted quick union. Rather than implement it, I just had to apply it with the provided class &lt;code&gt;WeightedQuickUnionUF&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar to the Princeton course, the AP CS A curriculum teaches sorting algorithms but only use thereof, not direct implementation (e.g. students are not expected on the exam to write insertion sort from memory). Instead, students have to understand it and be able to trace through steps in the sorting process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there seem to be two approaches here (not limited to just sorting algorithms): teaching the challenge of coding an algorithm from scratch (via implementation) vs. giving students the algorithm to apply to a particular problem (via application). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there a significant benefit in having students attempt to implement an algorithm from scratch? If so, is this the more effective approach for teaching?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-07-27T19:25:28.573" LastActivityDate="2017-07-28T13:30:17.640" Title="How to teach algorithms: implementation or application?" Tags="|curriculum-design|algorithms|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2971" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T17:47:47.937" Score="4" Body="&lt;p&gt;In addition to what has already been said, I would point out that my mistakes are an essential part of creating a community of learners. If students point out an issue that I legitimately didn't know about (i.e. not a simple flub), I will get pretty visibly excited. I always thank the student who points the problem out, and address it immediately if I can. If I can't, then I have a few go-to options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Promise to research the issue, and get back to the students at the next class.&lt;/li&gt;&#xA;&lt;li&gt;Ask the student who discovered the issue to research it, and report back with their findings.&lt;/li&gt;&#xA;&lt;li&gt;(If the issue is simultaneously complex and pretty far from the goals of the unit, i.e. a time-sink) acknowledge the mistake, and thank the student, but proceed with something like, &quot;I don't want to go too far afield here. I really want to make sure that you folks come out of this lesson understanding __________, because that's what your test will be on.&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-07-27T17:47:47.937" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2972" PostTypeId="2" ParentId="2942" CreationDate="2017-07-27T18:26:58.643" Score="9" Body="&lt;p&gt;&lt;strong&gt;&lt;em&gt;tl;dr&lt;/em&gt;-&lt;/strong&gt;  That peak around 1986 looks pretty difficult to explain in terms of interest.  After searching a bit, I found &lt;a href=&quot;http://cs.stanford.edu/people/eroberts/CSCapacity.pdf&quot; rel=&quot;noreferrer&quot;&gt;a paper&lt;/a&gt; that attempts to explain it in terms of teaching capacity.  This paper argues that the rapid rise in student interest in the early 1980's flooded Computer Science departments, forcing them to raise entrance standards to avoid being overwhelmed.&lt;/p&gt;&#xA;&lt;p&gt;I'm not 100% sure if this line of reasoning is entirely solid, but presenting it here as a partial answer.  If nothing else, the idea that departments had logistical troubles accommodating a rapid rise in CS students seems to make sense as a contributing factor.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;em&gt;This answer's based on &lt;a href=&quot;http://cs.stanford.edu/people/eroberts/CSCapacity.pdf&quot; rel=&quot;noreferrer&quot;&gt;&amp;quot;A History of Capacity Challenges in Computer Science&amp;quot;&lt;/a&gt; (2016).&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;As we can see in the plot, there's a rapid rise in Computer Science majors until the mid 1980's.  It seems generally agreeable that this followed from computers being an interesting field of study.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The rapid increase in student demand at the beginning of the cycle is easy to explain. The late 1970s and early 1980s saw the introduction of the personal computer, which brought many more people into contact with computing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;However, that dip's really hard to explain.  The cited paper argues:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If one looks closely at the downturn of the 1980s, however, it quickly becomes clear that the reasons for the collapse in student enrollments had nothing at all to do with student interest. Student demand for computer science courses and degrees remained high throughout that period. Students in the mid 1980s did not &lt;em&gt;decide&lt;/em&gt; against majoring in computer science but were instead &lt;em&gt;prohibited&lt;/em&gt; from doing so by departments that lacked the resources to accommodate them.&lt;/p&gt;&#xA;&lt;p&gt;I believe that what happened in the 1980s is best described as a &lt;em&gt;capacity collapse&lt;/em&gt; in which universities and colleges were simply unable to satisfy the growing level of student demand. Departments tried a number of strategies to increase their teaching capacity, including retraining faculty from other disciplines and hiring adjunct faculty from industry. In the end, however, demand overwhelmed capacity, and colleges and&#xA;universities were forced to restrict admission to the computer science major, which gave rise to the subsequent downturn.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Apparently this shortage of teaching capacity led to increasingly difficult entrance requirements:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h3&gt;The collapse and its aftermath&lt;/h3&gt;&#xA;&lt;p&gt;Even though institutions tried many strategies to expand their teaching capacity, they were eventually overrun by the relentless increase in student demand. Although the report from Snowbird 1980 had warned that “limiting or cutting back enrollments would be counterproductive given the societal need manifested in the rising enrollments,” universities and colleges were forced to do just that. Most of those limitations were based on academic performance and were extremely restrictive. At Berkeley in the mid 1980s, for example, only students with a 4.0 GPA were admitted to the major in Electrical Engineering and Computer Science.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;From a systems approach, capacity issues do make some sense for explaining a peak like the one here.  The rapid inflow of students could be allowed since they were filling available capacity; then, once that capacity was taxed and admissions was allowing too many students into the classroom, they'd have had to cut back on allowing new students in.&lt;/p&gt;&#xA;&lt;h3&gt;Helps explain the difference in interest-vs.-achievement&lt;/h3&gt;&#xA;&lt;p&gt;The mid-1980's peak is the basically one place where Freshman interest is higher than degree completion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/g4JYi.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/g4JYi.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This can make sense in the capacity explanation, because interested students would've been less able to achieve a CS degree due to rising entrance requirements.&lt;/p&gt;&#xA;&lt;p&gt;However, it's still strange that student interest drops back below obtainment after that.  If it really was a capacity issue, then maybe students reasoned &amp;quot;&lt;em&gt;CS is too hard&lt;/em&gt;&amp;quot; or &amp;quot;&lt;em&gt;I don't have the grades/background to get into the CS department&lt;/em&gt;&amp;quot;?&lt;/p&gt;&#xA;" OwnerUserId="39" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-27T19:59:20.663" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2973" PostTypeId="2" ParentId="2970" CreationDate="2017-07-27T19:30:49.773" Score="1" Body="&lt;p&gt;Expecting someone to implement a particular sorting algorithm from scratch, is an impossible ask. You are asking them to invent a sorting algorithm, and be lucky that it is the correct one. (Or to already know it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I took in some cards, and asked groups or volunteers to sort them.&#xA;I then asked them to have one person to do the sort, and a 2nd to document what they did. To then write them as instructions (this is pseudo-code). Test and revise them, and then get another group to follow the instructions, to sort some card. After feedback from the other group, to revise and test once more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then looked to see how they did it (What sorting algorithms had they discovered), and give them the names of the algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Latter I would get them to implement some of them in code, using the pseudo-code as a guide.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-27T21:14:14.307" LastActivityDate="2017-07-27T21:14:14.307" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2974" PostTypeId="2" ParentId="2970" CreationDate="2017-07-27T20:40:51.217" Score="3" Body="&lt;p&gt;At one time there was no such option. Working programmers had to implement and re-implement algorithms as part of daily work. That wasn't so long ago, actually. Then the idea of Templates came along and also the development of large standardized template libraries such as the Standard Template Library (STL) of C++ and the java.util library. Today, then, working programmers do different things, for the most part, while utilizing standard solutions.&lt;/p&gt;&#xA;&lt;p&gt;So, the answer, today, is that learning to build every common algorithm (and data structure) is less important than it once was.&lt;/p&gt;&#xA;&lt;h2&gt;However&lt;/h2&gt;&#xA;&lt;p&gt;The library will eventually fail you. Either times change and new algorithms need to be used for new problems, or you start work in a language with a less well developed set of libraries, or ...&lt;/p&gt;&#xA;&lt;p&gt;If you have never built a complex and intricate thing that provides a seemingly simple service, you will be lost. The STL is as intricate and beautiful as a fine Swiss watch. You learn a tremendous amount just from reading (and trying to understand) parts of it. But even more from trying to build a moderately faithful clone.&lt;/p&gt;&#xA;&lt;p&gt;So, a combination approach is probably best. A good algorithms course can now focus more on &lt;em&gt;principles&lt;/em&gt; than implementations. It can also, possibly, spend more time on applications than implementations. But implementations should not be entirely neglected. There are several reasons. Sometimes you need a specialized version of some sort of map, say, for optimization purposes. The building of algorithms and data structures is also just good programming practice in general, such as programming to a given interface and building things that interoperate smoothly with other things.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I would now list Principles, Implementations, and Applications in that order of importance, raising the importance of Principles from what was taught in the past, but with more emphasis on Implementations than Applications. Others might switch the last two and justify it.&lt;/p&gt;&#xA;&lt;p&gt;People don't much build hot-rods anymore as they did when I was young. Cars today are more complicated than can be built by amateurs. A hot-rod built today is much less sophisticated than the Toyota I drive. But someone who builds a 1950s street-rod from parts, and customizes, it learns a lot of things about engineering that others will not.&lt;/p&gt;&#xA;&lt;p&gt;Algorithms are, in general, extremely interesting and building them teaches a certain way to think about programming. It is a good place, maybe the best, to talk about pre and post-conditions and invariants. It is a good place to talk about the elements of computability and its effect on efficiency. These are lessons that are not especially likely to be learned if students don't implement. Some relatively obscure algorithms are interesting in their own right, say Dutch National Flag, and Dijkstra's Longest Upsequence algorithm. The solutions can be somewhat non-intuitive, but enlightening when explored.&lt;/p&gt;&#xA;&lt;p&gt;Besides, it is &lt;em&gt;fun&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-28T13:30:17.640" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2975" PostTypeId="2" ParentId="2946" CreationDate="2017-07-27T21:23:49.060" Score="1" Body="&lt;p&gt;Since most of the answers here already provide a good pedagogical approach, I'm going to add one element you can use to completely shift the tone when these moments occur: &lt;strong&gt;use a meme.&lt;/strong&gt; &lt;strong&gt;Find humor in the absurdities.&lt;/strong&gt; I strongly believe that well-placed humor in the classroom is of instructional benefit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My reasoning as humor applies to this particular topic comes from the &quot;Wat&quot; talk given by Gary Bernhardt. In it he uses the &quot;Wat&quot; meme to point out some rather absurd characteristics of Ruby and JavaScript. The video is only a little over four minutes long and can be found &lt;a href=&quot;https://www.destroyallsoftware.com/talks/wat&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching with memes can be a memorable and funny experience for students, and it then becomes something they can continue to reference. Befuddled by why a language has a quirk that it does? Make a meme of it. Share it. Tweet it. Put it up on a classroom wall. The drastic difference in tone will help students create that cognitive separation between those big picture items and those more quirky items by which you don't want them to be distracted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes we don't need to take a serious, intellectualized approach; comedy can work in aiding the learning process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example based on what you list above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/vntvl.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/vntvl.jpg&quot; alt=&quot;&amp;quot;Wat&amp;quot; meme example in JavaScript&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-27T21:23:49.060" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2976" PostTypeId="2" ParentId="2965" CreationDate="2017-07-27T22:20:10.953" Score="4" Body="&lt;p&gt;I'm a big fan of live-coding for many of the reasons people stated above.  For me, the biggest reasons are for students to see my process, to see me make typos and not get frustrated, to see me make mistakes (notice - I differentiate between typos and mistakes), how I troubleshoot those mistakes, and to see my elation when something I wrote works as intended.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a paper and a talk about the topic of live-coding you may find interesting.  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://dl.acm.org/citation.cfm?id=2445388&amp;amp;CFID=949943761&amp;amp;CFTOKEN=88308842&quot; rel=&quot;nofollow noreferrer&quot;&gt;The effectiveness of live-coding to teach introductory programming&lt;/a&gt; - Marc Rubin&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=z1oTtPECHZI&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Education Zoo Episode #6&lt;/a&gt; - Mark Guzdial&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-27T22:20:10.953" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2977" PostTypeId="2" ParentId="2970" CreationDate="2017-07-28T08:18:38.457" Score="4" Body="&lt;p&gt;The answer here, as it seems to be so often, is &quot;it depends.&quot; The courses you've compared are comparing apples to oranges. Which are you trying to make, apple juice, or orange juice? You have to select to version &lt;em&gt;implementation&lt;/em&gt; or &lt;em&gt;application&lt;/em&gt;, which best moves the lessons, and the students, toward the objectives and goals set for the course.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Apples&lt;/h1&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Coursera (AP CS A): The students are provided the &lt;em&gt;finished&lt;/em&gt; algorithms and expected to apply them properly to solve some larger problem. The emphasis is on solving the problem with the given tools, not creation of the tools. All the coding, by the student and supplied to the student, is done in Java.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Target&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java&lt;/li&gt;&#xA;&lt;li&gt;Object-oriented methodology&lt;/li&gt;&#xA;&lt;li&gt;Problem solving&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pros&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The students have a firm foundation in Java and are ready for 2nd semester college courses employing Java&lt;/li&gt;&#xA;&lt;li&gt;The students can understand, and use, the object-oriented programming paradigm common in most newer development models.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cons&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;While students will have more to learn in Java before using it professionally, they will need to return to the beginning to switch to a different language.&lt;/li&gt;&#xA;&lt;li&gt;The students will have a good grasp of using existing implementations of common algorithms, yet not have the skills to develop new algorithms to solve problems they don't know about yet.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;The Oranges&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;CS50 AP (AP CSP): The discussion leads from comparing the algorithms to see &lt;em&gt;how&lt;/em&gt; they do what they do, and probably the costs of doing it each way, to creating the code that will &lt;em&gt;actually do&lt;/em&gt; that sort. The clear pseudo-code that they are given the programming assignment was presumably developed during the discussions of the algorithms, and is merely repeated in a concise format for them to convert to C code. They are learning how to conceptualize the objective, work through creating the algorithm and carry that into live code.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Target&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Computational thinking&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pros&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The student have a firm foundation for implementing new algorithms, as well as an understanding of how to apply current, and new, algorithms&lt;/li&gt;&#xA;&lt;li&gt;The students are equipped with an understanding of how to apply computational thinking to solve new and unique problems not yet reduced to algorithms&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cons&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The students may have used a language which is not used in later courses, so they will have learn a new language to continue with programming courses&#xA;-The students may not have been exposed to, or practiced much with, the object-oriented approach.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-07-28T08:18:38.457" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2978" PostTypeId="2" ParentId="2750" CreationDate="2017-07-28T09:02:09.503" Score="2" Body="&lt;p&gt;For the introductory lesson. We use this to introduce selection (if statements), and a little bit of boolean logic.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;“Stand up if you have got brown hair.”&lt;/li&gt;&#xA;&lt;li&gt;“Sit down.” look around “Stand up if you have blue eyes.”&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;li&gt;With out asking them to sit down “Stand up if you …”&lt;/li&gt;&#xA;&lt;li&gt;Address why some people are still standing, are they correct [yes], or are the seated people correct [no]. Why? [because I did not ask them to sit].&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;li&gt;“stand up if you have brown hair or you are …” (this is where we start to cover boolean logic, I have only done &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In another lesson you could add &lt;code&gt;xor&lt;/code&gt;, &lt;code&gt;nand&lt;/code&gt;, &lt;code&gt;nor&lt;/code&gt;. I would also start using other techniques at or after this stage. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-28T09:02:09.503" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2979" PostTypeId="2" ParentId="1408" CreationDate="2017-07-28T09:55:09.343" Score="3" Body="&lt;p&gt;I have used 3 techniques.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bottom up: teaching the parts and having them slowly able to create bigger programs. (This was the least good. It was not interesting, they did not learn as much. However it could be mixed with the others.)&lt;/li&gt;&#xA;&lt;li&gt;Top down: I remind pupils that in Literature class they read poems and novels that they could not yet write. I then provide a working program, and get them to read it, and make guesses as to what bits do, and to change them. ”What happens if I change that?”&lt;/li&gt;&#xA;&lt;li&gt;CodeHS (see @ZachGalant's answer. I first tried this after reading the answer). Pupils liked these lessons, and I got some good feedback on progress. However it stopped working (at school) in week 2. (Then it was the end of term.)&lt;/li&gt;&#xA;&lt;li&gt;Avoid variables as long as possible: introduce parameterisation before mutation (a long way before), mutation should be one of the last things taught.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I also want to try ideas based on Bret Victor's ideas of direct manipulation, and immediate feedback: no compilation, no pressing run. Just change the code, and see the change.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-11-09T10:55:23.057" LastActivityDate="2018-11-09T10:55:23.057" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2980" PostTypeId="2" ParentId="2965" CreationDate="2017-07-28T11:21:57.913" Score="6" Body="&lt;p&gt;Many reasons to even intentionally make mistakes in your lessons, but one is especially important in computer science:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming is a problem solving skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't demonstrate the problem solving skills to your students, they aren't getting part of their education. And the best way you can demonstrate problem solving skills is when you are live, on the spot, trying to solve a problem in front of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, unplanned mistakes work better, but I find my planned errors often branch out in unplanned directions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you think about it, this applies in all branches of engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, since education is not just the memorization of facts, but the obtaining skills to use facts, it applies in every branch of education. Nothing kills a course more completely than perfect planning and perfect execution. (And, considering the problems of context, lessons really can't ever be perfect.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So making mistakes in front of the class and showing the students different ways of dealing with them is an essential part of presenting any coursework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with computer science it is explicitly so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep up the good work.&lt;/p&gt;&#xA;" OwnerUserId="1844" LastActivityDate="2017-07-28T11:21:57.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2981" PostTypeId="2" ParentId="2933" CreationDate="2017-07-28T16:47:36.843" Score="2" Body="&lt;p&gt;You say that: &lt;code&gt;students find it challenging to &quot;hold multiple layers of abstraction&quot; in their head.&lt;/code&gt; My advice would be to tell them: &lt;em&gt;don't try to hold several levels in mind at once.&lt;/em&gt; Someone I know says that writing was invented to let us forget things. Similarly, layers were invented to let us focus on one aspect of a problem at a time. Edsger Dijkstra in 1974 explains that we must do this because we have limitations:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A scientific discipline separates a fraction of human knowledge from&#xA;  the rest: we have to do so, because, compared with what could be&#xA;  known, we have very, very small heads.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Dijkstra's explanation of &lt;strong&gt;Separation of Concerns&lt;/strong&gt; in a 1976 paper says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In order to master complexity, one has to deal with one important&#xA;  issue (or concern) at a time.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If this very smart person said that so long ago, it certainly applies now. Layers simplify the design and coding of programs, and they make it much easier to understand and maintain code. An example from life would be that you can drive a car while paying attention to traffic, the gauges, the radio, plan your route, and possibly even talk with someone all at the same time, because they are different faculties. You can only attend to one thing at a time, but by having some be 'automatic' and only urgent things rising to awareness, you can do this. Programming is the same way.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-07-28T16:52:57.877" LastActivityDate="2017-07-28T16:52:57.877" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2982" PostTypeId="1" CreationDate="2017-07-28T16:58:06.060" Score="6" ViewCount="185" Body="&lt;p&gt;This question is somewhat related to a &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2530/review-of-information-theory-lab&quot;&gt;prior question&lt;/a&gt; that I asked about an Information Theory lab.  I received a lot of great feedback there, but I have not gotten past the idea yet that the lab that I assigned last year was simply too hard.  I have been wracking my brain to think of a new lab idea, but so far, I have come up empty-handed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you don't have to visit the prior question, here is the relevant portion: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This is mid-year in a course for HS juniors in theoretical computer science.  The unit is about Information Theory.  We were using the &lt;a href=&quot;https://en.wikipedia.org/wiki/Balance_puzzle&quot; rel=&quot;noreferrer&quot;&gt;coin-weighing problem&lt;/a&gt; as something of a motivator for the entire enterprise, as a deep understanding of that problem would also engender a pretty reasonable understanding of the purpose and use of the four axioms of Information Theory:&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;I(p) ≥ 0&lt;/li&gt;&#xA;  &lt;li&gt;I(1) = 0&lt;/li&gt;&#xA;  &lt;li&gt;I(p1 * p2) = I(p1) + I(p2)&lt;/li&gt;&#xA;  &lt;li&gt;I is continuous and monotonic&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;  &#xA;  &lt;p&gt;In the lectures prior to this lab, we cover the coin problem, the axioms themselves, some of the derived properties of the axioms, bits, trits &lt;em&gt;(including the Soviet Setun computers)&lt;/em&gt;, nats, and Hartleys, how much information is present in random and constrained events, the concept or entropy, and how to calculate the storage requirements of a theoretically maximal lossless data compression given some set of rules.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;All of the coding done by students during this course is in Scheme, so labs that naturally lend themselves to functional programming paradigms instead of imperative ones are appreciated.  My best labs tend to present a series of very short lab assignments, and either present them in escalating order of difficulty, or provide some options to the students about which ones to pursue, to smaller-scale ideas are also a better fit for my class structure.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-01-25T17:47:37.660" Title="Lab ideas for information theory" Tags="|lesson-ideas|labs|information-theory|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2983" PostTypeId="2" ParentId="2828" CreationDate="2017-07-29T02:51:43.870" Score="4" Body="&lt;p&gt;I agree that simplified rules such as this, in concept, can help students grasp the main concepts! Regarding these particular simplifications, I think for the last one you meant BCNF instead of 3NF. 3NF allows an attribute to not depend on the PK, but rather on some other element, if that attribute is part of some other candidate key. The distinction between 3NF and BCNF is a pretty important one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that motivating and explanation 3NF with my students is quite hard. BCNF is much easier.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PK = Primary Key  &lt;/li&gt;&#xA;&lt;li&gt;BCNF = Boyce-Codd Normal Form&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here's how I roughly explain the roles of the most-popular normal forms to my students: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1NF: It's a relational database&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BCNF (Boyce-Codd Normal Form): what you intuitively want. Each attribute depends just on the primary key. The catch is that you can't always decompose a relation that's not in BCNF into multiple relations that are in BCNF, while retaining integrity of your data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3NF: a compromise. It's not as good or as obvious as BCNF, but you can provably losslessly always decompose your data into 3NF. You can always get to 3NF, though it's kind of counter-intuitive as to what it is. You can't always get as far as BCNF, though that's the intuitive one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2NF: I only mention it briefly and indicate that its importance or lack thereof is largely historical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, I pretty much put all of my attention on BCNF as a solid goal, and on 3NF as a compromise if you can't get there.&lt;/p&gt;&#xA;" OwnerUserId="248" LastEditorUserId="248" LastEditDate="2017-07-31T15:55:04.220" LastActivityDate="2017-07-31T15:55:04.220" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="2984" PostTypeId="1" CreationDate="2017-07-29T09:09:09.703" Score="8" ViewCount="1543" Body="&lt;p&gt;I am a mathematician but I would like to learn basics of computer science. I have seen many books that are fine but has some mistakes. For example, &lt;code&gt;Introduction to algorithms&lt;/code&gt; even says that one should use $f(n)\in O(g(n))$ but still uses the notation $f(n)= O(g(n))$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there university level computer science books that are suitable for person who wants to study computer science on very rigorous books, or that are aimed to mathematician?&lt;/p&gt;&#xA;" OwnerUserId="2315" LastEditorUserId="2315" LastEditDate="2017-07-29T12:41:41.133" LastActivityDate="2017-07-30T23:37:37.060" Title="Book recommendations for rigorous CS books" Tags="|self-learning|resource-request|" AnswerCount="4" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2985" PostTypeId="1" AcceptedAnswerId="2997" CreationDate="2017-07-29T12:32:56.700" Score="17" ViewCount="1885" Body="&lt;p&gt;A recent &lt;a href=&quot;http://www.cs.uni.edu/%7Ewallingf/blog/archives/monthly/2017-07.html#e2017-07-27T13_36_43.htm&quot; rel=&quot;noreferrer&quot;&gt;Blog post by Eugene Wallingford&lt;/a&gt; raises the issue that students often perform according to their perception of their abilities rather than their actual abilities. If a student performs better than their &amp;quot;natural abilities&amp;quot; suggest then all is well, of course. However some students do less well than  they might simply because they think they aren't &amp;quot;smart enough&amp;quot; to do better.&lt;/p&gt;&#xA;&lt;p&gt;It is a well-known phenomenon, at least in the US, that some students do poorly in math because they have the belief that &amp;quot;I can't do math.&amp;quot; Often enough, however it is just lack of exposure or poor teaching that got them to that belief. It might even be a single bad experience. The same is likely true in other technical subjects. For that matter, it may be true in most subjects, but it may also be that the problem is more likely to be overlooked in, say, History.&lt;/p&gt;&#xA;&lt;p&gt;The author of this believes that success comes from interest and hard work not natural ability, but that may not satisfy many students. In fact, saying &amp;quot;you just need to work harder&amp;quot; may increase their frustration, rather than their confidence.&lt;/p&gt;&#xA;&lt;p&gt;Of course a self-perceived lack of ability can easily lead to a lack of interest.&lt;/p&gt;&#xA;&lt;p&gt;The question, then, is:&lt;/p&gt;&#xA;&lt;h3&gt;What can the instructor do to overcome feelings in the students that being a CS Superstar simply isn't in their future, and so help them not settle for less than they might achieve?&lt;/h3&gt;&#xA;&lt;p&gt;Some ideas might be interesting ways to speak to them, but hopefully many of you have seen this and have creative ways (exercises, teams, ..., anything) that can get a student to live beyond their self-perceived limitations.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Authenticity Bias is a common phenomenon in recently promoted professionals who have new responsibilities. It is the sense of being a fraud in their new position. &amp;quot;This isn't me, I'm playing a role.&amp;quot; Often the role demands behavior different from what they are comfortable with. Many, however, have found that not accepting the new role is a path to failure. Falling back on old habits, &amp;quot;the &lt;em&gt;real&lt;/em&gt; me&amp;quot; simply fails in the new role.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, playing the new role &lt;em&gt;consciously&lt;/em&gt; for a while can lead to a &amp;quot;new me&amp;quot;, overcoming the Authenticity Bias.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-02T14:47:55.080" Title="What can the instructor do to overcome the Authenticity Bias in students?" Tags="|student-motivation|student-perceptions|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2986" PostTypeId="5" CreationDate="2017-07-29T12:39:36.237" Score="0" Body="&lt;p&gt;Students come to Computer Science with certain beliefs both about the field and about themselves. Some of these perceptions are accurate, but others not so much. How can we recognize student perceptions and help them correct their view. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the most destructive perceptions can be about the student him/herself. Some students feel they can do no wrong, others that they are bound to fail. Both are likely misplaced and not conducive to effective learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, some mis-perceptions can be helpful. If they find success with a professor who is &quot;known&quot; to be very hard, they gain in self-esteem. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-29T17:08:44.400" LastActivityDate="2017-07-29T17:08:44.400" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2987" PostTypeId="4" CreationDate="2017-07-29T12:39:36.237" Score="0" Body="This tag is for questions that relate to student self-perceptions as well as perceptions in general about the field and individual classes. How do students feel about themselves and what do they believe about themselves and how does that affect their learning? What do they believe about Computer Science that may not be accurate. Questions about overcoming mis-perceptions are welcome here. " OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2017-07-29T19:59:52.987" LastActivityDate="2017-07-29T19:59:52.987" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2988" PostTypeId="2" ParentId="2984" CreationDate="2017-07-29T13:07:18.963" Score="7" Body="&lt;p&gt;&lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0321751043&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Art of Computer Programming&lt;/a&gt; in four volumes by Knuth is an obvious choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first chapter of the first volume is a pretty solid course in discrete mathematics all by itself. If you can do all of the problems in that chapter you can earn a PhD in CS. (Some of the problems remain unsolved, I think - at least they were when the book was first published.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Knuth is a Mathematician turned Computer Scientist and gives the mathematician's view of the field about as well as anyone can. You can depend on the accuracy of the book as the author has induced the community to drive out all inaccuracies using bounties. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="283" LastEditDate="2017-07-29T17:36:25.687" LastActivityDate="2017-07-29T17:36:25.687" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="2989" PostTypeId="2" ParentId="2985" CreationDate="2017-07-29T13:55:08.113" Score="4" Body="&lt;p&gt;When I want a student to look something up or learn something new on their own, I find that they resist that task, often because they think what I'm asking them to do is challenging.  I have found that framing the task with specifics such as &quot;I read through that tutorial myself last week and it took me about an hour to do the task&quot; helps students understand that it is something that they will have to work through (meaning it's not a one-step task), but that there is an end in sight.  I usually throw in &quot;if you aren't finished in an hour, see me&quot;.  If the task is easy, I tell them so.  If the task is challenging, I tell them that too, so that they know what to expect.  What I'm trying to say here is that I believe my students think that CS should come easy to them and they don't realize that &quot;the expert in anything was once a beginner&quot;.  (I have &lt;em&gt;that&lt;/em&gt; poster on my wall!)  Learning to program is a process.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditDate="2017-07-29T19:53:28.090" LastActivityDate="2017-07-29T19:53:28.090" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2990" PostTypeId="2" ParentId="2984" CreationDate="2017-07-29T13:58:20.770" Score="2" Body="&lt;p&gt;The Semantics of Programming Languages is an important and very mathematical subject. Great strides have been made in the past 20 or so years. One book that stands out is &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0387947752&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Theory of Objects&lt;/a&gt; by &lt;a href=&quot;https://en.wikipedia.org/wiki/Luca_Cardelli&quot; rel=&quot;nofollow noreferrer&quot;&gt;Luca Cardelli&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Mart%C3%ADn_Abadi&quot; rel=&quot;nofollow noreferrer&quot;&gt;Martín Abadi&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luca, especially, is an expert in operational semantics. He presents a generalized operational calculus for analyzing all aspects of object-oriented languages. The book is deep, but essential for those wanting a deep understanding of the underlying principles of OO languages and, perhaps, wanting to design future languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Language is more than syntax. It is the semantics that lets the student form proper hypotheses about programs and programming.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most compilers are still &quot;syntax directed&quot; but &lt;a href=&quot;https://www.microsoft.com/en-us/research/people/petelee/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peter Lee&lt;/a&gt;, in his doctoral dissertation (U of Michigan). shows how a compiler can be built from the semantics instead. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-29T14:29:25.830" LastActivityDate="2017-07-29T14:29:25.830" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2991" PostTypeId="2" ParentId="2985" CreationDate="2017-07-29T16:57:15.587" Score="5" Body="&lt;p&gt;Give the grade &lt;code&gt;not yet&lt;/code&gt;, when they don't pass. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't give grades that they can compare with each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Praise effort, strategy, progress “This is an interesting strategy”, do not praise achievement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them, that every time that they push outside of the comfort zone, they will grow more neurons, and they will get smarter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Transform the meaning of effort and difficulty: from meaning “I am stupid” to meaning “I am leaning, I am getting smarter, I am trying hard.”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Telling people to work harder does not work: instead tell them what it means when they are breathing hard, hot, sweating. This means that they are getting stronger, getting fitter. People that are fitter, have higher heart rates when exercising, but as you get fitter you will find that your heart rate returns to normal quicker.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;All of these come from Carol Dweck — mostly from her TED talk &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&lt;/a&gt; She has done much research, written papers and done talks, that are worth reading/watching/listening to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also Austin's Butterfly — &lt;a href=&quot;https://www.youtube.com/watch?v=hqh1MRWZjms&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=hqh1MRWZjms&lt;/a&gt; this shows how doing multiple drafts, not giving up, can make a big big difference.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-29T18:04:25.937" LastActivityDate="2017-07-29T18:04:25.937" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="2992" PostTypeId="2" ParentId="2985" CreationDate="2017-07-29T17:30:25.010" Score="12" Body="&lt;p&gt;Share their own struggles. Period. The instructor can start dispelling the myth by sharing his/her own story (replete with self-doubt, struggle, and frustration most likely) about studying computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Harvard's &lt;a href=&quot;https://cs50.harvard.edu&quot; rel=&quot;noreferrer&quot;&gt;CS50&lt;/a&gt; course, the professor shares his experience of not starting as a CS major and of essentially taking CS50 himself pass/fail. That's in the first lecture and communicates an important message about his journey not being one of simply innate talent. In another MOOC I've referenced before (&lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp&quot; rel=&quot;noreferrer&quot;&gt;Programming Languages from UW&lt;/a&gt;), the professor points out that he didn't write a line of code before college. As a student in each course through edX and Coursera, respectively, these small windows into the journeys of the professors has boosted my own confidence that one does not to be fluent in assembly at age 10 (exaggeration) to be a skilled programmer/computer scientist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I share with students my own long and winding road that led me to CS. I share with them what I continue to study in my free time. I display old, poorly-written code. I recall one instance from teaching last year when I was trying to communicate to students how important it is to read program specifications and language documentation extremely carefully. From a homework assignment for &lt;a href=&quot;https://www.coursera.org/learn/programming-languages&quot; rel=&quot;noreferrer&quot;&gt;Programming Languages, Part A&lt;/a&gt;, I kept figuratively banging my head against the desk because I was sure my logic and code were right, but I wasn't passing the checker. The problem: &lt;em&gt;I was misunderstanding how a library function was working.&lt;/em&gt; Once I re-read the documentation and realized my error, the fix was trivial. Moments like this happen to everyone at every level of ability. Everyone struggles with something at some point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students need to see that the person teaching them is fallible, and that his/her knowledge has been gained through a lot of &quot;blood, sweat, and tears,&quot; not because he/she wrote C code at age 5 (exaggeration again!) and never had a problem learning anything thereafter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also find some of the stories from &lt;a href=&quot;https://www.freecodecamp.org/&quot; rel=&quot;noreferrer&quot;&gt;freeCodeCamp&lt;/a&gt; inspiring. Their forum and Medium blog are filled with examples of individuals making career changes, working hard for an extended period of time, and achieving some level of &quot;success.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bottom line: find stories to share that show students there are more people feeling what they feel than they might first imagine. Prove to them that computer science rewards hard work, discipline, and focus. In my mind, that starts with the person in the front of the room sharing his/her journey.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-29T17:30:25.010" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="2993" PostTypeId="2" ParentId="2984" CreationDate="2017-07-29T17:52:07.933" Score="4" Body="&lt;p&gt;In addition to Knuth, I would recommend the classic &lt;a href=&quot;https://mitpress.mit.edu/sicp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Structure and Interpretation of Computer Programming&lt;/a&gt; by Abelson and Sussman. It covers such topics as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Writing simple programs that do powerful things,&lt;/li&gt;&#xA;&lt;li&gt;Blurring the lines between data and code, including functions as first-class objects,&lt;/li&gt;&#xA;&lt;li&gt;Creating little languages to solve problems,&lt;/li&gt;&#xA;&lt;li&gt;Writing an interpreter,&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and much more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is one of the most loved and respected CS books. See also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://people.eecs.berkeley.edu/~bh/sicp.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Why &lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt; matters&lt;/a&gt;, by Brian Harvey&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.quora.com/Is-Structure-and-Interpretation-of-Computer-Programs-SICP-worth-reading&quot; rel=&quot;nofollow noreferrer&quot;&gt;Is &quot;Structure and Interpretation of Computer Programs&quot; (SICP) worth reading?&lt;/a&gt; (Quora)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Note that the text, in various formats (&lt;a href=&quot;https://mitpress.mit.edu/sicp/full-text/book/book.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;original HTML&lt;/a&gt;, &lt;a href=&quot;http://sarabander.github.io/sicp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML5&lt;/a&gt;, &lt;a href=&quot;https://github.com/sarabander/sicp-pdf/raw/master/sicp.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;PDF&lt;/a&gt;), is available for free online, as are &lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/&quot; rel=&quot;nofollow noreferrer&quot;&gt;video lectures by the authors&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="27" LastEditDate="2017-07-30T23:37:37.060" LastActivityDate="2017-07-30T23:37:37.060" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="2994" PostTypeId="5" CreationDate="2017-07-29T21:27:46.700" Score="0" Body="&lt;p&gt;Agile is about discovering and doing only what is needed, and what works. If you don't need it then don't do it. If it is not of value then don't do it. It is about ignoring dogma, adopting practices that work, and dropping practices that don't work, or wast time or effort.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Some Agile methodologies&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DSDM&lt;/li&gt;&#xA;&lt;li&gt;Extreme programming (XP)&lt;/li&gt;&#xA;&lt;li&gt;Lean development&lt;/li&gt;&#xA;&lt;li&gt;Kanban&lt;/li&gt;&#xA;&lt;li&gt;Scrum&lt;/li&gt;&#xA;&lt;li&gt;Scrumban&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;The agile manifesto&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We are uncovering better ways of developing&#xA;software by doing it and helping others do it.&#xA;Through this work we have come to value:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Individuals and interactions over processes and tools&lt;/li&gt;&#xA;&lt;li&gt;Working software over comprehensive documentation&lt;/li&gt;&#xA;&lt;li&gt;Customer collaboration over contract negotiation&lt;/li&gt;&#xA;&lt;li&gt;Responding to change over following a plan&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That is, while there is value in the items on&#xA;the right, we value the items on the left more.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-30T02:33:52.543" LastActivityDate="2017-07-30T02:33:52.543" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2995" PostTypeId="4" CreationDate="2017-07-29T21:27:46.700" Score="0" Body="Use this tag to mark questions on the subject of Agile software development or agile design within the confines of Computer Science." OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-30T02:02:55.443" LastActivityDate="2017-07-30T02:02:55.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2996" PostTypeId="2" ParentId="2965" CreationDate="2017-07-29T21:52:45.667" Score="2" Body="&lt;p&gt;Give some level of bonus points for any mistake they point out - in your teaching, in your problem statements (even grammar mistakes), in your code, anything. They don't need to be significant, just enough to encourage it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a little bit, not only will your written/handed out material be better for it, but you'll have a group of students ready and willing to work with you. Another option is to give bonus points to a student who can explain a topic more succinctly or clearly than you (first they'd have to write it out and hand it in, as to not waste class time). This will also help you see what explanations stick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Plus, you can just wave off mistakes as a way to 'keep your students on their toes' ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If no student points out a mistake, prompt them (&quot;I've made a mistake here. Can anyone see what it is?&quot;) and then explain it after a second or two. If you realize the day after, address it ASAP in class.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-29T21:52:45.667" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2997" PostTypeId="2" ParentId="2985" CreationDate="2017-07-29T22:09:11.077" Score="7" Body="&lt;p&gt;First, your classroom needs to be comfortable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No one's going to do well if they fear being called nerdy or some such nonsense. I myself have unfortunately been insulted along those lines, and though I ignored them (I figured, well, I've got better grades than them, so probably a good thing) it was hard to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, start small, work up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I first started trying to teach myself things that I didn't just come across in pop-science books, it was &lt;em&gt;hard&lt;/em&gt;. Really hard. But it's gotten easier as I've gone along, so I've started tackling more ambitious projects. No one's first program is a complete GUI in assembly with some animations to boot (exaggerating, but you see my point). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone's been beating themselves up personally for a lifetime, it's gonna be hard to change. So start by giving them little things. &quot;Go teach so-and-so about your method.&quot; &quot;Try this problem, I know you can do it.&quot; Do it in private so any failures aren't public. Slowly build up their confidence. And one day they'll walk into class and rock that exam. And they'll feel on top of the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, consider out-of-classroom problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, it's a sad reality that not everyone's home life is good. Families are poor, broken, or otherwise messed up, and that can rub off on people. If someone's been insulted their entire life - well, that's hard to change. Connect such students with counselors, and build them up as much as you can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth, show them your own failures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others have already said this, but I'll say it again. I get annoyed when all this buzz is made about child geniuses and their magic talents. Yes, they're smart. But no story ever shows the hours of practice and work that went into it. No one ever walked up to a piano for the first time and aced a concerto. They started with Chopsticks, and 10,000+ hours later, they were playing their own composition at Carnegie Hall. No one ever walked up to a computer the first time (not Bill Gates, not Steve Wozniak, not Mark Zuckerberg, not anyone) and wrote an operating system or search engine. They started with Hello World. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show them how real people actually operate. We start somewhere. We work hard, we advance, we make mistakes along the way, and we advance some more. None of this magic wand stuff. Things that are worth doing are hard. They require work. Every time I've put effort into something, significant effort, I've been proud of the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally - show them off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show everyone the amazing work they've done. Brag on them. They're your students, they're surviving your class, they've come this far. They're worth it.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-07-29T22:09:11.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="2998" PostTypeId="1" AcceptedAnswerId="4312" CreationDate="2017-07-30T07:22:01.630" Score="12" ViewCount="3468" Body="&lt;p&gt;I recently noticed that &lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt; has been deprecated from html according to &lt;a href=&quot;https://developer.mozilla.org/en/docs/Web/HTML/Element/marquee&quot; rel=&quot;nofollow noreferrer&quot;&gt;this site&lt;/a&gt;. From &lt;a href=&quot;https://stackoverflow.com/q/31951282/3625036&quot;&gt;this answer on Stack Overflow&lt;/a&gt;, the marquee replacement is made from CSS. The explanation given to the change is that html is about document structure, and that layout and animation and styling etc. should be done from CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This got me thinking:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would explicitly teaching the difference between setting the &lt;code&gt;style&lt;/code&gt; attribute of an &lt;code&gt;html&lt;/code&gt; tag, and doing it through CSS useful for increasing the students' understanding of the joining of CSS and HTML?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To narrow it down, I'm looking for examples or &lt;strong&gt;explanations of how teaching it explicitly might make it easier for the students to style their webpages&lt;/strong&gt;. Preferably an explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &quot;explicitly teaching&quot; what I mean is actually devoting a lesson with the title of &quot;Styling through .CSS&quot;, or something similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some context, if it is needed:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students learn basic web designing: HTML, JavaScript (very basic), JSP and SQL. They learn these for 1 year and at the end of the year they should have a website (for which they receive grades). I am wondering if a lesson entirely about CSS might eventually lead to better looking websites.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="58" LastEditDate="2017-08-03T01:35:11.183" LastActivityDate="2018-02-08T00:41:50.673" Title="Explaining why styling should not be done directly in HTML" Tags="|lesson-ideas|web-development|html|css|" AnswerCount="13" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="2999" PostTypeId="2" ParentId="812" CreationDate="2017-07-30T09:30:45.240" Score="2" Body="&lt;p&gt;Have some reasons why they should use the command line. Here are some of mine.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Why I like the command line&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;Less typing&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;How can this be I hear you ask. Well I login, reverse search (&lt;kbd&gt;ctrl&lt;/kbd&gt;-&lt;kbd&gt;r&lt;/kbd&gt;) or up arrow (&lt;kbd&gt;⬆&lt;/kbd&gt;) for a command I typed last week and hit carriage return. The alternative is far more mouse clicks (and trying to remember).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show an example of you having to repeat the some actions on the GUI to do a repetitive task. Then show you doing it on the command line, using up arrow, and making a small change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also show an example of you getting to the end of a work flow and realising that you have to go back to the start, and then having to repeat the work flow. (note this reflects bad GUI design, but the CLI is a way to avoid it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you were taking pictures of cats, but then you saw a dog at 11:10, and started taking pictures of dogs. So now you have a folder full of pictures, with names like “cat with a ball”, for an labrador puppy. So you need to rename 100 photos. (It was a long day. You took a lot of photos, and learnt that a dog is not a type of cat.)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Solution 1 — Start clicking: Repeat 1000 times, Right click, rename …&lt;/li&gt;&#xA;&lt;li&gt;Solution 2 — type &lt;code&gt;find . -newermt 2017-12-23T11:10 -print0 | xargs -0 rename -e &quot;s/cat/dog/&quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Unambiguous and clear&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It makes it easier to answer questions on stack-overflow; No screen shots needed, just text.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Easier for dyslexics (sometimes)&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I am dyslexic. I, sometimes, get confused when trying to find an item in a list. I find it easier to just type it.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;More powerful&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;find all files with the word &lt;code&gt;dog&lt;/code&gt; in their name.&lt;/li&gt;&#xA;&lt;li&gt;find all files with the word &lt;code&gt;dog&lt;/code&gt; in them.&lt;/li&gt;&#xA;&lt;li&gt;change the word &lt;code&gt;dog&lt;/code&gt; to &lt;code&gt;cat&lt;/code&gt; in the contents of these files.&lt;/li&gt;&#xA;&lt;li&gt;change the word &lt;code&gt;dog&lt;/code&gt; to &lt;code&gt;cat&lt;/code&gt; in the name of these files.&lt;/li&gt;&#xA;&lt;li&gt;wait for a file to change and then read it, if it is an image file and contains the tag &lt;code&gt;dog&lt;/code&gt; then open it in an image viewer.&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Faster over remote connections&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Opening a window over ssh can be slow.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Automation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you can do it once, then you can do it again, with scripting.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;GUI-able&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;One can easily wrap a command line script/program in a GUI, but it is much harder to wrap a GUI program in a script.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Why I like the GUI&lt;/h1&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Better visualisation.&lt;/li&gt;&#xA;&lt;li&gt;Easier for beginners, and infrequent users.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;A Compromise&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The dolphin file-manager, has an integrated text terminal. Not just integrated in that it is in the same window, but in the sense that there is bidirectional synchronisation of present-working-directory between the CLI view and the GUI view.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2019-06-09T18:15:01.970" LastActivityDate="2019-06-09T18:15:01.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3000" PostTypeId="5" CreationDate="2017-07-30T09:48:55.260" Score="0" Body="&lt;p&gt;Gnu/Linux is a Unix like operating system, based on the Gnu project and the Linux Kernel. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gnu/Linux is the most popular operating system for: super computers; servers; scientific applications; and is the fastest growing desktop operating system. It is used in embedded systems; parts of it is used in android, but this tag is not about Android (Android is a different operating system).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gnu/Linux is Free Software that is software that has the following freedoms: &#xA;    The freedom to run the program as you wish, for any purpose (freedom 0).&#xA;    The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.&#xA;    The freedom to redistribute copies so you can help your neighbour (freedom 2).&#xA;    The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2017-07-30T15:33:56.637" LastActivityDate="2017-07-30T15:33:56.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3001" PostTypeId="4" CreationDate="2017-07-30T09:48:55.260" Score="0" Body="Questions about the educational uses/implications of Gnu/Linux operating system.&#xD;&#xA;Gnu/Linux is a Unix like operating system, based on the Gnu project and the Linux kernel. Gnu/Linux is Free Software, that is software that gives you freedoms.&#xD;&#xA; " OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-30T14:19:04.380" LastActivityDate="2017-07-30T14:19:04.380" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3002" PostTypeId="2" ParentId="2998" CreationDate="2017-07-30T09:55:16.960" Score="17" Body="&lt;p&gt;I like the idea of producing a few style sheets, and having the pupils apply them to their HTML. They can then see the power of having separate style sheets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with a style sheet that you made. Use the new grid layout, have some college styling. But at first get them only creating the html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can then start editing the style sheets. They will see that the power of one small change can change every heading, or every paragraph.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also in the past, written a HTML file that had a set of buttons at the bottom. These buttons would trigger a different CSS file to be loaded. It was some very simple JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To answer should they be kept separate&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Keeping style and content separate, is recommended by W3 and many others. It implements separation of concerns and single responsibility. Both very important patterns in software design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better: keep layout, style, structure, and content separate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One css for layout, another for style, then a template for structure (I use moustache), pull the content from a database, to create json, and programmatically combine it with the template (use a template library). [this section is now about my teaching, but what I do for my websites.]&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To answer should you devote a lesson to separate CSS files.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Yes. If it is important to keep these separate, which it is, then you should teach pupils to keep them separate. Save time by not teaching them to mix it in with the HTML (This will save time twice, as you won't have to un-teach it). &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have only done this with one or two people (not a class).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-02-08T00:22:55.957" LastActivityDate="2018-02-08T00:22:55.957" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3004" PostTypeId="2" ParentId="2998" CreationDate="2017-07-30T12:43:05.560" Score="11" Body="&lt;p&gt;If you only want to build a page that is simple and ad-hoc and will never change in the future and will only ever be seen on one kind of device, then, sure, build the styling directly into html. It is the same when you write a program that will only be run once on one device to get an answer, after which the program becomes obsolete. There is, then, no reason to code carefully. &quot;Quick and dirty&quot; works for such things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt; things do change, and web pages are viewed on devices with varying screen sizes, even color models. And they may be viewed in future on devices that don't yet exist. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you want to build sites that are important and lasting and that must be maintained in the future, use CSS. You probably wouldn't write an important C program all in &lt;em&gt;main&lt;/em&gt;, but would at least, factor out the things that must be the same but are reused. In simple C programming we factor out functions for this. In html we factor out styling. At a deeper level, the server side also factors out much of the data, etc. This lets things that are supposed to be the same, stay the same, and lets us modify one level of design independently from other levels. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't exactly the same thing, but look at the underlying code of Google's front page. I don't know what they use to put that together and maintain it, but I doubt that it is just a text editor. Note that their &lt;a href=&quot;https://www.google.com&quot; rel=&quot;noreferrer&quot;&gt;front page&lt;/a&gt;, though incredibly simple in layout, changes frequently. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note to the Instructor&lt;/strong&gt; When you get ready to grade the student's work, view it on various devices, with different screen resolutions. I don't, however, suggest that you also make them provide per-device css. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For that matter, view some of the StackExchange pages on a desktop vs a phone. And for a shocker, look at both the source and stylesheets of some of the pages. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-30T12:43:05.560" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3005" PostTypeId="5" CreationDate="2017-07-30T13:05:40.190" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Mathematical_induction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Induction&lt;/a&gt; is a mathematical technique used to prove statements on natural numbers. In computer Science, induction is often used to prove &lt;a href=&quot;https://en.wikipedia.org/wiki/Formal_verification&quot; rel=&quot;nofollow noreferrer&quot;&gt;features of algorithms&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The induction is made out of two steps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;The base case&lt;/strong&gt;:&lt;br&gt;&#xA;The statement\algorithm is tested for a specific input. We check that it holds for the first possible input: &#xA;$n= 0$  or  $n = 1$.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;The inductive step&lt;/strong&gt;&lt;br&gt;&#xA;Assuming that the statement\algorithm is correct for some $m \in \mathbb{N}$ proven to be correct, it is shown that the statement is also true for $m+1$&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The hypothesis in the inductive step that the statement holds for some $n$ is called the induction hypothesis (or inductive hypothesis).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the inductive step is proven, it follows that, if the base case is correct (i.e. $n=0$) then $n=1$ is also correct, and so $n=2$ is correct and so forth. Proof by induction means that the statement is true for all natural numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Induction is useful for proving the correctness of algorithms, especially recursive and iterative ones.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="27" LastEditDate="2017-07-30T13:50:59.767" LastActivityDate="2017-07-30T13:50:59.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3006" PostTypeId="4" CreationDate="2017-07-30T13:05:40.190" Score="0" Body="Questions related to teaching mathematical induction in computer science. Use this tag to ask about aspects of teaching some or all of the steps in an inductive proof." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-07-30T13:51:31.527" LastActivityDate="2017-07-30T13:51:31.527" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3007" PostTypeId="5" CreationDate="2017-07-30T14:20:30.760" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Reinforcement_learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Reinforcement Learning&lt;/a&gt; is a Machine Learning technique in which a program changes its behavior using feedback on past actions. This tag is appropriate for educational uses (teaching and learning). It is not, however, appropriate for theoretical issues, or how to implement it in general, unless the question has specific human learning objectives. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="58" LastEditDate="2017-07-30T15:31:13.263" LastActivityDate="2017-07-30T15:31:13.263" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3008" PostTypeId="4" CreationDate="2017-07-30T14:20:30.760" Score="0" Body="Reinforcement Learning is a specific AI concept, specifically in Machine Learning. This tag is appropriate for all questions related to teaching and learning about this technique. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-30T15:33:08.327" LastActivityDate="2017-07-30T15:33:08.327" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3009" PostTypeId="5" CreationDate="2017-07-30T14:42:35.513" Score="0" Body="&lt;p&gt;The CS0 class come with many official names at different institutions and at different levels, such a secondary or undergraduate. The term &quot;CS0&quot; is used informally. The course is not precisely defined in general and differs widely depending on the needs of the institution. In general, it is for non-majors who need some information about computing and computation. It may or may not include programming, but is normally independent of the normal sequence of classes that lead to a major (or minor) in CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This course may pass into history eventually as more information on computing is introduced into the elementary grades. While the term &quot;CS0&quot; is specifically a US concept, the idea of the course is likely widespread. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-30T16:30:04.580" LastActivityDate="2017-07-30T16:30:04.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3010" PostTypeId="4" CreationDate="2017-07-30T14:42:35.513" Score="0" Body="In the United States CS0 is often used as a generalized term to designate a Computer Science Course for non-majors or for majors who need some background to make up for deficiencies. It may or may not include programming and has no precise definition. This tag is for all questions related to design and content of classes with this intent. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-30T16:30:32.320" LastActivityDate="2017-07-30T16:30:32.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3011" PostTypeId="5" CreationDate="2017-07-30T15:07:31.930" Score="0" Body="&lt;p&gt;The GNU project was begun by Richard J Stallman (RJS) to provide a &quot;Free&quot; alternative to the UNIX operating system, which AT&amp;amp;T was at the time trying to close off and monetize after a period of free access. The Free Software Foundation (FSF) is the owner of copyrights on GNU software and provides licensing that provides for how the software may be used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The GNU library contains an operating system, GNU/Linux, as well as a complete software suite of tools that most users expect to find distributed with any modern operating system, including, but not limited to compilers, editors, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By its nature, anyone is free to contribute to the ecosystem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general GNU software is free to use, adapt, and extend (under license). The &quot;restriction&quot; on the license is that if you modify it you must make your modifications available on the same terms: Free and Open Source, with a license to extend, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;GNU/FSF is not public domain (it has a copyright) and it is not &lt;em&gt;just&lt;/em&gt; open source. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-30T15:34:22.543" LastActivityDate="2017-07-30T15:34:22.543" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3012" PostTypeId="4" CreationDate="2017-07-30T15:07:31.930" Score="0" Body="GNU is a project of the Free Software Foundation. The GNU project contains a large software repository in source form that anyone is free to use, extend, and adapt. It is Free Software, which in the GNU domain has a specific meaning, freedom (not zero price). This tag is appropriate for all questions related to the educational use of GNU software. " OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2017-07-31T03:11:17.543" LastActivityDate="2017-07-31T03:11:17.543" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3013" PostTypeId="5" CreationDate="2017-07-30T15:20:27.307" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Linux&quot; rel=&quot;nofollow noreferrer&quot;&gt;Linux&lt;/a&gt; is an operating system that forms the basis (kernel) of many others. It is a unix-like system. Android, Ubuntu, and many other distributions rely on Linux for the kernel, adding and modifying components as desired. The software is free and open source. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Linux is licensed under one of the &lt;a href=&quot;https://en.wikipedia.org/wiki/GNU_Project&quot; rel=&quot;nofollow noreferrer&quot;&gt;GNU&lt;/a&gt; (&lt;a href=&quot;https://en.wikipedia.org/wiki/Free_Software_Foundation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free Software Foundation&lt;/a&gt;) frameworks which implies that modifications must be made available to the public in source form. Often Linux is applied only to the Linux Kernel, with the overall OS referred to as GNU/Linux. However, there is some controversy about that designation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to the educational uses of Linux, including how to teach the OS specifically. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-07-30T15:33:18.957" LastActivityDate="2017-07-30T15:33:18.957" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3014" PostTypeId="4" CreationDate="2017-07-30T15:20:27.307" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-07-30T15:20:27.307" LastActivityDate="2017-07-30T15:20:27.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3015" PostTypeId="2" ParentId="63" CreationDate="2017-07-30T17:04:14.990" Score="2" Body="&lt;h2&gt;In UK at A-level&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We cover the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multi-core, semaphores, queues, process pipeline, SISD, MISD, SIMD, MIMD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We don't specifically cover how to write programs using these. A student could also get a good grade and know little about there.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-30T17:04:14.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3016" PostTypeId="2" ParentId="63" CreationDate="2017-07-30T17:22:29.213" Score="2" Body="&lt;p&gt;I do not see much value in teaching more than an appreciation of threads and locking, until you have covered less primitive techniques for parallelism.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These techniques allow parallelism that scales beyond what threads and lock does, is easier to learn, and less prone to bugs.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Functional programming: Pure functional programmes do not have the concept of time, so can be re-arranged, and split across processors.&lt;/li&gt;&#xA;&lt;li&gt;Pipeline programming: Writing programs to use a pipeline, to do some work and pass it to another process (sometimes used with process farms). &lt;/li&gt;&#xA;&lt;li&gt;Transactional programming: Instead of asking a node for its state, then changing it, and passing back a new state (with lock). Pass a transaction (a bit of code) to the node, the node can then execute the transaction for you with out locks.&lt;/li&gt;&#xA;&lt;li&gt;Immutable state: (see also functional programming.) If you don't change data then you don't have to lock it. Like a bank statement: it has a list of transactions, you can calculate the balance from these. Updating the balance requires a lock. Therefore don't update the balance. You may say the balance at the end of July is £5.43, but this is not &lt;strong&gt;the&lt;/strong&gt; balance, it is the balance at a time.&lt;/li&gt;&#xA;&lt;li&gt;SCOOP: Uses contracts to create thread safe code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-30T17:22:29.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3017" PostTypeId="2" ParentId="2998" CreationDate="2017-07-30T17:30:26.353" Score="6" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As richard says, the pupils can see how one simple edit of the style can change every element. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, you could let your pupils 'feel' the benefit of separation of the style from the html. Which means, give them an exercise, where they need to style some elements (e.g. color the element background) the  in their html. &#xA;Then let them change each element to another color. The lesson would be to let them understand that this task can be much less time-consuming if you separate the style from the html. You could then demonstrate how to change one line in the css, which changes all the elements background color.&lt;/p&gt;&#xA;" OwnerUserId="2324" LastEditorUserId="204" LastEditDate="2018-02-08T00:38:23.173" LastActivityDate="2018-02-08T00:38:23.173" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3018" PostTypeId="2" ParentId="2998" CreationDate="2017-07-30T18:10:13.953" Score="10" Body="&lt;p&gt;To make them really understand what you can do with CSS alone - with &lt;em&gt;only&lt;/em&gt; substituting another CSS file - take them to &lt;a href=&quot;http://www.csszengarden.com/&quot; rel=&quot;noreferrer&quot;&gt;the CSS Zen Garden&lt;/a&gt;. With exactly the same HTML for each page, and &lt;em&gt;only&lt;/em&gt; the .css file replaced, you get absurdly wild pages. From serene small nothingness to 3D-scrolling cubes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then explain to them that the skillset needed to make the HTML, vs. the skillset for (especially extreme like those) CSS is vastly different, and that the HTML functions as the information carrier only.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A further goodie would be to install a screen reader (for the blind) - there are ones with &lt;a href=&quot;https://en.wikipedia.org/wiki/JAWS_(screen_reader)&quot; rel=&quot;noreferrer&quot;&gt;limited free use&lt;/a&gt; - to show them how the same HTML &quot;looks&quot; when spoken aloud.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also point out that those tools for the visually impaired are able to for example extract link texts and so on from the HTML if it is well structured, and this also makes it possible to navigate a page with keyboard only - which can be useful if one is so inclined, even if the eyesight is fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, point out that a page with good separation of content and styling has a higher chance to work on portable devices - the key word being responsive design, where the content can freely flow into any resolution as needed.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2017-07-30T18:10:13.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3019" PostTypeId="2" ParentId="2828" CreationDate="2017-07-30T18:45:45.860" Score="1" Body="&lt;p&gt;One thing that hasn't been mentioned (enough) in the earlier answers is the &lt;em&gt;reason&lt;/em&gt; that one wants to do normalization in the first place. In many parts of computing redundancy is good. Java gives explicit types to variables and then checks that the assigned values have those types. That is actually redundant, as the Python language shows. However, the benefit of static typing is that certain kinds of errors in programs can be caught earlier (in the compiler or intelligent editor) rather than later (runtime). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in storing data, redundancy is generally &lt;strong&gt;bad&lt;/strong&gt;. The problem is that if you store the same information in two places, independently, they can get inconsistent when one is updated and the other not. As a simple example, suppose you store someone's age somewhere, but also store their birthday somewhere else, and they aren't dependent in any way on each other. Can lead to a bit of trouble. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Database Normalization is a way to reduce redundancy. It is especially needed in Relational Databases since the database doesn't actually store the semantics of the data (other than weakly via field names). The semantics there is the semantics of relations (rows, columns, project, join...), not the semantics of, say, &quot;Employee Payment and Taxation&quot; (Name, id, address...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several levels of normalization, each reducing a certain kind of redundancy. The field is complex since some of the higher levels are inconsistent and are inconsistent with other &quot;measures of goodness&quot; of storage protocol. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Therefore&lt;/strong&gt;, I suggest that in teaching normalization you start with an example that exhibits redundancy problems and demonstrate how it leads to losing information (lossyness) through inconsistency. Then show how the, say, First Normal Form normalization makes it better, but maybe not yet perfect. Then apply 2NF, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, start concrete in this case and work toward the abstract. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-30T18:45:45.860" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3020" PostTypeId="2" ParentId="1394" CreationDate="2017-07-30T20:56:37.890" Score="5" Body="&lt;p&gt;I'd like to expand on one source in an answer offered above: The &lt;strong&gt;C&lt;/strong&gt;ollection &lt;strong&gt;o&lt;/strong&gt;f &lt;strong&gt;R&lt;/strong&gt;eally &lt;strong&gt;G&lt;/strong&gt;reat, &lt;strong&gt;I&lt;/strong&gt;nteresting, &lt;strong&gt;S&lt;/strong&gt;ituated Datasets, or simply &lt;a href=&quot;https://think.cs.vt.edu/corgis/&quot; rel=&quot;noreferrer&quot;&gt;CORGIS&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From their &lt;a href=&quot;https://think.cs.vt.edu/about&quot; rel=&quot;noreferrer&quot;&gt;About&lt;/a&gt; page:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The &lt;strong&gt;CORGIS project&lt;/strong&gt; aims to transform early computer science projects&#xA;  by introducing real-world data via simple-to-use client libraries.&#xA;  Data Science offers an authentic context for your students to solve&#xA;  real-world problems with programming. The CORGIS project has over 40&#xA;  libraries for subjects such as politics, education, literature,&#xA;  construction, and more!&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;CORGIS offers full support for Java, Python, and Racket, in addition&#xA;  to making its data files available in common data formats like JSON&#xA;  and CSV. Some datasets are also available through our unique&#xA;  Visualizer platform, which enables data science exploration directly&#xA;  within the browser!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The topics available for analysis are incredibly wide-ranging (as exemplified in the list above). I plan on showing this to my students next year for the AP CS Principles Create Task. My students are comfortable by that point with Python, so this is right at their ability level and will allow for some interesting, innovating, and original project ideas. The accessibility level is just right a student finishing the first year of a high school level CS course.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-07-30T20:56:37.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3021" PostTypeId="2" ParentId="2998" CreationDate="2017-07-30T21:40:30.567" Score="-1" Body="&lt;p&gt;I would completely disagree - styling should be done directly in HTML.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The primary problem is that styling is not even remotely independent of the HTML structure. Simply writing the styles in a physically separate file does not change this. A good example is mobile device support. In theory, you could make a mobile CSS file. But in reality, you probably need a completely separate UI design to produce a good experience on a mobile device, and then a separate HTML structure to support this, and then a separate set of styles. &quot;Make the button the same but a bit smaller&quot; only works for the smallest pieces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Producing the correct UI involves producing the HTML structure that supports the styles you need. Since the two are in fact intimately coupled, having them be colocated just makes things easy to understand and all in one place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, since you are presumably generating your HTML through code, there is no problem with generating HTML with duplicated styles, since your code generator can spit out styles all day long.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having raw CSS is tremendously problematic as the styles are completely random and at global scope, and difficult to re-use. You make a class name under the hope that nobody else used it. You nest your own classes inside that element to try to solve this problem a bit but now you can't re-use these classes in other places as they're not in the right DOM structure. Then you find out that some random dude in some completely separate part of your page used your class without notifying you and now you've broken it by changing your styles. And good luck getting type checking, IDE support, etc. It's also difficult to create e.g. parameterised classes, or globally apply replacements, e.g. &lt;code&gt;display: flex&lt;/code&gt; with &lt;code&gt;display: flex&lt;/code&gt; and &lt;code&gt;display: -webkit-flex&lt;/code&gt; for iOS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The correct way to deal with styles is to deal with them as with any other code- encapsulate them in some functions.&lt;/p&gt;&#xA;" OwnerUserId="2325" LastEditorUserId="150" LastEditDate="2017-07-31T08:13:10.293" LastActivityDate="2017-07-31T08:13:10.293" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3022" PostTypeId="1" CreationDate="2017-07-30T22:57:08.043" Score="4" ViewCount="211" Body="&lt;p&gt;When someone says we should teach &quot;cyber security&quot; what does that mean to you? Is it computer science or system management or some mix of the two? What would you include in a course on cyber security that would make it a real computer science course?&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2017-08-01T14:18:50.093" Title="What should be in a CyberSecurity Course in secondary school?" Tags="|security|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3023" PostTypeId="2" ParentId="2984" CreationDate="2017-07-30T23:10:39.997" Score="0" Body="&lt;p&gt;Another classic is &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0716710455&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Computers and Intractability: A Guide to the Theory of NP-Completeness&lt;/em&gt;&lt;/a&gt; by Garey and Johnson. As you may know, &lt;a href=&quot;https://en.wikipedia.org/wiki/NP_(complexity)&quot; rel=&quot;nofollow noreferrer&quot;&gt;NP&lt;/a&gt; (which stands for &quot;nondeterministic polynomial time&quot;) refers to a set of problems that are computationally very difficult but whose answers can be checked in polynomial time relative to the size of their input. Whether all such problems can be solved in polynomial time (&lt;a href=&quot;https://en.wikipedia.org/wiki/P_versus_NP_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;P=NP&lt;/a&gt;?) is one of the greatest unsolved questions in computer science. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Garey and Johnson (as the book is referred to) is about &lt;a href=&quot;https://en.wikipedia.org/wiki/P_versus_NP_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;NP-Complete&lt;/a&gt; problems, members of NP to which all other members of NP could be reduced. The book catalogs problems known to be NP-complete, including proofs that they are members, usually reductions from other NP-complete problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Published in 1979, the book is somewhat outdated but is still regarded as a classic&lt;a href=&quot;https://en.wikipedia.org/wiki/Computers_and_Intractability&quot; rel=&quot;nofollow noreferrer&quot;&gt; [3]&lt;/a&gt;. (&lt;a href=&quot;https://scholar.google.com/scholar?cites=56570571081301115&amp;amp;as_sdt=2005&amp;amp;sciodt=0,5&amp;amp;hl=en&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Scholar&lt;/a&gt; lists about 60,000 citations.) The introduction (available &lt;a href=&quot;https://pdfs.semanticscholar.org/fa33/c3a89a423f0eb00134fd291894949bf9d54e.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;online&lt;/a&gt;), in which an employee explains to their boss why they can't provide a simple solution to a problem, is also classic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I am not a theoretical computer scientist. I welcome comments from any.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-07-30T23:20:34.947" LastActivityDate="2017-07-30T23:20:34.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3024" PostTypeId="2" ParentId="3022" CreationDate="2017-07-30T23:28:36.283" Score="5" Body="&lt;p&gt;The course that I offered was all about gdb, hexdumps, buffer overflows, and format string vulnerabilities.  As a textbook, we used &lt;a href=&quot;https://www.barnesandnoble.com/p/hacking-jon-erickson/1100353326/2673794901631?st=PLA&amp;amp;sid=BNB_DRS_Marketplace+Shopping+Textbooks_00000000&amp;amp;2sid=Google_&amp;amp;sourceId=PLGoP20420&amp;amp;k_clickid=3x20420&quot; rel=&quot;noreferrer&quot;&gt;Hacking&lt;/a&gt;, by Jon Erickson.&#xA; AP CS A was a prerequisite of the course, though I permitted students to join the class if they were currently enrolled in that course, as long as we had a discussion outlining expectations first.  There were no mathematical prerequisites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course was designed with the assistance of a Navy officer. The students practiced fuzzing and hacking (admittedly insecure) programs on old, virtual systems.  This was quite deliberate!  I didn't start by asking, &lt;em&gt;&quot;what will the kids be able to gain entry into at the end?&quot;&lt;/em&gt;  Instead, I posed this question to the officer: &lt;em&gt;&quot;High school students are also quite young, so there is little pressure to give them useful skills right now. CTF competitions abound, and my students are already joining those. What is hard to pick up from CTFs, but nevertheless is ultimately quite central? What can we offer them that will help them develop into top minds in this field in the future?&quot;&lt;/em&gt;  And that became the central mantra of the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything was done by hand at a *nix prompt, and they got a fair amount of practice reading and examining hexdumps.  By the end, they could look at a hexdump and see at a glance where, for instance, the text strings were stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was ultimately a computer science course on binary and hexadecimal, on system variables, and on the intricate operations of a runtime stack.  As an additional bonus, they all got pretty adept at navigating a bash prompt.  The students kept asking for network hacking as well, though we didn't have time to get that far.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The material was quite dense and unintuitive.  (Though, I suppose, if these practices were intuitive, they wouldn't have been vulnerabilities in the first place.)  It was an extremely difficult class, although the material itself kept the kids pretty interested, so you will have that working in your favor if you go down this road.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-07-30T23:34:52.823" LastActivityDate="2017-07-30T23:34:52.823" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3025" PostTypeId="2" ParentId="4" CreationDate="2017-07-31T02:48:15.470" Score="2" Body="&lt;p&gt;I'm a big fan of using real-world data in as many class assignments in APCS A as possible.  Small example:  I was trying to prove to a group of people just how bad the weather had been in Denver in May 2015.  Bad meaning an abundance of precipitation.  Off I went to NOAA's website to gather weather precipitation data for Denver for all years on record.  Found an Excel file.  After cleaning it up a bit, I had two columns, one for date and one for units of precipitation.  Started to write a program to read that data in from the file.  I had a choice to make.  Would I want to create two parallel arrays - one for the dates and one for the units of precipitation?  Easy enough to do, but what if i accidentally sorted one array and not the other?  Then my data would be corrupt.  That brought me to my second option:  create a Weather object that has two fields, date and precipitation. That way I could create one array of Weather objects with no chance of the dates and units of precipitation going askew.  Simple example (no need for inheritance or polymorphism).  Powerful result.  &lt;/p&gt;&#xA;" OwnerUserId="2145" LastActivityDate="2017-07-31T02:48:15.470" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3026" PostTypeId="2" ParentId="2998" CreationDate="2017-07-31T08:08:36.260" Score="2" Body="&lt;p&gt;It seems that many answers here are not addressing the point of inheritance on styling, as this should also be taught. The basic rule is what's read last will be applied.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;the first to load is usually the external sheet in the head of the document.&#xA;A style sheet linked in the head of the document will be over ridden by styles placed inline in the html body, and those in turn will also be overridden by styles placed directly on the DOM element. The !important tag can be used to alter this behaviour also. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most will put all their css into its own file because it's easier to maintain and won't require as much work when updated/changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Just to clarify a bit further, it is only the specific styles that match in the classes that will clash/override each other, if the one inline adds a style to underline text, that is not in the class in the external sheet for example it will just add that extra styling. The classes do not directly replace each other but merge into each other.&lt;/p&gt;&#xA;" OwnerUserId="2332" LastEditorUserId="2332" LastEditDate="2017-07-31T11:13:31.007" LastActivityDate="2017-07-31T11:13:31.007" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3027" PostTypeId="5" CreationDate="2017-07-31T08:48:52.800" Score="0" Body="&lt;p&gt;Scheme is used as the programming language in Structure and Interpretation of Computer Programs (An MIT course, set of &lt;a href=&quot;https://www.youtube.com/watch?v=2Op3QLzMgSY&quot; rel=&quot;nofollow noreferrer&quot;&gt;videos&lt;/a&gt;, and &lt;a href=&quot;https://mitpress.mit.edu/sites/default/files/6515.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;book&lt;/a&gt; ) &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Scheme is a functional programming language and one of the two main&#xA;  dialects of the programming language Lisp. Unlike Common Lisp, the&#xA;  other main dialect, Scheme follows a minimalist design philosophy&#xA;  specifying a small standard core with powerful tools for language&#xA;  extension.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Scheme was created during the 1970s at the MIT AI Lab and released by&#xA;  its developers, Guy L. Steele and Gerald Jay Sussman, via a series of&#xA;  memos now known as the Lambda Papers. It was the first dialect of Lisp&#xA;  to choose lexical scope and the first to require implementations to&#xA;  perform tail-call optimization, giving stronger support for functional&#xA;  programming and associated techniques such as recursive algorithms. It&#xA;  was also one of the first programming languages to support first-class&#xA;  continuations. It had a significant influence on the effort that led&#xA;  to the development of Common Lisp.&#xA;  — &lt;a href=&quot;https://en.wikipedia.org/wiki/Scheme_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-07-31T10:39:52.070" LastActivityDate="2017-07-31T10:39:52.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3028" PostTypeId="4" CreationDate="2017-07-31T08:48:52.800" Score="0" Body="Scheme is a functional programming language, actually a dialect of Lisp. This tag is for all questions related to the teaching of the Scheme programming language. " OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-05T16:29:00.860" LastActivityDate="2017-09-05T16:29:00.860" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3029" PostTypeId="2" ParentId="3022" CreationDate="2017-07-31T09:19:49.240" Score="1" Body="&lt;p&gt;An important and fairly contained topic is to introduce the impact of technology changing. As software designers, we will make assumptions which have a critical impact on security. Bunnie interposed a break-out connector on his Xbox ROM, and now we have &lt;a href=&quot;http://adamsblog.aperturelabs.com/2013/01/fun-with-masked-roms.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;OpenCV&lt;/a&gt; to read ROMs directly. Assumptions about how much crypto $100 of compute will buy you change (sometimes in big steps - 10 years ago, you couldn't buy fast cycles without buying the hardware yourself). BGA reflow used to be an expert operation (with X-ray analysis), now people go it in their toaster...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These changes over time mean that the attack surface will also tend to expand - complex indirect hacks can become trivial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The impact of this is that any secuity system which can't be updated will become insecure - fairly certainly.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-07-31T09:19:49.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3030" PostTypeId="2" ParentId="2998" CreationDate="2017-07-31T10:03:31.847" Score="6" Body="&lt;p&gt;Well ask yourself: Why do we separate anything in any form of code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In almost every single programming/scripting language there is separation and delegation. We do this to make sure that we are more easily able to keep track of all the code and are able to more easily identify issues (that will inevitably sprout because no programmer is infallible)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I think that a dedicated lesson on CSS is a good idea, because it helps them understand what is responsible for which. It helps them understand that if all the HTML is correct when looking at the source, but all the makeup is still jumbled, that they need to look to the CSS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On top of that, CSS is large, flexible and can do a lot more than just putting a nice border around things. To show the class what it can do, and how complex it can get, will drive the point further home how it's unwise to blend the HTML and CSS too deeply.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In the end, separation of CSS from HTML (or any code for that matter) is a development atticate; its not about the creation functioning (better) its about the developer having more and easier control over their creation.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe on that note you want to try and make the class check each others work, it'll help them see how it's important to have clean delegated code when you work in a team.&lt;/p&gt;&#xA;" OwnerUserId="2335" LastEditorUserId="204" LastEditDate="2018-02-08T00:41:50.673" LastActivityDate="2018-02-08T00:41:50.673" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3031" PostTypeId="2" ParentId="2998" CreationDate="2017-07-31T12:35:17.440" Score="5" Body="&lt;p&gt;A slightly different way of looking at it might be to introduce &lt;strong&gt;DRY&lt;/strong&gt; code (Don't Repeat Yourself).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By using CSS to do the styling, you know that by simply adding a class to a HTML element, the styling should take hold.  If you had to manually add it all, then when you need to change one part, you need to change many, many more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To steal an idea of illustration from &lt;a href=&quot;https://www.w3schools.com/cssref/sel_nth-child.asp&quot; rel=&quot;noreferrer&quot;&gt;W3 Schools&lt;/a&gt;, if you wanted, say, paragraphs to have different background colours, you could do it this way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;p style='background-colour:red'&amp;gt;Paragraph 1&amp;lt;/p&amp;gt;&#xA;&amp;lt;p style='background-colour:blue'&amp;gt;Paragraph 2&amp;lt;/p&amp;gt;&#xA;&amp;lt;p style='background-colour:red'&amp;gt;Paragraph 3&amp;lt;/p&amp;gt;&#xA;&amp;lt;p style='background-colour:blue'&amp;gt;Paragraph 4&amp;lt;/p&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But, if I want to change the order so it's 2,4,3,1 but keep the colouring, I then have to change all of the styles built in to each tag.  If that's across multiple pages, then the work load can be come huge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I did it in CSS, I can do the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;p:nth-child(odd) {&#xA;    background: red;&#xA;}&#xA;&#xA;p:nth-child(even) {&#xA;    background: blue;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it no longer cares what the content is, I can order them how I like and the styling still works.  Lots of effort changed.  Ignoring the ordering, if I wanted to change them to more sensible colours so they are easily readable, I change the value in CSS once, and it's applied to each matching DOM item.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that (as CSS can be embedded in HTML in the head tag), splitting it out into a file and including that means I don't have to repeat my (now more sensible) CSS into various files, down into folder structures for each page I have.  I include the CSS file in the header and the styles take effect.  Now if I need to make changes to the colours or add additional styles, I get the same benefits of not needing to duplicate which I had from not using inline styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another benefit from having a separate file, away from the split responsibilities, is performance.  Browsers are pretty good at caching files, so if it has to download a single (ideally minified) CSS file for the site once which it can then reapply, it's one less thing for it to download for other pages.  Performance should always be a consideration for people, especially with the increase in mobile browsing.  If a web page has a lot of CSS in it then the source is, naturally, large.  This takes longer to download and/or become usable, which may put people off it the wait becomes unacceptable to them.&lt;/p&gt;&#xA;" OwnerUserId="984" LastActivityDate="2017-07-31T12:35:17.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3032" PostTypeId="2" ParentId="2874" CreationDate="2017-07-31T13:42:36.387" Score="2" Body="&lt;p&gt;Generally I feel one element should be core when it comes to this and that is readability. From my own experience when I was just starting off with programming I'd always explicitly define my scopes. That is  to say every if opens with a condition, followed by an &lt;strong&gt;encapsulated&lt;/strong&gt; (series of) statement(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point for me back then was to &lt;strong&gt;get rid of ambiguity&lt;/strong&gt; when you aren't experienced in recognizing scope and the flow of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I feel that &lt;strong&gt;at first&lt;/strong&gt; you should try and teach your students a very clear and obvious way of coding. Ternary operations (i.e. the ? operator) tend to be hard to grasp when inexperienced, so try and stick to always &lt;strong&gt;start from&lt;/strong&gt; the more explicit code, and then as you come across your N'th if statement in your example you show them alternatives. That way, you'll let them know you can make the code more interesting, without pushing them to do so and get confused in all the options there are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then when they get more comfortable and experienced I feel you should slowly make your code more and more implicit and add some more sugar to it. That way you can be sure that once you explain it, everyone will get it fairly quickly, and it gives them the freedom appropriate for their skill level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point here being that you want to let your students know you &lt;strong&gt;can&lt;/strong&gt; do these things but advice them to get the basics down first. Then after repetition, and you yourself steering more to actual proper code, I reckon many students will pick and choose what they themselves are most comfortable with, which you can use to actually understand and support them better as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So, think of it as an inverse funnel, you start them off straight and reliable, and as they learn more and more, you give them more options and freedom.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2335" LastActivityDate="2017-07-31T13:42:36.387" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3033" PostTypeId="1" CreationDate="2017-07-31T14:13:14.070" Score="7" ViewCount="975" Body="&lt;p&gt;What activities, and with what resources, are effective for students to learn about the status and consequences of inequities in computing resources? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Activities could address inequities within a community or across the globe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt;&#xA;The Advanced Placement™ CS Principles course has two &quot;essential knowledge&quot; (EK) statements related to this topic:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;EK 7.4.1C The global distribution of computing resources raises issues of equity, access, and power.&lt;/li&gt;&#xA;&lt;li&gt;EK 7.4.1D Groups and individuals are affected by the &quot;digital divide&quot; - differing access to computing and the Internet based on socioeconomic or geographic characteristics.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The AP framework indicates these objectives should be associated in the classroom with the computational thinking practice of &quot;connecting computing&quot; by finding ties among computing concepts, impacts of computing, and connections between people and computing. My question is not necessarily constrained that way, though it seems inherent in achieving the objective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I came across a resource on this topic that I wanted to share. A related question here did not exist, so I intend to share the resource in an answer but not to imply that the resource or lesson format I share is the best one. Please share other resources and lesson formats!)&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-07-31T14:50:43.023" LastActivityDate="2017-08-11T03:34:45.980" Title="How do I teach about inequity in computing resources?" Tags="|resource-request|social-context|ap-cs-principles|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3034" PostTypeId="2" ParentId="3033" CreationDate="2017-07-31T14:23:00.803" Score="5" Body="&lt;p&gt;This seems to me to be the sort of topic that is best covered with an assignment such as&lt;/p&gt;&#xA;&lt;h3&gt;Write a paper, citing resources, on the topic of XYZ.&lt;/h3&gt;&#xA;&lt;p&gt;There are a number of other things that can be addressed this way. One advantage of such an assignment is that students have to write using natural language, which often gets too little attention in technical fields.&lt;/p&gt;&#xA;&lt;p&gt;Another advantage is that you can have the work done in pairs or teams.&lt;/p&gt;&#xA;&lt;p&gt;Another advantage is that you can follow up with class discussion, seeking consensus on the problem.&lt;/p&gt;&#xA;&lt;p&gt;You can, of course, provide them with an initial set of resources so that they are forced to look beyond Wikipedia and other easily found resources.&lt;/p&gt;&#xA;&lt;p&gt;You can also ask for critique of the resources that they find, not just reporting. You can even have a debate. Lots of possibilities since the topic is both serious and open ended.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-07-31T14:23:00.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3035" PostTypeId="2" ParentId="3033" CreationDate="2017-07-31T14:24:23.763" Score="4" Body="&lt;p&gt;Have students &lt;strong&gt;analyze data&lt;/strong&gt; about the inequity of access to computing resources, and facilitate the discussion of &lt;strong&gt;an assigned reading&lt;/strong&gt;. Here's one procedure for doing that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students could be asked to read an article (ideally containing tables or figures with large amounts of data with analysis in the text of the article) and write a few sentences about an article as homework. &lt;/li&gt;&#xA;&lt;li&gt;In class, students could discuss in groups of 2 or 3, each presenting one figure or section of the assigned article to their group. &lt;/li&gt;&#xA;&lt;li&gt;Facilitate a whole-class discussion. The discussion could be structured around a sequence of questions such as &quot;How could this issue be addressed with policy, and what might be the beneficial and adverse consequences of such a policy?&quot;&lt;/li&gt;&#xA;&lt;li&gt;Assign a follow-up writing assignment. The assignment could give students practice writing about a particular line of argument. For example, to practice writing about the beneficial and harmful effects of a computing innovation with respect to data flows (one of the two AP CS Principles open-ended assessment tasks), the writing prompt could posit an innovation that makes it easy and cheap to provide Internet access to remote locations and asking students to write about the impacts including analysis of data flows.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is one article, covering many countries and focused on data about adolescents, that could be used for this purpose:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.weforum.org/agenda/2016/07/rich-and-poor-teenagers-spend-a-similar-amount-of-time-online-so-why-aren-t-we-closing-the-digital-divide/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.weforum.org/agenda/2016/07/rich-and-poor-teenagers-spend-a-similar-amount-of-time-online-so-why-aren-t-we-closing-the-digital-divide/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The graphics in this article are rich with both data and data concepts. The article summarizes a more exhaustive primary source.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-08-11T03:15:52.493" LastActivityDate="2017-08-11T03:15:52.493" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3036" PostTypeId="2" ParentId="2874" CreationDate="2017-07-31T14:42:58.077" Score="2" Body="&lt;p&gt;While I agree with &lt;a href=&quot;https://cseducators.stackexchange.com/a/2880/1293&quot;&gt;this answer&lt;/a&gt; that the conditional expression is more than just sugar, I think the following consideration is important in many languages: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the student can be led to always &lt;em&gt;writing&lt;/em&gt; with a consistent and clear style that avoids tricks and obfuscations, he/she will also need to be able to read code of others who take less care. So, especially in a language like Perl, which seemingly has an endless number of ways to do things, being able to read may be as important as being able to write. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all, the text of a program is normally read more often by humans than by computers, especially if the program is important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is all the more reason to develop a good style, but also shows why the less-explored corners of the language need light shed on them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that in some organizations, not using an approved style will (WILL) get you reprimanded. Some might treat the idea that you should fully brace every  compound statement (if, while,...) in Java as syntactic sugar, but I treat it as essential. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, some things that look like syntactic sugar are really well developed idiom in that language. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-07-31T14:42:58.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3038" PostTypeId="1" CreationDate="2017-07-31T16:17:06.333" Score="7" ViewCount="874" Body="&lt;p&gt;How can I illustrate the difference between $\lor$ and $\oplus$ in a way that isn't just boring?  Are there fun ways to illustrate and provide practice for this small, yet key, distinction?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-03T20:11:08.150" Title="Differentiating Inclusive from Exclusive Or" Tags="|boolean-algebra|" AnswerCount="5" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3039" PostTypeId="2" ParentId="1394" CreationDate="2017-07-31T16:59:54.150" Score="2" Body="&lt;p&gt;There are a few Stack Exchange sites you might want to check out:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://opendata.stackexchange.com/&quot;&gt;Open Data&lt;/a&gt;: Open Data Stack Exchange is a question and answer site for developers and researchers interested in open data.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://datascience.stackexchange.com/&quot;&gt;Data Science&lt;/a&gt;: Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://stats.stackexchange.com/&quot;&gt;Cross Validated&lt;/a&gt;: Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But taking a step back, you might want to teach the meta-lesson of finding data in the real world. There are a ton of APIs and open-source data repos out there, and finding them is a very important skill by itself- plus it give students a way to actually use their skills after the class ends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of just giving your students a flat file, have them come up with their own. Maybe they use an API from a product they use, like &lt;a href=&quot;https://dev.twitter.com/rest/public&quot; rel=&quot;nofollow noreferrer&quot;&gt;Twitter&lt;/a&gt;, &lt;a href=&quot;https://developer.spotify.com/web-api/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spotify&lt;/a&gt;, or &lt;a href=&quot;https://developers.google.com/youtube/&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube&lt;/a&gt;. If that's too advanced for the students to do, then maybe you spend a class coming up with the dataset together, with you writing the code and the students talking about what would be interesting to see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or just searching for &quot;XYZ datasets&quot; returns a ton of results. Have the students come up with datasets related to stuff they're interested in.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-07-31T17:45:54.807" LastActivityDate="2017-07-31T17:45:54.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3040" PostTypeId="2" ParentId="3038" CreationDate="2017-07-31T17:42:29.490" Score="7" Body="&lt;h2&gt;Play the “if you have brown hair stand up” game.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For the introductory lesson. We use this to introduce selection (if statements), and a little bit of boolean logic.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“Stand up if you have got brown hair.”&lt;br&gt;&#xA;  “Sit down.” look around “Stand up if you have blue eyes.”&lt;br&gt;&#xA;  …&lt;br&gt;&#xA;  With out asking them to sit down “Stand up if you …”&lt;br&gt;&#xA;  Address why some people are still standing, are they correct [yes], or are the seated people correct [no]. Why? [because I did not ask them to sit].&lt;br&gt;&#xA;  …&lt;br&gt;&#xA;  “stand up if you have brown hair or you are …” (this is where we start to cover Boolean logic, I have only done and, or, not).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In another lesson you could add &lt;code&gt;xor&lt;/code&gt;, &lt;code&gt;nand&lt;/code&gt;, &lt;code&gt;nor&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Xor examples&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“if you have blond hair or you have blue eyes stand up”&lt;br&gt;&#xA;  “if you have blond hair xor you have blue eyes stand up”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2017-07-31T21:39:59.073" LastActivityDate="2017-07-31T21:39:59.073" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3041" PostTypeId="2" ParentId="2750" CreationDate="2017-07-31T18:33:59.680" Score="1" Body="&lt;h2&gt;Guess who&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/IdxPn.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/IdxPn.jpg&quot; alt=&quot;An adult and a kid about to start playing a giant “guess who” game, in a hall exhibiting games&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This game is about guessing which person the other player has. You get to ask a question to which the other player must answer yes or no. The best strategy is to ask a question that will eliminate exactly half of the remaining cards (an opportunity to also teach binary search). The game is designed to make it impossible to ask any simple question that will achieve this goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore you must ask compound logic questions, such as “Is this person wearing any thing on their head, that is a hat or glasses or a bow“ or even “Is this person female or (wearing a hat xor wearing glasses) or got a beard.“&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each board you will need two players, and at least two judges/watchers.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-07-31T18:33:59.680" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3042" PostTypeId="2" ParentId="3038" CreationDate="2017-07-31T18:40:59.457" Score="5" Body="&lt;p&gt;You might go about explaining it by using the words &quot;either&quot; and &quot;or&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Either&quot; means that any option out of two available would be enough:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;perfect indifference of the two (or more) things. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But also &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;to emphasize the mutual exclusiveness: &lt;em&gt;either&lt;/em&gt; of the two, &lt;em&gt;but not both&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(taken from Oxford English Dictionary).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that xor is true only when either one is, but not when neither are true or neither are false. The key point to stress is &lt;em&gt;&quot;either one&quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for practice, you can ask the students to come up with 3-4 properties (boy\girl, reads many books\doesn't read many books, etc.) that some students have and some don't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first property, ask every student who has that property (can't think of a better word &lt;code&gt;:/&lt;/code&gt;) to write in their notebooks the numer 1 (they might ask &quot;where should I write it?&quot;, it doesn't matter that much as long as there's room for a few more numbers). Students who don't have that property should write &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then go through the other properties (or &lt;em&gt;conditions&lt;/em&gt;) and for each one, ask every student who has the current property to do the following: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they have written the number &lt;code&gt;1&lt;/code&gt; for the previous property, to write the number &lt;code&gt;0&lt;/code&gt; (maybe next to the &lt;code&gt;1&lt;/code&gt;)&lt;br&gt;&#xA;Every student who didn't write &lt;code&gt;1&lt;/code&gt;, should do so.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every student who doesn't have the current propery, should copy what they wrote for the last property.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reaching the fourth property, ask students to check if the last number is &lt;code&gt;1&lt;/code&gt;. If it is, ask them to reflect whether they have either one of the properties, but not an even number. Explain that this is what xor does: only if an odd number of conditions is fullfilled, is the result &lt;code&gt;true&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, after they understand this point, go through the 4 properties again but this time ask the students to write &lt;code&gt;1&lt;/code&gt; as soon as you get to a property they have, and 0 if they don't have the current property. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every student that has a &lt;code&gt;1&lt;/code&gt;, is a student that an OR operator would result in &lt;code&gt;true&lt;/code&gt;, had they been passed as a parameter (if they are high-school students, they might find being called &quot;parameters&quot; intriguing and this might make more students listen during the lesson).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By comparing the results for the first practice with the one from the second practice, the difference between OR and XOR becomes quite clear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way to make it unquestionably clear is to show the truth table of each operator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(you iterate the properties)&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-07-31T18:40:59.457" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3043" PostTypeId="2" ParentId="3038" CreationDate="2017-07-31T21:39:13.933" Score="2" Body="&lt;p&gt;I wouldn't bother trying to tie this in to English language. Exclusive or is a strange connective. For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$a \oplus (b \oplus c)$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;means &quot;An odd number of ($a$, $b$, $c$) is true&quot; (you can see this by working out the truth table). In general if you stack up disjuncts like this, exclusive or means &quot;an odd number of these disjuncts is true&quot;; it is the binary odd counting function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No connective in natural language behaves in this way, and definitely not English 'or'. For this reason, you should not use the English language to clarify exclusive or.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'or' in &quot;You may have ice cream or cake (but not both)&quot; is not even a disjunction, because you can infer from it that you may have ice cream. From a real disjunction like &quot;He is in Paris or London&quot;, you can't infer that he is in Paris. Unfortunately, most elementary logic textbooks get this wrong; this highlights the confusion you get when you try to make formal logic clearer by comparing it to natural language. Math is perfectly clear; natural language is a complete mess : )&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the simplest clarification of the difference between these two connectives is by comparing it to the difference between &quot;At least one of these two things is true&quot;, and &quot;Exactly one of these things is true&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2349" LastEditorUserId="2" LastEditDate="2017-08-03T20:11:08.150" LastActivityDate="2017-08-03T20:11:08.150" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3044" PostTypeId="1" AcceptedAnswerId="3056" CreationDate="2017-08-01T12:16:11.260" Score="10" ViewCount="3319" Body="&lt;p&gt;Occasionally I have students who are 'under-motivated': they put way too little effort in to trying to memorize any of the textbook, any idea, each diagram I draw. I used to think that perhaps some people are &quot;not suited&quot; for some kinds of learning, but I threw that idea out: it is insubstantiable, and it is not my job to decide who is in the class anyway!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a raft of reasons why (adult) students could be having difficulties. They might have issues with medical conditions, medications, anxiety, depression, unstable home life, economic concerns... But these are not my purview either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that the students can do the work if they work rightly, and that I can teach them if I teach rightly, what are some ways to deal with students who seem lost, have insufficient background knowledge, are unused to thinking in programming terms, who have issues with their energy, or are distracted... What are some effective ways to improve teaching in these situations (aside from the obvious of dealing with the cause, which is &lt;em&gt;not in my scope&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-01T12:22:29.937" LastActivityDate="2017-08-01T22:20:39.717" Title="Dealing with students who are underly-motivated" Tags="|student-motivation|differentiation|" AnswerCount="8" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3045" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T12:39:57.687" Score="1" Body="&lt;p&gt;&lt;strong&gt;Disclaimer: I'm not a teacher myself so take this with a grain of salt if you must.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing motivates a person more than to feel that they, and their work matters. If your students feel unmotivated I feel you should try and take a look at your own behavior that is unrelated to what you are actually teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See, if anyone wants to learn how to do anything on the computer, technically anyone can go to the internet and try and learn it themselves. So I personally feel that the teacher within this all is responsible far more so to motivate the students in learning  what they probably already know they should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that drawing diagrams and showing them how its done is an important part of this all, as it helps them understand and learn more easily, but showing genuine interest and concern for the needs and wishes of the students is far more important than simply explaining things in a structural and orderly fashion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'd say to try and ask your students what THEY want to focus on in class. If they struggle with X, but you teach them Y, a lot of people will just get frustrated with the things you didn't teach them (to their feeling) sufficiently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally always felt very motivated to, and know that almost all my former classmates did too, when the teacher would tell us what we'd be doing first, giving some examples, then converse with the class about what they understand and don't about what you just explained to them. Given time constraints it'd be best to focus on what the majority wants and needs, and then give more personal attention and support to the students that have more or specific needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also remember that positive reinforcement (especially nowadays) is far more powerful than negative. In other words, compliments, even if small, will have a far greater impact than to tell them that they'll fail if they don't keep up. &lt;strong&gt;If you can show a positive and supportive side of you, then your students will want to work for their own sake and for the sake of doing their good teacher proud.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2335" LastActivityDate="2017-08-01T12:39:57.687" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3046" PostTypeId="2" ParentId="3038" CreationDate="2017-08-01T12:54:54.843" Score="3" Body="&lt;p&gt;Think pizza shop. You order a one-topping pie.  Would you like pepperoni &lt;code&gt;or&lt;/code&gt; sausage?  In common parlance, that's an exclusive or.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-01T12:54:54.843" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3047" PostTypeId="2" ParentId="2998" CreationDate="2017-08-01T13:09:44.553" Score="3" Body="&lt;p&gt;We teach that there are three layers to a web page:  structure, appearance, and behavior.  Structure is determined by the DOM, which is created with well-formed HTML5 markup.  When we learn about HTML, we immediately begin drawing the document tree, so we can understand how elements on a page relate to each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Appearance is determined by CSS, which accesses the DOM to format and style the page.  This is kept in a separate file so that it can be shared by a related group of pages.  HTML handles ad hoc situations using &lt;code&gt;id&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt;.  Using these makes maintaining pages easier, since the style for items bearing these attributes is made in &lt;em&gt;one place&lt;/em&gt; in a CSS file.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third layer is behavior, which should appear in a JavaScript file.  JavaScript &lt;em&gt;never&lt;/em&gt; needs to appear on a page, save for calling functions from event-handling code. Even this can be attached in a JS file.  Make sure your students know about &lt;code&gt;load&lt;/code&gt; events and &lt;code&gt;onload&lt;/code&gt; early, so they can delay the calling of code until page elements exist.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you install Node, you can run tests of JS code at the command line, and develop test suites for the functions you have created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Separating the three layers keeps things neat and maximizes re-use of code. &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-01T13:09:44.553" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3048" PostTypeId="2" ParentId="2965" CreationDate="2017-08-01T13:13:34.500" Score="1" Body="&lt;p&gt;One of the dangers of &quot;playing without a net&quot; and of responding to student input in real time is that of having something not work.  This is a teaching opportunity.  We ask: What went wrong?  Can we use our suite of tools (browser dev tools, documentation, debugging technique) to deal with the brokenness?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want your students to see how you confront and overcome problems.  This is a behavior that professional programmers engage in every day.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-01T13:13:34.500" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3049" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T13:22:58.247" Score="4" Body="&lt;h3&gt;Play on their terms&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First you should either know what qualities some of those students have. Are they competitive? are they bookworms or maybe enthusiastic about other subjects (for example, physics or biology)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know these things (which can be discovered with a simple &lt;em&gt;mandatory&lt;/em&gt; questionnaire of some sort), then a few options branch out:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Class Competition&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;there are many ways to go about this, but my personal favorite is to divide them into groups (the entire class, with the under motivated ones fairly distributed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask each team to create a program that would complete some given problem that is related to the most recent subject taught. The team that writes the least complex or the fastest or one that's best by some other criteria is the winner (and gets some prize which isn't related to grades). Make sure to take note of the participation of the under motivated students in each team. Emphasize that team members should try to encourage one another to participate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would work quite well for the competitive students, including the under motivated ones.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. Reading assignment&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can casually mention at the end of some lesson that the material for this lesson is freely available in &amp;lt;some book name&amp;gt;, and you highly recommend reading it, even if one isn't so interested in the topic. Of course, make sure that the book you tell them about actually &lt;em&gt;is&lt;/em&gt; recommended even for people who are not furvant fanatic for the topic (online book reviews can say so). This gets those who are bookworms interested in the topic, or at least it gets them up to scratch in the subject.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. Inter-subject project&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For the students who are interested in other subjects, you can suggest they try to make a project in computer science, that has to do with the other subject. A physics simulation, a biology-related program (I have near to nothing knowledge in biology, so this is the best example I have, but don't worry; your students who are interested in a subject usually come up with a good idea for a project that combines both subjects) or something else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This option depends entirely on the students' enthusiasm in other subjects. But students are rarely uninthusiastic in all subjects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to encourage them to do something that they want to do, but that also involves Computer Science. This would both teach them much, and show them reasons for being motivated to learn Computer Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This solution obviously won't work for every single situation, but with some tweaking it does cover a wide variety of students.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-08-01T13:22:58.247" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3050" PostTypeId="2" ParentId="3022" CreationDate="2017-08-01T14:18:50.093" Score="5" Body="&lt;p&gt;I have taught various levels of Information Security, from basic security at schools and university to &quot;extreme hacking&quot; for experienced professionals at global security consultancies. Currently I'm the Research Director for ISACA Scotland, with a remit to work with Education to build syllabi and training for the next generation of security practitioners, and I have a fairly broad view on what should be incorporated here. It does make for multiple books, but as headline topics, I'd suggest:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;networking&lt;/li&gt;&#xA;&lt;li&gt;system architecture (Windows, Unix, others)&lt;/li&gt;&#xA;&lt;li&gt;a variety of languages (assembler, Object Oriented, classic languages such as COBOL, Forth, java etc)&lt;/li&gt;&#xA;&lt;li&gt;Security concepts (safes, locks, alarms etc) and their relationship to cyber concepts (firewalls, IDS etc)&lt;/li&gt;&#xA;&lt;li&gt;entry level Crypto&lt;/li&gt;&#xA;&lt;li&gt;capture the flag&lt;/li&gt;&#xA;&lt;li&gt;red and blue teaming&lt;/li&gt;&#xA;&lt;li&gt;social engineering&lt;/li&gt;&#xA;&lt;li&gt;containers, virtualisation, cloud and everything-as-a-service&lt;/li&gt;&#xA;&lt;li&gt;logs and logging&lt;/li&gt;&#xA;&lt;li&gt;forensics&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But there is so much more you could add in... Probably worth getting the syllabus from various universities and schools with security faculties, and build from them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And more importantly, visit &lt;a href=&quot;http://Https://security.stackexchange.com&quot; rel=&quot;noreferrer&quot;&gt;Security Stack Exchange&lt;/a&gt; where security queries can be tackled by heaps of skilled and experienced security practitioners.&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2017-08-01T14:18:50.093" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3052" PostTypeId="1" CreationDate="2017-08-01T15:47:13.540" Score="9" ViewCount="196" Body="&lt;p&gt;We had a question over at &lt;a href=&quot;https://academia.stackexchange.com/questions/93877/are-phd-supervisors-responsible-for-informing-students-about-legal-issues-pertai&quot;&gt;academia.se&lt;/a&gt; about what responsibility a PhD supervisor has for teaching students about the use of human subjects in research. In some fields it is obvious that a research methods course needs to touch on the ethical use of humans in research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While some areas of computer science (e.g., theoretical computer science and compiler design) likely do not use human subjects, other areas may include the use of human subjects. As I am not an expert in CS, using &lt;a href=&quot;https://www.cs.washington.edu/research/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Washington University research topics&lt;/a&gt; as a guide, AI, computational biology, computer graphics, data science, HCI, NLP, robotics, and ubiquitous computing all seem like they could involve the use of human subjects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While most universities provide an &lt;a href=&quot;https://en.wikipedia.org/wiki/Institutional_review_board&quot; rel=&quot;nofollow noreferrer&quot;&gt;IRB&lt;/a&gt; or similar to protect human subjects, if students are not taught about them, how will they know the issues. Do, and should, a general CS education include a component addressing the use of human subjects in research?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example &lt;a href=&quot;https://academia.stackexchange.com/questions/124654/how-to-by-pass-bioethics-for-a-trivial-bio-experiment&quot;&gt;this question&lt;/a&gt; on academia.see is about a CS student that collected blood for testing imaging software.&lt;/p&gt;&#xA;" OwnerUserId="276" LastEditorUserId="276" LastEditDate="2019-02-09T17:52:11.657" LastActivityDate="2019-02-09T17:52:11.657" Title="Does/should a CS education include information about responsible use of human subjects in research" Tags="|curriculum-design|ethics|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="3053" PostTypeId="2" ParentId="3052" CreationDate="2017-08-01T16:19:13.337" Score="4" Body="&lt;p&gt;Although it's unclear how human subjects might somehow be used in CS &lt;em&gt;research&lt;/em&gt;, I think that such ethics should be taught in all fields, and not just CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Indeed, it is not needed more in CS than in Biology (where humans often times really are the subject). But I'll address some of the examples you gave:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two examples you gave which I can imagine can somehow have human subjects are NLP and AI. Which is actually AI and AI (often times). Algorithms in Artificial intelligence often learn from human examples, which means humans provide examples. If this you consider this to mean that the humans is a subject, then there you have it: it's used in research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for education, the ethics of &lt;em&gt;using human subjects in research&lt;/em&gt; should be taught regardless of the field of education (unless this is criminology; and it isn't). Students should be taught these ethics and as far as reason goes, they are subject (pun intended) to review. These reviews would not allow un-ethical research to be conducted without a very good reason (such as a newely discovered disease which might wipe humanity and there are 3 infected people on the planet; again, highly unlikely that something of the sort can happen in CS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, yes. A general education (generall, regardless of CS) in CS should include a component regarding these ethics. (as well as other ethics, like not to do plagiarism).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-08-01T16:19:13.337" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3054" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T17:05:44.013" Score="7" Body="&lt;p&gt;You've mentioned before that your students are adults who are attempting to make a career change to a programming role. With that in mind, I think the best thing you can do is &lt;strong&gt;show them how what you're teaching helps them achieve that goal.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think about it from their perspective: &lt;em&gt;I'm an (older?) adult, who has had a &quot;real job&quot; for the last &lt;code&gt;X&lt;/code&gt; years. Now I'm trying to change careers. I want to know how to get a new job, and how to perform the tasks of that new job. So it's hard for me to sit in a classroom and memorize stuff from a textbook and from lecture slides.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You and I know that memorizing that stuff &lt;strong&gt;will&lt;/strong&gt; help them in their new careers, but that's not always obvious to students- especially novice programmers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my suggestion is to always make sure that your lessons directly tie into their goals. Find out what kinds of applications they plan on working on. Make the first assignment a very basic version of that. With each lesson, build on that assignment so that every step gets them closer to a &quot;real life&quot; end product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of saying &quot;okay now you have to memorize that&quot; and pointing to some lecture slides or a textbook chapter, ask &quot;how can we improve our product?&quot; and then show them concrete things they can do to make those improvements. The lectures and the textbook become references that help get them to their end goal, which I think is easier for professionals to digest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a concrete example, let's say your goal application is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Point_of_sale&quot; rel=&quot;noreferrer&quot;&gt;point of sale system&lt;/a&gt;. Maybe your first application is a command-line program that mimics a basic transaction. Then the next assignment introduces variables by having different items with different costs. Then maybe the next assignment introduces &lt;code&gt;if&lt;/code&gt; statements that apply coupons. Then you could have a lesson on creating a basic GUI, or using &lt;code&gt;for&lt;/code&gt; loops to repeat actions, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's just a dumb example off the top of my head, but you get the idea: use your students' goals as a motivator, and tie your lessons directly into those goals. At the end of your course, students should have specific concrete &lt;strong&gt;usable&lt;/strong&gt; information and a newfound ability to accomplish their goals.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-01T18:49:17.933" LastActivityDate="2017-08-01T18:49:17.933" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3056" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T17:32:47.883" Score="5" Body="&lt;p&gt;There are no substitutes for talking to the student.  You can make guesses, try new activities, or shift things around in your course, but you are shooting blind until you actual figure out what is going on with the human being in front of you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find a moment to sit down with the student, explain what you are seeing, and ask them whether that matches their perception.  Sometimes it doesn't match, and you will discover something about the student that you didn't know.  Perhaps they are painfully shy, or perhaps they have habits (such as &lt;a href=&quot;https://interpersonal.stackexchange.com/questions/1131/fidgeting-in-a-polite-way&quot;&gt;fidgeting&lt;/a&gt;) that make them appear to be inattentive when they're really listening.  You'll never know if you don't ask.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the student has the same perception, then you must figure out the next steps together.  Here are some considerations:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there something about the course structure that you should change?  (It's okay to change aspects of an entire course for just one student. If one is falling apart due to some course issue, it is probably bothering other students as well, even if they cope with it better.)&lt;/li&gt;&#xA;&lt;li&gt;Is there some way that you can help the student by checking in frequently?  (Hello, repeating calendar events!)&lt;/li&gt;&#xA;&lt;li&gt;Is the issue entirely unrelated to the course?  (Depending on the issue, I would implore my colleagues to be open-minded about extensions, or even flatly modified requirements. Sometimes people encounter difficult times in their life, and a little flexibility from you can make &lt;strong&gt;all the difference in the world&lt;/strong&gt; to the student.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ultimately, the student is a unique person.  Approach them with a loving, open mind, and the right answer will often become clear.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-01T17:32:47.883" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3057" PostTypeId="2" ParentId="3052" CreationDate="2017-08-01T19:00:53.423" Score="8" Body="&lt;p&gt;I would mention it in any class in which it is relevant, such as User Experience or where &lt;a href=&quot;https://en.wikipedia.org/wiki/A/B_testing&quot; rel=&quot;noreferrer&quot;&gt;A/B testing&lt;/a&gt; might be used to show different users different versions of a website and measure their behavior. Because such research is ubiquitous (consider &lt;a href=&quot;http://www.thesempost.com/google-testing-both-lighter-darker-blue-links-in-search-results/&quot; rel=&quot;noreferrer&quot;&gt;Google's testing different shades of blue&lt;/a&gt;), Facebook was unprepared for &lt;a href=&quot;https://www.technologyreview.com/s/528706/facebooks-emotional-manipulation-study-is-just-the-latest-effort-to-prod-users/&quot; rel=&quot;noreferrer&quot;&gt;the backlash against their emotional manipulation study&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-08-01T19:00:53.423" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3058" PostTypeId="2" ParentId="3038" CreationDate="2017-08-01T19:35:08.230" Score="4" Body="&lt;p&gt;I enjoy using cartoons in my teaching, such as &lt;a href=&quot;http://www.toothpastefordinner.com/index.php?date=071310&quot; rel=&quot;nofollow noreferrer&quot;&gt;this one&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/iNlPM.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/iNlPM.gif&quot; alt=&quot;Boolean Hair Logic&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also teach students the &lt;a href=&quot;https://en.wikipedia.org/wiki/XOR_swap_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;XOR trick&lt;/a&gt; for swapping two values without using intermediate storage:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;X := X XOR Y&#xA;Y := X XOR Y&#xA;X := X XOR Y&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://en.wikipedia.org/wiki/XOR_swap_algorithm#Proof_of_correctness&quot; rel=&quot;nofollow noreferrer&quot;&gt;correctness proof&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-08-01T19:35:08.230" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3059" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T20:33:21.790" Score="2" Body="&lt;p&gt;Talk about why you need to learn things.  Talk about the purpose behind learning.  Have a philosophical discussion and treat their ideas with respect instead of talking down to them like kids, and ask them for solutions to modern problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them what the purpose of computers is.  Everyone will have their own philosophy, but in my opinion, computers are here to make our lives easier.  For thousands of years man has worked in the dirt to survive, and many still do which we rely on for food. (farmers)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since we have an industrialized society, computers are the backbone of any serious business/service.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use simple examples to make your point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Identify how many computers they rely on to get to class.  There's a computer running the smart phone alarm clock, there's a computer supporting the car/bus.  There's a computer that runs the gas station pump.  There's a computer that runs the checkout line at the grocery store.  Talk about life without computers and imagine what that would be like, as a mind exercise and they will see the value of computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computers excel at automation.  If you have a bunch of identified tasks that need to be done quickly, you could create a script in excel vba. Start with easy languages, especially if its introductory programming, like vba or python with easy syntax.  If they like it, cover traditional strongly typed languages later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with programs they use and identify what they wish the app could do.&lt;br&gt;&#xA;Driverless cars can save lives and reduce traffic congestion.  As a show of hands who wants to sit in traffic for 2 hours every day?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computers can fix these problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them what you know, and why.  Hope it helps;  Good luck &lt;/p&gt;&#xA;" OwnerUserId="2364" LastEditorUserId="2364" LastEditDate="2017-08-01T20:40:20.040" LastActivityDate="2017-08-01T20:40:20.040" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3060" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T21:03:07.603" Score="4" Body="&lt;h2&gt;Have you considered the &lt;em&gt;social&lt;/em&gt; aspect of your class?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For most people, I don't think there's anything more motivating than working towards &lt;strong&gt;something you want&lt;/strong&gt; with &lt;strong&gt;people you like&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And even if you're doing hard, boring, or confusing work, if your friends are doing it, you'll want to give it a shot too. If your buddies are excited about their future in the field, then you'll very likely become excited too. It's &lt;em&gt;peer pressure&lt;/em&gt;. It's infectious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the reason that &lt;strong&gt;cohort models&lt;/strong&gt; are so powerful. With more time around a group of people, taking all the same classes at the same time, you build deep bonds that make you more excited to come to school every day. &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Proximity_Principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;Proximity is the strongest predictor of friendship&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used this approach to build strong cohorts among students I worked with (18-25yo college students). This is done by frequent teambuilding, constantly mixing up their seating, active learning, pair programming, talking about how they are a cohort, calling them a cohort, reiterating how we're all working together towards our goal, etc, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my setting, students were excited about graduating with their CS degree and getting a great job. Sounds like it could be similar in your case. I'm sure this looks a little bit different for older adults, but everyone loves being part of a group that's going somewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My recommendations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make sure students have repeated time and activities to become friends with others in the class. The classroom environment &lt;em&gt;must&lt;/em&gt; be friendly and welcoming.&lt;/li&gt;&#xA;&lt;li&gt;Emphasize the amazing outcomes of completion of their program&lt;/li&gt;&#xA;&lt;li&gt;Form cohorts, if possible. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;People talk a lot about how being a good employee often depends on how much you like the people you work with. I wonder why we don't talk about the classroom in the same way.&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-08-01T21:03:07.603" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3061" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T21:03:14.987" Score="1" Body="&lt;p&gt;First, be cautious of labeling everyone who appears not to be keeping up with the amount of work you'd expect from them as &quot;under-motivated.&quot; You hinted at this, but there could be lots of things that could be affecting the amount of work they do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got my Master's degree as an adult learner, and it was a very different experience than when I was a full-time undergraduate. It's definitely very challenging because there's a lot more you have to take care of as an adult that you wouldn't necessarily have to worry about as a &quot;regular&quot; undergraduate. So yes, it &lt;em&gt;is&lt;/em&gt; more difficult to stay motivated as an adult student, and adult students are juggling a lot more responsibilities than just school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had the experience of (at least feeling) unmotivated in a particular class because it was initially unclear what it was good for. Quite bluntly, it seemed like a really dumb way of doing stuff that I already knew how to do. It wasn't until later that I realized that it was actually laying a foundation for later courses, and that the interesting applications came later. If they had said that from the outset I would've found it a lot easier to be motivated in the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Make sure you explain why the stuff you're learning is important - don't just assume that your students know why the subject is worth learning in the first place. And, for that matter, make sure that the stuff &lt;em&gt;is&lt;/em&gt; important - for example, don't force memorization of stuff that you can easily look up.&lt;/p&gt;&#xA;" OwnerUserId="1299" LastEditorUserId="1299" LastEditDate="2017-08-01T22:20:39.717" LastActivityDate="2017-08-01T22:20:39.717" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3062" PostTypeId="2" ParentId="3044" CreationDate="2017-08-01T21:30:07.943" Score="2" Body="&lt;p&gt;From early on, show how programming can be used to accomplish cool stuff.  Here is a very simple Python example.  Get a text file with a book in it; the Gutenberg project is a great source. Open it and use &lt;code&gt;read&lt;/code&gt; to suck it into a giant string.  Now see how many words the file contains. Is the word &quot;syzygy&quot; to be found?  Can you figure out how many times a given word is used?  Can you find out if a particular phrase is used?  How can you use Python's string methods to explore it?  Only very basic ideas are needed to do this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give programming some punch by doing some &quot;cheap parlor tricks&quot; that will attract student attention.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, here is my musing on memorization.  You end up memorizing only a small amount of stuff while programming.  You need to know about the basic form of loops, functions and other programming constructs. But that's small stuff.  You will wind up memorizing things you use often for the simple reason that it &lt;em&gt;saves work&lt;/em&gt; and helps you to code faster.  However, you should emphasize that Google and documentation searches can help you find more esoteric stuff.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python has turtle graphics.  JavaScript has the wonderful Canvas object. Get this stuff out when you are teaching looping.  You can have a lot of fun drawing cool art.  There is a universe of fun and exciting toys out there. (Can you download a web page programmatically and search it for words?)  Engage your kids in unearthing, understanding, and applying it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Above all, write tons of code in front of your kids. Engage their opinions and get them to contribute ideas and whole segments of code.  Encourage a little friendly competition and get them to generate and discuss competing solutions to a given problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS can be tons of fun.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-01T21:30:07.943" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3063" PostTypeId="1" AcceptedAnswerId="3064" CreationDate="2017-08-01T22:30:34.513" Score="6" ViewCount="851" Body="&lt;p&gt;As part of my class, pupils have to learn what a virus is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for a better way to explain viruses or a better metaphor than the biological virus. The problem with a biological virus as a metaphor is that if we follow it to its logical conclusion, then if there is even the slightest problem in the metaphor, it will interfere with students reasoning down the line, which could lead to false conclusions and confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was at university in (1991), we were told some simple rules for the computer lab:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No drinking or eating in the lab.&lt;/li&gt;&#xA;&lt;li&gt;Don't hit the computers, poke anything into them, or try to take them apart.&lt;/li&gt;&#xA;&lt;li&gt;Don't switch them off (someone else may be using it).&lt;/li&gt;&#xA;&lt;li&gt;Don't worry, &lt;strong&gt;if you tell it to do something and it breaks then it is our fault not yours&lt;/strong&gt;. Our job is to keep them from breaking, we do this by using good quality software. These is security to stop you from breaking it for any one else. If you break it for you, then come and see us, and we will fix it. If you break the security, and we encourage you to try, then do not do anything malicious as this is immoral and criminal, just come and see us and tell us, so we can fix the software bug, and give you your prize.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;We are now telling students that they can easily break the computer by clicking the wrong button. This includes infecting a computer with a virus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not happy with the normal descriptions of a virus, as these put all of the blame onto the virus writers, and all of the responsibility onto the user/children.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Some descriptions that I have seen.&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.businessdictionary.com/definition/computer-virus.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;“each requiring a different cure”&lt;/a&gt;&#xA;Why? There are thousands of viruses, but only a small number of vulnerabilities. Viruses take advantage of vulnerabilities. Would it not be easier to fix the vulnerabilities.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.bbc.co.uk/guides/zcmbgk7&quot; rel=&quot;nofollow noreferrer&quot;&gt;“prevention better than cure”&lt;/a&gt; (true). But goes on about how a virus scanner can check programs before you run them. This is putting the blame on to the viruses, and the responsibility on to the children.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;A better description?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Does anyone have a better way to describe a virus. How can we link it to real life; what the pupils already know.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="2" LastEditDate="2017-08-03T19:57:34.477" LastActivityDate="2017-09-14T07:37:56.050" Title="What is a good way to explain computer viruses?" Tags="|teaching-analogy|security|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3064" PostTypeId="2" ParentId="3063" CreationDate="2017-08-01T22:30:34.513" Score="1" Body="&lt;p&gt;To explain what a virus is, it is easier to also explain what a virus scanner is.&lt;/p&gt;&#xA;&lt;p&gt;A virus is malicious software, that takes advantage of bugs in you computer's operating system, and applications. They can combine this with social engineering, to manipulate you into cooperating with the virus. One way to protect yourself is to use a virus scanner.&lt;/p&gt;&#xA;&lt;h1&gt;What is a virus scanner&lt;/h1&gt;&#xA;&lt;p&gt;Let be explain by using an analogy.&lt;/p&gt;&#xA;&lt;p&gt;Imagine you have a house (computer), and you want to protect its contents from criminals (viruses).&lt;/p&gt;&#xA;&lt;p&gt;So you come up with the following idea:&#xA;In front of each door you will put a security camera. It will scan every one that tries to enter the house. This camera is linked to a criminal records database. If it spots someone that is in the database then it will send you a text message, and let them in anyway. Or better it could lock them in a quarantine cell ( Better hope it does not misidentify you, because you could be stuck in there. The control panel to open the cell is on the outside).&lt;/p&gt;&#xA;&lt;p&gt;What are the problems to this system?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can become disconnected form DB. You could have a local copy of the database.&lt;/li&gt;&#xA;&lt;li&gt;Your local copy could be out of date. Keep you local copy synchronised.&lt;/li&gt;&#xA;&lt;li&gt;If someone has just started their life of crime, and is not on the database, then it lets them in.&lt;/li&gt;&#xA;&lt;li&gt;It treats everyone the same: You your husband/wife, your kids, family, dog, friends, neighbors, random strangers, are all let in (if they are not in the database).&lt;/li&gt;&#xA;&lt;li&gt;Did I mention people with a paper bag over their head, or a mask. They are let in as well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Why do we not use such a system for our houses?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is too expensive.&lt;/li&gt;&#xA;&lt;li&gt;It does not keep out every one that we want to keep out.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What better system could we use?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Instead of a list of people to keep out, have a list of people to let in.&lt;/li&gt;&#xA;&lt;li&gt;have fine grain control, allow some people into my house, fewer in to my private stuff.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What techniques do computers use to improve security?&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Patch security vulnerabilities, as soon as possible.&lt;/li&gt;&#xA;&lt;li&gt;Make it so that files are not executable by default. This stops naive users from running programs, no need to tell them not to run random stuff that they have downloaded, until the lesson on how to make a file executable.&lt;/li&gt;&#xA;&lt;li&gt;Make it so that users can not make there files executable (at least until they need this ability, and they have been taught about the dangers).&lt;/li&gt;&#xA;&lt;li&gt;Isolate users from each other and from the system.&lt;/li&gt;&#xA;&lt;li&gt;Provide a huge repository of trusted programs, and a cryptographicaly secure link to the repository, so that users don't have to download programs from the interweb.&lt;/li&gt;&#xA;&lt;li&gt;Have users use an immutable revision control system (so they can get stuff back after they mess up).&lt;/li&gt;&#xA;&lt;li&gt;Provide sandboxes, to run un-trusted programs in.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So why don't all systems do this?&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Not all vulnerabilities can be patched on legacy systems. That is some systems evolved from a very insecure system, and for backward compatibility not all vulnerabilities have been patched. It is interesting to note that MacOS X evolved from the insecure MacOS 9, but does not suffer from this problem.&lt;/li&gt;&#xA;&lt;li&gt;But the OS vendor does not always have the power to do this: most of the programs for the OS are proprietary, so the OS vendor is not allowed to put them into a repository.&lt;/li&gt;&#xA;&lt;li&gt;Yes you can do this on most OSs. However some OSs choose not to enable this, so as to make it easier to &lt;del&gt;use&lt;/del&gt; [cut your own foot off].&lt;/li&gt;&#xA;&lt;li&gt;Yes you can do sandboxing on most OSs, but if you can't trust the host, then you can't trust the sandbox.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Are there any computer systems that do it a better way?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Funny you should ask. Would it surprise you to learn that only one computer system does it so badly that, a virus scanner improves matters?&lt;/li&gt;&#xA;&lt;li&gt;But even MacOS X mentioned above can not do it all right. If the OS Vendor does not have the freedom it needs, then the system can never be secure.&lt;/li&gt;&#xA;&lt;li&gt;Some more secure systems are Debian Gnu/Linux (there are others). Ubuntu, RedHat and SUSE, are also good (but contain proprietary software).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Edit&lt;/h1&gt;&#xA;&lt;p&gt;I will also combine this with the vampire analogy of @Jay (&lt;a href=&quot;https://cseducators.stackexchange.com/a/3313/204&quot;&gt;https://cseducators.stackexchange.com/a/3313/204&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-14T07:37:56.050" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3065" PostTypeId="2" ParentId="3063" CreationDate="2017-08-02T02:24:43.800" Score="6" Body="&lt;p&gt;The concept of a &quot;computer virus&quot; IS already a metaphor: a metaphor for how human bodies are infected with malicious entities which contain instructions to cause our cells to make innumerable copies of... The virus! We don't need a metaphor to explain the metaphor, if the student knows what a cold is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You said: fix the few vulnerabilities. If we could prevent the virus from reproducing its RNA (and incorporating it in to our DNA in the case of retroviruses) then all viruses would be impossible. Unfortunately, the normal cells would not be able to do their job if that happened. So we are stuck with either catching all 200 cold viruses, or trying to inoculate against them, but they slowly change over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You said: use a virus scanner. The body has antibodies and white blood cells which watch for viruses, but the only way to program them is with a real or fake infection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that if we fully explain the actual metaphor, then common sense will do the rest. This is the idea behind using metaphors to explain things. The real question is why we created such vulnerable systems in the first place, so that you can &quot;get sick&quot; without doing anything wrong, or even being on the same side of the earth with the infecting agent? No biological system could have survived such a poor design. We might not either.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-08-02T02:24:43.800" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3066" PostTypeId="2" ParentId="79" CreationDate="2017-08-02T11:22:14.053" Score="2" Body="&lt;p&gt;Security vulnerabilities are just bugs. In your example the code does not do what it is supposed to do (keep the bad people out).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So treat them this way. “We have a bug. The program does not meet its security requirement of …”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The worse thing we can do (and I have seen this in classes), is to demonstrate bad code, unless it is part of a “What is wrong with this?”. I have seen a teacher present this as an example of how to do things (a lesson on selection).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if entered_password == &quot;fred1234&quot;:&#xA;    print (&quot;welcome&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have heard the argument that doing this properly would be do difficult for a beginner class. I agree. I would not try to fix this program. I would just present a different program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen a lot of bad practice taught, that then needs to be untaught latter on. When I was a software engineer, it was often me un-teaching new recruits. This was not easy when they were not good at critical thinking, and saw what they were taught as &lt;em&gt;truth&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-02T11:22:14.053" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3067" PostTypeId="2" ParentId="3063" CreationDate="2017-08-02T12:03:07.913" Score="7" Body="&lt;p&gt;Viruses, worms and other malware are actually just like physical infections in enough ways that I still think metaphors are the best way to educate from a basic level. Even the average home user knows that a virus scanner stops a large number of infections from ruining their PC.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge comes with explaining why virus scanners are so limited - most up until now only catch what they know about. So I like to use the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Malware is written to control your PC or to steal your login information for online banking etc. &lt;/li&gt;&#xA;&lt;li&gt;Your virus scanner will protect from tens of thousands of pieces of malicious software that it knows about.&lt;/li&gt;&#xA;&lt;li&gt;Behavioural analysis tools will pick up more malware, based on what it appears to do.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But because code is written by humans, there will always be vulnerabilities, and because there are criminals, there will always be malware that will get past these, and this is why layers of security are essential. These include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;User awareness (don't visit dodgy sites, don't click on suspect emails etc)&lt;/li&gt;&#xA;&lt;li&gt;Secure architecture (secure by design) &lt;/li&gt;&#xA;&lt;li&gt;Extensive monitoring and logging&lt;/li&gt;&#xA;&lt;li&gt;Understanding the threat environment&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2357" LastEditorUserId="150" LastEditDate="2017-08-02T12:05:36.870" LastActivityDate="2017-08-02T12:05:36.870" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3068" PostTypeId="2" ParentId="2998" CreationDate="2017-08-02T12:38:06.673" Score="1" Body="&lt;p&gt;There are lots of good answers here.  One point I haven't seen made yet is that content and design are often created by separate people or teams, and so having each defined with its own tools and language allows for the necessary separate workflows.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use an analogy. Automotive engineers don't choose car colors. Screenwriters don't generally do costume design.&lt;/p&gt;&#xA;" OwnerUserId="1564" LastEditorUserId="204" LastEditDate="2018-02-08T00:28:35.513" LastActivityDate="2018-02-08T00:28:35.513" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3069" PostTypeId="1" CreationDate="2017-08-02T15:42:28.120" Score="10" ViewCount="180" Body="&lt;p&gt;I currently coach our school's CyberPatriot team. (You can find information on the CyberPatriot competition &lt;a href=&quot;http://uscyberpatriot.org/&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;.) We are heading into our second year of competing. Last year we did pretty well for being a more casually organized team, but I'd love to bring in a stronger curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are &lt;a href=&quot;http://uscyberpatriot.org/competition/training-materials/training-modules&quot; rel=&quot;noreferrer&quot;&gt;helpful training modules&lt;/a&gt; provided for coaches, but for more advanced vulnerabilities, independent study and research is necessary for achieving at the highest level in the competition. In particular, the images students must &quot;secure&quot; encompass a wide range of operating systems. Last year had Windows 7, Windows 8.0, Windows 8.1, Windows 10, Windows Server 2008, and Ubuntu 14.04. Additionally, students used Packet Tracer to learn networking security through the Cisco Networking Academy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bottom line is that there is &lt;em&gt;a ton&lt;/em&gt; of potential information to cover, and there is a precise way to succeed at CyberPatriot. &lt;a href=&quot;https://www.uscyberpatriot.org/competition/Competition-Overview/how-the-competition-works&quot; rel=&quot;noreferrer&quot;&gt;This page&lt;/a&gt; explaining how the competition works details the point system: basically you earn points for doing a precise task in securing the system and lose points for making it less secure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is this: &lt;strong&gt;what resources can I use to strengthen my students' ability to succeed in this competition?&lt;/strong&gt; For context, they are doing it as an extracurricular activity, and any resource that is engaging for students to work though on their own is a bonus. They are highly-motivated, but since there is so much out there, it's hard to know where to begin since cybersecurity is not my background.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-08-04T16:36:47.867" LastActivityDate="2017-08-09T08:44:05.143" Title="Curricular Support for a CyberPatriot Club" Tags="|resource-request|security|extracurricular-club|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3070" PostTypeId="1" CreationDate="2017-08-02T15:42:40.803" Score="19" ViewCount="4221" Body="&lt;p&gt;The kinds of things that people with technical training can do have societal impacts, both for good and evil. Programmers are building the future. One future nightmare is &lt;a href=&quot;https://en.wikipedia.org/wiki/Skynet_(Terminator)&quot; rel=&quot;noreferrer&quot;&gt;Skynet&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many problems in the world have been caused by scientific hubris as well as the &lt;em&gt;Fallacy of the Last Move&lt;/em&gt;, a concept from Game Theory as it applies to Arms Control and other strategic thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unbound technologists, especially if amoral, can be very dangerous to the earth and its inhabitants. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it seems that future Software Developers need some training in ethical concerns. What, to you are the most important issues and where in the curriculum should they be taught? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that ethical issues can be simple or complex. Even something as simple a accepting buggy software can have ethical implications and such lessons can be taught in early courses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the other end of the scale is the question of how much a person owes to their employer vs to humanity as a whole. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What essential ethical practices do students need to be trained in? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What are effective ways of integrating ethics into the curriculum? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What are the first steps a teacher should take in integrating ethics into the curriculum?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A general discussion of Computer Ethics is: &lt;a href=&quot;https://plato.stanford.edu/entries/ethics-computer/&quot; rel=&quot;noreferrer&quot;&gt;https://plato.stanford.edu/entries/ethics-computer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-31T08:40:12.697" Title="What ethical practices do students (as potential software engineers) need to be trained in?" Tags="|curriculum-design|best-practice|ethics|" AnswerCount="10" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3071" PostTypeId="2" ParentId="3070" CreationDate="2017-08-02T16:36:51.190" Score="15" Body="&lt;p&gt;I'm going to begin by quoting Ken Thompson's Turing Award Lecture &quot;Reflections on Trusting Trust&quot; (&lt;a href=&quot;https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf&quot; rel=&quot;noreferrer&quot;&gt;link&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To what extent should one trust a statement that a program is free of&#xA;  Trojan horses? Perhaps it is more important to trust the people who&#xA;  wrote the software.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In my mind the first and most foundational lesson to impart is this: &lt;strong&gt;software, computers, technology -- these things are more about people than about code.&lt;/strong&gt; There is a trust from the end-user, whoever that user may be, that must not be violated. Users are not means to an end; they are the end. The code is the means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am reminded of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Categorical_imperative#The_Second_Formulation:_The_Formula_of_Humanity&quot; rel=&quot;noreferrer&quot;&gt;Second Formulation of Kant's Categorical Imperative&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Act in such a way that you treat humanity, whether in your own person&#xA;  or in the person of any other, never merely as a means to an end, but&#xA;  always at the same time as an end.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In terms of integrating ethics, the way to start in my mind is discussion. Early and often. Share news stories. Discuss implications of new apps students download. The first 12 minutes of &lt;a href=&quot;https://www.youtube.com/watch?v=8Ba7SgCN2XY&quot; rel=&quot;noreferrer&quot;&gt;this CS50 lecture&lt;/a&gt; cover the the Volkswagen/EPA scandal from 2015 and mention Ken Thompson's lecture. It is essential that awareness is built right from the beginning that software is everywhere and there needs to be an ethical code to guide that development. In my mind, while I wouldn't consider myself Kantian, I do think his point about means and ends is essential.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The AP Computer Science A curriculum outlines the following requirements under the major topics of the course:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;VI. Computing in Context&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;An awareness of the ethical and social implications of computing&#xA;  systems is necessary for the study of computer science. These topics&#xA;  need not be covered in detail, but should be considered throughout the&#xA;  course.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;A. System reliability&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;B. Privacy&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;C. Legal issues and intellectual property&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;D. Social and ethical ramifications of computer use&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Similarly, in AP CS Principles, students, as a part of the Explore Task, have this on their rubric for the assessment:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Analyzing Data and Information&lt;/strong&gt;: Identifies one storage, privacy,&#xA;  OR security concern. Explains how the concern is related to the&#xA;  computing innovation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The moral of the story here is that ethics must be discussed with students as soon as possible whether it is a high school AP course or an introductory computer science course at a university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This idea of &lt;strong&gt;trust&lt;/strong&gt; must be imparted to students, and it must be emphasized that the world of software engineering and computer science in general is not in a moral vacuum. It does no good to address a particular issue, say data privacy, without first contextualizing it within a larger ethical system, one that sees each user as an end, not a means, and as someone who is placing trust in you the developer.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-08-02T16:36:51.190" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3072" PostTypeId="1" CreationDate="2017-08-02T17:06:08.767" Score="2" ViewCount="100" Body="&lt;p&gt;While mentoring a &lt;a href=&quot;https://www.firstinspires.org/&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Information about FIRST®&quot;&gt;&lt;em&gt;FIRST&lt;/em&gt;®&lt;/a&gt; &lt;a href=&quot;http://www.firstlegoleague.org/about-fll&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Information about the FIRST® Lego® League&quot;&gt;LEGO® League&lt;/a&gt; team, I had a chance to show the kids (who are in an elementary school) how to use the &lt;a href=&quot;http://ev3info.weebly.com/creating-my-blocks.html&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;How to create a My Block&quot;&gt;My Block Builder&lt;/a&gt; tool while programming their &lt;a href=&quot;https://www.lego.com/en-us/mindstorms&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Information about the LEGO® Mindstorms robots&quot;&gt;&lt;em&gt;LEGO&lt;/em&gt;® Mindstorms&lt;/a&gt; robots.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A My Block is a combination of one or more blocks that are grouped into a single block. Once a My Block is created, you can use it in multiple programs.&lt;br&gt;&#xA;  &lt;sub&gt;From: &lt;a href=&quot;http://ev3info.weebly.com/creating-my-blocks.html&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;How to create a My Block&quot;&gt;LEGO® Mindstorms EV3 Information&lt;/a&gt;&lt;/sub&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's like defining an external function, but with blocks, and makes for great program shorteners (instead of having 20 or so blocks, 2 or three times, the students learn to make one single &lt;em&gt;My Block&lt;/em&gt;, 2 or three times). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the students seem to be forgetting, repeatedly, that this tool exists. Only when I point out &quot;why not use a &lt;em&gt;My Block&lt;/em&gt;, instead of copy-pasting a lot of blocks?&quot;, do they use the &lt;em&gt;My Block&lt;/em&gt; tool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like them to understand when they should use &lt;em&gt;My Block&lt;/em&gt;, (and hopefully &lt;em&gt;why&lt;/em&gt;, because it might give them insight on external functions later on, should they choose to study CS) without having me point out the tool. There are many use cases for &lt;em&gt;My Block&lt;/em&gt;, so giving them a list of situations doesn't work (I've tried, to incredible failure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to help the team members understand when they can and should use &lt;em&gt;My Block&lt;/em&gt;? &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="104" LastEditDate="2017-08-03T05:07:51.270" LastActivityDate="2017-08-08T19:04:13.700" Title="Teaching when to use MyBlocks" Tags="|block-based-programming|lego-mindstorms|" AnswerCount="3" CommentCount="4" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3073" PostTypeId="5" CreationDate="2017-08-02T17:35:06.070" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Lego_Mindstorms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lego Mindstorms&lt;/a&gt; is a series of kits for robot building, supplied by &lt;a href=&quot;https://en.wikipedia.org/wiki/Lego&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lego&lt;/a&gt;. The robots that can be built with these kits can be programmed using the Lego Mindstorms software that can be downloaded from Lego's website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The software is based on National Instrument's LabVIEW, and is a GUI-based flowchart program. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-03T01:27:59.547" LastActivityDate="2017-08-03T01:27:59.547" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3074" PostTypeId="4" CreationDate="2017-08-02T17:35:06.070" Score="0" Body="Questions related to teaching about the Lego Mindstorms robot development environment. Use this tag to ask about teaching how to use various tools and options of the development software. This tag can also be used to ask about different methods of instruction related to Lego Mindstorms Robot Building Kit." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-03T11:05:44.890" LastActivityDate="2017-08-03T11:05:44.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3075" PostTypeId="2" ParentId="3070" CreationDate="2017-08-02T19:19:41.203" Score="0" Body="&lt;h1&gt;The additional dangers of software over other engineering fields.&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;Who is in charge&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;All software is a form of artificial intelligence, by this I do not mean artificial consciousness (e.g. skynet, I Robot, ExMachina, robby, and every other robot from the movies). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that the probability of artificial consciousness arising soon is very low. However some form of artificial intelligence is in every bit of software. The danger is not the artificial intelligence, but who controls it. A lot of software to day is controlled by big corporations. Users of the software are not free to: choose how they use it; study how it works; make changes to it; share it with their friends. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore all software should be Free Software. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not referring to Open Source. Although (Software that is Free Software) ≈ (Software that is Open Source). I am referring to the concept of Free Software. The freedoms, for it is the freedoms that we need. These freedoms are also in the Open Source definition, but are usually over looked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am also not saying that all Free Software is ethical. There are many sides to being ethical. There may also be proprietary software that is more ethical than a particular bit of Free Software. &lt;strong&gt;Free Software is necessary but insufficient, to being ethical.&lt;/strong&gt; Just as obeying one of the 10 commandments is necessary but insufficient, to being good (Even obeying all of the law is insufficient).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“All these [laws] I have kept,” the young man said. “What do I still lack?”.&#xA;  He answered, “If you want to be perfect, go, …” &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What I am saying is about the ethicalness of the software, not of the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Free Software has nothing to say about money (except to say that you must be free to charge money for it). &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Artificial consciousness&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Just a small paragraph to counter what I said above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If some one interfaces a biological brain to a computer, and gives it power. That is the ability to do harm, then it probably will. Any disembodied brain will have no empathy. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-03T09:56:04.473" LastActivityDate="2017-08-03T09:56:04.473" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3076" PostTypeId="2" ParentId="3070" CreationDate="2017-08-02T19:34:02.510" Score="-1" Body="&lt;p&gt;There are certain unsolvable problems (I am not referring to NP), that seem solvable, and an apparent solution can be made and deployed. These systems can be used, but do not fulfil there requirements (security, privacy, …).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This differs from the case where the software lacks these features, because of poor workmanship (also an ethical issue), in this case it can not be done. I turn down the work, because it is impossible. The client thinks they need to find someone that is more clever, that can do it. Eventually they find someone that has no idea of the problems, that agrees to do the project. If the new supplier realises that it can not be done, and tells the client, then the process repeats, else a faulty product is delivered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example is electronic voting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is impossible to create an electronic voting system that meets all of the requirements. If we just have 2 of the requirements for a voting system.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Anonymity&lt;/li&gt;&#xA;&lt;li&gt;Trustable&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then we can not produce an electronic system, that can meet just these requirements. There are also other requirements, thus it is even harder (in the higher than infinity sort of way (∞+1 = ∞), therefore we don't need to look at the other requirements, to see how hard it is).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would you audit this system? You could check its source code, to see that it does the right thing (if you can read it, so every one involved would have to have a good enough level of CS, and know the language). Oh but how do we know that the system is running this code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every single solution to this problem, has a counter measure ( a dis-proof ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has not stopped these things from being deployed many times, and in countries that are considered to have a well run voting system.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;What is needed&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;A box, that you put all of your votes into, and out comes a count for each candidate. &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Possible solutions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;How do you know that the output is correct. Ah that is easy, you produce an audit trail. But now we have no anonymity. So we add encryption. But for it to be audit-able, anonymity can still be broken. (If you can check your own vote, then I can check your vote (if I torture you long enough, then you will give up your key).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;A solution that works, but does not use a computer.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The many boxes&#xA;  - you walk into a room (box1), and show your ID, your name is removed from the list, and you are given a voting sheet.&#xA;  - you walk into a subroom (box2), and make your mark on the sheet.&#xA;  - you then fold(box3) the sheet.&#xA;  - you leave box2 and walk to a locked box (box4), and place your sheet into it.&#xA;  - at all times observers (from all interested parties) are walking around box1, to check that the rules are being followed.&#xA;  - at the end box 4 is sealed.&#xA;  - latter box 4 is opened and the sheets counted. With lots of people watching. A set of totals is produced and announced. The sheets are put back in box 4, sealed and locked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have probably missed some detail, but this solution cannot be implemented electrically, because there is no way of putting people into the electronic boxes to observe. &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Some videos on this&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=w3_0x6oaDmI&quot; rel=&quot;nofollow noreferrer&quot;&gt;The problem&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=BYRTvoZ3Rho&quot; rel=&quot;nofollow noreferrer&quot;&gt;Some solutions&lt;/a&gt; I found a problem with all of these solution, as I was watching it (Did not have to sit and think for days).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ZM-i8t4pMK0&quot; rel=&quot;nofollow noreferrer&quot;&gt;Other stuff&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-29T14:20:15.703" LastActivityDate="2017-10-29T14:20:15.703" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3077" PostTypeId="2" ParentId="3072" CreationDate="2017-08-02T19:50:40.190" Score="2" Body="&lt;p&gt;Four relatively easy ideas would be to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Conduct periodic code reviews where you point out style issues like these. If you make code reviews a regular thing, the repetition should hopefully help students eventually start using functions independently. Since your students are in elementary school, this should obviously be a very lightweight and informal code review.&lt;/li&gt;&#xA;&lt;li&gt;Develop an automatic style checker for whatever language you're using to perform these sorts of style checks for them. (Hopefully, whatever language you're using is exportable into a text-based or otherwise structured format that actually &lt;em&gt;does&lt;/em&gt; permit this sort of analysis.)&lt;/li&gt;&#xA;&lt;li&gt;Heavily emphasize that if the students are at any point copying-and-pasting, they're doing something wrong. Make it clear that copying-and-pasting is a sin. (This is assuming whatever language you're using is actually usable enough to make this a truth rather then a lie.)&lt;/li&gt;&#xA;&lt;li&gt;Give them a short style guide to follow; include a note about eliminating redundancy using functions/myblocks in the style guide. This will probably be more effective with older students.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you have control over how students learn to code, a broader (and probably more effective) strategies would be to teach students how to use your MyBlocks/functions first and foremost, almost before anything else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is, teach them the absolute bare minimum functionality to make something happen, then teach them how to &lt;em&gt;decompose&lt;/em&gt; a large problem into smaller subtasks, and have them create a MyBlock for each subtask. I would do this first, before teaching them things like control flow, variables, etc... Basically, make the idea of &quot;refactoring&quot; and &quot;identifying subproblems&quot; one of your first lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hope is that if you make using functions/MyBlocks one of your very first lessons, they're less likely to pick up the bad habit of writing redundant code.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-02T19:50:40.190" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3078" PostTypeId="2" ParentId="3072" CreationDate="2017-08-02T21:04:18.477" Score="0" Body="&lt;p&gt;You need to show them the value of the MyBlocks (procedures): easier to modify, easier to read.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Get them to write a program that would need a procedure or cut and paste. &#xA;Then get them to make a small change. This will also be a small change to the code if they have made their own procedures, but a big change if they used cut and paste. Keep giving them these changes until they ask for a solution. Then use your teacher skills to remind them of the MyBlocks.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Show them two programs: one with cut and paste, one with MyBlocks. Have them in teams some with one version some with the other. Get then to work out what it does. Time them. Them swap over with a different example. Discuss why the version with MyBlocks was easier/faster to read.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I don't tend to focus on the memory saving aspect; memory is cheep, and early optimisation is a bad idea. “optimise for readability, and maintainability, (and big O, when they are older) let the compiler do the rest.”&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-08T09:20:15.600" LastActivityDate="2017-08-08T09:20:15.600" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3080" PostTypeId="2" ParentId="3033" CreationDate="2017-08-03T00:38:21.523" Score="0" Body="&lt;p&gt;By constructing and using simple examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Divide the class into two groups. One half gets to use calculators, the other half uses pencil and paper. Give the whole class the same test. Compare the average scores of the &quot;calculator&quot; and &quot;non-calculator&quot; groups.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2017-08-03T00:38:21.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3081" PostTypeId="2" ParentId="3070" CreationDate="2017-08-03T01:55:57.807" Score="3" Body="&lt;p&gt;Raise awareness of the issues, discuss historical (Therac 25 is an old but highly interesting case of software bugs directly causing people to get hurt) and current cases (EU/US safe harbor and followups - there is so much potential to go in-depth about what data protection means and what the risks are!), and maybe make the legal situation (especially international law!) part of the curriculum ... but don't try to &quot;train&quot; people towards any ethical viewpoint. The latter is in the end straight manipulation no matter how well intended, and something people should if at all be trained to guard against.&lt;/p&gt;&#xA;" OwnerUserId="2389" LastActivityDate="2017-08-03T01:55:57.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3082" PostTypeId="2" ParentId="2998" CreationDate="2017-08-03T01:59:07.023" Score="1" Body="&lt;p&gt;An important reason why inline styles are bad is code readability, plain and simple. In this case, an example should be enough to prove your point:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;style&amp;gt;&#xA;body {&#xA;  padding:0;&#xA;  margin:0;&#xA;}&#xA;article {&#xA;  margin:0.8em;&#xA;  background-color:rgba(255,50,60,0.7);&#xA;}&#xA;article span {&#xA;  font-family:sans-serif;&#xA;  color:grey;&#xA;  padding:0.5em;&#xA;  text-indent:5em;&#xA;}&#xA;&#xA;header {&#xA;  font-size:2em;&#xA;  text-decoration: underline;&#xA;  background-color:rgba(20,255,20,0.4);&#xA;  padding:0.3em;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&amp;lt;body&amp;gt;&#xA;  &amp;lt;article&amp;gt;&#xA;    &amp;lt;header&amp;gt;The Title&amp;lt;/header&amp;gt;&#xA;    &amp;lt;span&amp;gt;This is a super great article&amp;lt;/span&amp;gt;&#xA;  &amp;lt;/article&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Compared to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;body style=&quot;padding:0; margin:0;&quot;&amp;gt;&#xA;  &amp;lt;article style=&quot;margin:0.8em; background-color:rgba(255,50,60,0.7); font-family:sans-serif;&quot;&amp;gt;&#xA;    &amp;lt;header style=&quot;font-size:2em; text-decoration: underline; background-color:rgba(20,255,20,0.4); padding:0.3em;&quot;&amp;gt;The Title&amp;lt;/header&amp;gt;&#xA;    &amp;lt;span style=&quot;font-family:sans-serif; color:grey; padding:0.5em; text-indent:5em;&quot;&amp;gt;This is a super great article&amp;lt;/span&amp;gt;&#xA;  &amp;lt;/article&amp;gt;&#xA;&amp;lt;/body&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In addition to this example, without using classes and ids you make the DOM much harder to manipulate using javascript and you make it impossible to use pseudo-elements and some of the really nice CSS selectors such as &lt;code&gt;:nth-child()&lt;/code&gt; and &lt;code&gt;:first-child&lt;/code&gt;, to name a few.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-08-03T01:59:07.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3083" PostTypeId="2" ParentId="2998" CreationDate="2017-08-03T11:17:47.920" Score="3" Body="&lt;p&gt;Make a project in which the result is TWO completely different views of the &lt;em&gt;same document&lt;/em&gt;, eg a version that looks great on a big monitor and another that looks great on an iPhone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using not a static webpage but computer-generated, updateable documents will drive the point home even more, since embedding style information in the document generator will make it visibly more complex - the only options to mess with style will be either changing the document &lt;em&gt;generator&lt;/em&gt; with all the hassle involved or the &lt;em&gt;stylesheet&lt;/em&gt; which is exactly what you intended. Even better: Assign &lt;em&gt;two&lt;/em&gt; groups in separate corners of the room to do the document generating and the stylesheet parts - and regulate how specifications are communicated between the two.&lt;/p&gt;&#xA;" OwnerUserId="2389" LastActivityDate="2017-08-03T11:17:47.920" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3084" PostTypeId="1" AcceptedAnswerId="3087" CreationDate="2017-08-03T12:27:16.127" Score="3" ViewCount="187" Body="&lt;p&gt;In the UK we are also asked to include computing across the curriculum, in the same way that we are asked to include literacy and numeracy across the curriculum ( spelling, punctuation, grammar, reading, graphs, correct use of arithmetic and mathematical concepts).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teachers often deal with this by doing a lesson in the computer room, using MS-Word; Using I-Pads, or searching for stuff with Google. This is the “we have to use a computer” panic. But it is not very educational&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This has not always gone well: often a negative or neutral impact on computing, and if to much pressure is put on teachers to do this, then also a negative affect on the other subject as well. This is because most teachers are not computer science or IT teachers (I have heard some say “the pupils know more than I do”).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what can be done in other subjects, not to just use computers or to try to give experience of computers to the pupils, but to teach an aspect of computer science or IT whilst still remaining within their subject's specialty. In particular, what can we do to help in this process? For example: how to aid with computational thinking in other disciplines. Can this be done in such a way as to also aid our own students? &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2017-09-08T14:24:00.613" LastActivityDate="2017-09-08T23:27:04.230" Title="What can CS educators do to help teachers of other subjects include computing in their teaching?" Tags="|cross-discipline|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3085" PostTypeId="2" ParentId="3084" CreationDate="2017-08-03T12:27:16.127" Score="1" Body="&lt;h1&gt;Literature class&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;There are a lot of poetry, jokes and literature about computing.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_fictional_computers&quot; rel=&quot;nofollow noreferrer&quot;&gt;Books, plays, film etc&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;These can be good to study, and ask are they like real computers? Why not? What can we learn from them? &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I, Robot — Isaac Asimov&lt;/li&gt;&#xA;&lt;li&gt;Deep Thought from The Hitchhiker's Guide to the Galaxy —      Douglas Adams&lt;/li&gt;&#xA;&lt;li&gt;ANGEL 1 and ANGEL 2 from earth search — James Follett&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Poetry&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://wiki.c2.com/?AbortRetryIgnore&quot; rel=&quot;nofollow noreferrer&quot;&gt;Abort retry ignore&lt;/a&gt;&#xA;This come from MS-Dos, where the computer would say you to choose form the 3 options, but what ever you choose it would just ask again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once upon a midnight dreary, fingers cramped and vision bleary,&#xA;System manuals piled high and wasted paper on the floor,&#xA;Longing for the warmth of bed sheets, still I sat there doing spreadsheets.&#xA;Having reached the bottom line I took a floppy from the drawer,&#xA;I then invoked the SAVE command and waited for the disk to store,&#xA;Only this and nothing more.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=YnLHkNb_oOM&quot; rel=&quot;nofollow noreferrer&quot;&gt;Abort retry ignore performed&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&amp;lt; &gt; ! * ' ' # &lt;br/&gt;&#xA;   ^ @ ` \$ \$ -&lt;br/&gt;&#xA;   ! * ' $ , _&lt;br/&gt;&#xA;  % * &amp;lt; &gt; #4&lt;br/&gt;&#xA;  &amp;amp; ) . . /&lt;br/&gt;&#xA;  | { ~ ~ System Halted&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This transliterates to:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Waka Waka bang splat tick tick hash, &lt;br/&gt;&#xA;  Caret at back-tick dollar dollar dash. &lt;br/&gt;&#xA;  Bang splat tick dollar comma under_score, &lt;br/&gt;&#xA;  Percent splat waka waka number four. &lt;br/&gt;&#xA;  Ampersand right-paren dot dot slash, &lt;br/&gt;&#xA;  Vertical-bar curly_bracket tilde tilde CRASH.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;—Don Ehrhardt, Director, MIS&#xA;North Carolina, Wesleyan College&#xA;dehrhardt@ncwc.edu&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Unix&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There is no place like ~&lt;/li&gt;&#xA;&lt;li&gt;Put it in /dev/null&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;touch /this&lt;/code&gt;&#xA;error: can't touch ‘/this’: Permission denied&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[ Where is my brain?&lt;/code&gt;&#xA;[: Missing `]'.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;#!/bin/bash&lt;/code&gt; (hash bash slash bin slash bash — from the fist line of a shell script)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Those who do not understand UNIX are condemned to reinvent it, poorly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;In a world without walls or fences who needs windows or gates.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Networking&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There is no place like 127.0.0.1&lt;/li&gt;&#xA;&lt;li&gt;There is no place like ::1&lt;/li&gt;&#xA;&lt;li&gt;I want to dress up as a UDP packet for Halloween, but I don’t know if anyone will get it.&lt;/li&gt;&#xA;&lt;li&gt;I wanted to write an IPv4 joke, but the good ones were all already gone.&lt;/li&gt;&#xA;&lt;li&gt;Knock knock.&#xA;Who’s there?&#xA;SYN flood.&#xA;SYN flood who?&#xA;Knock knock.…&lt;/li&gt;&#xA;&lt;li&gt;A network packet walks into a bar. Bartender asks what’s wrong?&#xA;“Parity error.”&#xA;“Yeah, you look a bit off.”&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Songs&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Code monkey song — various videos&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=v4Wy7gRGgeA&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code monkey song&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=qYodWEKCuGg&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code monkey song&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=5W_wd9Qf0IE&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code monkey song&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;History&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In history, the history of computing could be taught. The focus would be history, with little technical knowledge needed (except what is needed to understand the history).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would include, the history of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The printing press.&lt;/li&gt;&#xA;&lt;li&gt;Telecommunications.&lt;/li&gt;&#xA;&lt;li&gt;Computing (calculations and mechanical mathematics).&lt;/li&gt;&#xA;&lt;li&gt;The type writer: why querty? [because it makes it easy to get it to work with the mechanical linkages] Why do we still use it? How easy is it to change, to something that is easier to learn?&lt;/li&gt;&#xA;&lt;li&gt;Television (computer monitors, you tube).&lt;/li&gt;&#xA;&lt;li&gt;Gaming.&lt;/li&gt;&#xA;&lt;li&gt;The office.&lt;/li&gt;&#xA;&lt;li&gt;Art / Animation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;Art&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;Pixel Art&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have recently seen some binary picture change t-shirts. See &lt;a href=&quot;https://www.youtube.com/watch?v=xuFj5FfKPns&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=xuFj5FfKPns&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pupils could make these in Art or textile classes. Each pixel is made with a thread through two sequins. If the sequins differ in colour then, when you rub your hand over them, that pixel will change colour. (Alternatively you could use sequins that are two colour.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can link this to how computers display images. Also explore how pixels are no longer noticed, if viewed from far away.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-09-08T12:02:36.250" LastActivityDate="2017-09-08T12:02:36.250" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3086" PostTypeId="1" CreationDate="2017-08-03T12:53:34.557" Score="7" ViewCount="119" Body="&lt;p&gt;I'm currently planning a new class at my school on prototyping with arduino (which could later morph into more pcb design). I'm stuck on my first hands on lesson. I want the students to see the capabilities of the arduino, but not do anything too complex because I'd hate to fry anything on day 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I considered the standard &quot;blink an LED&quot; hello world program, but that wouldn't take up an entire class period. I have an hour and a half, and all the students are using computers that have the IDE set up so I don't need to leave time for setup.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what would be a good first lesson? I haven't chosen a board yet, so please specify which board and why you've chosen that one. Wiring diagrams are welcome!&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="150" LastEditDate="2017-08-03T12:58:16.510" LastActivityDate="2017-08-05T16:31:37.193" Title="What's a good initial lesson for teaching arduino?" Tags="|introductory-lesson|arduino|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3087" PostTypeId="2" ParentId="3084" CreationDate="2017-08-03T12:58:26.693" Score="6" Body="&lt;p&gt;Every field has its own key issues and methodologies. History and Literature, for example, are very different from Computer Science.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it is in the interest of those in other fields to promote computational thinking. It is a skill that their students need and it can be a tool in their own work. However, to do this two things are necessary:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;First is to examine the current working practices in those other fields that use computational techniques in pursuit of their own goals. Literature, Science, Geography, History, Mathematics, the Social Sciences, all use computation for at least part of their normal work. This can be communicated to students and students can and should get practice in their use. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Second, and harder, is that it likely requires some collaboration, up to the level of team teaching, to bring good techniques to the fore for students. In other words, we in CS need to become servants to the other disciplines to help them deal with their own questions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Computational Thinking is a big deal in the US now. It can start very early in a kid's life. Piaget and The Montessori method took a shot at this long ago, with success. But it needs to go beyond just math, into, say, Algorithmics and Big Data. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-08T20:02:25.500" LastActivityDate="2017-09-08T20:02:25.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3088" PostTypeId="2" ParentId="3070" CreationDate="2017-08-03T13:28:28.437" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the first steps a teacher should take in integrating ethics into the curriculum?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would begin with practical, everyday topics which every student can relate to, and which are (should be) absolutely practically relevant in todays world from day #1 for every developer. Maybe based on current newspaper-level discussions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Privacy (being able to stay private when using an application, controlling who can see what you do)&lt;/li&gt;&#xA;&lt;li&gt;Data security (being able to protect your own data, e.g. in the context of a business)&lt;/li&gt;&#xA;&lt;li&gt;Personal data (being in control of data related to yourself as a human being; related but not equal to Privacy)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You should easily be able to find an abundance of concrete examples, let me give you some that come to mind:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Privacy: communicating with someone while being sure that nobody can read your chat. May it be your spouse (say when organising an expensive birthday present for them), your system administrator (when executing your function as a manager to discuss your subordinates with your boss, etc.), or the general public (obvious reasons...).&lt;/li&gt;&#xA;&lt;li&gt;Data security: Keeping contract offers away from competitors.&lt;/li&gt;&#xA;&lt;li&gt;Personal data: Keeping preferences, habits, interests etc. from prospective employers or insurance companies.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would ask the pupils to come up with their own, they should be able to find a lot of different things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This, then leads to your question: it is ethically important for everybody involved in the creation of software systems to further these things. I.e., not to be laizzes-faire about them, not to prioritize them lowly when budget or time pressure arises, not to actively violate them; on the other hand, to constantly remind/teach the stakeholders, who may not have an understanding of these matters, and so on.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2017-08-03T13:28:28.437" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3089" PostTypeId="2" ParentId="3086" CreationDate="2017-08-03T13:42:33.230" Score="2" Body="&lt;p&gt;HD44780. Classic 1, 2 or 4 line LCD alphanumeric displays. The protocol is simple, getting these to work perfectly in practice is gritty (the way similar looking displays can have very different visible address space breaks etc will teach problem solving). Best get a grab bag of all kinds of sundry displays based on that chip.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have someone (can be students) with some basic electronic prototyping skills wire them up - miswiring them usually leads to destroying them. &lt;/p&gt;&#xA;" OwnerUserId="2389" LastActivityDate="2017-08-03T13:42:33.230" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3090" PostTypeId="2" ParentId="3070" CreationDate="2017-08-03T16:59:00.520" Score="4" Body="&lt;h1&gt;None.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Yes, a bold statement, literally. So let me elaborate further.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You cannot cover all potentially relvant aspects of &quot;ethical practices&quot; in a computer science course. Assuming that this is a general, basic course, you simply cannot foresee the potential ethical questions that will arise for these students. One of them may work in the IT department of a hospital. He should not sell patients data to a pharma company. One of them may work in a bank. He should not disclose or manipulate the financial status of customers. Another one will design brain-computer interfaces. He should not use his abilities to alter the behavior of the subject in a non-ethical way (&lt;em&gt;whatever this means!&lt;/em&gt;). Another one may be responsible for implementing the emergency handling of a self-driving car, and the ethical implications of that are currently the subject of deeply philosophical (and still open) discussions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related to that is another problem: You can hardly ever foresee the ethical implications that your work may have. Although this example has been used ad nauseam (and may be considered as some sort of a fallacy), I like the comparison of computer science and a sharp knife: You may use it to stab someone, or to perform a life-saving surgery: The data analysis software for weather forecasts may be used to compute questionable credit scorings. The image analysis software that you're implementing to sort holiday photos may be used to identify people in surveillance camera images. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;(This has a huge potential for abuse. The fact that people could now argue that this &quot;helps to catch terrorists&quot; shows how difficult this topic is. The ethical discussion &lt;em&gt;itself&lt;/em&gt; is beyond the scope of this answer and this site. In fact, the examples here should only show &lt;em&gt;exactly&lt;/em&gt; this: You cannot summarize &quot;ethics&quot; on a few PowerPoint slides...)&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally, assuming that the students are in their 20's: It's too late. You will not convert an (ethically) &quot;bad&quot; person into an (ethically) &quot;good&quot; person by listing things that they could do but should not do. Acting responsibly (in an ethical sense) is nothing that can (or should) be tought alongside the basics of abstract data types, computer architecture or object oriented design...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To summarize, although most of the downvoters will likely not read up to this point: A computer science course is not the place to &lt;strong&gt;train&lt;/strong&gt; people in &lt;strong&gt;ethical practices&lt;/strong&gt;, as stated in the question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you may (or even &lt;strong&gt;may have&lt;/strong&gt; to) teach is &lt;strong&gt;awareness&lt;/strong&gt;. People should not act unethically (or just aid others in acting unethically) due to a lack of knowledge. Computer scientists, particularly in their later (practical) roles, for example, as IT administrators, have a lot of power, and thus, a lot of &lt;em&gt;responsibility&lt;/em&gt;. They should be aware of the fact that their knowledge or work (or a moment of carelessness) may literally destroy lifes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This awareness about the implications of their work is unrelated to ethics. Whether or not they use their powers in an ethical or unethical way is nothing that you can &quot;teach&quot; them.&lt;/p&gt;&#xA;" OwnerUserId="2393" LastActivityDate="2017-08-03T16:59:00.520" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3092" PostTypeId="1" AcceptedAnswerId="3094" CreationDate="2017-08-03T23:59:49.593" Score="11" ViewCount="6622" Body="&lt;p&gt;The textbook &lt;em&gt;Computer Organization and Design&lt;/em&gt; by Hennessy and Patterson uses a laundry analogy for pipelining, with different stages for:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;washing&lt;/li&gt;&#xA;&lt;li&gt;drying&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://caeq.info/wp-content/uploads/2016/12/washer-and-dryer-clipart-for-modern-style-go-back-gallery-for-washer-and-dryer-cartoon-15.jpg&quot; rel=&quot;noreferrer&quot;&gt;folding&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;putting away&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The analogy is a good one for college students (my audience), although the latter two stages are a little questionable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Latency, of course, is the time for a single load to go through all 4 stages, while throughput is the rate at which loads are completed. Without pipelining or parallelism, throughput is the reciprocal of latency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to present additional analogies that might be helpful to my students in understanding latency and throughput. I thought of comparing the latency for one student to go through college (4 years) with the rate at which the college graduates students (many per year) but realize there's parallelism in a college (multiple students in each year) in addition to pipelining (beginning to teach new students before old students have graduated).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are some good analogies for pipelining and the relationship between throughput and latency?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="27" LastEditDate="2017-08-09T14:59:22.883" LastActivityDate="2017-08-10T16:40:55.837" Title="What are some good real-life examples of pipelining, latency, and throughput?" Tags="|teaching-analogy|" AnswerCount="5" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3093" PostTypeId="2" ParentId="3092" CreationDate="2017-08-04T08:02:10.137" Score="3" Body="&lt;p&gt;Production lines in factories, eg. for assembling cars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theory, a single person could assemble a whole car from scratch. But they would need to memorize a lot of different steps and it would be hard for them to find an ideal working mode. For example, they might need very different clothes and tools for assembling the engine and painting the body. What is worse, the only way of speeding up production is assembling cars in parallel. Parallelising tasks this way does not scale well in the real world (eg. think of the logistics for getting the parts to every worker as you keep growing the number of parallel workers). In software and hardware design this also applies: (Task-)Parallelism introduces significant additional complexities into a system, so we can't blindly rely on it for scaling up indefinitely.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What factories do instead is, they break the assembly process down into distinct steps and then have each worker specialize in a specific step. This allows them to quickly learn how to complete that singular step as efficiently as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In software and hardware design this is also true: Finding the most efficient design for a single, self-contained step is way easier than optimizing a big system that does everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, breaking your assembly line into its parts has its caveats: You introduce additional overhead by eg. having to move the car from one assembly station to the next. So a single car might in the end still take longer to move through the assembly line than if one person did the assembly all by themselves. But we can compensate for that by making use of the fact that the steps are independent: As soon as the first car leaves my assembly station, I immediately start working on the next one, even though the previous car still has to reach the end of the assembly line before it's completed. The latency is the total time it takes for a car to pass through the complete assembly line. Throughput is how many cars the assembly line can complete per hour. Once the pipeline is full, this is determined by the time of the &lt;em&gt;slowest&lt;/em&gt; assembly step - the clock rate of the line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge in designing such a system is to find the sweet spot for how much work we can fit into a single step. If a single step gets too big, it again gets difficult to optimize. If it gets too small, the overhead of managing the line might be bigger than the actual work required for the assembly. But we also need to ensure that all tasks are about the same size: If a worker is able to complete a task significantly quicker than the clock rate, they will be forced to idle for the rest of their time until the next car is delivered to their station. All of this applies 1:1 to software/hardware design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, in our production line scenario we have a pretty ideal situation, as the different cars can all be assembled in isolation. If someone makes a mistake in assembling car A, that affects only car A but none of the others (unless the mistake somehow forces you to stop the complete production line). In hardware or software this is often untrue. For instance, deciding whether you take a branch in a CPU instruction pipeline often depends on the result of a previous operation. However, if that operation has not reached the &lt;em&gt;end&lt;/em&gt; of the pipeline yet, we might not have that information available. So we have to delay the execution of the branch until that information becomes available (&lt;em&gt;stall&lt;/em&gt; the pipeline). If we have a lot of those dependencies (often referred to as &lt;a href=&quot;https://en.wikipedia.org/wiki/Hazard_(computer_architecture)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;hazards&lt;/em&gt;&lt;/a&gt;), we might lose all our pipeline parallelism again and our throughput approaches the latency of the pipeline.&lt;/p&gt;&#xA;" OwnerUserId="1370" LastEditorUserId="1370" LastEditDate="2017-08-06T07:50:51.773" LastActivityDate="2017-08-06T07:50:51.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3094" PostTypeId="2" ParentId="3092" CreationDate="2017-08-04T08:05:57.257" Score="2" Body="&lt;p&gt;As usual, useful network analogies are buses:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bus leaving the central station sets out on route to its first intended stop.&lt;br&gt;&#xA;That's the first step. The process of the bus's route from the central station and back to it (the entire route) is a pipeline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this analogy, latency is the time it takes the bus to get back to the central station, and throughput would be that maximum number of times a bus completed its route (in a given timeframe - maybe 1 day).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latency might lengthen due to traffic (literally &lt;code&gt;;)&lt;/code&gt;) or due to packet load - high number of passengers boarding at some stations would cause the bus to be late to the following station, and so also increasing the time it takes to complete the route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example, the throughput is not &lt;strong&gt;exactly&lt;/strong&gt; the reciprocal of the latency. This can also convey the idea that messages can be delayed at the central station (for various reasons - compression etc.), and that counts towards the throughput but not the latency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every busride ends exactly where it started; every bus ride starts when the respective bus route is complete (bus number 9 can't start until bus number 9 completes its route). Again, there is some degree of parallelism, because some bus lines have multiple buses going about, but let's ignore that, and focus on bus lines in small cities, or those with short routes.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-08-04T08:05:57.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3095" PostTypeId="1" AcceptedAnswerId="3097" CreationDate="2017-08-04T09:13:58.173" Score="6" ViewCount="729" Body="&lt;p&gt;It's undeniable that Computer Science is a mixture of disciplines including science (the scientific method, some physics needed to truly understand how computers work at all levels, testing methodologies etc etc.) and maths (theoretical computer science, programming is essentially logic puzzles that equate to mathematical proofs - at least complex ones, algorithm analysis etc. etc.) and to some extent it's created it's own discipline in programmatic thinking and the learning and analysis of programming languages. - What are the disciplines of computer science/how important is maths in computer science/is it really a science? - are not the questions to be answered here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming Mathematical and Scientific knowledge are both important in computer science (which they are) - which do we train students to become principally? Is it most important for computer science students to be first and foremost scientists or mathematicians? e.g. in the first year of a CS course is it more appropriate to teach The Scientific Method. Structure of a scientific investigation. Hypotheses. Occam's razor. Controls. Correlation vs causation. Falsification. Examples such as intention to treat etc etc. Or is it more appropriate to teach Mathematical topics - matrix operations, algorithm analysis, complexity, logical expressions, etc etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or maybe a mixture of both? Maths is inherently important to science - but to what degree should budding computer scientists be taught mathematics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which skills and talents in the field of mathematics are beneficial to Computer Scientists?&lt;/p&gt;&#xA;" OwnerUserId="2329" LastEditorUserId="150" LastEditDate="2017-08-04T13:56:55.563" LastActivityDate="2017-08-05T00:09:04.083" Title="Should students be taught to be first and foremost: scientists or mathematicians?" Tags="|best-practice|mathematics|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3096" PostTypeId="2" ParentId="3095" CreationDate="2017-08-04T09:34:07.803" Score="2" Body="&lt;p&gt;While the mathematics themselves might not be overly useful (they are, but not so much a requirement, more of a partial need for some subfields), the mindset and way of thinking that comes with learning mathematics is very useful in Computer Science. This mindset is one of those beneficial skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Logical thinking is essential when writing any program, as it allows deep understanding of the flow of the software. Mathematics, both practical and theoretical increase logical thinking due to the fact that mathematical techniques often comprise of a few successive steps. Following these steps is a form of logical operations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This logical thinking is very useful in computer science, and for science in general. Mathematics, then, is an incredible way to boost one's ability to think in a logical way, providing a skill set which many would find useful in a Computer Science career.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-04T17:48:14.467" LastActivityDate="2017-08-04T17:48:14.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3097" PostTypeId="2" ParentId="3095" CreationDate="2017-08-04T09:37:38.623" Score="5" Body="&lt;p&gt;This answer addresses something very different from the other answer I posted on this question, which is why it merits its own answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost every field in computer science is built on some mathematical theory (this sentence is the only overlap between answers): &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The most basic: the number of options that an $n$ long binary number is $2^n$, and that's where it all starts (until Quantum computers come along, but that's something else)&lt;/li&gt;&#xA;&lt;li&gt;Algorithm correctness: proof by induction.&lt;/li&gt;&#xA;&lt;li&gt;The entire field of boolean algebra. Need I say more?&lt;/li&gt;&#xA;&lt;li&gt;The entire field of Machine Learning is nothing but computations of mathematical models (Neural networks are nothing more than the simplest of arithmetic calculations - weighted sums of weighted sums of...)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This list can go on and it strengthens the point that, regardless of learning mathematics before learning Computer Science (that is, learning math with the intent of learning basic Computer science), most applications of computer science are implementations of mathematical models. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that when learning a subfield of computer science, an introduction to the relevant mathematics is almost always necessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, being a talented mathematician surely would not harm one's level of understanding of those subfields of Computer Science. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-04T17:50:41.830" LastActivityDate="2017-08-04T17:50:41.830" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3098" PostTypeId="2" ParentId="3095" CreationDate="2017-08-04T10:39:31.033" Score="4" Body="&lt;p&gt;CS is neither Maths nor Science. Therefore teaching them as if one or the other is probably misplaced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maths are about &lt;em&gt;understanding&lt;/em&gt; and advancing certain logical mental models. It uses abstraction a lot and so does computing. But those are useful mental tools in most fields. That doesn't make History a subfield of Maths. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Sciences on the other hand are about &lt;em&gt;understanding&lt;/em&gt; the world itself. It uses a particular method of formulating hypotheses and testing them through experiment, accumulating knowledge of what is &quot;out there&quot;. Computing uses some of the conclusions of the Sciences, but isn't itself a science. Programmers, however, do use something like the scientific method when they need to document an old program, not really understanding how it works. You make a hypothesis about how it works and capture it in a test. Running the test is like an experiment. You learn something. Computer Forensics is similar. That isn't the main work of a computer scientist, however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some fields of computing are more mathematical than others. Information Theory, for example is fairly classified as a math. Theory of Computability is at the intersection of Philosophy and Mathematics. My daughter's first course in her doctoral program in Philosophy was indistinguishable from a computability course in a CS department. But those are subfields, meant to understand what is possible and what is impossible (or really very hard). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science is closer to engineering than to either Maths or Sciences. In CS we build things. We change the world. Neither the Maths (properly speaking) nor the Sciences have that goal. They are about &lt;em&gt;understanding&lt;/em&gt; not building. Even the theoretical aspects of computing are there to help us know what we can build.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, Ethics and the Social Sciences equally inform computing. Ethics tells us what we &lt;em&gt;should&lt;/em&gt; build. The social sciences tell us how to build systems compatible with the human who must interact with them (human factors analysis). Note that neither of these concerns has any relevance at all in Mathematics nor the (hard) Sciences. They are about understanding. Not building and affecting the world. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any aspiring computer scientist does well to take a broad view and to study a lot of things. One of my best ever Master's level students studied Art History as an undergraduate. She wanted to use computation in her art and decided to delve deeper. Others have been Lawyers or studied other unrelated fields in earlier incarnations. They had a good idea about &lt;em&gt;what&lt;/em&gt; to build from their earlier work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The earliest teaching in CS should inform the student as to the fundamental nature of the field as much as can be done. They are about to make a life-influencing decision and should know the consequences. Early on, they should be taught primarily as computer scientists: &lt;em&gt;builders of things&lt;/em&gt; who use tools from many domains to do so. My doctorate in Mathematics gave me no special insight into CS. I'd suspect a Physics PhD to say about the same. The tools they know are useful, but not for understanding CS itself. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-04T18:06:17.360" LastActivityDate="2017-08-04T18:06:17.360" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3099" PostTypeId="2" ParentId="3070" CreationDate="2017-08-04T14:47:02.973" Score="2" Body="&lt;p&gt;Think about what makes CS &lt;em&gt;just different&lt;/em&gt; from other fields. Ask the students to come up with lists and then discuss. I thought of these five things in about 2 minutes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Automatic equipment can do unexpected things and cause harm. Industrial machines have large signs that say &quot;Might automatically begin moving.&quot; We have to consider unintended operation.  &lt;/li&gt;&#xA;&lt;li&gt;Computers are now so widely deployed that they can affect vast numbers of people all over the globe, now and over time. &quot;To err is human, to &lt;em&gt;really&lt;/em&gt; foul things up requires a computer.&quot; Or several billion...  &lt;/li&gt;&#xA;&lt;li&gt;Computers are very hard to reason about, perhaps impossible in some cases. Any sort of AI will in fact be impossible to understand, and might function very differently from our reasoning. &quot;I'm sorry Dave, I cannot allow you to jeopardize the mission.&quot;  &lt;/li&gt;&#xA;&lt;li&gt;Computers allow people to be affected remotely, which was never true in the case of technology before. Locality used to prevent most forms of crime, and most harm, even from natural causes. (A falling tree can only kill so many people.)  &lt;/li&gt;&#xA;&lt;li&gt;Computer technology can cause problems to spread in a way that was not true before. I read that self-driving cars will all immediately take on new information 'learned' by other cars. So, mis-information could quickly result in catastrophe, especially if it was induced maliciously.  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This is what I came up with that makes CS different from more mundane fields where ethics could apply. (I misplaced this list and recreated it mentally with no effort, so these concerns are probably the salient ones.) I don't think that any 'ethics' is required here, and because I am concept-averse, I don't see a need to create any new rules or principles. Just think ahead a bit!&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-08-04T14:47:02.973" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3101" PostTypeId="1" AcceptedAnswerId="3115" CreationDate="2017-08-04T16:27:33.630" Score="2" ViewCount="242" Body="&lt;p&gt;I'm exploring iOS App Development as an elective for students, and in perusing Apple's iBooks on the subject, I see two similar books: &lt;a href=&quot;https://itunes.apple.com/us/book/app-development-with-swift/id1219117996?mt=11&quot; rel=&quot;nofollow noreferrer&quot;&gt;App Development with Swift&lt;/a&gt; and &lt;a href=&quot;https://itunes.apple.com/us/book/intro-to-app-development-with-swift/id1118575552?mt=11&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intro to App Development with Swift&lt;/a&gt;. On the surface they look quite similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Are there significant differences between the two that I should take into account when selecting one for a course?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="27" LastEditDate="2017-08-07T05:45:05.657" LastActivityDate="2018-10-10T12:36:51.377" Title="Books to use for iOS App Development" Tags="|curriculum-design|swift|app-development|resource-information|" AnswerCount="3" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3102" PostTypeId="1" CreationDate="2017-08-04T17:04:59.163" Score="4" ViewCount="262" Body="&lt;p&gt;One of the major uses of my classroom time is for lab work. This is both a requirement of the AP Computer Science curriculum, and also nominally a benefit, as it allows me to walk around and answer questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice, however, I have found that the students work on their tasks, and whether they are doing well or not, they don't ask questions, even when prompted individually with a &lt;em&gt;&quot;how's it going? Do you need any help?&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This eventually results in me going to sit down at my own station to do other work for about 10 minutes, and then making the rounds again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This feels like an underutilization of myself as a resource. It's not as if I don't have students who struggle, and there are always students who fall behind and submit their labs late.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I better utilize the lab time? Are there techniques to get kids to ask questions when progress slows? Or is there something else that I should be doing altogether?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-04T22:44:37.230" Title="How to best use lab periods" Tags="|labs|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3103" PostTypeId="2" ParentId="3102" CreationDate="2017-08-04T17:24:24.607" Score="1" Body="&lt;p&gt;Students eventually ask questions if someone else is doing it, so the key is to get that first person to make the leap. If no one is currently asking, perhaps you could recruit someone to act as a 'confederate' and ask a question now and again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea I was told about is to ask, &quot;What questions &lt;em&gt;do you have&lt;/em&gt;?&quot; This is better than asking IF they have questions, for some obscure psychological reason. A mentor who was helping me with lecturing and running training sessions told me this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned to leave long pauses when lecturing or even just conversing, because people often need time to come forward with something that is on their mind. During Lab time this is not an issue, but it might rub off if they start asking more at other times. (&quot;Questions only lead to questions.&quot;)&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastActivityDate="2017-08-04T17:24:24.607" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3104" PostTypeId="2" ParentId="3102" CreationDate="2017-08-04T17:28:28.183" Score="2" Body="&lt;p&gt;I, too, have felt &lt;em&gt;exactly&lt;/em&gt; the same during lab periods. Walk around, ask questions, sit, repeat. I've come upon two things that help improve productivity: &lt;strong&gt;goal-setting&lt;/strong&gt; and &lt;strong&gt;reflection&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Releasing students to work as soon as class starts for more time can be counter-productive. Instead, I found it helpful to frame the focus for a particular lab session with a clear objective. That goal may stretch over multiple days, but every class should start with a review of the goal, a discussion of progress made if relevant, and a re-focusing for the day. It does not need to be complex; a simple, manageable goal is effective. Even having multiple small goals rather than one big goal may help students spot their own struggles as they do or do not make progress. Comments can go from &quot;I'm stuck&quot; to &quot;I'm having trouble implementing &lt;em&gt;x&lt;/em&gt;.&quot; Their involvement with the creation of their own plan for a lab session will also increase their ownership of their work. Plus, it's essentially another way of teaching decomposition. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To follow that, a goal that doesn't get assessed for progress may as well not be set. I find exit tickets to be an absolutely invaluable tool (thank you, Google Forms!). Even 1 or 2 simple questions at the end of class like &quot;How did today go?&quot;, &quot;What went well today? What didn't?&quot;, &quot;Do you have a questions for me?&quot;, etc., will help you see their progress meaningfully, spot trends among student perception of the lab session, and provide a way to start the next class.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-08-04T17:28:28.183" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3105" PostTypeId="1" CreationDate="2017-08-04T18:18:08.727" Score="60" ViewCount="12283" Body="&lt;p&gt;I was born in 1968 and used dial-up to mainframes back before PCs were available. We got an Apple ][+ when they came out and thought 48K was a lot of memory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I live in constant wonder at the world we are now in, which seems like science fiction to my childhood self. &lt;strong&gt;How can I convey to students born around the turn of the millennium how amazing this growth has been?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tell them about Moore's Law, of course, and that, when I was young, we paid 25 cents to play Asteroids, back when 25 cents was a lot of money, but I know I sound like &lt;a href=&quot;http://www.nohomers.net/showthread.php?96922-Favorite-Grampa-Simpson-ramblings&quot; rel=&quot;noreferrer&quot;&gt;Grampa Simpson&lt;/a&gt;. I share that &lt;a href=&quot;https://search.googleblog.com/2012/08/the-power-of-apollo-missions-in-single.html&quot; rel=&quot;noreferrer&quot;&gt;a single Google search uses more compute power than all of the Apollo missions&lt;/a&gt;, but even I can't wrap my head around that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you convey to students some of the wonder that you feel (as part of motivating them to appreciate and learn computer science)?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2023-02-11T10:19:22.717" Title="How to convey how much computing power has grown since the 1960s?" Tags="|student-motivation|computer-history|" AnswerCount="25" CommentCount="19" ContentLicense="CC BY-SA 3.0" />
  <row Id="3106" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T18:44:11.817" Score="11" Body="&lt;p&gt;Robert A. Heinlein's &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0312863551&quot; rel=&quot;noreferrer&quot;&gt;The Moon is a Harsh Mistress&lt;/a&gt; contains passages about sneaker-netting printouts of program code from one location to another and &lt;em&gt;re-typing&lt;/em&gt; it into the target system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems ridiculous today, but I guess it was way beyond bleeding edge when written. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say a (dramatic?) reading and a discussion about &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;why it seems so silly today&lt;/li&gt;&#xA;&lt;li&gt;why it wouldn't have seemed silly in 1966&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;would be a good jumping off point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, it's quite possible there are other passages from now-classic literature that would hew a little more closely to your topic, but this is my favorite, and so the one that comes to mind.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-08-04T18:44:11.817" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3107" PostTypeId="2" ParentId="812" CreationDate="2017-08-04T18:58:36.513" Score="3" Body="&lt;p&gt;There have been some great answers so far; here is an approach I haven't seen described yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I show my students how they can use the CLI to access our workstations from remote locations.  My students have accounts in our lab of Linux workstations, but suppose they want to work on their project from their dorm room or off-campus apartment or home, or when the building housing our lab is closed? (Does anyone else have students who want to work on their homework over the holidays?) Using an ssh client and the CLI, they can login to a lab machine from their laptop (or even a tablet) and work on their project.  Mastery of the CLI (combined with ssh) lets them work whenever and from wherever they want, regardless of when our lab is officially open.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I happen to have an account on a Linux machine that's physically located in Asia. From my classroom in the US, I use this same approach to demonstrate to the students how I can login to that machine and edit/run a program there.  That helps the students see that this generalizes beyond our campus to let a person access any machine on the Internet (on which you have an account) from across the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theory, this could be done using a GUI, but the amount of network bandwidth required to transmit a GUI's graphical information across the Internet makes this problematic.  By contrast, the CLI just requires a modest number of characters to be transmitted back and forth, making this approach practical from just about anywhere.&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-08-04T18:58:36.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3108" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T19:42:55.643" Score="54" Body="&lt;p&gt;This is really difficult to communicate to anyone who hasn't lived through it (and even to those of us who have).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't usually go back as far as the 60s.  I show my students a picture of the &lt;a href=&quot;https://www.top500.org/static/media/uploads/20/top-1-systems/asci-red-sandia-national-laboratory/asci%20red5_800x600.jpg&quot; rel=&quot;noreferrer&quot;&gt;ASCI RED supercomputer&lt;/a&gt; from ~1998, which was the first supercomputer to be able to perform 1 trillion floating point operations in a second (1 TFLOP).  It's basically the size of a warehouse floor, with another floor consumed by its climate control system. It cost ~46 million dollars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I show my students a picture of a typical &lt;a href=&quot;http://dahl.calvin.edu/images/Dahl-435x1272.jpg&quot; rel=&quot;noreferrer&quot;&gt;rack of servers&lt;/a&gt; from 2008, which could perform 2-4 TFLOPs.  In a decade, the size had shrunk from a warehouse to a single rack, the computing power had doubled, and the cost was about $200K.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I show my students a picture of a &lt;a href=&quot;http://images.nvidia.com/content/tesla/images/tesla-3-quater.png&quot; rel=&quot;noreferrer&quot;&gt;Nvidia K80 GPU card&lt;/a&gt;, which can perform over 2 TFLOPs.  In less than a decade, the form factor has shrunk to a card you can put inside a desktop computer, with the same power. Launch price was about $5K. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is in less than 20 years.  Extrapolating from that back another 20 years only gets you to 1978; you have to go 10 years beyond that to reach 1968.  It's really hard to communicate the extent of this change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And that's just the change in raw computational power, ignoring other advances like the Internet...&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-08-04T19:42:55.643" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="3110" PostTypeId="2" ParentId="3102" CreationDate="2017-08-04T20:17:39.527" Score="1" Body="&lt;p&gt;A scattering of ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;During your very first labs section of the year/semester/whatever, set the tone by explicitly telling students lab periods are times for them to ask questions and have (brief?) one-on-one interactions with you in addition to working on their labs. This probably will help only in a limited sense, but your students may be more willing to ask questions if you straight-up tell them that questions are not only encouraged, but expected.&lt;/li&gt;&#xA;&lt;li&gt;Shift to doing more group-work. If everybody is working individually, being the only person to speak up and hold a conversation feels awkward. If there's some ambient background chatter, asking a question will feel less &quot;awkward&quot;/more &quot;private&quot;, which might encourage your students who are shy or embarrassed to speak up.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make your labs harder. The idea is that now &lt;em&gt;everybody&lt;/em&gt; is going to struggle and therefore ask questions. And if your more confident/talented students are asking questions, the students who are falling behind might feel encouraged to do the same. This pairs well with the previous suggestion: if your students are now working in groups, they should theoretically be capable of working through more material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should probably do this by making the problems trickier and twisty, not by adding more work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you do the above, and notice that everybody's struggling with the same problem, consider interrupting and going over some core points as a class/working through the problem together. This gives you more opportunities to engage with your students, albeit as a group, not one-on-one.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Switch your question from &quot;&lt;em&gt;do you need any help?&lt;/em&gt;&quot; to something more like &quot;&lt;em&gt;any questions?&lt;/em&gt;&quot;.  (See @nocomprende's answer for reasoning).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-04T20:17:39.527" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3111" PostTypeId="2" ParentId="3102" CreationDate="2017-08-04T20:32:06.593" Score="3" Body="&lt;p&gt;The problem you describe doesn't exactly fit this answer, but it might be useful to some with a similar problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some such labs it has been observed (and filmed) that students working alone at a station get into some difficulty and raise their hand for help. If the instructor and/or assistant is busy with another at the time, the student with the new problem waits. Then maybe another, and two are waiting, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution to this is to have students always working in pairs in the lab, doing things like pair programming, pair research, pair writing (very creative), etc. This has been observed to reduce the waiting to essentially zero as the students solve their own problems. When one student gets &quot;stuck&quot; it is unlikely that the partner is stuck in exactly the same way so they can move on. This is a well known effect in professional pair programming also. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You still need to wander about asking if you are needed, as a pair will sometimes queue a question till you come around while they work elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, I don't have a link to the study on this. I assume it came out of the Agile Community's educator forum. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-04T20:32:06.593" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3112" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T20:33:18.120" Score="5" Body="&lt;p&gt;One idea is to take your students on a field trip to a &quot;computer museum&quot; of some sort, if your local area has one. Being able to physically look at and maybe even interact with machines can maybe help give your students a more &quot;visceral&quot; feel for how computing has advanced in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(One of my professors actually did this and took us all to the &lt;a href=&quot;http://www.livingcomputers.org/&quot; rel=&quot;noreferrer&quot;&gt;Living Computer Museum&lt;/a&gt; in Seattle, and made us write a program of some kind on a retro computer of our choice. It took me a while to figure out how to even use one of the computers -- it certainly gave me a deeper appreciation for how dramatically HCI has advanced over just a few decades!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also perhaps contrast this by following this up with a field-trip to a local datacenter (if you have one).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have a museums/datacenters like this in your area, you could maybe bring in props of some kind -- maybe bring in an old tape drive of some sort along with a USB and contrast how much data each of them can store.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also perhaps try showing them clips of seminal tech demos. I personally like Steve Job's original &lt;a href=&quot;https://www.youtube.com/watch?v=-3gw1XddJuc&quot; rel=&quot;noreferrer&quot;&gt;iPhone demo&lt;/a&gt; (YouTube link warning) -- I stumbled across this recently, and it was so incredibly bizarre and surreal to me to watch people go crazy over features I take for granted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yJDv-zdhzMY&quot; rel=&quot;noreferrer&quot;&gt;Engelbart's &quot;Mother of all Demos&quot;&lt;/a&gt; (also YouTube) might be another good one, though it always felt a bit dry to me, so maybe not.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-04T20:33:18.120" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3113" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T21:04:15.583" Score="6" Body="&lt;p&gt;Here's one pretty good infographic from the &lt;a href=&quot;https://www.washingtonpost.com/news/the-switch/wp/2013/11/12/how-ridiculously-fast-our-computer-chips-have-gotten-in-one-chart/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wall Street Journal&lt;/a&gt;, though it is almost 4 years old now:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/MOFst.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/MOFst.jpg&quot; alt=&quot;Infographic&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, another way is to describe the change in scale.  I love the approach used by &lt;a href=&quot;http://www.blueraja.com/blog/368/how-fast-are-computers-in-everyday-terms&quot; rel=&quot;nofollow noreferrer&quot;&gt;BlueRaja here&lt;/a&gt;, though again this is from 2013.  If adding two numbers consistently took a person one second (which is already pretty fast for most people, especially since you could be adding rather large numbers), we could create some interesting comparisons to the 2013 computers.  Of course, these all presume that you never sleep, eat, talk, etc. You just sit and calculate, all day, every day.  Some of my favorites:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It would take 0.1 seconds, at that scale, for light to travel a centimeter in a vacuum.&lt;/li&gt;&#xA;&lt;li&gt;It would take 3 days for a bullet to travel an inch.&lt;/li&gt;&#xA;&lt;li&gt;The fastest blip that the human eye could even see would take 2.25 months.&lt;/li&gt;&#xA;&lt;li&gt;There would be 1.5 years between every picture on a 60 fps screen.&lt;/li&gt;&#xA;&lt;li&gt;The average human reaction time would be 21 years.&lt;/li&gt;&#xA;&lt;li&gt;A single second would be 95 years.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course, lately, the speed increases have slowed somewhat.  I know that many have been crying out about the end of Moore's Law, though my pet theory is that we have switched over our processor research more towards space and battery life to encompass our huge societal shift to smaller and smaller devices.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-07T14:47:17.467" LastActivityDate="2017-08-07T14:47:17.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3114" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T21:18:01.903" Score="5" Body="&lt;p&gt;I have two thoughts on this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Volume matters. Grab some picture of a very early computer (the first one in our sense, the Zuse Z3, would do nicely, and Wikipedia has its details, e.g. 4kW power consumption and 1 metric tonne of weight). Then take &lt;em&gt;any&lt;/em&gt; of the numbers you find (i.e., number of individual elements etc.) and compare it to todays CPUs. Something easy. Like one of those smart armbands (Apple Watch, whatever). Then calculate how many buildings/cities worth of Zuse3's you would need to perform the function of that Watch (ignoring networking and so on).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, Networking would be quite the eye opener. Showing them (with some terminal program that allows to artificially curb network rate) how a 300baud acoustic coupler &lt;em&gt;feels&lt;/em&gt; when typing... and making sure they understand that that was a single stream. No TCP/IP on those dialup modem lines back then!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and if a stone age &quot;super computer&quot; is too abstract in your opinion, the Apollo computers are just fine as an example, too, although they would be a little skewed - they could have been faster/bigger, but speed/capacity were reduced in favour of robustness for obvious reasons.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I don't think you can really get them to &quot;feel&quot; the wonder as you do. Us oldies who have witnessed all those developments first hand had a &lt;em&gt;lot&lt;/em&gt; of time to get them ingrained in our brains. Talking about it will never do anything than make you a Grandma in their eyes. It is too late now; youngsters grow up with the whole plethora of functioning &quot;stuff&quot; from day #1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example for raw computing power would be calculating fractals. When I was little, it took hours, days, sometimes weeks to calculate one simple image. These days, you just fly through them in 3D, realtime, 60Hz or more, with 32x the number of pixels on your average gaming PC. Yes. You can tell them that. But I don't really think it is possible to convey the emotional impact these things have on &lt;em&gt;you&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2017-08-04T23:35:12.143" LastActivityDate="2017-08-04T23:35:12.143" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3115" PostTypeId="2" ParentId="3101" CreationDate="2017-08-04T21:29:03.893" Score="4" Body="&lt;p&gt;These are both part of Apple's &lt;a href=&quot;https://www.apple.com/everyone-can-code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Everyone Can Code&lt;/a&gt; initiative, and both are appropriate for a high-school and college audience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Intro book is intended for non-programmers, and teaches programming fundamentals and Swift syntax, with 90 hours of lessons included. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The non-intro book gets into more complex UI development such as working with table views and navigation, and topics like consuming web APIs, and includes 180 hours of lessons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/NkD8a.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NkD8a.png&quot; alt=&quot;course summary comparison&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://images.apple.com/education/docs/App_Development_with_Swift_Curriculum_Guide.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;App Development with Swift Curriculum Guide&lt;/a&gt; (where I took that screenshot) also shares helpful outlines of the two curricula that can give you a sense of the differences at a glance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the Overview from that guide explaining the difference:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Intro to App Development with Swift and App Development with Swift&#xA;  curricula were designed to teach high school and college students with&#xA;  little or no programming experience how to be app developers, capable&#xA;  of bringing their own ideas to life.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The Intro to App Development with Swift course introduces students to&#xA;  the world of app development and the basics of Swift and Xcode. The&#xA;  course culminates in a final project where they can choose one of two&#xA;  basic iOS apps to build.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;App Development with Swift takes students further, whether they’re new&#xA;  to coding or want to expand their skills. If they’re already familiar&#xA;  with Swift, Xcode, and iOS development, they can move through lessons&#xA;  quickly or go straight to the labs, where they’ll build miniprojects&#xA;  and test their code in playgrounds. By the end of the course, they’ll&#xA;  be able to build a fully functioning app of their own design.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The document goes on to further explain the two courses as follows:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Intro to App Development with Swift&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This introductory one-semester course is designed to help students&#xA;  build a solid foundation in programming fundamentals using Swift as&#xA;  the language. Students get practical experience with the tools,&#xA;  techniques, and concepts needed to build a basic iOS app.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;App journal activities take students through the app design process,&#xA;  from thinking about the purpose of an app to market research and early&#xA;  user testing. By the end of the course, students will have created a&#xA;  plan for an app they’d like to develop. Even though they might not yet&#xA;  have the skills to build the app, the work they put into the framework&#xA;  will set them up for future development. &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;App Development with Swift&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;This two-semester course features 45 lessons, each designed to teach a&#xA;  specific skill related to either Swift or app development. Each type&#xA;  of lesson takes a different approach:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;&lt;strong&gt;Swift lessons.&lt;/strong&gt; These lessons focus on specific concepts. The labs for each are presented in playgrounds so that students can&#xA;  experiment with code and see the results immediately. Playground files&#xA;  are provided.&lt;/li&gt;&#xA;  &lt;li&gt;&lt;strong&gt;App development lessons.&lt;/strong&gt; Focusing on building specific features for iOS apps, these lessons typically take students step by step&#xA;  through a miniproject. The labs help students apply what they learned&#xA;  to a new scenario.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="814" LastEditorUserId="76" LastEditDate="2017-08-05T16:46:43.303" LastActivityDate="2017-08-05T16:46:43.303" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3116" PostTypeId="2" ParentId="3105" CreationDate="2017-08-04T21:40:04.553" Score="7" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I share that a single Google search uses more compute power than all of the Apollo missions, but even I can't wrap my head around that.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Forget Google search. &lt;strong&gt;Your phone&lt;/strong&gt; is more powerful than the computers that got us to the moon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some random articles I found:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.computerweekly.com/feature/Apollo-11-The-computers-that-put-man-on-the-moon&quot; rel=&quot;noreferrer&quot;&gt;The computers that put man on the moon&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.popularmechanics.com/space/moon-mars/a25655/nasa-computer-iphone-comparison/&quot; rel=&quot;noreferrer&quot;&gt;How Do NASA's Apollo Computers Stack Up to an iPhone?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.zmescience.com/research/technology/smartphone-power-compared-to-apollo-432/&quot; rel=&quot;noreferrer&quot;&gt;Your smartphone is millions of times more powerful than all of NASA’s combined computing in 1969&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's pretty easy to compare the CPU power, RAM, and hard drive space of a phone to an early computer. Maybe pick a few computers from each decade and plot them out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But something that was really effective for me was hearing stories from my (older) coworkers. About how they had to store their code on punch cards and run their programs at midnight every night because it was the only time the mainframe (read: only computer in the computer science deparatment) was not being used. About needing to wait another 24 hours to run their code again (which they fixed using tape and hole punches?). Compare that to modern development, where my IDE updates several times a second whenever I'm typing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if you should organize any of this info into a lecture though, as like you said it all comes off as a bit &quot;back in my day we had to walk uphill to the mainframe- both ways!&quot; Instead, maybe try to start a discussion about how much technology has changed in the students' lives, and then work backwards from there.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-04T21:40:04.553" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3117" PostTypeId="2" ParentId="3102" CreationDate="2017-08-04T22:44:37.230" Score="1" Body="&lt;p&gt;Like other answers have said, you should make it clear that asking questions is a good thing, and not something to be embarassed about. You might encourage this by asking &lt;strong&gt;specific questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Is anybody stuck on part two of the assignment?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Does anybody have any questions about for loops?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another thing you might consider is &lt;strong&gt;setting milestones&lt;/strong&gt; within a lab, and then checking whether students are meeting those milestones.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;Is anybody still working on part one of the assignment?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Or you could make it work the other way:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;&quot;After you finish part one, come get part two.&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The second approach would let you know who is working on what, without making students call attention to themselves for being slower than their classmates.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-04T22:44:37.230" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3118" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T00:04:19.743" Score="15" Body="&lt;p&gt;I (barely) remember when the first iPhone came out. I remember playing this skeeball app on it, and really enjoying it. I thought it was so cool, and fast, and I thought the phone was sleek and small.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fast foward - I use that iPhone as an alarm clock (it can't do much else - we took it off our &quot;plan&quot; or whatever it's called a while ago). I've played the Skeeball game since then. It's slow as all get out, and it looks much thicker and uglier than the shiny new smartphones common among teens now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember using an older Mac computer that was my mom's when I was younger. Now I have a chromebook that's pretty fast, and dual boots Linux and Chromium.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an arduino the size of your hand that can run LEDs and motors and whatever else you want it to do. You can buy a raspberry pi for \$30 (of course, you have to hook it up to a monitor, keyboard, and mouse, but still). The chromebook we got on sale for $100. I remember looking up prices for old computers and being shocked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in your student's lifetimes (they're older than I am!) they'll have some memory of computers getting faster, cheaper, nicer, better. Tell them to extrapolate that back a couple of years. And then a couple of years more. Show them where they fell on a graph of Moore's Law - and ask them to imagine the start of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(EDIT)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see you live in San Francisco. Send those young whippersnappers down to the Computer History Museum in San Jose on a Saturday to see one of the demonstrations for the IBM 1401 (and tell them to look through the galleries while they're at it; it's a great museum, probably in my top ten I've ever been to, and I've been to a &lt;em&gt;lot&lt;/em&gt; of museums).&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="919" LastEditDate="2018-08-04T01:16:22.280" LastActivityDate="2018-08-04T01:16:22.280" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="3119" PostTypeId="2" ParentId="3095" CreationDate="2017-08-05T00:09:04.083" Score="4" Body="&lt;p&gt;They should be taught first and foremost to be computer scientists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a bit like asking &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Should biologists be taught first and foremost to be physicists or chemists?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Neither. Biology has some physics and chemistry, but it also has some stuff all its own. Ditto for computer science - there's science and there's math. (Plus, if you're being really nitpicky, scientific theories are based on math, but, whatever.) There's also a dash of something different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah, teach mathematics, just like you teach a scientist mathematics, or a biologist physics, and also teach science, just like you teach a biologist chemistry, but also teach how it all comes together - computer science!&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-08-05T00:09:04.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3120" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T01:16:50.570" Score="11" Body="&lt;p&gt;As someone in their 20s who has not actually lived through the history of programming and computer technology but can still very much appreciate it, here's a handful of things that have helped me appreciate the progress of computers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Watching (and laughing at) various episodes of &amp;quot;The Computer&#xA;Chronicles&amp;quot; (a handful can be found on YouTube). Especially ones where they demonstrate cutting-edge technology (I especially like the one where they're demoing what is basically paint 1.0 for some system or another). Similar old television programmes discussing 'modern' technology should get similar results (e.g. BBC's &amp;quot;The Computer Programme&amp;quot; and &amp;quot;Micro Live&amp;quot;). I quite like the ones from the 80s because it was when computers were starting to become commercialised. Usually people's reactions and interest say it all.&lt;/li&gt;&#xA;&lt;li&gt;Going to a computer museum and actually trying out some old systems. Some were a bit broken, but having a proper old terminal to play with was fun (apart from the means of editing programs, it's not that different to modern command lines).&lt;/li&gt;&#xA;&lt;li&gt;Often simply being told the facts, like learning that the first&#xA;'compiler' was an assembler created by Grace Hopper, where there was mostly a one-to-one correlation with machine instructions (and that was a massive step up from switches and punch-cards).*&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;To be honest though (and some may disagree with me), personally I think that programming is like playing an instrument. Pretty much everyone thinks it's cool, but some people are drawn to it more than others. You can't force an interest in it, someone will be interested in it or they won't be. It depends what they want to do with their lives and what their interests are. Likewise some people are more naturally talented at programming than others (typically people with inquisitive problem-solving oriented brains), much like how some people have 'a musical ear' and some are 'tone deaf'.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;* (If you'll excuse the slightly unpleasant reductio ad-absurdum, I don't necessarily need to attempt using a vinegar-soaked sponge instead of toilet paper to imagine how awful roman hygine was.)&lt;/p&gt;&#xA;" OwnerUserId="1538" LastEditorUserId="1538" LastEditDate="2022-01-20T00:43:23.233" LastActivityDate="2022-01-20T00:43:23.233" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="3121" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T07:11:09.610" Score="3" Body="&lt;p&gt;From my experience of trying a history of computers lesson...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried showing this &lt;a href=&quot;https://youtu.be/6UfOIfuYJT8&quot; rel=&quot;nofollow noreferrer&quot;&gt;old tech&lt;/a&gt; programme but they failed to relate to it and got bored really quickly. I think it destroyed my street cred more than anything :).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They did enjoy a clip that showed one of the first home pcs and games consoles, so decided to change my lesson plan. I found a youtube video showing a &lt;a href=&quot;https://youtu.be/MtBoRp_cSxQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;zx spectrum loading &lt;/a&gt; a game. Some jaws dropped and after they begged me to turn off the noise, I let them play some a retro game (type &quot;pacman&quot; into Google). Maybe not as informative as planned, but it salvaged the lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A classroom display may work well. They can then look and read about it in their own time. In the iMac suite I have a poster showing Macs through the ages. It kept them amused for weeks and they appreciated what they have.&lt;/p&gt;&#xA;" OwnerUserId="146" LastEditorUserId="146" LastEditDate="2017-08-05T07:32:40.113" LastActivityDate="2017-08-05T07:32:40.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3122" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T10:09:28.660" Score="1" Body="&lt;p&gt;Interesting question.  Along the lines of &quot;computers were the size of a room&quot; story, my idea is maybe more tangible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're the expert, so I ask you:  what component inside a computer the size of a room is the size of a modern phone?  You could have your students take out their phones and look at them.  &quot;Your phones are the size of one flux capacitor that was made in the 60's.  Your phone has one million flux capacitors in it.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, estimate the size of all of the phones and computers in your building combined, and then give a estimate of the computing power that could be made from something that size on the 60's.&lt;/p&gt;&#xA;" OwnerUserId="2408" LastActivityDate="2017-08-05T10:09:28.660" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3123" PostTypeId="2" ParentId="812" CreationDate="2017-08-05T10:22:40.460" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there specific examples you use that effectively illustrate the&#xA;  power of a CLI&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Even if you prefer the GUI, as an administrator you never know when you might need to know the CLI. Most importantly in emergencies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few practical situations and benefits of having a CLI:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In a mixed platform environment you can access all other servers  from a single desktop or other terminal. Even from your phone.&lt;/li&gt;&#xA;&lt;li&gt;Using SSH connections to access multiple servers, maybe for    administration purposes, e.g. building or testing an environment, issuing commands from a single machine is cleaner; rather than lots of gui desktops in different windows.&lt;/li&gt;&#xA;&lt;li&gt;Where a server might become corrupt (partially booted, infected or under a DoS attack) you may be able to access the shell to issue a restart or shutdown. For example, you may be in a position where you can only access the server remotely, the office is situated geographically apart, you're at home on call or maybe meeting a client. You may only have you phone with you.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="146" LastActivityDate="2017-08-05T10:22:40.460" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3124" PostTypeId="1" CreationDate="2017-08-05T12:11:53.490" Score="6" ViewCount="318" Body="&lt;p&gt;Some Computer Science programs in the US have a course that is informally referred to at a &lt;em&gt;Capstone Course&lt;/em&gt; that attempts to bring together most of what the student has learned. The course may be required or not and is usually offered to students just prior to graduation, having several prerequisites.&lt;/p&gt;&#xA;&lt;p&gt;One possible design is a Project (Senior Project) that may be team based on individual. The student may or may not have an advisor, similar to a thesis course. It may or may not require a write-up or a computer program.&lt;/p&gt;&#xA;&lt;h3&gt;What is a good design for a Capstone Course that requires the student to use most of what they have learnt in their program.&lt;/h3&gt;&#xA;&lt;p&gt;Most helpful would be examples with which you have some experience and which you can attest to success. Also useful would be notable failures and caveats that an implementer might need to be aware of.&lt;/p&gt;&#xA;&lt;p&gt;Finally, what other changes do you believe are necessary to prepare the student for their future Capstone Experience.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-08-07T16:36:52.597" Title="What is a good design for a Capstone Course in CS?" Tags="|curriculum-design|undergraduate|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3125" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T14:01:18.977" Score="5" Body="&lt;p&gt;I began to realise how drastic the change was in 1997, when I had more computing power and more disc storage on my desk than my entire university campus had when I graduated in 1983. In 2010, I had more than that on my phone.&lt;/p&gt;&#xA;&lt;p&gt;To enumerate, the university in 1983 had:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An old mainframe, an ICT 1904S* with 256K of 24-bit words, maybe 10 5MB and 10MB exchangeable-pack disc drives and two or three tape drives, with each tape holding about 1MB. The main way of using it was by submitting large decks of punched cards, and it ran several hundred such jobs per day.&lt;/li&gt;&#xA;&lt;li&gt;Several Prime minicomputers, each with about 2MB RAM, and 50MB disc, plus a 300MB disc that was definitely the largest on campus. They were networked together with some kind of serial cable, not anything recognisable as a network to modern eyes. The terminals for this network each printed on a roll of paper, with an astonishingly cheap and nasty dot-matrix printer. There were maybe 50 terminals, and several hundred students would use them each day, going to one of the buildings that held them.&lt;/li&gt;&#xA;&lt;li&gt;A DEC VAX-11/750, with about 4MB RAM and several 70MB disks, running a BSD Unix that would be usable to someone today who can work with the Linux command line, albeit astonishingly slowly. It belonged to the computer science department, and drove about 20 terminals, which had black-and-white cathode-ray tube displays, like an old-fashioned TV. This was high-tech for the time.&lt;/li&gt;&#xA;&lt;li&gt;A few DEC PDP-11 minicomputers.&lt;/li&gt;&#xA;&lt;li&gt;A scattering of 8-bit microcomputers: Apple IIs, BBC Micros, and assorted CP/M machines.&lt;/li&gt;&#xA;&lt;li&gt;Various specialised graphics terminals, which could do &lt;em&gt;color&lt;/em&gt; graphics, very slowly.&lt;/li&gt;&#xA;&lt;li&gt;Various machines that the electronics engineering students had been experimenting on, and were no longer useful owing to unreliability.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In 1997, I had an HP PA-RISC workstation, running HP-UX Unix, with 256MB RAM, about 4GB of disc, a 21&amp;quot; color CRT, a mouse, and 100 megabit Ethernet. I also had a Dell Pentium III PC, running Windows NT 4, with about the same amount of RAM, disc, display and networking. The two machines had similar CPU power, very slow by today's standards, but actually capable of running a modern (albeit 32-bit) OS, if you're prepared to wait a lot. They could both access the same fileserver, which could share the same disc space to both of them, something that was unheard of in 1983.&lt;/p&gt;&#xA;&lt;p&gt;in 2010 I had an &lt;a href=&quot;https://en.wikipedia.org/wiki/HTC_Dream&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTC Dream&lt;/a&gt;, with an 8GB microSD card in it. That fingernail-sized card had more storage capacity than all the discs, tapes and punched cards on a university campus of 27 years earlier.&lt;/p&gt;&#xA;" OwnerUserId="1559" LastEditorUserId="1559" LastEditDate="2023-02-11T10:19:22.717" LastActivityDate="2023-02-11T10:19:22.717" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="3126" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T14:46:36.803" Score="3" Body="&lt;p&gt;What about the 90s internet? Maybe they'll relate to that. Then take them on a journey to pre commercial internet, then onto computing and networking before the internet? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This 90s &lt;a href=&quot;https://youtu.be/1npzZu83AfU&quot; rel=&quot;nofollow noreferrer&quot;&gt;ad for AOL&lt;/a&gt; is hilarious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try searching for &quot;internet minute&quot;. There's some great infographics that may illustrate how far computing power and the internet has come.&lt;/p&gt;&#xA;" OwnerUserId="146" LastEditorUserId="146" LastEditDate="2017-08-05T14:55:53.770" LastActivityDate="2017-08-05T14:55:53.770" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3127" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T15:45:31.013" Score="5" Body="&lt;p&gt;I think nobody has mentioned the (energy) cost of running an algorithm on these machines. For example when you are taking a photo on a phone, it is running a face recognition algorithm in real time. This consumes X watts of power and costs Y USD / second to run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd need to calculate how many multi-million USD machines you'd need from a specific era to run the algorithm at same speed on those (assuming it was possible), and how many watts of power (CPU power + cooling) it would take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algorithms on the topic of linear algebra or databases could be better examples but most people aren't that familiar with those. Video compression is an other good example, you could calculate how many USD it costs to compress 1 hour of 1080p video on a modern laptop (most energy efficient?) and on an older system. It may need like 100x the time and 10000x the power, making the whole process cost a million times more even without considering initial investment costs.&lt;/p&gt;&#xA;" OwnerUserId="1223" LastEditorUserId="1223" LastEditDate="2017-08-05T17:37:52.710" LastActivityDate="2017-08-05T17:37:52.710" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3128" PostTypeId="2" ParentId="3086" CreationDate="2017-08-05T16:31:37.193" Score="4" Body="&lt;p&gt;My preferred lesson, using any board that has servo headers (and you can do it even without these), is to show them how to make a servo turn (I have a wheel attached to it ahead of time). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The program is fairly easy to follow for students, and there is a look of shock when it starts moving. I then tell them that they need to attach the servo along with another one to a box, and make a robot that drives forward, and they will need to add three lines of code to their program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The challenge of adding the three lines is just different enough from what they have, that they will struggle, but similar enough that they can figure it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then introduce the delay command and tell them they need to program their robot to drive around a big box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This takes about an hour and a half if I prebuild the robots and it is just programming. If they are building them, add at least another 30 min.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The nice thing is that this acts as a great starting lesson to lead into others. Later you can give challenges that require sensors and introduce conditionals. Serial Communication can be used to make them remote control (works better if you have a board with blue tooth communication).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on your budget there are some arduino robot kits starting around $80 that I think are a good value.&lt;/p&gt;&#xA;" OwnerUserId="2416" LastActivityDate="2017-08-05T16:31:37.193" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3129" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T17:08:30.840" Score="1" Body="&lt;p&gt;I recently wrote several emulators for some 1970's era minicomputers, and I included memory display windows showing one pixel per word, so I could watch memory change in real time. I was quite impressed to see that the largest minicomputer memory available back then is no bigger than a postage stamp on my screen. Perhaps you could direct their attention to a picture containing 32768 pixels and explain that a minicomputer or early microcomputer could hold exactly one of these at a time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course even this factoid may not make much of an impression on someone who does not need to know the &lt;em&gt;exact nature&lt;/em&gt; of the difficulties we faced in order to understand that there &lt;em&gt;were&lt;/em&gt; difficulties, and to be grateful that somebody dealt with them. We joke about our grandfathers' stories but at bottom we know they really did have it uphill both ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main point to convey is that the world we hold dear today will look similarly primitive to our children. (And by &quot;children&quot; I do not mean a metaphor for some unspecified future generation -- I mean infants being born right now may have trouble comprehending, e.g., why we had to drive our cars on &quot;manual&quot; the whole time, or hold an election and &quot;vote&quot; just to choose a mayor or a president.) &lt;/p&gt;&#xA;" OwnerUserId="2414" LastEditorUserId="2414" LastEditDate="2017-08-06T22:32:26.537" LastActivityDate="2017-08-06T22:32:26.537" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3130" PostTypeId="2" ParentId="3070" CreationDate="2017-08-05T17:53:18.737" Score="3" Body="&lt;p&gt;Teach them to be cautious. This may not sound like ethics, but actually it has a significant ethical effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;People - especially young men - who are very confident try all kinds of things, including unethical ones. Their confidence is often misplaced. Computers will not forgive you because you are young and charming. They'll happily retain the evidence of wrongdoing, and it's very hard to clean it off them completely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Misuse of computers tends to be discovered. Unlike people, computers do not cover up evidence of deception, because they're incapable of being embarrassed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, caution is sound engineering practice. You get two useful results from one set of teaching. &lt;/p&gt;&#xA;" OwnerUserId="1559" LastActivityDate="2017-08-05T17:53:18.737" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3131" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T18:36:42.550" Score="33" Body="&lt;p&gt;Others have mentioned volume of a system and I think that's a great place to start. I have always thought of it like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to Wikipedia, in 1971, the 4004 could perform roughly 75000 instructions per second. So if you bought one when it was first announced, on November 15, 1971, and were able to keep it running continuously on some task, you could have performed about 1.0821931e+14 operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you purchased a Intel Core i7 5960X and started it running continuously on some task ten minutes ago, it would have performed about 1.42986e+14 operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modern GPUs can perform even more operations so in reality, it would probably take 2 minutes to match the 40+ years of the 4004.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of some task your students will be interested in like an image filter and figure out how many operations it takes. Then divide it and say: &quot;If you wanted to apply a sepia filter to your collection of 1000 images and you bought a computer in 1971 and left it running, it would almost be done. If on the other hand, you had waited until the beginning of this class, it would now be complete.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, it's usually faster to wait for new hardware than start a task on old hardware and leave it running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sources:&#xA;Wikipedia (Don't have enough rep for 2 more links)&#xA;&lt;a href=&quot;http://scottsoapbox.com/2015/08/15/how-far-weve-come-40-years-of-processing-power/&quot; rel=&quot;noreferrer&quot;&gt;http://scottsoapbox.com/2015/08/15/how-far-weve-come-40-years-of-processing-power/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2417" LastActivityDate="2017-08-05T18:36:42.550" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3132" PostTypeId="1" CreationDate="2017-08-05T18:40:28.573" Score="6" ViewCount="568" Body="&lt;p&gt;My students are knowledgeable about Java but need to know something about Regular Expressions. Many students find them difficult and intimidating. The students don't need to know every detail, but &lt;em&gt;do&lt;/em&gt; need to know enough to work effectively and learn more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are effective ways of teaching the fundamentals of regular expressions in Java or otherwise?&lt;/strong&gt; I'd like the students to understand how it works, and not only what each pattern does.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This year it's been decided at my school (I'm a teacher assistant this year) to teach the students a bit about regular expressions. We teach in Java.&#xA;The students have never faced anything like regex in the past. The students I've asked (we have a test group - we test new ideas on them for feedback. A diverse group in terms of level and background&lt;sup&gt;1&lt;/sup&gt; consisting of 3-4 students) seem to find regex very difficult (we just gave them the pattern list and explain each pattern).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;background in terms of knowledge in the field.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-08-05T20:24:09.093" LastActivityDate="2017-08-06T17:10:42.240" Title="Effective ways of teaching regex to students who know Java" Tags="|lesson-ideas|regex|" AnswerCount="4" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3133" PostTypeId="2" ParentId="3132" CreationDate="2017-08-05T20:00:22.203" Score="6" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Many students find them difficult and intimidating.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then the challenge is to make them fun and engaging and (ideally) interactive. I myself have undertaken the challenge here and there of teaching myself regex, and two resources rose to the top in my own learning: &lt;a href=&quot;https://regexone.com/&quot; rel=&quot;noreferrer&quot;&gt;RegexOne&lt;/a&gt; and &lt;a href=&quot;https://regexcrossword.com/&quot; rel=&quot;noreferrer&quot;&gt;Regex Crossword&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RegexOne is great as a lesson-by-lesson tutorial. Students can type and see in real time what tests cases their regex does/does not match. There are 15.5 lessons and 8 practice problems. The practice problems draw from relevant use cases, such as extracting a phone number, trimming white space, or reading a log file.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regex Crossword mixes regex with logic: students have to fill in a square grid and track how gradually more complex regular expressions interact with each other. (That sounds a bit vague, but an example like &lt;a href=&quot;https://regexcrossword.com/challenges/beginner/puzzles/1&quot; rel=&quot;noreferrer&quot;&gt;this one&lt;/a&gt; makes it clear what I mean.) The crosswords tend to have fun themes/solutions. There are many crosswords to solve, including ones with great complexity, so students will have to spend lots of time working at it if they'd like to complete all the puzzles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to working in class, it'd be pretty easy to work with some of the smaller crosswords in a non-digital manner. You could put one on the board at the start of every class as a warm-up or print/copy some of your favorite from the site. Maybe even have students work in groups and complete to solve a series of puzzles in the fastest possible time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Between these two resources, students will at least have a pretty good start to working with regex. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-08-05T20:00:22.203" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3134" PostTypeId="2" ParentId="3132" CreationDate="2017-08-05T22:41:45.493" Score="3" Body="&lt;p&gt;First and foremost, regular expression is a mathematical concept. Lacking the relevant background and intuition does make it intimidating indeed. Students must have at least a vague understanding of what &lt;code&gt;FA&lt;/code&gt; is, and what makes it &lt;code&gt;F&lt;/code&gt;. IMO, understanding the abilities and limitations of FAs is the key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found that conducting a creation of an regexp interpreter is an eye opener. An ultimate goal of the exercise is to make a &lt;code&gt;grep&lt;/code&gt; clone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start simple, from &lt;code&gt;strcmp&lt;/code&gt;. Introduce a dot. Spend some time explaining what makes it a &lt;em&gt;meta&lt;/em&gt; character, and how to tell a meta from a normal character. Introduce a star. Say few words on Kleene theorem, and on how this innocent star is really a centerpiece of a profound result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point students shall have enough intuition to grasp the rest of the syntactic sugar.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2017-08-05T22:41:45.493" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3135" PostTypeId="2" ParentId="3105" CreationDate="2017-08-05T23:29:43.767" Score="4" Body="&lt;p&gt;I suggest asking a kind of riddle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which is faster, UPS or the internet? (Use your schools internet as a starting point)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then specify many sizes of data. Use &quot;common sizes&quot; like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Blu-Ray&lt;/li&gt;&#xA;&lt;li&gt;DVD&lt;/li&gt;&#xA;&lt;li&gt;CD-ROM&lt;/li&gt;&#xA;&lt;li&gt;120 Gig Hard Drive&lt;/li&gt;&#xA;&lt;li&gt;2 Gig Hard Drive&lt;/li&gt;&#xA;&lt;li&gt;1.44 Floppy&lt;/li&gt;&#xA;&lt;li&gt;5&quot; Floppy&lt;/li&gt;&#xA;&lt;li&gt;Casset Tapes (think C64)&lt;/li&gt;&#xA;&lt;li&gt;Tape Spools&lt;/li&gt;&#xA;&lt;li&gt;SD Cards&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then use some variables for internet speed. Common ones like &quot;Cable&quot;, ADSL, 56k, 28.8K etc etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then once you are done playing the &quot;game&quot; of finding out which is faster in what circumstances. (Hint UPS is still faster for large data sets) Then start assigning years to the values of speed and size. Try to find out, when, UPS became slower than the internet, and for what sizes of data. Make a line graph. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course keep expanding on the &quot;data&quot; side till your far enough back. The internet didn't exist, there was no network, just snail mail. Let that sink in a moment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also try to give examples of what would fit in that data size. a 1.44 Floppy couldn't hold even 1 song from today, and took hours to transfer over a 28.8k Modem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you could give examples of things computers did. How long they would take to do it. And how you would interact with that data.&lt;/p&gt;&#xA;" OwnerUserId="2420" LastEditorUserId="-1" LastEditDate="2017-08-08T10:34:06.553" LastActivityDate="2017-08-08T10:34:06.553" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3137" PostTypeId="2" ParentId="3105" CreationDate="2017-08-06T11:00:28.480" Score="1" Body="&lt;p&gt;Draw a graph of the typical price of RAM and HDDs (both in currency / capacity) from 1960 to 2010. I don't have the figures to hand, but by way of illustration - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In 1990 (IIRC), RAM was priced at £10 / MB, hard drives at £1 / MB - in 1990 prices. Now its £14 / GB for RAM, £4 / GB for SDDs&lt;/p&gt;&#xA;" OwnerUserId="1628" LastActivityDate="2017-08-06T11:00:28.480" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3138" PostTypeId="5" CreationDate="2017-08-06T11:28:03.730" Score="0" Body="&lt;p&gt;Regular expression (often abbreviated &lt;em&gt;regex&lt;/em&gt;) are a sets of character sequences used to match patterns in strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These sequences are joined together to form a regular expression. For example, a regex for matching a substring composed of a space followed by a period (&lt;code&gt;.&lt;/code&gt;) would be &lt;code&gt;\s\.&lt;/code&gt;. the backslash is used to &lt;em&gt;escape&lt;/em&gt; special characters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regular expressions contain special characters which define some pattern.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;|&lt;/code&gt; Vertical bars are used to create OR patterns. For example, &lt;code&gt;practise|practice&lt;/code&gt; will match both &quot;practise&quot; and &quot;practice&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;?&lt;/code&gt;  The question mark indicates zero or one occurrences of the previous element. For example, &lt;code&gt;colou?r&lt;/code&gt; matches both &quot;color&quot; and &quot;colour&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;*&lt;/code&gt;  The asterisk indicates zero or more occurrences of the previous element. For example, &lt;code&gt;ab*c&lt;/code&gt; matches &quot;ac&quot;, &quot;abc&quot;, &quot;abbc&quot;, &quot;abbbc&quot;, and so on.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;+&lt;/code&gt;  The plus sign indicates one or more occurrences of the previous element. For example, &lt;code&gt;ab+c&lt;/code&gt; matches &quot;abc&quot;, &quot;abbc&quot;, &quot;abbbc&quot;, and so on, but not &quot;ac&quot;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;{n}&lt;/code&gt;    The previous item is matched exactly n times.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;{m,}&lt;/code&gt;   The previous item is matched &lt;code&gt;m&lt;/code&gt; or more times.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;{m,n}&lt;/code&gt;  The previous item is matched at least &lt;code&gt;m&lt;/code&gt; times, but not more than &lt;code&gt;n&lt;/code&gt; times.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;.&lt;/code&gt; The period indicates a single character. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;\&lt;/code&gt; the backslash is used to match a literal character which follows. For example, &lt;code&gt;a\.&lt;/code&gt; will match &quot;a.&quot;; however &lt;code&gt;a.&lt;/code&gt; will match &quot;a&quot; followed immediately by some character&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-06T12:11:55.023" LastActivityDate="2017-08-06T12:11:55.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3139" PostTypeId="4" CreationDate="2017-08-06T11:28:03.730" Score="0" Body="Questions related to teaching about regular expressions. This tag is for asking about various aspects of teaching regex. Use it for questions about regex from an educational perspective. Regular expression are often abbreviated as regex." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-06T11:52:04.110" LastActivityDate="2017-08-06T11:52:04.110" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3140" PostTypeId="5" CreationDate="2017-08-06T11:36:01.173" Score="0" Body="&lt;p&gt;Swing is a Java graphics framework, based on Java's AWT library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Swing includes additional GUI components than Abstract Window Toolkit (AWT). It has more flexible components than AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides several advanced components such as tabbed panel, scroll panes, trees, tables, and lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Swing components are largely distinguishable from their AWT counterparts by the &quot;J&quot;, prepended to the component's name (&lt;code&gt;Frame&lt;/code&gt; $\rightarrow$ &lt;code&gt;JFrame&lt;/code&gt;, &lt;code&gt;Panel&lt;/code&gt; $\rightarrow$ &lt;code&gt;JPanel&lt;/code&gt;).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-06T11:44:37.887" LastActivityDate="2017-08-06T11:44:37.887" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3141" PostTypeId="4" CreationDate="2017-08-06T11:36:01.173" Score="0" Body="Questions related to teaching the Swing Java graphics framework. Use this tag to ask about teaching how to use various components included in the Swing library." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-06T12:17:43.483" LastActivityDate="2017-08-06T12:17:43.483" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3143" PostTypeId="2" ParentId="3124" CreationDate="2017-08-06T13:15:16.597" Score="5" Body="&lt;p&gt;Personally, I'm a believer in a project based capstone and a group one at that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The project should involve going from generating (and pitching) an idea through design, development and ultimately delivery and should require integrating multiple tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since many kids would want to use such a course as preparation for internships and jobs, I'd say it's more appropriate to take in the junior rather than senior year. That's ok though since you're done with most if not all core major requirements by then and are taking electives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know taking a capstone prior to the senior year sounds wrong to some but it should show mastery of many if not all of the core concepts in a typical CS major and fill a big hole in a students development.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-08-06T13:15:16.597" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3145" PostTypeId="2" ParentId="3105" CreationDate="2017-08-06T13:45:02.140" Score="6" Body="&lt;p&gt;&lt;strong&gt;Compare a graphing calculator with a smart phone.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students are in high school, then they probably carry around something like a TI-83 Plus calculator, which contains a 6MHz Z80 processor, 27 kB of user RAM, and a 96×64-pixel monochrome display. That's the same processor and similar specs as an Osborne 1, which was sold in 1976 for over \$4,000 (in today's money) or a TRS-80, which was sold in 1977 for $2,400.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Place a graphing calculator along-side a smart phone. Ask your students whether they'd rather pay \$5,000 for the calculator or $500 for the smart phone. In 40 years, processors and memory have improved by a factor of 1,000, desktops have shrunk to pocket-sized, and cost has dropped by a factor of 10.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason why a graphing calculator costs \$100 instead of \$10 is beyond the scope of the question, but it makes more sense of you think of calculators as a necessity for passing a class (no smart phone apps allowed).&lt;/p&gt;&#xA;" OwnerUserId="2432" LastEditorUserId="2432" LastEditDate="2017-08-09T13:22:59.473" LastActivityDate="2017-08-09T13:22:59.473" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3146" PostTypeId="2" ParentId="3132" CreationDate="2017-08-06T17:10:35.067" Score="1" Body="&lt;p&gt;It is important to know that there are two languages involved, each with its own rules and metacharacters.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Characterclassese is the language of character classes, which are character wildcards.  Its special characters include &lt;code&gt;[ ] ^-&lt;/code&gt;.  Every character class stands for a single character.   Literal characters are themselves.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regexese is a second language. Its atoms are character classes.  Here are some of its rules&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Juxaposition means &quot;and then immediately.&quot;&lt;/li&gt;&#xA;&lt;li&gt;It has an operator for &lt;code&gt;or&lt;/code&gt; which is &lt;code&gt;|&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Parentheses are delimiters and can override the order of operations&lt;/li&gt;&#xA;&lt;li&gt;There are several postfix multiplicity operators which have higher precedence than juxtaposition. &lt;/li&gt;&#xA;&lt;li&gt;Special character classes include &lt;code&gt;.^$&lt;/code&gt;  These are metacharacters in the &#xA;language as well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is important to point out the existence of the two layers and how they work together.  &quot;Hedwig,&quot; the O'Reilly book on Regexes is great.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-06T17:10:35.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3147" PostTypeId="2" ParentId="3132" CreationDate="2017-08-06T17:10:42.240" Score="5" Body="&lt;p&gt;In Java: &lt;strong&gt;Don't&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In programming language &lt;em&gt;X&lt;/em&gt;: &lt;strong&gt;Don't&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Treat Regular Expression as its own language. Teach regex in a language-agnostic fashion using tools that process regular expressions rather than trying to teach regular expressions &lt;strong&gt;and&lt;/strong&gt; their implementation in Java, or any other language. Each language has its own, idiosyncratic, engine and method of use. Different engines implement subsets of the entirety of the regular expression specifications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a starting point, use an online version of a regular expression editor. There are two fairly good versions that I'm aware of. First is &lt;a href=&quot;https://regex101.com/&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Online regular expression editor IDE from Regex101&quot;&gt;Regex101&lt;/a&gt;, which has a decent IDE style interface, including an live explanation of the current expression, and a token list to choose from. The one feature I like is that it allows you to &quot;Save &amp;amp; Share&quot; the expression, which adds it to a library of expressions available to others. Of course, that library is also available to you, so you can try to find one that's already written to do what you need. One major issue I have with this site is that it still does not implement the entire specification of regular expressions. Specifically, it does not handle If-Then-Else conditionals: &lt;code&gt;(?(subpattern)yes|no)&lt;/code&gt; and &lt;code&gt;(?(group)yes|no)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second site, which will handle the If-Then-Else conditionals, is &lt;a href=&quot;http://regexstorm.net/tester&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Online regular expression editor from Regex Storm&quot;&gt;Regex Storm&lt;/a&gt;. This one produces a nice set of tables for the &quot;output&quot; of the expression, but lacks the collection of tokens, and library of expressions of Regex101. As near as I have been able to determine, this editor implements the entire set of regular expressions available in all engines extant, including left-to-right text. There is also an extensive reference on this site that can be terse at times, but does include examples for most of the complex, or potentially confusing, constructs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After selecting the editor to use, local, online, etc., the problem now becomes how to work through the &quot;language&quot; of regex. I don't like to reinvent the wheel. Therefore, the best option I can think of is to follow the outline of the regex tutorial built in to Perl, &quot;perlretut&quot;, which should be available from any complete Perl install by typing &lt;code&gt;perdoc perlretut&lt;/code&gt; on the command line. Perl.org's documentation also has it &lt;a href=&quot;https://perldoc.perl.org/perlretut.html&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Perl.org online regular expression tutorial&quot;&gt;online in HTML&lt;/a&gt; for all to use. Granted, all the samples there are given in the context of use within Perl, so they need to be converted for your classroom use. The idea isn't to, necessarily, use their examples, as to follow the sequence they have created. They've invented the wheel, now you get to design the rims and hub caps so that the vehicle you need is &quot;road ready.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To cover the &lt;em&gt;very&lt;/em&gt; basic outline, below is the relevant sections from the Table of Contents for &lt;code&gt;perlretut&lt;/code&gt;. For the &quot;died-in-the-wool&quot; purists, it even begins with the inexplicably obligatory &quot;Hello World&quot; of program language instruction.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Part 1: The basics&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Simple word matching&lt;/li&gt;&#xA;  &lt;li&gt;Using character classes&lt;/li&gt;&#xA;  &lt;li&gt;Matching this or that&lt;/li&gt;&#xA;  &lt;li&gt;Grouping things and hierarchical matching&lt;/li&gt;&#xA;  &lt;li&gt;Extracting matches&lt;/li&gt;&#xA;  &lt;li&gt;Backreferences&lt;/li&gt;&#xA;  &lt;li&gt;Relative backreferences&lt;/li&gt;&#xA;  &lt;li&gt;Named backreferences&lt;/li&gt;&#xA;  &lt;li&gt;Alternative capture group numbering&lt;/li&gt;&#xA;  &lt;li&gt;Position information&lt;/li&gt;&#xA;  &lt;li&gt;Non-capturing groupings&lt;/li&gt;&#xA;  &lt;li&gt;Matching repetitions&lt;/li&gt;&#xA;  &lt;li&gt;Possessive quantifiers&lt;/li&gt;&#xA;  &lt;li&gt;Building a regexp&lt;/li&gt;&#xA;  &lt;li&gt;Using regular expressions in Perl&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;li&gt;Part 2: Power tools&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;More on characters, strings, and character classes&lt;/li&gt;&#xA;  &lt;li&gt;Compiling and saving regular expressions&lt;/li&gt;&#xA;  &lt;li&gt;Composing regular expressions at runtime&lt;/li&gt;&#xA;  &lt;li&gt;Embedding comments and modifiers in a regular expression&lt;/li&gt;&#xA;  &lt;li&gt;Looking ahead and looking behind&lt;/li&gt;&#xA;  &lt;li&gt;Using independent subexpressions to prevent backtracking&lt;/li&gt;&#xA;  &lt;li&gt;Conditional expressions&lt;/li&gt;&#xA;  &lt;li&gt;Defining named patterns&lt;/li&gt;&#xA;  &lt;li&gt;Recursive patterns&lt;/li&gt;&#xA;  &lt;li&gt;A bit of magic: executing Perl code in a regular expression&lt;/li&gt;&#xA;  &lt;li&gt;Backtracking control verbs&lt;/li&gt;&#xA;  &lt;li&gt;Pragmas and debugging&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;One additional resource which I have found helpful from time to time is &lt;a href=&quot;http://www.regular-expressions.info/&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Online regular expression resource&quot;&gt;Regular-Expressions.info&lt;/a&gt;. They include a reference and a tutorial, among other things. The significance of this site is that it often has a different way of &quot;saying&quot; the same thing as other sites, which can reach a student when the standard explanation just does not &quot;click&quot; for the student.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2017-08-06T17:10:42.240" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3148" PostTypeId="2" ParentId="3105" CreationDate="2017-08-06T17:18:11.670" Score="6" Body="&lt;p&gt;I like all the suggestions about visuals but it can sometimes be very hard to really connect an old storage device and a new one since the data stored is hidden in bits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's easy to show that punchards used to be used and required and lend themselves to a nice visual. Punchards are 1 line of code per card. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Linux Kernel is 15,000,000 lines long. A ream of paper has 500 sheets in it with a sheet being thicker than a punchcard. That means the Linux kernel would be a stack of 30,000 reams of paper. You can grab some reams of paper from the copy room and start stacking. Maybe not the Linux kernel but other examples -- the kids final projects. Contrast that with the fact that these programs take no space and no time to load and run now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking that there's probably something that can be shown with emulators - spin up tons of old computer emulators on a modern PC or something like that.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-08-06T17:18:11.670" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3149" PostTypeId="2" ParentId="3105" CreationDate="2017-08-06T17:56:59.153" Score="3" Body="&lt;p&gt;It's almost impossible to convey a sense of wonder when they don't appreciate what they have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal favorite approach is to point out that the Apollo Guidance Computer (AGC), which sent us to the moon, was a 2Mhz processor with 2k of RAM.  The original Game Boy had a 4MHz processor and 8k of RAM.  The old game boy was more powerful than the AGC!  Well, almost.  The AGC did have triple redundancy on all circuits, so you would have to duct tape 3 Game Boys together if you really wanted to compete with it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, of course, a modern cellphone chuggs along at 1800Mhz!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find it helps to first appreciate just how blindingly powerful and fast computers actually are.  Then we can talk about where they came from.  One of the calculations I did a while back was comparing the speed of a cache hit versus going out to memory to get the information.  It turns out, due to serendipity, that the difference in speed between a L1 cache hit and a round trip to memory is actually the same speed difference as that of a Cheetah at full sprint vs. the top speed of a snail.  No joke!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, that doesn't help if you don't have a sense of how fast either of those are, so let's compare them both to something we can appreciate: how long it takes to load a web page.  There's a latency associated with going across the world over fiber optics.  It turns out that your round trip ping time from America to Europe (the absolute bare minimum portion of loading a web page) can be put on this scale between cheetahs and snails.  This web page access proceeds &lt;em&gt;at the speed of the San Andreas fault slowly opening in California&lt;/em&gt;!  Yes.  On this scale of speeds, California actually starts sinking into the ocean!&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-08-06T17:56:59.153" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3150" PostTypeId="1" CreationDate="2017-08-06T18:46:42.820" Score="6" ViewCount="255" Body="&lt;p&gt;I'm a student in computer science and got my bachelor's degree 2 weeks ago. I had the opportunity to practice a lot of C/C++ (more C than C++) during the past 2 years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I frequently don't know what I should know in order to realize what I want to do, or in order to fix a bug, because in order to do what I want to do, I need to know what the steps are to reach my goal, or at least in which direction I should look in order to figure out the intermediate step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, let's say I ask you to create a shell from scratch. A friend told me that: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There is a function which allows you to execute some builtins command (&lt;code&gt;execv()&lt;/code&gt; function in C) &lt;/li&gt;&#xA;&lt;li&gt;There is also a function which allows you to execute a function without leaving the current process (&lt;code&gt;fork()&lt;/code&gt; function in C)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How are you supposed to know that you need a function which allows you to execute a function without leaving the current process? How are you supposed to came to the conclusion that you need a function to execute builtins, but inside a child process in order to keep the program running normally?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How can I figure out what steps I need to take to realize what I want to do, or how to figure out what I need to search for in order to create a program?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask the question because I may have a bachelor in computer science but I'm not capable of keeping a job as a developer.&lt;/p&gt;&#xA;" OwnerUserId="2434" LastEditorUserId="919" LastEditDate="2017-08-06T19:55:32.710" LastActivityDate="2017-08-09T10:43:36.217" Title="How to figure out what I need to search for in order to create a program?" Tags="|self-learning|project|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3151" PostTypeId="2" ParentId="3150" CreationDate="2017-08-06T22:48:09.263" Score="5" Body="&lt;p&gt;To a certain degree, it comes down to experience. But if you don't have experience, I feel you can get a lot of mileage of just trying to do the simplest thing possible to see what'll happen and googling your questions as you go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point, you'll run into an obstacle you didn't anticipate and realize you need to pivot and adjust or even entirely re-write your code to accommodate. (Having to rewrite code can seem painful at first, but it's basically something everybody needs to get used to. It's helpful to have a sort of zen mindset, where you let go of your attachment to your code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you do this enough times, you start to develop a sort of gut sense for what sorts of obstacles you might end up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, take your shell example. If I had absolutely no idea what I was doing but just moved forward instead, I would probably...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start by writing the code to do the user input/output stuff so I can get commands from the user. This code would likely be extremely minimal/something you'd write in a CS1 class.&lt;/li&gt;&#xA;&lt;li&gt;Next implement some basic shell navigation functionality like &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt; directly within the shell. Now, my shell is a little more complicated: I need to remember things like where I'm located in the file system; I'd probably have to do some research on how you'd implement things like &lt;code&gt;ls&lt;/code&gt; within C...&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Next, try I'd try and implement the ability to have my shell call other programs. Since I'm a beginner, I have no idea how to do this, so I'd pretty much immediately just google &quot;C run another program&quot;. This will immediately bring up results that mention the &quot;fork&quot; and &quot;exec&quot; keywords. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might not know what those mean, but it gives me just enough context that I can form more specific google queries. (&quot;C exec example&quot;, &quot;C exec vs excv&quot;, etc...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, depending on how I previously wrote my shell, I might immediately be able to adapt these examples to my own code, or I might need to rewrite and rearrange things significantly. This is mildly painful, but such is the life of a beginner -- no biggie, I do what I need to.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then you rinse and repeat...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another strategy you can try is to try &lt;em&gt;planning ahead&lt;/em&gt;: specifically, figure out what precisely you want to do, then &lt;em&gt;decompose&lt;/em&gt; that plan into smaller and smaller subproblems. The nice thing about this approach is that it forces you to think about potential obstacles you might run into and can help make it easier for you to form precise google queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, we want to write a shell. Well, what exactly does this shell need to be able to do? Let's say as a minimum prototype, I want to be able to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get user input&lt;/li&gt;&#xA;&lt;li&gt;Run basic navigational commands like &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Define basic environment variables&lt;/li&gt;&#xA;&lt;li&gt;Be able to run other programs&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Ok, how do we do all three of these things? Well, if we drill down, we might end up coming up with something like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Get user input&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Recognize and expand environment variables first?&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;Run basic navigational commands like &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make some kind of system or library call to get the data I need? (Note to self: google this)&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;Define basic environment variables&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Process the user input to get the variable name and the value somehow?&lt;/li&gt;&#xA;&lt;li&gt;Store the variables in a map of some sort?&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;Be able to run other programs&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;??? (Note to self: google this)&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Notice that if we had kept drilling down, we'd end up learning about the fork and exec thing here as well.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-06T22:48:09.263" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3152" PostTypeId="1" AcceptedAnswerId="3157" CreationDate="2017-08-07T01:20:46.767" Score="10" ViewCount="181" Body="&lt;p&gt;I was inspired by &lt;a href=&quot;https://cseducators.stackexchange.com/users/765/bennett-brown&quot;&gt;BennetBrown&lt;/a&gt;'s answer &lt;a href=&quot;https://cseducators.stackexchange.com/a/1372/27&quot;&gt;here&lt;/a&gt;, in which he says&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;&quot;Please, CS ed, produce something akin to &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0471137073&quot; rel=&quot;noreferrer&quot;&gt;Teaching Introductory Physics&lt;/a&gt;. Guzdial's &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1627053514&quot; rel=&quot;noreferrer&quot;&gt;Learner-centered Design of Computing Education&lt;/a&gt; is a wonderful book, but we have a long way to go to match the physics education community's understanding of their craft.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Which got me thinking that I really did want to expand my craft, and that a book would be just the thing.  In my searching, I of course found Guzdial's &lt;strong&gt;Learning-centered Design&lt;/strong&gt; (which BennetBrown mentioned), but I also found  this: &lt;a href=&quot;https://smile.amazon.com/Guide-Teaching-Computer-Science-Activity-Based/dp/1447166299/ref=sr_1_1?ie=UTF8&amp;amp;qid=1502067480&amp;amp;sr=8-1&amp;amp;keywords=guide+to+teaching+computer+science&quot; rel=&quot;noreferrer&quot;&gt;Guide to Teaching Computer Science: An Activity-Based Approach&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I can find precious little detail about either volume.  Are there significant differences between the two that I should take into account when selecting one of them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;  I also just found &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824/ref=pd_sbs_14_4?_encoding=UTF8&amp;amp;pd_rd_i=1479171824&amp;amp;pd_rd_r=M5G1HVGY6R81Z41RYTEA&amp;amp;pd_rd_w=cmAmO&amp;amp;pd_rd_wg=hYNPG&amp;amp;psc=1&amp;amp;refRID=M5G1HVGY6R81Z41RYTEA&quot; rel=&quot;noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt;, which does not claim to be a CS book, but its primary two authors are Computer Science professors so it might also fit into this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Also, I believe that these are the only two books like this, though if I have missed one somewhere, leave a comment and I will integrate it into the question.)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-08T11:53:29.143" LastActivityDate="2017-08-08T11:53:29.143" Title="Books that summarize pedagogical research within our field" Tags="|resource-request|resource-information|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3153" PostTypeId="2" ParentId="3105" CreationDate="2017-08-07T06:07:12.443" Score="4" Body="&lt;p&gt;The problem with teaching the trajectory of computing technology is with basic numeracy.  The orders of magnitude are just too big for many students to comprehend without more numeracy and feeling for log() scales.  Many of the examples here would just go over their heads as random magical numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would teach this by not talking about computers, at first, but start with one of those science picture books that shows a proton, then orders magnitudes to the height of a humun, then orders of magnitudes to the size of the known universe.  Also one of those books that show all of human history as the last fraction of a second on a 24 hour clock mapped to the age of the Earth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, after students go wow over these scales, maybe an appreciation for them, only then overlay computing technology: gears to relays to tubes to discrete transistors to ICs to VLSI to 10 nm finfets SOCs in their iPhones, and put each on top of the one of pages of those order-of-magnitude books.  Give them a better sense of Moore's law scaling as it relates to the universe of scaling. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they might be impressed that you started out in the Paleolithic period of computing.  Or as a protozoa equivalent.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-08-07T06:07:12.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3154" PostTypeId="2" ParentId="3152" CreationDate="2017-08-07T12:05:12.180" Score="3" Body="&lt;p&gt;While it isn't specifically devoted to to CS and is directed at the more general teaching community, &lt;em&gt;Tools for Teaching&lt;/em&gt; by Barbara Gross Davis is an incredibly useful book.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book discusses everything from designing a single course and writing an effective syllabus to testing and grading, with everything in between. It also discusses evaluating the course itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are sections on discussion, lectures (including large lectures), alternative to lectures, student motivation, assignments, etc. The book also discusses diversity of the student body and how to teach in complex environments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book is available at &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0787965677&quot; rel=&quot;nofollow noreferrer&quot;&gt;Amazon&lt;/a&gt; where you can also find the complete TOC. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If memory serves, our Dean (in a University School of Computing) once gave a copy to every faculty member in the School. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While not specifically about CS, it &lt;em&gt;is&lt;/em&gt; based on Educational Research. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-07T12:14:18.203" LastActivityDate="2017-08-07T12:14:18.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3155" PostTypeId="1" CreationDate="2017-08-07T12:24:03.327" Score="2" ViewCount="145" Body="&lt;p&gt;What is your current practice of teaching ethics to students, both institutionally and individually? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the teaching of ethical standards (not just lists of rules) has at least two elements: What to &lt;em&gt;do&lt;/em&gt;, as well as what &lt;em&gt;not to do&lt;/em&gt; to be ethical. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are your students required to take any ethics courses? Are those courses tailored in any way to the concerns of the technorati? Do you bring up ethical consequences of the things you teach? Are you required to? What topics do you think are most important? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can you recommend to others for giving students some ethical training?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are students required to buy in to an ethical standard beyond the classroom?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or do we simply depend on, and hope that, it happens &lt;em&gt;somewhere&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be helpful to know which courses you teach that clearly require ethical behavior and how you go about teaching it. For example IoT (Internet of Things) development has clear implications about security and privacy. How do students learn this? &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-08T03:14:37.520" Title="What part does formal Ethics training play in your curriculum?" Tags="|curriculum-design|best-practice|ethics|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3156" PostTypeId="2" ParentId="3150" CreationDate="2017-08-07T14:53:29.620" Score="4" Body="&lt;p&gt;You ask an excellent question.  That means it's a hard to answer one!  The example happens to be an especially difficult little program to write because its operation is so entwined with the way Linux approaches process management.  On Windows, for example, one uses the &lt;code&gt;CreateProcess&lt;/code&gt; function, which avoids a lot of the oddness of the steps you refer to.  However, I recognize you intended your example to just be an example, so I'll try to use it to point out how other software might be written.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a big fan of serendipity.  Last night I was watching a bunch of Russian physicists discussing consciousness with the Dalai Lama.  In it, one of the physicists brought up a model Einstein used to depict his notion of modern physics.  In a letter to Maurice Solovine, Einstein depicted how modern physics works like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/fJKDg.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/fJKDg.gif&quot; alt=&quot;Einstein&amp;#39;s Model&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As he described it, the process for modern physics operated as a loop.  On the bottom, we have the experiences we have in life.  The arrow sweeping off to the left is intuition.  From these experiences in life we distill highly abstract concepts of what the &quot;laws of physics&quot; might be, which are the axioms of science.  From those, we deduce very specific testable statements which then encourage us to go out and actually run the tests and make the results part of our experience.  The cycle then continues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is very similar to how a programmer builds up a program.  They start from the sum of their experience as a developer, and use that to fuel an intuitive leap to a set of axioms that one &lt;em&gt;thinks&lt;/em&gt; can solve the problem at hand.  One then builds more concrete statements which suggest ways you can test these axioms to see if they're right.  When we actually test it, we experience what really happens, and that fuels the next intuitive leap.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, the challenge as a young developer such as yourself is that you haven't developed that intuition to make the first leap.  This is not unusual.  Most students get through college without developing this intuition because it's not what school teaches.  Instead, you develop that intuition very rapidly once you get out in the field.  Don't worry, you're not alone!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To jump start the process, we in the field of computer programming rely on something called &quot;requirements.&quot;  These are axioms which &lt;em&gt;someone else&lt;/em&gt; gives you and says &quot;your project must fit to these axioms.&quot;  If you're lucky, these requirements were developed by someone who knows something about the problem at hand, so they're pretty close to the correct ones.  You then simply have to develop the deduced statements and test them out, developing your own experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a very good team lead, they'll give you requirements that are just right enough to keep you productive, but have just enough flaws that you can start developing your own intuition.  Often there is something wrong with the requirements, and when you realize this, you are often the only person with the experience required to make the intuitive leap to the new axioms.  To give a concrete example, if your team lead has only ever worked on Windows, they may have the Windows axioms in their head, which assume there is a &lt;code&gt;CreateProcess&lt;/code&gt; function.  If your product needs to work on Linux, their requirements may end up being wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what happens at this point?  Well, you have requirements to find the &lt;code&gt;CreateProcess&lt;/code&gt; function on Linux.  You deduce that such a function should appear in the Linux API documentation, so you go test that theory.  You look through the documentation, and don't find it.  Now you have an experience that your team lead didn't have -- your team lead hasn't gone through the documentation like you just did!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you know you can reject one of the axioms as &quot;not correct.&quot;  So what was it's purpose?  This is where your intuition comes in.  You read the documentation on &lt;code&gt;CreateProcess&lt;/code&gt; on Windows, you study what your product (the shell) is supposed to do, and make the intuitive leap that what your team lead really wanted was process management.  Now you have an axiom that you've invented.  Nobody told you to do &quot;process management.&quot;  You were told to use &lt;code&gt;CreateProcess&lt;/code&gt;.  You intuitively theorized the reasons for why they wanted you to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next comes the development of deduced statements.  You have an axiom stating that your job as a developer is to figure out how to do process management.  You need to develop a few specific statements which can test this axiom.  This might mean making a few statements which you may ask your team lead about.  You might tell your team lead that there is no &lt;code&gt;CreateProcess&lt;/code&gt; function on Linux, and ask for clarification to see if what he's really looking for is general-purpose process management.  Or you might deduce &quot;this sounds like something people have done before, I bet there's &lt;a href=&quot;https://stackoverflow.com/questions/5883462/linux-createprocess&quot;&gt;an answer on StackExchange&lt;/a&gt;.&quot;  (If it's not on stack exchange, it's probably not worth doing!).  Or you might have to take the long route.  You might have to say &quot;I understand that Linux has functions to create processes.  Which functions are capable of creating new processes?&quot;  This would then lead you to go look through the documentation again, and find &lt;code&gt;fork&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, you can fork your process, but obviously that isn't exactly what you want.  You want to execute a new program.  Another intuitive leap: &quot;given that people execute programs on Linux, there's probably a way to do it.&quot;  Combining &quot;fork is the way we spawn new processes&quot; with &quot;there's a way to spawn other programs on Linux,&quot; you can deduce the idea that there's probably a function which turns one program into another.  This will lead you to find &lt;code&gt;exec&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now all of this is dependent on a balance.  Your team lead has to give you enough requirements that your fresh-out-of-school intuition is capable of filling in the gaps, but they also need to be able to listen to you when you come up with new axioms which might change the requirements.  Team leads generally have experience.  They have the skill to do this (most of them, at lest).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And what if you're on your own?  What if you're just sitting at home honing your skills without a team lead to direct you?  Well then, you are your own team lead!  I recommend starting small.  As a general principle, we learn the most when we pick a program that is within our reach, but &lt;em&gt;just&lt;/em&gt; outside of our grasp.  I wouldn't pick a shell as my first test program, because they're rather hard.  However, if you just finished a course on how processes are managed by the operating system, that task may be right up your alley!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And remember to always have fun!  It's so much harder to develop intuition when you're not having fun!&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-08-07T14:53:29.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3157" PostTypeId="2" ParentId="3152" CreationDate="2017-08-07T15:56:47.043" Score="5" Body="&lt;p&gt;Here are books in print that address a range of issues within teaching computer science, synthesize pedagogical questions and research-based answers distilled from research, and include extensive references to the literature.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Frieze and Quesenberry. (2017). &lt;strong&gt;Kicking butt in computer science: Women in computing at Carnegie Mellon University&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Summarizing the efforts at CMU to diversify CS undergraduate enrollment, the book is intended to help CS teachers duplicate CMU's success by focusing on benefits of diversity rather than gender differences.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Guzdial. (2016). &lt;strong&gt;Learner-centered design of computing education&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Intended as a review of literature on teaching CS to people who are not aiming to be CS professionals, the seven chapters define the problem, summarize the research, and ask many questions yet to be answered in the literature.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Hazzan, Lapidot, and Ragonis. (2014) &lt;strong&gt;Guide to teaching computer science, 2nd edition&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Intended as textbook for a CS teaching methods course, the Guide helps a CS Methods instructor model active learning techniques by structuring the text around 110 activities in which the CS teachers are the participants.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Kafai and Burke. (2014) &lt;strong&gt;Connected code: Why children need to learn programming&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Describing educational programs that have worked with children, and the programs' results, this book aims to help teachers and influencers lead cultural changes toward computational participation and new ways of thinking and learning.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Krauss and Prottsman. (2017). &lt;strong&gt;Computational thinking and coding for every student&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Aiming to help the K-12 teacher with no CS experience, this book offers lesson plans, resources, and pedagogical advice mirroring the consensus of the CS community. Self-described as a &amp;quot;getting-started guide,&amp;quot; it is not a review of literature, the the References list about 50 sources, some of which are research articles.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-08-07T17:43:47.567" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3158" PostTypeId="2" ParentId="3124" CreationDate="2017-08-07T16:36:52.597" Score="4" Body="&lt;p&gt;The answer depends on the desired outcomes for your program, as the capstone should accomplish at least some of your program outcomes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For better or worse, we have a variety of &lt;a href=&quot;https://cs.calvin.edu/administration/assessment/plan/&quot; rel=&quot;nofollow noreferrer&quot;&gt;outcomes for our CS program&lt;/a&gt;, some of which are college-wide outcomes and others of which are CS-specific. We are unable to accomplish all of these in a single course, so we have our seniors complete two requirements:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cs.calvin.edu/courses/cs/384/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS 384, &lt;em&gt;Perspectives on Computing&lt;/em&gt;&lt;/a&gt;, a 3-credit course in which the students read, discuss, and write about the social and ethical issues related various aspects of computing technology (e.g., algorithmic bias, data privacy, software responsibility, etc.).  Students take this course during their final Spring semester, so that they have as much experience as possible to bring to the table.  We also have our seniors take the ETS CS Major Field Test (CS-MFT) during this course, as one piece of our assessment plan.  This course fulfills a college-wide requirement under the college's definition of capstone experience.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cs.calvin.edu/courses/cs/396/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS 396 (&lt;em&gt;Senior Project I&lt;/em&gt;) and 398 (&lt;em&gt;Senior Project II&lt;/em&gt;)&lt;/a&gt;, two 2-credit courses in which the students work either individually or in teams to complete a significant project, usually but not necessarily a software system. Students normally take 396 during their final Fall semester and 398 during their final Spring semester. This 2-course approach spreads the senior project over their entire senior year.  Students meet once per week with a faculty mentor for an hour; the faculty member gets an hour of teaching credit for the year for each project they supervise. Students typically do the initial research, background and design work during the Fall semester (396), may build an initial prototype, and give a progress report in December. During the Spring semester (398), the students complete their project, write a final report (usually multiple revisions), and give a public presentation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;At many places, the 396+398 combination would be considered a capstone experience, and so far as technical skills go, they do provide that sort of outcome.  But to meet our college-wide outcomes, our &lt;a href=&quot;https://cs.calvin.edu/administration/assessment/plan/&quot; rel=&quot;nofollow noreferrer&quot;&gt;program outcomes&lt;/a&gt; include this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Analyze the social and ethical issues surrounding the use of computing&#xA;  and its effects on society&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;so we use a 2-pronged approach to achieve both the technical and contextual outcomes. A benefit of this approach is that we don't have to choose between a project-oriented capstone or a non-project capstone; our students effectively get both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's one model. It probably isn't for everyone, but it works for us.&lt;/p&gt;&#xA;" OwnerUserId="1321" LastActivityDate="2017-08-07T16:36:52.597" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3159" PostTypeId="2" ParentId="3155" CreationDate="2017-08-07T17:47:31.770" Score="1" Body="&lt;p&gt;I hadn't really considered teaching this, but one could use the &lt;a href=&quot;https://www.acm.org/about-acm/acm-code-of-ethics-and-professional-conduct&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACM Code of Ethics&lt;/a&gt; and Professional Conduct, and simply talk through the major points. I looked at the &lt;em&gt;General Moral Imperatives&lt;/em&gt; section and it basically boils down to the usual ideas about &quot;doing what you would want to happen&quot; in a situation. If people do not realize that we are in a collective enterprise and that their actions affect everyone, then they need more basic education.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;To answer your questions:&lt;/strong&gt; There is some &quot;soft skills&quot; training here, but I am not involved in presenting it. As far as I know, it is not discussed otherwise and the students are not required to accept any set of principles. I guess we figure that they already have it. My co-instructor referred to ethics as &lt;em&gt;&quot;the things we used to assume everyone already knew.&quot;&lt;/em&gt; Where and how they used to learn it and who is failing in their responsibility, I do not know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gerald M. Weinberg writes about The Platinum Rule (do unto others as they would be done unto) and I can't see that much more needs to be said about ethics, beyond illustrating what could happen if that rule is not followed. It is no different from other fields that have codes of ethics and professionalism. (Except that we can easily influence the lives of millions of people, for good or ill.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this reference - Stanford panel debates: &lt;a href=&quot;http://news.stanford.edu/news/2014/may/ethics-in-society-051314.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Does teaching ethics do any good?&lt;/a&gt; - they ask, &quot;can something as personal as ethics be taught in a classroom?&quot; I don't see ethics as personal, any more than physics or finance are. If you know what to do, you can safely assume that any other person who also knows will do the same thing. The only 'personal' factor would be ignorance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also says, &quot;teaching students social psychology, rather than moral philosophy, is one of the most effective ways to make them more responsible social actors.&quot; I would agree. Finally, one participant said, &quot;When I teach them how to write a philosophy paper, I definitely assume I know better than they do how to write a philosophy paper ... [but] I'm 100 percent certain I am not more virtuous than many of my students. Some of them live much more conscientiously than I do.&quot; I don't understand that either: why wouldn't more experience make one more virtuous? As the old saying goes, good judgement comes from experience and experience comes from bad judgment. Shouldn't this be true in all cases?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-07T20:21:40.260" LastActivityDate="2017-08-07T20:21:40.260" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3160" PostTypeId="2" ParentId="3150" CreationDate="2017-08-07T18:38:16.377" Score="4" Body="&lt;p&gt;Michael's answer is already pretty spot-on, but I wanted to offer another angle: you need to &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;break your problem down into smaller pieces&lt;/a&gt; and then take those pieces on one at a time. Those steps should be in English, not in code. &lt;strong&gt;If you aren't sure what code you need, then you haven't broken down your problem into small enough (English) pieces yet.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That process of breaking things down into smaller pieces is one of the most important skills in programming, and it's very hard to teach (and learn!). The only way to learn it is by going through it, over and over again. Think about it this way: every time you had a homework assignment that you didn't know how to start, the real lesson wasn't about syntax or regurgitating code. The real lesson was the process of taking a larger goal and breaking it down into smaller pieces!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For example, let's say I ask you to create a shell from scratch.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The first thing you need to do is break that down in a set of smaller steps, in English. I might start that like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a GUI that resembles a console. Note that this should be further broken down into individual pieces, like create a text area box that shows the output of anything you run, and create a text field box that allows users to input commands.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Allow users to run commands using the input field. This will involve taking commands as string values and converting them into system instructions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take the output from any commands that are run and display it back in the text area we build in step one.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Each of these steps can be further broken down, but hopefully you can see that these bite-sized chunks are a little more manageable. It's easier to google &quot;C++ create text area&quot; than it is to google &quot;C++ create shell from scratch&quot;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A friend told me that:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Ignore your friend.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the amazing, and frustrating, things about programming is that there are a million ways to do everything. I've outlined my approach. Your friend has mentioned things they would try. &lt;strong&gt;None of that matters.&lt;/strong&gt; The only thing that matters is how &lt;strong&gt;you&lt;/strong&gt; break the problem down into smaller pieces, and how you think each of those pieces should be approached.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're worrying about the fact that you didn't &quot;know&quot; the steps that your friend knew. But the thing is: your friend won't &quot;know&quot; the steps that you come up with either!&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How are you supposed to know that you need a function which allows you to execute a function without leaving the current process? How are you supposed to came to the conclusion that you need a function to execute builtins, but inside a child process in order to keep the program running normally?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You don't. You first break your problem down into English steps (aka an algorithm), and then you start researching how to implement those English steps in code.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-08T16:15:39.440" LastActivityDate="2017-08-08T16:15:39.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3161" PostTypeId="2" ParentId="3150" CreationDate="2017-08-07T20:29:37.293" Score="3" Body="&lt;p&gt;The key is to just give whatever it is a whirl. Try, and see what happens. Quite a lot of code might be written, and most of it will break, but that's how you learn - you gain an experience of what methods work and what methods don't and fill out your figurative toolbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, figure out what the problem &lt;em&gt;is&lt;/em&gt;. What are your goals? Is it just to build a working shell? Or must it be done in a certain language? Often, in school, the problems are defined for you, but in the real world, they often aren't. Figure out your parameters and what exactly a solution needs to be like to be a solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is much more important than you'd think. Unfortunately true anecdote: I was writing a program to solve a simple problem. But then I wanted to enhance it. And I wanted to do this and that, and oh, maybe I'll add that - and the code got super unwieldy, with more and more bugs that I needed to work out - and finally I thought about it and realized that most all the code in there was unnecessary for my purposes. I wasted multiple weeks on that project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, start breaking down the problem. With your shell, maybe you think, okay, I need a GUI, and I need a way for user input to 'act' as commands, and those commands to produce some sort of output. Here you should be of course check your requirements to make sure the &quot;chunks&quot; of your program can handle everything that needs to be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, the exploratory google searches. I kid you not. When I first wanted to write a GUI, I googled &quot;python GUI&quot;. And started reading. I found out tkinter was a common package used. So I googled &quot;tkinter GUI&quot;. I learned what things that entailed, and I checked whether the method could do what I needed it to do. I explored some of the difficulties I might have. Make sure, for example, that the package you're using to create the GUI doesn't interfere with whatever things you might be using to get user input, or make it into commands for the computer, or show output, or whatever. Make sure it can handle all the things it needs to handle (check the requirements for this). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fourth, take the plunge and start writing code. Or solving the problem. Whatever. Follow your googlings and your goals and your requirements (those things are important) and your broken-down sections of the problem. When you run into errors, google. When you by chance hit on a better solution, rewrite. Debug and code and sketch out code and google and rethink your design and then tremble in awe at the finished product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Painful? Yes. Hard? Yes. Do you learn a lot? Oh, man, yes.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-08-07T20:29:37.293" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3163" PostTypeId="2" ParentId="3155" CreationDate="2017-08-08T03:14:37.520" Score="-1" Body="&lt;p&gt;IIRC, my shop and chemistry classes included mandatory safety briefings.  Many educational institutions have a code-of-conduct with which students are supposed to know and comply.  The same should happen and apply if any computing activity might affect student safety, or potentially violate the conduct code.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-08-08T03:14:37.520" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3164" PostTypeId="2" ParentId="3150" CreationDate="2017-08-08T10:41:12.920" Score="2" Body="&lt;h2&gt;Experience&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Gain experience with simpler programs: start with writing &lt;code&gt;ls&lt;/code&gt;, what happens when you try to write &lt;code&gt;cd&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Test-First / Test Driven Development&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Practice something like &lt;a href=&quot;http://www.extremeprogramming.org/rules/testfirst.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;test-first development&lt;/a&gt;, but at first with auto automation.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a smallest possible test (that will fail).&lt;/li&gt;&#xA;&lt;li&gt;Run all tests and see if the new test fails.&lt;/li&gt;&#xA;&lt;li&gt;Write the smallest possible code, to get test to pass.&lt;/li&gt;&#xA;&lt;li&gt;Run tests, to see that all tests pass.&lt;/li&gt;&#xA;&lt;li&gt;Refactor code.&lt;/li&gt;&#xA;&lt;li&gt;Repeat.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Mentor&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Get a mentor. They can guide you. For example tell you which routines you will need. &lt;code&gt;fork&lt;/code&gt; (create a new process), &lt;code&gt;exec&lt;/code&gt; replace process with external program from file-system, &lt;code&gt;pipe&lt;/code&gt; create inter-process pipe, &lt;code&gt;dup&lt;/code&gt; copy file descriptor, &lt;code&gt;close&lt;/code&gt; close file descriptor, &lt;code&gt;wait&lt;/code&gt; wait for a process. Plus other that you should have used before.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Real project&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Find a real project to work on. There are many &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free-Software&lt;/a&gt; / &lt;a href=&quot;https://opensource.org/osd-annotated&quot; rel=&quot;nofollow noreferrer&quot;&gt;Open-Source&lt;/a&gt; projects that you could work on. These will give real experience.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Read other peoples code&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Free-Software / Open-Source projects are a good source of code for you to read. You could read the source code for &lt;a href=&quot;https://www.gnu.org/software/bash/&quot; rel=&quot;nofollow noreferrer&quot;&gt;bash&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-08T10:41:12.920" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3165" PostTypeId="2" ParentId="2942" CreationDate="2017-08-08T15:02:21.990" Score="4" Body="&lt;p&gt;I see two reasons - unnecessary math classes and poor advertising.  As background, I am about to become a Computer Science High School teacher after a 27 year career at IBM where I was a programmer and project manager.  I was shocked to see the interest in computer science in high schools to be same as I saw in the late 70's when all we had was FORTRAN and Radio Shack TRS80's with floppy disks.   I was a computer science major at University of North Texas (UNT) from 1982 to 1987. When I started at UNT an &quot;average&quot; college student that worked hard could get a Computer Science degree.   At that time UNT was said to be one of the top 20 computer science schools in the country.   Then, if memory serves, around 1985/1986 the Association of Computing Machinery (ACM) got involved by setting a &quot;national standard&quot;.  As part of that standard the requirement for Math courses went up.  From what I have seen, more computer science programs are now in the colleges of engineering which also require more math.   If a student has to take that much math, they go ahead and become engineers.   The math requirements are completely unnecessary.  Calc 1 and 2? Linear Algebra? Physics?   Why?   How many are going to program the space shuttle?     They need communications skills and experience in programming.   They need configuration management.    No customer ever told me that my consultant needed more math.  The requirement for math drives the &quot;average student&quot; to business or the social sciences.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing I see is the advertising for computer science classes is geared for the &quot;genius&quot; type of student who could build a robot with a can opener and a old flashlight.  Students see the computer field as if is filled with geek geniuses doing impossible things.   Don't get me wrong, we need those students.  But not every project is a IBM Watson Research project (I worked on a project with those guys and they are geniuses).    Most computer science work is (wait for it) for a business where there is a business need and business solution.  I didn't need geniuses to solve those problems.  The geniuses hated those projects.  I needed folks that could communicate, code, and work in teams.  Silicon Valley needs the geniuses but how many of our graduates end up in Silicon Valley?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In net, the math requirement is driving students away (even in high school, let alone college). Even Business Computer Information Systems degrees out of the College of Business are requiring Calculus 1.    I am not saying lower the standard.  I am saying raise the standard in areas that matter to the student and their employer.   Let students choose between additional math or communications or additional programming classes or whatever they feel would suit their future the best.  A one size fits all degree standard from the ACM does not work.   &lt;/p&gt;&#xA;" OwnerUserId="2463" LastEditorUserId="2463" LastEditDate="2017-08-08T15:08:35.820" LastActivityDate="2017-08-08T15:08:35.820" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3166" PostTypeId="1" CreationDate="2017-08-08T16:16:04.807" Score="4" ViewCount="676" Body="&lt;p&gt;Has anyone used zyBooks in their classes? I've seen some good comments on the SIGCSE list about them. I would primarily use this in our CS I class (Java) with their lab feature as a way to provide students with review and practice problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, our CS I course only consists of 3 weekly 50-minute sessions, we have no assigned textbook (and much to my dismay, so separate lab sessions for students to practice the material - which in my opinion severely limits their uptake/comprehension of this material). I'm hoping this book/approach may be at least a partial remedy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.zybooks.com/catalog/programming-in-java/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.zybooks.com/catalog/programming-in-java/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks promising, but I would like some feedback from those who have used these (even if in other than Java courses)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be a bit more specific (as suggested, +1), I'm curious about the students' reaction to the text and the labs. I.e., did they like the text, found the explanations clear, the lab/exercises helpful for learning and reviewing the material. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also interested if the instructors found a greater understanding of the material by the students who used the labs.&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="27" LastEditDate="2017-08-08T17:02:02.960" LastActivityDate="2017-08-08T17:02:02.960" Title="Using zyBooks and labs" Tags="|java|labs|resource-information|textbook|" AnswerCount="0" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3167" PostTypeId="2" ParentId="3072" CreationDate="2017-08-08T18:18:38.887" Score="1" Body="&lt;p&gt;This is what happens when you put the cart before the horse.  The kids know syntax, but do not understand programming.  This is very common.  The kid see what they are trying to do as as commands in code when actually it is a series of tasks that need to be planned prior to sitting in front of a computer typing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the kids away from the keyboard.  Lay out the tasks.  Build a flow chart or pseudo code.  Once the program is understood in the task setting (groups of things to be done) then start to code.  The My Blocks will make sense to them.   Programming in front of the keyboard will always lead to the problem you are having.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastEditorUserId="150" LastEditDate="2017-08-08T19:04:13.700" LastActivityDate="2017-08-08T19:04:13.700" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3168" PostTypeId="2" ParentId="2897" CreationDate="2017-08-08T18:28:05.667" Score="2" Body="&lt;p&gt;Git is a horror show of a user interface built on a fairly clean, simple, purely functional data store. I liked Ben Lynn's &quot;git magic&quot; tutorial, but I'm really here to urge you to try the Magit user interface built in GNU Emacs. It offers these key advantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You get a screen that presents a visualization of the states of your working tree, your repository, and related remote repositories. This means you can see changes as they happen, which helps you learn and understand.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You get prompts for the keystrokes. This means you don't have to memorize the huge command set or trawl through the voluminous man pages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You work with keystrokes, just as you would at the command line. This means you don't have a mouse slowing you down.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You will quickly learn to do common operations fast.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The learning curve is still steep. But seeing things change as you chance them is huge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't already use Emacs, you won't realize all these advantages. But it might still be worth a try.&lt;/p&gt;&#xA;" OwnerUserId="1635" LastEditorUserId="204" LastEditDate="2017-09-14T07:45:10.483" LastActivityDate="2017-09-14T07:45:10.483" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3169" PostTypeId="2" ParentId="3150" CreationDate="2017-08-08T19:03:05.033" Score="0" Body="&lt;p&gt;If you don't know where to search, it may already be too late.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of learning at a university is not just completing the coursework, but in learning how to learn, learning where to look.  One gets there by having spent significant time reading/studying related areas/technologies/problems just outside the assigned projects.  The farther outside (but hopefully turning out to be still related), the better problems solver one might become.  The more one might know which paths possibly lead to wherever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you don't find the function or conclude the existing solution, but know how to keep hunting for ideas, that's how you end up being an inventor (patents, etc.) of perhaps a better way to solve the holistic problem.  You might find out that your friend's &quot;solution&quot; wasn't the best.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-08-08T19:14:16.757" LastActivityDate="2017-08-08T19:14:16.757" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3170" PostTypeId="1" CreationDate="2017-08-08T22:01:30.700" Score="6" ViewCount="304" Body="&lt;p&gt;I'm really looking for opinions from experts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been asked to teach a group of students “&lt;strong&gt;How To Program&lt;/strong&gt;”, these students are really new to programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want is to make them &lt;em&gt;like&lt;/em&gt; programming and &lt;em&gt;enjoy&lt;/em&gt; doing it (as I do), so which programming language should be used to teach them, in order to achieve that goal?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are about 17 to 22 years old, and there are 25 students in the group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;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.&lt;/p&gt;&#xA;" OwnerUserId="2478" LastEditorUserId="150" LastEditDate="2017-08-09T17:48:31.917" LastActivityDate="2017-08-09T17:48:31.917" Title="Which of the following programming languages will help me better to teach the basic concepts of CS and why?" Tags="|language-choice|" AnswerCount="3" CommentCount="11" ClosedDate="2017-08-08T23:32:43.920" ContentLicense="CC BY-SA 3.0" />
  <row Id="3171" PostTypeId="2" ParentId="3170" CreationDate="2017-08-08T22:30:23.380" Score="5" Body="&lt;p&gt;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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;with option (b), instead of you showing them how to do things, you can have the students show you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With either method, however, keep in mind that the most important thing is not what &lt;em&gt;you&lt;/em&gt; do or say, but what &lt;em&gt;the students&lt;/em&gt; do. Your lectures (if you even do that) are far less important than the exercises that they do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;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. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It isn't really about whether one language is better or worse. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-08T22:30:23.380" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3172" PostTypeId="2" ParentId="3170" CreationDate="2017-08-08T22:49:08.517" Score="6" Body="&lt;p&gt;Of the languages you mention knowing, I'd recommend Python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;You know it.&lt;/strong&gt;  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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;It's succinct.&lt;/strong&gt; 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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;It has a REPL environment.&lt;/strong&gt; The ability to do easy interactive debugging and testing of individual lines quickly will make it easier to try things out early on.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The annoying &quot;whitespace is syntactically significant&quot; thing&lt;/strong&gt;, 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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Simple GUI (and other) Libraries.&lt;/strong&gt; 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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Support for functional programming.&lt;/strong&gt; 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 &lt;em&gt;are&lt;/em&gt; 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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Free, portable and open source.&lt;/strong&gt; 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.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Disadvantages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;No real low-level facilities.&lt;/strong&gt; 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.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;No variable declarations.&lt;/strong&gt; 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 &lt;em&gt;really&lt;/em&gt; benefit from something like Perl's &lt;code&gt;use strict&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Poor scope resolution and visibility mechanisms.&lt;/strong&gt; 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 &lt;em&gt;write&lt;/em&gt; to a variable will have local scope but a &lt;em&gt;read&lt;/em&gt; from the same variable would have global scope.  Python 3 has improved this somewhat  due to the introduction of &lt;code&gt;nonlocal&lt;/code&gt; scope.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Python 2 vs Python 3&lt;/strong&gt;.  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.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would also strongly &lt;em&gt;anti&lt;/em&gt;-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 &lt;code&gt;new BadHabitFactory().createBadHabit().getInstance().getHabitSet()&lt;/code&gt; generator.&lt;/p&gt;&#xA;" OwnerUserId="827" LastActivityDate="2017-08-08T22:49:08.517" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3173" PostTypeId="2" ParentId="3170" CreationDate="2017-08-08T23:01:52.353" Score="4" Body="&lt;p&gt;My recommendation is Python, and I want to make some points from the &lt;strong&gt;student´s perspective&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Python is simple and understandable&lt;/strong&gt;. Since they do not have to learn everything at once, for example, assigning values to a name (variable) will be very easy.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;You need very few requirements to start&lt;/strong&gt; (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.&lt;/li&gt;&#xA;&lt;li&gt;You always get more motivated if you can &lt;strong&gt;build useful things&lt;/strong&gt; with the language that you are learning. For example, for the last part of the course, consider using &lt;code&gt;tkinter&lt;/code&gt; for creating simple forms and menus, with just a few lines of code.&lt;/li&gt;&#xA;&lt;li&gt;With Python, you can emphasize how important is to have a &lt;strong&gt;clean and readable code.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;There is a lot of &lt;strong&gt;documentation and help online&lt;/strong&gt;, and with a lot,&#xA;I mean a lot.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2480" LastEditorUserId="2480" LastEditDate="2017-08-09T15:27:17.983" LastActivityDate="2017-08-09T15:27:17.983" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3174" PostTypeId="2" ParentId="693" CreationDate="2017-08-09T07:53:56.573" Score="2" Body="&lt;p&gt;While I definitely recommend Snap!, for completeness sake you might take a look at:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scratch -- though w/o custom functions this may be limiting&lt;/li&gt;&#xA;&lt;li&gt;PencilCode -- a blocks+text environment around CoffeeScript&lt;/li&gt;&#xA;&lt;li&gt;GP (gpblocks.org) -- a desktop environment that looks similar to Scratch/Snap! But has dozens more blocks as well as a very interesting model for exploring classes and inheritance. &lt;/li&gt;&#xA;&lt;li&gt;AppInventor -- using blocks to build Android apps.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For me, Snap! strikes a good middle ground between freedom and complexity. &lt;/p&gt;&#xA;" OwnerUserId="2484" LastActivityDate="2017-08-09T07:53:56.573" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3175" PostTypeId="1" AcceptedAnswerId="3186" CreationDate="2017-08-09T08:01:28.150" Score="38" ViewCount="13502" Body="&lt;p&gt;I've been trying to learn the differences between Functional Programming and OOP, but I can't seem to find a comparison of the two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Google search did not yield any chart or table showing such a comparison.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the unclear Google search, however, I have come up with this:&lt;br&gt;&#xA;OOP keeps actions and data encapsulated in objects, Functional Programming separates the two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that doesn't actually give a useful comparison of the usecases for each one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my question is where might I find a thorough comparison between the two, which can explain which should be used for some kinds of tasks\projects? I'm looking for some explanation\comparison of various aspects of these paradigms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The types of projects or tasks I am referring to are varied, but can be classified into: Computer Management (similar to what userscripts allow in browsers) and Utilities (units conversion, custom shell). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(off site resources are considered an answer, as well as answers giving such a comparison without an off site resource)&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-12-23T11:26:54.387" LastActivityDate="2022-10-03T19:51:28.660" Title="Learning fundamental differences between functional programming and Object Oriented Programming" Tags="|self-learning|object-oriented-paradigm|functional-programming|" AnswerCount="11" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3177" PostTypeId="2" ParentId="3069" CreationDate="2017-08-09T08:44:05.143" Score="2" Body="&lt;p&gt;I'm not sure how engaging these would be, but as a source of exercises and practice content, you might look towards IT professional certifications. There are things like A+ (general IT), Networking+, CCNA (Cisco), or MCSA (Microsoft sys admin), among many many exams that are quite popular and have a variety of study resources online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.pcworld.com/article/209227/it_certifications_that_matter_for_helpdesk_tech_support_pros.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;This PCWorld article&lt;/a&gt; has some decent overviews of the tests. I'm dubious of an article promoting certifications based on studies by a group that sells certifications, but regardless, hopefully it has pointers to resources you might be able to pull from.&lt;/p&gt;&#xA;" OwnerUserId="2484" LastActivityDate="2017-08-09T08:44:05.143" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3178" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T09:09:42.230" Score="7" Body="&lt;p&gt;This is a very broad question, so I'm going to point you to a couple places and then give a really short explanation. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Wikipedia on paradigms: &lt;a href=&quot;https://en.wikipedia.org/wiki/Programming_paradigm&quot; rel=&quot;noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Programming_paradigm&lt;/a&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I'm linking to the main article, but linked at the bottom you should definitely check out the &quot;Comparison&quot; article as well as the specific sections and links to functional and OOP stuff.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;this SO post is pretty decent, &lt;a href=&quot;https://stackoverflow.com/questions/552336/oop-vs-functional-programming-vs-procedural&quot;&gt;https://stackoverflow.com/questions/552336/oop-vs-functional-programming-vs-procedural&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think it's important to have the right mindset about paradigms: At the end of the day, they're a tool to help you organize a thought process around code. They all let you accomplish the same tasks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, nearly every language or environment today is 'multi-paradigm'. Even Java (which is famously OOP because everything is required to be in a class) is written in a style that blends imperative and procedural paradigms with OOP. More recently, Java includes more and more elements that are in the functional style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When in comes to functional vs OOP, there's one big thing that comes to mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being &quot;stateless&quot; or having &quot;state&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;State means that you have some stored properties or information, like the name of a sprite, or a display where you output information.&#xA;In a functional world, especially one that tries to be &quot;pure&quot;, you're mostly going to be dealing with composing (or chaining) functions together. The goal is to have a function, say &lt;code&gt;compute_something(an_object)&lt;/code&gt; that needs only the information passed into it (arguments) and nothing else - i.e. It has no &quot;state&quot;. It will then return a new value, and not modify or mutate it's input. &#xA;In the OOP world, it's common to think of an object having state, it's information about itself and how it interacts with the world. You might do something like &lt;code&gt;object.compute_something()&lt;/code&gt;, where &lt;code&gt;compute_something&lt;/code&gt; is a property (a function) tied to that object, and by calling it, you modify some property of that object.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One common example of this is sorting a list. In a functional paradigm, you'd probably do &lt;code&gt;sorted_list = sort(some_list)&lt;/code&gt;. While in an OOP paradigm, you'd likely do &lt;code&gt;some_list.sort()&lt;/code&gt; and the next time you use &lt;code&gt;some_list&lt;/code&gt; it will be sorted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Form this there are sometimes other differences, like how difference languages treat &quot;types&quot; of data, but things can get muddied quickly. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To answer your original question about projects: It really is hard to say. You could conceptualize a Unit conversion app as having a bunch of objects (like one for each type of measurement system), or since it's &quot;mathy-&quot; you could just as easily conceptualize as a simple function with a lookup table for various conversion rates. In reality the paradigm will depend on the environment that you're working with as much as it will depend on the theoretic structure of code.&lt;/p&gt;&#xA;" OwnerUserId="2484" LastActivityDate="2017-08-09T09:09:42.230" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3179" PostTypeId="2" ParentId="3150" CreationDate="2017-08-09T10:34:07.450" Score="1" Body="&lt;p&gt;As a developper you rarely reinvent the wheel. It's more like a craftsman's job, doing well known things in a slightly different way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you're a carpenter and want to craft a table. You can think of the abstract notion of a table and pore over the infinite number of possible ways to build one, or you can simply look at existing ones and see how they were made.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can wonder what kind of pegs or screws are available, or you can look at a few tables and see how their pieces are held together. Maybe you'll realize glue was the best solution in some cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion programming is very similar to writing. If you want to tell a good story, you can read a few good books and see how they are made, their style, their purpose. That sure will help you write your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of starting with a blank page or raw planks, you could try to tinker with an existing story or table and see how you can change or improve it. First imitating the designs that suit you best, and eventually finding your own style.&lt;/p&gt;&#xA;" OwnerUserId="2486" LastEditorUserId="2486" LastEditDate="2017-08-09T10:43:36.217" LastActivityDate="2017-08-09T10:43:36.217" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3180" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T11:21:30.607" Score="3" Body="&lt;p&gt;Functional programming is all the rage nowadays. It relies on the illusion that stateless objects and immutable data structures will keep the bugs out. Which is of course nothing but a self-fulfilled prophecy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Statelessness and immutability are the current Holy Grail and Golden Fleece, mostly because they allows to write junk code faster (a function will always return the same result regardless of the current state of the system, so once it's debugged we're pretty much safe, right?) and we don't know any better way of using these new shining CPUs (functional programming requires a lot more resources than plain old procedural / object oriented approaches - just look at the exponential growth of C++ compile time!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functional programming is easier and faster to write. It encourages to concentrate on generic and simple building blocks and follow a bottom-up path.&lt;br&gt;&#xA;On the other hand, it tends to become verbose and unmaintenable fast, what with the layers upon layers of progressively complexified functions you have to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With OOP you need at least some top-down approach. A general sketch of your final architecture before you can even start coding. After a couple decades of &quot;extreme&quot; and &quot;agile&quot; programming, the dreams of an easy way out of this initial planning are slowly starting to recede (after having cost an unknown but probably sizeable fraction of the world's GDP in failed projects and botched software). Now, with the shiny GAFAs as role models, functional programming is taking over as the new magical paradigm.&lt;/p&gt;&#xA;" OwnerUserId="2486" LastEditorUserId="2486" LastEditDate="2017-08-09T11:48:16.393" LastActivityDate="2017-08-09T11:48:16.393" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3181" PostTypeId="2" ParentId="3092" CreationDate="2017-08-09T11:36:29.843" Score="2" Body="&lt;p&gt;I like the image of a flute player for illustrating parallel processing of several simultaneous flows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;reading the score (&quot;buffering&quot; enough notes before playing them)&lt;/li&gt;&#xA;&lt;li&gt;moving fingers (planning a few notes ahead while following a set rhythm)&lt;/li&gt;&#xA;&lt;li&gt;managing breath   (refilling the lungs regularly while not interfering with the music)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They all occur in parallel, each with its own set of constraints, and are all interdependent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find the notions of latency (reading enough notes and breathing in enough air to keep playing), pipelining (finger positioning requires score reading) and throughput (following the tempo) quite intuitive.&lt;/p&gt;&#xA;" OwnerUserId="2486" LastActivityDate="2017-08-09T11:36:29.843" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3182" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T11:56:25.477" Score="8" Body="&lt;p&gt;I have not come across a big comparison table like you are seeking. My short reply would be:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use Functional for things that are math-y or language-y. Use it when you are investigating computability or other more academic aspect or projects.  &lt;/li&gt;&#xA;&lt;li&gt;Use Procedural when you want less experienced people (such as students) to be able to understand your code in a commonsense way.  &lt;/li&gt;&#xA;&lt;li&gt;Use OOP for large projects which require storing data and changing it during interactions with users.  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;More than this, I cannot say.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-09T17:37:31.930" LastActivityDate="2017-08-09T17:37:31.930" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3183" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T12:50:05.730" Score="16" Body="&lt;p&gt;Here I will discuss Functional Programming (FP) and Object Oriented Programming (OOP) in a fairly pure form. Actual languages, however often make compromises to allow older forms as well as multi-paradigm programming.&lt;/p&gt;&#xA;&lt;p&gt;Both FP and OOP rely in the notion of program &amp;quot;State&amp;quot; but do so in different ways. In fact there are really two different things that go by the term &amp;quot;state&amp;quot; and it is useful to distinguish between them. The version most people focus on when they say &amp;quot;state&amp;quot; is the current set of values of variables in a program, whether held in objects or not. This depends on having modifiable &amp;quot;variables&amp;quot; in the program.&lt;/p&gt;&#xA;&lt;p&gt;Using Pascal notation, x := 2 gives an integer variable a value 2. You set a state. Later, within the same scope, you are allowed to say x := 3 which &amp;quot;changes the state&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The way most people visualize the above is that the memory of some real or abstract machine has been altered in a specific way. I will refer to this notion of &amp;quot;state&amp;quot; as &lt;em&gt;Explicit State&lt;/em&gt;. The Explicit State is the current collection of values of variables.&lt;/p&gt;&#xA;&lt;p&gt;However, there is a different, independent view of &amp;quot;state&amp;quot; that most programmers are aware of, but don't always focus on in the same way. In this view, the &amp;quot;state of a computation&amp;quot; is represented by the program counter, which represents the current focus of execution in a program. For example now using Java-like syntax:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;if(x == 3){&#xA;    // a&#xA;    ....&#xA;} else {&#xA;    //b&#xA;    ....&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;At some point in the execution the program counter (PC) may be at point (a) or at point (b), but not both simultaneously, of course. If the PC is at point (a) then the &amp;quot;state of the computation&amp;quot; includes the fact that x is 3. If it is at point (b) then the state is that x is not 3. In this view the state of the computation changes as the program executes (and is dynamic). In the former view the program state is often thought of as static, though that isn't quite correct (since things change). I will refer to this second notion of &amp;quot;state&amp;quot; as &lt;em&gt;Implicit State&lt;/em&gt;. It is the current location of the PC and all that implies about what has gone before, no matter how implemented.&lt;/p&gt;&#xA;&lt;p&gt;Now to the question: What is the fundamental difference between (pure)FP and (pure)OOP?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Functional Programming&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Pure FP relies on implicit state and deemphasizes (or eliminates) explicit state. In Scheme, for example, a &lt;em&gt;let&lt;/em&gt; gives a value to an identifier that is valid throughout a scope. It is &lt;em&gt;called&lt;/em&gt; a variable in the documentation, but it is really a name given to a constant. Once given a value the name doesn't refer to any other value in that scope, but might have a different value in a different (or larger, or smaller) scope.&lt;/p&gt;&#xA;&lt;p&gt;One envisions a computation in a pure FP as an expression that has a value. In order to calculate that expression other expressions are evaluated (recursively, so to speak) until some expressions evaluate to themselves (5, and &amp;quot;foo&amp;quot;). The state of the computation is purely implicit, the location of the PC within the chain of recursion. When the chain ends the original expression can yield a value.&lt;/p&gt;&#xA;&lt;p&gt;There are no &amp;quot;variables&amp;quot; in the C or Pascal sense. Named values (i.e. constants) may be assigned to memory locations or stored on the stack, or in the cloud, or ... It isn't necessarily specified. In a sense, the state is a Stack.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object-Oriented Programming&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The first OOP was actually Simula (1967), developed in Scandinavia to do simulation programming. Simula was the main inspiration for C++. The first (and maybe only) &lt;em&gt;pure&lt;/em&gt; OOP was/is Smalltalk. It became the inspiration for most other modern OOPs; Apple Object Pascal, Java, Python, .... However, most other OOP languages than Smalltalk compromise in a number of ways. To discuss pure OOP more deeply requires an excursion. There are two ways to think about an object in an OOP; its creation and its use.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object Usage in Pure OOP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In pure OOP an object exists (somehow) and is best viewed as a &amp;quot;bundle of behavior&amp;quot;. It responds to a set of messages that are valid for its type. The messages may contain parameters. Whether or not it has anything like &amp;quot;state&amp;quot; is immaterial. It &amp;quot;behaves&amp;quot; when sent a message. As part of carrying out its task (as defined by the message and parameters) it may, itself, send messages to other objects. Some messages are functional in nature and return values (objects or primitive values). Some are not. You need non-functional methods to, for example, drive printers and other external devices.&lt;/p&gt;&#xA;&lt;p&gt;In this view it is not fruitful to think of objects as encapsulating &amp;quot;state&amp;quot;. The state is not material. Only the behavior matters. The implementation of an object &lt;em&gt;might&lt;/em&gt; rely on saved state, or it &lt;em&gt;might&lt;/em&gt; rely on delegating things to other objects through a chain of messages (again, like recursion to some base case).&lt;/p&gt;&#xA;&lt;p&gt;Objects &lt;em&gt;when used&lt;/em&gt; are bundles of behavior, nothing more.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object Creation in Pure OOP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;OOP languages, however also provide a mechanism for the creation of objects. There are two main mechanisms for this (Classes and Prototypes), which don't affect the discussion here. I will assume a class-based languages since most (non javascript) programmers are most familiar with classes. In creating a class definition the job of the programmer is to define the behavior of its objects. In Java, that means the visible methods (visibility is a bit complex for this discussion, think non-private for a simplification).&lt;/p&gt;&#xA;&lt;p&gt;An object of the new class must be able to respond to a given message (with parameters, perhaps). That can be made to happen in different ways. For example, the object might defer the action to another object. But it might also define a (classic) variable, and give it a value. Having given that variable a value, it is free to retrieve it later and (perhaps) modify it. But don't be naive about things. Just because the name of a method is &amp;quot;setDisplay&amp;quot; doesn't necessarily mean that there is some variable (anywhere) that will have its value changed. It is a concept, nothing more. The object will &lt;em&gt;somehow&lt;/em&gt; (up to the programmer) retain the value given so that the &amp;quot;state of the computation&amp;quot; can move forward.&lt;/p&gt;&#xA;&lt;p&gt;So, in this &amp;quot;pure&amp;quot;OOP view, the job of creation of objects is the job of defining the behaviors to which the object can respond. You can think of an object (if you like) as a bundle of state + behavior, but that should only work at the definitional stage, not the usage stage.&lt;/p&gt;&#xA;&lt;p&gt;Note that in this view, a computation is seen as a collection of independent objects that communicate via message passing. The objects may be normally active (actor model) or not, with the latter being more common. An object is, in the non-actor case, only active when it has been sent a message. It is easy to visualize that a PC comes along with any message allowing the object to execute the method. If the object sends a message itself, the PC is passed along as well, letting the receiver of the message act.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why this OOP view is important.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;One of the problems of learning to program is the problem of how much information needs to be kept in mind as you proceed. If it was necessary to retain every detail of the program, it would be an impossible task. Therefore we use various abstraction facilities (mental facilities) to reduce the task. I can't remember the state of 4gb of values. I can't even really remember the implicit state of an if-statement if nested more than about 4 levels deep. Therefore I don't write such programs and instead create simple objects with simple behaviors. I also create objects that have any explicit state private - no exceptions. I design objects so that I &lt;em&gt;can&lt;/em&gt; effectively think of them as &lt;em&gt;nothing but&lt;/em&gt; bundles of behavior, though Java certainly has facilities that let me do otherwise. However, if I break my rules, my program becomes harder to understand, use, and modify.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A pure OOP program is a set of simple objects with simple methods. The complexity of the program is in the interactions of objects, not implementations of the objects.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Yes, I write a lot of classes. But each is simple to conceptualize and simple to build. Each object is a bundle of behavior, nothing more.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="6346" LastEditDate="2022-10-03T19:51:28.660" LastActivityDate="2022-10-03T19:51:28.660" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="3184" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T13:22:38.367" Score="9" Body="&lt;p&gt;FP and OOP are both tools in the box, none of them is better or worse. The same way you would not ask whether to use a hammer or a screwdriver to put in a nail, you should not ask whether to use FP or OOP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question should be: what is the best way to solve your problem at hand?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OOP excels when you need to describe abstract objects with code (hence the name). Describing the abilities and features of a car is something FP is not made for, so choosing FP for this situation would be painfully complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vice versa FP excels when algorithms can be written as mathematical functions in the mindset of &lt;code&gt;f(x) -&amp;gt; y&lt;/code&gt; (more complex functions are also very much possible). Using OOP to describe the result of &lt;code&gt;square(x)&lt;/code&gt; is possible but pointlessly complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In modern programming FP is usually used when volumes of data need to be transformed. If you need to map from Z to Y by using the transformation function f, then you can very simply write that in code using FP, i.E. in Java like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// equivalent of Yn = f(Zn)&#xA;List&amp;lt;Y&amp;gt; myYs = myZs.stream()      // for each z in Z&#xA;  .map(MyClass::f)                // transform y = f(z)&#xA;  .collect(Collectors.toList());  // and store y in a list&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doing the same in OOP would look something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class Z {&#xA;  private int myValue;&#xA;&#xA;  public int getValue() {&#xA;    return this.myValue;&#xA;  }&#xA;}&#xA;&#xA;class Y extends Z {&#xA;  static Y convertFromZ(final Z z) {&#xA;    // ...&#xA;  }&#xA;&#xA;  @Override&#xA;  public int getValue() {&#xA;    return convertFromZ(super.getValue());&#xA;  }&#xA;}&#xA;&#xA;List&amp;lt;Y&amp;gt; myYs = (List&amp;lt;Y&amp;gt;) myZs;  // &amp;lt;-- really dirty hack&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This makes it hopefully obvious why such a comparison chart does not exist: because those two are entirely different concepts.&lt;/p&gt;&#xA;" OwnerUserId="2491" LastActivityDate="2017-08-09T13:22:38.367" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3185" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T14:31:50.587" Score="9" Body="&lt;p&gt;I wouldn’t expect to find a comparison table because OOP and FP are not mutually exclusive concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OOP is about encapsulating data in objects behind interfaces and using inheritance to build objects in re-usable pieces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;FP, however, is about not changing states or having side-effects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can have an OOP program with immutable objects. (You can &lt;em&gt;clone&lt;/em&gt; an object, but you can’t change the state of an existing object.) You can have an OOP program where the methods have no side-effects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can have a FP program that encapsulates its data in objects behind interfaces and uses inheritance.&lt;/p&gt;&#xA;" OwnerUserId="2494" LastActivityDate="2017-08-09T14:31:50.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3186" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T14:31:58.217" Score="59" Body="&lt;p&gt;There are beautiful answers to this question already here, and I will not try to reiterate any of the ground that has already been covered.  However, something important that I have not seen here so far is that comparing OOP to FP is not actually terribly meaningful.  It's a bit like comparing &lt;em&gt;glass&lt;/em&gt; (the material) to &lt;em&gt;tables&lt;/em&gt; (the furniture).  They each have properties that can be explored, but even if discussions of these properties can help you learn about them, the comparison itself doesn't actually tell you much about either.  Glass tables exist, and have the properties of both.  Similarly, Scala, Clojure, and Swift are languages that are &lt;em&gt;both&lt;/em&gt; functional and OO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more meaningful comparison for functional programming is imperative programming.  The most popular languages in the world right now are all imperative&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;.  Imperative languages focus on mutable values and states, and are historically based on &lt;strong&gt;Turing Machines&lt;/strong&gt;.  Functional languages are all about function calls and immutable constants, and are historically based on Church's &lt;strong&gt;$\lambda$-Calculus&lt;/strong&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two mathematical systems were developed around the same time in order to solve the same question: &lt;em&gt;what is fundamentally computable?&lt;/em&gt;  The &lt;strong&gt;Church-Turing Thesis&lt;/strong&gt;, which was published before electronic computers existed, proved that the two systems were equally powerful, and further hypothesized that they could both compute any computable function, and that any &lt;em&gt;sufficiently complex system&lt;/em&gt; could embody exactly this same computability power.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more meaningful comparison for Object-Oriented programming would be... well, &lt;em&gt;nothing&lt;/em&gt;.  The Object-Oriented philosophy, which is about grouping data with functions that govern that data, can be applied to any programming paradigm.  Object-Oriented programming is all about the &lt;em&gt;scope and membership&lt;/em&gt; of functions and data.  It doesn't matter if the data is mutable, if the order of operations is defined, how data is stored, whether functions are mutable... if we are creating instances of data that are bundled with their own functions, the we have the kernel of object-oriented programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - Only if you discount Excel, which is actually a light functional programming language, and is almost certainly used by &lt;em&gt;many more people&lt;/em&gt; than any other programming language on earth.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="150" LastEditDate="2017-08-12T14:42:21.083" LastActivityDate="2017-08-12T14:42:21.083" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3187" PostTypeId="2" ParentId="3092" CreationDate="2017-08-09T15:19:47.660" Score="1" Body="&lt;p&gt;I think that, in order to not overcomplicate the issue, a good clarifying example would be satellite TV.  STV broadcasting can transmit quite a lot of information at once, which means it has high throughput, and you see that in the fact that STV services like Dish offer a &lt;em&gt;lot&lt;/em&gt; of channels.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, beaming the information to a satellite in orbit and back creates a certain level of interference (which must be corrected) and travel delay, which means that this technology suffers from high latency.  This leads to the notorious jumpiness and screen artifacts (delay in correcting data) that STV often suffers from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a pure example, in which the throughput does not itself create a limit that increases latency, or vice versa, so the two can be seen completely separately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a case where the two interact, then the movement of cars in high traffic would be a suitable example instead.  Its interesting to note that, when road usage is saturated, traffic moves more slowly before a merge and more quickly after it.  That is simply because the throughput before and after is the same, but before the merge, that throughput is divided by more lanes, so each individual lane gets less movement per second - ie, each lane has a higher latency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, in clear traffic, latency (speed limit) can limit the number of cars that pass a given line per second, so latency can also limit throughput.&lt;/p&gt;&#xA;" OwnerUserId="1015" LastActivityDate="2017-08-09T15:19:47.660" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3188" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T15:20:43.993" Score="5" Body="&lt;p&gt;As I read your post, I see your question as simply this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;where might I find a thorough comparison between the two [OOP and FP], which can&#xA;  explain which should be used for some kinds of tasks\projects?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The best explanation I have seen is in the context of the Programming Languages MOOCs offered through Coursera modeled after &lt;a href=&quot;http://courses.cs.washington.edu/courses/cse341/17sp/&quot; rel=&quot;noreferrer&quot;&gt;this course at UW&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The class works through, in order, a statically-typed functional language (ML), a dynamically-typed functional language (Racket), and a dynamically-typed object-oriented language (Ruby). Since this is an upper-division course and students presumably are somewhat familiar with it, Java is thrown in for comparisons when relevant as a statically-typed objected-oriented language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you want to find a thorough comparison, build projects with each approach, spending time to learn the relevant nuances of FP and OOP along the way.&lt;/strong&gt; There is no chart or tutorial that can substitute for this work; it simply takes time and practice. Based on my experience, the work of this course will not disappoint. There are short mini-lecture videos, excellent reading notes, and challenging homework assignments all available for free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the course, the professor does an excellent job breaking down OOP v. functional decomposition. By the time you reach the end, you will have a clear picture as to how these approaches differ, where their relative strengths and weaknesses like, and when/how to apply each paradigm to a particular problem.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-08-09T15:20:43.993" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3189" PostTypeId="1" CreationDate="2017-08-09T16:55:06.377" Score="7" ViewCount="131" Body="&lt;p&gt;So, take a Java statement like this one, given some int &lt;code&gt;n&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ((n+&quot;&quot;).length() == (((n+1)+&quot;&quot;).length())) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or perhaps this one, given some double, &lt;code&gt;temperature&lt;/code&gt;, and some method that returns a boolean, &lt;code&gt;unHatched()&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (temperature &amp;lt; 100 &amp;amp;&amp;amp; unHatched())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In both of these cases, multiple auto-casts are made during the evaluation of the statement, and in both cases, the final determination is a boolean that is passed into some sort of control structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my work with gifted students, the most that I have ever had to do to help someone understand statements like these is to do a simple trace.  We write the statement down, mark each item by its type, and then cross off areas of the statement (and write down the new types) as we walk through the evaluation.  This method has worked pretty consistently with my students at my day-job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, lately I have begun tutoring an adult student who is having a &lt;em&gt;great deal of trouble&lt;/em&gt;, and I have been struggling to break apart statements like the above examples in ways that he can parse and keep straight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He is at the right point, curricularly-speaking, to be examining them, but I am really struggling to help him trace and understand such statements.  (Ironically enough, because he can guess and modify a statement repeatedly, he can actually &lt;em&gt;write&lt;/em&gt; statements like these with a fair amount of success, though when he is finished, he no longer fully understands them.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For various reasons, learning a small concept usually takes him 3-5 weeks.  This timescale is fine, it is simply the speed at which he operates.  However, this adds a constraint for me: approaches that I take to the material must lend themselves to a fair amount of repetition with only very minor variations, or they won't be effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am really having trouble finding a good approach here.  How can I give him the tools to break down statements with complex data type transformations?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-09T18:37:29.333" LastActivityDate="2017-08-16T10:23:42.217" Title="Breaking down the operations when auto-casting gets complex" Tags="|data-types|casting|" AnswerCount="5" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3190" PostTypeId="2" ParentId="3189" CreationDate="2017-08-09T17:05:59.967" Score="4" Body="&lt;p&gt;I suspect that &lt;em&gt;you&lt;/em&gt; handle such situations by informally building the parse tree of the expression in your mind. Maybe not all at once, but a bit at a time, perhaps. I'm not a cognition expert, of course, but it might help him if you teach him to do it explicitly on paper. He needs a table of operator precedence, of course and needs to be able to deal with parentheses, but otherwise it is just a mechanical process. Put the lowest precedence operator at the root of a tree and then work on the operands. The interior nodes are operators and the leaves are operands. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can't promise it will work, but it would be my next step. With time, he may learn to rely less on the paper. Or, he might learn how to build a tool to do it automatically. That might be nice to have. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-09T17:05:59.967" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3191" PostTypeId="2" ParentId="3189" CreationDate="2017-08-09T17:06:15.023" Score="4" Body="&lt;p&gt;I'd maybe suggest an exercise of splitting these kinds of statements up into multiple variables and lines of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So take this line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ((n+&quot;&quot;).length() == (((n+1)+&quot;&quot;).length())) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And come up with this code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String nString = n + &quot;&quot;;&#xA;int nLength = stringN.length();&#xA;int nPlusOne = n+1;&#xA;String nPlusOneString = nPlusOne + &quot;&quot;;&#xA;int nPlusOneLength = nPlusOneString.length();&#xA;boolean nLengthEqualsNPlusOneLength = (nLength == nPlusOneLength);&#xA;if(nLengthEqualsNPlusOneLength){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is what you're asking the student to do in their head, so maybe the intermediate step of actually writing out the breakdown like this would help. Make sure the student uses descriptive variable names so they can more easily keep track of what each step is doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do this process of breaking a line down into smaller sub-lines enough, eventually you'll become more &quot;natural&quot; at it, and you won't have to explicitly break it down anymore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth noting that if I saw a line like the original in &quot;the real world&quot; I would ask the author of the code to split it up into multiple pieces, or at least add a comment or isolate it into a self-descriptive function.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-09T17:06:15.023" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3192" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T17:44:09.417" Score="5" Body="&lt;p&gt;It is difficult to put this into a form that inexperienced undergraduate students will appreciate, but well...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;It is commonly the case with technologies that you can get the best insight about how they work by watching them fail&quot; - Neal Stephenson, &lt;em&gt;In the Beginning was&#xA;  the Command Line&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Since OOP is the 500lb gorilla of the programming world and FP the relative upstart this comparison might be a bit skewed for want of data points. However two prominent failure cases come to mind.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1. Data Interchange&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The Sun God Microsystems bestowed upon the Paladin Knights of Programmingdom his Commandments etched into tablets of purest silicon for posterity and from whence His disciples founded the Church of Java. Any who were so foolish as to claim that these commandments from on high were a Pact with the Devils of Performance and Popular Sintax bastardizing the pristine purity of Smalltalk were denounced as heretics. And the proselytizers spread their faith unto the remotest corners of the kingdom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yeah, people started using OOP for everything. But there was (at least) one arena where this failed entirely: IPC. Exchanging data across the boundary of threads/machines/networks/languages was an issue. Exactly how much of an issue can be inferred from enumerating some of the (many) attempts at solving it in an OO fashion that litter the scrapheap of history: CORBA, RMI, WSDL, DCOM... and also from the extreme proliferation of using plain ol data generally in the form of XML (as opposed to using XML-RPC).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now people still do this, but generally we use transport mechanisms that are &lt;em&gt;stateless&lt;/em&gt; (like HTTP) and over them we send language-agnostic data (sexprs, XML, JSON). So in structuring intercommunicating &lt;em&gt;systems&lt;/em&gt; FP won because dealing with state is hard enough on its own but becomes an order of magnitude harder when you add threads, then another order of magnitude (or two) harder when you add inter-machine communcations and another order of magnitude (or more!) harder still when you have many-to-many communications with needs for eventual consistency or accurate chronological ordering of events. In fact, just thinking about it enough to write that last bit raised my blood pressure to dangerous levels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which is not to say that people don't use OOP in that space at all anymore, but it's not super common and the search to find the Great-OOP-Protocol-that-Makes-it-EZ is a pursuit more easily compared to &lt;a href=&quot;https://en.wikipedia.org/wiki/Cold_fusion&quot; rel=&quot;nofollow noreferrer&quot;&gt;cold fusion&lt;/a&gt; or the &lt;a href=&quot;https://en.wikipedia.org/wiki/El_Dorado&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lost City of El Dorado&lt;/a&gt; (no VC funding for you!) than trying to create the next megahit social networking app (\$\$purr\$\$).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2. Games Programming.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Programming games in FP is &lt;a href=&quot;http://prog21.dadgum.com/23.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;certainly possible&lt;/a&gt;, but not necessarily recommended. And this goes beyond lack of libraries and middleware or the need to squeeze as much out of the hardware as possible: when my level 6 Half-Elf Berserker bashes an orc with her Hammer of Doom I expect that orc to be the same orc minus 3D6 hp not a new orc with a different hp value than the old one. The problem is that games deal generally with two different entities: &lt;em&gt;things&lt;/em&gt; and &lt;em&gt;rules&lt;/em&gt; about the interaction of those things &lt;em&gt;as they change over time&lt;/em&gt;. No one wants to go all War Games and watch a supercomputer &lt;a href=&quot;https://www.youtube.com/watch?v=F7qOV8xonfY&quot; rel=&quot;nofollow noreferrer&quot;&gt;play itself at tic-tac-toe&lt;/a&gt; until it learns the futility of nuclear war. OOP &lt;a href=&quot;https://ericlippert.com/2015/04/27/wizards-and-warriors-part-one/&quot; rel=&quot;nofollow noreferrer&quot;&gt;sucks at modelling rules&lt;/a&gt; (which FP excels at), but OOP is &lt;em&gt;great&lt;/em&gt; for modelling how reified things &lt;em&gt;change over time&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, as I said at the beginning I'm not exactly sure how I'd go about making all of this accessible to CS undergrads (based on my memory of what I and my peers were like when I was one). But I think looking at two high profile failures is a good place to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line, as the other answers have said they are extremely different mental models. Anytime you try to use one that doesn't easily map to the problem domain you're going to have issues. So illustrating some of those domains with how one or the other is a more natural fit (and my examples above of shoving square pegs into round holes) and why might be the best way to approach the topic.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastEditorUserId="1790" LastEditDate="2017-08-10T13:45:39.560" LastActivityDate="2017-08-10T13:45:39.560" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3193" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T19:21:05.070" Score="9" Body="&lt;p&gt;There are already several good answers, but I'd like to add the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functional code is (at least in theory) more easily parallellized.  This is important because we've about hit the limit of how fast we can run integrated circuits.  (I know that's an oversimplification; I'm trying to keep it simple for the OP's audience's sake.)&lt;br&gt;&#xA;So, while you can't make the individual cores on your CPU run much faster, you &lt;em&gt;can&lt;/em&gt; add cores to the CPU.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now let's think about a single large program.  Multiple cores will only speed up such a progrm if it can be broken up into independent &quot;chunks&quot; that can be parcelled out to individual cores.  And let's be clear about what &quot;independent&quot; means: no one chunk should have side effects that can affect any other chunk (and probably chunks should not depend on the output of other chunks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is an area where functional programming excels.  By contrast, trying to ensure object consistency across multiple threads or processes can be a nightmare.  Which is one reason there's a great deal of current interest in FP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside is ... as Jared points out, in a game, in the FP paradigm, you'd likely maintain statelessness by having the &quot;attack&quot; routine return a whole new copy of the orc (or whatever enemy) under attack.  But:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Reconstructing the entire orc is probably a non-trivial operation -- it's almost certainly going to be more costly than adjusting the orc's hit points (changing state on an existing object).&lt;/li&gt;&#xA;&lt;li&gt;And that's a fairly simple case.  It's likely that changes in the object's state will cause other changes -- for example, the orc might get an attack bonus if their hit points drop below a certain level.  In FP, this would probably result in constructing and returning yet another orc object.  And so on.&lt;/li&gt;&#xA;&lt;li&gt;Constructing new enemy and/or player objects is going to increase the overhead of memory management. All those discarded objects are probably going to need to be garbage collected; and with all that construction / destruction, you're probably going to get fragmentation in the memory store or heap.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In general, composability is a good thing.&lt;br&gt;&#xA;But it's one thing to talk about &lt;code&gt;f(g(h(x)))&lt;/code&gt; when &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;h&lt;/code&gt; return numeric values.  When each of those functions in the composition chain can return a large and/or complex object ... this may result in unacceptable performance, even for a single-player game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now think about a financial application, where reconstructing a customer might involve re-reading several months' (or years') worth of transaction history.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As other answers have said, FP is very good at math-y problems.  If you need to manage mutable state, imperative OOP might be a better choice.  Hopefully this makes the difference a bit more concrete.&lt;/p&gt;&#xA;" OwnerUserId="2501" LastActivityDate="2017-08-09T19:21:05.070" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3194" PostTypeId="2" ParentId="3189" CreationDate="2017-08-09T21:34:55.887" Score="1" Body="&lt;p&gt;You say “when he is finished, he no longer fully understands them.”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a good practice to write self documenting code. This is done not with comments, but with well named entities (methods, classes, objects). This helps you to see what the code does (I do not mean how it does it, but in turn it will help you understand how it works).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore teach him how to do self documenting code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example&#xA;&lt;code&gt;if ((n+&quot;&quot;).length() == (((n+1)+&quot;&quot;).length())) {&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;private static boolean digitsInInteger( int n ) {&#xA;    return n.ToString().length();&#xA;}&#xA;&#xA;private static boolean integersHaveSameNumberOfDigits(int a, int b){&#xA;    return digitsInInteger(a) == digitsInInteger(b);&#xA;}&#xA;&#xA;if ( integersHaveSameNumberOfDigits( n, n+1 ) ) { …&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can even put &lt;code&gt;integersHaveSameNumberOfDigits( n, n+1 )&lt;/code&gt; into a function, but I did not know what to call it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example&#xA;&lt;code&gt;while (temperature &amp;lt; 100 &amp;amp;&amp;amp; unHatched())&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;private static boolean isColdEnoughNotToCookEggs( int temperature ){&#xA;    return temperature &amp;lt; 100;&#xA;}&#xA;&#xA;private boolean eggsAreStillViable(){&#xA;    return isColdEnoughNotToCookEggs(temperature) &amp;amp;&amp;amp; eggs.areUnHatched();&#xA;}&#xA;&#xA;while (eggsAreStillViable() ){ …&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;This example was a bit harder to refactor, as I had to guess the intent.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Code in this answer may not be Java. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-15T17:08:17.663" LastActivityDate="2017-08-15T17:08:17.663" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3195" PostTypeId="2" ParentId="3175" CreationDate="2017-08-09T23:08:24.777" Score="4" Body="&lt;p&gt;Truth be told you will never truly understand the difference until you actually learn and use both a functional and an object oriented language. I say that as someone who has learnt both object-oriented languages (C#, C++, Java) and functional languages (Haskell).&#xA;I will however attempt to explain the crux of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My answer will be looking mostly at functional programming from an object-oriented point of view, as the features of object oriented programming are already very heavily documented due to its popularity whereas the features of functional programming are much more scarcely documented.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Firstly imagine a computer language as a tool (or a collection of tools).&#xA;Every tool in the world has a particular purpose or a set of tasks that it's good for, and the same is true of languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Functional languages&lt;/strong&gt; tend to work better for problems that involve data-processing and deterministic processes. As such they are liked by scientists and mathematicians who can think in terms of pure data and algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Object oriented languages&lt;/strong&gt; are better for modelling complex interacting systems. They are preferred by businesses because of their ability to mediate complex tasks and by game developers because of their usefulness in modelling the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can of course be used for other things, but these are typically what the approaches are centred around.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;At the language level the crux of the matter that sets functional languages apart are these factors:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;They shun local state (with caveats).&lt;/li&gt;&#xA;&lt;li&gt;By extension they forbid functions from having side-effects (functional 'purity').&lt;/li&gt;&#xA;&lt;li&gt;Implicit type inference&lt;/li&gt;&#xA;&lt;li&gt;The dependence on 'lists'&lt;/li&gt;&#xA;&lt;li&gt;The use of sum types&lt;/li&gt;&#xA;&lt;li&gt;The use of type classes (or 'contracts')&lt;/li&gt;&#xA;&lt;li&gt;Implicit currying&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(Note that these are not all completely necessary for something to be considered a functional language, but they are features that are commonly associated with functional languages because they can be found in a wide variety of functional languages, particularly the most popular ones.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;State:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a functional language, values are created and they do not change - instead the old value is destroyed and a new value is created. At face value this seems a bit crazy, but in reality this abolition of state (with caveats) is only at the language-level, the compiler translates the source code into machine code that still has a concept of state, which somewhat breaks the illusion and makes this notion a bit less shocking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The caveats I mentioned are that there are ways to emulate state in one way or another. One way of doing this is by maintaining the state as a function variable and another way is by using a construct called the 'State monad'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Purity:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Equally, although all functions must be 'pure' (i.e. must not have side effects), there are various monads that allow there to still be side effects without breaking the laws of the language. Monads are how any kind of IO (file IO or terminal IO) is made possible. Essentially, the behaviour of the program is bound to the monad through functions that act a a means of sequencing - the monad then represents a list of actions that describe the translation and processing of the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type inference:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This is not found in all functional languages and may sometimes be found in certain object-oriented languages such as C# and C++.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is where the compiler is able to evaluate the type of an expression by looking at the types of the values and functions in the expression and deducing what the valid results could be. If there is only one unambiguous match, the compiler is able to infer the type, making many definitions as simple as the values and functions themselves - no explicit typing involved. In other cases, there is ambiguity and some type notation must be used to disabiguate the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lists:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, the core data type of functional languages is a kind of singly-linked list often referred to simply as a 'list'. This takes the role of the basic collection datatype and is used how arrays and dynamic arrays are used in many object-oriented languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another significant difference is the language-level support for sum types. Sum types are like objects with different constructors, and work &lt;em&gt;sort of&lt;/em&gt; like inheritance in object oriented languages. That is, the type itself can be an abstract concept (e.g. a tree) and the constructors for it can represent different values of that concept (e.g. and empty tree, a leaf node and a branch node). It is because of this that tree data types are very easily represented in functional languages, and as such they are well-liked for solving mathematical tree-related problems and for implementing parsers and/or compilers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Type Classes (or 'contracts'):&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type classes are similar to interfaces in object-oriented programming but have the distinction that they are not implemented at the time the datatype they are applied to is defined, they are implemented after the type has been defined. This means that they can be applied after the fact to datatypes that one does not 'own'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type classes are defined simply as a 'contract' that list a series of functions and/or values for which the obeying datatype must have an implementation. In effect the 'contract' states &quot;any datatype said to implement this type class must provide an implementation for these functions&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example there could be a datatype &lt;code&gt;addable a&lt;/code&gt; (Where &lt;code&gt;a&lt;/code&gt; is a type variable - a symbol standing in for an as yet undeclared type)  that specifies a function called &lt;code&gt;add&lt;/code&gt; with the signature 'a -&gt; a -&gt; a' (a function accepting two arguments of the type represented by &lt;code&gt;a&lt;/code&gt; and returing a value of the type represented by &lt;code&gt;a&lt;/code&gt;). This loose definition means the &lt;code&gt;addable&lt;/code&gt; type class can be implemented by many different data types, including &lt;code&gt;Int&lt;/code&gt;, &lt;code&gt;Float&lt;/code&gt; and any user-defined arithmetic type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Currying:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note that not all functional languages support this, but it is much more commonly found in functional languages than in object oriented ones.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currying is a technique named after Haskell Curry (the same person for whom the language Haskell is named).&#xA;Currying means that a function is only bound to one argument and then returns either a result or another function accepting an argument. In functional languages, all functions are implicitly curried, which means that no function actually accepts more than one argument. This in turn means that when you write a statement like &lt;code&gt;add 3 5&lt;/code&gt;, what actually happens is that the &lt;code&gt;3&lt;/code&gt; gets bound to the &lt;code&gt;add&lt;/code&gt; function, which then returns a function accepting a number, to which the &lt;code&gt;5&lt;/code&gt; gets bound, and only then does that return a result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This probably seems insane to someone not used to the idea, but it actually makes a lot of things much easier. For example there is typically a function called &lt;code&gt;map&lt;/code&gt; which takes a function and applies that function over the contents of a list (much like a loop could do in imperative languages), and the ability to curry functions makes the definition of a the function passed to &lt;code&gt;map&lt;/code&gt; very simple. If, for example, you wanted to add 5 to a list in Haskell, you could simply write &lt;code&gt;map (+5) list&lt;/code&gt; - the &lt;code&gt;(+5)&lt;/code&gt; takes the function &lt;code&gt;+&lt;/code&gt;, binds it to the value &lt;code&gt;5&lt;/code&gt; and returns a function taking a number and returning the result of that number &lt;code&gt;+ 5&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1538" LastEditorUserId="1538" LastEditDate="2017-08-13T00:17:40.700" LastActivityDate="2017-08-13T00:17:40.700" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="3196" PostTypeId="1" CreationDate="2017-08-10T11:02:17.097" Score="3" ViewCount="180" Body="&lt;p&gt;Bit of history: The &lt;a href=&quot;https://www.cs.bris.ac.uk/~dave/basic.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Darmouth Basic Manual (1964)&lt;/a&gt; follows a common order of exposition: expressions, variables, constants, assignment, tests/loops; calling subprograms being considered an &quot;advanced topic&quot; (well, the last thing, after using tables).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This reminds me of the first version of Fortran, (see &lt;a href=&quot;http://www-03.ibm.com/ibm/history/ibm100/us/en/icons/fortran/breakthroughs/&quot; rel=&quot;nofollow noreferrer&quot;&gt;preliminary report of 1954&lt;/a&gt;) which had no user-defined subroutines/functions at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So teaching the importance of decomposing code into smaller (reusable) units was not considered a major priority.  And as a consequence we had generations of students who wrote functions/subprograms only under coercion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a &lt;a href=&quot;http://www.iaras.org/iaras/home/caijels/a-procedural-way-of-teaching-procedural-programming-language&quot; rel=&quot;nofollow noreferrer&quot;&gt;recent paper&lt;/a&gt; (2016) about a procedure-oriented approach to teaching programming in C ; the question is, were there similar approaches in the sixties ot seventies?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;: Was this order of topics standard in the 1960s for imperative programming?  Bonus points if you can directly link to textbooks that demonstrate your answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Remark&lt;/strong&gt;: Counter-examples will certainly by found in the presentation of functional and LOGO programming. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;In &lt;a href=&quot;http://dspace.mit.edu/handle/1721.1/5835&quot; rel=&quot;nofollow noreferrer&quot;&gt;Teaching Children Thinking&lt;/a&gt;, by S. Papers, 1971, page 5-2 it is shown that after demonstration of &lt;code&gt;FORWARD 100&lt;/code&gt; and &lt;code&gt;ROTATELEFT 90&lt;/code&gt;, the student can write the first (endless recursive) procedure&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;TO CIRCLE&#xA;   FORWARD 100&#xA;   ROTATELEFT 90&#xA;   CIRCLE&#xA;END&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here the procedural aspect comes even before variables, expressions etc.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In the famous &lt;a href=&quot;https://www.web.mit.edu/alexmv/6.037/sicp.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;SICP book&lt;/a&gt; (not for innocent children) using Scheme, definition of functions come after expressions and before IF etc.  But it comes much later (1985).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Partial answer:&lt;/strong&gt;  the &lt;a href=&quot;http://www.dahlan.web.id/files/ebooks/ACM%20Curricula%20Recom%20for%20CS%201983.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACM Curricula Recommendations for Computer Science, vol 1&lt;/a&gt; (1983) contains the 1968's course contents and outlines. In course B1 (page 21) Introduction to Computing :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;This outline reflects an order in which the material might be presented [...]&quot;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;2. Basic Programming. Constants identifiers, variables, subscripts, operations, functions, and expressions. Declarations, substitution statements, input-output statements, conditional statements, and complete programs&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;3. Program structure. Procedures, functions, subroutine calling, and formal-actual parameter association. Statement grouping, nested structure of expressions and statements, local versus global variables [....]&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The book &lt;a href=&quot;https://archive.org/stream/fortranprimer00orga#page/88/mode/2up&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Fortran Primer&lt;/a&gt; (1963) by E.I. Organick starts explaining subroutines and functions at page 89. Last section before  &quot;12. Preparation of Punch Card Program Decks&quot;. Can be considered as a good textbook for beginners, not a Fortran reference manual. Read it if you miss good old time flowcharts.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-08-16T18:26:27.227" LastActivityDate="2017-08-16T18:26:27.227" Title="Historical standard order of topics in imperative programming textbooks" Tags="|resource-request|resource-information|programming-paradigms|" AnswerCount="0" CommentCount="11" ClosedDate="2017-08-13T00:19:13.070" ContentLicense="CC BY-SA 3.0" />
  <row Id="3197" PostTypeId="5" CreationDate="2017-08-10T11:19:59.273" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-08-10T11:19:59.273" LastActivityDate="2017-08-10T11:19:59.273" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3198" PostTypeId="4" CreationDate="2017-08-10T11:19:59.273" Score="0" Body="Questions related to teaching about type casting. Use this tag to ask about teaching various aspects of type casting." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-10T11:54:52.767" LastActivityDate="2017-08-10T11:54:52.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3199" PostTypeId="1" CreationDate="2017-08-10T16:11:32.250" Score="5" ViewCount="226" Body="&lt;p&gt;What are some advantages of incorporating algorithmic complexity in grading tests and assignments given to students?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently, students in 11th grade at my school are required in tests to write functions that should preform some operation (usually operations on data structures like &lt;code&gt;LinkedList&lt;/code&gt;, &lt;code&gt;Stack&lt;/code&gt; and &lt;code&gt;Queue&lt;/code&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This works fairly well in terms of checking whether a student knows how to use those data structures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's not uncommon to see an answer that does, eventually, preform the required operation; and yet its complexity is $O(n^3)$ (no kidding. The specific case I'm thinking of is one where the student worked with the unsorted linked list of stacks&lt;sup&gt;1&lt;/sup&gt; in 3 nested for loops). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are required, after they write their functions, to also write the complexity of their solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a quest to improve the students' thinking skills, I thought that maybe we should give bonus points if the solutions are inventive and less complex than a head on approach. This means that if a student's function is $O(n)$ for a task that a direct assault would be of $O(n^2)$, they should get more points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can also apply to various assignments we can give them, in addition to the tests we already have (or maybe make the tests slightly easier and then add assignments).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are in a CS major, and they have experience with java, OOP, Data structures and basic calculations of complexity for various, simple, algorithms)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;We gave them some arbitrary way of comparing stacks (of Integers): The sum of elements.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-10T16:57:05.793" LastActivityDate="2017-08-17T16:36:16.500" Title="Incorporating algorithmic complexity in grading" Tags="|grading|complexity-theory|" AnswerCount="3" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3200" PostTypeId="2" ParentId="79" CreationDate="2017-08-10T16:22:12.690" Score="2" Body="&lt;p&gt;Emphasize the 'stupidity' of security holes - they aren't weaknesses that only geniuses with a bone to pick can root out, they're the same mistakes repeated &lt;em&gt;ad nauseam&lt;/em&gt; between different companies, therefore every application is liable to run into them.&#xA;Using the CWSS (common weakness scoring system) the highest priority vulnerabilities are SQL Injection, OS Command Injection and classic buffer overflow. &lt;a href=&quot;https://cwe.mitre.org/top25/#cwe-89&quot; rel=&quot;nofollow noreferrer&quot;&gt;(full list)&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As other answers have said, a game is the best approach; preferably a readymade &quot;Please hack me&quot; style website for them to attack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://hackyourselffirst.troyhunt.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2524" LastEditorUserId="2524" LastEditDate="2017-08-10T16:32:56.337" LastActivityDate="2017-08-10T16:32:56.337" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3201" PostTypeId="2" ParentId="3092" CreationDate="2017-08-10T16:40:55.837" Score="0" Body="&lt;p&gt;One which most of your students are likely to have seen, and some of them may have participated in: production of an order in a fast food restaurant.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cashier takes order&lt;/li&gt;&#xA;&lt;li&gt;Burger is prepared and placed in the rack&lt;/li&gt;&#xA;&lt;li&gt;Drink is prepared, brought to the counter, and placed on the tray&lt;/li&gt;&#xA;&lt;li&gt;Chips* are bagged, brought to the counter, and placed on the tray&lt;/li&gt;&#xA;&lt;li&gt;Burger is fetched from the rack, brought to the counter, and placed on the tray&lt;/li&gt;&#xA;&lt;li&gt;Payment is collected&lt;/li&gt;&#xA;&lt;li&gt;Customer collects tray&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's pipelining, parallelisation, maybe even branch prediction (cashier fetches tray before asking whether it's to eat in or take away).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;* Speakers of en-US: read &quot;&lt;em&gt;fries&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-08-10T16:40:55.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3202" PostTypeId="2" ParentId="2875" CreationDate="2017-08-10T19:47:16.553" Score="-1" Body="&lt;p&gt;I observe that at the time of the decline in CS degrees there's an uptick in Business degrees. Was Information Systems introduced around that time? &lt;/p&gt;&#xA;" OwnerUserId="2531" LastActivityDate="2017-08-10T19:47:16.553" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3205" PostTypeId="2" ParentId="3033" CreationDate="2017-08-11T03:34:45.980" Score="0" Body="&lt;p&gt;Focus on &lt;strong&gt;inequities in environmental consequences from mining, manufacturing, and disposal.&lt;/strong&gt; This was suggested by &lt;a href=&quot;https://cseducators.stackexchange.com/users/204/richard&quot;&gt;richard&lt;/a&gt;. He also recommended &lt;a href=&quot;https://www.youtube.com/watch?v=sW_7i6T_H78&amp;amp;lc=z12tdv1w0zqtxhk2123qfhlwpo34t4h0.1501603843862852&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Story of Stuff: Electronics&lt;/a&gt; 8-minute video. I think environmental injustice of computing is worth learning about and considering alongside inequities in &lt;em&gt;access&lt;/em&gt; to computing resources. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understanding the issue helps students digest domestic news and is presumably within the scope of the CS Principles writers' intentions and easily within the scope of the Explore PT. Wisconsin's governor, for example, is pushing for \$3 billion subsidies and relaxed environmental requirements in exchange for Taiwanese Foxconn to make a \$10 billion investment in a manufacturing plant rippling to create 13,000 jobs to make flat screen TVs here instead of China.  &lt;a href=&quot;https://www.nytimes.com/2017/08/10/us/foxconn-jobs-wisconsin-walker-tax-incentives.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;News articles on the issue&lt;/a&gt; would be easy to find for the 2018 Explore task. &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-08-11T03:34:45.980" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3208" PostTypeId="1" CreationDate="2017-08-11T15:43:22.880" Score="9" ViewCount="366" Body="&lt;p&gt;One common concern many independent learners of computer science and tech have is figuring out what they &quot;don't know&quot;. More specifically, the concern is that since they've never been formally educated in CS, their knowledge might have &quot;blind spots&quot;, which can cripple them when they start working on more complex projects or try and get a job. (For example, somebody who didn't know that data structures and algorithms were a thing will very likely struggle on most standard tech interviews).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I interact with/help self-learners on a fairly regular basis, and am never quite sure what to tell them when this question comes up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One strategy, of course, is to simply give them a list of things they ought to know -- there are many articles that give a good overview of topics covered by a standard CS degree, for example (&lt;a href=&quot;http://matt.might.net/articles/what-cs-majors-should-know/&quot; rel=&quot;noreferrer&quot;&gt;example 1&lt;/a&gt;, &lt;a href=&quot;https://github.com/open-source-society/computer-science&quot; rel=&quot;noreferrer&quot;&gt;example 2&lt;/a&gt;). However, this strategy doesn't generalize well: once you move on to trying to learn about something not on some list, you're back at square one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other strategy I try suggesting is to just read random highly-upvoted posts on StackOverflow and news aggregate sites like Hacker News -- I've personally found you tend to pick up a good awareness of different CS and tech topics almost by osmosis if you do this. However, this strategy is also flawed: it's a random and slow process, and isn't guaranteed to be comprehensive. (If a topic isn't trendy, it's likely you'll never stumble across it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This brings me to my core question: &lt;strong&gt;what are some effective meta-strategies suitable for self-learners that help them identify gaps in their knowledge?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm hoping for strategies that are either more generalizable or more systematic then the two I listed up above.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-25T08:18:15.717" Title="Strategies for independent learners to identify gaps in their knowledge" Tags="|self-learning|conceptual-frameworks|" AnswerCount="4" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3209" PostTypeId="2" ParentId="3208" CreationDate="2017-08-11T16:10:28.913" Score="6" Body="&lt;p&gt;First, I will note that &lt;a href=&quot;/questions/tagged/curriculum-design&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;curriculum-design&amp;#39;&quot; rel=&quot;tag&quot;&gt;curriculum-design&lt;/a&gt; and &lt;a href=&quot;/questions/tagged/self-learning&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;self-learning&amp;#39;&quot; rel=&quot;tag&quot;&gt;self-learning&lt;/a&gt; are both on-topic right here on &lt;a href=&quot;http://+seducators.stackexchange.com&quot; rel=&quot;noreferrer&quot;&gt;CSEducators&lt;/a&gt;, so &lt;strong&gt;this very site&lt;/strong&gt; can be a great resource for the self-learner in computer science!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a saying about the self-taught student, &lt;em&gt;&quot;great student, but they had a terrible teacher!&quot;&lt;/em&gt; When designing a curriculum for yourself, there is no single, easy way to make sure that your education is comprehensive within unfamiliar topic.  You are dependent, then, on organizations of the material provided by other people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I am self-teaching, my first job therefore becomes to find a textbook.  Sometimes the textbook itself is rather too difficult to use as a single source, &lt;em&gt;but this is okay!&lt;/em&gt;  The introduction and the Table of Contents are actually the most important two items in the book for my purposes.  The introduction typically lays out the central thinking behind a topic and a coherent philosophy about how to best learn it, and the Table of Contents lists all of the important topics.  If the contents of the book are also useful, then I simply count my lucky stars at having found such a wonderful book!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For secondary resources, students can seek out tutorials (either written or video), documentation (if they are capable of learning from APIs), or online coursework.  They can then use the textbook TOC as ther guiding star, and work their way through the topics that they need.  Using the TOC as a basic guide about &lt;em&gt;what is contained in this topic&lt;/em&gt; means that students can make informed choices about what they need to study as they work their way through the program they've designed for themselves.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-11T17:42:20.467" LastActivityDate="2017-08-11T17:42:20.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3210" PostTypeId="1" CreationDate="2017-08-11T18:09:13.940" Score="15" ViewCount="1092" Body="&lt;p&gt;I'm a developer with a little CS teaching history, and I have a nephew who enjoys math (Algebra-Calculus) quite a bit in high school.  Because of this, I feel like he should at least try computer programming, but its not available at his small-town high school.  He's a senior in high school this year (16-17yo).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any games or simple projects/tests that are designed to see if someone enjoys programming?  I think setting him down with an Intro to Java book would be pretty boring and probably not give him a good feel to what programming is about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen coding challenges for people learning programming, and simple games that seem to be targeted at younger kids.  What I really want is something a teenager can sit down with and say, &quot;oh, so this is what programming is like&quot;...&lt;/p&gt;&#xA;" OwnerUserId="2550" LastEditorUserId="1293" LastEditDate="2017-08-11T18:33:04.757" LastActivityDate="2018-06-03T18:39:39.977" Title="How can I determine if a student would enjoy or has an aptitude for CS?" Tags="|student-motivation|introductory-lesson|" AnswerCount="8" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3211" PostTypeId="2" ParentId="3210" CreationDate="2017-08-11T18:14:00.690" Score="5" Body="&lt;p&gt;Khan Academy has as nicely done intro course using JavaScript in a sandbox in their environment. You very quickly get started drawing things on the screen, and the immediacy of instantly seeing something change on the screen is very appealing and engaging - much more so than my early days of back and forth to the console!&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-08-11T18:14:00.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3212" PostTypeId="2" ParentId="3210" CreationDate="2017-08-11T18:56:46.730" Score="12" Body="&lt;p&gt;You shouldn't &quot;test&quot; somebody to check whether they're interested in something. You should give them some stuff you think they might enjoy, and you let them decide for themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a ton of programming languages designed for novices, including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://processing.org/&quot; rel=&quot;noreferrer&quot;&gt;Processing&lt;/a&gt;. This is my personal favorite. Shameless self-promotion: I've written a series of tutorials for people exactly like your nephew, available at &lt;a href=&quot;http://happycoding.io&quot; rel=&quot;noreferrer&quot;&gt;HappyCoding.io&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Scratch. This is geared towards younger kids, but might be a good &quot;game-like&quot; introduction.&lt;/li&gt;&#xA;&lt;li&gt;Game Maker. If your nephew is interested in game development, this might be worth checking out. I suggest not limiting him to game dev though.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;See also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/733/what-would-be-a-good-first-choice-to-teach-game-programming-to-beginners&quot;&gt;What would be a good first choice to teach game programming to beginners?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/19/using-processing-as-an-entry-point-in-an-introductory-course&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class/2798#2798&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-11T18:56:46.730" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3213" PostTypeId="2" ParentId="3210" CreationDate="2017-08-11T21:29:23.760" Score="5" Body="&lt;p&gt;I'd just like to add my two cents, as a 16 year old who started programming and robotics and stuff at a &lt;em&gt;very&lt;/em&gt; early age.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I recommend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Get the kid access to a computer and to the internet.&lt;/strong&gt;  &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Let them know about programming, and give them access to resources.&lt;/strong&gt; I started with HTML. I picked up a book on it from the school library, then moved on to online resources. Yeah, I know. Many people don't even consider it a programming language. But to me, that was magic. I could type some stuff into Notepad, and the computer would do what I told it to do!  &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Leave them alone, let them explore.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;If it's their thing, they'll do it&lt;/strong&gt;. If it isn't, DO NOT force it on them or insist. Perhaps they will come back to it someday.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How it worked out for me:&lt;/strong&gt;&lt;br&gt;&#xA;I changed schools, and didn't have too many friends in the new place. People were rich and stuck up. I'd done some robotics and electronics earlier, but not programming as such. When I found out that we were allowed access to the computer labs in the breaks, I carried a book on HTML from the library to up there and created my first page. That was the day my addiction was born, I never stopped.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly, after HTML I played around with Windows Batch. This is not very common, but I loved it. And then I moved on to PHP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess what I'm trying to say here is that everyone explores and learns in their own manner. Don't ask them to use any particular language, or follow any trend. And if they ever come running to you all excited about something, &lt;em&gt;never ever&lt;/em&gt; say &quot;But... What's even the point of this?&quot;. It's an instant killjoy.&lt;/p&gt;&#xA;" OwnerUserId="1912" LastEditorUserId="1912" LastEditDate="2017-08-11T21:46:18.063" LastActivityDate="2017-08-11T21:46:18.063" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3215" PostTypeId="2" ParentId="3208" CreationDate="2017-08-12T01:10:33.143" Score="8" Body="&lt;p&gt;First off, it's worth mentioning that &lt;strong&gt;everybody&lt;/strong&gt; has these &quot;blind spots&quot; or gaps in their knowledge. Nobody can know everything, and some of the smartest people I've met are very open about that fact. I think a big part of being a good programmer is being comfortable with the unknown. What makes a good programmer isn't that they can write code, it's that they can &lt;strong&gt;learn&lt;/strong&gt; how to write code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that regard, a self-learner already has a lot going for them. Because it's not really about memorizing stuff: it's more about the ability to do research, consult documentation, try stuff out, and see what happens. So the best thing somebody can learn is the ability to learn, if that makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also say that for me, the thing that really took my knowledge to the next level was when I started &lt;strong&gt;answering&lt;/strong&gt; questions. So I'd say your recommendation of checking out posts on Stack Overflow is on the right track, but I'd encourage novice and intermediate programmers to go a step further and try to answer questions as well. If Stack Overflow seems overwhelming (it was for me at first), then maybe join a forum and start answering questions there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're only familiar with &lt;code&gt;if&lt;/code&gt; statements, then start answering questions about &lt;code&gt;if&lt;/code&gt; statements. Eventually you'll see a question that also involves a &lt;code&gt;for&lt;/code&gt; loop, so to answer that question you do some research on &lt;code&gt;for&lt;/code&gt; loops. Then you start answering &lt;code&gt;for&lt;/code&gt; loop questions, and eventually come across a question about functions... That's a contrived example, but the general flow is pretty much exactly what I experienced. Even after a formal education, it really opened my eyes up to how much I didn't know!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find a community, share your work, talk about programming. This is one way the gaps get filled in with a formal education, so it stands to reason that this would help with a self-learner as well.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-12T01:10:33.143" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3216" PostTypeId="2" ParentId="3210" CreationDate="2017-08-12T12:06:18.977" Score="8" Body="&lt;p&gt;I started with Khan Academy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Who knows how I stumbled across it - I think one of my teachers back in elementary school pointed it out to me. And then I found the coding course. I started, enjoying drawing the shapes on the screen with some characters. I was talking to the computer! I wasn't very consistent about it though, and my interest soon petered off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fast forward a couple months, I found my progress on those old courses. I gave it a whirl again. Who knows what the difference was, but this time, I was hooked. I worked through the Khan Academy JavaScript course, the HTML/CSS course, and parts of other courses. Then, I don't remember how, I stumbled on Python. My guess was I stumbled on it on codecademy. I really loved the language, and I started using it just as much as codecademy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think I should be clear that while I was enthusiastic, I was by no means very good, and I also didn't program all day and all night, though I did do it fairly consistently. I started messing around with programs of my own. And then, the beginning of last summer, two big things happened: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I got a computer of my own, a snazzy new chromebook.&lt;/li&gt;&#xA;&lt;li&gt;I found Stack Exchange.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It was now much easier to code, and I had a resource I could go to with questions - though interestingly enough, I didn't first join stack overflow, I first joined Mathematics.SE, and then Physics.SE, which is still my favorite site on the network. I really discovered how much I could teach myself on my own. I had a goal, that is, to learn about quantum computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I've progressed quite significantly. Along the way, I've worked on several coding projects related to that. Python is my favorite language. I've become a lot more able in Python - and where I'm not, given the internet, I can figure things out. I'm really happy right now, and I love what I'm able to do. There's more to this whole story that I've left out, but I'll leave it at that.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;From what I've experienced, I'd point out several big things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Plant a seed, but don't force it. It took me months to get truly interested in programming, and even then I wasn't super consistent about it, but now I'm really excited about programming. Sometimes people truly aren't interested, in which case, move on. Perhaps they'll become interested at a later date, and even if not, at least they're aware that programming exists.&lt;/li&gt;&#xA;&lt;li&gt;Provide resources. I was able to get very far, very quickly, just due to having my own computer and knowing about stack exchange. Khan academy, codecademy, and other such sites were essential to my even starting in the first place.&lt;/li&gt;&#xA;&lt;li&gt;Help provide an inspiration, or some projects to go through outside of tutorials. I used the Euler problems, and right now I'm working on a bigger sort of project - to create a simulation of an ideal quantum computer (which ties in with my other interests).&lt;/li&gt;&#xA;&lt;li&gt;Let them fail, but also be encouraging. A couple months ago, I thought I had a working simulator for a quantum computer, for any number of qubits. I was &lt;em&gt;ecstatic&lt;/em&gt;. And then, of course, I noticed an error in the results. I went from ecstasy to pure gloom. My dad pointed out, however, that I'd learned something. And so I had, both about quantum mechanics and approaching a project. I'm still really proud of the code I wrote, it just ended up being useless ;)&lt;/li&gt;&#xA;&lt;li&gt;Occasionally tremble in awe at their prowess. My parents have both been very encouraging. My mom watched me create shapes in the Khan Academy JavaScript editor, and more recently, appreciatively looked at a GUI I made in python that was rather hideous =)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Now, to answer your specific question about resources - I'd suggest starting with Khan Academy, which has a nice gamification system (energy points, etc), though codecademy, and some of the other sites provided at code.org are quite nice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Euler problems are good projects to try to solve, and they're very math-oriented, which your nephew should like. You could also encourage him to write programs that solve his homework (just to check it, of course). Try to provide projects and resources that integrate with his interests after he learns the basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find Python a great introductory language - it forces good habits like indentation, you don't have to worry about low-level stuff like garbage collection, and it's really easy to read and write. (At some point, it is probably a good idea to learn a bit about other major programming languages like C, but not at the beginning.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some great resources on this site as well about the order in which things should be learnt, other ideal beginner languages if for some reason you don't want to use Python, etc. I hope this helps, and best of luck to your nephew!&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="150" LastEditDate="2017-08-12T12:08:30.403" LastActivityDate="2017-08-12T12:08:30.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3217" PostTypeId="2" ParentId="3210" CreationDate="2017-08-12T17:43:19.410" Score="3" Body="&lt;p&gt;I suggest a slightly different approach: have students solve puzzles. Sudoku. Crosswords. Logic puzzles. Lateral thinking puzzles. Anything that requires critical thinking, analysis, decomposition. Then show how these same skills (and the same enjoyment) is found in programming. (For example, have students speed-solve a sudoku puzzle then have them formalize an algorithm in pseudocode for that process.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my time teaching CS, I have seen a strong correlation between students who enjoy and are skilled at programming and students who enjoy the intellectual challenge of solving puzzles. For me personally, the New York Times crossword is an indispensable part of my daily routine. When I have a program to write or a concept to think through, I approach it as a puzzle to piece apart and ultimately &quot;solve.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teacher of CS50 AP, I use puzzles from CS50's annual Puzzle Day throughout the year. A quick search will reveal many puzzle packets to choose from online (&lt;a href=&quot;http://cdn.cs50.net/2017/spring/events/visitas/puzzles.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;here's one&lt;/a&gt;). These puzzles are great as a fun activity from time to time, and I do think they align with skills needed for computational thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students instantly see puzzles like the ones linked to above as a problem they simply must solve. They instantly focus and try to break it down from every angle. The same skill of logical, ordered thinking is found both in solving these and in solving algorithmic and computational challenges. I'll think you'll get a good sense of a student's potential interest (and potentially aptitude) in CS with puzzle-solving activities. &lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-08-12T17:43:19.410" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3218" PostTypeId="1" CreationDate="2017-08-12T23:35:45.170" Score="9" ViewCount="175" Body="&lt;p&gt;I understand, as a model, how a researcher at a university can advance the entire field of CS Education.  Less clear to me, however, are methods available to teachers in the field who do not have doctoral degrees, much less a publication history.  Beyond posting on this website, what ways are available to advance the field of CS &lt;em&gt;education?&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-11-08T21:51:55.313" Title="Ways to advance the field of computer science education as a non-researcher" Tags="|resource-request|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3219" PostTypeId="2" ParentId="3218" CreationDate="2017-08-13T00:08:57.983" Score="6" Body="&lt;p&gt;Actually &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(a) you don't need a doctorate to do research,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(b) most university faculty don't do research in CSEducation, but in CS,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(c) most conference committees don't care much about the formal credentials of those who submit papers to the conference. SIGCSE, for example, has quite a lot of work by people without doctorates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, what you probably &lt;em&gt;do&lt;/em&gt; need is contact and communication with like-minded people with an interest and some writing ability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this doesn't become just a list of options, but there are quite a few. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Probably the most productive line for a person at a smaller institution is to try to make contacts with those writing and doing research in a field that interests you. If you express interest you might get included in their normal communication mechanism. Often people need to work remotely from colleagues, so you have no real disadvantage there. Find a paper that interests you and write to its authors to ask what they might be working on that you might contribute to. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are in an area with quite a few educators you might try to found a discussion group among teachers in similar positions. It could lead to bigger things, but you need to be able to keep up with what is going on through reading. Once established you might be able to invite a university educator to one of your meetings, spreading your contacts. You might also be able to extract an invitation visit any working groups that the University might have. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Try to find a way to go to either a national or one of the regional conferences of educators. You will meet a lot of people. The &lt;a href=&quot;https://www.ccsc.org&quot; rel=&quot;noreferrer&quot;&gt;Consortium for Computing in Small Colleges&lt;/a&gt; holds a conference annually in each of the major regions of the US. I expect they will be happy to ignore the fact that you might be a secondary educator. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get involved in APCS, not just as a teacher, but as a contributor. One option, if you have the time is to become an AP grader. This is an annual event in which you will work hard, but also meet a large number of people interested in CS Education, some from the Secondary Level and some from Universities. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One of the groups that should probably interest you is the people who write &lt;a href=&quot;http://www.pedagogicalpatterns.org&quot; rel=&quot;noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt;. These are based on experience, not research, and go through a vetting process to validate them to the community. Among other things they do is help one another write (shepherding) and a formal process of feedback at the periodic conferences (workshopping). Any pedagogical pattern you are likely to see has been re-written a dozen times with feedback from, perhaps, a dozen to twenty people. It is a vibrant community. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-13T00:08:57.983" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3220" PostTypeId="2" ParentId="3210" CreationDate="2017-08-13T10:54:14.003" Score="3" Body="&lt;p&gt;My attitude to this question (which I have often been asked) is radically different to the other answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been involved in recruitment and selection of students for Computer Science degree programs for over 30 years (in one way and another). Parents, potential applicants and their teachers often ask &lt;em&gt;&quot;what feature of an applicants profile indicates their potential..?&quot;&lt;/em&gt;, which is quite similar to your question. They expect me to say something about their coding skills, or even computer gaming aptitude. No; we  rarely look at that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me there are other very good indicators of a mind set that is successful at Computing and will enjoy it. The classic indicator is Mathematics, but on its own it is a poor discriminator. I found that better indicators were musicianship and modern languages. Being fluent at more than one language and having skills at sight reading music and playing that instrument with others can be an indicator that they may excel at Computing. This combined with enjoying the structure of non-computer games (board games or Role-Playing) also are positive signs. As also noted, puzzle and problem solving is also a good sign.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do I think this is so? It is the issue of reading a coded notation at speed, as one does in music, develops the mind to handle computer code as another form of instruction notation. The combining this with manual dexterity, as in performance also helps. Understanding that the music notation expresses the communication of the desire from one human to another is so similar to the function of computer code. This analogue also applies to other modern languages; someone who has to translate between languages appreciates the difficulty in expressing meaning in a different notation for others to act on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why non-computer games? It is because of the reading and understanding of the rules that is required to understand the play. If they can absorb and mentally model the multi-tome rule sets to some of these games then they can read and mentally model large enough chunks of computer code to be successful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could add more detailed analysis, but I will leave it at that for now.&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="694" LastEditDate="2017-08-13T16:36:14.733" LastActivityDate="2017-08-13T16:36:14.733" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3221" PostTypeId="1" AcceptedAnswerId="3222" CreationDate="2017-08-13T12:36:08.963" Score="6" ViewCount="391" Body="&lt;p&gt;I am going to teach a course in object-oriented programming in Java, and am looking for materials - textbooks and slides. It is a course for 2nd-year undergrads. In the 1st year, they already learned an introduction to programming course, also with Java. So, books that just teach Java will not be good textbooks. What are good textbooks for such a course? &#xA;Additionally, are there existing courses where I can get slides and other course materials, so that I do not have to prepare everything from scratch?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="1873" LastEditDate="2017-08-13T13:59:14.133" LastActivityDate="2018-01-13T00:29:02.580" Title="Teaching OOP in Java, to students who already know Java" Tags="|java|resource-request|object-oriented-paradigm|textbook|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3222" PostTypeId="2" ParentId="3221" CreationDate="2017-08-13T13:09:41.613" Score="4" Body="&lt;p&gt;I'm going to jump the gun a bit here and make a suggestion with less than complete information. Assuming that the students have seen a fair amount of Java and its libraries and also assuming that the book they used isn't terrible on OO concepts then I'd suggest that you run a project course. There are a fair number of possibilities for projects&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One is to use your own doctoral research interest as stated in your profile and have students build a software system to solve fair cutting problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility is to use an old APCS Case study that was quite well developed and used for a few years in the APCS course in the US: &lt;a href=&quot;https://apstudent.collegeboard.org/apcourse/ap-computer-science-a/about-the-exam/gridworld-case-study&quot; rel=&quot;nofollow noreferrer&quot;&gt;Grid World&lt;/a&gt;. The study comes with a starting code base and a student manual. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also join the &lt;a href=&quot;http://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt; and look at the various projects available there. It is also a community of educators who might be able to offer assistance. The Greenroom resources use the greenfoot IDE which is simple but complete, but the advantage in your situation is the various projects that you might be able to develop into a course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The BlueJ IDE is a bit more sophisticated and the community there also publishes a number of projects via the &lt;a href=&quot;http://blueroom.bluej.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blueroom&lt;/a&gt;. Many of them might be considered as the basis of a project course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, another consideration is how well you know Object-Oriented programming yourself, as you don't say. If you are less than an expert, you might consider for yourself to look at something like &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1940113059&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Polymorphism: As It Is Played&lt;/em&gt;&lt;/a&gt; by Joseph Bergin. I don't think it would be suitable for a course text, but it might give you some background in OO thinking if you haven't already acquired it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also note that in a project course you have the opportunity to introduce students to some of the additional personal practices they will need as they advance, such as teamwork and, perhaps, pair programming and test first development. Moreover, to ease your own workload, a project course could be very flexible, with students starting work on early requirements while you develop later ones. I'm thinking of something like an agile methodology here, of course, with yourself as the students' &quot;customer&quot;. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Of course, if you want them to learn OO style and not just build code, then you need to watch over them. There are a few ways you can do this. I'm assuming that your class is reasonably sized (say 20 or less). I'm not sure how to make it work for 80. You can use the class time as design sessions for coding. You can have students work in groups for a while and show you what they come up with. Initially you can suggest designs for sections of the project. The idea is to &quot;nudge&quot; teams in the desired direction, rather than to lecture on the ideal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to teach the Compiler Course in which a goal was also to improve OO thinking. I would review the student's code every two weeks. Student pairs (or teams) would submit printouts in a folder every two weeks. They needed to use a highlight marker to mark the changes from the previous report. It is relatively quick to go through 10 or so folders if marked up. You don't need to note every detail in these, nor do you need to grade them, but just give any needed feedback. For many groups as check mark is enough. But for some, you know you need to provide more guidance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If teams are larger (say around 5-6) I would do two things. One is that I'd appoint a &quot;captain&quot; who was responsible for keeping me informed (not for team management). I could discuss the periodic report with him/her. Depending on the number of students, you could have a weekly &quot;captain's meeting&quot; as part of class or office hours, perhaps. I also named teams with names they though clever to give them a sense of belonging. &quot;Lions&quot; and &quot;Tigers&quot; might work, or &quot;Earth&quot; and &quot;Sky&quot;. I made up the names to avoid possible improper &quot;creativity.&quot; &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-13T14:41:26.967" LastActivityDate="2017-08-13T14:41:26.967" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3223" PostTypeId="1" CreationDate="2017-08-13T18:40:29.783" Score="10" ViewCount="218" Body="&lt;p&gt;Bootcamps have become an increasingly popular alternative for starting or transitioning to a career in tech over the past 5 years or so. As a result, a common question I get when interacting with beginners is whether bootcamps are indeed worth it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, after conducting some preliminary research myself, I found it challenging to find hard data that supports a conclusion either way. Most online sources (such as &lt;a href=&quot;https://www.coursereport.com/&quot; rel=&quot;noreferrer&quot;&gt;coursereport.com&lt;/a&gt;) seem very marketing-y and don't seem to analyze the more existential question of whether bootcamps are a good idea in the first place, compared to other options. And of course, there are plenty of anecdotes, but anecdotes are not data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Analyzing this situation is complicated by several other factors:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Bootcamps may be suitable for some, but not all: for example, professionals with an unrelated degree trying to &lt;em&gt;transition&lt;/em&gt; to tech vs high school graduates trying to &lt;em&gt;enter&lt;/em&gt; tech.&lt;/li&gt;&#xA;&lt;li&gt;The quality of individual bootcamps can vary wildly (but then again, I suspect, though cannot confirm, the quality of university CS degrees can also vary just as wildly).&lt;/li&gt;&#xA;&lt;li&gt;Bootcamps are incentivized to report skewed data. Even something as simple as &quot;% of people who graduate with a job&quot; can be complicated. (If the bootcamp hires you back as a TA, does that count? What if you get a job in a non-tech field? What if you get a job after a year of additional self-study?).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This brings me to my core question: &lt;strong&gt;What research has been conducted so far regarding how effective bootcamps are at helping their attendees obtain a full-time job in tech in a timely manner?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this question, we can assume that the bootcamp attendees are people who either have completed a degree in an unrelated major and want to switch careers, or are people who are unable to attend a university for one reason or another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An ideal answer would be links + summaries to reports that conduct a careful, measured, and data-driven analysis and seem to take into consideration factors like the ones I listed up above. I would prefer papers that have been accepted by a reputable, peer-reviewed academic journals or conferences if at all possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A nice bonus would be if the reports compared bootcamp success rates to other methods of switching careers (for example, getting a second degree or simply self-studying), but this isn't necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, here is &lt;a href=&quot;http://www.kylethayer.com/assets/papers/BarriersFacedByCodingBootcampStudents-Thayer-Ko.pdf&quot; rel=&quot;noreferrer&quot;&gt;one paper&lt;/a&gt; that satisfies the above requirements. It'll apparently be presented at the upcoming &lt;a href=&quot;https://icer.hosting.acm.org/icer-2017/schedule/&quot; rel=&quot;noreferrer&quot;&gt;ACM ICER conference&lt;/a&gt; later this month and draws some interesting conclusions -- the paper's main limitation is its relatively small datasize (it tracks only 26 students within a specific geographical location IIRC).&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-08-14T17:19:21.443" LastActivityDate="2017-09-19T14:43:25.103" Title="Independent research on bootcamp job placement claims" Tags="|resource-request|adult-education|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3224" PostTypeId="2" ParentId="3218" CreationDate="2017-08-13T21:34:52.437" Score="4" Body="&lt;p&gt;I don't know the answer to this but I do think there are a number of things to consider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, understand that education research - not CS specific - has an abysmal reputation. As far as I can tell, it's rarely reproduced or replicated while frequently being presented as the magic bullet and being as strong as having proven a math theorem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the best teachers I know hold Ed research in very low regards. Some of them have told me things like &quot;I tried what the experts and researchers said and it doesn't work for my students nearly as well as when I ______ so I just do my thing.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I don't think research is the answer. CS Ed research will eventually catch up to Ed research in general and I doubt, overall, it will be any better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of policy - just as in other ed, the connected and anointed will have the real say.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it matter? Probably not. Do your thing. Find your network. Share what you do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've created courses, worked with younger teachers, blog, and hopefully inspired and taught hundreds (thousands?) of kids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't advanced CS Education as a whole but I've done a whole lot of good in my little corner of the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Pete Seeger would often say quotinng Rene Dubos - &quot;Think global, act local.&quot;&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-08-13T21:34:52.437" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3225" PostTypeId="2" ParentId="3199" CreationDate="2017-08-14T12:12:26.853" Score="4" Body="&lt;p&gt;I wouldn't want to penalize kids who are really relatively inexperienced for not coming up with the fastest solutions on a test. Even if they're in 11th grade and have a couple of years under their belts, they likely haven't been in real situations where run time is important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were to want a specific run time on a test I'd say something like &quot;for full credit make sure your solution runs in $O(blah)$ time.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I give an open ended solutions and I don't specify any restrictions on run time, storage limitations, or data set size I tell the kids that I won't penalize them for efficiency unless it's so grossly horrible. For example, if they were to write a sort in their code (and I wouldn't really ask this but it makes for an easy example), I wouldn't penalize a kid for coding an $N^2$ sort even if we covered $n log(n)$ unless I talk about a large data set size. On the other hand if they sorted by say an $N^3$ solution or worse, they would lose some points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any event, if you're requiring certain run times you have to be careful that you're not just getting kids to memorize and spit back what the teacher expects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also remember that there are plenty of times where a simpler, slower algorithm is both clearer and more than sufficient and that complex fast code that doesn't work isn't nearly as good as simple code that does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To encourage creativity, give multi level assignments. Create lessons where you can have them develop a solution, see that it's too slow, and then refine it. I do that with finding the mode of a data set (&lt;a href=&quot;https://cestlaz.github.io/posts/2014-11-17-hidden-complexity.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cestlaz.github.io/posts/2014-11-17-hidden-complexity.html&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also create assignments that encourage this and make test data sets and situations that force kids to work on time efficiency issues.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="150" LastEditDate="2017-08-14T20:45:22.790" LastActivityDate="2017-08-14T20:45:22.790" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3226" PostTypeId="2" ParentId="3199" CreationDate="2017-08-14T14:32:35.257" Score="1" Body="&lt;p&gt;I recognize that this isn't exactly an answer to your question, but is a different way to think of the issue. I applaud the answer of &lt;a href=&quot;https://cseducators.stackexchange.com/a/3225/1293&quot;&gt;Mike Zamansky&lt;/a&gt; given here already, but suggest an orthogonal approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to get students to focus on efficiency is to ask them to name (or select from a list, perhaps) the efficiency of the solution they present and also possibly to reply whether it is the most efficient algorithm that they have studied. You can go further in an assignment and ask them to say why they think their solution is a good one even if not the most efficient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you teach sorting for this sort of thing, you, and likely your students, should be aware of this &lt;a href=&quot;https://users.cs.duke.edu/~ola/bubble/bubble.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;paper (pdf) by Owen Astrachan&lt;/a&gt; which says, among other things that Bubble Sort is never the best solution - either for simplicity or efficiency. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you ask for a discussion, in other words, you have more information on which to grade them than just looking at the algorithm itself. It also forces them to think deeper; generally a good thing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-14T14:32:35.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3227" PostTypeId="2" ParentId="3189" CreationDate="2017-08-14T18:00:33.830" Score="-1" Body="&lt;p&gt;Package this in a static method like so.  You are only really interested in whether the successor of a number has more digits than the number. This is clean and it avoids interface clutter.   It also keeps the intermediate variables local; unless you have a need, you do not want to expose them in your interface.  Note it is static since it is state-invariant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;&#xA;/**&lt;br&gt;&#xA;*   This &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt; method tells if an integer's successor has&lt;br&gt;&#xA;*   more digits than the integer.&#xA;*   @param n the integer you are checking&#xA;*   @return true if the integer &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;'s successor has more&#xA;*   digits than &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;.&#xA;*/&lt;br&gt;&#xA;public static boolean successorLonger(n)&#xA;{&#xA;    String nString = &quot;&quot; + n;&#xA;    String succString = &quot;&quot; + (n + 1);&#xA;    return nString.length() != succString.length();&#xA;}&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="204" LastEditDate="2017-08-15T17:06:55.723" LastActivityDate="2017-08-15T17:06:55.723" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3228" PostTypeId="1" CreationDate="2017-08-14T20:08:04.123" Score="17" ViewCount="1588" Body="&lt;p&gt;A common problem I've noticed many beginners (especially self-taught ones) run into is figuring out how to transition from working through tutorials and exercises to working on full-fledged projects. There seems to be almost a &quot;&lt;a href=&quot;http://www.vikingcodeschool.com/posts/why-learning-to-code-is-so-damn-hard&quot; rel=&quot;noreferrer&quot;&gt;cliff&lt;/a&gt;&quot; of sorts that many find challenging to scale for a variety of reasons (that are probably not worth enumerating here?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to make it over this &quot;cliff&quot; is to find a teacher that can help guide you through progressively more challenging projects. Of course, this isn't a path available to self-learners by definition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next best alternative is probably to find a tutorial or online course that does something similar. Unfortunately, these resources either appear to be hard to find or simply inadequate (?), based on my (anecdotal) experiences answering beginner questions on another forum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking all this into mind: &lt;strong&gt;What concrete advice would you give to self-learners who are struggling to transition to working on larger projects?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; To answer @BlackJack's question: by &quot;larger project&quot;, I mean a project that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Does not immediately follow from a tutorial or exercise: finishing the project requires a fair degree of independent work. &lt;/li&gt;&#xA;&lt;li&gt;Is &quot;large&quot; and &quot;challenging&quot; relative to the expectations and abilities of a beginner -- for example, it might take a beginner a few weeks to complete a &quot;large project&quot;, but an experienced programmer might be able to pull off the same thing in a weekend.&lt;/li&gt;&#xA;&lt;li&gt;Is not a &quot;single-file project&quot;: there are lots of things you need to do and lots of details to keep track of.&lt;/li&gt;&#xA;&lt;li&gt;At the very end of the scale, a &quot;large project&quot; might be the sort of thing an intern or an entry-level junior developer is asked to do. (Most beginners will probably likely need to complete multiple easier projects first before they're at this level, though.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Some examples of large projects for beginners:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Implementing an interpreter or compiler for a programming language&lt;/li&gt;&#xA;&lt;li&gt;Writing a video game (either a feature-rich prototype of a novel game, or a polished clone of some existing game)&lt;/li&gt;&#xA;&lt;li&gt;Writing a webapp or mobile app with a non-trivial frontend or backend (for example, implementing their own basic search engine)&lt;/li&gt;&#xA;&lt;li&gt;Rigging together some relatively complex automation using a few Arduinos/Raspberry Pis&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-08-15T17:48:53.463" LastActivityDate="2017-08-24T03:34:58.183" Title="Strategies for self-learners to transition into working on larger projects" Tags="|self-learning|project|" AnswerCount="7" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3229" PostTypeId="2" ParentId="3228" CreationDate="2017-08-14T20:58:00.243" Score="5" Body="&lt;h2&gt;Step 1: Think big&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The most important part is not to think &quot;this is too big&quot;. All big projects are, well, big. You need to find something you'd like to do. Sometimes just looking around, and thinking: &quot;I'll make a system that imitates &amp;lt;insert real life thing here&amp;gt;&quot; works great. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just make sure not to think too big. You'll know if it is too big in the next step (making it an iterative process until it succeeds):&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step 2: Break it into pieces&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that you have what you want to do: Search google to get an idea of where to start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better yet: think for yourself what such a project might incorporate and thus break it into pieces. Each piece is like small projects which you are used to from tutorials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have an idea of what are the separate parts of the larger picture, start working on them. Some might be disconnected parts (different pages if it's web related, for example), and so you can work on them separately, and when you get tired and\or stuck with some section, just switch to another one until this &quot;writing block&quot; (&lt;code&gt;;)&lt;/code&gt;) is over.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Step 3: Profit?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now that you have a work plan, remember to stick to your original project. I know that for myself, I ten to run away with myself when it comes to projects: I add things I didn't intend to at first, and make drastic changes. It eventually is not the project I thought of in step 1. This isn't very productive work if step 1 is done correctly&#xA;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-08-14T21:03:04.200" LastActivityDate="2017-08-14T21:03:04.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3230" PostTypeId="2" ParentId="3228" CreationDate="2017-08-14T20:58:01.777" Score="8" Body="&lt;p&gt;You have set a difficult task. The reason is that there are two dimensions here, not one. The first is that larger projects are usually built by teams and not by individuals. Certainly if you are interested in preparing for employment, then teamwork is essential. The second dimension, independent of the first is that larger projects are normally built to the vision and specification of someone other than its builders. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This leaves four cells in a grid. You probably already have experience building alone and to your own vision. This is the easy case. The hardest is building in a team to someone else's specification. You can get there immediately but it is very difficult to transition that way. Instead you can first move through one of the other cells. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You can find a team to work with you on some project of your own vision. You can, perhaps, find a description of such a project online or in a course description. You can also just try to replicate some software that you normally use that seems big to you. Build a spreadsheet program, for example. The hard part, however, is to find the team to work with. Note that the project need not be terribly large, but you will learn important large-project skills in any case. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;An alternate way is to move into the other cell. Build something yourself, but with another person specifying the program. This will be a lot harder than what you usually do, but is an essential step. One way to find the problem is to find the client. It could be a teacher with a need. It could be a local social service with a need. It could be anyone with a need. But you need to give complete control over &lt;em&gt;what&lt;/em&gt; is to be built over to the client, while you are creative only on the &lt;em&gt;how&lt;/em&gt; to do it. Again, the size of the project is less important than that you are learning how to work with a client. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Once you have some experience in one of the above, you will be ready to move to the externally specified-team built cell. But the experience in the simpler case may give you some insight into how to find the team and the client. Scaling at this point will be more reasonable than you think. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good Luck. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I should not that even in formal education, when a project is specified by a professor, it isn't quite the same as working for a client. The typical university project normally grants the student a large part of the design space. A true client will not. Normally the professor won't ask you to change direction in the middle of a project. A client might. A professor might grade you. A client might just reject your work or ask you to do it over. A university project is normally thought out completely in advance by the professor. A client may make it up as you go along. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-15T09:46:08.547" LastActivityDate="2017-08-15T09:46:08.547" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3231" PostTypeId="2" ParentId="3228" CreationDate="2017-08-14T23:04:00.840" Score="5" Body="&lt;p&gt;Bigger isn't better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that it's more accurate to say that novices have trouble working on projects that are &lt;strong&gt;useful and interesting in real life&lt;/strong&gt;, which is not necessarily the same thing as larger projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, a common trap that I've seen self-learners fall into is taking on projects that are too large! This leads to burnout, stagnation, and a bunch of unfinished projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a specific example, I see a lot of novice game developers get stuck thinking they need to develop a game engine. They'll spend months (or years!) working on the engine, without ever developing any games. What they should be doing is working &lt;strong&gt;incrementally&lt;/strong&gt; on smaller projects. Start with Pong, not with a game engine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, at the risk of &lt;a href=&quot;https://en.wikipedia.org/wiki/Mu_(negative)&quot; rel=&quot;noreferrer&quot;&gt;mu&lt;/a&gt;-ing your question, my answer is: &lt;strong&gt;don't work on larger projects.&lt;/strong&gt; Work on a small project, and get it &quot;shipped&quot; before starting the rest. Put a link to it on your online portfolio. If you don't have one, then your first small project can be building your online portfolio page! Put a bow on that code, and then start over on the next small project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you learn, you'll find that code you look back on looks pretty terrible. &lt;em&gt;&quot;Oh man, I was an idiot 6 months ago!&quot;&lt;/em&gt; &lt;strong&gt;This is a completely normal feeling&lt;/strong&gt;, and it's a sign of how much you're growing. But it also means that you don't want to spend a ton of time (more than a few weeks) building up a codebase, because you'll either have to rewrite it a bunch of times as you improve, or you'll be stuck building on crappy code. IMHO, it's much better to give yourself a blank slate pretty frequently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, the other half of this is &lt;strong&gt;finding projects that will be useful and interesting in real life&lt;/strong&gt; instead of all of the disconnected snippets you're used to writing from tutorials. This isn't an exact science, but I think the best thing you can do is &lt;strong&gt;incorporate your non-coding interests in your programming projects.&lt;/strong&gt; Here are some examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Have a dog? Build a website that shows pictures of your dog! Make it the best dog picture website in the world.&lt;/li&gt;&#xA;&lt;li&gt;Care about a social cause? Create a data visualization that highlights some issue that's important to you.&lt;/li&gt;&#xA;&lt;li&gt;Enjoy art? Create some digital art. Bonus points for getting it displayed in a local gallery.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The key is finding something that you're interested in outside of programming, thinking about how programming intersects with that, and then coming up with a &lt;strong&gt;small&lt;/strong&gt; project that you can complete and ship, even if &quot;shipping&quot; is just sharing a link to it on Twitter and your online portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Then move on to the next thing.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Repeat the process and come up with a new project. Start over, but bring any lessons you learned from your first project. Over time, your projects will &lt;strong&gt;naturally&lt;/strong&gt; get more complicated, but you should always make sure you're working on something that you can see through from start to finish. Don't stagnate on the same project for months at a time. Get something out the door, and move on.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-14T23:15:38.443" LastActivityDate="2017-08-14T23:15:38.443" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3232" PostTypeId="1" AcceptedAnswerId="3247" CreationDate="2017-08-15T06:34:27.693" Score="7" ViewCount="342" Body="&lt;p&gt;I assist in courses that provide mathematical background to computing science students. Every year, there are some who &quot;just don't get&quot; (in their words) concepts like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Rule_of_product&quot; rel=&quot;noreferrer&quot;&gt;rule of product&lt;/a&gt; or the corollary that there are $p^n$ options to choose $n$ times from $p$ options (e.g. colouring $n$ fields with $p$ colours, no restrictions). Are there some metaphors from programming that may help these students?&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2017-08-16T23:20:27.800" Title="How to explain combinatorical principles like the rule of product to students who &quot;just don't get it&quot;?" Tags="|teaching-analogy|mathematics|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3233" PostTypeId="2" ParentId="3232" CreationDate="2017-08-15T06:34:27.693" Score="2" Body="&lt;p&gt;Yes, there are. For the rule of product, one can use nested &lt;code&gt;for&lt;/code&gt; loops. For example, when one has to choose from 5 pairs of jeans and 7 shirts, you could use a loop like the following to list all the options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (Jeans j : jeans) {&#xA;    for (Shirt s : shirt) {&#xA;        print(j, s);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can then ask how often the inner loop loops and how often the outer one loops. The student then usually understands he should multiply to get the total number of printed pairs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not know of a programming analogy for the power case (ideas welcome), but as this is an extension of the rule of product it is usually explained rather easily: the $n=2$ case relates to the for loops above, so we would have $p\cdot p$. For $n=3$, we would add another loop, hence $p\cdot p\cdot p$. For $n=4$, we would get $p^4$, etc.&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2017-08-15T06:34:27.693" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3234" PostTypeId="2" ParentId="3232" CreationDate="2017-08-15T10:14:45.160" Score="1" Body="&lt;p&gt;I will cover “colouring n fields with p colours, no restrictions”, as the first part was covered by @Keelan.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Number bases&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are at least 2 special cases that they should already know: “How many values in an n bit binary number?”, and “How many values in an n digit denary number?”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask them to answer for specific examples e.g. 1 bit, 2 bit → 8 bit. Create a table. Then find a pattern, and generalise to write a formula [$2^n$]. Then add a column for base 10, and maybe base 8, and 16 (if they have done these, in CS class). Now get them to find a pattern again, and generalise [$b^n$ where $b$ is number base, and $n$ in number of bits]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then link this to non-numberbase, problems: generalise to colours.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-15T10:14:45.160" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3235" PostTypeId="2" ParentId="3228" CreationDate="2017-08-15T11:28:03.280" Score="0" Body="&lt;h2&gt;update&lt;/h2&gt;&#xA;&lt;p&gt;I completely misunderstood the question this answer is relevant only in the context of large complex projects, I'm not going to delete it but you can ignore it (if you are a moderator feel free to delete it).&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The only good advice you can give is that they have to work as programmers for at least a year.&lt;/p&gt;&#xA;&lt;p&gt;It doesn't matter if they are self taught or have a CS degree, this is not about knowledge and this is not something you can learn from a teacher. What they lack is technical proficiency, the only effective way to get it is to actually work 9 hours every day with more experienced people and learn from them on the job.&lt;/p&gt;&#xA;&lt;p&gt;You can of course reinvent the wheel and learn everything yourself, after all at some point in time there were no experienced programmers but it will take 10 times as much time and effort.&lt;/p&gt;&#xA;" OwnerUserId="2149" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-08-15T17:34:55.113" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3238" PostTypeId="2" ParentId="3218" CreationDate="2017-08-16T08:53:43.827" Score="0" Body="&lt;h2&gt;You should always be researching.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I am using research in a loose way here. Just as you should &lt;strong&gt;always&lt;/strong&gt; test the programs that you write, you should always test the lessons that you teach: Evaluate how you own lessons go. Then tell others about the good ones. And here is the hard part, to be un-bias, tell them about the bad ones, tell them what did not work.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Read and Promote&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;So much policy is based on a whim. Read research, check on the strength of the evidence (sample size, method, reproduced, statistical significance, effect size, etc) Then try it out, and promote it, as above, but also by sharing links to the evidence.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Evidence vs Emotion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Evidence is important, but people make decisions on emotion. They will first make the decision, and then try to back it up with evidence. Therefore after you have found some good research, write an article to promote it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of: “It has been shown that ???? is a good technique to engage your learners and improve out comes…”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Re-write it like this:“Do you want to make lessons more fun for you and your students, want to improve grades, and spend less time preparing lessons? Then we have something for you. ???? is …” see “Start with why” — Simon Sinek (&lt;a href=&quot;https://www.ted.com/talks/simon_sinek_how_great_leaders_inspire_action&quot; rel=&quot;nofollow noreferrer&quot;&gt;ted talk video&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-16T08:53:43.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3239" PostTypeId="2" ParentId="3189" CreationDate="2017-08-16T09:25:12.107" Score="3" Body="&lt;p&gt;I think the student's problem is not with types, but first with the &lt;strong&gt;parsing&lt;/strong&gt; of complex expressions (not to be confused with the &lt;strong&gt;tracing&lt;/strong&gt; of it's evaluation). Mentally building the abstract syntax tree from the linear text representation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First rewrite remove the extra parentheses at right, and introduce a line break&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (    (n+&quot;&quot;).length() &#xA;     == ((n+1)+&quot;&quot;).length()) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;to split the expression. It make clear you are comparing two lengths = ints.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second make it obvious that the 2 sides of the comparison have the same pattern&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if (    (n    +&quot;&quot;).length() &#xA;     == ((n+1)+&quot;&quot;).length()) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;a cosmetic change which drastically reduces the problem space : there's a hope that if we can figure what happens at the left for n, we'll understand the right part too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's left is producing a string from an int. Not the best way (what about &lt;code&gt;Integer.toString&lt;/code&gt; ?) but anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, only one typecast is involved, twice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/d7m4h.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/d7m4h.png&quot; alt=&quot;abstract tree&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for &quot;writing code he can't understand later&quot;, it'a common symptom. The  problem is not he cannot understand it, but that he wrote too complex code in the first place. Beginners always overestimate their cognition abilities. And they are reluctant to decomposition because it requires an effort to clearly identify a sub-task (and find a nice name for it !) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remedies : insist on &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;using auxiliary variables&lt;/li&gt;&#xA;&lt;li&gt;define and use of &quot;helper&quot; functions, predicates.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-08-16T10:23:42.217" LastActivityDate="2017-08-16T10:23:42.217" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3240" PostTypeId="2" ParentId="3228" CreationDate="2017-08-16T15:23:08.963" Score="7" Body="&lt;p&gt;Having experienced this cliff myself, I'd give several pointers:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start by independently solving smaller problems. The Euler problems are great for this. &lt;/li&gt;&#xA;&lt;li&gt;Set specific goals for what the program must do. Then you know what needs to be done, exactly. Much like requirements in the &quot;real world&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Break the overall project into chunks, considering the requirements. I.e., if the project is a video game that requires a GUI, chunk one might be figuring out how the heck to create a GUI.&lt;/li&gt;&#xA;&lt;li&gt;Choose a project appropriate for your experience level, but also don't be afraid to plunge in. There's a balance here.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Never, ever, &lt;strong&gt;ever&lt;/em&gt;&lt;/strong&gt; feel like using Google/Stack Overflow is cheating. It isn't, or if it is, cheat away.&lt;/li&gt;&#xA;&lt;li&gt;Have a cheerleader! For me, I can sometimes talk about what I'm doing to my mom, and she'll be like, &quot;Yeah, that sounds great!&quot; And occasionally, this bonuses as &quot;I'm working on this problem - see, &lt;em&gt;::explanation::&lt;/em&gt; oh duh, that's what's wrong!&quot; &lt;em&gt;::races back to computer::&lt;/em&gt; That has happened to me quite a few times.&lt;/li&gt;&#xA;&lt;li&gt;Work at it consistently, but try not to get burned out. Staying up really late is a no. Working on it for several hours at a normal human time is a yes.&lt;/li&gt;&#xA;&lt;li&gt;Comment your gosh-darned code!!!! I learned this the really hard way, many times.&lt;/li&gt;&#xA;&lt;li&gt;Learn to use Github.&lt;/li&gt;&#xA;&lt;li&gt;Last one I can think of right now - set up your programming space in a comfortable way, then you'll actually enjoy working on it. Right now, I have a nice setup where I can plug a bigger keyboard and mouse into my chromebook, and we also had a monitor in the house that commandeered, and I set up the chromebook so it dual-boots Linux awhile ago. I installed all the various packages I use (numpy, scipy, etc) and programs (IDLE, git, etc). Basically, make it so when you start coding, you can actually just code.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-08-16T15:23:08.963" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3241" PostTypeId="1" AcceptedAnswerId="3243" CreationDate="2017-08-16T17:17:27.503" Score="7" ViewCount="330" Body="&lt;p&gt;I was recently reading a really good article on this topic, and I realize that it could be a very good &lt;strong&gt;added value&lt;/strong&gt; for students to understand better and appreciate (and eventually &lt;strong&gt;put in practice&lt;/strong&gt;) all the theory that is behind Algorithm Complexity&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;. Certainly, not everyone will apply this in the future, since the most efficient way to solve a problem is not always required (although it should be). I think more people should be interested in this, since it has benefits in various ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To understand my question a little bit better, I want to give an example of my own personal experience. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;From the very first moment I learned about Trees and Binary Trees (a&#xA;  long time ago), I don't know why, I hate them. I never thought about&#xA;  them like a solution to the many problems I had to face and resolve.&#xA;  Some time ago, I was told to recreate from scratch the Shannon–Fano&#xA;  encoding as an exercise. I enjoyed that so much! And of course, for&#xA;  that encoding, everything is based on trees. It was at that point that&#xA;  I was more interested in trees, how they work and their functionality&#xA;  to solve real life problems.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, in the &lt;strong&gt;same way&lt;/strong&gt; the Shannon–Fano coding help me to understand better and made me want to go deeper in the tree's data structure theory, I'm asking for good motivating examples that might help others understand and want to learn more about Algorithm Complexity.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; Just to clarify, when I say Algorithm Complexity, I'm talking about all the theory and techniques that are available to know how efficient an algorithm is, and to compare that information with other results, thus leading to the most efficient way to solve a problem.&lt;/p&gt;&#xA;" OwnerUserId="2480" LastEditorUserId="27" LastEditDate="2017-08-16T17:53:03.793" LastActivityDate="2017-09-06T14:21:55.890" Title="Good, Motivating Examples for Algorithmic Complexity" Tags="|lesson-ideas|best-practice|teaching-analogy|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3242" PostTypeId="2" ParentId="3241" CreationDate="2017-08-16T17:50:36.793" Score="0" Body="&lt;h2&gt;How badly written software can undo 120 years of computer hardware improvements.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;First blow their minds with Moore's law: 120 years of progress from mechanical devices to the present day, there has been a $2^{60}$ improvement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then show them how easy it is to lose all of this hard won, performance, improvement (in the hardware), by using poor software algorithms:&#xA;If we are searching through a sorted list of $2^{30} \approx 10^9$ nodes, using liner search ($O(n)$), then we have the performance of $60$ year old computer, doing it the smart way (binary search($O(log n)$)). Even $2^{20} \approx 10^6$ nodes, is $40$ years of progress lost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore if we want to see the benefit of hardware improvement, we need to not waste it. Also Moore's law will come to an end soon (as is true for all exponential growth. It is also true that most people will deny this, citing that it has not happened yet as evidence, until a short time after it happens).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="150" LastEditDate="2017-09-06T14:21:55.890" LastActivityDate="2017-09-06T14:21:55.890" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3243" PostTypeId="2" ParentId="3241" CreationDate="2017-08-16T18:59:18.597" Score="11" Body="&lt;p&gt;I attack this problem with three &quot;visits&quot; over the course of two years with my students&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;At our first brush with Complexity, I don't spend a ton of time motivating the study of it.  I introduce the notations of $\Omega$, $\Theta$, and $O$ (as well as briefly touching upon $\omega$, $\theta$, and $o$).  I show the difference between linear and binary search, and then explore four sorting algorithms: bubble, selection, insertion, and bogosort.  (This is fairly early on in the curriculum, and we haven't dealt with recursion yet, so I skip out on quicksort and mergesort.)  The last one makes them laugh, and makes the material at least have a point: some algorithms are just worse than others.&lt;/li&gt;&#xA;&lt;li&gt;Later in the year, we look at quicksort and mergesort.  At this point, again, we use this only as a chance to review the concepts and the notation.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Near the beginning of the second year, I talk about why algorithmic study matters.  Computers get insanely faster over time, right?  (See Richard's answer for some eyebrow-raising numbers).  Since our computers are getting faster, it only stands to reason that things that are slow to compute today will also just get faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;Au contraire!&quot;&lt;/em&gt; I cry, &lt;em&gt;&quot;as our computers get faster, our algorithms are getting&lt;/em&gt; &lt;strong&gt;&lt;em&gt;slower&lt;/em&gt;&lt;/strong&gt;, &lt;em&gt;you see!&quot;&lt;/em&gt;  What do I mean by this outrageous claim?  As our computers get faster, our hard drives also get bigger.  By necessity, we perform calculations with larger and larger data sets.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, let's use high-end rendering as an example.  In 1980, Apple came out with the &lt;strong&gt;Apple III&lt;/strong&gt; computer, which shipped with a whopping &lt;strong&gt;5 megabytes&lt;/strong&gt; of diskspace.  It also used the 6502B processor.  It could perform about 0.43 million instructions per second (MIPS).  Today, hard drives come in at about 6 gigabytes, and 305 billion instructions per second.  My numbers don't have to be exact to make this work, though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we processed a complex graphic that took about .5% of our hard drive using a $O(n^3)$ algorithm in 1980, that would be about 2,500 bytes of data, and it would take us roughly 9.25 years to complete.  That's awful!!  But if we did that today, (roughly 30 megabytes and 305 billion computations per second), it would take us over &lt;strong&gt;28 thousand years&lt;/strong&gt; to complete.  We're trending the wrong way!  The problem is that, even at a relatively cheap function like $O(n^3)$, the growth due to data creep is just far faster than Moore's Law.  &lt;em&gt;Faster computers can't deal with correspondingly bigger problems if the $O$ sucks.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Finally, a few weeks later, I talk in grand, futuristic terms about the Big Picture.  This is more to excite their curiosity than anything else. The three drivers of possibility with computers are, I argue, smaller transistors, better battery life, and better algorithms.  If you take a $O(n^3)$ algorithm and find a way to accomplish a similar task in $n^2$ time, that's a foundational enabler.  You don't become individually famous, but you change the world.  The Google Maps team didn't solve the Traveling Salesman problem, they developed algorithms that could get likely best answers without the guarantee.  The bottom line is that developing algorithms with better complexity literally enables us to do new things on practical timescales.  To paraphrase &lt;strong&gt;Heroes&lt;/strong&gt;, &lt;em&gt;change the algorithm, change the world.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-17T10:58:42.757" LastActivityDate="2017-08-17T10:58:42.757" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3244" PostTypeId="1" AcceptedAnswerId="3246" CreationDate="2017-08-16T19:21:01.113" Score="3" ViewCount="158" Body="&lt;p&gt;I work in a startup where each week, a member of the team does a short presentation (30-60 min) on a subject in front of the others. It is a very informal and relaxed session, but now it is my turn and as an intern, I feel concerned about being boring and failing to show my colleagues the interesting features of the subject I picked, which is the programming language Scala. They are all familiar with Java (on which Scala is based) but probably not with functional programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, here is my question: How should I do my presentation to actually entertain them and have them learn some useful bits ?&#xA;For instance, which kind of &quot;live&quot; examples / exercises could be interesting to demonstrate the particularities of the language?&lt;/p&gt;&#xA;" OwnerDisplayName="user2589" LastEditorUserId="58" LastEditDate="2017-08-17T00:26:03.567" LastActivityDate="2017-08-17T00:26:03.567" Title="How to introduce Scala to a team of Java developers without being boring?" Tags="|introductory-lesson|functional-programming|adult-education|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3245" PostTypeId="2" ParentId="3244" CreationDate="2017-08-16T19:46:17.897" Score="2" Body="&lt;p&gt;I'd start with something useful that takes yards of code in Java and only a few lines in Scala (assuming there are such things).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After two or three examples like this, you'll have hooked your audience. Move into a compare/contrast of language features. Talk about what's easier in Scala. For fairness, talk about what's easier in Java. Then move to how/whether you might adopt Scala in your workplace - or why it wouldn't be practical now but under what circumstances it might be.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2017-08-16T19:46:17.897" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3246" PostTypeId="2" ParentId="3244" CreationDate="2017-08-16T20:35:14.570" Score="2" Body="&lt;p&gt;Just a couple of ideas here for an &lt;em&gt;easy&lt;/em&gt; intro to Scala, though not very deep. Note that there is an online &lt;a href=&quot;http://javatoscala.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java to Scala&lt;/a&gt; converter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first idea is to translate (offline) something you are currently doing in Java into Scala and show it to them. The converter will make this trivial. They are already familiar with the code's structure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second idea, assuming that you are doing something like Swing, is to use anonymous functions (lambda expressions) as listeners in some code your colleagues are already familiar with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third is to use the fact that Scala does an even better job than Java 8 at pattern matching for typing functions. You could show them something that uses, say Consumers or BiConsumers and matches by structure rather than type names. Of course, you can already do this in modern Java too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the above ideas build familiarity without inducing much confusion. The ideas are all in Java, but the syntax is a bit different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, if you have time and know the language well enough, you could develop some simple class from your own app in Scala directly, using pair programming. All you would need to do is get started, so if you run out of time things should still be fine. Here you can introduce a few things that are not the same as in Java. The earlier steps should ease the path to this step. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-16T20:35:14.570" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3247" PostTypeId="2" ParentId="3232" CreationDate="2017-08-16T23:20:27.800" Score="0" Body="&lt;p&gt;This doesn't call for a metaphor from programming. It's rather the opposite, you get it for programming applications such as the number of times through a nested loop because you get the math.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the product rule, there's a pretty natural geometric presentation. If there are $p$ choices for A and $q$ choices for B, place the choices for A in rows and the choices for B in columns:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$\begin{array}{c|c|c|c|c|}&#xA; &amp;amp; B=1 &amp;amp; B=2 &amp;amp; \ldots &amp;amp; B=q \\ \hline&#xA;A=1 &amp;amp;  *  &amp;amp;  *  &amp;amp; \ldots &amp;amp;  *  \\ \hline&#xA;A=2 &amp;amp;  *  &amp;amp;  *  &amp;amp; \ldots &amp;amp;  *  \\ \hline&#xA;\vdots &amp;amp; \vdots &amp;amp; \vdots &amp;amp; \ddots &amp;amp; \vdots \\ \hline&#xA;A=q &amp;amp;  *  &amp;amp;  *  &amp;amp; \ldots &amp;amp;  *  \\ \hline&#xA;\end{array}$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are $p \times q$ stars in that table. You might relate this to the area of a rectangle. Make sure you draw all the cells as identically-sized squares (unlike my figure above!), say that the length of the side of the square is the length unit, then the total area not including the labels is the number of cells and that's $p \times q$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the special case where $p = q$, you get $p^2$. If you add a third choice that also has $p$ possibilities, you can still present it visually as a 3-dimensional model, although it's harder and you can expect some students to have a hard time. Show how three choices with $p$, $q$ and $r$ possibilities respectively give you a total of $p \times q \times r$ possibilities. With the same number of possibilities $p$ for each choice, you get $p^3$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The numbers increase pretty fast, so it soon becomes unwieldy to count them all. Now is a good opportunity to demonstrate how to go from the two-choice case (two dimensions) to the three-choice case (three dimensions). When you add another dimension of length $r$ to $p \times q$, the number of choices is multiplied by $r$. When you add another dimension of length $r$ to $p \times p$, the number of choices is multiplied by $p$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point you've discreetly planted the seed of the idea of recursion. “When you add another dimension, …” — that's the induction step. Each time you add a new dimension, with $p$ choices in each dimension, the total number of choices is multiplied by $p$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are $p^2$ choices with $2$ dimensions, $p^3$ choices with $3$ dimensions. Oh and by the way there are $p$ choices with $1$ dimension, and $p = p^1$. $1 \mapsto p^1$, $2 \mapsto p^2$, $3 \mapsto p^3$, can you see a pattern? (You may or may not mention $p^0$ at this point, depending on whether you think students will get it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the formula corresponds to the induction pattern: $p^{n+1} = p^n \times p$.&lt;/p&gt;&#xA;" OwnerUserId="124" LastActivityDate="2017-08-16T23:20:27.800" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3248" PostTypeId="1" CreationDate="2017-08-17T04:08:22.813" Score="7" ViewCount="283" Body="&lt;p&gt;Suppose I've assigned a project and asked students to pair into two-person teams. I'd like each team to pair-program: work together in person to complete the assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students will do this, but sometimes they don't: either one partner monopolizes the work (which hurts the other partner) or the two partners split up the work and work independently (so both students end up having gaps in their knowledge).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to avoid this as much as possible, which brings me to my core question: &lt;strong&gt;what can I do to encourage as many students as possible to (effectively) pair program?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I read &lt;a href=&quot;https://cseducators.stackexchange.com/q/1383/732&quot;&gt;this post&lt;/a&gt;, which included a several nuggets of useful advice, but am interested in collecting more, if possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I plan to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Allocate time to promote pair programming in lecture&lt;/li&gt;&#xA;&lt;li&gt;Let students chose their own groups + provide an (optional) survey to help pair students&lt;/li&gt;&#xA;&lt;li&gt;Let students petition to work individually if they really want to&lt;/li&gt;&#xA;&lt;li&gt;Skew the projects towards the difficult side to try and get them to at least talk to each other (and provide plenty of office hours as a safety net)&lt;/li&gt;&#xA;&lt;li&gt;Collect partner feedback at the end and factor that into their final grades&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have no idea how effective these policies will be, though. I'd welcome both suggestions for encouraging pair programming in general as well as feedback on these specific ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this is for a university-level class, and that due to time constraints, all homework needs to be done outside of the classroom (so I can't watch them pair program and offer suggestions or really enforce anything).&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-17T12:05:38.773" Title="Techniques for encouraging pair programming" Tags="|undergraduate|project|pair-programming|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3249" PostTypeId="2" ParentId="3228" CreationDate="2017-08-17T09:44:10.567" Score="5" Body="&lt;h1&gt;1. Perseverance and determination&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This was, without a doubt, the key to my success as a self-learner. You need to see obstacles as a challenge, not as a threat. With each project, prove that you can achieve something beyond what you've achieved before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost any project is doable if you are flexible about the details. (For example, going 2D instead of 3D.) So instead of thinking &quot;I can't&quot;, think &quot;How can I?&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having confidence in yourself is important. You can't plan how you will approach a problem if you don't have confidence in your ability to complete tasks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perseverance and determination should come before other considerations like wanting to &quot;do it the right way&quot; and being &quot;neat and tidy&quot;. Those things are important but not nearly as important as setting yourself a large challenge and succeeding.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;2. Use what you know (and be ready to learn more)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Choose projects that build on your existing skills. It's enough of a &quot;cliff&quot; to transition from following tutorials into doing your own project. For example, if you have followed a tutorial on sprite graphics, make a game involving sprite graphics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you are trying to solve a problem, use tools you already know how to use, if you can. Even if this is not a great way to do it, it makes it much more accessible, and once you're done, other approaches will make much more sense to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, be ready to learn something new if you need to. Be curious.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;3. Ask yourself questions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is particularly important when you get stuck, or are trying to create a plan or structure for your project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you want to make a game and have no idea where to begin, ask yourself basic questions like &quot;What language will I use?&quot;, &quot;How will the player interact with the game?&quot;, &quot;What parts do I feel confident/unconfident about?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can't answer these questions, ask yourself what you could do to find some answers. If you can answer the questions, think about the answers and try to ask yourself further questions. For instance, if the player interacts with the game using the mouse, you can ask what features your programming language has to be told what the mouse is doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It helps to write your questions and answers down. Forcing yourself to put vague ideas into actual words helps clarify your thinking about them.&lt;/p&gt;&#xA;" OwnerUserId="2592" LastActivityDate="2017-08-17T09:44:10.567" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3250" PostTypeId="2" ParentId="3248" CreationDate="2017-08-17T10:55:25.017" Score="2" Body="&lt;p&gt;Having them do it for homework, and pair program is a big ask. However here is some of my experience with pair programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While working as part of a software team, we tried to introduce pair programming, but got lots of resistance, even from the evangelists (no one had done it before, but it seemed like a good idea).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What worked&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Pairing with someone that had done it before: At one point we had a contractor that had done pair programming before, when I worked with him, I did pair programming. This experience showed me that it could work. The only people, that are available and have done it before are the year above. A good way to lean is to teach. Therefore pair students with someone from the year above. This way the student in the lower year learns to pair program, and the one in the upper year learns by helping. [You need some intensive to stop the upper year student doing too much work. There is also a bootstrap problem.]&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We had read that it takes sometime before pair programming pays off (2 weeks of full time programming, if I remember correctly). We kept giving up on pair programming during this investment phase. However we did discover that if the task is sufficiently hard, then the pay off was immediate. These were problems where we both had enough language experience, the problem was well defined, but nether of us knew how to solve the problem. e.g. setting up the MMU on an ARM processor. One of us knew what they wanted it to do. The other knew what an MMU does, but nether had ever set one up before. Therefore once they have learnt to program, give them a task that would be very difficult to do on there own, and get them to pair it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Non programming activities: for various design tasks (algorithms and higher level than code), we worked in pairs or small teams (2,3 sometimes as many as 5). This worked well for tasks that are hard. Therefore start pairing with non-programming tasks.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-17T10:55:25.017" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3251" PostTypeId="2" ParentId="3248" CreationDate="2017-08-17T12:05:38.773" Score="2" Body="&lt;p&gt;I find it difficult to predict success with the setup you describe. There are too many forces working against you. If your students are all residential and/or do most of their programming in labs that you provide then success might be possible, but otherwise, not likely. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students resist pairing and don't really know how to do it effectively. They don't understand what benefits it has until they see it work for themselves. They are unlikely to actually do it outside your view. &lt;/li&gt;&#xA;&lt;li&gt;Students find it difficult to find the time in their schedule to actually work together at one screen. Remote pairing tools are available, but not great, and probably work only for those already committed and experienced. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Making the project harder isn't really going to help you and it will frustrate at least some of your students. Letting them choose their own partners will encourage nothing new as they likely do some of that already but without real pairing. Also, letting them choose pairs doesn't get the real benefit of switching pairs and thereby spreading knowledge. Things happen outside your view, as you say. They will do as they wish and tell you what they think you want to hear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lecturing about pairing is especially ineffective. You have to show it and you have to let them experience it. Letting them opt-out gives you and them nothing at all. The people who want to work alone probably need the experience of working with someone else at least as much as the others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Collecting feedback is, to me, the best part of your plan. But you should do that for all projects anyway. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I would do something like the following, though it will disrupt your class for a week. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Decide how many teams you should have so that there are 4-6 members per team. You choose the team captains. If the students don't know one another, then assign teams randomly. I used a deck of (handmade) cards with team names. People pick a card. That is their team. If they do know one another then &quot;sandlot baseball&quot; team choosing works well. In rotation, each captain picks their next team member from the remaining students in the class. This assures that there is a mix of abilities on each team and that teammates are &quot;sort of&quot; friendly without overemphasizing tribes and clans. Team &quot;captains&quot; have no management role. You can ask them to provide you feedback on how the team is doing and what it needs for success, but their job is not to tell people what to do. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Decide that you will spend a week of class time on pairing and kickstarting the project. Use a flipped classroom style for that week so that students read at home but work during class time. Other than reading there are no assignments during that week. You can spend a short amount of time at the &lt;em&gt;end&lt;/em&gt; of each class period asking about questions on the reading. Don't start with this, though, or you won't know when to stop. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The first hour (or so) of the week in question is a demonstration, in which you and one of your students (maybe a captain), pair on the project itself. I would also incorporate test-first programming into this demonstration. Write no code until you have a failing test. Switch roles with your &quot;partner&quot;. Switch partners also. Distribute any code you build to the class at the end so that they have a starting point. No code is written by any individual. Ever. For any reason. Just Say No. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you really want the students to do this, there is one more aspect of agile development that you should adopt. Rather than having the students work from an overall narrative that informally specifies the project, or a formal specification that does so explicitly, give them the project as a &quot;project backlog&quot; (Scrum terminology). This is a list of cards that you have written that lay out the features of the project, one feature per card. The features are incompletely specified so you will need, as the project proceeds, to answer questions about what you really want. Each week you select a subset of the backlog for development that week. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The student teams work in the classroom, not at home for that entire week. Work hard on giving them feedback both on their product, but also on their process, as the week goes on. After one week you can probably turn them loose, but it would be good if you can supply them with a place in which they can continue to work as if they were in class, with the whole team (4-6) people there simultaneously. A cafeteria might work, but not a library unless it has work rooms used for small group discussion. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is very useful if you can provide the class with an always-on communication channel in which they can always ask for and get help. This needs to be more than just email to/from you. A chatroom or a wiki works. So does an email distribution list to which everyone in the class can contribute. This makes the course 24 by 7, of course and you need to be available to give feedback. But the students should themselves feel empowered to answer questions that appear on the list. I didn't try to keep the teams from communicating with each other, even though the teams were working on the same project. Teams &quot;copying&quot; from one another was never an issue since information was basically free. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Note that I've used this successfully. Pairing, test-first, product backlogs, and small teams is a synergistic whole. But they need &lt;em&gt;supervised&lt;/em&gt; practice or they won't see its benefit nor give it a fair trial. They also need a place and time to work together that won't disrupt their otherwise busy schedules. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, make process feedback an important part of the project. You can ask for this to be given live or in writing. I found it useful to provide an anonymous feedback channel so that I could learn things that students wouldn't otherwise say. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-17T12:05:38.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3252" PostTypeId="1" AcceptedAnswerId="3264" CreationDate="2017-08-17T14:44:04.900" Score="4" ViewCount="379" Body="&lt;p&gt;It is now very easy to plop together some visual User Interface controls on to a form and hook them to events. In Microsoft Windows, there are a staggering number of properties and events available for controlling all aspects of a GUI. While simple apps can be created in moments, more complex ones involving enabling / disabling sets of controls, etc., can be fraught with unexpected complexity and paradox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some good initial projects for working with &lt;em&gt;just the UI aspects&lt;/em&gt; of a design? Ignore all the details of what the events will actually &lt;em&gt;do&lt;/em&gt;, and get the user interaction working, to do some nontrivial things? We are currently using as our textbook &quot;C# Programming&quot; by Doyle, and the Windows GUI section is chapters 9 and 10. The examples in chapter 9 had some poor practices (while loop inside a button click event handler?) which might be improved on, perhaps with the more detailed information in chapter 10, which covers input controls such as textboxes, radio buttons, checkboxes and listboxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One example I created was of a simple method for students to &quot;clock in and out&quot; of the classroom sessions (as part of workplace readiness training). It looks bone-simple: a little box with their Windows Domain Name, two radio buttons for IN and OUT actions, and a few read-only textboxes that display accumulated time for the day and week. (It connects to a database on a server). I wanted the interface to behave &quot;a little strangely&quot;:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Neither radio button would be checked when the program starts&lt;/li&gt;&#xA;&lt;li&gt;Attempting to clock IN outside of time bounds would show OUT&lt;/li&gt;&#xA;&lt;li&gt;A database access failure shows NO radio buttons checked&lt;/li&gt;&#xA;&lt;li&gt;The app becomes 'topmost' at the start and end of each time period&lt;/li&gt;&#xA;&lt;li&gt;It stops being topmost when the user interacts with it&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This takes some interesting code and unusual settings at design time, yet it creates an ideal interface to allow the desired functionality and nothing undesirable. It could not be simpler. What other examples of Windowing interface situations would make for concise, understandable and broadly applicable exercises? How can the students learn the pitfalls of event-driven interfaces without having to master them entirely? In particular, what does not make sense in an event-driven scenario?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-18T16:11:39.347" LastActivityDate="2017-08-20T16:49:17.743" Title="Exercises for teaching GUI / Windows interaction basics" Tags="|resource-request|windows|gui|c#|.net|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3254" PostTypeId="2" ParentId="3252" CreationDate="2017-08-17T16:06:39.477" Score="1" Body="&lt;p&gt;I was today thinking of creating a UI heavy program. It would be some sort of &lt;strong&gt;logic game&lt;/strong&gt;. A possible 1st GUI program could be lights-out. It is mostly GUI, with a little logic ( as a bonus you could explore how to do the logic, &lt;code&gt;XOR&lt;/code&gt;, selection, modulo 2 …)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could first model this with cards. Pupils should see that automation would make this easier. But first they should try to create a set of rules. After they have worked out the rules, they can start to create a program. Initial scenarios could be “toggle light if pressed”, “toggle light if button to left is pressed” …&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/BWNFX.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/BWNFX.png&quot; alt=&quot;4 frame lights-out game example, taken from wikipedia&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I have not tried this yet with a class.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-17T16:06:39.477" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3255" PostTypeId="2" ParentId="3199" CreationDate="2017-08-17T16:36:16.500" Score="0" Body="&lt;p&gt;The first step is to mention what the computational complexity of the best solution is so that students will know to look for an algorithm with that efficiency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to consider a minimum efficiency requirement as an explicit requirement for the assignment (e.g. &quot;must be more efficient than brute force&quot;, &quot;must be $O(n^2)$ or less&quot;, etc.), especially since brute force solutions may reduce the educational value of the assignment in the first place because brute force solutions are often much easier to come up with than efficient solutions. Consider by way of example the &lt;a href=&quot;https://projecteuler.net/archives&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler problems&lt;/a&gt;, many of which are relatively easy to brute-force. The entire point of these questions is to come up with something &lt;em&gt;better&lt;/em&gt; than brute force - there's little to no learning value in brute force.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, some questions are simply not feasible to solve with brute force in the first place. For example, the &lt;a href=&quot;https://projecteuler.net/problem=67&quot; rel=&quot;nofollow noreferrer&quot;&gt;description of problem 67&lt;/a&gt; says that &quot;It is not possible to try every route to solve this problem, as there are $2^{99}$ altogether! If you could check one trillion (1012) routes every second it would take over twenty billion years to check them all. There is an efficient algorithm to solve it.&quot; It turns out that you'll often encounter problems like this in actual programming: consider what would happen if Google's search engine relied on brute force, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So really, specific performance, efficiency, or scalability requirements are often intrinsic to the problem itself, both in educational settings and in actual engineering - if you didn't solve the problem in a way that meets those requirements, it's quite possible that you didn't really solve the problem at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond that, you may want to offer extra points to students who have better solutions (e.g. &quot;solutions must be $O(n^2)$ or better to be considered complete, but you get extra points if you can make your solution $O(n log n)$).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; All assignments have requirements, so why not just make minimum efficiency requirements one of the requirements and then give extra points to people who exceed the minimum?&lt;/p&gt;&#xA;" OwnerUserId="1299" LastActivityDate="2017-08-17T16:36:16.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3256" PostTypeId="1" CreationDate="2017-08-18T13:41:51.043" Score="5" ViewCount="217" Body="&lt;p&gt;I'm currently reading a book, &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1940113059&quot; rel=&quot;noreferrer&quot;&gt;Polymorphism: As It Is Played&lt;/a&gt;, which has introduced me to several new instructional ideas.  I am particularly intrigued by Pair Programming, which seems like it could benefit everyone.  However, if I simply describe the idea and tell my high school students to &lt;em&gt;go,&lt;/em&gt; I feel like there is a very good chance that it won't really take.  The Navigators might not remain fully engaged, or the kids who are more advanced might just take over the Driver position and not bother to explain what is going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How, then, can I handle the introduction?  What are the pivotal ideas that can enable my students to use this tool effectively?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I understand that a similar question has been asked &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3248/techniques-for-encouraging-pair-programming/3251#3251&quot;&gt;here&lt;/a&gt;, but my question comes from the perspective of a teacher who is far less familiar with the source material, has never used it in a classroom, and is specifically about the introductory lesson.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-08-18T14:34:46.457" LastActivityDate="2017-08-22T12:13:25.293" Title="Introducing Pair Programming" Tags="|introductory-lesson|pair-programming|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3257" PostTypeId="2" ParentId="3256" CreationDate="2017-08-18T14:03:36.543" Score="1" Body="&lt;p&gt;You have to be strict with the rules you set up and monitor the students carefully until it becomes a habit for them.  For instance, if you decide that you want the pair to switch roles every 15 minutes, you could ring a bell or have some other signal for the students to pass the keyboard over, switch seats, or whatever else they would need to do change positions.  Knowing that they will have to switch when they hear the signal will help combat switch resistance.  I have no experience working asking students to engage in pair programming activities outside of my classroom so I can't speak to that.&lt;/p&gt;&#xA;" OwnerUserId="2145" LastEditorUserId="2145" LastEditDate="2017-08-19T00:34:57.460" LastActivityDate="2017-08-19T00:34:57.460" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3258" PostTypeId="2" ParentId="3256" CreationDate="2017-08-18T14:33:03.290" Score="3" Body="&lt;p&gt;If you haven't used Pair Programming (PP) before but want to introduce it, there are two additional books you should read for background. They aren't textbooks for your class, but put PP into context. &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0321278658&quot; rel=&quot;nofollow noreferrer&quot;&gt;Extreme Programming Explained&lt;/a&gt; gives the complete context of PP in the agile development process. Pair Programming is one of the &quot;small scale&quot; practices of  Agile Development - a personal practice, that is used in most agile methodologies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second book &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/0201745763&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pair Programming Illuminated&lt;/a&gt; focuses more on PP itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since students may do much of their work outside your view, they need to be convinced that it gives them something or they won't use it. The alternatives seem too enticing to them (e.g. splitting the work...). So the classroom demo suggested here (points 3 and 4) is probably necessary: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3248/techniques-for-encouraging-pair-programming/3251#3251&quot;&gt;Techniques for encouraging pair programming&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that they already have programming habits and they will fall back on those in a pinch unless they see a compelling reason to do something different and develop new habits. The classroom demo can help with that. But you have to play navigator yourself, not just driver, in your demo. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wisdom of the profession on PP is that the driver takes a microscopic view of the project at hand. If the navigator is behaving correctly he/she will take a broader view, thinking about how what the driver is doing fits into the whole of the app being developed. When you work alone you only get the micro view, which often enough leads you astray. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The navigator is &lt;em&gt;not&lt;/em&gt; just an after the fact reviewer, but an active participant. That takes practice. This is the key to making PP productive. You have two minds on the problem and each has a slightly different perspective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another advantage is that single programmers often get stuck and have to think for a while about how to proceed. But two programmers seldom get stuck at exactly the same point. That is the time to switch roles. The navigator notices a change in the pace and, perhaps, takes over the driver role for a while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a picture in my head of 10 programmers, each working alone in a cubicle, and each stuck on something, making no progress, but the person in the next cubicle having the key to continue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another good practice, if you are always using test first programming (TDD = Test Driven Development) is that one person writes a test, which fails. The other person builds enough of the app to make that test pass and then writes the next (failing) test. The first person takes over to make that test pass, etc. Back and Forth. Clockwork. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To understand when and why the driver and navigator roles should switch, think about what a solo programmer does quite naturally. You are programming and have been for a while. You are in the grove. Things are flowing. You are focused like a laser on your work. The solutions are coming naturally. And then... suddenly you hit an obstacle. The next thing isn't obvious. At that point, you naturally widen your focus and look at the wider picture. You eventually &quot;get it&quot; and move back in to continue. Or, perhaps, you take a break. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand. Consider what is natural for someone looking over your shoulder as you work, making occasional comments on things like naming, or structure. Perhaps reminding you of some method or tool you might employ rather than building something new. They are taking a wider view since they don't have responsibility for the progress. And then, suddenly, they notice a change in the pitch. You aren't making progress and seem puzzled. At that moment, their instinct is to focus more closely on what you are doing to try to resolve the issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, one person widens focus and the other tightens it. That is generally the moment to swap roles as the role is determined by this level of focus. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you try to switch roles by some arbitrary means, such as time, you will likely lose the advantage of the &quot;dual focus&quot; view of the project. The most likely outcome is either (a) the navigator becomes disengaged altogether or (b) both take the laser view, losing the broader, overall, view of the program. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-22T12:13:25.293" LastActivityDate="2017-08-22T12:13:25.293" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3259" PostTypeId="1" AcceptedAnswerId="3260" CreationDate="2017-08-18T22:48:13.547" Score="6" ViewCount="521" Body="&lt;p&gt;This year course includes creating a compiler of course using Syntax Analyzer and Lexical Analyzer, Semantics and of course through all this generate Assembly Code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But also the teaching program includes using at least a little piece of hardware to pass assembly code to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know a programmable hardware that we can use just for education purposes? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We will pass assembly code to the hardware.&lt;/p&gt;&#xA;" OwnerUserId="2055" LastEditorUserId="58" LastEditDate="2018-03-11T11:57:49.333" LastActivityDate="2018-03-11T11:57:49.333" Title="What hardware can I use when teaching Compiler Language and Assembly Code" Tags="|assembly|hardware|" AnswerCount="4" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3260" PostTypeId="2" ParentId="3259" CreationDate="2017-08-19T19:54:15.163" Score="4" Body="&lt;p&gt;My first piece of advice would be to avoid any modern hardware (and possibly to avoid hardware itself, as the simulators out there are pretty good). As far as I can tell, all of the very cheap processors out there right now (such as come with Arduino) use languages like asm, and &lt;a href=&quot;http://forum.arduino.cc/index.php?topic=37130.0&quot; rel=&quot;nofollow noreferrer&quot;&gt;do not lend themselves&lt;/a&gt; to the kind of conceptually clear assembly programming that would presumably be most helpful for your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a &lt;a href=&quot;https://cseducators.stackexchange.com/q/410/27&quot;&gt;prior discussion&lt;/a&gt;, I talked about the experience I've had teaching with 6502 Assembly, and I would recommend this course as well. This plucky little processor (and, therefore, its assembly language as well) is about as clean, simple, and streamlined as a processor can be. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, there is a &lt;a href=&quot;https://skilldrick.github.io/easy6502/&quot; rel=&quot;nofollow noreferrer&quot;&gt;lovely simulator&lt;/a&gt; for the 6502, a &lt;a href=&quot;http://nesdev.com/6502.txt&quot; rel=&quot;nofollow noreferrer&quot;&gt;complete assembly specification&lt;/a&gt;, a &lt;a href=&quot;http://6502.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;community&lt;/a&gt; devoted to it, and &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you do want to continue on to use actual hardware, the following computers used the 6502, many of which are readily available on eBay and the like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Apple IIe.&lt;/li&gt;&#xA;&lt;li&gt;Commodore PET.&lt;/li&gt;&#xA;&lt;li&gt;BBC Micro.&lt;/li&gt;&#xA;&lt;li&gt;Atari 2600.&lt;/li&gt;&#xA;&lt;li&gt;Atari 800.&lt;/li&gt;&#xA;&lt;li&gt;Commodore VIC-20.&lt;/li&gt;&#xA;&lt;li&gt;Commodore 64.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-19T19:54:15.163" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3261" PostTypeId="1" CreationDate="2017-08-19T22:54:33.133" Score="4" ViewCount="60" Body="&lt;p&gt;I have a friend with a bachelors degree from a good school. He currently teaches Secondary School CS but wants to continue his education. However, he is limited in his ability to move except within a radius of a hundred or so miles from NYC. Short term travel outside his home range is probably a possibility, but not a residential program.&lt;/p&gt;&#xA;&lt;p&gt;He is bright and works hard and is focused, for now, on teaching Computer Science. His goals require an advanced degree, ultimately a research doctorate, not just self learning. He is looking to remain in teaching and to do research as well.&lt;/p&gt;&#xA;&lt;h2&gt;What opportunities does my friend have for part time and/or distance graduate education?&lt;/h2&gt;&#xA;&lt;p&gt;I've suggested to him that there are (must be) week-end and summer programs that, while intensive, only require part time presence outside his home range. What options do you know about that might help him and others like him?&lt;/p&gt;&#xA;&lt;p&gt;If you suggest a program/institution, please say why you think it is appealing. Note that MOOC type programs are not useful here. The program can be very intense, but needs to provide a solid, recognized degree.&lt;/p&gt;&#xA;&lt;p&gt;Serious and continuous contact and interaction with faculty and other students would be considered as an important plus.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-08-21T22:23:32.413" Title="Distance or Part-Time Graduate/Doctoral Study" Tags="|doctoral-education|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3262" PostTypeId="2" ParentId="327" CreationDate="2017-08-20T08:59:10.300" Score="3" Body="&lt;p&gt;I would make them (and in my classes, it is mandatory) take notes on a computer. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The hassle of pen and paper is avoided. Sure, it is second nature for them to write on a paper and I understand that. &lt;/li&gt;&#xA;&lt;li&gt;The constant switching between the pen + paper and the computer keyboard is also avoided. That saves a ton of time.&lt;/li&gt;&#xA;&lt;li&gt;On a more practical note, the desk space that would otherwise be occupied by the large book is saved. &lt;/li&gt;&#xA;&lt;li&gt;Digital notes can be easily shared from the student to me, and from me to the student. Editing is easy, and its easy to organise. &lt;/li&gt;&#xA;&lt;li&gt;Less chance of them losing their notes. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So yeah, they already have a computer, and since I assume they are all internet enabled (they should be if they are learning computer science), note taking on laptop is the way to go. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-20T08:59:10.300" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3263" PostTypeId="2" ParentId="3259" CreationDate="2017-08-20T13:31:33.027" Score="1" Body="&lt;p&gt;If you want to look at hardware which might also be suitable for programming in C/C++, the BBC &lt;a href=&quot;http://microbit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;micro:bit&lt;/a&gt; might be a good alternative to an arduino. It has a more self-contained set of peripherals, and is programmed in ARM assembler. It uses drag-drop style programming (you need an ASCII format hex file) over USB. Of course, you need to set up a tool chain to compile the code, unless you want to write raw hex by hand (or analyse compiled code from the online tool chains). Halting debug (single step and modifying registers) is supported, so it's a capable platform to work on if you want hardware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of a compiler for Cortex-M0 (as in the micro:bit), the educational toolchains support an &lt;a href=&quot;https://www.touchdevelop.com/docs/touch-develop-in-208-bits&quot; rel=&quot;nofollow noreferrer&quot;&gt;in-browser compiler&lt;/a&gt; which demonstrates that it's not actually too complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, there is a fair amount of initialisation required if you want to actually turn the LEDs on or look at the push buttons (let alone the SPI accelerometer on board). You might include some assembler within an online compiler C++ project - that ought to work (if you use the ARM mbed toolchain rather than the school specific toolchains).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative is to look at something more &lt;strong&gt;low-level&lt;/strong&gt;, using a verilog simulator (but there is non-trivial cost involved in the simulator which might put this out of reach to schools - it's more targeted at universities who are teaching embedded hardware, and start-ups). The whole Cortex-M3 processor and a supporting system can be &lt;a href=&quot;http://designstart.arm.com/eval&quot; rel=&quot;nofollow noreferrer&quot;&gt;downloaded from ARM&lt;/a&gt; for free. This runs code (and has a model which prints out disassembly as it runs). - disclaimer - I developed this product.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-08-20T13:31:33.027" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3264" PostTypeId="2" ParentId="3252" CreationDate="2017-08-20T16:02:33.620" Score="2" Body="&lt;p&gt;The last time I took a session on UI, that was when I was teaching these students who had finished a course on C sharp (dot net) and now wanted to build simple UI so they can turn their just learned programming skills into visibly usable software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since they were on dot net, I advised them to start by building a calculator using WPF. When I say calculator, it was a simple calculator. Build the number pad, and then implement just the addition and subtraction. While many of them were proficient in programming, they found themselves baffled...connecting the UI with code that would otherwise work just fine on the console. As they got the hang of things, I asked them to add more and more UI elements, until they had a full fledged scientific calculator with a fairly complicated UI. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice to those who are new to UI is to allow the UI to evolve, and make sure that your backend development skills are up to the mark. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-20T16:49:17.743" LastActivityDate="2017-08-20T16:49:17.743" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3265" PostTypeId="2" ParentId="2897" CreationDate="2017-08-20T16:11:45.497" Score="0" Body="&lt;p&gt;First up, I would strongly recommend staying away from Git GUI tools. Whether you a student (for whom everything is new) or someone who has worked but is new to git itself, command line should be where you should start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, Till about 3 years ago, I did not know anything about git. Here is how I learnt.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Visited Github (and later Bitbucket, which is more appealing to my students because most of its features are free) and signed up for an account.&lt;/li&gt;&#xA;&lt;li&gt;Created a new project. Right away, they would give you straightforward instructions on what to do next from the command line. &lt;/li&gt;&#xA;&lt;li&gt;(optional step) if git is not installed, use any of the hundreds of videos or blogs on how to install and get it configured.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;For instance, when I create a new project on bitbucket, and I get these concise instructions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I have an existing project&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1: Switch to your repository's directory&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cd /path/to/your/repo&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Step 2: Connect your existing repository to Bitbucket&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;git remote add origin https://Jay_sn@bitbucket.org/Jay_sn/demo_repo_1.git&#xA;git push -u origin master&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm starting from scratch&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;git clone https://Jay_sn@bitbucket.org/Jay_sn/demo_repo_1.git&#xA;cd demo_repo_1&#xA;echo &quot;# My project's README&quot; &amp;gt;&amp;gt; README.md&#xA;git add README.md&#xA;git commit -m &quot;Initial commit&quot;&#xA;git push -u origin master&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It really cannot get simpler than that. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="204" LastEditDate="2017-11-02T22:37:48.343" LastActivityDate="2017-11-02T22:37:48.343" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3266" PostTypeId="1" CreationDate="2017-08-20T18:03:18.920" Score="13" ViewCount="2325" Body="&lt;p&gt;A big problem of learning alone is that you don't always figure out the preferred style for a language, the most &quot;pythonic&quot; (in the case of Python) way to do it, or how to write code in keeping with the language's features. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another problem with learning alone is it is very possible to learn to write code that is really terrible - &quot;mislearning&quot;, I suppose. Both of these things are true for really any subject one self-studies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some ways to prevent the learning of poor techniques or styles when self-studying?&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-08-26T06:55:17.353" Title="Attempting to prevent learning of poor techniques when self-teaching" Tags="|self-learning|coding-style|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3267" PostTypeId="2" ParentId="3259" CreationDate="2017-08-20T18:22:43.877" Score="5" Body="&lt;p&gt;The 32-bit subsets of ARM assembly language are fairly clean, orthogonal and RISC-like, as well as being a reasonably nice target for a simple compiler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Inexpensive Raspberry Pi's run 32-bit ARM code, as well as natively supporting a complete compiler development tool set (lex, yak, bison, et.al.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost every student is likely to possess a mobile phone that will also run ARM machine code, and both Apple and Google provide free development tools that allow coding portions of a mobile app (iOS or Android) in ARM assembly language.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 6502 and 8051 ISAs were not designed for modern compiler output, even though otherwise suitable for teaching hand-coded assembly language and running it on inexpensive (vintage or microcontroller) hardware.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-08-20T21:23:43.807" LastActivityDate="2017-08-20T21:23:43.807" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3268" PostTypeId="2" ParentId="3266" CreationDate="2017-08-20T18:59:26.503" Score="18" Body="&lt;p&gt;I think there are two phases here: the first is just being &lt;em&gt;aware&lt;/em&gt; of what the correct idioms and best practices are, and second is attempting to apply what you learned and getting feedback.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the first phase, you can get a lot of mileage by doing research and casting a wide net. In particular, I personally find the following Google queries to be pretty useful at giving me an overview of the best practices and general &quot;feel&quot; of a language:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;X best practices&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X style guide&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X idioms&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X common mistakes&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X philosophy&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X ecosystem overview&quot; (or &quot;X popular 3rd party libraries&quot;)&lt;/li&gt;&#xA;&lt;li&gt;&quot;X tips and tricks&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X history&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X advanced features&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X linter&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;X style checking tools&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(Replace &quot;X&quot; with the name of the language. If the language name is common word like &quot;Go&quot; or &quot;Swift&quot;, try replacing &quot;X&quot; with something like &quot;Go language&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will obviously return a wide range of results, not all of which will be useful, but it's a good way of getting the &quot;lay of the land&quot;. Some of the results will be directly useful (for example, you might uncover a popular and comprehensive style guide or a useful linter), and others will be more useful for getting context behind the design and intended use of a language (for example, googling about the language's core philosophy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other things I personally find helpful is to browse through the top-voted questions about a particular language on StackOverflow or &lt;a href=&quot;https://softwareengineering.stackexchange.com/&quot;&gt;SoftwareEngineering.SE&lt;/a&gt; (previously Programmers.SE). The knowledge won't be immediately useful (or sometimes comprehensible), but it &lt;em&gt;does&lt;/em&gt; give you a feel for what sorts of issues programmers using that language tend to worry about, what advanced features people want to learn to use, and what keywords might be helpful when refining your queries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something else you can do is to keep an eye on news aggregates for the language of your choice. For example, I like browsing through &lt;a href=&quot;http://reddit.com/r/python&quot; rel=&quot;noreferrer&quot;&gt;http://reddit.com/r/python&lt;/a&gt; for Python-related news -- every now and then, you run across an article that teaches you something new or reveals a point of contention within the community that's worth keeping an eye on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that after reading through all of these resources, you'll likely find it hard apply them all at first -- in some cases, you might not even understand the articles you dig up. This is fine: the idea is to be aware of them in the first place so you have a direction to grow towards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'll probably be a good idea to start small -- start by finding a style guide and writing your code to be compliant with it, for example. Or maybe try figuring out the recommended best practices for organizing a larger project and using your language's package manager.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The second phase is actually getting feedback on the code you wrote. This can be tricky to do as a self-learner, since you have no direct way of getting feedback, but there &lt;em&gt;are&lt;/em&gt; a few things you can try.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One resource to try is &lt;a href=&quot;https://codereview.stackexchange.com/&quot;&gt;CodeReview.SE&lt;/a&gt;, though it's probably best to submit relatively small programs for review.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea is to contribute to an open-source project. The more popular projects tend to be relatively picky about following best practices and idioms and will code review your submissions before accepting them. As before, start small: try and find a small and easy bug in their issue tracker, and start with that. It can also be valuable to try googling &quot;open source for beginners&quot; -- that reveals plenty of resources and websites that attempt to connect projects looking for help with beginners.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-08-21T00:37:19.233" LastActivityDate="2017-08-21T00:37:19.233" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3269" PostTypeId="2" ParentId="3266" CreationDate="2017-08-20T19:44:54.990" Score="7" Body="&lt;p&gt;There is more to your question than just &quot;how to program&quot;. For that, however, a good guide is to learn who/where a language was developed and emulate the code that those people write. For Scala, for example, get &lt;em&gt;Programming In Scala&lt;/em&gt; by Odersky et al, who created the language. Textbooks are &lt;em&gt;not&lt;/em&gt; in general a good guide in general. Many do a terrible job, using old techniques with a new language or using new syntactic styles without understanding the semantic intent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the general question, how to avoid being misled about what is important and how to think, it is a hard problem. Long term, you need to learn to &lt;em&gt;think critically&lt;/em&gt; about things and weigh conflicting evidence. One guide to &quot;who gets it right&quot; is to look at the papers referenced in various places. Who is writing those papers? Who gets referenced a lot. It isn't a perfect guide, of course, but if a lot of people consider someone authoritative, they probably are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For many things in Math and CS I find wikipedia to be pretty trustworthy, especially for more or less established knowledge. The fact that bad information can be driven out by other, more knowledgeable, people is a plus. I have found the occasional bit of garbage, however, but it tends to disappear fairly quickly on technical articles (unlike pop culture). If something &quot;feels&quot; stupid, it may be. But you can examine the edit history of the articles there at least and see if the dumb thing is recent or has been bouncing in and out. For new discoveries, wikipedia will be in flux for a while as the idea settles down and people come to some consensus. This also explains why text books don't do a good job initially if things are changing (paradigm shift). They can be too much influenced by old thinking and unsettled experimentation with new ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another suggestion is to cultivate people with more knowledge than yourself and against whom you can bounce ideas. The chat rooms as SE, of course, are a good example of where to find such people, but you may have some access to professionals in your community as well. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me also note that in a formal setting the quality of textbooks is less of an issue, as a good teacher can compensate for poor materials. But the self learner doesn't automatically have that guidance, of course.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-20T23:44:15.247" LastActivityDate="2017-08-20T23:44:15.247" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3270" PostTypeId="2" ParentId="3261" CreationDate="2017-08-21T01:52:27.953" Score="2" Body="&lt;p&gt;Georgia Tech &lt;a href=&quot;http://blog.udacity.com/2013/05/sebastian-thrun-announcing-online.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;announced&lt;/a&gt; an &lt;a href=&quot;https://www.omscs.gatech.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Online Master of Science in Computer Science degree&lt;/a&gt; in 2013, which has received very positive press. You said you don't want MOOCs because they don't &amp;quot;provide a solid, recognized degree.&amp;quot; Georgia Tech's degree is solid and reputable.&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a href=&quot;https://www.nytimes.com/2016/09/29/upshot/an-online-education-breakthrough-a-masters-degree-for-a-mere-7000.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;a 1996 &lt;em&gt;New York Times&lt;/em&gt; article&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;With one of the top 10 computer science departments in the nation, according to U.S. News &amp;amp; World Report, Georgia Tech had a reputation to uphold. So it made the online program as much like the residential program as possible.&lt;/p&gt;&#xA;&lt;p&gt;Charles Isbell, a senior associate dean at the College of Computing, helped lead the effort. Mr. Isbell has a Ph.D. in artificial intelligence and machine learning from M.I.T., and he teaches those subjects at Georgia Tech.....&lt;/p&gt;&#xA;&lt;p&gt;In theory, on-campus programs offer direct access to professors and peers. Mr. Isbell began noticing differences in that respect between his residential and online students. He was interacting much more with students who had never set foot on the Atlanta campus.&lt;/p&gt;&#xA;&lt;p&gt;“I never see students at my office hours,” he said. A few linger after class to ask scheduling questions, but that’s about it.&lt;/p&gt;&#xA;&lt;p&gt;Many of the thousands of online students, by contrast, are constantly interacting on a website set up for that purpose, where Isbell can log on and help. “I can jump in and say: ‘No, you should be thinking about this,’ ” he said. “I spend more time helping them with assignments online than I ever do on campus. The experience for the students and for me is much richer online.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This seems to provide the desired interaction with professors, albeit online.&lt;/p&gt;&#xA;&lt;p&gt;While it is not a research master's, it should put someone in a good position to apply to PhD programs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Commenters have correctly pointed out that this is not a research Master's, and a Master's degree is not needed to apply to PhD programs. Thus, it is not a perfect fit. It is, however, the only highly reputable distance CS grad program of which I am aware.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-08-21T22:23:32.413" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3271" PostTypeId="2" ParentId="3266" CreationDate="2017-08-21T03:07:25.160" Score="5" Body="&lt;p&gt;For the idiomatic way to write code, usually the best place is the standard library of your language, you can also look for big open source projects and see what they do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For not learning garbage, like in most topics, is not that easy, like other commenter said, become critically minded. That requires spending time learning. Something I found very useful is chatting with experienced people, usually with IRC but there are other ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something else that's very important is not becoming a cargo-cultist: don't believe that X thing is THE SOLUTION. There are no silver bullets, and different ways of solving problems are better/worse for different situations, so don't marry a design pattern / paradigm / language / development  methodology. Something I found really useful is spending time actually testing what you see; for example: don't blindly say that you need getters for all classes, try writing code without getters and see if that really generates any problem or instead you get more writable code and faster development omiting it. Just be careful because things that work well for single-developer/small projects might not work well in other environments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also suggest becoming polyglot because different languages and paradigms show wildly different ways of doing things. You get very different solutions to problems when you use Javascript, Haskell, Rust and D.&lt;/p&gt;&#xA;" OwnerUserId="2608" LastEditorUserId="2608" LastEditDate="2017-08-21T03:12:59.817" LastActivityDate="2017-08-21T03:12:59.817" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3272" PostTypeId="2" ParentId="754" CreationDate="2017-08-21T04:10:49.650" Score="1" Body="&lt;p&gt;When I started teaching (roughly about 5 years ago) I assumed naively that everybody learns the way I learnt. For the first few weeks, I was shocked to find out that many students (if not all) cannot spend more than 15 minutes with a single book. In fact, the concept of reading through the reference material or the learning books itself new to them. They simply assumed that the faculty has the sole responsibility of teaching them everything they need to learn. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, for me, even when I was a kid, the faculty was always that person who can clarify things for me, not teach everything because that is impossible. I can spend hundreds of hours, as long as I want, with my learning book. However, in a semester, I would be lucky if I can get to spend 40 hours with the faculty. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, I realised the my way of learning was actually a rarity. Most of the time, I simply gave up on advising my students that they should be learning on their own. I do what they want - teach them with the assumption that they are relying on me heavily - these days. Every now and then, I get lucky and I run into an odd student or a group of students who are like me. When I am interacting with them, I switch back to my original learning method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All in all, even today, and every time I take a session, I feel conflicted and that is perhaps the most significant way in which, my teaching is affected by the way I learnt for myself. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-21T04:10:49.650" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3273" PostTypeId="1" AcceptedAnswerId="3368" CreationDate="2017-08-21T05:22:03.873" Score="8" ViewCount="698" Body="&lt;p&gt;The majority of my students are finally becoming internet equipped. (This is kind of a big deal here in India). Whenever I start a new session, students ask me to recommend a textbook for them. I use my own experience and recommend a basic book and an advanced book, and online references. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in the last few weeks, an additional question is being asked. They ask me, &quot;Sir, should I go for an ebook or a paper book&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being in software training, almost everything I have is digital. Yet, when I decided to learn iOS programming 3 months ago, I decided to go for a printed book. However, I also see the appeal of eBooks as in individual, seeing how my kindle filled with dozens of novels. For my students though, I am not sure what I should tell them and why.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional considerations.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;eBooks are usually cheaper compared to their printed counterparts. Sometimes, the printed versions are simply not available or take too long to ship.&lt;/li&gt;&#xA;&lt;li&gt;Further, since most books can be read in a browser, lot of students&#xA;share their accounts (kind of like how folks share there Netflix&#xA;password) so that more people can read expensive books.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Update : Folks, just want to add that I posted this question hoping for a definitive answer. However, I have now been schooled that, expecting a definitive is perhaps not the right approach. So, if possible, please help me with definitive answers but I acknowledge answers that are focused on providing insight instead of being definitive. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-27T06:30:37.470" LastActivityDate="2017-09-07T04:23:22.853" Title="Paper Books or eBooks?" Tags="|student-motivation|textbook|" AnswerCount="6" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3274" PostTypeId="2" ParentId="3273" CreationDate="2017-08-21T10:51:21.243" Score="7" Body="&lt;p&gt;I would recommend a mixed strategy. There are two sorts of books that are appropriate for e-books, I think. The first category is books that you need now, but wouldn't intend to keep. This includes books in subjects that are less important to your main objectives. In the US, at the undergraduate level, it might mean books that are required in subjects other than your major subject. The second category of books suitable for e-books is those that you expect to always be available in some form over time. Great literature and philosophy are in this category. But if you would intend to discard a book after a year or two, the cheapest alternative is likely appropriate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have faith that the e-book formats and their readers will continue to be available in an upgradeable way. Suppose you have a very important e-book that depends on some particular format or device and the company supporting that format decides to abandon it. You may not have access to those bits in 20 years or so. That is especially the case for those with DRM &quot;protection.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the category of books that you should consider getting on paper are those that are most important to your goals. If you study CS, that would mean the books in the core areas at least. If you later want to refresh your memory those books will still be on your shelf (with reasonable care, of course). You will be familiar with them. Perhaps you have personal annotations in them. For e-books it may be easy (should be easy) to annotate in place, but I don't think that is universally done at this time. So your notes may be separate from the text and it is up to you to keep them synchronized and harder for you to review. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, for such &lt;em&gt;important&lt;/em&gt; books, you might consider having both formats, an e-book you can carry on your daily commute and paper for serious study. Some books that you purchase on paper also give you automatic access to an electronic version, or at least to additional electronic resources at no cost. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that one advantage of e-books is that some of them at least are updated with corrected versions and new editions. Some of these are at no cost, I've noticed. That is an advantage you don't get with paper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I still have, and occasionally reference, important books I used as an undergraduate in the 1960s. I also have some of my hand written notes from then and through graduate school. I haven't had to worry about obsolescence of format or device. Some of those books are classics that went out of print and the replacements are not of the same caliber. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should note that the paper text books you get from established publishers in technical fields will probably only be published for a few years. Text book publishers value the new over the old. If that happens to e-books then you become especially dependent on the devices you now own, but which you will likely want to replace in a few years. It isn't especially costly for a publisher to continue to make old e-books available, but they need to take the trouble to do so - as well as the trouble to update formats as they change. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-21T11:01:16.030" LastActivityDate="2017-08-21T11:01:16.030" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3275" PostTypeId="2" ParentId="3266" CreationDate="2017-08-21T11:13:40.110" Score="5" Body="&lt;p&gt;Everything you learn is temporarily correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the mindset you need when learning new things (in the IT). Even if you by chance happen to learn the perfectly accepted &quot;right&quot; way to write Python in your example, you still will look at that code five years later and realize that you have improved so much over that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the IT business everything is constantly in flux. May it be that new languages with new ideas appear (e.g. functional programming), or that best practices turn out to be not that good after all, or something is over-hyped but essentially bad and simply gets out of fashion. In all cases you advance and improve yourself, unlearn old habits and learn new ones.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when you learn a new language, don't accept what you learn as the one and only truth, accept it as the current best known way to do things. Verify what you have learned and ask yourself: &quot;Is there a better way?&quot; If you find one, use that, despite what the books tell you, because those might be outdated as well. If you don't, then consider that you just haven't found a better way, yet, not that there is none. And if you realize at some point that everything you did was completely wrong, don't worry, be happy that you improved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that mindset knowledge become building blocks that can be interchanged at any time. Learned a new technique? Replace the old one and adjust the surroundings. Suddenly there is no longer a &quot;wrong&quot; or &quot;right&quot; way to do it, just the current and the better way. And if you no longer quantify as &quot;true&quot; and &quot;false&quot; your brain will memorize things differently, and it will become much easier to upgrade old knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A part of the reason is that the brain tends to harden something learned more, if certain emotions are associated with it. If you are excessively happy that you finally learned the one and true way to do things, your brain will set that in stone for you forever. If the same thing is just some information equally irrelevant as everything else, your brain will not put too much effort into storing that. This also means that you will forget things easier, but especially in IT most knowledge from 5 years ago is irrelevant anyways. And those things that stay true and correct will be memorized more clearly simply because you repeat them often enough.&lt;/p&gt;&#xA;" OwnerUserId="2491" LastActivityDate="2017-08-21T11:13:40.110" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3276" PostTypeId="2" ParentId="3273" CreationDate="2017-08-21T13:00:06.907" Score="7" Body="&lt;p&gt;It is impossible to say which is best, but here are some things to consider.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Some factors: paper books vs e-books&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Paper books can be passed on (sold) to pupils in the next year.&lt;/li&gt;&#xA;&lt;li&gt;E-books can be searched (Depending on Digital Restrictive Management (DRM) ). Sometimes they are less searchable, than paper books. Therefore consider e-books for reference material, but check DRM.&lt;/li&gt;&#xA;&lt;li&gt;Paper books can be kept for years. (If what the book teaches is not timeless, then it is not worth knowing. With the exception of some reference books. See above.)&lt;/li&gt;&#xA;&lt;li&gt;E-books can be shared (Depending on DRM).&lt;/li&gt;&#xA;&lt;li&gt;Paper books can be written on, and highlighted. (Some times e-books can as well, depending on DRM).&lt;/li&gt;&#xA;&lt;li&gt;E-books are lighter, easier to carry.&lt;/li&gt;&#xA;&lt;li&gt;Paper books seem easier to read, when you are reading from beginning to end.&lt;/li&gt;&#xA;&lt;li&gt;E-books can be transported at the speed of light (nearly).&lt;/li&gt;&#xA;&lt;li&gt;Paper books can easily have more than one bookmark, and you can use your fingers as a book mark.&lt;/li&gt;&#xA;&lt;li&gt;E-books can have video and audio.&lt;/li&gt;&#xA;&lt;li&gt;Paper books don't need recharging.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;E-books and “using a computer”, is not computer science. So do not do it because you think that it is more computer science.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-21T18:57:46.387" LastActivityDate="2017-08-21T18:57:46.387" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3277" PostTypeId="1" CreationDate="2017-08-21T14:43:08.767" Score="9" ViewCount="1268" Body="&lt;p&gt;When programming on a projector screen, the audience can easily get lost. Besides the obvious things (large enough font size, good indentation, short but helpful comments identifying sections), how do you help your audience follow what is going on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students who look away for just a few seconds (to write something down or to change something in their code) will have a hard time finding the small things I have changed in the code. They can't be expected to pay 100% attention all the time, but I hate having to show the recently changed 2-3 words or few lines of code again and again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll post one program I find very useful, but I'd be glad to hear of other tools / methods.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="1293" LastEditDate="2017-10-11T18:27:40.717" LastActivityDate="2017-10-11T18:27:40.717" Title="Tools or methods to make projected code easier to follow" Tags="|classroom-infrastructure|" AnswerCount="7" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3278" PostTypeId="2" ParentId="3277" CreationDate="2017-08-21T14:43:08.767" Score="7" Body="&lt;p&gt;I use a program called &lt;a href=&quot;https://docs.microsoft.com/en-us/sysinternals/downloads/zoomit&quot; rel=&quot;noreferrer&quot;&gt;Zoomit&lt;/a&gt; (For Microsoft's Windows, by SysInternals), that lets you freeze and draw on the screen and zoom in on parts of it. I find it pretty useful when teaching, I came really dependent on it. It is free of charge and easy to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a very simple example:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/AaFgj.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/AaFgj.png&quot; alt=&quot;Code with error&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/QvfEs.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/QvfEs.png&quot; alt=&quot;Code with highlighted error&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Ag3IU.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Ag3IU.png&quot; alt=&quot;Code with changes&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="204" LastEditDate="2017-08-21T19:03:35.930" LastActivityDate="2017-08-21T19:03:35.930" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3279" PostTypeId="2" ParentId="3277" CreationDate="2017-08-21T15:07:07.413" Score="3" Body="&lt;p&gt;I'll be using Thonny &lt;a href=&quot;http://thonny.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://thonny.org/&lt;/a&gt; this year for Python in particular. It has great code tracing and debugging features, good syntax highlighting and was built with beginners in mind.&lt;/p&gt;&#xA;" OwnerUserId="2615" LastEditorUserId="150" LastEditDate="2017-09-06T14:20:46.830" LastActivityDate="2017-09-06T14:20:46.830" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3280" PostTypeId="2" ParentId="3277" CreationDate="2017-08-21T15:40:22.357" Score="6" Body="&lt;p&gt;You're absolutely right that it is unreasonable to expect students to pay attention 100% of the time, so we have to provide enough &quot;fix-up&quot; clues and cues that they can find the lesson again after a moment of wandering attention.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually avoid having the kids watch me code for two reasons.  One is exactly the problem that you've described: if the code example gets large enough that it doesn't fit onto the screen, they can't get un-lost after a moment of flagging attention.  The second is that passivity decreases engagement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I typically do active code-alongs (as described &lt;a href=&quot;https://cseducators.stackexchange.com/a/420/27&quot;&gt;here&lt;/a&gt;).  Besides engagement, one advantage of a code-along is that there are almost always kids who will type things wrong the first time, which also usually means that they have misunderstood something that you are describing.  Those run-time errors that your students get while doing a linked-list code-along are one of the most valuable fruits of the lesson, and they allow you to point out important aspects of the code that your students may not have caught while you spoke.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-21T15:40:22.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3281" PostTypeId="2" ParentId="3277" CreationDate="2017-08-21T20:44:42.197" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What language are you teaching / using in lectures?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For Python, I've been to a lot of professional tutorials that use &lt;a href=&quot;https://jupyter.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jupyter Notebooks&lt;/a&gt; that they also distribute to participants beforehand. Students can then follow along, play with the code &quot;live&quot;, save changes, type in their own comments / notes, etc.&lt;/p&gt;&#xA;" OwnerUserId="2620" LastEditorUserId="58" LastEditDate="2017-08-21T21:42:13.667" LastActivityDate="2017-08-21T21:42:13.667" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3282" PostTypeId="2" ParentId="992" CreationDate="2017-08-22T04:03:08.720" Score="2" Body="&lt;p&gt;do students benefit from knowing most of them will likely fail the subject? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's see here. I do this with all my students. I explain with hard data (evaluation, the number of hours they spend studying, the quality of their assignments, the discipline they exhibit) that there is a good chance they might fail a given subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most, will flat out refuse to believe me. I would say, 8 out of 10 would disagree strongly with me. However, 2 out of 10, will come back to me, schedule one on one sessions. They will work on where they are weakest, and then, these 2 actually clear the subjects they are weak in, while the remaining 8, will end up failing anyway, thereby proving my prediction about them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Short answer, yes, as a educator, we must share them what we know about their chances of failing at a subject. They should know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should they be informed that there might be a high chance they won't advance past CS101?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with the earlier answer, they should be informed. That way, at least those that are willing to rectify their learning style, can improve their chances of success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the key thing, I spend a considerable amount of time collating data about the students, before telling them that they might fail. its not really required of my job description but I do it anyway. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-22T04:03:08.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3283" PostTypeId="2" ParentId="161" CreationDate="2017-08-22T04:12:00.087" Score="1" Body="&lt;p&gt;When I started, the first language I was advised to use was C programming. We had to use Turbo C. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although, I never got a chance to use C professionally (like when I work on software projects for enterprises and small companies and startups), I ended up teaching that so many times. From a software developer perspective, C is just not right for todays environment, but for some reason, I feel that it is the simplest language to learn, and that is what I advise to students who are young, and brand new to programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some reasons why I would go with C (although I personally don't like that language)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It runs on pretty much anything, especially if students are poor (which is the harsh reality in my city) and can afford a very basic laptop which can run a older version of windows, or worst case scenario, Linux&lt;/li&gt;&#xA;&lt;li&gt;Almost every university in India, has included C as part of their first year syllabus. So, there is a plenty of material, tutoring classes to find. &lt;/li&gt;&#xA;&lt;li&gt;A good understanding of C can later lead to easier learning of almost any object oriented language such as C sharp, Java and if the occasion calls for it, C ++. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Especially in a scenario like what I have in my country, C fits in perfectly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an alternative, I also would recommend Javascript but I think it is already in one of the other answers. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-22T04:12:00.087" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3284" PostTypeId="2" ParentId="3277" CreationDate="2017-08-22T04:30:58.687" Score="3" Body="&lt;p&gt;Most IDEs are able to zoom just try Ctrll + Mouse wheel. Also IDEs do utilize Code highlighting on a dark background as it is less tiring this should also add to contrast and readability .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on age and experience level of your students, i would like to recommend your Students to use an IDE that is able to show code diffs. If you provide them, with remote repository (git-hub) with branches for every lecture they are able to have a look at the code and its progression all the time in their own pace. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The IDE of choice, at the moment, is VS code - it's free-of-charge and is free or proprietary depending where you get it. It has all the above mentioned features plus a build in git support. For a more lightweight approach I would recommend Sublime text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I think the most difficult part is not the tool but the technique. Programming is a profession geared towards Autodidacts as teaching it is very hard for the reasons you encountered. So its on you to make it interesting to follow. Make it funny bring in exiting or ridiculous practical equivalents/examples for complex theoretical topics. Those that love to code will enjoy your lessons because its entertaining, those that struggle will appreciate it even more.&lt;/p&gt;&#xA;" OwnerUserId="2622" LastEditorUserId="2622" LastEditDate="2017-08-22T13:44:24.360" LastActivityDate="2017-08-22T13:44:24.360" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3285" PostTypeId="2" ParentId="3277" CreationDate="2017-08-22T11:52:58.833" Score="2" Body="&lt;p&gt;To highlight your code changes, you could try using the Git support of your IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The text editor &lt;a href=&quot;https://atom.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Atom&lt;/a&gt; as well as the &lt;a href=&quot;https://www.jetbrains.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;JetBrains IDEs&lt;/a&gt; (like IntelliJ or PyCharm) highlight inserted, changed or removed lines by coloring the border green, yellow or red, as long as the changes are uncommitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combined with a high zoom level or fullscreen mode this could help your students to follow what you do and find out what you've done if they weren't paying attention by looking at the border marks.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Git&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To use Git, you have to create a Git repository in the folder with your code files first. This can normally be done in your IDE (Atom: &lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;Shift&lt;/kbd&gt;+&lt;kbd&gt;9&lt;/kbd&gt;, click on &quot;Create repository&quot;; PyCharm: &quot;VCS&quot; &amp;rarr; &quot;Enable Version Control Integration&quot;, select &quot;Git&quot; and press &quot;OK&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the change highlighting is active. When you're done presenting the changes, you have to commit them to tell the IDE that you've completed the changeset (Atom: &lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;Shift&lt;/kbd&gt;+&lt;kbd&gt;9&lt;/kbd&gt;, click &quot;Stage All&quot; at the top right, enter a commit message and click &quot;Commit&quot;; PyCharm: &quot;VCS&quot; &amp;rarr; &quot;Commit Changes&quot;, toggle the checkboxes next to the changed files, enter a commit message and click &quot;Commit&quot;).&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-08-22T11:52:58.833" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3286" PostTypeId="2" ParentId="1493" CreationDate="2017-08-22T15:59:11.120" Score="4" Body="&lt;p&gt;I kind of like this question because I have faced this situation many times, and I have in fact, told my students, that yes, they should change their specialisation or at least pursue something else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the time, the students hate me for saying that. Some have accused me of interfering with their lives. Others, think I am overstepping my boundaries. However, as is always the case, some of them are happy to sit and discuss why I said that. These sessions can go on for long hours, but eventually, we are able to figure out what is right for them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I had this student who was just terrible at programming. If not for decent repetition and memory, the student would have failed the class. I found out that the student had extraordinary artistic skills. I was able to sit and map out a career path which used these skills. Now the student is working hard refocusing career goals, away from computer science. Like this, there have been many cases where I was able to realign people towards their goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All said and done, I tell students that they are bad at this (by providing historical data for the same) but I also tell them what they should be doing instead. This seems to work. Over the years, I have learnt that some students are more open to such suggestions than others, and have gotten good at identifying such students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the process works something like this.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;identify those who totally should not be in CS&lt;/li&gt;&#xA;&lt;li&gt;find out what else they could be doing.&lt;/li&gt;&#xA;&lt;li&gt;are they open to suggestions? &lt;/li&gt;&#xA;&lt;li&gt;if yes, go ahead and tell them. If no, well, control the urge to tell them, and may be just stay away from them :)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-22T15:59:11.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3287" PostTypeId="1" CreationDate="2017-08-22T20:36:39.943" Score="4" ViewCount="750" Body="&lt;p&gt;I'm going to be teaching a group of high school students about programming, and I have a general curriculum designed already, but I can't quite figure out how to introduce methods. I'll be teaching ruby specifically, but language agnostic answers are good as well. A general theme of my teaching will be allowing students to do things the &quot;hard way&quot; first, then showing them an easier way. For example, I plan on teaching them how to print to the console, then I'll ask them to print a word to the console 20 times. I'll use that to introduce looping. Is there a similar way to introduce methods? I'd like concrete examples/activities, along with general advice about how to use those examples.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-08-23T13:06:33.927" LastActivityDate="2017-08-26T16:42:23.577" Title="What are some examples that could be used when teaching subroutines or methods in the context of OO?" Tags="|secondary-education|teaching-analogy|ruby|methods|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3288" PostTypeId="2" ParentId="3287" CreationDate="2017-08-22T22:23:25.480" Score="2" Body="&lt;p&gt;Subroutines/methods are a way to reuse code. As is iteration (loops). They are also a way to document what code does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore show how they can be used to reduce the amount of code: to make the program simpler, and to make it more readable. Note that there is often resistance as a new concept: as, temporarily, it does not make sense, so is not simpler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my first year of teaching, for my python class, I did turtle graphics, as having a visual output can help with understanding. We added procedures for drawing basic shapes. And functions for calculating angles. And eventually complex shapes such as a house, with windows, a door, and a roof.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At first we did it simply:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;tracy.moveForward(100)&#xA;tracy.turnLeft(90)&#xA;tracy.moveForward(100)&#xA;tracy.turnLeft(90)&#xA;…&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We then introduced loops. Then we studied the code to find patterns. The code for Square is used a lot, can we reuse it. Put it into a subroutine. Then we did pattern matching to see that drawSquare, drawTriangle etc are similar. Introduced parameters, and create drawPolygon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also experimented with giving them code that I write, and asking them to modify it. (this was done on last lesson of term with a set of classes. We got to python very late.) Next time I will spend more time on getting them to read the code, and making a prediction of what it does. I will provide two sets of code, one using subroutine, with nice names, the other without. I will ask then to predict that they do, and to also evaluate which one is easier to read (to make this prediction). This should show one of the advantages of subroutines/methods (readability). Readability is the most important property of subroutines/methods. Code reuse in secondary, memory is cheap. However reuse is important, as it makes code consistent, and easier to fix (only in one place). Therefore after they have had time to discover the reuse property, do an evaluation that focuses on consistency and bug fixing.  &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Order of teaching&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have been considering order of teaching. Here is some of what I have come up with. I am using partial sequences: that is describing some things that should be taught before some other thing. From these we come up with a sequence, to teach (some parts of this order may be arbitrary, as long as we obey the partial sequences). [notation: &lt;code&gt;→&lt;/code&gt; represents “is taught before”].&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;subroutines without parameters → subroutines with parameters → variable mutation.&lt;/li&gt;&#xA;&lt;li&gt;iteration → selection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think that selection needs to come after parametrised subroutines, as I don't know how to do it with out variables. However it can come before mutation (almost everything can come before mutation).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-22T22:52:36.017" LastActivityDate="2017-08-22T22:52:36.017" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3289" PostTypeId="2" ParentId="1493" CreationDate="2017-08-22T23:36:01.537" Score="3" Body="&lt;p&gt;I used to work at a community college in the US, where students often hung around for years in the CS program. I agree that it is a terrible outcome, resulting in lost wages and lost potential.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I looked more closely at these students, I'm not sure the problem was that the students couldn't learn CS. It seemed that the problem was that they weren't applying themselves in class for a variety of reasons---sometimes, but not always, for highly sympathetic reasons, such as competing family obligations or need to work. Other reasons included the lack of places to study on campus coupled with a poor study environment at home, or not knowing anyone in the program and becoming demotivated socially. Sometimes, I think the problem was that the teaching in their classes was very poor, and students chose to drop the class and re-try rather than get a poor grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will the students that you advise really do better in another program? CS is a great area, with many job opportunities, even if students join the workforce with just a few CS classes. Perhaps the answer is to reflect on issues within your CS degree program and consider how you can get students to stay on campus, focus on work, and get help when they need it. Social motivation will likely be a large factor. Tutoring strategies like PLTL can address the academic needs while also forming social bonds between students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-08-22T23:36:01.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3291" PostTypeId="1" AcceptedAnswerId="3319" CreationDate="2017-08-23T05:30:22.223" Score="50" ViewCount="16481" Body="&lt;p&gt;I've seen too many cases when a student has completed a programming exercise (without cheating) but can't say, for example, what type of values a variable contains during program runtime (in case of Python programs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like the ability to solve exercises should not be the only (or even main?) criteria for assessment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any research papers (or books or posts) that tackle this issue and/or recommend other assessment techniques / exercise types?&lt;/p&gt;&#xA;" OwnerUserId="2632" LastActivityDate="2017-08-26T09:43:24.957" Title="Students can solve programming exercises but not explain their solutions. What to do?" Tags="|curriculum-design|resource-request|grading|assessment|" AnswerCount="8" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3292" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T08:02:16.467" Score="31" Body="&lt;p&gt;I have seen my share of this 'program gets output' but the programmer has no clue how she/he got there. It's funny how that happens so many times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I have done to at least handle the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before assessments, I break down the evaluation to include the following. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simply getting the output gets them the bare passing grade. &lt;/li&gt;&#xA;&lt;li&gt;Those who can use meaningful names for their variables, function calls get extra.&lt;/li&gt;&#xA;&lt;li&gt;Those that can back up their loops, method calls and variable declarations with expansive ( 2 to 3 lines at least) comments get extra points. &lt;/li&gt;&#xA;&lt;li&gt;In addition to that, those that can write psuedocode above the program code (perhaps in a big block of comments) get some more. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Obviously, this makes me their least favourite faculty in terms of evaluation and gets me a lot of complaints but I stick with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update : Please note that, during evaluation, I don't expect all of them to be done. Say, a student is already using meaningful names everywhere, I would not mark her/him down for not writing comments. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-25T08:40:19.690" LastActivityDate="2017-08-25T08:40:19.690" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3293" PostTypeId="2" ParentId="3287" CreationDate="2017-08-23T08:06:37.853" Score="3" Body="&lt;p&gt;I almost always teach programming by connecting each component of programming with something in real life. For instance, when explaining variables, I ask the students to imagine them as boxes in which you put things, like food items or gifts or something similar. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For methods, I ask them to think of their friends. For instance, there will be a 'rich' friend, and then there are 'stingy' friends, 'useful' friends and so on. So, bring up a scenario. For instance, lets say the challenge, you are in trouble and you want to ask for help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have 3 friends - rich, stingy and useful. Instead of friends, think of them as methods, and you (as in the individual) is the program or the main method. Now, you need help, which friend aka method are you going to call...you will obviously call the 'useful' friend/method.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, essentially, whenever you want something to be done, you design/code a method for that, just like how in life, you want something done, you call upon a friend. So, methods are like friends who help out get things done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, in an actual classroom, I pick students, make them do role-play (pretend that they are functions) and make it all very active (and hopefully fun) and it seems to work for me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and of course, once they get the concept, I jump into code right away, building small methods that do simple print statements, then upping it to display simple variables and then complex stuff including sending and getting values&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-23T12:23:47.747" LastActivityDate="2017-08-23T12:23:47.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3294" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T11:51:28.180" Score="11" Body="&lt;p&gt;I am wondering how much of this is because they can not express in natural language (don't know terminology). How much is because of just fiddle until it works programming.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Learning to express in natural language&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is important, to allow them to communicate with a larger team, to allow them to look stuff up on an internet search, and to answer some of the exam questions.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Programming by fiddling / tinkering&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is an important technique to use &lt;strong&gt;some of the time&lt;/strong&gt;. However it should then be followed by evaluation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: Trying to find the angle of a triangle, when drawing using turtle graphics.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Made a first guess (common first guesses: 30, 60, 45, 90, 100 )&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Try it.&lt;/li&gt;&#xA;&lt;li&gt;Decide higher of lower (this is often decided wrong, but that is ok)&lt;/li&gt;&#xA;&lt;li&gt;Guess a new value.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;repeat until you find the answer.&lt;/li&gt;&#xA;&lt;li&gt;record answer with result for square.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Table of angles:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;| number of sides | angle |&#xA;|-----------------|-------|&#xA;|        3        |       |&#xA;|        4        |  90   |&#xA;|        5        |       |&#xA;|        6        |       |&#xA;|        7        |       |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can discuss what the best strategy is [binary search].&#xA;One you have a completed table (4 or 5 entries), you can start to look for a pattern. It there a general formula for a polygon. Also getting pupils to pretend to be the turtle can help, or teacher is turtle. In ether case another pupil is the instructor, that tells turtle to move and turn. While doing this they gain a deeper understanding of how the code works.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-23T11:51:28.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3295" PostTypeId="2" ParentId="349" CreationDate="2017-08-23T12:08:34.597" Score="4" Body="&lt;h2&gt;Consider also going the other way.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We often think of teaching from small to big. However it is often possible and beneficial to go from big to small. Bertrand Meyer does this in his course “Touch of Class”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Provide the students with a working program, have them read the program, make some predictions on what it does, then run it, determine what some of the key grammar/vocabulary does, make predictions on what changes will do, then make changes and re-run. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-23T12:08:34.597" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3296" PostTypeId="1" CreationDate="2017-08-23T12:19:10.197" Score="10" ViewCount="482" Body="&lt;p&gt;I'm trying to find a professional development event for myself as a relatively new CS educator. I'm interested in something that showcases innovative ways to teach and engage students in the subject -- any recommendations?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, conferences for high school educators, and those that showcase new technology/tools for CS educators would be brilliant. I am based in the USA and am happy to travel to events.&lt;/p&gt;&#xA;" OwnerUserId="2638" LastEditorUserId="1293" LastEditDate="2017-10-07T15:34:24.687" LastActivityDate="2017-10-11T01:20:42.170" Title="What professional development events or conferences are out there for CS educators?" Tags="|secondary-education|resource-request|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3297" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T12:33:22.070" Score="5" Body="&lt;p&gt;I also encounter this issue (just encountered it yesterday in a lab exam). This is how I differentiate between someone who has done his work and just not been able to explain it and someone who has crammed/cheated:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Deleting some part of code and asking student to rewrite it&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Asking student to modify a snippet of code&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Explain &lt;em&gt;this line&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Usually Point 2 is enough to differentiate. Kindly ensure to let him/her sit calmly in order to not let nerves get hold of him/her - it works for me!&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-08-23T16:11:56.807" LastActivityDate="2017-08-23T16:11:56.807" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3298" PostTypeId="2" ParentId="3287" CreationDate="2017-08-23T12:33:44.323" Score="2" Body="&lt;p&gt;Perhaps I'm wrong, but your question (and your example) seems to imply that your intention is too &quot;teach them Ruby&quot;. For beginners that seems backwards to me. My intention would be to teach them to &quot;solve interesting problems&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once someone already knows &quot;how to program&quot; in some language it seems fine to teach them a (different) language. But focusing on the language is the wrong way about. Find an interesting, if simple, problem and examine how to break that problem down. In an object-oriented language you break it down into objects first. The objects have behavior. The methods implement that behavior. So methods are natural, not something that you need to come up with examples to teach. Your examples should be example problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of giving them a hammer and a bunch of nails, give them a problem that a hammer would solve. Hammering isn't, in itself, a useful skill. Think about the problem first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is one reason that a system like &lt;a href=&quot;http://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; is useful in teaching beginners. It offers the possibility of a framework for posing problems (simulation) and a visual framework for solution (a flexible grid like world). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Giving a person a full complement of carpenter tools doesn't make them a carpenter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In teaching programming to beginners, make the language and its features a secondary concern. I would introduce new language features only when a problem requires it. Of course you can choose the problem set so that you introduce &quot;interesting&quot; language features along the way, but make the problems &quot;interesting&quot; first. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Also, if you really want to teach them object-oriented programming, don't teach them static methods first. Teach ordinary (dynamic) methods of objects until they are familiar with &quot;behavior of objects.&quot; Wait a bit (maybe a long bit) before introducing statics. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-23T13:33:36.947" LastActivityDate="2017-08-23T13:33:36.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3299" PostTypeId="2" ParentId="3296" CreationDate="2017-08-23T12:43:39.313" Score="7" Body="&lt;p&gt;In UK England, there are &lt;a href=&quot;https://www.computingatschool.org.uk/&quot; rel=&quot;noreferrer&quot;&gt;CAS Computing At Schools&lt;/a&gt; events. They are regional events. They are focused on primary and secondary schools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are usually inspiring, but can be a bit simplistic if you have done programming for a job. The events I have been to I have ether chosen the groups that are teaching focused (as opposed to technical focused). Or in smaller events steered it towards teaching techniques. Each event has been multi-threaded (choose your thread), or small and adaptable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can sign-up to their e-mail mailing list, to be informed of events in your area.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-23T12:43:39.313" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3300" PostTypeId="2" ParentId="3296" CreationDate="2017-08-23T12:50:25.813" Score="7" Body="&lt;p&gt;You don't specify Secondary School, but your AP tag seems to imply that as your main interest. I'll start with that, but give a more general answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some organizations that hold regular conferences and to which you should belong in any case. The conferences normally have workshops in which experienced educators teach some tools-of-the-trade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first, focused on Secondary School, is &lt;a href=&quot;http://www.csteachers.org&quot; rel=&quot;noreferrer&quot;&gt;Computer Science Teachers Association&lt;/a&gt;. They have both a newsletter and a national conference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next, focused on AP itself is &lt;a href=&quot;https://apcommunity.collegeboard.org/group/apcompsci&quot; rel=&quot;noreferrer&quot;&gt;AP Teacher Community&lt;/a&gt; which has a useful set of discussion boards. They have events (and tutorials) in conjunction with the SIGCSE national conference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://sigcse.org/sigcse/&quot; rel=&quot;noreferrer&quot;&gt;SIGCSE&lt;/a&gt; organization within ACM is somewhat more dedicated to post secondary education. It has several conferences every year, including some outside the US, usually Europe. Many secondary teachers belong and there is support here for such teachers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;https://www.ccsc.org&quot; rel=&quot;noreferrer&quot;&gt;Consortium for Computing in Small Colleges&lt;/a&gt;, while focused on college teaching has many annual conferences spread around the US. Like the others here, the conferences often have workshops given by educators. Many topics are covered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Welcome to CS Teaching. Explore the above organizations for their offerings and subscribe, if appropriate, to their newsletters. You will get a lot of information, and a forum for asking for help. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-23T12:50:25.813" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3302" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T13:15:07.390" Score="10" Body="&lt;p&gt;I'm afraid my answer here will suggest that you completely revamp how you teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sort of problems that result in issues like this, seem to me to be problems that treat the computer as a fancy calculator. Problems given to students are of the &quot;math-y&quot; type. Some require tricky thinking, of course, but they are unlike the sorts of problems that people in the real world write programs to solve. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion, is to, instead, use simulation as the basis of your teaching. There are many ways to do this, but one of the best and easiest to introduce is the &lt;a href=&quot;http://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; system. It provides both an IDE (for Java) and a simulation framework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also an organization for users, &lt;a href=&quot;http://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt;, who contribute simulation frameworks that you  can start with and modify. There are hundreds of such simulations, some with teaching materials, even videos. Note that the Greenroom is a membership site. You will need to join. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a few examples. I have used some of them, but not all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://greenroom.greenfoot.org/resources/261&quot; rel=&quot;nofollow noreferrer&quot;&gt;Create Flappy Bird Game&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://greenroom.greenfoot.org/resources/248&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fuel Depot Question&lt;/a&gt; from APCS-A&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://greenroom.greenfoot.org/resources/9&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greeps - A Programming Competition&lt;/a&gt; One of the originals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://greenroom.greenfoot.org/resources/3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karel J Robot meets Greenfoot&lt;/a&gt; A robot simulation - from the book. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://greenroom.greenfoot.org/resources/207&quot; rel=&quot;nofollow noreferrer&quot;&gt;2d Platformer&lt;/a&gt; Similar to Mario. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are hundreds more, both at the main Greenfoot site and the Greenroom. Only the Greenroom requires (free) membership. With these sorts of frameworks and the programming that it involves, the problem you discuss simply won't arise.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It has been noted that I often promote Greenfoot. I'm not affiliated with the site or its developers, nor have I ever been. I know some of the developers and I have produced materials for use with Greenfoot. I also occasionally submit bug reports and feature requests to the site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But Greenfoot aligns well with my general teaching philosophy and makes Object-Oriented Programming easy to teach to novices in an interesting and engaging way. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-24T15:44:37.247" LastActivityDate="2017-08-24T15:44:37.247" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3303" PostTypeId="2" ParentId="349" CreationDate="2017-08-23T13:36:21.120" Score="4" Body="&lt;p&gt;I found 'FizzBuzz' really helpful as the next exercise, it has conditions, loops and it also allows you to explain some coding practices, especially DRY (Don't Repeat Yourself).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Write a short program that will simulate playing FizzBuzz.&#xA;The rules are simple:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Count from 1 to 100 and print the numbers on screen&lt;/li&gt;&#xA;&lt;li&gt;If the number is divisible by three, print Fizz instead of the number &lt;/li&gt;&#xA;&lt;li&gt;If the number is divisible by five, print Buzz&lt;/li&gt;&#xA;&lt;li&gt;If the number is divisible by both three and five, print FizzBuzz&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Write as few lines of code as possible.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also an exercise that was used a lot on job interviews to determine if someone could actually code and apply good practices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for an in-depth explanation on what constitutes a good result: &#xA;&lt;a href=&quot;https://www.youtube.com/watch?v=QPZ0pIK_wsc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tom Scott: FizzBuzz&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2643" LastEditorUserId="2643" LastEditDate="2017-08-23T13:42:03.567" LastActivityDate="2017-08-23T13:42:03.567" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3304" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T18:04:07.880" Score="4" Body="&lt;p&gt;Isn't this what lab reports are for. Computer Science is a science and should come with some basic rigors. Copying some code and hacking away might get an output, but forcing students to do analysis, flow charts, etc will prove how much they really understand the process. Even simple things like writing a paragraph on the theory and another on the basic algorithm to solve the problem would go a long way.&lt;/p&gt;&#xA;" OwnerDisplayName="user2651" LastActivityDate="2017-08-23T18:04:07.880" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3305" PostTypeId="2" ParentId="349" CreationDate="2017-08-23T20:28:13.447" Score="2" Body="&lt;p&gt;You might find some more ideas here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class/2798#2798&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2903/the-order-of-subjects-in-beginners-curriculum/2924#2924&quot;&gt;The order of subjects in beginner&amp;#39;s curriculum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My approach is designed for &lt;a href=&quot;http://processing.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, but hopefully it generalizes to other languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hello World is really a lesson in &lt;strong&gt;how to call functions&lt;/strong&gt;. After they understand the basics, I'd show them how to lookup other functions in either the language reference or in a beginner-friendly list that you give them. In Processing, I'd have them draw a circle or a rectangle, or an entire scene using basic function calls. If your hello world is a console application, then maybe have them display a popup box, or display a message in a window. The specifics of this depend on the language you're using, but the idea is to get them looking stuff up in a reference and playing around with their own code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there I'd go to &lt;strong&gt;using variables.&lt;/strong&gt; This is different than creating variables. Instead of having students create variables, have them look up whatever predefined variables your language offers. Processing has &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; variables, so I'd have them make their scene scale to the size of the window. But you would use whatever variables your language exposes. Again, have them look stuff up in the reference or in a list you provide them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there I'd have them create their own variables and their own functions, which I've explained in more detail in the above questions. But if you're just looking for a follow-up to Hello World, I'd use the above approach of revealing more of the reference and asking them to do their own projects based on what they just learned.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-23T20:28:13.447" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3306" PostTypeId="2" ParentId="3266" CreationDate="2017-08-23T20:55:35.677" Score="2" Body="&lt;p&gt;Everything you've mentioned is also true of more &quot;traditional&quot; classroom environments. Novices (and non-novices) often have trouble &quot;thinking in a language&quot; or following best practices. This is not specific to self-learners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way you fix this is through practice, by actually writing code. You should spend more time writing code than you do learning about it. Try giving yourself homework assignments, or look for assignments online or in a text book.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest happens more naturally than you might expect. For example, any code you write now will look like garbage to you in 6 months. This is perfectly normal, and it's a sign of how much you're learning and improving. I think trying to learn about &quot;best practices&quot; and shoehorning them into code you're writing now is a bit of a wasted effort. Instead, move on to the next topic, and then revisit your code in a few weeks to see if you notice anything you could have done differently. Take those lessons with you when you start your next project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also try to read code, which will also happen pretty naturally as long as your &quot;homework&quot; assignments are at the right difficulty level. Your homework assignments should require you to consult documentation and tutorials, and read the code in them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Honestly I don't think you should worry too much about this, especially if you're just starting out. Focus on writing code that works, does what you expected, gets the job done, and that you understand. Do that as often as possible, and then rinse and repeat. You'll pretty naturally learn &quot;best practices&quot; just by reading documentation and examples and incorporating those in your own code.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-23T23:32:18.783" LastActivityDate="2017-08-23T23:32:18.783" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3307" PostTypeId="2" ParentId="206" CreationDate="2017-08-23T23:27:59.497" Score="1" Body="&lt;p&gt;For testing, I give lab practicals. I write them so that they are very difficult to finish. Usually, I have 6 questions. This is a &quot;performance based&quot; assessment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1,2 show basic proficiency. Get 'em and you have a B-.  You can now relax and do more.  These problems build confidence.  This often gets more reluctant students to perform at a higher level. They stop worrying about performing poorly and begin to think about kicking some serious butt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3,4 are good proficiency.  Get one and you are B, get two, B+/A-.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5,6 have annoying features that lead to headscratchery.  Get these and be in the A, A+ range.  They usually have some kind of twist that requires a good degree of ingeunuity or familiarity with the docs to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I allow the use of documentation. This is what professionals have.  So I do the same thing.  This occurs in a 90 min lab period.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-23T23:27:59.497" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3308" PostTypeId="2" ParentId="3291" CreationDate="2017-08-23T23:29:44.807" Score="9" Body="&lt;p&gt;It's time for a little &quot;code review.&quot;  Have a student present his code in front of class and talk about how he made it work.  Hey, this happens in the professional world.  There is no time like the present to begin learning this vital skill.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-23T23:29:44.807" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3309" PostTypeId="2" ParentId="3287" CreationDate="2017-08-23T23:32:37.663" Score="1" Body="&lt;p&gt;Have them write up a straight class and document it.  Here are some ideas.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Complex Numbers: Create a class that spawns complex numbers and does their arithmetics. Throw exceptions where needed.&lt;/li&gt;&#xA;&lt;li&gt;Big Fraction:  Create a class for extended-precision rational arithmetic. You will need +, -, * and /.  &lt;/li&gt;&#xA;&lt;li&gt;Quaternions:  These are used extensively in computer graphics. Implement them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I do OO programming a project of this ilk is my first big assignment.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-23T23:32:37.663" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3310" PostTypeId="2" ParentId="3228" CreationDate="2017-08-24T03:34:58.183" Score="3" Body="&lt;p&gt;I went through this a few years ago, having self-learned everything I know and teach. I had to do it because, there isn't much money in training alone, so had to get into development as well. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First up, I started my talking to some of the folks who are already&#xA;working on large projects. I am talking folks who are in the&#xA;industry for a few years. These experienced gave me knowledge about&#xA;the kind of tools they use, programming languages they use and stuff&#xA;like that.&lt;/li&gt;&#xA;&lt;li&gt;After that, I decided to build a 'project atmosphere' right at&#xA;home. For instance, I was advised about using servers and databases&#xA;extensively for every project. So, I used Azure to create my own IT&#xA;department, and then consume all those IT resources in my&#xA;applications.&lt;/li&gt;&#xA;&lt;li&gt;Another individual suggested that I become 'full stack' developer,&#xA;so I learnt all the languages/components of dot net that are&#xA;required to go from a project concept to delivery.&lt;/li&gt;&#xA;&lt;li&gt;then, I decided to fill the gaps in my own learning. For instance, I&#xA;had realised that without even knowing, I had become extremely good&#xA;at the basics of programming but throw an advance component, I would&#xA;falter. So, I grabbed all the industry authored books (the ones&#xA;aimed at working folks rather than students) and pretty much went&#xA;through them, essentially relearning things.&lt;/li&gt;&#xA;&lt;li&gt;Finally, for practice of getting that 'team' feel, I had some of my&#xA;students to act as my project members by create real but practice&#xA;software projects. I would take upon on the role of the project&#xA;manager or team lead, distribute the work load, conduct&#xA;presentations, coordinate code over repositories and then deploy the&#xA;whole thing myself.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Then, rinse and repeat the above so many times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It took me a while (a year or so) but eventually, I was ready to work in the industry. Now, years later, I switch between working as a developer and trainer, no problem. Since we are talking about transitions, I have found that while I still make a decent amount of money from training, development actually pays more. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-24T03:34:58.183" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3311" PostTypeId="2" ParentId="3208" CreationDate="2017-08-24T03:44:18.507" Score="1" Body="&lt;p&gt;I faced this issue, a few years ago, when I started taking on .NET development projects. For instance, I would run into a piece of code that I never really heard of, but I see that there would be a lot of chatter about it online forums/stack overflow and so on. The more I continue to work on the project, the more I realised that I simply did not know so many things aka gaps on what I have self-taught. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that point, I decided to go to the official docs of .NET (MSDN), read through the whole thing. Simultaneously, purchased the official Microsoft recommended books on dot net C sharp, and went through the entire book. When I was done with MSDN and the book, I had an entire list of things I had never even heard. One by one, I self-learned them as well, filling in the gaps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had to do this many times (for windows phone, windows 10, web and so on) and each time, this method has worked to my benefit. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-24T03:44:18.507" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3312" PostTypeId="2" ParentId="3101" CreationDate="2017-08-24T03:50:30.387" Score="0" Body="&lt;p&gt;I took up iOS teaching recently, and the book that am having great results is the &lt;strong&gt;iOS Programming: The Big Nerd Ranch Guide&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.bignerdranch.com/books/ios-programming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bignerdranch.com/books/ios-programming/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I liked their style which is extremely practical, and although the book itself is huge, it covers the essentials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that the question is already answered, and I am not being paid to recommend this book. Just adding what has helped my students for those who might be looking for a book that is ideal for teaching older (as in already graduated or those who looking to transition from say being an android developer to iOS developer).&lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-24T03:50:30.387" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3313" PostTypeId="2" ParentId="3063" CreationDate="2017-08-24T03:54:51.380" Score="4" Body="&lt;p&gt;I go ahead and use something a little dramatic in my sessions. I use the vampire mythology to explain viruses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, vampires only come in when invited. Viruses are the same. The user has somehow allowed the virus to be installed on their machine. This 'invitation' part puts an emphasis that viruses entering a machine is almost always a fault of the user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, yes, once the vampire is in, they start sucking up all the life out of everyone in the house. Same thing with viruses. They take up resources, destroy things and completely ruin everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that this brings out a lot of laughs (what with all the Twilight fans in the audience, and general awareness about vampires) but also allows them to learn the concept. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-24T03:54:51.380" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3314" PostTypeId="5" CreationDate="2017-08-24T10:19:28.500" Score="0" Body="&lt;p&gt;Computer security and the risks to society from computer systems and their misuse have become increasingly important. This tag is intended for all questions related to teaching this area. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag is not appropriate for questions related to technical aspects of risks or security except insofar as those aspects relate to teaching/learning. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-05T16:27:08.683" LastActivityDate="2017-09-05T16:27:08.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3315" PostTypeId="4" CreationDate="2017-08-24T10:19:28.500" Score="0" Body="This tag is for questions related to teaching all aspects of computer security. It may also be used for questions on teaching the risks involving computer systems. " OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-05T16:27:08.683" LastActivityDate="2017-09-05T16:27:08.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3316" PostTypeId="2" ParentId="3287" CreationDate="2017-08-24T14:35:02.683" Score="0" Body="&lt;p&gt;Because you mentioned Console, I will chime in. Many of the answers here, and other questions also, mention doing something visual with graphics, etc. When I was teaching myself (almost 40 years ago), I printed shapes on a terminal using asterisks. This obviously requires nested FOR loops, or clever recursive functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show a two-level loop solution, then show how it is much clearer to extract the Row printing to its own method. Now you have a loop calling a method, with a loop inside that. Once you have a Row method, you can create all kinds of variations that use it, to make different shapes without altering the Row method at all. It would be best if the Row method had two parameters: number of spaces to indent, then number of asterisks to print.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Row method could return a string, or just print the output directly. If it returns a string, you could easily migrate the application to a Windows form instead. Now you have demonstrated reuse and the importance of separating the platform from the algorithm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even have another method that encapsulated the character to print, so it could be an input value. Then methods to accept numeric input and keep it within bounds, etc. It can easily grow in an Object Oriented way.&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorDisplayName="user737" LastEditDate="2017-08-24T14:56:12.253" LastActivityDate="2017-08-24T14:56:12.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3317" PostTypeId="2" ParentId="3101" CreationDate="2017-08-24T18:14:42.177" Score="-1" Body="&lt;p&gt;I find Ray Wenderlich's web guides to be the best resource for teaching iOS development.&#xA;&lt;a href=&quot;https://www.raywenderlich.com/category/ios&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.raywenderlich.com/category/ios&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There also exists a considerable number of books authored by the team that go through iOS and various important first and third-party frameworks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://store.raywenderlich.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://store.raywenderlich.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2678" LastActivityDate="2017-08-24T18:14:42.177" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3319" PostTypeId="2" ParentId="3291" CreationDate="2017-08-24T20:31:13.983" Score="24" Body="&lt;p&gt;If I understand your problem correctly, it's that students can create programs that behave correctly without understanding why they behave correctly. I assume that they do this by some combination of brute force trying things and SO search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using program correctness for grading has the desirable qualities of being objective and automation friendly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how could you keep these qualities while testing for actual understanding?  While I agree that good code structure, variable naming, and possibly comments can offer proof of understanding, they are all highly subjective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would do instead is construct exam exercises that are relatively small requirements changes to homework assignments that students have completed earlier, ideally at least 2 weeks earlier.  Then give each student access to the code (s)he submitted for the homework as a starting point for completing the exam exercises.  Tune the original homework size and the exam requirements changes so that a student who understands the code and has well-written code can complete the exam exercise quickly, but one that started from scratch would not likely be able to complete the work.&#xA;This accomplishes 4 things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It solves your original problem of testing whether students understand the code they have written.&lt;/li&gt;&#xA;&lt;li&gt;It maintains the objectivity and automation friendliness of grading on program behavior.&lt;/li&gt;&#xA;&lt;li&gt;It rewards production of readable, maintainable code.&lt;/li&gt;&#xA;&lt;li&gt;It prepares students for the world of coding outside of a class environment, where the majority of time spent is not on isolated exercises, but extending an existing code base.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I work in industry and have no research to support this.&lt;/p&gt;&#xA;" OwnerUserId="2682" LastActivityDate="2017-08-24T20:31:13.983" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3320" PostTypeId="2" ParentId="2897" CreationDate="2017-08-25T01:04:07.920" Score="5" Body="&lt;p&gt;I have students follow through the &lt;a href=&quot;https://www.learnenough.com/git-tutorial&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learn Enough Git to Be Dangerous&lt;/a&gt; tutorial, which goes through the basics of setting up a repo, committing, pushing to GitHub, and some simple collaboration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Git is complicated; my students are usually pretty mystified by it at first. But the nice thing about it, is that once you've learned the basics, you can do things like pushing code to GitHub to share/backup, and it's already a useful tool.&lt;/p&gt;&#xA;" OwnerUserId="2686" LastEditorUserId="58" LastEditDate="2017-12-13T01:20:31.050" LastActivityDate="2017-12-13T01:20:31.050" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3321" PostTypeId="2" ParentId="3208" CreationDate="2017-08-25T08:06:47.693" Score="1" Body="&lt;p&gt;This answer is based on the following comment from the OP : &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'll define a &quot;gap&quot; as &quot;a lack of awareness of some specific topic relevant to what the student is interested in&quot;. The topic could be big or small. For example, not being aware of the existence of data structures like lists or hashmaps is a gap. If the student is doing some data analysis in Python, not knowing about libraries like pandas or numpy is a gap. If the student is making a web page with complex layout, not being aware of the box model (and things like flexbox) is a gap. If the student is writing JS, not knowing how the 'this' keyword is scoped is a gap&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To me those gaps are, except the first one, not important. They're easily filled once  your student understand that they should always search first how some things are usually done instead ofdoing it from the only basic component of the language you know (components = keyword and basic libraries). The same can be applied when searching for a data structure than do the job for you, not for doing your own data structure and their algorithm however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The learning &quot;this in JS&quot; thing is more about having read some others code and when seeing something unknown, asking or googling it. Unless you require students to eat a book for everything they miss, they won't always get what they're missing, since it's missing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good way for me to fill those kinds of gaps good enough to start practice is to read some article like this one &lt;a href=&quot;https://www.infoworld.com/article/3196070/node-js/10-javascript-concepts-nodejs-programmers-must-master.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.infoworld.com/article/3196070/node-js/10-javascript-concepts-nodejs-programmers-must-master.html&lt;/a&gt;. Then I practice and each time I can, I try to get deeper in what I do (more advanced usage of the language, framework, library).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It contains basic concepts specific about the language so when you read the doc of a library you use, you understand the structure of the samples codes given.  The rest will come by practicing. However this way require you to have already experience in others languages and having the basics (type, list, loop, if, basic algorithm, encoding if necessary, ...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However when it comes to larger gaps like concurreny/asynchronous, data structure with their algorithm it's another matter. This is something you need to understand as a whole (concurrency : thread, process, schduler, context switch, callback) in order to use it properly. And for that I will go back to the standard CS list you have given in your post.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR : &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Gap as a localized concept/technical element missing can be learned alone once you have your basics and some practice.&lt;/li&gt;&#xA;&lt;li&gt;Basics and general concepts need to be learned and understand as a whole, this require either teaching, or a (good) book. A good way to convince someone that he need to understand a concept before using it is to crash them against concurrency/encoding and others things you just can't get right if you only try to &quot;make it work&quot;, specially if you try to make them work in a real world not a simple exercice with 3 sample data.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1375" LastEditorUserId="1375" LastEditDate="2017-08-25T08:18:15.717" LastActivityDate="2017-08-25T08:18:15.717" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3323" PostTypeId="1" CreationDate="2017-08-25T11:30:08.160" Score="5" ViewCount="118" Body="&lt;p&gt;Which variable types are the bare minimum to teach non-programmers who want to be able to create and modify simple VBA (MS Office) macros?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start by showing them the concept of variables through using an Excel cell as a temporary storage, then using undefined variables, then show them a simple &lt;code&gt;Dim SummedValue&lt;/code&gt; with no type declaration. Then comes the types, and I always struggle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Integer&lt;/code&gt;, &lt;code&gt;Boolean&lt;/code&gt;, &lt;code&gt;Double&lt;/code&gt; seem the most important, but maybe &lt;code&gt;Long&lt;/code&gt;(integer) is better, or just &lt;code&gt;Double&lt;/code&gt; is enough for all the numbers? Also, &lt;code&gt;Object variables&lt;/code&gt; are important too with the &lt;code&gt;Set&lt;/code&gt; statement. I don't bother showing them &lt;code&gt;arrays variables&lt;/code&gt;. Or am I better of telling them to use &lt;code&gt;Variant&lt;/code&gt; for everything?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They will be making simple macros for themselves, maybe a few colleagues. Usually start off from a recorded code. They should be able to read and comprehend other's macros too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Context:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I regularly hold intensive company VBA trainings. These are typically 2 day long trainings (yes, I know, totally not optimal, but I can rarely make the organizing HR understand this). So, 2 days Beginner Training, where I teach them the basics from macro recording through modifying the existing code to the IF statement. Then in a few weeks it is followed by a 2 days long Intermediate Training. This is where I teach them the variables and loops - and make them practice a lot.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-08-26T16:13:10.577" Title="Intensive basic VBA course - which variables to teach?" Tags="|curriculum-design|variables|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3324" PostTypeId="2" ParentId="3323" CreationDate="2017-08-25T12:48:24.703" Score="3" Body="&lt;p&gt;As you are teaching business people, not computer scientists (though what I say may also be true for teaching them). I would start on the more practical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach them stuff that is useful. &lt;code&gt;Date&lt;/code&gt;, &lt;code&gt;Currency&lt;/code&gt; (Don't use float types for currency, it will cost you your job, and someone a lot of money), &lt;code&gt;Decimal&lt;/code&gt; (A float type with base 10 radix: it has less unexpected behaviour), and &lt;code&gt;string&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Integer has some value, but manly for performance. If when doing loops you use &lt;code&gt;foreach&lt;/code&gt;, then integers are not needed. Also looping is simpler and safer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Booleans are only needed when doing conditionals, and conditionals are over used.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;In addition:&lt;/h1&gt;&#xA;&#xA;&lt;h2&gt;Static or dynamic&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you teach not to declare types first, then that is what you will get.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Assignments&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We often teach assignment early, this is crazy. In structure and interpretation of computer programming, they covered almost everything I know, and then started to apologise, because they were about to introduce assignment (mutation). As soon as you introduce assignment, you make is very hard to reason about how a program works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have taught types when teaching functions. Functions take values (of a type), and return values (of a type). This in some ways looks like assignment, but is not. It is safer, and makes code easier to understand.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-25T12:48:24.703" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3325" PostTypeId="1" AcceptedAnswerId="5127" CreationDate="2017-08-25T14:51:33.483" Score="9" ViewCount="367" Body="&lt;p&gt;I am teaching a general introductory CS course to 18-19 year olds, with Python3 as a support language, and I am not satisfied with how some students respond to strings and string literals. That is some of them struggle to understand when you should use quotes and when not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when trying to &lt;code&gt;open&lt;/code&gt; a file, they will write &lt;code&gt;open(/the/path/to/the/file)&lt;/code&gt; instead of &lt;code&gt;open(&quot;/the/path/to/the/file&quot;)&lt;/code&gt; and fail to correct themselves. This is just an example ; the question is not about file/filename confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conversely, some students, when asked to write a function a parameter of which is a string, will write&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def example(&quot;s&quot;) :&#xA;   #etc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There seem to be an underlying poor understanding of what a variable (or identifier) is. However these students are generally coping with programs that do not manipulate strings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A related question (maybe I should post this one separately) is about the pros and cons of introducing strings before arrays/lists or the converse.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Some background&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This takes place in France, in the CPGE (Classes préparatoires aux Grandes Écoles), a two-year curriculum that students may enroll in at the beginning of higher education (post-baccalauréat or post-A level or equivalent) but is physically located in high schools (lycées) and prepare students for national competitive exams (concours).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a result, the global content of the course is mandated nationwide (including the use of Python3 as an example language) ; I can only choose the order and the manner in which I teach things. The course is mandatory for students but is not the main field of the curriculum (I have 1hr/week of blackboard course and 1hr/week lab session, compared to 10 to 12 hr/week of math and 8 to 10 hr/week of physics).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science is not taught in France before university/higher education. There is only some algorithmics, taught by math teachers as well as they can, using pseudo-language and calculators languages, and not dealing with any data structure (only numbers) and no functions. So I start from zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in CPGE, the idea of teaching CS as a field in itself is quite new and not universally accepted. As a result, the nationwide CS curriculum for CPGE mandates that problems and examples should be taken from math and physics situations, which leads to string being scarcely used except for file names and data input from files (csv). Yet any concours may ask a problem about strings, since they are mentioned in the nationwide curriculum.&lt;/p&gt;&#xA;" OwnerUserId="2574" LastEditorUserId="2574" LastEditDate="2017-08-25T20:45:19.543" LastActivityDate="2018-10-11T17:59:02.083" Title="How to effectively teach strings and string literal constants?" Tags="|curriculum-design|lesson-ideas|introductory-lesson|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3326" PostTypeId="2" ParentId="3325" CreationDate="2017-08-25T17:16:42.957" Score="3" Body="&lt;p&gt;Perhaps the place to start is with a discussion of variables and making the distinction between a &quot;thing&quot; and a &quot;name for the thing.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A pretty good place to start that conversation is with the a poem from Through The Looking Glass, the sequel to Lewis Carroll's Alice in Wonderland.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The song's &lt;em&gt;name is called&lt;/em&gt; Haddocks' Eyes&lt;/li&gt;&#xA;&lt;li&gt;The song's &lt;em&gt;name is&lt;/em&gt; The Aged Aged Man&lt;/li&gt;&#xA;&lt;li&gt;The song &lt;em&gt;is called&lt;/em&gt; Ways and Means&lt;/li&gt;&#xA;&lt;li&gt;The song &lt;em&gt;is&lt;/em&gt; A-sitting on a Gate&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://en.wikipedia.org/wiki/Haddocks&amp;#39;_Eyes&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt; for a discussion and background as well as the poem itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In programming we don't normally use the first of these four distinctions, but the others are important. The second is how we think of a variable - a name for a thing. The fourth is the thing itself. The third can be an alias or alternate name for the thing, though that analogy isn't perfect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But once the distinction between the name and the thing is made, you have a better chance of winning. But you still need to be clear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;foo&quot; is a thing (a String thing)&lt;br&gt;&#xA;s = &quot;foo&quot; establishes s as a name for that thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;s&quot; is a different (String) thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &lt;code&gt;&quot;/the/path/to/the/file&quot;&lt;/code&gt; is simultaneously a thing (String) but also a complicated name for another thing (a File). The &lt;code&gt;open&lt;/code&gt; method needs a name for the file to be opened. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that much of the above was copied from an essay I wrote in meta. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-25T17:16:42.957" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3327" PostTypeId="2" ParentId="1300" CreationDate="2017-08-25T18:38:50.597" Score="3" Body="&lt;p&gt;When introducing &lt;code&gt;=&lt;/code&gt; and &lt;code&gt;==&lt;/code&gt; in python, I refrain from reading them loud with a name that contains &quot;equal&quot; (or rather « égale » in French).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I always read &lt;code&gt;x = y&lt;/code&gt; as &quot;x takes the value of y&quot; (« x prend la valeur de y » which happens to be literally what the pseudo-language used in earlier classes mandates) and &lt;code&gt;x == y&lt;/code&gt; &quot;x has the same value as y&quot; (« x a même valeur que y »).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this leaves &quot;x equals y&quot; (« x égale y ») for $x=y$ to my math colleagues, which they usually use.&lt;/p&gt;&#xA;" OwnerUserId="2574" LastActivityDate="2017-08-25T18:38:50.597" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3328" PostTypeId="2" ParentId="3325" CreationDate="2017-08-25T19:26:20.540" Score="0" Body="&lt;p&gt;I often see people mixing up files and filename in variable naming. It will result in mixed up thinking. I think it is important to come up with clear names. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to start with giving them lots of code. They then read the code, analyse, modify. In my code I use clear names. We discuss naming, and how this affects readability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also to discuss with class:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I have included some questions about some statement. Use your discretion as when to ask them. I am not suggesting you ask them in a sequence as presented.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you call a subroutine it takes a thing or a name of a thing. e.g. &lt;code&gt;open&lt;/code&gt; takes a string [or the name of a string]. Is `/dev/null' a string? Why is it not a string? Is it the name of a string? Why is it not the name of a string?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you define a subroutine it takes a name of a thing. Why does it not take a thing, why only a name of a thing? Is that a name of a thing?&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-25T19:26:20.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3329" PostTypeId="2" ParentId="3210" CreationDate="2017-08-25T20:38:51.040" Score="3" Body="&lt;p&gt;If he has a decent computer the easiest way to keep him interested (assuming he enjoys computer games) is to introduce him to 'modding'. Modifying computer games is a great way to learn the basics of code, how files can work with an exe, input and output, logging, processing, (assuming the game has a scripting language or allows its source code to be modified) basic loops, statements, logic structures and variables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are avenues to explore which can become relatively complex; it's no stand in for true regimented education with specific goals in mind (like the program I took) but it's a great way to familiarize him with specific concepts. Alternatively memory modification which is a bit too advanced (probably) is an avenue for him to explore as well, potentially via a tool like cheatengine. There's plenty of tools and tutorials for popular games with great modding support like the Total War series or the Elder Scrolls which will be a self learning option for him.&lt;/p&gt;&#xA;" OwnerUserId="2703" LastActivityDate="2017-08-25T20:38:51.040" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3330" PostTypeId="1" CreationDate="2017-08-26T00:29:16.677" Score="34" ViewCount="3267" Body="&lt;p&gt;As evidenced by the numerous poorly asked questions by students on Stack Overflow, it is clear that many students have difficulty understanding &lt;em&gt;how&lt;/em&gt; to ask questions there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even as teachers, we often seem to have difficulty asking questions on Stack Overflow and other Stack Exchange sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There have been flawed attempts with teachers assigning &quot;ask a question and up vote another student's answer&quot; which conflict the &quot;vote on good material, not the user&quot; (along with often asking really awful questions that get down voted and deleted).  Those questions tend to invoke the ire of the Stack Overflow employees and diamond mods and leave everyone involved with a sour taste in their mouth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As students get out into the industry, they may find that having a good understanding of how to search and ask questions on Stack Overflow to be a valuable tool.  So, how do we teach how to use Stack Overflow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Neglecting teaching how to use Stack Overflow in today's world is as bad as not teaching a student how to use a debugger and relying on the industry to teach the basics of software engineering and the tools available and expected to be used with a modicum of proficiency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lack of ability to teach Stack Overflow is also symptomatic of an inability to ask questions generally. Really, we need to teach students to ask the right questions, on Stack Overflow and elsewhere. How can I teach students to ask good questions, on and off Stack Overflow?&lt;/p&gt;&#xA;" OwnerUserId="2709" LastEditorUserId="58" LastEditDate="2017-08-27T10:11:47.923" LastActivityDate="2017-09-10T01:17:03.323" Title="How to teach Stack Overflow more efficiently?" Tags="|lesson-ideas|undergraduate|" AnswerCount="7" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3331" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T02:39:34.377" Score="6" Body="&lt;p&gt;A very good question and a fair one as pretty much all of us face it when suggesting students to use StackOverflow in our class and they &quot;bug&quot; it out of curiosity just to post their assignments (often verbatim).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of restriction of gaining some points before getting a certain privilege and down-voting, students can't abuse it too much, but here are few suggestions which come to my mind for effective use of StackOverFlow in class. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Students must go through the Overview (earning &quot;Informed&quot; badge) to get some understanding of SO's mechanism.&lt;/li&gt;&#xA;&lt;li&gt;Give them an assignment on something like: &quot;&lt;em&gt;Which were Top Posts in this week and why?&lt;/em&gt;&quot;, &quot;&lt;em&gt;Which questions were down-voted and how will you differentiate them with the rest?&lt;/em&gt;&quot; or something like &quot;&lt;strong&gt;&lt;em&gt;Take Posts by new users (say less than 2 month old members) and check which ones had positively scored posts and what do you think made those posts stand out from other new users?&lt;/em&gt;&lt;/strong&gt;&quot; - I think these assignments will inspire them to understand what is a &quot;Good Post&quot; on StackExchange - I started using StackOverflow when I entered in Pedagogical career and even it took me a few months to understand how to ask a good question. I think we can use our own examples as well.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Show your Research&lt;/strong&gt; - It should be the slogan of our class if we want a student to take full advantage of StackOverflow(Exchange).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Be Specific&lt;/strong&gt; - Never ask two/multiple questions in same post. I remember my first post on StackOverflow was a pretty good question but I ruined it by asking a totally irrelevant question in the same post (&lt;em&gt;and realized my mistake a few down-votes later&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt; - Everything on StackOverflow(Exchange) is licensed under Creative Commons License and once you post a thing, even if you delete/edit it's content, its never deleted absolutely (look at revisions history of any post) - so think a lot before posting any sensitive thing.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-09-10T00:46:25.443" LastActivityDate="2017-09-10T00:46:25.443" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3334" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T06:21:53.787" Score="5" Body="&lt;p&gt;I am new to the StackExchange network, and by far, the biggest roadblock has been the reputation problem. The entire StackExchange network is designed to keep out those who are not patient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I am teaching my students to use StackOverflow, boring or not, I tell them to have patience. I tell them that until they get 100 points, they may not actually be able to use stack to the fullest. So, first up is patience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I ask them to take advantage of the network bonus. My primary use of the StackExchange network is StackOverflow but I was getting bored of the restrictions on me. Then, I found this network 'CS Educators' and found that I might perform better here. Only a few days later, I crossed 200 points here, and that immediately bumped me up from a basic user on every network, especially the main StackOverflow. Now, I have all the privileges. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I ask my students to participate in any of the stack network sites. Some students are good, they can participate in puzzle sites. Other are good with tv, then, I ask them to participate there. I tell them to overcome the initial 'stack gate' like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this, its the same guidelines as doing a proper Bing/Google search. search specific words, use the right tags, and be as specific as you can get or don't post the question (and avoid getting down voted). &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2537" LastEditDate="2017-09-10T01:17:03.323" LastActivityDate="2017-09-10T01:17:03.323" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3335" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T06:25:03.920" Score="33" Body="&lt;p&gt;I don't think the core issue is that some students are bad at using Stack Overflow -- I view that more as a symptom of a deeper root problem. When somebody doesn't seem to be able to productively ask questions on Stack Overflow, I think that one or more of the following core issues are at play:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They don't really understand what it means to self-learn and independently research. After all, suddenly switching to independent work can be jarring after being hand-held through learning for the past N years.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They're not efficient communicators. Perhaps they care only about coding but not writing so ignored some of their teachers? Perhaps they were taught only to write essays or short answers where the main goal is to meet some word limit?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They're not familiar with online etiquette and norms.  In particular, when you ask for help in person, it's often ok to ask small questions or ask for general help when stuck. However, that kind of thing is often considered disrespectful, not just on Stack Overflow but many other technical forums -- you're expected to &quot;front-load&quot; your question so you don't waste people's time.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They're unwilling or too impatient to read. After all, Stack Overflow's help center defines exactly what's ok or not. (A perhaps more charitable interpretation is that not all students have fully tuned their ability to tell what must be carefully read vs what can be ignored.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They're ineffective debuggers and so &lt;em&gt;can't&lt;/em&gt; figure out a way to distill their issue into a specific question, even if they wanted to.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They don't know how to gracefully accept criticism and feedback when they inevitably do make a misstep.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, given all this, I think trying to directly teach students to use Stack Overflow is probably a waste of time. There are deeper issues you need to tackle first. I would instead recommend doing some mixture of the below:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Incorporate more independent work into your curriculum (partly to make them less reliant on getting help from teachers and partly so they're more likely to run into questions worth asking).&lt;/li&gt;&#xA;&lt;li&gt;Explicitly make good technical writing one of the goals of your class. Assign lab reports or writeups and grade students based on how effectively they've balanced completeness, concision, and clarity. (Perhaps this can be coordinated across different departments? Science classes often require lab reports, English/writing classes are a thing...). You could also tie this in with academia: make them write research papers.&lt;/li&gt;&#xA;&lt;li&gt;Have your own discussion board where you answer questions. This way, students get some practice writing questions in a friendlier and more tolerant environment -- if somebody asks a poor question, you can prompt them for details to make the question a better one. As time progresses, get more strict: flat-out refuse to answer duplicate questions and the like.&lt;/li&gt;&#xA;&lt;li&gt;Teach students a variety of debugging strategies. Show them how to use a debugger (and walk through several examples). Explain how to do printf debugging in a principled way. Teach them &lt;a href=&quot;http://it.toolbox.com/blogs/tricks-of-the-trade/binary-debugging-21819&quot; rel=&quot;noreferrer&quot;&gt;binary debugging&lt;/a&gt;. When they ask for help, teach them problem-solving strategies instead of directly helping them with their problem (where applicable). Teach them how to pin down and verify preconditions/postconditions/invariants. Teach them how to write (good) tests.&lt;/li&gt;&#xA;&lt;li&gt;Make your students used to receiving feedback. Don't just grade their code based on correctness or whatever: grade on style, conduct code reviews... That said, your students are probably already used to being critiqued after spending N years in school, so perhaps there's nothing extra that needs to be done here...&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(Unfortunately, I don't really know how you can rewire people so they'll actually read things. As I understand it, that's an unsolved problem in the general case.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize these answers are sort of a cop-out -- you were asking how to teach people to effectively use Stack Overflow, and my answer was basically &quot;don't use Stack Overflow&quot;. But in the long term, I do think it'll be for the best. The hope is that once they've graduated, they'll have learned the meta-skills needed to effectively and professionally communicate not just on Stack Overflow, but in other technical forums or at their workplace.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-08-26T23:11:12.467" LastActivityDate="2017-08-26T23:11:12.467" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3336" PostTypeId="2" ParentId="3277" CreationDate="2017-08-26T06:46:35.810" Score="1" Body="&lt;p&gt;Write and Draw on a Projected Board. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;[I must acknowledge that somewhere above &lt;a href=&quot;https://cseducators.stackexchange.com/users/737/no-comprende&quot;&gt;no comprende&lt;/a&gt; has commented this already, but I have my own variation. ]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As much as possible, I always project on a board on which I can write. That way, I can zoom in, and draw circles and shapes around the code I want the students to focus. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a huge problem is that the projector will start projecting on me, and since my powers of invisibility have left me, this isn't always ideal. So, I use the following to focus in my sessions.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use a wireless mouse and keyboard. This allows me to walk around the entire classroom, and standing next to students who have the doubt and there by allowing them to select what they want, saving me a ton of time and making things interactive. Sure, carrying a huge keyboard around is a pain, most of the selection is done with a mouse, so its small and easy to carry around. &lt;/li&gt;&#xA;&lt;li&gt;I use a Wacom tablet with the pencil that comes with it. A lot of times, I am expecting a code block that will probably be discussed a lot. Since I know in advance what these code blocks are, I take screenshots of them and add them into a drawing app (I normally use Photoshop, but you can get free drawing apps on the App Store on the Mac). Then, I use the Wacom pencil and tablet, turning the entire projector into a virtual drawing board. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I particularly love the second method because, I won't be blocking the projector and since the Wacom tablet is also wireless, I can move around the class and improve the pointing out process. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-26T06:46:35.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3337" PostTypeId="2" ParentId="3273" CreationDate="2017-08-26T06:49:30.133" Score="0" Body="&lt;p&gt;(Wished to close this question by updating what I eventually decided to do)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the comments and answers above (with nothing definitive but useful suggestions), &lt;em&gt;I have decided to just go with e-books.&lt;/em&gt; They are cheap, DRM (just make peace with it) and easy to share and discuss. Also, no need to carry your books to each class because you already have your laptop/tablet and that has all your books. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="150" LastEditDate="2017-09-06T14:20:02.540" LastActivityDate="2017-09-06T14:20:02.540" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3338" PostTypeId="2" ParentId="3266" CreationDate="2017-08-26T06:55:17.353" Score="2" Body="&lt;p&gt;I could share what helped me and what I share with my students (who eventually have to end up self-learning things anyway) is to associate what you are learning with something standard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, I have started learning iOS on my own. I asked a couple of iOS developers, got a recommended book, and decided to use that. While the book is used, I mostly end up learning things from stack overflow and apple documentation (which is how I learnt everything I know anyway - official documentation and stack). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I do is compare what I am doing (coding, designing and deployment) with the suggested ways of doing by the official documentation. Back when I was still building windows apps and UI, I would spend hours and hours on how to design the UI as per Microsoft. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same goes to learning anything. There is always some kind of documentation, a mentor, an experience person and forums like stack where you can get to the right techniques. That way, you still get to learn on your own but at the same time, you avoid the pitfalls. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-26T06:55:17.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3339" PostTypeId="1" AcceptedAnswerId="3344" CreationDate="2017-08-26T08:55:00.410" Score="3" ViewCount="7330" Body="&lt;p&gt;This question was prompted by observing a faculty member in projects evaluation. Before asking anything else, the very first question she asked from every student was: &quot;&lt;strong&gt;&lt;em&gt;How many lines does your code have?&lt;/em&gt;&lt;/strong&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I need to know how important this question is and is it really worth asking the nervous students who have just arrived to &lt;strong&gt;&lt;em&gt;present&lt;/em&gt;&lt;/strong&gt; their full projects rather than a routine programming assignment?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: While I am neither in favour nor against this question but I have been coding since 2009/10 and my personal experience reminds me that I still don't remember the lines of code for even my own freelancing softwares (even for my thesis program - by don't remembering I mean I even don't remember &lt;em&gt;whether it was 1200 lines or 1800 lines&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="1293" LastEditDate="2017-08-26T12:27:36.017" LastActivityDate="2020-04-10T13:28:19.120" Title="How many lines does your code have?" Tags="|project|evaluation|" AnswerCount="8" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3340" PostTypeId="2" ParentId="3273" CreationDate="2017-08-26T09:18:18.643" Score="5" Body="&lt;p&gt;I have read E-books since 2008 (completed &lt;a href=&quot;http://ebooks.adelaide.edu.au/o/orwell/george/o79a/chapter1.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;one today&lt;/a&gt;) and found them useful in:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Save the Trees&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Easy/Quick Transportation&lt;/li&gt;&#xA;&lt;li&gt;Multiple copies enable you to comment out etc.&lt;/li&gt;&#xA;&lt;li&gt;Searching, etc. is very easy.&lt;/li&gt;&#xA;&lt;li&gt;Very helpful in finding those books who are unavailable/unheard of/banned in a given jurisdiction.&lt;/li&gt;&#xA;&lt;li&gt;A course/science may have lot of books and one can't purchase all of them (E-books are relatively inexpensive), for example, there are heaps of books on OOP and we can't designate any single one as the Only one, so it would be better to designate one as Textbook (physical form) and use others in E-books form.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Despite all this, I still feel there is no alternative to a Paper-book. I used to hear it since long time, but there are some reasons behind it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;E-books can breach privacy laws and myself being from sub-continent can better understand this situation as this practice is so common in universities and not discouraged even by majority of teachers.&lt;/li&gt;&#xA;&lt;li&gt;A paper-book is a physical entity and free from all the virus/hard-disk format/failure etc. our students are so common practitioners of. I had purchased &lt;a href=&quot;https://www.pearson.com/us/higher-education/product/Elmasri-Fundamentals-of-Database-Systems-6th-Edition/9780136086208.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Elmasri's DB book&lt;/a&gt; in my BS days but to date still using it. &lt;/li&gt;&#xA;&lt;li&gt;Reading through an E-book (either online of PDF, etc.) is prone to the reader losing his/her focus through a social media's notifications, some live match, even a little search on internet for finding the meanings of a word has often ended me up having 50+ tabs open on my browser.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So my personal suggestion is to purchase Paper books for important topics (e.g. some &lt;em&gt;de facto&lt;/em&gt; books like Elmasri, Gonzalez, Silberchatz, etc.) and use E-books for rest/unavailable in physical format or ones available freely.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-08-26T14:08:51.790" LastActivityDate="2017-08-26T14:08:51.790" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3341" PostTypeId="2" ParentId="3291" CreationDate="2017-08-26T09:43:24.957" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Minimal: 'Provide a code solution', (does not necessarily need to be&#xA;  working).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Slightly better: 'Show how your answer works, or does not work, with&#xA;  detailed explanation and/or comments.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Best: 'Show how you tested your solution, describe what problems you found, and how you tried to debug and fix them'.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Awarding a large marks boost for details of testing and debugging renders SO/web copypasta answers much less useful.  Testing and debugging are absolutely essential skills when developing software, and the sooner that students practice those skills, the better for us all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The number of SO posts with non-trivial code, but demonstrating no debug skills whatsoever, is embarrassing.  Too many cannot, (or will not), summon up enough programming skill to print out variables that may help diagnose a problem, never mind acually use a debugger.   Educators should be pressing home the message 'If you cannot debug, you cannot develop programs'.&lt;/p&gt;&#xA;" OwnerUserId="1104" LastActivityDate="2017-08-26T09:43:24.957" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3342" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T09:52:03.767" Score="1" Body="&lt;p&gt;Unless the student is some kind of an expert already, lines of code will be a easy way to filter out those who have no idea what they are doing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets say the lab manual has about 30 lines for the bubble sort implementation. Leaving out exceptionally talented students, most students would have at least 30 lines, and if they don't they probably haven't written the code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its the same concept as in reports. Faculties will ask you to write 2 pages, but what if the content only merits 1 page or 4? Its just another way of valuation. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-26T09:52:03.767" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3344" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T09:54:34.760" Score="10" Body="&lt;p&gt;&lt;strong&gt;What's the point?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why does the number of lines in the project matter all that much? Unless the code is &lt;em&gt;extraordinarily long or short&lt;/em&gt; (i.e. orders of magnitude away from what is expected), lines of code aren't a good indicator of whether a project is good or bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've heard of one example where some students were set the task of creating a &lt;a href=&quot;https://en.wikipedia.org/wiki/Caesar_cipher&quot; rel=&quot;noreferrer&quot;&gt;Caesar cipher&lt;/a&gt;&lt;sup&gt;1&lt;/sup&gt; program. If you're aware of it, you'll know that it can be trivially solved by using modular arithmetic&lt;sup&gt;2&lt;/sup&gt;:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def encrypt(ciphertext, shift):&#xA;    output = ''&#xA;    for character in ciphertext:&#xA;        output += (character + shift) % 26&#xA;    return character&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, the 'smart' solution uses &lt;strong&gt;5 lines&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;One student submitted a solution to that function with 1382 lines.&lt;/strong&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Wait, what?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose you'd quickly realise that this student's solution was... &lt;em&gt;sub-optimal&lt;/em&gt;... if you asked them how many lines when they presented their project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And here's why:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def encrypt(ciphertext, shift):&#xA;    output = ''&#xA;    for character in ciphertext:&#xA;        if shift == 1:&#xA;            if character == 'A':&#xA;                output += 'B'&#xA;            elif character == 'B':&#xA;                output += 'C'&#xA;            ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So now you can see the merits of using code length to spot solutions that are over 250x longer than necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when the difference is much smaller, why bother using lines as an indicator of anything? Hopefully, students are &lt;strong&gt;writing clear, maintainable code, not &lt;a href=&quot;https://codegolf.stackexchange.com/&quot;&gt;playing code golf&lt;/a&gt;&lt;/strong&gt;, so a longer, explicit solution may actually be better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Equally, treating a higher LoC measurement as a better project is a bad idea. If you do that, you're encouraging unnecessarily verbose solutions, like our student who wrote 1400 lines for a 5 line problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;LoC can be useful for spotting &lt;em&gt;really&lt;/em&gt; badly wrong solutions, but setting 'targets' with it can be harmful. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Asking for the length directly is probably pointless—instead, just take a look at that when you review the code and mark it.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;You might also know a variant of this as the &lt;a href=&quot;https://en.wikipedia.org/wiki/ROT13&quot; rel=&quot;noreferrer&quot;&gt;ROT13&lt;/a&gt; cipher where the shift is 13. This has the convenient property of being self-inverse, so you don't need to subtract to decrypt in a separate function. If our student was really clever and wanted to implement that in Python 2, they could have just written &lt;code&gt;input().encode('rot13')&lt;/code&gt;. &lt;a href=&quot;https://xkcd.com/353/&quot; rel=&quot;noreferrer&quot;&gt;It's a whole new world up here!&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;2&lt;/sup&gt;There's a bit of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Lie-to-children&quot; rel=&quot;noreferrer&quot;&gt;lie-to-children&lt;/a&gt; here, if you're not paying attention. That code assumes that all the letters you want to encode are encoded from 0 to 25 (e.g. 0 = A, 1 = B). That's not how character encodings work in reality (there's an offset in ASCII before you get to the capital letters), but it's not relevant for the example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;3&lt;/sup&gt;I cheated and calculated the amount of lines you'd use from that approach, rather than actually writing the whole thing and counting the lines.&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="2" LastEditDate="2017-08-26T10:00:57.413" LastActivityDate="2017-08-26T10:00:57.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3345" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T11:26:56.680" Score="5" Body="&lt;p&gt;I'm surprised that you didn't ask this teacher why she asked this question and how it fits into her overall evaluation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think anyone can answer this question without more information. We can speculate on situations in which it might be a good question and we can speculate on situations in which it might be a terrible question, but we can't know unless we know why it was asked. Some of the other answers here provide such speculation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, you don't say how accurate the teacher expected the answer to be. And we don't know anything about how the teacher intended to use the answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have, myself, asked students at the beginning of a project to tell me how big their self-defined project will be using various measures. That sounds especially stupid until you know that my only goal was to get them to start to think about estimation, which they had never done. The numbers they gave weren't a goal for the project, but only a source of reflection at the end. So at the end, such a question would be completely natural and expected. And expected to be widely divergent from the earlier estimate, of course, since this was their first attempt. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-26T11:33:40.357" LastActivityDate="2017-08-26T11:33:40.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3346" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T12:13:23.627" Score="7" Body="&lt;p&gt;Unfortunately I need to question the very premise of your post. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider the following scenario (suggests Socrates). Suppose that a teacher is asking a student questions. Suppose further that the student has access to a perfect Oracle. Suppose that the Oracle will correctly answer any question to which the answer is known. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose for each question asked of the student, the student consults the Oracle. Since in most situations a teacher is unlikely to ask a question for which he or she doesn't already know the answer, the Oracle itself knows and gives that correct answer to the student. The student then transmits the answer back to the teacher. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What has been gained by anybody? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The teacher learned nothing new. The student has been nothing but a courier between the Oracle and the teacher. The student needs to learn nothing in this transaction and even if he/she tries to memorize everything all they wind up with is a disjoint set of &quot;facts&quot; rather than any skill. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tasks are posed to students not to get answers or to create programs, but to elicit a change in the mental state of the student. We try to prepare students to answer questions to which no one knows the answer and to create programs that have never before been done. We do this by posing tasks that are in fact known to have answers/solutions but those answers and solutions are not known to the student. We want the student to treat the problem as if it is a really hard problem so that they will work through the difficulties - increasing their mental abilities through practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose you spend a year or two never using your left arm in any way. Never even lift your hand or flex your muscles. What will happen? Of course, the muscles will atrophy. The same is true of your brain. If you don't use it you will find that it has turned to mush. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answers you get on Stack Overflow (SO) are the answers of experts. They are like an Oracle. If someone knows how to do it, you may well find the answer on SO. But if you haven't worked on the problem yourself you are just a scribe or a courier of information. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will never be able to solve hard problems unless you solve problems that seem hard to you. You will never be able to advance the art if you haven't practiced on things that require hard work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes the &quot;right&quot; answer is the &quot;wrong&quot; answer. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I agree that SO has its uses, but anything that makes it seem like a panacea is problematic. It is useful to experts who need to produce something external to themselves and need to get past the hard bits efficiently. It can be harmful to students who need to produce a change in their own brains, which can only come from working through the hard bits. Efficiency is not a major goal of education. Efficiency will come, but it comes only from practice.   &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I don't believe that looking something up on wikipedia is the same as asking SO. Wikipedia probably has the answers you want (as does your textbook) but you have to work to figure out the details. It will give you background from which you can probably tweak an answer, rather than getting an answer directly. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A discussion group can work together to figure out answers to some questions. If the members are all novices this is not the same as consulting an Oracle and you learn different skills in any case. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;More valuable than SO is asking your teacher to help get you over the hard bits. He or she can evaluate what it is you really need and either answer the question or send you off on a quest. So again, not the same as an Oracle. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A personal note (no, I'm not Socrates, though it seems like we were contemporaries). I became an expert in using Calculus by graphing literally hundreds of rational functions (quotients of polynomials) by using the information from the first two or three derivatives of the function. I did this completely manually, on paper. Today there is a web site that would do it for me and graphing calculators that will do it. I could do thousands of rational functions (instead of merely hundreds) but I would learn nothing at all. I would be just an observer. I would not have been able to predict the shape of such a function as I once could do pretty effectively. I might be an expert user of a particular web site, but that wouldn't have much effect on my brain. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-26T12:13:23.627" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3347" PostTypeId="5" CreationDate="2017-08-26T12:24:27.677" Score="0" Body="&lt;p&gt;Instructors have many ways to evaluate students, both overall and for specific tasks. Use this tag for all questions related to this necessary function of teaching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exams, projects, teamwork, &quot;pop quizzes&quot;, face to face meetings, etc. have all been used as part of the evaluation process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Questions of uniformity and fairness of evaluation are in scope here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this tag is not for questions of student evaluation of teacher performance. Neither is it for questions of peer-evaluation unless such peer-evaluation feeds into the overall evaluation process of the student. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-05T12:33:08.940" LastActivityDate="2017-09-05T12:33:08.940" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3348" PostTypeId="4" CreationDate="2017-08-26T12:24:27.677" Score="0" Body="Questions related to evaluations of student performance. It is not limited to only exams and formal evaluation. Use this tag to ask questions regarding methods for evaluating students' performance or approaches to such evaluations." OwnerUserId="-1" LastEditorUserId="150" LastEditDate="2019-04-24T13:46:38.150" LastActivityDate="2019-04-24T13:46:38.150" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3349" PostTypeId="5" CreationDate="2017-08-26T12:25:33.190" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-08-26T12:25:33.190" LastActivityDate="2017-08-26T12:25:33.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3350" PostTypeId="4" CreationDate="2017-08-26T12:25:33.190" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-08-26T12:25:33.190" LastActivityDate="2017-08-26T12:25:33.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3351" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T15:22:39.207" Score="2" Body="&lt;h2&gt;Reason 1 : Because without printing it out you can not weigh it.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When I was an university, there was a myth that some lazy teachers (I don't know the technical terms for the roles), would weigh your reports, and give a grade base on that. I heard of one student that handed in some work with a load of blank paper attached, and got a good grade.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Reason 2 : To see how complex it is.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I remember a story by Michael Jackson, about judging how brilliant some one is. I will include the last 3 paragraphs here.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“Terrific,” I mumbled respectfully. I got the picture clearly. Fred&#xA;  as Frankenstein, Fred the brilliant creator of the uncontrollable&#xA;  monster flowchart. “But what about Jane?” I said. “I thought Jane was&#xA;  very good. She picked up the program design ideas very fast.”&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;“Yes,” said the DP Manager. “Jane came to us with a great reputation.&#xA;  We thought she was going to be as brilliant as Fred. But she hasn't&#xA;  really proved herself yet. We've given her a few problems that we&#xA;  thought were going to be really tough, but when she finished it turned&#xA;  out they weren't really difficult at all. Most of them turned out&#xA;  pretty simple. She hasn't really proved herself yet — if you see&#xA;  what I mean?”&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I saw what he meant.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;Reason 3 : To see how complex it is.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Over complex code is bad, see in working out the final grade, the number of lines of code, goes some ware in the denominator.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Reason 4 : Looking for outliers&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is the only one that would make any sense, but people do a lot of thinks that don't make sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because they knew how many line it should take, and they were looking for statistical outliers. If the line count is way off then it is a sign of a problem.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In any case, I could not count lines of code. Even looking for outliers is throught with dangers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few years back, when I was a software engineer. Some one introduced a software metrics tool. It measured Mccabe complexity (various complexities of the code). It was a good tool, and very useful. You could find parts of the code that were un-usual. Often you could find bugs by examining these parts of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One day the head of QA came to me, screaming. He was waving a bit of paper with the results of the tests. It showed that a module, that I had written had a complexity for class dependency that was off the chart. I pointed out that all the other complexity metrics were close to zero. He screamed, &quot;but what about this one&quot;. I pointed out, that this class was a factory, it was its job to own this complexity, because it would be worse to have it spread about. I said &quot;if it was spread about, then the metrics would not find it, ...&quot; he interrupted &quot;then spread it about&quot;. I continued &quot;... but then the code would be much more complex.&quot; -- He looked at me blackly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We stopped using the tool shortly after that. A shame. It was a good tool. It helped us find bugs. However it did not tell us where the bugs were. It told us what the probably bug density is, if you knew how to read it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes lines of code can be useful, but only as a statistical tool.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-04-02T21:09:44.293" LastActivityDate="2020-04-02T21:09:44.293" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3352" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T15:59:17.637" Score="3" Body="&lt;p&gt;I agree with the other posters here: using num LoC as an indicator is a very poor assessment of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would ask instead:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Does it work&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Is it readable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Has it followed the correct conventions?  Spacing, layout, indentation etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) is it modular: resusable, logically broken into functions/methods with appropriate names for funcs/methods and variables&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) Is the documentation adequate (docstring/header, method docs, comments only where appropriate)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Less lines of code does not always mean more efficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using regular expressions may be pretty cool, but can make it very difficult to read for anyone that has to do maintenance on the code, or even to understand.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-26T15:59:17.637" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3353" PostTypeId="2" ParentId="3296" CreationDate="2017-08-26T16:11:38.687" Score="2" Body="&lt;p&gt;Most events for CPD will be specific to a region, so why not consider using MOOCs as a CPD?  Many award certificates, and can be used as part of a more substantial award.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am teaching CS for about 5 years now, and learned Python by completing a number of MOOCs.  The absolute BEST one I've found is from &lt;a href=&quot;https://py4e.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dr. Chuck&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can review all the videos on Coursera.&lt;/li&gt;&#xA;&lt;li&gt;All of the code is available&lt;/li&gt;&#xA;&lt;li&gt;The book is available (free) in many languages&lt;/li&gt;&#xA;&lt;li&gt;There are ideas for assessment in the course&lt;/li&gt;&#xA;&lt;li&gt;All the lecture notes are made available&lt;/li&gt;&#xA;&lt;li&gt;I really like the lecturers presentation style&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are many more courses out there and each one that you complete gives ideas for teaching materials and assessments that you can use.  For example, the Rice University Wk2 assessment is Rock Paper Scissors.  My first term assignment is Rock Paper Scissors Lizard Spock.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope that helps... somewhat :)&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="283" LastEditDate="2017-08-26T19:18:38.037" LastActivityDate="2017-08-26T19:18:38.037" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3354" PostTypeId="2" ParentId="3323" CreationDate="2017-08-26T16:13:10.577" Score="2" Body="&lt;p&gt;With only two days, stick to variants. VBScript works fine even though all it has is variants. Python is in effect much the same (dynamic typing where type is an attribute of the thing named rather than of the name itself) which is one of the reasons why Python has become more popular for teaching the basics of programming. By design, VBScript is a simplified version of VBA designed for light-weight programming. It is telling that when Microsoft developers were deciding how to create a streamline version of Visual Basic, they decided to just stick with variants. In 2 days you won't have enough time to delve into the semantic issues which type declarations would raise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you go this route, I would recommend still emphasizing the importance of using &lt;code&gt;Option Explicit&lt;/code&gt; and explicit &lt;code&gt;Dim&lt;/code&gt; statements, even though they would be in some sense superfluous. You could at least mention other types, and tell the students that if they want to master VBA programming they will need to learn about such things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A compromise possibility would be to use &lt;code&gt;Variant&lt;/code&gt; for non-object types but introduce &lt;code&gt;Range&lt;/code&gt; and &lt;code&gt;Worksheet&lt;/code&gt; variables for objects. The explicit declaration of these types might remind students that they need to &lt;code&gt;Set&lt;/code&gt; the values of those variables rather than simply assign to them, and would also introduce them to IntelliSence.&lt;/p&gt;&#xA;" OwnerUserId="2715" LastActivityDate="2017-08-26T16:13:10.577" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3355" PostTypeId="2" ParentId="3287" CreationDate="2017-08-26T16:42:23.577" Score="0" Body="&lt;p&gt;Well, if you were to use Excel, you could show some of the built-in functions that come with it... They will not know how these work internally, but SUM, MIN, MAX etc. are pretty handy- you could demonstrate what they do and discuss HOW they are doing it internally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After getting different versions pseudocode for the functions, you could discuss using a function many times in one program- in loops...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple &quot;intro&quot; function may be to print a &quot;#&quot; &lt;em&gt;n&lt;/em&gt; times.  You might get some ideas &lt;a href=&quot;http://codingbat.com/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;- I know I did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example may be a bit verbose, but what if you wanted to check a sentence and see how many words in the sentence have two consecutive letters the same...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, there is probably a builtin method such as &lt;strong&gt;split()&lt;/strong&gt;.  Isn't that handy?  How does it work?  Who cares, but it may be interesting to look at how it might work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some &lt;a href=&quot;https://trinket.io/python/c789b9797e&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python Code&lt;/a&gt; for checking if there are two consecutive letters the same in a &lt;strong&gt;word&lt;/strong&gt;.  There are two versions.  Each work differently but do the same thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned already, the main purpose is to allow code-re-use.  It may be worth mentioning concepts such as modularisation, and the analogy that many complex systems are broken down into simpler, smaller subsystems... and simpler problems are easier to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have never taught the same computer course twice the same way, so all we can do is to try out different things, methods, exercises etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope you find some of this helpful!&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-26T16:42:23.577" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3356" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T17:59:48.877" Score="8" Body="&lt;h1&gt;How to teach students, how to ask for help.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I think the question is the same as “How do I teach students, how to ask for help?”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would get them to practice in class, with pen and paper. Some exercises could include:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Practice answering&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Teacher collects some good questions from SO, that are relevant to what pupils have been learning, and prints them out, without answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain in own words what the question is asking. Ask pupils to produce good answers to the questions. Peer review answers, produce a 2nd draft. etc.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Judge questions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Teacher collects some good and bad questions from SO.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students have go group into good and bad. Students have to explain what is wrong. etc.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Create questions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Students are given a task that they can not do, and have to produce a question so that they can learn how to complete the task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Optionally the class can be split into 2 each half learns a different thing, then get a task that only the other half can do. &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Tips for writing questions&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Be clear, proof read (if you can not be bothered to read it, then how can you expect any one else to).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember context. People can not read minds over the internet. The person reading your question is probably not in your class. They have no idea what it is that you are trying to do.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Include what it is that you are trying to achieve.&lt;/li&gt;&#xA;&lt;li&gt;Include how you are trying to achieve it.&lt;/li&gt;&#xA;&lt;li&gt;Show what you tried: The exact text, not what you think the typed.&lt;/li&gt;&#xA;&lt;li&gt;Show what went wrong: The error message, or incorrect output.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;use copy and paste (or select, paste) for the last two&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If the problem is big, then cut it down to size. &#xA;But this is &lt;strong&gt;important&lt;/strong&gt;, re-run the cut down code, and post this code, and its outputs.&#xA;Often you will find the answer your self when doing this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-26T17:59:48.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3357" PostTypeId="2" ParentId="213" CreationDate="2017-08-26T18:30:05.870" Score="3" Body="&lt;h1&gt;UK school years&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;We used to have years &lt;code&gt;1,2, 1,2,3,4, 1,2,3,4,5,6th form&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We then changed to &lt;code&gt;1,2,3,4,5,6,7,8,9,10,11,12,13&lt;/code&gt; (years 12 and 13 are 6th form, no one know where this name comes from).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then we added reception year, to get &lt;code&gt;R,1,2,3,4,5,6,7,8,9,10,11,12,13&lt;/code&gt;.&lt;br&gt;&#xA;&lt;code&gt;R&lt;/code&gt; is just a different symbol for &lt;code&gt;0&lt;/code&gt;. (In the US K is used for 0.)&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-09-15T10:02:30.763" LastActivityDate="2018-09-15T10:02:30.763" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="3358" PostTypeId="2" ParentId="3330" CreationDate="2017-08-26T19:13:40.113" Score="4" Body="&lt;p&gt;When a student comes to me with a question that neither of us can answer, I ask her to post it on Stack Overflow. (An example would be if she's trying to do something in Android that I've never done and that isn't well documented.) Some students are timid about posting online, so they need a little hand-holding and encouragement, which I provide by pointing them to resources on how to write a good question, giving them feedback on their question before they post it, making any needed edits after they post it (letting them know what I've changed), and voting it up, which I can legitimately do, because I've vetted the question. Usually, they get helpful answers. If it's a particularly tricky problem that's holding them up, I offer a bounty. These experiences help build their confidence and skills.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-08-26T19:13:40.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3359" PostTypeId="2" ParentId="3339" CreationDate="2017-08-26T20:28:40.113" Score="1" Body="&lt;p&gt;The scenario here doesn't really give much context for the evaluator's question. Most importantly, we have no information about what she did as a result of the opening question. It is perfectly possible that this opening was a hidden request for context - is the presenter actually familiar with  the code or just doing the PR part of the project? By asking a 'harmless' question which has no right answer, it makes the rest of the questions much easier to pitch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing worse when doing an interview than asking an opening question which your student doesn't understand well enough even to be able to guess the answer. &lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-08-26T20:28:40.113" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3360" PostTypeId="2" ParentId="3330" CreationDate="2017-08-27T06:05:23.547" Score="1" Body="&lt;p&gt;I'm not an SO user - but I've got a bit of experience elsewhere in the network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing I've found that that the folk who get the most out of it are not the ones who ask questions - its the ones who post good answers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than encouraging folk to use it as a &lt;em&gt;helpdesk&lt;/em&gt; it should be an &lt;em&gt;analytical tool&lt;/em&gt;. Pick a question (with no answer?) - Use it as an example point out the problems in the user's approach to the question, and work through a solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;act&lt;/em&gt; of asking a question itself should be a tool for teaching and analysing a problem - &lt;a href=&quot;https://superuser.com/questions/342107/getting-macro-keys-from-a-razer-blackwidow-to-work-on-linux&quot;&gt;This is my favourite question&lt;/a&gt; - and it solves a &lt;em&gt;class&lt;/em&gt; of issues and tries to talk about a problem solving process. While I failed, it still is useful for others as is.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &quot;Ok, here's the problem, lets work it through, lets &lt;em&gt;document&lt;/em&gt;, lets work through it&quot; should come before a question.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the problem here is that &quot;asking on SO&quot; isn't a skill - asking the right questions, the right way at the right time is. &lt;/p&gt;&#xA;" OwnerUserId="2722" LastActivityDate="2017-08-27T06:05:23.547" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3361" PostTypeId="2" ParentId="206" CreationDate="2017-08-27T06:56:20.003" Score="0" Body="&lt;p&gt;When I was a student I was one of these. Back then my faculties would just make me sit around. However, I told myself that if I ever become a faculty, I would not make students wait around. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution is (this is a little brazen, and it may not work in every campus but at least it did in my campus, and sessions that I conduct) is to simply let them go. The normal session is about 3 hours here. So, if someone finishes, I tell them that they are free to leave the class and generally have a good time. Many a times, the labs would be followed by a free afternoon. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found this is to be beneficial to me because...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The ones who finish early, are also the trouble makers. I suppose that is somehow related. Once they are out, I can actually focus on guiding the ones who need my help. These early finishes become a constant source of interruption and that energy can be used on the slow folks. &lt;/li&gt;&#xA;&lt;li&gt;it acts an incentive. Knowing they have an opportunity to leave early, some students tend to put in a little extra effort learning the programs they need. That allure of leaving early can be great motivator. &lt;/li&gt;&#xA;&lt;li&gt;The slow kids also seem to be encouraged by this because they don't have to bear the gloating of the fast finishers for the next 2 and half hours. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Again, before I let these early finishers out, I do take permission from the head of the department or the person incharge. That is a logistical issue, but I ensure that proper protocols are followed. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-27T06:56:20.003" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3363" PostTypeId="1" AcceptedAnswerId="3390" CreationDate="2017-08-27T07:36:07.820" Score="5" ViewCount="612" Body="&lt;p&gt;Last week, 4 students from another college approached me with a scenario. They have a year of college left in them. That means, they will be occupied with all sorts of final year things that may and most possibly help with their career. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, they want me to help them earn some skills. Something that might help them land some kind of employment. I have seen other posts on the site about the languages taught in the beginning and so on, but these students are not exactly beginners. They have finished 6 semesters and have a half baked idea and some exposure to languages such as C, C++ and Java, and may be even some dot net and Linux. However, nothing is employment worthy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, now, I have some decision making to do. What do you ask them (and of course, guide them) to learn? Here are my options (and feel free add yours)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Essential Web - HTML, CSS, Javascript and jQuery. - This is something that is a basic requirement for a lot of jobs where I live. I also believe this is something anybody can learn, even if they are short on time. &lt;/li&gt;&#xA;&lt;li&gt;Java (with Android) - Learn to build an app. Android is pretty straight forward, and does not really require a thorough knowledge of Java itself. &lt;/li&gt;&#xA;&lt;li&gt;Dot Net with C# - Tougher to learn, they may just run away with the complexity involved. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So, I am partial to Essential Web because of the simplicity involved both in terms of time, and also cost. A very basic laptop (perhaps even a used one) is good enough to get them started. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, what should I do? &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorDisplayName="user737" LastEditDate="2017-08-28T18:00:03.087" LastActivityDate="2017-08-29T16:35:14.240" Title="Finishing College with Employable Skills" Tags="|student-motivation|careers|student-perceptions|" AnswerCount="6" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3364" PostTypeId="2" ParentId="3363" CreationDate="2017-08-27T09:42:21.823" Score="5" Body="&lt;h1&gt;Look at their skills, look at their passion.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It they have passion for something, then they will do much better. This passion can not be based on, I think there is money in this.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If their passion is Free Software, or systems administration: Then Gnu/Linux.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If it is web design, aesthetics, user interaction: Then web design.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If it is mobile gaming, or other mobile apps: Then Java/Android.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Also consider Embedded systems, there are more programmers programming Embedded processors, than servers + desktops + probably mobile.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Functional programming will be a big thing in the future, and teaches a lot of useful skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like couchdb: functional, web, javascript, database, no-sql.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then combine passion with a projects (see @Buffy's answer).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If leaning Object orientated, then I believe that learning Eiffel first is quicker. [This is not based on my teaching experience, it is based on a claim of Bertren Myers. Any my experience as a programmer. When I learnt Eiffel I realised that I did not know C++, then I knew C++.]&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-27T11:48:26.557" LastActivityDate="2017-08-27T11:48:26.557" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3365" PostTypeId="2" ParentId="3363" CreationDate="2017-08-27T11:09:30.427" Score="10" Body="&lt;p&gt;The kinds of things suggested in your question and many similar things won't help them. Learning some other &quot;tool&quot; or &quot;language&quot; or &quot;technique&quot; at a beginners level will still leave them with just a bunch of tools they don't really know how to use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead give them a project - preferably a hard project - in which they can use what they have learned, but which also likely forces them to learn at least one new thing. Moreover, if their goal is employment, make it a team project so that they get the experience of working closely with others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can make it a real project, not just an academic exercise, all the better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, make them use some proven methodology, not just hack together a solution. My suggestion would be Extreme Programming, since it is completely defined and has good personal practices within it. It would give them good guidance for a first such project. Scrum, being a bit more general might leave them without the guidance they need, hour to hour. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-27T13:12:00.793" LastActivityDate="2017-08-27T13:12:00.793" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3366" PostTypeId="2" ParentId="3070" CreationDate="2017-08-27T12:03:41.137" Score="1" Body="&lt;h1&gt;Software craftsmanship&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;As professionals, we need a set of ethics (ethics is not the same as morality). Medics have ethics, even lawyers have ethics. They can be struck off from their profession if they do not stick to them. If we do not create our own, then they will be imposed on us (see talk by &lt;a href=&quot;https://www.youtube.com/watch?v=ecIWPzGEbFc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Uncle Bob Martin&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some ways it does not matter exactly what they are. You could have a class discussion. You could include those proposed by others. There are many points of view. A few contradict, but many do not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have included those proposed by Uncle Bob et al.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Agile manifesto&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;We are uncovering better ways of developing&#xA;software by doing it and helping others do it.&#xA;Through this work we have come to value:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Individuals and interactions over processes and tools&lt;/li&gt;&#xA;&lt;li&gt;Working software over comprehensive documentation&lt;/li&gt;&#xA;&lt;li&gt;Customer collaboration over contract negotiation&lt;/li&gt;&#xA;&lt;li&gt;Responding to change over following a plan&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That is, while there is value in the items on&#xA;the right, we value the items on the left more.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Software craftsmanship manifesto&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not only working software, &#xA;but also well-crafted software&lt;/li&gt;&#xA;&lt;li&gt;Not only responding to change,&#xA;but also steadily adding value&lt;/li&gt;&#xA;&lt;li&gt;Not only individuals and interactions,&#xA;but also a community of professionals&lt;/li&gt;&#xA;&lt;li&gt;Not only customer collaboration,&#xA;but also productive partnerships&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That is, in pursuit of the items on the left we have found the items on the right to be indispensable. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-27T12:03:41.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3367" PostTypeId="2" ParentId="3363" CreationDate="2017-08-27T12:22:39.427" Score="2" Body="&lt;p&gt;Off course it is a broad question and depends totally on the:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Student's Interest&lt;/li&gt;&#xA;&lt;li&gt;Student's Aptitude&lt;/li&gt;&#xA;&lt;li&gt;Checking whether that tool/domain has some scope - Say someone wants to work in VB, then I would have really think about it. &lt;a href=&quot;https://insights.stackoverflow.com/survey/2017#technology&quot; rel=&quot;nofollow noreferrer&quot;&gt;This survey&lt;/a&gt; can serve as a good measure but a word of precaution is needed to check the &lt;a href=&quot;https://insights.stackoverflow.com/survey/2017#geography&quot; rel=&quot;nofollow noreferrer&quot;&gt;demography of participants&lt;/a&gt; to compare it with your local market as well.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now I would talk on general terms, @Buffy has a good idea of giving them projects. I like it but I would like to add little bit more: A complete/successful project doesn't always guarantee that a student has covered all the basics of even OOP (&lt;em&gt;assuming he develops project in an OO language/paradigm&lt;/em&gt;) or SQL, etc. &lt;em&gt;(I am coming from a Pakistani background where OOP and SQL still have lion's share in market, this suggestion may vary depending upon the industry you have)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think if I were to give any student a suggestion, it would be to &lt;strong&gt;firstly cover OOP and SQL properly and then complement it by project&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that now SW industry has much more technologies and not everyone gets away with such a luck, but my experience still tells me that &lt;strong&gt;OOP/basic algorithm development and SQL&lt;/strong&gt; are almost necessary for lot of jobs. So my conclusion is, &lt;strong&gt;both OOP, SQL, etc. (Theory) and Project (Practical) are necessary for you even if you are Final year student&lt;/strong&gt; and water has reached near your throat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;P.S: @ctrl-alt-delor's answer has a detailed analysis of technologies road-maps and I would like to refer to it for choosing a specific tool(s).&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-08-27T12:39:33.023" LastActivityDate="2017-08-27T12:39:33.023" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3368" PostTypeId="2" ParentId="3273" CreationDate="2017-08-27T14:38:29.147" Score="4" Body="&lt;p&gt;Cost can be a HUGE burden on a student or school with textbook prices being absolutely ridiculous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think one has to consider how the student will actually be using the book(s). How many times does a textbook go unopened for an entire semester or only brought out due to a required reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you actually use a textbook lock step with the instruction, is it a reference to be used by the student as needed or is it an alternate source that might present the material in a manner that differs from the instructor so as to provide another option if the student is having trouble?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the day, I try to use either freely available books or resources. Does a kid really need an algorithms book or would a combination of web sites with descriptions, pseudocode and animations be preferable?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally like print books but find myself going less and less to them and more and more to finding my own resources via web search. I don't expect my students to possess the same level of search-fu but given how my students work, I think the free online resource is a much better course to take for my situation. Of course other situations can merit other approaches.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-08-27T14:38:29.147" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3369" PostTypeId="2" ParentId="3325" CreationDate="2017-08-27T21:50:57.240" Score="1" Body="&lt;p&gt;The problem appears to be that algebraic substitution comes naturally to your students, since they have been introduced to it much earlier in their education - and I think the idea of a 'number in a box' is much simpler than the idea of a string in a computing context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strings are far more complex concepts than a number - there is the character set mapping, a list of unicode (since they expect accented characters) and a delimiter. For me, the absence of any detail of the implementation was a challenge when it came to learning about string variables - so I can easily imagine that string variables are the ones which stand out as being confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems that you need to refresh the idea of variables being just a label for something, and also that the thing which is labelled is maybe just a representation, rather than an accurate copy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't give any good culturally relevant examples, but maybe one way of relating to the quotation marks is to talk about picture frames. Obviously the variable names can be written on the back of the pictures... With a number it's usually quite clear where the boundary of a picture is. If you had a photo of a window and stuck it on the wall, it might seem to be an actual window - but the picture frame would be a clear recognisable sign that what is inside is a 'representation'. Pictures with addresses, street maps, phone numbers could also be used to play with some ideas about indirection and references.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd re-iterate that it seems to me that numeric variables are probably working for your students by chance, and you can maybe explain the basics what they have inferred in this aspect, and expand on it to include the other data types you need to cover.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-08-27T21:50:57.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3370" PostTypeId="2" ParentId="330" CreationDate="2017-08-27T23:36:27.440" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How, if at all, do you integrate these or similar resources into&#xA;  particular areas of your curriculum? Does this integration work well&#xA;  for increasing student learning?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I teach Python in a &quot;Further Education&quot; course- not university level but the modules compare well with many first-year BSc modules.  Students tend to have little or no background in programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learned a lot from completing MOOCs, and it is somewhat problematic that there is no single source of good materials...but, some of the materials are excellent.  Unfortunately, &lt;strong&gt;not all learners find MOOCs to be a suitable format&lt;/strong&gt; for learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I encourage students to try out a MOOC from EdX, Coursera, Udemy or Udacity, or another site. One assignment this coming year will be to document the &quot;use cases&quot; involved with a MOOC.  Both of the assignments I set are variations from assignments on a Rice course and the fantastic CS50 given by David Malen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each lesson given, consider a &quot;Further resources&quot; section that allows a learner to view:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Videos&lt;/li&gt;&#xA;&lt;li&gt;Tutorials &lt;/li&gt;&#xA;&lt;li&gt;Notes &lt;/li&gt;&#xA;&lt;li&gt;Examples&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;to cater to different learning styles.  &lt;strong&gt;Consider setting a formative assessment to test learning&lt;/strong&gt;, and perhaps &lt;strong&gt;hints to the solution are in the resources&lt;/strong&gt; provided?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of each class, use a &lt;a href=&quot;http://provost.tufts.edu/celt/files/MinutePaper.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;minute paper&lt;/a&gt;, and it may provide an opportunity to clear up any points of confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use Moodle as my LMS, and for each part of the curriculum, I provide notes (in a folder) code and links, including videos, other courses, online discussions and tutorials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, it depends on the individual learner- you can lead a horse to water...etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/i2yvt.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/i2yvt.jpg&quot; alt=&quot;Chuck_and_a_horse&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-27T23:36:27.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3371" PostTypeId="2" ParentId="330" CreationDate="2017-08-28T01:11:08.770" Score="1" Body="&lt;p&gt;A really good question as arguably MOOCs these days are preferred/easily accessible over conventional textbooks in CS. I had the experience of supplementing my curriculum with MOOCs in 2015 and since then, in every course, there are some supplements from them. Here are my observations about this experience:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Clear Advantages&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Easily Available&lt;/li&gt;&#xA;&lt;li&gt;(Mostly) Free&lt;/li&gt;&#xA;&lt;li&gt;Students have access to world's leading professors sitting in their home&lt;/li&gt;&#xA;&lt;li&gt;A huge community of similar (and more experienced - many students take a MOOC more than once) students makes ideas sharing, etc.&lt;/li&gt;&#xA;&lt;li&gt;Many students find Video lectures (can forward, reverse whenever some thing isn't clear - can view them calmly in your room, on mobile, etc.) much easier to understand.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Things to be Wary Of&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Heaps of MOOCs means you can get distracted. There will be points where not only a class lecture and MOOC's lecture will contradict, but also among a couple (or more) of MOOC's. An example I have observed recently when supplementing my ML class with &lt;em&gt;Andrew Ng's lectures&lt;/em&gt; and later on found some disagreement of concepts between respectable professors about Neural Networks theory in Neural Networks &lt;a href=&quot;https://www.coursera.org/learn/neural-networks&quot; rel=&quot;nofollow noreferrer&quot;&gt;dedicated course&lt;/a&gt;. So, it requires you to thoroughly study and guide them before suggesting any MOOC, otherwise it creates a panic among students when they discover such a (even minor or just re-worded) differences.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Those sites barely scratch the surface of what is available&lt;/em&gt;&lt;/strong&gt; – Exactly does my experience say: Often these MOOCs etc. get students very excited in the start but merely after a couple of weeks its realized that they never go into depth like they do in their (university) classes. I tried to supplement a Bioinformatics course using a famous MOOC course but they never went beyond the scope of E.Coli/Yeast and once hype was over, it was pretty disappointing for students.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Personal Conclusion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One must ensure to have a fine balance between benefits/hypes of these MOOCs etc. and the &lt;strong&gt;&lt;em&gt;related&lt;/em&gt;&lt;/strong&gt; knowledge for the course. After few semesters of continuous use of MOOC etc. supplements, I have concluded:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Not a fan of abstract stats, but my experience says that there should be roughly 70-30 ratio of our content and of MOOC, Tutorials, etc.&lt;/li&gt;&#xA;&lt;li&gt;OCWs are much better than MOOCs. I have found &lt;a href=&quot;http://ocw.vu.edu.pk/Courses.aspx?cat=Computer%20Science%2FInformation%20Technology%20&quot; rel=&quot;nofollow noreferrer&quot;&gt;a few&lt;/a&gt; which really go into depth as well.&lt;/li&gt;&#xA;&lt;li&gt;It's iterative process and we always redesign/make some changes in the curriculum based on experience/feedback of one semester and which MOOCs, Tutorials, OCWs, etc. are/were best suited to the course can only be decided by the Course Instructor (&lt;em&gt;which off course includes students feedback as well&lt;/em&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2017-08-28T01:11:08.770" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3372" PostTypeId="1" AcceptedAnswerId="3373" CreationDate="2017-08-28T06:38:24.490" Score="64" ViewCount="26656" Body="&lt;p&gt;I'm a TA for several Bachelor level functional programming courses at my university. In every edition we have problems with some students that have the idea that functional programming is useless, because the industry doesn't use it. The more nuanced students add that some functional programming techniques are useful in any language (they think of lambda expressions in Java, &lt;code&gt;map&lt;/code&gt; in Python, etc.) but that there is no point in learning pure functional programming as you cannot use it to build real-world applications (and if you can, nobody does it). These students usually tend to infect others and that can bring an unpleasant atmosphere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read Hughes' 1990 paper &lt;a href=&quot;https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf&quot; rel=&quot;noreferrer&quot;&gt;Why Functional Programming Matters&lt;/a&gt;, where he explains that people in arguing for FP often tend to show what it doesn't have (assignment, side effects, ...) instead of what it does have. However, the things he mentions that FP does have (higher level of abstraction through gluing functions, lazy evaluation and thus easier modularity) are hard to grasp for mid-Bachelor students. In the end of the course they should be able to understand those advantages when you talk them through it, but the problem is motivating them from the start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that most students will not end up as a functional programmer. But, learning one language means getting more proficient in others, and analogously for paradigms, so I think it is still helpful for them to study it. Yet when I explain this to the students the inevitable question is &quot;why don't you teach us FP in a language that we can actually use later?&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I use to show the usefulness of functional programming?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;Note: like many universities we don't use Haskell in all courses but a lesser known more academical functional programming language. This explains in part the complaints, however, we receive these complaints on Haskell courses as well.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2020-10-06T03:17:35.317" Title="How to answer &quot;functional programming is useless&quot;?" Tags="|student-motivation|functional-programming|" AnswerCount="12" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3373" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T07:47:47.400" Score="80" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What can I use to show the usefulness of functional programming?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is the wrong question, and by trying to answer it you're falling into a trap of accepting and reinforcing the students' misunderstanding of what university is. If I had applied that standard of value to the courses in the bachelor's degree I studied, I think I would only have attended 30 hours of lectures over the three years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may be right that most of them will not end up earning their living by programming in functional languages, although given current industry trends I wouldn't be entirely surprised if you turn out to be wrong in the long term. But if their goal is merely to gain a superficial knowledge of whatever is currently popular in industry, they're not just in the wrong course: they're in the wrong institution, and should drop out and find a bootcamp.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-08-28T07:47:47.400" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="3374" PostTypeId="1" AcceptedAnswerId="3387" CreationDate="2017-08-28T07:57:19.300" Score="24" ViewCount="7089" Body="&lt;p&gt;I am involved in the teaching of CS1 and CS2 at the University of Oslo. We have recently transitioned from Java to Python as our introductory language. We have a strong tradition of teaching students how to use text editors and the terminal to write and run programs, in a Unix environment at our university. Recently, however, a discussion among the teaching staff has arisen about whether or not to transition to using an IDE for the teaching of first-year programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone give me their thoughts on this matter? What are the pros and what are the cons of moving to an IDE-first approach, rather than sticking with editor+terminal?&lt;/p&gt;&#xA;" OwnerUserId="2741" LastEditorUserId="204" LastEditDate="2017-08-28T08:21:38.767" LastActivityDate="2020-03-17T14:27:06.097" Title="IDE vs Editor and terminal for CS1" Tags="|python|ide|" AnswerCount="9" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3375" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T08:18:19.457" Score="10" Body="&lt;h2&gt;There are two types of learning&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The two types of learning that are useful are: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to solve an immediate problem.&lt;/li&gt;&#xA;&lt;li&gt;as an investment, this is the type that you will mostly do at university. Although you will also practice the former, it is not for what you learn, but to learn how to learn.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;The language is irrelevant&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;How many words are there in Python? About 20. How long does it take to learn?&#xA;How long did it take me to learn French? I still have not finished, because the word-space of French is big, but I did learn my first 3000 words in 2 hours, because French is a lot like English.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more languages you know, the quicker you become at learning languages.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Language is important&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My spelling has improved in English since I learnt French.&#xA;My object oriented programming has improved when I learnt functional programming. It was easier and quicker to learn the correct language. I only properly learnt functional when I did it in a functional language. I only properly learnt object-oriented when I did it in Eiffel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more languages you know, the better you become at the others.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Functional is the future&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Moore's Law is coming to an end. Clock speeds have stopped increasing. Transistor count is continuing to increase for now. Core count is increasing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imperative programming does not scale in this environment: When you write a multi-threaded imperative program, you will fill it with locks. This will not only create bugs, but you are causing it to be single threaded.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;No one uses it — are you sure?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A lot of server software uses functional; I know google uses it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may be correct that no one uses it on the desktop, much. But how much computing is done on the desktop? Look at servers, supercomputers and embedded. Most of the CPUs in the world are deployed in embedded systems. At &lt;strong&gt;least&lt;/strong&gt; 80%.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Faster learning&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It can be quicker to learn things separately. Learning functional programming in a functional language, then leaning a non-functional language. Can be quicker than leaning the non-functional language first. However this will depend on may things, including choice of language, how they are taught, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bertrand Meyer, in a touch of class, makes this claim about Object-orientation and Eiffel.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The language is irrelevant&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Give me a functional language with lambdas, and I can implement mutation.&#xA;Give me a non-functional language and I will write very clean, mostly functional code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The Language is important&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;When looking at teaching/learning resources&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;for non-functional languages, they tend to start in lesson 1 with mutation. This is a bad idea even for learning procedural programming.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;for functional languages, they leave mutation until much latter. In structure and interpretation of programming languages, it is about half way through. You will be surprised, I had to look back I could not believe that we had done all that without them. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-29T13:23:20.833" LastActivityDate="2017-08-29T13:23:20.833" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3376" PostTypeId="2" ParentId="3363" CreationDate="2017-08-28T08:22:21.580" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Essential Web - HTML, CSS, Javascript and jQuery. - This is something that is a basic requirement for a lot of jobs where I live. I also believe this is something anybody can learn, even if they are short on time.&lt;/li&gt;&#xA;  &lt;li&gt;Java (with Android) - Learn to build an app. Android is pretty straight forward, and does not really require a thorough knowledge of Java itself.&lt;/li&gt;&#xA;  &lt;li&gt;C # with Dot Net - Tougher to learn, they may just run away with the complexity involved.&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;On the basis of my industry experience, which includes all of the above, I opine that option 3 is the easiest, not the hardest. This comes with the caveat that by &quot;&lt;em&gt;C# with Dot Net&lt;/em&gt;&quot; (which I think should really be &quot;&lt;em&gt;.Net with C#&lt;/em&gt;&quot;) you may actually mean a set of specific APIs which are hard to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there is another consideration. A little knowledge is a dangerous thing. There are enough subtopics of web security to make an entire course; but if you take the .Net/C# option then there are ways to steer it which will support an accompanying project which isn't a Swiss cheese of security holes. E,g, the accompanying project goal could be a WPF application which consumes a third party public REST service, and the relevant security issues will come up in relation to the (hopefully securely designed and implemented) third party service.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-08-28T08:22:21.580" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3377" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T08:42:19.427" Score="4" Body="&lt;h2&gt;For the editor&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can use the same editor for every language.&lt;/li&gt;&#xA;&lt;li&gt;You can use the same editor for every system.&lt;/li&gt;&#xA;&lt;li&gt;You can use the same editor every year: I learnt emacs (and vi) in 1991, and still use them.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They are much simpler, and pupils need to learn the editor/ide at same time as the language.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;IDEs can reinforce the separateness of your program: you program runs on an operating system and can interact with other programs. This can  be diminished by using and IDE.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;For the IDE&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the IDE provides faster feedback, then it can aid leaning and productivity. It the 1960s the interactive tty was a massive improvement in both of there. For an IDE to improve on this, it needs to take it a step further. See work of Bret Victor for where this is hopefully going. However most current IDEs do not do anything useful. With a few exceptions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Effel Studio — can show different views of the code: Editing view, contract view, flat view, pictorial view. This is taking “the code is the documentation to its limit”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Visual Studio — has intelitype, though there is controversy as to whether this aids learning, or results in better code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Eclipse — Allows you to compile code, with out it breaking because of a compilation error in one bit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Most IDEs — have a run button, so run the code that you are looking at. (some editors also have this). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;IDEs often have better code navigation. Show where used.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;IDEs often have better re-factoring tools.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Not all IDEs are the same. Not all editors are the same. You will have to look closely at your editor, IDE, to see if the IDE provides anything more, and does not make things too much more complex.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-28T09:35:43.693" LastActivityDate="2017-08-28T09:35:43.693" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3378" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T08:57:40.920" Score="12" Body="&lt;p&gt;Here are my thoughts on this.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Editor and Terminal&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is most likely the &lt;strong&gt;more lightweight solution&lt;/strong&gt;. Editor and terminal often don't consume much space (or, at least, come bundled with the operating system so it doesn't really matter) and start fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using editor and terminal can demonstrate students that writing a program can be done without using a huge IDE including a lot of tools, as it is essentially &lt;strong&gt;not more than writing down instructions&lt;/strong&gt; using a &lt;strong&gt;normal text editor&lt;/strong&gt; and executing them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An advantage, especially for beginners, could be that it &lt;strong&gt;doesn't overexert the students&lt;/strong&gt; with too much information - in contrast to IDEs that come with syntax highlighting, code style checking, automatic error correction and code suggestion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth noting that there are multiple &quot;levels&quot; of editors: When choosing the editor, one could choose between a simple text editor without any programming-related features (not even syntax highlighting), more advanced editors that have syntax highlighting, or something like &lt;a href=&quot;https://docs.python.org/3.6/library/idle.html&quot; rel=&quot;noreferrer&quot;&gt;IDLE&lt;/a&gt;, which is an IDE on the one hand, but at least in my opinion more like an advanced editor. This could help finding a compromise between a fully-featured IDE and a text editor.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;IDE&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;IDEs are most likely a more &lt;strong&gt;heavyweight solution&lt;/strong&gt;. Normally, they consume a lot of disk space as well as memory and have a notable startup time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can &lt;strong&gt;assist fixing errors&lt;/strong&gt; by highlighting them and providing possible solutions. This is definitely an advantage in day-to-day use, however, when it comes to teaching how to find errors, one could interpret this as a disadvantage, as it's possible that students start to rely only on their IDE when searching errors and wouldn't be able to find them without any help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, IDEs can help to &lt;strong&gt;improve programming speed&lt;/strong&gt; with features like autocompletion, built-in refactoring tools etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A feature that could be nice to have for beginners is that IDEs normally have a &lt;strong&gt;nice debugger&lt;/strong&gt; which could be used to motivate students to debug their code when they see an error. This is something the editor/terminal combination can't achieve - even if there are command line debugging tools, they are most likely not user-friendly enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I believe is also worth noting (inspired by &lt;a href=&quot;https://cseducators.stackexchange.com/users/27/ben-i&quot;&gt;Ben I.'s&lt;/a&gt; &lt;a href=&quot;https://cseducators.stackexchange.com/a/184/793&quot;&gt;answer to a related question&lt;/a&gt;, thank you) that IDEs come with &lt;strong&gt;integration for professional developer tools&lt;/strong&gt; like version control systems or unit testing. I am not sure whether this is already needed in the first year of programming, but I can definitely come in handy later.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-08-28T08:57:40.920" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3379" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T10:29:20.887" Score="5" Body="&lt;p&gt;I like to ease people in. You have mentioned that this is for first year. So, yeah, easing in would really have a positive impact on the overall learning experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to draw from my own experience between a GUI and command line. When I was introduced to version control, the whole thing was intimidating. I decided to go with the Github Desktop, and got an understanding of version control. Once I was okay with that, I switched to the git bash command line. Now, I use command line everywhere, and have been for years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used this technique on many students, and the success rate has been higher. Also, most of these students (at least those who take software development seriously ) will migrate to the command line on their own when they are ready. That way, I leave the choice to them. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-28T11:59:24.750" LastActivityDate="2017-08-28T11:59:24.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3380" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T10:40:10.710" Score="11" Body="&lt;p&gt;Consider what they are saying, discuss with the students, and agree with them that perhaps they are right. Its almost impossible to get anyone interested if they already know that they won't benefit (at least in the monetary sense) from it in the short and medium run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By agreeing with them, you take them into your confidence. Then, find ways to incorporate some of the ideas of functional programming into your general discussion. For instance, C# is the regular (imperative) programming language, something that they would be happy to learn. However, while discussing C#, you can also talk about F# which is functional, and runs on visual studio and dot net. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you play it sly, you could have your cake and eat it too. You never know. Some of the students might even realise (like when they are &lt;a href=&quot;https://en.wikipedia.org/wiki/Eureka_effect&quot; rel=&quot;noreferrer&quot;&gt;taking a bath&lt;/a&gt;) that acquiring a deeper understanding of functional programming will give them a leg up in the long run.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="204" LastEditDate="2017-08-28T10:53:09.163" LastActivityDate="2017-08-28T10:53:09.163" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3381" PostTypeId="2" ParentId="1037" CreationDate="2017-08-28T11:23:34.547" Score="2" Body="&lt;p&gt;Tell them they need to prove the correctness of the programs they submit, for it would be irresponsible for you or for their clients to execute code that they do not know for sure that it will not go havoc (a demo might come handy to demonstrate this).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These students probably think it is boring to prove the correctness, or even the termination, of their programs, too. So, since they are good coders, ask them to code a function that given the source of a program, computes whether this program halts for all relevant inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And to prove that this function itself is correct, of course.&lt;/p&gt;&#xA;" OwnerUserId="2574" LastActivityDate="2017-08-28T11:23:34.547" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3382" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T11:25:16.230" Score="11" Body="&lt;p&gt;Functional programming knowledge will definitely benefit your students.  I think Martin Odersky explains it best here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=3jg1AheF4n0&quot; rel=&quot;noreferrer&quot;&gt;https://www.youtube.com/watch?v=3jg1AheF4n0&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He explains that there needs to be a paradigm shift in the way we think of processing data.  As we progress with technology, we are reaching the limits of transistor size.  Because of this, instead of making processors smaller and more efficient, we will be looking to add more of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will then lead to more parallelization which prefers immutability.  What is one of the crowning side effects of functional programming?  &lt;strong&gt;Immutability&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at big Apache libraries like Spark.  Spark uses Scala, a functional programming language built off of Java, to process &lt;strong&gt;LARGE&lt;/strong&gt; amounts of data very quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say that your students are completely incorrect in their notion that functional programming has not relevance in today's tech world.&lt;/p&gt;&#xA;" OwnerUserId="2749" LastActivityDate="2017-08-28T11:25:16.230" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3383" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T11:51:33.977" Score="5" Body="&lt;p&gt;Give them the following task to implement in plain old Java:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Given is a list of Students with their name, area code and average test score. Write a program that calculates and prints out the average score of all students by each area.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Example input:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;final List&amp;lt;Student&amp;gt; students = Arrays.asList(&#xA;    new Student(&amp;quot;Meyers&amp;quot;, &amp;quot;12345&amp;quot;, 2.3f),&#xA;    new Student(&amp;quot;Miller&amp;quot;, &amp;quot;12345&amp;quot;, 1.1f),&#xA;    new Student(&amp;quot;Swanson&amp;quot;, &amp;quot;34567&amp;quot;, 3.4f)&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Example output:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;34567: 3,40&lt;br /&gt;&#xA;12345: 1,70&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This task is trivial, but the amount of non-functional Java code you need to write is extensive. After they have presented their solutions, show them the solution written in functional Java:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;students.stream()&#xA;    .collect(Collectors.groupingBy(Student::getAreaCode, Collectors.averagingDouble(Student::getAvgScore)))&#xA;    .forEach((code, score) -&amp;gt; System.out.printf(&amp;quot;%s: %.2f\n&amp;quot;, code, score));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Then explain that functional programming is a tool that serves well when you have to deal with tasks that can be described as a mathematical function. And using that will - as demonstrated - greatly reduce the amount of code you have to type.&lt;/p&gt;&#xA;" OwnerUserId="2491" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:35.317" LastActivityDate="2020-10-06T03:17:35.317" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="3384" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T11:57:38.193" Score="38" Body="&lt;p&gt;Hughes is absolutely right, and the following paragraph from his paper hits the nail right on the head:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Such a catalogue of “advantages” is all very well, but one must not be surprised if outsiders don’t take it too seriously. It says a lot about what functional programming isn’t (it has no assignment, no side effects, no flow of control) but not much about what it is. The functional programmer sounds rather like a medieval monk, denying himself the pleasures of life in the hope that it will make him virtuous. To those more interested in material benefits, these “advantages” are totally unconvincing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You say:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;However, the things he mentions that FP does have (higher level of abstraction through gluing functions, lazy evaluation and thus easier modularity) are hard to grasp for mid-Bachelor students. In the end of the course they should be able to understand those advantages when you talk them through it, but the problem is motivating them from the start.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;None of these things are particularly difficult to learn, unless you teach them in an inherently difficult style (such as Haskell or &quot;a lesser known more academical functional programming language.&quot;)  Many functional concepts are useful in the right places, as a &quot;the right tool for the job&quot; sort of thing, but functional languages have a tendency to go overboard and apply these concepts dogmatically rather than pragmatically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imperative languages get this right much more often.  For example, you want your students to understand lazy evaluation?  Teach them to use Python generators or C# iterators.  That's what the &lt;code&gt;yield&lt;/code&gt; keyword is: lazy evaluation.  But it's set up in such a way that you decide when to use it as appropriate, rather than the language dropping it on you as the default.  Want them to understand coroutines?  Teach them &lt;code&gt;async/await&lt;/code&gt;.  Likewise, there's nothing at all in Hughes's explanations of &quot;program gluing&quot; that can't be easily rewritten in modern-day object-oriented languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today, with LINQ (.NET), the Streams API (Java), and Itertools (Python), basic functional concepts are used all the time in industry.  But they're used as &quot;another tool in the toolbox,&quot; to be applied as appropriate.  When your students balk at functional languages, a large part of the problem is because they don't have this approach; they try to cram all these concepts down your throat whether you want them (or even need them at all!) or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A classic example is recursion.  Let's say you wanted to find the length of a linked list.  In Python, you'd do it like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def length(list):&#xA;    result = 0&#xA;    while list is not None:&#xA;        result = result + 1&#xA;        list = list.next&#xA;    return result&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In Paul Graham's paper &lt;a href=&quot;http://ep.yimg.com/ty/cdn/paulgraham/onlisp.pdf&quot; rel=&quot;noreferrer&quot;&gt;&quot;On Lisp&quot;,&lt;/a&gt; he does it a different way.  I'm not going to inflict Lisp upon the audience, (the originals can be found on pages 22 and 23 if you're really curious,) but his naive solution translates to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def our_length(list):&#xA;    if list is None:&#xA;        return 0&#xA;    return 1 + our_length(list.next)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is shorter and simpler than the way I did it, but as he then points out, there's an obvious problem with this: it can produce a stack overflow if the list is long enough.  In order for a functional language to cope with this problem, it needs its functions to be &lt;em&gt;tail-recursive&lt;/em&gt;.  Here's the Python equivalent of his tail-recursive version:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def our_length(list):&#xA;    def rec(list, acc):&#xA;        if list is None:&#xA;            return acc&#xA;        return rec(list.next, 1 + acc)&#xA;&#xA;    return rec(list, 0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Wow!  Look at that monstrosity!  It's as long as my version (6 lines of code), but about twice as complicated and harder to read, requiring a nested function that does all the work for no easily-apparent reason.  It's only when you understand that functional languages hate looping constructs and mutation of variables, and inflict recursion and immutability upon the developer &lt;em&gt;dogmatically,&lt;/em&gt; rather than &lt;em&gt;pragmatically&lt;/em&gt; allowing you to use them as appropriate, that this way even begins to make any sense at all!  (Amusingly, the reason you have to write it as such a mess is so that the compiler can automagically detect that you're using tail recursion and transform the function into a loop featuring the accumulator as a mutable variable, factoring out the toxic recursion so it won't break the stack!)  In reality, recursion is extremely useful when dealing with inherently recursive problems such as tree structures or divide-and-conquer algorithms, but trying to use it on linear problems where a loop is the natural fit is just asking for pain and trouble more often than not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, the reason it's difficult to convince your students that functional programming is not useless is largely because &lt;em&gt;the specific flavor you're teaching them&lt;/em&gt; is, in fact, useless and counterproductive, an active impediment to productivity.  Unfortunately, you probably can't get away from teaching the languages mandated by your curriculum, but if you can explain things in ways that are actually relevant to modern programming practice and their future careers, you'll likely see understanding dawn as they realize how and when these techniques can be appropriate.  What they're missing, because dogmatic functional languages largely reject the concept, is the all-important notion of &quot;the right tool for the job, as appropriate.&quot;&lt;/p&gt;&#xA;" OwnerUserId="2746" LastActivityDate="2017-08-28T11:57:38.193" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3385" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T12:31:54.800" Score="11" Body="&lt;p&gt;Of course it depends on your overall goals. For me, however, the answer is clear: Use the most powerful IDE that I can find (Eclipse or NetBeans fit my def). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started programming on primitive equipment (card punch) and came up through every level since. I don't romanticize the old way of work and I wouldn't go back. I wouldn't try to impose primitive tools on newcomers. But then, in CS1 my goal is to teach them how to program effectively. I think that is a hard enough job that I want to ease the path in every way possible - remove all obstacles to thinking about the problem and creating a solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Eclipse, I can integrate testing. I don't need to type every character of the program. I can leave pretty-printing to the system. I can integrate useful program metrics. I can have compilation done automatically. I can search by structure, not just text. And on and on. Emacs is quite wonderful, but it has about 200 textual commands to learn. Life is short. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't try to impose any less-than-the-most-powerful tool on a pro. I wouldn't on a novice either. However, if someone comes to me already a vim (say) expert, I'd let them use it, and might not even notice. But if they hand me unreadable code, I'll notice pretty quick. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as I said at the top, it depends on your overall goal. For me, the overriding goal is to ease the process so that students can focus on the programming itself and the mind-expansion that comes from that. If a better tool comes along, I'll work to use that. Key punching was abominable. So was the teletype, ... &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Pretty printing is good because it lets me see the structure of a program without first fighting to get it into shape. Not typing close brace lets me think about what I'm trying to create, not the requirements of the language itself. Writing a test for a nonexistent feature and then having the system enter the skeleton for that feature is just marvelous. No cut, switch, paste, or mis-spell and correct. It just works. It lets me get into a flow of creation that I can't do if I'm writing just text. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nor can I find a language that I can't write in Eclipse, since it isn't really an IDE, but a workbench onto which you can plug nearly any tool. Like Emacs, it has a lot of headroom (and isn't unique in that, of course). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-28T12:31:54.800" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3386" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T12:51:49.533" Score="10" Body="&lt;p&gt;I think it is pretty hard to convince students focused on the here-and-now of a lot of things. However, the teacher's job is to teach them what they need to know, not just what they want to know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two reasons for learning a functional language. The most important is that anything that gets you to think hard about something new will make you better at other things as well. If you want your body to be strong you do something like run hard and long so that you sweat and collapse at the end of it (or nearly). If you want to be smart, do the same with your mind. Make it run hard, sweat, and collapse. If you don't know functional programming, learning it will expand your mind. If you &lt;em&gt;do&lt;/em&gt; know functional programming, learning, say, C will have a similar effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other reason is that functional may turn out to be even more important than we think now (or some new paradigm in its place). In particular there are two end points of getting a computer to do something. The first is to describe (somehow) &lt;em&gt;what&lt;/em&gt; is to be done. The second is to describe &lt;em&gt;how it is to be done&lt;/em&gt;. Imperative programs and even OO programs do the latter. They implement algorithms. Every new problem needs a new algorithm - a new set of steps. But we have seen glimpses (mostly Prolog or SQL) of a different world, in which we describe what we want, not how to get it. Functional Programming is much closer to this way of working than the strictly algorithmic approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the reason that &lt;em&gt;that&lt;/em&gt; might be important to learn about is that as machines get more complex, including more parallelism/concurrency, the harder it becomes to program them algorithmically and the more important it &lt;em&gt;may become&lt;/em&gt; to program them descriptively, with the computer itself figuring out an algorithm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason why this hasn't been the norm, yet, is that machines were also insufficiently powerful to manage it. But that is ending now. People preferred imperative programming for &lt;em&gt;efficiency&lt;/em&gt;, but at a certain level of power, that becomes less important than getting the correct answer. After all, it doesn't usually help us to get the wrong answer fast. And generalized algorithms may be the answer to this, pushing us toward the descriptive rather than the process end of the continuum. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-28T12:51:49.533" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3387" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T14:14:23.703" Score="19" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Those two aren't your only options. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main concern is cognitive load: learning to program is difficult enough without adding incidental complexity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've seen an explosion of hybrids in the last few years with good cross-platform support: Sublime, Atom, VSCode, etc. And while you couldn't pry vim out of my cold dead hands, learning it is easy if you already know programming but would be a nightmare if you had to learn it and programming at the same time. Ditto for emacs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And that also applies to IDEs like Eclipse and Visual Studio. They have their own way of doing things. They take forever to open. They are user configurable but not easily. I'll never forget the first time I opened XCode and basically said &quot;what the hell is all of this?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have your students download vscode or atom which work reasonably well out of the box with a healthy plug-in community for growth. They're scriptable in JavaScript and themable with CSS. Unlike notepad it gives you features you actually need to program, unlike nano it uses standard keyboard shortcuts they'll already know from e.g. MS Word (Ctrl-C, Ctrl-V, Ctrl-S, etc). And unlike VS/Xcode/Eclipse it doesn't obscure &lt;em&gt;what&lt;/em&gt; you're doing with a bunch of platform-specific goobledegack: you're editing text files.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Edit&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Can't believe I forgot to mention this but...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They more or less made us use Komodo Edit (free version of the Komodo 'IDE') in my first programming class, which is exactly the kind of thing I'm talking about and I think it really helped. Simple, no configuration necessary, things that should be easy were easy, etc. Don't know if they still offer it or not but I'd say Atom or VSCode are better along just about every conceivable metric.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastEditorUserId="1790" LastEditDate="2020-03-17T14:27:06.097" LastActivityDate="2020-03-17T14:27:06.097" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="3388" PostTypeId="2" ParentId="3374" CreationDate="2017-08-28T16:29:36.603" Score="4" Body="&lt;p&gt;Most of the IDEs that have been mentioned are &lt;strong&gt;more&lt;/strong&gt; confusing than just using a basic text editor and the command line. If I were you, my plan would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start students with a &lt;strong&gt;very basic&lt;/strong&gt; IDE.&lt;/li&gt;&#xA;&lt;li&gt;Allow students to &quot;graduate&quot; to the command line.&lt;/li&gt;&#xA;&lt;li&gt;Then allow students to further &quot;graduate&quot; to more advanced IDEs, which are what most of the other answers are talking about.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With that in mind, you might consider using &lt;a href=&quot;http://py.processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing.py&lt;/a&gt;, which is a very basic IDE that allows you to write Python code that uses &lt;a href=&quot;http://processing.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt; to create simple animated and interactive programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://py.processing.org/tutorials/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; are a bunch of Processing.py tutorials, and you might also check out:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class/2798#2798&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/19/using-processing-as-an-entry-point-in-an-introductory-course/2920#2920&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/173/2068&quot;&gt;https://cseducators.stackexchange.com/a/173/2068&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would recommend starting with Processing.py for the first class, then &quot;graduating&quot; to using &quot;pure Python&quot; on the command line in the second course, and introducing more advanced IDEs towards the middle of that second course.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-29T22:10:43.190" LastActivityDate="2017-08-29T22:10:43.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3389" PostTypeId="2" ParentId="3363" CreationDate="2017-08-28T16:43:00.353" Score="1" Body="&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; Encourage them to start putting together their own personal portfolio webpages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell them to create a webpage that showcases projects they've worked on. Don't know how to create a webpage? Now is a perfect time to learn!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then build from there. Was there a project they were particularly interested in? Expand on that, make improvements, make it interesting for real people to use, then put a link to it on their portfolio. Is there a topic they'd like to learn more about? Great, use that as an excuse to add a project to your portfolio webpage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they only have a year of school left, then they shouldn't need a lot of hands-on help from you. You shouldn't be the one dictating what they explore or learn more about. They should.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Creating a portfolio webpage is helpful for two reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It gives you an excuse to explore various topics. &lt;em&gt;&quot;I want to create project xyz using machine learning&quot;&lt;/em&gt; is a lot easier than &lt;em&gt;&quot;I want to learn more about machine learning.&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;It gives you something to put on your resume. &lt;em&gt;&quot;I created project xyz using Android, here is a link to download the app&quot;&lt;/em&gt; is a lot more convincing than &lt;em&gt;&quot;I learned about Android.&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-29T16:35:14.240" LastActivityDate="2017-08-29T16:35:14.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3390" PostTypeId="2" ParentId="3363" CreationDate="2017-08-28T18:05:48.293" Score="3" Body="&lt;p&gt;My opinion is that Essential Web is the way to go in this specific situation. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. It is clearly employable.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm inferring from the post that at least one of the motivations of the students in question is to be as employable as possible. When I look at the 3 options presented, I feel like Essential Web is the most generally employable. Also, while I haven't looked at the data, I would hazard a guess that web development is very safely high in demand in the current job market (assuming we are talking about North America).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Of the 3, it is most likely the fastest to get something tangibly impressive running.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Android development and (though less so) .NET require a fair bit of proprietary setup. For Essential Web, all you actually &lt;em&gt;need&lt;/em&gt; is a text editor and a web browser, both things that these students likely have and understand. I feel like Essential Web is the fastest to dive straight into learning the concepts and making something that they can be proud of, and add to their githubs/portfolios.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. There is previous familiarity.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is incredibly likely that these students have used the web their entire lives. They likely know at least a few of the basic concepts without even realising it. For someone brand new to all 3, I think the familiarity with Essential Web in particular will really help them to grasp the new, more advanced topics more quickly.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Of course, this is based off of previous comments that they don't really have a previous passion and the time is ticking. In this scenario, I would want to give them the fastest and easiest to teach option that is employable to boot. If time was not a factor, my approach would really be to throw them a few introductions to a few popular technologies and see which one they are most partial to. As it stands in this circumstance though, my opinion is that Essential Web is the best option.&lt;/p&gt;&#xA;" OwnerUserId="2755" LastEditorUserId="2755" LastEditDate="2017-08-29T12:56:00.653" LastActivityDate="2017-08-29T12:56:00.653" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3391" PostTypeId="2" ParentId="3372" CreationDate="2017-08-28T21:21:34.407" Score="16" Body="&lt;p&gt;I think the real trick is in teaching the value of Functional Programming rather than trying to teach the value of Functional Programming Languages.  The latter will fail the pragmatic approach in almost all cases.  Why?  Because functional programming languages &lt;em&gt;intentionally&lt;/em&gt; restrict themselves in the name of purity, and then try to demonstrate that they can be just as effective as other languages.  Meanwhile, the other languages have sought to be productive as goal #1.  It should be &lt;em&gt;expected&lt;/em&gt; that the languages which strive for productivity first will be more productive than those which put productivity second.  If not, those other languages have truly failed.  The mere fact that C, C++, Python, PHP, etc. are all alive and well suggest that even the most staunch supporter of Haskell has to admit that these languages are good at doing what they strive to do.  That thing they do may not be exactly what the Haskell developer wants to do in &lt;em&gt;their&lt;/em&gt; programs, but they have to admit that the other languages do what the other people want them to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of trying to promote the languages themselves, I would try to build a niche for these functional programing languages by building interest in functional programming in general.  You mention that several students already have picked up that functional programming has been working it's way into &quot;mainstream&quot; languages like Java or Python, or even C++11.  Don't fight that.  Leverage that.  Teach them that functional programming, itself, has value.  Use whatever language it takes to teach that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they start getting interested in functional programming itself, &lt;em&gt;that&lt;/em&gt; is the time to start encouraging them to approach languages like Haskell.  Once the students realize that there's another way to solve some of these problems, the functional way, then languages like Haskell can start to sell the argument that everything &lt;em&gt;can&lt;/em&gt; be done functionally.  In fact, the typical battle cry of Haskell lovers is that it can even be done &lt;em&gt;efficiently&lt;/em&gt; and functionally!  This battle cry falls flat if students are currently content with their tools, but if you have demonstrated to them that there is power to this new way of thinking, the battle cry sounds different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The message should not be &quot;learn Haskell, it's a great language.&quot;  The message should be &quot;Learn functional programming.  It's a powerful tool that you can apply in many languages, and it's easy to hone your skills at it using Haskell.&quot;  Or substitute your academic language.  You should be selling the technique, not the language.  Teach them to find a &lt;em&gt;balance&lt;/em&gt; between the procedural styles and the functional styles.  That balance will differ at every business that eventually employs your students.  There is no one &quot;right&quot; balance, so teaching them how to strike the best balance for the moment is a great job skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I learn martial arts.  In my martial arts class, I do lots of things that I will &lt;em&gt;never&lt;/em&gt; find a need to do in real life.  Why do I do them?  Because they teach me skills I &lt;em&gt;will&lt;/em&gt; use in my day to day life, and the most efficient way to learn them is to spend the hours in a pure environment dedicated to honing those skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, I have learned functional programming languages.  In learning those languages, I do a lot of things that I will never do in my day-to-day career.  Why do I do them?  Because they teach me the set of skills I &lt;em&gt;do&lt;/em&gt; use in my career, and the most efficient way to learn them was to spend the hours in a pure environment dedicated to honing those skills.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-08-28T21:21:34.407" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3392" PostTypeId="2" ParentId="3374" CreationDate="2017-08-29T01:44:06.867" Score="10" Body="&lt;p&gt;The real question is this: do you want to teach your students what is actually going on, or teach them which magic buttons to press in an IDE?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course for professional programming work nobody would NOT use the most functional IDE they could find for the task they were doing. But if you throw a complete beginner into the deep end of a tool like MS Visual studio, they are unlikely to have any idea what is going on, and the only way they can create a working project without wasting a lot of time is be following a &quot;magic recipe&quot; provided for them. Personally I don't consider that to be a university-level learning experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course they shouldn't be forced to use a command line &quot;for ever,&quot; but IMO they should certainly be required to use it until they understand the relationship between classes or modules with physical files (including any required naming conventions,) how to get the individual parts connected together into a complete application, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those are &lt;em&gt;transferrable&lt;/em&gt; skills, as is the more basic one of being able to use a command line at all. The details of using a particular IDE are &lt;em&gt;not&lt;/em&gt; transferrable, unless you understand what they actually DO. The command-line-level skills are also what you need to figure out for yourself why a &quot;new improved&quot; IDE isn't doing what you want when you first migrate to it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related to this, also start early teaching them how to use a version control system in a simple way from the command line - not to mention &quot;make!&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, using vi (or vim) or emacs plus command line commands can be an efficient way of working without an IDE, since the command line commands you need often are only one key-press away!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a real working environment, there is nothing more confusing than sitting down at someone else's workstation where they have configured an IDE in a completely different way from your own - that's the time when just firing up &quot;vi&quot; in a command window can be the &lt;em&gt;quickest&lt;/em&gt; to get &quot;real work&quot; done!&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2017-08-29T01:44:06.867" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3393" PostTypeId="1" AcceptedAnswerId="3398" CreationDate="2017-08-29T03:12:11.453" Score="6" ViewCount="81" Body="&lt;p&gt;About a month ago (before they took off for their vacation) some of my technology club members asked me if I could conduct some workshops on cloud. Being a lifelong Microsoft man, and something of an Azure expert, I told them that I could conduct series of short workshops (2 to 5 hours) for them and their friends. Now, they are back from their semester break, and I have to begin in 2 weeks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will appeal to a number of students as the cloud works with dot net, droid, web and iOS. I am expecting a decent audience (the workshop are has a capacity of 8, and I think it will fill up). These are folks who have never seen any cloud dashboard, AWS or Google or Azure. Further, these are folks who are interested, but have probably never even built a simple app and connected to a database. We are looking at a blank slate folks. Curious but currently without knowledge. So, here is what I am planning.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Overview about Cloud, specifically Azure&lt;/li&gt;&#xA;&lt;li&gt;Why Azure (or in general, why cloud service versus say a database server)&lt;/li&gt;&#xA;&lt;li&gt;Cloud Services (data services, web site services)&lt;/li&gt;&#xA;&lt;li&gt;Virtual Machines (and then reconfiguring them to Active Directory, ADFS and FTP)&lt;/li&gt;&#xA;&lt;li&gt;Using items from the marketplace to complete a project.&lt;/li&gt;&#xA;&lt;li&gt;Pricing considerations between cloud providers (Azure, AWS, Google) and conventional solutions (like web hosting, blog hosting providers, VM providers, SQL db providers) &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These are things I am planning. I believe many of you are not just educators but work in the industry (similar to what I do, train and work). So, let me know what else I can add/remove here. Also let me know if you have any thoughts about the topic itself. and, if Azure itself is not the right fit, perhaps something else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the topic itself is too broad, please leave a comment (before down voting if possible), and I will break up the question into many questions and link them up. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-29T07:57:40.607" LastActivityDate="2017-11-07T09:03:30.243" Title="Workshops on Cloud (Azure)" Tags="|curriculum-design|workshops|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3394" PostTypeId="2" ParentId="1052" CreationDate="2017-08-29T03:37:59.567" Score="0" Body="&lt;p&gt;I am surprised that I did not bump into this question already. I have been running an informal tech club for 5 years now. Of course, I have been working from a home office from 5 years, so, I have a lot more free time than others. For instance, I don't have to go to office everyday. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that in mind, I have a simple 'fill when time is available' policy. Some weeks I have a ton of work ( sometimes as high as 50 hours) and other times, its less (as low as 10 hours). On 50 hours weeks, I do everything (discussions, coding sessions, guidance about doubts and clarifications) online, over email and Skype. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On 10 hour weeks, I do more face to face interactions, extended lectures, write ups and so on. My students are used to this ( I communicate them via group email that next week I have a 50 hour week or a 10 hour week) so they also adjust their schedule. For instance, when they know I am on a 50 hour week, they have a lot more free time, so they take care of their time intensive tasks. Then, when they know I have a 10 hour week, they know they will be spending more time at the club, and adjust accordingly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, communication about availability, planning activities based on time available (in other words, the split between work and educating is still happening regularly but the ratio keeps changing dynamically) every week has worked out well for me. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-29T03:37:59.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3395" PostTypeId="1" CreationDate="2017-08-29T06:48:44.437" Score="4" ViewCount="1309" Body="&lt;p&gt;I'm working as a teacher with college students, learning ASP.NET MVC with C#. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One pedagogical problem I have in this environment is how to do CRUD (create, delete, update, select and inner join etc) in the simplest way? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With ASP 6.0 the students had a big control when querying db with plain SQL. With Entity Framework, the learning curve is harder with the code used to get data from database etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After almost 20 years working with php/apache/mysql and asp/ms access there is hard to know which way to go, giving the students &quot;basic/intermediate&quot; knowledge in building dynamic responsive websites connecting to db.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of years ago we started focus on c#.net and sql-server/LocalDB. A great decision! Two years ago we dived into ASP.NET MVC. Fun, but really hard to penetrate for the students. To be more exact, LINQ to SQL, MVC and entity framework are hard to handle in &quot;this levels&quot; and with shorter courses. Are there any good alternatives for LINQ to SQL working in Visual Studio 2017?&lt;/p&gt;&#xA;" OwnerUserId="2791" LastEditorUserId="1293" LastEditDate="2022-08-09T22:35:51.967" LastActivityDate="2022-08-09T22:35:51.967" Title="LINQ to SQL alternative C# Visual Studio 2017 MVC" Tags="|lesson-ideas|c#|.net|mvc|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3396" PostTypeId="2" ParentId="3395" CreationDate="2017-08-29T07:38:11.243" Score="2" Body="&lt;p&gt;I cannot think of a better alternative for LINQ to SQL, especially in Visual Studio 2017. You have said that you have spent 2 years already into MVC, which means, familiarity with MVC can be assumed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, I would say that don't give up on the LINQ + SQL + EF + MVC ( I will simply refer to this as the MVC combo ) combo yet. I am guessing that you have already looked at this &lt;a href=&quot;https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started&quot; rel=&quot;nofollow noreferrer&quot;&gt;link&lt;/a&gt;. I use that in my introductory sessions on MVC, and even newcomers ( I mean, people who have not even tried MVC, or any of the MVC combo components ) have found it easy to use. In my experience, 10 to 15 hours is all it takes to train folks on that (at least the basics). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give it a go, and yes, if you have questions about that link as you teach the different sections, come back and post questions here. We will take care of it for you.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-29T07:38:11.243" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3398" PostTypeId="2" ParentId="3393" CreationDate="2017-08-29T09:24:59.857" Score="3" Body="&lt;p&gt;Here is a short list, of some ideas. You could not teach them all fully in a short time, some you may only introduce, discuss, compare:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What is cloud: Just one or more servers on the internet. The advantage is that you don't have to invest in hardware. Cloud is tech marketing speak for “Somebody else's computer”.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cloud provider independence: Look at tools that allow easy migration to other cloud providers, such as &lt;em&gt;docker-ce&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Cloud services vs my services on someone else's computer.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Gnu/Linux: This OS runs on 490 of the top 500 super computers, the other 10 run UNIX. It is also used by &gt;60% of the web, and most of the internet infrastructure.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;no-sql databases: such as couchdb, mongodb, et al.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;no-cloud: The cloud sounds fluffy and distributed, but it is not. Look at fully distributed systems, such as &lt;code&gt;ipfs&lt;/code&gt;. &lt;code&gt;ipfs&lt;/code&gt; is a bit new, so future looking.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Configuration control: such as pupet, ansible, cf-engine. These can be used to deploy software, and keep servers consistent.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Focus on what service it provides to the user: A place to ask and answer questions vs a web site.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-07T09:03:30.243" LastActivityDate="2017-11-07T09:03:30.243" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3399" PostTypeId="2" ParentId="3372" CreationDate="2017-08-29T09:31:51.133" Score="4" Body="&lt;p&gt;There is a really good teaching point here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideas often arise repeatedly in different contexts. &lt;em&gt;That includes the ideas behind Functional Programming&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also all know how fast computing changes. Your job is to teach them computing, and its up to them to choose how to use it and the specialist areas they need most, &lt;em&gt;which they probably don't yet know as 90% of what they will each  specifically use, and several key paradigms they will come to rely on in their future careers spanning maybe 40+ years, hasn't yet been invented or become the main paradigm.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that you are preparing them for many years ahead, and a broad topic, it is reasonable to include FP and expect it to be taken as serious and useful. Like machine code,  firmware, and logic gates, few of your students will directly use it, but many will indirectly use it and all will use tools and techniques which began in it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As even the protesting students can't tell whether they'll find it useful in future, its got a strong ground for being taught, so they understand the concepts and history behind it, and behind what they now do. Also so its there if they do come in contact with FP work in future.&lt;/p&gt;&#xA;" OwnerUserId="1629" LastActivityDate="2017-08-29T09:31:51.133" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3401" PostTypeId="1" AcceptedAnswerId="3402" CreationDate="2017-08-29T14:02:16.323" Score="19" ViewCount="4316" Body="&lt;p&gt;Code review is crucial to student's academic and professional lives, yet some students see code review as a burden and a new way teachers have found to &quot;ditch some work&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By experience, code review works better if the majority of the class is into it, yet this is becoming more and more rare.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What strategies do you have to motivate students to review each other? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidenote 1: I've seen some teachers ask the class to write some code and ask a student to showcase and the rest of the class would review it, it did not work very well, because it was always the same 4/5 students participating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sidenote 2: I'm dealing with high school and college students&lt;/p&gt;&#xA;" OwnerUserId="118" LastActivityDate="2017-08-30T16:32:36.813" Title="How can we motivate students to review each other's code?" Tags="|secondary-education|collaboration|" AnswerCount="9" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3402" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T14:32:57.867" Score="16" Body="&lt;p&gt;You have an opportunity for several things here:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You can make it a small-team effort rather than a whole-class thing. Say, a team of about 5. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The team reviews everyone's code in sequence so all get to participate. Instead of a &quot;code-review&quot; it can be a &quot;code-quality-workshop&quot;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The team has to write up the results of the review, with an addendum by the code's author about how the code was improved. (Writing is good.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A whole-class retrospective on the process and its effect. (Retrospectives are good.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you have several groups working at once, you will need to wander around and participate in each group, giving pointers on process (rather than product). But you also need to do that if you have the whole class as the set of reviewers, of course. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;An alternative to code reviews, of course, is pair programming, where the need for reviews is lessened or eliminated. Two minds working together are stronger than than the two working separately it turns out when creating code. Code quality has been observed to improve and quantity (statistically speaking) doesn't go down by enough to overcome the quality issue. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You may need to add a level of peer evaluation/review to this as well. Something like the following has worked for me over several years. In any group assignment, each member of the group also submits a peer review sheet. For a group of two (e.g. pair programming) I ask each participant to detail the most important contribution of their partner AND their own most important contribution. I don't ask who worked harder or ask them to make an evaluation. I ask them for the contributions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a group of about five, I will ask each member to name the (say) three most important members of their group and to mention the key contribution of each. I tell them that they can include themself in the list of three. I also ask, separately for their own most important contribution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I let them know at the beginning of the course that this will happen and its parameters, so it isn't a surprise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students see that they are supposed to contribute to a group and are not asked to speak ill of anyone. Keep the questions entirely positive. But you also learn a lot from what is &lt;em&gt;not&lt;/em&gt; said and who is &lt;em&gt;not&lt;/em&gt; included in the contributor list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the project happens outside your view, you also learn things about individuals that you can not otherwise know. I've had students I thought were slacking who were praised by teammates for making the team work properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These peer evaluations are not optional. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This same idea was also discussed here: &lt;a href=&quot;https://cseducators.stackexchange.com/a/2578/1293&quot;&gt;https://cseducators.stackexchange.com/a/2578/1293&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me note that there may be cultural limitations here. In some cultures it may be odd to name oneself as a top contributor. In others it might be very natural. You can modify the scheme, of course, either requiring or forbidding naming oneself as one of the top people. Use your judgement here. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-29T15:55:01.630" LastActivityDate="2017-08-29T15:55:01.630" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3403" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T14:48:41.847" Score="7" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;some students see code review as a burden and a new way teachers have found to &quot;ditch some work&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There's an easy way to teach them to do code review without thinking that you're ditching work: ask them to review some code which &lt;em&gt;you&lt;/em&gt; wrote for the express purpose (or, if you have some suitable code from the previous year's homework, use that). This can be set as homework. For what it's worth, I have had to identify errors in code printouts both in exams and in job interviews, so this isn't an original idea.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-08-29T14:48:41.847" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3404" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T14:57:54.740" Score="9" Body="&lt;p&gt;Some ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Show them that you're serious: grade the student's code reviews -- initially based on effort, then later based on correctness. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will definitely be a lot more work for you, but it does make sure that everybody is practicing and kills accusations that you're trying to avoid work. You may want to deliberately invent poor and buggy code samples to give to students if you're going to take this route (as opposed to having them grade each other's work). You should probably do this carefully to avoid overloading both you and your students.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Incentivize code reviewing somehow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, one idea is to offer students the opportunity to code review each other's work before they submit it -- you then proceed to grade their code fairly harshly. Students are then incentivized to take code reviewing seriously because it's a way to help mutually ensure they get a higher grade. (After all, in humanities classes, you proofread each other's essays -- why not proofread each other's code as well?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea is to tie it into regrades: if students want a regrade of a past assignment, they also need to conduct code reviews related to that assignment (and probably a retrospective). However, this would probably only really feel worth it if your assignments were on the harder end of the scale/you grade strictly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Set up situations to make code reviewing happen organically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, give group projects/pair projects. Tell them that you'll be grading them not only on correctness, but based on how sound their project's design is/how well they follow your in-class style guide. Students will then naturally be incentivized to at least check their partner's work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Incorporate code reviews into your exams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give them short, invented code samples, and ask them to identify all of the style and correctness errors they can find. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-08-29T14:57:54.740" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3405" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T15:02:13.470" Score="9" Body="&lt;p&gt;Have you considered something like a Refactoring Kata? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Refactoring Kata is a project that works exactly as described and passes a given set of unit tests, but is written for the express purpose of being abysmal code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Giving the students horrible code written by someone other than their peers could help people who may think they are being &quot;mean&quot;/not wanting to make another student feel bad. Taking away that human element and splitting it up into a group project may motivate more students to participate more actively and learn how to be critical without &quot;pulling punches&quot; per se. Students could also compare how their peers solved problems differently than themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did this at a job rather than in an academic setting, but I think it definitely could have applications. This was a refactoring kata we did specifically to teach the team the strategy design pattern. It is one of the most popular Katas, GildedRose. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/emilybache/GildedRose-Refactoring-Kata&quot; rel=&quot;noreferrer&quot;&gt;https://github.com/emilybache/GildedRose-Refactoring-Kata&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a good way to see what Katas are all about, and gives a good example structure for creating your own Katas. I see something similar was suggested in another answer, and I concur that creating a Kata that fits your curriculum is most likely the way to go here if you have the time and resources.&lt;/p&gt;&#xA;" OwnerUserId="2755" LastActivityDate="2017-08-29T15:02:13.470" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3406" PostTypeId="2" ParentId="3374" CreationDate="2017-08-29T15:34:23.127" Score="0" Body="&lt;p&gt;Go to local companies and talk to the developers.  The command-line interface is still used a great deal owing to its programmability and extensibility.  My beginning students learn about the command shell.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, Python has command-line arguments, which make programs you create in it far more versatile.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The vi editor and gedit provide very nice syntax coloring.  They also don't &quot;spoil&quot; the user with auto-completes early in their learning.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-08-29T15:34:23.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3407" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T17:05:21.360" Score="3" Body="&lt;p&gt;Providing the class with pre-chosen code, for the specific purpose of teaching quality control skills and methods (of which review is a component) will help to ensure the code is suitable for teaching the points required, and does actually contain review points where you can provide notes and grades fairly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asking students to peer review may mean some get easier or harder code to review than others, and some get code poorly suited to review lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching the class the importance and focus on QC and quality production methods, puts review in a context - they &lt;strong&gt;will&lt;/strong&gt; need this knowledge professionally as almost all software businesses do operate some form of QC and/or review. Simple as that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By giving them code you have chosen, you can be sure that whether individually or in groups, they have a target number of important and secondary review points to identify, which may motivate them to look harder. The rationale is, if you have to find and review 10 major points in a block of code, as part of a review, you might spent extra time taxing yourself to find the last 3 items, compared to an open-ended count. You'll probably remember them better as well.&lt;/p&gt;&#xA;" OwnerUserId="1629" LastActivityDate="2017-08-29T17:05:21.360" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3408" PostTypeId="1" CreationDate="2017-08-29T17:15:10.427" Score="8" ViewCount="187" Body="&lt;p&gt;My students do quite a lot of their work in projects and much of that work is outside my view. While I can just give everyone on a team the same grade (or not) it is useful to me to know who is contributing to the work and &lt;em&gt;how&lt;/em&gt; they are contributing. I don't require everyone contribute either the same &quot;amount&quot; (whatever that means) or in the same way? &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How can I manage peer evaluation so that I get useful information for grading, for advisement, and for course improvement?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I want my students to have a way to comment on the work of their peers on group projects. They can also comment on their own contributions, perhaps, as well. This is especially valuable, I think, when students do much of their work outside my direct view. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need the peer evaluation to not seem threatening to the students, and I don't  want it to generate ill feeling among them. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To make the problem a bit harder, I don't want to divide up the work among the team members myself as I think that would inhibit their learning to be a team. The team itself is responsible for managing its work. Ideally, however, I hold each responsible for the team effort. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-29T17:32:29.403" LastActivityDate="2017-08-30T01:26:37.513" Title="How can I effectively manage peer evaluation among my students?" Tags="|evaluation|peer-evaluation|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3409" PostTypeId="2" ParentId="3408" CreationDate="2017-08-29T17:18:03.087" Score="9" Body="&lt;p&gt;Something like the following has worked for me over several years. In any group assignment, each member of the group also submits a peer review sheet. For a group of two (e.g. pair programming) I ask each participant to detail the most important contribution of their partner AND their own most important contribution. I don't ask who worked harder or ask them to make an evaluation. I ask them for the contributions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a group of about five, I will ask each member to name the (say) three most important members of their group and to mention the key contribution of each. I tell them that they can include themself in the list of three. I also ask, separately for their own most important contribution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I let them know at the beginning of the course that this will happen and its parameters, so it isn't a surprise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students see that they are supposed to contribute to a group and are not asked to speak ill of anyone. Keep the questions entirely positive. But you also learn a lot from what is &lt;em&gt;not&lt;/em&gt; said and who is &lt;em&gt;not&lt;/em&gt; included in the contributor list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the project happens outside your view, you also learn things about individuals that you can not otherwise know. I've had students I thought were slacking who were praised by teammates for making the team work properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These peer evaluations are not optional. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This same idea was also discussed here: &lt;a href=&quot;https://cseducators.stackexchange.com/a/2578/1293&quot;&gt;https://cseducators.stackexchange.com/a/2578/1293&lt;/a&gt;&lt;br&gt;&#xA;It is also, essentially identical to part of this: &lt;a href=&quot;https://cseducators.stackexchange.com/a/3402/1293&quot;&gt;https://cseducators.stackexchange.com/a/3402/1293&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me note that there may be cultural limitations here. In some cultures it may be odd to name oneself as a top contributor. In others it might be very natural. You can modify the scheme, of course, either requiring or forbidding naming oneself as one of the top people. Use your judgement here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also that this solution is based on the &lt;em&gt;Peer Feedback&lt;/em&gt; pattern in &lt;a href=&quot;http://rads.stackoverflow.com/amzn/click/1479171824&quot; rel=&quot;noreferrer&quot;&gt;Pedagogical Patterns: Advice for Educators&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-29T17:44:33.490" LastActivityDate="2017-08-29T17:44:33.490" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3410" PostTypeId="2" ParentId="1052" CreationDate="2017-08-29T17:46:01.833" Score="2" Body="&lt;p&gt;Back in high school, my first programming class was organized like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The first ~25% of each class was &lt;strong&gt;mandatory&lt;/strong&gt; lecture time. Every student listened to the teacher. This time was used for introducing new topics, going over homework or tests, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The second ~25% of each class was &lt;strong&gt;optional&lt;/strong&gt; lecture time. This was for going over stuff in more detail, or for going into the theory behind what we were doing. Students who just wanted to dive into the code could just go get to work on the lab (in the same classroom, but on the computers in the back). But students who wanted more info could stick around in the desks and continue listening.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The last ~50% of each class was lab time for everybody.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I really liked that approach because it offered a little something for everybody. Students who were itching to dive into the code didn't have to listen to stuff they didn't care about, whereas students who weren't as confident in their coding ability (like me) could get a little more hand-holding without feeling like they were holding up the rest of the class. I think this format could work really well in a club setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also say that I think you should invest as much time as possible in project work. Students should spend more time coding than they do listening to you. Give them enough info to get started, but then let them do their thing. On the other hand, I also think you should allow some time for &quot;show and tell&quot; so students can show off what they've done, and see what other students have done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I would use the above format for each club meeting, where you go over some topics or steer students through the stuff you want them working on. Then set aside a day towards the end that's just for show and tell. Maybe make it interesting by having them rate each other's projects in various categories: funniest, most technically challenging, most artistic, etc.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-29T18:27:31.567" LastActivityDate="2017-08-29T18:27:31.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3411" PostTypeId="2" ParentId="3401" CreationDate="2017-08-29T21:14:07.987" Score="1" Body="&lt;p&gt;I think you've nailed the issue: some students will think that code reviews are just a way for the teacher to &quot;ditch some work&quot;. You need to show them that code reviews are actually a best practice in the industry. After all, they are studying for the life, not for the school, right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd call in a guest lecturer. You probably know people who have worked in the non-academic world for quite some time. Ask around your friends and other contacts: I would assume most people would be honoured if they were asked to give a guest lecture. Also if they can't make it, maybe they can recommend someone else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The person absolutely doesn't need to be from any &quot;fancy&quot; company like Google or Apple, I think any local software shop will do provided that the guest has a credible enough (for the students!) CV, say, more than five years of practical experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students will find the lecture a refreshing break from the usual routines and will hear the facts from a third party who has no incentive on ditching any work anywhere. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Finally, I thought about another method too: give them a homework assignment to do some actual code review in codereview.stackexchange.com! Let them pick the piece of code to review themselves (or pre- select a few nice tasks from which they can choose). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It'd be great if they could post their reviews to the actual site, but you could also use your school's intranet or something. If you go with the actual site, consider whether you want to create everyone some random accounts  just for the course or if you'd rather encourage them to create their own personal Stack Exchange accounts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way, they get to review some actual code, and it's not from anyone that they know, so they don't need to hold back.&lt;/p&gt;&#xA;" OwnerUserId="906" LastEditorUserId="58" LastEditDate="2017-08-30T00:09:18.453" LastActivityDate="2017-08-30T00:09:18.453" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3412" PostTypeId="2" ParentId="650" CreationDate="2017-08-29T22:57:13.430" Score="3" Body="&lt;p&gt;Both are a requirement of one of the courses that I teach.  I like to start with a flowchart, as (for all the reasons mentioned by @GypsySpellweaver already) they provide a good visual representation of the problem to be solved, and can help then to generate the pseudo code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Value of flowcharts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Although I have seen it argued that flowcharts are somewhat outdated, I think they still have value due to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the visual representation element.   &lt;/li&gt;&#xA;&lt;li&gt;they may also be used in manufacturing to lay out the process for creating a product. &lt;/li&gt;&#xA;&lt;li&gt;they force the creator to be succinct in the description, reducing the&#xA;verbosity many students like to include in pseudocode.&lt;/li&gt;&#xA;&lt;li&gt;The symbols have meaning that doesn't need to be explained with words&lt;/li&gt;&#xA;&lt;li&gt;they are language independent&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Expanding their use&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Regarding the last point: Once the solution is coded in your language of choice, I like to show the solution in a number of different languages: Fortran, Pascal, C, Java, Python. It is interesting to see how similar the solution something to Fibonacci will be in each of these, and it gives (imo) learners some confidence that, once they master one language, and the concepts involved in software development, they may be better able to learn additional languages in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Equally, providing some code in Fortran and having them generate a flowchart and code in your target language can be an interesting exercise.  Apologies for migrating tangentially here, but I'll assert that it is still related to both pseudocode and flowcharts :)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Free Tool for Flowcharts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A really nice FREE tool is &lt;a href=&quot;http://www.draw.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;draw.io&lt;/a&gt;.  I've tried many, but settled on this one as it is free and is stored in the cloud, so they can work from any computer on a work-in-progress.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;which is better for planning a set of algorithms: pseudocode or flow&#xA;  charts?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I would use both- the flowchart for clarity, and the pseudocode as a step-by-step guide for the code.  Neither is better, and both have their merits.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-29T22:57:13.430" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3413" PostTypeId="2" ParentId="650" CreationDate="2017-08-29T23:32:46.763" Score="3" Body="&lt;p&gt;The other answers are already spot-on, but I wanted to offer another way to think about it...&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;My question is this:&lt;/strong&gt; which is &lt;em&gt;better&lt;/em&gt; for planning a set of algorithms: pseudocode or flow charts?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;By &lt;em&gt;better&lt;/em&gt; I mean faster, more accurate, easier to understand and/or&#xA;  gives a better chance of scoring higher marks.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Like many things in programming, pseudocode and flow charts are both &lt;strong&gt;tools&lt;/strong&gt; that a programmer uses to accomplish their overall goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't make a ton of sense to ask which tool is &lt;strong&gt;better&lt;/strong&gt; overall. A carpenter doesn't ask, &quot;which one is better: a hammer or a saw?&quot; The answer is that they're different tools, used for different jobs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, here's how I'd use each:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Flow charts are good at showing high-level relationships. &lt;em&gt;&quot;System ABC sends message XYZ to service 123, which calls library 456...&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Pseudocode is good for, well, mocking out code. &lt;em&gt;&quot;We're going to use a &lt;code&gt;for&lt;/code&gt; loop here but we don't need to waste time on the absolutely correct syntax right now, so let's use pseudocode.&quot;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, students should use whichever tool is best suited to the particular problem they're faced with, or even a combination of both. It's not an either-or thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I should also note that learning about one tool makes it easier to learn about other tools in the future. The carpenter learns about both the hammer and the saw, and that knowledge will later help them learn about wrenches. Similarly, learning both flow charts and pseudocode makes it easier to learn about other topics in the future. &lt;em&gt;&quot;This UML stuff sure looks similar to flow charts I learned about before!&quot;&lt;/em&gt; &lt;em&gt;&quot;I need to translate this program from one language to another? I know, I'll translate it to pseudocode first!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-08-30T16:39:47.647" LastActivityDate="2017-08-30T16:39:47.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3414" PostTypeId="1" CreationDate="2017-08-29T23:49:34.480" Score="9" ViewCount="519" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there any &quot;pros&quot; or &quot;cons&quot; I have overlooked regarding using Excel&#xA;  as a means to introduce a range of fundamental programming concepts.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This question relates to teaching a programming module at secondary school final year level (one level below first year of university).  I use Python.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Learner profile&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Learners often have no programming or web design background.&#xA;Some lack essential computer literacy skills- creating and saving files, installing applications and so on (I get a diverse group and have no say in selection)&#xA;Learners are all adults, ranging typically from 21 to 61.&#xA;Many have been out of education for a number of years.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Rationale&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Many beginners find using the terminal and IDEs to be quite alien.  Add to that the need to understand key concepts and apply them, it may present a &quot;barrier to entry&quot;.  Using an application that they may have encountered before and likely have on their own computers (when they have one) may allow learners to grasp key concepts in a more &quot;familiar&quot; environment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Syllabus&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;These vary widely, so rather than include &quot;fluff&quot; on the particular one I have to work with, I'll expand on the relevant elements below, which are likely relevant to any introductory programming course.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Relevant topics to explore in the Introduction&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'll try to be succinct but can expand on any topics in the comments&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Variables: cell ref ~ address in memory- not user friendly. Name a cell- can be used in expression, like a variable.&lt;/li&gt;&#xA;&lt;li&gt;Operators and BEMDAS&lt;/li&gt;&#xA;&lt;li&gt;Syntax&lt;/li&gt;&#xA;&lt;li&gt;Boolean AND OR NOT&lt;/li&gt;&#xA;&lt;li&gt;conditional statements&lt;/li&gt;&#xA;&lt;li&gt;built-in functions&lt;/li&gt;&#xA;&lt;li&gt;create a User Defined Function (possibly- not sure on this one).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Pros and Cons&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I've mentioned some of the pros, as I see them.  I cannot think of any cons at the moment: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Are there more pros I've missed, are there possible downsides, and has&#xA;  anyone tried using this before?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2017-08-30T00:21:21.350" LastActivityDate="2018-01-24T11:59:06.960" Title="Introduction to programming class: use Spreadsheets to introduce fundamentals" Tags="|lesson-ideas|secondary-education|teaching-analogy|introductory-lesson|adult-education|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3415" PostTypeId="2" ParentId="3408" CreationDate="2017-08-30T01:26:37.513" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How can I manage peer evaluation so that I get useful information for&#xA;  grading, for advisement, and for course improvement [re] ...on group&#xA;  projects.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I use peer evaluation forms as a part of group projects as discussed by @Buffy above, and I also split the marks between group and individual elements. Taking the question in a wider context, I'll just speak from my own experience of peer evaluation, and the opportunities and difficulties I have found with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first experience of peer evaluation was on the Rice University MOOC, An Introduction to Interactive Programming with Python.  I liked it from the start, and thought it was a great way to grade work, provide feedback and reduce teacher marking time for formative assessments.  We do not use it for summative assessment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;1) Sample exam questions: theory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;An exam paper based on the theoretical elements of the course was designed, and a &lt;strong&gt;grading rubric&lt;/strong&gt; with sample answers prepared.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assigned each &lt;strong&gt;learner an ID number&lt;/strong&gt; known only by myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each learner received a copy of the exam paper with their own number on it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exam paper had space for answers- no separate sheets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least &lt;strong&gt;one question has some ambiguity&lt;/strong&gt;- this is not told to the class, and they cannot ask questions during the exam.  This is to allow discussion of question design afterwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the exam, all papers were &lt;strong&gt;collected and each photocopied 3 times&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each learner is given a copy of a grading rubric and three random answer papers (not including their own)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are given time to grade each paper and &lt;strong&gt;make a note&lt;/strong&gt; where marks not were achieved or partially deducted- this provides each learner with feedback.  &lt;strong&gt;All feedback must be positive&lt;/strong&gt;- indicate what would have improved the answer, and why marks were deducted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Collecting all the papers and re-ordering to give each learner back a copy is tedious work.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the exercise, we had an &lt;strong&gt;open discussion&lt;/strong&gt; on each of the questions, if they could have been phrased more effectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Expansion option:&lt;/strong&gt; Given a specific Learning outcome, how might they create an appropriate question for an assessment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of class, I provided them with sample answers to the exam so they could compare with what they had themselves.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Outcomes:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It was interesting that many &lt;strong&gt;found it difficult to award a grade&lt;/strong&gt;, and did not realise how much time it can take to correct a paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was some &lt;strong&gt;variation in the scoring&lt;/strong&gt; of identical questions- this proved a useful talking point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each learner got &lt;strong&gt;useful feedback&lt;/strong&gt; on their own work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learners have a &lt;strong&gt;greater appreciation&lt;/strong&gt; of the creation and marking of assessments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;It was quite time consuming, but a useful exercise.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;2) Coding mini-assignment- peer grading on Moodle&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Given that photocopying code is a non-runner, I set up a peer-graded Assignment on Moodle.  Each learner had to work on a &lt;strong&gt;mini-programming assignment&lt;/strong&gt; and had two days to complete it and submit online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, getting this to work the first time on Moodle was very time consuming.  Even on the day, there were several delays in getting started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;grading rubric&lt;/strong&gt; identified many elements such as use of &quot;appropriate&quot; names for variables and functions, header info, docstrings (Python), clear user prompts/instructions, working code, use of comments and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When peer-grading, it is possible to place a &lt;strong&gt;comment in each section&lt;/strong&gt; to explain why mark(s) were lost, and each marker can place a final comment/general observations.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Benefits of Moodle Peer assessment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Learners are assigned the work of others to mark &lt;strong&gt;randomly&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Anonymity&lt;/strong&gt; is an option in the setup&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each learner was forced to &lt;strong&gt;really look&lt;/strong&gt; at the &lt;strong&gt;grading scheme&lt;/strong&gt;, which was provided from the outset.  Many lost marks for simple things that they should have included (e.g. header information).  This is important- that they realise &lt;em&gt;they can get &lt;strong&gt;some&lt;/strong&gt; marks&lt;/em&gt; even if the code doesn't work completely or partially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All got to see examples of &lt;em&gt;other learners approaches, structure, working and non-working code&lt;/em&gt;.  Seeing &lt;strong&gt;mistakes&lt;/strong&gt; others make should help them identify those that they make themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teacher can &lt;strong&gt;review all more easily&lt;/strong&gt; without looking through a lot of paper, i.e. the grades given and received by each learner, and the comments given and received.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Difficulties&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have to say, from a practical perspective, it ran about as smooth as a dragons tail (i.e. not at all smoothly) but this was likely due to my inexperience with using this in Moodle.  That said, it was better than paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students failed to provide any feedback even when it was a requirement of the exercise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some relevant/complimentary points also raised &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3401/how-can-we-motivate-students-to-review-each-others-code&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-30T01:26:37.513" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3416" PostTypeId="2" ParentId="3401" CreationDate="2017-08-30T01:33:00.760" Score="1" Body="&lt;p&gt;Set a formative peer-reviewed assignment using an LMS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is based mainly on part of an answer I suggested to a different but related question &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3408/how-can-i-effectively-manage-peer-evaluation-among-my-students/3415#3415&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Coding mini-assignment- peer grading on Moodle&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Given that photocopying code is a non-runner, and distributing files can be difficult, I set up a peer-graded Assignment on Moodle.  Each learner had to work on a &lt;strong&gt;mini-programming assignment&lt;/strong&gt; and had two days to complete it and submit online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This assignment was of a very similar structure and marking scheme as an upcoming summative assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, getting this to work the first time on Moodle was very time consuming.  Even on the day, there were several delays in getting started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;grading rubric&lt;/strong&gt; identified many elements such as use of &quot;appropriate&quot; names for variables and functions, header info, docstrings (Python), clear user prompts/instructions, working code, use of comments and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When peer-grading, it is possible to place a &lt;strong&gt;comment in each section&lt;/strong&gt; to explain why mark(s) were lost, and each marker can place a final comment/general observations.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Benefits of Moodle Peer assessment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Learners are assigned the work of others to mark &lt;strong&gt;randomly&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Anonymity&lt;/strong&gt; is an option in the setup&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each learner was forced to &lt;strong&gt;really look&lt;/strong&gt; at the &lt;strong&gt;grading scheme&lt;/strong&gt;, which was provided from the outset.  Many lost marks for simple things that they should have included (e.g. header information).  This is important- that they realise &lt;em&gt;they can get &lt;strong&gt;some&lt;/strong&gt; marks&lt;/em&gt; even if the code doesn't work completely or partially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All got to see examples of &lt;em&gt;other learners approaches, structure, working and non-working code&lt;/em&gt;.  Seeing &lt;strong&gt;mistakes&lt;/strong&gt; others make should help them identify those that they make themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teacher can &lt;strong&gt;review all more easily&lt;/strong&gt; without looking through a lot of paper, i.e. the grades given and received by each learner, and the comments given and received.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Difficulties&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have to say, from a practical perspective, it ran about as smooth as a dragons tail (i.e. not at all smoothly) but this was likely due to my inexperience with using this in Moodle.  That said, it was better than paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students failed to provide any feedback even when it was a requirement of the exercise.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2017-08-30T01:33:00.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3417" PostTypeId="2" ParentId="3372" CreationDate="2017-08-30T03:10:27.217" Score="3" Body="&lt;p&gt;I would start by distinguishing between the claims&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Functional programming is useless., and&lt;/li&gt;&#xA;&lt;li&gt;Functional programming languages are useless.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's likely that when students say the former, they actually mean the latter, and the latter is more likely to be true (or at least valid) from the perspective of their goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless of whether functional programming languages will be useful to your students, functional programming gives a model for thinking about whether code in whatever language they end up working with has important properties, like being free of side-effects or internal state.&lt;/p&gt;&#xA;" OwnerUserId="1327" LastActivityDate="2017-08-30T03:10:27.217" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3418" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T10:27:57.227" Score="7" Body="&lt;p&gt;The big disadvantage seems to be that you're re-enforcing their (or maybe your own) preconceptions about barriers to entry, and taking them further from the 'normal' programming environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, you can twist a spreadsheet to demonstrate some topics, but the biggest misconception you will teach by starting like this is 'everything executes in parallel'. Having moved from coding software to verilog (hardware) I can vouch for this being a major mindset change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're also teaching a non-flat code layout, have zero scope for sensible comments, and an unusual syntax.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better approach is probably to find an online simulator (i.e. a web browser, which everyone has or can access in many countries). These will handle the code storage (in the browser or in the cloud) and avoids any assumptions about how familiar they are with specific types of software. I really think you're better identifying this as a new journey, and not expecting your cohort to have &lt;em&gt;anything&lt;/em&gt; installed on their machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having supported a public drop-in class, I'd also opt for an environment which allows both 'block' coding or text based views like the &lt;a href=&quot;https://makecode.microbit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;micro:bit javascript blocks editor&lt;/a&gt;. This removes the barrier of needing to remember syntax and seems just as relevant with older introductory level students as very young ones. Once you have introduced the fundamentals (keeping the first contact easy and low stress), you can move to using text based entry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Returning to the micro:bit example, I think having a physical device is less important with an older cohort (particularly if they are in your class by choice). It gives you scope to use a demo, and show some context about how close to invisible/trivial computers are (something else that your spreadsheet doesn't expose).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To &lt;strong&gt;summarise my objections&lt;/strong&gt; to the proposed approach:   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students in your specific cohort may have no (or negative) experience of spreadsheets [unless you already covered this in a prior &lt;em&gt;stand-alone&lt;/em&gt; module]&lt;/li&gt;&#xA;&lt;li&gt;There is no visible execution flow to follow&lt;/li&gt;&#xA;&lt;li&gt;User input is parsed in parallel, not in sequence&lt;/li&gt;&#xA;&lt;li&gt;The abstraction (and syntax) of user input to a spreadsheet does not look like code (compare with the discussion of markup vs program languages)&lt;/li&gt;&#xA;&lt;li&gt;Only one cell of user input can be read at a time (and this makes commenting or review hard)&lt;/li&gt;&#xA;&lt;li&gt;Students are unlikely to find many other resources to use for independent study which are aligned with your proposed approach&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-08-31T09:09:22.050" LastActivityDate="2017-08-31T09:09:22.050" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3419" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T10:31:49.797" Score="7" Body="&lt;p&gt;Spreadsheets are probably the most popular functional programming language, and is is some what visual. I have taught it for years 7 to 9, but not part of a qualification based course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things to be aware of:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is a functional language, as long as you avoid VBA / macros etc.&lt;/li&gt;&#xA;&lt;li&gt;You can do functions, though I am not sure about named functions.&lt;/li&gt;&#xA;&lt;li&gt;I like to put intermediate calculations in to hidden columns. The alternative is very complex formulae / functions, that are hard to read, and hard to write.&lt;/li&gt;&#xA;&lt;li&gt;The hard part is making it relevant. Don't make all of the exercises about accounting.&lt;/li&gt;&#xA;&lt;li&gt;Provide spreadsheets that are started, and give them exercises to add/change something.&lt;/li&gt;&#xA;&lt;li&gt;Don't assume that this is relevant, to them, or that they have any experience. Ask them, give them a choice about how they learn.&lt;/li&gt;&#xA;&lt;li&gt;If the data sets are too small, then it will not seem relevant, as you could do it my hand more easily.&lt;/li&gt;&#xA;&lt;li&gt;There is a lot of copy/paste in spreadsheets, this is the main downside, but to use them well you need to embrace it. This is not so for any other, good, language. In the first lesson, have them enter formula, for about 10 rows. Then show them how to use the little dot in the bottom right of the cell, to make it easier. They love this.&lt;/li&gt;&#xA;&lt;li&gt;Whenever I am teaching programming, I tell them that I am teaching them to be lazy. This helps to engage the lazy ones. Sometimes a hard worker will comment on this, but I tell them “don't worry, one we have learnt to do it the easy way, then this allows as to do more stuff.”.&lt;/li&gt;&#xA;&lt;li&gt;Most of what you do in spreadsheets can be done in python (except data entry), so you can link it to the python lessons.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;While being a good introduction to functional programming. I do not think it is a good introduction to programming. It may be of some help, but I do not imagine the pace of learning will be high.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most people start with Scratch. The main barrier with this language is that it seems childish (it is taught to primary school pupils ( ≤ yr 6 ). There is another language call snap. It is like scratch, but taught to 1st year undergraduates. It has some extra features, such as create your own functions. With Scratch you can create your own procedures, but not functions. Both of these languages are available as a web service, scratch also has a desktop app. Both you can download and host locally (if internet access is poor).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;With snap you can make it look like any other language. I have made it look like python. Unfortunately I could not get all of the blocks to work, but I did use them to create a printed work sheet scratch to scratchy python to python (they did not know that I used snap to help me create it). You can also teach snap to auto generate code in another language. E.g. write program in snap, click generate, and get a python program (I have not properly tried this).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-08-30T19:05:01.847" LastActivityDate="2017-08-30T19:05:01.847" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3420" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T14:06:11.337" Score="3" Body="&lt;p&gt;The choice of using spreadsheets to teach programming itself is kind of baffling for me. I would rather you use of the &lt;a href=&quot;https://www.w3schools.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;several&lt;/a&gt; &lt;a href=&quot;http://jsfiddle.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;online&lt;/a&gt; &lt;a href=&quot;http://www.tutorialspoint.com/compile_c_online.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;ways&lt;/a&gt; to &lt;a href=&quot;http://csharppad.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;teach&lt;/a&gt; coding, which are much more useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If online is not an option and you want something simple, a straight forward combination of &lt;a href=&quot;http://code.visualstudio.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Visual Studio Code&lt;/a&gt; and &lt;a href=&quot;https://gcc.gnu.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GCC Compiler&lt;/a&gt; (which is probably already there on the machine) would be a good option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If these are first years, and I was a first year, I don't want to see Excel sheets. Spreadsheets make command line look like an attractive neighbour. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-30T14:06:11.337" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3421" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T14:22:45.307" Score="4" Body="&lt;p&gt;I got a chance to teach &lt;em&gt;Introduction to Computing &amp;amp; Programming&lt;/em&gt; course to Chemical Engineering entry students and their syllabus included both Programming concepts &amp;amp; Excel. I began the course with just Algorithms and after 4 weeks, switched to Excel &amp;amp; then on programming. Off course they are different to your target audience a bit but I found Excel('s functions) pretty helpful for them to comprehend the syntax (after a couple of weeks of Excel, I switched to Visual C++), so the pros you mentioned are really there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using Excel alone can make students thinking in terms of sheets/tables which can make them picking the concepts of arrays,etc. pretty tough later on and even if you go in some depth of Excel functions, still I don't feel its worth an entire course (even to learn programming). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Conclusion/Suggestion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal experience of using Excel as catalyst was really good one and I think using an user-friendly/easier IDE like Visual Studio with Excel is worth a try&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2017-08-30T14:22:45.307" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3422" PostTypeId="1" AcceptedAnswerId="3424" CreationDate="2017-08-30T14:39:36.560" Score="2" ViewCount="101" Body="&lt;p&gt;By default, I approach every training I conduct ( I mostly conduct sessions for folks who are in their final year, or finished graduation but looking to upskill for a better career) with a simple underlying goal. If you learn xyz technology, will help you (eventually, if not right away) to make a little more money than what you do now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have noticed that there are a lot of students (defined above) are pretty good in what they do (coding stuff). However, they lack certain essential skills that are really warranted in a work atmosphere. Taking my own example, at best, I am a below average developer at best, but somehow somewhere, I end up working in some high level projects. When I self analyse, I notice that my communication skills, presentation skills and simply the ability to discuss without fear with the key stakeholders (like the VPs, CTOs and CEOs) allows me get assignments that otherwise would not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, over the years, I have made it a point to provide feedback about non-technical skills to my students. Now, after so many years of training, I want to take this to the next level. instead of just giving feedback, I want to make it part of my curriculum. There lies my challenge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a session I conducted last year, I noticed that an entire team of developers were just straight up bad with their English. This may seem strange to other community members, but English, the preferred language of communication itself is a huge challenge for many of us folks here in India. When I finished my gentle tirade by concluding that the reason why all of them being billed lowered rates despite being technically competent (and I was one of the trainers who made that happen) is because you guys cannot speak and communicate in general. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, despite maintaining excellent ratings for all the previous ratings, for the last day, I got 1 out of 10 ratings for every point in the review sheet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, a very long story short, like the English example above, there are so many other qualities that are lacking in developers in general. I want to make it part of my training, but at the same, I don't want to end up with negative reviews either. You folks are in the education domain. Have you faced this issue? How can I handle this? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, the only solution I have is, just give up on that. My pay is linked to my reviews. At the same time, I feel strongly about this. As always, if this is too broad, I hope the mods will flag it, or I can break it up into individual questions. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-30T19:39:04.280" Title="Course for the more practical aspects of software development" Tags="|soft-skills|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3423" PostTypeId="2" ParentId="3401" CreationDate="2017-08-30T14:56:53.877" Score="4" Body="&lt;p&gt;Why not create a multi stage project for them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They all code up something for stage 1. You then give out each students stage 1 to another student and ask them to complete stage 2 using the code that they received.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next the completed stage 1 and 2 work is given to another student to complete a stage 3 (they are then reviewing, extending and understanding another 2 students work). This will help them learn to work with other students code and they are learning from each other. An example of such a project may be a multi page form, submission and validation.&lt;/p&gt;&#xA;" OwnerUserId="2834" LastEditorUserId="41" LastEditDate="2017-08-30T15:35:11.693" LastActivityDate="2017-08-30T15:35:11.693" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3424" PostTypeId="2" ParentId="3422" CreationDate="2017-08-30T15:39:41.370" Score="3" Body="&lt;ul&gt;&#xA;&lt;li&gt;Let students know this is part of the curriculum going in. If they take your class, they shouldn't be surprised by these soft skills lessons.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Demonstrate the value. If students are there for hard-core technical skills they may grow impatient if you &quot;waste their time&quot; with soft skills. However, if you preface the soft skill lessons with discussions of why they're important - numbers if you have them, anecdotes if you don't - you'll get more buy-in, more attention, more appreciation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Praise in public, criticize in private. It sounds like your &quot;gentle tirade&quot; was not private. Maybe it was private to the group of folks to whom it was directed, maybe it was public for the whole class, but if you embarrass someone in front of others, don't expect them to feel good about it - or you - or your class. I'm sure the response to this type of feedback varies slightly by culture (and I have almost no knowledge of Indian cultures), but I haven't heard of any culture where people enjoy being publicly embarrassed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Offer suggestions. If you simply told me my English was bad without giving me a plan for fixing it, then... you've simply made me feel bad about myself without teaching me anything.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ignore things people can't change. If you think my English is bad because of my poor grammar, vocabulary, ... then okay, that's something I can fix. If the problem is my pronunciation because I literally can't hear the difference between &quot;rice&quot; and &quot;lice&quot; or between &quot;heat&quot; and &quot;eat&quot; then just leave it alone.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2017-08-30T16:13:12.247" LastActivityDate="2017-08-30T16:13:12.247" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3425" PostTypeId="5" CreationDate="2017-08-30T16:12:31.413" Score="0" Body="&lt;p&gt;Soft skills are things that are not really part of the job description (all the time) but they do help make for a better levels of productivity.&lt;/p&gt;&#xA;&lt;p&gt;For instance, a team that is fully aware of how to use Slack, would be great. So, perhaps you are wondering how to introduce Slack into your discussions. You may have to convince your students why knowing Slack, and learning it now would be a useful thing to do.&lt;/p&gt;&#xA;&lt;p&gt;Another example would be, comments and code documentation. Although, nobody expects a fully grammar compliant sentences in their code, at least if they knew the benefits of having at least barely passable sentences as compared to single word sentences.&lt;/p&gt;&#xA;&lt;p&gt;This is not about pure soft skill training. Nor is this tag for trainers having difficulty communicating with your students, or them with you. or between each other.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="1035" LastEditDate="2023-03-15T10:42:42.933" LastActivityDate="2023-03-15T10:42:42.933" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3426" PostTypeId="4" CreationDate="2017-08-30T16:12:31.413" Score="0" Body="use this if you are trying to incorporate the 'soft' part of software development skills in your training. For instance, your students are dealing with communication issues with a team, or a team in training has difficulty with their clients. " OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-30T16:58:04.027" LastActivityDate="2017-08-30T16:58:04.027" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3427" PostTypeId="5" CreationDate="2017-08-30T16:15:20.170" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-08-30T16:15:20.170" LastActivityDate="2017-08-30T16:15:20.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3428" PostTypeId="4" CreationDate="2017-08-30T16:15:20.170" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-08-30T16:15:20.170" LastActivityDate="2017-08-30T16:15:20.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3429" PostTypeId="5" CreationDate="2017-08-30T16:21:22.223" Score="0" Body="&lt;p&gt;Workshops are one time events, for a small group of audience. In a workshop, major assumptions can be made (like that they all know dot net at some professional level) and they are here for a more hands on experience. Course content is flexible and tailored to the audience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Course content may not be reused, and is probably discard after the workshop is done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask questions that relate to challenges you are facing before, during and after it is conducted. For instance, how would you design the content for a specific type of audience. How to avoid getting into lengthy discussions on theory (which takes away time from hands on) with one or two students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't use this tag for scenarios and challenges you have to deal with a regularly scheduled class, like classes that takes place in a semester or a 20 day induction program and so on. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-30T16:57:48.647" LastActivityDate="2017-08-30T16:57:48.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3430" PostTypeId="4" CreationDate="2017-08-30T16:21:22.223" Score="0" Body="questions about conducting workshops, designing course content and logistics of doing so." OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-30T16:58:01.507" LastActivityDate="2017-08-30T16:58:01.507" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3431" PostTypeId="2" ParentId="3401" CreationDate="2017-08-30T16:32:36.813" Score="1" Body="&lt;p&gt;Make the review actually useful: have them swap their code. When they'll realize that their future tasks depend on their colleague's performance (which is how job works), they'll appreciate the need to keep each other in line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;exercise 1: write code doing X.&lt;/li&gt;&#xA;&lt;li&gt;code review&lt;/li&gt;&#xA;&lt;li&gt;swap code with another student.&lt;/li&gt;&#xA;&lt;li&gt;exercise 2: expand given code to do Y.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will more closely resemble how actual team works.&lt;/p&gt;&#xA;" OwnerUserId="2800" LastActivityDate="2017-08-30T16:32:36.813" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3432" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T17:02:48.007" Score="1" Body="&lt;p&gt;I agree with most of the other answers, but I wanted to add another way to look at it:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think one of the biggest downsides of using spreadsheets to introduce programming is that it reinforces a lot of stereotypes about programming, which turns off a lot of people who might otherwise have been interested in the subject. If the first day of my first programming course was &quot;okay, now open up Excel...&quot; my eyes would have glazed over and I would have thought &quot;maybe this programming stuff isn't for me after all...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming is more than just ones and zeroes or staring at spreadsheets. There's a &lt;strong&gt;craft&lt;/strong&gt; to it, if not an art, and it opens up a ton of possibilities for expressing yourself, communicating ideas, and accomplishing your goals. I think that's the stuff you should be highlighting in your first course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And since you're working with students from diverse backgrounds and of under-represented groups in computer science, I think you should be very aware of the effect your class has on their interest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the risk of repeating an answer I've given before, I'd like to point you to &lt;a href=&quot;http://processing.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, which I think is perfect for the type of class you're teaching. See these other questions for more info:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class/2798#2798&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/19/using-processing-as-an-entry-point-in-an-introductory-course/2920#2920&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/161/programming-languages-specifically-designed-for-beginners/173#173&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I've written a bunch of tutorials that start in Processing and then &quot;graduate&quot; to more advanced topics available at &lt;a href=&quot;http://happycoding.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;HappyCoding.io&lt;/a&gt;, and I think they're pretty amenable to a classroom environment.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-08-30T17:02:48.007" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3433" PostTypeId="2" ParentId="3414" CreationDate="2017-08-30T17:22:30.230" Score="1" Body="&lt;p&gt;Perhaps you should first examine the goals you have for your students. Where do you want them to end up. You describe them as pretty unsophisticated in computing when they begin. The students you describe aren't completely unique, of course, but are not the typical high-school or college student. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If all you want is to give them a little bit of a glimpse of programming in a more general course, then your approach seems fine to me, though I would probably do something different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel that spreadsheets would be an especially useful thing for them to know more deeply, then certainly what you are doing is fine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want them to be able to use some general purpose programming language eventually, then it seems to me like you are taking a detour that isn't getting them close enough to the goal to warrant the time and effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;User ctrl-alt-delor &lt;a href=&quot;https://cseducators.stackexchange.com/a/3419/1293&quot;&gt;suggested&lt;/a&gt; simple programming environments like &lt;em&gt;snap&lt;/em&gt; and &lt;em&gt;Scratch&lt;/em&gt; which offer a more standardized introduction to programming and that aim more directly toward that goal, if it is, indeed, your goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But start with the goal and work from there. Don't take too many side trips or trips that later need to be worked back from. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Sorry, I should have said initially, that if the students already have some fairly deep understanding of spreadsheets, what they do, and how, then this is a much more natural kind of thing to do. However, if they are also naive about spreadsheets, then this might create problems instead of help overcome them. But you need to asses your own students, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-30T19:34:12.760" LastActivityDate="2017-08-30T19:34:12.760" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3434" PostTypeId="1" CreationDate="2017-08-30T18:20:04.433" Score="4" ViewCount="210" Body="&lt;p&gt;Literature states that there are particularly difficult issues with introducing programming, and that many of the issues are still not well understood. But some results indicate that these are some effective methods:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Presenting worked-out examples in lecture&lt;/li&gt;&#xA;&lt;li&gt;Providing partially worked programs for lab exercise&lt;/li&gt;&#xA;&lt;li&gt;Asking for an explanation of a complete example in tests&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These methods reduce cognitive load, so that the students can focus on the relevant ('germane') details while learning or demonstrating proficiency. Other details and distractions cause 'noise' which make the cognitive load too high. Another factor is that methods that work for beginners are inappropriate or hindering to more advanced students, and in a classroom with varying abilities it can become difficult to structure material or present it properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps the biggest variation is in student's predispositions towards problems solving. This quote points to a major obstacle to most programming learning:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A weakness of worked-out examples is that they may not engage the&#xA;  learner enough to induce germane load. The effectiveness of the&#xA;  examples is negated if the learner does not study them attentively and&#xA;  explain the given solution to themselves. The literature suggests that&#xA;  many learners are not naturally inclined towards effective spontaneous&#xA;  self-explanation of worked-out examples.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Self-explanation&lt;/em&gt; is a skill or tendency which is thinly distributed in the population. Can it be promoted somehow?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What methods have you found most effective with beginner programming students for showing new material and having students practice it?&lt;/p&gt;&#xA;" OwnerDisplayName="user737" LastEditorUserId="1293" LastEditorDisplayName="user737" LastEditDate="2017-10-11T18:25:50.970" LastActivityDate="2017-10-11T18:25:50.970" Title="Best Practices for introductory teaching" Tags="|best-practice|adult-education|exercises|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3435" PostTypeId="2" ParentId="1493" CreationDate="2017-08-30T18:26:18.363" Score="3" Body="&lt;p&gt;Never tell a student he or she should think about a different major unless they ask you. When I was junior high one of my teachers told my parents that &quot;college isn't for everyone&quot;, hinting at the idea that I wouldn't make it to college. My parents never told me this until after I graduated from college with a Software Engineering degree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes students choose majors for the wrong reasons. Ask them what made them want to take this major? Do you enjoy programming? What classes do you like currently? If they just flat out dislike all their classes then perhaps suggest they see a counselor or go to a community college. Community collage gave me the time to take various classes that interest me without paying the university price. Once I figured out what exactly I wanted to study, I transferred to a university. It saved me money and time in the long run. I know of students who graduated with their degree and hate it... That would be the worst outcome of all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best thing you can do is help point them in direction of something that interests them. Perhaps the student has the worst teachers for those classes and introducing them to one of your favorite professors can help. Show them the best side of computer science at your university and if they still dislike it then perhaps the answer is clear and they should switch to degree that they're actually interested in.&lt;/p&gt;&#xA;" OwnerUserId="2839" LastActivityDate="2017-08-30T18:26:18.363" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3436" PostTypeId="2" ParentId="3434" CreationDate="2017-08-30T18:45:32.257" Score="3" Body="&lt;p&gt;I think you have left out two essential elements here. Your first two points leave the students passive consumers. The last is about testing. But there is no guarantee of any learning in between. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some ways, the two most important pedagogical ideas are &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Active Student&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Constant Feedback&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You need to ask your students to create things and you need to give them individual feedback on how they did. The fraction of students who learn by listening to lecture is actually quite small. Taking notes (by hand) makes them more active, but using the face-to-face time to work with them in artifact creation is much-much better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But students are unlikely to get everything right the first time and each student will need individual direction, whether they are struggling or excelling. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that teamwork is an attempt to combine these two things. The team creates something and give each other feedback as they go along. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My constant mantra while teaching was &quot;It isn't important what I (the teacher) do. It is only important what you (the student) do.&quot;  Focus on their activities, not yours. Perfect their exercises, not your lectures. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm not sure how relevant this is to CS, but one of the most important and memorable courses I had in my first year of college was a writing course. The prof never talked about the process of writing, but pointed us to a lot of good writing. However, the crux of the course was that we wrote a theme for every class (3 per week). We spent quite a lot of the time in class reading these aloud and getting feedback. His particular trick was to pick out the best ones in his judgement for review, not the ones that needed the most work. We also got detailed feedback in writing. No lecture at all. Lots of activity, lots of feedback. He did his job. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-08-30T18:58:09.220" LastActivityDate="2017-08-30T18:58:09.220" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3437" PostTypeId="2" ParentId="3434" CreationDate="2017-08-30T18:47:55.757" Score="2" Body="&lt;p&gt;As well as what you have already mentioned: Provide working code, and have them modify it (top down as opposed to bottom up). I also see an opportunity to reduce time between students actions and receiving feedback.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Automated feedback&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;(this is not a substitute for teacher or peer feedback)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a visual language, such as scratch or snap. This reduces cognitive load as pupils can see the possibilities, they just have to drag them in. (Note: Visual basic is &lt;strong&gt;not&lt;/strong&gt; a visual language.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Create a program with visual output, such as python turtle, or scratch/snap. This way they can see what the effect of there change is.&#xA;This can be augmented (kinaesthetic) by having pupils be the turtle, or the instructor. The instructor gives instruction in the form of the language, the turtle follows the instruction. A third pupil can be a scribe and write down the instructions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For textual languages: The teacher as well as providing started code, can also provide unit test. Pupils run the tests and see traffic-lights on the dashboard, all red at first. They then work on each light it turn, to get it to turn green. There will be clear instructions of what each function should do. There may also be some other output that builds up, as they get each test to pass. Must languages have unit test frameworks (pyunit (python), junit (java), nunit (.net), xunit).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-30T18:47:55.757" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3439" PostTypeId="2" ParentId="3422" CreationDate="2017-08-30T19:39:04.280" Score="5" Body="&lt;p&gt;What you are trying to do is entirely laudable; helping your students to not only be better engineers, but also better hires, could help them in tremendous ways in the long run. However, since you are in a situation where your rating numbers matter very much to you, be careful that you always attend to your own professional needs as well. You would be in no position to help others if you simply lost your job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, people are okay with instruction that meets their expectations. Therefore, I agree with G. Ann that telling the students that this will be a part of the course is an important first step.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, students signing up for a specific technical course might already have fairly fixed expectations before they enter your classroom, and, as what you are doing may differ from these expectations, you may find that your review marks still take a hit.  Thus, I might recommend two alternatives as well:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Develop a course in soft skills for developers. Include a full evaluation in order to address areas of weakness that you cannot reasonably cover in class (such as English), and spend the course time talking about the things that you can do. The advantage here is that students who sign up for the class will clearly want it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Keep incorporating the material into your regular coursework, but make some of it optional for students who want it. And, as already said, always pay very careful attention to setting the expectations of your students with clear communication.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It sounds like your circumstances may preclude you from doing this sort of work if it causes a hit to your salary, so you may need to carefully monitor the effects of taking these changes, and communicate with your own administration to be sure that any temporary drops in your numbers will be understood correctly (eg. you won't lose your job).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-08-30T19:39:04.280" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3440" PostTypeId="2" ParentId="1493" CreationDate="2017-08-30T22:49:11.253" Score="3" Body="&lt;p&gt;In almost all cases I've come across, these are students who don't enjoy what they're doing in the program at all. I try to point out that if there isn't &lt;em&gt;something&lt;/em&gt; they enjoy about the process, they won't want to do it as a career no matter how good they get at it. That's usually enough of a wake-up call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: if they &lt;em&gt;do&lt;/em&gt; enjoy what they're doing even though they're doing it very badly, the early courses probably aren't challenging enough to test them appropriately.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the students are older (30's and 40's) they usually have the wisdom to see this for themselves, but young students often do things without stopping to consider why. Figure out what they &lt;em&gt;want&lt;/em&gt; to do, what they enjoy doing, and guide them in that direction.&lt;/p&gt;&#xA;" OwnerUserId="2846" LastActivityDate="2017-08-30T22:49:11.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3441" PostTypeId="1" CreationDate="2017-08-31T02:09:15.180" Score="15" ViewCount="632" Body="&lt;p&gt;I am teaching a blind high school student in my APCSA class.  All students are using a combination of CodeHS and Project Lead the Way curriculum.  Neither of these are very friendly to my blind student because there are so many visual that his screen reader can't interpret.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience in this?&lt;br&gt;&#xA;I'm looking for something that can be done pretty independently as he will be in the class  with others working on a different curriculum.  I want to support him in his endeavors to become a computer scientist but I don't know where to start as an inexperienced CS teacher myself! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="2848" LastEditorUserId="27" LastEditDate="2024-03-02T23:03:15.530" LastActivityDate="2024-03-02T23:03:15.530" Title="Teaching a blind high school student" Tags="|curriculum-design|secondary-education|differentiation|accessibility|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3445" PostTypeId="2" ParentId="3441" CreationDate="2017-08-31T07:51:27.970" Score="7" Body="&lt;p&gt;A quick online search led me to this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://nfb.org/images/nfb/publications/fr/fr21/fr06ws12.htm&quot; rel=&quot;noreferrer&quot;&gt;A Beginner's Guide to Access Technology for Blind Students&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It covers all the essentials&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Screen Access Software&lt;/li&gt;&#xA;&lt;li&gt;Braille Embosser&lt;/li&gt;&#xA;&lt;li&gt;Notetaker&lt;/li&gt;&#xA;&lt;li&gt;Scanner and Optical Character Recognition&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I am essentially listing things from that article It seems like something that was written years ago, but I assume, it should be a good starting point for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, the city I live in does have a national institute on speech and hearing, which includes folks who are sight challenged. If this is something serious, I can drive up there and talk to someone and hook you up with a professor or something. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-08-31T07:51:27.970" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3446" PostTypeId="2" ParentId="3393" CreationDate="2017-08-31T07:58:16.143" Score="2" Body="&lt;p&gt;Re &lt;em&gt;too broad&lt;/em&gt;: I don't think the question necessarily is, but &quot;&lt;em&gt;Azure&lt;/em&gt;&quot; is. I think you could spend an entire 5-hour session just &lt;em&gt;listing&lt;/em&gt; Azure services without going into any detail on any of them (and in evidence of that I've been to a two-day MS training course on Azure which only managed to scrape the surface of less than 5% of the available services: it was more a starting point for research back in the office than training. And that was aimed at experienced developers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMO pricing considerations should be a small subsection of &quot;Why cloud?&quot;. People signing up for a workshop, and especially if it's part of a technology club, expect to be doing hands-on practical training, and (excepting the introduction/overview) for the teaching to be geared towards the specific things they will be putting into practice. They can read price lists at home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With regards putting into practice, are they going to be working on a project which you define or bringing their own ideas to the table? If the latter, I'm not seeing where exactly you brief them on the right kind of project for the specific services you're going to cover. Or are you intending to choose the two or three data services which are the best fit for the majority of the projects after talking to the participants about what they're trying to build? But then point 3 looks like PAAS and point 4 like IAAS, so maybe they're going to be working on different projects in the different sections?&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-08-31T07:58:16.143" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3447" PostTypeId="2" ParentId="3395" CreationDate="2017-08-31T09:26:48.187" Score="1" Body="&lt;p&gt;In my opinion there is none.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LINQ for SQL, ORM are only tools to reduce the amount off boilerplate and syntax error when writing SQL. They're not a replacement neither a total abstraction of RDBMS (and are not intended to be).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When intereacting with an RDBMS, it is mandatory to have grasp enough of the SQL before attacking higher level tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you could do is to show them how much code and tests you would need when you write everything yourself, and how much you have when you use the tools. How much you have to change when a column is renamed, a new column is added, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the &quot;tests&quot; part are important, because if you write your own SQL, you need to tests it, if it generated by a tool you used, you don't need to test it.&lt;/p&gt;&#xA;" OwnerUserId="1375" LastActivityDate="2017-08-31T09:26:48.187" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3448" PostTypeId="2" ParentId="3441" CreationDate="2017-08-31T10:04:28.180" Score="7" Body="&lt;p&gt;I think it is bad practice to have the computer draw pictures, and then try to describe them, when in would be much easier (and better for the blind person) to interpret a text interface (command line).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having a blind person try to use a system that is optimised to sight, is wrong. Wasting power on a screen, that you can not see is wrong (though having something the teacher can see is useful).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore use a system that is optimised for a blind person, or at least one that is very similar. This leaves tactile, audio, or linier speech (that can be converted to audio).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here I will only discuss the speech part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend Gnu/Linux, it is a Unix system. Unix was designed from the beginning to be text based. The GUI saw added latter. This has made it a very strong operating system, that a variety of interfaces can be added to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the programming languages that we teach were first written for Unix: Java, python, C. The only exception that I can think of would be C#, however that now runs on Unix. I have run it on a raspberry pi model 1b.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;UNIX( a type of Unix ) is the system that we could not afford in the 1980s, so instead we bought Microsoft Dos, and then Microsoft Windows. Gnu/Linux is a newer Unix, as well as being &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;noreferrer&quot;&gt;Free Software&lt;/a&gt; is also very cheap.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-31T10:04:28.180" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3449" PostTypeId="2" ParentId="3441" CreationDate="2017-08-31T10:14:20.063" Score="0" Body="&lt;p&gt;I think it is very important to start by discovering what the student wants. What do they think computer science is. It is usually  not the same as what we think it is, and sometime a long way off, that they should be doing a different course, or an adapted course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore find out what your student is planning to use there computer science for. What job they may want to do, and why. What their interests are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Focus on them as a person, not on their disability. Then look to see what problem caused by their lack of sight, need solving.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-08-31T10:14:20.063" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3450" PostTypeId="1" AcceptedAnswerId="3453" CreationDate="2017-08-31T13:32:31.360" Score="0" ViewCount="209" Body="&lt;p&gt;I have already looked at &lt;a href=&quot;https://cseducators.stackexchange.com/questions/299/simple-pointer-examples-in-c&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2691/is-it-important-to-teach-pointers-in-a-first-course-using-java?rq=1&quot;&gt;this&lt;/a&gt;, but it does not help me at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am teaching a guy who is something of a Java expert. Unfortunately, due to the mandatory-ness of the university curriculum, he is forced to downgrade himself to learning C. ( I use the word downgrade in a strictly technical sense, no offence meant to people who are fans of C ). The thing is, I am able to get him through the whole C syllabus except for pointers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More importantly, we want to use pointers inside structs, which are actually declared in a header file. I am teaching him to build sharable  c libraries/header files. If you need more details, let me know in the comments, and I can share the code I am using in a repo and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update 1 - I am also looking at &lt;a href=&quot;https://stackoverflow.com/questions/14699538/declare-struct-in-header-file&quot;&gt;this&lt;/a&gt;, but its not very clear to me. I haven't used C in a decade, so all this is a little blurry for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update 2 - getting even more specific, what is really happening in these two lines, that I am putting in the header file. I am defining the samplestruct in the corresponding .c file.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;typedef struct samplestructrec *samplestruct;&#xA;typedef struct samplestructrec samplestruct;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-08-31T14:22:31.567" LastActivityDate="2017-09-02T13:49:40.527" Title="Teaching pointers (C) to a Java guy" Tags="|undergraduate|c|" AnswerCount="3" CommentCount="10" ClosedDate="2017-08-31T17:45:17.257" ContentLicense="CC BY-SA 3.0" />
  <row Id="3451" PostTypeId="2" ParentId="3450" CreationDate="2017-08-31T14:16:05.377" Score="1" Body="&lt;p&gt;I have been teaching Programming classes since some time and my experience is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;C/C++ Pointers are a nightmare for programming students - whether they have any Java/C#, etc. experience or not.&lt;/li&gt;&#xA;&lt;li&gt;It's the syntax of the pointers (the terrifying*) which is more difficult for students than its semantics.&lt;/li&gt;&#xA;&lt;li&gt;Every student of Java/C#, etc. knows that variables are stored in the RAM (and they have studied in Intro to Computing about RAM addresses etc. basics)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It's not too much difficult to make non-C/C++ programmers understand about pointers if we take the above points and start from some basic examples like URLs being used to point to web pages etc. It has worked for my case (a great deal), hopefully it will help you and others too.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2017-08-31T14:16:05.377" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3452" PostTypeId="2" ParentId="3441" CreationDate="2017-08-31T14:51:39.927" Score="5" Body="&lt;p&gt;I have never had this situation, but can offer some general advice that is also applicable to other students whose needs require specialized techniques. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As suggested in other answers here, talk to the student, of course. But ask the student for permission to do at least some of the following. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably have a school counselor who can offer some general advice. You can talk to the parents about what they suggest and what has been useful to the student in the past. You can have a meeting with other teachers who have, or had, this student in class to see what they suggest. You may be able, with permission, to talk to the student's former teachers, even in grammar school, to see what might work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also seek, perhaps online, advice from specialists in the student's need-area. The student might, in fact, already be working with a professional. You might see if you can have a conference with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I suggested in a comment, get connected to the APCS community and ask for advice in their fora. Do the same for the ACM SIGCSE group. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is probably too late to modify your curriculum, though others in your school should do some anticipatory planning for helping this student in the future. It may require some curricular changes generally. I would suggest, however, that curricular updates consider changes that benefit all the students, not just the one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My go-to suggestion for many things is to incorporate teamwork into the curriculum as much as possible. Every student learns differently, not just the blind student. Every student can contribute to a team, though different students contribute differently. Presumably the student has skills that compensate for lack of sight. Try to bring them to bear in the class so that the student is a part of things, not an outlier. For example, he might have an exceptional memory or an exceptional organizational ability. All of these are needed by professionals and can be capitalized on in the classroom. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In taking APCS the student is obviously not looking for an easy way out. But do what you can to make the classroom a supportive community that benefits all students. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-08-31T14:51:39.927" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3453" PostTypeId="2" ParentId="3450" CreationDate="2017-08-31T15:10:46.963" Score="1" Body="&lt;p&gt;I'm a bit confused, though, like you, it has been a while since I worked in C. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Confusion (a). Are you putting &lt;em&gt;both&lt;/em&gt; those lines in the same header file? They seem to be giving incompatible definitions to samplestructrec.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Confusion (b). I wonder if you are misdiagnosing the problem. You can treat #include just about as you would treat textual inclusion. Is there something in one of the C files that makes it incompatible with the header? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is quite a bit on headers. &#xA;&lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_header_files.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.tutorialspoint.com/cprogramming/c_header_files.htm&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Suppose you say:  &lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;typedef struct samplestructrec *samplestruct;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then later (in a C file) you say&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;samplestructrec foo&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then &lt;code&gt;foo&lt;/code&gt; is a pointer but there is no actual samplestruct yet. You need to use malloc or some equivalent to get foo to point to anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if you say  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;typedef struct samplestructrec samplestruct;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then later say  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;samplestructrec boo  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then &lt;code&gt;boo&lt;/code&gt; is an actual struct (a block of bits on the stack). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;typedef just names a type. It creates information in the compiler, not in the runtime. In particular, samplestructrec is just a name, not a thing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2017-08-31T16:44:46.423" LastActivityDate="2017-08-31T16:44:46.423" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3454" PostTypeId="2" ParentId="3450" CreationDate="2017-08-31T16:45:20.377" Score="2" Body="&lt;h2&gt;A &lt;strong&gt;little&lt;/strong&gt; Hungarian&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As @talhaIrfan says, the problem is mostly syntax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what I discovered when I was struggling with pointers, while at university. Other students that I introduced the idea to would start to improve shortly after learning this technique. I have also introduced it in professional environments, where the bug rate subsequently reduced.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do a lot to improve syntax by introducing a &lt;strong&gt;little&lt;/strong&gt; Hungarian notation (I do not advocate too much of this, just enough).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to be consistent, unambiguous, and clear. It should allow you to read your code more easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always use an underscore to separate the Hungarian notation from the rest of the name. I always append type information to the end of the name (this is consistent with what the C libraries do).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I chose a set of symbols&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;_pt&lt;/code&gt; for pointers.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;_t&lt;/code&gt; for types, this is what the C libraries use.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;typedef struct samplestructrec *samplestruct_pt_t;&#xA;typedef struct samplestructrec  samplestruct_t;&#xA;samplestruct_t *samplestruct_pt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Always choose good name for you objects, and &lt;strong&gt;don't do too much Hungarian&lt;/strong&gt;. When I was programming in C++, we also had at the beginning of a name &lt;code&gt;p_&lt;/code&gt; for parameters, &lt;code&gt;l_&lt;/code&gt; for local, &lt;code&gt;m_&lt;/code&gt; for a member variable (We did this to avoid name collisions, in retrospect I think that these 3 were not needed. We could have used &lt;code&gt;this.&lt;/code&gt; instead of &lt;code&gt;m_&lt;/code&gt;). &lt;strong&gt;That was it just 5 Hungarian pre/post fixes. You don't need any more, probably less, in a strongly typed language.&lt;/strong&gt; &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-09-02T13:49:40.527" LastActivityDate="2017-09-02T13:49:40.527" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3455" PostTypeId="1" AcceptedAnswerId="3461" CreationDate="2017-09-01T05:46:24.427" Score="4" ViewCount="439" Body="&lt;p&gt;Last semester, I was assigned two classes of C# and assuming them to be well-versed in Programming Fundamentals (PF) and Object Oriented Programming (OOP), I started the course at normal pace. After a few weeks, I took an introductory lab test (it was pretty easy one actually, summation of n Fibonacci terms) and some of the astonishing &quot;discoveries&quot; after my round of the class (about 30 mins after assigning the task) were:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Around 1/3rd didn't have Visual Studio installed&lt;/li&gt;&#xA;&lt;li&gt;One guy was coding it in SQL Server (genius?)&lt;/li&gt;&#xA;&lt;li&gt;Those who didn't have VS installed were given option of online IDEs (like &lt;a href=&quot;http://ideone.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;this one&lt;/a&gt;) and it &quot;dawned&quot; upon me that they were coding in Java (didn't even care to change Language in options)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then, during lecture, I discovered some more facts, like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In a class of 50, less than 10 knew the concept of basic OOP like Inheritance or static members.&lt;/li&gt;&#xA;&lt;li&gt;Non has implemented Polymorphism before.&lt;/li&gt;&#xA;&lt;li&gt;Function Pointers was a thing unknown to them (even they had studied OS and I think PThreads are pretty much part of it)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It not only left me heart-broken, but also prompted me to teach them OOP's concepts from scratch, which meant that I had to compromise over some advanced topics of .Net&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now my question is that, what should be the correct approach to teach an advanced language like C#, Java to a class given:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Majority of them are bad at OOP (lets assume they are ok at PF)&lt;/li&gt;&#xA;&lt;li&gt;There are some students which are/were good at OOP and eager to learn new technology (and should not be punished for others mistakes/negligence)&lt;/li&gt;&#xA;&lt;li&gt;There is no Lab to complement your class (even the lab test I took was by my own efforts)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per @Jay and @Buffy's points, here is further explanation:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is a recurring process as although I have taught C# only once but observed such a weak links (in Programming Fundamentals and especially OOP) when teaching other courses as well.&lt;/li&gt;&#xA;&lt;li&gt;I don't have enough power to arrange Bootcamps (I used to have them in earlier institute but here limited class rooms means we can't arrange Bootcamps unfortunately) &lt;/li&gt;&#xA;&lt;li&gt;I don't have enough power to affect the overall process either. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Looking forward to your interesting inputs. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-09-01T14:38:41.813" LastActivityDate="2017-09-01T17:14:49.403" Title="Teaching C#, Java, etc. to students who are bad at OOP" Tags="|curriculum-design|student-motivation|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3456" PostTypeId="1" CreationDate="2017-09-01T05:52:05.807" Score="12" ViewCount="259" Body="&lt;p&gt;Minecraft is very popular, and I know that it can be programmed/scripted.  I looked into it myself but was put off by the learning curve for the Java based version (it looked like it needed Minecraft, NetBeans, a library for my Java code to talk to Minecraft, and possibly setting up a server).  I later found &lt;a href=&quot;https://www.learntomod.com/&quot; rel=&quot;noreferrer&quot;&gt;https://www.learntomod.com/&lt;/a&gt;, which appears to have a Block-based programming UI (I haven't tried it personally).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Question(s):&lt;/strong&gt; Has anyone used Minecraft to teach an 'introduction to programming' type course (CS0 moreso than CS1)?  How did you make the tech work (did you use something like LearnToMod.com, or the whole Minecraft+NetBeans+Java+etc route)? What sort of lessons did you learn?  (I'm particularly interested in &quot;Gee, I wish I had known about X, back when I started&quot;)&lt;/p&gt;&#xA;" OwnerUserId="2317" LastEditorUserId="919" LastEditDate="2017-09-02T13:51:23.263" LastActivityDate="2017-09-06T15:23:06.437" Title="Minecraft to teach programming?" Tags="|cs0|minecraft|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3457" PostTypeId="2" ParentId="3456" CreationDate="2017-09-01T08:33:07.287" Score="3" Body="&lt;p&gt;I am currently using Minecraft (especially Minecraft realms) to teach my developers (not starters but folks who have already covered some distance) how to work in team and also to improve their spatial and logical thinking. Also math, to some extent. So, first up, I am using Minecraft to teach, but not the basics of programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wish to introduce someone to programming though, I would say Minecraft is useful but not with the whole MineCraft + NetBeans + all that jazz route. If you are going to all that trouble of configuring that for a freshers batch, you might as well just setup the real developer environment which would be simpler. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When in comes to newcomers, I have found that Minecraft is more useful in bringing people into the world of computer based thinking. For instance, a lot of girls where I live are afraid and/or hesitant to get into programming. Many would find the concept of using their computers for anything other than watching a movie or checking email, extremely alien.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In such scenarios, Minecraft would help. If you were to check the Minecraft Education site, that is also what Microsoft is doing with the program. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-01T08:33:07.287" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3458" PostTypeId="2" ParentId="3455" CreationDate="2017-09-01T12:16:51.017" Score="1" Body="&lt;p&gt;I know exactly what you are talking about. Back when I was still ( I am glad I am no longer doing that) working as a faculty in a university, I ran into situations like this. In fact, with my usual style, I got confrontational with the faculty who was supposed to teach OOP in the previous semester and stuff happened.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what I did. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First up, the logistics. I had a detailed discussion with the HOD and also with the students, and convinced all of them to come for additional classes (I called them Bootcamps)&lt;/li&gt;&#xA;&lt;li&gt;The Bootcamp was a 2 day affair ( 6 hours each ) and was held on a holiday. No attendance or anything like that. Students who are serious can come (and 80 % of the class showed up)&lt;/li&gt;&#xA;&lt;li&gt;Taught the basics of OOPS. I essentially summarised the entire semester worth of contents into 12 hours. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Did this work? For me, it did. I was able to carry on with my usual syllabus with confidence that they are at least, not as blind as before. sure, I had to spend 2 of my personal days, but it was worth it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the things I crunched on those 2 days.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Classes and Objects (and the interconnection between, and compared them favourably with structs)&lt;/li&gt;&#xA;&lt;li&gt;Encapsulation (especially private and public and why this is important)&lt;/li&gt;&#xA;&lt;li&gt;Inheritance (the big boss of OOP, and by far the most important thing about any OOP language)&lt;/li&gt;&#xA;&lt;li&gt;Polymorphism (although this was pretty straightforward and did not drive people crazy like inheritance or the initial discussion of classes and objects)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, talking from first experience, the situation you described is the norm rather than the exception. If you want to get them up to speed, I suggest a bootcamp or a similar variation. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-01T12:16:51.017" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3459" PostTypeId="2" ParentId="3455" CreationDate="2017-09-01T13:28:12.500" Score="1" Body="&lt;p&gt;tl;dr: (a) solve the problem at its root, (b) know your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some things that aren't clear from your question and they impact on what action is appropriate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you describe the problem in the past tense. But is it a continuing problem or just a one time occurrence due to poor instruction in previous terms? If is just a one-off, perhaps you don't need any solution at all. If you expect it to continue, perhaps you should attack the problem at its root. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't describe your own position within the institution. Do you have any power at all to affect the overall process? Can you start discussions about what is happening and come to an overall solution, perhaps involving other courses, that make the problem go away. The specific symptoms you describe seem to imply poor teaching in an earlier term. Can your institution fix that problem (if that is really it)? Perhaps an earlier professor needs help and is either inexperienced &lt;em&gt;or&lt;/em&gt; was him/herself faced with a problem such as yours and had to compensate just as you did. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you need to be proactive in a situation in which it is likely to recur. Do something at the very start to help you know your students better. A few weeks is far too late to learn these things. Some sort of exam or exercise at the start can tell you a lot. If you wind up in the same situation again and need to compensate, a boot camp such as &lt;a href=&quot;https://cseducators.stackexchange.com/a/3458/1293&quot;&gt;suggested by Jay&lt;/a&gt; here might work for you. You can also prepare a checklist of tasks for the students on the first day (Install the IDE...). Also a syllabus that details expectations (using the appropriate language...). If you can't make assumptions about the students, as you seem to have done, then try to anticipate the problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you are without power to affect anything, then you are also at professional risk if the students don't complete the course requirements and pass into the next course. This again, suggests that you have an institutional problem and not just one with a given class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that institutional change may be difficult. In some institutions students are allowed to take courses without the necessary prerequisites. In some institutions that accept students from elsewhere, it is difficult to impossible to assess the real skills of the students prior to enrollment. If any such issues are present, a discussion within the department about how to make everything work is called for. It need not be confrontational. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-01T13:28:12.500" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3461" PostTypeId="2" ParentId="3455" CreationDate="2017-09-01T17:14:49.403" Score="2" Body="&lt;p&gt;One thing to keep in mind is that topics that seem obvious to you (who presumably has years of experience) are not at all obvious to novices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stuff like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which editor should I be using?&lt;/li&gt;&#xA;&lt;li&gt;How do I compile code again?&lt;/li&gt;&#xA;&lt;li&gt;What's the difference between a class and an instance?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This stuff is obvious to you because you've had years of experience. But these students have taken &lt;strong&gt;a couple classes&lt;/strong&gt; so far. That's not enough experience for this stuff to be obvious or come naturally yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you're going to have to hold their hands a little bit more, especially at the beginning of the course. Spend a class reviewing the stuff you assume they already know, or walking through what you expect them to do.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;Does everybody have Visual Studio installed?&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Okay, for your first assignment, let's make sure you have everything hooked up correctly by compiling and running this basic program.&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Everybody remember OOP? Who can remind us of what &lt;code&gt;static&lt;/code&gt; means?&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Your next homework assignment is to take OOP to the next level by...&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm not saying you should spend half your course on this catch-up, but spending part of your first class on this, and assigning a few token homework assignments to make sure everybody is on the same page, will go a long way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking a step back, you say that it took you a few &lt;strong&gt;weeks&lt;/strong&gt; to realize that students weren't at the level you thought they were. Why did it take you so long? You should be finding this stuff out as early as possible, and correcting it before you start throwing tests at them. That makes it sound like you were lecturing without really engaging the students or making sure they understood what you were talking about, which is not great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, you need to make sure you're engaging students by meeting them at their level. Understand that they don't have years of experience, and that they might need to be reminded of things that you think are obvious. A little bit of understanding your students will go a long way here.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-09-01T17:14:49.403" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3462" PostTypeId="1" CreationDate="2017-09-01T20:11:50.173" Score="10" ViewCount="1444" Body="&lt;p&gt;I'm teaching an Operating System course, and was looking for an example of something that &lt;strong&gt;isn't&lt;/strong&gt; a system call.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As silly as it may sound, I wasn't able to carve a good example. Everything (accessible to second-year students) that came to my mind involved system call in some way, and looking around for examples didn't help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I'm reaching you: &lt;strong&gt;Is there any good example of operation happening on a computer that does not involve system calls?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And wish a long life to that community that I just discovered, but intend to contribute to!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: the example can come from any OS, and I know that pretty much &lt;strong&gt;every useful program&lt;/strong&gt; requires some system call, that's why I'm asking!&lt;/p&gt;&#xA;" OwnerUserId="2877" LastEditorUserId="2877" LastEditDate="2017-09-01T20:55:36.920" LastActivityDate="2017-09-02T10:20:01.393" Title="Good example of what isn't a system call?" Tags="|undergraduate|operating-systems|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3463" PostTypeId="2" ParentId="3462" CreationDate="2017-09-01T21:49:53.233" Score="14" Body="&lt;p&gt;The simple breakdown is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Anything that performs input/output involes a series of system calls.&lt;/li&gt;&#xA;&lt;li&gt;Anything that's purely computational doesn't involve system calls.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both of these statements have exceptions (I/O through memory-mapped files or peripherals is I/O without syscalls, calling a hardware accelerator or allocating memory is syscalls without externally visible I/O) but they're a good approximation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here are some examples of operations that don't involve system calls:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Getting or changing the value of a variable.&lt;/li&gt;&#xA;&lt;li&gt;Arithmetic operations on integers and floats.&lt;/li&gt;&#xA;&lt;li&gt;Conditionals and loops whose body doesn't involve system calls.&lt;/li&gt;&#xA;&lt;li&gt;Operations on strings such as searching, joining, splitting, etc.&lt;/li&gt;&#xA;&lt;li&gt;Manipulations of data structures such as lists, arrays, matrices, trees, etc.&lt;/li&gt;&#xA;&lt;li&gt;Memory management, as long as the program doesn't need to obtain more memory from the OS.&lt;/li&gt;&#xA;&lt;li&gt;Printing to a buffered stream, if the buffer doesn't get flushed during this print call. Likewise, reading from a buffered stream, if enough bytes are available.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It would help to demonstrate by showing the system calls made by some programs, e.g. with &lt;code&gt;strace&lt;/code&gt; on Linux, with &lt;code&gt;dtruss&lt;/code&gt; on macOS or with Systrace under Windows. Compare a program that does a lot of I/O with one that does one big computation and prints the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The case of buffered I/O, &lt;a href=&quot;https://cseducators.stackexchange.com/users/204/ctrl-alt-delor&quot;&gt;suggested by ctrl+alt+delor&lt;/a&gt;, is an interesting one because the same library functions may or may not trigger a system call depending on the state of the system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is sometimes possible confusion between a &lt;em&gt;library call&lt;/em&gt; and a &lt;em&gt;system call&lt;/em&gt;. Unix programmers in particular tend to believe that what is documented in section 2 of the manual is system calls, but this is not true on a modern Unix systems. Every function callable from C is a C library function that's a wrapper (possibly very simple, possibly even a macro rather than a function) around a system call that usually, but not always, has the same name and takes more or less the same parameters. You can observe that on a modern Linux/x86_32 system, where many system calls have been upgraded from 32-bit arguments to 64-bit arguments, e.g. &lt;code&gt;strace ls&lt;/code&gt; will show calls of &lt;code&gt;getdents64&lt;/code&gt; and &lt;code&gt;fstat64&lt;/code&gt; rather than &lt;code&gt;getdents&lt;/code&gt; and &lt;code&gt;fstat&lt;/code&gt;. Under the hood, system calls and library calls have a different calling convention. At the very least, a library call involes a jump/branch instruction while a system call involves a privilege change instruction. Depending on the system, the rules for placing arguments in registers may be different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can discuss how a program could make as few system calls as possible by starting from &lt;code&gt;strace /bin/true&lt;/code&gt;. Most of its syscalls are due to dynamic linking, so write that one-line program, compile it statically and look at the remaining system calls. Reduce it even further with a more minimalistic libc such as &lt;a href=&quot;https://www.fefe.de/dietlibc/&quot; rel=&quot;noreferrer&quot;&gt;dietlibc&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;# Install dietlibc, e.g. apt-get install dietlibc-dev on Debian&#xA;$ cat a.c&#xA;int main(void) {return 0;}&#xA;$ diet gcc a.c &#xA;$ strace ./a.out&#xA;execve(&quot;./a.out&quot;, [&quot;./a.out&quot;], [/* 82 vars */]) = 0&#xA;arch_prctl(ARCH_SET_FS, 0x7fff98099fe0) = 0&#xA;_exit(0)                                = ?&#xA;+++ exited with 0 +++&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="124" LastEditorUserId="124" LastEditDate="2017-09-02T10:20:01.393" LastActivityDate="2017-09-02T10:20:01.393" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3464" PostTypeId="2" ParentId="3441" CreationDate="2017-09-01T22:14:04.150" Score="-1" Body="&lt;p&gt;The HS curriculum of PLtW appears to use the Python programming language.  Python can be learned and used from a command-line plus text editor, with zero graphics, which is good for screen readers.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2017-09-04T06:02:20.973" LastActivityDate="2017-09-04T06:02:20.973" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3465" PostTypeId="2" ParentId="3374" CreationDate="2017-09-01T22:25:32.687" Score="0" Body="&lt;p&gt;It may be easier to transition students who have gained proficiency in using a a command-line environment to switch to using an GUI IDE, than vice versa.  If so, starting with an editor+terminal will allow more flexibility in your later curriculum design.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-09-01T22:25:32.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3466" PostTypeId="2" ParentId="2730" CreationDate="2017-09-01T22:27:00.243" Score="3" Body="&lt;p&gt;I taught a &quot;Functional Programming&quot; course on multiple occasions. It was basically a Haskell course. Phew, can't wait to teach it again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer you question precisely: you have no state, no classes and no usual OOP model. You have to abstract things much more than you are used. Oh, and there is this weird syntax. I mean---&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;uncurry f a b = f (a, b)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But that's all typical beginner's problems. In my experience, any computer science student worth her salt would overcome this. The &lt;strong&gt;real&lt;/strong&gt; hurdles start later. My answer gets a but Haskell-focused, sorry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first killer are monads. Actually, I introduce first type classes, which are sometimes a bit hard to grok, and then enter monads. You can feel the class dropping their high spirit at this. Even if I am quite proud with my way of coping with monads in this class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is basically the equivalent of pointers, if the old spoken take in CS is to be trusted. Pointers are hard and there are students who get stuck on them for longer. Same with monads.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, if you can do both &quot;normal&quot; style Haskell and monadic, you are good for a prolonged period of time. You have state now. You can do IO. By the way, &lt;code&gt;State&lt;/code&gt; was also a quite hard thing to warp their mind around for the students, but I'd toss it into the &quot;monad&quot; box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What else? Arrows feel like a yet another &quot;monadic&quot; hurde. And they most surely are. But by then the students are quite battle-hardend and have not so many problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I would expect to be a problem, but what was not, were higher-order functions. All these operations on lists and such. And lambdas on the level of a language construct. The lambda calculus is a fully different story, also hard. But that's probably a deviation, as it was a quite theoretical block in an else quite practical course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bit problematic, but that's an accomodation problem in my opinion is the applicative programming and all that point-free code golf in Haskell. But if done in moderate amounts and properly explained, students mostly find their fun in it.&lt;/p&gt;&#xA;" OwnerUserId="2879" LastActivityDate="2017-09-01T22:27:00.243" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3467" PostTypeId="2" ParentId="3456" CreationDate="2017-09-02T12:30:45.210" Score="5" Body="&lt;p&gt;I am not so certain about teaching people to program by starting out with something like modding Minecraft. There are a lot of technical details that someone just learning to program shouldn't be required to understand or worry about. However, Minecraft can still be excellent playground to learn to program by using pre-made mods like &lt;a href=&quot;https://www.computercraft.info/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ComputerCraft&lt;/a&gt; that add programmable blocks to the game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In ComputerCraft users are given a couple programmable blocks: computers, which are stationary and have the ability to send serial signals; robots, which you can program to move, pick up elements from the environment, and perform actions; and both elements can communicate over a network. The computers and all the pre-packaged applications are programmed entirely in Lua (including the OS). This means there exists a large existing source code base for students to study. Lua is a very simple and elegant language and I have had no problem teaching it besides the fact there isn't really an introduction to programming book using it (&lt;a href=&quot;https://www.lua.org/pil/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Programming in Lua&lt;/a&gt; is written by the language author and is very good, but much like Programming in C in that it isn't meant for beginners).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using ComputerCraft with blocks from other common mods would allow the students to build machines as well as programs; something more than the sum of its parts. This would allow them to see programs as a part of a greater design, which I believe most students don't get enough experience with in school. Personally, one of my favorite projects I've done in Minecraft using ComputerCraft was implementing a mail delivery system using several computers, ender chests, and pipes.&lt;/p&gt;&#xA;" OwnerUserId="2847" LastEditorUserId="150" LastEditDate="2017-09-06T15:23:06.437" LastActivityDate="2017-09-06T15:23:06.437" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3468" PostTypeId="2" ParentId="430" CreationDate="2017-09-02T12:38:20.393" Score="2" Body="&lt;p&gt;When I was in high school, by the time I had my first programming courses I already knew a lot more than the contents of these courses, since I had been programming as a hobby for a while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The teacher soon realised this and didn't want either of us to waste our time. He provided me with each mandatory assignment/mini-project when I finished the previous one (no artificial delay), and when I'd done them he offered me to take the final test ahead of schedule. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I passed these courses in ~2 weeks rather than 10 and had my grade, and everyone was happy. I didn't have to lose time in class, and he could stay focused on the students who were at the level the course intended to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess this comes down to what rules the school has, but I think it is fair that the teacher has no responsibility to go beyond the course subject, and should rather put his time and effort into working towards the majority of the class getting to that level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would suggest doing the same, if this would be allowed. The final test questions can of course be adjusted (similarly to re-exams at university) so that there was no risk of me &quot;leaking&quot; the questions to other students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you explain beforehand that this is an option, and would mean the student can get done asap, maybe they will see that they have an incentive to cooperate and get the work done. &lt;/p&gt;&#xA;" OwnerUserId="1090" LastActivityDate="2017-09-02T12:38:20.393" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3469" PostTypeId="1" AcceptedAnswerId="3470" CreationDate="2017-09-02T17:04:45.653" Score="25" ViewCount="6637" Body="&lt;p&gt;When I started my Computer Science studies, Scheme was the first thing we learned in our first programming course. Almost 8 years later, I ask a friend of mine, and it seems that they are still teaching Scheme for beginners. Besides the annoying amount of parenthesis, I found Scheme helpful, and I was able to understand important concepts as how interpreted languages work, anonymous functions, recursion and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question comes, because, except for that semester, I have never used Scheme again, and even though it was helpful I have always thought why not teach another &lt;em&gt;real world&lt;/em&gt; use language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wouldn't, for example, Python help in the same way? Why Scheme?&lt;/p&gt;&#xA;" OwnerUserId="2480" LastEditorUserId="27" LastEditDate="2018-01-01T14:34:53.630" LastActivityDate="2022-05-16T19:17:38.480" Title="What could be the possible advantages of teaching Scheme as first programming language?" Tags="|curriculum-design|language-choice|scheme|" AnswerCount="11" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3470" PostTypeId="2" ParentId="3469" CreationDate="2017-09-02T17:18:27.690" Score="35" Body="&lt;p&gt;I think that the purpose of such a course is not to teach you a language. After all, Scheme, with its abstract syntax, is pretty minimal as a language. The purpose of a course like that is to teach you to &lt;em&gt;think abstractly&lt;/em&gt;. If you can do that now, several years later, you can probably thank the course for getting you started. Abstraction, after all, is the big idea about computer languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A course in Python or another language can do similar things, but not in quite the same way, since in those languages you also need to learn the language syntax, idioms, and other structures. Scheme pushes all that aside for the opportunity to focus on abstraction. The things that are &lt;em&gt;not&lt;/em&gt; in the language make it easier to focus on the big ideas. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This isn't really related to your question, but I note that many language designers start out with a lisp- (scheme-) like syntax to try out ideas in the language before they think very hard about its concrete syntax. It turns out to be very good for such experimentation. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-02T20:38:58.490" LastActivityDate="2017-09-02T20:38:58.490" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3471" PostTypeId="2" ParentId="3469" CreationDate="2017-09-02T18:06:32.017" Score="5" Body="&lt;p&gt;Procedural approach.   Not a joke: with functional programming students are very quickly faced with the necessity to write their code as a set a (reusable) functions with a clearly defined role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the traditional approach of imperative/OO languages, they learn functions after a lot of other concepts : loops, arrays, etc. Probably too late.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: if you ask them a program to compare the average value of an array, a lot of them will write a loop to sum the values,  not use a function for the sum of the array. Even if it was a previous exercice.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-09-04T11:39:53.873" LastActivityDate="2017-09-04T11:39:53.873" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3472" PostTypeId="2" ParentId="3469" CreationDate="2017-09-02T18:51:20.127" Score="12" Body="&lt;h1&gt;Simplicity&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You can write the definition of scheme on the back of a postage stamp. Therefore as @Buffy says, you don't have to learn the language at the same time as learning the concepts.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;It is a pure functional language.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;You will be a better programmer, because you learnt functional. Better to do it first, few people learn functional second.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Education vs training&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Education is about learning the concepts, training is about leaning a language. Education is long term, training is short term. Training is about learning, Education is about learning how to learn (meta learning).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;A personal experience&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I leant scheme late, after basic,pascal,C,C++,C#,python,tcl, et al. I have never done it again, but I have not stopped using it, in the way I program in other languages.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-09-02T18:51:20.127" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3473" PostTypeId="2" ParentId="3469" CreationDate="2017-09-02T19:32:30.510" Score="24" Body="&lt;p&gt;There's one more reason I'd like to add to those here, less high-minded, but also a genuine consideration. One of the practical difficulties of teaching an introductory course is that the students come in at vastly different levels. Some are quite competent already and some are brand new. It is rare for kids to come in with &lt;em&gt;any&lt;/em&gt; experience outside of imperative languages, though.&lt;/p&gt;&#xA;&lt;p&gt;By utilizing a functional language in your first course, you get to have a classroom full of kids who have more similar footing.  And when you move on later to imperative programming, you no longer have any kids with no experience. It's a simple trick to keep your cohorts more on-level without wasting the time of the advanced students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="9426" LastEditDate="2022-05-16T19:17:38.480" LastActivityDate="2022-05-16T19:17:38.480" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3474" PostTypeId="2" ParentId="3469" CreationDate="2017-09-02T20:38:52.193" Score="15" Body="&lt;p&gt;With Scheme, you start teaching programming &lt;em&gt;concepts&lt;/em&gt; on day 1 - and also implementing them as working code on day 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a typical procedural language (C++, Java, etc) you first have to crawl through the swamp formed around 20+ years of accumulated obsolescent and deprecated &lt;em&gt;syntax&lt;/em&gt;. The survivors from that experience &lt;em&gt;might&lt;/em&gt; get to learn some concepts eventually, but only if the course doesn't run out of time first!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recent languages like Python have the great educational &lt;em&gt;disadvantage&lt;/em&gt; of features like duck-typing, etc. Of course that makes them very effective tools in the hands of &lt;em&gt;good&lt;/em&gt; programmers, but not so effective as teaching languages it's too easy to make subtle mistakes. (And don't even mention the mess that Python got itself into over &lt;em&gt;syntax&lt;/em&gt; changes in the upgrade from Python 2 to Python 3...)&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2017-09-02T20:38:52.193" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3475" PostTypeId="2" ParentId="3469" CreationDate="2017-09-03T03:02:22.800" Score="17" Body="&lt;p&gt;Every second you spend explaining a programming language is a second you are not teaching programming, software development, software engineering, software design, or computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can teach the entirety of Scheme in a single lesson. You can probably teach the entirety of Scheme in 10 minutes. Python is significantly more complex than Scheme, so, you will spend significantly more time explaining Python and not teaching CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and BTW: the world's most widely-deployed programming language is essentially Scheme with syntax. (And an object system inspired by NewtonScript, Act-1, and Self.) Personally, I didn't understand ECMAScript until I learned Scheme and Self. Teaching Scheme will get your students halfway there. So, in &lt;em&gt;that&lt;/em&gt; sense, Scheme is one of the most &quot;real world&quot; languages out there.&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2017-09-03T03:02:22.800" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3476" PostTypeId="2" ParentId="3469" CreationDate="2017-09-03T07:52:37.917" Score="2" Body="&lt;p&gt;With many programming languages, you don't see the computer's view of your input: the tokenized form, the parse trees.  All those are part of a computer language's universe and are kept out of the programmer's hands and access.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Scheme, your input &lt;em&gt;is&lt;/em&gt; the parse tree.  That puts you more level with the computer than many other languages.  In some manner, Scheme does not even have a programming language rather than just a convenient way to enter parse trees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In contrast, the distinction (or at least its naming) procedural/functional is sort of a red herring: the programming style employed in Scheme quite often is rather procedural, doing one action after another.&lt;/p&gt;&#xA;" OwnerDisplayName="user2891" LastActivityDate="2017-09-03T07:52:37.917" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3477" PostTypeId="2" ParentId="3469" CreationDate="2017-09-03T11:33:25.937" Score="10" Body="&lt;p&gt;Scheme is not that widely used in the industry, but that is not the point. The purpose of CS is not to teach you any particular language, but to teach fundamental concepts. When you know the fundamental concepts, learning any particular language is pretty easy. Anybody with a solid CS background would be able to learn Python in a few hours of self-study.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scheme is well-suited to teach fundamental concepts for a few reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Built on very simple and logical concepts. &lt;/li&gt;&#xA;&lt;li&gt;Syntax may be unconventional and somewhat tedious, but it is also totally logical and consistent, which means you don't waste a lot of time on surface issues.&lt;/li&gt;&#xA;&lt;li&gt;Extremely flexible which means you can implement almost any CS concept and paradigm in it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can consider scheme more of a &quot;blank slate&quot; than Python. For example the SICP book teaches object oriented programming by having the student implement an object system from scratch in Scheme. Now in industry you might prefer a language which already have a solid built-in object system (like Python), but for teaching it gives a much deeper understanding to implement one yourself. &lt;/p&gt;&#xA;" OwnerUserId="2892" LastActivityDate="2017-09-03T11:33:25.937" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3478" PostTypeId="2" ParentId="3469" CreationDate="2017-09-03T13:32:31.790" Score="-2" Body="&lt;p&gt;We don't have Scheme in our entire country (here in India) but that honour goes to C programming language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the purpose of my answer, substituting C for Scheme, I keep asking myself, why bother with C. After that 1 semester of C, I have never used C professionally anywhere. In fact, once I step out of educational purposes, C becomes useless. That begs the question, after almost 25 years, why are they still teaching C? Why not something else? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think, why they are still teaching C (in my country) and Scheme (in yours) is probably because it is ubiquitous. there are any number of books written on C. More importantly, the faculties who teach them ( I think most faculties change their jobs once in 60 years) can teach the same thing for the rest of their lives, use the same lab manual, and use the same code, and ask the same questions, use the same evaluations. From a strictly logistical point of view, it makes sense to teach C 30 years ago, and 30 years hence. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you image the mess, if every five years, the universities change their syllabus? Thats a logistical nightmare (not to forget other challenges) no one wants to deal with. For instance, one university could decide to go with C sharp, and another with Java. That creates all kind of problems. However, if all universities agree (which is how things are now) to simply keep using Scheme (in your case) and C (in my case), life becomes simple. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, the foundation that you get by learning an ancient language is that, everything that came after it, be default, would be easier. I learnt to ride a bike (as in motorcycle, not bicycle) in my dads old bike which was, well not that good. However, because I drove the tough one, all of today's bikes seem like child's play. Although I don't use C itself, anytime I learn a new language, I unconsciously compare it to C, and learn from that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Update 1 : To add some context, I have been part of the IT industry for 11 years, and 5 of them as a developer/trainer/educator who travels widely. I am sure C is used somewhere, I haven't seen one single enterprise usage of C and I have worked for startups, small companies (less than 100 employees) and for MNCs (more than 2000 employees) and never ever has any division, anywhere talked about C, used C or implemented C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, no disrespect to C (or its legion of fans) but I request that my opinion be taken in this context.  &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-09-04T02:09:44.017" LastActivityDate="2017-09-04T02:09:44.017" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3479" PostTypeId="2" ParentId="3441" CreationDate="2017-09-03T16:43:22.313" Score="0" Body="&lt;p&gt;Have you looked up some recent work in the area and reached out to the authors? For instance: &lt;a href=&quot;http://dl.acm.org/citation.cfm?id=1953323&amp;amp;CFID=805127740&amp;amp;CFTOKEN=78235282&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dl.acm.org/citation.cfm?id=1953323&amp;amp;CFID=805127740&amp;amp;CFTOKEN=78235282&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As many academic articles are, that's behind a paywall, but it's a paywall that many in the community have a key to, so I figured it'd be worth mentioning here. It might also be worth checking the authors' home pages, etc. as they are allowed to post it there as per ACM publishing agreements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The abstract, however, is allowed to be shared, along with the title and authors, so here's that info:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Andreas M. Stefik, Christopher Hundhausen, and Derrick Smith. 2011. On the design of an educational infrastructure for the blind and visually impaired in computer science. In Proceedings of the 42nd ACM technical symposium on Computer science education (SIGCSE '11). ACM, New York, NY, USA, 571-576. DOI=&lt;a href=&quot;http://dx.doi.org/10.1145/1953163.1953323&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dx.doi.org/10.1145/1953163.1953323&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Abstract:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The blind and visually impaired community is significantly underrepresented in computer science. Students who wish to enter the discipline must overcome significant technological and educational barriers to succeed. In an attempt to help this population, we are engaged in a three-year research project to build an educational infrastructure for blind and visually impaired middle and high school students. Our primary research goal is to begin forging a multi-sensory educational infrastructure for the blind across the United States. We present here two preliminary results from this research: 1) a new auditory programming environment called Sodbeans, a programming language called Hop, and a multi-sensory (sound and touch) curriculum, and 2) an empirical study of our first summer workshop with the blind students. Results show that students reported a significant increase in programming self-efficacy after participating in our camp.&lt;/p&gt;&#xA;" OwnerUserId="466" LastEditorUserId="466" LastEditDate="2017-09-04T17:35:08.327" LastActivityDate="2017-09-04T17:35:08.327" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3480" PostTypeId="1" CreationDate="2017-09-04T08:33:07.363" Score="4" ViewCount="147" Body="&lt;p&gt;I just started teaching an introduction to web development to high school students (they have the most basic knowledge of java) and this year my school has decided to make a change in the curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Previously we used JSP to dynamically generate pages, but now we decided to look for a different technology to replace JSP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I am looking for a language for dynamically generating webpages (again, a replacement for what JSP does: servlets in Java). Bearing in mind that they know a bit of java, it would be highly preferable to use a language that is similar to Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am well aware that there might not be a Java like language for this (other than JSP), but the more the language is similar to Java, the better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they end up learning a new language (not necessarily one for dynamic webpage generation), all the better.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-04T10:05:47.673" LastActivityDate="2017-09-04T15:12:25.080" Title="Choosing Java-like language for teaching web development" Tags="|java|web-development|language-choice|" AnswerCount="2" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="3481" PostTypeId="2" ParentId="35" CreationDate="2017-09-04T10:06:44.113" Score="1" Body="&lt;p&gt;There are already answers here. I will add a contrary one, as this point of view is missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When designing a program, the best ones are the ones where the business logic was designed first. Therefore it is better to design the back-end first. That is get all the processing done. Then output the data, possibly in json. Then think about how it will be displayed to the user; How the back-end will output html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However as other answers have pointed out, it will probably be better to learn the front-end stuff first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, one possible approach could be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Learn front-end: html, css, js&lt;/li&gt;&#xA;&lt;li&gt;Learn json, back-back-end&lt;/li&gt;&#xA;&lt;li&gt;Create back-end that emits json&lt;/li&gt;&#xA;&lt;li&gt;Learn json → html transformation&lt;/li&gt;&#xA;&lt;li&gt;Add transformations to project&lt;/li&gt;&#xA;&lt;li&gt;Add some css to project&lt;/li&gt;&#xA;&lt;li&gt;Add some js to project&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These last 3 steps also allow you to revisit front-end development, and see how this fits into back-end.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-09-04T10:06:44.113" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3482" PostTypeId="2" ParentId="3480" CreationDate="2017-09-04T11:27:44.220" Score="4" Body="&lt;p&gt;I would recommend C#, more specifically .NET with MVC. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It's fairly straightforward to move from Java to C#, seeing how they are both pretty much the same in terms of usage and maturity as a widely used OOP language.&lt;/li&gt;&#xA;&lt;li&gt;.NET allows you to use controllers + Views + Razor Engine which in turn allow you to use C# to generate most of the web portion i.e. HTML + CSS + JS. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On a related note, the days of programatically generating web code are behind us, now that JS based libraries are becoming ever more powerful. So, I have to opine here that teaching dynamically generating web pages using a Java like language is perhaps not the best step forward. They are better off taking up jQuery (or react if they are Facebook/Instagram fans).&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="150" LastEditDate="2017-09-04T11:29:16.983" LastActivityDate="2017-09-04T11:29:16.983" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3483" PostTypeId="2" ParentId="35" CreationDate="2017-09-04T13:11:44.947" Score="2" Body="&lt;p&gt;I'd like to summarize a few of the answers already given by suggesting a general framework for such &quot;chicken and egg&quot; problems. You have two things to teach that are closely related but different. You can't &lt;em&gt;really&lt;/em&gt; learn one without the other. The solution to such kinds of problems is to use a &lt;em&gt;spiral&lt;/em&gt; approach. This is already used to take students through a set of topics deepening their understanding on each loop, rather than trying to teach everything about one topic before moving on to the next. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do only the back end development for a long while I'm going to get bored since nothing exciting seems to happen. If I do only front end development for a long while I'm going to get frustrated since there is no support for the things I'm building. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, teach a little of this and a little of that and then cycle around. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach enough backend, say, to support something, and then enough frontend to make use of that, then go back for more - again and again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, some sophisticated sites get built in just exactly this way. Make your teaching as &lt;em&gt;agile&lt;/em&gt; as your development process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note that this process isn't limited to just the current question. Spiral teaching is a &lt;em&gt;big idea&lt;/em&gt;. There is even a &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; by that name. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For those who haven't heard it before, there is an old puzzle: Which came first, the chicken or the egg. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-04T13:11:44.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3484" PostTypeId="2" ParentId="3480" CreationDate="2017-09-04T14:52:49.380" Score="4" Body="&lt;p&gt;I would recommend:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Starting by teaching students just plain HTML, CSS, and perhaps JavaScript and focus on teaching the frontend first.&lt;/li&gt;&#xA;&lt;li&gt;Once students are ready for the backend, switch to using a &lt;em&gt;minimalist&lt;/em&gt; framework such as &lt;a href=&quot;http://sparkjava.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spark&lt;/a&gt;. Have them first construct HTML using plain old string concatenation, make a big deal over how sucky that is, then switch to using a &lt;a href=&quot;http://sparkjava.com/documentation#views-and-templates&quot; rel=&quot;nofollow noreferrer&quot;&gt;templating engine&lt;/a&gt; (any one will do, so it's probably best to pick one with the best documentation).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Teaching the front-end first does require you to make a &quot;clean break&quot; and switch away from Java, but I do think it's for the best for several reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It's essential context for the students to have. Many backend tutorials will assume you already have a good understanding of the frontend, so it'll likely be more confusing if you don't start with the frontend.&lt;/li&gt;&#xA;&lt;li&gt;Starting from the frontend lets students get instant gratification.&lt;/li&gt;&#xA;&lt;li&gt;Starting from the frontend lets you move from simplicity to complexity: you start with static websites and gradually progress to something more complex (dynamic page generation, AJAX hijinkery, etc...).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I like using micro-frameworks such as Spark (for Java) or Flask (for Python) for teaching the backend. There's minimal ceremony, and micro-frameworks tend to closely mirror the HTTP request-response model, minimizing conceptual overhead. And since Spark is Java, you don't need to spend unnecessary time teaching a similar language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, there's even an argument to be made that the best thing to do is to ditch even micro-frameworks and start with just plain CGI or something: you literally manipulate strings, and that's it. Then, time permitting, you have students write their &lt;em&gt;own&lt;/em&gt; framework/templating engine/what-have-you on top of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I view web development as one giant exercise in working with abstractions, and I feel one of the best ways to make students understand an abstraction is to have them build it from the ground-up/start without the abstraction. Web frameworks and trends come and go at a ludicrously fast pace, so I think it's particularly important in web development to focus on the fundamentals rather then trends. (You can see more about this philosophy &lt;a href=&quot;http://www.pgbovine.net/teaching-web-programming.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I like emphasizing that web frameworks are just complex ways of processing and sending strings: I think it helps demystify a lot of things, and gives students a concrete footing to help build their understanding of these abstractions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Tangent: you can work in all kinds of interesting CS topics depending on how much you want to commit to this &quot;build everything yourself&quot; model. For example, you can talk about compilers, parsers, and DSLs if you have students build their own templating engine; you can talk about NFAs, DFAs, regexes and such if you have students build their own regex engine to match routes... This is all probably overkill if your focus is just on teaching web development though.)&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-09-04T15:12:25.080" LastActivityDate="2017-09-04T15:12:25.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3485" PostTypeId="1" CreationDate="2017-09-04T17:01:16.660" Score="3" ViewCount="365" Body="&lt;p&gt;Our college has a course entitled &quot;Introduction To Programming&quot;, although I often tell the students that the real title should be &quot;Introduction to Programming... for non-majors... who have never programmed before&quot; (some people will take this course, decide they like it, and go on to major in Computer Science / Software Engineering / etc., but there's no expectation that any particular student will do so).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given that there's no expectation of prior programming knowledge, we spend some time (in class, on homework assignments, etc) teaching students how to find and fix syntax errors in programs (both theirs, and instructor-provided programs).  (We're using traditional, textual programming languages like Java / JavaScript, and NOT visual languages like Blockly, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question:&lt;/strong&gt; What techniques, exercises, approaches (etc) have you used to help students learn to deal with syntax errors?  What are the pros &amp;amp; cons of your approach?  &lt;/p&gt;&#xA;" OwnerUserId="2317" LastEditorUserId="150" LastEditDate="2017-09-04T18:23:44.370" LastActivityDate="2017-09-06T12:41:33.250" Title="How to teach beginning students how to find and fix syntax errors?" Tags="|syntax|cs0|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3486" PostTypeId="2" ParentId="3485" CreationDate="2017-09-04T18:25:07.360" Score="-1" Body="&lt;p&gt;I have not done Java, but I will draw from my experience teaching C #, jQuery and an entire collection of platforms I have worked on. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Rely on intellisense. Lot of students, for reasons that defy logic, don't trust the intelligence. Me though, I insist my students to wait (it takes a few seconds, sometimes more depending on how fast the machine is) for the intelligence to prompt things. This guideline alone saves a truck load of syntax mistakes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/hcw1s69b.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intellisense&lt;/a&gt; aka &lt;a href=&quot;http://en.wikipedia.org/wiki/Intelligent_code_completion&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intelligent code completion&lt;/a&gt;, for those who came late, is a feature available in most modern IDEs (visual studio, eclipse. Xcode, Android Studio) where, like when you do bing search, the words are automatically prompted for you. Things like reserved words ( for example int, main and all that) and function declarations, library names and anything else that is fixed. You use this, you NEVER get a syntax error. Easy peasy.&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Dont ignore warnings. Another classic beginner problem. Ignoring warnings. Unless it is really something that is trivial (a declared variable that is not used) I insist on fixing the warning, as that could potentially be a syntax issue, or something that is being used properly. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would go further, ask them to use the Camel Case (any one of its variations) but since not all will end up developers in your course, perhaps this is not useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I emphasise preemptively solving the problem of syntax errors here. If syntax errors have already happened, I guess, you fix them line by line. Alternatively, simply start from scratch, follow the above 2 guidelines is what I tell my students.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-09-05T04:02:03.460" LastActivityDate="2017-09-05T04:02:03.460" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3487" PostTypeId="2" ParentId="3485" CreationDate="2017-09-04T18:49:39.143" Score="1" Body="&lt;p&gt;There are two things you can do (among others). &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fixer Upper: Having students finish or repair a program that you create is a useful early exercise. In particular, you can give them a program larger than they would be expected to write themselves. It needs to have excellent design/coding. But you have either removed or carefully broken a few parts before you give it to them. The errors introduced can be quite simple (missing punctuation) or more complex. Their task is to repair it. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The students get to (a) read code (b) see good design (c) interpret compiler diagnostics (d) grapple with structure - assuming the program has some length. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This idea is discussed in the book &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns: Advice for Educators&lt;/a&gt;, where it is called &quot;Fixer Upper&quot;. You can use it for program errors other than simple syntax errors. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use an IDE that highlights syntax problems. This is actually my main advice. Syntax errors can now be diagnosed by tools so that a programmer needn't spend a lot of mental effort on them; effort that is better spent elsewhere. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are many such editors, from the simple, say that built in to &lt;a href=&quot;http://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt;, to the sophisticated, say &lt;a href=&quot;http://eclipse.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Eclipse&lt;/a&gt;.  Even with forty-five years of programming experience I wouldn't want to have to write with any lesser sort of tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that in natural language we often make syntax errors (in speaking and writing) and that seldom has an impact on transmission of meaning. Computer languages are picky, of course, but the tools will help you learn. If you correct a lot of errors you will get better at not making them, most likely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point, of course, you would like students to be able to find/fix errors on printouts, or even figure out obfuscated code. But that doesn't need to be their first task. They have enough to do already. So make life easy when you can. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;However, if you are going to use a sophisticated editor with novices there are some tricks to get them started. Staring at a blank computer screen is even less productive than searching for syntax errors. To do this requires a lab of some sort and some time for a demonstration. To do the demo I suggest that you pair the students so that there is one student at each computer. They can help one another - and should be encouraged to swap control of the keyboard back and forth as you go. The demo has two parts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you install the software on your own machine whose screen is projected for the class to see. They follow along. Some students will get it faster than others, which is the reason for pairing. Without it you will be stopped too often to help individuals. If you have a assistant who can go around to solve problems as you go, all the better. If the software is already installed on lab machines and they don't need to install it on their own, you still need to do some of this step to get them used to the UI. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you develop some simple program on your machine, demonstrating simple features that they need immediately. In particular, show them what happens when &lt;em&gt;you&lt;/em&gt; make a syntax error. Show them how to recognize the highlighting or whatever the system uses. In this part of the demo it is more fruitful if the students don't work along with you step by step. But you do a bit while they watch and ask questions. Then they spend some time, in their pairs, catching up. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Finally, I note that languages with static typing (Java) have tools that can, in principle, provide better guidance than those with dynamic typing (Python, Ruby). Of course, Java has a lot of opportunities for syntax errors, too. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-04T19:17:49.517" LastActivityDate="2017-09-04T19:17:49.517" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3488" PostTypeId="2" ParentId="3485" CreationDate="2017-09-04T21:39:14.653" Score="3" Body="&lt;p&gt;I would start by showing them a few natural language examples, where changing one letter in a sentence completely changes the meaning, perhaps into nonsense.  Most computer languages respond similarly to almost any syntax change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then show students program lines with correct and incorrect syntax (of typical mistakes, perhaps taken from previous sessions of the same course), and the corresponding error message(s), and/or incorrect/unanticipated run results.  Quiz questions to test this might be, given a line of incorrect syntax, what is the corresponding error message (or bogus result) and a possible correction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important idea is to help students form a mental connection between changes in syntax and changes in (IDE/compiler/interpreter/runtime/etc.) behavior.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-09-04T21:39:14.653" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3490" PostTypeId="2" ParentId="3456" CreationDate="2017-09-05T00:52:55.427" Score="1" Body="&lt;p&gt;First, a caveat: I usually teach software design, and have only taught basic programming to maybe 150 to 200 students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I'm not a huge fan of visual devices in teaching basic program structures (like selection, loops, and variable manipulation) because the art of programming involves &lt;em&gt;writing&lt;/em&gt; at its core. Doing that feels like I'm teaching somepony to write short stories by having them rearrange photographs of sentences. I want to show students how to write, and if the algorithms are very simple, the results are something all students can be taught to visualize and follow (provided they're around the sixth grade level or higher).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried using the Alice visual programming language to teach young girls once or twice. I suppose the theme for the language (which is aimed at girls) is based upon a theory that girls will be more interested in programming if it looks less sterile, or some other nonsensical shot in the dark about why we fled the science decades ago when computers first became boy toys. I'd honestly rather have a lesson on syntax followed by very simple programs with output that students can play around with directly. Let them change things in an IDE that will catch syntax errors and see what happens that way. They need to think in terms of written descriptions eventually, why not start them out like that? Diagrams and pictures are important, but I prefer to save them for the lesson itself, or as a tool on paper to guide composition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(For the record, I also have no idea how to get more of us interested in programming, but pandering to gender stereotypes ain't gonna be it.)&lt;/p&gt;&#xA;" OwnerUserId="2846" LastActivityDate="2017-09-05T00:52:55.427" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3491" PostTypeId="1" CreationDate="2017-09-05T00:57:48.990" Score="9" ViewCount="962" Body="&lt;p&gt;Something I've often observed is that many students find it challenging to figure out how to use full-fledged IDEs such as Eclipse, Netbeans, Visual Studios, IntelliJ, and PyCharm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I can tell, this is due to a variety of factors:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The UI is often visually complex and intimidating for beginners. This is exacerbated in cases where your IDE unexpectedly changes appearance (for example, after running anything in Eclipse).&lt;/li&gt;&#xA;&lt;li&gt;Setting up new projects and running even a simple &quot;hello world&quot; program is often non-trivial (you have to pick between several different &quot;project templates&quot;, need to adapt to working in this new folder layout, sometimes need to configure your IDE to point to your compiler or editor...)&lt;/li&gt;&#xA;&lt;li&gt;The IDE can sometimes be unexpectedly initially laggy. For example, IntelliJ will need to &quot;index&quot; your files/your standard library (with minimal visual cues that this process is taking place). This will cause functionality to be mysteriously laggy or missing for about a minute after first using your IDE.&lt;/li&gt;&#xA;&lt;li&gt;The IDE often introduces several new &quot;metaphors&quot; that need to be explained. (For example, Eclipse has this notion of a &quot;workspace&quot; -- it's not immediately obvious this is actually a folder on your filesystem). This problem is further exacerbated by the fact that a small minority of students don't seem to have a firm grasp of what a filesystem is (which is disconcerting).&lt;/li&gt;&#xA;&lt;li&gt;It's easy to accidentally screw up the appearance of your IDE. If you accidentally click a small button or drag-and-drop something by accident, you can remove an essential part of your view without an obvious way of getting it back.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In light of these factors (and other ones I may have missed), &lt;strong&gt;what is the best way to help students adapt to using IDEs?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I briefly thought about demoing how to install and use an IDE in class, but that seemed like a poor use of class time. My current idea is to provide handouts guiding students through their installation process, but I'm curious to see if there are more creative or effective solutions other people have come up with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the purposes of this question, we can assume students have completed at least CS 1, maybe CS 2, and have prior experience using either a text editor or a minimal IDE (such as BlueJ or JGrasp). I'd welcome both language-specific and language-agnostic answers.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2019-06-14T20:45:05.597" Title="Helping students adjust to using industrial-strength IDEs" Tags="|lesson-ideas|ide|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3492" PostTypeId="2" ParentId="3491" CreationDate="2017-09-05T04:14:08.327" Score="1" Body="&lt;p&gt;You have said that they have already completed CS1 and CS2, so my approach would be slightly more aggressive but still focused on the basics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with a simple analogy for an IDE. My personal favourite is that the IDE is like a kitchen in a house. Imagine that the dish/food/consumable item you want to prepare is Pizza. A good kitchen will have everything that you would need to prepare Pizza.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, you are trying to build a software/console or command line application. A good IDE is something that allows you to build an entire application, everything from a simple command-line 'hello, world' to world-changing software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the analogy done, lets tackle your points one by one. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;IDE appearance. I find that Eclipse is living in an unfortunate space between the old and the new. So, if possible, get rid of Eclipse because it's confusing, even for a pro like me. Try using more modern IDEs built with the modern student in mind. I am talking about Visual Studio, Android Studio or Xcode (if you are on Mac). If you are using Java, I might also suggest you try Netbeans which is a little more modern.&lt;/li&gt;&#xA;&lt;li&gt;Project Templates...okay, that is always a problem. In my case, I still go ahead and uninstall all the irrelevant templates from the machine. I mean, I ask the lab assistant to do it, but you get what I mean. This way, when the IDE launches, only the required one or two is available for the student. &lt;/li&gt;&#xA;&lt;li&gt;Screwing up the view. There is almost always a way to 'reset' the IDE to its initial state. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The other things, the minimal visual cues, and loading times...ah well, there is no getting around that. In my case, I simply have a 'time to grow up' talk with all the students. I tell them that they are no longer in their 1st year of college, and this is life now. The IDE, the complexity, the plethora of options, the imposing appearance, it is all part of their trade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Its like eating vegetables. You don't have to like them, but you eat them anyway. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="27" LastEditDate="2017-09-06T03:24:04.597" LastActivityDate="2017-09-06T03:24:04.597" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3493" PostTypeId="5" CreationDate="2017-09-05T06:30:59.367" Score="0" Body="&lt;p&gt;Minecraft is a building block game. Think Lego Blocks, but in the digital world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to using Minecraft in the context of introducing programming. General questions about the Minecraft game itself or for specific issues with installing a Minecraft server should be asked on &lt;a href=&quot;https://gaming.stackexchange.com/&quot;&gt;https://gaming.stackexchange.com/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Minecraft allows the player to use his/her creativity to build things. Almost anything can be built. It takes world building to its most logical conclusion. People have built everything from small houses to Game of Thrones castles in Minecraft. Minecraft also has some physics rules in its world, and it is possible to build machines. Further, it allows multiplayer so it is a great way to get people/students to work together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, Microsoft has a &lt;a href=&quot;https://education.minecraft.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Minecraft Education&lt;/a&gt; edition tailored to the use in education. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="1293" LastEditDate="2017-09-06T17:46:11.333" LastActivityDate="2017-09-06T17:46:11.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3494" PostTypeId="4" CreationDate="2017-09-05T06:30:59.367" Score="0" Body="Use this tag to ask about using the Minecraft game environment to teach elementary programming. General questions about the Minecraft game itself should be asked on the gaming.StackExchange forum. " OwnerUserId="41" LastEditorUserId="1293" LastEditDate="2017-09-06T17:46:11.333" LastActivityDate="2017-09-06T17:46:11.333" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3495" PostTypeId="5" CreationDate="2017-09-05T06:32:39.980" Score="0" Body="&lt;p&gt;This tag is for all questions related to textbook usage and recommendations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Textbooks, despite all the tech advance, are still the primary way to get information for students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Textbooks can be paper based (still the primary medium) but we also have online textbooks, ebooks and interactive textbooks.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="1293" LastEditDate="2017-09-05T11:28:11.267" LastActivityDate="2017-09-05T11:28:11.267" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3496" PostTypeId="4" CreationDate="2017-09-05T06:32:39.980" Score="0" Body="This tag is for questions about using a specific textbook as part of curriculum as well as for questions about using a type or category of textbook. Textbooks may be physical or electronic. " OwnerUserId="2605" LastEditorUserId="1293" LastEditDate="2017-09-05T11:30:31.373" LastActivityDate="2017-09-05T11:30:31.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3497" PostTypeId="5" CreationDate="2017-09-05T06:35:45.377" Score="0" Body="&lt;p&gt;Use this tag for all questions related to students giving evaluation of one another's work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple uses of peer evaluation involve exchanging of papers with comments made by each party. More involved is evaluation of the work of teammates on a joint project. The need for peer evaluation may arise when students work outside the view of an instructor, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Peer evaluation may feed into the overall evaluation of each student or may not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this tag is not for questions relating to students working together or helping one another in general. Such evaluation may help the one evaluated improve in a future cycle, of course. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="1293" LastEditDate="2017-09-05T20:14:53.413" LastActivityDate="2017-09-05T20:14:53.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3498" PostTypeId="4" CreationDate="2017-09-05T06:35:45.377" Score="0" Body="This tag is specifically for questions relating to students evaluating the work of other students. The evaluations can be given to either or both of the instructor or the student being evaluated. It is often used for evaluating teammates on a joint project, but can be used for mor general situations. " OwnerUserId="2605" LastEditorUserId="1293" LastEditDate="2017-09-05T20:14:53.413" LastActivityDate="2017-09-05T20:14:53.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3499" PostTypeId="5" CreationDate="2017-09-05T06:39:03.250" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2017-09-05T06:39:03.250" LastActivityDate="2017-09-05T06:39:03.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3500" PostTypeId="4" CreationDate="2017-09-05T06:39:03.250" Score="0" Body="For questions specifically related to the .NET programming framework common in Windows systems. " OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2022-08-09T15:44:07.833" LastActivityDate="2022-08-09T15:44:07.833" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3501" PostTypeId="2" ParentId="3491" CreationDate="2017-09-05T08:54:31.287" Score="1" Body="&lt;p&gt;I have experienced the same problem and I found a pretty easy solution by dividing the lecture into two parts: Theory (usually taught on the board) and Practical Demonstration (on IDE).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I come to the important point in your question (I had similar views to yours) on:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I briefly thought about demoing how to install and use an IDE in class, but that seemed like a poor use of class time&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I saved the time by not slowing down too much during demonstration (to show them how to use every feature of the IDE) but recorded all the work (using Screen-Recorder software) and it really worked.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is a better approach than that, I hope someone would enlighten us here about that too but my experience with this methodology was excellent one.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2017-09-05T08:54:31.287" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3502" PostTypeId="2" ParentId="3491" CreationDate="2017-09-05T10:57:08.157" Score="2" Body="&lt;h1&gt;The simple answer is don't:&lt;/h1&gt;&#xA;&lt;p&gt;Keep it simple.&#xA;The IDE will amplify their productivity and their confusion.&lt;/p&gt;&#xA;&lt;h1&gt;Consider the difference between education and training.&lt;/h1&gt;&#xA;&lt;p&gt;Are you teaching the IDE, because you need to train them for work, or because it will help with their education. Your role at a university is education, not training. If you educate them (teach them how to learn), then they can train themselves.&lt;/p&gt;&#xA;&lt;h1&gt;When to introduce IDE&lt;/h1&gt;&#xA;&lt;p&gt;Therefore once the students can program, knows their file-system and operating-system, (don't run before you can walk) and it is of educational value, then you can introduce the IDE.&lt;/p&gt;&#xA;&lt;h1&gt;Customising&lt;/h1&gt;&#xA;&lt;p&gt;You could provide a customised configuration file, that simplifies the IDE, by removing items that are not needed, and adding those that are. Provide a procedure for restoring this configuration (as they will break it).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-06-10T13:17:59.403" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="3503" PostTypeId="2" ParentId="3485" CreationDate="2017-09-05T11:45:02.660" Score="1" Body="&lt;p&gt;I teach my students to stick to two rules, which help with finding syntax errors and logical flaws:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Develop iteratively. Write a small part of the program; then &lt;em&gt;test it&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;When you get an error, break the last piece added up in different pieces and test them one by one. In the future, write smaller parts of code.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Of course, rule 1 is mostly helpful with absolute beginners; it slows down experienced programmers. But for those rule 2 still applies: work the problem down to a Minimal Working Example (MWE). That allows them to ask a concrete, well-scoped questions to their TA (or Stack Overflow).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two rules make sure that the student has a good idea of where in the code their problem is. And then, that part needs to be read very closely to spot syntax (or logic, ...) errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This mantra needs to be repeated over and over again. In my experience, students tend to think top-down and start working on the main logic without first building the basic blocks. That makes it impossible to test the program until it is entirely finished. By then, syntax errors (or really any kind of error) are hard to find. The initial strategy to break up the main logic is good, but then they should take a step back, think about the basic building blocks they are going to need, develop those (when in pairs/groups, this is a good point to divide the work) and test them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It takes a lot of effort and experience from the TAs to encourage students to read these rules. Often, students come to me with a syntax error without first trying to break down the problem (rule 2). An experienced user of the language immediately sees the error. It is tempting, especially when the lab is busy, to just tell the student what he needs to change. However, that does not really help him any further. You need to actually take the time to sit with the student and perform rule 2 together, until the student spots the mistake himself. Then he will learn the art of debugging.&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2017-09-05T11:45:02.660" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3504" PostTypeId="1" AcceptedAnswerId="3525" CreationDate="2017-09-05T11:52:55.223" Score="9" ViewCount="571" Body="&lt;p&gt;In &lt;a href=&quot;https://cseducators.stackexchange.com/a/24/24&quot;&gt;one of my answers&lt;/a&gt; I elaborated on the way we do language-tailored plagiarism checks on student submissions:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The general idea is to strip comments, whitespace, variable and function names, literals, and thus only keep the general structure of a program, i.e. parentheses, curly braces, semicolons, etc. (for C-like, that is). Then compare this 'hash' for all hand-ins, and when you find a match manually check if the programs look alike. For example, the hash of the program below would be something like &lt;code&gt;#&amp;lt;&amp;gt;(,*){(;;--){(&quot;&quot;,);}}&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;void repeat(int n, char *word) {&#xA;    for (; n; n--) {&#xA;        printf(&quot;%s\n&quot;, word);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While this model has proven successful in the past, there are a few obvious ways to escape these plagiarism checks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Moving functions around&lt;/li&gt;&#xA;&lt;li&gt;Changing parameter order&lt;/li&gt;&#xA;&lt;li&gt;Omitting / using &lt;code&gt;{&lt;/code&gt; and &lt;code&gt;}&lt;/code&gt; around single-line blocks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Fortunately, these are not the things most students think about (usually, they rename functions and variables / include comments). However, I am interested in improving this model &lt;em&gt;or&lt;/em&gt; using something that already exists which would tackle these issues above as well - not only because I want to be able to detect plagiarism but also because I find this an interesting problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I am thinking about a system that would actually parse the programs and compare the abstract syntax trees for similarities. Does any such system exist?&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2021-11-04T13:37:22.820" Title="Plagiarism checks for source code" Tags="|resource-request|plagiarism|" AnswerCount="4" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3505" PostTypeId="5" CreationDate="2017-09-05T12:20:01.720" Score="0" Body="&lt;p&gt;The main functionality of a program in an object oriented language is encapsulated in executable entities called methods. A method is similar to a function but is bound to an object or a class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions about teaching students the proper usage of methods. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:20:01.720" LastActivityDate="2017-09-05T12:20:01.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3506" PostTypeId="4" CreationDate="2017-09-05T12:20:01.720" Score="0" Body="This tag is for questions related to teaching the proper use of methods in object oriented languages such as Java and Python. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:20:01.720" LastActivityDate="2017-09-05T12:20:01.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3507" PostTypeId="5" CreationDate="2017-09-05T12:27:01.803" Score="0" Body="&lt;p&gt;Some CS educators have not (yet) earned a doctorate and their careers might be enhanced if they do so. Their general performance as teachers might also be improved by doing the research needed to attain a doctorate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, many such educators will have obstacles, such as the need to maintain employment. This tag is for questions related to how such educators can continue their education while overcoming the obstacles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that specific questions about doctoral education can and should be posted on the Academia site: &lt;a href=&quot;https://academia.stackexchange.com&quot;&gt;https://academia.stackexchange.com&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:27:01.803" LastActivityDate="2017-09-05T12:27:01.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3508" PostTypeId="4" CreationDate="2017-09-05T12:27:01.803" Score="0" Body="This tag is for questions related to CS educators considering extending their education to the doctoral level and how they might capitalize on their experience to do so. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:27:01.803" LastActivityDate="2017-09-05T12:27:01.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3509" PostTypeId="5" CreationDate="2017-09-05T12:44:07.547" Score="0" Body="&lt;p&gt;Many programs today have a &lt;em&gt;graphical&lt;/em&gt; rather than a textual interface: a GUI. The design and coding principles for such interfaces are a bit different from other (model) programming. Use this tag for all questions related to &lt;em&gt;teaching&lt;/em&gt; the design and implementation principles of graphical user interfaces. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag (and this site) is not appropriate for specific questions of design (see the Stack Overflow site) or implementation unless those relate to student learning. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:44:07.547" LastActivityDate="2017-09-05T12:44:07.547" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3510" PostTypeId="4" CreationDate="2017-09-05T12:44:07.547" Score="0" Body="This tag is for all questions related to teaching Graphical User Interfaces (GUI) in any environment. The tag can be used for questions of teaching both design and development. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:44:07.547" LastActivityDate="2017-09-05T12:44:07.547" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3511" PostTypeId="5" CreationDate="2017-09-05T12:49:29.157" Score="0" Body="&lt;p&gt;There are many kinds of examinations, both oral and written. Use this tag for all questions related to student testing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this tag is not for questions about testing code (unit and system tests). Such questions are likely out of scope for this site, unless they relate to &lt;em&gt;teaching&lt;/em&gt; code testing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:49:29.157" LastActivityDate="2017-09-05T12:49:29.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3512" PostTypeId="4" CreationDate="2017-09-05T12:49:29.157" Score="0" Body="This tag is for all questions related to testing students (examinations)." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T12:49:29.157" LastActivityDate="2017-09-05T12:49:29.157" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3513" PostTypeId="5" CreationDate="2017-09-05T14:35:47.593" Score="0" Body="&lt;p&gt;Students create mental models about the things they are taught. Sometimes these models are explicitly taught and sometimes students form them independently. If those frameworks are improper or incorrect, the student may be led to making wrong assumptions about what they are learning/doing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions about how to form correct frameworks and for how to correct the counterproductive concepts that students may have formed themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that students may mis-hear or mis-represent things they are taught. Note that teachers themselves aren't perfect and may occasionally say incorrect things that lead students to form incorrect mental models. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:35:47.593" LastActivityDate="2017-09-05T14:35:47.593" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3514" PostTypeId="4" CreationDate="2017-09-05T14:35:47.593" Score="0" Body="Use this tag for questions about the conceptual frameworks that students use to understand complex subjects. It can be used both for questions about teaching appropriate frameworks and for reacting to those frameworks that students may form themselves that may be proper or counterproductive. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:35:47.593" LastActivityDate="2017-09-05T14:35:47.593" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3515" PostTypeId="5" CreationDate="2017-09-05T14:40:20.683" Score="0" Body="&lt;p&gt;Swift is a programming language created by Apple Computer, primarily for building mobile applications for the IOS operating system. Use this tag for questions about teaching Swift, but not for technical questions about the language itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, since Swift is used primarily for IOS application development, use the tag for teaching such development using Swift. It is not appropriate for technical questions about IOS or IOS development. Those questions are appropriate in other fora on Stack Exchange.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:40:20.683" LastActivityDate="2017-09-05T14:40:20.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3516" PostTypeId="4" CreationDate="2017-09-05T14:40:20.683" Score="0" Body="Use this tag for questions related to teaching the Swift programming language from Apple. More generally it may be applied to questions of developing IOS applications in Swift. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:40:20.683" LastActivityDate="2017-09-05T14:40:20.683" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3517" PostTypeId="5" CreationDate="2017-09-05T14:47:12.877" Score="0" Body="&lt;p&gt;C# (C Sharp) is an object oriented programming language originally developed my Microsoft but now used more generally. It has some features similar to those of Java and some similar to C++. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to teaching C#. It is not, however, appropriate for technical questions about the language or its use. Those questions should be related to other fora on Stack Exchange, such as Stack Overflow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that some question might arise in the C# environment but be, in reality, more generally applicable to any object oriented language. It is good to use a sufficiently general tag so that those interested will be able to find your question easily. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:47:12.877" LastActivityDate="2017-09-05T14:47:12.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3518" PostTypeId="4" CreationDate="2017-09-05T14:47:12.877" Score="0" Body="Use this tag for all questions concerning teaching the C# programming language and its specific tools. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T14:47:12.877" LastActivityDate="2017-09-05T14:47:12.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3519" PostTypeId="5" CreationDate="2017-09-05T15:03:34.240" Score="0" Body="&lt;p&gt;&lt;em&gt;App&lt;/em&gt; is a term that normally refers to (smaller) applications developed for mobile platforms (phones, tablets, etc). Apps normally have constraints and requirements somewhat different from those of larger applications: memory constraints, network requirements, vendor rules, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;App development often requires specialized languages, libraries, and tools. They may be different for each platform. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to teaching such app development. It is not, however, appropriate for technical app development questions. Questions about tool and language selection for teaching such development are acceptable, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T15:03:34.240" LastActivityDate="2017-09-05T15:03:34.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3520" PostTypeId="4" CreationDate="2017-09-05T15:03:34.240" Score="0" Body="Use this tag for questions related to teaching application development on mobile platforms. Mobile applications are commonly referred to as &quot;apps&quot;. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T15:03:34.240" LastActivityDate="2017-09-05T15:03:34.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3521" PostTypeId="5" CreationDate="2017-09-05T15:20:37.440" Score="0" Body="&lt;p&gt;There are many resources used by CS educators and sometims useful teaching information is hard to come by. Use this tag if you need information about some particular teaching resource that can't be forund with simple web searches. In particular you may want information about the experience of others in using the resource. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag is not, however, appropriate for questions searching for resources. For that use &lt;a href=&quot;/questions/tagged/resource-request&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;resource-request&amp;#39;&quot; rel=&quot;tag&quot;&gt;resource-request&lt;/a&gt; instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This tag (and this forum) is also not appropriate for technical questions about resources. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T15:20:37.440" LastActivityDate="2017-09-05T15:20:37.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3522" PostTypeId="4" CreationDate="2017-09-05T15:20:37.440" Score="0" Body="This tag is for questions soliciting information on specific CS teaching resources or, possibly, a single class of resources. For example, questions of the experience of other teachers in using the resource are welcome. " OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2017-09-05T15:35:45.183" LastActivityDate="2017-09-05T15:35:45.183" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3523" PostTypeId="5" CreationDate="2017-09-05T16:33:48.567" Score="0" Body="&lt;p&gt;Boolean Algebra is a mathematics topic, but elements of it have been implemented in most programming languages as the basis of conditionals and loop control. This tag is for questions relating to the teaching of the programming language aspects primarily, but also the teaching the topic more generally as it applies to CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag is not for questions of a strictly mathematical nature, however. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T16:33:48.567" LastActivityDate="2017-09-05T16:33:48.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3524" PostTypeId="4" CreationDate="2017-09-05T16:33:48.567" Score="0" Body="This tag is for all questions relating to the teaching of boolean algebra and its implementation in programming languages. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T16:33:48.567" LastActivityDate="2017-09-05T16:33:48.567" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3525" PostTypeId="2" ParentId="3504" CreationDate="2017-09-05T17:45:50.177" Score="9" Body="&lt;p&gt;I have been responsible for using performing and evaluating tools for detecting software plagiarism in my academic department.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several published review articles in the scholarly journals. One such report &lt;a href=&quot;http://webarchive.nationalarchives.gov.uk/20140702163208/http://www.jisc.ac.uk/whatwedo/programmes/plagiarism.aspx&quot; rel=&quot;noreferrer&quot;&gt;Culwin, MacLeod &amp;amp; Lancaster, 2001, UK JISC, &quot;Source Code Plagiarism in UK HE&#xA;Computing Schools,&#xA;Issues, Attitudes and Tools&quot;&lt;/a&gt; gives an overview. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, there are published algorithms and methodologies you could implement yourself, open source software you can run locally, or an internet based service you can register and use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One such tool that you can run locally is &lt;a href=&quot;https://github.com/jplag/&quot; rel=&quot;noreferrer&quot;&gt;JPLAG&lt;/a&gt; from the University of Karlsruhe in Germany. This has several language syntax implemented, and as it is open source you can amend as desired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best online tool is &lt;a href=&quot;https://theory.stanford.edu/~aiken/moss/&quot; rel=&quot;noreferrer&quot;&gt;MOSS from Stanford&lt;/a&gt; which is the one I ended up using. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wanted to research the various published techniques for detection, &lt;a href=&quot;https://scholar.google.co.uk/scholar?q=code+plagiarism+detection&amp;amp;btnG=&amp;amp;hl=en&amp;amp;as_sdt=0%2C5&quot; rel=&quot;noreferrer&quot;&gt;Google Scholar is a good source&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2017-09-05T17:45:50.177" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3526" PostTypeId="2" ParentId="3491" CreationDate="2017-09-05T18:44:48.283" Score="9" Body="&lt;p&gt;IDEs are &lt;strong&gt;tools&lt;/strong&gt; that are designed to solve specific &lt;strong&gt;problems&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They're great for stuff like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Compiling multiple projects that contain a bunch of classes.&lt;/li&gt;&#xA;&lt;li&gt;Dealing with dependencies on multiple libraries.&lt;/li&gt;&#xA;&lt;li&gt;Handling stuff related to coding, like starting up servers.&lt;/li&gt;&#xA;&lt;li&gt;Packaging and deploying your application.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the students haven't encountered these problems, then honestly they probably aren't ready to use an advanced IDE. They don't have a need for it, and they should probably stick with whatever works for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another consideration is that students need to understand what's going on &quot;behind the scenes&quot; before jumping into using an IDE. At a bare minimum, they need to understand:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Basic command line interaction:&lt;/strong&gt; How do you navigate over directories? How do you run programs?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;System Path:&lt;/strong&gt; How does your computer know how to locate Java? How can you change this?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Compiling&lt;/strong&gt; and &lt;strong&gt;Running&lt;/strong&gt; code: How do you compile a &lt;code&gt;.java&lt;/code&gt; file via the command line? How do you run a &lt;code&gt;.class&lt;/code&gt; file? What is the difference?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Classpath:&lt;/strong&gt; How do you use a library from your code, from the command line?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Errors:&lt;/strong&gt; What is the difference between a compiler error and a runtime error? How do you read a stack trace?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; How do you consult the docs to figure out what functions a class has?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I say they need to understand this, because too often I see students who don't understand what the difference between path and classpath is, or who don't know what the red squiggly lines in their IDE are telling them, or who rely on auto-complete and copy-paste for everything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of that being said, I think you should start with a very basic text editor and the command line. Spend some time there and make sure they understand the basics. Then as their projects get more complicated, they'll &lt;strong&gt;naturally&lt;/strong&gt; see the benefits of using an IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Present the IDE as a solution to the problems that they're already experiencing.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;Who here is sick of specifying the classpath argument whenever they compile their code?&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Does anybody wish it was easy to see what functions a class has without needing to do read through the docs?&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Now that we know how to export our application via the command line, let's see a quicker way to do that.&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;Now that we've learned how to debug using a piece of paper and a pencil, let's see a way to do that automatically.&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Then introduce the IDE and point out specific ways to solve their specific problems. Throwing them in the interface and saying &quot;here are 100 different things this can do&quot; is going to be overwhelming. Build on what they already know, and solve the problems they're already experiencing with a more basic editor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This makes sure that they understand what's going on behind the scenes, which helps demystify the process. It also gives them a good reason to use an IDE, by framing it as a tool that helps make their lives easier, which is what it should be.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-05T20:35:44.520" LastActivityDate="2017-09-05T20:35:44.520" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3527" PostTypeId="5" CreationDate="2017-09-05T21:04:17.283" Score="0" Body="&lt;p&gt;Imperative programming is usually thought of as programming with mutable state and explicit testing of values for selection and iteration. It is often associated with languages such as C that use functions/procedures as the main abstraction mechanism along with various data abstractions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to the teaching of this paradigm. Note that most programming languages support at least some form of imperative programming but not all depend on it as the main conceptual framework. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:04:17.283" LastActivityDate="2017-09-05T21:04:17.283" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3528" PostTypeId="4" CreationDate="2017-09-05T21:04:17.283" Score="0" Body="This tag is for questions relating to the teaching of imperative programming such as that embodied in the C programming language. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:04:17.283" LastActivityDate="2017-09-05T21:04:17.283" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3529" PostTypeId="5" CreationDate="2017-09-05T21:09:05.913" Score="0" Body="&lt;p&gt;Complexity theory is a mathematical subject related to the inherent efficiency of algorithms. More precisely, it is more related to the problems than to the algorithms that solve the problems and it is known that certain problems have an inherent complexity that can't be ameliorated by any program running on a Turing Machine or in a language that is equivalent to a Turing Machine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certain deep problems of complexity theory have no known solution, which makes the topic especially interesting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions about the teaching of the theory, not questions about the theory itself. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:09:05.913" LastActivityDate="2017-09-05T21:09:05.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3530" PostTypeId="4" CreationDate="2017-09-05T21:09:05.913" Score="0" Body="This tag is for all questions of teaching complexity theory, a mathematical topic related to the inherent efficiency of algorithms and the problems they solve. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:09:05.913" LastActivityDate="2017-09-05T21:09:05.913" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3531" PostTypeId="5" CreationDate="2017-09-05T21:19:30.747" Score="0" Body="&lt;p&gt;Modern programming languages implement some version of a number of mathematical number systems in various bases; binary, octal, etc. Novices usually benefit from learning something about these number systems and the restrictions imposed by implementing them on finite machines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to the teaching of such number systems, including the common ones (int, float) and those a bit more esoteric (BigNum).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tag (and the site) are not appropriate for technical questions about number systems except as they relate to the teaching/learning of the concepts. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:19:30.747" LastActivityDate="2017-09-05T21:19:30.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3532" PostTypeId="4" CreationDate="2017-09-05T21:19:30.747" Score="0" Body="This tag is for all questions related to the teaching of number systems as embodied in programming languages. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:19:30.747" LastActivityDate="2017-09-05T21:19:30.747" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3533" PostTypeId="5" CreationDate="2017-09-05T21:23:08.013" Score="0" Body="&lt;p&gt;Turing Machines were one of the first ways to define the concept of computability and modern languages often contain features that are more or less easily mapped to concepts in the original ideas of Alan Turing. Turing machines are also important in learning complexity theory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to the teaching of the Turing Machine concept and its relation to programming. Historical questions may also be appropriate if related to teaching. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:23:08.013" LastActivityDate="2017-09-05T21:23:08.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3534" PostTypeId="4" CreationDate="2017-09-05T21:23:08.013" Score="0" Body="This tag is for all questions related to the teaching of Turing Machines and their relationship to programming in general. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:23:08.013" LastActivityDate="2017-09-05T21:23:08.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3535" PostTypeId="1" CreationDate="2017-09-05T21:29:20.343" Score="24" ViewCount="12044" Body="&lt;p&gt;In &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3491/helping-students-adjust-to-using-industrial-strength-ides&quot;&gt;this question&lt;/a&gt;, Michael0x2a points out something that I have observed, but never formally considered (emphasis my own):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol start=&quot;4&quot;&gt;&#xA;  &lt;li&gt;The IDE often introduces several new &quot;metaphors&quot; that need to be explained. (For example, Eclipse has this notion of a &quot;workspace&quot; -- it's not immediately obvious this is actually a folder on your filesystem). &lt;strong&gt;&lt;em&gt;This problem is further exacerbated by the fact that a small minority of students don't seem to have a firm grasp of what a filesystem is (which is disconcerting).&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have had, on occasion, to step all the way back to the idea of folders, directories, and directory trees for confused students, but these conversations always get muddled.  In spite of years of teaching this material, I am always surprised when a student cannot tell me what directory he or she is in, nor link the idea of a directory to some sort of metaphorical location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our so-called techno-natives have real difficulties with this, since phones and taskbars hide directory structures almost entirely.  This problem is especially easy to spot the first time a student is introduced to a command line, when I may have a conversation like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;You are currently in your home directory.  Type &lt;code&gt;cd somedir&lt;/code&gt; and press enter.  Great!  We have changed our directory to &lt;code&gt;somedir&lt;/code&gt;.  Now type &lt;code&gt;cd somesubdir&lt;/code&gt;... where are we now?&quot;&lt;/em&gt;'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students know, but some are genuinely lost.  The idea of going back up a directory &lt;code&gt;cd ..&lt;/code&gt;, or that &lt;code&gt;ls&lt;/code&gt; lists the items &lt;em&gt;at your current location,&lt;/em&gt; is so opaque that the question itself doesn't even seem to make sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many beginning students seem to already come in with an intuitive understanding of folders/directories, but some do not. Are there useful analogies or metaphors that you use to teach file systems to your students? &lt;em&gt;Do you address this problem in your classroom, and, if so,&lt;/em&gt; &lt;strong&gt;&lt;em&gt;how?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-09-05T21:41:15.447" LastActivityDate="2021-10-11T09:22:00.360" Title="Introducing file systems to students who really don't understand" Tags="|operating-systems|file-system|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3536" PostTypeId="5" CreationDate="2017-09-05T21:29:27.320" Score="0" Body="&lt;p&gt;Static can have various meanings, but generally speaking a member of a class is called &lt;em&gt;static&lt;/em&gt; if it is associated with the class itself rather than with objects created from the class. Static methods, are like ordinary functions, for example, not being bound to a particular object. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More generally, &lt;em&gt;static&lt;/em&gt; is used in distinction to &lt;em&gt;dynamic&lt;/em&gt; and the ideas are dependent on the languages in which they appear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to the teaching of this concept, including its appropriateness and the consequences of using static members. It is good in questions tagged &lt;a href=&quot;/questions/tagged/static&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;static&amp;#39;&quot; rel=&quot;tag&quot;&gt;static&lt;/a&gt; to distinguish the particular meaning about which you are inquiring. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:29:27.320" LastActivityDate="2017-09-05T21:29:27.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3537" PostTypeId="4" CreationDate="2017-09-05T21:29:27.320" Score="0" Body="Use this tag for all questions related to the teaching of static members of object-oriented (and similar) programming languages. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:29:27.320" LastActivityDate="2017-09-05T21:29:27.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3538" PostTypeId="5" CreationDate="2017-09-05T21:34:44.690" Score="0" Body="&lt;p&gt;SQL (Structured Query Language) is a largely standardized language for obtaining information from (querying) Relational Databases. It is sometimes used as a synonym for the databases themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to the teaching of SQL, and, perhaps, many questions related to Relational Databases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that in spite of its name, SQL also has instructions for populating such databases, not just retrieving information from them. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:34:44.690" LastActivityDate="2017-09-05T21:34:44.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3539" PostTypeId="4" CreationDate="2017-09-05T21:34:44.690" Score="0" Body="This tag is for all questions related to the teaching of SQL (Structured Query Language) which is a more or less standardized language for obtaining information stored in Relational Databases. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-05T21:34:44.690" LastActivityDate="2017-09-05T21:34:44.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3540" PostTypeId="5" CreationDate="2017-09-06T06:10:26.250" Score="0" Body="" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T06:10:26.250" LastActivityDate="2017-09-06T06:10:26.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3541" PostTypeId="4" CreationDate="2017-09-06T06:10:26.250" Score="0" Body="Questions related to teaching about file systems and how to use various file systems work. Use this tag to ask questions in relation to teaching (or learning) about file systems." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T06:10:26.250" LastActivityDate="2017-09-06T06:10:26.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3542" PostTypeId="5" CreationDate="2017-09-06T06:19:38.037" Score="0" Body="&lt;p&gt;XML is a markup language that describes document formats by using tags with attributes and nesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a document describing a person might look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;person name=&quot;Person's name&quot; height=&quot;1.77&quot;&amp;gt;&#xA;    &amp;lt;career&amp;gt;&#xA;        &amp;lt;property name=&quot;job&quot; value=&quot;IT&quot; /&amp;gt;&#xA;        &amp;lt;property name=&quot;experience&quot; value=&quot;5y4m&quot; /&amp;gt;&#xA;    &amp;lt;/career&amp;gt;&#xA;&amp;lt;/person&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Tags that have other tags nested within them must have an open tag and a close tag:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;tag&amp;gt;This was the open tag&#xA;    And this is the close tag:&#xA;&amp;lt;/tag&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Comments in an XML file:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;!--no need to escape &amp;lt;code&amp;gt; &amp;amp; such in comments--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1035" LastEditDate="2018-10-23T08:51:50.733" LastActivityDate="2018-10-23T08:51:50.733" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3543" PostTypeId="4" CreationDate="2017-09-06T06:19:38.037" Score="0" Body="Questions related to teaching xml file structure, xml usage and xml parsing." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T06:19:38.037" LastActivityDate="2017-09-06T06:19:38.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3544" PostTypeId="2" ParentId="3535" CreationDate="2017-09-06T10:34:08.153" Score="22" Body="&lt;h1&gt;The problems&lt;/h1&gt;&#xA;&lt;h2&gt;Hierarchies are not obvious&lt;/h2&gt;&#xA;&lt;p&gt;First let me point out that a hierarchy is not the most obvious or best structure for storing files. It is still based on library categorization systems, where a book can be in only one place. I file could be indexed in more than one place (and sometimes is).&lt;/p&gt;&#xA;&lt;p&gt;A tag system as used on this-site, Gmail and elsewhere, that allows you to give multiple tags to a file, is better. E.g Tag something as education, computers, filesystems, cats, boxes.&lt;/p&gt;&#xA;&lt;p&gt;Tags should be arranged hierarchically, not files. However as educators there is little we can do about this.&lt;/p&gt;&#xA;&lt;h2&gt;Microsoft Windows, Mac OS X, Android, and iOS hide things&lt;/h2&gt;&#xA;&lt;p&gt;Of the big four major proprietary Operating Systems (Windows, OS X, Android, iOS), Microsoft Windows hides the directory structure the least. Apple is probably the biggest villain here. They made an active decision starting with the iPod and iTunes that directories needed to be hidden, and the world has been moving that way ever since.&lt;/p&gt;&#xA;&lt;p&gt;What I say in this section applies generally to all 4, but I have given specific example for Microsoft Windows.&lt;/p&gt;&#xA;&lt;p&gt;MS-Windows has some strange non-folder folders (&lt;code&gt;Desktop&lt;/code&gt;, &lt;code&gt;Documents&lt;/code&gt;, &lt;code&gt;Videos&lt;/code&gt;, &lt;code&gt;Music&lt;/code&gt;), sort of like symbolic links but not. This causes problems of understanding. For example, I used a tool and known that it has saved to &lt;code&gt;Images&lt;/code&gt;, but took over 10 minutes to retrieve the file, as I did not know where on the filesystem it was.&lt;/p&gt;&#xA;&lt;p&gt;Recent versions of MS-Windows have dropped the ⬆ up arrow (they then brought it back again), in file explorer.&#xA;It only has ⬅ ➡ left and right arrows. This makes it difficult to navigate and experience the hierarchy.&lt;/p&gt;&#xA;&lt;p&gt;Recent versions of MS-Windows, by default hide file extensions. This may not affect understanding of hierarchy but does affect understanding of file names. (While I agree that using file extensions to encode file type is a bad idea, hiding them under the carpet is just making it worse.)&lt;/p&gt;&#xA;&lt;p&gt;Microsoft wants to store pictures with pictures, music with music, spreadsheets with spreadsheets. I want to store teaching stuff with teaching stuff: A class may have a presentation, a work sheet, some images, some source code, etc. it all needs to be kept together.&lt;/p&gt;&#xA;&lt;h1&gt;Some solutions&lt;/h1&gt;&#xA;&lt;h2&gt;A teaching metaphor&lt;/h2&gt;&#xA;&lt;p&gt;I have taught some year 7 pupils (age 11 years old), by showing them a set of slide and telling them a story. The story was about how you can but a box in a box, and a box in a box in a box, and several boxes in a box. Boxes have names/labels, cats have names/collars. You can also put a cat in a box, but you must never try to put a box in a cat. Boxes are like folders/directories, cats are like files.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Vanps.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Vanps.png&quot; alt=&quot;Cats in a box&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://i.stack.imgur.com/jFNwk.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jFNwk.png&quot; alt=&quot;Hierarchy of cats in boxes&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can ask students: “Can a box be in more that one box?”, “Can a cat be, fully, in more than one box?”, “Can a box and a cat be in the same box?” …&lt;/p&gt;&#xA;&lt;h2&gt;If using Microsoft Windows&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Disable hide file extensions&lt;/li&gt;&#xA;&lt;li&gt;Do something about these Libraries (non-folder folders): In my virtual machine with Windows 7, I have disabled all of the libraries.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Learn the filesystem and the operating system&lt;/h2&gt;&#xA;&lt;p&gt;I would teach the Unix command line (UNIX, GNU/Linux, BSD). It does makes it easier to see how things work. Nothing is hidden, but things are often nicely abstracted. “It is so simple that, if you come up with a metaphor to explain how it works, it probably is how it works.” — miss-quoted from one of the founders of Unix (Thomas, Ritche or other).&lt;/p&gt;&#xA;&lt;p&gt;I would also recommend using the dolphin file browser. Dolphin has an integrated command line, where directory changes are synchronized in both directions. This makes it easier to switch back and forth between text (command line) and graphical view and/or controller.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You are currently in your home directory. Type &lt;code&gt;cd «somedir»&lt;/code&gt; and press Enter.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;See the change in the graphical part of the display.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Click on a directory&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;See the change, in both GUI and command line&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/pdgJq.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/pdgJq.png&quot; alt=&quot;dolphin before changing directory&quot; /&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/pBOuI.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/pBOuI.png&quot; alt=&quot;dolphin after changing directory&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;GNU/Linux with KDE, has a great GUI, and command line. Intuitive, simple, and follows the principle of least surprise.&lt;/p&gt;&#xA;&lt;p&gt;GNU/Linux is more available (When compared to some other OSs e.g. macOS, Microsoft Windows): You have the freedom to download it. Run it. Distribute it. Study it. Modify it.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="6186" LastEditDate="2021-10-11T09:22:00.360" LastActivityDate="2021-10-11T09:22:00.360" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="3545" PostTypeId="2" ParentId="3535" CreationDate="2017-09-06T11:08:32.793" Score="10" Body="&lt;p&gt;Its actually harder than just finding a modern user-interface which exposes a directory structure. The whole concept of a directory structure is just a convenience - there is nothing 'physical' which it relates to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of us started our interactions with computers at a point where directories were the first point of interaction, so it is hard to relate to the experience gained from modern interfaces where the 'workings' are abstracted and files are located by searching rather than through an index.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it's now become important to teach storage structures as soon as you have a scenario which permits it. I think that a library is a good analogy - people are familiar with a large amount of structured content, and books containing different types of content.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To discuss where a document (or book) might be stored, you have potentially quite a lot of layers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Country&lt;/li&gt;&#xA;&lt;li&gt;City&lt;/li&gt;&#xA;&lt;li&gt;Institution (university, council library)&lt;/li&gt;&#xA;&lt;li&gt;Department&lt;/li&gt;&#xA;&lt;li&gt;Building&lt;/li&gt;&#xA;&lt;li&gt;Floor&lt;/li&gt;&#xA;&lt;li&gt;Shelf&lt;/li&gt;&#xA;&lt;li&gt;Shelf position&lt;/li&gt;&#xA;&lt;li&gt;Book title&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can also have copies of the same book - with different notes in the margins, or different pages missing. Today, files are maybe in an anonymous data centre, or on a device, or on removable storage. I think it's useful to go to this level first before introducing the idea that we have a virtual structure within any one drive, because this helps to explain why it starts to be useful to have a structure. When you only own 5 or 10 books, you can easily find them all. Once it's all your photos, and all the music you ever streamed - then it's not so easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, you can introduce the idea of arbitrary named containers (which are nested). Explain what they're for and how they are important, then show the real-life example on the actual hardware you're using (and explain why this is abstracted from normal non-expert users).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; It also occurs to me that spending too much time re-enforcing legacy storage concepts is not helpful, so resorting to the command line as a primary teaching tool for this might not be good. Teach enough that &lt;em&gt;if&lt;/em&gt; they are in an environment where the command line is important, the concepts come naturally, but don't pass on your own legacy baggage.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-09-06T13:20:03.410" LastActivityDate="2017-09-06T13:20:03.410" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3546" PostTypeId="5" CreationDate="2017-09-06T11:20:49.467" Score="0" Body="&lt;p&gt;Concurrency is the measure to which the order of execution of units or tasks in an algorithm or program changes the result. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concurrent tasks are order-independent, which enables parallel execution of tasks, without affecting the outcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concurrent programming can involve dynamic methods of communication. Concurrency is meant, in part, to achieve a correct outcome (one that is always the same for some input). Concurrent systems such as Operating systems and Database management systems are generally designed to operate indefinitely, including automatic recovery from failure, and not terminate unexpectedly. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T11:20:49.467" LastActivityDate="2017-09-06T11:20:49.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3547" PostTypeId="4" CreationDate="2017-09-06T11:20:49.467" Score="0" Body="Questions related to teaching concurrency and concurrent programming, as well as teaching various methods of creating concurrent operations." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T11:20:49.467" LastActivityDate="2017-09-06T11:20:49.467" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3548" PostTypeId="5" CreationDate="2017-09-06T11:20:51.250" Score="0" Body="&lt;p&gt;Metaprogramming is the concept that a program creates a program. That doesn't mean &quot;creates text that can be compiled&quot; but creates a running program itself. It is a completely natural concept in Lisp and its derivatives since there is no real distinction there between code and data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ruby provides full support for metaprogramming as do some other object-oriented languages. Java provides poor support for the idea. Note that metaprogramming is a deeper concept than program reflection: getting information about the running program from within it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-06T11:20:51.250" LastActivityDate="2017-09-06T11:20:51.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3549" PostTypeId="4" CreationDate="2017-09-06T11:20:51.250" Score="0" Body="Use this tag for all questions about teaching the concept of metaprogramming. Metaprogramming is the idea that a program creates or modifies a program, sometimes the executing program itself. Note that program reflection is a weaker concept in which a running program learns things about itself. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-06T11:20:51.250" LastActivityDate="2017-09-06T11:20:51.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3550" PostTypeId="5" CreationDate="2017-09-06T11:28:42.173" Score="0" Body="&lt;p&gt;Windows is a series of operating system created by &lt;a href=&quot;https://en.wikipedia.org/wiki/Microsoft&quot; rel=&quot;nofollow noreferrer&quot;&gt;Microsoft&lt;/a&gt;, and features a graphical user interface. There have been several versions of the operating system, recent ones based on NT, the latest being &lt;em&gt;Windows 10&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to the graphical user interface, Windows has built in command line tools such as &lt;a href=&quot;https://en.wikipedia.org/wiki/PowerShell&quot; rel=&quot;nofollow noreferrer&quot;&gt;Powershell&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Cmd.exe&quot; rel=&quot;nofollow noreferrer&quot;&gt;CMD&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These tools enable the user to access settings and options that are otherwise not shown in the graphical user interface, and so are hidden from them.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2017-09-14T12:09:17.573" LastActivityDate="2017-09-14T12:09:17.573" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3551" PostTypeId="4" CreationDate="2017-09-06T11:28:42.173" Score="0" Body="For questions related to using Windows operating system in teaching, as well as teaching its usage in computer science." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2017-09-06T11:28:42.173" LastActivityDate="2017-09-06T11:28:42.173" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3552" PostTypeId="2" ParentId="3535" CreationDate="2017-09-06T12:34:32.877" Score="6" Body="&lt;p&gt;Make sure you are having your students &quot;spelunk&quot; in the file system and have them draw some of the tree structure.  Often, this visualization helps them see the way the FS works, more clearly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We spend a couple of days gaining an understanding of absolute and relative path.  I teach this course using a Gnu/Linux server.&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="204" LastEditDate="2019-03-21T10:26:19.690" LastActivityDate="2019-03-21T10:26:19.690" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="3553" PostTypeId="2" ParentId="3485" CreationDate="2017-09-06T12:41:33.250" Score="0" Body="&lt;p&gt;This is a big reason I like to teach about HTML and web sites before getting into a full-fledged programming language.  I require my students to use the HTML 5 validator to validate their pages.  From this, they learn about reading error messages, and they learn how to stamp out errors.  &lt;a href=&quot;http://www2.ncssm.edu/~morrison/currentClasses/specs/replicateMe.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;This&lt;/a&gt; project specifies the student must use proper HTML.  They can get 100% if they use the validator and extirpate all error messages.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;HTML error messages are far easier to read than those arising from programming languages.  As a second benefit, we discuss HTML and the document tree.  We then relate this tree structure to the tree structure of a file system.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-09-06T12:41:33.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3554" PostTypeId="2" ParentId="3469" CreationDate="2017-09-06T16:44:49.557" Score="2" Body="&lt;p&gt;user2892 mentioned the book SICP (Structure and Interpretation of Computer Programs). This book alone is enough of a reason to justify Scheme as a major contender for an introduction to computer science class. This book is a must-read for anyone truly into computer science. See Brian Harvey's essay...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Brian Harvey: &quot;In 2011, to celebrate the 150th anniversary of MIT, the &lt;em&gt;Boston Globe&lt;/em&gt; made a list of the most important innovations developed there. They asked me to explain the importance of SICP, and this is what I sent them:&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://people.eecs.berkeley.edu/~bh/sicp.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://people.eecs.berkeley.edu/~bh/sicp.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2925" LastActivityDate="2017-09-06T16:44:49.557" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3555" PostTypeId="1" CreationDate="2017-09-06T19:11:45.543" Score="5" ViewCount="137" Body="&lt;p&gt;I teach undergraduate computer architecture and am reconsidering one of my homework assignments in which I ask students to simulate by hand (on paper) the behavior of different caches on the same access sequence. It is tedious to create such a problem in a way that the caches behave differently in an interesting way, and I'm sure doing the problems is tedious too (as is grading them). I'm willing to do the work and have students do the work if it's actually useful, but I'm not sure it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of the weekly homework assignments it to reinforce the material the students learn from the textbook (&lt;em&gt;Computer Organization and Design&lt;/em&gt; by Hennessy and Patterson), lectures, and in-class exercises. There is already a full set of lab assignments that require wiring or coding (in assembly language or Verilog). There is not time for an additional lab assignment on cache simulation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a separate homework assignment that asks higher-level questions about caches, such as which of two versions of code is likely to run faster if cache performance is taken into account. I think writing cache-aware programs is an important skill. Is simulating the differences between direct-mapped, 2-way set associative caches, and 4-way set associative caches an important part of students' education?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-09-06T20:48:49.707" Title="Is there any purpose to having students do fiddly cache homework assignments?" Tags="|undergraduate|architecture|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3556" PostTypeId="2" ParentId="3555" CreationDate="2017-09-06T20:14:01.630" Score="3" Body="&lt;p&gt;It sounds like you've already answered your question, but I'll throw in my two cents:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It depends.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does every software engineer need to simulate the differences between direct-mapped, 2-way set associative caches, and 4-way set associative caches? &lt;strong&gt;Absolutely not.&lt;/strong&gt; I've been a programmer for about 10 years now, and I think I have a pretty successful career, and I have no idea what those things even mean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, should some students, who are particularly interested in these kinds of things, take a deeper dive? &lt;strong&gt;Absolutely yes.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it comes down to a question of: is this course designed for students to get a high-level overview of computer architecture, or is this a more specialized course designed for students to get more information about the low-level details? In other words, is this a &lt;strong&gt;breadth&lt;/strong&gt; or &lt;strong&gt;depth&lt;/strong&gt; course?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to give students a high-level overview, and then point particularly interested students at further reading, more advanced courses, or specialized fields they might study in grad school.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-06T20:28:32.390" LastActivityDate="2017-09-06T20:28:32.390" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3557" PostTypeId="2" ParentId="3555" CreationDate="2017-09-06T20:48:49.707" Score="0" Body="&lt;p&gt;I'll suggest you step back and look at the picture from a distance. You describe the assignment as &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Fiddly&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On Paper&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'll assume, with no evidence that it is also&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Individual assignment&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Are your students in general good at those sorts of things already or would this be a first for the first two at least. Those kinds of things are worth doing, so if they don't have such experience then you have something nice for them already. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, students also need to be able to&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Write technical reports&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Work in pairs or teams&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Speaking in public&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the don't have those kinds of experiences already, but are good at &quot;fiddly&quot; then you might modify the assignment to include more of the latter ideas. I don't guess that lack of writing skill is your student's big problem, but don't know about teamwork. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for a new experience for them, you could put them in pairs to write a tech report recommending one cache mechanism or another. They would have to do much of the technical work, of course, but perhaps not to the same degree, but would have to spend more time/effort on the writeup to convince their colleagues (i.e. you) and the other students in a presentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to have good experience, when working with very good students, to give two assignment versions, where the students chose one. The versions were different in kind and different in difficulty, and stressed different things. They were correctly advertised. I was surprised at how often the students chose the harder one. Part of my advertising for the two versions of the assignment was the kind of skill they could expect to achieve by doing it. I also cautioned them that if they chose wrong they would be bored. They were graded the same and on the same scale. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-06T20:48:49.707" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3558" PostTypeId="1" CreationDate="2017-09-06T21:37:27.723" Score="6" ViewCount="385" Body="&lt;p&gt;On &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3469/what-could-be-the-possible-advantages-of-teaching-scheme-as-first-programming-la&quot;&gt;another question&lt;/a&gt;, &lt;a href=&quot;https://cseducators.stackexchange.com/a/3473/283&quot;&gt;Ben. I claimed&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;By utilizing a functional language in your first course, you get to&#xA;  have a classroom full of kids who have a much more similar footing.&#xA;  And when you move on, later, to imperative programming, you no longer&#xA;  have any kids with no experience. It's a simple trick to keep your&#xA;  cohorts more on-level without wasting the time of the advanced&#xA;  students.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've heard this argument before and wonder if it's really true. The first programming course I encountered was in Scheme, and it seemed that students with prior programming experience (even in imperative languages) tended to do well in the course, while some students without prior experience were lost. Of course, my undergraduate days were long ago, correlation does not equal causation, and my data is anecdotal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there evidence that using a functional programming in an introductory college course reduces the effects of differences in programming background?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-12-06T21:09:56.047" Title="Does teaching an intro course with a functional language really help level the playing field?" Tags="|undergraduate|functional-programming|programming-paradigms|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3559" PostTypeId="2" ParentId="3273" CreationDate="2017-09-07T04:23:22.853" Score="4" Body="&lt;p&gt;Based on my experience, printed textbook is still the best learning materials. You'll gain maximum benefit for reading comprehension, recite and knowledge understanding from traditional paper based book. Because printed textbook avoid reader from many distraction!&#xA;However, you'll able to use eBook for fictional books like novels, comic, etc.&lt;/p&gt;&#xA;" OwnerUserId="2930" LastActivityDate="2017-09-07T04:23:22.853" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3560" PostTypeId="1" AcceptedAnswerId="3561" CreationDate="2017-09-07T12:18:58.327" Score="27" ViewCount="5560" Body="&lt;p&gt;In university, I was a student in an operating systems programming course in C. Assignment help was offered in tutorials. Students would usually present the tutor(s) with run-time errors and an enormous amount of code. The tutors took 20 minutes to figure out the mess and offer help. In a 50 minute class of 30, most students went neglected, while some scored private tuition. Assignments were large and students were forbidden to view each other's code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was a serious problem. What could teaching staff do to address this?&lt;/p&gt;&#xA;" OwnerDisplayName="user2923" LastActivityDate="2018-04-05T20:28:39.807" Title="Assisting students with large programming assignments takes too long in class" Tags="|classroom-management|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3561" PostTypeId="2" ParentId="3560" CreationDate="2017-09-07T12:30:36.317" Score="38" Body="&lt;p&gt;The problem, in my view, is a misplaced assumption that students should never see one another's code and that seeing it would somehow or other &quot;pollute&quot; the student's mind in some way or make grading invalid. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A clear solution, provided that you can give up that assumption, is to have the students work in pairs in the tutorial, giving help and advice to one another. A more radical approach, that I also favor, is to have students work together to develop the code in the first place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has been observed (I have seen the video) that when students work together they seldom need outside help and call for tutor help only rarely. When students work alone and wait for the tutor they are mostly idle while waiting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this is that, while both students in a pair may have problems, they seldom have the same problems and so can support one another's learning. When a tutor's help is needed, there has already been a deeper analysis of the issue at hand, since there were two minds working on it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you worry less about grading, and less about some students &quot;slacking&quot; you can do a better job overall, especially for those who are interested in learning. Students &lt;em&gt;can&lt;/em&gt; learn from one another. It isn't &lt;em&gt;essential&lt;/em&gt; that they learn  only from the instructor. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My experience, also, is that when a &quot;better&quot; student helps another, both benefit from the experience. The helper gains deeper insight by having to verbalize an understanding that may be only partly formed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When abrasive personalities get in the way of pairing, the one that is abrasive needs to learn better behavior in any case if he/she is to be successful in the long run. Instructors need to watch for this, of course, and offer advice as needed. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-07T12:39:34.877" LastActivityDate="2017-09-07T12:39:34.877" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3562" PostTypeId="2" ParentId="3560" CreationDate="2017-09-07T14:32:29.767" Score="6" Body="&lt;p&gt;It sounds like the students were not really ready for these assignments in the first place. If students are coming with runtime errors (instead of logic errors), then they are not testing their code well as they write.  Helping students debug their code is a band-aid on the larger problem that the students do not know how to organize and test their code.&lt;/p&gt;&#xA;&lt;p&gt;My first choice would be for the professor to offer an emergency session on some basic Software Engineering practices, ideally before the assignment has even begun.&lt;/p&gt;&#xA;&lt;p&gt;However, if I were in the position of the TAs (and could not modify the assignment), then I would consider the situation a mini crisis, and I would have to act as a First Responder. I would send out an email to this effect:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Dear class,&lt;/p&gt;&#xA;&lt;p&gt;We have noticed that many students are having trouble with the latest assignment and have been asking for help. That's okay! That's what we're here for.&lt;/p&gt;&#xA;&lt;p&gt;However, much of the code that we have been seeing has been poorly organized, and as a result, it has become impossible for us to help everyone in a timely manner.  In order to help us fix our timing problem (and, honestly, to help you fix your code before you even need to come to us) please make sure that you have placed a comments on the top of each method in your code that contains the following:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A short description of what the method is meant to do.&lt;/li&gt;&#xA;&lt;li&gt;A list of all of the test cases you have tried for this method, and an indication of the results returned.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Doing this will help you spot your own errors, and will make it substantially faster for us to help you in case you are still stuck.&lt;/p&gt;&#xA;&lt;p&gt;Thanks,&lt;/p&gt;&#xA;&lt;p&gt;The TA Team&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-07T14:32:29.767" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3563" PostTypeId="2" ParentId="3560" CreationDate="2017-09-07T17:14:53.503" Score="4" Body="&lt;p&gt;As @buffy @BenI said. In addition:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Allocate shorter time slots.&lt;/li&gt;&#xA;&lt;li&gt;Have names in a queue on a white board.&lt;/li&gt;&#xA;&lt;li&gt;Students can move up the queue if they help someone else that is in the queue (take there place).&lt;/li&gt;&#xA;&lt;li&gt;Have an entry criteria:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Able to state:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;what you are trying to do&lt;/li&gt;&#xA;&lt;li&gt;what you expected&lt;/li&gt;&#xA;&lt;li&gt;what the inputs are&lt;/li&gt;&#xA;&lt;li&gt;what went wrong&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Code uses good name, and is easy to read. ( Better names are better than better comments. But comments where necessary.)&lt;/li&gt;&#xA;&lt;li&gt;Have them code one thing at a time, and test it: test first.&lt;/li&gt;&#xA;&lt;li&gt;Have them use revision control, and be able to answer “What has changed since the last time it worked?”&lt;/li&gt;&#xA;&lt;li&gt;Stop the class for an emergency mini lesson, if you see several of the same problem.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You may use your time to help them meet entry criteria, or hand them to a minion, or give them a handout. However you will only do this, and not deal with the problem, in this time slot. They must re-join the queue.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-04-03T13:36:11.060" LastActivityDate="2018-04-03T13:36:11.060" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3564" PostTypeId="2" ParentId="3558" CreationDate="2017-09-07T19:14:27.663" Score="2" Body="&lt;p&gt;Let me mention, at least, another dimension to this. There are various functional languages and some of them are closer to what your students may have in their backgrounds. A language with dynamic scope and abstract syntax is a very different beast from one with lexical scope and a rich syntax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only functional language that I really worked at was ML and I got quite good at it. But I learned that I really want the concrete syntax that it offers as an aid in my thinking. The underlying concepts are the same, of course, but I'm pretty worthless in Scheme. But then, I didn't learn Emacs from my mother as many schemers seem to have done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you want to &lt;em&gt;level the playing field&lt;/em&gt; then I will guess that you want something as unlike their previous experience as possible. Say Scheme, rather than Haskell. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, some students will pick up the new ideas faster than others no matter what you do, so it is good, in my view, to take advantage of that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course, if you are going to do something very non-standard, make sure that you have the necessary expertise first. That isn't a situation for staying one chapter ahead in the book as some instructors are forced by circumstances to do. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-07T19:14:27.663" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3565" PostTypeId="2" ParentId="3560" CreationDate="2017-09-07T21:09:24.303" Score="20" Body="&lt;p&gt;&lt;strong&gt;Smaller Chunks:&lt;/strong&gt; Students should be working in smaller chunks of code.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;They need to write as small a chunk as possible (one function or even one line of code), then compile, run, and test that. This process should be introduced as early as possible and enforced as much as possible- for the sake of the sanity of everybody involved.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Students should &lt;strong&gt;not&lt;/strong&gt; be writing an entire application or feature and then having no idea why something isn't working, or why a runtime error is occuring. This is a common pitfall for novices, and it's a habit they need to be broken of as soon as possible.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Debugging:&lt;/strong&gt; Students should be debugging their code before asking questions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;When they encounter an error, their first instinct should be to debug their program to get more info about what's going on. Have you taught them how to read a stack trace? How to trace through code with a piece of paper and a pencil? How to use a debugger?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The goal of debugging is to narrow the problem down to a single line of code, or as few lines of code as possible, that are exhibiting an unexpected behavior. &lt;em&gt;&quot;I tried X, expected Y, but got Z instead&quot;&lt;/em&gt; is a much easier question than &lt;em&gt;&quot;this isn't working&quot;&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Debugging is much easier if they're already working in small chunks of code!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Isolating:&lt;/strong&gt; Students should be isolating their problems into smaller example programs.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Now that they have the problem narrowed down to as few lines as possible, if they still can't figure it out, then they should be isolating the problem in its own standalone program. This involves starting over with a blank program and only copying over the lines of code that are directly related to the problem.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Stack Overflow calls this a &lt;a href=&quot;https://stackoverflow.com/help/mcve&quot;&gt;Minimal, Complete, and Verifiable example&lt;/a&gt;. Other places call it a &lt;a href=&quot;http://sscce.org/&quot; rel=&quot;noreferrer&quot;&gt;Short, Self Contained, Correct (Compilable), Example&lt;/a&gt;. Sending out these links to students might help, but the idea is that they should be coming to the teacher with an isolated example problem, not their whole project.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This is a much easier process if they're working in smaller chunks and debugging their code!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This also prepares them for real life, where they'll have to formulate questions for their coworkers, and for Stack Overflow or other online forums.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For example, if a student has written their whole project without testing it, and wants to know why something isn't working, then the answer could be that they need to start over and only add a few lines of code at a time, so they can test it in small chunks like they should have from the beginning. Or if a student wants to know why a function isn't working, then the answer might be to ask them which line of code is behaving differently than what they expected. If they don't know, then it's time for the student to break out the debugger to narrow it down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's up to the teacher how strict they want to be about the above rules, but at a bare minimum, teachers should spend some time really explaining the first two points. Coming with a &quot;question&quot; about 100 lines of code that you haven't debugged at all is a non-starter.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-07T21:43:28.793" LastActivityDate="2017-09-07T21:43:28.793" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3567" PostTypeId="2" ParentId="3560" CreationDate="2017-09-08T11:04:38.617" Score="3" Body="&lt;p&gt;The others answers are very good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to add to them some practical advice for the tutors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Raise the standards of what an acceptable questions is.&lt;/strong&gt; Much like over on Stack Overflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a student presents an error along 500 lines of code that might or might not be the cause they should be told to look for the line of code where the error occurred and ask again, if at that point they still don't understand the nature of the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most will find a solution to the problem on their own this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This however would require the students to learn some basic debugging skills. &lt;strong&gt;So instead of helping 3 out of 30 students untangling their code, teach all of them basic debugging skills on examples.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would also require some discipline on the tutor's part, to ignore too broad questions, along with the proper advice to isolate the error. &lt;/p&gt;&#xA;" OwnerUserId="2943" LastEditorUserId="2" LastEditDate="2017-09-08T14:44:31.423" LastActivityDate="2017-09-08T14:44:31.423" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3569" PostTypeId="2" ParentId="3084" CreationDate="2017-09-08T19:05:21.223" Score="5" Body="&lt;p&gt;I think it's detrimental, to both computer science and education in general, to think of &quot;computing&quot; as a separate topic from the more &quot;traditional&quot; subjects of reading, writing, arithmetic, art, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science permeates our lives. It's used in pretty much every subject and every job. And it's not just the surface-level &quot;here's how to use Microsoft Word&quot; stuff, so I urge you to get as far away from that type of lesson as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, think about the intersection of a particular subject and computer science. Some examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;English / Language Arts&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Create &lt;a href=&quot;https://en.wikipedia.org/wiki/Interactive_fiction&quot; rel=&quot;nofollow noreferrer&quot;&gt;interactive fiction&lt;/a&gt; using something like &lt;a href=&quot;https://twinery.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Twine&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create a &lt;a href=&quot;https://en.wikipedia.org/wiki/Tag_cloud&quot; rel=&quot;nofollow noreferrer&quot;&gt;word cloud&lt;/a&gt; from various books, plays, poems, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Perform &lt;a href=&quot;https://en.wikipedia.org/wiki/Sentiment_analysis&quot; rel=&quot;nofollow noreferrer&quot;&gt;sentiment analysis&lt;/a&gt; between different works, or between two characters.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Instead of writing a research paper, have students edit a Wikipedia article.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Social Studies&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Find an interesting data set and use &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_visualization&quot; rel=&quot;nofollow noreferrer&quot;&gt;data visualization&lt;/a&gt; to tell a story about a social issue you believe in.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the &lt;a href=&quot;https://developers.google.com/maps/documentation/javascript/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Maps API&lt;/a&gt; to visualize some geospatial data, or to highlight geographic issues.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Discuss projects like &lt;a href=&quot;https://info.internet.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;internet.org&lt;/a&gt; or &lt;a href=&quot;https://x.company/loon/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Loon&lt;/a&gt;. What impacts would they have on developing countries?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Research how technology has been used to help with natural disasters, refugee crises, and terrorist attacks. What are the privacy concerns of different affected groups?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Art&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Talk about &lt;a href=&quot;https://en.wikipedia.org/wiki/Digital_art&quot; rel=&quot;nofollow noreferrer&quot;&gt;digital artists&lt;/a&gt; and experience their work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Investigate &lt;a href=&quot;https://en.wikipedia.org/wiki/Creative_coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;creative coding&lt;/a&gt;, which is a huge topic that probably deserves its own post.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt; to create your own digital art.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have students implement their own image filter.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check out &lt;a href=&quot;https://www.google.com/culturalinstitute/beta/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Arts &amp;amp; Culture&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Math&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Graph out some interesting functions using &lt;a href=&quot;https://www.r-project.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;R&lt;/a&gt; or &lt;a href=&quot;https://plot.ly/python/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Write a simple program that performs useful calculations for you: how much interest will you pay on your student loans over the next 10 years?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Science&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Discuss &lt;a href=&quot;https://en.wikipedia.org/wiki/Natural_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;natural computing&lt;/a&gt;, where programs are written based on processes found in nature. Examples include &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_life&quot; rel=&quot;nofollow noreferrer&quot;&gt;artificial life&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Cellular_automaton&quot; rel=&quot;nofollow noreferrer&quot;&gt;cellular automata&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_neural_network&quot; rel=&quot;nofollow noreferrer&quot;&gt;neural networks&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Evolutionary_computation&quot; rel=&quot;nofollow noreferrer&quot;&gt;evolutionary computation&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Swarm_intelligence&quot; rel=&quot;nofollow noreferrer&quot;&gt;swarm intelligence&lt;/a&gt;, etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check out &lt;a href=&quot;https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;ant colony optimization&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Boids&quot; rel=&quot;nofollow noreferrer&quot;&gt;flocking simulations&lt;/a&gt;. Give the students a program and let them play with the parameters to see what happens.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Discuss &lt;a href=&quot;https://en.wikipedia.org/wiki/Expert_system&quot; rel=&quot;nofollow noreferrer&quot;&gt;expert systems&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Medical_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;medical algorithms&lt;/a&gt;. Talk about advances in AI diagnostic tools. Have a discussion on the ethics involved.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;None of the above require any advanced knowledge of computer science to at least dip your toes into the water. As a CS educator, you might volunteer to &quot;guest lecture&quot; the class, give them a basic demo, and have them work on some basic projects that introduce the above concepts. Or you could even &quot;teach the teacher&quot; and give them a lesson that they can then deliver to their students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real point is that there is no shortage of intersection between computer science and other fields. It's all over the place! Just take examples from real life, and think about the most bite-sized introduction you can come up with. Show that to the students, and you'll have a bunch of &lt;em&gt;&quot;oh, I didn't realize programming could be so interesting!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-08T23:27:04.230" LastActivityDate="2017-09-08T23:27:04.230" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3570" PostTypeId="2" ParentId="3560" CreationDate="2017-09-09T00:31:17.677" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;The tutors took 20 minutes to figure out the mess and offer help. In a 50 minute class of 30, most students went neglected, while some scored private tuition. Assignments were large and students were forbidden to view each other's code.&#xA;  This was a serious problem. What could teaching staff do to address this?&lt;/em&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You've inherited the mess that no one else wanted to bother with, and you're stuck with students that don't know how to perform basic debugging and self-testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you can either work on teaching them basic debugging skills, or work with the hands you have available. I would say the choice heavily depends on the students you're working with. You might end up with a class full of people who don't know jack about debugging, or vice versa; YMMV.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll anger some of your more advanced students if you spend a day going over just debugging, but if you do it in a way to where your lesson of the day focuses on debugging a kind of obscure issue(s) where error messages prove less helpful, you can show students how to perform basic debugging skills where the error messages aren't the reliable source of truth, forcing you to go line-by-line for in-depth analysis, and likely doing things like cross-referencing documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do this with class participation and maybe even introduce things as low-level as memory-inspection and traversal, and you'll be surprised how many debugging issues your students will start squashing on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their co-workers later in life will thank you in-spirit, even if they don't know you :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;ps&lt;/strong&gt;: If you're in charge of when assignments are due, shoot for either EOD or first thing in the morning, just like work would be. Coding classes that require students to learn a concept and flawlessly code it and turn it in with limited/no help is pretty, um... poorly thought out, especially given the question's original scenario. The only time you're pushing out code that quickly IRL is for emergency hotfixes, which isn't something your school should be expecting as the typical MO for handling assignments.&lt;/p&gt;&#xA;" OwnerUserId="1193" LastActivityDate="2017-09-09T00:31:17.677" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3571" PostTypeId="2" ParentId="2958" CreationDate="2017-09-10T12:23:46.930" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a better way of explaining precedence to avoid this ambiguity&#xA;  than to say &quot;it binds tightly&quot;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The most unambiguous way to think about and explain precedence is by a context-free grammar (also known as a Backus–Naur form). The language of Boolean expression in the form of a context-free grammar follows.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;expr0 ::= expr0 'OR' expr1 | expr1;&#xA;expr1 ::= expr1 'AND' expr2 | expr2;&#xA;expr2 ::= predicate | '(' expr0 ')';&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;expr0&lt;/code&gt; is a Boolean expression; &lt;code&gt;predicate&lt;/code&gt; is an atomic formula, an application of a predicate like “less than”. You see that the arguments of &lt;code&gt;AND&lt;/code&gt; may be an AND-expression, a predicate application, or a bracketed expression, but never an OR-expression. The only way to insert an OR-expression inside an AND-expression is the way &lt;code&gt;expr1&lt;/code&gt; → &lt;code&gt;expr2&lt;/code&gt; → &lt;strong&gt;brackets&lt;/strong&gt; → &lt;code&gt;expr0&lt;/code&gt;. Hence &lt;code&gt;AND&lt;/code&gt; binds more tightly than &lt;code&gt;OR&lt;/code&gt;. This defines precedence. Notice that this grammar also defines associativity; &lt;code&gt;OR&lt;/code&gt; and &lt;code&gt;AND&lt;/code&gt; are left-associative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not possible to convey the whole theory of formal grammars in an answer. Any introductory textbook on automata theory, programming language semantics or implementation should contain this topic.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A common synonym for Precedence is &quot;Order Of Operations&quot;, but in SQL&#xA;  there is not supposed to be an 'order'.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The fact that there is no order of operations in SQL is related to the semantics of SQL, while the question of precedence and associativity is related to syntax.&lt;/p&gt;&#xA;" OwnerUserId="160" LastActivityDate="2017-09-10T12:23:46.930" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3572" PostTypeId="1" AcceptedAnswerId="3579" CreationDate="2017-09-10T13:01:37.697" Score="24" ViewCount="10975" Body="&lt;p&gt;Some recent CS graduates feel unprepared to enter the job market. Some may actually &lt;em&gt;be&lt;/em&gt; unprepared. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;What is missing from a typical undergraduate program, or not sufficiently emphasized, that a person needs to know for successful employment in a software development position? The gaps may be technical or not. What evidence do you have for the gaps you suggest? How can a person fill the gaps? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What advice can you give to a recent graduate about what they should learn on their own and how they might go about learning it? Advice might be for developing hard skills or soft and both may be needed to be employable. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Many entry level positions are not very challenging or rewarding, unfortunately. This may be the fault of the educational process itself, leaving graduates unprepared for better positions. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I assume that no educational program can teach &lt;em&gt;everything&lt;/em&gt;. Therefore some things are emphasized more than others and some necessary things may be omitted, especially in a changing world. I'm not making an indictment of the educational process, but wondering what important things the individual still needs to know, and what skills they need, beyond their formal education. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My personal context is the US, but the same is likely true, but with different details, elsewhere. Your answer may depend on your own context, of course, so you may want to mention it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-11T13:08:52.233" LastActivityDate="2017-09-12T19:16:21.873" Title="What does a person with an undergraduate degree in CS still need to learn to be employable as a developer?" Tags="|undergraduate|self-learning|" AnswerCount="17" CommentCount="12" ClosedDate="2017-09-12T17:10:35.453" ContentLicense="CC BY-SA 3.0" />
  <row Id="3573" PostTypeId="1" AcceptedAnswerId="3600" CreationDate="2017-09-10T14:34:43.310" Score="9" ViewCount="241" Body="&lt;p&gt;We are often asked to plan: We are asked to make lesson plans; When I was a programmer sometimes I was asked to create a plan; We are told to ask our students to plan their projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However there is often a problem with this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a programmer,&#xA;I could not plan everything upfront. There is a lot of discovery in the development process. If we knew what we were doing then it was because we had done it before. If we had done it before, then it was a bug that we were doing it again (we should be reusing).&lt;/li&gt;&#xA;&lt;li&gt;As a student,&#xA;I have been in a class room where a teacher has told students to plan / design a project, and that then after that they would be taught how to program it. This often does not go well, as students can not plan for something that they have no experience of.&#xA;Teachers seem to think that this is the “Correct way to do it”.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another approach is test driven development: Ask what next, Write &lt;strong&gt;simplest&lt;/strong&gt; test that will fail, Write &lt;strong&gt;simplest&lt;/strong&gt; code that will make test pass, re-factor if needed, repeat. This works most of the time. However, there are times when it does not. For example, the other day I was making an adding machine out of lego (my own design). Part of the build was tinkering and experimenting, but for part I stopped and wrote a plan. It was easier to plan on paper than as I went along, as mistakes could be fixed more easily (it is hard to fix an error in the middle of a lego model, you have to take it apart).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I seem to have an intuitive feel for planning (just enough, and just in time). However this is probably not a good explanation to tell others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students are doing project work,&#xA;When is planning and high-level design a good idea? When is it not? How do you tell the difference? And how do you teach this to the students?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I work with pupils years 10-11 (age 14-16), and 12-13 (age 16-18).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-09-12T18:29:35.557" Title="To plan or not to plan that is the question" Tags="|project|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3574" PostTypeId="2" ParentId="3572" CreationDate="2017-09-10T15:06:20.277" Score="35" Body="&lt;h1&gt;To know that you know nothing.&lt;/h1&gt;&#xA;&lt;p&gt;Recent graduates can be afflicted by arrogance or low self worth. These are two sides of the same problem.&lt;/p&gt;&#xA;&lt;p&gt;It is important to know that you are at the beginning of a journey, that has no end. The sum of all knowledge that is known, is but a drop in an ocean, and your personal knowledge is but an atom.&lt;/p&gt;&#xA;&lt;p&gt;However this has not stopped other such as Turing, Lovelace, Hopper, Ritchie, Liskov, Stallman, et al; It has not stopped you in the past; and it will not stop you in the future.&lt;/p&gt;&#xA;&lt;h1&gt;Experience&lt;/h1&gt;&#xA;&lt;p&gt;I have heard many a new journeyman say “To get a job I need experience, but how do I get experience without a job?”.&lt;/p&gt;&#xA;&lt;p&gt;So get experience: Find a good &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;noreferrer&quot;&gt;Free Software&lt;/a&gt; / &lt;a href=&quot;https://opensource.org/osd-annotated&quot; rel=&quot;noreferrer&quot;&gt;Open Source&lt;/a&gt; project, that you are interested in, and contribute to the project.&lt;/p&gt;&#xA;&lt;h1&gt;Software engineering tools&lt;/h1&gt;&#xA;&lt;p&gt;As well as testing (@BenI). Revision control: Learn how to use revision control tools, for example: mercurial (&lt;code&gt;hg&lt;/code&gt;), &lt;code&gt;git&lt;/code&gt;, subversion (&lt;code&gt;svn&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Of these subversion is previous generation, but still has some use-cases that best suit it. It is still widely used.&lt;/p&gt;&#xA;&lt;p&gt;Mercurial and git are more modern, distributed systems. git is the most popular, but is a git to use, and very hard to learn. Mercurial is similar in how it works, but much easier to use (it has a more intuitive command line interface, and a nice graphical interface(tortoise hg)).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-12T19:16:21.873" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3575" PostTypeId="2" ParentId="3573" CreationDate="2017-09-10T15:06:42.010" Score="5" Body="&lt;p&gt;As you suggest, it is a subtle question. Twenty-five years ago, the answer was simple: Plan. But too many software projects crashed and burned because of over-planning and sticking to the plan after it was obvious to all that it was the &lt;em&gt;wrong&lt;/em&gt; plan. More recently, the initial failure of the signup system for the Affordable Care Act was likely caused by this same failure of thinking. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Plan if you can, but be flexible enough to deviate from the plan when needed. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That sounds like good advice, but it can, itself, be the root of too many problems. If you have a complete plan you are likely to be willing to expend resources at the beginning that will only recoup their investment if it proves to be the correct plan but will be wasted (sunk cost) if the plan proves to be incorrect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, with a complete plan you can build the thing at lowest cost &lt;em&gt;if&lt;/em&gt; the plan was correct. But you wind up with a failed project otherwise. Not only have you spent money on the incorrect plan, you have expended time and your competition may have moved ahead with a better solution. You are both late and poor. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When you can't plan, build on a tight feedback loop. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That is the key message of Agile development. All of the practices of, for example, Extreme Programming and Scrum flow from that message. The implication is that you don't expend resources on speculative assumptions about where the project will go. It &lt;em&gt;does&lt;/em&gt; mean that (a) you sometimes can't take advantage of economies of scale and scheduling but (b) you don't get caught with sunk cost that you get no benefit from. In today's development environment (rapid change) this is usually a better assumption to make. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My advice to educators is to learn everything they can about Agile Development, whether you decide to adopt it or not. The ideas are interesting in themselves and can prove transformative if not viewed too narrowly as just a set of practices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, of course, read the &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0201835959&quot; rel=&quot;noreferrer&quot;&gt;Mythical Man Month&lt;/a&gt;. Its message is valid yet, though it was written for the BUFD (Big Up Front Design) era. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that agility goes beyond software development. The principles of agility (see the &lt;a href=&quot;http://agilemanifesto.org&quot; rel=&quot;noreferrer&quot;&gt;Agile Manifesto&lt;/a&gt;) can be reapplied in different ways to vastly different things. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2017-09-10T15:10:48.173" LastActivityDate="2017-09-10T15:10:48.173" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3576" PostTypeId="2" ParentId="3572" CreationDate="2017-09-10T15:18:49.580" Score="14" Body="&lt;p&gt;I once had the opportunity to sit down with a very high level Google engineer (who is also an alum of the institution at which I now teach.)  I gave him an overview of our program, and then, since I knew that hundreds of engineers reported to him, I asked him what he would like to see more of from graduates.  Without even a moment's hesitation, he said, &lt;strong&gt;&lt;em&gt;&quot;Test your code.&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He explained that, even at a lauded place like Google, the majority of people coming in don't deeply understand how important it is to attempt to ensure that their code will always work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my program (which is at a high school), I have translated this statement of his into a lot of explicit practice in creating test cases.  My program is really CS, not SE, but I am aware that many of my students intend to become software engineers, and creating strong test-cases seems like a core skill that needs to be developed within both worlds in any case.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-09-10T15:18:49.580" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3577" PostTypeId="2" ParentId="3572" CreationDate="2017-09-10T18:01:21.330" Score="31" Body="&lt;p&gt;I suspect that the lions share of new CS grads seek jobs in what is actually software engineering, a related but different field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things I see missing when I interview these people:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;An ability to actually Program in the languages on that CV, if you claim C &#xA;then know what volatile means and that i=i++ is broken, if you claim javascript then know the difference between == and === and the type system.&lt;/strong&gt; No point bigging up your knowledge we can always tell.&lt;/li&gt;&#xA;&lt;li&gt;Testing, including the importance of automated regression testing. &lt;/li&gt;&#xA;&lt;li&gt;The fact that requirements change under you.&lt;/li&gt;&#xA;&lt;li&gt;Version control, I don't really care which one, but please have used something on a non toy project.&lt;/li&gt;&#xA;&lt;li&gt;Some appreciation for project management, at least in terms of what input they need.&lt;/li&gt;&#xA;&lt;li&gt;Some task domain knowledge is always nice, yes I know the specification is supposed to be fully detailed and internally consistent, have you ever seen one that really was? &lt;/li&gt;&#xA;&lt;li&gt;Code should be written for humans to read and only incidentally for the compiler (And remember your audience, just because you are a C/C++/Javascript/assembler/matlab god, does not make everyone on the team one).&lt;/li&gt;&#xA;&lt;li&gt;Build tools and an understanding of how they can be scripted. &lt;/li&gt;&#xA;&lt;li&gt;An appreciation of when big O likely matters and when a bogosort is the right choice.    &lt;/li&gt;&#xA;&lt;li&gt;An appreciation that it is &lt;strong&gt;Worst Case&lt;/strong&gt; that really matters, not average case (This one may be specific to my hard realtime industry).&lt;/li&gt;&#xA;&lt;li&gt;A huge amount of a junior engineers time will be spent maintenance programming on existing systems (Some of which are a right mess), some practice at this would be good (O.S. Projects are cool here). &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My favourite interview question is &quot;Yes, but what have you made?&quot;, open source is good here, but it does not have to be software, I will take a tree house as an answer as long as they can talk about the problems encountered and different approaches to solving them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One other note: &lt;strong&gt;Low level is good&lt;/strong&gt;, I can usually teach Javascript and the framework of the day (No point in teaching that in school they seem to have a half life of 12 months or so) to a C or assembly programmer a hell of a lot more easily then I can teach C and assembler for whatever core I am using today to a Javascript developer.&lt;/p&gt;&#xA;" OwnerUserId="2963" LastEditorUserId="2963" LastEditDate="2017-09-10T20:10:15.477" LastActivityDate="2017-09-10T20:10:15.477" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3578" PostTypeId="2" ParentId="3572" CreationDate="2017-09-10T20:35:58.833" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What is missing from a typical undergraduate program, or not sufficiently emphasized, that a person needs to know for successful employment in a software development position?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To answer your question literally, I would say nothing. I don't necessarily think you need to be the best at TDD or GIT or whatever to be successful in an entry-level position. A willingness to learn, some enthusiasm, and a good team fit are (at least in my experience) huge factors in being successful in an entry-level role.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, to better answer the question from an educator's perspective: I think dealing with &lt;em&gt;mess&lt;/em&gt; is under emphasized. A lot, and I mean &lt;strong&gt;a lot&lt;/strong&gt; of software development is horrendously messy. Seriously. I remember with vivid clarity the look of disgust on an intern's face when I told him there are about 60,000 files in the solution he would be working on (so sorry John). To me a good way to get that experience is as others have said: open source. (Bonus cool-guy points if you added a feature you needed to a tool you found lacking.) I think it would be great to see this (dealing with huge messy projects) added to more CS degrees. There is an art to it.&lt;/p&gt;&#xA;" OwnerUserId="2774" LastEditorUserId="2451" LastEditDate="2017-09-10T21:45:03.363" LastActivityDate="2017-09-10T21:45:03.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3579" PostTypeId="2" ParentId="3572" CreationDate="2017-09-10T23:03:39.873" Score="17" Body="&lt;p&gt;Firstly, I think CS degrees vary widely in how &quot;theoretical&quot; they are. Some try to teach you about programming languages and even vendor-specific products that you are likely to encounter in the real world; others focus much more on teaching the fundamental principles. Personally (as someone who has always worked in industry) I would much rather have people who know the principles and the theory, because that knowledge will remain useful for much longer. But whether your background is theoretical or practical, on your first real project there are going to be a dozen technologies or tools you have to master that you have never seen before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, I think CS (and even Software Engineering) courses find it very difficult to teach the things you will only encounter on large projects: how do you grapple with half-a-million lines of code, how do you work on a team with 40 developers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then there are the non-computing aspects of the job. How do you handle a boss who has made an incorrect decision? How do you handle customers who try to make design decisions for you, and do it badly? How do you handle an experienced and respected senior developer on the team whose knowledge has actually become rather rusty? How do you manage conflicting demands on your time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things that I think you can only learn with experience is to acquire a mature attitude to risk. Many of the decisions in programming are concerned with risk. Should we release now, or write more tests? Is it wise to use a new open-source library that has just become available? Should we move forward to the latest version of X? We know the customer's stated requirements, but how likely is it that they will change? How much should we invest in extra resilience or security? In the end, these are the judgements that make a project succeed or fail.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2017-09-10T23:03:39.873" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3580" PostTypeId="1" CreationDate="2017-09-11T06:36:39.580" Score="9" ViewCount="165" Body="&lt;p&gt;I was wondering if there was any research on whether or not students generally perform better later if they're introduced to the syntax they'll be learning far earlier than they actually use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example will students ultimately learn &lt;code&gt;import&lt;/code&gt;/&lt;code&gt;export&lt;/code&gt; better if they're given code that has &lt;code&gt;import&lt;/code&gt; statements in it long before they actually create their own modules; or will introducing the syntax too early be more likely to overwhelm students if they haven't been taught what it does? If the former is it likely to distract or worsen the students from learning the current objectives?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is more specific research than just yes/no I'm definitely interested. For example things that would be useful to know:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are there certain ways to classify students where some group will benefit or detriment from being introduced to syntax early?&lt;/li&gt;&#xA;&lt;li&gt;Do certain age groups handle early introduction of syntax better?&lt;/li&gt;&#xA;&lt;li&gt;Is there some minimal skill set after which early introduction of syntax will begin to add benefits?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2968" LastEditorUserId="204" LastEditDate="2017-09-11T07:30:12.887" LastActivityDate="2017-09-11T11:50:49.833" Title="Is it a good idea to have students see syntax much earlier than they write it themselves?" Tags="|best-practice|syntax|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3581" PostTypeId="2" ParentId="3580" CreationDate="2017-09-11T07:44:20.180" Score="3" Body="&lt;p&gt;I have not seen research, but this is my practice.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I teach &lt;code&gt;print&lt;/code&gt; before, teaching how to implement &lt;code&gt;print&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;I teach use of classes, before implementation of classes.&lt;/li&gt;&#xA;&lt;li&gt;I teach &lt;code&gt;import&lt;/code&gt; (in python), before teaching how to make modules. I just tell them “&lt;code&gt;import turtle&lt;/code&gt; tells python how to be a turtle.”&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I see it like, &lt;em&gt;learning to read, before learning to write&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-09-11T07:44:20.180" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3582" PostTypeId="1" AcceptedAnswerId="3597" CreationDate="2017-09-11T11:45:41.280" Score="5" ViewCount="287" Body="&lt;p&gt;In my experience, university students spend years writing throw away code. They develop assignments, get them auto-marked, then move on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, professional developers are plagued by the long term consequences of their work and those before them. These subtle flaws only emerge over time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How could a semester long programming course put students through a more realistic development cycle?&lt;/p&gt;&#xA;" OwnerDisplayName="user2923" LastEditorDisplayName="user2923" LastEditDate="2017-09-11T12:00:26.160" LastActivityDate="2017-09-12T16:09:37.803" Title="Show students the consequences of their design decisions" Tags="|curriculum-design|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3583" PostTypeId="2" ParentId="3580" CreationDate="2017-09-11T11:50:49.833" Score="4" Body="&lt;h3&gt;Boldly Go...&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First, I'll just say yes, it is a &lt;strong&gt;good&lt;/strong&gt; idea to introduce things (let students see them) before they have to deal with them in detail. There is actually a &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt;, &lt;em&gt;See Before Hear&lt;/em&gt;, that suggests that it is a good idea to let students see things before you even lecture on them. This isn't true about just syntax. The essence of the &lt;em&gt;Spiral&lt;/em&gt; pedagogical pattern is that you teach things repeatedly to different levels of detail over a course and a curriculum. I'm pretty sure you would think it foolish if the first time the students hear the word &quot;compiler&quot; is when they need to build one. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Research&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;But to address the question of &quot;Research&quot; is a different issue. I think the kind of thing you might mean by research would likely be unethical. Educators, like doctors, have a &quot;do no harm&quot; directive. You can't run an experiment in education in which you &lt;em&gt;even suspect&lt;/em&gt; that some technique might be worse than another, but apply the two techniques to two groups. You run the risk of doing harm to one group. You can only apply techniques that you believe to be best practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only kind of experiment that would be valid is to poll teachers on their practice and then either (a) ask them how their students do or (b) somehow measure their students actual performance. The first is just opinion based and the second is very difficult to arrange, partly because it can be disruptive to the educational process. Another reason why such research is usually not repeatable (hence basically invalid) is that there are too many variables in education: between teachers, students, environments, etc. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;An alternative: Patterns&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Patterns, are a kind of &quot;experiment&quot; in that they are a means to capture the practices of experts, vetted through a process (the patterns process) by other experts. The process is quite involved requiring many re-writes to have a pattern accepted. This is true of all patterns of course (design patterns, org patterns, etc.), not just pedagogical patterns. The pattern not only includes the &lt;em&gt;what should be done&lt;/em&gt; but the &lt;em&gt;why this is the right thing to do&lt;/em&gt; (resolution of forces). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another pedagogical pattern that pushes your syntax idea to the max is the &lt;em&gt;Fixer Upper&lt;/em&gt; pattern in which you give students a fairly large program that (a) has good structure overall, but (b) you have broken in some well determined ways. The student task is to repair the program. This can be a first day exercise, in fact. The students first look at any syntax is a complete program that they need to work through. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the reasons that this sort of thing &quot;works&quot; is that (a) much of what you want to teach them they may already know or will pick up instantly, but (b) which particular things that is differs for each person. Letting students see an organic whole lets each of them draw on his/her strengths in understanding it, leaving you only the task of filling in the holes as needed. Each person needs to learn different things from the class; not all the same thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reason that the opposite thing does not work is that everyone learns differently. If you make the assumption that people learn by seeing or hearing something and then immediately &quot;knowing&quot; it you are treating the brain like a disk drive. I doesn't work that way. The brain works by reinforcement. So, if your teaching style is to teach everything only once and completely, then you guarantee that you will reach only a tiny fraction of your students, and many of those don't need the instruction anyway. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-11T11:50:49.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3584" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T12:33:28.800" Score="9" Body="&lt;p&gt;Students need to learn how to teach themselves.  These are the only ones that succeed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming, more than other fields, requires students to &lt;em&gt;take responsibility for their own education&lt;/em&gt; because this is the only way they can survive as professionals.  Students who expect that their courses and labwork will take care of making them employable professionals have essentially zero chance of succeeding.  You can provide guidance, but if they're not already out there engaged in serious self-learning then there's really nothing you can do.  A programmer who can't teach themselves is not much more than a liability on any real-world development team.&lt;/p&gt;&#xA;" OwnerUserId="2976" LastEditorUserId="2976" LastEditDate="2017-09-11T18:16:00.403" LastActivityDate="2017-09-11T18:16:00.403" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3585" PostTypeId="2" ParentId="3582" CreationDate="2017-09-11T12:43:36.153" Score="-2" Body="&lt;p&gt;I think this is pretty hard to do in a single term and I don't think it is possible early in the curriculum. However, a two term sequence, even if not consecutive, might work out. However, I'm not sure exactly what you mean by &quot;design&quot; here. But here are some possibilities. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If you are a believer in separating design from implementation in a traditional way, then a design course followed by an implementation course might work for you. A language principles course, for example, might have elements of design followed by a compiler building course. Other sorts of projects might work as well. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;One design for such a course pairing is to have students do the design of some project in one term and then swap designs for implementation in the subsequent term. These can be team or individual projects, and part of the evaluation done by each team is to discuss the quality of the design they were asked to build. This assumes a stable student population, of course, to be really valuable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt; you need to have a fair grading plan for this to work. Students struggling to build a poor design shouldn't be penalized for decisions made earlier by others. Even when students build their own designs, it should be possible to recover from earlier mistakes. Don't let early errors put students on a path to doom. &lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;If you are willing to drop the word &quot;design&quot; from the question, however, the possibilities expand. &quot;How can we show students the consequences of their early decisions?&quot; This is amenable to any sort of development process, including agile, in which design and development are done by the same people and iteratively. Here the suggestion of user @Keelan can be easily applied. But not likely in a single term. If one course has students building tools of some kind and a later course has the students using those tools themselves, they will learn about earlier bad decisions, either of design or implementation. But, again, make sure the students have a path to success even if they have made early mistakes. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It may be possible to shorten the whole thing to two half-terms, but I doubt that enough could be done to really let the flaws be exposed in such a short time. Bugs, like other things, need a gestation period. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I think that it is a mistake to try to do this early in the curriculum because the students already have enough to do and this might get in the way and leave them discouraged. Esteem building is good to do early. Reality training cam come after a period of &quot;seasoning&quot;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-11T12:43:36.153" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3586" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T13:22:13.923" Score="2" Body="&lt;h1&gt;Source Control&lt;/h1&gt;&#xA;&lt;p&gt;When I received my BS in Computer Science, I had never used source control and was vaguely, if at all, aware that it exists. Source control would have saved me from many struggles throughout my coursework and would have made the entire process much less painful.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-11T13:22:13.923" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3587" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T13:37:30.637" Score="0" Body="&lt;p&gt;In my experience (in the UK), a lot of current degree courses offer a breadth rather than depth of knowledge (a &quot;flavor&quot; of lots of different languages, rather than a decent length of time programming in one language)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This often means that graduates have only spent a few weeks developing in a language (possibly for one coursework for one module). So by the end of their first week or two on the job, they may have done more programming in a language than they ever needed to in order to pass their degree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Developers who have spent any time at all on a home project or on an internship tend to have a real advantage in this area.&lt;/p&gt;&#xA;" OwnerUserId="2980" LastActivityDate="2017-09-11T13:37:30.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3588" PostTypeId="2" ParentId="3582" CreationDate="2017-09-11T13:59:19.817" Score="0" Body="&lt;p&gt;When showing pupils example code, include code which includes some bad habits: Poor names of methods, and variables; Poor indenting; etc.&lt;/p&gt;&#xA;&lt;p&gt;Then have them read the code, and produce a short summary, of what the code does. Do this in an environment where they can not run the code.&lt;/p&gt;&#xA;&lt;p&gt;Also include a few errors that will stop the code from working, get the pupils to find the errors and correct them.&lt;/p&gt;&#xA;&lt;p&gt;Do this with two pieces of code, one well written, one not. Afterwards get the pupils to explain which piece of code was harder to work with, and why.&lt;/p&gt;&#xA;&lt;h1&gt;Connecting this to their own code&lt;/h1&gt;&#xA;&lt;p&gt;This is a little disconnected from your objectives. So later, when grading their work, link it back to this exercise. Remind them how they felt when they had to work with your bad code. Ask them how they think you feel having to read theirs. Ask them how they will feel in a few weeks if they read it.&lt;/p&gt;&#xA;&lt;p&gt;Have them explain their code to you, two weeks after handing it in and moving on.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-11T14:11:05.177" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3589" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T14:01:05.463" Score="4" Body="&lt;p&gt;&lt;strong&gt;Know your tools&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test often using debugging tools. Clarity is key. Your IDE can save you hours of typing and testing over a month, so don't just hide the &quot;tip of the day&quot;, and explore the menus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Know your source control&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source control is your main input channel, it should be as familiar as your keyboard. Contribute to open source projects on github. Even fixing a typo shows you understood the code and can use git: great, one less thing to ask in the interview. Also, code reviews are based on diffs - keep it clean.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Make sure you know the solution you're planning is the right one&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New developers can get over-eager and excitedly write a solution to a  problem that wasn't the focus of the task - ask the ticket maker &amp;amp; other devs if you're on the right lines before starting to code. If you can solve other related issues, this can show initiative - just deal with the real issue first.&lt;/p&gt;&#xA;" OwnerUserId="2982" LastEditorUserId="204" LastEditDate="2017-09-11T14:10:02.343" LastActivityDate="2017-09-11T14:10:02.343" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3590" PostTypeId="1" AcceptedAnswerId="3593" CreationDate="2017-09-11T14:21:57.263" Score="43" ViewCount="11335" Body="&lt;p&gt;In the answers to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3572/what-does-a-person-with-an-undergraduate-degree-in-cs-still-need-to-learn-to-be/3574#3574&quot;&gt;this question&lt;/a&gt;, it's suggested that one of the most common things that CS graduates still need to learn to be employable developers is revision control, and by inference that many CS graduates don't learn how to use it while at university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This surprised me, because on my CS* course we started using revision control (git) on &lt;em&gt;literally&lt;/em&gt; the first day of the course, and a lot of the work we did during our degrees would have been much more difficult without it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking this claim at face value, if knowledge of revision control is both a) useful during the degree and b) desirable afterwards, &lt;strong&gt;why don't more universities teach students to use it?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that this could be seen as primarily opinion based so, if possible, I'd be particularly interested to see actual reasons given by the institutions themselves or people who teach CS (particularly software engineering) courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*I should clarify that my course was in actuality a Computing degree (BEng) and so contained more practical components than others may do.&lt;/p&gt;&#xA;" OwnerUserId="2981" LastEditorUserId="2981" LastEditDate="2017-09-11T22:05:05.017" LastActivityDate="2022-01-17T19:02:42.673" Title="Why don't more universities teach revision control?" Tags="|revision-control|" AnswerCount="14" CommentCount="18" ContentLicense="CC BY-SA 3.0" />
  <row Id="3591" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T14:30:11.603" Score="1" Body="&lt;p&gt;This is my observations, for whatever they’re worth, from having interviewed a lot of recent graduates over many years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing to understand is that you get out of an education what you put in. It is clear to me that it is possibly to graduate without having actually learned everything they were trying to teach you. You have to &lt;em&gt;want&lt;/em&gt; to learn. You have to actively seize the opportunities. For just one example: Be the one person in your group projects that actually does the work and &lt;em&gt;earns&lt;/em&gt; the grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, whatever you want to do in the field, you’re best served by knowledge of &lt;em&gt;both&lt;/em&gt; computer science and software engineering. Most programs are naturally not going to fully cover both. You have to find opportunities beyond your courses to expand your knowledge and experience. If you’re studying CS, find or create open source projects to work on. If you’re studying software engineering, take time to read up on and understand the history and concepts behind the things you are learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that even with theory, experience is invaluable. e.g. Spending some time with a Scheme interpreter playing with the concepts of the lambda calculus will help so much more than simply reading the literature. Build Peano numbers and their operators rather than just reading about them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, when you do interview for a job: I’ll hire someone who clearly wants to learn over one who knows more.&lt;/p&gt;&#xA;" OwnerUserId="2494" LastActivityDate="2017-09-11T14:30:11.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3592" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T15:12:29.803" Score="8" Body="&lt;p&gt;I've interviewed a ton of people fitting your criteria.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What is missing from a typical undergraduate program, or not sufficiently emphasized, that a person needs to know for successful employment in a software development position? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't want to hire programmers. I don't care if you can write beautiful code or ace a list of algorithms questions. You know how many programming jobs in the real world need someone who can do this? Nearly none. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I care if you can be a good &lt;em&gt;engineer&lt;/em&gt;. Can you evaluate tradeoffs, make educated decisions, know when to write &quot;good enough&quot; code, when to reinvent the wheel (or not), how to contribute on a team, how to learn different skills, can you communicate your ideas effectively. Are you afraid to make mistakes, can you ask for help appropriately, do you understand why premature optimization is almost always a waste. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can you dig into a complex system that is probably full of years of cruft, work with teammates who are opinionated and either talented or not. Can you work with teams of people, can you show up to work reliably and do the things you say you can do -- and communicate early if not. Are you able to deal with interpersonal issues (yes, these exist on a regular basis with a bunch of opinionated technical people) or do you just dig a hole and hide?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you take ownership for the code you write, knowing it may be in production for &lt;em&gt;years&lt;/em&gt; or even &lt;em&gt;decades&lt;/em&gt;? Do you understand that real users may be paying your company tens of thousands of dollars for the code you write - do you interact with your job appropriately? How do you do cost analysis, not only for your code but the system resources you will use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could go on and on. But regardless: &lt;strong&gt;these&lt;/strong&gt; types of skills are simply not taught by and large. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;this is assuming basic competency with programming principles, which isn't always the case, but the optimist in me is going to assume that anyone reading this is teaching those abilities well enough that I don't need to say &lt;em&gt;that&lt;/em&gt; too...&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="177" LastEditorUserId="177" LastEditDate="2017-09-11T18:06:51.917" LastActivityDate="2017-09-11T18:06:51.917" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3593" PostTypeId="2" ParentId="3590" CreationDate="2017-09-11T15:49:18.187" Score="30" Body="&lt;p&gt;I suspect it's a combination of several factors:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Version control isn't that challenging to learn (assuming you know how to use the command line). It's something you can trivially understand by following a few tutorials online -- I'd argue the hardest part is actually finding the right tutorial (there are tons of garbage &quot;how to use Git&quot; tutorials out there, and surprisingly few good ones, for example).&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Despite that, it can be hard to find time to fit in the command line and git. You'll probably need to spend at least 30 minutes talking about both things, and if you have a lot of material you need to cover, it can be hard to squeeze that in without compromising on something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, it's worth noting that you can't necessarily just add in new material somewhere and shift everything over. You need to make sure your change maintains the overall tempo of the course, make sure no topic &quot;overlaps&quot; oddly over a  weekend or a holiday, need to make sure students are still being taught the material they need a sufficient amount of time before you make related HW due... If the original course was competently designed, it's probably a well-tuned engine where every minute matters, so adjusting it will require some degree of effort.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If your university didn't find time to squeeze in version control, you'll be told to learn it on at least day 1 of your first internship or job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(And they'll probably do a better job of teaching it! It's hard to teach the value of things/give students the opportunity to practice things like branching, rebasing (if you're using git), using specific workflows, etc. in a university setting -- those sorts of more advanced operations are really only useful in larger teams working on a long-term project.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;You mentioned that your intro course covered git on day 1. I can see an instructor considering against that approach if they want to prioritize moving to programming as soon as possible to try and &quot;hook&quot; the students in with instant gratification. (If you're completing new to programming, I can imagine learning to use tools like version control would be relatively dull and sort of a bother -- you don't really get to see the payoff until you start tackling more complex projects later on.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So basically, it's material that's difficult to fully cover (where the subset you &lt;em&gt;can&lt;/em&gt; cover is easy to learn yet still takes up an awkward amount of time), and that the student is going inevitably run into and learn without any real difficulty anyways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the issues I pointed out are insurmountable, of course, but if you toss in inertia into the mix, you can see why some schools would never get around to rejiggering their curriculum to fit version control in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally think it's worth teaching version control anyways (I'll go even further, actually -- I think schools that don't teach version control in some capacity are doing their students a major disservice), but can't deny that it can sometimes be logistically challenging to work that material in.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-09-14T16:21:36.993" LastActivityDate="2017-09-14T16:21:36.993" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="3594" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T15:50:58.123" Score="1" Body="&lt;p&gt;First off, employers expect entry level employees to be inexperienced. So most will not be looking for you to have a lot of hard skills. Some will want to know that you have the right aspirations and personality traits, since you will learn the skills you need on the job. Most will want to ensure that you have a minimum level of competency with one particular programming language. You should know what programming language you want to spend the rest of your life using, and get good with it. That will help you not just to land a job, but to land the right job for you. Other important things that may be neglected by your school are good Testing practices (including test driven development), and engineering principles. Experience writing code is one of the most valuable things that you can get, because it will be expected that as a new grad you will have virtually none. Make sure to take courses with lots of coding, not just theoretically knowledge. Those courses are fine too, but they shouldnt be the ONLY ones. Project based classes, open source or personal projects and internships are all critical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if you ignore all of that advice, at least try and get really really really good with SQL, because EVERY job you will look at is going to need it.&lt;/p&gt;&#xA;" OwnerUserId="2987" LastActivityDate="2017-09-11T15:50:58.123" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3595" PostTypeId="2" ParentId="3590" CreationDate="2017-09-11T16:14:52.120" Score="6" Body="&lt;p&gt;The main thing you need version control for is for &lt;strong&gt;group coding projects&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was taking CS back in the misty past (mid 80's), the only class that had a group coding project was my Software Engineering course. I remember complaining to a TA about updates from teammates wiping out my changes, and him mentioning to me off-handedly that our OS (VMS) actually had a program to help deal with that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps these days that info would be given up-front (I sure hope), but I think they can be forgiven for not teaching me about it before then, simply because without having the experience of working in a team, there'd be no need for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typical practice back then, and I gather today as well, was to train CS students to &lt;em&gt;work alone&lt;/em&gt;. Students coding all by themselves and not going to peers for help is treated as virtuous behavior, while actually coding in concert with another human being is treated as cheating so vile, it merits expulsion. So I think its somewhat understandable that they wouldn't train students to use tools that encourage that evil behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ironically, when I did job interviews my Senior year, I had a least two interviewers who were only interested in my grades in the Software Engineering course, and only interested in talking about how that one course went for me. Seems like a bit of a disconnect there...&lt;/p&gt;&#xA;" OwnerUserId="1139" LastEditorUserId="1139" LastEditDate="2017-09-11T16:21:11.980" LastActivityDate="2017-09-11T16:21:11.980" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3596" PostTypeId="2" ParentId="3582" CreationDate="2017-09-11T16:18:44.937" Score="3" Body="&lt;p&gt;One sort of meta approach is to not try doing this within the context of a university course at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, try and build up a culture where students are heavily encouraged (or even required!) to do internships and such (or at least join a research lab), perhaps over their summer. You can do this by having a strong career fair, by explicitly working in lessons or running workshops to prepare students for tech interviews, and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, I feel one of the best ways to learn about the importance of software engineering and design is to actually work on a long-running project where you need to deal with the consequences of design decisions other people made. It's hard to engineer that kind of scenario in a classroom setting, so might as well off-source it (and simultaneously help students develop their resume as a bonus).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The disadvantages are that your students won't necessarily learn these lessons consistently, not all of your students will be prepared enough to pass a tech interview and get an internship (though I suppose it's good that they're learning this now rather then later), and that doing this will require a strong departmental push over a period of several years which will likely be harder to do compared to revamping a single course.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-09-11T18:04:44.937" LastActivityDate="2017-09-11T18:04:44.937" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3597" PostTypeId="2" ParentId="3582" CreationDate="2017-09-11T17:31:45.280" Score="7" Body="&lt;p&gt;I'm not so sure what you're talking about is a great idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students &lt;strong&gt;should&lt;/strong&gt; be writing a lot of throwaway code, especially at the beginning of their education. They should be learning, writing code to test what they learned, and then moving on to the next thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of being a student is writing code that, 6 months from now, will look like garabge to them. &lt;em&gt;&quot;Why would I have done it this way?&quot;&lt;/em&gt; This is a completely normal thing that everybody feels, and it's a sign that they're learning and improving as developers. But it also means that students shouldn't spend a lot of time polishing their code. Instead, move on to the next thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rest of it comes with experience. Don't worry about &quot;design&quot; so much, and just focus on writing code that works. Forcing students to work with code they wrote weeks or months ago is just punishing them for learning and improving.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-11T17:42:59.790" LastActivityDate="2017-09-11T17:42:59.790" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3598" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T17:57:33.847" Score="4" Body="&lt;p&gt;New graduates don't need to be an expert in anything, but they need to be able to &lt;strong&gt;get stuff done&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By that I mean, if you have Java listed on your resume, I should be able to hand you a laptop with a clean OS on it, and you should be able to write and run a basic hello world program. You should know how to download, install, and run Java, and you should know how to write, compile, and run a basic program. You should know how to look new stuff up in the documentation, Google, and Stack Overflow. That's how programmers get stuff done in the real world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best way to prove that you have this knowledge is by putting together something like an online portfolio. What were some interesting projects you did in school? Can I see them? What personal projects do you work on? Do you contribute to any open source projects? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; Give me a link to a list of cool things you've done, and be able to setup your own workspace.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-09-11T17:57:33.847" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3599" PostTypeId="2" ParentId="3590" CreationDate="2017-09-11T18:05:03.110" Score="12" Body="&lt;p&gt;I'll stick my head above the parapet, and offer that the people teaching these courses won't have been taught about version control as part of their degree courses. I certainly remember that the hassle of learning about how it worked (and some doubt/uncertainty) meant it wasn't something I adopted until I was forced to by work requirements. At the time it felt hard. Now, if I want someone to see some code, I give them a 'git clone' command line...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There seems no real justification to avoid introducing version control in its simples form fairly early on. You can argue that it isn't needed, which may be true, so there is no need to go overboard on the detail. What is most important is to instill the understanding that version control makes life easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It feels that GIT works more easily than RCS,  although that might just be an effect of the concepts being more familiar to me now.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-09-11T18:05:03.110" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3600" PostTypeId="2" ParentId="3573" CreationDate="2017-09-11T18:27:18.920" Score="3" Body="&lt;p&gt;Programming involves a mix of long-term and short-term planning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Long-term planning&lt;/strong&gt; involves questions like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is my end goal?&lt;/li&gt;&#xA;&lt;li&gt;Who is my audience?&lt;/li&gt;&#xA;&lt;li&gt;What does a &lt;a href=&quot;https://en.wikipedia.org/wiki/Minimum_viable_product&quot; rel=&quot;nofollow noreferrer&quot;&gt;minimum viable product&lt;/a&gt; look like?&lt;/li&gt;&#xA;&lt;li&gt;When are my deadlines?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Students are often faced with a feeling of &quot;I don't even know what this is asking me to do&quot; when given an assignment. That's where long-term planning comes into play. Maybe have them rewrite the assignment in their own words, or ask a series of questions that help them understand what's expected. Stuff like: What's the input? What's the output? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Short-term planning&lt;/strong&gt; involves questions like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I break my end goal up into smaller steps?&lt;/li&gt;&#xA;&lt;li&gt;What is the smallest thing I know I need to do next?&lt;/li&gt;&#xA;&lt;li&gt;What code do I need to write to accomplish my current step?&lt;/li&gt;&#xA;&lt;li&gt;Have I considered corner cases for this step?&lt;/li&gt;&#xA;&lt;li&gt;How can I test that this step works?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This is where a lot of programming lives, in the process of breaking things down into smaller steps and then taking action on those steps. The steps need to be smaller than the student thinks is interesting, that way they can actually write code that accomplishes that particular step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a bit of an &lt;strong&gt;art&lt;/strong&gt; to both kinds of planning, and they're both required by anybody who writes code. They're also very hard to teach, other than having students work through the process themeselves over and over again. I like to say that anytime a student has been given a homework assignment where they didn't know what to start, the real lesson was not regurgitating syntax: it was teaching the process of breaking a problem down into smaller pieces and then taking those pieces on one at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I've written a tutorial on this stuff available &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-11T18:41:28.633" LastActivityDate="2017-09-11T18:41:28.633" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3601" PostTypeId="2" ParentId="3590" CreationDate="2017-09-11T18:35:58.270" Score="15" Body="&lt;h1&gt;Teaching revision control as part of CS course.&lt;/h1&gt;&#xA;&lt;h2&gt;Against&lt;/h2&gt;&#xA;&lt;p&gt;Revision control is not a computer science thing, it has nothing to do with computer science. Though it is a software engineering tool.&lt;/p&gt;&#xA;&lt;h2&gt;For&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Everybody&lt;/strong&gt; should learn revision control, if they use a computer. Even from non-technical subjects. Even though it is a software engineering tool, it can, and should, be used by everyone, in every subject.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;When dealing with MS-Word documents and other non-diffable objects, a revision control system that uses / or allows locking should be used. This precludes distributed revision control. For this use case Subversion (svn), is preferable to git or mercurial (hg).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-13T07:36:33.680" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3602" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T18:40:30.843" Score="1" Body="&lt;p&gt;A fundamental part of understanding software architecture is to understand how your target platform will shape design decisions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regardless of the type of work you do, the code is going to be constrained by the hardware it runs on.  Processor speed isn't necessarily that bottleneck.  Often it is memory availability, disk transfer rates or even network transfer speeds.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For each of these constraints there are architectural designs to help alleviate them, but all designs have drawbacks.  Understanding those along with your target platform will usually point the developer to the right solution.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By way of example, I've lost count of the number of times I've seen a new developer put out code that runs a 'select *' on a large table ... multiple times, then wonder why the computer grounds to a halt when that page loads.  Only to come to the &quot;conclusion&quot; that locally caching all that data is the right answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TBH, I think they should spend their entire senior year working on a mid sized project.  Something run how one would be in the real world.  Replete with hardware, software and time constraints - as well as changing priorities and requirements.  All of them would benefit from having experienced that before showing up at a new job.&lt;/p&gt;&#xA;" OwnerUserId="2946" LastActivityDate="2017-09-11T18:40:30.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3603" PostTypeId="5" CreationDate="2017-09-11T18:47:29.647" Score="0" Body="&lt;p&gt;Revision control is also sometimes known as &lt;em&gt;Source Control&lt;/em&gt; or &lt;em&gt;Version Control&lt;/em&gt;. Some make fine distinctions between the terms, but use this tag for all such questions. Such systems maintain a version history and the ability to roll back to earlier versions or to create experimental &quot;branches&quot; for a set of documents. Some systems are used for other than software source code. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-09-11T21:10:20.787" LastActivityDate="2017-09-11T21:10:20.787" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3604" PostTypeId="4" CreationDate="2017-09-11T18:47:29.647" Score="0" Body="This tag is for questions related to the teaching of revision control. Revision control is a system for managing a set of files over time, recording who made which changes and in some cases allowing multiple people to work on the same set of files at the same time. Some examples of version control are Git, Subversion, and CVS. " OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2017-09-11T19:05:41.237" LastActivityDate="2017-09-11T19:05:41.237" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3605" PostTypeId="2" ParentId="3572" CreationDate="2017-09-11T19:42:33.257" Score="1" Body="&lt;p&gt;If your &quot;CS&quot; is the same as what &quot;Dipl.-Informatiker (Univ.)&quot; is in Germany, then, frankly, I expect nothing from a fresh graduate that is really related to the job, since I work in a real world IT company that consults other companies (the &quot;real world&quot; type consulting, i.e., try to understand and solve their problems, not the golf-related consulting) and first and foremost creates software on every level. I understand and experience day to day that the universities, at least in my country, do &lt;em&gt;not&lt;/em&gt; see teaching that as their task (rightly so, it is called &lt;em&gt;science&lt;/em&gt; for a reason).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, don't get me wrong. I have studied those things myself (albeit before they changed the university system in my country - these days we have Master and Bachelor as well, and the university education is much more school-like than it was before). I, also, although I was very happy with my studies, learned almost nothing that I ever actually directly used in decades of work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I brought to the table back then, and what is a huge bonus for current applicants, is private, real-world related effort. Be it programming in the context of an open source project, your own software, digging deeper into programming languages than the curriculum would need of you, having a Linux box or three in the cellar, playing around with your own VPN, programing Arduinos or Raspberry Pis, configuring a small enterprise-level NAS involving XFS or whatever. And yes, be prepared to &lt;strike&gt;answer in-depth questions&lt;/strike&gt; have a fascinating discussion about each of those topics if you bring it up, because although your interviewer may look like Dilbert-like &quot;pointy haired boss&quot;, he just might be doing all these activities at home right now...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I also delight in just chatting about CS, so I might throw in a question about functional languages, lambda calculus, temporal logic or what have you, just to test the modern curriculum. ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to see a real self-motivated interest in the topic. If I find that, I know that you will pick up whatever you need on the job. A successful CS degree helps, of course, but I might rather pick a mathematician with all those attributes than a CS student who gave me the impression that he did study and finish CS but has zero interest in the topic.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2017-09-11T19:42:33.257" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3606" PostTypeId="2" ParentId="3573" CreationDate="2017-09-11T20:55:13.260" Score="0" Body="&lt;p&gt;I believe you can't form a workable plan without experience.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can guess about what to do, but, imho, that's a complete waste of time.  My approach here would be to help these kids get experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To do that, consider how apprenticeships work.  The apprentice shows up with nothing other than the desire to learn.  The teacher shows them each step.  Here's how to declare a variable, here's how to add numbers, here's how to get input from the user, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After they've learned the basics you take them through building an app.  It should be something simple like a calculator.  You lead them through the design, asking leading questions along the way.  Point out what choices you have to make in the design.  Then, have them code it to the design specs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that they've been through it, assign a project and let them lead.  Again, keep it simple.  If they hit any roadblocks, ask leading questions to see if they can identify the problem and work through it.  If they can't figure it out, point them on the right path and explain the reasons.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rinse and repeat for bigger stuff.&lt;/p&gt;&#xA;" OwnerUserId="2946" LastActivityDate="2017-09-11T20:55:13.260" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3607" PostTypeId="2" ParentId="3590" CreationDate="2017-09-12T02:44:25.510" Score="0" Body="&lt;p&gt;I'd suggest that it's a flaw in contemporary version control systems that they (might) require university level training to use effectively, as opposed to implement or architect at a higher level (branching models, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My degree did cover version control, but from a position of understanding design challenges and solutions in creating such a system (which provided a knowledge in how to use the chosen system as a by-product). &lt;/p&gt;&#xA;" OwnerUserId="3004" LastActivityDate="2017-09-12T02:44:25.510" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3609" PostTypeId="2" ParentId="3590" CreationDate="2017-09-12T06:59:34.387" Score="1" Body="&lt;p&gt;Along with the several reasons mentioned above (especially the part about educators themselves not having used version control in their learning days, and the part where it was written that version control is more of a work place concept), one more reason why we (as in universities here in India) cannot teach is because we simply don't have git server access. Its a cost that some colleges are simply unable to bear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative to that would be using an online service such as GitHub or Bitbucket (my preferred choice) which are free. However, that also does not work because internet access is either non-existent or not provided (because kids will spent time on the internet). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps the final reason why we don't use it here is because, for many students computer access and internet access at home itself is a challenge. Even if the college does provide version control access, the students cannot access it when they want to anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to these 'infrastructure issues' code is usually carried by the student via printouts, USB pen drives or simply stored as files on their mobile phones. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-12T06:59:34.387" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3610" PostTypeId="1" AcceptedAnswerId="3624" CreationDate="2017-09-12T12:29:28.390" Score="6" ViewCount="179" Body="&lt;p&gt;In the context of an undergraduate course on microprocessors and architecture, I'm looking at how to introduce a VGA display peripheral. This is with the specific goal that they implement the peripheral in verilog on an FPGA (they're given a microprocessor and the rest of the system).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's VGA because of the current hardware used for the supporting labs - and I kind of like the example peripheral because it has a useful set of physical layer constraints. An LCD interface might seem like a more relevant, but then we're looking at a SPI peripheral or similar, and that defeats the object of the module.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The VGA physical layer is clearly an evolution of analogue TV and CRT technology, so it's quite tempting to start the description of how pixels need to map onto the screen by talking about the CRT and how an electron beam scans across the phosphor, line by line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question: how relevant is this analogy going to be to current school leavers, and will it work as a starting point for describing horizontal and vertical sync? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've thought of trying to update the module by describing how an LCD panel would de-serialise the VGA signal, or switch to another output interface altogether, but it seems that the example I have at the moment might be worth keeping alive for a few years longer.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-09-12T15:13:30.033" LastActivityDate="2017-09-16T14:47:03.947" Title="Is the CRT still relevant when introducing display hardware" Tags="|teaching-analogy|hardware|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3611" PostTypeId="2" ParentId="3572" CreationDate="2017-09-12T14:58:24.733" Score="1" Body="&lt;p&gt;Soooo many things can be said here and I could literally type an entire several hundred page book about my experiences coming out of college as an undergrad and what I've learned since then but I will try and keep it concise ;-)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;You learned how to learn, no program&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The biggest point I can make here is that when I was in college I learned Java with Swing.  Of course this was right at the cusp of everyone starting to want web sites because &quot;the cloud&quot; was an up and coming thing, so my Swing experience was completely irrelevant.  What wasn't was my ability to figure out my problem, get online, search for solutions, and morph them into something I could use in my program.  The information any developer needs is pretty much free and available through the internet, just gotta know what you are searching form.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Debug, debug, and oh yeah...debug&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;When I was in college, I didn't know it at the time but I was doing myself a huge service by being someone people could come to when they had questions about the assignment.  When a function wasn't working, or a unit test was failing, people would show me their code and we would walk through it.  Sometimes the code was very cleanly written and other times it was worse than spaghetti.  This equates to real world scenarios in a way recent grads needs to understand.  Lots of companies will have one or more legacy projects where you'll need to debug someone else's old (and probably outdated) code.  It's not feasible to simply say &quot;scrap it and rewrite the whole thing&quot; because it might be too costly.  Be the go to person to help your friends in college when they need it.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Work a little every night&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;I know this is silly to have to point this out but you should work on your projects for classes (or personal projects if you have them) every evening.  Why?? Well, for one, it prevents pulling all nighters to meet deadlines, and two, because it gets you used to working in the real world.  I can't just go in every day for a week saying I've done nothing and then work all weekend to meet a deadline.  Building up your ability to stare at code for hours on end is a valuable tool that will keep you productive at work and not going for energy drinks every fifteen minutes.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Work on personal projects&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Have an idea for a website that does some functionality?  Who cares if it already exists.  Get your favorite tech stack and make that application.  A company looks very highly on developers who do self improvement outside of work.  Of course time doesn't always permit but if a recent grad goes to apply for a company and can link their Github where he/she has created a few applications that can showcase their coding standards and other items, it goes a long way.  Like a graphics artist having a portfolio, a developer should have a portfolio too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I ended up not being as concise as I wanted to be but I think these are some of the main points I've taken away since I've started working post college :-)&lt;/p&gt;&#xA;" OwnerUserId="3017" LastActivityDate="2017-09-12T14:58:24.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3612" PostTypeId="2" ParentId="3572" CreationDate="2017-09-12T15:54:29.283" Score="2" Body="&lt;p&gt;Hate to add yet another answer, but this &lt;em&gt;needs&lt;/em&gt; to be said: there are three things that matter: how to communicate with people, how to communicate with people, and&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;How to communicate with people.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Frameworks change. Testing practices change. Version control systems change. Languages change. Algorithms change (simpler but slower as the hardware gets faster). Hardware changes. At some point hopefully in my lifetime &lt;em&gt;hardware architecture&lt;/em&gt; will change (away from Von Neumann to cellular automata et. al.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even a person can change. But &lt;em&gt;people&lt;/em&gt; don't change. &lt;em&gt;Peopleware&lt;/em&gt;, &lt;em&gt;Mythical Man Month&lt;/em&gt;, etc. are every bit as relevant today as they were decades ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &lt;em&gt;will&lt;/em&gt; have to deal with bosses and coworkers. You &lt;em&gt;may&lt;/em&gt; also have to deal with vendors, clients, customers, direct reports, and employees.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will have to go on job interviews, pitch ideas, give presentations, write documentation, send email, and even write policy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software is a second career for me, I was already an adult when I went into the field. Before doing so I interviewed a bunch of people through my network who were in industry and I asked them what they wish they'd known going in. To a man/woman they said some variant of &quot;people skills&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are sending your graduates out into the workforce without a solid grounding in this area then all the technical prowess in the world won't help them. They will be rated &quot;hire, but not for my team&quot; in interviews.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastActivityDate="2017-09-12T15:54:29.283" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3613" PostTypeId="1" AcceptedAnswerId="3621" CreationDate="2017-09-12T15:59:34.583" Score="7" ViewCount="381" Body="&lt;p&gt;I've been asked to do a one-lecture (50 minute) presentation on Version Control. In the class we'll be using Git; there will be a hands-on opportunity to work with Git later in lab. (The Git GUI of choice of the professor is &lt;a href=&quot;https://www.gitkraken.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitKraken&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't need to teach anyone to be Git Wizards. I'm not a git wizard myself. But I need to show the class what version control can do, and the basics of using Git to collaborate between multiple people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@si618 provided a wonderful &lt;a href=&quot;https://stackoverflow.com/a/1408464&quot;&gt;&quot;Why use VCS&quot;&lt;/a&gt; over on StackOverflow, which I am going to borrow (with credit, obviously, the CC license requires it). That covers the motivation portion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I need to cover the actual model of sharing code via VCS. That's the hard part. &lt;a href=&quot;http://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;LearnGitBranching&lt;/a&gt; is a wonderful resource I'll likely use to show commits and branches, but the main use of that site seems like (to me) experimenting with more complicated rebase-based operations. And a quick here's-what-vcs-is doesn't (shouldn't) need to rewrite history.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explaining the model is the hard part; showing the application of the model is simple since I'll likely use the GUI. The command line interface isn't of import. But what really needs to be understood to understand a DVCS model?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;commit&lt;/code&gt; -- add snapshot to your local history&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;push&lt;/code&gt; -- publish your local history to some location&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pull&lt;/code&gt; -- download history from some source&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;branch&lt;/code&gt; -- split the line of history into two &quot;timelines&quot; for concurrent work&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;merge&lt;/code&gt; -- collapse bring two parallel histories into one&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there anything else that really should be covered? These five seem like the key components. Is it worth mentioning that every local &lt;code&gt;master&lt;/code&gt; downloaded from the repository is a new copy, and is effectively a branch &lt;code&gt;origin/master -&amp;gt; local/master&lt;/code&gt;? Is it worth mentioning that a headless git repository is no different than a local one, and that you can pull directly from a non-origin repo? Merge conflicts happen; should I mention how to go about resolving those?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Distilling an (admittedly shorter than my seniors') career of working with Git into a short &quot;Here's why Git is awesome and you should use it&quot; is difficult. I want to teach Git (and more generally, VCS) and not just &quot;how to use GitHub&quot;. Thinking Git === GitHub is one of my pet peeves.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Context:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structure of the course itself is rather open-ended: the second half of the course is opportunities for students to share something they've spent some time learning on their own (that's where I fit in). Since I potentially have the greatest cross-section of teaching ability and domain knowledge among the students, I was asked by the professor to do a section on Git before the lab where people get to try it out themselves. During that time as well, students will be working in groups to complete a large assignment, so I definitely want them to use some sort of VCS; it'll save everyone a bit of trouble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course is an upper level university CS elective.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On &lt;a href=&quot;https://cseducators.stackexchange.com/q/2897/2025&quot;&gt;How to make git easy to learn&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the two questions are meaningfully different. The other question addresses a (self) learning approach while this question seeks a teaching approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More importantly, answers on either question aren't generally applicable to the other. &lt;em&gt;Trivial&lt;/em&gt; answers may be able to answer both, but any real meat on an answer makes it only really applicable to one question.&lt;/p&gt;&#xA;" OwnerUserId="2025" LastEditorUserId="2025" LastEditDate="2017-09-13T14:30:14.320" LastActivityDate="2017-09-13T14:30:14.320" Title="One lecture on VCS: What needs to be covered?" Tags="|revision-control|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3614" PostTypeId="2" ParentId="3582" CreationDate="2017-09-12T16:09:37.803" Score="2" Body="&lt;p&gt;Being a recent grad who had a class where this happened, let me share my experience and answer your question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The Worst Class of My Life&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a class in which one quarter was devoted to a long-term programming assignment building on itself. We were given a partially implemented &quot;Programming Language&quot; based on python, but written in C++. We would have weekly tasks to add functionality to the language in the C++ code, so that we could build the &quot;language&quot; compiler and run test input through it. In theory it was exactly the kind of project I wanted, each component built on the one before it, but where it failed was the professor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In practice, what happened was that the assignment wasn't very clear for the first week, there was no online resource, because we were implementing a made-up language, and the professor was at a loss to understand why we were all confused. When week 2 rolled around we all tried to build on code that already didn't work. So we had to try and fix part 1 then move to part 2. Over half the class bombed the first two parts, so the professor eventually had to give us the expected implementations of part 1 &amp;amp; 2 so that we could even do part 3 of the assignment. Utter disaster. Sure, I learned that building on top of bad code is bad, but at the cost of my grade and my sanity. I didn't like that teacher much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, that isn't to deter you from trying such a project. I think if good practices were followed, some sort of project like this would be cool, and very applicable to the real world, both at work and in the job hunt. My advice would be to monitor closely what the project is. Make sure it is a project your students are comfortable, rather than throwing a big project as a wrapper on already difficult course work. Make sure you have a good back-up plan in place if they fail early. Will you give them code? My advice would be to make the project independent of specific topics they need to learn and grade based on time spent working on the code and trying to make something usable. Try and have them use a versioning tool, so that you can see their commit record (My professors had us use github for our final projects in a few classes and for my capstone), that way, even if their program doesn't work, you can see the code and the thought process that went into working on it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the project will depend greatly on the teacher assigning it. If there is good support and well thought out work, then it should be successful.&lt;/p&gt;&#xA;" OwnerUserId="1028" LastActivityDate="2017-09-12T16:09:37.803" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3615" PostTypeId="2" ParentId="3590" CreationDate="2017-09-12T16:54:36.757" Score="0" Body="&lt;p&gt;One point not mentioned in other answers is that it up until quite recently (more or less as git has arrived, which is by and large recently) it has not been easy to give students access to version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Subversion requires you set up a local server on your computer, SourceSafe requires a license.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you will have to support students that have messed up their installations. This alone will take an awful lot of time from other things students have to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use version control in teaching you'll have to have a lab, where the students can go and get their problems and computers fixed. That is a cost most institutions rather not incur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there is the problem of teaching material. I doubt there is much available litterature for students. Most material on the net is for people who already are developers and know what version control is and it is simply to high a level for students.&lt;/p&gt;&#xA;" OwnerUserId="3025" LastActivityDate="2017-09-12T16:54:36.757" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3616" PostTypeId="2" ParentId="3613" CreationDate="2017-09-12T17:18:29.337" Score="5" Body="&lt;p&gt;I think the material you cover will vary depending on how much of Git you're trying to cover.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're just trying to cover basic use of git, I think teaching &lt;code&gt;clone&lt;/code&gt;, &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;push&lt;/code&gt;, &lt;code&gt;pull&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, and &lt;code&gt;diff&lt;/code&gt; should be sufficient (if you're using the command line). Since you're using a GUI, I suppose you can prune some of these commands down (though I do think showing how to use Git from the command line is useful).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't even cover branching: it's not useful for basic usage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When doing this, be sure to remember that you do need to do a little initial setup before you can use git: you need to set your default name and email, set up an ssh key (which, note, you can do on both Windows and Linux -- no need for something like putty). I'm not sure how you're asked to do this setup when using the GUI, but it's certainly something you need to do when first using Git on the command line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also should absolutely cover how to resolve merge conflicts here, and techniques for minimizing merge conflicts (e.g. commit before pulling). If you can, try and have students do an exercise where they deliberately cause merge conflicts and need to resolve them. Merge conflicts are inevitable, so you should prepare your students to deal with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try and demystify merge conflicts as much as possible: for example, I like straight-up showing students what a conflicted file looks like in their text editor to emphasize you don't need any special tools to resolve one, just their editor.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you're instead interested in giving students a solid foundation in Git, and preparing them for how Git is often used in industry, I think you should &lt;em&gt;heavily&lt;/em&gt; emphasize the underlying model behind git (the DAG).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The hope is by doing this, you can train your students to NOT try and memorize every single Git command. (Trying to do that is an exercise in futility: there are many Git commands, and many of them are overloaded and poorly named). Instead, try and train your students to think in terms of DAG manipulations: if you can manipulate a DAG in a particular way, you can certainly make Git do the same (though you might need to google a little to find the exact command).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're going to do this, you should also probably cover rebasing. You can maybe introduce this as a sort of exercise (e.g. something like &quot;we said Git was a DAG, so does that mean it's possible to arbitrarily rearrange nodes? Yes! Meet &lt;code&gt;rebase -i&lt;/code&gt;...&quot;). It also turns out many people in industry prefer rebasing over merging since it lets them maintain a cleaner git history, so it's useful to know how to do both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other advantage of focusing on the DAG (besides setting up a solid foundation) is that it lets you connect Git back to what your students already know: data structures and algorithms. That gives them a nice &quot;hook&quot; to hang their new knowledge on.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it worth mentioning that every local master downloaded from the repository is a new copy, and is effectively a branch origin/master -&gt; local/master? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would. Git is a &lt;em&gt;distributed&lt;/em&gt; VCS, after all, so I do think it's worth noting that &lt;code&gt;origin/master&lt;/code&gt; and &lt;code&gt;master&lt;/code&gt; can fall out of sync (which helps motivates why we need &lt;code&gt;push&lt;/code&gt;). If you take the &quot;let's focus on the DAG&quot; approach, doing this also helps reduce the number of new concepts you need to introduce: &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;origin/master&lt;/code&gt; are just two distinct labels you can attach to a node, just like any other branch or tag.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it worth mentioning that a headless git repository is no different than a local one, and that you can pull directly from a non-origin repo? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;These ones you can probably skip -- these sorts of situations don't really come up (unless you're doing something like push-to-deploy).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Merge conflicts happen; should I mention how to go about resolving those?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Absolutely. Merge conflicts are common in school settings, where students frequently need to work on the same, small, subset of files.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-09-12T17:47:37.270" LastActivityDate="2017-09-12T17:47:37.270" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3617" PostTypeId="2" ParentId="3573" CreationDate="2017-09-12T18:29:35.557" Score="2" Body="&lt;p&gt;I will take a tip from one of the more experienced project managers that I work with. Some people like to plan everything in great detail, and will miss some of the things that practical experience will give them. These people need to be encouraged to take a break from planning much earlier than they feel happy with, and at a minimum start prototyping the bits they think they're happy with, or the bits they're worried about getting right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other people, who jump straight in - give them time to start to make a mess, then help them to break what they have started with down into a plan. If they started perfectly, get them to rough out a plan of the bits they haven't thought about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Effectively, there are two decisions to make. Push/pull and which end to start from - both reacting to an individual's behaviour and comfort with the task. Assuming these 4 models are all valid to some extent, it is hard to drive the plan/implement cycle in a single way with a large group. You can however teach the process then guide people to find a way of delivering using it.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-09-12T18:29:35.557" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3618" PostTypeId="5" CreationDate="2017-09-12T18:50:44.270" Score="0" Body="&lt;p&gt;Hardware covers a wide range of the subjects that interact with Computer Science, but the majority of computer science education is focused on the software aspects, and how software interacts with the underlying hardware. Questions about real, tangible hardware problems might be better asked on electronics.stackexchange.com or superuser.com &lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-09-12T19:44:53.703" LastActivityDate="2017-09-12T19:44:53.703" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3619" PostTypeId="4" CreationDate="2017-09-12T18:50:44.270" Score="0" Body="For questions about teaching physical computing, hands-on logic design (simulation or FPGA) and peripherals. If your question is about making a demo, or fixing some hardware, this might not be the most appropriate place to ask the question." OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-09-12T19:45:00.067" LastActivityDate="2017-09-12T19:45:00.067" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3620" PostTypeId="2" ParentId="3590" CreationDate="2017-09-12T19:24:32.650" Score="2" Body="&lt;p&gt;Version control is most effective in an environment where at least one user understands it quite well.  As long as you have one individual on the team that understands how to recover from a messy situation, everyone else can comfortably learn as they go.  However, if one does not have such a knowledgeable individual, there may be no clear way to recover from the sorts of situations that VCS is supposed to help you with.  For example, if I'm not on your team, and you come across a &quot;Tree conflict&quot; in Subversion, it's unlikely that anyone has bookmarked the StackExchange answer that lists each tree conflict and the series of commands which resolve it.  Instead, &quot;Tree conflict&quot; quickly becomes &quot;wipe out your repository and do it again.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a commercial setting, there are typically senior developers or team leads who are actively monitoring the state of the repositories and can guide you down your path.  In an academic setting, one is not so lucky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were to introduce VCS to a curriculum, I would use it in the context of group projects, and I would want to make sure the VCS tools are actively maintained and used.  This may call for extra effort on my part, or that of a TA (which may not be an acceptable cost).  I'd say 95% of the value of VCS becomes apparent when one is working on a team, rather than on their own.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-09-12T19:24:32.650" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3621" PostTypeId="2" ParentId="3613" CreationDate="2017-09-12T21:33:36.670" Score="6" Body="&lt;p&gt;As requested, I'm expanding my comment into an answer. This is going to echo a lot of what I said in &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3491/helping-students-adjust-to-using-industrial-strength-ides/3526#3526&quot;&gt;this answer&lt;/a&gt;, so you might also check that out for some background motivation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Version control systems are &lt;strong&gt;tools&lt;/strong&gt; that are designed to solve specific &lt;strong&gt;problems&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They're great for stuff like:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Storing multiple revisions of a file.&lt;/li&gt;&#xA;&lt;li&gt;Allowing collaboration among multiple people.&lt;/li&gt;&#xA;&lt;li&gt;Handling cases where multiple people are editing the same file or even the same section of code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the students haven't encountered these problems, then they might not be ready to start using a version control system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another consideration is that students need to understand basic directory and file structure interaction before diving into version control. Do they know how to navigate a directory structure? How to edit and copy files? This is less &quot;common sense&quot; than you might expect, but it's definitely a prereq to talking about version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of that being said, I think you should start by explaining the above problems. Discuss how they might &quot;solve&quot; those without version control. Ask them if they've found themselves trying to manually merge files where multiple people were contributing, or if they've found themselves with files named &lt;code&gt;HomeworkAssignment_FinalDraft-3-ReallyFinalThisTime-6.txt&lt;/code&gt;. If students have seen these problems, they'll naturally see the benefit of version control.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Present version control as a solution to the problems that they're already experiencing.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, don't make it theoretical. Make the lesson practical and pertinent to what the students actually do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Go through some example scenarios. Explain how they might use Git to solve the above problems, and focus on real actionable things they can do:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Here's how you'd set up a code repo so you and your team can edit files without breaking everything.&lt;/li&gt;&#xA;&lt;li&gt;Here is the command you'd run if you wanted to upload your edits.&lt;/li&gt;&#xA;&lt;li&gt;Here is the command you'd run to download changes from other people.&lt;/li&gt;&#xA;&lt;li&gt;Here is how you'd resolve merge conflicts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Even better: have students run through these scenarios live. Have them typing commands and pushing buttons instead of just listening to you. This should be information that they can actually use, not just theory that they'll forget as soon as they leave the classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't spend an hour talking about theory. If students have never seen version control before, then they don't need to know how Git stores changes. They need to know how to setup a repo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, don't spend an hour telling them about all the different things Git can do. If you throw a hundred different commands at them, they'll remember zero of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, introduce specific problems (that the students have already seen in their own coding), and show the solution to those problems. Have students work through those solutions and practice the commands right away.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it worth mentioning that every local master downloaded from the repository is a new copy, and is effectively a branch origin/master -&gt; local/master?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Students should understand branches (bonus points for using branches to do pull requests and code reviews), but do you really need to get into this level of detail? Imagine students writing this down as you lectured. Would they really need to know this later, or is it just clutter?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it worth mentioning that a headless git repository is no different than a local one, and that you can pull directly from a non-origin repo?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Meh. This seems like trivia to me. Do I need to know any of the above to solve the problems I'm having?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Merge conflicts happen; should I mention how to go about resolving those?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, absolutely. Like Michael said, this is a very common problem that students will face, so they should definitely know how to handle this case.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-09-12T21:33:36.670" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3622" PostTypeId="2" ParentId="3590" CreationDate="2017-09-13T00:53:07.970" Score="4" Body="&lt;p&gt;&lt;strong&gt;CS students are taught to use version control software.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach at a small liberal arts college, and we've taught its use in our capstone course (and sometimes others) for as far back as I can remember, at least since 2005.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A graduate's not knowing something does not necessarily imply it was not taught. Students tell me they've never seen material that I know was in the prerequisite class. I'm sure this is not unique to CS. (Students are taught proper writing in the required English 1, but they don't all use it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching something does not guarantee that students understand it. They could have copied-and-pasted commands or relied on their teammates (or Stack Overflow.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't include questions about VCS on tests, just like I don't include questions on how to use IDEs and debuggers, but that doesn't mean it isn't taught.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2017-09-13T01:50:20.577" LastActivityDate="2017-09-13T01:50:20.577" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3623" PostTypeId="1" CreationDate="2017-09-13T03:26:01.097" Score="8" ViewCount="616" Body="&lt;p&gt;I am supposed to be holding a tutorial session in an Undergraduate Haskell Course, which is also supposed to be a first course in programming for a few of the students. Ideally, the tutorial should be interesting, interactive and inviting problem solving skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My audience is a group of Undergraduate students, a large number of which are mathematically oriented and a few graduate students, majoring in Computer Science. For the undergraduate students, it can be assumed that quite a few of them are new to programming or CS in general. And functional programming is new to almost everyone. This tutorial is part of a course they are all attending - the aim of which is to introduce programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wondering what sort of things I could cover in such a tutorial. Some ideas I had are these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A sudoku solver&lt;/li&gt;&#xA;&lt;li&gt;A Brain**** Interpretter&lt;/li&gt;&#xA;&lt;li&gt;An Arithmetic Expression Parser and Interpretter&lt;/li&gt;&#xA;&lt;li&gt;Discussing a data structure which the students have not seen before - like binomial heaps, or red black trees&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What other things could I try? Functional Programming specific applications are especially welcome.&lt;/p&gt;&#xA;" OwnerUserId="3036" LastEditorUserId="27" LastEditDate="2017-09-13T12:01:55.880" LastActivityDate="2023-01-13T12:58:56.677" Title="Mini-Projects that can be covered in an 1 hour Haskell tutorial" Tags="|lesson-ideas|project|functional-programming|" AnswerCount="2" CommentCount="5" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3624" PostTypeId="2" ParentId="3610" CreationDate="2017-09-13T04:32:17.700" Score="3" Body="&lt;p&gt;I haven't taught about analog television but thanks to my gaming related experience (both as a gamer and game development trainer) I know that the topic of horizontal and vertical sync is very important for understanding one of the more core things of computer science, the display. Further, I am all about the cutting edge stuff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet, when it comes to getting the concepts of display, I am all for going to the roots, and CRT is by far the easiest way to explain these things. So, to answer your question, yes, the analogy is still relevant. And going further, It will and continue to be the starting point for studying this display stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, you will have to upgrade to modern screen but CRT is definitely the go point on the table. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-13T04:32:17.700" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3625" PostTypeId="2" ParentId="3590" CreationDate="2017-09-13T06:32:35.833" Score="6" Body="&lt;h1&gt;It's not university-level material.&lt;/h1&gt;&#xA;&lt;p&gt;Version control can be picked up easily by one of the thousands tutorials available on the web. It's more interesting to give a course on data structures, algorithms, formal logic, mathematics... and lay a broad foundation to widen &amp;amp; deepen the understanding, than explaining trivial concepts like version control.&lt;/p&gt;&#xA;" OwnerUserId="3038" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-13T06:32:35.833" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3627" PostTypeId="1" AcceptedAnswerId="3628" CreationDate="2017-09-13T13:27:59.977" Score="3" ViewCount="163" Body="&lt;p&gt;I learnt a lot (like kept hearing about it) about functional programming after coming to this community. I had heard of it before but was unaware of its importance. Then, I started including functional programming in my daily conversations with my students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, a couple of students (who are already familiar with dot net) are asking me if I can teach them functional programming. Given that I am a dot net guy, my mentor suggested that I try F sharp. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is, is F sharp a good choice for learning functional programming? If not F sharp what are the alternatives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note : Any alternatives that you suggest must have full support on windows as well as Mac. For example, F sharp works just fine on Visual Studio for Windows and Visual Studio for Mac. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-15T00:26:45.903" Title="Functional Programming - using F sharp" Tags="|functional-programming|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3628" PostTypeId="2" ParentId="3627" CreationDate="2017-09-13T13:54:52.793" Score="4" Body="&lt;p&gt;Actually, I think a better choice would be a true functional language (Scheme, ML, Haskell) rather than a multi-paradigm language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course it depends on your goals. If you &lt;em&gt;really&lt;/em&gt; want them to learn the functional programming mindset then don't use a language that lets them escape to other paradigms so easily. F# permits programming in many ways, including imperative and OOP. So, if they have a multi-paradigm language, you can either just let them program using what is available or you can try to enforce a style that may not be natural in the language. I think this would be frustrating - more frustrating than just pushing through the needed transition of thought. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in a true functional language you don't have the option of just &quot;making it work&quot; using thought patterns you have already developed when learning a different paradigm. The transition to functional can be difficult, but it isn't made easier by letting students not do it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want them to run, don't let them crawl. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that I with a bit of a library I can program functionally in Java. But I wouldn't use that as a way to teach functional programming. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-13T14:11:11.970" LastActivityDate="2017-09-13T14:11:11.970" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3629" PostTypeId="2" ParentId="3627" CreationDate="2017-09-13T16:48:41.773" Score="2" Body="&lt;p&gt;I agree with Buffy that, if the goal is to actually understand functional programming, using a true functional language makes more sense. Get rid of the temptation to move back into imperative programming, or the odds your students have of really understanding this new mindset diminish considerably.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to take a look at the discussions over &lt;a href=&quot;https://cseducators.stackexchange.com/questions/106/scheme-vs-haskell-for-introducing-functional-programming&quot;&gt;here&lt;/a&gt;.  When I asked that question, I was unsure whether to use Haskell or Scheme, and the answers there (especially &lt;a href=&quot;https://cseducators.stackexchange.com/a/391/27&quot;&gt;this one&lt;/a&gt;) ultimately led me to choose Scheme (DrRacket in particular).  The idea of pedagogical sub-languages for distilling the key ideas was very persuasive.  I think that this is a great way to get into functional programming.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-09-13T16:48:41.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3630" PostTypeId="2" ParentId="430" CreationDate="2017-09-13T22:43:07.103" Score="5" Body="&lt;p&gt;In the spirit of the other answers, I would recommend:&lt;a href=&quot;http://www.usaco.org&quot; rel=&quot;noreferrer&quot;&gt;http://www.usaco.org&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It contains excercises that progress from trivial to &quot;stomps most undergrads&quot; which would help him find his level (and maybe some humility).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It contains an automatic grader with hidden test cases which allows more independant learning + he learns to debug and search for edge cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's the official site for the training and the selection for US national team which might help him get some awards or medals if he is really talented (IOI,google code jam,..) which might help him in college admission \job interviews.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students from other countries can use the website to train and I think the equivalent website for the French team is: FranceIoI.org&lt;/p&gt;&#xA;" OwnerUserId="3046" LastActivityDate="2017-09-13T22:43:07.103" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3631" PostTypeId="1" AcceptedAnswerId="3633" CreationDate="2017-09-14T07:29:45.350" Score="8" ViewCount="436" Body="&lt;h2&gt;Context&lt;/h2&gt;&#xA;&lt;p&gt;I've been mandated by the university of Tokyo to teach Information security courses during my working hours (initiation level). We are 3 teachers, 2 security researchers employed by the university of Tokyo and a tier Infosec engineer with some practical experience (me).&lt;/p&gt;&#xA;&lt;p&gt;I'm responsible of the workshop sessions. My main goal is to ensure that they can practically apply and test the things they learn with the other 2 researchers.&lt;/p&gt;&#xA;&lt;p&gt;The first session I gave was about building and configuring their own workplace  and just made sure the students correctly followed the manual I wrote. Yesterday I gave the second session (where the fun things should start). This is when i discovered that &lt;strong&gt;70% of my students have no basic IT knowledge.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h2&gt;The problem&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Most of the students don't understand a single word during the theoretical part of the course (the researchers class, i have no impact on what can be taught there). The 2 security researchers doesn't care.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;They say: It's not our fault if the students don't have the necessary knowledge for understanding us, they should work harder at home. And we are busy with our research.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In the workshop sessions (My class) the students are completely lost. They are trying to do things that they totally don't understand.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;What am I planning to do ?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Divide the workshop sessions into 2 parts. Teaching IT Basics and the normal workshop (one hour each).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;IT Basics course plan&lt;/h2&gt;&#xA;&lt;p&gt;This course will be divided into 3 parts: programming, system administration and networking.&lt;/p&gt;&#xA;&lt;h3&gt;General rules:&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;No mouse allowed, only keyboards.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No User friendly OS allowed and of course no GUI. OpenBSD and VIM for everyone.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Programming (15 hours)&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Introduction to C (12 hours)&lt;/li&gt;&#xA;&lt;li&gt;Introduction to Perl or Python (3 hours) &amp;lt;- &lt;em&gt;not sure yet&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Networking (10 hours)&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;OSI Model &amp;amp; TCP/IP Model (3 hours)&lt;/li&gt;&#xA;&lt;li&gt;Common protocols ( 2 hours )&lt;/li&gt;&#xA;&lt;li&gt;HTTP in depth (2 Hours)&lt;/li&gt;&#xA;&lt;li&gt;Sockets &amp;amp; Web Socket (1 Hour)&lt;/li&gt;&#xA;&lt;li&gt;Packet capture and .pcap analysis (2 hours)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;System Administration (10 hours)&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Hardware &amp;amp; computer parts roles. (1 hour)&lt;/li&gt;&#xA;&lt;li&gt;Difference between UNIX, GNU/Linux, DoS. POSIX Standard (1 hour)&lt;/li&gt;&#xA;&lt;li&gt;UNIX Based system initiation (1 hour)&lt;/li&gt;&#xA;&lt;li&gt;Common UNIX Administration commands (2 hours)&lt;/li&gt;&#xA;&lt;li&gt;System calls (2 Hours)&lt;/li&gt;&#xA;&lt;li&gt;File descriptors and PIPE (2 hours)&lt;/li&gt;&#xA;&lt;li&gt;Process &amp;amp; thread (1 hour)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I have 80 hours with this class. 4 (sometime 6) hours per week on 6 months. I'm intending to use ~35 hours for teaching basics. There is no way I will let my students cook security related operations without them understanding what they are doing.&lt;/p&gt;&#xA;&lt;h2&gt;The question&lt;/h2&gt;&#xA;&lt;p&gt;Is the IT basics course plan is good enough for understanding basic infosec ? (Should I add or remove topics, is 35 hours not enough or too much..)&lt;/p&gt;&#xA;&lt;p&gt;I'm very new into the infosec teaching field, not very sure I'm doing this right...&lt;/p&gt;&#xA;&lt;p&gt;I do not seek opinion based answers, but testimony of accomplished teachers who have watched their students grow from IT enthusiast into promising engineers.&lt;/p&gt;&#xA;&lt;h3&gt;EDIT&lt;/h3&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;The students&lt;/h2&gt;&#xA;&lt;p&gt;A class of 26 persons. All graduated a bachelor degree, not in the IT Field for most of them. All Japanese, so I teach in Japanese.&lt;/p&gt;&#xA;&lt;p&gt;Yes, they are motivated, well at least they are highly active in class. I don't know if the infosec field interests them or interacting with a non-Japanese teacher is somehow fun.&lt;/p&gt;&#xA;&lt;p&gt;They ask me tons of questions, all IT related. Those questions pointed out a general lack of IT engineering basics knowledge. For being sure I wrote a short test, and as expected the results were not good. (Recently teach them how to convert decimal to binary and hexadecimal without tools.)&lt;/p&gt;&#xA;&lt;h2&gt;The other teachers&lt;/h2&gt;&#xA;&lt;p&gt;All researchers and Japanese. My students are somehow afraid to ask questions during other class lecture, looks like I'm their personal stack exchange website.&lt;/p&gt;&#xA;&lt;p&gt;I spoke with the other teachers, and I somehow understand my students. The youngest teacher is 49, and I feel like teaching is an obligation for them, they don't want to. Writing papers on subjects that don't matter anymore is what they like.&lt;/p&gt;&#xA;&lt;h2&gt;The diploma&lt;/h2&gt;&#xA;&lt;p&gt;Yes, they are all preparing a master degree in computer science. The majors differ though (Architecture, software, system administration, security...)&lt;/p&gt;&#xA;&lt;p&gt;From my opinion, The Japanese educational system is pretty odd.&#xA;I mean how come graduating a bachelor degree in economics or marketing can let you attend a master degree in computer science? The IT fundamental I will try to teach them is a knowledge any future engineer should acquire during a bachelor degree, not a master. At least in France. And I feel like this is somehow the same in Europe or USA.&lt;/p&gt;&#xA;&lt;p&gt;From my point of view, basic IT knowledge is the fundamental you need to understand computer Science Masters degree's class&lt;/p&gt;&#xA;&lt;h2&gt;My profile&lt;/h2&gt;&#xA;&lt;p&gt;I'm not an academic person. Well, I'm a security engineer with 10 years of practical experience, not really a researcher. I know the actual needs of corporation in term of security, how attacker thinks and proceed, How to defend against them... This what I should teach, how it works out there in a practical way.&lt;/p&gt;&#xA;&lt;p&gt;I'm 34 (French), pretty close to my student's age. This is my first time teaching at master degree level.&lt;/p&gt;&#xA;&lt;p&gt;I don't know if this feeling is right but I somehow feel responsible for my students Future.&lt;/p&gt;&#xA;" OwnerUserId="3049" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-15T07:34:22.143" Title="Teaching information security to students without basic IT knowledge" Tags="|curriculum-design|security|operating-systems|networks|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3632" PostTypeId="2" ParentId="3623" CreationDate="2017-09-14T08:12:03.137" Score="6" Body="&lt;h1&gt;The ideas in your question are far too difficult, for a one hour introduction.&lt;/h1&gt;&#xA;&lt;p&gt;Yesterday I had a look at Haskell and learnt some. I have over 30 years programming experience (20 years professional). Have experience with functional programming. Yet it took me several hours, and did not get far enough to be able to do your suggestions.&lt;/p&gt;&#xA;&lt;h1&gt;Mathematics&lt;/h1&gt;&#xA;&lt;p&gt;You say that your students have a maths background.&lt;/p&gt;&#xA;&lt;p&gt;Take advantage of this. Choose some math problems. That Haskell is ideally suited to solve. And explain why you are doing this.&lt;/p&gt;&#xA;&lt;p&gt;Ensure that you have more than you think you will need, as some students will be much faster than you expect, but don't expect to use them all.&lt;/p&gt;&#xA;&lt;p&gt;There are some good ideas here &lt;a href=&quot;https://stackoverflow.com/a/15110828/537980&quot;&gt;https://stackoverflow.com/a/15110828/537980&lt;/a&gt; also some of the other answers, to the same question: sort, search, interpreter (this one may take too long), factorial.&lt;/p&gt;&#xA;&lt;h1&gt;Avoid bad examples&lt;/h1&gt;&#xA;&lt;p&gt;Don't do problems that are more difficult in a functional language than in a procedural one (Reversing a list, using procedural techniques, in &lt;span class=&quot;math-container&quot;&gt;$O(n)$&lt;/span&gt;, is easy. If by using functional they will probably get a &lt;span class=&quot;math-container&quot;&gt;$O(n^2)$&lt;/span&gt; solution, and &lt;span class=&quot;math-container&quot;&gt;$O(n)$&lt;/span&gt; is hard, then you are teaching a disadvantage on day one.)&lt;/p&gt;&#xA;&lt;p&gt;Fibonacci is, I think &lt;span class=&quot;math-container&quot;&gt;$O(2^n)$&lt;/span&gt;, for simple recursive implementations.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;fib 0 = 0&#xA;fib 1 = 1&#xA;fib n = fib (n-1) + fib (n-2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I did it in &lt;span class=&quot;math-container&quot;&gt;$O(n)$&lt;/span&gt; once, that was the day I learnt a lot about caching. It was hard, it took me a whole day.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-15T08:03:32.203" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3633" PostTypeId="2" ParentId="3631" CreationDate="2017-09-14T12:05:34.570" Score="4" Body="&lt;p&gt;I don't see any particular problems with your syllabus. However, I &lt;em&gt;do&lt;/em&gt; see two challenges that you will need to overcome. Depending on other factors in your context these may be easy or hard. But there is a lot you don't say that would permit a better set of suggestions; how many students and how motivated they are, for example. I'll address that at the end. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The first challenge is that much of what you want to do in the basic knowledge part is actually prerequisite to everything else, and yet you say you want to split the workshop time between that basic knowledge and the skills part. It isn't obvious that the students will know enough of the basic stuff to do much in the skills. That is just as it is now, of course. Meanwhile, the other instructors will be moving through their material, putting a bigger load on the students. It might lead to frustration. You will need to assure, somehow, that the students have the knowledge they need &lt;em&gt;when&lt;/em&gt; they need it. I think this will be your main challenge. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The second challenge involves &lt;em&gt;how&lt;/em&gt; you intend to teach the basic stuff. If you only lecture and show a lot of Powerpoint slides, I see a scenario in which they know just as much at the end as they do at the beginning, having learned almost nothing. If, instead, you make the students very active I would predict better outcomes. Since you suggest this happens in a workshop setting, I think you have the possibility to make it work, so long as you make them work through a lot of exercises for every syllabus point. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As a technique, I'd also recommend that they do a lot of paired and team work, rather than individual work. They can help you teach by helping one another to learn - working on those exercises. It will also be an advantage to their later work if they are to work together after the course ends. The more students you have, the more important this will be, since you will become a learning bottleneck otherwise. The more students, the more questions. You won't be able to answer all of them in the available time. Teams will help here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, it wasn't clear to me, the reader, how motivated the students are. Things will work better if they are already highly motivated, of course. But if that is not the case, and they really &lt;em&gt;should&lt;/em&gt; work harder, as your colleagues imply, then you have another problem that you should attack. One way to do that is to try to introduce some human, even fun, elements into your teaching. One useful &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0201741571&quot; rel=&quot;nofollow noreferrer&quot;&gt;Organizational Pattern&lt;/a&gt;, for example is &quot;Do Food&quot; which suggests providing food at the workshop sessions. That book, by the way, has a lot of other suggestions that will probably help you improve the situation if it is poor. In your case InfoSec is the big new idea you are trying to introduce. But you can increase the motivation by making the workspace more human (and humane). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-14T12:05:34.570" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3634" PostTypeId="2" ParentId="3631" CreationDate="2017-09-14T12:34:51.547" Score="2" Body="&lt;p&gt;You may have to rethink the curriculum design at a higher level ( involving other staff ). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you kick people off the course, loosing revenue. Do you teach extra lessons to get them up to entry level, extra cost.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is a good idea to teach Unix. it is a very consistent operating system, making it easier to learn. However there is an initial unfamiliarity. Therefore, if students are familiar with MS-Windows, then link to it. Show how MS-Windows copied (badly) from Unix &lt;code&gt;\&lt;/code&gt; in stead of &lt;code&gt;/&lt;/code&gt;, and why. Because they had already used &lt;code&gt;/&lt;/code&gt; before they implemented directories. (Interestingly Unix made the same mistake &lt;code&gt;&amp;gt;&lt;/code&gt; had already been used, so they went for &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would avoid Vim (I love Vim and Emacs), but why make things difficult?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may need to cut it down, doing &lt;code&gt;C&lt;/code&gt;, and other programming, as well as shell may be too much. At least at first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check with the bosses, on what is expected by the end of the course. If this is not feasible then you need to push back, to get thinks changed.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Details of time spent on my 1st year (1991-1992) undergrad course, in the module of computer applications.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In the hope that this will show what can be done in this time. Summarised from the handouts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This module was, mostly, not about computer security. However it is a prerequisite. I have it here as it is similar to the basics you talk about in the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will not have to teach it all, as some is not relevant.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Total Time: 20hours lectures (one per week) + 50 hours lab + extra off timetable (We were expected to put in at least the same number of hour again in self study).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Architecture&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Memory, processor, input, output, storage, network&lt;/li&gt;&#xA;&lt;li&gt;File system hierarchy&lt;/li&gt;&#xA;&lt;li&gt;Data representation: Denary, Binary, Hexadecimal, Octal, Binary coded decimal, ascii, parity&lt;/li&gt;&#xA;&lt;li&gt;System software&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;MS Dos and Windows (Version &amp;lt;= 3 )&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dos commands, file types&lt;/li&gt;&#xA;&lt;li&gt;Viruses&lt;/li&gt;&#xA;&lt;li&gt;History of the PC&lt;/li&gt;&#xA;&lt;li&gt;MS windows&lt;/li&gt;&#xA;&lt;li&gt;MS word&lt;/li&gt;&#xA;&lt;li&gt;Fonts&lt;/li&gt;&#xA;&lt;li&gt;Copyright&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Unix (Sun OS)&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is an OS&lt;/li&gt;&#xA;&lt;li&gt;History of Unix and C&lt;/li&gt;&#xA;&lt;li&gt;Logging in, passwords, changing passwords.&lt;/li&gt;&#xA;&lt;li&gt;Unified file system hierarchy&lt;/li&gt;&#xA;&lt;li&gt;Command line&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;commands: &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;pwd&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;more&lt;/code&gt;/&lt;code&gt;less&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;rm&lt;/code&gt;, &lt;code&gt;man&lt;/code&gt;, &lt;code&gt;date&lt;/code&gt;, &lt;code&gt;who&lt;/code&gt;, &lt;code&gt;wc&lt;/code&gt;, &lt;code&gt;ps&lt;/code&gt;, &lt;code&gt;chmod&lt;/code&gt;, &lt;code&gt;mkdir&lt;/code&gt;, &lt;/li&gt;&#xA;&lt;li&gt;streams: stdin, stdout, stderr, redirection, pipes&lt;/li&gt;&#xA;&lt;li&gt;printing, &lt;code&gt;mail&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;vi&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Boolean logic&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;awk&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set theory, Regular expressions&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;Other modules&lt;/h1&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In year 2 we did programming in C (20hours + 50hours lab)&lt;/li&gt;&#xA;&lt;li&gt;We also did OSI model in a different unit.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-09-14T12:58:00.987" LastActivityDate="2017-09-14T12:58:00.987" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3636" PostTypeId="2" ParentId="3590" CreationDate="2017-09-15T10:47:48.413" Score="-2" Body="&lt;p&gt;The majority of 'Version Control' actually pre-dates the Titanic, and was developed as part of Drawing Office procedures. It is only very very recently that the newer distributed version control capabilities have been developed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back in the day, drawings were made with India ink on kaolin and linen sheets, and were effectively more valuable than the 'old masters' artworks. If they were damaged then the product could not be built, thus great pains were taken to protect the master from damage or modification. Drawings were 'traced', and from those trace's the blue-prints were made. One would have to request changes, which would be batched up, before a 'change order' was allowed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In those days there was only one physical master. Protection was paramount. The problems were human and physical. It was an administrative exercise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now we have perfect replication and high volume storage. Thus now we often use verification hashes to check if our 'master' is the same as their 'master'. And we use Merkle trees to verify the history of the modifications - Is our master properly derived from their base design (e.g. Git). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So underneath there is a lot of CS theory at work, but it's still something of an administrative exercise. It all depends on whether one is educating someone to be an academic, or a practitioner (or developing the practice..).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's still a bit of a human problem, it's just that anyone over 30 probably still thinks the old way.&lt;/p&gt;&#xA;" OwnerUserId="1759" LastActivityDate="2017-09-15T10:47:48.413" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3637" PostTypeId="1" AcceptedAnswerId="3644" CreationDate="2017-09-15T11:09:00.050" Score="6" ViewCount="761" Body="&lt;p&gt;A few days ago, I asked a question if I should use F sharp to learn functional programming and the discussion eventually suggested that I take up Scheme. So, I visited the &lt;a href=&quot;http://scheme-reports.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;scheme site&lt;/a&gt; (which did not say much) and then I ended up at the &lt;a href=&quot;https://www.gnu.org/software/mit-scheme/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MIT site&lt;/a&gt;. and I also read on the wikipedia that there are several implementations of scheme. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the question is which implementation ( I have given a reference of MIT implementation above) should I use for my beginner class on Scheme.&lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-09-15T20:20:32.733" LastActivityDate="2017-09-15T20:20:32.733" Title="Scheme - Which implementation to use for teaching" Tags="|scheme|" AnswerCount="3" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3638" PostTypeId="1" AcceptedAnswerId="3643" CreationDate="2017-09-15T11:12:11.943" Score="3" ViewCount="190" Body="&lt;p&gt;I am preparing to teach Scheme now, so I need a good reference book. I like books which can dig deep, with none of the beginner level introduction stuff that some books like to spend time on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what is the best book to use as reference? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note : In line with my usual style, I would prefer books that are available in both dead tree and online editions, with the online edition having a higher priority. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="58" LastEditDate="2017-09-16T03:03:45.327" LastActivityDate="2017-09-16T03:03:45.327" Title="Scheme - Which book To Use" Tags="|resource-request|scheme|" AnswerCount="2" CommentCount="9" FavoriteCount="0" ClosedDate="2017-09-22T23:58:52.053" ContentLicense="CC BY-SA 3.0" />
  <row Id="3639" PostTypeId="2" ParentId="3638" CreationDate="2017-09-15T11:41:23.167" Score="2" Body="&lt;p&gt;Unfortunately most scheme books are dead tree only and many are out of print, though available in the used book market. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The classic is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262510871&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt;&lt;/a&gt; by Abelson and Susan. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is probably your best option and is still in print. There is also an online version of SICP at &lt;a href=&quot;https://mitpress.mit.edu/sicp/full-text/book/book.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://mitpress.mit.edu/sicp/full-text/book/book.html&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the advantages of Scheme, being so different from what your students already likely know, is that you don't have the problem of finding a good book for &quot;scheme as a second language&quot; as you would switching from one language to a similar one. A book that assumes the students don't know a lot is fine for a paradigm switch situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other books though. &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262192888&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Scheme and the Art of Programming&lt;/em&gt;&lt;/a&gt; by Springer and Friedman is pretty good. Friedman also published &lt;em&gt;The Little Schemer&lt;/em&gt;, which is probably too simple for your uses. But combined with his follow on &lt;em&gt;The Seasoned Schemer&lt;/em&gt; you might do ok. But Abelson and Sussman is the gold standard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Haskell, on the other hand, being more modern, would offer the possibility of e-books better than Scheme would, if that is all-important. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As user ctrl-alt-delor mentions below, there isn't much to the Scheme language, so a &quot;reference&quot; fits on an index card. The problem with functional languages for those that program in other languages is that you need to expand the way in which you think to use them effectively. So SICP, while not a reference, as such, will help your students make the mental switch necessary. It isn't like needing a Java reference if you are a C# programmer. It is nothing like that at all. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here is a page of interesting links about Scheme and how to use it. &#xA;&lt;a href=&quot;http://www-users.cs.umn.edu/~gini/1901-07s/scheme.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www-users.cs.umn.edu/~gini/1901-07s/scheme.html&lt;/a&gt;.&#xA;In particular, there is a link to another page showing how to set up emacs for scheme. There are also links to instructor materials, such as exercises. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-15T16:58:31.377" LastActivityDate="2017-09-15T16:58:31.377" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3640" PostTypeId="2" ParentId="3637" CreationDate="2017-09-15T11:48:58.723" Score="11" Body="&lt;p&gt;&lt;a href=&quot;http://racket-lang.org&quot; rel=&quot;noreferrer&quot;&gt;Racket&lt;/a&gt; is a variant of Scheme that is both very good and very popular. The DrRacket system is probably all you need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;DrRacket is widely used and there  is quite a bit of information about it online. It provides a very simple interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also Scheme plugins for NetBeans and Eclipse if you want a more complete IDE. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-15T11:48:58.723" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3641" PostTypeId="2" ParentId="3637" CreationDate="2017-09-15T12:20:13.570" Score="4" Body="&lt;p&gt;I won't tell you which one, as I don't know, and would just be my opinion. But here are some criteria.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First look at what other learning materials you have, and use the same language.&lt;/li&gt;&#xA;&lt;li&gt;Some versions of scheme are not pure (that is they have mutation). Do not use one of these. Half way through structure and interpretation of computer programs, we learn how to implement mutation. But not until we have learnt that we never &lt;strong&gt;need&lt;/strong&gt; it, and 99% of the time it is evil and best avoided. And then how to abstract it away, that is encapsulate it.&lt;/li&gt;&#xA;&lt;li&gt;Consider &lt;a href=&quot;https://www.gnu.org/software/mit-scheme/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GNU/MIT Scheme&lt;/a&gt; it is &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free Software&lt;/a&gt; and from MIT. I don't know if it meets the other criteria, but I would expect so (as it is from MIT).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;An opinion from &lt;a href=&quot;https://wingolog.org/archives/2013/01/07/an-opinionated-guide-to-scheme-implementations&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://wingolog.org/archives/2013/01/07/an-opinionated-guide-to-scheme-implementations&lt;/a&gt; (some random website, where the author seems to know what they are on about.)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The Scheme for SICP&lt;/p&gt;&#xA;&lt;p&gt;Many people come by #scheme asking which Scheme they should use for following along with Structure and Interpretation of Computer Programs. SICP was originally written for MIT Scheme, but these days it's easier to use Neil Van Dyke's SICP mode for Racket. It has nice support for SICP's &amp;quot;picture langauge&amp;quot;. So do that!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Racket is also &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free Software&lt;/a&gt;, so I would go with that. (Sorry I said that I would not recommend one.)&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-15T12:28:52.147" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3642" PostTypeId="2" ParentId="3223" CreationDate="2017-09-15T14:30:49.773" Score="3" Body="&lt;p&gt;There's not much out there, unfortunately, and what there is is either suspect or sparse.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;CIRR has probably created the &lt;a href=&quot;https://cirr.org/data&quot; rel=&quot;nofollow noreferrer&quot;&gt;best data that we have&lt;/a&gt;, as they engage in 3rd-party verification. These results are actually rather positive for the industry, although participation is voluntary, and there aren't many Bootcamps that participate.&lt;/li&gt;&#xA;&lt;li&gt;The US Federal Government created the EQUIP initiative to convince schools to provide government-quality data in return for student attendees being eligible for financial aid.  &lt;a href=&quot;https://www.ed.gov/news/press-releases/fact-sheet-ed-launches-initiative-low-income-students-access-new-generation-higher-education-providers&quot; rel=&quot;nofollow noreferrer&quot;&gt;Only five organizations&lt;/a&gt; qualified.  While I have been unable to locate the data itself, I would presume that those five organizations are probably fairly good.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.coursereport.com/resources/research-reports&quot; rel=&quot;nofollow noreferrer&quot;&gt;Course Report&lt;/a&gt; is an independent organization that creates an annual survey of outcomes, and it shows consistently good results for Bootcamps nationally, but all of the results are self-reported, so they are not entirely trustworthy.  Also, the organization is very obviously friendly to the industry itself, with founders and employees who attended bootcamps themselves. Their &quot;reports&quot; simply &lt;a href=&quot;https://www.coursereport.com/reports/2016-coding-bootcamp-job-placement-demographics-report&quot; rel=&quot;nofollow noreferrer&quot;&gt;look and read like ad copy&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;There is a recent initiative by &lt;a href=&quot;https://www.wsj.com/articles/coding-boot-camps-band-together-to-boost-accountability-1488364381&quot; rel=&quot;nofollow noreferrer&quot;&gt;the schools themselves&lt;/a&gt; to create more accountability, presumably in order to counteract rumors that the institutions are &lt;a href=&quot;http://www.nclnet.org/coding_bootcamp_claims_the_truth_behind_the_numbers&quot; rel=&quot;nofollow noreferrer&quot;&gt;simply fraudulent diploma-mills&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you are considering a Bootcamp, I would strongly recommend only considering schools that have good results with CIRR, as that will both discourage fraud, and encourage Bootcamps to partipate in the process.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-09-15T14:36:56.010" LastActivityDate="2017-09-15T14:36:56.010" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3643" PostTypeId="2" ParentId="3638" CreationDate="2017-09-15T19:53:37.407" Score="4" Body="&lt;p&gt;&lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/HtDP2e/&quot; rel=&quot;noreferrer&quot;&gt;How to Design Programs&lt;/a&gt; is released under the MIT license, and has the distinct advantage of being integrated directly into DrRacket.  This allows you to work through bite-sized chunks of Scheme, and gives you an easy tutorial-style way to follow the textbook as you explore the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within DrRacket, go to the Language Menu, and the Teaching Languages are in there.  They each reflect portions of How to Design Programs.  The instructions for utilizing the Teaching Languages are contained in the &lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/HtDP2e/part_prologue.html&quot; rel=&quot;noreferrer&quot;&gt;preface&lt;/a&gt; to the book.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-09-15T19:53:37.407" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3644" PostTypeId="2" ParentId="3637" CreationDate="2017-09-15T19:59:01.763" Score="5" Body="&lt;p&gt;I would add to Buffy's answer that DrRacket also contains several built-in learning languages that allow you to dip into Scheme slowly.  These languages are designed to be used with the free online textbook &lt;a href=&quot;http://www.ccs.neu.edu/home/matthias/HtDP2e/&quot; rel=&quot;noreferrer&quot;&gt;How to Design Programs&lt;/a&gt; by Felleisen, Findler, Flatt, and Krishnamurthi (the last of whom is &lt;a href=&quot;https://cseducators.stackexchange.com/users/290/shriram-krishnamurthi&quot;&gt;a user on this very site&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please see my answer here (&lt;a href=&quot;https://cseducators.stackexchange.com/a/3643/27&quot;&gt;Scheme - Which book To Use&lt;/a&gt;) for further details.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-09-15T19:59:01.763" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3645" PostTypeId="2" ParentId="3610" CreationDate="2017-09-16T14:47:03.947" Score="2" Body="&lt;p&gt;Except for the latest iPad Pro and a few other specialized displays (vector, etc.), most laptop and mobile devices displays still update a 2D bitmap raster or composited texture quad at some fixed refresh rate, just like a CRT (but with much higher bandwidth these days).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-09-16T14:47:03.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3646" PostTypeId="1" CreationDate="2017-09-16T22:05:33.553" Score="6" ViewCount="3521" Body="&lt;p&gt;I am self-learning concurrent programming. I have some experience with concurrent programming. Have self learned OS and programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are both programming languages and libraries that provide concurrent programming facilities. &#xA;I would like to learn about concurrent programming  at OS and library levels (e.g. multithreading, multiprocessing, spin locks, semaphore, ...) and language level (e.g. monitor, future, promise, channels, conditional critical regions, Coroutine, ...). For the specific topics,  I am referring to sections &quot;Models&quot;,   &quot;Prevalence&quot; and &quot;Languages supporting concurrent programming&quot; in &lt;a href=&quot;https://en.wikipedia.org/wiki/Concurrent_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Concurrent_computing&lt;/a&gt; and also &lt;a href=&quot;https://en.wikipedia.org/wiki/Concurrency_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;concurrency patterns&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to learn at conceptual as well as specific language levels.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Could you recommend some books which explain the different approaches at a concept level? It is good for such books to have  specific languages and libraries as examples, but not necessarily especially if the books you recommend are classic but not contemporary.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Could you also recommend which specific languages and libraries and books on specific languages and libraries? For specific languages, I am currently interested in functional languages (such as Scala, Haskell, OCaml ...), Python, C#, Java, C/C++ and Go.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Academic books (text books, survey) and professional/practical books are both welcome.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastEditorUserId="58" LastEditDate="2017-09-23T16:37:18.740" LastActivityDate="2017-09-26T10:27:50.320" Title="Could you recommend books on concurrent programming?" Tags="|resource-request|self-learning|textbook|concurrency|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3647" PostTypeId="2" ParentId="3646" CreationDate="2017-09-17T08:35:35.317" Score="4" Body="&lt;h1&gt;Concurrent programming is easy, synchronisation is hard.&lt;/h1&gt;&#xA;&lt;p&gt;Have a look at this video for an alternative to synchronisation: &lt;a href=&quot;https://www.youtube.com/watch?v=2yXtZ8x7TXw&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=2yXtZ8x7TXw&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1&gt;When you have to synchronize&lt;/h1&gt;&#xA;&lt;p&gt;Use easy (High level) synchronization. see:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scoop from Eiffel.&lt;/li&gt;&#xA;&lt;li&gt;Transactions&lt;/li&gt;&#xA;&lt;li&gt;Pipelines / message passing&lt;/li&gt;&#xA;&lt;li&gt;coroutines (for when you don't need parallelisation)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;See also no lock / zero lock structures: Most pipes that are thread safe use locking. Or are not thread safe, and expect the user to do the locking. However it is possible to get thread safe zero lock queues. There rely on a few atomic instructions. (I prefer the name minimal lock, because the atomic instructions do locking).&lt;/p&gt;&#xA;&lt;h1&gt;Only use low-level synchronization to implement high-level synchronisation.&lt;/h1&gt;&#xA;&lt;p&gt;If you need synchronisation, and if you do not have high-level synchronisation, then find a good library that implements high-level synchronisation, using the existing low-level synchronisation.&lt;/p&gt;&#xA;&lt;p&gt;Don't write it your self, except as an exercise (and do to it as an exercise, it is fun and you will learn a lot), as it is very hard and you will get it wrong.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-17T08:46:38.297" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3648" PostTypeId="2" ParentId="3646" CreationDate="2017-09-17T10:18:47.347" Score="2" Body="&lt;p&gt;I have no recommendations for the theory part but since you are asking for implementation advice as well, here we go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking to use C sharp (you haven't specified a specific language of choice) then, as a dot net guy myself, I would recommend you start your self learning on concurrent programming with .NET implementation of same at &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/standard/threading/threads-and-threading&quot; rel=&quot;nofollow noreferrer&quot;&gt;Threads and Threading&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The link provides with what you can (most of the things you have discussed can be done in C sharp Threads) and what you cannot do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you wish to dig deep, there are no specific books on threads in C sharp, but you can use the reference book I used which contains detailed implementation notes on the same at &lt;a href=&quot;http://a.co/1rrmkoI&quot; rel=&quot;nofollow noreferrer&quot;&gt;C sharp 70 483&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-17T10:18:47.347" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3649" PostTypeId="5" CreationDate="2017-09-17T14:09:13.650" Score="0" Body="&lt;p&gt;There are a number of ways to structure student exercises, including individual and team work. There are situations, however, in which the structuring is non obvious to achieve some particular goal. Use this tag to mark such questions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-17T14:09:13.650" LastActivityDate="2017-09-17T14:09:13.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3650" PostTypeId="4" CreationDate="2017-09-17T14:09:13.650" Score="0" Body="This tag is for questions related to structuring student exercises, problems, and projects for maximum educational effect. Questions should go beyond the obvious and ubiquitous choices. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-17T14:09:13.650" LastActivityDate="2017-09-17T14:09:13.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3651" PostTypeId="5" CreationDate="2017-09-17T14:12:38.770" Score="0" Body="&lt;p&gt;Operating systems control hardware in complex ways. Most undergraduate programs have at least one course in operating system principles. Other courses may need to introduce some significant information about operating systems. This tag is appropriate for all such questions. It is not, however, appropriate for theoretical questions or for questions comparing operating systems other than as it would apply to the teaching process. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-17T14:12:38.770" LastActivityDate="2017-09-17T14:12:38.770" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3652" PostTypeId="4" CreationDate="2017-09-17T14:12:38.770" Score="0" Body="Use this tag to mark questions about teaching operating systems and their components. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-17T14:12:38.770" LastActivityDate="2017-09-17T14:12:38.770" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3653" PostTypeId="5" CreationDate="2017-09-18T11:38:50.830" Score="0" Body="&lt;p&gt;Client-Server systems have one or more, possibly remote, client processes communicating with a server to obtain information or other services. The server itself may be quite complex; distributed, for example, rather than a single process. Client-server interactions might themselves be simple or complex, short or long-lived. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for all questions related to teaching these concepts either theoretical or practical aspects. The site, however, is not suitable for theoretical questions about the concept itself. Note that client-server is a more common designation (at least in the US) than is server-client. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-18T11:38:50.830" LastActivityDate="2017-09-18T11:38:50.830" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3654" PostTypeId="4" CreationDate="2017-09-18T11:38:50.830" Score="0" Body="Use this tag for questions related to teaching all aspects of server-client (client-server) information systems. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-18T11:38:50.830" LastActivityDate="2017-09-18T11:38:50.830" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3656" PostTypeId="1" AcceptedAnswerId="3663" CreationDate="2017-09-19T02:55:27.110" Score="10" ViewCount="426" Body="&lt;p&gt;I'm a teaching assistant for the upper level under-graduate courses for Game Design and Development at my University, and the professor and I are having a hard time finding a way to motivate students to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Actually complete and turn in their homework on time.&lt;/li&gt;&#xA;&lt;li&gt;Attempt to do more than just the bare minimum.&lt;/li&gt;&#xA;&lt;li&gt;Listen to feedback for on-going assignments.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;We have tried things like offering a bit of extra credit for turning it in on time or going above and beyond on the assignment, but as you can assume the only students that actually get that extra credit are the ones that are already excelling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These classes are built around building a strong portfolio, but what generally comes out are projects that I wouldn't even want to include in my portfolio. Generally about 15% of the class are students that do work that deserve an A, and the rest is split fairly evenly between a C and an F (F's generally fall around 30% for these students). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate your feedback and thoughts, hopefully with the help of this community I can help motivate these students to excel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Adding more to the 3rd bullet above. They have an assignment one week, and they get feedback on what they need to do to improve their marks. However, they ignore the feedback and end up losing the same amount of points they did the previous week for the same problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit2: Answering some comments here. This is in the United States and they are working in C# with Unity3D. The class has pre-requisites that do funnel nicely to the content, because they start with just learning the basics of C# then they learn more complicated computer science concepts in C# all while learning simple game design using gamemaker, which can essentially be a drag and drop tool. It isn't until around the second semester of Sophomore year that they start using Unity3D. As for the games they are creating, please feel free to take a look at my portfolio: &lt;a href=&quot;http://ryandarras.weebly.com/examples-of-work.html&quot; rel=&quot;noreferrer&quot;&gt;http://ryandarras.weebly.com/examples-of-work.html&lt;/a&gt;. &#xA;These are games I made throughout my undergrad, and while I'll admit I'm a big nerd that probably spent way too much time on my homework because I enjoyed it, I would expect a resemblance to this quality in their games. Homework is also given with a very detail description of the requirements, as well as the exact rubric that is used to grade the assignment (the rubric is as objective as we can make it).&lt;/p&gt;&#xA;" OwnerUserId="3078" LastEditorUserId="3078" LastEditDate="2017-09-19T20:01:28.203" LastActivityDate="2017-09-19T23:31:38.403" Title="How to motivate game design/development students to do more than the minimum on homework" Tags="|student-motivation|homework|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3657" PostTypeId="2" ParentId="473" CreationDate="2017-09-19T05:23:02.510" Score="1" Body="&lt;p&gt;Uncle Long Hair gave a perfectly good answer. I'm adding information about a particular CS course for high schools that does include Agile. The Project Lead The Way curriculum for AP CS Principles has students divide their work on a project into a prioritized backlog and divide the top backlog item into a sprint task list where each item on the list can be accomplished in a small amount of time. Students aim to knock out two sprint tasks per session, and a sprint lasts a week. Work on a project might last two weeks. A sprint lasts a week with Scrum standup at the end of the week, where students report progress. That's not really what is supposed to happen in a standup, but it works in the classroom. The teacher serves the role of the Scrum master.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students are exposed to the lingo with a &quot;Scrum in 10 minutes&quot; video. After they've done it for a few projects, Scrum poker is added in one activity because some teachers and students find the mechanics fun and lets the class talk about the importance and difficulty (especially for beginners) of estimating how long something will take.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some teachers, once or more during the year, pairs create the problem they intend to solve and then swap with another pair and solve someone else's problem. This provides a client, albeit without engaging the community. &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-09-19T05:23:02.510" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3658" PostTypeId="2" ParentId="3656" CreationDate="2017-09-19T07:43:55.650" Score="5" Body="&lt;h1&gt;Give credit where credit is due.&lt;/h1&gt;&#xA;&lt;p&gt;Don't give credit for doing the minimum (handing in on time). Instead deduct credit for being late. They should feel lucky to get anything if they don't get it in on time.&lt;/p&gt;&#xA;&lt;h1&gt;Intrinsic Motivation&lt;/h1&gt;&#xA;&lt;p&gt;There have been a lot of studies on motivation (most of the ones that I am aware of are industry based, but that is because I spent most of my life there). They show that most attempts to motivate via giving rewards e.g. pay for performance, back fire. That is they demotivate. They show that the best way is to pay well, and make the job interesting (intrinsic motivation). The only exception, where extrinsic motivation works, are simple manual jobs, that don't involve much thinking.&lt;/p&gt;&#xA;&lt;p&gt;Therefore apart from deducting credit for late handing in, you should avoid extrinsic motivation.&lt;/p&gt;&#xA;&lt;p&gt;Try to find out what their interests are, and design interesting assignments. Try to get a culture of working in the computer lab, where students can work together. This way they will learn from each other. Provide an extrinsic motivator (pay well) to be there at certain times e.g. lab food.&lt;/p&gt;&#xA;&lt;h1&gt;Mind set&lt;/h1&gt;&#xA;&lt;p&gt;Do some mind set work with them. See the work of Carol Dweck (This&#xA;&lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;noreferrer&quot;&gt;Ted talk&lt;/a&gt;&#xA;is a good introduction).&lt;/p&gt;&#xA;&lt;p&gt;Dwecks work shows that there are (to put it simply), two types of mind set&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to believe that outcome is based on hard work, trial and error, making mistakes, seek challenges, listening to feedback, … When you have this mindset you tend to do  well.&lt;/li&gt;&#xA;&lt;li&gt;to believe that outcome is based on ability. When in this mindset, you tend to do poorly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is it ever too late to foster a growth mindset in students?&lt;/p&gt;&#xA;&lt;p&gt;Dweck: No—we’ve developed a number of online workshops addressed at adolescents and shown that when we teach [those] students a growth mindset, many of them regain their motivation to learn and achieve higher grades, especially students who have been struggling or students who have been laboring under a negative stereotype about [their own] abilities.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It may be (probably is), that the low performing students, have a fixed mind set. If so they will not try hard, they will not listen to feedback.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-19T07:43:55.650" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3659" PostTypeId="5" CreationDate="2017-09-19T11:22:36.907" Score="0" Body="&lt;p&gt;&lt;em&gt;Lint&lt;/em&gt; is a Unix tool that finds and reports potential errors in C programs by examining the program text statically. Originally it was designed to make compilers easier to write, offloading error reporting to another tool. In the modern world, such tools are still used, but have been updated as subsystems in sophisticated development environments that employ some form of incremental compilation. This enables the environment to highlight, in near real-time, many errors in the program, especially type errors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, a &lt;em&gt;linter&lt;/em&gt; is a diagnostic tool for finding errors in a static way, examining the program text, as opposed to a dynamic debugger that operates at run-time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Historical Note. The word &quot;bug&quot; is often used to absolve programmers from their mistakes: &quot;A bug just flew into my program.&quot; There is a story about Grace Murray Hopper finding an actual &lt;a href=&quot;https://thenextweb.com/shareables/2013/09/18/the-very-first-computer-bug/&quot; rel=&quot;nofollow noreferrer&quot;&gt;bug (moth)&lt;/a&gt; caught in a relay of an early electro mechanical computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise &lt;em&gt;lint&lt;/em&gt; is those little bits of garbage that wind up &quot;somehow&quot; in your programs like they do on your formal clothing. It just &quot;happens&quot;, not my fault. Lint-like tools help you remove the lint. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-19T11:29:25.510" LastActivityDate="2017-09-19T11:29:25.510" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3660" PostTypeId="4" CreationDate="2017-09-19T11:22:36.907" Score="0" Body="Use this tag for all questions about using unix-lint like tools (linters) in the educational process. Both static tools (lint itself) and dynamic tools (syntax error highlighters...) are covered by this idea. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-19T11:22:36.907" LastActivityDate="2017-09-19T11:22:36.907" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3661" PostTypeId="2" ParentId="3223" CreationDate="2017-09-19T13:42:28.393" Score="1" Body="&lt;p&gt;I'm going to assume that you mean courses in which face to face presence is required, as opposed to MOOCs in which it is not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There isn't likely to be much true &lt;em&gt;research&lt;/em&gt; on such things, partly due to the recentness of their creation, but mostly due to the difficulty of formulating and answering appropriate questions. What data there is is pretty scattered and is subject to taint by financially interested parties. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, opinion surveys are available, as well as reports by interested but not &lt;em&gt;financially interested&lt;/em&gt; groups. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A set of reports can be found here:&#xA;&lt;a href=&quot;https://www.coursereport.com/resources/research-reports&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.coursereport.com/resources/research-reports&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kyle Thayer and Andrew Ko recently interviewed a collection of students concerning  barriers faced by bootcamp students: &lt;a href=&quot;http://www.kylethayer.com/assets/papers/BarriersFacedByCodingBootcampStudents-Thayer-Ko.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.kylethayer.com/assets/papers/BarriersFacedByCodingBootcampStudents-Thayer-Ko.pdf&lt;/a&gt;. The study is small and so not definitive. It is also situated in time as these things change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, an online search for &quot;value of programming bootcamps&quot; will bring you a lot of opinions, but little research. The wisdom seems to be that bootcamps are good for making you better at your current job than they are for helping you move into a new profession. Employers may downplay the value of a bootcamp for valid or invalid reasons, but it still falls on the individual. If your resume shows no success in the new field, a bootcamp isn't likely to help you much. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that is just another opinion, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still more opinion, but possibly useful: &lt;a href=&quot;https://www.bloomberg.com/news/features/2016-12-06/want-a-job-in-silicon-valley-keep-away-from-coding-schools&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bloomberg.com/news/features/2016-12-06/want-a-job-in-silicon-valley-keep-away-from-coding-schools&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-19T14:43:25.103" LastActivityDate="2017-09-19T14:43:25.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3662" PostTypeId="2" ParentId="473" CreationDate="2017-09-19T16:06:33.197" Score="1" Body="&lt;h1&gt;Ensure that you have experience first&lt;/h1&gt;&#xA;&lt;p&gt;The worse thing you can do is tell them that they are doing agile, but then do something that does not work. (This seems to be the normal approach in industry.) It will lead them to think that agile does not work.&#xA;So first ensure that you have a good grasp of the concepts.&lt;/p&gt;&#xA;&lt;h1&gt;Select some useful agile practices&lt;/h1&gt;&#xA;&lt;p&gt;«Test first», and «one thing at a time», are very useful tools in teaching (but without automation, until later). Having students just do one thing at a time, can help to rid the feeling of being over whelmed. Planing a test before writing code, helps students to think about what it is that they are trying to do. Another similar technique is «re-write the assignment in your own words».&lt;/p&gt;&#xA;&lt;p&gt;«Pair programming» from XP, is also useful. Groups and pairs have been shown to help learning.&lt;/p&gt;&#xA;&lt;p&gt;«You are not going to need it»: is there anything that you are producing, that you don't need yet. Don't produce it until you need it.&lt;/p&gt;&#xA;&lt;p&gt;«Automate it»: So you got to the end and did not need a flow chart, so did not make one. But the examiner insists that you need one in your design. Therefore use a tool to generate one from you code (they will never know).&lt;/p&gt;&#xA;&lt;p&gt;«Do the simplest thing that will work»: Why complicate things. This could mean using techniques that you already know; using a library;&lt;/p&gt;&#xA;&lt;p&gt;Use a «revision control system»: This allows you to exhibit «courage», as you will not loose all of your hard work.&lt;/p&gt;&#xA;&lt;p&gt;Accept «feedback», try things, make mistakes, learn from them.&lt;/p&gt;&#xA;&lt;p&gt;In writing this, I have just selected agile/lean practices will enhance my teaching and students learning. The others can wait for another day. Tell the pupils that you are doing this: tell them that you have selected a sub-set of practices, and why.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-19T16:06:33.197" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3663" PostTypeId="2" ParentId="3656" CreationDate="2017-09-19T16:44:52.860" Score="6" Body="&lt;p&gt;Something I wasn't sure about when I was reading your post was if the problem is whether the issue is if students lack &lt;em&gt;motivation&lt;/em&gt; or if they lack the &lt;em&gt;ability&lt;/em&gt; to succeed in your course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If 30% of your students are consistently failing your course, then I genuinely do have to wonder if the latter is the case. If so, I'm not sure this is a  problem you can easily fix within just within the context of your course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I'm assuming the students are expected to complete a few pre-reqs before they can take your course. Why aren't those pre-reqs adequately preparing your students? Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students are genuinely under-prepared and have &quot;given up&quot; and are just going through the motions so they can graduate, then the best fix is probably to try and systematically repair your entire department. Perhaps that might mean finding more ways to add in support (especially in the intro courses), making sure students know where to find support, raising the bar on core classes...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could also be the case that the pre-reqs listed for your course aren't actually enough, and that you need to add another pre-req class or two to make sure your students are prepared.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If it's the former (your students are capable but simply aren't motivated), then here are some thoughts:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;We have tried things like offering a bit of extra credit for turning it in on time or going above and beyond on the assignment&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Offering extra credit for going above-and-beyond is entirely normal and expected, but I think offering extra credit for turning assignments is counter-productive: it sets the expectation that turning in assignments late is ok, further normalizing that behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, if you're lenient about lateness, it would be stupid for a student to &lt;em&gt;not&lt;/em&gt; take advantage of that leniency. The student is probably pretty busy/juggling a bunch of classes and other responsibilities, so naturally they'd want to use whatever advantage they can get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I would institute a strict no-late-work policy (perhaps with some mild leniency -- give students a fixed number of late days they can use or something).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Attempt to do more than just the bare minimum.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Same sort of thing as before -- if you're a busy student, then it makes sense that you'd do only the bare minimum needed to pass the class. In particular, the students probably aren't thinking of the work they need to turn in as the &quot;bare minimum&quot;: they're probably thinking they're turning in exactly what's expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case, one thing you can do is to raise your expectations. Make the assignments harder, or (if there's room for creativity on the assignments) show students examples of good projects other students have completed in the past. Maybe tell students that they're required to complete at least one item from the &quot;above and beyond&quot; section (though they're free to chose which one they want to do). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also perhaps try motivating the students in other ways by explicitly telling your students that the purpose of this class is to help them build a portfolio they can show employers so they should put their best foot forward.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making the assignments more interesting, as ctrl-alt-delor suggests, would also help. Making your assignments group-work might also help (and help partially compensate for the added difficulty).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Listen to feedback for on-going assignments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Getting students to listen to feedback is always challenging. I would first double-check that:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You aren't overwhelming the students with feedback -- if you give too much, they tend to ignore it altogether (I learned this the hard way).&lt;/li&gt;&#xA;&lt;li&gt;The students are actually aware that they're given feedback, and that they're expected to read it. I'm not sure how exactly you're returning feedback, but if it's through some website, perhaps that website's UX is bad.&lt;/li&gt;&#xA;&lt;li&gt;They're aware that the feedback contains info they're supposed to apply/contains warnings of things you're going to continue deducting points for.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Beyond that, I suggest telling the students about the &quot;growth mindset vs fixed mindset&quot; thing, as ctrl-alt-delor expects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A somewhat more blunt tactic would be to modify each assignment (apart from the first one) and ask students to answer a question about their feedback -- something like &quot;&lt;em&gt;Summarize the feedback you were given on the last assignment. How did you apply what you learned while reading that feedback on this current assignment?&lt;/em&gt;&quot;. Basically, force them to at least think about their feedback, instead of avoiding it.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-09-19T16:44:52.860" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3664" PostTypeId="2" ParentId="3656" CreationDate="2017-09-19T18:33:46.560" Score="3" Body="&lt;p&gt;I'm worried that you may be diagnosing the problem incorrectly. Of course, I don't know the exact situation you have and am trying so recommend based on incomplete information. But you give a few hints. I think the most important one is that the course is for upper level &lt;s&gt;graduate&lt;/s&gt; students. &lt;s&gt;You don't, however, say whether many of them are involved in research and their dissertations/theses. If that is the case they are expected to rigidly prioritize their time, I think, and little you can do will change that.&lt;/s&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Changes to the question invalidate some of my concerns, but the basic recommendation remains the same - learn more about who you are teaching. See below:&lt;/em&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, and more important, I think you need to find out what is really going on. You have asked a question here where &lt;em&gt;we&lt;/em&gt; have little information, but have you asked the students themselves? Feedback &lt;em&gt;from&lt;/em&gt; the students is just as important as feedback to them. There is probably nothing that prevents you from developing a mid-course evaluation that students fill out - in class if necessary. It needs to be anonymous and it needs to have at least a few open ended questions so that you can get a feel for why they behave as they do. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What do they think of the course?&lt;/li&gt;&#xA;&lt;li&gt;What do they think of how it is taught? &lt;/li&gt;&#xA;&lt;li&gt;What helps do they need beyond what you are doing now? &lt;/li&gt;&#xA;&lt;li&gt;Is the course a benefit or a hinderance to their current goals? &lt;/li&gt;&#xA;&lt;li&gt;How important is &quot;building a portfolio&quot; to &lt;em&gt;them&lt;/em&gt;. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I note that if you or the professor thinks that the students are &quot;just like you&quot; then you are probably mistaken. That is an error that leads to a lot of trouble. Instead, assume they are &lt;em&gt;nothing&lt;/em&gt; like you and then try to discover who they really are. Speaking personally, it took me years to absorb that lesson.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you know more, you can devise a plan. It may involve motivational steps, but it might actually involve not holding the course in the future if there are too many competing student goals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would agree with some of the other answers here, but disagree with others. Some of them sort of say &quot;put the stick about&quot;. Those are more likely to increase frustration than motivation. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-19T20:07:16.890" LastActivityDate="2017-09-19T20:07:16.890" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3665" PostTypeId="2" ParentId="3656" CreationDate="2017-09-19T22:51:50.907" Score="5" Body="&lt;p&gt;The other answers are already very good, but I wanted to offer another suggestion:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Students need to start smaller, and work in smaller increments.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To oversimplify: students should start in Pong. Their first homework should be to make a simple change to Pong. You need to make sure every student understood the setup, expectations, and processes involved in that homework before you move on. Then ramp up from there, but make sure you work in small increments. Each step along the way, make sure you aren't losing students, and leave some room for review and getting everybody on the same page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I gather that the literal Pong step might have taken place in a prerequisite class, but my point is that you can't dump students into a complicated project, know that they aren't following the homeworks, but continue expecting more complicated tasks from them every week. If a student couldn't do the assignment from 3 weeks ago, they certainly aren't going to be able to do this week's assignment, no matter how &quot;motivated&quot; they are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you said that 85% of your students were getting As, and 15% were getting Cs or Fs, then I'd agree that you might have a problem of motivation. But since your ratio is reversed, and 85% of your students are getting Cs and Fs, I think it's time for you to take a harder look at your lessons and expectations. It sounds like you're asking too much, and trying to build on milestones that haven't been met yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully it's not too late, and you can salvage the semester by going back to basics. When did you lose students? Start there. Maybe split that assignment into multiple steps, and have them do those steps one at a time. Every step of the way, your job is to make sure that students are looking at something they can handle. Keep it as simple as possible- this might be simpler than you or the teacher (or even the students) think is interesting. But keep working forward in small steps until they've built something larger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; If you're already doing all of the above, and you're sure that the students understand the assignments, and you're already working in small incremental steps and you're &lt;strong&gt;sure&lt;/strong&gt; that the students are just being lazy...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You might have students demo their work.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a big homework assignment, spend half a class period having the students come to the front of the room and show off their projects. You could even have students vote in different categories: best game, funniest, best art, etc. A little bit of competition goes a long way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Or you could mix your homework assignments with &quot;real life&quot; &lt;a href=&quot;https://en.wikipedia.org/wiki/Game_jam&quot; rel=&quot;nofollow noreferrer&quot;&gt;game jams&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're unfamiliar, a game jam is a &quot;contest&quot; (usually with no prizes) where participants have a certain amount of time (usually a weekend or a week) to make a game around some theme that's announced at the beginning of the event.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.indiegamejams.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a list of ongoing game jams, and &lt;a href=&quot;https://itch.io/jams&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; is a similar list just for itch.io game jams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is that the assignment would be to participate in whatever game jam you choose, using the topics you discussed in class. My guess is that this would be much more motivating than a &quot;regular&quot; homework assignment.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-09-19T23:31:38.403" LastActivityDate="2017-09-19T23:31:38.403" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3666" PostTypeId="1" CreationDate="2017-09-20T20:09:38.837" Score="8" ViewCount="237" Body="&lt;p&gt;In working with a gifted student, I would like to set up an opportunity for him to learn some material and present it to the class.  How could such an activity be structured so that the presentation would be successful for him and for the rest of the class without becoming an unreasonable time-sink for the teacher?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For context, this is in a US-based high school, and the course is in theoretical computer science (the class is given the year after AP Computer Science A).&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-09-25T10:05:19.667" Title="Gifted Student Presentations" Tags="|student-motivation|differentiation|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3667" PostTypeId="2" ParentId="3666" CreationDate="2017-09-20T20:27:40.970" Score="2" Body="&lt;p&gt;The simple way is for the two of you to come up with one of the future topics that will occur in due course. Work with him to develop a lecture, just as you would work alone to develop it normally, but with both of you present. He then presents the lecture himself. Be sure to anticipate questions that other students will ask so that he is prepared for that and can be flexible. Preparing notes for the talk using a &lt;a href=&quot;https://cseducators.stackexchange.com/a/1168/1293&quot;&gt;Hipster PDA&lt;/a&gt; might be especially useful and would in addition demonstrate that technique. At one time college debate teams used this concept to prepare. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The somewhat more complex way, but which would be easier on some students, is to prepare just as suggested above, but then team-teach that lecture, with each of you responsible for some part of the process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, the best way is to &lt;em&gt;pair-teach&lt;/em&gt; the lecture. This is a concept that a colleague and I developed. One of you (likely the student) starts the lecture. The current person is the &lt;em&gt;driver&lt;/em&gt; and is in control. The second person is the &lt;em&gt;navigator&lt;/em&gt; and is responsible for watching over the process in an aware way. If there is any stall in the action, perhaps a student question, the roles switch, with the navigator taking the lead and the former driver watching over. One of the tasks of the navigator at any moment is to be aware of the class response to the driver's words/actions and can step in whenever there seems to be puzzlement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either of the second two methods makes it easier for first time lecturers, since they know you &quot;have their back&quot; if things get tight. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've experienced the first of these as an undergraduate and used the two others in teaching, the last one extensively. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A somewhat lesser idea is to prepare for a topic not normally in the course and prepare for it. A good time for the presentation may be on the &lt;em&gt;last day&lt;/em&gt; of the course, especially when the final exam has already happened. Tension may be less and you often need something go pique the interest of the class on the last day anyway. Any of the three methods suggested above could be used, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would personally choose the method based on the personality of the person and his relation to his fellow students. If it is especially open and friendly, the first might be less fraught/scary than otherwise. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You can use face to face contact (office hours) or email, etc., to develop the lecture. You can give the student an outline, or ask for one instead. Lots of variation is possible, but you want some sense that the student is well prepared both technically and personally. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-21T11:38:32.967" LastActivityDate="2017-09-21T11:38:32.967" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3670" PostTypeId="1" CreationDate="2017-09-21T16:24:45.127" Score="7" ViewCount="364" Body="&lt;p&gt;My instruction time has specified breaks, but often the students do not take them, even if I urge them to. This results in them working and listening to my instruction while they are overdone. I tell them this is a marathon, not a sprint, and they will have the rest of their lives to sit in a chair in front of a keyboard, but they do not take the break, or they get a sip of water in the hallway and sit back down. This is impeding their learning and making them unhealthy (&quot;Sitting is the new smoking&quot;, right?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you found any effective ways to get students out of the chair to take their full breaks, other than having them take up smoking (thus defeating the purpose) or yelling Fire?&lt;/p&gt;&#xA;" OwnerUserId="3092" LastEditorUserId="27" LastEditDate="2019-04-10T19:54:00.420" LastActivityDate="2019-04-10T19:54:00.420" Title="Giving Students a Break" Tags="|student-motivation|adult-education|classroom-environment|" AnswerCount="4" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3671" PostTypeId="2" ParentId="3670" CreationDate="2017-09-21T16:57:00.650" Score="1" Body="&lt;p&gt;If the class isn't too big or too small, you could organize some simple games. You can have a tournament, possibly with prizes. The prize can be as simple as a gold star sticker like the ones elementary school teachers have given out for years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Darts&lt;br&gt;&#xA;Basketball Free Throws&lt;br&gt;&#xA;Baseball/beanbag: &quot;hit a target&quot;&lt;br&gt;&#xA;Frisbee (Ultimate)&lt;br&gt;&#xA;Make a circle of people and throw a few small balls back and forth around it, calling out the name of the recipient as you throw.&lt;br&gt;&#xA;Musical Chairs&lt;br&gt;&#xA;Hand slapping (Pease Porridge hot --  )  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or plan in advance and have people recite some poem - dramatically (weirdly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to get them on their feet doing something together, possibly competitively, but not too competitively. Find something that will make them happy and laugh. Don't just make it free time. Change of pace can also free the mind. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they will be together as a class for a long time you could ask the students for ideas for the activity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If part of their work in class involves teamwork this can have a positive effect on team building as well as getting a bit of exercise. You may not even need &quot;prizes&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, I'm intentionally giving strange examples here, but you know a lot of this stuff from when you were a kid. You can find more online. Many of these games can be adapted to adults. It is hardest to do with teen-agers who are often too self conscious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that PLoP Conferences in the Patterns Community have several sessions of &quot;Game Time&quot; each day. Fun and active. It is one of the main reasons that it &lt;em&gt;is&lt;/em&gt; a community, actually. They often have a special role of &quot;Games Master&quot; to organize it. I've used this idea in intensive courses both to break the ice at the start and to get people doing things together as a team.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-21T17:02:06.347" LastActivityDate="2017-09-21T17:02:06.347" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3672" PostTypeId="1" CreationDate="2017-09-21T20:44:07.270" Score="2" ViewCount="203" Body="&lt;p&gt;Can anyone recommend a good textbook for writing interpreters (not compilers) that &lt;strong&gt;don't&lt;/strong&gt; use languages like Scheme or Haskell? &lt;/p&gt;&#xA;" OwnerUserId="3095" LastEditorUserId="1293" LastEditDate="2017-09-21T21:18:49.560" LastActivityDate="2017-09-22T12:15:35.237" Title="Is there a good textbook for writing an interpreter in an imperative language?" Tags="|resource-request|textbook|" AnswerCount="1" CommentCount="3" ClosedDate="2017-09-22T23:59:12.177" ContentLicense="CC BY-SA 3.0" />
  <row Id="3673" PostTypeId="2" ParentId="3672" CreationDate="2017-09-21T21:18:11.670" Score="0" Body="&lt;p&gt;For the &quot;intermediate code&quot; version of an interpreter there is no finer example in a small book than &lt;a href=&quot;https://www.abebooks.com/book-search/isbn/0130830984/&quot; rel=&quot;nofollow noreferrer&quot;&gt;On Pascal Compilers&lt;/a&gt; by Per Branch Hansen. You need to be able (or a least willing) to read Pascal of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This book is a rare instance of CS Literature. Hansen is one of the masters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way the code in the book is developed you actually see the difference between compiling and interpreting as he does &quot;code generation&quot; to an intermediate language and then provides a separate interpreter for that language. So you see what you need to do to get to the point at which interpretation is efficient and then see how the interpreter part actually works. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The book is out of print. Check around for a used copy. &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0130830984&quot; rel=&quot;nofollow noreferrer&quot;&gt;Amazon&lt;/a&gt; currently has it a bit cheaper than Abe Books. If you have a good University Library nearby they may have it. You might also be able to get a copy from interlibrary loan that is supported by most libraries. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-22T12:15:35.237" LastActivityDate="2017-09-22T12:15:35.237" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3675" PostTypeId="1" CreationDate="2017-09-22T18:15:58.553" Score="3" ViewCount="199" Body="&lt;p&gt;Delegates are strange beasts (think Pointers with aspirations) and I was planning to introduce them using a physical metaphor: a power strip. The power strip connects to an 'event' (wall socket) and has a 'signature' (the interface of the plug shape and parameters) and provides connectivity to multiple event-handlers (the sockets in the strip), but it doesn't actually &quot;do anything&quot;. Other examples would be a USB Hub and a Network Switch (different 'signatures' / plug and socket interface). Delegates can be used for &lt;em&gt;any&lt;/em&gt; sort of event situation, not only the Windows GUI, so they are a fairly open-ended idea. (&quot;Can you say 'abstract'? I knew you could.&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gives something that students can visualize for the terms of a Delegate: what it connects to, how it can provide for multi-cast events, and how methods connect to it. Does this seem like it will work, or is there a better way to introduce this highly abstract yet necessary programming concept?&lt;/p&gt;&#xA;" OwnerUserId="3103" LastActivityDate="2017-09-27T17:11:06.123" Title="Physical analogy to introduce a Delegate in .Net programming" Tags="|lesson-ideas|teaching-analogy|abstraction|.net|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3676" PostTypeId="2" ParentId="3675" CreationDate="2017-09-22T18:49:28.730" Score="0" Body="&lt;h1&gt;Link to what they have already learnt on the course.&lt;/h1&gt;&#xA;&lt;p&gt;[I have made an assumption, that they have already done this.]&lt;/p&gt;&#xA;&lt;p&gt;John von Neumann, said it is all data. Data and code are data. We have already learnt to pass data, but what about this other data, the code. We should be able to pass that as well. How can we do it. They are delegate types.&lt;/p&gt;&#xA;&lt;h1&gt;Look at things I can pass to you&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A pen&lt;/li&gt;&#xA;&lt;li&gt;A list&lt;/li&gt;&#xA;&lt;li&gt;A script for Hamlet&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;“Simber and the hiyeners enter stage left …” (from the lion king, a variant of hamlet)&lt;/p&gt;&#xA;&lt;p&gt;What type of object is this? It is a set of instructions. I can pass it around, and ask people to do what it says.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-22T18:49:28.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3677" PostTypeId="2" ParentId="17" CreationDate="2017-09-22T19:56:13.343" Score="-1" Body="&lt;p&gt;Maybe you can start by showing a clip of &lt;em&gt;Groundhog Day&lt;/em&gt;. Explain how his days are constantly in the same loop, and the loop does not end until he &quot;fixes&quot; something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which in programming would be considered a &lt;code&gt;base case&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3105" LastEditorUserId="1293" LastEditDate="2017-09-22T23:09:08.623" LastActivityDate="2017-09-22T23:09:08.623" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3678" PostTypeId="2" ParentId="3675" CreationDate="2017-09-23T00:18:18.817" Score="0" Body="&lt;p&gt;I think your metaphor is currently a bit limited in that it's useful only really in the context of event-oriented programming (and GUIs) and such. After all, delegates are basically anonymous functions and functional programming languages (Haskell, Lisp, etc) make heavy use of anonymous functions to accomplish all sorts of things. (And many mainstream languages do something similar -- see C#'s Linq, for example).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, if you had to give a metaphor, I would reuse whatever metaphor you used to explain objects (or perhaps even use objects themselves as a metaphor!). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all, an object is a bundle of data and methods that we can pass around. Well, sometimes, we're interested in just one method out of that object. In that case, instead of passing around the whole object, can we just pass a single method?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Something I would also consider doing is motivating anonymous functions by introducing basic Linq before moving on to GUIs since it gives your students the opportunity to practice writing code that both creates and uses anonymous functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is, show students a for loop performing some mapping or filtering operation, teach them how to abstract that, then explain that C# already provides two methods that do this: &lt;code&gt;enumerable.Select(...)&lt;/code&gt; and &lt;code&gt;enumerable.Where(...)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can then talk about how the &lt;code&gt;Func&amp;lt;...&amp;gt;&lt;/code&gt; and &lt;code&gt;Predicate&amp;lt;...&amp;gt;&lt;/code&gt; types and so forth work fine for many cases, but that sometimes you need more descriptive signatures (especially when doing things like GUI programming!). Enter delegates.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can feel a little backwards because you're presenting these language features in basically the opposite order they were added to C#, but the students don't have to know that.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-09-23T00:18:18.817" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3679" PostTypeId="1" AcceptedAnswerId="3709" CreationDate="2017-09-23T22:49:16.733" Score="9" ViewCount="260" Body="&lt;p&gt;If a high school math or science teacher was going to begin teaching computer science, what do they need to know? I know of many teachers given this responsibility without any training for it. Since most states in the U.S. do not have a computer science certification, new teachers are often left on their own to prepare. A number of one week summer courses exist, such as those provided by the college board, but this is grossly inadequate for a new computer science teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we were to design an ideal course of studies to take a teacher with little to no programming experience and prepare them to teach a course like AP Computer Science, what should that program include? This question is not just theoretical since programs are currently being designed where none exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here I am looking for two types of answers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you are familiar with an excellent program, what does it include?&lt;/li&gt;&#xA;&lt;li&gt;If you are teaching computer science, what courses do you wish you took before teaching CS and why?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2197" LastEditorUserId="2197" LastEditDate="2017-10-02T13:01:32.787" LastActivityDate="2017-10-06T18:33:21.273" Title="What does a certification program for CS high school teachers need to include?" Tags="|curriculum-design|adult-education|ap-computer-science-a|" AnswerCount="3" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="3680" PostTypeId="2" ParentId="3666" CreationDate="2017-09-24T10:32:43.723" Score="3" Body="&lt;p&gt;I did what the OP is describing for all of my students during the month following the AP CS exam in the U.S. Students were given a list of potential topics to research and then present. I also gave students some things the presentation needed to include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;At least two original examples (in code)&lt;/li&gt;&#xA;&lt;li&gt;Well formatted and commented code&lt;/li&gt;&#xA;&lt;li&gt;References useful for learning more about this topic&lt;/li&gt;&#xA;&lt;li&gt;Some context to explain how or why this topic is useful&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Students shared their presentation with me before delivering it to the class and I didn't need to spend much time outside of class working on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since students had spent a year with Java, but actually covered very little of the language and standard libraries, some of the topics given involved delving deeper:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using Threads and Runnable to handle concurrency&lt;/li&gt;&#xA;&lt;li&gt;The Servlet API: creating a basic web application&lt;/li&gt;&#xA;&lt;li&gt;Pick another language on the JVM and learn enough to demonstrate it&lt;/li&gt;&#xA;&lt;li&gt;Lower level network code in Java: UDP for a chat app&lt;/li&gt;&#xA;&lt;li&gt;Lower level network code in Java: Sockets&lt;/li&gt;&#xA;&lt;li&gt;Parsing XML&lt;/li&gt;&#xA;&lt;li&gt;Parsing HTML from a web page (e.g. stripping out the barometric pressure from a weather.com)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2197" LastActivityDate="2017-09-24T10:32:43.723" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3681" PostTypeId="2" ParentId="3646" CreationDate="2017-09-24T10:54:14.097" Score="2" Body="&lt;p&gt;The &lt;a href=&quot;https://www.manning.com/books/the-well-grounded-java-developer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Well Grounded Java Developer&lt;/a&gt; has an excellent section on concurrency. The author claims that &lt;strong&gt;very few&lt;/strong&gt; developers correctly implement concurrency. As ctrl-alt-delor put it: concurrency is easy; synchronization is hard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, avoiding errors from race conditions and unexpected asynchronous behavior is so difficult that the author recommends developers always use one of the Java 7 library features to implement multi-tasking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have personally found debugging asynchronous code to be &lt;strong&gt;very&lt;/strong&gt; hard. Errors just seem intractable and difficult to reproduce. While the libraries used in the book are Java specific, the reasons for needing those libraries are not.&lt;/p&gt;&#xA;" OwnerUserId="2197" LastActivityDate="2017-09-24T10:54:14.097" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3682" PostTypeId="2" ParentId="3646" CreationDate="2017-09-24T11:04:46.003" Score="3" Body="&lt;p&gt;Since the OP asked about functional programming, so I would highly recommend you to read &quot;&lt;a href=&quot;https://www.packtpub.com/application-development/learning-concurrent-programming-scala&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learning Concurrent Programming in Scala&lt;/a&gt;&quot; by Aleksandar Prokopec, (2014). All the examples for this book are &lt;a href=&quot;https://github.com/concurrent-programming-in-scala/learning-examples&quot; rel=&quot;nofollow noreferrer&quot;&gt;available on GitHub&lt;/a&gt; to give you some idea of the book before you purchase it. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;C#&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I would recommend you to read &quot;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0470495995&quot; rel=&quot;nofollow noreferrer&quot;&gt;Professional Parallel Programming with C#&lt;/a&gt;&quot; - its based on .Net 4.0 and I have no update about following editions (if any)&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;C++&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I think &lt;a href=&quot;https://www.elsevier.com/books/an-introduction-to-parallel-programming/pacheco/978-0-12-374260-5&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pacheco's book&lt;/a&gt; would be my recommendation for sure&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="2537" LastEditorUserId="2537" LastEditDate="2017-09-24T11:12:02.140" LastActivityDate="2017-09-24T11:12:02.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3683" PostTypeId="2" ParentId="3666" CreationDate="2017-09-25T10:05:19.667" Score="1" Body="&lt;p&gt;Although &quot;gifted&quot; is broad, it has been made far too clear that potential (implied by the student being gifted) is not enough. They need intrinsic motivation. This is fairly straightforward: The only way to make such an activity work is to get the student to be enthusiastic about some field &lt;strong&gt;of their choosing&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many gifted students have ADD\ADHD (Correlation, and not causality), which means that sitting with them to get them started is no easy task. But it can be done by appealing to their strengths. If they have shown special affinity or liking of some field or subject, or have been &quot;always interested in ...&quot;, then one should start by suggesting that field or subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the student seems interested, one should proceed with explaining that research is a necessary part of the activity. From this point the student should be fairly independent, and the teacher should only be checking in from time to time. (obviously a deadline should be set...)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;From the other side of this process, it's up to the teacher to decide whether to tell the rest of the class about the presentation. Personally I wouldn't tell the class (that keeps it a &quot;surprise&quot;). &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;After learning the material, the gifted student should make a presentation (depending on the field or material chosen, perhaps an example\demonstration would be useful). Here the teacher should make it quite clear that the rest of the class are not as immersed in the material (if at all), and so the presentation should present the key points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a presentation such as that, the rest of the class get the basics and core ideas of the material and the gifted student learns a very, very important skill: presenting something they are fully immersed in to people who have no knowledge in the subfield. They learn how to remove unneeded details and keep only the points that don't require a whole lot of other details. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This skill is somewhat scarce among enthusiastic and motivated gifted students.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-09-25T10:05:19.667" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3684" PostTypeId="1" CreationDate="2017-09-25T10:20:47.420" Score="8" ViewCount="157" Body="&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt; I will be a teaching assistant in a course on &quot;Interactive Systems&quot; with the following learning goals for the students.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Analyze and criticize user interfaces&lt;/li&gt;&#xA;&lt;li&gt;Identify and describe important subsystems in the interaciton loop&lt;/li&gt;&#xA;&lt;li&gt;Implement efficient user interfaces from sensors and actuators&lt;/li&gt;&#xA;&lt;li&gt;Prototype interactive computer-implemented products&lt;/li&gt;&#xA;&lt;li&gt;Evaluate and judge user interface designs with respect to usability&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I will be teaching computer science students and students from a programme called &quot;IT&quot; which focuses on protoyping, programming, and design. Both groups are second year university students. Having recently graduated with a master's degree in computer science myself, I know from experience and from fellow students that courses on these topics are not appreciated (some loathe them to the point of bullying others for liking them). From speaking to the IT students, I know that they see these courses as simple, but essential to their further education. So I am, roughly speaking, standing with two groups of students: One that would rather be anywhere else on Earth, and one that thinks the course is fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, as part of a course on teaching I have been asked to prepare a mini teaching session. I have decided on the goal for this session to be for the students to reflect on the role of interaction design and usability evaluations in a larger frame - for instance, what relations they have to database administration or to developers. I am hoping to motivate the students to see what their own future role could be, should they choose to go down that path, and otherwise to understand that it does play an important part along with the things that do interest them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question is:&lt;/strong&gt; &lt;em&gt;Do you have suggestions for examples that I could provide them with, such as case studies of software development processes, or can you think of good arguments to put forth?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Other comments are also very welcome!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(I have always been interested in usability and user experience, so I would especially like answers from people who might feel less interested and therefore understand my future students better)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I am not just looking for examples of good/bad end results but also of the design/development process, to showcase e.g. how interaction design relates to programming/development.&lt;/p&gt;&#xA;" OwnerUserId="3117" LastEditorUserId="3117" LastEditDate="2017-09-26T13:45:20.043" LastActivityDate="2017-09-26T13:45:20.043" Title="Teaching interaction design to potentially disinterested students" Tags="|student-motivation|gui|" AnswerCount="2" CommentCount="7" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3685" PostTypeId="2" ParentId="3684" CreationDate="2017-09-25T11:56:32.410" Score="2" Body="&lt;h1&gt;Engagement&lt;/h1&gt;&#xA;&lt;p&gt;Get them hooked. Find interest for them.&lt;/p&gt;&#xA;&lt;p&gt;Give them some software, and real life items, that have poor user interaction. Have them use them, and then tell you and the class, what they think of them. What they would to to improve them.&lt;/p&gt;&#xA;&lt;p&gt;The book &lt;em&gt;The Inmates Are Running the Asylum&lt;/em&gt; — Alan Cooper, has some very good real-world and software examples. Including:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Doors with pull handles, and the word &lt;strong&gt;PUSH&lt;/strong&gt;. Can you guess what people do?&lt;/li&gt;&#xA;&lt;li&gt;Some software bundled with a scanner that had only 3 features, compared with the 1000s in the competitors (want to be adobe) product. It was described as the most feature rich product in its class (it had 3 features, that worked, and were easy to use. That is 3 more than the competitors).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Designing interfaces is boring for a programmer (it is the job of the artists). However “user interaction design” is not. User interaction design goes deeper, it is not about slapping an interface onto a poorly design think. It is about designing it from the ground up to be easy to use.&lt;/p&gt;&#xA;&lt;p&gt;Computer programming is about two things. The computer, and the humans. Most of the courses are about the computer. However we also learn high-level languages, and how to write programs that are easy to read and maintain (closer to the human). We also need to get closer to the users. By making it easier for them.&lt;/p&gt;&#xA;&lt;h1&gt;Databases&lt;/h1&gt;&#xA;&lt;p&gt;From a database point of view. Imagine a database application with a simple elegant interface, easy to use, but no join. How imagine trying to find some info. Do a query, write the result to to some paper, do another query copying data from paper. However with joins, we don't need to do the remembering for the computer.&lt;/p&gt;&#xA;&lt;p&gt;Computers should not make us have to remember stuff. Computers are much better at remembering that we are.&lt;/p&gt;&#xA;&lt;h1&gt;Get them screaming at examples of bad stuff from the “Experts”&lt;/h1&gt;&#xA;&lt;p&gt;Which button do you press to cancel? Clue: it is not cancel.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/Q5yPq.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Q5yPq.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Types of easy: There are two types of easy to use: for the first-times / casual user; for the expert, that uses it regularly. Making it easy for the first-timer, will often make it harder for the expert (often having to work much harder, click, click, click).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-25T21:11:10.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3686" PostTypeId="2" ParentId="3684" CreationDate="2017-09-25T13:07:08.113" Score="1" Body="&lt;p&gt;I train full stack development and that includes user interfaces (which falls under if not cover the entire gamut of interaction design).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to examples, I talk about the infamous case of how Microsoft screwed up Windows 8. I use Windows 8 because  a lot of people are familiar with it and may have actually used it. Or at least read about it. Or at least read about the many, many jokes made at windows 8's expense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use Windows 8 as an example how badly even a big company like Microsoft can screw things up, and the kind of impact it is going to have on users. Then, you can follow and reveal how Microsoft learnt from their own mistakes and fixed things with Windows 8. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always use this in my UI classes, and it elicits a lot of interest, familiarity and some fun stuff.It also seems to drive the point home. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2017-09-25T13:07:08.113" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3687" PostTypeId="2" ParentId="3670" CreationDate="2017-09-25T23:12:23.070" Score="2" Body="&lt;p&gt;Breaks? I'm in highschool (not an adult) and I'd be kind of offended if someone told me to go &quot;take a break&quot;, &lt;em&gt;especially&lt;/em&gt; in an elective - I took this course to learn, not to get told that &quot;sitting is the new smoking&quot;. You're wasting their time. (Also, don't assume your students spend their whole day sitting - a not insignificant number of them probably work out or do some form of activity during their day. No need to force it on them!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, that being said - you don't need to rely on breaks to get people up and moving! There's activities for illustrating different sorting algorithms by having people stand in a row and shuffle themselves according to the algorithm; there's activities for &quot;programming&quot; each other, there's activities for just about anything you want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These have the bonus of helping the information stick in the mind of the student (&quot;remember that time we programmed Joe so that he walked into a wall?&quot;) and, most importantly, having actual substantive content - that is, not wasting student time.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-09-25T23:12:23.070" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3688" PostTypeId="2" ParentId="3675" CreationDate="2017-09-26T06:19:23.690" Score="1" Body="&lt;p&gt;I know that you are looking for a physical analogy, but I'd say I agree with @ctrl-alt-delor about the 'link to what they already know' part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually start by introducing a simple algorithm, then show how that algorithm can be parameterized. Then we move on to OO, where I discuss how an algorithm can be parameterized with not just a value, but with a piece of code (i.e. creating an interface, and passing an implementation of that interface to a method). For the interface, I always use an analogy like USB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then we move on to the delegates, where I introduce delegates as if they were an interface with one method, &lt;code&gt;Invoke()&lt;/code&gt;, and whatever you pass to the delegate gets called in that &lt;code&gt;Invoke()&lt;/code&gt; method. Then we move on to delegate internals (how they are immutable, and multicast etc.) I also have examples and practices that we do to show them that every solution that uses a delegate can be translated into a more OO version using interfaces (again, referring back to interfaces).&lt;/p&gt;&#xA;" OwnerUserId="279" LastActivityDate="2017-09-26T06:19:23.690" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3689" PostTypeId="2" ParentId="3646" CreationDate="2017-09-26T10:27:50.320" Score="2" Body="&lt;p&gt;One book I have enjoyed is &lt;a href=&quot;http://greenteapress.com/wp/semaphores/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Little Book of Semaphores&lt;/a&gt; by A. Downey. It is free (in both senses of the word) and contains many problems with hints and solutions that can be used as starting points for small group projects (e.g., to implement such a solution in a modelling tool or to generalise it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have only used the conceptual chapters, but the book also contains chapters on synchronisation in Python and C.&lt;/p&gt;&#xA;" OwnerDisplayName="user24" LastActivityDate="2017-09-26T10:27:50.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3690" PostTypeId="2" ParentId="3670" CreationDate="2017-09-26T10:44:02.833" Score="3" Body="&lt;p&gt;I don't understand all the hate this question is getting. I'm guessing the answers depend on the context a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Context of my answer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I regularly hold company trainings. Adult education. These are full day IT trainings, that means 9 AM to 5 PM. In the contract we offer 90 minute blocks with 15 minute breaks between and a 45 minute lunch break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Importance of breaks&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A break is &lt;strong&gt;not&lt;/strong&gt; a waste of time. Researchers disagree on the amount of time an average human can uphold focused attention for, but all agree it is measured in minutes. I have learnt 4-5 minutes at the university, and I have read some researchers claiming it to be up to 20 minutes. But you can't expect an average human to uphold focused attention for hours at an end. It is possible to renew attention, this is where the teacher comes in by changing the rhythm, the tone, the visualization, the exercise. But from time to time, breaks are needed. (The 8 second attention span you hear about is different, it is the burst attention span or whatever it is called.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not just the attention though, but moving/stretching as well. Most workplaces have recommendations, and though there are slight variations, most revolve around the &quot;work for 60 minutes, get up and move for 15&quot;. This is not only beneficiary to the health of the individual, but also (many studies point this out) improves work performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Answer to the original question&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My actual answer is: explain to them why breaks are important, explain to them how getting up, stretching, moving can help them concentrate, but don't try to force them to do so. If sitting is the new smoking, then dealing with it is similar: you can't just forcefully take the cigarette out of their hands. They know their own bodies and what type of break refills them. And they will learn the importance of breaks the hard way.&lt;/p&gt;&#xA;" OwnerUserId="51" LastActivityDate="2017-09-26T10:44:02.833" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3691" PostTypeId="1" CreationDate="2017-09-26T13:53:45.937" Score="5" ViewCount="214" Body="&lt;p&gt;If you ever had a class right after lunch break, you know what this question is about. (Student's stomachs full, computers murmuring, room half-lit, teacher droning about something - I don't blame them for falling asleep.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What short, fun exercises do you use to set student's arousal to the optimal level?&lt;/strong&gt; It would be nice if it had something to do with CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not sure this needs a context, but where I usually meet the problem: adult education, all-day-long courses, right after lunch break. The problem is universal though, I think.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="1293" LastEditDate="2017-09-26T14:22:21.933" LastActivityDate="2017-09-27T11:30:52.320" Title="Pick-me-up exercises for after-lunch brain death" Tags="|best-practice|student-motivation|" AnswerCount="3" CommentCount="4" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3692" PostTypeId="2" ParentId="3691" CreationDate="2017-09-26T14:03:17.490" Score="1" Body="&lt;p&gt;One exercise I use sometimes (when I'm desperate):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Scope: Adult education, VBA intermediate course, 2 full days long.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have students stand up, throw plush ball. Whoever gets the ball, has to name a programming keyword from the morning - anything from a variable type to an Excel object to a VBA keyword - and pass the ball on to someone. Must throw the ball, can't just give it to their neighbour.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a minute or two this wakes them up enough for us to be able to go on, and this way we also refresh the morning part of the course a little.&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="51" LastEditDate="2017-09-27T07:48:26.697" LastActivityDate="2017-09-27T07:48:26.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3693" PostTypeId="2" ParentId="3691" CreationDate="2017-09-26T14:21:42.393" Score="2" Body="&lt;p&gt;Some conferences actually have &quot;nap time&quot; right after lunch. Let people nap if they like or catch up on outside tasks. Such conferences are usually residential, of course, so a nap is a real option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lecture immediately after lunch is going to lose a lot of people, as you say. Your teaching should account for human nature of course. But an active learning session - say role playing an algorithm - might work. If you have to hit them hard for the complete two days (no naps, no games), make sure that it isn't all just lecture and powerpoint. They will be too passive and will zone out too often. Break it up: lecture, discussion, exercises, role-play, feedback, pairing, group work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even a discussion session after lunch would be better than a lecture. You can pose a question to the class about some related topic, preferably one that might generate some differences of view. It could even be somewhat orthogonal to the topic of the course. If the course is about programming, make the question about software process. A simple strategy to start might be to elicit their experiences in development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't win, nor do they, if you lecture beyond their point of caring. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-26T14:21:42.393" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3694" PostTypeId="2" ParentId="3691" CreationDate="2017-09-27T11:22:41.037" Score="2" Body="&lt;p&gt;&lt;a href=&quot;http://csunplugged.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; has some good active learning stuff, and all relating to computer science.&lt;/p&gt;&#xA;&lt;p&gt;Computer science is as much about computers, as poetry is about pens. Therefore only use the computer where it adds benefit. CS unplugged, is an initiative to teach computer science, without the use of computers. It is mainly focused at primary schools, but I have used it in senior school. (If they are successful at teaching all pupils at primary school, then we will have to find other activities.)&lt;/p&gt;&#xA;&lt;p&gt;I have use some of the activities on cs unplugged. Not after lunch, but just because they are good activities.&lt;/p&gt;&#xA;&lt;p&gt;I have in my teacher pack some basic materials that allow me to teach a range of these activities.&lt;/p&gt;&#xA;&lt;h1&gt;Example …&lt;/h1&gt;&#xA;&lt;p&gt;An easy one that takes little preparation, except purchasing a pack of playing cards, is: sorting algorithms.&lt;/p&gt;&#xA;&lt;p&gt;One pack of cards can be used for 4 groups of 2 to 4 students (so up to 16 students), but sometimes you want them to use more cards, see below.&lt;/p&gt;&#xA;&lt;p&gt;Separate out one suit of cards for each group. If they don't know cards well, then remove J,Q,K. And shuffle cards (or get students to do it).&lt;/p&gt;&#xA;&lt;p&gt;Now as a class get one pupil to sort cards. Watch what they do, and identify the algorithm that they used [usually insertion, or selection]. Tell them that they just did … sort.&lt;/p&gt;&#xA;&lt;p&gt;Then break them into groups, and get them to experiment, what algorithms can they find. Tell them to sort a whole pack, this it to put enough pressure on them, to have to find a better way to do it.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-27T11:30:52.320" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3695" PostTypeId="1" CreationDate="2017-09-27T13:06:37.743" Score="5" ViewCount="213" Body="&lt;p&gt;At my school the students learn some very basic javascript, and a while ago it was decided to expand on that (by teaching nodejs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;by &quot;basic&quot;, I mean that we only teach html manipulation through JS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have two options for going about it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Just teach javascript (es6 modules included)&lt;/li&gt;&#xA;&lt;li&gt;introduce TypeScript and all that comes with it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This decision is important because of the students familiarity with java. TypeScript offers more similarity to Java (what with it having, em, &lt;strong&gt;types&lt;/strong&gt;, and all), but it is more complicated to teach than just sticking to javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This decision is influenced greatly by the fact that the students are familiar with Java, which means it has to be a big factor in the choice we make. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally, no method is &quot;better&quot; than another, but some methods would teach the students valuable skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, &lt;strong&gt;which skills (and how significant are those skills) would the students learn, should we teach with typescript, instead of just javascript?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-03-05T15:50:43.363" Title="Advantages of teaching basic javascript through typescript" Tags="|secondary-education|language-choice|javascript|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3696" PostTypeId="1" AcceptedAnswerId="3697" CreationDate="2017-09-27T16:36:40.920" Score="38" ViewCount="7770" Body="&lt;p&gt;I was recently reading a new, and mostly excellent, magazine &lt;a href=&quot;https://helloworld.raspberrypi.org/issues/3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hello, World&lt;/a&gt;. There is an article on teaching &lt;code&gt;goto&lt;/code&gt;. The author states that there is value in teaching &lt;code&gt;goto&lt;/code&gt;, as it helps to translate flowcharts into code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have always considered &lt;code&gt;goto&lt;/code&gt; to be harmful. It results in code that is buggy and hard to read. Not just because I read it in a 1960 paper “Go To Statement Considered Harmful“ — Edsger W. Dijkstra, but because it is self evident (once you have tried structured-programming).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have always considered flow-charts the same way. They are just the pictorial form of unstructured code (The UML of assembly language).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does the author have a point? Is there some value in &lt;code&gt;goto&lt;/code&gt; or flow-charts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I accept that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Flowcharts are visual, but there are visual structured representations that are better.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;goto&lt;/code&gt; can/has-to be used in teaching assembly language/machine code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;One of many links to the paper “&lt;a href=&quot;http://www.dcs.gla.ac.uk/~pat/cpM/choco3/cpM/nqueens/Goto-Harmful-Dijkstra.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Go To Statement Considered Harmful&lt;/a&gt;”&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-10T22:16:23.710" LastActivityDate="2017-12-03T15:14:31.647" Title="Is there any value in teaching goto statement or flowcharts?" Tags="|flowcharts|goto|" AnswerCount="16" CommentCount="22" ContentLicense="CC BY-SA 3.0" />
  <row Id="3697" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T17:06:07.897" Score="5" Body="&lt;p&gt;If you are teaching assembly code or maybe Fortran then probably you need to discuss &lt;code&gt;goto&lt;/code&gt; and possibly flow charts. However, if you are teaching a modern high level language, even something as old as Pascal, you should probably avoid them other than as an historic curiosity. This was settled almost 50 years ago, actually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along with some other illuminati of CS, David Gries has always used the term &quot;flaw chart&quot; for the classic diagraming technique. It is too easy with such tools to create unmaintainable code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a form of &lt;em&gt;Structured Flow Chart&lt;/em&gt;, however, which is not much different from, say, Pascal. It has no arrows, but, basically, only containment and sequencing of structures. But even that is probably just a waste of time as the constructs of modern languages make it unnecessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you are programming in a language that requires &lt;code&gt;goto&lt;/code&gt; however, you should probably only use structures like &lt;code&gt;if-then&lt;/code&gt; and &lt;code&gt;while-do&lt;/code&gt; that have been proven to be sufficient and also result in better (maintainable, understandable) code. Just Say No. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, there is one reason for teaching &lt;code&gt;goto&lt;/code&gt; to students of modern languages. If those languages permit &lt;code&gt;goto&lt;/code&gt; then eventually the student will need to read programs that contain them even if they don't write such programs. So, purely as a defensive measure, they should know how to interpret these programs even as they disparage the authors of those programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a story from the past that is illuminating. In the old days IBM had a company policy that every program had to be documented with flow charts. However, they also had a tool that would create a flow chart from a Fortran program. So, the program was written, then the tool produced its flow chart, often spread over many, many pages. But the policy was satisfied. But, as a design tool, no. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See: &lt;a href=&quot;https://en.wikipedia.org/wiki/Considered_harmful&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Considered_harmful&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-27T19:47:36.440" LastActivityDate="2017-09-27T19:47:36.440" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3698" PostTypeId="2" ParentId="3675" CreationDate="2017-09-27T17:11:06.123" Score="-1" Body="&lt;p&gt;If you've talked about interfaces, you can simply say that a delegate is like an interface for a single method. Interfaces are &quot;implemented&quot; by classes; delegates are &quot;matched&quot; by methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Physically, if an interface is a contract that can be fulfilled (implemented) by a party (class), a delegate is simply a term (of a contract).&lt;/p&gt;&#xA;" OwnerUserId="3127" LastActivityDate="2017-09-27T17:11:06.123" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3699" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T18:57:52.820" Score="61" Body="&lt;p&gt;I am the author of the article. The point is to simplify the model of computation, not to match flow charts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for mixed-ability 12 year olds, and when I say mixed, I mean some still add single digit numbers using their fingers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Flow charts work because you can easily jump to another point in the program. This is not software engineering. I want them to create software where they understand how it works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Goto also more closely mirrors the processor: it's easier to describe how programs are translated. After all, there is no such thing as structured programming at machine code level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dijkstra's article is a polemic from a purist. There were dissenting views at the time, which gave a more nuanced picture. The Wikipedia page on the article has good links on this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most new programmers shun goto because they have been warned it is evil, bad, and wrong rather than a more considered opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My GCSE students learn structured C++. I myself am a CS grad and was a professional programmer a number of years ago.&lt;/p&gt;&#xA;" OwnerUserId="3129" LastEditorUserId="-1" LastEditDate="2017-09-28T07:15:06.100" LastActivityDate="2017-09-28T07:15:06.100" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3700" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T19:21:46.330" Score="9" Body="&lt;p&gt;I teach them within assembly code.  Otherwise, I mention them within my Java class when I teach their modern-day analogues, &lt;code&gt;break&lt;/code&gt; and &lt;code&gt;continue&lt;/code&gt;.  This is late in my AP course, after the AP test is over.  I present the two statements as restricted versions of &lt;code&gt;JMP&lt;/code&gt; (that's the &lt;strong&gt;6502 Assembly&lt;/strong&gt; syntax for &lt;code&gt;goto&lt;/code&gt;), and I then follow up with two questions.  They get to discuss it out in small groups before we rejoin as a class and go over it together.  This gives them a chance to discover through peer discussion how language &lt;em&gt;restrictions&lt;/em&gt; can really ultimately &lt;em&gt;help us&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;There are several more &lt;code&gt;JMP&lt;/code&gt; statements that break program flow in Java. Can you find any?  &lt;em&gt;(&lt;code&gt;return&lt;/code&gt;, &lt;code&gt;throw&lt;/code&gt;, &lt;code&gt;System.exit()&lt;/code&gt;&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Why, do they suppose, does Java restrict our &lt;code&gt;JMP&lt;/code&gt; capabilities to very specific situations?  What would be the problem with giving us an unhindered &lt;code&gt;jump&lt;/code&gt; command in Java?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-09-28T10:10:24.990" LastActivityDate="2017-09-28T10:10:24.990" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3701" PostTypeId="5" CreationDate="2017-09-27T19:45:18.960" Score="0" Body="&lt;p&gt;The &lt;code&gt;goto&lt;/code&gt; statement is used to transfer control directly from one place in a program to another, often to a &lt;code&gt;label&lt;/code&gt;. Its use was effectively obsoleted when &lt;em&gt;structured programming&lt;/em&gt;. was created around 1965 or so. It is needed in assembly language, which has few if any other ways to transfer control. It is also included in many more modern languages. Even Java has some control transfer statements that are roughly equivalent to a &lt;code&gt;goto&lt;/code&gt;, though with some restrictions (&lt;em&gt;break&lt;/em&gt;, &lt;em&gt;continue&lt;/em&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While &lt;code&gt;goto&lt;/code&gt; statements can be used to implement higher level program logic structures such as &lt;code&gt;if-then&lt;/code&gt; and &lt;code&gt;while-do&lt;/code&gt;, they can also be used to create unreadable and unmaintainable code, often called spaghetti code_ for the way the transfer seems to wander around through the program. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-27T19:45:18.960" LastActivityDate="2017-09-27T19:45:18.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3702" PostTypeId="4" CreationDate="2017-09-27T19:45:18.960" Score="0" Body="Use this tag for questions concerning teaching the goto statement and its equivalents." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-27T19:45:18.960" LastActivityDate="2017-09-27T19:45:18.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3703" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T20:17:07.063" Score="17" Body="&lt;p&gt;Why do you learn about bits and bytes if modern languages, with good reason, abstract from it? Why do we learn to program in assembler if modern languages, for good reason, abstract from it? Why do we learn bare-metal imperative programming if object oriented languages, with good reason, encapsulate it? Why do we learn C even though C++ offers much better ways to express ourselves? Why do we learn naked pointer semantics if smart pointers are the way to go?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is that the less abstract concepts are the building blocks for the more abstract ones. (And, I might add, there are times when it is appropriate to be less abstract. There are times to use assembler, and goto, and pointers.) It helps to know assembler when you try to understand C. It also helps &lt;em&gt;appreciating&lt;/em&gt; what the language does for you.  Knowing C, in turn, makes you understand C++ better (both its rationale and its limitations!).&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It helps to know goto when you learn about loops, and what they do for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same way it helps to know molecules if you try to understand a cell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;&lt;sup&gt;1&lt;/sup&gt; It is also important to understand that machine independence and structured programming and object orientation are essentially &lt;em&gt;concepts&lt;/em&gt; which are just more or less supported by the different languages. You certainly can write well-structured assembler. OO crept into my C after I grokked C++.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastEditorUserId="1675" LastEditDate="2017-09-29T23:59:43.317" LastActivityDate="2017-09-29T23:59:43.317" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3704" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T20:42:39.510" Score="12" Body="&lt;p&gt;&lt;b&gt;Don't teach it if you want Programmers &lt;/b&gt;(know what they're doing)&lt;b&gt;. Do teach it if you want Computer Scientists &lt;/b&gt;(know why they're doing it)&lt;b&gt;.&lt;/b&gt;&lt;/p&gt;&#xA;&lt;p&gt;Obviously these two aren't mutually exclusive, but plenty of people learn how to code without understanding what they're doing at a lower level, and that's ok. If that's your goal, ignore &lt;code&gt;goto&lt;/code&gt;; they'll never need to know it.&lt;/p&gt;&#xA;&lt;p&gt;If you do want them to understand the why, then you have to teach it. If their code uses any sort of control flow, then at a lower level something somewhere is calling a &lt;code&gt;goto&lt;/code&gt; (or something close), and CS students need to understand how that works.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: I just reread &lt;a href=&quot;http://www.u.arizona.edu/%7Erubinson/copyright_violations/Go_To_Considered_Harmful.html&quot; rel=&quot;noreferrer&quot;&gt;GOTO Statement Considered Harmful&lt;/a&gt; and it actually ends with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The exercise to translate an arbitrary flow diagram more or less mechanically into a jump-less one, however, is not to be recommended. Then the resulting flow diagram cannot be expected to be more transparent than the original one.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I know most of us have focused on the &lt;code&gt;goto&lt;/code&gt; side of this question, hopefully this sheds some light on the flowchart side as well.&lt;/p&gt;&#xA;&lt;p&gt;This line also reads to me as a confirmation that &lt;code&gt;goto&lt;/code&gt; should be learned as a concept, since describing a control flow is nearly impossible without it, but Dijkstra still advocates avoiding it in code.&lt;/p&gt;&#xA;" OwnerUserId="1578" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-09-28T16:41:49.273" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3705" PostTypeId="2" ParentId="3696" CreationDate="2017-09-27T21:41:38.463" Score="4" Body="&lt;p&gt;I teach a college level introductory computer science course, where the primary goal is to learn programming in Java with no assumed prior programming experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do teach flow charting when I cover decision making &amp;amp; looping. Flowcharts aren't a great tool for an entire non-trivial program. They are a reasonable tool for high level algorithm design and for code level representation of methods. Furthermore, most students have seen a flowchart of some type before &amp;amp; I find that any degree of familiarity is helpful to those who find programming to be an otherwise foreign concept. I need to reach as many of my students as  possible &amp;amp; find flowcharts to be worth leveraging in that regard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do not cover use of &lt;code&gt;goto&lt;/code&gt; beyond stating that it exists, it's easy to misuse and typically by the time they might encounter it in a production environment, they should have accumulated enough programming acumen to deal with it as needed. It's not a core piece of the language &amp;amp; there's plenty of other material that sees more routine usage that could use its time.&lt;/p&gt;&#xA;" OwnerUserId="16" LastEditorUserId="16" LastEditDate="2017-09-28T00:25:14.193" LastActivityDate="2017-09-28T00:25:14.193" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3706" PostTypeId="2" ParentId="2537" CreationDate="2017-09-27T23:20:23.107" Score="0" Body="&lt;p&gt;This describes another possible model of an honors program that may be feasible internationally. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students normally take a certain set of classes. For those in the honors program, some of those may be specially designed just for them. These courses go beyond the normal requirements in some significant way, perhaps including additional research. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in this model the key feature is that it is possible for a professor and a student to form a contract in a &quot;normal&quot; course that transforms it into an honors course. The contract will involve additional work of some kind appropriate for the course. The student does the normal work of the course and the fulfills the additional requirements as well. The work might involve additional research and/or writing, up to and including publication. The professor judges the student work as usual and assigns or withholds the honors designation at completion. The work should ensure that the student attains some deeper understanding of the topic of the course, rather than just preforming additional tasks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student in the honors program, in this model, may have a minimal number of such special courses or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically, if the overall curriculum of the student does not require a thesis, the honors student will write on to achieve honors at graduation. For those who are normally required to write a thesis, some additional requirements might be imposed, such as publication, or at least submission for publication. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Managing such a program is a bit challenging. Someone with a deep commitment to the philosophy should be available to assist faculty and students in setting appropriate standards for each such course. A faculty member may be able to amortize the work of guiding such a course over more than one term/student or not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a program could, in fact, be used as part of a program of training future teachers. Some of the additional tasks of an honors course might be teaching part of the course itself, or a closely related course. If this is used, I would assume that the teaching would be supervised and even assisted by the guiding professor. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-27T23:26:06.473" LastActivityDate="2017-09-27T23:26:06.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3707" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T03:11:29.200" Score="9" Body="&lt;p&gt;I think the &lt;code&gt;goto&lt;/code&gt; is sorely maligned. When Edsger Dijkstra wrote his famous letter in 1968, high level languages were not the same as they are today, and the &lt;code&gt;goto&lt;/code&gt; could easily be abused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my early days learning FORTRAN IV, the &lt;code&gt;goto&lt;/code&gt; was an important part of the language and many of the important modern structures were not yet universally mainstream. The resulting code could indeed lead to a degree of complexity which would be hard to analyse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;High level languages were meant to be more abstracted than machine languages, and you would have thought manually encoding the structure this way was a failure in this regard. If that sounds like a strong argument against &lt;code&gt;goto&lt;/code&gt;, then, well, it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, things have moved on since then, and the alternatives are not always better. In fact the &lt;code&gt;goto&lt;/code&gt; is still there in spirit every time we use the &lt;code&gt;switch&lt;/code&gt; statement in c-type languages, as it is all but a specialised &lt;code&gt;goto&lt;/code&gt;. This explains why you then need to end each part with a &lt;code&gt;break&lt;/code&gt; statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modern languages tend to restrict the use of &lt;code&gt;goto&lt;/code&gt; to minimise the damage it could do in the past. In particular, you can’t just arbitrarily &lt;code&gt;goto&lt;/code&gt; anywhere, but it must be within the limits of the current block, and only to labelled, not numbered, locations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you add further self-imposed restrictions such as only going forward, or only using it in certain circumstances, it can certainly be used in an orderly manner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You can exit a function early with a &lt;code&gt;return&lt;/code&gt; statement or a loop early with either &lt;code&gt;continue&lt;/code&gt; or &lt;code&gt;break&lt;/code&gt;. There is no standard early exit for an &lt;code&gt;if&lt;/code&gt; block, but a &lt;code&gt;goto&lt;/code&gt; to a label after the block will do nicely.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For testing and trouble-shooting, it may be useful to skip earlier parts of the code and go straight to the section in question. Wrapping these earlier parts inside an &lt;code&gt;if&lt;/code&gt; block simply to skip them is counter-intuitive and unnecessary.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The point is, every programming structure has its pitfalls and can be abused. &lt;code&gt;goto&lt;/code&gt; has possibly been more abused than the others. However, there is still a case for using it in well-controlled circumstances, as it can help make the code &lt;em&gt;easier&lt;/em&gt; to follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, there is value in teaching &lt;code&gt;goto&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As regards flow charts, I think that they remain the most obvious way of visualising a process. The fact that they are used so often in non-technical contexts attests to this. When teaching programming I often end up drawing arrows all over the structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I’m not sure that I would take flow charts too formally, though. They are useful in visualising, but I certainly don’t think they’re necessarily the best way to plan a program.&lt;/p&gt;&#xA;" OwnerUserId="3137" LastActivityDate="2017-09-28T03:11:29.200" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3708" PostTypeId="2" ParentId="3679" CreationDate="2017-09-28T05:27:20.680" Score="4" Body="&lt;p&gt;The College of St. Scholastica in Minnesota has a &lt;a href=&quot;http://www.css.edu/graduate/masters-doctoral-and-professional-programs/areas-of-study/master-of-education-(med)/certificate-in-computer-science-education.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Science Education graduate certificate program&lt;/a&gt;. It is a four-course sequence designed to add a CS endorsement to a high school teaching certificate, though no state-issued endorsement exists yet in Minnesota. The courses:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Computational Thinking and Standards&lt;/em&gt; for the K-12 Teacher&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;CS Principles&lt;/em&gt;, covering the AP CS Principles course description with additional material covering pedagogy and CS pedagogical content knowledge&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Programming and Teaching Java&lt;/em&gt;, a Java-based course covering the AP CS A course description with additional material covering pedagogy and CS pedagogical content knowledge&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;CS Methods and Capstone&lt;/em&gt;, covering pedagogy and CS pedagogical content knowledge, CS education research, and development of a CS curriculum unit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-09-28T05:27:20.680" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3709" PostTypeId="2" ParentId="3679" CreationDate="2017-09-28T05:45:30.493" Score="4" Body="&lt;p&gt;As states in the US consider requirements to add a CS endorsement to a teaching certificate, the proposals vary widely. The changing landscape is described in the April 2017 EDC document &lt;a href=&quot;https://www.edc.org/state-states-landscape-report-state-level-policies-supporting-equitable-k-12-computer-science&quot; rel=&quot;nofollow noreferrer&quot;&gt;State of the States Landscape Report: State-level Policies Supporting Equitable K-12 Computer Science Education&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Iowa SF274, passed June 2017, allocated \$250 thousand for CS professional development. This is dwarfed by \$500 million &lt;a href=&quot;https://www.nytimes.com/2017/09/26/technology/computer-science-stem-education.html?_r=0&quot; rel=&quot;nofollow noreferrer&quot;&gt;announced this week&lt;/a&gt; by the US Department of Ed and the tech sector, but like parallel initiatives in many US states, it led the state's Department of Ed to consider CS endorsement requirements. The Department of Ed drafted recommendations as a starting point for a working group to consider. Iowa DoEd is suggesting in that draft:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;12 semester hours of CS coursework to include &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Data structures&lt;/li&gt;&#xA;&lt;li&gt;Algorithms&lt;/li&gt;&#xA;&lt;li&gt;Operating Systems or Networking &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;3 semester hours of a CS Teaching Methods course&lt;/li&gt;&#xA;&lt;li&gt;6 semester hours of coursework in Career and Technical Education&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I post this draft recommendation because the crowd-sourced opinion of this community would be informative to me as a member of the working group. The fact that the discussion here would be useful to someone like me as a CS educator in a time of fervent activity in legislative and executive realms is a reason not to close this question.&lt;/p&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2017-09-28T05:53:49.070" LastActivityDate="2017-09-28T05:53:49.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3710" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T07:49:35.957" Score="0" Body="&lt;p&gt;Flowchart like drawings are a great help when trying to solve problems with multiple cases. A simple example&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Exercise:  given three numbers a, b and c,  print them in ascending&#xA;  order.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The student is expected to articulate a lot of comparisons, and quickly gets lost because his/her brain can't handle 6 cases and the necessary tests at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So some intermediary representation is needed to work on it.  Say, I obviously have to compare things. Let's start with a comparison of a and b.   On one side, I know a is bigger. On the other side b is bigger. What else ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A graphical representation helps to work on the decision tree, much more than a textual representation if embedded if-then-else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image of work in progress. 1 of 6 cases solved. Extending the diagram can be done on any order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/xW3Oj.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/xW3Oj.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yellow boxes show what I know about the order in some case.  &lt;code&gt;c?&lt;/code&gt; means :  &quot;&lt;code&gt;c&lt;/code&gt; could be there&quot;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Question : What is obviously wrong? :-)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-09-28T07:56:54.660" LastActivityDate="2017-09-28T07:56:54.660" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3711" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T07:50:05.670" Score="4" Body="&lt;p&gt;The real question here seems more like &lt;strong&gt;when&lt;/strong&gt; should you teach &lt;code&gt;goto&lt;/code&gt; rather than &lt;strong&gt;if&lt;/strong&gt; you should teach it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first example programs should certainly not be looking like those we wrote on the machines in &lt;a href=&quot;https://www.whsmith.co.uk&quot; rel=&quot;nofollow noreferrer&quot;&gt;WH Smith&lt;/a&gt; on the way home from school:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10 PRINT &quot;HELLO WORLD!&quot;  &#xA;20 GOTO 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A &lt;code&gt;while true&lt;/code&gt; construct is more sensible here. However, if you introduce your students to programming by demonstrating the low-level operation of the CPU (fetch/decode/execute) then it's more likely that you'll need a force-pc (although typically it also needs to be conditional).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The assembly language constructs typically don't quite match high-level languages exactly (e.g. count down rather than up, in a loop to allow compare-and-branch-if-zero), but at some point your course will probably link high level languages to machine operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, I'm not suggesting that it is sensible to start by introducing the full scope of:  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; while (expression == TRUE) {stuff, including maybe break};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;rather keep the templates simple and expand the linguistic elements progressively. &lt;code&gt;while (TRUE)&lt;/code&gt; is just a compound keyword when it's first needed, just like &lt;code&gt;GOTO &amp;lt;LABEL&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be easy to explain that modern high level languages are designed so that humans can understand the code. That is why there are usually several different ways of expressing control flow even though to a beginner they all look interchangeable. In the absence of any more specific reason, &lt;code&gt;goto&lt;/code&gt; is likely to come at the end of your list of 'possible control flow changes' and probably needs to be introduced as an instruction which has been mostly replaced in modern programming, &lt;em&gt;because other constructs are better&lt;/em&gt;, not simply because &lt;em&gt;goto is bad&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best reason I can think of for introducing &lt;code&gt;goto&lt;/code&gt; is that the concept might help when it comes to explaining hardware interrupts (being the most important part of CPU architecture which isn't even mentioned in far too many courses).&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-09-29T13:03:10.573" LastActivityDate="2017-09-29T13:03:10.573" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3712" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T08:25:37.593" Score="0" Body="&lt;p&gt;Three quick answers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;flowcharts are useful to &lt;em&gt;communicate and document the logic of a process&lt;/em&gt;. Not knowing how they work may well be a problem in some kinds of work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;goto&lt;/code&gt; has value in many situations where some programmers (not all) will work. Not everything is done in high level or modern languages. At a low level on most processors there are no loops, only conditional and unconditional &lt;code&gt;goto&lt;/code&gt;s (branches). Older non structured languages also remain in use.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;code&gt;goto&lt;/code&gt; also has considerable importance in security/vulnerability. That's because hacking and vulnerability work (and therefore security) can involve understanding stack manipulation techniques and disassembly (machine code to assembler) which are completely based on jumps not loops. If you look at an infosec analysis of malware you'll see the need to comprehend code that doesn't have high level classes and objects.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1629" LastEditorUserId="1629" LastEditDate="2017-09-30T10:35:56.777" LastActivityDate="2017-09-30T10:35:56.777" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3713" PostTypeId="1" AcceptedAnswerId="3715" CreationDate="2017-09-28T12:50:26.970" Score="5" ViewCount="849" Body="&lt;p&gt;Before becoming a teacher, I believed that pseudo code was a relic from the past (see also &lt;a href=&quot;https://cseducators.stackexchange.com/q/3696/204&quot;&gt;my question on goto and flowcharts&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When all you have is assembler language, Fortran, and Cobol, and no one has invented a compiler for a structured languages, then you need to write pseudo code. That is write in a high-level language, and compile it by hand. Now we can write it in a high-level language and get the machine to compile it, so is there a need for pseudo code?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note I have now changed my view, somewhat, on pseudo code, but not on flowcharts and goto see my answer below. Please add your own answer, if you have I different perspective.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-10-03T09:58:33.727" Title="Is there any value in teaching pseudo code?" Tags="|pseudo-code|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3714" PostTypeId="2" ParentId="3713" CreationDate="2017-09-28T12:50:26.970" Score="1" Body="&lt;p&gt;While I think that it is correct that a professional programmer does not need pseudo code (as other high level languages are available), and that management should not encourage programmers to design in pseudo code. I do think that there is value in education.&lt;/p&gt;&#xA;&lt;h1&gt;Some exam bodies views&lt;/h1&gt;&#xA;&lt;h2&gt;AQA&lt;/h2&gt;&#xA;&lt;p&gt;“Questions in the written examination that involve code will use this pseudo code for clarity and consistency. However, students may answer these&#xA;questions in any valid format.” — &lt;a href=&quot;http://filestore.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://filestore.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;AQA have also stated that they have tested there pseudo code, by building a compiler. And that they compile and test all code that is used in questions.&lt;/p&gt;&#xA;&lt;h2&gt;OCR&lt;/h2&gt;&#xA;&lt;p&gt;“The following guide shows the format pseudocode will appear in the examined components. It is provided to enable teachers to provide learners with familiarity before the exam. Learners are&#xA;not expected to memorise the syntax of this pseudocode and when asked may provide answers in any style of pseudocode they choose providing its meaning could be reasonably inferred by a&#xA;competent programmer.” — &lt;a href=&quot;http://www.ocr.org.uk/Images/260952-pseudocode-guide-teacher-guide.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.ocr.org.uk/Images/260952-pseudocode-guide-teacher-guide.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;WJEC&lt;/h2&gt;&#xA;&lt;p&gt;“Is there an agreed convention for writing pseudo code in this course?&#xA;There is no agreed convention, and appropriate pseudocode is rewarded with&#xA;marks.” — (Can't find link)&lt;/p&gt;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Therefore these exam boards do not insist that students write in pseudo code, an answer in python can receive the same marks. Pseudo code is just the exam boards way of having one language for all in questions, and of being lenient on syntax of answers. AQA's (and may be the others) pseudo code, as used in questions, is a real high level language, nothing pseudo about it.&lt;/p&gt;&#xA;&lt;h1&gt;A learning perspective.&lt;/h1&gt;&#xA;&lt;p&gt;Just as pseudo code was useful in the past, before compilable high-level languages existed. It is of equal value today when learning your first language. For a learner, they have no compilable high-level languages available, as this is what they are learning. Therefore it can be useful to be able to express themselves in pseudo code.&lt;/p&gt;&#xA;&lt;p&gt;When I was learning to program, I would first write it in pseudo code, then convert it into comments, and then one line at a time translate it into the language that I was learning. This translation phase, involved a lot of looking stuff up in a book. I still sometimes, but infrequently, do this.&lt;/p&gt;&#xA;&lt;p&gt;It is important though to note, there is no point in formally learning a pseudo code. This results in the boot-strap problem (we learn a to help us learn b, but first we have to learn a, but a is no easier to learn than b).&#xA;The pseudo code that the student uses will evolve, to become more and more like the language that they are learning, and will become less and less used.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-03T09:58:33.727" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3715" PostTypeId="2" ParentId="3713" CreationDate="2017-09-28T13:07:27.867" Score="7" Body="&lt;p&gt;Yes, definitely. There is a need, while developing an algorithm, for a language (or diagramming technique) that is less precise and requires less detail than a formal programming language. This is to let the developer expand his/her thoughts from an overall view to one that is more and more refined. This is true even for high-level languages, though the language itself may be useful for that given a test-first design methodology and good tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A pseudo-code is also useful for presenting algorithms in a language neutral way so that implementers may build to suit a need in the language of their choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I note, especially, that &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/038790641X&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;The Science of Programming&lt;/em&gt;&lt;/a&gt; by David Gries uses such a pseudo code throughout. The code is defined in the book and fairly precise, though leaves out many details needed for implementation. It is the same language, in fact, that Edsger Dijkstra used in his papers. I used several variations on it as the basis of a compiler course for many years. The Gries book should be on the bookshelf (and in the mind) of every serious computer scientist, and most programmers. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Programming involves several tasks at different levels of abstraction. A good pseudocode lets a programmer focus first on the overall, high level, concepts, without having to change focus, or get distracted by, the lower level details needed for implementation. Even if you use &quot;misspelled java&quot; as your pseudocode you have gained this separation of concerns as long as your development environment doesn't complain too visibly or loudly as you go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching this separation of concerns to students, via some formal or informal pseudocode, is a way to get them to develop algorithms from the outside-in rather from the top-down (i.e. top of page to bottom of page). That is to say, from the general to the specific, rather from the first statement to the last. Some students seem to want to work in that way initially. The sooner they develop better habits, the sooner they can progress. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-28T14:26:12.303" LastActivityDate="2017-09-28T14:26:12.303" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3716" PostTypeId="1" AcceptedAnswerId="3732" CreationDate="2017-09-28T15:15:11.080" Score="33" ViewCount="6643" Body="&lt;p&gt;I have taught Boolean algebra in an upper-level discrete math course for CS majors. I showed them how, using just the axioms (distributive property, etc.), you can derive other properties (such as De Morgan's Law). Then I assigned them to try it, and most of them happily (or grumpily) worked through the algebra. But one student proved the statement exhaustively using a truth table, instead of using algebra. That is not what I had wanted him to do, but I was at a loss on how to justify it to him. Since Boolean variables can only have 2 different values, proving a Boolean algebra equality can always be done exhaustively. Or am I wrong?&lt;/p&gt;&#xA;" OwnerUserId="587" LastEditorUserId="587" LastEditDate="2017-09-28T19:51:46.167" LastActivityDate="2017-10-01T09:12:15.757" Title="How do I convince students to use Boolean algebra?" Tags="|boolean-algebra|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3717" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T15:23:53.040" Score="0" Body="&lt;p&gt;Here is a generic flowchart of a specific type of control flow:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/4mcK1.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This control flow cannot be implemented with only control flow structures (&lt;code&gt;if&lt;/code&gt;, &lt;code&gt;switch&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;do while&lt;/code&gt;). You &lt;em&gt;have&lt;/em&gt; to either use a &lt;code&gt;goto&lt;/code&gt; after one of the conditions, or bend up another structure to simulate it. The latter naturally results in code ranging from slightly weird to awful (loops that don't actually loop, infinite loops with &lt;code&gt;if+break&lt;/code&gt; conditions in the middle, artificial flag variables which form some kind of state machine, one-off functions that don't actually represent a stand-alone operation...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The truth is that control flow structures do &lt;em&gt;not&lt;/em&gt; cover all possible cases. &lt;code&gt;goto&lt;/code&gt; should always be the last ever tool you try to solve a problem, but you shouldn't throw it away from your toolbox lest you want to end up driving a screw in with a hammer.&lt;/p&gt;&#xA;" OwnerUserId="2038" LastEditorUserId="2038" LastEditDate="2017-09-28T21:46:24.193" LastActivityDate="2017-09-28T21:46:24.193" CommentCount="20" ContentLicense="CC BY-SA 3.0" />
  <row Id="3718" PostTypeId="2" ParentId="3716" CreationDate="2017-09-28T16:02:40.603" Score="4" Body="&lt;p&gt;Well, you won't do it by simply insisting. In fact, if your student has an alternate way to demonstrate the truth of the statement, he/she should be praised, not censured, even implicitly. Your students aren't like you. They don't think like you for the most part. It is useful, of course, to show them how you &lt;em&gt;do&lt;/em&gt; think, but still, they are unique individuals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you want to convince them to use Boolean, you could give them an assignment to actually compute boolean functions. Or, more interesting, you could create (or find) some active learning games that are both fun and rewarding. &lt;a href=&quot;http://csunplugged.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSUnplugged&lt;/a&gt; may have such thing already. A search of their site will turn up a few things on Binary Numbers that might be adapted, and a few links on teaching Boolean Algebra. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discussing simple circuits (gates) might also give some an incentive to do more. Discussions of why &lt;em&gt;nand&lt;/em&gt; and &lt;em&gt;nor&lt;/em&gt; are preferred over &lt;em&gt;and&lt;/em&gt; and &lt;em&gt;or&lt;/em&gt; are instructive. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-09-28T16:02:40.603" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3719" PostTypeId="2" ParentId="3716" CreationDate="2017-09-28T16:39:08.133" Score="39" Body="&lt;p&gt;Well, for one, computing a truth table doesn't scale: generating one takes exponential time, with respect to the number of variables you're using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can perhaps &quot;subtly&quot; drive this idea home by asking your students to manipulate some proposition that contains 7 or 8 variables (which would require creating a truth table with 128 or 256 rows). That would require an exhausting amount of work -- the benefits of using algebra should hopefully be more obvious, then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make the problem more tractable for the people who &lt;em&gt;are&lt;/em&gt; using algebra, you could perhaps engineer the original statement so some of the variables end up &quot;vanishing&quot; (e.g. they simplify into something like &lt;code&gt;p || !p&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it would also be worth explaining why it's useful to be able to systematically simplify or manipulate boolean expressions in the first place -- for example, you could explain that when you're designing circuits, you have a vested interest in minimizing the number of gates used to keep costs down (as well as potentially minimizing the number of &lt;em&gt;unique&lt;/em&gt; gates used).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally, another idea is to just simply tell your students &lt;em&gt;why&lt;/em&gt; you're asking them to learn this material in the first place. For example, you could say that you're trying to prepare them to write proofs later on in the course (assuming that's what you're doing). After all, a large part of writing proofs is about correctly manipulating and applying definitions, and that's exactly what you're asking the students to do now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, I think sharing your gameplan is a good way of getting students on-board (albeit sometimes reluctantly).&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-09-29T00:08:55.493" LastActivityDate="2017-09-29T00:08:55.493" CommentCount="17" ContentLicense="CC BY-SA 3.0" />
  <row Id="3720" PostTypeId="2" ParentId="3713" CreationDate="2017-09-28T16:40:38.077" Score="4" Body="&lt;p&gt;Pseudo-code allows expressing that an algorithm to solve some problem is not the same as the syntax (formatting, punctuation abuse, etc.) required to make any particular compiler or interpreter happy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo-code is also suitable for algorithms using data types that are not directly expressible in a standard programming language, such as real physical objects with the kids in the room acting as the operators and sequencers, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also requires less writing (characters, punctuation) on a chalkboard/whiteboard.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-09-28T16:40:38.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3721" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T16:47:28.670" Score="3" Body="&lt;p&gt;Binary digital computers (and the execution of most programming languages) are just big state machines at their very heart.  State machines usually require non-sequential state changes.  e.g. &lt;code&gt;goto&lt;/code&gt;s&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A flow chart is a form of state machine.  (superset or subset?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need goto's to learn jump statements in assembly language, asm to learn machine code, and machine code to understand CPU architecture and design.  Understanding computer hardware logic and state machines seems important to any CS degree.  As for difficulty of learning machine code, many thousands of student-aged kids learned to poke 6502 and Z80 op codes back in the day...&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="204" LastEditDate="2017-10-13T12:49:36.847" LastActivityDate="2017-10-13T12:49:36.847" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3722" PostTypeId="2" ParentId="3716" CreationDate="2017-09-28T16:55:44.803" Score="9" Body="&lt;p&gt;I am mostly with @Buffy, A student should be praised for finding their own way of solving a problem. However I also think it is often good to have more than one way of doing things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the exam insists that they do it a certain way, then explain this to your student. Also explain that having more than one way of doing things is better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of getting them to prove A = B e.g. $\overline{a+b} = \overline{a}\cdot \overline{b}$ that is (depending on how you like to write it) $\lnot(a \lor b) = \lnot{a} \land \lnot{b}$  This can be proved exhaustively with truth tables, as your student proved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But instead try some other questions such as &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Rewrite the following using only &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;not&lt;/code&gt;, $\overline{a+b}$&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Add more complex examples, ones they have not done already.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-09-28T16:55:44.803" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3723" PostTypeId="2" ParentId="3716" CreationDate="2017-09-28T18:45:05.010" Score="5" Body="&lt;p&gt;I've never encountered this particular problem (possibly because I mention that truth tables are great, but we need both sets of skills?)  Looking through the examples that I teach, though, a few of them pretty easily motivate boolean algebra:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Prove that &lt;code&gt;nand&lt;/code&gt; is boolean complete by mapping each logical symbol back to &lt;code&gt;nand&lt;/code&gt; (or other symbols that you have already proven).  This example forces you to only use the terms that you have already proven, so it is structured rather like @ctrl-alt-delor's suggestion.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Bring expressions to Conjunctive Normal Form (which you can use to trivially prove that any boolean expression, no matter how complex, can be solved in $O(1)$), but limit the number of disjunctive clauses that you are allowed to have in the final answer.  The truth-table method of creating CNFs does not come with any such guarantees!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For that matter, the truth-table method of generating a CNF requires a whole host of DeMorgansing in order to get it done.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;CNFs are really a good tool to force kids into boolean algebra.  I understand that they are rather computer-sciencey for a course in mathematics, but since you are asking the question here (and not, say, at matheducators), perhaps they will suit your needs.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-09-28T18:53:26.023" LastActivityDate="2017-09-28T18:53:26.023" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3724" PostTypeId="2" ParentId="3716" CreationDate="2017-09-28T20:42:46.870" Score="4" Body="&lt;p&gt;You haven't given them any practical applications for it, so the merit of doing so is lost on them. Why should anyone care about things like De Morgan's Law, etc, if they can just use a truth table to hammer out the answer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Boolean expressions can be reduced to a minimalist SOP (Sum of Products) or POS expression, which is the whole point of what you are teaching. In turn these expressions can be used to describe a logic circuit using AND, OR, NOT, NAND, NOR and XOR gates. A Boolean algebra expression allows a person to define not only what gates to use but also how to wire them. For example, when you apply De Morgan's, how would the circuit change for the resulting SOP?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;K Maps (Karnaugh maps) can be used to find the smallest SOP, which describes the smallest possible circuit to get the logical output required. Finite state machines (FSMs) use groups of SOPs that allow you to get a logic circuit to do what you want it to do - traffic lights are a typical example used, where you apply multiple inputs and get multiple outputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Math needs to get used in order for people to want to use it.&lt;/p&gt;&#xA;" OwnerUserId="3148" LastActivityDate="2017-09-28T20:42:46.870" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3725" PostTypeId="2" ParentId="3696" CreationDate="2017-09-28T22:56:33.063" Score="6" Body="&lt;p&gt;&lt;strong&gt;Flowcharts&lt;/strong&gt; are a useful tool to understand programs that perform moderately complex sequences of interactions. They aren't always a good way to describe an algorithm, but they are a good way to describe the behavior of a system that reacts to external events in different ways depending on its state, with a non-linear control flow. Note that by &lt;em&gt;flowchart&lt;/em&gt;, I'm not referring to a specific formalism — at this level of detail, I might as well call it a &lt;em&gt;state diagram&lt;/em&gt; (although a proper &lt;em&gt;state diagram&lt;/em&gt; requires a more precise understanding of what the different system states are before you can draw it). Flowcharts have their place in an imperative programming course, but only at a fairly advanced stage, &lt;em&gt;after&lt;/em&gt; the students are familiar with basic control structures such as conditionals, loops and subroutines. They're a visual aid to understand complex control or data flow, in the same way that decision diagrams are a visual aid for complex series of conditionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only good reason I can think of to introduce flowcharts early on is if the students started with a style of visual programming that resembles flowcharts. Otherwise, teach while loops first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Goto&lt;/strong&gt; is an instruction that's hard to &lt;em&gt;really&lt;/em&gt; understand. (If you think it's just a jump, you don't understand goto.) It's perfectly fine to teach imperative programming without goto, if you're doing it at any level that's higher than assembly (in which case what you'd teach is jumps). Goto is very rarely useful in the real world and is rarely used. Its place in a basic or intermediate imperative programming course is as an incidental mention, as something that exists, that you mention for the students' interest but isn't part of the curriculum and won't be on the exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I work in industry. I write software for embedded systems in C. Think I should be insisting on the importance of goto? Wrong. In my world, &lt;code&gt;goto&lt;/code&gt; is almost exclusively used for one thing: a forward-only goto, a generalization of &lt;code&gt;break&lt;/code&gt; that allows breaking to the end of any block. The single common idiomatic use of &lt;code&gt;goto&lt;/code&gt; is to jump to a common cleanup code before returning from a function in C:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int myfunction () {&#xA;    foo_t resource1;&#xA;    bar_t resource2;&#xA;    resource1 = allocate1();&#xA;    if (!resource1) goto cleanup;&#xA;    resource2 = allocate2();&#xA;    if (!resource2) goto cleanup;&#xA;    if (!do_stuff()) goto cleanup;&#xA;    …&#xA;    return 1;&#xA;  cleanup:&#xA;    free2(resource2);&#xA;    free1(resource1);&#xA;    return 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Many coding standards for embedded programming forbid using goto for anything else. In languages that have a better clean-up mechanism, such as try/finally or C++ destructors, goto is useless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understanding goto is a secondary skill for programmers, part of understanding how a program's code relates to the way the machine executes the program. A &lt;em&gt;good&lt;/em&gt; programmer understands goto, but a &lt;em&gt;decent&lt;/em&gt; programmer understands how to program without goto. The primary skill for a programmer is &lt;strong&gt;understanding how a program works&lt;/strong&gt;, not understanding how a machine works. (There are exceptions, obviously — I write OS code, doing things like memory management and context switching and accessing peripherals, and that obviously requires a precise understanding of how the machine works. But that's a highly specialized field.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real difficulty with goto is, as I mentioned before, that it isn't just a jump. It's a jump &lt;em&gt;to a different context&lt;/em&gt;. The invariants that hold at the location of the jump may not hold at the target location. A goto introduces a non-local connection between two points in a program that makes it hard to figure out how the program state evolves and what invariants hold. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Paul Powell's statement that “GOTO (…) is easy to understand” is just wrong. What's easy to understand is &lt;em&gt;how a machine executes a goto statement&lt;/em&gt;. But the most important part, understanding &lt;em&gt;how a program that uses goto works&lt;/em&gt;, is difficult. The statement that “it can be used to explain what loops and other items of structured programming actually are” also completely misses the point. Goto can explain &lt;em&gt;how structured programming items are implemented on a processor&lt;/em&gt;. It explains an implementation, not the concept. Goto is an advanced step after structured imperative programming, not a step before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using goto to encode flowcharts is also very misguided. With goto, “we can code directly from a flow chart” — this is true: goto makes it easier to write a program from a flowchart without understanding how the program works, without figuring out the structure in the flow of events. But when you do that, you end up with a write-only program. Sure, you've been able to write it, but you won't be able to explain its behavior when a parameter that isn't reflected in the flowchart turns out to be important, or to modify it in a way that isn't easy to draw on the chart. Write-only programming is the mark of a mediocre programmer, capable only to fumble in the dark until they somehow manage to pass the tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Goto has its place when you teach how a machine executes code. It's what's happening under the hood. It has little to no place in teaching how to program, and Dijkstra would be quite right to complain about its use in this context.&lt;/p&gt;&#xA;" OwnerUserId="124" LastActivityDate="2017-09-28T22:56:33.063" CommentCount="17" ContentLicense="CC BY-SA 3.0" />
  <row Id="3726" PostTypeId="2" ParentId="3696" CreationDate="2017-09-29T11:28:47.840" Score="1" Body="&lt;p&gt;&lt;code&gt;goto&lt;/code&gt; is not bad &lt;em&gt;per se&lt;/em&gt;, it depends the way you use it, that's the way Dijkstra and other papers should be read. It can be very useful to simply get out from inner loops without creating weird boolean conditions. Of course if you use it to produce spaghetti code, that is bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, Java banned &lt;code&gt;goto&lt;/code&gt; but gives a &lt;code&gt;break&lt;/code&gt; to label statement which is exactly a kind of good &lt;code&gt;goto&lt;/code&gt;. On the converse, C lacks of this useful extend break so you need to write thing like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (...) {&#xA;  for (...) {&#xA;      for (...) {&#xA;          ....deep inside...&#xA;          if (...) goto end;&#xA;  }&#xA;}&#xA;end:&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is much much better than using boolean condition to exit from the loops one-by-one. I doubt anyone would consider such usage as bad, in really helps reading the code which would be much more difficult with a mess of strange combinations of conditions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally flowcharts illustrate the jumps in between portions of code and this can be simply implemented with jumps. After all an &lt;code&gt;if&lt;/code&gt; necessitate a unconditional jump. Beginners have sometimes difficulties to understand what exactly happens in construct like &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, etc and ask &quot;what code is executed after that&quot;, saying that a jump exists from the end of a block to the beginning of another one is a good way to explain, much more than a purely syntactic explanation.&lt;/p&gt;&#xA;" OwnerUserId="2841" LastEditorUserId="204" LastEditDate="2017-10-01T10:53:34.113" LastActivityDate="2017-10-01T10:53:34.113" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3727" PostTypeId="2" ParentId="3696" CreationDate="2017-09-29T15:26:58.233" Score="0" Body="&lt;p&gt;There are a lot of answers here about flowcharts, and the author's answer seems centered around grade-school students (as that is what his article was about).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there are in fact some instances where we professionals &lt;em&gt;do&lt;/em&gt; use gotos. We don't like to &lt;strong&gt;talk&lt;/strong&gt; about it, because they have such a bad rep. However, if you crack open the code for most of the world's lexical analyzers you will find gotos. Lex itself generates gotos (admittedly, as do many other automated source code generators).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Gotos are in fact &lt;strong&gt;the natural expression of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Finite-state_machine&quot; rel=&quot;nofollow noreferrer&quot;&gt;state machine&lt;/a&gt;&lt;/strong&gt;. It is meet and right to try to train students to put more structure into their programs than a simple state machine. However, there are a few tasks that in fact do not have more structure to them than a state machine. A lexical analyzer is one of these tasks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The typical goto-less method to work around this is to create a variable to hold the state, and write a big honking switch statement embedded in a loop with little or no code between them. That works, and avoids using the g-word, but it doesn't really gain anything. Rather it just hides the unstructured control flow under an artificial layer of structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Note: gotos are also commonly used in languages that don't have exception handling, but that's arguably a separate issue).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only tweak I'd make to traditional anti-goto training would be to say that if I ever see something like this in your code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (;;) {&#xA;    switch (state) {&#xA;       // multiple screens of code here&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Then one of two things are going to happen: Either there was a properly structured way to write the same code, and I'm going to grade you just like you wrote &quot;goto&quot; there, or there isn't, and I might dock you a point or two for the extra obfuscating of &lt;em&gt;not&lt;/em&gt; using goto.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, courses like Compiler Construction that naturally entail gotos should mention this issue, and not hide from it.&lt;/p&gt;&#xA;" OwnerUserId="1139" LastActivityDate="2017-09-29T15:26:58.233" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3728" PostTypeId="1" CreationDate="2017-09-29T15:31:01.760" Score="1" ViewCount="303" Body="&lt;p&gt;I teach programming to students seeking employment as programmers who know little or nothing about programming, and I was last employed as a programmer over a decade ago. Sometimes I am asked what got me started, or what my main interest was. Students are often surprised when I explain that I last programmed professionally near the start of the millennium, and also that I have learned the language I am teaching only recently (C#, which did not exist way back when).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that some students ask because &lt;strong&gt;they are trying to find a point of interest&lt;/strong&gt; themselves, so that this can become something they desire to be, rather than just a job. When I tell them that I wanted to know how computers actually are able to &lt;em&gt;function / operate / control themselves&lt;/em&gt;, ever since I was a child before anyone had a computer, they can understand that. I say I wanted to write Operating Systems, and although I did not achieve that, I did lots of low-level stuff from sharing modems over a Novell Network to creating a multi-threaded web server.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They might not end up with those sorts of assignments when they become employed, but the point of learning to program is to understand how all this magic can happen. It is most fascinating when &quot;The magic goes away&quot; and we understand fully. That is what I want for my students. How do you answer such questions, and the flurry of &quot;what languages do you know&quot; etc?&lt;/p&gt;&#xA;" OwnerUserId="3163" LastActivityDate="2017-10-04T11:44:52.090" Title="How to answer questions about how I became interested in programming?" Tags="|student-motivation|adult-education|careers|student-perceptions|" AnswerCount="3" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3729" PostTypeId="2" ParentId="3695" CreationDate="2017-09-29T15:47:55.427" Score="2" Body="&lt;p&gt;To be fair, TypeScript is promoted by Microsoft. That means, it has excellent intellisense support along with type checking and all the other standard stuff (regularly updated with bug fixes, premium support, dedicated team and of course the huge marketing muscle of a huge tech giant) we can expect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the thing is, Javascript is simply far more popular. There are more resources and stack overflow itself has like thousands of questions on that. Almost every web app and web site I can think of uses JavaScript at some level. I cannot say the same for TypeScript. If anything, I have not seen it being used either academically or at workplaces. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say, if you are already onboard with JavaScript, stick with it and avoid TypeScript. Further, if you really want to add something on top of JavaScript, I would suggest you use jQuery (which is used almost as widely as Javascript) and is actually useful to build stuff. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-09-29T18:35:36.873" LastActivityDate="2017-09-29T18:35:36.873" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3730" PostTypeId="2" ParentId="3728" CreationDate="2017-09-29T17:39:49.530" Score="3" Body="&lt;p&gt;If you are doing a good job of teaching then your students probably think you are smarter than you really are. They may also think that you arrived magically at your current position without effort or setback. It is good for them to know the truth. That what looks to them like brilliance was more likely just hard work and &lt;em&gt;never giving up&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also good for them to know that the world they are entering (sometimes called adulthood, or the real world) won't always offer them what they hoped it would, but that if things are bad they will probably get better. But also, if they are good, they won't always remain so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is good for them to know that you are a human being who makes mistakes, admits them, and learns from them. Letting them think you are perfect is probably a mistake as they may be overly disappointed if you ever falter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my advice, even to a question that may not be the best fit for this place, is to open yourself to them as honestly as you can, letting them know that it takes effort to succeed, but also that it takes plenty of desire. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is especially useful if you let them know that some, perhaps many, of them are &quot;smarter&quot; than you are on nearly any scale. Whatever &quot;smarter&quot; really means. Just don't let them get the idea that you don't work as hard as you ask them to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can teach these lessons in small bits without really taking much class time. I wouldn't devote a lecture to it, but a stray comment now and then (&quot;I found this topic really hard when I first learned it.&quot;) might give them the confidence that &quot;yes, it really &lt;em&gt;is&lt;/em&gt; hard&quot;, rather than the fear that &quot;I'm so dumb&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few, at least, of your students might be inspired enough to follow a similar path to yours. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-09-29T17:57:28.957" LastActivityDate="2017-09-29T17:57:28.957" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3731" PostTypeId="2" ParentId="3679" CreationDate="2017-09-30T19:51:01.777" Score="0" Body="&lt;p&gt;I'd be very wary of any program with a course llike &quot;CS Principle&quot; or &quot;CS Principles for Educators.&quot; First, it pushes the &quot;you take it you can teach it&quot; model which would imply that any kid that finishes a class has enough content knowledge to teach it and that just isn't so. It's also a red flag that it might follow the model of many math ed courses like &quot;Calculus for math teachers&quot; which purport to be about both the math and how to teach it but in practice are more frequently watered down math classes with formulaic content about instruction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the Iowa proposal submitted here is more on track. Content should be somewhat beyond the highest level a student might take so Algorithms / Data structures fits the bill. I personally don't agree with the networking / OS part but that's neither here nor there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On top of depth of knowledge you need breadth and on top of that pedagogy so you'd need some more courses there.&lt;/p&gt;&#xA;" OwnerUserId="237" LastEditorUserId="1293" LastEditDate="2017-09-30T20:08:10.850" LastActivityDate="2017-09-30T20:08:10.850" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3732" PostTypeId="2" ParentId="3716" CreationDate="2017-10-01T09:04:49.730" Score="2" Body="&lt;p&gt;Back to the question : &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Since Boolean variables can only have 2 different values, proving a Boolean algebra equality can always be done exhaustively. Or am I wrong ?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes. &lt;code&gt;you_are_right or not(you are right) = true&lt;/code&gt;. That's basic binary logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lame joke aside, &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Boolean algebras are (usually defined as) &lt;em&gt;complemented distributive lattices&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;the two-element algebra (true, false, and, or, not, whatever) is one of them&lt;/li&gt;&#xA;&lt;li&gt;it has an interesting property:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;identities that hold in the specific two-element algebra  are &lt;em&gt;exactly&#xA;  the same&lt;/em&gt; as the identities that hold for ALL boolean algebras. No&#xA;  more, no less.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So proving equalities with truth tables is a perfectly correct method, although a somehow boring activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is &lt;strong&gt;you want to teach them something else&lt;/strong&gt;: using identities to prove other identities, or more generally turn terms into equivalent ones using algebraic manipulation of expressions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The truth-tables method has an obvious adavantage for students: they don't have to think, just compute.  When you use algebra, you have to chose a target (the kind of expression you want to get) and find how you can get there step by step. It is sometimes tricky, like introducing instances of &lt;code&gt;X or not(X)&lt;/code&gt; in a conjunction. It requires imagination, and taking decisions with try-and-error tentatives. &lt;strong&gt;Most students hate this&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;See remark on &lt;a href=&quot;https://en.wikipedia.org/wiki/Boolean_algebra_(structure)#Examples&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;this Wikipedia page&quot;&gt;https://en.wikipedia.org/wiki/Boolean_algebra_(structure)#Examples&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The two-element Boolean algebra is also important in the general theory of &#xA;  Boolean algebras, because an equation involving several variables is&#xA;  generally true in all Boolean algebras if and only if it is true in&#xA;  the two-element Boolean algebra (which can be checked by a trivial&#xA;  brute force algorithm for small numbers of variables). This can for&#xA;  example be used to show that the following laws (Consensus theorems)&#xA;  are generally valid in all Boolean algebras &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c) ≡ (a ∨ b) ∧ (¬a ∨ c)&#xA;(a ∧ b) ∨ (¬a ∧ c) ∨ (b ∧ c) ≡ (a ∧ b) ∨ (¬a ∧ c)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-10-01T09:12:15.757" LastActivityDate="2017-10-01T09:12:15.757" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3733" PostTypeId="2" ParentId="3696" CreationDate="2017-10-01T12:58:45.960" Score="2" Body="&lt;p&gt;I will concern myself mostly with &lt;code&gt;goto&lt;/code&gt;, but first a little on flow charts.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;On Flow charts&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I see flow charts as just a ways to visually represent goto-ful low-level algorithms/code.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What flow charts are not&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Some other answers have mixed up their use with state-machines, or decision trees. Doing this could result in coding each code path separately, this would result in an undesirable increased program-size. For example for a sorting algorithm, of we could get a code size complexity of $O(n!)$. This does not scale, much beyond sorting 3 items, and you will use all of you computers memory (just for the program to sort 16 items). &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Good uses of flow charts&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The low-level nature of flowcharts can be of great value, when creating a procedure to be carried out by humans. I.e. A first aid flowchart.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;On &lt;code&gt;goto&lt;/code&gt; statement and goto&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In the paper “Go To Statement Considered Harmful”, Dijkstra is concerned with the &lt;code&gt;goto&lt;/code&gt; statement, not with goto. He points out that all higher order structures will use &lt;code&gt;goto&lt;/code&gt; in their implementation. According to Dijkstra, this implementation is not the problem, only the direct use of &lt;code&gt;goto&lt;/code&gt;. &#xA;In the time since his paper the structure he mentions, &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;else&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;until&lt;/code&gt;, &lt;code&gt;repeat&lt;/code&gt;, and sub-routines have been part of our high-level languages. For his call was not for us to stop using it in programs, but to create languages that did not require it, and then to stop using it. And in the meantime to use it only in a structured way, to simulate the structures. Therefore only use it if your language does not provide the high-level structure that you need, and know which structure you are simulating (don't ad-hok it).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For a number of years I have been familiar with the observation that the quality of programmers is a&#xA;  decreasing function of the density of go to statements in the programs they produce. More recently I&#xA;  discovered why the use of the go to statement has such disastrous effects, and I became convinced that&#xA;  the go to statement should be abolished from all &quot;higher level&quot; programming languages (i.e. everything&#xA;  except, perhaps, plain machine code). At that time I did not attach too much importance to this discovery; I&#xA;  now submit my considerations for publication because in very recent discussions in which the subject&#xA;  turned up, I have been urged to do so. (Edsger Dijkstra)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h3&gt;Good uses of &lt;code&gt;goto&lt;/code&gt; statement&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Programming in assembler, though you should not have much assembler language in your project.&lt;/li&gt;&#xA;&lt;li&gt;Compilers/generators: These will use &lt;code&gt;goto&lt;/code&gt; to create higher-level structures.&lt;/li&gt;&#xA;&lt;li&gt;To over come limitations of the language, but consider changing language: In &lt;code&gt;C&lt;/code&gt; you may use &lt;code&gt;goto&lt;/code&gt; to implement exception handling. However ensure that you have a clear idea of the structures that you are implementing. Do not use &lt;code&gt;goto&lt;/code&gt; in an ad-hoc way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;When &lt;code&gt;goto&lt;/code&gt; can seem like a good idea.&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;goto&lt;/code&gt; is easy to understand, how it does it. However the code that you create (beyond the most trivial) is not easy to understand what it does.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My second remark is that our intellectual powers are rather geared to master static relations and that our&#xA;  powers to visualize processes evolving in time are relatively poorly developed. For that reason we should&#xA;  do (as wise programmers aware of our limitations) our utmost to shorten the conceptual gap between the&#xA;  static program and the dynamic process, to make the correspondence between the program (spread out in&#xA;  text space) and the process (spread out in time) as trivial as possible.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That is our attempts to understand a large system, in terms of how it works in a dynamic way, are going to be very limited. However it is possible to view the system in a static way, and thus make it easier for our brains to comprehend. To do this we must let go of a little of the how. We do not seem to have a problem with this in most cases: we care not how &lt;code&gt;print&lt;/code&gt; is implemented.  &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;On assembler code and machines&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So our CPUs use goto (&lt;code&gt;jmp&lt;/code&gt; instructions). So what, unless you are teaching assembler language and CPUs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But do all CPUs use goto? Possibly not, I am not an expert on this. However here is a discussion on what modern CPUs think of goto/jmp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That happens when a modern (instruction pipelined cpu), fetches a conditional jump instruction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All is not well, first it tries to guess which way the branch will go, then it goes that way. If it get it wrong it hits the brakes, backs up and tries again. The circuitry in the x86 for making this guess, is huge. The x86 does not like goto. What about the ARM, its branch prediction circuit is tiny (if it is a branch back, then assume that the branch will be taken, else assume that it will not), The ARM is better at predicting branches than the x86, but how? The arm has more conditional instructions, that is, it has selection built in. This allows it to avoid goto a lot of the time. Its simplistic algorithm then assumes that a jump backward is a loop, and a jump forward is a selection. So though iteration is not explicitly encoded, and selection is only sometimes explicitly encoded. This shows that knowledge of the programs structure is not just a high level thing, it can help the CPU's performance.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The paper cited by @Miles on CAS&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As Miles says it showed no benefit of flowcharts. But also not it was year 1977, and they were fortran programmers (goto users). It may be that if the experiment was repeated with the control group using structured programming, that the effect may be negative.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Conclusion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While it will be quicker to teach&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;10 print &quot;Hello, World&quot;&#xA;20 goto 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;than&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;forever:&#xA;    print &quot;Hello, World&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However making the first step easier will make all subsequent steps harder.&#xA;Someone once said, “Never hire any one that knows basic. They will have been so irreparably damaged by the experience of &lt;code&gt;goto&lt;/code&gt;s, that no amount of re-rehabilitation can save them.”, while I do not agree with this statement, there is some truth in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could it be used when teaching for, while, if, etc. As opposed to as a way to program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore,&#xA;only teach &lt;code&gt;goto&lt;/code&gt;, when teaching assembler language, or at a late stage in high-level programming. However first teach the higher level structures, and make it clear that &lt;code&gt;goto&lt;/code&gt; is only a work around for lack of higher-level structures in the language. And consider its use in teaching structured programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;HOWEVER&lt;/strong&gt; the article opened a very important question. We need to keep exploring ideas for teaching. Well done @PaulPowell &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-12-03T15:14:31.647" LastActivityDate="2017-12-03T15:14:31.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3734" PostTypeId="1" AcceptedAnswerId="3742" CreationDate="2017-10-01T21:53:09.530" Score="7" ViewCount="1584" Body="&lt;p&gt;I'm looking for a set of concrete examples that illustrates good use cases of using a &lt;code&gt;for&lt;/code&gt; vs a &lt;code&gt;while&lt;/code&gt; loop for beginners. I feel that I have a good grasp on teaching them about these loops in the abstract (e.g., definite vs indefinite loops, how we apply those concepts in life), but I would also like to show two (hopefully somewhat contextually related) motivating programming examples - one where a &lt;code&gt;for&lt;/code&gt; loop is more appropriate, and one where a &lt;code&gt;while&lt;/code&gt; loop is. Obviously either type of loop can be used in either instance, but I would like to prompt students to think more about when to use one versus the other. Coming up with two good examples that are illustrative of this point is eluding me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To further limit the options available, students only know about console I/O, &lt;code&gt;String&lt;/code&gt;/&lt;code&gt;int&lt;/code&gt;/&lt;code&gt;double&lt;/code&gt; types/variables, conditionals, and &lt;code&gt;while&lt;/code&gt; loops. We are using Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example, if I wasn't so focused on finding something that beginners could implement, I would show that a good use of a &lt;code&gt;while&lt;/code&gt; loop is for a robot that should always be listening for voice input from a user; this is a good use, because we don't know when (i.e., after how many iterations) we will stop listening for voice input. I would then contrast this with a robot parsing through transcriptions of user voice input to identify keywords and respond to them. I've considered trying to translate this into console I/O, but the use of looping to continuously look for console input lends itself somewhat better to &lt;code&gt;do-while&lt;/code&gt; loops, which we'll cover next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize my question is likely a rehash of what was asked &lt;a href=&quot;https://cseducators.stackexchange.com/questions/527/how-to-teach-which-loop-should-be-used&quot;&gt;here&lt;/a&gt;, but I wasn't happy with the answers. Answers on that post dealt more about the ordering of topics for teaching loops (e.g., &lt;code&gt;while&lt;/code&gt; loops before &lt;code&gt;for&lt;/code&gt; loops), or real-world motivating examples (e.g., while I'm not full, continue eating pizza). What I'm looking for is more in line with the later, but I would like to do something that translates well into code.&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="1293" LastEditDate="2018-05-07T22:34:55.857" LastActivityDate="2018-05-07T22:34:55.857" Title="Example for For vs While Loop (in Java)" Tags="|java|introductory-lesson|looping|code-example|" AnswerCount="7" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3735" PostTypeId="2" ParentId="3734" CreationDate="2017-10-02T08:55:27.803" Score="-2" Body="&lt;p&gt;So we know that we can use &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;, for all loops, but here are some simple rule as to when to use which one, to make programs easier to read, and understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can, use &lt;code&gt;foreach&lt;/code&gt;: If iterating over a list (or other iterable type).&#xA;Note python calls foreach &lt;code&gt;for&lt;/code&gt;. &lt;code&gt;foreach&lt;/code&gt; can not always be used, but is much safer and easier to use, when iterating over things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For experts, if you don't have &lt;code&gt;foreach&lt;/code&gt;, then use &lt;code&gt;for&lt;/code&gt; for bounded loops, that is those that could be implemented with a &lt;code&gt;foreach&lt;/code&gt;, those that you know how many times you will loop (or the upper bound, in the case when you will break out early).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach item in list {&#xA;    process item&#xA;}&#xA;&#xA;for (TypeOfItem item : list) {&#xA;    process item&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However for beginners for loops, can be very confusing (I am not discussing foreach, or for in python). Therefore prefer while loops over for loops. But foreach loops over while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See image from &lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;LearnableProgramming — Bret Victor&lt;/a&gt;, showing program flow through a for loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/TjgRQ.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/TjgRQ.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;C&lt;/code&gt; like languages (C, C++, Java, C#, …), always use &lt;code&gt;for&lt;/code&gt; in the form &lt;code&gt;for(int i=0; i&amp;lt;n; i++)&lt;/code&gt; (there may be some exceptions, but rare). So you are using &lt;code&gt;for&lt;/code&gt; to construct a foreach, as the language does not have the higher level structure. (C# has &lt;code&gt;foreach&lt;/code&gt;; C++ has library implementations; Java has foreach, but uses keyword &lt;code&gt;for&lt;/code&gt;)&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-03T17:54:13.267" LastActivityDate="2017-11-03T17:54:13.267" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3736" PostTypeId="2" ParentId="3734" CreationDate="2017-10-02T09:30:10.537" Score="0" Body="&lt;p&gt;Robots are certainly a good idea, but it sounds like you don't have any suitable hardware - I think simple hardware will give you plenty of opportunities and may also provide a different 'hook' for some of your students to become interested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an abstract level, &lt;code&gt;while&lt;/code&gt; is a good fit for a background task as you identified. If you're using a console interface, you need to make up something along the lines of a screen saver (assuming there is no actual processing). Maybe the program can prompt for input, generate bad poetry, or draw some simple snake like animations. All the time, waiting for 'control' input. Alternatively, some experimental data collection if you have suitable I/O hardware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have the control, you want to demonstrate iteration with &lt;code&gt;for&lt;/code&gt;. If you were using a micro:bit you could loop through a text string to display the result of some measurements. All you need is a set of data-points collected during the 'while' period. This could be a mash-up of the inputs generated by the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, as a scenario:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (user has not said 'stop')&#xA;  Collect user inputs&#xA;  Generate random vogon poetry for the user&#xA;foreach(user input before stop)&#xA;  Congratulate user on writing the following work of art&#xA;  Repeat input with words mangled or re-ordered&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-10-02T09:30:10.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3737" PostTypeId="2" ParentId="3728" CreationDate="2017-10-02T11:40:19.620" Score="0" Body="&lt;p&gt;Maybe (given the opportunity) the best way to address this question is to have your students talk to someone actually working in the field right now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You probably don't want to give the message to your students that it's been a while since you were working on what they regard as real projects (and I venture that many teachers don't have time to work on projects in their spare time). So maybe you don't think you have any particularly interesting personal examples to share. In that case ask them about what tech they find cool and exciting, then explore what that might lead to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two threads that I refer to when I'm talking about careers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Technology changes&lt;/strong&gt; This is a complex thing, meaning that there are both new things to learn (smartphones now outperform the supercomputers of my youth), and that there will always be new technology along in a few years. The hook can either be 'how does it work', or 'what can we do with this', and the appeal will be different for everyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;There is a lot of detail&lt;/strong&gt; Despite the apparent rapid changes, this isn't necessarily a field where skills become obsolete (assuming you view languages as a tool). There are also many different levels to work at in even a niche of the field. If you consider products, look at the whole supply chain. If you consider applications, look at science/industry/entertainment/health. Then don't forget development/support/training/marketing - technical skills are relevant to all of these roles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a modern example to break down into it's components, look at today's high-end VR. GPU hardware, High-bandwidth data to displays, 3d-rendering, position aware audio, sub-mm resolution position tracking, nausea avoidance, let alone all of the actual applications of the technology and generating content. Something that a few years ago, not many people though would be possible.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-10-02T11:40:19.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3738" PostTypeId="2" ParentId="3734" CreationDate="2017-10-02T11:47:16.293" Score="0" Body="&lt;p&gt;typical &lt;code&gt;for&lt;/code&gt; loop: loop over an interval. You can easily separate the control part (the successive values of the loop variable) and the calculations.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (float eur = 1; eur &amp;lt;= 10; eur += 0.5) {&#xA;  float usd = eur * 1.17345;&#xA;  println(eur,&quot;EUR is &quot;, usd, &quot; USD today&quot;);  // Processing&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;typical &lt;code&gt;while&lt;/code&gt; loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;float x = 2;&#xA;float epsilon = 0.001;&#xA;&#xA;float a = x/2;   // approximation of square root&#xA;&#xA;while(abs(a * a - x) &amp;gt; epsilon) {&#xA;  a = (x/a + a) / 2;&#xA;}&#xA;println (&quot;square root of&quot;, x, &quot;is near&quot;, a);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Two examples based on a common theme (financial calculations)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;print the table of composed interests over 10 years (loop with counter)&lt;/li&gt;&#xA;&lt;li&gt;how many years does it take to double your capital at some interest rate (while not enough, etc)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-10-02T12:00:33.980" LastActivityDate="2017-10-02T12:00:33.980" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3739" PostTypeId="2" ParentId="3734" CreationDate="2017-10-02T11:47:59.397" Score="6" Body="&lt;p&gt;If I'm interpreting your question correctly you'd like real life examples that translate to code. Maybe something like the following. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to drive or ride your bike to the ice-cream shop a few miles away. You don't know how far it is exactly but you will recognize it when you get there (while), &lt;strong&gt;VS&lt;/strong&gt; You want to ride your bike 15 miles out and then return and you have an odometer on the bike (for)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to shoot baskets until you have made 100 attempts (for) &lt;strong&gt;VS&lt;/strong&gt; You want to shoot baskets until you have made 50 successful shots (while). Outside the US, substitute &lt;em&gt;free kicks&lt;/em&gt;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to write a 15 page paper on looping in Java (for) &lt;strong&gt;VS&lt;/strong&gt; You want to work on your &quot;looping in Java&quot; paper until you are satisfied with the result (while). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to boil potatoes until a fork can be easily inserted (while) &lt;strong&gt;VS&lt;/strong&gt; You want to boil potatoes for 11 minutes (for).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To translate these into code you need some &lt;em&gt;imagined&lt;/em&gt; functions for the actual activities (&lt;code&gt;void boilPotatoes()&lt;/code&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some of them it is useful to discuss the empty case: you are already at the ice-cream shop, etc. For others, a discussion of &quot;at least one iteration&quot; might be useful to have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to include &lt;code&gt;foreach&lt;/code&gt; in the game:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You want to polish all of your mom's teacups (foreach) &lt;strong&gt;VS&lt;/strong&gt; You want to polish her ten most valuable teacups (for) &lt;strong&gt;VS&lt;/strong&gt; You want to polish teacups until you run out of polish (while). &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-02T20:10:23.877" LastActivityDate="2017-10-02T20:10:23.877" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3740" PostTypeId="2" ParentId="3734" CreationDate="2017-10-02T17:50:18.423" Score="1" Body="&lt;p&gt;You would know beforehand when the &lt;code&gt;for&lt;/code&gt; loop would terminate, this is not clear in a &lt;code&gt;while&lt;/code&gt; loop. I basically tell my students &quot;if you know when it ends, it's a &lt;code&gt;for&lt;/code&gt;&quot;. (Sure, one can construct pathological cases and there is always this &lt;code&gt;for (;;)&lt;/code&gt;, but for basic understanding this issue &lt;em&gt;is&lt;/em&gt; the crucial difference between &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;print all elements of this array is a &lt;code&gt;for&lt;/code&gt;,&lt;/li&gt;&#xA;&lt;li&gt;play so many rounds of tic-tac-toe until the human player quits: &lt;code&gt;while&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You might want to force them to convert &lt;code&gt;for&lt;/code&gt; to &lt;code&gt;while&lt;/code&gt; in an exercise and demostrate that the converse is not always possible. &lt;/p&gt;&#xA;" OwnerUserId="2879" LastActivityDate="2017-10-02T17:50:18.423" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3741" PostTypeId="1" CreationDate="2017-10-03T14:24:52.487" Score="3" ViewCount="390" Body="&lt;p&gt;I have been rewriting my unit on nested for loops for AP Computer Science (thus, we are using Java).  I would like to use some sort of physical activity to drive home the differences between roughly these three ideas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fully Un-nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;            // do something&#xA;}&#xA;for (int j = 0; j &amp;lt; 10; j++) {&#xA;            // do something&#xA;}&#xA;for (int k = 0; k &amp;lt; 10; k++) {&#xA;            // do something&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Partially Nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        // do something&#xA;    }&#xA;    for (int k = 0; k &amp;lt; 10; k++) {&#xA;        // do something&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fully Nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            // do something&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;How can I get kids out of their seats for this one?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-10-04T07:56:16.143" Title="Using physical activity to explain the nested for loop" Tags="|looping|active-learning|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3742" PostTypeId="2" ParentId="3734" CreationDate="2017-10-03T15:21:57.300" Score="1" Body="&lt;p&gt;Having looked through all the answers thus far the other day, I'm not entirely satisfied with any of them (I'll try to take the time later and go through to leave comments). However, for now, I'll post what I came up with for class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I want to emphasize that these students only know what was mentioned above, no arrays/data structures, very little in terms of methods (just some of the ones for &lt;code&gt;String&lt;/code&gt;), and little beyond the foundations of OOP (e.g., can't yet actually implement a class). Additionally, we have no hardware (or at least, not enough of it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I went with a general goal of &lt;code&gt;String&lt;/code&gt; processing, since they have done a fair amount of that. For illustrative purposes, we just printed items out to keep it simple, but discussed modifications for finding/replacing characters/patterns, other things you could do with this (we'll extend these tomorrow for nested loops). Note that they don't know &lt;code&gt;toCharArray()&lt;/code&gt; and &lt;code&gt;split()&lt;/code&gt; since we haven't yet discussed arrays, but the below examples replicate much of that functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a &lt;code&gt;for&lt;/code&gt; loop, print each character of a &lt;code&gt;String&lt;/code&gt; to its own line.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String sentence = &quot;Some example sentence&quot;;&#xA;&#xA;for (int index = 0; index &amp;lt; sentence.length(); ++index) {&#xA;    System.out.println(sentence.charAt(index));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For a &lt;code&gt;while&lt;/code&gt; loop, print each word of a &lt;code&gt;String&lt;/code&gt; to its own line.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;String sentence = &quot;Some example sentence&quot;;&#xA;&#xA;while(sentence.indexOf(' ') &amp;gt;= 0) {&#xA;    System.out.println(sentence.substring(0, sentence.indexOf(' ')));&#xA;&#xA;    sentence = sentence.substring(sentence.indexOf(' ') + 1, sentence.length());&#xA;}&#xA;&#xA;System.out.println(sentence);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes, there are better ways of writing the above, but I wanted to start by emphasizing the use of the &lt;code&gt;while&lt;/code&gt; loop, and then modifying it to handle that last word.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, this prompted a nice discussion of definite vs indefinite loops, and particularly the various shades of indefinite. One student pointed out that we could use &lt;code&gt;replaceAll()&lt;/code&gt; to figure out the number of spaces in a &lt;code&gt;String&lt;/code&gt; (i.e., replace all the spaces with nothing, compare lengths), but others thought that too much work to bother with before writing the loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I would appreciate critiques of this for next time I teach CS1.&lt;/p&gt;&#xA;" OwnerUserId="830" LastActivityDate="2017-10-03T15:21:57.300" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3743" PostTypeId="2" ParentId="3741" CreationDate="2017-10-03T16:00:28.940" Score="6" Body="&lt;h1&gt;Your pupils are already be doing nested loops.&lt;/h1&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach week {&#xA;   foreach weekday{&#xA;      wake up&#xA;      clean teeth&#xA;      eat breakfast&#xA;      goto school&#xA;      foreach period{&#xA;         goto class&#xA;         do lesson&#xA;      }&#xA;      go home&#xA;      do evening stuff&#xA;   }&#xA;   do saterday stuff&#xA;   do sunday stuff&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;What about some formulaic music.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Music has a lot of repetition, could you get them to play some music based on a nested loop algorithm. I am thinking drumming on tables, and a lot of shouting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g. something like&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Repeat 4 times:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Teacher says: “say yo 3 times”.&lt;/li&gt;&#xA;&lt;li&gt;Teacher says: “clap 4 times”&lt;/li&gt;&#xA;&lt;li&gt;Teacher says: “…”&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h1&gt;Sorting algorithms — dance, or just moving about.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Get pupils to act out sorting algorithms. And identify the loops.&#xA;Here is how to do it in the form of dance &lt;a href=&quot;http://youtube.com/watch?v=lyZQPjUT5B4&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://youtube.com/watch?v=lyZQPjUT5B4&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-04T07:56:16.143" LastActivityDate="2017-10-04T07:56:16.143" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3744" PostTypeId="2" ParentId="3741" CreationDate="2017-10-03T17:24:08.967" Score="4" Body="&lt;p&gt;Well, you may want to do this outside. You may want to have a lot of time, and for some, you might want to have medical personnel available. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To really do it as an active learning exercise, you need three student monitors, one for each loop, who will keep count and signal each iteration and the end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First suppose that the &lt;code&gt;&amp;lt;doSomething&amp;gt;&lt;/code&gt; action is the same in all cases and is simple and fast, say &lt;em&gt;clap hands&lt;/em&gt;. The three cases will have a different number of overall claps, of course, and the last will take a while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, suppose that the &lt;code&gt;&amp;lt;doSomething&amp;gt;&lt;/code&gt; actions can be different for each occurrence (I'll still assume they don't depend on the current value of the iterator.) We might have something like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fully Un-nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;            clapHandsOnce();&#xA;}&#xA;for (int j = 0; j &amp;lt; 10; j++) {&#xA;            shout(&quot;hooray&quot;);&#xA;}&#xA;for (int k = 0; k &amp;lt; 10; k++) {&#xA;            standUpSpinAroundSitDown();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Partially Nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        clapHandsOnce();&#xA;    }&#xA;    for (int k = 0; k &amp;lt; 10; k++) {&#xA;        shout(&quot;hooray&quot;);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Fully Nested&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            clapHandsOnce();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Well, in the last case, hands are pretty sore by now, but the need for medical comes in if you try: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            clapHandsOnce();&#xA;            shout(&quot;hooray&quot;);&#xA;            standUpSpinAroundSitDown();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Before you try it, I'd suggest you consider setting the upper limit of each loop a bit lower. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But still, the iteration values aren't used. So...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            shout(&quot;&quot; + i + j + k);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            shout(&quot;&quot; + 100*i + 10*j + k);&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Night falls. Parents file lawsuits....&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;There is actually a version that might be doable, and more informative as well. Consider: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i = 0; i &amp;lt; 10; i++) {&#xA;    standUpSpinAroundSitDown();&#xA;    for (int j = 0; j &amp;lt; 10; j++) {&#xA;        shout(&quot;hooray&quot;);&#xA;        for (int k = 0; k &amp;lt; 10; k++) {&#xA;            clapHandsOnce();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Your monitors will have a bit more to do here, perhaps, choreographing their parts, but the interleaving is instructive as to what is going on. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-03T18:51:43.330" LastActivityDate="2017-10-03T18:51:43.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3746" PostTypeId="2" ParentId="3728" CreationDate="2017-10-04T06:56:19.667" Score="1" Body="&lt;p&gt;Centuries ago (1978) I saw a graph in Creative Computing. &#xA;It was the cost of writing a line of code divided by the cost of executing it and realised there was good money to be had there. We were as poor as UK people get and programming, unlike the media, isn't determined by how pretty you are or in the case of the BBC who you are related to, the colour of your skin or your gender.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A C++ compiler simply doesn't care about those things. I make references to the media here because they go on about &quot;sexism&quot; and &quot;racism&quot; in Tech when even the best of them are far worse than anything you hear about Uber.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now live in a rather nice house, my kids at a reassuringly expensive school. &#xA;Programming has been good to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes I enjoy problems solving, am vaguely competent at maths and can focus hard on things where necessary, but those are useful elsewhere, in coding they are well rewarded.&lt;/p&gt;&#xA;" OwnerUserId="683" LastEditorUserId="41" LastEditDate="2017-10-04T11:44:52.090" LastActivityDate="2017-10-04T11:44:52.090" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3747" PostTypeId="1" CreationDate="2017-10-04T16:19:46.850" Score="30" ViewCount="12952" Body="&lt;p&gt;For a few years, I have been teaching a programming class to first-year electrical engineering students -- thus, this is their first contact with computer programming. The language used is C (although this year I started using Logo for the first few weeks as it presents a smaller barrier to entry for a gentler introduction to the practice of programming).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although the students have issues with many topics of the course, many of them are with more complicated concepts such as recursions and data structures. However, one point that I feel should be easy, yet I'm somehow not getting across to them, is the importance of returning a value in a function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concretely, say I want to calculate the norm of a two-dimensional vector, and break it down into the smallest possible functions. So rather than writing something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double norm(double x, double y)&#xA;{&#xA;  return sqrt(x*x + y*y);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I might write something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double add(double x, double y)&#xA;{&#xA;  return x + y;&#xA;}&#xA;&#xA;double square(double x)&#xA;{&#xA;  return x*x;&#xA;}&#xA;&#xA;double norm(double x, double y)&#xA;{&#xA;  return sqrt(add(square(x),square(y)));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Although my students have no problem understanding this breakdown of functions, if I left it for them to write the code, they would probably write something along the following lines, which obviously wouldn't work, and they would be unable to figure out why:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double add(double x, double y)&#xA;{&#xA;  double sum = x + y;&#xA;  printf(&quot;the sum of x and y is %lf\n&quot;, sum);&#xA;}&#xA;&#xA;double square(double x)&#xA;{&#xA;  double sq = x*x;&#xA;  printf(&quot;the square of x is %lf\n&quot;, sq);&#xA;}&#xA;&#xA;double norm(double x, double y)&#xA;{&#xA;  double result = sqrt(add(square(x),square(y)));&#xA;  printf(&quot;the norm of (x,y) is %lf\n&quot;, result);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: this isn't actual code that any of my students have written. This is just how I imagine they'd write it if I just sticked to their suggestions during the coding session.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What kind of analogies, objections, examples, counterexamples or strategies could I try to get them to understand that, by printing from a function, the value is not &quot;routed&quot; to the rest of the program, and thus the remainder of the computation will have no access to it?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Extra details&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I try to introduce the concept of a CS function by analogy with a mathematical function, say $f(x) = x^2$ (I understand there is the issue of side effects in a CS function, which don't exist in a mathematical function, but I do try to mention this point). I show them how a parameter is passed (in this case $x$) and an operation is performed on it. Passing a parameter is a concept that they grasp easily enough, however most of my students appear somehow unable to understand the seemingly symmetrical issue of returning a value from that function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, by the point I start talking about functions, I have already introduced the printf() function and shown how it can print the value of variables to the screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, whenever I propose a problem which uses a function and try to engage the class to help me write code for it, they always get stuck when it comes the point of returning the value from the function. They do understand the importance of getting the value out of the function, but they always suggest I do it using printf() rather than return. Clearly this introduces a problem for the program we are writing because although we can see the intermediate results, there is no (sensible) way to consume the output stream in the rest of the program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although they do understand the importance of getting the computed value out of the function, they seem to think it's OK if it's just printed with printf() rather than properly returned from the function. I try to object that once something is printed to the screen, although it does show you, the programmer, the value in question, the computer can't &quot;read&quot; a printed value back from the screen gives that it's now just an assorted bunch of pixels on the screen. I even tried to make some kind of analogy with trying to present a picture of a written word to Google (say &quot;programming&quot;) and having Google search for that word. However, somehow they don't just get this point.&lt;/p&gt;&#xA;" OwnerUserId="3209" LastEditorUserId="3209" LastEditDate="2017-10-04T18:31:38.230" LastActivityDate="2018-01-29T15:41:03.767" Title="Teaching students that printf() is not the same as return" Tags="|teaching-analogy|introductory-lesson|" AnswerCount="21" CommentCount="19" ContentLicense="CC BY-SA 3.0" />
  <row Id="3748" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T18:00:32.913" Score="19" Body="&lt;p&gt;I think that this problem is pretty widespread, actually. I believe that it comes from a misunderstanding of the difference between what the program/computer can know/do and what the person operating it can know/do. I think the problem is worse for interactive systems where the printf sends its output to the screen in front of the person running the program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many students with this misconception will print the output of a function and then write code to ask the user to type it back in so that the computer can &quot;learn&quot; the earlier result and then continue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was more obvious that it didn't work in the (very) old days when print sent its output to a chain printer in the back room of the computer center and you had to go ask for it. **&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be enough to just explain this to them explicitly, but maybe not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you might have a little &quot;active learning&quot; exercise like this. You will want four &quot;players&quot;, one for the &lt;strong&gt;operator&lt;/strong&gt;, one for a function (&lt;strong&gt;main&lt;/strong&gt;) that calls others, the third for a function (&lt;strong&gt;sum&lt;/strong&gt;) and the fourth for another function (&lt;strong&gt;product&lt;/strong&gt;) . &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The operator wants to know the value of 3 * (4 + 5); It/he/she asks main for the result. Function main will actually print (pseudocode - omitting details)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;main()&#xA;    x = sum(4, 5)&#xA;    y = product(3, x)&#xA;    print(y)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sum(a, b) wants to compute the sum of a and b and &quot;do something&quot; with it. &lt;/li&gt;&#xA;&lt;li&gt;product(a, b) wants to compute the product of a and b and &quot;do something&quot; with it. &lt;/li&gt;&#xA;&lt;li&gt;print writes a value on a piece of paper and hands it to the &lt;strong&gt;operator&lt;/strong&gt;. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now there are two versions of sum and product; like this (only sum is shown):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sum(a, b)&#xA;    return a + b&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sum(a, b)&#xA;    print(a + b)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;return x is implemented by writing a value x on a piece of paper and handing it back to the person who asked you to execute (this will be &lt;strong&gt;main&lt;/strong&gt; in each case), whereas print x hands the paper back to the operator. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Now run the simulation with each version of sum and product. Note how with the printing version of sum, the paper goes back to the operator and the main (function/person) doesn't have any value to continue with so it gets stuck. With the return version, the sum goes back to main and so it/he/she can continue. Only one paper is ever handed to the operator and there is no getting stuck.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write out the program fragments on index cards and give them to the players. The &quot;sum&quot; player has only one version of the function in each simulation. The &quot;main&quot; player has the code for main above. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that print and return always operate the same - paper to operator vs paper to caller. The operator actually asks main for an operation: &quot;Main run&quot;.&lt;br&gt;&#xA;Player &quot;main&quot; actually asks sum and product for an operation: &quot;sum  3, 4&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found it helpful to have sticky notes with the role names that the players can stick on their shirts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is probably necessary to do the return version first. This will make the contrast more clear. You may have to run each more than once, and you may have to talk through the &quot;execution&quot;. You should almost certainly ask for questions. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me note two things about this idea:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Lots of misconceptions can be dispelled with a &quot;play acting&quot; active learning exercise like this. &quot;Play the computer&quot; is often helpful. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Doing this proactively, as part of introducing return or print is probably not a good idea. Most students will &quot;get it&quot; from a simpler and shorter explanation. So this is the sort of thing you have in your &lt;em&gt;kit bag&lt;/em&gt; for emergencies. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-04T18:15:19.490" LastActivityDate="2017-10-04T18:15:19.490" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3749" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T18:21:56.230" Score="10" Body="&lt;p&gt;Whenever I run into students who are baffled by the return concept (and in your case, them substituting it with printf), I do something like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use role-play. I become one function (lets say the main function) and the student is another function (lets say some function add that adds two numbers and returns the values). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how the role play works. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I write two numbers on a piece of paper and give it to the student. In the code, this is like, I am the main function calling the add function and sending two values.&lt;/li&gt;&#xA;&lt;li&gt;Now, the agreement is that the student cannot just shout the answer (this is like printf in the code) &lt;/li&gt;&#xA;&lt;li&gt;Since shouting is not an option, the only way the student can let me have the answer is to 'return' me a piece of paper which contains the answer, which is the total of the two numbers I gave in step 1. &lt;/li&gt;&#xA;&lt;li&gt;So, the student returns me the piece of paper. This in the code becomes, the value being returned.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What I do is, I emphasize the fact that printf is like shouting, which does not help me as I need the answer on a piece of paper that must be returned explicitly. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastEditorUserId="2605" LastEditDate="2017-10-05T11:36:19.367" LastActivityDate="2017-10-05T11:36:19.367" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3750" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T18:25:38.287" Score="3" Body="&lt;p&gt;After doing @Buffy's active learning, the next step would be.&lt;/p&gt;&#xA;&lt;p&gt;For you to to create the program, and remove the guts of the functions. Just the skeletons for the students to fill in.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int main(){&#xA;  print norm(4,7);&#xA;}&#xA;&#xA;double add(double x, double y)&#xA;{&#xA;  return 0;&#xA;}&#xA;&#xA;double square(double x)&#xA;{&#xA;  return 0;&#xA;}&#xA;&#xA;double norm(double x, double y)&#xA;{&#xA;  return 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;They have to take your code and change the 0s to the correct code.&lt;/p&gt;&#xA;&lt;h1&gt;Parsons problems&lt;/h1&gt;&#xA;&lt;p&gt;Give them all of the correct code, but in the wrong order. They have to rearrange it.&lt;/p&gt;&#xA;&lt;p&gt;Pupils can do a lot of these in a short time. Each one is, supposedly, nearly as powerful as doing a normal programming exercise. However you can do more of them, and there is less frustration.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-08T17:30:17.063" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3751" PostTypeId="1" AcceptedAnswerId="3753" CreationDate="2017-10-04T18:51:56.440" Score="10" ViewCount="231" Body="&lt;p&gt;I found the following example in chapter two of &lt;a href=&quot;https://github.com/mdipierro/nlib&quot; rel=&quot;noreferrer&quot;&gt;Annotated Algorithms in Python&lt;/a&gt; (&lt;a href=&quot;https://raw.githubusercontent.com/mdipierro/nlib/master/docs/book_numerical.pdf&quot; rel=&quot;noreferrer&quot;&gt;PDF&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; for i in [1, 2, 3]:&#xA;... print i&#xA;... continue&#xA;... print 'test'&#xA;1&#xA;2&#xA;3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This does demonstrate what &lt;code&gt;continue&lt;/code&gt; does, but you would never write something like this in real code. You would just leave out &lt;code&gt;continue&lt;/code&gt; and &lt;code&gt;print &quot;test&quot;&lt;/code&gt; entirely. It seems like this example might be counter-productive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another type of example that I have seen elsewhere that I think might be counter-productive is indexing into string literals. For example, in some languages you can write the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;Hello World!&quot;[0]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which would evaluate to &lt;code&gt;&quot;H&quot;&lt;/code&gt; but if you actually wanted an expression that evaluated to &lt;code&gt;&quot;H&quot;&lt;/code&gt;, you would just use &lt;code&gt;&quot;H&quot;&lt;/code&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does it make sense to use contrived examples like this, or is it likely to introduce confusion in students?&lt;/p&gt;&#xA;" OwnerUserId="3211" LastActivityDate="2017-10-04T19:33:43.863" Title="Is it bad to introduce language features in ways that are different than they will be used in practice?" Tags="|introductory-lesson|" AnswerCount="1" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3752" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T19:18:00.930" Score="2" Body="&lt;p&gt;My guess is that the gap in the learning comes from not recognising what variables are and the concepts we're familiar with for data storage. I can imagine that for maths/engineering students, the fluidity and connected nature of equations makes the problem worse. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In circuit design for example, modules will be familiar. These are blocks that have interfaces, some inputs, some outputs, some power. The operation of the module is a continuous process, connections being made with wires.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two connected parts that I think will be useful to show to your students about what a computer program is trying to represent (and the fact that it's an abstraction might be something to explain to them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, computers perform basic steps one at a time (or in blocks, or several at a time, but always in a limited scope). Think of buckets of water rather than a hose pipe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second is the concept of doing the work on individual blocks of data. This data has to be stored somewhere. It could be the water in your buckets (which can be split up, coloured, mixed, etc). Computers don't do mixer taps, they have to take the items they're working on piece by piece and work on each element. If they know about integration using calculus, the difference between discrete and continuous items shouldn't be a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think if you review the way you're teaching variables, also show that to process code, a computer (a general purpose machine) follows its instructions to operate in steps, it will be easier to show that the result of an operation always needs to be stored somewhere (not just for functions), so a program is &lt;strong&gt;different&lt;/strong&gt; to a circuit. An electrical module is fixed at it's location in a circuit, but a software function can be called from different places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a program, whenever a function is called, there is a place defined to put the result. This isn't 'in' the function, it's 'in' the code that calls the function. (of course, if it's not used, then the computer knows it doesn't actually need to bother with it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure you need to have your students moving the data, but showing containers for data does help. The numbers in envelopes fits best if you use it to show how add, multiply etc. work - before you get to the functions. Playing out the operation of the machine requires a few more steps to make it complete, if you act it out, then you can avoid some of the details that they don't ask about...&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-10-04T19:18:00.930" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3753" PostTypeId="2" ParentId="3751" CreationDate="2017-10-04T19:33:43.863" Score="7" Body="&lt;p&gt;This sort of thing is perfectly valid and valuable, provided that students already understand the underlying structure. So if they understand your first loop without continue (but with the print in place) the adding &lt;code&gt;continue&lt;/code&gt; lets them see the effect dramatically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same is true of your second example. If they understand strings as arrays or lists (or ... whatever term is appropriate in your language) then introducing the [] &quot;box&quot; operator as selection makes sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I wouldn't write a large program as an exemplar of good programming if it had these kinds of things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But note also, that throwing in a continue in a loop is sometimes good for debugging, so it isn't entirely useless as a technique in &quot;real&quot; programming. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;tl;dr teaching by showing modifications to a known base is fine.&lt;/h3&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;By the way. In some languages asking students to decipher obfuscated code can be a useful exercise to make sure they know the basic rules. Asking them to clean it up is even better.   &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-04T19:33:43.863" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3754" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T22:02:38.927" Score="1" Body="&lt;p&gt;Many helpful suggestions all around, from each of the different answers. In reading all of them, I was inspired to follow along with the advice of role-playing in a specific way that I thought up, which I will try to describe in this answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I need to choose a piece of example code, say the vector norm one in the question or a different one, but suppose it's the vector norm for the following exposition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will get students to volunteer for acting out the different functions: main(), square(), add(), sqrt(), norm(), printf() and (although this is somewhat conceptually wrong, but I believe will be helpful) return. Code will be provided in two styles for each of the computational functions (square(), add(), sqrt() and norm()): the correct way using return and the wrong way using printf().&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Passing of parameters will happen by writing values to a piece of paper. Students should write the required values and keep them hidden. Whenever a function call takes place, the student acting out that function will only go ahead with the computation once he gets out the required pieces of paper corresponding to the parameters passed to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The key point I am considering to make is to distinguish between the insides of the computer (corresponding e.g. to the CPU) and what's visible by the outside user (e.g. the screen).&lt;/strong&gt; Thus, I will erect a physical barrier (possibly using e.g. a wall of students) between the inside and the outside of the computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When acting printf() out, I will request the corresponding student to breach the barrier between the inside of the computer and the outside, stepping to the other side of the wall of students, and then showing the piece of paper for everyone to see (as if the rest of the class represented the user of the program). However, the students on the inside of the barrier (representing functions executing on the CPU) will be unable to see the piece of paper shown by the printf()-acting student. Also, I will request that the printf()-acting student hide each piece of paper after showing them to the rest of the class. Hopefully this will make it clear to them that after printing something with printf(), you're starving the functions that come after it of the required data to continue the computation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, the student acting out return will be asked to deliver the piece of paper to the student acting out the calling function, but not show it to the rest of the class (i.e. not breaching the barrier between the inside and outside of the computer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully, after acting out the two versions of the code (using printf() and using return) in this way, it will become clear to the students exactly what happens in each situation. After trying this out and giving some time to see if the students indeed grasped the importance of return vs. printf(), I will report back here on whether the idea worked. Also, I appreciate any comments on ways to improve this specific strategy that I have described.&lt;/p&gt;&#xA;" OwnerUserId="3209" LastActivityDate="2017-10-04T22:02:38.927" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3755" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T22:13:26.043" Score="31" Body="&lt;p&gt;I think this is a problem where the answer is partly in the prevention. I've observed many classes where printing is the method used to access the results of calculations for several weeks, both within functions and within &lt;code&gt;main()&lt;/code&gt;. Then, return values of functions are suddenly introduced, but, they only serve to pass the result to main to be printed once again. &lt;strong&gt;No wonder students think they are the same---they are functionally equivalent in just about every example!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Setting a standard that printing only happens in &lt;code&gt;main()&lt;/code&gt; may help. Good coding practice too.&lt;/li&gt;&#xA;&lt;li&gt;Talking about return values of functions early, and using sample tests (e.g. &quot;What is returned by my_func(4)? By my_func(0)? By my_func(-4)?&quot;) may help.&lt;/li&gt;&#xA;&lt;li&gt;Showing that it's possible to write code without printing, such as on CloudCoder or in Websheets, may help.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Good luck!!&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="1189" LastEditDate="2017-10-04T23:13:59.060" LastActivityDate="2017-10-04T23:13:59.060" CommentCount="14" ContentLicense="CC BY-SA 3.0" />
  <row Id="3756" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T22:25:57.847" Score="12" Body="&lt;p&gt;This is such a consistent trap that I ultimately created a worksheet to deal with it.  At this point in my course, I have recently covered binary and hexadecimal, so I also use this worksheet as an opportunity to gently review those concepts.&lt;/p&gt;&#xA;&lt;p&gt;My worksheet may not be as physically active as some of the lessons that have already been posted, but it is highly practical.  The entire activity takes 10 minutes &lt;em&gt;at most&lt;/em&gt;, it reviews some additional concepts, and (because the distinction being made is fairly simple) they never seem to get confused again afterwards.  It could also be given as a very easy homework assignment.&lt;/p&gt;&#xA;&lt;p&gt;The top reads:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Sometimes we use System.out.println, and sometimes we use return.  Remember the difference?  Returns are for giving information back to the computer, while printlns are for giving information &lt;em&gt;in text form&lt;/em&gt; directly to the human user.&lt;/p&gt;&#xA;&lt;p&gt;Consider the following scenarios.  For each scenario, if it would be appropriate to use a return, write 1.  If it would be appropriate to use a println, write 0.  At the end, please write out the secret hexadecimal message!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;What follows are 16 short questions in a table.  And just to give you a flavor for the kinds of questions asked, the first question is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In a 3D rendering program at an animation studio, a method calculates a double representing the exact value of brightness of each pixel in the frame.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The final message is the hexadecimal number &lt;code&gt;f1ea&lt;/code&gt;, which is nice because &lt;strike&gt;fleas are so cuddly&lt;/strike&gt; it is easy to check.  (As an added bonus, kids who answer incorrectly are forced to decode the hex back to binary to figure out which questions they need to reconsider.)&lt;/p&gt;&#xA;&lt;p&gt;Reviewing the worksheet in class takes almost no time at all.  The kids get a kick out of the secret message, it reviews a prior concept, and (as I mentioned above), the entire activity is quite short.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-05T09:49:16.453" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3757" PostTypeId="2" ParentId="3747" CreationDate="2017-10-04T23:12:53.657" Score="2" Body="&lt;p&gt;I want to give a really simple solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let 2 students stand up, student 1 = s1 = caller, student 2 = s2 = function&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell one to take a pen with a cap and give it to s1&lt;/p&gt;&#xA;&#xA;&lt;p&gt;s2 is the function.Tell s1 to give the pen to s2 (&quot;parameter&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;s2 has to remove the cap (&quot;function&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you have 2 options to tell the s2, aka the &quot;function&quot; what to do after executing, return or printf&lt;/p&gt;&#xA;&#xA;&lt;p&gt;if s2 hands the pen with removed cap to the s1, he &quot;returned&quot;. If s2 tells s1 what he did it's &quot;printf&quot;&lt;/p&gt;&#xA;" OwnerUserId="3212" LastActivityDate="2017-10-04T23:12:53.657" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3758" PostTypeId="1" CreationDate="2017-10-05T02:12:21.973" Score="4" ViewCount="133" Body="&lt;p&gt;I've been looking for &lt;a href=&quot;https://www.youtube.com/watch?v=tpAEx2abKBQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;peer instruction&lt;/a&gt; style questions for an intro to Arduino workshop, but I haven't found anything. Besides not seeing PI materials, it's hard to find any materials where a student has to self-explain their own knowledge or discuss with classmates. Most resources are in a tutorial style where the student is expected to essentially copy a given configuration. I'm worried that this will lead to low understanding and not change students' misconceptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want materials that ask students to discuss their understanding of&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How an LED light works&lt;/li&gt;&#xA;&lt;li&gt;How digital pins are different than analog pins&lt;/li&gt;&#xA;&lt;li&gt;How code is sent and stored on the Arduino board&lt;/li&gt;&#xA;&lt;li&gt;What functions like digitalWrite() and setup() actually do&lt;/li&gt;&#xA;&lt;li&gt;Ideally, given that you know so far, how would you _____ ?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Do you know of any such materials for Arduino?&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="2045" LastEditDate="2017-10-14T20:26:15.303" LastActivityDate="2017-10-15T12:51:01.413" Title="Teaching Arduino---but not just &quot;monkey see monkey do&quot;" Tags="|resource-request|arduino|active-learning|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3759" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T04:33:06.460" Score="2" Body="&lt;p&gt;Same problem here for some time as students were taught in earlier classes to write algorithms as input → compute → print.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach in Python so using the console I can refrain completely from using print, but found that I had to explicitly disrupt the bad pattern.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students do not need to fully understand the notion of value returning in the first course (the third one is sufficient), what they need to understand is that printing is more restrictive than returning. This is easy to explain that one can always decide to print a value one got from a return but unprinting is not possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So when writing code that you want to be able to reuse, you return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they can manage a little arithmetic, the following exercise is nice :&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Write a naive function that tells if an integer is prime.&lt;/li&gt;&#xA;&lt;li&gt;Write a function that tells if an integer n is pseudo-prime (defined as : for all a &amp;lt; n, n divides a^n - a).&lt;/li&gt;&#xA;&lt;li&gt;Find the smallest integer that is pseudo-prime but not prime (561).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This will be unsufferable if the first two functions print instead of returning.&lt;/p&gt;&#xA;" OwnerUserId="2574" LastEditorUserId="2574" LastEditDate="2017-10-05T19:52:34.463" LastActivityDate="2017-10-05T19:52:34.463" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3760" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T05:18:52.600" Score="7" Body="&lt;p&gt;Have you considered not teaching them about &lt;code&gt;printf&lt;/code&gt; at all?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;99% of the use of &lt;code&gt;printf&lt;/code&gt; is as a poor-man's debugger. Teach them how to properly use a debugger to step through their code, and inspect their variables, rather than defensively printing out everything all the time, and doing post-mortems on log output.&lt;/p&gt;&#xA;" OwnerUserId="1041" LastActivityDate="2017-10-05T05:18:52.600" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3761" PostTypeId="1" CreationDate="2017-10-05T07:32:50.390" Score="2" ViewCount="1297" Body="&lt;p&gt;I'm working at the university in a computer lab and I'm looking for a Microsoft Windows software, that would enable me to cast a screen of my computer (master) to all other student's computers which are in the same local network.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have already found several different solutions, but &lt;strong&gt;none of them enables me to force the slave computers to start the screen casting software&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea here is, when I'm showing something on my computer I would start the screen casting software on all slave computers, and students won't be able to close this window until i'm done.&#xA;Does software like this exist?&lt;/p&gt;&#xA;" OwnerUserId="3214" LastEditorUserId="1293" LastEditDate="2017-10-11T18:27:12.897" LastActivityDate="2017-10-11T18:27:12.897" Title="Looking for software that would enable me to cast a screen over LAN" Tags="|classroom-infrastructure|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3762" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T07:32:58.620" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;However, one point that I feel should be easy, yet I'm somehow not getting across to them, is the importance of returning a value in a function.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then focus on that.&lt;BR&gt;&#xA;I know, you think you are doing that (so much, that you've gone to the extent of asking here about that).  However, you're not, as I will demonstrate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People love to have their needs fulfilled.  So, give them some clear needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Teachable moments:&lt;/strong&gt;&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I'd like to point out some possibly-great teaching moments that this code offers, so you don't miss this opportunity:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;if I left it for them to write the code, they would probably write something along the following lines, which obviously wouldn't work, and they would be unable to figure out why:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;(3 functions that each &quot;printf&quot;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Looking at those examples, the &quot;square&quot; function takes a value of x, and the printf you wrote states, &lt;code&gt;printf(&quot;the square of x is&lt;/code&gt;...  Later, you call &lt;code&gt;square(x),square(y)&lt;/code&gt;.  I'm guessing that some (and perhaps many) students would be perplexed by the result.  When you call &quot;square(x)&quot;, it says &quot;the square of x is&quot;.  However, when you call &quot;square(y)&quot;, the code says &quot;the square of x is&quot;.  Some students might not understand the discrepancy (of why the code says &lt;code&gt;x&lt;/code&gt; when it refers to a value which is clearly identified as &lt;code&gt;y&lt;/code&gt;), which they may not have noticed until you point it out (because when they read the source code of the square function, everything looks like an x and so it makes sense.  But then you point out something that doesn't make as much sense, and they may wonder why it doesn't make sense.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This conundrum could be addressed by focusing on the situation in 3 different ways:&#xA;&lt;UL&gt;&lt;LI&gt;the passed value (&quot;when we say x, we really mean the first parameter&quot;),&#xA;&lt;/LI&gt;&lt;LI&gt;or the difference between &quot;x&quot; as a variable and &quot;x&quot; as part of a literal string,&#xA;&lt;/LI&gt;&lt;LI&gt;or looking at the &quot;scope&quot; of a variable, pointing out that we have multiple x's, and so the y in the norm function becomes the x of the square function, and that doesn't affect the x in the norm function, because references to x are not affecting a global variable named x&#xA;&lt;/LI&gt;&lt;/UL&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there are multiple teachable points to bring up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Simplification Helps:&lt;/strong&gt;&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, another item I'd like to note about this code...&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're also complicating things by taking add()'s return value and passing it to sqrt().  So you have a double-call, which may be harder to grasp than a simpler example.  You could simplify the example simply by storing add()'s results to a variable that will then get passed to sqrt().  For experienced experts like us, that looks like an extra variable and needless complexity that makes the code longer.  However, breaking it into separate steps, where each step is short and direct, is actually simpler and will be easier for people to grasp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the reason I'm pointing this out now is so I don't need to explain it in the middle of my upcoming finale (to reduce how much I jump to one topic in the middle of explaining another topic).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;People love to have needs solved:&lt;/strong&gt;&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I'd like to get back a bit more to focusing on the solution to your base question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I point out that your students may be quite &quot;right&quot;...  from their perspective.  And that may be why they are struggling to grasp what you're trying to demonstrate/teach to them.  Their paradigm may need to be shifted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the goal?  If they think the goal is &quot;to get the computer to print out the needed data&quot;, then it is very sensible for them to want to &quot;print out data as soon as we have it, and then have no more use for the data&quot; and allow the data to be discarded without being returned.  That actually seems more efficient than trying to retain the data just to do work later.  They may be following some principles of efficiency, which might actually be a good thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that the solution might be to provide another example.  Demonstrate the use of a returned value.  Note: I did not just say, &quot;demonstrate a return value being used&quot;.  You technically do that, as the norm() function's add() call uses what gets returned by &quot;square&quot;.  (And you actually do that twice, as I noted earlier when I mentioned you're doing a complicated nested/double call.)  What I'm saying is to clearly show just how the concept ends up being useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take the returned value, and demonstrate using the returned value multiple times.  First takes the results of square(x), and pass that to add().  However, then do something else useful with x.  (Print it out again, in another context.  Maybe perform a test of some sort, and ensure that is done after the value would be corrupted by an earlier step.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they will see why the main() function needs to keep track of x.  The simple reason is that the value of x gets used multiple times, over and over again.  They can't just &quot;print and forget&quot; x, because the value of x because a valuable thing, and therefore must be preserved and protected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the students to understand the concept of a function returning a value, then give them a reason to see a need for the concept being effectively used.  As described in the prior two paragraphs, that can be very simple in nature.  When you can show them a simple-to-see example of how it is being used effectively, their natural instinct will be, &quot;Well of course that's how it works.  That would be the simple and straightforward method of accomplishing exactly what I see is being accomplished.&quot;  Once they see those mechanics being clearly used, they will more readily understand how the mechanic operates.  Then they may be more open to understanding just how that can be effectively useful in different scenarios (which hopefully you can demonstrate with some more prepared examples).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Syntax Error:&lt;/strong&gt;&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: the code you showed is buggy.  Well, we knew that.  The desired point of the square function is to make sure that x is usefully being returned, and the problem you point out is that the example code just tries to use x immediately without returning it.  A possibly-great thing to do is to show the problem, by demonstrating what happens when x isn't returned, and then x not working as designed in a later location when x is needed.  However, you may not be able to effectively demonstrate &lt;em&gt;that&lt;/em&gt; bug, because there is another bug.  The code just simply won't run at all, because the C complier is going to complain that the &quot;square&quot; function is declared to return a double, but then there isn't a return statement.  Since you have a syntax error, you won't be able to get cooperation from the C compiler, which means you won't be able to run wrong code that demonstrates the logical flaw in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to correct the code so that it &lt;em&gt;looks&lt;/em&gt; better, and instead of the compiler visibly reporting a problem, you end up having runnable code that is flawed.  (Instead of an obvious error, you have an error that is more difficult to notice.  That's actually worse.  Demonstrating that can be another great thing that you can teach them.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Review/Summary:&lt;/strong&gt;&lt;BR&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;UL&gt;&lt;LI&gt;&#xA;The key answer to your question is: demonstrate the worth of having x being returned, so that x can be used multiple times by the calling function&#xA;&lt;UL&gt;&lt;LI&gt;&#xA;That's the simple core of the answer that directly addresses your main question&#xA;&lt;/LI&gt;&lt;/UL&gt;&#xA;&lt;/LI&gt;&lt;LI&gt;&#xA;I see several other opportunities of bringing up some topics that would be good to point out to novices, and so I've pointed them out so that you can take advantage of these instead of missing any of the ones I noticed.&#xA;&lt;UL&gt;&lt;LI&gt;&#xA;The different ways that the symbol &quot;x&quot; gets used provides multiple teachable moments.&#xA;&lt;UL&gt;&lt;LI&gt;To keep this summary shorter, I don't repeat every one of those topics, but just look for the prior bullet points, because each one of those bullet points represents an important topic that is worth independent discussion.&#xA;&lt;/LI&gt;&lt;/UL&gt;&#xA;&lt;/LI&gt;&lt;LI&gt;&#xA;Try not to do any more than one function call at a time until they understand the mechanics of the life cycle of calling a function, including the return value&#xA;&lt;/LI&gt;&lt;LI&gt;&#xA;You've positively set yourself up with an excellent opportunity to demonstrate how a very-wrong error can cause visible complaints by the compiler, but a sneaky error may provide okay-looking wrong values, which can be harder to notice and are, therefore, even worse.&#xA;&lt;/LI&gt;&lt;/UL&gt;&#xA;&lt;/LI&gt;&lt;/UL&gt;&lt;/p&gt;&#xA;" OwnerUserId="1676" LastEditorUserId="1676" LastEditDate="2017-10-05T08:36:15.647" LastActivityDate="2017-10-05T08:36:15.647" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3763" PostTypeId="2" ParentId="3761" CreationDate="2017-10-05T08:32:13.403" Score="1" Body="&lt;p&gt;I know of two bits of software that can do what you want.&lt;/p&gt;&#xA;&lt;p&gt;They do what you are looking for, display stuff on their screen and do demonstrations on their screen. They also lets you spy on your pupils, blank screens, lock screens (useful if they are not paying attention), and shutdown computers at end of day.&lt;/p&gt;&#xA;&lt;h1&gt;AB Tutor&lt;/h1&gt;&#xA;&lt;p&gt;I have used this software, in the schools I have worked in.&#xA;On the negative side it is proprietary, and expensive.&lt;/p&gt;&#xA;&lt;h1&gt;Veyon&lt;/h1&gt;&#xA;&lt;p&gt;I have not used it. But it is Free Software and cheep.&#xA;See &lt;a href=&quot;http://veyon.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://veyon.io/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-08T17:41:12.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3764" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T08:33:56.540" Score="1" Body="&lt;p&gt;I don't know your concept of teaching and chronical order of the topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What i really love to teach, is the use of the debugger. Show them what is happening in Memory (Stack, etc). If you're using MS Visual Studio or similar tools you can walk through your program by watching your variables and memory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an easy understanding (very rudimentary) return handles the passing of a value from a function back to the caller or moving content of one memory address to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the opposite printf shows formatted memory content and/or text to the user on the command line (stdout). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just for fun and teaching purposes your student can write their own printf function. Not as a varidic one(*), but rather a simplified one that just puts out characters to stdout. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(*) although this could be fun too later on, but including the teaching why these function are risky too in use (memory leaks).&lt;/p&gt;&#xA;" OwnerUserId="3216" LastEditorUserId="3216" LastEditDate="2018-01-29T15:41:03.767" LastActivityDate="2018-01-29T15:41:03.767" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3765" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T09:32:41.753" Score="2" Body="&lt;h2&gt;Try to keep it simple.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;printf() is a function for &lt;strong&gt;humans&lt;/strong&gt;. Anything which printf() outputs is ignored by the program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;return() is a function (a control instruction) for the &lt;strong&gt;program&lt;/strong&gt;. Anything it does is not (directly) observable by the human.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, everyone here knows about side-effects and that printf() actually returns something, but I guess we don't shove the sad students into such areas...yet. However, it would be interesting to check what happens when you start explaining scanf() by starting with buffer overflow exploits and machine code...&lt;/p&gt;&#xA;" OwnerUserId="2101" LastActivityDate="2017-10-05T09:32:41.753" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3766" PostTypeId="1" CreationDate="2017-10-05T10:19:41.070" Score="9" ViewCount="810" Body="&lt;p&gt;We've just uploaded &lt;a href=&quot;https://www.youtube.com/watch?v=M2Zerjl4Vmo&quot; rel=&quot;nofollow noreferrer&quot;&gt;a video of a presentation&lt;/a&gt; Simon Peyton Jones and I did about &lt;a href=&quot;http://bit.ly/projectquantum&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Quantum&lt;/a&gt; to CAS TV. Project Quantum is an attempt to crowd-source low-stakes formative assessment items for computing; we've just over 5,500 questions at the moment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I boldly (and perhaps erroneously) claim that there's no bit of the computing curriculum for which we can't create multiple choice questions (MCQs). Note, this is rather different from claiming we only need to use MCQs to assess learning in computing, which is very far from what I believe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My colleague Pete Kemp remarks on &lt;a href=&quot;https://www.facebook.com/mberry001/posts/1580631735308765&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Facebook&lt;/a&gt; that he's &quot;still waiting on a Q for abstraction that isn't about definitions...&quot;. &lt;a href=&quot;https://diagnosticquestions.com/Questions?CurrentSubjectId=1688&amp;amp;OrderBy=Newest&amp;amp;IsByStudent=False&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt;'s what we have on the Diagnostic Questions site at present (free registration required).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do &lt;em&gt;you&lt;/em&gt; assess whether your pupils understand, or indeed can apply, abstraction? Could you knit this into an MCQ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples (of far from satisfactory questions) from &lt;a href=&quot;https://diagnosticquestions.com/Questions?CurrentSubjectId=1688&amp;amp;OrderBy=Newest&amp;amp;IsByStudent=False&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://diagnosticquestions.com/Questions?CurrentSubjectId=1688&amp;amp;OrderBy=Newest&amp;amp;IsByStudent=False&lt;/a&gt; All CC-SA&#xA;&lt;a href=&quot;https://i.stack.imgur.com/6oJcN.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/6oJcN.png&quot; alt=&quot;subjective  MCQ&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/AiCBF.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/AiCBF.png&quot; alt=&quot;tests a defintion MCQ&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="44" LastEditorUserId="44" LastEditDate="2017-10-06T11:44:07.813" LastActivityDate="2017-10-08T15:38:38.030" Title="How do you assess students' understanding of abstraction?" Tags="|assessment|abstraction|computational-thinking|" AnswerCount="5" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="3767" PostTypeId="1" CreationDate="2017-10-05T13:19:34.600" Score="4" ViewCount="84" Body="&lt;p&gt;In Maryland, we hope to be funded by a grant that will allow us to write a K-5 computer science curriculum to address the Computer Science Teachers Association (CSTA) &lt;a href=&quot;http://www.csteachers.org/page/standards&quot; rel=&quot;nofollow noreferrer&quot;&gt;K-12 Computer Science standards&lt;/a&gt;.  This board and the web have useful information for middle school and high school computer science, but more best practices are needed in the elementary school arena. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are finding sufficient resources regarding the Programming and Algorithms concept, but there are fewer resources for the Computer Systems concept. If you use robotics or microcontrollers (Makey/Makey, Arduino, Micro:bit), share your evaluation of whether these are developmentally appropriate at the grade you used them, and how you aligned your instruction to the Computer Systems concept. If you used other technologies to make the concept more concrete, what technologies did you use? &lt;/p&gt;&#xA;" OwnerUserId="3219" LastEditorUserId="3219" LastEditDate="2017-10-07T08:15:56.117" LastActivityDate="2018-03-04T20:58:02.870" Title="What resources would you recommend for K-5 Computer Systems Concept of the CSTA K-12 Standards?" Tags="|resource-request|networks|k-5|primary-school|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3768" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T13:59:58.733" Score="2" Body="&lt;p&gt;Based on your question, I infer that you think your students are &quot;not getting it&quot; and need further explanation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when I look at the students' response, I suspect that they are getting it, but you simply have not presented them with a scenario where the two are &lt;strong&gt;not&lt;/strong&gt; functionally equivalent.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Present them with a problem that cannot be solved without returning values.* &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the &lt;code&gt;square()&lt;/code&gt; example, you could use the Pythagorean theorem (how to calculate C from A and B), or you could e.g. ask them to calculate &lt;em&gt;the square of a square&lt;/em&gt; using only a method that squares a number (and does not immediately calculate the subsequent square).   &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;*If you claim that there are cases where printing values is simply not the same as returning them, then the onus is on you to &lt;strong&gt;show an example&lt;/strong&gt; to back up your claim.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like the way your students approach the things you're trying to teach them. Instead of blindly accepting what you say, they are testing your claims by trying to do it their way. &lt;strong&gt;Prove them wrong.&lt;/strong&gt;&lt;br&gt;&#xA;This is annoying for you now, but that sort of behavior will do &lt;em&gt;wonders&lt;/em&gt; for them if they ever start coding independently.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double square(double x)&#xA;{&#xA;  double sq = x*x;&#xA;  printf(&quot;the square of x is %lf\n&quot;, sq);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If your students think that this is okay (I'm aware it's not their own code, but your example), then they are thinking in terms of a &lt;strong&gt;single&lt;/strong&gt; method call being able to solve their problem.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an application that takes a number, squares it, and returns the result, it's indeed functionally equivalent (though obviously bad practice, but they don't see that yet).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, how would they write the method if the application is supposed to apply the Pythagorean theorem? (i.e. calculating C based on A and B) This requires &lt;strong&gt;multiple&lt;/strong&gt; squares to be calculated.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Obviously, you have to enforce the use of a &lt;code&gt;square()&lt;/code&gt; method, or otherwise they would write the formula in a single line, defeating the purpose of having to take multiple steps)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without returning values, it would become impossible to calculate the value of &lt;code&gt;square(A) + square(B)&lt;/code&gt;, since the only thing the application ever does is &lt;strong&gt;display the square of a number&lt;/strong&gt;. Without a return value, the application will be incapable of actually &lt;strong&gt;using&lt;/strong&gt; the number for further calculations.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2017-10-05T14:53:16.250" LastActivityDate="2017-10-05T14:53:16.250" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3770" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T14:07:20.963" Score="3" Body="&lt;p&gt;I have found the key is to illustrate the difference between &lt;b&gt;side-effects&lt;/b&gt; and &lt;b&gt;returns&lt;/b&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching functions, I do an exercise called &quot;guess the function&quot; where I tell students to write a number on a post-it and hand it to me. I then add 3 to the number, write it on a new post-it, and hand it back to the student. I repeat this a few times with squaring the number and other slightly more complex operations, always handing back to the student a post-it with the result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I'll chain together two functions using a student volunteer who I instruct to add one to the number. I then square it and hand it to the original student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After several rounds, when I feel my students have become comfortable with the pattern, I change my behavior. When a student hands me a post-it, I write &quot;Your number was &quot; on the board, substituting their number. I also take the original post-it and ceremoniously throw it in the trash. I repeat this with different operations (division, etc). I ask a student to explain the difference to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students are now primed for an explanation of the difference between returns and side-effects. They see how I can't chain together two actions when I write a number on the board, but I can when I write the number on a post-it. It's a worthwhile 10 to 15 minute exercise.&lt;/p&gt;&#xA;" OwnerUserId="3222" LastActivityDate="2017-10-05T14:07:20.963" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3771" PostTypeId="5" CreationDate="2017-10-05T14:46:18.023" Score="0" Body="&lt;p&gt;K-5 is a United States designation for early grades in the educational system, students between about 5 and 10 years old. There is also pre-K (pre Kindergarten) and others. Use this tag for questions related to teaching students of this age, even, perhaps, outside the US. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-05T14:46:18.023" LastActivityDate="2017-10-05T14:46:18.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3772" PostTypeId="4" CreationDate="2017-10-05T14:46:18.023" Score="0" Body="This is for questions related to teaching CS concepts at the Kindergarten through Fifth Grade. These are US education levels that cover students from about 5 through 10 years old. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-05T14:46:18.023" LastActivityDate="2017-10-05T14:46:18.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3773" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T14:51:43.453" Score="0" Body="&lt;p&gt;The way I learned about programming (Apple Basic, circa 1979) made it clear to me, so I would briefly explain this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Procedure - a clump of lines of code that &quot;does something&quot;.&lt;br&gt;&#xA;Function - an upgraded version: returns a value that can be placed in a variable.&lt;br&gt;&#xA;Arguments - values passed in to the function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I would draw a picture of the Stack on the board: a procedure has just a return location, the address where it was called. A function has a return value also, and can have arguments passed on the stack. (Local variables are on the stack too.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a clear visual explanation that entirely explains how all computer programming &lt;em&gt;actually works&lt;/em&gt;. And, as a bonus, you get the explanation of how function calls can be nested and return their values up the chain of calls. It is best to tell people the truth, as soon as they need to know it. This is the advice parents get for all situations with their children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students still can't see why printing is different from returning a value, &lt;strong&gt;use an analogy&lt;/strong&gt;: Pushing the Brake pedal in the car does two things: turns on the brake lights (printf), and actually &lt;em&gt;does something&lt;/em&gt; - applying the brakes. If you only turn on the brake lights, you will warn the person behind you that you are about to helplessly smack in to something. They will apply their brakes, warning the person behind that... They should get the picture right away. Code has to &lt;em&gt;actually do something&lt;/em&gt;. What? Manipulate values stored in memory. How? Show them what memory looks like, and the stack. QED&lt;/p&gt;&#xA;" OwnerUserId="3223" LastActivityDate="2017-10-05T14:51:43.453" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3774" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T17:32:28.980" Score="6" Body="&lt;p&gt;The first metaphor that comes to mind is language; functions can act as verbs or nouns. So, for example, we can have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double print_sum(double x, double y)&#xA;{&#xA; double sum = x + y;&#xA; printf(&quot;the sum of x and y is %lf\n&quot;, sum);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;We can then have a line that says “print_sum(1,2)”, and the computer will print the sum of 1 and 2. Here, “print_sum” is a verb, and the parameters are the objects of that verb (the implicit subject is the computer, of course). Thus, saying “print_sum(1,2)” is a complete sentence. “print_sum” is an action, and putting it in your code tells your program to perform that action. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, we can have:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;double sum_of(double x, double y)&#xA;{&#xA; return x + y;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here, “sum_of” is a noun. “sum_of(1,2)” is not an action, it’s a thing. Having a line that consists of nothing but “sum_of(1,2)” wouldn’t do anything; it’s not a complete sentence. However, it can be the object of a verb; for instance, “printf(sum_of(1,2))” would be a complete sentence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Advanced programmers naturally go back and forth between treating functions as verbs or nouns, and sometimes use them as both (that is, they use the return value in a calculation while also taking advantage of their side effects), although many people frown on such behavior. Your students clearly aren’t able to distinguish these two attributes on their own, so you need to make it more explicit. Naming a noun-function “add” really isn’t helping; that’s a verb-name, and so your students are going to be expecting it to be used for its effects, rather than its return value. If you were explaining in English how to calculate the norm, would you say “Take the square root of add the square … “? Have your students pay conscious attention to whether a function is being used as a noun or a verb, have them give them appropriate names, and model this by giving your functions appropriate names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a function is being used as a verb, then you can just run the function, and whatever code is in the function will be run. If you’re using the function as a noun, however, then you need to tell the program what value to assign to the function. That’s where the “return” command comes in.  The “printf” command is still in verb-land.  It’s &lt;em&gt;doing something&lt;/em&gt;, not &lt;em&gt;being something&lt;/em&gt;; if you write printf in sum_of, you’re telling the program what sum_of &lt;em&gt;does&lt;/em&gt;, not what it &lt;em&gt;is&lt;/em&gt;. When you write “return x+y”, on the other hand, you’re telling the program that “x+y” is what sum_of &lt;em&gt;is&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Another metaphor is an office worker with an in-box and an out-box. The worker corresponds to a function, the in-box corresponds to the parameters, and the out-box corresponds to the return value. We can also imagine something analogous to printf, such as the company twitter account. When students put printf in a function, and then try assigning something to the function, the analogous situation is a worker tweeting the result of instead of putting it in their out-box.&lt;/p&gt;&#xA;" OwnerUserId="3225" LastActivityDate="2017-10-05T17:32:28.980" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="3775" PostTypeId="2" ParentId="3766" CreationDate="2017-10-05T18:01:53.750" Score="3" Body="&lt;p&gt;Your tennis racket question, is not good. As tells as that is is abstraction, then focuses on the form, when the most important aspect of a tennis racket is its function. Therefore the answer is non of the above (those are all implementation detail, and you asked for an abstraction). A good abstraction is hitty thing.&lt;/p&gt;&#xA;&lt;p&gt;The 2nd question, is very long, and can be summarised as, “guess the word I am thinking of”. While all answers are plausible, non are obviously wrong. Unless I &lt;code&gt;grep&lt;/code&gt; my notes and see that “Thinking Abstractly” is the only one of these phrases that the teacher has used.&lt;/p&gt;&#xA;&lt;h1&gt;This is my attempt at an abstraction question.&lt;/h1&gt;&#xA;&lt;p&gt;Based on what I learnt on page 24 of &lt;a href=&quot;https://helloworld.raspberrypi.org/issues/3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hello, World issue 3&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Which of these is an abstraction of a tennis racket?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A hand held device for hitting a ball with. [correct answer]&lt;/li&gt;&#xA;&lt;li&gt;A colander. [A simile: they both have holes in, but do pupils know what a colander is?]&lt;/li&gt;&#xA;&lt;li&gt;A handle connected to a frame, with string tied across it, to form a surface for the ball to bounce off of. [An attempt at a detailed description, that is much longer than the other answers.]&lt;/li&gt;&#xA;&lt;li&gt;A tennis ball. [ a peer object ]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-06T11:37:10.743" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3776" PostTypeId="2" ParentId="3766" CreationDate="2017-10-05T18:05:48.723" Score="4" Body="&lt;p&gt;I would probably ask students to demonstrate their understanding of abstraction by writing code demonstrating solutions to a small problem at, say, three different levels of abstraction. I'd probably leave it to them to choose the levels of abstraction, and optionally write a short explanation of the differences in level of abstraction the code was intended to demonstrate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think multiple choice questions are highly effective for measuring awareness of facts. I see them as much less effective for determining understanding of ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking at the specific questions you've posted, I think both of them are relatively poor. For example, when looking at a tennis racket, I suppose your intent was probably that &quot;rectangle and circle&quot; would be the correct answer. However, that's looking only at the outline of the racket. To a tennis player, the two parts that matter are the strings (which form squares) and the ball that it hits (a circle). So, rectangle and circle might be a good choice if you're thinking primarily in terms of computer graphics, but square and circle might be a better choice if you think in terms of a tennis racket's actual purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shapes, aren't really much of an abstraction. Shapes deal purely with the physical embodiment of the device. To test for abstract thinking, you need to start by thinking abstractly yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were going to try to do this with multiple-choice questions, I'd probably have two in a row that contrast concrete and abstract thinking:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a physical level (the shape of the concrete implementation), which of these most closely resembles a tennis racket?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Golf club&lt;/li&gt;&#xA;&lt;li&gt;lollipop&lt;/li&gt;&#xA;&lt;li&gt;automobile&lt;/li&gt;&#xA;&lt;li&gt;tennis ball&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;On an abstract level, which of these most closely resembles a tennis racket?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Golf club&lt;/li&gt;&#xA;&lt;li&gt;lollipop&lt;/li&gt;&#xA;&lt;li&gt;automobile&lt;/li&gt;&#xA;&lt;li&gt;tennis ball&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In the first case, the correct answer is '2'. A tennis racket is shaped like a large lollipop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a more abstract level, a tennis racket is a tool for hitting a ball. So, at the more abstract level, the most similar is a golf club--also a tool for hitting a ball.&lt;/p&gt;&#xA;" OwnerUserId="2835" LastActivityDate="2017-10-05T18:05:48.723" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3778" PostTypeId="2" ParentId="3747" CreationDate="2017-10-05T22:47:44.787" Score="4" Body="&lt;p&gt;The conceptual issues here are that the examples in the OP are completely artificial (intelligent students should be asking &quot;why on earth would you want to write a function to add two numbers, in C, when the language already contains a + operator&quot;) and that they only call the function once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could solve the first issues by a digression into operator overloading (which a student intelligent enough to ask the question should be able to understand!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the second issue, invent a situation where you call your function many times, but only want to print out &lt;em&gt;one&lt;/em&gt; &quot;answer&quot;. It should then be clear to the students why you don't want 1,000 lines of useless print coming from &lt;em&gt;inside&lt;/em&gt; 1,000 calls to your &quot;add&quot; function!&lt;/p&gt;&#xA;" OwnerUserId="1352" LastActivityDate="2017-10-05T22:47:44.787" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3779" PostTypeId="2" ParentId="3761" CreationDate="2017-10-06T05:46:37.900" Score="1" Body="&lt;p&gt;We've used &lt;a href=&quot;https://www.imperosoftware.com/uk/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Impero&lt;/a&gt; in our labs quite successfully.  It allowed me to broadcast my screen to 30 others as well as quickly jump in and take control of other screens if a student was stuck.  It is paid and we've used it throughout the school, not just for CS.  Network managers use it for quickly trouble-shooting pupil machines for instance.&lt;/p&gt;&#xA;" OwnerUserId="3150" LastEditorUserId="3150" LastEditDate="2017-10-09T21:58:16.270" LastActivityDate="2017-10-09T21:58:16.270" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3780" PostTypeId="2" ParentId="3758" CreationDate="2017-10-06T10:18:04.313" Score="0" Body="&lt;p&gt;There are many pre-designed Arduino Projects!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, &lt;a href=&quot;https://create.arduino.cc/projecthub/RoyTobby/10-awesome-beginner-arduino-projects-78a6a6&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; from the official Arduino Website.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to not have Arduinos ready, also get some basic materials as sensors, leds, breadboards and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a student, and I had to teach the others developing with an Arduino, and the only thing we could make (due to lack of materials) was turning off the LED which is pre installed on the board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was getting so boring, that I made a function to play the LED via a pattern given :) &lt;/p&gt;&#xA;" OwnerUserId="3234" LastEditorUserId="204" LastEditDate="2017-10-06T12:29:58.090" LastActivityDate="2017-10-06T12:29:58.090" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3781" PostTypeId="2" ParentId="17" CreationDate="2017-10-06T11:59:10.450" Score="4" Body="&lt;p&gt;My first practical use of recursion was to work out the total weight of a bunch of containers (portage packs and the various stuff sacks and whatnot inside them.) You know that the blue bag holds the green bag and the tent. You know what the tent weighs. You know that the green bag holds the red bag and the brown bag. Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar problems include the &quot;salary burden&quot; of a VP who has several departments under them, and each department has a department head with teams under them, and so on, but without a strict hierarchy so some departments have no teams, just everyone reporting to the head, and some people report directly to the VP but don't head a department, etc. You could also do revenue within a large company the same way. Or inventorying your personal possessions.&lt;/p&gt;&#xA;" OwnerUserId="1036" LastActivityDate="2017-10-06T11:59:10.450" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3782" PostTypeId="2" ParentId="3766" CreationDate="2017-10-06T16:44:59.010" Score="4" Body="&lt;p&gt;Fundamentally, I question the notion that you can test to see if students understand the idea of abstraction beyond a superficial level, even if you don't restrict yourself to asking just multiple choice questions. It's a little hard for me to articulate, but I sort of feel the best way to learn + get feedback on whether you understand abstraction is to actually try tackling a large, novel-ish problem and discuss your design decisions with a more experienced dev (or, if self-teaching, learn the hard way why some decision was a bad idea later down the line).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nevertheless, here are some ideas (with the caveat that I have never once designed and administered a multiple-choice question style thing which means it's entirely possible I have no idea what I'm talking about).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are all more CS-y and math-y then your example questions, but I figured you might as well address the skills you're after in a directly applicable setting instead of beating around the bush.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Test to see if students understand what &lt;em&gt;implementation detail&lt;/em&gt; is -- that is, do the recognize when something &quot;breaks&quot; an abstraction?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could give students a description of a car, and ask them to identify from a list which element is implementation detail. (For example, &quot;hitting the brakes causes a moving car to slow down or stop&quot; is part of the interface; &quot;a combustion engine powers the car&quot; or &quot;the car moves via wheels&quot; would both be implementation detail).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want something more directly related to code, give them a header comment for some method or class, and ask them to do the same.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Test to see if students understand how to find similarities and find a viable abstraction between &lt;em&gt;multiple&lt;/em&gt; items. (After all, if you have only one of something, why would you bother abstracting it?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could give students a description of several different queue-like objects (a FIFO queue, a priority queue, etc) and ask them which interface description would work for all of them. (This probably isn't the best example, but hopefully you get the idea).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also add an option that says &quot;none of these are good abstractions&quot; and make that the right answer some of the time. After all, if students are taught that they should always be abstracting, then you'll end up with a bunch of architecture astronauts, which seems suboptimal.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Draw inspiration from &lt;a href=&quot;https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/&quot; rel=&quot;nofollow noreferrer&quot;&gt;category theory&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all, there's a &lt;a href=&quot;http://blog.ploeh.dk/2017/10/04/from-design-patterns-to-category-theory/&quot; rel=&quot;nofollow noreferrer&quot;&gt;argument to be made&lt;/a&gt; that constructs from category theory and design patterns are more or less the same thing (except that category theory is applicable to things beyond code and design patterns are more handwavy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could perhaps describe something like monoid (e.g. if the set M is a monoid, then it must be the case that that the set is closed under some associative binary operation and there must exist some identity element I in the set such that A op I = A and I op A = A).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then explain how strings + string concatenation form a monoid as a case example (the empty string is the identity; concatenation is the associative binary operation), then ask them to correctly identify how lists or numbers or something are a monoid. You could also ask them which entry from a list &lt;em&gt;wouldn't&lt;/em&gt; count as a monoid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This basically lets you test if students can understand how to use some (relatively basic) abstraction/adapt existing code to work with unfamiliar abstractions. (And tests to see if students know how to adapt to dealing with new definitions and such).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give students a snippet of code that breaks an abstraction, and ask them to identify the correct reason why the code is wrong (and probably add an option for &quot;no, everything's fine&quot; to make it a little harder.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-10-08T15:38:38.030" LastActivityDate="2017-10-08T15:38:38.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3783" PostTypeId="2" ParentId="3761" CreationDate="2017-10-06T17:12:47.563" Score="1" Body="&lt;h1&gt;TLDR;&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;a href=&quot;https://obsproject.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;open broadcast system&lt;/a&gt; and you can &lt;a href=&quot;https://obsproject.com/forum/threads/streaming-over-lan-with-local-rtmp-server.2427/&quot; rel=&quot;nofollow noreferrer&quot;&gt;stream over lan&lt;/a&gt; quite easily.&lt;/p&gt;&#xA;&lt;p&gt;You can use &lt;a href=&quot;https://obsproject.com/forum/resources/obs-studio-send-an-udp-stream-to-a-second-pc-using-obs.455/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OBS configs and set up ffmpeg to broadcast over multicast address&lt;/a&gt;. Or set up &lt;a href=&quot;https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/&quot; rel=&quot;nofollow noreferrer&quot;&gt;nginx as an RTMP server&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Notes and thoughts&lt;/h1&gt;&#xA;&lt;h2&gt;Why OBS?&lt;/h2&gt;&#xA;&lt;p&gt;First and foremost, I use it and I love it :-)&lt;/p&gt;&#xA;&lt;p&gt;It's a completely free, and fully open source software that deploys very quickly.&lt;/p&gt;&#xA;&lt;p&gt;Open broadcast system is a powerful multi-platform (windows, linux, macosx) application that's super easy to configure and get going. There are tons of tutorials and it's well developed and well documented.&lt;/p&gt;&#xA;&lt;p&gt;It comes with built-in config's for most streaming environments e.g. YouTube, liveedu.tv, etc.&lt;/p&gt;&#xA;&lt;p&gt;You can simultaneously stream and locally record your videos at different resolutions and framerates simultaneously, and has support for multiple screens, desktops, capturing individual windows and a whole host of other capabilities.&lt;/p&gt;&#xA;&lt;p&gt;The audio/video/desktop-capture capabilities are more than impressive.&lt;/p&gt;&#xA;&lt;h1&gt;Using NGINX for RTMP&lt;/h1&gt;&#xA;&lt;p&gt;nginx RTMP configuration takes about 10 minutes of reading and about 5 minutes to deploy.&lt;/p&gt;&#xA;" OwnerUserId="3242" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-07T20:59:41.033" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3784" PostTypeId="2" ParentId="3766" CreationDate="2017-10-06T17:39:11.810" Score="0" Body="&lt;p&gt;The best way to find out is to give programming problems, or similarly complex design problems, where you can look at the details of the solutions they create. I give lots of &quot;lab&quot; assignments where the students have to write programs based on a problem statement from the textbook. Part of the answer is: &quot;Are they using what we just covered in class?&quot;, but the vital part is: &lt;strong&gt;&quot;Are they gaining knowledge over time and learning to assemble things with increasingly complex structure?&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students clearly learn general concepts like how to define classes and use them sensibly, while other students struggle with this, or even more basic concepts like how to use variables in one UI method that were set in another UI method. (Could be Console or Windows, doesn't matter.) Some students take the ideas of Relational Comparison and Boolean combiners and use them correctly, others struggle and try to create things by sticking together the code they painfully got to work in the previous assignment (which they are now trying to re-use for an opposite case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, &lt;em&gt;assessing&lt;/em&gt; whether students have learned how to abstract is bone-obvious. &lt;em&gt;Teaching&lt;/em&gt; it is the hard part. &lt;strong&gt;We need to find ways to teach abstraction.&lt;/strong&gt; My research has turned up very little except arguments over what the word means, or worse: whether to start teaching at high levels of abstraction, or instead teach how computers actually work, etc. (See other questions on this site.) Poor start on a very significant problem!&lt;/p&gt;&#xA;" OwnerUserId="3243" LastActivityDate="2017-10-06T17:39:11.810" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3785" PostTypeId="2" ParentId="3761" CreationDate="2017-10-06T17:50:44.977" Score="1" Body="&lt;p&gt;Our district has Adobe Connect. It's used mostly for remote training, but any of us have access to setup classes. I use it pretty much any time I demo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also project my screen. Most watch on their screens while they're typing, but some like to look at the projector screen. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-10-06T17:50:44.977" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3786" PostTypeId="2" ParentId="3766" CreationDate="2017-10-06T18:33:17.487" Score="7" Body="&lt;p&gt;tl;dr: Just say no. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question is difficult on many levels. I seems to me to be a land mine of misconceptions and has the possibility to lead to poor teaching practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First the difficulties&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Only &lt;em&gt;concepts&lt;/em&gt; can be abstract. Abstraction is about ideas. Animal is a concept. Mammal is a concept. Animal is more abstract than Mammal since it contains the idea of Mammal, but isn't restricted to it. The kitty sitting on my hearth is concrete, not less abstract than Mammal. The kitty isn't a concept it is a thing. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Given some ot the examples, there is a misconception about what is abstract and what is concrete. Physical things are not abstract. One can't be &lt;em&gt;more&lt;/em&gt; abstract than another. Even things that aren't physical, but which can be manipulated, are concrete, not abstract. A LinkedList (Java) isn't abstract. It is concrete. List, on the other hand (an interface) is abstract. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In computing there are many, many different kinds of abstraction. Even the concept of a while loop is an abstraction. In OOP languages classes implement abstractions. Interfaces (even if the language doesn't have that explicit feature) are abstractions. So, Python has interfaces, though it has no language feature with that name. If two classes have the same interface they are realizations of the abstraction, but neither is more or less abstract than the other. If one interface contains another interface then it is more abstract.But we also have &lt;em&gt;data abstraction&lt;/em&gt;. Lists and Maps define an interface (an abstraction). They can be implemented/realized many ways. Each realization is concrete, not less abstract. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The web site cited seems to be trying to test everything with Multiple Choice Questions (MCQ). I question both the possibility of that and the wisdom of it. Some thing are complex MCQ are simple. Trying to push the assessment of complex things through such a small funnel seems misplaced to me - even foolish. I'm pretty sure that MCQ also advantage certain students and disadvantage others. They are fine for rote memory and facts, but pretty poor for deep understanding. I have nothing against their use unless it is overdone. MCQ are also difficult to validate. The wisdom of groups isn't enough. It takes statistical measurement and cross validation to do a good job of it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Font Construction example given in the question also seem to be testing specific vocabulary. This example threw me completely. I think I could eliminate one answer, but also think I could justify each of the others if given the chance. If it is specific vocabulary it is just rote memory and hoping that the student &quot;remembered&quot; to remember the right thing. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Often, getting a MCQ wrong and then later learning the &lt;em&gt;correct&lt;/em&gt; answer can sometimes leave students simply puzzled and frustrated. This results in a destructive game that I'd rather not play. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;MCQ try to put a lot of thinking into the questions so that no one needs to put any thinking into the answers after the student finishes. This may scale well, but is a sub-optimal form of &lt;em&gt;education&lt;/em&gt;. After all, it is the &lt;em&gt;students thoughts&lt;/em&gt; that we want to get a handle on in assessment. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I don't believe that a single, or even a small number of MCQ could capture the student's understanding of abstraction or any similarly deep concept. I think that if you had quite a lot of questions (say 20-50 of them) you might be able to get a handle on it, &lt;strong&gt;but it would take very careful cross evaluation of the answers given to be able to say with any confidence&lt;/strong&gt;. Getting a single question wrong likely tells you almost nothing. And that, of course, makes MCQ less valuable for its main use - quick and easy evaluation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could, on the other hand create a bunch of questions that start to get at the student's understanding. The ones I'd like to use are short response questions, but some can be simple choices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming that the student have a common language background, something like &quot;Is java.util.List abstract or concrete?&quot; &quot;Is java.util.Collection more or less abstract than java.util.Map&quot;. One choice for the answers needs to be &lt;em&gt;neither&lt;/em&gt; of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can show code fragments and ask whether they &lt;em&gt;implement an abstraction properly&lt;/em&gt; or not. But a follow up &quot;why or why not&quot; gives you better information. And some of those questions would necessarily be a bit long to be meaningful and thus take some time for the student to evaluate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;How can functions be considered abstractions?&quot; Well, that was poorly stated, since a single function is concrete, not abstract, so you need to be careful: &quot;How can the idea of a function be considered an abstraction?&quot; is better. You could probably give a few suggestions for answers to this to turn it in to a MCQ, but it would be hard to come up with four, of which three were viable and yet not correct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I've only hit the surface here and only explored a very small part of the &lt;em&gt;abstraction space&lt;/em&gt; in computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat: I never had to teach or evaluate a hundred or more students at a go. My classes were always small enough that I could use better evaluation techniques than MCQ, though would be likely to use a few in a larger assessment that allowed the students more creativity. If you &lt;em&gt;do&lt;/em&gt; have to evaluate 800 students I hope you have help. If you don't something is deeply wrong. I note that Harvard CS 50 is run by a team of about 80 people, with quite a number of roles. I hope that each student has some individual person responsible for them. It isn't the professor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My initial &quot;just say no&quot; is to the idea that you can completely evaluate a student with MCQ, not that they can't be useful, dangerous drug though they are. And note that I have the highest respect for Simon Peyton-Jones. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-06T18:33:17.487" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3788" PostTypeId="2" ParentId="3767" CreationDate="2017-10-06T21:01:37.813" Score="2" Body="&lt;p&gt;I haven't seen a lot of resources in the US for that age group, though England seems to publish a great deal of high quality KS2 (Key Stage 2, ages 7-11) material.  What's particularly nice is the focus on Computer Science concepts and computational thinking over simple programming exercise, even at this young age.  Take a look at these &lt;a href=&quot;http://www.bbc.co.uk/education/subjects/zvnrq6f&quot; rel=&quot;nofollow noreferrer&quot;&gt;BBC Resources from the &quot;Bitesize&quot; Series&lt;/a&gt;, which is a series of instructional videos appropriate to those ages).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also collected resources &lt;a href=&quot;https://www.theschoolrun.com/coding-kids&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;, which includes such regulars as &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;, but also points to some lesser-known resources, such as &lt;a href=&quot;https://www.codeclub.org.uk/projects&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code Club&lt;/a&gt;, which has projects appropriate for the age in various languages, and &lt;a href=&quot;http://kidsruby.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kids Ruby&lt;/a&gt;, which teaches kids to program in the Ruby language with guided tutorials.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-10-06T21:01:37.813" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3789" PostTypeId="2" ParentId="3670" CreationDate="2017-10-06T22:12:50.290" Score="3" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;We do most of our work in vampire-mode, i.e. lights-off. Turning the light &lt;em&gt;on&lt;/em&gt; for breaks goes a long way towards encouraging students to rest their eyes and stretch.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I put a 5-10 minute timer on the projector before every classroom context-switch, so a break doesn't take students by surprise. (It's easy to get lost in this sort of work.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But you can't enforce rest. There will always be students who believe they can work forever without consequences, and should, and there will always be students who are just too excited about the day's content to slow down for every break.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our reality is that students can take a break whenever they like; the primary purpose of my &lt;em&gt;official&lt;/em&gt; breaks is to ensure students that it is &lt;em&gt;okay&lt;/em&gt; to rest; many of us have been raised with a philosophy of overwork, and I don't have a single student who is in danger of failing because of laziness.&lt;/p&gt;&#xA;" OwnerUserId="3248" LastActivityDate="2017-10-06T22:12:50.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3790" PostTypeId="2" ParentId="3296" CreationDate="2017-10-07T08:13:26.367" Score="5" Body="&lt;p&gt;I agree that Computer Science Teachers Association (&lt;a href=&quot;https://www.csteachers.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSTA&lt;/a&gt;) membership and conference are the best place to start if you are in the US.  CSTA membership is free. The annual conference is \$175 - \$275 USD. There are also local chapters of CSTA which may have professional development. Chapter membership is typically free. Some local professional development may be free as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code.org also offers professional development for computer science teachers. Some Code.org professional development is free and sometimes sponsors even cover travel expenses. Also, visit &lt;a href=&quot;https://code.org/educate/curriculum/high-school&quot; rel=&quot;nofollow noreferrer&quot;&gt;PD for Computer Science Principles and third party PD resources&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.iste.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ISTE&lt;/a&gt; (Internationl Society of Technology Educators) hosts Computer Science Network special interest group.  ISTE Members have access to a number of webinars you may be interested in. Membership is \$125 USD per year. Their annual conference is in Chicago — June 24–27, 2018. Conference is \$300 - \$400 USD for members or \$450 - \$550 for nonmembers which includes membership. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://fetc.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;FETC&lt;/a&gt; (Future of Education Technology Conference) has more of a digital literacy focus but may have some sessions of interest to you. Conference price varies depending on number of days you attend (\$300 - \$450 USD).  Regular sessions are included but certain workshops have an additional fee.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://degreed.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Degreed&lt;/a&gt; is a platform for micro-credentialling (badging). It provides access to courses, articles, videos, etc.  Degreed has partnered with Computer Science Teachers Association (&lt;a href=&quot;https://www.csteachers.org/news/342636/Degreed-and-Computer-Science-Teachers-Association-Announce-New-Partnership.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSTA&lt;/a&gt;) mentioned above, so there are a number of curated computer science assets. Degreed is free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.apple.com/everyone-can-code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Apple, Inc.&lt;/a&gt; offers professional development on its language (Swift) through iTunes which is free.&lt;/p&gt;&#xA;" OwnerUserId="3219" LastEditorUserId="58" LastEditDate="2017-10-11T01:20:42.170" LastActivityDate="2017-10-11T01:20:42.170" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3791" PostTypeId="2" ParentId="3758" CreationDate="2017-10-07T13:27:22.563" Score="1" Body="&lt;p&gt;This sounds a little bit like &lt;a href=&quot;https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem&quot;&gt;an X-Y problem&lt;/a&gt;. When you're using micro controllers in a computer science class, what is it that you're trying to teach? How to write a for/while loop to satisfy an abstract line of pseudo-code, or the joy of making yourself something that previously you have only seen as an expensive gimmick in a shop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think there are similarities in science practicals. There, there is a precise script to follow, and often not much scope for 'now make up your own experiment to mix random chemicals'. What you're teaching is (a) a &lt;strong&gt;re-enforcement&lt;/strong&gt; of the theoretical work through application and repetition, and (b) the &lt;strong&gt;practical, hands on&lt;/strong&gt; skills of real development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we do in the real world (particularly in the embedded device space) really is find someone else's description of what they did, then copy it and make sure you can also get it to work. Finally, you make your own version better. Along the way, you learn lots of vitally important practical skills. Assembling the project isn't the only goal, it's almost an excuse for the activity. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Debugging is harder. The 'debug by random iteration' approach won't work.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Results are tangible - you can hold them. You can flash lights, react to stimulus, move things. This teaches students about real applications, not just web pages and databases.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;MCUs are more resource constrained. You can make optimisation a &lt;em&gt;necessary&lt;/em&gt; part of the task, not just a pointless exercise.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Each student will put their own twist on the exercise, drawing in other skills.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Picking out the current micro:bit ideas on twitter:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://twitter.com/NuLSchoolUK/status/916626982519103489&quot; rel=&quot;nofollow noreferrer&quot;&gt;Robot Football&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://twitter.com/NeilRedRobotics/status/911332591768363008&quot; rel=&quot;nofollow noreferrer&quot;&gt;NeoPixel Clock&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://sites.google.com/site/hardwaremonkey/blog&quot; rel=&quot;nofollow noreferrer&quot;&gt;An optical indicator for a S/W project&lt;/a&gt; (I think, was a bit unclear)&lt;br&gt;&#xA;&lt;a href=&quot;http://www.instructables.com/id/Avoid-the-Asteroids-With-ElecFreaks-Microbit-Tinke/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Arcade game on a 5x5 display&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm interviewing, I can ask about one of these projects, what was hard, what was interesting, what comes next. That tells me something about a candidate that no 20 minute coding test will. All of these projects would take any of us here some time to complete too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I gave you an arduino and a kit of hardware, I'd say 'do the blink LED exercise first', to make sure you know how things behave when they work. Then a few more simple follow on activities. Jumping straight in at the deep end is too big a step - we set up commercial products just the same too, with easy step-by-step instructions (plus videos). People still come back with questions - our first question is always 'does binky work?'&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2017-10-07T13:27:22.563" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3792" PostTypeId="5" CreationDate="2017-10-07T13:37:25.943" Score="0" Body="&lt;p&gt;Classroom infrastructure includes hardware and software that you use to &lt;em&gt;support&lt;/em&gt; teaching, not the things taught. Examples from the olden days would be overhead (foil) projectors. More modern examples are things like TeleCoil for the hearing impaired and screen projectors. For the younger student, even physical objects used to teach computational thinking might apply. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that there are separate tags for some aspects of this and the narrower tags should be used instead of this one. Examples are &lt;a href=&quot;/questions/tagged/git&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;git&amp;#39;&quot; rel=&quot;tag&quot;&gt;git&lt;/a&gt;, &lt;a href=&quot;/questions/tagged/github&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;github&amp;#39;&quot; rel=&quot;tag&quot;&gt;github&lt;/a&gt;, &lt;a href=&quot;/questions/tagged/arduino&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;arduino&amp;#39;&quot; rel=&quot;tag&quot;&gt;arduino&lt;/a&gt;, &lt;a href=&quot;/questions/tagged/ide&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;ide&amp;#39;&quot; rel=&quot;tag&quot;&gt;ide&lt;/a&gt;, etc. &lt;/p&gt;&#xA;" OwnerUserId="-1" LastEditorUserId="1293" LastEditDate="2017-10-11T11:24:34.967" LastActivityDate="2017-10-11T11:24:34.967" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3793" PostTypeId="4" CreationDate="2017-10-07T13:37:25.943" Score="0" Body="For questions about hardware or software that you use specifically to enable your teaching. This could be networking, collaboration (but not GIT), screen-casting. Don't use this for the hardware you teach on (arduino, pi) , or the software students use directly (IDE or interpreters)" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-10-07T17:47:05.287" LastActivityDate="2017-10-07T17:47:05.287" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3794" PostTypeId="5" CreationDate="2017-10-07T13:45:08.813" Score="0" Body="&lt;p&gt;Virtual reality and autonomous driving might be seen as today's cutting edge applications of physical computing. In a classroom environment, physical computing is attributed with widening the appeal of CS amongst students.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-10-07T17:47:24.667" LastActivityDate="2017-10-07T17:47:24.667" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3795" PostTypeId="4" CreationDate="2017-10-07T13:45:08.813" Score="0" Body="For questions about using computers in a hands-on environment. Making an interactive physical system using hardware and software, frequently based around single-board computers or microcontrollers, but also attaching peripherals (e.g. robot arms, vision) to a PC." OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-10-07T17:47:19.127" LastActivityDate="2017-10-07T17:47:19.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3796" PostTypeId="2" ParentId="3747" CreationDate="2017-10-07T15:33:55.773" Score="0" Body="&lt;p&gt;There's basically a single sentence to explain the problem here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;code&gt;printf()&lt;/code&gt; shows &lt;em&gt;you&lt;/em&gt;, the user, what's going on, but &lt;code&gt;return&lt;/code&gt; shows the &lt;em&gt;computer&lt;/em&gt; what's going on.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how can you illustrate this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I'd begin by having students write about&lt;code&gt;printf()&lt;/code&gt; and &lt;code&gt;return&lt;/code&gt; and the difference between the two. At least try to get them to be able to &lt;em&gt;say&lt;/em&gt; what the difference is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, have students write a simple program without &lt;code&gt;printf()&lt;/code&gt; and with &lt;code&gt;return&lt;/code&gt; that works - maybe something like (I'm going to use python 3):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def add(a, b):&#xA;    return a + b&#xA;&#xA;add(2, 5)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have them explain why this doesn't return (heh, maybe don't use that term) any errors. Have them explain what &lt;code&gt;return&lt;/code&gt; is doing in this case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, another program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def add(a, b):&#xA;    print(a+b)&#xA;    return(a+b)&#xA;&#xA;add(2, 5)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Again, have them explain exactly what's going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def add(a, b):&#xA;    return(a+b)&#xA;&#xA;print(add(2, 5))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Have them explain what's going on there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then move on to more &quot;real&quot; programs and see if this helps. The purpose is just to get them thinking about what they're doing and what the computer's doing. It sounds like something that can be remedied by just making them think.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-10-07T15:33:55.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3797" PostTypeId="1" CreationDate="2017-10-07T16:39:03.037" Score="3" ViewCount="251" Body="&lt;p&gt;The micro:bit foundation present some research findings which look quite encouraging when it comes to using physical computing as an introduction to Computer Science &lt;a href=&quot;http://microbit.org/teach/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;90% of students said the micro:bit showed them that anyone can code.&lt;/li&gt;&#xA;  &lt;li&gt;86% of students said the micro:bit made Computer Science more interesting.&lt;/li&gt;&#xA;  &lt;li&gt;70% more girls said they would choose Computing as a school subject after using the micro:bit.&lt;/li&gt;&#xA;  &lt;li&gt;85% of teachers agree it has made ICT/Computer Science more enjoyable for their students.&lt;/li&gt;&#xA;  &lt;li&gt;Half of teachers who’ve used the micro:bit say they now feel more confident as a teacher, particularly those who say they’re not very&#xA;  confident in teaching Computing.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;They also link to this &lt;a href=&quot;https://www.pltw.org/our-programs/pltw-gateway-curriculum#curriculum-4&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Science for innovators and Makers&lt;/a&gt; curriculum which links the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Female students, in particular, show greater understanding of computer&#xA;  science concepts when programs and code produce immediate, tangible&#xA;  results. The physical nature of making these interactive systems&#xA;  creates a meaningful and engaging learning experience that greatly&#xA;  increases engagement among girls in computer science education.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Although the 2nd reference may be independent, it's not easy to tell. Are there any other studies I can refer to? Looking particularly at benefits in engagement or diversity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although the first reference does indicate that teachers &lt;em&gt;also&lt;/em&gt; found that using (or being trained to use) the micro:bit felt more confident, I intended to ask specifically about student engagement.&lt;/p&gt;&#xA;" OwnerUserId="41" LastEditorUserId="41" LastEditDate="2017-10-08T18:10:24.373" LastActivityDate="2017-10-15T19:30:58.590" Title="Is there independent evidence that physical computing improves engagement" Tags="|curriculum-design|student-motivation|physical-computing|" AnswerCount="2" CommentCount="6" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3798" PostTypeId="2" ParentId="3797" CreationDate="2017-10-08T21:04:10.567" Score="0" Body="&lt;p&gt;You are asking a question that is difficult to answer. There are many reasons. The situation you cite uses physical computing, true, but it uses it in a specific way. That larger context probably explains much if not most of the improvement in engagement. Without independent research and just guessing, I think that very many other approaches that have some of those same features would show the same sorts of improvements without the physical computing element. Let me try to list a few of them. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The classes are for youngsters and seem to be like a &quot;summer camp&quot; at which it is natural to have fun. The example projects are designed to be fun, and a bit wacky - banana keyboard, ... &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The projects seem to be designed to be motivating, but that can happen with other sorts of systems than physical computing. Scratch, for example has put a lot of thought into this, as have the people in the CS Unplugged community. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The students work together in teams, I think. This is a strong motivator all by itself. I don't know if the teams are same-sex or not, but that is also sometimes a boost to motivation, depending on the overall environment. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The teachers seem to be well trained in the subject at hand. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, to ask if Physical Computing, by itself, is motivating, you need to separate out the other factors. I assume that if used badly by an untrained and unmotivating teacher there would be little improvement. On the other hand, the environment itself, if supportive, will likely lead to increased motivation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another dimension should also be considered: &lt;em&gt;motivated for what?&lt;/em&gt; I think that the goal is to get kids interested in computing generally, but that may not actually happen. You might see motivation for only projects that include the physical manipulation aspects, though that isn't a bad thing. When I was a kid you could get a kit that let you build a simple transistor radio with your own (little) hands. It was fun, and motivating, but not for radio itself, or even for electronics. For me, at least, it just motivated me to ask questions, for which I was already well known (i.e. a pest). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't take this post as skepticism about physical computing itself, but think about the whole environment, not just the most obvious aspect of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, an environment in which the teacher is motivated and excited can motivate the students as well, even if the teacher is him/herself struggling a bit with the material. The enthusiasm of the teacher can be infectious. This alone will lead to anecdotal &quot;evidence&quot; of success: &quot;I tried it and love it. So did my students.&quot; &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-08T21:04:10.567" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3799" PostTypeId="2" ParentId="3747" CreationDate="2017-10-09T01:36:01.320" Score="1" Body="&lt;p&gt;There is return value and there are side-effects. The function &lt;code&gt;printf&lt;/code&gt; is pure side effect: it puts things to &lt;code&gt;stdout&lt;/code&gt;.  In general, side effects are things that happen which persist beyond the lifetime of the function.  Examples of these include files that are modified or created, or elements of a web page that are modified [JavaScript].   To have a return value, you must have a &lt;code&gt;return&lt;/code&gt; statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in that event, a function might not be a &quot;pure&quot; function. Pure functions must return the same value every time when passed the same parameters. An example that does not meet this criterion:  a random number generator.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-10-09T01:36:01.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3800" PostTypeId="2" ParentId="3734" CreationDate="2017-10-09T01:41:10.650" Score="0" Body="&lt;p&gt;When looping through a collection, a &lt;code&gt;for&lt;/code&gt; loop is best.  The collections &lt;code&gt;for&lt;/code&gt; loops in Java, JavaScript and Python prevent you from accessing indices that are out of bounds. Most of the time, they are the right choice for traversing a collection.  The &lt;code&gt;for&lt;/code&gt; loop is mostly a &quot;definite loop.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;while&lt;/code&gt; loop is at its most useful when some indefinite number of iterations is required to perform a task.  For example, you might be asking a user for a specific type of output. IF the user fails to enter something valid,  you nag that user with prompts until he does the right thing.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-10-09T01:41:10.650" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3802" PostTypeId="2" ParentId="3747" CreationDate="2017-10-09T13:21:11.363" Score="0" Body="&lt;p&gt;I'm adding my answer to already huge list of answers, but I believe I'll add something novel, not listed above:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C language semantics is a mess.  It is not your students' problem.  C is mostly an imperative language, but because the authors didn't care to stick to one paradigm, they introduced a cross-breed of incompatible paradigms (mixing in some declarative style).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a proper imperative languages like Forth the problem simply doesn't exist.  Even remarkably poorly designed Basic and Matlab had solved this problem better: they use the same imperative style, and assign values to some variables.  So that you are never tempted to write something like &lt;code&gt;f(g(x))&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to solve this problem?  Use a better, more consistent language.  I understand the need to learn C, as it is an industry standard today, but it would be also wise to invest into the future by educating the students about why this language shouldn't be the industry standard.&lt;/p&gt;&#xA;" OwnerUserId="1000" LastActivityDate="2017-10-09T13:21:11.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3803" PostTypeId="1" CreationDate="2017-10-09T15:53:03.090" Score="3" ViewCount="253" Body="&lt;p&gt;I try to include a wide range of difficulty in the questions on quizzes and tests, from very obvious to quite subtle. The more subtle questions might hinge on a distinction of singular vs plural or other 'wording' aspects, so that those who have the strongest grasp of the material can differentiate themselves. I usually get a good spread of numerical grades, so experience says that I am doing this correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But students who missed an item based on subtleties often speak up when I review the quiz or test immediately after all the results are in. It would seem impolitic for me to say that I made that item difficult deliberately, but it is true. Instead I usually point back to the textbook or my lecture to say that I actually explained and even stressed the point. Sometimes I agree that wording was poor in a question and so I give everyone credit (essentially acting as if the question did not exist). This can vary from year to year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a workplace subtleties will be vital, so it is not a manufactured situation to include them in my teaching, and I only use subtle distinctions in tests where they exist in the material, &lt;em&gt;and are worth emphasizing.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do you handle situations where students push back on the wording of test questions or answers?&lt;/strong&gt; How do you not simply say, &quot;Because that way I have a more useful test&quot;?&lt;/p&gt;&#xA;" OwnerUserId="3270" LastActivityDate="2017-10-13T13:42:13.050" Title="How to handle objections to the wording of test questions or answers?" Tags="|grading|adult-education|assessment|exams|" AnswerCount="5" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3804" PostTypeId="2" ParentId="3803" CreationDate="2017-10-09T16:18:46.380" Score="1" Body="&lt;p&gt;If you are to do summative assessment, then it is important not just that their are a wide spread of grades, but also that the correct people get the correct grades. Ensure that the questions differentiate correctly. That is high performing students get hard question correct, but everyone else (usually) gets them wrong. All but the weakest students get the easy questions correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can, do formative assessment. This means that the results, also have to tell you something about: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Your teaching: what areas you need to improve / cover again.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;What&lt;/strong&gt; pupils know: what areas they need to revise. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You should not be trying to catch students out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a look at &lt;a href=&quot;https://helloworld.raspberrypi.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://helloworld.raspberrypi.org/&lt;/a&gt; issue 3. It has several article on assessment. See also &lt;a href=&quot;https://cseducators.stackexchange.com/q/3766/204&quot;&gt;How do you assess students&amp;#39; understanding of abstraction?&lt;/a&gt; it refers to project quantum; watch the video. Project quantum, not only assesses the students, it also assesses the questions. It wants to find questions that differentiate correctly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After all of this. Show that the subtleties are useful. Show that these questions are correctly predicting current performance. Show that there is a strong correlation: Only high end students are getting it correct.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-10-09T16:18:46.380" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3805" PostTypeId="2" ParentId="1397" CreationDate="2017-10-09T16:22:27.000" Score="1" Body="&lt;p&gt;Both UTeach and Code.org have released their scores. 83% of UTeach students passed, 73% of code.org students passed. UTeach also published the results of females and underrepresented minority groups. In all categories, a higher percentage of UTeach students passed than the national averages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been trying to find released data from the others and I can't. &lt;/p&gt;&#xA;" OwnerUserId="3271" LastActivityDate="2017-10-09T16:22:27.000" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3806" PostTypeId="2" ParentId="3803" CreationDate="2017-10-09T16:39:58.793" Score="1" Body="&lt;p&gt;Since you are already willing to, in effect, make a question moot on an exam when there are objections you are partway to a solution. As ctrl-alt-delor notes &lt;a href=&quot;https://cseducators.stackexchange.com/a/3804/1293&quot;&gt;here&lt;/a&gt; you need to assure the validity of the exam itself. It is possible that your interpretation of &quot;subtlety&quot; is actually misleading to students, especially the ones you think are &quot;best&quot; for reasons other than the exam. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a better solution is to run a statistical analysis of the exam itself after the students take it. There are measures of consistency that will tell you whether the individual question marks are consistent with the overall marks. See Reliability measures &lt;a href=&quot;http://chemed.chem.purdue.edu/chemed/stats.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there is a simpler way that you can proceed, provided that you explain it to the students in advance. There is no absolute law or reason that every question on an exam has to count toward the overall grade. You can have a few ultra subtle questions on an exam that are not intended to &quot;count&quot; but which give you additional information you can use for, say, advising and shepherding. You don't need to tell the students which questions are the non-counters, but should let them know that such questions might occur on any exam. If you don't use multiple choice exams then this is easier than trying to find proper statistical measures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A variation on the above is to have the subtle questions count for less than the &quot;mainline&quot; questions. That way the bulk of the grade is determined by overall understanding and the subtle questions matter only at the margins, which I'd guess is your intent in any case. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I note that the comment of user ctrl-alt-delor given to your question (testing language usage vs content) is also an important consideration. You can work around it on an individual basis in some situations as long as you are sensitive to it. But if your overall environment doesn't permit individual adjustments or mooting a question, you have to be more careful, likely avoiding the subtleties. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-09T16:39:58.793" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3808" PostTypeId="2" ParentId="3803" CreationDate="2017-10-11T19:26:01.580" Score="3" Body="&lt;p&gt;I am not sure what you mean by a &quot;useful test&quot; in this context.  If your goal is to create a bell curve with English speakers at the top, you could administer the verbal section of the SATs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say that your students are complaining because what you actually wanted from them was unclear without an eagle-eye reading (and from your own accounts, it sounds like this is the case).  If this is the case, then their complaints are legitimate.  It is perfectly reasonable for them to be upset that you are trying to trip them up in a manner orthogonal to what they are actually studying. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to differentiate two different forms of testing.  The first is meant to &lt;em&gt;enhance pedagogy&lt;/em&gt; by plumbing the depths of a topic.  A great pedagogic test creates an occasion for students to consolidate what they know, but it also provides a means of discovery.  Almost everyone that I have ever spoken to about this can remember testing events when, after reading a question, they suddenly &lt;em&gt;understood&lt;/em&gt; something that they had been missing about the topic itself.  This sort of test simply allows students to demonstrate whether or not they understand the material, which forms a sort of philosophical boundary.  If all of the students understand the material, all of the students will achieve close to top marks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is another form of test which is designed to &lt;em&gt;rank&lt;/em&gt; students.  The boundaries here are different, and there is some psychological brinksmanship involved. Even if all of the students understand the material, they will not all achieve top marks.  There are a number of ways to accomplish this.  One is to simply ask a lot of tiny, very detailed questions.  Another is to use questions about the subject that don't even have to be particularly hard; you simply have to set enough traps.  The &lt;em&gt;best and most capable students&lt;/em&gt; fall for the fewest traps (or so the thinking goes). Of course, using this second method causes resentment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But very fundamentally, the &lt;em&gt;goals&lt;/em&gt; and &lt;em&gt;means&lt;/em&gt; of these two types of tests that are fundamentally different from each other. By trying to combine them, you ultimately wind up with a test that is good at neither.  And if students expect &lt;em&gt;pedagogical&lt;/em&gt; tests that are designed simply to test knowledge, but instead they receive &lt;em&gt;ranking&lt;/em&gt; tests, they will feel that their trust has been breached.  When students do not trust their teacher, learning is dampened.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We should not resort to verbal trickery to differentiate between students.  Make the questions harder by forcing them to integrate the material more deeply, or use it at a more advanced level.  They can reasonably become confused about how to accomplish the difficult task you have set before them.  They should never become confused about what that task is in the first place.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-10-11T19:26:01.580" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3809" PostTypeId="2" ParentId="3803" CreationDate="2017-10-12T21:46:44.073" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The more subtle questions might hinge on a distinction of singular vs plural or other 'wording' aspects, so that those who have the strongest grasp of the material can differentiate themselves.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You're grading attention to wording details, and not comprehension of the material. Grading attention to wording would be appropriate if you were teaching reading comprehension, but it isn't specifically relevant to teaching computer science.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It would seem impolitic for me to say that I made that item difficult deliberately, but it is true.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you ask a trick question, you're playing a trick on your students. Ok, so I used a word trick in my last sentence, but there's some truth to it. You aren't making the question difficult by requiring deep knowledge of the material, but by requiring subtle understanding of the question. A good trick question announces itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give an example, as a TA in a programming class, I gave my students some very short code snippets and asked them what they did (more precisely, I asked what the code printed, or the final value of a variable). I started with easy things like &lt;code&gt;x = 3; x = x + 1&lt;/code&gt; and finished with subtle things that I only expected the most advanced students to grasp, like &lt;code&gt;x = x++&lt;/code&gt; (it was a C class). I warned them in advance that there would be trick questions. I don't have exam results, since I was only TAing and not doing the exams, but from reading the students' faces, I do think that the brightest students understood, and the slower ones didn't but kind of got the idea that there was a difficulty, which is what I was aiming for. Note how the subtlety was packed in the code and highlighted, not hidden under a word trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To test a deep understanding of the material, explore finer points of the test material. For example, put some concepts that were covered in the lecture together in a way that wasn't covered, and see if the students are able to relate them to the lecture material.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Instead I usually point back to the textbook or my lecture to say that I actually explained and even stressed the point.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;What's your students' reaction here? If it's “ah, I see, I hadn't understood/remembered that part of the lecture”, you're doing it right. If it's “ah, I see, I hadn't understood the question that way”, you're doing it wrong.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I usually get a good spread of numerical grades, so experience says that I am doing this correctly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't see how that follows. (After all, random grade assignment would get a good spread.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your students would be somewhat justified to consider your grading unfair, since it isn't based on knowledge or comprehension of the material. Yes, attention to detail is a useful thing, but trick questions, not so much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are also heavily penalizing students to whom your course is in a foreign language, and possibly students with reading disabilities. The former may or may not be acceptable; the latter, if it is the case, isn't.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In a workplace subtleties will be vital, so it is not a manufactured situation to include them in my teaching, and I only use subtle distinctions in tests where they exist in the material, and are worth emphasizing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'll now put my teacher hat back onto the shelf where it was gathering dust, and put my engineer hat back on. I regularly read and write requirements documents. (A test question is a kind of requirements document for the answer.) Requirements documents should be precise, but they should not be &lt;em&gt;subtle&lt;/em&gt;. If I notice a subtlety in a requirements document, I'm not going to blindly implement what the document says, I'll send it back for clarification. If I'm writing a requirements document, I pay attention to being clear, I'm not going to convey a requirement through something like a plural. If the plural is at all important, I'll at least highlight it with a word like “multiple widgets”, and probably “multiple simultaneous widgets” or “multiple concurrent widgets” or whatever it is I actually want.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do you handle situations where students push back on the wording of test questions or answers?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Given your description of the tests, in this situation, I think you should change the way you word your tests.&lt;/p&gt;&#xA;" OwnerUserId="124" LastActivityDate="2017-10-12T21:46:44.073" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3810" PostTypeId="2" ParentId="3803" CreationDate="2017-10-13T09:52:25.353" Score="1" Body="&lt;p&gt;Although other answers have mentioned aspects of testing language skills for non-native speakers and other reasons why language focussed questions cause problems I felt the case for students with alternate needs in Computer Science specifically needs addressing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have much experience in working with and teaching Computer Science to students with various alternate needs. In my experience students with dyslexia, dyspraxia and other specific learning disabilities are not uncommon in computer science classes. I could go even further and say they are quite common in computer science classes. I expect to find that as many as 20% of an undergraduate computer science class has these characteristics, even if they have not been diagnosed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dyslexia is a condition where language cognition is lagging behind other measures of intelligence and cognition. In other words these are very capable and bright students who have physical conditions that impair their processing of language. To discriminate against some of the best students in a class and artificially inhibit their progress because of a condition they were born with seems bade educational practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should certainly reflect on your testing methodologies. Learning vocabulary and technical terms is an important part of learning but it has to be assessed in an appropriate and non-discriminatory way.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2017-10-13T09:52:25.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3811" PostTypeId="1" CreationDate="2017-10-13T12:35:15.653" Score="6" ViewCount="366" Body="&lt;p&gt;If your students are like mine, they do a lot of their work outside my view; at home, on weekends, etc. But as they work they sometimes get stuck. They get questions for which they need the answers in order to continue. Sometimes it is a long time before the next class period or office hour. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose that you would like to be able to answer their questions as they arise, but without disadvantaging other students who may have the same question but didn't think to ask. Sometimes, in fact, a student finds an inconsistency in something you said or gave them, and needs a correction before they can continue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What tools and mechanisms do you find useful for letting students get necessary answers, at times you are not in class or office hours? I'm looking for actual solutions, not guesses about what &lt;em&gt;might&lt;/em&gt; work or which make someone's life (mine) miserable. I'm pretty sure that giving out my cell phone number fails on too many levels to consider. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2017-10-13T12:42:08.673" LastActivityDate="2017-10-29T19:25:10.337" Title="Answering student questions as they work outside class" Tags="|student-motivation|classroom-management|communication|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3812" PostTypeId="5" CreationDate="2017-10-13T12:52:06.207" Score="0" Body="&lt;p&gt;Teaching is all about communication, of course, but some aspects have a bigger impact than others. Lecture is a form of communication, of course, as is feedback given to students on their work. However, feedback from student to instructor can also be critical to educational success. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also times at which communication between students is essential, as when students work together on teams. Use this tag for questions in which communication is a central focus. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-13T12:52:06.207" LastActivityDate="2017-10-13T12:52:06.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3813" PostTypeId="4" CreationDate="2017-10-13T12:52:06.207" Score="0" Body="Communication is multi-faceted. It can be from instructor to student or student to instructor. It can also be communication between students. Use this tag for questions that involve methods and consequences of communication, both in class and outside. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-13T12:52:06.207" LastActivityDate="2017-10-13T12:52:06.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3815" PostTypeId="1" AcceptedAnswerId="3969" CreationDate="2017-10-13T14:10:00.797" Score="6" ViewCount="2235" Body="&lt;p&gt;In 2012 &lt;a href=&quot;https://royalsociety.org/topics-policy/projects/computing-in-schools/report/&quot; rel=&quot;noreferrer&quot;&gt;shutdown or restart&lt;/a&gt; published by the royal society, recommended that UK schools have 3 parts to computing. No longer the single amorphous blob that was ICT. (Some things from ICT, would no longer be taught.) These 3 parts should be Computer Science, IT, and Digital Literacy (that paper says that its meaning for IT, is not the same as others have used it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/kW2gP.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/kW2gP.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no problem understanding what Computer Science is and what it includes, however I continue to struggle with understanding what IT and Digital literacy are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;“Digital literacy is not a ‘subject’ in itself – neither are reading and writing – but is an essential skill for all in the modern age.” … “‘Office’ applications such as word processing,” — So learning learning to use office applications at a high level, is it IT or Digital Literacy or both?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think a lot of other teachers struggle with this. I have heard teachers saying “We don't do that any more. No we don't do ICT any more.” or “Isn't it a shame that we don't do that any more, now that there is no ICT.”. In a lot of instances I think that what they are talking about would be IT or Digital literacy, under the new scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other cases, where I see teachers planning to teach computer art, and wonder is this not art? (A lot of this could be leftover from the ICT days.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So the question is what is the difference between Computer Science, IT, and Digital Literacy? with examples.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;E.g. Where do these fit in?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Computer art.&lt;/li&gt;&#xA;&lt;li&gt;Computer animation.&lt;/li&gt;&#xA;&lt;li&gt;Typing training.&lt;/li&gt;&#xA;&lt;li&gt;Unix operating system[Linux foundation certification].(&lt;a href=&quot;https://training.linuxfoundation.org/certification&quot; rel=&quot;noreferrer&quot;&gt;https://training.linuxfoundation.org/certification&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Systems admin.&lt;/li&gt;&#xA;&lt;li&gt;Computer Maintenance.&lt;/li&gt;&#xA;&lt;li&gt;Network admin.&lt;/li&gt;&#xA;&lt;li&gt;Basic training: opening files and programs, saving, loading, file system structure, …&lt;/li&gt;&#xA;&lt;li&gt;Use of a work processor.&lt;/li&gt;&#xA;&lt;li&gt;Computational thinking.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note I have intentionally included some examples that may not fit in ether, and some that an arguably do. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-19T17:24:49.330" LastActivityDate="2017-12-23T13:16:02.800" Title="Computer Science vs IT vs Digital Literacy" Tags="|information-technology|digital-literacy|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3816" PostTypeId="2" ParentId="3815" CreationDate="2017-10-13T14:21:42.433" Score="0" Body="&lt;p&gt;Here is an example of a curriculum overview that I came across recently, referred to in another question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://k12cs.org/framework-statements-by-grade-band/&quot; rel=&quot;nofollow noreferrer&quot;&gt;USA K-12 Computer Science Framework Statements by Grade Band&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It explains what is meant by the terms in your question. Seems quite comprehensive, I didn't have much of that knowledge until the early 90's, when I had been programming professionally for a few years, after getting a BS in Engineering. I suppose that wiser people than I am can pull something like this off.&lt;/p&gt;&#xA;" OwnerUserId="3290" LastActivityDate="2017-10-13T14:21:42.433" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3817" PostTypeId="2" ParentId="3815" CreationDate="2017-10-13T14:23:57.013" Score="0" Body="&lt;h1&gt;Excerpt from the report (&lt;a href=&quot;https://royalsociety.org/topics-policy/projects/computing-in-schools/report/&quot; rel=&quot;nofollow noreferrer&quot;&gt;shutdown or restart&lt;/a&gt;)&lt;/h1&gt;&#xA;&lt;p&gt;So not the answer I am looking for, as it is just one big quote, and not the examples I am looking for.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h1&gt;Definitions of terms used in this report&lt;/h1&gt;&#xA;&lt;h2&gt;Computer Science should be interpreted as referring to the scientific discipline of Computer Science, covering principles such as&lt;/h2&gt;&#xA;&lt;p&gt;algorithms, data structures, programming, systems architecture design,&#xA;problem solving etc.&lt;/p&gt;&#xA;&lt;h2&gt;Information Technology should be understood to mean the assembly, deployment, and configuration of digital systems to meet user needs&lt;/h2&gt;&#xA;&lt;p&gt;for particular purposes. We elaborate this definition in Chapter 2,&#xA;section 2.5.&lt;/p&gt;&#xA;&lt;p&gt;Often we use the phrase Computer Science and Information Technology to&#xA;indicate the union of the two, as this report reflects issues in both&#xA;areas. We avoid using the term ‘ICT’, except when referring to&#xA;existing curricula or qualifications that are labelled as such. We&#xA;elaborate on this definition in Chapter 2, section 2.4.&lt;/p&gt;&#xA;&lt;h2&gt;Digital literacy should be understood to mean the basic skill or ability to use a computer confidently, safely and effectively,&lt;/h2&gt;&#xA;&lt;p&gt;including: the ability to use office software such as word processors,&#xA;email and presentation software, the ability to create and edit&#xA;images, audio and video, and the ability to use a web browser and&#xA;internet search engines. These are the skills that teachers of other&#xA;subjects at secondary school should be able to assume that their&#xA;pupils have, as an analogue of being able to read and write. We&#xA;elaborate on this definition in Chapter 2, section 2.6.&lt;/p&gt;&#xA;&lt;p&gt;Inevitably there will be topics that test the extent to which the&#xA;three areas above can be effectively disaggregated – there will always&#xA;be some blurring at the boundaries. Nevertheless, we maintain that it&#xA;is useful to make these distinctions as an aid to effective&#xA;communication between stakeholders.&lt;/p&gt;&#xA;&lt;h1&gt;2.4 The Nature of Computer Science It is the firm belief of the Advisory Group to this project that Computer Science is a rigorous&lt;/h1&gt;&#xA;&lt;p&gt;subject discipline, in the same way that Mathematics or Physics are.&#xA;The ‘Computing at School’ group8 characterises a ‘discipline’ as a&#xA;subject that has9:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A body of knowledge, including widely applicable ideas and concepts, and a theoretical framework into which these ideas and&#xA;concepts fit.&lt;/li&gt;&#xA;&lt;li&gt;A set of rigorous techniques and methods that may be applied in the solution of problems, and in the advancement of knowledge.&lt;/li&gt;&#xA;&lt;li&gt;A way of thinking and working that provides a perspective on the world that is distinct from other disciplines.&lt;/li&gt;&#xA;&lt;li&gt;A stable set of concepts: a discipline does not ‘date’ quickly. Although the subject advances, the underlying concepts and processes&#xA;remain relevant and enlightening.&lt;/li&gt;&#xA;&lt;li&gt;An existence that is independent from specific technologies especially those that have a short shelf-life.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Computer Science is a discipline with all of these characteristics 10.&#xA;It encompasses foundational principles (such as the theory of&#xA;computation) and widely applicable ideas and concepts (such as the use&#xA;of relational models to capture structure in data). It incorporates&#xA;techniques and methods for solving problems and advancing knowledge&#xA;(such as abstraction and logical reasoning), and a distinct way of&#xA;thinking (computational thinking) and working that sets it apart from&#xA;other disciplines. It has longevity (most of the ideas and concepts&#xA;that were current 50 or more years ago are still applicable today),&#xA;and every core principle can be taught or illustrated without relying&#xA;on the use of a specific technology.&lt;/p&gt;&#xA;&lt;p&gt;Concepts include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Programs: these tell a computer exactly what to do. Every program is written in some programming language, each with different&#xA;strengths. Good languages embody many abstraction mechanisms that&#xA;allow a piece of code to be written once, and reused repeatedly. This&#xA;abstraction is the key to controlling the enormous complexity of real&#xA;programs (e.g. a web browser), which consists of dozens of layers of&#xA;such abstractions.&lt;/li&gt;&#xA;&lt;li&gt;Algorithms: re-usable procedures (often a sequence of steps) for getting something done. For example, plan the shortest delivery route&#xA;for a lorry, given the required stops on the route.&lt;/li&gt;&#xA;&lt;li&gt;Data structures: ways to organise data so that a program can operate quickly on it. For example, there are many different ways to&#xA;represent numbers (twos-complement, floating point, arbitrary&#xA;precision, etc) with different trade-offs. Another example: a lookup&#xA;table might be organised as a sorted array or as a hash table,&#xA;depending on the size of the table and key distribution.&lt;/li&gt;&#xA;&lt;li&gt;Architecture: this is the term used to describe the large scale structure of computer systems. At the bottom is real physical&#xA;hardware. On top of that are layered virtual machines. Compilers&#xA;translate from a high level programming language to the low-level&#xA;binary that the hardware or virtual machine executes. Operating&#xA;systems manage the resources of the machine.&lt;/li&gt;&#xA;&lt;li&gt;Communication: almost all computer systems consist of a collection of sub-computers, each running one or more programs, and communicating&#xA;with the others by sending messages or modifying shared memory. The&#xA;internet itself is a large-scale example of such a collection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Alongside these concepts are a set of Computer Science ‘methods’ or&#xA;ways of thinking, including:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Modelling: representing chosen aspects of a real-world situation in a computer.&lt;/li&gt;&#xA;&lt;li&gt;Decomposing problems into sub-problems, and decomposing data into its components.&lt;/li&gt;&#xA;&lt;li&gt;Generalising particular cases of algorithm or data into a more general-purpose, re-useable version.&lt;/li&gt;&#xA;&lt;li&gt;Designing, writing, testing, explaining, and debugging programs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These ways of thinking have much in common with other sciences and&#xA;mathematics.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, Computer Science is an ‘underpinning’ subject, in the sense&#xA;that its concepts are useful to many other science and engineering&#xA;disciplines, particularly physics, and in some cases they are relied&#xA;upon to such an extent that they can be considered to be part of that&#xA;subject too. For example, algorithms are sometimes considered to be an&#xA;element of discrete mathematics, and the logical and rigorous approach&#xA;of Computer Science has much in common with mathematics in general 11.&#xA;Indeed, the use of digital technologies in the teaching of mathematics&#xA;(given the overlap in areas such as algorithms, and the need for&#xA;technology to teach mathematical modelling in particular) is the&#xA;subject of a report from the Joint Mathematical Council of the UK&#xA;released in November 2011.&lt;/p&gt;&#xA;&lt;p&gt;Establishing territorial boundaries between subjects is problematic,&#xA;and in common with other fundamental disciplines, Computer Science can&#xA;sometimes suffer from being assumed to be primarily a ‘tool’ for other&#xA;sciences rather than a subject in its own right. It is both of these,&#xA;and in particular it is a science and an engineering discipline.&#xA;However most STEM initiatives do not explicitly refer to Computer&#xA;Science as a STEM discipline.&lt;/p&gt;&#xA;&lt;h1&gt;2.5 The Nature of Information Technology Information Technology is the application of computer systems and the use of pre-existing&lt;/h1&gt;&#xA;&lt;p&gt;software to meet user needs. It is the assembly, deployment and&#xA;configuration of digital systems to meet user needs for specific&#xA;purposes. Information Technology involves:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using software for storing and manipulating data (sorting, searching and reordering), file systems (naming, categorising and&#xA;organising), and the effective application of databases and&#xA;spreadsheets for particular tasks.&lt;/li&gt;&#xA;&lt;li&gt;Creating and presenting information within a variety of contexts with a sense of audience, fitness for purpose and drafting and&#xA;redrafting as key considerations.&lt;/li&gt;&#xA;&lt;li&gt;Designing and configuring systems for others to use including spreadsheets, databases, web- based interfaces such as quizzes, forum,&#xA;wiki and profile pages.&lt;/li&gt;&#xA;&lt;li&gt;Project planning and management including the identification of need, writing specifications, designing and creating products,&#xA;evaluating their effectiveness and so identifying the further&#xA;development to meets the needs of the user.&lt;/li&gt;&#xA;&lt;li&gt;Security,  safety, and etiquette online, in particular when using email, forums, virtual worlds and social networks.&lt;/li&gt;&#xA;&lt;li&gt;The social, economic, ethical, moral, legal and political issues raised by the pervasive use of technology in the home, at work and for&#xA;leisure.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Technology has evolved rapidly in recent years with the emergence of&#xA;multimedia computers, the internet and worldwide web, mobile Computing&#xA;and web 2.0 applications, and will continue to evolve in the future.&#xA;Despite these changes, the critical elements of Information Technology&#xA;as a subject will remain:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;handling and communicating information,&lt;/li&gt;&#xA;&lt;li&gt;designing and creating resources,&lt;/li&gt;&#xA;&lt;li&gt;evaluating and sensing fitness for purpose, and&lt;/li&gt;&#xA;&lt;li&gt;being aware of the implications of the pervasive use of technology in society.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;2.6 The nature of digital literacy Digital literacy is the analogue of being able to read and write – a fundamental skill which it is&lt;/h1&gt;&#xA;&lt;p&gt;necessary to possess in order to access all subjects across the&#xA;curriculum, including Computer Science and Information Technology.&#xA;Digital literacy is not a ‘subject’ in itself – neither are reading&#xA;and writing – but is an essential skill for all in the modern age.&lt;/p&gt;&#xA;&lt;p&gt;Digital literacy is the ability to use computer systems confidently&#xA;and effectively, including:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;‘Office’ applications such as word processing, presentations and spreadsheets&lt;/li&gt;&#xA;&lt;li&gt;The  use of the Internet, including browsing, searching and creating content for the Web and communication and collaboration via&#xA;e-mail, social networks, collaborative workspace and discussion forums&lt;/li&gt;&#xA;&lt;li&gt;Creative applications such as digital photography, video editing, audio editing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We intend “digital literacy” to connote those skills that (say) a&#xA;history teacher can assume his / her students have, just as s/he&#xA;assumes they can spell (literacy) and do simple mental arithmetic&#xA;(numeracy). Higher level information handling skills are part of&#xA;Information Technology.&lt;/p&gt;&#xA;&lt;p&gt;Digital literacy does need to be taught: young people have usually&#xA;acquired some knowledge of computer systems, but their knowledge is&#xA;patchy. The idea that teaching this is unnecessary because of the&#xA;sheer ubiquity of technology that surrounds young people as they are&#xA;growing up – the ‘digital native’ – should be treated with great&#xA;caution.&lt;/p&gt;&#xA;&lt;p&gt;In terms of delivery, digital literacy can be treated much like&#xA;literacy and numeracy are dealt with at school:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Discrete lessons and teaching embedded within the broader curriculum throughout primary education and in the early part of&#xA;secondary education.&lt;/li&gt;&#xA;&lt;li&gt;Opportunities for pupils to apply and develop these skills through authentic, purposeful and collaborative projects in most or all&#xA;subject areas throughout primary and secondary education.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Whilst digital literacy skills can be taught and assessed using online&#xA;systems, at the pupil’s own pace, teacher- led lessons and project&#xA;work allow the teacher to focus on developing pupils’ knowledge and&#xA;understanding of the systems pupils use, and provide opportunity for&#xA;collaborative work.&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion Information Technology and Computer Science are distinct subjects, with different purposes, although they have areas of&lt;/h1&gt;&#xA;&lt;p&gt;synergy. Computer Science is an academic discipline, in the same way&#xA;that mathematics and physics are.&lt;/p&gt;&#xA;&lt;p&gt;Digital literacy is a core skill for accessing subjects across the&#xA;curriculum, including Computer Science and Information Technology&#xA;themselves.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-23T13:16:02.800" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3818" PostTypeId="2" ParentId="3811" CreationDate="2017-10-13T15:40:32.747" Score="3" Body="&lt;p&gt;Threaded discussion forums allow everyone to see all questions and answers and to post questions and receive answers at any time that you find convenient to check in and update. I have used this in online teaching before. It works very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, I don't know of anything else that does or would work. I would love to hear about other possibilities.&lt;/p&gt;&#xA;" OwnerUserId="3291" LastActivityDate="2017-10-13T15:40:32.747" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3819" PostTypeId="1" CreationDate="2017-10-13T16:00:50.850" Score="3" ViewCount="189" Body="&lt;p&gt;My students will soon be learning &lt;strong&gt;ADO.Net&lt;/strong&gt; in C#, adding on to the Windows programming skills that they recently gained. Just a few pages from one chapter in the textbook introduce the set of layers and interconnected objects needed to do the simplest first program: a DataGridView that allows full update of a table. I have taught this once before, so I have some idea what landmines to avoid, but the fact is that they will need to know pretty much the whole picture to do anything. As Chogyam Trungpa said (about the spiritual path), &quot;It is like swallowing a porcupine: once you start, you have to eat the whole thing.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was able to learn and understand all of this last year because I had the fortunate accident of a very intense introduction to database programming in my first &quot;real job&quot; in 1989, taking over the development and support of a PC distributed database product written in C. I had no significant instruction in databases before that except to do some work with dBase III. I know the concepts that dictate the structure of the ADO.Net classes, because I learned these fundamental, invariant ideas in an entirely different context. Thus, I can also teach these concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with so many moving parts to master up front, I think that the students get very deeply lost, and it is hard to disentangle their errors and help them even start on some lab exercises. &lt;strong&gt;Do you have any suggestions for how to introduce a subject where one must know so many new ideas all at once in order to begin?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3292" LastEditorUserId="27" LastEditDate="2017-10-14T20:12:43.610" LastActivityDate="2017-10-14T20:12:43.610" Title="How to keep students heads from exploding from complex, interconnected topics" Tags="|lesson-ideas|databases|data-structure|c#|windows|" AnswerCount="3" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3820" PostTypeId="2" ParentId="3819" CreationDate="2017-10-13T17:08:41.173" Score="3" Body="&lt;p&gt;Students are better able to handle structured information when they understand, at the start, what that structure is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain the situation to your students.  You are about to present a series of deeply interconnected systems, and though they form a beautiful system together, they essentially can't do anything until they're all moving in tandem.  That means that there are two levels of learning that the students must engage in:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The systems themselves; and&lt;/li&gt;&#xA;&lt;li&gt;how they play with one another.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would show them a list of the systems at play in as neat of a form as I could.  I am unfamiliar with the topic that you are teaching, so I don't know if this would be possible, but an interconnected graph would be ideal for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain that you will be going through the systems (the nodes), and that students can make a check-mark on each node as they come to understand them independently.  But you will also be going over the vertices, and these are just as important.  They also need check-marks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over the course of the unit, students can refer to this graph as a way to measure their own progress and understanding, and to take charge of their own learning.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This graph has an additional benefit; your own teaching can now follow the same model.  You now have a structure &lt;em&gt;that the students will already understand&lt;/em&gt; from which to spin out your lessons.  And if a student seems to be having trouble, pull that graph out and have that student begin explaining certain nodes or vertices back to you; it should quickly become apparent where the confusion lies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-10-13T17:08:41.173" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3821" PostTypeId="2" ParentId="3819" CreationDate="2017-10-13T17:30:48.537" Score="0" Body="&lt;p&gt;It seems that you are not teaching a subject, but training in the use of a tool.&lt;/p&gt;&#xA;&lt;p&gt;First ask what is your objective. Is it to train in this tool, or to teach computing principles.&lt;/p&gt;&#xA;&lt;p&gt;Then in either case, teach the principles (first or only).&lt;/p&gt;&#xA;&lt;h1&gt;Get them to do part of the problem/program «fill in the gaps».&lt;/h1&gt;&#xA;&lt;p&gt;I have been playing with couch-db / mustache / html / css, each of this can be taught separately, and some have multiple parts, and you can't really understand couch-db without it all. So a similar situation.&lt;/p&gt;&#xA;&lt;p&gt;I would&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;first look for parts that could be taught independently. And teach them.&lt;/li&gt;&#xA;&lt;li&gt;show them the big picture (See Ben.I's &lt;a href=&quot;https://cseducators.stackexchange.com/a/3820/204&quot;&gt;answer&lt;/a&gt;) (you may do this earlier, if needed, else show a smaller big picture earlier).&lt;/li&gt;&#xA;&lt;li&gt;then look at parts that you can teach by creating most of the solution your self, and having them «fill in the gaps». This should involve using only one, or a few, principles at a time.&lt;/li&gt;&#xA;&lt;li&gt;continue with them filling in the gaps or making improvements to your existing code. You may need several projects for them to work on. One for each fill in the gaps exercise.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-13T17:30:48.537" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3822" PostTypeId="2" ParentId="3819" CreationDate="2017-10-13T18:07:23.160" Score="1" Body="&lt;p&gt;This answer is a supplement to those of BenI. and ctrl-alt-delor, with a specific suggestion. Call it an implementation strategy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your problem is that the topic is broad, with lots of parts. You can show them the big picture by showing them a complete application that is as shallow as can be (broad but shallow). It has all the parts, but each part is as simple as you can make it. It could even be a dummy app with almost no functionality. That is a way to implement BenI.'s solution. Then have them work with it to deepen parts of it (as ctrl-alt-delor suggests) filling in gaps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you give them a complete simple solution it is an example of the &lt;em&gt;Lay of the Land&lt;/em&gt; &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; or Kerstin Voigt's &lt;a href=&quot;http://www.pattron.net/Pattern.aspx?Id=175&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Big Picture on a Small Scale&lt;/em&gt;&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative is to do the above but also break your solution a bit in ways that fixing it will be instructive and then give them the broken &lt;em&gt;almost&lt;/em&gt; solution with instructions to fix it. That would make it an example of the &lt;em&gt;Fixer-Upper&lt;/em&gt;, which can be found in the book, also.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This might be a good place to use teamwork or pairing so that the students can help one another with understanding the parts and the connections. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-13T18:19:57.483" LastActivityDate="2017-10-13T18:19:57.483" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3824" PostTypeId="2" ParentId="3815" CreationDate="2017-10-14T07:10:06.960" Score="4" Body="&lt;p&gt;When we were drafting the &lt;a href=&quot;https://www.gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study/national-curriculum-in-england-computing-programmes-of-study&quot; rel=&quot;nofollow noreferrer&quot;&gt;English national curriculum&lt;/a&gt;, we found it easier to think in terms of the foundations, applications and implications of computing, all three of which really should be included in any broad and balanced approach to the subject. You can map these to computer science, IT and digital literacy if you wish, although you would need to accept a rather broader definition of digital literacy than that used by the Royal Society &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Foundations&lt;/strong&gt; would be about the underpinning principles of computer science (logic, algorithms, data representation, abstraction), as well as their practical expression through programming and more generally in computational thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Applications&lt;/strong&gt; is about skills in using digital technology to get useful work done, including collecting, managing, analysing and communicating data and information and creative work in a range of digital media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Implications&lt;/strong&gt; is about a critical understanding of the impact of digital technology on individuals and society as well safe, responsible and ethical use. I'd include intellectual property, privacy and security here too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've an illustration of all three in response to the question 'How does Google work?' &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Foundations&lt;/strong&gt;: big data, Page Rank, Big Table / the &lt;a href=&quot;https://static.googleusercontent.com/media/research.google.com/en//archive/gfs-sosp2003.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google File System&lt;/a&gt; (GFS) etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Applications&lt;/strong&gt;: type your query, click the button (well, these days it starts searching as you type), but also filtering results, advanced queries etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Implications&lt;/strong&gt;: profile, filter bubbles, advertising, smart creatives, separating costs and revenues for accounting purposes etc&lt;/p&gt;&#xA;" OwnerUserId="44" LastEditorUserId="44" LastEditDate="2017-10-14T15:41:51.390" LastActivityDate="2017-10-14T15:41:51.390" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3825" PostTypeId="2" ParentId="3811" CreationDate="2017-10-14T12:59:24.923" Score="2" Body="&lt;p&gt;In my opinion, &lt;a href=&quot;https://moodle.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Moodle&lt;/a&gt; is a great tool to manage lesson-related things. Usually, the school IT department installs Moodle (which is free and open-source) on a central server and makes it available for teachers to use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To start, you set up a course for you and your students. The access to a course can be limited (for example using a registration key you hand out in a lesson) so only authorized persons can view the course contents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each course provides a &lt;strong&gt;discussion forum&lt;/strong&gt; which can be used for course participants (students and teachers) to ask and answer questions. You can set up an email notification for new forum posts, with which I've made good experiences.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Furthermore, Moodle has a lot of other interesting features that could come in handy:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Distributing material&lt;/strong&gt;: In a course, you can create sections containing links, files, images and formatted text. This can be used to create a place where students can look up lesson contents after the lesson or to distribute links and resources during a lesson. The sections can be hidden, if you don't want to show everything at once.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Assignments&lt;/strong&gt;: Moodle offers a function for students to hand in assignment results (as files) which can be evaluated by the teacher&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Polls&lt;/strong&gt;: Using the &quot;choice activity&quot;, you can create polls&lt;/li&gt;&#xA;&lt;li&gt;A lot more features sounding promising I haven't tested yet: &lt;strong&gt;Wikis&lt;/strong&gt;, &lt;strong&gt;quizzes&lt;/strong&gt;, &lt;strong&gt;chats&lt;/strong&gt;... (a &lt;a href=&quot;https://docs.moodle.org/33/en/Managing_activities&quot; rel=&quot;nofollow noreferrer&quot;&gt;list of features&lt;/a&gt; can be found in the Moodle documentation, further extension is possible using plugins)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-10-14T12:59:24.923" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3826" PostTypeId="2" ParentId="2897" CreationDate="2017-10-14T18:24:35.027" Score="1" Body="&lt;p&gt;I was just watching &lt;a href=&quot;https://media.libreplanet.org/u/libreplanet/m/a-free-software-portfolio-the-importance-of-free-software-in-computer-science/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://media.libreplanet.org/u/libreplanet/m/a-free-software-portfolio-the-importance-of-free-software-in-computer-science/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The presenter talk about  &lt;a href=&quot;http://teachingopensource.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;teachingopensource.org&lt;/a&gt;, and how they have put together educational materials for Free and Open Source software. He says that the material is put together by teachers. see &lt;a href=&quot;http://teachingopensource.org/?s=git&quot; rel=&quot;nofollow noreferrer&quot;&gt;teachingopensource.org git search&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I got this link from reddit &lt;a href=&quot;https://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://learngitbranching.js.org/&lt;/a&gt; maybe it will be of use. But I doubt that it will make git easy to use.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: I have not tried these yet.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-04-21T07:12:41.527" LastActivityDate="2020-04-21T07:12:41.527" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3827" PostTypeId="5" CreationDate="2017-10-14T20:08:40.190" Score="0" Body="&lt;p&gt;Information Technology (IT) is a general term that is used often to describe business and commercial operations that use computing in some form. It is often how the products of Computer Science are applied in the real world. Historically, Computer Science focused originally on the computers themselves and later on software. On the other hand IT focused on organizational processes that use information. These processes have existed since before computers, though have been strongly influenced by computing since about 1950. IBM, for example made equipment (unit-record equipment) that predates computers. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-14T20:16:06.657" LastActivityDate="2017-10-14T20:16:06.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3828" PostTypeId="4" CreationDate="2017-10-14T20:08:40.190" Score="0" Body="Used for questions about Information Technology, a more general term than Computer Science and often focused on business and commercial applications rather than theory. This tag is for questions on teaching IT concepts, especially as they relate to Computer Science. " OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2018-02-01T18:43:54.520" LastActivityDate="2018-02-01T18:43:54.520" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3829" PostTypeId="5" CreationDate="2017-10-14T20:11:16.773" Score="0" Body="&lt;p&gt;Digital Literacy as an academic subject involves students learning the fundamentals of computation and the use of computers. It may involve programming, at least in a rudimentary way. In the modern world it is difficult to get along without some level of knowledge of Digital Literacy, as the security of our handheld devices, for example, impact our lives. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-14T20:18:36.373" LastActivityDate="2017-10-14T20:18:36.373" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3830" PostTypeId="4" CreationDate="2017-10-14T20:11:16.773" Score="0" Body="Digital Literacy is a term used to describe classes/courses that intend, generally, to introduce students to computational concepts and processes. Such classes are often not comprehensive. They may be followed by more specialized courses or not. This tag is for questions related to the teaching of digital literacy and its relationship to Computer Science. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-14T20:11:16.773" LastActivityDate="2017-10-14T20:11:16.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3831" PostTypeId="1" CreationDate="2017-10-15T02:27:39.823" Score="2" ViewCount="74" Body="&lt;p&gt;I am going to be teaching a small-ish group of people to write code to control a device. The code is built around a giant framework made to make it easy to write the actual code. My job nominally is to teach the students how to make the device do things, so I have to begin with the syntax to control the device. This would look like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;leftArm.setPower(10);&#xA;while (gamepad1.buttonA.pressed) {&#xA;  leftArm.setPower(20);&#xA;}&#xA;if (time.seconds == 30) {&#xA;  logger.log(&quot;There are 30 seconds elapsed&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I will have to start with a list of the methods on the objects that are exposed (e.g. &lt;code&gt;leftArm&lt;/code&gt;, &lt;code&gt;time&lt;/code&gt;, &lt;code&gt;logger&lt;/code&gt;, &lt;code&gt;gamepad1&lt;/code&gt;) and how to use them, and cover basic if statements and loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, I'd like to expand their knowledge of computer science concepts while still relating it back to this device. I thought about beginning to explain the framework it's built in, but I started looking at it and it was far to complex to introduce at this point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I take students from this simple understanding of syntax and methods and give them a base of solid, cross-language, CS knowledge?&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2017-10-15T11:02:40.050" Title="Going from syntax to CS concepts" Tags="|object-oriented-paradigm|syntax|robotics|" AnswerCount="1" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3832" PostTypeId="2" ParentId="3831" CreationDate="2017-10-15T10:43:34.647" Score="2" Body="&lt;p&gt;tl;dr Make the mapping between the software and the hardware explicit at the start and then show the code, rather than the other way round. Draw pictures. Give them a mental overall image, not just detail. Detail with no context is hard to follow, and hard to learn. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In many ways this question is like &lt;a href=&quot;https://cseducators.stackexchange.com/q/3819/1293&quot;&gt;another here&lt;/a&gt; in that you have a complex system that must be taught all at once. See the answers to that one, including mine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A useful strategy for this would be to turn it around a bit and start out by saying that the code they are about to see is a &lt;em&gt;model&lt;/em&gt; of the physical device. The parts of the model match the parts of the device. The robot has two arms and so its model has two &quot;Arm objects&quot;. Objects in the model need a description and the description (in Java) is provided by a class: &lt;code&gt;RobotArm&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The physical robot's parts have functionality of various kinds and these are modeled in the &lt;code&gt;RobotArm&lt;/code&gt; class with methods: &lt;code&gt;move&lt;/code&gt;, etc. Once we have the class (at least in skeleton form) we can instantiate it: &lt;code&gt;new RobotArm()&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Robot class itself is built by composition (arm fields: &lt;code&gt;Robot.leftArm&lt;/code&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what you do is make a mapping between the code and the physical thing and point out that (as I assume is true of the code) the mapping is pretty direct. This is actually pretty faithful to the idea of OOP, in fact. Modeling is a good first metaphor for OO programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point you can show them some code, but I'd show it heavily ellipsed, with only the detail needed shown in full. In other words, only show some of the methods and maybe only parts of some methods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the code you show above in your Question doesn't come first, but only now after they have seen the map, even if the map is incomplete. The class is an abstract description of the physical thing and the code completes the description. When you show methods, don't make them naked (as if this were just C coding), but show them as part of their class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've assumed that the robot itself is an actual object in your framework. It is possible that it isn't, if there is only one. The robot &quot;object&quot; may be implicit. Or possibly your code (above) is really part of a method of the Robot class so you wrote leftArm... rather than this.leftArm...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that if the &quot;Robot&quot; were not a physical device, but a screen simulation instead, the same ideas as above work well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way to put all of this is that you do the integration step for them and present that, rather than depending on each student to integrate the detail into a consistent whole and all in the same way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you introduce three big ideas (Class, object, method) and show how they relate to each other and to the physical thing. There are a few smaller ideas also (instantiate, part-whole composition), of course that you incorporate into your lecture. It should only take 15-20 minutes to do this at a high level. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-15T11:02:40.050" LastActivityDate="2017-10-15T11:02:40.050" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3833" PostTypeId="2" ParentId="3758" CreationDate="2017-10-15T12:27:22.703" Score="0" Body="&lt;p&gt;You may not be able to find what you want ready-built, but it shouldn't be hard to develop your own pedagogy here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a different interpretation of the question than I think the other current answers do. I'm going to put my emphasis on the &lt;em&gt;Active Learning&lt;/em&gt; part of the question rather than the &lt;em&gt;Arduino&lt;/em&gt; part. I'm going to have to make some assumptions here, since there is incomplete information. First, I'll assume that your students are young people, up through teen years. Next, I'll assume that your purpose is at least two-fold, learning about Arduino and becoming more confident in speaking and explaining things in a peer setting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For background I'd suggest two things. The first (which I don't suggest doing, but which it is good to be aware of is the game &lt;a href=&quot;https://en.wikipedia.org/wiki/Chinese_whispers&quot; rel=&quot;nofollow noreferrer&quot;&gt;Telephone or Chinese Whispers&lt;/a&gt;. I don't suggest passing a technical description from student to student to see how it gets garbled for two reasons, one of which is that it can lead to embarrassment, and the other is that it would take up too much time. But to subvert the issue of garbling in passed messages feedback at each stage is needed to see that the message gets passed faithfully and even improved. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second thing to look at is two &lt;a href=&quot;https://smile.amazon.com/Guide-Teaching-Computer-Science-Activity-Based/dp/1447166299/ref=sr_1_1?ie=UTF8&amp;amp;qid=1502067480&amp;amp;sr=8-1&amp;amp;keywords=guide+to+teaching+computer+science&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt;, &lt;em&gt;Own Words&lt;/em&gt; and &lt;em&gt;Peer Feedback&lt;/em&gt;. The first suggests that you can get a feel of student understanding by asking them to explain something in their &lt;em&gt;own words&lt;/em&gt;, rather than just a repetition of what they have read or heard. The latter pattern suggests that students give feedback to one another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might try something like the following in a reasonably sized class of young people. After examining some Arduino project from the literature or of your own devising, I'd suggest a somewhat modified problem with some details the same and some different. I'd divide the class into small groups (say 3 students) and ask them to work for a bit to come up with a solution. I would then ask one of the groups to explain their solution to the others, focusing on the new parts. Sometimes it is appropriate for the group to choose a spokesperson and sometimes it is better to require that each student participate in the discussion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the explanation is given, ask the other students to do one or more of the following.   &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ask questions about the solution given&lt;/li&gt;&#xA;&lt;li&gt;Comment on the solution, or at least note where more explanation is needed&lt;/li&gt;&#xA;&lt;li&gt;Improve on the solution&lt;/li&gt;&#xA;&lt;li&gt;(more?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can have a couple of teams give their own explanations. If you do this you can also have a vote on which one seems more complete. You can give a prize for the best explanation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also good if you can use a whiteboard or a projector to note the important elements of the solution given and can use this as a framework to fill in as students make comments. You can judge for yourself when the solution is complete enough that it can be implemented and then send them off to build the thing or keep the discussion going until it is more complete. You can make suggestions along the way, of course, to try to bring out missing parts. You can actually give feedback in a subtle fashion by asking the appropriate questions of the speaking team, rather than directly commenting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This technique works for lots of things, not just Arduino. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Meta discussion:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With teens, avoiding embarrassment is an important consideration as they are developing their own self image and don't like to see it bruised in public. Younger and older students can be (not always) more open. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most classes have a few students who try to answer everything and always put their hand up first. Teams are a way to get each student's contribution into the solution, not just those of the loudest speakers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making it a bit competitive can be good or bad, depending on the nature of your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to build such considerations, when they occur, into your pedagogy. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-15T12:51:01.413" LastActivityDate="2017-10-15T12:51:01.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3834" PostTypeId="2" ParentId="3811" CreationDate="2017-10-15T16:45:24.690" Score="2" Body="&lt;p&gt;&lt;strong&gt;Learning Management Systems&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that Moodle (and specifically the forum feature) may be the optimum solution, but not all institutions have this facility available.  Another similar option that is free and easy to set up is &lt;a href=&quot;https://www.edmodo.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Edmodo&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&quot;https://www.easyclass.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Easyclass&lt;/strong&gt;&lt;/a&gt;.  Both are easy to set up and to share materials, as well as accept student uploads.  They are also FREE :) and you are up and running in literally minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All three of these options are &quot;&lt;em&gt;teacher-centric&lt;/em&gt;&quot;.  Something that is quite popular with MOOCS is a &lt;strong&gt;facebook page&lt;/strong&gt;.  I once got a reply to a question that was holding me up, from two people on the other side of the world- it was 0300 in Ireland, and I got to go to bed by 0330.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Students helping others&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggest or ask for student-leaders in the class. Maybe they can add it to their resume- those with a lot of answers are effectively acting as teaching assistants?  &lt;em&gt;The best way to learn is to teach&lt;/em&gt;.  In any case, it would be very much &quot;&lt;strong&gt;student-centric&lt;/strong&gt;&quot; and self-managed allowing you to spend less time answering questions outside of class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Student Initiative&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students may elect to set one up themselves, and offer peer-support to members- maybe you could be a member but it takes the onus off you to answer all questions.  In many ways, it is better if they help each other, as they would all benefit in my opinion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Teacher Guidance&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From my experience of student questions, either in-class or online, the question one person asks is often in the minds of others as well, but for various reasons they are reluctant to ask.  Perhaps offer a reward for &quot;Question of the month&quot; (SO guidelines being applied) or something to encourage question asking?  Hey, why not an &quot;answer of the month as well?  It could simply be a printout, or something simple.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any of the options above would provide the facility that you need.  Good luck!&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2017-10-29T19:25:10.337" LastActivityDate="2017-10-29T19:25:10.337" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3835" PostTypeId="2" ParentId="3797" CreationDate="2017-10-15T19:30:58.590" Score="2" Body="&lt;p&gt;There are many academic articles reporting high engagement, especially among students underrepresented in computing, using physical computing. &lt;a href=&quot;https://scholar.google.com/scholar?q=physical+computing+education&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://scholar.google.com/scholar?q=physical+computing+education&lt;/a&gt; . Most of them lack a controlled study design. That doesn't mean they don't provide evidence however. For example, from &lt;a href=&quot;http://ieeexplore.ieee.org/document/6562697/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peppler 2013&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The capacity for e-textiles to diversify participation was first&#xA;  documented by Leah Buechley and Benjamin Mako Hill,2 who discovered&#xA;  that while men created the majority of traditional Arduino projects&#xA;  posted on Vimeo, YouTube, Flickr, and other sites (85 percent), women&#xA;  created most of the LilyPad Arduino projects (65 percent). What is&#xA;  striking about this comparison is that both types of projects share&#xA;  the same microprocessor and are programmed in the same language. The&#xA;  researchers suggested that the gender discrepancy could be due to some&#xA;  combination of the tools and materials used (insulated wire versus&#xA;  conductive thread to make connections between components), the&#xA;  construction practices employed (soldering versus sewing), and the&#xA;  nature of the products (robots versus interactive quilts).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;To understand whether changing these factors could significantly alter&#xA;  classroom culture in a similar way, we implemented a series of&#xA;  e-textile experiments in middle school settings where we closely&#xA;  observed how gender dynamics played out. From videotaped observations&#xA;  of subjects working in mixed-gender pairs, we found that both boys and&#xA;  girls equally engaged in e-textile activity, as evidenced by body&#xA;  language, gaze, talk-on-task, and other indicators, but girls tended&#xA;  to play a greater leadership role. The projects were positioned in&#xA;  front of the girls 81 percent of the time; the girls also spent 58&#xA;  percent of the time directing activity, troubleshooting, and deciding&#xA;  next steps and made only 39 percent of the requests for help from&#xA;  teachers and peers. We found that this early leadership was predictive&#xA;  of having more sophisticated command of the technology in subsequent&#xA;  projects, requiring less troubleshooting and assistance from others.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That said, probably wise to heed the central advice of &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1457539276&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kicking Butt in Computer Science&lt;/a&gt;: abandon gender difference as the underlying theory in what works, and emphasize instead a high value on diverse interests and on applications that positively impact people's lives.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-10-15T19:30:58.590" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3836" PostTypeId="1" CreationDate="2017-10-16T21:41:39.987" Score="7" ViewCount="386" Body="&lt;h2&gt;Peanut Butter and Jelly Ending&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have a task that I started with a group of 4th-6th graders at the beginning of a short course on Artificial Intelligence.  In order to demonstrate how &lt;em&gt;exact&lt;/em&gt; computers are about their instructions, I've created a strict syntax for a fictional robot and a series of environmental specifications.  The students must use the syntax provided (in something resembling an API) to generate commands that the Robot will ultimately use to create a Peanut Butter and Jelly Sandwich.&lt;sup&gt;*&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also created a little engine that can run this all at the command prompt, and gives back useful errors if the students either generate a syntax error (ie. &lt;code&gt;take rightHand plate&lt;/code&gt; instead of &lt;code&gt;take plate rightHand&lt;/code&gt;) or attempts an illegal action (such as &lt;code&gt;take plate rightHand&lt;/code&gt; when &lt;code&gt;rightHand&lt;/code&gt; is already full).  I have not yet given them access to the engine; they spent the last 15 minutes of the previous period trying to generate a full set of working instructions from the specification, and they had a lot of fun doing it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a vague notion about what will come next; I want to integrate allowing them to copy/paste their instructions into the engine to see if they have run into trouble, and creating an actual PB&amp;amp;J sandwich (or whatever components of that sandwich they've actually managed to make.)  I have already checked about allergies to peanuts, so we should be safe there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I don't quite see is how to integrate those two activities so that it won't get bogged down.  If &lt;em&gt;I&lt;/em&gt; enact the PB&amp;amp;J creation faithfully, I won't be able to do it for every child.  If I ask &lt;em&gt;them&lt;/em&gt; to create it, they might just change their commands as soon as they see an error, which would let everyone get a sandwich, but wouldn't be as fun.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lesson has had a great start.  How can I finish it up to make it into a home run?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt; - I know that folks in some countries don't eat Peanut Butter and Jelly sandwiches. That's fine as far as it goes, but please know that you are wrong.&lt;sup&gt;*&lt;/sup&gt;&lt;sup&gt;*&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt;&lt;sup&gt;*&lt;/sup&gt; - Unless of course you are allergic to peanuts.&lt;/p&gt;&#xA;" OwnerUserId="1015" LastEditorUserId="2" LastEditDate="2017-10-17T17:37:41.900" LastActivityDate="2017-10-17T17:37:41.900" Title="Peanut Butter and Jelly Ending" Tags="|lesson-ideas|student-motivation|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3837" PostTypeId="2" ParentId="3836" CreationDate="2017-10-16T22:28:07.113" Score="4" Body="&lt;p&gt;I think the &quot;peanut butter jelly sandwich challenge&quot; is a great lesson in general, but it's especially great for computer science. Kudos.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, I think you might be conflating two separate topics that are each worth their own lessons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The exactness of &lt;strong&gt;syntax:&lt;/strong&gt; &lt;code&gt;take rightHand plate&lt;/code&gt; and &lt;code&gt;take plate rightHand&lt;/code&gt; are two different things, and a computer might not be able to understand what you mean.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The exactness of &lt;strong&gt;semantics:&lt;/strong&gt; &lt;code&gt;take plate rightHand&lt;/code&gt; might sound like an obvious instruction to a human, but that's because we've had years of practice picking up plates with our hands. But a computer hasn't had that practice! What if it tries to pick up the plate with a fist? What if it tries to grab a plate by the middle instead of by the edge? So often our instructions to a computer have to be much more detailed than we first thought.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The &quot;semantic exactness&quot; part is the real beauty of the peanut butter jelly sandwich challenge, imho. One of the hardest things to do in computer science is take things that humans &quot;just do&quot; and break them down into individual steps. If they continue exploring CS, your students will eventually have to ask questions like &lt;em&gt;&quot;how would I sort a stack of index cards with numbers written on them?&quot;&lt;/em&gt;, and their initial reaction will be &lt;em&gt;&quot;I don't know, I just do it!&quot;&lt;/em&gt;. The peanut butter jelly sandwich challenge teaches them to dig a little deeper than that first reaction, and to start breaking things down into smaller steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the fun part is that no matter how exact students make their instructions, you can always find a way to get it wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, back to your actual question: I would propose a three-part lesson:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step one:&lt;/strong&gt; Have students come up with &quot;programs&quot; that they enter into your engine. This might be a homework assignment. This teaches them the &quot;syntactic exactness&quot; part, and gets them thinking about breaking things down into smaller steps.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step two:&lt;/strong&gt; In class, have students volunteer to read off their programs. You follow their instructions, pointing out as many inconsistensies as you want, in as messy a way as you want. After a few examples, take a step back and give them the lesson that even if your &lt;strong&gt;syntax&lt;/strong&gt; is valid, sometimes your &lt;strong&gt;semantics&lt;/strong&gt; can be unclear. Then maybe have them abandon your syntax and give you instructions in English, that way they can be more specific about each step. But like I said before, no matter how exact their instructions are, you can still find a way to get it wrong.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step three:&lt;/strong&gt; After a few rounds of this, have students break off into pairs: one student giving instructions, one following them and getting it wrong in the same way you did. Whether you give them real ingredients or tell them to pretend they have real ingredients is up to you and how much of a mess you want to clean up afterwards.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-10-16T22:28:07.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3838" PostTypeId="2" ParentId="3836" CreationDate="2017-10-17T08:40:56.090" Score="3" Body="&lt;p&gt;I have done this, but a bit different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I introduced them to &lt;em&gt;Teacher Robot&lt;/em&gt;. Then got them to give instruction to make the sandwich. As they improved at being an instructor, I improved at being a robot (that is following instructions, not interpreting instructions, so making more mistakes). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After everyone had contributed, and we had attempted 3→4 sandwiches. I called for a volunteer to be the robot. We then repeated the exercise. I did this for 2 or 3 students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As part of the instruction, I tell students that the volunteer robots are more intelligent than real robots, but not all fictional robots. These robots must not do anything dangerous, and will not do anything that they feel uncomfortable with. I also whisper tips to the robots, on how to get it wrong (“Just do what they say.”, “If there is more than one way to interpret what you are told, then choose the wrong one.”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a good &lt;a href=&quot;http://csunplugged.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS-Unplugged&lt;/a&gt; on this: see video example &lt;a href=&quot;https://www.youtube.com/watch?v=6iPfSIxrP18&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=6iPfSIxrP18&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-10-17T08:40:56.090" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3839" PostTypeId="2" ParentId="1205" CreationDate="2017-10-18T10:43:30.780" Score="-2" Body="&lt;p&gt;Please, take a look at &lt;a href=&quot;http://stepik.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Stepik&lt;/a&gt;. Actually I myself work at Stepik, but if you're looking for a free cloud-based solution, it might be really useful for you. Code challenges are tested using stdin-&gt;stdout and you can specify any test cases that will be used to check student's submission. &lt;/p&gt;&#xA;" OwnerUserId="3305" LastActivityDate="2017-10-18T10:43:30.780" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3840" PostTypeId="1" CreationDate="2017-10-18T12:39:08.543" Score="6" ViewCount="436" Body="&lt;p&gt;Does anyone have any suggestions on a small program or application to write that would help a Python beginner work with JavaScript? For example, when one is learning JavaScript, building a small to-do list application is often practiced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something that meshes well with Python and JavaScript? Looking to gain some experience in writing a real-world application rather than watching video courses. &lt;/p&gt;&#xA;" OwnerUserId="3307" LastEditorUserId="1293" LastEditDate="2017-10-19T12:06:52.910" LastActivityDate="2021-02-05T12:40:17.130" Title="Real world example application built with Python and JavaScript?" Tags="|self-learning|python|javascript|" AnswerCount="3" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3841" PostTypeId="2" ParentId="3840" CreationDate="2017-10-18T14:00:11.140" Score="2" Body="&lt;p&gt;I have just written myself a web-mark server, to store book marks to my website. I got fed up with the proprietary ones, and decided to make one of my own (probably could have found a ready made one with a Free Software Licence).&lt;/p&gt;&#xA;&lt;p&gt;It used Couchdb. This involves writing code in Java-script (the manual says that the server side code can also be written in python, I chose JavaScript, so it would help be learn it), but because it provides the framework, you write lots of small functions. You will also end up learning about the no-sql db couchdb, http, and client side web design (html, css, &lt;strong&gt;Java-Script&lt;/strong&gt;). I used jquery and knockout.js on the client side.&lt;/p&gt;&#xA;&lt;h1&gt;First things first&lt;/h1&gt;&#xA;&lt;p&gt;Because I did not follow a tutorial, I ended up looking stuff up as I went. This would probably be to effort-full, if it was your first language, as you would be looking up everything, and not know what to look up (how can you look up how to do a foreach in java-script, if you have not yet heard of a foreach.&lt;/p&gt;&#xA;&lt;p&gt;Therefore it would be beneficial to find a tutorial to do first, then work on a project.&lt;/p&gt;&#xA;&lt;p&gt;You can also work on an existing project. There are many Free Software (Open Source) project that you could help with. It is much easier to contribute to an existing project, that to start from scratch. If you want you can contribute to my bookmark project. (If you do work on someone else's project, and it if for an assessment, then ensure that you tell the assessor what bits you worked on).&lt;/p&gt;&#xA;&lt;p&gt;Learning two languages at a time may make things confusing, and make it take longer to learn. However research into natural languages shows that, for babies and infants, learning two or more languages at a time has a positive long term affect. Though it does slow externally measurable performance at first. For these children the languages are in different contexts, one for each parent, or one at home / one at school. I would suggest that you focus on one language, until you get sufficiently skilled.&lt;/p&gt;&#xA;&lt;p&gt;Python seems to be widely used as a teaching language (1st scratch, then python). JavaScript has may pitfalls. A good language to learn Object Oriented is Eiffel. However you could learn, non-OO first (OO just adds to structured, most modern languages are structured or structured+OO). Therefore, if you have not used scratch, then have a play with it, then start on python.&lt;/p&gt;&#xA;&lt;h1&gt;Other project Ideas — python&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unix command line tools: rewrite some of the Unix tools (I did this in &lt;code&gt;C&lt;/code&gt; in 1st year at university).&lt;/li&gt;&#xA;&lt;li&gt;Create a web-server: there a libraries in python.&lt;/li&gt;&#xA;&lt;li&gt;Something with a &lt;a href=&quot;https://www.raspberrypi.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Raspberry-Pi&lt;/a&gt;: these thinks have connectors to add some sensors and output devices (barcode scanner, rfid reader, LEDs, motors, relays, buttons, …). They also run &lt;a href=&quot;https://www.debian.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Debian&lt;/a&gt; Gnu/Linux ( &lt;a href=&quot;https://www.gnu.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gnu/Linux&lt;/a&gt; runs on &lt;a href=&quot;https://www.top500.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;490 of the top 500 super computers&lt;/a&gt; (the other 10 are other Unixes), &lt;a href=&quot;https://news.netcraft.com/archives/2017/09/11/september-2017-web-server-survey.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;⅔ of web servers&lt;/a&gt;, most of the internet infrastructure, and a lot of inbedded systems.&lt;/li&gt;&#xA;&lt;li&gt;A game: 2D (the &lt;a href=&quot;https://www.libsdl.org/languages.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;SDL&lt;/a&gt; library is very good), or text adventure / interactive fiction.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-19T13:41:02.680" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3842" PostTypeId="5" CreationDate="2017-10-18T14:33:42.900" Score="0" Body="" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-18T14:33:42.900" LastActivityDate="2017-10-18T14:33:42.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3843" PostTypeId="4" CreationDate="2017-10-18T14:33:42.900" Score="0" Body="For questions about teaching, computer networks:&#xD;&#xA;From teaching technical details (OSI levels 1→7) Ethernet, Internet Protocol, TCP, HTTP, …&#xD;&#xA;To teaching best practice when using the web/internet. " OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-18T14:33:42.900" LastActivityDate="2017-10-18T14:33:42.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3844" PostTypeId="1" AcceptedAnswerId="3847" CreationDate="2017-10-19T13:59:12.093" Score="5" ViewCount="258" Body="&lt;p&gt;I frequently teach our CS1 class (taught in Java), and have noticed a problem with critical thinking/planning skills on programs of any substantial size. This seems to be related to two problems: (1) not fully internalizing what tools are available to them (e.g., String methods like &lt;code&gt;charAt&lt;/code&gt;, &lt;code&gt;length&lt;/code&gt;), and (2) not thinking through/planning ahead/leaving enough time when writing their program. I would like to foster these skills, but I am at a loss. This is a class of complete programming novices. Most students have no prior experience. Some students have a little prior experience in some OOP language, but it is usually self-taught with little regard to breaking down larger problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first problem seems easy enough (encourage students to write a glossary of tools we learn with examples - we only require knowledge of a handful of methods), but students rarely do it. The second problem has been a white whale of mine for the past year and a half. I teach activity diagrams and model problem solving in class, but when I try to require activity diagrams as part of program submission, I mostly get students who solve the program first, then reverse engineer their diagram. I would love to require their diagrams to be submitted ahead of time for feedback, but I do not have the time to grade it before the program is due. I do have some students who show up to office hours and never pull out their computer - they just draw diagrams with me, and they are fantastic students. But, they are the minority.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fully believe these skills are just as important, and perhaps more important, than eventually writing that correct program, but the program of course is what they need to be able to do. How do I teach/evaluate these skills effectively in class in light of all the other material that needs to be covered?&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="830" LastEditDate="2017-10-19T14:35:13.100" LastActivityDate="2017-10-19T20:25:08.000" Title="Encouraging Critical Thinking On Programs Before Students Write Them" Tags="|homework|computational-thinking|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3845" PostTypeId="2" ParentId="3844" CreationDate="2017-10-19T15:59:08.473" Score="1" Body="&lt;h1&gt;True novices&lt;/h1&gt;&#xA;&lt;p&gt;If the they are novices, then you may be asking to much, to get them to write large programs from scratch.&lt;/p&gt;&#xA;&lt;p&gt;More useful exercises may be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Parsons problems: Give them «all the right code, but non in the right order» Works well with about 4 lines of code.&lt;/li&gt;&#xA;&lt;li&gt;Contribute to a bigger project: Have them work on something that is already written, and add new features to it. This way they «learn to write, by reading».&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;The value of planning&lt;/h1&gt;&#xA;&lt;p&gt;If you want them to plan, then they have to see the value of planning. I think that we often do too much up front planning (I have worked on projects, where we did months of planning, then on the first day of coding, we learnt so much, that our plans were obsolete). We need to plan, but we need to do it «just in time», and planning has to be useful. If it is not, then we should plan a different way.&lt;/p&gt;&#xA;&lt;p&gt;Therefore show your students a variate of planning techniques, that they can choose from. Tell them that the technique that they use, will depend on the situation, and on their preference.&lt;/p&gt;&#xA;&lt;p&gt;Techniques should include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;linguistic: e.g. pseudo code / descriptions / rewrite the problem statement, in your own words&lt;/li&gt;&#xA;&lt;li&gt;visual: diagrams / colour&lt;/li&gt;&#xA;&lt;li&gt;physical: acting, role play of the software / real world objects&lt;/li&gt;&#xA;&lt;li&gt;collaborative: talking/acting/whiteboard&lt;/li&gt;&#xA;&lt;li&gt;chaotic: brain storming / simultaneous writing&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;See also&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/3573/204&quot;&gt;To plan or not to plan that is the question&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-19T15:59:08.473" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3846" PostTypeId="2" ParentId="3844" CreationDate="2017-10-19T18:41:57.123" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;(1) not fully internalizing what tools are available to them (e.g., String methods like charAt, length)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;[...]&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The first problem seems easy enough (encourage students to write a glossary of tools we learn with examples - we only require knowledge of a handful of methods), but students rarely do it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't blame them. It can be very hard for novices to know what's important. You're throwing a ton of information at them (even if it doesn't seem like a lot to you), and it's hard to know what's going to be useful ahead of time. Even if I do know what's important, coming up with a glossary seems pretty tedious and honestly seems like one of those things that you only have to do in school and would never have to do in the real world. (Not trying to criticize, just trying to understand your students' perspectives.) So, my suggestion is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Instead of having students come up with a glossary, give it to them.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can be as simple as a list of classes and functions that might be useful for the current assignment. &lt;strong&gt;Don't&lt;/strong&gt; just send them to &lt;a href=&quot;https://docs.oracle.com/javase/8/docs/api/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Java API&lt;/a&gt;, as that can be very overwhelming to novices.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(2) not thinking through/planning ahead/leaving enough time when writing their program.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I teach activity diagrams and model problem solving in class, but when I try to require activity diagrams as part of program submission, I mostly get students who solve the program first, then reverse engineer their diagram.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Diagrams are useful for very high-level system engineering (frontend X calls server Y which fetches from database Z), but aren't very useful for the kind of code that novices will be writing. See also:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/650/pseudocode-or-flowcharts/3413#3413&quot;&gt;Pseudocode or Flowcharts?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/3582/show-students-the-consequences-of-their-design-decisions/3597#3597&quot;&gt;Show students the consequences of their design decisions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Instead of using diagrams, you might have the students &lt;strong&gt;break the problem down into smaller steps&lt;/strong&gt; and write those steps out in English, or pseudocode. The real goal is to get them to break the problem down into smaller steps though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might go a step further and break the problem down for them, at least for the first few assignments. Break the assignments into steps, or split the project up into multiple assignments. Tell them what you're doing, so they see the process and eventually do it themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also recommend checking out &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;. Processing provides a simplified &lt;a href=&quot;https://processing.org/reference/&quot; rel=&quot;nofollow noreferrer&quot;&gt;reference&lt;/a&gt; which helps with the first problem, and it's visual which can help with the second problem. (It's much easier to reason about stuff you can see instead of abstract concepts.) There are quite a few questions and answers on this site about using Processing in the classroom, so I'd start by searching &lt;a href=&quot;https://cseducators.stackexchange.com/search?q=Processing&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-10-19T20:25:08.000" LastActivityDate="2017-10-19T20:25:08.000" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3847" PostTypeId="2" ParentId="3844" CreationDate="2017-10-19T18:54:10.520" Score="3" Body="&lt;p&gt;I agree very much with ctrl-alt-delor that the level of &quot;total novice&quot; might be rather early to introduce larger-scale meta-design techniques into coursework.  The work being done at that level simply does not require (at a cognitive level) such deep planning to execute properly.  Since the need is not self-apparent, efforts to bring it into their work will typically feel like extra, needless work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you would like to help them understand how to use plans (and how to utilize good, structural thinking), here is a way you might go about it.  Provide a diagram in class, and talk through it as a group.  Next, ask the students to work with a buddy to make a series of modifications for different purposes.  At the end of this exercise, they will have several different diagrams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask them to choose one of their diagrams, and imagine that some other coder will have provided some source code that attempts to follow their specification.  However, it is their job to verify that the code that they receive truly &lt;em&gt;will&lt;/em&gt; work as specified.  They should now work with their buddy to design the trickiest test cases that they can think of!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can encourage this by enthusiastically placing great examples of test cases on the board as students come up with them.  &lt;em&gt;&quot;Look, how wonderful! Testing for the empty string!&quot;&lt;/em&gt;  Or &lt;em&gt;&quot;Using a negative number is a great way to try to trip things up!  Great thinking!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, whichever project they chose for their test code, they should actually program as a lab.  (This could be done as paired programming or as solo work.)  When they submit their lab, they will provide a UML diagram, thoughtful test cases, and their coded solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Congratulations! You've now integrated student choice, prior design, unit-testing (well, the core of it anyway), pair programming, and created an assignment that is harder to cheat on than the standard mainstays (like sorting algorithms) in a way that feels natural and un-forced.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-10-19T18:54:10.520" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3848" PostTypeId="1" CreationDate="2017-10-20T16:30:19.610" Score="2" ViewCount="227" Body="&lt;p&gt;In answers to a &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3844/encouraging-critical-thinking-on-programs-before-students-write-them&quot;&gt;previous question&lt;/a&gt;, a few people suggested intro programming with true novices might not be the best place to introduce critical thinking/planning skills for programs. To me, intro programming is the perfect place - many of these skills relate to the ideas of breaking problems down (which tie in nicely with loops), abstraction (e.g., methods/classes), and so on. Particularly with many students only taking intro programming as part of a degree for an unrelated field (e.g., physics, math) in the hopes of being able to do some application-based work, I feel that students would benefit from these skills for such projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am certainly open to be convinced on this topic! Should these skills be explicitly taught in a CS curriculum? If so, where?&lt;/p&gt;&#xA;" OwnerUserId="830" LastActivityDate="2017-10-21T09:02:19.877" Title="Teaching Critical Thinking" Tags="|curriculum-design|computational-thinking|" AnswerCount="3" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3849" PostTypeId="2" ParentId="3811" CreationDate="2017-10-20T16:47:30.113" Score="1" Body="&lt;p&gt;I try to give them as many options as possible, without it becoming too much of pain for me to handle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I've currently got working. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Slack&lt;/strong&gt; Trying it out this year. Originally was thinking it would be a good way for the class to talk, sort of like the Facebook Groups in one of the other answers. Didn't really work so well for that. Only a few students are actively using it. But a few do and it works really well. I've got the Slack app on my phone so I'll get buzzed if someone messages me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Canvas&lt;/strong&gt; We're using Canvas on our campus and it's easy for students to message me through that. This is where most students contact me outside of class. Like Slack, I've got the Canvas app on my phone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I post to the discussion boards in our Canvas class, but students very rarely respond and even more rarely start their own discussions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Email&lt;/strong&gt; Very few students email me, although it's common for parents to email. I've probably only had one or two students email me this year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do make a point at the beginning of the year that if they need me to help the only times I'm always available is during class and after school tutorials. I may respond outside of that, but it's not guaranteed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of the 120 or so students I have this year, there are only about 10 that have contacted me outside of school hours. None of these are very intrusive, and they're all pretty easy to ignore if I'm doing something else. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-10-20T16:47:30.113" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3850" PostTypeId="2" ParentId="3848" CreationDate="2017-10-20T18:49:26.277" Score="2" Body="&lt;p&gt;First, Critical Thinking is a deep concept and in a first course only simple aspects of it can be taught. To explore the depth of it you need to have context and a novice, by definition, has little of that. See &lt;a href=&quot;https://en.wikipedia.org/wiki/Critical_thinking&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt; for a start on understanding how broad and deep Critical Thinking really is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me, the most important question to be answered by Critical Thinking is &quot;What should be built?&quot; (and what &lt;em&gt;not built&lt;/em&gt;). But a novice has no basis on which to answer such a question. They have enough to do to try to understand what &lt;em&gt;can be built&lt;/em&gt; at the start, so you can only give a glimpse of the deeper questions then. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest that any true education explore Critical Thinking in many ways and in many courses - philosophy, history, .... And that later in the CS curriculum the topic be taken up, again in several courses/classes to explore its complete depth. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the detail in your question seems to indicate that you are more interested in &lt;em&gt;Deep Thinking&lt;/em&gt; rather than Critical Thinking as such. I'm a big believer in teaching problem decomposition and abstraction from the first days. My courses delay &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; constructs for as long as I can manage while the students think about abstraction and polymorphism. I don't always do it, but prefer to teach recursive thinking before loops and polymorphism before selection. That is true even in a course in Java. It doesn't require Scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some aspects of critical thinking are useful to novices. For example, the idea that if what you are doing isn't working, then do something different. Also &quot;Ask for help&quot; when you are stuck. &quot;Don't make assumptions&quot; is another good idea that can be taught fairly early. &quot;Test your assumptions.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately you want them to use evidence based decision making, of course rather than wishful or magical thinking, but that, as I said above, requires context and some &quot;seasoning.&quot; Novices are naturally focused on the &quot;how&quot; rather than the &quot;what&quot; - especially the &quot;what is appropriate&quot; and &quot;what is important.&quot; &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-20T18:49:26.277" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3851" PostTypeId="2" ParentId="3848" CreationDate="2017-10-20T23:52:55.883" Score="2" Body="&lt;p&gt;I'm going to echo &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3848/teaching-critical-thinking#comment8784_3848&quot;&gt;ctrl-alt-delor's comment&lt;/a&gt; and say that as one of the answerers on the original question, my understanding was not that &quot;a few people suggested intro programming with true novices might not be the best place to introduce critical thinking/planning skills for programs&quot;. I don't think anybody suggested that. In fact I'm pretty sure that 100% of the people on this site would agree that critical thinking and problem solving are very important lessons to learn, especially with computer science. (And maybe even that computer science is a great way to teach general problem solving, but I'll digress.)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;critical thinking/planning skills for programs&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think the source of our misunderstanding is that we haven't really defined what this actually means. Your original question mentioned having students come up with a glossary of classes and functions they might find useful, and drawing diagrams. Imho, &lt;strong&gt;neither one of these is very good at teaching critical thinking or planning skills.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with your &lt;strong&gt;goal&lt;/strong&gt; of teaching problem solving, and maybe planning depending on what you mean. What I disagree with is the &lt;strong&gt;approach&lt;/strong&gt; of using glossaries and diagrams to teach these things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I think the best way to teach problem solving and planning is by teaching &lt;strong&gt;the process of breaking a problem down into smaller steps&lt;/strong&gt; and then taking those steps on one at a time. I've written &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;this tutorial&lt;/a&gt; on the topic, and I try to encourage this process (as opposed to just dumping syntax) in my answers on Stack Overflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think diagrams or glossaries really help with this. I think the only way to learn it is by working through the process. You might do this by live-coding a few examples of taking a large problem and breaking it down. I would teach using &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, so my examples would be visual:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Our goal is to draw a garden scene with grass, flowers, and a bird that flies around. First let's try to break that up into smaller pieces. Can we create a simple program that just displays the grass part? (Which we can further split into drawing a single blade of grass, then a small patch, then the whole screen.) Separately from that, can we create a program that just displays one flower? (Again, that might be further split into drawing a stem, the center of the flower, the petals, etc.) Now can we just get a circle flying around?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The idea would be to actually walk through the process of taking a big amorphous problem and breaking it down into smaller actionable steps, and then writing code to accomplish each of those steps one at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Spending any time on diagrams at this stage is, imho, wasted time. Students don't have a big picture yet, and diagrams aren't appropriate for the scale we're talking about at this level. Similarly, forcing students to come up with their own glossary honestly sounds pretty painful, and isn't how things work in the real world. I think that's what the answerers were saying.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-10-20T23:52:55.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3852" PostTypeId="2" ParentId="1205" CreationDate="2017-10-21T08:21:42.643" Score="0" Body="&lt;p&gt;Some interesting projects for those working with block-based languages (such as Scratch, Snap! and Blockly):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Scratch, check out &lt;a href=&quot;http://www.drscratch.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dr Scratch&lt;/a&gt;, which takes a rubric approach to evaluating how much 'computational thinking' is evidenced by a project. Whilst the analysis might seem a bit reductive, it can be used independently by learners and includes some useful guidance on how to progress. The developers describe their approach in &lt;a href=&quot;http://www.um.es/ead/red/46/moreno_robles.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;this paper&lt;/a&gt;. Dr Scratch is built on &lt;a href=&quot;https://github.com/ucsb-cs-education/hairball&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hairball&lt;/a&gt;, a Python module which does static analysis of Scratch projects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more conventional autograder, &lt;a href=&quot;https://github.com/cycomachead/lambda-evaluator&quot; rel=&quot;nofollow noreferrer&quot;&gt;lambda&lt;/a&gt;, is being developed by Michael Ball for Snap! It's already integrated into UCB's &lt;a href=&quot;http://bjc.berkeley.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Beauty and Joy of Computing&lt;/a&gt; MOOC, and I think there are plans to make this more widely available. Michael wrote about this for &lt;a href=&quot;https://s3-eu-west-1.amazonaws.com/rpi-magazines/issues/full_pdfs/000/000/004/original/HelloWorld03.pdf#page=26&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hello World #3&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Chris Roffey has developed an autograder for Blockly used in the initial round of the &lt;a href=&quot;https://challenge.tcsocc.uk/index.php?action=user_competitions&quot; rel=&quot;nofollow noreferrer&quot;&gt;TCS Oxford Computing Challenge&lt;/a&gt; programming challenge, although I don't think the code for this is shared publicly.&lt;/p&gt;&#xA;" OwnerUserId="44" LastActivityDate="2017-10-21T08:21:42.643" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3853" PostTypeId="2" ParentId="3848" CreationDate="2017-10-21T09:02:19.877" Score="0" Body="&lt;p&gt;I am mostly in agreement with @kevinWorkman on this  (I don't disagree with anything, there is just one thing he was silent on, that I think is very important).&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Yes break down the problem.&lt;/li&gt;&#xA;&lt;li&gt;Yes do one thing at a time.&lt;/li&gt;&#xA;&lt;li&gt;Yes test often.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In addition:&lt;/p&gt;&#xA;&lt;h1&gt;Test first&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Decide what the test is before you code.&lt;/li&gt;&#xA;&lt;li&gt;Run the test to check that it fails.&lt;/li&gt;&#xA;&lt;li&gt;Write some code.&lt;/li&gt;&#xA;&lt;li&gt;Run the test to check it passes.&lt;/li&gt;&#xA;&lt;li&gt;Iterate as required.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h1&gt;Just in time planning&lt;/h1&gt;&#xA;&lt;p&gt;As part of doing one thing at a time.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Our goal is to draw a garden scene with grass, flowers, and a bird that flies around. First let's try to break that up into smaller pieces. Can we create a simple program that just displays the grass part? (Which we can further split into drawing a single blade of grass,&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;STOP&lt;/strong&gt; Planning&lt;/p&gt;&#xA;&lt;p&gt;Time to code (Time to write a test, then code):&lt;/p&gt;&#xA;&lt;p&gt;Using test first, write the code to draw a blade of grass.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;STOP&lt;/strong&gt; Coding&lt;/p&gt;&#xA;&lt;p&gt;Time to plan&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;then a small patch [of grass],&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;STOP&lt;/strong&gt; Planning&lt;/p&gt;&#xA;&lt;p&gt;Time to code&lt;/p&gt;&#xA;&lt;h1&gt;Summary&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The process uses «alternating repetition» of planning / coding. Do not do any more planning than needed (do not plan ahead). Do not write any code that is not planned.&lt;/li&gt;&#xA;&lt;li&gt;Coding uses «strong  boundaries»  test around code, with «alternating repetition» of fail/pass in the tests. That is test surrounds the code, and is of a similar scale as the code. The tests alternate between pass and fail. Do write any tests that are not needed (do not test ahead). Do not write any code that does not have a test that has failed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The properties in «» are from Christopher Alexander's book “The nature of order”. They are what patterns are made of. see &lt;a href=&quot;https://cseducators.stackexchange.com/a/2821/204&quot;&gt;https://cseducators.stackexchange.com/a/2821/204&lt;/a&gt; for a list of all 15.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-21T09:02:19.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3854" PostTypeId="1" AcceptedAnswerId="3855" CreationDate="2017-10-21T18:55:03.743" Score="8" ViewCount="506" Body="&lt;p&gt;One useful skill in CS is presentation of technical material to peers and/or superiors. Novices, however, often come to computing as introverts for whom public speaking is difficult and even frightening. I want my students to become better speakers, especially in presenting their own work since it is often the loudest speaker who is heard, not necessarily the one with the best ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do we make a safe and comfortable environment for novices to learn to present their work to their classmates?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the aspects of this, of course, is to learn to accept feedback from the listeners and to evaluate it properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a class of novices this may also require some training of the listeners so that they offer constructive advice and not just negative comments. It may also require finding ways to quiet those who offer inappropriate feedback, but to also teach them better behavior. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is to give the students practice so that they become more comfortable with doing this. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-21T19:13:44.027" LastActivityDate="2017-10-24T10:44:08.260" Title="Making Technical Presentations Safe for Novices" Tags="|best-practice|student-motivation|classroom-management|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3855" PostTypeId="2" ParentId="3854" CreationDate="2017-10-22T12:59:32.277" Score="6" Body="&lt;h1&gt;You need to start early&lt;/h1&gt;&#xA;&lt;p&gt;You can not expect them to just one day, stand up in front of the class. You need to prepare them for it.&lt;/p&gt;&#xA;&lt;h2&gt;Encourage mistakes&lt;/h2&gt;&#xA;&lt;p&gt;Encourage students to take risks. Give permission to make mistakes, but not just permission, make it a goal.&lt;/p&gt;&#xA;&lt;p&gt;At the start of term, when I set out the class rules. I have a few don'ts. I also have some dos: collaborate, work hard, make mistakes …&lt;/p&gt;&#xA;&lt;p&gt;I tell them that computer programming (and learning) is about making mistakes. In a one hour lesson, if you only make 100 mistakes, then you are not working hard enough.&lt;/p&gt;&#xA;&lt;h2&gt;Get them making mistakes, get  them celebrating mistakes.&lt;/h2&gt;&#xA;&lt;p&gt;One way to celebrate errors, is «test first»: Write test; run test, test fails, celebrate; write code; run test, test passes (maybe); repeat.&lt;/p&gt;&#xA;&lt;h2&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=hqh1MRWZjms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Austin's butterfly&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;So how Austin improved his drawing: He got feedback from the class after each drawing, and used this feedback to make a better drawing. It took six attempts before he drew the final image.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/O1wsk.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/O1wsk.jpg&quot; alt=&quot;Six pictures of butterflies: the first not very good, but getting better with each attempt, the last one is very good.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Mind set&lt;/h2&gt;&#xA;&lt;p&gt;Teach them about &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;nofollow noreferrer&quot;&gt;mind set — Carol Dweck&lt;/a&gt; “Whether you believe that you can do it, or believe that you can not, you are correct.”&lt;/p&gt;&#xA;&lt;p&gt;People with a growth mindset&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;believe that mistakes are an indication that they are learning.&lt;/li&gt;&#xA;&lt;li&gt;believe that they are in top set because they work hard.&lt;/li&gt;&#xA;&lt;li&gt;like challenge.&lt;/li&gt;&#xA;&lt;li&gt;learn more.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;People with a fixed mindset&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;believe that mistakes are an indication that they are stupid.&lt;/li&gt;&#xA;&lt;li&gt;believe that they are in bottom set because they are stupid.&lt;/li&gt;&#xA;&lt;li&gt;like easy work, that they can get correct. Or very hard work that gives them an excuse.&lt;/li&gt;&#xA;&lt;li&gt;learn less.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Get them helping out with the class.&lt;/h2&gt;&#xA;&lt;p&gt;Build a culture of helping / talking-to each other.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Peer help&lt;/li&gt;&#xA;&lt;li&gt;help desk&lt;/li&gt;&#xA;&lt;li&gt;answering class questions&lt;/li&gt;&#xA;&lt;li&gt;explain to the class&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-22T22:12:09.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3856" PostTypeId="2" ParentId="3854" CreationDate="2017-10-22T13:31:46.350" Score="0" Body="&lt;p&gt;One technique we use is to work and present in groups. We give them guidance that different members of the team have different strengths and they all do not need to present. Some of the team can research, some create the presentation material and some can present. Those who are not presenting do not have to leave their classroom seat. Alternatively the time can be divided and each can have a small number of minutes and they can share the presentations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way the less confident can play their strengths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am an advocate of students with special needs, and in my experience they are less uncommon in computing classes than one might imagine, particularly in higher education. (Big Bang Theory citation perhaps). One should also see the &quot;Imitation Game&quot; to note how Alan Turing was portrayed; certainly &quot;on the spectrum&quot; in my view. This means a class can have some shy and reserved students but also some at the more extreme end with more extreme or radical responses public speaking situations. Some may be diagnosed but, in my experience, many have not yet been diagnosed and have managed to hide in the crowd so far.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have some very social phobic students, and the method of starting with group presentations allows them to participate without triggering their fear factors. We also find they end up contributing a bit more than they expected by the time of the final assessment, and over a period of a three year degree programme we can find ways for them to overcome or work with their particular issues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the ways we might use to help them present is to have the more senior students make their own videos, which can just be screen captures with voiceover (but often much more). We also find this eases them into making good presentational material. They then present by playing part of their video and just adding minor interjections and perhaps answering questions instead of the full blown &quot;stand-up and talk&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In conclusion, I wanted to illustrate that extreme social phobia is not unknown in our subject and we should be prepared to cope with it with innovative and inclusive techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am wary that these problems can be solved by a single teacher in a single class just getting the shy ones to be brave, so wanted to speak up!&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="694" LastEditDate="2017-10-22T21:52:05.990" LastActivityDate="2017-10-22T21:52:05.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3857" PostTypeId="2" ParentId="3854" CreationDate="2017-10-22T13:43:38.107" Score="0" Body="&lt;p&gt;&lt;em&gt;Here's a personal story.  It's about various art schools not CS, but the situation is similar, I believe.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;While in high-school, I also studied in art school.  The teacher in the art school was a renowned professional, I believe he even had some awards from the ministry of education (we are talking about socialist style education).  As part of our activities in the art school we were supposed to learn to talk about what we were drawing.  (Artists are also expected to produce statements...)  The unfortunate reality of the trade is that the bizarre blabbering of the artist about her work is what makes all the difference, not the quality of the said work.&lt;/p&gt;&#xA;&lt;p&gt;In an effort to teach us to do this, the teacher required us to start with something like bringing a stool in the middle of the classroom, standing on it and announcing own name and some other personal details, like hobbies etc.&lt;/p&gt;&#xA;&lt;p&gt;Some kids in the class seemed to enjoy the activity.  I wholeheartedly hated it.  I thought it was stupid and pointless.  I also believed that people should judge artists' work on its own merits, and that using words to describe an art piece is by definition worthless, because would it be possible to use words to describe images, why go to such length as to create those images in the first place?&lt;/p&gt;&#xA;&lt;p&gt;This practice was novel and quite in contradiction to the education system which emphasized modesty and objectivity, thus seeing such attempts at entrepreneurship as outright evil.&lt;/p&gt;&#xA;&lt;p&gt;I went to college first in the post-socialist country, then in a country which had no such past, and was basically copying all of its education system from the States.  Now commenting on peers' work was a requirement rather than some extravagant way to spend time in the classroom.  However, what I also learned was that peer criticism was anything but objective.  In fact, social dynamics in a classroom would distort the feedback so much, that it would be much worse than no feedback at all.&lt;/p&gt;&#xA;&lt;p&gt;Regardless of the quality of their work, prettier girls would get much better feedback than boys with unremarkable appearance.  Students who previously received positive feedback from a peer would feel socially obligated to repay the favor.  Some people learned to exploit this simple behavior more than others...  Not to mention that typically, there were a handful of bright students per classroom, who would either deservedly steal the show from the rest, or would be in opposition, and thus get no (useful) feedback what so ever.&lt;/p&gt;&#xA;&lt;p&gt;For long time I believed that peer criticism was just a bad practice created by people who never cared to verify how well it actually works / the problems it creates.  However, as an adult, I went to school once again, now to study CS.  Here, the situation changed: the amount of work a student is supposed to produce and the difficulty of communicating the results of the research is such that it certainly justifies a brief oral introduction.  It doesn't feel stupid and the social pressure, while still there, faded into background since it no longer has this strong influence on the reception of your work.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Bottom line&lt;/h3&gt;&#xA;&lt;p&gt;I strongly believe that public presentation is only warranted when the amount of work to be presented is so vast that a synopsis is indeed helpful.  Subsequently, I don't believe in immediate feedback, and especially not one produced under peer pressure.  Ideally, I'd have a seminar, where students present the results of their research / lab study, followed by an assignment of groups of students to study the results being presented, followed by another seminar where the &amp;quot;study groups&amp;quot; critique the works they were assigned to.&lt;/p&gt;&#xA;" OwnerUserId="1000" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-22T13:49:48.300" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3858" PostTypeId="2" ParentId="1205" CreationDate="2017-10-23T07:49:47.880" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;As a TA, the usual workflow for grading programming assignments for an&#xA;  introductory course would be:&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Some instructors used email as a submission mechanism (yes, really.)&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&quot;&lt;em&gt;Yes, really&lt;/em&gt;&quot;? In the introductory course at my university we submitted our programs as printouts.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you take C++ code that runs on Windows, it may not necessarily run on MacOS if it has platform dependent code. Introductory students make these mistakes all the time.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It seems to me that the mistake is using C++ for an introductory course. Complete beginners do not need help shooting themselves in the foot. The curriculum may be out of your control, but if you have the option then teaching the introductory course either in a strongly typed LISP (SML, Haskell, or something similar) or at least in a concise portable language (Python, Ruby, etc.) should make it easier for both the students and the graders.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-10-23T07:49:47.880" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3859" PostTypeId="1" CreationDate="2017-10-23T18:20:09.377" Score="5" ViewCount="192" Body="&lt;p&gt;Every year, I teach my students about using induction to prove that algorithms function as intended.  My purpose, in instructing them, is to help them master the structure of the proof itself.  I use simple algorithms for which we can do fairly easy inductive proofs.  Here are a few examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Prove that &lt;code&gt;arraySum&lt;/code&gt; will correctly compute the sum of all of the elements in &lt;code&gt;arr&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int arraySum(int[] arr){&#xA;    int k = 0;&#xA;    for (int g = 0; g &amp;lt; arr.length; g++)&#xA;        k = k + arr[g];&#xA;    return k;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Prove that this function will return &lt;span class=&quot;math-container&quot;&gt;$n^2$&lt;/span&gt;:  Assume n is positive.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int square(int n){&#xA;    int sum = 0;&#xA;    int count = 0;&#xA;    while (count &amp;lt; n){&#xA;        sum = sum + n;&#xA;        count = count + 1;&#xA;    }&#xA;    return sum;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you can see, I am not aiming for complicated algorithms.  What my students need (and what I need) is a good source for practice problems.  I'd absolutely love it if they were already carefully solved (so that my students could independently study with them and check their own answers), but I could work with any source that simply has a series of pre-made reasonable practice problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any such resource out there?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-10-01T10:40:59.340" LastActivityDate="2018-10-26T14:50:42.240" Title="Good resource for practice problems for inductive proofs" Tags="|resource-request|induction|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3860" PostTypeId="1" CreationDate="2017-10-23T19:25:38.540" Score="3" ViewCount="181" Body="&lt;p&gt;In an upcoming Girls Who Code session, I was thinking about sharing some stats about computing jobs, and why learning computing gives you an economic advantage, both as a computing professional, and within other fields (CS + X).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I told others about this plan, they were sketical that the girls would find such stats encouraging. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Is sharing job stats a best practice for reaching out to high school girls? Why or why not?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are the three stats I wanted to share:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Computing has more jobs available than degrees granted. &lt;strong&gt;Computing has much more job availability than other fields, even other STEM fields&lt;/strong&gt;. (See graph compiled from [&lt;a href=&quot;http://www.nsf.gov/statistics/seind12/appendix.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;] and [&lt;a href=&quot;http://www.bls.gov/emp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt;])&#xA;&lt;a href=&quot;https://i.stack.imgur.com/dvbQm.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/dvbQm.png&quot; alt=&quot;Degrees awarded vs. jobs available&quot;&gt;&lt;/a&gt; &lt;a href=&quot;https://i.stack.imgur.com/dvbQm.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;6&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;For every software developer in the world, there is another professional who uses programming in their job, but isn't a software developer&lt;/strong&gt; [&lt;a href=&quot;http://changetheequation.org/blog/hidden-half&quot; rel=&quot;nofollow noreferrer&quot;&gt;3&lt;/a&gt;]. (Some estimate there are actually four more [&lt;a href=&quot;https://dl.acm.org/citation.cfm?id=1092357.1092394&amp;amp;coll=DL&amp;amp;dl=GUIDE&quot; rel=&quot;nofollow noreferrer&quot;&gt;4&lt;/a&gt;])&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Workers (not software developers) who program make higher wages than those comparable workers who do not&lt;/strong&gt; [&lt;a href=&quot;http://ieeexplore.ieee.org/document/7739682/&quot; rel=&quot;nofollow noreferrer&quot;&gt;5&lt;/a&gt;].&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-10-28T22:37:19.843" Title="Should I share CS jobs stats at a Girls Who Code session?" Tags="|outreach|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3861" PostTypeId="2" ParentId="3859" CreationDate="2017-10-23T20:02:17.957" Score="2" Body="&lt;p&gt;Any book on elementary number theory will likely have quite a few &lt;em&gt;recurrences&lt;/em&gt; as examples and in the exercises of the early chapters. For example, the sum of the first n odd integers is $n^2$. As a recurrence this is just $n^2$ = $(n-1)^2$ + $2*n - 1$. Or possibly it will be shown as $a_n$ = $a_{n-1}$ + $2*n -1$, with $a_1$ = 1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some books on discrete math have many of these as well. Some even have these in summation form, rather than as recurrences. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise the sum of the first n integers (start counting with 1) is $n(n+1)/2$.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From these recurrences or sums you can develop a program to give the students or have the students prove the relations and then develop the program themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even a web search for recurrence relation turns up some ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A rather important sum (the geometric sum) is this: Let r be a real number and k a non-negative integer. If $r \neq 0$ then $\sum_{n=0}^k(r^n)$ = $(1 - r^{k+1})/(1-r)$.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, if $|r| &amp;lt; 1$ then as k increases this sum approaches 1 - r  which leads to an infinite sum that is pretty comprehensible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also David Gries' &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/038790641X&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;The Science of Programming&lt;/em&gt;&lt;/a&gt; has interesting examples that he shows along with how to develop programs from pre and post conditions. The book has been mentioned in answers to other questions here also. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-24T00:01:21.030" LastActivityDate="2017-10-24T00:01:21.030" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3862" PostTypeId="1" CreationDate="2017-10-23T21:43:38.087" Score="4" ViewCount="71" Body="&lt;p&gt;I've been volunteering at a local Girls Who Code club at a U.S. high school. Other volunteers are female grad students in computing. I've been struck by the fact that &lt;em&gt;even though the volunteers are women in computing, that doesn't mean that we won't scare the high school girls away from computing with bad teaching practices.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other volunteers tend to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Lecture a lot&lt;/li&gt;&#xA;&lt;li&gt;Type code or plug in wires for the student instead of letting them do it&lt;/li&gt;&#xA;&lt;li&gt;Talk about expensive electronics as if everyone owns them&lt;/li&gt;&#xA;&lt;li&gt;Assume a very fast pace of instruction&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Do you know of any resources I can pass on to these volunteers to help them become better teachers and volunteers?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking of making my own, but I'd love to save some work :)&lt;/p&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-10-27T13:22:49.490" Title="Easy on-boarding for grad students to lead outreach?" Tags="|resource-request|outreach|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3863" PostTypeId="2" ParentId="3854" CreationDate="2017-10-24T10:44:08.260" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I want my students to become better speakers, especially in presenting their own work since it is often the loudest speaker who is heard, not necessarily the one with the best ideas.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't quite see the logical connection here. Becoming better speakers won't make them louder speakers, and the louder speakers will continue to be heard more even if they're terrible at actually speaking.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In a class of novices this may also require some training of the listeners so that they offer constructive advice and not just negative comments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There's no &quot;&lt;em&gt;may&lt;/em&gt;&quot; about it. With brief training they will be able to offer positive comments as well as negative ones, but to give constructive &lt;em&gt;advice&lt;/em&gt; they need to know what they're talking about. For example, anyone can tell you &quot;&lt;em&gt;I couldn't follow the thread&lt;/em&gt;&quot;, but to suggest specific structural changes you need to know the broad types of structure which could have been used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are various organisations which are dedicated to training in public speaking: Dale Carnegie and Toastmasters being perhaps the best known. (Disclaimer: I'm a member of Toastmasters and have previously held various offices in my local club, so I'm not unbiased). You could look at their approaches, and if you have a branch of such an organisation in your city (or even in your school/university) you could see whether they'd be interested in helping out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Speaking from the Toastmasters perspective, there are one or two projects which people on the leadership track can complete by running a training session with a recruitment plug: you may or may not consider that appropriate for your setting. In addition, particularly if there's a club in your school/university, you might be able to get a couple of members to come along to a lesson on the basis that one of them gives a speech for evaluation, your students offer their feedback, and then the other gives an evaluation which confirms or corrects the students' feedback. (If necessary, explain that the rules allow one project in five to be done outside club meetings provided that another member is present and gives a written evaluation. I haven't seen this option used much, so the members of your local club might not be aware of it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good thing about this is that someone who's done a few projects in Toastmasters will be used to being evaluated by people with differing levels of experience, and being a volunteer will find it less stressful than your students. That way they can learn to give feedback without destroying their peers' confidence. The second visitor will also (I hope!) demonstrate how to give suggestions for improvement sandwiched between affirmation of positive observations in order to (quoting the title of the manual) &quot;evaluate to motivate&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you probably won't have volunteers to come to every lesson for several weeks in a row, this might be best saved as a final practice before getting into real peer evaluation. You could build up to it with a series of lessons in which you teach a specific skill (speech structure, body language, word choice and sentence structure, visual aids, ...), watch a video (maybe a talk from TED, Ignite, or something similar), and then ask the class to give feedback.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-10-24T10:44:08.260" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3864" PostTypeId="2" ParentId="3862" CreationDate="2017-10-24T12:52:05.570" Score="3" Body="&lt;p&gt;The situation you seem to have is that you have students (your volunteers) suddenly thrust into the role of teachers without any preparation other than what they can emulate from their own teachers. Teaching is a skill that can be learned but only through reflection and practice and that takes a lot of time. And you don't have that time now. I would guess that most of your volunteers are (a) used to be lectured to, and (b) have a learning style consistent with that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, as I've said in response to other questions here, the students aren't at all like their teachers. Every student is different and your learning style is not the same as that of your students. Good teachers learn this, mostly through experience, and learn to accommodate students with a variety of learning styles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice, then, would be to try to have the volunteers give up a &quot;teaching role&quot; so that they don't get trapped in the emulation game. Instead, have them work with small groups of students in a responsive way, answering questions &lt;em&gt;only&lt;/em&gt; rather than giving out information. Have the volunteers act more like mentors than teachers. In other words, divide the students into groups with one or two volunteers for each group. Each volunteer is just a resource for the group, not its leader. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing they can do, of course, is give something of their own backgrounds and what led them to tech. They can talk about what they find hard in learning and how they work to overcome that. They can talk honestly about the obstacles they faced (and that women in general face) and how those can be at least partially overcome. Counterbalancing the obstacles, the volunteers can also talk about what they love most about geekiness and what cool things they have built or helped build. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mentoring relationships can be fostered and it would be good if you can find some way for those to continue after your volunteer gigs end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if they think of themselves as teachers they will just emulate the teaching they have been exposed to and that may not lead to the best outcomes. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If your volunteers know something about Agile Software Development process, especially Extreme Programming, you can do something like the following. Have each volunteer act as a combination Customer and Coach to a team of students. These are two quite different roles (two &quot;hats&quot;). As a customer, the volunteer breaks down a project into stories and feeds them to the team over a set of iterations. The Customer also handles acceptance of the work between iterations. As a Coach, the volunteer keeps the students on track, observes the periodic (daily) meetings and makes sure tests are written. If every team works on the same project, then you might be able to have one (or maybe two) volunteers act as Customer for all the teams, and the others serve just as coach (and mentor, of course), one for each team. The volunteers, by the way, will learn something if they also compare notes periodically and have their own debriefing sessions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-27T13:22:49.490" LastActivityDate="2017-10-27T13:22:49.490" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3865" PostTypeId="2" ParentId="3860" CreationDate="2017-10-24T14:22:49.647" Score="1" Body="&lt;p&gt;Expanding my comment and those of others to a full answer seems to make sense now. The short answer is, as Ellen Spertus notes, there is no reason not to, but it isn't enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Young people need good, and honest, guidance about what they might expect from their choices. But the future isn't necessarily determined by things we can see at present, so in many ways the best advice to a student is to &quot;be flexible.&quot; Their future will be determined both by circumstances and by a &lt;em&gt;series of choices&lt;/em&gt; that they make; not just one choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, tech salaries are high and job opportunities abound, but a secondary school student's career is years, even decades, away. The world is not likely to look the same over that period of time. In particular, advances in AI may make many software development roles obsolete. At one time, a huge fraction of people in the US were involved in farming. Now it is a tiny fraction. The same is true in manufacturing. While we still have farmers, most farming is managed by giant corporations employing unskilled and low-paid workers. The same could happen in computing. While there will likely always be a need for software development, it might, in the future, be entirely managed by a very small cadre of highly skilled folks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the trends in evolution is specialization. Organisms become more and more specialized to their environment as long as it doesn't change. However, when the environment &lt;em&gt;does&lt;/em&gt; change those specialists are normally wiped out and replaced by others better adapted to the new situation. If you know one thing well - better than anyone - you may be well placed in some environment, but if it changes you are lost. However, if, along with specialization, you also foster generalization, you are better prepared for change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is why a &lt;em&gt;liberal education&lt;/em&gt; which includes some specialization but a lot of generalization is such a good thing. If you can be good at two or more things you are probably better off than if you can only do one thing well. But, even more important is an attitude that your education won't end at some determined age or milestone. If you truly believe that you can and should learn throughout your life, and learn things sufficiently different from what is needed in your profession, you are well placed for most foreseeable futures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have an unproven theory, that in the real world, most specialists have a boss (or a boss's boss..) who is a generalist. The one who knows a lot of things and can see the bigger picture is likely better placed to lead than the one who sees the world through a microscope. If you teach, it may well be that the least technical person in your course will end up being the employer of your uber-geeks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, those with few resources, have a different problem. While it is great to say &lt;em&gt;Do What You Love&lt;/em&gt;, you also need to temper it with &lt;em&gt;Do What You Must&lt;/em&gt;, or even &lt;em&gt;Do What You Can&lt;/em&gt;. But even if you need to compromise for monetary or familial reasons, the attitude of a lifetime of learning can still benefit the individual. This is, more or less the mantra: &lt;em&gt;Yes I Can&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, for those in unfortunate circumstances collective action and mentoring by peers and others is especially needed and especially powerful. If &quot;daddy&quot; is a millionaire you can probably do what you want, but if you come from a more modest background (as I did) you need to gather the resources you can - mostly other people. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On a personal note, I studied Mathematics, but wound up in CS. I might have wound up as an actuary, but it sounded boring. I was meant to do mathematical research, but never really got the chance after I finished my doctorate. Up until about two years before I finished, the job prospects for mathematicians were fantastic. Like CS today, there were lots of jobs and good salaries. But it all fell apart in about a year. When I finished there were no such jobs - none. Several hundred applications resulted in no offers, though I was well respected at the time and wrote a very nice thesis. But I really wanted to teach, and so took a job that I was, in many ways, overqualified for. But it kept me in the profession, even though I had to change fields. I never programmed a computer until after I had a PhD. But I knew how to learn and how to work hard. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-24T14:22:49.647" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3867" PostTypeId="5" CreationDate="2017-10-25T12:13:40.027" Score="0" Body="&lt;p&gt;Many groups of people are underrepresented in computing and among student bodies in computing education programs. There are historical reasons for this, but the problems continue into the modern age. Women and people of color, especially, have met resistance to their presence and a lack of resources encouraging their participation. Even for those who attempt to enter the profession, many drop out. Use this tag for questions that relate to both encouraging such people to enter and for ways to retain them once they do. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-25T12:13:40.027" LastActivityDate="2017-10-25T12:13:40.027" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3868" PostTypeId="4" CreationDate="2017-10-25T12:13:40.027" Score="0" Body="Outreach is about both recruiting and retaining people, especially women and other underrepresented groups, in Computing (especially as students in computing programs and curricula). " OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2017-10-25T14:53:28.957" LastActivityDate="2017-10-25T14:53:28.957" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3869" PostTypeId="1" AcceptedAnswerId="3872" CreationDate="2017-10-26T00:38:29.940" Score="3" ViewCount="178" Body="&lt;p&gt;In this video, &lt;a href=&quot;https://www.youtube.com/watch?v=t5NszbIerYc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=t5NszbIerYc&lt;/a&gt; Dr. David Brailsford uses an elegant Lego model to explain pointers and linked lists. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think that using physical models could make it easier for students to learn about fundamental concepts? Has anyone had any success with this?&lt;/p&gt;&#xA;" OwnerUserId="3331" LastEditorUserId="1293" LastEditDate="2017-10-26T12:37:18.410" LastActivityDate="2017-11-06T05:20:37.290" Title="Could physical (i.e. lego) models help teach CS?" Tags="|teaching-analogy|introductory-lesson|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3870" PostTypeId="1" CreationDate="2017-10-26T05:49:06.160" Score="4" ViewCount="412" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;It was suggested I cross post this question from the main Stack&#xA;  Overflow site as it may be of interest here too&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am tutoring a neighbour's child and we were exploring the int() function before using it with input() - which returns a string. We tried the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int(5)&#xA;int(5.5)&#xA;int('5')&#xA;int('5.5')&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The first three returned 5 as expected; the last one threw the error &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;ValueError: invalid literal for int() with base 10: '5.5'&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Given the behaviour of the first three lines how do I explain the error to a 14-year old (background = speaks 4 languages but is poor at maths)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE &lt;/p&gt;&#xA;&#xA;&lt;p&gt;C# exhibits the same behaviour: &lt;code&gt;Convert.ToInt32(&quot;5.5&quot;)&lt;/code&gt;; throws the error&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Input string was not in a correct format.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="3333" LastEditorUserId="1293" LastEditDate="2017-10-26T12:48:55.490" LastActivityDate="2017-10-27T15:26:17.097" Title="How to explain the int() function to a beginner" Tags="|lesson-ideas|python|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3871" PostTypeId="2" ParentId="3870" CreationDate="2017-10-26T11:46:12.667" Score="3" Body="&lt;p&gt;First the reason for the failure. Function &lt;code&gt;int&lt;/code&gt; wants either a number or a string that represents an int (from the Python 3 docs). The first part covers your first two examples and the second part covers your third. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However '5.5' isn't a &quot;string that represents an int&quot;, hence the failure. It is, of course, a string that represents a number, but that isn't the same thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int(eval('5.5'))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will return 5 since &lt;code&gt;eval&lt;/code&gt; will return a number that &lt;code&gt;int&lt;/code&gt; will be able to work with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how to explain it. There are two options (at least). The first (worst) is just to tell the kid that the world isn't magic and int only works for some things, but doesn't handle everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it makes more sense to treat it as an exercise in careful reading of specifications. Read what the specification &lt;em&gt;does&lt;/em&gt; say and what it &lt;em&gt;doesn't&lt;/em&gt; say. Specifications are meant to be precise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make it a lesson about reading the manual when you get confused, or writing test cases to explore the range of possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make it an lesson about searching for an alternate solution (i.e. &lt;code&gt;eval&lt;/code&gt;) when something you try fails. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can make it a lesson about &quot;when you are older and get to design things, spend some time getting it right.&quot; I haven't explored whether there is logic behind the decision to not include such a case as your fourth example, but I doubt that it was an oversight. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;See the note by @ctrl-alt-delor. Function &lt;code&gt;eval&lt;/code&gt; permits the evaluation of arbitrary &lt;em&gt;code&lt;/em&gt;, not just simple expressions. It shouldn't be used, for example, with unexamined user input strings. It is safe, however, provided that you have control over the argument in some way. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-26T13:26:49.120" LastActivityDate="2017-10-26T13:26:49.120" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3872" PostTypeId="2" ParentId="3869" CreationDate="2017-10-26T12:36:43.920" Score="2" Body="&lt;p&gt;It would, of course, be foolish to answer &lt;strong&gt;no&lt;/strong&gt;, since you give an example of it. There is a &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt;, in fact, called &lt;em&gt;Physical Analogy&lt;/em&gt; that suggest doing just this. Physical analogies of any kind help a student &lt;em&gt;visualize&lt;/em&gt; the concept at hand. But it is this idea of aiding visualization that is key here, not the physical object itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Metaphors and analogies of any kind are essential to teaching novices, linking their prior knowledge and experience to the new topics. But the pointer thing can also be taught at a white board with a bit of showmanship. &quot;new&quot; means draw a _cell, &quot;next = &quot; means draw an arrow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also provide a computer visualization that abstracts a bit from what the &quot;professor&quot; is showing in the video, which does, in fact use a bit of computer visualization along the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, while I'm a big fan of metaphor and analogy, I want to also provide a caution. The thing you are teaching is &quot;similar to&quot; but not &quot;just like&quot; the metaphor you use. Don't try to push the similarities too hard. At some point any metaphor breaks down and if the student has put too much currency into the similarity he or she may have trouble. Nodes and pointer are not, in fact, physical quantities, but only bit patterns. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a simple case like cells with next fields you can also do this. A person is a &quot;cell&quot;. Their left hand holds a bit of &quot;data&quot; perhaps written on a piece of paper that they hold or some other physical object that they can use. Their right hand is a &quot;pointer&quot; to another &quot;cell&quot; (i.e. person). You can build up a linked list in this way. You can modify the data in a cell, you can modify where &quot;next&quot; points to, etc. If the class is large this may be more effective than the lego idea since it can be viewed by a larger audience. It is also more active than just viewing a &quot;professor&quot; manipulate blocks on a table. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, metaphor isn't limited to such low level ideas and can be used at any level. &quot;A database is like...&quot;. They are only limited by the creativity of the teacher and the willingness to work at it to get it right. The &lt;em&gt;make a peanut-butter sandwich&lt;/em&gt; as a way to introduce algorithms is often used, but the knowing teacher also knows that no one is really likely to treat making lunch as a true algorithm. There it is the differences that are essential to the learning, since over interpreting an &quot;algorithmic&quot; description leads to trouble (and messy floors). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-10-26T12:42:32.150" LastActivityDate="2017-10-26T12:42:32.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3873" PostTypeId="2" ParentId="3869" CreationDate="2017-10-26T13:04:27.133" Score="1" Body="&lt;p&gt;In “Gift of dyslexia” — Ronald D. Davis, one of the techniques used, to overcome dyslexia, is to make physical clay models of letters and words. As I read the book I realised that as a child I had made similar models in computer code. In the book they made models of letters, numbers, words, objects, verbs, ideas E.g. a model of “the” and the word “the”. I continue to create models in my head when I am learning. Not just the basic reading/writing concepts, but advanced stuff in CS, science, maths, … However it is sometimes easier if there is a real physical model.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore it is often good to have some physical model, but remember (and tell the students), it is just a model. All models are wrong, but some are useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like to use old mechanical computing devices, when teaching concepts in CS. I love the look on their faces, when I tell them that it is still done the some way, but smaller, faster, and with electricity in place of cogs, but still the same.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes do it, but don't over do it. Mix it up: visual, audio, active, models, hands on, etc. (I wonder if you can use smell)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-10-26T13:04:27.133" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3874" PostTypeId="2" ParentId="3870" CreationDate="2017-10-26T13:24:02.713" Score="2" Body="&lt;p&gt;I agree with @Buffy, but also.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;int(42)&lt;/code&gt; &lt;code&gt;&quot;42&quot; → 42&lt;/code&gt; is one step: it converts string to int or throws.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;int(7.2)&lt;/code&gt; &lt;code&gt;7.2 → 7&lt;/code&gt; is one step: it converts float/real to int (and rounds).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;int(&quot;7.2&quot;)&lt;/code&gt; &lt;code&gt;&quot;7.2&quot; → 7.2 → 7&lt;/code&gt;✗ is two steps: convert string to float, and float to int.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;int(&quot;36/5&quot;)&lt;/code&gt; What about this? Should it be able to do this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The problem that is causing the confusion is that we have effectively two functions. &lt;code&gt;int&lt;/code&gt; taking a string, and &lt;code&gt;int&lt;/code&gt; taking a float. They both do different things.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-27T15:26:17.097" LastActivityDate="2017-10-27T15:26:17.097" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3876" PostTypeId="2" ParentId="3070" CreationDate="2017-10-27T08:59:03.200" Score="1" Body="&lt;p&gt;I was recently watching videos of &lt;a href=&quot;https://libreplanet.org/2017/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Libra Planet 2017&lt;/a&gt;. A lot of their talks covered ethics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There seems to be a &lt;strong&gt;lot&lt;/strong&gt; of ethical considerations in software. They did not cover everything, but here is a summary of some of the topics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Jobs.&lt;/li&gt;&#xA;&lt;li&gt;Security.&lt;/li&gt;&#xA;&lt;li&gt;Privacy.&lt;/li&gt;&#xA;&lt;li&gt;Equal rights / user Disability.&lt;/li&gt;&#xA;&lt;li&gt;User rights: Right to use, right to study, right to distribute, right to change …&lt;/li&gt;&#xA;&lt;li&gt;Algorithmic bias: e.g. search, selection (for jobs), crime detection.&lt;/li&gt;&#xA;&lt;li&gt;Law: The good, the bad, and the ugly.&lt;/li&gt;&#xA;&lt;li&gt;Politics.&lt;/li&gt;&#xA;&lt;li&gt;Free speech: Software that you can go to jail for talking about (in the USA).&lt;/li&gt;&#xA;&lt;li&gt;Workers(programmers) rights and responsibilities (guilds and trade bodies).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Some things not covered.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Safety.&lt;/li&gt;&#xA;&lt;li&gt;Artificial Intelligence.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-10-31T08:40:12.697" LastActivityDate="2017-10-31T08:40:12.697" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3877" PostTypeId="2" ParentId="3870" CreationDate="2017-10-27T15:13:21.827" Score="2" Body="&lt;p&gt;It is important to discuss the type system early, as it is the whole basis upon which objects interact.  The type system is the species structure of the Python object ecosystem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Strings interact with string behaviors: + is concatenation, [] is substringing, and *(string,int) causes repetition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Numbers, in the presence of arithmetic operators, do arithmetic.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The moral: type determines context and therefore regulates the interactions between objects.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;int()&lt;/code&gt; cast expects an object that is convertible into an integer.  If it is passed a floating point number, it truncates the number towards zero.  If it is passed a numerical string containing a valid parseable number, it extracts the number value from the string.  If it is passed a boolean, it converts &lt;code&gt;true&lt;/code&gt; to 1 and &lt;code&gt;false&lt;/code&gt; to 0.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is passed something that is not a parseable into a number, it throws a &lt;code&gt;ValueError&lt;/code&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-10-27T15:13:21.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3880" PostTypeId="2" ParentId="3860" CreationDate="2017-10-28T22:37:19.843" Score="-1" Body="&lt;p&gt;What is indisputable is that the ability to code is a career booster for someone in almost any line of work.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2017-10-28T22:37:19.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3881" PostTypeId="1" CreationDate="2017-10-30T18:27:45.833" Score="114" ViewCount="30457" Body="&lt;p&gt;A few days ago, I had a high school sophomore (who is now in her third CS class, having passed the prior two) look at this Java code for a solid 3-5 minutes, and was unable to figure out what it did:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;int answer = -1;&#xA;while (answer &amp;lt; 1 || answer &amp;gt; 5) {&#xA;    System.out.println(&amp;quot;Please enter a number from 1 to 5.&amp;quot;);&#xA;    answer = myScanner.nextInt();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;She couldn't identify the ending condition of the loop, and didn't understand why &lt;code&gt;answer&lt;/code&gt; was initially set to a number outside of the 1-5 range.  The understandings that she would need to comprehend this code was covered in a prior class by a different teacher, and it was covered a second time from first principles in mine.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;I don't particularly need help with this student.&lt;/em&gt;  I will tutor her and give her extra worksheets.  She will almost certainly skirt by and do okay, but if the past is a good indicator, she might never be able to quite put it all together, and larger projects will be impossible for her without some outside help (which I will make sure that she receives).&lt;/p&gt;&#xA;&lt;p&gt;However, every year, I find a small number of students who just don't seem to get it.  They muddle through, but the CS major program becomes harder and harder for them as their four years go by.  &lt;em&gt;Must it be this way?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Is there any evidence or reason to believe that there are students who genuinely can't learn to program?&lt;/strong&gt;  Or, flipping the question around, &lt;strong&gt;is there any evidence or reason to believe that every student really can learn to program?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:30.997" LastActivityDate="2020-10-06T03:17:30.997" Title="Is there some meaningful percentage of students who can't learn to program?" Tags="|student-motivation|struggling-students|" AnswerCount="22" CommentCount="36" ContentLicense="CC BY-SA 4.0" />
  <row Id="3882" PostTypeId="2" ParentId="3881" CreationDate="2017-10-30T19:51:20.307" Score="74" Body="&lt;p&gt;There are a number of reasons why students &lt;em&gt;don't&lt;/em&gt; learn, but few non medical ones why they can't. Leaving aside the medical reasons, such as hormonal imbalance or other disorders, I think that students who don't learn either have little desire to learn or have had poor teaching in the past. Even students with some learning disorders can learn given desire and patient teaching, but it can take a lot of work and understanding of the student to enable it. Once common problem with students is extreme introversion. That can make it difficult for the student to seek help and ask questions. It is good if you can find ways to help students deal with that in a positive way. See &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3854/making-technical-presentations-safe-for-novices&quot;&gt;this question&lt;/a&gt; for more on the idea here.&lt;/p&gt;&#xA;&lt;h3&gt;Desire&lt;/h3&gt;&#xA;&lt;p&gt;Some students don't learn what you are teaching because they have little desire to learn it and no incentive to put in the work required. They may be in your course for the wrong reasons and would rather be anywhere else if it were only possible. They put in the time, but nothing else. There is probably not a lot you can do for them as that desire needs to be internal. Some students develop desire after a period of indifference, but I don't think this is common. I've had undergraduates in CS who were only in the major because their family (father) would only support them if they stayed. Such students can be counseled to study something more interesting to them if possible, even if it requires doing that in addition to computing. Better, though, if you can counsel the parents to better support their child.&lt;/p&gt;&#xA;&lt;p&gt;Some classes are required, of course, and so interest for some will be higher and for some it will be lower. If you know something of the goals of the student you might be able to connect the current class to those goals, increasing interest and desire.&lt;/p&gt;&#xA;&lt;h3&gt;Poor Teaching&lt;/h3&gt;&#xA;&lt;p&gt;Many students do poorly in CS (as in mathematics) due to poor or indifferent teaching; especially the attitude among some teachers that it is OK to leave some students behind. Not every student takes the same amount of effort to teach and every student learns differently. My usual mantra in this situation is that &amp;quot;Your students are not like you.&amp;quot; They learn differently than you did. Your presence in the classroom as a teach is proof enough that you are a special case.&lt;/p&gt;&#xA;&lt;p&gt;Some especially bright kids do poorly in school because they are simply bored and nothing is exciting enough &lt;em&gt;to them&lt;/em&gt; to put in the effort. Some students find other subjects especially easy and don't really know what it is like to have to &lt;em&gt;work&lt;/em&gt; to learn. Some students don't learn because no one ever taught them &lt;em&gt;how to learn&lt;/em&gt;. Some think that hearing something once means they have learned it and are surprised later when they can't recall something, wondering why you never taught it to them. Some students have a fundamental misconception about some small thing that has snowballed into a big block. Some students have never had a positive learning experience (maybe generally and maybe just in some topic) and simply hate everything about the process. Some teacher say incredibly stupid things to students and even some institutions have incredibly stupid ways to deal with students, actively damaging them.&lt;/p&gt;&#xA;&lt;p&gt;I have examples in my learning and teaching background of each of these things.&lt;/p&gt;&#xA;&lt;p&gt;As a student I was a thought not very bright when I was a kid and was nearly &amp;quot;held back&amp;quot; to repeat an early grade. However, I was just &lt;em&gt;deadly&lt;/em&gt; bored with school. No one ever bothered to tell me why I was there or why or how I should try to succeed. Being bored I was a bit of a troublemaker, leading to lack of support from teachers. Later on, I was given an IQ test and the results were reported back to me as &amp;quot;You probably have the skill to succeed in a Junior College, but probably would only be frustrated by a full undergraduate program.&amp;quot; I later earned a PhD, of course, so the assessment was a bit &amp;quot;off&amp;quot;. The first course in which I actually learned anything was in Plane Geometry in HS. I got entranced by the problems there. Prior to that, mathematics was, perhaps, my worst subject. The doctorate is in Mathematics, of course.&lt;/p&gt;&#xA;&lt;p&gt;In teaching, I once had a student with two problems. First he was dying of a chronic condition, but also he had been given misinformation about the precedence of operators by some early teacher that was reinforced when he used a too-simple pocket calculator. He couldn't seem to get it right in elementary programming and learned to hate it. He thought he was stupid that he didn't &lt;em&gt;get it&lt;/em&gt; and he thought that all of his teachers also thought he was stupid. I think I managed to convince him otherwise before he died but we banged heads a bit before the reason for his difficulties became clear to me. It took a bit longer to convince him that I wasn't actively trying to deceive him.&lt;/p&gt;&#xA;&lt;p&gt;I once had a class of students who were almost all doing very poorly. Since my teaching style then was to face them, rather than lecture with my back to them, the diagnosis was pretty simple. No one had ever taught them how to learn in a classroom. They sat passively and listened and watched, taking no action themselves. I asked one why he didn't take notes and he pointed to his head and said &amp;quot;It's all here.&amp;quot; Well, I had evidence otherwise, so had to interrupt the syllabus to actually teach them how to learn and to force them to actually do it. I've discussed part of the method in &lt;a href=&quot;https://cseducators.stackexchange.com/a/1168/1293&quot;&gt;another answer on this site&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3&gt;Solutions&lt;/h3&gt;&#xA;&lt;p&gt;If you want to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1347/how-can-i-convince-my-fellow-cs-teachers-that-reaching-every-student-is-a-worthw&quot;&gt;teach every student&lt;/a&gt;, however, you need to &lt;em&gt;know every student&lt;/em&gt;. If someone is doing poorly, you need to try to understand why that is and to tailor a solution to their needs. To do that you need to be dealing with a reasonable number of students, of course, so if you are a professor of 800 students, the individual care must be given by your army of helpers. But even wit 20 or so students you need help. This is why pairing and group work is so important and why you can't always let students choose their own groups. You need to get feedback from the members of the groups (peer evaluation) and you need to find ways to act on what you learn.&lt;/p&gt;&#xA;&lt;p&gt;The solution to teaching every student is not to individually tutor every student, but to find ways that every student can learn what they need to learn &lt;em&gt;on their own terms.&lt;/em&gt; Not every student wants to earn first marks. They want to learn &amp;quot;just enough.&amp;quot; They are &lt;em&gt;satisficing&lt;/em&gt; rather than &lt;em&gt;optimizing&lt;/em&gt;. You can make that work for them too, so that &amp;quot;not earning first marks&amp;quot; doesn't mean &amp;quot;failing.&amp;quot;&lt;/p&gt;&#xA;&lt;h2&gt;Success Story&lt;/h2&gt;&#xA;&lt;p&gt;I once had two students (compiler course) who were repeating the course after failing it. The classmates of these two were generally among the best I've ever had in one group. But these two had, seemingly, never had a positive experience in CS. They seemed to be dull, requiring repeated explanations of the simplest ideas over and over. Fortunately the course was taught in an incremental way in which the students could accumulate points toward success rather than by demonstrating it on exams: a project course. I convinced them to come to my office hours and there was never a time thereafter that they weren't there. Fortunately the other students didn't require such high maintenance. I also had simple ways for students to ask questions when they were working on their own and so these two could get small helps whenever they needed it. It turned out that these two wound up (a) explaining things correctly to me by the end of the course (b) earning the highest grades that term, and (c) angering the other students who thought I'd put these two in the class to make themselves look bad. My last contact with them was to remind them of what they had done and that they could repeat that elsewhere if they were willing to put in the same amount of work. I think that teamwork also helped here and they supported one another throughout. Note that I didn't need to put additional time into the course for this to happen. The office hours were required and the mailing list for questions was a common feature of all my courses. Another question here seeks ways to make this &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3811/answering-student-questions-as-they-work-outside-class&quot;&gt;out-of-class communication&lt;/a&gt; easy, though I think it needs better answers at this time.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-30T19:51:20.307" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="3883" PostTypeId="2" ParentId="3881" CreationDate="2017-10-30T20:40:41.677" Score="30" Body="&lt;p&gt;As I indicated in the question, it has been my experience that there are certain kids who never seem to come along.  My data is drawn from a rather small group (definitely under 1000 kids learning CS over the course of my career), and @Buffy's idea that these students are &lt;em&gt;satisfying&lt;/em&gt; rather than &lt;em&gt;optimizing&lt;/em&gt; may well be correct.  However, I haven't seen convincing evidence of that.  What evidence I do have, unscientific though it may be, is that there are, indeed, students whose brains are simply not wired for this field.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It always appears to be the case that, with enormous effort, they can obtain some very basic competencies, but the material does not fit &quot;naturally&quot; into their way of thinking, in much the same way as not everyone can feel certain aspects of musicality.  (See &lt;a href=&quot;https://www.washingtonpost.com/news/to-your-health/wp/2014/11/12/why-some-people-just-cant-dance-or-clap-to-the-beat/?utm_term=.8579364c9e82&quot; rel=&quot;noreferrer&quot;&gt;beat deafness&lt;/a&gt; and the 4% of humanity with &lt;a href=&quot;http://www.abc.net.au/radionational/programs/allinthemind/definitely-tone-deaf/8307996&quot; rel=&quot;noreferrer&quot;&gt;congenital amusia&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is important to note that I am &lt;em&gt;not&lt;/em&gt; suggesting that people with such musical disabilities can learn nothing of music; rather, I am suggesting that  &lt;strong&gt;a very high level of musicality (such as that associated with the professional musician) may never be realistically attainable&lt;/strong&gt;.  It is also worth noting that 4% is not a terribly low number; over the course of a teaching career, one would encounter many students with such handicaps to overcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming requires substantial sequencing ability, a certain intuitive capability to informally understand (and guarantee) post-conditions, and the ability to simultaneously understand multiple layers of abstraction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within the normal distributions of abilities, therefore, it stands to reason that there will be a (not insubstantial) subset of people who will have enormous difficulties with the topic.  And, similar to music, it may not be that they are incapable of learning any particular aspect of programming, but they may never really be able to pull it all together with any sort of facility, no matter how hard they work.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-11-01T10:28:56.253" LastActivityDate="2017-11-01T10:28:56.253" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3884" PostTypeId="2" ParentId="3881" CreationDate="2017-10-30T22:34:01.480" Score="19" Body="&lt;p&gt;Consider the posibility that this could be a problem with &lt;em&gt;Java&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your first language is APL, and many fail... is a reflect of the students or APL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read also:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://lambda-the-ultimate.org/node/5481&quot; rel=&quot;noreferrer&quot;&gt;http://lambda-the-ultimate.org/node/5481&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is Haskell the right language for teaching functional programming&#xA;  principles? No! (As Simon Thompson explains.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have learn dozens of languages and have teach a little. Certainly some languages are more problematic when others are not.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My pet theory? I think if we accept that most software is &lt;em&gt;poorly designed&lt;/em&gt; including programming languages, then users are not only learning how use the program(ing language) but struggling to dechiper the (poor) design and what is the true design beneath.&lt;/p&gt;&#xA;" OwnerUserId="3352" LastActivityDate="2017-10-30T22:34:01.480" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3885" PostTypeId="2" ParentId="3881" CreationDate="2017-10-30T22:40:05.930" Score="3" Body="&lt;p&gt;I'd like to preface this by stating that I am not an educator, and thus have had no formal training, however I have had experience while working on my undergraduate in computer science helping people to code.  Then after I graduated I helped my wife through an informatics degree in which she had to take programming classes, and I found the following article to be very insightful, and actually described the problems my wife was having quite clearly.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now her goal was to just pass the class, as she had no intentions of moving on to any sort of a programming degree, and I'm sure that contributed somewhat to her continued difficulty with the course, but should never fully got over the first hurdle illustrated by the article (a hurdle, that I submit your student is probably having difficulty with at this time).  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The authors of the paper posit that the primary hurdles in computer science are..&lt;/p&gt;&#xA;  &#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;assignment and sequence&lt;/li&gt;&#xA;  &lt;li&gt;recursion / iteration&lt;/li&gt;&#xA;  &lt;li&gt;concurrency*&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The article (and linked paper ( &lt;a href=&quot;https://web.archive.org/web/20090401003425/http://www.cs.mdx.ac.uk/research/PhDArea/saeed/&quot; rel=&quot;nofollow noreferrer&quot;&gt;link here&lt;/a&gt; ) indicate that some people have extreme difficulty figuring out operator assignment, and they can't tell you the value of variables a and b after the follow chuck of pseudo code (even after explaining the basics of pseudo code).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; int a = 10&#xA; int b = 20&#xA; a = b&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The test was administered twice; once at the beginning, before any instruction at all, and again after three weeks of class. The striking thing is that there was virtually no movement at all between the groups from the first to second test. Either you had a consistent model in your mind immediately upon first exposure to assignment, the first hurdle in programming – or else you never developed one!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I hate to use a single study / article to say there are people who can't learn to code, rather I like the idea that, armed with this knowledge, educators can better understand where to focus, and maybe develop better techniques to overcome these specific hurdles.&lt;/p&gt;&#xA;" OwnerUserId="3351" LastActivityDate="2017-10-30T22:40:05.930" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3886" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T03:00:19.020" Score="57" Body="&lt;p&gt;Maybe. It's hard to prove a negative. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does knowing that help educators in any way?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that knowledge helps somehow, how does that compare to all the ways that belief can be harmful? &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Giving up on students who &quot;just won't get it&quot;&lt;/li&gt;&#xA;&lt;li&gt;Not reflecting on how teaching can improve, since the ones who failed &quot;just won't get it&quot;&lt;/li&gt;&#xA;&lt;li&gt;Noticing &quot;patterns&quot; in the students who &quot;just don't get it&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There have been students who privately I had serious doubts about. Repeated explanations went nowhere. Trace after trace was slow and labored. Then... later... eventually... they figured it out. Next year they passed the class.&lt;br&gt;&#xA; Later, they got a job as a programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realized that &lt;strong&gt;I just can't know&lt;/strong&gt;. Students come back and get it together. If I had shared my judgments it would have completely derailed their success. I can only help each student the best I can. And that includes believing that each and every student is capable of learning programming.&lt;/p&gt;&#xA;" OwnerUserId="2045" LastEditorUserId="150" LastEditDate="2018-02-25T12:38:51.927" LastActivityDate="2018-02-25T12:38:51.927" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="3887" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T04:12:12.083" Score="17" Body="&lt;p&gt;I firmly believe that, barring actual mental handicap, anyone can learn to program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this is purely a belief; a matter taken on faith. It is informed in part by some knowledge of psychology and the process of learning, but in these things I am at best an amateur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The available evidence, unfortunately, does not demonstrate that anyone can learn to program. Even though the infamous “The Camel Has Two Humps” paper has been &lt;a href=&quot;http://www.eis.mdx.ac.uk/staffpages/r_bornat/papers/camel_hump_retraction.pdf&quot; rel=&quot;noreferrer&quot;&gt;retracted&lt;/a&gt;, the retraction itself isn’t massively encouraging: the underlying data, according to the retraction, is all still valid and real. The conclusions drawn from that data was too strong, and in particular the actual “Camel” web article that got passed around so much made far stronger statements than even that—but nonetheless, the data is still there. It suggests a problem, and the retraction only says that we don’t know what causes it—not that it doesn’t exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, the paper cites numerous others in its claims of widespread low academic achievement in computer science: it does not stand alone in &lt;em&gt;that&lt;/em&gt; claim.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, my conclusion is basically this: it may be, and I dearly hope it to be, that all students can learn to program. However, the available evidence suggests that, if nothing else, &lt;em&gt;we have not yet learned how to &lt;strong&gt;teach&lt;/strong&gt; all students to learn to program.&lt;/em&gt; Whether that is because it can be done and we just haven’t figured it out yet, or because it truly cannot be done, seems to remain an open question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would recommend all computer science educators to try to keep an eye on the state of the art here, and be willing to try new things. The status quo does not appear to be sufficient. It certainly isn’t settled science that there is a population who &lt;em&gt;cannot&lt;/em&gt; learn programming, so even though that may be true, it is too early to give up on those who are failing right now.&lt;/p&gt;&#xA;" OwnerUserId="1246" LastActivityDate="2017-10-31T04:12:12.083" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3889" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T08:34:46.390" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Everybody is a genius. But if you judge a fish by its ability to climb&#xA;a tree, it will live its whole life believing that it is stupid.&lt;/p&gt;&#xA;&lt;p&gt;Albert Einstein&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Coding is an art. It isn't a thing for everyone, you need a vocation to be a programmer. The example that you provided, is something really basic, if she can't understand it, maybe she will never do.&lt;/p&gt;&#xA;&lt;p&gt;There is a possibility that you aren't a good teacher, but you know, programming isn't something that you can discuss, everything has a sense, a logic, if she can't program, try to suggest her to study something different&lt;/p&gt;&#xA;" OwnerUserId="3361" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-31T08:34:46.390" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3890" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T09:47:36.843" Score="6" Body="&lt;h1&gt;Nature vs Nurture&lt;/h1&gt;&#xA;&lt;p&gt;It seems that nature plays a large role: you can not teach a cat to code (even though they share approximately 90% of our DNA. However most of the variance between humans is probably nurture.&lt;/p&gt;&#xA;&lt;p&gt;See Carol Dwecks word on growth mindset, for who some learn and some don't. Note that we can have a growth mind set in some subjects, but a fixed mind set in others, “I can't do maths.”, “I can't program.”.&lt;/p&gt;&#xA;&lt;p&gt;Everyone (that can learn anything) should be able to learn to code at the level of you example. However not everyone will be excellent at it. I have taught a lot of pupils in year7 (UK), they can do this in scratch. Many of them that had good teachers in primary school, can do it when they arrive (see choice of language below).&lt;/p&gt;&#xA;&lt;p&gt;Therefore help students to get a growth mindset.&lt;/p&gt;&#xA;&lt;h1&gt;Syntax vs Concept&lt;/h1&gt;&#xA;&lt;p&gt;Is the student struggling with reading the language, or with the underlying concepts? If the student does not know the idea of a loop, or the higher level idea of loop until successful. Then understanding the code will be very hard, it may even rely on discovering the idea.&lt;/p&gt;&#xA;&lt;p&gt;Therefore ensure that students understand the concepts, before teaching a language. This can be done using «robot teacher/student», or other paper/acting/physical based activities.&lt;/p&gt;&#xA;&lt;h1&gt;Procedural vs Functional vs …&lt;/h1&gt;&#xA;&lt;p&gt;Are you teaching in the best language? What influenced your choice of language? Is it the best teaching language? vs Is it popular in industry?&lt;/p&gt;&#xA;&lt;p&gt;Bertrand Myers has claimed in (I think) “A touch of class”. That it is easier and quicker to teach Eiffel then C# and Java and …, than to teach any one of these from the start. Yes he teaches his CS student all of these languages, but starts with Eiffel, as it is easier to learn (yet also more powerful that the others, and the only pure OO language that I have seen. It is also one of the languages where all the new ideas are coming from (see also lisp) ).&lt;/p&gt;&#xA;&lt;p&gt;In a camel has two humps (an argument for natural ability, I won't go into why this research is not valid here, but there is one thing of relevance), it looks at mutating-assignment, and shows that student that don't get mutating-assignment struggle to program.&lt;/p&gt;&#xA;&lt;p&gt;Therefore teach mutating-assignment last. E.g. functional, but you can do functional in any language.&lt;/p&gt;&#xA;&lt;p&gt;Is this semi-functional program easier to read?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;do {&#xA;    System.out.println(&amp;quot;Please enter a number from 1 to 5.&amp;quot;);&#xA;    myScanner.next();&#xA;} while ( myScanner.currentInt() &amp;lt; 1 ||  myScanner.currentInt() &amp;gt; 5 )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This code snippet uses «Command query separation», that is every method is ether:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a command that does something but does not return anything (a procedure), or&lt;/li&gt;&#xA;&lt;li&gt;a query that returns something but has no side affects (a function).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-10-31T10:11:25.700" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3891" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T11:38:39.573" Score="29" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;However, every year, I find a small number of students who just don't seem to get it. They get through, but the CS major program becomes harder and harder for them as their four years go by. Must it be this way?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Think of it this way:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alien lands on Earth. He sees a human, who encounters another human. The first human flips the second one off. In response, the second one flips the first one off.&lt;br&gt;&#xA;The alien goes on to meet world leaders, scientists, philosophers, ... Every time he meets someone, he flips them off. After flipping them off, the alien's behavior is perfect, he makes no other mistakes. &lt;strong&gt;No one corrects the alien&lt;/strong&gt;, because they understand that he's culturally unaware of its meaning and they understand that the alien is trying to say hello. Since the alien is capable of being friendly, no one is really incentivized to address that one mistake that the alien makes. It seems like nitpicking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the alien has met with diplomats (and diplomatically minded people), he eventually ends up in situations where there is less goodwill towards the alien's cultural obliviousness. The alien starts noticing that people are reacting less friendly towards him, even though he's still trying to use human greetings.&lt;br&gt;&#xA;As time goes on, the alien struggles more and more to keep interactions with humans on a friendly level. After several years, he finally fails and ends up in a fight with an angry human.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The inept student, just like the alien, was initially in a position where little to no mistakes could be made (first year only uses simple examples, the alien only meets diplomatically minded people). The flaws of the student/alien are not big enough to fail a test/conversation.&lt;br&gt;&#xA;But as the student/alien progresses through the ranks, it gets harder (harder examples, less diplomatic people). Eventually, there comes abreaking point where the mistakes of the student/alien are important enough that they &lt;strong&gt;do&lt;/strong&gt; prevent a good outcome, and this is where the student/alien fails for the first time, &lt;strong&gt;even though they were making the same mistake all along&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a student, it's a curse to only be &lt;em&gt;somewhat&lt;/em&gt; inept. If you're completely inept, then teachers will focus on you and will make sure that you do it right. But if you're stuck in the &quot;not good but good enough&quot; zone, then you may never receive that attention from your teacher (because they're focusing on students with bigger problems), and you'll never be told that what you're doing is wrong.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When no one tells you that what you are doing is wrong, then you can't know that what you're doing is wrong (or could be improved).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there any evidence or reason to believe that there are students who genuinely can't learn to program?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes and no.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everyone is &lt;strong&gt;capable&lt;/strong&gt; of learning programming, but different people will have different levels of &lt;strong&gt;intuition&lt;/strong&gt; and will &lt;strong&gt;learn things at a different pace&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Yes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In college, I studied Digital Arts and Entertainment. This course was unique in the world (at the time), because it was both a full-fledged course for artistic design (concept art, freehand drawing, 3D modeling) but also technical game development (programming, ranging into complex geometrical mathematics).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There were two very clear groups in our class: the artists and the analysts (I was in the latter group). The artists passed the art classes without breaking a sweat, but needed to learn programming step by step and never seemed to really intuitively understand something (e.g. int division) without having it intricately explained time and time again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The analysts, on the other hand, were passing the programming classes with flying colors, but often couldn't manage to design or draw anything halfway decent, especially compared to the artists. They would have to redo freehand perspective drawings many times over, whereas the artists managed to get it right the first time and then had a lot of time left to improve their already succesful drawing (thus creating even more of a gap between the art that the artists and the analysts produced).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This course irrefutably proved to me that some people are wired differently than others. It was so very obvious to see it happen for every class we took. The people who were outclassing me in art class would need my help in programming class, and vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Out of the 300 students who started the course in my year (I'm already omitting those who gave up midway. 300 students took the final exams of the first year), &lt;strong&gt;8&lt;/strong&gt; managed to pass all classes. Almost everyone else got caught up on either the art or the programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This was my second time in college, and I have to admit that the % of driven students was much higher than in other courses. There were &amp;lt;10% slackers, most people were spending their nights designing (either games or art, whichever held their fancy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seeing less than 3% of students pass both art and programming classes proves the point.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;No&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;But then again, 8 students managed to pass. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I personally knew 3 of them. One had not programmed before the course, the other two had never been artistically inclined. So it's &lt;em&gt;possible&lt;/em&gt; to learn a skill, even if it's almost completely orthogonal to your current skillset.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also a strong believer in the fact that if someone does not understand something; that it simply hasn't been explained to them in a way that makes sense to them (or they haven't been driven enough to find out for themselves).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;You need to investigate the ignorance.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For your current example, this does mean that we should investigate what exactly she wasn't understanding.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;She couldn't identify the ending condition of the loop&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There's a &quot;spectrum&quot; of ignorance here. It's important to figure out which one applies to this student:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Was she aware of what a &lt;code&gt;while&lt;/code&gt; is used for in general? (regardless of why it was being used in this particular example)&lt;/li&gt;&#xA;&lt;li&gt;Was she aware that it is an ending condition? (regardless of what the specific condition itself was)&lt;/li&gt;&#xA;&lt;li&gt;Was she aware that this was a boolean evaluation? (regardless of what was being evaluated)&lt;/li&gt;&#xA;&lt;li&gt;Could she explain the evaluations (evaluating if a number is bigger than another number) but not the combined intention of both evaluations (evaluating that the number was between a lower and upper bound)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Based on which of these describes her situation (or something I didn't list), you can work towards filling in the gaps in her knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To use my college example, if she has an artist's mindset, she may never be able to &lt;em&gt;intuititively&lt;/em&gt; understand code and read it like a second language, but given enough effort, she should be able to eventually identify what happens.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Without making this a personal attack on you&lt;/strong&gt;, I think it's important to consider that when a teacher considers a student incapable of something, that this could also mean that the teacher is &lt;em&gt;incapable of teaching it&lt;/em&gt;.&lt;br&gt;&#xA;As the teacher, you can never be sure which one it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a variation on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect&quot; rel=&quot;noreferrer&quot;&gt;Dunning Kruger effect&lt;/a&gt;. If you apply the principles of the effect, that means that it's possible that a teacher's evaluation of a student's incapability to learn something may simply be a misinterpretation. The teacher doesn't know how to teach this student effectively, and therefore considers the student flawed, instead of their own teaching ability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This can be subconscious&lt;/strong&gt; and is in no way malevolent on the teacher's part.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;From my experience with teaching programming (and being taught programming), the most effective way to gauge student skills and also teach them how to read code is to play the &lt;strong&gt;breakpoint guessing game&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In essence, put some breakpoints in the code (this can be on every line if you want), start the program, and have the students try to &lt;strong&gt;predict&lt;/strong&gt; what the next breakpoint will be.&lt;br&gt;&#xA;&lt;em&gt;Note: this is very easily gamified. People love betting, so allowing them to bet on the outcome teaches them to figure out what the outcome is.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a student who is vastly underskilled and not getting it (as you suspect this student is), you'd expect an inability to make any reasonable prediction, or continuously stating that the next step cannot be predicted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step through the whole program. Keep repeating the &lt;strong&gt;same&lt;/strong&gt; code over and over again, until she makes accurate predictions (&lt;strong&gt;even if&lt;/strong&gt; she's only reciting it from memory rather than understanding).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once she is able to recite the steps, change &lt;strong&gt;one&lt;/strong&gt; thing in the code (e.g. one of the numbers in the while condition). Repeat the breakpoint guessing game. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If she actively &lt;strong&gt;disagrees&lt;/strong&gt; with what you say the next breakpoint will be; that's a really good thing. This means that she has an opinion about the flow of the code. Ask her to justify her claims. Do not correct her, just get her to clearly express her own thoughts. Find the error in her claims, but don't point it out.&lt;br&gt;&#xA;Instead of correcting her, &lt;strong&gt;show&lt;/strong&gt; what the next breakpoint is. Ask her to explain why the outcome is different from what she said. Only explain things once she gives up with explaining, or is clearly saying random things and hoping to get lucky.&lt;br&gt;&#xA;As a software developer, I notice every day how often I spend &lt;em&gt;talking to myself&lt;/em&gt; about how the code is going to flow. This is a &lt;strong&gt;quintessential&lt;/strong&gt; skill for a programmer. If you're too quick to explain, you're effectively preventing her from trying to think for herself. The idea is that she shouldn't rely on what others say, but rather try to find the answer for herself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every person should be able to understand the logical flow of a simple code snippet, given enough repetition of the guessing game. Every human is innately able to distinguish and recognize patterns (even if they can't do it intuitively).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everyone is &lt;strong&gt;capable&lt;/strong&gt; of learning programming, but different people will have different levels of &lt;strong&gt;intuition&lt;/strong&gt; and will &lt;strong&gt;learn things at a different pace&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only people who actually cannot be taught something, are the people who do not want to be taught something (or do not want to put effort in learning). As long as she &lt;strong&gt;wants&lt;/strong&gt; to understand it, she eventually will.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2017-10-31T12:07:19.797" LastActivityDate="2017-10-31T12:07:19.797" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3892" PostTypeId="2" ParentId="3881" CreationDate="2017-10-31T13:34:01.733" Score="9" Body="&lt;p&gt;Always try to explain it some other way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try it in another language - there are reasons why BASIC and Visual Basic are used as 'beginner languages', although I would look for 'teaching languages' that entrain a better understanding and good coding habits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would no more teach someone to program in Java than I would teach them to fly in an F-104.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this isn't about syntax and choice of programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There may be some flaw in your logic, or a gap that you're skating over without even realising that there's an unaddressed assumption or assumed knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There may be some error in your student's understanding - some unstated assumption or 'gap' that she's filled-in incorrectly and internalised - and she might not be aware of it. If that unstated error leads to a dead-end, that's it: game over. &lt;strong&gt;The exercise has failed&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be entirely unsurprising that she isn't able to elucidate and express the 'blocking' point: you are working to develop this ability formal logic in your student and you are both well aware that it is developing from a very low base.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question is: can you &lt;strong&gt;reframe the exercise&lt;/strong&gt; in a way that might reroute you both around a problem that neither of you can identify?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's enough on teaching &lt;em&gt;technique&lt;/em&gt; from me. I coach something else entirely unrelated to coding - although I do coach and mentor my fellow-programmers -  and you need to discuss this with your professional colleagues in teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now to address the more general question: are there students who simply cannot be taught to program?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming we're discounting students who have a generally-poor intellectual ability, and that this is about intelligent and able people who have some specific cognitive impairment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dyslexic people may have difficulty and it isn't just 'they can't read'. They &lt;strong&gt;can&lt;/strong&gt; interpret symbolic  information, but layout and formatting are far more important than you realise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are people who simply cannot dial a telephone number or retype an eight-character code unless it is broken up into smaller groups - and you will empathise with them if I tell you to type in &quot;1101110111111111101110111111101&quot; on your keypad right now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if your code sample is wriggling in front of them, like ones that binary, and they cannot pin down extract the logic from this unusable and illegible text? It doesn't matter that it's perfectly legible and comprehensible to you, or even to ninety-five percent of your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dyslexic people are very good at concealing their impairment, and at working around or under or over it. Often, so good at both these skills that they work out how to read all by themselves, despite the ineffective assistance of their teachers, and are never even aware that they have dyslexia unless they are tested by professionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And now they've met source code, which is another reading skill: text that conveys formal logic, and has none of the structure of spoken language. Or at least, not the structures that they have learned in their internalised implementation of reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try the same problem in Python. And discover that there are coders who are fluent in slicing and never, ever, code a loop - not even in those rare cases where it really is the best way to proceed: I wonder why that is?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be warned, dyslexic people are also very, very good indeed at spatial visualisation and logical abstraction: the mistakes they make as beginners, including the attempts they  make to 'bridge' over gaps like unstated assumptions and assumed knowledge, can be incredibly convoluted. This will be especially true of the mistakes or 'blocks' that they cannot elucidate and explain to you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is in the nature of dyslexic peoples' unconscious (but highly-developed )strategies for reading (and, say, successfully associating names with faces) that they apply extremely complex abstractions to everyday problems without even knowing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't about dyslexic students: I'm using them as one example among many, of students who can program - and program very well indeed - but can be surprisingly difficult to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is, of course, dyscalculalia: a fundamental inability to perform arithmetic. Or so I'm told: I'm still sceptical, and I would classify these rare students as &quot;people that a long line of increasingly-specialised teaching professionals are unable to teach arithmetic&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's real, it probably does have an analogy in a fundamental inability to program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am reminded that Bertrand Russell's wife, who spoke seven European and oriental languages fluently, and who was regarded by her husband, among others, as his intellectual equal, never understood the operation of canal locks: despite all attempts at explanation, with working models, by the most eminent engineers philosophers and professors of the British Empire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, you are probably right that some people will never program; and I am completely in agreement with JWZ's assertion that the extended abstraction required to 'get' pointers, rather than merely use them in a pro-forma way, is absent from all but a tiny minority of the human beings alive today.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A final point, and a deeply unpleasant one: you may have inherited the results of bad teaching in the student's past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be warned, some people who are labelled 'introverted' have been very, very badly taught and it is a common malpractice in bad teaching for girls to be conditioned, by a sustained campaign of extremely negative feedback, to step back and step out of a challenging problem that they are not 'expected' to be able to solve. They will have internalised this, and they will have been very thoroughly socialised in the skill of diverting themselves - and you - around that. And they will absolutely steer you around the dangerous confrontations inherent in considering the problem to be anything other than their problem, and their fault.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is less common with boys but it exists: and the higher education institution that you work in is, perhaps, more of a place for people who have been encouraged or permitted to excel than the place where all excellent students can enter and reach their potential. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may be very fortunate, with this particular student, to have been given an opportunity to undo that; and, whether this is the case or not, I am very pleased to hear that you have both the will and the resources to find out what she can really do.&lt;/p&gt;&#xA;" OwnerUserId="3365" LastActivityDate="2017-10-31T13:34:01.733" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3893" PostTypeId="1" AcceptedAnswerId="3905" CreationDate="2017-10-31T13:58:09.600" Score="4" ViewCount="553" Body="&lt;p&gt;I sometimes have pupils, that struggle to learn because they have a fixed-mindset (“I can't program”, “I can't use computers”, …). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I the context of teaching a Computing (Computer Science, IT, Digital Literacy, Computational Thinking  ) lesson, what can be done to encourage &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;noreferrer&quot;&gt;growth-mindset&lt;/a&gt;?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Footnotes:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Growth-mindset / fixed-mindset, are from research by Carol Dweck. Dweck's work shows that a students belief about whether they can do it has a massive effect on outcome. I think some one else said “Whether you believe that you can do it, or that you can not, you are correct.”, this sums it up.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-11-02T16:12:32.337" Title="Encourging Growth mindset, in computing lesson" Tags="|student-motivation|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3894" PostTypeId="2" ParentId="3893" CreationDate="2017-10-31T14:33:57.937" Score="2" Body="&lt;p&gt;I'm afraid this is one of those &lt;em&gt;sad but true&lt;/em&gt; situations. Too many students are blocked by their own expectations. Too often those expectations are  based on early experience and then reinforced continuously. Every time they seem to fail, the poor sense of self worth is deepened. You want to try to break that cycle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two solutions (at least). One for the whole class and one for the individual. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the class you need to always teach with the attitude that &lt;em&gt;yes you can&lt;/em&gt;. That this may not be easy, but it is do-able, even if it takes work. You shouldn't say things like &quot;this may be too hard for some of you&quot; or anything implying that. You can say &quot;I struggled with this when I was younger, but pushed through the block.&quot; Good teaching practice in general can help with this. Peer instruction, pairing, group work, peer feedback can all help. Providing a way for them to get questions answered as they arise will help so they don't need to wait for an answer. Encouraging questions helps - even requiring questions - with points given for &quot;participation&quot; helps. Value questions over answers, actually (unlike this site). If you keep an index card for each student (assuming reasonable numbers) you can annotate it as questions and discussions occur. Keep these cards with you as you teach, of course. Cards on your office desk are less valuable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the individual, you may need to spend some time exploring what got them to the situation they are in and why. When was the first time they noticed this &quot;inability&quot;? What happened then that gave them that idea? Many people get into this situation and then miss a lot of essentials that leave them behind their classmates making it harder and harder to catch up or change their self-perceptions. You need to try to break that cycle. Sometimes tutoring is available, but you may need to instruct the tutor to have it properly effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key idea, however, is to assure, somehow, that the student has success and recognizes it, even if it is a small success. Sometimes pointing out to them that they were abandoned by earlier teachers gives them some incentive to succeed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to assure success is to depend less on &quot;all or nothing&quot; examinations and base grading more on cumulative work submitted. Permitting repeated work and re-grading is a powerful technique, but can, if not monitored, lead to the student getting farther behind, as the re-work takes time and focus. If a course is &quot;worth&quot; 1000 points, then each of 8 projects is worth 100, with resubmission after grading permitted. The remaining points can be distributed otherwise. Some people even permit re-taking examinations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is likely that the reinforcement of failure comes from many directions. You can/should discuss the situation with your colleagues and develop an overall plan for any such student. Hopefully your rules and regulations don't make that impossible. Parents can also help in some situations, perhaps by providing tutors or counseling. In particular, you may need to educate your peer educators that it isn't proper behavior to teach only the obviously teachable, especially if that is only the best students who may, in some ways, be the easiest to teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also ask this same question at &lt;a href=&quot;https://matheducators.stackexchange.com&quot;&gt;Math Educators&lt;/a&gt;. Math teachers have long faced this situation at all levels. Sometimes in an Algebra class, for example, you learn that students don't actually know how to add two numbers. In math or CS you may need to take the student back a long way to fill in the gaps they have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One person close to me thought he was dumb in math. In fact, he was bored in school and being bored caused a bit of trouble. This resulted in at least one teacher ignoring his instruction. He could only add by counting on his fingers. Later on, he took a Calculus course and did very well, surprising himself. I knew that he had unrealized ability, but it was hard to get that idea through to him. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-10-31T14:33:57.937" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3895" PostTypeId="1" AcceptedAnswerId="3898" CreationDate="2017-10-31T18:20:08.213" Score="1" ViewCount="173" Body="&lt;p&gt;When teaching I often have pupils struggle in the first few minutes. When they are setting the computer up, ready to start work. They often have to follow lengthy instructions, that I print on paper, of mostly screen snips (So this also takes a long time to prepare).&lt;/p&gt;&#xA;&lt;p&gt;What can I do to make this easier for pupils?&lt;/p&gt;&#xA;&lt;h2&gt;For example&lt;/h2&gt;&#xA;&lt;p&gt;I have had a lesson where I have had detailed instructions on setting up Python/Idle: Starting the editor, finding starter code, they contain many screen shots. This took me a long time to prepare, and is not easy for the pupils. They are not productive at the start of the lesson, and get demotivated.&lt;/p&gt;&#xA;&lt;p&gt;They need to get to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;starter code copied to there personal folder.&lt;/li&gt;&#xA;&lt;li&gt;idle started and on one side of the screen.&lt;/li&gt;&#xA;&lt;li&gt;code loaded into idle.&lt;/li&gt;&#xA;&lt;li&gt;code run.&lt;/li&gt;&#xA;&lt;li&gt;output window on other side of screen.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Common errors:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;running code without idle (so they can not edit it).&lt;/li&gt;&#xA;&lt;li&gt;running my copy of the code (so they can not edit it).&lt;/li&gt;&#xA;&lt;li&gt;overlapping windows (so they are frustrated that they can not see, and spend a lot of time moving windows). (This one can be solved with better digital literacy, at the start, or a bit at the start of each lesson.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I have had the same problems when teaching spreadsheets, and am anticipating it with web design. I was hoping to use the brackets editor. The start state would be.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;starter code copied to there personal folder.&lt;/li&gt;&#xA;&lt;li&gt;brackets started and on one side of the screen.&lt;/li&gt;&#xA;&lt;li&gt;root folder loaded into brackets.&lt;/li&gt;&#xA;&lt;li&gt;live preview started.&lt;/li&gt;&#xA;&lt;li&gt;browser (output) window on other side of screen.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The computers are the schools desktop computers. Unfortunately they are running MS-Windows.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-05-31T15:25:38.217" Title="Make it easier, and quicker to get to the start" Tags="|lesson-ideas|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3896" PostTypeId="2" ParentId="3893" CreationDate="2017-10-31T18:41:16.493" Score="2" Body="&lt;p&gt;&lt;strong&gt;Tell students explicitly that the mind works like a muscle when learning computer science.&lt;/strong&gt; Carol Dweck showed that students can be explicitly trained in growth mindset, leading to better outcomes for those students.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The message is that everyone can learn CS if they work hard at the right strategies.&lt;/li&gt;&#xA;&lt;li&gt;Carol Dweck created the &lt;a href=&quot;https://www.mindsetworks.com/programs/brainology-for-schools&quot; rel=&quot;nofollow noreferrer&quot;&gt;Brainology&lt;/a&gt; curriculum to teach growth mindset. You can preview it for free.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Believe yourself that growth mindset in computing is real.&lt;/strong&gt; Act what you say. Your students will likely pick up on your attitude.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don't say that anyone's a genius, or naturally talented at programming.&lt;/li&gt;&#xA;&lt;li&gt;Demonstrate that you think any student can succeed if they study correctly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Help your students focus on &lt;em&gt;strategies&lt;/em&gt; and &lt;em&gt;processes&lt;/em&gt; that lead them to success.&lt;/strong&gt; Students should see evidence that using a good strategy will help them. It's not just about being &quot;smart&quot;.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make problem-solving strategies explicit in your teaching. Demonstrate the strategies and reward use of those strategies.&lt;/li&gt;&#xA;&lt;li&gt;Use active learning techniques, which often require students to talk through their problem-solving strategies.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;NB: Carol Dweck has been giving interviews over the last couple years that critique how growth mindset is used in practice (see &lt;a href=&quot;https://www.theatlantic.com/education/archive/2016/12/how-praise-became-a-consolation-prize/510845/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://www.edweek.org/ew/articles/2015/09/23/carol-dweck-revisits-the-growth-mindset.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;). She cautions about a &quot;false growth mindset&quot; that says students only need to try hard. It's about good strategies, not just trying hard. She also notes that sometimes teachers use &quot;fixed mindset&quot; as another reason why students just can't learn, similar to how we used to blame the child’s environment or ability. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Must it always come back to finding a reason why some children just can’t learn, as opposed to finding a way to help them learn? Teachers who understand the growth mindset do everything in their power to unlock that learning.&quot; - &lt;a href=&quot;https://www.edweek.org/ew/articles/2015/09/23/carol-dweck-revisits-the-growth-mindset.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dweck in Education Week&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2045" LastActivityDate="2017-10-31T18:41:16.493" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3897" PostTypeId="2" ParentId="3895" CreationDate="2017-10-31T21:48:47.810" Score="0" Body="&lt;h1&gt;Don't start on the computers.&lt;/h1&gt;&#xA;&lt;p&gt;I have just been reading “Hacking the curriculum, creative computing and the power of play” — Ian Livingstone &amp;amp; Shahneila saeed. It had a suggestion that would help with this problem.&lt;/p&gt;&#xA;&lt;p&gt;Pupils struggle to learn two things at once: learning a new language, and designing an algorithm.&lt;/p&gt;&#xA;&lt;p&gt;Therefore:&lt;/p&gt;&#xA;&lt;p&gt;Separate these two activities, by having the pupils design the algorithm first, off of the computer.&lt;/p&gt;&#xA;&lt;h2&gt;How this strategy will help with this problem&lt;/h2&gt;&#xA;&lt;p&gt;Pupils will finish the first task at different times. Therefore, when there are problems, you don't have to help everyone at the same time.&lt;/p&gt;&#xA;&lt;p&gt;In addition the first wave of pupils become the experts, they can help others.&lt;/p&gt;&#xA;&lt;p&gt;This is not ideal, so should be combined with other solutions. However until the pupils have internalised the language, you should be doing this strategy anyway.&lt;/p&gt;&#xA;&lt;h1&gt;Semi-automation&lt;/h1&gt;&#xA;&lt;p&gt;Always put resources in the same place. I have created a laminated sheet that I have put above my white board. It says:&lt;/p&gt;&#xA;&lt;p&gt;Student share → Year … → Mr Ctrl-alt-delor → … → lesson …&lt;/p&gt;&#xA;&lt;p&gt;I then fill in the year, subject, and lesson number with a card and sticky tack.&#xA;The pupils soon get this, they soon get the the point where they just ask what is the lesson number? Of course I encourage them to read the board, or help each other.&lt;/p&gt;&#xA;&lt;p&gt;The department has just taken on this idea. Minus the teacher name, so that there is one unified place to find resources.&lt;/p&gt;&#xA;&lt;h1&gt;Automation: Use the command line&lt;/h1&gt;&#xA;&lt;p&gt;If you are lucky enough to be using Gnu/Linux (or another Unix), then there is a technical solution. Hopefully other will post solutions for Microsoft's Windows, or more general pedagogical solutions.&lt;/p&gt;&#xA;&lt;p&gt;Instead of creating a long set of instructions for the pupils to follow. Create a script for the computer to follow. Or have the pupils type in a command. You can use wmctrl/xdotool/devilspie to move and resize windows.&lt;/p&gt;&#xA;&lt;p&gt;As &lt;a href=&quot;https://askubuntu.com/a/106207/10473&quot;&gt;this&lt;/a&gt; answer says, the command line allows you to do things with less typing (button presses), and in the same way that it makes answers on stackexchange easier, it also makes instructions to pupils easier.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-02T09:23:49.097" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3898" PostTypeId="2" ParentId="3895" CreationDate="2017-11-01T00:35:58.887" Score="2" Body="&lt;p&gt;This question seems like a minefield. The obvious answer is &quot;Don't Do That.&quot; No group of people, students or professionals, is going to interpret two pages of instructions in exactly the way the writer intends. It isn't going to happen. They will misinterpret individual steps, skip steps trying to optimize, crash the machine when they don't have a conceptual idea of the goal, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first place, your instructions may be clear to you, but until you vet them with others they won't be clear to most other people. This is why textbooks have editors and why authors re-write continuously. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are, however, a few things you can do. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You give one answer yourself here - Automate It. In fact you can improve the automation if you distribute the code yourself and execute it yourself from a central server. Automation isn't foolproof, however, as some of the machines in the lab will, perhaps, have different initialization parameters baked in that defeat your script. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Another possible solution is to decide on a standard startup process and configuration that you always use. The students can learn this and only struggle with it for a day (or week, ...). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make the startup description shorter. As short as possible. Then a bit shorter. Vet it with someone else who is skeptical about it. Re-write it using their feedback. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But even then, you will fail. Different students will interpret your writing differently. That is pretty much guaranteed. Your writing won't be &lt;em&gt;perfect&lt;/em&gt;. Neither will their reading (and understanding) be &lt;em&gt;perfect&lt;/em&gt;. If you need different instructions each day and they can't be vetted, I wish you the luck you aren't likely to have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do more, perhaps. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you can live with students always working in pairs at the machines, then you have cut the interpretation problem roughly in half, maybe more. Only half as many machines need to be set up and there are two minds working on each machine. (Of course they could disagree making the problem harder, but usually this helps.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you can manage to have an assistant wander around the room helping the students with the most trouble it can help, though pairing is better. (Paired programming has been shown to be more efficient and require less intervention by the teacher, but that is not quite the same problem you pose here. Students working alone get stuck and wait unproductively for assistance. Pairs work it out.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There is one special difficulty that you need to address. Minutely detailed and extremely precise descriptions are often especially hard to follow if the person trying to carry them out has no overall context or goal that they understand. The reader likely has no way to check that each step was faithfully executed in the correct order. Any glitch will cause a serious problem for that person. With a group of individuals, there will be many independent problems simultaneously. Whack A Mole. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-01T00:35:58.887" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3900" PostTypeId="2" ParentId="3881" CreationDate="2017-11-01T10:48:11.527" Score="-2" Body="&lt;p&gt;I am not a CS educator, I just do far too much programming in the day job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A question if I may, what course are you teaching, Programming or Computer Science? I would be disturbed to sign up for a CS course only to have it spend significant time on programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the &quot;Computer Science&quot; title I would expect that actually programming the things would be a very, very small part of such a course (And actually not worth many marks, so why really sweat it). &#xA;There are far more important things to teach on an introductory computer science course IMO, calculus of sets, complexity, some discrete maths, introductory algorithms, &lt;strong&gt;maybe&lt;/strong&gt; some computer architecture, but programming is not something that it is worth wasting much time on in a CS course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if there is anyone who could not be taught to program, but certainly most people can be taught some formal logic and ideas about algorithms. If you can give people the tools to break big problems into manageable chunks that would be counted a win in my view, if you can give them the tools to read specifications with a sufficiently critical eye for ambiguity that would be a HUGE win even if they come out unable to write a line of Java.&lt;/p&gt;&#xA;" OwnerUserId="2963" LastActivityDate="2017-11-01T10:48:11.527" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3901" PostTypeId="2" ParentId="3881" CreationDate="2017-11-01T15:23:01.627" Score="4" Body="&lt;p&gt;Probably almost everyone can learn to play basketball, but if you intend to go up against professionals at some point, the taller you are, the better, because they are going to be tall. If you are not going to be a professional, then no problem, just have fun.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This points out the essential question: &lt;strong&gt;Why are we educating people?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;So that they can get good jobs.&lt;/em&gt; Parents push their kids toward or away from things for this reason. (Mine pushed me &lt;em&gt;away&lt;/em&gt; from programming, but I resisted and became a programmer and now teach programming.) It is certainly important for everyone to be able to make a decent living, so this horn of the dilemma cannot be refuted.  &lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;To make well-rounded people.&lt;/em&gt; We all need to have some understanding of a very large and rapidly growing number of topics to function well in this world. So this horn cannot be refuted either.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It would be great if students knew early on what they were interested in (as I did) and had the drive to overcome obstacles to get there (as I did), but apparently, mystifyingly, many kids and young adults simply have &lt;em&gt;no idea&lt;/em&gt; what they want to do for a living. I don't know where the failure lies for that, but it is the cause of the seeming dilemma that we face. More drive on the part of a student will push them to either eventually succeed, or fail fast. But, like the famous basketball coach said, &quot;You can't teach height&quot;, and we can't impart drive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with everyone who said that it is not a teacher's job to decide what is best for a student - whether they belong in the program or not. &lt;strong&gt;Do your best as a teacher and stop worrying about whether it can be done or not.&lt;/strong&gt; This is the conclusion I came to after 4 years of teaching.&lt;/p&gt;&#xA;" OwnerUserId="3386" LastEditorUserId="150" LastEditDate="2017-11-02T12:41:15.757" LastActivityDate="2017-11-02T12:41:15.757" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3902" PostTypeId="2" ParentId="3881" CreationDate="2017-11-01T17:19:05.333" Score="-1" Body="&lt;p&gt;Yes, absolutely. I'm not an educator myself but I've been a programmer for a long time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just cause you can write a few lines of code does not make you a programmer. Just like every student who learns English is not going to write a best selling novel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do this child a favor and steer them to a different career path. If they can't determine the function of that code snippet they how are they going to debug a truly complex problem. Do you want this person writing aircraft guidance systems, banking software, or self-driving cars?&lt;/p&gt;&#xA;" OwnerUserId="3389" LastActivityDate="2017-11-01T17:19:05.333" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3903" PostTypeId="2" ParentId="3881" CreationDate="2017-11-01T17:28:40.810" Score="-1" Body="&lt;p&gt;I am fairly new to teaching and found some students to simply not understand programming. Computer programming involves problem solving and some memorization and not a lot of kids are into that. Let's face it, computer programming can be a bit tedious and frustrating for a lot of people and so its no wonder why some kids don't choose a career in it. In order to be good at programming you need to have some desire and perseverance.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find the kids that are good at math are also good at computer science. However these kids also lack a sense of creativity whereas the other kids who don't do so well in CS are more extrovert and excel in reading/writing classes.  &lt;/p&gt;&#xA;" OwnerUserId="3330" LastEditorUserId="3330" LastEditDate="2017-11-02T14:47:10.290" LastActivityDate="2017-11-02T14:47:10.290" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3904" PostTypeId="2" ParentId="3895" CreationDate="2017-11-01T17:59:00.593" Score="0" Body="&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; Simplify the process, then simplify (or eliminate) the instructions.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;When teaching I often have pupils struggle in the first few minutes. When they are setting the computer up, ready to start work. They often have to follow lengthy instructions, that I print on paper, often one or two sides, of mostly screen snips (So this also takes a long time to prepare).&lt;/p&gt;&#xA;&lt;p&gt;What can I do to make this easier for pupils?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Why do they need to follow these lengthy instructions? Why haven't you chosen tools that have a simplified setup process? Why isn't that setup step &lt;strong&gt;already done&lt;/strong&gt;?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;For example, I have had a lesson where I have had detailed instructions on setting up Python/Idle: Starting the editor, finding starter code, they contain many screen shots. This took me a long time to prepare, and is not easy for the pupils. They are not productive at the start of the lesson, and get demotivated.&lt;/p&gt;&#xA;&lt;p&gt;The computers are the schools desktop computers. Unfortunately they are running MS-Windows.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If these are school computers, why isn't Python already set up? Why isn't there just a shortcut on the desktop to the editor? Why isn't the starter code organized in an easy-to-find location? (As in, so easy that it doesn't require an explanation. Like a folder called &lt;code&gt;Examples&lt;/code&gt; on the desktop.)&lt;/p&gt;&#xA;&lt;p&gt;Hopefully these rhetorical questions demonstrate my point: if I were you, I would purposely choose tools that make it easy to get started, and I would try to eliminate as many setup steps as possible.&lt;/p&gt;&#xA;&lt;p&gt;This is one of the reasons I love &lt;a href=&quot;http://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;, or if you're tied to Python, then &lt;a href=&quot;http://py.processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing.py&lt;/a&gt;. You get a simplified, easy-to-launch editor that includes everything you need to write and run code, and it comes with a bunch of examples that you can get to by just clicking one button.&lt;/p&gt;&#xA;&lt;p&gt;See also:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2793/order-to-teach-topics-in-an-intro-programming-class/2798#2798&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/19/using-processing-as-an-entry-point-in-an-introductory-course/2920#2920&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/161/programming-languages-specifically-designed-for-beginners/173#173&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;But even if you don't want to switch to Processing or Processing.py, my suggestion is the same: your goal should be to get students writing (fun and engaging) code as soon as possible, which means you should be eliminating as much of the boring setup as possible. The less setup you have, the simpler your instructions can be.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-01T17:59:00.593" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3905" PostTypeId="2" ParentId="3893" CreationDate="2017-11-01T22:43:15.037" Score="3" Body="&lt;p&gt;I like both of the existing answers, but I wanted to add another technique that I think is very important: you should &lt;strong&gt;show that making mistakes or not knowing is part of the process.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't:&lt;/strong&gt; Make your lessons all about perfect example code and only best practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm a student in your class. I've understood most of what you told me in lecture. Now I'm at home, sitting down at my computer looking at a homework assignment. I have no idea what to do! Then I start writing code, and I get a ton of errors. Ugh, maybe this computer stuff isn't for me!&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Do:&lt;/strong&gt; Include mistakes, debugging, and looking stuff up in your lessons. Do live coding exercises.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I'm a student in your class. Now I'm at home, sitting down at my computer looking at a homework assignment. I have no idea what to do, but I remember from class you told me I should &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;break problems down into smaller steps&lt;/a&gt; and then take those steps on one at a time. Now I'm writing code, and I get an error. Good thing you showed me that errors are a normal part of programming, along with how to debug the issue. I even know how to look stuff up in the reference if I'm confused!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2017-11-02T16:12:32.337" LastActivityDate="2017-11-02T16:12:32.337" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3906" PostTypeId="2" ParentId="3881" CreationDate="2017-11-02T00:29:48.680" Score="4" Body="&lt;p&gt;Some personal experience. I have a PhD in computer science and have had a very successful 40-year career in software development. But often, when presented with a new concept, I have had great difficulty &quot;getting it&quot;. I think the problem happens when you build an incorrect mental model of what is going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the first time this happened was on first introduction to algebra: with x=3 and y=4, I was convinced xy had to be 34. There's nothing stupid or ignorant about this, and it doesn't mean the pupil will never overcome it: there's just a misunderstanding that has crept in somewhere, and I think it can be very hard for a teacher to discover where that misunderstanding lies, and correct it, because the teacher simply doesn't realise where the faulty step in the reasoning occurs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, when introduced to programming, I remember I found it really hard to understand function calls. I don't know now what the problem was, just that I had great trouble with it. (I also found it hard to grasp that xy was no longer 34, or even 12, it was now completely unrelated to the values of x and y.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In recent years I've taught a good number of XSLT courses. One of the areas where I find students really struggling is with recursion. The main frustration in teaching this is that you don't know why students are finding it difficult. Sure, it's a very abstract concept but it becomes so second nature that you no longer see the difficulties, and that makes it hard to help the students overcome them.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2017-11-02T00:29:48.680" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3907" PostTypeId="1" CreationDate="2017-11-02T10:34:03.870" Score="6" ViewCount="265" Body="&lt;p&gt;I read something on this site, that lead me to read about Bret Victor's learnable programming and direct manipulation.&lt;/p&gt;&#xA;&lt;p&gt;I was wondering if anyone has used any software like this.&lt;/p&gt;&#xA;&lt;p&gt;What software have we used? What effect did it have on teaching and learning?&lt;/p&gt;&#xA;&lt;h1&gt;What is direct manipulation, also referred to as learnable programming&lt;/h1&gt;&#xA;&lt;p&gt;Victor tells us that the techniques that we now use, are based on best practice from the days of paper and pen, teletypes. That we have not yet adapted to this new media and what it can do. That typing a program, and then immediately running it, is not immediate enough. Output should change as code changes, not wait for us to press run. We should be able to manipulate the output, to change the code. Not just manipulate the code, to change the output.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/2zMYV.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/2zMYV.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt; An example: Here we see the programmer, manipulating a variable, by using a slider. We the the effect on the output. We see the effect over time. The programmer is trying to give the turtle the correct bounce, so that the jumping character will be able to get through the gap. The programmer no-longer had to do long calculations, or do guess/change/run cycles. Whey just slide the slider until they see what they want.&lt;/p&gt;&#xA;&lt;p&gt;see:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://vimeo.com/36579366&quot; rel=&quot;nofollow noreferrer&quot;&gt;Invention on principle&lt;/a&gt; (programming perspective)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://vimeo.com/64895205&quot; rel=&quot;nofollow noreferrer&quot;&gt;Stop drawing dead fish&lt;/a&gt; (an art perspective)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=8pTEmbeENF4&quot; rel=&quot;nofollow noreferrer&quot;&gt;The future of programming&lt;/a&gt; (a historic perspective)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;LearnableProgramming&lt;/a&gt; good blog post on teaching and learning progrmming&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Preference is for &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Free Software&lt;/a&gt;, that is software with freedoms, not with zero price (I do not introduce proprietary software into my school).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-25T02:15:12.820" Title="Use of “learnable programming” (via direct manipulation) software, in teaching" Tags="|resource-request|programming-environment|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3908" PostTypeId="2" ParentId="2897" CreationDate="2017-11-02T11:46:09.567" Score="0" Body="&lt;h1&gt;How I have personally used git, successfully.&lt;/h1&gt;&#xA;&lt;p&gt;I mostly use mercurial. It is like git. It does much the same thing, but is much easier to use. It has a nice command line, and a nice GUI (tortoise hg).&lt;/p&gt;&#xA;&lt;p&gt;Mercurial has a git plug-in, that allows it to work with git repositories. If there is this git repository, that you want to work on, then you do a clone in mercurial, and now you have it in mercurial (just as you could have done a clone in git). You then work in mercurial, and can push/pull changes back to the upstream repository, or to a friends repository (just as you could have done in git). The only difference is the interface is easier to use.&lt;/p&gt;&#xA;&lt;h2&gt;Disadvantages&lt;/h2&gt;&#xA;&lt;p&gt;When you clone a git repository, you end up with a git repository and a mercurial repository on you local drive. Thus the size of the local repository is roughly double.&lt;/p&gt;&#xA;&lt;p&gt;Mercurial is not efficient at renames and moves. It does a copy and delete. This may have a fix sometime.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;A note on mercurial and git UI&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The git UI is very low level, it is a thin layer over the API.&lt;/li&gt;&#xA;&lt;li&gt;The git GUIs that I have used are a thin vale over this API or a UI. It does not help. It does display all of the commands, in a nice menu, but you will still be at a loss to decide which command is the right one.&lt;/li&gt;&#xA;&lt;li&gt;The mercurial UI is well thought out, there is mostly a one to one mapping between commands and concepts. It is simple and follows the Unix way, each command does one thing well.&lt;/li&gt;&#xA;&lt;li&gt;The mercurial GUI (tortoisehg), integrated with the file-manager, provides good visuals of the repository, and gives access to tools without having to remember commands (so good for beginners, for operations you do rarely, and for operations that need better visual display).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-24T17:56:56.023" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3909" PostTypeId="2" ParentId="3881" CreationDate="2017-11-02T13:40:38.847" Score="4" Body="&lt;p&gt;Well I'm not a teacher myself but I can tell about what happens in our programming classes. My class has 32 people in it and we all have to learn coding in C#, a language that basically everyone of us hates. Last year we had the best teacher in the school but he had to go away and we've got one of the worst one. The class is divided into 2 groups with each having 16 people in it. Well truth be told none of us actually wanted to be a professional code but he have to learn it as it's part of the curriculum. So from all 2 groups there are only 4-5 people who is actually interested in it for many reasons. (one wants to make games, other android apps, and the others, including me, as a hobby). Well from what I see in my group (and hear in the other) most kids are not interested in learning coding. Even though they'll need it in their finals they just don't care. When I look around at class I always see around 5-6 people using their phones or sleeping in classes. Well probably because the teacher is not good now all they know is last years things (partially, very partially) and when ti comes to writing anything complex: they just look at each other. And when you ask them why don't you learn if you are concerned about your grades? They would say &lt;strong&gt;&quot;because I won't ever use it after school&quot;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well it's true that my class doesn't really have anything to do with coding, but the system we're in makes us learn them. I sometimes speak with other teachers who teach the kids who are in the ACTUAL class that learn coding and will work as software developers and he says that &lt;em&gt;they aren't interested either&lt;/em&gt;. So in my school the kids, who will work as devs, are not interested in it? (that's a 32 people class too) of course there are always a few who wants to learn but in general here it's quite low.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So from what I'd seen and heard you need:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;first and foremost: &lt;strong&gt;they just look at it as an other subject to learn&lt;/strong&gt; and have grades from. They are simply not interested in it even if that's what they'll be working as. They need will to learn it.&lt;/li&gt;&#xA;&lt;li&gt;Then there is of course the power of a good teacher. My current teacher came into this school 4 years ago and well knows nothing and is really boring. Many times we have to correct &lt;strong&gt;his&lt;/strong&gt; code. The teacher should try to make the classes interesting for everyone also maybe she needs some special methods. Like as OP said some extra sheets to test on and experience.&lt;/li&gt;&#xA;&lt;li&gt;Maybe she &lt;strong&gt;doesn't have time to learn&lt;/strong&gt; or thinks it's not as important as other subjects because it takes more work and time to learn and understand. (for example here we (those who know some more) usually correct other people in the class and explain why that code was wrong.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;And to end this I want to say the same as what that other teachers told me about it:&#xA;&lt;strong&gt;They just don't care about it, they are not interested in it anymore. It's plain boring for them to look at a black console with white letters.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3404" LastActivityDate="2017-11-02T13:40:38.847" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3910" PostTypeId="2" ParentId="3881" CreationDate="2017-11-02T14:24:52.153" Score="5" Body="&lt;p&gt;(Sorry, too much for a comment)&#xA;I've had a related experience back in college that I think is relevant.  I was a lab assistant, the lab was sometimes used for a computer literacy for seniors class.  I could see one fundamental sticking point for nearly a third of the attendees:  They couldn't comprehend changing the meaning of a key.  The machines were TRS-80s--they don't have a control key.  The word processor needed one, thus IIRC the @ key was hijacked for the purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students either got it or they didn't, the ones that didn't never got it and struggled greatly even with the aspects of the class that didn't involve that.  The ones that got it fared much better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they didn't understand the remapped key by the end of the second class period neither the teacher nor I had a single success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen various students that seemed about as clueless when it came to understanding code but I've never been in a position to help them over an extended period of time to see deeper into what's wrong and whether it could be overcome.&lt;/p&gt;&#xA;" OwnerUserId="668" LastActivityDate="2017-11-02T14:24:52.153" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3911" PostTypeId="5" CreationDate="2017-11-02T14:25:23.673" Score="0" Body="&lt;p&gt;There are many reasons why students may struggle with the CS curriculum and with specific ideas and classes. Some have a poor background and some have had poor teachers in the past. Use this tag for questions related to helping students overcome their difficulties both in general and in specific situations. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-02T14:25:23.673" LastActivityDate="2017-11-02T14:25:23.673" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3912" PostTypeId="4" CreationDate="2017-11-02T14:25:23.673" Score="0" Body="Some students seem to struggle with CS concepts and also, possibly, with the time and work necessary to be successful. Use this tag for questions related to how to overcome the difficulties students face in understanding and in adapting to the curriculum. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-02T14:25:23.673" LastActivityDate="2017-11-02T14:25:23.673" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3913" PostTypeId="1" CreationDate="2017-11-02T15:02:07.917" Score="5" ViewCount="209" Body="&lt;p&gt;One thing I noticed in the years I've studied CS and wrote code is the arrogance that a lot of programmers have within the CS community.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember in high school, coding was just for the tech savvy children. God forbid you ask them a question about a topic because you would often get a rude response.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I went to college and a lot of people were acting the same way. Everyone kind of doing their own thing, very anti social, and keeping to themselves.&#xA;I now teach CS and notice the same behavior with kids whereas in other classes (like reading, writing, art) kids are more expressive, outspoken and creative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If CS were more widely accepted, I believe more people would pursue a career in it.&#xA;I think that is the problem with CS - people are afraid to try it because it seems intimidating and is surrounded by this anti social behavior that repels a lot of people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How do we educators improve the negative attitudes and behaviors that some of our students seem to exhibit?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3330" LastEditorUserId="3330" LastEditDate="2017-11-03T20:51:52.783" LastActivityDate="2017-11-03T20:51:52.783" Title="How can we educators improve a lot of the negative behavior within the CS community" Tags="|introductory-lesson|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3914" PostTypeId="2" ParentId="3913" CreationDate="2017-11-02T15:22:32.130" Score="-2" Body="&lt;p&gt;I think that &quot;arrogance and shaming&quot; are side-effects of personality traits which are indicative of the type of effort needed to master something abstruse like programming. The people who drill down in to it and self-learn succeed because they are &lt;em&gt;not&lt;/em&gt; social people who take time with peers or really give a rip what others think of them. If someone is more social and pleasant, they probably will not have the &lt;em&gt;drive&lt;/em&gt; to accomplish the learning, they will be out with friends instead. Having no friends is a strong incentive to do something alone that is intrinsically rewarding: master the computer!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar example can be found in other fields: look at the 'best' doctors or lawyers. Are they nice, kindly people, or are they a bit ruthless? My father was a successful lawyer, but smart enough to be nice when necessary, and tough enough to work long hours, almost always. He was rewarded, but not by being considered personable by those closest to him (family).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think we have to assess the nature of &lt;em&gt;drive&lt;/em&gt; and consider carefully what it takes to succeed in fields where an enormous amount of effort is needed to gather and master a range of very abstract concepts. Niceness is peripheral or even an impediment to drive. That said, we can move people from their natural tendency (of arrogance, for example) toward more effective ways of relating, but that will be an add-on.&lt;/p&gt;&#xA;" OwnerUserId="3406" LastActivityDate="2017-11-02T15:22:32.130" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3915" PostTypeId="2" ParentId="3913" CreationDate="2017-11-02T19:49:19.460" Score="1" Body="&lt;p&gt;There is so much about this issue that it becomes difficult to provide a useful answer without writing a thesis. I'll try to give a bit of background and provide a couple of hints toward an answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I think this is an issue with males, not with females. You only very rarely come across a woman who exudes arrogance and engages in put-down behavior. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that part of the reason for this sort of thing among young males is evolutionary. It also explains the too-frequent occurrence of risky behavior in boys and young men. For about 200,000 years, the way that humans survived was that young men engaged in violent and competitive behavior as a consequence of being the protector of the tribe/band in a world filled with lions, bears, hyenas, etc. If they didn't take risks and promote other such behavior, humans would still be in the trees. But now we depend on mind instead of muscle so there is no real excuse or reason for such things to continue. Young males are also raging with testosterone. Unfortunately that has behavioral effects that don't go away quickly. Raging hormones are at least as much of a male as a female problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that Junior High School in the US at least can be a brutal place (for all youngsters, not just boys). A certain amount of toughness is required to survive. It lessens a bit as kids get older, but the evolutionary trends are still there. Civilization is a &lt;em&gt;very&lt;/em&gt; recent phenomenon. So, kids are under pressure and aren't, by definition, experienced enough to always deal with it constructively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, they can be taught. Evolution isn't destiny. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teacher, I can immediately think of two things that you can do. One is to always in every encounter provide a good example. Never belittle a student. Never suggest that they are inferior or unable to succeed. Conduct your classroom so that for them to gain your respect they must also show respect. Be the role model that they need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second thing is to permit no abuse. Every instance of arrogance or &quot;lording it over&quot; others or smugness should be turned into a positive lesson. You may need to spend some &quot;private&quot; time with offenders, of course. Making a public show of &quot;putting down&quot; an abuser both contradicts the first point I made, above, but also just makes the problem worse. You can spend some effort to publicly praise those who offer constructive help to others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I note that for most professionals, an ability to work well with others is an absolute requirement for the job. There are a number of exceptions, but that number is vanishingly small. If you can't work in a team you can't work &lt;em&gt;here&lt;/em&gt;. Maybe some manager will be happy enough with your work (assuming you are top 1%) to keep you confined to your cubicle, but you won't advance. You will just always be the goat that no one works with or talks to. Not a happy life even if you are also extremely introverted. If you do, somehow, get promoted, everyone under you is likely to quit or work to subvert you. I won't name names of exceptions to this rule, but I can count them on one hand among thousands in industry who behave better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an office hour you could talk to an offender about the above consequences they may see if they continue. You could also ask them how they might have behaved better. You might even ask them to apologize to someone they have offended. However, laying down the law with specific instructions (&quot;DON'T DO THAT EVER AGAIN&quot;) is not likely to be successful. It makes you the arrogant jerk. Don't give the frequent offender an example of &quot;jerkiness&quot; either in public or private. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you use pairing or teamwork in your class it is useful to also use peer feedback and to let the class know that part of their evaluation will be based on how their peers respond to them. It is necessary, of course to make this safe for everyone, as it is normally seen as risky. See &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3408/how-can-i-effectively-manage-peer-evaluation-among-my-students/3409?s=3|14.0845#3409&quot;&gt;How can I effectively manage peer evaluation among my students?&lt;/a&gt; for more. A search on this site for &quot;Peer Feedback&quot; will turn up other ideas. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-02T19:59:02.620" LastActivityDate="2017-11-02T19:59:02.620" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3916" PostTypeId="1" AcceptedAnswerId="3918" CreationDate="2017-11-03T15:21:20.623" Score="8" ViewCount="478" Body="&lt;p&gt;My girlfriend is currently in her final year in college, and is following a first-years programming course, learning C++. The class is graded partially from homework exercises. She is struggling with them, mostly at a point &quot;I don't know where to start&quot; or &quot;I don't know how to approach this.&quot; So I try to help her with that, but I don't want to end up doing her work for her.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One recent example was the introduction of classes in C++. They were supposed to create a class that simulated game of life. After pointing her to representing the world as a boolean matrix (array of arrays), the thing she got stuck on was printing the world (or a part of it) in the console.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So there are a couple of questions she might have:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How do I do X? How do I create an instance of a class? How do I define a member variable?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are all questions that would be easy to look up. As such I am hestitant to rightout give the answer. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How would I approach this? How do I print the world? &lt;code&gt;cout &amp;lt;&amp;lt; world;&lt;/code&gt; prints the pointer, so what should I do instead? How do I account for the edge of the world? &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If I were to directly answer these questions, I would essentially be making the assignment myself. So this is not something I want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead I try to ask pointed questions, questions that should put her somewhere closer to the solution.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can we print things to the console? In which direction does the cursor move? So where do we want to start reading from &lt;code&gt;world&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I find it hard however to ask these questions clear enough to not get a puzzled look, but also vague enough to not flat-out give the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Afterwards, I feel like I have essentially dictated the entire assignment. Additionally, I feel that if I were to delete the entire assignment, she would struggle very much to reproduce all of it on her own.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Question&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;How can I improve my help in such a way that I don't end up doing the assignment for her?&lt;/p&gt;&#xA;" OwnerUserId="2584" LastEditorUserId="204" LastEditDate="2017-11-03T16:37:28.977" LastActivityDate="2017-11-03T17:16:00.457" Title="How to prevent dictating the solution when tutoring" Tags="|undergraduate|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3917" PostTypeId="2" ParentId="3916" CreationDate="2017-11-03T16:48:48.447" Score="3" Body="&lt;p&gt;Your strategy of asking questions, rather than just answering them is probably the right approach. But I would ask some questions first about her situation in general. This seems to be quite early for an assignment that has some complexity, both for understanding the requirements and for putting together a solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is she missing some prerequisite that is either formally required or assumed? Is the prof making assumptions about the students that may not be valid? Is this her first introduction to programming? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps she just lacks some background that is needed here. You might need to take her back to some fundamentals about programming and thinking algorithmically. Solve some simpler problems with her where you can give more guidance as it isn't directly related to the course. You can also, in such a scenario, help her take a large problem and break it down into smaller problems that can be solved more or less independently as is done in Agile Software with product backlogs. Breaking down a problem into do-able parts is usually very productive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also possible that you are the wrong person to tutor her. Personal relationships can get in the way of teaching. Perhaps she just depends on you too much and would do better if some other friend helped. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in general, I think that asking questions is likely the correct approach. But one line of questions you might consider is &quot;What have you tried so far?&quot; and &quot;Why did it fail?&quot;. You might learn a lot about what is blocking her, but more important, it may cause her to focus more on what she is doing and why. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also discuss how you would approach finding the answers to the questions she has. Where you would look and what you would do with the results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, C++ is a difficult language to master and has many pitfalls for the beginner. Even Bjarne Stroustrup once said that with &quot;C&quot; it was easy to shoot yourself in the foot, but with &quot;C++&quot; you could blow your whole leg off. If this is an issue, focus on the simplest and most straightforward aspects of the language so that the complexity doesn't become a burden early on. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-03T16:48:48.447" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3918" PostTypeId="2" ParentId="3916" CreationDate="2017-11-03T16:59:57.037" Score="4" Body="&lt;p&gt;After I wrote what is below, I realised that &lt;strong&gt;most&lt;/strong&gt;, but not all, of it is for her. Your role is to help her take on this practice, to stop her jumping ahead, and to slowly get her asking herself the questions.&lt;/p&gt;&#xA;&lt;h1&gt;Separate algorithm design and coding.&lt;/h1&gt;&#xA;&lt;p&gt;Help her to separate, designing the algorithms and programming. It is too much to learn a language and to learn to program at the same time (Even if the language is not C++).&lt;/p&gt;&#xA;&lt;p&gt;To do this try physical and paper activities. E.g. for displaying the world. Walk it out. She is the cursor, see walks the path of the cursor placing sheets of paper (characters), on the floor.&lt;/p&gt;&#xA;&lt;h1&gt;Break the task up&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We need a 2d world. I don't know how to do that, but I think I could do a 1D world, and I think I could then build on that to make a 2D world. So I will create a model for a 1D world, and write a display method for it.&lt;/li&gt;&#xA;&lt;li&gt;Let me change the values in the model, does it display correct?&lt;/li&gt;&#xA;&lt;li&gt;What if I change the model after it is displayed? it should change the display. So do that.&lt;/li&gt;&#xA;&lt;li&gt;Now let me try 2D.&lt;/li&gt;&#xA;&lt;li&gt;That is the display (output part) done.&lt;/li&gt;&#xA;&lt;li&gt;That next.&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ask these questions. On each question don't look ahead (don't try to do too much at a time). Get her asking herself what the next step is.&lt;/p&gt;&#xA;&lt;p&gt;In general start with the output, then the input, then the process. (on more complex systems, you will not do all of the output first. You would do  repeat { output, input, process }.&lt;/p&gt;&#xA;&lt;p&gt;The difference between an expert and a novice is not that the expert can keep complex ideas in her head, but that they do one thing at a time, so only keep one thing in their head.&lt;/p&gt;&#xA;&lt;h1&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;Repeat this 4 step process&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;repeat until complete&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Thing about what to do next e.g.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First it compiles but does nothing&lt;/li&gt;&#xA;&lt;li&gt;Second displays 1 line of world.&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Use a physical activity to design the algorithm e.g.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Embody the cursor.&lt;/li&gt;&#xA;&lt;li&gt;Use a checkers board, or other objects to model the model.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Decide what done looks like (for this iteration only: e.g.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;program compiles,&lt;/li&gt;&#xA;&lt;li&gt;Computer displays &lt;code&gt;-----*-----&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;repeat until done {Write code, test}&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-03T17:16:00.457" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3919" PostTypeId="2" ParentId="3913" CreationDate="2017-11-03T18:59:59.507" Score="3" Body="&lt;p&gt;I reject a lot of the assumptions implicit in the question. Computer science isn't just for geeky or &quot;smart&quot; students. And I don't think it's fair to say that students in other classes are &quot;more expressive, outspoken and creative.&quot; Computer science is full of art, creativity, and expressiveness. It's a teacher's job to show that to students and encourage every student to try it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I advise you to work on your own assumptions first. If the teacher thinks that computer science is not for creative students, then what hope do the students have?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things to consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How are you &quot;advertising&quot; the computer science courses? Are you highlighting the artistic and creative aspects of it? Are you appealing to  students who might not self-identify as programmers?&lt;/li&gt;&#xA;&lt;li&gt;What types of programs are you using in your lessons? Are they &quot;boring&quot; command line applications, or are they interactive and visual?&lt;/li&gt;&#xA;&lt;li&gt;What types of programs are you assigning for homework? Do they encourage students to express creativity?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In addition to working on the assumptions of both your students and yourself, I'd also advise you to consider the needs of students from &quot;non-traditional&quot; backgrounds. More things to consider:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are you &quot;making room&quot; for students who often get drowned out by louder or more active students? &lt;em&gt;&quot;We've heard from Grace already, why don't we give somebody else a chance to answer?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Are you recognizing the work done by every student? &lt;em&gt;I'd like to show you all a really creative example of how Ada used &lt;code&gt;for&lt;/code&gt; loops in the last homework assignment...&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Are you calling out bad behavior? Are you encouraging good behavior? &lt;em&gt;Hey Grace, I know you know this stuff really well, so during lab today would you mind helping me out by answering Ada's questions?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These types of change have to start with &lt;strong&gt;you&lt;/strong&gt;. I don't agree with a lot of the assumptions in the question, and I encourage you to take a harder look at some of the assumptions you're bringing to the classroom (which your students pick up on and perpetuate). Fix those, and you'll be able to help your students fix their own assumptions.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-11-03T18:59:59.507" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3920" PostTypeId="1" AcceptedAnswerId="3930" CreationDate="2017-11-03T22:46:40.160" Score="3" ViewCount="405" Body="&lt;p&gt;I'm teaching programming with JS at the highschool level, students have some prior experience with programming with different languages but are still mostly beginners, and we're working through some core language concepts. A few times now the situation has come up where I introduce some new concept, and a student suggests it's similar to something encountered before. The analogy initially seems like it doesn't work, if I ask them to elaborate, they usually do find some connection between the ideas, but it seems (to someone with more experience) like a pretty convoluted relationship.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A concrete example: we ran into attaching multiple event listeners to a single DOM element in a browser context. A student suggested that event listeners are like arrays. After discussing it, the connection the student saw, was that you could add or remove items from arrays and you can add and remove event listeners from elements. Nothing the student said was incorrect, but I was concerned saying &quot;yes, event listeners are like arrays&quot; wasn't a terribly useful analogy in reasoning about either construct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is a good way of dealing with this situation? I don't want to shut students down who make connections like this, it seems like a very productive way of thinking in general, but I also don't want to propagate misconceptions or encourage a questionable mental model.&lt;/p&gt;&#xA;" OwnerUserId="3427" LastEditorUserId="204" LastEditDate="2017-11-04T08:50:26.883" LastActivityDate="2017-12-06T21:38:50.960" Title="How should I respond to a student who proposes a &quot;weak&quot; analogy?" Tags="|secondary-education|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3921" PostTypeId="2" ParentId="3920" CreationDate="2017-11-04T09:02:26.587" Score="0" Body="&lt;p&gt;An array is like a list of event handlers. But it is not like an event handler. Telling students stuff does not work well, but having them discover it does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The student has seen something in the description that is like an array, this is good they are making connections. Unfortunately (at you say) they may make the wrong connection. You are discussing a list/array of event handlers, the student thinks you are talking about event handlers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore as @Buffy said, ask them to elaborate. Ask how it is like an array, and how it is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also do an active learning activity: have a student be an event handler, another to be an event, a sheet of paper to be a button. Act this through. Then add another event-handler/student, then another. Where do they go? What is the data structure that the event-handlers are in. What do we have to do to trigger all of the events-handlers. [There is something else doing a &lt;code&gt;foreach event_handler in event_handlers&lt;/code&gt;]&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-11-04T09:02:26.587" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3923" PostTypeId="1" CreationDate="2017-11-04T16:09:42.583" Score="8" ViewCount="254" Body="&lt;p&gt;Lately I've come across Conway's Game of Life in a number of different arenas (articles, conferences, blogs, etc.). Last night I coded it up in C and was utterly mesmerized watching it. That being said, I'm trying to come up with one or two precise, concrete, &lt;em&gt;engaging&lt;/em&gt; concepts I can use it for in the classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It comes up in my course (CS50 AP) as part of &lt;a href=&quot;https://ap.cs50.net/curriculum/3/simulation/&quot; rel=&quot;noreferrer&quot;&gt;a lesson on simulations&lt;/a&gt;. The objectives from the AP Computer Science Principles curriculum are as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;LO 2.3.1&lt;/strong&gt;: Use models and simulations to represent phenomena.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;LO 2.3.2&lt;/strong&gt;: Use models and simulations to formulate, refine, and test hypotheses.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is clear to me that the Game of Life works for reaching both of those objectives, but I get a sense that I'm missing something more that I could use it for. Keep in mind that these students are relatively new to computer science and programming as high school students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, what is the pedagogical value of Conway's Game of Life for a high school CS course?&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2017-11-07T22:42:31.240" Title="What is the pedagogical value of Conway's Game of Life?" Tags="|ap-cs-principles|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3924" PostTypeId="2" ParentId="3923" CreationDate="2017-11-05T03:05:09.943" Score="2" Body="&lt;p&gt;I'm not sure that AP CS Principles has a lot of direct relation to Conway's Game of Life, but nevertheless there is real value in introducing it, and it ultimately features pretty prominently in my program.  First off, as you pointed out, it is plenty of fun to watch, so you can spend some time creating glider guns and exploders.  You can ask the students to see if they can think up patterns that stay completely still (such as the 2x2 box), or patterns that flip back and forth (such as the line of 3).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, of course, the system's really interesting properties are at higher levels.  It serves as a good introduction to the mathematicians Conway (who simplified it to its current state) and Von Neumann (who originally designed the concept), both luminaries of our field.  And most importantly, Conway's Game of Life is a great illustration of emergent complexity, and is also provably Turing Complete.  &lt;a href=&quot;https://www.youtube.com/watch?v=My8AsV7bA94&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a video of a Turing Machine being run in GoL, and &lt;a href=&quot;https://www.youtube.com/watch?v=vGWGeund3eA&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; is a video of GoL simulating logic gates.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in my own classes, I use it in AP Computer Science. It's a &lt;strong&gt;great&lt;/strong&gt; lab for arrays of arrays in APCS (not sure about Principles), and if you are to continue on into computability theory in a later course, letting kids play with it in the earlier class sets up this totally beautiful hook for a really big, &lt;em&gt;&quot;oh, cool!&quot;&lt;/em&gt; moment later on when you show them that GoL is Turing Complete.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-11-05T04:41:17.870" LastActivityDate="2017-11-05T04:41:17.870" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3925" PostTypeId="1" AcceptedAnswerId="3928" CreationDate="2017-11-05T03:46:16.727" Score="4" ViewCount="583" Body="&lt;p&gt;I'm a computer engineering student. I definitely have my strengths and weaknesses like any other student. And, I would like to improve upon areas that I'm either struggling in or completely missed in my fundamental intro courses.&lt;/p&gt;&#xA;&lt;p&gt;This year I realized that there are few gaps in my knowledge specifically when it comes to programming. I understand most concepts, but sometimes I notice that I can't implement some concepts into code on my own.&lt;/p&gt;&#xA;&lt;p&gt;This is due to gaps in my knowledge. There were couple times when teachers in my intro programming classes didn't have time to cover all the fundamental materials so they skipped content. I didn't realize how big of a problem this is, until now, when I'm in higher classes.&lt;/p&gt;&#xA;&lt;p&gt;I'm still doing fine, but I'm scared this will grow into a bigger problem. I frankly have so much homework and studies and I can't dedicate time to go and start from zero again, especially because I know most things but missed on few important concepts. The problem is, I'm not exactly sure what all the concepts that I missed on are.&lt;/p&gt;&#xA;&lt;p&gt;How can I fill the gaps in my knowledge in timely and efficient way? I would like to take your advice and study old content during winter break.&lt;/p&gt;&#xA;&lt;p&gt;I learn better by practicing problems and reading books, and I don't learn well from coding websites. Are there any work books that I can buy and practice with, preferably workbooks that cover solutions so I can compare my answers?&lt;/p&gt;&#xA;&lt;p&gt;In particular, I have troubles converting algorithms from the textbook to source code in C++ and Java. Sometimes I struggle in implementing data structures such as queues/and stacks into C/C++ or java. I understand iterative programming, and I need to improve my understanding of recursive and dynamic programming techniques.&lt;/p&gt;&#xA;" OwnerUserId="3438" LastEditorUserId="-1" LastEditDate="2022-09-22T15:56:38.570" LastActivityDate="2022-09-22T15:56:38.570" Title="Computer Engineering student with holes in my knowledge (I want to improve)" Tags="|best-practice|resource-request|self-learning|struggling-students|" AnswerCount="1" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="3926" PostTypeId="1" CreationDate="2017-11-05T15:38:38.160" Score="2" ViewCount="140" Body="&lt;p&gt;The class I teach (a class whose teacher I assist&lt;sup&gt;1&lt;/sup&gt;, to be precise) is learning intermediate Java this year (data structures, basic OOP and a few lessons about how Java actually works).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few of the students have some familiarity with C and it would seem as though this makes some points or subjects difficult for them to understand (such as preprocessor, explicit pointers etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This raises the issue of helping these students overcome the differences between a C mindset and a Java one. It was proven time and again that simply saying &quot;That's just how Java works&quot; is not enough (and frankly not very helpful).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm looking for explanations (or analogies or examples) that might help students see the differences between the two mindsets in a clearer way.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which points must be present in such an analogy, to properly show the main differences between the two?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; I'm a teacher assistant in a high school.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-11-06T21:47:13.727" Title="Teaching intermediate Java to students familiar with C" Tags="|teaching-analogy|java|c|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3927" PostTypeId="2" ParentId="3926" CreationDate="2017-11-05T21:21:40.920" Score="2" Body="&lt;p&gt;I don't actually think it is necessary to show the differences (or the similarities). Treat Java as a new thing rather than trying to connect the new thing to the old (for these students only). Instead teach Java as a stand alone complete language. My preference would be to teach it from a high level rather than a low level, stressing abstractions via classes and (for you) the interfaces defining the data structures. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no reason in a Java course to discuss pointers or the preprocessor. Objects are &quot;referred to&quot; by reference variables, not &quot;pointed to&quot; by pointers. Learn and use the Java vocabulary for things. Once sends a message to an object, not &quot;calls&quot; a method. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this way, your C students have a leg up on syntax, and the places where the &quot;look of the language&quot; helps them without getting into, likely only partially correct, analogies that may confuse them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Work on the big ideas, encapsulation, abstraction, information management (hiding), polymorphism, etc, not the (possible, but likely not completely correct) explanation of the implementation. Treat a variable as a reference, not a &quot;box&quot;. An object is a thing. The thing responds to messages, just like people do. Use Java analogies, not C based or assembly based analogies. There is no need of the higher to lower mapping. It will confuse some of your students. It buys you nothing. It may be the way you learned, but it is not optimal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of a compiler for a high level language is to make it unnecessary to consider the mapping to the machine. Too many people forget that and try to teach as if that mapping is essential to understand to use the language. For them, computing is always and only about moving bits. They have learned nothing since 1955. Learn the language, learn the abstractions. Fly, don't crawl. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-05T21:21:40.920" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3928" PostTypeId="2" ParentId="3925" CreationDate="2017-11-05T21:33:52.350" Score="2" Body="&lt;p&gt;The obvious answer is to get a good textbook on Java data structures. Some are better than others and a few will mislead you. I find &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0136078583&quot; rel=&quot;nofollow noreferrer&quot;&gt;John Lewis&lt;/a&gt; to be trustworthy (and inexpensive as well).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you are probably missing is the notion of encapsulation of things in classes and specification by interfaces, both essential to Java and specifically to your quest on algorithms. Some understanding of generics will also help you progress, but that is secondary to encapsulation and the idea of separating interface from implementation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are more advanced books on Algorithms, but the grounding, first, in building data structures and reaching the point where you can understand the java.util library is your current optimal path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest using Java first, rather than C++ as it has fewer traps for the unwary. Java is built at a somewhat more abstract level than C++ and so provides a better way to think about higher level concepts. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-05T21:33:52.350" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3929" PostTypeId="2" ParentId="3869" CreationDate="2017-11-05T22:44:44.520" Score="1" Body="&lt;p&gt;Using models is a great thing if done right. I know many will not like this, but i thought the video made the concept more complicated than easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't believe using models to just replace a drawing has that much of a value. Actually i may cause it to become even harder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a concept like linked list I'd use a physical toy train where you have the locomotive as the head pointer (hence different that the rest and has only one coupling). Then for LL functions, I ask the students to describe the process of hooking up the carts (trucks?) to the train without losing the rest of the train behind. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use legos for concepts like introducing recursion. I stack a set of leg pieces (equal to number of students or less) and tell them we want to know how many pieces are in this tower provided that you don't know how to count to higher numbers (we pretend to be 3 years old, we only know how to add 1 to any number). So, all what you know is to add one to any number. So, I pass the Lego tower to the students. Each student would take one piece and ask his neighbor to let him know how many are there in the rest of the tower.  you can see where this is going. &lt;/p&gt;&#xA;" OwnerUserId="3417" LastEditorUserId="3417" LastEditDate="2017-11-06T05:20:37.290" LastActivityDate="2017-11-06T05:20:37.290" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3930" PostTypeId="2" ParentId="3920" CreationDate="2017-11-06T00:57:28.080" Score="3" Body="&lt;p&gt;It seems to me that you have a good process going, encouraging students to participate and give their ideas. Of course, they are students, so their explanations and insights are likely to be incomplete, even flawed. However, encouraging them is still a good thing and their attempts to put two things together will lead to better thinking as long as you monitor it and intervene as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your desire to not &quot;shut them down&quot; or discourage them is also to be commended. You do need, of course, to put them on the proper path. So such student comments, like most student contributions, should be treated as an opportunity to go deeper. You can acknowledge the validity of the student's analogy (partial validity) and still suggest that the student also describe how and where the analogy fails. In fact, no analogy is perfect: &lt;em&gt;A is &quot;something like&quot; B&lt;/em&gt; is a good way to think about an analogy, not &lt;em&gt;A is &quot;just like&quot; B&lt;/em&gt;. In fact &lt;em&gt;A is &quot;also unlike&quot; B&lt;/em&gt; is nearly always worth exploring, even for strong analogies. For example, in Java, an object is something like a dog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hmmmm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, a dog responds to messages as does a Java object. But I never met a java object that liked to be scratched behind the ears. In fact, the difference is also instructive. Dogs are only somewhat &quot;encapsulated&quot; and solely in control of themselves.  You &lt;em&gt;can&lt;/em&gt; break that encapsulation with physical force, dragging the dog along by its collar (not a nice thing to do, though). But a properly encapsulated Java object is immune from such things, though you can, of course, re-program the system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't claim my simple example above is definitive, but it was only an attempt to quickly come up with a way to move the conversation in a productive direction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some analogies are better than others. But every student contribution is an opportunity for exploration.   &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-06T00:57:28.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3931" PostTypeId="1" AcceptedAnswerId="3935" CreationDate="2017-11-06T08:19:16.413" Score="-1" ViewCount="230" Body="&lt;p&gt;I am a student of B.Tech CSE and have an option to choose any one of the subjects in the next semester. Below are the options:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enterprise Java  &lt;/li&gt;&#xA;&lt;li&gt;Digital Image Processing  &lt;/li&gt;&#xA;&lt;li&gt;Compiler Design&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I want to settle with something which can be useful to learn while at the same time not put so much burden as to mess up my results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this forum contains excellent teachers in the academic field which will guide me and choose the best possible option for me. &lt;/p&gt;&#xA;" OwnerUserId="3447" LastEditorUserId="3447" LastEditDate="2017-11-06T14:47:04.503" LastActivityDate="2017-11-19T22:47:36.150" Title="Help in choosing elective subject" Tags="|java|image-processing|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3932" PostTypeId="2" ParentId="3926" CreationDate="2017-11-06T10:44:05.203" Score="1" Body="&lt;p&gt;I agree wholeheartedly with @buffy. However there are some things that could be of use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain that C is a bottom up language, that its philosophy starts at the machine. Java is, to some extent, a top down language. Its philosophy starts at the human.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have worked with students that show me their code, and it is covered with &lt;code&gt;static&lt;/code&gt;. They tell me that they have tried to remove the &lt;code&gt;static&lt;/code&gt;s but get errors. (This is because a static method can not use non-static methods/data.) This traps them in the non-OO world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore write the OO bootstrap code for them. Start with OO, don't do anything that is not OO (except the OO bootstrap).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public static void main (String [ ] args) {&#xA;    new Program().run(args);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The following would especially confuse those that have not done C, so don't tell the whole class.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java has no pre-processor.&lt;/li&gt;&#xA;&lt;li&gt;Java references are like C pointers, but can only point to a valid object or null. see also &lt;a href=&quot;https://ctrlaltdelor.wordpress.com/2009/08/10/types-of-reference/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://ctrlaltdelor.wordpress.com/2009/08/10/types-of-reference/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Java has this extra stuff, to support object orientation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="27" LastEditDate="2017-11-06T19:51:04.813" LastActivityDate="2017-11-06T19:51:04.813" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3933" PostTypeId="1" AcceptedAnswerId="6063" CreationDate="2017-11-06T10:53:31.853" Score="4" ViewCount="289" Body="&lt;p&gt;I am lecturing on gender and computer science and have found plenty of material outlining factors that impact female access to computer science courses.  I stumbled across this paper: &lt;a href=&quot;https://dl.acm.org/citation.cfm?id=2920173&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dl.acm.org/citation.cfm?id=2920173&lt;/a&gt; which shows significant attainment differences at the highest degree level in UK universities. This raises questions about male focused course material and assessment methodologies. I wondered if there were many other papers on gender and attainment in CS? Google scholar has lots of generic studies, but few focused on CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attainment here could be at any level, including compulsory education and work based assessments&lt;/p&gt;&#xA;" OwnerUserId="48" LastEditorUserId="48" LastEditDate="2020-01-07T11:05:23.530" LastActivityDate="2020-01-07T11:05:23.530" Title="Research on gender and attainment in CS" Tags="|resource-request|attainment|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3934" PostTypeId="1" AcceptedAnswerId="4686" CreationDate="2017-11-06T14:32:42.913" Score="4" ViewCount="193" Body="&lt;p&gt;My university wants to develop an assessment procedure in order to evaluate the general (not for a specific topic or course) skills on computational thinking and programming languages of our students when finishing their degree. I am aware of code repositories containing programming challenges, such as &lt;a href=&quot;https://icpc.baylor.edu/welcome.icpc&quot; rel=&quot;noreferrer&quot;&gt;ACM International Collegiate Programming Contest&lt;/a&gt; or &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Euler&lt;/a&gt;, that may be used for the assessment, but I was wondering if initiatives exist to define a common framework to assess these skills for computer science students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking on something similar to the worldwide &lt;a href=&quot;http://www.oecd.org/pisa/&quot; rel=&quot;noreferrer&quot;&gt;PISA&lt;/a&gt; study (which evaluates performance on mathematics, science and reading by 15-year-old students) but adapted to the context of computer science (in particular computational thinking and programming skills). Are there any attempts to have this kind of standardised assessments?&lt;/p&gt;&#xA;" OwnerUserId="3451" LastEditorUserId="150" LastEditDate="2017-11-06T18:21:33.323" LastActivityDate="2018-04-30T21:38:35.663" Title="Equivalent of PISA study for standardised assessment of skills on computational thinking and programming?" Tags="|assessment|computational-thinking|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3935" PostTypeId="2" ParentId="3931" CreationDate="2017-11-06T21:01:15.083" Score="0" Body="&lt;p&gt;It depends on your goals:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to just &quot;get by&quot;, take the easiest one. That is probably the one you already know the most about already. Safe. Boring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to &quot;become as smart as possible&quot;, take the hardest one. Unsafe. Live on the edge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to just get employed in the future, take the most practical one. Hmmm. Looks good on the resume. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If  you yearn for (yet) higher education, take the most theoretical one. The admissions committee will love it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they all seem about the same, roll a die. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to get lost in the crowd, take the most popular one. No one will notice me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want some individual attention and a relationship with the faculty, take the least popular one. The prof will be able to help me understand things. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You could ask advice from one or more of the instructors, explaining to them your long term goals and seeing how the course contributes to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any of these three courses could be hard or easy, theoretical or not, depending on the teacher and institution, so I won't make more specific suggestions. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Whichever you choose, work hard, think deep, live long, prosper. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If anyone thinks this is snarky or intended to be humorous, I'd suggest you reconsider. At many points in my life I specifically chose the harder path and have never regretted it. At other times I just went along with the flow and was sorry. But choosing according to my goals turned out to be pretty optimal.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-19T22:47:36.150" LastActivityDate="2017-11-19T22:47:36.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3937" PostTypeId="2" ParentId="3934" CreationDate="2017-11-07T13:00:50.230" Score="0" Body="&lt;p&gt;You can try &lt;a href=&quot;https://www.codility.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codility&lt;/a&gt; or &lt;a href=&quot;https://www.codechef.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code Chef&lt;/a&gt;. I am not sure if this is what you are looking for, but both are good for competitive assessment of programmers.&lt;/p&gt;&#xA;" OwnerUserId="951" LastEditorUserId="58" LastEditDate="2017-12-13T01:17:33.790" LastActivityDate="2017-12-13T01:17:33.790" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3938" PostTypeId="2" ParentId="3881" CreationDate="2017-11-07T15:37:59.127" Score="3" Body="&lt;p&gt;I was a CS student for several years and therefore a programming student for several years. In many different classes/groups that I was in there were always the ones who could program and the ones who just didn't get it. I believe that some people have a knack for some things and some people don't. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things like music or drawing or math or programming logic/algorithms, etc. I tried to teach some people and no matter what I did they couldn't do even the most basic programs. Of course you can eventually teach people things, some one with a lot of learning and practice can get good at drawing but it's unlikely they'll do it as good as someone who already has a natural knack for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is weird when you can see it all clearly in your head, the loop, the values that $i takes, the calculations, how the array is formed and the other person doesn't get it even when you write it down and show it to them. But this is normal, it's the way we are. Sure this person can make the effort, learn but they will never &quot;get it&quot;. They'll always need extra time, resources and testing or they can study CS and focus on other things like I don't know networking, modules, database design, etc.&lt;/p&gt;&#xA;" OwnerUserId="3463" LastActivityDate="2017-11-07T15:37:59.127" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3939" PostTypeId="1" CreationDate="2017-11-07T16:32:44.000" Score="3" ViewCount="167" Body="&lt;p&gt;An important issue in programming is &lt;strong&gt;the Object-Relational Mismatch&lt;/strong&gt;, but I have not seen any good explanations that use familiar terms. I came up with one involving a Family Tree application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to store data rows that include name information and foreign keys to both parents and a spouse. (Can also store useful info like birth date, birthplace, gender and so on.) This table would obviously contain reflexive relations (self-joins) on these three foreign keys. No information about the relationships such as brother, nephew, grandparent and so on can or should be stored in this table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The application would pull in all of this data in to a tree structure, and based on who is selected as the focus person (&quot;me&quot; in the tree), all of the relationship titles can be 'computed' and displayed. They are me-centric and so are not part of the data, only part of who is centered in the display.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This example points out the many and very vivid differences between a data storage method and an Object-Oriented view of data:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the data rows simply have links to parents and a spouse  &lt;/li&gt;&#xA;&lt;li&gt;data rows cannot contain any relationship titles (brother, etc.)&lt;/li&gt;&#xA;&lt;li&gt;the display can show all of the titles relative to who is &quot;me&quot;  &lt;/li&gt;&#xA;&lt;li&gt;changing the &quot;me&quot; pointer in the display relabels all the relationships  &lt;/li&gt;&#xA;&lt;li&gt;all relationships of any generation previous and successive can label themselves in the display  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This shows the differences between data in a database and objects at run-time very clearly. I have not seen this example given anywhere else. Does it explain the &quot;Object-Relational Mismatch&quot; in a useful way?&lt;/p&gt;&#xA;" OwnerUserId="3464" LastActivityDate="2020-01-07T21:27:02.563" Title="Clear example of the Object-Relational Mismatch" Tags="|teaching-analogy|object-oriented-paradigm|databases|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3940" PostTypeId="2" ParentId="3939" CreationDate="2017-11-07T17:08:59.313" Score="1" Body="&lt;p&gt;I'm not seeing an explanation of object-relational mismatch there for two reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What are the objects? You've sketched a database table definition and a visualisation, but I don't see a sketch of the application program's structures.&lt;/li&gt;&#xA;&lt;li&gt;As far as I can see, all of the additional information in the visualisation can be made available in a purely relational database view. I've done this kind of hierarchy visualisation with CTEs.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2017-11-07T17:08:59.313" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3941" PostTypeId="2" ParentId="3939" CreationDate="2017-11-07T18:49:36.097" Score="0" Body="&lt;p&gt;To @Peter Taylor: &quot;Not So&quot;. In the example, the objects are people, and each person can have two parents and a spouse. So, that is one reason why a CTE will not solve this problem directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the other reason, please refer to this article: &lt;a href=&quot;https://www.fusionbox.com/blog/detail/graph-algorithms-in-a-database-recursive-ctes-and-topological-sort-with-postgres/620/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Graph Algorithms in a Database: Recursive CTEs and Topological Sort with Postgres&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which says near the end:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Warning: Here Be Dragons   Although topologically sorting a generic&#xA;  graph using SQL is a fun challenge, for anything other than small&#xA;  graphs this method would be a bad idea in real code. Why?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Well, our method computes the topological sort by traversing every&#xA;  possible path in the graph that leads from a node with no parents to a&#xA;  node with no children. In the worst case, for dense graphs that have&#xA;  close to the maximum number of edges, the number of paths will be&#xA;  exponential in the number of vertices! (Specifically, O(2^V), assuming&#xA;  no cycles.) Clearly, this isn't going to scale well.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;In contrast, implemented in procedural code, topological sort runs in&#xA;  O(V + E) time, where V is the number of vertices and E the number of&#xA;  edges. (Check out Kahn's algorithm, which is my favorite way of doing&#xA;  it.) Worst case, for dense graphs, i.e. E = O(V^2), it will run in&#xA;  O(V^2) in the number of vertices V.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;So in fact, unless our graphs were always very small, we'd be much&#xA;  better off doing the topological sort outside the database for a&#xA;  generic graph. The tree example is not exponential and would be safe&#xA;  to use in real code, although I certainly don't guarantee it will&#xA;  perform well when the trees get very large.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Maybe there's a non-exponential SQL query for topological sort, but if&#xA;  so, I haven't been able to find it yet. Either way, the final point&#xA;  stands: it's possible to be too clever. Just because you can compute&#xA;  anything in SQL doesn't mean you necessarily should.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think that the application should move all the rows in to a collection of objects, forging the three possible links as it goes and making the links run both directions. This will only work in the program, not in the SQL query.&lt;/p&gt;&#xA;" OwnerUserId="3465" LastEditorUserId="58" LastEditDate="2017-12-13T01:16:54.740" LastActivityDate="2017-12-13T01:16:54.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3942" PostTypeId="2" ParentId="3939" CreationDate="2017-11-07T19:24:32.103" Score="1" Body="&lt;p&gt;This isn't an example, but rather an explanation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is how I think about this issue. In the early days of computing, machine language and assembly language, the &lt;em&gt;meaning&lt;/em&gt; of the program and its constructs were almost entirely in the heads of programmers. The program &lt;em&gt;meant&lt;/em&gt; what the user &lt;em&gt;thought&lt;/em&gt; it meant and the output (bunch of numbers) was interpreted accordingly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With each programming language advance more and more of the meaning (the semantics) of the program was captured by the language itself, which, among other things made it possible for one programmer to read and &lt;em&gt;understand&lt;/em&gt; another's work. Procedures (with appropriate names) and functions were a big advance. It is why you are always encouraged (required in the workplace, of course) to use &lt;em&gt;intention revealing names&lt;/em&gt; for even simple things. It is also why the Obfuscated C contest is such &quot;fun.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Object Oriented languages take the inclusion of semantics in the program to a new level. A class encapsulates an &lt;em&gt;idea&lt;/em&gt; and it uses several names to convey that idea. You should be able to understand a class and its behavior by knowing a few public names with brief descriptions of their intent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An OODatabase contains Objects and so the semantics of the application as a whole are captured in those stored objects. You can think of an OODatabase as &lt;em&gt;optimized for semantics&lt;/em&gt;, for meaning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Relational Database, however, which is a set of tables, with operations on tables, captures the semantics of &lt;em&gt;tables&lt;/em&gt; not the semantics of the concepts intended by the data stored in the tables. You can, of course, capture some of it by building tables for the data that might constitute the implementation of an object. Somewhat possible, but harder, to capture the operations (in modern Relational Databases). However, the relational database is optimized for speed of retrieval and creation of new tables, as well as for the minimization of redundancy. In order to do that, the tables in, say, SQL are Normalized, which breaks them into parts. Thus what you put together to try to capture the semantics of an object are broken up for optimization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, once again, the semantics of the application or system in SQL is captured outside the database in the applications that save, retrieve, and use the data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;SQL databases are normally fantastically efficient. OODatabases less so. On the other hand, one captures the &lt;em&gt;meaning&lt;/em&gt; while the other doesn't (and can't if optimization is to be achieved). With an SQL database, the user/programmer thinks about the tables. In an OODatabase he/she thinks about the concepts captured in the objects. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-07T19:24:32.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3943" PostTypeId="2" ParentId="3923" CreationDate="2017-11-07T19:25:24.297" Score="1" Body="&lt;p&gt;I would use it as an introduction / teaser about Finite Element Analysis.  FEA is commonly used to simulate air / water flow in / around various shapes.  Like GoL, the math for each cell is fairly straightforward but the resulting behaviors observed are much more complex.  FEA is also used to map / model wave propagation through various fluids. On a more coarse-grained level, this can simulate traffic jams in heavy traffic; one person taps their brakes in fast-moving, high-density traffic and you end up with a traffic jam, even if there are no accidents.  This might be something you could simulate on a classroom computer using cellular automata similar, but not identical, to GoL.&lt;/p&gt;&#xA;" OwnerUserId="948" LastActivityDate="2017-11-07T19:25:24.297" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3944" PostTypeId="2" ParentId="3923" CreationDate="2017-11-07T22:42:31.240" Score="2" Body="&lt;p&gt;I really like &lt;a href=&quot;https://cseducators.stackexchange.com/a/3924/2068&quot;&gt;Ben's answer&lt;/a&gt;, but I wanted to add my two cents:&lt;/p&gt;&#xA;&lt;p&gt;Like Ben and others have mentioned, Conway's Game of Life provides a &amp;quot;wow&amp;quot; factor that's useful in and of itself. It's simple to understand, and easily leads to pretty patterns and cool animations. This inspires students to want to play around with the code, which by itself is pretty valuable.&lt;/p&gt;&#xA;&lt;p&gt;On top of that, it leads to some pretty interesting more advanced topics, such as:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Emergence&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;From &lt;a href=&quot;https://en.wikipedia.org/wiki/Emergence&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In philosophy, systems theory, science, and art,  emergence is a phenomenon whereby larger entities arise through interactions among smaller or simpler entities such that the larger entities exhibit properties the smaller/simpler entities do not exhibit.&lt;/p&gt;&#xA;&lt;p&gt;Emergence plays a central role in theories of integrative levels and of complex systems. For instance, the phenomenon of life as studied in biology is an emergent property of chemistry, and psychological phenomena emerge from the neurobiological phenomena of living things.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Imho, emergence is one of the coolest things about computer science.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Swarm Behavior&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;From emergence, you also get to talk about &lt;a href=&quot;https://en.wikipedia.org/wiki/Swarm_behaviour&quot; rel=&quot;nofollow noreferrer&quot;&gt;swarm behavior&lt;/a&gt;, including programs like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Boids&quot; rel=&quot;nofollow noreferrer&quot;&gt;Boids&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ant colony optimization algorithms&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Swarm_intelligence&quot; rel=&quot;nofollow noreferrer&quot;&gt;Swarm intelligence&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Particle_swarm_optimization&quot; rel=&quot;nofollow noreferrer&quot;&gt;Particle swarm optimization&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_bee_colony_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Artificial bee colony algorithm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The list goes on, and the related articles at the bottom of all of the above are a vertiable black hole of fascinating stuff.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Artificial Life&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;From &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_life&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Artificial life (often abbreviated ALife or A-Life) is a field of study wherein researchers examine systems related to natural life, its processes, and its evolution, through the use of simulations with computer models, robotics, and biochemistry.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;From here you can talk about artificial intelligence, neural networks, machine learning, etc.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Cellular Automaton&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Game of Life is just one example of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cellular_automaton&quot; rel=&quot;nofollow noreferrer&quot;&gt;cellular automaton&lt;/a&gt;. There are a ton of other examples.&lt;/p&gt;&#xA;&lt;p&gt;You could use a &lt;a href=&quot;https://en.wikipedia.org/wiki/Elementary_cellular_automaton&quot; rel=&quot;nofollow noreferrer&quot;&gt;1D cellular automaton&lt;/a&gt; to introduce the concept to less experienced students.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Simulations&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The game of life (and other cellular automata) also has practical applications, such as being used in simulations of bacteria, epidemic / disease outbreak, and forest fires.&lt;/p&gt;&#xA;&lt;p&gt;Do a search for &amp;quot;cellular automata forest fires&amp;quot; or &amp;quot;cellular automata disease modelling&amp;quot; for a ton of results.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-07T22:42:31.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3947" PostTypeId="2" ParentId="3218" CreationDate="2017-11-08T21:51:55.313" Score="2" Body="&lt;p&gt;Have you considered submitting your teaching materials (lesson plans, homework assignments, etc) to open-source teaching initiatives? This helps less experienced teachers, as well as experienced teachers who don't have a CS background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search for &quot;open source teaching materials&quot; for a ton of results, including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://csforallteachers.org/blog/open-source-teaching&quot; rel=&quot;nofollow noreferrer&quot;&gt;Open Source Teaching&lt;/a&gt;: This blog post lists a bunch of resources. This is meant for teachers looking for material, but you can use this to find places that are accepting materials as well.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://opensource.com/education/13/4/guide-open-source-education&quot; rel=&quot;nofollow noreferrer&quot;&gt;Open Source Education&lt;/a&gt;: Another list of open source teaching resources.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://opensource.com/resources/what-open-education&quot; rel=&quot;nofollow noreferrer&quot;&gt;What is open education?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.oercommons.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OER Commons&lt;/a&gt;: OER Commons is a public digital library of open educational resources. Explore, create, and collaborate with educators around the world to improve curriculum.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://code.org/educate/curriculum/3rd-party&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code.org&lt;/a&gt;: List of 3rd party educator resources. Scroll all the way to the bottom to read about submitting your own material.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You could also try searching for something more specific like &quot;open source java teaching materials&quot; if you have Java material.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-11-08T21:51:55.313" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="3948" PostTypeId="1" CreationDate="2017-11-09T06:02:12.833" Score="10" ViewCount="176" Body="&lt;p&gt;I'm currently helping teach a unit about languages as a part of a discrete math course -- we're currently focusing on regular expressions, NFAs, DFAs, CFGs, grammars, and the like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the skills we'd like students to be able to acquire is the ability to translate English into equivalent regular expressions -- e.g. translate phrases like &quot;match all strings containing an even number of the character 'a'&quot; or &quot;match all binary strings that do not contain the string '1001'&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students seem to easily pick up the &quot;knack&quot; of performing these sorts of translations, but many more of them seem to struggle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I'm not sure how to best help these students. Constructing regular expressions isn't usually something I find particularly difficult, so I've been finding it difficult to &quot;get into the mindset&quot; of the students who find writing regular expressions to be less obvious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've spent some time introspecting and trying to pick apart what strategies I subconsciously tend to use when faced with a new problem, but that's mostly yielded a list of ad-hoc strategies rather then anything fundamental.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Something I feel I should note is that I don't think unfamiliarity with syntax is likely to be the culprit. We're starting by studying specifically regular expressions (not regex) and have restricted ourselves to using a very minimal toolset: union, concatenation, the Kleene star, and epsilons -- so, no backreferences, no captures, nothing like that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather, it seems what students find most difficult is the inherent act of interpreting and translating an English sentence and formalizing it into some logical form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen this same sort difficulty of manifest appear in other scenarios: for example, earlier this quarter, we asked students to translate English into propositional or predicate logic: I also found it difficult to teach students how to do this in any kind of systematic way. As another example, in other courses, I've observed many students find it challenging to translate English into SQL queries (and here I have some more sympathy, since I also find constructing certain kinds of SQL queries to be challenging).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best I've been able to do so far is just have students do a bunch of practice/walk through a bunch of examples, but that doesn't strike me as being a particularly efficient strategy (though I don't dispute that practice is essential).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This brings me to the core of my question: &lt;strong&gt;How can I more effectively help students master the meta-skill of &quot;translation&quot;/&quot;formalization&quot;?&lt;/strong&gt; I'd welcome both answers focusing on strategies for helping students more effectively construct regular expressions as well as answers focusing on helping students acquire this meta-skill in a more general sense. Answers that can give me more nuanced insight what sorts of things students find difficult about these types of problems would also be welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: somebody asked a similar question to this one about &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3132/effective-ways-of-teaching-regex-to-students-who-know-java&quot;&gt;helping students who are familiar with Java learn regex&lt;/a&gt;. However, that question seems to focus more on how to best teach the nuts and bolts of regex-the-language; my question is more about how to teach the meta-skill of &quot;translation/formalization&quot;.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2017-11-09T07:28:12.960" LastActivityDate="2017-11-09T22:26:26.790" Title="Teaching students how to construct regular expressions (and other &quot;translation&quot; style problems)" Tags="|lesson-ideas|regex|discrete-math|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3949" PostTypeId="2" ParentId="3948" CreationDate="2017-11-09T16:14:47.023" Score="3" Body="&lt;p&gt;This is the stuff of math teachers' nightmares. The problems here, from my experience teaching about grammars&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;, are two-fold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You said that syntax is probably not the culprit here. Students may be able to follow a grammar that has been presented to them, but may not be able to generate an appropriate grammar for a given series of test cases.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Students may not be able to generate appropriate test cases from the word problem itself.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The good news is that, by breaking it down into these two steps instead of one, you can actually help to isolate the problem that your students are having.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you see your students frequently (as I do), here's a fix-up strategy that you can do in about 30 minutes of class time over three days.  Create a worksheet with a series of word problems, and ask the students, as homework, to generate test cases for these hypothetical machines.  They are &lt;em&gt;not&lt;/em&gt; to create the grammars themselves, only create a series of test cases that should be accepted or not accepted.  Emphasize that redundancy is not a goal; you want a minimal set of test cases that could guarantee that some grammar is entirely correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next day, spend about 15 minutes going over two of the problems, round-robin style, at the board.  Ask a student to write a test case for the first problem. Turn to the second student, and ask them to write another test on the board that could potentially uncover new ground.  On to the third student, fourth student, etc., until you are satisfied that you have a good testing set.  Ask if anyone else has any important tests remaining.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do the same for the second problem, and then discuss the importance (in general) of creating good test sets upon encountering a word problem.  Point out that they will receive word problems on their assessment at the end of the unit, and you expect them to be able to figure out a good set of test cases with which to design a grammar at that time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their homework for that second day is to fix up their tests (if they need more work), and to create the appropriate grammars.  I suspect that when you get this homework back on day 3, you'll have much stronger results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - I am using &quot;grammar&quot; as a stand in for &quot;grammars, regexes, FSAs, or whatever type of expression/machine you are trying to get them to create at some particular moment.&quot;&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-11-09T16:14:47.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3950" PostTypeId="2" ParentId="3948" CreationDate="2017-11-09T22:26:26.790" Score="1" Body="&lt;p&gt;This suggestion is, I'm afraid, highly speculative and untried. But I'd be tempted at least to give out an assignment of the following form, perhaps using a structure like that suggested by @BenI. here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prepare a numbered list of exercises from quite simple (in your estimation) to quite complex. The numbers correlate directly to the difficulty. Tell the students that they can do any number of them (say at least three) that they wish and that the grade will depend only on the most difficult one they get correct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The justification for the structure is that the students who get these easy will just work on a few of the harder ones and the ones that struggle will start farther down your list and work until they feel a bit confident. The students who need the most work will, hopefully, get the most practice. The rating by difficulty can also help them get &quot;into the flow.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the exercises I'd also stress a variety of vocabulary for things so that they get some practice in matching human language to the technical forms. You could even try to state each exercise two different ways to help students with the correlations, but you need to be careful that your explanations of the requirements really are equivalent. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-09T22:26:26.790" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3951" PostTypeId="1" AcceptedAnswerId="5389" CreationDate="2017-11-09T22:28:22.780" Score="5" ViewCount="192" Body="&lt;p&gt;Michael0x2a's &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3948/teaching-students-how-to-construct-regular-expressions-and-other-translation&quot;&gt;recent question&lt;/a&gt; reminded me of a problem I've had teaching about Nondeterministic Finite Automata in the past.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can get my students quite comfortable following and creating DFAs, but when I show them NFAs, they learn to follow without learning to create.  They rarely become comfortable enough with the toolset to make any significant use of it, and when given the chance on any problem, they virtually always restrict themselves to the DFA tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make $\epsilon$ transitions and multiple transitions from a single state on the same input character simple and clear enough that students will use the tools with the same fluency and freedom that they can with DFAs?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorDisplayName="user193" LastEditDate="2019-02-02T22:54:02.230" LastActivityDate="2019-02-03T14:28:21.973" Title="Teaching NFAs after DFAs" Tags="|regex|discrete-math|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="3952" PostTypeId="2" ParentId="3951" CreationDate="2017-11-10T00:57:30.353" Score="3" Body="&lt;p&gt;This isn't a particularly in-depth answer, but the course I'm currently TA-ing ultimately requires our students to build a regular expression engine (basically, a simplified grep clone).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, they need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Write a grammar to parse regular expression strings (so, they practice writing CFGs). We of course give them a parser/don't require them to write that part.&lt;/li&gt;&#xA;&lt;li&gt;Convert the resulting tree into NFAs.&lt;/li&gt;&#xA;&lt;li&gt;Minimize the NFAs into DFAs.&lt;/li&gt;&#xA;&lt;li&gt;Execute/match the input by traversing the DFAs.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;At that point, the students will (a) realize it's much easier to combine together arbitrary automata if we can liberally spam epsilons all over the place (and that combining DFAs is non-trivial) and so (b) realize they had better understand how NFAs work if they want to get their engine working. (Do or die, yeah?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more lightweight lesson idea might be to have students build automata that are very obviously combinations of other automata -- you could have them build each individual subcomponent and ask them to combine them or something to emphasize the usefulness of epsilons. The hope is that they'll start using NFAs more frequently once you emphasize the advantages they have over DFAs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other things that seem to help are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Walking through NFA transitions very slowly and carefully on a whiteboard, perhaps using magnets or sticky notes to show which state(s) we're currently &quot;located&quot; on.&lt;/li&gt;&#xA;&lt;li&gt;Showing students how to combine NFAs into DFAs/asking them walk through that algorithm on exercises.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="732" LastActivityDate="2017-11-10T00:57:30.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3953" PostTypeId="1" CreationDate="2017-11-11T15:59:17.467" Score="4" ViewCount="109" Body="&lt;p&gt;I am looking to start a career in CS (programming, software developing and eventually artificial intelligence) but don't have the economic means to attend university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am currently working on Harvard's CS50 online course (my first programming experience, too) and was wondering what other online courses are available to help me build a resume and help compensate for my lack of degree.&#xA;-- Is this a good way to start learning programming?&#xA;-- What are the pros and cons of self learning compared to learning in an established university program?&lt;/p&gt;&#xA;" OwnerUserId="3482" LastActivityDate="2017-11-13T21:28:17.723" Title="Online courses to form or improve a CS resume?" Tags="|self-learning|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3954" PostTypeId="2" ParentId="3920" CreationDate="2017-11-13T17:07:17.657" Score="6" Body="&lt;h2&gt;&lt;strong&gt;The concrete example&lt;/strong&gt;:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Your student is right. At least, I agree with him, because I think of event listeners in the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When multiple callers register for the same event, and the event triggers, it &quot;calls everyone back&quot;. Functionally, it's similar to how an array or list is processed, e.g. :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;foreach (var caller in callers)&#xA;{&#xA;    caller.Call();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The thing about abstract fields such as programming and mathematics is that &lt;strong&gt;people will find what works for them&lt;/strong&gt;. Not everyone sees it the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I may be biased because me and the student apparently see it the same way; but I'm actually having a hard time poking holes into his argument, without having to resort to fairly avanced event handling (and even then, the analogy sort of works).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Anecdotally:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A simple example for math applies to me. When considering the average of two numbers, most people think to themselves:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;average = (A + B) / 2;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, I instinctively used another pattern:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;average = A + (B-A)/2 &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note that A is always the smallest number.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This looks a lot more contrived. I agree. But &lt;strong&gt;to me personally&lt;/strong&gt;, it was easier to do it like that. I'm someone who uses &lt;a href=&quot;https://en.wikipedia.org/wiki/Number_form&quot; rel=&quot;noreferrer&quot;&gt;number forms&lt;/a&gt; to visualize numbers in my head, which means I do simple calculations &lt;em&gt;visually&lt;/em&gt; (sort of, it's hard to explain).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you ask me to calculate the average of 45 and 51, what I see in my head is:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;... 43 44 &lt;strong&gt;45&lt;/strong&gt; 46 47 48 49 50 &lt;strong&gt;51&lt;/strong&gt; 52 53 ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I take the numbers between the boundaries:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;46 47 48 49 50&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And I find the middle number.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;48&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you look back at &quot;my&quot; formula, maybe you'll see that the order of operations is the same as this visual example. Take the difference, split it in two, find what's in the middle.&lt;br&gt;&#xA;To me, it makes perfect sense, and I am considerably faster when calculating averages (of 2 numbers) this way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I reverted to using the more standard approach when math classes started requiring us to calculate the average of more than 2 numbers. But for finding the average of two numbers, I &lt;strong&gt;still&lt;/strong&gt; use my own method to this very day.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;How to respond:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Even though the student is correct (in his own way), if you simply agree with his stance, others may misunderstand him (because they e.g. think of arrays in a different way than the student who raised the analogy).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to approach it correctly, because you can't err on either side:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you tell the student he is wrong (for the sake of the other students), then he will be incredibly confused. I've been on the receiving end of this, and it took me some time to regain the confidence to use my own averaging method.&lt;/li&gt;&#xA;&lt;li&gt;If you tell the student he is right (for the sake of the student), then the other students may end up incredibly confused.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So when you respond, make it clear that &lt;em&gt;you understand what the student means&lt;/em&gt;, but it's not &lt;strong&gt;exactly&lt;/strong&gt; the same in every way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I see what you mean, and this &lt;em&gt;particular&lt;/em&gt; case does indeed behave similar to an &quot;array of listeners&quot;. But there are other cases where the analogy doesn't quite work, so be aware of that.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I can see where you're coming from. As you now understand it, there are indeed some similarities. However, once we delve into more advanced examples, you'll start to notice that it's not &lt;em&gt;quite&lt;/em&gt; the same. Try to not stick to the analogy because you'll end up expecting different behavior.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think this sticks to the middle of the road:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It confirms the student's basic interpretation of the code's behavior.&lt;/li&gt;&#xA;&lt;li&gt;It highlights that the analogy is not perfect and flawed when applied to other cases.&lt;/li&gt;&#xA;&lt;li&gt;Other students who have no idea what the student was talking about (because they understand it in a different way) will understand that the analogy is flawed and not generally usable, so they won't fixate on understanding why this analogy &lt;em&gt;sort of&lt;/em&gt; works and will instead be more likely to ignore it and move on.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are of course countless ways to respond, but you should always try to find a compromise that both confirms the student's vague suspicion, suggests that it only works in particular cases, and it avoids creating confusion for the other students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically for this example, my response would be:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Yes, even listeners can be considered as an &quot;array of listeners&quot; where you can add/remove listeners as you please. However, &quot;an array of something&quot; is an &lt;strong&gt;incredibly common&lt;/strong&gt; concept in programming. Whether it's getting data from a database (a table is an array of entries) or parsing a string (which is an array of characters), you'll find arrays and lists everywhere you look.&lt;br&gt;&#xA;  When we get to the more advanced part of the curriculum, almost everything will use an array-like approach at one point or another.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2017-11-13T17:07:17.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3955" PostTypeId="2" ParentId="3953" CreationDate="2017-11-13T21:28:17.723" Score="3" Body="&lt;p&gt;You've got a lot of really broad questions here, so it's going to be a little difficult to unpack them all. Consider only posting one specific question per post. Also note that the answer really depends on you more than anything, so a lot of this is hard for us to answer. But I'll offer my two cents:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;what other online courses are available to help me build a resume and help compensate for my lack of degree. -- Is this a good way to start learning programming?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is three different questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;What online courses are available?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are a ton of online courses, and which one you'd take depends on exactly what you want to be doing. Programming is a huge topic: there's web development, server-side development, database management, robotics, machine learning, system programming, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First figure out what you want to do. Then start searching for tutorials and online classes.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;How can I build a resume to compensate for a lack of a degree?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;List the projects you've worked on. Create an online portfolio showcasing the stuff you've actually done. Don't tell me what you know. Show me the projects you've completed that demonstrate what you know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep in mind that this won't happen overnight. You won't get to this point just by reading one book or breezing through one online tutorial. You have to spend some time working on a project.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Are online courses a good way to learn programming?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Like I mentioned above, whether they're a good way &lt;strong&gt;for you&lt;/strong&gt; to learn programming is more up to you than it is us. We can't tell you what's best for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will say that the only way to learn how to program is by programming, working through &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;the process&lt;/a&gt; of taking a big problem and breaking it down into smaller steps. Whether you get that practice from tutorials, or from an online course, or from a university, is up to you. The important part is putting in the work.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are the pros and cons of self learning compared to learning in an established university program?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think you probably already know these. A university program gives you access to teachers and peers, and provides a structured environment. Self-learning allows you to learn at your own pace, and it's much cheaper but harder to &quot;prove&quot; what you know.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-11-13T21:28:17.723" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3956" PostTypeId="1" AcceptedAnswerId="3960" CreationDate="2017-11-14T19:44:54.923" Score="3" ViewCount="99" Body="&lt;p&gt;I will soon be teaching a lesson on ROM, RAM, and virtual memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is with “virtual memory”: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the teaching resources correctly use the phrase virtual memory, and physical memory, and describe how virtual is mapped to physical via the memory management unit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/q8hHr.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/q8hHr.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt; from &lt;a href=&quot;https://en.wikipedia.org/wiki/Virtual_memory&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Virtual_memory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The computer's operating system, using a combination of hardware and software, maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory. Main storage, as seen by a process or task, appears as a contiguous address space or collection of contiguous segments. The operating system manages virtual address spaces and the assignment of real memory to virtual memory. Address translation hardware in the CPU, often referred to as a memory management unit or MMU, automatically translates virtual addresses to physical addresses. Software within the operating system may extend these capabilities to provide a virtual address space that can exceed the capacity of real memory and thus reference more memory than is physically present in the computer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While in other resources they use the phrase “virtual memory”, and describe “paging”. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Virtual memory is a section of volatile memory created temporarily on&#xA;  the storage drive. It is created when a computer is running many&#xA;  processes at once and RAM is running low.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The operating system makes part of the storage drive available to use&#xA;  as RAM. Virtual memory is much slower than main memory because&#xA;  processing power is being taken up by moving data around, rather than&#xA;  just executing instructions. The guide on operating systems explains&#xA;  how the OS manages memory.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Taken from &lt;a href=&quot;https://www.bbc.co.uk/education/guides/zmb9mp3/revision/8&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bbc.co.uk/education/guides/zmb9mp3/revision/8&lt;/a&gt; Though I have seen the same in resources approved by the exam board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question is what do I do in these situations?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The exam board is wrong, but clear about what they think the answer is.&lt;/li&gt;&#xA;&lt;li&gt;The exam board is unclear about the answer.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Context:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UK England, GCSE / A-Level&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="694" LastEditDate="2017-11-15T12:18:07.373" LastActivityDate="2017-11-15T12:18:07.373" Title="Conflicting meaning, between exam board / teaching resources, and technical meaning" Tags="|exams|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3957" PostTypeId="1" CreationDate="2017-11-14T20:14:33.913" Score="4" ViewCount="201" Body="&lt;p&gt;I'm preparing a course for next year, aimed at kids from ~6-16. It's based around the concept of creative computing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://scratched.gse.harvard.edu/guide/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://scratched.gse.harvard.edu/guide/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it will be a great experience. We'll be working around Scratch, and a lot of stuff involving game development, animations, and who knows what else will come.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real challenge I see in this course (as well as the main objective) is how to engage the kids into this world of development: The stereotypical kid in this age range is just interested in playing games with their parent's smartphone or tablet. Some of them have a PlayStation or other gaming system, but at the end, they spend a lot of hours playing modern games, which are ridiculously easy to play (don't get me wrong, some of those are great, but the majority of them don't promote any required value like endeavor or perseverance). Those kids don't know the amount of work that those games involve, and I'm a bit afraid of them getting frustrated by the fact they cannot easily make AAA games like the ones they're used to in a matter of minutes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone experience in a similar environment, who can provide experiences and feedback? How do you engage those kids into this world that requires so much sacrifice and willing to learn?&lt;/p&gt;&#xA;" OwnerUserId="3493" LastEditorUserId="58" LastEditDate="2017-12-13T01:33:21.420" LastActivityDate="2018-01-06T21:44:43.677" Title="Engagement advice on Creative computing" Tags="|student-motivation|scratch|game-design|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3958" PostTypeId="2" ParentId="3956" CreationDate="2017-11-14T20:17:34.107" Score="2" Body="&lt;p&gt;You are seeing a difference between virtual memory as described to a computer user some number of years ago (this is more frequently called &quot;swap&quot; now), and virtual memory as understood by an operating system developer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If one goes back and looks at, say... Mac OS System 7, one can see &lt;a href=&quot;http://apple.wikia.com/wiki/Virtual_memory&quot; rel=&quot;nofollow noreferrer&quot;&gt;this description&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Virtual memory adds more memory to your Macintosh by making use of unused free space on the hard drive. Because the extra memory comes from the hard drive, though, it is much slower than the RAM chips.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or over in &lt;a href=&quot;https://retrocomputing.stackexchange.com/questions/2804/why-did-mac-os-7-perform-poorly-with-virtual-memory-enabled&quot;&gt;retro computing&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To avoid slow performance, Apple suggests that the amount of virtual memory you select be less than the system RAM.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is the virtual memory as understood by a user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Virtual memory as understood by a operating system designer and systems programmer deals with the virtual mapping of memory space used by a process to another space that is managed by the operating system.  It is not necessarily on a disk or any other medium.  It is not necessarily continuous in its physical addressing.&lt;/p&gt;&#xA;" OwnerUserId="3494" LastActivityDate="2017-11-14T20:17:34.107" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3959" PostTypeId="2" ParentId="3957" CreationDate="2017-11-15T00:29:04.487" Score="3" Body="&lt;p&gt;Show them the cool stuff they &lt;strong&gt;can&lt;/strong&gt; do with Scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't focus on explaining that they can't make a AAA game. Focus on showing them examples of stuff that is engaging and interesting, that they can do with Scratch. Come up with a showcase of interesting programs. Make sure your assignments are engaging and interesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking a step back, I'd also recommend you give your students the benefit of the doubt. Don't come in with an attitude that assumes they only care about modern video games and smartphones. Connect your lessons with stuff they do care about. Have them draw a scene from their favorite show, or have them make a game or animation about their friends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And taking another step back, the age range of your students is very high. A 6 year old and a 16 year old are very different. I'm not sure Scratch is the right choice for 16 year olds. Maybe try something like Game Maker or &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;? I've mentioned Processing in a bunch of my other answers, and I'd be happy to talk more about it with you if you're interested.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-11-15T00:29:04.487" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3960" PostTypeId="2" ParentId="3956" CreationDate="2017-11-15T00:41:08.817" Score="1" Body="&lt;p&gt;You don't really have a dilemma. Just give them the information as you have presented it here and note to them that if it comes up on the exam, the older definition, though no longer strictly correct, should prevail. Hopefully, though, a valid question on an exam wouldn't depend on the distinction here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you have access to old exams and can learn what questions in the past have been used. Testing agencies often post old exams, though I don't know UK practice. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As to the old Mac system, it &lt;em&gt;was&lt;/em&gt; Virtual Memory and stuff stored on the disk had to be brought to RAM before being manipulated. It just wasn't a UNIX-like Paged Memory Management System, but a simpler thing. And even Paged systems still talk about swapping. It is pages that get swapped, though, rather than a full application data space. So, the two things aren't as different as you might think. The Mac under OS9 did actually run a bit better with some VM enabled. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I find problematic with the &quot;official&quot; definition is that a student might conclude from it that data on the disk can be directly manipulated there. It doesn't actually &lt;em&gt;say&lt;/em&gt; that, but a student might get confused. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be honest. Be complete. Warn about caveats and possible trickery, though I doubt trickery will occur. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-15T02:04:26.710" LastActivityDate="2017-11-15T02:04:26.710" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3961" PostTypeId="2" ParentId="3951" CreationDate="2017-11-15T09:59:40.400" Score="2" Body="&lt;p&gt;i tend to use &quot;simpler&quot; examples of NFA(like recognice words that contain the sequence &quot;xyz&quot;) which can be generated with an easy to see NFA than a DFA so they can see that sometimes NFA can be visually more easy to read...&lt;/p&gt;&#xA;" OwnerUserId="3497" LastActivityDate="2017-11-15T09:59:40.400" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3962" PostTypeId="1" CreationDate="2017-11-15T12:18:21.617" Score="4" ViewCount="735" Body="&lt;p&gt;I am familiar with the &lt;a href=&quot;https://northwinddatabase.codeplex.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Northwind&lt;/a&gt; database and &lt;a href=&quot;https://github.com/lerocha/chinook-database&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chinook&lt;/a&gt; database as good toy databases for allowing students to practice writing queries. Are there other databases in a similar vein that are available? I want something with a sensible real-world data model and enough data to be interesting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I'm interested in databases that can be downloaded/built from a set of SQL statements in a script - building the tables, adding the foreign key relationships, inserting the data, etc. That way, students can add data under the constraints of the database (e.g., foreign keys). Thus, I am looking for databases that are downloadable in formats compatible with major RDBMS implementations (e.g., MS SQL Server, MySQL, SQLite). This differentiates this question from the &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1394/good-datasets-for-intro-cs-courses&quot;&gt;previous question&lt;/a&gt; regarding datasets, which focuses on flat files, or databases available as flat file.&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="27" LastEditDate="2017-11-15T22:00:06.210" LastActivityDate="2019-11-28T09:14:08.377" Title="Toy Databases for Class Examples/Homeworks" Tags="|resource-request|databases|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3964" PostTypeId="2" ParentId="3962" CreationDate="2017-11-16T00:30:37.460" Score="4" Body="&lt;p&gt;I stil think this is basically a duplicate of this question: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1394/good-datasets-for-intro-cs-courses&quot;&gt;Good datasets for intro CS courses?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're asking for a database of interesting data. The other question is asking about interesting data. The only thing you need to do to get from the answers in that question to the answers to your question is to write a little bit of processing code that outputs the data in a format that's compatible with a database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, you're going to have to &lt;strong&gt;massage&lt;/strong&gt; the data. This might require writing a program that calls an API to get data, and then outputs that data to &lt;code&gt;.sql&lt;/code&gt; files or more basic &lt;code&gt;.csv&lt;/code&gt; files or something. Then the students would take those files and work with them to create their databases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think as soon as you accept the fact that you're going to have to massage the data, you'll open yourself up to a lot of cool data sets. I think restricting yourself to data that's already in the exact format you need is very limiting, and isn't how things work in the real world. In the real world, data is always in the wrong format. You always have to convert it to something you can use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stop looking for data in the format you want it in. Start looking for interesting data, and then figure out how to get it in the format you want it in.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-11-16T00:30:37.460" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3965" PostTypeId="2" ParentId="3962" CreationDate="2017-11-16T09:05:52.637" Score="2" Body="&lt;p&gt;Look into demo instances for real products that run on various databases.  I see more of sqlserver, oracle, and db2 in enterprise apps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download some free demo instances of Openmaint, Maximo, redmine, or other apps that are backed by a serious database,.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-11-16T09:05:52.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3967" PostTypeId="2" ParentId="3957" CreationDate="2017-11-16T15:44:48.930" Score="-1" Body="&lt;p&gt;Regarding your question: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How do you enroll those kids into this world that requires so much&#xA;  sacrifice and willing to learn?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You don't. You present the material and there will be one of three outcomes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;They are not interested and probably never will be. This is the norm for almost every possible thing that students ever learn.&lt;/li&gt;&#xA;&lt;li&gt;They are interested in learning, but they never end up using it beyond schooling. This covers 99% of the other cases.&lt;/li&gt;&#xA;&lt;li&gt;They are interested and end up doing it as a career. This happens about 1% of the time for basically every possible thing that students can learn.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Schooling has two objectives: 1) produce people with broad experience, 2) produce people who can do something for a living. We need both, and cannot force students to be interested and eventually do something for a living. It is up to them. Throughout time, there have been few people doing architecture, painting, music, writing, acting, cooking, and so on. Few people do any particular thing, and there is a large and growing set of particular things that people can do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some reason, computing is thought to be somehow different, but it is not. Few people learned auto mechanics, or civil engineering, or aviation, or radio technology, or oodles of other extremely useful things developed in the past few hundred years. And, because it is &lt;em&gt;technology&lt;/em&gt;, few people actually &lt;em&gt;had to&lt;/em&gt;. That is the point of technology. It is especially true for computing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, teach, and let the students decide which of the three levels of interest they have, which is a decision made over the course of many years, and involving many factors, nearly all of which are outside your control.&lt;/p&gt;&#xA;" OwnerUserId="3505" LastActivityDate="2017-11-16T15:44:48.930" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="3968" PostTypeId="2" ParentId="3957" CreationDate="2017-11-18T12:42:11.763" Score="0" Body="&lt;p&gt;This answer, I'm afraid, is a bit off the wall. It depends on your having a really good grasp of programming and also a bit of design. If you have that you might consider proceeding as follows. I'll assume that your student's interest is mostly in gaming, so I'll go with that. But anything of interest to your students would do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It uses an Agile Software Development methodology, though you don't need to ever say that or even introduce its concepts explicitly. Just do it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first step is to work with your student group (or groups) on an overall concept for a game, even a complex one, but not too complex. You could even do a bit of storyboarding for the game. Spend a day or so doing this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second step is to some up with some sort of design for your concept, even if it is very rough and not well developed. It certainly doesn't need to be complete since it will morph over time anyway. You will probably need to do much/most of this yourself. Break the concept into parts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third step is almost all your job. You need to act as (agile) Customer to your students by taking the design and breaking it into small tasks, each of which can be done in a day or so. Write these tasks on index cards. You will need to spend a hard week-end doing this. Some of the tasks will be programming and some will be other things (creating or finding graphics, say). You don't need a complete set of cards for the whole thing. You can add and delete cards as you progress. Using index cards makes this easy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the visual is a motivator, make sure that your task breakdown makes it possible to see something early on - as early as possible. This can be as simple as a background pattern, but something moving (for a game) would be better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now the students can actually start development. Give a pair of students a task card and have them build just that. Make sure that your pairs of students are working on tasks that seem to fit together so that the work of several pairs can be integrated. Try to switch pairs frequently so that each student gets to work with different people. They won't get stuck so much and can help one another. Learn something about Pair Programming also so you can help them do it properly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, you grow the application organically. You can change the design at any time, making it more or less complex depending on how the students are doing. The steps are small, but they add up. Use the original concept as the incentive and organizing force to keep the students engaged. Have frequent &quot;meetings&quot; with students to get their feedback on how to proceed. Talk about what is working and what is not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm willing to expand this if comments suggest it would be useful. But the original concept for the app needs to come from your students with your guidance. I'd suggest not making it too small or trivial. They don't need to complete it to be successful personally. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-18T13:36:43.223" LastActivityDate="2017-11-18T13:36:43.223" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3969" PostTypeId="2" ParentId="3815" CreationDate="2017-11-19T11:43:30.293" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;So the question is what is the difference between Computer Science,&lt;br&gt;&#xA;  IT, and Digital Literacy?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The way I understand the report and especially the bit you pasted in &lt;a href=&quot;https://cseducators.stackexchange.com/a/3817/757&quot;&gt;your own answer&lt;/a&gt;, the key to IT is in the T.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's IT if it has a clearly &lt;em&gt;technological&lt;/em&gt; approach (and by necessity the treatment is at theoretical level rather than practical).&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Computer architecture? Mostly IT.&lt;/li&gt;&#xA;&lt;li&gt;Computer networks? Also IT.&lt;/li&gt;&#xA;&lt;li&gt;Operating systems? IT.&lt;/li&gt;&#xA;&lt;li&gt;Using operating system XYZ's shell at a basic level? Digital literacy.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Using&lt;/em&gt; a web browser or email client? Digital literacy.&lt;/li&gt;&#xA;&lt;li&gt;Netiquette? Digital literacy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; if your aunt (who is a stereotypical aunt), knows about it, it's digital literacy, otherwise it's IT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it's on Slashdot, it's IT.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As for CS, in your original question you say that you &quot;have no problem understanding what Computer Science is and what it includes&quot;, but let's talk about CS as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The definition from the report you pasted in &lt;a href=&quot;https://cseducators.stackexchange.com/a/3817/757&quot;&gt;your own answer&lt;/a&gt; is good enough for me: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The &lt;em&gt;scientific&lt;/em&gt; discipline of Computer Science, covering &lt;em&gt;principles&lt;/em&gt;&#xA;  such as algorithms, data structures, programming, systems architecture&#xA;  design, problem solving...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In my opinion the report correctly characterizes it as having longevity and being wholly technology-independent.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Further rule of thumb:&lt;/strong&gt; if there is a big $O$ somewhere, or a proof by induction, or a graph, or an inductively generated structure, it's probably CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If kids who are good at the IT and DL parts fail miserably at it, there you have the conclusive proof.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Where do these fit in?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Computer art: art class...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;... assuming pupils already know how to use a raster editor. If they don't and it's part of the class, digital literacy. &lt;/li&gt;&#xA;&lt;li&gt;If it also involves understanding representation of images, compression, etc: IT. &lt;/li&gt;&#xA;&lt;li&gt;If it involves turtle graphics and programmatically generated drawings, maybe there's a sprinkle of CS as well, bonus points if recursion is involved.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Computer animation: see above&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;Typing training: clearly digital literacy.&lt;/li&gt;&#xA;&lt;li&gt;Unix operating system: IT. &quot;Operating systems&quot; as in MOS is IT and CS.&lt;/li&gt;&#xA;&lt;li&gt;Systems admin: IT.&lt;/li&gt;&#xA;&lt;li&gt;Computer Maintenance: arts and crafts class?&lt;/li&gt;&#xA;&lt;li&gt;Network admin: IT&lt;/li&gt;&#xA;&lt;li&gt;Basic training: Digital literacy&lt;/li&gt;&#xA;&lt;li&gt;Use of a work processor: Digital literacy&lt;/li&gt;&#xA;&lt;li&gt;Computational thinking: CS!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Let me add some more examples for CS:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Algorithms, data structures and complexity thereof: CS&lt;/li&gt;&#xA;&lt;li&gt;Theory of computation and computability: CS&lt;/li&gt;&#xA;&lt;li&gt;Formal automata: CS&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="757" LastEditorUserId="757" LastEditDate="2017-11-19T19:36:13.427" LastActivityDate="2017-11-19T19:36:13.427" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="3970" PostTypeId="2" ParentId="3933" CreationDate="2017-11-19T17:19:12.403" Score="2" Body="&lt;p&gt;There is some interesting stuff in &lt;a href=&quot;https://royalsociety.org/~/media/policy/projects/computing-education/computing-education-report.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;“After the reboot: computing education in UK schools”&lt;/a&gt;. It shows that a lot of the differences is girls/boys and background differences are mostly social constructs, e.g. by comparing all girl, all boy, and mixed schools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not a research paper, but it does cite other work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Nl0O8.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Nl0O8.png&quot; alt=&quot;Figure from the report&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Image taken with permission from the report (&lt;a href=&quot;https://creativecommons.org/licenses/by/4.0/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CC-BY&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="793" LastEditDate="2017-12-13T22:53:17.997" LastActivityDate="2017-12-13T22:53:17.997" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3971" PostTypeId="1" CreationDate="2017-11-19T22:46:23.743" Score="5" ViewCount="186" Body="&lt;p&gt;Essential Understanding 4.2 of the AP CS Principles curriculum is as follows: &quot;Algorithms can solve many, but not all, computational problems.&quot; Among the topics I am expected to cover in the context of this standard are algorithms that run in a reasonable time v. those that don't, the difference between solvable and unsolvable problems, the use of a heuristic, and the existence of undecidable problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plan is to cover the 0/1 knapsack problem, the heuristic of a greedy algorithm, and the halting problem. This is a relatively small part of the course and is assessed by only a couple of multiple-choice questions on the AP Exam, so I don't need more than one lesson (or two) of material. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I am afraid any one-day lesson will be inevitably reductive as these are complex topics. Moreover, the students are new to programming and computer science in general, so I need to balance abstract with theory with concrete, relevant examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What lesson ideas, examples, and/or analogies do well to serve the teaching of this standard?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2017-11-20T00:39:07.777" LastActivityDate="2021-05-27T15:27:04.697" Title="How do I construct a basic lesson on computational complexity and undecidability?" Tags="|lesson-ideas|algorithms|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3972" PostTypeId="2" ParentId="3971" CreationDate="2017-11-19T23:05:02.280" Score="6" Body="&lt;p&gt;The hard parts of this are hard for everyone, of course: P = NP (or not). But the others aren't too difficult to get across in a short period of time, especially if the students have something of a math background. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can easily construct problems that grow exponentially and whose programs for solution must also grow at that rate. &lt;strike&gt;Drawing a completely connected graph for example and adding vertices.&lt;/strike&gt;. Listing all of the permutations of n distinct elements, for example.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The halting problem is great, of course, and you can often use a graphic to illustrate the problems: a machine that takes machines as one input and tapes as another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/33ICy.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/33ICy.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can also convince students that &lt;em&gt;most&lt;/em&gt; problems don't have solutions as there are only a countable number of computer programs given any finite character set. But the number of problems is uncountable. The fact that we know of only a few unsolvable problems is similar to the fact that we know only a few non-algebraic numbers, though most (again uncountably many) real numbers are not algebraic while only countably many are algebraic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But laying out the broad outlines (feasible, non-feasible, non-computational) lets you say a few words about what we don't yet know and why CS, like math, isn't a fixed body of knowledge, but a field ripe for research. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even go a bit farther and talk about the issue that for some problems a solution is hard to find, but easy to check, which is fundamental to encryption. It is hard to find factors, but easy to check that they &lt;em&gt;are&lt;/em&gt; factors once found. This gives you a way to talk about nondeterministic algorithms of which &quot;repeatedly guess and check&quot; is one variety. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final idea that can be fun. Assuming you have already covered sorting to some extent, you can have the class, or small groups within the class, brainstorm the most inefficient sorting algorithm they can think of. But it needs to be an algorithm, not just randomness. But &quot;Mix the values and check if sorted. Repeat until done.&quot; is actually an algorithm if your mixer is truly random. That is, it is guaranteed to sort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students know some calculus, you can mention Newton's Method for finding zeros of a function. While it seldom gives you the exact value it is a process (pseudo algorithm) for guessing and then improving the guess in the next iteration. I say &quot;pseudo algorithm&quot; since it isn't guaranteed to terminate or to find an exact answer. But it is an improvement on pure &quot;guess and check&quot; &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A resource on Non Computability and its relation to self reference and recursion is this &lt;a href=&quot;https://users.cs.duke.edu/~ola/papers/selfref2.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;paper&lt;/a&gt; by Owen Astrachan of Duke&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-10T21:36:58.187" LastActivityDate="2017-12-10T21:36:58.187" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3973" PostTypeId="1" CreationDate="2017-11-20T14:05:06.270" Score="1" ViewCount="107" Body="&lt;p&gt;I run web development coding workshops where  I give students a starting repo, then want to have a version for the final, finished &quot;solution&quot;. Ideally students should not see the solution easily until I publicise it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wondered if others have got a good workflow for this? I've tried tags and branches, but not found something I'm really happy or confident with yet.&lt;/p&gt;&#xA;" OwnerUserId="3512" LastEditorUserId="204" LastEditDate="2017-11-20T14:23:17.160" LastActivityDate="2017-12-10T11:33:28.513" Title="Best Git strategy for workshop code (starter -&gt; end solution)" Tags="|git|" AnswerCount="1" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="3974" PostTypeId="2" ParentId="3971" CreationDate="2017-11-20T14:12:28.610" Score="2" Body="&lt;p&gt;I was a software engineer (not a computer scientist), I have self-taught CS, some of it recently. I now teach computing.&lt;/p&gt;&#xA;&lt;p&gt;One of the things I have learned as a teacher is not all knowledge should come from the teacher. It is better to get the students to do some activity, to actively learn.&lt;/p&gt;&#xA;&lt;p&gt;A few years ago I saw two videos, one on the halting problem. One on NP, it was the busy beaver problem. The first &lt;span class=&quot;math-container&quot;&gt;$O(x) &amp;gt; O(n!)$&lt;/span&gt;, that I had seen.&lt;/p&gt;&#xA;&lt;p&gt;Therefore get the students to watch the videos for homework, then to solve Busy beaver for n&amp;lt;=4, and spend an hour on n=4 (I think it is 4 that can be done in less than an hour. And 5 would take years on the fastest computer. But you should check.) In class discuss the findings, and then get them to act out the parts of the machine in the halting proof. Then discuss that.&lt;/p&gt;&#xA;&lt;p&gt;Below are links to the two videos that helped me.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=CE8UhcyJS0I&quot; rel=&quot;nofollow noreferrer&quot;&gt;Busy beaver&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=92WHN-pAFCs&quot; rel=&quot;nofollow noreferrer&quot;&gt;Halting problem&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Busy beaver is very simple, yet its big-O is higher than super-exponentiation.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note: Be careful with the halting problem. I keep hearing it said that it is impossible to determine if a program halts. This is clearly not true, for we have done it (here I mean: we = you and me). It should be stated that “it is impossible to determine, in the general case, if a program halts.” That is it is impossible to make a program/machine that will be able to tell you if a program/machine halts, that will work for all program/machine inputs.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="9154" LastEditDate="2021-05-26T15:31:48.740" LastActivityDate="2021-05-26T15:31:48.740" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="3975" PostTypeId="1" AcceptedAnswerId="4041" CreationDate="2017-11-21T13:46:07.847" Score="1" ViewCount="247" Body="&lt;p&gt;More interactive environments are easier to learn, but the text based ones I have seen lately don't let you change your mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used Read–Eval–Print Loop (REPL) environments. However these are not suitable, as it is not possible to edit or view code that one wrote earlier.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;In [1]: a=5&#xA;&#xA;In [2]: b=a/3&#xA;&#xA;In [3]: b&#xA;Out[3]: 1.6666666666666667&#xA;&#xA;In [4]:&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;they are of some value. However it becomes less useful when creating something big, when creating routines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to be able to create sub-routines interactively, and then be able to inspect them, and edit them. It also needs to be easy enough for teaching beginners.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;In [4]: def double(a):&#xA;   ...:     return 3*a&#xA;   ...:&#xA;&#xA;In [5]: show double&#xA;&#xA;    def double(a):&#xA;        return 3*a&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/NWUad.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NWUad.gif&quot; alt=&quot;image showing what happens when user types edit double: editable code apears&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;In [7]: show --all&#xA;&#xA;    def double(a):&#xA;        return 3*a&#xA;&#xA;    def oneMoreThan(a):&#xA;        return a+1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I am not too worried about language. I am just looking for a nice interactive learning environment, that combines the best of REPL and editing. Can you tell me of anything that you use or know of?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will add an answer that shows what I have found, but it is not an acceptable answer as I don't think it is easy enough.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2017-11-25T18:14:00.330" LastActivityDate="2017-12-18T19:32:50.830" Title="Search for a useful interactive programming environment" Tags="|resource-request|programming-environment|" AnswerCount="7" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="3976" PostTypeId="2" ParentId="3975" CreationDate="2017-11-21T14:07:24.573" Score="0" Body="&lt;p&gt;What I have found so far. I don't think this is suitable for teaching a class of beginners, as it is too complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;code&gt;ipython&lt;/code&gt;, you can display the code of a function/procedure, variable…, by typing its name followed by two &lt;code&gt;?&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;In [10]: double??&#xA;Signature: double(a)&#xA;Source:&#xA;def double(a):&#xA;    return a*2&#xA;File:      ~/&amp;lt;ipython-input-8-4a40aa4fc91f&amp;gt;&#xA;Type:      function&#xA;&#xA;In [11]: a=5&#xA;&#xA;In [12]: a??&#xA;Type:        int&#xA;String form: 5&#xA;&#xA;In [13]: %ed double&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the terminal switches to an editor, when I quit the editor the new definition is invoked, and I return to repl mode. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-21T21:47:40.270" LastActivityDate="2017-11-21T21:47:40.270" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3977" PostTypeId="1" CreationDate="2017-11-21T14:17:08.767" Score="-3" ViewCount="213" Body="&lt;p&gt;I found by studying computer science that there are UML diagrams. I found them useful but sometimes too slow to draw. Is there some alternatives to UML that does the same but is easy to type for example to mail. I do not mean  something like LaTeX-code that one can compile to diagrams but something similar as we have in mathematics where all Euclidean geometry shapes has a rigorous definition.&lt;/p&gt;&#xA;" OwnerUserId="3515" LastActivityDate="2017-11-21T15:25:06.603" Title="Is there a textual alternatives to UML diagrams?" Tags="|documentation|" AnswerCount="1" CommentCount="3" ClosedDate="2017-11-23T17:27:16.350" ContentLicense="CC BY-SA 3.0" />
  <row Id="3978" PostTypeId="2" ParentId="3977" CreationDate="2017-11-21T15:25:06.603" Score="1" Body="&lt;p&gt;There are many. UML is only one organisations attempt at creating a collection. Some of UML is useful, some is in there because committee members had a product to sell, some is only sometimes useful.&lt;/p&gt;&#xA;&lt;h2&gt;Some alternatives&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BON Business object notation. Bon is good, BON is a notation for object oriented programming. It was originally part of Eiffel. It is designed to be reversible, with out loss. Eiffel ←→ BON.&lt;/li&gt;&#xA;&lt;li&gt;And may others: I mainly use:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pipe-line diagrams.&lt;/li&gt;&#xA;&lt;li&gt;layer diagrams.&lt;/li&gt;&#xA;&lt;li&gt;custom, domain specific, diagrams.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Creating diagrams fast&lt;/h1&gt;&#xA;&lt;p&gt;However your question seems to be about speed.&lt;/p&gt;&#xA;&lt;p&gt;Gone are the days where we had to create complex designs and then hand compile to machine code. Now we have high-level languages. A lot of what can be expressed in UML, can more easily be expressed in your chosen programming language.&lt;/p&gt;&#xA;&lt;p&gt;Therefore use diagrams where they are useful, then go straight to programming. If you need UML diagrams, because your management, teacher, or exam board, insist on them, and you can not convince them of their error, or replace them. Then use a tool such as doxigen to convert your source code into UML diagrams.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-11-21T15:25:06.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3979" PostTypeId="2" ParentId="3975" CreationDate="2017-11-21T19:44:50.227" Score="1" Body="&lt;p&gt;DrRacket combines a coding window with a REPL environment.  It would mean moving out of the imperative paradigm into a functional one, but the setup is really quite nice:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/yyU7E.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/yyU7E.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The top window is called the &lt;em&gt;Definitions Window&lt;/em&gt;, and the bottom is called the &lt;em&gt;Interactions Window&lt;/em&gt;.  Work in the bottom window for as long as you like, but once you have something built up, copy the all-important function definition into the top.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be warned that when you press the &lt;code&gt;run&lt;/code&gt; button, the interactions window is cleared.  However, you can now freely utilize any functions that have been defined in the top area.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-11-21T19:44:50.227" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="3980" PostTypeId="5" CreationDate="2017-11-22T17:40:14.947" Score="0" Body="&lt;p&gt;Learn-able Programming us a term coined by Bret Victor, to describe programming tool and languages, that are designed to be more learnable, and take advantage of hardware technology improvement, that have happened post 1960s.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Summary of Viktor's work&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;His work points out that most of what we do on computers is based on teletype technology, or pre-computer technology; That we have not fully taken advantage of modern developments in hardware. It stop drawing dead fish, he points out that when we draw a fish on a computer (paper technology), it is not a fish, it is a dead fish. Real fish move. And that if we animate it (TV technology), it is still not like a real fish. Real fish react to us.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of Victor's work in not about teaching/learning, but is about programming or using computers. Learnable Programming is what he has to say about making tools that will allow students to learn programming more easily. see &lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://worrydream.com/LearnableProgramming/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;What the tag includes&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;A question should be tagged &lt;code&gt;learnable-programming&lt;/code&gt;, if it is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;About teaching programming.&lt;/li&gt;&#xA;&lt;li&gt;and About programming tools that make it easier to teach programming.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is not limited to ideas from Bret Victor, but tools/ideas for-filing this concept, that make programming easier to teach/learn.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-22T17:40:14.947" LastActivityDate="2017-11-22T17:40:14.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3981" PostTypeId="4" CreationDate="2017-11-22T17:40:14.947" Score="0" Body="For question about teaching programming, using forward thinking languages/tool that make teaching easier. If the question is not in some way about improving the state of the art in language/tool for teaching programming, then this is not the right tag." OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-22T17:40:14.947" LastActivityDate="2017-11-22T17:40:14.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3982" PostTypeId="5" CreationDate="2017-11-22T19:39:15.800" Score="0" Body="&lt;p&gt;Programming environments can be simple or complex. The simplest environment is just a text editor, compiler, and runtime system. Other examples are REPL systems (Read-Evaluate-Print loop) common in Lisp and other systems. Some of the most complex are integrated development environments (&lt;a href=&quot;/questions/tagged/ide&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;ide&amp;#39;&quot; rel=&quot;tag&quot;&gt;ide&lt;/a&gt;s) such as Eclipse. Choice of environment can depend on your teaching goals and the sophistication of the students. Use this tag for questions relate to choice of environments and their use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this site is not appropriate for technical questions related to specific environments. These generally belong to &lt;a href=&quot;https://stackoverflow.com/&quot;&gt;Stack Overflow&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1035" LastEditDate="2020-01-14T19:14:51.717" LastActivityDate="2020-01-14T19:14:51.717" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3983" PostTypeId="4" CreationDate="2017-11-22T19:39:15.800" Score="0" Body="A programming environment for teaching is the complete range of tools used by students to create and run programs. From the simplest (text editor, compiler, runtime) to the complex (integrated development environment - IDE) the environment may help or hinder the student's education. Use this tag for questions related to the choice and use of programming environment in education. However, use the [ide] tag for questions specific to those environments." OwnerUserId="1293" LastEditorUserId="1035" LastEditDate="2020-01-15T13:13:46.023" LastActivityDate="2020-01-15T13:13:46.023" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="3985" PostTypeId="2" ParentId="3975" CreationDate="2017-11-25T01:17:48.167" Score="2" Body="&lt;p&gt;In addition to Racket, check out drjava for Java and drpython for Python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Python you can also check out Thonny.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All have a repl section and a code section. Write your definitions in the code section and interact in the repl section.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Emacs can also be configured this way for a whole host of languages.&lt;/p&gt;&#xA;" OwnerUserId="237" LastActivityDate="2017-11-25T01:17:48.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3986" PostTypeId="1" AcceptedAnswerId="3990" CreationDate="2017-11-26T05:56:27.197" Score="6" ViewCount="237" Body="&lt;p&gt;I am a college teacher developing an introduction to digital logic for grades 8-12.  This is a special topic that will be presented in three 50-minute periods with in-class exercises.  It won't go beyond basic combinational logic.  Provisionally, module 1 starts with gates and truth tables and ends with a half-adder; module 2 extends to a four-bit ripple-carry adder, and module 3 extends the ripple-carry adder to make a two's complement adder/subtractor.  These are not set in stone, but will be rather soon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am struggling with how to explain the importance of a knowledge of digital logic to high school and upper middle school students.  I want something better than, &quot;To help you understand that computers are not magic.&quot;  Ideally, the explanation would be only a short paragraph, and memorable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how can I explain the importance of comprehension of simple digital logic to pre-college students?  That is, how do I explain &lt;strong&gt;why students should care&lt;/strong&gt; about this topic?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;  Well, I'm teaching this to eighth-graders beginning Wednesday!  Day one is about what I planned last fall.  Day 2 has a ripple-carry adder and something else.  I'm still dithering between adder-subtractor and S-R latch which becomes a D-latch.  (I'm not sure the kids have enough grounding in binary arithmetic for the adder-subtractor.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Day 3 now introduces a little bit of Boolean algebra.  The kids are introduced to Kat, who is heading for Hogwarts, and must design Kat's cat checker.  There are five inputs and three possible &quot;OK&quot; results from among the combinations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the explanation that everything computers do comes from a few simple circuits, as suggested by Ben I. below, I'm going to show this video at the beginning of day 1: &lt;a href=&quot;https://www.youtube.com/watch?v=ZoqMiFKspAA&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=ZoqMiFKspAA&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3524" LastEditorUserId="3524" LastEditDate="2018-02-06T00:52:32.270" LastActivityDate="2018-02-06T00:52:32.270" Title="Explaining the Value of Knowledge of Digital Logic" Tags="|student-motivation|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3987" PostTypeId="2" ParentId="3986" CreationDate="2017-11-26T10:57:23.190" Score="0" Body="&lt;p&gt;I'll assume that they are interested in their digital devices and also have at least a bit of interest in how they really work: why they are cool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, you could explain the reason that computers use binary is that it is relatively easy and inexpensive to make physical components (transistors, say) that are &lt;em&gt;bi-stable&lt;/em&gt;. Stable in one of two states: on-off, high or low voltage, etc. Now we want an effective way to manage changes of state, hence digital (actually binary) logic. Next do a bit of binary addition using the usual add and carry algorithm they are already familiar with in base 10. With that you can back up to truth tables and your other topics of interest. For the younger students you might also use some physical representation of a transistor made of paper or wood. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you search online you can find discussions of binary logic done with fluids (&lt;a href=&quot;https://en.wikipedia.org/wiki/Fluidics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fluidics&lt;/a&gt;) and possibly even a video of a transistor-like valve. You can also have the students act out a transistor switch, sending pulses (i.e. students) either left or right. This assumes you have enough students to make it work, say about 10 or more. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-11-26T14:17:27.117" LastActivityDate="2017-11-26T14:17:27.117" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="3988" PostTypeId="2" ParentId="3986" CreationDate="2017-11-26T16:49:58.450" Score="2" Body="&lt;p&gt;Your best bet of how to answer why students should care is to stop and ask yourself what good reasons there are to care about it (or any topic). Do that before reading on?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, so my answer is: because &lt;em&gt;science&lt;/em&gt;. The word means &lt;em&gt;knowledge&lt;/em&gt;. If you want to know something instead of just have opinions (possibly wrong) or worse, then you will want to be finding out. But why bother to know anything, is really the question. Caring is your issue. Caring means that one can influence things, and not caring means that one will be pushed around helplessly by circumstances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it effective to care, is the obvious question? Can we actually learn enough to have any effect? When things seem perplexing and obscenely complicated, then it appears hopeless. Science brings hope because it is able to render the complex simple enough to manage. When I found out that all matter is composed of just 3 elementary particles, and that there are basically only 2 forces that affect us, only one of which we have any control over, it was revolutionary. If more people knew these things, they might wish to learn more. When you ponder the 88 keys on a piano, able to make basically all (western) music, or the 92 naturally occurring elements making basically all things, it is astonishing. The organization of atoms (predicted 2500 years ago) in to the stunning wonder of the Periodic Table is a great story!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All computers are made of transistors, and built up in to a few simple circuits replicated millions of times, like the cells of the body or brain. If that is not inspiring and provoking of interest, I would release the students from school, as they are unreachable: they don't care to have an influence on their own future.&lt;/p&gt;&#xA;" OwnerUserId="3533" LastActivityDate="2017-11-26T16:49:58.450" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3989" PostTypeId="2" ParentId="3986" CreationDate="2017-11-26T19:56:37.730" Score="1" Body="&lt;p&gt;As many of them will go on to become computer engineers as programmers. Computer engineering is all about logic circuits. You teach them at this level for the same reason you teach them programming. Besides, some problems are not solvable in real time by software alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a fun reason they might appreciate more directly, Redstone circuits in Minecraft are integrated circuit problems time scaled to the minecraft heartbeat. You could have them make the circuits in Minecraft. Have them build boobytraps for the last person through the door, or other problems that require complex logic.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-11-26T19:56:37.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3990" PostTypeId="2" ParentId="3986" CreationDate="2017-11-27T01:54:59.610" Score="2" Body="&lt;p&gt;I would begin with the following factoid, which is an adaptation of the blurb I've used pretty successfully as a hook to get my students (grades 9-12) to sign up for my processor class:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Our computers seem to be capable of miracles, but literally every thing that a computer does comes down to &lt;em&gt;only four&lt;/em&gt; small logic operations: AND, OR, XOR, and NOT.  How is this possible?  You'll get a flavor of this over just three periods of digital logic.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also, in the interest of fostering your success in the high school class, here are a few cognitive traps that surprised me when I first began teaching my processors course.  The skill difference between designing a half adder and a full adder (once a student has gained some mastery of the seven logic gates) is almost nonexistent, but understanding the relationship between a bus and a number can be tricky for students at the start, and without that, the wiring never makes any sense.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My trick, which you are welcome to borrow, is to do a 5-bit&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; binary addition the regular math way, then encircle the various columns in some shape (and the lowest-significant bit addition with some other shape), and add the appropriate wires coming in and out (with their values).  It helps to make sure that your columns are spaced out an almost unreasonable amount.  This allows you to get the &lt;code&gt;carry-out&lt;/code&gt; to &lt;code&gt;carry-in&lt;/code&gt; transitions.  Finally, when you draw the wires out of the bottom, have them curve in towards each other until they are traveling almost entirely together. Then you get to explain a bus as a series of wires that holds a number.  If you follow this up with a photo of a bus wired into an old board and an SVGA cable ending, it creates a pretty powerful connection for the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further cognitive traps: as absolutely silly as it sounds, you should carefully explain the difference between AND and OR.  As strange as it sounds, AND/OR confusion is fairly regular.  AND/XNOR can be similarly confusing (since students regularly confuse logical &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; with logical &lt;code&gt;==&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, if you are going to culminate in an adder/subtractor, you may want to add in a multiplexer, since it's basically free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - 4 bit sometimes does not get the point across, but 8 bit is overkill.  5 bit seems to be around the sweet spot.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-11-27T01:54:59.610" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3991" PostTypeId="2" ParentId="3975" CreationDate="2017-11-27T10:14:55.907" Score="-1" Body="&lt;p&gt;I can wholeheartedly suggest Xamarin Workbooks:&#xA;&lt;a href=&quot;https://developer.xamarin.com/guides/cross-platform/workbooks/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://developer.xamarin.com/guides/cross-platform/workbooks/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Awesome, nice UI. You can use it for more than Xamarin, if you are teaching any .NET based class, it is a very valuable tool. There are a couple of sample workbooks avaialable here: &lt;a href=&quot;https://developer.xamarin.com/guides/cross-platform/workbooks/samples/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://developer.xamarin.com/guides/cross-platform/workbooks/samples/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the best part is that you can extend it yourself, if you know a little typescript. I've created one a while back to demonstrate how Entity Framework Code First creates the database tables from the defined source code. You can check it out here, if you are interested: &lt;a href=&quot;http://dotnetfalcon.com/net-workbooks-entity-framework-model-explorer/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dotnetfalcon.com/net-workbooks-entity-framework-model-explorer/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="279" LastActivityDate="2017-11-27T10:14:55.907" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="3992" PostTypeId="2" ParentId="3962" CreationDate="2017-11-27T10:19:08.480" Score="1" Body="&lt;p&gt;You can check out the WorldWideImporters db (from Microsoft):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or the AdventureWorks db (from Microsoft as well):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks&lt;/a&gt; (links at the botto still work)&lt;/p&gt;&#xA;" OwnerUserId="279" LastActivityDate="2017-11-27T10:19:08.480" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="3998" PostTypeId="1" CreationDate="2017-11-29T16:17:33.953" Score="8" ViewCount="395" Body="&lt;p&gt;I am planning to teach an undergraduate-level course on mobile application development.  I have been thinking about the best way to structure such a course, and am starting to believe that an agile approach might have merit.&lt;/p&gt;&#xA;&lt;p&gt;The idea is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start the semester with a fully populated product backlog that lists all the components of the curriculum.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This means user story statements, detailed descriptions, story point values, and acceptance criteria are all detailed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;At the beginning of each week's session,&#xA;&lt;ul&gt;&#xA;&lt;li&gt;get the product owners (the students) to choose the topics for the coming week's lectures and assessment.&lt;/li&gt;&#xA;&lt;li&gt;do a retrospective on the previous week's outcomes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Periodically, replan and reschedule the curriculum (backlog).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The students are seniors or juniors and one deliverable for the course is that, by the end, they have written a mobile application that makes use of web services, location services, graphical information display, and a mobile database.&lt;/p&gt;&#xA;&lt;p&gt;Also, the students should be able to use version control, do an appropriate amount of software and UI/UX design, perform reviews of others' code, incorporate automated and manual testing into their projects.&lt;/p&gt;&#xA;&lt;p&gt;Because they are nearing the end of their studies, I believe showing them how a &amp;quot;real world&amp;quot; agile project might work in the scope of what they currently do (studying) would be a good secondary goal.&lt;/p&gt;&#xA;&lt;p&gt;My questions are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What are the downsides to this approach for the students? For me?&lt;/li&gt;&#xA;&lt;li&gt;Does anyone have any resources referencing others who have taken this approach?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Update&lt;/h1&gt;&#xA;&lt;h2&gt;Sprints&lt;/h2&gt;&#xA;&lt;p&gt;So it looks like, based on the school calendar, that we'll have enough time for an introductory session, four three-week sprints, a final demo session and two floating sessions available or other work.&lt;/p&gt;&#xA;&lt;h2&gt;What is the Product?&lt;/h2&gt;&#xA;&lt;p&gt;So there are two approaches to this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Assume the &amp;quot;product&amp;quot; is student knowledge about mobile application development and have each student select items from the generic backlog to work on each sprint.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assume the &amp;quot;product&amp;quot; is a mobile app that must &lt;a href=&quot;https://cs4720.cs.virginia.edu/category/project&quot; rel=&quot;nofollow noreferrer&quot;&gt;meet certain criteria&lt;/a&gt; in terms of functionality and have each student define their app, which will then produce user stories.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Product: Student Knowledge&lt;/h3&gt;&#xA;&lt;p&gt;This can be seen as &lt;em&gt;subvert[ing] the very purpose and essence of agile development&lt;/em&gt;, as Buffy noted.&lt;/p&gt;&#xA;&lt;p&gt;If done properly, this might not be the case: the aim is to fill in each student's knowledge gaps.  That will need to be highly adaptive per student and, probably, per topic area.&lt;/p&gt;&#xA;&lt;p&gt;If I'm the product owner then I get to say whether they've met the acceptance criteria --- they know enough about the topic of the user story.&lt;/p&gt;&#xA;&lt;p&gt;If, instead, we get another student to be the product owner (or perhaps &amp;quot;QA&amp;quot; with delegation from me as PO), then the idea of pairing can be brought in as the student will have to come to some mutual understanding of the &amp;quot;definition of done&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Acceptance Criteria&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Examples of User Stories&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h3&gt;Product: Mobile App&lt;/h3&gt;&#xA;&lt;p&gt;If the product is the mobile application, then this simplifies things and makes the agile approach closer to what a software engineer would have to follow in a real work environment.&lt;/p&gt;&#xA;&lt;p&gt;Here, if I'm the product owner, then I'll need to understand all the possible apps (if the students get to choose their own app idea).&lt;/p&gt;&#xA;&lt;p&gt;Again, it might be better for that to be delegated to another student or group of students.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Acceptance Criteria&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Examples of User Stories&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1660" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-21T17:58:44.300" Title="Agile / SCRUM Course Structure: Downsides? Resources?" Tags="|curriculum-design|resource-request|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="3999" PostTypeId="2" ParentId="3998" CreationDate="2017-11-29T17:45:40.737" Score="2" Body="&lt;h1&gt;I fear A Rushing ahead&lt;/h1&gt;&#xA;&lt;p&gt;The main problem will probably be.&lt;/p&gt;&#xA;&lt;p&gt;Some pupils will see the product backlog, and start working on it ahead of time (This is good so far), but they will probably work on it all at the same time (AHHH).&lt;/p&gt;&#xA;&lt;p&gt;Therefore do not release all of the backlog at the start. Insure that you teach “«Work In Progress» is bad, so keep it to a minimum” before releasing it all.&lt;/p&gt;&#xA;&lt;h1&gt;No Regrets&lt;/h1&gt;&#xA;&lt;p&gt;There may be learning dependencies, that means that some items can not be delivered early. If pupils where to chose them, then there would be a problem.&lt;/p&gt;&#xA;&lt;p&gt;Therefore carefully choose the initial set for the backlog, so that it contains items that are suitable at the early stage. But later these dependencies can be considered by the students (you could mark the invisible ones on the backlog so they are aware).&lt;/p&gt;&#xA;&lt;h1&gt;Shot Through The Heart, And You're To Blame.&lt;/h1&gt;&#xA;&lt;p&gt;You could Give agile A Bad Name.&lt;/p&gt;&#xA;&lt;p&gt;Ensure that you know Agile well. I have worked with many developers, than say “Agile does not work, I have tried it.” They have not tried it, but someone had heard that Agile was good, so relabelled some bad practice, Or did not learn it properly and made something up.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-02T09:52:33.707" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4000" PostTypeId="2" ParentId="3998" CreationDate="2017-11-29T18:43:02.487" Score="4" Body="&lt;p&gt;Don't subvert the very purpose and essence of agile development: the ability of the product owner to re-target the project (almost) instantly and make changes and adjustments to the backlog as business conditions dictate. The alternative of specifying everything at the start has failed repeatedly in long running projects in which it makes no sense whatever to follow the initial plan. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of what I write below assumes you (or a future reader) is familiar with the terminology and the purpose of the various roles and tasks. To try to be complete would require a text-book. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to separate the developer group (Devs) from the product owner (PO) (person or group). I normally do this randomly, but other things might work. The PO has control of the backlog and releases features from it per iteration. The developers don't see the whole thing other than in overview form at the start. If you don't want the Devs to do estimation you aren't doing agile, so they should do that, per iteration for the most currently relevant cards (features). Then they give the PO a &quot;velocity&quot; that will determine how many features can be in the iteration. If you are doing a project in one term, iterations should be short (1 week?) and small. But even if they don't estimate time per task, having been pre-determined, then they should still give velocity, having seen a few of the features desired now. Otherwise they will just be frustrated by too much work in too little time. That leads to burnout and is not agile. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside is that the PO doesn't get to develop. That may be an advantage depending on the makeup of your student group, or not. I prefer to be the PO myself so that I can throw in a kink or two along the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As ctrl-alt-delor says, you need to prevent speculative, build-ahead, development. You have to be fierce in rejecting all attempts at it. Not showing the entire backlog helps with this, but simply rejecting any feature produced speculatively is needed. The problem is that your students have likely gotten in to one bad habit. They have probably in the past been given partly specified projects and assignments where &quot;creativity&quot; is valued. So they try to get creative, by their own definition, ignoring the needs of the PO. In the real world it seldom works that way (Startups excepted) and you need to learn to work to someone else's vision not your own. So you need to make that work in the class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The following is speculative and I haven't tried it. If you really want every student to experience every role then do this: Appoint a PO somehow for the first iteration and they hold that role throughout. Accepting or rejecting (with your guidance) backlog items as they are &quot;completed.&quot; Then at the end of the iteration rotate roles so that the old PO becomes a developer and some other student takes on the PO role. They will need some time to become familiar with the backlog, however, so it probably can't happen that the iteration ends one day and a new PO takes over and specifies the next iteration immediately. A negative aspect of this is that the old PO will have knowledge they shouldn't have (and wouldn't have) in reality which may make them eager to speculate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also require the &quot;small-ball&quot; skills (sorry, US baseball term) that Extreme Programming suggests. I.e. personal skills: pairing, test first, etc. Pairing will help them teach one another and build team skills. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility for doing a course on Agile Development, though it doesn't match your stated requirements is as follows. (I say this as others may benefit). Instead of one large project have a bunch of tiny projects with 10 minute features and 30 minute iterations. If you run a course in 3 hour segments this can be made to work. In fact, I know of one real-world outfit that does this sort of thing on real (i.e. large) projects - maybe one hour iterations.  With such a scheme a person is PO for one project but will take a different role the next day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point in any agile course, trying to be realistic, you need to throw a curve-ball (sorry). Change the backlog/project-direction in some fundamental way. Estimate from the current code-base and move on as usual. It really happens that way (experience here) and also shows that the word &quot;agile&quot; actually means something. Trying to make the initial requirements too precise is also a problem/trap  that will encourage speculation. Real agile projects don't work that way. The initial backlog is pretty vague about specifications. It is only as you approach the iteration in which a feature appears that it becomes specific. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will need to guide the PO so that they do sensible things. You will probably need to be the project Coach. If you need to ease the development you could provide some of the tests (unit tests) to guide the developers. After doing this initially they can take over. But you need to give them advice (as coach) on the quality of their tests.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I've merged ideas from both Scrum and XP here. Scrum works well for the overall management (Backlogs, acceptance...) and XP for the day to day tasks (pairing, testing...). If you don't require day-to-day level skills the students will probably just thrash. Agile requires discipline, which is often missed - especially by those who reject it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is more to say, of course. But the bottom line is that to &lt;em&gt;teach agile&lt;/em&gt; you need to &lt;em&gt;be agile&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-11-29T18:43:02.487" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4001" PostTypeId="2" ParentId="3998" CreationDate="2017-11-29T22:52:03.773" Score="4" Body="&lt;p&gt;The biggest issue I see is that you are taking your curriculum and trying to approach it using SCRUM terms.  The result is a lot of &quot;almost SCRUM&quot; behaviors which could be tremendously damaging.  I've seen many SCRUM teams fail because a Product Owner or Scrum Master forced &quot;almost SCRUM&quot; mentalities on the team.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of taking your curriculum and trying to approach it with SCRUM terms, I recommend starting with the &lt;a href=&quot;https://www.scrumalliance.org/why-scrum/scrum-guide&quot; rel=&quot;nofollow noreferrer&quot;&gt;SCRUM process&lt;/a&gt;, and trying to apply it to your curriculum.  The reason I think this will work better is because SCRUM is designed to produce a product, such as the learning of your curriculum.  Your curriculum is not necessarily designed to operate in SCRUM.  Let SCRUM take charge, and do what it's good at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One key aspect of this application is that you are going to wear three hats: Product Owner, Scrum Master, and Manager.  Manager is not actually a SCRUM role, but it is essential for stability.  If a real life SCRUM team refuses to build sprints which support the Product Owner sufficiently, That PO will have a talk with the functional management of the team and everyone will be receiving bad performance reviews for the year.  The school-house equivalent for that is being given a bad grade.  Thus, &quot;support of the SCRUM process&quot; should be a line item in your grades for the students.  Maybe you tell the students that the first 10-20% of their grade is &quot;free&quot; unless they disrupt the SCRUM process enough to force you (as the PO) to have a talk with yourself (as the manager).  If you coach it right, they'll think of it as a free A on a test or something like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that ugly manager hat out of the way, we can look at the other ones.  Product Owner will be the most interesting.  Like an industry PO, you have an obligation to produce a product for your customer: your administration and these children's parents expect learning.  Explain to the students that, when you're wearing the PO hat, your job is to deliver the curriculum to the expectations of these customers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would expect two major styles of behavior here.  If the students are on-pace with the curriculum, the PO should operate like any real-life product owner would: egging the team on to produce more product faster, and maybe giving them more freedom to craft the backlog the way they want to see it.  However, if the students are falling behind (i.e. the PO may not be able to deliver the &quot;learning&quot; to the customer), and the students aren't ameliorating this in their sprints, the PO should start tightening the reins offering less agility, and instead picking sure-fire ways to cover the material (which are probably more boring), and you will be talking with yourself (as Manager) about those SCRUM grades.  The students should understand this up front.  If they start to fall behind, there should be a desire on their part to resolve the issue &lt;em&gt;before&lt;/em&gt; the PO comes in and takes away their freedoms.  It should be easy enough for them to understand, but knowing how the game works up-front is key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then there's the Scrum Master.  The SM is known as the &quot;servant-leader&quot; of the team.  They are there to facilitate the team in any way needed to make the SCRUM team successful.  Note how different that job description is from the PO.  You are going to need to make it &lt;em&gt;very&lt;/em&gt; clear when you are acting as SM and when you are acting as PO.  This might actually involve funny headgear, or it might just involve some metacommunicating to tell people who you are acting as.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, let's recognize that this SCRUM effort is an experiment.  It might not actually fit well into the school model.  What happens if it's a bad match?  The first thing that you'll notice is that you (as PO), start to get unhappy because you're not delivering &quot;learning&quot; on-time.  You're falling behind schedule.  The PO is then going to push on the team to produce more.  As SM, you then need to work with them to try to plan better sprints to meet the PO's needs.  Now in this case, we're looking at the case where this fails.  Now the PO is extremely unhappy and is ready to talk to the Manager about how bad the team is performing (and take away their SCRUM support grade).  At this point, you might need to do some metacommunication to recover:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So I wanted to try to run this class in a SCRUM setting.  As you've seen from my emails to you guys as Product Owner, I'm not happy with the results.  Your SCRUM effort is simply not working.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;At this point, a real Product Owner and a real Scrum Master would sit down and talk about what's going on.  They'd try to identify the root cause.  So as Scrum Master, the servant-leader of the group, I'd come to the table arguing that the team is actually doing their job, the task was just too big.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;At this point in the semester, I, as Product Owner, agree with the Scrum Master.  You guys have done your job making SCRUM work as best as it could.  The curriculum just doesn't fit.  So as Product Owner, I'm deciding to terminate the SCRUM and go back to a traditional teaching approach.  Since its clear you guys did your job for making it work, I'm not going to the Manager to try to ding you guys for your performance.  You did great.  You all get the 20% SCRUM support points.  But instead of it being part of scrum, it's just going to be like it was a Test.  It's like a test you didn't have to study for, and you all got A's.  Congratulations.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Now back to your regularly scheduled classroom.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can you see how murky that would be if you blurred the 3 hats?  It needs to be clear that, in this process, you will have at least 1 person in your corner: your Scrum Master.  If they can't see that, they may rebel against the idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now sprint planning will be the last major challenge I think.  There's a few issues here.  One is that you have too many people on the team.  SCRUM teams work best in small numbers.  A classroom is likely too many.  You will probably have to adapt the sprint planning process to fit reality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other challenge in planning is that your students aren't the experts here.  You are.  They don't really know enough to break down the backlog items into tasks that can fit into the sprint.  As a result, you may have to help.  As part of the Product Backlog, you may want to provide suggestions for how to approach each curriculum item (such as &quot;Lecture&quot; and &quot;Problem set A&quot; and &quot;Problem set B&quot; and &quot;Research&quot;), along with some way of estimating how long the task should take.  Let them assign the story points -- it's an essential learning process for SCRUM.  If they want to try to learn the curriculum in a different way from what you provided, then you may need to introduce the concept of the Sprint Goal, and explain how they can use that to provide cohesion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, do remember flexibility.  As a PO, you are going to have to demonstrate to your customers that these students learned the material.  That's all.  If you can work with them to find clever ways to demonstrate that they are learning what they need to learn, then always let them deviate from the obvious curriculum.  If you're teaching sockets, do you really need the backlog item &quot;Learn to use &lt;code&gt;select()&lt;/code&gt;?&quot;  Or can we add a new item &quot;use asynchronous threads to add functionality to the awesome product produced last sprint?&quot;  The answer really depends on how much freedom you have in your curriculum.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2017-11-29T22:52:03.773" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4002" PostTypeId="1" AcceptedAnswerId="4004" CreationDate="2017-11-29T23:26:05.513" Score="10" ViewCount="439" Body="&lt;p&gt;I was reading Ben Franklin's biography(the one by Walter Issacson), and it describes his method for learning to write: he would take excellent essays, jot down the basic ideas, then try to reconstruct them some time later and compare his version to the actual essay. It occurred to me that this could fairly easily be applied to programming. Has this kind of technique ever been studied? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Side question: does anyone know of a library of excellent programs to learn from?)&lt;/p&gt;&#xA;" OwnerUserId="1415" LastActivityDate="2017-12-11T20:10:12.177" Title="&quot;Franklin&quot; Method for learning good programming?" Tags="|self-learning|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4004" PostTypeId="2" ParentId="4002" CreationDate="2017-11-30T16:49:18.933" Score="10" Body="&lt;p&gt;I have thought it strange that we teach students to write programs before we teach them to read them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A short time ago I read about some research about this. It stated that the problem is finding good programming works that is of a standard similar to the standard of great literary works. They may exist, but no one has compiled a collection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They would have to be at least:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Free Software / Open Source.&lt;/li&gt;&#xA;&lt;li&gt;Well written.&lt;/li&gt;&#xA;&lt;li&gt;“Reading age” appropriate. (That is programming reading age)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I will try to remember where I read it, and report back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could be one of these:&#xA; - Mind-storms — Seymour Papert (page &amp;lt; 116 (I am up to page 116) )&#xA; - Hacking The Curriculum — Ian Living Stone &amp;amp; Shahneila Saeed (page &amp;lt;= 72)&#xA; - &lt;a href=&quot;https://helloworld.raspberrypi.org/issues/3&quot; rel=&quot;noreferrer&quot;&gt;Hello Word magazine issue 3&lt;/a&gt;&#xA; - Somewhere else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry I can't find it. It is most likely in the 1st, then the 2nd etc. If I find it then I will update. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-11-30T17:01:57.317" LastActivityDate="2017-11-30T17:01:57.317" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4005" PostTypeId="2" ParentId="76" CreationDate="2017-12-02T10:32:10.363" Score="0" Body="&lt;p&gt;This answer based on what I found as a professional programmers. What helped me to become a better programmer.&lt;/p&gt;&#xA;&lt;h1&gt;Immediate feedback&lt;/h1&gt;&#xA;&lt;p&gt;I found that immediate feed back helped, a lot.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;full auto indent: not just indent the same as line above (I have seen this called auto indent, it is not). It must do it for you, it must get it correct all of the time.&lt;/li&gt;&#xA;&lt;li&gt;text colouring.&lt;/li&gt;&#xA;&lt;li&gt;bracket closing, including &lt;code&gt;&amp;lt;/blabla&amp;gt;&lt;/code&gt; or equivalent. It must get it right, and it must skip over the close bracket if I type it.&lt;/li&gt;&#xA;&lt;li&gt;auto newline: I type &lt;code&gt;:&lt;/code&gt; (python) or &lt;code&gt;{&lt;/code&gt; (C languages), and it adds a newline character (and indents).&lt;/li&gt;&#xA;&lt;li&gt;reversible backspace: when I press backspace it undoes exactly one key stroke, &lt;strong&gt;including all of the auto stuff&lt;/strong&gt; (I have worked with editors where I spent more time undoing auto stuff, from occasional typos, than it saved me when I got it right).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Linters&lt;/h1&gt;&#xA;&lt;p&gt;This had a mixed effect within the team.&lt;/p&gt;&#xA;&lt;p&gt;The better programmers, read the feedback, and changed the way they programmed for the better. In the short term there programmes improved because they reacted to the feedback. In the long term, them stopped making the mistakes.&lt;/p&gt;&#xA;&lt;p&gt;However for some of the programmers, they found clever ways to get the linter to be quiet, but did not address the underlying issue that the linter was trying to warn them about. To tackle this issue, I gave permission to everyone in the team, to use the lint comment to temporarily disable a warning or informational, without having to ask any one. This way the problem was not hidden. We could then &lt;code&gt;grep&lt;/code&gt; (a file search tool) for the lint comments, and review the code. If needed we would run group or one-to-one training sessions on what the lint warning was trying to say (what the risk was).&lt;/p&gt;&#xA;&lt;p&gt;Most programmers understood the errors, as there is no ambiguity. But for warning, it is just saying “Warning doing it like that can lead to errors.”. This allows the ego to say, “But &lt;strong&gt;I&lt;/strong&gt; know what &lt;strong&gt;I&lt;/strong&gt; am doing.”. Sometimes we do, but mostly Lint was correct.&lt;/p&gt;&#xA;&lt;p&gt;Some people see the [error] message as the error, so try to eliminate the message. There needs to be training on error/warning messages.&lt;/p&gt;&#xA;&lt;h1&gt;My experience tutoring a student in Java Eclipse.&lt;/h1&gt;&#xA;&lt;p&gt;A lot of the feedback given by eclipse is counter productive. The student reacts to the errors, without thinking. Just moving stuff about, and forgetting what they are trying to do.&lt;/p&gt;&#xA;&lt;p&gt;The feedback is getting in the way of Test Driven Development: Only write code to make a test pass. To do this you have to write code that uses functions, procedures and variables that don't yet exist. The IDE tries to help, but it can't. It will sometimes change what is typed, and the student then seems to think that is what they intended to type.&lt;/p&gt;&#xA;&lt;p&gt;(When I was learning to drive the instructor would say turn left at the next junction. When I got to a junction I would check to see if I was signalling in that direction, if so I would make the turn. All I could remember what turn at next junction, but not which way. If the car had auto-corrected me, I would have gone the wrong way.)&lt;/p&gt;&#xA;&lt;p&gt;Some of the help that it give is useful. However if your work-flow differs from that of the IDE designers, then it is more of a hindrance than a help.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-06-10T11:33:02.933" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4006" PostTypeId="2" ParentId="137" CreationDate="2017-12-02T19:56:31.387" Score="1" Body="&lt;p&gt;3 bits per octal digit was convenient on old time machines which used words of  12, 18, 36 bits words. Easier to do mental calculations than with  hexadecimal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you have the PDP family : PDP-1 &amp;amp; 4 are 18 bit machines, PDP-2 24 bits, PDP-3 and -6  36 bits, PDP-5 12 bits, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PDP-11 was a 16 bit machine, but as far as I remember the documentation explained low level stuff with octal numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the time, characters were often coded on 6 bits (IBM 704 BCD, DEC SIXBIT, ...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://en.wikipedia.org/wiki/Six-bit_character_code&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Six-bit_character_code&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the fundamental question is: why are you teaching numeration systems at all? Did you ever have to explain why&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int month = 09;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is refused by the C compiler (and lots of modern languages), where as 07 and 10 are ok? And 012 is october?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll &lt;em&gt;have&lt;/em&gt; to talk about octal numbers, even if you don't want to! :-)&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-12-04T15:25:49.113" LastActivityDate="2017-12-04T15:25:49.113" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4007" PostTypeId="2" ParentId="327" CreationDate="2017-12-04T19:44:38.377" Score="2" Body="&lt;p&gt;&lt;em&gt;(This answer is from &lt;a href=&quot;https://www.reddit.com/r/CSEducation/comments/7cvo97/taking_notes_in_class/dpw1042/&quot; rel=&quot;nofollow noreferrer&quot;&gt;cdsmith on reddit&lt;/a&gt;. CDSmith does not wish to post here, but did not mind if the answer that they provided was also posted here, which is being done in an attempt to add value to both communities:)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach at a much younger age, but just for kicks, here's what I do for middle school students.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I actually try to avoid note-taking, because I try to avoid lecturing for long enough that it's worth time for them to take out paper and writing instruments. So there are opportunities for significant note-taking maybe once every three classes.&lt;/li&gt;&#xA;&lt;li&gt;Notes are taken by hand. I just cannot keep everyone on-task while lecturing unless I instruct them to close computers.&lt;/li&gt;&#xA;&lt;li&gt;I give them a structured outlines to fill in for notes, but try to ensure that the outline organizes the content in a different way from the lecture. The goal is to move them from transcribing the words of the lecture to summarizing into their own synopsis, with some original thought about the meaning.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This form of structured note-taking would obviously be resented at the college age, and I'm not advocating it there. But it wouldn't be awful advice to give at the college level as well.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-12-04T22:41:41.753" LastActivityDate="2017-12-04T22:41:41.753" CommentCount="0" CommunityOwnedDate="2017-12-04T21:56:21.870" ContentLicense="CC BY-SA 3.0" />
  <row Id="4008" PostTypeId="2" ParentId="327" CreationDate="2017-12-04T19:46:50.703" Score="2" Body="&lt;p&gt;&lt;em&gt;(This answer is from &lt;a href=&quot;https://www.reddit.com/r/CSEducation/comments/7cvo97/taking_notes_in_class/dpuamc9/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ImaginationGeek on reddit&lt;/a&gt;. ImaginationGeek does not wish to post here, but did not mind if the answer that they provided was also posted here, which is being done in an attempt to add value to both communities:)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The responses here seem well intentioned, but have a few faulty assumptions.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;“Students are adults.” Legally, yes (with a few uncommon exceptions). However, there is a huge gulf of maturity between an 18 year old and the same person at 23. For that matter, the 23 year old will continue to mature for several more years... Of course there is individual variance, but don’t overestimate how mature college students actually are.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;“They know what note taking method works best for them.” I doubt it, in most cases. Most of them probably can’t actually distinguish what helps them learn best... they do know what helps them take notes the easiest and may assume that’s best, but for learning it’s usually not. Also, they only know what they’ve tried, and probably don’t think to try different things (especially “harder” ones), let alone research and seek out novel alternatives they may not have thought of before.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The unstated assumption: “Their note taking choice affects only them.” Superficially, this is true... but when their “choice” is to take notes on a laptop, but then they end up on (e.g.) Facebook and the students behind them are watching over their shoulder, their choice is then distracting other students. (You won’t know from the front of the classroom whether they have OneNote or Twitter open on their laptop. You think you will but you won’t - just do a classroom observation and you’ll see.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So what do I do? Well, I do leave it up to them mostly, but I don’t allow electronic devices, with a few exceptions... they 1. are not as effective for learning as hand written notes and 2. it’s too hard to draw the kinds of technical diagrams that my classes use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have been allowing tablets with a stylus, if they ask me, because that fixes #2 and all the research I know if for #1 is based on keyboard input, so it’s not clear which way stylus input falls for actual learning... (if anyone has info about stylus notes, please let me know!)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-12-04T22:41:54.987" LastActivityDate="2017-12-04T22:41:54.987" CommentCount="0" CommunityOwnedDate="2017-12-04T21:56:54.237" ContentLicense="CC BY-SA 3.0" />
  <row Id="4009" PostTypeId="1" CreationDate="2017-12-04T19:59:49.433" Score="4" ViewCount="164" Body="&lt;p&gt;We are about to study the y-combinator as a culmination of lambda calculus, and I would like a shortish lab activity that is related to this idea.  We are currently working in Scheme, though I don't consider that to be important at this stage.  What I want (and what I lack) is something interesting that students can &lt;em&gt;do&lt;/em&gt; with the concept of a lambda expression that takes itself and then acts recursively.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2018-01-01T15:39:07.500" LastActivityDate="2018-01-01T15:39:07.500" Title="A lab activity for the Y-Combinator" Tags="|labs|lambda-expressions|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4010" PostTypeId="1" CreationDate="2017-12-05T17:05:54.733" Score="27" ViewCount="8348" Body="&lt;p&gt;When I did customer service for an application I was developing, I found that most of the time, if I did NOT answer the phone, the user would figure out their problem and learn more than if I did answer. Some people would just call up any time the slightest thing happened, if I kept answering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With students, when I am in class and they are working on coding assignments, the same thing can happen: they will ask any old question that pops in to their head because I am sitting 5 feet away (usually trying to grade assignments or prepare to lecture). Sometimes the questions are quite elementary. Other times, it amounts to structuring a complex If-Else or something that they could do, but they have difficulty with. The only 'help' I can give is to explain how it should function. They learn that way, but then I become the Oracle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do often deflect questions or look at the problem they are having to know that it is something I have taught and then say I need them to work at it a bit more, but this seems to happen a lot. If I was not there, they would be forced to work it through themselves. Is there a way to encourage the students to be more independent, because I have not found it yet.&lt;/p&gt;&#xA;" OwnerUserId="3673" LastActivityDate="2017-12-21T21:32:57.267" Title="How to stop being The Oracle" Tags="|classroom-management|labs|active-learning|" AnswerCount="11" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4011" PostTypeId="2" ParentId="4010" CreationDate="2017-12-05T19:41:44.203" Score="8" Body="&lt;p&gt;&lt;em&gt;(You didn't say what ages your students are, so this answer is necessarily a little nonspecific.  There is also an article &lt;a href=&quot;https://www.edsurge.com/news/2017-01-19-teaching-kids-to-debug-code-independently&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt; that you may find helpful.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First and foremost: don't expect total victory in this regard.  Your students ask you because it is frustrating to be stuck, and it is perfectly natural to try to find the quickest path out of frustration.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want them to take another approach, you may find it worth your time to invest some actual classroom time in teaching how to debug.  One way is to get &quot;stuck&quot; while coding in front of the class, and then go through the process of debugging it.  Very carefully model the behaviors, then stop, and ask the students to reflect.  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Why didn't I just ask the teacher for help?  Oh, right, I &lt;em&gt;AM&lt;/em&gt; the teacher.  So, why didn't I just give up?  What strategies did I actually use to uncover the bug?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A second approach could be to celebrate very visibly when a student debugs on their own.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Hey everyone, so-and-so was just stuck, but he didn't let that stop him.  So-and-so, can you tell the rest of the class how you went about solving your problem?  What did you try?  How did you do it?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If this happens semi-regularly, and you continually emphasize fix-up strategies, you may make some meaningful headway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third approach, which is more forceful, is to use a page (like &lt;a href=&quot;http://stopwatch.online-timers.com/multiple-stopwatches&quot; rel=&quot;noreferrer&quot;&gt;this&lt;/a&gt; or &lt;a href=&quot;http://www.online-timers.com/multiple-timers&quot; rel=&quot;noreferrer&quot;&gt;this&lt;/a&gt;) with multiple timers.  Students who have a question for you don't necessarily get you.  Instead, you simply set a timer.  (Having a second monitor display to a projector would help with this approach.)  Only if the timer reaches 5 minutes and the problem still isn't solved can they ask you for help.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-05T19:41:44.203" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4012" PostTypeId="2" ParentId="4010" CreationDate="2017-12-05T20:12:26.160" Score="31" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Rubber_duck_debugging&quot; rel=&quot;noreferrer&quot;&gt;Rubber Duck Debugging&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few years ago we bought a bunch of cheap rubber ducks. Students with questions have two options. They can either ask their neighbor or explain to the duck what they're trying to do. If the duck didn't help, then they can ask me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've moved to a different school since then and haven't bought any ducks. I really need to buy some ducks. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-12-05T20:12:26.160" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4013" PostTypeId="2" ParentId="4010" CreationDate="2017-12-05T21:03:40.833" Score="5" Body="&lt;p&gt;Students will act according to the habits they have built up. The one they have isn't terrible, but you can work to improve it. This answer won't save you much time, initially, but if you can change the habit then everyone wins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When asked a question you need to find a way to get them to respond first, somehow. There are various possibilities. The classic way is mentioned elsewhere here - ask them what the tried already. Their response needs to come before yours. If they have nothing to say, just tell them to think about it until they have a failed solution they can discuss, preferably along with the reason it doesn't work, as they view it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a simpler and more devious solution is just to turn it around. When asked &quot;How can I do wxyz?&quot;, respond as follows: &quot;If I just asked you the same question, how would you &lt;em&gt;begin&lt;/em&gt; your answer?&quot; They don't need to say much, just the beginning. It may be enough to trigger their own knowledge, but it may also help you see their block and give them a minimal hint to continue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The keys here are &quot;you (i.e. student) first&quot; and &quot;minimal hint&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they know that you won't save them a lot of thought and work that they can do themselves, maybe they will be more proactive about their own solutions, but the habit needs to be built. Work on that part. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me note that the problem expressed in the question can arise in a variety of contexts, not just students working in a lab. The solution isn't really to help them learn how to debug, but rather, how to think. Especially, how to work through any problem as it occurs.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-07T15:54:14.003" LastActivityDate="2017-12-07T15:54:14.003" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4014" PostTypeId="2" ParentId="4010" CreationDate="2017-12-05T22:07:46.960" Score="1" Body="&lt;p&gt;Randomly be &quot;too busy with something&quot; for a few minutes, but say you'll get back to them.  Then set a timer, and then check with them some number of minutes later.  Reward them (somehow, depending on age group, etc.), publicly if possible, if they figured out all or part of the solution themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This allows you to provide help (for issues where you really are the expert &quot;oracle&quot;) while also giving random intermittent reinforcement (the best kind) for them figuring out the problem themselves.  (Note: this works for co-workers as well as students.)&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2017-12-05T22:07:46.960" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4015" PostTypeId="2" ParentId="4010" CreationDate="2017-12-06T10:06:04.900" Score="-5" Body="&lt;p&gt;It's very simple but it make your students hate you. Ask them to do it on their own, using the materials you provided in class. For each question that they ask you, deduct a point. If they care about their grade, they will try to ask you as few questions as possible or will seek help from each other, both beneficial outcomes.&lt;/p&gt;&#xA;" OwnerUserId="3687" LastEditorUserId="58" LastEditDate="2017-12-13T01:44:03.663" LastActivityDate="2017-12-13T01:44:03.663" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4016" PostTypeId="2" ParentId="4010" CreationDate="2017-12-06T18:13:58.900" Score="3" Body="&lt;p&gt;The best thing they can learn from you is not a memorized answer - it's the process by which you solve problems. Instead of giving them the answer, instead of telling them to go find the answer themselves, walk them through the process of solving the problem, step-by-step. It takes more of your time initially, but they'll be stronger coders over time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, &quot;How do I sort a list?&quot; Of course, there are many possible solutions, but pick one consistent with their level of understanding and with the class. Then, walk them through it. &quot;What if the list just had two elements?&quot; &quot;What if we repeatedly broke the long list into smaller lists?&quot; Or something along those lines, depending on the way you approach the solution.&lt;/p&gt;&#xA;" OwnerUserId="2769" LastActivityDate="2017-12-06T18:13:58.900" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4017" PostTypeId="2" ParentId="3975" CreationDate="2017-12-06T19:52:50.307" Score="4" Body="&lt;p&gt;Expanding on &lt;a href=&quot;https://cseducators.stackexchange.com/a/4003&quot;&gt;hotpaw2's answer&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If you have a Mac&lt;/strong&gt;, you can use Swift Playgrounds in Xcode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allows you to type code and see the results immediately, like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/IHKeE.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/IHKeE.png&quot; alt=&quot;Swift Playgrounds Example&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It only supports Swift, Apple's new language for making Mac and iOS applications. You can find out more about it over &lt;a href=&quot;https://swift.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. It's a good language for small things like learning programming, but it scales up to entire applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This all comes with &lt;a href=&quot;https://developer.apple.com/xcode&quot; rel=&quot;nofollow noreferrer&quot;&gt;Xcode&lt;/a&gt;, which you can download for free &lt;a href=&quot;https://itunes.apple.com/us/app/xcode/id497799835?mt=12&quot; rel=&quot;nofollow noreferrer&quot;&gt;from the App Store&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3700" LastEditorUserId="3700" LastEditDate="2017-12-06T20:12:00.100" LastActivityDate="2017-12-06T20:12:00.100" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4018" PostTypeId="2" ParentId="3920" CreationDate="2017-12-06T21:38:50.960" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;A student suggested that &lt;strong&gt;event listeners are like arrays&lt;/strong&gt;. After discussing it, the connection the student saw, was that you could add or remove items &lt;strong&gt;from arrays&lt;/strong&gt; and you can add and remove event listeners &lt;strong&gt;from elements&lt;/strong&gt;.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To expand on my comment on the OP, there are two comparisons being made here and I suspect getting muddled between these is the source of the confusion. Depending on which one the student was going for will determine whether the student was correct or not.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;event listeners vs arrays&lt;/li&gt;&#xA;&lt;li&gt;collections of event listeners (contained within a DOM element) vs arrays&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In this case I would argue that the second case is not wrong given that their interfaces are similar (that they are both collections, in the same way that a herd of sheep is similar to a herd of zebras).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Nothing the student said was incorrect&lt;/strong&gt;, but I was concerned saying &quot;yes, event listeners are like arrays&quot; wasn't a terribly useful analogy in reasoning about either construct.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As above, it depends on exactly which comparison is being made as they are very distinct claims.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar analogy would be to consider a room in a building being similar to a car (in that it can contain people and people can sit down and you can have a radio playing) &lt;strong&gt;but...&lt;/strong&gt; then claim a human is similar to a car (as opposed to claiming that &quot;things which can contain humans&quot; are similar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How to handle it in the classroom..&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I applaud you for taking the time/effort to dig a little deeper into understanding the student's (mis-)conceptions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally I have found being completely upfront with students that I'm not an oracle with all the answers (but that I am happy to have a think about it and/or work through it with them) has been successful. Specifically, by explaining that it seems to fit/work well at the moment based on what has been said, but there are some significant(?) differences and/or nuances where the analogy falls down but right now I am struggling to understand/explain how and why - followed by asking if it is okay to move on for the moment and later take some additional time to properly think about it before getting back to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to think that students appreciate the honesty and that the frankness/openness that, sometimes, everyone (including teachers) needs to ask questions/go away and think about things regardless of skill level - i.e. that it's okay for them as novices to do so also!&lt;/p&gt;&#xA;" OwnerUserId="3697" LastActivityDate="2017-12-06T21:38:50.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4019" PostTypeId="2" ParentId="4010" CreationDate="2017-12-07T00:21:22.987" Score="3" Body="&lt;p&gt;Think through how you debug, and try to make it as explicit as possible. Make up a check-list. When students ask you for help, quiz them about what they did regarding the items on the check-list. &quot;Did you look up the documentation?&quot; &quot;Did you write up your best guess and run it, even if you thought it would fail?&quot; &quot;Did you look for an example of code that does something similar?&quot; &quot;Did you check what the shape and contents of your variables are?&quot; etc. Have them work through their problems with each other.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Other times, it amounts to structuring a complex If-Else or something that they could do, but they have difficulty with. The only 'help' I can give is to explain how it should function. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you try hard enough, in many situations you will be able to give them other help. Ask them to explain their thinking, what the code so far does, what happens with a sample input, etc.&lt;/p&gt;&#xA;" OwnerUserId="3225" LastActivityDate="2017-12-07T00:21:22.987" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4020" PostTypeId="2" ParentId="3881" CreationDate="2017-12-07T01:58:42.277" Score="2" Body="&lt;p&gt;I'm going to be quite honest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Why the heck do you care?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if there was such a thing, you could never know if that student was truly in that category of unable, or if it just hadn't clicked for them yet. You could never know if you were biased, if the student had never learned how to learn, if something else was going on you didn't know about, if a previous teacher had mistaught them, if, if, if.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if there was such a thing, it shouldn't impact your judgement.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If a student is struggling, there's a couple of important things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do they understand any prerequisites necessary?&lt;/li&gt;&#xA;&lt;li&gt;Do they know how to learn?&lt;/li&gt;&#xA;&lt;li&gt;Do they remember what they've learned in the past?&lt;/li&gt;&#xA;&lt;li&gt;Do they understand what they've learned in the past?&lt;/li&gt;&#xA;&lt;li&gt;Do they know how to build up on what they've learned in the past?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;By prerequisites I mean primarily math skills. There are plenty of kids in my grade who struggle with basic math facts like 5*9, or order of operations. That inability also damages coding ability. Further, a lot of the logic taught in math comes over to CS/coding. Math practice may be necessary to help give them more confidence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of students don't know how to learn. Maybe they've had it easy in school. Maybe it's been hard for them all along and they've just checked out. Maybe they've been struggling but don't really know how to do it other than cram for a test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach them how to learn - taking notes, understanding conceptually, understanding practically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of students, especially in countries where there's a summer break, forget a whole lot over the summer, over the months, etc. Do they even remember what they've learned? I sure as heck couldn't tell you what we talked about a year or two ago. Do they remember what a variable is? Do they remember how loops work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if they remember the concepts, it's even harder to actually understand them, and be able to apply them themselves in their own thinking. Explore what they mean beyond just definitions and coding, but what they mean intuitively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly, perhaps they know and understand concepts, but they don't know how to build on them. That requires practice and patient teaching, and then a little waiting for that aha! moment when it all clicks and settles into the framework of what they've learned. Help them make connections to other topics. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I said earlier in this, &quot;even if there was such a thing&quot;. I don't believe there is such a thing. I don't exactly have evidence to back it up. I just have two reasons.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;People are amazing. I could tell anecdote after anecdote about someone who would have looked, to teachers, below average - but as a friend I could see that they were way more intelligent than the teachers thought.&lt;/li&gt;&#xA;&lt;li&gt;I can't believe that as a matter of principle. If other people might be limited at learning, I might be too. I don't want to think that. I want to believe that with enough hard work, I can learn what I wish to learn. Sure, others might, probably will be, better at it than me. But I believe I can learn it, whatever it may be.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastActivityDate="2017-12-07T01:58:42.277" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4021" PostTypeId="2" ParentId="327" CreationDate="2017-12-07T06:12:46.987" Score="2" Body="&lt;p&gt;I conduct hands-on, interactive workshops, which means there is a lot of discussion on any concept I teach, and after some discussion the attendees start coding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't allow the computer to be open when we're discussing something in the classroom because it causes distractions. With laptops closed, they're fully focused, and when it's time for coding they can get back to their laptops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that different people have different learning mechanisms, but for trainings that I conduct, I've noticed a big difference in learnings when the laptops are closed.&lt;/p&gt;&#xA;" OwnerUserId="3215" LastActivityDate="2017-12-07T06:12:46.987" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4023" PostTypeId="2" ParentId="4010" CreationDate="2017-12-07T09:11:06.747" Score="4" Body="&lt;p&gt;It sounds like you don't want to deflect them when they need help but would like them to become more self-directed and learn to solve the &amp;quot;easy&amp;quot; stuff themselves.  One teaching technique that I have found useful for this, no matter the subject, is &lt;em&gt;questioning&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It is relatively easy (once you become practised with it) and allows you to help the student as well as encourage them to think for themselves and become more self-driven over time. (Yes, there are always exceptions.) Essentially, as the term suggests, it involves asking the student to provide answers by asking useful questions, thereby teaching them how to work it out for themself.&lt;/p&gt;&#xA;&lt;p&gt;How you apply it (in your own style, that is) is something you need to discover, but it can be from the simple:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Student: What's a string?&lt;/p&gt;&#xA;&lt;p&gt;You: Do you remember when we covered types like strings, integers, booleans...? (you've given them a context and the chance to make some connections)&lt;/p&gt;&#xA;&lt;p&gt;Student: Aaahhh.... Oh yeah, never mind.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Or maybe they have a mental blank, or missed that class:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Student: Nope.&lt;/p&gt;&#xA;&lt;p&gt;You: (Count to at least 5 before you say anything to give them time to think.) You know what an integer is? (Yes/no/maybe) So...?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And if they genuinely don't know:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You: A string is ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And you've covered more than they asked and (hopefully) they feel they've learnt something and not made fun of.&lt;/p&gt;&#xA;&lt;p&gt;Or for structuring a complex If-Else:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Student: How do I do ...?&lt;/p&gt;&#xA;&lt;p&gt;You: Have we done one of these before? Yes? Do you have the example there? So, this is like a question, &lt;em&gt;if&lt;/em&gt; something &lt;em&gt;then&lt;/em&gt; something otherwise - that's &lt;em&gt;else&lt;/em&gt; ... So, what's the &lt;em&gt;if&lt;/em&gt; part in what you have there? And then...?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It takes practice, and can work well. With this I've had student feedback that ranged from, &amp;quot;I really like the way he teaches us how to figure stuff out&amp;quot;, to, &amp;quot;He never answers any questions.&amp;quot; So YMMV. But by being positive and helpful you both get more out of it than by deflecting or just telling them the answer.&lt;/p&gt;&#xA;" OwnerUserId="3704" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-07T09:11:06.747" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4025" PostTypeId="1" CreationDate="2017-12-08T10:47:59.463" Score="4" ViewCount="363" Body="&lt;p&gt;I intend to teach some OOP methodology but everywhere I look, there are only syntethic examples and elaborations of various concepts of the OOP world (for example: what is inheritance, how to use interfaces).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/object-oriented-programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; or &lt;a href=&quot;http://www.c-sharpcorner.com/article/object-oriented-concepts-in-C-Sharp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm looking for is a tutorial of how to solve a &quot;real-world&quot; problem (can be fictious) but with all (or most of) the steps of these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How to analyze the problem?&lt;/li&gt;&#xA;&lt;li&gt;What are the objects?&lt;/li&gt;&#xA;&lt;li&gt;What should be taken care of?&lt;/li&gt;&#xA;&lt;li&gt;What classes should be created?&lt;/li&gt;&#xA;&lt;li&gt;What pattern is recommended?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I found a &lt;a href=&quot;http://www.itmaybeahack.com/book/oodesign-java-2.1/html/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;good book&lt;/a&gt; online but it is way too detailed to be a quick guidance - though not a bad start. Nevertheless, I'm looking for a shorter and more practice-oriented approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can see, I'd like to have a tutorial that teaches OOP as a whole and not its parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are mostly beginners but trying to use a wide range of OOP concepts - they have a few months of experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any example that has this kind of &lt;em&gt;tutorial structure&lt;/em&gt;?&lt;/p&gt;&#xA;" OwnerUserId="3714" LastEditorUserId="3714" LastEditDate="2017-12-08T17:39:40.607" LastActivityDate="2018-04-12T16:46:07.277" Title="Resource recommendations for teaching OOP via a practice-oriented example" Tags="|object-oriented-paradigm|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4026" PostTypeId="2" ParentId="4025" CreationDate="2017-12-08T13:30:27.650" Score="2" Body="&lt;p&gt;The best book I know that follows fairly closely to this format is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/B01FGPK6YS&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polymorphism: As It Is Played&lt;/a&gt;, which observes two students slowly build out a calculator.  True to form, the book takes the reader deeply into the mindset and core philosophy of OO.  It's a quick read with very short pages; it took me a few hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book also explores some important areas of the software development process.  Paired programming, which runs through the entire book, works well in the classroom (there are many questions about it here on this site), and aspects of Agile development are also explored.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-08T13:30:27.650" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4027" PostTypeId="1" CreationDate="2017-12-08T13:51:17.833" Score="8" ViewCount="293" Body="&lt;p&gt;Over in England the current model of assessing GCSE level programming (exams for 16 year olds) is being debated. A system where students had to program and write up solutions to a given scenario has suffered from &lt;a href=&quot;http://www.bbc.co.uk/news/education-42138037&quot; rel=&quot;noreferrer&quot;&gt;plagiarism&lt;/a&gt; to the extent that the exams might be withdrawn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are now asking ourselves what is the best way to assess programming? With three models emerging:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;On screen timed programming exam&lt;/li&gt;&#xA;&lt;li&gt;Open ended programming projects with report and/or questions about code produced&lt;/li&gt;&#xA;&lt;li&gt;Entirely paper based exam asking with code comprehension and writing of short code pieces&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;None of these models are without their problems and there are advocates for each of them. Does anyone have any good research that shows assessment model x is the best way to assess programming?&lt;/p&gt;&#xA;" OwnerUserId="48" LastEditorUserId="58" LastEditDate="2017-12-09T05:07:02.140" LastActivityDate="2020-11-28T09:29:58.360" Title="What's the best way to assess programming?" Tags="|assessment|imperative-programming|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4028" PostTypeId="2" ParentId="4025" CreationDate="2017-12-08T17:36:43.043" Score="1" Body="&lt;p&gt;There is “A touch of class” by Bertrand Myers. It is a very good book, at least a semester worth of learning in it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did not get OO, until I read it. I had previously done C++, java, C#, and some python. But when I read this book, I started to program OO properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book uses a language called Eiffel. It is a good teaching language, and also used in large systems, safety and mission critical systems. It is probably quicker to learn Eiffel then another language (or two), than try to learn other OO languages from scratch. (This is the authors clame, and my experience as a learner)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2017-12-08T17:36:43.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4029" PostTypeId="2" ParentId="4027" CreationDate="2017-12-08T18:11:33.010" Score="4" Body="&lt;h1&gt;Some related research&lt;/h1&gt;&#xA;&lt;p&gt;There has been some research into how to hire people: How do you select people that can do the job. The traditional methods rejects too many “good” people, and accepts too many “bad” people. It turns out that the best thing to do is to test them doing the job, and/or selecting for attitude.&lt;/p&gt;&#xA;&lt;p&gt;Therefore to test programming you should test programming (I don't care how good an essayist my heart surgeon is).&lt;/p&gt;&#xA;&lt;p&gt;Google is one of the companies that has done some research in this area. There will be others. I heard about this on &lt;a href=&quot;https://www.bbc.co.uk&quot; rel=&quot;nofollow noreferrer&quot;&gt;BBC&lt;/a&gt; Radio4, so there may be some info on there web site (good luck finding it).&lt;/p&gt;&#xA;&lt;h1&gt;Some other suggestion&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Open book: programming is not about memory (off line: to web pages downloaded before exam release).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Automated tests, for the coding section (tests written by the exam board). See test-first, and unit-testing.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look at what can be assess automatically, assess the rest manually (I think there is an article in Hello World issue 3).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To avoid plagiarism: Give them materials to work with, be open book, use exam conditions (multiple small exams).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It was suggested by one teacher: “pupils are messing up in the early stages, this is trickling through and causing pupils to loose marks in later stages as well. Therefore divide the test into multiple sections, the output of section one is not the input of section two (exam board provide inputs for each section, a different problem, the confusion does not propagate).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check for working code.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check big-O (run-time, and code size).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Check for good-name (of methods, and variable), over comments.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-11-28T09:29:58.360" LastActivityDate="2020-11-28T09:29:58.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4030" PostTypeId="2" ParentId="4027" CreationDate="2017-12-08T20:21:40.167" Score="2" Body="&lt;p&gt;I don't think there's a &quot;best way.&quot; I do a bit of a shotgun approach. No research to back this up, but it works well for me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lab Assignments&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the assignments we do in class are small lab style assignments. Average students can finish a few of these in a class period. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We do all of these online with an autograder. Students can submit their code as many times as they want by the due date to get a score they're happy with. I'd say until it's perfect, but some stop early with a &quot;good enough&quot; grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For these I encourage them to work together. They bounce ideas off of each other. They work through snags together. And, yeah, sometimes they straight copy each other. Fortunately, where I teach these are worth such a small part of their average that a little plagiarism here doesn't really help them much. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the biggest advantage here is that they're able to get instant feedback on their work and not wait for me to grade it. If they click the button and it didn't work they can go back and fix it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Free Response&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach CS AP-A, so the kids have a partially written test to prepare for at the end of the year. We do a lot of FRQs through the year on paper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of these are test grades and I hand grade them. We'll do maybe 20 or so of these throughout the school year. The limit to this isn't the students, it's how many I can grade. If I had minions who could grade for me I'd probably do one of these a week. But it's not realistic when I'm the only one grading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most are done on paper before they're let loose to put them on the computer, at which point it looks like the lab assignments above. The main difference is that they have to start on paper. Some days I have them show me and walk me through their work before they get on the computer. Some days I'll put a timer up and when it's done they can get on the computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Projects&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one is pretty new for me. It's something I started doing last year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Projects are really easy to cheat on. My first year teaching computer science I had 45 students turn in the exact same code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I started doing last year is splitting projects into two parts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first part is the actual project and they're graded on a rubric targeting specific methods. I count this as 70% of the grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other 30% comes from an on paper FRQ similar to the project. For example, we just finished a Black Jack project. One of the methods that they had to write for the project was a shuffle method. One of the FRQs was shuffling an array of integers. Should be really easy if they did the project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that splitting projects like this does a really good job of separating those that copy from a friend and end up with 0 points from the FRQ and those that know what they're doing and get all 30 points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also allows them to work together on the project and still keeps the accountable for doing their own work. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-12-08T20:21:40.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4031" PostTypeId="2" ParentId="4027" CreationDate="2017-12-08T21:28:03.120" Score="2" Body="&lt;p&gt;Unfortunately exams of any kind advantage some students and disadvantage others. They also favor those good at exams, not necessarily those good at the subject matter. I was always (over 40 years) a big fan of using projects to assess students. Let me describe how you might be able to make it work, provided that the scale isn't overwhelming. The course I will describe had both undergraduate and graduate versions. The number of students was normally around 30, always less than 50. My other teaching duties let me spend the majority of my time on this course. The course grade was determined 70% by a major project, 10% by a minor (warm up) project and 20% by a final exam for which any tricky or deep questions the grading was lenient. The main project took up all but 2 weeks of the semester. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make it work, I did this. First I partitioned the overall task into subtasks and gave a point value to each task with the sum being 700 (= 70% of the course). The tasks needed to be done in order for the project to be successful. They were dependent on successful &quot;completion&quot; but not necessarily &quot;perfection&quot; of earlier tasks. The student worked in self-selected pairs, which cut my &quot;grading&quot; task in half. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every two weeks the students would submit their work in a folder, including the current version of the project and all earlier versions. The changes from their previous version had to be marked with a highlighter pen so that I could easily find the changes. I also kept an index card for each student so that I could easily make notes as I looked at the work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would spend about 2 hours every other week going through the project folders making notes on their pages. Sometimes the &quot;note&quot; was just a checkmark, indicating success at the level they were at. Students could work at their own pace and could target their own desired level of accomplishment. They didn't need to complete the entire project to achieve a grade with which they were comfortable. So some pairs were on item 10 of the work schedule, others on item 8, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If my notes on the work were negative they could re-do that work to earn the &quot;checkmark&quot; and could work on the next feature as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the course I would need to evaluate everything they did and assign a grade. Normally it would be easy as could keep a running tally of their progress along the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also used various electronic communications (mailing list primarily) so that students could ask questions at any time. Everyone saw every question. Students were encouraged to answer questions (but not submit code) asked by others. I monitored the list daily and answered questions as needed. Every student saw my answers as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The project was thought to be very challenging by the students. I gave them a lot of guidance, both about the subject the project covered and things like coding, design patterns, thinking like a programmer, etc. I provided a fairly comprehensive set of tests they could use to assure themselves of their progress. The periodic reports would include the test results from running their code. I never actually had to run their code. But if it was too sloppy I'd just note that on the work and quit reading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only a few students hated me. Many loved me. The course was transformational as well for many of them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trick here is to be (a) always available and (b) to evaluate (but not necessarily &quot;grade&quot; frequently, without it taking so much time that your life suffers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can be very severe with them when needed so long as they know that today's judgement won't necessarily haunt them and that they can come back tomorrow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One caveat. The student (pair) that has to frequently repeat work to catch up will have some difficulty with the current work and in understanding the current lecture, which was paced to the project work. You need to watch out for that and give advice to &quot;move on&quot; leaving a bad spot in their work. But looking at their work every two weeks let me also determine if I needed to revisit an earlier topic in the next lecture. It was pretty obvious if groups of students didn't get it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since students worked in pairs I needed some way to grade individuals. The small project and the exam let me get a handle on that, but I also had students to peer assessments of the form: (a) what was &lt;em&gt;your partner's&lt;/em&gt; chief contribution, and (b) what was &lt;em&gt;your&lt;/em&gt; chief contribution. The peer assessment always tried to let people say good things when they could, rather than asking for the bad. Grading was never a problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students learned more, some less. Most were happy enough with the course. I always thought that I was giving something of value to every student. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-08T21:28:03.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4032" PostTypeId="2" ParentId="3973" CreationDate="2017-12-10T11:33:28.513" Score="2" Body="&lt;p&gt;As far as I understood your question, you want two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Providing a reference solution that is not visible to the students until the course is done.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Having a way for your students to define a finished solution they can (probably only virtually) &quot;hand in&quot;&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;Providing a reference solution&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;To achieve this, I would just create a repository containing the reference solution when the course is done and share the link with your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have the ability to create private repositories, you could use this to check that only your students have access to the reference solution (and not also the students of the course you give next year).&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Defining a finished solution&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Each student has their own working repository. As it's necessary that all of them start with a given initial set of files, they could create their repository by forking a &quot;starter pack&quot; repository you provide. If this wasn't required, they could just create a new empty repository on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To mark a state as finished, I would use branches. You could for example require your students to create a &lt;code&gt;solution&lt;/code&gt; branch in their repository once they are done.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Having everything in one namespace (optional)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Most Git hosters allow the creation of organizations or groups. If you want to, you could create one for each course you give. This organization would then contain the working repository of each student and the reference solution when the course is done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would provide an easier overview for you over your students' repositories.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; After reading through your question another time, I guess I've misunderstood the question and you only asked for a solution for the first item in my list. I think I will nevertheless share my thoughts on both - maybe they can be helpful for you or any future visitor.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2017-12-10T11:33:28.513" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4033" PostTypeId="2" ParentId="4002" CreationDate="2017-12-11T19:01:54.223" Score="7" Body="&lt;p&gt;There is quite a lot of research on retrieval-based learning and its efficacy.  For a very powerful illustration in a single study, there is a beautiful blog post &lt;a href=&quot;http://www.apa.org/science/about/psa/2016/06/learning-memory.aspx&quot; rel=&quot;noreferrer&quot;&gt;by Jeffrey Karpicke&lt;/a&gt;, which has two groups of students studying a text, one by creating concept maps, and the other by reading and then attempting to re-write from memory.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When tested a week later, students were given two types of questions: simple recall and questions that required creating new connections between the ideas presented and outside ideas.  In both cases, the retrieval-based group of students far outperformed the concept-map group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/1KMCX.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/1KMCX.jpg&quot; alt=&quot;Results of Karpicke &amp;amp; Blunt 2011&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Karpike also pulled together a document &lt;a href=&quot;http://learninglab.psych.purdue.edu/downloads/inpress_Karpicke_Retrieval_Based_Learning_Review.pdf&quot; rel=&quot;noreferrer&quot;&gt;summarizing research&lt;/a&gt; about retrieval-based learning across the field.  On page 2 of the document, he gives a graph of the number of studies about retrieval learning over time.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/5uBmN.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/5uBmN.gif&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is important about this graph for our purposes is that it shows that this is a relatively new area of study.  &lt;strong&gt;As far as I can tell, there are not yet, as of this time, studies about retrieval learning specifically within the realm of CS.&lt;/strong&gt;  However, there are few reasons to doubt that the strong results found in other fields would ultimately apply here as well, as the kind of mental modelling needed to attempt this sort of retrieval combines both big-picture and detailed understandings.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-12-11T20:10:12.177" LastActivityDate="2017-12-11T20:10:12.177" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4034" PostTypeId="2" ParentId="4010" CreationDate="2017-12-12T15:29:11.547" Score="0" Body="&lt;p&gt;I have been considering the issue of educating programmers for years, and discussed it with others. My personal experience of learning programming was that over 4 decades, I learned along with the changes in computer science and technology. So when I need to learn something new (in order to teach it) like C# and ADO.Net and the massive complexity of Visual Studio, I have a lot of context for each thing I learn. It all makes some sense to me, sooner or later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But taking adults who have never programmed at all, and plopping them in front of Visual Studio, then teaching them C# via Console mode programs, then Object Oriented principles, then Windows programming, then ADO.Net, with databases design and SQL woven in, in one year... I think that probably this is a very steep road for anyone. It took me 40 years to get here (although I did other things in the meantime), and I wonder if we have grown our 'stack' of technologies so high that most ladders no longer reach the entrance? A colleague says that in the near future, only the &quot;whiz kids&quot; will have any hope of becoming programmers. I reply that AI will make it all obsolete anyhow, so no worries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In light of that, I face a choice when I teach: answer questions about scenarios bristling with options, techniques, procedures, practices and tools, or let the student probably waste a lot of time and get very frustrated to no good end. I usually just point to the appropriate places on their screens and explain the steps (again) hoping that with repetition, they will get it. I don't know what else to do in this situation. What worked when I was a TA of an intro programming course for non-majors 30 years ago would be useless today.&lt;/p&gt;&#xA;" OwnerUserId="3725" LastActivityDate="2017-12-12T15:29:11.547" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4035" PostTypeId="1" CreationDate="2017-12-13T03:43:22.557" Score="5" ViewCount="672" Body="&lt;p&gt;I have only lately started allowing (and encouraging!) paired programming, and it is going very well.  The kids enjoy it, and they appear to be learning the material with less pain.  Not everyone has done it yet, however.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where I am beginning to sense trouble. I have a difficult major programming lab coming up soon, and my students are psyched to work together on it.  I know that many more of them will want to try pairing, but I worry about odd numbers, and I'm not sure how to handle three students who desire to work together without destroying the benefits that the model can provide.  Is there any way to extend the model of driver and navigator to a trio?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My current intention is for each group to create the same product, with no &quot;splitting&quot; of the work.  One monitor, two students.  Driver and navigator.  These are good and responsible kids, and they can usually find quite productive groupings on their own, though I have no problem stepping in to assist in this if I see things headed in a poor direction.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2017-12-14T23:59:36.357" LastActivityDate="2017-12-14T23:59:36.357" Title="Paired programming with an odd number of students" Tags="|pair-programming|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4036" PostTypeId="2" ParentId="4035" CreationDate="2017-12-13T10:59:00.150" Score="1" Body="&lt;p&gt;An extension I've come to appreciate is one where you have a &quot;driver&quot;, &quot;observer/navigator&quot; and &quot;keeper&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This last role might be considerably more difficult, depending on the lab. The idea is to have someone who keeps track of the &lt;em&gt;design&lt;/em&gt;. This means that at the start of the lab, the students should all (or just those who start as keepers) dedicate a bit of time to read up online about design patterns in the language they are using. It's important &quot;not to delve too deep&quot;. Just a general idea of what &quot;design patterns&quot; means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they begin working. Two out of the three work in usual pair-programming workflow. The third &lt;strong&gt;keeps&lt;/strong&gt; in mind the design of the program. As with regular pair-programming, the students should switch roles every now and then. In the case of a trio, they should obviously cycle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not all students in the lab are in trios, then an additional for the navigator is to remember design patterns. It should be made clear that it's not their primary task, but that it would definitely help with debugging and maintaining the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The added bonus of this extension of pair programming is that students are exposed to design patterns. Seeing as they can sometimes be a complicated matter, starting to tackle them is better done sooner than later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found this solution quite useful in labs about subjects in OOP (the more complex the system, the more important SOLID principles become).&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-12-13T10:59:00.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4037" PostTypeId="2" ParentId="4035" CreationDate="2017-12-13T12:36:48.200" Score="1" Body="&lt;p&gt;tl;dr: This isn't an either/or sort of situation. You have a lot of options for structuring the exercise.&lt;/p&gt;&#xA;&lt;p&gt;There are a lot of possibilities and which works best depends on the specifics of your situation. Don't lose track of the fact that your goal is educational, however, and not code production. If the students learn but not much code gets produced it can still be a success depending on other parameters. Since I'm going to try to cover a lot of options it will be something of an IFTTT answer.&lt;/p&gt;&#xA;&lt;p&gt;For all of the cases below it might be best if you don't have one triple or one solo and the rest pairs. It will probably work better for your own learning about this situation if you have, say, &lt;em&gt;three&lt;/em&gt; triples and the rest paired or three singles. You then get a better picture of how pairing itself differs from other options.&lt;/p&gt;&#xA;&lt;h2&gt;If you are willing to have some programmers work alone&lt;/h2&gt;&#xA;&lt;p&gt;A few days prior to the exercise let each student make a written bid on whether they want to pair or not. Have them give reasons for their preference. Let them know that their preference may not be able to be honored. Look at the bids and decide based on their reasons and your judgement about what would serve everyone best.&lt;/p&gt;&#xA;&lt;h2&gt;If you have a single superstar who always makes perfect marks&lt;/h2&gt;&#xA;&lt;p&gt;It is possible that he/she doesn't actually need the practice of this lab so give that person a different task, perhaps as a resource to the remaining pairs, answering questions, prompting, helping you watch over the flock. Someone needs to answer questions as they arise anyway and it might be an opportunity for a person to learn at a more meta level. If your superstar has expressed an interest in teaching eventually this might have additional payoffs for the person. Likewise if he/she is a language lawyer it might help them dig deep into their knowledge on the fly.&lt;/p&gt;&#xA;&lt;h2&gt;If you have a single struggler (or 3)&lt;/h2&gt;&#xA;&lt;p&gt;You could put him/her into a triple with others not terribly far advanced from that person's state. In this case, be prepared to be a fourth member of that team to help them keep the situation moving and the process easy and friendly. Don't let the struggler avoid the programmer role. Your choice of teams here might have to depend on personal qualities. Don't put him/her with the arrogant monster.&lt;/p&gt;&#xA;&lt;h2&gt;If the lab is long (say 3+ hours) or if each pair contributes differently to a larger goal&lt;/h2&gt;&#xA;&lt;p&gt;This one is a bit riskier with youngsters but works fine with professionals. Choose teams in any way that suits you (see above) and let the process run for a while (half hour to one hour). It needs to be long enough that switching roles has happened a few times. Then change the teams. Note that some people will move to a team with new code they haven't yet seen (the risk factor). At the switch point, the current driver stays with the code and the navigator(s) find new seats. The current driver for that code just continues after the break and the new navigators(s) spend some time catching up. If a person has been solo or in a triple in one iteration they are in a pair for the next. In many ways this is the most realistic scenario and matches how pairing is done in organizations. The advantage of this in the classroom is that students learn to read and understand new code - a useful skill on its own. However, you may need to map out in advance who the pairs/triples will be for each segment. Each student caries a card with them listing who they worked with and if you want to do peer evaluation, each can mark at the end who they thought was their most effective partner. If they work with at least five others, I would ask them to mark their two most effective partners. Don't ask for criticism of partners, just for who contributed the most. Make sure they know in advance that this will happen - to encourage good behavior. A more elaborate peer evaluation is to also ask why they marked the people they did - who was most effective and why.&lt;/p&gt;&#xA;&lt;h2&gt;In any case&lt;/h2&gt;&#xA;&lt;p&gt;Don't neglect to set aside time at the end or in the next session to have a retrospective on both the project itself and the process. You could also ask for a written assessment from each student on what worked and what didn't.&lt;/p&gt;&#xA;&lt;h2&gt;And don't neglect...&lt;/h2&gt;&#xA;&lt;p&gt;Don't lose track of the purpose and benefit of pairing. The driver takes a tactical, microscopic view of the code being produced and the navigator takes a strategic, macroscopic view. Work to keep this concept going as well as possible. It is the essence.&lt;/p&gt;&#xA;&lt;h2&gt;Additional advice&lt;/h2&gt;&#xA;&lt;p&gt;If you poll the student preferences as suggested above (even in conjunction with a different option) it would be good to announce your decisions a day or so in advance when you can't meet all desires. This gives you a chance to explain (privately) to some why their choice couldn't be honored. &amp;quot;I really need you to ...&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;And be clear in your own mind, and let the students know, what is the main goal of this exercise. Is the project itself more important or is learning something about the process. When you have to make compromises do so with that goal in mind.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-13T15:13:02.103" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4038" PostTypeId="5" CreationDate="2017-12-14T00:16:08.043" Score="0" Body="&lt;p&gt;In education, one &quot;attains&quot; a degree or an academic honor. Historically, different groups show different levels of attainment and this is generally seen as a problem requiring a solution. In some countries, for example, women attain fewer degrees than men. The reasons are complex and sometimes difficult to address. Use this tag for questions on achieving better attainment results generally and for various underrepresented groups. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-14T00:16:08.043" LastActivityDate="2017-12-14T00:16:08.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4039" PostTypeId="4" CreationDate="2017-12-14T00:16:08.043" Score="0" Body="Attainment refers to the earning of specific degrees and honors in the educational setting. Use this tag for questions about research on attainment and for questions about processes that lead to higher levels of attainment. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-14T00:16:08.043" LastActivityDate="2017-12-14T00:16:08.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4040" PostTypeId="2" ParentId="4025" CreationDate="2017-12-14T07:56:19.323" Score="0" Body="&lt;p&gt;I found a book online (&lt;a href=&quot;https://jignesh272.files.wordpress.com/2011/09/object-oriented-programming-using-c-sharp.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Object Oriented Programming using C# by Simon Kendal&lt;/a&gt;), and it has an example of designing a simple administration system using OOP principles (&lt;em&gt;Chapter 6: Object Oriented Software Analysis and Design&lt;/em&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not deep enough but could be used as a starting point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I leave the question open for the time being as it can have more suggestions. Please feel free to add more and more resources.&lt;/p&gt;&#xA;" OwnerUserId="3714" LastActivityDate="2017-12-14T07:56:19.323" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4041" PostTypeId="2" ParentId="3975" CreationDate="2017-12-14T21:16:58.253" Score="5" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I am not too worried about language. I am just looking for a nice&#xA;  interactive learning environment, that combines the best of REPL and&#xA;  editing. Can you tell me of anything that you use or know of?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://runestone.academy/runestone/static/overview/overview.html&quot; rel=&quot;noreferrer&quot;&gt;Runestone Academy&lt;/a&gt; has a component called &lt;a href=&quot;https://runestone.academy/runestone/static/overview/overview.html#activecode-examples&quot; rel=&quot;noreferrer&quot;&gt;ActiveCode&lt;/a&gt; that allows you write Python code and run it. It also has a slider so that you can go back to earlier versions of your source code to review and run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to activecode, you can also execute Python code with the assistance of a unique visualization tool. This tool, known as &lt;a href=&quot;https://runestone.academy/runestone/static/overview/overview.html#the-codelens-tool&quot; rel=&quot;noreferrer&quot;&gt;codelens&lt;/a&gt;, allows you to control the step by step execution of a program. It also lets you see the values of all variables as they are created and modified. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a lot more to the web site but is what I use to help others learn Python 3 and the nicest part is that once the students get the hang of the e-books they tend to take off at their own pace.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2017-12-14T21:16:58.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4042" PostTypeId="2" ParentId="4025" CreationDate="2017-12-14T21:23:06.640" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0134054296&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Programming with Greenfoot&lt;/a&gt; by Michael Kölling might be what you want. Michael has a great grasp of OO and has built a great tool (Greenfoot) for beginners to explore it. The book has a number of simulations that are used to develop Java programming with OO principles integrated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first four chapters (especially) of &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0970579519&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karel J Robot&lt;/a&gt; by Bergin, Stehlik, Roberts, and Pattis also present OO principles in a simulation context, but also using a few simple design patterns. The Karel book has analogues for Python and Ruby also. Karel can be used within Greenfoot if desired or in other IDEs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a teacher resource for Greenfoot (&lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://greenroom.greenfoot.org&lt;/a&gt;) that has many projects for use within the greenfoot system. These are also simulations and show interesting objects moving and interacting on the screen (the World). New worlds can be created (inheritance) and new Actors as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy to integrate design patterns into the curriculum with these tools since the supplied software infrastructure means that the student isn't starting with an empty screen but with a well defined framework in which to develop the ideas. So, the student starts at a higher level of abstraction than the language primitives. Classes, methods, interactions, composition, delegation, etc. are natural topics that can be explored early in the student's learning. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-14T21:23:06.640" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4043" PostTypeId="2" ParentId="3957" CreationDate="2017-12-14T21:38:22.030" Score="1" Body="&lt;p&gt;Let them start by playing games that are actually teaching them programming concepts and are mostly not AAA games. None of this uses Scratch, but it is fun and it is learning programming which is also problem solving. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://store.steampowered.com/app/375820/Human_Resource_Machine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/92800/SpaceChem/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SpaceChem&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/370360/TIS100/&quot; rel=&quot;nofollow noreferrer&quot;&gt;TIS-100&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/684270/Silicon_Zeroes/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Silicon Zeros&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/576030/MHRD/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MHRD&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/300570/Infinifactory/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Infinifactory&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/319270/Great_Permutator/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Great Permutator&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/239030/Papers_Please/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Papers, Please&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/287980/Mini_Metro/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mini Metro&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;or problem solving, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://store.steampowered.com/app/620/Portal_2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Portal 2&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/40930/The_Misadventures_of_PB_Winterbottom/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Misadventures of P.B. Winterbottom&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/351920/Crazy_Machines_3/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Crazy Machines 3&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://store.steampowered.com/app/499520/The_Turing_Test/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Turning Test&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://www.google.com/logos/2014/rubiks/iframe/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rubik's Cube&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262036630&quot; rel=&quot;nofollow noreferrer&quot;&gt;Once Upon an Algorithm: How Stories Explain Computing&lt;/a&gt; (book)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key word to use when searching is &lt;code&gt;puzzle&lt;/code&gt; and or use &lt;code&gt;puzzle&lt;/code&gt; as a tag on &lt;a href=&quot;http://store.steampowered.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Steam&lt;/a&gt; which is a great place to start.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-01-06T21:44:43.677" LastActivityDate="2018-01-06T21:44:43.677" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4044" PostTypeId="1" CreationDate="2017-12-15T00:10:36.753" Score="7" ViewCount="455" Body="&lt;p&gt;I give a lab on single-dimensional loops and arrays. By &quot;single dimensional loops&quot;, I mean that there is no nesting of loops.  (I will later give a second lab on multi-dimensional loops and arrays, but that is not this lab.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that few of the problems on my lab right now are of any consequence.  What I &lt;em&gt;want&lt;/em&gt; is to provide activities that are significant in computer science.  These students are still early enough that I'm not requiring nested loops, but that doesn't mean that they can't be exposed to significant ideas.  The trouble is, what are those ideas?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good activities would either &lt;em&gt;be&lt;/em&gt; algorithms of significance, or they will set the stage for later comprehension of deep and important ideas in CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are lab activities that can be done without nested loops that reflect important problems in Computer Science?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2018-01-01T15:38:17.063" LastActivityDate="2018-03-15T17:21:34.667" Title="Single-dimensional array and simple looping activities of significance" Tags="|labs|algorithms|cs-theory|looping|arrays|" AnswerCount="6" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4045" PostTypeId="2" ParentId="4044" CreationDate="2017-12-15T00:28:45.203" Score="7" Body="&lt;p&gt;The Dutch National Flag problem is linear in running time. Essentially sort an array with only 3 distinct values each of which may appear 0 or more times. (not length 3). You are allowed only one pass over the array, so the solution is a single while loop with some prior initialization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was probably originally posed by Dijkstra. It is mentioned in David Grits's &lt;em&gt;The Science of Programming&lt;/em&gt; where it can be solved very nicely by posing pre and post conditions using David's ideas of finding invariants from pre and post conditions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also make it a simple object oriented problem if you like by using objects as the array elements, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more interesting formulation of the problem refers to the Dutch National Flag which is a Tricolor: Red over White over Blue. You have an array that has some jumbled up red and white and blue cells, zero or more of each. You want to move all of the red cells to the left end, all of the blue cells to the right end, with the white cells in the middle. The restriction is that you may make only a single pass over the array. The correct solution is very creative and demonstrates the power of loop invariants. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have mentioned this problem in answers to other questions here. A search for &quot;dutch&quot; on the questions page will reveal them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solving it without hints can provide a gigantic a-ha moment for almost everyone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students can do the classic version, they can also think about a modification that will handle 4 values instead. From that you can talk about the inherent complexity of sorting values from any finite set. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-15T01:04:49.633" LastActivityDate="2017-12-15T01:04:49.633" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4046" PostTypeId="2" ParentId="4044" CreationDate="2017-12-15T00:29:55.170" Score="1" Body="&lt;p&gt;One small, but significant, algorithm is to find Euler's Number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The irrational number $e$, also called Euler’s number, is approximately &lt;code&gt;2.71828&lt;/code&gt;.  The number is significant both to the &lt;a href=&quot;https://en.wikipedia.org/wiki/E_(mathematical_constant)#In_computer_culture&quot; rel=&quot;nofollow noreferrer&quot;&gt;culture of computing&lt;/a&gt; and has a role in such functions as computing continually compounding interest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Euler proved that this number was irrational by showing that it was equal to the infinitely expanding series $1 + \frac{1}{1} + \frac{1}{2!} + \frac{1}{3!} + \frac{1}{4!}$…&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask students, then, to create a function that, given a number of iterations, returns the approximation of $e$ given by that many steps.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-15T00:29:55.170" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4047" PostTypeId="2" ParentId="4044" CreationDate="2017-12-15T00:50:16.760" Score="7" Body="&lt;p&gt;A variant on the ENIGMA machine encryption works well in a single loop, and is sufficiently complex to give students a real challenge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The core idea of the ENIGMA machine for this assignment is that (1) a number is given as an initial key, and (2) every prior letter used influences how the next letter will be encrypted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, use a modular circle of encryptable characters (I chose ASCII 32 (&lt;code&gt;&lt;/code&gt;) to 126 (&lt;code&gt;~&lt;/code&gt;), and just like a Caesar cipher, take your first letter and move it over by the &lt;code&gt;key&lt;/code&gt; values.  But now modify &lt;code&gt;key&lt;/code&gt; itself by adding the ASCII value of the inputted letter that you just encrypted to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unstated in that description is the idea of creating a modular circle that doesn't begin from 0.  This is a pretty complex idea for students at this level to work with, and it helps to give them some guidance in this department.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following this formula with the initial key &lt;code&gt;16&lt;/code&gt;, the statement&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Should get you:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Vf|0Pdhx,2RTch)=CZ`o0JPRey:&amp;lt;DTt%;Nnuw-6&amp;lt;Oc$':J`hq'GN^q'0P`o0ENXl-1APeo~%4Iu68Xgm&amp;amp;FUWlv'6b#'7FJPZqw|=GVvcmpv*?Y&amp;amp;FHW\|&quot;(-7;=RX]}3Ccx&quot;(HYl|.&amp;gt;R\q{,;[py{1QS`m.&amp;lt;BQqs'-MQdjl&quot;(-MSe{}+Y &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Ask students to similarly create a &lt;em&gt;decrypt&lt;/em&gt; method, but offer far less guidance than you did for encrypt.  It will require them to make sense of all of the mathematical operations that they performed in encrypt in order to successfully undo it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also provide them with a few &lt;em&gt;mystery strings&lt;/em&gt; to uncover.  The first student who successfully follows the directions given by the mystery strings gets some sort of prize or extra credit.  (The mystery strings themselves explain this; no need to give the secret away in advance.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-15T00:50:16.760" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4049" PostTypeId="2" ParentId="4044" CreationDate="2017-12-16T13:50:13.973" Score="2" Body="&lt;p&gt;Grades. Works especially well around final exam time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the average. Find the highest and lowest. Find the average with the lowest dropped. Find the most common grade. Count how many are in the range 90-100%. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given an array of grades assigned for each class, calculate GPA. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given 3 arrays that represent labs, quizzes, and tests calculate the final average. Each array can be weighted differently to match whatever your grading scale is. Ex: I would have labs weighted at 10%, quizzes at 20% and tests at 70%. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2017-12-17T19:57:30.527" LastActivityDate="2017-12-17T19:57:30.527" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4050" PostTypeId="2" ParentId="4" CreationDate="2017-12-17T00:04:04.173" Score="1" Body="&lt;p&gt;This answer will be a bit long, but will give a moderately sophisticated view of OO programming and how to think about it. It is unlikely that focusing specifically on inheritance will be very fruitful for your students. Inheritance is often overused and used in poor ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The example here is adapted, with permission, from Joseph Bergin's &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1940113067&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polymorphism Companion&lt;/a&gt; which is, itself a follow up to his &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1940113059&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polymorphism: As It Is Played&lt;/a&gt;. The program in the book, and here, is a simple simulation of disease spread within a population. The version here has removed a bit of the complexity, but at the expense of some flexibility in exploring the concept of disease spread. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There will be eight separate files, two interfaces, two enumerations, and four classes, one of which just explores the value of using interfaces in the first place. The only inheritance is that of implementing an interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more important lesson (than inheritance) for a beginner is to learn encapsulation and building objects by composition. OO can fruitfully be thought of as language features for enabling composition. The various implementations of Population are the chief place in this example that illustrate it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fundamental concept here is that a Population consists of cells of some kind (a generic type parameter in the original, but omitted here). and a Disease spreads from an infected cell to adjacent cells (and otherwise) depending on the characteristics of the disease and the population. In this simplification, the population substrate is a rectangular arrangement of cells (a two dimensional array), though extensions can, for example, use hexagonal cells or other shapes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that interfaces are good for defining &lt;em&gt;concepts&lt;/em&gt; in a programming system without reference to any implementation. The Java libraries define Set, for example, as an interface, more or less representing a mathematician's concept of a Set. There are various implementations which have different efficiencies, depending on the use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first Interface here is Disease:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;/** A disease that may be introduced into a population&#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; */&#xA;public interface Disease {&#xA;    /** Set the probability that contact with an infected &quot;location&quot; will result in infection.&#xA;     * @param probability the probability of infection in range [0.0, 1.0]&#xA;     */&#xA;    public void setInfectionProbability(double probability);&#xA;&#xA;    /** The current probability of infection&#xA;     * @return the probability that contact with a location will result in infection.&#xA;     */&#xA;    public double infectionProbability();&#xA;&#xA;&#xA;    /** Some diseases transform over time. This permits signaling the disease that it &#xA;     * should update itself.&#xA;     * @param value value needed to drive the change&#xA;     */&#xA;    public void update(Integer value);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An infected cell can infect adjacent cells in an iteration of the simulation with a probability determined by the disease. Diseases can morph over time (or space, or other dimensions in general), so an update method is provided to allow this. Later we will see two implementation of this: SimpleDisease and VirulentDisease. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second interface is Population: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;import java.util.Set;&#xA;import java.awt.Point;&#xA;&#xA;&#xA;/** A population into which a disease may be introduced to study how it spreads. A population has a &quot;shape&quot; which helps&#xA; * determine how a disease spreads. A population may be mobile or not. If it is mobile, a &#xA; * disease may jump over distance,&#xA; * otherwise it spreads only locally. In this model the state of a population location is &#xA; * either immune, infected, or &#xA; * available for infection (healthy). An extension might include recovered as a state. An &#xA; * immune barrier is a set of &#xA; * cells that might separate the population into regions. A disease can't spread across an &#xA; * immune barrier, but might&#xA; * jump it if the mobility &amp;gt; 0. Normally a disease can spread only to adjacent locations. &#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; * @param &amp;lt;P&amp;gt; a &quot;point&quot; or &quot;location&quot; within the population&#xA; * @param &amp;lt;D&amp;gt; a &quot;direction&quot;, usually from a location&#xA; */&#xA;public interface Population {&#xA;&#xA;    /** A logical name for the population, perhaps its shape&#xA;     * @return the given name&#xA;     */&#xA;    public String name();&#xA;&#xA;    /** The number of cells in the population&#xA;     * @return the number of cells&#xA;     */&#xA;    public int size();&#xA;&#xA;    /** Try to infect this location with the probability associated with the disease&#xA;     * @param location the location to be (possibly) infected&#xA;     */&#xA;    public void infect(Point location);&#xA;&#xA;    /** Introduce a disease into a random location of a population&#xA;     * @param &amp;lt;T&amp;gt; a change measure such as time&#xA;     * @param disease the disease to be introduced&#xA;     */&#xA;    public void introduce(Disease disease);&#xA;&#xA;    /** The current number of infected cells&#xA;     * @return the number of infected cells&#xA;     */&#xA;    public int numberInfected();&#xA;&#xA;    /** How many cells are neither infected nor immune&#xA;     * @return the number of cells available to be infected&#xA;     */&#xA;    public int numberHealthy();&#xA;&#xA;    /** How many cells have been immunized&#xA;     * @return the number of immunized cells&#xA;     */&#xA;    public int numberImmune();&#xA;&#xA;    /** Spread the disease for a certain number of cycles. On a cycle an infected cell will attempt&#xA;     * to infect its neighbors&#xA;     * @param cycles the number of cycles to run the simulation&#xA;     */&#xA;    public void spread(int cycles);&#xA;&#xA;    /** Immunize a proportion of the population against the disease (assumes only one disease)&#xA;     * @param percentage the probability a given cell is immunized. &#xA;     * @return the number actually immunized&#xA;     */&#xA;    public int immunize(double percentage);&#xA;&#xA;    /** Permits members of a cell that visit, and possibly infect, other random cells &#xA;     * in the population&#xA;     * @param howMany the number of cells to &quot;travel&quot; and thus spread to the destination, &#xA;     * or get infected there. &#xA;     */&#xA;    public void shuffle(int howMany);&#xA;&#xA;    /** Create an immunization barrier in the population in a given direction starting at a given location. If &#xA;     * the population wraps back on itself the barrier will also, back to the location. &#xA;     * Otherwise it will extend to the&#xA;     * &quot;edge&quot; of the population. This can be used to create &quot;islands&quot; in the population. &#xA;     * @param direction The direction to which the barrier extends&#xA;     * @param location the end of the barrier&#xA;     * @param distance the length of the barrier. If 0 it extends to the edge of the &#xA;     * population (or wraps around)&#xA;     */&#xA;    public void immunizeFrom(Point location, Direction direction, int distance);&#xA;&#xA;    /** Once each cycle, spread invokes shuffle. The mobility value determines how many &#xA;     * members of the population visit&#xA;     * other cells. Set this to 0 to avoid &quot;travel&quot;.  &#xA;     * @param mobility the number of population cells that visit other cells per cycle in spread. &#xA;     */&#xA;    public void setMobility(int mobility);&#xA;&#xA;    /** The currently infected cells&#xA;     * @return a set of infected cells&#xA;     */&#xA;    public Set&amp;lt;Point&amp;gt; infected();&#xA;&#xA;    /** Determine if a location is infected&#xA;     * @param location the location to check&#xA;     * @return true if the location is infected&#xA;     */&#xA;    public boolean isInfected(Point location);&#xA;&#xA;    /** Determine if a location is immune to infection&#xA;     * @param location the location to check&#xA;     * @return true if the location is immune&#xA;     */&#xA;    public boolean isImmune(Point location);&#xA;&#xA;    /** Determine if the location is available for infection&#xA;     * @param location the location to check&#xA;     * @return true if the location is available for infection&#xA;     */&#xA;    public boolean isHealthy(Point location);&#xA;&#xA;    /** A random location within the population&#xA;     * @return a random location&#xA;     */&#xA;    public Point randomLocation();&#xA;&#xA;    /** Spread the disease from a given location for one &quot;time&quot; cycle&#xA;     * @param location the lodation from which to spread&#xA;     */&#xA;    public void spreadFrom(Point location);&#xA;&#xA;    /** Is this location within the population&#xA;     * @param location a location to test&#xA;     * @return true if the location is within the location&#xA;     */&#xA;    public boolean includes(Point location);&#xA;&#xA;    /** For an arbitrary location return one within the location&#xA;     * This is usually used to &quot;wrap&quot; a physical model into the desired &quot;logical&quot; shape&#xA;     * @param trial an arbitrary location, perhaps outside the population&#xA;     * @return a location within the population, logically &quot;near&quot; the trial location.&#xA;     */&#xA;    public Point reflect(Point trial);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note that we can introduce only one disease into a population (extensions can be built, of course) but the particular kind of disease is independent of the population. This is the beauty and usefulness of using interfaces here. To explore how a different disease spreads in a given population you don't need to re-write any existing code, but just build a new implementation of the Disease interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible, with this Population concept to introduce barriers to spread of disease, much as an ocean serves as a barrier to the spread of natural diseases. However, infection can also spread at a distance, perhaps across barriers if the &quot;cells&quot; of the population move (shuffle)  or visit other locations, much as air travel has reduced the safety of isolation for such diseases as Ebola. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simulation also has two Enumerations, Direction and State. The Direction is used to help in setting up barriers. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;/** The directions in which a disease might spread (for example) or in &#xA; * which an immune barrier is extended&#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; */&#xA;public enum Direction {&#xA;    NORTH,&#xA;    EAST,&#xA;    SOUTH,&#xA;    WEST;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the original the Direction is actually a generic parameter, permitting directions other than the four cardinal directions. That is one of the simplifications here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other enumeration gives the state of a cell at a given time:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;/** The state of a cell in a population and its visual representation in an ascii display&#xA; * This might be extended with RECOVERED. &#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; */&#xA;public enum State{&#xA;    IMMUNE(&quot; - &quot;), &#xA;    INFECTED(&quot; + &quot;), &#xA;    HEALTHY(&quot; . &quot;);&#xA;&#xA;    private String symbol;&#xA;&#xA;    State(String symbol){&#xA;        this.symbol = symbol;&#xA;    }&#xA;&#xA;    public String toString(){&#xA;        return symbol;&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Initially in a test run all cells are either healthy or immune. They may become infected as the simulation runs, but we won't show recovery here, though it is an obvious extension. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next we will see two examples of diseases, neither very sophisticated. A simple disease does not morph over the run of a simulation. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;public class SimpleDisease implements Disease {&#xA;&#xA;    private double probability = 0.0d;&#xA;&#xA;    public SimpleDisease(double initialProbability){&#xA;        this.probability = initialProbability;&#xA;    }&#xA;&#xA;    public SimpleDisease(){&#xA;        //nothing&#xA;    }&#xA;&#xA;    @Override&#xA;    public void setInfectionProbability(double probability) {&#xA;        probability =  Math.min(1.0, probability);&#xA;        this.probability = Math.max(0, probability);&#xA;    }&#xA;&#xA;    @Override&#xA;    public double infectionProbability() {&#xA;        return probability;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void update(Integer value) {&#xA;        //nothing&#xA;    }    &#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note a couple of things about this class. First it isn't very interesting since it has no methods representing actions of any kind. It is just an information carrier. Note that it is, however completely encapsulated. It has two mutators (setInfectionProbability, and update) and an accessor for the infection probability. This is not completely desirable, since in order to &lt;em&gt;do&lt;/em&gt; anything with a disease you have to retrieve information from it and then carry out the action elsewhere in the program. It is preferable, if you can arrange it, to have objects actually carry out actions on a client's behalf rather than giving out information and having the client do the action, hoping that the client &lt;em&gt;does the right thing&lt;/em&gt; with the information. This is the &quot;Tell, don't ask&quot; principle, which is important, but is not exhibited here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also, that the probability set in the mutator is &quot;normalized&quot; to assure that it is indeed a valid probability in the range 0.0 .. 1.0. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, when a method body is intentionally left empty it is documented with a comment so that a future reader needn't wonder whether the original programmer just forgot something. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A VirulentDisease is similar, but has an interesting update method: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;/** A virulent disease is characterized by an increase in the liklihood of infection as&#xA; * the simulation proceeds. &#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; */&#xA;public class VirulentDisease implements Disease {&#xA;    private double probability = 0.0d;&#xA;&#xA;&#xA;    public VirulentDisease(double initialProbability){&#xA;        this.probability = initialProbability;&#xA;        normalize();&#xA;    }&#xA;&#xA;    public VirulentDisease(){&#xA;        //nothing&#xA;    }&#xA;&#xA;    private void normalize(){&#xA;        probability =  Math.min(1.0, probability);&#xA;        this.probability = Math.max(0, probability);&#xA;    }&#xA;&#xA;    @Override&#xA;    public void setInfectionProbability(double probability) {&#xA;        this.probability = probability;&#xA;        normalize();&#xA;    }&#xA;&#xA;    @Override&#xA;    public double infectionProbability() {&#xA;        return probability;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void update(Integer value) {&#xA;        value = Math.min(10, value);&#xA;        probability += (1.0 - probability) / Math.max(1, 11 - value);&#xA;        normalize();&#xA;    }    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note here that we need to assure that the normalize method can never be overridden, since it is invoked from a constructor. It is private here so there is no issue, but if it can't be private it must be at least &lt;em&gt;final&lt;/em&gt; otherwise incorrect things can occur in the construction of an object. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Very importantly, note that the two disease classes have &lt;em&gt;only&lt;/em&gt; public methods defined in the interface. It is improper and leads to gnarly code to have a subclass or an implementing class that actually extends the public interface of its parent. In that case future programmers need to know too much (and keep in mind too often) all of the intermediate classes and the specific types of the variables in a program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simulation can have various kinds of populations as well as diseases. We will only show one here: a square bounded world. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;import java.awt.Point;&#xA;import java.util.HashSet;&#xA;import java.util.Random;&#xA;import java.util.Set;&#xA;&#xA;/** Create a square-array based population. It does not wrap around, but &#xA; * represents a finite square plane of cells. &#xA; * It represents a finite rectangular planar world. Diseases are stopped at the edges&#xA; * @author buffy (derived from work of J Bergin, with permission)&#xA; *&#xA; */&#xA;public class BoundedSquarePopulation implements Population {&#xA;&#xA;    private int width = 0;&#xA;    private State [][] population = null;&#xA;    private Random random = new Random();&#xA;    private Disease disease = null;&#xA;    private Set&amp;lt;Point&amp;gt; infected = new HashSet&amp;lt;Point&amp;gt;();&#xA;    private int[] range = null;&#xA;    private int shuffleNumber = 0;&#xA;    private String name = &quot;Planar&quot;;&#xA;&#xA;    /** Create a planar world&#xA;     * @param width the width (and height) of the world. &#xA;     */&#xA;    public BoundedSquarePopulation(int width){&#xA;        this.width = width;&#xA;        this.population = new State[width][width];&#xA;        this.range = new int[width];&#xA;        for(int i = 0; i &amp;lt; width; ++i){&#xA;            this.range[i] = i;&#xA;        }&#xA;        for(int i : this.range) {&#xA;            for(int j : this.range){&#xA;                this.population[i][j] = State.HEALTHY;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    public BoundedSquarePopulation( int width, String name){&#xA;        this(width);&#xA;        this.name = name;&#xA;    }&#xA;&#xA;    @Override&#xA;    public String name(){&#xA;        return this.name;&#xA;    }&#xA;&#xA;    @Override&#xA;    public  Point randomLocation(){&#xA;        return new Point(this.random.nextInt(this.width) , this.random.nextInt(this.width));&#xA;    }&#xA;&#xA;    /** Guarantee a point is within the population&#xA;     * @param trial a suggested point&#xA;     * @return trial is returned, possibly modified&#xA;     */&#xA;    @Override&#xA;    public  Point reflect(Point trial){&#xA;        trial.x = Math.abs(trial.x) % this.width;&#xA;        trial.y = Math.abs(trial.y) % this.width;&#xA;        return trial;&#xA;    }&#xA;&#xA;    @Override&#xA;    public  boolean includes(Point location){&#xA;        return location.x &amp;gt;= 0 &amp;amp;&amp;amp; location.y &amp;gt;= 0 &amp;amp;&amp;amp; &#xA;            location.x &amp;lt; this.width &amp;amp;&amp;amp; &#xA;            location.y &amp;lt; this.width;&#xA;    }&#xA;&#xA;    @Override&#xA;    public  void spreadFrom(Point location){&#xA;        Point temp = new Point(0, 0);&#xA;        for(int i = location.x - 1; i &amp;lt; location.x + 2; ++i){&#xA;            for(int j = location.y - 1; j &amp;lt; location.y + 2; ++j){&#xA;                temp.move(i, j);&#xA;                infect(temp);&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    private double normalize(double percentage){&#xA;        percentage = Math.max(0, percentage); // normalize&#xA;        percentage = Math.min(1, percentage);&#xA;        return percentage;&#xA;    }&#xA;&#xA;    @Override&#xA;    public String toString(){&#xA;        String result = &quot;&quot;;&#xA;        for(int i : this.range){&#xA;            for(int j : this.range){&#xA;                result += this.population[j][i] + &quot; &quot;;&#xA;            }&#xA;        result += &quot;\n&quot;;&#xA;        }&#xA;        return result;&#xA;    }&#xA;&#xA;    @Override&#xA;    public boolean isInfected(Point location){&#xA;        return this.population[location.x][location.y] == State.INFECTED;&#xA;    }&#xA;&#xA;    @Override&#xA;    public boolean isImmune(Point location){&#xA;        return this.population[location.x][location.y] == State.IMMUNE;&#xA;    }&#xA;&#xA;    @Override&#xA;    public boolean isHealthy(Point location){&#xA;        return this.population[location.x][location.y] == State.HEALTHY;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void immunizeFrom(Point location, Direction direction, int distance){&#xA;        distance = Math.abs(distance);&#xA;        int endpoint;&#xA;        switch(direction){&#xA;        case NORTH: {&#xA;            endpoint = distance == 0? 0 : Math.max(0, location.y - distance + 1);&#xA;            for(int i = endpoint; i &amp;lt;= location.y; ++i){&#xA;                if(this.population[location.x][i] == State.HEALTHY) {&#xA;                    this.population[location.x][i] = State.IMMUNE;&#xA;                }&#xA;            }&#xA;        }&#xA;        break;&#xA;        case EAST: {&#xA;            endpoint = distance == 0? this.width : Math.min(this.width, location.x + distance );&#xA;            for(int i = location.x; i &amp;lt; endpoint; ++i){&#xA;                if(this.population[i][location.y] == State.HEALTHY) {&#xA;                    this.population[i][location.y] = State.IMMUNE;&#xA;                }&#xA;            }&#xA;        }&#xA;        break;&#xA;        case SOUTH: {&#xA;            endpoint = distance == 0? this.width: Math.min(this.width, location.y + distance );&#xA;            for(int i = location.y; i &amp;lt; endpoint; ++i){&#xA;                if(this.population[location.x][i] == State.HEALTHY) {&#xA;                    this.population[location.x][i] = State.IMMUNE;&#xA;                }&#xA;            }&#xA;        }&#xA;        break;&#xA;        case WEST: {&#xA;            endpoint = distance == 0? 0 : Math.max(0, location.x - distance + 1);&#xA;            for(int i = endpoint; i &amp;lt;= location.x; ++i){&#xA;                if(this.population[i][location.y] == State.HEALTHY) {&#xA;                    this.population[i][location.y] = State.IMMUNE;&#xA;                }&#xA;            }&#xA;        }&#xA;        break;&#xA;        }&#xA;    }&#xA;&#xA;    @Override&#xA;    public int immunize(double percentage){&#xA;        percentage = normalize(percentage); // normalize&#xA;        int result = 0;&#xA;        for(int i: this.range){&#xA;            for(int j: this.range){     &#xA;                if(this.population[i][j] == State.HEALTHY &amp;amp;&amp;amp; this.random.nextDouble() &amp;lt; percentage){&#xA;                    this.population[i][j] = State.IMMUNE;&#xA;                    result++;&#xA;                }&#xA;            }&#xA;        }&#xA;        return result;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void infect(Point location){&#xA;        if(includes(location) &amp;amp;&amp;amp; isHealthy(location) &amp;amp;&amp;amp; &#xA;            this.random.nextDouble() &amp;lt; this.disease.infectionProbability()){&#xA;            this.population[location.x][location.y] = State.INFECTED;&#xA;            this.infected.add((Point)location.clone());&#xA;            System.out.println(&quot;infecting: &quot; + location);&#xA;        }&#xA;    }&#xA;&#xA;    @Override&#xA;    public int size() {&#xA;        return this.width * this.width;&#xA;    }&#xA;&#xA;    @Override&#xA;    public  void introduce(Disease disease) {&#xA;        this.disease =  disease;&#xA;        Point p = randomLocation();&#xA;        System.out.println(&quot;Introducing disease at: &quot; + p);&#xA;        infect(p);  &#xA;    }&#xA;&#xA;    @Override&#xA;    public int numberInfected() {&#xA;        return this.infected.size();&#xA;    }&#xA;&#xA;    @Override&#xA;    public int numberHealthy(){&#xA;        int result = 0;&#xA;        for(int i : this.range){&#xA;            for(int j : this.range){&#xA;                if(this.population[i][j] == State.HEALTHY){&#xA;                    result++;&#xA;                }&#xA;            }           &#xA;        }&#xA;        return result;&#xA;    }&#xA;&#xA;    @Override&#xA;    public int numberImmune(){&#xA;        int result = 0;&#xA;        for(int i : this.range){&#xA;            for(int j : this.range){&#xA;                if(this.population[i][j] == State.IMMUNE){&#xA;                    result++;&#xA;                }&#xA;            }           &#xA;        }&#xA;        return result;&#xA;    }&#xA;&#xA;    @Override&#xA;    public void spread(int cycles) {&#xA;        for(int i = 0; i &amp;lt; cycles; i++){&#xA;            @SuppressWarnings(&quot;unchecked&quot;)&#xA;            HashSet&amp;lt;Point&amp;gt; temp = (HashSet&amp;lt;Point&amp;gt;)((HashSet&amp;lt;Point&amp;gt;) this.infected).clone();&#xA;            for(Point p:temp){&#xA;                shuffle(this.shuffleNumber);&#xA;                spreadFrom(p);&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    @Override&#xA;    public void shuffle(int howMany) {&#xA;        for(int i = 0; i &amp;lt; howMany; ++i){&#xA;            Point from = randomLocation();&#xA;            Point to = randomLocation();&#xA;            if(isImmune(from) || isImmune(to)){&#xA;                return;&#xA;            }&#xA;            if(isInfected(from)){&#xA;                infect(to);&#xA;            }&#xA;            if(isInfected(to)){&#xA;                infect(from);&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    @Override&#xA;    public void setMobility(int mobility) {&#xA;        mobility = Math.max(0, mobility);&#xA;        this.shuffleNumber = mobility;&#xA;    }&#xA;&#xA;    @SuppressWarnings(&quot;unchecked&quot;)&#xA;    @Override&#xA;    public Set&amp;lt;Point&amp;gt; infected() {&#xA;        return (Set&amp;lt;Point&amp;gt;) ((HashSet&amp;lt;Point&amp;gt;)this.infected).clone();&#xA;    }&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It is a bit long, but note that, again, all of its public methods are defined in the Population interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This class is interesting and exhibits better OO characteristics than the disease classes. It is built from composition, both of library types like set and bespoke types like Disease. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This class is also a better example of &quot;Tell, don't Ask&quot; in, for example the immunize and spreadFrom methods. The accessors are mostly used for reporting out the results of the simulation, not for enabling computation to be done elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, here is a &lt;em&gt;main&lt;/em&gt; that can be used to run a sample of the simulation. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;package buffy.disease;&#xA;&#xA;import java.awt.Point;&#xA;&#xA;public class TrialRun {&#xA;&#xA;    public static void  main(String[] args){&#xA;        Population population = new BoundedSquarePopulation(15);&#xA;        population.setMobility(3);&#xA;        Point where = new Point(10, 5);&#xA;        population.immunizeFrom(where, Direction.NORTH, 0);&#xA;        Disease disease = new SimpleDisease();&#xA;        disease.setInfectionProbability(0.6);&#xA;        population.introduce(disease);&#xA;        population.spread(3);&#xA;        System.out.println(&quot;Number infected: &quot; + population.numberInfected() + &quot;/&quot; +&#xA;             population.size());&#xA;        System.out.println(population.toString());&#xA;        System.out.println(&quot;Number available but not infected: &quot; + &#xA;            population.numberHealthy() + &quot;/&quot; + population.size());&#xA;        System.out.println(&quot;Number immunized: &quot; + population.numberImmune() + &quot;/&quot; +&#xA;             population.size());&#xA;    }    &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This just uses ASCII graphics to show the final result of a test run, but the other classes and interfaces could, instead, serve as a Model in a Model-View-Controller graphical program that shows the results of infection spread as they occur in a graphical application. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Not shown here is the possibility of creating alternative world (population) geometries. For example a linear (single dimension array) is easy to do. You can also create a world as a Möbius band by &quot;connecting&quot; the left and right edges with reversed orientation so that a disease spreading off the left-top will spread into the right-bottom. Other connections are possible, creating such things as a torus, sphere, tube, etc. Combining that with immunity barriers can yield fairly realistic simulations. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-18T13:44:23.210" LastActivityDate="2017-12-18T13:44:23.210" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4051" PostTypeId="2" ParentId="4009" CreationDate="2017-12-17T01:02:44.040" Score="4" Body="&lt;p&gt;One site that I find helpful for basic examples of coding task written in a multitude of programming languages is &lt;a href=&quot;http://rosettacode.org/wiki/Rosetta_Code&quot; rel=&quot;nofollow noreferrer&quot;&gt;RosettaCode&lt;/a&gt;. While it is not always a win when going there, I still keep it high on the list of sites to check when looking for teaching examples or code that demonstrates something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case the combination of the programming language &lt;a href=&quot;https://en.wikipedia.org/wiki/Scheme_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scheme&lt;/a&gt;, an example simple enough to use in a classroom and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Lambda_calculus&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lambda Calculus&lt;/a&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Fixed-point_combinator&quot; rel=&quot;nofollow noreferrer&quot;&gt;Y-combinator&lt;/a&gt; are satisfied by this example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Define the stateless Y combinator and use it to compute factorials and&#xA;  Fibonacci numbers from other stateless functions or lambda&#xA;  expressions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(define Y&#xA;  (lambda (h)&#xA;    ((lambda (x) (x x))&#xA;     (lambda (g)&#xA;       (h (lambda args (apply (g g) args)))))))&#xA; &#xA;;; head-recursive factorial&#xA;(define fac&#xA;  (Y&#xA;    (lambda (f)&#xA;      (lambda (x)&#xA;        (if (&amp;lt; x 2)&#xA;            1&#xA;            (* x (f (- x 1))))))))&#xA; &#xA;;; tail-recursive factorial&#xA;(define (fac2 n)&#xA;  (letrec ((tail-fac &#xA;             (Y (lambda (f)&#xA;                  (lambda (n acc)&#xA;                    (if (zero? n)&#xA;                        acc&#xA;                        (f (- n 1) (* n acc))))))))&#xA;    (tail-fac n 1)))&#xA; &#xA;(define fib&#xA;  (Y&#xA;    (lambda (f)&#xA;      (lambda (x)&#xA;        (if (&amp;lt; x 2)&#xA;            x&#xA;            (+ (f (- x 1)) (f (- x 2))))))))&#xA; &#xA;(display (fac 6))&#xA;(newline)&#xA; &#xA;(display (fib 6))&#xA;(newline)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;output&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;720&#xA;8&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Bonus answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When others want to learn more about Lambda Calculus the first reference I always give is &lt;a href=&quot;http://cs.fit.edu/~ryan/library/functional_programming/gjm.lambook88.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;An Introduction to Functional Programming Through lambda Calculus&quot;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: While the link is nice if you really do use the book often then please &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0486478831&quot; rel=&quot;nofollow noreferrer&quot;&gt;purchase&lt;/a&gt; the book.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2017-12-17T17:46:37.307" LastActivityDate="2017-12-17T17:46:37.307" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4053" PostTypeId="2" ParentId="4" CreationDate="2017-12-17T23:17:39.003" Score="2" Body="&lt;p&gt;I think an easier, more natural motivator for objects is aggregate objects. This means you can approach discussion with encapsulation and reuse, and also decomposition of a problem.  A classic is a deck object containing card objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is still very tricky when you have strong programmers. You want to show how decomposition with objects makes the problem simpler, however, if they are very good procedural programmers it can be tough to have them see value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I have found teaching with an &quot;objects first&quot; approach in Python to be helpful. Generally, one semester of CS leaves them less capable than a functions first approach. But in a second semester they pick up faster and are better off by the end.  They are much better object oriented thinkers.&lt;/p&gt;&#xA;" OwnerUserId="695" LastActivityDate="2017-12-17T23:17:39.003" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4054" PostTypeId="2" ParentId="3975" CreationDate="2017-12-18T01:29:41.917" Score="1" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Repl.it &lt;a href=&quot;http://repl.it&quot; rel=&quot;nofollow noreferrer&quot;&gt;REPL.it&lt;/a&gt;supports several languages. It also supports manual and automatic testing (unit tests). When students complete task they can see instructor model solution.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Google currently supports Jupyter Notebooks &lt;a href=&quot;https://colab.research.google.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://colab.research.google.com&lt;/a&gt; which would allow you some pedagogical tools in terms of embedding code within explanations.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="695" LastEditorUserId="695" LastEditDate="2017-12-18T19:32:50.830" LastActivityDate="2017-12-18T19:32:50.830" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4055" PostTypeId="2" ParentId="4044" CreationDate="2017-12-18T21:20:13.150" Score="2" Body="&lt;p&gt;I recommend to check out &lt;code&gt;&amp;lt;algorithm&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;numeric&amp;gt;&lt;/code&gt;, and related C++ headers. There are literally tons of linear algorithms of utter significance. From the top of my head, &lt;code&gt;copy&lt;/code&gt;, &lt;code&gt;reverse&lt;/code&gt;, &lt;code&gt;find&lt;/code&gt;, &lt;code&gt;lower_bound&lt;/code&gt;, &lt;code&gt;accumulate&lt;/code&gt;, &lt;code&gt;iota&lt;/code&gt;, &lt;code&gt;partial_sum&lt;/code&gt;, &lt;code&gt;adjacent_difference&lt;/code&gt;, &lt;code&gt;inner_product&lt;/code&gt; are well deserving much attention.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2017-12-18T21:20:13.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4057" PostTypeId="1" CreationDate="2017-12-19T13:53:58.630" Score="6" ViewCount="217" Body="&lt;p&gt;We have a large engineering day that hundreds of kids (ages 6-12) and their parents will attend. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The setup is as follows: local engineering groups/societies will have stations and they will have short activities for these kids to introduce them to engineering concepts. We are looking for 1-2 activities for one of these stations. There will be internet connection and we have a small budget (~&lt;code&gt;$100&lt;/code&gt;) for getting supplies. We can borrow computers/tablets. Ideally we will have two activities that build on each other and ideally the activities can be scaled so both younger crowds and older students can enjoy and get hooked. It would be a big plus to engage and educate parents as well. It would also be a plus if the activity did not require lots of hardware ($$$) so it is not too hard for students to continue learning at home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wanted to do something programming/CS related but I am having a hard time coming up with activities that introduce them to the subject in a &lt;strong&gt;couple of minutes&lt;/strong&gt;. Are there such activities or should I focus on something else? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The help and ideas are much appreciated!&lt;/p&gt;&#xA;" OwnerUserId="3761" LastEditorUserId="27" LastEditDate="2017-12-20T15:40:14.743" LastActivityDate="2023-03-27T01:27:57.963" Title="Quick and easy intro to computer science for kids for an Engineering Field Day" Tags="|lesson-ideas|active-learning|k-5|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4058" PostTypeId="1" CreationDate="2017-12-19T14:44:17.343" Score="4" ViewCount="283" Body="&lt;p&gt;As a pilot project (which was delayed by an incredible amount, seeing as it's starting 8 weeks after it was meant to), my school grouped together a few kids (high school, they know basic OOP and work in Java) and we teach them a bit about C and working in C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use CLion, which in turn uses CMake to organize header files. Naturally, the more inquisitive students asked what cmake does. (Like a &lt;a href=&quot;https://en.wikipedia.org/wiki/Dorothy_Dixer&quot; rel=&quot;noreferrer&quot;&gt;plant&lt;/a&gt;, because it is in the curriculum anyway).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I was trying to think of ways to explain what cmake does, in an analogy. Because CMake can get exponentially more complicated as one adds modules, I am focusing on analogies that simplify this, and hopefully present in an enjoyable way (such as a demonstration or student participation).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is to explain how CMake can be useful for arranging header files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is what analogies can I use, which preferably include student participation?&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2017-12-22T10:09:57.357" Title="Enjoyable and\or fun way to explain cmake" Tags="|lesson-ideas|c|cmake|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4059" PostTypeId="2" ParentId="4057" CreationDate="2017-12-19T15:34:34.190" Score="2" Body="&lt;p&gt;Since Logo was intended for this age group you might explore something there. My quick idea would require two or three screens with some sophisticated and time consuming simulation running on one and the kids/adults exploring simpler exercises that might (or not) build up to the one running. You can run, for example, a space filler (Sierpinski) program and have the students explore turning, etc. With lots of trial and mostly error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Karel J Robot, the recursive graphical solution to the Eight Queens problem takes a bit of time and is built up from only a few primitives that can be combined and extended. So that would do for the running demo and the students can explore simpler aspects, such as a robot backing up, for example. The advantage of Eight Queens is that it is easy to explain, unlike, say, sorting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do this sort of thing in most languages - a complex graphic simulation built up from simple parts. The students explore only a bit of it. They can even modify some of the code of the running sim and run it to see what happens. It can lead to a lot of laughter, and some insight. If you sit with them you can suggest things that do something fun/weird/good/bad and ask why that happened. Lots of possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the running sim gives an unattainable target in the time frame. Like playing on the beach after professional teams of sand-castle builders have shown their skill. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The suggestion is that if the simulation is built with something like Model-View-Controller that the students only modify parts of the model. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-19T15:34:34.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4060" PostTypeId="2" ParentId="4044" CreationDate="2017-12-19T23:20:38.237" Score="3" Body="&lt;p&gt;You could use introduce &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Elementary_cellular_automaton&quot; rel=&quot;nofollow noreferrer&quot;&gt;elementary (one-dimensional) cellular automata&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, you represent a single row of cells as a simple array. Then you write a function that takes an array and applies the rules of the cellular automata to each cell (usually based on the old value of the cell and its two neighbors) to return a new array representing the next generation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's dead simple, but still results in pretty cool patterns if you display (or just print to console) the generations one after another. Here are some examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/a/a3/Rule45rand.png&quot; alt=&quot;Rule 45&quot;&gt;&#xA;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c6/Rule105rand.png&quot; alt=&quot;Rule 105&quot;&gt;&#xA;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c2/Rule106rand.png&quot; alt=&quot;Rule 106&quot;&gt;&#xA;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/b/bd/Rule146rand.png&quot; alt=&quot;Rule 146&quot;&gt;&#xA;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/0/0a/Rule150rand.png&quot; alt=&quot;Rule 150&quot;&gt;&#xA;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/0/03/Rule154rand.png&quot; alt=&quot;Rule 154&quot;&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2017-12-19T23:20:38.237" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4061" PostTypeId="2" ParentId="4057" CreationDate="2017-12-20T13:13:26.253" Score="2" Body="&lt;p&gt;There is another model program that is designed for youngsters. &lt;a href=&quot;http://csunplugged.org/activities/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSUnplugged&lt;/a&gt; provides a collection of activities that don't involve actual computers but prepare young students for &lt;a href=&quot;https://www.cs.cmu.edu/%7ECompThink/resources/education.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computational Thinking&lt;/a&gt; and algorithmics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the examples are surprisingly sophisticated and collectively cover, if somewhat shallowly, the range of topics that would later be covered by in a college major in CS. Each of the (more than 30) activities they suggest are accompanied with teacher instructions. These activities have been successfully used in a number of elementary schools. In my opinion, they provide a great way to instill insight into youngsters in topics that they might study later in depth, but which they will also necessarily encounter throughout their lives. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your Engineering Day you could prepare a few of these for the students to do. Some of the resources are also group activities, so that you might get a larger group engaged simultaneously. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same materials, by the way, can be adapted for teaching the underlying concepts to adults, by providing a set of analogies and metaphors for the topics being studied. They might also provide ideas for programming exercises for beginning students in a CS program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main categories follow, with several activities available for each:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Data: Representing Information  &lt;/li&gt;&#xA;  &lt;li&gt;Algorithms: Putting Computers to Work  &lt;/li&gt;&#xA;  &lt;li&gt;Procedures: Telling Computers What to Do  &lt;/li&gt;&#xA;  &lt;li&gt;Intractability: Really Hard Problems  &lt;/li&gt;&#xA;  &lt;li&gt;Cryptography: Sharing Secrets  &lt;/li&gt;&#xA;  &lt;li&gt;The Human Face of Computing: Interacting with Computers  &lt;/li&gt;&#xA;  &lt;li&gt;Community Activities  &lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;One of my doctoral students explored this area in her dissertation and found it to be valuable. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-20T13:13:26.253" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4062" PostTypeId="2" ParentId="4057" CreationDate="2017-12-20T14:17:16.453" Score="3" Body="&lt;p&gt;I created a couple of demo programs recently which can run unattended, be explained simply, are familiar, and one can be interacted with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is a simple maze generation method, which draws a maze on the screen with character graphics. It does not produce ideal or optimal mazes, or use any of the recognized algorithms, just weighted random choice and forcing. Still, it is interesting to watch. I have not completed the part that displays the shortest path. It would be a good addition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other example is Tic-Tac-Toe. The game is set up so that two humans can play, or a human against one of five different strategies, or the strategies against each other. There is also a 'tournament' display, which shows the results of each strategy playing the others 10,000 times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The five strategies are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Idiot, picks a move at random&lt;/li&gt;&#xA;&lt;li&gt;Naive, tries for center square, then corners, then sides&lt;/li&gt;&#xA;&lt;li&gt;Blocker, chooses a move that prevents the opponent from winning&lt;/li&gt;&#xA;&lt;li&gt;Winner, chooses a move that will win&lt;/li&gt;&#xA;&lt;li&gt;(one superior to that, but I forget the details just now)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These strategies are implemented using inheritance, as a hierarchy, so you can explain that. The game board and turn-taking and scoring and so on are implemented using OOP principles, so that fits easily also. There is something here to engage children of varying ages and understanding. Just the idea of &quot;playing against the computer&quot; is interesting. The program is not very complex. I think it could be expanded easily to checkers. Chess would be more ambitious, and probably lose most of your audience anyway.&lt;/p&gt;&#xA;" OwnerUserId="3770" LastActivityDate="2017-12-20T14:17:16.453" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4063" PostTypeId="1" AcceptedAnswerId="4079" CreationDate="2017-12-20T20:52:22.823" Score="8" ViewCount="127" Body="&lt;p&gt;I am almost painfully aware of the importance of examinations as a way to create emotionally important memory-recall events, and therefore their vital importance in learning itself.  Within the examination itself, however, I usually place the questions in an order that optimizes page-layout; I want to give the students enough space, but otherwise use the fewest pages possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it occurs to me that this may not be optimal.  Is there any research (or does anyone have experience) that supports the idea that the &lt;em&gt;order of question&lt;/em&gt; on an examination can impact pedagogic efficacy?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-22T08:31:22.003" Title="The order of questions on examinations" Tags="|exams|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4065" PostTypeId="1" AcceptedAnswerId="4081" CreationDate="2017-12-21T12:09:07.953" Score="13" ViewCount="3667" Body="&lt;p&gt;At our University, we have in the first semester a very difficult C Introductory Course, that consists of presenting a shortened version of the language specification: What are for/while loops, if clause, what is a pointer and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they never show how good C code in a more complicated application should look. What version control is, what &lt;a href=&quot;https://valgrind.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Valgrind&lt;/a&gt; is (a gnu tool for detecting memory leaks) and so on.&#xA;For the many new (about 60%) to programming or C, the group projects are quite a knockout (about 40%). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some motivated students and I decided to offer a &quot;best practices&quot; session before the first assignment is handed out and after the lecture has finished.&#xA;For the students to have a better chance of finishing this course successfully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our selected Chapters are these:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how to compile (clang and gcc and their flags and warnings)&lt;/li&gt;&#xA;&lt;li&gt;valgrind&lt;/li&gt;&#xA;&lt;li&gt;make &lt;/li&gt;&#xA;&lt;li&gt;coding style&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;best practices -&gt; how to allocate memory, typedefs, file operations&lt;/li&gt;&#xA;&lt;li&gt;basic program flow, some simple patterns&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;git&lt;/li&gt;&#xA;&lt;li&gt;pitfalls specific to this course and C in general&lt;/li&gt;&#xA;&lt;li&gt;how to ask the right question (and in turn how to google their problems)&lt;/li&gt;&#xA;&lt;li&gt;how to use the  manpage&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Are there points missing? Is there something that we shouldn't do?&#xA;In short, how to improve the content. We are planning on 3 Sessions with around 3 hours each.&lt;/p&gt;&#xA;" OwnerUserId="1868" LastEditorUserId="1868" LastEditDate="2018-01-31T10:42:55.037" LastActivityDate="2020-07-03T17:25:20.243" Title="What should be included in a best practices C course?" Tags="|curriculum-design|best-practice|coding-style|c|" AnswerCount="12" CommentCount="19" ContentLicense="CC BY-SA 3.0" />
  <row Id="4066" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T13:49:15.770" Score="6" Body="&lt;p&gt;Your list is a bit narrow in one sense. I assume it is well matched to your specific course, but probably doesn't represent &quot;best practice&quot; in general. For example, &lt;em&gt;valgrind&lt;/em&gt; is limited to linux, which suits you better than me. But the idea of including memory testing, for example, is a good idea no matter the specific tool. Similarly for &lt;em&gt;git&lt;/em&gt;. There are alternatives, but code management and version control is the big idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one item I find missing here, but also essential is some sort of tool for unit testing. There are &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C&quot; rel=&quot;noreferrer&quot;&gt;many&lt;/a&gt; available and building good clean code requires pre testing everything to arrive at a good result painlessly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another suggestion I'd make, though this may be your intent already, is that you show many of your ideas in the context of a large and complicated program. You state that dealing with such projects/programs is an issue in the course at the beginning of your post and that may actually be the biggest issue. So don't present your tool set using only &quot;toy&quot; programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the projects are done in teams you may also want to include something specific about how to be successful in a team environment. Many of your students may not have experienced that. There is a book, in fact, named &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1576751554&quot; rel=&quot;noreferrer&quot;&gt;Teamwork is an Individual Skill&lt;/a&gt; that has valuable hints for any professional. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-21T13:49:15.770" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4067" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T14:38:31.517" Score="6" Body="&lt;h2&gt;Lint&lt;/h2&gt;&#xA;&lt;p&gt;I would not program in &lt;code&gt;C&lt;/code&gt; without a lint tool e.g. &lt;code&gt;gcc -Wall&lt;/code&gt; or &lt;code&gt;pclint&lt;/code&gt;/&lt;code&gt;flex-lint&lt;/code&gt;, unfortunately the latter two are proprietary.&lt;/p&gt;&#xA;&lt;p&gt;However you need to show that error/warning messages are your friend. There are not an accident. Someone spent time writing them, to help you. Read them, and fix the underlying problem. Often I have seen people finding ways to get the error/warning to go away, but changing the code in a convoluted way, that makes it worse, but has no error.&lt;/p&gt;&#xA;&lt;h2&gt;Brackets {} are not an option.&lt;/h2&gt;&#xA;&lt;p&gt;I don't care what the standard says, always use brackets.&lt;/p&gt;&#xA;&lt;h2&gt;Comments&lt;/h2&gt;&#xA;&lt;p&gt;Well written code with good names, is better than code with bad names and comments. Use procedure/function names, and variable names to comment your code.&lt;/p&gt;&#xA;&lt;h3&gt;Bad&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;i++; /*Increment i*/&#xA;i++; /*Increment index*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3&gt;Better&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;index++;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Local consistency&lt;/h2&gt;&#xA;&lt;p&gt;Style must be locally consistent, and preferably globally consistent. Global consistency may suffer if there are more than one person on the team. But local consistency must never suffer.&lt;/p&gt;&#xA;&lt;h2&gt;Nouns, verbs, adjectives&lt;/h2&gt;&#xA;&lt;p&gt;Variable name should be nouns or for booleans adjectives.&#xA;Procedures should be verbs. Functions should be as for variables.&lt;/p&gt;&#xA;&lt;p&gt;Full command/query separation is not easy in &lt;code&gt;C&lt;/code&gt; as you would have to program Object Oriented.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-21T14:38:31.517" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="4068" PostTypeId="1" CreationDate="2017-12-21T16:46:18.860" Score="2" ViewCount="194" Body="&lt;p&gt;I have been teaching databases, over the last few weeks, to key-stage 3 pupils (year 7 and 8). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The school I am at uses Microsoft's Access. This seems adequate in many ways. However it has many problems, that frustrate pupils and thus, get in the way of learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Continuously asking “do you want to save?” (It should just save. I would not be entering this if I did not want it saved. This is not the 1980's when saving work would take a considerable chunk of your day. It could have it done before I have realised that it has asked.) I have noticed that pupils often select no, even though I spend a considerable time, telling them to save often, to save when prompted, etc. There was a study that showed that when experts see a save prompt pop up it MS-word, they click &lt;code&gt;yes&lt;/code&gt; without even reading it. However when a novice sees one, they read it 20 times, then click &lt;code&gt;no&lt;/code&gt; (thus loosing there work). When asked the novices said, that the computer was asking permission, so it must be something dangerous.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Not letting us rename an object, if it is open (this will seem normal to Microsoft user, as this is how there file-system works, bit it is confusing).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Not letting us delete something that has a error. I get called over a lot to help a pupil that is getting errors, they can see what is wrong, and want to fix it, but the computer won't let them fix it until it is fixed. e.g. They know that they need to change view to fix the error, but the computer will not let them change view until they fix it. The work around is often unintuitive.&#xA;Or half adding a field to a table, it will not let you do anything until it is complete. Pupils see their error, and try to delete the field, but this is something and it is not allowed, until they finish. I have to tell them to set it to something random, then delete it. I use this as an opportunity to talk about usability design.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There are others, but I have not seen them all, and can not remember all that I have seen.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can you tell be of a better database management system, for teaching databases?&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-06-29T13:21:39.170" LastActivityDate="2018-06-29T13:21:39.170" Title="A better database management system, for teaching databases" Tags="|resource-request|databases|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4069" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T17:32:13.643" Score="1" Body="&lt;p&gt;if they are new to programming start with flip-flops.  I usually refer to Lombardi's &quot;This year, we are going to start from the beginning. This, gentleman, is a football&quot;. It makes it funnier when they are British.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can delete this answer as I don't have comment permissions.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;debian&#xA;eclipse-cdt&#xA;svn/git&#xA;cmake&#xA;jenkins&#xA;unit test&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;250,000 lines of code is more reasonable than 800.  Also, if you need to add a comment to code it means that the code is unintelligible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As requested in the comment.  I think starting with a brief introduction to electrical engineering and discreet mathematics is appropriate in an introductory programming course.  The list above is not complete or accurate, but it's something that can be setup in a day and increases the productivity of other programming tasks that are part of your lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, implementing strcpy is a good task for anyone from an arts background.&lt;/p&gt;&#xA;" OwnerUserId="3775" LastEditorUserId="3775" LastEditDate="2018-01-20T00:16:15.750" LastActivityDate="2018-01-20T00:16:15.750" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4070" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T19:01:31.723" Score="3" Body="&lt;p&gt;Two important concepts that seem absent from the list, and that I often find are barely developed in even fairly advanced students are testing and debugging. I would suggest some brief introduction along the following lines:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unit test and integration test; test scaffolding; test-first strategy; exhaustive test vs. (targeted) random test vs. testing manually determined corner cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use of assertions; logging, possibly at various debug levels; insertion of &lt;code&gt;printf()&lt;/code&gt; calls for adhoc debugging; use of a debugger: break points, single-stepping, observing variables, watchpoints; code simplification to create an &lt;a href=&quot;https://stackoverflow.com/help/mcve&quot;&gt;MCVE&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastActivityDate="2017-12-21T19:01:31.723" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4071" PostTypeId="1" AcceptedAnswerId="4074" CreationDate="2017-12-21T19:31:34.980" Score="4" ViewCount="365" Body="&lt;p&gt;I am trying to create lessons and curriculum designed for school-aged students, teaching about IDEs and development environments. What is a succinct, not too complex definition of a development environment? I want to explain the role of servers, databases, and other things that are required for an application to run, as well as the relationship an IDE has with the development environment, in the simplest way possible.  I saw a definition as a 'set of tools' but what are the tools that are included in an environment, and what purpose do each of these tools serve?&lt;/p&gt;&#xA;" OwnerUserId="3778" LastActivityDate="2017-12-26T06:07:51.627" Title="What is a (simple definition of) a development environment?" Tags="|ide|programming-environment|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4072" PostTypeId="2" ParentId="4057" CreationDate="2017-12-21T19:36:46.163" Score="0" Body="&lt;p&gt;As a quick introduction to some programming lessons, I highly recommend &lt;a href=&quot;http://csunplugged.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt;. They have a number of great lessons introducing many core programming ideas without needing a computer.&lt;/p&gt;&#xA;" OwnerUserId="3778" LastActivityDate="2017-12-21T19:36:46.163" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4073" PostTypeId="2" ParentId="4010" CreationDate="2017-12-21T19:39:36.767" Score="3" Body="&lt;p&gt;I tell my students if they want to ask me more than one question a day, I am going to start asking them two questions before I answer them. 1) What have you tried. 2) Who else have you asked. If they cannot answer those two questions, then they are not ready to have their own question answered. It makes it harder for them to get away with using you as a crutch, and 90% of the time they try something and figure it out on their own.&lt;/p&gt;&#xA;" OwnerUserId="3778" LastActivityDate="2017-12-21T19:39:36.767" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4074" PostTypeId="2" ParentId="4071" CreationDate="2017-12-21T20:48:06.933" Score="4" Body="&lt;p&gt;If you write software you necessarily &lt;em&gt;have&lt;/em&gt; a development environment. It might help or hinder you as you work. A development environment consists of some set of tools that you use to develop the program. The tools might be integrated into a single framework (an IDE) or not, but you have some sort of environment.&lt;/p&gt;&#xA;&lt;p&gt;The tools include at least&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;one or more editors to create files of various kinds, text and otherwise.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;one or more compilers to translate your program files into machine code for one or more machine architectures&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;one or more run-time-environments in which you can execute your code, either on the target architecture or in a simulator&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Additional tools that are usually needed are (not a complete list but will do for a start)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;a test framework so that you can effectively write both unit tests (the code does what I think it does and doesn't break as I change things) and acceptance tests (the code does what the owner/customer really wants done - irrespective of my understanding).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;automated error checkers to trace back exceptions and race conditions (among other issues)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a debugger that lets you interact directly with the target code as an aid in finding and repairing errors.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a design framework in which it is easy (or at least possible) to create design documents, which may be textual or graphical. They might be integrated with code generation or not.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a code repository and version control system so that old versions can be maintained and errors can be backed out of&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a team-support system that helps a group of developers work on the same project. These tools may include simple communication tools (email...) or provide things like distributed pair programming.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a database system to hold necessary data used by the program. Sometimes a database is also used to store fragments of the program(s) themselves. The database might also contain required test data to assure the correct thing is built. Likewise it might contain information about the success or failure of test runs&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a documentation system that can be used for either or both of program documentation of use by the team and user documentation that gives instructions to the end-user on effective use of the system&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a way to make interaction with the file system easy and efficient, such as directory listings that let you easily open/save/close files&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a way to maintain various &amp;quot;configuration files&amp;quot; so that the system can be tailored for its various uses&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;a way to keep all of the tools updated easily&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;automatic error checkers and style checkers beyond those provided by the compiler&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For some kinds of software a sophisticated emulation environment to check the interaction of various components. Mobile apps often need servers and some way test the interactions, for example.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;An Integrated Development Environment (say Eclipse or NetBeans) will integrate all of this into a single program that may use one or more multi-pane windows to provide a visual representation of all of the tools. A good one is tailorable by language and by need without cluttering up the workspace. A less integrated system (Emacs, say) provides all of these things through (possibly cryptic) user commands. An IDE requires a learning process itself, but it pays dividends if it is flexible and not restricted to a single language or architecture.&lt;/p&gt;&#xA;&lt;p&gt;But even a simple text editor, a compiler, and a run-time for testing is a development environment and for many years was all that was available. Way back, the &amp;quot;text-editor&amp;quot; was just a card punch.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note that not all files in a project are necessarily just text. Some projects require, for example, graphical files to show design.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I don't claim I have a complete list here. There are many other possibilities. Each person's development environment is personal. It is good if it makes them more productive and less frustrated. Is is subject to update and modification at any time that you learn of a new tool or technique.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Also note that not all of these are needed in every project and you don't need to be proficient in many of them to get started. But issues that arise as you work may help you see the need to expand your personal set.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-21T21:03:35.577" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4075" PostTypeId="2" ParentId="4010" CreationDate="2017-12-21T21:32:57.267" Score="2" Body="&lt;h1&gt;Set up a class forum for your students&lt;/h1&gt;&#xA;&lt;p&gt;It's a pretty standard thing for online courses that there is some form of online many-to-many communication platform that students are required to participate in as part of their grade. I've had to do it on two or three occasions, and while I hate it, it's what takes the place of &amp;quot;class participation&amp;quot; in the brick-and-mortar classroom setting.&lt;/p&gt;&#xA;&lt;p&gt;I suggest setting one up (they're pretty cheap and easy to manage, and you can wipe it between years pretty much at the click of a button; heck you might even want to look into &lt;a href=&quot;https://stackoverflow.blog/2017/07/11/introducing-channels-private-qa-team/&quot;&gt;Stack Overflow Channels&lt;/a&gt;). You don't &lt;em&gt;have&lt;/em&gt; to make participation mandatory, but you can tell your students &amp;quot;if you need help with a problem, post on the class forums. Browse other student's questions and help them out.&amp;quot; If it isn't mandatory, you can offer a few points of extra credit.&lt;/p&gt;&#xA;&lt;p&gt;The number of times I've written up a problem and gotten ready to post it to Stack Overflow (or other online community) I've realized &amp;quot;Dang, what an idiot I am&amp;quot; and solved my own problem.&lt;/p&gt;&#xA;&lt;p&gt;It's a variant of Rubber Duck Debugging, which &lt;a href=&quot;https://cseducators.stackexchange.com/a/4012/1244&quot;&gt;Ryan Nutt has already answered with&lt;/a&gt;, but in the case that simply trying to explain the problem it isn't solved, its there for &lt;em&gt;anyone&lt;/em&gt; to answer.  Just don't forget to look through the board yourself and answer a few questions. ;)&lt;/p&gt;&#xA;" OwnerUserId="1244" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-21T21:32:57.267" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4076" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T22:33:12.860" Score="11" Body="&lt;p&gt;I think an important aspect to any best-practices list is the rationale behind it.  It is entirely too common for a programmer to, for example, insist that gotos and global variables are evil and then proceed to use exceptions and singletons to create the exact same problems that got those features proscribed in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I suggest that when introducing a rule of thumb, you don't just give examples of code that follows the rule, but rather examples of the sort of awful code that led to the rule being created.  Let them understand &lt;em&gt;why&lt;/em&gt; the rule exists both so they can avoid making similar mistakes and also recognize when the rule &lt;em&gt;isn't&lt;/em&gt; applicable. (Of course, no examples will be as helpful as allowing them to write terrible code and then try to modify it, but you have limited time.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A related recommendation that is somewhat tangential to the best practices lecture, but related to the question of how to help them complete the course successfully:&#xA;Don't assume that the more abstract explanations of topics are necessarily easier to understand than the ones that get into the gritty details.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had a number of students who were completely confused when we tried to explain pointers using diagrams of boxes and arrows, but as soon as I sketched out a table of memory (with addresses as indices), explained that a pointer is just an integer that is used to &quot;index memory&quot;, and then walked through a block of code, updating the table as I went, they understood it almost immediately.  (We put the abstractions back in place when it was time to work with higher level data structures, &lt;em&gt;after&lt;/em&gt; they understood the fundamentals.)&lt;/p&gt;&#xA;" OwnerUserId="827" LastActivityDate="2017-12-21T22:33:12.860" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4077" PostTypeId="2" ParentId="4065" CreationDate="2017-12-21T22:41:53.923" Score="8" Body="&lt;p&gt;This might be controversial, but I would make a point to explain that &lt;code&gt;goto&lt;/code&gt; is not always considered harmful (and explain that the context of Dijkstra's &quot;Go To Statement Considered Harmful&quot; was about using available control structures).  In C, there aren't very good control structures for releasing resources; in the absence of them, &lt;code&gt;goto&lt;/code&gt; works well, and people should not be afraid to use it for that purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People new to C inevitably have trouble doing manual resource management and end up with memory (or other resource) leaks.  Dealing with it is hard.  People then think C is harder than it is.  Trying to follow a single-entry, single-exit (SESE) pattern can reduce the cognitive burden and make code easier to maintain in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;char* foo(const char* directory)&#xA;{&#xA;    char* path = make_full_path(directory, CONSTANT_FILENAME);&#xA;    if (path == NULL)&#xA;    {&#xA;        return NULL;&#xA;    }&#xA;&#xA;    FILE* fp = fopen(path, &quot;r&quot;);&#xA;    if (fp == NULL)&#xA;    {&#xA;        free(path);&#xA;        return NULL;&#xA;    }&#xA;&#xA;    char line[1024];&#xA;    fgets(line, sizeof line, fp);&#xA;&#xA;    char* copy = malloc(strlen(line) + 1);&#xA;    if (copy == NULL)&#xA;    {&#xA;        fclose(fp);&#xA;        free(path);&#xA;        return NULL;&#xA;    }&#xA;&#xA;    strcpy(copy, line);&#xA;&#xA;    fclose(fp);&#xA;    free(path);&#xA;&#xA;    return copy;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Simpler:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;char* foo(const char* directory)&#xA;{&#xA;    char* path = NULL;&#xA;    FILE* fp = NULL;&#xA;    char* copy = NULL;&#xA;&#xA;    path = make_full_path(directory, CONSTANT_FILENAME);&#xA;    if (path == NULL)&#xA;    {&#xA;        goto exit;&#xA;    }&#xA;&#xA;    fp = fopen(path, &quot;r&quot;);&#xA;    if (fp == NULL)&#xA;    {&#xA;        goto exit;&#xA;    }&#xA;&#xA;    char line[1024];&#xA;    fgets(line, sizeof line, fp);&#xA;&#xA;    copy = malloc(strlen(line) + 1);&#xA;    if (copy == NULL)&#xA;    {&#xA;        goto exit;&#xA;    }&#xA;&#xA;    strcpy(copy, line);&#xA;&#xA;exit:&#xA;    if (fp != NULL)&#xA;    {&#xA;        fclose(fp);&#xA;    }&#xA;    free(path);&#xA;&#xA;    return copy;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And imagine that we need to introduce some new, temporary allocation to the code.  In the first version, that would require considering where the new allocation occurs and inspecting the various exit points to make sure that each exit point cleans up the new allocation if necessary.  In the second version, it requires only adding the variable to the beginning, initializing it to a sentinel value (e.g. &lt;code&gt;NULL&lt;/code&gt;), and then unconditionally freeing it at the end.&lt;/p&gt;&#xA;" OwnerUserId="2828" LastActivityDate="2017-12-21T22:41:53.923" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4078" PostTypeId="2" ParentId="4068" CreationDate="2017-12-22T00:56:25.567" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; This recommendation comes from my experience teaching web development (and using an ORM to interface with the database), because I've never had the opportunity to teach a database management course.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd recommend using an RDS like SQLite. SQLite is an RDS that stores the database in a binary file, and has a SQL command line interface. I find it fairly simple to use, and a good introduction to how relational databases work and how to interact with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has GUIs, such as &lt;a href=&quot;https://sqlitestudio.pl&quot; rel=&quot;nofollow noreferrer&quot;&gt;SQLite Studio&lt;/a&gt; (which I've never used, but looks useful) and is fully cross platform. It also provides a good stepping stone to more typical production databases such as PostgreSQL, MySQL, MS SQL Server, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also open source and in the public domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you choose to teach from the command line interface, that'd easily eliminate the GUI related issues you mention in the question, and would also force the students to interact with the database using SQL (which is a good and bad thing).&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2017-12-22T01:02:53.553" LastActivityDate="2017-12-22T01:02:53.553" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4079" PostTypeId="2" ParentId="4063" CreationDate="2017-12-22T08:31:22.003" Score="2" Body="&lt;p&gt;Exam question order is known to influence performance via confidence and self-efficacy. Put easy questions at the beginning, hard questions at the end, and group questions together if they pertain to the same topic. Difficulty should be inherent in the question itself rather than in the test taker getting oriented to the topic, question, and answer choices. Example set of recommendation, though the following link pertains to surveying rather than assessment. &lt;a href=&quot;https://www.socialresearchmethods.net/kb/quesplac.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.socialresearchmethods.net/kb/quesplac.php&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't find the reference at the moment, but if I recall the details, a not infrequently cited example is that demographic questions accompanied a common college entrance test. Placing the questions at the end rather than at the beginning eliminated the gender difference previously observed. &lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2017-12-22T08:31:22.003" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4080" PostTypeId="2" ParentId="4058" CreationDate="2017-12-22T10:09:57.357" Score="2" Body="&lt;p&gt;cmake, allows you to define variables, these variables can be filled with strings.&#xA;These strings can be tools or files.&#xA;Additonally it allows for conditional compiling, setting version numbers and library injection.&#xA;I would have a look at: &lt;a href=&quot;https://cmake.org/cmake-tutorial/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cmake.org/cmake-tutorial/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now on how to explain:&#xA;Cmake utilizes a script language to make building projects much easier. It has a feature set that does specific things. Like requiring specific versions of files. &#xA;How to make it &quot;fun&quot; I dont know. But you could split your class in groups that each  have to create a header cmake replacement script, with a specific variable name. And a program that does anything they like, but has to use the defines. For example DEBUG&#xA;Then each group has to create a list of substitutions, and they share the substitutions. While executing the diffrent substitutions, they have to determine why something breaks or works although it shouldnt. This can be used to examplify, how the header operations work, and also how wrong or malicous usage can wreak havoc in their project.&lt;/p&gt;&#xA;" OwnerUserId="1868" LastActivityDate="2017-12-22T10:09:57.357" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4081" PostTypeId="2" ParentId="4065" CreationDate="2017-12-22T12:16:36.757" Score="8" Body="&lt;h2&gt;Too much, too fast&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&quot;First semester&quot;. If I parse correctly, you say 60% students are &lt;strong&gt;new to programming&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say &quot;The following points knock them out: they don't know how to test, they don't know how to check for memory leaks, they have no concept of encapsulating&quot;. And you say &quot;group assignments&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taken together, it looks like this course is &quot;introductory&quot; only in this sense it will introduce part of students to the idea that this university doesn't want to teach them (programming or even teach them how to learn programming), but it wants to filter them out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You cannot change that fact. You cannot help everyone, you can help some. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either you want:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to help programmers to become better&lt;/li&gt;&#xA;&lt;li&gt;to help some non-programmers to become programmers (will work 10% of the time in your setting)&lt;/li&gt;&#xA;&lt;li&gt;to help all non-programmers to learn a bit, but probably not enough to let them pass&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Presently your mini-course is a big mish-mash. Come on: someone needs to be informed how to google stuff? Really? And the next minute you talk about git? To help who, in what way...? Don't waste everyone's time, narrow it down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;to help programmers to become better&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;valgrind&lt;/li&gt;&#xA;&lt;li&gt;coding style&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;best practices -&gt; how to allocate memory, typedefs, file operations&lt;/li&gt;&#xA;&lt;li&gt;basic program flow, some simple patterns&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;git&lt;/li&gt;&#xA;&lt;li&gt;pitfalls in general&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;to help some non-programmers to become programmers (will work 10% of the time in your setting)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;you want to give them ready-made stuff; their heads are bound to explode, the more boilerplate you give them, the less the explosion&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;make &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;boilerplate gcc flags included, etc&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;pitfalls specific to this course&lt;/li&gt;&#xA;&lt;li&gt;the rest will come later (i.e. someday they will decide they need to improve on memory handling - but not today for sure, someday they will decide to migrate version control out of their Facebook - not today)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;to help all non-programmers to learn a bit, but probably not enough to let them pass&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;how to google their problems&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;how to use the manpage&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2765" LastEditorUserId="1035" LastEditDate="2020-04-27T13:45:36.690" LastActivityDate="2020-04-27T13:45:36.690" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4082" PostTypeId="1" CreationDate="2017-12-22T18:12:52.797" Score="4" ViewCount="202" Body="&lt;p&gt;I've been teaching Objects for years now as part of AP Computer Science A (which means that I am teaching OOP in Java), and I have experimented with putting Interfaces in at different locations.  In general, I currently teach in the following order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Class Structure&lt;/strong&gt;: the coupling of data with relevant methods.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Information Hiding&lt;/strong&gt;: making each class responsible to guarantee the integrity of its data.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Designing the API&lt;/strong&gt;: Given what we've learned, how should we design the public face of our classes?  Included in this section is the concept of overloading.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;: Creating relationships among classes, inheriting and overriding.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;: Being able to utilize children in place of their parents, and how that works.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Interfaces seem most related to Polymorphism to me, since we can (for instance) make an &lt;code&gt;ArrayList&amp;lt;SomeInterface&amp;gt;&lt;/code&gt; but wherever I put it in, it always feels like some add-on instead of like the core and vital concept that it really is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where (and how) do you integrate Interfaces into your OOP exposition?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="204" LastEditDate="2017-12-26T09:45:17.827" LastActivityDate="2018-02-08T13:29:37.053" Title="Where, sequentially, do Interfaces sit in an introduction to Objects?" Tags="|curriculum-design|object-oriented-paradigm|interface|lesson-order|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4083" PostTypeId="2" ParentId="4082" CreationDate="2017-12-22T18:39:18.310" Score="8" Body="&lt;p&gt;Ideally, interfaces come first. Before Classes. Interfaces define &lt;em&gt;concepts&lt;/em&gt;. Classes implement those concepts. Don't think of them as an add-on to OO programming. Think of them as the essence. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, if you present a pre built class to students, my guess is that you already, probably informally, give the interface first. Here is a class with public methods &quot;accept&quot; and &quot;spitOut&quot;, or something like that. You probably talk about the public methods first and the necessary parameters and return values. More importantly, you probably talk about the &lt;em&gt;intent&lt;/em&gt; of the class and of the individual methods. Most likely, and I think most common, only then do you discuss the implementation of the methods along with fields, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you start your discussion with the fields, on the other hand, you are (IMO) making a big mistake and that students will start out by thinking at too low a level and will write their code too often in terms of getters and setters. In other words the encapsulation will be inconsequential and possibly leaky. Then, in a program with a few tens of classes and a few hundreds of objects, but, perhaps thousands of fields, they will be thinking about the fields and how they mutate, rather than the concepts represented by the objects in the system. Their thinking will be at a lower level than is efficient (or even possible, in some complex programs). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you introduce the concepts first, and get them to (a) think in terms of those concepts and (b) implement those concepts faithfully they will be naturally led to think at a higher level of abstraction, which is really what programming languages are &lt;em&gt;for&lt;/em&gt; in the first place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some rules that I'd adhere to with rare exceptions and no exceptions at the start. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;When you implement an interface don't give the class any additional public methods. Thoroughly document the intention of the interface and its methods.&lt;/li&gt;&#xA;  &lt;li&gt;When you build a subclass of an existing concrete class, don't give the subclass any public methods that don't have signatures in the superclass. (Abstract classes can be a bit different, but it is dangerous and adding public methods should be delayed.)&lt;/li&gt;&#xA;  &lt;li&gt;If you need new things in a subclass, extend the interface instead, as it represents a new concept, and implement that, rather than just extending the superclass, though you can also extend as an implementation strategy. &lt;/li&gt;&#xA;  &lt;li&gt;Prefer composition of objects over inheritance. An object is composed of other simpler objects (representing their own concepts). With composition you will probably be able to &#xA;  &#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;a. Write simple classes (a few public methods)&lt;br&gt;&#xA;    b. having simple methods. I get antsy when a method is more than about 4 lines or has any nested internal structure. &lt;/p&gt;&#xA;  &lt;/blockquote&gt;&lt;/li&gt;&#xA;  &lt;li&gt;Use simple design patterns to make it fit together. These are just another sort of concept and are themselves normally defined with interfaces.  &lt;/li&gt;&#xA;  &lt;li&gt;Avoid getters and setters (in interfaces and classes). They lead the student to think of everything in terms of mutations of implementation, rather than at a high level. I use &lt;em&gt;accessor&lt;/em&gt; for a method that returns information (possibly a field's value, but not always or often), and &lt;em&gt;mutator&lt;/em&gt; for a method that somehow changes the internal state of an object. A mutator might in fact have nothing to do with fields and might pass on a message to one of the implementing objects or set up a chain of mutations. Thinking in terms of setters is too narrow, but also too low level. &#xA;  &#xA;  &lt;hr&gt;&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Some modern OO languages don't have formal interfaces, but you can normally simulate them to separate out the ideas from the implementations. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that the Standard Template Library (which I haven't used in quite a while) was, itself defined in terms of &lt;em&gt;concepts&lt;/em&gt; and the term was (maybe still is) used in the literature. This was just a placeholder for interfaces that C++ didn't support. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea here is to build a software system in terms of readily understood concepts. The resulting system has its complexity in the &lt;em&gt;interactions&lt;/em&gt; of simply understood things, rather than in the things themselves. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I often write an interface when I intend only one implementing class. Capture the concept first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, note that I often write an abstract class that has protocol (abstract methods) for every method in any intended subclass. This lets me capture a common implementation, but keeps my concept clear as I subclass. I never need to ask &lt;em&gt;instanceof&lt;/em&gt; and I never need to cast an object reference. Everything naturally fits together freeing my mind to think of other (higher level) things. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-22T19:20:22.923" LastActivityDate="2017-12-22T19:20:22.923" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4085" PostTypeId="2" ParentId="4065" CreationDate="2017-12-22T22:23:24.780" Score="-1" Body="&lt;p&gt;It's important to teach that the name &lt;code&gt;C&lt;/code&gt; refers to two diverging languages--a low-level language which is useful for systems programming because many operations which different platforms may handle differently are handled in a documented fashion characteristic of the actual execution environment, and a more recent high-level-only language which uses the same syntax as the low-level language, but which allows compilers to behave in arbitrary fashion if code attempts certain operations whose behaviors would be defined in the former language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given a piece of code like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;unsigned mul_mod_65536(unsigned short x, unsigned short y)&#xA;{&#xA;  return (x*y) &amp;amp; 0xFFFF;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;compilers for the former language would multiply the values of x and y&#xA;using whatever semantics the platform uses for integer multiplication,&#xA;take the bottom 16 bits of that result, and return them.  On platforms where integer overflow would yield a result whose bottom 16 bits is correct, the above would yield the correct mod-65536 sum for all combinations of x and y.  The published rationale for C89 indicates that the authors of the Standard would have expected such behavior from most current (and IMHO presumably future) compilers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On compiler processing the latter language, however, the above code may sometimes malfunction in totally nonsensical ways if the value of x*y would exceed 2147483647.  If, for example, code were to call &lt;code&gt;mul_mod_65536(i,65535)&lt;/code&gt; some &quot;modern&quot; compilers would use the multiplication to infer that &lt;code&gt;i&lt;/code&gt; cannot be greater than 32768, and thus &quot;optimize out&quot; code elsewhere in the program that would only be relevant if it were.  Thus, unlike some languages which specify that an overflow will wrap cleanly (like Java), or specify that it will trap (like C#, within &lt;code&gt;checked&lt;/code&gt; contexts), &quot;modern C&quot; requires that programmers absolutely positively prevent overflows from occurring under any circumstances even in cases where one of the above behaviors would suffice (or even in circumstances where either would be equally useful).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programmers need to be aware that there exists a lot of code which is written for the former kind of C, and also that some compilers like gcc and clang will be incompatible with such code unless explicitly forbidden from applying aggressive &quot;optimizations&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2073" LastActivityDate="2017-12-22T22:23:24.780" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4086" PostTypeId="2" ParentId="4065" CreationDate="2017-12-23T08:43:07.003" Score="7" Body="&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I was under the impression that this question was by a faculty asking for advice on best practices for teaching a course on C. Instead it's a question by a proactive student that is disappointed with the department's approach and wants to help educate his peers on best practices.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I believe that my answer is wrongly targeted but I'm leaving it here as I feel that it might hold some value to others.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;--&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I went to school for programming our department had a very interesting approach which, in my opinion, helped to mitigate a lot of the confusion surrounding a first introduction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Provide a very rigid style guide&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We had department-wide coding guidelines which were adhered to for all courses (much like when working for a company) so not only was code between students fairly consistent but also consistent between assignments for the &lt;em&gt;same&lt;/em&gt; student. This is often overlooked and is in my opinion one of the most important things when teaching what literally amounts to be a &lt;em&gt;foreign language&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Provide some form of static analysis for both style and logic&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Every assignment was passed through a &quot;style checker&quot; written by the department that verified a combination of style conformity and basic linting for static error checking. This further reinforced adhering to a single style of coding and the linting was helpful and helped us to not be afraid of output warnings and errors.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Provide unit tests so that students can focus on the implementation rather than the formatting&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Every assignment to be submitted was run through unit tests that verified input/output. This was tremendously helpful as it allowed us to spend less time on the math and more on the implementation and practical application of the code we were writing to solve a problem.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Focus on a standard and cross-platform tool-chain and leverage it to teach principals that are applicable to other environments; teach them the language not an IDE&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Compilers and the aforementioned tools were available only from the department &quot;Linux lab&quot; computers. We were tasked with learning the command line and text editor of our choice (&lt;code&gt;nano&lt;/code&gt;/&lt;code&gt;emacs&lt;/code&gt;/&lt;code&gt;vi&lt;/code&gt;) and compilation was done directly at the command line with &lt;code&gt;g++&lt;/code&gt;. We were also taught how to &lt;code&gt;ssh&lt;/code&gt; into the Linux lab so that we could work off-campus. This provided a simple environment without all of the extraneous features of IDEs and a basic introduction to both a Unix-like environment and command line compiling.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Put blinders on your students and choose to use a subset of the language to force students to think about solving problems with the language itself rather than through a library&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All classes for teaching programming principals stripped everything to the bare minimum so that we were learning not only the core of the language (C++ in this case) but eschewed even the STL; for example, we programmed all of our data structures by hand. We learned the tools and the language which allowed us to later understand what a given library was doing under the hood rather than it being a black box.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tell them where to go for resources&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It might seem like second nature to us but new students don't know where to go for resources and may not think beyond their textbook. Websites that provide an overview of the language, its keywords and headers, such as &lt;a href=&quot;http://en.cppreference.com/w/c/language&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;http://en.cppreference.com/w/c/language&lt;/code&gt;&lt;/a&gt; that are easily browse-able on an internet device are excellent. Man pages are also useful but remember that this is a foreign concept so remember to demonstrate how to use it frequently during class. A small library of books as references can also provide additional insight on how to tackle a problem outside of a course textbook.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;For those who are new to programming, this rigid conformity is essential to block out so much of the background noise and flip-flopping on coding style that is so prevalent for new students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There was no question for us about where top put braces, semi-colons, white-space, and comments. There was no question about basic linting. There was no question about whether a program worked or not since it was run through unit tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot stress enough how effective this approach was for me as a student. It gave us blinders that shielded us from the unimportant details and allowed us to focus on the most important things in each lesson and made learning to program a very satisfying and extremely rewarding experience.&lt;/p&gt;&#xA;" OwnerUserId="3791" LastEditorUserId="3791" LastEditDate="2017-12-27T15:50:00.100" LastActivityDate="2017-12-27T15:50:00.100" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4087" PostTypeId="1" AcceptedAnswerId="4091" CreationDate="2017-12-23T12:49:13.863" Score="3" ViewCount="82" Body="&lt;p&gt;I have been giving my class help-sheets, recently. This have lead them to me more independent. They are also filling in a S.N.O.T form, this is a form where they tick off tasks, to show if they did it by there &lt;strong&gt;S&lt;/strong&gt;elf, with a &lt;strong&gt;N&lt;/strong&gt;eighbour, with the help of an &lt;strong&gt;O&lt;/strong&gt;ther, or the &lt;strong&gt;T&lt;/strong&gt;eacher. I have been using these sheets, to give feedback and improve the help-sheets (If to many ask for teacher help, then improve the help-sheet).&lt;/p&gt;&#xA;&lt;p&gt;A consequence of this is that the help-sheets improve over the week ( I teach this lesson 11 times a week). This results in lesson latter in the week being better than at the start.&lt;/p&gt;&#xA;&lt;h1&gt;The problem&lt;/h1&gt;&#xA;&lt;p&gt;The improvement over each week, creates a bias. The students that have the lesson at the end of the week receive a much better lesson than those at the beginning.&lt;/p&gt;&#xA;&lt;p&gt;After a few weeks this will settle-down, as I will learn what I am doing wrong, and produce better work-sheets from the start. However there will always be some improvements, and thus some bias.&lt;/p&gt;&#xA;&lt;p&gt;How can a reduce/remove this bias?&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-23T23:59:04.583" Title="Reducing bias, from lesson that improves, as taught to a number of classes" Tags="|best-practice|bias|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4088" PostTypeId="2" ParentId="4087" CreationDate="2017-12-23T14:02:11.460" Score="2" Body="&lt;p&gt;tl;dr: My best guess is that your process is fine and you aren't inducing preventable bias (unless the students are in competition with each other)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be that you cannot. It may be that your analysis is incorrect. It may be that a solution would be worse than the status quo. It may be that you need not make changes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution would simply be to not improve this week's lesson but use the knowledge about the class to improve next week's lesson or worksheet and hold it fixed until the week following that one. Suboptimal, surely, but &quot;fair&quot; by some definition of &quot;fair. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your assumption that your sheets improve as you go is only &lt;em&gt;your assumption&lt;/em&gt;. It may not, in fact, be accurate. Each of your groups is different and will interpret things in different ways. It may be that your &lt;em&gt;improvement&lt;/em&gt; is a distraction or impediment to the next group (see below). It is hard to know until you interact with that group. &lt;strong&gt;Every student is different and all are different from you.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have thousands of students you can do a statistical analysis, of course, to determine if there is an bias effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't say whether your students are in some way in competition with each other (a generally poor practice). If they are, you need to worry about &quot;bias&quot;, but if they are not then you just need to &lt;strong&gt;do the best thing you can for each student.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you really suspect that bias is an issue and that some students are being advantaged and others disadvantaged by your scheme then you need to change, or at least adapt, it. You may need to set some time aside at the start of a lecture to get each group on the &quot;same page&quot; about the current state of things as you understand it. A few minutes of &quot;warm up&quot; at the start of the class can be helpful in any case. I often opened a lecture asking for questions that might have arisen, but you can also use it to make corrections/apologies/give encouragement/add emphasis...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A technical solution, of course, would be to provide some communication channel to all the students so that all can see any updated materials in a timely manner. You could even provide the lecture materials prior to the week's start and warn that they may be updated as the week progresses. Students could then, for example, print them out before class and use them to help follow the lecture. If you have a way to highlight changes to the base document, all the better. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I once taught the same course to three groups in back-to-back periods of about an hour each. I would take questions and use the questions from each group to &lt;em&gt;improve&lt;/em&gt; the lecture for the following group so that the same questions needn't be asked. However, I learned (eventually) that the following group might not have the same questions and might have seen the concept clearly already, so I was proactively answering a question that needn't be asked or answered. This accumulated into the third section of course and I found it hard (impossible) to complete the lecture in the third section. Let each group be itself, but if you make a mistake, fix it of course. If you say something dumb early on, you don't need to repeat it to avoid &quot;bias.&quot; &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A follow up:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I believe that you need to work to teach every student in every interaction (i.e. each class period for this discussion) it is probably beyond our ability to give each student precisely what he or she needs most at that time. If I am Socrates, teaching one student at a time, or if I'm an Oxford Don, teaching 5 student tutorials, I can probably do that, but with twenty to two-hundred students in front of me all I can hope to do is to make sure that &lt;em&gt;each student&lt;/em&gt; can learn &lt;em&gt;something&lt;/em&gt; that will advance their learning. Even that is a difficult task with mass education, but it can be achieved. Some students will learn more, because they are primed to do so, and some less, due to factors of their own making or otherwise. Teaching everyone &lt;em&gt;precisely the same thing&lt;/em&gt; is not an achievable goal unless the &lt;em&gt;everyones&lt;/em&gt; are just robots. Help every student advance. Don't favor anyone arbitrarily. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-23T15:58:25.290" LastActivityDate="2017-12-23T15:58:25.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4089" PostTypeId="5" CreationDate="2017-12-23T14:58:46.730" Score="0" Body="&lt;p&gt;Bias is a serious issue in many places. Bias can result from actions with unintended consequences as well as from active intent. This tag is especially useful for questions examining educational techniques that might result in bias and for suggestions on how to reduce bias and its effects. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-23T14:58:46.730" LastActivityDate="2017-12-23T14:58:46.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4090" PostTypeId="4" CreationDate="2017-12-23T14:58:46.730" Score="0" Body="Bias in education results from both intentional and unintentional acts, processes, and policies. Use this tag for questions that discuss the effects of actions that may result in bias as well as how to assure less bias in education. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-23T14:58:46.730" LastActivityDate="2017-12-23T14:58:46.730" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4091" PostTypeId="2" ParentId="4087" CreationDate="2017-12-23T23:59:04.583" Score="1" Body="&lt;p&gt;I would encourage a different way of thinking about this. For context, I teach in a place where I instruct many different courses at the same time (currently 7), but I have the benefit of being able to teach the same course for multiple years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This situation has created a need to prepare my courses so thoroughly that, in future years, large chunks of material can simply be run with very little prep time. I sometimes call this hyper-development. It is absolutely worth my while to spend 20 hours to develop 2 hours of class time if I end up with materials strong enough that I can use them for many years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I do see things from time to time that I wish to change, but these are often relatively small adjustments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This situation has forced me to think about lesson prep somewhat differently than I used to, as I no longer feel like I am preparing for the next day's lesson. Instead, I feel like I am preparing a lesson for multiple generations of students for I have not even met yet. And if something doesn't work well, I can adjust it immediately after the  lesson so that it goes better the next time.  I don't assume that I will have prep time next year to change the lesson; I just do it right away, while it is still fresh in my mind. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a form of capital investment that has served me very well. If I am busy, then my worst case scenario is that I get to run a lesson that worked well last year, and was already improved at that time.  If I have some extra time on my hands, I can further tinker to my heart's delight. This has resulted in pretty steady improvement to my instruction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as we need to encourage a growth mindset in our students, we should embrace the same in ourselves.  When you describe a pace of adaptation so fast that you can see the results of the change across the span of a single week, that's a remarkable thing, and it should be celebrated. Remember that the work you do fixing his lessons improves not only the educational outcomes for your current students, but for students you'll have in the future as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way to reduce the inequality that you describe is to stop improving your lessons, which only serves to hurt the later students and our educational mission. This is the natural result of you learning to teach a lesson better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do have one small practical tip: give your improved worksheets to the early students during the following week so that they also receive the benefits of this labor, and point out to the early sections that, even though they aren't getting the cleanest version at the start, in some ways they are still getting the better end of the deal, because the later versions are really tailored to their needs. Things that work well for them tend to stick around, and things that don't get changed. &lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2017-12-23T23:59:04.583" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4092" PostTypeId="1" AcceptedAnswerId="4094" CreationDate="2017-12-24T13:50:36.140" Score="2" ViewCount="402" Body="&lt;p&gt;I was looking at the CAS progression pathways, and noticed that in column 2 (Programming and development), it has selection (&lt;code&gt;if&lt;/code&gt;) before variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://community.computingatschool.org.uk/resources/1692/single&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/P8is9.png&quot; alt=&quot;CAS - progression pathways&quot;&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://community.computingatschool.org.uk/resources/1692/single&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://community.computingatschool.org.uk/resources/1692/single&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realise (from talking to the author), that the colour bands and the arrows were added with protect, and should be ignored. They were added for an era that was obsessed with levels, the day before levels were abolished (for key-stages 0-3).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a lot of teachers still teach in the order that is in this document, I was wondering: &lt;strong&gt;Is it possible to teach selection (&lt;code&gt;if&lt;/code&gt;) before variables.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am asking this, as I am creating a dependency graph, so that I know what has to be taught before what.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;When I teach Python, I teach both much later, after iteration, procedures, and functions.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-12-26T09:44:45.710" LastActivityDate="2017-12-30T03:44:36.673" Title="Is it possible to teach selection (`if`) before variables" Tags="|best-practice|lesson-order|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4094" PostTypeId="2" ParentId="4092" CreationDate="2017-12-24T20:13:31.243" Score="5" Body="&lt;p&gt;From a practical standpoint, rather than a theoretical one, there are at least two pedagogically defensible ways to do this. Spiral curriculum, and Scaffolding&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Use a Spiral Approach&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I won't assume that you never mention variables early with this approach, but you just don't teach all that needs to be known at the first introduction of variables (or any other topic). To teach like this you mention things that need to be known deeply early on, partly to introduce terminology, but partly to permit simple uses in which deep knowledge isn't needed. Then, for example, variables but without reassignment could be used in setting up some sort of selection or iteration as your lecture focuses on those ideas rather than the variables. At any given point in time students know a little about a few things and a lot about some other things. Then, in the next &lt;em&gt;cycle&lt;/em&gt; you go a bit deeper in some topics but also introduce, very lightly, other topics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The implication is that a student never needs to completely understand any given topic the first time it is presented as it will be seen again. Everything is reviewed constantly in such a course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For purposes of this particular question, a variable could be initialized somehow and then used within a selection structure. The student need only have the idea that the &lt;em&gt;variable&lt;/em&gt; refers to a value and can be thought of as a temporary &lt;em&gt;name&lt;/em&gt; for that value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching a course in a spiral way requires some pre-planning, of course. It isn't enough to put each important topic into the syllabus only once. Neither is it enough to expect that every student will get a lot out of the first introduction and you don't, therefore, need to obsess that everyone is on the same page before moving to the next topic.  &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Use Scaffolding&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;An independent way of teaching is to have students first programming experiences done within a pre-defined richly endowed virtual world. The world is constructed so that interesting things can be done early without necessarily building up everything from the beginning. Often these world are simulations. For example, in Karel the Robot and its successors, programs consist first of writing sequences of statements to direct an existing robot. The robot's capabilities are built in and the student simply invokes existing functions/methods to achieve some complex effect. Next the student learns to write methods or functions as just abstractions over some sequence of such pre-build actions &lt;em&gt;and&lt;/em&gt; other actions already built by the student. In this way it is functional abstraction that is the first real topic of importance. You can introduce variables or not, and you will certainly do so when you want several robots acting together. But these variables are just object references and little needs to be known about them, including whether they can be reassigned or not. Selection is certainly a reasonable topic in such a world, as is iteration, polymorphism, recursion, or whatever you need to teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, careful thought needs to be given to the characteristics of the simulation &lt;em&gt;world&lt;/em&gt;. How rich is the environment. It can be simple, for example, and still be Turing Complete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some teachers might choose this path with a single simulated virtual world, and others might choose to use several worlds of increasing sophistication and, perhaps, increasing complexity. I'll note that &lt;a href=&quot;http://greenfoot.org&quot; rel=&quot;noreferrer&quot;&gt;Greenfoot&lt;/a&gt; was built precisely to provide an environment in which such simulations and virtual worlds would be easy to build.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Both of these techniques are very powerful and have been used by many instructors over a long period of time. Of course, they may be combined to good effect. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-24T20:18:51.413" LastActivityDate="2017-12-24T20:18:51.413" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4095" PostTypeId="2" ParentId="4068" CreationDate="2017-12-25T15:39:27.400" Score="5" Body="&lt;p&gt;At the state college I work for we stopped teaching Access as the &quot;intro to databases&quot; class a while ago.  I taught the class this term using MySQL and MySQL Workbench.  We had it installed on our lab machines (windows) and I also provided a VirtualBox VM with a Linux desktop, the MySQL server, the Workbench program, and a few other goodies.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I ended up with 2 extra class periods after the content was all delivered, I spent a little time showing different ways of interacting with the mysql server (command line, phpMyAdmin, code interaction via PHP and Java) as well as the mysql server management from the Linux class I teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our progression in our AS degree track - &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Intro to SQL - all inserts, updates, selects, joins, transactions, views, stored procedures.  Nothing on creating tables - just working with existing databases and tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Databases 2 - all table structure and relationships, referencing back to Intro class constantly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;second semester programming classes (C++ or Java) get into workign with a database from a programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For our batchelors program, there is more use of programming and databases, with students learning MongoDB.  The batchelors level programming classes all use database connectivity, although with the Android class we move from mysql or mongo to sqlite.&lt;/p&gt;&#xA;" OwnerUserId="662" LastActivityDate="2017-12-25T15:39:27.400" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4096" PostTypeId="2" ParentId="4092" CreationDate="2017-12-25T16:57:49.970" Score="3" Body="&lt;p&gt;The first 6 or 8 days of the year we work in &lt;a href=&quot;http://home.cc.gatech.edu/dorn/jeroo&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jeroo&lt;/a&gt; instead of straight Java (there's a Python mode as well). It serves as a very quick introduction to syntax, ifs, and while loops. I've found it helps when I can go back later in the year with &quot;remember in Jeroo when...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What Jeroo doesn't have is variables. You can't do things like loop 5 times. You can only loop or if while a Jeroo &lt;code&gt;hasFlower()&lt;/code&gt;, &lt;code&gt;isFacing(EAST)&lt;/code&gt;, or something like that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They're not directly using variables, although they're using boolean conditions. I've found that starting with methods like &lt;code&gt;hasFlower()&lt;/code&gt; makes the idea of &lt;code&gt;x == 2&lt;/code&gt; easier to wrap their heads around when we get to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We only spend a few days in Jeroo because students start to get frustrated with what it can't do. You can't tell a Jeroo to loop a set number of times. You can't ask a Jeroo what column or row they're at. You can't ask them how many flowers they have. Any of those frustrations work really well as a hook into why variables are useful. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-12-25T16:57:49.970" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4097" PostTypeId="2" ParentId="4068" CreationDate="2017-12-26T01:59:47.063" Score="1" Body="&lt;p&gt;I'll start by saying that my experience is in industry, not in a classroom. I worked for a fortune 500 company that brought a new division up to the billion dollar per year mark using an MS Access database. For five years, over a decade ago, I was one  of the people working in Access daily to expand and manage the product until it was retired.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While MS Access has flaws and weaknesses,  it's a real powerhouse in the right hands. Tuning an MS Access database is much like tuning DB2 without the tools. We can actually blame Access for the prevalence of SQL based solution in enterprise computing - IT departments using ISAM/VSAM/other &quot;no sql&quot; solutions couldn't compete with a business user at their desktop for cost/benefit for projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to get enterprisey, all of the major players (Oracle, IBM, Microsoft) have free and education licenses. Of the three,  MS is my own preference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PostgreSQL is the only open source RDBMS that I recommend, mainly because it's the only one positioned as enterprise ready. MySQL and SQLite are positioned as entry level databases for projects that don't require enterprise features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Comments prompted this realization that what I look for in a database for enterprise work is much the same as what I would expect educators to look at, and a list of those attributes might be useful, in no particular order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RDBMS's are mission critical components that develop almost cult followings. While I tend to favor some RDBMS's over others, I have no emotional investment in favor of any I have used over any other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. Ease of Support&lt;/strong&gt; - if a system requires a lot of support, it is expensive for the enterprise and untenable for the education market. DB2 is incredibly hard to support, so it is one I rarely recommend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Consistency&lt;/strong&gt; - if the RDBMS behaves in a consistent manner under a broad range of conditions, many quirks can be tolerated and worked around.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. ACID compliance&lt;/strong&gt; - Does it support &quot;all or nothing&quot; transactions spanning multiple statements? Partial commits are hard to debug.  ACID compliance means easier error handling and better focus on the problem at hand. MySQL and SQLite fail this test, but are still fine for many types of problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. Locking behavior&lt;/strong&gt; - every RDBMS has is own way of handling latching and locking, which is best under specific circumstances. In my experience, generational or non-locking architectures are easier to work with in general because locks are rare events.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Postgres, SQLServer, and Oracle are least prone to locking issues. DB2's locking behavior is a consistent source of complaint from develoeprs and support teams. MySQL locks the entire database on every write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Real life scenario - kids volunteer as developers with open community game servers and get good experience. I don't have the patience to tell the kid over and over that he's fixated on the wrong RDBMS for that particular job because MySQL locks the entire database for every write operation, and saving game state in a MMORPG is too write intensive for that product. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5. Standards compliance&lt;/strong&gt; - none of the RDBMS' are 100% standards compliant, but the big three and postgres are gradually narrowing in on standards compliance. They mostly extend the standard versus violate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;6. XA support&lt;/strong&gt; - this allows products spanning multiple databases and even non-RDBMS data sources/sinks to use multi-phase commit logic to ensure the ACID compliance spans the entire system. Whether or not this is important depends on the system you are building.  The big three and Postgres all have good XA support.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;6. Support system&lt;/strong&gt; - When you have a problem, can you find help?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, DB2 communities tend to be unhelpful (&quot;why does't you company hire a real DBA?&quot; is a common response to questions. IBM has education and free license options, but IMHO it's a pain to manage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oracle communities are very helpful - Tom Kyte is/was the product architect at Oracle, and his blog &quot;Ask Tom&quot; is one of the best sources of help for Oracle issues. Oracle's full standard database is freely licensed for non-production use.  Oracle is difficult to set up initially, but very stable after that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;SQLServer is so pervasive now and is so easy to handle compared to the other &quot;big three&quot; that answers are usually a &quot;google&quot; away, usually on Microsoft's technet site or one of the Stack Exchange communities. SQLServer is easy to set up and requires almost no management once it is configured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The open source databases tend to be very well supported by their developers and user communities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Overall&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no reason not to use the &quot;big three&quot; given the free and educational licensing options available. Of the three, SQLServer imposes the least disruption to the development (or education) process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Postgres is right up with the big three for reliability and features.  The first upgrade path for successful projects built on MySQL is usually to convert to Postgres.  Since MySQL and Postgres are the same price, why not start with Postgres if you prefer to use an open source database?  Postgres is (in my experience) less quirky, allowing you to focus on the matter at hand.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditDate="2017-12-26T15:29:27.263" LastActivityDate="2017-12-26T15:29:27.263" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4098" PostTypeId="2" ParentId="4071" CreationDate="2017-12-26T06:07:51.627" Score="1" Body="&lt;p&gt;In industry,  the DEV environment is where developers are free to play and break anything (provided they fix it for those who follow). A typical enterprise shop will have a DEV, TEST/QA, and PROD environments,  with developer access to DEV being nearly unlimited,  but PROD being limited to end user support without significant from 5 layers of management and a pope.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;DEV will typically mirror prod closely enough for practical purposes,  but be underpowered to reflect its lesser usage. &lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-12-26T06:07:51.627" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4099" PostTypeId="1" AcceptedAnswerId="4102" CreationDate="2017-12-27T00:40:56.753" Score="5" ViewCount="3569" Body="&lt;p&gt;I'm thinking about teaching App Inventor to students who have just begun their adventures in the programming field. MIT's App Inventor is based on block-coding, where the user designs the UI and then designs their functionality with block coding. However, it has so much more potential than traditional drag-and-drop languages as mentioned in an article I found on this website (&lt;a href=&quot;https://cseducators.stackexchange.com/questions/2777/placement-of-app-inventor-in-high-school-cs-curriculum&quot;&gt;Placement of App Inventor in high school CS curriculum&lt;/a&gt;). I think it's a great way to get students started on learning how to program (basics of coding and how to work out solutions), but I'm afraid it also might be a bit dull for those who already have had some experience with other programming languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some advantages and disadvantages of teaching block coding?&lt;/p&gt;&#xA;" OwnerUserId="3809" LastActivityDate="2017-12-27T23:38:27.420" Title="Advantages and Disadvantages of Teaching Block-coding Languages Such As MIT's App Inventor?" Tags="|block-based-programming|app-inventor|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4100" PostTypeId="2" ParentId="4092" CreationDate="2017-12-27T14:30:08.557" Score="0" Body="&lt;p&gt;This year I managed to present both functions and if-then-else before variables to my (total beginners) students. We're using Processing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students are first presented with basic drawing operation (rect, ellipse, fill)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exercise for Functions : draw a moderately complex picture&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solution (sketch of):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; void setup() {&#xA;     size(600, 200);&#xA; }&#xA;&#xA; void draw() {&#xA;    draw_sky();&#xA;    draw_seashore();&#xA;    draw_boats();&#xA; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Exercice for if then else : draw a square on the screen, and a circle for the mouse pointer. Circle is red when inside the square, green otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well,  mouseX and mouseY are framework variables, actually. We also constants (final), both global and local, so the students get familiar with the notion of scope. A bit later, parameters for functions (drawing the same shape at different places) are introduced. And then, &quot;real&quot; variables representing a user-changeable state (say, last position where a click occured).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better example, if really dont want the coordinates variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void setup()&#xA;{&#xA;  size(200,200);&#xA;}&#xA;&#xA;void draw() {&#xA;  background(255);&#xA;  if (second() % 2 == 0) {&#xA;    draw_square();&#xA;  }&#xA;}&#xA;&#xA;void draw_square() {&#xA;  fill(0);&#xA;  rect(50, 50, 100, 100);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A more elaborate example is drawing a clock with three needles. Makes a strong motivation to introduce variables for auxiliary computations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: some readers are not familiar with Processing and are too busy to have a look at the documentation, so :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the &lt;code&gt;second()&lt;/code&gt; function returns the current second (an int between 0 and 59).&lt;/li&gt;&#xA;&lt;li&gt;in a Processing program, the framework calls &lt;code&gt;setup()&lt;/code&gt; and then loops around &lt;code&gt;draw()&lt;/code&gt;, just like Arduino with setup+loop. Programmer has to provide the draw/setup functions together with functions as responses to events (&lt;code&gt;mousePressed&lt;/code&gt;, etc).&lt;/li&gt;&#xA;&lt;li&gt;the example shows a blinking square.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2017-12-29T15:49:39.353" LastActivityDate="2017-12-29T15:49:39.353" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4101" PostTypeId="2" ParentId="4099" CreationDate="2017-12-27T15:21:28.790" Score="5" Body="&lt;h3&gt;Student's Opinion&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Not a definitive answer by any means, but thought that I might add what I have learnt... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am 16, but first got exposed to block-coding at the age of 9. While I continued with more advanced forms and still make use of them (notably, LEGO Mindstorms), I grew out of block-coding very soon, and progressed to what one may call &quot;real&quot;-er programming languages.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I'm the head of the programming/computer club at my school and have noticed that students who were first exposed to &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer&quot;&gt;scratch&lt;/a&gt; (A block-coding language developed by MIT which it taught at junior-middle school at my school) pick up &quot;real&quot; programming languages quickly, since all the basic concepts are already known to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While teaching my juniors JS or C++ I'll often compare a concept to its equivalent in Scratch. That said, the obvious disadvantage is that scratch is &lt;em&gt;basic&lt;/em&gt;, and doesn't cover advanced concepts (return codes, arguments, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scratch and MIT App Inventor are very similar, and both are taught to my juniors at school, and students generally appear to enjoy these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it &lt;em&gt;is&lt;/em&gt;, indeed boring to those who have already had experiences with programming, and this is a problem to which you really should find a solution if you wish to move ahead with GUI-based programming languages in your curriculum.&lt;/p&gt;&#xA;" OwnerUserId="1912" LastActivityDate="2017-12-27T15:21:28.790" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4102" PostTypeId="2" ParentId="4099" CreationDate="2017-12-27T16:48:30.423" Score="5" Body="&lt;p&gt;The main attraction of block-based programming languages is that they expose users to the fun aspects of programming (creativity and design) without requiring them to deal with the less fun aspects (such as syntax and obscure errors). This enables students who might have dropped out of an introductory C++ course to get a taste of programming, both to expand their understanding of the world around them (since they use programs every day) and to motivate some of them to learn text-based languages when they hit the limits of block-based languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some disadvantages of block-based languages:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;They are not as accessible as text-based languages to students with visual and motor disabilities.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/860/how-do-i-convince-my-students-that-visual-programming-is-real-programming&quot;&gt;Some students think that they are not really programming&lt;/a&gt;. (&lt;a href=&quot;https://cseducators.stackexchange.com/a/877/283&quot;&gt;I disagree.&lt;/a&gt;) I encourage you to explicitly address these misconceptions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Don't assume that students who have seen other programming languages will be bored. Creating phone apps is hard, so the ability to do that may be of interest to them. If they are extremely advanced, you can encourage them to contribute to App Inventor, which is open source.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I was part of the App Inventor team and am co-author of &lt;a href=&quot;http://www.appinventor.org/book2&quot; rel=&quot;noreferrer&quot;&gt;a book about App Inventor&lt;/a&gt;. I have taught App Inventor at the college-level (to non-majors).&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2017-12-27T16:48:30.423" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4103" PostTypeId="2" ParentId="4099" CreationDate="2017-12-27T23:38:27.420" Score="2" Body="&lt;p&gt;Often beginners don't know where to begin when given an assignment. They may stare at a blank screen with a blank look. Once they start typing they may make many errors and become frustrated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Block based languages can help with this as they normally have a UI that shows all of the options that are available at a given moment. The UI itself serves as a prompt for what might be added to that nasty blank screen. It also provides things such as correct spelling and correct nesting of elements as well as (possibly) giving error highlighting and correcting as well as pretty-printing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Block based languages need not be especially limited. I have built and used such systems that create and show a textual version of the program and it can be in a real language or in some subset suitable for beginners. The user can, for example, create Java classes, methods, statements, including structured statements, etc. It is challenging, though not impossible to build such as system that gives complete access to the standard libraries as well as the complete language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such systems can keep a structured form of the program (e.g. a parse tree) as the internal structure and can therefore produce the output in various formats such as text and structure diagrams. This is relatively easy to do as the user enters structures directly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, such a tool can be used to storyboard an application, creating the class structure with key methods and then take its output, which can be just text, into a more full featured IDE. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the problems that novices have with learning programming is that, too often, they are asked to write when they have never read any interesting programs. Reading good programs is a good way to help people understand program structure and good style. But few courses are taught that way. A block-based tool is, in my mind, a sort of intermediate point between the extremes of reading little before writing and reading a lot first, since the available options are visible and it is difficult to make a low-level (lexical or syntactical) mistake. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, such systems are normally (though not always) built in such a way that the learner can get near immediate feedback from the execution, with compilation, etc. handled automatically. If the program being written is graphical in nature this can be a big motivator. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2017-12-27T23:38:27.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4104" PostTypeId="1" CreationDate="2017-12-28T12:15:34.727" Score="5" ViewCount="425" Body="&lt;p&gt;I like pupils to work in pairs, as they learn quicker this way, and need teacher help less often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there are problems, when working together on a computer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Free loaders. For this, I give them two roles: Driver and Navigator. The Driver controls the computer, the Navigator does most of the thinking, and tells the Driver what to do. They then switch role often. I manage this by walking around.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access to previous work, when the partner is not present. Because pupils have to log in, and use a single account. There is a problem if the account holder is not present (ill), or if I want to re-pair students.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Has any one any experience with this &lt;strong&gt;2nd point&lt;/strong&gt;, and do you have any solutions?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I am mostly looking for non-technical solutions. I will add a technical solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I am not only asking about programming. There may be other work on the computer.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2017-12-29T10:16:09.857" LastActivityDate="2019-09-27T18:56:42.677" Title="Allowing students to work cooperatively on a computer, and retain access to their work" Tags="|collaboration|" AnswerCount="8" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4105" PostTypeId="2" ParentId="4104" CreationDate="2017-12-28T12:15:34.727" Score="1" Body="&lt;h1&gt;Some technical solutions&lt;/h1&gt;&#xA;&lt;p&gt;I am not looking for technical solutions, but I have included a few here, in case they would be useful to others (and this is not the right site for asking for such solutions).&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use Access Control Lists (ACLs). These are available on MS-Windows and Gnu/Linux, and can be used to set a list of users that have access to files.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Set up the computer or websites, so that two users can login at the same time. For Gnu/Linux you could probably configure PAM.&lt;/p&gt;&#xA;&lt;p&gt;I imagine that this would be a lot of work to set up resources, e.g. a web-based resource that tracks which two students did each activity.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The first solution, is the only one that could be used adhoc, without any set up. I have noticed that very few people use MS-Windows ACLs, probably because they are very complex. However there is a sub-set that is simple and useful. With the correct tools they could be made easy to use.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-28T12:15:34.727" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4106" PostTypeId="2" ParentId="4104" CreationDate="2017-12-28T12:46:45.117" Score="4" Body="&lt;p&gt;Actually, in true pair-programming no one works (or at least modifies any code) unless the partner is present. This is an important rule as I've seen really bad things happen when one member of a pair (or team) thinks he/she &quot;gets it&quot; and doesn't. I've had to spend half a day backing out &quot;improvements&quot; that were really misunderstandings by the perpetrator. People are not, however, forbidden to think about the project when alone - which would be foolish. To ease the offline thinking, pairs can be encouraged to simply email the existing code to both members so they have a basis for their deliberations. Printing it is even better, as it can be marked up on the bus, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To solve the other issues, you could create meta-accounts for the pairs in which pair members know the credentials and change them when pairs are reassigned. Using personal accounts for group work is probably a mistake. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to manage exchange of ideas and peer-teaching in such a situation is to let pairs work for a while, swapping roles as appropriate, and then mixing up the pairs. The navigators at that moment move to a new station and the driver stays with the one they are &quot;driving&quot;. The navigator continues to navigate, coming up to speed for a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a caveat, and a suggestion for your overall process. I consider it poor practice to swap roles by the clock. They should switch at natural points. The classic one is that the driver drives until he/she gets stuck and the navigator, who has been really navigating and not just observing, knows how to proceed. Rather than make a suggestion about how to proceed, the navigator just takes the keyboard and continues. This may not be sufficiently often in the classroom as some students will (foolishly) try to dominate and others (equally foolishly) may try to ride along for &quot;free&quot;. So...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way to encourage frequent switching is to combine pair programming with a strict pre-test rule: &lt;em&gt;No code without a failing test&lt;/em&gt;. Switching then goes like this. One partner writes a failing test for the code and the other takes over long enough to (a) make that test pass and (b) write another failing test. Then they switch again and continue. This has been called &quot;heartbeat&quot; switching. It also encourages the navigator at the moment to stay engaged. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The navigator is NOT an observer&lt;/em&gt;. Don't let students think that it is easier than driving. It has an important &quot;strategic view&quot; purpose that complements the &quot;tactical view&quot; of the current driver. With no need to think at the detail level, the navigator keeps the direction of travel in mind. Both participate equally, though differently. Make sure students understand that. The job of the navigator is definitely NOT to get coffee for the driver, nor even to do background research. Both should do those things together. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For paired/group work that does not involve just programming you should seek to assure that the members of a group don't just &quot;divide up the work&quot; between them, but actually work cooperatively on it for all phases. Students think that division is a great idea until they reach the point of trying to integrate possibly inconsistent separate work. On Agile teams, pairs work together, but the team's pairs work on different things. The daily &lt;em&gt;Stand Up Meeting&lt;/em&gt; is the way for all of the pairs to assure that they all work toward the common purpose. So, you might institute a practice of &lt;em&gt;daily face to face&lt;/em&gt; meetings in each pair/team so that if they work separately they do so only on small and easily integrated things rather than big chunks that don't necessarily fit together. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Additionally, in a course that uses pair and group work extensively it is a good idea to use &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3408/how-can-i-effectively-manage-peer-evaluation-among-my-students&quot;&gt;peer evaluation&lt;/a&gt;. In addition to the suggestions at the link you can use index cards creatively to capture the individual evaluations and create a matrix form in which to record them. I'm assuming that you change teams/pairs, so that students get to work with a variety of partners. It is really only necessary to record the exceptional evaluations (good and bad). The matrix lets you see not only who is consistently given good or bad evaluations, but also lets you see who &lt;em&gt;gives&lt;/em&gt; consistently good or bad peer evals. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2017-12-29T10:36:01.813" LastActivityDate="2017-12-29T10:36:01.813" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4107" PostTypeId="2" ParentId="4104" CreationDate="2017-12-28T17:40:35.573" Score="4" Body="&lt;p&gt;You mention this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Access to previous work, when partner is not present. Because pupils have to log-in, and use a single account. There is a problem if the account holder is not present (ill), or if I want to re-pair students.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;... but how do they access it when their partner &lt;em&gt;is&lt;/em&gt; present?  Do they have to be on the same machine?  That's fragile (computer dies, is stolen, in use by another pair, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you need something on a centralized server.  Something that can control access to accounts, where multiple people can share code, and (probably) you can use to hand out any &quot;starting point&quot; code for assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would also be nice if the system tracked things like changes to the code (enable the students to figure out what changes caused a problem), the ability to automate submission assignment and grading, and a few other things.  Plus it should look like something the students are going to be expected to use for any real-world programming.&lt;/p&gt;&#xA;&#xA;&lt;hr /&gt;&#xA;&#xA;&lt;p&gt;If you haven't realized it yet, I'm proposing that what you really need is a version control system, probably a packaged server version like what most of the big name providers give you:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Allows you to hand out &quot;stub&quot; assignments (fork)&lt;/li&gt;&#xA;&lt;li&gt;Students can restrict code view to assigned partner (private repositories)&lt;/li&gt;&#xA;&lt;li&gt;Automatic submission of assignment (pull requests, or at least links to a specified branch/revision)&lt;/li&gt;&#xA;&lt;li&gt;Can track how much work is done by each student.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I wouldn't be surprised if there was already an &quot;educator&quot; version of something like Github or GitLab out there.  Get a distributed server package, set yourself and any TAs up as system admins.  That would allow you to be able to change teams, if necessary, as well (grant access to repository).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(As a note, I'd just go ahead and use a git-based system.  True, it's more complicated overall, but it's unlikely you'd need more than straight commit/push in this situation)&lt;/p&gt;&#xA;" OwnerUserId="3821" LastActivityDate="2017-12-28T17:40:35.573" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4109" PostTypeId="2" ParentId="4104" CreationDate="2017-12-28T17:42:39.070" Score="0" Body="&lt;p&gt;For point 2. I can think of a few solutions each with different amounts of work and tradeoffs.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;At work we'd use revision control for this. The repository is stored&#xA;in a common location where all people have access. Whenever you're&#xA;done working as a pair you'd push/commit your work. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have everyone work on a shared network drive permissioned by&#xA;you. Each pair would get a folder just for them. Or its just a freeforall.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have every workstation be 'public' as in there's only one user and&#xA;it's always logged in. The students will do their work, and as long&#xA;as the work station is available they can work on it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1530" LastEditorUserId="204" LastEditDate="2017-12-28T18:29:49.820" LastActivityDate="2017-12-28T18:29:49.820" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4110" PostTypeId="2" ParentId="4104" CreationDate="2017-12-28T20:06:08.027" Score="0" Body="&lt;p&gt;The way our network is setup I have access to my students network shares. So, if a kid is absent I can get to their stuff and copy it for their partner. Not ideal, and definitely doesn't scale well if there are a bunch of students absent. Plus, I really don't like the privacy implications. But it works in a pinch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also had groups share a flash drive, and then leave that flash drive in the classroom. Works okay if there's no plan on working outside of class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some groups will zip up and email themselves the work they've done at the end of class. Or, upload to DropBox, Google Drive, or something like that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal preference would be some type of source control. I've been looking for a reason to introduce git into my 2nd year course. Maybe this would be a good excuse. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2017-12-28T20:06:08.027" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4111" PostTypeId="2" ParentId="4104" CreationDate="2017-12-30T02:59:36.703" Score="0" Body="&lt;p&gt;Speaking from an industry perspective, my team is scattered around the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Source code is managed on a server in our rack in the USA.  We use subversion because git and mercurial are a pain to work with. I can get to my team's checked in source code daily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While some of my team live close enough to each other to have face to face time, most work at a distance. Partner work is handled through online conferencing software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everyone has their own accounts. Work is checked in to the version control system regularly (daily or more often if possible).  Since everyone has their own account, we can use the subversion &quot;blame&quot; function to identify who checked in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A caution - operating the computer takes a certain amount of brain power, so the real work on the problem may be done by the partner who is not keyboarding. Detecting &quot;freeloaders&quot; based on counts or volume of checkins creates a false sense of security, and my be punitive to a team that has really worked out how pair programming works for them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember my final assignment for PDP-11 assembly class, which I worked on with a partner. With my prior experience, I was able to quickly solve the assigned problem in a way that earned all of the bonus points. For the curious, we built an desktop calculator in assembly. Bonus points were handling algebraic order, parentheses, square root, remainders, hexadecimal conversion, and smallest program. We got all of that into 120 bytes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My partner, who handled the keyboarding, looked at the finished program, had no idea of why it even worked and (wisely from a learning perspective) decided to try to solve the problem on his own without my help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Had he not made that decision, one could argue either that I was the freeloader because I had not keyboarded anything, or that he was the freeloader because he depended wholly on my experience. The instructor would have no way to tell who (if either) was the freeloader without knowing both of us very well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;LOC and similar metrics from code and checkins are not useful for determining programmer productivity either in industry or in education.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-12-30T02:59:36.703" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4112" PostTypeId="2" ParentId="4092" CreationDate="2017-12-30T03:44:36.673" Score="0" Body="&lt;p&gt;Yes. Programming languages that don't have variables still have conditional branching. The paradigm is called &quot;functional programming&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a link to a list of programming languages that support functional programming: &lt;a href=&quot;https://en.wikipedia.org/wiki/Category:Functional_languages&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Category:Functional_languages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A list of pure functional languages can be seen at this link: &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is an example functional programming exercise in javascript that I found:&#xA;&lt;a href=&quot;https://hackernoon.com/challenge-program-without-variables-javascript-bee89a41455e&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://hackernoon.com/challenge-program-without-variables-javascript-bee89a41455e&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some other links of interest:&#xA;&lt;a href=&quot;https://stackoverflow.com/questions/1020653/how-can-you-do-anything-useful-without-mutable-state&quot;&gt;https://stackoverflow.com/questions/1020653/how-can-you-do-anything-useful-without-mutable-state&lt;/a&gt;&#xA;&lt;a href=&quot;https://www.cs.ox.ac.uk/geomlab/CAS-article.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.ox.ac.uk/geomlab/CAS-article.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2017-12-30T03:44:36.673" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4113" PostTypeId="1" AcceptedAnswerId="4114" CreationDate="2017-12-30T17:54:05.750" Score="5" ViewCount="342" Body="&lt;p&gt;I am now teaching an OOP course to 2nd year undergrads. This is actually a course in advanced programming in Java. In the next semester, I am going to teach the same students, a C++ course. From what I know, C++ and Java are quite similar - there are differences, but they can be covered in 2-3 hours, which are one week of teaching. This leaves me 12 more weeks, and I wonder what else to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I looked at the syllabus from previous year and it looks quite similar to my current Java course: OOP, overloading, generics, unit-testing, software design, etc. I don't want to teach the same course twice in different languages...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One idea that I had is to focus, not on teaching the language itself but on teaching specific practical applications in which C++ has a clear competitive advantage. For example, if game-programming is usually done in C++, then I can focus on game-programming. So my first question is: what kind of applications are written in C++ substantially more than in Java?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And my second question: what other new topics can I include in this C++ course?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[NOTE: in case this is relevant, the same students currently take a course in C].&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2018-01-08T01:08:46.753" Title="Teaching C++ to students that know Java" Tags="|curriculum-design|java|undergraduate|c|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4114" PostTypeId="2" ParentId="4113" CreationDate="2017-12-30T23:10:09.947" Score="10" Body="&lt;p&gt;Actually, the similarities between C++ and Java are fairly shallow and the differences are very deep. The syntax of both is derived from C, but the underlying ideas are very different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biggest difference is that an &quot;object&quot; in C++ is built on the stack, like a struct, not on the heap. It takes additional work and a lot of understanding to become comfortable with the differences. If you do create objects on the heap (with &lt;code&gt;new&lt;/code&gt;) you need to understand the differences between pointers and references and these can be the source of hard to debug errors. And you need to be absolutely pure with deallocation. Every object needs a known lifetime to the programmer, whereas Java handles all of that automatically. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;C++ has no garbage collector for heap objects, so the memory management problem needs to be solved for every application, unlike Java where it is solved once by the run-time system automatically. Smart pointers in C++ can help a bit with this but are not a complete solution. Memory leakage for non-trivial applications is a serious issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The visibility of things is also fundamentally different, with &quot;friend&quot; classes complicating the mental models of complex systems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't underestimate the difficulties. You will likely have a lot of work to do to get the students comfortable with quite different mental models and with practices and idioms that keep them safe. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;James Gosling once described Java as C++ without the guns, knives and clubs. You will be trying to program with all of those pitfalls, when the students, coming from Java, have little experience with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their experience with C, if deep enough, will help with the memory management issue, but not with the complex (i.e. dual) object model of C++. You should become familiar with good memory management tools and practices if you want to do non-trivial things in C++. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was once stopped dead in a C++ project by a deallocation error for 24 hours. The solution required a 1 character change in a file. One character of progress per day is very bad, though I was an experienced programmer and actually knew why it was failing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your own experience with C++ seems shallow from the statement of your question. I'd suggest that you work &lt;em&gt;hard&lt;/em&gt; on that before you attempt to teach such a course. Especially, build something that requires sophisticated memory management and test everything as you go. You can't think of C++ as just mis-spelled Java, nor Java as just mis-spelled C++. The conceptual differences are many and deep. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own experience as a programmer (and author)` is that Java helps me program correctly, but C++ fights me constantly for every inch of ground. I could build some beautiful things, but the fight was constant and brutal. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2017-12-31T09:31:23.033" LastActivityDate="2017-12-31T09:31:23.033" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4115" PostTypeId="2" ParentId="4113" CreationDate="2017-12-31T10:04:02.960" Score="2" Body="&lt;p&gt;I worked on a professional project. We chose C++, as we could see that there were a lot of C++ programmers out there. By a short way in, we realised that we were wrong. There are a lot of programmers that say they are C++ programmers, but most are incompetent. Not because of them selves, but because of the language. It took a lot of training to get them and ourselves up to speed.&lt;/p&gt;&#xA;&lt;h1&gt;Many to many relationship of features.&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each C++ feature can be used to implement many different OO concepts.&lt;/li&gt;&#xA;&lt;li&gt;Each OO concept can be implemented in more than one C++ way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;What C++ can do that other languages can not.&lt;/h1&gt;&#xA;&lt;h2&gt;Myth&lt;/h2&gt;&#xA;&lt;p&gt;C++ is a good, fast OO language. This is not true. Eiffel is as fast, safer, and more OO than Java.&lt;/p&gt;&#xA;&lt;h2&gt;Fact&lt;/h2&gt;&#xA;&lt;p&gt;C++ is the only language, I know of, where you can create a statically checked dimensions checker.&lt;/p&gt;&#xA;&lt;p&gt;That is a system, that checks at compile time, that your types are dimensionality correct. E.g.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Distance distance = 120*mile;&#xA;Time time = 3*hour;&#xA;Speed speed = distance/time; //This is ok&#xA;Distance speed2 = distance/time; //This is not&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It does this using templates&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;typedef Distance Dimension&amp;lt;float,1,0,0,0,0&amp;gt;;&#xA;typedef Time     Dimension&amp;lt;float,0,1,0,0,0&amp;gt;;&#xA;typedef Speed    Dimension&amp;lt;float,1,-1,0,0,0&amp;gt;;&#xA;typedef Area     Dimension&amp;lt;float,2,0,0,0,0&amp;gt;;&#xA;typedef Volume   Dimension&amp;lt;float,3,0,0,0,0&amp;gt;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Where Dimension is defined else where. It is a bit complex, so look it up.&#xA;It is called the Barton–Nackman trick.&lt;/p&gt;&#xA;&lt;p&gt;It may include something like this (My C++ is rusty, so may be errors), I think it involves friends, and other complex feature. It took us a while to get it right, but then we just left this bit alone. It became a sealed package of functionality:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;template&amp;lt;T,d1+d2,t1+t2,x1+x2,y1+y2,z1+z2&amp;gt; operator*(&#xA;    template&amp;lt;T,d1,t1,x1,y1,z1&amp;gt; a, &#xA;    template&amp;lt;T,d2,t2,x2,y2,z2&amp;gt; b );&#xA;&#xA;template&amp;lt;T,d,t,x,y,z&amp;gt; operator+(&#xA;    template&amp;lt;T,d,t,x,y,z&amp;gt; a, &#xA;    template&amp;lt;T,d,t,x,y,z&amp;gt; b );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Warning: Wikipedia says that this was removed from the language in C++11, but may be back in C++20.&lt;/p&gt;&#xA;&lt;p&gt;It is interesting as this is the only place I have seen this type of checking, most other languages insist, incorrectly that the operators and return type of a multiply are all the same type. I would like to see it in other languages, but with much less complexity (though all of the complexity can be abstracted into a library, using a feature that has no other use).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2017-12-31T10:04:02.960" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4116" PostTypeId="5" CreationDate="2018-01-01T14:07:14.990" Score="0" Body="&lt;p&gt;Within a given single course the topics may be arranged in various ways. The needs of the students and the experience of the instructor can affect this. Some things that might be desirable to teach early may require pedagogical tools to assure student success. In particular, some techniques are more top down (abstraction first) and others are more bottom up (detail first). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:07:14.990" LastActivityDate="2018-01-01T14:07:14.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4117" PostTypeId="4" CreationDate="2018-01-01T14:07:14.990" Score="0" Body="Use this tag primarily for questions relating to the order of topics in a single course (US usage) rather than overall order of topics in a curriculum (UK usage: Course of Study). Important questions relate to techniques for achieving a goal, such as, for example, teaching objects early (or late). " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:07:14.990" LastActivityDate="2018-01-01T14:07:14.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4118" PostTypeId="5" CreationDate="2018-01-01T14:18:07.120" Score="0" Body="&lt;p&gt;App Inventor is an application development environment intended for novices. It was created at MIT and was initially targeted at Android mobile devices. It features development of full mobile applications but with a minimum of textual programming, based on a block structured language. At the time of this writing, App Inventor is being ported to IOS. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:18:07.120" LastActivityDate="2018-01-01T14:18:07.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4119" PostTypeId="4" CreationDate="2018-01-01T14:18:07.120" Score="0" Body="App Inventor is an application development environment originally developed for Android mobile devices. Use this tag for questions relating to the educational uses of App Inventor, not for technical discussions of the environment. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:18:07.120" LastActivityDate="2018-01-01T14:18:07.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4120" PostTypeId="5" CreationDate="2018-01-01T14:54:10.967" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://cmake.org/overview/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CMake&lt;/a&gt; is an open-source, cross-platform family of tools designed to build, test and package software. It can be used to (among other things) create make files for the automated compilation and packaging of software. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:54:10.967" LastActivityDate="2018-01-01T14:54:10.967" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4121" PostTypeId="4" CreationDate="2018-01-01T14:54:10.967" Score="0" Body="Make is a tool often used to create make files for C development, though it has other, broader, uses. Use this tag for questions related to using the tool(s) as part of the educational process, not for technical questions about it. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-01T14:54:10.967" LastActivityDate="2018-01-01T14:54:10.967" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4122" PostTypeId="1" CreationDate="2018-01-04T16:36:25.293" Score="6" ViewCount="391" Body="&lt;p&gt;When I teach a programming course, I like to spend 10-20 minutes in each lesson on some programming exercises that the students do in class. This lets me see whether the students understand the material, and also help them with technical problems they encounter. &#xA;My next lesson is about design patterns, and I wonder what kind of programming exercises can I give?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I am teaching classic design patterns, to 2nd year students who already know to program in Java. I will probably teach patterns such as Factory, Prototype, Adapter, Composite, Proxy, Observer, Template.&lt;/p&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="1873" LastEditDate="2018-01-05T10:36:47.550" LastActivityDate="2018-01-05T10:36:47.550" Title="What are good class exercises on design patterns?" Tags="|classroom-management|exercises|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4123" PostTypeId="2" ParentId="2903" CreationDate="2018-01-04T16:43:48.337" Score="5" Body="&lt;p&gt;I will share two starting points I use for teaching CS topics:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) CS is about &lt;strong&gt;solving problems&lt;/strong&gt; and developing this skill in students. To that end all of our students take a mandatory class in Computer Science - Intro To Java Programming where the focus is on solving problems using a simple visual robot simulator.  In this class students spend much more time discussing and writing down ideas (in english) than &quot;coding&quot;. Our focus is on designing advanced robot &lt;em&gt;behaviors&lt;/em&gt; and interactions to solve increasingly difficult scenarios.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The important thing to note here is that we focus on developing a foundation of thinking skills and introduce computational thinking and problem solving methods.  The first exposure to &quot;programming&quot; is base on an objects-first approach where much of the details of &quot;coding&quot; is hidden. (for an example see the &lt;a href=&quot;https://itunes.apple.com/ca/app/lightbot-code-hour/id873943739?mt=8&quot; rel=&quot;nofollow noreferrer&quot;&gt;LightBot&lt;/a&gt; app in the app store).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) In the AP CS A class (not Principles which is usually taken first and has a strong focus on algorithms and abstraction, which build naturally upon the previous courses), I usually teach the topics in the historical order of their use, from the Abacus to Artificial Intelligence (or self learning machines like Alpha Go). I use examples that are appropriate to the current stage of CS evolution, and many of these solutions evolve as we learn and use more techniques and tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Early in the course we look at developing a console based guess the number game.&#xA;Our first focus is on developing an algorithm for this and evaluating solutions. Along the way we look at how to make our own random number generator, then later we look at using one from the program library, etc.&#xA;We &lt;strong&gt;iterate&lt;/strong&gt; over various solutions improving its utility: We don't let the computer make duplicate guesses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solving the problem of avoiding generated duplicates can be be quite challenging, especially early on.  It's worth trying on your own. You will find many interesting approaches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1st iteration: use n-1 variables to store previous guesses&#xA; - This brings up the idea of a collection of &lt;em&gt;similar items&lt;/em&gt; - arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2nd iteration: use an array of size n to store all guesses &#xA; - This brings up the question of how to manage the items in the array&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3rd iteration: use collections&#xA; - removing the guess as it occurs from this list of unused numbers and randomly selecting from a new, and smaller subset.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the time we get to collections we also discuss having a collection of &lt;em&gt;heterogeneous&lt;/em&gt; items.  Then we talk about the problems with that, leading to strongly typed collections and Generics etc.  Then we move backwards to homogeneous collections but now within the framework of &lt;em&gt;polymorphism&lt;/em&gt; which bring us back to behaviors and interactions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that the historic approach combined with the why did we &lt;strong&gt;invent&lt;/strong&gt; this / &lt;em&gt;what problems does it solve&lt;/em&gt;, works quite well because it gives the students a sense of why something exists, and how it might be used. It allows them to see a variety of possible solutions and be selective in their choices.&lt;br&gt;&#xA;(Why did we invent screws? What's wrong with nails?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use the same approach for &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;global / local variables and passing parameters&lt;/li&gt;&#xA;&lt;li&gt;Abstract Data Types to Classes / Objects&lt;/li&gt;&#xA;&lt;li&gt;Manipulation of data to Interaction of objects&lt;/li&gt;&#xA;&lt;li&gt;And finally, developing behaviors (having objects doTheRightThing()).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and for the evolution of using&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sentinels&lt;/li&gt;&#xA;&lt;li&gt;nulls (missing values)&lt;/li&gt;&#xA;&lt;li&gt;Null Objects&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I can also challenge the students if I think they are seeing everything as a nail (overusing their hammers), or suggest if they are designing / coding caveman like solutions (do more efficient or elegant solutions exist).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along the way their thinking moves from functional to behavioral.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="3840" LastEditDate="2018-01-04T19:13:09.993" LastActivityDate="2018-01-04T19:13:09.993" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4124" PostTypeId="2" ParentId="4122" CreationDate="2018-01-04T17:29:07.767" Score="2" Body="&lt;p&gt;Design patterns covers a broad area. I'm going to assume that your students are beginners, more or less.&lt;/p&gt;&#xA;&lt;h2&gt;Elementary Patterns&lt;/h2&gt;&#xA;&lt;p&gt;A few people have developed some interesting elementary patterns for things as simple as loops and selection: &lt;a href=&quot;http://www.cs.uni.edu/%7Ewallingf/patterns/elementary/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.cs.uni.edu/~wallingf/patterns/elementary/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;These patterns help students program at the lowest level and, after introducing the patterns you can easily come up with small exercises that see whether the students actually use the patterns to guide their programming. Any exercise that requires a sequential if structure can have the students factor out the structure as a method and apply the &amp;quot;Return, Not Else&amp;quot; pattern, for example. There are many possibilities.&lt;/p&gt;&#xA;&lt;h2&gt;Organizational Patterns&lt;/h2&gt;&#xA;&lt;p&gt;In addition to coding patterns, organizational patterns can be used to both teach beginners good skills that will serve them well in the classroom and later in employment. For example, you can consider Extreme Programming (XP) or Scrum to be defined by simple pattern languages in which the practices are the individual patterns. Some of those practices may not be appropriate for beginners, but others are just good practice. For example, Pair Programming and Test First Development work well together and help students solve their programming problems. An in-class exercise in which you let students practice just those two skills under your guidance is, in my experience, very valuable. I've also presented larger projects to students as a deck of &amp;quot;stories&amp;quot;, the Product Backlog that gives beginners an overall decomposition into the parts of the solution they need to build. Often this is better than a narrative explanation of the problem when the still have no design skills.&lt;/p&gt;&#xA;&lt;h2&gt;Classic Patterns.&lt;/h2&gt;&#xA;&lt;p&gt;Many of the classic patterns are amenable for use in the beginner's curriculum. They will likely do these things anyway, but by formalizing the discussion of them introduces them to the value of patterns. For example Iterators are now ubiquitous in many languages. If you are doing GUI programming then the Observer Pattern is now standard. At a slightly higher level Model-View-Controller (MVC) can be discussed. This gives you a good way to discuss separation of concerns in programming. You can also organize your course so that you make it clear that, say, at the beginning the students build a Model without concern about how it is manipulated. It has a public interface of a few methods only. Then, once you have a model you can talk about the possibilities of (perhaps multiple) views and the associated controllers. But this is an organizational issue about the course. If they have to just build everything, they might wind up with a &amp;quot;Big Ball of Mud&amp;quot; (a pattern in fact, but not a good one).&lt;/p&gt;&#xA;&lt;p&gt;Once the students are familiar with the &lt;em&gt;idea&lt;/em&gt; of patterns you can introduce them to more complex ones with many parts. I find the Strategy and Null Object patterns to be useful in teaching polymorphism. With these patterns you can modify the behavior of an object dynamically, which leads you to program by composition (an object has interesting parts), rather than by inheritance. For example a situation in which an object must perform in one way the first time it is sent a message, but otherwise thereafter can use strategies, formalizing the behaviors, without using ad-hoc if-statements.&lt;/p&gt;&#xA;&lt;p&gt;I realize I haven't given you many &amp;quot;exercises&amp;quot; here. My suggestion is that you can adapt many/most of the ones you are already familiar with to the use of patterns.&lt;/p&gt;&#xA;&lt;h2&gt;Pedagogical Patterns&lt;/h2&gt;&#xA;&lt;p&gt;You can also formalize your teaching methodology using patterns, so that your student interactions are guided by well-tested methods (patterns) that can make you a better teacher and make it obvious to you (and maybe to your students) &lt;em&gt;why&lt;/em&gt; you do the things you do in the course.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-04T17:29:07.767" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4125" PostTypeId="2" ParentId="4104" CreationDate="2018-01-04T17:56:03.090" Score="1" Body="&lt;p&gt;Any solution will be &quot;technical&quot; in nature since the problem involves technology anyway. However, for the &quot;access&quot; issue, you can create a solution which puts more work on you than on the technology. (Since tech is supposed to make human work easier, that's kind of an anti-tech concept, right?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Required environment is a publicly (relative to the classroom computers) accessible file storage in which &lt;strong&gt;you&lt;/strong&gt; (the instructor) can create password-protected directories. &lt;em&gt;[This can still be a closed environment relative to the wider network, including other parts of the LAN, and the Internet as a whole, so long as it is a location that the students can access during class.]&lt;/em&gt; Out-of-class access could be an issue, either because it is desirable and making it happen is not easy on the school's system, or because it is undesirable, yet hard to prevent on the school's system. As mentioned in &lt;a href=&quot;https://cseducators.stackexchange.com/a/4106/104&quot;&gt;another answer&lt;/a&gt;, the students can always print a copy, or email a copy to themselves, for out-of-class review and planning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the project, create a directory for each pair, or team of any size, with a unique (per directory) password. Provide that password to each of the team members. When one is absent, for any reason, the other (rest) can still access the directory. If you have the need to reassign team membership, you change the password(s) in the affected directories and give them to the reorganized teams.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This provides each team a space to work, and share, including a place to make related notes, trials, documents, etc. You, as the instructor, will have access to all the directories, and can check the work at any time. The solution works equally well for program coding, research paper writing, and even graphic design. The hard part for the instructor is creating, and maintaining, the collection of directories and passwords. Especially if there are overlapping project time-frames, requiring that there be multiple sets of directories available at one time (along with remembering who has access to which one) with each directory needing a unique, yet easily used, password.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This solution &lt;em&gt;does not&lt;/em&gt; scale well at all, and is unworkable in a workplace environment, yet is simple enough to set up and use in the controlled environment of an educational arena. At the end of the term you can merely delete/clean the parent directory and you're ready to start the next term.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, the underlying principle may be enhanced, or modified, using ACLs, Apache user names, SSH with PGP keys, and many other &quot;technological&quot; variations; but, non-technological was the target.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-01-04T17:56:03.090" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4126" PostTypeId="1" CreationDate="2018-01-04T20:04:47.567" Score="5" ViewCount="218" Body="&lt;p&gt;I'm sure that basically every introductory course involves teaching about the ubiquitous mod operation.  In my experience, and I'm sure I'm not alone in this, I've found that teaching my students that &quot;mod is the remainder of division&quot; is insufficient if I want them to make any use of the concept later on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beyond showing them how to use mod to check divisibility, I have for the last few years gone into far more interesting operations in order to help them achieve some intuitive understanding of what mod is and how it works.  So, for instance, I show them how they can increment within a modular circle of numbers from &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;n-1&lt;/code&gt; (a circle of size &lt;code&gt;n&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[some loop structure] {&#xA;    x = (x+1)%n;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, how to move that circle along so that it ranges from &lt;code&gt;m&lt;/code&gt; to &lt;code&gt;(m+n-1)&lt;/code&gt; (still a circle of size &lt;code&gt;n&lt;/code&gt;, but it no longer starts at &lt;code&gt;0&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[some loop structure] {&#xA;    x = (x+1-m)%n+m;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or how to decrement along a &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;n-1&lt;/code&gt; circle in a language like Java, which deals with negative modular operations by returning the highest negative congruence (ie. &lt;code&gt;-10 % 4&lt;/code&gt; would return &lt;code&gt;-2&lt;/code&gt; instead of &lt;code&gt;2&lt;/code&gt;.  While they are both technically correct answers, Java's answer is decidedly inconvenient for the purpose of moving along a modular circle of numbers, because when you try to move from 0 back to &lt;code&gt;n-1&lt;/code&gt;, you get the wrong result.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[some loop structure] {&#xA;    x = (((x-1)%n)+n)%n;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Or, doing the same thing by moving &lt;code&gt;n-1&lt;/code&gt; steps clockwise around the circle instead of moving &lt;code&gt;1&lt;/code&gt; step counterclockwise:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[some loop structure] {&#xA;    x = (x+n-1)%n;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And, of course, we can generalize this to involve any cyclical pattern of numbers that can be reduced to a proper modular circle where $f(n)$ is the function that takes any number within the cycle to its corresponding location in the modular circle, and $g(n)$ is the function that takes it back:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[some loop structure] {&#xA;    x = g(f(x+1)%n);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, I am reasonable certain that nobody uses structures like this in any production environment.  Part of my justification for going to such lengths with mod operators has been that I am not a teacher of software engineering.  I am a teacher of computer science, and having a firm understanding of modular arithmetic is important for Some Big Ideas later on.  (Like Two's Complement, which has a very intuitive and coherent explanation when you think about it in terms of cycles within a number space.)  And when all is said and done, many of my students really do come out with a good, intuitive sense of how the mod operation works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I also wonder if I have just gone plum crazy.  This stuff takes a lot of class time to get the kids to master, and I'm really wondering if the time would be better spent on other pursuits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;How far should modular arithmetic be taken in the CS classes that are early enough along in the curriculum that they still focus on programming?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1035" LastEditDate="2018-07-22T21:09:57.397" LastActivityDate="2018-07-22T21:09:57.397" Title="How far do you take modular expressions?" Tags="|mathematics|" AnswerCount="2" CommentCount="8" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4128" PostTypeId="2" ParentId="4126" CreationDate="2018-01-05T18:04:34.910" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How far should modular arithmetic be taken in the CS classes that are&#xA;  early enough along in the curriculum that they still focus on&#xA;  programming?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I view the &lt;code&gt;mod&lt;/code&gt; or &lt;code&gt;modulus&lt;/code&gt; operator as any other operator that is new to the students. Even though &lt;code&gt;mod&lt;/code&gt; is used more often when programming because it results in an integer value which is much more friendly to work with than a mantissa of a real division, I see no reason early on to spend any more time than is necessary to get the idea of how the mod function/operator works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When students are introduced to the mod operator for the first time it can be confusing. To make it easer for them I tell them that just because it is named &lt;code&gt;mod&lt;/code&gt; doesn't mean you have to create a new idea in your head to understand it. Instead just think of it as the &lt;code&gt;remainder&lt;/code&gt;, but when you talk to others programmers you have to use the word &lt;code&gt;mod&lt;/code&gt; or &lt;code&gt;modulus&lt;/code&gt; as that is the currently accepted name. They like that and we only spend a few minutes on it. I obviously show them how it relates to float division and integer division by listing examples of &lt;code&gt;float division&lt;/code&gt;, &lt;code&gt;integer division&lt;/code&gt; and &lt;code&gt;modulus&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also if a student says &lt;code&gt;remainder&lt;/code&gt; in class I just ask &lt;code&gt;Did you mean mod?&lt;/code&gt; and if they say yes we keep going. If they say no then I ask what they mean. If they are getting it wrong I do a quick review. Most students get it rather quickly but do say &lt;code&gt;remainder&lt;/code&gt; more often at first but quickly get to using &lt;code&gt;mod&lt;/code&gt; or &lt;code&gt;modulus&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I do have to go over the concept again for some students I do use the concept of having items in my hand and do multiple subtractions until I have just the remainder. When I can subtract no more I ask them what do I have left and they give me an integer number and I say that is the &lt;code&gt;mod&lt;/code&gt; value. Haven't had anyone get it wrong after they repeat that exercise back with them holding the items and doing the repeated subtractions, e.g.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 % 3&lt;br&gt;&#xA;I have 1 item in my hand,&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;1&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;5 % 3&lt;br&gt;&#xA;I have 5 items in my hand,&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;Yes&lt;/code&gt;&lt;br&gt;&#xA;Now I have 2.&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;2&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;7 % 3&lt;br&gt;&#xA;I have 7 items in my hand,&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;Yes&lt;/code&gt;&lt;br&gt;&#xA;Now I have 4.&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;Yes&lt;/code&gt;&lt;br&gt;&#xA;Now I have 1.&lt;br&gt;&#xA;Can I subtract 3: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;1&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value &lt;/p&gt;&#xA;&#xA;&lt;p&gt;0 % 2&lt;br&gt;&#xA;I have 0 items in my hand,&lt;br&gt;&#xA;Can I subtract 2: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;0&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 % 2&lt;br&gt;&#xA;I have 1 item in my hand,&lt;br&gt;&#xA;Can I subtract 2: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;1&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value &lt;/p&gt;&#xA;&#xA;&lt;p&gt;4 % 2&lt;br&gt;&#xA;I have 4 items in my hand,&lt;br&gt;&#xA;Can I subtract 2: &lt;code&gt;Yes&lt;/code&gt;&lt;br&gt;&#xA;Now I have 2.&lt;br&gt;&#xA;Can I subtract 2: &lt;code&gt;Yes&lt;/code&gt;&lt;br&gt;&#xA;Now I have 0.&lt;br&gt;&#xA;Can I subtract 2: &lt;code&gt;No&lt;/code&gt;&lt;br&gt;&#xA;What do I have left: &lt;code&gt;0&lt;/code&gt;&lt;br&gt;&#xA;That is the mod value   &lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-01-07T14:22:37.460" LastActivityDate="2018-01-07T14:22:37.460" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4129" PostTypeId="1" AcceptedAnswerId="4132" CreationDate="2018-01-06T15:41:56.653" Score="5" ViewCount="257" Body="&lt;p&gt;Beginners in CS will generally benefit from changing and expanding their thinking skills. Some of our thought processes may not be intuitive to a beginner and exercises can help them expand their thinking &lt;em&gt;tool box&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lectures that make these new ways of thinking explicit can help, of course, but exercises can deepen and reinforce the knowledge. Especially helpful are exercises that lead a student to an &lt;em&gt;a-ha&lt;/em&gt; moment in which that was unclear has become clear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the context of extending their thinking and problem solving skills, what particular problems and exercises would you suggest to use at the novice level for teaching computer science?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In discussions in the &lt;a href=&quot;https://chat.stackexchange.com/rooms/59174/the-classroom&quot;&gt;CSEducators Classroom&lt;/a&gt; it was originally noted that &quot;puzzle problems&quot; may be especially helpful in this regard - especially those problems for which a person's ordinary intuition might not be helpful, but which lead the student to a deeper understanding of the essence of CS thinking.&lt;/p&gt;&#xA;" OwnerUserId="1568" LastEditorUserId="1293" LastEditDate="2018-01-06T16:03:41.843" LastActivityDate="2018-01-23T16:38:55.253" Title="What student exercises force them to modify and extend their own thinking process and methods?" Tags="|lesson-ideas|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4130" PostTypeId="1" AcceptedAnswerId="4131" CreationDate="2018-01-06T17:15:20.477" Score="4" ViewCount="540" Body="&lt;p&gt;Unfortunately I did not study well at school, I was not interested in many things, and I did not understand that things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I have matured, interests have become more. I am now 20 years old. Now I have to correct the mistakes of the past.&#xA;I am now studying, writing and earning money with JavaScript. But I want to study mathematics to understand more complicated things in computer science and learn other languages (English, Russian, Japanese).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And is it possible to study all these things (to study, write on modern frameworks, learn math from the beginning, and learn languages (not programming)) in parallel? For example, doing own work for 4 hours, after that to study mathematics for 3 hours and after that to learn languages 2 hours. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Will not I have a mess in my head?&#xA;And how to learn things correctly so that there is no mess in my head?&lt;/p&gt;&#xA;" OwnerUserId="3851" LastEditorUserId="1293" LastEditDate="2018-01-07T14:35:49.867" LastActivityDate="2018-01-07T20:17:52.710" Title="Is it possible to study too many things in parallel?" Tags="|student-motivation|self-learning|student-perceptions|struggling-students|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4131" PostTypeId="2" ParentId="4130" CreationDate="2018-01-06T17:32:02.603" Score="9" Body="&lt;p&gt;Actually, what you want to do is commendable. And no, at the scale of things you talk about, I don't think you are likely to get yourself confused. In fact, you may have the opportunity to learn different things in an integrated way. In some ways the educational system, which puts different topics in different boxes, isn't optimal and everyone needs some experience in integrating what they know into a personal whole. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once learned quite a bit of French by reading Math papers from French mathematicians, though I was already pretty good at math, but you could, for example, read CS papers in Russian. Knowing something of the underlying ideas before you start lets you focus on how they are expressed in Russian, rather than Japanese or English. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You already seem to be aware that you will need discipline and to set aside time for your studies. That works for nearly everyone. If you are studying several things then you can also switch to something else at a point at which you either get &lt;em&gt;stuck&lt;/em&gt; on some idea, or get tired of the current topic. Often letting your mind work on something else is a good way to let your unconscious work out details that you might miss when working in a concentrated way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also be aware that you are now (age 20) at the height of your mental (as well as physical) powers. It is never too late to start, but you are starting at a good point. Onward. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-06T17:32:02.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4132" PostTypeId="2" ParentId="4129" CreationDate="2018-01-06T20:59:29.333" Score="2" Body="&lt;p&gt;Since there are two slightly different questions here&lt;/p&gt;&#xA;&#xA;&lt;p&gt;one in the topic&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What student exercises force them to modify and extend their own thinking process and methods?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and one in the detail section&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In the context of extending their thinking and problem solving skills, what particular problems and exercises would you suggest to use at the novice level for teaching computer science?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I am going to give an answer about exercises that focus on problem solving skills. The odd thing when I was building this list is how much it reminded me of those aptitude test they give you in grade school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to problem solving one first has to be aware that there is no one way to solving problems that always works and there may not always be an answer to a problem or there may be an answer but getting the answer is not practical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algorithms commonly used&lt;br&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Depth-first_search&quot; rel=&quot;nofollow noreferrer&quot;&gt;Depth First Search&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Breadth-first_search&quot; rel=&quot;nofollow noreferrer&quot;&gt;Breath First Search&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://Divide%20and%20conquer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Divide and Conquer&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Inference&quot; rel=&quot;nofollow noreferrer&quot;&gt;Inferencing&lt;/a&gt; - Analogy: &lt;a href=&quot;https://dictionary.cambridge.org/dictionary/english/connect-the-dots&quot; rel=&quot;nofollow noreferrer&quot;&gt;Connecting the dots&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;and also thinking in &lt;a href=&quot;https://en.wikipedia.org/wiki/Orthogonality&quot; rel=&quot;nofollow noreferrer&quot;&gt;orthogonality&lt;/a&gt; of dimension/&lt;a href=&quot;https://en.wikipedia.org/wiki/Field_(computer_science)&quot; rel=&quot;nofollow noreferrer&quot;&gt;field&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one of the simplest exercises of using depth first search is the game &lt;a href=&quot;http://store.steampowered.com/app/357600/Unium/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unium&lt;/a&gt; which is to simply draw a line connecting a set of selected squares. This basically has only one dimension, a line and one method, depth first search. The puzzles get harder and harder, but you basically start drawing the line, see a problem, back up to where the problem occurred and then choose a different option and keep going and repeating until you complete the object and onto the next image to cover. This teaches that for some problems you can go back to a decision and change it to get the correct solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For breath first search the game &lt;a href=&quot;https://en.wikipedia.org/wiki/Draughts&quot; rel=&quot;nofollow noreferrer&quot;&gt;checkers&lt;/a&gt; works as you can't make your next move until your opponent has made theirs and so can't resort to DFS. OK I know it really is a min-max game but BFS still applies. This teaches one that you have to look at all options available before moving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For divide and conquer you will needs something that has simple rules and allows you to move off a sub-problem if it is to hard but still allows you to solve the problem. For this &lt;a href=&quot;http://www.freeminesweeper.org/minecore.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;MineSweeper&lt;/a&gt; is a good game. This teaches that if you get stuck on something hard try some place else and you can still get the answer; in other words some paths to the solution are easier than others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For something a little harder try &lt;a href=&quot;http://store.steampowered.com/app/316610/A_Good_Snowman_Is_Hard_To_Build/&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Good Snowman Is Hard To Build&lt;/a&gt; as this requires at least one good a-ha moments to build a snowman. The rules are simple but is uses three dimensions. When I did this with my small class it seemed most of the students had the same a-ha when building a certain snow man because the way to the solution seemed illogical, but until one learned to do the illogical they were stuck. I won't say what lead to the a-ha moment but I suspect that if you play the game you too will be saying a-ha at one point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far the way of thinking has been procedural but to add some functional thinking take a look at the &lt;a href=&quot;http://store.steampowered.com/app/319270/Great_Permutator/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Great Permutator&lt;/a&gt; as this adds functions, e.g. partition using every other, accumulate, dup, swap among others. I like this one also because you can try out different combinations of the function parts before solving the whole problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a game that adds the dimension of &lt;a href=&quot;https://en.wikipedia.org/wiki/Concurrency_(computer_science)&quot; rel=&quot;nofollow noreferrer&quot;&gt;concurrency&lt;/a&gt; take a look at &lt;a href=&quot;http://store.steampowered.com/app/92800/SpaceChem/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SpaceChem&lt;/a&gt;. While this doesn't look like programming if you know how to program with &lt;a href=&quot;https://en.wikipedia.org/wiki/Lock_(computer_science)&quot; rel=&quot;nofollow noreferrer&quot;&gt;locks&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Fork%E2%80%93join_model&quot; rel=&quot;nofollow noreferrer&quot;&gt;fork-join&lt;/a&gt; you will see the patterns and the best part is that it is visual. If my teacher had used this when teaching OS design it would have been a lot easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Getting back to procedural and adding in variables and the Jump instruction take a look at &lt;a href=&quot;http://store.steampowered.com/app/375820/Human_Resource_Machine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;. One of the better parts of this is that it has challenges for the least number of steps and the least number of instructions. The answers to these challenges are not intuitive but get you to realize that machines don't have to work like we think to get a better solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more advanced procedural/functional and back to the essence of what a microprocessor/ALU does check out &lt;a href=&quot;http://store.steampowered.com/app/684270/Silicon_Zeroes/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Silicon Zeroes&lt;/a&gt;. This one also covers the idea of parameters and state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get out of the algorithm type problems have fun with the &lt;a href=&quot;http://store.steampowered.com/app/206410/Crazy_Machines_Elements/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Crazy Machine Elements&lt;/a&gt; collection. This will make you think and sometimes you can even find solutions that don't use all of the parts. What is nice about these problems is that some of the elements affect others in nonintuitive ways like reversing gravity. This teaches that you can't always have orthogonality of dimension.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you start playing with the dimension of time things really get interesting but finding a game that is simple but alters just time is not so easy to find, but &lt;a href=&quot;http://store.steampowered.com/app/40930/The_Misadventures_of_PB_Winterbottom/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Misadventures of P.B. Winterbottom&lt;/a&gt; seems to do the trick. This game reminds me of a single person composing a song by recording a melody, playing the melody back and adding on another melody and so on. Get one melody wrong and you have to start over. This is interesting in that it teaches one that time is also a critical dimension for solving some problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Speaking of playing with different concepts what about having cooperating concepts? That brings us to &lt;a href=&quot;http://store.steampowered.com/app/400/Portal/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Portal&lt;/a&gt; and &lt;a href=&quot;http://store.steampowered.com/app/620/Portal_2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Portal 2&lt;/a&gt;. I only wish they took the idea of cooperating concepts further and used other fields such as time, color, etc, and also have them competing some how. This is really interesting because it bring lots of a-ha moments if you don't look for the answers online. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://store.steampowered.com/agecheck/app/499520/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Turing Test&lt;/a&gt; changes out different dimensions/fields for solving the problems in different rooms but makes them harder as you go so that you are continuously being challenged. This helps to teach you that different properties of certain things can be used for other than their primary use, e.g. a block has weight but it can also block a beam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more of a real world problem but still simple enough for learning an essential concept common with neural networks being &lt;a href=&quot;https://en.wikipedia.org/wiki/Classification&quot; rel=&quot;nofollow noreferrer&quot;&gt;classification&lt;/a&gt; would be &lt;a href=&quot;http://store.steampowered.com/app/239030/Papers_Please/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Papers Please&lt;/a&gt;. I have not yet played this one, but if it doesn't live up to what other say I will strike it from the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another game I have yet to check out but seems to deal with graphs which are essential to so many data structures in computer science is &lt;a href=&quot;http://store.steampowered.com/app/287980/Mini_Metro/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mini Metro&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the concept of &lt;a href=&quot;https://en.wikipedia.org/wiki/Function_composition_(computer_science)&quot; rel=&quot;nofollow noreferrer&quot;&gt;composition&lt;/a&gt; I have on my list &lt;a href=&quot;http://store.steampowered.com/app/300570/Infinifactory/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Infinifactory&lt;/a&gt;; again one I have not personally vetted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as you can see to learn how to problem solve start with simple methods and limited dimensions and keep adding on slowly with fun using games and one can learn a lot about problems solving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the real world when there are known to be exact solutions to a problem I tend to find that brining in &lt;a href=&quot;https://en.wikipedia.org/wiki/Combinatorics&quot; rel=&quot;nofollow noreferrer&quot;&gt;combinatorics&lt;/a&gt; helps to solve the problem and one puzzle that quickly jumps to mind here is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Rubik%27s_Cube&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rubik's Cube&lt;/a&gt;. If you know the basic moves and how to apply them you can even find &lt;a href=&quot;https://ruwix.com/the-rubiks-cube/gods-number/&quot; rel=&quot;nofollow noreferrer&quot;&gt;God's Number&lt;/a&gt; which will teach you a lot of good math and computer programming algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For more look at puzzle and logic problem books as they have lots of exercises. I did one of these books decades ago using &lt;a href=&quot;https://en.wikipedia.org/wiki/Prolog&quot; rel=&quot;nofollow noreferrer&quot;&gt;Prolog&lt;/a&gt; before it had &lt;a href=&quot;https://en.wikipedia.org/wiki/Constraint_satisfaction_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;constraint satisfaction&lt;/a&gt; and after seeing how constraint satisfaction worked with Prolog find it to be one of my favorite languages for problem solving when dealing with &lt;a href=&quot;https://en.wikipedia.org/wiki/Closed-world_assumption&quot; rel=&quot;nofollow noreferrer&quot;&gt;closed world assumptions&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So by now for problem solving with computers you can see the need for algorithms (methods) and data structures (dimensions/fields) which is why the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262033844&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Algorithms&lt;/a&gt; is so popular.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have reached this far then check out the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/069116407X&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;How to Solve It&quot;&lt;/a&gt; by G. Polya. While it is useful to both students and teacher, it is limited in that it was written with math in mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are learning programming and reading this, I can not stress enough how much you should learn other paradigms of programming, e.g. &lt;a href=&quot;https://en.wikipedia.org/wiki/Procedural_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;procedural&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Functional_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;functional&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Logic_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;logic&lt;/a&gt;, and other concepts like &lt;a href=&quot;https://www.mathworks.com/help/matlab/learn_matlab/matrices-and-arrays.html?requestedDomain=www.mathworks.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;matrices&lt;/a&gt; in &lt;a href=&quot;https://www.mathworks.com/products/matlab.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;MatLab&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=bxe2T-V8XRs&quot; rel=&quot;nofollow noreferrer&quot;&gt;neural networks&lt;/a&gt; and learn as much &lt;a href=&quot;https://www.youtube.com/channel/UCs4aHmggTfFrpkPcWSaBN9g/videos&quot; rel=&quot;nofollow noreferrer&quot;&gt;math&lt;/a&gt; as you can. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One last point that AFAIK seem to be the only one I know who uses this rule when faced with a problem I can't solve. Most advise is to back off, break the problem apart and tackle a simpler part. However at times I find that finding a harder problem and reading about it then makes my problem easier and more enjoyable. So go regularly read about &lt;a href=&quot;https://www.sciencedaily.com/news/matter_energy/quantum_physics/&quot; rel=&quot;nofollow noreferrer&quot;&gt;quantum mechanics&lt;/a&gt; and theoretical physics, &lt;a href=&quot;https://www.technologyreview.com/s/609901/the-best-of-the-physics-arxiv-week-ending-january-6-2018/&quot; rel=&quot;nofollow noreferrer&quot;&gt;etc&lt;/a&gt;., and you hopefully you will see that your problem is not that hard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can spend much more time on this question but hopefully I have given you enough to get started and shown you the path to expanding on how to build out ones problem solving toolbox.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-01-06T22:20:41.840" LastActivityDate="2018-01-06T22:20:41.840" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4135" PostTypeId="2" ParentId="494" CreationDate="2018-01-07T16:21:19.830" Score="-2" Body="&lt;p&gt;&lt;a href=&quot;https://github.com/ChristosChristofidis/awesome-deep-learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/ChristosChristofidis/awesome-deep-learning&lt;/a&gt; has a long and curated list of resources. It should cover all possible ages and skill levels. &lt;/p&gt;&#xA;" OwnerUserId="3855" LastActivityDate="2018-01-07T16:21:19.830" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4136" PostTypeId="2" ParentId="7" CreationDate="2018-01-07T18:41:13.280" Score="1" Body="&lt;p&gt;Pseudo-code is not an option. You have to have it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of such a course is not about the expression of algorithms in a nearly ready to run form.  It is about the work involved in their development. The strategies you use. The ideas you consider, try and abandon as they don't seem so good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how could we use a formal language to write down fuzzy ideas ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given a problem, like &quot;compute how many leap years there are between y1 and y2&quot;, you have to try different ideas. And these ideas are not yet wholly developed. So it is much too early to put them under the form of code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you still have the need to keep the ideas in written form, if you want to remember/transmit them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An idea may be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;A. test all years between y1 and y2&#xA;   count these that are leap years&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;another could be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;B. use a formula about multiples of 4, 100 and 400.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is not supposed to be a complete description of the final algorithm. But it is an idea which has to be written, as a first step of the work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second step would be to give more details. For the second solution :&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;B.1 use a formula f for leap years from year 0 to y&#xA;    compute the difference  f(y)-f(0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An a third step&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;B.2 f(y) = number of multiples of 4&#xA;         - number of multiples of 100&#xA;         + number of mltiples of 400&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A decent ready-to-program version emerges only now&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;B.3 function leap_years_from_0 (y) &#xA;       =  (y / 4) - (y / 100) + (y / 400)&#xA;&#xA;    function leap_years_between(y1, y2)&#xA;       =  leap_years_from_0(y2) - leap_years_from_0(y1) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In such a course, the important point is the journey between the problem and the solutions.   It is not the exposure of algorithms/programs in there final version.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-01-07T18:46:40.077" LastActivityDate="2018-01-07T18:46:40.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4137" PostTypeId="2" ParentId="4130" CreationDate="2018-01-07T20:17:52.710" Score="4" Body="&lt;p&gt;First of all, kudos to you for wishing to enrich yourself!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition to Buffy's &lt;a href=&quot;https://cseducators.stackexchange.com/a/4131/27&quot;&gt;fine answer&lt;/a&gt;, I might recommend an approach to self-studies that I once learned that ensures steady progress on multiple fronts.  My understanding is that the technique itself is an old Jewish approach, used for hundreds of years by people becoming talmudic scholars.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put aside 30 minutes a day, and make sure that you &lt;em&gt;always&lt;/em&gt; do those 30 minutes.  Have a series of 4-6 books that you would like to learn from.  Your goal every day is to quickly skim over what you read the previous day within each book, and read 1-3 new pages as well.  When you complete a book, just take it out of the rotation and put a new book into its slot.  Over the course of a year, you will be reading 500-1000 pages per rotational slot.  Needless to say, you will make a lot of progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you get out of this is a slow but steady stream of learning.  The quick re-skim means that you are getting review over time (regular review is an important component of retention), and the fact that you are learning from many different books simultaneously increases your odds of making connections between the different topics that you are learning, helping you to integrate the information into a more cohesive understanding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck on your journey!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-01-07T20:17:52.710" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4138" PostTypeId="2" ParentId="4113" CreationDate="2018-01-08T01:08:46.753" Score="4" Body="&lt;p&gt;2 -3 hours?? That's a really tight timeline to cover:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;header files, compile, link and build tools&lt;/li&gt;&#xA;&lt;li&gt;stack semantics and RAII (including stack unwinding during exceptions)&lt;/li&gt;&#xA;&lt;li&gt;references and how they are not like Java references&lt;/li&gt;&#xA;&lt;li&gt;pointers and how they are not like Java references&lt;/li&gt;&#xA;&lt;li&gt;smart pointers for when you have to use the heap&lt;/li&gt;&#xA;&lt;li&gt;templates including template specialization and variadic templates&lt;/li&gt;&#xA;&lt;li&gt;operator overloading and why it's important&lt;/li&gt;&#xA;&lt;li&gt;the Standard Library including collections, iterators, and all of &lt;code&gt;&amp;lt;algorithm&amp;gt;&lt;/code&gt; - I need 8-10 hours just for this&lt;/li&gt;&#xA;&lt;li&gt;multiple inheritance, private inheritance, virtual inheritance, friend&lt;/li&gt;&#xA;&lt;li&gt;const, noexcept, constexpr, constexpr if&lt;/li&gt;&#xA;&lt;li&gt;idioms like Pimpl, and why you use them&lt;/li&gt;&#xA;&lt;li&gt;not to mention the nontrivial problem of how to get stuff to show on the screen. You might want to choose a graphics library to teach. Or a windowing framework (good luck with that.) Or do like most of us and use console apps all term long. Sigh.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Trust me, you have more than a term's worth of stuff to cover!&lt;/p&gt;&#xA;" OwnerUserId="1036" LastActivityDate="2018-01-08T01:08:46.753" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4139" PostTypeId="2" ParentId="4129" CreationDate="2018-01-08T15:27:35.913" Score="-1" Body="&lt;p&gt;I just wanted to put in the word that before people expand their thinking toolbox, they need to have mastered the very first and most essential tool: the concept of named variables and mutability. Without that they will do no better than driver's education students will do with their eyes closed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand &lt;em&gt;why&lt;/em&gt; the idea of variables and assignment gives people so much trouble, but the evidence is in: &lt;strong&gt;it does.&lt;/strong&gt; Perhaps it is because nothing else in the universe works this way, and so we do not encounter such things in our daily lives. But if students do not learn right away that the whole point of programming is basically this mental game called symbolic thinking -- give a name to an arbitrary idea and then manipulate the contents of the name -- they will fail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also do not know the best way to inculcate this understanding. I learned the &quot;Post Office Box Model&quot; sitting in front of a teletype 40 years ago when I was in middle school. Is that the best way? I don't know. Maybe the little 'ding' that the teletype made caused Pavlovian Conditioning, so that I just associated names with content and assignment of variables. If so, we need to dredge up some teletypes, or start ringing little bells in class. But there is no secret to this association, and no way around learning it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To a kid with a variable, everything is a program. One of my students the other day said in exasperation, &quot;Everything is a &lt;em&gt;variable&lt;/em&gt;!&quot; as if he expected that programming would turn out to be something else. It hasn't and won't. Everything (in programming) is indeed a variable.&lt;/p&gt;&#xA;" OwnerUserId="3858" LastActivityDate="2018-01-08T15:27:35.913" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4140" PostTypeId="1" CreationDate="2018-01-09T20:29:02.807" Score="6" ViewCount="504" Body="&lt;p&gt;I'm in the process of preparing for the second semester of AP CS A (Java). I want to review objects and classes with my students to prepare for our extended focus this semester on inheritance and interfaces. I've been using textbooks I'm not particularly thrilled with, so I wanted to put together some review material of my own and/or from other sources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first Google took my right away to the official documentation from Oracle, and I found it to be a clean, easy-to-understand explanation of fundamental concepts of the language (which can't always be said for documentation). In particular, &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/java/concepts/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this section on Object-Oriented Programming Concepts&lt;/a&gt; is exactly what I was looking for in terms of simple, clear explanations with code samples. That lead me to ponder the following question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What, if any, benefits are there for teaching straight from documentation rather than a textbook?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="1293" LastEditDate="2018-01-10T15:26:43.330" LastActivityDate="2018-01-20T20:58:39.387" Title="Using Oracle's Java Documentation as a Teaching Tool" Tags="|java|undergraduate|ap-computer-science-a|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4141" PostTypeId="2" ParentId="4140" CreationDate="2018-01-09T20:37:39.720" Score="6" Body="&lt;p&gt;One obvious benefit, which is really a good goal in and of itself, is that students get used to utilizing documentation.  Many students don't use the internet as a resource at all, and those that do often wind up on StackOverflow.  It has been my experience that the very basic searches that those students often perform wind up at SO pages that are rather too complex.  If they want to know how to find a subset of a String in Java, the Oracle documentation is really a better place to begin than Google.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to read and understand documentation gives them a powerful research tool that they can utilize for future explorations.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-01-09T20:37:39.720" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4142" PostTypeId="2" ParentId="4140" CreationDate="2018-01-09T20:50:18.723" Score="6" Body="&lt;p&gt;I will ask some rhetorical questions below - they aren't meant to be snarky. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That, of course, depends on the textbook. I would think that the documentation alone would be a terrible idea. Would you teach a class in Shop by giving each student a box of tools and no instruction? The quality of the official documentation is, as you note, excellent, but there is nothing there about how to use it - about how to actually program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How would a student, faced with a project or a programming goal even begin to know where to begin in decomposing the problem into manageable chunks. Language documentation doesn't help with that - though of course, some text books don't either, just focusing on language tools. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a good plan is to use the documentation along with a site like SO in conjunction with a good textbook and your own skill. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem decomposition is just as hard as the solution synthesis, and if the students are skilled in some paradigm other than OO, they will just hack code according to their older skills and learn very little about the essence of Java. The page you pointed to is just definitions. It won't help anyone build skill. Would you teach a composition class giving students a dictionary and nothing else? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, a class is .... BUT, how do I create a &lt;em&gt;good&lt;/em&gt; class? What granularity of decomposition should I use? How do I gain skill in the various idioms of Java specifically and OO more generally? What simple (or complex) design patterns can be used to solve &lt;em&gt;this&lt;/em&gt; problem? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of that will likely be found in the documentation, no matter how good. Use the documentation, but not exclusively. The interconnections are more important than the things actually discussed. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-09T20:50:18.723" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4143" PostTypeId="1" CreationDate="2018-01-09T21:39:43.517" Score="67" ViewCount="18518" Body="&lt;p&gt;One of the traps of imperative-first is how difficult it becomes to help students make sense of recursion when they finally encounter it.  And if those kids are fairly competent iterative programmers, they may also resist the new technique, as they feel perfectly comfortable solving problems without it. Many of the obvious examples of recursion (such as Fibonacci numbers) are either faster or cleaner when done iteratively.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What examples, then, cleanly motivate recursion?  To be honest, they don't have to even be coding examples.  What I want is for students to intuitively understand the &lt;em&gt;purpose&lt;/em&gt; of this new (to them) technique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I am aware of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/17/analogy-for-teaching-recursion&quot;&gt;this question&lt;/a&gt; of course, but, while it is helpful, is is after an explanatory analogy to &lt;em&gt;clarify&lt;/em&gt; recursion, while this question is about finding a clear motivation to study it in the first place.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-01-10T17:17:50.357" LastActivityDate="2020-11-27T01:17:39.153" Title="What are good examples that actually motivate the study of recursion?" Tags="|lesson-ideas|recursion|" AnswerCount="21" CommentCount="17" ContentLicense="CC BY-SA 3.0" />
  <row Id="4144" PostTypeId="2" ParentId="4143" CreationDate="2018-01-09T21:40:03.747" Score="26" Body="&lt;p&gt;One good example is to make permutations of all of the letters in a word of arbitrary length.  It's quite tricky to do iteratively, since you essentially have to recreate the program stack to get it done.  The recursive solution, however, is clean and clear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the students try to work in pairs on an iterative solution for just five minutes.  The goal would not be to actually implement it, but just to think through an approach.  Then show them the short and elegant recursive answer and help them to trace through it.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-01-11T23:22:10.973" LastActivityDate="2018-01-11T23:22:10.973" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4145" PostTypeId="2" ParentId="4143" CreationDate="2018-01-09T21:51:58.657" Score="13" Body="&lt;p&gt;I'm going to focus on student's understanding recursion at a fairly deep level, rather than coding.&lt;/p&gt;&#xA;&lt;p&gt;First, to really understand recursion you need a sense of its parts. There is the &lt;em&gt;base case&lt;/em&gt;, of course and most teachers spend time working on that, but students often miss it. But Before the process hits the base case there is a &lt;em&gt;winding phase&lt;/em&gt; working toward the base case and after the base case is reached there is an &lt;em&gt;unwinding phase&lt;/em&gt; in which all of the recursive &amp;quot;calls&amp;quot; unwind. In the execution of the algorithm, the winding phase is associated with the execution stack increasing in &amp;quot;height&amp;quot; and the unwinding case is associate with its subsequent shrinking.&lt;/p&gt;&#xA;&lt;p&gt;One point often missed by novices is that the winding phase has just exactly as many steps as the unwinding phase.&lt;/p&gt;&#xA;&lt;p&gt;Another point often missed by novices is that &lt;em&gt;work&lt;/em&gt; can be done on both the winding and unwinding phases as well as in the base case.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, to teach recursion you need a set of examples or exercises in which the student can examine all of these in detail.&lt;/p&gt;&#xA;&lt;p&gt;Complicating this learning is that most students learn recursion in an environment in which they have already learned to count, both upwards and downwards, and that knowledge, while useful in general, can inhibit learning about recursion if the ideas of recursion and counting (by incrementing or decrementing integers) get merged into a single idea.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, I propose a sequence of active learning exercises, that don't involve coding, but in which the students play roles (stack frames, actually, though you needn't discuss that until later), and which lend themselves to immediate discussion and analysis.&lt;/p&gt;&#xA;&lt;p&gt;To do these you will want a deck of index cards on which to write instructions of the various roles. The recursions will all be &amp;quot;list-like&amp;quot; so a subset of your students will stand in front of the room in a row. Each student will have a card for the current exercise. Your role is to keep things moving so that the &amp;quot;execution&amp;quot; corresponds to that of a computer. I assume that the students are arranged &amp;quot;left to right&amp;quot; at the front, with the &amp;quot;base-case&amp;quot; person at the right furthest from you.&lt;/p&gt;&#xA;&lt;h2&gt;Exercise one - Work only in the base case.&lt;/h2&gt;&#xA;&lt;p&gt;This is a fairly odd example, not likely to be part of a real program, but it can be instructive. One student's instruction card says that when they are given another card they just read aloud what is on it and then pass it back to the person that gave it to them (This person is the base case). A few others (maybe zero) each have an instruction card that says that when they receive another card they just pass it to the next person in the line, though if it is passed from the left it needs to pass to the right. You have one additional card that says &amp;quot;All Done&amp;quot;. You pass this card to the first person, who passes it on, and it should eventually reach the base case and be read aloud. You should then get the card passed back to you.&lt;/p&gt;&#xA;&lt;p&gt;Talk with the students about the phases (winding, unwinding, base) and how the number of times the card passed in is the same as the number passed out.&lt;/p&gt;&#xA;&lt;p&gt;Run the &amp;quot;simulation&amp;quot; more than once, with at least one &amp;quot;run&amp;quot; with only the base case. Later you can run it again with a missing base case to see the error that arises.&lt;/p&gt;&#xA;&lt;h2&gt;Exercise two - Work on Winding Phase - Tail Recursion&lt;/h2&gt;&#xA;&lt;p&gt;The instruction card for the base case is that when handed a card he or she should announce how many marks are on the card and then pass it back.&lt;/p&gt;&#xA;&lt;p&gt;The other student's instructions are that when passed a card &amp;quot;from the left&amp;quot; they just put a mark on it and pass it to the person on the right, but when passed a card from the right they just pass it to the left.&lt;/p&gt;&#xA;&lt;p&gt;Start the simulation by passing a blank card to the first person (who might be the base case in some &amp;quot;runs&amp;quot;. The base-case person should announce the number of people prior to the base case and return the card, through the line, back to you.&lt;/p&gt;&#xA;&lt;p&gt;At some point you can talk about how this might be mapped to a while loop and avoid all of the return steps: unwinding tail recursion.&lt;/p&gt;&#xA;&lt;p&gt;As before, have an immediate discussion about what happened to make sure that the students got the points.&lt;/p&gt;&#xA;&lt;p&gt;You can discuss the fact that the number of marks on the card is like a parameter to the function, also.&lt;/p&gt;&#xA;&lt;h2&gt;Exercise three: Work on the unwind phase only.&lt;/h2&gt;&#xA;&lt;p&gt;The base case instruction is that when handed a card, simply hand it back. The others have instructions that say that they should simply pass on a card if they receive it from the left, but mark it if they receive it from the right and pass it left.&lt;/p&gt;&#xA;&lt;p&gt;Pass a blank card to the first person and you should get back a card with one mark for each person, but no announcements. You will need to make the announcement of the number of marks.&lt;/p&gt;&#xA;&lt;h2&gt;Exercise four: Work on both winding and unwinding phases.&lt;/h2&gt;&#xA;&lt;p&gt;Here the base-case instruction is that when given a card (from the left) with a certain number of ticks, just write the number of ticks on the card (perhaps on its back) and return it to the person who gave it.&lt;/p&gt;&#xA;&lt;p&gt;The other student's instruction is that when passed a card from the left just put a tick on it but when passed a card from the right find the largest number on it, double that number, write it on the card and pass it back toward the right. Pass the first person an empty card and make sure you get back the correct result.&lt;/p&gt;&#xA;&lt;p&gt;Again, a short discussion question/answer session will help solidify the ideas.&lt;/p&gt;&#xA;&lt;p&gt;While the discussion here was long, these things move quite quickly and only a few minutes are required for each exercise and its retrospective.&lt;/p&gt;&#xA;&lt;p&gt;However, expect that the students will get it wrong as you go, so your job is to be a coach to make sure it works ok and that the appropriate lessons are learned. Emphasize that the &amp;quot;data card&amp;quot; passed through exactly as many hands on the winding phase as on the unwinding phase.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you want to emphasize the stack-frame idea a bit more, then in each of the exercises, don't line up the students initially, but pick on them one at a time when you need a new &amp;quot;frame&amp;quot;. Give each student their instruction card when they stand up to join. This will require a bit more time, of course, but is more realistic and viewers won't know the depth of recursion beforehand.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I expect that, with the above guidance, you could also devise simple coding exercises with the same characteristics, letting students learn to carefully distinguish the phases of recursion as well as the symmetry.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-10T12:38:00.667" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4146" PostTypeId="2" ParentId="4143" CreationDate="2018-01-09T22:04:51.723" Score="20" Body="&lt;p&gt;Other than the obvious &lt;a href=&quot;https://en.wikipedia.org/wiki/Merge_sort&quot; rel=&quot;noreferrer&quot;&gt;merge sort&lt;/a&gt;, I really like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Minimax&quot; rel=&quot;noreferrer&quot;&gt;minimax algorithm&lt;/a&gt;, especially when applied to creating a computer player of a simple game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with something simple like tic-tac-toe. When it's your turn, you can think about putting an &lt;code&gt;X&lt;/code&gt; on each of the 9 squares. Then you have to think about what your opponent would do in each case. Your opponent would then think about what &lt;strong&gt;you&lt;/strong&gt; would do if they marked an &lt;code&gt;O&lt;/code&gt; on each square...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To codify this in a computer player, you can create a pretty simple recursive algorithm that exhaustively searches the space, alternating between whose turn it is, and eventually choosing whichever move leads to the most possible wins, or the fewest losses, whatever. Bonus points for pitting student algorithms against each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then apply that to something more complicated like checkers or chess (or just larger or multidimensional tic-tac-toe). Here, you apply the same basic idea, but you can no longer exhaustively search the whole space because it's too large. So you have to come up with a &lt;a href=&quot;https://en.wikipedia.org/wiki/Heuristic&quot; rel=&quot;noreferrer&quot;&gt;heuristic&lt;/a&gt; and maybe implement &lt;a href=&quot;https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning&quot; rel=&quot;noreferrer&quot;&gt;alpha-beta pruning&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My point is that the algorithm itself is simple to think about and fun to play with, but it leads to lots of cooler, more complicated topics as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/17/analogy-for-teaching-recursion&quot;&gt;Analogy for teaching recursion&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-01-10T18:12:27.760" LastActivityDate="2018-01-10T18:12:27.760" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4147" PostTypeId="2" ParentId="4143" CreationDate="2018-01-09T22:13:27.710" Score="4" Body="&lt;p&gt;Another approach, entirely different from my other answer, is to ask students how they might approach the following real-life scenario: they have just been given 1400 paper forms, all filled out by potential enrollees for a program.  The forms arrived in the mail and are in no particular order, but they must be sorted into one of 4 geographical regions, and then alphabetically by last name/first name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The student has been situated in a meeting room with a giant, empty table, and boxes full of forms.  The student is told that the sorting needs to be done before the end of the work day.  Of course, the activity itself is boring, and the student would love to get out of there as soon as possible.  What approach might the student take to the task itself in order to get it done accurately and on time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically, someone will almost immediately suggest sorting the sheets into subpiles.  One logical number of subpiles for this first case is 4: divide into 4 piles by geographic region.  Now repeat the procedure, dividing into further subpiles.  While a true computer algorithm might use 4 piles again, a person would more likely use 26 piles (for the letters of the alphabet).  At that point, look at the size of the piles.  Repeat the procedure as many times as you need on any piles that are large enough to still be unwieldy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point, you will have a series of tiny piles.  A person would probably sort these small piles using some form of insertion or selection sort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We would now reverse the process, taking our tiny sorted piles, and recombining them into larger and larger fully sorted files.  These would be our recursive unwinding steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This entire procedure is not dissimilar from a standard mergesort (or, really, a recursive bucket sort).  Divide the problem, conquer the smaller pieces, and then recombine.  Breaking the problem into smaller subproblems is what makes the entire enterprise more manageable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's nice about this procedure as a motivator for examining recursion is that it, with only minor variations, is the natural solution that most people arrive at when faced with such a daunting sorting task because the benefits are clear and natural.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-01-11T15:05:01.850" LastActivityDate="2018-01-11T15:05:01.850" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="4148" PostTypeId="2" ParentId="4143" CreationDate="2018-01-10T01:04:12.843" Score="3" Body="&lt;p&gt;I'd suggest some version of string length, implemented recursively.  It's even simpler than factorial.  You just break one character off the string, feed it to a recursive call and add one to the result.  With that we can teach the essence of recursion.&lt;/p&gt;&#xA;&lt;p&gt;I find programmers often get confused by trying to &amp;quot;be the computer&amp;quot; working out the recursion to depth rather than working abstractly.  So, one trick is to get the aspiring programmers to look at the recursive invocation as a black box rather than to try to think of what's happening at depth.  Within the implementation of a recursive function, we want to be able to use the recursive function as if we are merely a client consuming some other function (that already exists and provides some usable capability) with little to no concern about the actual recursion itself.&lt;/p&gt;&#xA;&lt;p&gt;We always have to switch our hats from provider of an implementation to consuming client.  The trick with recursion is to be able to do that with the same function as its implementation is itself a consuming client (of itself).&lt;/p&gt;&#xA;&lt;p&gt;One approach is to start something like this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int string_length(char *str) {&#xA;    if (*str == '\0')&#xA;        return 0;&#xA;    return 1 + strlen(str+1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;With the objective of looking at &lt;code&gt;strlen()&lt;/code&gt; as a black box that just works (here: just what it does for us, not how), and then understanding how this &lt;code&gt;string_length()&lt;/code&gt; works (e.g. just those three lines of implementation).&lt;/p&gt;&#xA;&lt;p&gt;Then introduce the idea that since we have confidence that &lt;code&gt;string_length()&lt;/code&gt; works — that it does the same thing as &lt;code&gt;strlen()&lt;/code&gt; — we can use it in our own implementation: substituting &lt;code&gt;string_length()&lt;/code&gt; for &lt;code&gt;strlen()&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="3799" LastEditorUserId="2047" LastEditDate="2020-10-05T21:31:16.490" LastActivityDate="2020-10-05T21:31:16.490" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4149" PostTypeId="2" ParentId="4143" CreationDate="2018-01-10T06:41:56.840" Score="21" Body="&lt;p&gt;Writing recursive code to output the &lt;a href=&quot;https://en.wikipedia.org/wiki/Koch_snowflake&quot; rel=&quot;noreferrer&quot;&gt;Snowflake Curve&lt;/a&gt; (Koch snowflake) was something that definitely pushed my buttons early on.&lt;/p&gt;&#xA;&lt;p&gt;It's formed as follows:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The Koch snowflake can be constructed by starting with an equilateral triangle, then recursively altering each line segment as follows:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;divide the line segment into three segments of equal length.&lt;/li&gt;&#xA;&lt;li&gt;draw an equilateral triangle that has the middle segment from step 1 as its base and points outward.&lt;/li&gt;&#xA;&lt;li&gt;remove the line segment that is the base of the triangle from step 2.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;An &lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/f/fd/Von_Koch_curve.gif&quot; rel=&quot;noreferrer&quot;&gt;animation&lt;/a&gt; is also available from Wikimedia which shows the snowflake after the first few iterations.&lt;/p&gt;&#xA;&lt;p&gt;To generalize further, many &lt;strong&gt;Fractals&lt;/strong&gt; are generated by recursive algorithms and are thus excellent visual representations of recursion in action. The Snowflake/Koch curve is an example of a fractal that is produced by a relatively simple and easily visualizable algorithm making it a great entree into the wider world of fractals.&lt;/p&gt;&#xA;" OwnerUserId="3869" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-10T18:51:25.400" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4150" PostTypeId="2" ParentId="17" CreationDate="2018-01-10T09:02:18.097" Score="3" Body="&lt;p&gt;When I was first taught recursion in a high school CS class, the teacher had us read a short story called &lt;strong&gt;Martin and the Dragon&lt;/strong&gt;, found in chapter 8 of &quot;Common LISP: A Gentle Introduction to Symbolic Computation&quot; by David S. Touretsky. In the story, a boy named Martin visits an unruly dragon and uses recursive techniques to coerce it into helping him with a few different computational tasks that are common in LISP, including iterating over a list, calculating a factorial, counting, and calculating fibonacci numbers (which also teaches infinite recursion).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A shorter analogy might be a multi-level marketing scheme - it starts with one person, who has to recruit several more, who each in turn have to convert a few others, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Genealogical lines are also a naturally recursive data structure - you have two biological parents, who in turn each have two biological parents, and so on and so forth. It can also work for children and/or other species. &lt;/p&gt;&#xA;" OwnerUserId="3870" LastEditorUserId="3870" LastEditDate="2018-01-10T16:50:58.407" LastActivityDate="2018-01-10T16:50:58.407" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4151" PostTypeId="2" ParentId="4143" CreationDate="2018-01-10T09:16:12.270" Score="101" Body="&lt;p&gt;I find a very easy to understand example for recursion is the folder structure on a computer.&lt;/p&gt;&#xA;&lt;p&gt;Look through all folders (within a certain location) and... list all .doc files, for example.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;First, you look in the location you were given and see what you're looking for... or not, but you see more folders.&lt;/p&gt;&#xA;&lt;p&gt;Then you take each of those folders, look into them and see what you're looking for... or not, but you see more folders.&lt;/p&gt;&#xA;&lt;p&gt;Then you take each of those folders... (you get the idea)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It's a simple function to write and understand (at least in pseudocode, actual implementations may vary^^) and a concept that's easy to grasp for even a complete beginner. Introducing the problem and the manual solution, it's already obvious that each time, the same thing happens again and again. Pseudocode implementation is equally simple to write and grasp:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;function findFiles(folder) {&#xA;  look for .doc files, if found add them to fileList.txt&#xA;  look for folders&#xA;  for each found folder: findFiles(foundFolder)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I've used this example to explain recursion several times, and never had trouble getting the person to understand it. Even non-programmers can grasp the concept like this.&lt;/p&gt;&#xA;" OwnerUserId="3871" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-10T09:16:12.270" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4152" PostTypeId="2" ParentId="17" CreationDate="2018-01-10T14:28:42.217" Score="4" Body="&lt;p&gt;A fairly deep example of a recursive process that has some serious issues that might be discussed with students is as follows. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose that you are a doctoral student in mathematics beginning your dissertation studies. Your advisor has given you a topic to explore, but you know little about it in detail. The advisor suggests a research article as a place to start. The process is: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the article is by Euclid, read it and you are done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if it isn't by Euclid, then after you read it you will not likely understand everything, so (recursively) read all of the articles in that article's bibliography. However, if you &lt;em&gt;do&lt;/em&gt; understand everything already, there is no need to pursue the bibliography. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This process (read and chase bib) proceeds until you understand everything you've read or until you reach Euclid. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This process is actually closer to the truth than you might expect, but it has at least one (maybe two) serious flaw. After describing the process to students (even relative beginners), ask for their help in identifying the flaw(s). This can lead to a deeper understanding of recursion than a simple (flawless) example. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-10T14:28:42.217" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4153" PostTypeId="2" ParentId="4140" CreationDate="2018-01-10T18:36:51.750" Score="5" Body="&lt;p&gt;You shouldn't teach from &lt;strong&gt;just&lt;/strong&gt; documentation or &lt;strong&gt;just&lt;/strong&gt; a textbook. You should teach from both. You should also include &lt;strong&gt;in-class live coding sessions&lt;/strong&gt; and general lectures as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each of these things is a tool that covers a different aspect of what students need to be learning. Textbooks can be great for providing a high-level overview. Documentation can be great for providing more details when you need a reference. Live coding sessions can be great for showing the students how to actually write code, and lectures tie it all together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will say that &lt;strong&gt;including&lt;/strong&gt; documentation is a great idea. Students should know, from day one, how to look stuff up in the reference, how to consult JavaDoc, and how to read online tutorials. Properly using these resources should be a part of the very first homework assignment. This is a crucial step that I think a lot of programming curriculum leaves out, so kudos for including it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with documentation is that it's often incomplete from a learning perspective. It's meant to be a reference, without the background knowledge that's required to truly understand how to actually write code to solve a problem. The documentation you cite provides a very brief overview of the various topics, but it doesn't take the deep dive that you need to actually learn about OOP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's where a good textbook would come in handy.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-01-10T18:36:51.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4154" PostTypeId="2" ParentId="4143" CreationDate="2018-01-10T18:41:30.357" Score="0" Body="&lt;p&gt;The answers are fantastic but what I see you looking for is a motivation for using recursion over other methods. The answer goes back to why one goes to school in the first place. Not to learn what we already know but what others know, which will in the long run prove valuable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason we use recursion generally is not because it is the only solution (well trained CompSci grads can think of little else) but because it is what computers are good at. Particularly;&#xA; 1.Starting a problem. &#xA;2.Putting it onto the stack in order to &#xA;3. Go to another problem. &#xA;This is done all the time. The point of recursion is that each of these steps is for the same purpose. It is not until all the processes are done that they look around to see that there was only one goal, not O sub n goals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using minor examples can show off the major achievement of this level of organization.&lt;/p&gt;&#xA;" OwnerUserId="3887" LastActivityDate="2018-01-10T18:41:30.357" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4155" PostTypeId="2" ParentId="4143" CreationDate="2018-01-10T19:38:09.980" Score="8" Body="&lt;h1&gt;Tree Traversal&lt;/h1&gt;&#xA;&lt;p&gt;Let's compare the recursive and iterative approaches to doing an in-order traversal of a binary search tree.&lt;/p&gt;&#xA;&lt;h3&gt;Recursive approach&lt;/h3&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;void orderedTraversal(const Node *node, void (*f)(int)) {&#xA;    if (!node) return;&#xA;    orderedTraversal(node-&amp;gt;left, f);&#xA;    f(node-&amp;gt;val);&#xA;    orderedTraversal(node-&amp;gt;right, f);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3&gt;Iterative approach&lt;/h3&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;typedef struct StackNode {&#xA;    Node *node;&#xA;    int state;&#xA;    struct StackNode *next;&#xA;} StackNode;&#xA;&#xA;StackNode *push(StackNode *stack, Node *node, int state) {&#xA;    StackNode *newNode = malloc(sizeof *newNode);&#xA;    assert(newNode);&#xA;    newNode-&amp;gt;next = stack;&#xA;    newNode-&amp;gt;node = node;&#xA;    newNode-&amp;gt;state = state;&#xA;    return newNode;&#xA;}&#xA;StackNode *pop(StackNode *node) {&#xA;    StackNode *next = node-&amp;gt;next;&#xA;    free(node);&#xA;    return next;&#xA;}&#xA;&#xA;void orderedTraversalIterative(Node *node, void (*f)(int)) {&#xA;    int state = 0;&#xA;    StackNode *stack = NULL;&#xA;&#xA;    for (;;) {&#xA;        switch (state) {&#xA;            case 0:&#xA;                if (!node) {&#xA;                    state = 2;&#xA;                    continue;&#xA;                }&#xA;&#xA;                stack = push(stack, node, 1);&#xA;                state = 0;&#xA;                node = node-&amp;gt;left;&#xA;                continue;&#xA;            case 1:&#xA;                f(node-&amp;gt;val);&#xA;&#xA;                stack = push(stack, node, 2);&#xA;                state = 0;&#xA;                node = node-&amp;gt;right;&#xA;                continue;&#xA;            case 2:&#xA;                if (!stack) return;&#xA;                node = stack-&amp;gt;node;&#xA;                state = stack-&amp;gt;state;&#xA;                stack = pop(stack);&#xA;                continue;&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Of course, with a few macros, we can make the logic a bit clearer...&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;#define CALL(NODE) \&#xA;    stack = push(stack, node, __LINE__); \&#xA;    state = 0;     \&#xA;    node = NODE;   \&#xA;    goto start;    \&#xA;    case __LINE__: \&#xA;&#xA;#define RETURN do {       \&#xA;    if (!stack) return;   \&#xA;    node = stack-&amp;gt;node;   \&#xA;    state = stack-&amp;gt;state; \&#xA;    stack = pop(stack);   \&#xA;    goto start;           \&#xA;} while (0)&#xA;&#xA;void orderedTraversalIterative(Node *node, void (*f)(int)) {&#xA;    int state = 0;&#xA;    StackNode *stack = NULL;&#xA;&#xA;    start: switch (state) {&#xA;    case 0:&#xA;        if (!node) RETURN;&#xA;        CALL(node-&amp;gt;left);&#xA;        f(node-&amp;gt;val);&#xA;        CALL(node-&amp;gt;right);&#xA;        RETURN;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;...and reveal that the iterative approach to this problem is to manually build a call stack mechanism so we can go back to using the recursive approach.&lt;/p&gt;&#xA;" OwnerUserId="827" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:26.400" LastActivityDate="2020-10-06T03:17:26.400" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4156" PostTypeId="2" ParentId="4126" CreationDate="2018-01-10T23:04:57.330" Score="7" Body="&lt;p&gt;A specific example that I've used the mod operator before for (and have seen it used in production code this way) is to represent a higher dimensional array (usually 2D, but higher is possible) as a one dimensional array, and then use some modular arithmetic to retrieve the higher dimensional structure. The reason one might want to do this is if your array structure is a substructure of a more complex object, it might be simpler to implement it one dimensionally, and then add more complexity onto that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen this done when one is &quot;tiling&quot; some 2D space, where each tile maps to some properties, &lt;em&gt;and&lt;/em&gt; where each tile's properties may change in time. This could end up being a very complex structure: potentially, a mapping from time, to the first dimension of the tile, to the second dimension of the tile, to each of the properties of the tile. In such a case, the geometric &quot;2D&quot;-ness of the tiling may not be that important (except for perhaps the display), and so the implementation of the internal model of these tiles could be one dimensional instead, simplifying our model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a simple 2D array example. Say one has a &lt;code&gt;3&lt;/code&gt; by &lt;code&gt;3&lt;/code&gt; array, where the &quot;property&quot; is represented by some integer:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1 4 9&#xA;&#xA;0 2 7&#xA;&#xA;5 6 4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Our 2d array may be indexed with &lt;code&gt;[row, column]&lt;/code&gt; as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[0,0] [0,1] [0,2]&#xA;&#xA;[1,0] [1,1] [1,2]&#xA;&#xA;[2,0] [2,1] [2,2]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, we &lt;em&gt;can&lt;/em&gt; represent it with only a single parameter as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0 1 2&#xA;&#xA;3 4 5&#xA;&#xA;6 7 8&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(left to right, then top to bottom is just a convention of course)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how do we retrieve the row and column numbers given one of these indices? This shows some nice symmetry between the &lt;code&gt;/&lt;/code&gt; operator (that is, truncated division on integers) and the &lt;code&gt;%&lt;/code&gt; operator. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we're indexing rows and columns as in my first example, the &quot;row number&quot; of an index &lt;code&gt;i&lt;/code&gt; above is given by &lt;code&gt;i / 3&lt;/code&gt; (again, truncated), and the &quot;column number&quot; of an index &lt;code&gt;i&lt;/code&gt; above is given by &lt;code&gt;i % 3&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, if you have an &lt;code&gt;n&lt;/code&gt; by &lt;code&gt;n&lt;/code&gt; array, and you index it as I did above, the row number is given by &lt;code&gt;i / n&lt;/code&gt; and the column number is given by &lt;code&gt;i % n&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another example, and this one gets closer to the intuition you're trying to achieve, is simplifying computations for cyclic functions. If your functions are over the integers, then your operator &lt;code&gt;%&lt;/code&gt; is good enough. However, this wouldn't work for continuous functions. Nicely enough, one can take your discrete cyclic model and make it continuous in programming languages by using &lt;code&gt;fmod&lt;/code&gt; or an equivalent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, for students with enough background in Calculus that have some familiarity with Taylor series, one can think of how one would write a trig function like cosine. One might realize that the 6th degree Taylor polynomial approximation is &quot;close enough&quot; in the range between $- \pi/2$ to $\pi/2$. Then, one can &quot;mirror&quot; that to get one complete cycle of the cosine curve between $-\pi/2$ and $3\pi/2$ (for example.) Then, with this, one might ask how one would compute the value of $cosine$ for &lt;em&gt;any&lt;/em&gt; real number, and the answer is quickly obtained by using some modular arithmetic to get your number in that range, and then use our restricted cosine function for that translated number. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This use of mod also relates to &lt;a href=&quot;https://cseducators.stackexchange.com/a/4128/27&quot;&gt;Guy Coder's answer&lt;/a&gt;: thinking of taking the mod of a number as involving several subtractions is precisely how one might implement the continuous &lt;code&gt;fmod&lt;/code&gt; function (however, whereas a discrete mod function's usual &quot;remainder&quot; intuition may be lost here, the intuition regarding the cyclical nature of mod should be strengthened). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, I like to think that the kind of mental modeling required to think about mods is going to help these students regardless of whether they literally use them later on in their programming careers.  &lt;/p&gt;&#xA;" OwnerUserId="3894" LastEditorUserId="27" LastEditDate="2018-01-10T23:29:02.627" LastActivityDate="2018-01-10T23:29:02.627" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4157" PostTypeId="1" CreationDate="2018-01-10T23:39:42.923" Score="2" ViewCount="223" Body="&lt;p&gt;I have explained big and little endian from time to time in my teaching career, but it is quite dry, and asking my students which direction each one goes three months later has revealed to me that my lesson doesn't make which &quot;end&quot; goes with which part of memory really &lt;em&gt;stick&lt;/em&gt; for my students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to explain endian-ness so that it is fun, memorable, and makes clear why the two systems exist, but I haven't found a good way yet. It's a small concept, so it can be a short demonstration, but I still want to make it effective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any classroom tricks up their sleeves for this one? &lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-01-12T14:52:49.490" Title="Big-endian, Little-endian" Tags="|lesson-ideas|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4158" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T00:13:37.530" Score="4" Body="&lt;p&gt;Show them how they use recursion in solving puzzles in their &lt;em&gt;civilian life&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Sudoku&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Ask them how to solve &lt;a href=&quot;https://en.wikipedia.org/wiki/Sudoku&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sudoku&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What's the naive way? You have to iterate through all (roughly) 9^81 numbers, checking each board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming each check takes on plank second (we're not even close to that in real life), it will take about 3.35843803 × 10^26 years years to solve each Sudoku puzzle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's &lt;em&gt;way&lt;/em&gt; after the earth &lt;a href=&quot;https://en.wikipedia.org/wiki/Timeline_of_the_far_future&quot; rel=&quot;nofollow noreferrer&quot;&gt;falls into a black dwarf sun&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So how do we solve it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recursion. Find the &quot;easiest&quot; block to solve (meaning, the one with the least possible variation). Let's say it's the next small board:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;| _ | 3 || 4 | _ |&#xA;| 2 | _ || _ | 1 |&#xA;--------++--------&#xA;| 3 | 2 || 1 | _ |&#xA;| 4 | _ || 2 | 3 |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So you that first blank could be a 4, 3, 1 or 1.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what do you do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You fill a four.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you check the board:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;| 4 | 3 || 4 | _ |&#xA;| 2 | _ || _ | 1 |&#xA;--------++--------&#xA;| 3 | 2 || 1 | _ |&#xA;| 4 | _ || 2 | 3 |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Does it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No. There are two fours in the first column. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try the next, and the next... until you get a one.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;| 1 | 3 || 4 | _ |&#xA;| 2 | _ || _ | 1 |&#xA;--------++--------&#xA;| 3 | 2 || 1 | _ |&#xA;| 4 | _ || 2 | 3 |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Hey, that works!!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's move to the next blank. And you &lt;em&gt;recursively&lt;/em&gt; [1] check each square.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does it work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because each problem is a &lt;em&gt;subset&lt;/em&gt; of the previous problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://play.rust-lang.org/?gist=84f488360abe78ff6a74e9301727081d&amp;amp;version=undefined&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a sample solver of a given Sudoku board (The &lt;a href=&quot;http://www.7sudoku.com/very-difficult&quot; rel=&quot;nofollow noreferrer&quot;&gt;website&lt;/a&gt; I found it labeled it as &quot;very difficult&quot;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The program solved it in less than a second, going through only 40,000 iterations.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In reality, that's  how most people actually solve the problem (ever seen people writing small numbers in each square, erasing ones that don't work? That's your stack!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[1] In this case you don't need recursion, because the board is too simple. But if you take a real board with moderate difficulty, you need to take steps in, check if they work, and if not, pop out until there's another way to solve it. In short, you push and pop solutions, which is easiest to do with recursion.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;A Maze&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;How do you solve a maze?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You go down one path? If it doesn't work you &lt;em&gt;pop&lt;/em&gt; back to the last state where there's hope and try again.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Solving arithmetic problems&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;How would you solve (1-2)/((1+2)/(3-4))?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's assume for a moment that all order-of-operations have been taken care of through parenthesis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest way would be a &lt;a href=&quot;https://en.wikipedia.org/wiki/Recursive_descent_parser&quot; rel=&quot;nofollow noreferrer&quot;&gt;recursive-descent parser&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Lex it. You now have the following lexical array: [&lt;code&gt;(&lt;/code&gt; &lt;code&gt;1&lt;/code&gt; &lt;code&gt;-&lt;/code&gt; &lt;code&gt;2&lt;/code&gt; &lt;code&gt;)&lt;/code&gt; &lt;code&gt;/&lt;/code&gt; &lt;code&gt;(&lt;/code&gt; &lt;code&gt;(&lt;/code&gt; &lt;code&gt;1&lt;/code&gt; &lt;code&gt;+&lt;/code&gt; &lt;code&gt;2&lt;/code&gt; &lt;code&gt;)&lt;/code&gt; &lt;code&gt;/&lt;/code&gt; &lt;code&gt;(&lt;/code&gt; &lt;code&gt;3&lt;/code&gt; &lt;code&gt;-&lt;/code&gt; &lt;code&gt;4&lt;/code&gt; &lt;code&gt;)&lt;/code&gt; &lt;code&gt;)&lt;/code&gt;]&lt;/li&gt;&#xA;&lt;li&gt;Start at position 0.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Go block by block:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If it's a regular block (a number): do something like: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;DoMath(curVal[pos],curVal[pos+1],curVal[pos+2])&#xA;pos = pos+2&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If it's a 'control character' (a parenthesis in our example):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Recurse&lt;/em&gt; back to 3, with the 'end control character' being a 'close parenthesis'.&lt;/li&gt;&#xA;&lt;li&gt;Replace 'n' characters (the length of the inner parenthesis expression) with the the return value.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;If it's an 'end control character' (a 'close parenthesis' or an 'end-of-string tag'):&#xA;Return the value that's left after all that work.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="3896" LastEditorUserId="3896" LastEditDate="2018-01-21T05:03:06.573" LastActivityDate="2018-01-21T05:03:06.573" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4159" PostTypeId="1" CreationDate="2018-01-11T01:49:14.400" Score="6" ViewCount="343" Body="&lt;p&gt;I do mathematical biology curriculum development and design and sometimes teach the associated computer labs. The students are very much beginners. Recently, I have had to start working with a Python 3-based system rather than a Python 2.7-based one. Some of the changes in Python 3 have made basic functions much more abstract. I can't have students just type in &lt;code&gt;zip([1,2,3], [4,5,6])&lt;/code&gt; to see what it does. (I had them do &lt;code&gt;list(zip([1,2,3], [4,5,6]))&lt;/code&gt;, but that's really changing the output of &lt;code&gt;zip&lt;/code&gt; into something else.) And &lt;code&gt;range&lt;/code&gt; no longer outputs a list -- instead, it outputs something that counts, but again, is quite abstract. How would you explain these things to total beginners?&lt;/p&gt;&#xA;" OwnerUserId="3897" LastActivityDate="2018-02-16T21:09:26.083" Title="Teaching zip and range in Python 3" Tags="|python|" AnswerCount="4" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4160" PostTypeId="2" ParentId="4157" CreationDate="2018-01-11T02:35:50.567" Score="1" Body="&lt;p&gt;Mabye something here will be of use...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Little-endian means the lowest byte address holds the least significant bit (and byte).  Big-endian means the lowest byte address holds the most significant bit (and byte).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, Little = Lowest Least.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And Big is the other one...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are multiple possible ways because storing (and retrieving) a word in multiple bytes &lt;em&gt;is a form of serialization &amp;amp; deserialization&lt;/em&gt; &amp;#8212; breaking down one large object into smaller chunks and vice versa.  These processes are inherently order sensitive by nature as each smaller chunk has a different specific placement within the larger.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, since the smaller sized chunks (here bytes) adds up to the same bit count as that of the larger item (here words), the arrangement of the ordering must be prescribed in advance (and otherwise it would take additional bits to indicate the order or encoding scheme (not to mention the additional logic to handle that)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two of those ways are fairly obvious: lowest least and lowest most.  In both those schemes, the address of a word is the lowest address of all of the bytes used in storing the word.  Given this addressing constraint, there are only two schemes for storing a 16-bit value in 2-bytes, though there are more permutations of byte order for storing a 32-bit value in 4-bytes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Further, we might also consider that the address of a word is the address of the highest address therein, which would give rise to additional schemes, but these would give up the desirable property that word aligned addresses are even.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In human terms we can write text left-to-right or right-to-left, or top-to-bottom or bottom-to-top, etc...  We can relate these various schemes to lower-to-higher addresses (maybe even to higher-to-lower addresses).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I consider that humans do little-endian for numbers &lt;em&gt;when we line them up e.g. for long arithmetic&lt;/em&gt;, though right-to-left instead of lower-to-higher.  When we need larger numbers we expand digits to the left, anchoring the least significant digit in the same column; little endian pointer addresses point to LSBs regardless of the size of the data type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By  contrast, to get more digits, big-endian shifts the number over to higher addresses in order to insert more digits at lower addresses (rather odd IMHO).  So, the byte at the address for a word points to an MSB.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  Human    Little-Endian   Big-Endian&#xA;    92       29               92&#xA;+  910       019              910&#xA; -----       ----             -----&#xA;  1002       2001             1002&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can see that little-endian (here shown with addresses increasing left-to-right) is mirror image of human.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another approach I use is to show addresses on the right side of a word-sized dump for little endian.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; words      address&#xA;xxxxxxxx  &amp;lt;- 0000&#xA;xxxxxxxx  &amp;lt;- 0004&#xA;xxxxxxxx  &amp;lt;- 0008&#xA;xxxxxxxx  &amp;lt;- 000C&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2018-01-11T02:35:50.567" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4161" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T03:15:49.470" Score="4" Body="&lt;h1&gt;Construct an immutable nested structure&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It's obvious (to us instructors) that in a purely functional language, recursion is the only way to create nested structures. And immutable data is imperative (pun intended) for proper semantical reasoning about values.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what kind of examples lend themselves to an intuitive recursive approach where an imperative approach is much harder?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nested data structures&lt;/strong&gt; like linked lists, trees and graphs are most easily traversed and constructed recursively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Linked lists are too simple, the tail recursion has the same idea as the equal imperative loop and can be written as such without involving an explicit stack. Graphs are too complicated as keeping state (e.g. to avoid infinite descend) and creating cycles is easiest to do using mutation, and many introductory graph algorithms &lt;em&gt;do&lt;/em&gt; keep an explicit queue of nodes. Graphs without cycles are just trees. Here I would avoid n-ary trees where nodes keeps lists/arrays/vectors of children, as those again would typically be accessed in an (imperative) loop, which confuses the students (making the gist of recursion harder to recognise, and obfuscating the base case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So binary trees it is. A simple tree of integers can be summed, scanned for its maximum and/or minimum, and mapped over with e.g. an incrementing or doubling transformation. It might even be filtered for odd/even numbers. Later you can introduce the respective abstractions (&lt;code&gt;fold&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;) if you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would recommend to avoid algorithms for balancing trees here, those are often rather unintuitive when expressed recursively or at least differ much from the imperative approach that is found in most teaching material.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Immutable data structures&lt;/strong&gt; cannot be re-initialised or changed during traversal. This again prevents imperative solutions e.g. in the &lt;code&gt;map&lt;/code&gt; exercise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using a functional language in the course, this requirement is probably easy to place. However this doesn't satisfy imperative-minded students who will think &quot;if I could just mutate the data (like in $favouriteLanguage) this task would be much easier&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are dealing with an imperative language, you will need to make up some excuses for why immutability is necessary. Constructing not a single but many distinct results helps here. They might be output as a side effect, but are going to get used later after the algorithm ended. Building an animation sequence that can be replayed later (and also rewinded, or run backwards) might be a good idea, which also provides the students with some visualisation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computing permutations &lt;a href=&quot;https://cseducators.stackexchange.com/a/4144/660&quot;&gt;as suggested by Ben I.&lt;/a&gt; is a perfect take on this - instead of just printing all permutations (doable by mutating a sequence) many distinct arrays/lists need to be created. Computing the power set, the subsequences or substrings of an input are similar tasks (and don't even require loops because of the nature of the binary decisions). Here, the concept of sharing between data structures can be introduced as an advantage of immutability later in the course (demonstrated by memory requirements of responses to huge inputs).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="660" LastActivityDate="2018-01-11T03:15:49.470" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4162" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T05:33:22.617" Score="3" Body="&lt;p&gt;If the students have learned object-oriented programming then network-traversal or tree-exploration works well because it is easier to visualize one node calling another than to visualize a method calling itself. Start with a directed graph with no cycles so you don't get infinite loops.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;//returns true of this is part of the path&#xA;public boolean findLastNode(List&amp;lt;Node&amp;gt; pathSoFar)&#xA;{&#xA;    if (this.isLastNode())&#xA;    {&#xA;        path.add(this);&#xA;        return true;&#xA;    }&#xA;    for (Node aNeighbor:this.getNeighbors)&#xA;    {&#xA;        if (aNeighbor.findLastNode())&#xA;        {&#xA;            path.add(this);&#xA;            return true;&#xA;        }&#xA;    }&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The code is easy to visualize and draw on the whiteboard because each recursive call moves you across the graph, and you can visualize each node having its own copy of the findLastNode method so you don't have to think of the flow of control reusing variables that are already holding other data.&lt;/p&gt;&#xA;" OwnerUserId="3900" LastEditorUserId="3900" LastEditDate="2020-11-27T01:17:39.153" LastActivityDate="2020-11-27T01:17:39.153" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4163" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T08:52:23.580" Score="6" Body="&lt;p&gt;Several answers have said things like &quot;We need recursion to handle tree structures.&quot; The problem with this type of answer is that the student then asks &quot;Why would we have a tree structure in the first place?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;@Syndic's example of handling directories with subdirectories is probably the best answer, but there are others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My favorite example where recursion feels natural is &lt;strong&gt;Parsing&lt;/strong&gt;.  For many parsing tasks, a &lt;a href=&quot;https://en.wikipedia.org/wiki/Recursive_descent_parser&quot; rel=&quot;nofollow noreferrer&quot;&gt;recursive descent parser&lt;/a&gt; is the easiest approach to take.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, parsing &lt;a href=&quot;https://en.wikipedia.org/wiki/JSON&quot; rel=&quot;nofollow noreferrer&quot;&gt;JSON&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The top level will something like &lt;code&gt;ParseItem&lt;/code&gt;, a function that takes an input stream and returns an data item corresponding to the JSON found there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This function looks at the first characer to find out what type of item it  should parse.  Depending on this, it will call &lt;code&gt;ParseObject&lt;/code&gt;, &lt;code&gt;ParseNumber&lt;/code&gt;, &lt;code&gt;ParseArray&lt;/code&gt;, &lt;code&gt;ParseString&lt;/code&gt; or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, &lt;code&gt;ParseArray&lt;/code&gt; will set up an array and starts parsing items to fill it with.  How does it do that?  Why, it calls &lt;code&gt;ParseItem&lt;/code&gt;!  Recursion!&lt;/p&gt;&#xA;" OwnerUserId="1055" LastEditorUserId="1055" LastEditDate="2018-01-15T08:38:06.440" LastActivityDate="2018-01-15T08:38:06.440" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4164" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T13:02:50.467" Score="8" Body="&lt;p&gt;Operating on the key word, &lt;strong&gt;motivate&lt;/strong&gt;, I do believe that &lt;a href=&quot;/users/2037/andrew-t&quot; title=&quot;Andrew T.'s profile&quot;&gt;Andrew T.&lt;/a&gt; had the best choice with &lt;a href=&quot;//en.wikipedia.org/wiki/Tower_of_Hanoi#Solution&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tower of Hanoi&lt;/a&gt;. Yes, it's an old one, and it does not lead to anything useful once it's done, (the code is not reusable for some other &amp;quot;real world&amp;quot; problem.) Yet it remains a classic for some reason. I'm going to speculate that the reason is that when presented properly it &lt;em&gt;motivates&lt;/em&gt; the students to think about using recursion for other purposes. As to what the &lt;em&gt;motivation&lt;/em&gt; is - simple: less work! AKA - unmitigated self-interest. Who doesn't like the idea of getting something done fast and easy, preferring instead to do it the long and hard way while getting the exact same results? That suggests that the &lt;em&gt;motivation&lt;/em&gt; comes from the presentation, not from the example used.&lt;/p&gt;&#xA;&lt;p&gt;With the &lt;a href=&quot;//en.wikipedia.org/wiki/Tower_of_Hanoi#Solution&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tower of Hanoi&lt;/a&gt; example, adding in the &amp;quot;legend&amp;quot; of the back story can help with interest, but it can also be a waste of classroom time. Using the legend, or not, is a judgment call for your class and your style. (I have encountered at least three versions of the legend, and I am partial to the version that mentions the walls of the temple crumbling into dust and the world vanishing.)&lt;/p&gt;&#xA;&lt;p&gt;The key to the presentation is to begin with solving it using an iterative approach. Preferably even before you raise the idea of recursion, leaving the &lt;em&gt;alternative&lt;/em&gt; as a way out of the maze later. In a comment, &lt;a href=&quot;/users/2806/eric-lippert&quot; title=&quot;Eric Lippert's profile&quot;&gt;Eric Lippert&lt;/a&gt; states that it is easier to solve with an iterative algorithm using these steps and rules: &amp;quot;number the disks in order of size; never move a larger disk onto a smaller disk, never move an odd disk onto an odd disk or an even disk onto an even disk, and never move the same disk twice in a row.&amp;quot; That sounds good, and you can present it, just as given, in the classroom. Before trying to code it, however, give it a try physically. Using that rule-set with 5 disks I get the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Only disk available is 1, move 1 from A to B.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1 and 2 are available, just moved 1 so only 2 is left. It cannot go on top of 1 (reverse sizes) so move 2 from A to C.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1, 2, and 3 are now available. 2 just moved, and 3 cannot go on top of 1 (reverse sizes) or 2 (reverse sizes), so 1 must move. 1 cannot go on 3 (odd on odd), so move 1 from B to C.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1 and 3 are available. Disk 1 just moved so we must move 3. It cannot go on 1 (reverse sizes) so move 3 from A to B.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1, 3 and 4 are available. Disk 3 just moved, so only 1 and 4 can move. 4 cannot go anywhere (reverse sizes) so 1 moves. 1 cannot go on 3 (odd on odd), so move 1 from C to A.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1, 2, and 3 are available. 1 just moved, 3 cannot go anywhere (reverse sizes) so 2 moves. 2 cannot go on 1 (reverse sizes), so move 2 from C to B.&lt;/li&gt;&#xA;&lt;li&gt;Disks 1 and 2 are available. 2 just moved, so 1 is next. 1 Can go on top of 2, OR to the empty post.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The given rules offer no guidance for the next move, and computers &lt;em&gt;must&lt;/em&gt; have rules to follow.&lt;/p&gt;&#xA;&lt;p&gt;There is another iterative approach, which does work for creating an algorithm. It has a setup rule, a movement rule and a cycle to repeat. The puzzle usually does not give the arrangement of the posts, only that there are three of them. It is commonly displayed, or presented, with the posts being in a straight line. It can, however, be presented as an arrangement of three posts in a triangular formation, like the image below. In either case, working this iterative approach needs to treat the set of posts as a &lt;em&gt;wrap-around&lt;/em&gt; collection, being able to move between the posts infinitely in either direction. The triangular formation makes that easier to visualize than the linear formation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/UucJf.jpg&quot; alt=&quot;triangular Hanoi puzzle&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;If we consider the top-left as post &amp;quot;A&amp;quot; (the source post), the top-right as post &amp;quot;B&amp;quot; (the target post), and the bottom-center as post &amp;quot;C&amp;quot; (the working post), then the setup rule is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;For an odd number of disks, the smallest disk moves clockwise, and for an even number of disks the smallest disk moves counter-clockwise.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The movement rule is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;With the disks numbered from smallest, as zero, to largest, disks with an even parity &lt;em&gt;always&lt;/em&gt; move the same direction as the smallest disk, and disks with an odd parity &lt;em&gt;always&lt;/em&gt; move in the reverse direction.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Finally, the cycle for the moves is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Move the smallest disk.&#xA;2. Move the only other &amp;quot;legal&amp;quot; move.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Using that two-move cycle, following the movement rule, will solve the puzzle in the smallest possible set of moves. Performing that in class with a 6-disk set shouldn't take very long (about 90 seconds without commentary, 2 or 3 minutes with decision commentary). Especially true if you have previously labeled the disks with their numbers, and marked them in some fashion to show which way they move so that you don't get confused during the demonstration. (Overheads, projector, or animation on screen works as well, but physical objects may have an enhanced long-term effect.)&lt;/p&gt;&#xA;&lt;p&gt;Now, you have the students primed to learn the power of recursion. The rules for the iterative solution are &lt;em&gt;oh, so simple&lt;/em&gt;. Turning those rules into an actual no-fail algorithm, with decisions mapped out, is not so simple after all. As humans, we can see, instantly, where the smallest disk is, which disks are able to move, and almost instantly reject the illegal moves when there are two open disks at the same time. Setting all that human ability into formal codified logic that can be followed blindly and achieve the desired result turns out to be &lt;em&gt;much&lt;/em&gt; more difficult than it sounds.&lt;/p&gt;&#xA;&lt;p&gt;Having not dealt with Hanoi since the middle 1980s, I think I can consider myself as having an almost &lt;em&gt;fresh&lt;/em&gt; perspective on the problem. Trying to codify the algorithm for the above rules took up quite a bit of my spare time. I cannot put an amount of clock time to it since it was a &amp;quot;between-times&amp;quot; progress when other issues weren't pressing. Still, it took me the better part of a day to be confident in my algorithm and put it into code. With that in mind, I'm not sure if you should task the students with converting the above rules into a formal algorithm or not. Perhaps you can walk the class through developing one or two of the decisions within the algorithm to give them a sense of the work involved.&lt;/p&gt;&#xA;&lt;p&gt;The main objective of the presentation up to this point is to help them to see, or experience, how much effort goes into creating the solution using the coding skills they have. Then they are ready to see the power that recursion can give them when the situation is right. Re-address the Hanoi puzzle to show that is can be reduced to a collection of smaller sub-problems that are the same as the original problem, except for size. Any solution that works for the main problem also works for the smaller sub-problems, and any solution that works for the smaller sub-problems also works for the main problem. Use that recognition to design a recursive approach to the solution. Hopefully, the amount of time spent finding the (un-coded) recursive solution is nearly the same as was spent finding the (un-coded) iterative solution, showing that finding the basics for the solution is pretty much the same for either approach. Then the magic happens when the un-coded recursive solution is written into pseudo code, or live code in the chosen language. If you have a coded version of the iterative solution to present, and then they write, or are shown, the recursive solution, they will see that dozens of lines have been reduced to about a dozen (depending on the language used). Reduced lines, with simpler logic means less typing, less chance for bugs and errors, and less work for them.&lt;/p&gt;&#xA;&lt;p&gt;Once they see the benefits of recursion, you can also deliver the caveats (with examples if you have them) which includes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The recursive solution may &lt;em&gt;not be&lt;/em&gt; the shortest&lt;/li&gt;&#xA;&lt;li&gt;The recursive solution may &lt;em&gt;not be&lt;/em&gt; the fastest&lt;/li&gt;&#xA;&lt;li&gt;A recursive solution may &lt;em&gt;not&lt;/em&gt; exist for a given problem&lt;/li&gt;&#xA;&lt;li&gt;A recursive solution might take &lt;em&gt;longer&lt;/em&gt; to create than an iterative vesrion&lt;/li&gt;&#xA;&lt;li&gt;Recursive solutions &lt;em&gt;can&lt;/em&gt; create issues with the stack, and memory management&lt;/li&gt;&#xA;&lt;li&gt;Recursion is not, by itself, faster or slower, than iteration&lt;/li&gt;&#xA;&lt;li&gt;Recursion has to have the base case built in to the model, there is no outside decision maker&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;This is also a case where the recursive solution is faster, significantly, than the iterative solution. Running a series of time trials, with the output comment out and disk count set to 25 (33,554,431 moves), the iterative solution averaged 1m22.4s and the recursive solution averaged 0m28.4s.&lt;/p&gt;&#xA;&lt;p&gt;Granted, my code is in Perl, and most of your classes are in Java, C++, or a functional language, so it would have to be converted for use in your languages. I took advantage of a few of the patterns inherent in the puzzle solution, and stated the &amp;quot;tricks&amp;quot; used in the comments. I did not, however, try for serious optimization or other forms of code cleaning. In spite of that, this is the final version of a tested, and timed, version of the Hanoi puzzle using an iterative approach:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-perl prettyprint-override&quot;&gt;&lt;code&gt;#!/usr/bin/perl&#xA;use strict;&#xA;use warnings;&#xA;use 5.10.0;&#xA;my $disks = 20; # How many disks to use for the game.&#xA;sub move_tower_iterative { # (height of tower, souce post, destination post, spare post)&#xA;    my ($height, @names) = @_; # Collect the parameters&#xA;    my @posts =  ([reverse (0 .. $height-1)], [], []); # The post, to track the state of the game&#xA;    my $rotation = ($height % 2)? 1 : -1; # Direction the smallest disk moves&#xA;        # 1 is source -&amp;gt; destination -&amp;gt; spare -&amp;gt; source ...&#xA;        # -1 is source -&amp;gt; spare -&amp;gt; destination -&amp;gt; source ...&#xA;    my ($disk, $from, $to) = (0) x 2; # Temporary data, pre-loaded for the first move&#xA;    do {&#xA;        # Figure out where the disk to be moved will go&#xA;        $to = ($from + $rotation * (($posts[$from][-1] % 2)? -1 : 1) + 3) % 3;&#xA;        # Take the disk off the top of one post&#xA;        $disk = pop $posts[$from];&#xA;        # Add it to the top of the other post&#xA;        push $posts[$to], $disk;&#xA;        # Say what we did&#xA;        printf &amp;quot;\tMove disk from %s to %s\n&amp;quot;, $names[$from], $names[$to];&#xA;        # Find the next legal move&#xA;        if ( 0 != $posts[$to][-1] ) { # Was the smallest disk NOT the last move? Then move it.&#xA;            # It will be found where the just moved disk would move to, if it was to move again.&#xA;            $from = ($to + $rotation * (($posts[$to][-1] % 2)? -1 : 1) + 3) % 3;&#xA;        }&#xA;        else { # Not moving the smallest disk means finding the one other legal move&#xA;            while ( # Starting with the same post we just moved from check if ...&#xA;                    ( -1 == $#{$posts[$from]} ) # The post is empty &#xA;                    || ( # OR both&#xA;                        ( -1 != $#{@posts[($from + $rotation * (($posts[$from][-1] % 2)? -1 : 1) + 3) % 3]} ) # The destination post is not empty&#xA;                        &amp;amp;&amp;amp; ($posts[$from][-1] &amp;gt; $posts[($from + $rotation * (($posts[$from][-1] % 2)? -1 : 1) + 3) % 3][-1]) # AND has a smaller disk&#xA;                    )&#xA;                    || ( # OR both&#xA;                        ( 0 == $posts[$from][-1]) # The post has the smallest disk&#xA;                        &amp;amp;&amp;amp; ($#{$posts[$from]} != $height-1) # AND the post is not full&#xA;                    )&#xA;            ) { # Keep looking for by cycling to the next post&#xA;            $from = ++$from % 3;&#xA;            }&#xA;        }&#xA;    } until ($#{$posts[1]} == $height-1); # Stop when the destination post is full&#xA;}&#xA;move_tower_iterative $disks, &amp;quot;Back-left&amp;quot;, &amp;quot;Back-right&amp;quot;, &amp;quot;Front&amp;quot; ; # Start moving.&#xA;1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To balance that out, and to show the difference, here is the recursive version, also tested and timed. In this case I've removed the comments, just as a visual enhancement of the difference between the two versions:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-perl prettyprint-override&quot;&gt;&lt;code&gt;#!/usr/bin/perl&#xA;use strict;&#xA;use warnings;&#xA;use 5.10.0;&#xA;my $disks = 20;&#xA;sub move_tower_recursive { &#xA;    my ($height, $source, $dest, $spare) = @_;&#xA;    if ( 1 &amp;lt;= $height) {&#xA;        move_tower_recursive($height-1, $source, $spare, $dest);&#xA;        printf &amp;quot;\tMove disk from %s to %s\n&amp;quot;, $source, $dest;&#xA;        move_tower_recursive($height-1, $spare, $dest, $source);&#xA;    }&#xA;}&#xA;move_tower_recursive $disks, &amp;quot;Left side&amp;quot;, &amp;quot;Right side&amp;quot;, &amp;quot;Center&amp;quot; ;&#xA;1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="104" LastEditorUserId="2047" LastEditDate="2020-10-06T03:18:41.193" LastActivityDate="2020-10-06T03:18:41.193" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4165" PostTypeId="2" ParentId="4157" CreationDate="2018-01-11T14:21:54.333" Score="1" Body="&lt;p&gt;TL;DR Items are numbered (indexed). For big-endian, start the count with the most significant item and work toward the least. For little-endian start with the least significant item and work toward the highest.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Endianness&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia page&lt;/a&gt; and the post by user &lt;a href=&quot;https://cseducators.stackexchange.com/a/4160/1293&quot;&gt;Erik Edit&lt;/a&gt; provide good technical details, but I'd rather give a memorable &amp;quot;picture&amp;quot; of what is going on.&lt;/p&gt;&#xA;&lt;p&gt;First, if you only work on one computer architecture then &lt;em&gt;endianness&lt;/em&gt; is automatic and of little consequence. It is when you need to transfer data from one system to another (if they have different architectures) that it matters. An early story is that in attempting to send &amp;quot;Unix&amp;quot; from one machine to another, &amp;quot;nUxi&amp;quot; showed up at the other end.&lt;/p&gt;&#xA;&lt;p&gt;Suppose that you have a large group of &amp;quot;marchers&amp;quot; (bits) in a &amp;quot;field&amp;quot; (system memory). Suppose that you want to send them all to another field, but they must pass one at a time through a &amp;quot;hallway&amp;quot; (bit stream) to another field that may be organized differently. Each field has an &amp;quot;organizer&amp;quot; (architecture) that knows something about the organization (duh) of that field.&lt;/p&gt;&#xA;&lt;h2&gt;Simplest case: one level organization&lt;/h2&gt;&#xA;&lt;p&gt;We will first consider the simplest case of a single level of organization at each end with some similarities between them as described below.&lt;/p&gt;&#xA;&lt;p&gt;In each field, the marchers are organized into &amp;quot;squads&amp;quot; of, say, 8 marchers per squad (note it is the same at both ends, one of the simplifications for now). Each squad has a leader (most significant bit), though the leader isn't marked in any way. The leader looks like any other marcher, but when the squad lines up the leader is always to the left. Since the marchers aren't very smart (just &amp;quot;bits&amp;quot;, remember), the organizer of a field will help them arrange themselves by instructing the members of the squad to each stand in a numbered location on the field. The locations for the members of an individual squad are numbered 0 through 7.&lt;/p&gt;&#xA;&lt;p&gt;A field can be big-endian (think the big end of an egg), in which the leader of a squad stands on location 0 for that squad, with the other members arranged to its left. The last member (the least significant member) will be on slot 7.&lt;/p&gt;&#xA;&lt;p&gt;Alternatively, a field can be little-endian (eggs again), in which slot numbers are reversed so that the leader of the squad is still to the left, but on this field that slot is number 7 so that the least significant marcher (bit) winds up in slot 0.&lt;/p&gt;&#xA;&lt;p&gt;It is really only the field organizer that is responsible for the relative arrangement of the slots. If you look at a squad (or the whole field) ignoring those, a big-endian squad and a little-endian squad will look the same, with the leader to the left.&lt;/p&gt;&#xA;&lt;p&gt;Now, however, one desires to move the marchers on a field to another field. Since this happens a lot, the &amp;quot;association of organizers&amp;quot; (standards groups) have decided that when going through a hallway (in single file), the leaders will go first, followed by the rest of its squad. It could have been the other way and there are a few places in which the rules aren't obeyed, but that leads to chaos so mostly the leader-first rule is used.&lt;/p&gt;&#xA;&lt;p&gt;But it is the organizer of a field who must send marchers to the hallway and the organizer at the other end who must take marchers as they emerge from the hallway and line them up again.&lt;/p&gt;&#xA;&lt;p&gt;Let's look at the sending organizer first. The organizer will &amp;quot;point&amp;quot; at a squad and then call off slot numbers for the movement of that squad to the hallway. If it is a big-endian field, then the organizer will count upwards from 0 to 7 for that squad, so that the leader (slot 0, remember) goes first and the rest follow, with the marcher in slot 7 going last for that squad. Other squads may follow as well, but we will come to that.&lt;/p&gt;&#xA;&lt;p&gt;If the field is little-endian, however, the organizer simply counts downward from 7 to 0 instead. But this, again, sends the leader first.&lt;/p&gt;&#xA;&lt;p&gt;Now we look at the other end of the hallway. The receiving organizer has to take the squads as they emerge and assign them to positions. A position has room for a squad, and it has numbered slots for the members as usual. If this field big-endian, the slots are, as usual numbered 0-7 left to right but if it is little endian the slots are numbered 7-0 left to right. So, the organizer at this end, takes marchers as they emerge from the hallway, and knowing that the leader of a squad will be first, just points to a location and counts off slot numbers appropriately. If this is a big-endian field, the organizer counts starting from 0, but a little-endian organizer will count downward from 7.&lt;/p&gt;&#xA;&lt;h2&gt;Several levels&lt;/h2&gt;&#xA;&lt;p&gt;Suppose, however, that the situation is more complex. Suppose that each squad is part of a larger grouping, a &amp;quot;platoon&amp;quot;. A platoon might consist of, say four squads, and they need to be treated for some purposes as a group. Again, the organizer of any given field needs to know things about that field, but as little as possible about other fields.&lt;/p&gt;&#xA;&lt;p&gt;The biggest complication is that a field might be big-endian for squads, but little-endian for platoons (mixed endian). This is really only a complication for how you think of it, however. The organizer will do the right thing. We will assume here that the squads and platoons are organized the same. The squads of a platoon stand together (think a row) with one squad next to another. There will be four sets of squad-slots making up a platoon formation. Just like the numbering of the individual squad slots, the sets are numbered for the squads of a platoon. If the numbering from left to right is 0 through 3 then the platoon organization is big-endian. If it is 3 down to 0 it is little-endian. In all cases the squad to the left is the more significant squad and the one to the right is the least significant squad whatever the numbering.&lt;/p&gt;&#xA;&lt;p&gt;Now, again, the organizer wants to send marchers through the hallway and will send the squads one after the other. The organizer knows the numbering of the platoon formation slots (0-3 or 3-0). So, to send a platoon through the hallway, supposing that we have big-endian throughout, the organizer first points to squad 0 (the most significant squad) and then counts off the marchers 0-7 as before. Squad 1 is sent next, etc, ending with the least significant squad (3). But if the field is organized little-endian at the platoon level, the organizer points to squad 3 as the start and counts off marchers, etc, ending with squad 0.&lt;/p&gt;&#xA;&lt;p&gt;Note that in mixed endian there is no particular difficulty as long as the organizer knows what to do at any level. But, importantly, the most significant elements at any level are given priority. They will have low index number in big-endian and larger index numbers in little-endian organization at that level.&lt;/p&gt;&#xA;&lt;p&gt;The situation at the receiving end is similar. The organizer there knows that the most significant squad in a platoon will come first and within a squad the leader will be first. So, having selected a place for the incoming platoon, the organizer points to what ever slot is reserved for the most significant squad (0 for big-endian, but 3 for little) and then counts off members either upward or downward depending on the appropriate ordering for that field. This will, of course be the left-most of the squad locations. The organizer then points to the next location and counts off the second squad, etc. At the end, the platoon is lined up just as before, though the indexes of the slots won't be the same for the fields at the two ends of the hallway.&lt;/p&gt;&#xA;&lt;h2&gt;Even more complex: inconsistent squad and/or platoon sizes&lt;/h2&gt;&#xA;&lt;p&gt;I won't attempt a complete explanation here as there are too many possibilities. It may be that the organizers at the ends need some information about both fields, not just their own. I'll assume a single level of grouping here (squads), but higher levels (platoons) would be similar.&lt;/p&gt;&#xA;&lt;p&gt;One common case is that you are sending a squad with say six members into a field in which squads have eight. The sending organizer can behave just as before, sending the leader first as usual, but counting from 0 to 5 or 5 to 0 depending on endianness. The organizer at the other end has a problem though. First it needs to know that only six marchers are coming per squad, with the leader first. It has to put the marchers into the eight slots. Normally (but not necessarily) the members would be placed so that the least significant member winds up in the least significant slot, with the two most significant slots left empty. This means that if the receiving field is big-endian, the leader of the squad winds up in slot 2, and if little-endian in slot 5.&lt;/p&gt;&#xA;&lt;p&gt;Another variation is when the sending field has a squad length that is half the size of the squad length in the receiving field. Then the receiving field can do as just above, or can &amp;quot;pack&amp;quot; two of the incoming squads into a single squad section in this field. Keeping in mind that the squads come through the hallway most-significant-first, the first four-member squad would go to the left in the eight-marcher region and the second squad would go to the right. The slot numbers of course depend on the endianness, but the organizer just points to a place and counts off slot numbers as the marchers come through.&lt;/p&gt;&#xA;&lt;p&gt;Sending from a field in which the squad sizes are larger than the receiving field is more complex and won't be described in detail here. But either some marchers get sent to the sidelines (unlikely but possible) or the incoming marchers will need to be distributed over more than one of that field's positions. The key to working out a proper protocol is that the marchers come through in most-significant-first at any level, though the organizer at the receiving end will need to know how to break up or combine the marchers into squads at that end. Remember, that all of the marchers look alike. There is nothing to distinguish any of them. The leader doesn't look anything different from any other marcher, nor is there any way to &amp;quot;mark&amp;quot; divisions between squads. That needs to be known to the organizer in advance.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;We note for the record that some systems are &lt;em&gt;bi-endian&lt;/em&gt; and can be organized (either in hardware or software) either big- or little-endian. At a given moment, they are one or the other, unless you want chaos to rule.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-11T17:00:30.150" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4166" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T15:17:52.503" Score="4" Body="&lt;p&gt;When teaching recursion, it is important to emphasize that the true power of recursion comes from its ability to branch. This rules out all the factorial and other similarly silly recursion examples much better written as for-loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have your students write a function that, given an open tile in Minesweeper whose value is zero, opens all the tiles in the neighbourhood that are safe to open. I have used this example for about 15 years in intro to Java course, and think it is the best way to show the usefulness of recursion in a first year course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solving the subset sum problem in an integer array is another great example of branching recursion that is only three lines of code using recursion, and a lot more without it.&lt;/p&gt;&#xA;" OwnerUserId="3908" LastActivityDate="2018-01-11T15:17:52.503" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4167" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T15:32:29.393" Score="2" Body="&lt;p&gt;Since these did not need to be programming examples, here is another example that I like to use and have found illustrative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you need to write a method to solve some problem, you must write that method using the things that you already have: the statements in the language, and the methods already in the standard library or written by you. Your job is to find the right combination of these that will achieve the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you need to define the factorial function, you would do so with the definition&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$F(n) = n * (n-1) * ... * 2 * 1$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where the right hand side contains a for-loop and a whole bunch of multiplications, two things that you already have in the language. So we can implement factorial using the things that we have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But imagine this now as some fantasy type of setting, where this equation is a game of tug of war where the left hand side and the right hand side must pull with equal strength to balance each other out. On the left hand side, $F(n)$ is a big strong mountain giant. If the right hand side consists of little hobbits (each multiplication operation), we will necessarily need a large number of hobbits to be able to pull together as hard as the one mountain giant on the left side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Spotting the self-similarity in the above definition allows us to turn this into an equivalent recursive definition&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$F(n) = n * F(n-1)$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which at first seems like cheating, since we are borrowing the function $F$, the thing that we were supposed to define, from the future to be used in its own definition! What do we gain from doing this trick? Well, since $F(n-1)$ is now on the right hand side, it is now a big friendly giant that is pulling for us, instead of pulling against us, in this game of tug of war!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing in that observation depends on the fact that $F$ is particularly the factorial function. In fact, the more complex and powerful the giant is when placed on the left hand side (for example, consider the problem of parsing), the more powerful it is also when it is working for us on the right hand side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This realization allows us to solve arbitrarily complicated problems by using a slightly smaller version of those problems on the right hand side. In the game of tug of war between one giant and one slightly smaller giant, we only need to add a couple of small hobbits on the right hand side to balance the whole thing, instead of having to put down some large number of small things to balance one big thing. This is the power of recursion.&lt;/p&gt;&#xA;" OwnerUserId="3908" LastEditorUserId="27" LastEditDate="2018-01-11T15:59:56.403" LastActivityDate="2018-01-11T15:59:56.403" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4168" PostTypeId="2" ParentId="4159" CreationDate="2018-01-11T17:13:45.507" Score="3" Body="&lt;p&gt;I don't think the concepts behind &lt;a href=&quot;https://wiki.python.org/moin/Generators&quot; rel=&quot;nofollow noreferrer&quot;&gt;generators&lt;/a&gt;, sequences and &lt;a href=&quot;https://wiki.python.org/moin/Iterator&quot; rel=&quot;nofollow noreferrer&quot;&gt;iterators&lt;/a&gt; are too difficult to grasp if you're clear on what exactly they are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'old' &lt;code&gt;range(n)&lt;/code&gt; function of Python 2 just produces a list of numbers: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[0, 1, 2, 3, ... , n - 1]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You ask it to give you a list of numbers from $0$ to $n - 1$, and it gives you a &lt;code&gt;list&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new &lt;code&gt;range(n)&lt;/code&gt; doesn't do that. Instead, it makes an object that knows the start, end and step that you asked for... &lt;em&gt;but it doesn't give you a list!&lt;/em&gt; This object will, however, give you the &lt;em&gt;next&lt;/em&gt; element of the sequence if you ask for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running &lt;code&gt;list(range(n))&lt;/code&gt; specifically asks for the list of all the integers, but in the vast majority of cases, you don't need the list, so there's no point making it and storing the whole thing in memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine you wanted to print the numbers 1 to 1000. Python 2's &lt;code&gt;range()&lt;/code&gt; would generate &lt;em&gt;every&lt;/em&gt; number up front, before you can begin iterating. Clearly, this is very wasteful and pointless; it's much easier to work out each number at the end of the iteration, and doesn't require nearly as much memory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I suppose that the merits of the feature aren't &lt;em&gt;really&lt;/em&gt; relevant or important to absolute beginners; it's better that they gain some understanding of how to use the feature before understanding the merits behind it. Instead, consider explaining like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Iterables (such as &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;zip&lt;/code&gt;) only do work when specifically asked (they're lazy — if your students have had any exposure to functional programming, that might be familiar)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Generally, being lazy makes things faster, because you don't do unnecessary work (e.g. in case you quit the loop early).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you specifically need the whole list, you can ask for it with &lt;code&gt;list(iterable)&lt;/code&gt; — but this is usually not as common as just iterating through with &lt;code&gt;for&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If your students know Python 2's &lt;code&gt;xrange&lt;/code&gt;, they'll find &lt;code&gt;range&lt;/code&gt; simple to understand. &lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2018-01-11T17:13:45.507" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4169" PostTypeId="2" ParentId="4143" CreationDate="2018-01-11T18:58:28.467" Score="1" Body="&lt;p&gt;When i was introduced to recursion, i felt the same on why learning something i don't need but using iterative approach on complex situations like &lt;strong&gt;Tower of hanoi&lt;/strong&gt; etc., using recursion seems to be more simpler in logic as well as programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason i like recursion:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need to solve or think about whole solution. You can break the whole problem in smaller ones, and use those solution to solve the bigger problem. And this helps to think more clear logic for your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Algorithms that makes sense using recursion: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tower of Hanoi&lt;/li&gt;&#xA;&lt;li&gt;Quick sort&lt;/li&gt;&#xA;&lt;li&gt;Graph traversal(Inorder, preorder, postorder)&lt;/li&gt;&#xA;&lt;li&gt;and so on...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want the students to feel interested in it, you can &lt;em&gt;try giving an assignment of solving tower of hanoi using iterative method&lt;/em&gt;. And then using recursion, the students will themselves know which method to use where and why :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Look for &lt;strong&gt;ackermann function&lt;/strong&gt; as well.&lt;/p&gt;&#xA;" OwnerUserId="3915" LastActivityDate="2018-01-11T18:58:28.467" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4170" PostTypeId="2" ParentId="4143" CreationDate="2018-01-12T13:07:58.620" Score="2" Body="&lt;p&gt;In my first programming class, I &quot;discovered&quot; the concept of recursion on my own, before it was introduced by the instructor.  It wasn't the typical use-case for recursion, but it was enough to jump start my thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was creating a really simple 2D tile based game, and was working on the graphics. I had a function that took an ID number that represented what kind of tile to draw, and the X,Y coords to draw it.  I had already implemented grass (ID 1), by simply drawing a green rectangle, with a few pixels of off-green.  When I went to draw a Tree (ID 2), the tree was supposed to have a grassy background behind it.  I didn't want to duplicate the grass drawing code again for the tree Tile, and after thinking about it for a while, I thought &quot;Hey, I could just call the drawing function again, and tell it to draw the Grass tile at the current coordinates, then draw the tree over top of it.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked the teacher if a function was allowed to call its self.  He got a strange look on his face, and asked me to show him what I was doing.  He explained a little bit about what was actually happening, and told me that what I was doing actually had a name. He said that it would be covered in a lot more detail in a few weeks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, it was a simple way to see the &lt;em&gt;idea&lt;/em&gt; of recursion as a real physical thing, without having to deal with the mathematical abstractions that things like the Fibonacci Sequence require.&lt;/p&gt;&#xA;" OwnerUserId="887" LastActivityDate="2018-01-12T13:07:58.620" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4171" PostTypeId="2" ParentId="4157" CreationDate="2018-01-12T14:52:49.490" Score="2" Body="&lt;p&gt;The way it was explained to me -- how this distinction without a difference came about -- is quite simple. If we are storing text in a file, it is quite natural (for users of ASCII, which has one byte per character) to place the characters one after another, starting with the first one at position zero. If more is added to the file, it easily goes on the end. This agrees with the convention of writing left to right, say on a board (white, green, brown, black, or otherwise.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The wrinkle in the rug is that &lt;em&gt;numbers&lt;/em&gt; are often larger than one byte (gosh darn it) and so we have two choices for how to write them in to a file, send in a stream, transmit data by radio from one Hawaiian island to another (the founding of the internet) and so on:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;send the most significant byte first  &lt;/li&gt;&#xA;&lt;li&gt;send the least significant byte first  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Huh&lt;/em&gt;. Now there is a stumper for you. Which should we do? It is natural when the digits of a base-10 number are written in a text file, like &quot;12,345&quot;, to send the first byte, well, first, eh? But someone decided that numbers should send the least significant &lt;strong&gt;bit&lt;/strong&gt; first and then forward from there to the most significant bit. This makes total sense if you are writing out, say, the bits of a data stream (image file, encrypted data, etc) and so then it would be just like the ASCII text case, except bit-wise, and the bits should ascend as we write them on a board... uh, left to right. Yeah.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bits, bytes, schmytes... What does it really matter? Well, just like how we ended up with cars going on the left in some parts of the world and otherwise right, just like how we have 220 V AC in parts of the world and 110 V split phase in other parts, just like how some languages are written in letter-scripts and others are written using ideograms, it makes no difference whatsoever, unless moving from one system to the other. The real question is:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;why can't we all just get along?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or in other words: &lt;strong&gt;why do standards emerge only after two or more groups have already made a big investment in different schemes?&lt;/strong&gt; That is the subject of a larger course.&lt;/p&gt;&#xA;" OwnerUserId="3929" LastActivityDate="2018-01-12T14:52:49.490" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4172" PostTypeId="2" ParentId="4143" CreationDate="2018-01-12T23:10:36.657" Score="-1" Body="&lt;p&gt;Water is a good example, when you pour a jug of water compare it to the algorithim the algorithim or water is continually poured until there is no more water left or the base condition is satisfied, leaving you with a solution, comparing a water fall to a bad case of infinite recursion it just continues flowing. &lt;/p&gt;&#xA;" OwnerUserId="3937" LastActivityDate="2018-01-12T23:10:36.657" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4173" PostTypeId="2" ParentId="4159" CreationDate="2018-01-13T00:20:25.283" Score="1" Body="&lt;p&gt;As suggested, moved from comment to answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A range is exactly that - a definition of a beginning and an end point. The 2.7 default behavior made it look as if it were a list, and confused the issue. To new programmers, there is no &quot;change&quot;, it is simply how things are. Only those with prior expectations will be confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My perspective is someone who has no practical experience in Python, but decades of OO programming experience. I would find the 2.7 implementation of range confusing because a list is not inherently a range, although a range could be implemented as a list with a length of two (beginning and end).&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-01-13T00:20:25.283" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4174" PostTypeId="2" ParentId="3221" CreationDate="2018-01-13T00:29:02.580" Score="2" Body="&lt;p&gt;I have compiled a set of notes for second Java course that is heavy on OOP. Since the department is switching to Python soon, perhaps these will be useful for somebody else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://docs.google.com/document/d/1sG556OctNx1IfzClhcJemVvk_oJlhx8kO2DIpkjOSO8/edit?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lecture notes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://docs.google.com/document/d/1K1yG9OnZv-QmNCiZDAsr_kiEPT9WNtSlQfz4sB1Mmyw/edit?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Course itself&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3908" LastActivityDate="2018-01-13T00:29:02.580" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4177" PostTypeId="1" AcceptedAnswerId="4189" CreationDate="2018-01-13T17:00:50.487" Score="6" ViewCount="1185" Body="&lt;p&gt;I am going to teach a C++ course to students who already know Java. From  answers to &lt;a href=&quot;https://cseducators.stackexchange.com/q/4113/1873&quot;&gt;my previous question&lt;/a&gt;, I learned that C++ is substantially harder to master than Java, particularly because of the need to manually manage memory allocation. Thus, I expect my students to ask:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Why do we need to study C++ at all? Why not use only Java?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Two general answers are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Because C++ is faster (but I am not sure the difference is substantial enough)&lt;/li&gt;&#xA;&lt;li&gt;Because C++ is already used in many companies where you might work in the future.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;But I am looking for a more convincing answer. In particular:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In what kind of applications is C++ considered a better choice than Java?&lt;/li&gt;&#xA;&lt;li&gt;In what parts of the software industry is C++ used more than Java?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2018-01-24T12:07:04.563" Title="Motivation for learning C++ when you know Java" Tags="|student-motivation|java|language-choice|c++|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4178" PostTypeId="2" ParentId="4177" CreationDate="2018-01-13T18:21:03.700" Score="5" Body="&lt;p&gt;There are many reasons for wanting to learn a new language, whether C++ or something else. I'll try to make this general enough to address Timothy Truckle's concerns in a comment, but also the questioner's direct question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a scholar you learn a new language because it gives you some additional perspective on programming that the languages you already know don't possess. For example, some major programming paradigms are imperative, object-oriented, functional, and logic. The scholar will want to know at least the essence of a language from each group. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a prospective employee (such as a student) you probably want to know several languages, even if they are quite similar (ruby, python) because it might give you an edge in getting a job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are already employed you use the language of the group you are with, even COBOL. Occasionally a group will want to change languages and when this happens, knowing the new language will, hopefully, prevent your getting replaced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you simply have a program to write, use the language you know best unless (a) it is inappropriate to the task or (b) you want to wear the scholar hat for a while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes you choose a language for no other reason than the set of libraries that it is offered with. Those libraries may do most of the work for you in the current task, so don't underestimate the importance of this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to the question of C++ vs Java, they are similar on the surface, but have deep differences. Java is a fairly pure OO language, though there have been improvements since it was introduced. C++, on the other hand is a true multi-paradigm language. It is not, however, an OO language, strictly speaking, though it can be programmed that way. It is much stronger as a &lt;em&gt;Data Abstraction&lt;/em&gt; language than an OO language, but you need to become familiar with the Standard Template Library to be able to clearly see the difference between that and OO. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the scholar's standpoint, the great thing about Java, and the reason it is a good &lt;em&gt;first&lt;/em&gt; language, is that it takes many decisions and concerns out of the hands of the application programmer and handles them automatically. The biggest of these is memory management, especially the heap. Java's garbage collector means that you needn't concern yourself with the lifetime of objects except in extreme cases. These cases don't arise for beginners, and when they do, Java is not likely to be the best language (billions of objects existing simultaneously, for example). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still from the standpoint of the scholar, programming in C++ will force you to think at a more detailed level. This isn't ideal for the beginner, but every master programmer needs to do the &lt;em&gt;nitty-gritty&lt;/em&gt; at some point, and C++ forces you there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java is a much more &lt;em&gt;abstract&lt;/em&gt; language. For example, it has only single inheritance, so using formal interfaces is much more important there. The &quot;meaning&quot; of code can be expressed in Java Docs for interfaces rather than in the code itself (though there is danger there, of course). If you program wisely in Java those Java Docs on the Interfaces are likely all of the &quot;comments&quot; that your code needs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multiple inheritance in C++ holds many pitfalls, that are overcome with attention to detail and with a level of planning that you don't need in Java, since that alternative isn't available. Combining two superclasses as parents of a subclass can lead to poor design if not done wisely. That isn't a &lt;em&gt;stroke against&lt;/em&gt; C++ but a warning that the programmer needs to develop additional skills to avoid pitfalls. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other things in C++ are more complex than in Java. Visibility, for example, and especially &lt;em&gt;friend&lt;/em&gt; classes. Also &lt;em&gt;includes&lt;/em&gt;, namespaces, and some lower-level things such as structs. Again, it isn't that this is bad in C++ but the programmer needs to learn how to handle a greater range of detail than in a more abstract language or in a single paradigm language. Learning how to deal with that, and learning the tools that help you do it is valuable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, to say that C++ is more efficient than Java is wrong in general, though it may be correct in some situations. Compilers have come a long way in recent years and the efficiency of code is dependent on the quality of the compiler. In particular, if a language must be used at a detail level then the compiler has less opportunity for optimization than if it is used at a more abstract level. If my program describes &lt;em&gt;how to do something&lt;/em&gt; it is quite different than if it describes &lt;em&gt;what must be done&lt;/em&gt;. In the latter case, the compiler may be better able to come up with the &lt;em&gt;how to&lt;/em&gt; than you are. If you describe the &lt;em&gt;how to&lt;/em&gt; itself in your program, the compiler may have no option than to plod along with the steps you chose even when there might be a better path to the goal. Functional and Logic languages were once thought inefficient, but they need not be. It was a result of the level of sophistication of translation available at the time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To conclude, C++ is a good choice to follow Java as it will reveal a level of detail that the Java programmer didn't previously need to contend with. Even if you only use C++ as a &lt;em&gt;better C&lt;/em&gt; you will learn a lot. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But learning a language, like Prolog, say, in a completely different family will also teach you  things that are quite different, not just deeper, than what you already know - orthogonal dimensions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-13T18:21:03.700" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4179" PostTypeId="2" ParentId="4177" CreationDate="2018-01-13T18:38:28.990" Score="8" Body="&lt;p&gt;I think you're having trouble justifying the study of C++ because of the way that you're thinking about it.  If you are aiming towards the practical benefits, then you immediately get to the following trap: neither you nor your students has any idea what languages they will work with in the future, so neither you nor your students have any idea what languages would be the most practical to learn.  There are no good answers when you begin this way, and the motivations will always seem to fall a bit flat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might steer the students (and you!) towards a slightly different model of thinking about benefits here.  What foundational &lt;em&gt;ideas about programming and Computer Science&lt;/em&gt; are easier to grasp in C++ than in Java?  These foundational ideas will important later, regardless of the development environment, because they are the building blocks of computational thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;When we teach CS, we are concept-focused and language agnostic.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This lens also provides you with the beginnings of a map through the topic itself.  You can quickly sketch out a curriculum at this point, which is best done backwards:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;What are the most important concepts that you want the students to learn?&lt;/strong&gt; &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Fair warning: I am not a C++ programmer!  There may well be more important topics than these to get into, but I know that C++ gives students an opportunity to learn about pointers, pointer arithmetic, and memory management.  You could also get into casting and bit-operations, which forces the students to learn about data representation.  Each of these concepts are fundamental to computers, and much harder to learn about in Java, which abstracts them away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Selling&lt;/em&gt; the language to the students is now a comparatively easier task.  You're using C++ because you get to show them some very cool things about how computers really work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best time to do such &lt;em&gt;selling&lt;/em&gt; is on the first day.  By explaining #1 to them at the beginning, you alter their motivation going forward.  They want to do well on the tasks you've outlined not &lt;em&gt;only&lt;/em&gt; because it gets them a better grade, but because they are also mastering deep, important concepts that will help them understand computational thinking.  Computational thinking will help them regardless of what they do in the future.  Heck, they could leave the field entirely; they would still have mastered a rich and powerful tool-set for thinking about problems, wherever they go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now we get to the planning portion:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;What is the most logical ordering of those concepts?&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;How will you (and the students!) know that the concepts have been learned?  This could be some combination of projects and assessments.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've grouped these together because they are a little interdependent. Sometimes step 3 will cause you to go back and modify the order in step 2, but these two steps are how you arrive at a well-organized semester.  The best tasks for #3 are also rich and interesting in their own right.  (One resource I could recommend for help finding great, motivating tasks for a given concept is this very site.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is extremely important that you really get a good answer for #3.  If you've done these three steps well, then the projects and assessments will now be sufficient to prove that the students understand the material.  If you've truly answered #3, and you have total trust in that, then it frees you up to spend the entire course doing one thing:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;Prepare your students to do really well on those tasks.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The reason that #4 is so important is because of the social dynamic that results. You really want your students to feel like you're on their side, pulling for the same team. And if your goal, every day, is to help them master the material, then they will be able to see that you are putting tremendous effort into trying to help them.  And there are also benefits to you here; as a relatively beginner teacher (who will certainly make some mistakes along the way!), having students who are willing to cut you a little slack can make your life a lot easier as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now we have a strong course structure!  Tell the students about the cool &lt;em&gt;concepts&lt;/em&gt; they will be learning, and tell them that C++ is a great language to focus in on these concepts.  Map out the order of the concepts that you'll be covering and tell them about the projects, tests, etc.  Then come in every day, and focus in a rather laser-like way on making sure that the students are well prepared for the important tasks that you've designed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;(Apologies for the length of this response.  I wasn't trying to write a book chapter, but I am leaving the information in in the hopes that you will find it very helpful!)&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="145" LastEditDate="2018-01-17T10:59:24.240" LastActivityDate="2018-01-17T10:59:24.240" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4181" PostTypeId="2" ParentId="213" CreationDate="2018-01-15T14:08:39.407" Score="1" Body="&lt;p&gt;Light gang switches, same the way you teach binary counting.  (Well, the same way that I was taught binary arithmetic back when knowing binary and hex were important.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: An &lt;em&gt;off&lt;/em&gt; transistor (simulated by a light switch) is considered to be 0 (no voltage) and an &lt;em&gt;on&lt;/em&gt; to be 1 (voltage passing).  Since &quot;all zeros&quot; is a valid configuration, 0 is a valid address where Important Bits can reside.  That's why many languages base arrays using 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT 2: It's also the basis of pointer arithmetic.  Your array has a base address at location &lt;code&gt;A&lt;/code&gt;, so that's where the first element goes.  When you're referencing the elements in a loop, you add an offset &lt;code&gt;O&lt;/code&gt; to get to each array element.  To access the first element, the  value of &lt;code&gt;O&lt;/code&gt; must be &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/AIcY4.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/AIcY4.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3132" LastEditorUserId="3132" LastEditDate="2018-01-15T14:56:20.677" LastActivityDate="2018-01-15T14:56:20.677" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4182" PostTypeId="1" CreationDate="2018-01-17T07:32:12.333" Score="4" ViewCount="112" Body="&lt;p&gt;Senior students in the computer science major at my school work on a project which is supposed to be relatively big (i.e. just a graphic calculator isn't enough). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering (for next year; it's too late for this year) what might be gained if we teach the students about Version Control (probably git).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Naturally, this makes the project easier to track and has all the advantages that vcs offers. But given that these students aren't taught about correct\good design concepts and such, if we &lt;strong&gt;do&lt;/strong&gt; attempt to teach about vcs, some students might be confused.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what advantages might teaching vcs to these students (so that they use it to organize their projects) have?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An option is to make the lesson optional (i.e. enrichment).&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="204" LastEditDate="2018-03-12T09:48:54.493" LastActivityDate="2018-03-12T09:48:54.493" Title="Merits of teaching VCS as enrichment" Tags="|secondary-education|project|revision-control|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4183" PostTypeId="1" CreationDate="2018-01-17T12:53:48.220" Score="14" ViewCount="1492" Body="&lt;p&gt;I have been asked to give an introductory programming course for kids between 14-15 years old. Scratch seems like a good option for young children, maybe up to 12 years old. Python, is also a good language for beginners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need help from educators to choose between the two options for the mentioned age group. I'm afraid that Scratch might be too childish for them, while Python might be too complicated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, the course will meet once a week. However, I have relative liberty in deciding how long the session is and how many weeks the course will be. Actually feedback in this regard is also appreciated. I want the session to be long enough to be productive, but not boring long. My initial thought is meeting for 1.5 hours each week for 6 weeks, and then deciding whether follow up course is a good idea.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't say much about the background of the kids. This is part of an extra-curricular school that meets every weekend, and I volunteered to give a programming course to the children to make them more interested in technology.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The age range was a bit different from expected. The kids were between 10-15 years old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started the course with Python and used &lt;code&gt;Turtle&lt;/code&gt; library to have a visual output. The kids had some progress, but I felt it was slow and it was a bit hard for some of them to grasp some basic concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After five or six weeks, I decided to switch to Scratch. The progress rate improved significantly. However, a few of the kids who were good with Python complained that Scratch is a language for little children that you can't do 'real' things with. It's definitely hard to please everyone.&lt;/p&gt;&#xA;" OwnerUserId="3982" LastEditorUserId="3982" LastEditDate="2019-02-11T21:24:20.890" LastActivityDate="2019-08-20T01:52:53.003" Title="Programming language for teenagers" Tags="|language-choice|scratch|" AnswerCount="7" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4184" PostTypeId="2" ParentId="4183" CreationDate="2018-01-17T13:08:40.537" Score="3" Body="&lt;p&gt;I think it largely depends on the kids. If you are proficient in both you might even want to give them a choice (as a class, not individually). Show them a bit of each in the first session and let them discuss the options. It might make them more connected to the course, in fact. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either is appropriate in general, but the background of the students might also be relevant. Is it a random selection or self-selected interested kids or a captive audience? Knowing that might push you toward the more or less &quot;sophisticated&quot; option. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even Java with a tool like Greenfoot might work for you since it is very visual and has quite a lot of support through greenroom.greenfoot.org. The greenfoot folks are working on a scratch-like environment at this time, but its introduction may be a ways off. It does, however, include a language simpler than Java (Stride) with nearly the capabilities of Java (and translations between it and the full language). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that there are quite a number of books for teaching Python to kids. A search at Amazon, for &quot;Python for Kids&quot; will turn up several, including a book with that title. I don't find that particular book especially inspiring, however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you choose Python, I'd suggest also finding a suitable environment (i.e. something richer than &lt;em&gt;idle&lt;/em&gt;) to provide support, with code management, code completion and the like. Scratch will provide much of that, but you might not want to have the choice Scratch v. &quot;Naked Python&quot;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-17T13:08:40.537" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4185" PostTypeId="1" CreationDate="2018-01-17T17:18:42.993" Score="7" ViewCount="232" Body="&lt;p&gt;I'm a computer science teacher and our department is thinking about opening a data analysis and machine learning course for upperclassmen at my high school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some topics that could be covered in a year long timespan that could be done by students with a basic understanding of Python and basic statistics (correlation/regression, measures of central tendency, hypothesis testing)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm thinking the total time commitment available to students is 3.5 hours a week of in-class time, and approximately 2 to 3 hours a week of coding, learning, or doing homework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some topics that we were thinking might be relevant are image processing and natural language processing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there any projects that really hit the ground running in terms of showcasing a topic in machine learning?&lt;/p&gt;&#xA;" OwnerUserId="3990" LastEditorUserId="1293" LastEditDate="2018-01-17T17:56:04.967" LastActivityDate="2018-01-22T16:27:22.083" Title="Opening a machine learning course in high school" Tags="|secondary-education|machine-learning|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4186" PostTypeId="2" ParentId="4183" CreationDate="2018-01-17T19:12:44.267" Score="12" Body="&lt;p&gt;I highly recommend checking out a language called &lt;a href=&quot;https://processing.org/&quot; rel=&quot;noreferrer&quot;&gt;Processing&lt;/a&gt;. Processing is designed for novices, and makes it easy to create visual and interactive programs without a ton of boilerplate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an example Processing sketch:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void draw() {&#xA;  ellipse(mouseX, mouseY, 25, 25);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is a full program that draws a circle wherever the mouse is, 60 times per second.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/AMsW6.gif&quot; alt=&quot;circle trail&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/19/2068&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/173/2068&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2924/2068&quot;&gt;The order of subjects in beginner's curriculum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2798/2068&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/3904/2068&quot;&gt;Make it easier, and quicker to get to the start&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I wrote a series of tutorials for Processing available &lt;a href=&quot;http://happycoding.io&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;. I'd love to talk more about using these in a curriculum.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-01-17T20:19:16.110" LastActivityDate="2018-01-17T20:19:16.110" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4187" PostTypeId="2" ParentId="4185" CreationDate="2018-01-17T20:38:06.570" Score="5" Body="&lt;p&gt;There are all sorts of things you &lt;em&gt;could&lt;/em&gt; cover — machine learning is an extremely interesting and growing field, with many different approaches and tools you could explore.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the more popular tasks for machine learning algorithms include &lt;strong&gt;classification&lt;/strong&gt;, &lt;strong&gt;regression&lt;/strong&gt; and &lt;strong&gt;clustering&lt;/strong&gt;. Not every application fits into this grouping (e.g. &lt;a href=&quot;https://en.wikipedia.org/wiki/AlphaGo&quot; rel=&quot;noreferrer&quot;&gt;AlphaGo&lt;/a&gt;, the Go playing program which beat Lee Se-dol).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I might suggest starting with &lt;a href=&quot;https://en.wikipedia.org/wiki/Naive_Bayes_classifier&quot; rel=&quot;noreferrer&quot;&gt;Naive Bayes classifiers&lt;/a&gt;. Your motivating example here could be &lt;a href=&quot;https://en.wikipedia.org/wiki/Naive_Bayes_spam_filtering&quot; rel=&quot;noreferrer&quot;&gt;spam filtering&lt;/a&gt;; Naive Bayes classifiers were used in some of the first 'learning' spam filters, dating back to the 1990s. If your students are familiar with Bayes' theorem, the assumptions of NB classifiers shouldn't be a huge leap (you may find &lt;a href=&quot;http://scikit-learn.org/stable/modules/naive_bayes.html&quot; rel=&quot;noreferrer&quot;&gt;this derivation&lt;/a&gt; interesting).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also various other interesting options such as &lt;a href=&quot;https://en.wikipedia.org/wiki/Random_forest&quot; rel=&quot;noreferrer&quot;&gt;random forests&lt;/a&gt; (apparently used by &lt;a href=&quot;https://www.quora.com/&quot; rel=&quot;noreferrer&quot;&gt;Quora&lt;/a&gt; to &lt;a href=&quot;https://www.kaggle.com/c/quora-question-pairs&quot; rel=&quot;noreferrer&quot;&gt;find duplicate questions&lt;/a&gt;), &lt;a href=&quot;https://en.wikipedia.org/wiki/Support_vector_machine&quot; rel=&quot;noreferrer&quot;&gt;support vector machines&lt;/a&gt; and so forth which could be explored potentially.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the most 'fashionable' techniques involve &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_neural_network&quot; rel=&quot;noreferrer&quot;&gt;neural networks&lt;/a&gt;, and I would recommend spending a decent amount of time with the theory. Unlike some of the classifiers and regressors I mentioned earlier, neural networks tend to be a bit more involved — a Naive Bayes classifier essentially just needs to be given some data in an appropriate form and is &quot;plug and play&quot;, so to speak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The (free) online book &lt;a href=&quot;http://neuralnetworksanddeeplearning.com/index.html&quot; rel=&quot;noreferrer&quot;&gt;Neural Networks and Deep Learning&lt;/a&gt; gives a reasonably accessible explanation of neural networks in their various forms (starting with perceptrons, leading towards sigmoid neurons, gradient descent, backpropagation, deep learning, etc.). As you can imagine, there is an immense amount of content even in just the field of neural networks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likely you won't want to cover all of the book's topics, but you don't need to go too far to reach another interesting motivating example: &lt;a href=&quot;http://yann.lecun.com/exdb/mnist/&quot; rel=&quot;noreferrer&quot;&gt;classifying the MNIST dataset&lt;/a&gt; of handwritten digits. That's something which is relatively hard traditionally, but much simpler with the usage of a neural network.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I've discussed a lot without ever actually explaining how you could &lt;em&gt;write any programs&lt;/em&gt;. Of course, any machine learning class would be a little incomplete if your students had never actually applied their skills. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since your students know Python, I can highly recommend &lt;a href=&quot;http://scikit-learn.org/stable/&quot; rel=&quot;noreferrer&quot;&gt;scikit-learn&lt;/a&gt;. It's &lt;a href=&quot;http://scikit-learn.org/stable/testimonials/testimonials.html&quot; rel=&quot;noreferrer&quot;&gt;widely regarded&lt;/a&gt; as an exceptionally good ML library, and the API is very friendly — you can almost treat it as LEGO, and plug together the pieces needed to do your classification/regression/clustering... even without really knowing how each piece works entirely. You can get functional (though not exactly &lt;em&gt;effective&lt;/em&gt;) solutions simply by connecting the appropriate pieces in a pipeline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you wanted to classify some texts, you'd just:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;collect some data&lt;/li&gt;&#xA;&lt;li&gt;setup a &lt;code&gt;Pipeline&lt;/code&gt; of a &lt;code&gt;CountVectorizer&lt;/code&gt; and a classifer such as &lt;code&gt;LinearSVC&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;train it, and then test it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There's an awful lot of stuff included, but then again, all the batteries you'll ever need are included, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For playing with neural networks, &lt;a href=&quot;https://keras.io/&quot; rel=&quot;noreferrer&quot;&gt;Keras&lt;/a&gt; might be worthwhile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, your students may derive some value from implementing the algorithms themselves, at first. The key is to be able to find truly motivating problems:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Struggling with a project you care about will teach you far more than working through any number of set problems. Emotional commitment is a key to achieving mastery. &lt;sup&gt;(&lt;a href=&quot;http://neuralnetworksanddeeplearning.com/exercises_and_problems.html&quot; rel=&quot;noreferrer&quot;&gt;source&lt;/a&gt;)&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's not always easy if you're supervising many students, but it is worthwhile advice to consider.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2018-01-17T20:38:06.570" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4188" PostTypeId="2" ParentId="3907" CreationDate="2018-01-18T16:22:54.167" Score="1" Body="&lt;p&gt;App Inventor syncs with a tablet so that as students change the app's code, it changes the app running on the tab. It can't auto-sync media, so you have to re-sync the app when you add new sound or pics. It syncs via wireless network or usb. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Khan Academy offers this slider concept with its Javascript Animation lessons. &lt;/p&gt;&#xA;" OwnerUserId="1079" LastActivityDate="2018-01-18T16:22:54.167" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4189" PostTypeId="2" ParentId="4177" CreationDate="2018-01-19T07:23:20.670" Score="2" Body="&lt;p&gt;There are a few places C++ (or C, or rust or ...) is more useful than Java[1] because C++ does (what Rust likes to call) &quot;zero cost abstractions&quot;. The idea is that C++ gives you the power to be as low level as you want to get, and at the same time as high level as you want to go.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Real Time&lt;/strong&gt;. Note, I didn't say fast. real-time doesn't always mean fast. Technically, a real-time program could actually be slower than one which is not &quot;real-time&quot;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The main focus of real time is that there should be no pauses longer than X between event firings. So if you have a self-driving car doing something like like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (true){&#xA;    MyType currentPos = getPos();&#xA;    MyType newPos = doCalculationsOnPos(currentPos);&#xA;    adjustWheel(newPos);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You should know for a &lt;em&gt;fact&lt;/em&gt; that you will adjust your steering wheel every X ms or your car can crash. In C++ (and a few other languages, like C, asm, or rust) you can tell during compile time how long will it take to run this loop.&#xA;Now what will happen in Java (a garbage-collected language)?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (true){&#xA;   MyType currentPos = getPos();&#xA;   System.gc();&#xA;   MyType newPos = doCalculationsOnPos(currentPos);&#xA;   System.gc();&#xA;   adjustWheel(newPos);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem here is that you have no idea how long &lt;code&gt;System.gc()&lt;/code&gt; will decide to take. And this isn't just useful in robotics (cars, airplanes, or rockets), it's useful in prosaic cases such as writing a &lt;a href=&quot;https://blog.ntpsec.org/2017/01/18/rust-vs-go.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;time server&lt;/a&gt; [2]. &lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;Interfaceable&lt;/strong&gt; - If you need to write libraries, you'll have to do it in C++ (or C, Rust, Pascal ...). The reason is that, as above, C++ does zero-cost abstractions. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So for example, code like the below can be called like a C function (which is the standard function interface in pretty much all OSs these days) of the same name. So you can use this function in Python, in Rust, C, Java, C#, Go, you name it.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;extern &quot;C&quot;&#xA;int hi(int p){&#xA;    typeO* a = new typeO(p)&#xA;    int returnVal = a.doWork();&#xA;    delete a;&#xA;    return returnVal;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;Low level code&lt;/strong&gt; - In C++ you can control how and where memory is stored - is it stored in the stack or in the heap. How would you write a Java memory allocater when you don't have a heap to put things in?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;[1]. Yes, there are AOT compilers written for Java, and there actually was an &lt;a href=&quot;https://stackoverflow.com/questions/1988196/is-it-possible-to-make-an-operating-system-using-java#1988199&quot;&gt;0OS written in Java&lt;/a&gt;. But you'll need a lot more work bootstrapping the Java environment than a C++ environment. But more importantly, since those solutions are fairly niche (and, at times, not FOSS or even gratis), the community around them is tiny. So, yes, you can compile java to exe (and have been able to do so for a while), but one of the reason that some of the Java community's moved to Go was precisely because Go compiles to a static binary, and the rest were eagerly awaiting AOT compilation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[2]. Yes, he picked Go (which is a GC language), but it can be turned off, turning Go into a real-time language. The thing is that an ntp server needs to be real time for only a short while. If, though, you need it off all the time, Go won't work for you as memory will grow until you clean up garbage, turning off all real-time guarantees. &lt;/p&gt;&#xA;" OwnerUserId="3896" LastEditorUserId="27" LastEditDate="2018-01-19T11:48:52.467" LastActivityDate="2018-01-19T11:48:52.467" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4190" PostTypeId="2" ParentId="4185" CreationDate="2018-01-19T11:45:04.147" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What are some topics (Machine Learning) that could be covered in a year long timespan that could be done by students with a basic understanding of Python and basic statistics (correlation/regression, measures of central tendency, hypothesis testing)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;With regards to Neural Networks the for an introduction, even before specking oneself or doing suggested reading would be to watch the YouTube series of videos &lt;a href=&quot;https://www.youtube.com/watch?v=bxe2T-V8XRs&quot; rel=&quot;nofollow noreferrer&quot;&gt;Neural Networks Demystified&lt;/a&gt;. When I first wanted to learn about Neural Networks I spent a few days combing the Internet and books and once I saw this series I stopped looking. I still get regular YouTube recommendations but this is the best introductory one by far. It is easy to understand, has great visuals, uses Python as an example programming language, is a real world problem, moves seamlessly back and forth between high level concepts and low level details as source code, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next topic(s) are to use the free online book &lt;a href=&quot;http://neuralnetworksanddeeplearning.com/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Neural Networks and Deep Learning&lt;/a&gt; which is often recommended even in the other answer here. You can build a few weeks of the course around just this and it would be worth the effort. This book goes more into the math and explains why certain &lt;a href=&quot;https://en.wikipedia.org/wiki/Activation_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;activation functions&lt;/a&gt; are used. While I am not actively writing Neural Networks at present I do keep my finger on the pulse and one of the more intriguing ideas on the street is that using &lt;a href=&quot;https://en.wikipedia.org/wiki/Rectifier_(neural_networks)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rectified linear unit (ReLU)&lt;/a&gt; are just as effective as the &lt;a href=&quot;https://en.wikipedia.org/wiki/Sigmoid_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sigmoid function&lt;/a&gt;. The beauty of this is that using ReLU doesn't need the use of a floating point processor and so in theory should speed up the processing without sacrificing abilities. So as a set of labs do the book as written, but then try other activation functions and compare the results. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another topic is to run the code using a CPU and then using a GPU and compare the speed. If done correctly the &lt;a href=&quot;http://timdettmers.com/2017/04/09/which-gpu-for-deep-learning/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GPU&lt;/a&gt; will be significantly faster then the CPU. As another option compare those against using a cloud service such as &lt;a href=&quot;https://aws.amazon.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;AWS&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the concepts of Neural Networks are understood at the Python source code level, abstract that away and use &lt;a href=&quot;https://www.tensorflow.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;TensorFlow&lt;/a&gt; which is what Google uses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lastly one topic I am seeing pop up much to often with regards to Neural Networks is for classification how easily they are fooled, e.g. &lt;a href=&quot;https://techxplore.com/news/2018-01-world-toaster-ai.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;When all the world's a toaster, according to tricked AI&lt;/a&gt; After seeing this I wanted to get a sticker and put it on a shirt saying &quot;I am not a toaster&quot; but then forgot that they already have shirts saying I am not a toaster, referring to &lt;a href=&quot;https://en.wikipedia.org/wiki/Cylon_(Battlestar_Galactica)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cylons&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-01-19T11:52:44.487" LastActivityDate="2018-01-19T11:52:44.487" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4192" PostTypeId="2" ParentId="4182" CreationDate="2018-01-19T16:21:47.137" Score="5" Body="&lt;p&gt;The advantages of using VCS from a content-creation point of view are already written about in depth, so I'm providing only arguments for why this is advantageous to you - regardless of how well they utilise it for their own workflow.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Lost work&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If all students are committing their work to a repository you have access to, you will never need to worry about somebody losing their USB and with it - their entire coursework. If the work is stored in the repository, you always have &lt;em&gt;something&lt;/em&gt; that can be salvaged for a hand-in, even at the last minute.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Reduced Plagiarism&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;When marking a single hand-in, you potentially have no history to work from. You are seeing the cleaned up, finished product and hoping that they came to those conclusions themselves. If on the other hand you have their work, as they make it, you can more easily identify &quot;odd&quot; commits where the quality of code has changed dramatically - it is much harder for a student to plagiarise, and much less likely that they will try.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Reduced Last Minute Sprints&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As with the reduction in plagiarism, by having continuous check-ins of their work - you are encouraging them to work on their code throughout the term. Avoiding a last-minute sprint to get the hand-in ready is ideal, and not only will this help encourage them not to do that, it gives you a tool to check they are not getting into that situation before it's too late.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Debugging&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;When a student approaches you with &quot;code that doesn't work&quot;, it can be hard to identify exactly what the cause is. Even if the problem that needs solved is clear - it can be hard to see how they got themselves into that mess. With VCS you now have a tool to check back, ask for their last working commit, and see what they changed/ask them why. It may be clearer why some bad choices were made based on what they already had.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As an aside: &lt;em&gt;using VCS such as git does not mean the students need to know the VCS inside out. A simple cheat-sheet of how to commit, branch and pull is all they really need; anything else can be done with your individual help when needed. Teaching proper use of a VCS is not necessarily required to get a lot of its initial benefits.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="3876" LastActivityDate="2018-01-19T16:21:47.137" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4193" PostTypeId="1" CreationDate="2018-01-19T19:54:49.513" Score="4" ViewCount="279" Body="&lt;p&gt;I'm looking for an activity for highschoolers/college-freshmen that will demonstrate crypto topics (e.g., encryption, signatures, zero-knowledge), and will be fun and motivating. It is supposed consist of small tasks that the audience can do by themselves (=no complicated math).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I vaguely remember seeing a website with suggestions for such activities, but I cannot find any information now. Any suggestions / ideas?&lt;/p&gt;&#xA;" OwnerUserId="4002" LastEditorUserId="124" LastEditDate="2018-03-09T15:56:03.230" LastActivityDate="2018-03-09T15:56:03.230" Title="Popular demonstration of cryptographic tools" Tags="|secondary-education|security|cryptography|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4194" PostTypeId="2" ParentId="4140" CreationDate="2018-01-20T20:58:39.387" Score="1" Body="&lt;p&gt;If you are teaching Java, you need to start with the API guide early and often.  Begin with the method section which answers, &quot;What kind of work can I get an object to do for me?&quot; As we progress through topics such as inheritance and interfaces, we keep going back to the guide and learn how those are reflected in the documentation. An important goal: A student should be able to read most or all of the documentation and use it to solve a programming program by the end of the course.  It is the primo teaching tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students who take Java at NCSSM are generally good Python programmers.  Early in the class we discuss the type system and compare the Javadocs to those of Python as well as comparing the types and how the languages are similar and how they differ (ex: duck vs. static typing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use my own unpublished book for the class because it is uniquely suited to our program and it does not contain the lard, boxes, and nonsense that most committee-written leviathan tomes contain.  It covers quite a bit of material on building GUI applications using the JavaFX8/9 framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We do lots of &quot;live&quot; coding in class. Got a jam?  Use the API guide to figure it out.   We also use Java9's wonderful JShell a lot. It's an amazing teaching tool.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-01-20T20:58:39.387" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4195" PostTypeId="1" AcceptedAnswerId="4196" CreationDate="2018-01-21T16:09:55.437" Score="6" ViewCount="173" Body="&lt;p&gt;There are various websites like &lt;a href=&quot;https://www.codewars.com/&quot; rel=&quot;noreferrer&quot;&gt;codewars&lt;/a&gt; that present programming challenges in various languages and difficulty levels. &#xA;I looked at some of their challenges and they seem to be more creative than me in making good questions. So, I thought of using this website as a source for exam questions in a programming course I am going to teach next semester. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My plan is to tell the students in advance that some (or all) of the exam questions will come from this website, so that they have the entire semester for practicing. Moreover, I plan to tell them that, if they have any difficulty in solving a challenge, or want any feedback on their solution, they can ask me or the other course staff for help during the semester. My hope is that this will encourage them to practice programming in a competitive and fun environment. Do you think this a good plan? Do you have experience using such websites in programming courses?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2021-10-17T17:12:56.177" Title="Using questions from a code-competition website in homework and exams" Tags="|exercises|resource-information|homework|exams|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4196" PostTypeId="2" ParentId="4195" CreationDate="2018-01-21T16:38:38.773" Score="7" Body="&lt;p&gt;Whether this is a good plan or not depends on some things, most especially the nature of your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it seems a bit too unstructured. If you have a general mix of student ability it could cause problems unless you incorporate the questions from the site(s) more formally into your teaching. There are a &lt;em&gt;lot&lt;/em&gt; of questions available, I would guess and some of your students will panic, thinking that (a) they need to do everything or (b) it is hopeless. This is a special problem if these extra questions are above and beyond all necessary assigned work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, one good aspect of your plan is to show them in advance the kinds of things that they will be expected to know and that other students also regularly deal with. Much better that than hiding your intent and springing things on them unexpectedly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I think a better plan is for you to incorporate a sampling of the found questions into your labs and homework assignments. For the most challenging questions you could have five minute brainstorming sessions as part of several class periods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, as part of the regular process it should work out, but if it is completely &quot;extra but not formally rewarded&quot; work it might backfire on you. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;An additional dimension here, of course, is that you could use the site(s) to teach yourself how to ask better questions. And your focus on &quot;creative questions&quot; rather than necessarily &quot;challenging questions&quot; is a good one, I think. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-21T16:38:38.773" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4197" PostTypeId="1" AcceptedAnswerId="4219" CreationDate="2018-01-21T16:55:23.953" Score="88" ViewCount="29755" Body="&lt;p&gt;My 9 year old daughter is heavily interested in science, robots, computers, … She asked me if I could teach her how to program a computer. So, we started with &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer&quot;&gt;Scratch&lt;/a&gt;, a programming language specifically designed for kids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She likes it a lot, and she enjoys getting visual results fast. Now we came to the point that you need a &lt;em&gt;variable&lt;/em&gt;, and I have realized that she has not yet understood what a variable is. Of course, at school, they didn't have the concept of &lt;em&gt;variables&lt;/em&gt; in mathematics yet (mind you, she is 9 years old).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember that when &lt;em&gt;I&lt;/em&gt; learned to program, I was 12 years old, and I had a hard time grasping that, too. Although I'm a professional software developer, and I help other people a lot to learn to program, I find it very difficult to explain it to her in a sense, that she can understand, and that is suitable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course I can say:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's like a box, where you put the number 9 into it. If I ask you how old you are, then you don't say &quot;9&quot;, but you give me the box, and I am going to look it up on my own.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That's an analogy, and she understands it, but it's difficult for her to transfer this idea to Scratch code. It doesn't &lt;em&gt;feel&lt;/em&gt; correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I say&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's just a name for a value, and everywhere where you normally would use the value itself, you can now use the name. This has the big benefit that you can change the value, but keep the name.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;it feels correct, but it's not easy to grasp any more. To cut a long story short: In contrast to a loop (do this and that for a given number of times) or a decision (if X then Y), variables are way more abstract.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how would you explain the concept of a variable to a 9 year old, in a way, that it is easy to grasp &lt;em&gt;AND&lt;/em&gt; correct at the same time, i.e. it has a direct relation to writing code?&lt;/p&gt;&#xA;" OwnerUserId="4017" LastEditorUserId="27" LastEditDate="2018-01-22T17:27:30.513" LastActivityDate="2022-11-16T19:55:05.880" Title="How to explain the concept of a variable to a 9-year old?" Tags="|lesson-ideas|variables|scratch|" AnswerCount="26" CommentCount="15" ContentLicense="CC BY-SA 3.0" />
  <row Id="4198" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T17:04:16.257" Score="26" Body="&lt;p&gt;What about&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;You have alot of values that you need to remember, so you put a label on each one (a little piece of paper to remind you what this value means) so you can find the value easily when you need it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4019" LastActivityDate="2018-01-21T17:04:16.257" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4199" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T17:28:11.540" Score="42" Body="&lt;p&gt;My usual explanation is related to names; specifically names of people. People have names. The names &lt;em&gt;are not&lt;/em&gt; the people, but can be used to refer to the people. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some people don't have any names at all. This is common just after birth at least, before the parents decide on a name. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Names can be changed. A person can have a name for a while and then later have a different name. So, &lt;strong&gt;different names can refer to the same person.&lt;/strong&gt; Similarly we have come to rely on names known to only a few other people. A father might refer to his son as &lt;em&gt;junior&lt;/em&gt; even if their names are not the same. Spouses often call each other &lt;em&gt;honey&lt;/em&gt; without confusion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as important, a name isn't necessarily permanently bound to a thing (person, value, object). A name like &lt;em&gt;Sue&lt;/em&gt; could refer to one person in a given household, but a different person elsewhere. Also, a name like &quot;kiddo&quot; could refer to one child at a given moment, but to a different child, even in the same household, at a slightly later moment. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Different names can refer to the same &quot;object&quot; at the same time. Different variables can reference the same thing at the same time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A given name can refer to different objects, but not simultaneously. &#xA;A variable can refer to one thing one moment but another at a different moment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A given name can refer to a given object in one &quot;place&quot; but a different object in a different place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here &quot;object&quot; just means a value of some kind, not necessarily an object in an OO language. It could even refer to an operation, depending on the language.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A variable, like a name, is an association between a word (more technically a symbol) and a value. Assignments in many languages establish the association. The association is valid in a place (scope) and for a time (duration). &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;However, if your daughter has been studying algebra, you will need to make clear that what a mathematician calls a variable is quite different from what a computer scientist does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In CS, a variable can actually vary, so the term is much closer to the truth. In math, especially algebra, the word variable is often used for an &quot;as yet to be determined&quot; but definite value (or set of values). It doesn't actually vary. Mathematicians also call them &quot;unknowns&quot;, but that just means &quot;not &lt;em&gt;yet&lt;/em&gt; known until we solve this thing&quot; but still, a definite value. In CS, variables have definite but changeable values. They are never &quot;unknown&quot; to the computer, but may be to the programmer who isn't actually tracing the program. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A note on &quot;sameness&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we say $x = 3; y = 3;$ we don't imply that there are two threes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we say $x = 3; ... x = 4;$ we don't imply that three has somehow become four. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first we simply mean that we have two distinct references (names) for 3 and in the second we mean that the (old) reference to 3 is now a reference to something else. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While every experienced programmer understands this, it can become a bottleneck for a novice. Three is three. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-22T14:09:48.390" LastActivityDate="2018-01-22T14:09:48.390" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4200" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T18:31:24.943" Score="6" Body="&lt;p&gt;It might be a bit indirect but around that age I bootstrapped myself from fill in the blank math problems through basic algebra to more generalized variable use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;eg I started with having been given problems like:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;5 + __ = 9, what number goes in the blank?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;From there naming the blank to get to basic algebra problem:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;5 + X = 9, solve for X.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;From there a programming variable just lets you use the same place holder repeatedly.  (While the same is true of variables in math systems of equations, etc are probably a bit too advanced for the average 9 year old.)&lt;/p&gt;&#xA;" OwnerUserId="1411" LastActivityDate="2018-01-21T18:31:24.943" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4201" PostTypeId="2" ParentId="4183" CreationDate="2018-01-21T19:03:19.380" Score="9" Body="&lt;h2&gt;Tl;dr: use python. (Preferably python 3.)&lt;/h2&gt;&#xA;&lt;p&gt;Well, I’m a teenager in your age group, so hopefully I’m some level of qualified to respond.&lt;/p&gt;&#xA;&lt;p&gt;I have to say as a bit of a disclaimer that python is my favorite language but it is in that position for a reason. Scratch is, for me, annoying to write because I can touch type so python is just faster. Further, I actually have always found scratch a bit non intuitive while on the other hand I have always found python incredibly intuitive but also very powerful - it grows in capability along with you.&lt;/p&gt;&#xA;&lt;p&gt;When I first started programming I used khan academy’s introduction to JavaScript, and then at some point I transitioned to python and have used it since. I have never felt either overwhelmed by or limited by python. My next thought would be that as 14/15 year olds, you’re going to have kids with a wider range of abilities and python can handle that better than scratch.&lt;/p&gt;&#xA;&lt;p&gt;There are as has been mentioned many resources for teaching python out there. I’d recommend codecademy for learning and repl.it for personal projects - they can then access their work when the camp is over and it provides autocomplete and other useful features. Another thought - since python has so many packages, maybe let them split up by what they are interested in? Python can do websites, games, scientific programming (math fans can work on the Euler problems), or mod Minecraft. (Scratch, I might point out, is limited to games.)&lt;/p&gt;&#xA;&lt;p&gt;Hope this helps, and I’d be glad to talk with you more about resources, etc.&lt;/p&gt;&#xA;" OwnerUserId="919" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-24T21:09:41.660" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4202" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T19:45:48.983" Score="4" Body="&lt;p&gt;If this child plays Minecraft, you can try the following analogies:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A variable is like a chest with a sign next to it. You can put stuff into a chest (assignment). This &quot;stuff&quot; in the chest is the value of the variable.&lt;/li&gt;&#xA;&lt;li&gt;A function is like a workbench, which transforms inputs (like wood) into the result (like wood planks in Minecraft).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It is also helpful to explain to the child that the assignment operator (&lt;code&gt;=&lt;/code&gt;) is better represented by an arrow (&lt;code&gt;&amp;lt;-&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then it becomes more logical:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var chest;&#xA;&#xA;chest = &quot;some value&quot;; // chest &amp;lt;- &quot;some value&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A completely different strategy would be to learn the assignment construct by heart. Of course, she should only learn the &lt;strong&gt;building blocks&lt;/strong&gt; (e. g. the syntax and meaning of assignment to a variable) of programming by heart, NOT the solutions. You can add an &lt;a href=&quot;https://apps.ankiweb.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Anki&lt;/a&gt; card with the following contents:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question: If you execute the statement&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var chest = &quot;bla&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;what will chest contain thereafter?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answer: Text (string) &quot;bla&quot;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Finally, repetition is your friend. My child started to understand these concepts after we've done several algorithm lessons on &lt;a href=&quot;https://www.freecodecamp.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;FreeCodeCamp&lt;/a&gt;. I cannot remember how often I repeated the concept of assignment to my child (always in a different programming problem) until he started to understand it.&lt;/p&gt;&#xA;" OwnerUserId="4022" LastActivityDate="2018-01-21T19:45:48.983" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4203" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T19:46:17.127" Score="6" Body="&lt;p&gt;If I remember correctly, Scratch has two kinds of variables - object-bound and global. When teaching my son about Scratch, at the time of introducing variables I told him he had been working with object variables/properties the whole time: the &lt;em&gt;position&lt;/em&gt; &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; (and to a lesser extent the object sprite/appearance (not sure what it is called in the English version of Scratch)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there it was easy to introduce more (custom) variables as more properties of the corresponding character - whether the monster is alive or not, how much energy it has, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general concept of variable (not bound to a specific object) can follow later: instead of &quot;something we know about an object&quot;, talk of &quot;something we know&quot;.&lt;/p&gt;&#xA;" OwnerUserId="4023" LastEditorUserId="2641" LastEditDate="2018-01-24T02:46:07.833" LastActivityDate="2018-01-24T02:46:07.833" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4204" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T20:09:46.943" Score="1" Body="&lt;p&gt;I'm not sure there's a &quot;magic&quot; explanation you can give her such that she will achieve &quot;crystal clarity.&quot;  I think with most people, and especially with kids, you need to demonstrate this and then &quot;let it sink in.&quot;  One of the first programs I wrote (guided by my then much older IBM 370 systems programmer brother-in-law) specifically to learn what variables are and how they are used computed Fibonacci numbers.  I think we used Fortran back then.  You get the idea though.... you have a 3 variables, sum, num1 and num2.  You know the rest...  Get your daughter to write a program that does that.  Even help her write it.  A lot.  Just involve her in the writing and show her how it dumps out:0, 1, 1, 2, 3, 5, 8, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will sink in.&lt;/p&gt;&#xA;" OwnerUserId="4024" LastActivityDate="2018-01-21T20:09:46.943" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4205" PostTypeId="2" ParentId="4197" CreationDate="2018-01-21T22:17:39.067" Score="2" Body="&lt;p&gt;A variable is just a box you put something in. And, if later you decide you want to put something different in the box, you can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I use this analogy is quite simple. As I explained to my daughter; the box doesn't change, only the contents. Further, the contents only change if and when you decide they should. I was going to expand the idea to take in constants (i.e, a box which can never be opened) but drove myself round the twist trying to figure out how the stuff got into the box in the first place! &lt;/p&gt;&#xA;" OwnerDisplayName="user4027" LastEditorUserId="-1" LastEditDate="2018-01-22T18:49:10.717" LastActivityDate="2018-01-22T18:49:10.717" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4206" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T00:52:57.203" Score="2" Body="&lt;p&gt;The box analogy seems good to me. If you want to continue the programming &quot;language&quot; analogy, variables are pronouns. In English, we rely on people using context to figure out what a pronoun refers to, but in programming we explicitly tell the computer what the pronoun refers to. You could have variable names like &quot;it&quot;, &quot;that&quot;, &quot;the_thing&quot;, &quot;the_other_thing&quot; to reinforce that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something else to consider is to ask her how to do something. &quot;Play dumb&quot;, so she has to be &lt;em&gt;really&lt;/em&gt; explicit. If you choose the task well, she will repeatedly say things like &quot;Take the thing that you got in step 4 and ...&quot; This will then lead to the concept of &quot;What if we could just use some short name, instead of having to say 'the thing you got in step 4' each time?&quot;&lt;/p&gt;&#xA;" OwnerUserId="3225" LastActivityDate="2018-01-22T00:52:57.203" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4207" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T01:06:21.983" Score="11" Body="&lt;p&gt;Memory is a linear sequence of storage locations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like a lined sheet of paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a lined sheet of paper and choose a line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the left margin, write a label.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The variable is that label - it gives a name to a spot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now look for the label and write something to the right of the margin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is assignment.&lt;/p&gt;&#xA;" OwnerUserId="4030" LastEditorUserId="4030" LastEditDate="2018-01-22T01:23:40.540" LastActivityDate="2018-01-22T01:23:40.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4208" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T01:20:51.927" Score="2" Body="&lt;p&gt;In Python, Java, or JavaScript, I talk about the type system as an ecosystem of different species of smart data.  Objects are self-aware chunks of memory to which you can send messages and which can do work for you.  I will frame this discussion in JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example in Node&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; console.log(&quot;foo&quot;.length);&#xA;3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;As you know, it rapidly becomes tedious to do this with literals.  That's when we do this.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; var x = &quot;foo&quot;;&#xA;&amp;gt; x.length&#xA;3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The variable is like a phone number. It gives you a means by which you can communicate with its object.  Assignment binds an object to a &quot;phone number.&quot;  On a deeper level, a variable knows WHERE its object is in memory and knows how to find it.  Hey, that's like your phone. If you get on an airplane and fly to Des Moines, your mother can still dial the number and ring you even though you have moved.  The key idea: A variable knows how to find its object.  This is my initial explanation before  I get into complexities such as scope.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-01-22T01:20:51.927" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4209" PostTypeId="2" ParentId="4183" CreationDate="2018-01-22T01:44:35.213" Score="0" Body="&lt;p&gt;Another possibility (if you have the money) would be something like Lego Mindstorms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Unlike straight Python, your program actually &quot;does&quot; something. You can make your robot throw objects into a basket, or follow a line (self-driving car), or respond to light sensors.&lt;/li&gt;&#xA;&lt;li&gt;You can start with a GUI programming language (&lt;a href=&quot;https://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#Programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;NXT-g&lt;/a&gt;) and when they get the basics, move them to a &quot;real&quot; language (such as C, Java, or even &lt;a href=&quot;https://code.google.com/archive/p/pynxc/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can probably do much of the same with a Raspberry Pi, but you'll have to take care of the wiring, motors, and sensors yourself. You may also not find a good block programming language for the RasPi.&lt;/p&gt;&#xA;" OwnerUserId="3896" LastActivityDate="2018-01-22T01:44:35.213" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4210" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T02:52:49.720" Score="-4" Body="&lt;p&gt;First explain the kid meaning of variable as something that keeps changing (like weather). Then he will get idea about the word and then tell him, in CS how we assign a value to the variable and how we are able to change it afterwords&lt;/p&gt;&#xA;" OwnerUserId="4031" LastActivityDate="2018-01-22T02:52:49.720" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4211" PostTypeId="1" CreationDate="2018-01-22T04:21:38.893" Score="16" ViewCount="1109" Body="&lt;p&gt;In the 80s, it was common for CS students (and anyone wanting to do &quot;real&quot; programming) to learn assembly. After all, if you needed speed, hardware access (including direct output to monitor) or working on low powered hardware, you needed Assembly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But nowadays, in 2018, assembly is pretty much useless except to bootstrap an OS or for compilers (and even that isn't as important as it used to be since LLVM took off).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So is there still a use in programming Assembly?&lt;/p&gt;&#xA;" OwnerUserId="3896" LastEditorUserId="2" LastEditDate="2018-01-22T16:58:24.320" LastActivityDate="2018-03-20T15:08:47.100" Title="Is it worthwhile to teach assembly nowadays?" Tags="|assembly|" AnswerCount="8" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4212" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T05:49:43.020" Score="-3" Body="&lt;p&gt;For a nine year old, you can say that a variable is a &quot;change item&quot;, such as weather in the environment. &#xA;On the other hand, if it proves too challenging to explain it, you can kindly postpone this subject until she is old enough to appreciate it. Bear in mind that kids at this age are not very good in abstract thinking. Try again when she is about 12-13.&lt;/p&gt;&#xA;" OwnerUserId="4035" LastActivityDate="2018-01-22T05:49:43.020" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4213" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T05:53:03.120" Score="7" Body="&lt;p&gt;I just saw &lt;a href=&quot;https://cseducators.stackexchange.com/a/4199/4036&quot;&gt;Buffy's answer&lt;/a&gt; so all credits to @Buffy and though I could simplify it with one word in a way that 9 year old me would have understood.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Although bear in mind I was also mucking around with Visual Basic 6 at 9 years old so this could also be very inaccurate &amp;amp; harder to grasp)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A nickname.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x = &quot;the name of the program in scratch&quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;x is the nickname of what you're making in scratch&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A way to implement this (not sure if possible in Scratch as I've never used it):&#xA;Make X the title of the application/game/program and tell her to change the program's nickname (x) and then the programs full name/first name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might also help to explain the possibility of errors (if any are possible), example being, rename the x variable where it's defined, but not referenced, then watch the errors pop up for unknown variable 'x' because you &quot;changed the 'nickname' without telling anyone&quot;&lt;/p&gt;&#xA;" OwnerUserId="4036" LastEditorUserId="4036" LastEditDate="2018-01-23T05:20:43.563" LastActivityDate="2018-01-23T05:20:43.563" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4214" PostTypeId="2" ParentId="4211" CreationDate="2018-01-22T07:07:52.057" Score="20" Body="&lt;p&gt;I think so, yes. However, I also believe teaching assembly isn't valuable because it could hypothetically teach students how to write &quot;faster programs&quot; -- compilers these days are smart enough that most of the time, you're just better off using a systems language and relying on the compiler if you're interested in that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather, I believe the value in teaching assembly (and systems in general) is it gives the students a much deeper understanding of how computers work, which is highly valuable if they want to move on to other subfields of computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, suppose a student is interested in exploring security. If they want to learn how things like buffer overflows work, what ASLR is, be able to understand the latest innovations in kernel research, how whatever the vulnerability-of-the-day works (right now, it seems to be Spectre and Meltdown), it's essential they have a good understanding of how exactly their computer, the hardware, the OS &lt;em&gt;ticks&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching assembly (and more importantly, things like calling conventions, the stack vs the heap, and so forth) is a pretty decent stepping stone to help prepare students travel down this path. Of course, I'm not claiming teaching assembly is the &lt;em&gt;only&lt;/em&gt; way, but it's certainly a well-trodden and popular route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can do the same kind of analysis for other fields -- systems knowledge is potentially valuable for people interested in compilers/PL research, in software validation and correctness analysis research, for people who want to build on top of new tools like Webassembly, for people who are interested in writing hardware accelerated code (using GPUs, FPGAs, SIMD instructions, etc)...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, not everybody is going to be interested in these fields, and even if they are, that doesn't necessarily mean that assembly is going to be directly useful or relevant to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I don't think that's any excuse not to teach the material -- the goal of teaching, I believe, is to prepare students to be successful in a wide variety of different fields, whether that's industry, research, or something else. And if that means sometimes teaching them material that they won't directly need for the foreseeable future, I think that's fine. It's better to be over-prepared then under-prepared, yeah?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;: having systems knowledge is useful. And if you're going to teach systems, I would imagine that you're basically obligated to teach at least some assembly. &lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2018-03-20T15:08:47.100" LastActivityDate="2018-03-20T15:08:47.100" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4216" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T11:07:35.777" Score="3" Body="&lt;p&gt;On Steam is the game &lt;a href=&quot;http://store.steampowered.com/app/375820/Human_Resource_Machine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;.  While it is a game it is played using simple programming commands as blocks like Scratch, has an input and output conveyor and several places to hold intermediate calculations or values, think variables. Latter in the game you can even name the locations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While some of the problems are too hard for someone 9 years old, the upside of the game is that it gives you a visual representation to the abstract concept of a variable. It also has a character that moves the boxes around and performs simple operations such as add based on the commands. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As such when I read your question what I see as the true question is how do I get a 9 year old to understand a variable as an abstract concept. The game gives helps in that it gives the player a concrete and visual representation of a variable as something concrete being interacted with the game character. Once the player understands what a variable is, they can abstract that away in the way professional programmers do with many concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I would not consider a variable as the first abstract concept a child learns but the concept of words and numbers. The words are typically one word to one concrete item. A number is one value to a count of concrete items. A number can also be a way to give a unique name to group of similar items. A variable in one of its simplest is one word to one item that has similar properties or relationships but that can be replaced as time progresses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I introduce variables I state that a variable has a name but in some languages also has a type. So in teaching variables it can help to also introduce the concept of type.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-01-23T14:02:34.727" LastActivityDate="2018-01-23T14:02:34.727" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4217" PostTypeId="2" ParentId="4211" CreationDate="2018-01-22T11:37:30.037" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it worthwhile to teach assembly nowadays?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are trying to write a compiler that compiles down to machine code, write a device driver, do a crash dump analysis, debug a program running as machine code, do computer forensics, be a white hat hacker, etc., then you need to learn assembly programming and thus it still needs to be taught. &lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2018-01-22T11:37:30.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4218" PostTypeId="2" ParentId="4211" CreationDate="2018-01-22T12:44:41.490" Score="7" Body="&lt;p&gt;It may not be as essential today to teach &lt;em&gt;a particular&lt;/em&gt; assembly language to students. It certainly isn't necessary for them to learn assembly language early in their education, especially first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, every person who wants a solid understanding of computing needs to know at least the principles of assembly language and its components: registers, memory, busses...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is even necessary to know something of the even lower level things on which assembly language is built: transistors, gates, adders, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason that this is essential is that computing is built on a layered architecture of abstractions and not understanding this is crippling - even to a programmer writing relatively pedestrian application. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my view, however, the education should start at a relatively high level of abstraction, such as (for example only) object oriented or functional programming and then work from there. Mostly the programmer works upwards from the abstractions defined in a language and its libraries, but to really understand what is going on and to appreciate why the yet higher levels we build are based on the lower levels it is necessary to know at least fundamentals of the entire abstraction &quot;stack&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes, as in writing compilers or device drivers it is necessary for the programmer to work downwards, of course, but even when the individual doesn't need to do that, the tricks and techniques used to build higher and higher are useful to know so that you can fall back on older techniques when hard problems are encountered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &lt;em&gt;real&lt;/em&gt; assembly language is messy. You needn't burden every student with all of the details in order to convey (and practice with) the essentials. When I taught compilers, the students compiled a high level language against an abstract (defined by me) assembly language level. That level was itself built on lower levels that the students (most of them) didn't need to explore in detail as their target level was sufficiently &lt;em&gt;low&lt;/em&gt; for them to practice with registers, jump-logic, memory fetching, etc. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-22T12:44:41.490" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4219" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T14:01:03.363" Score="97" Body="&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4199/1091&quot;&gt;Buffy's lovely answer&lt;/a&gt; shows well how two variables can refer to the same thing, but since we are in early cognitive development and working with Scratch, in which you can't pass parameters, and can't arrange for two different names to refer to the same instance/spawn, I wouldn't focus my efforts on that point yet.  What matters is the idea of a holding place and mutability.&lt;/p&gt;&#xA;&lt;p&gt;These concepts are hard to describe in a way that a 9-year-old would already know how to mentally model, but one very similar idea with which they are already familiar is the idea of a &amp;quot;role&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;em&gt;President of the United States&lt;/em&gt; is currently Joe Biden.  (You should substitute the head executive leader of whatever country your child lives in for this example.)  But a few years ago, it was Donald Trump.  Later, it could be Donald Trump again, or someone else entirely.  When important things need to go to the president, they go to whoever is the president &lt;em&gt;right now&lt;/em&gt;.  They don't go to Donald Trump any more, and some day, they will no longer go to Joe Biden.  But they always go to the President.&lt;/p&gt;&#xA;&lt;p&gt;So, to put this into Scratch, we can make a String in scratch called &lt;code&gt;President&lt;/code&gt;, and then we can use the &lt;code&gt;set&lt;/code&gt; box to &lt;code&gt;set President to &amp;quot;Joe Biden&amp;quot;&lt;/code&gt;.  We can then make an item in the main field that behaves as a button, that changes that variable to &lt;em&gt;&lt;code&gt;[insert your child's name here]&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now, we can create another value, called &lt;code&gt;x&lt;/code&gt;, and set that to a zero.  Now, when you press the button, &lt;code&gt;change x by 4&lt;/code&gt;, and we can watch the variables change.  Press the button 10 times, and the value becomes &lt;code&gt;40&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, what can we say about &lt;code&gt;x&lt;/code&gt;?  Sometimes we say that &lt;code&gt;x&lt;/code&gt; is 40, but is it really?  Or does it just &lt;em&gt;hold&lt;/em&gt; 40?&lt;/p&gt;&#xA;&lt;p&gt;This is the most important &lt;em&gt;early understanding&lt;/em&gt; to arrive at when describing a variable.  When we say that &lt;code&gt;x&lt;/code&gt; is 40, what we really mean is that &lt;code&gt;x&lt;/code&gt; &lt;em&gt;holds&lt;/em&gt; 40.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-11-16T19:55:05.880" LastActivityDate="2022-11-16T19:55:05.880" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="4220" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T14:24:39.977" Score="1" Body="&lt;p&gt;I remembered an exercise for children in the Etoys-System I read about some time ago.  It does that not by explaining what a variable is but by introducing the need for variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the exercise children create a car in the Etoys-System (it's based on Squeak) that can drive around on the screen.  They also create a steering wheel which can be used to steer the car.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This demostrates the need for variables because the facing of the wheel is connected to the facing of the car.  It connects two properties of the micro-world without specifying what the value of the properties is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find the paper with the exercise at &lt;a href=&quot;http://vpri.org/pdf/rn2005001_learning.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://vpri.org/pdf/rn2005001_learning.pdf&lt;/a&gt; says it is a good way to teach about variables. The exercise is on page 2.&lt;/p&gt;&#xA;" OwnerUserId="4051" LastActivityDate="2018-01-22T14:24:39.977" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4221" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T14:40:55.563" Score="15" Body="&lt;p&gt;The variable that children are most familiar with is &lt;em&gt;score&lt;/em&gt;: whether in computer games, sports or board games, a child will almost certainly understand that a &lt;em&gt;score&lt;/em&gt; is a value that is clearly not constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Variables are abstract, but using familiar examples turns this into something easy to grasp.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once numeric variables are understood, you can extend the metaphor to cover string variables in a related example, e.g. the &lt;em&gt;word to guess&lt;/em&gt; or the &lt;em&gt;player's name&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4041" LastEditorUserId="4041" LastEditDate="2018-01-22T14:50:00.637" LastActivityDate="2018-01-22T14:50:00.637" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4222" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T14:53:52.203" Score="1" Body="&lt;p&gt;I would use integer math. On a sheet of paper, set up a small arithmetic table with three columns marked X, Y and 10. Include a '+' between X &amp;amp; Y and an '=' between Y &amp;amp; 10. Fill in 10 down the rows, and start by plugging figures into the X &amp;amp; Y. So, row 1 will have 1 for X and 9 for Y, row 2 will have 2 for X and 8 for Y etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have your daughter fill in the information for the rest of the rows and then point out that X and Y are the variables - because their values can &lt;em&gt;vary&lt;/em&gt; - and can have a range of answers that are all correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will not only point out the variable concept, but also help out when they throw algebra at her at school in a few years.&lt;/p&gt;&#xA;" OwnerUserId="4039" LastActivityDate="2018-01-22T14:53:52.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4223" PostTypeId="2" ParentId="4193" CreationDate="2018-01-22T15:12:47.060" Score="1" Body="&lt;p&gt;There are some engaging lessons on encryption in Unit 4 of the AP Computer Science Principles curriculum from Code.org.  Lessons 5, 6 &amp;amp; 7 take students from the concept of encryption using a caesar cypher, to a vigenere cypher, and then through the concepts of public key encryption.  Students usually have fun with the widgets that interactively demonstrate the caesar cypher (&lt;a href=&quot;https://studio.code.org/s/csp4/stage/5/puzzle/2&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://studio.code.org/s/csp4/stage/5/puzzle/2&lt;/a&gt; ) and vigenere cypher (&lt;a href=&quot;https://studio.code.org/s/csp4/stage/6/puzzle/2&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://studio.code.org/s/csp4/stage/6/puzzle/2&lt;/a&gt; ).  There are lesson plans with student worksheets and videos that support and extend the ideas the students are exposed to when they play with the widgets (&lt;a href=&quot;https://curriculum.code.org/csp/unit4/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://curriculum.code.org/csp/unit4/&lt;/a&gt; ). The materials are free to access.  &lt;/p&gt;&#xA;" OwnerUserId="3112" LastEditorUserId="3112" LastEditDate="2018-01-23T16:47:15.213" LastActivityDate="2018-01-23T16:47:15.213" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4224" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T15:58:27.453" Score="3" Body="&lt;p&gt;Honestly all these analogies are extremely confusing. The box analogy was the best. I would just add to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have a box that has its entrance restricted like those block match toys for babies (to match shapes - for example they only take circles, or stars, etc). Some boxes only take stars (int), squares (string) etc. The box is small and only has enough space to fit one shape. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But your box has certain properties. The bottom of the box has a one of these restricted opening to allow blocks to be pushed out the other side. So because the box is small, if you try to push another star into the box when there is already a star in there, it pushes the old one out and then only the new one is inside. This handles the idea of replacing values. And then of course types are explicit. If you try to put another shape into the box it wont fit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you want to use the item you stored away in the box, you tell your program (assistant) to go fetch the box from the closet and bring it back to you so you can see what's inside. If you don't use the box as storage your program (assistant) is kind of forgetful (really old assistant) and may misplace the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this is why you store important things you want to remember inside the boxes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that covers all the bases. That is how I would explain variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems like a very straightforward analogy. There is no abstraction which means even a kid can understand it in terms of real physical things. Children tend to have issues understanding abstraction, which is why algebra is generally left for when their brains are more developed. So this real world simple comparison should be understandable.&lt;/p&gt;&#xA;" OwnerUserId="4068" LastEditorUserId="4068" LastEditDate="2018-01-22T19:15:55.473" LastActivityDate="2018-01-22T19:15:55.473" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4225" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T16:01:50.977" Score="-2" Body="&lt;p&gt;The issue is that a variable is not just one thing -- it can do a variety of things -- and also, that &lt;em&gt;variables do not exist in nature&lt;/em&gt;. Nothing else in a person's experience behaves in all of the ways that a variable can. So, you need a ramp that begins simply and describes the various variations of variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Early computers did not have any programming, they were circuits connected by cables. If you wanted a push-button to affect the computer, you used a wire to connect the push-button to a circuit. When Binary Coding came along, you could get the input from the button by reading a value from a numbered memory address. Assembly language allowed you to give that address a name. You could call it ButtonValue or something, and just test it with an IF statement. But you could also define another variable, like Input1, and put the value in there, along with some other input values and then feed that to some code you wrote. Now we have the idea of named locations, and assignment. Good, but not nearly far enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A collection of similar variables can be put together in an Array, and then a variable used to index through the array. Any child should understand that, because they have all stood in line and called out numbers one by one. Finally, there is the idea of indirection, that a variable can decide which variable to refer to. I could have a variable called Greeting, and based on the current time, put one of three other variables in it, holding values like: &quot;Good morning&quot;, &quot;Good afternoon&quot; and &quot;Good Evening&quot;. Add a variable for the student's name and this program will be able to greet anyone at any time. We used variables so that the strings (Good Morning, etc) can be easily changed, possibly at the direction of a variable called Language...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing else in the world works that way, but with these simple examples, it should be clear to any nine year old. The problem then will be keeping them off the computer. I spent a lot of hours writing programs to output geometric figures in text on a PDP-11 terminal.&lt;/p&gt;&#xA;" OwnerUserId="4069" LastEditorUserId="58" LastEditDate="2018-01-22T16:37:03.907" LastActivityDate="2018-01-22T16:37:03.907" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4226" PostTypeId="2" ParentId="4185" CreationDate="2018-01-22T16:27:22.083" Score="1" Body="&lt;p&gt;I think one of the easiest ML algorithms to understand is &lt;a href=&quot;https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;K-Nearest Neighbors&lt;/a&gt; (KNN). We do a KNN project in my data structures class in the first week of school so that they can refresh their skills from AP CS and demystify ML a little bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I like about KNN is that it's conceptually easy to understand for high school students (I showcased it at Open House to the parents), it works for both classification and regression, and has its advantages and disadvantages. It's one of my favorite projects we do all year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be happy to chat offline if you want some specifics. &lt;/p&gt;&#xA;" OwnerUserId="1743" LastActivityDate="2018-01-22T16:27:22.083" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4227" PostTypeId="2" ParentId="410" CreationDate="2018-01-22T17:20:04.910" Score="4" Body="&lt;p&gt;Have you considered using a microcontroller assembly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first CPU design and assembly course, which also combined both courses, was based on the PIC microcontroller. We studied the 8-bit variant, which has a relatively simple architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It has slightly more registers than the 6502; you can say 8 registers with the 16-bit registers like PC spilt into two 8-bit registers. However, it also has embedded RAM and ROM so you can teach them about memory access if you find that useful. It also has fewer instructions (33). In addition, it is still used a lot in the real world, so they can possibly buy a cheap development kit and play around with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a guide to the PIC assembler:&#xA;&lt;a href=&quot;http://ww1.microchip.com/downloads/en/DeviceDoc/33014K.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://ww1.microchip.com/downloads/en/DeviceDoc/33014K.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3982" LastActivityDate="2018-01-22T17:20:04.910" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4228" PostTypeId="2" ParentId="4211" CreationDate="2018-01-22T17:57:22.603" Score="6" Body="&lt;p&gt;It depends on the level you're teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You certainly don't need to introduce assembly language in the first year, and you certainly don't need it to &quot;get stuff done&quot; or to make a &quot;real&quot; application. You can put together a website, a server, an Android app, dabble in robotics and artificial intelligence, all without knowing a thing about assembly language. So do you &lt;strong&gt;need&lt;/strong&gt; assembly language? No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But advanced students (at the university level) should have the &lt;strong&gt;option&lt;/strong&gt; of learning more about assembly language if they're curious. The other answers do a good job of outlining &lt;strong&gt;why&lt;/strong&gt; they should be curious. But I don't think it should be a requirement. I've had a pretty good software engineering career, and I don't think I've ever had to know anything about assembly language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; Offer it as an elective and see how many students are curious.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-01-23T21:10:25.513" LastActivityDate="2018-01-23T21:10:25.513" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4229" PostTypeId="2" ParentId="4197" CreationDate="2018-01-22T22:28:04.200" Score="2" Body="&lt;p&gt;I find the &quot;box&quot; aspect is far more important than the named aspect.  Maybe it's personal bias.  However, we can combine the two: it's a &lt;em&gt;named&lt;/em&gt; box.  So you can say &quot;Go look in the 'object color' box.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're working with pure data (no objects), it may be effective to set up a white board, and mask off a few &quot;boxes.&quot;  Each box gets a name like &quot;number of chores done today.&quot;  Concepts like &quot;Add 1 to the number of chores done today&quot; start to become really meaningful that way!  And it just so happens that the word for these spaces on the whiteboard is &quot;box,&quot; which is similar to the 3d boxes you might put objects in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better, it puts her in an excellent position to deal with the nuanced behavior of reference mechanics when she gets there.  If you're used to thinking of variables as spaces on a whiteboard, writing &lt;em&gt;references&lt;/em&gt; to objects, like referencing the members of your family by name, is easier.  For many people, the jump to reference mechanics is a real struggle because they got used to the idea of &quot;x is my bear, that's in a box on the shelf&quot; rather than &quot;x is a variable referencing my bear.  Y also references the same bear.&quot;  (I personally have struggled to help people with reference mechanics because it forces them to unlearn whatever models they used up to that point, and unlearning is hard)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even use different color markers for references and data.  That starts to get them used to the idea that there is &lt;em&gt;some&lt;/em&gt; fundamental difference between the word &quot;dad&quot; and a reference to Golo Roden.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2018-01-22T22:28:04.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4230" PostTypeId="2" ParentId="4183" CreationDate="2018-01-22T22:28:10.247" Score="4" Body="&lt;p&gt;Here's an unlikely answer: &lt;strong&gt;Teach them C.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're correct, Scratch will be a turn-off to an average 14 year old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mid-teens dislike things that seem fake and/or useless, and have a strong aversions to things seemingly geared toward younger children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Python is probably an OK option... but I believe Python is a little too high level, using concepts that may seem very abstract to a beginner.&#xA;A small line of python can contain a lot of abstract concepts that aren't easily met by the early-teen brain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't get me wrong, I love Python.&lt;br&gt;&#xA;But I already know what a pointer is, I know what variables are, arrays, classes, etc.&lt;br&gt;&#xA;If I did not, I would appreciate a language that didn't gloss over &lt;em&gt;everything&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching fundamentals, the number of lines of code is secondary to the ability to understand and illustrate concepts core to your curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;C is one of the most fundamental languages, and learning C will give you a solid understanding of the basics.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer to begin with something real, but simple. Not simple in the sense that we are constructing programs with colorful shapes, stacks of cards, or a friendly caterpillar, but simple in the sense that on the surface we have 32 keywords, and everything is built on that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching a young teen, here are some key factors I found helpful:&#xA;1. Teach them something that is real, clearly not just a toy.&lt;br&gt;&#xA;2. Keep concepts granular.&lt;br&gt;&#xA;3. Allow them to stretch and delve deeper than the standard lesson (often giving a student the ability to leap a distance ahead will keep them engaged while other students maintain standard progress)&lt;br&gt;&#xA;4. Give them a simple, light-weight, environment to work in. Easy to set up, and easy to get going.&lt;br&gt;&#xA;&lt;br&gt;&#xA;Back in the stone age, when I was learning programming. I took my floppy disk with QBasic everywhere I went. Portability was a big reason I stayed plugged in. QBasic allowed me to get going quickly, learning at a pace that my appetite set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today, I would recommend something like &lt;a href=&quot;http://www.codeblocks.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code::Blocks&lt;/a&gt;. Lightweight, easy to get started and installed, and you can start with C.&lt;br&gt;&#xA;Don't want to install anything? Try &lt;a href=&quot;http://www.learn-c.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learn-C.org&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C is a great language to start learning with.&lt;br&gt;&#xA;You can begin with simple concepts, simple operators, simple variables, types.&lt;br&gt;&#xA;Then dive into arrays, and you'll quickly find that the topic of arrays is a big concept for a 14 year old mind.&lt;br&gt;&#xA;Loops and functions, function recursion, etc.&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C is an excellent first language for teens, and perfect for an introductory programming course.&lt;/p&gt;&#xA;" OwnerUserId="4082" LastEditorUserId="4082" LastEditDate="2018-01-30T12:40:35.260" LastActivityDate="2018-01-30T12:40:35.260" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="4231" PostTypeId="2" ParentId="4211" CreationDate="2018-01-23T05:53:38.933" Score="7" Body="&lt;p&gt;I may be biased by being a computer architect, but I would not consider a Computer Science education complete without knowledge of what a computer actually is. This includes having a general idea about all the levels, from the logic gate up through assembler, OS, compiler, to the application programming. It doesn't have to be deep knowledge and it doesn't have to be a real assembly language (although IME real languages tend to have better supported tools and feel more &quot;useful&quot; to students), but after graduating the students should have a better answer to &quot;how did we make rocks &lt;em&gt;think&lt;/em&gt;???&quot; than &quot;¯\_(ツ)_/¯ magic&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, not all education is a 4-year CS degree. For more specialized courses, like 2-year vocational programming degrees, it often won't make sense to include. You won't be able to teach how compilers work effectively without some basic assembly knowledge, but an application developer doesn't need to know that, they just need some general idea of what type of operation is fast and what is slow. A web developer has no need for assembly whatsoever.&lt;/p&gt;&#xA;" OwnerUserId="2157" LastActivityDate="2018-01-23T05:53:38.933" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4232" PostTypeId="1" CreationDate="2018-01-23T08:32:09.413" Score="5" ViewCount="196" Body="&lt;p&gt;I'm currently preparing a unit on the implementation of hash tables for a data structures and algorithms course (this is a university-level class if it matters).&lt;/p&gt;&#xA;&lt;p&gt;Specifically, I'm focusing on preparing a lecture on different collision resolution strategies, focusing mainly on separate chaining, linear probing, quadratic probing, and double hashing.&lt;/p&gt;&#xA;&lt;p&gt;My question is this: &lt;strong&gt;why do we teach quadratic probing at all?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I initially added quadratic probing to my todo list mainly because previous instructors of my course taught it and because it's listed in several textbooks I consulted (&lt;em&gt;Data Structures and Algorithm Analysis in Java&lt;/em&gt; by Weiss, and &lt;em&gt;Introduction to Algorithms&lt;/em&gt; by Cormen, et. al.)&lt;/p&gt;&#xA;&lt;p&gt;However, I'm not really seeing the pedagogical value of doing so. While it's true that it does offer some minor theoretical speedups over linear probing which I suppose might be interesting to discuss, I don't think those speedups are actually &amp;quot;good enough&amp;quot; to be used in the wild (especially once you take into account things like cache locality, which can sometimes make linear probing surprisingly competitive).&lt;/p&gt;&#xA;&lt;p&gt;Based on my (admitted informal and ad-hoc) survey of hash table implementations in popular programming languages, people seem to either use separate chaining (Java and C# (sort of)), double hashing (GCC's C++ stdlib implementation), or a linear congruential PRNG (Python).&lt;/p&gt;&#xA;&lt;p&gt;In that case, is it worth bringing it up at all? I wouldn't mind covering it if I could use it as a vehicle to teach some more general CS concept in some way, or if it had interesting theoretical properties worth exploring, even if only briefly, but at the moment, it just doesn't seem worth the class time.&lt;/p&gt;&#xA;&lt;p&gt;I suppose at best, I could use it as a stepping stone to bridge the gap between linear probing and some slightly more complicated technique, such as double hashing, but that's all I can think of.&lt;/p&gt;&#xA;&lt;p&gt;Is there something I'm missing?&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="9154" LastEditDate="2021-08-08T14:34:05.983" LastActivityDate="2021-08-08T14:34:05.983" Title="Is there any pedagogically motivated reason to teach quadratic probing?" Tags="|lesson-ideas|algorithms|data-structure|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4233" PostTypeId="2" ParentId="4232" CreationDate="2018-01-23T12:13:53.150" Score="4" Body="&lt;p&gt;Yes, you should at least introduce the idea to your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, it is also a truism of education that you need not explain every concept at the same level of detail. In this particular case the first couple of paragraphs of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Quadratic_probing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt; article on the subject is probably enough. A couple of minutes could be well-spent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students need to know that there are a range of solutions to any given problem and that those possible solutions have trade-offs. This is an excellent opportunity to stress that. Linear probing creates bottlenecks in some situations (poor hash functions for example). That can be a problem. Quadratic probing, while more complex, does a bit better. It might be easier to implement than trying to guarantee better hashes over which the programmer may have less control. Even if that particular solution is never used by your students they will encounter such choices in the future. Help them get ready for it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By pure serendipity, Eugene Wallingford's blog post just yesterday discusses a related topic. &lt;a href=&quot;http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2018-01.html#e2018-01-22T15_50_37.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blog: Jan22-2018, &quot;Same Footage, Different Film&quot;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2018-01-23T13:35:13.943" LastActivityDate="2018-01-23T13:35:13.943" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4234" PostTypeId="2" ParentId="4197" CreationDate="2018-01-23T15:02:07.283" Score="0" Body="&lt;p&gt;Has she done basic algebra?  &quot;A white box has three marbles in it, and a blue box has four marbles in it.  If I have six white boxes and five blue boxes, how many marbles have I got?&quot;  Is her maths up to this level yet?  At age 9, I'd hope so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also make life easier by calling the variables something meaningful, which is good programming practise anyway.  So your variables would be &quot;number_of_marbles_in_a_white_box&quot;, &quot;number_of_marbles_in_a_blue_box&quot;, &quot;number_of_white_boxes&quot;, &quot;number_of_blue_boxes&quot;, and &quot;number_of_marbles&quot;.  Restrain your natural tendency to use shorter names.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastActivityDate="2018-01-23T15:02:07.283" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4235" PostTypeId="2" ParentId="4129" CreationDate="2018-01-23T16:38:55.253" Score="1" Body="&lt;p&gt;CS Unplugged has some great CS activities that focus specifically on exercises that can be done without a computer. I think this takes away a lot of the abstractness that puts many students off. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://csunplugged.org/activities/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://csunplugged.org/activities/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4106" LastActivityDate="2018-01-23T16:38:55.253" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4236" PostTypeId="2" ParentId="4197" CreationDate="2018-01-23T17:28:43.157" Score="2" Body="&lt;p&gt;I like to explain it as a placeholder. So that I don't have to read and write so much.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I have a friend named John Jacob Jingleheimer Schmidt. His name, John Jacob Jingleheimer Schmidt, is my name too. Whenever I go out with John Jacob Jingleheimer Schmidt, the people always shout. There goes John Jacob Jingleheimer Schmidt. John Jacob Jingleheimer Schmidt is my best friend. John Jacob Jingleheimer Schmidt likes to go down the slide at the park. John Jacob Jingleheimer Schmidt has brown hair.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Or I could just write at the top of the paper&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;JohnsName = John Jacob Jingleheimer Schmidt&lt;/p&gt;&#xA;&lt;p&gt;I have a friend named JohnsName. His name, JohnsName, is my name too. Whenever I go out with JohnsName, the people always shout. There goes JohnsName. JohnsName is my best friend. JohnsName likes to go down the slide at the park. JohnsName has brown hair.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This often prompts &amp;quot;Can't I just say John instead?&amp;quot; and I tell them &amp;quot;Yep, we could even just say &amp;quot;J = John Jacob Jingleheimer Schmidt&amp;quot; and make it even shorter.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Plus if John changes his name in the future we only have to change it at the top of the paper. &amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="4106" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-25T18:50:19.240" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4237" PostTypeId="2" ParentId="4193" CreationDate="2018-01-23T18:33:53.567" Score="0" Body="&lt;p&gt;When it comes to explaining asymmetric cryptography, I've seen an incredibly simple yet potent analogy used time and time again. This analogy can be found in this &lt;a href=&quot;https://www.youtube.com/watch?v=YEBfamv-_do&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Public key cryptography&quot;&gt;Art of the Problem video&lt;/a&gt; around 2:40.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This simple example could easily be done in the classroom, and can explain the basic principles of asymmetric cryptography without the usual requisite mathematics background.&lt;/p&gt;&#xA;" OwnerUserId="4114" LastActivityDate="2018-01-23T18:33:53.567" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4238" PostTypeId="2" ParentId="4197" CreationDate="2018-01-23T19:48:29.750" Score="1" Body="&lt;p&gt;This answer is probably a little more advanced than you're looking for, but it might help somebody else in the future, especially if they're working in a Java-like language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I really like this description: &lt;a href=&quot;https://javaranch.com/campfire/StoryCups.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cup Size -- a story about variables&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This describes variables as cups. You have different sized cups, which means they can hold different types of things. Each cup has a name written on it, so you can say &quot;give me the thing in the large cup with a name of X&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It then talks about the more advanced idea of references, which it describes as remote controls. A remote control goes in a cup, and points to a TV.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also has a follow-up article: &lt;a href=&quot;https://javaranch.com/campfire/StoryPassBy.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pass-by-Value Please&lt;/a&gt;, which describes the fact that one TV can have multiple remote controls, each in a cup, and swapping out one of the remote controls for one that points to a different TV doesn't change the original TV. Like I said this is more advanced than you care about, but it really helped me understand the idea of pass-by-reference vs pass-by-value back when I was still figuring that stuff out.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-01-23T19:48:29.750" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4239" PostTypeId="1" CreationDate="2018-01-23T22:11:26.700" Score="4" ViewCount="264" Body="&lt;p&gt;I'm not (yet) in this situation, so this is a hypothetical question. What would be viable approaches to teaching image processing (IP) and computer graphics (CG) to a blind college student? IP could possibly be approached by explaining images purely as 2D signals, and yet I'm not sure about how effective that would be. CG seems like an even harder task.&lt;/p&gt;&#xA;" OwnerUserId="313" LastEditorUserId="27" LastEditDate="2024-03-02T23:03:35.753" LastActivityDate="2024-03-02T23:03:35.753" Title="How to teach image processing and computer graphics to a blind student?" Tags="|image-processing|accessibility|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4240" PostTypeId="2" ParentId="4239" CreationDate="2018-01-24T10:28:05.393" Score="2" Body="&lt;h1&gt;Just some ideas&lt;/h1&gt;&#xA;&lt;p&gt;I imagine that the biggest problem, may be motivation.&lt;/p&gt;&#xA;&lt;p&gt;It can be all done abstractly: in maths this can be taught, with no reference to application. However this is not ideal. Some (most) people are not good at abstract ideas (I am good at abstraction, but poor at abstract ideas ­— at least in maths).&lt;/p&gt;&#xA;&lt;p&gt;I remember when I did image processing. I remember the words “it is just the 1d processing, you did in sound processing, but 2d. For a lot of it, it is just done twice, once for x and again for y”&lt;/p&gt;&#xA;&lt;p&gt;Therefore start with sound processing.&lt;/p&gt;&#xA;&lt;p&gt;Another Idea is using a texture map. However this may cost a lot to produce these.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-24T10:28:05.393" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4241" PostTypeId="1" CreationDate="2018-01-24T10:41:23.880" Score="4" ViewCount="289" Body="&lt;p&gt;I keep seeing examples like the first program bellow, in teaching materials.&lt;/p&gt;&#xA;&lt;p&gt;Is there a pedagogical reason to teach this first program, compared to the second?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;answer=input(&amp;quot;Do you wish to continue?&amp;quot;)&#xA;&#xA;while answer == &amp;quot;yes&amp;quot;:&#xA;    answer=input(&amp;quot;Do you wish to continue?&amp;quot;)&#xA;&#xA;print (&amp;quot;Good bye&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;2nd program&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;answer=&amp;quot;yes&amp;quot;&#xA;&#xA;while answer == &amp;quot;yes&amp;quot;:&#xA;    answer=input(&amp;quot;Do you wish to continue?&amp;quot;)&#xA;&#xA;print (&amp;quot;Good bye&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;An argument for the 2nd one&lt;/h1&gt;&#xA;&lt;p&gt;I think the 2nd program is more elegant: it has less repeated code.&lt;/p&gt;&#xA;&lt;p&gt;note: when I wrote this I copied the 1st line into the other 2 places, then when I tested it I discovered that I missed the closing &lt;code&gt;&amp;quot;&lt;/code&gt;, so had to fix it 3 times. This is an example of why repeated code is a problem, when a program needs re-editing. In the second version, the only repeated code is &lt;code&gt;&amp;quot;yes&amp;quot;&lt;/code&gt;, so still some room for improvement.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-29T22:35:29.347" Title="Pedagogical reasoning behind a minor difference in two loops" Tags="|looping|imperative-programming|" AnswerCount="7" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4242" PostTypeId="2" ParentId="4211" CreationDate="2018-01-24T11:19:33.137" Score="0" Body="&lt;h1&gt;For this reason NO.&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In the 80s, it was common for CS students (and anyone wanting to do&#xA;&amp;quot;real&amp;quot; programming) to learn assembly. After all, if you needed speed,&#xA;hardware access (including direct output to monitor) or working on low&#xA;powered hardware, you needed Assembly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It has been shown that as lines of code increase performance decreases.&#xA;As assembler programs grow there performance drops. It is hard to write big programs in low level languages. You can not consider all of the low level stuff and all of the high level stuff at the same time.&#xA;Therefore choose a language that keeps lines of code low. (This is not the only factor.)&lt;/p&gt;&#xA;&lt;p&gt;Even if you make a highly optimised assembler program, that is faster than the high level alternative. It will not be faster (or won't work), on a different processor: Different optimisation decisions need to be made for &lt;code&gt;386&lt;/code&gt;, &lt;code&gt;486&lt;/code&gt;, &lt;code&gt;586&lt;/code&gt;, &lt;code&gt;686&lt;/code&gt;, &lt;code&gt;x86-64&lt;/code&gt;. However if an [efficient] high-level language is used, then you just recompile your system (or get someone else — such as Debian —  to do it), and you have a new faster system. The assembler code stays slow, until re-written.&lt;/p&gt;&#xA;&lt;h1&gt;Reasons of Yes&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a tool to gain a better understanding of the computer (as part of computer science).&lt;/li&gt;&#xA;&lt;li&gt;As part of a compiler course.&lt;/li&gt;&#xA;&lt;li&gt;As part of an operating system course, when writing a few components: part of thread dispatcher (may come with compiler/libraries), part of memory management (controlling mmu), &lt;code&gt;memcpy&lt;/code&gt; fast memory copy (part of compiler/libraries), interrupt dispatching.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Note I say part of. I have done this for a commercial product. I kept asking how much of this needs to me assembler. I kept being told this dose, I would push back and say no just this line of this routine, so call out to another routine that is implemented in assembler (the compiler will do call optimisation: in-lining). We got an operating system down to 10 to 20 lines of assembler (not including what was in compiler).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-24T11:19:33.137" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4243" PostTypeId="2" ParentId="4239" CreationDate="2018-01-24T11:31:53.807" Score="6" Body="&lt;p&gt;I think you can teach 2D graphics using a tactile approach on a phone or tablet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students are very likely to be used to tracing their fingers over a mobile device (I have watched awesome videos of blind iPhone users in action).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So position and shape change of an object could be detected by them dragging their fingers over to get auditory feedback at the edges. Ideally you want a truly tactile surface but I don't know of any such devices. I have my own reasons for wanting a computer-controlled version of &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/B004N7HEYG&quot; rel=&quot;nofollow noreferrer&quot;&gt;one of these&lt;/a&gt; &lt;a href=&quot;https://i.stack.imgur.com/kduJ9.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/kduJ9.jpg&quot; alt=&quot;nail picture toy&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For actual image processing maybe map colours to tone, so as they move their finger over an image they hear a tone vary depending on the average pixels underneath. Then, as transforms are applied, the tones would change. You could possibly teach colour theory by varying the mapping to only one channel of RGB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; in one of those great examples of synchronicity, a few days after writing the above I was listening to &lt;a href=&quot;https://www.swiftbysundell.com/podcast/12&quot; rel=&quot;nofollow noreferrer&quot;&gt;Matthias Tretter of MindNode on a podcast&lt;/a&gt; mention how he had been convinced to add accessibility to MindNode, a &lt;em&gt;visual mindmapping product&lt;/em&gt; by a blind user. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;His &lt;a href=&quot;https://mindnode.com/news/2016-06-29-making-mindnode-accessible&quot; rel=&quot;nofollow noreferrer&quot;&gt;blog posting&lt;/a&gt; has videos showing VoiceOver in action. This is a bit tangential to the original answer but a nice anecdote about how preconceptions about the intended purpose of a tool as being visual doesn't rule it out for blind users.&lt;/p&gt;&#xA;" OwnerUserId="4131" LastEditorUserId="4131" LastEditDate="2018-01-30T13:14:31.510" LastActivityDate="2018-01-30T13:14:31.510" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4244" PostTypeId="2" ParentId="3414" CreationDate="2018-01-24T11:59:06.960" Score="1" Body="&lt;p&gt;I think it is an excellent idea. I have taught both programming and introductions to Excel.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few quick ideas:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can teach &quot;debugging&quot; by having sum formulas refer to the wrong range, especially by walking them through editing a sheet so they are led into the trap of the sum not being updated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Excel is an excellent tool for string manipulation - you can write formulas to take strings from a couple of columns and concatenate them, adding fixed separator characters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can add conditional logic to string manipulation, varying the way you concatenate depending on another column, say a salutation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Graphics can be taught, maybe by customising some samples, because you have access to the &lt;a href=&quot;https://msdn.microsoft.com/en-us/vba/excel-vba/articles/working-with-shapes-drawing-objects?f=255&amp;amp;MSPPError=-2147217396&quot; rel=&quot;nofollow noreferrer&quot;&gt;Shapes API within VBA.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4131" LastActivityDate="2018-01-24T11:59:06.960" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4245" PostTypeId="2" ParentId="4177" CreationDate="2018-01-24T12:07:04.563" Score="1" Body="&lt;p&gt;I'm a multi-platform programmer who has spent many years using C++.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the last 5 years that has included:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Realm mobile database engine used by a couple of &lt;strong&gt;billion&lt;/strong&gt;&#xA;people worldwide, embedded in their mobile apps. I mainly worked on their Xamarin SDK in C# but had to use C++ in the glue layer to the engine.&lt;/li&gt;&#xA;&lt;li&gt;Using the Cocos2D-X&#xA;game engine, for mobile games (actually for my mobile messaging app&#xA;which has a game-like interface). &lt;/li&gt;&#xA;&lt;li&gt;Working on a 3D CAD program used to&#xA;design minesites, including their roads, open-pits, tunnels and&#xA;explosive blast patterns.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;C++ is still a great language when you need to mix both high-level abstractions and compile down for really low-level performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once of the cooler things happening is compiling C++ to JavaScript and WebAssembly, to deliver high performance graphical web apps like the &lt;a href=&quot;https://www.figma.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Figma vector editor.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if they won't use C++ as a primary language, it's still important to know if you want to interface to some libraries.&lt;/p&gt;&#xA;" OwnerUserId="4131" LastActivityDate="2018-01-24T12:07:04.563" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4246" PostTypeId="2" ParentId="3907" CreationDate="2018-01-24T12:11:59.457" Score="1" Body="&lt;p&gt;The &lt;a href=&quot;https://ccl.northwestern.edu/netlogo/&quot; rel=&quot;nofollow noreferrer&quot;&gt;NetLogo&lt;/a&gt; agent-based modelling environment is a teaching tool which uses an enhanced Logo that can have inputs hooked up to sliders. I have played with its simulators sometimes just for my own amusement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A nice simpler model is the one displaying &lt;a href=&quot;http://www.netlogoweb.org/launch#http://www.netlogoweb.org/assets/modelslib/Sample%20Models/Social%20Science/Traffic%20Basic.nlogo&quot; rel=&quot;nofollow noreferrer&quot;&gt;how freeways get clogged&lt;/a&gt;, just playing with the rate at which cars accelerate and decelerate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt; most models have both a &lt;em&gt;Setup&lt;/em&gt; and a &lt;em&gt;Go&lt;/em&gt; button. If you don't press &lt;em&gt;Setup&lt;/em&gt; nothing happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the nodels have an Info tab at the bottom which explains how the model works and usually the effect of its input variables.&lt;/p&gt;&#xA;" OwnerUserId="4131" LastEditorUserId="4131" LastEditDate="2018-01-25T02:15:12.820" LastActivityDate="2018-01-25T02:15:12.820" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4247" PostTypeId="2" ParentId="4241" CreationDate="2018-01-24T12:50:26.280" Score="1" Body="&lt;p&gt;I don't particularly care for either as a &lt;em&gt;first&lt;/em&gt; program, but the second version makes the case for &lt;em&gt;Say It Once&lt;/em&gt;, i.e. don't repeat code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However (a) it is awfully early to be stressing that rule and there are better examples that can come along soon, and (b) making the case for the rule requires showing (and discussing) &lt;strong&gt;both&lt;/strong&gt; programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Showing both can also help make the case (in a smallish way) that different programs have the same effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I wouldn't rate one over the other based on just the fact that you mis-typed, but rather that programs change. Saying the same things twice doesn't hold up well if the prompt needs changing and you want it to be the same on the first and subsequent responses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you might want them to &lt;em&gt;not be&lt;/em&gt; the same. That again requires some explanation and discussion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that is a lot of weight for the &lt;em&gt;first program&lt;/em&gt; to carry. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For the mis-typing issue I'd rather use a UI that makes the syntax error visible before you progress any further making that moot. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-24T13:02:22.990" LastActivityDate="2018-01-24T13:02:22.990" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4248" PostTypeId="2" ParentId="4193" CreationDate="2018-01-24T13:49:05.057" Score="1" Body="&lt;p&gt;I thoroughly recommend &lt;a href=&quot;https://www.cryptool.org/en/cryptool2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cryptool2&lt;/a&gt;. It's an open-source GUI where you can drag and drop different algorithms, inputs and outputs and see the results in real time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be used to show very basic caesar cypers to customizing advanced encryption and hashing techniques.&lt;/p&gt;&#xA;" OwnerUserId="4138" LastEditorUserId="27" LastEditDate="2018-01-24T17:46:15.190" LastActivityDate="2018-01-24T17:46:15.190" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4249" PostTypeId="1" CreationDate="2018-01-24T13:54:18.190" Score="2" ViewCount="181" Body="&lt;p&gt;I am technically enrolled on a university course but lack basic maths ability and have fallen behind in trying to catch up. Therefore I need to explore self-learning to improve my position while continuing my university course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm looking for a math / computer science tutor to cover areas of discrete maths; number theory / proofs and counting plus others. Other suggestions for helping me come up to speed in these areas might also be helpful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a mature student and am keen to put the hours of work that are needed. I have some materials but there aren't enough examples provided to help me to understand better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does one find tutoring and other supplemental aid for otherwise engaged students in these areas? Does online tutoring exist?&lt;/p&gt;&#xA;" OwnerUserId="4137" LastEditorUserId="1293" LastEditDate="2018-01-24T14:47:02.603" LastActivityDate="2018-03-06T15:07:37.623" Title="Finding tutoring in Maths / CS" Tags="|self-learning|struggling-students|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4250" PostTypeId="2" ParentId="4241" CreationDate="2018-01-24T15:51:46.100" Score="1" Body="&lt;p&gt;There are different loop structures for very good reasons. In my early introductory programming examples, I stress at least three types of loops which are &lt;strong&gt;not interchangeable&lt;/strong&gt;:&lt;br&gt;&#xA;1. Loops that read data require a &lt;em&gt;priming read&lt;/em&gt; before the test at the top.&lt;br&gt;&#xA;2. Loops that test at the top can use a flag variable which is changed in the body.&lt;br&gt;&#xA;3. Loops that test at the bottom must execute at least once.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These must be explained clearly and with good explanations of why they are used in different circumstances, otherwise you will be condemning people to making many painful bugs which could be easily avoided.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other vital concept is that every loop (including recursive method calling, as in Functional programming) has three requirements:&lt;br&gt;&#xA;1. The control variable must be &lt;em&gt;initialized&lt;/em&gt; before the loop begins.&lt;br&gt;&#xA;2. The control variable must be &lt;em&gt;updated&lt;/em&gt; in the body of the loop.&lt;br&gt;&#xA;3. The test that controls the loop must have an &lt;em&gt;achievable end condition&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without those basics in place, students will flounder.&lt;/p&gt;&#xA;" OwnerUserId="4143" LastActivityDate="2018-01-24T15:51:46.100" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4251" PostTypeId="2" ParentId="4082" CreationDate="2018-01-24T18:53:46.337" Score="1" Body="&lt;p&gt;Interfaces should be taught right after, or during the section on APIs, because they are simply a promise to implement a certain Application Programming Interface. It's why they are called interfaces in the first place. They are also more general than inheritance, which makes them a much better example as a polymorphic data type. With this in mind, I propose that after APIs, the following concepts are taught in order:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Interfaces:&lt;/strong&gt; This is language support for what was taught during APIs, and introduces the 'duck principle'. That is, if it walks like a duck, quacks like a duck, and behaves like a duck, its a duck. This is a good argument and explanation for the need for polymorphism.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Polymorphism:&lt;/strong&gt; What good is an interface if we can't swap out one implementation for another? Take for example, Java's &lt;code&gt;List&lt;/code&gt; interface, and two of its realizations: &lt;code&gt;LinkedList&lt;/code&gt; and &lt;code&gt;ArrayList&lt;/code&gt;; without polymorphism, we can't write generic code that targets both of these types.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Abstract Classes:&lt;/strong&gt; Sometimes, when writing two different realizations of the same interface, we see that code can be shared between different types, while fundamental portions of the implementation remain separated. Take, for example, designing a &lt;code&gt;HumanPlayer&lt;/code&gt;and &lt;code&gt;ComputerPlayer&lt;/code&gt; for a card game. Functionality relating to scoring and storing cards will be shared, but the act of choosing which card to play is fundamentally different, and cannot be shared. The interface, however, needs to be consistent.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inheritance:&lt;/strong&gt; This is primarily for code reuse. Additional functionality or desired traits are added to a type that already is an object in its own right. Taking advantage of a somewhat nebulous implementation (such as extending Java's &lt;code&gt;Exception&lt;/code&gt; class) is another use case. You are customizing more than you are providing functionality. Unlike the other strategies listed, you don't have to use inheritance to implement an API. You could, for example, convert a regular binary tree into a balancing binary tree.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Teaching these concepts in this order should help to showcase the use cases for each of these features. Interfaces were brushed over when I was learning programming, and it took me a while to understand what their use case was; I would try to use inheritance anywhere I needed polymorphism, which doesn't make sense in the grand majority of cases. This teaching order should get over that misconception.&lt;/p&gt;&#xA;" OwnerUserId="2040" LastEditorUserId="2040" LastEditDate="2018-01-24T18:59:21.903" LastActivityDate="2018-01-24T18:59:21.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4252" PostTypeId="1" CreationDate="2018-01-24T21:21:36.777" Score="4" ViewCount="320" Body="&lt;p&gt;A student studying Computer Science requires some knowledge of finite mathematics, including logic, probability, counting, etc. In the use-case at hand, a HS or University course in finite math is not an option as the student is self studying. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are good resources by which a student can learn the necessary material to support a CS degree? These could be books or online resources or perhaps other things not yet considered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, one essential aspect is that the student needs access to materials by which the topics can be practiced, not just read about. Resources with lots of exercises at different levels with a way to obtain feedback (answer key or other) would be essential. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-29T14:55:59.830" Title="What are good resources for self learning Finite Mathematics for a CS Student?" Tags="|resource-request|self-learning|finite-mathematics|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4253" PostTypeId="2" ParentId="4252" CreationDate="2018-01-24T21:29:48.000" Score="3" Body="&lt;p&gt;John Kemeny et all have published a set of books on Finite Mathematics that are classics. They have lots of exercises but no solutions in the books themselves. However, the solutions guide may be available for some of them online or &lt;em&gt;especially&lt;/em&gt; at eBay with a suitable search. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the classics is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0133173216&quot; rel=&quot;nofollow noreferrer&quot;&gt;Finite Mathematics with Business Applications&lt;/a&gt;. Don't let the title fool you. It is serious mathematics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another, more common and possibly lighter weight book is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0134838343&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Finite Mathematics&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These books are both old and out of print, but readily available. I think the latter one is available as a PDF online (but without answers). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-24T21:29:48.000" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4254" PostTypeId="5" CreationDate="2018-01-24T21:36:36.183" Score="0" Body="&lt;p&gt;Finite Mathematics is often taught to university CS students as it gives a background in logic and counting, etc, which frequently arise in programming and in more advanced CS topics. Set theory is often included as well. Number Theory is related, but not the same and not usually included in such a course, beyond elementary concepts. While this is actually a math topic, its usefulness in CS is beyond question. Use this tag for questions relating to teaching/learning Finite Math in the CS context. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-24T21:36:36.183" LastActivityDate="2018-01-24T21:36:36.183" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4255" PostTypeId="4" CreationDate="2018-01-24T21:36:36.183" Score="0" Body="Finite Mathematics includes such things as set theory, counting, probability, logic and the like. CS students need to know much of this material and university programs often have a specialized course (topic) in Finite Math. Use this tag for questions on teaching Finite Math in the CS context. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-24T21:36:36.183" LastActivityDate="2018-01-24T21:36:36.183" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4256" PostTypeId="2" ParentId="4197" CreationDate="2018-01-24T22:12:44.550" Score="3" Body="&lt;p&gt;There are a number of fine answers already here. This is how I thought of doing it, and it might provide another alternative that should be suitable for a 9 year old, and possibly younger. It should be something that gives a good visual image for the child to picture mentally.&lt;/p&gt;&#xA;&lt;p&gt;If I were speaking to the 9 year old:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Say one day you decide you're really curious about the number of blue cars that pass your house on a typical day. That makes you think about the red cars, too, and the total number of cars.&lt;/p&gt;&#xA;&lt;p&gt;So, you get three cups - a blue one, a red one, and a clear one. Also you get a big stack of pennies. You sit on the porch all day. Every time a car goes by, you put a penny in the clear cup. If the car is blue, you also put a penny in the blue cup. If the car is red, you also put a penny in the red cup.&lt;/p&gt;&#xA;&lt;p&gt;At the end of the day, you count the number of pennies in the blue cup. That's the number of blue cars that went by. You do the same thing with the red cup, and that's the number of red cars that went by. Finally, you count the pennies in the clear cup, and that's the &lt;em&gt;total&lt;/em&gt; number of cars that went by.&lt;/p&gt;&#xA;&lt;p&gt;The cups are variables, and each has a name - the blue cup is a variable named &lt;em&gt;blue-cars&lt;/em&gt;, the red cup is named &lt;em&gt;red-cars&lt;/em&gt;, and the clear cup is named &lt;em&gt;total-cars&lt;/em&gt;. Each variable holds a number, the number of pennies in the cup.&lt;/p&gt;&#xA;&lt;p&gt;Oh, and by the way, you're the program. We can empty the cups and run you again tomorrow to count the cars.&lt;/p&gt;&#xA;&lt;p&gt;There are other things you can do, too. You can add the number of pennies from the blue cup and red cup, and see how many red and blue cars there were combined. If you want to get really fancy, you could count the number in the clear cup, then subtract the red cars and subtract the blue cars to see how many cars there were of other colors that you didn't count.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2769" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-24T22:18:03.670" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4257" PostTypeId="2" ParentId="2982" CreationDate="2018-01-25T14:21:59.553" Score="3" Body="&lt;p&gt;Image compression, for example sending back photos from faraway in space and through narrow communications, is interesting because it gives visual scene of the work done. You can compress the individual pixels to a range of bit-depths, from 2/4/8... 32 bits, you can compress 2 bits inside 8 bit registers of a PC which often reads and writes memory blocks of 8/16 bits. It's very good to have a thorough understanding of XY color graphs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The concept of images also leads to the topic of floodfill, and recursive searching of black and white pixels, and recursion generates 100mb or 1gb, which leads to the concepts of stack overflows from disorganized memory. Students therefore learn to keep 2D and 3D arrays for pixels and voxels. If they do 3D arrays to compress data in, they are building a minecraft world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Voxels are stacks of XY graphs, on a Z axis, so videos are actually voxels, using XY and Time, most work done on 2D graphs alot easier and smaller, and also very similar to 3D graphs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a minecraft world you are introducing the kids to lots of 3D concepts, and the limitations of bandwidth every frame to and from the graphics cards, and overall memory limitations. a voxel engine has to be very optimized to get around those. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently used 3D arrays to solve floodfill recursive algorithms so that they take up 100 times less space than line-scanning floodfils and I found it mentally very engageing. A voxel space can take up a billion memory spaces very fast, 1000x1000x1000 points of space, which requires a lot of bandwidth optimizing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you have objects in a voxel space, and you find the edge voxels of the shape, you can generate a point cloud, which is useful too. Point clouds use huge amounts of data, and they represent visible shapes. Being able to organize algorithms in point clouds requires a lot of organization, it leads to the concepts of Octrees and nearest neighbor algorythms. &lt;/p&gt;&#xA;" OwnerUserId="4174" LastEditorUserId="4174" LastEditDate="2018-01-25T17:47:37.660" LastActivityDate="2018-01-25T17:47:37.660" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4258" PostTypeId="2" ParentId="4249" CreationDate="2018-01-25T16:48:34.053" Score="2" Body="&lt;p&gt;I realize that this isn't a perfect answer since it &lt;em&gt;may&lt;/em&gt; lack the personal contact with an instructor that may be the most valuable. However &lt;a href=&quot;https://www.coursera.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coursera&lt;/a&gt; has a number of courses that might provide the necessary background if you can match their schedule. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular &lt;a href=&quot;https://www.coursera.org/learn/combinatorics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Combinatorics and Probability&lt;/a&gt; should teach you sophisticated counting techniques. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They also have a series of courses on &lt;a href=&quot;https://www.coursera.org/specializations/discrete-mathematics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Discrete Math for Computing&lt;/a&gt; that probably covers the rest. (Combinatorics is one of the courses in this sequence.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside, however, is that you don't get much in the way of a personal touch that you get in a face-to-face environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the various online course sites provide some tutorial help and more provide peer-to-peer contact, but the quality of the help you get with that is likely spotty. It may help you get over some of the humps, but will be less valuable for building mathematical insight. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-25T16:48:34.053" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4259" PostTypeId="2" ParentId="4211" CreationDate="2018-01-25T21:43:21.060" Score="1" Body="&lt;p&gt;They should definitely write a dozen lines of ASM, at least an hour of lesson. It helps to understand compilation and it's interesting to know what the processor instructions are. It introduces the students to the concepts of SSE optimizations, processing order, it's used by some security professionals and hackers, It's used by those that require high degrees of optimization for maths code that doesn't compile into the best order. The language itself requires a different logic to other codes, and It's a fun mental exercise to sort lines into fast sequences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I woudln't do more that a day of it though. If the student has 1 day of ASM experience, he will know well what it means when he sees it mentioned, as it frequently is, and he will know more thoroughly about information technology.&lt;/p&gt;&#xA;" OwnerUserId="4174" LastEditorUserId="4174" LastEditDate="2018-01-26T14:11:52.630" LastActivityDate="2018-01-26T14:11:52.630" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4260" PostTypeId="2" ParentId="4197" CreationDate="2018-01-26T08:39:19.040" Score="2" Body="&lt;p&gt;Do you use a dry-erase board anywhere to keep track of chores, or a shopping list?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An &lt;em&gt;erasable space&lt;/em&gt; is a great way to teach the use of a variable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even get into data types!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Booleans - eg: a tick in a box or the words &lt;em&gt;yes/no&lt;/em&gt; against a task &lt;em&gt;trash taken out&lt;/em&gt;. I know one mum who had a checklist at the door, so ticking off everything on the list would be essential before going to school, then the list gets erased back to &lt;em&gt;all false&lt;/em&gt; on getting home, ready for the next day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Integers - have a box for number of times someone has to dry dishes this week, with the tally written next to it. That gives the concept of accumulating and rewriting a value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A calendar on which you can only write or add stickers is a WORM (Write Once Read Many) device. Without getting into the acronym, it's a good way to discuss the idea of being able to change something vs being able to get a value from it.&lt;/p&gt;&#xA;" OwnerUserId="4131" LastEditorUserId="4131" LastEditDate="2018-01-27T03:03:10.410" LastActivityDate="2018-01-27T03:03:10.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4261" PostTypeId="2" ParentId="4183" CreationDate="2018-01-26T20:26:44.170" Score="-3" Body="&lt;p&gt;Anything object oriented I would say. Such as java, C#, or Alice!. The reason is the high level concepts are hard to grasp such as threading, loopers, and ect. For example in Java create a object class called animal what can an animal do? eat and sleep, fight ect. Then grow it from there. Once you establish real world applications for the kids concepts such as inheritance(ex. lion inherits from animal because a lion is an animal) and polymorphism(ex. not all animals have the same growl such as a cow says mooo and an lion says rooaar, so like have a method called growl they have to override) are easy to grasp.&lt;/p&gt;&#xA;" OwnerUserId="4199" LastActivityDate="2018-01-26T20:26:44.170" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4262" PostTypeId="2" ParentId="4183" CreationDate="2018-01-26T22:14:23.707" Score="1" Body="&lt;p&gt;If your kids are into making things they can see or hear, why not give &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;http://sonic-pi.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SonicPi&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; a try?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will give immediate audible results and teach a fresh beginner the basics of assigning variables, looping, writing functions to group like events/actions, and teach a general sense of sequence (this before that) as well as simple troubleshooting (it doesn't sound right, but where is the mistake?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things that I did as part of an undergrad research (that unfortunately didn't get very far due to time) was to gather information on how to create a curriculum that would bridge the gap between computer science and music, as part of a joint collaborative of both departments at my university. Things I found while looking into Sonic Pi is that it is actually a very good &quot;first&quot; language and a good environment to break into the shell of programmable music.  It is also a good way, likewise, for a programmer to learn a bit about music and how it all works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much of today's music is synthesized, and is in a standard popular song format, meaning that there are sections that loop. If the end result is to create a standard 3-minute length song, for example, things that need to be learned first are a few key things about music theory (which, for the basis of &quot;song-making&quot; and not necessarily serious composition, are fairly simple and can be picked up along the way), but as for the technical/programming side of things, a newcomer would also have to pick up a few essential skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Day one would be preparing the environment. Installing the OS and the packages required to run the environment on which it runs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Day two would be the first few standard expressions. Subsequently, learning about MIDI inputs and what each number represents (pitch, velocity, etc.). You assign an instrument to a variable and call the variable when you want to output the sound.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From then on begin the real fireworks. Programming variable instruments to play on a timebase. Looping sections of timed variable instruments (standard loops, such as do-while) to create riffs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, creating functions that will group a section of riffs to make an audible passage. Passing parameters onto these functions to apply effects, volume/loudness, etc. Learning about constructors, getters and setters. Working with libraries (such as randomizers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end result is something that's engaging, fun to play with and discover, and imparts an essential understanding of underlying concepts, so that when they jump into a formal language, much of the foundation is already there and the daunt of the challenge of learning something that might as well be &quot;in another language&quot; is lessened.&lt;/p&gt;&#xA;" OwnerUserId="4200" LastEditorUserId="58" LastEditDate="2018-01-30T14:45:26.953" LastActivityDate="2018-01-30T14:45:26.953" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4263" PostTypeId="1" AcceptedAnswerId="4264" CreationDate="2018-01-28T00:51:35.847" Score="6" ViewCount="207" Body="&lt;p&gt;I will teach a lesson on image file formats in a computer science high school class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding JPEG, I will say that it achieves lossy compression and that it is well suited for photographs but it should not be used for geometric drawings where it can generate artifacts, showing some examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, is it possible to explain why JPEG works this way, without venturing into domain change (space to frequency conversion), &lt;a href=&quot;https://en.wikipedia.org/wiki/Discrete_cosine_transform&quot; rel=&quot;nofollow noreferrer&quot;&gt;Discrete Cosine Transformation&lt;/a&gt;, and so on?&lt;/p&gt;&#xA;" OwnerUserId="3842" LastEditorUserId="204" LastEditDate="2018-02-01T09:51:56.487" LastActivityDate="2018-02-01T09:51:56.487" Title="Simple explanation of JPEG working principles" Tags="|lesson-ideas|secondary-education|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4264" PostTypeId="2" ParentId="4263" CreationDate="2018-01-28T10:26:22.343" Score="4" Body="&lt;h1&gt;On teaching JPEG&lt;/h1&gt;&#xA;&lt;p&gt;I would start with the lossless algorithms, run-length is a good place to start. Then you can go on to discuss human perception, I like to use the example of hiding in plain site.&lt;/p&gt;&#xA;&lt;h2&gt;Hiding in plain sight&lt;/h2&gt;&#xA;&lt;p&gt;Ask which is harder to spot someone standing by a wall, or someone standing in the middle of a field. Use this as the basis for discussing lossy compression.&lt;/p&gt;&#xA;&lt;h2&gt;Optical illusion&lt;/h2&gt;&#xA;&lt;p&gt;Explore images that look the same, but are different (when examined). One that I remember is an image white background, with a series of vertical thick black bars. Then to the right of each bar is a thin line with a linear gradient from dark to light. All black bars are identical, all thin lines are identical, however the lines get closer to the bars as you move to the right. (so multiple copies of the bar and line, but each copy to the right has the bar and line closer). This is perceived as the thin lines getting shorter to the right. An example of the hiding in plain sight illusion discussed above.&lt;/p&gt;&#xA;&lt;h2&gt;When not to use lossy compression&lt;/h2&gt;&#xA;&lt;p&gt;This relates to e-safety, digital literacy, ethics, etc.&lt;/p&gt;&#xA;&lt;p&gt;As well as the ones you said: Cartoon (traditional, such as Simpsons), line drawings. There are certain uses of photograph that should not be lossy encoded. These include medical X-ray (especially of fractures), and of nuclear power rods or aircraft, to check for build quality (fractures). I mention these 3 as I know this has been done, at great cost (£Millions), and safety risk.&lt;/p&gt;&#xA;&lt;h1&gt;What is JPEG&lt;/h1&gt;&#xA;&lt;p&gt;Let me point out that JPEG is not a file format but a set of algorithms, some lossy some lossless. However just after release someone made a library that used some of the algorithms (Discrete cosine transform, hoffman encoding, etc), to make a lossy compression algorithm, this became a de-facto standard).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-28T16:59:13.870" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4265" PostTypeId="2" ParentId="4263" CreationDate="2018-01-28T12:03:56.420" Score="8" Body="&lt;h2&gt;The basics&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Let me start with a quick overview of how JPEG (as usually applied) compresses color images.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Colorspace and downscaling.&lt;/strong&gt; Raw images are usually encoded in the RGB color space. The human eye is more sensitive to the luminosity of images than to their chromatic aspects &amp;mdash; as an extreme  example, we can understand black and white photos quite well. Therefore JPEG images store more information about luminosity and less about colors. This is implemented in two steps. First, the RGB color space is transformed into a different color space (in a linear fashion), YCbCr (similar to the TV color space YPbPr) in which Y is luminosity and Cb/Cr encode how much the pixels are blue rather than purple (Cb) and red rather than green (Cr). The Cb and Cr planes are then &lt;em&gt;downscaled&lt;/em&gt; or &lt;em&gt;subsampled&lt;/em&gt;, that is, their resolution is reduced, usually by a factor of 2 in the horizontal direction (the eye is more sensitive to the vertical direction). From this point on, the three planes are compressed individually.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Division into blocks.&lt;/strong&gt; Each of the color planes is now divided into 8&amp;times;8 non-overlapping blocks (in contrast, in MP3 the sections are partially overlapping), which will be compressed more-or-less individually. This division is the reason for the so-called &lt;em&gt;blocking effects&lt;/em&gt;, since the superimposed grid cuts through features of the image.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spectral compression by quantization.&lt;/strong&gt; The basic insight behind JPEG is that nature is noisy, and this noise is filtered by the human visual system. It follows that we can throw away the noise without substantially affecting the way the image looks. It remains to decompose the image into its &quot;substantial&quot; and &quot;noisy&quot; components, and this is accomplished by a 2D Fourier transform. Recall we are trying to compress 8&amp;times;8 blocks. The most important feature of a block is the average value of its 64 pixels, known as the DC component (or, zeroth Fourier coefficient); the DC components of all blocks are just a result of scaling down the original image by 8 in both dimensions. The importance of the other components, known as AC components, depends on their frequency &amp;mdash; the higher frequencies correspond to noise, whereas the lower frequencies are more informative. However there is no clear cut distinction between features and noise. For this reason, we need to retain all components, albeit with different accuracy. Accordingly, we quantize the different components to various degrees, depending on the frequency: components corresponding to higher frequencies are quanrtized more. The exact quantization matrix depends on the disparity between the horizontal and vertical dimensions, and has been determined experimentally. (It also depends on the quality parameter of the compressor.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entropy encoding.&lt;/strong&gt; It remains to encode the quantized components into bits, which is done using Huffman coding, a standard encoding scheme. Since the DC components of all blocks are a downscaled version of the entire image, we expect them to vary continuously. Therefore instead of encoding their actual values, we encode them &lt;em&gt;differentially&lt;/em&gt;, that is, we encode the difference from the preceding DC value. The AC components don't have this behavior, and so are encoded &lt;em&gt;absolutely&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Artifacts&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Why does compressing geometric drawings result in artifacts? Geometric drawings are very different from natural images. They don't vary continuously. Spectral compression results in &quot;smearing&quot; effects, since we are only retaining the lower frequencies. The best illustration of this is the &lt;a href=&quot;https://en.wikipedia.org/wiki/Gibbs_phenomenon&quot; rel=&quot;noreferrer&quot;&gt;Gibbs phenomenon&lt;/a&gt;, which is the continuous analog of the same issue. When trying to represent a step function using Fourier series, we need to use all frequencies. If we suppress the high frequencies, we get something really different. Lines in a geometric drawing are the discrete analog of step functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another problem is the blocking effects. Imagine a diagonal line. JPEG partitions the space around these lines into 8&amp;times;8 blocks, which are compressed individually. No attempt is made for the resulting lines to match exactly, and indeed they probably don't. This is very apparent because lines are very clean and exact, something that cannot be said about real-life images.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Teaching ideas&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Using software like Matlab, you can show the effect of quantization on a real-world image, and then compare it to the effect of quantization on clip art. You can vary the quantization steps to show the effect of downplaying the higher frequencies (and also what happens when trying to suppress the lower frequencies).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can demonstrate the effect of blocking by varying the angle of a line which is compressed block-by-block, or fixing a line and varying the block size. You can use a low quality setting to emphasize the effect, and include the block boundaries to highlight its origins.&lt;/p&gt;&#xA;" OwnerUserId="1536" LastActivityDate="2018-01-28T12:03:56.420" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4266" PostTypeId="2" ParentId="4263" CreationDate="2018-01-28T15:39:29.803" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;However, is it possible to explain why JPEG works this way, without venturing into domain change, DCT and so on?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer 1&lt;/em&gt;: I'm not sure if this is more of a comment or an answer and&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer 2&lt;/em&gt;: this is not &lt;em&gt;really&lt;/em&gt; my field, but &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd be inclined to answer: &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, I don't think it's &lt;em&gt;necessary&lt;/em&gt;. I think the intuition behind the concept of transform (at least as in Fourier or DCT) is within the grasp of most high school kids that know &lt;em&gt;some&lt;/em&gt; trigonometry: you can probably get away with drawing a simple function, decomposing it into sine waves and writing down their phase and amplitude while waving your hands a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'd then proceed to reconstruct the original function by means of summation and persuade the students that the representation in terms of 4/5 phase/amplitude coefficients &lt;em&gt;is &quot;more compact&quot;&lt;/em&gt; (finite, even) &lt;em&gt;than its representation in terms of infinite pairs in $R \times R$.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd argue it's also &lt;em&gt;not possible&lt;/em&gt; because the DCT is also very much one of - if not &lt;em&gt;the&lt;/em&gt; - working principles behind JPEG, differentiating it from classical lossy compression techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Operation in the frequency domain is ultimately &lt;em&gt;the&lt;/em&gt; reason why *PEG performs subjectively better than, say, resampling and requantizing at 240x180@16 colors, which is essentially a much naiver lossy compression method that operates purely in the space/time domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, finally, how the excellent &lt;a href=&quot;http://dspguide.com/ch27/6.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Smith handbook&lt;/a&gt; - along with probably several other resources - explicitly calls JPEG &lt;strong&gt;“transform compression”&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="757" LastEditorUserId="757" LastEditDate="2018-01-28T19:56:48.463" LastActivityDate="2018-01-28T19:56:48.463" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4267" PostTypeId="2" ParentId="4065" CreationDate="2018-01-28T22:29:35.287" Score="2" Body="&lt;p&gt;If you want to teach the students some valuable real life skills, helping them in writing programs without bugs, teach them about &lt;strong&gt;sequence points&lt;/strong&gt; and &lt;strong&gt;integer promotion&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a C programmer does not understand those concepts, he or she is bound to make some serious mistakes sooner or later.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdlib.h&amp;gt;&#xA;#include &amp;lt;stdio.h&amp;gt;&#xA;&#xA;static int n = 100;&#xA;&#xA;static int f1(void) {&#xA;    n++;&#xA;    return n;&#xA;}&#xA;&#xA;static int f2(void) {&#xA;    n++;&#xA;    return n;&#xA;}&#xA;&#xA;static int f3(int a, int b, int c, int d)&#xA;{&#xA;    printf(&quot;Undefined behaviour allows the compiler to do anything!\n&quot;);&#xA;    printf(&quot;n = %d, a = %d, b = %d, c = %d, d = %d\n&quot;, n, a, b, c, d);&#xA;    return n + a + b + c + d;&#xA;}&#xA;&#xA;int main(int argc, char *argv[])&#xA;{&#xA;    unsigned int a = 10;&#xA;    signed int b = -10;&#xA;&#xA;    if (a &amp;lt; b) {&#xA;        printf(&quot;This is executed despite that (%u &amp;lt; %d) is not true\n&quot;, a, b);&#xA;    }&#xA;&#xA;    n = f3(n, f1(), f2(), n++);&#xA;&#xA;    return EXIT_SUCCESS;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Compiled with gcc:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is executed despite that (10 &amp;lt; -10) is not true&#xA;Undefined behaviour allows the compiler to do anything!&#xA;n = 103, a = 103, b = 103, c = 102, d = 100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Compiled with clang:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;This is executed despite that (10 &amp;lt; -10) is not true&#xA;Undefined behaviour allows the compiler to do anything!&#xA;n = 103, a = 100, b = 101, c = 102, d = 102&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Even if the students do not fully grasp those two concepts, being aware of them is important.&lt;/p&gt;&#xA;" OwnerUserId="716" LastActivityDate="2018-01-28T22:29:35.287" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4268" PostTypeId="2" ParentId="4241" CreationDate="2018-01-28T23:13:09.373" Score="2" Body="&lt;p&gt;I think too much emphasis is placed on the &quot;kind&quot; of loop (e.g while vs. repeat until), and on how to structure a &lt;code&gt;while&lt;/code&gt; loop if you need to pre fetch some values before you can consider exit condition(s).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I tutor my students about the infinite loop construct.  And then about testing for exit condition(s), and advancing the loop (e.g. fetching), but that those two should occur in the order they naturally arise for the situation (and that we can have multiple exit conditions as needed).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel that the while and repeat-until constructs are false source-code optimizations and code should not be considered better for their use over more general looping constructs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using the infinite loop method tends to simplify mental task of writing a loop, since you can think about what to do inside the loop instead of how to write what you need in terms of one of the other more limited/specialized looping constructs before you even know what's needed.  We also don't have to think in terms of priming before/outside the loop (with code that is then repeated inside the loop).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it turns out that the exit test is at the beginning then it can be simply and mechanically transformed into a while loop, though I explain that they should not feel this transformation is necessary and might even have to be reversed/undone later (just like they should not feel it necessary to remove block &lt;code&gt;{}&lt;/code&gt;s for single line then and else statements).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the language in question doesn't have an infinite loop construct I advocate &lt;code&gt;while True ...&lt;/code&gt;, for the infinite loop, so students can get onto the business of writing the loop instead of thinking about how to structure a loop they haven't even yet written as a while loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(The other loop construct I advocate is the counted/bounded for-loop, used when we know up front that some number of iterations are needed instead of a more general exit condition.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, my answer would be a third option:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while True:&#xA;    answer=input(&quot;Do you wish to continue?&quot;)&#xA;    if answer != &quot;yes&quot;&#xA;        break;&#xA;&#xA;print (&quot;Good bye&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Compared with the first, it is DRY, and compared with the second, you don't require the students to fake the loop condition to &quot;yes&quot; before running the loop.  (Yes, this could be transformed into a repeat-until, but I would say that is an uncessary transformation, though if done, could be done after writing the loop.)&lt;/p&gt;&#xA;" OwnerUserId="3799" LastEditorUserId="204" LastEditDate="2018-01-29T10:09:13.317" LastActivityDate="2018-01-29T10:09:13.317" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4269" PostTypeId="1" AcceptedAnswerId="4273" CreationDate="2018-01-29T10:39:38.017" Score="11" ViewCount="2240" Body="&lt;h1&gt;In an ideal teaching language&lt;/h1&gt;&#xA;&lt;p&gt;If the language directly supports them then the order to teach looping constructs seems simple.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Infinite loop: &lt;code&gt;forever&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Simple finite (bounded) loop: &lt;code&gt;repeat n times&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Bounded loops: &lt;code&gt;for i in list&lt;/code&gt; or &lt;code&gt;for i = 1...6&lt;/code&gt; (I am not sure which order these two should be in).&lt;/li&gt;&#xA;&lt;li&gt;Simple unbounded: &lt;code&gt;while condition&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Complex loops: all the rest.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However often the teaching language does not directly support these. This may be an argument for choosing a different language for teaching programming.&lt;/p&gt;&#xA;&lt;h1&gt;The problems that I am having&lt;/h1&gt;&#xA;&lt;p&gt;(I am teaching in Python).&lt;br /&gt;&#xA;I was teaching in the order I outlined for an ideal language, but are getting problems.&lt;/p&gt;&#xA;&lt;p&gt;For an infinite loop we use &lt;code&gt;while True&lt;/code&gt; in Python, however students ask or struggle with this. I can not explain it without explaining &lt;code&gt;while condition&lt;/code&gt;. So pupils have to hold something that they do not understand in their head.&lt;/p&gt;&#xA;&lt;p&gt;Similar for &lt;code&gt;repeat n times&lt;/code&gt; in Python it is &lt;code&gt;for n in range(5):&lt;/code&gt;, this is a lot to keep in ones head without understanding.&lt;/p&gt;&#xA;&lt;h1&gt;The question&lt;/h1&gt;&#xA;&lt;p&gt;So the question is “what to do?”. Do we start with&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bounded loops: &lt;code&gt;for i in list:&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Bounded loops: &lt;code&gt;for i in range(n):&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Simple unbounded: &lt;code&gt;while condition:&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Or do we do it some other way?&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-02-08T22:30:39.110" Title="Order to teach looping constructs in a non ideal language" Tags="|looping|lesson-order|" AnswerCount="7" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="4270" PostTypeId="2" ParentId="4269" CreationDate="2018-01-29T12:20:32.290" Score="4" Body="&lt;p&gt;Perhaps you are creating a problem where none exists. You seem to be assuming that looping needs to be covered all at once and all together, rather than distributed over some some longer range interspersed with other topics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The two fundamentally different kinds of looping are &lt;em&gt;definite&lt;/em&gt; in which the program knows how many iterations are necessary prior to the loop and &lt;em&gt;indefinite&lt;/em&gt; in which it does not. Those two concepts can be taught back to back so that the essential concepts are there. The others can wait a bit. Looping over a range or list can wait until you teach collections, for example. Infinite looping can be taught as either definite or indefinite (while True:...) depending on your language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I certainly would  &lt;em&gt;not&lt;/em&gt; choose a language based solely on its direct syntactic support for all of the possible loop forms. Most of them are excluded, in fact, to keep the number of keywords in a language to a reasonable number. Once the language is Turing Complete things can be built using idioms of the language and a student needs to become familiar with that idea (idiomatic programming) in any case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, looping, like everything else should be taught in a Spiral framework in which ideas are introduced correctly but incompletely early on and then returned to, reinforced and expanded later on. This is useful when teaching programming since languages are themselves recursive and so difficult to teach strictly linearly. But a Spiral pedagogical technique is also essential due to the way the mind works and the way people learn - via reinforcement and repetition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore simple ideas of looping can come early and more complex ones later. The level of explanation changes, since the early, simple, explanations fertilize the ground for the later ones, both expanding and deepening the knowledge. &lt;em&gt;Spiral&lt;/em&gt; is one of the fundamental &lt;a href=&quot;https://smile.amazon.com/Pedagogical-Patterns-Educators-Joseph-Bergin/dp/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-29T14:43:52.590" LastActivityDate="2018-01-29T14:43:52.590" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4271" PostTypeId="2" ParentId="4269" CreationDate="2018-01-29T12:28:29.710" Score="17" Body="&lt;p&gt;I prefer to teach &lt;code&gt;while&lt;/code&gt; loops as part of my unit on &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; statements since the syntax and thought process are virtually identical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I then introduce &lt;code&gt;for&lt;/code&gt; loops when teaching lists (in Python) or arrays (in Java).  With &lt;code&gt;for&lt;/code&gt; loops, language impacts which style you likely use first.  With Python, I use the &lt;code&gt;for item in list&lt;/code&gt; structure first.  In Java, I use the C style &lt;code&gt;(for i=0; i&amp;lt;...)&lt;/code&gt; loop first.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't try to introduce all styles of looping at once as I prefer to develop the concepts across units.&lt;/p&gt;&#xA;" OwnerUserId="192" LastEditorUserId="27" LastEditDate="2018-01-29T14:00:35.087" LastActivityDate="2018-01-29T14:00:35.087" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4272" PostTypeId="2" ParentId="4241" CreationDate="2018-01-29T14:28:26.000" Score="-3" Body="&lt;p&gt;Sure, start with the infinite loop, then teach ending conditions later. That is kind of how people learn lots of things: eat, later worry about getting overweight. Maybe we should simply teach all the kinds of &lt;em&gt;bugs&lt;/em&gt;, then get to how to actually think through a problem later. After all, doctors are taught about all the kinds of diseases. Health is just a byproduct, maybe, eventually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Structuring thought and approaching a problem are less important than the initial struggle to grasp the idea that some things in life repeat. It will come after a while. If they repeat the struggle enough. Wait...&lt;/p&gt;&#xA;" OwnerUserId="4225" LastActivityDate="2018-01-29T14:28:26.000" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4273" PostTypeId="2" ParentId="4269" CreationDate="2018-01-29T14:29:13.383" Score="5" Body="&lt;p&gt;While your ideal order makes sense, you really should try to plan the course based on the limitations of the language that you're working with. In this case, instead of thinking about the different conceptual loops, you should think about the different loop syntaxes that the language provides.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, the order in &lt;a href=&quot;https://cseducators.stackexchange.com/a/4271/58&quot;&gt;@Bryan R's answer&lt;/a&gt; (if/else -&gt; while -&gt; arrays -&gt; for) makes the most sense to me. Then, once you've finished teaching all the different sytaxes for loops, you can talk about how some loops are equivalent, for example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a = 2&#xA;i = 0&#xA;while i &amp;lt; 5 do&#xA;  a = a*2&#xA;  i = i+1&#xA;end&#xA;# Ends with a == 64&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;is the same as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a = 2&#xA;for (i = 0; i &amp;lt; 5; i++) {&#xA;  a = a*2;&#xA;}&#xA;# Ends with a == 64&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(also, see &lt;a href=&quot;https://cseducators.stackexchange.com/a/2634/58&quot;&gt;my answer to a different loop-related question&lt;/a&gt; about how for loops and while loops are really the same thing)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then show them your ideal loops, because those are a far better way to classify different types of loops than based on syntax alone, but they won't be able to see the importance of that classification until they are comfortable with the syntax for the different loops.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2018-01-29T14:29:13.383" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4274" PostTypeId="2" ParentId="4252" CreationDate="2018-01-29T14:55:59.830" Score="3" Body="&lt;p&gt;Most of the maths in undergraduate CS is proof by structural induction (and we do at least in part deserve the reputation we have among mathematicians of not knowing that there are other proof techniques). That technique apart, the &quot;non-CS&quot; maths can be more than covered by chapters 2 and 4 of &lt;a href=&quot;https://www.amazon.es/Concrete-Mathematics-Foundation-Computer-Science/dp/0201558025&quot; rel=&quot;nofollow noreferrer&quot;&gt;Concrete Mathematics&lt;/a&gt;, Graham, Knuth, and Patashnik, ISBN: 0-201-55802-5. This book contains many exercises and solutions thereof, or hints in the case of unsolved problems. There are PDFs available online, but I'm not sure whether they're authorised so I won't link to any.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2018-01-29T14:55:59.830" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4275" PostTypeId="2" ParentId="4269" CreationDate="2018-01-29T15:25:56.507" Score="8" Body="&lt;p&gt;All of the IF and Loop structures are based on two fundamental operations: Test and Branch. The only difference between an IF-Else and a Loop of any kind is whether you branch downward or back to the top. On a flow chart this just knocks you in the nose: the only difference is the arrowhead on one line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When something so varied and complex can be reduced to such simplicity, you know that it is a fundamental idea. Teach that idea first, and then show how it is implemented in all of the various structures as you introduce each one. Now your students understand that programming is not magic, it is not about memorizing incantations and syntax: it is about simple, logical analysis of a problem, exactly how people and animals have been breaking down problem solutions in to basic steps all along. There is nothing new or surprising here, and it need not be confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With this understanding, your students can absorb new structures and languages themselves, knowing that &lt;strong&gt;it has to be simple underneath&lt;/strong&gt;, because circuits are simple, and people are not really able to do vastly complex things without breaking them down in to steps. Test. Branch. Done.&lt;/p&gt;&#xA;" OwnerUserId="4226" LastActivityDate="2018-01-29T15:25:56.507" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="4276" PostTypeId="2" ParentId="4241" CreationDate="2018-01-29T15:31:51.743" Score="1" Body="&lt;p&gt;Some programming and coding workflows\patterns make the repetition rather insignificant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if one teaches to have constants set from the beginning, something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;init:&#xA;    questionText=&quot;Do you wish to continue?&#xA;    accept=&quot;good&quot;&#xA;    finished=&quot;good bye&quot;&#xA;&#xA;main code:&#xA;    answer=input(questionText)&#xA;    while answer==&quot;yes&quot;:&#xA;        print(accept)&#xA;        answer=input(questionText)&#xA;&#xA;    print(finished)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then if there was a mistake in the text,  (as there is in my example), it's very easy to fix, without needing to copy-paste.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for elegance, I agree that the second option is a bit more elegant. However, it forces the code to enter  the loop, and when teaching, it's far better to break an example into smaller parts, so as to allow students to understand each component separately, before they tackle the entire thing.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-01-29T15:31:51.743" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4277" PostTypeId="2" ParentId="4269" CreationDate="2018-01-29T20:43:14.823" Score="1" Body="&lt;p&gt;Maybe you could use physical objects to help students visualize how to utilize these loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example for the bounded loops: grab 5 apples, label them with some number, and show how you go through each apple (e.g., bite each of them one at a time).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the simple unbounded, try this: put a set of brand new apples on the table, ask if there are any of them that haven't been bitten yet. If so, then bite one, then ask again and bite another non-bitten apples until all of them are bitten.&lt;/p&gt;&#xA;" OwnerUserId="4231" LastEditorUserId="204" LastEditDate="2018-01-30T10:00:20.587" LastActivityDate="2018-01-30T10:00:20.587" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4278" PostTypeId="2" ParentId="4241" CreationDate="2018-01-29T20:59:34.523" Score="2" Body="&lt;p&gt;Of the two alternatives listed, I prefer the second, because it &lt;em&gt;Says It Once&lt;/em&gt;. (In this case, it's only a call to &lt;code&gt;input()&lt;/code&gt; but it's easy to imagine a case where some computation needs to be done as part of the test).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there's yet another way to write it. If I were to describe verbally what I'm trying to do, I would say something like &quot;Do some stuff (the body of the loop) at least once, and then keep doing it as long as the user wants to continue&quot;. And that can be expressed&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;first_time = True&#xA;while first_time or answer == &quot;yes&quot;:&#xA;    first_time = False&#xA;    answer=input(&quot;Do you wish to continue?&quot;)&#xA;&#xA;print (&quot;Good bye&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3925" LastActivityDate="2018-01-29T20:59:34.523" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4279" PostTypeId="2" ParentId="4065" CreationDate="2018-01-29T21:24:58.257" Score="2" Body="&lt;p&gt;That's really a nice question and I appreciate that you consider the noise around programing like version control (git) and coding style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;View things important to me are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Flowcharts:&lt;/em&gt;&lt;/strong&gt; or the art of coding on a piece of paper. When I was a student, our teacher insisted on designing the logic on paper before typing it into the machine. Maybe this sounds old school but for larger projects I still take the pencil first. This helps to understand and focus on logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Algorithms:&lt;/em&gt;&lt;/strong&gt; or defining the problem and finding a solution to it. Mostly C programs are likely command line programs and no full blown apps. So the best use  and challenge for C is to learn concepts of &lt;strong&gt;&lt;em&gt;Algorithms&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;Computing&lt;/em&gt;&lt;/strong&gt;&#xA;It's always fun to me to draw concepts on a whiteboard, this helps to get some imagination and creativity for the topic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Debugging:&lt;/em&gt;&lt;/strong&gt; or how to get to know what your machine is doing right now. Programming is like manipulating bits and bytes in the Memory (tag: Von Neumann architecture). To visualize what's going helps to understand what the machine is doing and much more help to find and understand your mistakes (semantic failures).&#xA;With the debugger you can walk through your code and see variable and memory change. Especially when it comes to different types, arrays, pointers, and memory location (stack, heap, registers, etc.) it is good to know how to look that up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you like to teach &quot;how to google their problem&quot; it would be an advice to teach how to &lt;strong&gt;&lt;em&gt;ask the right question&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="3216" LastEditorUserId="827" LastEditDate="2018-01-29T22:07:19.903" LastActivityDate="2018-01-29T22:07:19.903" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4280" PostTypeId="2" ParentId="4241" CreationDate="2018-01-29T22:35:29.347" Score="3" Body="&lt;p&gt;This is a really good place to introduce boolean variables (or just to use them, if they've already been introduced. It also introduces the idea of descriptive variable names.  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;user_wishes_to_continue = True&#xA;&#xA;while user_wishes_to_continue:&#xA;    answer = raw_input(&quot;Do you wish to continue?&quot;)&#xA;    if answer != &quot;yes&quot;:&#xA;        user_wishes_to_continue = False&#xA;&#xA;print (&quot;Good bye&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note: here I use &lt;code&gt;raw_input&lt;/code&gt;, which returns the user input as a string, rather than &lt;code&gt;input&lt;/code&gt;, which interprets the  user input as python code (meaning that you have to put &lt;code&gt;&quot;yes&quot;&lt;/code&gt; &lt;em&gt;with the quotation marks&lt;/em&gt; each time. &lt;/p&gt;&#xA;" OwnerUserId="4233" LastActivityDate="2018-01-29T22:35:29.347" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4281" PostTypeId="2" ParentId="4211" CreationDate="2018-01-29T23:58:53.397" Score="1" Body="&lt;p&gt;As others have already mentioned it depends on the level of education and maybe of interest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In college I had to study assembly for microcontroller programming. Although the 80s are a long time ago, ASM is a good language for DIY projects with small controllers like pic. Even the good old 8086 is still used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the university, we used assembly - as mentioned in the question - for OS bootstrapping. I think, especially in CS, it's good to know what happens when you start the operating system. Just to demystify all the magic happening at system start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It became especially important in the malware analysis. Programs were compiled and reverse engineered. C code -&gt; machine code -&gt; assembly code and vice versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gave a good insight into the workings of compilers and processors and how, for example, even machine-level data types are handled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Allreay said, it depends on the level of education and the audience.&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2018-01-29T23:58:53.397" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4282" PostTypeId="1" CreationDate="2018-01-30T11:47:38.910" Score="14" ViewCount="3820" Body="&lt;p&gt;I was reading the abstract for this research paper: Yan, L., McKeown, N., Piech, C.: &lt;em&gt;Using programming assignment work patterns to understand excessive collaboration in large CS classes&lt;/em&gt;, in &lt;a href=&quot;http://easychair.org/smart-program/SIGCSE2018/2018-02-22.html#session:20856&quot; rel=&quot;noreferrer&quot;&gt;SIGCSE 2018, Baltimore, USA, 2018&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As computer science classes grow, instructor workload also increases:&#xA;  teachers must simultaneously teach material, provide assignment&#xA;  feedback, and monitor student progress. At scale, it is hard to know&#xA;  which students need extra help, and some students can resort to&#xA;  excessive collaboration, using online resources or relying heavily on&#xA;  peer code, to complete their assignment. In this paper, we present&#xA;  TMOSS, a tool that analyzes the intermediate steps a student takes to&#xA;  complete a programming assignment. We find that students who exhibit&#xA;  excessive collaboration typically deviate from the standard work&#xA;  pattern, use fewer class tutoring resources than their peers, and&#xA;  perform worse on assessments. Our goal is to identify students at-risk&#xA;  of plagiarizing, so we can intervene and provide additional class&#xA;  resources to help them succeed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, my question is: where should the line between &lt;strong&gt;excessive collaboration&lt;/strong&gt; and &lt;strong&gt;plagiarism&lt;/strong&gt; be drawn?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="897" LastEditDate="2018-01-30T19:17:27.770" LastActivityDate="2018-02-08T04:41:57.703" Title="When does excessive collaboration become plagiarism?" Tags="|plagiarism|collaboration|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4283" PostTypeId="2" ParentId="4282" CreationDate="2018-01-30T12:08:01.967" Score="5" Body="&lt;p&gt;To plagiarise, all one has to do is not be honest about where the work come from. It matters not how much you copy, however if you copy a very small amount without any references, then this is probably ok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This abstract seems not to be, &lt;strong&gt;mainly&lt;/strong&gt;, about plagiarism. But mainly about learning (plagiarism is about assessment). Detecting pupils that are focused on the goal of the secondary task, instead of the primary task of learning. The secondary task is just a way to achieve that learning. So instead of doing the tasks they skip strait to the goal. Often by finding a completed solution from a peer or on the inter-web. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-01-30T12:08:01.967" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4284" PostTypeId="2" ParentId="4269" CreationDate="2018-01-30T12:12:23.983" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;For an infinite loop we use &lt;code&gt;while True&lt;/code&gt; in python, however students ask or struggle with this. I can not explain it without explaining while condition. So pupils have to hold something that they do not understand in their head.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Could you restructure this to something that makes sense to your students in plain English?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;programShouldRun = True&#xA;&#xA;while programShouldRun:&#xA;    doStuff()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Call your boolean variable whatever makes sense in the context you're working in, whether that is &lt;code&gt;programShouldRun&lt;/code&gt;, &lt;code&gt;answerNotFound&lt;/code&gt;, &lt;code&gt;fileStillHasLines&lt;/code&gt;, etc.&lt;/p&gt;&#xA;" OwnerUserId="4239" LastActivityDate="2018-01-30T12:12:23.983" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4285" PostTypeId="2" ParentId="4282" CreationDate="2018-01-30T13:45:10.380" Score="9" Body="&lt;p&gt;First of all, there is no straightforward, accepted answer to this question.  Reasonable people define plagiarism differently, and there will be students who will play around at the very edges of what you consider to be plagiarism &lt;em&gt;no matter where you hold that line&lt;/em&gt;.  My answer is in the context of a classroom teacher in the USA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The single most important thing that you need to do is to &lt;em&gt;create a policy that draws the dividing lines as carefully as you can.&lt;/em&gt;  Sometimes, a computer science department will create a plagiarism policy together.  In many ways, this is ideal, though it can constrain your instruction as well.  Within such a policy should be both the formal specifications, as well as an underlying principle that guides it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to very high bars of evidence that I have had to meet, I have not had a tremendous amount of support when addressing plagiarism anywhere that I have worked, so it has fallen to me to work relatively independently.  For years, I had strict policies, and found plagiarism around every corner. I would try to work with administration and I would provide penalties to the students in question, but I discovered that &lt;strong&gt;I was ultimately paying a very high psychological price for this&lt;/strong&gt;.  I started to become distrustful of my students, and it made me simply like them less.  This was a disaster for me a teacher.  I really wanted to be able to trust my students, and I couldn't shake the feeling that it was ultimately &lt;em&gt;my own policies and practices&lt;/em&gt; that were setting the table for these regular heartbreaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it was time to break things down and rethink it from the ground up.  I knew that I wanted to encourage pair programming, so this already muddied the waters considerably.  I have a habit of giving quite difficult labs, because I want my students to wrestle with meaningful, weighty problems.  If I left my students without access to Google and StackOverflow, no one would be able to complete them.  I also wanted to begin to grade my students with code interviews for a huge number of reasons, which would also give me a chance to assess whether the student understood what they had submitted.  And finally, I have created a system of retakes with tests and quizzes that ensures a bare minimum of mastery of the material.  (This system has not been discussed anywhere on CSE yet, or I would link to it.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This left me with a starting point of pedagogy.  I &lt;em&gt;want&lt;/em&gt; my students to tackle these problems, and to put time, thought, and care into finding good solutions.  I &lt;em&gt;want&lt;/em&gt; them to pull out a piece of paper, or walk over to the whiteboard, or pull a friend over, to try to figure out whether they were heading down a good path.  I &lt;em&gt;want&lt;/em&gt; them to work in Driver/Navigator pairs (if they so choose).  I have provided challenges appropriate to this level of work and thought.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, I made the following decisions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Labs would not be worth a tremendous percentage of the grade.  This diminishes the inclination to cheat in the first place.  I explain to my students that the main purpose of the labs is to be able to practice the curricular material with substantial problems.  It also frees me up to be more helpful with kids who get stuck, because the relative grade advantage is not substantial.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Student Rule:&lt;/strong&gt; Everything, everything, &lt;em&gt;everything&lt;/em&gt; must be cited in comments.  That includes SO visits (including links), conversations with friends working on the same lab, time spent with a tutor... I wanted a list.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Student Rule:&lt;/strong&gt; You may not write any code into your lab that you don't fully understand.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Student Rule:&lt;/strong&gt; You may ask help from a peer, but you may not look at each others code, and the person being asked for help cannot outline their own solution.  &lt;em&gt;Exception:&lt;/em&gt; if student A asks student B for help, and student B has completed (and submitted) the lab, student B may be permitted to look at student A's code, though B still may not describe their own solution.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Number 1 allows me to relax a little, and demotivates cheating.  Since the tests and quizzes are largely where students grades are determined, this is where I must watch students carefully.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Number 2 gives me a pretty good sense right away of how much trouble the student had with the exercise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Number 3 is easy to check in my environment, since I do code interviews with the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Number 4 is still a little sticky. I remind them of the line, I remind them of its purpose, and I tell them that this is not a &quot;letter of the law&quot; policy; it's a guideline so that they can use to understand my thinking. Stupid shenanigans (&lt;em&gt;&quot;I didn't describe my solution! I made a graph that illustrated it!&quot;&lt;/em&gt;) here is not okay.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-08T04:41:57.703" LastActivityDate="2018-02-08T04:41:57.703" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4286" PostTypeId="2" ParentId="4282" CreationDate="2018-01-30T14:13:50.277" Score="15" Body="&lt;p&gt;I'm presenting this as an answer to preserve it. It isn't a direct response to the question, I know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me draw out a conclusion from &lt;a href=&quot;https://cseducators.stackexchange.com/a/4285/1293&quot;&gt;@BenI.'s answer&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The plagiarism &quot;problem&quot; in education seems to flow from a (IMO) misguided notion that all student intellectual growth must flow from that individual only without any collaboration whatever. I used to believe that myself, especially when teaching math, but less so in CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certainly work in isolation can lead to A-Ha moments that indicate growth, but can also lead to deep frustration and abandonment. But collaborative work while it may lessen the former somewhat certainly tends to eliminate the latter. Many years ago, when I was a math student, most academic papers were by individuals. That is much less so now, and in CS, collaborative work is the norm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Try to teach and organize your course so that plagiarism isn't an issue.&lt;/strong&gt; Encourage peer work, peer teaching, peer evaluation, and all the rest. Find a way to evaluate individuals without requiring that their work be done in isolation. It better matches the work-a-day world that many of them will enter eventually. It reduces headaches, guilt, punishment. It encourages learning, sharing, and growth. Be a shepherd, not a judge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How you do it is a question of course organization and project selection. Permitting collaboration also allows you to utilize larger, more challenging, projects than you might be comfortable with otherwise. You can impose rules in programming courses, of course, requiring role changes while pair-programming (driver &amp;lt;-&gt; navigator) for example. You can sometimes choose teams or pairs yourself, and sometimes let them choose. For larger teams you can even use sandlot-baseball team choosing, which I've found to work. (You choose captains, the captains alternately choose additional members until everyone is on a team).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't just &lt;em&gt;permit&lt;/em&gt; them to work together. Try to find a way to &lt;em&gt;require&lt;/em&gt; them to do it. It is harder for off-site assignments, but not always impossible, especially if your institution provides some sort of common workspace for students. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The cited research seems to be about improving teaching, not about detecting plagiarism. No student should be accused of plagiarism based on statistical measures only. The paper seems to correctly make that point.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-01-30T14:13:50.277" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4287" PostTypeId="2" ParentId="4269" CreationDate="2018-01-30T15:27:34.740" Score="2" Body="&lt;p&gt;I only ever taught my fellow students but this method was the one that everyone seemed to get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a track, and there's a runner, he's running forever. When you type that &lt;code&gt;while&lt;/code&gt; in, you're telling him to do something &lt;em&gt;while&lt;/em&gt; he runs. Then you put a condition near the while, which is almost the same thing as a hurdle that is put in on the track. The runner has to pass this hurdle each time he completes one lap around the track, that's your loop. Your loop has to pass this check every single time it starts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I give an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;While (People are watching)&#xA;    Run()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The runner will stop after all the spectators have stopped watching him at the start of the next loop. He will get to the hurdle and notice that nobody is watching him and he will lose all motivation and then fall over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now if we want to tell the runner to run forever, we just have to make the hurdle so low that it can't possibly be false:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;While (You are running)&#xA;    Run()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This is the same thing as the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;While (True)&#xA;    Run()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, this isn't formatted for python or anything else, you can modify this to suit whatever coding language you're teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps someone.&lt;/p&gt;&#xA;" OwnerUserId="1972" LastActivityDate="2018-01-30T15:27:34.740" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4288" PostTypeId="1" CreationDate="2018-01-30T19:36:20.023" Score="4" ViewCount="256" Body="&lt;p&gt;In light of &lt;a href=&quot;https://cseducators.stackexchange.com/questions/666/justification-for-an-objects-early-approach-to-introductory-programming&quot;&gt;this question&lt;/a&gt; (and many others on this site), I have been noodling around with the idea of reversing my &lt;a href=&quot;https://apcentral.collegeboard.org/courses/ap-computer-science-a/course&quot; rel=&quot;noreferrer&quot;&gt;AP Computer Science A&lt;/a&gt; course and taking an Objects-Early approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm having a bit of trouble conceptualizing the whole thing, however.  How would a class like this begin?  What is a first activity that the students can actually do in an objects paradigm?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-02-01T14:52:18.353" Title="How to START an Objects-First Course" Tags="|object-oriented-paradigm|objects-first|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4289" PostTypeId="2" ParentId="4288" CreationDate="2018-01-30T20:10:55.137" Score="3" Body="&lt;p&gt;The book “a touch of class” — bertrand meyer. Teaches Object orientation in a first year undergraduate cause. He claims that in his course he teaches Eiffel, then a bunch of other OO languages at the end (C#, Java, …) quicker than any of the others can be taught alone.&lt;/p&gt;&#xA;&lt;p&gt;This seems reasonable, as Eiffel is very well mapped to OO. There is on the most part a one to one mapping between Eiffel and OO. This makes it much easier to learn. There are few gotchas (there is one), few work arounds.&lt;/p&gt;&#xA;&lt;p&gt;What is more all the nice new stuff from C# (possibly also Java), came from Lisp or Eiffel (generics, contracts, get/set properties).&lt;/p&gt;&#xA;&lt;p&gt;Simple syntax&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class&#xA;    HELLO_WORLD&#xA;create &#xA;    make &#xA;feature &#xA;    make&#xA;        do&#xA;            print (&amp;quot;Hello, world!%N&amp;quot;)&#xA;        end&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Every keyword word can be explained in lesson 1&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;class&lt;/code&gt; says we are declaring a class, maybe the hardest to explain in lesson1. A class is a mini-program / sub-program.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;create&lt;/code&gt; says here comes a list of creation methods, that is methods used to create the object (constructors for those used to other OO languages).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;feature&lt;/code&gt; says here is a list of features (methods).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;do&lt;/code&gt; tells us that the make feature is a method (not a variable).&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;print&lt;/code&gt; says to display text.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;end&lt;/code&gt; ends a feature or a class.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In Java we also have &lt;code&gt;class&lt;/code&gt; then &lt;code&gt;public&lt;/code&gt; &lt;code&gt;static&lt;/code&gt; &lt;code&gt;void&lt;/code&gt; &lt;code&gt;main&lt;/code&gt; &lt;code&gt;(&lt;/code&gt; &lt;code&gt;String&lt;/code&gt; &lt;code&gt;[]&lt;/code&gt; &lt;code&gt;args&lt;/code&gt; &lt;code&gt;)&lt;/code&gt; all of which you have to persuade your pupils to ignore, because it is not time to explain them today.&lt;/p&gt;&#xA;&lt;h1&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;My advice is about removing unnecessary complexity. I believe that much of the complexity of OO is unnecessary.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-01-30T20:46:02.403" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4290" PostTypeId="2" ParentId="4288" CreationDate="2018-01-30T20:40:26.453" Score="4" Body="&lt;p&gt;I'll try not to write a book as an answer here, but my experience with this is long and deep. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing you need to know is that you don't start with just the programming language itself. If you try to teach integer variables and 'if' and 'while' statements before you get to objects you may fail. I'm going to assume that your intention is to teach a first course that is also objects first. The students in a course like that might have no prior computing experience, though some will have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key to a successful course is to teach object-oriented problem solving, and &lt;em&gt;not&lt;/em&gt; an object oriented language. In fact teaching problem solving via programming should be the objective of any first course no matter the paradigm. You want the students to learn to &lt;em&gt;use&lt;/em&gt; objects and you want them to learn to &lt;em&gt;create&lt;/em&gt; objects and you want them to be able to &lt;em&gt;define&lt;/em&gt; new kinds of objects. But you don't need to do those all at once. You can spread it out over a short period of time - days, not weeks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key is proper scaffolding, written (or found) by you. The students work within a defined framework that can be quite complete (even Turing Complete). Another big idea that you want to believe yourself and teach your students is that an object is a &quot;bundle of behavior.&quot;  Never mind instance variables (fields) at the beginning and never mind getters and setters. Define for the students one or more kinds of objects and their behaviors. I've done this with most OO languages and all of them can be introduced the same way. I'll focus on Java for the rest of this, as it is the language of APCSA. It is also a good, though not perfect, OO language widely used in industry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a lot of experience with Karel J Robot (KJR) so let me describe how it can be used as an introduction, that might take half of the first course in computing and teach students &lt;em&gt;how to program&lt;/em&gt;. It is not, however, specifically tied to APCSA, nor does it cover every topic needed by your students. But in about half the first course, students will be able to write serious programs that require deep thought. At the end, I'll try to list many of the things not covered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The KJR world is a simulation in which one or more robots can be created and which have a few &lt;em&gt;behaviors&lt;/em&gt;. The &quot;world&quot; of the robots is a rectangular grid and one or more robots can occupy an intersection. An intersection can also contain one or more movable &quot;beepers&quot; that robots might pick up or put down. Infinitely many beepers (effectively a beeper making machine) is also possible at an intersection. A robot always faces in one of the cardinal directions North, South, East, or West. A robot can perform one of five primitive actions: move, turnLeft, pickBeeper, putBeeper, and turnOff. Those are your primitive behaviors and when the student begins programming, nothing else is known, though some additional things are revealed later in the course. In particular, a robot doesn't &quot;know&quot; where it is in the world. The world can also contain walls between intersections that will block forward movement and cause an error if a robot attempts to move through them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what kinds of programs can you write (using only &lt;code&gt;main&lt;/code&gt; and the primitives? Well, to a programmer they are pretty boring: Move forward three blocks, pick up the beeper that is there and return to the initial position and direction. The solution is just a sequence of primitive actions, of course: move(); move();...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students see a bit of syntax in the language and think in terms of the behaviors and nothing else. The learn about statement sequences, the most primitive &lt;em&gt;control&lt;/em&gt; structure of  programming (arguable, I guess). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next they get a much more complex problem (first day's homework), which if solved with only sequences of primitives is unwieldy. It is obvious that something better must exist. But if you choose that program correctly you can notice that there are patterns in the solution. Even in the first assignment the robot had to turn around twice and had to move three blocks twice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the second day you discuss the homework and find the repeated sequences of instructions. Now you introduce a new class (their first view of a class) in which you get newly defined behaviors. This class is a subclass of the most primitive class. You are introducing inheritance (too early perhaps, but essential in KJR). The new class has a few additional methods: turnAround(), moveMile()... Note that it is too early to introduce parameters. All of the methods so far, and for a long way in KJR, are mutators, the state of the robot is changed in some way. But the notion of a mutator is in no way linked to any idea of a &quot;setter.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you have the basic framework of problem solving. Define a new class. Within it define new behaviors. Create robots with new... and exercise the new behaviors to satisfy some programming task. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note what is NOT done. There is never any speculative class writing. All classes are purpose built to solve some small part of a larger problem. The book talks about the decomposition process in detail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are now in the third day of class and have covered three chapters of the book. The fourth chapter is much deeper and discusses polymorphism, largely by showing how the Strategy design pattern can be used to modify the behavior of a given robot without writing a new robot class. Instead Strategy classes (and Decorators) are used to build a much more sophisticated model of computing. This chapter requires several days. It introduces object-valued variables which up to now have only referred to robots. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fifth chapter introduces selection and there the student learns about booleans as well as the fact that robots also have some self knowledge. However, there are no methods returning information about the current location or explicit direction. A robot can respond true or false whether its front is clear (no wall) or if it is facing North, or if there is a beeper on the current intersection, etc. All of these &lt;em&gt;accessor&lt;/em&gt; methods return booleans, so the student can now write conditional statements, which opens the door to more sophisticated exercises. These accessors are not &quot;getters&quot; either in concept or in fact. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The sixth chapter is repetition, but note that the student already has a good knowledge of the nature of computer programming and they haven't seen any of the primitive data of Java other than boolean. &lt;code&gt;For&lt;/code&gt; loops are introduced here, so integers are used, but only in simple ways - step counting, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later chapters (they are all pretty short) cover recursion and even concurrency. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key to all of this, however, was a well thought out scaffolding structure in which the students can learn deep lessons in a way that you can control and in which it is harder to go astray in the minute details that you find with integer operators, float/double, ... The point isn't to teach Java as a language, but how to think like a programmer - specifically as an OO programmer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The BIG idea&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java defines a logically consistent virtual world in which students can program without reference to lower level (machine level constructs) and can create consistent mental models without having to mentally compile their code to bits. A well designed simulation defines a yet higher level virtual world that if (Turing) complete can be used without reference to lower level constructs to solve any problem. That is very powerful. Robots can sort (piles of beepers) for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A slightly smaller idea is that you, the instructor, should think about &lt;em&gt;what not to teach&lt;/em&gt;, especially at the beginning, as you do about &lt;em&gt;what to teach&lt;/em&gt;. Teaching a complete subset intensely can be more powerful than teaching &quot;the whole enchilada&quot; at a shallower level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Caveats&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the instructor skips the polymorphism chapter, students will come away with the unfortunate view that OO programming is all about inheritance as all of the robot classes must derive from a simpler such class. In fact, OO is really all about building &quot;bespoke&quot; or &quot;tailor made&quot; objects out of parts that are also objects. Skipping polymorphism also gives the impression that selection and repetition are all you need in order to know &quot;how to program&quot;, that they are the &lt;em&gt;real thing&lt;/em&gt;, an impoverished view IMO. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;KRJ is not the only way that you can implement this general course framework. The &lt;a href=&quot;https://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; system is a simulation rich world in which you can build similar (or not so similar) things and use the same general plan. There is an associated instructor site, the Greenroom, to which teachers have contributed many simulations. The general idea there is a World in which Actors can move, turn, interact, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is missing&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The big one is counting with integer variables (other than simple &lt;code&gt;for&lt;/code&gt; loops). One issue with teaching int and counting early is that from then on every problem becomes a counting problem, so students wind up with a poor mental tool kit. If you teach counting later, rather than earlier, students need to think harder about problems. You can &quot;count&quot; with decorators and encapsulate the actions themselves, rather than just the count in a (strategy) variable. You also can teach recursion without having to justify it as an alternative to counting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no discussion in KJR of many of the things we love, arrays, for example, collections, iterators, and such. There is a companion book that covers most of what would normally appear in a first course but it assumes the students can already write sophisticated programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;APCSA&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past Karel was used a lot by AP teachers, but the course has changed as has the exam. I've never tried to use it to teach APCSA. I'm sure there are many things missing that the instructor would need to add to a complete course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-01-31T13:42:05.203" LastActivityDate="2018-01-31T13:42:05.203" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4291" PostTypeId="2" ParentId="4288" CreationDate="2018-01-30T23:26:18.013" Score="2" Body="&lt;p&gt;I have used the following approach successfully.&#xA;Know the outcomes you are teaching to, and use your materials and tools to achieve them.  My goal is to develop strong computational problem-solving skills and methodologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the foundation I use to leverage an early objects approach with no prior experience:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Introduce the idea of objects and &lt;strong&gt;interact&lt;/strong&gt; with them by sending&#xA;messages to them to get them to &quot;do work&quot;.&lt;/li&gt;&#xA;&lt;li&gt;Use a visual representation of this.&lt;/li&gt;&#xA;&lt;li&gt;Create examples where the students are required to solve simple problems - and teach them a repeatable process for &lt;strong&gt;solving problems&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Introduce the idea of an &lt;strong&gt;algorithm&lt;/strong&gt; and the fundamental operations any/all algorithms use: sequential; conditional; and iterative.&lt;/li&gt;&#xA;&lt;li&gt;Provide demonstrations of each of those operations in exercises.&lt;/li&gt;&#xA;&lt;li&gt;Transition to a scripting language or block structured programming that supports those operations.&lt;/li&gt;&#xA;&lt;li&gt;Shift into an actual programming language and development environment.&lt;/li&gt;&#xA;&lt;li&gt;Add new OO ideas and language mechanics within this framework, by making changes to the classes, or adding interactions between objects. I have found it highly effective to re-use many of the samples by adding on features or enhancements to the functionality or interactions. Like a spiral approach to teaching, adding additional depth or details in subsequent iterations.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I would take 6-8 weeks at the start of any intro class to establish this foundation and way of thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I make use of a custom version of the Greenfoot Karel J Robot simulator, but any similar environment will do (see references below).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As project work I encourage my AP students to design and create their own working versions of these Robot Simulations from scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;References&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lightbot.com/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Light Bot&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; and &lt;a href=&quot;https://greenroom.greenfoot.org/resources/3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot Karel J Robot&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0970579519&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karel J Robot : A Gentle Introduction to the Art of Object Oriented Programming&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0619217243&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java: Learning to Program with Robots&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0134477367&quot; rel=&quot;nofollow noreferrer&quot;&gt;Objects First With Java - A Practical Introduction Using BlueJ&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="1293" LastEditDate="2018-01-31T14:35:07.033" LastActivityDate="2018-01-31T14:35:07.033" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4292" PostTypeId="2" ParentId="666" CreationDate="2018-01-30T23:36:51.007" Score="2" Body="&lt;p&gt;An Early Objects approach should focus on problem solving techniques based on object interactions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your focus is to teach a (specific) programming language you should indeed have an objects late approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key difference between early/late objects is the thinking paradigm you establish for your students.  You want the most important ideas and skills to be the ones most frequently used/repeated. Sometimes it can be more difficult to &quot;unlearn&quot; something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a good and relevant post elsewhere (&lt;a href=&quot;https://cseducators.stackexchange.com/questions/4288/how-to-start-an-objects-first-course/4291&quot;&gt;How to START an Objects-First Course&lt;/a&gt;) that has some useful ideas worth considering.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="3840" LastEditDate="2018-02-01T03:47:29.403" LastActivityDate="2018-02-01T03:47:29.403" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4293" PostTypeId="2" ParentId="4282" CreationDate="2018-01-31T23:08:51.957" Score="5" Body="&lt;p&gt;Two answers are possible: a direct answer to the explicit question(s), and a response to the implications for education hinted at by the excerpt.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;The written questions&lt;/h1&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When does excessive collaboration become plagiarism?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It never can.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[W]here should the line between excessive collaboration and plagiarism be drawn?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Such a &lt;em&gt;line&lt;/em&gt; cannot exist.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Why?&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Definition&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As &lt;a href=&quot;https://cseducators.stackexchange.com/users/204/ctrl-alt-delor&quot;&gt;ctrl-alt-delor&lt;/a&gt; covered in his &lt;a href=&quot;https://cseducators.stackexchange.com/a/4283/104&quot;&gt;answer&lt;/a&gt;, plagiarism is claiming the words/ideas of someone else as your own. To verify that I searched, and read, many definitions from dictionaries, online references, academic and professional sources. The summation of all those sources is that using the material, or work, of someone else and presenting it as your own is the primary factor, or offense, of plagiarism. The nearest I could find for an official definition of plagiarism was in a fact sheet from the &lt;a href=&quot;https://www.whitehouse.gov/ostp/&quot; rel=&quot;noreferrer&quot;&gt;Office of Science and Technology Policy,&lt;/a&gt; in 1999:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plagiarism is the appropriation of another person's ideas, processes, results, or words without giving appropriate credit, including those obtained through confidential review of others' research proposals and manuscripts.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Source: &lt;a href=&quot;https://clintonwhitehouse3.archives.gov/WH/EOP/OSTP/html/9910_20_2.html&quot; rel=&quot;noreferrer&quot;&gt;Executive Office of the President, Office of Science and Technology Policy, Fact Sheet, Oct. 14, 1999&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After review, and an appropriate comment period, it was finally edited to read:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plagiarism is the appropriation of another person's ideas, processes, results, or words without giving appropriate credit. Research misconduct does not include honest error or differences of opinion.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Source: &lt;a href=&quot;https://www.gpo.gov/fdsys/pkg/FR-2000-12-06/pdf/00-30852.pdf&quot; rel=&quot;noreferrer&quot;&gt;Federal Register Vol. 65, No. 235, Dec. 6, 2000, pg 76262&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find one good academic source:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plagiarism is presenting someone else’s work or ideas as your own, with or without their consent, by incorporating it into your work without full acknowledgement.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Source: &lt;a href=&quot;https://www.ox.ac.uk/&quot; rel=&quot;noreferrer&quot;&gt;University of Oxford&lt;/a&gt;, &lt;a href=&quot;https://www.ox.ac.uk/students/academic/guidance/skills/plagiarism?wssl=1&quot; rel=&quot;noreferrer&quot;&gt;Plagiarism&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Their discussion continues with the comment:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The necessity to acknowledge others’ work or ideas applies not only to text, but also to other media, such as &lt;strong&gt;computer code&lt;/strong&gt;, illustrations, graphs etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Emphasis mine&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Discussion&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The question places &lt;em&gt;collaboration&lt;/em&gt; and &lt;em&gt;plagiarism&lt;/em&gt; as possible coexistent concepts. They are not, as recognized in a &lt;a href=&quot;https://cseducators.stackexchange.com/q/4282/104#comment-9969&quot;&gt;comment&lt;/a&gt; by &lt;a href=&quot;https://cseducators.stackexchange.com/users/4104/mickeyf&quot;&gt;mickeyf&lt;/a&gt;. If two (or more) students are collaborating (working together) on a project, neither can plagiarize the other's work. &lt;a href=&quot;https://www.knowyourphrase.com/there-s-no-i-in-team&quot; rel=&quot;noreferrer&quot;&gt;&quot;There is no &lt;strong&gt;&lt;em&gt;I&lt;/em&gt;&lt;/strong&gt; in &lt;strong&gt;&lt;em&gt;team&lt;/em&gt;&lt;/strong&gt;&quot;&lt;/a&gt;. [The excerpt also mentions &lt;em&gt;using online resources&lt;/em&gt; and &lt;em&gt;relying heavily on peer code&lt;/em&gt;, both of which could be plagiarism if not acknowledged.] It is possible that the habit of doing very little work in collaboration with others could &lt;em&gt;lead to&lt;/em&gt; plagiarism, making the student &lt;em&gt;at-risk of plagiarizing&lt;/em&gt;, as the excerpt noted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible, in very rigid, or high-stakes, environments, to be morally obligated to &lt;em&gt;cite&lt;/em&gt; sources of inspiration, such as from casual interactions with others, to acknowledge their input. The &lt;a href=&quot;https://ori.hhs.gov/&quot; rel=&quot;noreferrer&quot;&gt;U.S. Department of Health &amp;amp; Human Services, The Office of Research Integrity&lt;/a&gt;, in their section on plagiarism, &lt;em&gt;&lt;a href=&quot;https://ori.hhs.gov/plagiarism-5&quot; rel=&quot;noreferrer&quot;&gt;Acknowledging the Source of Our Ideas&lt;/a&gt;&lt;/em&gt;, covers some research published by &lt;a href=&quot;http://nwkpsych.rutgers.edu/~alan/&quot; rel=&quot;noreferrer&quot;&gt;Alan Gilchrist&lt;/a&gt; in a 1979 &lt;em&gt;Scientific American&lt;/em&gt; &lt;a href=&quot;http://nwkpsych.rutgers.edu/~alan/Gilchrist_Scientific_American_1979.pdf&quot; rel=&quot;noreferrer&quot;&gt;article&lt;/a&gt; where Mr. Gilchrist purportedly felt obligated to credit a source outside of the normal research he conducted. Holding students to that standard in the classroom would require them to credit the instructor, the textbook, and likely half of their classmates, in every program they wrote. It would be interesting to see a class project with a comments section listing &lt;em&gt;sources&lt;/em&gt; that was longer than the code itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The objective of the classroom experience ought to be learning, the instilling of knowledge, habits, and patterns of thought, into the minds of the students. When collaboration is part of that process, there is no need to be looking for the evils of plagiarism where it cannot exist. When, however, the &lt;em&gt;excessive&lt;/em&gt; collaboration, or other impediments, interfere with the process, then they need to be addressed. That, however, is unlikely to be the result of any &lt;em&gt;bright-line&lt;/em&gt; test or standard. Rather, it is likely to come from the instructor's observation of patterns of behavior, and work, exhibited by the students affected.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;The educational implications&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;To begin with, the excerpt seems to be the rationale (or sales pitch) for the authors' new tool, &lt;em&gt;TMOSS&lt;/em&gt;, rather than a warning to instructors, or an indictment of students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The authors give excessive collaboration as one factor that could identify &lt;em&gt;students at-risk of plagiarizing&lt;/em&gt;. They neither claim that it &lt;em&gt;is&lt;/em&gt; plagiarism, nor that it is the only factor that leads to being at-risk. The apparent objective is to identify students in need of additional help in the class, not to weed out or identify plagiarists: &quot;it is hard to know which students need extra help,&quot; and &quot;so we can intervene and provide additional class resources to help them succeed.&quot;[ibid.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The implications are that when students become more dependent on the assistance of others, and outside sources, for results, they develop malformed habits that reduce their learning, and perhaps affect their future work as well. Prefaced with the presumption that the classroom experience is intended to &quot;educate&quot; the students, finding those that might need extra help using any tool available can be helpful. If noticing that a student is engaging in excessive collaboration (though I have no clue what level is considered &lt;em&gt;excessive&lt;/em&gt;) can help to alert the instructor to a student that needs additional help, or needs guidance in study/work habits, it may be worth considering that approach. It is possible, however, that students who engage in excessive collaboration are developing work habits which will lead to greater success in software development, especially in Open Source development, than their peers. Teaching the students how to &lt;em&gt;learn&lt;/em&gt;, not how to work, seems more appropriate to the educational system, including Computer Science curricula. Teaching them how to &lt;em&gt;work&lt;/em&gt; seems more appropriate in vocational training or rehabilitation.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-01-31T23:08:51.957" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4294" PostTypeId="2" ParentId="666" CreationDate="2018-02-01T04:34:34.097" Score="3" Body="&lt;p&gt;This started as a comment, but got too long, and I realized I was moving well into answer land.  Understand I'm not a teacher with a class full of kids, so this may be too esoteric of a way to look at the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I have worked with students at different times from different types of backgrounds. Those who were in classes where OO programming is taught first took longer to produce their first working application, but when there was a working application it was far in advance of what their peers in a functional programming first class are doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I admit I learned functional programming first, then progressed to OO programming later, but that was because in 1975 there were not many OO languages available to a high school student using the school's teletype. Xerox had decided that Smalltalk was cute but had no commercial value, so the paradigm appeared dead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start with the understanding that Object Oriented Programming is a way of analyzing and structuring problems, and is not tied to any language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need an OO language to write OO programs. I have seen OO programs written in COBOL (not OO COBOL, which is neither OO nor COBOL). I built OO frameworks in K&amp;amp;R C, back when C++ was mostly an academic novelty. I have seen and built OO programs in BASIC (as in &quot;10 let x=1&quot;, not the modern Visual BASIC which is a blending of BASIC and PASCAL).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach the concepts of dealing with an entity. There is the entity, its attributes, and methods for it to interact with the outside world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In COBOL, you might embed the entity and attributes in a copybook, then the methods in nested programs (the lack of scope in COBOL sucks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In C, it might be a struct in a .h file and a function library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In OO languages, use the languages natural paradigm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personify your objects. Use pronouns like &quot;he&quot; and &quot;she&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach to build the logic in the entity's method, and keep the methods very simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show that a complex method means that the solution is either housed at the wrong level or not clearly borken out. If they are taught this from the beginning, a lot of issues that require retraining can be avoided.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-02-01T04:34:34.097" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4295" PostTypeId="2" ParentId="666" CreationDate="2018-02-01T13:56:13.793" Score="8" Body="&lt;p&gt;&lt;strong&gt;tl;dr: When you teach with the OO paradigm, you get to control the flow of ideas and the level of complexity at any moment.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here we examine the first course in computing, no matter the educational level. Presumably this is for a formal course, though it can be adapted to self-study. Presumably the students have mixed ability and backgrounds, neither all superstars nor laggers.&lt;/p&gt;&#xA;&lt;p&gt;In my view, the &lt;em&gt;purpose&lt;/em&gt; of the first course is to teach students &lt;strong&gt;how to program&lt;/strong&gt;. It is not to teach them a particular language, and not to teach them the esoterica of that language. How you proceed in practice depends on your own background (the teacher or learner) and on the language you choose. Actually the dependency is not on the language itself, but on the paradigm that the chosen language embodies.&lt;/p&gt;&#xA;&lt;p&gt;In order to learn &lt;em&gt;how to program&lt;/em&gt;, you must first have a concept of the nature of a program within a paradigm. But we are burdened by our history: the history of programming languages &lt;strong&gt;and&lt;/strong&gt; the history of how the instructor learned &lt;em&gt;how to program&lt;/em&gt;. So we first consider the question &lt;strong&gt;What Is A Program&lt;/strong&gt;. The answer depends on the paradigm. Leaving out assembly language, in which the program is a sequence of simple statements and branches, we have several possibilities.&lt;/p&gt;&#xA;&lt;h2&gt;Fundamental Nature of Procedural Programming&lt;/h2&gt;&#xA;&lt;p&gt;Languages like &lt;a href=&quot;https://en.wikipedia.org/wiki/C_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;C&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Pascal_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pascal&lt;/a&gt; were designed in an era in which it was discovered that go-to (branch) programming led naturally to unreadable and unmaintainable programs. &lt;a href=&quot;https://en.wikipedia.org/wiki/Edsger_W._Dijkstra&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Tony_Hoare&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hoare&lt;/a&gt;, and others came to the realization that &lt;a href=&quot;https://en.wikipedia.org/wiki/Structured_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;Structured Programming&lt;/a&gt; was superior and sufficient. In Structured Programming the fundamental program structures are sequences of statements, selection of alternatives, and repetition. These can be represented explicitly in languages without reference to branching. They can be &lt;em&gt;explained&lt;/em&gt; as branching, but it is not essential to &lt;em&gt;think of them&lt;/em&gt; in that way. Combining this concept with the idea of (procedural) abstraction (naming coherent parts of a program and invoking them by name) produces the following way to think about the nature of a program:&lt;/p&gt;&#xA;&lt;p&gt;Envision a &lt;strong&gt;problem&lt;/strong&gt;, for which you do not yet have a solution, as a set of sub-problems. If they all had solutions a &lt;em&gt;known synthesis&lt;/em&gt; would let you combine them into a solution of the whole. Note the two requirements: (1) the set of sub problems must be complete and cover the whole, and (2) a synthesis of solutions is &lt;em&gt;known&lt;/em&gt; that would combine them into a solution of the whole. The sub problems themselves may have no known solution, but they must be &lt;em&gt;solvable&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For each sub problem does not have a &lt;em&gt;known&lt;/em&gt; solution, recursively decompose it just as above. A solution should be a simple program (procedure) that satisfies all of the requirements of that (sub) problem. If you cannot provide the solution, then recurse until you can &lt;em&gt;solve&lt;/em&gt; all of the smaller problems.&lt;/p&gt;&#xA;&lt;p&gt;Once you have solutions to all the small problems build up a solution to the whole from the lower level syntheses, which were known, and which drove the decomposition in the first place.&lt;/p&gt;&#xA;&lt;p&gt;Thus the nature of a program is a tree of solutions, with each leaf a (hopefully) simple procedure/function. Each procedure/function solves some part of the original problem. The larger problem is now envisioned as a tree of problems and associated sub problems.&lt;/p&gt;&#xA;&lt;p&gt;If you teach in C or a similar procedural language in the first course then the most important task is to give students practice with this process. Never mind all of the intricacies of int values and mutation, and pointers, etc. They must learn to understand the nature of a program. Everything else is in fulfillment of this goal. If they learn that, but not the whole language, they can fill in those details later, or on their own. Without that structure they will write terrible programs with long and unwieldy structure, and impossible-to-decipher functions.&lt;/p&gt;&#xA;&lt;h2&gt;Fundamental Nature of Functional Programming&lt;/h2&gt;&#xA;&lt;p&gt;The first Functional Language was &lt;a href=&quot;https://en.wikipedia.org/wiki/Lisp_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lisp&lt;/a&gt; (List Processing). It was developed based on &lt;a href=&quot;https://en.wikipedia.org/wiki/Alonzo_Church&quot; rel=&quot;nofollow noreferrer&quot;&gt;Church&lt;/a&gt;'s ideas on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Lambda_calculus&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lambda Calculus&lt;/a&gt;. Functional languages are provably as powerful as those based on &lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_machine&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turing Machines&lt;/a&gt; - a &lt;a href=&quot;https://plato.stanford.edu/entries/church-turing/&quot; rel=&quot;nofollow noreferrer&quot;&gt;famous result&lt;/a&gt;. Lisp was originally thought to be inefficient since it incorporated an inefficient garbage collector, and that unfortunate judgment has stuck, though modern functional programs can be as efficient (or even more so) as those of other paradigms. Lisp has many modern successors, especially &lt;a href=&quot;https://en.wikipedia.org/wiki/Scheme_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scheme&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Clojure&quot; rel=&quot;nofollow noreferrer&quot;&gt;Clojure&lt;/a&gt;. While Lisp traditionally uses only an abstract syntax (parenthesized lists), other successors have a concrete syntax that appeals to many (including this author). Languages like &lt;a href=&quot;https://en.wikipedia.org/wiki/Standard_ML&quot; rel=&quot;nofollow noreferrer&quot;&gt;Standard ML&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Haskell_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Haskell&lt;/a&gt; fit in that category.&lt;/p&gt;&#xA;&lt;p&gt;A functional program is best thought of as an expression, which, if evaluated, produces a value. Since functional languages tend to be incredibly regular, the &amp;quot;value&amp;quot; returned by evaluating an expression might, itself, be another expression. I will used Scheme to explain ideas as we continue. In functional languages with syntax, things will look different, but reduce to the same ideas.&lt;/p&gt;&#xA;&lt;p&gt;In Scheme, a program and its data are represented by lists: &lt;code&gt;(a b c d)&lt;/code&gt;. If the list is evaluated it is a program in which the first element is a function (expression) and the rest are the arguments (also expressions) to that function. However, the list need not be evaluated, in which case you can think of it as data (or as an expression to be evaluated later).&lt;/p&gt;&#xA;&lt;p&gt;Different functional languages differ in when the arguments to a function are evaluated. Originally they were evaluated eagerly, before the function itself is invoked. However, it is also possible to design a language so that evaluation of expressions is delayed until they are actually used. Each has advantages and disadvantages, so functional languages usually compromise (using &lt;em&gt;special forms&lt;/em&gt; and &lt;em&gt;macros&lt;/em&gt;) so that some expressions use their own distinct rules.&lt;/p&gt;&#xA;&lt;p&gt;Another feature of an &lt;em&gt;expression only&lt;/em&gt; language is that you do not have side effects, only values. Output to a printer and graphics construction are not functional concepts, so special forms can again come to the rescue to provide the possibility of side effects, though most programs work to minimize and localize them.&lt;/p&gt;&#xA;&lt;p&gt;A &lt;em&gt;pure&lt;/em&gt; functional language (or the pure core of a more complete language) will be without special forms and side-effects. In a pure functional program the programmer constructs an expression which will produce the required solution to the problem if evaluated. Smaller scale problems are represented as the arguments to that initial expression and they can also be (recursively) arbitrarily complex expressions themselves. Evaluation of the original (top level) expression implies that the arguments are also evaluated in some order dependent on the language.&lt;/p&gt;&#xA;&lt;p&gt;Since people do not like to write arbitrarily complex expressions, it is also possible to name expressions (abstraction) and invoke them by name. These names are usually called &lt;em&gt;variables&lt;/em&gt; but normally they do not (cannot) actually vary. Once a name is bound to an expression (creating a variable) that variable cannot be bound to another, though the name can be reused - a confusing distinction, of course, until you understand &lt;em&gt;scope&lt;/em&gt;. Data in most functional programming languages is immutable. One constructs new lists from old, rather than modifying a given list.&lt;/p&gt;&#xA;&lt;p&gt;So, beginning functional programmers need to understand the expression, subexpression concept and practice it. They also need to learn at least a few special forms and how they behave differently though they actually look the same. For example, an &lt;em&gt;if-then-else&lt;/em&gt; selection structure is normally a special form since eager evaluation of the &amp;quot;then&amp;quot; and &amp;quot;else&amp;quot; expressions is usually not desirable (especially if either has side-effects). As their experience with the language grows they need to learn more about the special forms and their individual rules.&lt;/p&gt;&#xA;&lt;p&gt;There is an additional task for the beginning functional programmer. Normally repetitions (while, for) are not used in functional languages. They are replaced by recursion, especially tail-recursion. So the beginning programmers need to learn how to pose complex problems recursively with a special focus on tail-recursion. This results in some beautiful idioms that can be mind-blowing when first encountered. For example, reversing a list in Scheme can be done in linear time if you know how, but a naive program will likely be quadratic. The programmers do not need to learn more of the language to do this - there is very little &amp;quot;language&amp;quot; to learn - but must learn more of &lt;em&gt;how to use the language&lt;/em&gt;, often by &lt;em&gt;thinking recursively&lt;/em&gt; in powerful ways.&lt;/p&gt;&#xA;&lt;h2&gt;Fundamental Nature of Object-Oriented Programming&lt;/h2&gt;&#xA;&lt;p&gt;The first object-oriented language (OO) was &lt;a href=&quot;https://en.wikipedia.org/wiki/Simula&quot; rel=&quot;nofollow noreferrer&quot;&gt;Simula&lt;/a&gt;, which was developed to facilitate the creation of complex simulations, say of industrial equipment or governmental systems. This may be a key to how to teach the paradigm to novices. See &lt;a href=&quot;https://cseducators.stackexchange.com/a/4290/1293&quot;&gt;this answer&lt;/a&gt; to a different question, for example. &lt;a href=&quot;https://en.wikipedia.org/wiki/C%2B%2B&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++&lt;/a&gt; was conceptually based on Simula. The next OO language was &lt;a href=&quot;https://en.wikipedia.org/wiki/Smalltalk&quot; rel=&quot;nofollow noreferrer&quot;&gt;Smalltalk&lt;/a&gt; and most object-oriented languages derive from it. The most direct successor to Smalltalk is &lt;a href=&quot;http://squeak.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Squeak&lt;/a&gt;, which is a beautiful choice for teaching, but seldom used outside a small circle.&lt;/p&gt;&#xA;&lt;p&gt;Imagine a problem that you can conceive of as being solvable by some set of &lt;em&gt;things&lt;/em&gt;, each of which has the ability to act on request and to return some information based on those actions. Think of how you would design those things. Each of the things itself has a problem, its piece of the original, and that smaller problem is solvable by additional things with the same sort of capabilities. The things are heterogeneous (many kinds), some simple and some complex. Simple objects can be coded in a language, but complex ones need to be further decomposed.&lt;/p&gt;&#xA;&lt;p&gt;An object-oriented program is envisioned as a web of objects (things), perhaps just one, that cooperate in the solution of a problem. An object itself is a &lt;em&gt;bundle of behavior&lt;/em&gt; that provides services normally for other objects. The web arises from the fact that any object can hold a reference to other objects with which it can communicate - eliciting behavior. Each object takes responsibility for some part of the solution. An object is a &lt;em&gt;value&lt;/em&gt; that can be &lt;em&gt;queried&lt;/em&gt; for information to solve its own piece. Additionally, it can be directed to &lt;em&gt;act&lt;/em&gt; in creation of the final result. Communication with an object is called a message. Both the queries and the actions often (usually) cause additional messages to be sent to other objects, which aid it in fulfillment of the query or action.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, and this is the important point, objects are themselves constructed, mainly out of other objects (recursively): their parts. They communicate with their parts in the same way (messages) that they would communicate with an &amp;quot;external&amp;quot; object. Thus, the structure of an OO program is a web/graph of communicating objects that are themselves (recursively) webs of objects at a lower level. The execution of such a program is a flow of messages that cause actions and return results from queries.&lt;/p&gt;&#xA;&lt;p&gt;To create such a program, from scratch, you define one or more objects (using classes in &lt;a href=&quot;https://en.wikipedia.org/wiki/Java_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java&lt;/a&gt; or prototypes in &lt;a href=&quot;https://en.wikipedia.org/wiki/JavaScript&quot; rel=&quot;nofollow noreferrer&quot;&gt;JavaScript&lt;/a&gt;, etc.) and send a message to an object to start the computation.&lt;/p&gt;&#xA;&lt;p&gt;OO languages have many features, usually including inheritance, which is often thought to be the biggest idea in the paradigm. In fact, it is not. The big idea is that OO enables the programmer to consistently build complex objects out of simpler parts by &lt;em&gt;composition&lt;/em&gt;, keeping the parts essentially invisible to the clients of the object (encapsulation). Variables, other than references at the top level, are used to refer to the parts of an object so that it can maintain a consistent internal state and provide the public services.&lt;/p&gt;&#xA;&lt;p&gt;In effect, an object provides an abstraction layer, above that of the language itself, in which the programmers building the system can think and extend, without reference to lower-level constructs, even those of the base language itself. Thus a set of objects provides a &lt;em&gt;world&lt;/em&gt; that is self-consistent and complete enough to solve the question at hand. Once such a &lt;em&gt;world&lt;/em&gt; exists, even novices can program within its framework and can think at that new virtual level. Thus, once a world with, say &lt;a href=&quot;https://greenroom.greenfoot.org/resources/21&quot; rel=&quot;nofollow noreferrer&quot;&gt;wombats&lt;/a&gt;, food, predators, etc has been provided, perhaps by the instructor, students can extend it, and can solve complex problems within it by creating objects and their web of interactions.&lt;/p&gt;&#xA;&lt;p&gt;A beautiful OO program is one in which the objects themselves are simple, with simple methods. The complexity is not in the objects themselves, but in the interactions. When I am writing an OO program, I start to get &amp;quot;itchy&amp;quot; when any method has more than about three statements. Any structure nesting (if, while, ..) beyond two is cause for concern. McCabe's &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;nofollow noreferrer&quot;&gt;cyclomatic complexity&lt;/a&gt; metric should give you really small numbers. An implication, of course, is that there are lots of objects, and often, lots of classes. Fortunately, modern IDEs make these easy to create and manage.&lt;/p&gt;&#xA;&lt;h2&gt;Teaching the first course&lt;/h2&gt;&#xA;&lt;p&gt;You can teach the first course in just about any language and within its associated paradigm. If, however, you confuse your students about the &lt;em&gt;nature of a program&lt;/em&gt; in that language you have failed.&lt;/p&gt;&#xA;&lt;p&gt;The students should also write &lt;em&gt;beautiful&lt;/em&gt; programs that their mothers would be proud of. The techniques you teach them should scale to larger programs than what they write in the first course. It should never be necessary for any student to &lt;em&gt;unlearn&lt;/em&gt; bad habits and bad practices. If they can only program by writing two-page functions/methods filled with deeply nested selection and looping structures they are failing. The parts they build in whatever language/paradigm need to be small and understandable.&lt;/p&gt;&#xA;&lt;h2&gt;Consequences for teaching the first course (focus on OO)&lt;/h2&gt;&#xA;&lt;p&gt;If you need to teach a course and intend to do so without any preparation, the procedural paradigm is likely the easiest for you. You need a suitable language, a compiler, and an editor. The language provides the &amp;quot;stuff&amp;quot; of programming in its few data types and program structures. To be a success here, giving students the essential idea of procedural programming, you will need to find interesting problems. This is difficult since your tools are so primitive. You will also need to guide them into the problem decomposition and program composition to build up the two trees (problem - solution). They often tend to do too much in a given function. Make them factor out every difficult bit and apply intention revealing names to the parts factored. Require then to use short functions, limited nesting of program structures, etc.&lt;/p&gt;&#xA;&lt;p&gt;If you want to teach OO programming, on the other hand you need to prepare before the students begin. You need to have in hand one or more virtual worlds found, or constructed by yourself, in which they can do interesting things. Making it interesting is easier, since the structure of the world is up to you. Students programming in one of your worlds can start out with nothing more than sequences of messages to one or more objects to get some desired effect. If your world is graphical, all the better, since the students can see the effect of their program, and hopefully where they go wrong when they do.&lt;/p&gt;&#xA;&lt;p&gt;Next, in the OO world, students can extend one of your (say class) structures to add some additional behavior. They can do this by inheritance if the language permits or not. I would strongly suggest that you not overemphasize inheritance. Certainly avoid deep inheritance hierarchies. Ignore the concept of &amp;quot;reuse&amp;quot; and instead just extend the made-to-order world with interesting behaviors and/or objects. Since you have built the virtual world, you can control the order in which ideas are presented to the students and can control the complexity of what they must deal with at any moment. You can introduce deep concepts in a simple way in order to achieve some local small/scale effect as well. Not every program needs to be math-like as you have richer things than integers, etc.&lt;/p&gt;&#xA;&lt;p&gt;If you want to teach them OO programming, do not think that you first have to teach them procedural programming. Some of the ideas of procedural programming naturally occur in writing methods of OO programs, only in a smaller scale. It is easier to move from OO to procedural than the other way, actually, since the methods written are a lot like the procedures/functions of the procedural paradigm. It is also not quite as likely that the students will write monster methods, though you need to guard against the SEE-ALL-DO-ALL class, just as you need to guard against the ONE-TRUE-FUNCTION in procedural programming.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;beauty of the OO paradigm for teaching&lt;/strong&gt; is this. While any language defines a virtual layer in which to program, the objectives of the language designer were not pedagogical. When you define a higher level virtual world atop the language level, you, in fact can use pedagogical principles to construct it and provide a world in which the key concepts are easier to &lt;em&gt;learn&lt;/em&gt;. If that world is also &lt;a href=&quot;https://simple.wikipedia.org/wiki/Turing_complete&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turing Complete&lt;/a&gt;, all the better, but it is not essential - especially if you intend to use several smaller worlds rather than a single framework.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note that a few additional paradigms have been omitted here - &lt;a href=&quot;https://en.wikipedia.org/wiki/Concurrent_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;concurrent programming&lt;/a&gt;, in particular.&lt;/p&gt;&#xA;&lt;p&gt;A paradigm is a way of &lt;em&gt;thinking&lt;/em&gt;. Adopting a new paradigm may require a radical change in how the students think. This is much like the change in warfare from aristocratic knights on horseback to a peasant army of longbow archers that was first recognized at Agincourt in 1415. However the change did not become complete for about 100 years, Henry V to Henry VIII. After Henry VIII, English kings were no longer trained as knights.&lt;/p&gt;&#xA;&lt;p&gt;Paradigms are by nature distinct. They are not ordered. A longbow-man did not need to have any of the knight's training to be successful. The computing paradigms are also distinct and self-consistent, not ordered. It is not necessary to learn one before any other. Nor is it necessary to mix them. In fact, the second paradigm learned is always difficult, as you already know how to do things, so the new structures seem superfluous to you. That is not a reason for not learning several, but it needs to be kept in mind to help explain the difficulties. The first course, however should be pretty &lt;em&gt;pure&lt;/em&gt; to avoid confusing students.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;It is a fundamental principle of modern computer languages that they define an internally consistent, Turing complete, view of programming that needs no appeal to lower level constructs to be &lt;em&gt;understood&lt;/em&gt;. While it is true that such languages are in fact compiled to lower level constructs it is inherent in the concept that understanding does not flow from compilation, but the other way about. In fact, most of us (non-compiler-builders) would have a hard time understanding the intricacies of what really goes on in an optimizing compiler. The basics are easy to get, and the details are very complex. If you had to understand all of that to write a C program you would never know where to begin. You make assumptions, but they may be wildly wrong in light of modern systems with multi-level cache, co-processors, etc. That understanding is not needed if the language itself is &lt;em&gt;complete&lt;/em&gt; and &lt;em&gt;consistent&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Many languages are designed around a particular paradigm, sometimes just due to the time of creation. C is procedural. Java is Object-Oriented. Haskell is Functional. Some, however are multi-paradigm; C++, for example, is neither duck, nor dog.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-05T18:03:27.660" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4296" PostTypeId="2" ParentId="4288" CreationDate="2018-02-01T14:52:18.353" Score="0" Body="&lt;p&gt;&lt;em&gt;&quot;Ontogeny recapitulates Phylogeny&quot;&lt;/em&gt; and so teaching should follow the path that technology developed. It only takes nine months for a fetus to 'recapitulate' millions of years of evolution, so it should only take a few months for students to learn how computer technology developed over a few decades, and then really understand it, instead of &quot;standing on the shoulders of giants&quot; with no comprehension of how they wound up there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you have been questioning how to do an objects-first curriculum, perhaps there is good reason that you have not done it already: it would be difficult for the students to leap to abstractions if they have no idea what is going on underneath. The textbook I use introduces Object Oriented programming ideas (classes) in Chapter 4, before If and Loops. What can be done at that point? Perhaps some of what you want to achieve: show that a sequence of steps can be made in to a Method that can be invoked by other code. Show that Instances with their own data can be managed -- two Employee objects for example. Show references to said objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But students have to start with the basics: a computer is a simple electrical machine that functions deterministically (as Ada Lovelace said) and cannot do other than what it is told. Further, all of the activity essentially involves comparing numbers and than branching. Nothing more. The very first thing that students should realize is that all of this technology is something that they could understand, that sensible people developed it in tiny steps over time, no super-geniuses were involved -- as Dijkstra would tell you -- and the students themselves could in fact arrive at most of the development themselves given time. And it did take a lot of time: the Normal Forms took a decade to be developed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students need to be able to own the whole thing, down to the register level, or they will not really comprehend what they are doing. Otherwise, there will be a &quot;Let them eat cake&quot; attitude because, like Marie Antoinette, they will be ignorant, and shielded from the truth, by those who should be instructing them.&lt;/p&gt;&#xA;" OwnerUserId="4250" LastActivityDate="2018-02-01T14:52:18.353" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4297" PostTypeId="2" ParentId="666" CreationDate="2018-02-02T14:58:09.317" Score="4" Body="&lt;p&gt;The Justification is simple: &lt;strong&gt;this is how programming is largely done these days.&lt;/strong&gt; Everything that people learn should be practical, something that exists outside the classroom. Whatever the students are taught should be something that they can use in many situations, and as others have said, should not have to be &lt;em&gt;unlearned&lt;/em&gt; in order to learn something else. So teach what is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I apparently have an extremely reductive attitude towards learning. When I was a small child (over 4 decades ago) my persistent questions about computers were:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How could they possibly function?  &lt;/li&gt;&#xA;&lt;li&gt;What on Earth are they good for?  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(We still have these questions and they apply to people as well.) So I think that instruction should answer these questions conclusively. &lt;code&gt;1: Computers work because they are deterministic machines.&lt;/code&gt; Explain to some level of depth about how that is so and how it was developed. The first topic in any course should be &lt;em&gt;History&lt;/em&gt;, to answer the &quot;Well, how did we get here?&quot; question, which is just simple respect for thinking beings. Nothing should be assumed or hidden. &lt;code&gt;2: Computers are used to solve [these types of] problems in a business context.&lt;/code&gt; They do math and store and retrieve data, basically. They perform useful &lt;strong&gt;processes&lt;/strong&gt; to free humans of drudgery. Perhaps beautiful inside, most people really do not care.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As has been mentioned, people have a wide range of ability to do abstract reasoning, and this ability grows if it is cultivated, but, like the light bulb in the therapy joke, the person has to &lt;em&gt;want to&lt;/em&gt; change, to learn to &lt;em&gt;&quot;think different&quot;&lt;/em&gt;. And that is &lt;strong&gt;very hard work&lt;/strong&gt; indeed. Some ways of thinking are easier to grasp than others. My experience is that people do best when given concrete scenarios with understandable steps to take to solve a problem. One thing that will vex them is to confuse levels. When I first learned a fairly pure form of Lisp in college, the professor seemed pretty excited and/or smug that one could create anything at all out of Lisp. And all you needed was Lisp to do it with. Essentially he seemed to be saying: &quot;Here are your parentheses, now go forth, be fruitful and multiply.&quot; (Division was covered in the next semester.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This completely mixes up syntax and semantics and will boggle most people's minds. If I hadn't already learned APL, Fortran, some varieties of Assembler, and several BASICs (in reverse order) I would have been lost, and most of these students were lost, and many quit. Not good teaching. Not a good paradigm. No one says that you make thesis papers in English by creating your own English: there is a level of &quot;The Given&quot; and then there is the level of &quot;Your Ideas&quot;. This works for people and they can write programs on that basis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But giving them a constructed world is not setting them up to succeed after they leave the course. Students need to see what is actually used, how it is used in production in scenarios where they might possibly get jobs. We have made a hash of this and constructed a tower of Babel with the many high level languages, tools, frameworks, operating systems, and so on. This was a bad move. Sure, we are creative beings, but there is only one set of traffic laws, and to get around in the world one must follow them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The solution seems to be &lt;strong&gt;Apprenticeship&lt;/strong&gt;, which I read that many large companies have adopted, as positions go unfilled and even college graduates do not have enough experience to start work. Thank Heaven that we finally decided to go back to an approach that has worked for 100,000 years!&lt;/p&gt;&#xA;" OwnerUserId="4253" LastActivityDate="2018-02-02T14:58:09.317" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4298" PostTypeId="1" AcceptedAnswerId="4820" CreationDate="2018-02-04T01:50:15.790" Score="5" ViewCount="446" Body="&lt;p&gt;Is there an accepted core set of concepts that is &lt;em&gt;discrete mathematics&lt;/em&gt; as it applies to the study of Computer Science? The math department in my school is thinking about creating a course, they asked for our input, and I wasn't sure what to point them to.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-04T01:58:17.447" LastActivityDate="2018-05-22T05:47:22.013" Title="What are the core concepts of discrete mathematics within CS?" Tags="|secondary-education|undergraduate|discrete-math|" AnswerCount="4" CommentCount="5" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4299" PostTypeId="2" ParentId="2651" CreationDate="2018-02-04T15:01:37.320" Score="1" Body="&lt;p&gt;&lt;a href=&quot;https://ruby-lang.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ruby&lt;/a&gt; would be a really interesting language for you to work with, given your dislike of foreach loop.  It provides an good way to think about a for loop. In ruby, the &lt;code&gt;for&lt;/code&gt; keyword does not exist. There's no way to actually create a for loop. But any collection (&lt;code&gt;Enumerable&lt;/code&gt;) has a &lt;code&gt;#each&lt;/code&gt; method, which iterates of the elements of the collection. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;words = [&quot;apple&quot;, &quot;car&quot;, &quot;coffee&quot;, &quot;document&quot;]&#xA;words.each do |word|&#xA;  puts word&#xA;end&#xA;#=&amp;gt; apple&#xA;#=&amp;gt; car&#xA;#=&amp;gt; coffee&#xA;#=&amp;gt; document&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To implement a traditional &lt;code&gt;for&lt;/code&gt; loop, you need to iterate over a range (in ruby the &lt;code&gt;a..b&lt;/code&gt; notation generates an Enumerable from a to b):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;words = [&quot;apple&quot;, &quot;car&quot;, &quot;coffee&quot;, &quot;document&quot;]&#xA;[0..3].each do |i|&#xA;  puts words[i]&#xA;end&#xA;#=&amp;gt; apple&#xA;#=&amp;gt; car&#xA;#=&amp;gt; coffee&#xA;#=&amp;gt; document&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Which syntax makes more conceptual sense and is more readable? I'd certainly say the first one. It also will help students seperate the concept of a loop with the specific syntax for creating a loop.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2018-02-04T15:01:37.320" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4301" PostTypeId="2" ParentId="2632" CreationDate="2018-02-06T15:09:53.517" Score="3" Body="&lt;p&gt;Another way of looking at this is to explore what is missing or lost at various stages:&lt;/p&gt;&#xA;&lt;p&gt;In Java&lt;/p&gt;&#xA;&lt;p&gt;For each:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;for ( String s : &amp;lt; some iteratable collection &amp;gt; )&#xA;    foo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;loses the index of the loop. It never has one unless you add it.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;for (int i = 0; i&amp;lt; n; i++)&#xA;    foo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;loses the index after the loop when completed,&lt;/p&gt;&#xA;&lt;p&gt;while other loops preserve it.&lt;/p&gt;&#xA;&lt;p&gt;Many of the posts offer good advice for explaining the behaviour of the &lt;code&gt;for&lt;/code&gt; loop.  Translations to and from &lt;code&gt;while&lt;/code&gt; loops are traditionally used. Strictly speaking a &lt;code&gt;for&lt;/code&gt; loop is never required, it's a convenience, as is the for each loop.&lt;/p&gt;&#xA;&lt;p&gt;The more tricky uses of a for loop should be very carefully considered before teaching -- high risk low reward.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="2047" LastEditDate="2020-10-06T03:16:43.000" LastActivityDate="2020-10-06T03:16:43.000" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4302" PostTypeId="1" AcceptedAnswerId="4306" CreationDate="2018-02-07T07:32:53.800" Score="4" ViewCount="186" Body="&lt;p&gt;I mentor an &lt;a href=&quot;https://www.firstinspires.org/robotics/frc&quot; rel=&quot;nofollow noreferrer&quot;&gt;FRC (&lt;em&gt;FIRST&lt;/em&gt; Robotics Competition)&lt;/a&gt; team, and they program in java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The team members who work programming the robot are using an extension&lt;sup&gt;1&lt;/sup&gt; library which they themselves write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The library that they write doesn't exactly follow good design concepts. for example, instead of having an interface for describing the functionality of a moving subsystem (a robotic forklift, for instance), they have a class that extends a subsystem, and it contains that functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is one example, and there are quite a few other examples. I say this to explain that they have quite a bit of code already written, and it would be difficult to make it more abstract and write it with a higher level of design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is &lt;em&gt;how can I approach the subject, and encourage the students to want to learn and use higher levels of abstractions&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &quot;approach&quot;, I mean bring up the matter, without making it sound as though I think they &lt;strong&gt;have&lt;/strong&gt; to do it, or that their code &quot;won't ever be good unless they do it&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students &lt;em&gt;can&lt;/em&gt; learn it (i.e. they are able and capable of learning those concepts). This question isn't about how to &lt;em&gt;teach&lt;/em&gt; it, but rather how to &lt;em&gt;encourage the students&lt;/em&gt; to want to learn and apply those concepts&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A clarification: I am not their teacher, I am a mentor. I do not &lt;strong&gt;teach&lt;/strong&gt; them, but rather I help them learn (it's informal)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Proper design and abstraction makes code, especially libraries, easier to maintain and easier to use, and also prevents some types of bugs and errors.&lt;br&gt;&#xA;That is one of the main points of design patterns, as well as a &quot;side-effect&quot; of following SOLID principles.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Without going into too much details, I'll say that there is a &lt;a href=&quot;https://github.com/wpilibsuite/allwpilib&quot; rel=&quot;nofollow noreferrer&quot;&gt;supplied library&lt;/a&gt; for programming the robot, and the team is writing an extension of that library. &lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="1293" LastEditDate="2018-02-09T13:26:25.807" LastActivityDate="2018-02-22T09:31:44.313" Title="Encourage students to learn and use advanced design" Tags="|student-motivation|object-oriented-paradigm|abstraction|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4303" PostTypeId="2" ParentId="2632" CreationDate="2018-02-07T09:04:33.953" Score="34" Body="&lt;p&gt;I know I'm coming late to this party but this is a really good question and I think it deserves a really good treatment.&lt;/p&gt;&#xA;&lt;p&gt;The original &lt;code&gt;for&lt;/code&gt; loop, the one with the semicolons in it, is amazingly flexible, powerful, and confusing as all get out. It is seldom taught well, it is a very easy place for bugs to hide, and it is not going away.&lt;/p&gt;&#xA;&lt;p&gt;To master it you must learn the 1,   2, 4, 3,   2, 4, 3 pattern the OP mentioned. You must burn it into your soul. You must burn it into the souls of your students. The question is, how?&lt;/p&gt;&#xA;&lt;p&gt;The best way is to actually see it. To watch it happen. Unfortunately debugging tools often insist on highlighting the entire line.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/4tVJT.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4tVJT.png&quot; alt=&quot;debugger highlighting the full line&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Can you tell if &lt;code&gt;i&lt;/code&gt; is about to be initialized, tested, or incremented here? Debugger highlighting is often useless for teaching or debugging the classic for loop.&lt;/p&gt;&#xA;&lt;p&gt;However, there is a way around that problem. The c style languages all have a feature that lets us work around this debugger limitation. Whitespace. Whitespace is meaningless in these languages. You can take advantage of that.&lt;/p&gt;&#xA;&lt;p&gt;So long as you're willing to explain that this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;for(int i=0; i&amp;lt;10; i++) {&#xA;    System.out.println(i);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;will do the same thing as this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;for(&#xA;        int i=0; &#xA;        i&amp;lt;10; &#xA;        i++&#xA;) {&#xA;    System.out.println(i);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;then you can show them this:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/2K5ny.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/2K5ny.gif&quot; alt=&quot;debugger single-stepping for-loop parts&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Do that, and rather than just explaining, you are showing them how this works, you are teaching them how to debug it themselves when they get confused by it.&lt;/p&gt;&#xA;&lt;p&gt;Now sure &lt;a href=&quot;//softwareengineering.stackexchange.com/a/331680/131624&quot;&gt;the multiline style&lt;/a&gt; isn't popular with for loops but the students certainly don't have to turn in code that looks like that. It's just a form to use while testing because our debugging tools aren't yet smart enough to highlight only the relevant parts of a line.&lt;/p&gt;&#xA;&lt;p&gt;I've changed the speed and rhythm I use as I click. That's no accident. I'm using that to emphasize the starting and ending parts of each iteration. Students should not only feel like they can predict this. They should feel like they can use the debugger to re-teach themselves this pattern quickly if they ever need to.&lt;/p&gt;&#xA;&lt;p&gt;Consider a cascading style that retains column position for those more visually oriented:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/UB41P.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UB41P.gif&quot; alt=&quot;same as last, but for-loop parts stay in the column they would have if it was a single line&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that's just the start of understanding loops. Writing &lt;a href=&quot;//softwareengineering.stackexchange.com/q/315964/131624&quot;&gt;correct, readable, efficient loops&lt;/a&gt; is a whole other issue that this answer hardly does justice to.&lt;/p&gt;&#xA;&lt;p&gt;A lot of bugs hide right here. Don't undersell how worthy this is of close study.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="2047" LastEditDate="2020-10-06T03:17:15.550" LastActivityDate="2020-10-06T03:17:15.550" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="4304" PostTypeId="1" CreationDate="2018-02-07T09:53:45.483" Score="6" ViewCount="276" Body="&lt;p&gt;When I am teaching, sometimes, I am asked “How is this useful to me? I don't use a computer. I won't use a computer in my job.”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I, quickly, answer this question?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I only have a few pupils with this attitude, so don't want to spend too much time on this. However ideas for a short-ish introduction, or ways to answer the question, will be welcomed.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I know this stuff is useful. For example programming: Some will become professional software engineers; some will just write the odd 10 liner to help solve the problem of the day; some will have to commission a software project, and the software engineers will try to over charge them ; some will never use a computer in their life, but computational thinking is still of use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Details of pupils: year 7…9 (age 11…14). They are on the course, because it is part of the schools core curriculum.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-02-07T15:43:09.107" LastActivityDate="2018-03-15T19:55:37.050" Title="Answering “How is this useful to me?”" Tags="|student-motivation|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4305" PostTypeId="2" ParentId="4304" CreationDate="2018-02-07T11:13:58.717" Score="1" Body="&lt;p&gt;The best answer to this is an honest one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;We don't know&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But say that with a big smile on your face and enthusiasm in your voice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How you might use this is a big mystery. It might be it gives you an idea how the software that touches your life works under the covers so it's a little less scary. It might be part of your job gets automated and you teach a computer how to do the boring repetitive parts of it so you don't have to anymore. It might be you have a great idea some day and you use this stuff to not only make your life but my life better. It might be, that once you see how it works, making computers do what you tell them to do turns out to be fun!&lt;/p&gt;&#xA;" OwnerUserId="1401" LastActivityDate="2018-02-07T11:13:58.717" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4306" PostTypeId="2" ParentId="4302" CreationDate="2018-02-07T12:07:03.877" Score="4" Body="&lt;p&gt;The most fundamental shift in my programing came from my attitude about details.&lt;/p&gt;&#xA;&lt;p&gt;When I was young I wanted to pull every detail out of everything I touched, pin in down in front of me in one source file and beat it into submission. I could stand in one place and know everything.&lt;/p&gt;&#xA;&lt;p&gt;After decades of programming my attitude is: the less I know the better. Dealing with a detail? Feh, I let other things deal with that. I already have plenty of stuff to think about right here thank you. I don't need more clutter.&lt;/p&gt;&#xA;&lt;p&gt;I have shifted from a procedural mind set to a more abstract one.&lt;/p&gt;&#xA;&lt;p&gt;That sounds fancy but all it means is that no mater where I am in the code, I want to think about only one problem, in only one way, from only one perspective.  Any detail that distracts from that is getting tucked away somewhere. I work very hard to make it that easy because I'm that lazy.&lt;/p&gt;&#xA;&lt;p&gt;There are many ways to try to teach this, problems that invite students to drown themselves in details if they aren't careful. But one guiding principle has helped me see when I'm doing it right.  It has many names but the one I'm most fond of is:&lt;/p&gt;&#xA;&lt;h1&gt;Tell. Don't ask.&lt;sup&gt;&lt;a href=&quot;https://pragprog.com/articles/tell-dont-ask&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;,&lt;a href=&quot;https://martinfowler.com/bliki/TellDontAsk.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt;,&lt;a href=&quot;https://robots.thoughtbot.com/tell-dont-ask&quot; rel=&quot;nofollow noreferrer&quot;&gt;3&lt;/a&gt;,&lt;a href=&quot;http://deviq.com/tell-dont-ask/&quot; rel=&quot;nofollow noreferrer&quot;&gt;4&lt;/a&gt;,&lt;a href=&quot;http://tmichel.github.io/2015/09/14/oo-controversies-tell-dont-ask-vs-the-web/&quot; rel=&quot;nofollow noreferrer&quot;&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/h1&gt;&#xA;&lt;p&gt;If I have to ask a question then I have to deal with the answer. Usually that's a detail. The only reason I ask is because I want to do something and I don't have enough information to do it. Why can't I just tell the thing I asked to just do my something? It knows the answer, so it knows what it needs already. I should be able to just tell it &amp;quot;do it now&amp;quot; and it should be able to go do it without making me think about it.&lt;/p&gt;&#xA;&lt;p&gt;Adopt this attitude and working abstractly becomes very appealing. Without it, abstraction and polymorphism are very annoying because they're getting in the way of you knowing everything. Teach your students to love not knowing.&lt;/p&gt;&#xA;&lt;p&gt;I don't know. I don't want to know.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;How to motivate students to use this?&lt;/p&gt;&#xA;&lt;p&gt;Don't.&lt;/p&gt;&#xA;&lt;p&gt;Motivate them to explore it. Which is better is not a settled issue. What you should teach is what problems this style addresses. How to identify situations that create a greater need for it. How to identify situations where it's irrelevant.&lt;/p&gt;&#xA;&lt;p&gt;I've been studying every programming principle and style I could find for decades now and not one of them is something I would advise someone to adopt without critically analyzing how and whether to apply it in any given situation.&lt;/p&gt;&#xA;&lt;p&gt;What I do recommend is practicing with them. Until you've used one while solving a real problem all your doing is being a tourist. I've watched people end their career by waving a book around preaching principles without knowing how to solve a problem.&lt;/p&gt;&#xA;&lt;p&gt;When interviewing prospects I'd rather hear:&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;If you follow principle x it may help with this y issue.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;than&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;You should always follow principle x. It's good design. Professionals always follow good design.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Spare me from fanatics that follow rules without thinking.&lt;/p&gt;&#xA;&lt;p&gt;Encourage them to learn every principle, pattern, and practice they can. Not because they should always use them, but because when they look at code that already uses them they should understand why the code looks the way it does.&lt;/p&gt;&#xA;&lt;p&gt;The reality is true professionals spend most of their time wading through crap code trying to get what they need out of it while causing the smallest amount of fuss they can.&lt;/p&gt;&#xA;&lt;p&gt;The really good ones will spot some tiny little improvement they might be able to get away with while they're here. These &amp;quot;boy scouts&amp;quot; leave the code a little better than they found it. Give me those over the crusaders that want a complete rewrite every time they look at a new code base.&lt;/p&gt;&#xA;&lt;p&gt;Cultivate in them a skeptical &amp;quot;boy scout&amp;quot; attitude. Give them all the tools but teach them to use them sparingly, wisely, and carefully.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-22T09:31:44.313" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4307" PostTypeId="2" ParentId="4304" CreationDate="2018-02-07T12:31:24.843" Score="9" Body="&lt;h2&gt;The grown-up answer: Because it's good for you.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;No, really.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this age the different things you study all give you different kinds of skills and different ways of thinking. Thinking is good and the more different ways you can do that the more likely it is that you will be able to solve the problems as they come along. The different subjects in the early years are put there because people (grown ups) think that they will be relevant in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to think for yourself means you are more likely to be able to detect the lies that people will try to tell you to get you to do things that aren't really in your best interest, like buying something that has the main purpose of compromising your privacy. Math, History, Philosophy, CS, ... all teach you to think in different ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, in fact, programming is useful in many fields. Even philosophy if you want to examine a lot of texts written by old (dead) philosophers. Science can't do without it anymore. Nor can some aspects of literature. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;The less grown-up answer: Because it's fun.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;No, really. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, if it isn't fun then maybe the teacher needs to rethink how the course is taught. Why isn't it fun? Is it the sorts of problems that the students are working on? Are they boring to the students? Is it the way they are supposed to behave? Too much frustration of working alone (or the opposite, I suppose)? Personally, I hate boredom. Or is it that they just don't have any bigger picture of what it is that they are learning, being always lost in the details? You can always ask the students what they &quot;learned today&quot;. I used to ask that quite frequently, just to get them to focus on that before they left the classroom. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ok. That was a bit grown-up too, but devious. Devious can be good, if done right.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-07T12:52:20.803" LastActivityDate="2018-02-07T12:52:20.803" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4308" PostTypeId="2" ParentId="4302" CreationDate="2018-02-07T12:50:21.913" Score="0" Body="&lt;p&gt;Perhaps it would help them to see the difference between their current code and some better code. Better code might also make their future work on this project easier. The trick is to get them to create the better code themselves without it seeming like they are throwing things away. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two skills that you can teach them that you can promise will be useful to them if they carry on in CS. Testing and Refactoring. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When code does what it should but is not as maintainable as it should be, or not as easy to extend, or just ugly, you want to &lt;strong&gt;Refactor&lt;/strong&gt; it. Change its structure without changing its behavior. This is one of the core skills in Agile Software Development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with actually doing that, however, is to know that when you make a change to the code you haven't changed its actual behavior. So, you need to &lt;strong&gt;Test&lt;/strong&gt; it. But you want those tests anyway so that you have confidence that when you extend (i.e. not refactoring) that you don't break things you wrote earlier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, assuming Java, use something like &lt;a href=&quot;https://junit.org/junit5/&quot; rel=&quot;nofollow noreferrer&quot;&gt;JUnit&lt;/a&gt; to create &quot;unit tests&quot; that test the behavior of the public methods of the code. Be sure to test both the main cases and the &quot;edge&quot; cases. These tests capture the &lt;em&gt;semantics&lt;/em&gt; of the code, in fact. Ultimately the real-meaning of the code is what it does. Hopefully that matches the intended meaning. Tests can tell you this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, tests in hand and all passing, you can change the code freely. As long as the tests continue to pass you haven't changed the behavior. There are lots of possible refactoring, such as the ones suggested in the above question, but others as well. Simplifying methods by factoring out private helpers. Creating private classes so that you can create helper objects so that each piece of code becomes simpler, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You, as a teacher (or helper) can even make it a game giving prizes for the most effective refactoring, or the most successfully passing tests. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As a pedagogical technique that may be acceptable to the actual instructor in your situation is that you can pair with a student (or triple with a pair) and create some of the tests yourself. I say this may be acceptable, since you aren't providing functionality to their work, but only the framework in which they can extend it. Your example can give them the hang of how to go about it. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This same technique is used in situations in which you have to deal with some old code written by others (a &quot;dusty deck&quot;) and don't understand it yourself. Write tests to capture what you think it is doing. If the tests pass then it really is doing that. Once you have understanding you can either refactor or extend, knowing that you didn't break anything. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The effect of this technique should result in the goals suggested in the answer of &lt;a href=&quot;https://cseducators.stackexchange.com/a/4306/1293&quot;&gt;CandiedOrange&lt;/a&gt; here. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Ideally, tests are written along with the code, actually before the code. If the tests already exist and were written to drive the development itself, then the refactoring step is easier. The mantra for developing code from the start is &lt;em&gt;No Code Without A Failing Test&lt;/em&gt;. This is called &lt;em&gt;Test Driven Development&lt;/em&gt;. It is a fun skill in itself. Write a test that must fail since it has no code to back it up. Let the test capture the intended meaning. Then write just enough application code to make the test pass. Repeat until done. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-07T18:59:19.920" LastActivityDate="2018-02-07T18:59:19.920" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4309" PostTypeId="2" ParentId="2651" CreationDate="2018-02-07T14:06:42.927" Score="1" Body="&lt;p&gt;Don't forget to mention what information is not available when they choose between certain looping constructs:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;foreach loops lose position data (index, relative locations (i and i-1, etc)&#xA;for(int i;;) loops lose the index variable (i) upon completion of the for loop&lt;/p&gt;&#xA;&#xA;&lt;p&gt;foreach loops are designed to work with collections &amp;amp; iterators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2632/teaching-the-humble-for-loop/4301#4301&quot;&gt;Teaching the humble for loop&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also from a AP CS A exam perspective, the trap is usually that you don't have an index value. The advice I give to the students taking this exam is to avoid the foreach when writing exams because in the majority of cases they will require the index.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="3840" LastEditDate="2018-02-07T15:02:51.217" LastActivityDate="2018-02-07T15:02:51.217" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4310" PostTypeId="2" ParentId="4298" CreationDate="2018-02-07T14:49:35.783" Score="1" Body="&lt;p&gt;The one thing I would &lt;em&gt;not&lt;/em&gt; do is create a separate Math course oriented towards computer programming. A purely-math course with no programming is probably the best way to kill interest in one or the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Introduce the math where it naturally fits in as you teach algorithmic concepts for real situations -- actual projects in your courses. Most programmers think no more about 'math' as a subject than Chefs think about Thermodynamics: they don't have to!&lt;/p&gt;&#xA;" OwnerUserId="4270" LastActivityDate="2018-02-07T14:49:35.783" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4312" PostTypeId="2" ParentId="2998" CreationDate="2018-02-07T19:08:47.000" Score="4" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Would explicitly teaching the difference between setting the style attribute of an html tag, and doing it through CSS useful for increasing the students' understanding of the joining of CSS and HTML?&lt;/p&gt;&#xA;&lt;p&gt;To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Show them why having separate CSS files makes their lives easier.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Give students an assignment where they create an HTML page with a bunch of elements that use the &lt;code&gt;style&lt;/code&gt; attribute for inline styling. Have something like 10 buttons with the same background color, 10 paragraphs with the same alignment, etc.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Now have them change those styles. Have them change the background color on the buttons and the alignment on the paragraphs. The point is to show them how painful this manual process is.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Now introduce the concept of css classes and separating CSS into its own section or its own file. Have them modify their HTML to use this approach instead of inline styles.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now have them change the styles again. This is a 2-line change instead of a 20-line change. This assignment will be much less tedious than the previous one.&lt;/p&gt;&#xA;&lt;p&gt;This approach will motivate students where they live and show them the real-life benefits of separating your CSS styles from your HTML content. Then you can introduce some of the other benefits that the other answers discuss.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-07T19:08:47.000" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4313" PostTypeId="2" ParentId="4302" CreationDate="2018-02-07T19:33:02.400" Score="2" Body="&lt;p&gt;Based on my past experience working on a FRC team, my main advice would be to be very cautious about pushing students to use more advanced abstractions, design patterns, and whatnot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that if you spend a lot of up-front effort designing interfaces and abstraction layers, you can end up painting yourself into a corner, especially if you're new to programming and don't have a good sense of how to anticipate these sorts of things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, take the forklift example you mentioned -- what happens if the students decide half-way through the design season that they don't want to use the forklift design after all, and want to create some sort of arm? Or what if they want to create some kind of kicker thing to try punt a ball of some sort?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or even with the forklift example -- what if the team switches from using some sort of conveyor-belt design (where the user can control the height of the lift) to some sort of pneumatic based system, where the height ends up being basically binary (low or high)? How do you design an interface that can accommodate both (without stuffing the interface full of different methods that are inconsistently implemented across different subclasses)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And for all of these, how do you map of these to the user interface, which again the team might want to wildly change over time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of these issues are insurmountable of course -- you can work around it by having a clever and flexible set of abstractions, or by having a more solid design phase (and pruning down deviations from the initial plan).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, no plan is perfect and the danger is that too-brittle and overly restrictive abstractions can potentially end up crippling the team down the line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means you should be careful when pushing for more abstraction -- the danger is that if the abstractions you propose end up hampering the team down the line, they might end up resenting the idea of them and take away entirely the wrong lesson: abstractions are bad, and are not worth the trouble.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So, for that reason, I recommend taking a more &quot;organic&quot; approach. Let students write code, and push them to write it in the simplest way possible. The code initially is probably going to be messy, but that's fine -- if your FRC team is anything like mine, there's probably a fair bit of prototyping in the first week or two (or even up to the last week...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you see redundancy, point it out, and push students to &lt;em&gt;refactor&lt;/em&gt; it. Try and emphasize this sort of procedural refactoring first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, encourage students to create &lt;em&gt;objects&lt;/em&gt; to encapsulate behavior and state. Somebody introduces a new subsystem? Create an object for it. Somebody wants to play with a new UI? Another object. Don't worry about having these objects conform to any kind of interface/extend any object -- getting them to think about subsystems as distinct units/distinct objects would be a good step.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, near the endgame, as the design as settled and people are iterating, start introducing the idea of interfaces. The overall design of your subsystems are probably fixed at this point, and the team is likely focused on iterating. In that case, you can probably now create an interface per each subsystem and create a new subclass per each distinct variation or something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That way, if the team wants to trial-run one particular variation, it's easy to swap out the corresponding code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can maybe facilitate this whole process by having code reviews, perhaps on a weekly basis or something. This lets students still retain ownership of the code while still giving you a mechanism to propose changes or give advice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This does mean, however, that your advice will (at least initially) be reactive, rather then proactive. However, I don't think that's necessarily a bad thing -- it's good for the students to have ownership of their code, make mistakes, learn from them, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if the team never really does get to the point where using interfaces and such makes sense, don't bother bringing it up. Realistically, the code they're writing is likely going to be simple, in the grand scheme of things. Don't over-complicate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; A little more specifically, I'm fond of the &quot;rule of three&quot; (&lt;a href=&quot;https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)&quot; rel=&quot;nofollow noreferrer&quot;&gt;link 1&lt;/a&gt;, &lt;a href=&quot;https://blog.codinghorror.com/rule-of-three/&quot; rel=&quot;nofollow noreferrer&quot;&gt;link 2&lt;/a&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would try and drill in this principle into your students: when you see something repeated three or more times, that's a good point to think about refactoring and abstracting. Basically, my opinion is that the hard part is learning &lt;em&gt;when&lt;/em&gt; it's appropriate to refactor or abstract. If you can teach them to identify when to abstract, it's comparatively easier to teach them &lt;em&gt;how&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2018-02-08T21:40:01.947" LastActivityDate="2018-02-08T21:40:01.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4314" PostTypeId="2" ParentId="4082" CreationDate="2018-02-08T08:27:02.200" Score="2" Body="&lt;p&gt;I'd say that it can fit very well between the Inheritance and the Polymorphism.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interfaces are a way of promising that any implementing class supports the interface's functionality. for example, given an interface &lt;code&gt;Movable&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public interface Movable {&#xA;&#xA;    public void move();&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;one knows that anything that for any object instance of a class which &lt;code&gt;implements Movable&lt;/code&gt;, we can call &lt;code&gt;.move()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that, unlike &lt;code&gt;extend&lt;/code&gt;ing a class, &lt;code&gt;implements&lt;/code&gt; means (and &lt;strong&gt;directly implies&lt;/strong&gt;) that instances of the class have some functionality. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching it in this order gives the view of an interface being nothing more than a promise for some functionality, and how such a thing is integrated into OOP. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also avoids some of the confusion I've witnessed in cases where abstract classes are taught before interfaces. They are not the same, but understanding why it's ok for something not to have a method body (i.e. abstract methods in such a class) is clearer to students if they know interfaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, if one teaches interfaces as a &lt;a href=&quot;https://cseducators.stackexchange.com/questions/544/explaining-how-an-interface-is-a-contract&quot; title=&quot;A question I asked and got really good answers&quot;&gt;contract of functionality&lt;/a&gt;, then it doesn't appear as an add-on. It's a fully-fledged OOP concept with incredible usefulness. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever a person needs to describe &lt;strong&gt;just the functionality&lt;/strong&gt; required by an unknown set of objects (and maybe of different classes), an interface is their best friend. &lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-02-08T08:27:02.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4315" PostTypeId="2" ParentId="4082" CreationDate="2018-02-08T10:34:29.250" Score="1" Body="&lt;p&gt;My laundry list:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We write sample programs using components from a library (say JavaFx, or SFML)&lt;/li&gt;&#xA;&lt;li&gt;We don't care (much) about the internals of objects, as long as they work, but about their programming interface = what we can do with them. Abstraction.&lt;/li&gt;&#xA;&lt;li&gt;Anyway, we're going to build new objects. Some explanations about &lt;code&gt;class&lt;/code&gt;es/methods/fields. Encapsulation. &lt;/li&gt;&#xA;&lt;li&gt;Some details are better kept &lt;code&gt;private&lt;/code&gt;. Enforcement of abstraction.&lt;/li&gt;&#xA;&lt;li&gt;Objects are meant to be used through their API, so we first have to design the API. How we want innocent programmers to use them. Objects as service providers.&lt;/li&gt;&#xA;&lt;li&gt;Enter the notion of (java) &lt;code&gt;interface&lt;/code&gt; (sorry, C++ guys) as &quot;contract&quot;, and classes realizing them.&lt;/li&gt;&#xA;&lt;li&gt;Some examples of classes with the same interface. Polymorphism.&lt;/li&gt;&#xA;&lt;li&gt;Some classes have lots in common, introduce abstract class to factorize code, and inheritance.&lt;/li&gt;&#xA;&lt;li&gt;designing abstract classes in order to be a sound basis for concrete classes (some patterns).&lt;/li&gt;&#xA;&lt;li&gt;sometimes, inheritance from a concrete class.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Students are exposed to polymorphism at a early stage: the example is a &quot;guess a random number&quot; game. The game is parameterized (?) by a &lt;code&gt;Generator&lt;/code&gt;. During debugging phases a &lt;code&gt;FakeGenerator&lt;/code&gt; is used, which always returns the same value.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public interface Generator {&#xA;   int getNumber();&#xA;}&#xA;&#xA;public class FakeGenerator  implements Generator {&#xA;   final int fixedValue;&#xA;   public FakeGenerator(int value) {&#xA;       fixedValue = value;&#xA;   }&#xA;   @Override&#xA;   public int getNumber() {&#xA;       return fixedValue;&#xA;   }&#xA;}&#xA;class Game {&#xA;    Generator generator;&#xA;    Game(Generator generator) {&#xA;         this.generator = generator;&#xA;    }&#xA;...&#xA;}&#xA;Game game = new Game( &#xA;                   // new UniformGenerator(1,10) // &#xA;                      new FakeGenerator(33)  // for debugging&#xA;                    );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-02-08T13:29:37.053" LastActivityDate="2018-02-08T13:29:37.053" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4316" PostTypeId="2" ParentId="1397" CreationDate="2018-02-08T15:55:56.533" Score="3" Body="&lt;p&gt;I work for UTeach CSP and as far as I understand, the College Board released has results to endorsed providers from 2017-2018 (meaning projects like CS50 and CodeHS aren't included because they were approved after the beginning of the year). They are not planning to release the scores themselves, but leaving it up to providers to share. Below are links to provider score publications that I have seen. There may be information for BJC and PLTW, but I haven't seen them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UTeach: &lt;a href=&quot;https://medium.com/@uteachinstitute/uteach-computer-science-principles-and-underrepresented-students-f1c445df638d&quot; rel=&quot;nofollow noreferrer&quot;&gt;UTeach Computer Science Principles and Underrepresented Students&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code.org: &lt;a href=&quot;https://medium.com/@codeorg/73-of-code-org-students-passed-the-ap-exam-187cd65b9a88&quot; rel=&quot;nofollow noreferrer&quot;&gt;73% of Code.org students passed the AP exam!&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mobile CSP: &lt;a href=&quot;http://blog.mobile-csp.org/2017/09/23/78-of-mobile-csp-students-passed-ap-exam/&quot; rel=&quot;nofollow noreferrer&quot;&gt;78% of Mobile CSP Students Passed AP Exam&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4282" LastEditorUserId="-1" LastEditDate="2018-02-10T19:45:32.943" LastActivityDate="2018-02-10T19:45:32.943" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4317" PostTypeId="1" CreationDate="2018-02-08T16:50:10.747" Score="6" ViewCount="295" Body="&lt;p&gt;Here is the essential parts of a (HS) Junior level question from one of our (Canadian) national computing challenges.  (&lt;a href=&quot;http://www.cemc.uwaterloo.ca/contests/computing/2017/stage%201/juniorEF.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.cemc.uwaterloo.ca/contests/computing/2017/stage%201/juniorEF.pdf&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;h3&gt;Problem start&lt;/h3&gt;&#xA;&lt;p&gt;Input Specification:&lt;br /&gt;&#xA;The first line of input contains the integer x (−1000 ≤ x ≤ 1000; x != 0). The second line of input contains the integer y (−1000 ≤ y ≤ 1000; y != 0).&lt;/p&gt;&#xA;&lt;p&gt;Output Specification&lt;br /&gt;&#xA;Output the quadrant number (1, 2, 3 or 4) for a specific x,y coordinate.&lt;/p&gt;&#xA;&lt;h3&gt;end&lt;/h3&gt;&#xA;&lt;p&gt;I have long suspected a difference in the outcome between objects-early and objects-late.  For instance, a student who was given an objects-early approach might create code like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Point&#xA;{&#xA;    public Point( int x, int y)&#xA;    {&#xA;        this.x = x;&#xA;        this.y = y;&#xA;    }&#xA;&#xA;    public int getQuadrant()&#xA;    {&#xA;        if(x&amp;gt;0 &amp;amp;&amp;amp; y&amp;gt;0) return 1;&#xA;        if(x&amp;gt;0 &amp;amp;&amp;amp; y&amp;lt;0) return 4;&#xA;        if(x&amp;lt;0 &amp;amp;&amp;amp; y&amp;gt;0) return 2;&#xA;        if(x&amp;lt;0 &amp;amp;&amp;amp; y&amp;lt;0) return 3;&#xA;        return 0;   // origin or no quadrant&#xA;    }&#xA;&#xA;    private int x = 0;&#xA;    private int y = 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Whereas a student who was given an objects-late approach might create code more like so:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public int determineQuadrant1( int x, int y )&#xA;{&#xA;        if(x&amp;gt;0 &amp;amp;&amp;amp; y&amp;gt;0) return 1;&#xA;        if(x&amp;gt;0 &amp;amp;&amp;amp; y&amp;lt;0) return 4;&#xA;        if(x&amp;lt;0 &amp;amp;&amp;amp; y&amp;gt;0) return 2;&#xA;        if(x&amp;lt;0 &amp;amp;&amp;amp; y&amp;lt;0) return 3;&#xA;        return 0;   // origin or no quadrant&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And similarly later in the same challenge students were asked if there could arrive at a destination (coordinate) using an exact number of moves (energy) and I noticed these types of solutions:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Point {&#xA;      public int distanceTo( Point p )&#xA;      { return | x – p.x | + | y – p.y | ; }    // math notation used }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;While Late Objects students continued to approach the solution as functions with:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int getDistance( int x1, int y1, int x2, int y2 )&#xA;{ /* same math */ }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What I think I am seeing is a preference for Early Object students to employ objects and services in their solutions from the start, while Late Object students kind of ease into it if at all.&#xA;I have additional examples from questions later in the challenge that seem to support this.&lt;/p&gt;&#xA;&lt;p&gt;Is there evidence, either published or anecdotal, that I am correct?  Do we know that the order of instruction matters here?&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-09T20:56:01.763" Title="Is there evidence of differences in the outcomes of objects-early vs objects-late?" Tags="|curriculum-design|java|object-oriented-paradigm|" AnswerCount="1" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4318" PostTypeId="2" ParentId="4317" CreationDate="2018-02-08T18:16:19.090" Score="1" Body="&lt;p&gt;tl;dr/ Students tend to do what they have the most practice doing. But timed contests can advantage/disadvantage some students independent of skill and background. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have to admit I'm not a big fan of timed contests for programming. I don't know if that is the situation here, of course. The problem is that they favor &lt;em&gt;quick thinking&lt;/em&gt; over &lt;em&gt;deep thinking&lt;/em&gt;. If you don't have time to get &lt;em&gt;something&lt;/em&gt; for every question your score likely suffers even if your solutions to the ones you work on are brilliant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice to a student taking such a challenge would be to get &lt;em&gt;something&lt;/em&gt; for every question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I would expect that students who have seen a lot of OO, and, in particular, have written a lot of classes themselves would naturally (and quickly) put down a class framework and then write methods. Less likely (given time constraints) would they do a problem decomposition into appropriate helper objects and composition of objects to solve any problem. It just takes too long, unless they have an IDE that will produce class/method templates at a click, or use JUnit or similar to build the application scaffolding for a given test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, I'd expect that a student with little experience in creating classes would be more likely to just write functions, even if they had seen objects/classes. In a way, assuming that the test judging criteria allow either approach, these students may have a bit of a time advantage since there is less to type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The psychological effect here is that you tend to do what you have the most practice doing. So Object-Early students automatically start by writing class ..... and Object-Late students may not. But there is little time for reflection on the quality of your overall structure in any case. And likely none for refactoring. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A possible countering psychological effect, since the competitions/challenges take place during the school year is that there is a tendency to repeat what you have most recently been focused on, being fresh in your mind, though less settled. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My bottom line, however is that programming isn't best tested in a timed environment, especially when the questions can be tricky in some sense, where you get an advantage, perhaps serendipitously, if you just think of the trick involved or have seen it before. Some students (my history says I'm one of them) is disadvantaged in this situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I can write code very quickly (hundreds of correct lines of code per day) with good tools and practices, including test-driven development with a good IDE (Eclipse). But if you give me a variation of NIM or some other mathematical puzzle, I'll stare at it for too long. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I also teach objects from the start (before &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;) since I value large scale structure over small. That is, providing a solid framework for the smaller scale issues. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-08T19:08:31.277" LastActivityDate="2018-02-08T19:08:31.277" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4319" PostTypeId="1" CreationDate="2018-02-08T18:49:51.860" Score="6" ViewCount="350" Body="&lt;p&gt;One primary issue I have as an Instructor is increasing student motivation. For me, there are only two motivations in life:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Because I enjoy it  &lt;/li&gt;&#xA;&lt;li&gt;Because I need to earn a living  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Reason #2 is probably too distant for most students to relate to, and if they don't already have #1, how can I give it to them? I have been fortunate that my interests have led to being able to support myself (by programming and by teaching it), but from what I can tell, most young people are &lt;em&gt;not really interested in anything at all,&lt;/em&gt; which is breathtaking. So, to avoid a future failure of #2, and intense boredom from lack of #1 throughout schooling, how can I encourage interest and motivation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain why this is so important, I quote from the &lt;a href=&quot;https://computinged.wordpress.com/2013/01/04/moocs-are-a-fundamental-misperception-of-how-learning-works/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computing Ed Research Blog&lt;/a&gt; (emphasis in original):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;If the only educated people in our society were the ones who wanted to learn (at the start, from the beginning of a class), our society would collapse.&lt;/em&gt; We would have too few educated workers to create innovations and maintain the technology we have. &lt;strong&gt;Our society depends on teachers who motivate students to persevere and learn.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I have long puzzled over what I see around me: that many people think of their job as just providing a paycheck. I could not survive that way, work has to be interesting also. But now I see that this is not just my problem, it is a problem for society, because unmotivated people will not be creating any new ways to improve our lives and keep the economy going. Apparently the tendency will be for more and more work to be automated, surprisingly not at the grunt level but at the white-collar level. So, we can either get forced out of creative, interesting work by automation, or we can outrun it, creating new opportunities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I motivate students to &quot;persevere and learn&quot;? How do you do inspire interest where it does not already exist? This is my personal blind spot, and I appreciate any suggestions and insights.&lt;/p&gt;&#xA;" OwnerUserId="4284" LastEditorUserId="27" LastEditDate="2019-04-10T19:52:45.233" LastActivityDate="2019-05-08T22:20:35.880" Title="How do teachers motivate students to persevere and learn?" Tags="|student-motivation|classroom-environment|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4320" PostTypeId="2" ParentId="4319" CreationDate="2018-02-08T21:24:04.643" Score="2" Body="&lt;p&gt;There are many ways to motivate students, but it is a personal, not a group thing. The first thing to keep in mind is that your job is &lt;em&gt;not&lt;/em&gt; to deliver material. Wikipedia etc. can do that just fine. You have a different job. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Teaching requires a personal relationship between teacher and student&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Think Socrates and the Socratic method. You need to speak, somehow, to each student. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students will be motivated by you, personally, and your story. But that requires that you open yourself to them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students are motivated by solving hard problems. Some by visible progress as they learn. Some by any success, no matter how small. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students are motivated by a relationship with their peers. Some by competition with their peers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students have hidden motivations (in life) and you might be able to find out a bit about that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can exploit all of that depending on how you teach the class and think about each student in front of you. Hopefully it is a reasonable number. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But an additional problem you face is that many of your students don't really know how to learn. I've noticed that in recent years many students have been neglected. They don't know how to listen in class or how to take notes. They don't know how to separate the big ideas from the details. They don't know how to review. They don't know how to ask for help without losing &quot;face.&quot; You may have to teach them how to do all of those things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many ways to do all of these things. Group work has helped in my courses. Student research on problems they propose themselves. Asking questions at the end and beginning of a class period helps (&quot;What is the big idea today&quot;, (What were three big ideas yesterday?&quot;, &quot;Why is ... important?&quot;) Praise them in public and privately. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once had to scare a group of students, but was careful to lead them to a better path immediately. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You also need to remember that your students are not like you. If you teach grad school they may be, but otherwise, not so much. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-08T21:48:46.843" LastActivityDate="2018-02-08T21:48:46.843" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4321" PostTypeId="2" ParentId="4319" CreationDate="2018-02-08T22:01:41.890" Score="5" Body="&lt;p&gt;Your instinct are dead-on.  Students, at least in grades k-12, are not terrifically motivated by what they will &quot;need&quot; in the working world.  There are plenty of good reasons for this.  First of all, what they will do for their work seems very abstract and far-off.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, viewed from a vocational lens, there is a quite reasonable shot that they won't actually need the things we think they will.  They might not be going into (or might not think they are going into) the careers we are thinking of, and in any case, jobs are so heterogeneous that to make almost almost any statement of what work requires nearly meaningless.  Add into the mix the speed at which the world seems to be changing, and our predictive abilities just get worse and worse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But not everything is lost.  People, including kids, are &lt;em&gt;intrinsically&lt;/em&gt; motivated to learn when conditions are right.  But we have to get a lot of different elements all moving in the same direction, and for some students, this is easier to manage than for others.  Some students love school and think of it as a place where they can thrive, but some others are a little broken and burnt out, or feel unsafe either about approaching difficult topics, or about their surroundings, and these problems can make intrinsic motivation very hard to tap into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The end-goal is to help kids feel &lt;strong&gt;safe to try their best&lt;/strong&gt;, that the &lt;strong&gt;ends are actually achievable&lt;/strong&gt;, and that the material &lt;strong&gt;connects to their&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;current&lt;/em&gt;&lt;/strong&gt; &lt;strong&gt;world.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;-- Organizing the world for motivation --&lt;/h1&gt;&#xA;&#xA;&lt;h1&gt;Teacher Beliefs&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Let's start with a few ideas that have to come from the front of the room.  Certain teacher attitudes permeate the classroom.  These attitudes are not sufficient by themselves to motivate kids, but if they're not there, nothing else is going to go right.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The teacher believes in the material being taught.  They think that it is both useful and interesting.  (And hopefully a little amazing, too.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The teacher believes that the students are &lt;em&gt;absolutely capable&lt;/em&gt; of learning the material.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The teacher loves their students, and genuinely wants to see those students thrive.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The teacher praises good student &lt;em&gt;practices&lt;/em&gt; above and beyond student &lt;em&gt;accomplishments&lt;/em&gt;.  There is a lot of research to back this up; students who receive praise predominantly for being right, for being smart, or for being the best at things often become wary of difficult material and of the unknown.  Why throw yourself into something if you can't succeed like you have in the past?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By contrast, if you are typically praised for good process or for working hard, then when the material gets hard, that praise still feels quite accessible.  You can still organize your own learning and work hard.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;Student Beliefs&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;There are a few things that the students need to know, and these should be directly taught and modeled at every opportunity.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They are safe in school.  There are people who care about them, there are people who are their friends, and there are people that they can go to if they are down or get into some sort of trouble.  &lt;em&gt;(Particularly in the k-12 arena, this requires some active monitoring on the part of the teacher, and may necessitate some intervention as well. People don't thrive when they are frightened or lonely.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Intelligence is not fixed.  Intelligence is more like a muscle, because you can flex it and make it more powerful over time with work.  Improvement is always the goal, not just the end-product.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;Classroom Practices&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Once the beliefs above are in place, we can actually do the work of motivating the students:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;What makes something intrinsically interesting is &lt;em&gt;connections&lt;/em&gt;.  The more connections that can be drawn from the material to the world that the students already know about, the more intrinsically interesting the material is.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those connections can be to the students' social worlds (that's where you end up with entertainment tie-ins; if the kid knows that &quot;all the other kids&quot; think that Beyoncé is cool, then class material that relates to Beyoncé is now instantly connected to that child's social world.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, it's better if the connections are deeper and more thoughtful, but if you're working with kids who are difficult to motivate, take no shame in working any angle available to you.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more the connections, the better.  The richer the connections, the better. The more surprising the connections, the better. Connect ideas to what they've seen in the past. Connect ideas to weird things you've just shown them. Connect ideas to the world around them. Take pains here to make the invisible absolutely explicit.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Help students to monitor their own progress and set their own short-term goals that lead to the big picture that the students can actually accomplish.  (This is hard to do. Even adults are often bad at assessing their own understanding, so teachers can create activities to help kids reliably monitor their own learning.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Keep your criticisms of students both constructive and loving.  Always make &lt;em&gt;explicit&lt;/em&gt; how your criticisms are really aimed at helping the student, NOT cutting them down, and make clear that there will be accompanying support to help the student learn to do better.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h1&gt;It is achievable&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It is.  It's not easy, but it's possible to get kids really excited about learning all sorts of things.  If you watch some videos of amazing teachers (YouTube is an incredible resource here), you can watch this motivating work taking place at every grade level and in every sort of classroom imaginable.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning to apply these ideas to your classroom is hard.  Watch an amazing third-grade music teacher, and then watch an amazing 11th-grade math teacher, and their practices will seem very different at first glance, but the core underlying ideas are actually the same.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-02-08T22:01:41.890" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4322" PostTypeId="2" ParentId="4298" CreationDate="2018-02-11T09:15:19.353" Score="3" Body="&lt;p&gt;I'd say graph theory lies right in the sweet spot of the intersection of Discrete Math and CS - in fact, at my own university, the idea of graphs are introduced in CS courses before it goes into more depth in later math courses (in an intro to combinatorics course). There are some intuitive ways to provide motivation for the topics (e.g. path finding and taxonomy intuitively &lt;em&gt;feel&lt;/em&gt; like they should be modeled with graphs and trees respectively), and then there are some problems which at first glance &lt;em&gt;don't&lt;/em&gt; feel like they have anything to do with graphs, but one can interpret the problem as a graph - scheduling problems and graph colourings, or a node representing the state of a puzzle/game and edges representing actions being done in this puzzle/game, connecting to the node representing the state after the action is done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the puzzles example, for appropriate puzzles, this representation could be used to &quot;brute force&quot; a solution to said puzzle, e.g. a Rubik's cube or sudoku. The &quot;actions&quot; for a Rubik's would be the possible rotations of the cube. The &quot;actions&quot; for a sudoku might be to fill in one of the empty boxes with some number. An important distinction between these two examples is that in a Rubik's cube, we can return to a state we previously had - the graph formed has cycles in it, so we have to take that into account. In the sudoku example, because we ALWAYS fill in a box with a number, the number of empty spaces always decreases by 1 for each &quot;action&quot; (we never &lt;em&gt;erase&lt;/em&gt; a number), thus our graph representing the Sudoku puzzle's possible solutions is acyclic. In both, we'd like to stop our actions once the puzzle has been &quot;solved&quot;, which we'd have to check for. Also, note that both graphs are directed graphs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a bunch more to be said about applications of graphs... What's important is, as the other answer points out, not just &lt;em&gt;learning&lt;/em&gt; about graphs, but actually programming some algorithms with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also want to cover some basic propositional logic and (finite) set theory. Reasoning about abstract logical statements as well as sets is fundamental to computer science just as it is mathematics. Unfortunately it may feel too abstract for some students... I had to take a CS course in Logic, and for part of this course, we used the proof assistant Coq (&lt;a href=&quot;https://en.wikipedia.org/wiki/Coq&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Coq&lt;/a&gt;). Unlike writing mathematical proofs by hand, writing in Coq feels more like writing a program (which is because Coq is (in a sense) &lt;em&gt;also a programming language&lt;/em&gt;), and this might be a way to cater it to CS students - proving is programming.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might add more stuff here if I can think of it... Thinking of linear algebra, which some mysteriously classify as discrete math. My high school used to do this, though I'll admit it has a discrete &quot;feeling&quot; to it versus Calculus or Analysis, and it also &lt;em&gt;can be&lt;/em&gt; truly discrete with finite fields, or finite modules over a (discrete) ring. Maybe transformation matrixes being used in computer graphics, with 2D and/or 3D focus depending on the class's maturity. Not sure if this is the right fit for what you want though...&lt;/p&gt;&#xA;" OwnerUserId="3894" LastActivityDate="2018-02-11T09:15:19.353" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4323" PostTypeId="2" ParentId="4298" CreationDate="2018-02-11T13:32:24.293" Score="3" Body="&lt;p&gt;This question is hard to answer and especially hard to provide a &lt;em&gt;complete&lt;/em&gt; answer. There are a lot of things that are good to know if you work with computers, though not everyone will use everything on anyone's list of favorites. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, some sorts of discrete/finite math are especially useful as they are useful for building models, independent of computers. The models can be programmed to solve useful problems in the world. I'll mention a few here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea here is that the more ways you have to &lt;em&gt;approach&lt;/em&gt; a problem, the more likely it is that you can provide a solution. Even an approximate solution is often enough, especially in situations of uncertainty or when there are many variables and many constraints. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Markov_chain&quot; rel=&quot;nofollow noreferrer&quot;&gt;Markov Chains&lt;/a&gt; and Markov Processing. These describe dynamic systems in which changes depend on only the current state and not a history. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Linear_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;Linear Programing&lt;/a&gt;, and especially Integral Linear Programming where solutions must be integers. These are used for all sorts of optimization problems where constraints must be observed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discrete Probability and &lt;a href=&quot;https://en.wikipedia.org/wiki/Combinatorics&quot; rel=&quot;nofollow noreferrer&quot;&gt;Combinatorics&lt;/a&gt; which has entries to many related fields (Graph Theory, Coding Theory, ...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Decision_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Decision Theory&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Decision_tree&quot; rel=&quot;nofollow noreferrer&quot;&gt;Decision Trees&lt;/a&gt;, often used in algorithm design. Modeling under uncertainty. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Set_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Set Theory&lt;/a&gt; and, more generally, Mathematical Logic, used ubiquitously in programming and in Theoretical CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Game_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Vectors and Matrices&lt;/a&gt; (not strictly discrete, of course) but often used in proofs and models, especially models of physical systems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Game_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Game Theory&lt;/a&gt;, again used in modeling and in predicting outcomes in complex situations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Number_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Number Theory&lt;/a&gt; used in many things, especially cryptology. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Often such courses are, indeed, best taught by mathematicians. But it is also possible for a CS department to negotiate with the Math department on content. Even more radical, is a collaborative course, taught jointly by a mathematician and a computer scientist in which programming is used to enhance the material and make it more concrete. It is also possible for it to be  team-project course in which different teams work on different problems, each emphasizing some different sort of mathematical modeling. A joint wrap up (science fair) can be very valuable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that any of these topics could be a full course (or more). Some small subset of topics from several of these areas is enough to make up a course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-11T15:11:08.937" LastActivityDate="2018-02-11T15:11:08.937" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4324" PostTypeId="1" AcceptedAnswerId="4325" CreationDate="2018-02-11T16:19:18.360" Score="8" ViewCount="1430" Body="&lt;p&gt;I'm a retired college teacher now teaching things like Boolean logic to students in several middle schools (ages: 11-14).  I taught that module for the first time last week and discovered to my chagrin that I had mixed two different notations.  I'm teaching specifically logic expressions, with very little manipulation using the identities of Boolean algebra.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started out with the standard notation of logic: ∧, ∨, and ¬ but used center-dot, plus, and overbar by accident in a table of identities.  I worry that using + for inclusive disjunction will confuse students, and I know that implicit multiplication, &lt;em&gt;i.e.&lt;/em&gt; AB for A∧B is confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hesitate to use the notation of programming because it seems Java and Python are equally popular, but with very different notations.  Java's use of ^ for exclusive disjunction further muddles things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of research or have practical advice on what notation I should use to teach these concepts?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; OK, I've accepted an answer, and decided to use the engineering notation, but to present a table comparing notations near the end of the module.  I chose end rather than beginning because I want the students familiar with one notation before I present the others. I'm going to start &lt;a href=&quot;https://cseducators.stackexchange.com/q/4346/3524&quot;&gt;another question&lt;/a&gt; about how to explain + as OR.  &lt;/p&gt;&#xA;" OwnerUserId="3524" LastEditorUserId="3524" LastEditDate="2018-02-18T16:04:01.050" LastActivityDate="2021-11-21T08:04:57.123" Title="What Notation for Teaching Boolean Logic?" Tags="|boolean-algebra|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4325" PostTypeId="2" ParentId="4324" CreationDate="2018-02-11T16:28:13.457" Score="4" Body="&lt;p&gt;&lt;strike&gt;If your students were a bit older, I'd be more comfortable with the following, but suggest it anyway.&lt;/strike&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an advantage for a student to know that the concepts exist independent of any notation and that historically  notations have differed based on use and context. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would, myself, provide them with a handout giving names to the concepts and various notations used for each. Then, I'd use the various symbols as naturally as possible, responding to the inevitable questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only caveat would be that you don't mix the different systems in any given lecture/conversation. You should also suggest that the students be consistent as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rationale here is that students will likely see different symbols sooner rather than later if they do any reading or research outside your instruction. It is better that they have some preparation and at least a hint that the terminology isn't entirely consistent or standardized. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the terminology, by the way, such as + for &quot;or&quot; is actually tied to the concepts in interesting ways. For example, the similar shape of ∧ and ∩ help students understand the relationship between logic and set theory. Some of the symbols, on the other hand, were chosen for no better reason than that they exist on common input devices such as keyboards. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-12T14:25:49.427" LastActivityDate="2018-02-12T14:25:49.427" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4326" PostTypeId="2" ParentId="4324" CreationDate="2018-02-11T17:03:01.563" Score="3" Body="&lt;p&gt;The two systems have different value.&lt;/p&gt;&#xA;&lt;h1&gt;For &lt;span class=&quot;math-container&quot;&gt;$\land$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\lor$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\lnot$&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It is good in that you can see its relationship with set theory.&#xA;∧, ∨,&amp;lt;,&amp;gt; vs ∩, ∪, ⊂, ⊃&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The not symbol is easier to type that the bar from the other system.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;For &lt;span class=&quot;math-container&quot;&gt;$\cdot$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$+$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\bar{}$&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;It is easier to learn. Boolean algebra is algebra (Bidmas and all that).&lt;/p&gt;&#xA;&lt;p&gt;For the most part you can manipulate the algebra using rules that you learnt in maths class. Except that &lt;span class=&quot;math-container&quot;&gt;$2=1$&lt;/span&gt;, that therefore &lt;span class=&quot;math-container&quot;&gt;$2+1=1+1=2=1$&lt;/span&gt; etc.&lt;/p&gt;&#xA;&lt;p&gt;Therefore&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$1+1=1$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$a·a = a² = a¹ = a$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Most of the rules can be worked out from &lt;span class=&quot;math-container&quot;&gt;$1=2$&lt;/span&gt;, though it is worth also learning DeMorgan theorem, and learning to derive all of the rules from this one basic rule and regular algebra.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-11T17:03:01.563" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4327" PostTypeId="2" ParentId="4324" CreationDate="2018-02-11T18:14:03.203" Score="4" Body="&lt;p&gt;As per &lt;a href=&quot;https://cseducators.stackexchange.com/a/4326/27&quot;&gt;ctrl-alt-delor&lt;/a&gt;'s response, I use different systems with different groups. It has been my experience that most of my students use &lt;em&gt;no&lt;/em&gt; formal system of Boolean Algebra prior to beginning studies in CS, so I will typically start with whatever programming language they have the most experience with.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my program they traditionally use Java.  (Here's a hint from the trenches: while Java does indeed use &lt;code&gt;^&lt;/code&gt; for $\oplus$, most students are unaware of this operator or its function.  You may find that there are fewer translation issues for the students if you use &lt;code&gt;!=&lt;/code&gt;, which accomplishes the same thing in a purely Boolean world.  This gives you the side benefit of being able to describe $\overline{A \oplus B}$ as &lt;code&gt;A == B&lt;/code&gt;, which is instantly and intuitively understandable.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No matter which system you use, it is worth it to give all of the symbols once when doing the truth tables. (I also include the gates when I do this). This way, they will at least see the systems once, and if you accidentally write a symbol from the wrong system on the board while you are talking, they will not become nearly as confused. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may still have to correct what you wrote for the sake of consistency, but at least they will know that there are additional notational systems in the first place, so they'll see your correction as a notational translation instead of something more perplexing.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="204" LastEditDate="2018-02-17T10:26:38.033" LastActivityDate="2018-02-17T10:26:38.033" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4328" PostTypeId="2" ParentId="4324" CreationDate="2018-02-12T09:29:45.527" Score="1" Body="&lt;p&gt;On a very personal note, I prefer&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;($\cdot$), ($+$), ($\bar{}$)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;as per  &lt;a href=&quot;https://cseducators.stackexchange.com/a/4326/27/&quot;&gt;ctrl-alt-delor&lt;/a&gt;'s &lt;strong&gt;second point&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's easier to understand because the notations which they represent are also used in Trigonometry. So the students can easily relate the function of the symbols.&lt;/p&gt;&#xA;" OwnerUserId="4294" LastEditorUserId="58" LastEditDate="2018-02-13T01:47:44.360" LastActivityDate="2018-02-13T01:47:44.360" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4329" PostTypeId="1" CreationDate="2018-02-12T20:14:43.797" Score="4" ViewCount="78" Body="&lt;p&gt;When I have finished introducing my students to Objects (including Encapsulation, Inheritance, Polymorphism, and a healthy dose of philosophy), I would like to give them a lab with the following criteria:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They should be designing a set of Objects from the ground-up.  That could include designing part of the project itself (such as choosing an ecosystem or a sport to simulate)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The requirements of the project should be rich enough to support the use of encapsulation, inheritance, and polymorphism.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Because I want the lab to involve &lt;em&gt;design&lt;/em&gt; of a good system, and not merely &lt;em&gt;utilization of a preexisting system&lt;/em&gt;, I have been getting myself stuck.  I want this to be an Objects &lt;strong&gt;Design&lt;/strong&gt; Lab, and I'm not sure how to get started.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My classes have 15-22 kids, and they are expected to do a substantial portion of the lab work during class (with me present).&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-12T21:22:00.150" LastActivityDate="2018-02-13T00:54:40.740" Title="Object Design Lab" Tags="|lesson-ideas|object-oriented-paradigm|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4330" PostTypeId="2" ParentId="4329" CreationDate="2018-02-12T21:38:00.180" Score="3" Body="&lt;p&gt;The basic idea is for the students to build a Model for an application that might in some larger scenario be expanded to a complete Model-View Controller application. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The suggested application is a Dungeon Game[1]. There are three basic kinds of objects: Characters, Places, Things. The Characters can move through the Places and can acquire Things and leave them behind. They do interesting things in the places: fight Monsters (a kind of Character), etc. The places are connected in some sort of, possibly dynamic, graph (map). The Things have capabilities to enhance the Characters and they can be carried from Place to Place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, to be successful at this you need some sort of development process. I suggest an Agile process in which you serve as Customer (Product Owner) and give them little bits of a specification at a time so that they work in small chunks (Stories) to extend a growing base. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a minefield to let them both specify and build the thing. On the other hand, it is nearly impossible to give them a complete spec up front. Much better to make it an agile project with someone (you) as Customer, feeding in Stories as you go. On Monday you give the students a few stories to build. On Friday you measure progress and prepare for the following week. Iterations are one week and it is fine if the stories don't all get built successfully. The learning is more important than the code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your stories talk about behavior. Say you describe a new kind of Character and what it's goals are, or a new kind of Thing. Students create the classes for these, but you need some sort of overriding set of Interfaces for the three basic types. Perhaps a Character can moveTo(aPlace), and can obtain a list of things in that place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want them to have a chance to actually specify the world a bit you could have a discussion (open ended) on Friday in which they throw out ideas for things that you might add to the spec on Monday. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage of an agile approach is that the students can be a success even if very little actually gets built. They will work on small pieces (set of stories) and have frequent successes. Otherwise they are too likely to take on big chunks and fail at those leaving chaos behind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you will also need to be careful that they don't take over and decide themselves WHAT to build. That is the customer's job, not the developer's. Students often have too little knowledge of the difference as most student work is underspecified so they have to fill in the blanks and get used to doing that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also get them used to the small scale practices of Agile development here, such as Pairing, Test First, Stand Up Meetings and a few others along with Story-Driven-Development driven by a Customer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they don't do all of their work in a lab, however, enforcing the pairing rule will be harder (No code written by individuals can be committed to the base). Projects can fail when &quot;prima donnas&quot; build something that is inconsistent with everyone else's code/ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They will likely resist the testing rule (No code written unless you have a failing test for the story first) at first. When they come to you with any question, ask to see the test or ask them to write one. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Two more ideas about organization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students should switch partners while pairing quite frequently. As students this helps them learn to work with a variety of people. As professionals it helps them learn the code base as they only work on a part of it themselves but a new partner has seen other parts. The driver-navigator idea is also good here as the navigator has some perspective on the whole thing that the driver does not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, since a Story isn't a complete specification for even a part of the app, a pair with a new story needs to consult you for more information so that they are building your idea, not making things up as the go along. Likewise, when they finish they need to get your sign-off on the work. This is just standard agile practice, but in a classroom it gives them access to your expertise as well. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;[1]This idea comes from Ward Cunningham in a private conversation. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-13T00:54:40.740" LastActivityDate="2018-02-13T00:54:40.740" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4331" PostTypeId="2" ParentId="4329" CreationDate="2018-02-12T21:56:34.613" Score="0" Body="&lt;p&gt;One rich area is ecosystem simulation with multiple plants, herbivores, carnivores, and omnivores.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The card game &quot;Evolution&quot; can serve as a very good model, with every creature being assigned various defensive and offensive capabilities.  Each defensive trait would receive an corresponding offensive one. Given a few examples (such as &quot;tall&quot; as a plant feature that protects a plant against creatures that don't possess the &quot;long neck&quot; trait), this provides students plenty of chances to design their own creative universes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additional aspects that would he required from the model include a requirements that individual creatures either eat every round or die, that creatures only reproduce when they obtain a certain amount of food, and that larger animals can only eat smaller animals.  (Any of these requirements could be overridden with an offensive or defensive trait).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible to add in diseases, reproduction rates, etc.  If the students have designed a modelling engine with a certain number of available traits, they can then see if they can enact worlds that obtain certain outcomes, such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No creatures go extinct within 500 turns.&lt;/li&gt;&#xA;&lt;li&gt;Every creature goes extinct except for 2, which create an equilibrium.&lt;/li&gt;&#xA;&lt;li&gt;Everything goes extinct.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-02-12T21:56:34.613" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4332" PostTypeId="1" CreationDate="2018-02-13T03:27:43.147" Score="5" ViewCount="720" Body="&lt;p&gt;For teaching assembly language and computer architecture, are any other platforms besides PEP/8 used, and if so, what are they called and how widespread are they?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or more generally, how is assembly language &lt;em&gt;usually&lt;/em&gt; taught at the college level? I need more information than just my personal experience in one class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ask because I have created a similar but more powerful platform and need to comprehensively evaluate the existing systems for my research project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't been able to find an authoritative source about PEP/8 but this powerpoint describes it pretty well:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kirkwood.edu/pdf/uploaded/262/sp07lec6corrected.ppt&quot; rel=&quot;nofollow noreferrer&quot;&gt;PEP/8 Overview&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically it is a very simple virtual machine that teaches the basics of assembly programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that PEP/8 too simple and would support teaching with real architectures, as some of you have mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have studied at several public schools in California and PEP/8 is used universally here.&lt;/p&gt;&#xA;" OwnerDisplayName="user4299" LastEditorDisplayName="user4299" LastEditDate="2018-02-15T05:30:54.000" LastActivityDate="2018-02-18T14:12:34.220" Title="How widespread is the use of the PEP/8 assembly simulator in education?" Tags="|assembly|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4333" PostTypeId="2" ParentId="4332" CreationDate="2018-02-13T03:47:27.380" Score="3" Body="&lt;p&gt;This is really only a half-answer, as I cannot speak to what is used generally.  Perhaps someone else will be able to find a compiled  report somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can attest, however, that other systems are definitely used. We use 6502 assembly, for the reasons outlined &lt;a href=&quot;https://cseducators.stackexchange.com/q/410/27&quot;&gt;here&lt;/a&gt;. (So you don't have to follow the link, one of the biggest reasons is that it was one of the last real-world assembly languages really designed for people instead of compilers, and utilizes a simple syntax and a straightforward architecture that allows our students to understand the inner workings without too much difficulty.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-13T11:43:05.627" LastActivityDate="2018-02-13T11:43:05.627" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4334" PostTypeId="1" AcceptedAnswerId="4336" CreationDate="2018-02-13T16:57:38.520" Score="7" ViewCount="660" Body="&lt;p&gt;I keep seeing students use &lt;code&gt;float&lt;/code&gt; in lab lessons:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a simple physics calculation of kinematics. Many, many students use &lt;code&gt;float&lt;/code&gt; to hold the variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;float y,g,t,v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this specific lab, they idea is for them to see:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$y(t_{n+1})=y(t_n)+\frac{\Delta y}{\Delta t}\Delta t\approx y(t_n)+v(t_n)\,(t_{n+1}-t_n)$$&#xA;with&#xA;$$v(t_{n+1})\approx v(t_n)+g*(t_{n+1}-t_n)$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and then run over times $\{t_i\}_{i=1}^n$ and see that the $y$ values they get are the same as:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$y(t_n)\approx y(t_1)+v(t_1)\,t_n+\frac{1}{2}g\,t_n^2$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, because they use &lt;code&gt;float&lt;/code&gt;, they get rounding errors when dealing with small time differences ($\Delta t$). I don't want to get into the whole floating point arithmetics field, because they won't understand that (the word &quot;exponent&quot; would frighten them, to say the least). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if they use &lt;code&gt;double&lt;/code&gt;, then the rounding errors wouldn't be significant (because they aren't dealing with $\Delta t \le 10^{-5}$ of a second). So I try to explain that they should use &lt;code&gt;double&lt;/code&gt;, but just stating it as a &quot;rule of thumb&quot; isn't a good idea (because there &lt;strong&gt;are&lt;/strong&gt; cases where one would prefer &lt;code&gt;float&lt;/code&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what explanation, as to why they should use &lt;code&gt;double&lt;/code&gt; for these things, would be compelling? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Better yet, is there any way I can &lt;strong&gt;show&lt;/strong&gt; the students such an explanation? (Perhaps an online, interactive demonstration of floating point precision etc. - I couldn't find one)&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-08-30T17:35:36.523" Title="Explaining to students why to use double instead of float (unless there's a very good reason)" Tags="|data-types|secondary-education|floating-point|" AnswerCount="7" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4335" PostTypeId="2" ParentId="4334" CreationDate="2018-02-13T17:35:52.577" Score="8" Body="&lt;p&gt;Luckily this is quite simple to make clear, even if you are steering clear of the IEEE standard.  Honestly, even binary is not needed here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start by borrowing a page from Scheme, and say that we can't make blanket guarantees about the exactness of decimal numbers.  For instance, when we try to express $2/3$ in decimal, and it doesn't work!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the more so when we are restricted to 10 digits.  We write $0.666666667$.  Why?  It's not that 2/3 is $0.66666667$, it's just that we can't precisely represent $2/3$ in decimal, and at the 10th digit, we just round to get as close as we can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is really a problem with any number that has a decimal place.  There are infinite numbers that we can't represent!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The computer has the same problem with decimal numbers as we do.  This isn't a fault of the computer, it's just a feature of floating point numbers, and the computer has to work around it, just like we do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, we do have a way of increasing that precision: we can increase the number of digits allowed.  It doesn't &lt;em&gt;solve&lt;/em&gt; the problem, exactly, but it does get us closer to the true numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the difference between a &lt;code&gt;float&lt;/code&gt; and a &lt;code&gt;double&lt;/code&gt;.  A &lt;code&gt;double&lt;/code&gt; allows more digits.  And that's why it's usually a better idea to use a &lt;code&gt;double&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-14T12:00:57.680" LastActivityDate="2018-02-14T12:00:57.680" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4336" PostTypeId="2" ParentId="4334" CreationDate="2018-02-13T18:05:02.390" Score="6" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Better yet, is there any way I can show the students such an explanation? (Perhaps an online, interactive demonstration of floating point precision etc. - I couldn't find one)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Show them these bits of code:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;float one = 16777291;&#xA;float two = one + 1;&#xA;System.out.println(one == two);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;float one = 1.00000001f;&#xA;float two = one + .00000001f;&#xA;System.out.println(one == two);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Ask them what they expect these to print. They should print &lt;code&gt;false&lt;/code&gt;, right? But when you run them, they print &lt;code&gt;true&lt;/code&gt;!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then explain that this is because &lt;code&gt;float&lt;/code&gt; values can only hold a relatively small number of significant digits. Change the &lt;code&gt;float&lt;/code&gt; values to be &lt;code&gt;double&lt;/code&gt; values and run the code again, and you'll see that &lt;code&gt;false&lt;/code&gt; is printed like we'd expect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain that for many purposes &lt;code&gt;float&lt;/code&gt; is enough precision, but not for this class. Explain that &lt;code&gt;double&lt;/code&gt; has the same problem, but with much more precision. Explain that &lt;code&gt;double&lt;/code&gt; precision is enough for this class, but if they need more precision in the future to use &lt;code&gt;BigDecimal&lt;/code&gt; or something.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-02-13T18:13:52.630" LastActivityDate="2018-02-13T18:13:52.630" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4337" PostTypeId="2" ParentId="4332" CreationDate="2018-02-13T20:31:11.640" Score="4" Body="&lt;p&gt;At Colorado State University we teach the &lt;a href=&quot;http://highered.mheducation.com/sites/0072467509/index.html&quot; rel=&quot;noreferrer&quot;&gt;LC3&lt;/a&gt; assembly language. A quick search for LC3 assembly language shows links to courses at multiple universities. Our course is normally taken by students in the second year and has three primary subject areas.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;C language - students already have at least two semesters with Java, so the programs are more advanced, frequently including an assembler and/or simulator for the LC3.&lt;/li&gt;&#xA;&lt;li&gt;Assembly language - students learn the assembly and write programs for 16 bit floating point math and learn how the run time stack is used in function calls (commonly in the context of a recursive function).&lt;/li&gt;&#xA;&lt;li&gt;Hardware - students study hardware using &lt;a href=&quot;http://www.cburch.com/logisim/&quot; rel=&quot;noreferrer&quot;&gt;Logisim&lt;/a&gt;. They commonly design some of the control for the LC3 machine.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In looking at other schools, I have found several that use subset of MIPS. I hope that helps&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-02-13T20:31:11.640" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4338" PostTypeId="2" ParentId="4334" CreationDate="2018-02-14T00:05:15.233" Score="2" Body="&lt;p&gt;Actually, it isn't quite so clear. If I run this in Java:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;// Simple computation with float and double&#xA;// Increment by a third three times is not the same as incrementing by one&#xA;// Float can actually be more accurate than Double in limited cases&#xA;public static void main(String[] args) {&#xA;    float oneThirdF = 1.0f/3.0f;&#xA;    float wholeF = 0.0f;&#xA;    float countF = wholeF; //initially equal&#xA;    while(countF == wholeF){&#xA;        wholeF = wholeF + oneThirdF + oneThirdF + oneThirdF;&#xA;        countF = countF + 1.0f;&#xA;    }&#xA;    System.out.println(&quot;Float: &quot; + countF + &quot; != &quot; + wholeF);&#xA;&#xA;    double oneThirdD = 1.0d/3.0d;&#xA;    double wholeD = 0.0d;&#xA;    double countD = wholeD; //initially equal&#xA;    while(countD == wholeD){&#xA;        wholeD = wholeD + oneThirdD + oneThirdD + oneThirdD;&#xA;        countD = countD + 1.0d;&#xA;    }&#xA;    System.out.println(&quot;Double: &quot; + countD + &quot; != &quot; + wholeD);&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I get: &lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Float: 3.0 != 2.9999998&#xA;Double: 2.0 != 1.9999999999999998&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, while doubles are certainly more precise than floats, the place in a &quot;floating point&quot; computation at which things go &lt;em&gt;wrong&lt;/em&gt; depends on a lot more than which form you use. Here Float was a bit more &quot;accurate&quot; initially, since Double failed earlier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Lessons:&lt;/strong&gt; Don't use such things for counting. If you need to do computation use the form with more precision. Beware of the results. And testing for equality is pointless (it's why Zeus created Epsilon). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, though this code doesn't illustrate it, there are situations in which the errors are larger than the answers, so saying x ± ε might be entirely meaningless if x is small and ε is large. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, if your use is to take a physical reading from some sort of equipment (say temperature) and report it, with little computation, the shorter (float) type is almost certainly sufficient and likely has more precision than necessary. When there is a lot of computation, use double along with sophisticated error control techniques. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For a (long) explanation of floating point errors see: &lt;a href=&quot;https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html&lt;/a&gt;. This is valid for any language using the IEEE 754 standard (most modern languages and processors). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="104" LastEditDate="2018-08-30T17:35:36.523" LastActivityDate="2018-08-30T17:35:36.523" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4339" PostTypeId="5" CreationDate="2018-02-14T00:24:48.483" Score="0" Body="&lt;p&gt;Floating point numbers often give students troubles as competitions are not precise and comparisons are only approximate. While they are necessary for use in many situations, such as computation of physical quantities and in estimation, they have a different set of rules and pitfalls than fixed point (integer-like) numbers. Use this tag for questions relating to teaching the concepts and the rules (and especially the pitfalls). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-14T00:24:48.483" LastActivityDate="2018-02-14T00:24:48.483" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4340" PostTypeId="4" CreationDate="2018-02-14T00:24:48.483" Score="0" Body="Floating Point is a traditional computer encoding method for numbers of large (or small) size, but limited precision. The bits of the encoding are separated by a mantissa and an exponent. Programming languages usually have a variety of such types trading off word length, precision, and max/min size. Use this tag for teaching such concepts, not for theoretical issues. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-14T00:24:48.483" LastActivityDate="2018-02-14T00:24:48.483" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4341" PostTypeId="2" ParentId="4334" CreationDate="2018-02-14T07:47:41.033" Score="0" Body="&lt;p&gt;I would highly recommend this &lt;a href=&quot;https://stackoverflow.com/a/2386882/2362024&quot;&gt;Answer&lt;/a&gt; to question what the &quot;Difference between float and double&quot; is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If not already done in introduction, i would show the math behind floating point representation on a computer (exponent, mantissa, ...). That shall clearly state the difference between those data types and explain why in physics it is not a good idea to CUT precision. If necessary and for fun reason use 64bit datatypes and calculation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one thing where I have trouble with some answers. For good reason never ever teach the comparison of two floating point numbers or in loop counts, etc. The Reason for that can be found in the CERT C Guides &lt;a href=&quot;https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152181&quot; rel=&quot;nofollow noreferrer&quot;&gt;Link&lt;/a&gt;!&lt;/p&gt;&#xA;" OwnerUserId="3216" LastActivityDate="2018-02-14T07:47:41.033" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4342" PostTypeId="2" ParentId="4159" CreationDate="2018-02-16T20:18:45.273" Score="1" Body="&lt;p&gt;A common misconception many people have is that Python 3's &lt;code&gt;range(...)&lt;/code&gt; function returns an iterator of some kind. This is actually false: it returns a custom sort of sequence object (which, by definition, is also an iterable). What this means is that I think it actually &lt;em&gt;is&lt;/em&gt; legitimate to teach &lt;code&gt;range(...)&lt;/code&gt; as being basically a &quot;list-like&quot; thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More precisely, it returns an object that actually supports almost the same set of operations Python's &lt;code&gt;list&lt;/code&gt; object supports -- the only exceptions are that any methods that allow mutation (such as &lt;code&gt;.append(...)&lt;/code&gt;) are missing, and the &lt;code&gt;.copy()&lt;/code&gt; method is missing for some reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More precisely, the range object...&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;...supports O(1) indexing&lt;/li&gt;&#xA;&lt;li&gt;...supports slicing&lt;/li&gt;&#xA;&lt;li&gt;...can be iterated over multiple times, just like a list. They aren't &quot;consumed&quot;after one pass (After all, ranges are not only iterable, they're sequences).&lt;/li&gt;&#xA;&lt;li&gt;You can check two ranges against each other by equality&lt;/li&gt;&#xA;&lt;li&gt;It supports a wide variety of dunder methods -- for example, doing &lt;code&gt;4 in range(3, 5)&lt;/code&gt; or &lt;code&gt;reversed(range(3, 10))&lt;/code&gt; both work more or less as expected.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What this means is that if you're teaching how to use &lt;code&gt;range(...)&lt;/code&gt;, you can skip having to talk about generators/the whole iterable vs iterator thing entirely, and just introduce &lt;code&gt;range&lt;/code&gt; as a special sort of list that's specifically optimized to represent a large range of numbers w/o needing to consume a huge amount of memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means you still need to introduce a new concept (&quot;oh btw, here's another list-like thing&quot;), but hopefully this shouldn't be as new of a concept if you're also planning on introducing things like tuples or sets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even use this as a way of introducing the notion of objects/how everything in Python is an object. For example, you could introduce the concept of fields and methods using &lt;code&gt;range&lt;/code&gt;'s &lt;code&gt;.start&lt;/code&gt;, &lt;code&gt;.stop&lt;/code&gt;, and &lt;code&gt;.step&lt;/code&gt; attributes and &lt;code&gt;.count(...)&lt;/code&gt; and &lt;code&gt;.index(...)&lt;/code&gt; methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For zip, no such luck, I'm afraid. The &lt;code&gt;zip(...)&lt;/code&gt; function genuinely does return an iterator (e.g. an object that's consumed after one iteration).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But given how &lt;code&gt;zip&lt;/code&gt; is really more of a convenience feature more then anything, you could perhaps defer talking about it until later once students are comfortable with the notion of iterating over various collection types.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2018-02-16T20:18:45.273" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4343" PostTypeId="2" ParentId="4159" CreationDate="2018-02-16T21:09:26.083" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;...but that's really changing the output of zip into something else.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can print the value returned by &lt;code&gt;zip(...)&lt;/code&gt;.  It just isn't as transparent as it used to be. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Python 3.5.3 (default, Jan 19 2017, 14:11:04)&#xA;[GCC 6.3.0 20170118] on linux&#xA;Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.&#xA;&amp;gt;&amp;gt;&amp;gt; z = zip([1, 2, 3], [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;])&#xA;&amp;gt;&amp;gt;&amp;gt; repr(z)&#xA;'&amp;lt;zip object at 0x7f197ce6f688&amp;gt;'&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You shy away from &quot;turning it into something else,&quot; but really?  You only have to type eight more keystrokes in the repl:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; list(z)&#xA;[(1, 'x'), (2, 'y'), (3, 'z')]&#xA;&amp;gt;&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And anyway, that's how it works.  You &lt;em&gt;have&lt;/em&gt; to turn it into something else.  Python3 is not just a bunch of new features added to Python2:  It's a new language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a better language---one where you can do this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; z = zip(range(10000000000), range(10000000000))&#xA;&amp;gt;&amp;gt;&amp;gt; z.__next__()&#xA;(0, 0)&#xA;&amp;gt;&amp;gt;&amp;gt; z.__next__()&#xA;(1, 1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2018-02-16T21:09:26.083" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4344" PostTypeId="2" ParentId="4334" CreationDate="2018-02-17T21:38:30.640" Score="1" Body="&lt;p&gt;Many compilers will promote floats to doubles, do the calculation, and cast back.  I see little or no reason to use floats unless one is dealing with huge matrices of floating-point numbers.  I encourage my students to use doubles for most purposes.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-02-17T21:38:30.640" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4346" PostTypeId="1" AcceptedAnswerId="4349" CreationDate="2018-02-18T16:01:46.387" Score="2" ViewCount="216" Body="&lt;p&gt;In &lt;a href=&quot;https://cseducators.stackexchange.com/q/4324/3524&quot;&gt;a previous question&lt;/a&gt;, I asked about the appropriate notation when teaching Boolean logic to students ages about 11–14.  I selected the notation of engineering and computer science in part because I believe (without any real research) that's what the students are most likely to encounter later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm still not sure how to explain + as OR other than by saying that the same symbol is used for different, but similar, things. Is there a better way to explain that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Aside:&lt;/em&gt; I am going to use center-dot for AND because most of these students have not had an algebra course and implicit multiplication confuses them.  They won't encounter the inner product concept until college.&lt;/p&gt;&#xA;" OwnerUserId="3524" LastEditorUserId="104" LastEditDate="2018-02-19T18:17:35.800" LastActivityDate="2018-02-19T18:17:35.800" Title="Boolean Logic: How to Explain + as OR?" Tags="|lesson-ideas|introductory-lesson|boolean-algebra|" AnswerCount="3" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4347" PostTypeId="2" ParentId="4346" CreationDate="2018-02-18T16:35:05.517" Score="1" Body="&lt;p&gt;If you teach center dot as &lt;em&gt;and&lt;/em&gt;, then + for &lt;em&gt;or&lt;/em&gt; should be pretty natural. Tell them that &lt;em&gt;or&lt;/em&gt; is logical addition and &lt;em&gt;and&lt;/em&gt; is logical multiplication. Likewise, + can be used for set addition (everything in A &quot;plus&quot; everything in B). Likewise &quot;or&quot; means that something is in A &lt;em&gt;or&lt;/em&gt; it is in B (maybe both). So, +, &lt;em&gt;or&lt;/em&gt;, and Union are all alike. Naive Set Theory and Simple Logic. So it isn't just that the same symbol is used, the ideas are actually related. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you teach them the distributive laws for these it will seem even more natural. What will be less natural is that &lt;em&gt;or&lt;/em&gt; and &lt;em&gt;and&lt;/em&gt; distribute over each other, while in arithmetic you only get one distributive law. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;P or (Q and R) has the same truth table as (P or Q) and (P or R). Etc. Similarly for the other law and for set union and intersection. &quot;Arithmetic is the anomaly, not logic.&quot; And if you put it like that, they may be more likely to remember. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Actually it is &lt;em&gt;and&lt;/em&gt; that is a bit harder to finesse with language. &quot;Everything in A &lt;em&gt;and&lt;/em&gt; everything in B&quot; (Union, &lt;em&gt;or&lt;/em&gt;)is easy to confuse initially with &quot;It is in A &lt;em&gt;and&lt;/em&gt; it is in B.&quot; (Intersection, &lt;em&gt;and&lt;/em&gt;) so watch out for that. The first sentence is, of course, the same as &quot;It is in A &lt;em&gt;or&lt;/em&gt; it is in B.&quot; Focus on whether the statement talks about an individual thing, &quot;It...&quot; or the set/concept as a whole &quot;Everything...&quot;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-02-18T16:35:05.517" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4348" PostTypeId="2" ParentId="4346" CreationDate="2018-02-19T00:54:22.130" Score="0" Body="&lt;p&gt;Algebraic data types use a notion of counting inhabitants in a correspondence between addition with OR, multiplication with AND (and exponentiation with implication).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is that if something is an x OR y, then it has x + y possibilities &amp;#8212; all the possibilities of x added to all the possibilities of y.  If there are 3 possible x's and 4 possible y's then there are 3+4=7 possible  inhabitants of x OR y.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And that if something is an x AND y then it has x * y possibilities &amp;#8212; the Cartesian product of all possible x's with all possible y's.  So here if there are 3 possible x's and 4 possible y's then there are 3*4=12 possible inhabitants of the Cartesian cross product representing the notion of x AND y.&lt;/p&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2018-02-19T00:54:22.130" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4349" PostTypeId="2" ParentId="4346" CreationDate="2018-02-19T05:39:53.477" Score="3" Body="&lt;p&gt;Since your students are getting the beginning of Boolean from you, you have the advantage of being able to lay the proper groundwork to work within. To begin with, hopefully, you will be stressing the point that Boolean logic is &lt;em&gt;two-state&lt;/em&gt;. You can use the word &lt;em&gt;binary&lt;/em&gt; if you choose, as long as they are not predisposed to think &lt;em&gt;binary = computer&lt;/em&gt;, since while Boolean logic is handy for computers to deal with, it is not &lt;em&gt;just&lt;/em&gt; for computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To connect the symbols, meanings and math together, make it explicit, and demonstrate. Start with the concept that &lt;code&gt;FALSE&lt;/code&gt; is the same as &lt;em&gt;nothing&lt;/em&gt; and &lt;code&gt;TRUE&lt;/code&gt; is the same as &lt;em&gt;something&lt;/em&gt;. &quot;I have an apple in my hand&quot; is &lt;code&gt;FALSE&lt;/code&gt; if you have no apples in your hand, even if you have an orange, or a pencil. The same statement is &lt;code&gt;TRUE&lt;/code&gt; if you do have an apple in your hand. It is not, however, &lt;em&gt;more&lt;/em&gt; &lt;code&gt;TRUE&lt;/code&gt; if you have two apples, or twenty apples, in your hand, however, it is still &lt;em&gt;just&lt;/em&gt; &lt;code&gt;TRUE&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Zero, as a number, represents &lt;em&gt;nothing&lt;/em&gt; as well - zero apples is &lt;em&gt;no apples&lt;/em&gt;. Therefore, it makes sense (dare I say it is logical?) to use the number &lt;code&gt;0&lt;/code&gt; to represent &lt;code&gt;FALSE&lt;/code&gt;. Using the previous demonstrative phrase, it only takes one apple to make the statement &lt;code&gt;TRUE&lt;/code&gt;, and at least &lt;em&gt;one&lt;/em&gt; is &lt;em&gt;something&lt;/em&gt;. Five is also &lt;em&gt;something&lt;/em&gt;, but that would leave out everything from one to four as &lt;em&gt;maybe&lt;/em&gt;, and Boolean logic has no &lt;code&gt;MAYBE&lt;/code&gt;, so that creates a problem. If &lt;em&gt;some&lt;/em&gt; starts at one then there is not need for a &lt;code&gt;MAYBE&lt;/code&gt;. Using &lt;code&gt;1&lt;/code&gt; for &lt;em&gt;something&lt;/em&gt;, and therefore &lt;code&gt;TRUE&lt;/code&gt;, gives two symbols to use instead of the words &lt;code&gt;TRUE&lt;/code&gt; and &lt;code&gt;FALSE&lt;/code&gt;, which can get quite long to write in a very short while.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step is to introduce the symbols for &lt;code&gt;OR&lt;/code&gt; and &lt;code&gt;AND&lt;/code&gt;. Here I will, marginally, disagree with how and why your are using center dot &lt;code&gt;•&lt;/code&gt; for &lt;code&gt;AND&lt;/code&gt;. I am not opposed to that usage, only the reasoning behind the choice. The students have not had algebra yet, so it seems a safer choice than &lt;code&gt;✖&lt;/code&gt;. You can tell the students you have chosen &lt;code&gt;•&lt;/code&gt; for &lt;code&gt;AND&lt;/code&gt; because it is what they are most likely to encounter later. They should also be told that it can also be written as &lt;code&gt;✖&lt;/code&gt;, and that &lt;em&gt;both&lt;/em&gt; can also be used for multiplication ins algebra. The same way that &lt;code&gt;0&lt;/code&gt; means &lt;code&gt;FALSE&lt;/code&gt; for this class, and will mean &lt;code&gt;zero&lt;/code&gt; in mathematics (and &lt;code&gt;origin&lt;/code&gt; in rectangular coordinates). Likewise using &lt;code&gt;✚&lt;/code&gt; for &lt;code&gt;OR&lt;/code&gt; in your class, while it will mean addition in mathematics. Rather than &lt;em&gt;shelter&lt;/em&gt; them now, only to create confusion later, deal with the reality that we only have so many different symbols we can use, and many times they will have different meanings in different places, and knowing when, and when not, to use &lt;code&gt;✚&lt;/code&gt; as &lt;code&gt;AND&lt;/code&gt; is part of learning about Boolean logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need to toss in one more symbol here as well. Replacing the word &lt;code&gt;is&lt;/code&gt; with the symbol &lt;code&gt;=&lt;/code&gt; (or symbol of your choice) also comes in real handy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since the students have not had algebra the next step &lt;em&gt;might&lt;/em&gt; be difficult. Connecting the Boolean operators with the mathematical functions. Connecting the addition to &lt;code&gt;OR&lt;/code&gt; first, because it is easier to apprehend, you can give the samples &lt;code&gt;FALSE OR FALSE is FALSE&lt;/code&gt;, &lt;code&gt;TRUE OR FALSE is TRUE&lt;/code&gt;, and &lt;code&gt;TRUE OR TRUE is TRUE&lt;/code&gt;. Rewrite them in symbols as &lt;code&gt;0 ✚ 0 = 0&lt;/code&gt;, &lt;code&gt;1 ✚ 0 = 1&lt;/code&gt; and &lt;code&gt;1 ✚ 1 = 1&lt;/code&gt;. The first two will be obvious, make sense, and get no questions. The third will start them thinking and should get some questions about &quot;why not &lt;code&gt;1 ✚ 1 = 2&lt;/code&gt;?&quot; Return to the apples: zero apples made the statement false while &lt;em&gt;any&lt;/em&gt; apples, one, two, or a dozen, made the statement true. So, any number other than zero is true. You can call it part of being a two-state system - either it is zero, or it is other than zero. Therefore, the last of the three samples can be expanded to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;1 ✚ 1 = 2&#xA;        2 ≝ some (it isn't &quot;none&quot;, our only other choice in Boolean algebra)&#xA;1 ✚ 1 = some&#xA;        some ≝ TRUE (the apple demonstration)&#xA;1 ✚ 1 = TRUE&#xA;        TRUE ≝ 1 (our definition of the symbols to use in Boolean algebra)&#xA;1 ✚ 1 = 1 (Final answer)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Doing the same thing with multiplication for &lt;code&gt;AND&lt;/code&gt; is easier, if they understand that &lt;em&gt;anything&lt;/em&gt; multiplied by zero &lt;em&gt;is&lt;/em&gt; zero. If they do not have that concept mastered, then it can become more difficult. Finding a demonstration for that can be dicey, but it is possible. One option could be to use unit pricing. Say it costs 8 dollars (or your local currency) for a pizza. if you get one pizza, that's &lt;code&gt;8 ✖ 1 = 8&lt;/code&gt;. If you get four pizzas, that's &lt;code&gt;8 ✖ 4 = 32&lt;/code&gt;. Now, if you get no pizzas, that's the same as zero pizzas, so &lt;code&gt;8 ✖ 0 = ?&lt;/code&gt; The answer, of course, is nothing. What if the price of pizza goes up to 12 dollars, how much for no pizzas? &lt;code&gt;12 ✖ 0 = 0&lt;/code&gt;; still. No matter how much pizza costs, the total price for zero pizzas is zero dollars. Anything else could be used instead, such as speed and time for distance, or wage rate and hours for pay checks, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the multiplication by zero concept under control, it's time to connect &lt;code&gt;AND&lt;/code&gt; with multiplication. Using the same three setups from above gets three samples of the conversion. &lt;code&gt;FALSE AND FALSE is FALSE&lt;/code&gt;, &lt;code&gt;TRUE AND FALSE is FALSE&lt;/code&gt;. Converting to symbols gives us &lt;code&gt;0 ✖ 0 = 0&lt;/code&gt;, &lt;code&gt;1 ✖ 0 = 0&lt;/code&gt;, and &lt;code&gt;1 ✖ 1 = 1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can expand that into the distributive property, if you wish. [Again, the rule of only two values comes into play with the &lt;code&gt;OR&lt;/code&gt; operator.]&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;TRUE  AND (FALSE OR FALSE) ⇒ (TRUE  AND FALSE) OR (TRUE  AND FALSE) ⇒ FALSE OR FALSE  = FALSE&#xA; 1     ✖  ( 0    ✚    0  ) ⇒ (  1    ✖   0   ) ✚  (  1    ✖   0   ) ⇒   0    ✚   0    =  0&#xA;TRUE  AND (TRUE  OR FALSE) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND FALSE) ⇒ TRUE  OR FALSE  = TRUE&#xA; 1     ✖  ( 1    ✚    0  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   0   ) ⇒   1    ✚   0    =  1&#xA;TRUE  AND (TRUE  OR TRUE ) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE&#xA; 1     ✖  ( 1    ✚    1  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1&#xA;FALSE AND (FALSE OR FALSE) ⇒ (FALSE AND FALSE) OR (FALSE AND FALSE) ⇒ FALSE OR FALSE  = FALSE&#xA; 0     ✖  ( 0    ✚    0  ) ⇒ (  0    ✖   0   ) ✚  (  0    ✖   0   ) ⇒   0    ✚   0    =  0&#xA;FALSE AND (TRUE  OR FALSE) ⇒ (FALSE AND TRUE ) OR (FALSE AND FALSE) ⇒ TRUE  OR FALSE  = TRUE&#xA; 0     ✖  ( 1    ✚    0  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   0   ) ⇒   1    ✚   0    =  1&#xA;FALSE AND (TRUE  OR TRUE ) ⇒ (FALSE AND TRUE ) OR (FALSE AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE&#xA; 0     ✖  ( 1    ✚    1  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1&#xA;&#xA;TRUE  OR (FALSE AND FALSE) ⇒ (TRUE  OR FALSE) AND (TRUE  OR FALSE ) ⇒ FALSE AND TRUE  = FALSE&#xA; 1    ✚  (  0    ✖    0  ) ⇒ (  1   ✚    0  )  ✖  (  1   ✚    0   ) ⇒   0    ✖   1    =  0&#xA;TRUE  OR (TRUE  AND FALSE) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR FALSE ) ⇒ TRUE  AND TRUE  = TRUE &#xA; 1    ✚  (  1    ✖    0  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    0   ) ⇒   1    ✖   1    =  1&#xA;TRUE  OR (TRUE  AND TRUE ) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE &#xA; 1    ✚  (  1    ✖    1  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1&#xA;FALSE OR (FALSE AND FALSE) ⇒ (FALSE OR FALSE) AND (FALSE OR FALSE ) ⇒ FALSE AND FALSE = FALSE&#xA; 0    ✚  (  0    ✖    0  ) ⇒ (  0   ✚    0  )  ✖  (  0   ✚    0   ) ⇒   0    ✖   0    =  0&#xA;FALSE OR (TRUE  AND FALSE) ⇒ (FALSE OR TRUE ) AND (FALSE OR FALSE ) ⇒ TRUE  AND FALSE = FALSE&#xA; 0    ✚  (  1    ✖    0  ) ⇒ (  0   ✚    1  )  ✖  (  0   ✚    0   ) ⇒   1    ✖   0    =  0&#xA;FALSE OR (TRUE  AND TRUE ) ⇒ (FALSE OR TRUE ) AND (FALSE OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE &#xA; 0    ✚  (  1    ✖    1  ) ⇒ (  0   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-02-19T05:39:53.477" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4350" PostTypeId="2" ParentId="4334" CreationDate="2018-02-19T20:49:16.190" Score="1" Body="&lt;p&gt;Simple demonstration of &quot;precision&quot; using handheld calculators. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get a pair of calculators. One cheap model that has a limited number of digits in its display. Models can be found built in to clipboards and other &quot;office&quot; things. One decent model, not necessarily a &lt;em&gt;good&lt;/em&gt; model, that has double the digits of the other calculator. If it has exactly double the display size of the first, so much the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;One point to be aware of is that many calculators, even the cheap disposable ones, will have at least one significant digit beyond the display to help hide/correct rounding errors.&lt;/em&gt; The demonstration will have to be tested on the specific models you use before class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Develop some short, and simple, formulas that will develop rounding errors quickly. Thirds, and harmonics thereof, usually are corrected by the hidden digit(s), but higher factors tend to do better. It can be helpful to also avoid returns that go into scientific notation value range - six or seven digits left or right of the decimal place is probably the best range to stick with. Something involving 3 or 4 digit primes as numerators and denominators should do the trick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having the two calculators in hand, and your pre-tested formulas, have the students work out by hand, or follow you as you do, the formulas, so that they will know what the &lt;em&gt;real&lt;/em&gt; answers are. Run the same formulas on the cheap calculator, showing where it starts to go wrong, and how fast it gets worse. Run the same formulas on the better calculator, showing how much farther into the formulas it gets before it starts to drift, and how much, less, it gets it wrong. If the demonstration has one formula that actually finishes correctly on the better calculator, but not the cheap one, so much the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having the other formulas &lt;em&gt;not&lt;/em&gt; come out completely correct, even on the better calculator, leaves room for you to explain why/how rounding errors in float/double can affect programs. Adding in a formula or two that can then be run on the computer (language of choice) that shows the error delta can help drive the point home. If it's also one where they might be tempted to opt for float that is even better.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-02-19T20:49:16.190" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4351" PostTypeId="2" ParentId="4319" CreationDate="2018-02-20T15:58:10.557" Score="4" Body="&lt;p&gt;&lt;strong&gt;I'm not a teacher&lt;/strong&gt;, but based on my experience as a student, I would suggest that you try to show them what they can make out of it or what it does in actual everyday life. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Me and most of my classmates were always complaining among ourselves, saying things like:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;But why do we have to learn it. It's useless and we will forget it by the next week.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We were right, by the way. Not all of the students will major in your class. There will always be a good amount of students who don't care about the class. They just want to pass it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This being said, presenting application of those subjects that impacts their life directly can be a huge motivation for a lot of students. At least that is what I and my classmates felt like. I don't think much changed, I mean I graduated from college 2 years ago. &lt;/p&gt;&#xA;" OwnerUserId="4323" LastEditorUserId="58" LastEditDate="2018-02-21T06:41:05.663" LastActivityDate="2018-02-21T06:41:05.663" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4352" PostTypeId="2" ParentId="4249" CreationDate="2018-02-21T00:47:44.430" Score="0" Body="&lt;p&gt;Have you visited &lt;a href=&quot;https://www.khanacademy.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;khan academy&lt;/a&gt; website. I was just like you. My math skills were very poor. This website helped me to raise it to same level of my classmates at college. Its totally free forever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a link for &lt;a href=&quot;https://www.youtube.com/playlist?list=PL-BD05SCClbag8KTPzaPzzggJ96aBsVkT&quot; rel=&quot;nofollow noreferrer&quot;&gt;Number Theory&lt;/a&gt; I could not find the link to the khanacademy website, Its a link of their youtube playlist.&lt;/p&gt;&#xA;" OwnerUserId="4323" LastEditorUserId="4323" LastEditDate="2018-02-21T12:59:15.877" LastActivityDate="2018-02-21T12:59:15.877" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4353" PostTypeId="1" CreationDate="2018-02-21T16:20:50.273" Score="4" ViewCount="535" Body="&lt;p&gt;Is it problematic to teach students to use an empty &lt;code&gt;while&lt;/code&gt; loop to create an &lt;code&gt;until&lt;/code&gt; loop? If so, what learning progressions avoid the problem? The question is an empirical one, but reasoned hypotheses and evidence would both be welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Background and Context&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several thousand US middle schools and several thousand US high schools have VEX robotics equipment and RobotC licenses as contractual vestiges of Project Lead The Way (PLTW) engineering programs for middle and high schools. RobotC is a proprietary language from an institute associated with Carnegie Mellon University. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;RobotC does not have an &lt;code&gt;until (condition) do {}&lt;/code&gt; structure. &#xA;&lt;a href=&quot;http://www.robotc.net/forums/viewtopic.php?f=55&amp;amp;t=3059&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.robotc.net/forums/viewtopic.php?f=55&amp;amp;t=3059&lt;/a&gt; . The PLTW curriculum uses a &quot;Natural Language&quot; module of RobotC that includes wait-until functions like &lt;code&gt;waitUntilDistanceSensorLessThan(200)&lt;/code&gt;, but these cause the robot to be incapable of responding to input during the wait-until statement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the middle school where I am teaching, my predecessor assembled the VEX kits into  &quot;squareBots,&quot; a design suggested by VEX and RobotC. The robot is equipped with two motors driving left and right sides of an eight-inch square chassis, equipped with a set of sensors. The robotics equipment engages kids, but the RobotC language has inherent problems pedagogically; this question is about one such problem in particular because I think the question is more broadly applicable than just RobotC.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To implement a wait-until algorithm capable of executing other code while waiting, I've tried teaching the idea to use&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (waiting-condition) {&#xA;  //empty loop&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I have wondered if more students stumble with later more complex programs when I introduce the empty loop as the students' first experience of &lt;code&gt;while&lt;/code&gt; statements. I intend to set up an experiment to verify this anecdotal observation and am fishing for ideas about the two treatments to compare. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;One example of a learning progression that seems to do better&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I think students do better with later, more complex programs if, before using the empty &lt;code&gt;while&lt;/code&gt; as a wait-until, they modify an infinite while loop such as &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sensorValue[LED] = 0; &#xA;//VEX uses LEDs in sensor ports and configures &amp;amp; assigns them as an output&#xA;while (true) {&#xA;    if (sensorValue[alertButton]) {&#xA;        sensorValue[LED] = 1; &#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2018-02-22T02:45:20.090" LastActivityDate="2018-02-22T21:49:07.153" Title="How to avoid misconceptions about while loop when using null loop" Tags="|algorithms|robotics|pltw|" AnswerCount="4" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="4354" PostTypeId="5" CreationDate="2018-02-21T22:30:33.277" Score="0" Body="" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-21T22:30:33.277" LastActivityDate="2018-02-21T22:30:33.277" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4355" PostTypeId="4" CreationDate="2018-02-21T22:30:33.277" Score="0" Body="For questions regarding Project Lead The Way" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-21T22:30:33.277" LastActivityDate="2018-02-21T22:30:33.277" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4356" PostTypeId="2" ParentId="4353" CreationDate="2018-02-22T04:26:03.507" Score="1" Body="&lt;p&gt;What you are looking for is &quot;old style&quot; macintosh like event driven programming. It's still there under the covers in Windows, but the high level libraries tend to hide the implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your main event loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;quit = false;&#xA;while (!quit) {&#xA;    event = getNextEvent();&#xA;    dispatchEvent (event);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An event is a data structure that contains what, where, and when, plus supporting data. For example keystroke from USB keyboard at 16:01:00.000, or packet received from network at ... .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;getNextEvent () simply pulls the next available event off of a queue.  In the original macintosh I believe they used a circular queue implemented on an array of pointers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;getNextEvent may actually call polling routines, or the event queue may be populated by asynchronously.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;dispatchEvent is a wrapper around a big &quot;switch&quot; statement. A typical form would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;switch (event.source)&#xA;{&#xA;case KEYBOARD: &#xA;    dispatchKeys(event);&#xA;    break;&#xA;case MOUSE:&#xA;    dispatchMouse(event);&#xA;    break;&#xA;case ....&#xA;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-02-22T04:26:03.507" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4357" PostTypeId="2" ParentId="4353" CreationDate="2018-02-22T08:48:52.810" Score="5" Body="&lt;p&gt;To add some context from the &lt;a href=&quot;https://chat.stackexchange.com/rooms/59174/conversation/about-cseducators-question-4353&quot;&gt;chat room conversation&lt;/a&gt;: This is part of &lt;a href=&quot;https://chat.stackexchange.com/transcript/message/42998617#42998617&quot;&gt;a larger course&lt;/a&gt; that introduces &lt;a href=&quot;https://chat.stackexchange.com/transcript/message/42998616#42998616&quot;&gt;technology in an applied fashion&lt;/a&gt;. The segment with the &lt;a href=&quot;https://chat.stackexchange.com/transcript/message/42998511#42998511&quot;&gt;robot is 10 days and the students have not necessarily programmed elsewhere&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Empty &lt;code&gt;while&lt;/code&gt; loops&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I would recommend against beginning with &lt;em&gt;any&lt;/em&gt; empty loops for your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the looping constructs are best understood when presented in manner that fulfills the purpose they were created for. An empty loop, using any of the available constructs, is using the loop for a purpose &lt;em&gt;other than&lt;/em&gt; what it was designed for. If the loop is being placed so that you can &lt;em&gt;add&lt;/em&gt; functionality later, at least replace the comment so that it is clear &lt;em&gt;something&lt;/em&gt; is planned for inside the loop later. If you are using the PLTW &quot;Natural Language&quot; module, and start with the function&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;waitUntilDistanceSensorLessThan(200)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;you can expand the lesson by replaceing that with the loop:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (sensorValue[distanceSensor] &amp;gt;= 200) {&#xA;  // Things to do while the robot moves closer&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That way you are not presenting an &quot;empty&quot; loop, but one that is planned for a purpose, and that purpose just happens to be &quot;to be determined.&quot; Don't leave it that way either, but fill it with something real before executing the program. The comment line is showing the development process of changing the first version into a useful version. The next step is to then &lt;em&gt;put&lt;/em&gt; something there, even if it just flashes the LED as the robot advances to the target.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;code&gt;while&lt;/code&gt; vs &lt;code&gt;until&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Some programming languages have an &lt;code&gt;until&lt;/code&gt; control statement, others do not. Many of those which have both a &lt;code&gt;while&lt;/code&gt; and an &lt;code&gt;until&lt;/code&gt; separate their usage by having the &lt;code&gt;while&lt;/code&gt; test the condition &lt;em&gt;before&lt;/em&gt; the loop executes, and the &lt;code&gt;until&lt;/code&gt; tests its condition &lt;em&gt;after&lt;/em&gt; the loop executes. In hypothetical syntax they are commonly like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;set(testCondition);&#xA;while (testCondition == TRUE) {&#xA;    doThisFunction();&#xA;    doSomeOtherFunction();&#xA;    update(testCondition);&#xA;}&#xA;&#xA;do {&#xA;    doThisFunction();&#xA;    doSomeOtherFunction();&#xA;    update(testCondition);&#xA;} until (testCondition == TRUE)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Syntactically, the &lt;code&gt;until&lt;/code&gt; loop is guaranteed to execute &lt;em&gt;at least once&lt;/em&gt; and the &lt;code&gt;while&lt;/code&gt; loop may not execute ever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many languages which do not have an &lt;code&gt;until&lt;/code&gt; control statement still provide for testing before or after execution of the loop. In the case or RobotC, the language of this question, the syntax is like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while(SensorValue(sonarSensor) &amp;gt; 20)  // while the Sonar Sensor reads data greater than '20':&#xA;{&#xA;    motor[rightMotor] = 50;               // run 'rightMotor' at power level 50&#xA;    motor[leftMotor]  = 50;               // run 'leftMotor' at power level 50&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;do&#xA;{&#xA;    motor[rightMotor] = 50;  // run 'rightMotor' at power level 50&#xA;    motor[leftMotor]  = 50;  // run 'leftMotor' at power level 50&#xA;    bursts = bursts + 1;     // increment 'bursts' by 1&#xA;    wait1Msec(3000);         // wait for 3000 milliseconds before continuing&#xA;}while(bursts &amp;lt; 3)         // while 'bursts' is less than 3:&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Source &lt;a href=&quot;http://www.robotc.net/wikiarchive/Control_Structures&quot; rel=&quot;noreferrer&quot;&gt;RobotC Wiki: Control Structures&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That still leaves the &lt;code&gt;testCondition&lt;/code&gt; as an issue, however. Based on the English usage, from which most programming languages derive their meaning, &quot;while&quot; and &quot;until&quot; are opposites. &quot;While&quot; implies that something is &lt;em&gt;not&lt;/em&gt; done unless the test is true. &quot;Until&quot; implies that something &lt;em&gt;is&lt;/em&gt; done unless the test is true. The &lt;code&gt;while&lt;/code&gt; loop exits when the test condition is &lt;strong&gt;false&lt;/strong&gt; (fails), the &lt;code&gt;until&lt;/code&gt; loop exits when the test condition is &lt;strong&gt;true&lt;/strong&gt; (passes). Using that, for a language which lacks the &lt;code&gt;until&lt;/code&gt; control statement, the same functionality can be created by using a negative test. Thus &lt;code&gt;until (done)&lt;/code&gt; becomes &lt;code&gt;while (notDone)&lt;/code&gt;, or if the language uses this syntax, &lt;code&gt;while ( ! done)&lt;/code&gt;. Thus &lt;code&gt;until&lt;/code&gt;'s usage can be created when needed. In the case of RobotC it's even possible to create the common version of a tail-test by using &lt;code&gt;do {} while (! done)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Perl has taken the &lt;code&gt;while&lt;/code&gt; vs &lt;code&gt;until&lt;/code&gt; concept and extended it into the realm of the &lt;code&gt;if&lt;/code&gt; statement by creating an &lt;code&gt;unless&lt;/code&gt; test:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;unless (testCondition) {&#xA;    say &quot;testCondition is FALSE&quot;;&#xA;}&#xA;else {&#xA;    say &quot;testCondition is TRUE&quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Limited prior programming exposure&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;All the above, absent the motor and sensor parts, really applies to any programming related course. It can even help prepare students for what they will encounter &quot;in the wild&quot; with other languages not covered by the course. The specifics of this question, however, with its short duration and unknown, but probably limited, prior programming by the students, creates extra concerns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As made clear in one &lt;a href=&quot;https://chat.stackexchange.com/transcript/message/42998470#42998470&quot;&gt;comment in chat&lt;/a&gt;, the students may not even understand the concept of &lt;em&gt;statement block&lt;/em&gt; and there is precious little time to explain all the details of programming, let along all the possible variations. With the objectives of &lt;em&gt;awareness/excitement about career paths&lt;/em&gt; in mind, planning ahead and having some of the desired variations pre-built might be helpful. For example, the first two code segments could be saved, and quickly &quot;built&quot; with the students. A third variation, which might be attractive to the students, is to have the LED flash faster as the distance closes with the target. Using guessed numbers for examples here, with numbers found to be useful in the lab replacing mine, the original &lt;code&gt;waitUntilDistance....&lt;/code&gt; line could be replaced with something like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int totalDistance = 500;&#xA;while (sensorValue[distanceSensor] &amp;gt; (totalDistance/25)) {&#xA;  sensorValue[LED] = 1;&#xA;  delay(300 * sensorValue[distanceSensor] / totalDistance);&#xA;  sensorValue[LED] = 0;&#xA;  delay(200 * sensorValue[distanceSensor] / totalDistance);&#xA;}&#xA;sensorValue[LED] = 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will give a duty-cycle of 60% and an initial frequency of 2 flashes per second, and a final frequency of 50Hz. Another chance to reinforce some math and science, increase the engagement with the robot, and &lt;em&gt;not&lt;/em&gt; introduce new programming concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In consideration of the limited time and limited programming exposure before this segment, I think that introducing the empty loop&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (waiting-condition) {&#xA;  //empty loop&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;will&lt;/em&gt; cause more students to stumble, and not necessarily later. The &lt;em&gt;emptiness&lt;/em&gt; might make apprehending the &lt;em&gt;statement block&lt;/em&gt; concept more difficult than it already is. I'm also not so sure you should even divert into the infinite loop of &lt;code&gt;while (true) {}&lt;/code&gt; at all. If you do use the LED-alertButton combination you presented in the question, modify it to respond as a toggle rather than a one-shot that turns on and then appears to ignore all future button presses. The program might loop forever, but it will look to the students like it turns on the LED and then stops responding.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-02-22T08:48:52.810" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4358" PostTypeId="2" ParentId="4353" CreationDate="2018-02-22T15:51:22.860" Score="1" Body="&lt;p&gt;On a different note, it is much more effective to use simulated robot environments when first &lt;em&gt;introducing&lt;/em&gt; programming to students.&#xA;The addition of the H/W elements in physical robots (along with more complicated software environments) make the combination more difficult. &#xA;This would only be exacerbated with a short time line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even replicate the physical nature of the robots in code before they work directly with them - giving them a sort of preview of the issues they will encounter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively there are more user friendly robot development kits available today that you can look into.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastActivityDate="2018-02-22T15:51:22.860" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4359" PostTypeId="2" ParentId="4353" CreationDate="2018-02-22T16:31:05.210" Score="2" Body="&lt;p&gt;This answer will be a bit different, I hope, and more general. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming physical robots is inherently different from simple procedural test and command driven programming. It is essentially event driven with events happening outside the program but needing to be handled by it. Some of this sort of thing occurs in, say, Java when you write GUI code that must respond to external events asynchronously. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the first bit of advice, given this situation, is to teach them robot programming driven by asynchronous events. The RobotC language, while a small subset of C structurally, has an extensive library to handle such events. So, teach &lt;em&gt;that&lt;/em&gt;, rather than trying to teach something else that sort of works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice in general, is that if you have chosen, or been given, a language to teach, then &lt;em&gt;teach that language&lt;/em&gt;, not some other thing. For example, don't try to teach Python thinking of it as just Java without braces. It is a different thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, if you don't like the language you have then one alternative, assuming you have a bit of time and freedom, is to create a different language that is more to your liking. You can't do this in the next few days, as it takes a while to build the infrastructure, but it isn't impossible. You can define a language and write a compiler for it. The target (output) language could be RobotC so that you get automatic access to the libraries provided. High level to high level compilation is a bit easier, in fact, than high to low level language compilation as you can take advantage of the (higher level) features of the target language in your &quot;code generator&quot;. It adds a step to program creation (compiling the resulting RobotC code) but that can be automated. If your language is well defined then you can use standard compiler building tools to make the job easy. Scanners and Parsers are standardized building blocks. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, (the final however) if you can't make that work for you and you have limited time, then &lt;em&gt;first&lt;/em&gt; focus on the language as given, respecting the intent of the creators of the language and teaching students how to use it well. Make sure that they understand the concepts of that language and the environment for which it is intended. But save a day or two at the end for a &quot;beyond the horizon&quot; look at programming. In that final wrap up session, you can talk about the limitations that were imposed by the language you've been using and some ideas (for their future study) that can be used to remove those limitations. So you &lt;em&gt;close&lt;/em&gt; by opening another door for them. And this has much less chance of confusing them or burdening them with awkward constructs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students won't be happy with you if they later learn that you were using a given language badly, even if you have good intentions. You can't teach them everything they will need to know in just a few days, but you can do a few things well. KISS = Keep it simple, students. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;An easy to use compiler builder suite is &lt;a href=&quot;http://www.ssw.uni-linz.ac.at/Coco/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CoCo/R&lt;/a&gt;. You define a language as an Attribute Grammar (ATG) and the tool creates a scanner and parser from the ATG. You need to provide a semantic analyzer and code generator, but you can annotate the ATG to simplify this. The input language defined in the ATG needs to be (largely) LL(1), but a learning language should have that characteristic in any case. The tool will give you an analysis of your language as well. I've made extensive use of CoCo/R both in teaching and in building such &quot;bridge&quot; languages. And building your first compiler is a joy beyond joy. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-22T21:49:07.153" LastActivityDate="2018-02-22T21:49:07.153" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4360" PostTypeId="2" ParentId="4334" CreationDate="2018-02-23T00:01:16.263" Score="5" Body="&lt;p&gt;Tell the students they have seven decimal digits of precision in a float, and that the decimal point is placed &quot;somewhere&quot; within those seven digits, depending on the magnitude of the number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask them to add 0.01 to 9,999,999 and express the result to seven digits.  Ask what the answer would be if they performed the addition a thousand times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now ask them to do the same calculation using 15 digits of precision.&lt;/p&gt;&#xA;" OwnerUserId="3524" LastActivityDate="2018-02-23T00:01:16.263" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4361" PostTypeId="2" ParentId="4143" CreationDate="2018-02-23T03:45:57.913" Score="2" Body="&lt;p&gt;I think what makes Factorial and Fibonacci popular as teaching examples is that &lt;strong&gt;they have no input data&lt;/strong&gt;.  This means student implementations can start from scratch, instead of being given some boiler-plate data declarations.  (Or requiring the students to write code to create a binary tree or something.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Ackermann_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Ackermann–Péter function&lt;/a&gt; &lt;code&gt;A(m,n)&lt;/code&gt; has 2 integer inputs and one integer output so it's nice and simple like Factorial (no pointers or references to any data structures).  But its natural definition is recursive, and iterative implementation requires a stack of some sort, so a recursive implementation is easier than iterative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not ideal (for testability over a range of inputs) that it grows so quickly, and you may need to introduce the concept of integer overflow (with wraparound, or undefined behaviour in languages like C for signed &lt;code&gt;int&lt;/code&gt;).  On the other hand, students will probably think it's cool to have a function which can produce such large outputs from small inputs.  &lt;code&gt;A(4,2)&lt;/code&gt; has 19,729 decimal digits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with &lt;code&gt;m=[0..3]&lt;/code&gt;, the &lt;a href=&quot;http://www.wolframalpha.com/input/?i=ackermann(3,n)%20for%20n%3D0..10&quot; rel=&quot;nofollow noreferrer&quot;&gt;result fits in a 32-bit integer for a wide range of &lt;code&gt;n&lt;/code&gt;&lt;/a&gt;, so it's testable.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;IMO recursive Fibonacci is a really horrible example.  It has O(Fib(n)) complexity instead of O(n) time for an &lt;code&gt;a+=b; b+=a;&lt;/code&gt; loop.  Recursive Factorial at least has the same complexity class as iterative, but it doesn't require keeping any state.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an assembly-language assignment (especially when args are passed in registers), Factorial also fails to fully test recursion because no registers need to be saved/restored (except the return address for RISC architectures like MIPS that use a link register instead of x86-style &lt;code&gt;call&lt;/code&gt;/&lt;code&gt;ret&lt;/code&gt; pushing/popping a return address).  There's not much difference between an iterative loop and the body of a recursive implementation.  You could get implementations that recurse down to the bottom and then just multiply by an increasing counter while returning back up the call chain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recursive Fibonacci avoids this problem: needing to make two separate calls from the same function means it can't degenerate into a loop.  But we'd like to reject Fib because it makes recursion look like a stupid way to make programming harder, especially in assembly language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Do people really give recursive Fibonacci assignments in assembly language?  Yes, they do, and Stack Overflow has the questions from their students to prove it.  It is one of the simplest doubly-recursive functions (significantly simpler to implement in asm than Ackermann), but it's maybe so simple that it's not as obvious which state is the &quot;important&quot; state that needs to be saved/restored across child calls.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/58127916/double-recursion-in-assembly-works-until-secondary-recursion-becomes-larger-than&quot;&gt;A recent Stack Overflow question on MIPS assembly&lt;/a&gt; (from a student assigned this homework) appears to have found some useful middle ground here with a function that has similar doubly-recursive structure to Fibonacci but is less trivial, making an iterative implementation less obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And also simply not being a well-known function means that there aren't implementations of it all over the web in many languages, reducing the temptation to copy/paste.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;if n&amp;gt;5&lt;/code&gt; : &lt;code&gt;f(n) = n*f(n-1) - f(n-3) + n-23&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;else &lt;code&gt;n&amp;lt;=5&lt;/code&gt; basecase  &lt;code&gt;f(n) = 15 - 2n&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;An iterative implementation is still easily possible and obviously more efficient, especially for large &lt;code&gt;n&lt;/code&gt; without memoization.  But this has a couple useful features that make it better than Fib(n):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The base case includes more &lt;code&gt;n&lt;/code&gt; values, and is not totally trivial.  Initializing vars for an iterative implementation would take some care.&lt;/li&gt;&#xA;&lt;li&gt;Using &lt;code&gt;f(n-3)&lt;/code&gt; and skipping &lt;code&gt;f(n-2)&lt;/code&gt; means iterative would have to keep more temporaries, but doesn't add complexity to a recursive case.&lt;/li&gt;&#xA;&lt;li&gt;Using the original &lt;code&gt;n&lt;/code&gt; &lt;em&gt;after&lt;/em&gt; both of the recursive calls (to multiply the return value, or add to the total) motivates properly keeping it around.  (vs. maybe writing an asm function that preserves its input register, and just decrementing that again to create an input for the next call.  That would work but is totally non-standard for normal C calling conventions.)&lt;/li&gt;&#xA;&lt;li&gt;Clever students will notice that &lt;code&gt;n&lt;/code&gt; can be destroyed by the 2nd recursive call, doing &lt;code&gt;n - 23 + n*f(n-1)&lt;/code&gt; early because integer &lt;code&gt;+&lt;/code&gt; is associative.  Otherwise they'll have to save both the first return value &lt;em&gt;and&lt;/em&gt; the original &lt;code&gt;n&lt;/code&gt; if they evaluate the expression in the order written.&lt;/li&gt;&#xA;&lt;li&gt;It's not Fibonacci so it's not recognizable as a well-known thing that can be looked up or that some students will already know about.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/4143/what-are-good-examples-that-actually-motivate-the-study-of-recursion/4151#4151&quot;&gt;Tree traversal&lt;/a&gt;&lt;/strong&gt; is one of the best example use-cases for recursion, because you need to remember where you've been at each step of the problem, so any solution needs a stack data structure.  Using recursion lets you use the call-stack as your stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you need a tree to traverse, so it's not as &quot;simple&quot; as Factorial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it's easy to see that it's a useful thing to do.&lt;/p&gt;&#xA;" OwnerUserId="1654" LastEditorUserId="1654" LastEditDate="2019-09-27T06:48:48.963" LastActivityDate="2019-09-27T06:48:48.963" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4363" PostTypeId="2" ParentId="4304" CreationDate="2018-02-23T09:09:09.410" Score="2" Body="&lt;p&gt;At some point in their lives, more so now than 40 years ago, these students will need to make decisions based on interactions with computers. When they do this, they will make better decisions if they understand what is going on inside a computer. They may also encounter situations where a problem they have could be easily solved by involving (an app, some automation, a bigger dataset, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example scenarios to discuss particularly in a 'imagine 20 years more innovation':&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Self driving cars (even now are argued to be safer than humans)&lt;/li&gt;&#xA;&lt;li&gt;AI diagnosis (doctors can't identify the 1 in 1e6 rare symptoms)&lt;/li&gt;&#xA;&lt;li&gt;Automated (first pass) scanning of diagnostic scans&lt;/li&gt;&#xA;&lt;li&gt;Real-world timetable planning (app rather than diary)&lt;/li&gt;&#xA;&lt;li&gt;Bus-routes on demand (in rural areas)&lt;/li&gt;&#xA;&lt;li&gt;Warehouse management&lt;/li&gt;&#xA;&lt;li&gt;Monitoring type healthcare applications (if you can describe examples)&lt;/li&gt;&#xA;&lt;li&gt;Things that home automation doesn't do today (and would be valuable)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Several of these scenarios I find hard to discuss with non-technical adults. Computers can be more consistent, access more data, do repetitive work without making mistakes. People struggle to understand some of the statistics and how to interpret risk though. People in a position to identify problems to be solved need to know what a computer can trivially do in order to innovate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The timetable planning example - a language teacher wanted to overlay a simple 2-week pattern (learning vocab/testing) and some other progress, with the ability to slip, insert and skip work. Didn't realise this was already 90% done 'off the shelf' (so didn't look), and didn't recognise how this off-the-shelf solution was a good fit.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2018-02-23T09:09:09.410" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4364" PostTypeId="1" CreationDate="2018-02-23T16:32:41.030" Score="2" ViewCount="622" Body="&lt;p&gt;After a long search a colleague says that the only 'predictor' of computing ability seems to be &lt;strong&gt;Au&lt;/strong&gt;tism, and that only with a low correlation (60%, whatever that means). But in our experience of teaching students with various disabilities, including mild forms of Asperger's, we find that even this is all over the map: One student was an amazing programmer but could not finish assignments because the temptation to always add more was so high, another could not see past tiny details that became fixations. Another could not generalize past results to new slightly different situations. Another could easily do the work, but was bored and uninterested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So it seems that this element &lt;kbd&gt;Au&lt;/kbd&gt; is not the gold that it would seem to be, yet no other elements have turned up to predict success.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My observations over 4 decades have been that many people can learn to do tasks involving computers which amount to &lt;kbd&gt;c&lt;/kbd&gt;onfiguration or customization within a limited domain, but that conceiving of algorithms or new data types is not going to come to them easily. (And if work or school is far too hard, one will not be successful.) In fact, a lot of my early programming career was devoted to converting tasks from programming to customization, just so that we could free up our programmers to do the complex stuff. What causes or indicates this difference in people - some easily learn programming, others not? Is there another element at stake, like &lt;kbd&gt;In&lt;/kbd&gt;telligence? But there is no definition or agreement on that either...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am thinking that 'real' programming ability is a &quot;rare earth&quot;, and not something widely found, yet the modern world seems to require increasing numbers of this material (so many jobs going unfilled, projects failing, etc.) If we cannot dig it up, or transmute it from other material (schooling) or find a substitute, then what can be done? This site itself seems to be faltering from lack of participation, which suggests that &lt;kbd&gt;Te&lt;/kbd&gt;achers are unusual also. Can they and their students be mass-produced?&lt;/p&gt;&#xA;" OwnerUserId="4333" LastEditorUserId="1293" LastEditDate="2018-02-23T19:00:26.720" LastActivityDate="2018-02-23T23:42:22.827" Title="The Fifth Element or What Elements Are Correlated With CS Success and Does It Matter?" Tags="|student-motivation|" AnswerCount="3" CommentCount="6" ClosedDate="2018-02-24T02:49:03.813" ContentLicense="CC BY-SA 3.0" />
  <row Id="4365" PostTypeId="2" ParentId="4364" CreationDate="2018-02-23T19:16:22.947" Score="4" Body="&lt;p&gt;One of my best CS students ever did her undergraduate work in Art. Another was, as a sideline and avocation, a ballet dancer. The best indicator is &lt;kbd&gt;D&lt;/kbd&gt;esire. If a student wants something bad enough they will find a way to be a success at it unless circumstances make it impossible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every student is different, so the question of &lt;em&gt;mass production&lt;/em&gt; probably has a negative answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At its best, teaching is a relationship between two people, a teacher and a learner. We make compromises for economic reasons, but there are negative consequences to all of the compromises. Socrates did it best. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to teach you have to work toward that ideal as much as can be managed. Even the massive classes (CS50) require a couple of hundred staff people, mostly tutors, to manage it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to increase &lt;kbd&gt;D&lt;/kbd&gt; in another you need to make things interesting and you have to give them a creative outlet as they define it themselves. Fear is a poor motivator, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Intelligence is overrated. An IQ of 150 and three dollars buys you a cup of java in most places. You/they/all can learn and can prosper if they see rewards that are worth spending the effort on and dedicating your &lt;kbd&gt;Li&lt;/kbd&gt;fe to. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple of other students who did some of the best work I saw that year  struggled for every idea - over and over - until success. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-02-23T19:16:22.947" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4366" PostTypeId="2" ParentId="4364" CreationDate="2018-02-23T19:50:42.123" Score="6" Body="&lt;p&gt;As I indicated in &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3881/is-there-some-meaningful-percentage-of-students-who-cant-learn-to-program&quot;&gt;my other question&lt;/a&gt;, I have found that there are always a few students who don't seem to &lt;em&gt;get&lt;/em&gt; it.  This leads me to suspect that there may well be some small number of persons who are so disadvantaged that it may be effectively impossible for them to become strong programmers.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;However&lt;/em&gt; here are a few words of cautions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Even if this is true, what of it? The fact that I have not figured out how to teach Johnny how to code does not necessarily mean Johnny is incapable, and I am still obligated to keep trying to find new ways to reach him.  If, in fact, he really is incapable, I will ultimately fail, but I have no way to distinguish between him and Samantha, who is entirely capable, but has yet to have some key piece of information &lt;em&gt;click into place&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The number of people should be quite small.  For me it has run around 5-10% of students.  I work with a &amp;quot;gifted&amp;quot; population, so that number &lt;em&gt;might&lt;/em&gt; be a little smaller than would be found in other populations, but it shouldn't be wildly different.  As you have pointed out, general brightness is a poor indicator.&lt;/p&gt;&#xA;&lt;p&gt;If you're finding that &amp;gt;25% of your students are seriously struggling, then there are additional factors beyond &amp;quot;student ability&amp;quot; that you need to be examining.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-02-23T19:50:42.123" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4367" PostTypeId="2" ParentId="3881" CreationDate="2018-02-23T20:15:33.843" Score="2" Body="&lt;p&gt;Many of the existing questions are excellent, but I'll throw my two cents in:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there some meaningful percentage of students who can't learn to program?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What is programming?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that &lt;strong&gt;programming&lt;/strong&gt; can mean many different things. I remember a discussion on this site where somebody suggested using Excel spreadsheets as an introduction to programming. I would have failed that class, and I would have realized that I just wasn't cut out for programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming with a focus on command line interfaces is a step up from Excel spreadsheets, but it's still alienating and disengaging for many students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;But command line programming is the simplest form of programming!&quot;&lt;/em&gt; Command line programming can seem straightforward to more experienced users, and we can see it as the simplest form of programming. But that's not true for people who haven't worked with a command line in their daily lives. &lt;em&gt;&quot;I use websites and apps every day, and I'd love to learn more about creating that stuff, but if programming is just staring at a command line all day then maybe this isn't for me!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Frame Things Differently&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So although this student had trouble wrapping their brain around command line programming, maybe they'd have better luck with other types of programming:  maybe they'd be able to better reason about robotics, or code that outputs a physical drawing, or more creative coding? Maybe if the output was a webpage instead of in a terminal, they'd have to spend less time remembering how the terminal works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, it's not that students can't learn programming. It's that they have trouble reasoning about a particular type of programming. The answer is not that they can't program, the answer is that they need to be introduced to programming using topics that engage them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Line by Line&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, maybe the student has trouble explaining their thinking to a teacher. &lt;em&gt;&quot;Okay they asked me a question. Oh god. They want to know why the number is initialized outside the loop. How should I know, I didn't write the code! Oh no I'm not saying anything, this is awkward. Maybe if I stay silent they'll give me a hint. Wait what was I supposed to be answering again?&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer to this is to encourage students to &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;break things down into smaller pieces&lt;/a&gt;. Don't ask the student why the variable is created outside the loop. Ask them what the first line of code does. Then ask them what the second line does. Have them work through it line-by-line, and then have them combine that into a bigger picture. This is a very hard thing to teach, and I think many students get stuck trying to understand entire pieces of code instead of just focusing on one line at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;I must not be cut out for programming, because I can't look at 10 lines of code and tell you what they do.&quot;&lt;/em&gt; Neither can I, and I've been programming for my entire adult life. I look at one line at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Gym Class&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was in school, I hated gym class. I hated basketball, and I hated running the mile. I'm sure if you would have asked my gym teachers, they would have told you that I'm part of the certain percentage of students who simply can't learn to be physically active. That lasted pretty far into my adult life. &lt;em&gt;&quot;Maybe I'm just lazy.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the thing is, I love hiking. I love just walking around a city. I love riding my bike, and I love running, as long as I can do it with headphones in and at my own pace. I wish I could go back in time and introduce younger me to this stuff. What would gym class have looked like if it had included these types of activities?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry for going off-topic, but I think about that whenever I hear people say that &quot;some people can't learn programming&quot;. I don't think it's that some people can't learn programming, I think it's that we often have an overly restrictive definition of what programming is, or how we frame programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming doesn't take some magic brain part that only certain people have. Whenever I hear the argument that some people can't program (especially when that argument comes from established successful folks), I cringe pretty hard. It always comes off as discouraging (especially to people from under-represented groups) and gate-keeper-y to me. We can do better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just like every other creative endeavor, learning how to program requires engagement, and breaking things down into smaller pieces, and tons of practice. Maybe it takes a little more of those things than other subjects (probably as a result of most students not seeing programming until high school or college), but I honestly think anybody can learn how to program. It's &quot;just&quot; a matter of finding out which type of programming they're interested in. But that's a whole other question.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-02-23T22:12:48.037" LastActivityDate="2018-02-23T22:12:48.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4368" PostTypeId="2" ParentId="4364" CreationDate="2018-02-23T23:42:22.827" Score="6" Body="&lt;p&gt;I think this long running buzzword-laden alchemy metaphor is getting in the way of the issue, so you'll forgive me if I simply scrap all that and talk frankly.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can they and their students be mass-produced?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Humans are terribly complex creatures. You can't just create one single process that would somehow magically be able to teach all people a skill.&#xA;All you can ever do is to try to find a way that conveys the significant knowledge and concepts to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes there will be techniques that work for multiple people, but given a room full of 30 random people, you will always need to try several different techniques before everyone can have some understanding of a subject, and even then some will comprehend it better than others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not an exact science, and it's not magic either, if anything it's closer to psychology.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If we cannot dig it up, or transmute it from other material&#xA;  (schooling) or find a substitute, then what can be done?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Autism doesn't make you magically good at programming, nor does being simply good at English or Maths, nor does overall intelligence. (Generally being intelligent does help somewhat, programming involves a lot of problem solving.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What really matters (in my eyes at least) are how much a person enjoys programming, how much drive they have to do it, and whether they have the skills to be good at it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Enjoyment:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of programmers are self taught*, i.e. they read books and articles and don't have a teacher directing them. Part of the reason for this is because most programmers enjoy programming and actively choose to do it, much like artists and writers often choose to do art or to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't make someone enjoy programming. Some people simply won't find it enjoyable. If someone doesn't find it enjoyable or get any kind of satisfaction from writing a program, that's fine, maybe programming isn't what they should be doing. You can try to make it a bit more enjoyable for people who aren't as interested, but that's about all you can do. You can try to make a subject more relevant to them (e.g. I had no interest in maths until I needed it for programming) but there's no guarantee.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others will probably refute it, but I dare say that geekiness - being interested in video games, scifi and the like - does help here. That geekiness can be a powerful resource because it makes being able to program seem even cooler than it would otherwise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*  (According to StackOverflow's annual census/questionnaire.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Drive:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the key differences between a good programmer and a bad programmer is what they do when they encounter a difficult problem. The bad programmer will say &quot;I give up. This is stupid. I can't do this.&quot; or they'll just stare blankly into space. The good programmer will try harder, they'll try to tackle the problem from a different angle, they'll ask for someone else's insight and really think things through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching students to relish the challenge and to not give up or run away is difficult. Especially when some students will take longer to solve certain problems. But even if they have to change their way of thinking about the problem or ask for some hints, that's ok. As long as they haven't just given up and avoided the problem, they'll make progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Skills:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming is a mix of many different skills and abilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Abstract thought, problem solving, a bit of mathematical ability, a reasonable degree of linguistic ability and many other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't have to be a master of all these things, but it helps to be particularly good at at least one of them and to be reasonably good at the others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen programmers who are good at solving problems but always write messy code or get syntax wrong becuase their linguistic ability isn't as good. I've seen programmers who can write code and solve problems but are really bad at any kind of mathematical problem. I've seen people who can understand code but always write monoliths because they struggle with thinking in terms of class hierarchies and splitting the problem up into classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of them are capable of getting a job done, all of them are capable of programming, but those areas of weakness are what tips the scale enough to hold them back from being even better. I dare say even the most critically acclaimed programmers have their weaknesses in certain areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with all that said, programming has never been an exact science. There's usually more than one solution to a problem, some solutions are better than others, and some solutions are only subjectively better. There's a lot of debate around what's good programming style and whether style even matters if a program gets the job done, and I doubt that will ever stop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this means in terms of teaching is that it helps to be able to recognise which aspect a student is lacking in so you know how to tackle their insufficiencies. If a student can explain the problem but can't put it into code, that's what must be tackled. If a student can explain a program shown to them or write a program that's described to them but can't come up with a solution when presented with a problem then that's what must be tackled. Et cetera.&lt;/p&gt;&#xA;" OwnerUserId="1538" LastActivityDate="2018-02-23T23:42:22.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4369" PostTypeId="1" CreationDate="2018-02-24T06:07:30.950" Score="5" ViewCount="140" Body="&lt;p&gt;In my APCSP class (using &lt;a href=&quot;https://code.org/educate/applab&quot; rel=&quot;noreferrer&quot;&gt;app lab&lt;/a&gt;, which is javascript based), I noticed that there are many students who struggle with the difference between a string (&lt;code&gt;&quot;foo&quot;&lt;/code&gt;) and a variable (&lt;code&gt;foo&lt;/code&gt;). I've explained that strings are surrounded by quotes while variables are not, but this is still one of the most common mistakes I see. For example, a programming task could be:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a prompt for a persons first and last names, and then print out a greeting (stored in a variable) followed by the name (last name, first name).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and a student will write the following code:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var greeting = &quot;Hello &quot;;&#xA;var first_name = prompt(&quot;What's your first name?&quot;);&#xA;var last_name = prompt(&quot;What's your last name?&quot;);&#xA;&#xA;var reply = greeting+&quot; &quot;+last_name+&quot;, &quot;+first_name;&#xA;console.log(&quot;reply&quot;); // &amp;lt;-- Here's the problem&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I typically see this issue when a student is trying to &lt;em&gt;output&lt;/em&gt; information, either to the console or set a GUI element to have that text content. I also see it occasionally in other contexts, such as conditional statements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to help students better avoid this mistake?&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2018-02-24T13:50:35.773" Title="App Lab/JS confusion between strings and variables" Tags="|secondary-education|ap-cs-principles|syntax|variables|javascript|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4370" PostTypeId="2" ParentId="4369" CreationDate="2018-02-24T08:45:27.297" Score="3" Body="&lt;p&gt;As always with javascript, show the right&amp;amp;wrong:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show them, using the exact piece of code from your example, but add another line:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var greeting = &quot;Hello &quot;;&#xA;var first_name = prompt(&quot;What's your first name?&quot;);&#xA;var last_name = prompt(&quot;What's your last name?&quot;);&#xA;&#xA;var reply = greeting+&quot; &quot;+last_name+&quot;, &quot;+first_name;&#xA;console.log(&quot;reply&quot;);&#xA;console.log(reply);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And run it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then they see that when they &lt;code&gt;log&lt;/code&gt; something with &lt;code&gt;&quot; &quot;&lt;/code&gt;, the output is literally what's inside the quotes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if they have a &lt;code&gt;var&lt;/code&gt;iable (this is important to note that &lt;code&gt;reply&lt;/code&gt; is defined with &lt;code&gt;var&lt;/code&gt;), the output is the contents of the variable. Truth be told, the output is the string representation of the object, but I fear that's too advanced at this point. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further explaining that when they use the word &lt;code&gt;var&lt;/code&gt; (or &lt;code&gt;const&lt;/code&gt; etc.), you create a something that &lt;strong&gt;holds&lt;/strong&gt; information. On the other hand, using quotes &lt;code&gt;&quot;&quot;&lt;/code&gt;, you are simply representing that information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But no matter how well you &lt;em&gt;explain&lt;/em&gt; it, it's still far more effective to &lt;em&gt;show&lt;/em&gt; examples like the one above, and to give the students exercises that will allow them to &lt;strong&gt;experience&lt;/strong&gt; the point you try to teach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, let them try to do that with a &lt;code&gt;Date&lt;/code&gt; object:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an exercise, teach them about &lt;code&gt;Date&lt;/code&gt; in JS:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var d = new Date()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and then explain that &lt;code&gt;d&lt;/code&gt; holds info about the date and time that the line was executed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the students understand the very basics of the date object, ask them to print it. The difference between&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;console.log(d)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;console.log(&quot;d&quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;are very, very big.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-02-24T13:50:35.773" LastActivityDate="2018-02-24T13:50:35.773" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4371" PostTypeId="2" ParentId="4369" CreationDate="2018-02-24T13:47:53.983" Score="3" Body="&lt;p&gt;Don't imagine that this problem is rare or that it is caused because the students don't &quot;get it.&quot; Often they get it all too well. It is common in learning a new thing to base your understanding on what you already know about other things. This is just the sort of error I made myself as a beginning programmer, basing Fortran stuff on what I already knew about math (a lot, as a new PhD in math). The students who make this kind of error may, in fact, be very adept at using analogy to put the new information into a coherent framework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your solution is to first give them a good understanding of &lt;em&gt;symbol&lt;/em&gt;. You can start with math symbols like + etc. A symbol &quot;stands for&quot; something, in this case addition. The symbol isn't itself addition, but &quot;stands for&quot; addition. Language punctuation symbols can be likewise shown as &quot;standing for&quot; something. For example semicolon usually stands for statement termination (or separation, depending on the language). In Python, spaces are actually symbols. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From that you can progress to &lt;em&gt;word symbols&lt;/em&gt;, such as &lt;em&gt;foo&lt;/em&gt;. It is just a symbol, but is spelled out using some alphabet. It &quot;stands for&quot; something; perhaps a function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you can introduce variable names as word symbols that &quot;stand for&quot; values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However literals, such as 5 and &quot;foo&quot; aren't symbols in the sense that they &quot;stand for&quot; something else. They stand for only themselves. So &lt;em&gt;foo&lt;/em&gt; is a word symbol but &quot;foo&quot; is a literal. The former could stand for lots of different things, but the latter only for itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they start to study languages in general, the concept of a word symbol will be important to them in any case, so this early introduction is good in a larger context. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-02-24T13:47:53.983" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4372" PostTypeId="5" CreationDate="2018-02-24T14:42:12.600" Score="0" Body="&lt;p&gt;Examinations (often abbr. exams) or tests are a way of assessing students' understanding of a subject or subjects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually, exams are given by an instructor, who has taught the students the subject upon which they are tested. Examinations have various aspects and can vary in those aspects (e.g. amount of material)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Computer science courses (as well as courses in other fields), exams test students' understanding and knowledge regarding concepts, algorithms, skills, methods etc. that have been taught by the instructor of the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students receive grades for exams, based on how well they answered the questions on the exam. These grades are often considered as a rough estimates of a student's understanding of the material.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-02-24T14:42:12.600" LastActivityDate="2018-02-24T14:42:12.600" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4373" PostTypeId="4" CreationDate="2018-02-24T14:42:12.600" Score="0" Body="Questions related to exams or tests in computer science courses or classes. Use this tag when asking about various aspects of exams and tests in specific computer science fields." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-02-24T14:42:12.600" LastActivityDate="2018-02-24T14:42:12.600" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4374" PostTypeId="1" AcceptedAnswerId="4378" CreationDate="2018-02-25T20:32:44.147" Score="6" ViewCount="747" Body="&lt;p&gt;I started teaching NodeJS to some of the students in the computer science major at my school (these students know the basics of Java and OOP).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is for them to make a small web project (such as a grades and averages calculator or a display for a timetable etc.) using javascript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I plan to teach about javascript, client-server separation, http requests etc. The main problem is the vast number of JS libraries in existence. I intend to emphasize that &lt;strong&gt;most of the code is already written&lt;/strong&gt;. E.g. the code for creating nice graphs exists in charts-js, and responsive client side frameworks (angular, react) exist. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This project is also meant to teach the notion that programmers rarely write programs from scratch, and that they should often see if there exists a library\framework that give a functionality they need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, with Javascript, the vast number of libraries makes it somewhat difficult to know which ones to pick. It's not impossible, but I'd rather students not waste time on that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I ran this by a handful of students, to see whether students actually get overwhelmed. From what I saw, students are likely to waste time reading up about the library they are checking (somewhat like reading a review for a PC before buying it). Research is great, but the amount of wasted time was quite big. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what can I do to teach them how to &quot;sniff&quot; the &quot;correct&quot; library more efficiently? In other words, how can I teach them which metrics are significant (and &lt;em&gt;why&lt;/em&gt; those metrics are important) when deciding whether a library is useful? Bearing in mind that the time it takes is to be considered, I'd prefer ways and metrics that are generally faster (e.g. reading up the documentation of a library is somewhat slower when compared to checking npm's download in the last day)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Unless they program in &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer&quot;&gt;Scratch&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-02-28T21:06:54.060" Title="NodeJS and Javascript libraries are overwhelming students" Tags="|project|javascript|secondary-education|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4375" PostTypeId="2" ParentId="4374" CreationDate="2018-02-25T20:40:50.250" Score="4" Body="&lt;p&gt;How would you do it yourself? If you are already effective at it, then show them how you approach it. Tell them where you look, and tell them how you decide that it is ok to stop exploring further for an individual resource or for the overall search. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, assuming you are less skilled at this than you'd like to be, give them (paper or electronic) a list of resources you have found with some added metrics that you would find useful for judgement. It needn't be comprehensive, but complete enough to cover their own needs at the moment. In the latter case, along with your list of resources, you can list one or two advantages and one or two disadvantages of each. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you want them to learn how to acquire resources, rather than just pick one of yours, you could also say where you found the resource and where you got the most important information about it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be worth some face-to-face time for discussion of your list and your criteria with opportunities for students to ask questions. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me note that this question is actually more general than the presented context. It also applies to, say finding an IDE and to finding a suitable language for some project. Finding useful tools is a good skill to have. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-02-25T20:40:50.250" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4376" PostTypeId="2" ParentId="4232" CreationDate="2018-02-25T22:03:20.680" Score="2" Body="&lt;p&gt;Although you did not specifically mention it, you might also discuss &lt;strong&gt;collision free&lt;/strong&gt; hash functions. They are useful for situations where the &quot;keys&quot; are fixed or only change very slowly over time. A very common situation is the reserved keywords of a language. Other examples are the abbreviation of states for postal delivery, or the airport label on baggage tags. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For another example, we use a &quot;help&quot; program that simply displays a queue of students waiting for help. It lists their name and course and computer name. To join the queue, the student executes the command ~csXXX/bin/help. The machines in our labs are arranged alphabetically. so it help the TA find student. But, we need to map the machine name to a room number, so the TA only sees a list for the room they are in. The set of computers is static in that we rarely get new ones. One doesn't really need a hash table for the small number of machines (&amp;lt; 200), but it is interesting to play with tools like the gnu &lt;a href=&quot;https://www.gnu.org/software/gperf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.gnu.org/software/gperf&lt;/a&gt; to see how a hash function can be &quot;designed&quot; to map a known set of strings without collision.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2018-02-26T16:11:25.597" LastActivityDate="2018-02-26T16:11:25.597" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4377" PostTypeId="2" ParentId="3881" CreationDate="2018-02-25T23:17:39.367" Score="11" Body="&lt;p&gt;This is all from my own personal experience, no research:  I believe all students can learn to program, and can &quot;get it&quot;, barring some mental handicap.  But they have to have the desire, as many have stated - that's the kicker.  And you, the educator, must have the patience to stick with them until they &quot;get it&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been a computer science educator for six years at the high school level.  Prior to that I was in software development.  I tell my students they are all climbing a mountain.  I tell them some will reach the top and see into the promised land well before the others.  But, I tell them, if they will work hard, and not give up, they will all eventually reach the peak of that mountain and see over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I see that happen.  Some of them reach the peak in Programming I (at my school that is Visual Basic).  Some of them are still struggling toward the peak in Programming II (C#).  And some of them give up before they reach the peak.  They drop the course or don't take Programming II at all.  But those who stay the course, pun intended, almost always develop a deep understanding and love for coding, and I see them in Programming III (AP Java), which is my goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it's worth, here are some &quot;tactics&quot; that may be useful to others:&lt;br&gt;&#xA;1)  Allow students to turn work in &quot;late&quot;.  Yes, those programs were due yesterday, but you kept working and have them ready today?  Good for you, for persevering!  Of course I'll take them.     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2)  Conversely, allow students who are always finished quickly to move ahead in the course or give them &quot;challenge&quot; exercises to complete.  Or send them to a web site like HackerRank where they can practice their code and compete with others.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3)  Also allow students who are finished quickly to move around the room and help others, if they desire.  But don't force them.  And pay attention that they're not just &quot;dictating code&quot; to others.  Instruct them that they must explain or give direction only.  Some students are really good at this and enjoy it.  (FYI my school is on the block schedule with 90 minute classes.  We are in a lab and when I am not instructing my students are writing code.)   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;4)  Preach Carol Dweck's growth mindset.  Effort == success.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;5)  Seat students so that those who are struggling are next to someone who has only &lt;em&gt;slightly&lt;/em&gt; better understanding than they do.  They will naturally work together because they are both lost a lot, and the one who understands a little bit more will spend a lot of time explaining to the other, thereby gaining confidence.  The one who has slightly less understanding will also gain confidence because they will realize they are not the only one who doesn't get it instantly.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;6)  Make them write code on paper, both for practice and for tests.  So many students become dependent on their &quot;smart&quot; IDE and don't know their syntax!  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;7)  As a corollary to the previous, emphasize the necessity of memorizing syntax.  Whether you understand it or not, you can memorize the syntax of a for loop to iterate through an array.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;8)  Remind them that they didn't learn something they are good at overnight, nor did they do it perfectly the first time.  Programming takes practice, just like anything else.  And sometimes they may have to move ahead without fully understanding what they just did.  As they use it more, one day it will come to them.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;9)  This is similar to someone else's idea about &quot;predicting&quot; in the debugger:  make your students &quot;read&quot; their code to you.  I make mine, periodically and individually, tell me, line by line, what a piece of code THAT THEY WROTE is doing.  If they can't, I tell them to go home and study it and try again tomorrow.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;10)  Structure programming assignments with &quot;levels&quot; of scaffolding.  In your Word document, or web page, or however you give the assignment, give a high-level overview of what the program is supposed to do first.  Students who have understanding will take it and run with it.  Then, after the high-level description, for students who need more, provide a more detailed description with pseudo-code or code snippets.  This will allow more students to be able to do the program and to feel successful.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;11)  Celebrate small victories.  When a student finally gets something, even something simple, get excited.  Encourage them not to give up, and when they don't, when they persevere, and they have a breakthrough, no matter how small, praise them!      &lt;/p&gt;&#xA;&#xA;&lt;p&gt;12)  Sometimes you have to have a frank but gentle conversation with a student - if you hate this, and don't want to put in the time necessary to really GET the topic, then why are you here?  I would wager that the girl who didn't understand the while loop after several semesters of instruction was spending little time outside of class studying about what a while loop was, when and why you use it, and practicing coding with it.  She was depending on an instructor to &quot;teach it&quot; to her, to feed her like a baby bird.  She didn't want it badly enough.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OK, I've said enough, I know a lot of this is anecdotal, but I hope some of it is helpful to someone.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-02-25T23:17:39.367" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4378" PostTypeId="2" ParentId="4374" CreationDate="2018-02-26T16:58:05.530" Score="5" Body="&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Node.js has an unusually complex ecosystem which you don't get in some other languages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Your students spending time to intelligently pick the best libraries is &lt;strong&gt;great&lt;/strong&gt;, but you might need to stop them from being bogged down.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If time is really a problem, simply take away the choice, but keep in mind that you take away a powerful (and necessary) learning experience.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Remember that not every problem &lt;em&gt;needs&lt;/em&gt; a library; it's fine to re-implement simple things yourself!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Node.js (and the JavaScript world in general) seems particularly prone to short-lived, highly popular libraries and frameworks which re-invent existing features in different ways. You need only see the &lt;a href=&quot;https://stackoverflow.blog/2018/01/11/brutal-lifecycle-javascript-frameworks/&quot;&gt;Stack Overflow blog which illustrates this trend well enough&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;img src=&quot;https://stackoverflow.blog/wp-content/uploads/2018/01/trends-major.png&quot; alt=&quot;JS Libraries&quot;&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I've developed web applications in the past where I've agonised over the choice of libraries for hours — even days — trying to find that &lt;em&gt;perfect&lt;/em&gt; combination which will avoid all these potential future issues... issues which, it turned out, weren't likely in the first place at the scale I was working at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Initially, I heard great things about React, so I decided to add that to my project. Then I need a 'Flux framework' too so I can handle events in a React way. So I pick one like Redux. But React doesn't degrade so well for clients without JavaScript — oh no! Luckily, there's already a solution for that — &lt;a href=&quot;https://github.com/reactjs/redux/blob/master/docs/recipes/ServerRendering.md&quot; rel=&quot;noreferrer&quot;&gt;server-side rendering&lt;/a&gt;. So I plan to use that too. I'm sending a lot of assets at once now, which is starting to get slow, so for HTTP clients I want to bundle my assets with &lt;a href=&quot;https://webpack.js.org/&quot; rel=&quot;noreferrer&quot;&gt;Webpack&lt;/a&gt;. But I don't want to do that for HTTP/2 clients because that's actually slower again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not even the end of the story, but you're starting to get the picture of just how many pieces exist in the JavaScript world. I honestly don't know many other languages that are so &lt;s&gt;chaotic&lt;/s&gt; &lt;em&gt;vibrant&lt;/em&gt; with their library ecosystem.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Honestly, your suggestion of just going by the download counts seems unwise in some respects. While popularity does probably offer a good indication of maturity and stability, it doesn't tell you whether the library actually does what you want, in the way you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's take my React example again. Yes, it's popular, and indeed, it is a front-end framework, but it requires a lot of 'buy-in' — you have to deliberately design your pages around React to get much out of it. jQuery might fit my use-case perfectly, despite being a little less popular, but by just picking the popular library, I'm stuck with even more work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an analogy, how do you pick which car you want to buy? You probably don't buy a &lt;a href=&quot;https://www.carkeys.co.uk/news/10-best-selling-cars-in-the-uk-in-2017&quot; rel=&quot;noreferrer&quot;&gt;Ford Fiesta&lt;/a&gt; just because everyone else did. You probably take a look at the specifications, fuel economy, and perhaps give it a test drive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting that &lt;strong&gt;investment&lt;/strong&gt; in and learning a little about the popular libraries is well worth it. You only have to do it once to learn the philosophy and the goals of that project, and once it's done, you know when you want to pick that library above the others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can try and tell them metrics to look at... or you can accept that you &lt;strong&gt;need&lt;/strong&gt; to dedicate time to trying the popular libraries, and getting that 'test drive'. Spend a lesson trying React, and get your students to tell you what they think. Going beyond the trivial 'Hello world' might be helpful (I hear the &lt;a href=&quot;http://todomvc.com/&quot; rel=&quot;noreferrer&quot;&gt;TodoMVC&lt;/a&gt; example is fashionable and more complex).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, if you can't afford the time, I think you'll simply have to &lt;em&gt;tell&lt;/em&gt; your students which library you want them to use. What your students are doing now is great, if a little inefficient. You can help by prodding them in the right direction — share what you know, and give them a nudge if they start burying themselves in too many libraries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes, I think all that's needed is a little poke to say that not all JavaScript projects need to handle every possible future concern, and to &lt;a href=&quot;https://en.wikipedia.org/wiki/KISS_principle&quot; rel=&quot;noreferrer&quot;&gt;Keep it Simple, Stupid&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2018-02-26T16:58:05.530" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4379" PostTypeId="1" AcceptedAnswerId="4382" CreationDate="2018-02-26T17:27:18.407" Score="64" ViewCount="29533" Body="&lt;p&gt;Teachers are sometimes called upon to teach something with which they have no experience. Don't laugh. Doctoral level education is often exactly like this. The student's advisor may have no background in the student's topic, but must still provide effective guidance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the other end, teachers are often called upon to teach something like APCS-A when they don't themselves even know Java and have little, if any, experience in Object-Oriented Programming. How can they proceed and be effective. I don't think that &quot;Keeping one day ahead of the students&quot; is any sort of answer to this and will likely leave the students frustrated and confused. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are in this situation, I assume that the obvious solution (&lt;em&gt;DON'T&lt;/em&gt;) isn't available to you. Similarly &quot;&lt;em&gt;Fake it 'til you make it&lt;/em&gt;&quot; isn't a solution since the future of your students is at risk. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is possible, of course, to borrow a syllabus and book list from some other teacher, but the deeper issue is about how you respond to student questions and concerns when your own knowledge doesn't provide an answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What would you do in a situation in which you know very little, to provide effective learning among your students?&lt;/strong&gt; Past successful experiences would be especially welcomed. So would caveats.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here are two links that speak to some of the things in this question:  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.chronicle.com/article/Teaching-What-You-Dont-Know/135180&quot; rel=&quot;noreferrer&quot;&gt;https://www.chronicle.com/article/Teaching-What-You-Dont-Know/135180&lt;/a&gt;&lt;br&gt;&#xA;and&lt;br&gt;&#xA;&lt;a href=&quot;http://harvardpress.typepad.com/hup_publicity/2011/07/tips-for-teaching-what-you-dont-know-huston.html&quot; rel=&quot;noreferrer&quot;&gt;http://harvardpress.typepad.com/hup_publicity/2011/07/tips-for-teaching-what-you-dont-know-huston.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-28T22:52:33.337" LastActivityDate="2018-03-03T14:47:37.167" Title="How do you teach something when you don't know it yourself?" Tags="|best-practice|" AnswerCount="9" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4380" PostTypeId="2" ParentId="4379" CreationDate="2018-02-26T17:55:24.450" Score="6" Body="&lt;p&gt;The effectiveness varies from teacher to teacher; but generally, it works well. (And can be optimized)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The method I describe has a few stages, each dependent on the previous ones.&lt;br&gt;&#xA;To teach something you don't know, share this method with the students (after you did a part of it, preferably after reaching the third part). Learn it at a quick pace, and let them see how you learn it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two things are achieved in that way: You can answer their questions, and they are exposed to new methods of learning.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Firstly,&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;If possible, sacrifice a few sleepless nights (not one after the other, mind you) to dive into the material and learn it. Read it, reread it, and then again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the night is needed for other things, then allocate time during the day. As I've said, every stage is important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do sacrifice the night, then bear in mind:&lt;br&gt;&#xA;There is indication that learnt material doesn't actually &quot;sit well&quot; in the mind if one hasn't &quot;slept on it&quot; (keeping it simple: during sleep, the brain makes new connections in the brain, and that's how we learn).&lt;br&gt;&#xA;So after rushing through a subject, you should let &lt;strong&gt;that&lt;/strong&gt; subject cool down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That last part is the semi-second stage. It usually happens by default, but (speaking from experience here) one might get carried away, so...&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Thirdly&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;After reading the material for a subject, do what your students would do if you had known the subject. &lt;strong&gt;Give yourself exercises&lt;/strong&gt;. At first, find online ones. For APCS-A, I'm pretty sure there are exercises available &lt;em&gt;somewhere&lt;/em&gt; on the internet. As is with &lt;em&gt;everything&lt;/em&gt;, practice. Start simple with online things, and then:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After you feel sufficiently practiced with the material for a subject, start&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;&lt;strong&gt;creating your own exercises&lt;/strong&gt;.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is the big one. This is the main point. This is my answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot emphasize that more &lt;sub&gt;(I suppose I &lt;em&gt;could&lt;/em&gt; make it &lt;em&gt;italic&lt;/em&gt;...)&lt;/sub&gt;. This part is, by far, the most important. This is far from saying that one can &quot;skip&quot; to it. I've tried, it doesn't work if you don't do the previous parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a better learning curve, try to think up of a division of a subject (for example, dividing &lt;a href=&quot;https://cseducators.stackexchange.com/q/4082/150&quot;&gt;OOP to sub-subjects&lt;/a&gt; in a logical). Create exercises for yourself for each division of the subject. Try to make both practical and theoretical questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The latter being questions of pure knowledge, and the former - questions of applying said knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Track the difficulty of the various questions in each sub-subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These stages will come in handy when you teach &lt;em&gt;others&lt;/em&gt;. You'll have a well ordered collection of exercises, fully covering the material, in varying difficulties. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have done what I have described on multiple occasions. This works for self learning (Not so surprising &lt;code&gt;;)&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The main point is:&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Learn it, as you would let your students learn it&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Now, as for answering students' questions:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't know the answer to a student's question, then say so. But also say something like &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'll check and get back to you on that&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And then treat the question like one of the theoretical knowledge exercises (mentioned above). Usually, the theoretical knowledge can be found on the spot by searching google. There's no shame to let students see how &lt;em&gt;you&lt;/em&gt; find information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you get back to the student with the answer, show the student how you found it, detailing how you learnt it. This is both useful for you (to make the knowledge stick in &lt;em&gt;your&lt;/em&gt; head), and useful for the student.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-02-26T19:03:10.273" LastActivityDate="2018-02-26T19:03:10.273" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4381" PostTypeId="2" ParentId="4379" CreationDate="2018-02-26T18:08:22.400" Score="13" Body="&lt;p&gt;There is one strategy, at least, that often works, especially with older and more experienced students. Using it in Secondary School would, perhaps, be too risky. It is also probably not indicated for core courses except when no alternative can be found. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The underlying principle is that you should not lie to your students or present yourself as other than you are. In other words, don't fake it. On the other hand, what you &lt;em&gt;are&lt;/em&gt; is a scholar: someone who can learn. Someone who knows &lt;em&gt;how&lt;/em&gt; to learn.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic technique is to run the class like a learning lab in which everyone contributes ideas constantly. There is more discussion and almost no &quot;lecture&quot; unless you can get the students to give mini-lectures on cool things they have discovered about the topic. It is teamwork in the extreme with yourself just a team member. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EXCEPT, that your main job is to show them how to learn: research, reading, experimentation, trial and error. You don't supply a lot of &lt;em&gt;course content&lt;/em&gt; but you do supply learning strategies and feedback on the things that the students learn. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A slightly less important task is to guide the students away from pure chaos. You will need to get them to focus on things in a reasonable order, delaying things that seem deeper or less connected to the main ideas being presented.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To ease your comfort level, try to find a few recognized experts in the topic at hand. This doesn't necessarily mean text-book authors, unfortunately. You might be surprised that some of them are willing to give you guidance (pointers to papers, etc) that will help you guide the class.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One trick is to have daily summaries produced, perhaps by yourself, and perhaps by students, rotating this task and making the summaries available to all: What are the two or three most important things we discovered today. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the course is about programming you can organize a very agile team to try to produce something interesting within the framework of the course. If it is about theory you can try to teach students how to find the crux of the proof of a theorem (for example). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this is exactly what you are forced to do if you are teaching a topic that is state-of-the-art, edge-of-the-known-world stuff. Nobody knows how to teach it methodically, so try to develop the method yourselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another use of this is when a group of students forms a Learning Club to explore some topic. The group leader may know a bit more than the others and can try to guide them, but it is a learning-for-all situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning how to learn is likely more important than any specific topic. Without that you can never leave your guides behind nor can you outshine your teachers. Older students have, hopefully, already experienced learning and, hopefully, have a few learning strategies developed already so it isn't as big a task as teaching novices in a field in which they have no preparation at all. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I note that there was a time, around 1980, I think, at which you could earn a Doctorate from Carnegie Mellon University in CS, but could &lt;em&gt;not&lt;/em&gt; earn an undergraduate degree. The reasoning behind that was that &quot;there was insufficient academic content&quot; at the time in CS, in the faculty's judgement. The doctoral students were, of course, developing that content that could later filter down to a wider audience. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-26T18:17:57.867" LastActivityDate="2018-02-26T18:17:57.867" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4382" PostTypeId="2" ParentId="4379" CreationDate="2018-02-26T18:30:59.773" Score="69" Body="&lt;p&gt;This is a vital question, perhaps &lt;em&gt;the&lt;/em&gt; vital question, for a CS educator to deal with, because technologies will keep pushing us.  There is no end to this particular merry-go-round.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been stuck, non-stop, in exactly this situation, for the last four years in a high school for gifted students, and I can attest that it is physically, mentally, and emotionally exhausting. It can push you to the edge of a nervous breakdown. It can also be incredibly rewarding, both for you and for the students.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I claim no special wisdom, but here are some of the techniques I've been using.   I hope will be of help to other teachers gazing down the barrel of a similar gun at some point in their career:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't be dishonest with your students or try to hide your lack of background.  There will be moments that you come up short, and your honesty and forthrightness from the start will help to mitigate any loss of trust that students might feel when this happens.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Find several great resources.  Do not depend on one resource to give you the sort of thorough understanding you need to do this well.  A strong textbook is great, if there is one to be found, and can help you both understand the material and sequence your lessons.  However, single-source preparation leads to two problems: (a) your understanding will be brittle, and you will be left with only one way to explain a concept when students are lost, and (b) it will be very difficult to deal with questions, particularly from your brighter students, that go off-script and try to connect with outside ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my best situations, I will have a textbook, a tutorial series (such as might be found on YouTube or a website somewhere), some exercises to work though, and a tutor to help me when I get stuck.  SE can, itself, act as the last two of these for CS topics in a pinch, though it is not as good of a tutor as an actual tutor, who will build a dialogue and set of understandings with you over time.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use the lesson planning itself as your final preparation, in which you summarize the key understandings and design exercises to help your students fill in the dots.  Over-prepare your lessons, because your instincts for how long the material will actually take to cover are not yet honed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I once prepared what I thought would be 3 lectures, and ended up delivering it as 1 lecture because things went extremely smoothly.  At the end of the hour, ,I arrived at the end of literally all of the material I had prepared.  The students enthusiastically told me that the lesson had made a lot of sense.  &lt;em&gt;&quot;Great,&quot;&lt;/em&gt; I thought, &lt;em&gt;&quot;I'm glad that made sense to the students, but what in the world am I going to do&lt;/em&gt; &lt;strong&gt;&lt;em&gt;tomorrow&lt;/em&gt;&lt;/strong&gt;&lt;i&gt;??&quot;)&lt;/i&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When students ask interesting, tangential questions, don't be afraid to reply by asking if they would be willing to research it a little and report back to the class next time.  It is important that not every student question become a major research assignment for you.  Instead, choose your battles carefully. Burnout is a real danger, and your time is valuable.  You have made a pact to help guide students through the main topic; don't get caught up in too many tangents on your first pass.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you're really caught for time, you can simply present learning materials and ask students to work together to try to make sense of it.  Be careful not to do this too often, because while this technique can work reasonably well for your high-fliers, it does not leave you in a position to guide and help the students who really struggle.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Accept that this is an imperfect business.  You will mess up from time to time.  You will make mistakes.  You will arrive at a lecture feeling prepared, receive a student question, and suddenly realize that you don't understand something that you thought you did.  You may even discover that something you taught was outright wrong.  Be prepared to go back to the class and revisit an idea if you screw up.  But also, be prepared to forgive yourself for some amount of weakness.  You are an imperfect being trying to build a learning opportunity for your students, and all you can do is try your best.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-02-26T19:36:42.647" LastActivityDate="2018-02-26T19:36:42.647" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4383" PostTypeId="2" ParentId="4379" CreationDate="2018-02-26T21:01:39.763" Score="7" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;All possible questions about an assignment should have an answer if it would block students from finishing it if left unanswered.&lt;/strong&gt; Questions which are vital for assignments that are not answered is the death of the assignment.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limit your scope further.&lt;/strong&gt; If you don't know a subject, you will not be able to fill in the holes for any edge cases without sufficient understanding. Therefore, don't teach what you cannot explain sufficiently enough to have them do the assignment.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Understand learning dependencies.&lt;/strong&gt; A common mistake is to assume students know something when they don't. You can use a simple concept map to do this. One of my favorite tools to do this is to use GraphViz, a suite of programs to help create node-edge graphs. A visualization can also be very helpful to do this.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here is an example of a &lt;code&gt;.dot&lt;/code&gt; file that can be converted using GraphViz's &lt;code&gt;dot&lt;/code&gt; program into the following image:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;digraph G {&#xA;    label=&quot;Basic C Programming&quot;;&#xA;&#xA;    n0 [label=&quot;Binary Values&quot;]&#xA;    n1 [label=&quot;Hello World&quot;]&#xA;    n2 [label=&quot;Basic Data Types (int, float, char)&quot;]&#xA;    n3 [label=&quot;Pointers&quot;]&#xA;    n4 [label=&quot;Arrays&quot;]&#xA;    n5 [label=&quot;ASCII Encoding&quot;]&#xA;    n6 [label=&quot;Strings&quot;]&#xA;&#xA;    n0 -&amp;gt; n5&#xA;    n2 -&amp;gt; n1&#xA;    n2 -&amp;gt; n3&#xA;    n2 -&amp;gt; n4&#xA;    n5 -&amp;gt; n6&#xA;    n3 -&amp;gt; n6&#xA;&#xA;    n7 [label=&quot;Conditionals&quot;]&#xA;    n8 [label=&quot;Functions&quot;]&#xA;    n9 [label=&quot;Structures&quot;]&#xA;&#xA;    n7 -&amp;gt; n8&#xA;&#xA;    n10 [label=&quot;While Loop&quot;]&#xA;    n11 [label=&quot;For Loop&quot;]&#xA;    n12 [label=&quot;Do While Loop&quot;]&#xA;    n13 [label=&quot;Switch&quot;]&#xA;&#xA;    n10 -&amp;gt; n11&#xA;    n10 -&amp;gt; n12&#xA;    n7 -&amp;gt; n13&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Qnuss.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Qnuss.png&quot; alt=&quot;A basic, unfinished concept map for basic C programming concepts&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;Zero-bug tolerance in assignments and code.&lt;/strong&gt; How can students trust you if you don't have a solution that compiles?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="666" LastActivityDate="2018-02-26T21:01:39.763" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4384" PostTypeId="2" ParentId="4379" CreationDate="2018-02-27T11:31:49.097" Score="5" Body="&lt;p&gt;One thing I think is important to acknowledge is the advantage you have in having learned something recently before teaching it. Mainly (these are related):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1) It's easier for you to distinguish &quot;easy&quot; and &quot;tricky&quot; concepts&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you've had a skill/background knowledge/understanding of a concept for a long time, the memory of learning it often fades, in my experience.  It's harder to recognize what takes two minutes to understand, and what takes hours/days/several different methods of explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2) You can guess where students will get stuck and what questions they will have&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is probably (hopefully) because you've just gotten stuck in those same spots, and asked yourself those same questions.  In my experience, formulating a good answer for myself, or helping myself get over a particular hurdle has been helpful for my students, who often find the same explanation I gave myself illuminating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3) A student's question that you can't answer immediately can be a great learning experience&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's ok (in my experience) to say that you don't know. Like other answerers here (ItamarG3), I say &quot;I will get back to you&quot;; in a few minutes, by email, or in the next lesson; and if I can, give a best guess at an answer.  In the worst case scenario, someone has called you out on not being fully prepared, and you need to scramble for an answer.  In the best case, it's a question that goes beyond the course material, and an opportunity for you both, and possibly the rest of the class, to learn something new (and promote learning in general). In my experience, students usually appear proud (and they should be) that they've thought about something in a way that I haven't before.  You can't be expected to be the world expert in everything that you teach, and even if you're already familiar with a topic there will always be questions that you don't know the answer to.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also note that learning as (or slightly before) you teach works much better if you have (as pointed out in other answers)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;a) A prepared syllabus/some homework questions&lt;/strong&gt; &#xA;In particular, it's difficult to provide the conceptual overview required for a syllabus until after you've learned much of the material. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;b) Someone(s) you can ask for help.&lt;/strong&gt;&#xA;We all have questions that we can't seem to answer on our own...  If you need a syllabus, hopefully this same person can help you here as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;c) Extra time and energy to learn.&lt;/strong&gt; &#xA;In particular, you want to understand your material more deeply than you expect your students to.  This means that, even if you learn quickly or already have some knowledge of the field, you will probably need a reasonable amount of time for self-study.&lt;/p&gt;&#xA;" OwnerUserId="4346" LastActivityDate="2018-02-27T11:31:49.097" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4385" PostTypeId="2" ParentId="4379" CreationDate="2018-02-27T23:36:57.107" Score="7" Body="&lt;p&gt;I am currently a high school student takes APCS, as well as several other IT related courses from an instructor who has very little understanding of CS concepts as a whole, and I greatly appreciate him for essentially sponsoring these classes.  If you are in this situation and interested in contacting someone with experience doing this, I'd be happy to have him get in touch with you.  He started in the navy doing electrical work, and then transitioned into being an officer relatively early on, so most of his experience is irrelevant to CS and IT.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What he does is: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Organize the business aspects of creating courses.  Currently, we have 8 IT courses, each ending with getting either a Comptia or MTA certification, that he has been able to negotiate funding for them from both grants and connections he has from the military.  Without his ability to get funding, I would have nowhere near the job opportunities I am presented with now, nor the opportunity to learn as much as I have.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Finds people he knows who do have in depth experience with CS.  One of his friends is a full time software engineer at a large corporation, and my teacher convinced him to get certified to teach and his friend is now teaching several CS courses accredited by our local community college at my high school.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teaches using good, online materials.  He never lectures during class, as that would be a waste of time for all involved parties.  Instead, he treats the class periods as blocks of time for students to research/learn from coursework made by people more knowledgeable.  This works best in classes with students interested in the course material, however most taking advanced CS courses are and this has not been an especially large issue.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, to recap, what he does is uses his skills and network to find others who are knowledgeable to teach (be it online coursework or people he knows), and create opportunities for the students that otherwise would not have existed.  I don't fault him for not knowing the answer to most of the questions in my classes, as I would't have any way of taking the classes without him.  Simply learn as much as you can, and attempt to facilitate a good learning environment for those who are interested in being involved.&lt;/p&gt;&#xA;" OwnerUserId="4354" LastActivityDate="2018-02-27T23:36:57.107" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4386" PostTypeId="2" ParentId="4379" CreationDate="2018-02-28T00:55:35.913" Score="5" Body="&lt;p&gt;Fleshing out something I mentioned in a comment to another answer - a very simple thing I have done in the past is to set a timer for myself in class when I feel things have gone south, for whatever reason, to give myself time to regroup and possibly even change direction.  Setting the timer forces me to admit that things are not going the way I expected (to myself AND my students) and focus on determining what to do next.  It may just be three to five minutes - but do it, and make yourself sit down and actually think. You will be surprised at what you might come up with, either based on plans you already have for another day, or something you may have already covered that you need to reinforce.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our role is, yes, to teach students our content, but more importantly, it is to teach them to be lifelong learners.  I can model that by learning alongside them, even with a subject I think I &quot;know&quot;.  I can also show them that I make mistakes and missteps - but that I will make a correction and keep going.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-02-28T00:55:35.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4387" PostTypeId="2" ParentId="4319" CreationDate="2018-02-28T01:44:26.557" Score="1" Body="&lt;p&gt;First day of class I have this conversation with my students.  I ask them if they want to be successful - notice I don't say have a job, or make money.  They all respond &quot;of course&quot;.  Then I go around the room and ask each of them to describe something at which they have become successful and how they achieved success.  They all mention hard work, practice, time, effort.  Then I tell them they have to do the same thing in my class to be successful, to learn. They will pretty much agree with that.  Then of course some of them will say, well I don't want to learn THIS, I don't want to be successful at THIS.  Then I respond, OK, I understand that you don't want to learn THIS, but guess what?  By being in my class and learning THIS, something you don't really want to learn, you are PRACTICING learning for the things you DO want to learn.  You are learning how to learn.  And they will usually agree with that also, reluctantly.  Then as the semester goes on, when I hear them say things like &quot;why do I have to learn this&quot;, or &quot;I don't want to do this&quot;, I remind them, I ask them, &quot;you may not want to learn this, but remember, by doing this, you are learning how to ____________&quot;.  And they fill in the blank.  &quot;I am learning how to learn.&quot;   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That sounds simplistic...but maybe I get through to a few.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit:  I was thinking more before bed, and I reread the other answers, and I want to cast my vote with the responses about relationships.  Sometimes the only thing we can achieve with certain students is a relationship.  The only thing they may learn in our classes is that we value them and believe in them.  That may not motivate them TODAY, but it may motivate them another day in another situation.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="4338" LastEditDate="2018-02-28T12:10:10.070" LastActivityDate="2018-02-28T12:10:10.070" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4389" PostTypeId="1" AcceptedAnswerId="4391" CreationDate="2018-02-28T11:04:15.293" Score="7" ViewCount="156" Body="&lt;p&gt;I like to give my students questions asking them to find and correct design issues in code. As an example, I gave them the following question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;    This class represents the user-system of the application. &#xA;    There must be only one object of this class. &#xA; */&#xA;public class UserSystem {&#xA;   private Map&amp;lt;String,String&amp;gt; users;// maps user to password&#xA;&#xA;   public UserSystem() {&#xA;     users = new HashMap&amp;lt;String, String&amp;gt;();&#xA;   }&#xA;&#xA;   public void addUser(String username, String password) {&#xA;     users.put(username,password);&#xA;   }&#xA;&#xA;   public Boolean isAuthorized(String username, String password) {&#xA;     if (!users.containsKey(username))&#xA;        return false;&#xA;     return users.get(username).equals(password);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The question text was something like: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;The class compiles correctly but has a design problem. What is the design problem? Write a main program that demonstrates it. Use one of the design patterns we used in class to rewrite the class such that the problem is fixed. What design pattern did you use?&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The answer I aimed for was that, since the constructor is public, users of this class might create multiple objects of the class. The solution should be to convert this class into a singleton by making its constructor &lt;code&gt;private&lt;/code&gt; (and adding a &lt;code&gt;static&lt;/code&gt; member variable &lt;code&gt;INSTANCE&lt;/code&gt;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Indeed, some students got this correctly, but other students answered with all sorts of other design bugs, such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The method &quot;addUser&quot; does not check whether the username already exists.&lt;/li&gt;&#xA;&lt;li&gt;The method &quot;addUser&quot; might be used by unauthorized users to enter their name into the system.&lt;/li&gt;&#xA;&lt;li&gt;The methods are not synchronized.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is true that these issues can be problematic in some cases, however, this depends on the context and the usage of the class. I wanted them to focus on a specific issue which I deliberately wrote in the Javadoc to this class. However, many students probably did not notice this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MY QUESTION IS: in the future, how can I phrase such questions such that the answers will be more focused?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="27" LastEditDate="2018-02-28T18:34:36.493" LastActivityDate="2018-03-03T02:11:03.680" Title="How to phrase questions about spotting design issues in programs" Tags="|programming-paradigms|evaluation|exams|" AnswerCount="4" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4390" PostTypeId="2" ParentId="4379" CreationDate="2018-02-28T11:34:14.803" Score="4" Body="&lt;p&gt;You start by explaining how CS is different.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that is not going to be immediately apparent to high school or even university students is how &lt;em&gt;young&lt;/em&gt; CS is as a discipline compared to other subjects. Or rather the ramifications: they probably won't realize how &lt;em&gt;different&lt;/em&gt; that is from the other subjects they get in the core curriculum even as they're memorizing important dates. Every subject has a forefront of changing knowledge (one that high school and undergraduates basically never see) but for the most part that's &lt;em&gt;all&lt;/em&gt; CS has.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For every quicksort or lambda calculus there's a hundred things that have become common place in the lifetime of your students. So unlike math, science, literature, etc. which have centuries if not millenia in their bodies of knowledge CS has decades &lt;em&gt;at best&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So you explain that, you explain that over the course of their careers as computer scientists or software engineers they will almost certainly constantly have to learn new concepts/tools/techniques, and that you are doing that right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And that's actually quite exciting even if it makes for some conundrums like yours: how many fields can you be in where you, Joe Blow/Jane Doe programmer, can possibly make or at least contribute to a meaningful advancement?&lt;/p&gt;&#xA;" OwnerUserId="1790" LastActivityDate="2018-02-28T11:34:14.803" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4391" PostTypeId="2" ParentId="4389" CreationDate="2018-02-28T13:00:58.030" Score="4" Body="&lt;p&gt;My worry here is that there is no general solution other than to improve any question when you reuse it based on the answers you saw in the past. I have to admit that, even as a very experienced Java developer who is also very Pattern literate, I missed it entirely since I didn't actually read the Javadoc before I looked at the code. I came up with only minor quibbles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The specific problem here is that I was looking at the Class in isolation, not as part of a larger whole. Also, I was reading the class, not writing it. I'm pretty sure that if I were writing it I'd have built a Singleton in some form instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, you can't expect that every student will notice everything, and you can expect that some students (me, perhaps) will get lost in the detail before analyzing the bigger picture. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, missing the point of your exercise can lead to a forehead slapping A-Ha moment for some students that is valuable in its own way, as long as they don't feel that they are punished in some way for missing it. It isn't a general solution, but had you here, or in general, emphasized to the students to RTFD (Read The Full Documentation) then more of the students would be likely to get it right. But that is a general prescription for how you teach about programming, not a specific recommendation for &lt;em&gt;this&lt;/em&gt; sort of question. &quot;Be sure you understand the &lt;em&gt;intent&lt;/em&gt; of a class before you worry about its details&quot; is a good lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this one, though, perhaps making the Javadoc more complete (longer) would have helped a bit. A longer explanation before the start of the actual code would be less likely to be missed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Making it obvious would also help (A Singleton is required here) but likely defeat your purpose. It would, however, be essential in production code to be just that obvious. Even saying the key thing twice would help.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA;  This class represents the _unique_ user-system of the application. &#xA;  There must be only one object of this class. &#xA;*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I'd still have missed it, of course, since I didn't RTFD first. But if you can make such things lead to student A-Ha moments they are valuable. Forehead slapping may sting a bit, but is likely good for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But on an exam or quiz, especially a timed quiz, there is too much pressure to get to the answer quickly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, there are different sorts of quizzes. If you have a quickie quiz on most days, where each quiz counts very little toward grading, don't worry too much about making every question perfect. This is true even when the little quizzes collectively have a substantial contribution to grades. On major exams, of course you need to be much more careful. If you find that a substantial proportion of your group gets it wrong, or the folks you expect to get it right don't, then you might need to exclude that question from the computed totals, with an explanation and discussion soon after the quiz. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-02-28T14:24:19.630" LastActivityDate="2018-02-28T14:24:19.630" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4392" PostTypeId="2" ParentId="4389" CreationDate="2018-02-28T15:03:14.990" Score="3" Body="&lt;p&gt;I would break the question into parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can put a short paragraph describing what the code in front of them is &lt;em&gt;supposed&lt;/em&gt; to do. When one (or more) writes code for something, the design is inseparable from the purpose of the code. Following the paragraph, put the code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I suggest changing the documentation of the code by adding a short description before each method. Phrasing the documentation can help with focusing the students on the correct solution (without explicitly giving the answer...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, regarding breaking the question into parts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before asking &quot;What's the bug?&quot;, I suggest putting a question\sub-question similar to:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Write an external (i.e. &lt;code&gt;static&lt;/code&gt;) method that receives a person's details and checks whether they are in the system. The method can receive parameters of your choice.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That last sentence is a red light. Such a question hints about &lt;code&gt;static&lt;/code&gt;, and about passing parameters. When using a singleton, you don't need to pass any parameters, except for the name of the person (not even the password). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, put in the question you wrote, but make it clear that the design flaw is in the code &lt;strong&gt;you&lt;/strong&gt; gave them, and not in the one they wrote. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Phrasing the question in this manner and order makes it so that when they answer, they are already thinking about static and parameters and instances of the &lt;code&gt;UserSystem&lt;/code&gt; class (if only subconsciously). All of this focuses them on Singleton.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2018-02-28T15:03:14.990" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4393" PostTypeId="2" ParentId="4374" CreationDate="2018-02-28T21:06:54.060" Score="2" Body="&lt;p&gt;This sounds like a question of vetting. Here are some things I do when evaluating Node.js libraries:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find the package in npmjs.com and view the stats (e.g., daily/weekly/monthly downloads). You can sort of gauge its popularity that way.&lt;/li&gt;&#xA;&lt;li&gt;Look for similar libraries and compare their stats.&lt;/li&gt;&#xA;&lt;li&gt;Look at the package in GitHub. View those stats (e.g., # of contributors, # of releases, # of stars).&lt;/li&gt;&#xA;&lt;li&gt;View the GitHub documentation (README.md). Is it helpful, mature, professional?&lt;/li&gt;&#xA;&lt;li&gt;Look at the GitHub commits. Are they recent? Is the repo actively maintained?&lt;/li&gt;&#xA;&lt;li&gt;Finally, just try it out. Sometimes you need to test a few libraries to see which one is better for your application.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;These are just some rules of thumb. But it helps the weed out process.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2018-02-28T21:06:54.060" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4394" PostTypeId="2" ParentId="4389" CreationDate="2018-03-01T01:30:58.053" Score="6" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;It is true that these issues can be problematic in some cases, however, this depends on the context and the usage of the class.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &quot;design problem&quot; that you were hoping they would find &lt;strong&gt;also&lt;/strong&gt; depends on the context and usage of the class. We have no idea whether the users of this class are obeying your JavaDoc. In fact, I could see an argument that your &quot;design problem&quot; is invalid because anybody who violates the JavaDoc is going outside the bounds of your design in the first place! Compare that to the functions with no JavaDoc, and honestly I'm more convinced by your students' answers than I am of your intended answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asking &quot;what is wrong with the design of this class&quot; is too broad. You need to provide more context: perhaps provide the &lt;code&gt;UserSystem&lt;/code&gt; class and then another class that uses it incorrectly (by creating a new &lt;code&gt;UserSystem&lt;/code&gt; instance for every user, for example), and then ask what the design problem is in that code and how it could be prevented in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a specific answer, you need to ask a specific question. All of the answers your students provided sound perfectly reasonable to me.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-03-01T17:14:38.930" LastActivityDate="2018-03-01T17:14:38.930" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4395" PostTypeId="2" ParentId="2985" CreationDate="2018-03-02T14:47:55.080" Score="1" Body="&lt;p&gt;I like your quote: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;This isn't me, I am playing a role.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Thinking that has saved me from despair on so many occasions... I have been wondering in my work how to &quot;teach abstraction&quot;, and it turns out to be the case that it is not possible. If success in programming (let alone all the &lt;em&gt;other&lt;/em&gt; areas of CS) is based on being able to think symbolically and abstractly (whatever that means), then we have to face the fact that apparently, this key skill can be learned, but it is not innate (so say that to all of your students!) and cannot be taught either (so say that too). (I should have written this in Lisp, I guess().:)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It turns out that adults cannot grow significantly in their ability to think abstractly (just humor me for a moment on the &lt;em&gt;can't&lt;/em&gt;) and that only about 30% of adults ever get to that stage. But most people can. How? Well, they have to have the right sort of education between age 7 and 12, while they are in the Concrete Operations stage. That is when they can learn the basis for Formal Operations - while they are mastering concrete thought! This age range is a &quot;critical period&quot; or &quot;window of opportunity&quot;, like in learning a spoken language: if not done by age 10, &lt;em&gt;it ain't gonna happen&lt;/em&gt;. So, to have anything to offer students, we must ensure that they have or will start learning abstract thinking... &lt;strong&gt;in Elementary School!&lt;/strong&gt; Yes! No exceptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that is the case, then I would take these 12 year olds out to Golden Corral (cheap buffet restaurant in my area of the world), give them a nice meal, and then say to them:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Life is a buffet, like this restaurant, and we all start out with&#xA;  nothing in our heads and are responsible for everything that goes in&#xA;  to them. Not enough in, nothing much out. You have as much right to&#xA;  anything here as anyone else, no one is special in this restaurant,&#xA;  and no one is special in life. You can become what you choose to, but&#xA;  just like cooking up all this food, it will be long hard work.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then I would say to them that given that they will become what they work towards &lt;em&gt;right now&lt;/em&gt;, at this age, with less chance of changing or growing later (once they have to support themselves) then they should look around at the smorgasbord of work that is available, and pick what they want to be, because they could be most anything. If they don't want to end up working at a restaurant or mowing lawns, they had best apply themselves to what they really do want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biggest mystery to me with young people is that most of them seem to have no idea what they want from life. &lt;strong&gt;We have seriously let them down in this regard.&lt;/strong&gt; I am playing a role. I have been since I could think what a role is. I choose my role and my approach to it. There is no &quot;real world&quot; or authentic self. It is all a fabrication, so be earnest and work hard at crafting a self. No one else will do it for you.&lt;/p&gt;&#xA;" OwnerUserId="4389" LastActivityDate="2018-03-02T14:47:55.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4396" PostTypeId="2" ParentId="3259" CreationDate="2018-03-02T21:59:46.403" Score="2" Body="&lt;p&gt;Dr Michelle Strout (now at University of Arizona) used this approach when she was at Colorado State University.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;For hardware, the students used &lt;a href=&quot;https://shop.evilmadscientist.com/productsmenu/760&quot; rel=&quot;nofollow noreferrer&quot;&gt;Meggy JR&lt;/a&gt;. Students were expected to write simple programs/games using a Java interface to the hardware. Initially, the hardware was purchased as kits and there was a pizza party to assemble it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The students then wrote compilers for a subset of Java (MeggyJava), using Java. &lt;a href=&quot;https://www.cs.colostate.edu/~cs453/yr2013&quot; rel=&quot;nofollow noreferrer&quot;&gt;See class web page&lt;/a&gt;. The code their compiler created could be executed on the hardware, or in a simulator.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In another year, the students did the same project, &lt;a href=&quot;https://www.cs.colostate.edu/~cs453/yr2015/&quot; rel=&quot;nofollow noreferrer&quot;&gt;See class web page&lt;/a&gt;, but the implementation language was in Haskell.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The students enjoyed creating simple games and displays and then using their compiler to realize the result on the physical hardware.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For grading, the course used our autograder to compare the &quot;output&quot; of the instructors compiler (i.e. what did the code do to the state of the Meggy JR when the code was executed on the simulator), to that of the code produced by their compiler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-03-02T21:59:46.403" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4397" PostTypeId="2" ParentId="4389" CreationDate="2018-03-03T02:11:03.680" Score="3" Body="&lt;h3&gt;Simple demonstration:&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Presenting this &lt;a href=&quot;https://i.stack.imgur.com/kuubn.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/kuubnm.jpg&quot; alt=&quot;photo&quot;&gt;&lt;/a&gt; and asking, &quot;What do you see?&quot; is sure to get a variety of answers. Most might be along the line of a bird feeding baby birds. Not all will be, however. Possible answers include &quot;A bunch of birds,&quot; &quot;A birds' nest,&quot; &quot;Tiny leaves,&quot; &quot;A pretty picture,&quot; and even &quot;A fuzzy background.&quot; None are wrong, and all will show what the answerer first focused on as an answer to the question. None of the answers reflect what else they might have noticed, given more time, or what else they could say, if asked in detail about it. The fact that &lt;em&gt;you&lt;/em&gt; wanted to know the species of the bird is not in the question, so not necessarily in the answers.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Students have a particular mindset for taking tests, or other evaluations, that contributes to the problem. Students are driven to maximize their time, and the potential for high marks. They will do anything they can to find the answer in the shortest possible time-span. Once they have a &lt;em&gt;possible&lt;/em&gt; solution, they will test it &lt;strong&gt;just enough&lt;/strong&gt; to see if it is &lt;em&gt;probably&lt;/em&gt; the answer, do whatever is required to demonstrate that answer, and move to the next question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &lt;em&gt;attempt&lt;/em&gt; to precondition the students to be thinking in the right mindset to &quot;see&quot; what you want them to see by ordering questions in a fashion that leads the student to the proper mindset. There is no certainty that such a tactic will succeed, however. Many students, especially in the higher levels of education have a test taking skill where the test is scanned first, then questions are answered. Shorter and/or easier questions are answered first, longer questions latter, and the hardest ones last. In that style of test taking the preconditioning questions can be somewhat removed in time from the final target and may have lost their &quot;conditioning&quot; value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asking observational questions in tests, or quizzes, will result in answers showing what the student focused on the fastest that &lt;em&gt;might&lt;/em&gt; answer the question. The answers are not even a true measure of how the student thinks, or how they would evaluate the same information in a non-test environment. The more &lt;em&gt;obvious&lt;/em&gt; clues you can give about the expected answer the greater the odds are that answers will fall closer to your expectations. Yet, even that is of limited value in most programming contexts. Even with the clue of &quot;design problem&quot; the students, as seen in your case, are going to branch off into several directions, only one of which is going to be how the given code is connected to the greater whole. As seen by the answers you did receive, other possible branches are the &quot;design&quot; of the code inside the class, and even error checking, which is often considered a &quot;design&quot; issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless a code segment has a compile-time error, or other syntactical error, a blanket statement of &quot;find the bug&quot; will lead to a range of answers, most of which are technically correct while not being what you had in mind. If it is a syntax issue, or an error which will cause a compile-time error, the question should still be explicit in that a syntax error, or compiler error is expected and you want the cause, or the correction to avoid it. Without that qualifier it is still often possible to find a &quot;problem&quot; with the code that is other than what you were expecting.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;Since I don't know Java well enough to be sure, I'm only making a stab at a possible re-work of the question. The principles should carry over, even if the technical details do not, however.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In the question cover the facts that, first, the comments state, &lt;code&gt;There must be only one object of this class&lt;/code&gt;, and second, some future coder using the class might not read the comments. State that you want them to make the needed changes &quot;at the design level&quot; which would force the future coder to only have one object of that class. &quot;The best method will cause a compile-time error if the rule is violated.&quot; An alternative statement could be to rewrite the code such that &quot;it is impossible for two objects of the class to be instantiated by the program.&quot; &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;That's the part I'm not solid on. I don't know that a compile-time error would be created in a program trying to create two objects of that class if you turn it into a singleton class using the changes you described.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you have taught, and used, the singleton pattern, then they should have a decent change of coming to the conclusion that such is what you want. Still, other solutions &lt;em&gt;are&lt;/em&gt; possible, such as a wrapper class that tests for how many there are already, or some kind of internal test for prior instances. The more specific you can be to eliminate alternative &quot;fixes&quot; the better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My opinion is that in a testing environment it is unwise to ask for evaluation of designs in search of improvements. As I covered earlier, this will not offer any reliable insight into the abilities or thinking patterns of the tested students, but rather it might offer insights into their test-taking patterns. Since I doubt the latter is your objective, the tools used might be better replaced. It might be better to tell them to use a pattern to change (or even create) something, and the skeleton of that can even be bare bones. To determine that they understand the singleton pattern, as you taught it, you could instruct them to convert the following skeleton into a singleton class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class UserSystem {&#xA;   private type var; // instance variables&#xA;&#xA;   public UserSystem() {&#xA;      // instantiation code&#xA;   }&#xA;&#xA;   public void methodOne(argList) {&#xA;      // methodOne code&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are no &quot;bugs&quot; or design issues to correct. What the class is, or does, has no bearing on how it can be made into a singleton class, and is therefore, unimportant to the question, and only distracting to the student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one other thing you can do before the tests, preferably at the beginning of the course, maybe even include in the sylubus. You can state that you will use certain, defined and provided, phrases to emphasize what elements of the material you are examining. This may, or may not, be possible in your situation, but at the very least you can develop and publish, a rubric, for the tests before they given to the students. This allows them to see what you're testing for, and evaluating against. They can then focus their attention on the details that matter. If you're not testing their ability to find syntax error in provided code, you can say so, and even tell them to ignore any they find and presume that it &lt;em&gt;is&lt;/em&gt; correct syntax for the purposes of the question. After that instruction, any answer that is about the syntax is obviously wrong, even if they did find such an error and use it as the answer. You can even add such statements, where warranted, to the body of a given question. Though, if on the question itself, I'd make it a bold and separate line in the text of the question.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-03-03T02:11:03.680" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4398" PostTypeId="2" ParentId="4379" CreationDate="2018-03-03T14:47:37.167" Score="3" Body="&lt;p&gt;There are lots of great answers here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am adding this answer to preserve it outside of a comment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are new and learning the course material yourself try to apply more structure to the content to assist yourself and your students.  A good tool for this is to develop scaffolding for your exercises that your students work within. This will help contain the material and limit the types of issues that you will need to prepare for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen that one of the biggest challenges for new CS teachers is &quot;debugging&quot; student code.  This can be time intensive and distracting. Scaffolding can help immensely in this area.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another technique is working backward on an exercise. Provide answers that are flawed in some manner and have them correct them. This kind of backtracking can avoid the many paths students can take if they were to move forward through some material.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastActivityDate="2018-03-03T14:47:37.167" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4400" PostTypeId="2" ParentId="302" CreationDate="2018-03-04T19:41:32.780" Score="0" Body="&lt;p&gt;I just started playing with these. What I have been doing is writing some code and testing it and then moving things around before giving the projects to my students to rearrange. So far I have just played with loops and decision structures. I'm using Visual Basic and C# with different classes.&lt;/p&gt;&#xA;" OwnerUserId="541" LastActivityDate="2018-03-04T19:41:32.780" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4401" PostTypeId="1" CreationDate="2018-03-04T19:51:01.870" Score="13" ViewCount="638" Body="&lt;p&gt;I haven't used textbooks in my classes for a number of years. I find that generally it is hard to get students to read them unless you assign homework questions. And I'm not a fan of that method. What I have been doing is making my presentations available online. Students do review them but they are light on detail. Recently I have started writing my own books. They are short - about a third the length the typical textbook - and I am hopeful that they will actually be read. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are others doing? Are you using standard textbooks or no textbook at all or do you write your own materials of some sort to share with students?&lt;/p&gt;&#xA;" OwnerUserId="541" LastEditorUserId="27" LastEditDate="2018-03-05T02:50:28.043" LastActivityDate="2018-09-25T00:21:39.103" Title="Textbooks: Yes, no, roll your own?" Tags="|textbook|" AnswerCount="12" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4402" PostTypeId="2" ParentId="3767" CreationDate="2018-03-04T20:02:39.247" Score="1" Body="&lt;p&gt;I recommend a look at the &lt;a href=&quot;https://k12cs.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;K12 CS Framework&lt;/a&gt;. Also, since this question was originally asked, a number of states have released their own standards. Some examples:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://sde.ok.gov/sde/computer-science-standards&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oklahoma&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.doe.in.gov/standards/science-computer-science&quot; rel=&quot;nofollow noreferrer&quot;&gt;Indiana&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.k12.wa.us/ComputerScience/LearningStandards.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;Washington&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="541" LastEditorUserId="58" LastEditDate="2018-03-04T20:58:02.870" LastActivityDate="2018-03-04T20:58:02.870" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4403" PostTypeId="2" ParentId="4401" CreationDate="2018-03-04T23:01:22.043" Score="7" Body="&lt;p&gt;This is difficult to answer in general. I have personally used a lot of different solutions depending on the course. For low level courses it may make less difference, but maybe not. I still have many of the text books from fifty years ago that I considered important to my development, and have consulted them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are courses in which there are truly classic books: The Dragon Book for compilers, for example, which is dated but still valuable. It would seem a mistake to me to try to teach a class in Scheme without at least one of the two classic books. But there are other courses in which there simply are no textbooks, the material being too recent or in flux. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One reason for &lt;em&gt;not&lt;/em&gt; using your own materials exclusively is that your students get to see a view other than your own. That seems to me to be a good thing in itself. Some of your students might use the exercises or worked examples in a textbook for review and exam preparation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you intend that your materials won't be valuable to them after they leave your course then informal materials are fine, in my view, but if you want them to have a resource that they can use later then make sure that it is one that will stand the test of time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also used extensive materials of my own, but mostly as a supplement to more formal materials. Like you, I seldom referred to the formal text, but it was available to them whenever I was not, including after the end of the course. Think about your student's future, not just their present. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be enough, in some courses, to provide an annotated bibliography including, especially, classic works. But if your students aspire to be professionals in the field (academics or not) then they should build up a library starting in their early years. I'm guessing that you have done that yourself, as I have. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;There are, of course, situations in which the cost of modern textbooks can't be ignored. Providing low cost or free resources may be essential in these situations. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-04T23:33:28.763" LastActivityDate="2018-03-04T23:33:28.763" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4404" PostTypeId="2" ParentId="4401" CreationDate="2018-03-05T02:48:27.107" Score="5" Body="&lt;p&gt;In my experience, students will try to avoid reading even a single full page if they can get away with it.  It has also been my experience that most students don't really know how to learn from text, so that they often need a guided activity that utilizes it.  This isn't merely to get them to engage with text in the first place, but also to focus their efforts while reading it.  Many students won't learn without this kind of guidance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asking for written summaries or short presentations before chapter questions can also help get students to learn this way.  And, as silly as it sounds, reading instruction can be subtly provided at the high school (or even university) level by asking students to identify two or three of the most confusing parts of the text, with a promise that you'll go over any section that confused a sufficient number of kids.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-03-05T02:48:27.107" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4406" PostTypeId="2" ParentId="4401" CreationDate="2018-03-05T14:03:45.777" Score="4" Body="&lt;p&gt;While I like and upped Buffy's answer, I think there's a bit of a pattern that I follow that I'd like to share.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless hardware is specifically involved, or the course is heavy on theory, I prefer to avoid textbook use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I think a particular book will be useful, I may add it to a recommended reading list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For Courses with Emphasis on Hardware:&lt;/strong&gt;&lt;br&gt;&#xA;If there is an emphasis on hardware, it is useful to be able to consult a reference. Diagrams tend to be very useful when discussing hardware implementations or methods. If I use a textbook, then the students have a reference they can consult, instead of just scurrying around the net for diagrams that may be incorrect due to poor google-fu.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, if a textbook is used, I don't have to worry about looking up copyright info for every image I use or distribute. Often this isn't a big deal, but it's one less thing to think about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For Theory-Heavy Classes:&lt;/strong&gt;&lt;br&gt;&#xA;Perhaps theory isn't the best term, because in programming, the theory is so practically useful it feels almost wrong to use the word...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The long and short of it is that some concepts cannot be contained by a block of code. There are some texts out there, written by mountain-top CS gurus, that in a few sentences illustrate concepts that can quite literally change your life, your professional life at a minimum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These concepts are best learned from those texts, and rather than beat around the bush, at least recommend them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But do you actually &lt;em&gt;need&lt;/em&gt; to use them?&lt;/strong&gt;&lt;br&gt;&#xA;After all that, you don't really need to use them.&lt;br&gt;&#xA;I've seen almost every scenario. The class where there were some core concepts that code examples themselves could not contain, where there was no textbook. Students asked for a recommended text, to help them learn the concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen scenarios where there was a textbook, but the course was overly results-driven, concepts were glossed over, and textbooks were ignored and sold off.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Myself, personally, as a poor student, sold a textbook only to regret it a few months later, and I ended up buying it again. That's how important that book was to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not all your students will appreciate a textbook, so perhaps make it a recommended read instead of a hard and fast requirement of your course, then supplement with your own digital notes.&lt;/p&gt;&#xA;" OwnerUserId="4082" LastActivityDate="2018-03-05T14:03:45.777" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4407" PostTypeId="2" ParentId="4401" CreationDate="2018-03-05T15:07:46.630" Score="5" Body="&lt;p&gt;My school district does not buy textbooks anymore.  That has been a policy for at least the last five years.  I do have a very old set of books for Programming I that I will refer to myself, and that I will check out to students who request one, but they rarely ask for one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would guess that this move to a &quot;textbook-less&quot; world will accelerate.  School districts will suppose they are saving money by not buying books.  They will reason that with everything online these days, why do you need a book?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But we still need teaching materials.  The teaching materials provided by my state are typically Powerpoints of varying degrees of quality and effectiveness created by a contractor (sometimes a teacher) who may or may not have known the content.  I often find myself revising and correcting them, or throwing them out completely and starting over.  I also have to create exercises, study guides, and tests for my courses as those are not provided.  The downside to all this creating is that I spend an inordinate amount of time working on course materials outside of class.  The upside is that I know my materials very well since I made them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another positive with the Powerpoint method is that it is very easy to &quot;chunk&quot; lessons into manageable pieces.  I find that many chapters in programming textbooks are extremely long and cover way too much material.  By the time I get to the end of the chapter, I've forgotten what we even started out discussing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether you are using a book or not, it is important to assign reading material from other sources to be accessed outside of class.  I often include links to charts, tables, or articles in my lessons labeled as &quot;recommended reading&quot;.  And I tell my students &quot;it is recommended you read this because you will see something from it on a test&quot;.  Underhanded, yes, but many of them will be motivated to look at the assigned material just for that reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also give my students a list of recommended books to consider for purchase but make it clear they are not required.  Even so, you'd be surprised how many actually end up buying one or more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I miss having a book because I love books.  But are they cost effective?  Do students really understand the gravity and importance of what and why they are studying? Do they use and cherish books?  I'd say at the high school level most don't.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="5065" LastEditDate="2018-06-08T12:53:09.357" LastActivityDate="2018-06-08T12:53:09.357" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4408" PostTypeId="2" ParentId="4193" CreationDate="2018-03-05T15:40:52.710" Score="1" Body="&lt;p&gt;Have you considered a practical example like teaching PGP email encryption?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://keybase.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;Keybase.io&lt;/a&gt; has a browser based crypto solution for doing encryption / decryption and while I don't recommend for &quot;real&quot; crypto, it is a great convenience tool for showing how public/private key encryption works without the need to address pgp tools installed on a machine or access to a key server. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example lesson based scenario would look like:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Explain the basics of &lt;a href=&quot;https://en.wikipedia.org/wiki/Pretty_Good_Privacy&quot; rel=&quot;nofollow noreferrer&quot;&gt;PGP&lt;/a&gt; and Key based Cryptography - the &quot;Art of the Problem&quot; &lt;a href=&quot;https://www.youtube.com/watch?v=YEBfamv-_do&quot; rel=&quot;nofollow noreferrer&quot;&gt;video&lt;/a&gt; linked elsewhere on the answers I agree is the &lt;em&gt;definitive&lt;/em&gt; explanation of the Diffie-Hellman Key Exchange theory. This should be sufficient to work practically with encrypting /decrypting with PGP. &lt;/li&gt;&#xA;&lt;li&gt;Students create a set of keys: public key for sharing, private key for keeping. &lt;/li&gt;&#xA;&lt;li&gt;Students share their public keys in a place where everyone can see them and know who's is who's. This is where Keybase would be&#xA;    useful, but you could also just put them all in a public gist or&#xA;    paste bin. It is safe to share a public key. &lt;/li&gt;&#xA;&lt;li&gt;Students can now use the public keys to send messages to each other and publish the encrypted messages in another public place&#xA;    (same pastebin, eg) or via email.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Some interesting activities and discussions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I decrypt a message meant for me?  &lt;/li&gt;&#xA;&lt;li&gt;What happens if I take a&#xA;message encrypted for someone else and use my private key to decrypt?&lt;/li&gt;&#xA;&lt;li&gt;What practical use cases could this type of encryption (key exchange)&#xA;solve? (TLS/SSL probably the easiest reach). &lt;/li&gt;&#xA;&lt;li&gt;What challenges does&#xA;this type of technology create for law enforcement and regulators to&#xA;protect against fraud or other nefarious activities (terrorism, money&#xA;laundering, etc). How can this type of activity improve the&#xA;transparency and accuracy of information (PGP signatures of code&#xA;commits on open source projects, eg). If there are both nefarious and&#xA;good uses of this technology, how do you decide if it should be&#xA;legal, or illegal to use it?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4401" LastEditorUserId="4401" LastEditDate="2018-03-05T18:50:33.060" LastActivityDate="2018-03-05T18:50:33.060" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4409" PostTypeId="2" ParentId="3695" CreationDate="2018-03-05T15:50:43.363" Score="3" Body="&lt;p&gt;You mention that you are already using ES6, which suggests that package management and complication are not really barrier, though I would expect that many reading this problem are not setup to ensure node and npm are installed and/or may have access to git/ssh protocols for fetching dependencies or projects. So, the first thing I'd point out is that for some readers, compiling TypeScript could be a barrier that reduces is teaching value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second and more relevant point is that JavaScript is dynamically typed language. There is value in tools like Flow and TypeScript, especially in production systems, but there is also a great amount of value learning how to program in a dynamic type system. If you're already teaching Java, there are few better choices to teach strategies, advantages and disadvantages to dynamically typed systems. Some students will prefer that type of programming over strictly typed languages. &lt;/p&gt;&#xA;" OwnerUserId="4401" LastActivityDate="2018-03-05T15:50:43.363" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4410" PostTypeId="1" CreationDate="2018-03-05T22:02:44.847" Score="5" ViewCount="601" Body="&lt;p&gt;Do you allow students to submit &quot;test corrections&quot;?  Meaning, do you allow them to take the questions they missed on a test, denote the correct answer in some way, and give them partial or full credit back if they then get the answer right?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so, why?  If not, why not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering, because I have a colleague who has ALWAYS allowed test corrections in her CS courses for half credit.  I NEVER have.  But this year, for some reason, I am getting a lot of lip from students like &quot;What! No test corrections?!  But Ms. Xxx always let us do test corrections!&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe allowing test corrections (which is essentially a retake) does a disservice to the student because it allows them to be lazy.  They don't do it right the first time. They don't study (or don't study as much as they should have) and depend upon &quot;corrections&quot; to make up for their laziness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My colleague believes allowing test corrections at least forces the student to &quot;discover&quot; correct answers to questions they may have never revisited otherwise, and that therefore they have another opportunity to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I being too hard?  What do you think?  &lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="4338" LastEditDate="2018-03-06T01:31:07.577" LastActivityDate="2018-03-07T19:04:28.570" Title="What are the tradeoffs of allowing students to submit test corrections?" Tags="|best-practice|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4411" PostTypeId="2" ParentId="4410" CreationDate="2018-03-05T22:15:22.540" Score="3" Body="&lt;p&gt;Yes, allow it, but control it a bit. The only reason I didn't permit it on final exams was the lack of time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, you don't have to give full credit to points gained on retakes. I used a rule of about 80-90 percent, which was enough to limit laziness, at least. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that your job is not &lt;em&gt;grading&lt;/em&gt; students, but &lt;em&gt;educating&lt;/em&gt; them. If they get something wrong it gives them an incentive to revisit it immediately and get it right. The reinforcement of both looking and re answering can have a positive effect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not teaching anymore (retired) but would permit redoing work (including tests) even after I'd discussed the task in class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they don't get it right the first time, they need more reinforcement. Make it so. But the small penalty is enough to goad all but the laziest of the flock. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And recall that sometimes the &lt;em&gt;best&lt;/em&gt; students get a question wrong because there is something ambiguous about the asking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like many things in education, you can try this for a while and evaluate the effect. Then make adjustments as needed. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-05T22:15:22.540" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4412" PostTypeId="2" ParentId="4410" CreationDate="2018-03-06T00:03:40.013" Score="3" Body="&lt;p&gt;I don't go in for the notion that students will be perfectly happy to laze around and get partial credit (50% is a very steep penalty!) In lieu of trying to get a genuinely good grade if they feel like they can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't allow test corrections, instead I have a full system of progressively (slightly) harder make-ups which I have &lt;a href=&quot;https://cseducators.stackexchange.com/a/1407/27&quot;&gt;described here&lt;/a&gt; in some depth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the goal is to make sure that students learn the material that you are teaching, then the impulse to create some sort of additional pathway to learning after an assessment makes a lot of sense.  And just after an assessment has gone badly is a perfect time to get strong, focused learning from students who, perhaps, thought they knew the material better than they really did until but a few moments ago. The iron is so hot at that one moment, it's really a pity if you don't strike it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do I say this? Remember that strong emotions are one of the neurological keys to immediate and impactful learning. Thus, there may simply be no other opportunity like this to reach a student who, perhaps, is not entirely in love with the material, but simply wants to do well and get through.  This is that fleeting moment when you can help them understand that idea that they didn't quite get the first time, because this is when they &lt;em&gt;really care&lt;/em&gt;.  They messed up, perhaps badly, and if they &lt;em&gt;really focus right now&lt;/em&gt;, they might be  able to partially fix this.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And maybe, just maybe, you'll get them through a tricky idea that will really help them later.  Such as later in your same course, when they will really need to have already mastered this material if they are going to be to even have a good, fighting chance at the new material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've chosen for myself a very different structure than test corrections, and what I do works very well for me and my students. I might have to recalibrate if I taught a different population. But I suspect that whatever methodology works for you is less important than that you do something meaningful with those failed assessments, because they can be one of the most powerful tools you have, and you ultimately don't get too many of them.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-03-06T00:03:40.013" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4413" PostTypeId="2" ParentId="4249" CreationDate="2018-03-06T15:07:37.623" Score="0" Body="&lt;p&gt;I received a lot of suggestions from this site a few weeks back and wanted to pop back to update you all. &#xA;The Kemeny book is fantastic, although how things have changed in terms of phrasing, examples and general presentation (!!). Its been very helpful though. &#xA;Random but I came across this, a receipt left in the book - dated from 1965, as you can see its in old money too. It had had actually marked the page, it had been there so long. The book was posted to me from the US but I guess its been awhile since this book has been opened. &lt;a href=&quot;https://i.imgur.com/lzWFjuC.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;Very old book&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4137" LastActivityDate="2018-03-06T15:07:37.623" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4414" PostTypeId="2" ParentId="4410" CreationDate="2018-03-06T15:44:56.760" Score="5" Body="&lt;p&gt;Our district has a policy that any student that scores under a 70% must be allowed to retest. You take the retest score, average it with the original, and cap it at 70%.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Catch is that I teach all AP / Honors classes. Typically these aren't students that score a 60% and want to bring their grade up to passing. They're the kind of student that gets 88% and is unhappy they didn't score an A. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I go beyond that and let anyone who wants to do test corrections instead of a retest and they'll get half their points back. We have another AP teacher that does a square root curve if they turn in corrections. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get credit they turn in a document with a screenshot of the question (tests are all in Canvas), explain why they picked the answer they did (sometimes &quot;I guessed&quot; is okay), what the right answer is, and most importantly why it's the right answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;3 reasons why I do corrections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1 - It lets me throw a few harder questions into a test. I start putting in AP style questions early in the year, which students may not be used to. As the year progresses more and more AP style questions get put in. If the longer questions go in, especially early in the year, the tests might be a little too difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2 - I don't really care what they know Tuesday at 10:30. I care what they know when they leave my class at the end of the year. If they can come back after a test and prove they know the material, that's much better than just leaving it unknown.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3 - Everybody has a bad day. Maybe their dog died last night and they're not in a good mindset to take a test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With all that though, I'd rather do retests. Still for half credit. The problem I'm facing with that is I'd essentially need at least one more full test for every unit. Otherwise they're retaking the same test. What I'd really like is to have enough questions banked that students could take a retest 2 or 3 times and I'd average everything together. But that would take hundreds of questions for each unit. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="204" LastEditDate="2018-03-07T19:04:28.570" LastActivityDate="2018-03-07T19:04:28.570" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4415" PostTypeId="2" ParentId="4410" CreationDate="2018-03-06T16:32:47.697" Score="0" Body="&lt;p&gt;&lt;strong&gt;First Two Years - Yes-ish, Juniors: Maybe, Seniors: No&lt;/strong&gt;&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From your profile I see you are teaching high-school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me preface this by saying that I favor practice-tests over test-corrections.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some points:&lt;br&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Test corrections are a security blanket for students who want to&#xA;parlay a 70 into an 85. You will be popular for it.&lt;/li&gt;&#xA;&lt;li&gt;Test corrections will likely never be used by those who need them&#xA;most. Your worst performing students are often your laziest, and the&#xA;kids with the lowest marks will likely not submit test corrections.&lt;/li&gt;&#xA;&lt;li&gt;To follow the previous point, this is a great defense against parents&#xA;offended by your inability to give their child higher grades. They&#xA;could have easily gotten more points, but didn't bother submitting corrections.&lt;/li&gt;&#xA;&lt;li&gt;Test corrections do not work for all types of tests: Multiple-Choice,&#xA;Fill-in-the-blank, anything overly based on memorizing something&#xA;specific. It does apply well when testing concepts and practices.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;On Seniors:&lt;br&gt;&lt;/strong&gt;&#xA;If you are teaching seniors, then no, no test corrections.&lt;br&gt;&#xA;When teaching seniors, you not only need to teach subject material, but also how to survive post-secondary education, which will mercilessly slaughter those who bank on second chances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain to your seniors that you are preparing them for reality, and while they won't be getting murdered by a 20%/80% Midterm/Final combo strike, they'll still have to take their tests seriously.&lt;br&gt;&#xA;&lt;em&gt;However&lt;/em&gt;, I do recommend giving practice tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;For younger students:&lt;br&gt;&lt;/strong&gt; &#xA;I don't see a problem with test-corrections. Of course, I would certainly only offer half-credit, at a maximum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, I would require a write-up explaining why their first attempt was incorrect. If they want to earn some points back, they need to be able to &lt;em&gt;teach&lt;/em&gt; the previously flawed concept back to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Practice Tests:&lt;br&gt;&lt;/strong&gt;&#xA;Do a practice test for half of a class period, then in the second half, grade it as a group. &lt;br&gt;Poll the class: What questions were commonly missed? What misconceptions were present? How &quot;tricky&quot; does the class rate each question? A class of highschoolers loves to comment on how difficult a problem is, or how sinister they believe their teacher is being.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Regarding forcing students from laziness vs allowing them to re-discover:&lt;br&gt;&lt;/strong&gt;&#xA;You are teaching high-school-students. This means you have a very mixed bag.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You absolutely have students who will go on to use none of this at all, you have students who just want to sleep all day and only work on their education later, and you have students who actually want to succeed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, if you gave devastatingly difficult tests with no test-corrections, they are still able to re-discover. The result of one test will not end their academic career. In university, yes, one test could set you back a full year, depending on how your prerequisites are structured. In high-school, no. Getting a bad grade on a test will not kill you, and, you will likely still be using the same concepts throughout the remainder of the year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A test that you cannot re-submit for corrections is &lt;em&gt;not&lt;/em&gt; a closed book.&lt;br&gt;&#xA;It's still a learning opportunity. It still points to areas of improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In CS, it is very rare that a concept will only be used once in a high-school level course, then discarded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student can &lt;em&gt;certainly&lt;/em&gt; learn from their mistakes, to their benefit (using the same tested concepts on a future test or project), without receiving partial marks from a previous test.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later in their academic career, a student will tend to value that &quot;tough&quot; teacher, who was harder to earn points from. I've heard: &lt;em&gt;&quot;The students who took Ms A's class actually know how to do this stuff... I got stuck with Ms B, and we all just slept through class and got perfect on everything...&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Test corrections is not for everyone. If your class is structured in a way that the grades fall where they should fall (instead of everyone getting roughly the same watered-down grade), then you have little motivation for allowing test-corrections beyond popularity. In fact, it could dramatically affect your class ecosystem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, however, you feel motivated to change some things. Consider allowing test-corrections with a low value of extra points awarded for considerable additional effort.&lt;br&gt;&#xA;By doing this, you are rewarding aptitude and effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some teachers feel it's cruel to treat 4th year classes differently from 1st or 2nd year classes, instead favoring consistency.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I see the value in consistency, I place more value on evolution. However, there is certainly value in both styles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If advancing expectations are outside of your teaching style, I'd recommend against introducing a crutch that requires weaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are certainly other ways to allow a student to learn concepts they are deficient in. Ensure you have an avenue for students to learn from their mistakes, and ensure that avenue travels through your teaching style and class format.&lt;/p&gt;&#xA;" OwnerUserId="4082" LastEditorUserId="4082" LastEditDate="2018-03-07T16:56:56.983" LastActivityDate="2018-03-07T16:56:56.983" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4416" PostTypeId="1" CreationDate="2018-03-07T02:11:52.860" Score="4" ViewCount="257" Body="&lt;p&gt;Is there a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cryptographic_hash_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;cryptographic hash function&lt;/a&gt; that well suited for preschool-aged children to work out on pencil and paper, to learn concepts of block chains?&lt;/p&gt;&#xA;&lt;p&gt;It must have the following requirements:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Able to be easily verified&lt;/li&gt;&#xA;&lt;li&gt;Able to be easily calculated with pencil and paper&lt;/li&gt;&#xA;&lt;li&gt;Able to link to previous result, to create blockchain&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The function may be low-complexity. It does not matter if the function is easily broken.&lt;/p&gt;&#xA;" OwnerUserId="4407" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2023-07-05T15:16:57.837" Title="Blockchain cipher suitable for preschoolers" Tags="|resource-request|cryptography|preschool|" AnswerCount="5" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4417" PostTypeId="1" CreationDate="2018-03-07T02:57:10.530" Score="2" ViewCount="128" Body="&lt;p&gt;I'm teaching a student how to create website front ends. This student comes from a SNAP/Scratch/AppLab type environment where they learned basic programming concepts, but to position visual elements they had to either drag and drop or set an x and y coordinate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This student has an issue where they make every HTML element positioned absolutely, so they can specify x and y (with &lt;code&gt;left&lt;/code&gt; and &lt;code&gt;top&lt;/code&gt;). This is not considered &quot;best practice&quot; in HTML and makes modifications to their work challenging, and causes other issues in their work. Generally, this is a bad habit I'd like to break them of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I get this student to understand and utilize the normal document flow instead of just thinking about it as x and y coordinates?&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2018-03-07T14:08:25.093" Title="How to help students comprehend the HTML document flow?" Tags="|best-practice|web-development|front-end|css|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4418" PostTypeId="2" ParentId="4417" CreationDate="2018-03-07T13:56:59.207" Score="5" Body="&lt;h2&gt;Absolute positioning as bad practice&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Referencing the StackOverflow question, &quot;&lt;a href=&quot;https://stackoverflow.com/questions/186044/is-it-considered-bad-practice-to-use-absolute-positioning&quot;&gt;Is it considered bad practice to use absolute positioning?&lt;/a&gt;&quot;, the consensus is, just like nearly everything in CSS, &quot;it depends&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But let's just throw some data at the topic:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;More than 50% of website traffic is presumed to be from a mobile&#xA;device. Using absolute positioning (especially when positioning from&#xA;&lt;code&gt;body&lt;/code&gt;) will impact how mobile viewers see your content. &lt;/li&gt;&#xA;&lt;li&gt;There are&#xA;literally thousands of possible combinations for screen sizes and&#xA;resolutions. Positioing absolutely will break on most viewports.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are the two biggest reasons to rely on document flow as opposed to positioning the elements yourself. But obviously, the student(s) are trying to solve a problem they have with the hammer they have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, maybe instead of trying to convince them &lt;em&gt;not&lt;/em&gt; to, show them how bad it performs under real world situations and provide some alternatives.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Define the problem&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Open a browser like Chrome, and using the bottom left corner of the browser window, resize the window. Elements positioned to flow around constraints will reposition, absolute elements will not.&lt;/li&gt;&#xA;&lt;li&gt;Also in Chrome, open the developer tools and open the &quot;device tool bar&quot;. This will allow you to look at the page in a simulated screen resolution for a number of devices.&lt;/li&gt;&#xA;&lt;li&gt;Visit the web page on the student's phone. Switch the phone between horizontal and vertical views.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Better Practice&lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use a grid. There a number of grids available like those that come standard with &lt;a href=&quot;https://getbootstrap.com/&quot; rel=&quot;noreferrer&quot;&gt;Bootstrap&lt;/a&gt;, but sites like css-tricks.com also have a number of smaller implementations that actually describe the basics of a grid, like &lt;a href=&quot;https://css-tricks.com/dont-overthink-it-grids/&quot; rel=&quot;noreferrer&quot;&gt;this nice one&lt;/a&gt; from Chris Coyer.&lt;/li&gt;&#xA;&lt;li&gt;Be right on the cutting edge and teach &lt;a href=&quot;https://drafts.csswg.org/css-grid/&quot; rel=&quot;noreferrer&quot;&gt;grid layout directives&lt;/a&gt; that are only in draft proposal (but work in some canary browser releases) &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout&quot; rel=&quot;noreferrer&quot;&gt;this other tutorial&lt;/a&gt; on the Mozilla Dev Network.&lt;/li&gt;&#xA;&lt;li&gt;Be less on the cutting edge and teach &lt;a href=&quot;https://www.w3.org/TR/css-flexbox-1/&quot; rel=&quot;noreferrer&quot;&gt;Flex&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Introduce viewports to trigger css changes at certain screen size&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;After some or all of these, reflect by going through browser resizing, etc. explained above.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Some other talking points&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm not sure what kind of project the student is creating, but some other things to consider under certain circumstances:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Their experience with x, y coordinates will help them a lot if they are doing game development or graphics within a &lt;code&gt;canvas&lt;/code&gt; tag or creating SVGs. Discuss when those are appropriate to use in HTML (SVG icons for links under certain viewports, eg).&lt;/li&gt;&#xA;&lt;li&gt;Discuss content visibility and re-flow on devices of different resolution. Moving or hiding information based on user context (are they on &#xA;a desktop with lots of viewable space and a mouse, or are they on an iphone 4 and just want to click the 'buy' button?).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4401" LastActivityDate="2018-03-07T13:56:59.207" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4419" PostTypeId="2" ParentId="4417" CreationDate="2018-03-07T14:08:25.093" Score="4" Body="&lt;p&gt;I'm not sure how you teach these things, but you may have a misconception about learning that is getting in the way. This seems to be common with newer teachers who don't yet show the scars of many student engagements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that you see the relationship between theory and practice fairly clearly. So you explain something to students (possibly at a fairly high, conceptual level) and think that they will be able to make the same connections that you do. But they likely won't, since they don't have your background and experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this particular case, I'd suggest that you give them lots of sample CSS that they can emulate and also (a smaller set) of poor examples and show them the consequences when change is needed. Do this as part of your introduction to creating HTML docs, not as an after-the-action correction. Integrate it into your teaching. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the students will be able to make the leap immediately without this, of course, but many need to learn by example, not by inference. You need to reach all of the students in any teaching situation and all of them learn differently (learning &quot;modalities&quot;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once wrote a book on a topic important to me, but did so soon after becoming thoroughly familiar with it. It was important to me, in that book, to be able to connect with the beginner's mindset before I forgot how hard it was for me to get started with the topic. Teacher's too often forget how hard their own path was and expect others to have an easier time. New teachers also often don't yet realize that their students aren't like themselves, with different motivations and different ways of thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, you need to repeat yourself when teaching, but not in the same words and not with the same tools. Each explanation will, one hopes, reach a large fraction of the students. Each re-teaching (explanation, demonstration, exercise, ...) will likely reach more. Ultimately you want to reach them all, but no one thing will reach more than a fraction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a young teacher I once thought that my explanations were so clear and brilliant that no-one could possibly misinterpret them, and that deep ideas (in this case in Statistics) would become immediately clear to all. In actually, I probably got through to about 5% of them. Luckily I learned not to do that anymore. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-07T14:08:25.093" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4420" PostTypeId="2" ParentId="4401" CreationDate="2018-03-07T17:55:08.760" Score="2" Body="&lt;p&gt;I have been teaching CS/programming for 30 years and I have always had a textbook of some kind for the kids.  But the book is only for reference, not for planned reading.  I use only free textbooks (they are out there if you look) and now most are digital.  I find most textbooks are strong on syntax and weak on program design.  I do not care about syntax because I have no idea what language the kid is going to have to work in in college or job.  I care about design and learning a language quickly by finding and understanding how to read references.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2018-03-07T17:55:08.760" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4421" PostTypeId="2" ParentId="4401" CreationDate="2018-03-07T18:12:40.797" Score="3" Body="&lt;p&gt;We have a class set of textbooks. When I started at this school I was told that I needed to check them out and use them. I talked them down to only issuing me half of the class set and one book went between each pair of computers. They've been in the storeroom for the past 2.5 years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first year we also had codes to give out to students so they could access the same book online at home. I handed out codes to every student - about 125 of them. At the end of the year, about the time the district was deciding if they were going to purchase online codes for the next year, I polled my students how useful they found the online book. 3 out of 125 had gone home and created an account with the code. 1 of those 3 ever logged in again after creating the account. I didn't hand out codes the next year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kids are sitting in front of a computer. If they need something for reference it's easier to Google it than to try to find it in a book. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think that using online resources, especially ones that I don't curate, gives them the chance to work out what resources are valid and which are not. When I have used a textbook students tend to take what's in the book as the gospel; that it's the only way to do something. If they find something online they're much more likely to doubt it and work through whether it's actually a valid resource. Not directly a CompSci skill, but a really good skill to learn. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2018-03-07T18:12:40.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4422" PostTypeId="2" ParentId="4416" CreationDate="2018-03-07T19:21:46.657" Score="3" Body="&lt;p&gt;A simple hash algorithm is modulo or remainder (they are the same for positive numbers). You only need be able to count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To calculate $n$ modulo $m$, take $m$ empty pots, and $n$ marbles. Place one marble in front of each pot, then put the marbles in the pots, and repeat until you do not have enough marble for each pot, count the marbles that are in-front of the pots (that is the answer).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In is &lt;strong&gt;not&lt;/strong&gt; a cryptographic hash, but it is a hash. I doubt that you will be able to do a crypto hash at this age.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another algorithm, would be horizontal and vertical parity. (not very hashy, but related) see CS unplugged. &lt;a href=&quot;https://www.youtube.com/watch?time_continue=210&amp;amp;v=FnwBratAhfg&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?time_continue=210&amp;amp;v=FnwBratAhfg&lt;/a&gt; and &lt;a href=&quot;https://csunplugged.org/en/topics/error-detection-and-correction/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csunplugged.org/en/topics/error-detection-and-correction/&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-03-07T19:21:46.657" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4423" PostTypeId="2" ParentId="4416" CreationDate="2018-03-07T20:29:36.133" Score="4" Body="&lt;p&gt;If all you want is a simple hash function you could do something like this. &#xA;First take your original message and apply something like &lt;a href=&quot;https://en.wikipedia.org/wiki/ROT13&quot; rel=&quot;nofollow noreferrer&quot;&gt;ROT 13&lt;/a&gt; to it. This gives a reversible cipher, of course. Then give each letter a number, say N = 1, O = 2, etc, wrapping after Z. Next, just add up all of those values. It is no longer a reversible cipher, but a hash. To get it to be fixed length, simply pad or truncate it to, say, five digits. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pretty bad cryptography, of course, but simple enough if the students can count and add. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The use in a blockchain is up to you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This hash has the features described here: &lt;a href=&quot;https://en.wikipedia.org/wiki/Cryptographic_hash_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Cryptographic_hash_function&lt;/a&gt;, but they aren't very strong, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fixed Length&lt;br&gt;&#xA;Deterministic&lt;br&gt;&#xA;Easy to Compute&lt;br&gt;&#xA;Infeasible to Reverse&lt;br&gt;&#xA;Change in the Message changes the Hash (not a lot, though)&lt;br&gt;&#xA;Infeasible to Generate a false message with the same Hash (maybe). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Call it the puppy-1 hash function if you like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course ROT-13, like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Caesar_cipher&quot; rel=&quot;nofollow noreferrer&quot;&gt;Caesar Cipher&lt;/a&gt;, has some historical interest. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In the first part, ignore case, punctuation, spaces, etc., which isn't sufficient in general, but should be for this use. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-07T20:29:36.133" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4424" PostTypeId="2" ParentId="4401" CreationDate="2018-03-08T18:45:52.383" Score="2" Body="&lt;p&gt;Depends on how you define textbook, the subject, how many students and if it is a custom made class for a single student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I work with high school students if the class is a group of students learning their first programming language then no I would not use a regular textbook as I have to agree they won't read it unless it helps them for a quiz or test. What I do use for teaching them Python 3 is &lt;a href=&quot;https://runestone.academy/runestone/static/thinkcspy/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to Think Like a Computer Scientist: Interactive Edition&lt;/a&gt;. I encourage them to read the book on their own time but most don't. The best thing about this book is that it is interactive in that the students can run the code from in the book and you can customize the book to your needs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the subject is more advanced and there is a standard book that everyone uses then yes I would use a textbook, e.g for Analysis of Algorithms the standard is &lt;a href=&quot;http://www.worldcat.org/oclc/1020553375&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Algorithms&lt;/a&gt; by Thomas H Cormen; Charles E Leiserson; Ronald L Rivest, or &lt;a href=&quot;http://www.worldcat.org/oclc/770866932&quot; rel=&quot;nofollow noreferrer&quot;&gt;Prolog Programming for Artificial Intelligence&lt;/a&gt; by Ivan Bratko&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the class is a custom class and the subject is so highly specialized that no good book exist then I would use other means. For teaching Minecraft Modding I used an online &lt;a href=&quot;http://shadowfacts.net/tutorials/&quot; rel=&quot;nofollow noreferrer&quot;&gt;tutorial&lt;/a&gt; and a &lt;a href=&quot;https://www.youtube.com/watch?v=Nz0FHNVtZNc&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube&lt;/a&gt; video. Yes there is a &lt;a href=&quot;http://www.worldcat.org/oclc/931588156&quot; rel=&quot;nofollow noreferrer&quot;&gt;book&lt;/a&gt; or two on the subject but they are out of date already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also with custom classes I use inter-library loan books to prep the class and review the material out there. The days of browsing the book store to learn something about programming or purchase a book on-site are long past and while there is the internet, the signal to noise ratio on some subjects just is not worth the effort when borrowing books works better. I typically have to wait a week for the books, but the wait is worth the return.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the AP Java class see &lt;a href=&quot;https://runestone.academy/runestone/static/JavaReview/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java Review for the AP CS A Exam&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The e-books I referenced are from &lt;a href=&quot;https://runestone.academy/runestone/static/overview/overview.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Runestone Academy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On those special days we play &lt;a href=&quot;http://store.steampowered.com/tags/en/Puzzle/&quot; rel=&quot;nofollow noreferrer&quot;&gt;puzzle video games&lt;/a&gt;, see other &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3957/engagement-advice-on-creative-computing/4043#4043&quot;&gt;answer&lt;/a&gt; for list of specific games.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-03-08T18:53:01.630" LastActivityDate="2018-03-08T18:53:01.630" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4425" PostTypeId="1" AcceptedAnswerId="4431" CreationDate="2018-03-09T15:17:03.777" Score="144" ViewCount="92166" Body="&lt;p&gt;Which conversion should I teach to my undergrad students? That 1 kB is 1024 bytes (binary) as everyone learned back in the nineties or the recent industry-led &quot;friendly&quot; conversion that says that 1 kB is in fact 1000 bytes (decimal)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My immediate feeling goes toward the binary conversion, but when &lt;a href=&quot;https://physics.nist.gov/cuu/Units/binary.html&quot; rel=&quot;noreferrer&quot;&gt;IEC says otherwise&lt;/a&gt; and major OSs decide for the decimal conversion (Mac OS X ≥ 10.6 and Ubuntu ≥ 10.10 now use the SI prefixes exclusively to refer to powers of 1000) I'm not so sure anymore. &lt;/p&gt;&#xA;" OwnerUserId="4340" LastEditorUserId="8651" LastEditDate="2020-01-04T12:07:22.300" LastActivityDate="2020-01-04T12:07:22.300" Title="Should I teach that 1 kB = 1024 bytes or 1000 bytes?" Tags="|best-practice|architecture|" AnswerCount="13" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="4426" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T15:30:15.110" Score="56" Body="&lt;p&gt;Actually, you need to teach them both so that they are warned that the usage is not consistent. Then you can choose one as a standard in your course going forward. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which you choose depends a bit on what you are teaching. If it is how to evaluate hard drives, etc. then $K = 1000$ works now. For most programming, however, $K = 2^{10} = 1024$ is probably best. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly, the dual meanings is likely due to manufacturers trying to &lt;em&gt;avoid&lt;/em&gt; confusion in the minds of unsophisticated customers. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2018-03-10T10:16:46.823" LastActivityDate="2018-03-10T10:16:46.823" CommentCount="21" ContentLicense="CC BY-SA 3.0" />
  <row Id="4427" PostTypeId="1" AcceptedAnswerId="4428" CreationDate="2018-03-09T18:09:57.720" Score="83" ViewCount="18118" Body="&lt;p&gt;A fellow teacher of mine is teaching &quot;basic algorithms&quot; course in high school, and we have quite conflicting opinions when it comes to &lt;code&gt;return&lt;/code&gt;ing from functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She restricts &lt;code&gt;return&lt;/code&gt; only to the end of the function, and permits no other way to escape functions. No block guards, too, and no breaking loops using &lt;code&gt;return&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear, the approach she teaches her student with is &quot;Single Entry, Single Exit&quot;, when the exit is at the function's end and does not break a loop (instead she prefers using flags, even though sometimes in my opinion it makes the code messier).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In contrast, I prefer teaching my students the option to return early and how it affects their code and flow, and let them decide by themselves what they think is right to do. The criteria guidelines I usually teach are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do you return early because of your functions logic, or because you were given an exceptional parameter/erroneous parameter? If we're talking about the latter, &lt;em&gt;it is ok to return.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Are you able to avoid returning in the middle without the cost of changing your whole control flow? If not, &lt;em&gt;it is ok to return.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Will avoiding returning early add unnecessary nesting levels to the function? If so, &lt;em&gt;it is ok to return.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is it a wrong approach, giving your students the choice? Or is it wrong to force them never to return early?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; the answers suggested some very interesting difference between many languages. We are teaching C#, which is a high level language, so I wasn't considering &lt;code&gt;jmp&lt;/code&gt;s of assembly or lower level C's deallocation of resources.&lt;/p&gt;&#xA;" OwnerUserId="77" LastEditorUserId="3472" LastEditDate="2018-03-13T14:53:39.280" LastActivityDate="2022-05-19T20:06:02.767" Title="Is it bad to force my students not to return early?" Tags="|best-practice|secondary-education|" AnswerCount="11" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4428" PostTypeId="2" ParentId="4427" CreationDate="2018-03-09T18:32:12.223" Score="149" Body="&lt;p&gt;Actually returning early should be the norm. Return as soon as you can. There are at least two reasons for this, of which the first, efficiency, is the least important. But if you return early then needless statements won't be executed. Nor will you need to devise some special code to get to the end just so that you can return. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the biggest and most important reason for returning early is that the programmer can put a limit on what she/he needs to retain mentally about the state of the computation. This is especially helpful in a sequential if situation. There is actually an Elementary Pattern about this (&quot;Return, not else&quot;) that says that if you know what should be returned at the end of an if block, don't use an else, but instead end the block with the return. The reader/writer/updater then gets to ignore the previous state and start over in their thinking process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you return only at the end, say &quot;return result;&quot; then you have to track all changes to &lt;em&gt;result&lt;/em&gt; that might occur anywhere in the function/method. You have to understand it &quot;as a whole&quot; rather than incrementally. But the reading itself is normally sequential and incremental. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course if you always write three statement methods, this won't occur, but few have the discipline to really do that. Sadly, some programmers can't understand their own code when it contains very many nested structures and tests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also note that this is somewhat related to the idea that we generally try to avoid global variables in programming. Too much extraneous information can impinge on understanding. Being able to comprehend a program &quot;one block at a time&quot; without reference to others, even containing blocks, is a big advantage. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Caveat. Of course, the code should be as clear as possible. If returning late makes it clearer, I wouldn't &lt;em&gt;forbid&lt;/em&gt; it. But I think that is seldom the case. Forbidding early returns, however, is counterproductive. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-09T18:54:03.780" LastActivityDate="2018-03-09T18:54:03.780" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4429" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T19:11:06.997" Score="0" Body="&lt;p&gt;“Which conversion should I teach to my undergrad students?”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are these engineering related undergrads?  If yes, I'd with 1024, based on binary math as that is what engineering is based on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can count off the bits on your fingers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;$1$ finger = $2$ states, 0 and 1.&lt;/li&gt;&#xA;&lt;li&gt;$2,4,8,16,32,64, 128, 256, 512, 1024$.  The highest decimal value that can be realized is 1 less, while the number of states represented is $2^x$ list.&lt;/li&gt;&#xA;&lt;li&gt;$2^1 -1 = 1$. Therefore  0,1&lt;/li&gt;&#xA;&lt;li&gt;$2^2 - 1 = 3$. Therefore 0,1,2,3&lt;/li&gt;&#xA;&lt;li&gt;$2^3 - 1 = 7$. Therefore 0,1,2,3,4,5,6,7&lt;/li&gt;&#xA;&lt;li&gt;etc. up to $2^8 - 1 = 255$. Therefore 256 states, from 0 to 255.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Manufacturers may advertise as 2.2TB, but the operating system will report it as 2TB, or maybe even 2TB usable.&lt;/p&gt;&#xA;" OwnerUserId="4419" LastEditorUserId="204" LastEditDate="2018-03-10T10:23:38.223" LastActivityDate="2018-03-10T10:23:38.223" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4430" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T19:12:30.803" Score="5" Body="&lt;p&gt;Teach them that without context, you don't know because there most certainly are people out there who will use k to mean 1000 and others who will use k to mean 1024.  Which is &lt;em&gt;right&lt;/em&gt; is not relevant because both usages &lt;em&gt;are&lt;/em&gt; out there.  This leaves any use of &quot;k&quot; with bytes ambiguous unless whoever gave the number also specified what they meant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason I'd recommend that you teach that when giving a value in bytes, always use an &lt;a href=&quot;https://physics.nist.gov/cuu/Units/binary.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;IEC prefix&lt;/a&gt; like Ki instead.  10 kB is ambiguous, 10 KiB is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can declare certain usages are &quot;wrong&quot; all we want, and I'm not saying that is necessarily unjustified, but that doesn't make those usages go away.&lt;/p&gt;&#xA;" OwnerUserId="4420" LastEditorUserId="4420" LastEditDate="2018-03-13T21:54:23.857" LastActivityDate="2018-03-13T21:54:23.857" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4431" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T19:30:44.920" Score="193" Body="&lt;p&gt;You should teach both, and you probably want to use the binary unit. When you are talking about the difference, it may be helpful to tell them about how to tell the difference when reading them:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SI kilo- is &lt;strong&gt;k&lt;/strong&gt;:&lt;br&gt;&#xA;$1\ \text{kB (kilobyte)} = 10^{3}\ \text{bytes} = 1000\ \text{bytes}$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the binary kibi- is &lt;strong&gt;Ki&lt;/strong&gt;:&lt;br&gt;&#xA;$1\ \text{KiB (kibibyte)} = 2^{10}\ \text{bytes} = 1024\ \text{bytes}$  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I notice that you used KB in your question to refer to both sizes; perhaps you should also point out that KB could be interpreted as either of these prefixes (though &lt;a href=&quot;https://en.wikipedia.org/wiki/Kilobyte#1024_bytes&quot; rel=&quot;noreferrer&quot;&gt;Wikipedia suggests&lt;/a&gt; it is most often used in place of KiB). In your position, I would suggest clarifying which one you mean if you use this notation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(While you're going over confusing units, a related difference in writing units is that lowercase b is bits, uppercase B is bytes; an eightfold difference is much more significant than 2.4%.)&lt;/p&gt;&#xA;" OwnerUserId="4418" LastEditorUserId="58" LastEditDate="2018-03-11T16:16:51.920" LastActivityDate="2018-03-11T16:16:51.920" CommentCount="37" ContentLicense="CC BY-SA 3.0" />
  <row Id="4433" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T20:08:59.423" Score="70" Body="&lt;p&gt;You should teach them it's &lt;a href=&quot;https://xkcd.com/394/&quot; rel=&quot;noreferrer&quot;&gt;messed up beyond repair&lt;/a&gt;, and it's their generation's job to teach the next generation to use the &lt;a href=&quot;https://en.wikipedia.org/wiki/Binary_prefix#mebi&quot; rel=&quot;noreferrer&quot;&gt;silly-sounding standard prefixes&lt;/a&gt;, so that when they finally retire (and the current old-timers are more permanently removed from the argument), there can finally be a consensus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the matters currently stand, all the prefixes are unknowable without context. A networking megabit is $10^6$ bits, a filesystem megabyte is $2^{20}$ bytes, a hard drive megabyte is somewhere pretty close to $10^6$ bytes, and a megapixel is &quot;probably a million pixels, who cares.&quot;&lt;/p&gt;&#xA;" OwnerUserId="4424" LastActivityDate="2018-03-09T20:08:59.423" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4434" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T21:10:14.493" Score="-1" Body="&lt;p&gt;In my 26 years as a professional software engineer I have never encountered KB to mean anything other than 1024. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach them whatever definitions you like and make sure that they know that 1024 is the only useful one.&lt;/p&gt;&#xA;" OwnerUserId="4429" LastEditorUserId="4429" LastEditDate="2018-03-10T00:50:20.843" LastActivityDate="2018-03-10T00:50:20.843" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4435" PostTypeId="2" ParentId="4416" CreationDate="2018-03-09T21:42:52.933" Score="1" Body="&lt;p&gt;Pick your first word from the sentence to hash.&#xA;Look it up in a dictionary and write down the first word of the description.&#xA;Pick the next word and look it up. Write down the second word from the description.&#xA;Do this repeatedly and wrapping around from start to finish of the description as many times as necessary depending on the position of the word.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A weak hash function for text.&lt;/p&gt;&#xA;" OwnerUserId="4429" LastActivityDate="2018-03-09T21:42:52.933" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4436" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T22:47:06.147" Score="12" Body="&lt;p&gt;I've worked in IT professionally since the mid-1980s. My current practice is to &lt;em&gt;write&lt;/em&gt; whichever of e.g. KB or KiB that I mean at the time, with KB meaning $10^3$ and KiB meaning $2^{10}$. If I'm talking about the RAM in a machine I'll write e.g. &quot;64MiB&quot; and if I'm talking about the as-manufactured and as-marketed size of a disk drive I'll write &quot;1TB.&quot; I am &lt;em&gt;not&lt;/em&gt;, however, prepared to use words like &quot;mebibyte&quot; in conversation. Maybe one day I'll change my verbal abbreviations from e.g. &quot;meg&quot; to &quot;meb&quot; but I'm not there yet.&lt;/p&gt;&#xA;" OwnerUserId="4434" LastEditorUserId="204" LastEditDate="2018-03-10T10:18:53.173" LastActivityDate="2018-03-10T10:18:53.173" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4437" PostTypeId="2" ParentId="4425" CreationDate="2018-03-09T23:54:04.627" Score="24" Body="&lt;p&gt;The difference between providing your students with a proper discussion of this topic, and simply teaching them &lt;em&gt;one or the other&lt;/em&gt;, is the difference between being a real educator and being a reciter of factoids.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is no single correct definition of KB for you, then why would you instill something different in your students? The answer to your question is thus obvious in its formation. Your responsibility as a teacher is to convey an understanding of the issue, not to boil it down to one-or-another fact that you know to be less-than-true.&lt;/p&gt;&#xA;" OwnerUserId="4443" LastActivityDate="2018-03-09T23:54:04.627" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4438" PostTypeId="2" ParentId="4427" CreationDate="2018-03-10T00:11:15.673" Score="52" Body="&lt;p&gt;Teach your students about the &lt;code&gt;return&lt;/code&gt; early philosophy. Teach your students about the single &lt;code&gt;return&lt;/code&gt; philosophy. Tell them this debate is not settled. Explain to them that different software development teams have different opinions and different standards, and that it's important for them to have both these tools in their toolbox for their jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Explain the risks of each:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Return early can result in mistakes where the function is modified so that something that should happen unconditionally doesn't or only happens under the wrong conditions.&lt;/li&gt;&#xA;&lt;li&gt;Single return carries the risk that a change that should happen only conditionally might be accidentally made unconditionally or under the wrong conditions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Both of these risks are greater if the function is particularly long or complex or if the change is a state modification (e.g., database commit). Explain to them that this is a good reason to prefer shorter functions and stateless code when feasible. The important thing is to make the code easier to understand and easier to modify without making mistakes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now let them decide when they write their own code. Then give them an assignment to modify their code that carries these risks and let them try it out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also use it as a chance to caution them about being dogmatic in software design. Writing software is full of things where there's no clear cut, &lt;em&gt;always&lt;/em&gt; right answer. The right choice very often depends on the specific situation and sometimes even the culture of a particular team.&lt;/p&gt;&#xA;" OwnerUserId="981" LastEditorUserId="981" LastEditDate="2018-03-10T00:26:12.280" LastActivityDate="2018-03-10T00:26:12.280" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4439" PostTypeId="5" CreationDate="2018-03-10T00:48:15.877" Score="0" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Cryptography&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cryptography&lt;/a&gt; is the study of techniques for information security with a mathematical foundation. This includes encryption methods for message confidentiality as well as hash and signature methods for message integrity and confidentiality, and more. Cryptography also includes the study of communication protocols with respect to their security properties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use this tag for questions related to teaching cryptography, including its mathematical foundations as well as its applications to &lt;a href=&quot;/questions/tagged/security&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;security&amp;#39;&quot; rel=&quot;tag&quot;&gt;security&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="124" LastEditorUserId="124" LastEditDate="2018-03-10T10:56:42.540" LastActivityDate="2018-03-10T10:56:42.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4440" PostTypeId="4" CreationDate="2018-03-10T00:48:15.877" Score="0" Body="Questions related to teaching about various aspects of cryptographic algorithms and protocols." OwnerUserId="124" LastEditorUserId="150" LastEditDate="2018-03-10T10:56:07.520" LastActivityDate="2018-03-10T10:56:07.520" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4441" PostTypeId="2" ParentId="4425" CreationDate="2018-03-10T00:49:03.880" Score="6" Body="&lt;p&gt;I am adding a second answer to clarify some issues with the question and to clear the obvious confusion in the answers.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The question incorrectly states that the linked IEC communication recommends KB to mean 1000. The link refers to 'kilo' only.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;kB may mean the SI kilobyte, I.e. 1000 bytes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;KB does and has always meant 1024 bytes. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Number 3 is essentially the only useful definition in software engineering.Note that the K is capitalized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also KiB which is equivalent to KB. Note that the kilo word is always represented by small k. For OP to teach KB as 1000 ever is always flat wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above does not apply to MB and higher. There the usage is ambiguous and depends on context.&lt;/p&gt;&#xA;" OwnerUserId="4429" LastEditorUserId="4429" LastEditDate="2018-03-10T07:36:58.857" LastActivityDate="2018-03-10T07:36:58.857" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4442" PostTypeId="2" ParentId="4427" CreationDate="2018-03-10T01:26:03.500" Score="34" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Is it a wrong approach, giving your students the choice? Or is it wrong to force them never to return early?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a false dichotomy.  Sometimes multiple returns are clearer, and sometimes (rarely) a single return is clearer.  You should encourage (&amp;quot;force&amp;quot; is a rather strong word) your students to use the technique which makes the most sense for any given scenario.&lt;/p&gt;&#xA;&lt;p&gt;There is one, very specific, situation where &amp;quot;one entry, one exit&amp;quot; makes sense, but it is not something you should expose to beginners, and it is also most likely not what your colleague is talking about.  It may still make sense to show at more advanced levels, for students who might (for example) submit pull requests to Linux or Git.&lt;/p&gt;&#xA;&lt;p&gt;The problem, you see, is C.  C does not have any of the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;C++'s destructors and RAII.&lt;/li&gt;&#xA;&lt;li&gt;Java's try-with-resources.&lt;/li&gt;&#xA;&lt;li&gt;Python's &lt;code&gt;with&lt;/code&gt; statement and context managers.&lt;/li&gt;&#xA;&lt;li&gt;Go's &lt;code&gt;defer&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;C#'s &lt;code&gt;using&lt;/code&gt; and &lt;code&gt;IDisposable&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;finally&lt;/code&gt; block, from numerous languages with exceptions including most of the above.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As a result, the organization of cleanup code in C is quite different from higher-level languages.  Essentially, the typical way to do cleanup in C is like this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int read_some_type(char *filename, struct some_type *result){&#xA;    int rc = 0;&#xA;    if(!result){&#xA;        rc = -1;&#xA;        goto out;&#xA;    }&#xA;    int fd = open(filename, O_RDONLY);&#xA;    if(fd == -1){&#xA;        rc = -1;&#xA;        goto out;&#xA;    }&#xA;    // Normally we'd allocate this on the stack; assume struct some_type is huge.&#xA;    char *str = malloc(sizeof(struct some_type));&#xA;    if(!str){&#xA;        rc = -1;&#xA;        goto out_open;&#xA;    }&#xA;    ssize_t size;&#xA;    size_t total = 0;&#xA;    while(total != sizeof(struct some_type)){&#xA;        size = read(fd, &amp;amp;str[total], total - sizeof(struct some_type));&#xA;        if(size &amp;lt;= 0){&#xA;            rc = -1;&#xA;            goto out_malloc;&#xA;        }&#xA;        total += size;&#xA;    }&#xA;    memcpy(result, str, sizeof(struct some_type));&#xA;out_malloc:&#xA;    free(str);&#xA;out_open:&#xA;    close(fd);&#xA;out:&#xA;    // This is strictly unnecessary, but we could add code here in the future.&#xA;    // For example, we might check errno and call perror(3) or similar.&#xA;    return rc;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Needless to say, this is &lt;em&gt;not&lt;/em&gt; &amp;quot;using a flag&amp;quot; as your colleague is suggesting.  Converting the above example into a flag-based design will result in an excess of &lt;code&gt;if&lt;/code&gt; statements, which are too numerous here already.  More importantly, it would require the reader to keep track of the flags' states for more than a line or two, which is greatly harmful to readability.&lt;/p&gt;&#xA;&lt;p&gt;Moving the cleanup into helper functions is more promising but still infeasible, because:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You need a helper function for each managed resource, in each main function that needs to manage a resource, plus another helper function for any cleanup code that needs to execute unconditionally.&lt;/li&gt;&#xA;&lt;li&gt;Helpers do not automatically inherit the state of their callers and a lot of state may need to be passed around.&lt;/li&gt;&#xA;&lt;li&gt;The information about which helpers imply which other helpers, and which order the helpers need to be called in, is either repeated throughout the function body and prone to transcription errors, or else the helpers call each other in a chain and must pass around &lt;em&gt;even more&lt;/em&gt; state.&lt;/li&gt;&#xA;&lt;li&gt;Reading the cleanup code sequentially at the end of the function is intuitively straightforward.  Helpers require human context-switching to properly understand.&lt;/li&gt;&#xA;&lt;li&gt;Functions must have names.&lt;/li&gt;&#xA;&lt;li&gt;Functions invite reuse, which invites tight coupling between the cleanup code of unrelated modules of the system.  If there really &lt;em&gt;is&lt;/em&gt; some lower-level logical operation which needs to be performed in multiple places, then that might make sense as a helper function.&lt;/li&gt;&#xA;&lt;li&gt;The cleanup blocks are often one-liners, such as &lt;code&gt;close(fd)&lt;/code&gt;.  You cannot meaningfully extract that into a helper, because your helper would just be the &lt;code&gt;close()&lt;/code&gt; function with a different name.&lt;/li&gt;&#xA;&lt;li&gt;This function is doing one logical operation (read a &lt;code&gt;struct some_type&lt;/code&gt; from a file and extract it into an object in memory).  Breaking it apart into several functions means each helper is no longer performing a single logical operation.  This is both philosophically and pedagogically objectionable, and also harder to read.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is one of the few situations in which you truly &lt;em&gt;need&lt;/em&gt; to use &lt;code&gt;goto&lt;/code&gt; in order to keep code readable and maintainable.  Since your students might not otherwise be exposed to that kind of situation, it's worth working through a real example, which you might find in Git, Linux, or any sufficiently large and &amp;quot;interesting&amp;quot; C library or application.&lt;/p&gt;&#xA;" OwnerUserId="1896" LastEditorUserId="2047" LastEditDate="2020-10-05T21:51:12.763" LastActivityDate="2020-10-05T21:51:12.763" CommentCount="17" ContentLicense="CC BY-SA 4.0" />
  <row Id="4443" PostTypeId="5" CreationDate="2018-03-10T01:29:07.280" Score="0" Body="&lt;p&gt;Young children do some things very naturally. Language, of course, is the most important example. But some Computer Science ideas might be introduced early on so that they have some basic familiarity before they start school and have to study them more formally. Certainly mobile devices and communication are known to very young children. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-10T01:29:07.280" LastActivityDate="2018-03-10T01:29:07.280" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4444" PostTypeId="4" CreationDate="2018-03-10T01:29:07.280" Score="0" Body="Some Computer Science topics can be taught to very young children, often by their parents. Use this tag for questions related to teaching simple concepts to youngsters before they start formal education. Sorting, for example, might be amenable to young people. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-10T01:29:07.280" LastActivityDate="2018-03-10T01:29:07.280" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4445" PostTypeId="2" ParentId="4425" CreationDate="2018-03-10T01:44:28.480" Score="2" Body="&lt;p&gt;Teach them both but focus on 1024 in problems. They'll need to convert bandwidth, etc in networking and other courses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Converting using 1000 is easy but 1024 is tricky so focus on that, the knowledge will help them in computer architecture, assembly and networking courses. They'll have to work with it someday so get them ready&lt;/p&gt;&#xA;" OwnerUserId="4448" LastActivityDate="2018-03-10T01:44:28.480" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4446" PostTypeId="2" ParentId="4425" CreationDate="2018-03-10T10:39:30.307" Score="18" Body="&lt;p&gt;Yes I agree with other answers, teach both, and also note the similarity.&lt;/p&gt;&#xA;&lt;h1&gt;The difference&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{ki} = 1024 = 2^{10}$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{k} = 1000 = 10^3$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{k}, \text{M}, \text{G}, \text{T}, \text{P}$&lt;/span&gt; is sometimes used to mean &lt;span class=&quot;math-container&quot;&gt;$\text{ki}, \text{Mi}, \text{Gi}, \text{Ti}, \text{Pi}$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;The similarity&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$1 = \text{k}^0$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$1 = \text{ki}^0$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{k} = \text{k}^1$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{ki} = \text{ki}^1$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{M} = \text{k}^2$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{Mi} = \text{ki}^2$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{G} = \text{k}^3$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{Gi} = \text{ki}^3$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{T} = \text{k}^4$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{Ti} = \text{ki}^4$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{P} = \text{k}^5$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{Pi} = \text{ki}^5$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{E} = \text{k}^6$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\text{Ei} = \text{ki}^6$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Quick maths&lt;/h1&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$64\text{ bits} = ( 6 \times 10 + 4 ) \text{ bits} = \text{ki}^6 \times 2^{4} = 16\text{ Ei addresses}$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;This has some similarity and some difference with the base 10 system that they (should) know. First we break it into blocks of 10 (instead of 3), the remainder we just convert to base 10, the rest is the same.&lt;/p&gt;&#xA;&lt;h1&gt;Where used (mainly)&lt;/h1&gt;&#xA;&lt;p&gt;It is important to show where the 2 systems are used. While some answers say that they have never seen the &lt;span class=&quot;math-container&quot;&gt;$1000$&lt;/span&gt; based SI system used in computing. It turns out that the SI system is used a lot, depending on what is being measured.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;IEC 60027-2 A.2 and ISO/IEC 80000 e.g. &lt;span class=&quot;math-container&quot;&gt;$\text{ki}$&lt;/span&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;measures of primary memory: RAM, RAM, cache.&lt;/li&gt;&#xA;&lt;li&gt;measure of file sizes, partition sizes, and disk sizes within OS.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;SI units e.g. &lt;span class=&quot;math-container&quot;&gt;$\text{k}$&lt;/span&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;measures of secondary memory devices: hard-disks, SSDs.&lt;/li&gt;&#xA;&lt;li&gt;network speeds.&lt;/li&gt;&#xA;&lt;li&gt;CPU / memory / bus speeds.&lt;/li&gt;&#xA;&lt;li&gt;all other speeds.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However the use of symbol &lt;span class=&quot;math-container&quot;&gt;$\text{ki}$&lt;/span&gt; is at this time not always used.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;see also &lt;a href=&quot;https://en.wikipedia.org/wiki/Binary_prefix&quot; rel=&quot;noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Binary_prefix&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-13T20:12:05.390" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="4447" PostTypeId="2" ParentId="4427" CreationDate="2018-03-10T13:45:34.860" Score="13" Body="&lt;p&gt;When I learnt Eiffel, I realised that a single return at the end of a function is the way to go. Eiffel does not have a return. You just set the value of the Result variable, and it is returned at the end of the function. The Eiffel style of programming makes this natural.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I learnt Scheme, I realised that return early was the way to go. In scheme we created cases, and each case would return a different result. The scheme style of programming makes this natural.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I program in other languages, I use one or the other, depending on my needs. However I &lt;strong&gt;Use one or the other&lt;/strong&gt; I don't use something in between. Therefore either do a switch-case-return, or return at end. In between is a mess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For teaching. Remember there is more than one correct way. You will probably want to teach one at a time. And it would be better to choose a language than supports the style that you are teaching. (There are however infinitely more incorrect/bad ways to do it. I am not saying that all ways are good, just that there are more than one).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-03-10T13:45:34.860" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4448" PostTypeId="1" CreationDate="2018-03-11T00:45:39.307" Score="5" ViewCount="199" Body="&lt;p&gt;Most of the students like the analogy way of teaching things. But I am biased towards the formal way along with a little bit of analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, (to make simple) in order to teach about a set to the students who don't have any clue about it, I start by saying&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A set is an unordered, well defined &lt;strong&gt;collection of elements&lt;/strong&gt;, in which&#xA;  repetition doesn't matter.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then going with examples of what is a set and what is not. But over time I found that people tend towards analogies, more than formal. I have no issue with analogies and I also do it. But they tend to forget the basic definition and facing problems while doing mathematical analysis.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Colleagues suggest that students can find formal definitions through textbooks and hence reduce burden of teaching too formally by referring corresponding textbooks and focus on motivation and surface teaching only. But I am not at all satisfied by it because in CS, things only work by formal definitions, not (only) by analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do? Continuing or discontinuing on stress formalising?&#xA; (Consider time limitations)&lt;/p&gt;&#xA;" OwnerUserId="4507" LastEditorUserId="1293" LastEditDate="2020-05-31T15:26:04.677" LastActivityDate="2020-05-31T15:26:04.677" Title="Is stressing too much on formalism acceptable?" Tags="|lesson-ideas|struggling-students|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4449" PostTypeId="2" ParentId="4448" CreationDate="2018-03-11T01:56:23.070" Score="3" Body="&lt;p&gt;I'll vote with your colleagues here. I don't know anything about you or your teaching experience, but if you are new at it you should realize that a common error made by new teachers is that their students are just about like themselves and learn just about the same way that they themselves do. In reality this is wildly false. Every student is unique and almost none of them are very similar to their professors until you get to doctoral level education. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students are not like you and moreover every one of your students learns a bit differently. Learning Modalities is the term of art here. Some learn by hearing, some by doing, some by seeing, etc. Repetition is a big plus. Almost none of your students will learn anything told/shown/demonstrated/... to them just once. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Analogy and metaphor are big helps with any new topic with novices as long as you are aware of the limitations of any given metaphor. A set is like a coral of horses might get you off the ground, as long as you also know, and help your students know that a set is also &lt;em&gt;unlike&lt;/em&gt; a coral of horses. The metaphor works. A picture helps. Some informal discussion works. Some question and answer works. Showing something that is NOT a set in some subtle way. Every bit adds to the student understanding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then, BANG, you can hit them with the formalism but you can also point out how the formalism relates to the less formal introductory remarks about the topic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you teach strictly with formalism and your students are not yet used to dealing with formal definitions and arguments you will be speaking to only a tiny subset of your students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it isn't just metaphor that works. It is attacking an idea from a variety of angles, but analogy/metaphor is a good way to start, though not a good way to finish up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have some experience that the most elegant, precise, and concise definitions, proofs, etc. is pretty much guaranteed to reach the smallest set of students possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many professors have had the experience of feeling like a failure in a lecture because they made a mistake or got confused and had to muddle through, finally reaching the correct result. BUT then being thanked by the students for a wonderful lecture that enlightened them so much. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thinking can be messy. It doesn't help to pretend otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, moreover, that formal definitions of things are &lt;em&gt;not&lt;/em&gt; the way they arose originally. Professionals muddle through to an idea, often discussing it with colleagues, trying to pin down the true, deep, meaning. Only once they have done that can they begin to think in terms of a formalism. Set theory, in particular has bedeviled philosophers, logicians, and mathematicians for millennia. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In fact, your &quot;definition&quot; isn't quite as formal as you might think:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A set is an unordered, well defined collection of elements, in which repetition doesn't matter.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The reason is that it is based on English words and natural language is, itself, very messy. If I have a set of natural numbers, they are inherently ordered, but that isn't part of &quot;set-ness&quot;. You need to define &quot;well defined&quot;. The word &quot;collection&quot; is also messy and hard to define in a not-circular way. What do you &lt;em&gt;mean&lt;/em&gt; by &quot;element&quot; (other than, circularly in relation to a set? Finally, I don't understand what you might mean by &quot;repetition &lt;em&gt;doesn't matter&lt;/em&gt;&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is where analogy and examples and poking around the edges can help. For example why isn't &quot;The set of all black horses&quot; a valid thing? It can get very subtle. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I've said similar things about teaching and reaching your students in answer to other questions on this site. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-11T11:16:46.137" LastActivityDate="2018-03-11T11:16:46.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4450" PostTypeId="2" ParentId="4427" CreationDate="2018-03-11T02:38:11.030" Score="1" Body="&lt;p&gt;I propose that the correct answer is to keep doing what you're doing, by teaching the techniques that you're currently teaching.  Both of you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was taught with the approach you use.  When I was first exposed to the other approach, I didn't much like it.  But with an open mind, I learned that the approach used by the other instructor is useful for some analysis processes.  Most especially this refers to some particularly older &quot;source code analysis&quot; software tools, but there may be some ongoing benefit to that other style too.  As I didn't have experience with the practice of using those specific auditing processes, I'm not in the best position to judge whether the benefits outweigh the pains of constraints.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, have students be taught both methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe students won't like being coerced into being graded on how well they use one method, only to be later graded in another class based on how well they accomplish coding using the other style.  The transition may be unpleasant.  Tough.  That's great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is good for students to be prepared for the workforce, and many may benefit greatly from learning that an expected style might not match whatever their personal preference is.  If they are allowed to get locked into one style, that may cause challenges in the future when they transition into their first employer, or transition between companies, or even transitioning between different departments of an organization that may have different policies for different departments.  Getting the students uncomfortable if they don't adapt may be better for them to experience now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If having different requirements leads to them being uncomfortable, tell them that different employers may expect different things, and even different projects (e.g., different open source projects) that they may want to become a part of during their off-time.  So may different instructors.  They are welcome to use whatever approach they want for their own personal hobby projects that they are in charge of, but when other people are in charge, then cooperation can be oodles more important than advantages of a particular style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, no, my advice here is: don't give them a choice.  Make 'em adapt.&lt;/p&gt;&#xA;" OwnerUserId="1676" LastActivityDate="2018-03-11T02:38:11.030" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4451" PostTypeId="2" ParentId="4427" CreationDate="2018-03-11T02:43:52.583" Score="12" Body="&lt;p&gt;Speaking as a computer science professional (not an educator) with over 40 years of experience, the important thing to teach is &lt;strong&gt;discipline&lt;/strong&gt;.  Would-be programmers need to understand that code which is poorly structured and disorganized leads to both confusion and &quot;stupid&quot; coding errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The criteria you give is a good first cut at a set of &quot;rules&quot; in this area, but it's important to appreciate &lt;em&gt;why&lt;/em&gt; the rules are there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In real life code is &lt;em&gt;maintained&lt;/em&gt;, meaning that you or some co-worker may come back months or years later to make some &quot;minor&quot; change.  If the person making the change does not, eg, notice that a &lt;code&gt;return&lt;/code&gt; is embedded inside an &lt;code&gt;else&lt;/code&gt; statement inside a loop then the conditions are set up to introduce a bug.  (Similarly, if a bunch of nested &lt;code&gt;if/then&lt;/code&gt; statements are coded without associated &lt;code&gt;do/end&lt;/code&gt; statements then it's easy to accidentally mess things up.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not the specific rules that is important, it's the &lt;em&gt;purpose&lt;/em&gt; behind the rules.  As languages (and coding styles) morph and change the specific rules will come and go, but the &lt;em&gt;purpose&lt;/em&gt; remains to make the structure of the program visually evident, and to make &quot;stupid&quot; coding errors during program modification less likely.&lt;/p&gt;&#xA;" OwnerUserId="4511" LastActivityDate="2018-03-11T02:43:52.583" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4453" PostTypeId="2" ParentId="4427" CreationDate="2018-03-11T13:32:19.753" Score="3" Body="&lt;p&gt;After some reflection on user &lt;a href=&quot;/a/4442&quot;&gt;Kevin's post here&lt;/a&gt;, I thought it might be useful to capture some of the comment discussion permanently and also provide to users who don't use C very much (I don't myself lately), a deeper explanation of what is going on.&lt;/p&gt;&#xA;&lt;p&gt;I agree with Kevin (hereafter the OP = original poster) that this sort of coding isn't what you teach novices first, and is limited, perhaps, to C-like (even assembly-like) languages. Below, I've modified his example just a bit by trying to explicate the various shells that I discussed in a comment. In particular, the only change has been to add a block structure to the code using braces (which can be opened anywhere and create a new lexical level, though I don't need to use if for renaming variables here). It is just to make the structure (I hope) clearer to the reader and the code archaeologist. I've also given &amp;quot;names&amp;quot; to the blocks/levels/shells, though just as comments.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;int read_some_type(char *filename, struct some_type *result){&#xA;    int rc = 0;&#xA;    { //&amp;lt;1&amp;gt; &amp;quot;Code is broken on entry&amp;quot; shell&#xA;        if(!result){&#xA;            rc = -1;&#xA;            goto out;&#xA;        }&#xA;        { //&amp;lt;2&amp;gt; &amp;quot;Try to open a file&amp;quot; shell&#xA;            int fd = open(filename, O_RDONLY);&#xA;            if(fd == -1){&#xA;                rc = -1;&#xA;                goto out;&#xA;            }&#xA;            { //&amp;lt;3&amp;gt; &amp;quot;Try to allocate&amp;quot; shell&#xA;                // Normally we'd allocate this on the stack; assume struct some_type is huge.&#xA;                char *str = malloc(sizeof(struct some_type));&#xA;                if(!str){&#xA;                    rc = -1;&#xA;                    goto out_open;&#xA;                }&#xA;                { //&amp;lt;4&amp;gt; &amp;quot;Evaluate and act&amp;quot; shell&#xA;                    ssize_t size;&#xA;                    size_t total = 0;&#xA;                    while(total != sizeof(struct some_type)){&#xA;                        size = read(fd, &amp;amp;str[total], total - sizeof(struct some_type));&#xA;                        if(size &amp;lt;= 0){&#xA;                            rc = -1;&#xA;                            goto out_malloc;&#xA;                        }&#xA;                        total += size;&#xA;                    }&#xA;                    memcpy(result, str, sizeof(struct some_type));&#xA;                    out_malloc:&#xA;                } //&amp;lt;/4&amp;gt;&#xA;                free(str);&#xA;                out_open:&#xA;            } //&amp;lt;/3&amp;gt; &#xA;            close(fd);&#xA;        out:&#xA;        } //&amp;lt;/2&amp;gt;&#xA;    } //&amp;lt;/1&amp;gt;&#xA;    // This is strictly unnecessary, but we could add code here in the future.&#xA;    // For example, we might check errno and call perror(3) or similar.&#xA;    return rc;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Each &amp;quot;shell&amp;quot; is now a block. Each shell tries to do something that might fail. Each shell ends with a label. Each &amp;quot;goto&amp;quot; is essentially a return from the shell, as was noted by the OP and I also noticed. Each shell is immediately followed by cleanup from that shell. This is a special case, actually, since here the cleanup needs to be done both on success and failure of the overall code. If the cleanup were only needed on failure, the innermost shell could do an immediate return after success is achieved, though goto out here is equivalent as there is no code following that label.&lt;/p&gt;&#xA;&lt;p&gt;If you think about the code, while it doesn't use &amp;quot;helper&amp;quot; functions, in effect what it is is a bunch of helper functions expanded in place (inlined) rather than called explicitly. The lexical structure replaces arguments. This sort of thing (inlining) is often used for efficiency (and making Torvalds happy, I guess). But in most coding efficiency is the last thing you need to consider (after writing clearer code and then running a profiler to see where efficiency suffers). Kernel code in an OS is an obvious exception, of course.&lt;/p&gt;&#xA;&lt;p&gt;It is also important to note that each shell cleans up after itself. So both allocation and the needed deallocation take place within the same shell. Similarly for the file handling.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, if you are going to code this way you need to be absolutely pure in your implementation of it. It is fine to add a new shell, inner to another as long as you keep the same discipline. You don't need to create the extra blocks as I've done here, but you do need to write as if they exist. If you use additional goto statements to jump between the shells/blocks you will have a mess.&lt;/p&gt;&#xA;&lt;p&gt;Also, if you treat the goto statements as &amp;quot;returns&amp;quot; from the shell, then the idea of &amp;quot;returning as soon as you can&amp;quot; is still in place. Here, you &amp;quot;return&amp;quot; when you notice a failure (say of &lt;em&gt;malloc&lt;/em&gt;). But you also &amp;quot;return&amp;quot; at the end of the shell by falling through to the outer shell.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The code is also a bit special since two of the shells (#1 and #2) end at the same place, though that isn't the general situation. In general there might be two different targets for what is, here, the &lt;em&gt;out&lt;/em&gt; label. That label would be after the end of the #2 shell at the end of #1&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note this post is &amp;quot;owned&amp;quot; by the community so you are free to improve it as well as comment on it. In particular, I'd be interested in hearing from the OP whether making these shells/levels explicit would be considered to be a good or bad thing in his environment.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="2047" LastEditDate="2020-10-05T20:42:36.273" LastActivityDate="2020-10-05T20:42:36.273" CommentCount="1" CommunityOwnedDate="2018-03-11T13:32:19.753" ContentLicense="CC BY-SA 4.0" />
  <row Id="4454" PostTypeId="2" ParentId="59" CreationDate="2018-03-11T15:47:17.100" Score="1" Body="&lt;p&gt;Advantages compared to what? I will assume compared to programming abstract applications on a desktop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming abstract applications on a microcontroller does not provide any obvious advantages, beyond teaching students what a microcontroller is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get advantages when it comes to what I call &quot;&lt;strong&gt;Applied Programming&lt;/strong&gt;&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a desktop, it's difficult (but not impossible) to come up with something that's within students' capabilities to program, is useful or fun, and of which you can't download a better version from the internet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your application involves hardware, you can't download it from the internet. Microcontrollers + hardware allow students to build something &quot;tangible&quot;. Something they can see and touch. For some - but not all - students this offers far greater motivation, especially in a context that is more akin to a workshop than a classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're not producing something tangible, I don't see much benefit to using microcontrollers. Microcontrollers are not the only way to produce something tangible, but given their low price point they are a competitive option.&lt;/p&gt;&#xA;" OwnerUserId="4076" LastEditorUserId="4076" LastEditDate="2018-03-11T19:24:22.413" LastActivityDate="2018-03-11T19:24:22.413" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4455" PostTypeId="2" ParentId="4448" CreationDate="2018-03-11T16:48:11.120" Score="6" Body="&lt;p&gt;Moving from formal to informal is almost always a mistake.  Let me see if I can show you &lt;em&gt;why&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you consider how you think about sets within your own mind, I am reasonably certain that you rarely use the formal definition.  Instead, you visualize or otherwise imagine something more akin to some abstract sort of bag, box, or group.  The specifics of your visualizations are not so important here.  However, the internalization that you use must be, in some sense, &lt;em&gt;physical&lt;/em&gt;.  Members can be in or out.  Things can be added in, or removed.  Your mental imagery may be only partially fleshed out, or it may be much more definite, with form, color, and texture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This mental model gives you a strong set of intuitions regarding sets that allow you to work with them quickly, efficiently, and correctly, allowing you to move to formalisms only when you really need them, such as when you are attempting a proof, or when you are trying to enhance your understanding of some novel property that you hadn't understood before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you suppose that we always draw out our Turing Machines instead of writing out their formal definitions? (I searched online for a &lt;em&gt;long time&lt;/em&gt;, and I honestly can't find a single example of a TM entirely written out.)  Similarly, why do we normally draw a geometric diagram instead of simply writing out the formula for a diagonal bisection of a square?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer is obviously that the concepts are far eaiser to understand when turned physical.  This property will hold true for basically every abstract concept we've mastered.  Our minds are wired towards the physical.  We can figure out a reasonable path in a crowd of moving people almost without effort, but take months (or even years!) of training to be able to reliably find the sum of multiple-digit numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking this idea to an extreme, you could construct a fully formal, mathematical description of Chess.  Squares are sets, numbered from 1-64, and $Pawn_{i}$ where $1 \le i \le 8$ can always move to $Pawn_{i}loc + 8$ iff $current + 8 = \{ \} \land current &amp;lt; 57$. Similar descriptions can be made for every other legal class of moves, but by using such an approach, you would take a game that any 8 year old can learn, and you would make it inscrutable. The poor 8 year old would never be able to learn the mechanics of the game. (And &lt;em&gt;mechanics&lt;/em&gt; is not a coincidental word here!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Visualizations and strong analogies allow us to make concepts instantly clear.  As Buffy points out in his answer, mathematical work moves from concept to formalisms, almost never the other way. To do otherwise is to ignore the way that our minds learn.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-03-11T19:57:18.733" LastActivityDate="2018-03-11T19:57:18.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4456" PostTypeId="2" ParentId="4427" CreationDate="2018-03-11T19:31:16.790" Score="3" Body="&lt;p&gt;This is a great opportunity to teach about history of programming and how programming itself evolves over time. Keep in mind that &quot;evolve&quot; is neither a synonym nor an antonym to &quot;improve&quot;; it's an independent word with its own meaning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;20 years ago Single Entry Single Exit was a somewhat popular coding style, but that time has passed. Nowadays the popular style is short functions, early returns, and absence of deep nesting. Source: (because I'm lazy) The answers on this question and their respective vote count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above certainly applies to C++ and C#. Popular coding styles can and will differ between different languages - sometimes for practical reasons, sometimes for historical reasons. They will also differ among different companies and different teachers.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To actually answer your question: Teach them what coding styles are acceptable in your class, and why. &lt;strong&gt;It doesn't matter &lt;em&gt;which&lt;/em&gt; style(s) you chose, but you must answer the &lt;em&gt;why&lt;/em&gt;&lt;/strong&gt;. Also teach them that other coding styles exist, many of which they will encounter in other courses and in their professional career.&lt;/p&gt;&#xA;" OwnerUserId="4076" LastEditorUserId="4076" LastEditDate="2018-03-11T20:24:46.273" LastActivityDate="2018-03-11T20:24:46.273" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4457" PostTypeId="2" ParentId="4448" CreationDate="2018-03-12T01:55:27.577" Score="6" Body="&lt;p&gt;Formalization is important, I believe, at every step, concurrent with analogies, metaphors, and examples.  Give them the formal definition.  Use it frequently in teaching and in conversation.  Make them write it on a study guide.  Give them a question about it on a practice quiz.  They will learn it in spite of themselves.  One day their brains will go &quot;aha&quot;, and the formal definition will coalesce with the informal representations you've been giving them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last week a student asked me for help with her code.  She was trying to add a constructor to a class (C#), but she wasn't naming it correctly.  I asked her to tell me how to recognize a constructor.  She answered with the definition I'd given her - &quot;a constructor has the same name as the class&quot;.  As soon as the words were out of her mouth, she realized what she'd done wrong.  Up until that point, she'd memorized the definition, but she hadn't really considered what it meant. As I coaxed it out of her, however, her brain made the leap and she had understanding.  That &quot;formalization&quot; wouldn't have been there if I hadn't pounded the definition, ever so subtly, in my daily lessons and other activities.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-12T01:55:27.577" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4458" PostTypeId="2" ParentId="2897" CreationDate="2018-03-12T07:17:26.313" Score="3" Body="&lt;h1&gt;How do I teach git to a teenager&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Git is a powerful repository system, yet much of that power is hidden behind simplicity in day-to-day operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like all good teaching, you need to demonstrate the fundamentals and build from there to instil understanding at the appropriate levels.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What can I do to make this journey easier for me?&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Practice. The same materials that are suitable for students are also suitable for you to gain an advanced understanding of what Git is doing and how it operates.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;What good user interfaces should I adopt?&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;My preference for interfaces are&lt;/h3&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Unix (GNU/Linux) command line&lt;/li&gt;&#xA;  &lt;li&gt;Unix (GNU/Linux) GUI&lt;/li&gt;&#xA;  &lt;li&gt;Microsoft's Windows GUI&lt;/li&gt;&#xA;  &lt;li&gt;Microsoft's command line&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;So it is important, for me, to have a good command line tool, on my GNU/Linux machine. And important to have a good, and the same, GUI on GNU/Linux and Microsoft Windows.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Without hesitation, you should use the official release client from &lt;a href=&quot;https://git-scm.com/downloads&quot; rel=&quot;nofollow noreferrer&quot;&gt;git-scm.com&lt;/a&gt; to meet your requirements. The command line tools and git-gui are included. On Fedora (27) Gnu/Linux, you type &lt;code&gt;sudo dnf install git git-gui&lt;/code&gt;, and you are done and ready.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Git-gui is a commit tool (&lt;code&gt;git citool&lt;/code&gt; to launch the commit interface tool), I mostly use &lt;code&gt;gitk&lt;/code&gt; which is a complete repository browser (for the current branch) and launch git-gui from there should I need it but, I do most of my work from the command line - it is simpler although the tree view in gitk is sometimes helpful to understand what has happened before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want a GUI that is a little less encumbering, I recommend &lt;a href=&quot;https://wiki.gnome.org/Apps/Gitg/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gitg&lt;/a&gt; which is available for Microsoft Windows and Gnu/Linux. It is much less full-blown than gitk and accordingly not as powerful. On Fedora (27) Gnu/Linux you type &lt;code&gt;sudo dnf install gitg&lt;/code&gt; and type &lt;code&gt;gitg&lt;/code&gt; to launch. On Microsoft Windows, you need to make sure that it is on your path. Gitg lets you browse by branches, tags and sources, as well as manage commits, so it is really quite useful.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;My goal&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;To use the tool to store the history of my, and pupils, projects.&lt;/li&gt;&#xA;  &lt;li&gt;To be able to look at past history.&lt;/li&gt;&#xA;  &lt;li&gt;To be able to revert to past state.&lt;/li&gt;&#xA;  &lt;li&gt;To merge and resolve conflicts.&lt;/li&gt;&#xA;  &lt;li&gt;To never think, that live would be easier without it.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The best resources are tested. Grab yourself a copy of &lt;a href=&quot;https://github.com/Willtech/GitRefDocs/raw/master/git.from.bottom.up.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Git from the bottom up&lt;/a&gt; and &lt;a href=&quot;https://git-scm.com/book/en/v2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pro Git&lt;/a&gt; (both under CC licence).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the time that you read through those resources, you should have a good grasp of what is involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to achieve your goals you are going to have to consider two things:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Set-up Git config to use a basic text editor for most things, like gedit or notepad. It can be very confusing the first time you try and commit on the command line and you forget to include the commit message or, manage a merge. Oh yeah, if you are using the command line, always remember to include the commit message (in two parts, heading and body, separately each by -m) and --signoff.&lt;/li&gt;&#xA;&lt;li&gt;Decide on your infrastructure. If all students are managing their own repository in their own home folder, then that is fine, that is all that you need but, if you are going to need a Git server, then it is easier to set-up GitHub repositories provided it doesn't matter if student's work is public. Of course, if you have to ask how to set-up a Git server that is a separate (and probably already answered somewhere) ask with a world of possibilities. Setting up a Git server does not need to be overly complicated provided the classroom has the small amount of infrastructure necessary to support it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Remember, you can always type &lt;code&gt;git commit --help&lt;/code&gt; etc. for almost anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="4513" LastEditorUserId="4513" LastEditDate="2018-03-12T12:42:22.353" LastActivityDate="2018-03-12T12:42:22.353" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4459" PostTypeId="2" ParentId="4425" CreationDate="2018-03-12T13:29:44.343" Score="7" Body="&lt;p&gt;The basic confusion is in the notation at the KB (base 2 derived) vs kB (SI unit) unit level, and it is helpful to understand the origin of the use of the base 2 derived unit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A computer is a binary machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the basic level, memory addressing is binary. Usually, at the programmatic level, the addressing is keyed in hexadecimal format (it was originally binary); however, hexadecimal is also base 2 derived (it is base 16 or, 2&lt;sup&gt;4&lt;/sup&gt;) and so is directly compatible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beginning at the KB level for communicating understanding here is useful since the concepts of base 2 derived units have existed since before MB was in common usage (no differentiation in prefix from SI unit).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a memory controller IC, if you imagine that address selectors are a row of switches (binary logic gates) and depending on how they are switched you get the memory read from a specific address on the data lines. The data is stored and returned as bytes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There has always been a limited number of address lines available to address memory, and it so happens that using binary complete address sets for a given number of bits of addressing are base 2 numbers. So, on a 4KB machine, there are 12 address lines representing addresses 0 through 4095 (4096 bytes). These 12 address lines are corresponding to the 111111111111 addresses possible in binary, 0FFF in hexadecimal or, 4096 bytes in decimal. It would not be logical to limit address mapping to 4000 bytes for the sake of decimal convention when there are 12 addressing bits available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This logic followed initially to hard disks also, where blocks are groups of bytes accessed by address, however (and I have not checked), I do hear that perhaps hard disk vendors find it less critical to use 'round addressing' formats, particularly considering the following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All standard values in computer terminology are base 2 derived, although, for marketing purposes, some vendors 20MB hard disk may not be as large as some keeping the convention. It is convenient to slap 20MB on something even if it does not contain as many blocks and is easier to manufacture because there is less data density required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Early IDE hard disks (there were other earlier systems before IDE), before the Logical Block Addressing (LBA) system was introduced, used to be configured by cylinders, heads and, sectors (CHS). The entire addressing system was binary, and even standard Unix utilities used 1024 byte blocks for display.&lt;a href=&quot;https://en.wikipedia.org/wiki/Cylinder-head-sector&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;sup&gt;[1]&lt;/sup&gt;&lt;/a&gt; Standard tools like &lt;a href=&quot;https://github.com/brndnmtthws/conky&quot; rel=&quot;nofollow noreferrer&quot;&gt;Conky&lt;/a&gt; still use base 2 for display of RAM and HDD information, although, it uses the GiB style format to avoid confusion. Later, the LBA addressing system allowed for logical mapping of the CHS format as hard disk size grew, however, LBA simply applies the CHS format addressing internally in the hard disk's onboard controller and allows the OS (and the programmer) to just consider the logical blocks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The base 2 logic follows through to larger numbers, for example, 1111111111111111111111111111111 bytes is 2GB in standard usage or 7FFFFFFF bytes in hexadecimal. It is only in decimal where this looks untidy as 2,147,483,647 bytes, but the underlying technology and conventions are not decimal. Computers are not decimal machines; they are binary machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Network addressing also uses binary masks on every one of millions of data packets every second to ensure correct routing but, it is a long time since the data portion of a network packet has resembled a base 2 number. Probably the outermost layer of the packet still does {conjecture}.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will no doubt need to mention that there is confusion especially when it comes to marketing of products as being a particular size, and that there are some programitc implementations for display of values using SI units (it is no longer more inconvenient or slower {actually, it is probably still slower, but on modern computers it is no longer noticable} for computer programmers to implement decimal, particularly for display) but, there can be no doubt about computer usage that the correct answer is the base 2 convention.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1024KB is the &lt;a href=&quot;https://en.wikipedia.org/wiki/JEDEC_memory_standards#Unit_prefixes_for_semiconductor_storage_capacity&quot; rel=&quot;nofollow noreferrer&quot;&gt;JEDEC 100B.01&lt;/a&gt; standard meaning that 1KB is 1024 bytes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;rel:&lt;br&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Cylinder-head-sector&quot; rel=&quot;nofollow noreferrer&quot;&gt;[1]&lt;/a&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Cylinder-head-sector&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia - Cylinder-head-sector (CHS)&lt;/a&gt; - &lt;a href=&quot;https://en.wikipedia.org/wiki/Cylinder-head-sector&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Cylinder-head-sector&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This question has been extensively explored.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SuperUser - Size of files in Windows OS. (It's KB or kB?) - &lt;a href=&quot;https://superuser.com/questions/938234/size-of-files-in-windows-os-its-kb-or-kb&quot;&gt;https://superuser.com/questions/938234/size-of-files-in-windows-os-its-kb-or-kb&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Most OS's and the vast majority of devices that deal with memory/storage use the prefixes K for Kilo to mean 1024 bytes, so when I get RAM that says it's a 4GB module, I know it's 4 Gibi-Bytes (4*1024*1024*1024) and not Giga-Bytes (4*1000*1000*1000).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Quora - Where do we use 1 kB = 1000 bytes, 1 MB = 1000 kB, 1 GB = 1000 MB, 1 TB = 1000 GB? And where do we use 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB? - &lt;a href=&quot;https://www.quora.com/Where-do-we-use-1-kB-1000-bytes-1-MB-1000-kB-1-GB-1000-MB-1-TB-1000-GB-And-where-do-we-use-1-KB-1024-bytes-1-MB-1024-KB-1-GB-1024-MB-1-TB-1024-GB&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.quora.com/Where-do-we-use-1-kB-1000-bytes-1-MB-1000-kB-1-GB-1000-MB-1-TB-1000-GB-And-where-do-we-use-1-KB-1024-bytes-1-MB-1024-KB-1-GB-1024-MB-1-TB-1024-GB&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The second idea was formulated by Computer industry&#xA;  1KB = 1024 bytes&#xA;  1MB = 1024 KB&#xA;  1GB = 1024 MB&#xA;  Notice I am using capital B and not small b, and capital B implies bytes&#xA;  The small b should not be used&#xA;  This is the case always and is true for things related to computers&lt;/p&gt;&#xA;  &#xA;  &lt;hr&gt;&#xA;  &#xA;  &lt;p&gt;The first idea was formulated by Tele-communication industry and is applicable not for data size (bits and bytes) but for data speed (bits per seconds or bytes per second)&#xA;  1Kbps = 1000 bps (bits per second)&#xA;  1Mbps = 1024 Kbps&#xA;  1Gbps = 1024 Mbps&#xA;  Notice I am using small b and not capital B, and small b implies bits&#xA;  The capital B should not be used&#xA;  This is the case always and is true for things related to data transmission&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="4513" LastEditorUserId="4513" LastEditDate="2018-03-17T04:52:26.130" LastActivityDate="2018-03-17T04:52:26.130" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4460" PostTypeId="2" ParentId="430" CreationDate="2018-03-13T14:27:55.017" Score="-4" Body="&lt;p&gt;First of all, I don't think the student is the problem. If you think he has understood the chapter well, you should also kick it up a notch. Backing down or not stepping up will essentially point that you know the bare minimum that is required to get a teaching job.&#xA;Just tell him or your head that he is much more advanced than the class and try arranging for a more complex lesson so that he also gains interest in the lesson.&lt;/p&gt;&#xA;" OwnerUserId="4613" LastActivityDate="2018-03-13T14:27:55.017" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4461" PostTypeId="1" CreationDate="2018-03-13T19:10:19.170" Score="9" ViewCount="850" Body="&lt;p&gt;I am an undergrad student. I am an experienced programmer. For reasons out of the scope of this question, I ended up in a class where basic things about C++ and Java are being taught (but I already know those).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know very well the difference between &quot;pass-by-value&quot; and &quot;pass-by-reference&quot;. I know very well that Java is &quot;pass-by-value&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My teacher was talking about pointers and a bit later he showed an example of pass-by-reference in C++, comparing passing &quot;by pointer&quot;, by value and by reference. So far so good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then he said &quot;on the other hand, Java has a rule, primitive types are always passed by value, and non-primitive types are automatically passed by reference&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question: I know that technically what he said is wrong. But I didn't say anything. No one else said anything, the other students appeared to &quot;learn&quot; that. I would like to have corrected him, but how could I have done so? Alternatively, is there a good education reason to teach this way, perhaps a &quot;white lie&quot; of some sort, to avoid overwhelming students with details?&lt;/p&gt;&#xA;" OwnerUserId="815" LastEditorUserId="27" LastEditDate="2018-03-13T19:21:41.667" LastActivityDate="2021-01-21T15:06:22.267" Title="My teacher said that java is pass-by-reference when the type is not a primitive" Tags="|java|" AnswerCount="7" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4462" PostTypeId="1" CreationDate="2018-03-13T19:20:58.823" Score="2" ViewCount="201" Body="&lt;p&gt;According to research, if people are to develop abstract reasoning capabilities (Formal Operations and Post-Formal) they need the proper exposure at age 7 to 12 - generally speaking. Adults that were not exposed properly at the right time do not progress past Concrete Operations well, or at all. Thus, it is difficult or impossible for them to become programmers later on, or to go in to other fields requiring abstract reasoning capability.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we accept that this is true, then we must provide the correct training at age 7 to 12 and beyond, if we want to have people who are capable of performing in these sorts of ways, because later on is too late for them to acquire those capabilities. We can't wait for them to reach the age of majority and then say, &quot;I want to become a programmer&quot;, because if they didn't have the right sort of background preparation, they cannot. We have deprived them of the ability to make that choice for themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, if we push the students in to this sort of schooling before they can decide for themselves, then they also are not acting with free will in that case either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first case prevents them from choosing something, the second allows them to choose it, but only because we made other choices for them. Studying one thing tends to mean not studying other things, as there are only 24 hours in a day. Successful Gymnasts and Musicians usually start as soon as they can walk, or reach the instrument. Successful programmers will need some exposure to thought processes that they need, early on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can we balance the objectives of allowing people choice, enabling them to choose by preparing them properly, providing the economy with prepared workers and supporting values like freedom of choice? &lt;strong&gt;It seems to me that some decisions are forced, and the timing of education is one of them.&lt;/strong&gt; We get to choose, but we don't get to choose the choices we are presented with. So we have to make wise choices on behalf of (lots of) others, often without being able to obtain their consent, perhaps because they are too young to give it.&lt;/p&gt;&#xA;" OwnerUserId="4622" LastActivityDate="2018-07-10T17:00:40.943" Title="The Starting Gun vs Freedom of Choice" Tags="|curriculum-design|" AnswerCount="2" CommentCount="11" ClosedDate="2018-03-15T17:31:13.143" ContentLicense="CC BY-SA 3.0" />
  <row Id="4463" PostTypeId="2" ParentId="4461" CreationDate="2018-03-13T19:29:49.487" Score="2" Body="&lt;p&gt;The correct statement, of course is that Java passes a reference by value. That is not the same as passing by reference. You can easily show the difference, by assigning a new object to the parameter variable within the method and then noticing that the code that invoked the method doesn't see the new object. It would be pass-by-reference only if the caller sees the new object. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The confusion comes from the fact that the objects themselves are usually mutable and so within the called method, the receiver gets to make modifications. But both the caller and the called method have references to the same object. So the caller can see changes within the object made by the method. But it can't see a new object that replaces the parameter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you assign to the parameter variable within the method, then the caller and the called method will see different objects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, you should correct the teacher, but it is a bit risky, depending on the personality of the teacher. The best way, perhaps, is to prepare some demonstration code and show it to the teacher in the office. You can then, perhaps, offer to &lt;em&gt;clarify&lt;/em&gt; the real meaning in Java, using your code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personalities can be messy, of course, and not every teacher likes to be contradicted. But the students have a right to know the &quot;real deal&quot; if they are going to program in Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Notice that Java and C++ are superficially similar, but deeply different. Learning both together is, itself, a cause of confusion. But in this case, the contrast can be informative. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If nothing else, you can show the teacher this post from a 40 year veteran of programming, much of that in OO languages, including both C++ and Java (and author of books in both). &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-13T19:29:49.487" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4464" PostTypeId="1" CreationDate="2018-03-13T19:33:00.213" Score="26" ViewCount="7611" Body="&lt;p&gt;We all have them - students who want to write all the code themselves, who don't want to be part of a group project.  They have poor social skills, or they don't know anyone else in the class, or they don't trust others, or they think other people &quot;slow them down&quot;.  So they go home after a group project is assigned, write all the code themselves, and bring it back to the first group meeting, completed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A typical situation is a group project done in a class or lab period over several days. The instructor or a lab assistant is present to watch over the students and give advice as needed. Different strategies might be needed if the project is done outside the view of faculty on the students' own time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This could also differentiate depending on whether the situation is the first occurrence (you are surprised by it), or if you are familiar with the &lt;em&gt;Lone Ranger&lt;/em&gt; and know he or she has a history of going rogue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are your practical ideas for preventing a student from taking over a group project, or dealing with it after it has occurred?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Of note from other posts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reading the answers to &lt;a href=&quot;https://cseducators.stackexchange.com/q/3248/104&quot;&gt;Techniques for encouraging pair programming&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/q/1383/4338&quot;&gt;What advantages/disadvantages have you seen with Pair Programming in the classroom&lt;/a&gt; offers insight into the problem of encouraging students to actually &quot;work&quot; together, which can be part of the problem here. The real issue, however, isn't that the other students aren't willing to do the work, rather that the &lt;em&gt;Lone Ranger&lt;/em&gt; just does all the work, usually before work begins, without the others even having the opportunity to work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two other questions, &lt;a href=&quot;https://cseducators.stackexchange.com/q/3/4338&quot;&gt;Is it possible to ensure division of labor on a group assignment?&lt;/a&gt;, and &lt;a href=&quot;https://cseducators.stackexchange.com/q/430/4338&quot;&gt;Problematic student at a very high level&lt;/a&gt;, help with creating the environment and assignments to enable group work, and determining &lt;em&gt;if&lt;/em&gt; someone has gone rogue and done all the work. Neither deals with preventing the &lt;em&gt;Lone Ranger&lt;/em&gt; from repeating once the problem has been identified.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-07-19T15:03:22.843" Title="How do you deal with Lone Rangers in group projects?" Tags="|best-practice|secondary-education|project|classroom-management|" AnswerCount="8" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4465" PostTypeId="2" ParentId="4464" CreationDate="2018-03-13T19:40:37.127" Score="3" Body="&lt;p&gt;Since I first considered posting this question, the situation played out in my classroom, and here's how I handled it.  I had three students who had a history of &lt;em&gt;&quot;Lone-Rangerism&quot;&lt;/em&gt; (last semester). I assigned the group project and warned the entire class that no one could go rogue. I observed each group frequently, circulating the room every 5-10 minutes, paying special attention to those groups who had a former &lt;em&gt;Lone Ranger&lt;/em&gt; on their team, making sure that their project wasn't suddenly &quot;done&quot; from importing code the &lt;em&gt;LR&lt;/em&gt; did at home.  I also set a timer and made each team change &quot;drivers&quot; every 30 minutes so that the &lt;em&gt;Lone Ranger&lt;/em&gt; couldn't take over and do all the work. So far, so good.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-13T19:40:37.127" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4467" PostTypeId="2" ParentId="4461" CreationDate="2018-03-13T19:54:14.233" Score="2" Body="&lt;p&gt;This is a tricky situation for you.  You are correct that Java does not pass by reference, but your approach must depend on the personality of your professor.&lt;/p&gt;&#xA;&lt;p&gt;If the prof seems like the sort of person who would warmly accept this sort of feedback, I might directly mention it to them.  (I have done so, and it has been fine, though it often takes an exceptionally well-adjusted person to be able to take such feedback gracefully.)&lt;/p&gt;&#xA;&lt;p&gt;A second option would be to raise your hand and ask about the difference between pass by reference, and passing references by value.  This might trigger the prof to simply self-correct.&lt;/p&gt;&#xA;&lt;p&gt;A third approach would be to email the professor anonymously.  This is a generally a jerk move, and not recommended.&lt;/p&gt;&#xA;&lt;p&gt;A fourth approach, which you have alluded to in your question, would be to pose the question as a pedagogic one.  &amp;quot;Professor, I noticed that you told the class that Java passed Objects by reference.  Was there some reason you didn't want to mention passing references by value?  Was that just to avoid confusing people?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;As to whether there could be a pedagogical advantage to distinguishing the way that primitives and Objects are passed in a rough way, my instinct from years of teaching this topic is that there could be.  I object to using the specific words &amp;quot;pass by reference&amp;quot; (because those words have a specific meaning, and don't apply here), but pointing out that there is a distinction right at the start is important.  The behaviors of the two types of parameters will appear to be quite different to the beginner.&lt;/p&gt;&#xA;&lt;p&gt;When I first introduce the topic, I &lt;strong&gt;simply want to call attention to the fact that something is going on here that the student needs to pay attention to&lt;/strong&gt;, and I will be less concerned with whether every detail is understood at the start.  Your professor could, indeed, be (somewhat clumsily) applying such a strategy.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-01-21T15:06:22.267" LastActivityDate="2021-01-21T15:06:22.267" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4468" PostTypeId="2" ParentId="4464" CreationDate="2018-03-13T20:09:03.447" Score="11" Body="&lt;p&gt;I might push back against the core idea here, and this gets to the idea of the central mission of the course of study.  Within my course, teamwork is not a primary goal upon which I will assess my students.  This is not to say that I don't value it.  I think that there is &lt;em&gt;great value&lt;/em&gt; in paired programming, but I approach this only as a salesman, not as a taskmaster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I get real buy-in.  On my most recent lab, &gt;85% of my students have opted for two people, one-screen, driver/navigator paired programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I never &lt;em&gt;require&lt;/em&gt; paired (or group) programming.  I allow students to opt into paired programming if they wish to, and I sell it like crazy, but for some of those Lone Rangers, the idea of working with another person can be intensely frustrating.  Where this becomes a big problem is where they begin to hurt the education of their peers by simply doing the work themselves.  Some of these students may never really warm to the idea.  While I want to teach good team-working skills, I am unwilling to jeopardize the education of my middle- and low-flying students in order to force the high-fliers into an activity that they really don't want to engage in in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in this environment, there can still be group projects, but they would involve differentiated responsibilities:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Person A is responsible for parts 1, 2, and 3 of the project, while Person B is responsible for parts 4, 5, and 6.  Person C is responsible for QA.  Design your APIs together, and get them approved by me prior to the start of any actual coding.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-03-13T21:48:48.233" LastActivityDate="2018-03-13T21:48:48.233" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4469" PostTypeId="2" ParentId="4464" CreationDate="2018-03-13T20:16:38.787" Score="2" Body="&lt;p&gt;The key to this is to use a carrot and not a stick. Even better, build the carrot into the project process itself, so that the incentives for the superstar are to do the right thing. Of course you should always try to align the incentives with the desired outcome, but here it needs special care. It is applicable even if you &lt;em&gt;don't&lt;/em&gt; have a Lone Ranger too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your objective, in the project is not, I assume, code at the expense of all else. Learning is the objective, not code. This is different from the workplace. Here the #1 goal is not working code, but learning. Even well structured code is valued above working code in education, and the structure will likely lead to correctness of the code in any case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, in your project description, say something about the learning. And divide up the grade for the project into parts, heavily advantaging process and good behavior: team-work. One way to achieve that is to have the students give reviews of their peers at the end of the project (and to advertise this at the start). You also need to give explicit grades for cooperation and teamwork. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible way to get feedback and give students a way to feel proud of their contributions is like this. Give every student three, say, &quot;chits.&quot; These can be index cards signed by both yourself and the student. Each student is permitted to give a chit to another student based on their helpfulness. The receiver also signs the chit, say on the back. At the end of the project collect the chits and reward people based on how many they have from other students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another method, if teams have about five students or so, is to require each student to fill out a form on which they list the three, say, students who were most helpful and contributed the most to the project. They also need to write a line or two of explanation for each &quot;vote&quot;. Note that they don't evaluate every student, just the ones they think should be rewarded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If teams are always just two students, then each can be required to write a bit about their partner's chief contribution and their own. Again, you aren't asking for negatives and are less likely to get them in most cases anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These peer-review techniques should be introduced before the project starts, so students know what is going on. I have learned interesting things about some students this way when I'd have overlooked positive contributions of someone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another help is to teach a development process along with the project and insist that it is used. An Agile process is especially helpful here since you can act as the team's &quot;customer&quot; and only give them enough &quot;stories&quot; (work to do) for a single period, rather than the project as a whole. You can even warn them that the direction of the project (the requirements) may change over the course of the project. There is no incentive to program speculatively in this sort of environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each day, you need a set of index cards, each describing some feature of the project to implement that day. Pass them out to the team(s) and hold a short question/answer session to clarify what is on the cards but not to make a complete specification. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to really make it work, have them write unit tests for the things they build, so that they know when it &quot;works&quot; according to the tests. Expect questions throughout the session, since the specification is only in your head. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there are several cards for each day, then pairs (paired programming) can switch roles at the completion of each card. Even better is to have them switch for each test. Student A writes a test and passes the keyboard to B who makes it pass. B then writes a test and passes the keyboard back to A. The one not typing (the navigator) isn't expected to sit silently, but to offer suggestions throughout. Your superstar may wind up teaching some others a bit about the technology this way. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-13T22:21:52.277" LastActivityDate="2018-03-13T22:21:52.277" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4470" PostTypeId="2" ParentId="4464" CreationDate="2018-03-13T20:40:01.760" Score="38" Body="&lt;p&gt;This is really a separate approach from my first answer, which has received some push-back.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth noting that many of these loners are simply students who are substantially ahead of the curve.  One way to really want to engage such students in pair programming is to pair them with each other.  This will create something of a Dream Team.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give them the assignment, but tell them that their goal is to produce the coolest thing that they can that utilizes the concepts that the lab is developing within the time before the lab is due.  Tell them you're excited to see what they can come up with, that you'll allow them to present their work to the group at large, and that if it's a cool enough idea, you may use it as a launching point for a future lab for later generations of students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an aside, there is no reason to restrict this approach to the high-fliers.  It can be reasonable to allow students to propose modifications to the labs if these modifications excite the students.  It involves more work on your end, but you'll get better output and (more importantly) more engagement and buy-in from your students overall.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-03-13T20:40:01.760" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4471" PostTypeId="2" ParentId="4462" CreationDate="2018-03-13T22:47:58.067" Score="5" Body="&lt;p&gt;I think that the assumption of the question is overly deterministic. I am also pretty sure that I'm a living counter-example, though my case won't prove much. I was a terrible student into about 10th grade (say age 15), especially in math. My teachers once wanted to hold me back because I hadn't learned my multiplication tables. A plane-geometry class was my first positive educational experience of any kind. A bit later, a writing course appealed to me. Up until that time, I would rather have been anywhere but in school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was also told once, in high school, that, based on a standardized test, I probably wouldn't be successful in College and so should set my sights lower. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I later earned a PhD in Mathematics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there were no jobs for mathematicians at that time so I taught myself programming, with plenty of halts and stumbles. Then some deeper Computer Science. Still later I was lucky to have been mentored by some of the CS superstars in education. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But my early history would predict none of that, nor were my teachers particularly enlightened when I was young. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worry about the question from another standpoint also. I don't think many individual teachers have much power over the overall curriculum. Groups and associations can make a difference, however, but this site doesn't really help with that sort of question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you are a teacher, you &lt;em&gt;must not&lt;/em&gt; have a defeatist or deterministic attitude about your students: they can't learn so why bother. Every student in front of you, given some desire, can learn. You  have to be there to help them. You may even need to teach them how to learn in general, since their background may be like mine was. I eventually got desire, and the rest followed. Your job as a teacher is to educate them no matter what their background, be it advantaged or disadvantaged. The prime directive. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-13T22:47:58.067" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4472" PostTypeId="2" ParentId="4462" CreationDate="2018-03-13T23:28:36.293" Score="2" Body="&lt;p&gt;So let us assume that it is better to start young. (I will not agree that it is the only way. I will also not agree that exposure to computers is the best way at this age, but that learning the ways of thinking is of benefit.)&lt;/p&gt;&#xA;&lt;h1&gt;On freewill&lt;/h1&gt;&#xA;&lt;p&gt;If you have freewill then jump vertically up 20ft.&#xA;Or what about other things that we can do, but don't because of societal pressures. Like take of your clothes, and go out side, go for a walk.&lt;/p&gt;&#xA;&lt;h1&gt;On teacher choice and displacing other learning.&lt;/h1&gt;&#xA;&lt;p&gt;Would learning abstract reasoning be a waste if the pupil was not to became a programmer?&lt;/p&gt;&#xA;&lt;p&gt;Did you learn punctuation, grammar, poetry etc. How many of your class mates went on to be professional authors. So why did you bother? Was it a waste of time?&lt;/p&gt;&#xA;&lt;p&gt;Nor is learning abstract reasoning, and other computational thinking skills. They are useful in their own right. They may find it useful for something else.&lt;/p&gt;&#xA;&lt;p&gt;Also I can not remember the study, but learning these skills can help with other studies. (I think there is something on this in “Mindstorms” — papert 1980).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-07-10T17:00:40.943" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4473" PostTypeId="2" ParentId="4464" CreationDate="2018-03-13T23:54:16.753" Score="4" Body="&lt;p&gt;Most of what I was going to say was covered by @Buffy. Also I have not tried this in the classroom yet. It is some ideas that I had, based on my industry experience. Pick and choose what seems right, and test it.&lt;/p&gt;&#xA;&lt;h1&gt;Do it agile one requirement at a time.&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;You can write the unit tests for them, and release one test at a time. Some automated system, that releases the next test when a test passes.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use revision control, tell them that they must check in regularly, at least after each test passes. Ensure that they can only check-in code form within the lab. Create an auto grader that checks out there code one revision at a time, and runs the units tests. Check that they don't do to much per commit. Be careful as if they are doing it correct, with well written code, you can get emergent behaviour, and several tests will suddenly pass (Maybe 3 then 1 then 10 then all).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Get the high performer writing automated tests.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Ideas added by others:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;“Get the high performer writing automated tests.” - or other tooling. Writing tooling that saves time for other contributors is a nice skill to have, it suits lone rangers well (since the tooling is often smaller in scope and suitable for a single person), and naturally forces personal interaction - their peers have now become their clients. – &lt;a href=&quot;https://cseducators.stackexchange.com/users/4656/logan-pickup&quot;&gt;Logan Pickup&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-15T10:00:19.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4474" PostTypeId="2" ParentId="4464" CreationDate="2018-03-14T11:46:49.957" Score="3" Body="&lt;p&gt;My answer is &quot;play it by ear&quot;, and don't expect to make any progress.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example 1: myself&lt;/strong&gt;&#xA;I was one of those LR students decades ago. Grades and peer approval had no meaning to me. There were no levers for a teacher to pull to get me involved. I pulled in C grades, yet scored 100% on the standardized provincial physics exam in 12th grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recently found out that I am (by this year's standards) autistic, in addition to being ahead of the curve by a significant amount.  I either ended up doing all of the work for &quot;team&quot; projects,  or got shuffled to the side because I had no interest in the drama that went with dealing with people. No amount of teacher intervention or classroom technique changed that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Example 2: My daughter&lt;/strong&gt;&#xA;My daughter was part of a group assignment in her media class. When one of her team mates started texting her inappropriately, she and her team mate were informed that she was doing her assignment solo. The teacher was puzzled by the sudden unilateral change, but he wisely chose to trust that this was necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit: I missed the point&lt;/strong&gt;&#xA;Based on comments (thanks @Buffy) I realized I totally failed to make my point. The two real-life scenarios I describe are personal experience, and are not extreme. My own autism has not stopped me from having successful careers, and would have remained undiagnosed until my passing had I not had other health issues in which it was found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without the background information I provided here that was not available 4 decades ago, my high school teachers saw me as having &quot;advanced academics&quot; and &quot;poor social skills&quot; etc, and &quot;would do the task over night to bring it back to the first group meeting, completed&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that time, autism wasn't even on the books as a legal diagnosis.  It was years before it was recognized as being biological in origin. Today, I understand that the point of the tasks was the group experience rather than the task itself. But without that explicit explanation, I was physiologically not capable of realizing the task was not the important part of the assignment. Furthermore, had I been told that the &quot;group&quot; was the important part, I would have simply shut off rather than participate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While not all kids with poor social skills are autistic, when I see the combination of poor social skills and advanced academics, I raise the question because of my own experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, without the background information, my daughter's teacher's perception would have been that an advanced student suddenly went rogue without explanation. The texts were mistake of the young man's that both found terribly embarrassing, and neither were prepared to talk about with a teacher. He (the teacher) may still be under the impression that she got tired of being slowed down by a novice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teacher you don't have all of the information, and all you can do is the best with what you have.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2: What can you do??&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As suggested by @beni , I have some suggestions that might help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find it almost as ironic that I am making recommendations centered on &quot;soft&quot; skills as I do that in my volunteer time I manage a team of (mostly) adolescents in the high pressure and close quarters of live webcasting.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Understand that part of learning to work in a group is learning when to leave the group unilaterally.&lt;/strong&gt; In my daughter's case, she learned that sexual harassment is not an acceptable part of team work, and it is perfectly okay to walk away from a team where it is happening. Recognize that interpersonal conflicts that are irreconcilable do happen between high school students, they need to try to handle some things on their own, and you will not always know about those issues.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Recognize that there is no cure-all solution.&lt;/strong&gt; Setting an advanced student with &lt;em&gt;good&lt;/em&gt; social skills (like my daughter) up as a team lead or teachers assistant can work well, but setting up and advanced student with no interest in socialization (like myself) in that role would precipitate a shutdown or walk out if you were lucky.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Recognize that some tech companies are now specifically seeking programmers on the autism spectrum&lt;/strong&gt; , precisely because they can solve certain classes of problems better than teams of neurotypical programmers. Being unable to work in a group is not necessarily a handicap. (&lt;a href=&quot;https://www.windowscentral.com/microsofts-autism-hiring-program-seeks-bring-diverse-talent-redmond&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.windowscentral.com/microsofts-autism-hiring-program-seeks-bring-diverse-talent-redmond&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;If your problem students share the characteristic of being hyperfocused and task-centric, put them together.&lt;/strong&gt; They may go home and bring the task back completed for the first official meeting, but being similarly focused they are likely to strike a synergy and do it together (that would be me!). At the very least, they will have a chance to review each other's solutions and time to expand. Being task centered, they may not socialize much outside of the task, but they can develop a feedback loop of excitement as they expand and improve the solution.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Don't treat students you don't understand as damaged goods.&lt;/strong&gt; I have a gentleman on my webcast team whose teacher tries to meet him half-way by treating him like an infant. This kid (middle school) has earned sufficient respect as a camera tech (following directions) and a technical director (giving orders) during live webcasts that when he gives directions everyone on the team pays attention, including people twice his age or more. His teacher has nothing but frustration with him ... doh!&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Engage their interests with specialization.&lt;/strong&gt; If I chose to do something in school, it was out of synergy with my own interest. I could do relativity physics in my head, but wouldn't do homework. In one class I got a final grade of 10%, because I scored 100% on the final exam that was worth 10% of the class grade.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Another member of my webcast team is autistic to a higher degree than I am, but this kid (not old enough to drive) gets himself up every Sunday and rides his bike to church so he can do his part on the team as title artist. It suits him because he sits in a quiet corner away from the rest of the team and can focus on his artwork. He's started to earn respect from his peers because when he's not there they have to do that job. Modern software development requires a broad range of specializations - take advantage of it.&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;7&quot;&gt;&#xA;&lt;li&gt;&lt;strong&gt;Make use of remote team management tools and practices.&lt;/strong&gt; Today, in industry, many software project teams never meet in person. My own team includes people from all over the USA, Brazil, and India. On some of my most productive days I never actually leave my bedroom. Teamwork does not require face to face time.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditDate="2018-03-15T00:16:44.637" LastActivityDate="2018-03-15T00:16:44.637" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4475" PostTypeId="2" ParentId="4425" CreationDate="2018-03-14T12:25:04.043" Score="1" Body="&lt;p&gt;&lt;em&gt;The other answers all give solid reasons for teaching that both exist and how badly messed up the current situation is. This is important, but it does not clarify what the students should prefer to use themselves. This answer focuses on the practical side of what the students can do; after learning about the current situation from the other answers.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;h3&gt; Assume the worst-case &lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As with all uncertainty in computing, the safest option is always to assume the worst-case scenario. That is, to minimise the chance that an incorrect assumption will cause bugs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this situation, the following can be applied to cover your bases:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Assume the amount of resource you have is in multiples of 1000 Bytes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Assume resources used by 3rd party libraries etc. is in multiples of 1024 Bytes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide any figures for resources you use as multiples of 1000 Bytes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These three assumptions ensure that:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;At worst, you will think you have less resources than you actually do. For example, assuming 4kB RAM means &quot;4000 Bytes&quot; could mean you plan for having 96 fewer Bytes than you actually do. &lt;strong&gt;But it means you will never plan for having 96 Bytes more than you actually do.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;At worst, you will assume the library that said it uses 2kB RAM meant it uses 48 Bytes more memory than it actually does (assume it meant 2048, not 2000). &lt;strong&gt;But you will never plan for it using 48 Bytes less RAM than it actually does.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;At worst, 3rd parties will assume your program uses more resources than it does, by assuming you meant 1024 Bytes per kB not 1000. &lt;strong&gt;But you will never accidentally lead somebody to think it uses less than it actually does.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course, it's not ideal to have to &quot;lose&quot; resources unnecessarily. But in the general case, the small difference is unlikely to be enough (especially as a student) to make their project unfeasible. In those specific cases where it does, they should already be measuring the exact footprints of everything and not assuming the sizes of anything from documentation alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The benefit however, is that your assumptions about what somebody else meant by &quot;2kB&quot; will not hurt you when they're wrong. Which in this specific case, and as a general lesson to your students - I feel is important.&lt;/p&gt;&#xA;" OwnerUserId="3876" LastActivityDate="2018-03-14T12:25:04.043" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4476" PostTypeId="2" ParentId="4464" CreationDate="2018-03-14T13:15:59.623" Score="3" Body="&lt;p&gt;As suggested in a comment, I'll add the following. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of an education goes beyond the learning of narrow technical skills. If you graduate with that, but nothing else you probably don't have a very bright future other than via some serendipity. There are &lt;em&gt;rare&lt;/em&gt; exceptions of course, but for every &quot;creator of a major OS who has people issues&quot; there are likely thousands of others who are isolated in their lives and unemployable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both the Prima-Donas and the total introverts (even the autistic) need to have a way to grow personally as well as professionally during their school years and CS instructors can't just leave it to someone else. Your job is to educate your students, not just present them with technical details. Part of the education of any professional today is learning how to work well in team situations. That is the purpose of student teams. It is not (NOT) the more efficient production of some software. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you need a way to give the social outliers a way to learn those skills, even if their natural tendencies lie elsewhere, and even if they don't do as well at socialization than at tech. They have to start and they have to advance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Furthermore, pairing like with like is sub-optimal: Homogeneity doesn't let them grow. If your superstars only work with other superstars they won't really learn much and might fight like cats and cats. At the other end of the scale (the extreme introverts) I predict long, unproductive, silences. People need to learn to work with people not like themselves - variety is the chocolate-of-life. Both of those traits limit the individual and both can be overcome. One of the best public speakers I know and an inventor of an important programming language is extremely introverted. He taught himself to overcome his &quot;handicap&quot; by playing a role when needed, not by changing his personality. My personal case is different. I am, by nature, very introverted, but have actually changed my personality and few, other than my spouse, recognize that introversion. I did it by forcing myself out into the open and then deciding that the consequences weren't as dire as I'd expected. Your personality isn't deterministic of what you can do, just how hard it is to do some things. But teachers need to help students, especially young students, deal with this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, in a team, it is possible that different people take different roles. It is best if you can find a way for them to switch roles (and in pair programming it is essential that they do so), but it may not always be possible or worth the disruption. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One option is to make your superstars tutors or teaching-assistants. If your project has roles, give them a non-programming role, since they won't learn much from just programming if they already excel there. Or give them a tester role. Or a tool builder role. But best if they can also learn to work with others. As a tool builder the rest of the team becomes their customer, similar for tester. They have to interact, but can't just take over. Their role may not require intense interaction with everyone else, but it does require some. Roles like this also confer responsibility on the individual while permitting them to do their own thing up to a point. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach the whole person, not just the geek. Expect that they are all different, with different strengths and weaknesses. Your job isn't to &quot;fill them up&quot;, but to &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1579220541&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;change their brains.&quot;&lt;/a&gt; &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-14T13:15:59.623" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4477" PostTypeId="1" CreationDate="2018-03-14T22:21:01.340" Score="5" ViewCount="126" Body="&lt;p&gt;I recently installed &lt;code&gt;jshell&lt;/code&gt; in my IDE for use in demoing concepts in AP CS A. It came at just the right time as it was a powerful way to teach ArrayLists and its associated methods required for the AP CS A Exam. Rather than having to compile, run, change, repeat, I could demo the methods dynamically and instantly show students the results in something closer to real time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I look ahead both to exam preparation and to next year's iteration of the course, I am wondering how others have used it and where it has been successful for student learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What topics in the &lt;a href=&quot;https://apcentral.collegeboard.org/pdf/ap-computer-science-a-course-description.pdf&quot; rel=&quot;noreferrer&quot;&gt;AP CS A curriculum&lt;/a&gt; are best suited to instruction via &lt;code&gt;jshell&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-04-02T20:12:13.530" Title="Use of jshell in AP CS A" Tags="|lesson-ideas|java|ap-computer-science-a|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4478" PostTypeId="2" ParentId="4477" CreationDate="2018-03-15T01:42:01.887" Score="2" Body="&lt;p&gt;A word of warning: I have not used jshell in my AP Computer Science A class, but I have used the Interactions Pane to teach about Racket for the last several years, so my answer comes from a slightly different context. However, I do teach AP Computer Science, so I am familiar with the course, if not with jshell.&lt;/p&gt;&#xA;&lt;p&gt;Regardless, after many attempts at tweaking my instructional approach with the Interactive Environment, I have recently decided that it is probably not a great way to go about instructing the class, and I am currently seeking new solutions.&lt;/p&gt;&#xA;&lt;h1&gt;The Good&lt;/h1&gt;&#xA;&lt;p&gt;Demos are quick, quick, quick in the interactive environment. You can create things with your students, have them code along, and have them see instantaneous results.  It makes the learning easy and fast!&lt;/p&gt;&#xA;&lt;h1&gt;The Not-So Good&lt;/h1&gt;&#xA;&lt;p&gt;As it turns out, easy and fast is not as helpful as it sounds, because &lt;em&gt;serious effort&lt;/em&gt; is the trigger that causes brains to undergo the arduous task of encoding difficult new information. And, true to form, I have found that my students remember very little from these demos.&lt;/p&gt;&#xA;&lt;p&gt;I have also found that these code-along experiences in an interactive environment provide particular difficulty when students try to take notes.  The best I have figured out is that they can copy and paste the entire session into a text file, but there are generally no comments to explain what is happening unless I write them in myself.&lt;/p&gt;&#xA;&lt;h1&gt;The Takeaway&lt;/h1&gt;&#xA;&lt;p&gt;An interactive environment is great tiny demos, perhaps on the scale of answering a question from a student. Otherwise, I would largely caution against the use of interactive environments as a part of lecture.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-15T10:03:35.623" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4479" PostTypeId="2" ParentId="430" CreationDate="2018-03-15T05:39:05.630" Score="3" Body="&lt;p&gt;I was this student.  Back then, we were learning BASIC in high school.  I had learned it when I was nine, and had already learned Pascal (the advanced language we'd learn next).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My high-school teacher responded to my question &quot;Do I really have to do this programming assignment?&quot; with the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I need something to grade for your classwork.  You may replace all the class assignments with one graded project (every six weeks); but, it has to be harder than all of the class assignments combined (and it had better be good).&lt;/li&gt;&#xA;&lt;li&gt;You still have to take the tests / quizzes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Today, I as so grateful that she permitted me to challenge myself.  She's one of the handful of High School teachers who's name I remember.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wrote a rudimentary chat system, an ASCII &quot;graphics&quot; editor, and a role-playing text adventure game (pre-GUI computing).  It was great, and my teacher would pop in from time-to-time to ask what I was doing, and remind me of the deadlines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Decades later, I'm still enjoying programming!&lt;/p&gt;&#xA;" OwnerUserId="4657" LastActivityDate="2018-03-15T05:39:05.630" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4480" PostTypeId="2" ParentId="64" CreationDate="2018-03-15T10:46:16.147" Score="1" Body="&lt;h1&gt;The pre-requisits&lt;/h1&gt;&#xA;&lt;p&gt;The only pre-requisites to using a computerised revision control system are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use of a computer.&lt;/li&gt;&#xA;&lt;li&gt;Use of a computer to, create some artefact (e.g. document), and to then improve on this artefact (create multiple revisions).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However It may be possible to teach a non-computerised revision control system.&lt;/p&gt;&#xA;&lt;h1&gt;What to revision control&lt;/h1&gt;&#xA;&lt;p&gt;The artefacts do not need to be source code. We often mix up revision-control with source-control. However revision control can be used for so much more.&lt;/p&gt;&#xA;&lt;p&gt;You can use revision control for every file in your home directory (I also revision control &lt;code&gt;/etc&lt;/code&gt;). However to get the best value from it, you will need a good diff tool for each file type. Thus making Microsoft's Office documents not a good choice.&lt;/p&gt;&#xA;&lt;p&gt;Therefore it may be better to start with some other artefacts, that are not programs.&lt;/p&gt;&#xA;&lt;h1&gt;Which tool.&lt;/h1&gt;&#xA;&lt;p&gt;There are many revision control tools. Three of the most powerful/popular are git, mercurial, and subversion. The tool that you start with, will make a large difference to the learning.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;git (&lt;code&gt;git&lt;/code&gt;): very powerful, distributed repositories, very hard to use/learn, flavour of the month, free repo hosting service available.&lt;/li&gt;&#xA;&lt;li&gt;mercurial (&lt;code&gt;hg&lt;/code&gt;): very powerful, distributed repositories, easy to use/learn, similar to git, free repo hosting service available.&lt;/li&gt;&#xA;&lt;li&gt;tourtoisehg: a graphical tool that integrated mercurial with the file explores, and other graphical tools, for Gnu/Linux and Microsoft's Windows.&lt;/li&gt;&#xA;&lt;li&gt;subversion (&lt;code&gt;svn&lt;/code&gt;): a slightly older tool, very powerful, centralised repository, supports locking where needed, makes it better for non-mergable documents, easy to use/learn.&lt;/li&gt;&#xA;&lt;li&gt;tourtoisesvn: a graphical tool that integrated subversion with the file explores, and other graphical tools, for Gnu/Linux and Microsoft's Windows.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-15T10:46:16.147" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4481" PostTypeId="2" ParentId="4477" CreationDate="2018-03-15T12:10:24.870" Score="-2" Body="&lt;p&gt;Let me second &lt;a href=&quot;https://cseducators.stackexchange.com/a/4478/1293&quot;&gt;BenI.'s post&lt;/a&gt; and go a bit further. My own experience with shell environments is that they are frustrating for all but the simplest things. And the APCS course is not about simple things. It is about teaching people to program (in Java) and also a bit about Computer Science in general. While students think a lot about the exam, I'd think, the real goal, as with any AP course, is to give a college level experience in high school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two possible uses of a shell program; in class demos and private self-learning. I think that a shell program is sub-optimal for both. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a classroom demonstration, it is true that the instructor can quickly set up a simple statement or two and see an immediate result, perhaps in answer to a question. But we, even instructors, do make mistakes, leading to re-doing the illustration (maybe more than once), since it is hard to edit a previous line. This can be boring for students and can take up valuable time. Some demos, in particular, require a certain amount of set-up before you can demo the key idea; populating an array, say. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, if the demo is quick it is less likely to be internalized by very many students. It leaves no permanent trace, though it can likely be saved. And the line-by-line responses of the shell may actually get in the way of the retention step, since the code that generated the transcript is not all in one place but dispersed throughout it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other use is self learning. Here, too, a shell is useful for answering quick questions, but again at the risk of not properly internalizing the result. I think that using a sophisticated IDE is more productive for learning. But not all will serve equally well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use Eclipse for nearly everything now. It isn't really an IDE, but, rather, a framework into which you can pour plug-ins to create and modify an IDE. It is usually used for Java programming, but can be used for other languages and even non-programming purposes. But even just as downloaded, it solves the quick-and-dirty demo problem as well as supporting sustained learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this is that it is organized around &lt;em&gt;workspaces&lt;/em&gt;. A workspace can contain one or more &lt;em&gt;projects&lt;/em&gt;. A project is a collection of files intended to work together, including source files, tests, jar files (for Java libraries, say), design notes, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When working alone or with others you are normally in one workspace developing one project. But you can have another project open at the same instant. The project is called something like DemoCode and contains a class or two that you use for testing ideas quickly. It has a main function and maybe a class or two. In this project you can easily create a method, static or not, and immediately test it by invoking it from main. There are surprisingly few &quot;extra steps&quot; in doing it here rather than from a shell. A click can take you from one project to another, and you can even have files from different projects open simultaneously in the workspace. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether done in a shell or in a program framework, you still have to type the code. If you create a method, you need a header, of course, but the name isn't very important since it is a demo. You can also type the instructions directly into main. When it is time for the next demo it is almost trivial to comment-out unneeded statements as Eclipse provides key combinations for commenting a block. You can also set up a common initialization for a collection of fragments. If you want to use a shell to try to understand, say ArrayList, you still need to create the list and populate it. In the IDE this is preserved for the future and can be corrected (edited) if mistakes are made since it is a saved text file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, there is no separate compile step in Eclipse, as it normally brings everything up to date on saving a file, which works fine, and instantly, in any project of student scope. Running the program after the first run is via a single mouse click (the first run is a menu selection). It can hardly be easier or quicker. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover (yet again), once you have typed the code into such a demo project it is available to edit in future, say via cut-paste-change, leaving the original in place but helping you with the new. More important, once you have typed the code, and saved it, you have it available for review later to aid your retention. You can also, in fact, copy code from the DemoCode project into the primary project, which is difficult (impossible?) to do from a shell program as the shell responses interfere with the copying. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, there is another way to use something like Eclipse as it (as others) incorporate the JUnit testing framework in your project. So instead of little code fragments, you can write tests and make assertions about the code. A set of tests can have a common set-up, say defining and populating a List, against which you run several tests, and the individual tests are all run independently of one another. Making assertions about code, I'll suggest, requires a somewhat higher form of understanding than just watching code run. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;There are two things supplementing the answering of student questions, whether you use an IDE or a shell. The &lt;a href=&quot;https://docs.oracle.com/javase/8/docs/api/overview-summary.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oracle Java Docs&lt;/a&gt; are online and can be consulted easily, perhaps via a Google Search for some classname or concept. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other is &lt;a href=&quot;https://stackexchange.com&quot;&gt;Stack Exchange&lt;/a&gt; itself, especially StackOverflow. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-15T12:10:24.870" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4482" PostTypeId="2" ParentId="4461" CreationDate="2018-03-15T12:27:13.240" Score="2" Body="&lt;p&gt;It may well be an intentional white lie. This suddenly reminds me back when over 20 years ago, in the department coffee room one professor said that it is better to flat out intentionally lie to oversimplify in the beginning. The students, overwhelmed with all these new and alien concepts already, cannot possibly have the capacity to follow and understand the complete truth at that point anyway. They must first understand the general and important ideas that we veterans take for granted and forget how difficult those ideas really are, before they are able to understand the nitty gritty details of the complete truth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back then the grad student me just couldn't understand why he would do that, although I did wisely hold my tongue. And now having taught intro Java myself for fifteen years, at some point I tell my students that I do exactly this, and one of these semesters (as usual, it is always the next one) I am going to carry with me one of those old time clicker counters and press it every time I tell such a white lie, and at the end of the course it should show a value of about thirty.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in the beginning when we write the first classes and methods, I say something like &quot;When you write a Java method, the order in which you write its statements is absolutely essential, because changing the order of two statements in a million line program could totally change the behaviour of not just that one method but the entire program. However, the order in which you write the fields and methods in the class can never make a difference to anything.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Click. Of course it can, since initializers are executed in the order of declaration. (And this order would probably affect the results of reflection also... but as I like to say in my classes whenever any questions of this nature spontaneously emerge, I type the question in Google search box and say &quot;O Stack Overflow, enlighten us again with your wisdom&quot; before pressing the return key to make students chuckle when I click the first link of the results page to read the Stack Overflow answer.) But at that point, it is enormously more important to make the students fully understand that methods are not executed in the order that they are written, but in the order in which the outside world invokes them. Any minor technical inaccuracy that I need to do to make them understand this is well worth the price.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Remember that we are dealing with people who need to be explained the difference between returning a value from the method versus printing it on the console.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we get to arrays, I don't use the terms &quot;pass by value&quot; and &quot;pass by reference&quot;, but simply say that when giving an array object as argument to a method, the method receives only the memory address where that array object is stored. The caller and the method therefore share the very same object, so any modifications that the method makes to the array object will remain there after the control has returned to the caller. And then compare the example methods&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int[] reverse(int[] a)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void reverseInPlace(int[] a)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In the last lecture of the course, I go through a bunch of interesting and important and interesting little details that I tell them would logically have belonged to the earlier lectures, but at that point would have only confused them. But now, having worked through all my labs and listened to the previous lectures, they are ready to learn and understand them. One of those little details just so happens to be the computer science terms &quot;pass by value&quot; and &quot;pass by reference&quot; (and why not take a peek at Wikipedia page &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Evaluation_strategy&quot; rel=&quot;nofollow noreferrer&quot;&gt;Evaluation strategy&lt;/a&gt;&quot; while we are at it, to give them a quick sneak preview of how programming paradigms other than that of Java really exist out there), which inspired me to write this response when I saw this question.&lt;/p&gt;&#xA;" OwnerUserId="3908" LastActivityDate="2018-03-15T12:27:13.240" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4483" PostTypeId="1" CreationDate="2018-03-15T13:40:49.947" Score="6" ViewCount="479" Body="&lt;p&gt;What skills should we strive to foster in our students that will make them good software developers in the future?  They are in our classes to learn coding skills, but what else do they need?  Collaboration skills?  Time management?  Tenacity?  Curiosity?  Persistence?  Some skills are needful in any career path, and we cannot emphasize them all.  On which should we concentrate?  How can we do this efficiently and effectively?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are charged with educating the next generation.  I'd like to make sure I do my students the service of not only making them good programmers, but also preparing them for the workplace, specifically as Computer Scientists, if that is what they desire.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what makes a good programmer?&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-21T20:15:18.163" Title="Which non-programming skills help make a good programmer?" Tags="|careers|soft-skills|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4484" PostTypeId="2" ParentId="4483" CreationDate="2018-03-15T14:05:24.997" Score="0" Body="&lt;p&gt;I think that all of your suggested items are needed and some are difficult to teach other than by example. But let me focus on one aspect, especially, that can be taught. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good programmer needs a variety of strategies for getting their own questions answered and the desire to get them answered quickly. This means that you cannot be their sole source of information. If you teach at least part of the time in a lab situation, or with a projected computer screen image you can demonstrate how you use, google, wikipedia, language documentation, StackOverflow, etc. in answering questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a &quot;what does ... do&quot; question arises, you can quickly write a code fragment that illustrates it, giving them the hint that they can do that too. You could even make an assignment to have students write short code fragments to illustrate an idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some answers can also come from people, especially their peers. This is one reason for encourage pairing and teamwork. It isn't the answers themselves that are the key here, but the strategy for quickly finding the answers. And, since writing isn't one of your suggestions, but is important to any professional, you could have students who answer questions for others, write the answers up. I used to use a wiki for this purpose. Over time, it became a valuable resource in itself. Mailing lists to which every student can ask and answer questions also help. Also, being helpful to others is a valuable skill as well, so this helps with that, also. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming assignments could possibly be accompanied by footnotes that reference relevant online (or book) material to show how their code is related to what has been done by others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can probably think of other strategies, but don't keep them to yourself. Be sure that you demonstrate them and have the students utilize them with some evidence that they can do so on their own. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-15T16:38:19.197" LastActivityDate="2018-03-15T16:38:19.197" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4485" PostTypeId="2" ParentId="4461" CreationDate="2018-03-15T17:24:47.600" Score="3" Body="&lt;p&gt;In an introductory Java class, I think it's fine to say that primitives are passed by value and that objects are passed by reference. That tells students what they need to know, although I might phrase it differently. (I'd say that primitives and references are copied when they're passed.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an upper-division programming languages course, I'd go into more detail about calling conventions and the full story about pass-by-value and pass-by-reference (and pass-by-name, so I can tell &lt;a href=&quot;http://wiki.freepascal.org/Niklaus_Wirth&quot; rel=&quot;nofollow noreferrer&quot;&gt;the joke about Niklaus Wirth&lt;/a&gt;), if there's time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I love for students to catch my mistakes and white lies, I think it might be nitpicky to do so in this case. If you feel a need to bring it up, go to the professor's office hours and express confusion reconciling what he said with what you've read online (perhaps citing a specific source). If he's a decent professor, he'll admit to having oversimplified or he'll accept the new knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After reading &lt;a href=&quot;https://cseducators.stackexchange.com/a/4490/283&quot;&gt;Kevin Workman's answer&lt;/a&gt;, I see the problem with using the term &quot;call by reference&quot;. I agree that no good can come from misusing that term. My second and third paragraphs still stand.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2018-10-09T15:47:21.853" LastActivityDate="2018-10-09T15:47:21.853" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4486" PostTypeId="2" ParentId="4304" CreationDate="2018-03-15T19:55:37.050" Score="3" Body="&lt;p&gt;I've been that student. Now I'm that teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are dialogues that I've had:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: I honestly can't tell &quot;if&quot; it'll be useful to you. But I'd rather&#xA;  we thought of it as &quot;how&quot; is this useful to you. How do you tell any&#xA;  machine what to do? For example how do you tell the&#xA;  washing machine to wash the clothes?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Student&lt;/strong&gt;: (Most common answer) &lt;em&gt;You push the button!&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: Excellent! But part of school is to help you learn to &lt;em&gt;think&lt;/em&gt;. So&#xA;  instead of just showing you how to use the machine, I'd like you to&#xA;  think about how does the button press make the machine wash its&#xA;  clothes. &lt;em&gt;How&lt;/em&gt; does the machine know what to do?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Student&lt;/strong&gt;: (usually thinking) Ummm...&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: Let's write down all what needs to be done when the button is pressed:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;(we note some steps: start water, turn on the &quot;rotating bucket&quot;, flow&#xA;  detergent and stop after 45 minutes)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: Does the machine understand English?&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Student&lt;/strong&gt;: NO! It's a machine! (usually followed by giggles)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: Alright, so how do we &quot;talk&quot; to it? (carry this toward the notion&#xA;  of a &lt;em&gt;language&lt;/em&gt; that only computers can understand. Keep it high level&#xA;  and dig deeper only if they're curious).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: Let's say that the machine only understands Python (or the language you're teaching). How can we tell the machine to do all the above steps?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This helps them at least understand why we need to program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this I give them an exercise on &quot;giving instructions to someone&quot;. Intentionally ambiguous so that they can easily misinterpret it in hundred different ways. Like ask them to get me a Peanut butter and jelly sandwich the next day and we'll snack it in the class. Say it's for &quot;me&quot; (i.e., the teacher).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Intentionally critique them like &quot;but I wanted it toasted&quot; or with &quot;less butter&quot; etc., Students usually go &quot;&lt;em&gt;But you didn't tell us that! How do we know?&lt;/em&gt;&quot;. That's &lt;em&gt;exactly&lt;/em&gt; what you want!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now educate them to the benefits of being precise! When you give instructions to a computer you have to be very precise. With humans the more ambiguous you are the more confusing things get.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, now we come full circle to why learn programming? It's the art of being specific - &lt;em&gt;that&lt;/em&gt; is what we want to teach/learn. No matter what job you do, it'll come in handy. You'll realize what it means to be specific and &quot;how specific&quot; is good enough. The act of talking to a machine is just a fun way to teach you this. You may not use it, but at least you'll know something about it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've had great success with this with kids of all ages. It helps sink things in. Know why it's useful and what's the point are the best questions IMHO.&lt;/p&gt;&#xA;" OwnerUserId="4677" LastActivityDate="2018-03-15T19:55:37.050" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4487" PostTypeId="2" ParentId="4239" CreationDate="2018-03-15T20:09:03.273" Score="1" Body="&lt;p&gt;A computer is &lt;em&gt;blind&lt;/em&gt; conceptually speaking. Even if you gave it a camera, it cannot &quot;see&quot; per se. It has a translation of what is viewed to bits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now to the blind student. Image Processing is similar to how folks without sight process things - they &quot;feel&quot; their environment for &quot;signals&quot; and make a conclusion about what it is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A computer does the exact same thing, but with math. Ask them to feel a stick. Easy. Now draw the stick on the floor/paper and ask them to say if a stick or triangle exists on the paper. Really hard. Ask them how would &lt;em&gt;they&lt;/em&gt; know &lt;em&gt;if&lt;/em&gt; a triangle is on the paper. Feel the edges? Anything else? How about everytime there's a triangle a new sound is heard? Be creative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now talk to them about &quot;rasterization&quot;. Think of handling them one sliver at a time, and if anything is different by feeling, they note it. Can they &quot;conclude&quot; a triangle after seeing various cuts of the paper?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This exercise can be naturally extended to Image Processing and then math can be explained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Graphics is different. It lives in the visual plane and the idea is to &quot;draw&quot; it. A good introduction is this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Problem statement: Draw a line on a graph/matrix and each &quot;cell&quot; must be filled in. Which cells to fill in between points A and B when &quot;drawing this line&quot;.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extending this to blind students could be done with toys/pins etc., How would they know which spots to &quot;fill in&quot; to get as straight a line as possible? What does a &quot;straight line mean&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This discussion could lead to things about using a line's slope (i.e., math) to figure which pixels to color on a raster display. Same thing with Circles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd start here first. Once that's done, to move to transformations - moving things in space. Easy to feel and then take to the math.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't worked with the blind, but I imagine such exercises/parallels with their sensory world could be useful.&lt;/p&gt;&#xA;" OwnerUserId="4677" LastActivityDate="2018-03-15T20:09:03.273" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4488" PostTypeId="2" ParentId="4483" CreationDate="2018-03-15T20:44:31.557" Score="2" Body="&lt;p&gt;As well as those (what are sometime referred to as soft) skills. I would say that there are other skills that are needed to be a good programmer. Not all of these would I expect to see in a graduate. However I would expect to see some.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Gnu/Linux / Unix skills.&lt;/li&gt;&#xA;&lt;li&gt;Revision control.&lt;/li&gt;&#xA;&lt;li&gt;Agile.&lt;/li&gt;&#xA;&lt;li&gt;Software Project management (most project management courses teach logistics, Software Project management is not logistics).&lt;/li&gt;&#xA;&lt;li&gt;Unit testing.&lt;/li&gt;&#xA;&lt;li&gt;Functional testing.&lt;/li&gt;&#xA;&lt;li&gt;Automation: testing, build, deployment, code generators (DSLs), …&lt;/li&gt;&#xA;&lt;li&gt;Design by contract.&lt;/li&gt;&#xA;&lt;li&gt;Pattern (not just GOF).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-03-18T17:21:08.280" LastActivityDate="2018-03-18T17:21:08.280" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4489" PostTypeId="2" ParentId="4483" CreationDate="2018-03-15T23:19:36.187" Score="8" Body="&lt;p&gt;I don't think this question can be answered in any meaningful way. There isn't a finite list of skills that you need to be a programmer, or that make you a better programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science is a huge field encompassing just about every job you can imagine, and each of those jobs requires a different skillset. No matter what your interests are, chances are you can find a place for yourself in the industry somewhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Skills that make one person a good programmer won't necessarily benefit another programmer. One programming job might require an artistic background, whereas another job might require a mathematics background, or a managerial background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best answer to this question is going to be very broad.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;So, what makes a good programmer?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The ability to learn.&lt;/strong&gt; Most programming is not actually writing code. Most programming is reading tutorials, running example code, and looking stuff up in documentation. Programming is more of a craft than people realize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The ability to break things down into smaller pieces.&lt;/strong&gt; Again, programmers don't sit down to code as soon as they're given a task. They have to spend a significant amount of time breaking the task down into smaller steps, and then taking those steps on one at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The ability to ask questions.&lt;/strong&gt; This might mean looking stuff up in the documentation, or on Google, or on Stack Overflow. It might mean asking a colleage or even a &lt;a href=&quot;https://en.wikipedia.org/wiki/Rubber_duck_debugging&quot; rel=&quot;noreferrer&quot;&gt;rubber duck&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best software teams are comprised of a bunch of different people from a bunch of different backgrounds, with a bunch of different skills. Instead of trying to focus on a particular set of skills your students need, I'd recommend looking at the skills your students already have and helping them explore those skills in a computer science setting. Have a student who likes art? Cool, teach them about creative coding. Have a student interested in statistics? Teach them about data visualization. Have a student interested in mechanics? Teach them about robotics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't ask what skills you need for computer science; ask what computer science you can do with your skills.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-03-16T23:38:39.377" LastActivityDate="2018-03-16T23:38:39.377" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4490" PostTypeId="2" ParentId="4461" CreationDate="2018-03-15T23:29:30.393" Score="5" Body="&lt;p&gt;I've encountered experienced C and C++ developers who are convinced that Java is pass-by-reference for objects. One example I've used is this one:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void changeInt(int x){&#xA;  x = 42;&#xA;}&#xA;&#xA;void changeString(String x){&#xA;  x = &quot;hello world&quot;;&#xA;}&#xA;&#xA;void testChanges(){&#xA;  int i = 0;&#xA;  changeInt(i);&#xA;  System.out.println(i); // still 0&#xA;&#xA;  String s = &quot;test&quot;;&#xA;  changeString(s);&#xA;  System.out.println(s); //still test&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;changeInt()&lt;/code&gt; function fails to change the value of the parameter, because it's pass-by-value. But then the &lt;code&gt;changeString()&lt;/code&gt; function also fails to change the value of the parameter- because it's also pass-by-value.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also really like &lt;a href=&quot;https://javaranch.com/campfire/StoryCups.jsp&quot; rel=&quot;noreferrer&quot;&gt;Cup Size -- a story about variables&lt;/a&gt; and its follow-up &lt;a href=&quot;https://javaranch.com/campfire/StoryPassBy.jsp&quot; rel=&quot;noreferrer&quot;&gt;Pass-by-Value Please&lt;/a&gt; to explain the difference between pass-by-value and pass-by-reference from a Java perspective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, as for whether you actually bring this up to your teacher, I'm not sure. If I were you I'd probably just bite my tongue and move on with my life.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-03-15T23:29:30.393" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4491" PostTypeId="2" ParentId="4483" CreationDate="2018-03-16T06:15:21.330" Score="4" Body="&lt;p&gt;I am answering from the perspective of a recently retired software engineer who worked in a number of Silicon Valley companies from small startups to large corporations with thousands of engineers all over the world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question seems very broad. I will narrow it down to the one non-programming class in high school that had the biggest positive impact on my professional career. That class was &quot;English Composition&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ability to both request and provide information in a clear and concise manner is extremely valuable for working efficiently in an engineering environment. Worked demonstrations of this –&#xA; positive as well as negative –&#xA;can be found among the questions and answers on our companion site Stackoverflow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a global work environment that spans many time zones, and where synchronous communication is frequently just not feasible, these writing skills already come into play when dealing with the numerous daily emails. It extends further to internal memos, design documentation, and quite possibly published articles.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Over the years I expanded on the skills that I acquired in that high-school class, for example by adding the element of cultural awareness. I learned the hard way that idiomatic expressions such as &quot;right on the money&quot; or &quot;out in left field&quot; can be quite confusing when writing for a global audience which often includes many non-native speakers of English.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastActivityDate="2018-03-16T06:15:21.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4493" PostTypeId="2" ParentId="4461" CreationDate="2018-03-16T11:30:51.980" Score="1" Body="&lt;p&gt;The usual &quot;explanation&quot; like &quot;Java passes primitive types by value and other by reference&quot; is rather confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In languages like C, C++, Fortran,  etc. variables &lt;strong&gt;contain&lt;/strong&gt; data. Then a variable is a chunk of memory with a name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The explanation of parameter passing by value or reference) doesn't work well for languages (Java, PHP, Lisp, Python etc) where variables are names for &lt;strong&gt;references&lt;/strong&gt; to data sitting somewhere in memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is transmitted is the reference to the data. In all cases.&#xA;The explanation fits well for primitive type : in&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int n = 3;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;consider n as holding a reference to an immutable constant integer value. And a call to &lt;code&gt;foo(n)&lt;/code&gt; transmits the reference to that constant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, it happens that the variables of primitive types are not really implemented as variables containing references to objects. It's a tradeoff for efficiency in Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We'd better avoid using concepts which are pertinent for some  - historically predominant - Fortran, Cobol, Algol, Pascal ...) langages to another category where they are much less adequate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not all languages have PICTURE and USAGE like COBOL. So we don't use these concepts to explain other programming languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: maybe the explanations about parameter passing focus too much on passing &lt;em&gt;variables&lt;/em&gt;.  I remember old-time FORTRAN where the statement&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  call FOO(2+2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;could modify some constant in memory :-)&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-03-19T08:54:34.303" LastActivityDate="2018-03-19T08:54:34.303" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4494" PostTypeId="1" CreationDate="2018-03-16T11:54:32.417" Score="5" ViewCount="283" Body="&lt;p&gt;I am teaching destructors in C++ and would like to give the students an interesting homework exercise that requires them to build a class with destructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In previous years, the homework were something like &quot;write a linked list, but do not use the classes in the STL&quot;. I do not like this - I tell my students that they can use whatever feature of the language that they want, even if we did not learn it in class yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is, for every other exercise that I could think of (e.g, tree, graph, etc.) I could easily think of a solution using STL features, that does not require any destructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is an interesting exercise where destructors are really needed?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2018-03-18T18:18:33.167" Title="A meaningful exercise that requires using a destructor" Tags="|object-oriented-paradigm|exercises|homework|c++|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4495" PostTypeId="2" ParentId="4494" CreationDate="2018-03-16T12:12:13.417" Score="1" Body="&lt;p&gt;I'm not a native of C++, but it seems to me that a Conway's Game of Life simulator, with cells as immutable objects, would be a great way to show the need for a destructor.  Without one, your program would quickly run out of memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, of course, it's not a bad approach to the problem.  All you'd have to do to demonstrate why such an approach is reasonable is to first try the naive approach of modifying the active gameboard to figure out the next turn.  This, of course, always leads to incorrect behaviors, since the modification of one cell will be used in the calculation of the next cell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final advantage is that you will also be introducing your students to an important and interesting other algorithm in its own right.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-03-16T12:12:13.417" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4496" PostTypeId="2" ParentId="4494" CreationDate="2018-03-16T12:12:28.340" Score="4" Body="&lt;p&gt;Create an object that creates a new file and writes in to it over several method invocations (not just one). Assure that the object has been deleted before continuing (Make the object go out of scope on the stack or delete a reference and let the reference go out of scope.) You need to assure that he file was closed. The destructor is the proper place to assure that this happens. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To verify that it works correctly, create a different object that reads from the file. If the first object didn't properly close the file this won't be possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some, at least, operating systems you don't even need the second part. The file won't appear in the file system if it was never closed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for wanting the file written over several invocations of some method(s) is that, if it is just one, an explicit close would be natural in that method. The reason for wanting any references to go out of scope is to assure you that the first object has no effect on the second. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Edited for clarification.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-16T20:16:31.430" LastActivityDate="2018-03-16T20:16:31.430" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4497" PostTypeId="2" ParentId="4494" CreationDate="2018-03-16T12:22:49.123" Score="1" Body="&lt;p&gt;A separate approach entirely from my other answer is to code the main method of a project yourself, but ask your students to build the classes that will make your main method accomplish its task.  This actually opens back up projects like linked lists, as your main will use a slightly different spec than the natural C++ library in any case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just include calls to the destructors of the classes when appropriate, and your project will quite naturally require destructors.  And if your project requires any substantial amount of composition, failure to use destructors properly across the project will cause the program to run out of memory.  Thus, you will be modeling the need first by directly calling destructors, and secondarily in a way that causes them to see the need themselves, with the students having to both design and call the relevant destructors for objects held through composition.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-03-16T12:29:45.483" LastActivityDate="2018-03-16T12:29:45.483" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4498" PostTypeId="1" CreationDate="2018-03-16T15:13:15.593" Score="5" ViewCount="742" Body="&lt;p&gt;The notion of &quot;Study Guide&quot; was unknown to me before moving to the US (I don't think I was ever given one during my studies in France).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that the goal of a study guide is three-fold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;To list all the topic that will be on the exam,&lt;/li&gt;&#xA;&lt;li&gt;To provide some hints to the students as to how to revise,&lt;/li&gt;&#xA;&lt;li&gt;To help them deal with their stress.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In the case where everything that was covered so far will potentially be on the exam, I feel like students shouldn't need one: they should be able to list all the topics by going through their notes (or through my detailed syllabus), they need to learn how to revise on their own (it is difficult to have a &quot;general recipe&quot; that works for everyone), and they need to learn how to deal with their stress on their own (I'm talking about college students).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, during class, I gave them plenty of advises, examples, problems, partial feedback, and highlighted what the key ideas and critical topics are. They had multiple short tests (quizzes) and projects, and I went over them in class. I tried to help them assess how well they know the content of the course during class, and I am open to meeting them. I know that teaching is about repetition, but listing this information &lt;strong&gt;once more&lt;/strong&gt; doesn't seem so useful to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I overlooking one aspect that make study guide really critical to students? What is your personal practice? &lt;/p&gt;&#xA;" OwnerUserId="2877" LastEditorUserId="2877" LastEditDate="2018-03-16T18:15:25.963" LastActivityDate="2018-03-16T23:18:33.130" Title="Usefullness of Study Guide" Tags="|struggling-students|student-perceptions|materials-review|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4499" PostTypeId="2" ParentId="4498" CreationDate="2018-03-16T16:02:59.330" Score="4" Body="&lt;h1&gt;Goal-oriented action&lt;/h1&gt;&#xA;&lt;p&gt;Part of this really depends on your goals in administering the exam.  If your goal is the traditional idea of creating a nice bell-curve to rank students, having a study guide makes very little sense. You can separate the wheat from the chaff without providing any assistance to the students prior to the test.&lt;/p&gt;&#xA;&lt;p&gt;However, if you want to utilize the tremendous cognitive benefits of testing to actively &lt;em&gt;help&lt;/em&gt; your students learn, then you're looking at a whole different set of priorities.  There is a lot of research on the benefits of testing in the learning process.  Unfortunately, I don't have access to my bookshelf right now, but the incredible book &lt;em&gt;How People Learn&lt;/em&gt; summarizes the results very nicely.&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h1&gt;How do tests help?&lt;/h1&gt;&#xA;&lt;p&gt;Basically, tests accomplish two things that really help us to learn.  First, there is retrieval practice, which is simply giving the brain a chance to practice holding on to (and recalling) information.  The second is emotional: by giving the information heightened emotional importance, we increase our chances of actually encoding it.&lt;/p&gt;&#xA;&lt;p&gt;So, where does a study guide fit in?  Having a list of topics isn't as useful as you might think for an examination. If I tell you that you're going to have an examination on &amp;quot;Operating Systems&amp;quot;, there's not a lot to go on.  You might get to the exam and find questions about threading, or disk management, or you might find questions about how to transfer photographs between an iPhone and a Linux box.  There's little to focus your studies, and you may find that you have expended a great deal of effort studying things that your teacher does not consider to be the core, central ideas of the course.&lt;/p&gt;&#xA;&lt;p&gt;My example is over-the-top, but this is done purposefully to illustrate the problem.  Your subtopics may not seem as broad as &amp;quot;Operating Systems&amp;quot;, but in a field of &lt;em&gt;effectively infinite knowledge&lt;/em&gt;, you are presuming that students have gleaned what the important core ideas are for your class from readings and from listening to you during your lectures.  For some kids this will work.&lt;/p&gt;&#xA;&lt;p&gt;But what about the kid who missed something?  Perhaps they didn't understand something really fundamental about one of the sub-topics.  Or perhaps they got sick and missed a class.  Or perhaps they've just forgotten some things thoroughly enough that they really can't recall what the important ideas were.&lt;/p&gt;&#xA;&lt;h1&gt;Creating a good guide&lt;/h1&gt;&#xA;&lt;p&gt;A study guide is your chance to give some very gentle guidance.  Take your syllabus, and write a sentence or two for each topic that starts with, &amp;quot;Make sure you understand ...&amp;quot; or &amp;quot;You should be able to ...&amp;quot; or &amp;quot;The most important idea here is ...&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;This is a relatively easy task, but even this small amount of guidance will help your students to focus their studies on the most important ideas of your course.&lt;/p&gt;&#xA;&lt;p&gt;You can actually go a lot further with this effort if you want to, and there are good reasons to consider putting a lot of effort into the guide.  &lt;em&gt;Your efforts here can have an outsized impact on your students.  This is what they will study, so what you put here is what your students are likely to remember when they leave your classroom for good.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - All I could find online were a few articles about single studies here and there.  &lt;a href=&quot;https://www.scientificamerican.com/article/researchers-find-that-frequent-tests-can-boost-learning/&quot; rel=&quot;nofollow noreferrer&quot;&gt;This&lt;/a&gt; is probably the best I can do for now.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-16T16:02:59.330" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4501" PostTypeId="2" ParentId="4498" CreationDate="2018-03-16T17:17:51.960" Score="4" Body="&lt;p&gt;In many ways the best study guide is one that the students themselves write. This can be done incrementally throughout the course and is useful even in the absence of exams. There are two ways to go about it, and you can, perhaps do both. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each student should have a deck of index cards and they should carry a few around with them. They can take notes of important things on the cards as class proceeds, with only a few words on each card. At the end of each class period spend a moment or two asking members of the class to tell you the most important idea (or three) that came up during the class. The other students can update their cards as you confirm the big ideas. Then at the beginning of the next class ask for the most important ideas of the previous one, just as a quick review. See this post for more: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/327/note-taking-policy-laptops-or-by-hand/1168?s=1|5.5861#1168&quot;&gt;Note-taking policy: laptops, or by hand?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second idea is a wiki to which the class can contribute throughout the term. They can add &quot;articles&quot; to the wiki and you can edit them and/or comment on them. Mostly they will be questions from one student answered by another or by you, but it builds a record of the class written largely by them. So, the ideas for review come from them, not from you. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-16T17:17:51.960" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4502" PostTypeId="2" ParentId="4498" CreationDate="2018-03-16T18:11:43.637" Score="4" Body="&lt;p&gt;I do study guides because some students may need to list the information just &lt;strong&gt;once more&lt;/strong&gt; to get it.  What if they hadn't had that opportunity?  They may have missed it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, let's face it, do a lot of students, especially those at the high school level, have the self-discipline to go over the material once more unless they have a compelling reason? Even a test may not be a compelling reason.  But a study guide is something I rarely have students completely ignore.  They will turn it in, maybe not with all the correct answers, but they will give it a reasonable attempt (let me say as an aside here that I don't always grade for correctness, sometimes just completeness).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students who don't need the study guide - who already have the material, or who have good study skills - will see it as a nuisance but will do it anyway without much effort.  Those who can benefit from it are your real target.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-16T18:11:43.637" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4503" PostTypeId="1" AcceptedAnswerId="4508" CreationDate="2018-03-16T18:39:27.103" Score="6" ViewCount="294" Body="&lt;p&gt;I'm preparing some exercises to introduce software developers who have no experience with Scheme to the language. Part of the exercises are simple things like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;Create a function that squares a number passed to it&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been sort of debating whether or not I should include answers to the exercises or if I should provide them as a separate document.  I think it would help the students to be able to examine one approach to doing this--a reference implementation as it were.  But I do have some concerns about the students not even trying to do the exercise themselves before looking at the answers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should I provide answers to the exercises? If so should I include them as a part of the document with the exercises or as a separate document?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize this is a vague question so if I need to narrow it please just tell me. I can't think of a less generic way to ask the question right now.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2018-03-24T06:40:18.073" Title="Should I Provide Answers To Exercises?" Tags="|curriculum-design|exercises|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4504" PostTypeId="2" ParentId="4503" CreationDate="2018-03-16T20:26:44.780" Score="3" Body="&lt;p&gt;Reading an answer is not the same thing as solving a problem. I think different areas of the brain are engaged. Solving the problem yourself is a stronger reinforcement of the ideas certainly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frustration is a mind killer. Students shouldn't be frustrated when they are trying to learn and as novices they have few tools for problem solving. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to resolve the dilemma, yes, make answers available, but not in the same document and not at the same time. One way is to provide answers only when asked, and after some assurance that the student has spent some mental effort on the exercise. If an exercise is given on Monday, don't provide answers until Wednesday, for example, or some variation on that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the size of your student group isn't too large you could give out answers only one-to-one on personal request. You could examine the student solution ideas to dispel any misconceptions. If you get a lot of requests you may need to change your teaching a bit, so that the exercise becomes more natural. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option, and this one for when your student numbers are too large to engage individually, is to provide answers (after an interval) for only half of the exercises and assure that the ones that are not answered by you cover the same concepts as those you do answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third option is to provide an additional exercise on the same topic with any answer for a given exercise. Give the student a way to exercise the grokking part of the brain, not just the reading part. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-16T20:26:44.780" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4505" PostTypeId="2" ParentId="4503" CreationDate="2018-03-16T21:02:56.180" Score="4" Body="&lt;p&gt;Don't provide code dumps. Provide guides that outline &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;the process&lt;/a&gt; of solving the problem.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a function that squares a number passed to it&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Don't just give out a fully-coded solution. The answer to this question is not as simple as regurgitating the syntax. It's a process of breaking the question down into smaller steps and taking those steps on one at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might start like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When you encounter a question like this, you might start by breaking&#xA;  it down into its individual parts.&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;We know we need to create a function.&lt;/li&gt;&#xA;  &lt;li&gt;We know the function needs to take a numeric argument.&lt;/li&gt;&#xA;  &lt;li&gt;We know the function should return the square of the number passed into it.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And if the students are writing and running the code, it might continue like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Now that we have these steps written down, we can start implementing&#xA;  them one at a time. Let's start by creating a function:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void square(){&#xA;  System.out.println(&quot;here&quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;We might run this function to double-check that it's working how we&#xA;  expected. Next let's add an argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void square(int number){&#xA;  System.out.println(&quot;number: &quot; + number);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;Finally, let's add a return type to the function and return the square&#xA;  of the number:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int square(int number){&#xA;  return number * number;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or if students are writing their code down on paper, it might look like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Start by writing the function definition. We know it needs a numeric&#xA;  return type and that it should take a numeric argument:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int square(int number){&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;Next, we need to create the square of the number:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;  int numberSquared = number * number;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;Finally, we need to return this value:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return numberSquared;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &#xA;  &lt;p&gt;Putting it all together, it looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public int square(int number){&#xA;  int numberSquared = number * number;&#xA;  return numberSquared;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Just giving out a full code solution doesn't really help with the actual process of writing code, which is what you're actually teaching.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-03-16T21:02:56.180" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4506" PostTypeId="2" ParentId="4498" CreationDate="2018-03-16T23:18:33.130" Score="4" Body="&lt;p&gt;I have seen instructors call a wide range of documents &quot;study guides&quot;.  They have ranged from test &quot;simulations&quot; which are old tests with tweaked questions to a 1 page .txt print out with a bullet list of important topics to study.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also seen instructors spend an entire lecture on just test review mail but not hand out any documents.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience as a student, the combination of some time, even ~30 min. in class as a test review is very helpful.  The slides from that test review can serve as an effective study guide that students can access if they are inclined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with you that college students should have the personal responsibility to basically not require a separate study guide document.  I hear complaints term after term that some test was not similar enough to the study guide, the guide was not clear enough, etc.  Some students will definitely study to the test by way of only studying to the guide. Many don't even take many notes since the study guide is expected before a test.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have an answer but that has been my experience with them. &lt;/p&gt;&#xA;" OwnerUserId="4467" LastActivityDate="2018-03-16T23:18:33.130" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4507" PostTypeId="2" ParentId="4503" CreationDate="2018-03-17T00:44:17.620" Score="2" Body="&lt;p&gt;I think this answer is a little different, please remand me if not - I provide an &lt;em&gt;algorithm&lt;/em&gt; with my coding assignments, and I almost always have code I can point to in their notes or previous assignments that is exactly what they need to fill in the algorithm.  First I give a general description of the problem: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Create a Windows forms application named &lt;strong&gt;Squares&lt;/strong&gt; with a text box,&#xA;  a button,  and a label.  When the user enters a number in the text box&#xA;  and presses the button, get the number, square it, and write the&#xA;  square to the label.  Write a  function to take the number and return&#xA;  the square.  Be sure you handle invalid input.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If that's all they need to read, they can go from there.  If they need to read further, then what follows &lt;em&gt;in the same document&lt;/em&gt; is the step by step algorithm, but not code.  If they get stuck in the algorithm, on, for example, a line that says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Declare an integer variable to hold the value from the text box.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then I point them to their notes for a myriad of examples for how to declare an integer variable, or even to a previous, simpler exercise where they had to do it.  In other words, I make them find the answer themselves.  This gives them a greater feeling of accomplishment and also makes them less dependent upon me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that by giving them this &quot;scaffolding&quot;, I rarely have to provide an actual code solution, but will upon request.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-17T00:44:17.620" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4508" PostTypeId="2" ParentId="4503" CreationDate="2018-03-17T14:47:17.380" Score="5" Body="&lt;p&gt;I post solutions after the due date of an assignment. And usually, I'll go over them in class as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two birds...&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Students get to see at least one working solution, although I try to come up with several. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Posting the solution serves as a good block to students asking to turn in assignments late. They'll understand pretty well that they can't turn it in late after I've already posted solutions.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I've been trying this year to make videos of me working through the problems. Sometimes they'll be screencasts of me working through the problem in front of the class. Sometimes they'll be a little more scripted and recorded when there aren't students listening. Usually it's the shorter problems where I'll just record myself during class and the longer ones that I script out a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another activity I like is to do code reviews. I'll screen shot several student submitted solutions and we'll go over them anonymously. I'll include a couple that are really good solutions. But, better than that, I'll also include a few that are really close but not quite a working solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On some assignments, especially those that are a little more difficult, I'll provide a pseudocode algorithm with the assignment as a bit of a cheat sheet. Nothing that can be just typed in, but sometimes students need a little bit of a nudge in the right direction. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2018-03-18T15:59:37.240" LastActivityDate="2018-03-18T15:59:37.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4509" PostTypeId="2" ParentId="4494" CreationDate="2018-03-17T19:09:11.733" Score="0" Body="&lt;p&gt;OK, here is an idea. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Write a class Member that keeps track of members in a social network. Each member can follow/unfollow other members and know how many people he/she follows/followed by. Additionally the system keeps track of the number of active members. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Here is a sample main program:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Member avi, beni, chana;&#xA;&#xA;void test1() {&#xA;    Member dana;&#xA;    chana.follow(dana);&#xA;    dana.follow(avi);&#xA;    cout &amp;lt;&amp;lt; &quot;  &quot; &amp;lt;&amp;lt; chana.numFollowers() &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt;  chana.numFollowing() &amp;lt;&amp;lt; endl; // 0 1&#xA;    cout &amp;lt;&amp;lt; &quot;  &quot; &amp;lt;&amp;lt; avi.numFollowers() &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt;  avi.numFollowing() &amp;lt;&amp;lt; endl; // 1 0&#xA;    cout &amp;lt;&amp;lt; &quot;  &quot; &amp;lt;&amp;lt; Member::count() &amp;lt;&amp;lt; endl; // 4&#xA;}&#xA;&#xA;int main() {&#xA;    cout &amp;lt;&amp;lt; chana.numFollowers() &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt;  chana.numFollowing() &amp;lt;&amp;lt; endl; // 0 0&#xA;    test1();&#xA;    cout &amp;lt;&amp;lt; chana.numFollowers() &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt;  chana.numFollowing() &amp;lt;&amp;lt; endl; // 0 0&#xA;    cout &amp;lt;&amp;lt; avi.numFollowers() &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt;  avi.numFollowing() &amp;lt;&amp;lt; endl; // 0 0&#xA;    cout &amp;lt;&amp;lt; Member::count() &amp;lt;&amp;lt; endl; // 3&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;What do you think?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2018-03-17T19:09:11.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4510" PostTypeId="2" ParentId="4494" CreationDate="2018-03-18T18:18:33.167" Score="3" Body="&lt;p&gt;There are 2 good examples of patterns where the destuctor is a key.&lt;br&gt;&#xA;This way you can teach a couple of useful patterns on the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.cppreference.com/w/cpp/language/raii&quot; rel=&quot;nofollow noreferrer&quot;&gt;RAII - Resource Acquisition Is Initiation&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://en.cppreference.com/w/cpp/language/rule_of_three&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rule of 3/5/0&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's easy to give a RAII assignment, just any C style handle that can be released in the end (Like a File handle, windows handle, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are more advanced, you can try and teach about shared pointer implementation and have them attempt that (which could get tricky if you want to go into thread safety, etc.&lt;/p&gt;&#xA;" OwnerUserId="4705" LastActivityDate="2018-03-18T18:18:33.167" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4511" PostTypeId="2" ParentId="4477" CreationDate="2018-03-18T21:29:45.270" Score="3" Body="&lt;p&gt;I have found jshell to be very useful.  It can be used to inspect classes quickly and easily.  You can import any standard library class.  You can also import user-generated classes using the &lt;code&gt;/open&lt;/code&gt; command.  It can be very helpful in generating test cases.  You can save your explorations to a file by entering &lt;code&gt;/save foo.jsh&lt;/code&gt;.  You can place them in a &lt;code&gt;main&lt;/code&gt; method and you have documented the vulnerabilities in the class you created, so if something goes wrong down the road, you know where you don't have to look.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found it very helpful for teaching about workhorse classes such as the wrapper classes, &lt;code&gt;BigInteger&lt;/code&gt;, and &lt;code&gt;ArrayList&lt;/code&gt;.   It also came in handy for teaching about polymorphism and interfaces.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will be a valuable asset in the toolbox in my classes.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-03-18T21:29:45.270" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4512" PostTypeId="2" ParentId="4461" CreationDate="2018-03-18T21:54:14.950" Score="0" Body="&lt;p&gt;The proper way to think about this is to ask, &quot;What is a variable storing?&quot;  Variables of primitive type store a bit pattern that represents their datum.  Variables of object type store the memory address of the object they are pointing at on the heap.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you pass a variable to a function, a copy of the value it holds is made and is placed in the function's local symbol table.  This occurs whether the variable is of object or primitive type. Thinking this way, what we have here is pass by value.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you pass a variable pointing at a mutable object and the callee invokes a mutator method, the state of the object residing on the heap will be changed.  If the callee reassigns the variable, there is no effect. &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-03-18T21:54:14.950" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4513" PostTypeId="1" CreationDate="2018-03-19T11:59:34.763" Score="8" ViewCount="10976" Body="&lt;p&gt;There are many ways to grade students. One is to provide a fixed body of student work and then give a percentage grade for assignments, with the overall grade representing the &lt;em&gt;percentage achieved&lt;/em&gt; of some ideal. 90% = A, etc. The student is expected to work on each assignment. This is Grading by Percentages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another way (&lt;em&gt;Grading by Points&lt;/em&gt;, &lt;em&gt;Cumulative Grading&lt;/em&gt;) is to provide a body of assignments with a point total assigned to each part, preferably with small granularity but totaling, say 1000 points. The grading is done cumulatively with, say, 900 or more points required for an A grade. The instructor evaluates each assignment and gives points based on quality, etc. perhaps giving 40 points on an assignment that is &quot;worth&quot; 50. Here the student can work until they have enough points to achieve a grade that is acceptable to them. After that, they no longer need to do anything and can focus on other courses or commitments. It is, of course, good to warn students who are intending to go on that learning is still required to meet their greater goals and not to be too complacent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In either case, the instructor may permit re-work on assignments. If Grading by Points the rework earns additional points, but perhaps not up to the full marks for the work, but some positive increment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The writer used Grading by Points in the latter part of his career. What advantages and disadvantages are there of each scheme. What improvements can you make to either or both of these?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For clarity, the real difference is that in Cumulative Grading, the rubric tells the student how many points are needed for each grade and they can choose to get them any way that they like, spread over the assignments, whose totals are also known. In percentage grading, especially with different things worth different &quot;weights&quot; it is (a bit) harder for the student to know where they are likely to wind up. They know their &quot;average&quot; perhaps, but every assignment affects the average. Therefore with Cumulative Grading, the student always increases their points, where with percentage grading, each assignment can get you closer or farther away from your goal. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-19T15:40:59.517" LastActivityDate="2018-04-29T15:13:05.593" Title="What are the advantages and disadvantages of cumulative vs percentage grading?" Tags="|best-practice|grading|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4514" PostTypeId="2" ParentId="4513" CreationDate="2018-03-19T12:53:15.980" Score="2" Body="&lt;p&gt;The main advantage I see in using Cumulative Grading is that the student is always sure exactly where they are and what they need to do to obtain a grade that they will find satisfactory. An additional advantage for the individual student is that they can pace their efforts out over a wide range of courses and activities without undue stress. Not all students feel that the course I'm teaching is the most important thing in their lives, so it gives them a bit of freedom to pursue a variety of goals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, in some students this means that they don't maximize their efforts for my course. I can counsel them to higher and higher goals, of course, but I found that the superstars will still superstar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also permitted re-work on projects of all sorts, large and small. A student could improve their grade, but not up to the maximum for the exercise. The standard was that you could get back 90% of whatever you lost on the first trial. So if you got 70 on a project worth 100 you could get back about 27 points by redoing the assignment one or more times. For some students this rework, and the repetition-reinforcement it enables, is especially valuable. Point grading seems to encourage the re-work a bit more than percentage grading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The possible down side of this, for a few students, is that they would re-do an assignment many times but spend less time on newer assignments, possibly reducing their effort there. I had to caution a few students on this and very occasionally had to tell a student that I'd accept no further re-work so they would focus on other things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall, however, the combination of Cumulative Grading and re-work seemed to be liked/loved by my students. It also let me focus my office hours on the students who needed help the most.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Some instructors also permit students to simply skip the final exam if their point total is sufficiently high at the end of the course. Of course, this can be incorporated into percentage grading as well. This benefits your best students who can then spend their efforts on other pressing concerns. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-19T19:13:01.140" LastActivityDate="2018-03-19T19:13:01.140" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4515" PostTypeId="1" AcceptedAnswerId="4516" CreationDate="2018-03-19T12:56:53.080" Score="5" ViewCount="912" Body="&lt;p&gt;When working to teach developers &lt;code&gt;Scheme&lt;/code&gt; (which is functional programming) I'll often show them analogous examples in &lt;code&gt;C#&lt;/code&gt;.  The idea is that by seeing something familiar it will make it easier for the students to understand the unfamiliar.  But I'm not sure that this may actually be causing more confusion to the students.  Any thoughts or suggestions on the wisdom (or lack thereof) of showing parallel code samples when teaching developers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By the way, &lt;a href=&quot;http://www.rosettacode.org/wiki/Rosetta_Code&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; is what I'm referring to by the phrase &quot;Rosetta Code&quot; in the question title. It's analogous to the idea of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Rosetta_Stone&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rosetta Stone&lt;/a&gt; presenting the same text in multiple languages. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In case it wasn't clear from original question I was thinking of both the aspects of compare and contrast between languages (i. e. this is how we code a loop in C#, this is how we code it in Scheme) and the aspect of relating the unfamiliar (Scheme) by comparing it with the familiar (C#). &lt;/p&gt;&#xA;" OwnerUserId="4689" LastEditorUserId="4689" LastEditDate="2018-03-20T12:42:35.727" LastActivityDate="2019-02-27T03:37:04.507" Title="How Effective Is &quot;Rosetta Code&quot; as a Teaching Technique?" Tags="|best-practice|teaching-analogy|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4516" PostTypeId="2" ParentId="4515" CreationDate="2018-03-19T13:12:20.747" Score="7" Body="&lt;p&gt;Here I think the teacher's instinct and experience is the best judgement. You know your own students best. Your worry, of course, is well founded, especially since the two languages are so different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning to think functionally is a big deal and a mind expander. In some ways doing it cold-turkey (with no support) is good to do, since the students need to just thrash about until the see the A-Ha. But that can be very frustrating. It isn't good to leave your students frustrated, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reason for &lt;em&gt;not&lt;/em&gt; using the technique you suggest is that you don't want their functional code to be just misspelled C#, using ideas from imperative and/or object-oriented thought patterns. Code in one language based on knowledge of another can be truly ugly and the programmer can miss the elegance of the new language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And functional program can be truly elegant and mind expanding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To balance the trade-off you can, of course, use &quot;Rosetta Coding&quot; only sparingly. And only when it seems really needed. Perhaps you could start out without it at all and use it only in situations in which the students are struggling, rather than as a main-line technique. You could also use it only when working with individuals (office hours) rather than with the larger group if a student needs to be reminded of the basic structure of an algorithm. Personally, I wouldn't use it as the main structure of the course and am happy to let my students thrash a bit in mildly turbulent waters. But that needs limits also, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Salt is fine, but don't over-salt. Judgment and a bit of restraint, perhaps. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Since the two languages are from different paradigms the difference in resulting code can be quite stark. For example, reversing a list in linear time in Scheme is quite a lot different than you would likely program it in C# with mutable data. But even Java and Ruby, closely aligned, are &lt;em&gt;not&lt;/em&gt; the same language and have different thought  patterns. It is the thought patterns that are the most important lessons of the various paradigms. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-19T13:12:20.747" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4517" PostTypeId="2" ParentId="4513" CreationDate="2018-03-19T13:31:16.307" Score="8" Body="&lt;p&gt;I have done both percentages and points in my career, the latter being the most recent and preferred.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Percentages:&lt;/strong&gt;  The only advantage I can see is that, especially in high school, this seems to be the dominant way of grading, so students and teachers are accustomed to it.  Disadvantages are that students can have a difficult time tracking their progress, or knowing, for example, how well they must do on a test to keep their grade above a certain percentage.  In my experience, it also takes more time as a teacher - determining how many questions to put on a test or quiz so that percentages can be more easily calculated, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As relates to programming specifically, I always struggled with the fact that I wanted programming exercises to count heavily but had a hard time making that happen with percentages.  Students, parents, and administrators expect tests to be worth more than anything else, so if I gave tests the normal 40% weight, then that left programming exercises, quizzes, and classwork (study guides or worksheets) to split the remaining 60%, and I could just never get it &quot;right&quot;, meaning feeling comfortable with the distribution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Points:&lt;/strong&gt;  The major advantage of points the OP has already noted - students, parents, and teachers alike can instantly look at assignments and ascertain which assignments are worth more (I'm assuming all are using electronic gradebook of some kind), and students who want to remain at a minimum certain level find that easier to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Going to points solved the problem for me of knowing how much to weight each type of assignment - all assignments are weighted the same, and if I feel the assignment is worth more, I give it more points.  So I can look at how many programming exercises I assign in one semester (depending on the course, 80 to 100), determine points for those (say 10 points each), and base the points for everything else on that total.  If I determine a certain test is going to be worth 112 points because it has 56 questions, then the students see it as a large chunk, so they don't blow it off, but it is also not going to sink them if they fail it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Rework:&lt;/strong&gt; By extension, rework is made easier with a grading by points system.  I've also found that &quot;extra credit&quot; makes much more sense for students in the points system, and they are more motivated to attempt it, because they can more readily see how the extra points are going to impact their grade.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-03-19T13:31:16.307" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4518" PostTypeId="2" ParentId="4513" CreationDate="2018-03-19T14:32:51.517" Score="3" Body="&lt;p&gt;Grading is one of those things that we have allowed to be far too complex. Trying to make a small change to how Moodle works, for example, exposes a forest of ever-changing alternatives, settings, approaches, customizations... Should extra credit only count if the student is above a certain percentage? Etc... Wow. As Thoreau said, &quot;Simplify, Simplify&quot; (which is already redundant).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I tell my students, in a work training program for adults, is that basically they can relax about the grade thing because essentially the entire year-long program of study is &lt;strong&gt;pass-fail&lt;/strong&gt;. He who endures to the end shall be certificated, and otherwise, not. The goal is to learn enough to be successfully employed, which is the goal of all learning. It is no use being a virtuoso and unable to pay your bills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the minimum and maximum grade boundaries are just &quot;rails&quot; that they can only hit, like the concrete barriers on the sides of the freeway. If someone does not 'pass' an assignment, that means that they are missing essential knowledge. Too many such failures and they simply wash out. It does not matter if they are amazing at one aspect but abysmal at another: they must have basic competence in all areas or they will not be employable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they worry or do some point-grubbing, I basically ignore it and redirect them to the requirements of the next looming assignment.&lt;/p&gt;&#xA;" OwnerUserId="4719" LastActivityDate="2018-03-19T14:32:51.517" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4519" PostTypeId="1" CreationDate="2018-03-19T18:31:26.430" Score="35" ViewCount="13803" Body="&lt;p&gt;I teach Windows Forms programming, and now ASP.Net (essentially the same thing, except you view it in a browser) and I am dismayed that students seem to spend an enormous amount of time straining at gnats, trying to get picky details of the appearance correct. This involves them attempting to do extra things, like adding backgrounds, and putting images in to buttons and carefully positioning and sizing everything. This eats up masses of time and energy and they constantly ask me for help with details that I know nothing about, like obscure subtleties of CSS and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some way to get students to focus on the point of a lesson, which is to understand programming concepts, and not just stare in fascination at the colors and shapes on the screen?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I learned programming in a command-line environment, without Windows or web browsers, so I am at a loss as to why all of this is so interesting to the students. My attempts to add even small enhancements to appearance for my demonstrations are such a time-sink that I tend to drop them in favor of getting something to work. For example, try to change the color of a Jumbotron.)&lt;/p&gt;&#xA;" OwnerUserId="4721" LastEditorUserId="-1" LastEditDate="2018-03-22T10:50:01.500" LastActivityDate="2018-05-18T14:35:57.953" Title="How to help students avoid being distracted by bells and whistles" Tags="|labs|c#|gui|" AnswerCount="15" CommentCount="12" ContentLicense="CC BY-SA 3.0" />
  <row Id="4520" PostTypeId="2" ParentId="4519" CreationDate="2018-03-19T18:50:36.770" Score="5" Body="&lt;p&gt;I'll have to admit to not actually using Windows Forms Programming, but MS seems to indicate that it is a variation on Model-View-Controller (MVC), in which an underlying model is viewed by one or more Views and controlled by one or more Controllers that connect the Model to the Views. Other systems, such as most of early Java GUI programming fit the same model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The correct way to program in such a system is to rigidly separate the three kinds of components so that a model has no knowledge of how it might be viewed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For your dilemma, I think the solution is for  you to provide the view and at least a framework for the controllers (event handlers). Then, if you want your students to learn programming in general, and not just making things pretty, then have them supply the model so that it fits within your framework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, user interface design is a very important topic, but its implementation and thought processes are quite different from what it takes to do model building. But it also takes a study of things like Psychology, so may be best to isolate it from an early course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to provide the entire framework is to imagine some empty model that the controllers talk to via accessor methods (to get info to be displayed) and mutators (to update the model when something changes). These can provide default information in your framework and be updated by the students along with their model. Your View won't show much that is interesting until the students provide the backbone, of course, but it will force them to focus their efforts there. It will also give them good habits of separating concerns in programming which is a valuable skill even outside MVC. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-19T18:50:36.770" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4521" PostTypeId="2" ParentId="4519" CreationDate="2018-03-19T19:34:45.877" Score="9" Body="&lt;p&gt;Just to check, are you setting expectations correctly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, perhaps the reason why the students are focusing so much on the visual appearance is because they think that's the core &quot;point&quot; of the lesson (or the class). If so, that could perhaps be something you could clarify in your rubric or syllabus -- make it clear that you care more about the underlying functionality of their code, that you're ok if the final product looks a little visually unpolished, and that if they want to go above and beyond, they may have to do some independent studying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be worth setting these expectations explicitly whenever you release your first assignment/exercise, especially if you tend to get a lot of students like this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or alternatively, you could perhaps do this implicitly by doing with Buffy suggests -- restructure your assignment so there are distinct divisions between the &quot;frontend&quot; and &quot;backend&quot; logic, and provide the student with assignment specifications that focus heavily on the underlying backend logic, give them a bunch of tests for the backend, etc...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or perhaps your students are restless and are doing extra work because they genuinely do want to make the best product that they can? In that case, something you could do is to redirect them by suggesting more productive extra enhancements, which they can perhaps do for some minor extra credit. That way, they're still learning, but are focused on topics you feel are more relevant to the course.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Anything positional fails on a different sized screen anyway...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Did you try telling them that? It might be worth mentioning this explicitly and giving examples of what good responsive design looks like. (And if this isn't one of the focuses of your class, mention it off-hand and link to resources the students can read if they're curious and want to learn more).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you could use this to actually explicitly make the point that trying to control the appearance down to the last pixel is a huge timesink, and that your time is better off making a design that's robust to minor changes, especially for web development? (You could talk about how fonts differ from OS to OS, how browsers can &lt;a href=&quot;https://support.mozilla.org/en-US/kb/accessibility-features-firefox-make-firefox-and-we#w_zoom-fonts-and-colors&quot; rel=&quot;noreferrer&quot;&gt;alter the page&lt;/a&gt; to help with accessibility, etc...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, if they're going to keep focusing on visual appearance, you might as well spend some time making sure they're at least doing it right.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2018-03-19T19:34:45.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4522" PostTypeId="2" ParentId="4513" CreationDate="2018-03-19T20:34:33.160" Score="5" Body="&lt;p&gt;The primary &quot;pro&quot; for cumulative grading is that it eliminates the math behind the weighted percentage system, making it easier to compute mentally. Imagine two friends in the same class. In a weighted percentage system, Alice gets 70% on homework and 90% on tests, while Bob gets 70% on tests and 90% on homework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, they compare grades and discover that Alice got 78%, while Bob got 82%, a 4% difference, and an entire letter grade (assuming 90%=A...50%=F). At first glance, this sounds counter-intuitive, because they got the same numbers, but different letter grades.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's hard for most people to naturally understand what happened here without pulling out a paper or computer and doing the math; the homework was worth 60% of the total, and tests 40% of the total. The instructor likely even told them how the grades break down, but it's harder to grasp mentally, especially for the majority of people that have problems with fractions mentally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the cumulative grading system, if Alice gets 420 points on homework and 360 points on tests, and Bob gets 540 points on homework and 280 points on tests, it becomes immediately obvious that Alice's 780 points got her a C, while Bob's 820 points was worth a B. This is the exact same grade as in the weighted percentage system, but the only math required is now simple addition. It's much easier to process mentally to see how the points translated to a letter grade, since we optimized out the multiplications required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you've also stated, it also allows a student to decide if the a unit is worth doing simply by comparing the numbers to a goal. In some classes, where assignments are worth different points, and those points are then converted to a percentage, then weighted along with other categories, you're now asking them to calculate how much each assignment point is worth, which differs based on the number of points in the assignment and the weight of the overall grade; this can even be further complicated if the assignments are &quot;invisibly&quot; pointed (e.g. the student only ever gets a percentage back).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a lot easier to figure out that an assignment is worth 40 cumulative grading points out of 1000 for a perfect grade, than it is to say that there are 8 questions, worth 2 points each, all homework assignments total 79 points, which is worth 35% of the total grade, while on a test with 8 questions, worth 2 points each, out of a total of 89 points on tests, which are worth 40% of the grade, versus a final with 16 questions, worth 2 points each, and a total of 25% of the grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, there are certainly mathematical savants out there that can tell you exactly what percentage of the final grade a particular assignment is mentally, but for most students, it just involves them scrambling to try and get as many points as they can; actually trying to figure out if the assignment is &lt;em&gt;worth&lt;/em&gt; doing takes too much effort, so they may as well do it anyways, which might turn in to a time management issue since they may not know which assignment is worth more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only &quot;con&quot; I can see to a cumulative grading system is that it seems to be rarely used, especially in grade schools, so it will require explaining. However, I'm pretty sure most students would appreciate the simplicity of a single number instead of relatively complicated arithmetic just to try and manage their time.&lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2018-03-19T20:34:33.160" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4523" PostTypeId="2" ParentId="4519" CreationDate="2018-03-19T20:48:42.527" Score="63" Body="&lt;p&gt;This is a very common problem. Students tend to focus on the stuff they can see, which can be to your benefit (visual programs are more engaging than command line applications), but like you've discovered, it can also be very distracting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think a lot of the problem can be prevented by adding a disclaimer at the top of assignments. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Please note that I am not grading you based on what your program looks like. It can be tempting to obsess over the look and feel, but try to resist that urge! Graphic design is an important field, but this course focuses on [insert focus here]. If you want to explore topics like graphics and design, please do so only after you've finished the main assignment. You also might want to check out [insert graphics course here] after you finish this course.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You might also include guidelines on what's &quot;in scope&quot; for an assignment and what's outside the scope. Something like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Although this assignment includes visual elements, please note that I'm only grading you on your core logic, not what it looks like.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The following are in scope for this assignment:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Changes to server-side files.&lt;/li&gt;&#xA;  &lt;li&gt;Showing the correct components on the client side.&lt;/li&gt;&#xA;  &lt;li&gt;Getting input from the client to the server.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;The following are not in scope:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;The look and feel of the client side.&lt;/li&gt;&#xA;  &lt;li&gt;CSS changes.&lt;/li&gt;&#xA;  &lt;li&gt;Layout or style changes.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;If you're interested in exploring the out-of-scope topics, make sure you do so after completing the in-scope topics.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or maybe something as simple as this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Make sure the basic functionality works before working on the look and feel of your program! Remember: it's better to have an ugly program that works correctly than it is to have a beautiful program that doesn't work.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You might also explain the concept of &lt;a href=&quot;https://en.wikipedia.org/wiki/Minimum_viable_product&quot; rel=&quot;noreferrer&quot;&gt;minimum viable products&lt;/a&gt;. It might also be useful to mention &lt;a href=&quot;https://en.wikipedia.org/wiki/Feature_creep&quot; rel=&quot;noreferrer&quot;&gt;feature creep&lt;/a&gt; and &lt;a href=&quot;https://en.wiktionary.org/wiki/bikeshedding&quot; rel=&quot;noreferrer&quot;&gt;bike shedding&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of this just comes down to communicating your expectations.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-03-21T16:56:37.470" LastActivityDate="2018-03-21T16:56:37.470" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4524" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T00:37:12.290" Score="9" Body="&lt;p&gt;Part of it may be wanting to have pride in their work, and not knowing (yet) how to direct that urge productively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also learned in a predominantly CLI environment and I can remember, with a certain degree of chagrin, the things I did beyond the scope of the assignments that are entirely analogous to fiddling with backgrounds and layout. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the biggest helps in the journey towards directing this urge productively was a teacher who kept (with permission) old projects they considered exemplary. They shared these after each assignment was turned in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This provided both direction and incentive - we really wanted one of our assignments to be chosen to be one of the exemplars, and it laid out the areas we'd need to focus on to get there. &lt;/p&gt;&#xA;" OwnerUserId="3898" LastActivityDate="2018-03-20T00:37:12.290" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4525" PostTypeId="2" ParentId="4513" CreationDate="2018-03-20T00:40:31.417" Score="3" Body="&lt;p&gt;The only real difference between the two, from your description, is timing of when assignments are due.  In the traditional percentage format, assignments are due at a fixed time, whereas, it sounds like on the cumulative, you can turn assignments in at any time.  Other than that, the only difference is perception.  &lt;/p&gt;&#xA;" OwnerUserId="4417" LastActivityDate="2018-03-20T00:40:31.417" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4526" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T09:05:06.303" Score="14" Body="&lt;p&gt;If you are just trying to teach core programming concepts, and don't want students to be distracted by a GUI, which you yourself avoided by learning in command line programming, have you tried teaching them in command line programming? The GUI can come when they need to learn about the GUI.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the students to learn the core programming concepts they need to learn in command line with no other distractions. This will even work if you want a very basic UI, like a basic &quot;snake&quot; game can output a grid to a command line for them to manipulate.&lt;/p&gt;&#xA;" OwnerUserId="1853" LastActivityDate="2018-03-20T09:05:06.303" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4527" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T10:03:35.083" Score="27" Body="&lt;p&gt;Make the bells and whistles part of the problems you want them to solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is actually a great situation, since your students seem to be really interested in those things and show some intrinsic motivation on working on them. Just think about this, they are actually spending time doing &lt;em&gt;extra&lt;/em&gt; work that you didn't even ask them to do! Now you just need to make sure that they still understand the mandatory stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask yourself, why is it more interesting for a student to fiddle with those boring visual things instead of the exciting stuff that you are trying to teach? Because to them, it's the opposite. What you teach is the boring stuff, but oooh, look at this shiny little button I just created! And now I changed its color to orange, how fancy is that!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good news for you is that with this boring programming logic you are trying to teach, you can create far more interesting visual effects than what they can come up with through their tinkering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Want to teach them loops? Have them draw some fancy Logo flowers:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/sAJPt.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/sAJPt.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://i.stack.imgur.com/wRE8s.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/wRE8s.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They will probably still spend most of the lesson tweaking the colors, but soon they will realize that they can achieve the most interesting effects by playing around with the loop variables. Nesting loops gives super cool results here. And the playing around can actually give them a great understanding in how loops work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, one of the strongest motivations for the adoption of object-oriented programming techniques came from problems in GUI programming. Hand-tweaking a GUI to look nice becomes a nightmare once your number of widgets gets larger. Add resizable windows to that and your students will quickly come to the end of their tinkering abilities. This is where your boring programming techniques come to the rescue! Show them how OOP allows splitting the problem of layouting the different widgets into distinct sub-problems which can then be easily composed later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can find similar examples for almost any problem in computer science. Instead of stopping your students from what they are doing, embrace the fact that they are showing interest and shape your teaching examples in a way that it makes use of that interest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The downside is that coming up with nice examples here is not easy and can be quite an effort. I've never had a course where every single exercise was exciting and fun. But the good courses made sure they did one of them every once in a while to remind us that all this hard work pays off in the end.&lt;/p&gt;&#xA;" OwnerUserId="1370" LastEditorUserId="1370" LastEditDate="2018-03-21T14:21:10.787" LastActivityDate="2018-03-21T14:21:10.787" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4528" PostTypeId="1" CreationDate="2018-03-20T12:02:12.530" Score="11" ViewCount="10945" Body="&lt;p&gt;Should CS students be keeping a &lt;strong&gt;portfolio&lt;/strong&gt;, and if so, what should it look like? What would you, as a potential employer or college recruiter, &lt;strong&gt;like to see&lt;/strong&gt; in/on a potential employee or student portfolio? Are there ways other than portfolios to showcase a student's work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many high schools, mine included, are encouraging, if not requiring, students to build an online portfolio showcasing their achievements and growth through their high school career - and not just in the arts. Many of the students at my school have built web sites for themselves using free services such as Weebly and are adding pages and tabs for every year and &lt;strong&gt;every class&lt;/strong&gt;. Each page or tab displays &lt;strong&gt;work completed&lt;/strong&gt; for the class (sometimes but not always their best) - an essay, a math test they did well on, etc. - with their &lt;strong&gt;reflections&lt;/strong&gt; about what they learned, what they could've done better, how they worked in groups, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the &lt;strong&gt;best platform&lt;/strong&gt; for this showcase? Is Github good enough, or would you like to see something a little more formal, like a Weebly page (with embedded code or links to code)?&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="1293" LastEditDate="2018-03-20T12:33:46.203" LastActivityDate="2020-02-07T19:23:29.353" Title="What should be included in student portfolios for CS?" Tags="|best-practice|secondary-education|undergraduate|careers|github|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4529" PostTypeId="2" ParentId="4528" CreationDate="2018-03-20T12:20:26.370" Score="2" Body="&lt;p&gt;First, &lt;em&gt;yes&lt;/em&gt;, portfolios are a universally good thing for students at any level, not just high school. My preference is to require them and also to provide some institutional support for their creation and maintenance. The initial creation of the portfolio can be a project for a second or third year student - graded or not. If there is a course in web development it might be the natural place for such a project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than just code, however, I think it is much more important that portfolios showcase student writing and communication skills. A student can describe what they have built and the teams they have contributed to with (English/French/...) prose. If possible, the prose should be checked and edited to be clear and correct - support. If the project was a coding project there can be links to the code, but the primary thing is what the student has to say about the project and its value in their education. &quot;What I learned and why it is important.&quot; For a platform, I like a web-page (or several pages), rather than a repository. Any code can be either in a repository or a simple downloaded archive file. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also try to provide a platform with which the student work is permanently available - at least several years past graduation. Ideally the former student could add to it. There should be some way to contact the author, possibly indirectly, through the portfolio. For minor students, the contact likely must be indirect, through the institution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Institutional support is needed (or at least very desirable) to assure high quality and to assist reticent students to bring out their best work. Many students are reluctant to &quot;bring themselves forward&quot; for many reasons: shyness, modesty, ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other side, institutional support (editors say) can help some students &quot;tone down&quot; boastful claims that will be seen as a negative by employers. There is a fairly fine line that students may not always recognize. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The permanence of the portfolio is important for a number of reasons. The student will come to depend on it, of course, but it is also a way for the institution itself to keep in contact with the student (and vise-versa) in the future. This will make it easier to bring back former students to talk to current students and will also help in future fund-raising. Likewise email addresses assigned to students by educational institutions should be treated as permanent - keeping that link alive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the portfolio is primarily prose, it is easier to provide institutional support as most schools have professionals already skilled at that, though it takes an institutional decision to provide the support. But it can be considered a positive institutional goal to showcase student works. This is especially true if it aids in recruitment and in bringing employers (and donors) to a school seen as doing a truly fine job. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Patterns&lt;/a&gt; has a pattern: &lt;em&gt;Student Online Portfolios&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-20T12:42:34.800" LastActivityDate="2018-03-20T12:42:34.800" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4530" PostTypeId="2" ParentId="4515" CreationDate="2018-03-20T14:09:49.927" Score="2" Body="&lt;p&gt;A Rosetta Stone is a temping way of thinking about the issue, and it works if the person knows &lt;em&gt;two&lt;/em&gt; languages already (the way that we knew two of the languages on the Rosetta Stone and were trying to learn the third one). This is similar to how if you have two points of reference on a map, you can triangulate to locate a third.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But those first two languages are going to be holy hell to learn. That is because no Rosetta Stone exists if you haven't learned one language, let alone two. Fortunately, we learn to speak when we are babies, everything is irritating anyway, and we forget the whole thing! If only we started to program when we were 2. Maybe future generations will...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I started off sitting in front of a terminal hooked to a PDP-11, using either a shell script language or Basic, I forget which. When I could, I used one of the Apple ][s with Basic, until I got one myself in high school. I learned a smattering of Assembly then also. My first college course was in APL. From the standpoint of Basic and Assembly, this is Hieroglyphics indeed. Next we learned Lisp. It was all Greek to me for a while, some students never mastered it and washed out. None of these languages had anything in common, any more than Cuneiform, Linear-B and Hieroglyphics do, beyond the idea that: &lt;em&gt;&quot;we want the computer to do something.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is not much to go on. Really, the only analogy shared by all forms of computing is: &quot;we want the computer to do something.&quot; And people are just so creative in coming up with ever-more varied ways of forming such utterances. (Perhaps we should try standardizing a bit instead?) (Shh! You'll ruin the story)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All I can say is, keep throwing stuff at them, and if they can stay afloat, they might decide to make a living at it.&lt;/p&gt;&#xA;" OwnerUserId="4724" LastActivityDate="2018-03-20T14:09:49.927" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4531" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T14:35:54.743" Score="2" Body="&lt;p&gt;I think these are actually two separate problems.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tweaking very specific details&lt;/li&gt;&#xA;&lt;li&gt;Wanting to do stuff beyond the scope of the course&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The former is potentially harmful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stress that they will get no points for having a good looking website and that they only get points for functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps even enforce this by restricting the students to using a colour palette that you have selected or requiring that they only use default colours if the environment provides them.&#xA;If students are forced to use a restricted colour palette then they cannot spend time tweaking the colours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps also consider being specific about where their elements should be placed. For example, require that button X should be in the bottom right hand corner and that button Y must be in the left hand corner.&#xA;They can still move things by a few pixels if they're that obsessive, but they won't be burdened by the desire to keep reshuffling all the elements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, make the students design their UI before doing any programming and penalise students for deviating from their design for cosmetic reasons.&#xA;(Allow deviations for things that genuinely cause an issue, but require that the student documents the issue.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These suggestions not only kill the problem, but they also force students to exhibit skills that they might need in a work environment (documenting changes and fulfilling the customer's requirements).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The latter on the other hand should be encouraged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Wanting to learn beyond the scope of the assignment is a good thing.&#xA;It's a sign that the students want to be doing this and that they have the potential to become good programmers because they're inquisitive and willing to put in effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't crush this, simply tell them that they are &lt;em&gt;only&lt;/em&gt; allowed to do extra things like that when they have fulfilled all the other requirements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps enforce this by making students show you their work when they are finished so that you can give them permission to start adding extra functionality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make it clear that the assessment is about providing &quot;what the customer wants&quot;, not about showing off, and that any 'extra features' will be completely ignored and won't impact anyone's grades.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;There's also nothing wrong with admitting that you don't know the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little anecdote:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(TL;DR: encouraging students to check the documentation instead of asking you is a good thing in the long run.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was learning programming at college my programming teacher didn't know how to use the open file dialogue in winforms, so I simply went away and asked the internet instead. That was a good thing, it gave me practice at referring to the documentation and made me realise that in fact my teacher did not know as much as I originally thought.&#xA;Once I had gotten used to the documentation I stopped asking my teacher and started referring to the documentation first.&#xA;Before long my teachers were sometimes asking me questions.&lt;/p&gt;&#xA;" OwnerUserId="1538" LastActivityDate="2018-03-20T14:35:54.743" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4532" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T15:05:04.120" Score="1" Body="&lt;p&gt;Consider taking off points for failure to follow clear instructions about project guidelines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn’t as harsh as it may seem, because in the real-world clients and employers will not be pleased about “wasted” effort spent outside of the scope of the task assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: If the clients wants a working prototype ASAP but you deliver a pretty mock-up instead then you will have problems.&lt;/p&gt;&#xA;" OwnerDisplayName="user4725" LastEditorDisplayName="user4725" LastEditDate="2018-03-20T18:44:25.897" LastActivityDate="2018-03-20T18:44:25.897" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4533" PostTypeId="2" ParentId="4519" CreationDate="2018-03-20T17:41:12.447" Score="-1" Body="&lt;p&gt;Grading assignments can have an influence how much effort and/or focus students exert. Have you tried giving the &quot;distracted&quot; students poor grades? or rewarding the students that stick to your rigid guidelines?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may also try connecting with your students by learning some of the &quot;obscure subtleties of CSS&quot; they are interested in. If you are able to instruct how to do Windows Forms programming, and now ASP.Net, CSS should be very straightforward to understand.&lt;/p&gt;&#xA;" OwnerUserId="4729" LastActivityDate="2018-03-20T17:41:12.447" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4534" PostTypeId="2" ParentId="4528" CreationDate="2018-03-20T17:51:50.177" Score="6" Body="&lt;p&gt;The answer is &lt;strong&gt;Yes, but be careful.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as employment goes, no recruiter is going to want to go through a student's completed homework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Professional Portfolios do NOT include practice&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, these students are not professionals. Keeping a website to showcase their practice and skills is good. It's &lt;strong&gt;good practice.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When these students graduate, the skills they learned in developing a practice portfolio will help them build a professional portfolio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify: Professional Portfolios can still contain neat little projects, but they must be built with a use, or even as a proof-of-concept. Certain college projects may qualify here, but pretty much all coding homework will not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a few random tips:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Practice portfolios &lt;em&gt;might&lt;/em&gt; help with college recruitment.&lt;/li&gt;&#xA;&lt;li&gt;If a student really feels the need to include a practice portfolio as part of a professional resume or job application, make sure it is completely separate from real-world projects and labeled as practice.&lt;/li&gt;&#xA;&lt;li&gt;Github is normally sufficient. Designers and those who are interested in visual careers would benefit greatly from a website portfolio with links to a Gitbhub (all programmers should demonstrate they can use source control, though).&lt;/li&gt;&#xA;&lt;li&gt;Having a website portfolio is also a good place to show off soft skills in writing and communication.&lt;/li&gt;&#xA;&lt;li&gt;Make sure to get good information to help the students. This is serious stuff. &lt;strong&gt;A bad portfolio is worse than no portfolio&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Include the project and technical details for portfolio items. Don't include tests, reflections, or &quot;what I could have done better&quot;. These become useless as soon as the student receives a final grade. You're goal is to prepare them for the real world, not make them type a lot of words no one will read.&lt;/li&gt;&#xA;&lt;li&gt;Portfolios are for projects. Not classes. Relevant classes belong in a resume, in tiny font. No one is ever going read a paragraph about what the student &quot;thought of the class&quot;, or even &quot;what I learned&quot;. &lt;strong&gt;Portfolios are demonstrations, not promises&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The other answer by Buffy suggests it will be good for the school to showcase student work. Okay, cool, but forget about that. Portfolios are meant to help the students convey their skills to employers. They are not trophies, so don't give yourself a conflict of interest.&lt;/li&gt;&#xA;&lt;li&gt;Similarly, the permanence of portfolios do not concern the school. You're not a portfolio factory. Keep example portfolios if you must, but ask the student and make a copy of it to demonstrate, privately, to future students.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I'm going to add to my answer, as you seem to have a lot of misconceptions about what a portfolio is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;A portfolio is a concise collection of tangible projects created by or in part by the author of the portfolio&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Classes, tests, homework, personal reflections, etc do not belong in a portfolio. &lt;strong&gt;Not even a practice portfolio&lt;/strong&gt;. Do NOT do this, please. This is the opposite of the real world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No one wants to read about someone's entire educational experience. Ever. Not to say it isn't useful information, but that's what &lt;strong&gt;interviews&lt;/strong&gt; are for. Interviews go over the candidates experiences.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Please remember that resumes are promises of your skills. Portfolios are demonstrations of skill. Interviews are insights into experiences and live demonstrations of skill.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2719" LastEditorUserId="2719" LastEditDate="2018-03-20T18:04:09.007" LastActivityDate="2018-03-20T18:04:09.007" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4535" PostTypeId="2" ParentId="4515" CreationDate="2018-03-20T18:24:06.843" Score="2" Body="&lt;p&gt;I swiped a &lt;strong&gt;Scheme&lt;/strong&gt; example from &lt;a href=&quot;https://classes.soe.ucsc.edu/cmps112/Spring03/languages/scheme/SchemeTutorialA.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;a tutorial&lt;/a&gt; and created my own translation to a &lt;strong&gt;C# Console&lt;/strong&gt; program. I tried to preserve the structure, naming and comments. The difference in length is mostly due to the placement of curly braces on separate lines vs the parens on same lines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We could criticize the C# code by saying that it has to be sprinkled liberally with 'static' and 'decimal', but then would have to explain how much is &lt;em&gt;missing&lt;/em&gt; from the Scheme example: The Lisp Interpreter (the entire concept of an interpreter...) and the built-in handling of numeric types therein.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Scheme&lt;/h1&gt;&#xA;&#xA;&lt;pre class=&quot;lang-lisp prettyprint-override&quot;&gt;&lt;code&gt;(define checkbook (lambda ()&#xA;&#xA;; This check book balancing program was written to illustrate&#xA;; i/o in Scheme. It uses the purely functional part of Scheme.&#xA;&#xA;        ; These definitions are local to checkbook&#xA;        (letrec&#xA;&#xA;            ; These strings are used as prompts&#xA;&#xA;           ((IB &quot;Enter initial balance: &quot;)&#xA;            (AT &quot;Enter transaction (- for withdrawal): &quot;)&#xA;            (FB &quot;Your final balance is: &quot;)&#xA;&#xA;            ; This function displays a prompt then returns&#xA;            ; a value read.&#xA;&#xA;            (prompt-read (lambda (Prompt)&#xA;&#xA;                  (display Prompt)&#xA;                  (read)))&#xA;&#xA;            ; This function recursively computes the new&#xA;            ; balance given an initial balance init and&#xA;            ; a new value t.  Termination occurs when the&#xA;            ; new value is 0.&#xA;&#xA;            (newbal (lambda (Init t)&#xA;                  (if (= t 0)&#xA;                      (list FB Init)&#xA;                      (transaction (+ Init t)))))&#xA;&#xA;            ; This function prompts for and reads the next&#xA;            ; transaction and passes the information to newbal&#xA;&#xA;            (transaction (lambda (Init)&#xA;                      (newbal Init (prompt-read AT)))))&#xA;&#xA;; This is the body of checkbook;  it prompts for the&#xA;; starting balance&#xA;&#xA;  (transaction (prompt-read IB)))))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;C# Console&lt;/h1&gt;&#xA;&#xA;&lt;pre class=&quot;lang-cs prettyprint-override&quot;&gt;&lt;code&gt;using static System.Console;&#xA;&#xA;// This check book balancing program was written to illustrate&#xA;// a Scheme example translated as closely as possible to C# Console&#xA;namespace CheckBookFromSchemeExample&#xA;{&#xA;    // These definitions are local to checkbook&#xA;    class Program&#xA;    {&#xA;        // These strings are used as prompts&#xA;&#xA;        static string IB = &quot;Enter initial balance: &quot;;&#xA;        static string AT = &quot;Enter transaction (- for withdrawal): &quot;;&#xA;        static string FB = &quot;Your final balance is: &quot;;&#xA;&#xA;        //this function displays a prompt then returns&#xA;        // a value read.&#xA;&#xA;        static decimal prompt_read(string Prompt)&#xA;        {&#xA;            decimal result;&#xA;            WriteLine(Prompt);&#xA;            decimal.TryParse(ReadLine(), out result);&#xA;            return result;&#xA;        }&#xA;&#xA;        //This function recursively computes the new&#xA;        // balance given an initial balance init and&#xA;        // a new value t. Termination occurs when the&#xA;        // new value is 0.&#xA;&#xA;        static decimal newbal(decimal Init, decimal t)&#xA;        {&#xA;            if (t == 0)&#xA;            {&#xA;                WriteLine(FB + Init.ToString(&quot;c&quot;));&#xA;                return (Init);&#xA;            }&#xA;            else&#xA;            {&#xA;                decimal result = Init + t;&#xA;                WriteLine(result.ToString(&quot;c&quot;));&#xA;                return transaction(result);&#xA;            }&#xA;        }&#xA;&#xA;        // This function prompts for and reads the next&#xA;        // transaction and passes the information to newbal&#xA;        static decimal transaction(decimal Init)&#xA;        {&#xA;            return newbal(Init, prompt_read(AT));&#xA;        }&#xA;&#xA;        // This is the body of the checkbook; it prompts for the&#xA;        // starting balance&#xA;&#xA;        static void Main(string[] args)&#xA;        {&#xA;            transaction(prompt_read(IB));&#xA;            ReadLine();&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The translation to &lt;strong&gt;APL&lt;/strong&gt; is left as an exercise for the reader. (no one expects them to do that!) (precisely)&lt;/p&gt;&#xA;" OwnerUserId="4730" LastEditorUserId="104" LastEditDate="2018-08-30T17:58:52.337" LastActivityDate="2018-08-30T17:58:52.337" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4536" PostTypeId="2" ParentId="4528" CreationDate="2018-03-21T16:28:39.603" Score="2" Body="&lt;p&gt;Portfolios should answer two questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is this person capable of?&lt;/li&gt;&#xA;&lt;li&gt;What is this person interested in?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And the answers to those questions should be as obvious as possible. I should see &lt;strong&gt;at a glance&lt;/strong&gt; specific examples of what you're capable of and interested in. A portfolio should highlight specific examples of stuff you're good at, and stuff you want to continue doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, &lt;strong&gt;do not&lt;/strong&gt; include the minutia of every assignment from every class. Don't even include every class. Maybe list the more advanced CS classes you took, and then showcase your final projects for those classes. If a recruiter / interviewer / whoever sees a student page that lists every course they've taken, they're going to just close the window without reading anything. You should make it as easy as possible for the reader to get an idea of what you're all about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that in mind, you should also provide embedded demos if possible. Don't bother linking to executables that require a download, because nobody is going to download anything. If you can't provide an embedded demo, then screenshots or animated gifs are good enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, simple website creators like Weebly are good for some things, but not for creating a computer science portfolio. Having a site like that is a bit like having an &lt;code&gt;@aol.com&lt;/code&gt; email address: it's fine for some people, but it's probably not something you want to put on a computer science resume.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I'd recommend putting together your own basic HTML page. It doesn't have to be fancy, but it should be yours. I really like &lt;a href=&quot;https://pages.github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub Pages&lt;/a&gt; for this sort of thing.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-03-21T16:28:39.603" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4537" PostTypeId="5" CreationDate="2018-03-21T16:44:37.160" Score="0" Body="&lt;p&gt;Discrete Mathematics is a very broad topic. Graph Theory and Financial Mathematics are usually included. Some of these topics, such as Discrete Probability and elementary Combinatorics are especially useful in CS. Set Theory and Game Theory often arise in either theory or applications. As always use this tag for questions about the teaching of such topics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that MathEducators has the same tag. Some questions there will be relevant to teaching CS students: &lt;a href=&quot;https://matheducators.stackexchange.com/questions/tagged/discrete-math&quot;&gt;https://matheducators.stackexchange.com/questions/tagged/discrete-math&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-21T17:34:46.120" LastActivityDate="2018-03-21T17:34:46.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4538" PostTypeId="4" CreationDate="2018-03-21T16:44:37.160" Score="0" Body="Discrete math is a general term for several mathematical concepts beyond Algebra and distinguished from Continuous Math (Calculus...). Many of these topics are of use in computer science and programming. Use this tag for questions related to teaching discrete math concepts to Computer Science students." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-21T16:44:37.160" LastActivityDate="2018-03-21T16:44:37.160" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4539" PostTypeId="2" ParentId="4519" CreationDate="2018-03-21T17:26:27.137" Score="7" Body="&lt;h2&gt;This is an important teachable moment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;One of the most annoying traits in newer engineers is their &quot;helpfulness.&quot; They may not realize that working on tasks outside of their assigned scope can actually be harmful. Often there are separate team members who are specifically assigned the visual stuff, and sometimes there are strict standards, compliance issues, accessibility issues. When somebody else decides to be &quot;helpful,&quot; it can actually cause a huge setback for those specialized developers. Or sometimes the &quot;extra&quot; work was excluded from the contract and giving the client free work can harm sales. Either way, it is a critical soft skill for engineers to learn to &quot;stay in their lane.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This topic is important enough for its own lesson. Let them fail at this on their first assignment, and then use the next class to &lt;strong&gt;&lt;em&gt;Tell them this is important&lt;/em&gt;&lt;/strong&gt;. And that they will be marked down if they do it again. If students do extra work anyway, it should result in a decreased grade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel bad marking them down, you can offer an opportunity to fix their mistake, e.g. grant them extra credit for rolling back the code to the original version. Then you can teach them about the importance of source control too. Two teachable moments in one!&lt;/p&gt;&#xA;" OwnerUserId="4739" LastEditorUserId="4739" LastEditDate="2018-03-21T18:07:37.997" LastActivityDate="2018-03-21T18:07:37.997" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4540" PostTypeId="2" ParentId="4519" CreationDate="2018-03-21T17:35:28.217" Score="15" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I am dismayed that students seem to spend an enormous amount of time straining at gnats, trying to get picky details of the appearance correct.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So they are tackling a front-end programming assignment in a way that reflects the reality of the majority of front-end programming. Getting this stuff right or wrong can make the difference to the viability of a product.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This eats up masses of time and energy&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, it does. Front-end detail is time consuming. For our (commercial, not pedagogical) projects, we have a project-wide CSS style based of a company wide SASS styles merged in with bootstrap or other frameworks. That saves us a lot of time and makes our various sub-sites consistent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest you create a CSS for your students, and tell them to use only classes defined in it, and no other styling. I'd base it off a bootstrap theme, which can be configured using something like &lt;a href=&quot;https://pikock.github.io/bootstrap-magic/app/index.html#!/editor&quot; rel=&quot;noreferrer&quot;&gt;https://pikock.github.io/bootstrap-magic/app/index.html#!/editor&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This way you shouldn't have CSS questions beyond 'what class to use for a large button?', which can be answered from the documentation, and it won't be very far from what happens in the real world.&lt;/p&gt;&#xA;" OwnerUserId="1498" LastActivityDate="2018-03-21T17:35:28.217" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4541" PostTypeId="1" CreationDate="2018-03-21T18:47:09.833" Score="7" ViewCount="163" Body="&lt;p&gt;We have an incentive grading scheme for programming labs such that students get 89% for submitting a program that meets the basic requirements of the assignment, if submitted on time. To get the &quot;extra credit&quot;, they have to add something useful on to the basic requirements, still submitted on time. We did this because we were having two issues in the classes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Students were just doing the bare minimum  &lt;/li&gt;&#xA;&lt;li&gt;They were handing things in late  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But, in a weird twist on Pareto optimization they now spend the first 89% of the time trying for the extra credit portion, and the remaining 89% of the time just getting the bloomin' thing to work correctly (Parkinson's Law).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually fail to anticipate this, so when I say, for example: &quot;use Bootstrap to get your web page to look basically like this...&quot; and the first thing they do is go to the &quot;designer screen&quot; in Visual Studio and start dragging, resizing, re-positioning, changing fonts, colors, etc, I am stymied. (It does not turn out well.) I was thinking that they would make some &lt;em&gt;programmatic&lt;/em&gt; improvements to the very simple example, since most of the basic code could be copied right out of the textbook anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there a way to encourage the students to get something working first, then enhance it?&lt;/strong&gt; Is a grade incentive the wrong way to go about that? I suppose it is really down to me, as it says in &lt;em&gt;the Art of War&lt;/em&gt;: &quot;If the instructions are not clear, if the orders are not obeyed, it is the fault of the general.&quot; Good thing I do not have 160 students.&lt;/p&gt;&#xA;" OwnerUserId="4743" LastActivityDate="2018-03-21T19:58:21.023" Title="An exercise in utility" Tags="|grading|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4542" PostTypeId="2" ParentId="4541" CreationDate="2018-03-21T19:12:45.900" Score="3" Body="&lt;p&gt;Actually, there are two questions here. I'll answer the obvious one first. You can fairly easily solve the perverse incentive problem by having two due dates: one for the first 89% and a later one for the rest. If you have ideas about what they should do for the second part, don't reveal them until they turn in the first part. You needn't necessarily even mark the work after the first deadline, but you can, if desired. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After the first deadline you have a version of the project. You can compare it with the second version to see what changes/enhancements have been made. In situations like this, I usually have students turn in work on paper and in the second version, mark changes (highlight markers) so that those changes are obvious. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second question is how much you want to encourage student &quot;creativity&quot; anyway. It isn't always good to let students loose without specific direction. There are two kinds of creativity: the &lt;em&gt;what&lt;/em&gt; and the &lt;em&gt;how&lt;/em&gt;. In the real world, it isn't normally the programmer who is responsible for the &lt;em&gt;what&lt;/em&gt;. That is up to the Customer/Client/Boss/Organization. The creativity on &lt;em&gt;what&lt;/em&gt; belongs to them. On the other hand, creativity (i.e. excellence) on the &lt;em&gt;how&lt;/em&gt; is the key attribute of a good developer. For most assignments that is what you should be looking for. Do they understand the algorithms? Can they implement them efficiently? Is the code clear and maintainable? Is it tested and correct? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I worry that if you just give an incomplete specification of the work and expect them to use their own creativity around &lt;em&gt;what should be done&lt;/em&gt;, that they will get the wrong ideas about building things. As others have said in answer to other questions here, going outside your charter can be seen as a problem, not a blessing. See this, for example: &lt;a href=&quot;https://cseducators.stackexchange.com/a/4539/1293&quot;&gt;https://cseducators.stackexchange.com/a/4539/1293&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, teaching creativity is also a goal of education and there should probably be one or more courses, or at least projects, where students do get to conceptualize, design, and build something interesting. But don't let them get confused. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Caveat. Those who work at startups that define their own product have a different view. There, it is often the case that programmers participate in defining the product, but that isn't the common case. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-21T19:12:45.900" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4543" PostTypeId="2" ParentId="4541" CreationDate="2018-03-21T19:13:45.973" Score="0" Body="&lt;p&gt;I thought Pareto was 80/20!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could you start from the platform of, get the program working? I mean, that in itself is an achievement. The extra credit can be on offer to the 'bug hunters'; work out all the bugs and get the program working perfectly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be clear: get the program working, but with bugs = 80%. You then have a 20% margin where you can get the students to submit proof of bugs found, and how they resolved them. A perfectly working program with no bugs? 100%. How you grade between the 80 and 100 delimiters is up to you: an extra 4% for each problem found and resolved perhaps? They'd have to submit proof.&lt;/p&gt;&#xA;" OwnerDisplayName="user4027" LastEditorDisplayName="user4027" LastEditDate="2018-03-21T19:22:40.610" LastActivityDate="2018-03-21T19:22:40.610" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4544" PostTypeId="2" ParentId="4541" CreationDate="2018-03-21T19:58:21.023" Score="2" Body="&lt;p&gt;If your real concern is the first one stated (doing just the minimum), there is another solution, though a bit more complex. Read the wikipedia article on &lt;a href=&quot;https://en.wikipedia.org/wiki/Minimum_viable_product&quot; rel=&quot;nofollow noreferrer&quot;&gt;Minimum Viable Product&lt;/a&gt; for some ideas. You don't normally want them to do everything for a product, of course, even a minimal one, but the idea of a Minimal Correct Solution can be adapted from that. Decide what that minimum acceptable solution is and then give an assignment in which a medium passing grade will be assigned for that. Give it a complete specification of just that part. You can have an early deadline for that part of the larger/complete project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the second (and perhaps subsequent) stages, give additional specifications for enhancement of that minimum into a more complete and pleasing whole. Assign additional points/percentages for those additional enhancements. You can make the add-ons sequentially, but it is sometimes also possible to offer them a set of independent enhancements that can be done or not and possibly done in any order. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they do just the minimum they get, perhaps, an acceptable grade, but they get guidance on what enhancements would be valued. As I suggested in my other answer here, you can have them mark changes in the second and subsequent versions to make grading quick and painless. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this solution also requires more than one deadline, perhaps with feedback between them. But this will also avoid the perverse incentive problem. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-03-21T19:58:21.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4545" PostTypeId="2" ParentId="4483" CreationDate="2018-03-21T20:15:18.163" Score="0" Body="&lt;p&gt;Being creative, ability to 'think outside the box', and an almost obsessive attention to detail. They are the non-programming skills I would want in a programmer. Oh, and incredible amount of patience! Lets face it, compiling can take time.&lt;/p&gt;&#xA;" OwnerDisplayName="user4027" LastActivityDate="2018-03-21T20:15:18.163" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4547" PostTypeId="2" ParentId="4519" CreationDate="2018-03-22T09:59:06.680" Score="2" Body="&lt;p&gt;I feel that there is a little bias at play here. In addition to all the answers above, I'd like to mention that you feel that tweaking UI is a waste of time. That's because you inherently feel that such tweaking is off-topic as far as your course is concerned. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, isn't software development all about the complete package? While everyone from your course may not go on to become full stack developers, what they are striving for now - perfection - is actually something that will help them out later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a possible solution, how about tasking them with manipulating the UI so many times, and with such complication that the changes begin to become difficult for them to tweak manually. That is when you show them the beauty of doing things programmatically, and by that logic, how back-end operations work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternate solution would be to link the algorithms that you're teaching, ergo, programming concepts, into UI. &lt;/p&gt;&#xA;" OwnerUserId="2854" LastActivityDate="2018-03-22T09:59:06.680" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4548" PostTypeId="2" ParentId="4503" CreationDate="2018-03-22T22:18:19.790" Score="4" Body="&lt;h2&gt;To give or not to give, that is the question&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are actually several possibilities that reflect how you want&#xA;the provided solution to be used. For context, I am an instructor at&#xA;Colorado State University and I am discussing assignments that students&#xA;might encounter in the first two to three years (not CS1).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Don't ever give the students solutions&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The motivation for this approach&#xA;   is that one can reuse the assignment in the future without worrying about&#xA;   a &quot;new&quot; student getting a solution from the past. Although this seems&#xA;   logical, a colleague of mine scours the web for postings of his assignments.&#xA;   He developed a nice automated tool to do this for him.&#xA;   He says that he finds a significant portion (~40%) have been posted, often to&#xA;   sites like &lt;a href=&quot;http://www.chegg.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.chegg.com&lt;/a&gt;  Thus, if an assignment has ever been&#xA;   posted on the web, it will be there forever. Even if it is not on the web,&#xA;   a solution from a &quot;friend&quot; (who did the same assignment previously) may be&#xA;   available. My take is that cheaters will cheat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I encourage students to look for help on the web. If they find help, I ask that they cite the link in their code. This way they can go back to what they found helpful without repeating the search that got them to this information. By citing a reference, you are declaring that your work is &lt;strong&gt;based&lt;/strong&gt; on code you found elsewhere and are giving credit to the author. But, I also say that in using the code, you are taking responsibility for its correctness. You cannot say &quot;&lt;em&gt;It is not my fault the code I copied from the web doesn't work!&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Supply a reference implementation to the student&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This can be done at different times, for different purposes.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supply a reference implementation in &quot;object&quot; code&lt;/strong&gt; (an executable). &#xA;This may be done&#xA;  when the assignment is posted. The motivation of this approach is to   give       the student an &quot;oracle&quot; that they can test against. Here you are&#xA;  emphasizing &quot;testing&quot; in that the student must figure out various&#xA;  test cases and then compare the results of their code to that of&#xA;  the &quot;oracle&quot;. This can also be viewed as a means of resolving&#xA;  ambiguities in the assignment. If two things in the specification&#xA;  may be in conflict, the student must make the same choice as the &quot;oracle&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is fine for &quot;compiled&quot; languages, but does not work for&#xA;  scripting languages. If one is really paranoid about Java de-compilers,&#xA;  run the reference code through an obfuscater. The student may be able to&#xA;  &quot;de-compile&quot; it back to source, but the source won't look anything like&#xA;  code a human would write.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supply a reference implementation in &quot;object&quot; code after the due date.&lt;/strong&gt;&#xA;  Then allow students to gain back points by fixing their implementation.&#xA;  This emphasizes the requirement of a professional to get the job done&#xA;  correctly. If you hire someone to paint your house, and they only&#xA;  complete 75% of the job, they cannot expect to be paid with a &quot;C&quot;&#xA;  grade. You want the entire house painted, and will only pay at that time.&#xA;  When I was in engineering school (a long time ago, with small class&#xA;  sizes), our assignments were marked C&amp;amp;R (correct and return). The&#xA;  assignment was not complete until you had the correct answer and&#xA;  demonstrated how you got it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supply a reference implementation in &quot;source&quot; code after the due date.&lt;/strong&gt;&#xA;  Here you are providing the student with a &quot;master work&quot; that the&#xA;  student may study and learn how you (the master) decomposed the&#xA;  specification and translated it to code. This forces the student to&#xA;  read code and create a mental model of how this implementation works.&#xA;  In industry, this is a normal part of most projects. You have to&#xA;  understand how the code (which you did not write) works before you can fix/extend it. You can become a much better programmer by studying other's code and understanding how they wrote the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For small assignments, I often present my solution by projecting it onto&#xA;  the screen from my laptop and reviewing it in class. The students may&#xA;  use their cell phones and snap pictures as I discuss my solution. I only&#xA;  do this when the review will fit in a single lecture or less. I do not&#xA;  spend class time reviewing every assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For larger assignments, you may choose to provide the reference&#xA;  implementation via a link the students can download and do with&#xA;  as they please. If a &quot;new&quot; student submits this solution when&#xA;  you reuse the assignment, you may catch this by using&#xA;  &lt;a href=&quot;https://theory.stanford.edu/~aiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MOSS&lt;/a&gt; to catch plagiarism.&#xA;  This is what I do for my larger assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one slight alternative to giving out the source directly.&#xA;  My colleague (mentioned above) wrote a program called &quot;shadow&quot; which&#xA;  turns a text document &lt;a href=&quot;https://www.cs.colostate.edu/~fsieker/misc/HelloWorld.java&quot; rel=&quot;nofollow noreferrer&quot;&gt;your source code&lt;/a&gt; into an HTML page. When&#xA;  you view the HTML page, you &quot;see&quot; the source and can read it to&#xA;  your hearts content. However, if you try and copy/paste it, you&#xA;  get a ton of obfuscating HTML code with the text &lt;a href=&quot;https://www.cs.colostate.edu/~fsieker/misc/HelloWorld.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;hidden&quot;&lt;/a&gt; in it.&#xA;  Then only way to recover the original text is to type it in (or reverse&#xA;  engineer the obfuscation code). His theory is &quot;&lt;em&gt;If you can reverse&#xA;  engineer this obfuscation, you don't need to be taking this class&lt;/em&gt;&quot;.&#xA;  The two links in this paragraph show a HelloWorld.java in both forms.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My personal opinion is that the more code students &lt;strong&gt;read&lt;/strong&gt;, the more proficient they will become. Thus, I tend to provide (or at least discuss) my solution to assignments with the students.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2018-03-23T19:50:01.590" LastActivityDate="2018-03-23T19:50:01.590" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4549" PostTypeId="1" CreationDate="2018-03-23T13:47:04.553" Score="0" ViewCount="131" Body="&lt;p&gt;I find that after teaching for months, some students still get stumped when they try to write code for things like simple two-alternative situations. They have some code for something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if ( objectReference == null ) {  // object does not exist&#xA;    objectType objectReference = new objectType( ... );  // so create it&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And they can't figure out how to code the case where the object &lt;em&gt;does&lt;/em&gt; exist. They say, &quot;How do I test if it IS already there?&quot; And I stand there with a blank look on my face. I am thinking: &lt;em&gt;&quot;Either it's there, or it ain't.&quot;&lt;/em&gt; Usually, if I stand there looking blank for more than 17 seconds (the time it takes for short-term memories to be stored in long-term memory), they suddenly go, &quot;Uh!&quot; and I laugh nervously and go sit back down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, days or weeks later, it happens again. What better could I do in this situation? How to make the very basics of programming thought &lt;em&gt;stick&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of two-alternative selection seems way more fundamental that just programming. We could not navigate one minute of our lives without already knowing it unconsciously. Come to a door... If not open: open it, else: walk thru. Not so complex. But, making it &lt;em&gt;conscious&lt;/em&gt; is a whole other ballgame. People don't really &lt;em&gt;think about&lt;/em&gt; what they were doing, and in many cases, this is a good thing. But in programming, we need to know how we are thinking. And think about it. And think about how we think about it. (You get the picture)&lt;/p&gt;&#xA;" OwnerUserId="4760" LastEditorUserId="204" LastEditDate="2018-03-23T15:14:03.277" LastActivityDate="2018-03-23T16:50:17.590" Title="What IF Thinking" Tags="|conceptual-frameworks|" AnswerCount="1" CommentCount="6" ClosedDate="2018-03-25T21:31:20.660" ContentLicense="CC BY-SA 3.0" />
  <row Id="4551" PostTypeId="2" ParentId="4549" CreationDate="2018-03-23T14:13:17.303" Score="3" Body="&lt;p&gt;This may be a result of students not relating their everyday usage of some words to their formal meaning, of course, but the issue really is that you can use teaching strategies to improve that. Some students will fail to &quot;get it&quot; on any given topic no matter what you say, and if you continue to repeat yourself in the same way, especially with the same words and techniques, they will continue to fail to get it. Every student learns differently and most learn differently from the way that you do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, you need to approach nearly every topic repeatedly but in a variety of ways. A purely logical approach, for example, reaches only a few students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a variety of things like metaphor and analogy (such as the one you give in the question and examples along with your explanations. Make it visual (not just textual) if you can. Make it active if you can. There are lots of tricks. Use them all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the particular example you give, a small improvement might help a few students:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// objectReference might be null&#xA;if ( objectReference == null ) {  // object does not exist&#xA;    objectType objectReference = new objectType( ... );  // so create it&#xA;    ...&#xA;}&#xA;// objectReference is unchanged here (TY to ctrl-alt-delor)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;However, your use of ellipsis also confuses me. Do you mean to do something only if the reference is originally null or do you mean to put the additional actions outside the closing brace where I put a comment. Also, as ctrl-alt-delor points out in a comment, you have created a new local reference variable within the block, so what occurs after the block is possibly a bit chaotic. It may not be a problem if that is the end of the program, but might be otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To teach &lt;code&gt;if&lt;/code&gt;, you need a lot of examples, not just one. Examples that clearly show the possible execution paths. They need not always be programming examples. Your door example could be couched in programming terms, for example, to connect the analogy to the programming language&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(!doorIsOpen()){&#xA;    openDoor();&#xA;}&#xA;walkThroughDoor();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Talk about it. Talk about the two original situations with the door. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But more important: don't use just this one example and expect everyone to get it. That is unlikely to happen. Use a different example in which an &lt;code&gt;else&lt;/code&gt; is needed. Talk about the difficulty of writing this with condition $doorIsOpen()$ rather than $!doorIsOpen()$. Come at the target (learning) from lots of directions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quick, ungraded, pop quiz can also tell you whether they have the concept or whether you need to do more. It can also let you know who you need to work with more intensively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be flexible. Surround them with a cloud of understanding. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My original answer here, missed the fact that there is a new local variable created in the block. That is part of what confuses me about the example and might be part of what is confusing students if this is a real example, though it may not, in fact, be an actual example presented to students. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-23T16:50:17.590" LastActivityDate="2018-03-23T16:50:17.590" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4552" PostTypeId="2" ParentId="4503" CreationDate="2018-03-24T06:40:18.073" Score="1" Body="&lt;p&gt;Let's see if I can answer the questions head on here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Should I provide answers to the exercises?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes. programming is not like mathematics, although they are closely related. They are multiple ways to achieve the same results. Some students appreciate when they are provided with the expected answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;If so should I include them as a part of the document with the exercises or as a separate document?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Separate document would be better. There are a lot of students who dont want to be treated with holding hands. They can easily ignore the separate document while those who need it can look at it. &lt;/p&gt;&#xA;" OwnerUserId="2605" LastActivityDate="2018-03-24T06:40:18.073" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4553" PostTypeId="2" ParentId="4519" CreationDate="2018-03-25T03:32:49.887" Score="-1" Body="&lt;p&gt;I am someone who is often distracted by what should not be the focal point of a situation, and I believe that it relates to your question and the basis of your frustration with your students.  I believe that all of us, whether we're computer programmers or newspaper columnists or waiters at Applebee's or cashiers at WalMart....no matter your occupation or position in life, being seen as a unique and solo, unto only yourself and visible in a singular light/frame of reference is an almost involuntary compulsion that belongs to all of us as human beings.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We especially feel pushed to &quot;shine alone&quot; when in a setting such as your classroom, where there is but ONE FINITE end to the means, the answer or completion to what is facing your students on the screen, and there is no varying or alternate in the way of the result.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each person you're teaching will have the exact same result for you to see when they finish your assignment, right?  And no individual indicators whatsoever will be evident by you or any of them in the final answer they arrive at.  But the mundane focus of their minds when they are faced with your problem to solve with it's finite, absolute answer with no variables at all is, NATURALLY. magnetic in it's attraction and pulls all focus toward it because it involves THEIR SIGNATURE or a sign of their &quot;mark&quot; on the entire exercise.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I don't think we are even participants sometimes in our own branding of ourselves when a scenario like this source of your frustration takes movement.  There is no human &quot;thumbprint&quot; or signature with a heart over the &quot;i&quot; to single you out in the computer lab as I remember it.  it's been a long time, but I don't remember there being a whole lot of gray area once arrival at the equation or programs' answer was reached by the whole of the class.  It's correct or you know ahead of time that you're all wrong and you go backwards and begin again until you arrive at the exact precise and without any mark of who you are or how you arrived there or what went through your brain in getting to the same place as every other person in that space sitting at their screens got to answer....it's a non-negotiable and one way road with no shoulder or guard rails for anything unexpected because it's not flexible.  It's automated and drone-ish in it's culmination.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the very focus to someone who ahead of time knows that they get no individual &quot;great theory&quot; or &quot;loved your process along the way&quot; kind of strokes in a personal way for completing what is on that screen - they have no control over their brain focusing on what is NOT what your curriculum intended to grab their focus and is the thorn in your side and so frustrating to you.  Because the human can't help but make their own flag to fly in self promotion of their very existence, even when they object to being seen or heard sometimes.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's why they focus on what you think is mundane and counterproductive but is their focus only due to something innate and involuntary in our thinking minds, but is a circuitry phenomenon in-factory setting in us all.  When there are nothing but parameters and rigid lines to stay between and all those around are confined to the same one dimensional confines, an errant spark fires off and focus is directed toward some little mark of individuality and &quot;I counted and stood unique and with no other duplicate&quot; and makes a classroom of computer screens change their priorities for a second in the name of our narcissism and the &quot;id&quot; portion of who we are at our core.  Needy and attention-seeking as being recognized to be special and outstanding or remarkable in at least one small way.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your source of angst is the students' fingerprint on the class because there aren't any other ways to mark their having existed there. I'm not sure you can come up with any kind of strategy to keep them from detailing their assignments, although maybe acknowledging that you are aware of the desire they may have to indulge that need or make the colorization the priority and the first thing they work on.  Point out, maybe? that time doesn't allow for extended personal touches so to practice discretion and remain focused on the problem at hand and those identifiers can be done at the end of their assignments?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm grasping at suggestions because I think the DNA is too powerful and redirection of the focus is not probable. Ego-driven forces are in power and it's not a democracy.&lt;/p&gt;&#xA;" OwnerUserId="4769" LastEditorUserId="27" LastEditDate="2018-03-25T04:27:42.913" LastActivityDate="2018-03-25T04:27:42.913" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4554" PostTypeId="1" CreationDate="2018-03-26T12:07:46.043" Score="18" ViewCount="7099" Body="&lt;p&gt;My second semester programming curriculum includes a searching and sorting unit and mentions Big O notation, giving the notation for each search and sort we implement.  It does not show the derivations but does show how you can deduce some Big Os by looking at the structure of the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course that I am teaching is called &lt;em&gt;Programming II&lt;/em&gt;.  Programming II is the basic concepts of programming I (variables, decisions, loops, arrays, functions) again in a different language (C# as opposed to VB.NET), plus object-oriented principles, multi-D arrays, file I/O, searching and sorting, collections, interfaces, and some other minor language features of C#.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My district allows very limited prerequisite specification, meaning the only prerequisite for Programming II is Programming I.  (Programming I has no prerequisites.)  This means I have a widely varying level of mathematics exposure/competency for the students who come into the second semester course.  I struggle with how much or how little to say or share about Big O notation.  I want my students to have exposure because I know they will see it later in their CS careers, but I don't want to scare them away with &quot;math&quot;.  And I have to account for their differing math skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you taught Big O to high schoolers?  What methods did you use?  How do you deal with their differing levels of math?  Is it a good idea to teach them derivations?  On tests, do you require them to do derivations or have them parrot back Big Os for various algorithms?&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="27" LastEditDate="2018-03-26T22:33:40.490" LastActivityDate="2018-03-28T03:45:06.493" Title="How do you teach Big O to high schoolers with varying degrees of math exposure?" Tags="|curriculum-design|lesson-ideas|secondary-education|" AnswerCount="6" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4555" PostTypeId="2" ParentId="4554" CreationDate="2018-03-26T13:12:52.587" Score="24" Body="&lt;p&gt;One good overall educational strategy is to teach the same thing to students repeatedly, using a Spiral approach, in which each turn of the spiral teaches at a deeper level. Don't expect the students to completely get much of anything at the first mention of it, but reinforce the ideas and deepen the knowledge. You can do this for many things in one course, but you can also do it over a student's career. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you say, it is a mathematical concept and students may not yet have the tools needed to completely get it, but you can start, and you can give them enough insight so that when &lt;code&gt;Big O&lt;/code&gt; comes up later, say in their undergraduate education, they have some prior basis for understanding it more deeply.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it is important that you don't oversimplify the topic or to give them false information, leading them to misconceptions that require &lt;em&gt;un-learning&lt;/em&gt; later. So, first, be honest: the topic is mathematical, it is a bit deep, we can only scratch the surface a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For young students without a solid algebra background and little exposure to calculus, it might be good to start with a &lt;a href=&quot;https://www.desmos.com/calculator&quot; rel=&quot;noreferrer&quot;&gt;graphing calculator&lt;/a&gt; so that students can see what happens to common functions as the independent variable increases. Graphing $log(x)$, $x$, $x^2$, $2^x$ etc is a start. Graphing $1000x + x^2$ can give them the idea that the high order term dominates the growth. If they can &lt;em&gt;see&lt;/em&gt; it, you don't need to depend on their knowledge from elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you can show them a few algorithms and look at the actual run times, noting that you are only giving them an idea. One of my favorite &quot;tricks&quot; is to ask students who have seen a few sort algorithms, to come up with the most inefficient sort algorithm they can think of. With a good randomizer even repeatedly randomizing an array and then checking to see if it is sorted &lt;em&gt;is&lt;/em&gt; an algorithm by the law of large numbers. If they know about permutations they can even calculate the maximum number of iterations needed to sort. If they are not likely to know that from other places, then computing permutations can be an earlier programming exercise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with teaching the first cycle of a deep knowledge of Big O is that it is easy to give the wrong impression about a lot of things depending on the words and examples you use. If you say that, for example, bubble sort is $O(n^2)$ you are correct, but it may have little meaning. It doesn't mean, however that the &quot;running time&quot; of bubble sort is $n^2$, but (if $n^2$ is the best bound) that it is &quot;proportional to $n^2$ for large values of n.&quot; It is easy to forget to say those extra words: &quot;proportional&quot;, &quot;large...&quot;. It is also easy to forget that Big O is about upper bounds, only. So technically, Bubble Sort is also $O(2^n)$, but it would probably not be wise to stress that in the first cycle of learning outside a mathematics class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the examples matter. Bubble sort (if unoptimized) always runs in quadratic time and you can see that from the algorithm. It depends only on the size of the data set. But insertion sort is different. The normal program has two nested loops, just like bubble sort, but if the original dataset is already nearly sorted (by some measure of &quot;nearly&quot;) then it actually runs in near linear time - or even linear time, for some examples. But it is still a quadratic algorithm, since its &lt;em&gt;worst case&lt;/em&gt; behavior is quadratic. So, &quot;worst case&quot; is another important word to keep emphasizing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You also need to mention, but probably not stress, is that efficiency need not be determined by the size of the data set necessarily. Factoring large numbers is an example. There is only one number to factor, but it is harder to do for larger numbers since (for brute force, anyway), the difficulty is determined by the number of possible solutions, which is itself large (but can be estimated). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third complication is that it isn't always &lt;em&gt;time&lt;/em&gt; complexity that is needed. &lt;em&gt;Space&lt;/em&gt; complexity is also often important. How much &quot;scratch&quot; space does an algorithm need for datasets of different sizes (or datasets of different complexity, or ...). A &lt;a href=&quot;https://arxiv.org/pdf/1803.03453v1.pdf&quot; rel=&quot;noreferrer&quot;&gt;recent (early 2018) experiment&lt;/a&gt;(pdf) in Artificial Intelligence, pitted two different AIs against one another. One of them &quot;learned&quot; that it could &quot;win&quot; the competition by forcing the other to use more and more memory space, resulting in a crash of the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea to get across is that if the numbers (data set size for example) are small, then using a highly efficient algorithm may be worse than one theoretically more &quot;inefficient&quot;. &lt;code&gt;Big O&lt;/code&gt; is about asymptotic behavior, of course and the more efficient algorithm may be more complex and actually be worse on small data sets as well as being, perhaps, more likely to be buggy. Some quick sorters, for example, revert to a quadratic algorithm once the split gets the datasets small enough. I once built a product that had an exponential algorithm embedded in it. That worked, since the likelihood of a large dataset was vanishingly small. Integer Programming is actually done by real programs in the real world in spite of the complexity of the problem itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally you need to note that &lt;code&gt;Big O&lt;/code&gt; is about algorithms. That is related to the &lt;em&gt;complexity&lt;/em&gt; of problems, but isn't exactly the same thing. There are a lot of array sorting algorithms and they have different exponential behavior. But the problem itself has an inherent complexity. For sorting &lt;code&gt;int&lt;/code&gt; or &lt;code&gt;long&lt;/code&gt; values (the built in data types) in a computer, the complexity is actually linear (Radix Sort). You need some sort of a BigNum data type before you reach $O(n*log(n))$, since the number of possible values in int is bounded. And for large numbers of arbitrarily large values, you start to run into space problems for most purposes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me note, for completeness, prompted by a &quot;conversation&quot; in comments here with user RiaD, that any algorithm that is $O(n^2)$, such as Bubble Sort, is also $O(n^3)$ and $O(n^4)$ and $O(2^n)$, since all of those other functions dominate $g(n) = n^2$. One normally gives a &quot;good&quot; estimate, but the &quot;worse&quot; estimates for growth apply by default. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;tl;dr: Say what's true. It is a complex, mathematical topic. Examples are good. Deep understanding can come later. Completeness isn't essential in the first cycle of understanding. Take that into account when testing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-27T16:01:50.133" LastActivityDate="2018-03-27T16:01:50.133" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4556" PostTypeId="2" ParentId="1430" CreationDate="2018-03-26T16:12:08.200" Score="1" Body="&lt;p&gt;While this question is specifically about Java, it is a subset of the larger question as to what version of software should be used for teaching. This involves not only languages (Java/C/C++/Python), but operating systems (Windows/Linux/MacOS), and compilers (gnu/MSstudio/clang).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are good reasons for any of the choices. What the student is concerned with is how their program will be tested. Therefore, it is important to specify how testing is performed. CSU's blanket statement is that testing is performed on the lab computers, which the students may access both in person and remotely. They are expected to test their program on lab computers, no matter where they actually developed the code. Our system admin provides identical environments on all lab computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least one university provided a VM image to the students to guarantee a consistent environment. At a minimum, one should specify which version of a language (e.g. Java8), will be used in testing.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-03-26T16:12:08.200" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4557" PostTypeId="2" ParentId="4554" CreationDate="2018-03-26T18:15:05.473" Score="9" Body="&lt;p&gt;To be honest, I really hate that Big-O notation in academia seems to be universally taught in the context of sorting algorithms.  That's how I was taught, but it wasn't actually what drove home the importance of Big-O notation.&lt;/p&gt;&#xA;&lt;p&gt;Instead, it was my roommate's homework assignment, which he did with the most fantastically inefficient algorithm; here's an adapted version of the problem (using C# instead of C-style linked lists)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class LongNumberDigit&#xA;{&#xA;    public int digitValue;&#xA;    public LongNumberDigit nextDigit;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Okay, this is a simple class—it stores a single digit of a long number—as well as either a &lt;code&gt;NULL&lt;/code&gt; &lt;code&gt;nextDigit&lt;/code&gt;, or another &lt;code&gt;LongNumberDigit&lt;/code&gt; of the next digit of the number.  So '572' would be a '5' digit, pointing to a '7' digit, pointing to a '2' digit, pointing to &lt;code&gt;NULL&lt;/code&gt;.  I want you to write a function that takes two &lt;code&gt;LongNumberDigits&lt;/code&gt;—each the first digit of a possibly really long number—and outputs another &lt;code&gt;LongNumberDigit&lt;/code&gt; of those first two numbers multiplied together.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is an example of where Big-O can really shine, because your students might come up with anything from O(n&lt;sup&gt;2&lt;/sup&gt;) to O(n&lt;sup&gt;5&lt;/sup&gt;).  And it's very simple to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Show how you get those numbers (ultimately, everything they'll have&#xA;will be simple loops.)&lt;/li&gt;&#xA;&lt;li&gt;Show how drastically that Big-O notation can impact things with large&#xA;values&lt;/li&gt;&#xA;&lt;li&gt;Show how changing an algorithm just a little bit can have huge impacts on&#xA;the Big-O notation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Whereas, with sorting, it's more mathematically challenging and abstract to get a Big-O value, and it's not as satisfying—basically, O(n*n) versus O(n*log(n))&lt;/p&gt;&#xA;&lt;p&gt;Not saying you have to use this exact example.  Just find something that requires them to write an algorithm that:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Generally will involve simple loops&lt;/li&gt;&#xA;&lt;li&gt;Can have a wildly different levels of efficiency depending on how&#xA;they design it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4777" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-03-27T13:50:10.613" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4558" PostTypeId="2" ParentId="4554" CreationDate="2018-03-26T18:15:32.320" Score="11" Body="&lt;p&gt;Here are some notes I wrote when I first introduced this concept at the college level. The example came from Alex Thornton, a lecturer here at UCI. I observed him talk about this in his class, and wrote it up for my students. Extra advantage: it uses the O(1) complexity class, which sometimes throws students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose that you want to get from point A to point B, and you have two ways to&#xA;travel: by walking and by teleporting. If you walk, you walk at a constant&#xA;rate from A to B; if you teleport, you must wait 1 minute for the teleporter to&#xA;warm up, and then you will be instantaneously transported from A to B. Here N&#xA;(the size of the problem to solve) is the distance between A and B.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, walking is represented by the linear complexity class, O(N): if you double&#xA;the distance you need to walk, you double the time to get there. Teleportation&#xA;is represented by the constant complexity class, O(1): if you double the&#xA;distance you need to walk, the amount of time does not change to get there: it&#xA;is always 1 minute.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the discussion above, because the complexity class O(1) is a lower&#xA;complexity class than O(N), we know that for a big enough distance teleportation&#xA;will be faster than walking. What is that distance? The distance we can walk in&#xA;1 minute (the amount of time it takes the teleporter to warm up). We can draw&#xA;these relationships as follows, showing where the Walk and Teleport lines cross.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;                 Walk&#xA;     time |       /&#xA;          |      /&#xA;   60 secs+-----+--------------------------- Teleport&#xA;          |    /&#xA;          |   /&#xA;          |  /&#xA;          | /&#xA;          |/&#xA;          +--------------------------------&#xA;                  PROBLEM SIZE N = DISTANCE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The sloping line represents the function T&lt;sub&gt;walk&lt;/sub&gt;(N) = (1/speed)*N; when we remove&#xA;the constant (1/speed), this function is just O(N). The horizontal line&#xA;represent the function T&lt;sub&gt;teleport&lt;/sub&gt;(N) = 60; the time is always 60 seconds. We&#xA;treat that as 60*1 (so we remove the 60 as a constant multiplier), which leaves&#xA;this function as O(1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The slope of the Walk line represents the speed: slower speeds have a bigger&#xA;slope; higher speeds have a smaller slope. But no matter the slope, the Walk&#xA;line will eventually intersects the Teleport line: where both modes of&#xA;transportation take the same amount of time. For all larger distances,&#xA;teleporting will take less time than walking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What if we needed 30 seconds to put on our shoes. The graphs would change&#xA;to be&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;              Walk&#xA;     time |    /&#xA;          |   /&#xA;   60 secs+--+----------------------------- Teleport&#xA;          | /&#xA;          |/&#xA;   30 secs+   Putting on shoes in 30 seconds&#xA;          |&#xA;          |&#xA;          +--------------------------------&#xA;                  PROBLEM SIZE N = DISTANCE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The lines still cross in the same way (and still at 60 seconds, although now at&#xA;a smaller distance): the distance we can walk in 30 seconds, because that is&#xA;how much time we can walk between putting on our shoes and starting to teleport.&#xA;For these specific lines we know that walking is better (takes less time) than&#xA;teleporting for small distances, but that is because we have written out the&#xA;full equations here. Generally, when we know only that one process is O(N) and&#xA;one is O(1) we don't know which is better for small N.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if it took us 90 seconds to put on our shoes, it would always be&#xA;faster to teleport. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;            Walk&#xA;     time | /&#xA;          |/&#xA;   90 secs+   Putting on shoes in 90 seconds&#xA;          |&#xA;          |&#xA;   60 secs+-------------------------------- Teleport&#xA;          |&#xA;          |&#xA;   30 secs|&#xA;          |&#xA;          |&#xA;          +--------------------------------&#xA;                  PROBLEM SIZE N = DISTANCE&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Whether T&lt;sub&gt;walk&lt;/sub&gt;(N) = (1/speed)*N or (1/speed)*N + 60 or T&lt;sub&gt;walk&lt;/sub&gt;(N) = (1/speed) + 90,&#xA;we still say walking is O(N). So asking whether O(1) or O(N) is faster for&#xA;small sized problems is unknown: it depends on the speed and the dropped term&#xA;(either 0, 60, or 90). But regardless of constants and dropped term, we know&#xA;there is a distance, at which (and beyond) that teleporting,  O(1), is faster&#xA;than walking, O(N).&lt;/p&gt;&#xA;" OwnerUserId="401" LastEditorUserId="-1" LastEditDate="2018-03-27T16:58:52.093" LastActivityDate="2018-03-27T16:58:52.093" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4559" PostTypeId="2" ParentId="4554" CreationDate="2018-03-26T18:19:14.560" Score="3" Body="&lt;p&gt;What I always do is to look at multiplying by $2$, as everyone can multiply by $2$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider $O(n)$ (linear) time, if you double $n$, then the running time doubles* (okay, not precisely, I'm assuming $c\cdot n$ here. But this is a preparation, let's just assume we have only the leading term. If you think this is important, add this) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now look at $O(n^2)$ (quadratic), here doubling $n$ gives us a running time of $4$ times the original! Wow! This isn't fun!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, bonus, consider $O(2^n)$ and lets multiply by $2$ again! Uh oh. The answer now is $2^n$ times longer than before. This is bad! Let's stick to polynomial running times!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh and this works with $O(1)$ as well. What happens if I double $n$? Nothing! It remains $O(1)$!&lt;/p&gt;&#xA;" OwnerUserId="154" LastEditorUserId="154" LastEditDate="2018-03-27T04:49:44.663" LastActivityDate="2018-03-27T04:49:44.663" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4560" PostTypeId="2" ParentId="4554" CreationDate="2018-03-27T11:03:27.060" Score="5" Body="&lt;p&gt;I learned to program a long time before I'd ever &lt;em&gt;heard&lt;/em&gt; of &quot;Big O Notation&quot; or any other formal analysis of algorithms, asymptotic or otherwise. Three plus decades into my programming, I read a book  by &lt;a href=&quot;https://www.cs.vt.edu/user/48&quot; rel=&quot;noreferrer&quot; title=&quot;Professor Clifford A. Shaffer&quot;&gt;Clifford A. Shaffer&lt;/a&gt; of &lt;a href=&quot;https://vt.edu/&quot; rel=&quot;noreferrer&quot;&gt;Virginia Tech&lt;/a&gt;, &lt;em&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/B007EID7AQ&quot; rel=&quot;noreferrer&quot;&gt;A Practical Introduction to Data Structures and Algorithm Analysis&lt;/a&gt;&lt;/em&gt;. It has since been republished as &lt;em&gt;Data Structures and Algorithm Analysis&lt;/em&gt; with version in &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/048648582X&quot; rel=&quot;noreferrer&quot;&gt;C++&lt;/a&gt; and &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0486485811&quot; rel=&quot;noreferrer&quot;&gt;Java&lt;/a&gt;.&#xA;Both the &lt;a href=&quot;https://drive.google.com/open?id=1b18p0Zd4jbRxXQ1tebTmzLsdEDBcEEkH&quot; rel=&quot;noreferrer&quot;&gt;C++ version&lt;/a&gt; and &lt;a href=&quot;https://drive.google.com/open?id=1zjF5kdOd9iKxzaHIT_FXo4HZw4s7-1EO&quot; rel=&quot;noreferrer&quot;&gt;Java version&lt;/a&gt; are available &lt;a href=&quot;https://people.cs.vt.edu/shaffer/Book/&quot; rel=&quot;noreferrer&quot;&gt;online&lt;/a&gt; along with lots all of the &lt;a href=&quot;https://people.cs.vt.edu/shaffer/Book/JAVA/CS3114_09212011.ppt&quot; rel=&quot;noreferrer&quot; title=&quot;Download the PowerPoint presentation&quot;&gt;resources&lt;/a&gt;, &lt;a href=&quot;https://people.cs.vt.edu/shaffer/Book/Assignments.html&quot; rel=&quot;noreferrer&quot; title=&quot;A collection of programming assignments that the author has used&quot;&gt;assignments&lt;/a&gt;, and &lt;a href=&quot;https://people.cs.vt.edu/shaffer/Book/C++3e/progs&quot; rel=&quot;noreferrer&quot;&gt;C++&lt;/a&gt; and &lt;a href=&quot;https://people.cs.vt.edu/shaffer/Book/JAVA/progs&quot; rel=&quot;noreferrer&quot;&gt;Java&lt;/a&gt; source codes for using the books in class.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://books.google.com/books/about/A_Practical_Introduction_to_Data_Structu.html?id=uPwkAQAAIAAJ&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4xqiYt.jpg&quot; alt=&quot;A Practical Introduction to Data Structures and Algorithm Analysis, 2nd edition&quot; title=&quot;A Practical Introduction to Data Structures and Algorithm Analysis Second Edition&quot;&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#xA;  &lt;a href=&quot;http://store.doverpublications.com/048648582x.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/axbBat.jpg&quot; alt=&quot;Data Structures and Algorithm Analysis in C++&quot; title=&quot;Data Structures and Algorithm Analysis in C++ Third Edition&quot;&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#xA;  &lt;a href=&quot;http://store.doverpublications.com/0486485811.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/gazdrt.jpg&quot; alt=&quot;Data Structures and Algorithm Analysis in Java&quot; title=&quot;Data Structures and Algorithm Analysis in Java Third Edition&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When I first read chapter 3, &lt;em&gt;Algorithm Analysis&lt;/em&gt;, I basically said to myself, &quot;Yeah, I got that.&quot; After all, I'd been programming for a while, and I had a good &lt;em&gt;sense&lt;/em&gt; about how complex an algorithm was, and didn't need any formal notation, or explanation for it. Later, after it had percolated through my brain for a while, I realized that it &lt;em&gt;was&lt;/em&gt; rather handy to have a way to explain to others, including customers and managers, why doing it &lt;em&gt;this&lt;/em&gt; way would take more time, even if it saved disk space, or, on the other hand, why &lt;em&gt;that&lt;/em&gt; way was doing the job fast, but the disk access was the bottleneck in program speed. All I could remember from the first breeze through the chapter was that it had a lot of mathematics involved, including things like $O(n log n)$, $T(n)=O(f(n))$, and such. I knew I'd seen at least one $\sum_{i=0}^n = yada + yada$ type expression in there somewhere as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Never having studied Calculus I was rather intimidated by the thought of all that math. (I like math pretty well, and I also know what I don't know.) Still, I had the book and I had the time, so it couldn't hurt to go back and &lt;em&gt;study&lt;/em&gt; that chapter again. On the second reading I realized that while there was math &lt;em&gt;involved&lt;/em&gt;, there wasn't really any math &lt;em&gt;performed&lt;/em&gt;. Rather the concepts of math were used to &lt;em&gt;explain&lt;/em&gt; what was being analyzed and how that affected teh growth rate. The concepts were important, but never once did an equation need to be &lt;em&gt;solved&lt;/em&gt;. Furthermore, just in case the student did not understand the relationships between $10n$, $n log n$, $n^2$, $2^n$, and $n!$ the author included graphs and tables.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/cqLCv.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/cqLCvl.png&quot; alt=&quot;Sample graph&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Bg1KP.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Bg1KPl.png&quot; alt=&quot;Sample table&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The language of the books is aimed at college-level students, and the equations and explanations seem to assume the student has a prior understanding of the &quot;language&quot; used in the mathematical analysis. Therefore, I couldn't recommend using that as the textbook for the class, or even for that segment of class. I can, however, recommend it as an excellent starting point for &lt;em&gt;your&lt;/em&gt; lesson plan. Using the progression of his explanations for &lt;em&gt;finding&lt;/em&gt; the growth rate of an algorithm, you can rework the examples, and the application of mathematical &lt;em&gt;concepts&lt;/em&gt; so that it better fits the knowledge of your students, and carry it forward in a manner consistent with your style in the class so far. The method used to show, and find, growth rates, and the Big $\Bbb O$, Big $\Omega$, and Big $\Theta$ are decidedly &lt;em&gt;non-math&lt;/em&gt; in their application, and adjusting the material for the students you see in your classroom should be reasonably simple.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that you should give your students the exposure to the subject, and deepen that exposure as much as the curriculum will allow. I've found, after learning from that chapter, that I am equipped to explain my analysis of a routine, and its possible optimizations, much better to other programmers - whether they know Big $\Bbb O$ notation or not. If someone &lt;em&gt;does&lt;/em&gt; know Big $\Bbb O$, it is an excellent shortcut to explaining why a routine is slow, and if they &lt;em&gt;do not&lt;/em&gt; know Big $\Bbb O$, I am now able to quantify and explain what I used to intuit and couldn't explain.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The &lt;em&gt;Mathematics&lt;/em&gt; Involved&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Again, the mathematics is more for explaining the results than for finding them. Understanding what the graph looks like helps a lot, by orders of magnitude. The online &lt;a href=&quot;https://www.desmos.com/calculator&quot; rel=&quot;noreferrer&quot;&gt;graphing calculator&lt;/a&gt; mentioned by &lt;a href=&quot;https://cseducators.stackexchange.com/users/1293/buffy&quot;&gt;Buffy&lt;/a&gt; in another &lt;a href=&quot;https://cseducators.stackexchange.com/a/4555/104&quot;&gt;answer&lt;/a&gt; is an excellent way to deal with the math involved in understanding the &lt;em&gt;growth rate&lt;/em&gt; that Big $\Bbb O$ notation signifies. I once made a similar, if &lt;em&gt;much&lt;/em&gt; simpler, tool for explaining the concepts of linear, logarithmic, and quadratic to GED students. What they couldn't grasp with words and text, the readily apprehended with interactive visuals.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Testing&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As this will be the introduction to Big $\Bbb O$ notation, and at that only a &quot;dip your toe in the water&quot; type exposure, testing on the subject probably shouldn't be very intense. If you covered the complexity of heap sort and can write a heap sort in a manner they have not seen, then use that and ask them to find the Big $\Bbb O$ of the new version. It's still a heap sort, and they should be able to reach the same results as for the one they've already seen. Additionally, with some short code fragments, have them classify the fragments, or use pairs or fragments, and ask for the one with the better Big $\Bbb O$ for a significantly large value of $n$. The idea is to reinforce the usefulness of the analysis, and that Big $\Bbb O$ notation is only a simple, common, way of expressing the complexity that allows for comparing algorithms and selecting which one to use in a new situation. Leave the finer details for later courses when, and if, they pursue a CS curriculum.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-03-27T11:03:27.060" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4562" PostTypeId="2" ParentId="4554" CreationDate="2018-03-27T13:01:47.350" Score="4" Body="&lt;p&gt;Teach it as a pure concept and not as a mathematical formula. Big O simply describes how your algorithms runtime behaves as your data increases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say you are looking for a certain item out of a pile of 10 items. Let's look at an algorithm which is essentially &quot;pick up each item and check it, and set it aside if it isn't the one and keep picking&quot;. That algorithm may be fine and perform within a runtime that meets expectations, but as the number of items in the pile increases, the runtime does too. If the number of items increases to billions, the runtime may become unacceptable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this example, the Big O is basically linear. As the number of items increases the runtime increases in a linear fashion. It is important to understand the Big O of your algorithm from the start because that can help you avoid starting out with a bad algorithm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To illustrate that, now consider that we started with an algorithm that just inspects one item, checks to see if it is the one and if not throw it back into the pile, then repeat. In other words, we don't set the ones we know aren't the item aside. Now our algorithm is very inefficient and has an exponential Big O because there is potential to inspect items more than once. It could also happen that the algorithm never finishes at all, and the likelihood of that happening increases as the number of items gets humongous.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we happened to start with that idea, and pause to understand the Big O, we'd have started with the better algorithm. Searches of unmanaged data should be linear, meaning the worst scenario in searching n items is that you have to pick and examine all n items. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you move into ways we get better than linear performance. If you have control over how the pool of items you will search is organized, and you can insert them in a sorted fashion, then your search can be better than linear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, if you take the time to index the items, your algorithm can be much better than linear. A good example is a library -- books are arranged by section, then by author. You don't have to search every book in the library to find the one you seek. The library also has a card catalog, so you don't have to search at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is work/time involved in organizing and maintaining the library and its catalog. But it makes sense to accept this overhead because the volume of books that come in is much, much lower than the volume of searches. It also takes space. An organized library has a larger physical footprint than it would have if the books were not organized for better searching. The card catalog takes space too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A computer scientist weighs all the constraints and device the best strategy. Any algorithm for searching that is better than linear will slow down the additions and changes of items into the pool. If the items are added/removed/changed a lot more frequently than they are searched, then an index search may not be a good choice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would expect high school students that understand these concepts to be able to answer questions on a test that propose a search algorithm, and provide the key constraints, and ask &quot;is this a good strategy?&quot; or &quot;how might this strategy be improved and what down-sides should be considered?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you can ignore the overhead that inserting/updating the data in an organized (or even indexed) fashion then it makes sense to target a better than linear approach. But when you can't ignore that because the volume of add/delete/updates is huge, and cannot be slowed down, then it makes sense to target a linear approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd expect junior computer science students to be able to understand the considerations and make choices and explain their choice. If they can do that but cannot necessarily express it in formal mathematical language, I'd be OK with that. But as an educator you would need to align to whatever your district/state expects, because if ultimately then end up taking a standardized test that does not focus on concepts and does focus on mathematical formulas, that would not work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your school aligns to the below, then what I describe above would work: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://k12cs.org/framework-statements-by-concept/#jump-algorithms-programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://k12cs.org/framework-statements-by-concept/#jump-algorithms-programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because as 12th grade student:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Analysis using sophisticated mathematical notation to classify algorithm performance, such as Big-O notation, is not expected.&quot;&lt;/p&gt;&#xA;" OwnerUserId="4786" LastActivityDate="2018-03-27T13:01:47.350" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4563" PostTypeId="2" ParentId="4519" CreationDate="2018-03-27T16:17:16.290" Score="-2" Body="&lt;p&gt;Answer because I am not registered to make a comment (and am not going to so please do not implore) Yes, we did actually teach months of fundamentals, beginning with Console mode programs, before reaching Windows Forms and then ASP.Net (Web Forms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with the recent answer that says that people want (even unconsciously) to distinguish themselves. Fair enough. But there are more &lt;em&gt;programmatic&lt;/em&gt; changes that can be made, instead of only colors and sizes on the screen. Just getting the bare Bootstrap to render properly is actually difficult, and an achievement in itself. In the &quot;real world&quot; (hopefully not like the &quot;real world&quot; that Morpheus showed Neo) someone else will probably be doing the visual design, and programmers have their hands full just getting that to render correctly, on everything from a phone to a wall-sized screen, using only Bootstrap (or whatever).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, having been a programming student for decades, a Teaching Assistant grading the code of novices, and a professional programmer working with colleagues, I can assert positively that everyone's code will look very different, and two programmers will write quite different solutions, even if they function and look &lt;em&gt;identical&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a simple example, you would think that &lt;strong&gt;Morse Code&lt;/strong&gt; going out over radio would be the most machine-like and identical thing, but it is not. Every human being sending Morse Code with a hand key will sound recognizably different (speaking from long experience). Even different semi-automatic keys of the exact same design will sound different, and further, many electronic means of generating 'perfect' code will sound recognizably different! I have participated in contests and known from just a couple letters that I had already contacted someone that I could hear again later on, so different was the sound.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are lots of ways to distinguish oneself, and to me as an Instructor, the style of students' code, their idioms, how clear and understandable it is... are all as obvious and unique as the nose on your face. No need for applying makeup to your screens.&lt;/p&gt;&#xA;" OwnerUserId="4789" LastActivityDate="2018-03-27T16:17:16.290" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4564" PostTypeId="1" CreationDate="2018-03-27T16:48:21.467" Score="3" ViewCount="203" Body="&lt;p&gt;Are students generally aware of test taking strategy or do I need to emphasize this? I have to ask because I often reuse tests and some years all the students breeze through with plenty of time, and other years it is challenging, and they might even run out of time. A test where they run out of time is essentially invalid and does not help me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I think there is in those cases a failure to make the best use of the time! &lt;em&gt;I tell them the point values of different items (1 pt for True / False, 4 for Multiple Choice, 5 for Fill-in words) and I say to look over the entire test at the start, to answer all the easy ones (for them) first, then go over it again to get slightly harder ones, then the hardest ones, and finally, review the answers before submitting the attempt.&lt;/em&gt; So, I do give them strategy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But sometimes there is still this tragedy: someone runs out of time half-way through. My tests are almost always open book and notes (but no internet use). When I hear, right from the start, lots of page-flipping, I know it will not end well. Someone is starting at the first question (T/F is at the start, then Multi choice, then Fill-in), and giving equal attention to all of them. I think it is because, even though they know the strategy, they panic and just bear down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me, this is work-related learning, and we are giving workplace-relevant training, and so learning not to bear down is a good lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to introduce and reiterate Test Taking Strategy, beyond what I have already done? How to quell their panic, when I hear the page-flipping? Too late?&lt;/p&gt;&#xA;" OwnerUserId="4790" LastEditorUserId="1293" LastEditDate="2018-03-27T17:57:22.423" LastActivityDate="2018-03-29T13:39:04.860" Title="Test takings strategy tragedy" Tags="|exams|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4565" PostTypeId="2" ParentId="4564" CreationDate="2018-03-27T17:35:16.400" Score="5" Body="&lt;p&gt;Test taking is a skill that not every student has. It should be learnable with practice, but not everyone comes to the same level. This is independent of subject. Some people just freeze up, some spend too much time on inessentials, trying hard to &quot;get it right.&quot; Some students just panic and nothing you say will alleviate that panic. Every exam is like their first ride on a zip-line or their first rappel down a sheer cliff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like anything else, all of your instruction about strategy will only reach some and everyone's response will be different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, There are two things you can do. First, my own preference is to avoid stressing tests in favor of projects for grading. Tests are useful for advising, provided that you do advise the students singly when the fall short. For grading, however, projects let students do their best work in a more measured mental state. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I found that open-book exams are far from optimal. The only exam I distinctly remember badly failing in College was an open-book test in Physics. The problem is that the student will study wrong before the exam and will come to depend on the book in the exam. That is why you heard the page flipping. The &quot;facts&quot; were in the book. I don't need them in my head. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prior to any exam that &quot;counts&quot; you want students to review and practice with the material in a way that mimics what they are likely to see on the test. They can/should provide their own review materials, or you can provide them (not as effective). The nature of the problem is that test preparation for an open book test is insufficiently &lt;em&gt;active&lt;/em&gt;. They don't do much to reinforce their own knowledge beyond, perhaps, knowing a bit about where they can find various things in the book. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, your test isn't likely to just ask them to transcribe the book's information, but to do something with &lt;em&gt;knowledge learned&lt;/em&gt;. Open book tests actually discourage the actual &lt;em&gt;learning&lt;/em&gt; part. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative to open-book is to permit the student to bring one standard sized sheet of paper to the exam on which they may write anything they like prior to the exam. The paper should be signed by the student and handed in with the exam (largely to prevent student B from using a copy of student A's sheet). This forces them to be at least a bit active in their prep. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A second, possibly valid, use of open-book testing is the following. Assuming that the test period is about an hour, announce beforehand that for a five minute period starting at the 30 minute mark, students may consult their books and/or notes. The open-book segment needs to be short and it needs to be after students have had a chance to consider each question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: Consign open-book tests to the dust-bin of history.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-03-28T12:02:33.290" LastActivityDate="2018-03-28T12:02:33.290" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4567" PostTypeId="2" ParentId="4564" CreationDate="2018-03-29T13:39:04.860" Score="-1" Body="&lt;p&gt;Tests / Quizzes tend to be under 30% of the total points for a course segment (a few weeks). The rest is Lab projects that they have days to work on each one. My co-instructor has more 'performance' oriented questions on their tests, and I lean towards using the test questions provided by the textbook publisher (choosing selectively).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recall of words and ideas is absolutely vital as a programmer, equal in importance only to being able to look things up quickly and accurately. And, that is pretty much the entirety of what I am trying to impart at this point. They will &lt;em&gt;never&lt;/em&gt; remember everything in a single course segment, let alone the entire year. But they must end up with a tree of related ideas that prompt their memory, or they have learnt nothing at all. I admit to my ignorance in how to plant and nurture this tree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It always mystifies me when we are looking at yet another way to use a Collection, and I say, &quot;this is a Collection&quot; (being careful to capitalize the word) and they look as though they have not heard of Collections relentlessly during the last 4 months in every conceivable circumstance. It's an ubiquitous concept. Get used to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Working under pressure is necessary. Someone will ask a question in a meeting (or a job interview) and something had better come to mind. I realize that people vary in that ability, and one of my former supervisors was not good at thinking that fast. But he got good at reformulating the question into his perception of the path to proceed, and saying, &quot;I will get back to you right away on this.&quot; It worked. So, in fill-in questions, if the person has even a related word or concept, I give partial points. I am not an ogre.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many times I have solved programming problems by recalling some tidbit I had read years ago, and then &lt;em&gt;looking it up to get the details of how to apply it.&lt;/em&gt; So, open book is simply how life works, not some awful stumbling block that I am placing. But not panicking is something that every professional needs to learn. We cannot afford the results otherwise.&lt;/p&gt;&#xA;" OwnerUserId="4804" LastActivityDate="2018-03-29T13:39:04.860" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4568" PostTypeId="2" ParentId="360" CreationDate="2018-03-29T19:51:22.393" Score="-1" Body="&lt;p&gt;I found this nice Java example on &lt;a href=&quot;http://www.horstmann.com/bigj/help/debugger/tutorial.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Horstmann's&lt;/a&gt; web site. A complete example with a variety of exercises. Very well written, as are his books. &lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="58" LastEditDate="2018-03-31T00:22:47.203" LastActivityDate="2018-03-31T00:22:47.203" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4569" PostTypeId="1" CreationDate="2018-04-01T11:13:00.070" Score="8" ViewCount="797" Body="&lt;p&gt;Some friends of mine, over the years, asked me suggestions on what to study for learning how to code. Most of them had no real final purpose, just wanted to be able to understand programming and be able to work with it if needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the asker was a motivated person, I always answered to first learn C, then C++ and finally to pick up an high level language (like Python, R, MATLAB, Swift, JavaScript or whatever then would have been needed). This is the road I followed and I feel that having first learned a low level language (with pointers!) followed by its natural OOP extension, I have now a deeper control on how a generic programming language behave, and I can easily learn any programming language sharing the paradigms of C++.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand I suggested less motivated person to start with an high level language (Python, R or MATLAB), so to not let them be scared by the pitfalls of C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Based on your experience, would you give the same suggestion I gave? I mean, do you agree that starting with C/C++ is beneficial for a deep understating of programming or do you think that is easier to start with a simple language and then deepen the knowledge with C/C++?&lt;/p&gt;&#xA;" OwnerUserId="4818" LastEditorUserId="58" LastEditDate="2018-04-05T23:26:48.750" LastActivityDate="2018-05-19T10:11:06.640" Title="For a beginner, is it better to start with C or a higher level language?" Tags="|curriculum-design|self-learning|language-choice|" AnswerCount="12" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4570" PostTypeId="2" ParentId="4569" CreationDate="2018-04-01T12:46:41.473" Score="11" Body="&lt;p&gt;Based on your history and preferences, you have a particular view about what it means to be a programmer. I have somewhat the same history, but come to a different conclusion. Start with a high level language, probably either a good OOP language (Java, Python, Scala...) or a good functional language (Scheme, Racket, ...). Those two groups of languages cover much, though not all, of the &quot;higher level thinking&quot; in programming today. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming Languages are all about &lt;em&gt;abstraction&lt;/em&gt;. Different languages offer different kinds of abstractions and different levels of abstraction. However, once you choose a language, the programs that you build within that language are usually (always?) about creating even higher level abstractions than those in the base language. We try to write programs &quot;in the language of the problem we are solving&quot; and choose names (abstractions) accordingly. That is why we don't name our variables v1, v2, etc and our functions f1, f2, etc in our programs. Our variables are things like &lt;em&gt;size&lt;/em&gt; and &lt;em&gt;done&lt;/em&gt; and function names are like &lt;em&gt;compute_capacity&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every programmer needs to know something at least of a whole range of abstractions. Assembly language is very low, C is a bit higher. Ruby is quite high, as is Racket. Wherever you start learning you will eventually, after totally grokking that language, want to go to other levels. If you start at a low level then you have only one direction to move, but if you start at a higher level you can move both higher an lower. Thus you can learn how things are represented (at a low level) and how things might be hidden/regularized at a higher level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each programming language that you learn is built on a set of ideas that encapsulate what a program should look like. The view of a C program is very different from that of a Java program. The difficulty in moving upwards in the abstraction scale is that it is often difficult to give up the low-level constructs that you have become used to for others that are more appropriate in the new language. For example, polymorphism exists in most languages. In low level languages like C, the polymorphism is ad-hoc, implemented by setting and testing flags. In a higher level language (Java), polymorphism can be implemented more directly using certain design patterns (Strategy/Decorator) and &lt;em&gt;helper objects&lt;/em&gt;. But the programs written by those who started low, too often still use only ad-hoc methods, which potentially leads to programs that are difficult to read and understand (too-deep nesting of structures). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say you can learn any language using the &quot;paradigms of C++&quot;. I know a few programmers who can validly say that, but most C++ programmers cannot, outside a fairly narrow range of languages. Moving from C++ to Scheme or Standard ML, for example, requires a completely new way of thinking about programs. Adopting this new way of thinking is actually inhibited by what you learned well in C++. Not that it is impossible, but it is a harder climb. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give an analogy. If you want to become a medical doctor, you don't start by  gathering herbs and chanting ancient songs. You don't, then, progress to leeches and bloodletting, following an historical trail. It is true, however, that some medical practice is only considered valid because it was handed down from antiquity but actually has no scientific basis. At some point in history, something was tried and it worked. No one knew why, but it became standard practice. But, and the point is, you don't need to start your medical training with ideas from 100 or 1000 years ago, even though many of the things learned then are still valid today. Nor do you &lt;em&gt;need&lt;/em&gt; to start your education at a low level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One misconception that people often have about high level languages is that they can only be understood in terms of some (supposed) implementation in a lower level language. Certainly compilers take this view, but humans don't need to. If a language is minimally useful it will provide a &lt;strong&gt;complete&lt;/strong&gt; set of abstractions that permit you do any computation (Turing complete) solely within that set of abstractions. When I program in Java, I don't need to think about what the compiler will do with a reference  variable (is it a pointer? is it &lt;em&gt;like&lt;/em&gt; a pointer? is it completely different?). I just know that it gives me access to an object so that I can send messages to that object. I &lt;em&gt;think&lt;/em&gt; in terms of &lt;em&gt;reference&lt;/em&gt; and &lt;em&gt;message&lt;/em&gt;, not in terms of &lt;em&gt;pointer&lt;/em&gt; and &lt;em&gt;function call&lt;/em&gt; and don't care if they are similar or distinct. In fact, thinking at the lower level can lead me astray. In a Java program, with overridden methods, it is not possible, in principle, to know which version of a method will be invoked without a complete trace of the program. You may not be able to discern the &lt;em&gt;precise type&lt;/em&gt; of an object without that trace, and a distinct execution of the program may take a different path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some people think that low level languages are more efficient than high level languages. That may have been true at one time, but isn't necessarily true anymore. If you examine a few statements in a low level language, like C, they certainly seem to be easily implementable on a Von Neumann architecture. The problem is twofold. Programs consist of many many statements and it is easier to write and reason about complex algorithms in a high level language, especially one that is purpose built (bespoke) for that domain. Compilers today can execute tens of millions of instructions to globally optimize programs, something that a low level programmer can't do, and something that low level coding often inhibits. If I write a program describing explicitly how a problem is solved (typical in C), the optimizer is pretty much limited to following that instruction stream (not precisely, I realize, but that isn't global optimization). On the other hand, if a program describes &lt;em&gt;what is to be accomplished&lt;/em&gt; rather than &lt;em&gt;how to do it&lt;/em&gt;, an optimizer has many more options for coming up with both a high and low level set of strategies for execution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second reason that low level programs are only apparently efficient is that modern computers are only barely recognizable as Von Neumann architectures anymore. With multi-level cache (both data and instruction) and multi-processing on (say) graphics processors, the relation between the programmer notations (the program) and what is executed gets farther and farther apart as time goes on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Summary:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Languages are about abstraction  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A decent language will provide a (Turing) complete set of abstractions. Therefore you can &lt;em&gt;think&lt;/em&gt; at that level of abstraction.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lower level language are not, inherently, more efficient than higher level languages, though they may appear so. Compilers can do more than you think if you let them. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A human, moving to a new abstraction level, will have difficulties made more intense the more they are committed to the &quot;old way of thinking&quot;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Start &lt;em&gt;somewhere&lt;/em&gt;. For myself (who started low), starting higher gives you a better, clearer path. But you will eventually want to branch out. Learn to think, completely, within the abstractions provided by the language you use. Understand those abstractions in terms of the other abstractions and idioms in that language, rather than by &quot;mentally compiling&quot; everything. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here is an odd historical note about medicine, that I'm pretty sure doesn't really apply here: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a few cases it isn't ethical anymore &lt;em&gt;not&lt;/em&gt; to use some relatively ancient practice, so science is blocked from advancement in that area. The Pasteur Treatment for rabies is like that. It works, but is a dreadful process for the patient. But rabies is nearly always fatal, so it is unethical to set up a scientific experiment in which the control group gets Pasteur, but the experimental group gets (only) a vaccine. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-01T12:46:41.473" CommentCount="10" ContentLicense="CC BY-SA 3.0" />
  <row Id="4571" PostTypeId="2" ParentId="4569" CreationDate="2018-04-01T17:25:36.867" Score="4" Body="&lt;p&gt;I have also followed a similar path in learning. I am also often asked where to start.  My response has been to start with a language like Java. This is for very &lt;em&gt;practical&lt;/em&gt; reasons from an educator's as well as a student's perspective.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Students appreciate being able to build or solve something quickly. As well as being able to grow with a language.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Teachers can spend a significant amount of time debugging student&#xA;code. Finding bugs written in C/C++ by beginner programmers can be&#xA;very time consuming, especially if it involves pointers.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;It's useful to choose an environment that can run on a platform of the&#xA;user's choice.  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Java is close enough to C that transition to/from it is manageable, while being safer (no pointers) for people starting out. I also prefer a strongly typed language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will offer the following anecdote: This year I gave an assignment to my students to write a simple program in assembly language just to have an awareness and appreciation of the differences between low and high level languages. (Print out a number being incremented by 1 in a loop starting from 1 and going to 10.) The code for this in assembly was over 130 lines of code, while the corresponding Java code was a few lines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This exercise was &lt;em&gt;enough!&lt;/em&gt; to give them a deeper understanding of how a CPU executes code -- programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They liked learning about how registers and memory locations are used by CPUs. They came away with an understanding that a variable is really a named location in memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It should be noted that in some curricula students are expected to know the definition of high- and low- level languages with clear demarcation .&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="3840" LastEditDate="2018-04-02T15:40:01.157" LastActivityDate="2018-04-02T15:40:01.157" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4572" PostTypeId="2" ParentId="4569" CreationDate="2018-04-01T20:14:31.717" Score="3" Body="&lt;p&gt;Modern C++ (i.e. C++11 and above) is hands down the best introduction to programming language. This is not only my opinion but what was realized after the &quot;Java&quot; generation graduated and went into the market. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To explain before I get the StackExchange record in negative votes: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Modern C++ does not require the use of pointers (unless of course you want to, which is not advisable in modern programming). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Modern C++ is a general language. You can go form low-level to high-level, use Objects or procedures. It is no longer the old C-like low-level language. You should not learn C before it either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) There was a time when many universities switched to Java as starting language because old-fashioned C was traumatizing.  I like this quote from Joel Spolsky:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;All the kids who did great in high school writing  pong  games in&#xA;  BASIC for their Apple II would get to college, take CompSci-101, a&#xA;  data structures course, and when they hit the pointers business their&#xA;  brains would just totally explode, and the next thing you knew, they&#xA;  were majoring in Political Science because law school seemed like a&#xA;  better idea.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Today when I teach I tell my students a simple rule of thumb to distinguish modern C++ code from obsolete code practices: &quot;if you see a '*' (naked pointer)in the code it is usually obsolete&quot;. (keeping in mind the context of this subject). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;4) However, when that Java generation graduated the industry started to realize that they lack in relation to the feel and understanding of how computers work. There are few publications on the subject. And if you notice many have moved back from teaching Java as a starting language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5) Modern C++ gives a wide range of options: from low-level to high-level programming concepts. From using procedural programming to OOP. (and no pointers) :-)   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest you check out the textbook by Gaddis and and one By Liang. These are my favorite ones on Introduction to programming and after. &lt;/p&gt;&#xA;" OwnerUserId="3417" LastEditorUserId="3417" LastEditDate="2018-04-05T20:19:20.243" LastActivityDate="2018-04-05T20:19:20.243" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4573" PostTypeId="2" ParentId="3560" CreationDate="2018-04-01T20:39:45.417" Score="2" Body="&lt;p&gt;You should consider &lt;strong&gt;&quot;Pair Programming&quot;&lt;/strong&gt;. I know many answers above does talk about working in pairs but the details are important: &quot;Pair programming&quot; has rules of how to do it and is used in the industry and in education. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.khanacademy.org/resources/k-12-teachers-1/teaching-computing/a/pair-programming-in-the-classroom&quot; rel=&quot;nofollow noreferrer&quot;&gt;This article from Khan Academy is a good starting point on how to implement pair programming in the class room&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to have the same issue as you and pair programming definitely improved the situation significantly. The key to success however is to follow the rules.&#xA;a) They have to switch at given time&#xA;b) They have to use one computer&#xA;c) It is a good idea to have random paining beginning of each class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I teach I usually have 35+ students in a lab, when I applied pair programming I was able to assist them better especially when adding the random pairing. They explain to each other and you only end-up needing to help a pair who is stuck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Funny that this also has proved better than having a lab assistant &lt;em&gt;(if s/he is not my previous student)&lt;/em&gt; since in some cases I &lt;em&gt;(and the students)&lt;/em&gt; end-up teaching the assistant instead :-)&lt;/p&gt;&#xA;" OwnerUserId="3417" LastEditorUserId="3417" LastEditDate="2018-04-05T20:28:39.807" LastActivityDate="2018-04-05T20:28:39.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4574" PostTypeId="2" ParentId="212" CreationDate="2018-04-01T21:15:20.150" Score="0" Body="&lt;p&gt;Considering Computer Science/Engineering you should use a general language. I.e. Modern-C++ (C++11 and after). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many outdated misconceptions about programming languages and C++ in particular: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) C++ is not an object-oriented only language. it is used any way you want it to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Modern C++ dose not use pointers anymore or any of the traumatizing old-school coding practices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Modern C++ allows you to go as low-level to as high-level as you want. You could go as high-level as ignore data types. And you can do procedural programming or OOP. and you can go as low level as write assembly in your C++ code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Language is only the tool. With a general language like C++ you decide what/how to teach your students instead of  wasting your time teaching different languages' semantics every time you want to approach a different subject. &lt;/p&gt;&#xA;" OwnerUserId="3417" LastActivityDate="2018-04-01T21:15:20.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4575" PostTypeId="2" ParentId="4569" CreationDate="2018-04-01T22:32:46.073" Score="3" Body="&lt;p&gt;I started low level, but I prefer to teach high level first. I have talked to a few teachers that like to start low-level, and decided that they are also correct. It depends on the teacher, and the students (not quantity of motivation, but type of motivation). &#xA;Low-level, if you/the student likes/wants to study how the machine works (more machine focused); high-lever if you/the student likes/wants to focus on what a program does (more human focused, but not just interfacing to a human, it could, for example, also be controlling machinery).&#xA;However I think that the middle path is less good. Therefore start low: A nice assembler (arm, 68000, 6502, little man), or start high (Eiffel). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also realised that most high level languages are not designed for teaching: For example &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the best order to teach the language, is not the best order to teach concepts.&lt;/li&gt;&#xA;&lt;li&gt;There are many nasty gotchas (C++ is an example with many of these).&lt;/li&gt;&#xA;&lt;li&gt;There is a mismatch between language and concepts. Many to many relation ship between language features, and programming concept (C++, java, C#).&lt;/li&gt;&#xA;&lt;li&gt;Much boiler plate needed in first lesson, that can not yet be taught (&lt;code&gt;public static void main (string[] args)&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I don't seem to have a problem with low-level ones. Though I no-longer see a need to use low-level languages. As Eiffel, Go and maybe others can do their job better, and as fast. The least troubling of the High-level languages seems to be Eiffel, but this is OO. So we need a good non-OO high-level language to teach first. I teach python, but I don't like it as a teaching language (it has a few problems).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore High or Low? It depends, but avoid the treacherous middle.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-04-06T15:41:26.733" LastActivityDate="2018-04-06T15:41:26.733" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4577" PostTypeId="2" ParentId="4569" CreationDate="2018-04-02T16:47:40.840" Score="3" Body="&lt;p&gt;There isn't just one answer to this question. It depends entirely on what the person wants to learn. Somebody who wants to make video games should probably take a different path than somebody who wants to build a website for their home business, or somebody who wants to build an Android app.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But generally speaking, you should start with something engaging. I personally recommend starting with &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt;. Processing is designed for novices, and makes it easy to create visual and interactive programs without a ton of boilerplate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Processing is built on top of Java, but allows you to ignore a lot of the boilerplate until you really need it. It allows you to learn the fundamentals, then OOP, and allows you to &quot;graduate&quot; to other languages like Java or Javascript, or even C or C++ if you really need to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See these related questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/19/2068&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/173/2068&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2924/2068&quot;&gt;The order of subjects in beginner's curriculum&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2798/2068&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/3904/2068&quot;&gt;Make it easier, and quicker to get to the start&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/4183/2068&quot;&gt;Programming language for teenagers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-04-02T16:47:40.840" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4578" PostTypeId="2" ParentId="4477" CreationDate="2018-04-02T20:12:13.530" Score="1" Body="&lt;p&gt;I have never used &lt;code&gt;jshell&lt;/code&gt;, but here is my experience with the interactive environments included with python and various lisp dialects:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;REPLs (Read-eval-print loops) are extremely useful for rapid prototyping and testing. In all cases, having the student sit at the keyboard and play around with the language is best way to learn how it works. Having a REPL can change how software is developed, and I try to encourage students to use one as they are doing homework. Here are some ways that they can make writing code easier:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Learning new APIs.&lt;/strong&gt; Need to figure out how to use the &lt;code&gt;Scanner&lt;/code&gt; class? Have the students create an instance of it in the REPL, and call &lt;code&gt;nextLine()&lt;/code&gt;, &lt;code&gt;nextChar()&lt;/code&gt;, and &lt;code&gt;nextInt()&lt;/code&gt; with different inputs. This is a huge leap from sticking print statements places to figure out how each of these calls consume items from the input stream.&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Micro testing code snippets.&lt;/strong&gt; Not sure how to write a for loop that skips every $5^{\text{th}}$ number? Type it in the REPL and see what happens. Can't remember if arrays are zero-indexed? Check it in the REPL. Being able to experiment with code as you write it can provide instant feedback that helps cement language concepts and promote experimentation. This is especially handy in test/quiz situations.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debugging.&lt;/strong&gt; Being able to interact with code in real time makes debugging less of a pain, as you can directly test functions, or bypass them completely.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2040" LastActivityDate="2018-04-02T20:12:13.530" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4579" PostTypeId="2" ParentId="4569" CreationDate="2018-04-03T01:01:40.133" Score="0" Body="&lt;p&gt;I recommend Python. Why? Strong but dynamic typing. Strong resemblance to English.  But.... it is a tool students never outgrow.  C is tricky. You don't want students bogged down in understanding the heap when they are trying to master stuff like recursion, looping, conditional logic, and variables.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-04-03T01:01:40.133" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4581" PostTypeId="2" ParentId="4569" CreationDate="2018-04-03T19:55:00.123" Score="2" Body="&lt;p&gt;I don't know what I would recommend but there are a few criterion I'd bear in mind if I were you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) It's a lot harder for someone who's only been doing Java/C# (automatic memory management) vs. C/C++ (manual memory management). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) Some languages make creating certain data structures significantly more difficult.  I'm thinking of BASIC--any sort of data structure involving a recursive definition (e. g. binary tree) is a lot harder to do with a language that doesn't support recursive types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) I think I'm somewhat alone in this opinion but I'd say that learning OO is actually harder for those new to software development than is learning software development without it.  So I'd tread lightly in terms of teaching a non-developer OO based languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;4.) If you want something which gives quick feedback to the learners, a scripting language (or at least a language with some sort of REPL) is superior to a compiled language.  The compile/link/run cycle will never be as quick as simply typing in an expression and seeing what it evaluates to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;5.) Are you concerned about variable typing (or conversely no typing)?  Typing, like default immutability, can eliminate a whole class of errors all by itself but it can be hard for students to grasp--at least in my experience anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those are just a few of the criterion I'd consider. Again I may be alone in this opinion but I'd stay away from Javascript for teaching purposes. I say this for a few reasons; there's a ton of libraries for JS and they all work differently.  Also a lot of JS is really hacky (I mean that in the pejorative sense).&lt;/p&gt;&#xA;" OwnerUserId="4689" LastEditorUserId="4689" LastEditDate="2018-04-03T20:03:55.150" LastActivityDate="2018-04-03T20:03:55.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4582" PostTypeId="2" ParentId="4569" CreationDate="2018-04-04T14:02:13.950" Score="-1" Body="&lt;p&gt;Define &quot;beginner&quot;.  A third grader who want to make a game?  A high school student?  A college grad looking for a new career?  With out knowing that this question is unanswerable.  I teach high school programming.  When someone says &quot;beginner&quot; to me I suggest Kodu, Scratch or Small Basic.  If someone wants to build a game then go for Gamemaker or Unity.  Want to build an app then look at MIT AppInventor.  These are starting points for beginners.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2018-04-04T14:02:13.950" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4584" PostTypeId="2" ParentId="4569" CreationDate="2018-04-06T09:37:49.430" Score="1" Body="&lt;p&gt;I would agree with you (based on my experience): In BS, we took C in 1st semester, then OOP and Data Structures with C++ and gradually switched to C# and Java in later semesters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was one of the worst coders of the class and despite hating programming (to bits, in fact &lt;em&gt;bytes&lt;/em&gt;) I found C# and Java pretty easy due to the effort poured in by our teachers in C and C++. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, in my pedagogical career, I have found two roadmaps:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;C/C++ in PF, followed by either C# or Java &lt;em&gt;(more frequent one)&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Universities which start right from Java&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I got a chance to teach Operating Systems to students of category 2 and needless to mention how badly they failed at comprehending basic system programs written in C++ (not even C). It took me more than 3 lectures to explain them only the syntax of &lt;code&gt;pthread_create()&lt;/code&gt; since they had no background of pointers, function pointers and even passing by reference and how could they given they begun programming with Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recently, I taught Introduction to Biological Computing and used Python in the course and that experience prompted me to think a bit about why not use it in PF for CS students, but No! This experiment, thankfully I stopped it before implementation. Obviously doing Python after C is very easy, but its not other way around. No wonder that as per &lt;a href=&quot;https://www.tiobe.com/tiobe-index/&quot; rel=&quot;nofollow noreferrer&quot;&gt;TIOBE indexing&lt;/a&gt;, C language has made a whooping &lt;strong&gt;&lt;em&gt;6.62%&lt;/em&gt;&lt;/strong&gt; growth in last 12 months. &lt;a href=&quot;https://www.tiobe.com/tiobe-index/&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2018-04-06T09:37:49.430" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4585" PostTypeId="1" CreationDate="2018-04-06T15:59:52.747" Score="9" ViewCount="200" Body="&lt;p&gt;How do y'all decide when to allow a student to resubmit an assignment rather than just taking a low grade?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have 3 things that tend to pop up when projects get turned in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wrong Thing:&lt;/strong&gt; Student turns in starter code, an earlier version of their project, or the entirely wrong files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Wrong Files:&lt;/strong&gt; I mostly teach Java and there are always a handful of students that turn in the &lt;code&gt;.class&lt;/code&gt; files instead of &lt;code&gt;.java&lt;/code&gt; files. It's not the same students each time, so I assume it's an honest mistake.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cheating::&lt;/strong&gt; Yeah, there's always a few. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach high school and tend to allow resubmissions when it's clear that what they turned in doesn't match up with what they're capable of. But I think part of that may be from the pressure in high schools to not fail anyone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also asking more about larger scale projects and not just lab style assignments. Projects that might have a significant affect on their averages. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="1293" LastEditDate="2018-04-06T17:06:11.340" LastActivityDate="2018-08-03T12:43:26.693" Title="Resubmitting Projects" Tags="|grading|project|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4586" PostTypeId="2" ParentId="4585" CreationDate="2018-04-06T17:04:33.130" Score="2" Body="&lt;p&gt;Remembering that your job is teaching, not grading, yes, you should allow resubmissions - you can even encourage them if you take the right approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of your problems can be easily solved. Assuming your students are submitting electronically, you can (fairly) easily write a script that watches the submission folder for incorrect things. You can have the script respond to the student about the issue so that they can resubmit before the deadline. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another tactic is to have them simultaneously submit a printed version of the project. They are much less likely to submit the wrong thing this way and it gives you a way to guard against some kinds of cheating as well as many kinds of errors. I'm assuming that projects are at most tens of pages, not hundreds, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having a printed copy permits something even more creative. After you have marked and commented on their first submission, you can encourage them to improve it based on your feedback. You have a base line and a base grade. When a resubmission occurs, the student submits the original marked up (paper) version with your comments along with the new work. Any changes in the project can be required to be highlighted with a marker pen so that you can see what is new at a glance. You can give them additional points for the resubmission, though probably not &quot;full marks&quot; based on the second (or later) submission. My standard used to be that you could earn up to 90% of the marks lost for the first submission on rework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the printed copy, your first two problems go away. You can permit resubmissions of the electronic copies freely if you have the paper to prove the work. It provides an audit trail, even if you prefer to actually look at and/or execute the electronic copy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This recognizes that students don't need to be &quot;perfect&quot; to do well. It encourages them to be reflective about their own work. It avoids endless arguments with some students over why you marked them down the first time, as they can correct with little penalty. For me, it was always win-win to do this. The highlighting of the rework also made it nearly painless for me, though I never tried it with more than about 50 students. Students would turn in their work in a folder that contained both the old and new work with changes marked and old comments included on the originals. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-06T17:04:33.130" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4587" PostTypeId="2" ParentId="4585" CreationDate="2018-04-06T17:16:38.440" Score="4" Body="&lt;p&gt;The cheating issue is real, and it caused me to rethink how I approached labs entirely. I think of them as learning laboratories now, and don't give them a tremendous weight in grades (though I &lt;em&gt;do&lt;/em&gt; spend a huge amount of time grading them, as I grade during code interviews.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want some context for my approach, I have previously outlined some of the ways that I think about lab work &lt;a href=&quot;https://cseducators.stackexchange.com/questions/248/how-can-i-discourage-poor-design-while-using-automatic-grading-of-submissions/259#259&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/4282/when-does-excessive-collaboration-become-plagiarism/4285#4285&quot;&gt;here&lt;/a&gt;, and &lt;a href=&quot;https://cseducators.stackexchange.com/questions/130/how-to-teach-why-indentation-is-important/132#132&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, though, I come to the grading with the expectation that there will be many rounds of refactoring.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This year, I started a new procedure, and it has worked very well for me and my students. It utilizes my school's SMS (we use PowerSchool, though I imagine that any online grading system would have similar functionality.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At our first code interview for a lab, I walk through their code in depth with them, and ask them to explain their approach (big picture) to me verbally. If they start  walking through their code like by line, I stop them and ask for &quot;just an overview&quot;. They are allowed to look at their code as they talk, but I don't want a play by play. (Students who have trouble with this raise some potential red flags for cheating.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also create a wish-list of comments as I go. &quot;It would be better if you...&quot;, or &quot;This code is not clearly written because...&quot;. I notate all of these in the comment field for the lab's grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the interview gets to an end, I put on my best unforgiving professor hat, and award a rather punitive grade. So now, the student hasa 33% (or some other vileness.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, in the comments section of the grade, I put on my kindest professor hat, and imagine what grade I would give if they came back in week with all of the problems fixed. Students with better initial labs might wind up with higher grades here, but everyone has rather high grades available.(*) I also leave in the list of problems that should be fixed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the students have to come back to me with the problems all fixed to receive the higher grade.  I can draw this proccess out as much as I want in order to ensure that my students produce beautiful, clean code. I don't change the grade to the higher one until the code is wonderful. (This may take several attempts.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(*) - Not cheaters. If you work through my extremely forgiving system and still cheat, I will give you a zero for that section with no way to make it up. &lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-04-06T17:16:38.440" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4588" PostTypeId="2" ParentId="4585" CreationDate="2018-04-07T01:41:57.003" Score="3" Body="&lt;p&gt;Note:  Like the OP, I teach high school.  Some of the things I discuss may not be useful in a university setting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Resubmissions are not a factor for me because I will take anything from any student at any time.  And it must be correct.  So they get 100%, or they get nothing.  Wait before you shoot me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Timing:&lt;/strong&gt; When I assign an exercise (program), I let my students know when it is due.  I create the assignment in the grade book with its due date but leave it blank (we use PowerSchool as well, mentioned in another answer).  As the students complete exercises, I check them off on a paper checklist.  When the due date for a particular exercise arrives, I transfer checkmarks from my list to the grade book.  If the student has a check, they get the points.  If they don't have a check, they get a zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a check, their code has to be correct.  It must have the expected output.  It must adhere to all coding conventions.  And it must use the structure suggested in the assignment (e.g., a foreach loop instead of a bounded for loop).  Of course, I allow for personal variation that is not blatantly incorrect.  Coding is a creative process and each student develops their own style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use zeroes in the grade book because it creates a sense of urgency in most students. But the zero is just a place holder, a reminder that something is missing.  The student may, at any time, turn in their missing items, up until exam day. I clearly communicate what the zeroes mean to both students and parents at the beginning of the semester.  My students actually like this method and give me positive feedback about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I allow what some might call &quot;late&quot; work because not everyone works at the same pace.  Some students are just going to struggle (and Carol Dweck suggests that the student who struggles may actually learn the material better in the long run than the student who gets it immediately).  Not everyone has a wonderfully happy, supportive home life.  Not everyone has a two-parent family.  Not everyone feels accepted and affirmed at school.  Not everyone is healthy all the time.  I don't know what my students face when they leave my classroom.  If they really want to do the work, I want to take it, no matter how long it takes them to complete it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do some students abuse this?  I don't have many who try.  Students who care about their grades will work diligently to get work in no matter when it was &quot;due&quot;.  Students who don't care weren't going to turn it in anyway, due date or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even with this system, I would say 90% of my students turn in their work &quot;on time&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Cheating:&lt;/strong&gt;  My best defense against shared code is my familiarity with each student's coding abilities and style (or lack thereof!).  When not actively teaching, I am circulating the room, interacting with my students, watching what they are doing - not in a hawkish way, but in an interested, encouraging way - &quot;oh, you decided to add graphics to the assignment, that's cool&quot;.  This way I can watch progress, help with errors I see before the student gets completely off track or wastes a bunch of time, or notice a student go from blank screen to complete multi-page solution - still highlighted from the clipboard - within one circulation of the room (&quot;hmmm, where'd that come from&quot;?).  I can also gain insight as to how and why they do things, become familiar with their coding style, and nip bad habits in the bud.  When I first started teaching, I thought if they were coding quietly and there were no questions, I should just sit at my desk and ignore them.  Not anymore!  I stay engaged and give them my full attention the entire class time.  They deserve it, and it really makes my job much easier in the long run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Honestly, a very good rolling chair helps with this.  I have my lab set up so I can easily roll and achieve maximized, efficient coverage).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Checking code:&lt;/strong&gt;  I don't ask students to submit code electronically.  I check code for assignments with the student at their computer.  Meaning we scroll through it together, with me asking questions as I see fit.  If it's good, they get a check.  If it is not, I tell them what to fix (or guide them to it), and they call me back again for a re-check.  This works for me because a) I'm familiar with the way they do things and can almost immediately tell if they are showing me code they didn't write; b) I'm an extremely fast reader; and c) I make sure I have written a solution myself ahead of time so I know what I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note:  If I really feel I need it, I already have an electronic copy of students' work because of the way our network is set up.  Every student has a virtual drive.  All student work is maintained on their virtual drive that only they can access when they are logged in at school.  Yes they have a lab computer, but they are restricted from accessing the C:\ drive.  Any projects they create (code or otherwise) are saved to the virtual drive.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teachers can access all students' drives.  So I can access each student's work from my own computer. If I have academic dishonesty suspicions, it is easy enough to compare time stamps or file sizes between or among students and determine if sharing has occurred.  Johnnie was missing 10 projects yesterday, but now he has them all, and every folder was created at the same time (when he unzipped his friend's work)?  Nada.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, &quot;resubmission&quot; is not an issue for me.  If my students did the work, and they want to give it to me, then I want to take it.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-04-07T01:41:57.003" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4589" PostTypeId="1" CreationDate="2018-04-08T14:41:46.427" Score="18" ViewCount="4393" Body="&lt;p&gt;For an undergraduate course in AI, there has been an assignment that uses deep learning on neural networks to do image classification.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, many students complained about their (university provided) laptops were overheating when running their implementations and only a few were able to run enough training epochs to get meaningful results. (While those devices have a high-end CPU (for laptops, at least), the GPU is rather low-end).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I doubt that the problem was bad implementations, as even the better students had these problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All in all, just letting the students run their own implementation doesn't seem to have been a good idea. Are there better methods to give students the assignment of practically implementing a computationally intensive algorithm? How feasible would it be to provide cloud compute resources to the students so they &lt;em&gt;can&lt;/em&gt; run their own implementations (I don't think we have a computing cluster available to students at my school)?&lt;/p&gt;&#xA;" OwnerUserId="154" LastEditorUserId="58" LastEditDate="2018-04-09T16:22:03.430" LastActivityDate="2018-04-09T16:22:03.430" Title="How to give assignments that require heavy computational resources?" Tags="|project|artificial-intelligence|programming-environment|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4590" PostTypeId="2" ParentId="4589" CreationDate="2018-04-08T15:17:59.790" Score="16" Body="&lt;p&gt;Giving students credits for a cloud service like AWS might be useful in this case. Amazon's &lt;a href=&quot;https://aws.amazon.com/ec2/pricing/on-demand/&quot; rel=&quot;noreferrer&quot;&gt;pricing&lt;/a&gt; is reasonable for a cloud instance:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;GPU Instances - Current Generation&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;p2.xlarge&#xA;&lt;ul&gt;&#xA;&lt;li&gt;vCPUs: 4&lt;/li&gt;&#xA;&lt;li&gt;ECUs: 12&lt;/li&gt;&#xA;&lt;li&gt;Memory (GiB): 61&lt;/li&gt;&#xA;&lt;li&gt;Storage (GB): EBS Only&lt;/li&gt;&#xA;&lt;li&gt;Price: $0.9 per Hour&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The cheapest instance (&lt;code&gt;t2.nano&lt;/code&gt;) is priced at $0.0058 per Hour, though you'd probably want to look at a more powerful instance to save time.&lt;/p&gt;&#xA;&lt;p&gt;For $20 per student, you could give them 22 hours of &lt;code&gt;p2.xlarge&lt;/code&gt; compute time or 3500 hours of &lt;code&gt;t2.nano&lt;/code&gt; time (or something in between this if another option would fit better).&lt;/p&gt;&#xA;&lt;p&gt;It would be wise to test the time taken for EC2 to run a few epochs yourself first before going and paying for your students to do it; you could then work out what a 'reasonable' amount would be to give them, or if this is feasible at all.&lt;/p&gt;&#xA;&lt;p&gt;This is unfortunate in some ways, however, as it means that students who work quickly are advantaged more than those who spend hours experimenting. It also means that students that need more time would have to work at their own expense; whether this is permitted by your University's policies or ethical is questionable.&lt;/p&gt;&#xA;&lt;p&gt;I would anticipate that it'd be easy for students to accidentally waste credit if they weren't familiar with AWS too. For this reason I'd be wary of putting this into practice... but it's better than overloading the students' personal laptops.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Michael0x2a has a good point that some services may have free credits which you might be able to tap into; for example, Azure offer &lt;a href=&quot;https://azure.microsoft.com/en-gb/free/students/#free-products-section&quot; rel=&quot;noreferrer&quot;&gt;$100 of credit&lt;/a&gt; to students; &lt;a href=&quot;https://aws.amazon.com/education/awseducate/&quot; rel=&quot;noreferrer&quot;&gt;AWS Educate&lt;/a&gt; is also pretty generous, with &lt;a href=&quot;https://s3.amazonaws.com/awseducate-list/AWS_Educate_Institutions.pdf&quot; rel=&quot;noreferrer&quot;&gt;member institutions&lt;/a&gt; gaining \$200 per instructor plus \$100 per student (non-member institutions get less).&lt;/p&gt;&#xA;" OwnerUserId="2" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-08T19:18:49.143" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4591" PostTypeId="2" ParentId="4589" CreationDate="2018-04-08T15:21:13.677" Score="19" Body="&lt;p&gt;I have a couple of orthogonal suggestions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, and you may have done this yourself, before you give any assignment you should create a reference implementation yourself and test it in the student's environment. If you did this, then just let it be a warning to others. This is true, actually, for any assignment, not just one that might run up agains limitations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for the current situation, simply realize that there are several ways for the students to learn, not just through successfully building software for a problem. While you might be able to change the conditions for a future offering of the course, you need to deal with today's students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the most valuable educational experiences is a Retrospective of a project in which you formally explore what worked well and what needs to be changed (or should have been changed). Instead of a working program per student, a paper per student (or student group) can impart the desired learning. Students could examine the results of other students, for example, and reflect (in writing) on the relationship between the code and the outcomes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you only want an answer to the stated question (how to provide for computationally intensive projects), then you need to either scale down the exercise to make it reasonable, or you need to provide adequate resources &lt;em&gt;somehow&lt;/em&gt;. Upgrading all the laptops is probably not in the works, but you could, perhaps, provide access to a more powerful system (or systems) on which the students all work (individually or in groups). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scaling down the project might work, actually, at an undergraduate level, since the students aren't expected to build commercial quality software, but only enough so that the appropriate learning occurs. If this were a doctoral program, on the other hand, where the students are involved in serious research, then there doesn't seem to be any alternative to finding the resources - perhaps through grant writing or even begging resources from local organizations. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/B00DY3KQJU&quot; rel=&quot;noreferrer&quot;&gt;Retrospectives&lt;/a&gt; are a fundamental Agile Software Development practice. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-08T15:21:13.677" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4592" PostTypeId="2" ParentId="4589" CreationDate="2018-04-08T22:12:12.687" Score="22" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How to give assignments that require heavy computational resources?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most computionally intensive problems can be stripped down to something that's just as instructive but runnable on any normal computer. In particular, for inexact algorithms, you can generally trade off accuracy against computational cost, and often actually get still quite good results with only a fraction of the cost of a publication-level run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always like to emphasize that stuff like physics simulations (which is what I work on, and have also done assignments for students) or image classification should in principle, &lt;em&gt;mathematically speaking&lt;/em&gt;, have &lt;strong&gt;infinite computational cost&lt;/strong&gt;: an image is a function from continuous 2D space to colour space, i.e. the space of images is an infinite-dimensional $L_2([0,1]^2)$ Hilbert space. When doing numerics one quickly (IMO, often &lt;em&gt;too&lt;/em&gt; quickly and without proper thought) restricts everything down to a finite-dimensional subspace thereof, but that's to some degree arbitrary – the subspace just needs to be big enough (and suitably constructed) to still represent the features that are important for the use case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an image-processing example, you should definitely check how much you can downsample the images that the students should work with and still get somewhat sensible results. If necessary, choose only a smaller set of images with clearer distinguishable features, that the algorithm can pick up quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the results &lt;em&gt;aren't&lt;/em&gt; so great with a stripped-down accuracy, well, that's actually &lt;em&gt;particularly&lt;/em&gt; instructive, because this kind of tradeoff is absolutely crucial in real-world applications too. You may have more processing power available in a research of commercial situation, but you'll also have &lt;em&gt;much&lt;/em&gt; higher demands in terms of data amount and needed accuracy. So, discuss these points intensively, and make a presentation of how much better the students' results look when run by you in higher resolution on a solidly powered machine.&lt;/p&gt;&#xA;" OwnerUserId="1157" LastActivityDate="2018-04-08T22:12:12.687" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4593" PostTypeId="2" ParentId="4589" CreationDate="2018-04-09T09:29:45.727" Score="0" Body="&lt;p&gt;Since AWS was already mentioned here, I feel I also have to mention Azure ;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is currently running a 200 USD free trial offer that you can utilize. There is one setback about this offer though. I think it requires a credit card in order to activate it. But the 200$ will last you the 1st month and allow you to spin up some serious hardware during that time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can sign up here: &lt;a href=&quot;https://azure.microsoft.com/en-us/offers/ms-azr-0044p/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://azure.microsoft.com/en-us/offers/ms-azr-0044p/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides that there is an offer available (Monthly free credits) if someone has access to a MSDN subscription or you can get a MSDN subscription as part of the MCT (As Professor) benefits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Azure also includes several features for machine learning and cognitive services out of the box.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides that I agree with other that mention it is hard to give assignments that require resources that are not commonly available. &lt;/p&gt;&#xA;" OwnerUserId="4852" LastActivityDate="2018-04-09T09:29:45.727" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4594" PostTypeId="1" CreationDate="2018-04-09T12:17:32.440" Score="29" ViewCount="7791" Body="&lt;p&gt;In writing software we name things. In Java we name classes, interfaces, methods, variables, etc. How can we teach both the importance and the skill of choosing good names?&lt;/p&gt;&#xA;&lt;h3&gt;What teaching practices will lead students naturally to good practice in naming their programming constructs?&lt;/h3&gt;&#xA;&lt;p&gt;How important is &lt;em&gt;naming&lt;/em&gt; in the creation of quality software? In particular, how important is it to teach good naming and insist on it in student programs?&lt;/p&gt;&#xA;&lt;h3&gt;Moreover, what practices &lt;em&gt;impede&lt;/em&gt; the student from learning and practicing this skill?&lt;/h3&gt;&#xA;&lt;p&gt;Good naming is important for both the creation and maintenance of programs. Good naming also makes the evaluation of the student programs easier when the student uses, for example, &lt;em&gt;intention revealing names&lt;/em&gt; consistently. .&lt;/p&gt;&#xA;&lt;p&gt;Note that much of this applies to other languages, but Java is a popular teaching language. Java is mandated in the Advanced Placement courses commonly taught in the United States. It is also a common language in first courses taught to undergraduates.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-22T20:03:53.150" Title="How can we teach good naming practice for students learning Java?" Tags="|best-practice|java|" AnswerCount="11" CommentCount="8" ContentLicense="CC BY-SA 3.0" />
  <row Id="4596" PostTypeId="2" ParentId="4594" CreationDate="2018-04-09T13:52:04.503" Score="19" Body="&lt;p&gt;There are at least two parts to teaching naming. The first is to have a good standard that the students know and understand. This can be provided in a checklist. But the more important aspect is to always demonstrate good naming in all examples that you use and in all quizzes and exams that you give them; even for very simple exercises.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;The Naming Standard&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The goal of a naming standard is to make programs easy to understand and to reason about. There are a number of possibilities here and you can and should develop your own. Here is one I use:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Intention Revealing Names: A name should always have semantic content related to the problem being solved. Don't use abstract names like $x$ and $y$ . Use semantic names like $size$  and $figure$ . &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Names from the problem space, not the solution space. If you are totaling up some array, don't use $total$, use $sumOfAges$ , if that is a concept in the problem space. This can permit each statement in the program to read like a description of some thing or action in the language of the problem being solved. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In Java, use singular nouns for class names. Use verbs and verb phrases for the names of mutator methods, describing what the method does. Use nouns and noun phrases for accessor methods, describing what the method returns. Predicates can usefully start with $is$ , as in $isRunning$ . An implication is that methods should not be simultaneously an accessor and a mutator. There are other reasons why access-mutators are a bad idea in any case. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One name per concept. The same concept will occur in a program in several ways. A class name $Ramp$  describes how to construct a ramp. A variable name can be $ramp$ . An accessor method in some class might be $ramp()$ . A field in some class might be $ramp$ . Java does a good job of keeping these distinct, thought you sometimes need to (and should) write $this.ramp$ . Since the language can distinguish them the programmer doesn't need to keep track of an entire set of names for the one concept. And, concept is from the problem space, not the solution space. This helps the student programmer imagine that their program is a model of some &quot;real&quot; world scenario, not just a set of notations providing a result. (See Miller's Rule, below)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Avoid names that emphasize the implementation of a class. Names should emphasize the structure and evolution of a concept, not the fields of a class and their modifications. Unfortunately names like $getSize()$  and $setSize()$  emphasize that there is likely a field named $size$ . (See below for more).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't abbreviate names. Ever. Always spell out your names and never abbreviate them. You will, over a lifetime of programming spend more time looking back for the definition of something you abbreviated to use it consistently than you will just typing it out in the first place. A few exceptions to this rule can be tolerated for standard things, but in general, you waste time abbreviating. The thing that makes programming hard isn't typing. It is understanding. Modern IDEs can help you with word completion, of course.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Note that good naming will usually mean that you need fewer (if any) inline comments. Providing java doc to document the intent and usage of classes and methods is nearly always sufficient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note that I haven't mentioned the capitalization preferences in my standard, though I do observe and expect them: Bumpy case for most things. All CAPS for constants, etc. I'm more concerned with the clarity and instant understandability of the names in the above. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Teaching the Standard&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;For students to easily and naturally adopt the standard there are a few tricks that don't involve forcing students. The first rule is to be consistent yourself when you show them examples and when you test them. Even when teaching the lowest level concepts, you can have some metaphor in mind that guides your naming and makes the &quot;problem space&quot; rule natural. For example if you are teaching the a loop to sum an array, it is common to use an example like: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int x= 0;&#xA;for(int i = 0; i &amp;lt; n; ++i){&#xA;    x += y[i];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But this example has no semantic context. What is $x$ ? How is it related to $y$ ? How is $n$  related to $y$ . For experienced programmers this isn't an issue and if they already have good naming practice, an abstract example like this works fine, but it doesn't emphasize the larger lesson that &lt;em&gt;naming is always important.&lt;/em&gt; You can just as well show them:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int totalPrice = 0; &#xA;for(int i = 0; i &amp;lt; priceCount; ++i){&#xA;    totalPrice += allPrices[i];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or, for the absolute purist: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int totalPrice = 0; &#xA;for(int index = 0; index &amp;lt; priceCount; ++ index){&#xA;    totalPrice += allPrices[index];&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The structure is the same, but the relationship between the three variables is much clearer now. (Yes, $index$ is from the solution space, I realize.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are developing an example in real time (black/white board...) you can have a mental metaphor before you start. It can even be fun to ask for suggestions from the students for a &quot;problem space&quot; in which you will create names (or even ask for them). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is based, of course, on the idea that students will naturally emulate what &lt;em&gt;you&lt;/em&gt; do. If you normally and naturally just use abstract names for things, then they will be lulled into thinking that it is ok to do so. So try, with beginners, to always give them some semantic context in which to think about problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above goes for quizzes and exams as well. Give them (only) problems, even quite small problems, in which the names at least potentially mean something in a supposed problems space. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In doing OO programming the understanding of a program can be enhanced by using good variable names for objects. If you have a declaration&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Particle x = ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then a half a page later, when you see $x$ again, you want to know what can be done with it. What messages does it accept? So, say the following, instead:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Particle particle = ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now it is clearer what the variable refers to and so the student requires a much simpler mapping process to proceed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In evaluating student work it is a good practice to note their poor naming when it occurs and ask them to improve it. The compiler doesn't care, of course, but you do, as you need to understand what they have written. Modern Java IDEs are good about changing names using contextual (not just textual) replacement. You can change the name of a variable from $x$  to $size$  without changing every &quot;x&quot; in the program as a word processor would do. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Miller's Rule of Seven (plus or minus two)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In a famous &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two&quot; rel=&quot;noreferrer&quot;&gt;Paper in Psychology&lt;/a&gt;, George Miller suggests that the human mind is capable of simultaneously juggling only about seven concepts. Many of the rules of the naming convention above are informed by this rule. For example, one name per concept reduces the load of detail that the programmer much keep track of while thinking higher level thoughts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise naming from the problem space, rather than the solution space is helpful because the &quot;world out there&quot; is, itself, logically consistent, so using naming and concepts from there (or from a suitable consistent metaphor) keeps the number of concepts more reasonable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, the very idea that our programs build higher level abstractions is informed by Miller's rule, since the abstractions we build are normally built on a &lt;em&gt;lot&lt;/em&gt; of detail, that we &lt;em&gt;abstract away&lt;/em&gt; in our classes and functions. Once we have built a class, we can think of the objects as a simple thing (the abstraction) rather than the detail on which they depend. Thus our limited capacity for detail is overcome by thinking about higher level things, upon which we build still higher level abstractions. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;get-set considered harmful&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Many teachers seem to use the JavaBean naming convention when teaching Java to novices. Students adopt this, thinking that it is a Java Standard. It is not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/JavaBeans&quot; rel=&quot;noreferrer&quot;&gt;JavaBeans&lt;/a&gt;, from Oracle, introduced a Java method naming &quot;convention&quot; that lets the system infer some things about objects. These are the &quot;getter&quot; and &quot;setter&quot; methods, normally used to get and set values of fields. However, I find that this &quot;convention&quot; is not conducive to teaching students good OO programming habits since the names themselves indicate to the student (as they do to the Bean system) that there is a field that is being retrieved or set. This is all about the implementation of the class, not the concept that it represents. It leads students to think in terms of implementation too early. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preference in teaching students how to write a class is to ignore the implementation at the beginning and to think about the concept. One good way to do this is to develop a formal &lt;em&gt;interface&lt;/em&gt; for the class using names from the problem space. What is is that an object should be able to do? What should it be able to tell me? Look at some potential code that refers to this interface to be sure that what you have is likely complete and sensible. Then, and only then, write the class. You don't need &quot;getters&quot; and &quot;setters&quot; since the fields are hidden and only used for implementation, rather than being exposed (even safely) to clients. I use the words &quot;accessor&quot; for getting information (not fields) and &quot;mutator&quot; for updating the state of the object. And, for other reasons, prefer mutators, using the &quot;Tell, Don't Ask&quot; rule of OO software that is discussed elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Programs should read like poetry. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-10T20:28:08.217" LastActivityDate="2018-04-10T20:28:08.217" CommentCount="13" ContentLicense="CC BY-SA 3.0" />
  <row Id="4597" PostTypeId="2" ParentId="4594" CreationDate="2018-04-09T14:08:03.750" Score="26" Body="&lt;p&gt;Fair warning, I do not demand any particular naming convention (such as NetBeans) from my students.  This leaves me with variable naming only for the purpose of &lt;strong&gt;clarity&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I speak constantly to my students about the two different audiences for code: the computer itself (which is the one kids naturally think about), and other is human beings, which students find more difficult.  And I also strongly believe that this is the single biggest impedance to good naming: students don't think that it matters, because they think they are writing for a computer.&lt;/p&gt;&#xA;&lt;p&gt;I also grade all of my labs using code interviews, and my students are aware that I will be looking for clarity above almost all other considerations.  (There is good reason for this; deeply clean and clear code also has very few bugs. When you engage in the difficult process of cleaning and refactoring, you can polish your code until there is basically no room left for them!)&lt;/p&gt;&#xA;&lt;p&gt;My intuition is that good code correlates much more with good writing than it does with good mathematical skills.  Good code demonstrates a clean rhetorical structure.  &lt;em&gt;&lt;strong&gt;This&lt;/strong&gt;&lt;/em&gt; part of the code cleanly and clearly accomplishes &lt;em&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/em&gt; task, while &lt;em&gt;&lt;strong&gt;that&lt;/strong&gt;&lt;/em&gt; part carefully lays out the thinking and organization for &lt;em&gt;&lt;strong&gt;that&lt;/strong&gt;&lt;/em&gt; task.&lt;/p&gt;&#xA;&lt;p&gt;This could simply be a function of the kinds of people who are naturally attracted to coding, but I have found that asking kids to write clean code is often very difficult for them.&lt;/p&gt;&#xA;&lt;h1&gt;What works&lt;/h1&gt;&#xA;&lt;p&gt;I have found that the following question is a useful overriding guide for most of my students:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;If you were not someone who had just spent the last 15 hours looking over this code in detail, what are the odds that you could figure out what it was doing at a quick glance?&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;Naming norms&lt;/h1&gt;&#xA;&lt;p&gt;This is the best tool that I use, and these work for all of my students.  There are a few direct practices that I ask for in all submitted code:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;With regard to booleans, what do we know if this variable is true?  Create a name based on the true condition.  (e.g. if this variable will be true whenever the &lt;code&gt;foo&lt;/code&gt; is inside the &lt;code&gt;bar&lt;/code&gt;, we would name the variable &lt;code&gt;fooInBar&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;With regards to accessor methods, what information is being returning?  Simply name this information.  (&lt;code&gt;totalTrials()&lt;/code&gt;, &lt;code&gt;unusedElements()&lt;/code&gt;, &lt;code&gt;nextItem()&lt;/code&gt;, etc.)&lt;/li&gt;&#xA;&lt;li&gt;With regards to mutators, what command (verb) is being issued? Use this verb, possibly with an attached noun.  (&lt;code&gt;increment()&lt;/code&gt;, &lt;code&gt;consume(Item i)&lt;/code&gt;, &lt;code&gt;fixVertex()&lt;/code&gt;, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Single letter variable names should be used only for throwaway counters and such. (e.g. &lt;code&gt;for(int k = 0; k &amp;lt; items.length(); k++)&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;For other variables, we enter into broader territory, and things can get trickier.  Which brings us to...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Miscellaneous variables&lt;/h1&gt;&#xA;&lt;p&gt;Unintuitively, I have had mixed luck with the question,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;&amp;quot;what does this variable actually represent?&amp;quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is the question that I ask myself while I code, and it works for many students, but for students who really struggle to come up with good names, the question does not seem to grant much insight.&lt;/p&gt;&#xA;&lt;p&gt;This doesn't mean that I don't use the question, but it has become a last resort. Students who present poorly named variables often seem unable to cleanly articulate what a particular variable is accomplishing.&lt;/p&gt;&#xA;&lt;p&gt;If I'm honest, the fact that this question rarely helps strugglers makes little sense to me (and is rather disheartening), but I have come to accept it as a fact.  Going back to my intuition that strong writers create clean code, there could be some language difficulty going on here, but that is only a hunch.&lt;/p&gt;&#xA;&lt;p&gt;For such strugglers, I might help them by having them describe the variable in broad terms, and writing what they say.  I will then sit and progressively distill what they have written with them until we arrive at a good name together.  Unfortunately, this practice is time intensive and does not scale well, but it works, and I haven't found any better solutions for my strugglers.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-09T14:08:03.750" CommentCount="7" ContentLicense="CC BY-SA 3.0" />
  <row Id="4598" PostTypeId="2" ParentId="4594" CreationDate="2018-04-09T15:43:24.063" Score="3" Body="&lt;p&gt;For me, the most important part is teaching &lt;em&gt;why&lt;/em&gt; we talk about &quot;naming&quot; at all. I won't go into what are good reasons since you demonstrated in your question that you already know that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure your students know as well. You could, for example, concoct a few good and bad examples. For example, naming a variable &lt;code&gt;number&lt;/code&gt; is bad because...; naming something &lt;code&gt;xzyy&lt;/code&gt; is bad because...; naming something &lt;code&gt;customer_contract_no&lt;/code&gt; is good because... Language X uses CamelCase-with-uppercase-first-letter to denotify constants. Why is it bad to use the same style for a variable name. And so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would &lt;em&gt;not&lt;/em&gt; teach any one specific naming method because there are quite a few different ones, and some current languages tend to use either. For example, CamelCase and Upper-SNAKE_CASE in the Java world; and snake_case combined with CamelCase in the Ruby world. UPPER_CASE in SQL, and so on. I would want my students to know at least these variants, but make very sure that they know that those are just examples. I would accept if they write software using any convention, in a test, as long as they adhere to their own choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a very easy guideline on which one to use: if they program in an existing environment (i.e., in existing source code), they &lt;em&gt;must&lt;/em&gt; use the same convention that they already find in the code. If they create a new program they &lt;em&gt;should&lt;/em&gt; use the generally accepted standard for that programming language (if there is one). They &lt;em&gt;must&lt;/em&gt; take into consideration the standards of the business (or open source project, or...) they are working with. So this kind of flexibility is an important thing for you to teach as well.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2018-04-09T19:10:45.890" LastActivityDate="2018-04-09T19:10:45.890" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4599" PostTypeId="2" ParentId="4594" CreationDate="2018-04-09T15:45:10.387" Score="7" Body="&lt;p&gt;Something I have used is to present the students with a paper form (like an application form). Each of the fields is labeled sequentially with A, B, C, etc. Then I ask the students to fill out the form with information about themselves and tell them that getting all the answers correct will determine whether they pass the course or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I immediately get questions about what goes in each filed? &quot;Isn't it obvious?&quot;. After a little time I show a form that was filled out correctly. However, I use names in several fields that could easily be either a first name or family name (e.g. Paul, Kelly). In the short field between the two names, I put a &quot;A&quot;. Most students assume it is a middle initial. Some of the fields contain numeric values values that could be almost anything.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I reveal the actual &quot;names&quot; of the fields. The short values between the names is labeled &quot;Grade I expect to get in this class&quot;. The point of the exercise is to reinforce that the names of variables should define the information they contain. Otherwise, reading the code and understanding what is does is difficult, even for the author after only a little time away from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I follow up using short (often single line) helper methods in lieu of inline code. . For example, an if statement may have a complex set of conditions. I demonstrate how to pull this out into a single line function and, if the function is well named, how it makes code easier to read. For example I use something like comparing if (row == (numRows - 1)) vs if (atEnd(row)). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure my experiment has really taught he students to create better names, but when I review student code, I do make comments on naming. I suggest that students read other code for conventions and adopt a &quot;style&quot; that suits them. I also suggest that when the students work in existing code, they adopt the style of that code. I believe consistency is more important that the actual convention.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-04-09T15:45:10.387" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4601" PostTypeId="2" ParentId="4594" CreationDate="2018-04-10T04:44:59.413" Score="0" Body="&lt;p&gt;The other answers have some really good techniques, the only insight I can add is that learning to give things useful names is something that's going to take many years to learn, so it's useful to keep that perspective in mind when they don't seem to make visible progress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there is some uncertainty over &lt;a href=&quot;http://blog.karenwoodward.org/2014/03/one-million-words-to-competency-who-said-it-first.html?m=1&quot; rel=&quot;nofollow noreferrer&quot;&gt;who said it first&lt;/a&gt;, it's a generally accepted rule of thumb that an author will produce at least a million bad words before they start producing stuff worth reading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the subject can be quite mathy, fundamentally programming is writing, so the same principle applies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have them practice as much as you can, absolutely use the techniques in the other answers to teach them how critique and improve their own work - because naming isn't really something that can be taught directly, and they probably aren't going to get noticeably better at it until well after they've graduated.&lt;/p&gt;&#xA;" OwnerUserId="3898" LastEditorUserId="3898" LastEditDate="2018-04-10T05:51:42.593" LastActivityDate="2018-04-10T05:51:42.593" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4602" PostTypeId="2" ParentId="4594" CreationDate="2018-04-10T08:06:11.137" Score="2" Body="&lt;p&gt;For me, this question has a very simple and straightforward answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make them read code.&#xA;Not their own code. Each others code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will teach them the exact skill that is needed, instead of some intermediate implementation of that skill. The purpose of comments and naming standards is to make code readable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a teaching thing, let them write code as usual, with an explicit mention about clarity. Then let them exchange programs and explain someone elses code.&lt;/p&gt;&#xA;" OwnerUserId="4872" LastActivityDate="2018-04-10T08:06:11.137" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4603" PostTypeId="2" ParentId="4594" CreationDate="2018-04-10T10:28:42.420" Score="2" Body="&lt;p&gt;My answer is similar to that of Fritz Sieker, in that we both start on paper, but there are enough differences to post an answer of my own.&lt;/p&gt;&#xA;&lt;p&gt;First of all, note that I've only tested this method on myself, so I have no guarantee that it is widely applicable. However, this would be my approach if I want to teach naming practices to others. Also, I will restrict myself to the naming of functions as 1) these are among the most important code artifacts to name (independent of language!) and 2) the methods I describe are easily adapted for other code artifacts (although it may be overkill for relatively 'low level' parts such as local variables)&lt;/p&gt;&#xA;&lt;h2&gt;How to start with writing a program&lt;/h2&gt;&#xA;&lt;p&gt;Before we worry about names, let's take a look how to start writing a program in the first place. When writing an essay or report, it is often most useful to start with a brief outline of what you want to say before actually writing everything down. (a top-down approach, in other words)&lt;/p&gt;&#xA;&lt;p&gt;In my personal experience, this approach also works well for writing programs. First write a &amp;quot;rough outline&amp;quot; of your program on paper (e.g. For input with description X I want output Y. To do this I need functionality A,B,C and data structure D,...), possibly with diagrams or such. (In case the students don't get enough structure, simply ask them to split up a function)&lt;/p&gt;&#xA;&lt;h2&gt;How to name, then?&lt;/h2&gt;&#xA;&lt;p&gt;If you've followed my method so far, you now have a piece of paper with some functions or ideas for functionality that your program needs. As we have determined what we want from our individual functions, we can now give them the name that tells us most clearly what this function is supposed to do or represent. In fact, it is likely that there already is such a name on your paper!&lt;/p&gt;&#xA;&lt;p&gt;So, the only thing that is left is to check whether you need to change the name to adhere to some conventions. But this is just checking for proper form, which is a lot easier than the proper &lt;em&gt;meaning&lt;/em&gt; of the name. In other words, we have already finished the task of finding proper semantics. Finding proper syntax to express it is easy in comparison. (This is a rather mechanical task and some IDE's can even check this automatically!)&lt;/p&gt;&#xA;&lt;p&gt;Alright, we've named our stuff. Good, however...&lt;/p&gt;&#xA;&lt;h2&gt;Isn't all this paper stuff a waste of time?&lt;/h2&gt;&#xA;&lt;p&gt;...your students may ask. And perhaps they are right. However, there are good reasons to use the paper:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It is important to let the students start with an outline. This comes very naturally if they start on paper, but can easily be forgotten when starting with writing the code immediately.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Although an experienced programmer can often just start writing a function and naming it properly afterwards, this is only because this programmer has already mastered (something similar to) creating program outlines and has the outline in the head.&lt;/p&gt;&#xA;&lt;p&gt;As we don't expect our students to be able to do this in their head, giving them paper seems like a good idea.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So, the paper may be overkill for the experienced programmer, but is a useful educational tool for teaching proper program structure and naming.&lt;/p&gt;&#xA;" OwnerUserId="154" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-10T10:28:42.420" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4604" PostTypeId="2" ParentId="4594" CreationDate="2018-04-10T14:15:08.167" Score="4" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When you are reviewing code with them, individually or as a class, make them fully describe any ambiguously named variable every time it is used.  They will quickly tire of explaining it and will catch on if they don't have to explain the appropriately named variable.  If they use abbreviations, make them spell the abbreviation without looking at the screen.  (There are so many ways to abbreviate CompletedDate).  You could also ramp this up by having a different student explain the code in front of the class.  That will really help drive home the importance of descriptive names.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure they have an IDE that has some form of intelligence.  I find one of the biggest reasons people justify poor variable names is because they don't want to type longer names repeatedly.  There is no reason for that if the IDE has some form of autocomplete.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have students code modules that they must swap (or use yours), database tables or classes, etc.  After they finish fixing the discrepancies, both students could lose points for bugs caused by naming issues, (Student A should have named things better, Student B should have paid better attention to the names).  That can help drive the team strategy and importance of naming standards.  Have them do a second assignment against the other persons names.  After that assignment is complete, the students must switch back to their original tables and classes and fix their program again, which helps show what revisiting your work later can feel like.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Deduct points if they use comments to describe a variable with a poor name.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="4380" LastActivityDate="2018-04-10T14:15:08.167" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4605" PostTypeId="1" CreationDate="2018-04-10T14:47:57.317" Score="54" ViewCount="7873" Body="&lt;p&gt;In my experience, there are always students who are resistant to moving to more advanced constructs. They want to stay with what they already know. For example, when they are taught arrays, they continue to use individual variables when they are able. When introduced to the foreach loop, they continue to use bounded for loops. When they learn about functions, they resist modularizing their code. After working extensively with arrays, they don’t want to move to using built-in collection types that offer more flexibility and behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is sometimes difficult to impress upon beginning programmers the usefulness of “new” constructs, because the exercises and programs they are capable of undertaking do not sufficiently demonstrate the power and usefulness of those constructs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are ways to encourage beginning programmers to embrace more advanced constructs without penalizing them? I am looking for more &quot;carrot-y&quot; answers than &quot;stick-y&quot;.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="1293" LastEditDate="2018-04-15T14:44:43.693" LastActivityDate="2022-05-06T06:37:40.340" Title="What are healthy, productive ways to encourage students to progress to more advanced constructs as opposed to staying with the familiar?" Tags="|curriculum-design|student-motivation|" AnswerCount="12" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4606" PostTypeId="2" ParentId="4605" CreationDate="2018-04-10T14:52:32.037" Score="16" Body="&lt;p&gt;There are a number of facets to this question. But the first thing you need to remember is that students (like anyone) will tend to apply solutions that they are most familiar with. In the student context that means, often enough, the things they learned earliest and have been practicing with the most. This effect is most pronounced on hard problems that may not have an obvious (to the beginner) answer with the new techniques.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the above reason, I prefer to teach a thoroughly object-oriented course to students, having them build classes and write and use methods (some of mine, some of theirs) before they seen things like primitive data (int, double...) or low-level program structure (if-while...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More generally, I advice against a strictly bottom up approach to teaching programming, in which low level constructs are taught first with a lot of emphasis on language primitives. It takes quite a lot of scaffolding, however, but my students start their programming learning in a world that I construct, not a &quot;naked&quot; language. So, when they come up with a hard problem and need to &quot;fall back&quot; on what they know best, it will be something like writing a test for something or an interface for structure, rather than just trying ad-hoc methods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this is that ultimately I want to teach them to be OO programmers and when they get a new problem, I want them to think in a thoroughly OO way. So they will naturally write 3 line methods rather than 30 (or 300) liners. If I try to teach them procedural programming first, that will be their fall-back and I want to spare them that pain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you don't want to employ such an &quot;extreme&quot; change in the course, there are other things you can do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One method is to employ a Spiral approach in which a lot of topics are introduced early with only relatively shallow usage in the first loop of the spiral and then repeatedly going deeper on each while you introduce new topics also. This, rather than &lt;em&gt;completely&lt;/em&gt; explaining all the nuances of any given topic. (&lt;em&gt;Spiral&lt;/em&gt; Pedagogical Pattern)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another trick you can use, whatever your overall syllabus, is to introduce a rather large program early on that shows a fair number of important topics. One way to do this is to give them a program that is essentially correct, but which you have &quot;broken&quot; in a few ways. Their assignment is to understand it enough to fix it up (&lt;em&gt;Fixer Upper&lt;/em&gt; Pedagogical Pattern)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, then, the answer isn't really to &quot;encourage&quot; them, but to structure the course itself so that the &quot;higher level&quot; topics come before the lower level ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is really no reason why arrays need to be discussed before (Java) collections/lists/maps... Then the foreach construct becomes their fallback and you can later teach them the c-like $for$  loop as a possible way that foreach can be implemented. I'd rather they used the libraries in their code in any case, just as I want them to program within my original framework rather than riding bareback on the language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you introduce &quot;deep&quot; and &quot;important&quot; topics only late in the course then it is with &lt;em&gt;those&lt;/em&gt; that they will have the least practice and experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: rearrange the course so that they get the most practice on the most important topics.&lt;/strong&gt; &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-10T15:43:02.500" LastActivityDate="2018-04-10T15:43:02.500" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4607" PostTypeId="2" ParentId="4605" CreationDate="2018-04-10T15:40:11.577" Score="55" Body="&lt;p&gt;I'm afraid that there is no single silver bullet.  The problem you've pointed to is very real, and isn't limited to students.  All of us tend to stick to our own familiar toolsets because, well, it's easier.  We know how to use them already.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enter the Motivating Example.  This mythical thing makes a new topic so useful that the new topic is practically a requirement.  Want to motivate recursion?  Try having kids determine the file-size of a folder (including its sub-folders).  Want to motivate methods?  Try giving a main method that calls them, and ask the kids to create the code that will make everything work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finding a great, motivating example feels like a search for hidden treasure; it is painful and slow.  You're seeking something of great value, and it's hard to know where to look.  To make matters worse, a good motivator for one teacher may not work for another, because what makes a motivating example work is intricately tied into both the broader curriculum and what sorts of things the teacher emphasizes within the classroom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And once found, they are indeed treasures!  Clean, motivating examples make the value of a topic immediately apparent to students.  Resistance melts away, and is replaced by enthusiasm for the new tool that is now making their life easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes I spend weeks trying to find a good motivator.  I've found that teacher communities (such as this very one!) can be great sources of inspiration for them, as can algorithms books.  Or, as &lt;a href=&quot;https://cseducators.stackexchange.com/users/1896/kevin&quot;&gt;Kevin&lt;/a&gt; pointed out in a comment (before it was deleted):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As far as finding motivation is concerned, it may be helpful to look into the history of the construct. For example, foreach used to be called &quot;the iterator pattern,&quot; and even appears in the GoF book under that name, before there even was a foreach loop. So foreach isn't about simplifying the code so much as it is about abstracting away the implementation details of &quot;get the size of the container&quot; and &quot;get the nth element&quot; into a single opaque accessor. That suggests that a motivating example might begin by introducing trees, showing traversal code, and then contrasting it with an array.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Even with all of these tools, there are no easy guarantees. I sometimes have to simply wait for my &lt;em&gt;&quot;Eureka!&quot;&lt;/em&gt; moment, and teach the best I can in the meantime.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-04-11T02:18:56.540" LastActivityDate="2018-04-11T02:18:56.540" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4608" PostTypeId="2" ParentId="4605" CreationDate="2018-04-10T18:41:13.307" Score="9" Body="&lt;p&gt;As a student, I can say the appeal to my free time is pretty powerful motivation.  I have spent hours implementing features already present in a language only to feel foolish when I realized my folly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example I had an assignment where I spent a good chunk of time implementing my own (very flawed) version of a HashMap.  I have some the same thing for a TreeSet as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of my peers will cling to an ArrayList no matter what the problem presents.  They are just comfortable with using it and prefer it over any other structure, even when that means a lot of extra code they have to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Elegant solutions are appealing to some students due to their brevity, which can be seen as clever or almost getting away with something.  That may motivate some, especially the lazy ones.  Others may just appreciate how elegant the solution is for it's open merit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think some students will stick with Array and ArrayList until they are basically forced to not use them.  No matter how clever or elegant they could potentially be.  Fostering a culture that embraces failure may help overcome that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found online interview prep sites have done the best at nudging me to use constructs I would have otherwise ignored.  Maybe sell them on the idea of interview prep? Can't use an Array for all of those, just flat won't work and that is a time you definitely want something to work!&lt;/p&gt;&#xA;" OwnerUserId="4467" LastActivityDate="2018-04-10T18:41:13.307" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4609" PostTypeId="2" ParentId="4605" CreationDate="2018-04-10T19:01:51.817" Score="14" Body="&lt;p&gt;Rather than trying to motivate the students, or the reluctant ones, to progress into using your new tool (&lt;code&gt;foreach&lt;/code&gt; after &lt;code&gt;for&lt;/code&gt;), and finding a new motivating example every time, try to motivate them to be self-interested, lazy coders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that I'm under the &lt;em&gt;tar and feathers&lt;/em&gt;, I'll explain. People like to find the &lt;em&gt;easiest&lt;/em&gt; way, not the &lt;em&gt;best&lt;/em&gt; way. Earlier postings reveal that you're in the teen-age world with your students, and they are no exception, if not the rule, to that thinking. Knowing that your students will have that natural preference for easy, use it as the motivation. &quot;Quality is job one&quot; makes a good slogan for a company, but isn't so good for motivation of students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Borrowing from the world of sales, show the problem first, and the solution second. To progress from a bounded &lt;code&gt;for&lt;/code&gt; towards a &lt;code&gt;foreach&lt;/code&gt;, as an example, use the bounded version in a manner already natural to them that is possible, but problematic, against a collection that can be &lt;code&gt;foreach&lt;/code&gt;-ed. Legitimately work out the checks and error traps and actually make it work. Once they've experience doing it that way, then you can present the &quot;package&quot; where someone did all that work, and more, when they created the &lt;code&gt;foreach&lt;/code&gt;. All the traps, special conditions, etc., are handled, and all the work has been done, and debugged, for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same approach can be used to &lt;em&gt;step-up&lt;/em&gt; to any progression you choose. Under the hood in any chosen language the new tool might not be implemented using the old one. At least not now. Still, that's how they came to be created in the first place - refinement on a common problem and its solution creates the shiny new practice which becomes a tool. That's how we got structured programming to begin with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key is that the new concept is not presented as &lt;em&gt;better&lt;/em&gt; programming, &lt;em&gt;better&lt;/em&gt; presentation, or even easier to maintain, update, or fix later. Rather it's presented as a real solution, to a real problem, &lt;em&gt;right now&lt;/em&gt; that makes less work &lt;em&gt;right now&lt;/em&gt; for them. Less time on coding, now, means more time, now, to be with their friends, or do other &lt;em&gt;fun&lt;/em&gt; stuff. After a couple rounds of that, once the light bulb goes on, they'll start actively looking for pre-baked solutions, and libraries will be their next target. That outlook will carry them well into the future, and could even encourage them to look at new languages, either new to them, or new to the world, for an &lt;em&gt;easy&lt;/em&gt; solution to a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hence, they become self-interested, lazy coders. &lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-04-10T19:01:51.817" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4610" PostTypeId="2" ParentId="4605" CreationDate="2018-04-10T19:46:30.020" Score="27" Body="&lt;p&gt;I'm not sure the following will work for all students, but I remember this being a transformative &quot;aha&quot; moment in my own education:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Show them &lt;em&gt;your&lt;/em&gt; code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Preferably contrasted against a functioning but god-awful student submission from the previous term. Show them how its an order of magnitude simpler than their shotgun-formatted needlessly complex mess. Show them what compactness and elegance look like. In freshman?sophmore? CS prof assigned us to write a CLI memory card game. I like many of my peers did this big elaborate class hierarchy and/or held the &quot;cards&quot; in nested data structures with nested loops. The prof's code was IIRC &amp;lt; 20 LoC: he used a flat array of structs with the modulus operator to determine the &quot;row&quot;. I learned that day what Torvalds meant by &quot;taste&quot;, namely the ability to know when to use &quot;industry best practices&quot; and when to just write simple code even if it's less flexible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that's almost the opposite point than the one you're driving at (i.e. getting them to use the more advanced constructs) but &lt;em&gt;show in your code that they exist for a reason&lt;/em&gt;. If you can replace 50 lines of tedious, error-prone buffer manipulation with a built-in collection and an iterator/forEach that takes less than 10, &lt;em&gt;believe me&lt;/em&gt; the smarter ones will notice. And when they collaborate with their peers on group projects peer pressure will help with the slower ones.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastEditorUserId="1790" LastEditDate="2020-01-08T23:53:07.483" LastActivityDate="2020-01-08T23:53:07.483" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4611" PostTypeId="2" ParentId="4594" CreationDate="2018-04-10T23:00:45.913" Score="1" Body="&lt;p&gt;A bit tongue-in-cheek, but&lt;/p&gt;&#xA;&lt;h1&gt;make a contest-winning colleague tell them they use descriptive variable names to their advantage.&lt;/h1&gt;&#xA;&lt;p&gt;That is what worked for me (however, I was also starting in some competitions, so maybe I was more likely to listen). People starting in programming competitions, where the time is limited, may be expected to cut their variable names to be as short as possible and gain some margins on typing while looking more hacker-like. So when the winning one says that typing time doesn't matter, but having clear name saves him time, it should make you think. As stated, it actually made me start a shift toward longer names. That specific talk was obviously about C++, but applies to any language really.&lt;/p&gt;&#xA;&lt;h1&gt;Encourage reusing their code&lt;/h1&gt;&#xA;&lt;p&gt;I'm not sure how viable way it is, but you can try building subsequent tasks on top of each other, encouraging code reuse - preferably with some tweaks necessary. If you make a few iterations of that, giving clear hints that the code will be reused and good naming will help, at least some will simply try - and find it works.&lt;/p&gt;&#xA;&lt;h1&gt;Encourage treating variables as cheap and creating new ones for intermediate results&lt;/h1&gt;&#xA;&lt;p&gt;This may be simpler done in functional languages, where you are kinda forced to store intermediate results each time in a new place with a new name, but should work in Java as well. Just lead by example, putting intermediate results in named variables wherever it makes sense (i.e. serves a documenting purpose - &lt;code&gt;int fooPlusBar = foo + bar&lt;/code&gt; is obviously a bad thing to do).&lt;/p&gt;&#xA;&lt;p&gt;For some people it may be important to note that the compiler may optimize out or even create variables, so the actual cost of adding them is both none-to-negligible and hard to estimate (i.e. they shouldn't care).&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-11T16:58:31.123" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4612" PostTypeId="2" ParentId="4594" CreationDate="2018-04-11T04:37:21.063" Score="0" Body="&lt;p&gt;What methods will work depends, in part, on the teaching style. The effectiveness of any method also depends on the instructors consistency in presenting, and using, what's being discussed, and on the costs associated with following vs. not following the set guidelines. Students are no different than any other group of people, and decisions, including unconscious choices of what practices to adopt, are made &lt;em&gt;&lt;a href=&quot;http://www.econlib.org/library/Topics/College/margins.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;on the margin&lt;/a&gt;&lt;/em&gt;. It is not the value the guidelines, or conventions, hold for their future selves that are significant in what they do. Rather, of importance to them &lt;em&gt;now&lt;/em&gt; is what benefits they get &lt;em&gt;now&lt;/em&gt; by following them, or what costs they pay &lt;em&gt;now&lt;/em&gt; for not following the guidelines. &quot;The costs &lt;em&gt;now&lt;/em&gt; weighed against the (perceived) benefits &lt;em&gt;now&lt;/em&gt;.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have another &lt;a href=&quot;https://cseducators.stackexchange.com/a/894/104&quot;&gt;answer&lt;/a&gt; that deals with the &quot;value&quot; aspect on the &lt;em&gt;How to teach the value of the command line in high school?&lt;/em&gt; question, so I'll skip over that. Basically, you can force (require?) the students to do something. Their grades, and there possibility of graduation, may well depend on that performance. You cannot, on the other hand, make them &lt;em&gt;believe&lt;/em&gt;, or &lt;em&gt;think&lt;/em&gt;, something. You can, however, &lt;em&gt;sell&lt;/em&gt; ideas, and lower the costs so that they will likely &quot;buy-in&quot; to the ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course outline, and the progression of subject matter might not allow this approach, but the method of development that &lt;a href=&quot;https://en.wikipedia.org/wiki/Dijkstra&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra&lt;/a&gt; presents in his &lt;a href=&quot;https://drive.google.com/open?id=13FCHQrHO8teoqIf7--xSsVV5x0pF8oJe&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Step-Wise Program Composition&quot;&lt;/a&gt; example¹ seems to be perfect for automagically creating meaningful names. It is also language agnostic until the very end, which makes it usable in any environment, except possibly the classroom - if the lessons are required to go from low-level to high-level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a bonus, if that method is used as the design process, you can use the same project, notes, slides, and handouts for classes in every language, and adjust the final pages for the language of choice. In any case, importance comes from the fact that there is no other way to know what each &quot;machine&quot; does except by its name. No code has been written that explains it, only the name exists. The &quot;skill&quot; is taught, like any other skill, with lots of &lt;em&gt;corrected&lt;/em&gt; &lt;a href=&quot;https://www.purelearning.com.au/blog/practice-makes-permanent&quot; rel=&quot;nofollow noreferrer&quot;&gt;practice&lt;/a&gt;².&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to which teaching practices lead to, and which impeded, the development of good naming practices, it's the same answer: the instructor's behavior. As noted in other answers, if you're consistent in the use of the guidelines in &lt;em&gt;everything&lt;/em&gt; you present to them, they will come to accept it as possible. Until then they will be thinking that it's just not possible to &lt;em&gt;always&lt;/em&gt; use intention revealing names. The off shoot of that thinking is that if it's not &lt;em&gt;always&lt;/em&gt; possible, then it cannot &lt;em&gt;always&lt;/em&gt; be required, so using it only when convenient is excusable. If you never fail to use such names, even in disposable, on-the-board examples, then it becomes possible to &lt;em&gt;always&lt;/em&gt; use them (you've proven that), and there is, therefore, no grounds to argue for exceptions. The reverse is just as true, and more treacherous. If, sometimes, you slip up, and don't use such names, you've demonstrated that sometimes programmers will not use such names. &lt;em&gt;Even the instructor&lt;/em&gt; doesn't do it 100%. If the instructor doesn't always use intention revealing names, why should the student?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe the argument that naming is important in the creation of quality software is a bad choice, if not a &lt;a href=&quot;https://en.wikipedia.org/wiki/Red_herring&quot; rel=&quot;nofollow noreferrer&quot;&gt;red herring&lt;/a&gt;. First off, the quality of the software does not seem to be related to the names used. If so, programs written in machine code would be abysmal since machine code admits of &lt;strong&gt;no&lt;/strong&gt; names whatsoever. Secondly, I'm quite certain that it's possible to find one or two examples of non-quality software that does, in fact, have good naming throughout. The &lt;em&gt;quality&lt;/em&gt; of the software is not related to the &lt;em&gt;goodness&lt;/em&gt; of the naming. The ease of understanding the software, now or in the future, by the author or by others, &lt;em&gt;is&lt;/em&gt; affected by the naming. The majority of the code created in class projects is disposable code. There is no value to the students in making it easier to fix, modify, or upgrade later because there is no &lt;em&gt;later&lt;/em&gt; for that code. That takes us back the the &lt;em&gt;margin&lt;/em&gt;, and in light of the marginal costs vs. marginal benefits maintainability is going to loose the majority of the time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;: &lt;a href=&quot;https://drive.google.com/open?id=1JjtxThhEDDWvemE8ZqlcqSjqfBfaQgxr&quot; rel=&quot;nofollow noreferrer&quot;&gt;EWD249&lt;/a&gt; Notes on Structured Programming - E. W. Dijkstra, ppg. 50 et seq.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;: &quot;Practice doesn't make perfect. Perfect practice makes perfect.&quot; - &lt;em&gt;&lt;a href=&quot;https://www.quotes.net/quote/1373&quot; rel=&quot;nofollow noreferrer&quot;&gt;Vince Lombardi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-04-11T04:37:21.063" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4613" PostTypeId="1" CreationDate="2018-04-11T05:18:35.010" Score="2" ViewCount="112" Body="&lt;p&gt;I currently utilize Cloudera’s QuickStart VM and for Talend’s Big Data Sandbox as part of my big data classes. These touch on frameworks, storage / data access options, data integration, data quality, data governance, and search.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What resources do you use and would suggest for hands on big data labs?&lt;/strong&gt; Perhaps something for Snowflake, AWS, or Azure to catch cloud aspects of big data? Or some compelling big data tutorials for an analytics tool? &lt;strong&gt;Are there curated big data sets especially appropriate for educational use?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I work for a Talend; but also teach big data classes at Washington University in St. Louis. &lt;/p&gt;&#xA;" OwnerUserId="4886" LastEditorUserId="1293" LastEditDate="2018-06-17T14:28:52.927" LastActivityDate="2018-06-18T21:39:23.707" Title="What resources and data sets are available for teaching big data courses?" Tags="|labs|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4614" PostTypeId="2" ParentId="4605" CreationDate="2018-04-11T13:35:01.510" Score="11" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;What are healthy, productive ways to encourage students to progress to more advanced constructs as opposed to staying with the familiar?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would say that it's the educator's main goal to showcase the necessity of using these constructs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general (even beyond CS), you should only take the more complex option when you &lt;strong&gt;need&lt;/strong&gt; to. This is the core essence of KISS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, if you want your students to use a more complex alternative, you need to present them with use cases where the simpler option simply doesn't work (well).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For example, when they are taught arrays, they continue to use individual variables when they are able.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You've indirectly answered your own question: &lt;em&gt;&quot;when they are able&quot;&lt;/em&gt;. Give them an assignment where they are unable to use individual variables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;A very simple example is an application that builds an array of 20 names (supplied by the user, one at a time), after which the program generates a sorted comma-separated list of names.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see a way to sort these names by using individual variables. Even if some (hugely contrived) approach exists, it will take &lt;strong&gt;more time and effort&lt;/strong&gt; to develop compared to a simple array sort.&lt;br&gt;&#xA;If &lt;em&gt;some&lt;/em&gt; students use the arrays; the hardheaded others will see that their peers find the task much easier than they do, which will naturally incentivize to do the same.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;After working extensively with arrays, they don’t want to move to using built-in collection types that offer more flexibility and behavior.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;A very simple example is an application that builds a list of names (supplied by the user, one at a time) until the user says &quot;stop&quot;, at which point the program generates a sorted comma-separated list of names.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see a way to do easily solve this with an array. Since you can't know how many names will be supplied, you can't definitively declare your array (you'd have to constantly recast your array to a bigger size).&lt;br&gt;&#xA;If they use a massive array to begin with, then they should be docked points for irresponsible memory management (for the same reason that you'd dock points for memory leaks).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While continually recasting the array is not impossible to do, it is contrived and it will take &lt;strong&gt;more time and effort&lt;/strong&gt; to develop compared to using a list.&lt;br&gt;&#xA;If &lt;em&gt;some&lt;/em&gt; students use the lists; the hardheaded others will see that their peers find the task much easier than they do, which will naturally incentivize to do the same.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When introduced to the foreach loop, they continue to use bounded for loops.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The problem here is that every &lt;code&gt;foreach&lt;/code&gt; loop can be written as a &lt;code&gt;for&lt;/code&gt; loop. There is no real benefit to using a &lt;code&gt;foreach&lt;/code&gt; over a &lt;code&gt;for&lt;/code&gt;, the only benefit is the ease of reading/typing.&lt;br&gt;&#xA;A similar example would be LINQ, which is mostly used as shorthand for a foreach loop. In essence, every (in-memory) LINQ query can be written as a manually developed &lt;code&gt;for&lt;/code&gt; loop. That's technically not wrong (it only affects readability and increases effort required; it doesn't functionally matter).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Currently&lt;/strong&gt;, your students prefer to use a &lt;code&gt;for&lt;/code&gt; loop because it takes them less time to use something they know, compared to something they don't yet know (&lt;code&gt;foreach&lt;/code&gt;).&lt;br&gt;&#xA;I would temporarily ban the use of the &lt;code&gt;for&lt;/code&gt; loop (or force them to use &lt;code&gt;foreach&lt;/code&gt;, same thing), to force your students to familiarize themselves with the &lt;code&gt;foreach&lt;/code&gt;. After a few (iteration heavy) assignments, they should be familiar with how to use a &lt;code&gt;foreach&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In the future&lt;/strong&gt;, when they are familiar with both the &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;foreach&lt;/code&gt;, it's up to them to decide what to use. Most likely, most will pick &lt;code&gt;foreach&lt;/code&gt; because it's easier and less prone to developer error.&lt;br&gt;&#xA;But the traditionalists who revert to using &lt;code&gt;for&lt;/code&gt; loops are not really wrong (though they may be docked some points for readability, if you grade readability too).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It is sometimes difficult to impress upon beginning programmers the usefulness of “new” constructs, because the exercises and programs they are capable of undertaking do not sufficiently demonstrate the power and usefulness of those constructs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This is a contradiction&lt;/strong&gt;. If you don't think the students are capable of handling a problem of this complexity, then you shouldn't be trying to teach them the solution (to a problem that they can't grasp).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, if you want to teach them something, &lt;em&gt;of course&lt;/em&gt; you're going to have to show them a situation where it is relevant to use the solution!&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2018-04-12T07:31:20.770" LastActivityDate="2018-04-12T07:31:20.770" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4615" PostTypeId="2" ParentId="4605" CreationDate="2018-04-11T14:08:43.330" Score="4" Body="&lt;p&gt;If you start with the most absolutely bone-simple programming concepts at the start, then as you introduce each more complex concept, it is obvious why it solves a problem that just could not be solved using the simpler stuff they already know: No number of separate variables will solve a problem that calls for arrays. No fixed size array will solve a problem that calls for expandable arrays, and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Begin at the beginning, with things that could not be simpler or more obvious. Add one thing at a time, and show how it solves problems. Steam engine, gasoline engine, gas turbine, rocket. You just will never get to space with Jules Verne's coal-powered &quot;rocket train&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone wants to stick to older concepts that won't solve a new problem, they plain old won't solve the new problem. They can't stick, they either go forward with either new concept, or they fail out. This is why we reproduce the development of programming as it occurred: no one ever gets lost trudging along in the well-worn path. They never ask why something is better than something else: they &lt;em&gt;know&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="4897" LastActivityDate="2018-04-11T14:08:43.330" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4616" PostTypeId="1" AcceptedAnswerId="4622" CreationDate="2018-04-12T01:15:56.920" Score="7" ViewCount="337" Body="&lt;p&gt;The UK introduced its &lt;a href=&quot;https://www.gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study/national-curriculum-in-england-computing-programmes-of-study&quot; rel=&quot;nofollow noreferrer&quot;&gt;National Computing Curriculum&lt;/a&gt; a couple of years ago, which requires all children to study computer science from age 4, and programming from age 10. Children can opt out of the subject aged 16.&lt;/p&gt;&#xA;&lt;p&gt;Schools are struggling to implement the curriculum, mainly due to a lack of teaching staff that can program, but the hope is that things will improve over time.&lt;/p&gt;&#xA;&lt;p&gt;The UK National Curriculum defines three &lt;em&gt;key skills&lt;/em&gt; (English, Mathematics and Science) that must be studied. Computing is defined as one of the four sciences (along with Physics, Chemistry and Biology), which is why British children must now learn to code.&lt;/p&gt;&#xA;&lt;p&gt;Some people argue that traditional computer literacy is a specialist skill, and do not think the subject should be mandatory. The counter is that the curriculum is not designed to teach specialist skills, insisting that there is a core subset of programming concepts that every educated person should understand.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://www.gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study/national-curriculum-in-england-computing-programmes-of-study&quot; rel=&quot;nofollow noreferrer&quot;&gt;official guidance&lt;/a&gt; does not make it clear which programming concepts should be taught, instead offering vague recommendations. This is about as good as it gets:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;use 2 or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures [for example, lists, tables or arrays]; design and develop modular programs that use procedures or functions&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;understand simple Boolean logic [for example, AND, OR and NOT] and some of its uses in circuits and programming; understand how numbers can be represented in binary, and be able to carry out simple operations on binary numbers [for example, binary addition, and conversion between binary and decimal]&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I understand this is not the place for a debate or discussion, so would like to ask if anyone could define what &lt;em&gt;general purpose programming skills&lt;/em&gt; are, with any clarity?&lt;/p&gt;&#xA;" OwnerUserId="4898" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-13T19:32:18.103" Title="What are &quot;general purpose programming skills&quot;?" Tags="|secondary-education|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4617" PostTypeId="2" ParentId="4616" CreationDate="2018-04-12T04:57:45.763" Score="7" Body="&lt;h2&gt;General Purpose Programming Skills&lt;/h2&gt;&#xA;&lt;p&gt;General purpose programming skills can also be called &lt;strong&gt;Computational Thinking&lt;/strong&gt;. Computational thinking has four cornerstones¹:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Decomposition - breaking down a complex problem or system into smaller, more manageable parts&lt;/li&gt;&#xA;&lt;li&gt;Pattern recognition (data representation) – looking for similarities among and within problems&lt;/li&gt;&#xA;&lt;li&gt;Generalization (abstraction) – focusing on the important information only, ignoring irrelevant detail&lt;/li&gt;&#xA;&lt;li&gt;Algorithms - developing a step-by-step solution to the problem, or the rules to follow to solve the problem&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Computational Thinking: What It Is, and Isn't&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Jeannette_Wing&quot; rel=&quot;noreferrer&quot;&gt;Jeannette Wing&lt;/a&gt;, formerly head of the Computer Science at Carnegie Mellon Univ., Pittsburgh, PA, USA published an article in &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Communications_of_the_ACM&quot; rel=&quot;noreferrer&quot;&gt;Communications of the ACM&lt;/a&gt;&lt;/em&gt; where she covers, rather nicely, the ideas of computational thinking, and how it differs from computer programming.²&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;Conceptualizing, not programming&lt;/em&gt;. Computer science is not computer programming. Thinking like a computer scientist means more than being able to program a computer. It requires thinking at multiple levels of abstraction;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Fundamental, not rote skill&lt;/em&gt;. A fundamental skill is something every human being must know to function in modern society. Rote means a mechanical routine. Ironically, not until computer science solves the AI Grand Challenge of making computers think like humans will thinking be rote;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;A way that humans, not computers, think&lt;/em&gt;. Computational thinking is a way humans solve problems; it is not trying to get humans to think like computers. Computers are dull and boring; humans are clever and imaginative. We humans make computers exciting. Equipped with computing devices, we use our cleverness to tackle problems we would not dare take on before the age of computing and build systems with functionality limited only by our imaginations;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Complements and combines mathematical and engineering thinking&lt;/em&gt;. Computer science inherently draws on mathematical thinking, given that, like all sciences, its formal foundations rest on mathematics. Computer science inherently draws on engineering thinking, given that we build systems that interact with the real world. The constraints of the underlying computing device force computer scientists to think computationally, not just mathematically. Being free to build virtual worlds enables us to engineer systems beyond the physical world;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Ideas, not artifacts&lt;/em&gt;. It’s not just the software and hardware artifacts we produce that will be physically present everywhere and touch our lives all the time, it will be the computational concepts we use to approach and solve problems, manage our daily lives, and communicate and interact with other people; and&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;For everyone, everywhere&lt;/em&gt;. Computational thinking will be a reality when it is so integral to human endeavors it disappears as an explicit philosophy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;1: Source: BBC Bitesize - KS3 Computer Science - &lt;a href=&quot;https://www.bbc.com/education/guides/zp92mp3/revision&quot; rel=&quot;noreferrer&quot;&gt;Introduction to computational thinking&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;2: &lt;a href=&quot;https://www.cs.cmu.edu/%7E15110-s13/Wing06-ct.pdf&quot; rel=&quot;noreferrer&quot;&gt;Source&lt;/a&gt;: Jeannette M. Wing &amp;quot;&lt;a href=&quot;https://drive.google.com/file/d/1hRnNjUTyBwQu3kadX3unljw-iCZKEuk0/view?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;Computational Thinking&lt;/a&gt;&amp;quot; &lt;em&gt;Communications of the ACM.&lt;/em&gt; &lt;a href=&quot;https://dl.acm.org/citation.cfm?doid=1118178.1118215&quot; rel=&quot;noreferrer&quot;&gt;49 (3): 33.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-12T04:57:45.763" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4618" PostTypeId="2" ParentId="4616" CreationDate="2018-04-12T08:32:53.913" Score="3" Body="&lt;p&gt;I would assume that when you are saying child, you mean under 10 year old. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then as @Gypsy Spellweaver says, they would need to know how to break down problems into smaller problems, which would very beneficial for there way of solving problem in the future. That's a very big skill a lot of people are lacking.&#xA;There's also one thing you need to learn is how to find your way out, this is a very important skill to learn from programming as a child : how to solve the problem using the tool you have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theory is fine, but how to achieve that :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the programming learning curve will be very deeply related to the child's math curve. So what could be a good way could be to show children how to implement what they are learning in math.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;you're learning addition, then a good problem to give them would be : How to do any addition only using +1 addition and a loop, you'll teach them the understanding of the for loop but also the very deep meaning of the addition&lt;/li&gt;&#xA;  &lt;li&gt;Same goes with multiplication, how can you do it only using '+' and loops ? &lt;/li&gt;&#xA;  &lt;li&gt;There's geometry that would be harder to do at the early start, but you can still use math lab and do some easy geometry problem, for instance drawing lines and gives them parameters so that they would find how to make them parallel or perpendicular, then automate that&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can do that technique even at higher stage of the curriculum :&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When learning trigonometry, just show them how it's working exactly by having animation where they can move around the trigonometry circle&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think that people needs to reconnect with the very low level approach of science. Most of the time I see students just giving up in front of the problem they are offered, whereas most of time it's just a matter of thinking bigger and resolving problem one at a time with the tools you have. And I believe this is a critical skill in today's world, if you're not a problem solving person I don't see how you can fit in science jobs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe there's a lot of way to learn children the deep meaning of science using programming. You'll be surprised about how older teenager (over 16) don't even know the meaning of things like multiplication, addition and so on. Don't even thing about equations and in-equations. I believe programming will really help them understanding these concept for what they truly are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then student would be able to break down all of those problem by using programming, which is very mechanical and that would help I guess with almost all abstraction behind math for at least the early levels. Then it would get more complicated but they will have the tools to cope with those problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;General purpose skills are just as GPIOs (general purpose inputs outputs) in embedded systems, in a way that it's only tools and skills and way of thinking that will help you deal with problems you're going to face. And programming and math are one of the best way to sharpen your critical way of thinking. In the end that's just teaching you're brain how to take a step back and analyze the situation/problem/project for what it is.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="4900" LastEditDate="2018-04-13T08:25:20.427" LastActivityDate="2018-04-13T08:25:20.427" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4619" PostTypeId="2" ParentId="4605" CreationDate="2018-04-12T10:16:31.727" Score="1" Body="&lt;p&gt;When I used to be a student learning C++, my teacher gave us a very open subject with only a subject : Star Wars (it was for the year of the release of the new series). The only consign was to use at least several C++ functions. We had a minimal list of the functions and structure we had to use, and could add any specific function we would have liked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We had two different delivery of the project, first one was for the teacher to point out some place where we could have coded better (using more C++ built in function) and the second was for the final delivery with proper coding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Honestly this was a very challenging way of giving us a project, every body get deeply into it and we ended up with very pretty and satisfactory programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess this kind of approach is very appreciated but the teacher has to give a huge amount of time in order for that approach to succeed.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2018-04-12T10:16:31.727" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4620" PostTypeId="2" ParentId="4025" CreationDate="2018-04-12T12:23:38.960" Score="3" Body="&lt;p&gt;I'm currently teaching OOP using Python 3 Object-oriented Programming by Dusty Philips. Find it on Packt or Amazon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a practitioners book, it covers a bit more than just OOP including some unnecessary bits if you ask me (like concurrency). I've found it works out well when combined with a few other sources like Effective Python and some online materials on design patterns. If you follow it page by page I find it a bit too much focussed on Python details and not as much on the general OOP principles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that in most cases you'll have to make up your own curriculum and fill it with bits and pieces from books you like :) There is rarely a perfect fit.&lt;/p&gt;&#xA;" OwnerUserId="4901" LastEditorUserId="2" LastEditDate="2018-04-12T16:46:07.277" LastActivityDate="2018-04-12T16:46:07.277" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4621" PostTypeId="2" ParentId="4605" CreationDate="2018-04-12T14:55:10.933" Score="2" Body="&lt;p&gt;Challenge them with something they'll have to do once they're working -- give them some code that uses the technique you want to teach them, and have them make a change of some sort. Or show them code that DOESN'T use the technique, require some change to be made to it, with requirements (complexity, line count, whatever) that drive them towards the technique you want them to use.&lt;/p&gt;&#xA;" OwnerUserId="4902" LastActivityDate="2018-04-12T14:55:10.933" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4622" PostTypeId="2" ParentId="4616" CreationDate="2018-04-12T17:03:21.137" Score="2" Body="&lt;p&gt;I don't think that the new UK curriculum is intended to create professional programmers, certainly not among 10 year old students. Perhaps the focus of this question here is too narrowly focused on programming rather than the more general &quot;computing.&quot; Certainly, in today's world, where even young people carry mobile devices of exceptional computing power and whose applications can threaten their privacy, everyone need to know something about the details of this world and how a citizen should react to it - and govern it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The post here by &lt;a href=&quot;https://cseducators.stackexchange.com/a/4617/1293&quot;&gt;Gypsy Spellweaver&lt;/a&gt; already presents a larger framework for thinking that is excellent in every regard. So let me mention another aspect that is often forgotten. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think programming at some level can be valuable to any &quot;scholar&quot; at any level. If you are studying $X$  then being able to write simple (we hope) scripts that let you automate some of the aspects of $X$  can be very enlightening, not as a programmer, but as a student of $X$. Replace $X$  with any field you like; music, art, philosophy, chemistry, maths....  Literature today has aspects that can only be successfully studied by examining very large data sets. Obviously the same is true of Astronomy. You don't need to be a professional Java programmer to write programs that are useful to you in your work. Even a spreadsheet can be of great use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Purpose-built (bespoke) programming languages for, say, Psychology research would be valuable to many researchers, but those researchers need at least the background to understand and modify their programs. Otherwise they need to depend on professionals even for relatively simple things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even beyond the realm of scholarship, every citizen faces relatively small problems that they could solve with a bit of Python or, dare we say, Scheme. It also, of course, gives insight into the limitations of computing systems and, one hopes, the dangers of misuse. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the above in mind, it is probably necessary to teach programming in a different way than if you were teaching it to someone with a formal CS focus. Rather than traditional CS topics, such as searching, sorting, optimization, algorithm efficiency, etc., &lt;em&gt;applications&lt;/em&gt; can be stressed. And they should be applications in the other fields that the students are beginning to study; their science courses, for example. This also opens the possibility of collaborations with the instructors of those other subjects which can, in itself, be a useful thing for all parties to the collaborations. The physics teacher is a good source of ideas about what physics issues might be informed with a bit of computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Biology is an especially fruitful field since students often do field work, tallying up fish and frogs and birds, etc. Some simple programs to help them do the tallying and especially simple statistical analysis is helpful. Teachers can organize multi-year projects in which a new class carries on a study started by earlier students. It has scientific merit as well as generating learning and enthusiasm for the field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the question is deeper than programming as I noted at the start. Every citizen needs to be able to digest what is going on in the wider world of captured data as exemplified by the current (early 2018) discussions and debate about Facebook and Cambridge Analytica and the misuse of personal data. These are big questions that require an informed citizenry. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-13T16:16:01.977" LastActivityDate="2018-04-13T16:16:01.977" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4623" PostTypeId="2" ParentId="4616" CreationDate="2018-04-13T13:01:32.810" Score="1" Body="&lt;p&gt;There are three basic building blocks of programming: simple sequence, decisions, and iterations (loops).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any program can be built from these three basic constructs. They are like the six simple machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simple sequence is exactly what it says: statements executed in order. Decisions are (usually) prefaced with the word &quot;if&quot;: if it is sunny, I will go to the skate park. Lastly, iterative constructs repeat the same code over and over, stopping based on a certain condition or a number of times: while the driver presses the gas, send fuel to the injectors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Children can learn and practice these constructs without writing code. For example, they can write directions on how to get from their school to their home.  Food recipes are also good practice, to read and to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These things, written instructions telling how to do something, are called algorithms. Once children become proficient at writing algorithms (and since they are starting so young, several years could be spent on just that aspect, using the spiral pedagocial model), then they can move to writing code. If they have made the algorithm development part of their thinking, then it will transfer easily to coding.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="1293" LastEditDate="2018-04-13T19:32:18.103" LastActivityDate="2018-04-13T19:32:18.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4624" PostTypeId="2" ParentId="3469" CreationDate="2018-04-14T03:04:35.910" Score="3" Body="&lt;p&gt;There are some great answers here already, but I have one thing that was not said yet directly:&lt;/p&gt;&#xA;&lt;h2&gt;Forcing students to learn a second language before proceeding further&lt;/h2&gt;&#xA;&lt;p&gt;I strongly believe that knowing multiple languages is crucial for proper programmer development. Every language has it's own ways of modelling reality, and devs using (even worse: knowing) only one language get very strongly tied to it's idioms and quirks. Offering Scheme as the first language should force students to learn something more practical (no offense) quickly, giving them grasp of 2 significantly different approaches, and more or less untie their abstract thinking from any specific language.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-14T03:04:35.910" CommentCount="3" ContentLicense="CC BY-SA 3.0" />
  <row Id="4626" PostTypeId="1" CreationDate="2018-04-16T17:06:56.417" Score="15" ViewCount="2127" Body="&lt;p&gt;Giving the same assessments from year to year causes fairly obvious problems.  Cheating becomes more and more of a potential issue.  Basic testing security dictates that we must create new assessments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, generating new material has a few problems of its own:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Quality goes down, because material is less vetted.  There may be unclear instructions, or even outright errors.&lt;/li&gt;&#xA;&lt;li&gt;Creating this new material just seems to take a &lt;em&gt;really long time&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It is not unusual for the creation of a single test or quiz to take me 3-4 hours to design.  I have to look over the curricular material and brainstorm problems that can get to the heart of the core issues.  I then have to design the problems, test everything in an IDE (to make sure that there are, at least, no typos in the code examples), create grading rubrics and processes, and finish up with final formatting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tend to use a mix of multiple choice, free-response (coding by hand), and short answer questions  The first and second of these are what students will find on the AP Computer Science A test, so I need to give students practice with these kinds of activities.  The short answer questions are an easy way to check for understanding of some particular little point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that, between my various classes, I give an average of one quiz or test per week.  If we assumed a 40 hour work-week &lt;em&gt;(ha!)&lt;/em&gt;, then designing each assessment fresh would be a commitment of 7.5%-10% of my entire work time.  That doesn't count the time to administer or grade the thing, this is just for the design aspect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality, then, I mostly don't do this, and mostly give assessments from prior years.  I want to change this practice, but I don't see how I realistically can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there strategies to speed up the design of written assessments without losing quality?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I don't want to give fewer assessments, because &lt;a href=&quot;https://www.nytimes.com/2017/05/29/us/computer-science-cheating.html&quot; rel=&quot;noreferrer&quot;&gt;labs are suspect&lt;/a&gt;, and because of the &lt;a href=&quot;http://psych.wustl.edu/memory/TELC/Roediger_Putnam_Smith_2011.pdf&quot; rel=&quot;noreferrer&quot;&gt;tremendous cognitive benefits&lt;/a&gt; of testing.  Instead, I would ideally like to be able to design a high-quality test or quiz in under an hour.  This amount of time would make the entire enterprise more tenable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the benefit of future visitors, I will also include my own answer, though given my times, it will (obviously) only be a partial answer.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-04-16T17:25:02.223" LastActivityDate="2018-04-16T19:38:50.443" Title="How can I speed up the construction of high quality testing materials?" Tags="|assessment|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4627" PostTypeId="2" ParentId="4626" CreationDate="2018-04-16T17:14:58.387" Score="3" Body="&lt;p&gt;Here are a few strategies that I have found helpful:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Test every bit of code in an IDE or a live coding environment&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As much time as double-checking code takes, it still takes much less time than unanswerable questions that you ultimately can't count in the final grades.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create the answer keys &lt;strong&gt;directly in&lt;/strong&gt; the examination file.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one actually saves me a lot of time.  If you use Microsoft Office, simply color the lettering of any answers white.  When you print to a standard black toner laser printer, these answers are not printed at all.  This practice also helps you gauge how much space the students will need for a free response question.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create your rubrics for grading in the question space as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Placing a rubric or grading guide into the exam (again, in white) both makes you reflect on the original question (thus helping to ensure quality) and makes it easier to grade later.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Build a question bank over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This combines particularly well with numbers 2 and 3.  It allows you to slowly recycle questions from years past, keeping keys and rubrics intact as you go.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-04-16T17:14:58.387" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4628" PostTypeId="2" ParentId="4626" CreationDate="2018-04-16T17:24:04.287" Score="3" Body="&lt;p&gt;I'm not a big supporter of your underlying concept here and it seems like you are overly dependent on exams. I prefer a teaching/grading system in which students don't feel so much at risk. It also has the benefit of making your core concern much less important. And even if you can come up wit questions &quot;quickly&quot; it is impossible to say they are really good questions without some verification. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your first link is about courses with hundreds of students. I don't think it applies at most people's scale of things. The second link about testing leave a lot of it valid even if the &quot;testing&quot; isn't closely coupled to &quot;grading&quot;. In other words, weekly quizzes could count for a tiny fraction of the overall assessment and still be valuable. In that situation, the criticality of getting a quiz &quot;right&quot; goes down dramatically. Who cares if a poorly worded question gets through if it counts 0.001%. You can also agree with your students that such questions will be dropped. In fact, any question in which a substantial fraction answers wrongly or doesn't answer at all is suspect. Another option for reducing risk is to simply drop some number of low grades for any student or allow re-testing (makeups) for poor answers. Dropping the lowest grade, for example, just recognizes that students aren't superhuman. This also reduces the need for the instructor to spend inordinate amounts of time on questions that are difficult/impossible to vet properly and for which the grades may have little to no correspondence with learning.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I took Calculus 1 (back in the dark ages) the instructor gave a &quot;pop quiz&quot; nearly every day. Just one or two questions. We hated them (and often him as well), but they counted for very little overall and they encouraged us to review the previous lecture before the next one. He didn't take a lot of time preparing them (I'll guess), but he did have to review them - class size about 30. We didn't like him much but he did force us to learn (stick like, not carrot like). But other teachers were able to actually inspire us to learn without the stick. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So rather than &quot;solving&quot; the problem you state, I'd rather you find a way to simply make the problem go away altogether. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On the other hand, one positive thing I can say about your process is that you give students a lot of practice taking tests. If you want students to do something well, give them a lot of practice doing it. If you want them to do well on tests (including standardized tests) give them a lot of practice doing tests. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-16T17:29:34.207" LastActivityDate="2018-04-16T17:29:34.207" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4629" PostTypeId="2" ParentId="4626" CreationDate="2018-04-16T17:31:59.360" Score="19" Body="&lt;p&gt;I have a few suggestions based on my experience this year. I have one prep over two blocks, which meant that for every exam I wrote, I wrote two versions. Moreover, because I take a standards-based approach, students end up retaking the exam but a modified version at that. For some exams, I ended up with 4 versions. Here's how I sped up my own process:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Focus on proficiency.&lt;/strong&gt; Not every questions needs to &quot;trick&quot; students. (Indeed, &quot;tricking&quot; should never be the goal of an assessment: it should be an accurate measure of what a student knows and can do at a particular moment in time.) If I believe proficiency is 70%, then 70% of the points should be relatively straightforward questions that all students should earn. Maybe another 20% consists of slightly more challenging questions, saving the final 10% for the questions that might focus on the most subtle of details. By focusing on what all students should be able to do, I can worry less after the &quot;craftiness&quot; of my questions and get right to the heart of the matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Write questions designed with substitution in mind.&lt;/strong&gt; Let's say I'm asking questions to test a student's knowledge of basic Linux commands since it's necessary for our IDE. Whether I ask about &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;mkdir&lt;/code&gt;, &lt;code&gt;touch&lt;/code&gt;, etc. should be irrelevant; they are all fair game. Thus, one approach is to tell students to review from a list of terms, and come up with a potential set of 4-5 answers. Then, from class to class, you can simply change what term you are asking about. The answers don't change, but the questions do. No student will know in advance which terms will be asked about just &lt;em&gt;that&lt;/em&gt; they will be asked about. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Keep the method, but change the input.&lt;/strong&gt; I recently assessed students on Python, and I wanted them to be comfortable with two key concepts: the use of &lt;code&gt;range()&lt;/code&gt; for iteration and the basics of string access and manipulation. I didn't have to change the instructions from class to class very much, but by changing the input, I gave the two classes unique exams. They knew to expect questions on strings and iterations, but until they are faced with the actual input, this bit of information does not necessarily help them answer the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may have more ideas come to me as I read more responses, but here's my final, overarching thought:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EXAMS ARE NOT SURPRISE PARTIES.&lt;/strong&gt; Students, assuming they have been present and attentive in class, should not be surprised by the content of your exams. Let them be occasions for students to show you what they can do. While we as educators might stress over the perfect question to ask about, say, an &lt;code&gt;ArrayList&lt;/code&gt;, it should always come back to this: &quot;How I can fairly and accurately assess what a student knows?&quot; It is not, however, a chance for us to show how clever we are. Get to the point. Be clear; be fair. Let students prove how much they have mastered. Keep that mantra at the forefront, and test design can become simpler and faster.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;ADDENDUM:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Learn LaTeX.&lt;/strong&gt; I use LaTeX for the creation of all my exams. While the first couple exams took some time to get just right, now that I have written a large number using it, I cannot imagine using anything else. It takes care of the formatting, the indenting, the point scale, everything. I don't waste a lick of time worrying about how it will print or format, especially when I need to include code samples. The time you invest in learning it &lt;em&gt;will&lt;/em&gt; speed up the time it takes to format your exams.&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2018-04-16T17:37:11.723" LastActivityDate="2018-04-16T17:37:11.723" CommentCount="4" ContentLicense="CC BY-SA 3.0" />
  <row Id="4630" PostTypeId="2" ParentId="4626" CreationDate="2018-04-16T18:23:13.200" Score="6" Body="&lt;p&gt;You don't necessarily have to rewrite the entire thing every year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the tests I give are 40 questions. What I try to do is add 10 or 15 each year to the bank that the test is pulled from. That way, each year there's some new stuff. But nobody ever sees the entire set, so questions from past years are new to them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tweaking what you have.&lt;/strong&gt; For some questions, it's pretty easy to tweak an existing question.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i=0; i&amp;lt;10; i+=2) {&#xA;    System.out.println(i * i);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You could pretty easily change the starting and ending values, how much &lt;code&gt;i&lt;/code&gt; goes up or down each time, or what you want to print. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Speed up what you can.&lt;/strong&gt; I like ExamView for building banks, but it's really clunky to actually enter questions. What I've been doing this year is type the questions in Markdown, exporting as either RTF or DocX, and importing that into ExamView. I can create questions way faster in Markdown and MathJax than I can when I have to click around in ExamView.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Rinse, repeat&lt;/strong&gt; The other answers have really good ideas too, and no reason to repeat them here. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2018-04-16T19:38:50.443" LastActivityDate="2018-04-16T19:38:50.443" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4631" PostTypeId="1" CreationDate="2018-04-16T18:39:32.733" Score="6" ViewCount="168" Body="&lt;p&gt;I am teaching a course in data structures to a 2o semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We hear often that the dictionary is a very versatile data structure, and solves quite so many problems. I'd like to illustrate that, but, unfortunately, find myself lacking some interesting problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for two kinds of problems: &quot;computer sciency&quot; and more &quot;practical&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a &quot;computer sciency&quot; example, I already have &quot;anagrams&quot;, in which you count the letters of two strings to check if they are anagrams of each other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a more &quot;practical&quot; example, I already have a dependency tree: You have a discipline, and it lists its name, its code and the codes of its dependencies, and the point is to print a tree of dependencies, using indentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd love more ideas, though.&lt;/p&gt;&#xA;" OwnerUserId="4251" LastEditorUserId="27" LastEditDate="2018-04-16T19:07:01.073" LastActivityDate="2018-04-17T21:04:28.783" Title="&quot;Computer sciency&quot; and &quot;practical&quot; exercices involving dictionaries" Tags="|lesson-ideas|algorithms|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4632" PostTypeId="2" ParentId="4626" CreationDate="2018-04-16T19:07:40.013" Score="2" Body="&lt;p&gt;There are a few steps involved in the creation of test questions, and some of them can be time-sinks that are not amenable to any optimizations. The typing of the questions, answers, and rubric, for example depend on your typing speed, and that's not subject to change with new techniques. Your choice of tools for creation of the questions &lt;em&gt;might&lt;/em&gt; make a difference. Changing tools, however, is going to come with a learning curve to switch, which probably destroys any gains for a while. Of the steps involved I can only think of two that seem open to techniques for reducing the time spent. Leverage &lt;em&gt;scale&lt;/em&gt; and spiralize the writing process.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Scale&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Many of the questions on an exam are going to be simple tests of knowledge. Such questions are in the &lt;em&gt;dime-a-dozen&lt;/em&gt; category, using relatively small amounts of time to create, and needing very limited vetting. The original question seems focused on the questions that involve the student writing a code block, or program, as an answer. Faster generation of such question can be accomplished by using scale: scale the questions up or down, and the &lt;em&gt;economy of scale&lt;/em&gt; concept. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Keep the questions atomic. The less complex the question, the faster you can create it and, in your own mind, vet it. So reducing the scope of a question increases the speed of making it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make questions that have larger answers. The ratio of time spent imagining and designing a &lt;em&gt;problem&lt;/em&gt; to what it tests seems to geometric. A little extra time working on a scenario can make the question cover a lot more concepts. You can have fewer questions that require more work from the students, and cover more concepts from the course, while still testing all the points the exam should assess.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make the question bank in one pass, not over time. (This is an investment in the future. More time spent &lt;em&gt;today&lt;/em&gt; less time &lt;em&gt;tomorrow&lt;/em&gt;.) When you are trying to create a question that will cover a concept your mind is focused on that point. You probably have several ideas and spend time choosing which one to use. Don't choose &lt;em&gt;one&lt;/em&gt;, choose several (six for a reason explained below). When you focus on the next concept your mind will switch gears and you spend time getting &lt;em&gt;into&lt;/em&gt; that one and most of what's in your mind now will be lost. This uses the time spent focusing on the concept in question once rather than doing it again for each test.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Spiralize&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Vetting of the questions seems to be up to the students. From the question's wording I am left with the impression that you consider a question &lt;em&gt;vetted&lt;/em&gt; after it's been used on an exam, and was understood by the students well enough to answer the way you expected them to. That leaves me wondering what happens when a question &lt;em&gt;does not pass the test&lt;/em&gt;. I'm going to guess that the problem of disconnect between what you wanted and what you got, when it happens, is connected to the same issue programmers solve by using naming conventions: familiarity. Solve that problem by creating the tests in a spiral pattern. If you use the last bullet above, you can even make it a double spiral.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a good place to use paper over digital, especially if the exams are issued on paper. Write down each &lt;em&gt;problem&lt;/em&gt; you create in basic details. Using enough for you to recall it later without &quot;fleshing it out&quot; until later. Once written, so you won't forget it, move on to the next question. Having recorded all your ideas for question, return to the first and begin adding details, and cleaning up stray elements. What you &quot;thought&quot; the first time through is now muddied with everything you thought about since, and the question may be less clear than it was at first. Again, go through the questions, doing clean up, but not answers, yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once all the question are &quot;polished&quot;, you can return to the first one and begin to create your &lt;em&gt;answers&lt;/em&gt;. If the questions still need polishing, certainly do so now. This pass through you are in answering mode, and more resemble the student's approach to the question. It's not new material for you, but it shouldn't be new to them either. If you can answer the question in the same way, now, that you'd expect the students to, then it's probably &lt;em&gt;vetted&lt;/em&gt; enough to add to the question bank.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Why 6 questions?&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Most schools cover a range of student years. Groups of four seems to be quite common. If a question is used from year to year it is possible that last year's students can provide answers to this year's students. With multiple questions available this can be reduced, but not eliminated completely, unless there are more questions than years in the school's coverage. Giving the same, exactly, test again later creates the possibility that the previous version is archived on the Internet somewhere - people will do almost anything, and students are no exception. Randomizing which question in the question bank to include on a test makes each test unique and any archived test will have limited value for the current one. If the bank has 6 versions available and you disqualify the last 2 used and the school does have 4 years worth of students, then the randomly selected question will have only a 25% chance of being seen by anyone currently in the student body, and the &lt;em&gt;value&lt;/em&gt; of retaining previous answers goes way down for past and future students.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Bonus technique: &lt;em&gt;Serendipity&lt;/em&gt;&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Your mind is usually most focused on a concept when you are trying to explain it to students and answering their questions. Often you will have sudden inspirations of how to use, explain, or demonstrate the current concept. Such inspirations make good leads into great questions on an exam. &lt;strong&gt;Save them!&lt;/strong&gt; In another &lt;a href=&quot;https://cseducators.stackexchange.com/a/1168/104&quot;&gt;answer&lt;/a&gt;&lt;sup&gt;1&lt;/sup&gt; on note taking another user suggested the &quot;Hipster PDA&quot; for the students. It makes a great note taking tool for instructors as well. Use your own Hipster PDA to take notes of such inspirations when they occur and you can greatly reduce the time spent on &quot;inventing&quot; the problem for a question later. You cannot, unfortunately, &lt;em&gt;plan&lt;/em&gt; to have inspirations, but you most certainly can &lt;em&gt;plan&lt;/em&gt; to capitalize on them when they arrive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt; Thanks to @&lt;a href=&quot;https://cseducators.stackexchange.com/users/1293/buffy&quot;&gt;Buffy&lt;/a&gt; for the &lt;a href=&quot;http://www.43folders.com/2004/09/03/introducing-the-hipster-pda&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hipster PDA&lt;/a&gt; concept.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-04-16T19:07:40.013" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4633" PostTypeId="2" ParentId="4631" CreationDate="2018-04-16T22:09:44.290" Score="1" Body="&lt;p&gt;Two ideas come to mind. For the CS-y version you could go with creating a file structure based on the MD5 sum of the files. Use the sun as the file name in the index with the &lt;em&gt;given&lt;/em&gt; name stores in the attached data. The first two digits of the hex encoded sum, the file name, can be used as the two levels of the directory path where the file is stored. If the top level represents physical devices,  then you get a roughly even distribution of files across the devices .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a more practical, not that the first is not practical,. use &lt;a href=&quot;https://drive.google.com/file/d/1hRnNjUTyBwQu3kadX3unljw-iCZKEuk0/view?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Soundex&lt;/a&gt; for finding various spellings of the last names of the student body.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-04-16T22:09:44.290" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4634" PostTypeId="2" ParentId="4631" CreationDate="2018-04-17T07:09:08.263" Score="4" Body="&lt;p&gt;Some project ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Implement a very basic programming language. Write the parser for them, but have them manipulate the AST (eval expressions, perform constant folding, etc). (So hey, trees are a thing...) And of course, all programming languages have variables. How do we store variables? Hey, wouldn't having dictionaries be useful...?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use dictionaries to implement a &quot;sparse vector&quot; class. Use the sparse vector class to implement TF-IDF and cosine similarity. Then, use TF-IDF/cosine similarity to implement a search engine. If the students are unfamiliar with linear algebra, you can skip the &quot;sparse vector&quot; bit and have them implement TF-IDF directly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bonus! Have the students also implement page rank, which ties in to graphs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Want to integrate even more concepts? Have them write their own sorting algorithms to sort the final results. Go even further? Rather then using a sorting algorithm, have them implement top-k-sort on top of a heap so they efficiently select just the top k results in worst-case O(nlog(k)) time.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have them implement literally anything related to graphs. After all, you can pretty much always get away with implementing an adjacency list as just a dictionary of keys to some collection (a list or a set). This means that any problem where you manipulate an adjacency list can also be a dictionary assignment in disguise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And there's a huge wealth of interesting graph problems out there -- have them implement pathfinding on a map of your local city using Dijkstra's, have them generate interesting and randomized mazes by adapting some MST algorithm, have them analyze a DAG, etc...&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you also want to integrate a bit of systems, you could maybe have the students implement a simplified version of Git. After all, git is just a DAG and all graph problems can be turned into dictionary problems. (It's also an interesting application of hashing!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You'll probably need to give them code to do file IO for them, and maybe handwave or simplify the whole merge business, depending on how complicated it ends up being. (Or maybe not? I don't know much about the merge algorithms git uses, but it's entirely possible they could end up being interesting applications of dictionaries in their own right.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A simpler assignment (more for CS 2 students): have the students read in simplified grammars in BNF format. Then, recursively (and randomly) traverse that grammar and generate some output. Have the students invent their own grammar -- there's room for creativity here. You could generate randomized poetry, randomized programs, etc... &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Have the students do something with n-grams and Markov chains. As before, this is really just a graphs assignment in disguise -- each node is an n-gram; you store a weighted edge from one n-gram to the next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to stick with the whole &quot;secretly a graphs&quot; thing but keep the math part light, have the students use Markov chains to generate text. You can have a lot of fun with this -- feed in Shakespeare to generate vaguely Shakespeare-ish text, feed in your Facebook data to generate text that sounds like you... You can also experiment with doing this on a character level and try feeding in corpuses from different languages. As it turns out, auto-generated English is pretty distinct from auto-generated French.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The algorithm to do this ends up being pretty similar to how you do the BNF thing since it's just randomized graph traversal. If you wanted to make a point about the importance of abstracting and refactoring code/adapting to sudden changes in the project spec, you could perhaps tie it in here (though tbh it feels a little contrived/might be more trouble then it's worth though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if you want to avoid graphs but don't mind bringing in some stats, have them do basic basic classification instead, and give them a taste of machine learning. (E.g. can you classify spam emails vs non-spam emails? Can you classify which human language some text likely came from based on letter frequencies, character n-grams, and so forth?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My memory is a little hazy here, but I think you don't really need a graph (explicit or implicit) and just need a way of storing a discrete probability distribution. (And a dictionary is great way of doing that -- map n-grams to the probability that n-gram occurs.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Disclosure: I did variations of assignments 1, 2, and 3 for a data structures course I just finished teaching + made them multi-week partner projects. They went reasonably well, though #1 may have been a tad ambitious. &lt;/p&gt;&#xA;" OwnerUserId="732" LastEditorUserId="732" LastEditDate="2018-04-17T07:37:16.250" LastActivityDate="2018-04-17T07:37:16.250" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4635" PostTypeId="2" ParentId="4631" CreationDate="2018-04-17T20:13:29.957" Score="3" Body="&lt;p&gt;Perhaps not really a solution to your problem, but definitely an answer to your question: &lt;strong&gt;almost anything written in a dynamically typed language&lt;/strong&gt;, like JavaScript or Python, where dictionaries are ubiquitous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's pretty clear how using dictionaries make these languages &lt;em&gt;work&lt;/em&gt;, and how they add to code flexibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another very practical use of dictionary is &lt;strong&gt;straightforward serialization and de-serialization&lt;/strong&gt;. Here dictionary allows abstracting all low level stuff to a standard library, and coping only with something reasonably well structured. Again, that's something that works best in dynamically typed languages, which can represent arbitrary JSON with standard structures. The exercise may involve storing some data (e.g. game saves),  interacting with a REST API, or just processing some given JSON data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if JavaScript is not the language you use, it may be feasible to run a live exercise simply in a browser console, to get some hands on experience.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditDate="2018-04-17T21:04:28.783" LastActivityDate="2018-04-17T21:04:28.783" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4636" PostTypeId="1" CreationDate="2018-04-17T22:31:25.003" Score="2" ViewCount="126" Body="&lt;p&gt;I am preparing to teach an intro to app development class to approximately 10 students who are there voluntarily this summer using Swift and Xcode. The course will consist of daily, 5-hour class meetings over the span of 3 weeks. All development will be on Macs out of necessity; some will be school-issued devices, but some will be the personal devices of the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For curriculum, I will be following Apple's &lt;a href=&quot;https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewBook?id=1118575552&amp;amp;mt=11&amp;amp;v0=www-us-education-everyone-can-code-book-app-development-swift-preview&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intro to App Development with Swift&lt;/a&gt;. For most of these high school students, this class will be their first exposure to programming entirely, so I need to bear that in mind as I consider what tools to teach them alongside the language and software of basic iOS development. Given the compressed nature of the course and the introductory feel thereto, I do not want to overload or distract them from the main focus of the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All that being said, I am trying to come up with the smoothest workflow for both them and me in terms of file submission, feedback, and assessment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are simple, beginner-friendly ways of collecting and grading work in an iOS app development class?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="58" LastEditDate="2018-04-21T20:05:45.410" LastActivityDate="2018-04-21T20:05:45.410" Title="How to collect and grade Xcode work" Tags="|grading|assessment|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 3.0" />
  <row Id="4637" PostTypeId="2" ParentId="4569" CreationDate="2018-04-17T22:46:31.470" Score="5" Body="&lt;h2&gt;Starting languages for non-programers&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Vastly depending on what is the purpose, but for some people it may be beneficial to choose for a first language a &lt;em&gt;scripting language&lt;/em&gt;, that is used only as snippets in a wider context. The main advantage is that you get useful stuff basically from the point zero, and not only after learning half a language. If you stop learning after 5 hours, you may still have some benefit from it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some possible choices:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bash&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously not for everyone, but very useful for Linux/Unix (Mac?) users managing any substantial amount of files. The main advantage is that the requirements to make it useful are very low, it's not like you need to learn half a language to write a &quot;Hello World&quot;. It's just &lt;code&gt;echo Hello, world&lt;/code&gt;, that's it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Somewhat peculiar language and hated by many, but it's again very easy to make it useful, and, importantly, everyone has it right in their web browser. You can start by adding one-line snippets to your static HTML-page to make it more fancy, install Tampermonkey and fix annoying UI on your favourite web page (disclaimer: be advised about security issues with installing userscripts from untrusted sources), or just tinker with browser console to see how different pages are built.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Python/IPython&lt;/strong&gt; (as a fancy calculator)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just that. If you need to do some simple math or just want to quickly check how many digits does 17³³⁷ have, Python is your friend. Clean syntax and built-in support for bignums make it a perfect tool for your little arithmetics. After you choke your machine with computing &lt;code&gt;17**337**337&lt;/code&gt;, you may try to do something more ambitious.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Octave/Matlab&lt;/strong&gt;, &lt;strong&gt;R&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fancy calculators for people who don't think that &quot;matrix&quot; is just a movie title.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;PHP?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yeah, that's an awful language for most uses, but if someone has an idea for a Personal Home Page with some simple interaction, it may be just the right tool to use.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Starting languages for wannabe-developers&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Now, to the other question: &quot;do you agree that starting with C/C++ is beneficial for a deep understating of programming&quot;? &lt;strong&gt;Yes.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a person planning to do any serious programming, I'd perhaps recommend starting with &lt;strong&gt;C++&lt;/strong&gt; (where &quot;++&quot; stands for &quot;streams, strings, vectors and maps&quot;, maybe now also &quot;smart pointers&quot;; the rest is confusing and unnecessary noise) or &lt;strong&gt;Pascal/Delphi&lt;/strong&gt; (that's what I actually started with) for less opportunities to shoot your feet, and a good GUI library with IDE support. It is also very useful to do some programming in a functional language (OCaml? Scheme?) early, to get some different perspective on programming, with better structured framing. I'm not sure it's a good first choice though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I'd be careful to &lt;em&gt;not&lt;/em&gt; go into too far into high-level programming in C++. C++ &quot;high level&quot; structures are actually thin wrappers around explicitly low-level stuff. To write classes and abstractions, take a proper high level language, perhaps Java or Scala. C++ is not a high level language, and I tend to treat it's high-level features as a kind of a last-resort: if you are bound to using C++ for performance and low level features, that is how you get some abstractions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for starting with higher-level languages, my intuition is that thinking about classes and this kind of abstraction is unnecessary noise at the entry level, which is why I look with great suspicion at starting with Java (in which even a &quot;Hello world&quot; is in a way OO). I don't have any data-backed point here though. Additionally, I find the Java memory model (i.e. references everywhere) to be both confusing and misleading.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="4884" LastEditDate="2018-05-19T10:11:06.640" LastActivityDate="2018-05-19T10:11:06.640" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4638" PostTypeId="2" ParentId="4569" CreationDate="2018-04-18T10:02:43.763" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Most of them had no real final purpose, just wanted to be able to understand programming and be able to work with it if needed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It is much easier to maintain and grow such motivation for the subject if your students can quickly develop some programs they are proud to show.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as I see among my students, printing &quot;Hello&quot; 10 times, summing the elements of an array, or concatenating strings doesn't really fall in that category anymore.  Funny examples come more quickly with higher level environments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they've learnt the basics (variable, loops, problem decomposition) they can learn low-level things.  Actually programming is not about using low-level devices, it is about learning to make things with what you have at hand.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastActivityDate="2018-04-18T10:02:43.763" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4639" PostTypeId="2" ParentId="4636" CreationDate="2018-04-18T13:06:58.810" Score="2" Body="&lt;p&gt;I'm going to offer an answer that is orthogonal to your question by looking at a deeper question. The &quot;work-flow&quot; you seek may actually be irrelevant to the problem of (a) being effective with your students and (b) being efficient with your own time and effort. Hopefully, the answer here will be valuable to others who don't have quite the same context that you do. I'll focus on the small number of students and the long daily sessions, primarily. The answer will be less valuable for larger groups and/or shorter sessions, but some of it might be adapted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: Keep continuously aware of their progress, day to day, with short conferences. Restrict your evaluation to the most important issues as they evolve.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With only a few students and long sessions, there is really little reason to have to look at everything in detail, captured by GIT, or otherwise. This is one situation in which printouts sounds like a terrible idea also, though that is often the most efficient method of looking at student production. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can both reduce your work and be more effective if you require some sort of teamwork, such as pairing. If you only have five projects to keep straight it is much easier than ten. You can, in long sessions, set aside say one hour in which each team consults with you for a few minutes on their current work and issues. They show you their current product and you give them advice. But if they are pairing, they will need less advice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One concern you likely have is honesty. Looking at each student's (team's) work for a few minutes each day (or so) lessens the likelihood that you won't notice bad behavior. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that will help you keep track of the students and keep them on track as well is to keep a running record of their progress. A Hipster PDA (discussed elsewhere on this site) is one way. A spread sheet is another. Decide before the course starts which low-level results/behaviors/activities are to be encouraged and valued and keep a record of these for each team, each day. A check mark is all that is needed for many things, though occasionally a written note (to them and/or to yourself) might be valuable. It is a continuing and cumulative process, not an all-or nothing evaluation at the end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students work in teams you can also keep yourself aware of each student's contributions to the team simply by listening to how they interact when you confer with the team. A quick notation on an index card captures your impressions for re-confirmation later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to give advice on code quality you don't need to look at it all at once, but can look at fragments (one class, one method) in a review and get a sense about whether they have it right or not. You won't catch every flaw, but you aren't guaranteed to catch everything in an overall review either. If several teams are going wrong in the same way you can alter your &quot;lectures&quot; to guide them back. If a single team/student is off the rails you can focus your efforts there, instead. None of this requires that you capture everything in a repository or even that you comprehensively review their work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If design is one of your goals, you can focus your daily review on that, warning them the day before that you need to see designs, either on paper or otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you don't want the students to work in pairs/teams, you can still use a different form of teamwork. You can, for example, set up a rotating peer review system in which each student briefly confers with another on each student's work. Each can give advice to the other. I suggest that the advice be written, say on index cards, with both student's names listed as well as the questions/advice/etc. You can quickly review these cards and can give credit to both the one receiving the advice (for responding appropriately) and the one giving it (for being a good colleague). You can use this instead of conferring with the students/groups yourself on some or all days. Students can teach each other and will if you give them the opportunity and encourage good behavior. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-18T13:06:58.810" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4640" PostTypeId="1" CreationDate="2018-04-18T15:23:55.607" Score="3" ViewCount="1056" Body="&lt;p&gt;The official course description for AP Computer Science A, a high-school level course focusing on OOP using Java, details a 20-hour lab requirement. College Board provides three labs ready-made for teachers to use in class -- Magpie, Picture Lab, and Elevens -- but does not specify that these &lt;em&gt;have&lt;/em&gt; to be used to satisfy the requirement. &lt;a href=&quot;https://apcentral.collegeboard.org/courses/ap-computer-science-a/classroom-resources/lab-resource-page&quot; rel=&quot;nofollow noreferrer&quot;&gt;This page gives an overview of the labs along with student guides.&lt;/a&gt; Completing year one with these labs (and indeed AP CS A as a whole), I am reflecting on my experience with them, and I am now curious about what else is out there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.skylit.com/projects/TheLabs-ToUseOrNotToUse.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;This review from one publisher&lt;/a&gt; raises some serious questions about the inclusion of the three exemplar labs. In particular, their conclusion states the following:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In our opinion, one or two activities from Magpie and Picture Lab&#xA;  might fit into a typical AP CS A syllabus. Elevens is best left for a&#xA;  team project after the exam (unless the Development Committee decides&#xA;  to make it a new case study). Implementing the labs in their entirety&#xA;  in an AP CS A course would wreak havoc in the syllabus and may derail&#xA;  the course.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Have you found these labs insufficient and/or overly time-consuming in line with this particular review? If so, how did you address this in order to meet the lab requirement?&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="104" LastEditDate="2018-04-19T07:02:25.503" LastActivityDate="2018-04-24T14:58:01.903" Title="Lab Requirement in AP CS A" Tags="|labs|ap-computer-science-a|" AnswerCount="2" CommentCount="0" FavoriteCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4641" PostTypeId="2" ParentId="727" CreationDate="2018-04-18T15:37:59.210" Score="2" Body="&lt;p&gt;Please note that all P problems are in NP too, since they are easy to solve and therefore also easy to verify. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you are asking for an NP-complete problem. In that case I think the sudoku mentioned above is a good example if the student is familiar with that&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a different case, the &lt;a href=&quot;https://en.wikipedia.org/wiki/Subset_sum_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;subset sum&lt;/a&gt; problem is my second option.&lt;/p&gt;&#xA;" OwnerUserId="4927" LastActivityDate="2018-04-18T15:37:59.210" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4642" PostTypeId="2" ParentId="4640" CreationDate="2018-04-19T07:04:40.240" Score="0" Body="&lt;p&gt;Rather than attempt to judge the labs in question, I'll address how &lt;em&gt;you&lt;/em&gt; can evaluate the needs of &lt;em&gt;your&lt;/em&gt; students, and what labs they need to be given.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The labs from the College Board are, as you indicated, &lt;em&gt;suggestions&lt;/em&gt; rather than requirements. The implication is that if those labs are completed successfully the students will be prepared for related questions on the College Board's exams. The design of those labs, presumably, address the &lt;em&gt;minimum&lt;/em&gt; competencies a student needs to pass the College Board exams. They are most likely also designed around the &lt;em&gt;typical&lt;/em&gt; student enrolled in an AP CS A course at the high-school level. All well and good for the instructor with a class filled with these mythological &lt;em&gt;typical&lt;/em&gt; students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students are &lt;strong&gt;not&lt;/strong&gt; &lt;em&gt;typical&lt;/em&gt;. They are not average, and they are not &quot;in the norm.&quot; That's true for every instructor, so I'm not placing &lt;em&gt;your&lt;/em&gt; class above, or below, &lt;em&gt;typical&lt;/em&gt;; rather I'm saying that &lt;em&gt;typical&lt;/em&gt; is a statistical contrivance, not reality. In the process of designing your course, including the labs to use, you get to take advantage of what you know about your student body that the College Board does not know. You know what their prior course work has been focused on. You know what other fields of study have been presented, and at what level, before they are enrolled in the AP CS A course in your school. Things like first exposure to Java vs. continuation of Java work, prior basic algebra vs. plane geometry and trig., other languages learned, prerequisite courses in your system for the AP CS A course, etc. You also know what you, your school, your school district, and your state education system &lt;em&gt;expect&lt;/em&gt; to be presented, and what the stated &quot;objectives&quot; are for your class, and the program it is part of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What the established objectives are for your course, no matter at what level they have been &quot;established&quot;, determines what the course content is. The labs have to mesh well with the course as a whole if they are to have an effective impact on the students reaching the objectives. If your class is the third in a series of Java classes, a lab that explores looping structures will have very little value. Conversely, if it is their first exposure to Java, than a lab that implements a 3-dimensional graphics class will probably never be completed successfully. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have settled how the labs will mesh with the course content, and what level of competency you can anticipate from your students, you can evaluate, or design, labs that further the objectives of &lt;em&gt;your&lt;/em&gt; course.&#xA;Obviously, since it &lt;em&gt;is&lt;/em&gt; an AP CS A course, passing the College Board exam is included in the objectives. It can, however, be the final goal, or it can be the minimum requirement. If your objective is to prepare the students for advanced studies in CS you do not, and probably should not, limit your labs to mirror the minimum set by the sample labs. Instead you can build labs that allow the students to practice what they've been taught, even if it's beyond the College Board minimums, and expands their mental skills in a way the prepares them to learn new concepts after they've mastered what you offer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a difference between &quot;teaching the test&quot; and &quot;teaching the subject.&quot; An unfortunate trend has been growing where states, or the College Board, have established some set of &quot;minimum passing&quot; evaluations, or standardized tests for graduation. In order to assure that students get high marks on those tests, meaning better ranking for their school, and maybe better funding from the state, the instructors have started to teach what's on the test, and nothing more. That is a major disservice to the students, even if it does increase funding for the schools.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For evaluation of any lab assignment, College Board example, random Internet find, or custom built, there are three basic criteria to apply:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Does it require the students to fully utilize, and demonstrate,&#xA;what the course has covered thus far?&lt;/li&gt;&#xA;&lt;li&gt;Does it set the stage, and prepare the students for the the&#xA;concepts presented in the next segment of the course?&lt;/li&gt;&#xA;&lt;li&gt;Does it encourage practices, and mental skills, that will be beneficial to the students in the future - either in other CS courses or in everyday life?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Of course, after evaluating one lab, you can always evaluate other labs, and rather than answering the questions above in a binary, yes/no, fashion, you can answer them on a scale of effectiveness in meeting those criteria. If the labs presented by the College Board meet the needs of_your_ students, and the objectives of &lt;em&gt;your&lt;/em&gt; course, then they are a good choice, regardless of the reviews from publishers, who may have their own labs to sell, or even instructors in other schools, who may have other objectives, and surely have different student bodies to work with.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-04-19T07:04:40.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4643" PostTypeId="1" CreationDate="2018-04-19T09:21:11.910" Score="6" ViewCount="438" Body="&lt;p&gt;I wish to make a video like this one from &lt;a href=&quot;https://www.youtube.com/watch?v=h-HBipu_1P0&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;codeschool.com&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this video, the creator looks like he is using some screencasting software where he can write on his screen and talk over what he is doing while he is doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What tools are required to make such videos? In particular, are wacom tools suitable?&lt;/p&gt;&#xA;" OwnerUserId="4929" LastEditorUserId="1293" LastEditDate="2018-04-21T11:54:44.267" LastActivityDate="2018-04-23T05:48:31.977" Title="What screencasting tools can be used for online teaching" Tags="|lecture-tools|" AnswerCount="5" CommentCount="11" ContentLicense="CC BY-SA 3.0" />
  <row Id="4644" PostTypeId="2" ParentId="4643" CreationDate="2018-04-19T12:51:49.637" Score="5" Body="&lt;p&gt;Fingers crossed that this one doesn't get closed. I've tried to do something similar, but it hasn't come out well. Hoping that some others have suggestions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It looks like they're using some sort of overlay or whiteboarding software, and I assume a tablet or stylus. I can see a cursor where their pen is drawing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried this, and it didn't go well. But, I think that's more a factor of my handwriting than of the idea. Enough years of typing being my main method of written communication has made my handwriting terrible. And it's even worse on a Wacom tablet. Same thing with some student created videos. They're just hard to read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd like to find whiteboard software that also allows typing. Haven't found one yet, although I haven't looked all that much either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A couple things that have worked...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'm in a hurry, Powerpoint has enough animations built in that it's possible to do a fairly decent job. And, they can be exported to videos if you want to upload to YouTube.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've had more time I've used Flash. It's deprecated now, but I still have an old copy on my computer. Takes longer, but gives me a little more freedom in what I build. Also can be exported to a video, which is especially important since browsers are starting to frown on Flash. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just played around with the pro version of Acrobat and it looks like it has a pen and text tool that might work for what I'm trying to do. Most of the time I'm just trying to annotate what's already typed out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit 2 - After &quot;screen casting&quot; was added&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This year I started capturing my screen as we work through problems and then uploading to YouTube for kids that missed the day or just want to go back for a refresher. I'm using a program called &lt;a href=&quot;https://obsproject.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OBS&lt;/a&gt;. Works really well. A little Googling brought me to a Windows program called &lt;a href=&quot;https://docs.microsoft.com/en-us/sysinternals/downloads/zoomit&quot; rel=&quot;nofollow noreferrer&quot;&gt;ZoomIt&lt;/a&gt; that will let me write and type over the screen as I'm demoing. Think I might bring my Wacom tablet to class tomorrow and give it a try.  &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2018-04-19T19:09:55.037" LastActivityDate="2018-04-19T19:09:55.037" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4645" PostTypeId="2" ParentId="4640" CreationDate="2018-04-19T13:36:49.687" Score="3" Body="&lt;p&gt;I looked at them when they first came out and decided not to use them. Did go through and look at the topics and make sure that we're covering everything we need to in class. But between labs that I've written or purchased we've got a pretty good set of assignments that covered everything that the AP provided labs hit on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 3 AP labs also lean more towards projects instead of simple labs. I prefer to do a lot of small, single method labs. Especially early in the year. We do larger scale projects later, and they overlap a lot with what AP provides.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And not really part of your question, but I can't imagine only spending 20 hours on labs through the year. We probably hit that goal within the first month of the year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Following up on a comment asking about lab sources...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best labs are past AP exam FRQs. My goal every year is that by the AP exam we've done every past FRQ in class as a lab, quiz, or test. We start in September. Going back to 2004 there are 45 FRQs if you don't include the GridWorld ones. I generally assign them as in class assignments though since there are solutions posted everywhere online. If they're assigned to be worked on outside of class they'll be daily grades which have very little grading weight in our district.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another good, and cheap, source are programming packets from old contests. UIL, the organization that runs academic and athletic contests in Texas, sells past tests on their &lt;a href=&quot;https://store.uiltexas.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;website&lt;/a&gt;. You can buy a PDF with all the tests from a year for $4. There are 5 or 6 tests a year with 40 multiple choice questions and 12 programming problems in each test. Only downside is that they're not sorted, so you'll have to go back and figure out where they fit. And some are more data structures problems instead of AP-A. &lt;a href=&quot;http://acsl.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACSL&lt;/a&gt; also sells past contests on their site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And our district buys curriculum from &lt;a href=&quot;https://apluscompsci.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;A+ Computer Science&lt;/a&gt;. Best thing here is that it's a complete curriculum - labs, project, quizzes, tests, slides; everything. I use this mostly for the written tests because I hate writing multiple choice questions, but I also tweak some of the labs a little and use them. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2018-04-24T14:58:01.903" LastActivityDate="2018-04-24T14:58:01.903" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4646" PostTypeId="2" ParentId="4643" CreationDate="2018-04-19T14:55:21.877" Score="3" Body="&lt;p&gt;I don't think this is the software in question, but one product that can produce similar results is &lt;a href=&quot;https://explaineverything.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Explain Everything&lt;/a&gt;. I used it to create short grammar review videos back in my English teaching days, and they were very similar in style to this. That was back on a second generation iPad, so I can only imagine how much sharper results would be on, say, an iPad Pro. I was able to write, draw, include images, advance slides, and narrate all my activity on the screen, which could then be exported to YouTube, for example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would encourage you to explore &lt;a href=&quot;https://explaineverything.com/education/&quot; rel=&quot;nofollow noreferrer&quot;&gt;their education page&lt;/a&gt; and to read some of the &quot;success stories&quot; linked there about how it has been used in the classroom. Even if it's not identical to the video in question, I would bet it could serve your purposes well.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-04-19T14:55:21.877" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4647" PostTypeId="2" ParentId="4643" CreationDate="2018-04-19T15:22:00.883" Score="1" Body="&lt;p&gt;On the Macintosh, at least, the QuickTimePlayer, which is a standard application, has a function to capture the screen as a video, including sound. Having captured one or more videos, you can use any video editing software, which MacOS also provides, to create your lesson. The results can be distributed as you like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume that such solutions exist within other (windows, linux) ecosystems, possibly as standard distribution applications. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The results depend on the sophistication of the video editing software, of course. I assume, however, that if you want something polished, you will need to put significant effort in to it. Quick-and-dirty probably won't have much, if any, educational value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, beware of copyright law if you want to include things you don't clearly own, such as music. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-19T15:22:00.883" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4648" PostTypeId="2" ParentId="4643" CreationDate="2018-04-19T15:51:30.047" Score="1" Body="&lt;h3&gt;tl;dr: Value student work and universal communication over content.&lt;/h3&gt;&#xA;&lt;p&gt;I'm going to add a second answer to discuss a somewhat broader context. I was a pioneer in hybrid courses: partly online and partly face to face. One model was monthly face to face meetings of several hours with most work done remotely. The model assumed round-the-clock work (students lived in many time zones and had different work schedules) and so the possibility of anytime contact had to be maintained. All work in the course was team work with teams of 4-5 students in a class of about 20. The individual teams also found it difficult to meet face-to-face (FTF) other than during the lunch period of the monthly FTF meet up.&lt;/p&gt;&#xA;&lt;p&gt;During the FTF we (the two co-instructors) were careful to do only those things that required group interaction, so there was no lecturing. Educational games were important to us. You can teach software process through games, it turns out, producing a non-software product instead.&lt;/p&gt;&#xA;&lt;p&gt;Content of the course could be read by students from books and online material, some from the instructors and some otherwise. The core of the course was a large iterative project done by each team. Sometimes the teams worked on the same thing and sometimes they each worked on different aspects of the (software) project.&lt;/p&gt;&#xA;&lt;p&gt;The students were expected to do all of their work between FTF sessions, so communication was all important.&lt;/p&gt;&#xA;&lt;p&gt;The two main tools we used were a wiki, which any student or faculty member could edit, and a mailing list to which everyone was subscribed. The faculty could put up wiki pages (as could students) to point everyone to content, etc. The mailing list guaranteed that any question asked by anyone was seen by all as were all answers. It was a &amp;quot;full information&amp;quot; situation.&lt;/p&gt;&#xA;&lt;p&gt;Private messages to faculty were discouraged for anything other than personal issues such as grading.&lt;/p&gt;&#xA;&lt;p&gt;The individual teams sometimes used Skype for coordination and planning, but could also use the mailing list or wiki for that.&lt;/p&gt;&#xA;&lt;p&gt;While we didn't use it much, a chat-server can also be useful for real-time conversations. This can be advantageous over Skype in certain populations - our students were older so hearing may be an issue. One issue is that not all students may be available for a real-time conversation (here email works better), but if an entire conversation thread can be captured and then posted to either the wiki or to the mailing list the downside is minimized a bit. A chat server is more useful to a small working group as the numbers are smaller so it is more likely everyone can get involved and the conversation thread is less chaotic.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The underlying philosophy of the course was that the important things were student work and universal communication. Content was much less important than those two. Content is available everywhere on nearly everything. It isn't content that makes the course.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I found the same tools and philosophy useful in other hybrid courses that weren't quite as &lt;em&gt;intense&lt;/em&gt; as the one described above.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note that this answer was posted before a title change to the question narrowed the question. The original title asked for &amp;quot;tools for online teaching.&amp;quot; This answer was provided in that light.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-20T12:10:26.047" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4649" PostTypeId="2" ParentId="727" CreationDate="2018-04-19T18:31:20.827" Score="5" Body="&lt;p&gt;Start with the humor of &lt;a href=&quot;https://xkcd.com/287/&quot; rel=&quot;noreferrer&quot;&gt;xkcd&lt;/a&gt;:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/00Ciy.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/00Ciy.png&quot; alt=&quot;XKCD comic #287 on NP-complete problems&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used the above comic in a lecture on P vs. NP. The analogy I gave is eating at The Cheesecake Factory. Their &lt;a href=&quot;https://www.thecheesecakefactory.com/menu/&quot; rel=&quot;noreferrer&quot;&gt;menu&lt;/a&gt; boasts something like 250 dishes and 50 kinds of cheesecake. It's a tome to wade through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, imagine a scenario like this: You are given a $50 gift card to The Cheesecake Factory. You can order anything you want. Let's say for fun that you will limit your indulgence to 1500 calories. What is the most food you can order while staying under that limit? Good luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The struggle of ordering food at a restaurant with a menu like this while also obeying constraints of money and calories while maximizing enjoyment and possibly quantity gets at the essence of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Knapsack_problem&quot; rel=&quot;noreferrer&quot;&gt;knapsack problem&lt;/a&gt; (Can a value of at least V be achieved without exceeding the weight W?). While it's an analogy, I think it does help to illustrate the nature of the problem. (Tangent: my wife and I went here to eat shortly after this lecture, and I tried to explain that my taking so long to decide was due to the fact that it was an NP-complete problem.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think trying to schedule a meeting with a handful of people can also be a helpful analogy for the Boolean satisfiability problem. I found &lt;a href=&quot;http://sat.inesc-id.pt/~ines/sac10.pdf&quot; rel=&quot;noreferrer&quot;&gt;these lecture slides&lt;/a&gt; in my research on examples to use in class. Slide 3 provides a practical example where four people try to find a day on which they can meet. Imagine you have a committee of 10+ people with all sorts of constraints. This is absolutely a real-world example of something that is a) difficult for humans to unpack algorithmically beyond brute force and b) easy to verify once it works for everyone. As the first known NP-complete problem, it's a great place to begin this conversation.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-04-19T18:31:20.827" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4650" PostTypeId="2" ParentId="727" CreationDate="2018-04-19T18:47:35.637" Score="2" Body="&lt;p&gt;Complexity class &lt;code&gt;NP&lt;/code&gt;_ is described here: &lt;a href=&quot;https://en.wikipedia.org/wiki/NP_(complexity)&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/NP_(complexity)&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the easiest examples to explain is given there as: The decision problem version of the &lt;em&gt;integer factorization problem&lt;/em&gt;: given  integers n and k, is there a factor f with 1 &amp;lt; f &amp;lt; k and f dividing n?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is easy to explain as most students will understand factorization and will know, or can be convinced, that finding factors is a hard problem. It is also clear that a solution (factor), once found/guessed, is easily checked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Showing that it is in class NP is a harder slog, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-19T20:42:19.893" LastActivityDate="2018-04-19T20:42:19.893" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4651" PostTypeId="2" ParentId="4643" CreationDate="2018-04-21T07:16:39.070" Score="2" Body="&lt;p&gt;I am not a video pro,  but I do enough studio work to recognize the technique. I use parts of this technique every week in live webcasts, albeit with additional hardware to overlay the graphic on the camera feed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a whiteboard,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;draw your pictures. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Snap photos. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Edit and clean up the photos so the backgrounds are white&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;set up slides in PowerPoint. Use cuts to make things pop up,  wipes to give the appearance of writing&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In a live webcast or classroom, you simply display the presentation view and press the right arrow on every transition cue in the presentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;if the webcast is prerecorded, you record the audio separately and use premiere pro (or any half decent editing software)  to match the transitions to the audio. cut edits on screen shots are invisible. &lt;/p&gt;&#xA;" OwnerUserId="1537" LastEditorUserId="1537" LastEditDate="2018-04-21T07:37:58.433" LastActivityDate="2018-04-21T07:37:58.433" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4652" PostTypeId="2" ParentId="4594" CreationDate="2018-04-22T19:57:41.530" Score="1" Body="&lt;p&gt;Although this is a very late reply, I still wanted to add my answer. Previous answers are so informative and detailed in explaining why but i feel it is short on the how (in realistic terms). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I see in teaching: students look at good naming practice as us (instructors) telling to do yet another unnecessary thing just to make their life difficult with &quot;all this theoretical/principal stuff&quot;.. In most cases they will disregard it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My solution for this was simple: &quot;you should do this because it is good in this way and that&quot; alone is not enough. So, I point them to the coding-style rules for some major companies (many can be found online, Google is an example) and explain to them why the high-tech industry changed their 90s outsourcing model because of loses cased by bad code quality/maintenance (cost of support/fixes greatly exceeds cost of software).  From this point on, they sure listened and followed proper coding practice. &lt;/p&gt;&#xA;" OwnerUserId="3417" LastEditorUserId="3417" LastEditDate="2018-04-22T20:03:53.150" LastActivityDate="2018-04-22T20:03:53.150" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4654" PostTypeId="2" ParentId="727" CreationDate="2018-04-24T00:27:45.560" Score="5" Body="&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Subset_sum_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;subset sum problem&lt;/a&gt; is one that is easy to understand - &quot;given this set of numbers {provide a set of a dozen or so}, is there a subset of these numbers that sum up to 100?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the set &lt;code&gt;49, 55, 79, 67, 47, 12, 60, 84, 52, 44, 43, 47, 93, 68, 70, 96, 19, 22, 62, 79&lt;/code&gt;.  Theres only one solution for the sum to 100:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;12 19 22 47&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Determining this will take non-deterministic polynomial time. Trivially just guess the answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, determining the answer &quot;yes, this set sums to 100&quot; can be determined in linear time.&lt;/p&gt;&#xA;" OwnerUserId="4934" LastEditorUserId="1293" LastEditDate="2018-04-27T12:50:38.077" LastActivityDate="2018-04-27T12:50:38.077" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4655" PostTypeId="1" CreationDate="2018-04-26T11:08:18.750" Score="3" ViewCount="507" Body="&lt;p&gt;Current middle school/high school teachers in my state who want to obtain an additional license to teach computer science (notably AP CSP/CS A) must pass the &lt;a href=&quot;https://www.ets.org/s/praxis/pdf/5651.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Praxis computer science test&lt;/a&gt; (5651). I'm looking for study materials, particularly in two areas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Additional practice tests that are aligned with the content areas covered by the test. For example, one subarea is about CS pedagogy, and I would be interested in seeing more questions in that category.&lt;/li&gt;&#xA;&lt;li&gt;Resources that cover the coding/data structures component in pseudocode (what Praxis uses) rather than a specific language.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="830" LastEditorUserId="6109" LastEditDate="2018-11-24T16:25:27.627" LastActivityDate="2018-12-24T17:02:20.480" Title="Resources for the Praxis CS Test" Tags="|secondary-education|resource-information|praxis|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4656" PostTypeId="5" CreationDate="2018-04-26T11:09:04.583" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2018-04-26T11:09:04.583" LastActivityDate="2018-04-26T11:09:04.583" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4657" PostTypeId="4" CreationDate="2018-04-26T11:09:04.583" Score="0" Body="for questions which focus on the Praxis test for computer science" OwnerUserId="830" LastEditorUserId="830" LastEditDate="2018-04-27T02:42:41.023" LastActivityDate="2018-04-27T02:42:41.023" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4658" PostTypeId="1" CreationDate="2018-04-26T11:46:37.210" Score="23" ViewCount="5640" Body="&lt;p&gt;I'd like to introduce my students to Nodes and then require them to implement their own Linked Lists, Queues, and Stacks before showing them that their language (C#) provides implementations of these data structures. I suppose my motivation is that they will 1) understand better how these structures behave; 2) gain general language practice; and 3) appreciate libraries and be more motivated to search for an implementation before writing their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my motivation valid? What are other reasons to ask them to implement these data structures? Is there any reason NOT to ask them to do this? Would I be wasting my and their time?&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-05-13T13:36:56.313" Title="What are the advantages/disadvantages of teaching how to implement Nodes, Linked Lists, Stacks, and Queues before showing built-in implementations?" Tags="|data-structure|" AnswerCount="12" CommentCount="16" ContentLicense="CC BY-SA 3.0" />
  <row Id="4659" PostTypeId="2" ParentId="4658" CreationDate="2018-04-26T13:10:36.080" Score="13" Body="&lt;p&gt;In my experience, it is typical to have students make their own implementation first so that they understand what is going on &quot;under the hood,&quot; so that they can make better choices for which structure to use when they need to use a standard library.  It helps them to understand the complexity of an algorithm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen where the standard implementation is used first, and then students are asked to make their own version of it so that they can understand it better. I have never taught it that way, but I think that would work very well with motivated students who are interested in computer science in general.  But for many students that might demotivate them, as they will not want to implement something that already exists and that they might feel intimidated (Becuase their work will probably not be at the level of the library given time constraints that are sure to exist). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would recommend teaching it in that order, have them implement it first.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Some motivation for teaching it&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some drawbacks:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some students will know about the built-in versions and ask &quot;Why are we not using them?&quot;&lt;/li&gt;&#xA;&lt;li&gt;The implementations that the students provide are never at the quality of the built-in language implementation.  There are always going to be reasons why the built-in will outperform their algorithm.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here are some reasons to teach it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's a common question for interviews, software developers are often asked about it.  &lt;/li&gt;&#xA;&lt;li&gt;It's a common question on exams.  Either asking about the behaviors, trade-offs or actual implementation/complexity questions.&lt;/li&gt;&#xA;&lt;li&gt;It is a difficult task, but achievable task.  Students who achieve it will have the satisfaction of completing a non-trivial problem.&lt;/li&gt;&#xA;&lt;li&gt;Data structures are not the same in all languages, so it is very helpful to have implemented it yourself so that when you transition to another language, you will know what to expect. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="174" LastEditorUserId="174" LastEditDate="2018-04-26T13:17:24.980" LastActivityDate="2018-04-26T13:17:24.980" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4660" PostTypeId="2" ParentId="4658" CreationDate="2018-04-26T13:15:18.310" Score="28" Body="&lt;p&gt;&lt;em&gt;Note: Initially my answer was just about computational complexity, but then it grew a bit, so I broke it into multiple sections and tweaked each a bit. Thanks to commenters for pointing out the details to fix.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h3&gt;Understanding computational complexity&lt;/h3&gt;&#xA;&lt;p&gt;That may be covered by your &amp;quot;understand better how these structures behave&amp;quot;, but it important enough to deserve its own place.&lt;/p&gt;&#xA;&lt;p&gt;It is very hard to appreciate the computational complexity behind a library structure operations. You don't need or should care how things work under the hood, you should be happy with information that given operation is guaranteed to run in &amp;quot;O(log n)&amp;quot; or &amp;quot;O(container size)&amp;quot; or in &amp;quot;amortized linear time&amp;quot;. But to get a good grasp what all that O-speak means, you should actually write the code that iterates over a linked list or finds stuff in a BST.&lt;/p&gt;&#xA;&lt;p&gt;Once you have some well set expectations of how things work, you can move on and perhaps never write own containers again - but you will forever remember what happens under the hood when you call some random library method (or at least have a rough estimate, see &lt;em&gt;Certainty about behavior&lt;/em&gt;).&lt;/p&gt;&#xA;&lt;h3&gt;General knowledge about writing containers&lt;/h3&gt;&#xA;&lt;p&gt;(mostly inspired by Buffy's answer)&lt;/p&gt;&#xA;&lt;p&gt;If you ever happen to actually write a container (e.g. one missing in given language), you will not only benefit from specific knowledge about containers you wrote, but, more importantly, from general knowledge about writing containers. There are several reoccurring patterns about containers design, and knowing them from the &amp;quot;internal&amp;quot; perspective certainly helps.&lt;/p&gt;&#xA;&lt;h3&gt;Certainty about behavior&lt;/h3&gt;&#xA;&lt;p&gt;That one may be important for educational value. Only writing your own structure or algorithm gives you certainty that it behaves as you expect. Built-in structures may often contain extra optimizations and don't necessarily implement any &amp;quot;canonical&amp;quot; structures. They differ in details.&lt;/p&gt;&#xA;&lt;h3&gt;Avoiding over-complex library APIs&lt;/h3&gt;&#xA;&lt;p&gt;Library containers not only may behave in &amp;quot;non-canonical&amp;quot; way. Their APIs usually contain many additional functions that, while useful in production code, for learning are just unnecessary distraction. E.g. in C++ containers have multiple variants of every method just to allow optimized memory management, or some syntax shortcuts. C# is not very different.&lt;/p&gt;&#xA;&lt;h3&gt;De-mistyfying library code&lt;/h3&gt;&#xA;&lt;p&gt;Direct answer for question &amp;quot;why do we have to do this&amp;quot;: &lt;strong&gt;to see that there is no magic&lt;/strong&gt;. You can do all that things, using libraries is mostly just about saving time. Debugging your own components will likely help you appreciate that libraries are well tested and patched, but should also show that writing similar code isn't something unreachable.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-04-27T10:56:42.523" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4661" PostTypeId="2" ParentId="4658" CreationDate="2018-04-26T13:35:56.837" Score="31" Body="&lt;p&gt;There is one aspect not yet mentioned, though the first two answers are excellent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Libraries usually contain only the most common data structures and those that can be used in some generic way (pun intended, I guess). But there are other data structures that you may need in your work that aren't in the library you have available. The tools you need for building the standard data structures are likely the same (or a subset) as you need for the &lt;em&gt;bespoke&lt;/em&gt; data structures. Sometimes you want a specialized version of a data structure to be able to optimize an important algorithm. So being a &lt;em&gt;tool builder&lt;/em&gt; is an important skill that isn't exactly the same as that of being a &lt;em&gt;tool user&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-26T13:35:56.837" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4662" PostTypeId="2" ParentId="4655" CreationDate="2018-04-26T14:05:08.257" Score="1" Body="&lt;p&gt;This is not an answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see what you mean, looking at: &lt;a href=&quot;https://www.ets.org/s/praxis/pdf/5651.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ets.org/s/praxis/pdf/5651.pdf&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have an example: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;// precondition 1: A is an array&#xA;// precondition 2: The length of array A is n.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but then they have a for loop over the array that looks very c like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int j=1; j&amp;lt;= n-1; j = j + 1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then they assign &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int temp = A[j]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now if I assume this is C-like, I just skipped the first element, if I assume this is Pascal-like, then I have the first element.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this can be difficult to wrap your head around when you are in an exam situation.  It does seem that they are trying very hard not to trick you, using the comments and such.  But it would be pretty easy to ask, &quot;Does this function correctly caclulate...&quot; and then give you options of (A) Yes, (B) Errors and you really have to look around for how this thing is supposed to work in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also can say that it is a little bit annoying to have to wonder if they are going to use other strange nomenclature for other functions in the code, for example how do they do exponents? (x^2, or something else?), how about mod?  I'm sure there are more things to worry about.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="174" LastActivityDate="2018-04-26T14:05:08.257" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4663" PostTypeId="2" ParentId="4658" CreationDate="2018-04-26T14:14:27.080" Score="3" Body="&lt;p&gt;It find it extremely important to teach them the principles behind those (or similar) data structures first, and I'd go so far as to pick any one of the more complex ones as well (0/1-trees or even B-Trees etc.), just for fun (maybe skipping some details, if time is an issue). I'd also stress some &quot;outliers&quot; like ones that have O(1) in some of their operations; or at least one that is good not only for fast random access, but also for storage on slow media.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You did not tell us which kind of students you have (high school? University? CS or &quot;Programming&quot;? I'll assume CS at a beginner level.). But they will be able to find out how to use the API of their language of choice just by reading the reference documentation (or, alas, these days, more likely, some online &quot;tutorial&quot;, which leaves away all but the barest syntactical information). The reference documents will also tell them a little bit about when to use which, but not quite in a way that compares all of the (theoretically possible) structures side-to-side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's your job: show them what the world has to offer, and have them get a gut feeling for when to use which. There are several aspects: O-complexities of the operations (insert, delete, search, ...); space-usage aspects; aspects related to storage (i.e., is random access cheap or not?) and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find it very important that you are able to teach them on a board or paper; i.e., draw boxes, draw lines and so on, so they really get an intuitive feeling about all of this. After that, the actual implementation of most structures and operations should be a snap; and using pre-made libraries even more so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whatever you teach them in this way will stay valid and useful until the end of their lives. It gives a good foundation and reinforces structural thinking, branching out to the algorithms later working &lt;em&gt;on&lt;/em&gt; those data structures. It's the same reason why one would rather teach a handful of abstract sort algorithms instead of the Java SDK functions for sorting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, a solid knowledge about data structures is one of the few parts of my CS education (which is a few decades gone) that stays with me until today, and has almost everyday applications in both software development, analysis, design, architectural work etc.; and I have certainly, in the past, implemented complicated data structures without having to resolve to libraries (when there were none in the language at hand) with confidence, having a sound background about these topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see no disadvantage with teaching how to implement those structures, whatsoever.  I'd rather have someone teach only structures with not a single line of code; than a lot of code in a language or library which is likely obsolete in short time anyway, and no solid foundation for it. Have them find out how to use the API of their choice in their homework assignments; they should definitely be able to do that with any modern, well documented language (and if they &lt;em&gt;are&lt;/em&gt; very young, give them a few handy pointers, like the names of the relevant packages/modules in the library or something like that).&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2018-04-26T14:14:27.080" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4664" PostTypeId="2" ParentId="4658" CreationDate="2018-04-26T23:32:43.363" Score="4" Body="&lt;p&gt;Let me answer from the perspective of someone who recently completed a Data Structures and Algorithms course.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Background&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My Data Structure course was taught using java applets &lt;strong&gt;two years ago&lt;/strong&gt;. My design pattern course last year was the first class many of my peers were exposed to Git (or any version control for that matter), and SOLID design principles were multiple choice questions to answer, rather than industry paradigms which we would be expected to use going forward; in fact in my current courses applying these design patterns would be suicide due to the strict time requirements. In my 400-level Operating Systems course, our first assignment was fibonacci in C, and I can promise you your students are going to go on and have incompetent professors who fail to prepare them for the realities of software development.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;It is imperative that you teach these students how to use industry standards and built-ins side by side with theory i.e. IMO, design and implementation go hand in hand. I would argue that AnoE's assertion that &quot;they will be able to find out how to use the API of their language of choice just by reading the reference documentation&quot; makes a very dangerous assumption: that it is not your job to teach these students to be good programmers, rather just good computer scientists. Many students who enter into CS programs do so not aware that Computer Science =/= Software Engineering (although some design patterns and modern day paradigms are included in the curriculum). I will however agree with AnoE vehemently that knowing how these technologies work is infinitely more beneficial to them than the syntax of how to use them, but not teaching them how to use these constructs which are so widely used, which may very well cost you your time in grading and critiquing, is instrumental in producing quality programmers as far as I am concerned. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;tl;dr&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My personal advice? Have them write their own Linked Lists, Stacks and what-have-yous, then for part two of the assignment modify their existing codebase to use standard library built-ins, whilst adding some other functionality (threading, pipes, etc., what the assignment calls for). Alternatively, splitting these up into two different assignments works just as well, although may crunch for time.&lt;/p&gt;&#xA;" OwnerUserId="4951" LastActivityDate="2018-04-26T23:32:43.363" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4665" PostTypeId="2" ParentId="4658" CreationDate="2018-04-27T06:57:58.847" Score="4" Body="&lt;p&gt;I've seen too many students implementing linked lists, and then using linked lists of chars as buffers...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course at some point students have to understand how things work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But novice programmers have to learn to think first in terms of abstractions they need in their programs (Example: I have to add/remove/etc. names, so I need some representation of a &quot;set of names&quot;). And then choose a component in a library or implement it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At some point the students will ask you when and why they should use, say, an HashSet or a TreeSet (in Java), because they are implementing the same API. Or an ArrayList.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the time comes where you explain how things work: the extensible array for ArrayList, hashing and binary trees. And why they were designed that way, with complexity considerations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Warning about complexity: insist on the fact it is an &lt;em&gt;asymptotic&lt;/em&gt; property. You have to be more pragmatic for small values of n. An extensible array is probably by large the most effective implementation for a set of 0-5 strings. So first think about the amount of data your program will process, and how often.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-04-27T11:49:08.660" LastActivityDate="2018-04-27T11:49:08.660" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4666" PostTypeId="2" ParentId="4658" CreationDate="2018-04-27T07:56:12.070" Score="4" Body="&lt;p&gt;Assuming they will have a career in C#, you're right to assume that your students will likely never have to make their own queue or stack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, that's not the point of the lesson. The point of the lesson is to learn how to make a tool.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Think of it this way: &lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Every programmer starts off with a &quot;Hello World&quot; application. There is likely never going to be a time where they will professionally have to develop an application that outputs a hardcoded message. But that's not the point of the training exercise. The point of the exercise is to learn how to run a basic application.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You're using the example of stacks and queues as an exercise, because stacks and queues are relatively simple concepts that are easy to grasp.&lt;br&gt;&#xA;You're &lt;strong&gt;not&lt;/strong&gt; using the example of stack and queues as an exercise because the industry is relying on these students developing a solution to an ongoing problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me put you in the role of the students, and teach you something about my company:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;We have managers, developers, accountants, reception staff and janitorial staff.&lt;/li&gt;&#xA;  &lt;li&gt;The managers are paid a salary.&lt;/li&gt;&#xA;  &lt;li&gt;The developers are paid a salary.&lt;/li&gt;&#xA;  &lt;li&gt;The reception staff are paid a salary.&lt;/li&gt;&#xA;  &lt;li&gt;[censored]&lt;/li&gt;&#xA;  &lt;li&gt;[censored]&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Without me explicitly telling you so, you're likely already assuming that the [censored] parts were supposed to tell you that the accountants and the janitorial staff are paid a salary. You expect this, because &lt;strong&gt;you extrapolated a global idea from a collection of examples&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is what you're trying to get your students to do. You're showing them examples of understanding a problem, accurately defining it, and working towards a solution.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given enough examples, your studens will learn to distill a generalized approach. With this approach, they will be able to create tools (that do not yet exist!) on their own, without relying on what has already been created.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Somewhat offtopic, you can actually see this principle at play for a lot of cliché action movies. The hero at one point loses access to [advanced thing] and is forced to use [basic thing]. In the end, he masters [basic thing] to a degree where he can outclass those who use [advanced thing] but don't know anyting about [basic thing].  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Karate Kid is one such example that argues the importance of mastering the seemingly unnecessary and outdated basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is essentially what you're teaching your students. While they may be equivalent to their colleagues who use the existing .NET framework; they will leave their colleagues in the dust once they reach uncharted territory and have to create their own data structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Funnily enough, I had written the above Karate Kid example before looking up if it was defined as a trope. &lt;a href=&quot;http://tvtropes.org/pmwiki/pmwiki.php/Main/WaxOnWaxOff&quot; rel=&quot;nofollow noreferrer&quot;&gt;It is, and it's called &quot;Wax On, Wax Off&quot; in reference to the Karate Kid.&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;An odd form of training passed off by an unorthodox master on a skeptical student. Sometimes comes disguised as a set of chores, but just as often is a general exercise that promotes a valuable physical or mental attribute in a strange way. &lt;strong&gt;Always dismissed as a waste of time early on, but appreciated later&lt;/strong&gt;. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2018-04-27T08:05:07.413" LastActivityDate="2018-04-27T08:05:07.413" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4667" PostTypeId="1" CreationDate="2018-04-27T16:54:57.567" Score="4" ViewCount="196" Body="&lt;p&gt;The question is simple and direct here: &lt;strong&gt;what objective criteria are helpful* in admitting students to AP CS courses?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(By &quot;helpful,&quot; I mean criteria that have some worth as indicator of future success in the course.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some context might help. Where I teach, there is no computer science pre-requisite to AP CS Principles, and when there was only AP CS A, there was not for that either. For most of my students, their first CS class is indeed an AP-level course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Absent of this background, it is hard to predict what &lt;em&gt;objective&lt;/em&gt; factors (I stress &quot;objective&quot; here for a reason) will help indicate how a student might perform at the AP level in CS. This is also crucial because all AP courses I've ever taken or taught have required applications due to both the rigorous nature of the course and the need to whittle down an applicant pool that is larger than the number of available spots in the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have a couple theories of my own based on a few years of admitting students using several factors, but I will wait to self-answer until others share their practices.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good answers need to include not only what the criteria used is, but also evidence - either in research or local practice - that supports the correlation between the chosen criteria and the eventual success, or lack thereof, of the students in AP CS courses (or, at a minimum reasonably advanced high school level CS courses).&lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2018-04-27T17:13:13.850" LastActivityDate="2018-04-28T20:54:17.120" Title="Criteria for admission to AP CS courses in high school" Tags="|ap-computer-science-a|ap-cs-principles|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4668" PostTypeId="2" ParentId="4658" CreationDate="2018-04-27T20:17:46.423" Score="0" Body="&lt;p&gt;Data structures should absolutely be taught this way and it should be one of the earlier programming classes a student takes.  The reasons are that the problems are isolated and therefore easily designed, it introduces you to the subtle complexities that can be hidden by pre-made implementations, and they are fairly fun to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One interview question we ask for java positions is currently &quot;Why would you use a linked list over an ArrayList&quot;  You would be truly amazed how many applicants can't answer this most basic of all data structure questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forcing them to make their own data structures then uses them throughout the rest of the year can be the first time they start thinking about &quot;real&quot; software and how it is developed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching data structures with code is just too good an opportunity to pass up.&lt;/p&gt;&#xA;" OwnerUserId="1399" LastActivityDate="2018-04-27T20:17:46.423" CommentCount="9" ContentLicense="CC BY-SA 3.0" />
  <row Id="4669" PostTypeId="2" ParentId="4667" CreationDate="2018-04-28T02:30:07.167" Score="3" Body="&lt;p&gt;I don't have criteria with evidence that are indicators of success, but I have some I use that can indicate the lack thereof.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my school, although we are not allowed to specify prerequisites for our courses, the other programming teacher and I &quot;vet&quot; prospective programming students using data from students' literacy and math history (the two of us combined teach VB.NET, C#, SAS, and AP CS A).  The literacy and math scores come from the prior year's end-of-course tests.  This data is made available in an interface provided by, I believe, Pearson Education.  For each student we can see something like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/osFKg.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/osFKg.jpg&quot; alt=&quot;Student Data&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where the colors/shapes mean the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/4qKqt.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4qKqt.jpg&quot; alt=&quot;Key&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have found that Red or Yellow in math and/or Red in literacy are accurate predictors of a student who will struggle in programming.  Just looking at the data from last semester, when I taught programming I (VB.NET), the only C's and D's I had in the course were the students who had Red or Yellow math scores or Red literacy scores.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every semester when we go through our rosters (we are doing it right now for next fall), if we encounter a student who has signed up for a programming course who does not have a strong math or literacy foundation, we first approach their counselor, show them our prior semesters' data, and talk to them about the student's chances of success.  The counselor will then talk to the student, and maybe the parents.  Sometimes the student will choose to take something other than programming.  Sometimes the student will want to take programming anyway, and that is fine.  We just want the student (and parent(s)) to be aware that, if they want to be successful in programming, considering their history, they may have to work extra hard or get extra help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this process we go through may smack of &quot;profiling&quot;, our goal is to help every student be as successful as they can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that the converse, a student who has all &quot;Green&quot; data, is not necessarily an indicator that they won't struggle.  There are, obviously, other factors, many not quantifiable until you get to know the student:  motivation, maturity, perserverence, and hard work.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-04-28T02:30:07.167" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4670" PostTypeId="1" CreationDate="2018-04-28T12:53:52.680" Score="3" ViewCount="148" Body="&lt;p&gt;I have been teaching Operating Systems basics in a class and after Processes, Child Processes and Threads, we have managed to move to &quot;Process Scheduling&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, ironically, as we know that it is not the Process which is scheduled, but the threads precisely (we are following Linux Ubuntu there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is what &lt;em&gt;Silberchatz&lt;/em&gt; book (&lt;em&gt;by the way, the title of the chapter is also &quot;Process Scheduling&quot;&lt;/em&gt;) says about it:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In Chapter 4, we introduced threads to the process model. On operating&#xA;  systems that support them., it is kernel-level threads-not processes-that are&#xA;  in fact being scheduled by the operating system. However, the terms process&#xA;  scheduling and thread scheduling are often used interchangeably.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;(Silberschatz, Operating System Concepts, 8th Edition)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although, I have taught them the respective algorithms; should I bring this discussion within the class and press the panic button by telling that its not the Processes which are scheduled but Threads? This question has been in my mind since long time and I couldn't look for a better place to get an answer than here.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2018-05-18T13:11:02.130" Title="Process Scheduling is not &quot;Process&quot; Scheduling - Should I disclose it to students?" Tags="|curriculum-design|best-practice|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4671" PostTypeId="2" ParentId="4658" CreationDate="2018-04-28T13:24:12.760" Score="1" Body="&lt;p&gt;Kate Gregory makes a very strong case that the first introduction to C++ should resolutely avoid such things at the start, and instead use standard containers as if they were built in to the language. I completely agree. Her talk, linked below is a &lt;em&gt;must see.&lt;/em&gt; Peruse the [C++] tagged questions on StackOverflow, and you will find that most of the beginner questions involve operator &lt;code&gt;new&lt;/code&gt;, raw C-style arrays[], and pointers.  Teaching students to roll-their-own is teaching them habits that they will need to unlearn. There are plenty of challenging problems to assign that were not solved in the 1960's. Rather than requiring students to implement standard containers and algorithms (badly), show them (when it's time) how the standard features work, and teach how the inner workings affect big-O performance and cache locality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even the graduates often do not know how to write production code. Everything they do is an orgy of wheel-reinvention. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think I have used &lt;code&gt;new&lt;/code&gt; since 1997, unless it was immediately wrapped in a unique_ptr or shared_ptr.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://youtu.be/YnWhqhNdYyk&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/YnWhqhNdYyk&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3948" LastEditorUserId="3948" LastEditDate="2018-04-28T14:20:15.497" LastActivityDate="2018-04-28T14:20:15.497" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4672" PostTypeId="2" ParentId="4670" CreationDate="2018-04-28T17:29:08.563" Score="3" Body="&lt;p&gt;Perhaps I'm just naive, but I don't see a dilemma here. Yes, teach them the current state of the art if that is appropriate in your course. Teach them some important historical precedents at some appropriate level of detail. In this case you shouldn't be teaching one edition of a book or one version of a particular OS. If the students are to have a future in the field they will still be working in 30-40 or more years. What they need is the background and skill to keep up with technological changes as they occur. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You already say that you teach them the various scheduling algorithms for associating a software element with hardware. That is more essential than the specific granularity of the elements on either side of the equation. Even the standards of what constitutes &lt;em&gt;efficiency&lt;/em&gt; may change over time. &lt;em&gt;Teach them the principles&lt;/em&gt;, for which some blend of the old and the new is likely required. This will serve them well in matters other than Operating Systems proper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also look at a more recent edition of your text and at other books. This will help you get a handle on what the authors currently consider to be important. Tannenbaum, for example, would be a good supplement to Silberschatz et al. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-28T17:29:08.563" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4673" PostTypeId="2" ParentId="4667" CreationDate="2018-04-28T20:54:17.120" Score="3" Body="&lt;p&gt;This won't make a direct suggestion about criteria, but I think is an important note to guide your &quot;admission&quot; process. I doubt that you will find much reputable repeatable research to guide you, so a suggestion like this one (&lt;a href=&quot;https://cseducators.stackexchange.com/a/4669/1293&quot;&gt;Java Jive&lt;/a&gt;) combined, perhaps with an aptitude test or an application for admission with an essay (What do I hope to gain from this course?) might whittle down the numbers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the most important criteria I can offer is not to rely completely on your criteria. If you think in your mind that X and Y and Z should be enough to admit a student, then also include at least a few students who don't meet those criteria. What you are doing here is testing your own assumptions that you can then refine in the future if you wind up in a similar situation in the future. Whatever criteria you use are probably wrong in some ways, so make the edges of the selection process &lt;em&gt;fuzzy&lt;/em&gt; in several ways. That is why an essay is helpful as you can use intuition on the few cases you need to fill out the class after you have a core of students you think are pretty solid. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This idea actually comes from Ed Dubinsky, a marvelous educator (and human being) who once ran a program that used just such a mechanism. You can probably let the &quot;specials&quot; account for up to about 10% of the class. But keep records also, so that you can evaluate your own process in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if the parents of your students are likely to sue you if you reject jonny/suzy, then you have to be able to justify your choices and should not give &lt;em&gt;solid&lt;/em&gt; criteria that you don't follow. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-04-28T20:54:17.120" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4674" PostTypeId="2" ParentId="4658" CreationDate="2018-04-28T22:08:45.980" Score="0" Body="&lt;p&gt;There already are some excellent answers, covering most of the points that I'd also consider as arguments for teaching these basics at the beginning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, one has to be careful: Depending on the level of the course and the familiarity of the students with programming in general, it could be important to emphasize the &lt;em&gt;actual&lt;/em&gt; goals of these tasks, and not accidentally teach them to &quot;reinvent the wheel&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some things that I'd like to point out:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software development requires some level of understanding of the foundations that software is built upon. I won't dare to postulate what the &quot;right&quot; level of abstraction could be here. Whether it's electrical engineering, gates and circuits, machine instructions or language constructs. But considering that the building blocks of software (in terms of libraries) become increasingly larger, I think that one should &lt;em&gt;at least&lt;/em&gt; have an idea about what the most basic libraries do internally, in terms of the language constructs. The reason for that is simple: That's the level at which software development takes place!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others have already framed this differently, e.g. by saying that people will occasionally have to craft their own collection/container classes. But I think that it is important to point out that the techniques for developing these basic classes are essentially the same as the techniques that will be used for creating higher-level classes, where the existing container/collection classes serve as building blocks. So you're killing two birds with one stone: Showing them how to develop &quot;proper&quot; classes, &lt;em&gt;and&lt;/em&gt; how the classes that they will use work internally.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Another nice aspect of container classes is one that I particularly liked in some of my computer science courses: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Container classes very closely resemble algebraic data types&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could teach your students how to write yet-another-product-and-customer-management system, or once more model the &lt;code&gt;Lobster extends Animal&lt;/code&gt;-hierarchy that has been reiterated ad nauseam. But when you teach them how to implement a &lt;code&gt;Stack&lt;/code&gt;, you can put emphasis on the importance of the clarity of the &lt;em&gt;interface&lt;/em&gt; of a class, also in terms of behavior and testability. For example, a rigorously formal definition of a stack can consist of &lt;code&gt;push&lt;/code&gt;, &lt;code&gt;pop&lt;/code&gt;, &lt;code&gt;isEmpty&lt;/code&gt; and &lt;code&gt;top&lt;/code&gt; methods. You can argue about why this set of methods that is sufficient to operate properly. And the methods have clearly defined relationships and semantics, and therefore simple (yet exhaustive) unit tests.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But of course, whether or not this is relevant for you may also depend on how formal you want your course to be.&lt;/p&gt;&#xA;" OwnerUserId="2393" LastEditorUserId="2393" LastEditDate="2018-05-13T13:36:56.313" LastActivityDate="2018-05-13T13:36:56.313" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4675" PostTypeId="2" ParentId="4513" CreationDate="2018-04-29T15:13:05.593" Score="3" Body="&lt;p&gt;Ultimately, it comes down to what you prioritize in your course and how you want your students to prove that they have learned the materials. What is critical though is if you use a course management/grade management system is that the syllabus AND the calculations in the LMS/CMS/GMS are in agreement with each other so that if a student does look at their grades it is calculated properly and accurately.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My full time job is administering our college's online course delivery system (Canvas) and training instructors on how to use it.  I also teach a few classes as an adjunct, and while they are face to face I use the LMS heavily (gotta eat your own dog food).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In courses where showing applied knowledge and skill and ability is important - like my &quot;Services with Linux&quot; class - I use percentage based grading.  This allows me to give 100 point exams, but since they are almost entirely based on readings and background information regarding the services, I can make them worth a relatively minimal part of the final grade (10%).  I think it is more important for me to help produce a sysadmin who can actually configure a DNS server, a DCHP server, a Samba server, set up a LAMP server, or configure an email server and diagnose issues by reading headers, etc.  In this course, I use percentage based grading - 10% exams, 15% discussions (relating to what and how to backup, security, pros and cons of various config options, etc), 25% projects (full documentation of local services setup, full documentation of internet services setup), and the other 50% in labs (all involving getting the various services configured, developing backup methods, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For an &quot;Intro to SQL&quot; course I teach, I use a points based system.  Mostly because I'm just an adjunct teaching with the course content provided by a lead instructor, but also because it makes sense.  Doing the readings, understanding the different data types, understanding the differences between join types, etc. are equally important as being able to write the SQL syntax.  Coincidentally there are 8 labs/projects with 10 questions/sql statements to generate at 5pts each, and there are 4 exams (each covering 2 labs/projects) worth 100 points each, so 400 and 400 respectively, and so it works out nicely that way.  Of course, the same can be done with a percentage based system just as easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as the students go, I've seen a surprising number of them who never even check their grades in the LMS.  And the rest of them just don't seem to be bothered between the differences of points vs. percentages.  I've even had students in both classes in the same term and they either didn't notice the difference or seem to care.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One last thing - do not go crazy with conditional logic in your grade calculation - although this seems to mostly come from our Social and Behavioral Sciences department.  &quot;Well, if students score above 80 on exam 1 and submit paper 3 at least 2 days before the deadline then they can do either this bonus assignment or take an extra 10 points on exam 2 but only if they take the exam on a Thursday or on Monday before 10am.&quot;  &lt;/p&gt;&#xA;" OwnerUserId="662" LastActivityDate="2018-04-29T15:13:05.593" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4676" PostTypeId="2" ParentId="4658" CreationDate="2018-04-30T10:38:53.807" Score="3" Body="&lt;p&gt;Understanding the structures is indeed important. They will often use a library, but should then have a good idea of what the library does. The only argument I see against coding basic structures in programming exercises, is if the time could be better spent doing something else. But my experience is that students starting at &quot;too high a level&quot;, tend to make mistakes based on not understanding the containers well. Such as repeatedly sorting a container in order to extract the minimum element,  getting slow programs due to the complexity. Such inefficient code is easier to write than the simple iteration loop that find the minimum. Or even proving that the container stays sorted and won't need re-sorting the way they use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, some are going to maintain the libraries, and some will have to re-implement libraries for the next decade's fancy new language. Understanding the basics is therefore not a waste of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, it sometimes possible to do better than a library. I let my students implement their own hashtable, about half of them out-perform Java's HashMap in a simple timing test. It takes the magic out of libraries, and gives some confidence. And it exposes a tradeoff: libraries generally saves development time, but sometimes you need the speed of handcrafted code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Writing your own code may allow special optimizations. A (long) doubly linked list can be inserted into another in O(1) time. A library container backed by doubly linked lists may be able to do that; but when you make your own, you may decide exactly were one list is inserted into the other. This might save a sorting step later, or optimize for future searches.&lt;/p&gt;&#xA;" OwnerUserId="4971" LastActivityDate="2018-04-30T10:38:53.807" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4677" PostTypeId="1" CreationDate="2018-04-30T12:25:02.210" Score="26" ViewCount="5339" Body="&lt;p&gt;I typically have the same students two semesters in a row, for programming I (VB.NET) and programming II (C#). In our early, impressionable time together, I stress to these students (high-schoolers) and show them by example (I write lots of code for them) the importance of writing clear, readable code, which is partly achieved by explicitly specifying types for all variables (at first I do not tell them there are other options)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, at some point, I have to reveal to my students that they can, indeed, declare a variable as an &lt;strong&gt;Object&lt;/strong&gt; (i.e. &lt;code&gt;Object x = new Horse(&quot;Silver&quot;);&lt;/code&gt;) and that it can hold anything; or, that they can declare a variable as &lt;strong&gt;var&lt;/strong&gt; (i.e. &lt;code&gt;var y = &quot;foo&quot;;&lt;/code&gt;) and that the compiler will figure out what type it is. Some of them discover this on their own, of course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I inevitably have students who abandon the good habits they had formed and want to make everything an Object, or declare everything as var (note I realize this is not equivalent in the language, but students tend to abuse the usage in the same way). I am always torn about how insistent to be that they revert, because I know the use of var in C# is controversial in the industry. (See the SO discussion &lt;a href=&quot;https://stackoverflow.com/questions/41479/use-of-var-keyword-in-c-sharp&quot;&gt;use of var in C#&lt;/a&gt; for an example). Plus, the more savvy students are hanging out in SO anyway, and they see some questions and answers that lack explicit typing and other good programming habits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, since these students are still learning, and since it is my classroom after all, should I emphatically require that they always explicitly specify types unless absolutely necessary? (Of course, sometimes it is justifiable, preferred, and necessary NOT to). And, if I do require it, how can I explain the (in my opinion) sloppiness they sometimes see in online communities?&lt;/p&gt;&#xA;" OwnerUserId="4338" LastEditorUserId="4338" LastEditDate="2018-05-01T12:00:03.670" LastActivityDate="2018-08-30T17:55:40.953" Title="Once implicit/inferred typing is introduced, how can I impress upon students the importance of not abusing it?" Tags="|data-types|" AnswerCount="9" CommentCount="17" ContentLicense="CC BY-SA 3.0" />
  <row Id="4678" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T13:26:32.267" Score="5" Body="&lt;p&gt;There are a number of issues to be addressed from clarity of the written code to efficiency of the compiled code. For beginners, I think the clarity issue is more important so I'll address that first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before I begin, though, I'll also note that the inferred typing of variables in C# is still static (compile time), strong (types don't change) typing. That hasn't changed. Inferred typing is just a syntactic hack (syntactic sugar) that appear to make the programmer's job easier. However, that is only true when you are writing the program the first time, not when you are updating/modifying/maintaining the program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note also, that programming languages are for people, not for computers. Compilers take the human-understandable code that we write and transform it into something that a machine can utilize. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifying the type of a variable in a declaration, while not always required introduces a kind of &lt;em&gt;good&lt;/em&gt; redundancy. Much redundancy in programming is bad (repeating a sequence of statements) but redundancy in typing is good since it makes the &lt;em&gt;intent&lt;/em&gt; of the programmer clearer and also, in some situations finds errors in a program at compile time that could otherwise only become noticeable at run-time. This lets the programmer fix issues earlier in the development process, which, research shows, reduces cost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of the phases of program development as follows: conceptualization, analysis, design, coding, testing, deployment, maintenance (maybe not a universally agreed list, I realize). Research shows an order of magnitude increase in the cost of correction for each phase transition. If you catch the error in the conceptualization phase it costs nearly nothing to fix. (Sorry, I don't have a reference to the research - it is quite old). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you say that a variable is int and later (or immediately) assign it an int value the compiler can check correctness. But you the program reader are also assured that your intent (x is an int) is faithfully represented in the code. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var x = 5;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;reduces the redundancy. Note also that 5 is a valid value of the following C# types: byte, sbyte, int, uint, long, ulong, short, and ushort. What is your intention here. The declaration above doesn't say. The compiler will choose something it &quot;thinks&quot; is appropriate. By saying less about your &lt;em&gt;intent&lt;/em&gt; you give less information to the compiler, which may then provide a less-than-optimal translation of your code. So this sort of redundancy is a good thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When used with objects (or otherwise polymorphic types) there is an additional consideration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you say&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;var x = new Horse(&quot;Trigger&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;then the compiler has little recourse than to give x the most specific possible type. It might, in fact be preferable to give x a more general type, such as an interface type used to create the Horse class. It is generally good programming practice to give variables interface (as opposed to class) types, though this requires other rules about how interfaces are used - a separate discussion. But, in some contexts&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Animal x = new Horse(&quot;Trigger&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;might be preferable and it also better clarifies your &lt;em&gt;intent&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;None of the above uses of &lt;em&gt;var&lt;/em&gt; is necessarily a mind-killer, but an alternative use of what I want to call &lt;em&gt;sloppy typing&lt;/em&gt; is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose you declare a new object reference as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Object x = new Horse(&quot;Trigger&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now you have likely introduced a mess into your program. Later on, you will probably want to say&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int howMany = x.count();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(We know, horses like Trigger can count, of course). The compiler will complain about this, of course since x is only known as an Object reference, not a Horse reference. The sloppy typer will then &lt;em&gt;cast&lt;/em&gt; x to quiet the complaints of the compiler:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int howMany = ((Horse)x).count();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is, of course ugly. We need to assure the compiler that x is, indeed, a Horse so that the &lt;em&gt;count&lt;/em&gt; method is available. However, this cast introduces a check into the runtime code, which is both inefficient &lt;em&gt;and&lt;/em&gt; can be wrong. What if somewhere else prior to this x was reassigned to an Aardvark object. Then whether or not Aardvarks can count or not, the run-time type check will flag an error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This sloppy typing combined with casting is an attempt to replace the normal static type checking with dynamic type checking (as is done in, say Python). But that is misuse of the language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, it introduces a maintenance nightmare into your program. You declare a variable in your program to have a given type, but in use it has a different (more specific) type. The compiler isn't going to remember those actual types for you, so you have to do this yourself. You can't look back to the declaration of x to find out what sort of thing it represents, you have to keep the details of the dynamic system in mind for every use of the variable. In a program of any size this is obviously infeasible. It is why we have types (and also polymorphism) in the first place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, this sort of casting (down casting) is a recognized &lt;a href=&quot;https://en.wikipedia.org/wiki/Code_smell&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Code Smell&lt;/em&gt;&lt;/a&gt;, indicating poor design. Every explicit cast in a program is a potential point of error. Just Say No. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For completeness, let me give a few rules here that will lead to better design and better code. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When you declare a variable give it an interface type (rather than a class type) - a good but not essential rule. Interfaces define &lt;em&gt;concepts&lt;/em&gt;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you implement that interface the only public methods of the class should be those defined in the interface. You won't need to cast. - an essential rule.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you extend a class (create a subclass) the only public methods in the subclass should be those declared in the superclass. Essential. If you need more methods then you have a different concept than the superclass, so extend the interface of the original class to define the new concept and then have the subclass also implement the new interface. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you declare a variable to have some (object) type, don't try to send messages defined only in some subtype, requiring casting. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The above rules are intended to make your programs easier to understand, hence easier to update and maintain. When tempted to break the rules, spend a bit of time asking why, and looking to see if you can come up with a better design. Breaking the rules tends to make your overall program into a &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_ball_of_mud&quot; rel=&quot;nofollow noreferrer&quot;&gt;Big Ball of Mud&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of the above has focused, primarily, on clarity of the code for the programmer's benefit. But efficiency is also a consideration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more you can inform the compiler of your intent, the better job it can do in its translation. Some languages optimize for expressing intent rather than process, in fact. Database languages and Logic languages do this explicitly. If you tell a compiler &lt;em&gt;how&lt;/em&gt; to do something it will be constrained to follow your directions. But if you tell it what you want, rather than how to achieve it, it has more options and can do better optimizations. So, explicit typing in programs is also a way to communicate intent (what) to the compiler rather than forcing later checks (casts). So, maybe x in our first example really only needs to be a short, or even a byte. But the declaration using &lt;em&gt;var&lt;/em&gt; probably won't achieve that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also realize that &quot;abstract&quot; names like &lt;code&gt;x&lt;/code&gt; are a poor choice. I only use it here as I don't have a context in which to provide an &lt;em&gt;intention revealing name&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;History note:&#xA;Implicit typing is probably an incorrect term for this. FORTRAN had implicit typing where the type of a variable depends on the spelling of the name. Names beginning with I through N were implicitly Integer unless a specific declaration implied otherwise. Other names indicated Real variables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, Standard ML and related languages have a subsystem in the compiler that could infer types (type inference). ML has strong static typing also, but programmers seldom need to specify a type since the compiler can ordinarily figure it out. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But use of &lt;em&gt;var&lt;/em&gt; isn't dynamic typing either. In dynamic typing (Python, Ruby), variables (names) don't have type. Only values have type. Dynamic typing can still be strong typing, but it is done at run-time, not compile-time. Errors are found later unless they are rigorously rooted out through testing during development. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Final Note:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The biological classification of Carl Linnaeus is probably a poor analogy to use for subclassing and polymorphism. Each entry in the classification tree is a different concept and all are abstract. There is no such thing as a pure Mammal. Moreover, classes define behavior of objects (via public methods) and the Linnaeus classification system is &lt;em&gt;nothing&lt;/em&gt; about behavior. Trying to use it to generate examples of subclassing is one of the reasons students get terrible ideas about what &lt;em&gt;should&lt;/em&gt; be done in a subclass. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-04-30T13:55:18.857" LastActivityDate="2018-04-30T13:55:18.857" CommentCount="6" ContentLicense="CC BY-SA 3.0" />
  <row Id="4679" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T13:47:47.687" Score="8" Body="&lt;p&gt;Introducing these sorts of shortcuts can cause exactly the problem that you've outlined.  &lt;em&gt;&quot;Oh, goody!&quot;&lt;/em&gt; says the misguided student, &lt;em&gt;&quot;Now I can stop worrying about the type!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few principles that I directly teach, and repeat extensively in my instruction:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There are two audiences for code, machines and people.  We need to create code that is good for both.&lt;/li&gt;&#xA;&lt;li&gt;Compiler errors are better than runtime errors.  (This is hard for kids to understand at first, but I return to this idea repeatedly until it is thoroughly drilled into their heads.)&lt;/li&gt;&#xA;&lt;li&gt;All code must be written with the Four &lt;code&gt;C&lt;/code&gt;'s in mind: &lt;code&gt;Clarity&lt;/code&gt;, &lt;code&gt;Clarity&lt;/code&gt;, &lt;code&gt;Clarity&lt;/code&gt;, and &lt;code&gt;Clarity&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It has never particularly occurred to me to illustrate that every variable could be declared an Object instead of with a more specific subtype, but the following terrible code could illustrate the dangers of doing this.  (This is in Java, but could just as readily be created in C#):&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;/* Pre-condition: Object[] passed in is length &amp;gt;= 1&#xA; * arrange puts an Object into o[0];&#xA; */&#xA;public void arrange(Object[] o){&#xA;    int rand = (int) (Math.random()*4);&#xA;    if (rand == 0)&#xA;        o[0] = &quot;This is a String!&quot;;&#xA;    else if (rand == 1)&#xA;        o[0] = new Integer(37);&#xA;    else if (rand == 2)&#xA;        o[0] = new Double(3.1415926);&#xA;    else {&#xA;        o[0] = new Object[1];&#xA;        arrange((Object[]) o[0]);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Of course, code like this should make us want to puke just a little bit into our mouths.  &lt;em&gt;We'd ideally want the compiler to stop us.&lt;/em&gt;  and that's the key point: declaring variables as &lt;code&gt;Object&lt;/code&gt; removes our beautiful compile-time protections, and leaves both the coder and other human readers adrift.  Sure, it's an &lt;code&gt;Object&lt;/code&gt;, but what in the world &lt;em&gt;is&lt;/em&gt; it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, with &lt;code&gt;var&lt;/code&gt;, you can borrow some examples from the very page you linked to illustrate why &lt;code&gt;var&lt;/code&gt; can be a bad idea.  I also might not introduce the concept until you have introduced Generics, as that is one of the first times that it can actually make things easier.  This would allow you to couple the example of where it can make things easier with examples of where it also can make things insanely more difficult (the more over-the-top, the better for your illustrating purposes).  This will enable you to have a discussion about appropriate usage based on real principles, not just course policy.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After this discussion, you can explain where you will accept these in your course, and there should be little resistance from your students.  After all, what you are asking for is simply &lt;em&gt;sensible&lt;/em&gt;.  Hopefully, this will allow you to create some balance in the lab work you receive.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="104" LastEditDate="2018-08-30T17:55:40.953" LastActivityDate="2018-08-30T17:55:40.953" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4680" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T13:57:30.200" Score="27" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Then I inevitably have students who abandon the good habits they had&#xA;  formed and want to make everything an Object, or declare everything as&#xA;  var.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;These are very different situations. As you observe, the use of &lt;code&gt;var&lt;/code&gt; in C# is controversial, but using &lt;code&gt;object&lt;/code&gt; as the type of all variables (and then needing to cast any time you want to actually &lt;em&gt;use&lt;/em&gt; the variable) is not controversial: it's just wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first page of answers on the linked SO question about &lt;code&gt;var&lt;/code&gt; in C# is incomplete. It doesn't mention that using &lt;code&gt;var&lt;/code&gt; can avoid bugs due to typing in one edge case: &lt;code&gt;foreach (var foo in foos)&lt;/code&gt; vs &lt;code&gt;foreach (Foo foo in foos)&lt;/code&gt;. For legacy reasons, if &lt;code&gt;foos&lt;/code&gt; is a &lt;code&gt;System.Collections.IEnumerable&lt;/code&gt; but not a &lt;code&gt;System.Collections.IEnumerable&amp;lt;&amp;gt;&lt;/code&gt; the latter is equivalent to &lt;code&gt;foreach (Foo foo in foos.Cast&amp;lt;Foo&amp;gt;())&lt;/code&gt;, which is not especially obvious. (In fact I misremembered and was corrected in comments, which reinforces the advantage of using &lt;code&gt;var&lt;/code&gt; here).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR: blanket prohibitions on &lt;code&gt;var&lt;/code&gt; are almost certainly going too far.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My question is, since these students are still learning, and since it&#xA;  is my classroom after all, should I emphatically require that they&#xA;  always explicitly specify types unless absolutely necessary? ...&#xA;  And, if I do require it, how can I explain the (in my opinion)&#xA;  sloppiness they sometimes see in online communities?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;var&lt;/code&gt; is far from the only controversial subject in programming praxis. The solution in industry is the style guide: whether as a formal written document or as an informal internalised set of opinions which are imparted to new team members by word of mouth when they submit changes which violate the house style. If you're explicitly preparing your students for industry, it is perfectly reasonable to dedicate a bit of time to explaining the concept of the house style, and then when you introduce new material to explain the house style you will enforce for that feature.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The really heavy-duty approach would be to prepare a full industry-style style guide and then to produce a series of increasingly large subsets so that every couple of weeks you can give them a link to an updated style document which specifies how to use the new features you just introduced, or the new features you're about to introduce, and highlights the additions from the previous one.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastEditorUserId="1219" LastEditDate="2018-05-01T09:50:56.227" LastActivityDate="2018-05-01T09:50:56.227" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4682" PostTypeId="2" ParentId="727" CreationDate="2018-04-30T17:00:44.370" Score="1" Body="&lt;p&gt;First, note the difference between &lt;a href=&quot;https://en.wikipedia.org/wiki/NP_(complexity)&quot; rel=&quot;nofollow noreferrer&quot;&gt;NP&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/NP-hardness&quot; rel=&quot;nofollow noreferrer&quot;&gt;NP-hard&lt;/a&gt;. NP simply means verifiable easily. NP-hard means verifiable easily, but also means that the problem is as hard to solve as the hardest problems in NP, which are not known to be easily solvable (see &lt;a href=&quot;https://en.wikipedia.org/wiki/P_versus_NP_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;P = NP&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For describing what it means for a problem to be NP-hard, I have had success by referring to the canonical &lt;a href=&quot;https://en.wikipedia.org/wiki/Travelling_salesman_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;Traveling Salesman Problem&lt;/a&gt;. I might introduce the problem like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given a list of cities, the distances between each pair of cities, and a number $k$, is there a path of length ≤ $k$ that visits each city and returns to the start city?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then I would say something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone tells you a path to take i.e. an ordered list of cities, you can quite easily check to see if it includes every city, starts and ends at the same city, and is of length ≤ $k$. However, trying to come up with that path in the first place is more difficult. You could imagine trying every possibility exhaustively, checking if the conditions hold for each one. While there are algorithms better than this brute-force approach, which has runtime that is exponential in the number of cities, none have been shown to be polynomial in the number of cities.&lt;/p&gt;&#xA;" OwnerUserId="4384" LastEditorUserId="4384" LastEditDate="2018-04-30T17:39:46.500" LastActivityDate="2018-04-30T17:39:46.500" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4683" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T17:59:31.367" Score="6" Body="&lt;p&gt;If I learned anything reading Dale Carnagie, if you want to convince someone to do something, don't tell them &quot;Do this because I want you to,&quot; tell them &quot;Do this because if you don't, you're going to suffer for it and it's your loss.&quot; Speak in terms of their own self interest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to tell them, &quot;Now, you may want to use Objects for everything. This is bad and it will suffer because of it. You'll get weird errors when you start using it. If you don't want to spend 30 minutes debugging a program for a silly error, don't use Object like that. Here are some examples of using Objects will make your life more painful...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As far as using var for everything, I'm a professional programmer and I use var all the time. I can't help you there (if I were one of your students, I would wonder why I couldn't work more efficiently either!). It's important to know what type you're working with, but as long as you do that, &lt;em&gt;var&lt;/em&gt; away. &lt;/p&gt;&#xA;" OwnerUserId="4976" LastActivityDate="2018-04-30T17:59:31.367" CommentCount="2" ContentLicense="CC BY-SA 3.0" />
  <row Id="4684" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T20:02:35.603" Score="-2" Body="&lt;p&gt;Teach them c/c++ first, or go into the common uses of each data type first so they have to understand the intrinsic properties.&lt;/p&gt;&#xA;" OwnerUserId="4979" LastActivityDate="2018-04-30T20:02:35.603" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4685" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T21:00:18.477" Score="1" Body="&lt;p&gt;There are a few reasons why this is bad, for example it could lead to code issues down the line where you need something from &lt;code&gt;Horse&lt;/code&gt; that you don't have on &lt;code&gt;Object&lt;/code&gt;, and it may also be a code smell. I'm going to suppose the code passes and runs fine, the architecture is fine, and just focus on the remaining issue: the issue generally is of course that it's not as specific as it could be, and the reason that's bad is it's bad for maintainability and code clarity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, for maintainability, you want your code to model your ontology, to be resilient to counterfactuals. That way, if things need to change in the future, your code will more likely be constructed in a way thats amenable, because even though certain specifications changed, or some refactoring is being done, your code is still basically modeling the logic of the situation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So &lt;code&gt;Object x = new Horse(&quot;silver&quot;)&lt;/code&gt; is bad because &lt;code&gt;x&lt;/code&gt; is not just an &lt;code&gt;Object&lt;/code&gt;, it's a &lt;code&gt;Horse&lt;/code&gt;, maybe it's an &lt;code&gt;Animal&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(1) You lose the code clarity, future readers won't have the info of immediately knowing, if they want to change the value of &lt;code&gt;x&lt;/code&gt;, what &lt;code&gt;x&lt;/code&gt; &quot;is&quot; and a sense of how it's going to be used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(2) You lose benefits of type-checking, because anything using &lt;code&gt;x&lt;/code&gt; only knows it's an &lt;code&gt;Object&lt;/code&gt; and doesn't know it's a &lt;code&gt;Horse&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not a teacher, I'm just a programmer in industry, but I think maybe the single most important general principle I use in my day to day is: code should model ontology, including in the sense that it's robust to counterfactuals. A lot of bad code falls under that category.&lt;/p&gt;&#xA;" OwnerUserId="4980" LastEditorUserId="4980" LastEditDate="2018-04-30T21:08:52.240" LastActivityDate="2018-04-30T21:08:52.240" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4686" PostTypeId="2" ParentId="3934" CreationDate="2018-04-30T21:38:35.663" Score="2" Body="&lt;p&gt;There is the &lt;a href=&quot;https://www.ets.org/mft/about/content/computer_science&quot; rel=&quot;nofollow noreferrer&quot;&gt;Educational Testing Service (ETS) Major Field Test for Computer Science&lt;/a&gt;, a standardized multiple-choice test. Scores can be &lt;a href=&quot;https://www.ets.org/mft/scores/compare_data&quot; rel=&quot;nofollow noreferrer&quot;&gt;compared to those at other institutions&lt;/a&gt;, presumably on a per question basis. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ETS website includes some &lt;a href=&quot;https://www.ets.org/Media/Tests/MFT/pdf/mft_samp_questions_compsci.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;sample problems&lt;/a&gt;, which include questions about pseudocode, cache variables, trees, graphs, combinatorics, and regular expressions. It looks similar to the CS GRE, which was &lt;a href=&quot;https://www.ets.org/gre/subject/about&quot; rel=&quot;nofollow noreferrer&quot;&gt;discontinued in 2013&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2018-04-30T21:38:35.663" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4687" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T23:02:01.797" Score="5" Body="&lt;p&gt;If you expect that many of the students will pursue software development careers, it would not be unreasonable to declare style standards for the course, and include it in their grading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When doing so, I strongly recommend explaining &lt;em&gt;why&lt;/em&gt; particular rules are in place, because it moves disagreement into &quot;arguing principles&quot; instead of having &quot;arbitrary rules&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The explanation could be as simple as &quot;we're going to follow the &lt;a href=&quot;https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md&quot; rel=&quot;noreferrer&quot;&gt;corefx style guidelines&lt;/a&gt;&quot; because the majority of example code produced by the .NET development team will adhere to these rules.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol start=&quot;10&quot;&gt;&#xA;  &lt;li&gt;We only use &lt;code&gt;var&lt;/code&gt; when it's obvious what the variable type is (e.g. &lt;code&gt;var stream = new FileStream(...)&lt;/code&gt; not &lt;code&gt;var stream = OpenStandardInput()&lt;/code&gt;).&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Or, the rules could be a bit more esoteric/practical. As a grader many years ago I got the professor to agree to a style score as a portion of the coursework. I told the class &quot;I will be reviewing your code with the program &lt;code&gt;less&lt;/code&gt; in an 80-character wide terminal.  If I have to horizontally scroll you will get 0 points for style.&quot; -- I think I gave a 0 for breaking that rule just once.&lt;/p&gt;&#xA;" OwnerUserId="4981" LastActivityDate="2018-04-30T23:02:01.797" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4688" PostTypeId="2" ParentId="4677" CreationDate="2018-04-30T23:57:48.103" Score="-1" Body="&lt;p&gt;Various forms of the same question to ask oneself:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Does this &quot;thing&quot; represent part of my design?&lt;/li&gt;&#xA;&lt;li&gt;Is it a key aspect of a contract?&lt;/li&gt;&#xA;&lt;li&gt;Do I want to &lt;em&gt;anchor&lt;/em&gt; my thinking around a specific type at this point in my code?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In all cases a strict type declares to my reader (myself in 6 months) that this is important.  If it's less important, let it go.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;an implicit reference to a Disney movie is not explicitly declared, so it's not an anchor point for my argument.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="4982" LastActivityDate="2018-04-30T23:57:48.103" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4689" PostTypeId="1" AcceptedAnswerId="4694" CreationDate="2018-05-01T15:08:26.710" Score="52" ViewCount="10494" Body="&lt;p&gt;I originally asked this over on Stack Overflow, but they suggested I look here instead:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently teaching my students about the concept of inheritance (we're using Python 3) but am unable to think up (or find) any &lt;strong&gt;meaningful&lt;/strong&gt; programming exercises. Everything I seem to find online as a teaching resource rehashes the same forced examples: &lt;code&gt;Employee()&lt;/code&gt; inherits &lt;code&gt;Person()&lt;/code&gt;; &lt;code&gt;Dog()&lt;/code&gt; inherits &lt;code&gt;Animal()&lt;/code&gt;; etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While these are great ways to drive home the basics of inheritance, I can't help feeling they are a bit hollow as programming exercises. In the end I don't feel like I've &lt;strong&gt;&lt;em&gt;made&lt;/em&gt;&lt;/strong&gt; anything. Unlike, for example, the myriad of different exercises out there that can be used to teach recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, I'm sorry for the rather &quot;soft&quot; question, but I'm just desperate for some better examples that could actually be tackled by a student who's still learning the concept. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="4985" LastEditorUserId="104" LastEditDate="2018-05-01T16:32:54.760" LastActivityDate="2022-02-14T18:26:47.790" Title="Interesting Programming Exercises to Teach Inheritance?" Tags="|lesson-ideas|object-oriented-paradigm|python|" AnswerCount="14" CommentCount="20" ContentLicense="CC BY-SA 3.0" />
  <row Id="4690" PostTypeId="2" ParentId="4689" CreationDate="2018-05-01T16:30:53.347" Score="2" Body="&lt;p&gt;If the students are still needing real &quot;objects&quot; to connect metally with the concept of &lt;em&gt;object&lt;/em&gt; you could resort to using transportation as a system. Another user, &lt;a href=&quot;https://cseducators.stackexchange.com/users/65/g-ann-sonarsource-team&quot;&gt;G. Ann - SonarSource Team&lt;/a&gt;, gave a good break down you could follow in &lt;a href=&quot;https://cseducators.stackexchange.com/a/163/104&quot;&gt;answer to another question&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if you are looking for a more practical use-case, then you can use lists. There is the &lt;em&gt;Node&lt;/em&gt;, which in its simplest form is nothing more than a data encapsulation, and the &lt;em&gt;List&lt;/em&gt; which implements the process of accessing the nodes. The &lt;em&gt;List&lt;/em&gt; and &lt;em&gt;Node&lt;/em&gt; can both be inherited as you expand from array-based lists to linked lists, and into doubly linked lists. Then you can switch to stacks and queues, maybe even moving into binary, and n-ary, trees.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-05-01T16:30:53.347" CommentCount="0" ContentLicense="CC BY-SA 3.0" />
  <row Id="4691" PostTypeId="2" ParentId="4689" CreationDate="2018-05-01T17:23:56.800" Score="16" Body="&lt;p&gt;Too many examples that you find are (IMO) fatally flawed. The Animal-&gt;Dog is especially flawed, though widely used. The problem is that these sorts of examples almost require that the superclass has a certain set of public methods that isn't the same as that of the subclass, requiring you to add additional public methods to the subclass. This is because an object of the subclass has different behavior than that of the superclass. This leads to poor design. If, when you create a variable you think of it as an Animal (or in a statically typed language declare it so) then later, when you assign a Dog object to the same variable you, the programmer have to remember that it is &lt;em&gt;now&lt;/em&gt; a dog so that it can accept the sit() method that wasn't implemented in Animal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a dynamically typed language like Python, the programmer has to remember types since the compiler doesn't, but if you also have to remember where in an inheritance hierarchy an object is at runtime then you have a more difficult than necessary task. You can ask an object for its type of course, but that leads to messy code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A better solution is to maintain the set of methods declared in the topmost class as you descend and not extend them. What you change in the subclass is only the implementations of methods defined in the superclass. Then your original intention (it is an Animal) doesn't need to be modified (and mentally maintained) as you write the program. The variable responds &lt;em&gt;only&lt;/em&gt; to Animal methods, clearly impossible in this example. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to help solve your problem is to assure that your inheritance hierarchies are very (very) shallow. Don't try to define things three or four deep. This helps even if you do add additional public methods in a subclass. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, there is a better way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One reason for building hierarchies is to get different behavior in the subclass. But there is a better way to do that. And it doesn't require adding additional behaviors. The flaw in thinking is that many people think of using inheritance hierarchies for &lt;em&gt;BIG&lt;/em&gt; things. Like Dogs and Giraffes. If instead you don't use inheritance for the big things but only for small things, life gets easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The alternative to inheritance I suggest is to build objects by &lt;em&gt;composition&lt;/em&gt;. Complex (i.e. big) things are made up of smaller parts that are themselves complex (objects, not integers and strings). This leads to programming by &lt;em&gt;delegation&lt;/em&gt;. An object can delegate some of its behavior to another object, possibly held in a field and invisible to the public class's clients. When a public method of the class is invoked, it simply sends a message to the delegate object and can get a return value that it can return or modify. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the makeNoise() method of Animal looks like this. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def makeNoise():&#xA;    myNoiseMaker.shout()&#xA;    return&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The object in myNoiseMaker makes the actual sound. But by changing that object the Animal can bark or meow or roar or what ever is needed for that animal. The value can be set in a constructor to produce a Dog or a Lion, of course. All animals behave the same (same set of public methods) but each in its own way. Don't start thinking that we need switch statements to achieve this. There is no test for the kind of thing we are. One possible value of myNoiseMaker only knows how to bark. A different object knows how to roar. We just create (or replace) the object as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This of course is well known as the Strategy Design Pattern. The strategy here is an object with one method: &lt;code&gt;shout()&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also possible to use inheritance at this level and one Strategy can inherit from another. Usually you want a Strategy that implements shout as a no-op. You can inherit from this to create a Dog and from that to create a LoudDog. So an object built by composition (lots of Strategies) and using Delegation is pretty rich and very flexible. Each instantiation of an Animal object only knows how to do one thing as appropriate. This is polymorphism, actually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, once you grasp the idea of a Strategy you can do much more. As a program runs, its state changes. One possible way to develop programs is with State Change Diagrams. At certain state changes it is possible to replace one delegate with another, changing the behavior of the containing object that uses delegation. For example, the first time you press a number key on a calculator it shows that value in the display. But the next time you press it something different happens and the new value is accumulated into the old. So pressing a number key after pressing the equals key has different behavior than after pressing a number key. This can be handled by having the calculator delegate the key presses to (various) strategy objects as the state changes. Again, you don't need flags and switch statements to remember what to do next. The Strategy object knows what to do since it was designed to do only that one thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To go even farther, another design pattern is Decorator. There are various kinds of decorator but the essence is that it &lt;em&gt;is&lt;/em&gt; a certain kind of thing and it also &lt;em&gt;has&lt;/em&gt; something of the same kind. A Strategy Decorator &lt;em&gt;is&lt;/em&gt; a strategy (it has the shout method) and it also &lt;em&gt;has&lt;/em&gt; a strategy as a field. When the containing object delegates to the Decorator it can first fire the shout method of the held object and and also add a sound of its own. Since a Decorator is a Strategy it can also decorate another decorator as the held object. This is essentially a linked list of Strategies with all but the last being a Strategy Decorator. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you can illustrate inheritance and dynamic polymorphism very nicely with small classes such as strategies and decorators. But it requires a mental model about how to build objects - use composition primarily (for the big things) and inheritance for the small things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And notice that this mechanism (composition + delegation) moves the focus of change-of-behavior from the class to the individual object. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To more explicitly answer your question, you could provide a basic class in which a few methods delegate to other objects and then have them make the behavior of objects more interesting by defining other delegates that inherit from the ones you give. The first cut could have all of the delegates provide empty behavior. Rather than modifying the classes of those objects, have them write (simple) subclasses. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll note in also that a statically typed language such as Java can do even better here, since the explicit declarations of the variable types, unavailable in Python and Ruby, makes it clear about what is a Strategy and what is not. In general, though a Strategy is very simple, a method or two, named for the task at hand. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me try to explain why it is a bad idea, especially in statically typed languages like Java but also in Python, to define new public methods in a subclass or in classes that implement an interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose you have the following: Animal (either a base class or an interface, and you have Mammal and Invertebrate as subclasses of Animal. You also have Dog and Kangaroo as subclasses of Mammal and Mosquito as a subclass of Invertebrate. Suppose also that each class introduces new public methods not defined in its superclass. The sensible programmer will of course create a Dog object with&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Dog myPet = new Dog(Fido);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and other objects similarly. Now myPet.sit(); makes perfect sense whereas had myPet been given the &lt;em&gt;static&lt;/em&gt; type Animal it would not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the problem arises when you create collections, say List, or pass myPet as an argument to a method that expects an Animal. What can you do in that method? What can you do with objects extracted from the List? The compiler only knows the object as Animal, of course, so you can invoke those methods, but what if you want to do more with the object. Runtime type checking (instanceof) and Casting can recover the specific type but at the cost of potential runtime errors if you make inappropriate assumptions. The original programmer may not make such errors in a small program, but the problem becomes very difficult in a large, important, and maintained-by-others program. It isn't the original declaration that is the issue here. &lt;em&gt;Of course&lt;/em&gt; you say Dog. Or do you? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A very common idiom in Java is to declare an ArrayList as follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;List&amp;lt;Animal&amp;gt; animals = new ArrayList&amp;lt;Animal&amp;gt;();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note the interface type on the LHS and a specific class type on the RHS. This makes it easy to replace the concrete type with a different one without changing the LHS or the code that follows. This is actually the preferred method of doing such declarations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why does it work? It works because all of the provided implementers of List have, as their &lt;em&gt;only&lt;/em&gt; public methods, the methods defined in List itself. It wouldn't work if that were not the case. Then, if additional methods were defined (and used), changing the concrete type would become much more difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good practice in the libraries (not adding public methods) is good for a reason. I'm simply suggesting it as a general practice that makes for better programs. It is also a simple and safe rule for beginners to learn. The rule is frequently broken, I realize. But poorly designed software is frequently written, also. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note that this problem is more severe in Python, which is dynamically typed and variables (identifiers) have no type at all. Java declarations at least give you some sort of managed knowledge of what sort of thing is referenced. In Python (Ruby) you need to do that yourself or include frequent type checks or suffer frequent errors. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-02T17:05:10.470" LastActivityDate="2018-05-02T17:05:10.470" CommentCount="24" ContentLicense="CC BY-SA 4.0" />
  <row Id="4692" PostTypeId="2" ParentId="4689" CreationDate="2018-05-01T20:19:58.423" Score="3" Body="&lt;p&gt;Some commentary: What do you mean by &quot;meaningful?&quot; Are you looking for a program that does something useful? And what do you mean by useful?   Do you need to have in-depth discussions of covariance and contravariance or just talk about the basics of inheritance? These are rhetorical questions but I think how you address these questions changes the parameters for a good answer.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways, my suggestion is to look at inheritance in game engines. I think you can tailor some examples to cover your learning requirements. Depending on how much of a foundation you provide can give various degrees of a working product at the end of a semester. I'm not suggesting you build a game engine in a semester, but discuss some naive approaches and then look at real-world examples and then [some hands on project]. I think this has the added benefit of being of interest to at least a few students who found there way to a CS class by interest in creating video games (and you can provide a dash of realism on the difficulties in delivering a working game from scratch).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two examples, as promised in the comments.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Doom 3 source is available online and generally pleasant to read. Here are a few inheritance chains  &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;idClass &amp;lt;- idEntity&#xA;           idEntity &amp;lt;- idItem&#xA;           idEntity &amp;lt;- idProjectile&#xA;           idEntity &amp;lt;- idAnimatedEntity&#xA;                       idAnimatedEntity &amp;lt;- idWeapon&#xA;                       idAnimatedEntity &amp;lt;- idAFEntity_Base &amp;lt;- idAFEntity_Gibbable &amp;lt;- idActor &amp;lt;- idPlayer  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can find the source at &lt;a href=&quot;https://github.com/dhewm/dhewm3/tree/master/neo/game&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/dhewm/dhewm3/tree/master/neo/game&lt;/a&gt; .&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A different kind of game is &lt;a href=&quot;http://en.cataclysmdda.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cataclysm: Dark Days Ahead&lt;/a&gt;, a console/TUI game. The code is also a bit more &quot;DIY&quot; than the Doom 3 source. The player inheritance chain starts with two base classes, &lt;code&gt;Creature&lt;/code&gt; and &lt;code&gt;template &amp;lt;typename T&amp;gt; class visitable&lt;/code&gt;. Then the inheritance chain is &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Creature, visitable&amp;lt;Character&amp;gt; &amp;lt;- Character &amp;lt;- player  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You can find the source online at &lt;a href=&quot;https://github.com/CleverRaven/Cataclysm-DDA&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/CleverRaven/Cataclysm-DDA&lt;/a&gt; .&lt;/p&gt;&#xA;" OwnerUserId="4995" LastEditorUserId="4995" LastEditDate="2018-05-02T12:43:40.003" LastActivityDate="2018-05-02T12:43:40.003" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4693" PostTypeId="2" ParentId="4689" CreationDate="2018-05-01T20:54:32.917" Score="10" Body="&lt;p&gt;I've got one that might help, modified/simplified from an actual problem I had to solve at my current job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine you're writing a Content Management system - this system will store four types of documents (and the Meta/Index information for them)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;PDFs (who created, description, file size)&lt;/li&gt;&#xA;&lt;li&gt;Word documents (who created, description, file size)&lt;/li&gt;&#xA;&lt;li&gt;Pictures (who created, description, image dimensions, file size)&lt;/li&gt;&#xA;&lt;li&gt;Videos (who created, description, image dimensions, file size, duration)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Yeah, you &lt;em&gt;could&lt;/em&gt; write these out into four completely separate classes.  The problem is, you're already going to have to write all those properties each and every time for every single class - and you're going to end up with code duplication along the way as functionality gets added.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine you're now asked to add a few features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Checking to see whether the file size is beyond a certain threshold.&lt;/li&gt;&#xA;&lt;li&gt;Checking to see whether it's too high of resolution of video/picture.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you had those four classes as four distinct entities?  You're going to start having to code in multiple places.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what happens if you use inheritance?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public abstract class CMFileInfo&#xA;{&#xA;    string creatorName;&#xA;    string description;&#xA;    int fileSizeInK;&#xA;    bool IsSizeTooLarge()&#xA;    {&#xA;        // code to deterimine if the file size is too large&#xA;    }&#xA;}&#xA;class PDFFileInfo : CMFileInfo {}&#xA;class WordFileInfo : CMFileInfo {}&#xA;class ImageFileInfo : CMFileInfo&#xA;{&#xA;    Dimensions dimensions;&#xA;    bool AreDimensionsTooLarge()&#xA;    {&#xA;        // code to deterimine if the dimensions are too large&#xA;    }&#xA;}&#xA;class MovingImageFileInfo : ImageFileInfo&#xA;{&#xA;    int durationInSeconds;&#xA;}&#xA;// sorry for C# instead of python; I don't currently know python...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... look how the code only has to be written once, and the properties only have to be defined once.  All Content Management files have to have a 'who created', a 'description', a 'file size', and a way to check whether that size is too great.  So they're all defined at the base level.  Down a level from there is the ImageFileInfo class, which adds a Dimensions property and a check whether those dimensions are too large.  Finally, the Video (MovingImageFileInfo) doesn't rewrite the wheel - it takes all the stuff inside the ImageFileInfo class, and simply tacks on a durationInSeconds property.&lt;/p&gt;&#xA;" OwnerUserId="4777" LastActivityDate="2018-05-01T20:54:32.917" CommentCount="5" ContentLicense="CC BY-SA 3.0" />
  <row Id="4694" PostTypeId="2" ParentId="4689" CreationDate="2018-05-01T23:15:30.850" Score="44" Body="&lt;p&gt;I'm not as familiar with Python as I am with other languages, but I'm sure your students have played Minecraft.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you haven't, I suggest taking a few minutes to find some introductory &quot;Lets Play&quot; videos on YouTube first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's talk Blocks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Minecraft has dozens of blocks. Dirt, some, water, colored wool...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All blocks can be broken, picked up, placed, stacked, stored in chests, and crafted together. But not all blocks do just those things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The chest let's the player store items in it. The furnace smelts some blocks into other blocks. Grass, when broken, drops a completely different block. Stone doesn't drop anything at all unless dug out with a pickaxe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Minecraft can do this because of all of those basic methods that subclasses inherit and override. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take this method (not pulled from source, just based on):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public List&amp;lt;ItemStack&amp;gt; getDrops(World w, Pos p, bool harvest, int fortune, Random rand) {&#xA;    //basic implementation&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The default implementation puts a single item (the block itself) into a list and returns it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BlockGrass would put &lt;em&gt;dirt&lt;/em&gt; into the list instead. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;BlockStone would check to make sure that &lt;code&gt;harvest&lt;/code&gt; is true and the put cobblestone in the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;BlockDiamondOre checks &lt;code&gt;harvest&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; &lt;code&gt;fortune&lt;/code&gt;, putting a different number of diamond items into the list, even determining how many based on the &lt;code&gt;Random&lt;/code&gt; supplied. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are roughly 100 different methods in the block class to handle all of the possible functionality. Update ticks (crops), neighbor updates (observer, torches), interaction (doors, chest, furnace, crafting bench), whether or not a block has a tile entity (chest, furnace), and on and on and on. Most of them are blank and do nothing, entirely up to the derived class to add to, &lt;em&gt;if it needs it.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same goes for items, some of which (like sticks) don't even have a derived class of their own because they do nothing special. They just exist and do everything any item can.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is why the are so many mods for Minecraft that add so many new things: no one&lt;sup&gt;1&lt;/sup&gt; has to implement anything special in order for everything to Just Work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;Well, except Minecraft Forge, who maintain the official unofficial mod API. But Forge is a special kind of magic that isn't important here&lt;/p&gt;&#xA;" OwnerUserId="1244" LastActivityDate="2018-05-01T23:15:30.850" CommentCount="17" ContentLicense="CC BY-SA 3.0" />
  <row Id="4695" PostTypeId="2" ParentId="4689" CreationDate="2018-05-02T09:33:13.287" Score="0" Body="&lt;p&gt;I'm not sure why you don't like the person/employee/manager hierarchy; it is just an example for a whole class of object hierarchies which represent specializations of data with a common subset and are often stored in databases. Other examples would be non-human inventory (every physical item a company owns has a value and a location etc.), or financial assets (they all have some proof of ownership, a value, a date of acquisition etc.). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for something which can be implemented and played with in a class I have two suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If there is a graphics library available, graphical objects in a 2-D or 3-D world which all have a position, can be transformed, displayed etc. form a nice hierarchy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Because Python is good at parsing text, a calculator similar to a &lt;a href=&quot;https://www.gnu.org/software/bc/manual/html_mono/bc.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;bc&lt;/a&gt;  subset comes to mind which essentially processes a succession of potentially nested expressions, each of which has a value. The inheritance hierarchy would model the grammatical hierarchy of the language: subclasses of &lt;code&gt;expression&lt;/code&gt; could be &lt;code&gt;literal_value&lt;/code&gt;, &lt;code&gt;simple_expression&lt;/code&gt;, &lt;code&gt;variable&lt;/code&gt; etc.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1675" LastActivityDate="2018-05-02T09:33:13.287" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4696" PostTypeId="2" ParentId="4677" CreationDate="2018-05-02T09:44:50.000" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Then I inevitably have students who abandon the good habits they had formed and want to make everything an Object&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This can easily be shown to be a bad approach if you need a class specific property later on.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;object myStudent = new Student(&quot;John&quot;, &quot;Doe&quot;);&#xA;&#xA;string name = myStudent.Name; //doesn't work&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They'll probably use a hard cast, at which point the issue is no longer that they use object, but that they are losing out on type safety.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem here is that an adequately skilled student who is ahead of the curve will always be able to work around simple pitfalls. If he is overskilled for the example, he has more than enough brainpower to ensure that his hard casts always work.&lt;br&gt;&#xA;The only way to force them to make mistakes is to give them a sufficiently complex example, where they're struggling with the core intention so much that having to manage hard casts on top of that just makes everything so much worse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you may have to single them out for this complex task; which can in and of itself signal that they don't &lt;em&gt;need&lt;/em&gt; to complete this hard task (since you can't just make tests harder for a particular student).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only guaranteed solution is to explicitly disallow hard casting in the problem statement.&lt;br&gt;&#xA;Any other (more implicit) approach is liable to be a cause for complaints when the student loses grades over this.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I am always torn about how insistent to be that they revert, because I know the use of var in C# is controversial in the industry. (See the SO discussion use of var in C# for an example). &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your conclusion does not match your observation. Suppose the community is split 50/50 between either using &lt;code&gt;var&lt;/code&gt; freely, or not using it at all. That means that &lt;strong&gt;either choice is equally correct&lt;/strong&gt;.&lt;br&gt;&#xA;Standards and conventions are, unsurprisingly, decided by convention.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only things you should be telling your students to not do are the things that a majority of the community agrees are bad approaches (such as hard casting for no good reason).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This goes even further. &lt;code&gt;var&lt;/code&gt; may actually be the solution to your &lt;code&gt;object&lt;/code&gt;-focused students. In all likelihood, they are choosing the blanket use of &lt;code&gt;object&lt;/code&gt; because they find it unnecessarily hard to always write the correct type. &lt;strong&gt;&lt;code&gt;var&lt;/code&gt;&lt;/strong&gt; solves that problem by having the compiler (not the developer) figure out the types that are trivial to look up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're seeing this as two similar issues, but it's much more likely that one (&lt;code&gt;object&lt;/code&gt;) is a consequence of your reluctance to allow the other (&lt;code&gt;var&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Plus, the more savvy students are hanging out in SO anyway, and they see some questions and answers that lack explicit typing and other good programming habits.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is again a matter of convention. If students are predominantly exposed to &quot;StackOverflow code quality&quot;, then it makes sense for them to adapt &quot;StackOverflow code quality&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being better than your surrounding is not always objectively better. The first company I worked in was comprised of self-taught developers and &lt;em&gt;one&lt;/em&gt; university graduate. His solutions were much more theoretical than ours. But he couldn't make those solutions work in our company, because everyone else disagreed with him.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I'm not in any way arguing that CS theory is bad; you do need to realize that pretty much every argument of code quality rests on &lt;strong&gt;convention&lt;/strong&gt;, not objectively provable superiority. If something were actually illogical or inferior, then no one would keep advocating its use, thus eventually rendering it outdated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're trying to do, with the best of intentions, can also be construed to be bordering on requiring students to adhere to &lt;strong&gt;your&lt;/strong&gt; preferred standard as opposed to the average community standard.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My question is, since these students are still learning, and since it is my classroom after all, should I emphatically require that they always explicitly specify types unless absolutely necessary? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a teacher, it is your prerogative to be selective about what you consider a correct answer. However, if you are requiring a particular standard to be upheld, then you should &lt;strong&gt;explicitly&lt;/strong&gt; mention this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you ask your students for &quot;an application that does [thing]&quot;, then you're implying that any working code is a correct answer to the question (which deserves full marks).&lt;br&gt;&#xA;If you ask your student for &quot;an application that does [thing] and avoids string concatenation (&lt;code&gt;+&lt;/code&gt;)&quot;, then you've made it clear that working code that uses string concatenation is not a correct answer to the question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to force a particular answer, you must phrase your question accordingly. Do not punish students for an implicit convention, because most students expect questions that reveal how their answer will be graded.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;And, if I do require it, how can I explain the (in my opinion) sloppiness they sometimes see in online communities?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;Just because it works, does not mean it works well.&quot;&lt;/em&gt; is what my teacher used to tell me. And I was the kind of student who needed to repeatedly be told that.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(Of course, sometimes it is justifiable, preferred, and necessary NOT to). &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Just out of curiosity, when is &lt;code&gt;var&lt;/code&gt; ever a necessity? I can't think of a single case. As far as I'm aware, &lt;code&gt;var&lt;/code&gt; is merely shorthand, not an actual technical benefit.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2018-05-02T09:44:50.000" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4697" PostTypeId="2" ParentId="4689" CreationDate="2018-05-02T11:36:43.267" Score="2" Body="&lt;p&gt;Kind of a meta answer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pick any large, established, well-received Java library/API; especially one that ships with the regular open-source JDK. You will find a &lt;em&gt;lot&lt;/em&gt; of examples of inheritance, conveniently displayed at the top of each &quot;class&quot; page in the Javadoc. Most of these should have been chosen by their authors with good reasons, and you certainly could do worse than use those as examples.&lt;/li&gt;&#xA;&lt;li&gt;I personally would rather avoid &lt;code&gt;Person&lt;/code&gt; / &lt;code&gt;Animal&lt;/code&gt; style examples as well; as you, I find many of those either far-fetched or useless insofar as they only show the bare minimum, staying shy of any obvious problems that might arise in real world settings. Most importantly, many of those I saw in the past would do better by using other structural patterns (like &lt;code&gt;Composite&lt;/code&gt;) instead of inheritance.&lt;/li&gt;&#xA;&lt;li&gt;While you're at it, you could teach your pupils about the fact that the kind of inheritance we have in, say, C++ or Java is only one kind of possible implementation; and that there can be (and &lt;em&gt;are&lt;/em&gt;) other solutions to whatever problem it is solving. For example, duck typing (e.g. ruby with its weird but utterly wonderful approach to the theme, google &quot;ruby superclass&quot; or &quot;metaprogramming&quot;), object-based class-less OOP (e.g. JavaScript &lt;a href=&quot;https://javascript.info/object#comments&quot; rel=&quot;nofollow noreferrer&quot;&gt;no classes&lt;/a&gt;, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new&quot; rel=&quot;nofollow noreferrer&quot;&gt;how 'new' works&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="652" LastActivityDate="2018-05-02T11:36:43.267" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4698" PostTypeId="2" ParentId="4689" CreationDate="2018-05-02T13:39:19.477" Score="2" Body="&lt;p&gt;C# practical example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine you were making a super-awesome video game, and you needed to write a function that saves the game.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void SaveTheGame(GameData data)&#xA;{&#xA;    // TODO: save! (somehow)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But where will all this data be saved?&lt;br&gt;&#xA;A simple text file?&#xA;A binary file?&#xA;An SQL database?&#xA;A NoSQL database?&#xA;Something else entirely?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Luckily, you don’t have to make the decision right now.&lt;br&gt;&#xA;No, the decision is configured by the user when the game is installed.&#xA;So actually it’s not a lucky thing, because now you have to support all the options:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void SaveTheGame(GameData data, SaveMode saveMode)&#xA;{&#xA;    if (saveMode == SaveMode.SimpleText)&#xA;    {&#xA;        // a whole lotta code&#xA;    }&#xA;    else if (saveMode == SaveMode.BinaryFile)&#xA;    {&#xA;        // a whole lotta code&#xA;    }&#xA;    else if (saveMode == SaveMode.SQL)&#xA;    {&#xA;        // a whole lotta code&#xA;    }&#xA;    else if (saveMode == SaveMode.NoSQL)&#xA;    {&#xA;        // a whole lotta code&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All nice and dandy.&lt;br&gt;&#xA;However, in this case there are only four &lt;code&gt;if&lt;/code&gt;s.&lt;br&gt;&#xA;But what if we had thirty? Or fifty? Or fifty-three?&lt;br&gt;&#xA;And what if there are a whole bunch of nested ifs?&lt;br&gt;&#xA;The situation can easily become… (drumroll)… &lt;em&gt;iffy&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it gets worse:&lt;br&gt;&#xA;What if you’re writing code for other developers, and you want to allow them to add their very own ways of saving?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With inheritance, we eliminate the need for all these &lt;code&gt;if&lt;/code&gt;s, and allow future programmers to add their own saving method:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public class Saver&#xA;{&#xA;    public virtual void Save(GameData data)&#xA;    {&#xA;    }&#xA;}&#xA;&#xA;public class SQLSaver : Saver&#xA;{&#xA;    public override void Save(GameData data)&#xA;    {&#xA;        // a whole lotta code&#xA;    }&#xA;}&#xA;&#xA;// And then we can do:&#xA;public void SaveTheGame(GameData data, Saver saver)&#xA;{&#xA;    saver.Save(data);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, if new developers want to add their own way of saving, they can write a new class the implements Saver, and just pass it to the &lt;code&gt;SaveTheGame&lt;/code&gt; method.&lt;/p&gt;&#xA;" OwnerUserId="5008" LastActivityDate="2018-05-02T13:39:19.477" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4699" PostTypeId="2" ParentId="4689" CreationDate="2018-05-02T15:03:36.987" Score="3" Body="&lt;p&gt;I think showing examples from the Python language can be helpful.&lt;/p&gt;&#xA;&lt;h2&gt;&lt;a href=&quot;https://docs.python.org/3/library/exceptions.html#exception-hierarchy&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Exception hierarchy&lt;/strong&gt;&lt;/a&gt;:&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;BaseException&#xA; +-- SystemExit&#xA; +-- KeyboardInterrupt&#xA; +-- GeneratorExit&#xA; +-- Exception&#xA;      +-- StopIteration&#xA;      +-- StopAsyncIteration&#xA;      +-- ArithmeticError&#xA;      |    +-- FloatingPointError&#xA;      |    +-- OverflowError&#xA;      |    +-- ZeroDivisionError&#xA;      +-- AssertionError&#xA;      +-- AttributeError&#xA;      +-- BufferError&#xA;      +-- EOFError&#xA;      +-- ImportError&#xA;      |    +-- ModuleNotFoundError&#xA;      +-- LookupError&#xA;      |    +-- IndexError&#xA;      |    +-- KeyError&#xA;      +-- MemoryError&#xA;      +-- NameError&#xA;      |    +-- UnboundLocalError&#xA;      +-- OSError&#xA;      |    +-- BlockingIOError&#xA;      |    +-- ChildProcessError&#xA;      |    +-- ConnectionError&#xA;      |    |    +-- BrokenPipeError&#xA;      |    |    +-- ConnectionAbortedError&#xA;      |    |    +-- ConnectionRefusedError&#xA;      |    |    +-- ConnectionResetError&#xA;      |    +-- FileExistsError&#xA;      |    +-- FileNotFoundError&#xA;      |    +-- InterruptedError&#xA;      |    +-- IsADirectoryError&#xA;      |    +-- NotADirectoryError&#xA;      |    +-- PermissionError&#xA;      |    +-- ProcessLookupError&#xA;      |    +-- TimeoutError&#xA;      +-- ReferenceError&#xA;      +-- RuntimeError&#xA;      |    +-- NotImplementedError&#xA;      |    +-- RecursionError&#xA;      +-- SyntaxError&#xA;      |    +-- IndentationError&#xA;      |         +-- TabError&#xA;      +-- SystemError&#xA;      +-- TypeError&#xA;      +-- ValueError&#xA;      |    +-- UnicodeError&#xA;      |         +-- UnicodeDecodeError&#xA;      |         +-- UnicodeEncodeError&#xA;      |         +-- UnicodeTranslateError&#xA;      +-- Warning&#xA;           +-- DeprecationWarning&#xA;           +-- PendingDeprecationWarning&#xA;           +-- RuntimeWarning&#xA;           +-- SyntaxWarning&#xA;           +-- UserWarning&#xA;           +-- FutureWarning&#xA;           +-- ImportWarning&#xA;           +-- UnicodeWarning&#xA;           +-- BytesWarning&#xA;           +-- ResourceWarning&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In my opinion, seeing a graphical representation like this makes everything much easier to understand, because it's a practical example, and it's easy to see that &lt;code&gt;ZeroDivisionError&lt;/code&gt; would be a subclass of &lt;code&gt;ArithmeticError&lt;/code&gt;. This example works for more languages, too, since Java has something similar.&lt;/p&gt;&#xA;&lt;p&gt;An exercise could involve creating and extending your own &lt;code&gt;Exception&lt;/code&gt; classes.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;&lt;a href=&quot;https://docs.python.org/3/library/numbers.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;&lt;code&gt;numbers&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;:&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Number -&amp;gt; Complex -&amp;gt; Real -&amp;gt; Rational -&amp;gt; Integral&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The linked documentation does a great job of describing what each class adds to its base class. Since computer science students should also be familiar with these mathematical &amp;quot;classes&amp;quot; of numbers and their various properties, this can be a useful example, depending on the age of the students.&lt;/p&gt;&#xA;&lt;p&gt;There are plenty of mathematical concepts that can be used as an exercise for inheritance, so pick some that are simple enough for your class to work with and have them create a tree-style diagram of the inheritance.&lt;/p&gt;&#xA;" OwnerUserId="4570" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-02T15:09:44.570" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4700" PostTypeId="1" CreationDate="2018-05-02T16:53:54.713" Score="3" ViewCount="102" Body="&lt;p&gt;At our high school, our tech department has made many strides in the past decade. The courses and technology we offer are a matter of pride when showcasing our school. However, our department is small and we are trying our best to grow our staff and courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The proposal has been going around that we should merge our department with the science department. There are many reasons for this. But, for the most part, there are two main ideas here. We can write all science courses with stressing technology and scientific tools. Secondly, we can rally both departments and create all our courses with the theme around 'Discovery'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yet, everyone in the Technology department, including myself, seems rather hesitant with this. We understand the idea of infusing technology into the science courses, but we wonder what the impact of a scientific approach to the courses we have created. We see a distinct difference between scientific discovery and inquire vs the design, creativity, and problem-solving in our technology courses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone merged their tech (or CS) department with their science departments? What have you found beneficial with this? What problems have you discovered? I am looking to weight our pros and cons over this issue&lt;/p&gt;&#xA;" OwnerUserId="5012" LastActivityDate="2018-05-02T22:14:54.627" Title="Should we merge technology departments with the science departments?" Tags="|curriculum-design|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4701" PostTypeId="2" ParentId="4700" CreationDate="2018-05-02T17:16:16.220" Score="2" Body="&lt;p&gt;Rather than providing experience, let me add a bit to a way you can think about the issue and, perhaps, resolve it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are correct that the scientific method, the mathematical method, and the computing sciences method are all distinct. So, experiments in the Chemistry sense are much less important and frequent in CS. However, there are some synergies, and the sciences can provide useful examples for the creation of programs and systems. Also, Computing can be useful in the sciences, handling Big Data, for example or executing theoretical models. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest three things to think about. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Is this a bottom up (faculty driven) initiative or top down (administration wanting changes)? The latter is likely to be much less successful. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Are the faculty already knowledgeable cross-discipline? It will be much less successful otherwise. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How important is it to you to have pair-teaching (co-teaching, team-teaching) of several courses in your institution? Especially pair teaching with instructors of different core disciplines. Without that, I wouldn't expect a lot of benefit other than needing fewer &quot;department chairpeople&quot;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Synergy is possible and valuable. But forcing it won't work very well. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-02T17:16:16.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4702" PostTypeId="2" ParentId="4689" CreationDate="2018-05-02T20:08:33.047" Score="2" Body="&lt;h1&gt;Implement nested arithmetic expressions.&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;Let me start with what it can look like, and then I'll explain why it's a great example.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;It starts very simple:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class Number:&#xA;    def __init__(self, value=0):&#xA;        self.value = value&#xA;&#xA;    def evaluate(self):&#xA;        return self.value&#xA;&#xA;class Sum:&#xA;    def __init__(self, *parts):&#xA;        self.parts = parts&#xA;&#xA;    def evaluate(self):&#xA;        return sum(map(lambda part: part.evaluate(), self.parts))&#xA;&#xA;print(Number(42).evaluate())&#xA;print(Sum(Number(20), Number(20), Number(2)).evaluate())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Then it slightly grows:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;import functools&#xA;&#xA;class Product:&#xA;    def __init__(self, *factors):&#xA;        self.factors = factors&#xA;&#xA;    def evaluate(self):&#xA;        return functools.reduce(lambda acc, expr: acc * expr.evaluate(),&#xA;                                self.factors, 1)&#xA;&#xA;print(Sum(Product(Number(6), Number(6)), Number(6)).evaluate())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And yet a bit more:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class Fraction:&#xA;    def __init__(self, numerator, denominator):&#xA;        self.numerator, self.denominator = numerator, denominator&#xA;&#xA;    def evaluate(self):&#xA;        return self.numerator.evaluate() / self.denominator.evaluate()&#xA;&#xA;print(Fraction(Sum(Number(42), Number(42)), Number(2)).evaluate())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And it can go on for quite a while.&lt;/p&gt;&#xA;&lt;h3&gt;Why is it a great example?&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it's small,&lt;/li&gt;&#xA;&lt;li&gt;it implements familiar objects,&lt;/li&gt;&#xA;&lt;li&gt;it is something useful (every calculator or interpreter has some code like this).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;How can it be extended?&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add pretty printing (advanced flavor: with minimal number of parentheses),&lt;/li&gt;&#xA;&lt;li&gt;add variables (so that evaluate takes environment dict as argument),&lt;/li&gt;&#xA;&lt;li&gt;add more operations,&lt;/li&gt;&#xA;&lt;li&gt;add logical expressions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Where is the inheritance?&lt;/h3&gt;&#xA;&lt;p&gt;I'd like to point that I didn't use Python's subclassing at any point here, and it was on purpose: Python's subclassing is mostly about implementation inheritance, and here it's not necessary at all. Of course, if you use type hints, you should define an interface, but only in that case. Python is generally duck-typed and there's not much point in pretending it's not. However, you can also add some shared implementation to this example.&lt;/p&gt;&#xA;&lt;h2&gt;Adding implementation inheritance&lt;/h2&gt;&#xA;&lt;p&gt;There is at least one thing that all kinds of expressions may easily share: &lt;strong&gt;caching&lt;/strong&gt;. Example base class could look like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class Expression:&#xA;    def __init__(self):&#xA;        self._cached_value = None&#xA;&#xA;    def cached_evaluate(self):&#xA;        if self._cached_value is None:&#xA;            self._cached_value = self._evaluate()&#xA;        return self._cached_value&#xA;&#xA;    def evaluate(self):&#xA;        raise NotImplementedError(&#xA;            &amp;quot;Expressions must implement evaluate() method&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;A few tweaks to expression classes, and basic caching is there.&lt;/p&gt;&#xA;&lt;p&gt;Another idea to add common implementation would be listing free variables occuring in the expression (after adding variables ofc). First, make subclasses implement method &lt;code&gt;subexpressions()&lt;/code&gt; (returning list of subexpressions, e.g. &lt;code&gt;self.parts&lt;/code&gt; in case of sum). After that, implement method &lt;code&gt;variables&lt;/code&gt; in Expression, and override it in Var/Variable (to return the single variable used there). The effect should be something like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; Sum(Var('a'), Var('b'), Var('c')).variables()&#xA;set(['a', 'b', 'c'])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;One problem with these examples is that the base class is more of a mixin than a real base. But I don't think you can do much better without going big. So, ultimately, you may want to go big.&lt;/p&gt;&#xA;&lt;h1&gt;Want really interesting inheritance? Go big, use a framework.&lt;/h1&gt;&#xA;&lt;p&gt;While little examples like above are good for understanding the basics, the most practical examples of implementation inheritance are big, all-inclusive classes provided by frameworks, like Django's &lt;a href=&quot;https://docs.djangoproject.com/en/2.0/topics/class-based-views/&quot; rel=&quot;nofollow noreferrer&quot;&gt;views&lt;/a&gt; and &lt;a href=&quot;https://docs.djangoproject.com/en/2.0/ref/forms/api/&quot; rel=&quot;nofollow noreferrer&quot;&gt;forms&lt;/a&gt;. You may consider using them to show some practical uses of inheritance. While writing a Django¹ application is definitely an overkill, modifying one may be perfectly good task even on (relatively) early level.&lt;/p&gt;&#xA;&lt;p&gt;If you prepare a working application that needs relatively small modification, like adding a view with different sorting, it may be a good hands-on experience. However, this &lt;em&gt;is&lt;/em&gt; risky, and may be daunting experience if either students or exercise are not prepared well enough, so proceed with great care (if at all).&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;¹There's a number of frameworks with great examples, Django is just the one I'm familiar with.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-03T00:23:14.453" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4703" PostTypeId="2" ParentId="4700" CreationDate="2018-05-02T22:14:54.627" Score="1" Body="&lt;p&gt;My gut answer is &quot;no&quot;, but that's all it is - a gut reaction.  However, I do have a suggestion as an alternative: cross-curricular projects.  At my school, we have developed several cross-curricular projects over the years that accomplish what I believe your school is seeking.  For example, in the fall of their sophomore year, students are required to take programming, Earth Science or APES, and of course English II.  The cross-curricular project for those three courses is one in which they must research ten population equations, find data for several geographical areas, write a program to accept user input and/or read data from files to calculate and output population statistics for their geographical areas, and then write a project summary paper for their English portfolio.  That is just one example.  There are two major cross-curricular projects each year of their high school career, and each project includes at least one technology course and one science course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These projects have taken years to develop.  But through that development and execution they have provided synergy and cooperation between and among several departments without merging.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-05-02T22:14:54.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4705" PostTypeId="2" ParentId="4689" CreationDate="2018-05-04T02:31:39.293" Score="8" Body="&lt;p&gt;My coding school gave one particular (weeks-long) project that I felt nailed the concept of inheritance, and why it could be useful:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Simulating a circuit board with logic gates.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The framework of the exercise can be adjusted, but here's a short example:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A circuit board is composed of circuit inputs, logic gates and circuit&#xA;  outputs; each of these components has a variable number of input pins&#xA;  and output pins. The output pin of a component can be connected to the&#xA;  input pin of another.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Ev3DJ.gif&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Ev3DJ.gif&quot; alt=&quot;Logic gates schema; stolen from BBC article&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;For instance, in the above circuit, there are three circuit inputs (A,&#xA;  B and C), and one circuit output (Z); the AND gate at the bottom has&#xA;  two input pins, and one output pin, connected to the input pin of the&#xA;  OR gate on the right.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;The goal of the exercise is to write a program that simulates a&#xA;  circuit board with the above rules; the program must e.g. parse a&#xA;  simple file describing the list of components, and how they're&#xA;  connected together; then parse the command line for commands such as&#xA;  &lt;code&gt;setInput B true&lt;/code&gt; or &lt;code&gt;updateCircuit&lt;/code&gt; or &lt;code&gt;printOuput Y&lt;/code&gt;. (or give the&#xA;  students another framework if you don't want them to worry about&#xA;  parsing text)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;If a logic gate forms a loop, the &quot;loop part&quot; must be delayed until&#xA;  the next update.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;You must implement the following components:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;AND Gate&lt;/li&gt;&#xA;  &lt;li&gt;OR Gate&lt;/li&gt;&#xA;  &lt;li&gt;NOT Gate&lt;/li&gt;&#xA;  &lt;li&gt;XOR Gate&lt;/li&gt;&#xA;  &lt;li&gt;Multiplexer&lt;/li&gt;&#xA;  &lt;li&gt;...&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;The circuits components must inherit from the following class:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class CircuitComponent {&#xA;public:&#xA;    virtual size_t getInputCount() const = 0;&#xA;    virtual void connectInput(size_t inputPin, const CircuitComponent* other, size_t outputPin) = 0;&#xA;&#xA;    virtual void updateOutputsFromInputs() = 0;&#xA;&#xA;    virtual size_t getOutputCount() const = 0;&#xA;    virtual bool getOutputValue(size_t outputPin) const = 0;&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are several things that I like about this exercise:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;It's as close to a real example as you can get.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's, in my opinion; a use case where inheritance is the best solution; unlike other cases where some form of composition might be better suited.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It shows how a good base class can make your workflow easier; with the interface I gave, there is basically only one update model that can be implemented (updating the inputs, then the components connected to the inputs, then the components connected to &lt;em&gt;these&lt;/em&gt; components, etc). It's also a good demonstration of expressivity through const-correctness.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It still has a few classic pitfalls of inheritance that most students will fall for, that you can easily point out. For instance, most students will implement circuit inputs and circuit outputs as children of the component class, and store them in one list/array with all other components, then use some convoluted dynamic_casting when they need to access the circuit's inputs/outputs. If they make that mistake, you can then point them towards a better solution, like storing inputs, logic gates and outputs in three different arrays, while still inheriting them from the same class, and they'll have learned from experience. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5028" LastActivityDate="2018-05-04T02:31:39.293" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4706" PostTypeId="2" ParentId="17" CreationDate="2018-05-04T14:32:26.877" Score="1" Body="&lt;p&gt;I thought of repetitive song lyrics, initially the &lt;a href=&quot;https://www.youtube.com/watch?v=0U2zJOryHKQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;Song That Never Ends&lt;/a&gt; - a good example of infinite recursion. Then came to mind &lt;a href=&quot;https://www.youtube.com/watch?v=T0ooQv7oHvw&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ten Green Bottles&lt;/a&gt;, which I think is a nice simple illustration with a clear base case and inputs that keep reducing, ultimately to the base case.&lt;/p&gt;&#xA;" OwnerUserId="5032" LastActivityDate="2018-05-04T14:32:26.877" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4707" PostTypeId="2" ParentId="17" CreationDate="2018-05-04T15:22:26.157" Score="1" Body="&lt;p&gt;You can do some stuff with the filesystem&lt;br&gt;&#xA;like. start with a folder and count all files in it&lt;br&gt;&#xA;or let them create a overview of folders and files&lt;/p&gt;&#xA;" OwnerUserId="3516" LastActivityDate="2018-05-04T15:22:26.157" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4710" PostTypeId="2" ParentId="17" CreationDate="2018-05-05T12:02:28.717" Score="1" Body="&lt;p&gt;I think there are two separate aspects to understanding recursion:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to use recursion to solve problems&lt;/li&gt;&#xA;&lt;li&gt;How recursion is evaluated&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;How to use recursion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Let's look at an example: maximum depth of a binary tree (where a tree with a single node is depth 1). A recursive solution in python might look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def max_depth(root):&#xA;  if root is None:&#xA;    return 0&#xA;&#xA;  return 1 + max(max_depth(root.left), max_depth(root.right))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You don't need to think about how this is actually evaluated; you just define it how you would mathematically. If I &lt;em&gt;somehow&lt;/em&gt; know that the maximum depth of the left branch is $x$ and the maximum depth of the right branch is $y$ and that $x &amp;gt; y$ (without loss of generality), then I know that the maximum depth of the entire tree is $1 + x$. This way of thinking about problems is one way you can use recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you need to make sure that the inputs to the recursive calls are in some way smaller than the input to the function that makes the recursive call, which segues into how recursion is evaluated.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How recursion is evaluated&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To think about how recursion is evaluated, we can use the same example. In the example above, there are pending recursive calls, waiting to return (note that recursion does not necessarily have this, see &lt;a href=&quot;https://en.wikipedia.org/wiki/Tail_call&quot; rel=&quot;nofollow noreferrer&quot;&gt;tail call&lt;/a&gt;). To see this, suppose our tree looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    O &amp;lt;- root&#xA;   / \&#xA;  O   O&#xA; / \&#xA;O   O&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and you have a variable r storing the root. If you call &lt;code&gt;max_depth(r)&lt;/code&gt;, it will try to evaluate the else clause; it will evaluate &lt;code&gt;max(max_depth(r.left), ...)&lt;/code&gt; and then add 1 to that result. To the &lt;code&gt;r.left&lt;/code&gt; recursive call, the input looks like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     O&#xA;    / \&#xA;   O   O&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And for the &lt;code&gt;r.right&lt;/code&gt; recursive call, it is simply this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;O&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;r.left&lt;/code&gt; recursive call evaluates else clause, which means it tries to evaluate the max depth of the left and right subtrees, and add 1 to whichever is greater.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;r.right&lt;/code&gt; recursive call also evaluates the else clause.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So at this point you think of the return value of the original call to max_depth looking like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + max(&#xA;               1 + max(max_depth(root.left.left), max_depth(root.left.right),&#xA;               1 + max(max_depth(root.right.left), max_depth(root.right.right))&#xA;              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Both recursive calls of the left branch have trees that look like this now&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;O&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;while both recursive calls of the right branch, since it was just a node without any children, have trees that are empty, which is &lt;code&gt;None&lt;/code&gt; in Python. Thus, they fall to the base-case, which means it is evaluated as 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So now the original return value is like this&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + max(&#xA;               1 + max(&#xA;                       1 + max(max_depth(root.left.left.left), max_depth(root.left.left.right)),&#xA;                       1 + max(max_depth(root.left.right.left), max_depth(root.left.right.right))&#xA;                      ),&#xA;               1 + max(&#xA;                       0,&#xA;                       0&#xA;                      )&#xA;              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;All recursive paths from the right branch already reached the base-case, and now on this recursive call, all children of the left branch will as well, which means the return value of the original function is now&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + max(&#xA;               1 + max(&#xA;                       1 + max(&#xA;                               0,&#xA;                               0&#xA;                              ),&#xA;                       1 + max(&#xA;                               0,&#xA;                               0)&#xA;                      ),&#xA;               1 + max(&#xA;                       0,&#xA;                       0&#xA;                      )&#xA;              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which evaluates to&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + max(&#xA;               1 + max(&#xA;                       1 + 0,&#xA;                       1 + 0&#xA;                      ),&#xA;               1 + 0&#xA;              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + max(&#xA;               1 + 1,&#xA;               1 + 0&#xA;              )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;return 1 + 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;finally&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Note, this evaluation was not performed according to any formal evaluation model (see &lt;a href=&quot;https://www.cs.cornell.edu/courses/cs3110/2013sp/lectures/lec06-subst-model/lec06.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;substitution model&lt;/a&gt; or &lt;a href=&quot;https://berkeley-cs61as.github.io/textbook/the-environment-model-of-evaluation.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;environment model&lt;/a&gt;); it was merely to help build intuition for how evaluation could be done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Extra (tail-recursion)&lt;/strong&gt;: I mentioned earlier about how recursion does not necessarily have these pending function calls that must be recursed back to once they finally have the result of the recursive call. Consider a recursive function to find the sum of a list (ignoring the python built-in &lt;code&gt;sum()&lt;/code&gt;):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def sum_list(lst):&#xA;  if lst == []:&#xA;    return 0&#xA;&#xA;  return lst[0] + sum_list(lst[1:])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This indeed would have pending recursive calls, as it waits to add lst[0] to the result of the recursive calls. We can make this tail-recursive by accumulating the sum of the list in an argument that is simply returned unmodified at the end:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def sum_list_tail_recursive(lst, result):&#xA;  if lst == []:&#xA;    return result&#xA;&#xA;  return sum_list_tail_recursive(lst[1:], result + lst[0])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Once this evaluation reaches the base-case, it has the the result of the original call to &lt;code&gt;sum_list()&lt;/code&gt;, and it does not need to be added to, or modified in any way as you recurse back up, and so if a compiler/interpreter recognizes this, it can optimize by skipping directly to the first call, eliminating the need to recurse back to it step-by-step.&lt;/p&gt;&#xA;" OwnerUserId="4384" LastEditorUserId="4384" LastEditDate="2018-07-27T22:48:28.663" LastActivityDate="2018-07-27T22:48:28.663" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4711" PostTypeId="2" ParentId="4689" CreationDate="2018-05-05T12:26:18.163" Score="1" Body="&lt;p&gt;When I want to give an example of how inheritance works, I always point to C#'s &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.stream(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Stream&lt;/code&gt;&lt;/a&gt; class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;Stream&lt;/code&gt; class is an abstraction of the idea of a data stream from which bytes can be taken or to which bytes can be stored. Its child classes include &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.filestream(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;FileStream&lt;/code&gt;&lt;/a&gt; which represents the data of a file, &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.memorystream(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;MemoryStream&lt;/code&gt;&lt;/a&gt; which represents data in memory (RAM), &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.bufferedstream(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;BufferedStream&lt;/code&gt;&lt;/a&gt; which is an adaptor to provide an extra layer of data buffering, and &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.security.cryptography.cryptostream(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;CryptoStream&lt;/code&gt;&lt;/a&gt; which represents a layer of encryption.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a very abstract example, but it's a real world example that highlights how different implementations of the same interface can be incredibly useful.  It demonstrates the use of virtual functions, abstraction, the &lt;a href=&quot;https://en.wikipedia.org/wiki/Dependency_inversion_principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;dependency inversion principle&lt;/a&gt; and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Liskov_substitution_principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;liskov substitution principle&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any &lt;code&gt;Stream&lt;/code&gt; can be wrapped in a &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.streamreader(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;StreamReader&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.streamwriter(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;StreamWriter&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.binaryreader(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;BinaryReader&lt;/code&gt;&lt;/a&gt; or &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.binarywriter(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;BinaryWriter&lt;/code&gt;&lt;/a&gt; to handle the ability to read/write data more complex than bytes. These are also good examples of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Decorator_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;decorator pattern&lt;/a&gt; being used 'in the wild'.&#xA;(&lt;code&gt;StreamReader&lt;/code&gt; and &lt;code&gt;StreamWriter&lt;/code&gt; in turn inherit &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.textreader(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;TextReader&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.io.textwriter(v=vs.110).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;TextWriter&lt;/code&gt;&lt;/a&gt;, which are themselves another good example.)&lt;/p&gt;&#xA;" OwnerUserId="1538" LastEditorUserId="1538" LastEditDate="2018-05-05T13:35:53.957" LastActivityDate="2018-05-05T13:35:53.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4712" PostTypeId="1" AcceptedAnswerId="4713" CreationDate="2018-05-06T10:53:05.127" Score="3" ViewCount="130" Body="&lt;p&gt;I was recently asked to teach someone OOP and C++, to a relatively advanced level in the former and an intermediate level in the latter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After one half of a private lesson, it became clear that the student isn't good at learning in this way. Instead, I tried to give the student some links to explanations and examples (mainly so that the student could learn the remainder of that lesson's material).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That proved to be so effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the next lesson, I won't &quot;bother&quot; with teaching the student. I've found a satisfactory collection of websites that cover the relevant material for the lesson, but I am at a loss on how to order them (and, indeed, the curriculum in the broader sense).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This made me think of the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are probably many students that learn from websites and links etc. much more effectively, as opposed to learning in a classroom (mostly self-learners)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my question is how can a teacher (or student) find resources that both cover the material, provide example and exercise and are ordered in synergy?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, OOP and C++ each have many subjects and points of interest that are built on one another. For complex subjects/paradigms, it is much harder to find fitting resources. So the methods (for constructing a curriculum built upon resources and websites as detailed above) I am looking for should be able to tackle such a complex combination, meant for less than 5 students.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2018-05-06T11:44:29.700" LastActivityDate="2018-05-06T13:19:48.840" Title="Constructing a curriculum from multiple resources for complex subjects" Tags="|curriculum-design|lesson-order|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="4713" PostTypeId="2" ParentId="4712" CreationDate="2018-05-06T13:10:04.587" Score="4" Body="&lt;p&gt;At this scale (fewer than 5 students) lectures are a poor choice of educational methodology in any case. Lectures were created as a way to scale up education for the masses. They are driven by economic considerations, not educational ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you have here is precisely the scale of an &lt;a href=&quot;http://www.ox.ac.uk/admissions/undergraduate/student-life/exceptional-education/personalised-learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oxford University Tutorial&lt;/a&gt; in which a few students meet a few times a week with an expert who guides them. Students prepare work in advance. The tutor comments and guides them. He/she can suggest readings, possibly different for each student, and sets new tasks or re-work on existing tasks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also investigate &lt;a href=&quot;https://en.wikipedia.org/wiki/Inquiry-based_learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Inquiry Based Learning&lt;/a&gt; (Thanks to User &lt;a href=&quot;https://cseducators.stackexchange.com/users/1568/skull&quot;&gt;skull&lt;/a&gt; for proposing that idea in the &lt;a href=&quot;https://chat.stackexchange.com/rooms/59174/the-classroom&quot;&gt;classroom&lt;/a&gt;). This is essentially the same concept as the tutorial, and emphasizes Active Learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thirdly, you also have precisely the scale for a small Agile Software Development team that could be set to a building task using one week iterations that also required that they learn about the language, process, and OO principles as they go. You become both the product customer and the learning Coach. When their code could be improved, show them how in your meetings and have them update it in the next &quot;iteration&quot;. With this idea, perhaps combined with the tutorial idea, you can encourage them to teach one another so that not everything they learn comes from you. This can also take Active Learning to the &quot;next level.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an undergraduate in Maths (shortly after Plato's death), I had at least one course with such a small number of students. One of our tasks was to periodically prepare a topic for presentation to the rest of the class. This might also be possible. Their &quot;lecture&quot; might only require a few minutes and be accompanied by a Q/A session. You can do a wrap-up yourself. This technique can also, over time, helps students overcome their natural reluctance to perform publicly. Many of them will eventually go in to careers in which such performance can be a valuable skill, so you can advance their skill/knowledge on many fronts simultaneously. For some of the students you might need to review their mini-lecture prior to their presentation, both for content and for reassurance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real issue is that different people have different ways of learning. You already recognize that and have made adjustments for it, but you may be able to go farther. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure that this scales to as many as ten students, however. But some of it might for relatively advanced (i.e. experienced) students. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For a more direct answer to your question (finding resources), you can have the students assist in this. Some sort of computer mediated communication (email list, wiki,...) can be used and students can contribute helpful resources to it. You can reward them for this, also. If it is something like a wiki, you also preserve the resources for the future. You also have a handy way to toss in resources as you come across them and students will have immediate access. Students can also, perhaps, comment on the helpfulness of their peer's contributions, aiding your eventual evaluations. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-06T13:19:48.840" LastActivityDate="2018-05-06T13:19:48.840" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4714" PostTypeId="1" CreationDate="2018-05-07T21:22:11.623" Score="4" ViewCount="162" Body="&lt;p&gt;One of the trickier concepts that comes up in the realm of cryptography is the notion of zero-knowledge protocols (also referred to as &lt;a href=&quot;https://en.wikipedia.org/wiki/Zero-knowledge_proof&quot; rel=&quot;noreferrer&quot;&gt;zero-knowledge proofs&lt;/a&gt;).  This is a way to verify an end-user's identity without having to store a password or some other sort of proof of user identity on the server. As you can imagine this is a lot more secure because if a hacker hacks the server, there's no secret for them to discover about a given user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How to explain this idea to students though? &lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2018-05-09T18:46:58.910" Title="How Can I Explain The Concept Of Zero Knowledge Proofs To Students" Tags="|cryptography|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4715" PostTypeId="2" ParentId="4714" CreationDate="2018-05-07T21:22:11.623" Score="0" Body="&lt;p&gt;&quot;&lt;a href=&quot;http://pages.cs.wisc.edu/~mkowalcz/628.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to explain zero-knowledge protocols to your children&lt;/a&gt;&quot; is a lucid and well-written example of what zero-knowledge proofs and protocols are. Using a fictional story of Ali Baba and a magical cave, the author explains the concept in plain, straightforward terms.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2018-05-07T21:22:11.623" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4717" PostTypeId="1" AcceptedAnswerId="4718" CreationDate="2018-05-07T22:38:02.957" Score="124" ViewCount="38302" Body="&lt;p&gt;When teaching Intro CS in Java, I sometimes tell students things that are not entirely true, such as that, unlike abstract classes, interfaces cannot contain any code. (For those of you unfamiliar with Java, that was true until functional interfaces were added with Java 1.8 in 2014.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize I could put an asterisk on the slide, or visibly cross my fingers, and let students know I'm not telling the full story, but, when I witness other instructors allude to irrelevant advanced material, I view them as pedantic and fear that students find the additional information distracting or confusing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't mean to open a debate on the importance of functional interfaces in Java -- they're just an example. What I'd like to know is if it's considered better to gloss over details in an introductory class or to always speak the whole truth.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2022-06-09T22:32:18.500" Title="Is it better to lie to students or to be pedantic when teaching Intro CS?" Tags="|best-practice|" AnswerCount="16" CommentCount="37" ContentLicense="CC BY-SA 4.0" />
  <row Id="4718" PostTypeId="2" ParentId="4717" CreationDate="2018-05-07T22:50:33.837" Score="183" Body="&lt;p&gt;Lying is good. But advertise it when you lie. Make sure students make a note of it that you are lying.&lt;/p&gt;&#xA;&lt;p&gt;Pedantic is bad. If you try to explain &lt;em&gt;everything&lt;/em&gt; you will wind up explaining &lt;em&gt;nothing&lt;/em&gt;. Let me take a simpler example. In java we have a special incantation&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public static void main(String [] args)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We put it in every program. It distinguishes a program. But if you start your java course explaining every part of it you will (a) confuse the juices out of them and (b) never get to the point of writing a useful program. For the beginner, it is just an incantation like&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;Riddikulus; // used in defence against a Boggart.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The Java code is just a &amp;quot;charm&amp;quot; for the beginner. All you need to say is that it is a &amp;quot;hook&amp;quot; for the OS to find its way into your program. Explain it later after you've taken up some of its elements for other purposes.&lt;/p&gt;&#xA;&lt;p&gt;Beginners need a simple but coherent view of their language and system. When you simplify, work hard to keep it consistent. But it doesn't need to be complete and certainly not exhaustive.&lt;/p&gt;&#xA;&lt;p&gt;When you are giving an &amp;quot;overly&amp;quot; simplified view, say that explicitly. Have the students mark their notes with an asterisk (or the above charm) so that they know it isn't complete. If you are explicitly asked for &amp;quot;the rest of the story&amp;quot; you have to decide whether it will help to include it (after the commercial break, of course) or to defer it or to enlighten the students out of the class context (email, say), or give a reference for those who &amp;quot;will &lt;em&gt;not&lt;/em&gt; be denied.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;I used to start some discussions with &amp;quot;I'm about to lie to you, but it will be helpful if you accept my lie for a bit&amp;quot;. Of course I had to remember to come back an fill in the blanks  later, but it might not be for a while. Complex, inter-dependent topics are like that.&lt;/p&gt;&#xA;&lt;p&gt;tl;dr: &lt;strong&gt;Lie, but honestly and truthfully.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;And, perhaps the most important caveat, &lt;em&gt;don't lie in such a way that the student later needs to &lt;strong&gt;unlearn&lt;/strong&gt; something&lt;/em&gt;. Lying is giving partial truths, or temporary world views, not sending students into mental blind alleys and backwaters. Withholding some facts may be necessary and valuable as is presenting an incomplete metaphor. UnLearning should never be part of learning.&lt;/p&gt;&#xA;&lt;p&gt;I'll also note that infants learn to speak a native language without everything being explained to them before they begin. The deeper understanding comes to them only gradually and over time. We are actually conditioned by evolution to work this way.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Added in June 2022. &lt;a href=&quot;http://www.qwantz.com/index.php?comic=3907&quot; rel=&quot;noreferrer&quot;&gt;Today's Dinosaur Comics&lt;/a&gt; gives a good illustration of this. Note that Ryan North, the creator of Dinosaur Comics has a masters in CS.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-06-07T12:10:38.577" LastActivityDate="2022-06-07T12:10:38.577" CommentCount="20" ContentLicense="CC BY-SA 4.0" />
  <row Id="4719" PostTypeId="2" ParentId="4658" CreationDate="2018-05-08T00:42:58.263" Score="2" Body="&lt;p&gt;Programmers who learn only how to use libraries, without having even an inkling of what’s inside them or how they might be constructed, often become apprentice magicians throwing together opaque incantations.  The habit of throwing together sequences of magic incantations to solve problems often has negative consequences (mobile and data center power consumption, cache thrashing, demons stealing one’s firstborn child, and etc.)&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2018-05-08T00:42:58.263" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4720" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T00:53:38.837" Score="24" Body="&lt;p&gt;&lt;strong&gt;I am currently a student&lt;/strong&gt; in a computer science bootcamp learning js, C# and asp.net mvc5.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what its worth, I appreciate the honesty when my instructor uses crossed fingers.(He will pause to cross his right and middle finger and prominently display them in front of him before/while continuing with a &quot;fuzzy truth&quot;) I will treat knowledge given to me in this manner as practical use advice and not grounded principle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I feel that telling hidden un-truths for the sake of a smoother delivery sets a bad precedent and has potential to act as a crutch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And isn't there always the chance a student &quot;catches&quot; the lie and becomes very confused?&lt;/p&gt;&#xA;" OwnerDisplayName="user5052" LastEditorDisplayName="user5052" LastEditDate="2018-05-08T01:17:13.283" LastActivityDate="2018-05-08T01:17:13.283" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4721" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T01:48:52.313" Score="11" Body="&lt;p&gt;I would suggest saying &quot;for the purposes of this class&quot; or something along those lines to make it clear that while it may not be true, they can take it as truth, and that they don't need to learn the obscure case where it isn't as a hope for an surprise question or the like, similarly to how when teaching elementary physics you would typically ignore wind resistance and relativistic effects &lt;/p&gt;&#xA;" OwnerUserId="2050" LastActivityDate="2018-05-08T01:48:52.313" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4722" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T02:30:25.827" Score="94" Body="&lt;p&gt;I would start sentences with &quot;Generally speaking...&quot; and I would appreciate if my professors did the same. It hints that there is more to know but doesn't waste time explaining anything further. If your students are curious enough they can raise their hand to inquire. If it takes too much time to explain during class and someone wants to know, you can offer more of your time during your office hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nobody likes being lied to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The phrase &quot;generally speaking&quot;, does not imply that you are lying, it just points out that it is the most common case of something. You could also begin sentences with &quot;Typically...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that particular example, you don't have to say &quot;cannot&quot;, you could say they &quot;typically don't&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Generally speaking, interfaces do not contain any code.&quot; It shouldn't be more complicated than that.&lt;/p&gt;&#xA;" OwnerUserId="5054" LastEditorUserId="5054" LastEditDate="2019-08-06T16:43:36.630" LastActivityDate="2019-08-06T16:43:36.630" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4723" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T03:35:01.363" Score="11" Body="&lt;p&gt;I must say, I largely agree with the posters so far.  The principle of lying with your fingers crossed is a good one.  &lt;em&gt;However&lt;/em&gt;, I have two caveats, and I believe that they are important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;First, I have a small bone to pick with something &lt;a href=&quot;https://cseducators.stackexchange.com/a/4720/27&quot;&gt;/u/SlyFiye said&lt;/a&gt;:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For what its worth, I appreciate the honesty when my instructor uses crossed fingers .... I will treat knowledge given to me in this manner as &lt;strong&gt;practical use advice and not grounded principle.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;(emphasis mine)&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me that this is exactly backwards.  The reason to give an incomplete picture is to allow students to absorb important grounding principled before adding wrinkles and complexities.  This is what motivates the entire enterprise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second, the principle is one for&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;usually,&lt;/em&gt;&lt;/strong&gt; &lt;strong&gt;and not for&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;always.&lt;/em&gt;&lt;/strong&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've repeatedly observed in my own classroom that, if my students are already somewhat lost in a complex topic, even hinting that there might be more complexity beneath the surface causes them to completely lose the topic.  It has been consistent enough that I am utterly convinced that this effect is real, and we need to treat it with care.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two brain-based theories for why this might be.  I have not found any research to support (or detract) from these theories, but they could both well explain the phenomenon:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple de-motivation.&lt;/strong&gt;  Upon hearing that this &lt;em&gt;very hard thing&lt;/em&gt; that they are faced with is partially false, the student simply despairs and gives up.  Why do all of the hard work to understand something that isn't even true?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Brain-scrambles.&lt;/strong&gt; What happens in a student's brain when they hear that there is more to the story may not exactly be the blank &lt;em&gt;&quot;okay, there will be more later&quot;&lt;/em&gt; that we might hope for. Instead, what might happen is a series of rapid mental transitions, in which the student mentally loops through the components of what they have learned and tries to guess at &lt;em&gt;which part&lt;/em&gt; might not be true, exactly, and what that truth might be.  This involves a sort of miniature cognitive scramble at each pass.  &lt;em&gt;&quot;Okay, so if&lt;/em&gt; &lt;strong&gt;&lt;em&gt;this&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;part isn't true, then maybe things don't quite connect the way I've just been shown.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason that this matters is that, if the connections in your student's brain are already quite tenuous, the process of scrambling can muck everything up.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When faced with the revelation that the topic has even more to it, confused students &lt;em&gt;still go through that same mental process described above&lt;/em&gt;, but what comes out of it is essentially spaghetti.  That tiny, inchoate thread that they were constructing about your topic will simply come apart.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Regardless of the reason, if my students are already confused, I have found it better to hold off on even mentioning that the material is really more complex.  Give the students a chance to try to get a handle on the ideas you have placed before them before inviting them entertain any further complexity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can come back around and fix things later. Or not. I actually take a rather dim view of making sure that every statement is always fully accurate. Sometimes insisting on total accuracy can pull your students deep enough into the weeds that they simply get lost, and never fully notice the giant statue that you were trying to point them to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I stand by what I said at the beginning; crossing your fingers is usually the best way to go.  But sometimes it can be more effective to choose your battles and let sleeping monsters lie.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-05-08T12:31:15.170" LastActivityDate="2018-05-08T12:31:15.170" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4724" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T07:08:04.843" Score="5" Body="&lt;p&gt;Just tell them you are trying to explain an important aspect of things, and you have to simplify a bit.&lt;/p&gt;&#xA;&lt;p&gt;I'm preparing a lecture about iterators in Java, so I use that example.  I tell student that iterable objects &lt;em&gt;must have&lt;/em&gt; an iterator method in order to implement the &lt;code&gt;Iterable&lt;/code&gt; generic interface&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;interface Iterable&amp;lt;T&amp;gt; {&#xA;    Iterator&amp;lt;T&amp;gt; iterator();&#xA;    ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and iterators have &lt;code&gt;next&lt;/code&gt; and &lt;code&gt;hasNext&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;interface Iterator&amp;lt;T&amp;gt; {&#xA;   boolean hasNext();&#xA;   T       next();&#xA;   ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That's all I want to explain. I don't oversimplify, but I don't want to say a word about &lt;code&gt;forEach&lt;/code&gt; and &lt;code&gt;remove&lt;/code&gt; and blood-thirsty spliterators from Jurassic Park at this point.  If some students read the documentation and ask questions, I point them to the ellipsis.&lt;/p&gt;&#xA;&lt;p&gt;But I make clear there are other things, not to be discussed now.&lt;/p&gt;&#xA;&lt;p&gt;About interfaces, what about telling they were &lt;strong&gt;mostly intended&lt;/strong&gt; to list methods to be implemented by concrete classes? It doesn't exclude the presence of other things in the interface.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;At some point, but much later, it can be interesting to explain why default methods were introduced in Java, whereas it seems a contradiction with their initial intent.&lt;/p&gt;&#xA;&lt;p&gt;To put it simply, lots of existing code uses the same standard interfaces as, for example, the collections. New features were added to collections interface, like forEach.  But it was not reasonable to ask customers provide implementations of forEach for all their existing classes. So language designers went by that tradeoff.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="1035" LastEditDate="2020-09-28T21:10:50.077" LastActivityDate="2020-09-28T21:10:50.077" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4725" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T08:57:59.790" Score="6" Body="&lt;p&gt;I don't see why you restrict your choice to either lie or be pedantic, both of which are negatives.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is pretty clear that almost all topics in CS are more complex than they seem at first; there always is a small visible surface, and a huge ice berg below. In fact, having a software developer who thinks he knows everything about a topic and has no open mind for further stuff is very hurtful in the real world, it can really wreak havoc in software projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your solution could be as simple as &quot;Today we are looking at the aspect of Java interfaces that makes it so they guarantee that classes implementing them define certain methods.&quot; (or whatever better formulation you can come up with). The important point is the &quot;Today we are looking at &lt;em&gt;the aspect of&lt;/em&gt; ...&quot;, the rest is just part of your irrelevant example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any student should pretty easily understand that if we look at one part of a puzzle, there are other parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get them into the habit that you &lt;em&gt;never&lt;/em&gt; give them the full picture (because, as the Hitchhiker tells us, that would be too humbling for our sanity...). If you, depending on the age of your audience, have to hammer it in, then preface your lecture by a picture of an iceberg (maybe together with the Titanic for some added humour...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, you could find an exhaustive list of features of your interfaces, and give them a kind of &quot;breadcrumb&quot; somewhere in your presentation (if you are not writing by hand on a board), highlighting the topic of the current session. Even if you lose no word about the other topics, they will be aware that there &lt;em&gt;are&lt;/em&gt; other topics. Like &quot;Interfaces: multiple inheritance; &lt;em&gt;abstract method definitions&lt;/em&gt;; default code...&quot;, if todays session is just about the fact that classes implementing the interfaces have to implement the methods, and that the caller can use the interface as a type if he does not need more information about the concrete classes.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2018-05-08T08:57:59.790" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4726" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T11:40:53.637" Score="38" Body="&lt;p&gt;As a current CS student, my lecturer use to solve this by simply using &lt;strong&gt;For now&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To come back to your interface example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For now, interfaces cannot contain any code, unlike abstract classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This gives a clear message, there is more to the topic, but it isn't relevant at the moment. When students ask you can always elaborate a little bit, but for the most questions I think this will be sufficient.&lt;/p&gt;&#xA;" OwnerUserId="5063" LastActivityDate="2018-05-08T11:40:53.637" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4727" PostTypeId="1" AcceptedAnswerId="4729" CreationDate="2018-05-08T13:10:46.350" Score="8" ViewCount="2349" Body="&lt;p&gt;Some use FP, some use OOP, some use procedure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems few universities start with logic programming, why?&lt;/p&gt;&#xA;" OwnerUserId="5065" LastActivityDate="2018-05-18T12:16:10.163" Title="Is it ok to use logic programming(like Prolog) as students' first language?" Tags="|language-choice|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4728" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T13:41:12.257" Score="8" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Tell all the truth but tell it slant —&lt;br&gt;&#xA;  Success in Circuit lies&lt;br&gt;&#xA;  Too bright for our infirm Delight&lt;br&gt;&#xA;  The Truth's superb surprise&lt;br&gt;&#xA;  As Lightning to the Children eased&lt;br&gt;&#xA;  With explanation kind&lt;br&gt;&#xA;  The Truth must dazzle gradually&lt;br&gt;&#xA;  Or every man be blind —  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Emily Dickinson, poem number 1129 in &lt;em&gt;&lt;a href=&quot;https://www.amazon.co.uk/Complete-Poems-Emily-Dickinson/dp/143957183X/ref=tmm_hrd_title_0?_encoding=UTF8&amp;amp;qid=&amp;amp;sr=&quot; rel=&quot;noreferrer&quot;&gt;Complete Poems&lt;/a&gt;&lt;/em&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dijkstra often mentions the limited size of our skulls, so maybe you could make a remark at the start of your teaching that you cannot possibly convey all of the subtleties of every topic and you are going to have to abbreviate to begin teaching somewhere. This is the opposite of my favorite principle: &lt;strong&gt;The Sweater Effect&lt;/strong&gt;: just start pulling anywhere, and sooner or later the entire thing will come unraveled.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess we could call your issue, &lt;strong&gt;The Enlightenment Effect&lt;/strong&gt;. Sometimes it is referred to as &quot;Lies to Children.&quot;&lt;/p&gt;&#xA;" OwnerUserId="5068" LastEditorUserId="104" LastEditDate="2018-05-08T14:02:03.907" LastActivityDate="2018-05-08T14:02:03.907" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4729" PostTypeId="2" ParentId="4727" CreationDate="2018-05-08T14:17:00.930" Score="15" Body="&lt;p&gt;I do and am currently teaching a high school student Prolog but not as a first language.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is it OK to use logic programming(like Prolog) as students' first language?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;While you could do it I would not advise doing it, let a student do it if they asked or be on a committee that would advocate for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reasons are&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Prolog is so much unlike other programming languages that there are very few other resources that a student could use as references for learning it and they would be very dependent on the teacher for learning. Many of the students I teach talk to others to round out their understanding of what I teach and while I would like to think that they clearly understand everything I say and get it correct the first time that just does not happen and so the students look to other means to augment their learning. With Prolog it is not only hard to find other good resources, but also students (and especially high school students) are hesitant to seek out help of knowledgeable peers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With regards to books, there is only one book that I would use as an introductory teaching book and that is &quot;Prolog Programming for Artificial Intelligence (4th Edition)&quot; by Ivan Bratko (&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0321417461&quot; rel=&quot;nofollow noreferrer&quot;&gt;Amazon&lt;/a&gt;) (&lt;a href=&quot;http://www.worldcat.org/oclc/770866932&quot; rel=&quot;nofollow noreferrer&quot;&gt;WorldCat&lt;/a&gt;). Java or Python have several tens of books and several are suitable for an introduction. Then for advanced books, Prolog only has a handful and of that only a few are of value. To learn the true art of programming in Prolog is something that only one or two books really are of mention. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few sites for learning Prolog, but many only skim the surface and of the web sites that teach Prolog most I would not recommend for a self-learner as they can leave you with more questions than answers. For more advanced topics the only web site of value I note is &lt;a href=&quot;https://www.metalevel.at/prolog&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Power of Prolog&lt;/a&gt; by Markus Triska&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there are several places to get online help with Prolog, the one I use is StackOverflow with the &lt;a href=&quot;https://stackoverflow.com/questions/tagged/prolog&quot;&gt;Prolog&lt;/a&gt; tag.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The key concepts to learning Prolog are not intuitive. Object-Oriented has state, and functional is stateless with pattern matching (one way). Prolog is stateless with unification (&lt;a href=&quot;https://en.wikipedia.org/wiki/Unification_(computer_science)#Syntactic_unification_of_first-order_terms&quot; rel=&quot;nofollow noreferrer&quot;&gt;think bi-directional pattern matching&lt;/a&gt;). Thinking in recursion has to be natural, processing lists must be second nature, constraint problems are common, difference list, use of syntactic sugar with DCGs, the operator definitions such as xfx, xfy, xf are different than most languages, reification, SLD, logical purity, program slicing, predicates vs. functions, MGU, and other concepts not seen in other common languages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One first has to learn unification and get it correct before moving forward. The problem here is that sometimes the class has to move forward before a student understands unification and then the rest of the course is endless confusion to the student. Also unification is symbolic and getting students to understand that abstract concept is sometimes very hard. On one test I gave to drive the point home, part of the unification test was with English letters, part with Greek letters and part with symbols like a snowman. After unification comes backtracking or backward chaining which gives Prolog non-deterministic programming. List processing is typically next and that is another topic that can lose many students. When teaching list processing I teach induction with a base case and induction step(s). Cut is another topic that loses many students and can make or break many programming solutions. The point here is that you may have to proceed slower at first and then pick up the pace or risk losing many of the students and there are many key concepts that rely on previous key concepts where only a complete understanding will suffice.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I normally provide links to the keywords but here have purposefully left them out so as to give others a taste of what it means to try and understand Prolog by trying to put these ideas together by themselves. I think Prolog is great and use it weekly but I know when and where to use it appropriately.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The best concepts of Prolog are typically incorporated into other languages as libraries or calls to external systems. In particular constraint solving is very useful but systems like &lt;a href=&quot;https://github.com/Z3Prover/z3&quot; rel=&quot;nofollow noreferrer&quot;&gt;Z3&lt;/a&gt; can be used instead for other languages.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There may be other languages that can do what Prolog can do and do more. e.g. &lt;a href=&quot;http://www.mercurylang.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mercury&lt;/a&gt; or expand on Prolog as a proof assistant, e.g. &lt;a href=&quot;https://coq.inria.fr/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coq&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Very few companies seek out employees who know Prolog. Universities want their graduates to get hired. Why teach a student something that won't get them hired? Also since many companies don't use Prolog, if you know Prolog and try and advocate for it in a company, you are probably going to be on the losing side. Not that I find any of this agreeable, but that is reality.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;With regards to AI Prolog gives closed world answers and while that is beneficial for some AI problems, IMHO is an Achilles heal for others. As an example, when it comes to classifying pictures I would not use Prolog but a deep neural network. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-05-09T15:02:46.217" LastActivityDate="2018-05-09T15:02:46.217" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="4730" PostTypeId="2" ParentId="4727" CreationDate="2018-05-08T15:30:00.197" Score="9" Body="&lt;p&gt;As &lt;a href=&quot;https://cseducators.stackexchange.com/a/4729/1293&quot;&gt;Guy Coder&lt;/a&gt; says, Prolog doesn't help a lot with employment. But it goes a bit farther than that. As educators we normally teach students in CS &lt;em&gt;how to build things.&lt;/em&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Logic_programming&quot; rel=&quot;noreferrer&quot;&gt;Logic Programming&lt;/a&gt; languages such as Prolog have other strengths, but building systems isn't their main goal. It therefore doesn't well support the courses that follow in most of the curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Logic Programming can be extremely important in some fields, such as (duh) Logic and also in AI, but not, generally speaking, in building information systems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, Logic Programming isn't the only useful tool that is seldom used as a first language. A CS curriculum isn't likely to treat SQL as a first programming language either, as useful (and powerful) as it is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main thing about these languages is that they focus on the answers themselves, not the algorithms used to find the answers. They are about &lt;em&gt;the what&lt;/em&gt; rather than &lt;em&gt;the how&lt;/em&gt;. In CS, we &lt;strong&gt;build things&lt;/strong&gt; and so the focus is mainly on the how, especially at the start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later on, such descriptive or declarative language can be extremely useful and there are courses that go into how they work internally, but implementing those algorithms isn't something the typical programmer often does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the future, this may change, but I think we are many years away from having systems so powerful that we can just, in general, describe what we want and have the system figure out how to achieve it. It is a long term goal, of course. Just so long as &lt;a href=&quot;https://en.wikipedia.org/wiki/Skynet_(Terminator)&quot; rel=&quot;noreferrer&quot;&gt;Skynet&lt;/a&gt; doesn't come along first. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-08T15:30:00.197" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4731" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T16:00:39.307" Score="17" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;unlike abstract classes, interfaces generally do not contain any code&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is not a lie.  In a large lecture hall, if they ask for &quot;when do they contain code&quot;, say &quot;that will be covered in another class&quot; to avoid going off on a (possibly confusing) tangent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is &lt;em&gt;neither&lt;/em&gt; lying, but it is glossing over details.  There are situations where lying is a good plan, but they are few and far between (for example, when you teach Newtonian physics, always qualifying every statement with &quot;at velocities far below the speed of light&quot; would get tedious quickly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Telling a lie should be avoided for a few reasons.  First, your students may believe your lie and get confused later.  Second, they may catch you in a lie, and lose confidence in everything else you are saying or get confused because of the lie.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, not-lies but glossing over (with words like &quot;generally&quot;) leave places for students who are extra eager to look into it themselves.  If you lied they wouldn't know where to start looking, but by implicitly leaving a sign saying &quot;there are more details here&quot; you can recruit some student self-motivation to do your work (educating them) for you.&lt;/p&gt;&#xA;" OwnerUserId="978" LastActivityDate="2018-05-08T16:00:39.307" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4732" PostTypeId="2" ParentId="4717" CreationDate="2018-05-08T17:02:43.300" Score="8" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;unlike abstract classes, interfaces cannot contain any code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't like the word &quot;lie&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's change subjects so you can see what I mean:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It isn't lying to teach children that the atom is the smallest unit, that atoms form molecules and molecules form everything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, in chemistry class, you can tell them that an atom has a nucleus which is surrounded by electron clouds and that the nucleus is made of protons and neutrons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, in physics class, you can tell them about quarks, gluons, spin, color, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Did you lie in the first statement because you said, &lt;code&gt;smallest unit&lt;/code&gt;?&lt;br&gt;&#xA;Even though you knew full well that the atom is in fact the &lt;code&gt;smallest constituent unit of matter that has the properties of a chemical element&lt;/code&gt;?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say &lt;code&gt;No&lt;/code&gt;.&lt;br&gt;&#xA;&lt;em&gt;You are not leaving out stuff to mislead&lt;/em&gt;, &lt;strong&gt;you are simplifying to teach the subject clearly&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when a politician does that, I call it a lie :–)&lt;/p&gt;&#xA;" OwnerUserId="5072" LastActivityDate="2018-05-08T17:02:43.300" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="4734" PostTypeId="1" CreationDate="2018-05-09T04:08:11.710" Score="23" ViewCount="2283" Body="&lt;p&gt;I'm a student in an undergraduate Computer Science program with several years of experience before coming to university. As I began working through the coursework here, a large problem stuck out to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my university, students are thoroughly prohibited from collaborating in any way on assignments, except for certain ones with permission. This includes even to the point of hosting review sessions where students talk through the intricacies of the best way to complete a project, &lt;em&gt;without sharing any code.&lt;/em&gt; This is understandable. Instructors I've spoken to explain that it's important to verify student learning by forcing students to work individually. &lt;strong&gt;Unfortunately, this goes against everything I've been taught about how to learn.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was fortunate enough to be mentored in programming by more experienced software engineers before I came to university, so I attribute all of my learning to being able to work in teams and ask questions of my peers/collegues. Here, that learning style isn't just discouraged, but actively punished. The instructors have a valid point however: it's important to ensure students are capable of working on their own when called to do so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;As Computer Science Educators, what techniques have you used to ensure students understand the material while continuing to allow extensive collaboration during practical programming assignments?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I may not be an educator myself (yet) but I have a passion for improving how people learn. I hope this question fits here.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="813" LastActivityDate="2018-05-18T12:38:19.140" Title="Is there a better way to validate student learning?" Tags="|self-learning|undergraduate|project|exams|collaboration|" AnswerCount="7" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4736" PostTypeId="2" ParentId="4734" CreationDate="2018-05-09T12:00:56.560" Score="16" Body="&lt;p&gt;You seem to already realize that this is a subtle question. When I taught Mathematics early in my career, I also forbade students to work together. Later on, teaching Computer Science, I found myself at the opposite pole. I normally forced students to work together on nearly every task. In some ways I changed, but it was more that the subjects are different. So, I learned to (try at least to) match the student activities to the kind of thing they needed to learn and understand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some courses personal insight is essential and hard-gained. Much of math is like that. The student needs to grok the ideas deeply so that they can be integrated into a whole so that the frontier of knowledge can be pushed forward. If students work together in such courses, it is inevitable that one of them will have the key insight first. A-Ha. From that point the collaborators are really just watching someone else work and will be denied the experience of overcoming the block themselves. Since those blocks are frequent in math, overcoming them is an important skill in its own right. Some CS topics also have this same nature, but most do not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you note, most work in industry is done in teams and team members share insights with one another. In fact, Pair Programming is specifically designed to force insight sharing. But as you also note, you sometimes need to work alone and so you need the skill to do that. But Pair Programming also fosters this skill as the Driver and Navigator roles swap frequently. One way to bring a newbie up to speed is to have him/her pair with a veteran. The experienced programmer could probably build everything alone but surprisingly often benefits from the fresh insight of the new hire. Since team-work is a learned skill, I think the university should help the students learn it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In graduate education, things may be a bit different, but again, it depends on the course. More work is likely to be individual at this level as it is more likely to be insight-rich. Certainly by the dissertation level the student needs a lot of experience working through their own tasks. But even here, discussions between dissertation-level students working on different problems can be valuable in seeing &lt;em&gt;how&lt;/em&gt; some things can be approached. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worry mostly that forbidding collaboration in the classroom raises the stress/tension level in students. I hope there aren't many who see this as a &lt;em&gt;good&lt;/em&gt; thing. Students have enough stress anyway and I think we faculty should work to reduce, not increase, it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The faculty that forbids collaboration of any kind is probably a bit naive about what really happens outside their line of sight. Students no longer live in monastic cells. They meet. They talk. It seems better, in my view, to recognize this and to guide it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One top US college at which I taught has an honor code in which students can collaborate on projects without limit as long as they share no code. Students can ask others for clarifications and advice. Students formally sign this code as a condition of acceptance to the program and it is kept on file. There are a few violations, of course, and the college treats them as a &lt;em&gt;really big deal&lt;/em&gt;, with expulsion as a possible punishment. It isn't automatic, however, and review committees are permitted to show mercy as appropriate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've taught important courses in which the first task is to break up the students in to teams of 4-5. All of their work, with one exception, was done in collaboration and we (there were two professors) provided collaboration tools so that the students could easily meet in virtual space as needed. The one exception was an individual project that was done (take-home) over the period of one week. This project might have been related to the overall team project, or not, but it had a similar &quot;flavor&quot; in any case. The teams were encouraged to bring their less experienced members up to speed prior to this task and the teams took pride in the success of their members. Many of the &quot;newbies&quot; struggled with this, but a few had really dramatic improvements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other courses in which most work was collaborative and most of the grading depended on group project work, there were one or two fairly low pressure exams that counted for a small part of the grade. In total it was about enough to raise/lower the marks by one level, A &amp;lt;-&gt; B, say. But one full level change would be extraordinary unless the student simply skipped the exam. Collaborative exam prep was neither encouraged nor discouraged. I assume that the best students were more likely to collaborate in prep than others, but have no data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One advantage of collaborative project work in the classroom is that students can work on larger projects than would otherwise be feasible. Time becomes less of a constraint. Seeing large projects with many parts is a good thing, even if you primarily work on only one part of it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the issues that some faculty have with collaboration is that it can be difficult to determine who the chief contributors are so as to provide appropriate rewards (and sanctions, of course). This needs to be planned for. There is a concept (and Pedagogical Patterns) about &lt;em&gt;Peer Evaluation&lt;/em&gt; that are worth exploring. It is quite easy to do and can be structured so that it is a positive experience for students. Students can be encouraged to reward their best and most helpful team mates. I once also learned that a particular student who appeared to be disengaged in the class was actually the chief contributor to a team and that I'd likely misjudged him.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Please don't weaponize these comments against your faculty. It won't do you much good to be seen as a contrarian.  &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-09T12:00:56.560" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4737" PostTypeId="2" ParentId="4734" CreationDate="2018-05-09T12:36:58.823" Score="5" Body="&lt;p&gt;As an instructor, this is certainly a sticky problem.  There are two questions at play here: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What can I help you to understand during our time together?&lt;/li&gt;&#xA;&lt;li&gt;How do I know that you actually know it?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;There is an understandable impulse to work only on the first question.  After all, what is the purpose of education if not to help the students progress as fast and far as they can?  However, the two questions are not really in opposition.  The first goal would be hobbled if the second question were not properly answered.  For one thing, I can provide special resources (time, extra practice, reading materials, recommended tutors, etc.) to a student who is having trouble.  For another, in assessing my students, I also discover where I need to improve as an instructor.  Making these self-improvements is how I obtain long-term gains for future students.  Thus, cutting out the second question would hurt students, both in the short- and long-run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you look in a grade book at the end of a semester, you will usually have anywhere from 4 to 10 touch points, and even these cannot always be assessed in great depth.  These are paltry number, and it is already hard to characterize what students know from such assessments.  This is even more pronounced when we allow for group projects and free interaction!  We certainly help students learn by doing so, but we lose out on almost any form of assessment.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Separating everything out isn't necessarily better for the students, either, as this means increasing the number of grade book items, and increasing the stress and workload of the students (not to mention the faculty!) considerably.  Thus, instructors often want these grade book items to pull double-duty, and attempt to answer &lt;em&gt;both questions at once&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For myself, I have nevertheless decided to sequester my labs purely for learning.  My tests are now how I assess that learning.  This has allowed me to open the flood-gates to paired programming, full use of SO and other resources, and nearly unhindered access to peer and instructor help.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it also means that there is more work for the students.  I must now include nearly twice as many grade book items, and the sorts of labs that optimize learning are rich and deep, and these involve more time and investment from everyone.  As a professional who believes in limiting stress for my students and aspires to reduce homework whenever I can, I find that this course structure severely limits my ability to do so.  And, of course, all of this extra work is also taxing on me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have any cut and dried answers here because I don't think that there are any.  There are competing goals, all of them important, and any approach the instructor takes will ultimately be the result of a push-and-pull between these interests.  I have decided to heavily utilize collaboration as a learning tool, (and standards-based assessments with nearly unlimited retesting to help ensure student learning), but these techniques comes with real costs to everyone involved.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-05-09T12:36:58.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4738" PostTypeId="2" ParentId="4734" CreationDate="2018-05-09T13:11:21.780" Score="8" Body="&lt;p&gt;I look at it as two separate tasks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Learning:&lt;/strong&gt; The goal here is to learn new things and practice what you've learned. For my classes, these are mostly small lab style assignments. I want them to work with their neighbors. I switch seats every two weeks or so that they have new neighbors to work with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've gotten pretty good at explaining concepts, but sometimes another student can explain it in a way that I've never seen and makes perfect sense. Best example is from a couple of years ago. We were going over &lt;code&gt;indexOf&lt;/code&gt; and the starts at &lt;code&gt;X&lt;/code&gt;, up to but not including &lt;code&gt;Y&lt;/code&gt;. A student raised her hand and asked if we could just do &lt;code&gt;Y-X&lt;/code&gt; to figure out how many characters to keep. It works. I just never saw it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I tell them first day is that the point of labs is to learn, and if they understand the labs when they're done it doesn't matter how they got there. Some like to work alone. Some work well in pairs or small groups. Some find almost solutions on Stack Overflow and tweak until it works. Some bang their head on their desk until something clicks. The guideline is that I should be able to give them a similar problem on paper the day after a lab is due and they should be able to solve it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Yes, there has to be a grade assigned here because there are some students that won't do the work if it doesn't directly affect their grade. And, in high school at least, students don't seem to get the connection between learning how on labs and doing well on exams. Fortunately for me, our district has a very low percentage (10%) assigned to daily work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Assessment:&lt;/strong&gt; At some point though we have to figure out where the kids are. They have to do an individual assessment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me these are always in class either as a multiple choice test when it can be assessed that way or writing code on paper. The goal is to figure out what that student is capable of when they're working alone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And in most cases I'll let them go back and correct if it's not a grade they're happy with. I don't really care as much about what they know on the test day as what they know when they walk out of the room on the last day of school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Mixed:&lt;/strong&gt; Projects are a mix for me. They're multi day assignments where students work together. But only part of their grade is based on the actual project. This year 70% of the points came from the project and the other 30% came from a written assessment that's similar to what they should have written for the project. Next year I'm probably going to 50/50. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2018-05-09T13:11:21.780" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4739" PostTypeId="2" ParentId="4734" CreationDate="2018-05-09T13:30:04.330" Score="2" Body="&lt;p&gt;I think that, when code is shared, one of the central questions is: After it has been seen, does the student understand what they have seen and will they be able to use this knowledge independently in the future. That is: Did they actually learn something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There certainly is a population of students for whom this works. None of this is really about them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a population of students which seem to fool themselves that they are learning this way. I hesitate to psychoanalyze them too deeply, but they seem to have a very narrow per-assignment focus; just scraping by. If you let them, they will cobble together their assignments solely using social connections with negligible (or &lt;em&gt;negative&lt;/em&gt;) value added. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code sharing restrictions are the least bad method (that I have seen to date) of preventing students from joining this second population. &lt;/p&gt;&#xA;" OwnerUserId="1879" LastActivityDate="2018-05-09T13:30:04.330" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4740" PostTypeId="1" AcceptedAnswerId="4743" CreationDate="2018-05-09T13:43:04.580" Score="8" ViewCount="749" Body="&lt;p&gt;&lt;strong&gt;Algorithms + Data Structures = Programs&lt;/strong&gt; occurs in 1976 (in Niklaus Wirth's book). In the past, we (teachers) may usually cite this equation to emphasize the importance of algorithms/data structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, as far as I know, some &lt;strong&gt;fundamentalists&lt;/strong&gt; don't agree on it. They think this equation is out of date and is possible to mislead students into overlooking other skills' significance (like unit test, design pattern, low-level knowledge...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what do you think? Will you tell students that &lt;strong&gt;Algorithms + Data Structures = Programs&lt;/strong&gt; now(21st century)? &lt;/p&gt;&#xA;" OwnerUserId="5065" LastEditorUserId="76" LastEditDate="2018-05-09T16:53:02.957" LastActivityDate="2018-05-09T18:08:37.450" Title="Will you tell students that Algorithms + Data Structures = Programs now(21st century)?" Tags="|algorithms|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4741" PostTypeId="2" ParentId="4740" CreationDate="2018-05-09T15:45:04.470" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Will you tell students that Algorithms + Data Structures = Programs now (21st century)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For an introductory course in a procedural or object oriented class I could see me mentioning that and then expanding on it, but in a functional or logic class it would be a footnote.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Prolog I note &lt;a href=&quot;https://cs.stackexchange.com/questions/6618/how-to-implement-a-prolog-interpreter-in-a-purely-functional-language/6622#6622&quot;&gt;Prolog = Syntactic Unification + Backward chaining + REPL&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The statement &quot;Algorithms + Data Structures = Programs&quot; is still valid as a bases for understating procedural programs, but that programming is more than just writing programs. To me your questions is people confusing syntax with semantics. In other words they are taking the word &lt;code&gt;Program&lt;/code&gt; to mean &lt;code&gt;Programming&lt;/code&gt; and I don't see it that way. A Program is part of programming, but programming is more than a program and in that sense I can agree with what people are thinking but disagree with them in their disagreement with that statement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They should come up with a new statement like&lt;br&gt;&#xA;&lt;code&gt;Programming = Programs + Version Control + Test Cases  + Continuous Integration + Documentation&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along those same lines there should also be one for functional programming like&lt;br&gt;&#xA;&lt;code&gt;Functional Programs = Algebraic data types + Pattern matching + Lambdas + Catamorphism&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To move the concept of programming forward I don't feel test cases should be a part of programming but that programs should be provable and thus obviate the need for test cases and thus bugs, e.g. &lt;a href=&quot;https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence&quot; rel=&quot;nofollow noreferrer&quot;&gt;Curry–Howard correspondence&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence#Curry%E2%80%93Howard%E2%80%93Lambek_correspondence&quot; rel=&quot;nofollow noreferrer&quot;&gt;Curry–Howard–Lambek correspondence&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2018-05-09T15:50:57.693" LastActivityDate="2018-05-09T15:50:57.693" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4742" PostTypeId="2" ParentId="4740" CreationDate="2018-05-09T15:54:26.033" Score="3" Body="&lt;p&gt;In my opinion, you shouldn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether it's true or not is debatable, but that's not the point. When you teach every &quot;punch line&quot; or &quot;guiding line&quot; should have a reason behind it. Why are you telling them this equation? What are they suppose to take away from it? What are you trying to achieve by telling them that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are trying to explain what are programs to newbie students, in my opinion there are better ways nowadays to make this field more approachable, because today, they already know what programs are whether they know it or not. Because there are programs all around them.&#xA;I would go with showing them examples of these kind of programs and linking the common denominator. For example, in a way every app, website, online service, video game, smart watch, microwave etc... is a program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not only is this a more approachable abstraction, it makes it more exciting. If you can get a student to say &quot;Wow, I can make THAT?&quot; you've done your job.&lt;/p&gt;&#xA;" OwnerUserId="5098" LastActivityDate="2018-05-09T15:54:26.033" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4743" PostTypeId="2" ParentId="4740" CreationDate="2018-05-09T16:05:15.697" Score="9" Body="&lt;p&gt;The Wirth formula, &lt;strong&gt;Algorithms + Data Structures = Programs&lt;/strong&gt; is still valid. It is also complete. A program is nothing more than algorithms acting on data structures. That formula does not make &lt;em&gt;explicit&lt;/em&gt; the difference between a bad, error-riddled program and a good, error-free efficient program. Looking at the formula, however, can show how to improve the first and make it into the second.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stating that programs are built of exactly two components, data structures and algorithms, means that the only way to improve a program is to improve one, or both, of its components.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Algorithms + Data Structures = Programs&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;strong&gt;&lt;em&gt;Sloppy&lt;/em&gt; Algorithms + &lt;em&gt;Mediocre&lt;/em&gt; Data Structures = &lt;em&gt;Buggy&lt;/em&gt; Programs&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;strong&gt;&lt;em&gt;Better&lt;/em&gt; Algorithms + Data Structures = &lt;em&gt;Better&lt;/em&gt; Programs&lt;/strong&gt;&lt;br&gt;&#xA;  &lt;strong&gt;&lt;em&gt;Excellent&lt;/em&gt; Algorithms + &lt;em&gt;Efficient&lt;/em&gt; Data Structures = &lt;em&gt;Superior&lt;/em&gt; Programs&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;Science&lt;/em&gt; part of &lt;em&gt;Computer Science&lt;/em&gt; in programming is finding the way to create the better, or excellent, algorithms and develop the efficient data structures. That's where the skills, whatever the instructor wants to focus on, come in to effect. Design patterns help to sort out the options, and provide an established pattern to follow when creating a new algorithm or data structure. Unit testing helps to validate the operational correctness of the written code. Low level knowledge of the target system &lt;em&gt;may&lt;/em&gt; allow the coder to increase efficiency, and low level knowledge of the chosen language &lt;em&gt;might&lt;/em&gt; allow the coder to utilize &quot;tricks&quot; or &quot;quirks&quot; built in to the language (be they bugs or features is unimportant).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line is that the only way to make a &lt;strong&gt;program&lt;/strong&gt; better is to make its components better. There are only two components to work with; &lt;em&gt;data structures&lt;/em&gt; and &lt;em&gt;algorithms&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Will you tell students that &lt;strong&gt;Algorithms + Data Structures = Programs&lt;/strong&gt; now(21st century)? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Not only will we tell students that, we should have that on the door lintel&#xA;of every classroom and lecture hall where programming is taught.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-05-09T16:05:15.697" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4744" PostTypeId="2" ParentId="4740" CreationDate="2018-05-09T16:47:27.053" Score="3" Body="&lt;p&gt;With one possible exception (&lt;a href=&quot;https://en.wikipedia.org/wiki/Quantum_computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quantum Computing&lt;/a&gt;), I think that Wirth's observation is as valid today as when he wrote his book.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't however, confuse how one builds a thing with the thing itself. We work differently than we did in 1976, but not radically so. Even then, programmers and systems designers used a methodology. Back then it was called Structured Programming and almost all modern languages were influenced by those ideas. A  program was conceptualized as a composition of simpler &quot;programs&quot; according to a well-defined set of rules. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In object-oriented programming we still think of composition, though in a different way and we have a somewhat different set of rules. But the main framework is the same. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise the daily practices of programmers has changed. In the past it was system test and code walk-throughs. Now it is unit tests and pair programming. But we still need to find and use practices that assure us that we have (a) built the correct thing and (b) built the thing correctly. Design Patterns help with this, but they still deal with the algorithms and how they modify and extract information from data. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prolog isn't really very different. In a data structures course in Java, you deal with data that is relatively simple and write algorithms that may have some complexity. In Prolog it is reversed. You have a given algorithm (unification) and you tailor the (possibly complex) data to enable it. But it is still data + algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that has changed, however, is that the problems that we solve now are more complex and often more flexible than those of interest in 1976. We have learned how to solve those problems and so we incorporate the solutions into libraries and then solve more complex problems, such as scaling for the cloud. But the essence is the same. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't matter whether you quote the title of the book, of course, nor should you give the complete history of computing to beginners, but they should understand the fundamental idea. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I don't actually know enough about Quantum Computing to say that it is different, but it is the only possible exception that I know anything about. It is possible that it will change the game fundamentally. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-09T16:47:27.053" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4746" PostTypeId="2" ParentId="4714" CreationDate="2018-05-09T18:46:58.910" Score="4" Body="&lt;p&gt;The best example I have encountered comes from &lt;a href=&quot;https://mathoverflow.net/questions/22624/example-of-a-good-zero-knowledge-proof&quot;&gt;mathoverflow.net&lt;/a&gt;. Here it is for you convenience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine your friend is color-blind. You have two billiard balls; one is red, one is green, but they are otherwise identical. To your friend they seem completely identical, and he is skeptical that they are actually distinguishable. You want to prove to him (I say &quot;him&quot; as most color-blind people are male) that they are in fact differently-colored. On the other hand, you do not want him to learn which is red and which is green.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the proof system. You give the two balls to your friend so that he is holding one in each hand. You can see the balls at this point, but you don't tell him which is which. Your friend then puts both hands behind his back. Next, he either switches the balls between his hands, or leaves them be, with probability 1/2 each. Finally, he brings them out from behind his back. You now have to &quot;guess&quot; whether or not he switched the balls.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By looking at their colors, you can of course say with certainty whether or not he switched them. On the other hand, if they were the same color and hence indistinguishable, there is no way you could guess correctly with probability higher than 1/2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you and your friend repeat this &quot;proof&quot; t times (for large t), your friend should become convinced that the balls are indeed differently colored; otherwise, the probability that you would have succeeded at identifying all the switch/non-switches is at most 2−t. Furthermore, the proof is &quot;zero-knowledge&quot; because your friend never learns which ball is green and which is red; indeed, he gains no knowledge about how to distinguish the balls.&lt;/p&gt;&#xA;" OwnerUserId="4927" LastActivityDate="2018-05-09T18:46:58.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4747" PostTypeId="1" AcceptedAnswerId="4748" CreationDate="2018-05-09T19:00:28.820" Score="6" ViewCount="268" Body="&lt;p&gt;In my graduate programming languages course, each student is required to learn a different novel programming language during the course of the semester and give a presentation on it to the class at the end of the semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning a new programming language is hard, and, inevitably, some students present inaccurate information, sometimes in response to a question from another student or me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my private feedback to each student, I let them know any mistakes I saw in their presentation. &lt;strong&gt;My question is whether I should let the class know when some presented information is incorrect.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, a student showed some code in a language related to Java. When asked by a student whether the &lt;code&gt;break&lt;/code&gt; statement in a doubly-nested loop exited both loops, she said yes, which was incorrect. I kept quiet, not wanting to embarrass the presenter, but I wonder if I should have said, &quot;Actually, like in Java, &lt;code&gt;break&lt;/code&gt; only escapes from the innermost loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Do you think it is better to correct mistakes when they occur or to let them slide?&lt;/strong&gt; I wouldn't correct an English mistake by a student. Should I correct a CS mistake?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2018-05-09T21:09:26.020" Title="Should I correct mistakes in student presentations?" Tags="|best-practice|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4748" PostTypeId="2" ParentId="4747" CreationDate="2018-05-09T19:10:48.817" Score="6" Body="&lt;p&gt;Mistakes should be corrected, but the &lt;em&gt;how&lt;/em&gt; can be finessed. You are already correct in giving the private feedback to each student, but you can add an additional level to the game. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of you correcting the student in the live session or later, part of each student's total work product is to produce a report on their own that is distributed to the class soon after the presentation. Much of this can be prepared prior to the presentation and only updated after your private feedback. In it, you can require that the student correct any known defects in the presentation explicitly. They can admit to having made a mistake and provide the correct information without any confession of &lt;em&gt;guilt&lt;/em&gt; or error. The info was wrong - here is the real skinny. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a lot of reasons for misstatements in a public presentation. You and I make them as well, and we correct them as we can. With students (and new teachers) some of this is actually just a result of stress. So the correction shouldn't increase the stress or give the student any reason to feel bad about themselves. The correction comes from them, even though it was information from you, perhaps, that set them straight. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To simply let it go, misleads the other students of course, so that is a poor solution. But lowering self esteem is also a poor solution. Make the experience a positive one, even though the student is cleaning up her/his own mess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The written report has an additional benefit, of course, as students need to practice technical writing in any case. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-09T19:10:48.817" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4749" PostTypeId="2" ParentId="4747" CreationDate="2018-05-09T21:09:26.020" Score="4" Body="&lt;p&gt;I agree with @Buffy's point entirely: &quot;Mistakes should be corrected, but the &lt;em&gt;how&lt;/em&gt; can be finessed.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I can be so vain as to quote myself, I said the following in &lt;a href=&quot;https://cseducators.stackexchange.com/questions/2965/the-tao-of-teaching-making-mistakes-in-front-of-the-class&quot;&gt;an earlier question about teachers making mistakes in front of the class&lt;/a&gt;: &quot;The classroom should be a safe place to fail, to make mistakes, because of the role said failure can play in the learning process. &lt;strong&gt;It's fine to make a mistake; it's not fine to be okay with it.&lt;/strong&gt;&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If time allows, you can meet with the group(s) presenting who may need correction following the class. During this debrief, you can point out any facts that need correcting. Then, give them the opportunity to show to their peers what they have learned by giving a short (&amp;lt;5 minute) follow-up from last class's presentation during the ensuing class meeting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This empowers the student to do the learning and the re-teaching, much as you (or any teacher) would do in a similar circumstance. This method would both correct the error in private and allow for a &quot;redemption&quot; of sorts in public.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-05-09T21:09:26.020" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4750" PostTypeId="1" CreationDate="2018-05-09T21:38:24.150" Score="5" ViewCount="374" Body="&lt;p&gt;For research reasons, in the last few days, I’ve been looking at several statistics on computer science programs in Portugal (but also in Europe and the US).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the most interesting findings is that approx. &lt;strong&gt;20%&lt;/strong&gt; of the students will drop the program at the end of the first year. But the most problematic finding is that after four years, only approx &lt;strong&gt;22%-32%&lt;/strong&gt; of the students were able to graduate in a 3-year program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is important to stress that in Portugal the admission to higher education is determined only by the grades that the students obtained in High School (50%) and the results of the exams in some particular subjects (Math and Physics) for CS programs, for instance (50%). In the end, only the n students with higher scores will be admitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the demand for IT personnel and the high unemployment rates of several other areas, several students will end up attempting CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware, that some companies rely on the &lt;strong&gt;Berger Aptitude for Programming Test&lt;/strong&gt; to select their candidates. From what I understood, this test is used mostly to evaluate the candidate’s ability to program and could not be used to select candidates for the CS programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given this context, shouldn’t the students be performing some aptitude test before enrolling in these programs? Is anyone aware of the usage of such tests? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously, I understand that one shouldn’t simply say to someone: “Hey choose something else!”. However, we are talking about several hundreds of students that are basically losing one or more years of their lives. Although this happens in Portugal, I guess the same thing occurs in other countries. Shouldn’t we be doing something about it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am aware of some other questions concerning programming aptitude. However, I think mine is different. &lt;/p&gt;&#xA;" OwnerUserId="1144" LastEditorUserId="1293" LastEditDate="2018-05-14T13:19:53.557" LastActivityDate="2018-05-14T13:19:53.557" Title="Use of programming aptitude test in CS program admission" Tags="|admission-requirements|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4751" PostTypeId="2" ParentId="4734" CreationDate="2018-05-09T23:37:55.883" Score="4" Body="&lt;p&gt;I believe that the best tool is communication. Letting students know, beforehand, &lt;strong&gt;why&lt;/strong&gt; their progress is being assessed in a particular way and &lt;strong&gt;how&lt;/strong&gt; they are allowed to collaborate is a very important part of teaching. For instance, MIT has a &lt;a href=&quot;https://integrity.mit.edu/handbook/writing-code&quot; rel=&quot;nofollow noreferrer&quot;&gt;very interesting page&lt;/a&gt; on what type of collaboration when is allowed writing code for assignments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding the &lt;em&gt;no code shared&lt;/em&gt; policy, this is only for assignments that count towards grading. And, since your grade should reflect your competence in the domain of the discipline, it seems fair that only what you did counts towards your final grade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That does not mean that you should learn all alone. There is nothing that forbids students (and instructors) to do code reviewing or pair programming-like activities during class. In fact, there is (somewhat weak) evidence ([1][2]) that indicates that self-assessment and peer assessment activities are not only about grading but may contribute to learning as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[1] Falchikov, Nancy, and Judy Goldfinch. &quot;Student peer assessment in higher education: A meta-analysis comparing peer and teacher marks.&quot; Review of educational research 70.3 (2000): 287-322. (available &lt;a href=&quot;http://www.jstor.org/stable/pdf/1170785.pdf?casa_token=LdUKF5usO50AAAAA:V4XJPFX9fqdWDHMTf_P632s9bJSZsWocW7ekzgdQ7oliYAAcsPekfukrmuGvs95KGWb98Y7boqsXu84pNI2DzYgFf8fr4QYlZTS060NdJYEhjfO8-FpE&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[2] Sadler, Philip M., and Eddie Good. &quot;The impact of self-and peer-grading on student learning.&quot; Educational assessment 11.1 (2006): 1-31. (available &lt;a href=&quot;http://mrbartonmaths.com/resourcesnew/8.%20Research/Marking%20and%20Feedback/The%20Impact%20of%20Self-%20and%20Peer-Grading.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="5109" LastEditorUserId="5109" LastEditDate="2018-05-10T00:53:57.623" LastActivityDate="2018-05-10T00:53:57.623" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4752" PostTypeId="2" ParentId="4750" CreationDate="2018-05-10T00:20:26.163" Score="5" Body="&lt;p&gt;This is a great idea. We should definitely help people determine in advance what fields they are likely to succeed in. It would be far better for them, the economy and the employers to admit only people who are likely to be good candidates for schooling and employment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The work training program that I have been employed to teach -- training adults with physical disabilities for entry-level programming jobs -- has just be discontinued partly due to the recent US &lt;strong&gt;Workplace Innovation and Opportunity Act&lt;/strong&gt; (WIOA) requirement that job training programs result in a recognized industry credential leading to employment or advancement in a job. (We could not find a credential that was reachable with around a year of training.) As far as I know, this job training program was unique in the US, and it used to be quite successful, when it was possible to get a programming job with a few months experience in COBOL. This is no longer true, and we were short on incoming candidates and not having much luck placing them either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have now decided to offer training leading to the &lt;strong&gt;Microsoft Office Specialist&lt;/strong&gt; (MOS) certification instead, which is faster and much more likely to get people in to jobs, and we can serve far more people a year that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am just a little curious though, as to why someone didn't see this coming long ago -- the calls for prequalification for education and for screening of employment candidates -- back when the US Supreme Court passed that &lt;a href=&quot;http://northcarolinahistory.org/encyclopedia/griggs-v-duke-power/&quot; rel=&quot;nofollow noreferrer&quot;&gt;decision in 1971&lt;/a&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt;, making it illegal for employers to use screening tests that &quot;could be biased&quot;? (The decision that led to employers simply requiring a college degree instead, which has been implicated as a cause of the mushrooming demand for and cost of college and university education.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many experts in the field of computing are calling for Apprenticeship programs. Any takers? We could again try using the method humanity has relied on for thousands of years to produce experts, masters and professionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;: &lt;a href=&quot;http://northcarolinahistory.org/encyclopedia/griggs-v-duke-power/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://northcarolinahistory.org/encyclopedia/griggs-v-duke-power/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5111" LastEditorUserId="104" LastEditDate="2018-05-11T17:20:20.237" LastActivityDate="2018-05-11T17:20:20.237" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4753" PostTypeId="2" ParentId="4750" CreationDate="2018-05-10T00:41:30.567" Score="4" Body="&lt;p&gt;I'm going to present an orthogonal answer here so that you have some perspective. I don't know what the current demand for CS employees is in Portugal right now, but assuming it is high and has been for a while the following effect starts to occur and lasts for a while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a field is &lt;em&gt;HOT&lt;/em&gt;, students with no strong preferences or goals will tend, more than normally, to try to get into that field, thinking that their future is assured. It doesn't matter if they have aptitude or skills. They just want to go there. In fact, those students might be very able in general but their interest isn't really in that field, other than what it might provide them as a livelihood. These students might actually test well on any aptitude test, but later drop out as they learn, too late, that they don't actually like what they need to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may not even be that they find it too hard. It just isn't fun. So more than aptitude is needed and more that strong prior academics is needed. This is &lt;em&gt;desire&lt;/em&gt;. You have to actually like the tasks that a field requires to want to stay in it, as not all the tasks are inherently fun. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is just a warning that an aptitude test may not help you as much as you think it should. If you are overwhelmed with applicants then trying to find out why the students want to study this field can be a better predictor of completion than intelligence or aptitude. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do people go in to Medicine. Some are driven to help people or solve some interesting medical conundrum. But some are just driven by money (or the expectation of money). Who do you want to spend your time and effort educating. Find people with &lt;em&gt;desire&lt;/em&gt;. That can overcome a lot of other things - even natural ability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We sometimes think that star athletes do what they do easily and without effort. Nothing is farther from the truth. To excel they need to practice constantly. Their natural ability may give them a start, but they will fail without the desire that carries them over the hard parts and keeps them going. The same is true in academics. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-10T00:41:30.567" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4754" PostTypeId="2" ParentId="4734" CreationDate="2018-05-10T10:35:07.463" Score="1" Body="&lt;p&gt;Background: As a senior in my IT company, I am often teaching fresh colleagues on-the-job, so I know where you came from. On the other hand, as teamlead, getting people to work together (i.e., tough things like being able to ask questions and actually listen to answers...), is very important for me, as there's only so much of myself (in the first role) to go around.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As Computer Science Educators, what techniques have you used to ensure students understand the material while continuing to allow extensive collaboration during practical programming assignments?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That long question mixes up a lot of things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;People need to learn to collaborate.&lt;/li&gt;&#xA;&lt;li&gt;People need to &quot;grok&quot; the material.&lt;/li&gt;&#xA;&lt;li&gt;(The university needs to give marks - I'm not interested in this aspect, for this answer.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Those two topics are quite at odds, in my experience:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First of all, you can learn both separately from each other. (For example, if you have years of IT experience, you have probably witnessed SCRUM or Kanban teams - those are mechanisms for working together which do not care about what the team is actually doing.)&lt;/li&gt;&#xA;&lt;li&gt;Both are incredibly important on their own.&lt;/li&gt;&#xA;&lt;li&gt;Both can hinder each other, in any combination (i.e., one who knows nothing may feel so inferiour that he cannot really collaborate, i.e., won't ever ask questions, won't contribute etc.; but also someone who knows a lot may not be able to collaborate because they feel constantly superiour etc.). &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, my answer to your question would be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Make sure individuals really understand the material on a deep, intuitive level. This you can only achieve by actually making them think long and hard about them, actively working with techniques you teach, discovering stuff for their onw, and so on. It is your challenge as educator to find ways for them to do this! For some, you can simply pose them a vague problem and Google or Stackoverflow (or old-fashioned books) do the rest. For others, you might need to give them specific, linear information, stacked in a very structured manner, and very tightly guide them to the goal.&lt;/li&gt;&#xA;&lt;li&gt;Separately, make them work together and find out how that works. One way to make sure it's not just one individual doing all the work, is to make the problem so big that it's just not possible for one person to do it. Then they have to find out how to distribute the work, and how to re-integrate it. This is exactly what's happening in the business world as well (or should, anyways). In my opinion, the point of having CS students work together is &lt;em&gt;not&lt;/em&gt; that they somehow all do the same at the same time (that's just offloading homework to the fastest person...).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How you do it exactly depends a lot on the topic and on your own preferences. Be it the occasional large 2-week project; or a &quot;background project&quot; that runs through the whole semester, or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would certainly stay clear from encouraging the students to do every single bit of homework together. Having &quot;heureka&quot; moments is incredibly important. At the end of the day, much of the content in CS is incredibly complex and difficult, but can readily be chopped into pieces which can be handled individually. Students really need to be able to do that; but to do that, they really need to know the building blocks themselves, intuitively, and get into the habit of flexing their brain muscles, a lot.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2018-05-10T10:35:07.463" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4756" PostTypeId="2" ParentId="4717" CreationDate="2018-05-11T15:37:43.140" Score="2" Body="&lt;p&gt;Are you teaching computer science using Java as an exemplar, or are you teaching Java programming skills?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because when you use a word like &quot;interface&quot;, in the one case you will want to discuss the general CS meaning of the concept independent of programming language (let along programming language versions), while in the latter case, students will need at some stage to be aware of the details.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discussion of the gory detail of Java versions here could detract from your ability to convey the importance of interface definitions in software engineering by isolating components from each other's implementation detail: which I would think is the important thing to be teaching.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2018-05-11T15:37:43.140" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4757" PostTypeId="1" CreationDate="2018-05-12T13:14:43.303" Score="8" ViewCount="195" Body="&lt;p&gt;I am to teach sums and asymptotics to first year CS undergraduates who have only high school math.  I thought it would be attractive to follow chapter 14 of &lt;a href=&quot;https://courses.csail.mit.edu/6.042/spring18/mcs.pdf&quot; rel=&quot;noreferrer&quot;&gt;https://courses.csail.mit.edu/6.042/spring18/mcs.pdf&lt;/a&gt; as far as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However the students will have never seen limits before. What is the minimum amount of material I need to give a coherent picture of how to understand and compute infinite sums? I would like the course to be self contained as far as possible.&lt;/p&gt;&#xA;" OwnerUserId="1168" LastActivityDate="2021-03-01T12:29:03.260" Title="How to teach sums and asymptotics to students who don’t know limits" Tags="|lesson-ideas|mathematics|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4758" PostTypeId="2" ParentId="4757" CreationDate="2018-05-12T14:28:50.650" Score="3" Body="&lt;p&gt;For asymptotes in general, one of the easiest examples for beginners is the curve &lt;span class=&quot;math-container&quot;&gt;$y = 1/x$&lt;/span&gt; which has asymptotes (at infinity) on both axes. It is easy for them to see that as x gets large y gets small (without bound). Likewise as x gets small, y must get large. You could then look at &lt;span class=&quot;math-container&quot;&gt;$y = 3 + 1/x$&lt;/span&gt; for example to see a different horizontal asymptote. Contrast this with &lt;span class=&quot;math-container&quot;&gt;$y = x^2$&lt;/span&gt; for an unbounded function and also with a periodic function (sin or something informal that looks like it), that is bounded but has no asymptote.&lt;/p&gt;&#xA;&lt;p&gt;If you want to go farther, you could discuss a chord and a tangent on a circle. Move the chord parallel to itself and see the two intersection points with the circle converge until you have a tangent parallel to the original chord. This may be more than you want or need, of course.&lt;/p&gt;&#xA;&lt;p&gt;For infinite series and sums, one of the easiest examples is to first discuss &lt;a href=&quot;https://en.wikipedia.org/wiki/Zeno%27s_paradoxes&quot; rel=&quot;nofollow noreferrer&quot;&gt;Zeno's Paradox&lt;/a&gt; and the sequence 1/2, 1/4, 1/8, ... and its sum. It is pretty clear if you draw the picture that the sum is one and that the difference between a partial sum and 1 is the most recent term in the series. It is also easy to see how to generate the next term.&lt;/p&gt;&#xA;&lt;p&gt;If you are teaching programming, you can write a program that computes partial sums, but if you do so with floating point then you also need to discuss rounding error, which will get severe, since the sum gets larger as the terms get smaller. Eventually, then, the next term adds nothing at all, due to the fixed precision of floating point data.&lt;/p&gt;&#xA;&lt;p&gt;But if you want to compute the partial sum in closed form then you can do better in a program to compute that rather than the sum itself. That may be too much to ask, I realize.&lt;/p&gt;&#xA;&lt;p&gt;That may be enough, but it gives enough of the overall concepts to get you started. And Zeno is always fun in any case.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Here are a few more &amp;quot;interesting&amp;quot; functions that may go beyond what you need, but have interesting things to teach you.&lt;/p&gt;&#xA;&lt;p&gt;Once you understand what &lt;span class=&quot;math-container&quot;&gt;$f(x) = 1/x$&lt;/span&gt; does, you can combine it with other functions to get other sorts of asymptotes. For example &lt;span class=&quot;math-container&quot;&gt;$g(x) = x + 1/x$&lt;/span&gt; is asymptotic to the function &lt;span class=&quot;math-container&quot;&gt;$h(x) = x$&lt;/span&gt;. In that form it is pretty obvious what it does, but less so if you express it as &lt;span class=&quot;math-container&quot;&gt;$g(x) = (x^2 + 1)/x$&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Other combinations are possible. If you look at &lt;span class=&quot;math-container&quot;&gt;$k(x) = (1/x)*\sin(x)$&lt;/span&gt; you get a function that oscillates but is also asymptotic to zero at infinity.&lt;/p&gt;&#xA;&lt;p&gt;One of my favorite functions is &lt;span class=&quot;math-container&quot;&gt;$m(x) = (1/x)*\sin(1/x)$&lt;/span&gt;. As x approaches infinity, this is asymptotic to zero also, but it is much more interesting as x approaches zero. It has the property that it takes on every real value infinitely many times in every neighborhood of zero. The 1/x factor gives it increasing amplitude near zero and the argument to sin makes it oscillate faster and faster. This is a very strange property for a real valued function, but if the student will eventually study Complex Analysis it is an exceedingly important example. I'll leave that explanation for the next course.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1035" LastEditDate="2021-03-01T12:29:03.260" LastActivityDate="2021-03-01T12:29:03.260" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4759" PostTypeId="1" AcceptedAnswerId="4761" CreationDate="2018-05-12T23:23:08.347" Score="12" ViewCount="1681" Body="&lt;p&gt;We've recently gone through the process of selecting an intern from a local university to join our team for the summer.  We are using F# and almost exclusively using functional programming techniques on our team, and finding a candidate with any exposure to functional programming proved to be impossible.  This isn't that surprising, given that even several senior members of the team with Master's degrees didn't have much exposure to functional programming before joining our team.  However, I've been wondering why so few undergraduate programs teach functional programming concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having attended a university that taught C/C++/Java for 90% of my undergraduate classes, I found it strange when first learning Haskell that the language was never used in any of my classes, especially considering how much easier and more obvious it makes the implementation of fundamental data structures like trees and lists.  When building enterprise-scale systems, avoiding things like state mutation becomes critical.  So why aren't functional languages taught first, and functional programming techniques taught as a &quot;use this approach first, when possible&quot; with imperative techniques and things like explicit memory management and use of mutable state taught as &quot;only use this when absolutely necessary for performance reasons&quot;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would think, with the increasing move towards multi-core processors, and the growing relevance of distributed systems, that teaching functional programming from the beginning would be the best way to prepare students for successful careers in the industry.  Is there a reason that universities avoid teaching Haskell or other functional languages first (or at least including them as a major part of the undergraduate curriculum) and teaching imperative programming as a supplementary skillset?&lt;/p&gt;&#xA;" OwnerUserId="5161" LastEditorUserId="5161" LastEditDate="2018-05-13T00:03:07.247" LastActivityDate="2018-05-18T12:28:44.357" Title="Why isn't Functional Programming Taught First?" Tags="|curriculum-design|undergraduate|functional-programming|" AnswerCount="6" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="4760" PostTypeId="2" ParentId="4717" CreationDate="2018-05-13T02:38:32.343" Score="1" Body="&lt;p&gt;The problem with simplifying-by-lie is in the consequences it can have when your student faces practical, real world code development or maintenance situations as a beginner:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;When trying to find out the cause of a bug, they might discount the possibility of something that you said is impossible, and thus not check for it and thus not find the bug.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They might make a fool out of themselves by trying to defend what you told them as gospel against seasoned professionals, possibly with extreme accidental arrogance.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;So, it is always best to advertise the fact that you are simplifying.&lt;/p&gt;&#xA;" OwnerUserId="2389" LastActivityDate="2018-05-13T02:38:32.343" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4761" PostTypeId="2" ParentId="4759" CreationDate="2018-05-13T12:12:59.613" Score="8" Body="&lt;p&gt;The &lt;em&gt;why&lt;/em&gt; isn't necessarily related to the relative quality or benefit of the various approaches to the first courses. But some of the comments given to the question capture part of the reasons. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, FP isn't precisely mainstream in industry. Most programming in the real world is &lt;em&gt;now&lt;/em&gt; is done in Dijkstra-derived languages, not McCarthy-derived ones. This may change, of course, as the world starts to recognize the benefits of FP as it previously did for OOP. As the questioner mentioned FP has advantages in some important areas. But most curricula take a look at who is hiring entry level folks and what they want to see in the person's background. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reason is that most of the faculty is much more knowledgeable about those &lt;em&gt;mainstream&lt;/em&gt; things than others. If the faculty went through a long program in which almost everything is built in Dijkstra-derived languages that is what they are more likely to teach beginners. OTOH, faculty (including some folks here) who went to, just to pick a name, MIT, are more likely to start in FP, but may still be constrained by the first reason. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most faculty still think of FP as an advanced topic and so Let and Lambda tend to come late in the curriculum, after the students have &lt;em&gt;seasoning&lt;/em&gt;. As you suggest this is not necessary, and may not be desirable, but there is a lot of inertia. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is always some mental disruption when a student is asked to change paradigms, since a paradigm is built on a consistent mental model that is also relatively &lt;em&gt;closed&lt;/em&gt;, not needing outside explanations. Paradigm shift is, in general, difficult, even for experts. The HS or undergraduate curriculum is short in time so most faculty are resistant, at least a bit, to require uproar in the middle of the two or four years. Much better, it is normally thought, to treat one paradigm as the main-line and any others as &lt;em&gt;nice but inessential to the main goal&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have a lot of chickens, you get a lot of eggs. OTOH, if you have a lot of eggs, you get a lot of chickens. Pigs, not so much. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you are going to teach any given paradigm, you need to do it well. You need to make students completely comfortable in that paradigm so that when presented with a new problem they aren't confused about how to begin or what should be the next step. Languages/paradigms should fit like a comfortable pair of shoes. I'm not certain that current OOP education is as good as it could be, actually, but that is due to my own background. If we suddenly adopted FP widely, you might well think the same thing about the &lt;em&gt;then&lt;/em&gt; state of the art concerning FP. Change happens, but it is slow and &lt;em&gt;is resisted&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students need two things at least. They need to be able to solve problems so that they can be successful in academia and/or the world of employment. But they also need to be able to &lt;em&gt;think&lt;/em&gt; and be flexible so that they are able to move with the times as necessary. So we tend to teach one paradigm completely (for the first goal), but allow them exposure to others (for the second). Mostly it works. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll also note that learning new languages is actually harder than it is often represented to be. If two languages are within one paradigm and have similar concepts then it may seem to be &lt;em&gt;merely&lt;/em&gt; a question of new syntax applied to old ideas. Java and Python have similar ideas but quite different syntax. But learning the syntax of Python as an experienced Java programmer won't make you &lt;em&gt;pythonic.&lt;/em&gt; But changing paradigms is much, much harder, even when the syntax is nearly the same. I'll note that C++ was derived from Dijkstra's ideas primarily (via Simula), whereas Java's core concepts come from Alan Kay. If you don't understand that then you can wind up programming badly in both languages. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-13T12:34:13.117" LastActivityDate="2018-05-13T12:34:13.117" CommentCount="17" ContentLicense="CC BY-SA 4.0" />
  <row Id="4762" PostTypeId="1" CreationDate="2018-05-14T11:54:14.360" Score="7" ViewCount="238" Body="&lt;p&gt;When programming we need to name things. I have been using turtle graphics in python, and was wondering if the names, chosen, for the commands, were making it more difficult for my pupils.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the turtle commands are:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;turtle.left&#xA;turtle.right&#xA;turtle.forward&#xA;turtle.backward&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Pupils often get confused, because they think that &lt;code&gt;turtle.left&lt;/code&gt; will make the turtle move to the left. Would learning be improved, if the language/libraries chose better names? e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;turtle.turn_left&#xA;turtle.turn_right&#xA;turtle.move_forward&#xA;turtle.move_backward&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This is not about students choosing good name, but about names used by the  libraries, and examples.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-06-22T20:10:43.850" LastActivityDate="2018-06-25T14:38:16.823" Title="Research into the use of symbol names, in programming, and how it affects learning" Tags="|best-practice|introductory-lesson|" AnswerCount="3" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="4763" PostTypeId="2" ParentId="4762" CreationDate="2018-05-14T12:16:17.467" Score="7" Body="&lt;p&gt;You don't have control over the libraries, though you can provide a &lt;em&gt;filter&lt;/em&gt; class that, itself, provides better names. Yes, names matter and shouldn't be confusing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But when &lt;em&gt;you&lt;/em&gt; create examples and libraries pay a lot of attention to the names. When you present them to the students and learn that there are confusions, change them. Even better, ask the students to suggest better names. One of the purposes of the Navigator in a Pair Programming scenario is to suggest alternate names to the Driver. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my somewhat extreme view, every name should be &lt;em&gt;intention revealing&lt;/em&gt;. The only exceptions are &lt;em&gt;very&lt;/em&gt; common acronyms and abbreviations. But in general, I don't create either acronyms or abbreviations and try to make the names as clear as possible. I fail at this of course, but it is the goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in the current example, the students should also have a metaphor about the overall structure of the simulated world. Turtles only move in the direction they are facing. They can turn, either &lt;em&gt;left&lt;/em&gt; or &lt;em&gt;right&lt;/em&gt;. There should also be some per-instruction documentation that makes it clear. If they can learn to think in terms of the metaphor, rather than the detail, they will have an advantage as long as the metaphor itself is sound. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, in the current example, I'll note that too many people name things emphasizing short names over self-explanatory names. I sometimes think that they believe that the hard part of programming is the typing. There was a point in time in which program preparation (punch cards) was extremely frustrating but those times are gone. Good IDEs today do typing completion, so names seldom need to be typed in full. But even in the card punch days, &lt;em&gt;real&lt;/em&gt; programmers employed data entry clerks who did the card punching from hand written coding sheets. A good clerk could correct quite a few minor errors along the way. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-14T13:06:32.487" LastActivityDate="2018-05-14T13:06:32.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4764" PostTypeId="5" CreationDate="2018-05-14T13:23:52.207" Score="0" Body="&lt;p&gt;In times of great interest in a subject it may not be possible for an institution to take all comers. It may therefore be necessary to find some sort of filter that sorts potential students by aptitude, interest, and ability. Institutions therefore have some admissions requirements or criteria that students must meet. There are laws in many places that limit what the institution is allowed to do, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-14T13:23:52.207" LastActivityDate="2018-05-14T13:23:52.207" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4765" PostTypeId="4" CreationDate="2018-05-14T13:23:52.207" Score="0" Body="Admission requirements are used as a filter to admit students into an educational program or major. They can consist of background requirements, admission testing, interviews, etc. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-14T13:23:52.207" LastActivityDate="2018-05-14T13:23:52.207" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4766" PostTypeId="2" ParentId="4759" CreationDate="2018-05-14T15:15:36.857" Score="3" Body="&lt;p&gt;I have to thank you for helping me gain some insight on a very vexing question that I have always struggled with:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Why are there so many companies making similar products?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We see a big discrepancy in how things work: sometimes there is just one big player, which seems to have a &quot;natural monopoly&quot;, something like Google, or Facebook. Not much point in having multiple Facebooks, right? So the also-rans don't run for long. This made me want to simply say that there should really be just one entrant in every field, and it should be the best. Put all your eggs in one basket, and make sure it is a &lt;em&gt;really strong&lt;/em&gt; basket. Like, why so many car companies and models of cars? Just have one company, and a few models. Done. Instead, we have what we see: dozens of major car companies, all making oodles of very similar models and variations of products. Why on Earth do we do this?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A visit to the University library undid this idea, as I realized that people are creative and all want to make a mark on the world. Books, paintings, music I can understand. But &lt;em&gt;cars&lt;/em&gt;? Who gives a rip? So I realized that there are things that are salient to people and things that are not, and this varies individually. I don't care about cars, but don't try to pry my favorite music or brand of coffee away from me. (But why don't people just choose the &lt;em&gt;obviously best&lt;/em&gt; kind of coffee and music?) (Shh! you'll ruin the story)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back to your question: people do not use functional programming because &lt;strong&gt;that is not how they think&lt;/strong&gt;. If you go to a hardware store, you do not see motors and bearings, gear-sets and belts and reciprocators. You see angle grinders, drill presses, belt sanders, lathes... In other words, you see special purpose tools, not general purpose components. The home store has cabinets, washing machines and toilets, not wood, metal and ceramic. People want to get the thing that they are thinking of, not think about how to fabricate it. And they want tools that take them directly to that objective. Radio Shack stores are slowly closing, because few people have any interest in building electronic things that they can much more easily and cheaply buy. I don't know many other people who have built a shortwave receiver from random used parts in a box, or contacting someone thousands of miles away using a few watts of power and Morse code. And they are not in the least interested in doing so! Stunning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I actually learned Lisp in college before C, but I have never used Lisp professionally. Most people are not going to construct a programming system from the ground up, they start with something high-level that is close to their desired outcome, and they snap parts together, or use high-level tools (like IDEs and visual design products) to achieve it. It is great that one can use the vi editor to create a spreadsheet (TeX) or a complex document (TROFF) or an AI program (by writing Lisp) or an operating system (by writing C), but Unix is still not a large share of the computing market (just in the areas where it matters) and even Apple is not dominant, because computing is mostly a matter of managing money (Windows and its products). It is a lot easier to write an ebook using Word than whatever the alternative is, which I never looked into because I learned Word decades ago. I learned it because it could do all the things I needed to, and it still does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some people would rather teach you how to build a watch than simply tell you what time it is, and it is true that if you teach a man to fish he can eat for a lifetime. But there are still a lot more people out there buying watches and going to restaurants, because they have other things on their minds than how to write complex computer programs. Even if they are programmers. So, &quot;the industry&quot; that you referred to, is really many industries, not just the academic view of &quot;real computing&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, thanks for prompting me to think this through in a general way so that I can write another very specific chapter in my next book, coalescing years of rumination, frustration and exasperation and hopefully creating some enlightenment out of it.&lt;/p&gt;&#xA;" OwnerUserId="5186" LastActivityDate="2018-05-14T15:15:36.857" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4767" PostTypeId="1" CreationDate="2018-05-14T20:45:41.287" Score="3" ViewCount="117" Body="&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/4759/why-isnt-functional-programming-taught-first&quot;&gt;This question&lt;/a&gt; got me thinking about cs1 and functional programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do there exist anywhere statistics on what portion of schools teach cs1 using a functional paradigm?  I know that some schools do, but I cannot find any compiled resource about it anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The paper &lt;a href=&quot;https://www.cse.buffalo.edu//~mhertz/meaning-sigcse-2010.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;What Do “CS1” and “CS2” Mean? Investigating Differences In the Early Courses&quot;&lt;/a&gt; by Matthew Hertz alludes to there being some sort of compiled resource, but I can't find it.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-05-15T16:35:53.547" LastActivityDate="2018-05-16T20:36:15.847" Title="Statistics on functional programming in CS1" Tags="|functional-programming|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4768" PostTypeId="2" ParentId="4759" CreationDate="2018-05-14T20:53:55.947" Score="2" Body="&lt;p&gt;First of all, I question somewhat the premise of your query; there are many programs that &lt;em&gt;do&lt;/em&gt; teach functional programming first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, there are both historical and practical reasons for an emphasis on imperative programming.  The Von Neumann architecture was modeled after the Turing machine, not after the lambda calculus. State change and mutability have been baked into electronic computers for as long as we have had electronic computers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our stateless languages are abstractions built atop the descendants of the Von Neumann architecture, not the other way, and the compiled code from Haskell and the like all utilize memory mutation. If we take it as a given that one of the goals of a CS program is to give a sense of how our computers work at a low level, functional programming does not advance this goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not to say that functional programming is not without value; I also teach it (as a second language), but curricular hours are not infinite, and I know from experience that all of the concepts that get jettisoned are each precious, irreplaceable rubies in their own right.  When designing a four-year curriculum, you are faced with very hard choices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's also important to note (and this has has been discussed many times across this site) that mutability is not always easy for students to wrap their brain around, and often takes some serious time to sink in. For many students, this idea seems very natural, but there is always a significant group who gets stuck here. Not adressing mutability directly will make it very hard for a certain subset of students to pick up imperative languages on their own later.  The idea that this can be hard is itself hard to understand for those who understood it naturally, but imagine that you are graduating students who can recurse, but get a little fuzzy when trying to follow&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if(x == 7){&#xA;   x++;&#xA;}&#xA;if (x == 7) {&#xA;   x--;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Historically speaking, Fortran was more successful than LISP, and C was more successful than Scheme.  Imperative languages resemble the machines they are built upon, and it's only natural, then, that schools in earlier days would have found it important to focus on Turing, Von Neumann, assembly, C, and the like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Haskell is still trying to prove that it can compile efficiently.  Meanwhile, it's only in the last ten years that lambdas have come to wide acceptance in industry.  It makes sense, then, for both historical and continuity reasons, that schools have focused more on imperative languages.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-05-14T20:53:55.947" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4769" PostTypeId="1" AcceptedAnswerId="4771" CreationDate="2018-05-14T23:41:15.597" Score="3" ViewCount="224" Body="&lt;p&gt;I enjoyed reading &lt;a href=&quot;https://blog.codeanalogies.com/2018/04/18/blockchain-explained-by-trying-to-pass-high-school-math-class/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this explanation of blockchain&lt;/a&gt; at codeanalogies.com, which imagines a fictitious distributed grading system in a high school math class. The article made me wonder whether it would be possible (in reasonable time and effort) to implement some sort of distributed grading system in a CS class for the primary purpose of illustrating the core principles of blockchain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For such a system to be useful, in my view it would need to:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;produce grades that are accurate and consistent (ie. any grade could be independently reproduced by an instructor if requested by a student)&lt;/li&gt;&#xA;&lt;li&gt;give students direct experience with some key aspects of blockchain, without requiring them to make too many assumptions&lt;/li&gt;&#xA;&lt;li&gt;protect anonymity of grades&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Such a system would probably require more work than usual, so maybe it would only be practical or interesting for one or two assignments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone tried something like this? Or is someone with a decent understanding of blockchain willing to sketch out some ideas?&lt;/p&gt;&#xA;" OwnerUserId="50" LastActivityDate="2018-05-17T20:22:59.897" Title="Can assignments be graded using blockchain?" Tags="|assessment|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4770" PostTypeId="2" ParentId="4762" CreationDate="2018-05-15T00:08:49.183" Score="2" Body="&lt;p&gt;The names of symbols in the language, or library, that is being used in the classroom should not have any effect upon student learning.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The learning of the students is based more upon the knowledge passed on from the teacher to the students. The language, and its libraries and examples, are mere tools. How they are used, and presented, by the instructor can remove any associated ambiguity that might result from the chosen names if they were encountered &quot;in the wild.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, helping the students to handle situations where a symbol's name does not match what they &quot;expect&quot; that it should indicate is a worthwhile goal. There will be many occasions in their future career, if they pursue such, where they will encounter many &quot;names&quot; that don't match what they think they should. The, likely minor, disconnect between expectations and reality of names in languages and libraries should be a good learning tool for when they encounter much larger disconnects in code written by others that they either have to maintain, or interact with in future projects.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As mentioned by another user, &lt;a href=&quot;https://cseducators.stackexchange.com/users/1293/buffy&quot;&gt;Buffy&lt;/a&gt; in their &lt;a href=&quot;https://cseducators.stackexchange.com/a/4763/104&quot;&gt;answer&lt;/a&gt;, having a metaphor to deal with the environment of the language, or library, often helps. In widely used languages and libraries the metaphor, if chosen well, will usually be sufficient to make the students comfortable in that environment. With programs found &quot;in the wild&quot; there will often be no useful metaphor available, or likely even possible. Taking advantage of any disconnects that exist in the the language base used in the classroom can help the students learn to adjust to such situations later. It can also be used as an example of why good naming conventions are important.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-05-15T00:08:49.183" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="4771" PostTypeId="2" ParentId="4769" CreationDate="2018-05-15T16:45:05.960" Score="3" Body="&lt;p&gt;Unfortunately, the quoted article has serious shortcomings and would be unworkable in practice. In the first place it isn't just about blockchain, but also mixes in quite a lot of other things, such as the bitcoin that is usually associated with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The article also misrepresents in some ways the reasons why you would want to do this. The financial crash wasn't, in fact, caused because financial institutions had centralized record keeping but, rather, because they had been given unlimited power to manipulate markets by a feckless congress. The medical record example is a bit stronger, however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the article also has the following technical flaws. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The school principle can create grading value (points toward grade = bitcoin) pretty much arbitrarily. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The transaction fees would have to be much (much) lower as they overwhelm the possible gain by participating. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Unless the student grader is also a miner, they have no incentive to participate as they can only give up points via transaction fees. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The reward (potential) is not in any way related to the educational objectives, made worse by:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In the real (bitcoin) world, the miners are so busy mining that they have no time to do anything else (e.g. study). The system actually enforces this, by making the reward harder to get over time. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;At the scale of a school, miner pools could easily reach 50%, destroying the whole thing. Some students would much rather do search for treasure than do actual academic work. Why reward it? &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You replace expertise in the subject (teacher grading) with amateur action, which is subject to error. If it just matching answers to keys with no interpretation, a machine can do it. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The overall work entailed increases as each exam is &quot;graded&quot; multiple times, plus the treasure hunt. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I envision that it would be more difficult for a student to contest a marking error in this scheme, though it might result if fewer of them being made. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Even in this scheme, exam papers can be lost. Distributing them probably increases the risk. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If teacher vindictiveness is an issue, blind grading can be done without the other complications of the scheme. It isn't actually essential that the teacher knows who she/he is grading. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As to the cost, I'm sorry, but if we paid teachers an actual living wage I'd be more willing to accept the argument. But in the real world, teachers don't really work for money. Lawyers and Doctors have a similar level of education to Teachers. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But these are flaws applied to the &quot;fun&quot; example, not the thing (blockchain + bitcoin) itself. Reading it might lead to a better understanding of the technology, but it is not a lot easier to read and understand than these, from Wikipedia:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Blockchain&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blockchain&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bitcoin&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bitcoin&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fun, though. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a classroom activity it might bring enlightenment, but, I fear, mostly enlightenment about the unworkability and complication of the scheme. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;But let me add something about the two ideas themselves. Bitcoin has no intrinsic value. It's imputed value comes only from its scarcity and the expense (in cpu power) of creating new ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, blockchain, is a distributed ledger that can keep track of anything using an anonymous and distributed system of agreement. It doesn't depend in any way on the difficulty or expense of creating a block, though it needs a scheme to prevent forging blocks. To be true to the idea the anti-forging scheme needs to be independent of any central authority. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For grades, neither of these, independently, seems to be very desirable (or necessary), unless we are in a post apocalyptic world (&lt;em&gt;Road Warrior&lt;/em&gt; movie for example) in which there are no central authorities, having all been destroyed, and no centralized way to verify historical records. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;However, a few words about bitcoin and similar things as they have worked out in the real world are in order. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since it has become difficult to generate new bitcoin, two things have happened. Mining rigs are using up a significant amount of energy - and likely generating a significant amount of carbon dioxide. One estimate of the energy used is approximately that of the nation of Ireland. The other is that these rigs and the energy are expensive, so many internet attacks are now done to install bitcoin miners on other people's systems so that &lt;em&gt;they&lt;/em&gt; can bear the cost without benefit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bitcoin market has also proven to be very volatile. Fortunes have been made (by the early investors/miners) and lost (those who believe the hype). That makes it remarkably similar to a Ponzi Scheme. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-17T20:22:59.897" LastActivityDate="2018-05-17T20:22:59.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4772" PostTypeId="1" CreationDate="2018-05-16T02:10:13.560" Score="7" ViewCount="272" Body="&lt;p&gt;I am a grade 11 student at school. I created and am running a programming club each lunch. We meet once a week (typically, sometimes I have to cancel since my club isn't &lt;em&gt;important&lt;/em&gt;). We have 50 minutes each lunch, though I lose 10-15 for logging-in (my school uses Windows), and other time loses.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;History&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Last year I tried using Godot to teach them, and using Youtube tutorials, but we progressed an average of 15-20 minutes per day. Since they are simply copying the code most the time, and one of the students is nearly always absent. And the school computers don't work with the new version of Godot, so I decided it would be best to change.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Plan&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;It will be my last year, so I want to at least get some of them interested enough to continue the club once I graduate. I had 3-4 students this year, I might have 3-6 grade 7-9 students next year. Since Godot isn't working and the kids just play games, I thought of modding Minetest with &lt;em&gt;lua&lt;/em&gt;. This would allow me to have a buffer at the end of class where they can just play and debug while learning.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Questions&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want to know if there are some resources that could help me teach that club.&lt;/li&gt;&#xA;&lt;li&gt;Any way to structure class time.&lt;/li&gt;&#xA;&lt;li&gt;How should I teach them, all work on similar projects, or should they work together on a project.&lt;/li&gt;&#xA;&lt;li&gt;In what order should I teach concepts&lt;/li&gt;&#xA;&lt;li&gt;What should I do about absent students&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Plan for teaching&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unit 0: Intro&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Installing Minetest&lt;/li&gt;&#xA;&lt;li&gt;Installing text editors (not Notepad) &lt;em&gt;suggestions&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Installing a simple mod&lt;/li&gt;&#xA;&lt;li&gt;Mod folder structure&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Unit 1 Creating blocks&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using print&lt;/li&gt;&#xA;&lt;li&gt;Creating basic cubes&lt;/li&gt;&#xA;&lt;li&gt;Creating textures using GIMP&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Unit 2: Formspecs&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;I will edit this more after people answer&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for your help&lt;/p&gt;&#xA;" OwnerUserId="5202" LastEditorUserId="5202" LastEditDate="2018-05-16T12:41:14.117" LastActivityDate="2018-05-22T07:58:40.880" Title="Student Teaching Minetest Modding in school as club" Tags="|secondary-education|resource-request|game-design|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4773" PostTypeId="2" ParentId="4772" CreationDate="2018-05-16T08:42:21.540" Score="2" Body="&lt;p&gt;Here is a link to a magazine &lt;a href=&quot;https://helloworld.raspberrypi.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;helloworld&lt;/a&gt;  written for teachers of computing (k→13). It is free to download as pdf, and free on paper to teachers in the UK. It has some good articles on the use of play; copying and modifying; working in groups;  and many other ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also observe how your teachers teach. What do they do well. What could they do better. Do not judge (it is not good for you), but take ideas from them, and avoid doing what you know does not work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Above all don't talk to much, make it clear what their (the students) goals are, and make them work harder than you.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="2516" LastEditDate="2018-05-16T13:05:51.487" LastActivityDate="2018-05-16T13:05:51.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4774" PostTypeId="2" ParentId="4772" CreationDate="2018-05-16T11:15:48.000" Score="5" Body="&lt;p&gt;You seem to be focused on game development, which is probably the right thing to do since at least some of your student colleagues will also be interested. But there are other possibilities to keep in mind, such as some simple information system that your school might use. Teachers might be able to give you ideas about that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you want the club to continue after you leave, I'll suggest two things. You should probably try to develop one student to take your place and spend more time with him/her to foster a leadership role. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More important, I think, is to pick the right project for your group. If you aim for a large result that can be built in parts and where each added part adds visible value (punch) then you might have something sustainable. You don't want a small project (or set of projects) since continuation means finding more projects. You don't want a project that isn't useful/cool/exciting along the way (but only at the end), since you don't get any psychological reward as you go. Pick a project that is large enough so that it can't be &quot;finished&quot; in the time available. It will then be an inducement to continue in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also suggest that you don't try to lecture, but rather form an &lt;a href=&quot;https://en.wikipedia.org/wiki/Agile_software_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;Agile Software Development&lt;/a&gt; programming team, using some of the practices of &lt;a href=&quot;https://en.wikipedia.org/wiki/Extreme_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;Extreme Programming&lt;/a&gt;. See &lt;em&gt;Activities&lt;/em&gt; and &lt;em&gt;Practices&lt;/em&gt; at the last link. There are other possibilities but XP is fairly easy to follow. Use short &lt;em&gt;iterations&lt;/em&gt; and small &lt;em&gt;stories&lt;/em&gt;. But make sure that each story adds gaming-value: something that will actually affect the play of the game. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above will also favor collaboration, which is a useful skill. Don't worry about absent students. Work with what you have. If the thing is interesting enough people will want to participate. But it has to be interesting both in its own right and also in the day-to-day activities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also suggest, pretty strongly, that, rather than laying out a curriculum for this, that you explore topics on a need-to-know, just-in-time basis. Making it like a regular course might not be as appealing to others as just keeping it like a club.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't exclude newbies, but incorporate them, and their enthusiasm, into the project and enable it with &lt;em&gt;Pair Programming&lt;/em&gt;, starting them out as &lt;em&gt;Navigator&lt;/em&gt; with one of you &quot;old timers.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck with this, and in your future. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-16T17:48:38.360" LastActivityDate="2018-05-16T17:48:38.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4775" PostTypeId="2" ParentId="4759" CreationDate="2018-05-16T12:31:41.843" Score="5" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I found it strange when first learning Haskell that the language was never used in any of my classes, especially considering how much easier and more obvious it makes the implementation of fundamental data structures like trees and lists&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It might make implementing some data structures easier, but not all -- for example, I don't really think Haskell would make implementing arraylists or hashmaps necessarily easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Also: I think implementing trees and lists is relatively simple in languages like Java or Python. The hard part, IMO, isn't teaching students how to implement trees or lists: the hard part is showing them how to manipulate them in arbitrary ways while avoiding edge cases. That's going to be challenging whether you approach the problem imperatively or functionally.)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When building enterprise-scale systems, avoiding things like state mutation becomes critical.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But what if you want to implement something like a video game? Mutation is an integral part of programs like those. Of course, there are ways to restructure your code to avoid mutation, but most existing literature, tools, libraries, game engines, etc... related to gamedev don't take such an approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or what if you want to go into embedded systems or security and end up needing to mess around with a lot of assembly or C? For better or for worse, you're going to end up spending a lot of time working with lower-level languages: functional languages won't necessarily end up being relevant to your work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or what if you're interested in scientific and mathematical computing? Again, I don't think functional languages are really widely-used here: languages like Python, R, Julia, C, or maybe even Matlab and Fortran are more ubiquitous for a variety of reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basically, a CS curriculum is supposed to prepare students to excel in a wide variety of backgrounds, not one specific area. For that reason, I don't know if it's necessarily correct to assume that all (or even most!) students will move into working on enterprise software and the like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I think many &quot;intro to CS&quot; courses are targeted to be useful for people who may not necessarily want to move into computer science but still want to learn coding as a skill. In that case, you'd probably want to teach them a more mainstream language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(You &lt;em&gt;could&lt;/em&gt; also split up your &quot;intro to CS&quot; course into a &quot;intro for non-majors&quot; and &quot;intro for majors&quot;, but that would introduce some overhead, both for students and teachers.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;But of course, none of what I said above directly pertains to the heart of your question. I'm making the argument that a school shouldn't teach &lt;em&gt;only&lt;/em&gt; functional programming, which isn't what you're asking: why don't we start with functional programming &lt;em&gt;first&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, I'm personally not convinced that Haskell-style languages that push for immutability and clear containment of side-effects are actually going to be approachable, or even useful, for absolute beginners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If somebody has zero background in programming and tech, one of the best ways of &quot;hooking them in&quot; is to have them start writing programs that actually do interesting things as soon as possible. That's why so many introductory tutorials these days start with webdev and JavaScript, why logo (and modules like 'turtle' in languages like Python) are such a popular choice, and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More recently, there's been a trend to start incorporating actual hardware into intro classes -- using things like &lt;a href=&quot;http://microbit.org/&quot; rel=&quot;noreferrer&quot;&gt;micro:bits&lt;/a&gt;, for example. Or to rephrase: a trend of finding ways of giving the student more interesting ways to mutate state: LEDs, stepper motors, electronic components, and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contrast this with languages like Haskell: in order to do anything that interacts with the world, you need to start by explaining how the IO monad works (or find some convincing way of handwaving it all away).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this isn't an insurmountable challenge, it &lt;em&gt;is&lt;/em&gt; a potential stumbling block and is sort of annoying, especially if you're trying to ramp students up to doing interesting things as soon as possible. And the more you can improve potential stumbling blocks, the better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A little more broadly, I think immutability and containment of side-effects can be very useful when working on large-scale programs, but they seem sort of gratuitous and unnecessary when working on smaller ones: it's challenging to demonstrate why they're useful, especially in intro when they have no context into what the alternative would look like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(IMO this is also why many schools struggle with effectively teaching students how to use version control tools like git: even if you ask students to work in teams on a long-term project, you don't really need to use things like branches and can get away with just pushing directly to master.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Basically, while I'm a fan of functional programming, it's hard for me to see how exactly you'd go about teaching it to beginners. I'm sure that if I were really pressed, I could figure something out, but it's non-obvious to me how I'd teach the material in a high-quality way and how I'd rearrange certain topics I think are essential.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(For example, many students struggle immensely with the notion of &quot;indirection&quot; -- basically, how to use things like references and pointers. But if we're using an immutable language, indirection suddenly isn't as relevant: a variable could be a reference to some data or a copy of said data: it makes no difference. In that case, how and where should I teach students about indirection?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taking all of the above into account, I think a more tractable alternative is to start with a language like Python (or maybe Java?) &lt;em&gt;first&lt;/em&gt;, then move on to more challenging languages like C or Haskell second.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2018-05-16T12:31:41.843" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4776" PostTypeId="2" ParentId="1299" CreationDate="2018-05-16T13:17:39.857" Score="3" Body="&lt;p&gt;Your &lt;em&gt;specific&lt;/em&gt; question is whether there have been any studies of whether it is more effective to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Introduce mathematical functions first, then explain how computer program functions can be nondeterministic or have side effects, or&lt;/li&gt;&#xA;&lt;li&gt;Introduce computer programming functions first, then explain how mathematical functions are a disciplined subset of those that have a fixed deterministic mapping.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am not aware of any research on this question. My intuition is that it would be difficult to run such an experiment, because students encounter the mathematical notion of function when they are twelve years old. &lt;strong&gt;I've taught since the 80's and on two continents, and have never seen a beginning programming student who hadn't already seen mathematical functions first&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your &lt;em&gt;implied&lt;/em&gt; question is how best to teach the difference. In my experience, beginning programmers quickly learn that we redefine (or misuse) lots of words from other fields, and don't get hung up on vocabulary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again in my experience, the distinction that seems to help is differentiating between &lt;em&gt;nondeterminism&lt;/em&gt; and &lt;em&gt;side effects&lt;/em&gt;. Your example of &lt;code&gt;rand&lt;/code&gt; falls in the former case: it looks like a function, it has a domain and a range, but it doesn't always give the same answer. That concept is pretty specific to CS and is (as they say) a good pedagogical opportunity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When the concept of side effect is introduced it is usually best to be explicit about which object is maintaining the state, and call the &quot;function&quot; a &lt;em&gt;method&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5208" LastActivityDate="2018-05-16T13:17:39.857" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4777" PostTypeId="2" ParentId="4717" CreationDate="2018-05-16T14:42:32.190" Score="3" Body="&lt;p&gt;I had a similar issue in a class about video coding. There is a set of design decisions, that are quite abstract, and then there are actual codecs. The codecs went on relaxing &lt;em&gt;many&lt;/em&gt; constraints of initial theoretical design decisions, because then it works better and yields better compression rate. But it does not make it easier to understand for a beginner.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what I caught myself constantly saying was more or less this. I am trying to highlight the key phases.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The &lt;strong&gt;generic idea&lt;/strong&gt; is that you have an I frame at the beginning of the GOP.&#xA;  When you think about a P frame now, &lt;strong&gt;just for understanding&lt;/strong&gt;, think that it can reference only a preceding I or P frame. &lt;strong&gt;In practice&lt;/strong&gt; it is possible to reference a frame &lt;em&gt;after&lt;/em&gt; the P frame. Actually, there are I-, P-, and B-blocks and frames are built out of them. And, like, with H.264 the criteria of a GOP are also relaxed. &lt;strong&gt;This will be discussed in a detail later&lt;/strong&gt;, when we get there. But for &lt;strong&gt;a theoretical overview&lt;/strong&gt;, that is also &lt;strong&gt;relevant for an exam&lt;/strong&gt;, use the generic, theoretical view above. If a question does not specify a concrete codec, you need to use this generic idea of a video codec without exceptions used in concrete implementations.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;And then I also had an exam question of &quot;which frame would reference which&quot; in this &quot;generic ideal video codec&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2879" LastActivityDate="2018-05-16T14:42:32.190" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4778" PostTypeId="2" ParentId="4759" CreationDate="2018-05-16T19:36:50.220" Score="1" Body="&lt;p&gt;The computing ecosystem keeps making smaller and smaller things.  Imperative programming is far better matched to Arduinos and other small cheap computers that a k12 and earlier student is likely to tinker with (as opposed to just be a user of).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2018-05-16T19:36:50.220" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4779" PostTypeId="2" ParentId="4767" CreationDate="2018-05-16T20:36:15.847" Score="4" Body="&lt;p&gt;While it's not complete and almost certainly not the reference mentioned in the paper, Philip Guo &lt;a href=&quot;https://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-u-s-universities/comments?page=1&quot; rel=&quot;nofollow noreferrer&quot;&gt;compiled a list&lt;/a&gt; of programming languages used in introductory courses at top 40 departments (as ranked by US&amp;amp;WN). The key result is this table:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://cacm.acm.org/system/assets/0001/6722/Top39-700.4.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;which shows that the only functional language, Scheme, is used in roughly 12% of departments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two problems I see with using this as a statement about CS education at-large: first, this is a sample of the top 40 research institutes, which may not be representative in terms of teaching habits. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, Guo (by his own admission) is counting both CS0 and CS1 courses in here. For example, he counts CS303E at UT Austin as an intro Python course, although it's intended as a half-semester language intro for non-majors. This may skew the appearance of certain languages in his data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, a note: in the comments section of that article is a statement that says &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What we need is someone to resurrect the more comprehensive annual survey that I believe Jean E. Sammet used to do up to a few decades ago...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I wasn't able to find any record of this survey, but if &quot;a few&quot; means just one or two, then that might be the source you're looking for.&lt;/p&gt;&#xA;" OwnerUserId="1839" LastActivityDate="2018-05-16T20:36:15.847" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4780" PostTypeId="2" ParentId="1299" CreationDate="2018-05-17T07:12:40.480" Score="3" Body="&lt;p&gt;A bit of history may help: the (now confusing) word &lt;code&gt;FUNCTION&lt;/code&gt; was introduced in FORTRAN II (1958, see manual &lt;a href=&quot;http://archive.computerhistory.org/resources/text/Fortran/102653989.05.01.acc.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;), together with SUBROUTINE as facilities in order to &quot;effectively enable the programmer to expand the language of the system indefinitely&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the original version of FORTRAN, the programmer simply used formulaes, which were &quot;a kind of arithmetic statements&quot; (P10), under the form of a function name followed by arguments enclosed in parentheses etc.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;FIRSTF(X) = A*X + B&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and were clearly intended (at least, if you the formula doesn't refer to functions with side-effects) to be side-effect free.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The new FUNCTION device was here to allow more complex functions with several statements and auxiliary variables. Also for separate compilation and code reuse. Opened the door to use FUNCTION for code units that do some processing, possibly with side-effects, and incidentally return some value. Say, an error code ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The distinction between FUNCTION and SUBROUTINE was later blurred with C. Everybody is a so-called function now. Not necessarily related to the mathematical notion of functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my current way of teaching to novice programmers, I first introduce &quot;void functions/methods&quot; without parameters as groups of actions. The use of the Processing environment helps here as it is easy to give the example of a big drawing with parts defined in methods for obvious convenience.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-05-17T20:49:41.370" LastActivityDate="2018-05-17T20:49:41.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4781" PostTypeId="1" AcceptedAnswerId="4785" CreationDate="2018-05-17T14:19:22.603" Score="56" ViewCount="19349" Body="&lt;p&gt;I've been teaching programming to my 13-year old son for over a year now. I'm not satisfied with his progress. I think that one of the reasons is his attitude: He wants to learn programming (he said several times that he wants to do something related to programming, technology, and/or game development), he makes some progress (he decomposes the task into smaller ones, he tries things out), but he regards it as work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the secrets to productivity in IT is that many programmers enjoy the process. It's not work and it's not a chore. Sometimes, I turn on good music, take a bottle of liquid happiness, then program for several hours for the fun of it. I'm not accomplishing a task, I'm enjoying the process. Under the right circumstances, you can get into &lt;a href=&quot;https://en.wikipedia.org/wiki/Flow_(psychology)&quot; rel=&quot;noreferrer&quot;&gt;flow&lt;/a&gt; from such &quot;work&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do in order for another person to experience the feeling that programming is an activity you can do for fun and recreation?&lt;/p&gt;&#xA;" OwnerUserId="4022" LastEditorUserId="58" LastEditDate="2018-05-17T22:24:31.413" LastActivityDate="2018-11-16T02:38:50.700" Title="How to teach a person to enjoy programming?" Tags="|student-motivation|" AnswerCount="27" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="4782" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T14:37:29.687" Score="7" Body="&lt;p&gt;You seem to have much, at least, of the answer already. He should enjoy it, he should try things he is interested in, etc. You recognize from your own past that it isn't easy to be motivated initially. It can be boring. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Probably you have already asked him what it is that he makes it &quot;feel like work&quot; rather than fun. If not, do so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the aspects that may be missing for him is a social component. Does he generally like to work alone or is he more comfortable in a social situation interacting with friends? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might try to have him learn with one of his &quot;pals&quot; who shares some interest. The two (or three...) can swap ideas, try out pair programming, perhaps even be a bit competitive, if they enjoy that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or are you pushing him too early into too structured a way of programming, giving him a &quot;process&quot; like decomposition, etc? Maybe better in this case, and perhaps with other youngsters, to just let them explore and thrash about. The learning may not be as &quot;efficient&quot;, but it may be sufficiently motivating that they get in the door. They certainly don't need &lt;em&gt;developer discipline&lt;/em&gt; at that age. If they thrash for a while, they can learn that there is a more efficient path to the goal, but, but efficiency isn't the main goal &lt;em&gt;now.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-17T18:31:06.867" LastActivityDate="2018-05-17T18:31:06.867" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4783" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T15:02:47.630" Score="29" Body="&lt;p&gt;When you point at someone, there are three fingers pointing back at you, so I have some questions for you:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How many people do you know who are also interested in programming, outside of work, obviously?&lt;/li&gt;&#xA;&lt;li&gt;When you were 13, how many people did you know who were interested in the same things as you (even if it was not programming at that time)?&lt;/li&gt;&#xA;&lt;li&gt;Even among people you know who are also interested in programming, how many are interested in the same aspects of it that you are?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It is quite possible that your answers are: zero, zero, zero. That has been the case for me throughout my life, about basically every area which interests me. That bad news is that you cannot get anyone else to like the same things you do. I look in vain for anyone else who has even heard of &lt;em&gt;16 Bit Lolitas&lt;/em&gt;, let alone likes their music. (You could start.) I don't know anyone else who eats bags of Ghirardelli dark chocolate chips. When I was a child I had no friends who also scavenged parts from discarded TVs, or was even interested in electronics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say that your son is interested in something &quot;&lt;em&gt;related to&lt;/em&gt; programming, technology, and/or game development&quot;, but that is a massive area which includes many non-programming things. I used to own an acoustic and electric guitar, but try as i might, I had trouble making myself practice. What really interested me was the equipment: guitars, amplifiers, microphones, PA systems... But I couldn't &quot;form a band&quot; that did event staging. (I was involved in theater in High School though.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some things are just not available. When I was a child, no one ever sought out and took me to the large, active Amateur Radio club right there in town. Parents and other adults didn't know or care about it, so I was not helped with that. Maybe you could find out what your son is &lt;em&gt;really&lt;/em&gt; interested in and get him there? Taylor Swift's parents relocated the family to Nashville when it was obvious that she could sing and write music.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was a member of a large and active Amateur Radio club recently, I did not know one other person whose interests really were similar to mine. The field is simply too large. I was an expert in magnetic loop antennas. We had an expert in contesting, one in Morse code, another in microwave equipment, and so on. All of us were essentially alone in our interests, and no matter how many times we introduced our fav topic, it fell flat, even in a group of like-minded people! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice is to &quot;get used to disappointment&quot;, but be as helpful as you can, with whatever your son wants to do. Many people get to college (as another question here recently stated) with &lt;strong&gt;no idea&lt;/strong&gt; what they want to learn about or do with their lives. This is incomprehensible to me (I was asking about computers when I was 7, long before the IMSAI hit the streets) and so I have no advice on how to generate interest, convey it, inculcate it, support it, or any other thing to do with it. It just is whatever it is, or it aint.&lt;/p&gt;&#xA;" OwnerUserId="5215" LastActivityDate="2018-05-17T15:02:47.630" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4784" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T16:52:59.107" Score="14" Body="&lt;p&gt;Let's take a look at the condition's for Csikszentmihályi's&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; flow theory:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Flow theory postulates three conditions that have to be met to achieve a flow state:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One must be involved in an activity with a clear set of goals and progress. This adds direction and structure to the task.&lt;/li&gt;&#xA;&lt;li&gt;The task at hand must have clear and immediate feedback. This helps the person negotiate any changing demands and allows them to adjust their performance to maintain the flow state.&lt;/li&gt;&#xA;&lt;li&gt;One must have a good balance between the perceived challenges of the task at hand and their own perceived skills. One must have confidence in one's ability to complete the task at hand.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;sup&gt;Source: &lt;a href=&quot;https://en.wikipedia.org/wiki/Flow_(psychology)#Conditions&quot; rel=&quot;noreferrer&quot;&gt;Wikipedia&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You're right that your son is more likely to get into a flow state when he feels like he has some mastery.  It can be difficult to stay motivated when you are stuck doing really hard things, particularly if you're just not sure how to proceed.  So, gains in &lt;em&gt;fluency&lt;/em&gt; will help enormously.  This is what you pinpointed, so there's a good chance that this is the biggest missing factor.&lt;/p&gt;&#xA;&lt;p&gt;The task of programming itself takes care of the feedback process, which is natural and nearly instantaneous.&lt;/p&gt;&#xA;&lt;p&gt;And for the goals, one of the keys to setting up an intrinsically motivating project is autonomy.  Help him to create projects that suit his interests.  He might have fun trying to create the stupidest, most unfair (but still technically winnable) game that he can devise.  Or, being a 13-year-old boy, he might enjoy creating a game that makes a giant, ripping fart sound when you win.&lt;/p&gt;&#xA;&lt;p&gt;Or maybe he'd be more motivated to help solve a world problem, or coding something as a school project to impress his teacher.  (PowerPoint and Visual Basic are a particularly good combination for this.)&lt;/p&gt;&#xA;&lt;p&gt;The point is that autonomy, fluency, and fun are the keys here.  That means that, to some extent, his sense of fun and motivation has to be the guide to what to do next, because they hold the keys to motivation.  And from your end, try to keep things from getting so hard that he becomes demotivated.&lt;/p&gt;&#xA;&lt;h1&gt;Fluency + immediacy + autonomy + a &lt;em&gt;little bit of challenge&lt;/em&gt; = fun.&lt;/h1&gt;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - Try saying &lt;em&gt;that&lt;/em&gt; five times fast.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-17T18:15:50.583" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4785" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T17:07:14.003" Score="86" Body="&lt;p&gt;Meet him where he lives. Take something he's already interested in and use programming to accomplish some goal within that interest. The act of coding is not the end goal, the final &quot;product&quot; is the end goal. Make it about that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you've said your son is interested in game development. Encourage him to create a &lt;strong&gt;simple&lt;/strong&gt; game using a language like &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt; or a tool like &lt;a href=&quot;https://www.yoyogames.com/gamemaker&quot; rel=&quot;nofollow noreferrer&quot;&gt;Game Maker&lt;/a&gt;. The keyword here is simplicity- your son will probably want to make Call of Duty or Minecraft. Encourage him to start with Pong instead, and work his way forward from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe participate in a &quot;game jam&quot; like &lt;a href=&quot;http://ldjam.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ludum Dare&lt;/a&gt; together. The idea is to spend a weekend creating a game around a theme that's announced on Friday, and you can participate from your own home. The next official event isn't for a couple months but they run &quot;mini jams&quot; every other weekend.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't have to be game development though. The idea is to use programming within his existing interests so he sees the fun and utility of code naturally. If he's into sports then maybe write a sports simulator. If you travel then maybe have him create a travel log from Google Maps API. If he's into music, create a music visualization. If he's into movies, point him to video processing libraries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But again, the projects you give him should be simple, so he can make visible progress on them in a short amount of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also consider being an example: what cool projects are you working on that you can show him? Can you give him a simplified version of something and have him &quot;remix&quot; it by changing variables and logic instead of needing to come up with everything himself?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Related questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/3212/2068&quot;&gt;How can I determine if a student would enjoy or has an aptitude for CS?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4489/2068&quot;&gt;Which non-programming skills help make a good programmer?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-11-16T02:38:50.700" LastActivityDate="2018-11-16T02:38:50.700" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="4786" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T18:45:09.160" Score="4" Body="&lt;p&gt;Think about the gaming world and the endless variety games come in. Think about games you like that other people don't. Think about games other people like that you don't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just as there is a variety of game types there is a variety of gamer types. Some people like BLAM BLAM BLAM shooters. Some people like relaxing slow-paced games. Some people like exploration games. And some people like intellectually stimulating puzzle games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think programming appeals to the puzzle solvers in us. I have a friend who is taking some computer classes in college and she says she loves solving problems when she programs. There is a certain payoff when we figure out how to make things work. This payoff may not trigger the same happy reaction in everyone's brains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not everyone is a puzzle solver, so not everyone will enjoy programming. If you're determined to help him enjoy programming then you might try to find out why he doesn't like it so much. Perhaps the challenges are so difficult that he's never quite able to come up with solutions on his own and so he never experiences the payoff. If that's the case, you could try to craft specific challenges that you know he'll be able to solve with his skill set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are actual programming games that might help as well. Sierra's &lt;a href=&quot;http://www.old-games.com/download/5867/lost-mind-of-dr-brain&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Lost Mind of Dr. Brain&lt;/a&gt; from 1995 had a segment called Motor Programming that was an introduction to programming for a lot of kids. A more recent example is a successful series from my friend Danny Yaroslavski called &lt;a href=&quot;http://lightbot.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;LightBot&lt;/a&gt;. Even Google did an &lt;a href=&quot;https://www.google.com/doodles/celebrating-50-years-of-kids-coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;interactive doodle about code games&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5105" LastActivityDate="2018-05-17T18:45:09.160" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4787" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T18:49:56.937" Score="2" Body="&lt;p&gt;Besides making a simple game from scratch, like Kevin Workman suggested, you can also look for an open source game and try to modify it together. It'll allow him to see the reward much quicker. You can make incrementally more complex modifications. Let him watch you and imitate you. Explain everything you do, including the thought process as you're doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you can take a game that has shooting dynamics like an FPS or a scroll shooter (could be 2D to make things easier), and try to modify the shooting dynamics. Maybe have the shots fire 3 bullets at a time at different angles. Let him see you browse through the code, grepping around to find the relevant code. For a more complicated modification make the bullets travel slower, light up like lasers, and curve toward the enemies.&lt;/p&gt;&#xA;" OwnerUserId="1482" LastActivityDate="2018-05-17T18:49:56.937" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4788" PostTypeId="2" ParentId="4727" CreationDate="2018-05-17T20:19:16.527" Score="3" Body="&lt;p&gt;Prolog &lt;em&gt;promises&lt;/em&gt; &quot;programming in logic&quot;, but you end up worrying about the order of your predicates, and have to be acutely aware of the order in which they are recursively (procedurally!) tried by your interpreter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Too much confusion, even for a non-beginner.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastEditorUserId="5219" LastEditDate="2018-05-18T12:16:10.163" LastActivityDate="2018-05-18T12:16:10.163" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4789" PostTypeId="2" ParentId="4781" CreationDate="2018-05-17T20:46:46.413" Score="9" Body="&lt;p&gt;You're making a very fundamental mistake, I'm afraid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;You're not supposed to enjoy programming.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me explain. Programming is a &lt;strong&gt;&lt;em&gt;tool&lt;/em&gt;&lt;/strong&gt;, not an end goal in itself. Suppose your son was interested in being a mechanic. You haven't come here saying &quot;my son isn't enjoying fixing cars&quot;, you've come here saying &quot;I've spent all this time teaching him how to use a screwdriver, but he doesn't see the fun in using a screwdriver&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A screwdriver is one of the tools you'd use as a mechanic. Coding is one of the tools you'll use in software engineering. But coding is not engineering. Engineering is &lt;em&gt;making something&lt;/em&gt;. I'm sure your epic coding sprees are not just &quot;hey, I'm writing C++&quot;; they'll result in you saying &quot;I've made this, isn't it cool?&quot; for an end product you think really is cool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's where your son has to think about what he enjoys. Does he want to write games? Does he have ideas for some app? Does he want to try playing with AI? Does he like making up automated Word and Excel documents? Is he keen on music technology, perhaps?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or if he's like me, perhaps he might want to try something that involves making something do things in the real world. I always liked messing around with my old Commodore, but what I really liked was building stuff. The two came together when I went to uni and specialised in real-time control. It totally rocks to work on some software, and then jump in the car where the engine controller is driving with that software. These days it's easier than ever to do this, with Arduino and Raspberry Pi.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And conversely, if I'm slogging through some configuration scripts to do testing, that's pure work for me. No fun at all. It needs to happen, and it's still programming, but it's the bit where I just have to push through the boredom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So don't focus on the tools, focus on what comes out of it.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastActivityDate="2018-05-17T20:46:46.413" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="4790" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T01:49:50.923" Score="3" Body="&lt;p&gt;Enjoying the process is a double-edged sword.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You think my job is to write code? My job is to solve problems. &lt;em&gt;Code is often the worst way to solve problems&lt;/em&gt;. I enjoy the process, and I &lt;em&gt;constantly&lt;/em&gt; have to remind myself that the means are not the end.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, most techno-religious &quot;debates&quot; are perpetrated by people who enjoy the process. Most &quot;bikeshedding&quot; arguments too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, maybe your son just isn't that in to it. Maybe this isn't for him. But maybe he's &lt;em&gt;juuust&lt;/em&gt; into it enough to be a good engineer, without being &lt;em&gt;too&lt;/em&gt; into it.&lt;/p&gt;&#xA;" OwnerUserId="1790" LastActivityDate="2018-05-18T01:49:50.923" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4791" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T02:16:24.213" Score="1" Body="&lt;p&gt;Because you're probably teaching him in the wrong way. Most people do. I learnt how to program when I was nine. The best way to learn how to program is building &#xA;something you love.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;All you need is pure C++ compiler&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You say he loves Games? Build small games like Tic-Tac-Toe, Hangman, and stuff like that. Teach him game theory and ask him to use it in his next MCQ type test.&#xA;Teach him game loops, and recursion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, move to something that requires more thought. Like a chess engine, tell him how RPG's work, build a graphic-less RPG. Make an AI that plays against you. Build a treasure hunt game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build a maze, and design an AI to complete it using game theory only. Then teach him how to use Machine Learning to make the AI better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still love building 2D games. You need to bother with physics or a need a PC that actually supports 3D-animation softwares. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give it a try. He'll love it&lt;/p&gt;&#xA;" OwnerUserId="5224" LastActivityDate="2018-05-18T02:16:24.213" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4792" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T06:23:27.850" Score="2" Body="&lt;p&gt;I did a computer science degree but after that in order to learn industry specific skills in web application development I taught myself by creating simple games. What I did was actually trace art I loved (by sci-fi and fantasy artists) to simplify the digital component. This resource development is separate to programming but it made that part very easy and captured my imagination. Then I broke the graphics apart to make &quot;puppets&quot; I could animate and interact with then coded the collisions, movements etc. and a game loop using Flash ActionScript. Then I built a website locally so learned HTML etc. The total scope of the project was clearly defined, simple, and and felt and looked good when I showed people. It was fast to develop (outside of the learning component), rewarding and built my self-esteem. Many years later I'm a senior software engineering consultant. However motivation comes from within. I think its best to find a passion he might have and run with it. Computer programming is a broad area these days after all.&lt;/p&gt;&#xA;" OwnerUserId="5228" LastActivityDate="2018-05-18T06:23:27.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4794" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T11:07:23.333" Score="4" Body="&lt;p&gt;What I found with my experience of programming was that I didn't enjoy the process for its own sake for &lt;em&gt;years&lt;/em&gt;. I've always needed validation from seeing things working and showing off to others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest your son needs more rapid payoffs. He's young, his attention span is short. At his age I would have wanted to make very short changes and see immediate results.&#xA;Zen Programming isn't something I'd expect a child to be interested in, it's a much more mature behaviour that we get into once we're so confident that we hardly need to think about the process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suggest that you pick up something like Game Maker or Unity3D, or see if you can make something like a small website together. It's very much the same skillset you're trying to teach, but the turnaround is particularly quick and visual feedback will reinforce his sense of accomplishment more than any console output is likely to.&lt;/p&gt;&#xA;" OwnerUserId="5233" LastActivityDate="2018-05-18T11:07:23.333" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4795" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T11:07:27.387" Score="2" Body="&lt;p&gt;Interesting that there is a clear divide in the answers between the Engineer types who program to achieve a goal - where coding is just a tool - and the Craftsperson type who enjoys working the material. The OP clearly described himself as enjoying the act of coding. &lt;em&gt;That&lt;/em&gt; is what he wants his son to have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well sorry, it does not work that way! Some are born to coding, some achieve coding and some have coding thrust upon them. You will never convince someone that your approach is better than theirs. I thought that being a parent was helping your children achieve &lt;em&gt;their&lt;/em&gt; objectives, not indoctrinating them with yours?&lt;/p&gt;&#xA;" OwnerUserId="5234" LastActivityDate="2018-05-18T11:07:27.387" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4796" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T12:11:06.170" Score="9" Body="&lt;h2&gt;Motivation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I'm seeing a bit too many answers with &quot;programming is not supposed to be fun&quot;, and I disagree strongly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;OP wrote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Sometimes, I turn on good music, take a bottle of liquid happiness, then program for several hours for the fun of it. I'm not accomplishing a task, I'm enjoying the process. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is very understandable and &quot;normal&quot; to me. I have started programming when I was roughly 13, in the early 8-bit home-computer area (Atari etc.). These days, I am a senior manager in a large IT company, and when I need stress relief, I grab some project and program for a bit; also I frequently am able to help youngsters out when they are at their wits end with some programming task. Last holidays, I played the games TIS-100 and Shenzhen I/O for a week straight while sitting at the beach, which consist of programming some more-than-weird assembler dialect. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, during my studies of CS and subsequent work in the field, first as programmer, then team-lead etc., the number of people that align with this view were indeed minimal. Unfortunately, many, many people really are in this job for &quot;solving problems&quot;, not because they enjoy programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not about being a recluse, sitting in the corner of a room all day, and writing lines of code until your finger bleed. But enjoying something is, at least in my opinion and experience, the only source of real learning and improvement. I see it everyday, people who do not actually enjoy programming a) regularly fail to grasp more complex topics, b) are stressed out a lot, c) do their best to get out of programming ASAP. It is a meme in my rather large company, that young people do programming, and older (sometimes even starting 30+) get out of it as quick as possible for some managerial position. I am one of the few in a &quot;post-programming&quot; position who grasp what we are even doing today on a less-than-abstract level, and it is very saddening to me. (And do note that I am not lessening the importance of having experienced &quot;architects&quot; or other roles, which make up a significant portion of my work as well, obviously.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For me, this is like working as a cabinet maker, and only wishing to sell the finished result while not being interested in the look, feel and smell of the raw wood or the beauty of the work itself. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;That said...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I view it as the most important and beneficial job of a CS educator to instill fun about the field, not the least about programming, in the students, no matter what age or experience level. Do not be dissuaded from that by the difficulties you face.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, I have not really found a way myself to instill &lt;em&gt;real, deep&lt;/em&gt; joy and interest towards programming in people who do not already have it. I have met &lt;em&gt;many&lt;/em&gt; people who program all the day for many years, and don't enjoy it a bit. They enjoy &quot;solving problems&quot;. Which usually means taking as many shortcuts as humanly possible and trying to get done with it ASAP, scorning the type of the work they must do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do all you can to make it fun for your son. With my (younger) daughter, I'm very slowly and partly successfully introducing her by the means of Minecraft (=&gt; with its minuscule amounts of &quot;programming&quot; optionally available there); we tried &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer&quot;&gt;Scratch&lt;/a&gt; (didn't interest her); she will probably get a Nintendo Labo set for her next birthday; I even showed her some BASIC (in an actual Atari 800 XL emulator :-) ), but that was more like &quot;look what your old dad did 100 years ago&quot; and obviously not really applicable in todays world. She saw a &quot;hello world&quot; (or rather &quot;hello YOURNAME&quot;) and at least has a small inkling about what it's all about. Aside from that, she's obviously also at the level of &quot;dad, can you show me how I can program a game like Minecraft, pretty please&quot;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She is still a bit too young for more, but my strategy is to get her hooked at some point, when she will be able to research stuff herself (just as I did back then with paper books). And obviously she will need to find something that actually interests her. If we don't find that, then I will be very happy about her not becoming a programmer / CS girl in the future.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2018-05-18T19:32:40.077" LastActivityDate="2018-05-18T19:32:40.077" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4797" PostTypeId="2" ParentId="4759" CreationDate="2018-05-18T12:28:44.357" Score="1" Body="&lt;p&gt;It is just that we &lt;em&gt;think&lt;/em&gt; procedurally. We &quot;go to the store&quot;, we &quot;cook dinner&quot;, we &quot;do the dishes&quot;, and so on. The functional, recursive, based on induction, mathematical, thinking is very far from natural (ask any teacher of mathematics to students in first-year calculus courses, take a peek at what the colleagues of the math department think about their freshmen). Sure, programming is (thinly disguised) math, and so math style (functional programming) is more &quot;natural&quot; &lt;em&gt;if you have groked math&lt;/em&gt;. Most people never get it.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T12:28:44.357" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4798" PostTypeId="2" ParentId="4734" CreationDate="2018-05-18T12:38:19.140" Score="1" Body="&lt;p&gt;&quot;Group work&quot; is hard to handle. One of the first courses I taught here was structured around a bunch of homework programming tasks, to be done in two-person teams. Around midterm one of the students showed up complaining he had done &lt;em&gt;his half&lt;/em&gt; of the homeworks (his mate didn't participate), and now it was the mate's turn... and the mate had left the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that as long as you want to grade the work (and you, much less your students, rarely have the time for &quot;non-graded work&quot;) you have to assess what each one did. A much worse problem is that in the later &quot;real life&quot; group work is a must, and you have to teach that somehow...&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T12:38:19.140" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4799" PostTypeId="2" ParentId="4689" CreationDate="2018-05-18T12:52:42.387" Score="1" Body="&lt;p&gt;Part of the &quot;teach OOP&quot; problem is that OOP (and modularity, and top-down design, and variable-naming discipline, and consistent code layout, and...) is practically useful for &lt;em&gt;large&lt;/em&gt; programs with a long life, and in the time allotted you write &lt;em&gt;tiny&lt;/em&gt; throwaway programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps a way around that is reading (good!), hopefully modifying/extending, programs written in OOP style. Open source is a godsend...&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T12:52:42.387" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4800" PostTypeId="2" ParentId="4670" CreationDate="2018-05-18T13:11:02.130" Score="2" Body="&lt;p&gt;In modern systems (e.g. Linux for a long time now) what the kernel schedules directly are threads. A process is just a bunch of threads sharing some extra stuff, like memory areas and open files. Way back a couple of experiments were run under Linux on userspace managed threads/hybrid systems/kernelspace managed threads (back when the way to use threads was the userspace pthreads library), and kernel threads won hands down. Solaris used to champion a hybrid model (mostly for herding thousands of Java threads in some applications), and silently migrated to kernel threads&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That it is called &quot;process scheduling&quot; is just a remnant from olden times, when there were no threads and everything was processes.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T13:11:02.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4801" PostTypeId="2" ParentId="4569" CreationDate="2018-05-18T14:17:14.893" Score="1" Body="&lt;p&gt;Students need (a) motivation, and (b) a &lt;em&gt;useful&lt;/em&gt; language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For (a), use a high-level language, preferably one in which graphics is easy to handle, and cross-platform (yes, a few will be running Linux, mostly a motley of distributions/versions; most will swear by Windows of several batches; then there are Apple-lovers...). If they can build something fun in a few hours, that is more than enough motivation. Build some simple game, have them participate in some of the one-weekend game building competitions once they are further along.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For (b), today Python wins hands down: there are libraries for anything imaginable, and then some. Much &quot;real work&quot; in e.g. astronomy is herding a bunch of data-munging scripts (with FORTRAN or C++ backends) in ever changing combinations, orchestrated by Python. Much of the &quot;user friendly system administration tools&quot; in my Fedora system are written in Python with nice GUIs, and hand the grunt work to the traditional commands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out some text like &lt;a href=&quot;http://greenteapress.com/wp/think-python&quot; rel=&quot;nofollow noreferrer&quot;&gt;Think Python&lt;/a&gt;, there you'll see how far you can go in an introduction course.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T14:17:14.893" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4802" PostTypeId="2" ParentId="4519" CreationDate="2018-05-18T14:35:57.953" Score="0" Body="&lt;p&gt;One effective way is to state beforehand exactly what will be graded, perhaps give an example of bare-bones &quot;enough&quot; solution. You might go so far as to announce that &quot;bells and whistles&quot; will be penalized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One example that still makes me cringe was a database homework asking for a simple query to a preexisting database under IBM VM/CMS. Doing the query was a few minutes, students spent literally days tweaking the UI in the bletcherous environment offered by the text-only terminals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are concentrating on some programming technique/data structure, use the idea used e.g by ACM-ICPC: Data are standard input, spartan format, no validation required; output is standard output, simple, rigid format. A nice plus is that the running on sample test data for validation is much simplified (no TA clicking madly and typing the same junk over and over into dozens of programs).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a &quot;Programming Languages&quot; course I used to teach we had a generic rubric for programs: so much for correct answers for the examples provided with the homework, so much for other test data. Then general criteria like reasonable split into functions, good use of language facilities (use a dictionary and not a list if you want to search for a datum), reasonable naming, enough (not excessive, informative) comments, ... This was published beforehand.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T14:35:57.953" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4803" PostTypeId="2" ParentId="4515" CreationDate="2018-05-18T14:45:05.113" Score="2" Body="&lt;p&gt;Using C# (or some other OOP or procedural language) as example for the inherently recursion-based Scheme is harmful. You need to (re)learn how to program to grok Scheme, different languages are just a distraction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Never forget the saying of &quot;FORTRAN with semicolons&quot; for much of the Pascal written in the beginning. Yes, contrasting different solutions in languages from varying paradigms is enlightening... &lt;em&gt;if you know the relevant languages/paradigms beforehand&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-05-18T14:45:05.113" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4804" PostTypeId="2" ParentId="4781" CreationDate="2018-05-18T16:15:45.927" Score="1" Body="&lt;p&gt;If making a computer do things following his own design isn't inherently fun, then programming won't be fun for him. I think a simple CLI type thing is the best way to do that. I'd avoid big frameworks like Unity like the plague because they hide all the interesting things from the programmer. Your program doesn't need to do anything useful to be interesting to write or to read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me, witnessing my program being run is like watching the gears turn in a well-made clock, it's passionating. That is part of my personality, and other people find processes like that boring. It's something that you can't instill in people (or rather you shouldn't unless you want to make them unhappy).&lt;/p&gt;&#xA;" OwnerUserId="5241" LastActivityDate="2018-05-18T16:15:45.927" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4807" PostTypeId="2" ParentId="4781" CreationDate="2018-05-19T08:15:48.960" Score="3" Body="&lt;p&gt;Computers and technology are nowadays much more complex to grasp. We also are more demanding on the programs quality, so the sensation we had in the past of an huge feat with small things and instant gratification is not as easy to achieve as in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of using a notebook computer, I would get a Raspberry-Pi and some sensors, for dealing with something more tangible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be somewhat gratifying building web pages with the temperature and humidity graphs, and evolving for more complex projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, they have in the university I used to work, a summer kid boot camp just for iOT, sensors and robots, which has been a tremendous success with kids (and parents).  I also am aware of a weekly club for Scratch, for kids plus a parent. I would try to find something similar in your city. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also agree with others, each has it's own passion. Mine was finding out how things work, debugging and hacking (reverse engineering). &lt;/p&gt;&#xA;" OwnerUserId="2296" LastEditorUserId="2296" LastEditDate="2018-05-19T14:50:53.253" LastActivityDate="2018-05-19T14:50:53.253" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4808" PostTypeId="2" ParentId="4772" CreationDate="2018-05-19T10:37:27.697" Score="3" Body="&lt;p&gt;I've had a go doing this. The activities I tried were:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Making skins &lt;/li&gt;&#xA;&lt;li&gt;Taking screenshots of yourself wearing the skin and&#xA;showing in a web page. &lt;/li&gt;&#xA;&lt;li&gt;Making custom blocks. &lt;/li&gt;&#xA;&lt;li&gt;Taking screenshots of a&#xA;building that uses the new block and showing as a web page. &lt;/li&gt;&#xA;&lt;li&gt;Using a bit of javascript to swap web page images between different skins&#xA;or houses. ok, it's not lua :)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;A few of the worksheets I made are here:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://codeclub.sfh6.org/resources/minetest/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://codeclub.sfh6.org/resources/minetest/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to make skins, there are two png files at that location. The larger of the two, player_Skinzones_640_320.png, has all the parts of the body labeled, which bit of the image is the head, arms etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume you are aware of the minetest forums?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://forum.minetest.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://forum.minetest.net/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5255" LastEditorUserId="5255" LastEditDate="2018-05-22T07:58:40.880" LastActivityDate="2018-05-22T07:58:40.880" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4809" PostTypeId="2" ParentId="4781" CreationDate="2018-05-19T13:14:48.620" Score="2" Body="&lt;p&gt;As someone who has been through this from my youth, I might be able to offer an insight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find there's two causes for programming not being fun: not be able to do a particular thing in a particular way, and a very 'manual' (low-level) programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When trying to initially build things, the reality didn't match expectations (my expectations were: 2D game that's super-cool awesome, the reality was a console text 'game' where you input a number and got a generic response back).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this was frustrating and made the amount of effort seem not worth it. I was trying to program in C++. In reality, I probably should have been using a higher level language (JavaScript, Python, even Java). C++ does feel like work in comparison, and without knowing what language he's programming in, it might be worth introducing a language that does more of the legwork, if not already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other solution I found was to readjust expectations. Rather than imagining 'super cool awesome game that rakes in loads of money', I aimed more for what the programming language could do, within the resources I had. Text-based Rock/Paper/Scissors with a learning AI, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These days I get a sense of enjoyment (maybe not 'fun' per se) from solving key issues and automation of particular tasks, which on a small scale seem trivial, but on a larger scale combined with other automation tasks are really awesome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;TL;DR:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Maybe change to a higher-level programming language that allows&lt;br&gt;&#xA;quick achievement of good looking results.&lt;/li&gt;&#xA;&lt;li&gt;Modify expectations or&#xA;set 'easier to achieve' goals that are still fun, such as text-based&#xA;games.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1772" LastActivityDate="2018-05-19T13:14:48.620" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4810" PostTypeId="2" ParentId="4781" CreationDate="2018-05-19T16:03:24.110" Score="4" Body="&lt;p&gt;Along with all these other answers I would say try not to force it on him. Let him move at his own pace. Let him decide when he wants to do it. Say to him &quot;hey do you want to make a game tomorrow?&quot; If he says no thats ok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show him cool stuff you've made. If he really is interested in it he'll ask questions and be intrigued by it. If he doesn't, maybe hes just saying he likes programming because he knows thats what you want to hear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to make it less frustrating. You can do the typing and ask him questions on what should be done next. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a easy language. In high school we learned how to program using VB6 even though it was already obsolete. We made mimesweeper, snake, paint, and a bunch of other programs. Every kid in the class was able to do it and they all had a lot of fun. The next year we learned Java. &lt;/p&gt;&#xA;" OwnerUserId="5256" LastActivityDate="2018-05-19T16:03:24.110" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4811" PostTypeId="2" ParentId="4781" CreationDate="2018-05-19T23:05:56.657" Score="2" Body="&lt;p&gt;It's easier to get into the flow state with tighter feedback loops. &lt;a href=&quot;http://www.squeakland.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Squeak Etoys&lt;/a&gt; is great for this. It starts out like a toybox, with interactive scriptable entities using a kind of tile-based visual programming language. You can introduce it as a kind of sandbox video game he could have fun with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But Etoys is built on a Squeak Smalltalk image. If you dig a little deeper, and you can also use the text-based Smalltalk language and use all the development tools integrated into the image. Smalltalk's grammar is easy to pick up even for children, and the visual inspector and debugger make it easy to crack open a program to really see what's going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let him play with it for a while and see if he comes up with anything interesting. Then show him how to do it better, not with attitude of &quot;you're doing it wrong&quot;, but more like &quot;look at what else we can make the computer do&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Etoys has some instructional materials for its scripting language and tools on its website already, including lesson plans, if that helps. Then, when you're ready, you can move on to Squeak Smalltalk, which has its own textbooks and other materials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Smalltalk is a full-fledged programming language in its own right, with commercial applications, but once he's got the hang of that, it wouldn't be too hard to introduce him to Python.&lt;/p&gt;&#xA;" OwnerUserId="5257" LastEditorUserId="5257" LastEditDate="2018-05-26T01:24:41.607" LastActivityDate="2018-05-26T01:24:41.607" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4812" PostTypeId="2" ParentId="4781" CreationDate="2018-05-20T12:08:01.170" Score="4" Body="&lt;p&gt;I have found myself programming for fun, it is infact my go to past time. I've had a few friends ask me for advice or assistance with learning to program and there are a few things I'd advise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off there's the friends that &lt;strong&gt;want&lt;/strong&gt; it to be fun, but it isn't for them. They usually see me programming and the excitement and joy I get out of running some code and automating a task (usually it takes me longer to automate the task than doing the task 1000 times over, but I do it for the fun). They come to programming and want to make something complex and unrealistic and it's both too hard to start with and going to take them forever (because they're a novice &lt;strong&gt;and&lt;/strong&gt; because it's a complicated problem). These people like the &lt;em&gt;idea&lt;/em&gt; of being a programmer, not the actual task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What about the friends that want to persist but find it a grind. The absolute best way to get around this is to do the breakdown for them of a complex program and let them do the small peices. This also works extremely well if you're doing something they're actually interested in. For example, your kid wants to be a game developer, so make a bot or a hack. Help him to understand that if used online these things would result on a ban or some punishment but offline the game can represent a fun eveniroment to program for. Here's a few examples:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Number 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say he's an FPS junkie - csgo, Arma, BF1, CoD etc. Ok kiddo let's make an &lt;em&gt;ESP hack&lt;/em&gt; we want to highlight enemies for us to see. Let's break this down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;enemies move (is the background static)&lt;/li&gt;&#xA;&lt;li&gt;enemies always wear [red/black/grey/etc.]&lt;/li&gt;&#xA;&lt;li&gt;headshots are worth more points&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Well ok then, let's turn this into some logic:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Take an image of the screen&lt;/li&gt;&#xA;&lt;li&gt;If the background is static check for moving pixels&lt;/li&gt;&#xA;&lt;li&gt;If the background changes look for certain colours&lt;/li&gt;&#xA;&lt;li&gt;If we find a possible enemy get the coordinate of it&lt;/li&gt;&#xA;&lt;li&gt;Draw a box on the screen&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Right kiddo you go away and try and work out how to do each bit of that task. (A few hours/days/weeks later) Great we have our ESP but it's picking up a lot of civilians/cars/dust particles - let's build on what we have and make it better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Number 2&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lets say he's into MOBAs (dota2, LoL, etc.). Ok kiddo were going to try and predict which pro team will win a game. We need to:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;get data for the teams performance&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;work out a good way to use this data to predict outcomes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;find a nice way to display predictions&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Logic time:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find an API or webserver with data we can access&lt;/li&gt;&#xA;&lt;li&gt;Download/update our offline data&lt;/li&gt;&#xA;&lt;li&gt;Apply one or more method of model optimisation (multivariate linear regression, neural networks, classification, take your pick)&lt;/li&gt;&#xA;&lt;li&gt;Produce plots of results of the models&lt;/li&gt;&#xA;&lt;li&gt;Give a final prediction with confidence&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Now I'd advise you to break #3 into more steps and if the kid isn't confident with maths then help him walk through it; if nothing else he may enjoy maths more as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use your knowledge of what the kid enjoys and what he struggles with to fine tune what you teach him. Don't worry too much about teaching him specifics and focus more on the general goal oriented side of programming: I'm writing this program so I get this benefit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, everything is more fun if you're either not supposed to do it or if you've been told it's too hard. Making hacks for games is good for this. Having someone's other than you (partner/family friend etc.) scoff at the idea that the kid can program something that sound complex but that you've already helped him understand might give him the drive to prove them wrong - handle it well, make it a good natured bet (if you can program that I'll help you with your chores for a week, if not you have to help me with mine!).&lt;/p&gt;&#xA;" OwnerUserId="5263" LastActivityDate="2018-05-20T12:08:01.170" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4813" PostTypeId="2" ParentId="4781" CreationDate="2018-05-21T03:48:17.777" Score="2" Body="&lt;p&gt;I can only offer my own experience (as a former child who made slow progress but is a current engineer who is happy with his career choice)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was put in front of a lot of programming books from a young age. I could copy stuff and make minor adjustments out of curiosity but that's as far as it went for years. Sometime around 19 it clicked, and I could do a little better. Then after school when I saw what the non-coding options were for making a living I got good at it fast. Then I experienced the flow state, but almost never before that. You have to see the big picture first, and have a job to do. Before that, you're wading in a mysterious swamp, no flow possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn the difficult skill of programming at a young age requires a lot of guidance, with you making choices about libraries and algorithms, standing over his shoulder explaining and debugging, and probably pitching in to set up the class structure or do the hard parts, yet at that age he's looking to develop independence. The two virtues are conflicting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be patient, you're laying good groundwork for future flow, some stuff is sticking even if it doesn't show, and you're setting him up to get ahead if he ever does develop interest (and he probably will).&lt;/p&gt;&#xA;" OwnerUserId="2927" LastActivityDate="2018-05-21T03:48:17.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4815" PostTypeId="2" ParentId="4781" CreationDate="2018-05-21T15:42:44.877" Score="4" Body="&lt;p&gt;There is an old adage: &quot;You can lead a horse to water, but you can't make it drink&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own experience with programming (life-long career) began with a fascination about computers and a curiosity about how they work. I found reward in the &quot;aha!&quot; moments of new understanding and in being able to make a computer do what I wanted it to do, even if it was something trivial or inconsequential. That came from inside me - nobody tried to encourage it in me or teach it to me. Everything I learned about how computers work (from electronic circuits and simple logic gates all the way up), and how to program came from my own desire to learn, understand, and master. My father encouraged me to seek an education and career path in computers because he saw me spending more time on my programming assignments (required course for the not-computer-related engineering degree I was pursuing at the time) than I was spending on anything else. Yes, I later took a number of computer-related courses that felt more like work, but it was always the motivation that came from within and came first that made the work &quot;worth it&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it's worth: after high school and before settling into a career path in computing, I spent a couple of summers in a well-paying but horrible summer job. This job involved dull, dirty, dangerous physical work. It taught me a valuable lesson in work ethic and what work can really be. Programming &quot;work&quot; is, by comparison, not work at all to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't teach a person to enjoy a thing. You can at best lay out a path of discovery and give that person the opportunity to find (or not find) enjoyment. &quot;Flow&quot; isn't something you can be taught - it just happens because of how our minds work; I play pool in an amateur league and find that to play my best, I have to get &quot;into the zone&quot;... same phenomenon, neither taught nor learned, just happens when you immerse yourself in an activity demanding of mental focus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, at 13, it may be a bit early to decide on a career path. Programming is a valuable skill, likely even more so in the world of work your son will enter, but he may choose to do something entirely different. His current interest may only be coming from superficial things - seeing a few of his peers doing it, hearing about how much money game developers make and wanting similar financial success for himself. While those are good motivators to work at it, it won't lead to enjoyment. If it feels like too much work for him, he's not going to want to do it and could lose interest. All you can do is give him the time and space to find his own path and support him on whatever that path turns out to be.&lt;/p&gt;&#xA;" OwnerUserId="5270" LastEditorUserId="5270" LastEditDate="2018-05-21T19:32:14.807" LastActivityDate="2018-05-21T19:32:14.807" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4816" PostTypeId="1" CreationDate="2018-05-21T16:47:16.023" Score="-1" ViewCount="80" Body="&lt;p&gt;One question that children are often asked is, &quot;&lt;em&gt;What do you want to be when you grow up&lt;/em&gt;?&quot; This really means, what employment they would like. This question needs an answer, definitely by the time one must look for work, so at the end of college, or high school, or when one stops high school and starts working, as some 16 year-olds do in the US.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But to have the answer at those points, one must have been working on it before then, to get the necessary experiences and schooling. &lt;strong&gt;So at what age should a kid be able to give a firm answer as to their chosen employment goal?&lt;/strong&gt; Of course we are all expected to have several 'careers' in our long lifetimes now, so the answer does not need to be set and unchangeable, but it has to be there in time to get the ball rolling. As the old joke goes, &quot;Until you make up your mind, you can't change it.&quot; I have heard of many people idling around in college with no path forward. This is a disaster. They need to be desirous of something long before that. Age thirteen? Ten? When?&lt;/p&gt;&#xA;" OwnerUserId="5272" LastActivityDate="2018-05-21T17:01:07.147" Title="At what age should someone know what they want to &quot;be&quot;?" Tags="|student-perceptions|secondary-education|" AnswerCount="1" CommentCount="5" ClosedDate="2018-05-21T17:10:08.837" ContentLicense="CC BY-SA 4.0" />
  <row Id="4817" PostTypeId="2" ParentId="4816" CreationDate="2018-05-21T17:01:07.147" Score="1" Body="&lt;p&gt;Actually, there is no such age for everyone, and it certainly isn't a disaster for many to be undecided. Many people just want to be educated so they study things, formally and informally with no clear &quot;career&quot; goal in mind. I changed my mind pretty often, but in a narrow range. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other people change careers many times throughout their lives. I think it is a mistake for people to push others to choose a path, especially if it would be difficult for them to change paths. Too many people go into daddy's business when they would be happier as poets or firemen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And early on, every boy wants (or did in my generation) to be a fireman. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let your life play out. Keep your options open. Learn many things, a few deeply but many others shallowly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As they say, you only live once. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-21T17:01:07.147" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4818" PostTypeId="2" ParentId="4781" CreationDate="2018-05-21T19:56:31.887" Score="3" Body="&lt;p&gt;I'd like to address one misconception that is being argued on both sides; which is whether &quot;the process&quot; or &quot;the result&quot; is what is fun.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The real answer is that it depends on the person and sometimes on the situation. It can be either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are at least several places in personality theory dealing directly with the topic of how different types of people most easily get into flow. Some [people] are most creative with the freedom to explore whatever comes to mind, while others can be most creative when they have a set of rules and expectations to achieve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm guessing your son is one who is inspired quickly and easily. One who wants to explore. He maps out how he would achieve his inspiration, and then when he understands how he'd go about accomplishing his task he is no longer interested. This is because he is driven by curiosity and has a good imagination. Once there is nothing new to discover and he can imagine the result in his head, why should he go through the trouble of actually creating it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(&lt;em&gt;The answer to this, I've learned, is one of three things: To get recognition and/or career success, to help people or give them good experiences, or to use it as an expression of oneself to provide meaning&lt;/em&gt;) It's extremely difficult for one of his age to be motivated by any of these three just yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As he gets older he will learn to be more disciplined (especially with help). Experiencing flexible routines will help him on that front. Otherwise, I think the current top-voted answer supplies some extremely supportive ways of furthering his skills in a fun way. &lt;a href=&quot;https://cseducators.stackexchange.com/a/4785/5274&quot;&gt;https://cseducators.stackexchange.com/a/4785/5274&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5274" LastActivityDate="2018-05-21T19:56:31.887" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4819" PostTypeId="2" ParentId="4781" CreationDate="2018-05-21T20:01:02.563" Score="0" Body="&lt;p&gt;Ok you may not like this answer, (because it could be too late). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyways: Give him a computer to play with when he's a kid. Maybe even better give his bigger brother/uncle/sister/whatever one and let them play with it together. Anything to catch a kids interest with should be exciting, like fun and games. That is how you get kids to like maths or computers or other seemingly very boring/dull subjects.&lt;/p&gt;&#xA;" OwnerUserId="1933" LastActivityDate="2018-05-21T20:01:02.563" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4820" PostTypeId="2" ParentId="4298" CreationDate="2018-05-22T05:47:22.013" Score="5" Body="&lt;p&gt;In the search for a &quot;core set of concepts that is &lt;em&gt;discrete mathematics&lt;/em&gt; as it applies to the study of Computer Science,&quot; I kept finding nebulous ideas, without concrete parameters. There seems to be a general consensus that there &lt;em&gt;is&lt;/em&gt; the need for a firm foundation in discrete mathematics when studying CS. There is also a broad agreement that &quot;graph theory, and other topics&quot; is part of that foundation. Unfortunately the &lt;em&gt;other topics&lt;/em&gt; portion of the requirements are seldom well specified, and seemingly never delineated with any specificity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I recognize that the question is in a high school (USA ages ~ 15-18) context. Be that as it may I've settled on a source from the university context for a solid, definitive, and delineated set of &quot;core discrete mathematics material&quot; to set as a touchstone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.williams.edu/&quot; rel=&quot;noreferrer&quot; title=&quot;Williams College home page&quot;&gt;Williams College&lt;/a&gt; requires that students who select &quot;Computer Science&quot; as their major demonstrate a proficiency in discrete mathematics. This requirement is usually met with a &quot;C&quot;, or better, grade in their MATH 200 course. In Spring 2017, the Computer Science department added an alternate method of satisfying the requirement: A &quot;Discrete Mathematics Proficiency Exam.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Williams_College&quot; rel=&quot;noreferrer&quot; title=&quot;Williams College entry on Wikipedia&quot;&gt;Williams&lt;/a&gt; is classified as &quot;&lt;a href=&quot;https://www.usnews.com/best-colleges/williams-college-2229&quot; rel=&quot;noreferrer&quot; title=&quot;U.S. News &amp;amp; World Report article on Williams College&quot;&gt;most selective&lt;/a&gt;&quot; by U.S. News &amp;amp; World Report, admitting less than 20% of the applicants each year. As such it is expected that they have set standards, in all areas, rather high. However, I prefer to avoid the dangers alluded to by &lt;a href=&quot;https://www.exkalibur.com/mondays-quote-week-sept-5/mon-quote-aim-too-low/&quot; rel=&quot;noreferrer&quot; title=&quot;Attributed to Michelangelo&quot;&gt;Michelangelo&lt;/a&gt; (&lt;a href=&quot;https://en.wikiquote.org/wiki/Michelangelo#Disputed&quot; rel=&quot;noreferrer&quot; title=&quot;Maybe it was not said by Michelangelo, maybe not&quot;&gt;disputed&lt;/a&gt;): &lt;em&gt;The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it.&lt;/em&gt; If I were to choose a target, aiming &quot;high&quot; has the advantage that I might reach the target. If I fail to reach the target, I will know how high I can go. If the aim is low, however, and I reach &lt;em&gt;that&lt;/em&gt; target, I still will not know if I &lt;em&gt;could have&lt;/em&gt; reached higher. Therefore, using the &lt;a href=&quot;https://csci.williams.edu/discrete-mathematics-preparation/&quot; rel=&quot;noreferrer&quot; title=&quot;Preparation for the Discrete Mathematics Proficiency Exam at Williams College&quot;&gt;materials&lt;/a&gt; from Williams College as a guide for a high school course seems worthwhile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All that being said, here is the &quot;short list&quot; of their subject areas, (taken from their &lt;a href=&quot;https://csci.williams.edu/discrete-mathematics-preparation/&quot; rel=&quot;noreferrer&quot; title=&quot;Preparation for the Discrete Mathematics Proficiency Exam at Williams College&quot;&gt;Preparing for the exam&lt;/a&gt; web page.)&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sets, Relations, and Functions&lt;/li&gt;&#xA;&lt;li&gt;Basic Logic&lt;/li&gt;&#xA;&lt;li&gt;Proof Techniques&lt;/li&gt;&#xA;&lt;li&gt;Basics of Counting&lt;/li&gt;&#xA;&lt;li&gt;Discrete Probability&lt;/li&gt;&#xA;&lt;li&gt;Measuring Algorithm Complexity&lt;/li&gt;&#xA;&lt;li&gt;Graphs and Trees&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There is, most assuredly, a lot of ground to cover there, and it does not look any &quot;easier&quot; with a full breakdown. The referenced web page (&lt;a href=&quot;https://csci.williams.edu/discrete-mathematics-preparation/&quot; rel=&quot;noreferrer&quot; title=&quot;Preparation for the Discrete Mathematics Proficiency Exam at Williams College&quot;&gt;ibid.&lt;/a&gt;) lists a breakdown of the topics followed by the  learning outcomes. I think the learning outcomes likely to be more significant in answering the OP's instant question, and have reproduced them with their subjects below.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;TL;DNR&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The seven areas above have following &lt;em&gt;learning outcomes&lt;/em&gt; listed in the &lt;a href=&quot;https://csci.williams.edu/discrete-mathematics-preparation/&quot; rel=&quot;noreferrer&quot; title=&quot;Preparation for the Discrete Mathematics Proficiency Exam at Williams College&quot;&gt;cited materials&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;h3&gt;Sets, Relations, and Functions&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Define, as well as explain with examples, the basic terminology of functions, relations, and sets.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Perform the operations associated with sets, functions, and relations.&lt;/li&gt;&#xA;  &lt;li&gt;Relate practical examples to the appropriate set, function, or relation model, and interpret the associated operations and terminology in context.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Basic Logic&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Convert logical statements from informal language to propositional (and quantified) logic expressions.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Apply formal methods of symbolic propositional logic, such as calculating validity of formulae and computing normal forms.&lt;/li&gt;&#xA;  &lt;li&gt;Use the rules of inference to construct proofs in propositional logic.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Proof Techniques&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Identify the proof technique used in a given proof.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Outline the basic structure of each proof technique described in this unit.&lt;/li&gt;&#xA;  &lt;li&gt;Apply each of the proof techniques correctly in the construction of a sound argument.&lt;/li&gt;&#xA;  &lt;li&gt;Determine which type of proof is best for a given problem.&lt;/li&gt;&#xA;  &lt;li&gt;Explain the parallel between ideas of mathematical induction to recursion and recursively defined sequences.&lt;/li&gt;&#xA;  &lt;li&gt;Explain the relationship between weak and strong induction and give examples of the appropriate use of each.&lt;/li&gt;&#xA;  &lt;li&gt;State the well-ordering principle and its relationship to mathematical induction.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Basics of Counting&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Apply counting arguments, including sum and product rules, inclusion-exclusion principle and arithmetic/geometric progressions.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Apply the pigeonhole principle in the context of a formal proof.&lt;/li&gt;&#xA;  &lt;li&gt;Compute permutations and combinations of a set, and interpret the meaning in the context of the particular application.&lt;/li&gt;&#xA;  &lt;li&gt;Map real-world applications to appropriate counting formalisms, such as determining the number of ways to arrange people around a table, subject to constraints on the seating arrangement, or the number of ways to determine certain hands in cards (e.g., a full house).&lt;/li&gt;&#xA;  &lt;li&gt;Solve a variety of basic recurrence relations.&lt;/li&gt;&#xA;  &lt;li&gt;Analyze a problem to determine underlying recurrence relations.&lt;/li&gt;&#xA;  &lt;li&gt;Perform computations involving modular arithmetic.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Discrete Probability&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Calculate probabilities of events for elementary problems such as games of chance.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Differentiate between dependent and independent events.&lt;/li&gt;&#xA;  &lt;li&gt;Make a probabilistic inference in a real-world problem using Bayes’ theorem to determine the probability of a hypothesis given evidence.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Measuring Algorithm Complexity&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Be able to meaningfully compare the asymptotic growths of pairs of functions.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;h3&gt;Graphs and Trees&lt;/h3&gt;&#xA;  &#xA;  &lt;p&gt;&lt;em&gt;Learning Outcomes:&lt;/em&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Illustrate by example the basic terminology of graph theory, and some of the properties and special cases of each type of graph/tree.&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Be able to prove elementary results about graphs and trees, such as:&lt;/li&gt;&#xA;  &lt;li&gt;In any graph, the sum of the degrees of the vertices equals twice the number of edges.&lt;/li&gt;&#xA;  &lt;li&gt;In any tree, the number of edges is one less than the number of vertices.&lt;/li&gt;&#xA;  &lt;li&gt;Model a variety of real-world problems in computer science using appropriate forms of graphs and trees, such as representing a network topology or the organization of a hierarchical file system.&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;Source: &lt;a href=&quot;https://csci.williams.edu/discrete-mathematics-preparation/&quot; rel=&quot;noreferrer&quot; title=&quot;Preparation for the Discrete Mathematics Proficiency Exam at Williams College&quot;&gt;Discrete Mathematics Preparation&lt;/a&gt; from Williams College &lt;a href=&quot;https://csci.williams.edu/&quot; rel=&quot;noreferrer&quot;&gt;Computer Science Department&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-05-22T05:47:22.013" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4821" PostTypeId="1" CreationDate="2018-05-22T13:36:39.153" Score="5" ViewCount="216" Body="&lt;p&gt;Recent questions deal with the problem of too many applicants to CS programs, both in High School and University. Yes, this is a problem when only a smaller number can be accommodated for reasons of resource availability. One of the easier issues to deal with is whether the student's past performance indicates potential success, though even this is hard. If the student hasn't studied Computer Science in the past, what courses are predictors? But &lt;em&gt;this&lt;/em&gt; question is focused elsewhere. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students, in periods of high demand, choose a field simply because of its popularity at the time. While they may have the aptitude and background for it, their interest may be shallow or even misinformed. It would be good to help such students make better choices about their futures by informing them early of the nature of the field and how their future would likely play out if they stay in the field. The goal is to reduce the number of drop-outs: students who start a program, but leave it before completion. This potentially wastes both the student's time and resources as well as wasting institutional resources. It also risks denying other students an entrance slot that they might have had. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, such students may not know all of the things that CS professionals do on a daily basis. What are the interesting things? What are the boring things? What are the risks? What are the rewards? What frustrations? What will they ultimately need to do to become successful, in either the commercial or academic worlds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What resources can be brought to bear to assure that, possibly naive, students get a good look at the profession so as to better decide whether they want to enter?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google provides a lot of information for &quot;What is Computer Science?&quot; This includes the summaries given by a lot of colleges. However, most of it stresses only the positive things and so gives a somewhat incomplete picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the early 1960's as a teenager, I visited a local computer center. They had what was likely an IBM 650 with &lt;a href=&quot;https://en.wikipedia.org/wiki/Drum_memory&quot; rel=&quot;nofollow noreferrer&quot;&gt;drum memory&lt;/a&gt;. I got to see what folks did back then and recall that I wasn't very impressed. I studied math. But CS wasn't an option then. But something more was needed in my case to generate interest.  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For the record, I'm interested in drawing an accurate picture of work in the field, not horror stories or overly optimistic projections. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-22T17:09:00.683" LastActivityDate="2020-08-31T22:06:58.743" Title="How can we best inform potential students of the nature of CS?" Tags="|student-motivation|admission-requirements|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4822" PostTypeId="2" ParentId="4821" CreationDate="2018-05-22T14:09:37.717" Score="3" Body="&lt;p&gt;If the main issue is that the not-so-great side of programming (to pick one area as an example) is not disclosed, then tell people point-blank, in an admission conversation or while describing programming to groups:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Programming is one of the most frustrating and difficult things that&#xA;  humans have ever devised to do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I say that to all my students right out, usually the first day. I also tell them about the big egg-shaped rock I used to wave threateningly at the (glass CRT) screen when I got particularly frustrated. And I tell them about the time I had to go back to the bookstore to buy a different book about the intricacies of writing DOS interrupt routines for networking with IPX over Novell: the first book had a missing line in a code example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It certainly is true that one can succeed with poor background and preparation. I hated math classes, and they probably would have helped me become better faster at programming (my first chosen career that I attended college to get to). There is no substitute for being really interested in something, interested enough to defy your parents and change your major in college, interested enough to press on through many difficulties, come what may. &quot;Being carried along is not enough.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Loving it even when you don't really know what it is will work, I do not know what else will. As it says about qualifications in the book &lt;em&gt;At the Feet of the Master&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Love, if it is strong enough in a man, will force him to acquire all&#xA;  of the other qualifications, and all the rest without it would never be&#xA;  sufficient.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We are supposed to do what we love. Freud said that the keys to a meaningful life are &lt;em&gt;Work&lt;/em&gt; and &lt;em&gt;Love&lt;/em&gt;. Really, they are one.&lt;/p&gt;&#xA;" OwnerUserId="5288" LastEditorUserId="150" LastEditDate="2018-05-22T14:26:45.530" LastActivityDate="2018-05-22T14:26:45.530" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4827" PostTypeId="2" ParentId="4781" CreationDate="2018-05-23T05:06:56.837" Score="1" Body="&lt;p&gt;I'll include my point of view since I haven't seen an article I response that I can relate with yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the gist of it, sounds like you program for mental stimulation and your son enjoys it because you enjoy it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find something that your child enjoys doing and figure out a programming solution that you can implement to understand that hobby or task or to even make part of it more efficient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IE, making a mobile or web app to keep baseball score and to generate stats. Just manipulating data and strings is boring and a waste of a childhood. &lt;/p&gt;&#xA;" OwnerUserId="5295" LastEditorUserId="58" LastEditDate="2018-05-25T00:30:31.950" LastActivityDate="2018-05-25T00:30:31.950" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4828" PostTypeId="2" ParentId="4821" CreationDate="2018-05-23T13:17:39.163" Score="3" Body="&lt;p&gt;Every career has &quot;gotchas&quot;.  There is something about every job that is undesirable.  That's why it is called a &quot;job&quot;.  But students can make sure they are matched as well as possible - minimize the &quot;gotchas&quot;, so to speak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I entered CS because I loved to write code.  I stumbled into the field as a junior in college and immediately changed my educational course.  I am thankful for that &quot;accidental&quot; encounter, but it wasn't an accident, I don't believe, that I loved computing as soon as I was exposed to it.  My &quot;desire&quot; had been predicted.  I remember taking a career assessment of some sort as a sophomore in high school.  I remember the career assessment saying I was a good match for &quot;computer science&quot;.  I remember thinking &quot;what the heck is that?&quot; (this was prior to the PC revolution), and I remember immediately dismissing the results of my assessment.  But the assessment was correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I say all that to say this:  students should be encouraged to use career and interest assessments in high school, maybe even repeatedly (once a year).  A quick Google search reveals many free assessments, and my state's college foundation provides 7 of them for free in &lt;a href=&quot;https://www1.cfnc.org/Plan/For_A_Career/Learn_About_Yourself/Learn_About_Yourself.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;one place&lt;/a&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up until recently, the students at my high school had been &lt;em&gt;required&lt;/em&gt; to do several of these assessments as sophomores.  Unfortunately, with a change in management, that practice ceased.  But I still have my students do them as part of my class.  We all should, I think.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using assessments such as this at least helps students better understand themselves, and may prevent them from making a very bad career choice.  Of course, sometimes the assessments will be downright wrong (I recently had a student, one of my very best programmers, who loves to write code, is good at it, and knows she wants to go into CS, have an assessment tell her she should be an artist; however, I don't believe it was entirely off track because her code is very creative and is an artistic outlet for her).  But sometimes career and self-assessments will help a student think outside the box about what they want to &quot;be&quot;.  And that is a good thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing my school does is bring in professionals to share about their jobs.  They speak briefly about their backgrounds, what they do, what they like about their jobs, and what they dislike about their jobs.  They usually speak during lunch in a classroom. The kids eat their lunches while they speak.  It is very informal and always well attended.  The feedback from the students is always very positive.  Our local CDC (career development coordinator) organizes these &quot;Lunch and Learn&quot; sessions, as we call them.  We have 5-6 a year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are tangible things you can &quot;do&quot; to help students get ideas about careers.  Some students may still fall headlong into something that is not a good match for them, because of tunnel vision, or peer pressure, or parental wishes.  But some of them will identify or reinforce what they love to do, and they will be willing to make the trade-off:  you pay me to do what I love X% of the time, and I will put up with the 100-X% of the time I have to do stuff I don't necessarily like.&lt;/p&gt;&#xA;" OwnerUserId="4338" LastActivityDate="2018-05-23T13:17:39.163" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4829" PostTypeId="2" ParentId="4821" CreationDate="2018-05-24T01:14:56.490" Score="0" Body="&lt;p&gt;&lt;em&gt;This is not a complete answer, and it misses the &quot;drawing an accurate picture of work in the field&quot; goal, but I think it shows an approach worth mentioning.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I'm not sure you can show the picture accurately without a hands-on experience with coding.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The goal is to reduce the number of drop-outs: students who start a program, but leave it before completion.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That may not be the best metric. Even if it's actually possible &lt;a href=&quot;https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/&quot; rel=&quot;nofollow noreferrer&quot;&gt;to tell apart populations of people with basic programming abilities and those lacking them&lt;/a&gt;, it's not enough of the solution. Some people may be quite capable, but still dislike the process. So there will be people trying to study CS that will eventually want to leave.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Maybe it's better to just make these people leave quickly&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way that my university was approching this was to put fast paced programming course with focus on algorithms in the first semester. The course, apart from teaching obvious skills, had an explicit purpose of failing or discouraging all the people without the skill or interest necessary to finish the studies¹. And then in the second semester, it was followed by writing a sizable GUI application as an individual project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I don't have any numbers, I believe it worked kind of well. It seems that whoever survived the first year and was willing to stay, was well capable to finish the undergrad course and find work in IT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However, there are some caveats&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main issue with the presented approach is that it's strongly negatively biased. It discourages all the people that should be discouraged, but perhaps discourages also some happened to be just a little bit to slow. And while a university sucking up in all the best country talents may afford being picky, I'm sure it doesn't work everywhere, at least not at this scale. It also must be more tricky in a private school. My university was public, and people generally paid no tuition.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;¹ Actually, the course, called &quot;introduction to programming&quot;, had 2 variants: imperative (mainly for beginners) and functional (for people with some experience). The first one was the sieve, for the second one it was mostly a non-issue.&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2018-05-24T01:14:56.490" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4830" PostTypeId="2" ParentId="137" CreationDate="2018-05-24T13:49:51.793" Score="0" Body="&lt;p&gt;As a step toward learning binary or hexadecimal. Show that we use many number bases everyday: base 24 and 60 in a clock; base 7 and base 30ish in a calender; base 16 and 14 in weights (in US); base 12 and 3 in distance (US); etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then introduce octal. Octal has an advantage that it is not too different to Denary (Decimal), and that it dose not introduce new symbols (like hexadecimal).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After octal, head toward binary, maybe brefly explore the idea of other bases, and ask how low can we go? Binary is the limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then  binary to octal, but look at how this does not fit will in to 8 bit bytes. What can we do about this. Base 4 or base 16. Base 4 does not help us much, but is used by DNA. Base 16 helps us reduce number of digits, but we need 6 more symbols (a-f).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-05-24T13:49:51.793" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4831" PostTypeId="2" ParentId="137" CreationDate="2018-05-24T15:04:15.530" Score="1" Body="&lt;p&gt;One lesson that hasn't been mentioned yet is that the basic (manual) algorithms that students use for addition, subtraction, etc. are independent of base. In Octal, you just &quot;carry&quot; when you get to &quot;eight&quot; rather than the &quot;ten&quot; they use with decimal numbers. This is a unifying concept that is useful to know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not that it is especially relevant, but it is said that if you have horse that can write and ask it to write out &quot;ten&quot; it will write &quot;22&quot;. Similarly, if you ask it to stamp its foot 10 times, you hear &quot;stamp, stamp, stamp, stamp&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the above paragraph is intended as a joke, it provides a certain insight into number bases that might actually be helpful to students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also find it interesting that different European languages have names for the smaller numbers up to some limit, but the limit differs by language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;German, like English, has number names for 1 - 12, with 13 being a compound(-ish) name thir-teen (three and ten), or dreizehn. French, on the other hand has names for 1 - 16, with dix-sept (ten and seven) being 17. But the Latin-derived languages (Romance Languages) aren't consistent in this. Italian, for example, only has individual names for 1-10, with eleven being undici (one and ten) and Spanish has names for 1-15 with 16 being dieciséis (ten and six). German uses &lt;em&gt;null&lt;/em&gt; for 0, and the Romance languages seem to use some form of &lt;em&gt;zero&lt;/em&gt;, perhaps accented, zéro in French. I haven't done a comprehensive search, however. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may be that the names of these numbers derive from commercial considerations, early marketplaces/marketdays, for example, and so depend more on local culture. This is a bit distinct from their use in mathematics, which tends to be more uniform. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note that English is a compound language with both Germanic and French roots and we take 1-12 from German, but 0 from French. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-26T15:20:10.853" LastActivityDate="2018-05-26T15:20:10.853" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4832" PostTypeId="1" CreationDate="2018-05-24T15:37:13.263" Score="4" ViewCount="212" Body="&lt;p&gt;I'm going to be teaching a lesson about asymmetric cryptography to US high school students who have no background in Computer Science, specifically the way that public key cryptography is used while browsing the web. The typical example that you'd see when reading a book about public key crypto is a padlock. In this classic example, one person has a lock and gives out keys to the lock. Then, anyone with a key can unlock/verify it, but only the person who has the locks can lock/sign document.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't work for a hands-on example, because someone can use the key to close the lock again, and lock/sign different information. Is there some similar tool I can use for a hands-on, physical (not on a computer) example of public key/asymmetric encryption?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="1219" LastEditDate="2018-05-24T17:59:29.910" LastActivityDate="2018-05-25T15:50:02.733" Title="What physical examples can I use for public key/asymmetric encryption?" Tags="|cryptography|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4833" PostTypeId="2" ParentId="4832" CreationDate="2018-05-24T16:36:14.210" Score="2" Body="&lt;p&gt;Since cryptography is a bit elaborate, this will be too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Basic encryption is like the following: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take the &quot;information&quot; you want to transmit and put it into a locked room. A guard sits at the room with an actual key. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a piece of paper and rip it in half, the more jagged the rip the better. Give half to the guard and the other half to the person you want to &quot;communicate&quot; with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To access the information, the person presents his/her half of the paper and the guard matches it with the guard's own half. If they match up the guard will unlock the door and give access to the &quot;information&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the protocol the guard might re-lock the door or destroy the &quot;information&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Locking the &quot;information&quot; in the room is encryption. The receiver and sender &quot;keys&quot; are the two halves of the piece of paper. Presenting a torn piece of paper to the guard is the attempt to decrypt. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that neither half of the &quot;key&quot; is shared with anyone but the sender and receiver of the message, so duplication isn't an issue. This is fine for a one time message or even repeated messages between the same to entities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this isn't sufficient for the public-private asymmetry that you seek. In that scheme you want to publish one half of the &quot;key&quot;. So modify the scheme as follows. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someone wants to communicate with you, you control the &quot;keys&quot; and the room. As before, you rip a piece of paper and keep one part, though it shouldn't be a standardized size of paper. The piece torn off, which will be made public, shouldn't  be enough to reveal the overall shape of the paper, perhaps a hole torn out of it or a corner torn off. One piece (the public key) is duplicated and published. Anyone who gets a copy of the public key can communicate with the you, key owner. You keep the other &quot;private piece&quot; without revealing the true overall shape of the original paper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyone with a copy of the (other person's) public key can put something in the key owner's room, guarded by the key owner's guard. Only the key owner can remove things from the room as controlled by the guard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To communicate with you, the key owner, the person presents their information and a copy of the public key (piece of paper) that you published, to the guard who locks up the information and keeps the key (public key half) that you presented. The room is re-locked. When you, the key owner, wants access to the information you present the private key to the guard who will then unlock the room for you after matching the two pieces of paper and verifying that the overall shape is correct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only the key owner can remove things from the room, since the overall shape of the &quot;key&quot; is unknown and &quot;can't&quot; (we hope) be duplicated. Anyone can put things in the room but it will be readable only if the public key held by the guard matches the overall key. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/P97Sz.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/P97Sz.jpg&quot; alt=&quot;Sample Public Private Key Pair&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A related key pair can be created by taking a private drawing (that you produce yourself) and using a part of it as the public key. This might be easier to reproduce than the torn paper. However, it must not be easy to deduce the entire drawing from the fragment. Infeasible, if not impossible. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="58" LastEditDate="2018-05-25T15:50:02.733" LastActivityDate="2018-05-25T15:50:02.733" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4834" PostTypeId="2" ParentId="4832" CreationDate="2018-05-25T01:26:20.257" Score="1" Body="&lt;p&gt;I used to know a guy who used to explain public-key encryption while showing off a small box that was fitted with a mechanical door lock.  The lock had a single keyway, and it came with two different brass keys; One key would only turn to the left (or was it, to the right?) It could only be used to lock the box, not to open it.  The other key would only turn to the right (or was it the left?). That key could be used to open the box, but not to lock it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He said, that the lock was sold under the name &quot;shopkeeper.&quot;  The idea was, the proprietor of a small business could install it on the front door, keep one key to him/herself for opening the shop in the morning, and give the other to an employee who was responsible for locking up at night.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, he also said that he did not know where to get another one because the manufacturer had gone out of business.&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2018-05-25T01:26:20.257" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4835" PostTypeId="2" ParentId="4832" CreationDate="2018-05-25T05:06:58.523" Score="1" Body="&lt;p&gt;High school students seem to have one thing in common in any country with even moderate technology: cell phones. So, use that to explain the concept in a manner that fits with what they know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The how and why of &lt;em&gt;cryptography&lt;/em&gt; is buried in the math that's outside the bounds of what they are likely to know. If, however, the math is accepted as valid, and the computer does it all anyway, the rest is really very simple. The part of &quot;asymmetric cryptography&quot; that you seem to want to explain is the &lt;em&gt;asymmetric&lt;/em&gt; part, not the cryptography part.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Asymmetric cryptography, as just said, has the cryptography part, which is the cell phone itself. Exactly how it works (on the inside) is not something we think about, or need to understand. The same applies to the cryptography for most of us - the computer does the math, checks signatures, encrypts and decrypts the messages, etc. The &lt;em&gt;asymmetric&lt;/em&gt; nature is from there being two keys that work in different ways. The public key, which can be made &lt;em&gt;public&lt;/em&gt; and the private key which must be kept &lt;em&gt;private&lt;/em&gt;. In connection with the cell phones the public key is the phone number and the private key is the voice mail PIN. Anyone that has the public key (phone number) can leave a voice mail. Once they save it, not even the sender can hear it, or cancel it. To hear the message, from any other phone they have to have the PIN. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they have their own phone set up so that they can get voice mail from their own phone without entering the PIN it's the same as having their computer setup so that there is no passphrase on the private key. Someone finds their phone and they can listen to all the voice mails. Someone gets access to their computer and they can read all the &quot;private&quot; messages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If and when the &quot;signature&quot; usage comes into discussion, then the phone comes back into use. When one person calls another on the phone, the receiving phone will show the phone number (public key) of the person calling. If the person receiving the call already has that public key (number) saved in their contacts, then the phone will &quot;verify&quot; the number and show the caller's name instead of their phone number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, when the discussion gets technical enough, the parallels between PK and cell phones will break. By then, hopefully, the asymmetric nature of it all has been grasped, and the parallels will no longer matter.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;K.I.S.S.&lt;/h2&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-05-25T05:06:58.523" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4836" PostTypeId="1" AcceptedAnswerId="4837" CreationDate="2018-05-25T10:01:17.250" Score="4" ViewCount="106" Body="&lt;p&gt;I'm currently a trainer in a kind of &quot;expert&quot; domain: a web-programming backend framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, what I truly like is to help people regardless of their level, mostly online or at conferences. The sad thing is that I have no time for this, because my employer makes a business of this, our clients pay us to train them and get more skills in this open-source tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering whether there are companies in the world that just recruit people that will make learning &amp;amp; teaching a full-time activity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's take an imaginary example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This company would have any kind of activity in the IT world, whatever business, and a few of its employees would spend time going to conferences to learn, or even give talks at conferences or in schools, and the rest of the time on Github, StackOverflow, public Slack, Gitter or Discord channels associated with this technology or in schools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this even something that does exist, or is this pure utopia?&lt;/p&gt;&#xA;" OwnerUserId="5308" LastEditorUserId="1293" LastEditDate="2018-05-25T12:57:14.620" LastActivityDate="2018-05-25T13:35:35.983" Title="Are there companies that allow to be free when learning and teaching?" Tags="|self-learning|careers|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4837" PostTypeId="2" ParentId="4836" CreationDate="2018-05-25T10:36:53.693" Score="3" Body="&lt;p&gt;What you describe is pretty close to a university professorship. We are paid to learn and teach. We go to conferences and present our work there, as well as work with colleagues. We don't normally have strict no-compete clauses, though teaching for two different universities isn't normally allowed. Courses we develop can be used by others in many cases, online or otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You would need to pick your field, however, since technology in itself is a pretty narrow subject. Study for a doctorate is normally quite theoretical in most fields, but there are programs, likely in engineering, that focus more on technology. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Companies in industry have different rules. Normally they want to create a product and are focused on that. There are education-focused companies of course. However, most such companies have strict no-compete rules, some of them attempting to bind you for life. This is especially true if you learn proprietary material as part of your job. Also, the &quot;normal&quot; work day has expanded to the point where you likely just want to have a life in the time that you aren't &quot;on the job&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;University professors, too, are &lt;em&gt;always&lt;/em&gt; at work, but the work they are always at is normally thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Locally, you might want to visit Arts et Métiers ParisTech, and talk to one or more of the professors there. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-25T13:35:35.983" LastActivityDate="2018-05-25T13:35:35.983" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4838" PostTypeId="2" ParentId="3" CreationDate="2018-05-27T12:50:40.303" Score="1" Body="&lt;p&gt;I have a very different perspective that the other suggestions made here. Others seem to say that a group assignment shouldn't really be about cooperation and working together, but about dividing it up - externally. I think that the concern is about easing the grading process, but I would rather be a teacher than a grader. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the real world that students will later face, both in education and in the workplace, they will be asked to actually cooperate in the work, not just divide it up. When divided up and someone fails to fulfill his or her part, the project as a whole may fail even though most &quot;did their part&quot;. This is unacceptable and will leave most of the &quot;group's&quot; members frustrated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also easy to demand that everyone is individually responsible for everything, which sounds good, but is unrealistic. Often in such divide work situation, the other students don't realize, or have any reason to suspect, that they have additional, major, last minute tasks to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first thing you need to remember is that students need to be taught the things you want them to learn when they don't already do it naturally. You need to use some class/lab time to actually demonstrate group work and work sharing. You also need to monitor it either directly or via some sort of feedback mechanism with counseling. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next thing you need to realize is that in a group, not everyone needs to participate in the same &lt;em&gt;way&lt;/em&gt; - coding, for example. Organization is important. Research may be important. Easing interpersonal conflicts may be extremely important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next it is necessary to know that not everyone participates the same amount in each small time period, but may do so over time. One of the big ideas in group work is &lt;em&gt;pay it forward&lt;/em&gt;. Make a lot of contributions early on so that if you cannot do so later you have still done your share and others won't disparage your contributions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course, not everyone participates equally over time, either, and it is difficult to make it so. Instead you can use some form of &quot;safe&quot; peer evaluation of the members of the group so that you get insight into who the main contributors are. But don't be naive in this either. If all of the questions on your peer evaluation form are about, say, coding, then you are devaluing other sorts of contributions. I prefer to ask students to name one (or a few) key contributors to the group and to say why they were chosen. I also ask each student to specify their own personal contribution. Someone who does &lt;strong&gt;all&lt;/strong&gt; the work him/herself isn't a contributor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Group work should be done by a group. Don't neglect the social aspect of it. Work within your class framework to bring people together so that they actually have positive feelings for one another. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a classroom situation learning is the main goal, not the completed project. The project itself can fail if the learning is good. This is different from the real world, of course, but the classroom should be a safer place to make mistakes, provided that the important lessons are still learned. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also, especially for a programming course, that even if some student didn't do much of the coding, it is still possible to assure that each student understand the whole work, not just their part. This again, isn't &quot;real world,&quot; but is necessary to the educational process. This assurance can be gained in interviews, presentations, or quizzes, for example. This is a variation on the &quot;everyone is responsible&quot; rule, in fact. Everyone is responsible for knowing. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Finally, let me note something from the real world. Many Agile Software Development groups have a rule that no code can be committed to the code base if it was written by an individual, rather than a pair. Some programming is done by individuals, but only for experimental purposes to test out an idea. If the idea proves fruitful, the experimenter works with a partner to create the committable code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for this important policy is that any team doing real work wants a large enough &lt;a href=&quot;https://en.wikipedia.org/wiki/Bus_factor&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bus Factor&lt;/a&gt; so that if one or a few key people leave they don't take all of the knowledge of the project with them. This actually applies also to student team projects as some students do, in fact, leave a course in the middle of a project. The others must be able to carry on. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-28T23:47:04.853" LastActivityDate="2018-05-28T23:47:04.853" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4839" PostTypeId="2" ParentId="7" CreationDate="2018-05-27T13:19:19.627" Score="0" Body="&lt;p&gt;It is possible to teach algorithms in particular, and a lot about programming in general using a pseudocode. However, the pseudocode needs a firm definition or else it can lead to sloppy thinking. If a student is permitted to make &quot;statements&quot; in the pseudocode that imply, for instance that P=NP, then the statement isn't worth much, nor is the &quot;algorithm&quot; so expressed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that &lt;a href=&quot;https://en.wikipedia.org/wiki/Edsger_W._Dijkstra&quot; rel=&quot;nofollow noreferrer&quot;&gt;Edsger Dijkstra&lt;/a&gt; wrote most of his papers in pseudocode, but it was carefully defined. &lt;a href=&quot;https://en.wikipedia.org/wiki/David_Gries&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Gries&lt;/a&gt; wrote his famous book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0387964800&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Science of Programming&lt;/a&gt; using this same pseudocode. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, each statement in the language (even the empty statement &lt;em&gt;skip&lt;/em&gt;) was carefully defined using pre and post-conditions so that the effect of the statement and resulting programs were precisely defined. And even the pre and post-conditions are precisely defined. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This language (pseudo-laguage) can be fairly easily translated into other imperative languages, but it is harder to take advantage of the features of other paradigms such as functional or object-oriented. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, yes, it can be done. It has been done. It has been done by masters. But it isn't a lot easier than using a &quot;real&quot; language. It has quirks, like any language. Some programs are harder than others, of course. It is even possible to write a compiler for Dijkstra's language (I've done so, actually), making execution possible. However, the reason for the language wasn't execution, but precise clarity of expression of algorithms with precise semantics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible problem with learning algorithms this way, however, is the the resulting pseudo-programs tend to be rather monolithic. Complex programs have long statements with lots of structure. The method, if not carefully used, seems to de-emphasize building complex things out of small interacting parts. This isn't inherent in using pseudo-code, but the instructor needs to be careful about the use so that complexity doesn't overwhelm understanding. But the same is true in real languages. Not everything needs to be done in &lt;em&gt;main&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-27T13:19:19.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4840" PostTypeId="2" ParentId="212" CreationDate="2018-05-27T14:10:45.777" Score="1" Body="&lt;p&gt;My clear preference is to start in a high level language and introduce low  level concepts (1) as needed, and (2) later in the curriculum. This is in spite of the fact that over my long (45+ year) career, I worked in low level languages early on as that is the historical development. I also struggled each time I had to &quot;up my game&quot; as the path from low level thinking to high level thinking isn't necessarily clear or easy. A stone age human, while fully human and having the same mental capacity as modern humans (which they were), and probably an expert (if male, anyway) in creating stone tools, would have a terrible time trying to understand a socket wrench, though a hammer might be easy enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I don't believe that my students should recapitulate my experience as much of what I learned is now actually obsolete. Flow Charts for example, though some will disagree. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the real reason for starting in a higher level language is that I'm trying to teach students to &lt;em&gt;think&lt;/em&gt; not to &lt;em&gt;code&lt;/em&gt;. Higher level languages provide higher level concepts (duh), so provide a more amenable environment for teaching &lt;em&gt;thinking&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also want students to be able to build modern software, not the kind of thing I built before 1980. They need practice at that. A lot of practice. Modern software builds big things out of small things. The things inter-operate in complex ways, but if I try to build complex things out of complex parts I wind up with a mess. Build big and complex things out of small and simple things. Both object-oriented programming and functional programming emphasize this. A Scheme function returns a single thing, ideally without side effects. Java classes, if well designed represent simple compositions of still simpler things. Of course it is possible to misuse such languages, writing thousand line Scheme functions or hundred method Java classes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, it is possible to use C as a higher level language, though most programmers don't. A C program could consist of a thousand 4 line programs and be much better than a four thousand line monstrosity that is impossible to understand. Part of the problem is that C was invented at a time at which &quot;subroutines&quot; were rarely used, and only for those things that people thought would be &lt;em&gt;reused&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually people learned long ago that &lt;em&gt;reuse&lt;/em&gt; is a false deity. Don't worship it. Even in the Algol days it was understood that decomposition into parts was for simplifying the understanding of a problem. High level languages are intended to put a premium on this way of thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you teach them to think, they will be able to code. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-27T14:10:45.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4841" PostTypeId="2" ParentId="201" CreationDate="2018-05-27T15:02:45.997" Score="2" Body="&lt;p&gt;I prefer not to use a debugger, myself, for the simple reason that they are frustrating and don't actually run the same program (breakpoints and such can modify the logic). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is not a lot of actual &lt;em&gt;science&lt;/em&gt; in Computer Science, but finding out why programs go wrong is an exception to that. You have an artifact that is acting in a strange way and you want to first understand what it is doing and why. This is science - a new species of frog with novel behavior. So, use the scientific method. Form an hypothesis about what it is doing and then attempt to verify or rebut the hypothesis. You can use a debugger for this, or simple output statements. If it behaves as expected in one place look elsewhere for the error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, my actual practice is to try to avoid this situation as much as possible by using &lt;a href=&quot;https://en.wikipedia.org/wiki/Test-driven_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;Test-Driven Development&lt;/a&gt;. This actually incorporates the science into the process from the beginning, rather than after the fact. It also guarantees, provided you use it correctly, that when an error occurs you don't have a mess requiring an autopsy, but a small glitch that you can immediately fix. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In effect, the test that you write (before you write the code to make it pass), is an hypothesis about the code. If it passes all is well. But if the test fails, you have an improper hypothesis about the actual code. As long as the test is reasonable, it must be the code that is wrong. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is also a great way to understand an old program - a &quot;dusty deck.&quot; What is this program written ten years ago by people no longer in the organization actually doing? How can I make it do what it needs to do &lt;em&gt;now&lt;/em&gt;? The answer is to make hypotheses about it and capture them in tests, using a unit testing framework (junit or one of its equivalents). If the tests pass you have increased your understanding since your hypothesis was correct. If it fails, you need to think again. Once you understand it, or at least the relevant parts for the current task, you are in a position to modify it. But do this by writing new tests for the new desired behaviors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you program for an hour or two without tests and make an error somewhere you will probably find it difficult to debug. If you make changes to the program, hoping for the best, it will just get worse as the organization of the thing will probably worsen (entropy). But if you program three or four minutes at a time, with tests previously written to capture - in code - your understanding, you are unlikely to ever get frustrated. Unit testing speeds you up. It doesn't slow you down. Even if the number of lines of code in the tests is more than the number of lines of code in the application. Typing isn't what makes programming hard. Understanding is. Capture the understanding. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course you need to teach them how to use this technique through demonstration, just as with anything else. And when they come to you with a problem, have them show you the tests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also that if it feels foolish to write a four line test for a three line method that it isn't that I'm not smart enough to write a short method correctly the first time. But when a program is developed incrementally, as it must be, the assumptions I make now may be invalidated later by features added later. A good testing framework doesn't just run the recent test on the recent method. It runs &lt;em&gt;all&lt;/em&gt; the tests you have written and so the inconsistencies show up immediately. And of course, it might be either the new thing or the old thing that has to be updated. So write new tests and continue. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-27T15:23:53.723" LastActivityDate="2018-05-27T15:23:53.723" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4842" PostTypeId="2" ParentId="89" CreationDate="2018-05-27T22:52:26.933" Score="1" Body="&lt;p&gt;I first programmed (FORTRAN IV) in 1972. At the time, the main program &quot;editor&quot; was a &lt;a href=&quot;https://en.wikipedia.org/wiki/Keypunch#IBM_029_Card_Punch&quot; rel=&quot;nofollow noreferrer&quot;&gt;key punch machine&lt;/a&gt; that punched 80 column cards. You &lt;em&gt;assembled&lt;/em&gt; [1] a deck with your program and certain &lt;em&gt;control cards&lt;/em&gt;, possibly even including a copy of the Fortran Compiler into a &lt;em&gt;deck&lt;/em&gt; and you submitted your deck at a window to another person. In a small shop, that person might be the operator and the computer might even be visible somewhere behind the operator - through a window, as computers were noisy and had to be enclosed. Twenty four hours later, you picked up the results at a window. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there was any error in your program (or elsewhere in the deck), what you got was a failure report and went back to the keypunch to correct it. When done, you started another twenty four hour cycle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you can imagine, getting the syntax correct the first time was extremely important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, I program using Eclipse. The system is so efficient that it finds and highlights my syntax errors as I make them. It also finds and maybe corrects lexical (spelling) errors. It completes statement blocks and indents as I go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two lessons here. One is that &quot;getting the syntax right the first time&quot; was much more critical then than now. But also, Eclipse error highlighting and correction actually teaches the student over time not to make the mistakes that are the least important of all. Semantic and intent mistakes are what we need to focus on, and what the teaching (and grading) should focus on, not the kinds of things that tools like eclipse can (a) find/correct  and (b) teach us incrementally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is useful to be able to write code by hand. Sometimes you are on a bus and need to capture an idea and all you have available is a pencil and paper. But you don't need perfect syntax to capture the idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;https://cseducators.stackexchange.com/a/96/1293&quot;&gt;answer here from Peter&lt;/a&gt; notes that in some extremely important tests, students will need to write out code by hand. But the comments currently listed with it also indicate (correctly IMO) that the grading is very gentle on the kinds of things that tools can help us with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: Use good tools in teaching. Focus on the higher level concepts and let the tools correct errors of the formal language as well as help the students see what they should have written.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want them to &lt;em&gt;really learn&lt;/em&gt; to get the syntax right the first time, use a key punch and 24 hour turnaround. Other forms of abuse might work just as well. But.... well, no, don't do that. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;[1] The term assembler (or assembly) language comes from this physical construction of a card deck.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-27T22:52:26.933" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4843" PostTypeId="2" ParentId="437" CreationDate="2018-05-28T13:38:51.953" Score="1" Body="&lt;p&gt;Uniformity of groups is not good practice, for a variety of reasons. You need to find some means of assuring variety of experience and viewpoint in any project. If that is hard to do (as it is with such small groups) then don't let those pairs and triples stay together over many assignments, but re-shuffle the groups. It is normally easier with larger groups.&lt;/p&gt;&#xA;&lt;p&gt;The issue is larger than just the course itself. The students need to become comfortable working with other not like themselves as it will be the norm in their later education and certainly in the workplace.&lt;/p&gt;&#xA;&lt;h2&gt;Here are some reasons:&lt;/h2&gt;&#xA;&lt;p&gt;There is research to the effect that the presence of a woman on a team improves the team performance. However, there is also research evidence that if a woman is the &lt;em&gt;only&lt;/em&gt; woman on a team, she will be unhappy. Sorry, but I can't remember the source. I likely heard of it at either SIGCSE or one of the Agile conferences. The lesson that I generalize is that &lt;strong&gt;diversity is good&lt;/strong&gt;, and &lt;strong&gt;isolation is bad&lt;/strong&gt;. But the key is that diversity is good for the team's &lt;em&gt;product&lt;/em&gt;, not just for the team's members.&lt;/p&gt;&#xA;&lt;p&gt;If a team is too uniform, you will get the same sorts of ideas from everyone, lessening any creativity. This is especially true if teams are formed by the students themselves. They will likely choose friends. That might seem like a good thing, but it is likely to come at the expense of uniformity of thought.&lt;/p&gt;&#xA;&lt;p&gt;People learn in different ways and the lessons learned in even technical subjects go beyond the subject matter itself. An advanced student working with a relative novice, provided you can make it safe for both, gives the advanced student an opportunity to learn more deeply than he/she might otherwise do just from having to guide the partner. The novice will start to see how he/she might think more like the mentor.&lt;/p&gt;&#xA;&lt;h2&gt;Here are some ways to go about it:&lt;/h2&gt;&#xA;&lt;p&gt;Others answering this question have suggested randomizing. This works pretty well and I second the advice.&lt;/p&gt;&#xA;&lt;p&gt;While it is generally a bad idea to let groups form themselves from their friends, there is a technique that works well for larger groups, though it requires that the students know something about one another so it may not work in your precise circumstances. In sandlot baseball, teams are often formed as follows. Captains of the teams are chosen somehow; one per team. You can choose the captains or they can be randomly chosen. I usually named the (say) three best students in my estimation as captains. The captains would then choose their team mates in rotation, each captain choosing one person in each round. Yes, someone will be chosen last. It may be that they are just less known to the captains or it may be that there is some perception about their abilities. But the &amp;quot;last person chosen&amp;quot; may, in fact, wind up as a solid contributor to the team for reasons that seem orthogonal to the technical aspects.&lt;/p&gt;&#xA;&lt;p&gt;If you want to make it more elaborate, you can even have each person write out on an index card what they think their main contribution to a team might be. This could be technical or not. It is like a mini CV. The captains have access to this information in the choosing process. This would be useful if the students know less about one another than otherwise.&lt;/p&gt;&#xA;&lt;p&gt;Another option is for you to choose the teams. Write each person's name and something about them on a card. Then move the cards around in such a way that you get diversity on some measure in each team. But take into account that if a person assigned to a team is likely to feel isolated in the team it is probably not a good matching. If the size of the group and the characteristics of the people make this especially difficult, then you can give people the necessary experiences by having the teams short lived rather than persist through the course. The characteristics you use needn't involve protected classes (race, gender, ...). You can use past performance. You can use the fact that a person asks a lot of questions vs none at all. If the students form cliques outside class you can use those. If students are also employed, you can use employer. Lots of possibilities to find diversity of background and insight.&lt;/p&gt;&#xA;&lt;h2&gt;Final thoughts&lt;/h2&gt;&#xA;&lt;p&gt;Team work like this should also be combined with peer evaluation. Each team member should provide at least two things. First they should be able to name the top contributors to the team effort and to say why those were chosen. Second they should detail what they believe their own chief contribution was. They need to know before the teams are chosen that this will be a requirement and that it will be taken into consideration as part of the grading/evaluation process. If the questions are positive (who helped most?) rather than negative it is less risky for the students. The non-contributors stand out, as they aren't mentioned positively, rather than that someone said negative things about them.&lt;/p&gt;&#xA;&lt;p&gt;Even in pairs (teams of two), you can ask each student for their partner's main contribution as well as for their own.&lt;/p&gt;&#xA;&lt;p&gt;You will often learn surprising things from this peer evaluation, especially if their work is done outside you view. I've had people boosted by their peers beyond what I would have guessed.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-28T13:49:04.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4845" PostTypeId="2" ParentId="211" CreationDate="2018-05-29T12:27:27.657" Score="3" Body="&lt;p&gt;Let me suggest, pretty strongly, that you may be mixing up too many ideas in too short space for novices to grasp in one go. Spread it out. There is no real reason to &lt;em&gt;introduce&lt;/em&gt; arrays along with pointers, nor to give a complex reason for zero indexing at the start. In C, you don't want to avoid it altogether, of course, but you don't dump the whole load at once.&lt;/p&gt;&#xA;&lt;h2&gt;Step one&lt;/h2&gt;&#xA;&lt;p&gt;I'd suggest that you first present arrays in a simple way, using all of the available sweeteners that there is (syntactic sugar). Something like &lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_arrays.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;this tutorial&lt;/a&gt; is pretty clear. It enables the use of arrays for nearly all purposes.&lt;/p&gt;&#xA;&lt;p&gt;You can describe an array as a &amp;quot;contiguously stored block of values of the same type.&amp;quot; One easy way to talk about zero indexing in this context is to think of the index as the &lt;em&gt;distance from the start&lt;/em&gt;. If you aren't asked about what distance means at the start you can just ignore it, but if asked, you can talk, briefly, about each type has a &amp;quot;size&amp;quot; and the distance is measured in units of this size. Thus the &amp;quot;first&amp;quot; element is at distance 0, so has index 0.&lt;/p&gt;&#xA;&lt;h2&gt;Step two&lt;/h2&gt;&#xA;&lt;p&gt;Once arrays are solidly integrated into the students' thinking process you can introduce pointers in general, but not yet connected to arrays. Again, the &lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_pointers.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tutorials Point introduction&lt;/a&gt; is pretty much at the level that is needed.&lt;/p&gt;&#xA;&lt;p&gt;But you have introduced two concepts and the pedagogy was to keep them separate initially so that each can be learned on its own merits. Now you can merge the two ideas and will then deepen the understanding of both.&lt;/p&gt;&#xA;&lt;h2&gt;Step three&lt;/h2&gt;&#xA;&lt;p&gt;This &lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_pointer_to_an_array.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;third tutorial&lt;/a&gt; explains it quite well. Note that since you used the &amp;quot;distance&amp;quot; metaphor for indexing initially it all comes together. In an array of doubles,&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;double balance[5] = {1000.0, 2.0, 3.4, 17.0, 50.0};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;the measurement is the size of a double. the compiler knows this so that in:&lt;/p&gt;&#xA;&lt;p&gt;*(balance + 2) : 3.400000&lt;/p&gt;&#xA;&lt;p&gt;adding 2 is sufficient since the compiler knows the measurement scale from the declaration. So the 2 means 2 units where a unit is &lt;em&gt;sizeof double&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;The key idea here is to teach the three topics separately in a way that enables use but also avoids requiring too many more-or-less independent ideas to be needed in any one discussion. In the third part (pointer to an array) you remind them of what they already know and show them an alternate way to think about things that can reinforce what they know (contiguous block of values of the same type + distance) and make it actually computational.&lt;/p&gt;&#xA;&lt;p&gt;You can emphasize that both the &amp;quot;contiguous&amp;quot; part and the &amp;quot;same type&amp;quot; part are essential in this computation. This gives you a hook to discuss variations, say linked-list vs arrays or homogeneous vs heterogeneous structures.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="9154" LastEditDate="2021-05-26T11:15:18.700" LastActivityDate="2021-05-26T11:15:18.700" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4846" PostTypeId="2" ParentId="206" CreationDate="2018-05-29T14:38:45.713" Score="1" Body="&lt;p&gt;One option hasn't yet been mentioned. I've had good luck with it in certain circumstances. The background is that the students were all eager and hard-working, but some had more experience and some were truly exceptional. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic idea is that you can provide two versions of a lab assignment. The first version covers the basics of what needs to be learnt. The second version is truly challenging and goes beyond, either in concepts or in difficulty of implementation. It could even have subtle elements that require deep thought. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students (or teams) choose which assignment they will do. They are each &quot;worth&quot; the same amount for grading purposes and no-one has to do both. The assumption here is that the superstars probably would find the first version rather trivial and wouldn't learn a lot from doing it, but most students might find the second version frustrating. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the superstars might choose the easy version, especially if it is done outside of class/lab time and they are otherwise busy, but you will find, with certain students, that the challenge of it intrigues them. You may also find that some students who lack the necessary background might want to do the advanced version. You might want to advise them otherwise or make some other adjustments. You might also provide a requirement or two in the background of students who want to do the advanced version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;These sorts of things take some experimentation, however. The first time you do it you might find that one version was too easy and the other too hard, requiring more time than was available. For the future you can adjust, but for the first run you may have to adjust how you assign grades. The big factor is that you require learning, not necessarily project completion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to be very clear, of course, when presenting the two versions that one is a lot more challenging and that there is no &quot;extra&quot; credit for doing it. Don't mislead anyone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The particular case I'm thinking of was a Database course that discussed both the theory and implementation of database systems (not just individual databases). Some of the algorithms used are also discussed in an Algorithms course. My recommendation to the students was that if they had already implemented something similar to the &quot;easy&quot; assignment they should do the other to avoid boredom. I was pleasantly surprised at how many students picked the harder problem and also how much the students picking the &quot;easy&quot; version learned from the exercise. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-05-29T14:38:45.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4847" PostTypeId="1" CreationDate="2018-05-29T20:55:18.040" Score="2" ViewCount="618" Body="&lt;p&gt;I am familiar with the concept of void and return methods in Java, and am teaching a course in JavaScript, programming Sphero robots. I think I have the gist of how to explain these concets, but am slightly concerned since I can't find any good examples of NON- return (void) functions used in the JavaScript. It seems that the keyword 'void' is only used to indicate an expression without a return value. The problem is, I need to differentiate between void and return methods/functions since you cannot use an Async function with a return function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this concept of void and return methods in Java analogous to JavaScript as well, or is there a better keyword that I can use to explain the different kinds of functions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I would like to explain, is, what if you are calling a function, but you don't know what was coded to create it? Is there a hard and fast rule or way to tell if something is void or return?&lt;/p&gt;&#xA;" OwnerUserId="3778" LastEditorUserId="3778" LastEditDate="2018-05-31T04:12:19.177" LastActivityDate="2018-05-31T04:12:19.177" Title="Best Way to Explain Distinction Between Void vs. Return Functions in JavaScript" Tags="|javascript|methods|" AnswerCount="1" CommentCount="12" ClosedDate="2018-05-30T11:16:59.587" ContentLicense="CC BY-SA 4.0" />
  <row Id="4849" PostTypeId="1" AcceptedAnswerId="4854" CreationDate="2018-05-29T23:38:29.913" Score="7" ViewCount="2886" Body="&lt;p&gt;This is a very objective question. I want to know what are the methods for teaching programing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll provide a parallel example to make this clearer in case this causes any confusion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have Portuguese as a native language and I teach English here in my country (therefore I'm an English teacher).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In English teaching there are 3 main methods (over simplified below) of teaching used here.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Method: Communicative Approach. Author: Noah Chomsky et al. -&gt; Where you expose the student to a simple exercise and words and how to use them and then explains what happened and follow to more advanced exercises based on what is contained in the lesson (or to what you just explained). {It can be done starting with the mother language and then moving to the language one desires to learn as you progress in the classes, or classes can be taught entirely in&#xA;  the second language with a special care with the words used for beginners.}&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Method: NLP (Neuro Linguistics Programmming). Author: Various -&gt; You expose the student to a simple set of words translated, for instance verbs, and asks  them to translate from their mother language to the language they are learning. Moving on to vocabulary and so on. On each lesson stacking how to use the verbs, vocabulary, expressions and some grammar (usually in this order).&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Method: Immersion. Author: Krassner et al -&gt; The student is taught, much like Communicative Approach but classes are done fully in the language and in a place where the person lives a routine with the language. To learn English (or any other language as a matter of fact) like this, according to the method, one would have to live in an English speaking country.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;=========================================================================&#xA;Edit:&#xA;&lt;strong&gt;I believe this line is causing a bit of a confusion&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did not meant that Learning a human language is the same as learning a programming language. I'm just saying that, in English language teaching we have methods to do that, as listed above. Does CS have one (or many)?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Continuation of the original text:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-&gt; Part I believe is causing confusion:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;So above I believed to have expressed what I meant with &quot;What are the pedagogical methods for teaching programming?&quot; Making a parallel with Teaching English as a Second Language in order to &lt;strong&gt;__illustrate__&lt;/strong&gt;.&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I think from here things were well understood. &#xA;Why do I ask this? And what answers I don't expect seeing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I see is that people usually say; &quot;In this site, there is a very good teacher, or resources for learning how to code. You can use it.&quot; As a way to mirror that, to teach someone or a group how to code instead of pointing to a (or various) method(s)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is not my question. It is very clear. What are the methods for teaching programming?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;====!And not; What are the methods for learning how to code?!========&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this can help me, because I haven't really found an answer to this. Or at least not as explicit and detailed as I see in other areas of the teaching world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't need a detailed explanation but if you wish to provide something more elaborated I will be thankful. Nevertheless the method(s) is(are) just fine and what I'm looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a great day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: Originally asked in -&gt; &lt;a href=&quot;https://stackoverflow.com/questions/50586854/what-are-the-pedagogical-methods-for-teaching-programming?noredirect=1#comment88194521_50586854&quot;&gt;https://stackoverflow.com/questions/50586854/what-are-the-pedagogical-methods-for-teaching-programming?noredirect=1#comment88194521_50586854&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5318" LastEditorUserId="27" LastEditDate="2020-01-22T13:59:21.260" LastActivityDate="2020-01-22T13:59:21.260" Title="What are the pedagogical methods for teaching programming?" Tags="|student-motivation|best-practice|" AnswerCount="3" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="4850" PostTypeId="2" ParentId="4847" CreationDate="2018-05-30T00:08:31.757" Score="1" Body="&lt;p&gt;A function to perform a procedure often has a void return type. For example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function foo(a, b, s)&#xA;{&#xA;    // tell sphero s to go one direction a, another b&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You are executing a procedure as a side effect and are not returning a computed value.&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="58" LastEditDate="2018-05-30T00:48:50.563" LastActivityDate="2018-05-30T00:48:50.563" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4851" PostTypeId="2" ParentId="4849" CreationDate="2018-05-30T08:37:57.380" Score="4" Body="&lt;p&gt;I'm not sure this is what you are looking for, but from personal experience (and probably in no way 'official' educational paths) :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I gave each approach a name in order to be able to seperate them in case users want to discuss them. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Frontal Theory&lt;/strong&gt;: Speak in-class about constructs and syntax, students code at home (exercises). &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Collaborative&lt;/strong&gt;: students and teacher code together in-class&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Guide-and-Release&lt;/strong&gt;: Introduce them to the topic of coding in-class, then let them complete online-courses (there are lots of websites which provide virtual classrooms with a &quot;control&quot; function for the teacher observing the students' progress.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Project based&lt;/strong&gt;: Each student / group of students decide in the beginning what kind of software (scale is up to them/teacher) they want to write / rebuild (e.g. a blogging site / a tic tac toe game in the command console). The teacher helps students research what is necessary for it, how to approach it. Learning progress happens throughout the development. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;@Project based: example for the tic tac toe game: we need input, output, a way to store values, loops. Then start with researching&amp;amp;learning how input/output works in the chosen language. Gradually build up knowledge until the game can be implemented. (Probably my favorite approach, as it focuses on learning how to analzye/break down a problem, solve small instances one at a time and then put components / partial solutions together -  which is coding at its core in my opinion)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: Removed the following approach from above, as it is rather a didactical approach and not on the same &quot;educational level&quot; the previously mentioned - but for completeness, here you go: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Free Style&lt;/strong&gt;: Students learn by themselves in-class, the teacher is only available as a &quot;helping hand&quot; if problems come up. (No solution on a silver platter, but rather giving points on where a solution can be found - stackoverflow, documentations etc.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1761" LastEditorUserId="1761" LastEditDate="2018-05-30T09:17:33.890" LastActivityDate="2018-05-30T09:17:33.890" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4852" PostTypeId="2" ParentId="129" CreationDate="2018-05-30T10:02:01.457" Score="1" Body="&lt;p&gt;The problem of young women (girls) and other groups (minorities) being under-represented in certain educational fields and professions is a deep problem with only complex solutions. There is no magic solution that will make it right.&lt;/p&gt;&#xA;&lt;h2&gt;First some data points.&lt;/h2&gt;&#xA;&lt;p&gt;According to the Guardian, the problem seems to be somewhat localized to the &lt;a href=&quot;https://www.theguardian.com/world/us-news-blog/2013/feb/05/girls-science-gender-gap-fix&quot; rel=&quot;nofollow noreferrer&quot;&gt;US, Britain, and Canada&lt;/a&gt; .  There is something about the educational and social systems in these countries that seems to drive some people away.&lt;/p&gt;&#xA;&lt;p&gt;In the early years of education, &lt;a href=&quot;https://www.theatlantic.com/education/archive/2014/09/why-girls-get-better-grades-than-boys-do/380318/&quot; rel=&quot;nofollow noreferrer&quot;&gt;young girls outperform boys&lt;/a&gt; by a large margin. There is even a worry that the educational system disadvantages boys up to a certain age.&lt;/p&gt;&#xA;&lt;p&gt;In the US, at least, one of the influences is that elementary teachers are predominantly women, giving young girls positive role models. Many young females want to be teachers since they see how important teachers are in their own lives.&lt;/p&gt;&#xA;&lt;p&gt;Some solutions are pretty rotten (See the Guardian article, above). I read there that you should emphasize &amp;quot;cooking&amp;quot; as embodying both science and, well..., something.&lt;/p&gt;&#xA;&lt;p&gt;One possibility that helps explain the discrepancy among high school students is the conflict between &lt;em&gt;smart&lt;/em&gt; and &lt;em&gt;cool&lt;/em&gt;. For young kids these are aligned - teachers and parents give a lot of positive feedback for being smart to youngsters. But at some point, kids start to differentiate their personalities from others, especially teachers and parents. In some groups &lt;em&gt;smart&lt;/em&gt; != &lt;em&gt;cool&lt;/em&gt; and since students of that age are spending more time with peers, &lt;em&gt;cool&lt;/em&gt; always wins. Boys want to be seen as &lt;em&gt;cool&lt;/em&gt; both by other boys and by girls. The same is true for girls. Being smart takes second place. For the overly geeky, poorly socialized, boys it matter less as they won't be seen as &lt;em&gt;cool&lt;/em&gt; in general, but only by other geeky guys.&lt;/p&gt;&#xA;&lt;h2&gt;Toward solutions&lt;/h2&gt;&#xA;&lt;p&gt;From the above, I suggest two approaches to the problem.&lt;/p&gt;&#xA;&lt;p&gt;The first is to provide mentors to young women and members of minorities. These mentors should, if at all possible, be similar to the students. Female, Black, Hispanic, Introverted, Poor, whatever. The mentors need to provide both some of the instruction but serve as role-models primarily. Can one or two of your female students visit a female professional at work (Take a student to work day)? Make this mentorship part of your educational process. A group of mentors can also provide a boost to the students later in life if you can make the contacts permanent.&lt;/p&gt;&#xA;&lt;p&gt;The second approach is to make &lt;em&gt;smart&lt;/em&gt; = &lt;em&gt;cool&lt;/em&gt; again. My personal approach to this is to emphasize group work in courses over individual work. Make learning a social process, not just an individual one. Let students work together with peers who share characteristics. Groups of girls, for example. Better is groups in which girls are a substantial part, though not completely dominant. Cliquishness isn't likely an improvement and every student needs to learn to work with others who are not &lt;em&gt;just like themselves&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You also, as a teacher need to be aware of dynamics in the classroom. Who asks the questions? Who provides help? Who dominates the conversations? Who do you call on to answer questions? Where do students sit in the room? Who do they sit with? All of these things can be indicators of things that may need addressing.&lt;/p&gt;&#xA;&lt;p&gt;Make your successful girls and minority students ambassadors for your program.&lt;/p&gt;&#xA;&lt;p&gt;Try to get girls (and minorities...) to form clubs and study groups in which they can work together, so that the socialization itself is part of the coolness.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, treat every student as an individual, no matter what their &amp;quot;characteristics.&amp;quot; You may not be a natural mentor for some students but you can show through your respect for them and the way to treat them and answer their concerns, that their learning and future matter to you.&lt;/p&gt;&#xA;&lt;p&gt;Sorry that this isn't a more complete answer. It is a deep problem without facile solutions.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-05-30T10:02:01.457" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4853" PostTypeId="2" ParentId="4849" CreationDate="2018-05-30T12:15:10.003" Score="4" Body="&lt;p&gt;To come to an understanding of this question requires some background. To teach &quot;programming&quot; (rather than computer science in general) we teach some language, say Java. But we use language quite differently than we use natural languages (Portuguese, English, ...). Both are used for communication. It is too frequently forgotten than programming languages are given certain characteristics to enhance communication between humans, so don't get the idea that programming languages are just (or even primarily) about communicating to machines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, Computer Science, is, at base, more like an Engineering discipline than it is like the Humanities. In CS we build things. If I leave out Computer Engineering, CS is mostly about building virtual things. As such we are less bound, though not unbound, by the constraints of physics. But we use programming languages to construct things in virtual worlds. It is true, of course, that a speaker of a natural language, think a poet, also constructs things, but those things don't actually have a real (i.e. direct) effect on the real world. But programs actually do affect the real world. The software system that enables this post enables a form of communication that didn't exist prior to its creation. &lt;a href=&quot;https://en.wikipedia.org/wiki/Fernando_Pessoa&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fernando Pessoa&lt;/a&gt;, while an incredibly creative poet, has had little direct affect outside the minds of aficionados. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other main difference between the use of natural language and the use of programming languages is that the constructs of, again Java, are intended explicitly to extend the language, rather than to use it as is. Computer programmers create new words and give them meaning (classes, methods, interfaces, ...). Natural language speakers do so also, of course, but only incidentally and not as &lt;em&gt;the main thing&lt;/em&gt;. On the other hand, if a poet adds a word to the language, that word is intended to be used universally with the meaning give. When we define new words (abstractions) in computing, those words only have local meaning, though some escape into the wider world of computing. Thus &quot;account&quot; has no universal meaning, but &quot;linked list&quot; does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, at the lowest level of pedagogy, we do, in fact, present simple examples and fairly concrete explanations of the elements of a programming language, but that is never enough for understanding. For a true understanding, the student has to create increasing complex virtual worlds, learning how to use the base language as well as its programmer-defined extensions to build yet higher level constructs. We call this &lt;em&gt;abstraction&lt;/em&gt; and it is fundamental to what we do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But fundamental to the understanding of teaching computer programming is the idea that the &lt;em&gt;consequences&lt;/em&gt; of the various low-level constructs is far from obvious, either in meaning or in use. Computing languages need to be complete (Turing Complete) enabling &lt;em&gt;any&lt;/em&gt; computable action to be written. But they also tend to be rather sparse. The language may be tiny (see Lisp, for example), but the possibilities are endless. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students never understand how to create new abstractions they cannot be successful as programmers. In the earliest days of computing (before real languages were created) this was seen as a fundamental limitation, and everything since has led to enabling higher and higher level abstraction. This is independent of paradigm, by the way and is equally true for Functional Programming, Imperative Programming, Object-Oriented Programming, etc. Even Assembly Language permits some simple abstractions, but since it is limited we tend to avoid it unless other considerations make its use essential. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine, for example, trying to express everything in English using the &lt;a href=&quot;https://www.ef.edu/english-resources/english-vocabulary/top-1000-words/&quot; rel=&quot;nofollow noreferrer&quot;&gt;one thousand most frequently used words&lt;/a&gt;. It would be very difficult. However, if you already had a mechanism for creating new words from old, you would have a way to extend the language. Actually, we have that. It is called a Dictionary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the main pedagogical tool we use in teaching programming is not explanation and example, but &lt;em&gt;practice&lt;/em&gt; in creating complex virtual worlds. Much of the rest of CS, by the way, is related to this in some way as it enables this &lt;em&gt;engineering&lt;/em&gt; goal. Database, Algorithms, Web Design, ... all give tools (at high levels of abstraction) that enable the creation of these worlds that affect the real world in fundamental ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This technique is called &lt;strong&gt;Active Learning&lt;/strong&gt; and is used in many disciplines. There is a book on &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1479171824&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Pedagogical Patterns&lt;/em&gt;&lt;/a&gt; as used in computing that discusses many aspects of Active Learning and other relevant techniques. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an ethical consideration also. If a Poet says terrible things it rarely affects the lives of people, though I admit it is possible. But if a software designer creates an evil, for example, social meet up application it can have devastating real world consequences. One obvious example is that it is now possible for a computer virus to infect the control systems for electrical transmission infrastructure. If deployed, they could shut off the &quot;grid&quot;, actually killing people (say in hospitals) that depend on a continuous electric supply. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the short version, is that we ask students to build things. We ask them to build complex things on the top of simpler things. Then we ask them to build even more complex things on top of that. Etc. Etc. Etc. There is no end. At each level we ask them to extend the language with carefully defined &quot;words&quot; (defining classes, etc). But it is for engineering, not for expression. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this, teaching programming is much more like teaching Creative Writing, than it is like teaching a person a second language. In Creative Writing, the student writes increasingly sophisticated and complex things. But the pedagogy is mostly to encourage practice and the deepening of the understanding of the possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, one technique used in teaching Creative Writing is simply reading the literature critically. Sadly, this is underused (by most) in teaching programming, but that is largely due to the absence of a recognized programming Literature. There are a few examples, such as &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0130830984&quot; rel=&quot;nofollow noreferrer&quot;&gt;Per Brinch Hansen's book On Pascal Compilers&lt;/a&gt;. But most programs, even quite sophisticated ones don't really count as literature. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-05-30T16:54:20.523" LastActivityDate="2018-05-30T16:54:20.523" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4854" PostTypeId="2" ParentId="4849" CreationDate="2018-05-31T04:29:51.030" Score="2" Body="&lt;p&gt;Inquiry-Based Learning is a great framework to use with teaching programming. It involves letting students build their own knowledge by exploring and questioning programming phenomena. For example, you may give students a boilerplate but of code, and ask them to make changes or accomplish certain tasks from the beginning point. Students should do some practice and research, and also participate in discussion and sharing of the programming they are doing. Ideally this is done as a community and students can form their own type of 'schema' for what they are learning, and learn, much as real programmers do, from one another. Learn more here; &lt;a href=&quot;https://en.wikipedia.org/wiki/Inquiry-based_learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Inquiry-based_learning&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, with I blend this method with several other in the curriculum I create, to create more scaffolding, instead of throwing them in the deep end with a problem. I find that students need a bit of direct instruction first, then can be given an inquiry  &amp;amp; project based lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 1- teach CS and programming concepts. Blend CS concepts with a programming language.&#xA;Step 2- Show students an example of how to create a program, but place it in the context of the CS concept. For example, you may teach about HTML tags, then teach about how the internet came to be, and what the first markup language was intended to do. Students can create a website about the 'first internet'&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Step 3- Inquiry-Based lesson. Give students a boilerplate activity, and pose some questions. How can we create a more efficient piece of code, using what you learned? Perhaps in an earlier lesson, you modeled researching on MDN, then using that for ideas and clarification. You may, for example, give them a programming concept and ask kids how to more elegantly create this code with the control structures and methods you have taught. Students should be creating and communicating among one another, and creating different iterations of the same code- again, this is a skill you have scaffolded and taught in earlier lessons as well.&lt;/p&gt;&#xA;" OwnerUserId="3778" LastActivityDate="2018-05-31T04:29:51.030" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4855" PostTypeId="1" AcceptedAnswerId="4856" CreationDate="2018-05-31T05:11:31.533" Score="5" ViewCount="272" Body="&lt;p&gt;The GNU manpage (what you'll find on a Linux system) – but pretty much any Unix manpage – of &lt;code&gt;chown&lt;/code&gt; (the command for changing the owning user and owning group in Unix) appeal to an “owner” and, as you see, the very name of this command hints at  “&lt;strong&gt;ch&lt;/strong&gt;ange &lt;strong&gt;own&lt;/strong&gt;er”, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When people first learn this, they get the wrong idea, that for the command &lt;code&gt;chmod&lt;/code&gt; (which sets the file/directory permissions), the abbreviation &lt;code&gt;o&lt;/code&gt; (as in &lt;code&gt;chmod o+w file&lt;/code&gt;) stands for “owner / owning user”. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In reality it stands for “&lt;strong&gt;other&lt;/strong&gt; users”. So &lt;code&gt;chmod o+w file&lt;/code&gt; really adds the writing permission (&lt;code&gt;+w&lt;/code&gt;) for &lt;em&gt;other&lt;/em&gt; users (who are not the owner or a member of the owning group). It doesn't help that what &lt;em&gt;really&lt;/em&gt; refers to the “owner”, namely &lt;code&gt;u&lt;/code&gt; (= owning &lt;strong&gt;u&lt;/strong&gt;ser), makes it possible for one confusion to give rise to another: &lt;code&gt;u&lt;/code&gt; is then confused for “‘normal’ users”: anybody not the owner or in the owning group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, it helps to make people directly aware of this, but even if they can remind themselves that there's some trap here, the idea &lt;code&gt;o&lt;/code&gt; = “owner”, &lt;code&gt;u&lt;/code&gt; = “normal users” is so &lt;em&gt;seductive,&lt;/em&gt; that they retain some insecurity until enough (sometimes &lt;em&gt;a lot&lt;/em&gt; is necessary) rote memorization makes it finally sink in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be a mnemonic or other way to explain it which makes the correct notion &lt;strong&gt;stick&lt;/strong&gt; &lt;em&gt;right&lt;/em&gt; from the start, so rote memorization isn't necessary?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I'm not formally teaching anyone, it's just what I want to tell coworkers/friends. When I took a university course on Linux I first came across this confusion. There's a lot more about the Unix permission system which is very counter-intuitive, but those are issues arising necessarily from technical aspects. Not an (surprisingly very) annoying and trivial issue caused by bad historical choices for abbreviations.&lt;/p&gt;&#xA;" OwnerUserId="5326" LastEditorUserId="5326" LastEditDate="2018-05-31T05:17:37.263" LastActivityDate="2018-06-20T01:35:36.947" Title="The confusing Unix permissions terminology" Tags="|adult-education|command-line|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="4856" PostTypeId="2" ParentId="4855" CreationDate="2018-05-31T07:00:06.810" Score="8" Body="&lt;p&gt;You could point out that a file has an &lt;em&gt;owning user&lt;/em&gt; and an &lt;em&gt;owning group&lt;/em&gt;. Since “owner” appears twice, specifying &lt;code&gt;o&lt;/code&gt; for “owner” would be ambiguous. That's weak because the owning group doesn't really have any special privileges on the file, unlike the owning user: the owning user can change the file's permissions and other metadata, but the owning group only has the privileges granted by the file's permissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the best approach is to pair up &lt;em&gt;user&lt;/em&gt; and &lt;em&gt;group&lt;/em&gt; so that people remember them together. There's &lt;strong&gt;u&lt;/strong&gt;ser and &lt;strong&gt;g&lt;/strong&gt;roup: &lt;code&gt;u&lt;/code&gt; and &lt;code&gt;g&lt;/code&gt;. There are basic file permissions for one user and for one group. ACL entries can apply to either a user or a group. The command &lt;code&gt;ls -l&lt;/code&gt; has two columns for ownership, one with the user and one with the group. Beware that sometimes the naming is not consistent. On the system there's a user database (&lt;code&gt;/etc/passwd&lt;/code&gt;) and a group database (&lt;code&gt;/etc/group&lt;/code&gt;). The &lt;code&gt;chown&lt;/code&gt; command takes both a user and a group, but there's also a separate &lt;code&gt;chgrp&lt;/code&gt; command and so &lt;code&gt;chown&lt;/code&gt; is often used for the user only, which tends to reinforce the association between “user” and “owner”, so avoid mentioning that if you're trying to dispel the association between “user” and “owner”.&lt;/p&gt;&#xA;" OwnerUserId="124" LastActivityDate="2018-05-31T07:00:06.810" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4857" PostTypeId="2" ParentId="4855" CreationDate="2018-06-01T12:29:02.780" Score="0" Body="&lt;p&gt;UNIX has three rings of security they are&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;u,  the user&lt;/li&gt;&#xA;&lt;li&gt;g, the group&lt;/li&gt;&#xA;&lt;li&gt;o, others (including Apache) on the same machine.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are three levels of permission&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;r, read, which has octal value 4&lt;/li&gt;&#xA;&lt;li&gt;w, write, which has octal value 2&lt;/li&gt;&#xA;&lt;li&gt;x, execute, which has octal value 1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are two ways to set permissions. One looks like this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod [ugo][+-][rwx] file(s)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Example &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod ug-x&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;revokes execute permission from user and group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More typically, you can do this&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod abc file(s)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;where a, b, and c are an octal digit. The digit a modifies &#xA;user permissions, b group, and c others. Example&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod 644 index.html&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;6 = 4 + 2, so user has read/write permissions&#xA;4 = 4      so group has read permissions&#xA;4 = 4      so others have read permissions&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chmod 600 quiz.notYet&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;User has read/write&#xA;Nobody else has any permissions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To see permissions, use the &lt;code&gt;ls -l&lt;/code&gt; command.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;chown&lt;/code&gt; command changes ownership. You can only do this to files&#xA;you own.  Root can do it to any file.  Here are the two guises&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chown username file(s)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chown username:groupname file(s)&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;-R&lt;/code&gt; option will change ownership recursively within a directory.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-06-01T12:29:02.780" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4858" PostTypeId="1" CreationDate="2018-06-01T22:29:00.733" Score="18" ViewCount="733" Body="&lt;p&gt;I have a question for educators, from the perspective of a TA. I'm happy to post my question elsewhere if it's not appropriate for this site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Homework problems in algorithms classes often involve finding clever tricks that the professors find elegant or interesting. However, it seems like most of the students who solve these problems well are students who are familiar with the tricks already, from prior experience. Students who don't know the tricks end up going to office hours, where the TA has to guide them through most of the solution, and the students are left confused about how they could possibly have derived the solution independently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems like a discouraging pattern, especially because, in the end, research usually involves deep logic and understanding, but students come away feeling like algorithms is simply full of these impossible, clever leaps. Is there a way to help students catch up on these tricks and tools without giving away the answers?&lt;/p&gt;&#xA;" OwnerUserId="5335" LastActivityDate="2018-08-05T16:49:08.957" Title="Difficulty of algorithms homework problems" Tags="|undergraduate|algorithms|homework|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4859" PostTypeId="2" ParentId="4858" CreationDate="2018-06-01T23:03:42.390" Score="3" Body="&lt;p&gt;I can offer two ideas here. The first is to try, whenever possible, to use some real world metaphor for the technical problem at hand. Railway sidings, card shuffling, etc. Some instructors use these as a matter of course in introducing a new algorithmic concept. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want a thorough study of how to approach and develop algorithms, get a copy of: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/038790641X&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Gries, The Science of Programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book will change how you think about algorithms and how they are developed. One of the key ideas is algorithm development from loop-invariants along with pre- and post-conditions. There is a science (hence the name) of modifying post-conditions in order to develop a loop and its invariant. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the magical problems in the book is a linear time sort of an arbitrary array that contains only three distinct values (Dutch National Flag). It generalizes to a linear time sort of an array containing a finite number of distinct values. [1]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as a TA, if you are familiar with the technique as described in the book, you can guide a beginner by working with the student to find the pre- and post-conditions, expressing them logically and then looking at formally weaker statements to guide the algorithm development. Note that the classic sorts, for example, all have identical pre- and post-conditions. The different algorithms arise from the various ways in which a logic statement can be weakened. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: if P -&gt; Q the P is &quot;stronger&quot; and P is &quot;weaker&quot;. So, a post-condition for a sort might include that the array A[0:n] is sorted. A weaker statement is that A[0:k], k &amp;lt;=n, is sorted. Combined with other statements, this can lead to a well defined loop and its exit condition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it isn't a bunch of discrete tricks, but a methodical approach to developing the algorithms. The &quot;tricks&quot; are consequences of the technique, not the technique itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of the suggestions here are to give students a way to think about the problem, rather than to just reveal a &quot;trick&quot;. You may be able to think of other ways to achieve the same end. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;This book has been mentioned in several other answers on this site. A local search for &quot;Gries&quot; will turn up some additional ideas. I was lucky enough to have been taught this by David himself. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;[1] For those requiring more explanation, the array can be of any length, but the values contained in it come from a set of three values, often {red, white, and blue}. This implies, of course that while there are only three &lt;em&gt;distinct&lt;/em&gt; values in the array, they are repeated. The sort is to bring all of the &lt;em&gt;red&lt;/em&gt; values together at the start of the array, and the &lt;em&gt;blue&lt;/em&gt; values to the end. The algorithm runs in linear time as a function of the size of the array. The sort is not &lt;em&gt;stable&lt;/em&gt;, in that entries of the same value may be exchanged. So, a &lt;em&gt;white&lt;/em&gt; value to the &quot;left&quot; of another &lt;em&gt;white&lt;/em&gt; value at the start might wind up to the &quot;right&quot; of it at the end. The sort is linear in &quot;time&quot; as mentioned above. It is also linear in comparisons between values and linear in exchanges. If you double the length of the array you (roughly) double the time, the number of comparisons, and the number of exchanges. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that you try to develop the algorithm using invariants and post-conditions as explained in the book, rather than just finding it online and reading it. (It is an exercise in the book, actually). You will learn something important. The algorithm is effectively a single scan of the array (hence linearity), but not the scan you normally see. That is the &lt;em&gt;magic&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-22T11:14:31.203" LastActivityDate="2018-06-22T11:14:31.203" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4861" PostTypeId="2" ParentId="1106" CreationDate="2018-06-02T11:03:24.293" Score="1" Body="&lt;p&gt;I would start by ensuring that you have a system with a good command line: Such as Gnu/Linux (A implementation of Unix, with freedom). It is also Free Software. While using it you may discover some piece of software, that you would like to improve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could do what I did at Uni. We were asked to re-implement the basic Unix tools: cat, ls, grep, etc, this is good practice, and a good place to start. It will also help you learn about what Unix can already do. (What can be a 3 month project on windows, can sometimes be a single line of shell code in Unix.)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-06-02T11:03:24.293" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4862" PostTypeId="2" ParentId="3210" CreationDate="2018-06-03T18:22:06.893" Score="1" Body="&lt;p&gt;Well I couldn't help but notice that this seems something you believe to be interesting to him. Not something he has sent some kind of signal to you that he desires to learn it. And I understand and that reminds me of a situation long ago with a cartoon from a book - now a famous movie - that my dad used to read. Tin Tin!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I remember very well him coming to me one day after work. He had gone through a place to get some tapes he rented (long time ago LOL). And he told me how awesome Tin Tin stories were, and me as a kid in the 90's I was more interested in Anime, or whatever from Japan, and didn't give too much attention to that tape. Than I saw his sad face because me and my brother didn't watch the cartoon series (or some of the episodes that were in the tape). Than I decided to give it a try. Then did my brother. Bottom line; we loved it! Why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It had adventure, travel, cultures and a bunch of things we enjoyed, but we didn't know. And even though my father had told us about that, we didn't believe it or paid too much attention till we saw that ourselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So from my personal experience, I believe it &lt;strong&gt;WOULDN'T&lt;/strong&gt; be a good idea to say or throw something at him like &quot;Look at it!&quot; or &quot;Give it a try!&quot; but something more subtle such as.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Trying to first build a dialogue with him so you can understand what he likes and don't like. Hear his complains (probably at that age you'll hear something like &quot;no one listens to me [LOL]&quot;.) and from there build a stronger bond that enables you two to exchange ideas based on a friendship.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What made me watch the Tin Tin tapes, wasn't the cartoon itself but the bond and friendship I had with my father. I guess if I had just watched it I wouldn't like it (at the time). But because we communicated and what he said was what I saw that impressed me. Therefore I had a positive view about Tin Tin. That open dialogue was what made me listen to him and try something out of my scope (even though it wasn't that out, much like your situation I believe.). &lt;strong&gt;The value of our dialogue (relationship) is what made me value his words!&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When addressing the issue don't start the sentence with &quot;This is where you can get in life&quot; but something more subtle when approaching the subject as &quot;Those are some stuff you can do. Now it's up to you.&quot; Teenagers are usually in a moment in their lives where they are trying to empower themselves and find their own solutions (that's why dealing and proposing to kids some times are easier). They don't wish for much interference. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Much like counseling you are not taking the decision to the person, you are just showing the path to where the person want to get (or that you think it is interesting for the person). By doing that you have the possibility to show coding as a fun, exciting and interesting thing for him, without saying a word and just letting him coming to that conclusion (implied message). Maybe after a while you might want to ask how things are going with coding if he took interest at all. Maybe he won't listen to you now, just a few years later (that happens too). However if that initial bond is built you have the space to throw that into the dinner table. And even if you aren't able to get him to code now. As your relationship builds and this becomes a constant topic of conversation eventually he will give it a try. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Those ideas above come also from my experience and learning how to deal with teens as a teacher (but not coding though) and my personal one described above. It is some times a hard task to propose things to people close to us if dialogue hasn't been properly established. And I also hear complains about that on a regular basis . So I would focus on that first. &lt;em&gt;Dialogue and relationship&lt;/em&gt;; and coding will be the bonus of that and will probably come naturally as you guys talk. Rather than a fixed one point (&quot;here is the solution, bing!&quot;), you are actually targeting at a process rather than to a simple platform that might be interesting for him. And I am sure you guys will find the tools together as he advances with coding etc.&lt;/p&gt;&#xA;" OwnerUserId="5318" LastEditorUserId="5318" LastEditDate="2018-06-03T18:39:39.977" LastActivityDate="2018-06-03T18:39:39.977" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4864" PostTypeId="1" CreationDate="2018-06-04T13:58:44.023" Score="2" ViewCount="216" Body="&lt;p&gt;I am reading this book published ten years ago and it says that chatbots can be very useful in helping students with course details and to break the ice. I am not familiar with chatbots, so I have started to build my own &quot;personal assistant&quot; using DialogFlow, but I would like to hear about strategies for using chatbots, particularly in CS education.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems best to make good use of the very things that exist and are upcoming in the field in order to teach it in a more engaging way. What has worked and not worked (since this old book was published)? Where can I find out more? Maybe one lesson could be to build a chatbot, as a demo or individual project.&lt;/p&gt;&#xA;" OwnerUserId="5342" LastEditorUserId="1293" LastEditDate="2018-06-04T23:54:19.330" LastActivityDate="2018-06-12T07:15:25.160" Title="How can Chatbots be useful in CS education?" Tags="|student-motivation|resource-information|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4865" PostTypeId="2" ParentId="4864" CreationDate="2018-06-04T17:41:32.577" Score="1" Body="&lt;p&gt;There are a number of questions being asked here. Probably too many. As to the question about where you can learn more, there have been a hundred or so books published on chatbots in the past three years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As to the question about whether it is worth having students build such a thing, the answer, of course, is yes. Students should build. It might be more than one lesson, however. They will learn from this as they should learn from building any new thing. If it excites them, all the better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the leading question is about the advisability of &lt;strong&gt;using&lt;/strong&gt; a chatbot as an educational tool. I'm going to give a lot of reasons why this is problematic, though none of them is probably definitive. I think a case could be made for the use provided that the thing can be built to answer all of the objections below. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first issue to address is &lt;em&gt;why do it&lt;/em&gt;. How would it be better than other available resources, such as wikipedia. While Wikipedia is not reliable on some topics (politics, celebrities,...) I've found it very useful in most technical subjects including math and CS. In fact, doing a bit of research on a question is much more valuable to a developing mind than just getting an answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second, possibly more important question, is &lt;em&gt;how reliable can you make it&lt;/em&gt;. Students need to get correct answers to their questions. A naively designed chatbot might be positively harmful if it gives poor advice. Even if it gives good advice, that advice might not be consistent with the course goals in which it is used. I think that it is an immense problem to test the reliability of any AI or AI-like program. I don't think that any AI can (or should) be used unless very significant resources are put in to validating it. That might not be possible at the scale of an individual course in CS, especially as such courses differ in time and by locale. Even the commercially available chatbots, backed by major corporations, sometimes give harmful advice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third concern I have is that, in fact, not all student questions &lt;em&gt;should&lt;/em&gt; be answered. Or at least not answered immediately or completely. The purpose of education is not to get answers, but to encourage mental and personal growth. Sometimes an experienced teacher will send a questioning student back to the workstation to think more deeply about things before answering, knowing that the student can do it and will learn something in the attempt. More often than that, a good teacher will give a minimal answer - a hint - encouraging the student to fill out the explanation through some grunt work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the last issue, above, is very serious. Education is a subtle business. It is the development, ideally, of a relationship between a student and an educator. That relationship needs to be nurtured and needs the knowledge of the student and her/his needs that only a supportive teacher can properly provide. Yes, I know that mass education today gives up some (even a lot) of that ideal, but until we can build &lt;a href=&quot;https://en.wikipedia.org/wiki/R._Daneel_Olivaw&quot; rel=&quot;nofollow noreferrer&quot;&gt;R. Daneel Olivaw&lt;/a&gt;, we need to approach this with extreme caution. Note also that &lt;a href=&quot;https://en.wikipedia.org/wiki/Socratic_method&quot; rel=&quot;nofollow noreferrer&quot;&gt;Socrates&lt;/a&gt; understood all of this about six thousand years ago and that the Socratic Method was developed partly in opposition to the idea of the Oracle at Delphi, which provided only answers. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-04T18:02:18.793" LastActivityDate="2018-06-04T18:02:18.793" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4866" PostTypeId="2" ParentId="4864" CreationDate="2018-06-04T18:48:37.553" Score="1" Body="&lt;p&gt;Chatbots are generally used to answer simple questions and make people feel comfortable. The side effect of this is that people do not need to take time to answer simple questions. So, anything that could reasonably be in a document or database could be given by a chatbot as an answer to a question from a student, something like: &quot;what is the percentage of the course grade of the next test?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a slippery slope when it comes to inferences. A common one is the &quot;this / next&quot; problem. Did the question &quot;next test&quot; refer to the test being given &lt;em&gt;today&lt;/em&gt; (which a human might call &quot;&lt;em&gt;this&lt;/em&gt; test&quot; or the one next week? People trip over these all the time and it leads to a lot of missed freeway exits, among other things. Perhaps the chatbot would need to verify what was being asked, putting it ahead of the vast number of people who assume, or even just never think of alternate interpretations before answering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the chatbot could explain how to write a computer program, then I think that the simple answer is to stop teaching programming, as it would no longer be necessary. But I wonder what an AI would think is best for people? After it realized what the Zeroth Law of Humanity is (&lt;em&gt;every man for himself&lt;/em&gt;) perhaps it would become better at everything than humans are, or maybe it would figure that what was best for humanity long-term is for it to self-destruct, to allow us to grow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I guess we should build an AI and ask it what it would do. (Hypothetically, of course.)&lt;/p&gt;&#xA;" OwnerUserId="5343" LastActivityDate="2018-06-04T18:48:37.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4867" PostTypeId="1" CreationDate="2018-06-04T22:39:21.773" Score="1" ViewCount="238" Body="&lt;p&gt;Can anyone suggest some good textbooks on optimization for MSc level? Books with more concrete applications and examples on real problems would be more appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am more interested in algorithm optimization techniques rather than something more theoretical like computability theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="5344" LastEditorUserId="1293" LastEditDate="2018-06-06T17:28:13.647" LastActivityDate="2018-06-06T17:28:13.647" Title="Textbook on Optimization" Tags="|resource-request|self-learning|textbook|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4868" PostTypeId="2" ParentId="4867" CreationDate="2018-06-05T00:13:37.213" Score="3" Body="&lt;p&gt;My standard answer for this is the following, copied from &lt;a href=&quot;https://cseducators.stackexchange.com/a/4859/1293&quot;&gt;another answer&lt;/a&gt; I've given here.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If you want a thorough study of how to approach and develop algorithms, get a copy of:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Gries, The Science of Programming&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The book will change how you think about algorithms and how they are developed. One of the key ideas is algorithm development from loop-invariants along with pre- and post-conditions. There is a science (hence the name) of modifying post-conditions in order to develop a loop and its invariant.&lt;/p&gt;&#xA;&lt;p&gt;One of the magical problems in the book is a linear time sort of an arbitrary array that contains only three distinct values (Dutch National Flag). It generalizes to a linear time sort of an array containing a finite number of distinct values.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It shows algorithm development in a way that results naturally in optimized algorithms.&lt;/p&gt;&#xA;&lt;p&gt;However any non-trivial book on algorithms should discuss optimization and the various ways it is measured (space, time, average, best case, worst case, ...). Books advertised as &amp;quot;introduction to algorithms&amp;quot; may be a bit shallow, of course.&lt;/p&gt;&#xA;&lt;p&gt;The gold standard, of course, is the multi-volume &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Art of Computer Programming&lt;/a&gt; by Donald Knuth. The first chapter of the first book is a nearly complete treatise on the required mathematics. In this series, algorithms are presented in a specially constructed assembly like (very low level) language. The Gries book also uses a specially constructed language for presentation, but it is at about the level of Pascal  or C.&lt;/p&gt;&#xA;&lt;p&gt;However, if you are interested in &lt;em&gt;Functional Programming&lt;/em&gt; (Scheme) instead, you want to start with &lt;a href=&quot;https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Structure and Interpretation of Computer Programs&lt;/a&gt; by Abelson, Sussman and Sussman. While this book will teach you deep concepts of algorithms, it might not be quite in the way you expect as it doesn't focus explicitly on optimization, treating optimization as more of an organic property of algorithms.&lt;/p&gt;&#xA;&lt;p&gt;In fact, none of these books start with some &amp;quot;algorithm&amp;quot; and say &amp;quot;now, let's optimize it&amp;quot;. I don't think that is a viable approach. Instead, algorithms are developed from the start to optimize on some criterion. But they are interesting partly because it is generally impossible to optimize on more than one dimension simultaneously. So most algorithms involve trade-offs of some kind. Often it is time vs space though there are other possibilities.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-06-05T11:09:41.977" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4869" PostTypeId="2" ParentId="4858" CreationDate="2018-06-05T13:44:37.493" Score="4" Body="&lt;p&gt;I have seen two approaches that work:&lt;/p&gt;&#xA;&lt;h1&gt;Unplugged:&lt;/h1&gt;&#xA;&lt;p&gt;Leave the computer, and design the algorithm. Use white boards, acting, puppets, physical objects, etc.&lt;/p&gt;&#xA;&lt;p&gt;(This method is best used when you don't yet know what you are trying to achieve.)&lt;/p&gt;&#xA;&lt;h1&gt;Use Test Driven Development with Transformation Priority.&lt;/h1&gt;&#xA;&lt;p&gt;(This method is best used when you know what you are trying to achieve, but don't know how to get there.)&lt;/p&gt;&#xA;&lt;h2&gt;Test driven&lt;/h2&gt;&#xA;&lt;p&gt;The code is written using test driven design: One test at a time.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No production code is written except to allow a failing test to pass. (failing to compile is a failing test.)&lt;/li&gt;&#xA;&lt;li&gt;No more code is written than necessary. That is stop working on the production code when it passes.&lt;/li&gt;&#xA;&lt;li&gt;Stop working on tests, when in fails (as soon as you have a failing test, stop working on it, and start on fixing the production code, so that the test passes).&lt;/li&gt;&#xA;&lt;li&gt;Iterate between writing test code, and writing production code. As soon as the code you are working is working, then switch. For production code working means, to make the test pass. For test code working means to highlight a deficiency in the production code, by failing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;TTD is like a battle, with an alternation of each side (test and production code) winning. The tests want the tests to fail, to highlight a deficiency in the production code. The production code wants the tests to pass. First the tests are wining, they show a deficiency, then the production code is fixed and it is winning. ( TDD implements alternating-repetition from &lt;a href=&quot;https://cseducators.stackexchange.com/a/2821/204&quot;&gt;Christopher Alexander's 15 properties&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;h2&gt;Transformation Priority&lt;/h2&gt;&#xA;&lt;p&gt;Transformation Priority guides you as to which transformations to use, to make the test pass. Some transformations lead to better algorithms than other transformations.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;({} → nil) no code at all → code that employs nil&#xA;(nil → constant)&#xA;(constant → constant+) a simple constant to a more complex constant&#xA;(constant → scalar) replacing a constant with a variable or an argument&#xA;(statement → statements) adding more unconditional statements.&#xA;(unconditional → if) splitting the execution path&#xA;(scalar → array)&#xA;(array → container)&#xA;(statement → tail-recursion)&#xA;(if → while)&#xA;(statement → non-tail-recursion)&#xA;(expression → function) replacing an expression with a function or algorithm&#xA;(variable → assignment) replacing the value of a variable.&#xA;(case) adding a case (or else) to an existing switch or if&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;em&gt;note the items, and the order, are not set in stone. We may discover improvements.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;see:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Transformation_Priority_Premise&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Transformation Priority Premise&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://vimeo.com/97516288&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://vimeo.com/97516288&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-08-05T16:49:08.957" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4870" PostTypeId="1" CreationDate="2018-06-08T10:03:22.580" Score="2" ViewCount="113" Body="&lt;p&gt;I want to learn about Computers and Electronics and presently don't hold any kind of degree in the same. My urge to learn is entirely driven by my interest and curiosity for these subjects. I will be teaching my self at my own pace using materials available online.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But being a newbie to all this, and as these fields are very broad, I find it difficult to find where to start. I would like to do everything systematically and not just randomly picking up stuff, because all it does is to create loopholes and confusions. I would like to gain some insight regarding the same from your past experiences at learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my only question is, from where should I start my learning process i.e. a kind of topic list which I must follow? For instance, what do university programs teach, in what order, and why do they prioritize the way they do?&lt;/p&gt;&#xA;" OwnerUserId="5351" LastEditorUserId="613" LastEditDate="2018-07-31T18:05:17.780" LastActivityDate="2018-07-31T18:05:17.780" Title="Becoming a master from a newbie at Computer Science and Electronics" Tags="|resource-request|textbook|careers|" AnswerCount="2" CommentCount="6" ClosedDate="2018-06-08T20:11:24.913" ContentLicense="CC BY-SA 4.0" />
  <row Id="4871" PostTypeId="2" ParentId="4870" CreationDate="2018-06-08T12:18:43.240" Score="2" Body="&lt;p&gt;I am glad to see your question, because 40 years ago, I was a child who was extremely interested in electronics, radio and computers, and the resources seemed much more limited then. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say, because the field is so broad, it does not matter where you start. Pick something that interests you and go as far as you can with it. My first interest was in building an amplifier to use with a microphone so I could make loud noises (your personal goal does not have to make sense to anyone else) so I read books about transistor amplifiers in hopes of finding a simple design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggeztions are:  &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Find an Amateur Radio group and participate  &lt;/li&gt;&#xA;&lt;li&gt;build some simple kits  &lt;/li&gt;&#xA;&lt;li&gt;write some simple programs  &lt;/li&gt;&#xA;&lt;li&gt;use the relevant Stack Exchange sites  &lt;/li&gt;&#xA;&lt;li&gt;choose some specific goals or projects  &lt;/li&gt;&#xA;&lt;li&gt;&quot;&lt;em&gt;Nevah, nevah, nevah give up&lt;/em&gt;!&quot; (Winston Churchill)  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Don't worry if you don't get to your specific goals - I never built that amplifier - you will learn so much on the way, and become a specialist in something. I eventually became an expert in small transmitting loop antennas, C and data communications. &lt;em&gt;Qapla'!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-06-08T12:18:43.240" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4872" PostTypeId="2" ParentId="4870" CreationDate="2018-06-08T14:15:08.963" Score="2" Body="&lt;p&gt;We can't help you find a topic.  You must focus yourself on a single point of entry.  There are already high-quality, pre-arranged curriculums available in every topic at a high level, and they are called &lt;em&gt;textbooks&lt;/em&gt;.  See if you can find one that is an introduction to the field that you're looking at.  You might be surprised at how close of a match you can make.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I strongly suggest that your first step is choosing a textbook.  A textbook is an essential guide for a self-learner, even if you can't learn from a textbook.  Why?  Because a textbook doesn't just explain the material.  A good textbook &lt;strong&gt;organizes&lt;/strong&gt; and lays out the material.  A textbook guarantees that you go through in a reasonable order, that you build on the knowledge that you've gained, and that your exposure is pretty thorough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't learn well from textbooks, then use it only as a sketch of what you should be covering.  You can glance through the first chapter, scan over the topics, and go to Google or YouTube to learn the material itself.  You'll know you've successfully learned the material in a chapter when you can scan over the text and it makes sense.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-06-08T14:15:08.963" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4873" PostTypeId="2" ParentId="4401" CreationDate="2018-06-08T17:16:37.773" Score="1" Body="&lt;p&gt;Wow. I feel old. Trying to imagine &quot;the once and future world&quot; without people reading books, especially textbooks. I guess there was a golden age in the past century where books were distributed, read, referred to, and useful. Since that is how I learned - with knowledgeable humans in short supply and no computer resources whatsoever - I have a hard time imagining a subject taught without textbooks. I have always leaned heavily on them when I taught, including the accessory files and question banks. Maybe that is why my teaching failed: people don't read books now? Why would they not want to learn from an expert though?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People have learned without textbooks, or often even being able to read, for almost the entire time there have been people. So it is time again to teach by demonstration, mentoring and especially apprenticeship.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a textbook for my course did not exist, it would be necessary for me to invent it. I simply cannot see any other way to collect the relevant knowledge together in an organized way. Put the textbook online, in the form of slides or a Learning Management System, but it would still be there, a linear sequence of information that will not change or get lost. Even if people cannot read, there could still be a set of images. No 'textbook' == no learning, because people do not retain everything the first time they hear it.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-06-08T17:16:37.773" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4874" PostTypeId="2" ParentId="4781" CreationDate="2018-06-10T05:35:17.733" Score="1" Body="&lt;p&gt;Children like quizzes. That means they like solving problems that get them appreciation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my suggestion based on my experience:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Set up an IDE for them so that they can simply type and run. &lt;/li&gt;&#xA;&lt;li&gt;Start with simple, short, string processing programs that show immediate result. &lt;/li&gt;&#xA;&lt;li&gt;For instance, teach such a simple string processing program first. Let them code a simple variation that they can run and show you. &lt;/li&gt;&#xA;&lt;li&gt;Show appreciation. This is the most important part.&lt;/li&gt;&#xA;&lt;li&gt;After simple string processing, go to the next level, for example, loops to give count, capitalize, read text files, etc. If the language is already advanced like Java, lists are even more interesting then strings.&lt;/li&gt;&#xA;&lt;li&gt;The main point is, stay away from Factorial and Math Series type &quot;dry&quot; examples that text books often start with. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;IMHO, string processing examples are the most interesting that one can connect to quickly. Math problems like finding maximum, minimum, factorial, etc can be boring for a beginner. If you have to introduce integers, better let them count interesting characters in strings like vowels, spaces. More complex examples can be counting words. The idea is to get them interested enough to ask for more problems. Once that happens, search for and give them a good book or course that starts with practical examples straight away. Then there is no stopping them.&lt;/p&gt;&#xA;" OwnerUserId="5355" LastActivityDate="2018-06-10T05:35:17.733" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4875" PostTypeId="1" CreationDate="2018-06-11T12:02:23.543" Score="7" ViewCount="384" Body="&lt;p&gt;In a recent blog post &lt;a href=&quot;http://www.cs.uni.edu/%7Ewallingf/blog/archives/monthly/2018-06.html#e2018-06-01T15_05_14.htm&quot; rel=&quot;noreferrer&quot;&gt;Eugene Wallingford&lt;/a&gt; says that when teaching:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I frequently pose a problem for them to work on for a few minutes before we look at a solution, or several candidates, as a group. All too often some students look at the problem, think it's too difficult, and then just sit there waiting for me to show them the answer. This approach often results in them feeling two kinds of failure: they didn't solve the problem, and they don't even appreciate the solution when they see it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There is a double problem here, The first is that some students don't attempt to solve a difficult problem - giving up early. This leads to the second problem of not recognizing the beauty of the solution once they see it.&lt;/p&gt;&#xA;&lt;h3&gt;How can we encourage/enforce/demand/cajole students into making a good faith effort on a difficult problem without making them feel defeated at the end?&lt;/h3&gt;&#xA;&lt;p&gt;Often the exercises we give students have a learning objective that is more important than the actual solution to the problem. Learning is to be valued over solutions in a teaching environment. But students don't always see that and can be led to think of themselves as failures even when they work hard toward a solution (&lt;a href=&quot;https://cseducators.stackexchange.com/q/2985/1293&quot;&gt;Authenticity Bias&lt;/a&gt;). We need to find ways to avoid that outcome while we encourage hard thinking.&lt;/p&gt;&#xA;&lt;p&gt;The big idea here is that the effort to find a solution, even if it goes down an unprofitable path, will lead to learning. The practice of &amp;quot;stretching your brain muscle&amp;quot; is wort pursuing.&lt;/p&gt;&#xA;&lt;p&gt;One &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1479171824&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; was originally named Kobayashi Maru after a training exercise that was central to a certain &lt;a href=&quot;https://en.wikipedia.org/wiki/Kobayashi_Maru&quot; rel=&quot;noreferrer&quot;&gt;Star Trek&lt;/a&gt; episode. In this pattern, the idea is to give students an impossible task to give them practice in very hard problems, possibly requiring orthogonal thinking. (The pattern was later re-named to &lt;a href=&quot;http://www.pattron.net/Pattern.aspx?Id=155&quot; rel=&quot;noreferrer&quot;&gt;Mission Impossible&lt;/a&gt;). That isn't exactly the same issue here, where we are looking to encourage deep thinking on deep but solvable problems.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;This issue is not just about programming. It can be anything. For example a complex database design issue or a complex retrieval. Or in Compilers, some optimization issue that needs to run fast. Lots of opportunities for hard problems in any class.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-09T20:57:08.337" Title="Courage to Attack Difficult Questions" Tags="|student-motivation|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4876" PostTypeId="2" ParentId="4875" CreationDate="2018-06-11T13:34:17.443" Score="2" Body="&lt;p&gt;If someone was not participating, I would talk with them privately first. Often students will perk up if they intereact with the instructor. They know that at least one person is &quot;on their side, even when they were wrong&quot; (to paraphrase a Taylor Swift song) and so not be so concerned about being 'wrong' in the future.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only solution I can come up with is personal interaction. I don't think that a teaching pattern or curriculum will solve it. The courses I did best in were because I loved the instructor, and second best was when the instructor paid some attention to me (&lt;em&gt;outside&lt;/em&gt; of the classroom situation, which would have been a disaster) and so I felt that I owed him some effort.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2018-06-12T14:43:41.853" LastActivityDate="2018-06-12T14:43:41.853" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4877" PostTypeId="2" ParentId="4875" CreationDate="2018-06-11T13:42:23.737" Score="6" Body="&lt;p&gt;I can suggest a few approaches that might be fruitful, depending on your students. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Make it &lt;em&gt;Social&lt;/em&gt;. Instead of having the students work individually on the problem, have them work in pairs or groups. Let them discuss with each other ideas, even off-the-wall ideas around the problem and its possible solution. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make it &lt;em&gt;Competitive&lt;/em&gt;. This is a situation in which long lasting groups might be brought to bear. Group the students in small groups (2-5) and pose the problem to the groups. Let them discuss the solution in their groups for a few minutes. At the end, award a few points to the group with the most &quot;interesting&quot; answer. Or have the students themselves vote on the &quot;winner&quot;. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make it &lt;em&gt;Fun&lt;/em&gt;. This will take more work, but instead of presenting the problem in technical terms present it as a problem in some, possibly stupid, imaginary context. Something from a fairy tale or a common metaphor related to the problem. Let it be a bit creative on an orthogonal dimension as well as the technical dimension. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make it &lt;em&gt;Weird&lt;/em&gt;. This is a bit risky, but you could possibly &quot;reward&quot; the &lt;em&gt;worst&lt;/em&gt; possible answer to the question in some way. Often just cheering, rather than points, might be enough. The idea, is to get them to think about the problem and this may work out. Related is to reward the longest list of not-solutions, especially if the students can tell you why the proposal fails. I once actually impressed the examiners (for an oral preliminary exam for the doctorate) by explaining why my first &quot;solution&quot; would fail, even though I didn't come up with the correct answer. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I'll note that this is about hard problems so we can't expect that many, if any, students will come up with an answer that Dijkstra, perhaps, was the first to give. The important thing is engagement and learning. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-07T13:01:28.893" LastActivityDate="2018-10-07T13:01:28.893" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4878" PostTypeId="2" ParentId="4319" CreationDate="2018-06-11T17:37:26.697" Score="1" Body="&lt;p&gt;The OP lists &quot;two motivations in life&quot;, which perhaps are universal. If someone is interested &quot;because they enjoy it&quot; (reason #1), then that would play out regardless of money being involved, or social support or anything else. This means that the subject is a &lt;strong&gt;primary interest&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they are interested &quot;because they have to make a living&quot; (reason #2) then that means the student is learning something &lt;strong&gt;in service to some other goal&lt;/strong&gt;. We have seen this issue come up in other questions and answers. It is the Great Divide of motivation, and people on either side cannot seem to understand the folks on the other side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am pretty sure that every sort of learning is either inherently interesting to that particular learner, or is being learned to further something &lt;em&gt;else&lt;/em&gt; that is the actual interest. The problem that I have is to determine &lt;strong&gt;how to instill a primary interest?&lt;/strong&gt; For some (like me), the subject must be interesting for its own sake, for others, some external motivation is good enough. Ordinary school subjects must be taught regardless of interest because they form the basis for further learning. But non-ordinary subjects, like Programming or Computer Science, should only be taken up by those who either are inherently interested, or can clearly draw a path through them to another goal. They should not be part of the general curriculum, pushed on everyone as 'literacy'. It is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps by breaking down the issue of Motivation in to these two sides, we can make some headway on it?&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-06-11T17:37:26.697" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4879" PostTypeId="2" ParentId="4875" CreationDate="2018-06-11T20:01:10.717" Score="7" Body="&lt;p&gt;I think this is a pretty common problem, especially for novice programmers. They're given an assignment and don't know how to start- in fact, they don't even know what it's asking!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think this is due to a lack of &quot;courage&quot; - it's because they don't have the framework required to start breaking problems down yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think step one is to normalize this a bit, and specifically mention that this is a common way to feel. Then walk them through the process of getting over that initial hurdle. What behavior do you want them to exhibit? Model that behavior for them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to encourage people to &lt;a href=&quot;http://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;break their problem down into smaller steps&lt;/a&gt; and take those steps on one at a time. There are a lot of approaches here, including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Restate the problem in your own words.&lt;/li&gt;&#xA;&lt;li&gt;Break the problem down into logical sub-steps.&lt;/li&gt;&#xA;&lt;li&gt;Identify your input and output.&lt;/li&gt;&#xA;&lt;li&gt;Think about how you'd do this without a computer, with a piece of paper and a pencil.&lt;/li&gt;&#xA;&lt;li&gt;Do the absolute smallest thing you know you need to do, like open your IDE, or write the class or function declaration.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Another thing that I think is important is demonstrating this behavior yourself. A lot of lectures and tutorials cover the &lt;a href=&quot;https://en.wikipedia.org/wiki/Happy_path&quot; rel=&quot;nofollow noreferrer&quot;&gt;happy path&lt;/a&gt; of developing code. Students see how easy it is when you do it, and then get home and don't know how to start and think that must mean they're terrible programmers. In fact every single programmer feels this way, so it's important that they know this. So I recommend doing a live demo of working through a problem, including stuff like using Google, looking stuff up in the reference, making mistakes, debugging, etc.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-08-09T16:28:03.723" LastActivityDate="2018-08-09T16:28:03.723" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4880" PostTypeId="2" ParentId="4864" CreationDate="2018-06-11T21:27:11.053" Score="2" Body="&lt;p&gt;I'm using chatbots to discuss a variety of topics with 14 to 16-year-old high school students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By &quot;using&quot; I mean that they are the subject of instruction, not a study aid / instrument for the students to use to get automated answers to frequent questions and things like that. So that's probably not what the book you mentioned talks about, but I'll go on anyway because your title asks the more open&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can chatbots be useful in CS education&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Chatbots are a great topic in computer science education because&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Everybody knows about them - teenagers know what chatting is and have first-hand experience of doing it, and most students have either encountered a chatbot already or they've heard about Siri and compatriots, which can be framed as chatbots for the purposes at hand.&lt;/li&gt;&#xA;&lt;li&gt;There are chatbots who try to mimick humans, so you can use them to discuss the Turing Test with your students&lt;/li&gt;&#xA;&lt;li&gt;Simple chat bots which simply look for some combination of words in the input phrase are easy to build using scripting languages such as Python, and therefore can be used to give the students a first feeling for what needs to be done in order for a computer to correctly identify the meaning of a sentence in a human language. This can easily be extended into a discussion about whether computers can &quot;understand&quot; us.&lt;/li&gt;&#xA;&lt;li&gt;Coding simple chat bots is easy enough so that it can serve as a first small project for beginners learning to program&lt;/li&gt;&#xA;&lt;li&gt;In my classroom experience, teenagers love spending some time writing simple chat bots and getting them to provide (often somewhat rude) answers to things their peers type in, so it's a fun topic, too. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I agree with Buffy that using chatbots as a study aid is much, much harder to get right, and I wouldn't try that unless the domain was very, very well specified.&lt;/p&gt;&#xA;" OwnerUserId="1336" LastEditorUserId="1336" LastEditDate="2018-06-12T07:15:25.160" LastActivityDate="2018-06-12T07:15:25.160" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4881" PostTypeId="2" ParentId="4858" CreationDate="2018-06-12T08:59:31.320" Score="9" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Homework problems in algorithms classes often involve finding clever tricks that the professors find elegant or interesting&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That seems like a strange way of teaching algorithms. It shouldn't involve trying to make the students recreate brilliant ideas from scratch (most people won't re-invent Dijkstra's algorithm when asked to find the shortest path through a graph), but rather teaching them which building blocks exist, showing them how (simple) problems can be solved using these building blocks, and then offering them related problems whose solutions are similar.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;However, it seems like most of the students who solve these problems well are students who are familiar with the tricks already, from prior experience.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In my mind, the thing your professors &lt;em&gt;do&lt;/em&gt; get right is the idea that algorithm design isn't a algorithm itself. I believe it &lt;em&gt;is&lt;/em&gt; to a large degree a question of experience. You build a repertoire of &quot;tricks&quot; that work, and then you apply them in new circumstances. What kind of &quot;tricks&quot;? An important aspect is about knowing what kinds of data structures fit the problem. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there a way to help students catch up on these tricks and tools without giving away the answers?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As I've said, I believe programming/algorithm design is a &lt;em&gt;craft&lt;/em&gt;, not a &lt;em&gt;science&lt;/em&gt;. Having mentioned Dijkstra, I don't believe in his approach to algorithm design. He was very methodical and mathematical and seems to have looked at algorithms as basically a mathematical problem to solve. While this is certainly true and often offers valuable insights when dealing with difficult problems, I don't think most people work like that. If programming is a craft, then it is best learned by &lt;strong&gt;imitation&lt;/strong&gt; and &lt;strong&gt;lots of practice&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, we don't have nearly enough time to let students practice, but one thing you &lt;em&gt;can&lt;/em&gt; do is tell them how important it is to look at how other people solved problems, and provide them with good resources they can use to learn by imitation. Here's a nice one: &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0596510047&quot; rel=&quot;noreferrer&quot;&gt;Beautiful code&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to actually answer your question: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure the students have a good working knowledge of the basics (e.g. how to iterate over a list, how to manipulate list entries etc)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Present a sequence of problems that lead up to the final problem. For the preliminary problems, explain what kinds of data structures are used and why, and how the algorithm operates on them.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Encourage the students to look at other people's code. Good candidates are algorithms which solve a certain problem in a way that is applicable to a lot of other domains. (For example, I first learned about atomic commits by reading a description of how subversion worked. This came in handy when I thought about how to implement database transactions. It was also closely mirrored in the way git builds hash trees, which again is closely mirrored by the bitcoin blockchain). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Finally, explain to them that you can just show them the way, but just like learning to play a musical instrument, or a sport, they'll have to invest their own time if they want to become any good. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1336" LastEditorUserId="1336" LastEditDate="2018-06-12T09:15:20.970" LastActivityDate="2018-06-12T09:15:20.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4882" PostTypeId="2" ParentId="4855" CreationDate="2018-06-12T11:53:22.877" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Not an (surprisingly very) annoying and trivial issue caused by bad historical choices for abbreviations.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You say that &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt; and &lt;code&gt;o&lt;/code&gt; are bad historical choices for abbreviations, but that's just your take. &lt;code&gt;u&lt;/code&gt; and &lt;code&gt;g&lt;/code&gt; are linked to the &lt;code&gt;uid&lt;/code&gt; and &lt;code&gt;gid&lt;/code&gt;, the &lt;strong&gt;user&lt;/strong&gt; and &lt;strong&gt;group id&lt;/strong&gt;, which are used as identifiers throughout a unix system (Note that &lt;code&gt;uid&lt;/code&gt; commonly refers to a &lt;em&gt;user id&lt;/em&gt;, while the alternative you might propose, &lt;code&gt;oid&lt;/code&gt; for &lt;em&gt;owner id&lt;/em&gt;, often refers to an &lt;em&gt;object id&lt;/em&gt;, so the original choice of &lt;code&gt;uid&lt;/code&gt; over &lt;code&gt;oid&lt;/code&gt;, or &lt;code&gt;u&lt;/code&gt; over &lt;code&gt;o&lt;/code&gt;, doesn't seem so bad to me)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion would be to talk about the Unix security model first (there are multiple users in a Unix system, each one is assigned a &lt;code&gt;uid&lt;/code&gt;, once he's logged in every process he starts runs under his &lt;code&gt;uid&lt;/code&gt; (don't mention &lt;code&gt;suid&lt;/code&gt; etc in the beginning). You can add group memberships to this explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have a basic understanding of the security model, remembering what &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt; and &lt;code&gt;o&lt;/code&gt; stand for in the file permission mask becomes trivial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the meantime maybe it would help if you only ever talked about a &lt;em&gt;user owning&lt;/em&gt; a file (&quot;user&quot; and the verb &quot;owns&quot;, always together), but never of a file having an owner (note the absence of the word &quot;user&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;chown&lt;/code&gt; would then become &quot;change who owns the file&quot; instead of &quot;change owner&quot; (too bad the man page sabotages this).&lt;/p&gt;&#xA;" OwnerUserId="1336" LastEditorUserId="27" LastEditDate="2018-06-14T21:01:49.557" LastActivityDate="2018-06-14T21:01:49.557" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4883" PostTypeId="1" CreationDate="2018-06-13T14:35:55.827" Score="2" ViewCount="162" Body="&lt;p&gt;Many are now familiar with GBoard, the Google / Android predictive Keyboard. I don't actually know how it works. Obviously it must gather usage data on the device where it is being used, but it probably also includes a database of general usage patterns, downloaded initially and perhaps updated periodically. (Well, that is how I would do it.) In this way, it would be like a spellcheck database that let the user add (and subtract: &lt;em&gt;manger&lt;/em&gt; is not too good in a business context) words.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have long been brushing aside the obvious question of &quot;how does it do that?&quot;, but this morning as I was texting, I suddenly recalled the article in [Scientific American* (long ago, can't find it on the web) about &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Markov_chain&quot; rel=&quot;nofollow noreferrer&quot;&gt;Markov Chains&lt;/a&gt;&lt;/strong&gt; and a simple program called &lt;a href=&quot;https://en.wikipedia.org/wiki/Mark_V._Shaney&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mark V. Shaney&lt;/a&gt; that would learn and then output words in a sensible order. That is how it could work. It should be quite easy to store and compress such a simple database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The particular thing I am focusing on is how GBoard offers three word suggestions as I type, so that I can just pick words instead of typing the words in. The prediction is at the word level, not the letter level. What frustrates me is that it usually does not offer the proper tense for a word, making me type far more letters until the proper word shows up. For example: I want to type &quot;He has started on it&quot; and I type H and choose 'He' from the suggestions, then ha and pick 'has' then type sta and the suggestions are: start starts starting, none of which agree with &lt;em&gt;has&lt;/em&gt;. Why doesn't it go right to &lt;em&gt;started&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone implemented a similar project for analyzing and predicting or even uttering strings of words? It seems dead easy using Markov Chains. Do you think this would make a good project for using things like a 'dictionary' data structure to store words, and some kind of tree to encode the word association weights? Sounds like it would be very interesting to present-day students, already using the product.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The SciAm article mentioned is likely: Dewdney, A.K. (June 1989). &quot;A potpourri of programmed prose and prosody; Computer Recreations; computer-generated commentary&quot;. Scientific American. 260 (6): 122–125. doi:10.1038/scientificamerican0689-122. &lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2018-06-13T18:48:20.843" LastActivityDate="2018-06-13T18:48:20.843" Title="How to structure a Predictive Keyboard project similar to GBoard" Tags="|lesson-ideas|algorithms|cs-theory|data-structure|artificial-intelligence|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4884" PostTypeId="2" ParentId="4883" CreationDate="2018-06-13T17:54:36.533" Score="2" Body="&lt;p&gt;Markov Chains are great for putting out nonsense based on statistical data. However, a predictive keyboard that outputs nonsense isn't very useful. It needs much more context than a Markov Chain can produce. Such a program would base its next output entirely on the most recent entry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, a project to do something like the Mark V. Shaney program might be fun in an Introduction to Data Structures course. However, it is unlikely that students would have previously seen Markov Chains at that point in their studies so some background in that would also need to be incorporated. Markov Chains might be taught in a Discrete Math course, but that usually comes later. Some schools might teach these two courses in tandem, however, making it a bit more feasible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a project would, however, also have the advantage that the statistical basis (the Dictionary) used could introduce concepts of Big Data and how to process it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are correct that a predictive keyboard uses past data, but I'm pretty sure that it is based on a much more complex predictive model than could be provided by a Markov Chain. &quot;Predictive Keyboard based on Markov Chains&quot; is probably an oxymoron, though. You can do either or, but likely not both together. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-13T17:59:51.233" LastActivityDate="2018-06-13T17:59:51.233" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4887" PostTypeId="1" CreationDate="2018-06-16T10:17:16.320" Score="1" ViewCount="170" Body="&lt;p&gt;I was playing some logic puzzles, and was thinking that they would be good for students to program solvers, that can be plugged in to the game logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the quantities to make them useful, in order of importance, would be.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Free Software (Open Source): So that we have the freedom to use them how we want, to make changes, and to share our changes with others.&lt;/li&gt;&#xA;&lt;li&gt;Separation between UI and logic: So that we can replace the interface (UI), with a code.&lt;/li&gt;&#xA;&lt;li&gt;Model View Controller: to that we can have both the UI and the code solver, and a change in one will be reflected in the other.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Something that has good automated testing should pass point 2 (probably).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify: &#xA;I want programs(implementations) of puzzles where a human user is currently the solver, but that might be amenable to replacing that with an automated or AI solver instead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not thinking of real AI (i.e. strategy), but puzzle games such a sudoko, net-route, towers, black-box, magnets, (see &lt;a href=&quot;https://chris.boyle.name/projects/android-puzzles&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://chris.boyle.name/projects/android-puzzles&lt;/a&gt; ).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The concepts I am teaching is just programming. The makes are to add motivation. There may be other benefits, I am sure that it could help with logical thinking, but the main reason is just motivation / engagement.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-06-17T11:14:44.797" LastActivityDate="2018-06-17T11:14:44.797" Title="Looking for puzzle/game programmes, so students can write solvers" Tags="|resource-request|programming|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4888" PostTypeId="2" ParentId="4887" CreationDate="2018-06-16T12:29:02.000" Score="1" Body="&lt;p&gt;There is a fairly well known game called, alternatively, &lt;a href=&quot;http://www.cyningstan.com/game/150/hare-hounds&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hare and Hounds&lt;/a&gt; or the &lt;a href=&quot;https://boardgamegeek.com/boardgame/31271/french-military-game&quot; rel=&quot;nofollow noreferrer&quot;&gt;French Military Game&lt;/a&gt;. It is a two person game in which one player controls one piece (the Crook/Spy) and the other controls three pieces (the Police). The object is for the Police to &quot;trap&quot; the Spy. The board is a directed graph with limitations on movement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a well known solution for automating the Spy so that it plays optimally, though naively at first, learning from subsequent plays. I believe there is a known &quot;win&quot; for the Spy if it plays correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Java program for the automated version can be found at the &lt;a href=&quot;https://greenroom.greenfoot.org/resources/36&quot; rel=&quot;nofollow noreferrer&quot;&gt;Green Room&lt;/a&gt;. The implementation can use either arrays or Collections. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing that makes it interesting as a program is that the game is simple enough that a complete play (all positions of all players) can be captured in a very compact way, making it feasible to retain the complete history of plays. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The game and its solution are also discussed in detail in &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0985154306&quot; rel=&quot;nofollow noreferrer&quot;&gt;Beyond Karel J Robot&lt;/a&gt; by J Bergin. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-16T15:49:13.893" LastActivityDate="2018-06-16T15:49:13.893" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4890" PostTypeId="2" ParentId="4401" CreationDate="2018-06-17T20:02:00.113" Score="2" Body="&lt;p&gt;I prefer to use &lt;a href=&quot;https://en.wikipedia.org/wiki/Open_educational_resources&quot; rel=&quot;nofollow noreferrer&quot;&gt;Open Educational Resources&lt;/a&gt; (OERs) for a few reasons, but both &quot;roll my own from multiple resources&quot; and &quot;pick a single book - mostly&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The courses I teach most often (intro to linux admin, network services w/ linux) cover a lot of different subjects, so for those it is a &quot;roll your own/collect resources&quot; situation, simply because there aren't any books that do a fantastic job of Explaining It All about system installation, use, and management, networking, and multiple network services (dns, dhcp, samba, http, LAMP, email).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I've taught single-subject courses (intro to sql, web programming w/ php and sql, intro to java) I've selected single books, but I've made sure that they were either Freely available or available free of cost in the libraries' (college and local county) Safari subscriptions.  And even then, I still reference other available materials including specific sub-parts of some chapters from other books in the Safari system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think using OERs and creating your own collection of resources increases quality.  Using freely available resources I can point to what I consider to be the best explanation(s) or example(s) of concept A, even if that resource has nothing on concept B and poor information on concept C.  And I can point to the best resources for concepts B and C respectively.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And it certainly reduces costs for students.  I remember having to pay $400 for books for a single networking course where the resale value was close to zero due to the constant change of technology and the way courses were offered at my school.  And even with the Internet in its infancy ('97/98) I was able to find better explanations online than what the book provided.&lt;/p&gt;&#xA;" OwnerUserId="662" LastEditorUserId="1293" LastEditDate="2018-06-17T20:47:37.093" LastActivityDate="2018-06-17T20:47:37.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4891" PostTypeId="1" AcceptedAnswerId="4892" CreationDate="2018-06-18T12:27:10.413" Score="41" ViewCount="17388" Body="&lt;p&gt;Would a student's overall CS education benefit by having such a skill, and if so why not make it a required prerequisite? &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;An editor notes that there are three (at least) different ideas here that may be confused. &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Does the user hunt and peck searching for each key for each use?  &lt;/li&gt;&#xA;&lt;li&gt;Does the user look at the keyboard/hands rather than elsewhere?&lt;/li&gt;&#xA;&lt;li&gt;Does the user use (usually) nine fingers to type or three? &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Touch typing itself suggests using nine fingers and typing by &quot;feel&quot; without looking at the hands. But there are different combinations possible. In particular, some three finger typists don't really hunt and peck, having internalized the keyboard. Some may not need to look at their hands at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: &quot;Nine&quot; fingers as the left thumb is often not used at all. &quot;Three&quot; fingers as one of the thumbs is often used. &lt;/p&gt;&#xA;" OwnerUserId="1568" LastEditorUserId="-1" LastEditDate="2018-06-23T22:27:58.067" LastActivityDate="2018-11-16T19:00:00.570" Title="What advantages do students who learn how to touch type have?" Tags="|best-practice|" AnswerCount="15" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4892" PostTypeId="2" ParentId="4891" CreationDate="2018-06-18T12:42:55.923" Score="94" Body="&lt;p&gt;Actually, there are a lot of things that benefit a student in CS, such as a degree in Mathematics or Sociology. Likewise interpersonal skills that help a person work in groups. Others are too numerous to mention. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a true prerequisite is a block, preventing advancement if you don't have the skill, so no, it should &lt;strong&gt;not&lt;/strong&gt; be &lt;em&gt;required&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some data points. I was lucky enough to take a course in touch typing (on a typewriter) in about 1960. I was the only boy in the class intended for &lt;em&gt;girls&lt;/em&gt; who would likely become secretaries. Not especially enlightened, of course. But touch typing has benefited me most in writing rather than in programming, and any CS professional writes a lot, even if they aren't book authors. But there are technical reports, grant proposals, system documentation, etc. that makes typing skill useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I know a lot of professionals, who are also authors, who still use two or three fingers to type and it doesn't inhibit them. The world would be a poorer place if they were prevented from entering the field for the lack of such a low level skill. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, modern hand held devices don't adapt well to touch typing. On a phone, I usually use just one finger since the keys are too small and my fingers are too big for me to use even two fingers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, students should be &lt;em&gt;encouraged&lt;/em&gt; to type effectively, of course. But not as a block to advancement. Students should, of course, also be encouraged to develop good handwriting skills so that they can read their own hand-written notes. But that skill is being lost, unfortunately. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr: Prerequisites should be required only for &lt;em&gt;required&lt;/em&gt; things, not just helpful things.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll also note that it isn't &lt;em&gt;typing&lt;/em&gt; that makes programming hard. Neither is it typing that makes writing hard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if a student's typing skills are &lt;em&gt;so&lt;/em&gt; bad that they seem forced to used extremely short and uninformative names for entities, then they need to improve. Readability is required. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-18T18:19:20.670" LastActivityDate="2018-06-18T18:19:20.670" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4893" PostTypeId="2" ParentId="4891" CreationDate="2018-06-18T18:02:47.447" Score="6" Body="&lt;p&gt;Typing without having to look at your hands is amazingly convenient--I'd say much more important than using 10 fingers or typing fast -- My general feeling is that if its the human-keyboard interface that's slowing you down then you could probably be doing more thinking/refactoring and less typing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience you'd notice someone typing with two fingers though--it wouldn't look very professional, and if I were designing a course I might make typing a prerequisite just to ensure that people understood that and to help you get more practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS.  I took a typing class in high school (on non-electric typewriters!) but never learned to touch type until I spent a week with a towel over my hands to break the habit of looking at my fingers.&lt;/p&gt;&#xA;" OwnerUserId="1399" LastActivityDate="2018-06-18T18:02:47.447" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="4894" PostTypeId="2" ParentId="4613" CreationDate="2018-06-18T21:39:23.707" Score="1" Body="&lt;p&gt;Related questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/1394/2068&quot;&gt;Good datasets for intro CS courses?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/3962/2068&quot;&gt;Toy Databases for Class Examples/Homeworks&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are a few Stack Exchange sites you might want to check out:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://opendata.stackexchange.com/&quot;&gt;Open Data&lt;/a&gt;: Open Data Stack Exchange is a question and answer site for developers and researchers interested in open data.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://datascience.stackexchange.com/&quot;&gt;Data Science&lt;/a&gt;: Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://stats.stackexchange.com/&quot;&gt;Cross Validated&lt;/a&gt;: Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.kaggle.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kaggle&lt;/a&gt; also offers a bunch of example datasets and a bunch of real-world problems that can be used in a class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But taking a step back, you might want to teach the meta-lesson of finding data in the real world. There are a ton of APIs and open-source data repos out there, and finding them is a very important skill by itself- plus it give students a way to actually use their skills after the class ends.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So instead of just giving your students a flat file, have them come up with their own. Maybe they use an API from a product they use, like &lt;a href=&quot;https://dev.twitter.com/rest/public&quot; rel=&quot;nofollow noreferrer&quot;&gt;Twitter&lt;/a&gt;, &lt;a href=&quot;https://developer.spotify.com/web-api/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spotify&lt;/a&gt;, or &lt;a href=&quot;https://developers.google.com/youtube/&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube&lt;/a&gt;. If that's too advanced for the students to do, then maybe you spend a class coming up with the dataset together, with you writing the code and the students talking about what would be interesting to see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or just searching for &quot;XYZ datasets&quot; returns a ton of results. Have the students come up with datasets related to stuff they're interested in.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-06-18T21:39:23.707" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4895" PostTypeId="2" ParentId="4891" CreationDate="2018-06-18T23:07:04.070" Score="10" Body="&lt;p&gt;The primary (and arguably &lt;em&gt;only&lt;/em&gt;) benefit of touch typing when it comes to learning to code is efficiency.  In fact, other than some social benefits for people who are regularly dealing with others while typing, that's the only benefit period.  In that respect, it's no different from things like a Dvorak keyboard layout or a chording input device, it just speeds up how fast you can type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, this is arguably a significant benefit in a classroom setting, especially for note-taking, but a vast majority of that benefit is not specific to CS courses.  Put simply, it's helpful, but not to the point that it makes sense as a prerequisite.  In fact, getting better at programming can be a significant motivation for some people to learn to touch-type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give a more specific example, I didn't get truly good at touch typing until well after I learned to program.  Like many other American kids, I took typing classes in both middle school and high school.  Back then I was absolutely terrible at typing, being lucky if I could achieve even 10 words a minute.  There were two reasons for this, I didn't type regularly enough for the skills to stick, and I had little to no incentive to practice.  This started to change when I started to learn to program, although it wasn't until I started to learn languages I could do things that interested me with that I got really good at typing.  I actually know quite a few coders who are similar, they're good typists because they're programmers, not the other way around.&lt;/p&gt;&#xA;" OwnerUserId="2523" LastEditorUserId="2523" LastEditDate="2018-11-16T19:00:00.570" LastActivityDate="2018-11-16T19:00:00.570" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4897" PostTypeId="2" ParentId="4891" CreationDate="2018-06-19T05:56:18.690" Score="35" Body="&lt;p&gt;To answer the titular question:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, the advantage of touch typing is not the direct gain of time through typing faster.&#xA;That’s negligible since most programming and writing tasks involve much more thinking, researching, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, the advantage is due to touch typing working directly through your muscle memory¹ and not requiring you to actively think about it at all.&#xA;Due to this, it does not break your flow of thinking about programming, writing, etc. – which it would otherwise do all the time.&#xA;This is not only valuable in terms of speed, but it also makes the related tasks mentally less exhausting and removes subconscious psychological barriers.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&#xA;which seems to be generally accepted in scientific literature, e.g., &lt;a href=&quot;https://doi.org/10.1145/1280680.1280683&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt; (search for &lt;em&gt;muscle memory&lt;/em&gt;)&#xA;&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditDate="2018-06-19T19:20:53.190" LastActivityDate="2018-06-19T19:20:53.190" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="4899" PostTypeId="2" ParentId="4401" CreationDate="2018-06-19T13:59:40.020" Score="3" Body="&lt;p&gt;Requiring a book makes sense when:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The course is big enough, or vice versa, the book is small enough. If you plan to use 1/10 of the book in your course, maybe you should avoid using a book, or you should search for a smaller book&lt;/li&gt;&#xA;&lt;li&gt;The topic is well delimited within the scope of the book. There are courses too broad for a book, especially in our field. If you need 5 books to teach your course maybe it's better if you &quot;roll your own&quot;&lt;/li&gt;&#xA;&lt;li&gt;If the topic is new, the book should be new as well. You can't teach C++ if your book doesn't teach at least C++11. You won't be up to date with the industry at all)&lt;/li&gt;&#xA;&lt;li&gt;You will use it! I hate when they want us to spend +$60 dollars on a book used once in a while. If you require a book in your course, assign pages to read, read it together, refer to it... actually use it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You could start thinking about that first. If you can find a good book for your course, require it, because very often students won't remember/didn't have time to write down/didn't write down becase they were slacking off/etc. what you were explaining to them. A book is also fashionable. It's much more &quot;appealing&quot; reading a well written book than a bunch of essentially copy&amp;amp;pasted notations on a piece of paper (at least, IMHO). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing could be that requiring a book could help the best students to deepen the topics they are interested in. Example: you require a book on &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Design_Patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Design Patterns&lt;/a&gt;&quot;, you will cover a few of them in your course. An interested student could learn even more if he/she is curious about the ones you didn't cover. Or maybe your students will have to do a project where argument X is present, and they remember they had a book covering X.&lt;/p&gt;&#xA;" OwnerUserId="5388" LastEditorUserId="1293" LastEditDate="2018-06-19T14:15:24.713" LastActivityDate="2018-06-19T14:15:24.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4900" PostTypeId="2" ParentId="4891" CreationDate="2018-06-19T16:17:07.780" Score="9" Body="&lt;p&gt;I've always liked the saying&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Programming is more thinking than it is typing&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Sure, touch typing &lt;em&gt;can&lt;/em&gt; be a useful skill to have but I wouldn't want it to be a &lt;em&gt;requirement&lt;/em&gt; for a degree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I personally believe that being able to type quickly enough without mistakes is much more important than where you're looking as you're doing it. Touch typing is mostly important if you're transferring a physical note (i.e hand-written memo) to a typewriter or computer, in which case being able to read and write simultaneously saves you time (hence why it was emphasized for secretaries) but this happens &lt;em&gt;quite rarely&lt;/em&gt; for programmers. Since I haven't noticed typing ability being an issue in CS classes, I wouldn't go around adding requirements.&lt;/p&gt;&#xA;" OwnerUserId="5071" LastActivityDate="2018-06-19T16:17:07.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4901" PostTypeId="2" ParentId="4891" CreationDate="2018-06-19T19:05:41.547" Score="9" Body="&lt;p&gt;From a 25 year computing industry perspective, people who touch type are generally better at written communication with their colleagues, managers, clients, etc. than those who do not touch type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being able to bang out words on the keyboard without thinking or looking at the keyboard makes people more willing to write clearer thoughts, complete sentences, paragraphs and so forth.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to things like bug reports, touch typists generally write better step-by-step details on how to reproduce them, instead of only writing half the material needed.  In new feature descriptions, it's much the same, someone who doesn't struggle with typing usually writes more complete descriptions of what their work does, what inputs go in, what outputs to expect, what things are missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes to programming, touch typists frequently write clearer code for the future programmers (including themselves) to read later.  Those who don't touch type take shortcuts, naming variables  things like (and this example comes from my other screen right now) &lt;code&gt;it&lt;/code&gt; or &lt;code&gt;aPanel&lt;/code&gt;, short and easy to bang out when looking at the keyboard.  But now I'm looking at this code trying to figure out what they are, and as a touch typist, I would've named those two &lt;code&gt;formula&lt;/code&gt; and &lt;code&gt;formulaItemPanel&lt;/code&gt; so that it's obvious what the content of the variables is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not to say that people who don't touch type are dumb, or incapable of solving complex problems, many of them can.  But if they could touch type, their end result would probably be clearer for other people to understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, there are exceptions.  There's touch typists who don't do a complete job at writing, and there's some people who can't type well, but still put in the extra effort, even if it takes more type.  But on the whole, written communication skills correlate pretty closely with typing skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prerequisite is too strong, but learning to touch type is something I certainly &lt;em&gt;recommend&lt;/em&gt; for people studying computer science.&lt;/p&gt;&#xA;" OwnerUserId="1087" LastActivityDate="2018-06-19T19:05:41.547" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4902" PostTypeId="2" ParentId="4891" CreationDate="2018-06-19T21:48:47.103" Score="24" Body="&lt;p&gt;&lt;strong&gt;If the goal is to prepare students for &quot;the real world,&quot; aka &quot;real jobs&quot; then&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Touch typing is &lt;strong&gt;required&lt;/strong&gt; to be an effective programmer. Full stop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answers here seem to highlight the difference between theory (academia) and professional work. Under no circumstance would I hire or tolerate a programmer that couldn't code without looking at the keys.&lt;sup&gt;*&lt;/sup&gt; It would be difficult for them to meet the minimum job requirements, which for most normal jobs, means delivery of code. They would be so horribly inefficient as to be detrimental to the organization and code delivery deadlines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few answers here that say &quot;coding is more thinking than typing.&quot; Possibly in academia, most of the time, not in &quot;real world&quot; jobs. Not only do you have to write 1000s of lines of code, you have to write 1000s of lines of unit tests. And you have a deadline you have to meet. You also have to interact with the systems which more often than not are command line oriented (Linux, Windows Powershell, Mac Terminal). Then you have to google to find helpful answers to common programming problems, usually found on some random community oriented Q &amp;amp; A site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer your question with an analogy, it would be like hiring a secretary that typed up your emails and letters using hunt and peck. It's not going to work most of the time, except for a few outliers that have master-level hunt and peck typing skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So yes, I would say &quot;touch typing&quot; is a job requirement to be a software engineer. I think it's a safe bet that the majority of CS students are looking to enter the professional work force and as such, the ability to type quickly and effectively is a skill that will only benefit them. For the majority of people that skill is going to be standard touch typing. There are obviously subsets of CS jobs where there is less typing involved, but I don't think this is the majority. Even so, adding a skill to their skillset is hardly detrimental whereas not having it could be career limiting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If one simply want to teach students theory, and they do not intend to work as a programmer, then sure, just whiteboard, study algorithm textbooks, solve induction problems, but then you aren't best preparing them to enter the work force, for the majority of jobs. Maybe they can succeed in academia, teaching, or more architectural roles, but even then I'd wonder how they would type up their dissertation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, the skill can only benefit them. Therefore, I believe motivating your students to learn touch typing puts them in the best position to succeed. I believe the students will be more effective, more efficient, will spend less time typing and more time doing, and will be in a better position to succeed in their future careers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Footnotes&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;* Barring some disability or master-level, non-conventional typing abilities.&lt;/p&gt;&#xA;" OwnerUserId="5392" LastEditorUserId="5392" LastEditDate="2018-06-20T14:06:44.597" LastActivityDate="2018-06-20T14:06:44.597" CommentCount="19" ContentLicense="CC BY-SA 4.0" />
  <row Id="4903" PostTypeId="2" ParentId="4855" CreationDate="2018-06-20T01:35:36.947" Score="-1" Body="&lt;p&gt;UNIX has three rings of security ... There are three levels of permission ... and there's chown, chgrp, and chmod. That's all that anyone needs to remember, and all that anyone should ever be tested on. The rest is easily recovered via &lt;code&gt;man chmod&lt;/code&gt;.  I have been a professional developer on mostly Unix / Linux since 1978, and I still don't remember the full syntax of chmod arguments.&lt;/p&gt;&#xA;" OwnerUserId="5397" LastActivityDate="2018-06-20T01:35:36.947" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4904" PostTypeId="1" CreationDate="2018-06-20T05:27:00.693" Score="6" ViewCount="230" Body="&lt;p&gt;There are so many resources on the internet for self-learning computer science, such as the &lt;a href=&quot;https://ocw.mit.edu/index.htm&quot; rel=&quot;noreferrer&quot;&gt;MIT OCW courses&lt;/a&gt;. However, some of those courses are around 5 to 6 years old taught in 2012 or 2013.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are good books on computer science but they are expensive so I proceeded for the pdfs but they sometimes are available only of the old edition for the same around 5-6 years old.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would it be beneficial to learn from them? what about computer networking?&lt;/p&gt;&#xA;" OwnerUserId="5399" LastEditorUserId="1293" LastEditDate="2018-06-20T13:16:16.513" LastActivityDate="2018-08-01T20:48:37.807" Title="Would it be beneficial to learn computer science (or other computer related stuff) from 5-6 year old material?" Tags="|resource-information|exams|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4906" PostTypeId="2" ParentId="4904" CreationDate="2018-06-20T10:24:39.830" Score="6" Body="&lt;p&gt;For many things it is possible, even advantageous, to learn from older books and materials. But it also depends on your goals. Computer Science, like any field, has some things that are fundamental and the fundamentals change only very slowly. The major programming paradigms, for example, were all created in the previous century. The fundamentals of compiling programs haven't changed in a long time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, while some areas have shiny-bright new stuff, a beginning student isn't going to study those &lt;em&gt;first&lt;/em&gt;, but only after gaining some background in things that haven't changed in a long time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you are a student, seeking a broad understanding of the field, then older materials won't be a handicap, though at some point you will want/need to learn the newer bells and whistles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you have a specific need, such as learning some specific technology at the expense of other things, then you should probably go with recent materials, even knowing that some of the details you learn will, themselves, change in a few years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even networking has a lot of fundamental ideas that need to be understood before you can grasp the details of the latest networking protocols. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me give an example. Recent versions of Java have introduced &quot;exciting&quot; new capabilities, including function abstraction. The beginning student won't study those things at the beginning, however, but will be more concerned with creating good OO programs. If you study Java from older materials, but &lt;em&gt;also&lt;/em&gt; study something of functional programming (say Scheme or Haskell), also from old books, the new features of Java won't be a surprise to you. On the other hand, if you are faced with an eventual exam (such as the Advanced Placement CS-A) exam, then you need to study from materials that will prepare you for the questions that will be on that exam - likely newer books. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in general, many of the older books are true classics that will give you a deep understanding of fundamental things that make it possible for you to move easily into new things as they are introduced. Learn what is important. It is even enlightening to adapt old ideas, such as top-down-program-decomposition, to newer frameworks and to understand why things change. But that also requires background in the fundamentals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you also mention online courses, you should note that a course from a few years ago is almost certainly still relevant. This is partly due to the fact that the creators of such courses are generally highly skilled and also value the newest ideas. It is very likely that the courses were very current at the time of creation, as well as being grounded in fundamental knowledge.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a final note, it is also sadly true that some of the older books have not been updated and the key, deep, ideas in them are not readily available elsewhere. The newer books may not incorporate the ideas of the older books so you may even lose something by only learning from the latest materials. I have one example of a book that had a truly excellent first edition (a Java textbook). The second edition, however, left out many of the parts that made the first so excellent, however. This is due to the unfortunate practice of book publishers to emphasize new editions whether they are an improvement over the old or not. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-06-20T11:40:42.047" LastActivityDate="2018-06-20T11:40:42.047" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4907" PostTypeId="2" ParentId="4891" CreationDate="2018-06-20T10:40:33.680" Score="18" Body="&lt;h1&gt;Short answer&lt;/h1&gt;&#xA;&lt;p&gt;no, but it can be useful.&lt;/p&gt;&#xA;&lt;h1&gt;Long answer&lt;/h1&gt;&#xA;&lt;h2&gt;CS is not just Programming.&lt;/h2&gt;&#xA;&lt;p&gt;It has other parts also.&lt;/p&gt;&#xA;&lt;h2&gt;Programming is not typing&lt;/h2&gt;&#xA;&lt;p&gt;This has been said already, programming is mostly thinking. As an example of my real programs, in industry.&lt;/p&gt;&#xA;&lt;h3&gt;Here are my top examples of code that I have written in lines of code:&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;3 lines of code in 2 weeks. Non cryptic elegant code, avoided need for special hardware, and reduced expected lines of code. But same functionality. It also allowed extension, because it was simple.&lt;/li&gt;&#xA;&lt;li&gt;~10k lines of code. Deleted 10000 lines of code and replaced them with 200 lines. Same functionality.&lt;/li&gt;&#xA;&lt;li&gt;Team mate been working on a web-server for a week. I ask what does it have to do. It just tells the user that the site is off-line (under maintenance). So I write a webserver from socket layer up in one page of C code. It did one thing, it did it well. It told the user that the site was down, and it told them what the progress is. You don't need to type fast to make that pay off.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All this was done before I could touch type.&lt;/p&gt;&#xA;&lt;h3&gt;Worst code I have seen&lt;/h3&gt;&#xA;&lt;p&gt;Written by a touch typer, that measured productivity it lines of code. They produces 100s of thousands of lines of code, mostly the same, repetitive cut and paste stuff, full of bugs. Bugs per line of code, similar to others, but more line = more bugs.&lt;/p&gt;&#xA;&lt;h2&gt;A computer is not a thing with a monitor, keyboard, and mouse.&lt;/h2&gt;&#xA;&lt;p&gt;I often ask my class what is a computer. They often tell me, “A thing with a keyboard, mouse and display”. But what is a computer. Is it a calculator, a typewriter, a TV, a games console, a telephone, …. No it is something that processes information, that has an input and an output. input → process → output. (it still has a name based on its first application: computer, or phone (depending on its shape)).&lt;/p&gt;&#xA;&lt;h2&gt;Where is is useful?&lt;/h2&gt;&#xA;&lt;p&gt;It allows you to type and hold eye contact with the person that you are talking to.&lt;/p&gt;&#xA;&lt;h2&gt;If you are going to learn to touch type.&lt;/h2&gt;&#xA;&lt;p&gt;Don't learn &lt;code&gt;querty&lt;/code&gt;. It is too hard for most to ever master. It is optimised to &lt;a href=&quot;https://en.wikipedia.org/wiki/QWERTY#History&quot; rel=&quot;noreferrer&quot;&gt;avoid clash of mechanical hammers&lt;/a&gt; in the crown of a typewriter. The modern keyboard is so far decoupled from the printing mechanism (if one exists at all), that this optimisation is of no value. Instead chose a layout that is optimised for the human.&lt;/p&gt;&#xA;&lt;p&gt;As an example how many American state names can you type without taking your fingers off of the home row. How many can you type with the home row of Dvorak &lt;code&gt;aoeuidhtns&lt;/code&gt; (how many more with just one deviation). Note Dvorak may no longer be the best choice. Do your research.&lt;/p&gt;&#xA;&lt;p&gt;If you worry about what is physically printed on the keys, then you are not concerned with touch typing.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-06-25T07:28:08.753" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4908" PostTypeId="2" ParentId="4891" CreationDate="2018-06-20T12:28:35.887" Score="3" Body="&lt;p&gt;Simply put: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;touch-typing is to CS as calculator key-in is to math&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That said, controversy still rages on in math education on whether calculators should be allowed during tests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should students be required to memorize the times tables? Should they memorize the key board?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We as educators need evidence from experimental psychology to help us decide what to emphasize as important skills. &lt;/p&gt;&#xA;" OwnerUserId="5412" LastActivityDate="2018-06-20T12:28:35.887" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4909" PostTypeId="2" ParentId="4891" CreationDate="2018-06-20T14:13:25.083" Score="6" Body="&lt;p&gt;The question seems to distinguish between nine finger and three finger typists (with three being bad). In the company I work for, which is rather small  I don't think anyone is a true touch typist (nine finger) and yet none of us type slowly (I have a typing speed of between 60-120 depending on what I am working on as a three finger touch typist).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With a large number of programmers using IDEs which automate many of the actions and the fact touch typing as a programmer uses a lot of keys that normal typing (such as this message) don't need to use with any regularity (e.g. ;{}[] symbols for example), I would say not looking at your keyboard whilst typing and having proficiency with the IDE are important. Having to be a pure touch typist though vs 3 fingers I would like to see evidence against.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience (which isn't much; masters in CS and about 7 years professionally), programmers who cannot use IDEs efficiently are slow regardless of their typing speed and is one of the main areas we have to get them up to speed with.&lt;/p&gt;&#xA;" OwnerUserId="5415" LastActivityDate="2018-06-20T14:13:25.083" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4910" PostTypeId="2" ParentId="4891" CreationDate="2018-06-20T14:31:53.120" Score="5" Body="&lt;p&gt;&lt;strong&gt;There isn't a specific number of digits&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Touch-typist here. I'm very unusual in that I touch-type using mainly index finger and thumb (using other fingers very rarely, I still achieve 60-80 WPM), so I would argue touch-typing doesn't involve all 10 digits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From a disability standpoint, I'd also argue against emphasising how many digits are utilised in touch-typing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;It's naturally learned, so it isn't a requisite&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Touch-typing isn't really something that can be 'taught' per se, and it wasn't something I was taught during my years of growing up, but something I had learned naturally as a result of using a computer. It's a bit like piano in that, not having to look at the keyboard allows you to keep your gaze on the sheet (or screen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Whilst touch-typing, it is possible to look elsewhere&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would usually astonish my classmates because our classroom had a screen that was (stupidly) located behind us from the computer screen, so I would have my keyboard on my lap with my body 90 degrees from the screen, and my neck turned the rest of the way towards the board (bad for your neck, don't do it!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much to the surprise of the class, despite being basically 180 from the computer screen and 90 from the keyboard, I was able to type AND detect spelling errors (always hinted by a misplaced physical press on the keyboard) AND correct them, with one classmate refusing to believe I was keeping pace and writing correctly until they checked my screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't however sustainable - you still need to check back from time to time to make sure you hadn't missed a typo (and to proof read syntax - sometimes your brain writes 'as it thinks' and not what is grammatically correct). For dull rote copying exercises it helps, but good programming stems largely from excellent code design and syntax formatting (which requires eyes-on screen as programming syntax is not language syntax).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it useful? Somewhat, yes.&lt;/li&gt;&#xA;&lt;li&gt;Can you look elsewhere? Sometimes, yes, but inadvisable (neck issues, lack of proof-reading).&lt;/li&gt;&#xA;&lt;li&gt;Should it be mandatory? No.&lt;/li&gt;&#xA;&lt;li&gt;Should it be offered as optional training if the&#xA;student needs/wants it? Yes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Remember: Each keyboard has a different physical layout and it can be hard to adjust to the subtle nuances of each keyboard, so don't expect immediate results when switching between machines.&lt;/p&gt;&#xA;" OwnerUserId="1772" LastActivityDate="2018-06-20T14:31:53.120" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4911" PostTypeId="2" ParentId="4891" CreationDate="2018-06-20T15:06:16.597" Score="2" Body="&lt;p&gt;I've had students who were 'hunt and peck' typists and it always caused problems during in-lab exams where there's a limited amount of time. Some also insisted on typing with one hand (with no lack of physical ability in the other, merely a preference). In general they spent much more time developing and debugging their software simply due to their slower rate of input. The software was just as good as the touch typists of course, but it took longer to produce.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar problem is with some touch typists use the mouse exclusively for all cut and pasting operations and prefer to paste rather than re-type anything they've previously written, and so they can take a very long time to develop code too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think touch typing experience should be a prerequisite but if a student has no physical limitation to why they can't learn touch typing they should accept that they will face some minor disadvantages in terms of productivity if they decide not to use it. For some that may be acceptable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now in the workplace where you are expected to be productive I think it would be a major disadvantage. Might as well learn it sooner rather than later to be ready for future employment.&lt;/p&gt;&#xA;" OwnerDisplayName="user5416" LastActivityDate="2018-06-20T15:06:16.597" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4912" PostTypeId="2" ParentId="4891" CreationDate="2018-06-21T04:30:17.533" Score="6" Body="&lt;p&gt;&lt;strong&gt;TL; DR&lt;/strong&gt; Touch typing is a useful skill, but a minor convenience factor that likely has zero impact on a software engineer's career progress or earning potential.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am writing from the perspective of a recently-retired software engineer with a CS degree who spent his entire career in the technical &#xA;track at a variety of Silicon Valley companies, from small startups to giant multi-national corporations. My positions were all in R&amp;amp;D, comprising&#xA;on average about 95% development and 5% research.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have written production code, test frameworks, test plans, product and design documentation, and many other kind of documents. As I became more senior, my writing activity transitioned increasingly away from writing code. &lt;em&gt;I never learned touch typing&lt;/em&gt;. I successfully worked under very tight deadlines many times. I have handled an email volume of more than one-hundred messages daily for prolonged periods of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience as a software engineer who also interfaced with hardware engineering, marketing, and legal departments, as well as customers,&#xA;the biggest bottleneck doing software-engineering work  in a production environment is in &lt;em&gt;thinking&lt;/em&gt;: it requires very strong problem-solving skills and creativity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typing speed is almost never a performance-limiting factor: if one is able to type faster than one thinks, one is very likely not thinking hard enough. This includes thinking about ways to reduce the typing overhead, for example by using and building libraries, frameworks, and code generators, or automating the generation of documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People like me who cannot touch type often can type reasonably fast. Usually they do &lt;em&gt;not&lt;/em&gt; type using  a hunt-and-peck approach, and they also benefit from motor memory allowing them to type while looking at the keyboard maybe every other word or so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There a number of skills that can improve a software engineer's career path in &lt;em&gt;much&lt;/em&gt; more profound ways than the skill of touch typing, &lt;em&gt;while not being mandatory or required skills&lt;/em&gt;. Experienced engineers will differ based on their professional experiences. My personal short list, roughly in decreasing order of importance, is as follows:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Writing skills: clearly communicate problems and solutions to colleagues and customers&lt;/li&gt;&#xA;&lt;li&gt;Interpersonal communication skills: build productive relationships with colleagues and customers&lt;/li&gt;&#xA;&lt;li&gt;Time management skills: deliver products to market-driven deadlines for maximum profit&lt;/li&gt;&#xA;&lt;li&gt;Foreign-language and cultural adaptation skills: move to a different country to further your career; work with collaborators and customers in a global economy with a minimum of friction&lt;/li&gt;&#xA;&lt;li&gt;Research skills: assess the state of the art; avoid re-inventing the wheel and repeating other people's mistakes; identify new opportunities for innovation&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="1940" LastEditorUserId="1940" LastEditDate="2018-07-18T17:54:22.127" LastActivityDate="2018-07-18T17:54:22.127" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4913" PostTypeId="2" ParentId="4891" CreationDate="2018-06-21T20:47:20.493" Score="3" Body="&lt;p&gt;Perhaps I should begin with a simple analogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say I come up with a brilliant idea in the middle of the night. I must write it down or else I must forget it. So I stumble around in the dark and find a piece of paper and a pencil, but oh, I must get a new pencil, this one is broken, and shoot, I'm running out of room and cannot see what I am doing, and I am groggy, so my fine-motor skills aren't very good.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Morning comes, and I wake to see a torn slip of paper with smears of graphite and a few barely distinguishable words - nothing like the clear cut idea I had in mind.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The above is a rather dramatic example, but I use it to prove a point. Those who cannot touch-type still have fabulous thoughts, but in the end, programming isn't just thinking, it's putting the thoughts to paper. I could put my midnight thoughts on paper, but I did so with a lot of difficulty, and the end product wasn't great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You must be able to conveniently convey your ideas at near enough the speed of thought that you do not lose your train of thought (we've all had that moment where someone's asked us to repeat something and after we do so, we forget what we were going to say next). If you cannot touch type, you will have a much harder time doing this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you are a skilled pecker. Kudos to you. Perhaps you &quot;touch type&quot; but in a non-standard way. Great. The point isn't to be able to textbook-type but to &lt;em&gt;effectively get your thoughts down quickly while being able to still think about what you're writing, instead of about writing it.&lt;/em&gt; Touch-typing is a convenient way to do that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As I write this right now (I can touch type) I'm not looking at the screen and I am thinking about the words I am writing, not where my fingers are going (and I type on the slower end for a touch typer - around 70 wpm with middling accuracy; my mom can make 100 wpm with very high accuracy). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point here is not that touch typing should be required, but it is great because it's a formulaic way to teach someone how to quickly communicate their ideas. If you can do that in a way other than the standard method, great! But you should be able to do it somehow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, all this being said - I really cannot imagine making something like this a prerequisite. I can imagine highly encouraging my non-existent students to learn to touch type. I can imagine pulling aside a slowly-pecking student after class and showing them a great website to learn how to touch-type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can't imagine forcing all students to take a prerequisite class for something they can take on their own and which doesn't require any real instruction beyond that a website provides. (My touch typing class in elementary school was an hour or so a week where we all logged into some website and they made sure we didn't blow anything up for an hour while we worked through the lessons.)&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2018-06-21T20:47:20.493" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4914" PostTypeId="2" ParentId="1383" CreationDate="2018-06-24T22:27:38.663" Score="1" Body="&lt;p&gt;I have experienced pair programming as a student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; From my experience, I do not recommend pair programming, but I do recommend a course structure where students can ask each other for assistance.  This way, students who need and want assistance can get it, and students who are able to give assistance can give it.  The ability of the professor or TA in the lab can make a big difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My First Experience (Not very good)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: It seems that this was intended to be pair programming, but due to it being badly explained to the students, it ended up just being &quot;division of labor.&quot;  In reality in my experience, the review component of pair programming was not really present.  I mistook the goal of pair programming - I don't think pair programming is intended to be able to give the students I worked with the amount of help that they needed.  If you use Pair Programming as a teaching technique, you should make sure it is explained better than it was explained to me, and make sure students are actually following the procedure.  END EDIT.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the first Computer Science class I took, there was a 2-3 hour lab once a week, and (we) the students were randomly assigned new partners with whom to work on labs every week.  There were two student teaching assistants, one who seemed perfectly competent, and one who everyone dreaded (nobody could understand what he was saying at all, but he would talk on and on and demand your attention).  There would be an assigned program to write, and a lab report.  The balance of work was generally this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a more experienced programmer myself, I usually ended up doing most of the planning and writing of the program.&lt;/li&gt;&#xA;&lt;li&gt;My partner would usually write the &quot;lab report&quot;.  They often did not understand programming very well, but felt that they could contribute by writing a lab report.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Heather's answer said something which was also true in my case: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The other student often was like, &quot;hey, we need to get this done, you obviously know how to do it - just do it&quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Many times, I tried my best to get them to understand the code I was writing, pointing out lines of code, explaining functions, describing concepts... but as far as I could tell, most of my efforts were lost.  Whenever I actually tried to get my partner to write some of the code, our efforts would start to go nowhere very fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One time, when we were learning a topic considered difficult for the class, the professor came in to help with the lab, and he really made sure everyone got the help they needed to understand the concept.  That was the only time it seemed that the lab was really successful in terms of most students learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the reasons why this experience with pair programming was &lt;strong&gt;a bad one&lt;/strong&gt; were:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My partners did not seem invested in learning about programming (they were fine with only doing what they needed to in order to pass the class).  Other students in the class might have been invested in learning, but not any of my partners.&lt;/li&gt;&#xA;&lt;li&gt;Good advice was often unavailable.  (The students tended to rely only on their partners or an available TA for assistance. The one competent TA was often busy, and sometimes neither partner knows what to do.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Second Experience (Better, but not pair programming)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the second Computer Science class I took, everyone received individual assignments multiple times a week.  We were &lt;strong&gt;not required to program in pairs&lt;/strong&gt;.  We had 2-3 hours of lab time twice a week.  The teaching assistant was actually another professor, who was &lt;em&gt;very competent&lt;/em&gt; whenever people asked him for assistance.  Although people were not assigned pairs, students who needed help would often ask other students who they knew were competent programmers for help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reasons that this class was &lt;strong&gt;so much more successful&lt;/strong&gt; seemed to be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Good advice was always available.&lt;/li&gt;&#xA;&lt;li&gt;Anyone could ask anyone else for help.&lt;/li&gt;&#xA;&lt;li&gt;The people who wanted and needed help were always able to get it, not stuck with a partner who might know as little as they know.&lt;/li&gt;&#xA;&lt;li&gt;The students who knew enough to give help could give it to anyone, not just a partner who might not want it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;EDIT/ADDITION:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My Third Experience (Pair Programming for Fun)&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My friend and I meet every couple of weeks and code together for fun.  This is completely separate from any form of classroom, academic work, or job.  What we usually do seems to fit the definition/intention of Pair Programming far better than any classroom Pair Programming experience I have had.  One of us typically codes while the other watches/gives comments, switching off depending on who better understands the particular task.  This is enjoyable and we both learn a great deal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in this situation, we are both already fairly competent at programming, and motivated to program and learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is unfortunate, but I cannot really see this succeeding in most academic environments I have been in, because of a lack of motivation in so many students.  I would love to be in a classroom where everyone is motivated enough and has sufficient programming skills for Pair Programming to be successful, but I don't think that I have yet been in any classroom like it.&lt;/p&gt;&#xA;" OwnerUserId="5453" LastEditorUserId="5453" LastEditDate="2018-06-26T01:00:06.163" LastActivityDate="2018-06-26T01:00:06.163" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4915" PostTypeId="2" ParentId="4762" CreationDate="2018-06-25T14:38:16.823" Score="2" Body="&lt;p&gt;&lt;strong&gt;Separate the actual solution, from the code&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As you've probably identified, the underlying issue is not that the names are incomprehensible or that the students lack memory in remembering what 4 simple commands do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, it's that trying to remember your step-by-step solution; &lt;strong&gt;and&lt;/strong&gt; translate it into those 4 commands - becomes too much to handle all at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Importantly, by trying to do it all at once, the students give themselves the opportunity to get confused between what actions they can do (turn left, move forward) and the names of the variables (does &quot;left&quot; actually mean we can move left?).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As with any programming task - I'd suggest breaking it back into the two separate phases:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Creating a language agnostic solution&lt;/li&gt;&#xA;&lt;li&gt;Translating the solution into code&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Firstly, make the problem clear - in non-python terms. You have a turtle that can move forwards, turn-clockwise or anti-clockwise; and you need give it a set of instructions to get to a destination.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is agnostic of the library used to implement it, or even the fact they will be programming the turtle. As you suggested in the comments - you can have them solve this in person, in the playground, if it's helpful; as it is entirely decoupled from the act of typing code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This solution should be written, using any natural language they prefer (including diagrams where they feel it's useful). Importantly, it should be complete enough they could pass it to another student - and have them verify it's correct - without ever typing a line of python code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The benefit of having it written down, is you reduce the amount of things they need to remember at any one stage. As they become more experienced, they will naturally find their need to do this drops - but early on, it is a very good habit to develop.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Once the students have a written solution, in their own choice of natural language (but importantly, written, and not just sitting in thier heads). You can move onto translating their solution into python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that in the translation stage, they should feel that the problem is already solved. This stage should be made clear, that it is a mechanical translation from one language (theirs) to another (python).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, although the names may be slightly confusing - it now shouldn't matter. By having them translate their written solution - they are simply looking for the python commands which represent their chosen action. It doesn't matter that &quot;left&quot; sounds like &quot;move left&quot;; as their solution will not contain any references to strafing left (based on the original plain-english problem statement).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they have translated their solution, and tested it. It's important again, to emphasise &lt;strong&gt;not fixing the bugs directly&lt;/strong&gt;. At all stages, their written solution should be corrected first, and the actual coding should never be more than translating written language into python code.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;With this, hopefully it's clear how the students will develop two separate mental models. One for how to solve problems - given a limited set of instructions - and one for the actual code that represents their solution (which may or may not have intuitive names).&lt;/p&gt;&#xA;" OwnerUserId="3876" LastActivityDate="2018-06-25T14:38:16.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4916" PostTypeId="1" CreationDate="2018-06-26T02:02:06.710" Score="4" ViewCount="287" Body="&lt;p&gt;I have a class which is in a computer lab (each student has a computer). These are standard Windows computers. The computer lab is organized into rows, with students on either side of a row facing each other. I stand at the front of the classroom with a smart board.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also take pains to ensure that students enjoy the class, seeing that the goal of the class is to encourage students who may not otherwise have encountered computer science to pursue it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These two factors come together to create two problems: Students tend to talk to their neighbors, which I believe is because the rows separate them from me, so when I'm not near, there's no reason not to talk. I also permit talking, because the students are encouraged to work on problems together. In addition, because there are computers in front of them which have access to the internet, and they're not entering the class excited about computer science, they will use the computers for games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I make the classroom environment more focused on computer science, without making it any less enjoyable for newcomers to CS?&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="283" LastEditDate="2018-06-28T14:12:14.430" LastActivityDate="2018-08-15T07:52:12.410" Title="Students frequently distracted by peers and games" Tags="|classroom-management|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="4917" PostTypeId="2" ParentId="4891" CreationDate="2018-06-26T07:58:25.680" Score="1" Body="&lt;p&gt;&lt;strong&gt;Obviously&lt;/strong&gt;, students who learn how to touch type have the advantage of being able to type faster.  If the touch typist cannot articulate what it is that they need to type, then this advantage will do them no good.  If two students have equal skill in computer programming, but only one knows how to touch type, then it follows that the touch typing student should be able to complete tests and assignments faster.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, there some good reasons not to make it a required prerequisite.&#xA;As has been noted in other answers, touch typing is a skill that is advantageous, but not necessary.  It seems to me at least that it is very possible to be a decent programmer without knowing touch typing...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My school required me to take a basic computer class, and one of the promises of that class was that it would teach touch typing.  I wanted to learn touch typing in that class.  It did not happen.  I was not taught how to touch type.  I was passed without ever being tested on touch typing (which is a bit sad).  Any of the hunt-and-peckers in that class would have technically cleared a touch-typing prerequisite.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;With the quality of any of the typing classes I have seen, making sure students are up to speed on typing by requiring a prerequisite course would be a hit-or-miss effort.&lt;/strong&gt;  If you are really confident in the quality of your school's typing classes, and typing at around 60wpm is really necessary (and cannot be compensated for by other things, which I doubt), then you have a slightly better case.  If you really want students' grades and pass rates in your class to correlate with their speed, you could alternatively try having assignments and tests with stricter time limits, and encourage the students struggling with those limits to learn touch typing, but I don't recommend this; I would be careful not to prioritize typing speed so much that it interferes with critically thinking and writing quality, efficient code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I still do not know how to touch type, and I would still like to learn, as it has clear advantages.  &lt;strong&gt;I am sure touch typing could improve my typing speed&lt;/strong&gt; by 30-60%, or by about 15-25 words per minute, possibly faster if I was really dedicated and learned Dvorak or Colemak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, without any training, I type with four fingers on each hand (not the pinky fingers) at about 45 wpm.  I know the keyboard well enough to type without looking.  Stopping to think about something for a minute is far more likely to slow my typing than me not being able to type fast enough.  &lt;strong&gt;I do not see a pressing need for a typist similar to myself to learn touch typing.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my computer science classes, I am sure that many of my classmates have the ability to type faster than me.  However, I am often the first one done with assignments and timed tasks, as I can think of an efficient solution the fastest.  One of my classmates used &lt;em&gt;an iPad&lt;/em&gt; to type his code.  It makes me cringe (possibly similar to how touch typists would cringe at non touch typists like myself), but he managed a surprising amount of speed by adding and using IDE shortcuts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My employer did not look at my typing speed when they hired me.  However, I can accomplish certain tasks far faster than others would, because I use scripts, macros, and other shortcuts that most would not consider.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My grandmother learned how to touch type.  She can type probably twice as fast as me.  But that is not the same thing knowing how to efficiently use a computer and all the shortcuts that are now available with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have students who are &lt;em&gt;blazing fast&lt;/em&gt; touch typists?  Good for them.  &lt;strong&gt;The rest (non touch typists) will probably either learn to compensate well enough or possibly fail.&lt;/strong&gt;  Or they may take up touch typing if they see it as necessary enough, especially if you encourage them to do so.&lt;/p&gt;&#xA;" OwnerUserId="5453" LastActivityDate="2018-06-26T07:58:25.680" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4918" PostTypeId="2" ParentId="4916" CreationDate="2018-06-26T08:05:15.157" Score="4" Body="&lt;p&gt;There are a variety of measures, or counter-measures, that you can employ. Some are technology-based, some come at a financial cost, some require the right level of cultural and institutional authority to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The least expensive, and tech-free alternative is to set rules with consequences. When the instructor is &lt;em&gt;lecturing&lt;/em&gt; the students are expected to be &lt;em&gt;listening&lt;/em&gt;. Listening is done with the mouth closed and the ears open and eyes on the instructor, not the &quot;game&quot;. During &quot;lab&quot; time &lt;em&gt;on-topic&lt;/em&gt; discussion is acceptable while discussion of current events (current pairings, etc.) is not considered &lt;em&gt;on-topic&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students are expected to use paper for notes, rather than the computers, during the lectures, you can also require that they remain powered down until the &quot;lab&quot; portion of the class begins. Once they are working on the computer, the rules can say &quot;No Games&quot; and that can be explained to include both the Windows per-installed games, and online games of any variety.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still non-tech, and possibly within a limited budget is the installation of mirrors. One or two strategically placed bubble mirrors can allow you to &quot;see&quot; the monitors even when you are on the other side of the row from them. Granted, the image in the mirror won't allow you to read their screens, or probably even know what program they have open. Even with the limited quality of view they offer you should be able to distinguish between an IDE and a video game, or a music video, etc. Even the difference between a web page being used for research and a chat/IM window is probably distinguishable that way. The version that hangs on a chain should be install able in almost any classroom, and without much effort from maintenance, possibly even on your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/3bRS0.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/3bRS0m.jpg&quot; alt=&quot;Corner Mirror&quot;&gt;&lt;/a&gt; &lt;a href=&quot;https://i.stack.imgur.com/h0trF.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/h0trFm.jpg&quot; alt=&quot;Hanging Mirror&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the room's shape and the outlet distribution allows it, you can consider the tables mentioned in &lt;a href=&quot;https://cseducators.stackexchange.com/a/816/104&quot;&gt;another answer&lt;/a&gt;. Even the pre-computer versions of the half-hex tables can accommodate a trio of flat-panel monitors if you can have the CPUs on the floor. There is the trade-off of loosing writing space for the keyboard, but if they take paper notes during lectures, with the computers remaining off, the keyboard can be moved out of the way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The cost for the tables depends on what's currently collecting dust in the warehouse and what is purchased new.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Adding technology to the mix, there are other measures that can be pursued. First off is the uninstallation of all the games that are bundled with Windows. There seems to be no real reason to have them on computers that students are supposed to be using for schoolwork. It might cost the IT Dept. some time, but it won't cost them anything else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the school's policies, it's also possible to restrict the sites that are reachable from the school's network. This shouldn't require any new software for the system, just the configuring of what's already there. Most of the popular games for your students are likely to be from a highly limited set of domains, domains which server no other purpose. Blocking traffic to those few IP addresses can be handled by even a simple home router, whatever is in use at your school ought to be capable of the same. If your school is setup with each room on its own VLAN then they could configure your lab's network to block those sites while allowing them for the rest of the school, and for the WiFi access from student devices. I don't think there's a legitimate need for access to such sites from the school's network at all, but the school policy might not allow a global blocking of such sites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most expensive, and probably the most complicated to maintain, is to install some form of &quot;parental control&quot; software on each student computer. (Removing, or disabling, unwanted software at the same time can't hurt, or course.) I have no recommendations for which one to use as I've never bothered with any of them. It's likely that the cost and licensing of them will have a larger impact on choice than features in any case. Institutional bureaucracies tend to move in that direction, even when it means getting something that does half of the task only half as well as something else would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, no matter which measures, at whatever costs and technology level, are used, they only make sense when used to enforce an existing rule. If there is no rule against playing games during lab time, blocking game sites is not appropriate. That realization just returns the subject back to the top of the list.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With the understanding that there are some rules to follow, which are explained to the students in the beginning, you can still attempt to keep things &quot;light&quot; for their first real exposure to CS. If the class is for programming, you can work towards developing a game as part of the progression of the class. Obviously it will be a simple game compared to what they like to play. Being part of the team that makes it, however, can add the excitement lacking from the game itself. I suspect that even today's kids know what tic-tac-toe is, and its rules. Making a quick version of that early in the course can cover a lot of the language basics without needing major investment into complex libraries and programming. If developed early enough in the course, it ought to fuel their fire for making a &quot;better&quot; game during the remainder of the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether the end is a game, or something else, the sooner you get the students where they have &quot;made&quot; something which does something and they can see the results of their work, the better your chance is of getting them engaged and invested in the material. I believe that is one reason web design classes do so well - the view-able web page, no matter how &quot;basic,&quot; is so easy and fast to create that there's nearly instant engagement of the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One final suggestion, to encourage them to see computers as a &quot;game&quot; of its own, a game where the computer is made to imitate what people can do, while giving them a bit of computer history as well, you can show the movie &lt;em&gt;&lt;a href=&quot;https://www.imdb.com/title/tt2084970/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Imitation Game&lt;/a&gt;&lt;/em&gt; about Alan Turing and breaking the German Enigma machine's code.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-06-26T08:05:15.157" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4919" PostTypeId="2" ParentId="4916" CreationDate="2018-06-26T12:32:53.073" Score="1" Body="&lt;p&gt;I don't know enough of the specifics of your layout and the course to be definitive, but will try to help a bit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the computers are laptops, it is easy enough to require that they be closed for parts of the class. Otherwise, the environment isn't conducive to learning as you note yourself. The monitors just get in the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My ideal situation in this case would be to have another room adjacent or nearby in which you begin each class period. Have your discussions, etc, in this room while students take notes. I would suggest that they take short notes on index cards for later reference in the lab room. Spend (perhaps) of the class period in the lecture room and at the end, give them a lab task to reinforce the current and past ideas. Then move to the lab. Again, speaking of my ideal situation, I would have them pair at the machines using Pair Programming or something close to it. This is discussed in other questions here and I'll provide references if requested. Spend your time in the lab session wandering around giving help and encouragement as needed, though with pairing you won't have to answer every question. If you arrange it so that one pair sits back-to-back with another, then some questions can get answered just by students turning around to interface with another pair. Make the learning a cooperative affair. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the separate classroom is not an option, you might even have students move their chairs toward you for the first part of the class. If the chairs are on wheels it is very simple, of course. Students won't, then, have a nearby computer that is &quot;theirs&quot; to use and so will be more likely to interact with you and the instruction you are giving. This might be possible even if there isn't a great deal of extra room. I'd still have them take paper notes (index cards). This mechanism forces them to confront each idea twice, once when note taking and again when implementing on the computer in the latter half of the &quot;lecture&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it also helps if you lecture less, especially if you lecture with your backs to the students. Flip the classroom so that students have as daily assignments some readings (books, online, handouts,...). You can open with a simple quiz to assure that the readings have been done, and then spend time answering questions and concerns rather than &quot;presentation&quot; or &quot;covering material&quot;. Now you spend time facing them rather than back-to-them and so they are less likely to sneak a peek at the monitor. You can do this even you have two rooms available, of course, and it will likely help, though you have to find a way to assure that the readings are actually done, hence the quiz suggestion. Alternatively you could require each student to provide a half page summary of the readings as a &quot;ticket to ride&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat: This is all possible or not depending on unknowns here. How big the class is for example. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-06-26T12:32:53.073" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4920" PostTypeId="2" ParentId="3441" CreationDate="2018-06-28T18:35:31.717" Score="2" Body="&lt;p&gt;A language called Quorum is a lot like Python but optimized across a few more syntactic details, and the corresponding development environment is designed with the blind in mind. &lt;a href=&quot;https://quorumlanguage.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://quorumlanguage.com/&lt;/a&gt; This might fit especially well with the use case where most students are using Python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A &lt;a href=&quot;https://computinged.wordpress.com/2016/08/15/supports-for-blind-cs-students-guest-blog-post-from-andreas-stefik/&quot; rel=&quot;nofollow noreferrer&quot;&gt;2016 blog&lt;/a&gt; about CSed (actually a response to a blog post) points to &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;program-l discussion board for blind programmers at &lt;a href=&quot;https://www.freelists.org/list/program-l&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.freelists.org/list/program-l&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The EPIQ conference for blind and other programmers interested in Quorum&#xA;&lt;a href=&quot;https://quorumlanguage.com/epiq.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://quorumlanguage.com/epiq.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastEditorUserId="765" LastEditDate="2018-06-28T18:54:37.040" LastActivityDate="2018-06-28T18:54:37.040" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4921" PostTypeId="2" ParentId="4858" CreationDate="2018-07-03T01:04:28.600" Score="6" Body="&lt;p&gt;I had zero experience with algorithms when I started. Here are a couple of things I wish had been done differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Let Students Make Mistakes&lt;/strong&gt; &lt;br&gt;&#xA;My TAs and professors always tried to guide me to the best answer, show me the right &quot;trick&quot;, or stop me from making a mistake before I actually made it. Whenever I'm helping someone out with CS now, I usually let them make the mistake. Nine times out of ten, there is something they have to do later in the assignment that won't work because of that mistake. And while we are troubleshooting the problem, they'll have that &quot;ah-ha&quot; moment and see why what they did was wrong. Sure it takes longer. However, I've found that it teaches students what to consider when making programming decisions. As they practice, they will be able to think through and handle those considerations more quickly. Essentially, you put in that extra time upfront and it pays off in the long-run.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Re-think Using &quot;Starter Code&quot;&lt;/strong&gt;&lt;br&gt;&#xA;Not sure if you do this, but my TAs and professors used &quot;starter code&quot; a lot (code that is partially written by the professor, then the student fills in the missing pieces). I personally believe that learning how to understand other people's logic and code is a skill in itself. Trying to do that and studying algorithms seems like a lot for someone new to algorithms to take on. Anyway, I decided to practice algorithms on my own without starter code, and I got a lot better at them. I wrote anything I could from scratch based of logic, descriptions, logic diagrams or pseudocode. &lt;em&gt;Then&lt;/em&gt; I could look at traditional approaches to see where my approach could be improved or optimized.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know these things take more time that a lot of educators don't have. But I wanted to point out a couple of &quot;time savers&quot; that actually hurt me (and a few people I've met and tutored) while studying algorithms.&lt;/p&gt;&#xA;" OwnerUserId="5476" LastActivityDate="2018-07-03T01:04:28.600" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4922" PostTypeId="1" CreationDate="2018-07-04T09:30:35.487" Score="5" ViewCount="239" Body="&lt;p&gt;I want to create a web development blog where I will teach a variety of subjects that people usually don't talk about.&lt;/p&gt;&#xA;&lt;p&gt;How people prefer to get content? Using videos or text?&lt;/p&gt;&#xA;&lt;p&gt;What are the pros and cons of each media?&lt;/p&gt;&#xA;" OwnerUserId="5478" LastEditorUserId="5478" LastEditDate="2020-09-09T09:27:32.953" LastActivityDate="2020-09-09T09:27:32.953" Title="How do people prefer to learn web development - videos or text?" Tags="|self-learning|web-development|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4923" PostTypeId="2" ParentId="4922" CreationDate="2018-07-04T09:50:18.100" Score="4" Body="&lt;p&gt;There is no reason not to do both, actually. Either can serve as the basis for creating the other. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you do only one, you will leave out a fraction of your audience. People with vision impairment may prefer your videos, provided that the audio is good. This is a small group, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But people with hearing impairment, a much larger group, including myself, won't get much from your videos and would much prefer written material. I don't really watch YouTube (or television, for that matter), unless the material is purely visual. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, it is difficult to annotate video presentations. You normally have to create a separate record and then it is hard to sync your notes with what is on the screen. Written material can much more easily be annotated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in the modern world, many people will prefer the videos, I suspect. But your planning for creating the videos and the audio script is also the same as the core of what you want in a blog. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, Blog or Video? Yes!&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-07-04T09:50:18.100" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4924" PostTypeId="2" ParentId="4922" CreationDate="2018-07-04T22:06:23.220" Score="8" Body="&lt;p&gt;As a student, I get a lot more from blogs.  Many of the videos I have seen are pretty hit or miss.  With a blog, I can scan it in a minute or so and be able to tell if it holds the answers/info I am looking for or curious about.  With a video, there seems to be a much longer time commitment due to more forwarding, searching and hunting for an overview of the video's quality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it may depend also on what you are trying to do?  Are you trying to relate an entire concept? Or is your approach more targeted towards demonstrating specifics, edge cases, etc?  I think for broader overviews, videos are more helpful from what I have seen with my peers and myself.  Blogs seem to do better with content that has a narrower focus, especially if specific, concrete examples are included.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There may also be the notion of data usage and accessibility to consider.  It is much easier to download a webpage then read it later or offline.  Not much data has to be transferred for that to happen.  Video of course takes much more data to transmit and more room to store.  Those may not be major concerns for everyone but some places I'm sure the difference between the two is enormous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whatever you choose, thanks for doing it and helping the rest of us learn, it is appreciated!&lt;/p&gt;&#xA;" OwnerUserId="4467" LastActivityDate="2018-07-04T22:06:23.220" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4927" PostTypeId="2" ParentId="4922" CreationDate="2018-07-05T17:55:46.603" Score="6" Body="&lt;p&gt;&lt;strong&gt;Videos or Articles?&lt;/strong&gt;&lt;br&gt;&#xA;I learned about web development on my own. I preferred videos to show me what was capable/ the end result of implementing a new technology. Then I used blog posts, articles, and tutorials to actually implement everything. My answer: do both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pros and Cons?&lt;/strong&gt;&lt;br&gt;&#xA;You asked about pros and cons. There are a lot based on what you want to do. Since the description of what you want to do is kind of broad, I wanted to provide a list of things that you can think about about as you try to find the pros and cons of using videos or articles. That way, if there are some that are missed in this forum, you have something to help you think of some more. :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So here's my suggestion. To think through the pros and cons of using videos or articles, think of your audience, your content type, and your content creation frequency.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Your audience:&lt;br&gt; &#xA;Who are you making this content for? People that are experienced with web development but just new to certain technologies? Or is it for experienced users only? &lt;em&gt;In some cases,&lt;/em&gt; I've noticed that people that know what they're doing really want straight-to-the-point, high-level tutorials while someone who is new to a particular technology likes step-by-step detailed tutorials that go over every detail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other factors that go into audience types. I think the other answers describe them well. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Content type: &lt;br&gt;&#xA;Are you going to do step-by-step tutorials? Or are you just looking to provide high-level overviews? Or maybe a mix of both? From personal experience, step-by-step guides are better as articles because you don't have to worry about stopping and starting a video. Also, are you just doing tutorials? Or are you going to do something else (i.e. interview web developers that are using the technologies you want to talk about on your blog)? In the case of interviews, video would be great with captions and/or a transcript.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Content creation frequency:&lt;br&gt;&#xA;Think about how often you will create and maintain your content? With YouTube videos for example, it's really important to be consistent so people know when they will get new content from you. Will it be easier for you to keep up with videos or articles? Also, think about if or how you will maintain/ update old content when new technologies are released or if you make a mistake in a tutorial.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I hope that helps! Have fun with the blog!&lt;/p&gt;&#xA;" OwnerUserId="5476" LastActivityDate="2018-07-05T17:55:46.603" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4929" PostTypeId="1" CreationDate="2018-07-08T17:36:05.430" Score="3" ViewCount="171" Body="&lt;p&gt;I'm a web design teacher and I teach 9th graders (14 year olds) in the US.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently the 9th grade curriculum in my HS programme teaches students CSS, HTML and JavaScript. Students can create buttons, forms, navigation bars, and other fun things at the end of the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was wondering - I want students to be able to get data from a database so they can inject data onto their websites.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there any easy to use database platform that would allow 9th graders to enter data easily (like Google Sheets), and pull data using client-side JS? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even better would be that there already exists an API for getting queries so I don't have to teach SQL?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just looking for ideas! Even instructions on how to build the service myself would be great.&lt;/p&gt;&#xA;" OwnerUserId="3990" LastEditorUserId="1293" LastEditDate="2018-07-08T17:46:07.800" LastActivityDate="2018-07-23T15:51:46.647" Title="Easy to use database for HS students" Tags="|web-development|databases|sql|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4930" PostTypeId="2" ParentId="4929" CreationDate="2018-07-09T08:42:36.513" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there any easy to use database platform that would allow 9th graders to enter data easily (like Google Sheets), and pull data using client-side JS?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Given that you're thinking about Google Sheets as a data entry method, I understand that your goals don't extend to getting the students to implement server-side form handling. But in that case, why do you need a database? It seems to me that the requirements given can be met perfectly well by a hand-coded JSON file.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2018-07-09T08:42:36.513" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4931" PostTypeId="2" ParentId="4781" CreationDate="2018-07-09T10:25:30.250" Score="2" Body="&lt;p&gt;He’s still young let him do his thing maybe in the future he will find joy in programming maybe he will change his mind , I think you cant make someone find something fun and enjoyable if they think it’s not. &#xA;You can make it all fun but if he doesn’t find it fun you cant do anything about , you said he’s good at programming maybe because he is young he find it boring,  just wait till he is in his 20’s or erailer his attitude will change,&#xA;You can try to compete with him it would be fun if he is a competitive person. &lt;/p&gt;&#xA;" OwnerUserId="5489" LastActivityDate="2018-07-09T10:25:30.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4932" PostTypeId="1" AcceptedAnswerId="4933" CreationDate="2018-07-10T03:38:29.237" Score="11" ViewCount="405" Body="&lt;p&gt;Background: I’m not entirely a CS educator, but I did run into a debate on whether programming contests are good for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of people around me have fun in programming contests. Usually, those contests require participants to “solve” several problems (like 7 to 8) within certain time (2 to 3 hours). Students are ranked by their scores, calculated from the number of problems they are capable of solving, and then the time spent. There are test cases on the submission system to which students have to submit their source files, and the submission “passes” when it compiles to a program which passes all the test cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given all these, while students are (probably?) good at problem solving skills, there are several problems:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Students focus too much on the time spent on writing their programs. Therefore, they employ a lot of poor practices. For example, they always use short variable names, universal headers (#include ), using namespace std; etc in order to speed up their typing. They claim that iostream is implemented on top of C’s stdio and so they use printf even in C++.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They always put extra assumptions. For example, while they know how to find the “unpaired” integer in an integer array (by taking the XOR sum), they won’t think of how to check whether the array has only one unpaired item. Also, they usually allocate large arrays in advance and skip bounds checking (they believe the array is large enough), which create concerns in both program stability and security.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They don’t understand how to maintain a large project. Since OOP (usually) requires them to type more, they, for example, manipulate raw arrays with a part of custom heapsort algorithm, instead of creating a struct representing a heap, when they are writing in C. While sometimes OOP is unnecessary, for them code reuse is either impossible or requiring a lot of copy-and-paste.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5491" LastEditorUserId="5491" LastEditDate="2018-07-10T13:46:24.507" LastActivityDate="2018-08-01T20:28:54.560" Title="Are programming contests beneficial to students?" Tags="|best-practice|project|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4933" PostTypeId="2" ParentId="4932" CreationDate="2018-07-10T10:05:42.633" Score="6" Body="&lt;p&gt;While I think that all of your observations are correct, there are other considerations. I'm not a big believer in these contests, nor in the kinds of problems that students are asked to solve in them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the issue of student enthusiasm for programming (as a part of CS) is also very important. IF you have a bunch of students who need external motivation such contests can, perhaps be helpful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, the &quot;take no prisoners&quot; ultra competitive attitude that is exhibited by many young males is a negative consideration. A more cooperative environment would be better preparation for future endeavors in CS, I think. Some competitions, I note, are for teams, not individuals. And competition against your own self is likely a good thing whereas competition against the &quot;other&quot; has a down side. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, I worry a bit about preparation for these contests. If your class attends to the issues 1-3 (and others) that you list, you are likely doing a good job. However, if the entire course is spent in working on small, tricky problems (Solving NIM, I call it), then the students aren't really learning what it is to be a &quot;player&quot; in CS. Only a very small fraction of the time spent by a professional or an academic in CS is spent on such &quot;cute&quot; problems. Sometimes that way of thinking can be very helpful, but not very often. Structure, correctness, usability, extendability, etc. are all more important in general. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I note that the OOPSLA conference (later SPLASH) of ACM used to have a Design Fest in which teams of folks (adults) would create an OO design of a fairly large system. This sort of thing can be competitive or not, but doesn't involve coding. Later they added Code Fest in which other teams would implement some design from a Design Fest. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-07-10T10:05:42.633" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4934" PostTypeId="2" ParentId="4932" CreationDate="2018-07-10T17:09:31.983" Score="8" Body="&lt;p&gt;Programming contests are useful for some students in some contexts, but they're harmful to other students in other contexts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Contests are useful for students who already self-identify as programmers, are motivated by competition, and enjoy the high-stress environment of a competition. But like you said, the skills acquired by participating in programming contests aren't always useful outside of that environment. I'll also note that your examples are all very math-oriented, so the contests might be geared towards students with a more mathematical background.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they're less useful for students who are not motivated by competition. Notably, students from under-represented groups or who don't self-identify as programmers are &lt;a href=&quot;https://www.huffingtonpost.com/entry/a-grand-challenge-reimagining-competitions-for-the_us_58701d23e4b0a5e600a78aca&quot; rel=&quot;noreferrer&quot;&gt;less likely to participate in these&lt;/a&gt;, and requiring them to participate can actually discourage them from pursuing computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, while programming competitions might be one small part of a course, I'd recommend balancing it with other activities that might help other types of students, and pointing out the problems with &quot;competition code&quot; that you mentioned in your question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd also recommend focusing on &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hackathon&quot; rel=&quot;noreferrer&quot;&gt;hackathons&lt;/a&gt;&quot; or &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Game_jam&quot; rel=&quot;noreferrer&quot;&gt;game jams&lt;/a&gt;&quot; more than competitions. These have the fun and motivation of a competition, but it's more of a collaborative / cooperative environment. This can be beneficial to students regardless of whether they already self-identify as programmers.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-07-10T17:36:27.337" LastActivityDate="2018-07-10T17:36:27.337" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4936" PostTypeId="2" ParentId="4932" CreationDate="2018-07-16T03:09:57.120" Score="1" Body="&lt;p&gt;Time pressure is a given in industry.  Schedules are driven by a number of factors - company cashflow, legal requirements, changing business environment - which have non-negotiable time constraints. Even professionally, programmers have to make a snap decision about speed versus robustness, and there are often times that speed is critical and you can come back for robustness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any student that wrote their own heapsort in the middle of a time constrained project should lose marks unless it can be demonstrated that it required less time to build and gave a better result than the facility built into the language. Unless you have Dijkstra Version 2.0 in your class, I would not expect this to be an issue (but leave the door open for appeal just in case).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good code is time saving code. Using Java as an example (given my handle, you can guess why, but equivalent practices work in almost any programming language), you can design in javadoc and interfaces, then implement the interfaces. This allows you to follow a complete waterfall methodology (ugh!) with documentation, yet still code at turbo speed and produce robust code. &lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-07-16T03:09:57.120" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4937" PostTypeId="2" ParentId="4904" CreationDate="2018-07-16T17:32:28.800" Score="3" Body="&lt;p&gt;The answer to this question is highly dependent on which courses you are interested in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Courses focused on fundamentals can benefit from these older materials. Of course algorithms and discrete math (including graphs) fall into this category but even more &quot;applied&quot; courses such as OOP or Operating Systems can benefit from these older books/courses. Some examples may be outdated, but the ideas and skills developed are (probably) still valid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Course in hot research areas (ML or AI, Computer Vision, etc) can still benefit, but will also need varying degrees of complementary material. If the courses are introductory, though, the amount of useful content is still large. No one will remotely understand the latest Deep Learning model without some fundamentals in probability and optimization and these can be easily found in older material.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only situation where old material does not help, IMHO, is in predominantly technical courses, like Web development or Cloud computing. Regarding Computer Networking, if you just want to learn some concepts then a book, even if older, would be more than fine. Most of the underlying stuff has not changed much  in the last years. The practical aspects are more complicated to self educate since they may require a lab (or many VMs) to experiment and are highly technical, so you would need up to date materials. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2018-07-16T17:32:28.800" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4938" PostTypeId="2" ParentId="4929" CreationDate="2018-07-17T03:45:06.740" Score="0" Body="&lt;ol&gt;&#xA;&lt;li&gt;Google sheets is not a database. I'd yank my kids from any class that pretended that so fast the friction would burn the tile floors&lt;/li&gt;&#xA;&lt;li&gt;Using client end JavaScript to talk directly to the database is poor design for many reasons. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Microsoft Access is about as clean a teaching tool as you can get for introducing databases. IT folk love to hate it, but it is the reason that nosql solutions were neglected for nearly two decades. In the hands of a pro, it tunes up much like DB2, and you can perform most functions without writing the SQL yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're concerned about the bad habits that Access programmers develop, the big 3 (Oracle, DB2, and SQL server) have free versions available. Postgresql is open source and robust enough that it can compete head to head with the big 3. However, of you go this route you will have to teach SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you choose a &quot;nosql&quot; solution, you will have to teach the DSL for the nosql solution, which will not be less than the effort of teaching SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My 7 year old son is learning Java from an online self study course (and as a java programmer I am watching what he's learning so I know it's good), so there is no reason a motivated 14 year old can't learn a server side framework, which will provide the correct decoupling and connectivity for a serious web spp. 14 year old programmers are regular contributors to the open source MMORPG game engines such as Trinity (World of Warcraft enulator), programming in C++, SQL, and Lua.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might check out nodeJs if you don't want to get out of the JavaScript world.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-07-17T03:45:06.740" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4939" PostTypeId="2" ParentId="4929" CreationDate="2018-07-17T15:27:14.763" Score="-1" Body="&lt;p&gt;You can try to use browser storages to explain some concepts of storing and retrieving data: cookies, local storage, session storage or even WebSQL. &lt;/p&gt;&#xA;" OwnerUserId="5509" LastActivityDate="2018-07-17T15:27:14.763" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4940" PostTypeId="2" ParentId="4464" CreationDate="2018-07-19T15:03:22.843" Score="2" Body="&lt;p&gt;A suggestion would be to include in the project grade a component that evaluates collaboration and make it so a group with a lone ranger fails the project or is assigned a barely passing grade. Make this explicit the moment the project is proposed, emphasize it during its execution and explain how they will be evaluated in this regard. For instance, the University of New Orleans published a &lt;a href=&quot;http://www.uno.edu/general-education/collaboration-rubric.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;collaboration rubric&lt;/a&gt; that can be readily used by the instructor (or students) to evaluate the collaboration abilities of a student. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If possible, ask students themselves to evaluate the how well their partners collaborate. There is some scientific evidence (&lt;a href=&quot;https://www.sciencedirect.com/science/article/pii/S1096751611000492&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;https://www.tandfonline.com/doi/abs/10.1080/135625100114885&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt;) that peer assessment activities can be beneficial to grade individually according to participation in group projects. These papers also contain rubrics that could be adapted to your context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is important to communicate to students that collaboration means doing what is best for the team, not doing tasks physically together. If the objective of the team is learning, completing a project alone without any input from the other members is not what is best for the team, so it is not good collaboration. However, completing, individually, a task that is valuable for the team and synchronizing its execution with the rest of the work is good for the team, so it is good collaboration (as pointed out by @pojo-guy's answer). The key here is not &lt;em&gt;individually&lt;/em&gt;, but &lt;em&gt;valuable for the team&lt;/em&gt; and &lt;em&gt;synchronizing&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2018-07-19T15:03:22.843" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4941" PostTypeId="2" ParentId="4929" CreationDate="2018-07-23T15:51:46.647" Score="1" Body="&lt;p&gt;There are some websites that have free APIs. One is &lt;a href=&quot;https://jsonplaceholder.typicode.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;JSONPlaceholder&lt;/a&gt;, but you can easily request access to some others. For instance, &lt;a href=&quot;https://developers.strava.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Strava&lt;/a&gt; offers some for those interested in developing applications from running / swimming / biking data; all you need is an account, which can be made at no cost!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in regards to the challenge at hand, you could use these online APIs in lieu of  a database or a database platform. This would allow your students to learn about HTTP requests (or the like) and how these can be sent from and used by client-side JavaScript. But, perhaps more importantly, this confines the scope of the class to front-end technologies and methodologies, rather than delving too much into back-end techologies and databases, restricting this only to APIs. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Now, depending on &lt;em&gt;your&lt;/em&gt; knowledge, if you have some web development experience or are willing to learn about it, I recommend using &lt;a href=&quot;https://nodejs.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Node.js&lt;/a&gt; and setting up a localserver on your network, or perhaps on a hosting platform (e.g. &lt;a href=&quot;https://firebase.google.com/docs/hosting/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Firebase&lt;/a&gt;, which I believe is free). From here, you can set up routes which handle HTTP requests, or the like, from which your students can send GET requests to. And since &lt;em&gt;you&lt;/em&gt; would set up the routes and the data to be returned, you could tailor and personalize the data and the routes to the students (e.g. have a hypothetical endpoint &lt;code&gt;&amp;lt;YOUR-FIREBASE-APP&amp;gt;.firebaseapp.com/Jeremy&lt;/code&gt; which would return info about your student Jeremy).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My opinion? As a student, I would not only be impressed by a teacher who could do something like this, but also personally intrigued as to how routing and servers work. But, hey, maybe that's just me :)&lt;/p&gt;&#xA;" OwnerUserId="5264" LastActivityDate="2018-07-23T15:51:46.647" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4942" PostTypeId="2" ParentId="17" CreationDate="2018-07-25T18:12:41.197" Score="3" Body="&lt;p&gt;This is an old question with lots of answers, but a new one just occurred to me: long division. The benefit here is that most students will already be familiar (and hopefully comfortable) with the mechanics of it, so &quot;recursion&quot; is just another way to talk about something that's already familiar.&lt;/p&gt;&#xA;" OwnerUserId="65" LastActivityDate="2018-07-25T18:12:41.197" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4943" PostTypeId="2" ParentId="17" CreationDate="2018-07-26T17:53:09.767" Score="1" Body="&lt;p&gt;Pretty late to see this. Thought to add my two cents as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recursion simply reminds me of the barber shop (provided he has parallel mirrors on either side of you) where we used to observe the array of mirrors (&lt;em&gt;Fun Fact: once even counted them uptil 83 until they were no more visible&lt;/em&gt;). Also, during matches, when often cameraman used to pan at the giant-screen and we used to see the array of screens in it (all recursively).&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2018-07-26T17:53:09.767" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4944" PostTypeId="1" CreationDate="2018-07-31T06:46:04.057" Score="6" ViewCount="134" Body="&lt;p&gt;Every year for the past few years, I've been mentoring at Scratch Day, helping the kids with their projects during the course of the workshops. The problem? This takes place in my second language, which I don't use Scratch in. Since I don't regularly find myself using Scratch in that language, I don't really remember the words from year to year, and I'll find myself often going &quot;the one under that one&quot;, or &quot;the pink section&quot;, or of course &quot;thingy&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does this have a negative effect on the students if I'm not using the terms that they'll be using, because I don't know how to translate them exactly? Especially since for some of these kids, it's the first time they're using the platform.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The site itself and everything they're doing has the correct terms; it's just me stumbling giving them the wrong names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this actively harmful, or just something that it'd be nice for me to work on, but not imperative?&lt;/p&gt;&#xA;" OwnerUserId="5" LastActivityDate="2018-09-30T21:43:13.030" Title="How important is it that I know all of the words for the technical terms when mentoring in my second language?" Tags="|scratch|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4945" PostTypeId="2" ParentId="4944" CreationDate="2018-07-31T10:56:49.610" Score="5" Body="&lt;p&gt;Words matter. The problem is that the kids need to communicate the ideas to one another and to teachers, etc. They also need a way to integrate their Scratch experience into a larger programming set of ideas that they can carry with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is good that you are trying to help, but you need to prepare yourself better first. Build a quick-look glossary for yourself that translates the terms in your native language into the one the kids are speaking. Scratch menus and documentation can help you do this, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you work, keep a few index cards and a pencil so that you can extend the vocabulary as needed. The glossary itself shouldn't require you to leave the Scratch environment for lookup. Paper is actually good for this - more index cards, perhaps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another trick you can use, perhaps, depending on the age of the kids, is to have them tell you the names of the terms when you stumble. Make a note of their answer (check its accuracy), and work hard not to stumble there again - more index cards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imperative? Probably yes. Or nearly so. But don't lose your enthusiasm for working with kids. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm a bit of an advocate for the use of index cards everywhere, by students and instructors. There is a description of the &lt;a href=&quot;https://cseducators.stackexchange.com/a/1168/1293&quot;&gt;Hipster PDA&lt;/a&gt; in the answer to another question here. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-07-31T13:52:05.633" LastActivityDate="2018-07-31T13:52:05.633" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4946" PostTypeId="2" ParentId="4944" CreationDate="2018-07-31T13:21:58.143" Score="4" Body="&lt;p&gt;First of all, kudos to you for teaching Scratch to kids!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vocabulary forms tokens of ideas that we can pass on to one another, and it is no coincidence that much of early childhood is spent with a parent telling a child, &quot;this is a doorknob&quot;, and &quot;this is a can opener&quot;. These identifiers allow us to summon, link, and morph ideas. We organize our thinking around names.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Stephen H. Webb &lt;a href=&quot;https://www.firstthings.com/web-exclusives/2008/08/completing-adams-task&quot; rel=&quot;nofollow noreferrer&quot;&gt;beautifully wrote&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Collecting, naming, and organizing things¯anything, from banana labels to dachshund paperweights¯seems to be built into human nature. At least, that’s what the Bible tells us. The first task God gave Adam was the naming of the animals. God “brought them to Adam to see what he would call them” and “the man gave names to all cattle, and to the birds of the air, and to every animal of the field” (Gen. 2:19“20). No matter how you imagine this scene, its meaning seems clear enough. The gift of language is what separates us from other species. We can name them, but they cannot name us.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Proper words will help your students enormously when they move on to their next programming language. Without the vocabulary to act as accessors to the ideas that they have understood in your workshop, students will have to independently make connections by linking the underlying ideas. This is cognitively taxing, and only some of them will manage to do this. The others will have to relearn the ideas in the new context from scratch. (No pun intended.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-07-31T13:28:24.813" LastActivityDate="2018-07-31T13:28:24.813" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4947" PostTypeId="1" AcceptedAnswerId="4949" CreationDate="2018-07-31T23:13:30.360" Score="6" ViewCount="1249" Body="&lt;p&gt;Both Carnegie Mellon University (CMU) and Yale are top schools. (I attended both; one as an undergraduate, one as a graduate student, neither as a CS major). Their curricula aren't all that different. Yet CMU's CS program is far more highly regarded than Yale's. (And I'm beginning to think that this view is not about the &quot;program&quot; but something else.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing that I did notice, or feel, is that CMU's CS department seemed more &quot;authentic.&quot; That is, their CS students really seemed to &quot;bond&quot; with the program. The attitude of Yale's typical CS student seemed to be more like that of &quot;doing a job.&quot; Assuming, as I do, that the students are roughly the same caliber, what could be the differences in teaching that give one group of students more enthusiasm or passion than the other?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Between two highly regarded schools with not too different CS programs, what are the &quot;intangible&quot; factors of one over the other that would produce two crops of students that are very differently regarded by Silicon Valley?&lt;/p&gt;&#xA;" OwnerUserId="613" LastEditorUserId="613" LastEditDate="2018-07-31T23:21:59.177" LastActivityDate="2021-04-22T03:53:48.160" Title="What are the &quot;intangibles&quot; that distinguish one university's CS program from another?" Tags="|undergraduate|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4948" PostTypeId="2" ParentId="4528" CreationDate="2018-07-31T23:33:33.827" Score="0" Body="&lt;p&gt;A portfolio is basically a demonstration of your work ability, so it should mainly include &lt;em&gt;working&lt;/em&gt; projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not homework, not scratch work, not &quot;mock ups.&quot; But something that is actually functional, and implicitly answers the question &quot;What can you do for me?&quot;&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2018-07-31T23:33:33.827" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4949" PostTypeId="2" ParentId="4947" CreationDate="2018-07-31T23:41:29.627" Score="6" Body="&lt;p&gt;While I know a few CMU faculty (and none at Yale) I don't really know anything about their programs. However, I will speculate that much of the difference is in where the graduates wind up later and what they do. How many earn doctorates? How many go on to become movers and shakers in the computing world. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, many of the faculty at CMU are world leaders in their fields, though that is also true at Yale. (Some Yale faculty graduated from CMU, actually). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the biggest factor may just be the relative size. CMU has quite a lot larger faculty in CS than Yale. It has six designated faculty specialties, some of which are larger than the entire Yale faculty. The size leads to a lot of synergy, especially as the CMU faculty aren't limited to one &lt;em&gt;specialty area&lt;/em&gt; and several contribute to more than one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CMU also has a number of associated institutes, mostly government funded, to do important research. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I doubt that the quality of education at Yale at the undergraduate level is much different from that of CMU, however. But the same can be said of many other institutions as well. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-08-03T18:25:52.200" LastActivityDate="2018-08-03T18:25:52.200" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4950" PostTypeId="2" ParentId="4947" CreationDate="2018-07-31T23:54:28.833" Score="7" Body="&lt;p&gt;Fair warning, I am not intimately familiar with the programs, and my answers are based in some stereotypes of the institutions and the CS programs.  However, given that my answer is based on student selection, institutional reputation may not be a bad way to think about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While Yale is, by any measure, a top-tier institution, CMU is (at least by reputation) possibly the top computer science program in the world, and at an institution that is otherwise ranked lower than Yale.  I would expect, then, that self-selection among students would play a huge part in this. The sort of student who would aim for CMU for CS would be doing it because the opportunities for CS at CMU particularly appeal to them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By contrast, the sort of student who would aim for a CS degree at Yale would be the sort of student who is aiming at Yale first, and also wants to major in CS.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="613" LastEditDate="2018-08-01T02:30:43.467" LastActivityDate="2018-08-01T02:30:43.467" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4951" PostTypeId="2" ParentId="4944" CreationDate="2018-08-01T10:56:36.793" Score="2" Body="&lt;p&gt;How about flipping it around: People don't learn when you just tell them what to do. So when you are asked a question, answer with a question, for example “What section will you find that in?”, ”show me how you would do that.” (Have them be the cat).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As teachers we are told not to be the source of all knowledge, to facilitate. Every time I have a weakness, I ask how can I use this to encourage me to teach better. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-08-01T10:56:36.793" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4952" PostTypeId="2" ParentId="4932" CreationDate="2018-08-01T20:28:54.560" Score="1" Body="&lt;p&gt;Some will love it, a few will excel, most will hate it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Around here we have elective courses preparing for programming contests. They cover more advanced algorithms, more in-depth C++ (or Java, or what have you) and do &lt;em&gt;lots&lt;/em&gt; of &quot;hands on&quot; training (e.g. solving problems to be submitted to online judges).&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-08-01T20:28:54.560" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4953" PostTypeId="2" ParentId="4916" CreationDate="2018-08-01T20:36:36.933" Score="0" Body="&lt;p&gt;Our computer labs boot remotely from tailored images for each course. That way you can select exactly what to run during your class without messing up what the next instructor wants. It has the added benefit to lower maintenance cost (just update/modify one image, not dozens of machines). You might add configuration for local firewalls to only allow access to select sites.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-08-01T20:36:36.933" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4954" PostTypeId="2" ParentId="4904" CreationDate="2018-08-01T20:48:37.807" Score="2" Body="&lt;p&gt;Re: expensive books: There are hundreds of lecture notes floating around, ranging from awful to outstanding. Check them out too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Re: oldish material: I've used much older texts (up to 20 years old). It very much depends on the subject matter. For the standard CS fare (regular expressions and languages, algorithms, combinatorics, complexity, most of computer architecture and operating systems) it just doesn't matter. For much programming, say in C++, the language has changed &lt;em&gt;a lot&lt;/em&gt; recently, an old C++ text just won't do. For cutting edge stuff, graduate level material, I'd go with the old saying: Today's research will be discussed in next year's conferences, the paper will finally show up two or three years after that, and it might get integrated into a textbook some five years later. By Moore's law, most of it will be last year's run-of-the-mill by then.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2018-08-01T20:48:37.807" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4955" PostTypeId="2" ParentId="4922" CreationDate="2018-08-02T21:32:04.317" Score="3" Body="&lt;p&gt;Just one additional argument for the articles version:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To follow a video, you have to turn on audio output. Many professional developers share their office with their colleagues. To not disturb the other ones, they can't just use their PC's speaker. They must resort to headsets to follow a video.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For that reason, I typically have the audio of my workplace PC completely switched off.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2018-08-02T21:32:04.317" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4956" PostTypeId="2" ParentId="4875" CreationDate="2018-08-03T00:49:45.623" Score="5" Body="&lt;p&gt;I think sometimes it's because they don't even know where to begin, and when you think about it, this makes sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider an average student. (I'm going to use a lot of math examples because a. I just reread &quot;A Mathematician's Lament&quot; and b. I'm reading a great book called Burn Math Class that explains calculus in the best way I have ever read, and then proceeds to prove a bunch of &quot;elementary&quot; math stuff with it - very cool.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They've spent most of their time in class watching a teacher put up a problem and then explain how it is solved, assign a similar-but-not-quite problem to use a similar approach on, and maybe help struggling students with the homework. They've not often seen their teacher truly struggle with a problem at the board with them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if they are lucky enough to have seen this, the teacher is (generally, hopefully) the teacher for a reason: they know what they're doing, and thus the methods used to approach the problem can get lost in the speed. Decisions made in how to approach the problem, etc, aren't mentioned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I'm not quite talking about problem solving techniques, although I'm talking about those too. I'm talking about the process more. The book I'm reading talks about &quot;pre-mathematics&quot; - the stuff you do to approach the problem, the preparation before the solution comes to mind and is cleaned up and published or written on the blackboard or what have you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the way the author approaches a proof of the formula for the area of a rectangle is very interesting and different from any other approach (admittedly, all other approaches I have seen have been &quot;this is so, now deal with it&quot;) - he talks about intuitively, what properties area &lt;em&gt;must&lt;/em&gt; have, then mathematically defines those properties, then uses a functional equation to solve for area, shows how unit conversion comes out of the mathematics...it's rather impressive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or consider how the author talks about the definition of slope - he talks about how there are other possible formulas, like run/rise, or whatever, but why the particular version used was chosen. It's all explained, the process of defining and proving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, do something similar with your class, perhaps. Pick a problem that is at the student's level that you don't really know how to solve, and go after it - but slowly, explaining your thought process every step of the way, why you're picking the tools you're using, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, maybe you wish to approach creating a calculator app of some sort. Talk with your students - why is OOP efficient? Would that apply in this case? Is the program going to be small enough that a procedural program would be quicker to write and not lose much readability? What are the design requirements? Hold a Socratic-method type session, with you guiding. Do this and ask less and less pointed questions, progressing to calling on people to approach the problem as best they can. Perhaps let other people lead the Socratic questioning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show them how to begin.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2018-08-03T00:49:45.623" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4957" PostTypeId="2" ParentId="4585" CreationDate="2018-08-03T12:08:35.160" Score="1" Body="&lt;p&gt;To thwart cheating, and also to give some leeway to honest mistakes, we select a few students &quot;at random&quot; and their grade isn't for what they turned in but for one-on-one explanation of what they turned in/should have done. I'm interested in them showing they know the stuff, if they copied it from elsewhere is secondary. The risk of getting asked to explain the hand in on short order makes them at least look over it.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastEditorUserId="5219" LastEditDate="2018-08-03T12:43:26.693" LastActivityDate="2018-08-03T12:43:26.693" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="4958" PostTypeId="2" ParentId="1157" CreationDate="2018-08-03T15:51:48.990" Score="0" Body="&lt;p&gt;Just to elaborate on some of Peter's excellent points. I would use Code Org for two reasons: 1) Because it is a &quot;common&quot; curriculum, and 2) because it prepares students for the AP test. You are &quot;teaching to the test&quot; but that's what you are being paid to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to develop a challenge for the better students, give a test at the end of the first week or so. Then instead of measuring &quot;absolute&quot; achievement at the end of the course, measure everyone's &quot;relative&quot; achievement, compared to the week one test results. That's how you can develop curriculum modifications for the better students. Also, a person that did &quot;poorly&quot; on the first test but reached level X by the end of the course will get a higher grade than someone who did well on the first test and only reached the same level.&lt;/p&gt;&#xA;" OwnerUserId="613" LastActivityDate="2018-08-03T15:51:48.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4959" PostTypeId="2" ParentId="4757" CreationDate="2018-08-03T17:12:18.497" Score="3" Body="&lt;p&gt;I mean...limits aren't too bad. You could always just explain limits too.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Limits, intuitively, are a way to &quot;approach&quot; a number when you can't actually reach it because your expression would be undefined. For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;$$\lim_\limits{x\rightarrow 0} \frac{1}{x}$$&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One cannot just plug 0 in for $x$ - the answer is undefined. So we must &quot;approach&quot; the solution using the limit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are several different methods for solving limits. Most are detailed in &lt;a href=&quot;https://www.youtube.com/playlist?list=PLvzISak05GidnARGdE7_Vpo_Ru6iIMwDl&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; great series of YouTube videos. (I also have some old notes on the subject &lt;a href=&quot;https://github.com/physicsnerd/calculus-notes/blob/master/tex-files/limits.tex&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;; obligatory &quot;these are old and out of date&quot; warning.) I could imagine giving this intuitive explanation, showing a few examples of what it means, watching the videos with the class (or explaining the points in your own way) and doing a bunch of practice problems, and then the students being fine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also, of course, show them the epsilon-delta formalization if you feel it's necessary.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2018-08-03T17:12:18.497" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4960" PostTypeId="2" ParentId="4947" CreationDate="2018-08-03T17:43:51.073" Score="2" Body="&lt;p&gt;Here is my standard advice.  Spending the price of a house on an undergraduate degree is a stupid mistake.  One of two things happens.  You lug around a giant slug of debt until you are 50, or your parents are treated to a nine-lives retirement.  This advice is inapplicable if you have $300,000 sitting around to burn.   If you can get a big scholarship that makes the price unstupid, you can go for it then, too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be smart. If your state has a quality university system, avail yourself of it.  Follow the advice in Joel Spolsky's article (&lt;a href=&quot;https://www.joelonsoftware.com/2005/01/02/advice-for-computer-science-college-students/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.joelonsoftware.com/2005/01/02/advice-for-computer-science-college-students/&lt;/a&gt;).  Try to get a co-op or internship and gain some real experience in undergraduate school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When do you get interested in the big-name schools?  This is for graduate school if you deem that necessary. If you are a star, someone else will be paying the freight for you to study.   In graduate school, you can gain access to the big-name professors in a reasonably small class.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-08-03T17:43:51.073" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4964" PostTypeId="2" ParentId="4528" CreationDate="2018-08-07T17:56:05.750" Score="2" Body="&lt;p&gt;One particularly nice, if a bit flashy, suggestion a supervisor once gave me for students to showcase their work is to build a phone or watch app. That way when an employer asks &quot;what can you do for us?&quot; you simply whip out a phone app, hand it to them, and say &quot;there you go&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps not so brazenly, but you get the point!&lt;/p&gt;&#xA;" OwnerUserId="5561" LastActivityDate="2018-08-07T17:56:05.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4965" PostTypeId="2" ParentId="3105" CreationDate="2018-08-09T03:26:15.950" Score="2" Body="&lt;p&gt;The blog &quot;&lt;a href=&quot;https://prog21.dadgum.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Programming in the 21st Century&lt;/a&gt;&quot; has several posts that are interesting and suitable for students. I like to show my students the post &quot;&lt;a href=&quot;https://prog21.dadgum.com/52.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Slow Languages Battle Across Time&lt;/a&gt;&quot;, and then recommend them to read everything else on that site when they have free time. For the same idea but for memory, the great post is &quot;&lt;a href=&quot;https://prog21.dadgum.com/29.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;A Spellchecker Used to Be a Major Feat of Software Engineering&lt;/a&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I use &lt;a href=&quot;http://www.scs.ryerson.ca/~ikokkari/jex/Mandelbrot.java&quot; rel=&quot;nofollow noreferrer&quot;&gt;a Mandelbrot renderer&lt;/a&gt; (needs &lt;a href=&quot;http://www.scs.ryerson.ca/~ikokkari/jex/BigComplex.java&quot; rel=&quot;nofollow noreferrer&quot;&gt;BigComplex.java&lt;/a&gt;, and note that you can press the Stop button and drag mouse to select zoom area inside window) as a big example in the second programming course (there is parallelism, graph search and strategy pattern stuff going on), the first 1980 visualization &lt;a href=&quot;https://en.wikipedia.org/wiki/Mandelbrot_set&quot; rel=&quot;nofollow noreferrer&quot;&gt;on the Wikipedia page&lt;/a&gt; makes a nice comparison to that, as do the tales of using &lt;em&gt;Fractint&lt;/em&gt; on a basic 4 MHz PC machine when I was but a teen to render the basic Mandelbrot image in many long crawling minutes. This simple Java renderer can then be similarly compared to those that were used to create the deep renders amply available on YouTube, and imagine how many human lifetimes my Java renderer would require to create those.&lt;/p&gt;&#xA;" OwnerUserId="3908" LastEditorUserId="3908" LastEditDate="2018-08-09T11:54:17.213" LastActivityDate="2018-08-09T11:54:17.213" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4966" PostTypeId="2" ParentId="4875" CreationDate="2018-08-09T13:22:18.850" Score="2" Body="&lt;p&gt;If you want to highlight some code of historical value don't expect the students to solve it. It probably took someone better trained and more talented than your students days, weeks, months or years to get it right.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep the material in line with what the students are supposed to be able to do. Presenting complicated problems that overshoots half the class is wasting time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Present all or almost all of the problem and let the students work from there.&lt;/p&gt;&#xA;" OwnerUserId="5571" LastActivityDate="2018-08-09T13:22:18.850" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4967" PostTypeId="2" ParentId="3105" CreationDate="2018-08-09T21:55:59.700" Score="3" Body="&lt;p&gt;I have 8k of genuine Ferrite core memory, on a circuit board of about 1 square foot. I show that, followed by an 8k static RAM chip (1970's), followed by an 8 GB SDRAM (1M times the storage capacity of the original board), followed by a 1 TB SSD (125x the storage on the SDRAM.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-08-09T21:55:59.700" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4968" PostTypeId="1" CreationDate="2018-08-10T07:00:12.493" Score="7" ViewCount="307" Body="&lt;p&gt;I apologize if this isn't the right kind of forum to ask this question, but I've been feeling helpless.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm in my 4th year in college as a CS major. However, I am horrible at programming (relative to my peers). I'm just not very smart in general and I'm extremely unconfident when given a programming assignment and during coding interviews.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of this, I've tried to go into finance but I'm already behind, starting so late (when all my peers have had investment banking, private equity internships for the past 2 years). Full time recruiting is going on right now, and I applied to both programming and finance positions, but I don't think I'm prepared for either type of interview. Even though I feel like I'm studying really hard, I don't feel like I'm getting any better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can people please recommend the best ways to study for these interviews in a short period of time?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried HackerRank but I'm really slow at solving problems and I don't feel I'm being efficient. How would you advise someone who's a complete beginner, i.e., knows basic data structures in C++ (and is also unfortunately not a fast learner) to prepare for coding interviews, in say, a week? (Other than just for a different field :( ) How would you break down each day of studying like? What sources would you recommend?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And any other advice would be really helpful - thanks for reading through&lt;/p&gt;&#xA;" OwnerUserId="5576" LastEditorUserId="2068" LastEditDate="2018-08-10T23:18:35.280" LastActivityDate="2018-08-16T05:36:32.510" Title="Advice for becoming more confident in programming" Tags="|self-learning|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4969" PostTypeId="2" ParentId="4968" CreationDate="2018-08-10T11:05:27.523" Score="10" Body="&lt;p&gt;I think you are probably asking the wrong question. You aren't going to become a good programmer in a week. Or a month. Maybe not in a year unless it is well structured. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice is to figure out what you are good at, not what you are bad at. Seek jobs that play to your strengths. Not every person that works in computing does so as a programmer, for example. I once told a student who was struggling in a hard course that she would probably wind up as the manager of all the superstar programmers in the class. Why? Because she asked the right questions. Often enough the question is more important than any answer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can't go back and undo the mistakes you made getting to where you are. But if you figure out your strengths and write applications that emphasize them and stress them in interviews you may be fine. Just don't suggest you are a programmer, nor stress that you are bad at it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-10T11:05:27.523" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4970" PostTypeId="2" ParentId="4968" CreationDate="2018-08-10T14:01:48.510" Score="3" Body="&lt;p&gt;The only way is practice, and to study what the best do. Look at Robert Martin, Test driven development etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However to do that you have to wont to do it. If you have no passion, then find something that you have passion for. If you have passion (that is you would do it for fun), then &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read about Test Driven Development.&lt;/li&gt;&#xA;&lt;li&gt;Practice coding Katas.&lt;/li&gt;&#xA;&lt;li&gt;Read about good programming style.&lt;/li&gt;&#xA;&lt;li&gt;Practice pair programming with a partner, that will let you learn. (A good way to learn tennis or any one on one sport, is to find an opponent that is way better than you, but is willing to play just a little better than you. They will always beat you, but by just a little. You will feel that you may beat them next time. And you will learn a lot. This is the sort of person you need to find, but good at programming.)&lt;/li&gt;&#xA;&lt;li&gt;Learn a new language, one from a different paradigm (when you know one quite well).&lt;/li&gt;&#xA;&lt;li&gt;Before learning C++, learn Eiffel. C++ is about one of the biggest and hardest languages that you can learn. (There are harder ones, but they are usually much smaller. C++ is hard and big.) It is faster to learn Eiffel, and then C# and C++ than to learn C++. That is the claim of Bertrand Myers, the created of the language, and a teacher at a University. He created it because he was frustrated with the lack of a good teaching language. There is a companion book called a “touch of class”. It is designed to help you learn OO using Eiffel. You can down load Eiffel from the Eiffel website (the GPL version is Free Software).&lt;/li&gt;&#xA;&lt;li&gt;Read about agile&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Taking short cuts is like driving a formula 1 car across the grass, because that is the straightest line to the finish; The quickest route is around the track.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-08-10T14:14:04.913" LastActivityDate="2018-08-10T14:14:04.913" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4971" PostTypeId="2" ParentId="4968" CreationDate="2018-08-10T19:36:42.843" Score="2" Body="&lt;p&gt;Well, it isn't going to happen overnight or in a week, so just let that idea go.  First, why do you want to go into software? Finance? that's easy, you want to make money.  Is it the same reason for software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you considered trying software sales?  May be a good blend of the two fields.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think exercises like LeetCode, HR, et al are tough because they are timed.  However, that's useful practice for a student.  Businesses aren't going to give you a sheet of homework problems and tell you to submit your answers in a few weeks.  Timed practice helps eliminate the paralysis by analysis that can plague some students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What has helped me is this: Start with simple problems on whatever practice platform you prefer.  Solve the simple problem.  Then go back and explain your answer, out loud, as if you're in an interview.  Move on to the next problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, you should be able to solve &lt;strong&gt;and&lt;/strong&gt; explain these simple problems within the time limit.  Don't half-ass your explanations either, get a partner if you need somebody to explain to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you're able to do simple problems like that, within time, explain them, know it cold, &lt;strong&gt;then&lt;/strong&gt; move on to moderately challenging problems.  Repeat the cycle, first be able to solve them, use your textbooks, slides, notes, whatever you need.  Then solve them with no extra resources.  Then explain your solution, within the given time limits.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once moderate problems are under your belt, go out and apply.  How long it takes you to get to that point however, that's impossible for anyone to map out.  A lot of those other students you are comparing yourself to, many of them started doing this sort of thing already, it just may not be apparent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, get some side projects that interest you.  Nothing motivates learning like a project you care about.  Employers aren't going to be paying you to solve coding challenge problems, keep that in mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a slog for many of us, only the very lucky few actually breeze through a CS degree.  Often times the work those other slogging students put in just isn't quite as apparent, don't compare yourself to their highlight reel.&lt;/p&gt;&#xA;" OwnerUserId="4467" LastActivityDate="2018-08-10T19:36:42.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4972" PostTypeId="2" ParentId="4968" CreationDate="2018-08-11T00:04:24.870" Score="4" Body="&lt;p&gt;Practice practice practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming is a lot like a craft, like playing the piano, or painting, or playing basketball. The only way to get better at it is by doing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you've been treating the last 4 years as something to get through, chances are you haven't given yourself the opportunity to get that practice. Just reading the books and doing the homework isn't enough: you need to play around, work on larger projects, figure out what you enjoy, and take a deeper dive into the topics you find interesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a huge topic, but in general here's the approach I'd recommend:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a portfolio page. This can be a basic &quot;hello world&quot; webpage to start with. The idea is to give yourself a place to put the progress you're making.&lt;/li&gt;&#xA;&lt;li&gt;Give yourself a project. &lt;a href=&quot;https://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;Start small.&lt;/a&gt; Smaller than you think is interesting. If you're interested in game development, then put together a Pong clone. If you're interested in finance, put together a data visualization of some of your favorite stocks. The exact project doesn't really matter, the point is to just &lt;strong&gt;try stuff&lt;/strong&gt; and see what you enjoy.&lt;/li&gt;&#xA;&lt;li&gt;Finish that project. Put it on your portfolio site. Then move onto a new project.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Each project should have a small scope: think a weekend of work, not a month of work. Use this pattern to explore a bunch of different topics. Try out different languages, frameworks, topics, etc.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I am horrible at programming (relative to my peers)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Stop comparing yourself to other people. You'll always find people who are better than you at something. Stop worrying about that, and spend your time figuring out what &lt;strong&gt;you&lt;/strong&gt; enjoy.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm just not very smart in general and I'm extremely unconfident when given a programming assignment and during coding interviews.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Being a good programmer is less about being &quot;smart&quot; and more about being willing to put in the time it requires to practice.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can people please recommend the best ways to study for these interviews in a short period of time? [...] How would you advise someone who's a complete beginner... to prepare for coding interviews, in say, a week? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You can't. You aren't going to learn how to program in a week. &lt;a href=&quot;http://norvig.com/21-days.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Teach Yourself Programming in Ten Years&lt;/a&gt; is a good read, although I wouldn't take it too literally. Different approaches work for different people, but the core argument is that you need to &lt;strong&gt;practice&lt;/strong&gt; coding to get better at it. This takes time.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How would you break down each day of studying like?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Stop giving yourself a deadline of one week. Put together a simple website this weekend. Next week, put together a basic program that demonstrates something you're interested in. Repeat that process for 6 months, and then you'll be more ready for an interview.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What sources would you recommend?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;There are a ton of resources on the internet designed to help you learn how to program. Google is your friend here. Googling &quot;basic html tutorial&quot; will return a ton of results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is going to require a commitment from you. It's not going to be an easy fix that you magically cram into a week. But if you keep at it, then you can find topics you're interested in and get more practice in those topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-08-11T00:04:24.870" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4973" PostTypeId="2" ParentId="4968" CreationDate="2018-08-13T11:41:46.010" Score="3" Body="&lt;p&gt;You are a beginner. Spend time in every area that you can to improve. You will get ahead more where you have talent, but don't forget the basics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Spend about &lt;strong&gt;two hours reading soft material, two hours coding and two hours learning hard stuff&lt;/strong&gt;. Spend the remaining time on what motivates  you about work/career at the time. Get proper sleep. Eat well. Meet another person at least every second day, minimum!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manage your stress levels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Prepare for the interview:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read up on all the bad things that happen during interviews and make sure you are aware of the pitfalls. Not failing a interview is all you need to get a job if you have the qualifications. Soft and hard questions!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get accustomed to the kinds of interviews and questions they ask.&#xA;In a week you can be better prepared than some interviewers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look in to the programs they may ask you to write AT the interview, and what they would be looking for in a answer. Its probably not what you expect. How you interact with the interviewer is key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Prepare for the programing test:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solve ANY problem you know how to solve and post it to codereview here on stackexchange, say its prep work for a interview. Fix all the problems pointed out and post it again. Repeat until its amazing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read the top 100 questions and answers on stackoverflow in programing and top 100 for c++. This is things that are interesting or many have struggled with. Knowing this makes avoids looking bad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Long term:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C++ is not for everyone. I struggled with c++ so bad I thought programing was not for me. My programs crashed all the time. I did not understand how anyone could make anything. Everything was hard. Now I code in Java and its easy as. Turns out pointer arithmetics is really hard and unintuitive. As is destructors, templates and macros.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also programing is not for everyone. But not every position where programing is wanted need to excel at coding. If you have soft skills and can be social with both nerds and &quot;normals&quot; there is lots of places that needs (even if they don't know it) bridging between the two.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Don't think you have wasted time, life is just starting and you are educated in a field with a massive demand.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5572" LastActivityDate="2018-08-13T11:41:46.010" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4974" PostTypeId="1" AcceptedAnswerId="4975" CreationDate="2018-08-13T13:40:52.193" Score="7" ViewCount="178" Body="&lt;p&gt;In my workplace, my team (working both on a ASP.Net MVC ecommerce and a C++ client) had a recent addition of two young members. One is a fresh graduate and the other worked as PHP programmer for some time. They're both kind of new to the ASP.Net world, along with all advanced concepts of ORM mapping, IIS configuration, performance issues and tricky-to-spot bugs. I'm the owner of the C++ side, and the other team member owns the ASP.Net side (on which I can work a little bit).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We, as senior team members, are expected to carry out our duties efficiently, and at the same time support the young ones in their gradual growth. They're doing their best, and our company allowed me a bit of dedicated time to spend for their education.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I collected my colleague's impression that the basis are already kind-of covered and what they really need to grow is to start thinking in a &quot;professional&quot; way (e.g. understanding the life cycle of a web application or HTTP request, or face a problem without relying entirely on the &quot;senior&quot; side).&#xA;I think these skills come naturally by spending time on the particular project / language / framework and only if one accepts (or is forced) to take responsibilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there ways to efficiently pass one's &quot;experience&quot; and &quot;problem solving attitude&quot;? Does sitting beside the young ones and working together on the same problem (almost always splitting the work like 70/30) help or hinder their growth?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for your time.&lt;/p&gt;&#xA;" OwnerUserId="5586" LastActivityDate="2022-10-12T11:46:39.350" Title="Best way to pass on the problem solving experience" Tags="|web-development|debugging|industry-training|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4975" PostTypeId="2" ParentId="4974" CreationDate="2018-08-13T14:39:38.750" Score="6" Body="&lt;p&gt;In places that use the ideas of agile software development, the usual way is to just let the newcomers pair with the more experienced members in all tasks. In your case it would consist of a lot of pair programming. But you would need to do it correctly. It isn't one person programming and the other person watching. Both participate, but in different ways. See &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0201745763&quot; rel=&quot;noreferrer&quot;&gt;Pair Programming Illuminated&lt;/a&gt; for a specific description or &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0321278658&quot; rel=&quot;noreferrer&quot;&gt;Extreme Programming Explained&lt;/a&gt; for a more complete description of the whole process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The experience of agile shops is that pairs produce about as much as people working individually (there is research to that effect) but with higher quality. (Specifically, the hypothesis that individuals produce more in total is not supported). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But more so, the newcomer is immediately introduced to the local process in an active way and can start to be productive much sooner. However, the experienced member of the pair will need to turn the keyboard over to the novice frequently (roles switch every several minutes, not hours), and both will need to learn to adopt to the individual roles of &quot;driver&quot; and &quot;navigator&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pairing combined with faithful use of test first development is especially productive of high quality software, but you need to actually practice the skills, not just talk about them. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-13T14:39:38.750" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4976" PostTypeId="1" AcceptedAnswerId="4978" CreationDate="2018-08-14T16:02:00.600" Score="8" ViewCount="549" Body="&lt;p&gt;I will be teaching AP Computer Science Principals this fall for the first time. I've decided to use the CS50 curriculum. (partially due to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1157/curriculum-choice-for-ap-computer-science-principles&quot;&gt;Curriculum choice for AP Computer Science Principles&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there (or are there multiple) teacher communities around providing support for using CS50 to teach AP CSP? &lt;/p&gt;&#xA;" OwnerUserId="5589" LastActivityDate="2018-08-16T04:57:30.963" Title="Teacher Community - Using CS50 for AP" Tags="|ap-cs-principles|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4977" PostTypeId="2" ParentId="4976" CreationDate="2018-08-14T16:30:57.973" Score="6" Body="&lt;p&gt;The APCS community maintains an active web site and mailing list. It has many users who ask and answer many questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start here to learn more: &lt;a href=&quot;https://apcommunity.collegeboard.org&quot; rel=&quot;noreferrer&quot;&gt;https://apcommunity.collegeboard.org&lt;/a&gt;. Find your community from there. Note that the site has separate lists for APCSA and APCSP. You can join several of the communities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to join (free) and then just ask for the experience of others with CS50. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-08-14T16:40:49.990" LastActivityDate="2018-08-14T16:40:49.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4978" PostTypeId="2" ParentId="4976" CreationDate="2018-08-14T16:49:56.807" Score="6" Body="&lt;p&gt;Yes, there is an email group dedicated to CS50 AP administered by Harvard. Reach out to the CS50 AP team (info &lt;a href=&quot;https://ap.cs50.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;), and they will get you connected there. It has been an invaluable resource for me the past two years as I’ve been teaching their curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to reach out (and post here!) if you have further questions about CS50 AP. I am a strong believer in the curriculum and the people behind it. &lt;/p&gt;&#xA;" OwnerUserId="76" LastEditorUserId="76" LastEditDate="2018-08-16T04:57:30.963" LastActivityDate="2018-08-16T04:57:30.963" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4979" PostTypeId="2" ParentId="4916" CreationDate="2018-08-15T07:32:42.633" Score="0" Body="&lt;p&gt;I hate to disagree with other answers, but I have the opposite point of view. I even teach workshops about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Me too sometimes teach intro to programming and in my case I can not teach without students having computers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have to accept how times have changed. We are dealing with a generation that was born with the Internet as a given and they have &quot;need&quot; to feel connected on-line because this is how it was since they started to read. Now whether we think this is good or bad is irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I assume a college environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what to do?. Adjust the way you teach in order to keep them engaged (not entertained, engaged). Here are few tips:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Of course there are the basics: they need to know why they are learning this in relation to real life. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you need to lecture, share &quot;lecture code&quot; and have them try it with you. .. this way you are not wasting time waiting for them to copy it down, and they are part of the lecture&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Always ask them questions individually and keep a toll. for example: &quot;John, what did you see when you ran the program?&quot; .. or &quot;Andy, tell us how you wrote the loop&quot;... etc. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If using LMS, randomly after say showing a code example, your next slide is the same with a missing couple of lines (related to the topic) and which you just explained in the earlier slide. Then tell them to write the missing code to get the example running and upload to an LMS dropbox. You can count these as quizzes.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In my case I also use tools I developed to allow me spontaneously ask students individually or collectively and keep track of points  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(FYI: the &quot;ask them random questions&quot; was the idea of my students when I was researching how to keep them engaged)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These were some of the tips in relation to technology. I can sum it as: keep them busy with you and expecting to be addressed at any moment. They actually see this as &quot;excitement&quot; (I would have never guessed that, only when I asked the students)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, I noticed a small mention related to classroom behavior: I too let my students work in pairs and encourage them to talk and help each other. However: there are rules. The rule in its simplest form is: when I talk no one else talks. If you have an unfinished discussion step outside and come back when you are done.  (I have no problem enforcing this rule when needed, never happened more than once per semester if any)&lt;/p&gt;&#xA;" OwnerUserId="3417" LastEditorUserId="3417" LastEditDate="2018-08-15T07:52:12.410" LastActivityDate="2018-08-15T07:52:12.410" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4980" PostTypeId="2" ParentId="4974" CreationDate="2018-08-15T09:36:16.487" Score="2" Body="&lt;p&gt;As well as pair programming, look at other agile/lean techniques.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Test Driven Development.&lt;/li&gt;&#xA;&lt;li&gt;What does done look like? / definition of done (scrum).&lt;/li&gt;&#xA;&lt;li&gt;Short release cycles (scrum).&lt;/li&gt;&#xA;&lt;li&gt;Minimise work in progress (scrum/kanban).&lt;/li&gt;&#xA;&lt;li&gt;Shared ownership (scrum/XP/lean).&lt;/li&gt;&#xA;&lt;li&gt;Local product owner (XP/scrum).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To teach Test Driven Development, you can start by writing the tests yourself (you probably will need to do the whole lot, including writing the production code, and then deleting it), and then pass this to the trainee to code, one test at a time. After this they can start creating their own tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are new to any of this, then take advantage. This will make you more equal, so take the journey &lt;strong&gt;with&lt;/strong&gt; the trainee. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-08-15T09:36:16.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4981" PostTypeId="1" CreationDate="2018-08-15T14:52:13.417" Score="9" ViewCount="245" Body="&lt;p&gt;I'm currently learning SQL (specifically T-SQL) and focusing on searching databases, not building/editing them. This is pretty much the first language I'm learning, so I don't have a CS background to draw on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've worked through the tutorials at &lt;a href=&quot;https://www.codecademy.com/learn/learn-sql&quot; rel=&quot;noreferrer&quot;&gt;Code Academy&lt;/a&gt; and &lt;a href=&quot;https://sqlbolt.com/&quot; rel=&quot;noreferrer&quot;&gt;SQLBolt&lt;/a&gt;. They gave me a great foundation into the basics but when I look at actual SQL searches in the database I'm using, they're much more complex than the ones in these tutorials and use query terminology that's never introduced, to the point that I'm somewhat overwhelmed and confused by just looking at them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of this is related to how simplistic the examples are in the tutorials and part is because the database I'm looking at is huge. Dozens of tables, some with 20+ columns each and lots of ways to compare the information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difficulty I'm having is that proficiency seems to require knowing what searches are &quot;easy&quot; with no actual experience... and then finding out what is even possible to simplify the search I'm trying to write.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Considering the complexity of the database I'm using and my current skill level, how can I ease into more complex searches while still finding the results I need from the information?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I do have people who are willing to help me as needed but I'm concerned about bothering them too much with stuff that should have been simple for me to solve on my own, particularly as they are quite busy. How can I determine what's simple and what's complex?&lt;/li&gt;&#xA;&lt;li&gt;Another part of this is that talking with someone isn't a great way for me to learn, as I quickly forget what they've said, so I don't retain the information. I want to learn what they're telling me, not just have it redone &quot;correctly&quot; for me. The tutorials have been good because they give me the chance to actually write the searches myself.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5592" LastActivityDate="2018-08-20T22:45:33.627" Title="In self-teaching, how can I move from basic tutorials to more complex work?" Tags="|self-learning|sql|" AnswerCount="5" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4982" PostTypeId="2" ParentId="4981" CreationDate="2018-08-15T18:18:53.130" Score="1" Body="&lt;p&gt;Since you have access to people who can help and who are more advanced than yourself, I'd suggest that you ask them, as often as you can, to give you a search task that you can carry out. If they start with only moderately difficult ones and work toward the more complex you will probably be able to figure it out with the practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, the best way to learn something is to practice it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also ask them to review your searches if you can't decide if they re correct, but this will increase the load on them. If these other people actually work with you then you can begin to be a better contributor. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-15T18:18:53.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4983" PostTypeId="2" ParentId="4981" CreationDate="2018-08-16T01:07:40.867" Score="1" Body="&lt;p&gt;&lt;strong&gt;One thing you can make for example, is participating in websites such as:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Stack Over Flow in english or even spanish &lt;/li&gt;&#xA;&lt;li&gt;giving answers to some questions, gives you the opprtunity to increase your level&lt;/li&gt;&#xA;&lt;li&gt;Obviously you can write a tutorial about the basics about SQL you have learned with topics such as:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;connection to the database&lt;/li&gt;&#xA;&lt;li&gt;creating and giving permissions to users&lt;/li&gt;&#xA;&lt;li&gt;sintax about Create/Read/Update/Delete data from your tables&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;After the basic level you can make much more for example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;learning sintax about CTE &lt;/li&gt;&#xA;&lt;li&gt;how to make and building pivot tables &lt;/li&gt;&#xA;&lt;li&gt;using multiple CASES for building complex queries that produce new columns into your own query&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Another way to improve your level is for example starting to create a complex demo database about: bussiness, accounting or an school control&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here you got an example &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;WITH usuariosPosts AS(&#xA;    SELECT row_number() OVER(ORDER BY idPost) AS Listado, users.nameUser, posts.idPost, posts.namePost, posts.statusPost, posts.created_at&#xA;    FROM users&#xA;    JOIN posts&#xA;    ON users.idUser = posts.user_id&#xA;)&#xA;&#xA;SELECT Listado, nameUser, namePost, COUNT(namePost) AS 'Total', IF(statusPost, 'activo', 'inactivo') AS 'Status',&#xA;         GROUP_CONCAT(namePost SEPARATOR '/') AS 'Títulos', created_at&#xA;FROM usuariosPosts&#xA;GROUP BY nameUser;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;which has Common table expressions, group and order by functions,&#xA;  group_contact function, window functions and obviously mutiple JOINS&#xA;  starting from scratch I mean this is the result of a very simple&#xA;  exercise about a database blog idea&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Create a learning critical route&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example you can organize it in these stages&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Connection&lt;/li&gt;&#xA;&lt;li&gt;User creations and permissions&lt;/li&gt;&#xA;&lt;li&gt;Creating databases and tables&lt;/li&gt;&#xA;&lt;li&gt;making relationships between tables&lt;/li&gt;&#xA;&lt;li&gt;CRUD operations&lt;/li&gt;&#xA;&lt;li&gt;Union or Union ALL&lt;/li&gt;&#xA;&lt;li&gt;dates operations&lt;/li&gt;&#xA;&lt;li&gt;CTE &lt;/li&gt;&#xA;&lt;li&gt;schemaless with JSON data type&lt;/li&gt;&#xA;&lt;li&gt;JOINS, LEFT JOIN, RIGHT JOIN FULL OUTER JOIN &lt;/li&gt;&#xA;&lt;li&gt;CASES&lt;/li&gt;&#xA;&lt;li&gt;etc &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerDisplayName="user5593" LastEditorDisplayName="user5593" LastEditDate="2018-08-16T05:33:33.480" LastActivityDate="2018-08-16T05:33:33.480" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4984" PostTypeId="2" ParentId="4968" CreationDate="2018-08-16T05:22:56.787" Score="0" Body="&lt;p&gt;For been more confident about programming....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;advice zero&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;be an agnostic programmer, I mean don't  choose a language above any&#xA;  other one without technical reasons.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Be open to learn anything language, don't matter if it is Java or PHP&#xA;  or C++ will give you more job opportunities&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;First one.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose an area that demonstrate your skills, I mean; you got:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;VR&lt;/li&gt;&#xA;&lt;li&gt;VideoGames&lt;/li&gt;&#xA;&lt;li&gt;Databases&lt;/li&gt;&#xA;&lt;li&gt;administrative software &lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;second one.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose your best language, many times we hear about if python or ruby or java are the key for the success; nevertheless  consider your choise will transform in your future tool into a job; be wise in your election&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;third one.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Practice, but in a smart way; for example&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;build logical exercises for been confident with the sintax language&lt;/li&gt;&#xA;&lt;li&gt;build logical and mathematical exercises&lt;/li&gt;&#xA;&lt;li&gt;build an small but complete first product&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Product?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Yeah for example if your learning about how to develop financial&#xA;  software you can start writing a basic CRUD that makes possible&#xA;  watching charts and tables with relevant information&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;at this point you can make a versioning of this product and attach more features:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;reports&lt;/li&gt;&#xA;&lt;li&gt;dinamic charts&lt;/li&gt;&#xA;&lt;li&gt;social loggin accounts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Do not fear the immense amount of frames and languages, choose your&#xA;  favorite tools and practice with them, there is no a short way to&#xA;  success&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerDisplayName="user5593" LastEditorDisplayName="user5593" LastEditDate="2018-08-16T05:36:32.510" LastActivityDate="2018-08-16T05:36:32.510" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4985" PostTypeId="1" CreationDate="2018-08-16T08:41:11.880" Score="2" ViewCount="227" Body="&lt;p&gt;I'm interested both mathematics and computer science. I like math because one can formalize it rigorously and I have seen that many things can be defined by sets. Is there similar thing in computer science, as for example asymptotic notation is sometimes defined in very odd way, see &lt;a href=&quot;https://math.stackexchange.com/questions/2731290/how-one-can-define-rigorously-the-time-and-space-complexities-of-algorithms&quot;&gt;https://math.stackexchange.com/questions/2731290/how-one-can-define-rigorously-the-time-and-space-complexities-of-algorithms&lt;/a&gt; ? I'm looking way to learn CS in a very rigorous way.&lt;/p&gt;&#xA;" OwnerUserId="5596" LastActivityDate="2018-08-16T18:57:48.200" Title="Where one can learn CS in very rigorous way?" Tags="|self-learning|" AnswerCount="2" CommentCount="4" ClosedDate="2018-08-24T00:17:52.570" ContentLicense="CC BY-SA 4.0" />
  <row Id="4986" PostTypeId="2" ParentId="4985" CreationDate="2018-08-16T14:29:44.847" Score="4" Body="&lt;p&gt;Be careful of what you wish for. Assuming you want rigorous self study, I'll recommend a few books. They are fairly old, but are classics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0321751043&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Art of Computer Programming&lt;/a&gt;. Knuth is a mathematician at heart. The link is to the boxed set, but you can buy individual volumes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0132624788&quot; rel=&quot;nofollow noreferrer&quot;&gt;Elements of the Theory of Computation&lt;/a&gt;. This is as rigorous as you want to be and addresses directly the question of run-time bounds of various sorts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similar is&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/113318779X&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to the Theory of Computation&lt;/a&gt; by Sipser&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A somewhat different view of computation is found in&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262510871&quot; rel=&quot;nofollow noreferrer&quot;&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;: A classic introduction to functional programming in Scheme - yet quite deep. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it's worth, I have a doctorate in Mathematics and taught CS for over 40 years. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-16T14:29:44.847" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4987" PostTypeId="2" ParentId="4981" CreationDate="2018-08-16T18:16:11.543" Score="6" Body="&lt;h1&gt;The short of it&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;There are three techniques that should serve you well in this, and future, endeavors to learn practical application of complex subjects:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Apply it,&lt;/li&gt;&#xA;&lt;li&gt;Dissect it,&lt;/li&gt;&#xA;&lt;li&gt;RTFM&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;The long of it (tl;dr)&lt;/h1&gt;&#xA;&#xA;&lt;h3&gt;Apply it&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Install a database manager on your own computer. (Your personal home computer by choice, but a work computer is possible if the learning is sanctioned and supported by the supervisor.) It does not need to be the same system you have at work, or the same one you want to eventually &quot;know.&quot; There are quirks to every DBMS, yet they mostly try to follow the SQL standards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a local install of a server with T-SQL is not possible, a good choice, in my personal opinion, is &lt;a href=&quot;https://dev.mysql.com/downloads/&quot; rel=&quot;noreferrer&quot;&gt;MySQL&lt;/a&gt;. MySQL has a developer and user community that is often helpful. The manuals, for many versions, is available online, or downloadable for local use. The manual includes explicit statements of how MySQL &lt;a href=&quot;https://dev.mysql.com/doc/refman/8.0/en/compatibility.html&quot; rel=&quot;noreferrer&quot;&gt;deviates&lt;/a&gt; from ANSI/ISO SQL standards. Having those differences delineated allows you to know what to watch for when developing advanced statements yourself. (There are serious syntax differences between ANSI SQL and T-SQL, but the logic behind what you do is what you need to learn more than the syntax, it seems.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take what you know about the SQL so far and rework old projects you've done using your new SQL knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The size of the old projects can grow as you work through them, but isn't all that important. It also doesn't have to be a project that requires a database, only that it &lt;em&gt;could&lt;/em&gt; use a database. It's the long way around, and usually not needed, but a database can hold configuration information and initial state values. Doing so can even increase the re-usability of the original code. Since it is a project you've already done, the algorithm and program logic is something you already have a handle on, and applying the new knowledge to the old problem lets you focus on the new knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have any old code-based projects of your own, which is likely in you case, then you can still use an old &quot;problem&quot; from elsewhere. You don't need to have a program that uses the data, since learning the C# or Perl is not the objective, only the SQL. (Often the DBA has very limited skills in other languages, but is excellent at the SQL for their system.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Dissect it&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Obtain real code from existing projects that use the SQL that you want to learn. Read the code and learn to follow what the original coder has done. Try to figure out other ways it could have been done, and then figure out why they choose the method they did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, look for things that might change in either the dataset or the use the data is put to. Figure out how to rework the existing code to accommodation those changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, develop the requirements for a new dataset to apply to a new problem. If it's useful in your work environment, that can be a plus for later, but it could equally be useful at home. (Movies: plots, actors, directors, awards, reviews, and your collection could make a useful project.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a part of &quot;dissecting&quot; what you want to use, learning to use a different system, such as MySQL or Oracle's database, can help by highlighting the differences and similarities. Looking behind the syntax to what the DBMS &quot;does&quot; to fulfill commands can help you make more efficient use of the commands.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;RTFM (&lt;em&gt;Read The Fine Manual&lt;/em&gt;)&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In this case, the &lt;em&gt;Manual&lt;/em&gt; includes any community that has developed around the server you're using. If you have installed one DBMS at home and another at work, then you have two communities to draw from. You can also use some SE communities in your learning. [dba.se] is one that you might find helpful, as well as the usual ones for developers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Often, in the manual proper, or the community around the system, there are tips, tricks, and warnings that can make significant improvements in your understanding of the system once you can fathom the how and why of the given tips, etc.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;The short of it (redux)&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Take what you know, practice it, explore other uses, and practice some more.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-08-16T18:16:11.543" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="4988" PostTypeId="2" ParentId="4981" CreationDate="2018-08-16T18:46:53.577" Score="1" Body="&lt;p&gt;If you are starting to learn about computing with databases and SQL, congratulations! you have chosen the very best place to start, because &lt;em&gt;the whole point of computers is to store and manipulate data&lt;/em&gt;, usually lots of it. SQL is not the same kind of 'language' as most programming, but it is so well-suited and understandable that it is a great introduction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice for learning any topic area, particularly to do with computing is to  &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Make It Visual&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It is not for nothing that we have had GUIs and visual programming environments for decades. Trying to comprehend database structure without a chart is like trying to walk around a room with your eyes closed. Microsoft Access has a way of showing the database schema with basically one click. It is the single most helpful part of the product! Other products can create charts or diagrams too, so find a way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;I would suggest&lt;/strong&gt; though, that you try to &quot;roll your own&quot; by taking a sticky-note pad and for each table, write the name at the top, then the primary key columns, foreign key columns and maybe a few other useful columns. Stick these down on a big piece of paper or a whiteboard and draw lines to connect the keys. Highlight columns that are not indexed but might be good for searching on. Experiment until the structure of the database is clear to you!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, it is a piece of cake to write Select statements. Once you understand visually how a database is designed, try learning a standard diagramming method like UML. With a picture of the schema and pile of sticky-notes, you can move the world. &lt;strong&gt;Don't try to do it blind.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-08-16T18:46:53.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4989" PostTypeId="2" ParentId="4985" CreationDate="2018-08-16T18:57:48.200" Score="1" Body="&lt;h2&gt;Relational Databases and SQL.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The Relational Database came from very arcane foundations in Mathematics which I still do not understand. But I have reduced the description and steps for the first 3 Normal Forms (which took a decade to develop) down to a few sentences! I hand that out to my students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there is anything more math-y in computing than databases, I have yet to see it. &quot;&lt;em&gt;A minute to learn, a lifetime to master.&lt;/em&gt;&quot; It is the most useful thing you can become an expert at, and largely uncontroversial. (Except for Nulls. Maybe you can help smooth that one out for us!)&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-08-16T18:57:48.200" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4991" PostTypeId="1" CreationDate="2018-08-17T22:22:36.930" Score="4" ViewCount="97" Body="&lt;p&gt;I'm going through an online training on Apex and Salesforce (trailhead), and I don't know how to retain all this info. I'm memorizing it, and trying to build stuff, but I'm still not retaining it.... Does anyone have any recommendations on how to retain all this info?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ex - &lt;a href=&quot;https://trailhead.salesforce.com/modules/apex_triggers/units/apex_triggers_intro&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://trailhead.salesforce.com/modules/apex_triggers/units/apex_triggers_intro&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that this isn't the right channel for this question, but I couldn't find a more suitable one. If the mods want to close this, I ask that you point me in the direction of the right channel (I've posted this on Reddit too, without much success).&lt;/p&gt;&#xA;" OwnerUserId="5603" LastActivityDate="2018-08-18T04:19:37.300" Title="How to retain technical information about new features?" Tags="|self-learning|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4992" PostTypeId="2" ParentId="4991" CreationDate="2018-08-17T23:00:44.877" Score="3" Body="&lt;p&gt;&quot;Memorizing&quot; doesn't do much to help you retain information or build skills. In order to really remember it you have to move it from short term memory, where it is pretty volatile to long term memory. The trick for doing this is to practice it. The reason teachers give students lots of exercises is to help them with this process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to learn anything, the brain needs to be physically changed, connecting neurons with synapses in a new way. This is only done with repetition and practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See The Art of Changing the Brain by James E Zull  for a run-down on the science behind it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do, if the course provides exercises do them all. If you have a book available that also has exercises on the material, do  those as well. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-17T23:00:44.877" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4994" PostTypeId="2" ParentId="4991" CreationDate="2018-08-18T04:19:37.300" Score="2" Body="&lt;p&gt;With complex dynamic systems like SalesForce, you will never be able to remember everything. What is more important than memorizing is that you learn the SME language and how to find the answers in the documentation as you need them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google is the consultant's best friend.&lt;/p&gt;&#xA;" OwnerUserId="1537" LastActivityDate="2018-08-18T04:19:37.300" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="4998" PostTypeId="1" AcceptedAnswerId="5040" CreationDate="2018-08-20T12:20:47.647" Score="8" ViewCount="1620" Body="&lt;p&gt;My sister, her husband and I (the older generation) were sitting at the dinner table with their two children (the younger generation), discussing computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the members of the older generation said, &quot;From what I understand, most programming (except for cutting edge applications like nanotechnology) has already been done, and can be looked up. A lot of computer science nowadays is choosing and cutting and pasting the formula that most appropriate/efficient for your application. This was different from &quot;my time,&quot; when there was a much greater emphasis on discovering new ways/languages, for programming.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the younger generation agreed that computer science nowadays was much more of a &quot;copy-editing&quot; job than what she remembered from her teachers' descriptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has computer science/education in fact changed in this way within the past three or four decades? Assuming that it has, what would be the implications for classroom practices today? (For instance, when I was studying computer science in the 1970s, very limited use was made of &quot;library&quot; functions, and we were encouraged to do things from scratch.)&lt;/p&gt;&#xA;" OwnerUserId="613" LastEditorUserId="613" LastEditDate="2018-08-21T20:27:28.797" LastActivityDate="2018-09-26T23:34:53.250" Title="How is computer science (and education) different today than some decades ago?" Tags="|programming-paradigms|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="4999" PostTypeId="2" ParentId="4998" CreationDate="2018-08-20T12:33:43.853" Score="8" Body="&lt;p&gt;Like any field with an active research community, Computer Science changes over the decades, sometimes quite drastically. If a practitioner doesn't keep up he or she will be left behind, not understanding the new work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Decades ago problems tended to be a bit smaller in scope. How do I sort an array? Now they are massive. How do I scale a cloud environment and make it immune from failure and attack? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this change in scope and scale to occur we need to learn to think at higher and higher levels of abstraction. It is hard to write complex programs in languages that permit only simple constructs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Language research is still an active pursuit. The ACM still has a special interest group POPL interested in the Principles of Programming Languages, for example. The papers and discussions are deep and &quot;modern.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many other &lt;a href=&quot;https://www.acm.org/special-interest-groups&quot; rel=&quot;noreferrer&quot;&gt;ACM SIGs&lt;/a&gt;, some of which, say SIGMobile, couldn't have existed a couple of decades ago, prior to smartphones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing is that such a field grows so much that no single practitioner can grasp all of it after a certain point in time. In mathematics, for example, this point was passed around 1900. It has probably been passed in CS as well. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Regarding education, the changes in the field have also generated changes in teaching, both the content and the methodology. I can speak only for what happens in the US since all my experience is here. But an undergraduate CS major will get two things. First a broad education, including History, Philosophy, and the rest, including some writing. Second they will get enough education in the major field to either go on to a graduate degree or obtain an entry level position in industry. But they will normally never be deeply taught in any one aspect of CS (or Math, or Literature, or ...), nor broadly enough to say they know much about the whole field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Master's degree, on the other hand should, in a technical field teach students the things that every working professional needs to know. Again, this isn't necessarily very deep nor broad, but it has to be vaguely comprehensive for the working pro. It should also get you a bit closer to the ability to do research if it doesn't already include some research component. But usually the research required there is into what is known about a possibly new or arcane topic, rather than the creation of new knowledge in a field. That is for doctoral programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The effect of this is that undergraduate teaching now includes more options that were not studied in the past (big data, machine learning, ...) through elective subjects at the upper level. It also means that some things that were needed by working pros in the past (numeric algorithms, say) are not taught to the same degree as much of what was once hard is now captured in standard libraries. But methodologies also change, and now teamwork is much more used in the classroom than was typical a few decades ago. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The conclusion I draw from all of this is that students need to start higher up the learning tree if they are to get where they need to go. In my view, recapitulating the history of computation, starting with low level concepts and tools and building everything up incrementally is a mistake. There is also no need. Students can start at any level of abstraction and work upwards from there intensively. They make excursions down the abstraction hierarchy on occasion as some of that helps the understanding, but a complete understanding of the foundations of, say, IEEE Floating Point algorithms is only needed by a very few working pros. If you start the education, today, the same way it was done 20 years ago there will be no time to get to today's problems and solutions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to tell my students that my job is &lt;em&gt;not&lt;/em&gt; to teach them what &lt;em&gt;I&lt;/em&gt; know, because much of that is now obsolete. My job was to teach them what &lt;em&gt;they&lt;/em&gt; need to know. Not the same thing. One example is the &lt;em&gt;hidden bit&lt;/em&gt; in IEEE Floating Point. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-08-20T17:56:00.757" LastActivityDate="2018-08-20T17:56:00.757" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5000" PostTypeId="2" ParentId="4981" CreationDate="2018-08-20T22:45:33.627" Score="0" Body="&lt;p&gt;It sounds as if your stumbling block is less to do with a knowledge of SQL, and more that you lack understanding of the structure of the specific database/tables at work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Broadly, I agree with Pojo-guy's comments - advice suggesting you look at (and diagram/document) each table's primary keys (and foreign keys). Can I assume you have learned about joining tables in SQL? FKs show you where and how the DBA expected tables to relate. Gradually then, you build knowledge of this &quot;structure&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A.N.Other talked about MySQL which is not a lot of use if you are limited to the mentioned tool-set. The MySQL product/project includes a tool called MySQL-Workbench which enables reviewing a DB of tables and &quot;reverse engineering&quot; a Data Structure Diagram. Oracle (and others) offer similar tools. Apologies: I can't speak for T-SQL. Might there be something similar?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've run courses for business people (ie non-CS) in data retrieval from DBs. Feel free to request more specific detail, if needed...&#xA;Regards =dn&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2018-08-20T22:45:33.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5001" PostTypeId="1" AcceptedAnswerId="5002" CreationDate="2018-08-20T23:14:28.977" Score="4" ViewCount="235" Body="&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/UNSSm.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UNSSm.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The box-plot represents the number of programming tasks performed correctly in 30 minutes.These tasks are designed to learn basic CS concepts: sequences, loops, conditional ...&#xA;Each box represents an age group:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;p1 = 6 - 7 years old&lt;/li&gt;&#xA;&lt;li&gt;p2 = 7 - 8 years old&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;li&gt;p6 = 11 - 12 years old&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;li&gt;s1 = 12 - 13 years old&lt;/li&gt;&#xA;&lt;li&gt;s2 = 13 - 14 years old&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;li&gt;b1 = 16 - 17 years old&lt;/li&gt;&#xA;&lt;li&gt;b2 = 17 - 18 years old&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;When I see the results, I am surprised by the difference between p4, p5 and p6. The set of tasks was almost identical by age. The only difference is that by increasing the age they have some less start tasks. I think it may be due to the ability of reading comprehension and motor development ... Can be? Are there more factors that can influence?&lt;/p&gt;&#xA;" OwnerUserId="3252" LastEditorUserId="204" LastEditDate="2018-08-28T14:39:29.093" LastActivityDate="2018-08-28T14:39:29.093" Title="What can be the causes of the difference in student performance?" Tags="|secondary-education|self-learning|primary-school|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5002" PostTypeId="2" ParentId="5001" CreationDate="2018-08-20T23:55:43.190" Score="4" Body="&lt;p&gt;There is a point, somewhere around where puberty starts but I don't think identical, in which the brain changes its structure. It is much more capable of abstraction after that point than before. Young kids don't do a lot of generalization, for example, adults do. So, perhaps the study just captures part of that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have it available, but I think there is a lot of brain science around that structural change. A simple search may turn up some of it. We aren't born fully formed either in mind or body. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An implication of that is that how and what you teach toddlers and youngsters isn't the same as what and how you can teach teenagers. Also, every person hits that change at a slightly different age and it isn't instantaneous any more than any other brain change is. For the youngest, make it visual and tactile, even aural. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-20T23:55:43.190" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5003" PostTypeId="1" CreationDate="2018-08-21T21:44:44.447" Score="9" ViewCount="575" Body="&lt;p&gt;I was reading a &lt;a href=&quot;https://softwareengineering.meta.stackexchange.com/questions/6629/how-do-i-explain-something-to-someone&quot;&gt;Q&amp;amp;A on Meta Software Engineering&lt;/a&gt; and saw some people make reference to pointers, as well as this SE.  I see several Q&amp;amp;A here relating to pointers as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't understand why people make such a big deal about pointers. Most times I've heard about them, in school or talking to the occasional programmer, it's been made to be a big deal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conceptually, it's trivially trivial to understand: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Go here to get a variable.  Oh, it's not the variable, it's a sticky note telling me where the variable is.  OK, I'll go there instead.  Goes to that other place, gets the variable.  Done.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's more difficult for me to understand why it's a Big Deal. I've never programmed where I needed to worry about them, aside from in a CS class, nor have I programmed where pointers were not how things were done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are pointers difficult to use in practice?  Why is this a cliche topic for students?  I can understand that this was a big deal when it was a new technology.  But aren't most modern languages so much more abstract that this isn't a thing?&lt;/p&gt;&#xA;" OwnerUserId="5146" LastActivityDate="2018-09-04T05:45:07.583" Title="Why are pointers a key topic in a CS curriculum and oft cited as something people don't get?" Tags="|pointers|" AnswerCount="8" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5004" PostTypeId="2" ParentId="5003" CreationDate="2018-08-21T22:13:22.737" Score="5" Body="&lt;p&gt;The problem with pointers isn't at the level you have described, but in the use. In languages like Java the &quot;reference&quot; variables are basically pointers but the usage has been made safe via a garbage collector. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in a language like C, in which the programmer is responsible for both allocation and deallocation of the blocks to which pointers refer, there are many traps. The two big ones are forgetting to deallocate at all, hence running out of memory in a long program, or trying to deallocate twice, causing a crash. The problem isn't easy in a complex program as the pointer variables are passed around between functions and if a block is deallocated but some pointer still points there and tries to access the block, bad things happen. Depending on the language they can be a simple crash or a run-away program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many attacks on systems are, in fact, the result of bugs caused by improper use of pointers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is simple enough, but the usage is complex. Furthermore, in such languages, the programmer has to solve the memory management problem for every individual program. In higher level languages, the memory management is by the system.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The reason for the importance of pointers or something like them (references) is that some program data must live longer than the lifetime of a single function invocation, hence the stack managed memory isn't sufficient. And sometimes there is so much data that static (for all time) allocation isn't efficient. Hence, values must come and go, but asynchronously with function/method invocations. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-21T22:13:22.737" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5005" PostTypeId="2" ParentId="5003" CreationDate="2018-08-23T16:44:44.400" Score="1" Body="&lt;p&gt;I agree with @Buffy but would like to add, that I don't think that the lack of garbage collection is the only problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In C a variable can be a concrete variable, a pointer, a pointer to a pointer, … Where as in Java everything is a reference (except where it is not (basic types) ug). This can make it very confusing as to what type this variable is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that a little bit of Hungarian-notation can help (&lt;strong&gt;but not to much&lt;/strong&gt;). It may however be better to just avoid, until the student is at least a competent programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;int height;&#xA;int *height_pt;&#xA;int **height_pt_pt; /*if you need such a thing*/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-08-28T14:36:54.650" LastActivityDate="2018-08-28T14:36:54.650" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5006" PostTypeId="2" ParentId="5003" CreationDate="2018-08-24T06:42:16.593" Score="4" Body="&lt;p&gt;Answering &quot;Why&quot; people do the things they do is always a risky proposition. Be that as it may, I'll try my hand at answering your two-questions-in-one question. I believe that the answers are interdependent, with each feeding the other. This makes it hard to split this question into a pair of questions for the site, which I would normally recommend.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Why are pointers a key topic in a CS curriculum?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;There a five reasons that come to mind for making pointers a key topic:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They are an integral part of many of the current &lt;em&gt;in-use&lt;/em&gt; languages, and should be understood by the students if they're going into the field as developers&lt;/li&gt;&#xA;&lt;li&gt;Pointers (whether explicitly in the foreground, or implicitly in the background) enable the Object Oriented paradigm&lt;/li&gt;&#xA;&lt;li&gt;They are &lt;em&gt;perceived&lt;/em&gt; as difficult, and the belief is that repeated exposure, and emphasis, can &lt;em&gt;pound&lt;/em&gt; the concept into the students' brains&lt;/li&gt;&#xA;&lt;li&gt;Understanding pointers aids in further abstract thinking&lt;/li&gt;&#xA;&lt;li&gt;Everyone else is doing it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Integral to many of the currently in use programming languages&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Many of the programming languages commonly used in software development enable pointers. They might have a different name (&lt;em&gt;reference&lt;/em&gt; perhaps?), or their actual use can be cloaked behind other layers of abstraction.  When available for use, many developers, or their supervisors, think that they &lt;strong&gt;must&lt;/strong&gt; be used. Oft times their use over the basic types serves no purpose to the code or the operation of the software at all, any benefits being in the mind of the developer using them. Sometime, &quot;because I can,&quot; or &quot;I like them,&quot; is sufficient justification for their inclusion. Since very few of the students will transition straight from school to lead developer on a project, they will likely be working with the code of others that has a significant amount of pointer used. Working with such code will require that they have a working comprehension of pointers, their operation, and their merits, within the language of choice.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Pointer use in the Object-Oriented paradigm&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;I have not examined the &quot;behind-the-scene&quot; implementation of the OOP paradigm in great detail for any language, nor even know all the languages in which it is implemented. Nevertheless, without the ability to use pointers, by the compiler if not the code itself, I don't think OOP would be practical. It may not even be fully realizable at all without pointers. Whether or not pointers are used explicitly by the student, or the programmer, they are probably using pointers anyway. Understanding what a pointer is, and how it works, can make some of the OOP concepts easier to comprehend, and increase the facility with which the students utilize OOP in their own code projects.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Repeat the &lt;em&gt;hard stuff&lt;/em&gt; until they &quot;get it&quot;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the instructor, (or department head, textbook author, curriculum developer, etc.) believes pointers are &quot;something people don't get&quot; they try to &lt;em&gt;make&lt;/em&gt; them &quot;get it&quot; by repeating the use of pointers in different places, across multiple courses, or from different approached. They hope is that with enough repetition, even difficult concepts will become comprehensible. If, for whatever reason, the concept presented &lt;em&gt;is&lt;/em&gt; hard for the student, such a layered, multi-pronged approach may be helpful. If, however, the student does grasp the concept and is able to use it effectively, the repeated implications that they still don't &quot;get it&quot; can make them begin to question if they really do understand, or if the instructors might be correct, and they only thought they &quot;had it&quot; when in fact they don't. Teaching to the lowest common denominator can be just as destructive as teaching to the test.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Pointers: one layer, among many, of abstraction&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Pointers are a concrete manifestation of indirection. Technically speaking &lt;em&gt;variables&lt;/em&gt; are an indirection, but somehow we manage to address that just fine. With pointers we now have two, or more, &quot;leaps&quot; to get to the &quot;data&quot; and not only do we have to know that we have to double hop to the get data, but we also have to remember to handle the hops the right way. For example, if I do &lt;code&gt;a = b&lt;/code&gt; where &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are numbers, I can change the value of &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;a&lt;/code&gt; will not change to match. If I do &lt;code&gt;a = b&lt;/code&gt; where &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are pointers, I can change the value of what &lt;code&gt;b&lt;/code&gt; points to (&lt;code&gt;*b = 4&lt;/code&gt;) and the value of what a points to (&lt;code&gt;*a&lt;/code&gt;) will be changed as well. The syntax, or nomenclature, helps the developer keep things straight, but the develop still has to know what's happening with the pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The good part is that once the student has a grasp of pointer operations, they are able to move into higher levels of abstraction with confidence. As noted in a comment by &lt;a href=&quot;https://cseducators.stackexchange.com/users/5349/scott-rowe&quot;&gt;Scott Rowe&lt;/a&gt; above, in the computer science realms, pointers are the crossing point into formal operations from concrete operations. Crossing that threshold of understanding in any discipline develops the mental abilities to deal with formal operations, and symbolic thinking in any discipline, from computer programming to medical research and structural engineering.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Everyone else is doing it&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Probably one of the most common reasons, and the worst reason because it is &lt;em&gt;not&lt;/em&gt; a reason, is to follow the crowd, or to gain acceptance of their work. I have seen educational materials where the author attempts to present pointers, in some fashion, that end up looking like a blind person leading a deaf person into the swamps. They don't have a real grasp on pointers themselves, but try presenting them because they think their works will be judged negatively based on their mere exclusion. They could be right, I don't know. They don't seem to have a good understanding of pointers, indicating they don't consider pointers important enough to learn for themselves. Yet, because everyone else is doing it, they include an attempt at explaining pointers in their materials.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Why are pointers oft cited as something people don't get?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The claim that pointers are something people don't get, or that they are hard to understand, could be founded on any of five different reasons (or beliefs):&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Instructors have tried to teach what they don't understand&lt;/li&gt;&#xA;&lt;li&gt;It was hard for the instructor to grasp, so it must be hard for everyone to grasp&lt;/li&gt;&#xA;&lt;li&gt;Teachers have been warned that some people don't get pointers, so they know some of the students just won't &quot;get it&quot;&lt;/li&gt;&#xA;&lt;li&gt;Students, or programmers, not ready for abstraction will not &quot;get&quot; pointers either&lt;/li&gt;&#xA;&lt;li&gt;Everyone else is saying it's true&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;Passing on knowledge not possessed&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the instructor does not have a very clear understanding of pointers, it is very difficult to help the students understand them. Saying that pointers are difficult, and that some people just don't &quot;get it&quot; serves as an opportunity to blame the subject, and the student, for the instructor's failure.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;It was hard for me, so it must be hard for you&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;A natural human tendency is to take our experiences and project them onto others in the form of expectations. When something was difficult for us to master, for what ever reason. we will believe that it &lt;em&gt;is&lt;/em&gt; difficult, and will expect others to have the same difficulties. Also, how one learned about pointers the first time can have a strong influence on how they later teach them. For a general question in that vein see this old question: &lt;a href=&quot;https://cseducators.stackexchange.com/q/754/104&quot;&gt;How is your teaching affected by how you learned?&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;em&gt;My&lt;/em&gt; (Education or CS) instructors said it was difficult, so it must be&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Presuming that the instructor has been instructed in the art of instruction, the instructor's instructor could have embedded a &lt;a href=&quot;https://en.wikipedia.org/wiki/Self-fulfilling_prophecy&quot; rel=&quot;nofollow noreferrer&quot;&gt;self-fulfilling prophecy&lt;/a&gt;. (See &lt;a href=&quot;https://drive.google.com/file/d/1ID5SA_-4OSZIQMXJTFTgonshB-3g9-TW/view?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Merton, Robert K. (1948), &quot;The Self Fulfilling Prophecy&quot;, Antioch Review, 8 (2 (Summer)): 195&lt;/a&gt;.) If told that it is hard to teach pointers, or that students have a hard time understanding pointers, and then hearing it, or reading it, from other sources, it can become &quot;fact&quot; in the instructor's mind, and then acting on that &quot;fact&quot; in the classroom they make it hard for the students to understand pointers.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Pointers: one layer, among many, of abstraction&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There are two schools of thought about abstractions. One is that the use of abstractions eliminates the need to have any concept of the processes hidden by the abstraction. The other is that abstractions are only a convenience for encapsulating processes already known, and solved, so that higher levels can be solved. In either case, if someone is not yet able to grasp the indirection and abstraction, the subject matter, already maligned, gets the credit for the student's lack of development or ability.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Everyone else is saying it's true&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If it is said often enough, from many diverse corners of the field, it soon becomes common knowledge. The longer it survives as common knowledge, the more likely it is to become conventional wisdom. Unfortunately, conventional wisdom may not be all that &quot;wise,&quot; and common knowledge may not be correct. For example, &lt;a href=&quot;https://en.wikipedia.org/wiki/Triskaidekaphobia&quot; rel=&quot;nofollow noreferrer&quot;&gt;triskadekaphobia&lt;/a&gt; is so prevalent that many, newly constructed large buildings still do not have a 13&lt;sup&gt;th&lt;/sup&gt; floor, or a usable one at least. This despite the fact that our era is supposedly enlightened and has moved beyond myths.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h1&gt;Are pointers difficult to use in practice? Or, are pointers hard to learn?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Pointers, in whatever guise they assume, are not difficult to use in practice, if the language supports them in a native manner. They are also not very difficult in other languages, though perhaps slightly more so than a &lt;em&gt;regular&lt;/em&gt; variable. I have used &quot;pointer&quot; functionality using &lt;code&gt;PEEK&lt;/code&gt; and &lt;code&gt;POKE&lt;/code&gt; in BASIC in the late 70's, before I even knew what &lt;em&gt;pointers&lt;/em&gt; were, and had no difficulties. They do not require any more diligence from the programmer than &lt;em&gt;should&lt;/em&gt; be exercised with the rest of the code. They can, however, turn out to be a nuisance if not used responsibly. In the languages where garbage collection is not automatic it is the programmer's responsibility to track what they've done and undo it later. That shouldn't be any worse than making certain all loops have an exit condition that &lt;em&gt;will&lt;/em&gt; happen, or that all conditions for a logic construct have an assigned branch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pointers should also not be hard to learn. Pointers are everywhere in our lives, and we have no problem understanding the ones outside of a program. Why, then, should they suddenly become mysterious inside a program. My phone number is a pointer, or an indirect reference, to my house: someone who knows my (1) name will look up my name in a directory listing, which lists my (2) phone number; they dial that number and someone answers the phone; they then ask the (3) person answering the phone to speak with (4) me. A very long, and complicated series of pointers that people have beed executing since before computers were built. The only excuse for pointers being hard to learn is the instructor, hopefully innocently, making them difficult. Once the concept of &quot;variables&quot; is apprehended, pointers, arrays, hash tables, and &quot;complex&quot; data structures should naturally fit in the same understanding. The more complex the structure is the more effort that is required to remember &quot;where you put&quot; the data. That is not because there are pointers, rather it is a factor of the quantity of elements involved. When following a route through a large city, the more turns you have to make, the greater are the chances that one of the turns made will be wrong. It has nothing to do with turning being difficult, only that a line in the instructions was skipped, or a street name misread.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2018-08-24T18:22:27.973" LastActivityDate="2018-08-24T18:22:27.973" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5007" PostTypeId="2" ParentId="5003" CreationDate="2018-08-25T17:15:47.607" Score="2" Body="&lt;p&gt;Are pointers hard? Not really.  They are just virtual memory addresses.   What is hard is memory management.  This is illustrated by the fact that browsers, run for a period of time, develop memory leaks and become slow as molasses.   Browsers routinely have exceptions during their execution: URLs are malformed or nonexistent, network connections evanesce, etc.   These often result in memory leaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is hard is managing the heap.  valgrind is a great tool for this. Often poor exception handling leads to pools of undeallocated memory  that pile up like cholesterol in the veins of your program.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other thing that is difficult is that is possible to orphan still-needed items in memory.  Try coding a singly-linked list from scratch in C without having memory leaks.  It is an edifying and humility-instilling experience. Warning: valgrind will hurt your feelings.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-08-25T17:15:47.607" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5008" PostTypeId="2" ParentId="5003" CreationDate="2018-08-26T13:01:20.217" Score="8" Body="&lt;p&gt;This question is actually not so far off from asking why operating system memory management can be confusing to some students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, we only have two fundamental tools for managing memory: pointers, and calculated offsets &lt;em&gt;from pointers&lt;/em&gt;. That's it. In spite of GypsySpellWeaver's assertion, they don't particularly support OO, they undergird literally &lt;em&gt;everything&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How does the computer know what line of machine code to execute next? Pointer. How does it know where the stack frame currently is so that it can find your variable? Pointer. How does it know where the system functions are so that it can print to the screen? Pointer. Pointers are not hard at the most trivial level of understanding. They are hard because, when you actually start to look into how they are used (or manipulate them yourself), you wind up deep in the weeds in some confusing places. They are the simplistic entry point to a host of deep, rich, and complex ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a quick &quot;for instance&quot;: students don't come in fundamentally understanding the stack and the heap, and without that, much of what we do with pointers doesn't make sense in the first place.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understanding memory in a computer is not a trivial task.  When I write&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;int z = -1&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;... a student naturally expects &lt;code&gt;z&lt;/code&gt; to be a number.  But, of course, it's not. It's a reference to a stack offset at which is held a series of ones and zeroes.  The compiler stores &lt;code&gt;z&lt;/code&gt; as something like &lt;code&gt;stackpointer+8&lt;/code&gt;, and that's what gets written into the compiled code. The name &lt;code&gt;z&lt;/code&gt; goes away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;char* x = &amp;amp;z + 1&lt;/code&gt; is literally nonsensical, unless you understand that memory is fundamentally typeless, and what a memory address actually is.  This isn't trivial stuff for someone whose whole experience with computers has been installing and using apps to play games and chat with their friends. Nor is the result of &lt;code&gt;printf(x)&lt;/code&gt;, or &lt;code&gt;printf(*x)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fundamentally, a student needs a rich mental model of the whole machine to understand pointers on anything beyond a trivially simplistic way.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-08-26T22:54:53.233" LastActivityDate="2018-08-26T22:54:53.233" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5011" PostTypeId="2" ParentId="5003" CreationDate="2018-08-28T15:53:36.700" Score="2" Body="&lt;p&gt;As many others already wrote before, pointers by themselves are simple objects - in the C sense, not OOP - containing addresses of other objects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you start with C, you meet them very quickly, because they are immediatly required, together with dereferencing, for (emulating)  passing parameters to actions &quot;by reference&quot;. Exemple &lt;code&gt;void swap_ints(int *ptr1, int *ptr2)&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But &quot;teaching pointers&quot; is often a giant salad with too many ingredients&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use of pointers as iterators over arrays &lt;code&gt;while(*dst++ = *src++){}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;dealing with dynamic allocation (and memory leaks/corruption problems)&lt;/li&gt;&#xA;&lt;li&gt;linked data structures (insertion/deletion in lists, trees, etc).&lt;/li&gt;&#xA;&lt;li&gt;pointer arithmetics,  &lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;leading to a lot of confusions.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastActivityDate="2018-08-28T15:53:36.700" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5012" PostTypeId="1" AcceptedAnswerId="5013" CreationDate="2018-08-29T23:11:38.427" Score="5" ViewCount="243" Body="&lt;p&gt;I have an opportunity to run four classes of about half an hour, with 7 to 8 year olds (my sons age).  This is part of a program called STEM professionals in schools. All I am there to do really is help kids see themselves as potential scientists or mathematicians, and to see the subject as fun and interesting (with kids this young, just being a visitor in the classroom is already fun and interesting). I bring along a set of little cards I made up of my (very diverse in background) colleagues and talk about them in an introduction lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are my Computer Science lesson ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Word unscrambling. This is already a familiar exercise from homework. Each child gets a worksheet with a words 3-12 characters long to quickly unscramble.  We talk about why it was easy to unscramble 3-letter words and hard to unscramble 12-letter words. Then get ideas from the kids about instructions to solve the problem without knowing what the word is.  [Algorithms, algorithmic complexity, optimisation tricks that work for computers and people alike (common letter sequences like '-ion').]  This one is pretty well worked out, but happy to hear of anything I can do to make it cooler.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Substitution coding. Starts out as how to pass a secret message like a spy. My aim is to end up with something like a compiler or maybe zipf encoding - substitution rules that make the encoded message denser than the final form. Here, I'm a bit stuck for a solid example. Maybe a cipher system with a limited vocab?  The principal concept is [substitution / naming / functions].&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Logo.  Basically a demo lesson using function definition in Logo to draw something recognizable (Captain America's shield, say), comparing how easy it is if I create my own substitution rules (functions).  Also demo recursion, substitution inside the substitution rule with the Koch snowflake, maybe some other fractals. This is a demo of Logo, concept is mainly [functions].&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Handwriting recognition deep learning.  Set up a recognizer (this is easy enough, right?) and give the kids a chance to test their own handwriting (this will be hardest on my son, I reckon).  Discuss how it works as lots of layers of functions which had to learn to work together. [machine learning]&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5651" LastEditorUserId="204" LastEditDate="2018-08-30T12:08:48.513" LastActivityDate="2018-10-29T15:27:22.223" Title="Short foundational lessons for 7-8 year olds" Tags="|lesson-ideas|computational-thinking|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5013" PostTypeId="2" ParentId="5012" CreationDate="2018-08-30T11:52:05.007" Score="4" Body="&lt;p&gt;If you are merely looking for feedback on this, let me point out, first, that according to Piaget's work, your students seem a bit young for this. They have only just entered the third stage of &lt;a href=&quot;https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457&quot; rel=&quot;nofollow noreferrer&quot;&gt;Piaget's Model&lt;/a&gt;. Moreover, since not all people advance in sync, some may still be in the second stage. In particular they are still very concrete thinkers. Anything that depends on abstract thinking won't be very comprehensible to them for a few more years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a small exercise, however, the above might not matter too much as you aren't expecting them to do much but think &quot;WOW&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there has actually been a lot of thought given to &quot;computational thinking&quot;, through &lt;a href=&quot;https://en.wikipedia.org/wiki/Computational_thinking&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jeannette Wing's work&lt;/a&gt;. This has mostly been directed at slightly older students, however, say secondary school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a well developed effort to bring computational thinking down to this age level. &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt;, provides a fairly comprehensive set of &lt;a href=&quot;https://csunplugged.org/en/topics/&quot; rel=&quot;nofollow noreferrer&quot;&gt;activities&lt;/a&gt; that are targeted at 5-10 year olds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While there are a lot of things you can do, don't expect the kids to retain a lot of it, and certainly don't expect that they can then (or soon) abstract from it to actual computing. I find that Spiral education, in which ideas are introduced in a simple way early and then returned to (often), works well. So, for a first cycle, you give them a hint of things that might be and later reinforce that more formally. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that something as simple as the song &lt;a href=&quot;https://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;There was an old lady that swallowed a fly&lt;/em&gt;&lt;/a&gt; is interesting and fun. It is also an introduction to recursion, but at that age, don't talk about base cases, etc. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A few more words about logo. While it is a fine language, you need to use it carefully for youngsters, so that what you do matches their cognitive level. Since they can't do much abstraction yet, there are a couple of possibilities. Since it is visual it matches their &quot;concrete view&quot; of the world, of course. One is to use only the language primitives. But another is to build a virtual world in logo with a set of its own &quot;primitives&quot; that they just use instead. These can be of a higher level than the built in commands, but are opaque to the students. Karel J Robot is like that actually. Robots obey five simple commands (move, turnLeft, etc) and students begin with only those. The robot language hides the underlying Java primitives completely. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-08-30T16:36:51.780" LastActivityDate="2018-08-30T16:36:51.780" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5014" PostTypeId="2" ParentId="5003" CreationDate="2018-08-30T11:53:30.007" Score="1" Body="&lt;p&gt;The basic idea of pointers is simple, but here are two examples that illustrate why they are tricky, even in a language like Java that handles memory management for you.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A function takes a list as input, called inList. That function modifies the list. The list that was passed to that function with a different variable name is ALSO modified because both variables point to the same list in memory. Yet if we pass an integer in Java to a function, the function cannot change the variable that was passed to it because it's not a reference. This is distinction trips up some of my students.&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;I was working on a reasonably large professional project that handled exam scheduling with Student and Teacher objects. References to teachers and exams were getting lost. Data was getting lost and it took me a while to realize why. Sometimes when the user edited an object, a new object was created, but the master list was still referencing the old object. Without understanding references I couldn't not have fixed this critical bug. &lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2197" LastActivityDate="2018-08-30T11:53:30.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5015" PostTypeId="2" ParentId="5012" CreationDate="2018-08-30T12:43:23.657" Score="2" Body="&lt;p&gt;See this resource from computer-science unplugged &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csunplugged.org/en/&lt;/a&gt; (see also &lt;a href=&quot;https://www.youtube.com/watch?v=VpDDPWVn5-Q&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=VpDDPWVn5-Q&lt;/a&gt;) it is aimed at teaching this age group, and has some similarities to some of your ideas. The people that made it are very good teachers, so you will get an idea of how to teach this age group.&lt;/p&gt;&#xA;&lt;h1&gt;Substitution&lt;/h1&gt;&#xA;&lt;p&gt;There is a substitution code exercise (cesar cypher).&lt;/p&gt;&#xA;&lt;h1&gt;Logo&lt;/h1&gt;&#xA;&lt;p&gt;For the Logo, do it in the playground unplugged, I don't remember this in the un-plugged website. But if you look at the other ideas, then you should have an idea of how to do it (in small groups, one pupil takes on the role of the turtle, another takes on role of director, another takes on role of scribe (writes down program, when it is working). They can the use this program to blindly instruct a turtle(pupil), and see how it goes.&lt;/p&gt;&#xA;&lt;h2&gt;Another idea is teacher robot&lt;/h2&gt;&#xA;&lt;p&gt;Pupils instruct teacher (you), to draw an image of a house on the white board. They can only give simple instructions (draw: line, vertical, horizontal, circle, square, etc. No house related words like door, or window). They won't get it first time. Just respond in robot voice ”I don't know the word …”, “I only know lines and shapes”, “I know square, circle, rectangle, line”. Follow there instructions literally. If there is two interpretations of what they say, then choose the wrong one. Pretend to be stupid (you are a robot). Real robots are stupid. Tell them this at the beginning, then reinforce it as you draw, then discuss at end, or as an interlude in the middle. You can also have a volunteer be the robot after you.&lt;/p&gt;&#xA;&lt;p&gt;There is also “robot teacher jam sandwich”. It is like the above, but you will need an apron, some bread, some jam, a spreading knife, etc. see video &lt;a href=&quot;https://www.youtube.com/watch?v=leBEFaVHllE&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=leBEFaVHllE&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1&gt;Unscramble&lt;/h1&gt;&#xA;&lt;p&gt;For word unscrambling I was thinking of having to many words, some short and some long. One point per word. You can then discuss strategy. Some pupils will choose short words (Why? optimum strategy for points). Some will do them in order (Why? unthinking). Some will do the longer words (Why? Optimum strategy for learning/fun. See &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&lt;/a&gt; ). You can discuss these strategies (That is, ask the kids).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-10-07T17:13:42.543" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5017" PostTypeId="1" AcceptedAnswerId="5018" CreationDate="2018-08-31T14:17:10.400" Score="7" ViewCount="498" Body="&lt;p&gt;Lately I've been seeing quite a bit on the importance of &lt;a href=&quot;https://en.wikipedia.org/wiki/Spaced_repetition&quot; rel=&quot;noreferrer&quot;&gt;spaced repetition&lt;/a&gt; in retention of skills.  My job is to level up a group of C# developers and I'm trying to figure out how to apply the idea of spaced repetition to what they do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've got some ideas--in no particular order:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.) Periodic reinforcement via syntax flashcards&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2.) Weekly/monthly coding contests of some sort (possibly vary this with minimum information puzzles as well since problem solving is such an essential skill in software development).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3.) Using &lt;a href=&quot;https://exercism.io/&quot; rel=&quot;noreferrer&quot;&gt;Exercism.io&lt;/a&gt; and other such online academies to reinforce as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would love to hear the thoughts of other educators on this subject.  I'm specifically looking for these answers: does one or any of those strategies seem better than others in terms of teaching software development? Are there articles on the application of spaced repetition to teaching software development? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sorry--I know this is a fairly broad question so if others can suggest ways for me to narrow the question please do.  I just can't think of another way to ask this. &lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2018-08-31T14:41:25.013" Title="How Can I Apply Spaced Repetition To Teaching CS?" Tags="|curriculum-design|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5018" PostTypeId="2" ParentId="5017" CreationDate="2018-08-31T14:41:25.013" Score="6" Body="&lt;p&gt;This is also called &lt;em&gt;Spiral&lt;/em&gt; education. There is a pattern devoted to it in &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1479171824&quot; rel=&quot;noreferrer&quot;&gt;Pedagogical Patterns: Advice for Educators&lt;/a&gt;. But it is more than just repetition. The basic idea is that one introduces an idea early in the course, but in a basic way. Possibly nothing more than its name if the idea is applied early. There can be a lot of such ideas in any given course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, the instructor returns to the idea repeatedly, each time with a deeper explanation requiring deeper understanding. Both the lectures and the student work need to reinforce this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students are unlikely to learn much the first time they see an idea, especially if it has deep implications for which they don't already have the background. Ideas are interrelated, not stand-alone. So, on each loop around the spiral the whole set of ideas gets a deeper understanding. Some curricula actually recognize this. Advanced Calculus in some mathematics programs covers the same material as basic Calculus, but in a deeper way. But you can apply the same concept at a smaller level with short iterations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final work of the students, perhaps a project, can bring all of the ideas together in a fusion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, repetition itself, independent of the Spiral &lt;em&gt;deepening&lt;/em&gt; idea is also needed, even for simple things. This is a result of the way the brain works. To move something into deep, long term, memory and especially to make it available for use, the brain needs to re-wire itself, making new synapse connections. This requires repetition. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-08-31T14:41:25.013" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5019" PostTypeId="1" CreationDate="2018-09-01T11:39:36.987" Score="6" ViewCount="390" Body="&lt;p&gt;It's my second year in my computer science degree, 2nd semester. &#xA;I feel like I am still not good enough and not satisfied with myself! I still can't program and when I have a task I can't think. I just go to google and copy the solution most of the times! Is it normal? I do study a lot even in the summer, but there is something missing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I change in my study technique, to help me become a better programmer?&lt;/p&gt;&#xA;" OwnerUserId="5659" LastEditorUserId="1293" LastEditDate="2018-09-04T13:53:06.833" LastActivityDate="2018-09-13T04:56:30.870" Title="Study Advice for a CS Student" Tags="|student-motivation|self-learning|undergraduate|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5021" PostTypeId="2" ParentId="5019" CreationDate="2018-09-02T09:37:19.597" Score="3" Body="&lt;p&gt;I will only answer the 1st question (as Ben says move the 2nd to a new question (the rule is, one question per question)).&lt;/p&gt;&#xA;&lt;p&gt;So you want to get good a programming.&lt;/p&gt;&#xA;&lt;h1&gt;Where to start&lt;/h1&gt;&#xA;&lt;p&gt;The first thing to do is to stop cheating (your are harming your-self). You will have to start with much easier problems, than you are currently on (It will seem that you are going backwards).&lt;/p&gt;&#xA;&lt;h1&gt;Practice&lt;/h1&gt;&#xA;&lt;p&gt;Then you need to practice, practice, practice. There is an exercise called programming kata, where you just do the same exercise over and over, until you master it.&lt;/p&gt;&#xA;&lt;h1&gt;To copy or not to copy&lt;/h1&gt;&#xA;&lt;p&gt;If you do copy code, then:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;you have not mastered it yet, so you will have to repeat the exercise.&lt;/li&gt;&#xA;&lt;li&gt;copy from your previous projects, not the internet or other people.&lt;/li&gt;&#xA;&lt;li&gt;don't paste code, type it.&lt;/li&gt;&#xA;&lt;li&gt;if you have to use the internet/book/other-people, then use reference manuals, &lt;strong&gt;Don't copy completed solutions&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Reading and writting&lt;/h1&gt;&#xA;&lt;p&gt;To learn to write, first learn to read. Therefore read other peoples code. It is OK to read solutions. Read then, study them, understand them. Then do the exercise yourself. (It is not about memorising, it is about understanding.)&lt;/p&gt;&#xA;&lt;h1&gt;Choice of language&lt;/h1&gt;&#xA;&lt;p&gt;The language you use will have a big effect. Some languages are unsuited as a beginner language.&lt;/p&gt;&#xA;&lt;p&gt;e.g. Javascript is not a good choice of language, for learning to program.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-09-02T09:37:19.597" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5023" PostTypeId="1" CreationDate="2018-09-03T00:54:03.310" Score="188" ViewCount="41809" Body="&lt;p&gt;In computer science, we usually count starting from 0.  Is there any effective way to explain why, to new programmers who ask why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've read a bunch of different sources that list several reasons for 0-indexing.  However, they either seem unconvincing, or seem hard to explain to a new programmer who doesn't have much experience with computer science yet:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Zero-based indexing lets you write loop conditions as &lt;code&gt;i &amp;lt; n&lt;/code&gt;; with one-based indexing, we'd have to write &lt;code&gt;i &amp;lt; n+1&lt;/code&gt;, which saves one instruction.  This makes no sense to me; &lt;code&gt;i &amp;lt;= n&lt;/code&gt; seems like it would be fine.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In C, we can use &lt;code&gt;*a&lt;/code&gt; to access the first element of array &lt;code&gt;a&lt;/code&gt;.  This doesn't seem very relevant today for a new student who isn't programming in C.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;With zero-based indexing, the expression &lt;code&gt;a[i]&lt;/code&gt; compiles to an operation on memory address &lt;code&gt;a + c*i&lt;/code&gt; where &lt;code&gt;c&lt;/code&gt; is a constant representing the size of a single array element; with one-based indexing, it would need to compile to &lt;code&gt;a + c*i - c&lt;/code&gt;.  This reason seems debatable today (couldn't a modern compiler often optimize this away?), but more importantly, I don't really want to be explaining memory addresses to a new programmer who doesn't understand memory layout and maybe doesn't even understand arrays yet.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Is there a better way to explain why to a new student who is just getting started with computer science?&lt;/p&gt;&#xA;" OwnerUserId="1106" LastActivityDate="2024-01-25T13:02:22.993" Title="Why do we count starting from zero?" Tags="|arrays|" AnswerCount="31" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5024" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T03:47:29.267" Score="23" Body="&lt;p&gt;When I've explained this to beginning students, I don't stray far from your third reason, though I agree that the beginning of arrays is early to introduce the concept of memory addresses.  Among other things, that invites about your variable, &lt;code&gt;c&lt;/code&gt;, when the only variable they need to worry about is &lt;code&gt;i&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Instead of memory addresses, I talk about distances from the start. I've given a sample below using paper and a pencil as a reference point, though in my classroom I use the whiteboard and hold a marker.  All of the numbers are in little boxes, and together they form a rectangle.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Look at the list of numbers on the paper. We all know about ordinal numbers, &amp;quot;first&amp;quot;, &amp;quot;second&amp;quot;, &amp;quot;third&amp;quot;, and so forth. But when we program, we actually refer to the list numbers a slightly different way, as 0, 1, and 2. This is called 0-based indexing, and the reasons for it don't matter right now. What matters is that the &lt;strong&gt;first&lt;/strong&gt; item on the list is actually item &lt;strong&gt;0&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Honestly, that's all you need to know to use arrays correctly. But if you want a hint about why we actually do this, you can think about zero-based indexing as the distance from the head of the array.&lt;/p&gt;&#xA;&lt;p&gt;So, if I'm at the head of the array, how many moves do I have to make to read the first number?  No moves, I'm already there. What about the second number? I make one move to get there.  The fourth number? One, two, three moves.&lt;/p&gt;&#xA;&lt;p&gt;Beyond the most important fact that we start counting from 0, thinking about it as &amp;quot;moves&amp;quot; is actually a good way to think about array indexes, because &lt;strong&gt;when we come back to this topic later&lt;/strong&gt;, you'll see that the distance from the head turns out to be an important concept for understanding a lot of things a computer does.  Don't worry we'll get there soon enough.&lt;/p&gt;&#xA;&lt;p&gt;So, for now, what is the index for this spot in the array? &lt;em&gt;(I point to a random index, wait for the students to arrive at the answer.)&lt;/em&gt; Good, well done.  Now, moving on to ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-09-03T14:50:05.263" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5025" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T04:00:13.283" Score="115" Body="&lt;p&gt;If I can modify the question, I can answer what I believe you are looking for.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The question is &quot;Why do we count starting from zero?&quot; The answer is &quot;we don't&quot; Not even in computer science do we &quot;count&quot; from zero. A list with 15 items in it from outside CS still has 15 items in it inside CS realms. Many languages include a &lt;code&gt;count&lt;/code&gt; type function for arrays, and such a function would still return 15 for that list.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If the question becomes &quot;Why do we &lt;em&gt;index&lt;/em&gt; from zero?&quot; then it has a different answer. This time the answer is &quot;because that's the way everyone else does it.&quot; When we separate the concepts of &quot;indexing&quot; and &quot;counting&quot; things become simpler to explain. Often true of any concept, use the proper terminology and many difficulties are eliminated.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As to why we, as humans, index from zero, while counting from one, only requires a little thought before clarity arrives. Assuming a classroom environment, where the class period lasts for a specified time, perhaps 50 minutes, you can ask at very near, but after, a 60 second mark, how many minutes the class has been in session. If asked at 5:02 minutes into class, the answer will be five minutes. Ask them how long class had been in session five minutes ago, which would be around 0:20 into the class period. The answer should be zero minutes. Once they accept that it was zero minutes, even at 0:59 into the class, you can emphasize that even though the class time had not reached a full minute, it &lt;em&gt;is&lt;/em&gt; still class time, and should have some way of &quot;indexing&quot; it. Since the number before one is zero, it must have an index of zero. Hence the &quot;first minute&quot; (by counting) has an index of zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same thought experiments can be conducted with a ruler/tape measure, where the measure starts at zero, and the first centimeter/inch is called, and written, zero. The same concept applies to any distance, such as miles or kilometers, but those are harder to fit into the classroom. In the USA, most highways have &quot;mile markers&quot; that help in locating people for emergency responders. They mark the distance from the beginning of that highway on its south-western end. (The beginning is at the state line if it crosses from one state to another.) &quot;Mile marker&quot; 1 is set after the first mile is completed. &quot;Mile marker&quot; 0 is sometimes seen on the state line, though it is not always there. The first mile, in counting, has an index of 0.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As another example, though not quite as helpful, and requiring that the students have a level of algebra experience to apprehend it, is exponents. Limiting it to non-negative powers of ten and applying it to whole numbers only, we can use the fact that $10^0 = 1$ while $10^1 = 10$. The exponent represents the index for how many places to the right to move (again distance &lt;em&gt;to move&lt;/em&gt;) the decimal point, while the &lt;em&gt;count&lt;/em&gt; of the digits before the decimal point will be 1 larger. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Final demonstration: &quot;What is the &lt;em&gt;index&lt;/em&gt; of the first position on the volume knob below?&quot; &quot;What is the &lt;em&gt;index&lt;/em&gt; of the last position on that volume knob?&quot; &quot;How many positions can you &lt;em&gt;count&lt;/em&gt; on that volume knob?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/dzHYQ.jpg&quot; alt=&quot;Volume Knob&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Once the &quot;index&quot; vs &quot;count&quot; is solved, you can move into the CS realm, where the same practices are followed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An array is &quot;indexed&quot; from zero and &quot;counted&quot; from one. Why? Because that is the way humans index and count. It certainly comes in handy when doing arithmetic with memory addresses, and there's nothing wrong with taking advantage of things that &quot;just work&quot; naturally. Similar shortcuts include dividing and multiplying by powers of two by shifting bits to the right of left. Its usefulness to the compiler, or the developer, however, is not the &lt;em&gt;why&lt;/em&gt;. Such &quot;benefits&quot; are only side effects of &quot;what was&quot; before CS was a reality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bottom line is that index from zero and count from one existed a &lt;em&gt;very long&lt;/em&gt; time before electronic computers were invented. Like any other science, computer science has to build upon what already exists before inventing new things. Zero-based indexing is one such &quot;pre-existing&quot; thing.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2018-09-13T00:02:27.287" LastActivityDate="2018-09-13T00:02:27.287" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5026" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T06:34:31.090" Score="229" Body="&lt;p&gt;None of the reasons you suggest really get to the heart of why we use zero-indexing in CS. Dijkstra's &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html&quot; rel=&quot;noreferrer&quot;&gt;EWD831&lt;/a&gt; explains why this convention works out the best. It comes down to the fact that we want to represent sequences of integers as half-open intervals that are inclusive on the start side.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To denote the subsequence of natural numbers 2, 3, ..., 12 without the pernicious three dots, four conventions are open to us&lt;br&gt;&#xA;  a) 2 ≤ i &amp;lt; 13&lt;br&gt;&#xA;  b) 1 &amp;lt; i ≤ 12&lt;br&gt;&#xA;  c) 2 ≤ i ≤ 12&lt;br&gt;&#xA;  d) 1 &amp;lt; i &amp;lt; 13&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;To paraphrase Dijkstra:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(a) and (b) have the advantage that subtracting the bounds gives you the length, which is convenient because you don't need to remember to add or subtract 1.&lt;/li&gt;&#xA;&lt;li&gt;(a) and (c) have the advantage that sequences starting with zero don't need a negative lower bound -- and negatives are no longer natural numbers.&lt;/li&gt;&#xA;&lt;li&gt;(a) and (d) have the advantage that if you create an interval that starts with zero and shrink it down to zero-length, you don't need a negative for the upper bound.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Because of the above, we want to write all of our intervals as (a).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you accept that (a) is the correct way of specifying intervals, indexing an array of length N as [0, N) is much nicer than [1, N+1).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Two additional notes in favor of using (a) for intervals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first point above is important because half-open intervals nicely decompose into other half-open intervals. This makes implementing divide-and-conquer algorithms like merge sort significantly less error prone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;[4, 14) can be broken into the equal-sized intervals [4, 9) and [9, 14), and the middle index is computed as $9 = \frac{4 + 14}{2}$. This is quite clean and nice.&lt;/li&gt;&#xA;&lt;li&gt;[4, 13], decomposes into [4, 8] and [9, 13], where you get the end of one sequence as $8 = \frac{4 + 13 + 1}{2} - 1$, and the beginning of the next sequence as $9 = \frac{4 + 13 + 1}{2}$. It's easy to forget to add or subtract 1 somewhere.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's also a bit jarring to specify intervals with (b), because it feels unnatural to skip the first element when you're writing a loop.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As for how to explain the above to your students, I think that they just need to accept that breaking sequences of integers in half is something they'll do later on, and then a few examples will quickly point to [,) intervals and zero indexing as the most natural choice.&lt;/p&gt;&#xA;" OwnerUserId="5664" LastActivityDate="2018-09-03T06:34:31.090" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="5027" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T07:12:27.060" Score="9" Body="&lt;p&gt;In languages such as C, the first item in an array has an offset of zero from the pointer. If the size of your objects are 4 bytes, the next item has an offset of 1 x 4 bytes.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Index   Size    Offset&#xA;0       4       base + 0&#xA;1       4       base + 4&#xA;2       4       base + 8&#xA;3       4       base + 12&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the items were indexed on natural counting, there would have to be an adjustment made by both the computer and the programmer to find the location of the item in memory. Mistakes would be made by having this additional step, particularly on the human side of the process. It's easier, although slightly unintuitive, to use zero-based indexing.&lt;/p&gt;&#xA;" OwnerUserId="1279" LastActivityDate="2018-09-03T07:12:27.060" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5028" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T09:38:53.990" Score="40" Body="&lt;p&gt;You have already gotten several good answers about why zero-based indexing is useful, and you have been explained the difference between indexing and counting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I now want to challenge the basic premise of your question: it is &lt;em&gt;not&lt;/em&gt;, in fact, universally agreed-upon that indexing starts at zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Excel, which is arguably the most widely-used programming language in the world (even though it doesn't look much like a &quot;traditional&quot; programming language), row-indexing starts at &lt;code&gt;1&lt;/code&gt; and not &lt;code&gt;0&lt;/code&gt;, and column-indexing starts at &lt;code&gt;A&lt;/code&gt; and not &lt;code&gt;ε&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Visual Basic, the programmer can choose between zero-based and one-based indexing as the default indexing on a per-module (per-file) basis with the &lt;code&gt;Option Base&lt;/code&gt; declaration. Plus, the programmer can declare the exact index range for each individual array using the &lt;code&gt;To&lt;/code&gt; keyword in the array declaration, e.g.:&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-visual-basic prettyprint-override&quot;&gt;&lt;code&gt;Dim Count(100 to 500) as Integer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This declares an array of integers named &lt;code&gt;Count&lt;/code&gt; with indices ranging from &lt;code&gt;100&lt;/code&gt; to &lt;code&gt;500&lt;/code&gt; (inclusive).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &quot;Wirthian languages&quot;, i.e. Pascal and all its successors (Modula-2, Oberon, Component Pascal), arrays can be indexed by any arbitrary range of scalars (except reals).&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;type&#xA;   foo = array[-10 .. 10] of real;&#xA;   (* an array of reals with indices ranging from -10 to +10 *)&#xA;&#xA;   bar = array['b' .. 'g'] of 100..200;&#xA;   (* an array of integers from 100 to 200 with indices ranging from 'b' to 'g' *)&#xA;&#xA;   weekday = (monday, tuesday, wednesday, thursday, friday, saturday, sunday);&#xA;   baz = array[tuesday..friday] of boolean;&#xA;   (* an array of booleans with indices ranging from tuesday to friday *)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The Wirthian languages, in turn, inherited this from ALGOL-60 and ALGOL-68.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ada is similar, &lt;em&gt;any&lt;/em&gt; discrete type can be used as the index type. Interestingly, &lt;em&gt;idiomatic&lt;/em&gt; Ada style suggests using a range starting from &lt;code&gt;1&lt;/code&gt; and not &lt;code&gt;0&lt;/code&gt; when using an integer range as indices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Eiffel, which is heavily inspired by Wirthian languages, array indices have explicit lower and upper bounds which can be any signed 32-bit integer, so you could have an array with indices ranging from &lt;code&gt;-1000000&lt;/code&gt; to &lt;code&gt;-1&lt;/code&gt;, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Fortran, the default is to start at &lt;code&gt;1&lt;/code&gt;, but like ALGOL, Pascal, Eiffel, and VB, you can specify any arbitrary lower and upper bound.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Matlab, indexing starts at &lt;code&gt;1&lt;/code&gt;. In APL and Perl, you can choose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in the &quot;real world&quot;, there are different schemes. E.g., in Germany, the ground floor, i.e. the floor you enter from street level is called &quot;ground floor&quot;, and is usually labelled 0 on elevator buttons that use numbers (&quot;EG&quot; if using letters). The floors above ground level are called &quot;1st upper floor&quot; (and so on) and labelled 1, 2, etc. (or &quot;OG 1&quot;, …) The floors below ground level are called &quot;1st lower floor&quot; (and so on) and numbered -1, -2, etc. (or &quot;UG 1&quot;, …)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the US, &quot;1st floor&quot; is the floor at ground level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Apparently, in Barcelona, there is a &quot;ground floor&quot;, a &quot;primary floor&quot;, and then the &quot;first floor&quot; is &lt;em&gt;two&lt;/em&gt; stairs up from ground level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an interesting discussion about this on &lt;a href=&quot;http://wiki.c2.com/&quot; rel=&quot;noreferrer&quot;&gt;the Wiki&lt;/a&gt;: &lt;a href=&quot;http://wiki.c2.com/?ZeroAndOneBasedIndexes&quot; rel=&quot;noreferrer&quot;&gt;http://wiki.c2.com/?ZeroAndOneBasedIndexes&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also found an essay that compares the syntactic and semantic noise of typical tasks using many different indexing schemes: &lt;a href=&quot;http://enchantia.com/graphapp/doc/tech/arrays1.html&quot; rel=&quot;noreferrer&quot;&gt;http://enchantia.com/graphapp/doc/tech/arrays1.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2018-09-03T09:38:53.990" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5029" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T10:20:44.267" Score="3" Body="&lt;p&gt;I think that one of the first programming languages to use zero-based indexing was BCPL. In BCPL, pointers and integers are interchangable, and arrays are represented by pointers. Subscripting uses the operator &lt;code&gt;!&lt;/code&gt;, so you can get the first and second members of an array using &lt;code&gt;A!0&lt;/code&gt; or &lt;code&gt;A!1&lt;/code&gt;. These are defined to be equivalent to &lt;code&gt;!(A+0)&lt;/code&gt; and &lt;code&gt;!(A+1)&lt;/code&gt; where the unary &lt;code&gt;!&lt;/code&gt; operator dereferences a pointer. It's neat, simple, and consistent, and it wouldn't work with 1-based addressing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of BCPL ideas were carried into C, and the rest is history.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But although zero-based indexing seems to work best for system programming languages, there are many modern languages that chose to start at 1. XPath is an obvious example. I think the rationale there was that it was expected to be used by non-programmers (e.g document authors) and you can't expect a document author to think of the first chapter in a book as chapter 0.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2018-09-03T10:20:44.267" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5030" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T10:56:56.210" Score="10" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;In computer science, we usually count starting from 0.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In &lt;strong&gt;programming&lt;/strong&gt; or in &lt;strong&gt;(theoretical) computer science&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In Programming&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In C programming language you count from 0 to (N-1). And of course in languages which are influenced by C: Java, JavaScript, PHP, C#, C++...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You already named the reason for this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In C, we can use &lt;code&gt;*a&lt;/code&gt; to access the first element of array &lt;code&gt;a&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;... and because &lt;code&gt;a[i]&lt;/code&gt; is the same as &lt;code&gt;*(a+i)&lt;/code&gt; the first index of the array must have the index 0.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This doesn't seem very relevant today for a new student who isn't programming in C.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In many (most?) other programming languages (Basic, Pascal and Matlab for example) you typically count from 1 to N, not from 0 to (N-1).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(For example in &lt;code&gt;for&lt;/code&gt; loops.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As already said in the other answers there often is the possibility to define the index of the first element of an array freely (e.g. in Pascal) or the index of the first element is even fixed to 1 (e.g. in Matlab).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These languages don't have pointer arithmetic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;In (theoretical) computer science&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no idea if they count from 0 there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I think that the programming languages which are used most influence the way of thinking in theoretical computer science, too.&lt;/p&gt;&#xA;" OwnerUserId="4461" LastEditorUserId="4461" LastEditDate="2018-09-03T11:04:31.880" LastActivityDate="2018-09-03T11:04:31.880" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5031" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T11:05:53.773" Score="63" Body="&lt;p&gt;I'm surprised that the following hasn't been stated yet. All of the answers given so far seem to be &quot;after the fact&quot; explanations of something that is really based on the way people built most (not all) early computers as binary machines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To make things a bit more compact here, I'll assume we are creating a 4 bit (nibble) based machine. We don't want to use more binary components to build a nibble than we need to because we are cheap, so we use four bi-stable components (relays, vacuum tubes, transistors). We think of (perhaps) the two states as zero and one rather than, say, red and green. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we have (0000) through (1111) as the combinations of the four transistors of a nibble. We can interpret them any way that we like. Suppose we want to interpret them as integers. How shall we assign the different codes to integers. We &lt;em&gt;could&lt;/em&gt; let (0000) represent 42, a fundamental universal constant, and (0001) represent 3, an approximation to pi and so on, but we realize pretty soon that any computations we want to do with such an encoding would be pretty complex - and complexity in a machine costs money. We are cheap, remember. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So we notice that the codings are actually binary numbers. Well almost nobody used binary numbers before this so we start to think about it seriously now, as they have an application. I note that some early computers were actually decimal, not binary, but they recognized that while convenient it wasn't cheap. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, using binary numbers, not just binary encoding, it becomes &quot;obvious&quot; that the codes represent zero through fifteen, not one through sixteen. Using (0000) to represent 1 just seems dumb at this level - and at this time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, (bit later) we want to index an &quot;array&quot; of nibbles. How shall we do it. Well we assign index numbers to the individual cells. Suppose we have four such cells. How shall we do it? We &lt;em&gt;could&lt;/em&gt; use (0001) through (0100) to index them (1 through 4), but now (a-ha) if we have &lt;strong&gt;sixteen&lt;/strong&gt; nibbles to index but start with one we can only get (our count) to fifteen without using another nibble or letting (0000) represent the last (sixteenth) cell. That seems dumb, so we (a-ha) index from zero. Now we can index sixteen cells with sixteen codes and it is cheap and &lt;em&gt;pretty natural&lt;/em&gt;. The only cost is a bit of confusion in the minds of beginning programmers, but others will pay those costs and our machines can be cheap. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;No contest. Index from zero. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other answers here explore why the arithmetic inside the machine is cheap this way, so I won't repeat it here. But note that all of this happened before any languages at all were invented other than the simplest of machine coding without any abstraction facilities at all. It was just economics and engineering. Make it simple, keep it cheap. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-09-03T11:45:58.140" LastActivityDate="2018-09-03T11:45:58.140" CommentCount="26" ContentLicense="CC BY-SA 4.0" />
  <row Id="5032" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T12:00:26.160" Score="1" Body="&lt;p&gt;Slight generalization of CJ Denis's answer: The advantage of zero-based indexing is apparent as soon as you start working with relative indices. If you have a base array A and over it, let's say, a sliding window W, you would have to subtract 1 each time you add W-based index to the A-based one.&lt;/p&gt;&#xA;" OwnerUserId="5676" LastActivityDate="2018-09-03T12:00:26.160" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5034" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T13:55:59.200" Score="7" Body="&lt;h3&gt;Simply put, we do not &lt;em&gt;count&lt;/em&gt; from zero, we &lt;em&gt;shift&lt;/em&gt; from zero&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;You can think C as a neat way to &lt;em&gt;not&lt;/em&gt; write different assembly for every architecture/machine/processor in existence. Instead, take a &lt;a href=&quot;https://www.bell-labs.com/usr/dmr/www/cman.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;simple and short&lt;/a&gt; macro-like language for a abstracted machine, compile that, and &lt;a href=&quot;http://man7.org/linux/man-pages/man2/brk.2.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;brk()&lt;/a&gt; your way on abstracted memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But abstracted memory is only a sequence of bytes, you need a way to refer to specific segments. Enter pointers. But to not make every item a allocation (think of a string where every char is separately allocated) the next step is &quot;lists&quot;. The most compact list&lt;sup&gt;1&lt;/sup&gt; is a pointer to the first element, and then put every other element in adjacent slots.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Every element is, then, indexed as &lt;em&gt;shift from first&lt;/em&gt;. And because that, the shift &lt;em&gt;index&lt;/em&gt; starts from zero.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; This is from a era when you need entire reunions to decide if is worth spend whooping &lt;strong&gt;52 bytes&lt;/strong&gt; to have &lt;a href=&quot;https://pt.wikipedia.org/wiki/The_Mythical_Man-Month&quot; rel=&quot;nofollow noreferrer&quot;&gt;your system&lt;/a&gt; know about leap years...&lt;/p&gt;&#xA;" OwnerUserId="5684" LastEditorUserId="5684" LastEditDate="2018-09-09T15:38:39.347" LastActivityDate="2018-09-09T15:38:39.347" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5036" PostTypeId="2" ParentId="5023" CreationDate="2018-09-03T22:31:38.753" Score="6" Body="&lt;p&gt;I will try to answer, without reference to low-level programming (or any programming language), without mention of history, or much maths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As already stated in some answers, we do not count from zero (using the value 0 to represent 1, and 1 to represent 2 (Usually)). So what do we do?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We measure from zero. If I give you a ruler, and ask you to measure something, you measure from zero. If I ask you to tell me how far a cell in an array is from the start, then you measure from zero (the first cell is zero from the start: it is at the start), the 2nd cell is 1 from the start. &lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-09-06T08:58:00.277" LastActivityDate="2018-09-06T08:58:00.277" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5037" PostTypeId="2" ParentId="5003" CreationDate="2018-09-04T05:45:07.583" Score="1" Body="&lt;p&gt;In a nutshell, we can say that though pointers appear to be a simple idea to understand their basic functionality, the difficulty arises due to the many associated concepts of pointer management and utilization. These are referencing, dereferencing,  allocation, deallocation, sequential indexing, parameter passing (call by value!), pointers to pointers, typecasting, self references in objects, dynamic binding etc., which need to be understood to know how pointers can be used correctly and efficiently. To address a part of the difficulty of pointer management, we have the auto_ptr template class in the c++ STL.&lt;/p&gt;&#xA;" OwnerUserId="5718" LastActivityDate="2018-09-04T05:45:07.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5038" PostTypeId="2" ParentId="5023" CreationDate="2018-09-04T19:31:14.620" Score="4" Body="&lt;p&gt;I think it's best to view addresses and indices not as identifying objects or elements, but rather the spaces between or on either side of them.  Thus, an array with four elements would have the following indices:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Addr:   Base+0  Base+1   Base+2  Base+3  Base+4&#xA;.         V       V        V       V        V&#xA;Indices:  0       1        2       3        4&#xA;Elements   [FIRST] [SECOND] [THIRD] [FOURTH]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Each element is associated with two addresses--the one immediately preceding it and the one immediately following it.  The address immediately following any element other than the last will immediately precede another element, and likewise the address immediately preceding any element other than the first will follow another element.  Even though each address other than the first and last will be associated with two elements (one preceding and one following), by convention applying the &lt;code&gt;*&lt;/code&gt; operator to an address yields the one following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that unlike the &quot;half-open interval&quot; view, this approach does not require any special handling for pointers that go one beyond the last element.  The address &quot;Base+4&quot; above is associated with the four-element array just like any other, but the &lt;code&gt;*&lt;/code&gt; operator cannot be applied to it because that operator would require the ability to compute the next address.&lt;/p&gt;&#xA;" OwnerUserId="2073" LastActivityDate="2018-09-04T19:31:14.620" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5039" PostTypeId="2" ParentId="5019" CreationDate="2018-09-05T00:17:15.290" Score="3" Body="&lt;p&gt;Speaking very generally, coding requires two different kinds of skills:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Knowing the syntax of various concepts, e.g. what a &lt;code&gt;for&lt;/code&gt; loop looks like.&lt;/li&gt;&#xA;&lt;li&gt;Knowing when to use the concepts to solve a problem, e.g. to know when to use the &lt;code&gt;for&lt;/code&gt; loop.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Going to google and copying some code might help with the first skill, but it doesn't help with the second skill at all. And it turns out that the second skill is much more important than the first skill!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only way to improve your ability to code is through &lt;strong&gt;practice.&lt;/strong&gt; Here's what I recommend:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a personal website. Use something like GitHub Pages. Start with something very simple.&lt;/li&gt;&#xA;&lt;li&gt;Give yourself a project. The project should give you an opportunity to explore a topic you're interested in, but it should be small enough to finish in a few days. (Think a weekend, not a month.)&lt;/li&gt;&#xA;&lt;li&gt;Finish that project, and add it to your personal website. Write a blog post talking about what you learned, include screenshots or an interactive demo.&lt;/li&gt;&#xA;&lt;li&gt;Repeat. Build up a portfolio website of the stuff you're interested in, and slowly work your way up to more advanced topics.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The idea is that you need to practice &lt;a href=&quot;https://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;breaking down a problem into smaller steps&lt;/a&gt; and working on one small step at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also see the answers to this related question: &lt;a href=&quot;https://cseducators.stackexchange.com/a/4972/2068&quot;&gt;Advice for becoming more confident in programming&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-09-05T00:17:15.290" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5040" PostTypeId="2" ParentId="4998" CreationDate="2018-09-05T13:02:12.190" Score="6" Body="&lt;p&gt;I think this question is confusing &quot;Computer Science&quot; and &quot;Software Engineering&quot; / &quot;Software Development&quot; / &quot;Programming&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science has nothing to do with &quot;cutting &amp;amp; pasting code&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Type Theory is hotter today than it ever was, Type Systems can do more things than they ever could, Programming Language Theory is blooming, Compilers perform optimizations that would make Admiral Hopper's head explode, companies like Microsoft not only &lt;em&gt;use&lt;/em&gt; Automated Theorem Proving to prove (parts of) their code correct, they actually employ researchers, scientists and engineers to &lt;em&gt;invent&lt;/em&gt; those tools in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Mainstream programming languages are more and more based on principled, rigorous, mathematically proven foundations, for example look at the evolution of Scala and the Calculus of Dependent Object Types. We have projects like seL4 and L4.verified that produce a mechanically proven correct microkernel. In combination with a verified C compiler (which now exists), a verified assembler (which now exists), and a verified CPU (which now exists), you have a system that has been proven correct from the OS layer down to VHDL. Once you get a verified VHDL compiler, you have a system that is proven correct down to the transistor level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have entire subfields like Quantum Computing and Bioinformatics which not that long ago didn't even exist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Average web programmers now know about things like Monads, Promises, Futures, Vector Clocks, the CAP Theorem. Working programmers in industry casually throw around sentences like &quot;an infinite event loop is actually just finite co-recursion over co-data&quot; and use concepts like monads, co-monads, functors, co-functors, bifunctors, arrows, categories, catamorphisms, hylomorphisms, homomorphisms, isomorphisms, monoids, semigroups, groups, fields to structure their programs.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/a/3870310/2988&quot;&gt;All told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For example, the &lt;code&gt;IObservable&lt;/code&gt;/&lt;code&gt;IObserver&lt;/code&gt; pair of interfaces in .NET was mathematically derived as the category-theoretical dual of &lt;code&gt;IEnumerable&lt;/code&gt;/&lt;code&gt;IEnumerator&lt;/code&gt;. That is CS applied to library API design of one of the most widely-used libraries.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many programs nowadays are asynchronous, concurrent, parallel, or distributed, or even all of the above. How to make that safe, performant, and accessible to the average programmer (or even non-programmers) is an active area of research in Type Theory, PLT, and Compilers.&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2018-09-05T13:02:12.190" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5041" PostTypeId="2" ParentId="5023" CreationDate="2018-09-07T04:07:41.310" Score="4" Body="&lt;p&gt;Why not?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why not count from zero?  (This answer is a bit like &lt;A HREF=&quot;https://cseducators.stackexchange.com/a/5031/1676&quot;&gt;Buffy's answer&lt;/A&gt;, but a bit simpler logic than many of the other answers.)  Zero is a perfectly valid number.  So why not use it?  Failing to use that available number is just a waste of the possibility of using that number.  You wouldn't want to start lower, since negative numbers may be a bit more complicated to need to consider, and may even be unavailable (when using unsigned numbers).  But zero is available, so why waste the possibility of being able to use that number?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do that, it's like the 63 SPT (sectors per track/head) limit that contributed to the &lt;A HREF=&quot;http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;504 MiB / 528 MB) Barrier&lt;/A&gt;.  That used a 1-based count.  If a zero-based count were used, a limit would have been 512 MB instead of 504 MB.  In a day and age when hard drives were counted in megabytes, that limit was nearly 1.6% smaller because someone decided to do a one-based count for one of the numbers.  So, keeping that real-world actual cost in mind, what benefit is there to trying to exclude zero?  If there isn't one, then don't do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Standardizing on one number is nice.  When I was ten years old, I knew how to program.  Sometimes I counted from one (e.g., &quot;&lt;code&gt;for(x=1;x&amp;lt;=10;x++)&lt;/code&gt;&quot; ), while other times I counted from zero (e.g., &quot;&lt;code&gt;for(x=0;x&amp;lt;10;x++)&lt;/code&gt;&quot; ).  Sometimes I would mix up those methods, and create a fencepost bug (using &quot;&lt;code&gt;for(x=0;x&amp;lt;=10;x++)&lt;/code&gt;&quot; ).  Later in life, I was pretty strongly compelled to count from zero and drop the test for equality (just testing for inequality using &lt;code&gt;&amp;lt;&lt;/code&gt;, instead of &quot;less-than-or-equal&quot; using &lt;code&gt;&amp;lt;=&lt;/code&gt;), and once I got into a standardized habit, I found myself to be far less likely to be making those off-by-one errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, the code of in many &quot;high level&quot; programming languages is just meant to be converted into &quot;low level&quot; assembly language, which is designed to operate the same way as an actual chip.  Zero is kind of a special number (having unique properties with addition and multiplication), while one has less special behavior (having a similar unique property with multiplication, but not addition).  So it makes a bit of sense for zero to be special.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you think of the &quot;what's left&quot;, zero is more logical.  If you count down (&quot;'for x=10;x;x--)`&quot;), then do you want to exit when there is one job left, or zero jobs left?  Zero is more sensible in that particular case, and that may be a key reason why some of the Intel Assembly Language operators perform the way they do.&lt;/p&gt;&#xA;" OwnerUserId="1676" LastActivityDate="2018-09-07T04:07:41.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5042" PostTypeId="2" ParentId="5023" CreationDate="2018-09-07T10:52:32.820" Score="6" Body="&lt;p&gt;From time to time I have had to do numerical work in MATLAB and the 1-based indexing always stuck out like a sore thumb, so I have a few examples I can provide where 0-based indexing is advantageous.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Modular access&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is the simplest example. If you want to &quot;wrap around&quot; an array, the modulus operator works like a charm. (And don't say &quot;what if the modulus operator were defined from 1 to n instead&quot;—that would be mathematically ludicrous.)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;str = &quot;This is the song that never ends... &quot;&#xA;position = 300&#xA;charAtPosition = str[position % (str.length)]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Real world examples of this might include working with days of the week, generating repeating gradients, creating hash tables, or coming up with a &#xA;predicable item from a small list given a large ID number.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Distance of zero&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In a lot of algorithms and applications, we need to work with distances. Distances can't be negative—but they can be zero. For example, one might want to count how many occurrences there are of each distance in a data set. Indexing from 0 allows this to be handled more naturally. (Even if distances aren't integers—see below.)&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Discretisation&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Let's say you want to generate a histogram of heights. The first &quot;bucket&quot; is 50cm-70cm. The next is 70-90cm. And so on up to 210cm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using zero-based indexing, the code looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bucket[floor((height - 50) / 20)] += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With 1-based indexing, it looks like&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bucket[ceil((height - 50) / 20)] += 1&#xA;  or&#xA;bucket[floor((height - 50) / 20) + 1] += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(the two have slightly different semantics). So you can either have a stray &quot;+ 1&quot; or use the ceil function. I believe the floor function is more &quot;natural&quot; than the ceil function since floor(a/b) is the quotient when you divide a by b; for this reason integer division often suffices in such calculations whereas the ceil version would be more complex. Also, if you wanted the buckets in reverse order, this is 0-based indexing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;BUCKETS = (210 - 50) / 20 - 1&#xA;&#xA;#intuitive because BUCKETS - 1 is the highest index&#xA;bucket[(BUCKETS - 1) - floor((height - 50) / 20)] += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;versus&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#not intuitive... what does BUCKETS + 1 represent?&#xA;bucket[BUCKETS + 1 - ceil((height - 50) / 20)] += 1&#xA;  or&#xA;#not intuitive... how come a forwards list needs &quot;+ 1&quot; but&#xA;#backwards list doesn't?&#xA;bucket[BUCKETS - floor((height - 50) / 20)] += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Change of Coordinate Systems&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is related to the above &quot;direction flip&quot;. Although I will use a 1 dimensional example, this also applies to 2D and higher dimensional translations, rotations, and scaling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's suppose, for each slot in the top row you want to find find the best fitting slot in the bottom row. (This often occurs when you want to efficiently reduce the quality of some data; image resizing is a 2D version of this).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With 0-based indexing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/NKGyx.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NKGyx.png&quot; alt=&quot;0-based indexing&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#intuitive because the centre of slot[0] is actually at x co-ordinate 0.5&#xA;nearest = floor((original + 0.5) / 5 * 7);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With 1-based indexing:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/DjYJ3.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/DjYJ3.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#Why -0.5? Can you explain? And then we need to &quot;fix&quot; it with a +1&#xA;nearest = floor((original - 0.5) / 5 * 7) + 1;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;Nice Invariants&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;In order to prove that programs work correctly, computer scientists use the concept of an &quot;invariant&quot;—a property that is guaranteed to be true at a certain place in the code, no matter the program flow up to that point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not just a theoretical concept. Even if invariants are not explicitly provided, code that has nice invariants tends to be easier to think about and explain to others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, when writing 0-based loops, they often have an invariant that relates a variable to how many items have been processed. E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;i = 0&#xA;&#xA;#invariant: i contains the number of characters collected&#xA;&#xA;while not endOfInput() and i &amp;lt; 10:&#xA;&#xA;    # invariant: i contains the number of characters collected&#xA;&#xA;    input[i] = getChar()&#xA;&#xA;    # (invariant temporarily broken)&#xA;&#xA;    i += 1&#xA;&#xA;    #invariant: i contains the number of characters collected&#xA;&#xA;#invariant: i contains the number of characters collected&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There are two basic ways to write the same loop with 1-based indexing:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;i = 1&#xA;while not endOfInput() and i &amp;lt;= 10:&#xA;    input[i] = getChar()&#xA;    i += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In this case &lt;code&gt;i&lt;/code&gt; does not represent the number of characters collected, so the invariant is a bit messier. (You would have to remember to subtract one later on if you wanted the count.) Here is the other way:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;i = 0&#xA;while not endOfInput() and i &amp;lt; 10:&#xA;    i += 1&#xA;    input[i] = getChar()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now the invariant holds again so this approach seems preferable, but it seems odd that the initial value of i can't be used as an array index—that we are not &quot;ready to go&quot; straight away and have to fix up &lt;code&gt;i&lt;/code&gt; first. I suppose it's initially odd for learners of zero-based languages that, after the loop terminates, the variable is one more than the highest index used, but it all follows from the basic rule of &quot;a list of size i can be indexed from 0 to i-1&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I admit that these arguments may not be very strong. That said, off-by-1 errors are one of the most common types of bug and at least in my experience, starting arrays from 1 needs a whole lot more adding and subtracting 1 than 0-based arrays.&lt;/p&gt;&#xA;" OwnerUserId="2592" LastEditorUserId="2592" LastEditDate="2018-09-13T22:02:18.773" LastActivityDate="2018-09-13T22:02:18.773" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5043" PostTypeId="2" ParentId="17" CreationDate="2018-09-07T22:58:09.950" Score="0" Body="&lt;p&gt;I came up with an analogy that helped me visualize recursive programming a great deal.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Imagine a water tank with an inflow pipe on one side. On the other side, about halfway up the tank, is the outflow pipe which is where you collect the water.&lt;/li&gt;&#xA;&lt;li&gt;Water enters the inflow pipe. As it enters, it gets tested to see if it's clean. If it's found to be clean, a valve will empty the water directly into the tank and let the clean water flow into the tank and then right through to the outflow pipe and we are done.&lt;/li&gt;&#xA;&lt;li&gt;But if the water test reveals that it is dirty, it gets decontaminated by some amount then gets directed into another tank inside of bigger tank.&lt;/li&gt;&#xA;&lt;li&gt;This second tank does exactly the same thing as the outer tank. It first tests the water, dumps it into the tank if it is clean and if it isn't, it cleans it a little bit, and then sends it to a third inner tank. This process continues.&lt;/li&gt;&#xA;&lt;li&gt;When the last inner tank is reached and the water is completely clean, the valve lets the water spill directly into the tank. This water then flows out of the tank though the outflow and into the outer tank surrounding it. That outer tank fills up until water spills out into &lt;em&gt;its&lt;/em&gt; outer tank. Each of these tanks can also treat the water if they want (add chlorine or fluoride to it or even send it to another recursive processing tank).&lt;/li&gt;&#xA;&lt;li&gt;This cascading action continues until the last outer tank spills out the clean, processed water, representing the data we desire.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5853" LastEditorUserId="5853" LastEditDate="2018-09-07T23:04:28.387" LastActivityDate="2018-09-07T23:04:28.387" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5044" PostTypeId="2" ParentId="5023" CreationDate="2018-09-08T22:15:05.737" Score="-3" Body="&lt;p&gt;&quot;Thing zero&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have nothing, I have one thing, I have two things... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;0,1,2... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;0x00, 0x01, 0x02... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;0000, 0001, 0010...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing in my register, there is one thing in my register, there are two things in my register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is nothing in my array, there is one thing in my array, there are two things in my array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you started at one, you'd always have a minimum of one thing.&lt;/p&gt;&#xA;" OwnerUserId="5865" LastActivityDate="2018-09-08T22:15:05.737" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5045" PostTypeId="2" ParentId="5023" CreationDate="2018-09-09T09:22:42.333" Score="1" Body="&lt;p&gt;There are many answers but I miss an attempt to make it short and comprehensible for non programmers.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I don't really want to be explaining memory addresses to a new programmer who doesn't understand memory layout and maybe doesn't even understand arrays yet.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A simple and short example.&lt;br&gt;&#xA;We have a list of elements aligned one after the other. The start of this list, the first element is flagged with a pin.&lt;br&gt;&#xA;To get the first element, we go to where the pin is.&lt;br&gt;&#xA;To get the second element, we need to go to the pin &lt;strong&gt;plus one&lt;/strong&gt; element.&lt;br&gt;&#xA;Starting at zero the computer can simply calculate where to go from the start location.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More thoughts on that.&lt;br&gt;&#xA;Counting starts with &quot;one&quot; for the first element. Even for programmers. But programmers &lt;strong&gt;don't count&lt;/strong&gt; elements when they start at zero, they &lt;strong&gt;give them names&lt;/strong&gt;. These names start at the first number that can be built with digits. Zero denotes &quot;nothing&quot; but is the first valid number.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;couldn't a modern compiler often optimize this away?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think it can't. How? The calculation described above is fundamental, the CPU does it like that. A compiler can't optimize necessary calculations away.&lt;/p&gt;&#xA;" OwnerUserId="5871" LastActivityDate="2018-09-09T09:22:42.333" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5046" PostTypeId="2" ParentId="5023" CreationDate="2018-09-09T12:15:13.877" Score="1" Body="&lt;p&gt;Languages which start from 0 are currently popular but there are others which start from 1.  These examples are quite old.  Many of the start from 0 languages are derived from or inspired by C.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cobol is not fashionable now but it is still an important language in business and its arrays start at 1.  RPG (not role playing games) also has arrays which start from 1.  RPG is ugly and horrible but it is also popular in business.  My Fortran is rather rusty but I think that it also started at 1.  Very long ago, I used Algol and you could choose the starting index 0, 1, or even negative.  For some applications, negative indexes e.g. from -10 to +10, were convenient.  I am not sure whether this was a standard feature or just one of the dialect that I used.  Things were not so standardised back then.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edited to remove possible unintended offence.  &lt;/p&gt;&#xA;" OwnerUserId="5875" LastEditorUserId="5875" LastEditDate="2018-09-10T13:02:24.313" LastActivityDate="2018-09-10T13:02:24.313" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5048" PostTypeId="2" ParentId="5023" CreationDate="2018-09-10T13:53:58.353" Score="3" Body="&lt;p&gt;Counting is always 100% arbitrary. &lt;strong&gt;Counting from 0, from 1 and from 7 - all make exactly same sense.&lt;/strong&gt; Our reliance on indexing from 1 in real life is no different than our reliance on 10 as base of positional system. It's nothing but a convention.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only issue is &quot;How do I remember where do we agreed to start counting at?&quot;. From there comes the lead-on question: &quot;What is the default value for integer variable?&quot; or &quot;If you started with a freshly initialized integer, what would you think would be it's value?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is the reason why we start at 0: &lt;strong&gt;Integers start at 0, so it's helpful to map the first entry of an array to the first value of a variable capable of indexing it.&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="2800" LastActivityDate="2018-09-10T13:53:58.353" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5049" PostTypeId="2" ParentId="5023" CreationDate="2018-09-10T16:16:08.863" Score="1" Body="&lt;p&gt;You give the answer yourself in the third bullet point, and you dismiss it too easily.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me delve into my personal experience from when I learned C in the mid-1980s. I remember when for the first I time saw 68k assembler code produced from indexing an array in C and realized that variables are just constant addresses, and indices are just offsets to them, so that addressing an array element &lt;code&gt;a[i]&lt;/code&gt; could be understood as &lt;code&gt;*(a+i)&lt;/code&gt; which simply was a readily available adressing mode in machine code if  address &lt;code&gt;a&lt;/code&gt; was already in a register.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It was a revelation on many levels: What C is (a macro assembler with a few bells and whistles plus standard library), what a compiler does, under what constraints programming languages work, and why C was so fast.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why do you want to deprive your students of this insight? I think teaching arrays (or any programming, really) benefits &lt;em&gt;tremendously&lt;/em&gt; from teaching memory addresses and some rudimentary assembler, so just go for it. All language abstraction is operating under the constraints of the metal. Your students will never understand why certain seemingly simple things are expensive or impossible if they &lt;em&gt;don't know what they are actually doing.&lt;sup&gt;1&lt;/sup&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To sum up, essentially your third bullet point is the reason for the decision by the designers of C (or probably rather, BCPL or B) to start indexing at 0. Saving a subtraction at each element access, i.e. in many hot loops, was certainly highly relvant in 1970. True, &lt;em&gt;today&lt;/em&gt; these original reasons are largely irrelevant; but today we have 45 years of code and a diverse C-rooted language tree. Regarding these languages we are locked in for good. As Jörg correctly mentioned in another answer, the decision was made differently for many other languages, probably not coincidentally some for which speed is secondary and some who target a lay audience.&#xA;&lt;hr&gt;&#xA;&lt;sub&gt;&lt;sup&gt;1&lt;/sup&gt;Don't get me wrong, I like abstraction. Having had the glimpse under the hood lets me actually appreciate the saftey, correctness and comfort provided by high-level languages and libraries.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="1675" LastEditorUserId="1675" LastEditDate="2018-09-11T00:13:45.583" LastActivityDate="2018-09-11T00:13:45.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5050" PostTypeId="2" ParentId="5019" CreationDate="2018-09-10T23:16:34.407" Score="3" Body="&lt;p&gt;There's often a huge difference between sitting in a class and solving problems. It's the difference between knowing how to do an integral and realizing that in this specific instance it makes far more sense to use the trapezoidal method to numerically find the integral.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how do you learn to solve problems? By solving problems. Which of course sounds mildly circular. Here's what I'd recommend: pick an easier problem, one you &lt;em&gt;know&lt;/em&gt; you can solve. [If you're looking for problems, try out the Euler problems, which are a ton of fun, and start easy and then get harder.]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Solve that problem as many ways you can. Try to go for at least five. Bonus points for all the extra solutions you come up with. Then, go through each solution and explain to your handy rubber duck what makes each solution good or bad - the pros or cons to each. Try to invent situations where each solution would be optimal, or decidedly non-optimal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This sort of work will improve you far more than studying. Studying will expand your toolkit to some extent, but you have to use the toolkit to really understand whether or not certain things will work in certain situations. When you're in a woodshop class, there's a reason you'll spend most of your time on the shop floor. The human mind gains far more from experience than reading or lecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, let me make something very clear. While you shouldn't make someone else do your schoolwork, you have to be careful not to completely fence yourself off from help. My dad (an engineer) often says that one of the great mistakes of engineers is believing they are working on a completely unique problem that has never been solved before, or somehow believing that no one can help them (or that they shouldn't &lt;em&gt;have&lt;/em&gt; to ask for help). All of that is false. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My time breakdown when working on a project is generally 1% programming, 49% debugging, 50% googling/stack-overflow-ing. It's not a bad thing to ask the almighty google. It's more about knowing when something is within your capabilities, and when you need help. And always, always, read about &lt;em&gt;why&lt;/em&gt; the code works - critical so you can adapt it to your application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tl;dr: solve them problems. And don't use google too much.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2018-09-10T23:16:34.407" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5051" PostTypeId="2" ParentId="5023" CreationDate="2018-09-11T07:56:52.943" Score="0" Body="&lt;p&gt;There are several explanations. But I would say that the main reason is because the number in computer science represents a memory offset i.e. the physical distance from the beginning of the memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;0 then means &quot;no distance from the beginning of the memory&quot; that is, the start. &lt;/p&gt;&#xA;" OwnerUserId="2330" LastActivityDate="2018-09-11T07:56:52.943" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5052" PostTypeId="2" ParentId="5023" CreationDate="2018-09-11T16:10:01.470" Score="1" Body="&lt;p&gt;It's not an answer, but it is additional information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was a student, what eventually helped it click for me is that I always found it really annoying and weird that the &quot;19th Century&quot; goes from 1800-1899, and the &quot;20th Century&quot; goes from 1900-1999.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if we would have started indexing centuries at 0, then the &quot;0th Century&quot; goes from 0-99, the &quot;1st Century&quot; goes from 100-199, ... the &quot;19th Century&quot; goes from 1900-1999, and the &quot;20th Century&quot; goes from 2000-2099.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise – if you're in a place where soccer/football is popular – we typically say the &quot;1st minute&quot; to talk about 0:00–0:59, the &quot;27th minute&quot; to talk about 26:00–26:59, etc. Had we started indexing minutes at 0 instead, the &quot;27th minute&quot; would more logically be 27:00–27:59. (Of course, both of these ignore the additional confusion that the 90th minute is sometimes considered to be 89:00–93:00.)&lt;/p&gt;&#xA;" OwnerUserId="5910" LastActivityDate="2018-09-11T16:10:01.470" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5053" PostTypeId="2" ParentId="5023" CreationDate="2018-09-12T01:18:45.187" Score="1" Body="&lt;p&gt;The technical answer, the one where you explain memory, and the base and index register, should be your preferred method of instructing. I understand that some people think it's daunting, but in reality, it is really straight forward, and it should be the first thing you teach about programming. All of the stack overflows, stack underflows, buffer overflows, null pointer exceptions, dangling pointers, memory leaks, etc are all a lot easier to understand if you start with the basics of what a computer actually does. And you don't need to get super-technical with buses and caches and so on, just enough so that when a memory-related problem happens, they will understand why it happened easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a comparison, which do we teach first in math: addition or multiplication? The reason why is because the latter is a concept built upon the foundation of the former. Teaching what a variable is before teaching what memory is akin to teaching multiplication without ever explaining addition. Everything we do in every computer language that exists on the market to today uses registers and memory. All of them. 100%. To completely gloss over the fundamental basics of computing is to perform a serious disservice to those you are supposed to be educating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I realize that many modern languages have done away with bare pointers because of their potential for misuse, but that means that the new generation of developers are growing up without understanding a critical part of computers. And pointers are still everywhere, just neatly tucked away behind references, objects, automatic variables, and so on. Which leads to questions about in/out parameters, why changing a value here affected data elsewhere, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Until we have a computer that literally has no concept of a stack, registers, heap/dynamic memory, loops, branches, etc, no matter how far we abstract, at some point, the processor needs to do its thing. And that thing will be done by loading a memory address to a base register, loading an index register, and loading the data from memory as a result of the final calculation. If students do not learn this in class, they will certainly not learn it in the real world in any appreciable amount of time, and will write far inferior code for perhaps the rest of their developer career.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Teach your students the basics of computers, and I can virtually guarantee that anyone with sufficient aptitude to be a developer to begin with will never ask the question &quot;why do we count from zero.&quot; Once the basics are established, everything else becomes that much easier.&lt;/p&gt;&#xA;" OwnerUserId="2076" LastActivityDate="2018-09-12T01:18:45.187" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5055" PostTypeId="2" ParentId="5023" CreationDate="2018-09-12T11:47:25.257" Score="0" Body="&lt;p&gt;You are starting with the first element of you index set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a math text, your index set usually is $\mathbb{N}\setminus\{0\}$, because this is how you normally count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in your PC you use an unsigned integer type as index set. And the &lt;strong&gt;first&lt;/strong&gt; element of this ordered set is the number $0$, not the number $1$.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the problem is your number type. You could have a natural-number datatype without zero for your index and everything would be fine. But we like to re-use existing data types used for arithmetic, which normally need to have a $0$, which comes before the $1$.&lt;/p&gt;&#xA;" OwnerUserId="4631" LastActivityDate="2018-09-12T11:47:25.257" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5056" PostTypeId="2" ParentId="5023" CreationDate="2018-09-12T13:49:58.990" Score="6" Body="&lt;p&gt;Rather than answer myself based off my personal preference, as all other posters have done, I would instead like to link the following very in-depth analysis instead:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://enchantia.com/graphapp/doc/tech/arrays1.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Arrays Indexed From One&lt;/a&gt; by  Loki Patrick&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The conclusion it comes to, is as follows:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In conclusion, I set out to prove by usage cases which scheme was better: indexing arrays from zero, or indexing arrays from one. I think the discussion has shown that there is no mathematically strong argument that favours one or the other. Every usage case which asserts one scheme is better than another because that other scheme is more awkward can be countered either by a language syntax which ameliorates the problem, or else can be balanced against some other usage cases in which the first scheme is more awkward than the other it is being compared against. There are many data points, and the analysis is complex, yielding &lt;em&gt;no clear winner&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;However, the thing which tips the balance in my mind is &lt;em&gt;historical convention&lt;/em&gt; and &lt;em&gt;interoperability issues&lt;/em&gt;. There are so many existing applications for &lt;strong&gt;zero-based indexing&lt;/strong&gt;, and many existing languages which use it, that interoperability and learnability are biased in favour of that camp in my opinion. It is disheartening that the result of an intellectual discussion should be settled with &amp;quot;that's the way we've always done things&amp;quot; but in this case it seems a justified conclusion.&lt;/p&gt;&#xA;&lt;p&gt;That being said, I think for certain specialised or high-level languages, I hope there is a place for one-based indexing, because I feel it has been an inadequately explored solution to the job of addressing elements of an array. I hope this essay has shown that there are some inherently good things about these schemes, and I also hope that future discussions of the issue won't unnecessarily conflate indexing from one with including end-points in loops or slices; although related, the two are not the same issue.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;My personal preference is 1-based, because in my experience, the +-1s in 0-based indexing tend to pop up more often in high level logic, while 1-based indexing's +-1s tend to pop up in lower-level code where you need to be paying attention anyway that don't pop up as often in high-level code, leading me to commit notably fewer off-by-one bugs in 1-based languages like Lua.&lt;/p&gt;&#xA;" OwnerUserId="5921" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-09-12T17:22:43.563" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5057" PostTypeId="2" ParentId="5023" CreationDate="2018-09-12T21:02:50.487" Score="0" Body="&lt;p&gt;Very simple:  This is the offset of the address.  So if an array called x is &lt;code&gt;located with x at say 0x1000&lt;/code&gt;, an array that start's there has its first element &lt;code&gt;x[first] at 0x1000&lt;/code&gt;&#xA;By using:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 0 as [first]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;there's no math to compute it's start, and it is computationally efficient.&lt;/p&gt;&#xA;" OwnerUserId="5930" LastActivityDate="2018-09-12T21:02:50.487" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5058" PostTypeId="2" ParentId="5019" CreationDate="2018-09-13T04:56:30.870" Score="0" Body="&lt;p&gt;What can I change in my study technique, to help me become a better programmer?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've always found that programming is a way of thinking; a thought process. I started with Pascal, C, COBOL and Assembler. was a system admin for a long while and suddenly I am programming in VBA now. Learnt VBA in 2 weeks and still learning more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well to be a better programmer, the first thing you need is a mind that thinks in terms of processes. What must come first then follow on to the second and go on to the third. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you got that ? Practice with a simple task like opening the door, If you were to instruct a computer/robot to do so... how would the commands be like. Don't worry about what language its going to be in. Start with the psuedocode/algorithm. What is the general flow.&#xA;ie &#xA; 1. approach the door; &#xA; 2. take note of the door ( opens towards or away ) distance ( within reach) how to activate door opening procedure. and most importantly IS IT OPEN.&#xA; 3. depending on the conditions of the previous checks you proceed to either open the door or walk right through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comment all your code ! I had a Lecturer return 0 for any program that had no comment on it. Comments are meant to show the logic/process/thinking of your program. So no comment equates to no thinking or no logic. didn't matter to him if your program worked or not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understand what you are copying, read the commented sections of the code that you are copying. It will give you a hint of why some commands are there and why some are not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These were the basic tenets that were drilled in to me in my first years of programming. Still sticks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Language is just how you say something. If you got the mindset right, and the ability to think out the process/logic of a program. You can program in any language, Java, JSON, C#, C++, python  or even VB; Its just how to type the syntax of the commands. a good IDE will stop you from screwing that up too much.&lt;/p&gt;&#xA;" OwnerUserId="5913" LastActivityDate="2018-09-13T04:56:30.870" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5059" PostTypeId="2" ParentId="5023" CreationDate="2018-09-13T08:25:51.873" Score="0" Body="&lt;p&gt;Gypsy Spellweavers answer pretty much nails it, and looking at an index as an offset to a memory address (as JosephDoggie and others suggest) gives a precise technical reason. However, there is something I'd like to add:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a great tragedy that we don't &quot;count&quot; from zero in our everyday life. That is because early humans didn't have a concept of &lt;em&gt;zero&lt;/em&gt;. That concept was unfortunately introduced much too late. We naturally use a decimal system because of our ten fingers (we also use a base 5 system for stroked lists, with the diagonal stroke representing a thumb). We should actually use a base 11 system, because we can display not ten, but eleven states with our hands: 0 fingers up to 10 fingers up.&#xA;So if only the concept of zero had evolved earlier in the history of mankind, &quot;counting&quot; from zero would feel perfectly natural to us (and Matlab wouldn't start indexing at 1).&lt;/p&gt;&#xA;" OwnerUserId="5940" LastActivityDate="2018-09-13T08:25:51.873" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5060" PostTypeId="1" CreationDate="2018-09-13T14:45:43.713" Score="4" ViewCount="179" Body="&lt;p&gt;I did a PhD in software engineering, now working in financial IT. I had a proper education in algorithms, data structures, operating systems, networks, software etc. and worked as a tutor for Java, OOP, UML during my PhD.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now a senior board member asks me for a good introduction into all that &quot;computer and architecture stuff&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried hard but don't find a suitable book that has it all on a decent level.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Topics I'd like to see are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a bit of computing history: from Babbage via Turing, OS/360 (&quot;mythical man month&quot;), PCs to embedded systems like Smartphones, TVs and Raspberry Pis&lt;/li&gt;&#xA;&lt;li&gt;what is a operating system, what is a file system, what is a database, what is an &quot;application server&quot; (abstract, e.g. including systems like CICS).&lt;/li&gt;&#xA;&lt;li&gt;what is computation (imperative vs functional)&lt;/li&gt;&#xA;&lt;li&gt;what is data (relational databases, data structures like trees, lists)&lt;/li&gt;&#xA;&lt;li&gt;why is the notion of &quot;state&quot; important (finite state machines)&lt;/li&gt;&#xA;&lt;li&gt;communication and networks: protocols, distributed systems&lt;/li&gt;&#xA;&lt;li&gt;architecture: layers (ISO/OSI), separation of concerns, pipes and filters&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of this in a proper introductory textbook, but one that is not intended for students but people with a degree in another science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually I am thinking of something history oriented, that also explains the &quot;big&quot; ideas (that are still present in current enterprise setting).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps someone here can recommend the one and only book, that has it all in a compressed form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively a small list that addresses specific topics for non-experts are also interesting.&lt;/p&gt;&#xA;" OwnerUserId="5943" LastEditorUserId="793" LastEditDate="2019-02-07T22:11:14.993" LastActivityDate="2019-02-07T22:11:14.993" Title="Book recommendation: basic, broad and solid overview for advanced learners" Tags="|introductory-lesson|textbook|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5061" PostTypeId="2" ParentId="5060" CreationDate="2018-09-13T14:57:31.633" Score="1" Body="&lt;p&gt;It is a bit hard to capture all of that. Unfortunately*, the best book is probably &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0262510871&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;The Structure and Interpretation of Computer Programs&lt;/em&gt;&lt;/a&gt; but that assumes the person is willing to do some programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But one can learn a lot on &lt;a href=&quot;http://paulgraham.com/articles.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Paul Graham's Essay Page&lt;/a&gt;, just by choosing interesting titles to explore. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;*Unfortunately = work involved, not just browsing.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-09-13T14:57:31.633" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5062" PostTypeId="1" AcceptedAnswerId="5063" CreationDate="2018-09-14T03:48:47.083" Score="12" ViewCount="363" Body="&lt;p&gt;I am teaching beginner programmers with a variety of backgrounds.  Towards the end of the course, we encourage more independent and team based learning rather than lecture based learning.  This is purposeful and many students do understand the benefits.  Some of which are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;learning how to learn&lt;/li&gt;&#xA;&lt;li&gt;reading technical documentation &lt;/li&gt;&#xA;&lt;li&gt;finding and vetting resources&lt;/li&gt;&#xA;&lt;li&gt;discussing and sharing with others&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are only a few days towards the end of the course where the students truly research a topic themselves or teach one another, but even so, there are always 1 or 2 students who feel that they are wasting their time or that they are there to be taught and not learn stuff on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What are some ways that I can highlight to students that learning how to learn a new technology (by using its documentation, online resources and your peers) is skill worth practicing for software developers?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="4558" LastActivityDate="2018-09-26T23:11:26.767" Title="How to convince students that self learning is an important skill?" Tags="|self-learning|web-development|adult-education|documentation|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5063" PostTypeId="2" ParentId="5062" CreationDate="2018-09-14T12:00:45.037" Score="7" Body="&lt;p&gt;In a few days there is almost nothing you can do. Certainly you can't change their habits and attitudes about how to learn in just a few days. You can try, however, to change their behavior by making their current behavior unprofitable. If it is still possible, make the final work an important part of the evaluation. But that is only a band-aid on the problem, not a cure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is true that a number of students want to &quot;be learned&quot;. I tell students that &quot;I can't learn you.&quot; But my own behavior, not just talk, has to reinforce that. If I teach primarily through lectures and evaluate them based mostly on what they can retain from the lectures, then it is perfectly natural that they take a fairly (or completely) passive role in a course, leaving all of the &quot;learning&quot; up to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you teach the course again, you can start early and come to a real solution - of behavior, at least, and possibly attitude. Rather than give lectures, give projects, from the beginning. Answer questions often, if not always, not with the answer, but with the strategy for getting the answer. To be successful they will need to change behaviors learned in other courses that aren't very effective in the long run. With adult students the effect is probably even stronger, as they have a longer history of passive learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, from the beginning, stress projects, teamwork, finding your own answers, verifying your own programs, telling you things rather than asking you things, and so on and so forth. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search around for &quot;Active Learning&quot; and learn to teach in a compatible way. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-09-14T12:00:45.037" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5064" PostTypeId="2" ParentId="213" CreationDate="2018-09-14T19:23:38.037" Score="1" Body="&lt;p&gt;Subtraction paradox:  In North-American football, if a runner goes from the 3 yard line to the 4 yard-line, there is a (4-3) = 1 yard gain.  However, if your math teacher assigns problems 3-4 (integers), you have to do two problems.  So in what engineers call an &quot;analog&quot; system, the Result = Stop - Start; but for integers it can be more complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in North American football, the yard line starts at &quot;0&quot; which is called the &quot;Goal Line&quot; typically.&lt;/p&gt;&#xA;" OwnerUserId="5930" LastActivityDate="2018-09-14T19:23:38.037" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5066" PostTypeId="1" CreationDate="2018-09-17T17:35:39.827" Score="5" ViewCount="153" Body="&lt;p&gt;Short version: Where can I find highly varying, small or medium-sized exercises and examples on the use, identification and instance declaration of Haskell's abstractions such as applicatives, monads, monoids, foldables, transversables and monad transformers?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have identified a serious lack of small to medium-sized exercises on Haskell's &quot;higher abstractions,&quot; such as applicatives, monads, monoids, foldables, transversables and monad transformers. When studying, say, the use of higher-order functions such as &lt;code&gt;foldr&lt;/code&gt;, many materials contain a good set of exercises, starting from simple ones and proceeding to varying levels of challenge. When it comes to the &quot;higher abstractions,&quot; the situation is, in my humble opinion, extremely poor, even after combing through many sources and trying to extract everything that is available.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To help the student understand and appreciate these abstractions I would expect to see highly varying, small to medium-sized exercises. These exercises should make the student, among other things,&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use these abstractions&lt;/li&gt;&#xA;&lt;li&gt;write instances of these abstractions&lt;/li&gt;&#xA;&lt;li&gt;identify cases where these abstractions could be defined and used&lt;/li&gt;&#xA;&lt;li&gt;identify cases where these abstractions can &lt;em&gt;not&lt;/em&gt; be defined and used&lt;/li&gt;&#xA;&lt;li&gt;compare the use of these abstractions to not using them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As background information, my two favourite materials are &lt;em&gt;Hutton's Programming in Haskell (2nd ed.)&lt;/em&gt; for a solid basis and Allen's and Moronuki's &lt;em&gt;Haskell Programming from First Principles&lt;/em&gt; for some of their material on more advanced topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While Hutton's &lt;em&gt;Programming in Haskell&lt;/em&gt; is a superb text for the basics, a good example of what is missing is its chapter &quot;Foldables and friends&quot; on monoids, foldables and transversables. The exercise set does not contain a single exercise that would make the student practice the use of these abstractions. It does not contain a single exercise of identifying the existence of these abstractions in some domain.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These abstractions are, in my opinion, an order of magnitude more difficult to assimilate than, say, higher-order functions. There is also at least an order of magnitude difference in the number of exercises available, but it is in the wrong direction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Granted, &lt;em&gt;Haskell Programming from First Principles&lt;/em&gt; does make you write a lot of instances of these abstractions in classic cases. Unfortunately it missed the other parts, and made me feel a bit like having proved a bunch of lemmas with very little idea of where those lemmas might be useful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this is relevant for the Haskell community in general. If we can find pointers to good exercises, or examples that can be turned into exercises, I can create a public github repo and start collecting the material into one place.&lt;/p&gt;&#xA;" OwnerUserId="5956" LastEditorUserId="104" LastEditDate="2018-09-18T00:10:12.153" LastActivityDate="2018-09-18T00:10:12.153" Title="Small to medium scale exercises about Haskell's higher abstractions" Tags="|lesson-ideas|resource-request|functional-programming|exercises|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5067" PostTypeId="2" ParentId="5062" CreationDate="2018-09-17T17:40:43.310" Score="2" Body="&lt;p&gt;A small addition. You will have some students that are more independent than others. When they independently learn something generally useful, clearly highlight it in front the the entire class. Try to convey the information that they learned something they would not have learned otherwise.&lt;/p&gt;&#xA;" OwnerUserId="5956" LastEditorUserId="5956" LastEditDate="2018-09-19T09:18:06.983" LastActivityDate="2018-09-19T09:18:06.983" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5068" PostTypeId="2" ParentId="5062" CreationDate="2018-09-18T20:16:29.473" Score="5" Body="&lt;p&gt;I am posting this answer as a complement to @Buffy's answer, which suggests a deep restructuring of the course and you may not be willing, able or allowed to to do it. This answer is useful if you want to start small but still give incentives for self-learning. I tried to present examples that do not take more than one class.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Write exercises that require research. Instead of always presenting a full working example for every topic, present the basic usage and link the documentation. Make the last exercise of the session require taking a look at the docs. Tell them they are allowed to ask questions only after reading the docs and actually enforce the rule. If they complain, ask them how they would solve the issue if you were not present. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you don't have hands-on classes, add some maybe once a month. Most students are not equipped with the correct strategies to do self-learning. By asking them questions and directing them through the process they get a strategy they can try and repeat in other contexts. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ask them to present a feature or functionality of a framework/software used in the course. If someone has a doubt about the topic, direct them to the students that presented it. Only intervene if neither can solve the issue. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;On the last part of the course students are often fatigued and not in their best form. Let students know that this is an important skill at the beginning of the course and give them more opportunities to gain independence by spreading activities during the semester and not only in the last few days. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course there's much more you can do and in case these examples do not suit your needs I hope they can get you inspired to create your own. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2018-09-18T20:16:29.473" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5069" PostTypeId="1" CreationDate="2018-09-19T17:52:05.317" Score="2" ViewCount="114" Body="&lt;p&gt;I'm teaching a theory-focused randomized algorithms course at the undergraduate level, and have included a section on streaming algorithms. It would be great to get students to implement these algorithms, but I do not know how to simulate a data stream for them. I am aware that some companies have APIs with varying degrees of openness (e.g. Twitter), and I'm aware of big things like &lt;a href=&quot;https://www.ibm.com/developerworks/library/bd-streamsintro/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;IBM InfoSphere Streams&lt;/a&gt;, but this seems too hard, since the course is mostly focused on theory. Ideally, I'd like something that continuously produces a stream of numbers or words, and have students write Python code to access the stream, then compute on the sample they take. Are there any freely available tools of this sort? Even, like, a free toy version of IBM InfoSphere Streams?&lt;/p&gt;&#xA;" OwnerUserId="294" LastEditorUserId="5963" LastEditDate="2018-09-22T17:03:41.260" LastActivityDate="2019-04-05T14:15:41.503" Title="How to give students practice with streaming computation?" Tags="|lesson-ideas|resource-request|python|" AnswerCount="1" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5071" PostTypeId="1" AcceptedAnswerId="5072" CreationDate="2018-09-21T15:54:07.957" Score="8" ViewCount="365" Body="&lt;p&gt;Given the prevalence of Python as a first language at many universities I think using Python as a language to teach new software developers is a good approach.  But there's one thing that concerns me.  Eventually these developers will be moving to a statically typed language and I want them to be aware of static typing and what it implies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you think using Python for teaching will be a large hindrance to later instruction or am I just worrying for no good reason?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would anyone care to recommend other teaching languages I might evaluate as well besides Python?&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2018-10-30T12:03:18.047" Title="Will I Regret Using Python As A Teaching Language When I Later Need to Teach Static Typing?" Tags="|python|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5072" PostTypeId="2" ParentId="5071" CreationDate="2018-09-21T16:02:33.163" Score="10" Body="&lt;p&gt;If you teach Python's typing system correctly, you should have no problem later. The rule in Python is that names don't have a type associated with them, but all values do. It isn't that &quot;things&quot; change type. They don't. Objects and other values have a well determined type when they are created and that type never changes. Names never have a type to be changed. But any name can be associated with any value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you move to a language that requires explicitly applying a type to names (Java, say), then you just need to teach them that names are given types also, as a sort of redundancy so that errors can be caught earlier (compiler v run-time). A name associated with a type can only refer to a value that has that type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Applying types to names (as well as values) isn't really that big a deal, and the students will be more sophisticated when you get to it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, they may not &lt;em&gt;like&lt;/em&gt; having to explicitly apply types to names. But that is a different issue. The reason given above will be enough for many of them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finding errors early is a big win in programming. If you take that attitude when teaching Python you will stress things like early testing (preferably test-first programming) so that errors show up soonest. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For the distinction between a &quot;thing&quot; and a &quot;name applied to a thing&quot; it is often instructive and always fun to return to &lt;a href=&quot;https://en.wikipedia.org/wiki/Haddocks&amp;#39;_Eyes&quot; rel=&quot;noreferrer&quot;&gt;Haddock's Eyes&lt;/a&gt;. Lewis Carroll was more interested in mathematics, of course, but the ideas apply equally well to CS. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Don't confuse &quot;typing&quot; as &lt;em&gt;hitting keys on a keyboard&lt;/em&gt; with &quot;typing&quot; as &lt;em&gt;applying a type to a name or value&lt;/em&gt;. It may be that the first version of this was confusing in that regard. Here &quot;typing&quot; means only the latter. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-09-22T14:31:08.473" LastActivityDate="2018-09-22T14:31:08.473" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5074" PostTypeId="2" ParentId="5062" CreationDate="2018-09-22T15:57:52.437" Score="1" Body="&lt;p&gt;I integrate these tools right from the beginning in my introductory web development course.  My students learn about these things:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The HTML5 Validator&lt;/li&gt;&#xA;&lt;li&gt;CSS validator&lt;/li&gt;&#xA;&lt;li&gt;Browser development tools&lt;/li&gt;&#xA;&lt;li&gt;Documentation in W3Schools and in the Mozilla Dev Network Site&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I ask them to use the references to build elements using unfamiliar tags.  I have &quot;treasure hunt&quot; exercises that ask them to figure out how to do things by using The Google and the docs.  I am a few weeks in and am getting ready to teach JavaScript, and my students have become quite adept at creating elements on a static page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You want to make your class mimic the experience a real developer has by using real tools and by reading the docs to make cool stuff happen.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-09-22T15:57:52.437" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5076" PostTypeId="2" ParentId="5023" CreationDate="2018-09-23T03:32:24.517" Score="0" Body="&lt;p&gt;Modern computer implementations (physical, CMOS, as well as most virtual machines) almost completely use only binary logic (although some flash memories may use more than 2 states per physical bit cell).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;By convention, if you have 1 bit of binary information, or a single logic signal, there are two possible states, and we call one state “0” and the other state “1”.  If that 1 bit addresses 2 bits of memory, then the two addresses are 0 and 1 to match the binary state nomenclature of the address bit.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Early TTL Logic data books labeled the signal state nearest 0 Volts as logic “0” in the truth tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compositions of a small number of logic bits (more than one) are usually numerically interpreted as sums of powers of two times those binary bits, and the minimum unsigned sum is zero.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many early programming languages (assembly) grew out of shortcuts for data and program entry via binary switches.  The conventions followed.  Lots of binary zeros sum to numeric zero.  And you count up starting from there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a CS educator, you should not be teaching computation as magic, but as the result of the implementation of comprehendable binary logic.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2018-09-23T04:05:16.820" LastActivityDate="2018-09-23T04:05:16.820" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5077" PostTypeId="2" ParentId="4401" CreationDate="2018-09-24T09:51:17.293" Score="1" Body="&lt;p&gt;If you teach carpentry, your students will usually also learn to swing a hammer (even if it's not explicitly part of the curriculum). However, one of your students has a metal hand with which they can easily hamer a nail in a board; and as a result they do not use the hammer and instead use their metal fist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should you fail this student for not learning to use a hammer, if &quot;using a hammer&quot; is not explicitly part of your curriculum? I say &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A textbook is a tool, just like a hammer. If your curriculum explicitly includes &quot;how to read a textbook&quot;, then reading a textbook can be graded. If it isn't (which I &lt;em&gt;really&lt;/em&gt; hope it isn't), then you shouldn't force students to read the textbook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They should be graded based on their &lt;strong&gt;results&lt;/strong&gt;, not what they did to used/achieved these results.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my opinion, this counts double for programming, as &lt;em&gt;coming up with your own solution&lt;/em&gt;, while not always the best appraoch, is an invaluable skill to have. Many programmers I know are people who inherently figure things out on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Provide&lt;/strong&gt; the books, &lt;strong&gt;suggest&lt;/strong&gt; that they be read, &lt;strong&gt;stress&lt;/strong&gt; reading the books when a student isn't getting it, but don't &lt;strong&gt;require&lt;/strong&gt; them to be used when a student already understands the subject matter.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Caveat&lt;/strong&gt;:&lt;br&gt;&#xA;Some teachers tend to give points for effort when the outcome is not good. For example, a math teacher may see that your answer is wrong, but your general approach was correct and you made a minor error somewhere.&#xA;When a student scores a low grade, you could similarly award them some points for having done their due diligence, e.g. shown that they knew which pattern to use, or that they clearly have studied up using your textbook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when the answer is already correct, and the method (read a book/use a particular approach/...) was not explicitly part of the question, then you cannot fail the student simply because they provided a solution that is different from the one you expected.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2018-09-24T09:51:17.293" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5078" PostTypeId="2" ParentId="4401" CreationDate="2018-09-25T00:21:39.103" Score="2" Body="&lt;p&gt;I work as IT teacher since four years ago, in all this time I haven't used any kind of book for it(maybe for the same nature of the subject)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are my reasons for not using it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Cost is not accesible for the mayority of my students&lt;/li&gt;&#xA;&lt;li&gt;all the topics are availables on platforms like coursera or even better platforms like khan academy&lt;/li&gt;&#xA;&lt;li&gt;books are seen only an extra cost for the parents&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;What happens when I need my students study some specific topic?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I recommend specific Youtube channels&lt;/li&gt;&#xA;&lt;li&gt;I create own material for them on PDF format&lt;/li&gt;&#xA;&lt;li&gt;My final results (theoric and practice) are better than my other colleages&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Books are good if you have a structured plan to complement your course&#xA;  with them, for instance you give an introduction about specific areas&#xA;  and the book gives more theory and exercises to reaffirm&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerDisplayName="user5980" LastActivityDate="2018-09-25T00:21:39.103" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5080" PostTypeId="1" CreationDate="2018-09-25T19:23:23.767" Score="11" ViewCount="1167" Body="&lt;p&gt;The primarily undergraduate institution at which I teach does not have an Artificial Intelligence course. We do have classes on Data Analysis and Machine Learning:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;DATA 150: Introduction to Data Analysis (4 Credits)&lt;/p&gt;&#xA;&lt;p&gt;Data analysis is the extraction of knowledge and insights from complex&#xA;data. This course introduces the concepts, issues, and techniques of&#xA;data analysis. Topics include data cleaning and preparation, feature&#xA;selection, association rules, classification, clustering, evaluation&#xA;and validation. Tools implemented in R and Python will be used to&#xA;explore data sets using these techniques.&lt;/p&gt;&#xA;&lt;p&gt;CS 141: Machine Learning (4 Credits)&lt;/p&gt;&#xA;&lt;p&gt;This course provides a broad introduction to machine learning and&#xA;statistical pattern recognition including both supervised and&#xA;unsupervised learning from a computational perspective. Topics include&#xA;generative/discriminative learning, parametric/non-parametric&#xA;learning, neural networks, support vector machines, clustering,&#xA;dimensionality reduction, and kernel methods. Additional topics as&#xA;time allows.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It's been a long time since I was in school, and even then my knowledge of AI was pretty eclectic. &lt;strong&gt;What belongs in an undergraduate AI course that is not covered by the above two courses?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;A constraint is that we do not require Calculus in our program, and most students have only had discrete mathematics. (While the above classes nominally have Linear Algebra and/or Calculus-based Probability and Statistics as prerequisites, we sometimes waive those requirements.)&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-03-21T17:57:46.617" Title="What belongs in a low-math undergraduate AI elective besides ML?" Tags="|curriculum-design|undergraduate|artificial-intelligence|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5081" PostTypeId="1" CreationDate="2018-09-25T19:48:20.993" Score="4" ViewCount="95" Body="&lt;p&gt;The title of the question actually says almost everything there is to say.  I cannot think of any programming labs whatsoever that would naturally flow from set theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My students will be coding in Scheme (Racket), and will be pretty new at it when we approach this topic.  Are there any ways to translate the concepts of set theory into a reasonable lab?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are covering:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basic definitions&lt;/li&gt;&#xA;&lt;li&gt;Venn Diagrams&lt;/li&gt;&#xA;&lt;li&gt;Union&lt;/li&gt;&#xA;&lt;li&gt;Cardinality&lt;/li&gt;&#xA;&lt;li&gt;Cartesian Products&lt;/li&gt;&#xA;&lt;li&gt;Power Sets&lt;/li&gt;&#xA;&lt;li&gt;Bijection (as proof of cardinality)&lt;/li&gt;&#xA;&lt;li&gt;Infinite sets &lt;span class=&quot;math-container&quot;&gt;$\aleph_0$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$\aleph_1$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;Drawing a diagonal line to prove &lt;span class=&quot;math-container&quot;&gt;$|\mathbb{R}| \neq |\mathbb{N}|$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;Russell's Paradox&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-09-26T17:13:27.677" Title="Lab ideas for set theory" Tags="|lesson-ideas|labs|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5082" PostTypeId="2" ParentId="5081" CreationDate="2018-09-25T20:26:37.493" Score="1" Body="&lt;p&gt;I propose for instance for &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;basic definitions&lt;/li&gt;&#xA;&lt;li&gt;venn diagrams&lt;/li&gt;&#xA;&lt;li&gt;Union&lt;/li&gt;&#xA;&lt;li&gt;Cardinality&lt;/li&gt;&#xA;&lt;li&gt;Cartesian products&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Using SQL language, why?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you create a schema database you need to think in entities, relations, boolean algebra.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean you can study this concepts oriented to programming field, making schemas and identifying relationships between tables.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example when you use JOINS operators and UNION and UNION ALL concepts you need to abstract the concepts about diagram venn(when you use left join, right join, etc)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So if your students and you need make a knowledge route about these concepts; SQL is a good option for it&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope to be useful.....&lt;/p&gt;&#xA;" OwnerDisplayName="user5980" LastEditorDisplayName="user5980" LastEditDate="2018-09-26T02:14:07.220" LastActivityDate="2018-09-26T02:14:07.220" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5083" PostTypeId="2" ParentId="5080" CreationDate="2018-09-25T20:54:04.203" Score="13" Body="&lt;p&gt;I took both the &lt;a href=&quot;https://www.cs.princeton.edu/courses/archive/fall14/cos402/&quot; rel=&quot;nofollow noreferrer&quot;&gt;AI&lt;/a&gt; and (basic) ML undergrad courses at Princeton and currently teach an AI elective at the HS level for some very bright students. I've seen some good online material from &lt;a href=&quot;http://inst.eecs.berkeley.edu/~cs188/fa18/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Berkeley (CS188)&lt;/a&gt; and &lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-034-artificial-intelligence-fall-2010/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MIT (6.034)&lt;/a&gt;, and of course Stanford's ML lecture series is amazing. &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0136042597&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Russell &amp;amp; Norvig's textbook&lt;/a&gt; is basically the bible for these sorts of courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From what I've seen, AI undergraduate courses have changed a lot in the past decade to focus on ML, since much of the recent breakthroughs and publicity are in those areas. AI is a very broad and historically rich field beyond just Data Analysis or ML. I would say a comprehensive AI course would start from Alan Turing's classic (and often misused) Turing Test and ground itself in an ongoing definition of rationality as effective problem-solving. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, there are lot of &quot;classical&quot; AI fields that are very approachable without any calculus; most of their discrete algorithms are intuitive, and you can wave your hands and say the continuous (calculus-involving) counterparts are basically the same idea. Here's my shortlist of essential first topics:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Goal-based state-space searching algorithms (e.g. DFS, BFS, Greedy, A*). These are a great start since the notion of searching is very universal and lays the groundwork for the next two:&lt;/li&gt;&#xA;&lt;li&gt;Adversarial Game-playing AI (minimax and alpha-beta pruning)&lt;/li&gt;&#xA;&lt;li&gt;Constraint-Satisfaction Problems (ARC-3, backtracking search) and/or Boolean SAT (DPLL, WalkSAT). &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These three areas form my HS curriculum, and provide really rich applications and philosophical fodder (&quot;is this how rational humans think? Is it intrinsically better, or worse, or completely unrelated?&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some courses might go from these topics into Bayes Nets and/or Hidden Markov Models, though I think this leans math heavy since its all about probability. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually by this point AI courses have become more or less completely focused on ML, often starting with k-means clustering, basic classification/regression using perceptrons or decision trees, ensemble learning/boosting, reinforcement learning (usually in the framework of Markov Decision Processes), and &lt;em&gt;maybe&lt;/em&gt; deeper neural networks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: A follow-up; my course has now changed its third unit topic from CSPs/SAT to Markov Decision Processes (Value Iteration and Policy Iteration) and Reinforcement Learning. Its more exciting, leads into ML, and flows out the Adversarial Games nicely because of the shared concept of finding a &quot;policy&quot;, especially if Expectimax is covered.&lt;/p&gt;&#xA;" OwnerUserId="5614" LastEditorUserId="5614" LastEditDate="2019-03-21T17:57:46.617" LastActivityDate="2019-03-21T17:57:46.617" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5084" PostTypeId="2" ParentId="4998" CreationDate="2018-09-25T22:00:47.183" Score="1" Body="&lt;p&gt;For background, I'm answering this question as an individual who got an engineering degree, spent 30 years programming in industry, and now teach and mentor at the local university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In many respects, I really don't see a big difference from the late 60's until now. Our program still contain the same types of components: computation and assignment; conditionals; repetition and abstraction. I began with Fortran IV and though it lacked both structures and dynamic memory, one was able to get around that by using &quot;parallel&quot; arrays for lists of structures and by allocating huge arrays and managing the contents with our own &quot;pointers&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One big change, however, was in turnaround time. With punch cards, it was often many minutes if not hours before one received &quot;feedback&quot;. The consequence of this was that one had to carefully review programs before submission. As soon as &quot;personal&quot; computers were introduced, the feedback became almost instantaneous. This altered my approach to programming as it became possible to code small pieces and test them before moving on to the next piece. I'm surprised that students do not take advantage of this. Rather, many tend to code way too much before testing anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other day I was discussing with a student how to do an assignment. It had three basic parts: read in some data; transform the data; write out some data. I suggested that the student first code the input and output, skipping the transformation entirely until the other two parts worked correctly. The student was baffled by this because the assignment required all THREE parts. &quot;Yes is does, but ONLY when you have completed it&quot;. I'm not sure I got through.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, many things got easier as I progressed to Pascal, then C with unix and all of its functionality provided by the shell and the ability to stitch things to together with pipes. Then came Java, C++ and networks. And on to concurrent programs and the many languages that came with the web. Faster hardware made slow programs really quick and allowed work on even bigger problems. I love the choice of languages and the ability to build solutions using several languages. All the standard libraries mean I don't need to reinvent the wheel, but merely integrate well proven code into my program. IDE's and many other tools have made me more productive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prior to the web I was limited to the reference texts I had available and the knowledge of those that I worked with. Today I can get thousands of answers to a question, but must sort through and evaluate them for accuracy and appropriateness. A textbook, such as K&amp;amp;R, that was once a necessity on my bookshelf has been replaced by the ability to search the web. I still find discussing things with colleagues to be the most beneficial approach to problem solving. That has stayed constant over the years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm probably like a lobster in a slowly warming pot and don't realize how much things have changed. Yet I look back and don't find the process I use terribly different from years ago. I spend a lot of time thinking about what I'm trying to do, selecting the appropriate technologies and putting it together, piece by piece, with continuous testing. I can't say that my experience is typical as I have been out of industry for more than 10 years. However, my approach and experience has been valued in teaching.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-09-25T22:00:47.183" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5085" PostTypeId="2" ParentId="4998" CreationDate="2018-09-26T00:41:48.453" Score="2" Body="&lt;p&gt;Computer Science and Computer Education has not fundamentally changed from decades ago, but have evolved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, if you were getting an IT education in the year 2000, you would need the following:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A floppy disk&lt;/li&gt;&#xA;&lt;li&gt;A computer (very expensive and few people had it)&lt;/li&gt;&#xA;&lt;li&gt;You probably used Encarta (internet was a very expensive and not very well known option)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So at a college level for example if you needed to learn abour programming languages, the better option in fact was your library university or books.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens with kids and boys and girls today?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have the following in their own homes or easily available:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;internet even on mobile phones&lt;/li&gt;&#xA;&lt;li&gt;online sites like: Youtube, Wikipedia, etcetera.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Books for example are available in two ways: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Online(PDF)&lt;/li&gt;&#xA;&lt;li&gt;Physical form &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;An even a better example right now is that it is common to use an online storage service instead of physical storage, so even USBs are an old fashioned tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the educational field for example, my IT or programming teachers learned about C++, Pascal or Basic as trending technologies. Right now some of them feel out of date with today's technologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TECHNOLOGY TOPICS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It doesn't matter if you're talking about about using a smartphone, programming an app, or making a website; since the 90's, it has evolved. Today there is a massive marketing so that everyone can see about benefits studying for an IT degree: jobs, popularity, income, etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today is very common to see young people at tech events, learning through IT platforms, or making Youtube videos teaching about IT. Today IT is popular!&lt;/p&gt;&#xA;" OwnerDisplayName="user5980" LastEditorDisplayName="user5980" LastEditDate="2018-09-26T23:34:53.250" LastActivityDate="2018-09-26T23:34:53.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5086" PostTypeId="1" CreationDate="2018-09-26T03:53:03.273" Score="8" ViewCount="218" Body="&lt;p&gt;The world is full of computing technologies that have been put to productive use but may be unpopular or unfashionable with students today due to their complexity, their lack of support, limited takeup within industry, or simply because they are perceived to be &quot;old&quot; or &quot;out of date&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In many cases, it isn't an option to simply stop supplying educational materials that cover these topics due to the critical nature of the technology. In the case of COBOL, for example, it is often claimed that there are over 250 billion lines of the stuff out there and that the world needs engineers to maintain it. Such arguments seem to encourage engineers to be to adopt the technology for altruistic reasons - but does that approach really work?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, what methods do educators use to engage students when teaching unpopular, yet important, computer science technologies?&lt;/p&gt;&#xA;" OwnerUserId="5613" LastEditorUserId="5613" LastEditDate="2018-09-26T04:03:04.573" LastActivityDate="2018-10-29T14:57:41.470" Title="Methods for engaging students when teaching unpopular or unfashionable topics" Tags="|student-motivation|social-context|student-perceptions|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5088" PostTypeId="2" ParentId="5086" CreationDate="2018-09-26T13:38:51.427" Score="3" Body="&lt;p&gt;&lt;strong&gt;There two important facts here:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Complexity is in every programming language&lt;/li&gt;&#xA;  &lt;li&gt;Popularity is due to a marketing monster talking on every opportunity (for example on the Youtube adds about what is trending&#xA;  and what not)&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For the first point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We need to translate programming teaching about new fields; for example in many cases teachers spend a lot of time talking about theory, origins and giving more importance to math exercises&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the second one We need to know more about other technologies, for example if an student asks to me, hey teacher why I do need to learn Java, existing Python or Ruby?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things yo shouldn't do it&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;dear student Java is ugly but neccesary to get a job&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Things you probably should do it&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Java is a complex language&lt;/li&gt;&#xA;  &lt;li&gt;Java around the world is the key to get a job in a easy way&lt;/li&gt;&#xA;  &lt;li&gt;(Showing proves) Java has the most high salaries&lt;/li&gt;&#xA;  &lt;li&gt;I f you get fluent in Java is very secure you can move yourself to many other languages&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Many times the key factor is &lt;strong&gt;&quot;What I can do if I learn this technology&quot;?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the answer for this question is not easy for many IT Teachers, for example I know a lot of them whose only make simple math exercises about calculate pows, substracts and stuff like those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As technology moves, Teacher needs to do in the same way; for example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;PROPOSALS&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;We're going to learn Java, for building an app&lt;/li&gt;&#xA;  &lt;li&gt;We.'re going to learn Java for building a chatbot using the Facebook API&lt;/li&gt;&#xA;  &lt;li&gt;Maybe we're going to learn Java for building a Instagram clone&lt;/li&gt;&#xA;  &lt;li&gt;We're going to use Java but combined with Angular for example for building an API&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I mean programming languages are cool but is better what can we do if we understand them&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end We as IT Teachers need to move, re learn and interpretate how this world is changing in every oportunnity&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;example&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fr this course I need to build an app with my students:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;the good&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;apps are very popular&lt;/li&gt;&#xA;&lt;li&gt;they are expecting discover something amazing&lt;/li&gt;&#xA;&lt;li&gt;I choose to use Angular 6 &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;the bad&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They have not computer in many cases&lt;/li&gt;&#xA;&lt;li&gt;They don't know how to use simple tasks: email, word .....&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I choose Angular for building an PWA, is a good alternative, I will show them differences and similarities&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Advantages&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They will discover with me how to program&lt;/li&gt;&#xA;&lt;li&gt;in spite of not use Java, We're going to understand how to build a product&lt;/li&gt;&#xA;&lt;li&gt;Students will be free to choose the content of this PWA&lt;/li&gt;&#xA;&lt;li&gt;PWA is part of some requisites for web development jobs&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;So I will be give them another option, itself they can change after if they have the ooportunity to learn Java or any other thing&lt;/p&gt;&#xA;" OwnerDisplayName="user5980" LastEditorDisplayName="user5980" LastEditDate="2018-09-26T16:21:54.893" LastActivityDate="2018-09-26T16:21:54.893" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5089" PostTypeId="2" ParentId="5062" CreationDate="2018-09-26T14:45:10.740" Score="0" Body="&lt;p&gt;&lt;strong&gt;A very important fact to achieve self studying in students is:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Show a clear and close example, I mean I f you show at your students,&#xA;  how you're taking a course, learning new technologies.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But is not all and not enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that in every school Teachers need:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Create a common guide to show how to generate this skill &lt;strong&gt;(is not correct only say to students hey guys please learn something new by&#xA;  yourself)&lt;/strong&gt;&lt;/li&gt;&#xA;  &lt;li&gt;You need to know and after show them: methods, technics, sources to achieve this&lt;/li&gt;&#xA;  &lt;li&gt;You need to know about learnig styles and based on that then you can recommend your students how to start to learn by themselves&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Another important fact&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How you as Teacher answer the question: Why do I need to learn more by myself?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;So in this point you need to know how to show the befenits at your students&lt;/li&gt;&#xA;  &lt;li&gt;Maybe is good idea giving them a challenge&lt;/li&gt;&#xA;  &lt;li&gt;build with them a knowledge path &lt;/li&gt;&#xA;  &lt;li&gt;help them to find better tutorials, books, guuides, podcasts&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In spite of your students need to learn by themselves, you need walk with them in this task because &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;you know about how to find useful information&#xA;  &#xA;  &lt;ol start=&quot;2&quot;&gt;&#xA;  &lt;li&gt;you must to know study habits&lt;/li&gt;&#xA;  &lt;li&gt;you must to know how a student must to filter information&lt;/li&gt;&#xA;  &lt;/ol&gt;&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Obviously this is not an easy task, you need parent's support, teacher's support and mainly &lt;em&gt;teaching knowledge&lt;/em&gt;, so for all of this, school needs to know how teachers give a class, how parents bring support to their children, &lt;/p&gt;&#xA;" OwnerDisplayName="user5980" LastEditorDisplayName="user5980" LastEditDate="2018-09-26T23:11:26.767" LastActivityDate="2018-09-26T23:11:26.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5090" PostTypeId="2" ParentId="5081" CreationDate="2018-09-26T17:13:27.677" Score="3" Body="&lt;p&gt;This answer will be general, rather than specific to your proposed curriculum. Since you note in a comment that it is set theory that you want to stress over Racket programming, I'll suggest the following. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, it is difficult to advance students on two orthogonal axes simultaneously without confusing at least some of them. Therefore you want to put the stress on set theory and its beauty and limitations over the programming aspect. If you were using a language that they already knew well, I'd make a slightly different suggestion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But first, give them a good, traditional, view of set theory and how it relates in general to modes of thought. Any good book, even if it doesn't mention programming at all, could  be used, even Naive Set Theory by Halmos. Use programming primarily to illustrate things in a simple way so that the functional programming doesn't take up too much of their thought space - just enough to get the flavor of, for example deep recursive programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The programming exercises can be quite simple, but I would choose them in such a way that they also serve as an introduction to complexity theory and the problem of growth. Something simple with Cartesian product and many dimensions can illustrate the growth. It is also possible to write functional programs for things that seem simple but have terrible run-time. For example, a naive version of reversing a list can easily be quadratic if care isn't taken. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know what libraries Racket offers for support of sets, but it might be useful to talk about the development of such a library - building a tool box of simple set operations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, in the main, use the programming as a way to reinforce the theory, not so much as an end in itself. Set theory is rich enough and with enough applications to math and CS that you don't really need to do much more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to teach FP in Racket, then a different set of exercises that help the functional thought process develop would probably be better than trying to force it into one realm. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-09-26T17:13:27.677" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5091" PostTypeId="1" CreationDate="2018-09-28T03:23:00.843" Score="7" ViewCount="519" Body="&lt;p&gt;When teaching functions in Python I get a little annoyed that the code below actually prints out the greeting. I know the preferred way would be to pass in the name, but, for students, if it works then why do something more complex. I want to teach them how to pass in arguments but if they mess up and forget it will still work. Thoughts about how to approach situations like this without being convoluted or contrived?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def greeting():&#xA;    print(&quot;Hello &quot; + name)&#xA;&#xA;&#xA;name = input(&quot;Enter your name: &quot;)&#xA;greeting()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5994" LastEditorUserId="104" LastEditDate="2018-09-28T03:30:21.433" LastActivityDate="2018-10-29T14:49:14.060" Title="Python function has access to global variables, and doesn't need passed arguments" Tags="|lesson-ideas|python|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5092" PostTypeId="2" ParentId="5091" CreationDate="2018-09-28T05:31:49.157" Score="3" Body="&lt;p&gt;I teach Python after teaching students C, so my context might be slightly different. That said, my students get used to program execution beginning at &lt;code&gt;main()&lt;/code&gt; from day one. You could take this as an opportunity to introduce the same approach in Python with the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def greeting(name):&#xA;    print(&quot;Hello, &quot; + name)&#xA;&#xA;def main():&#xA;    greeting(&quot;tazboy&quot;)&#xA;&#xA;if __name__ == &quot;__main__&quot;:&#xA;    main()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If a student doesn't have a main function defined, they will see &lt;code&gt;NameError: name 'main' is not defined&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will admit that the boilerplate at the bottom is about as opaque as you can get. Even so, boilerplate code is something they will encounter in many other programming languages. I correlate it for my students to the MLA heading they write at the top of any essay. It's something that just has to be there, and it has a clear and important purpose.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-09-28T05:31:49.157" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5093" PostTypeId="2" ParentId="5091" CreationDate="2018-09-28T14:51:28.857" Score="0" Body="&lt;p&gt;I would think that any use of the same function with another parameter, stored in another variable, would solve the problem. For example, if they are pair programming:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def greeter(name):&#xA;  print(&quot;Hello, &quot; + name)&#xA;&#xA;def pair_greeter(name_one, name_two):&#xA;  print(name_one + &quot; and &quot; + name_two + &quot; are a great team!&quot;)&#xA;&#xA;typist_name = input(&quot;Who's the typist?&quot;)&#xA;greeter(typist_name)&#xA;observer_name = input(&quot;Who's the observer?&quot;)&#xA;greeter(observer_name)&#xA;pair_greeter(typist_name, observer_name)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="1879" LastActivityDate="2018-09-28T14:51:28.857" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5094" PostTypeId="2" ParentId="1408" CreationDate="2018-09-29T06:27:32.147" Score="6" Body="&lt;p&gt;I am 12 and I can tell you what I did to learn Python. How I learned about Python was when I saw a video about a guy getting a wpm of 162 on a type-race-game, so I for some reason decided that I wanted to make a type-race-game. I knew about coding at the time, because my dad taught me HTML, when I was 9, but I did not like it, so I moved on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was trying to learn how to code, I remembered the site codeacademy.com from when I was 9. I went to the website and there were many coding tutorials, for many different languages. I was looking through them and I saw Python. I remembered Python because my uncle (who works in IT) told me about it during the summer, so I decided to look at it. I looked at it for a while, but because of my ADHD, I couldn't sit there for long, so I kept hopping from site to site, mainly YouTube, to learn about Python. I used a site called repl.it as my IDE to code in Python. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After about 1 month, I figured out the basics like &lt;code&gt;print&lt;/code&gt; and &lt;code&gt;if&lt;/code&gt;. I could make a simple program, that when you say &quot;hi&quot; it says &quot;hi&quot; back. That is about it. 4 months of this went by of hopping from site to site learning about Python. It was finally Christmas that I got all the parts to build a computer, because my laptop was very slow and filled with viruses. It took almost 5 seconds just to load a site. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With my new computer it was faster to do stuff, and made learning way easier. Another 4 months went by and I was finally done. If you want to see it, here's the link &lt;a href=&quot;https://repl.it/@Luke0/Writing-Game-1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://repl.it/@Luke0/Writing-Game-1&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my answer to that question is dedication, or just keep coming back to it, like I did. That is why it took me almost a year to learn.&lt;/p&gt;&#xA;" OwnerDisplayName="user5999" LastEditorUserId="204" LastEditDate="2018-09-30T14:00:54.710" LastActivityDate="2018-09-30T14:00:54.710" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5095" PostTypeId="2" ParentId="1408" CreationDate="2018-09-29T12:47:28.883" Score="2" Body="&lt;p&gt;I've been in a similar situation. Like the other responders, I find that visual and game-related applications, often using high-level ideas like objects and methods/functions, will get and keep attention better than learning the &quot;traditional&quot; way from basic concepts like variables, operators, and control flow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students like Minecraft (and haven't sold their soul's completely to Fortnite yet),  you might look into some of the many activities online for modding Minecraft with Python. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's some examples:&#xA;&lt;a href=&quot;https://education.minecraft.net/lessons/teach-python-with-minecraft-pi/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://education.minecraft.net/lessons/teach-python-with-minecraft-pi/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://projects.raspberrypi.org/en/projects/getting-started-with-minecraft-pi/5&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://projects.raspberrypi.org/en/projects/getting-started-with-minecraft-pi/5&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://nostarch.com/programwithminecraft&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://nostarch.com/programwithminecraft&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2018-09-29T12:47:28.883" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5096" PostTypeId="2" ParentId="5091" CreationDate="2018-09-29T17:56:15.173" Score="4" Body="&lt;p&gt;Your example demonstrates &lt;em&gt;how&lt;/em&gt; to declare and use a function with a parameter, but not &lt;em&gt;why&lt;/em&gt; they should do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, there are no reason (for them) why they should bother with a new concept (function) instead of writing&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;name = input(&quot;Enter your name: &quot;)&#xA;print(&quot;Hello &quot; + name)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which can be done with the programming elements they already know. And is both shorter and simpler, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how to sell functions with parameters to beginners?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;they avoid code duplication (the example should contain several calls)&lt;/li&gt;&#xA;&lt;li&gt;they are called with different values (so parameters is the simplet way to transmit information)&lt;/li&gt;&#xA;&lt;li&gt;they implement a decomposition of tasks into subtasks (the sooner they practice the procedural approach, the better)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is an example:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def draw_line(width, end, middle):&#xA;    line = end + middle*(width-2) + end;&#xA;    print(line)&#xA;&#xA;def draw_rect(height, width):&#xA;   draw_line(width, &quot;+&quot;, &quot;-&quot;)&#xA;   for  line in range(height-2):&#xA;      draw_line(width, &quot;|&quot;, &quot; &quot;)&#xA;   draw_line(width, &quot;+&quot;, &quot;-&quot;)&#xA;&#xA;def draw_square(side):&#xA;    draw_rect(side, side)&#xA;&#xA;def main(args):&#xA;    draw_square(3)&#xA;    draw_square(5)&#xA;    draw_square(7)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Actually, I use Processing with a group of students. Most of them total beginners. The first motivation for functions is decomposition.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After they draw a simple figure with a few predefined function calls, as &lt;code&gt;fill()&lt;/code&gt; to select a fill color, &lt;code&gt;rect()&lt;/code&gt; and &lt;code&gt;ellipse()&lt;/code&gt;,  they are taught to split the work into user-defined functions&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void draw() {&#xA;    draw_sky();&#xA;    draw_beach();&#xA;    draw_sunset();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and parameters are then used for similar parts occurring at different places&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;void draw_seabird(int x, int y) {&#xA;   ....&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2018-09-30T09:03:39.190" LastActivityDate="2018-09-30T09:03:39.190" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5098" PostTypeId="2" ParentId="1408" CreationDate="2018-09-30T19:42:46.040" Score="0" Body="&lt;p&gt;Maybe do you want to try this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Organize plays around it, for example: to identify variables vs constants&lt;/li&gt;&#xA;&lt;li&gt;Organize puzzle to organize a complete function &lt;/li&gt;&#xA;&lt;li&gt;Divide your kids into small groups, and then give them a task, for example how to build a PC&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Remember little kids understand playing over writing code&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use platforms such as code.org software like scratch, why?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Kids need first at all understand, what is logic, whats is programming languages&lt;/li&gt;&#xA;&lt;li&gt;If kids see this as an advendure they will be more agree to participate and practice&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you prefer you can use interactive videos to explain how code works, I mean:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kids need to know&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How a computer proceses and work with variables and constants&lt;/li&gt;&#xA;&lt;li&gt;Maybe do you wanna demosntrate final products with that language to explain kids this &quot;programming language is like lego pieces but in inspite if take with your hands pieces you write them&quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerDisplayName="user5980" LastActivityDate="2018-09-30T19:42:46.040" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5099" PostTypeId="2" ParentId="4944" CreationDate="2018-09-30T21:43:13.030" Score="1" Body="&lt;p&gt;About remember everything&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're teaching people but you're a learner at the same time so; is not a real problem for example you don't remember every technical term about &lt;code&gt;Scracth&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Why is not important?&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Software development is not about memorizing is about understanding&lt;/li&gt;&#xA;&lt;li&gt;Its more helpful to write a technical guide with the most common terms&lt;/li&gt;&#xA;&lt;li&gt;If you forget something, for example what is an scenario you can go to your technicala guide and find whats is it&lt;/li&gt;&#xA;&lt;li&gt;If you make you technical guide after you will be feel very comfortable writing for example technical documentation&lt;/li&gt;&#xA;&lt;li&gt;For example if you students go from scratch to Java for example, and if you teached them about reading docs, then they will be very fluent cheking out the Java API&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;At the end is not bad not remember everything, why do you guess every programming language, RDBMS has it's own API to read in case, so take it easy  &lt;/p&gt;&#xA;" OwnerDisplayName="user5980" LastActivityDate="2018-09-30T21:43:13.030" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5102" PostTypeId="1" AcceptedAnswerId="5105" CreationDate="2018-10-02T23:53:12.533" Score="4" ViewCount="182" Body="&lt;p&gt;I have been reading up on how to shift more of my teaching resources on to the Learning Management System, to make it easier to access from other locations even though I mostly teach in a classroom. It is a way to learn more about online course presentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read that gamification using even such simple techniques as points, levels, badges and leaderboards... Wow, trying to think of an example... It is right in front of my face... Is a very effective way to get people to use the content and stay in the course. The sources I read say that it is most effective for people over age 45, including those over 65. That seems to surprise people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question, should you choose to accept it, is: how effective is this for techniques you have used? Apparently gamification brings out the competitive nature of the 60% of people with that tendency, while not sufficiently putting off the other 40%. Personally, I don't think gamification would do anything for me, as I have not been a fan of computer games, sports, board games, competition or anything else that leads me to work against others and egoically for myself. Can this idea really succeed with people inclined to study computer topics?&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2018-10-03T00:00:11.580" LastActivityDate="2018-10-19T22:04:12.817" Title="How to gamify the learning management system" Tags="|student-motivation|adult-education|resource-information|active-learning|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5103" PostTypeId="2" ParentId="5102" CreationDate="2018-10-03T00:22:14.870" Score="1" Body="&lt;p&gt;I'm older than your targeted demographic, I think, and I've never been a gamer. I find it boring, actually. But I find learning exciting. But there are some things you should keep in mind before trying this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important thing is that every student is different. They all have different backgrounds, strengths, weaknesses, interests. That is probably even more true for adults with a longer span of personal history. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a technique like gamification to work with a group of students, I think that they would need to be self-selected, going in to the course knowing what was going on. I don't know of any research on this with older students, but doubt that people in their 50's and 60's are terribly driven by racking up points. Some are, I assume, and if you can find a group of those, then a course might work. But I doubt that a general sort of population would take to such an approach. &quot;Are we being treated like adults or like children?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another issue that I would personally worry about is whether making too much of a game of it would actually detract from doing the work of reinforcing the knowledge through practice. Note that I have, in fact, used a simple game like Jeopardy with adult students, but only as a break from the more disciplined (read tedious) stuff. It worked for that, but I wouldn't have expected it to do more than jazz them up a bit when that was needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My strong belief is that for such students, building things that have some meaning to them would be a much better strategy. Especially building some simple application incrementally so that they get feedback (endorphin hits) frequently. But those hits are more of an intellectual hit than just some meaningless &quot;levels&quot; or points. For this reason I prefer teaching agile software development along with programming in early courses, so that the immediate tasks are small and there are a lot of small successes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, since a given group of adults is probably pretty diverse, some will struggle more than others. For that reason, I'd prefer to rely heavily on group work, rather than individual. If you aren't in a strict academic environment and have no concerns about &quot;cheating&quot; then it can be a big win. Again, I do have experience with this teaching adults. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;The key lesson, of course, is that instead of making the learning system competitive, you should IMO, make it cooperative.&lt;/em&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some research on the idea might be interesting, especially on the difference in learning between, for example, men and women. It might be hard to justify it to an IRB, perhaps. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-03T12:30:42.407" LastActivityDate="2018-10-03T12:30:42.407" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5104" PostTypeId="2" ParentId="5102" CreationDate="2018-10-03T03:17:55.670" Score="3" Body="&lt;p&gt;Let's try a rundown of some points in your question, relating them, where possible, to the system that hosts your question. (You already &lt;em&gt;hinted&lt;/em&gt; at that system anyway, and you seem somewhat familiar with it.) Having about zero knowledge of the Learning Management System, I'll refrain from trying to connect any concepts to that specific system.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can this idea really succeed with people inclined to study computer topics?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm going to give that part a resounding &quot;yes&quot; based on the statistics, including growth, of &lt;a href=&quot;https://stackoverflow.com/&quot;&gt;Stack Overflow&lt;/a&gt;. The remainder of the Stack Exchange Network helps to support that conclusion, yet it is hardly needed. In a little over 10 years it has been joined by 9.5 million users, generated 26 million answers to 17 million questions (growing by nearly 7,000 questions per day). (Excluding the non-English SO sites from the data). The knowledge stored there covers so many programming topics, that I find it incredible that there are still thousands of questions per day that are not already answered there. I have to presume that most of the users on SO, more than most of the other SE sites&lt;sup&gt;*&lt;/sup&gt;, are &lt;em&gt;inclined to study computer topics&lt;/em&gt; and, as I understand the system, the gamification is one key element of retaining users and generating answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you report from your research, the gamification is attractive to a large percentage of people, yet is not off-putting to the rest of the people. Such would seem to suggest that while it may lack a &lt;em&gt;hook&lt;/em&gt; for some people, it does not produce significant negative effects either. In addition, while not true for &lt;em&gt;all&lt;/em&gt; educational institutions, the vast majority of schools have already laid the ground work for gamification of their courses. Is not the published GPA of students &quot;gamification&quot;?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How effective is this for techniques you have used?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Other than the normal grade, and GPA-type rankings I've only had the opportunity to apply gamification to one classroom environment. This was for adult GED students who were also involved in a program for vocational preparedness. The vocational material was, by my own evaluation and reports from the students, dry, boring, dull, and unengaging. This despite it being an CBE built on a, supposedly, &quot;active learning&quot; system. As it was already computerized and the database files were essentially flat files (Windows 98 materials used in 2012!) I hacked into the files and built a system to rank the students on various metrics for a set of &quot;ladders&quot; as I called them, though they were essentially leader-boards anyway. There were no rewards or privileges offered for reaching goals or levels in the system, and no badges, or other recognition outside of the standings on the various ladders. While the students were all male, their ages ranged from 19 to 60+, covered a variety of ethnic groups, and varying degrees of English proficiency (it was a GED program, but not an ESL program). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The results were positive on all fronts. There were some of the men who were uninterested in the ladder system, including some that were well ranked nonetheless, yet those same men still managed to become more engaged in the related components. Those who were in the vocational section also showed a significant uptick in their GED material retention. (Possibly due to a large part of the GED material forming the foundation for understanding and completing the vocational materials.) There was also an increase of about 40% in the GED students who wanted to become involved in the vocational components. We ended up having to create a time-slot system to accommodate the interested students on the dozen available computers, which had not been a problem prior to the ladder system.&#xA;Two other significant points: 1) none of the pre-ladder system participants dropped out because of the new ranking system, and 2) a few men postponed taking their GED tests until after they had completed the vocational section (passing the GED would be graduation from the class and loss of access to the vocational section as well).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Personal experience from the receiving end. I am not in the &quot;competitive&quot; camp, and usually try to avoid &quot;ranking&quot; myself against others. (I don't even like viewing team sports, never mind playing them.) I know that the SE model is heavily gamified, and I even think it has been done well. My reputation on this site, after checking, is the highest I have on any site. I don't know when I last visited the reputation tab in my profile, but it's been quite a while in any case since there's been a lot of points earned since then.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/UKKt0.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UKKt0.png&quot; alt=&quot;screenshot&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nevertheless, I &lt;em&gt;have&lt;/em&gt; participated in this site and earned reputation points (as have you), and I've also learned I have access to new tools to help the site in its growth. I have also participated in several other sites on the network, even answering a question of two that other users don't seem to understand. (I presume that if they'd understood the question they could have given answers; faster and better than mine as well.) My primary purpose for using these sites is my own increase in knowledge (practical and theoretical), and I believe in sharing my wealth (information) with others that need it. This platform facilitates both objectives very well, and I can basically ignore the game elements as irrelevant to my experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that, done right, you can create and implement a system of gamification for your courses, both online and in the classroom, that will be successful with the many, inoffensive to the few, and beneficial to the whole.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;em&gt;*&lt;/em&gt;&lt;/sup&gt; &lt;a href=&quot;https://cs.stackexchange.com/&quot;&gt;Computer Science&lt;/a&gt;, &lt;a href=&quot;https://cstheory.stackexchange.com/&quot;&gt;Theoretical Computer Science&lt;/a&gt;, and &lt;a href=&quot;https://softwareengineering.stackexchange.com/&quot;&gt;Software Engineering&lt;/a&gt; are among the obvious exceptions to that qualification.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-10-03T03:17:55.670" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5105" PostTypeId="2" ParentId="5102" CreationDate="2018-10-03T13:47:57.427" Score="1" Body="&lt;p&gt;It can certainly be effective.  Even for adults who aren't particularly game-motivated, what you are setting up is a system that (a) rewards good learning behaviors, and perhaps more importantly, (b) gives a steady, visible reminder of what those behaviors &lt;em&gt;are&lt;/em&gt;.  You've taken away one of the hidden mental taxes of learning by helping them to manage their own time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't imagine that most adults are really &lt;em&gt;driven to win the game&lt;/em&gt; in the way that children are.  Rather, they appreciate that it helps them organize their activities around the course, and the small dopamine &quot;hit&quot; that they get from the points feel &lt;em&gt;genuinely earned&lt;/em&gt;, so there is no guilt in just enjoying the small pleasure.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-10-04T03:10:12.577" LastActivityDate="2018-10-04T03:10:12.577" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5106" PostTypeId="1" CreationDate="2018-10-03T15:41:49.997" Score="3" ViewCount="95" Body="&lt;p&gt;I'm tasked with leading a couple information sessions (totaling 4 hours) to teach non-programmers how to get started in Python. The audience is software testers employed in a technology department. I believe this would be pointless if it were a purely passive presentation of information, so I'd like to be able to include questions they can submit answers to while going through the presentation as well as interactive python shells to try to write snippets of code themselves. Ideally, I'd be able to view the answers and code submitted by each participant to be able to judge how well things are going and if there are any common misconceptions I need to clear up.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've seen this kind of approach on instructional websites like Udacity. Does anyone know if similar software has been produced for public use?&lt;/p&gt;&#xA;" OwnerUserId="5217" LastEditorUserId="5217" LastEditDate="2018-10-03T19:03:24.870" LastActivityDate="2018-10-10T18:08:24.750" Title="Software to produce an interactive presentation?" Tags="|python|lecture-tools|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5107" PostTypeId="2" ParentId="5106" CreationDate="2018-10-03T19:19:02.180" Score="3" Body="&lt;p&gt;Here are two ideas that might meet your needs:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://codingbat.com/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codingbat&lt;/a&gt; allows you to create a teacher account and your own problem sets.  You have to put in test values for all of your functions, but you can see the results that your students produce.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A worksheet.  &quot;Now that we've covered that idea, go ahead and see what you can do with number 4 on your sheet.&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Since you're just trying to make your lesson interactive, a low-tech approach might be your best approach.  Providing a work-along worksheet allows you to focus your time and energy on other parts of the lesson when you prepare.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Best of luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-10-03T19:19:02.180" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5109" PostTypeId="1" AcceptedAnswerId="5124" CreationDate="2018-10-04T17:05:27.843" Score="1" ViewCount="189" Body="&lt;p&gt;I need a suggestion for books for my University. I have a subject called &quot;Data and database modeling&quot; but we lack of books. Our professor gave as barely understandable scripts. This is an official explanation of the subject:&lt;br&gt;&lt;br&gt;&lt;strong&gt;Curriculum:&lt;/strong&gt;&#xA;&lt;br&gt;Introduction of data structures used in database modeling. &lt;br&gt;The data structures include data objects, associations between objects and rules for performing operations over objects.&lt;br&gt; &#xA;Modelling of databases regarding user demands. &#xA;&lt;br&gt;Basic database concepts. &#xA;&lt;br&gt;Configurations and commands for certain real databases. &#xA;&lt;br&gt;SQL commands for working with databases.&#xA;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Course goals/Competences:&lt;/strong&gt;&#xA;&lt;br&gt;Data Modeling and design of data structures suitable for optimum operation of databases.&#xA;&lt;br&gt;Using the basic set of SQL commands for working with databases.&#xA;&lt;br&gt;&lt;br&gt;Any suggestions are welcome :D&lt;/p&gt;&#xA;" OwnerUserId="6018" LastEditorUserId="27" LastEditDate="2018-10-05T20:22:35.273" LastActivityDate="2019-11-28T08:55:50.237" Title="Data and Database modelling books" Tags="|self-learning|databases|data-types|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5110" PostTypeId="1" AcceptedAnswerId="5111" CreationDate="2018-10-04T17:37:24.360" Score="8" ViewCount="419" Body="&lt;p&gt;&lt;strong&gt;TL;DR: How would you explain what is a race condition to a five years old. Which analogy to concepts he is familiar with would you use?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Long version:&#xA;I am not a teacher but a software engineer. Yesterday evening, while discussing what the day was like with my five years old son I told him that I worked on an annoying bug, that ended up being caused by a race condition. He then asked me what a race condition is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to explain the concept to him by making the analogy with multiple people all writing a story on the same blackboard. If they all write their story at the same time then one person might start writing over part of a story already written by someone else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However I think that this analogy was probably not the best because he then asked me which person did “won”. I explained to him that nobody did win because the end result was that the “story” that was written on the blackboard was not making any sense. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;He then asked me how did I solved the problem and I told him that I did give each story writer his own blackboard.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I am looking for a good way to explain what is a race condition to a five years old, ideally without using a programming terminology because that would mean nothing to him.&lt;/p&gt;&#xA;" OwnerUserId="6019" LastActivityDate="2019-09-10T17:14:42.600" Title="How would you explain what is a race condition to a five years old" Tags="|lesson-ideas|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5111" PostTypeId="2" ParentId="5110" CreationDate="2018-10-04T19:05:52.627" Score="10" Body="&lt;p&gt;A lot of race conditions result from improper or unexpected interleaving of processes. Someone that age can probably understand the fable of the Turtle and the Hare. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give the Hare a ball with instructions to run to a table, some distance away, and leave the ball on the table and return. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tell the Turtle to go to the table, pick up the ball, and return with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start the two &quot;running&quot; at the same time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Turtle has no instructions about waiting, since the &lt;em&gt;proper&lt;/em&gt; interleaving is &lt;em&gt;obvious&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, if the Turtle gets to the table first then the process fails. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll note that &lt;a href=&quot;https://en.wikipedia.org/wiki/Dining_philosophers_problem&quot; rel=&quot;noreferrer&quot;&gt;Dining Philosophers&lt;/a&gt; isn't a lot more difficult than the above, but probably not accessible to a five year old. Certainly open to one a few years older, though. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2018-10-20T23:47:02.857" LastActivityDate="2018-10-20T23:47:02.857" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5112" PostTypeId="2" ParentId="5109" CreationDate="2018-10-04T19:10:12.593" Score="-1" Body="&lt;p&gt;A simple search at Amazon for &quot;database modeling&quot; will turn up several books. Any of their top choices would be suitable. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-04T19:10:12.593" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5113" PostTypeId="1" AcceptedAnswerId="5115" CreationDate="2018-10-05T01:25:29.527" Score="4" ViewCount="123" Body="&lt;p&gt;What are some good example classes for introducing generics in Java?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm introducing this in the context of implementing &lt;code&gt;ArrayList&lt;/code&gt;, but I don't want my first example to be &lt;code&gt;ArrayList&lt;/code&gt; itself due to the inability to create arrays of a generic type. I would also like my example to be something that doesn't seem contrived/has a practical use.&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="150" LastEditDate="2019-05-28T05:55:55.763" LastActivityDate="2019-05-28T05:55:55.763" Title="Example for Introduction to Generics in Java" Tags="|java|data-structure|data-types|generics|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5114" PostTypeId="2" ParentId="5110" CreationDate="2018-10-05T01:39:52.447" Score="2" Body="&lt;p&gt;Musical chairs where one person sits on another as they are both going for one of the last chairs &amp;#8212; this is comical, though in seriousness, clearly a less than desirable seating arrangement.&lt;/p&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2018-10-05T01:39:52.447" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5115" PostTypeId="2" ParentId="5113" CreationDate="2018-10-05T10:54:30.843" Score="3" Body="&lt;p&gt;While uniform collections are the obvious example, you can also build or use a Pair class in which the types of the two components are given by generic arguments. If you don't want to build it, there is a built-in class with this property: &lt;span class=&quot;math-container&quot;&gt;$Pair&amp;lt;K,V&amp;gt;$&lt;/span&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But building one like it is simple enough if that is your goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have your desired class, Write a function/method that needs to return two things instead of one. Bundle them up in a Pair. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-05T10:54:30.843" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5116" PostTypeId="1" CreationDate="2018-10-06T14:18:25.667" Score="3" ViewCount="68" Body="&lt;p&gt;I'm doing a coding workshop and I can't seem to find a good way to stream a part of my screen (or some windows in my screen) into a projector. I only need the code editor and terminal/command prompt windows to show to the students. I didn't want to mirror my screen since I have slide notes and reminders only for me (as the presenter). So what I was thinking is to extend my screen into a projector (or to simulate, a second screen), and have a software streaming (mirroring) a part of my orig. screen into that second screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is so the students can see what I'm typing into the code editor and terminal. I also have slides that I want to be in that projected screen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I still need a part of my orig. screen hidden for my notes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used VLC to stream desktop but it's a pain to setup and there is some lag into the stream.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The description may sound confusing but you could imagine just what you would do if you have three things to show to the students.&#xA;Your code editor, terminal and your slides. But you also have slide notes and some other notes for yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any good ideas?&lt;/p&gt;&#xA;" OwnerUserId="6029" LastEditorUserId="6029" LastEditDate="2018-10-06T14:47:42.993" LastActivityDate="2018-10-08T16:18:31.210" Title="Need a good &quot;streaming&quot; software for coding tutorials/workshops" Tags="|workshops|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5117" PostTypeId="2" ParentId="5116" CreationDate="2018-10-06T15:03:27.150" Score="2" Body="&lt;p&gt;I work on a Macintosh, but assume similar capabilities are available on other systems as well. My systems support multiple monitors and each monitor can show a separate desktop (or a section of a larger desktop). A window in one desktop can simply be dragged to another. If you just connect your regular monitor to one (physical or virtual) port and the projector to another, you will have what you want. If you don't have physical ports a junction/splitter may be required to support the multiple monitors so long as the software will support it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could, possibly, have two monitors and a projector with the projector mirroring one of the monitors so as to make your own workflow easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This assumes, of course, that you are interested in a face-to-face situation, not remote students. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-06T15:03:27.150" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5118" PostTypeId="5" CreationDate="2018-10-07T10:08:31.360" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2018-10-07T10:08:31.360" LastActivityDate="2018-10-07T10:08:31.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5119" PostTypeId="4" CreationDate="2018-10-07T10:08:31.360" Score="0" Body="This is a special tag that is designed to be used only by the system for questions that have had all of their other tags removed. Do not add this tag to existing questions, it is reserved for use by the system to identify posts with no valid tags." OwnerUserId="1035" LastEditorUserId="1035" LastEditDate="2018-10-10T23:30:18.487" LastActivityDate="2018-10-10T23:30:18.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5120" PostTypeId="2" ParentId="5116" CreationDate="2018-10-07T14:53:05.523" Score="2" Body="&lt;p&gt;I used to project from a computer with two monitors. One was mine, and had whatever I didn't want the students to see. The second was mirrored to the projector so anything I wanted them to see would show up. I'd also run Adobe Connect on that screen so that students could pull up the projected stuff on their own screens. Kept them from having to turn their heads to see what was going on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This year I have a notebook that I use for presenting, and that's it. One of the flaws with having dual monitors (they were both 24&quot;) was that the monitors blocked my view of students. It made it harder to see confused faces or students that weren't doing what they were supposed to be doing. Now, with just a 14&quot; notebook screen in the way it's easier to get a feel for how the students are following along.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also used a program called &lt;a href=&quot;https://obsproject.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OBS&lt;/a&gt; for the past couple of years. I use it to record my demos, but it'll also stream directly to YouTube and Twitch. It'll let you select which windows to share if you don't want to share the whole screen. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Your code editor, terminal and your slides.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I use multiple desktops on Windows 10 for this. Each thing gets its own desktop and I switch between with Ctrl-Windows-Left (or right). Then I can switch between them pretty easily. &lt;/p&gt;&#xA;" OwnerUserId="30" LastEditorUserId="30" LastEditDate="2018-10-08T16:18:31.210" LastActivityDate="2018-10-08T16:18:31.210" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5122" PostTypeId="1" CreationDate="2018-10-09T12:27:38.060" Score="8" ViewCount="1325" Body="&lt;p&gt;I am currently teaching the pretty much normal &lt;a href=&quot;https://docs.google.com/document/d/1n498WFcX91trTikJsKAu_UtF1egSsVaNhrE21lcHPpU/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;second year Data Structures and Algorithms course&lt;/a&gt;. In this course there are four programming projects, with the first project completed the automated testing and grading yesterday. However, out of the 200+ students taking the course, only 72 managed to complete this project so that they passed my automated tester for the pseudorandom seed that I used. As my first question to this forum, I would like to get some second and third opinions about this issue before I decide how deep I dig my heels into the ground about it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This project (&lt;a href=&quot;https://docs.google.com/document/d/12daxoU4SwQN2Yzmk2aU9d7xbkMcxcvQnliNFTXTWPes/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;full specification&lt;/a&gt;) asked them to create a Java class named IntervalUnion whose objects represent unions of integer intervals, such as [1-5,9-12] or [4-8,11-15], with an arbitrary number of individual intervals allowed inside each such object. This class should then have the public methods union and intersection to create new objects, with the union of these two objects being [1-15] and intersection being [4-5,11-12], along with toString, equals and hashCode as usual.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simply cannot believe that this project would have been unreasonably difficult for second year computer science majors who have already taken the standard two first year courses of introduction to programming and computer science using Java. And yet for some reason it seemed to be, especially using my automated tester that, based on the given pseudorandom seed, generates random test cases and computes a checksum of the results returned by the implemented methods, this checksum then being expected to be equal to the checksum produced from my private model solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a test run that generated one million objects, easily automated with a Bash shell script, the passing projects took between one and three seconds to finish, whereas some solutions had to be terminated after minutes of waiting and thus rejected. The project spec specified a thirty second time limit that I would have assumed to be more than enough for them even to dilly dally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course I might be completely mistaken in my view about this, so I would like to hear some opinions of other teachers who have taught this same second year intro to algorithms, before I make any announcements to the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since my course uses the three best projects out of four in determining the total course grade, I am currently of the opinion that I am going to just tell the students to wake the hell up, realize that this is serious, and do better in the three remaining projects. &lt;a href=&quot;https://docs.google.com/document/d/1MgD841yKzpHJ-hwI9wBg3Y9lWTsX0morpM_63qaeVzw/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;The second programming project&lt;/a&gt; consists of writing method to remove all nodes with given key from the given linked list, and to sort the given linked list, using the sorting algorithm of their choice. (As with all these projects, the grading is 5 points for passing the automated tester, and 5 points for comparative running time rankings among all submissions.) There is just no way that that task could be considered too hard for second year CS majors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last two programming projects (&quot;&lt;a href=&quot;https://docs.google.com/document/d/1ffj0WotTvY1WQLUH4uWVEOAHOMaL-RIOa-jMmX6wQZc/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;Packing words in bins&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;https://docs.google.com/document/d/1TikTS0XGeiF-y2v82K7RClWDzZMkdcoZy0637Hk6jGQ/edit?usp=sharing&quot; rel=&quot;noreferrer&quot;&gt;Word filling&lt;/a&gt;&quot;) due at the end of the course should be easy to at least pass in that within the simple rules of both word search puzzles, there are really no wrong answers, but the difficulty of both projects is in quickly finding a good solution that scores well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(As an aside, I am actually pretty proud of that Word filling problem, as its idea came to me last summer during a nice mellow walk, and the solution sketch the next day during a ride home followed by about an hour to implement after dinner, and I wonder if I could be the inventor of such a simple but tricksy puzzle that I simply can't recall ever seeing anywhere before this. Another more interesting variation might be to maximize the scrabble score of the words, since that doesn't actually change the solution algorithm.)&lt;/p&gt;&#xA;" OwnerUserId="3908" LastActivityDate="2019-10-18T00:38:46.763" Title="First project in my second year data structures intro" Tags="|java|project|algorithms|data-structure|" AnswerCount="4" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5123" PostTypeId="2" ParentId="5122" CreationDate="2018-10-09T17:55:16.987" Score="5" Body="&lt;p&gt;Sorry, but digging in your heels or telling the students to wake the hell up is going to get you exactly nowhere. When a small percentage of your students fail to successfully complete a project it is likely their own lack of background or application. But when only about a third are able to successfully complete it, it is a problem with the course, not with them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some possible reasons for the problem. Perhaps they started late on it and weren't able to do a good job as user Adam asked? If so, why was that? Are they overworked generally in your course and elsewhere? I doubt that so many are just late starters. Was it a problem of insufficient testing? Was it too many tried a brute force approach that doesn't scale? How much does the course stress that early on - both testing and scaling? It seems like they weren't able to ask questions (of the TAs at least) as the project progressed. If they get stuck, how do they get unstuck? Just on their own? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you have a problem and I can't diagnose it, but you can. You can, for example, have your TAs do a postmortem with small groups. I hope you have more than one or two for 200+ students. The first question I would want the failed students to answer was &quot;Were you surprised by the failure?&quot; That can lead to a lot of discussion about the nature of it. I would ask about how much testing they did, especially on large sets. Were they able to use the tester effectively, providing appropriate inputs, or were they misled by it. Another question I'd want an answer to is how many students now actually know why they failed. What was it in the code or its creation that led them to failure. If they don't know that you have a serious problem going forward. I think that for these and similar questions your TAs are better able to get you usable answers. The students are less likely to feel intimidated by the questions than if you ask them directly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another level, I'd ask how many independent runs did you do with each student's work? Just one? The data was random, remember. Maybe naive inputs to the tester gave them poor feedback while doing their own testing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe a five week project with little guidance or feedback is sub-optimal. Especially if you treat it as an exam. It seems like a lot of time, until it isn't. Why not shorter projects? Why not more feedback? Why not, to be honest, continuous feedback? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder how many students who failed did so only for run time and how many weren't even able to put together an algorithm at all. Has anyone given them feedback on their code and approach other than &quot;failed&quot;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are your expectations about what they &quot;should have learned&quot; in the earlier courses realistic? Are you making assumptions not warranted by the facts? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't just stamp your feet. Find out why this happened and change your teaching structure accordingly. Treat it like a scientific problem with an engineering solution. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-11T15:46:40.357" LastActivityDate="2018-10-11T15:46:40.357" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5124" PostTypeId="2" ParentId="5109" CreationDate="2018-10-09T22:44:57.340" Score="2" Body="&lt;p&gt;I highly recommend &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1558604383&quot; rel=&quot;nofollow noreferrer&quot;&gt;Database: Principles, Programming, and Performance, by O'Neill&lt;/a&gt; and O'Neill. Learned from that book for my first database course and loved it.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2018-10-09T22:44:57.340" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5125" PostTypeId="2" ParentId="5106" CreationDate="2018-10-10T18:08:24.750" Score="2" Body="&lt;p&gt;I highly recommend using Jupyter Notebooks. These provide a system for integrated code + narrative.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get a quick sense of the results by looking at &lt;a href=&quot;https://github.com/rajathkmp/Python-Lectures/blob/master/04.ipynb&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/rajathkmp/Python-Lectures/blob/master/04.ipynb&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also see a video at &lt;a href=&quot;https://youtu.be/wpBPGF0yQ9E?t=88&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/wpBPGF0yQ9E?t=88&lt;/a&gt; that uses the basic interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students can easily set this up on a Win/Mac/Linux computer using Anaconda python or you can use a hosted service.  You can find a free system at &lt;a href=&quot;https://jupyter.org/try&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://jupyter.org/try&lt;/a&gt; that lets you try out the different interfaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The JupyterLab interface is more comprehensive and includes a better IDE and terminal interface than the earlier &quot;notebook&quot; interface -- the jupyter.org site lets you try both.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are free / cheap services from Google and Microsoft to run Jupyter notebooks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a good ecosystem to be aware of.&lt;/p&gt;&#xA;" OwnerUserId="6046" LastActivityDate="2018-10-10T18:08:24.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5126" PostTypeId="2" ParentId="5122" CreationDate="2018-10-11T05:00:26.920" Score="1" Body="&lt;p&gt;Your students do not know how to engineer software. They have not been taught. Teach them. (Suggest you find out what their syllabus has been &amp;amp; what they actually learned.) You do not know how to acquire software. You have been burned. The solution is the same: software engineering. You must be the engineer of your desired software. A software client must be a software manager. You just didn't realize that you assigned yourself a software engineering project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cacm.acm.org/magazines/1981/2/10949-the-emperors-old-clothes/pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Emperor's Old Clothes&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;At last, there breezed into my office the most senior manager of all, a general manager of our parent company, Andrew St. Johnston. I was surprised that he had even heard of me. &quot;You know what went wrong?&quot; he shouted--he always shouted--&quot;You let your programmers do things which you yourself do not understand.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The core of the solution is the same: milestones. (Which, taking a module to be a unit of work, is just information hiding yet again as the foundation of software engineering.)&lt;/p&gt;&#xA;" OwnerUserId="2485" LastActivityDate="2018-10-11T05:00:26.920" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5127" PostTypeId="2" ParentId="3325" CreationDate="2018-10-11T17:52:19.553" Score="2" Body="&lt;p&gt;After now two administrations of the course since I asked this question, I think I have found a way to increase my student's understanding of the problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I introduce strings earlier and more explicitly, and I talk about files and file names later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I explicitly teach about literal constants as expressions that &quot;directly mean their value&quot;, without needing any calculation. This enables me to tell them that string literal constants (and not just strings) must be quoted. This is in agreement with my insistence to distinguish expressions and their values (eg. &lt;code&gt;3+2&lt;/code&gt; is not an integer), which is something they have to get their heads around after 12hr/week of math where they absolutely do not make this distinction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, there is a small exercise that I find excellent for beginners : have them write a Python function that, given a string of odd length, returns the middle character. This is conceptually trivial but has all the pieces that one needs and can have misconceptions about regarding strings and string indices :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;they must not use quotes in the name of the formal parameter, but must when testing their function with an example,&lt;/li&gt;&#xA;&lt;li&gt;they have to remember the notion of length, index, the indices range, and the associated syntax,&lt;/li&gt;&#xA;&lt;li&gt;bonus : they get to experience that even if &lt;code&gt;len(s)&lt;/code&gt; is odd, &lt;code&gt;(len(s)-1)/2&lt;/code&gt; is not an integer, as Python is unusually picky about the type of the index.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;More generally, I managed to shift some classical examples that I was doing with tuples to strings : eg. writing a function that returns whether a given string is an alternation of &lt;em&gt;a&lt;/em&gt;s and &lt;em&gt;b&lt;/em&gt;s instead of whether a given integer tuple is an alternation of even and odd numbers.&lt;/p&gt;&#xA;" OwnerUserId="2574" LastEditorUserId="2574" LastEditDate="2018-10-11T17:59:02.083" LastActivityDate="2018-10-11T17:59:02.083" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5128" PostTypeId="1" CreationDate="2018-10-13T21:09:17.883" Score="4" ViewCount="262" Body="&lt;p&gt;I'm finding that my CS2 students really struggle with the notions of type conformance and subtype polymorphism in Java. Say we have the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public abstract class Vehicle {&#xA;    // attributes + constructor&#xA;    public void ride() { ... }&#xA;    public String toString() { ... }&#xA;}&#xA;&#xA;public class Bicycle extends Vehicle {&#xA;    // attributes + constructor&#xA;    // notice this is an override from Vehicle&#xA;    public void ride() { ... }&#xA;    public String honkHorn() { ... }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;They then consider the following problems, with my commentary on common mistake(s) following each problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Bicycle b = new Bicycle();&#xA;Vehicle v = b;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Students look at this and think &lt;code&gt;b&lt;/code&gt; cannot be stored in &lt;code&gt;v&lt;/code&gt;, either due to the type difference, or maybe because &lt;code&gt;Bicycle&lt;/code&gt; has a constructor with a different number of parameters than the &lt;code&gt;Vehicle&lt;/code&gt; constructor, so of course &lt;code&gt;b&lt;/code&gt; can't 'fit' inside &lt;code&gt;v&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Bicycle b = new Bicycle();&#xA;Vehicle v = b;&#xA;v.ride();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Students commonly think that the &lt;code&gt;ride&lt;/code&gt; method in &lt;code&gt;Vehicle&lt;/code&gt; will be called. I understand why this mistake is made, but those who get this correct still struggle then with this next problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Bicycle b = new Bicycle();&#xA;Vehicle v = b;&#xA;v.honkHorn();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Students now think this is also syntactically valid. Because subtype polymorphism ensures that the method call will use the object's implementation, rather than the variable's, they think that Java will somehow recognize that &lt;code&gt;v&lt;/code&gt; is storing an object of type &lt;code&gt;Bicycle&lt;/code&gt;, and thus &lt;code&gt;honkHorn&lt;/code&gt; is available to be called. It never occurs to them that &lt;code&gt;Vehicle&lt;/code&gt; doesn't even have this method, so of course it won't work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, they have had two quizzes and now an exam involving these concepts (despite seeing them in class contextualized in other learning material all semester, and theoretically a little at the end of last semester), and a significant number of students are still struggling with this. Any suggestions on how to convey all these concepts? My approach is usually to convey very clear models of how things look in memory, but that doesn't seem sufficient here. Do I just need lots of examples/practice problems? Other suggestions?&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="1293" LastEditDate="2018-10-17T17:43:10.833" LastActivityDate="2018-11-02T11:52:03.567" Title="Mental Model of Type Conformance/Subtype Polymorphism" Tags="|java|object-oriented-paradigm|polymorphism|" AnswerCount="7" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5129" PostTypeId="2" ParentId="544" CreationDate="2018-10-13T21:12:48.810" Score="2" Body="&lt;p&gt;I really enjoy the answer to &lt;a href=&quot;https://stackoverflow.com/a/14244705/290136&quot;&gt;this question&lt;/a&gt; provided on StackOverflow and use it as a basic introduction/discussion point in my CS2 course:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Consider the following situation:&lt;/p&gt;&#xA;  &#xA;  &lt;blockquote&gt;&#xA;    &lt;p&gt;&lt;em&gt;You are in the middle of a large, empty room, when a zombie suddenly attacks you.&lt;/em&gt;&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;&lt;em&gt;You have no weapon.&lt;/em&gt;&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;&lt;em&gt;Luckily, a fellow living human is standing in the doorway of the room.&lt;/em&gt;&lt;/p&gt;&#xA;    &#xA;    &lt;p&gt;&lt;em&gt;&quot;Quick!&quot; you shout at him. &quot;Throw me something I can hit the zombie with!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;  &lt;/blockquote&gt;&#xA;  &#xA;  &lt;p&gt;Now consider:&#xA;  You didn't specify (nor do you care) exactly what your friend will choose to toss;&#xA;  ...But it doesn't matter, as long as:&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-It's something that can be tossed (He can't toss you the sofa)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-It's something that you can grab hold of (Let's hope he didn't toss a shuriken)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-It's something you can use to bash the zombie's brains out (That rules out pillows and such)&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;-It doesn't matter whether you get a baseball bat or a hammer -&#xA;  as long as it implements your three conditions, you're good.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;&lt;strong&gt;To sum it up:&lt;/strong&gt;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;When you write an interface, you're basically saying: &quot;I need something that...&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="830" LastEditorUserId="830" LastEditDate="2018-10-14T02:52:29.987" LastActivityDate="2018-10-14T02:52:29.987" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5130" PostTypeId="2" ParentId="5128" CreationDate="2018-10-13T22:07:55.010" Score="3" Body="&lt;p&gt;The problem is that you don't really have subtype polymorphism here. While the language permits it, it is poor practice to change the interface (set of public methods) as you move down the hierarchy. I'm not speaking of the formal &lt;em&gt;interface&lt;/em&gt; but only of the messages that an object is allowed to handle. Your class Vehicle doesn't have honkHorn, but a subclass does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with this is that if I have an object, I need to know its specific type to know what methods it supports. Some Vehicles support honkHorn, but others don't so I need to test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is, at best, ad-hoc polymorphism. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want true subtype polymorphism define a class as an interface or abstract class as you have done here, but all subclasses should exhibit exactly the same interface. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, if you define a variable to have the interface (abstract class) type, then it can refer to any object of any subclass and it can field any message defined at the top level. You &lt;em&gt;never&lt;/em&gt; need to ask instanceof and you never need to cast. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is, of course, harder to build a system keeping such a pure rule, but it can be done and it saves you a ton of grief later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the reasons we want to build OO software is to let the system figure things out without explicit testing. If you change &quot;interfaces&quot; within hierarchies you are just back to ad-hoc decision making. You are defeating the notion of IS-A that the OO paradigm was built for. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In your example you can't really say that a Bicycle IS-A Vehicle. You can say that it is a Vehicle, but something more, and we have to determine what by ad-hoc means in many instances. Sometimes by declaring variables to have a specific type (rather than a general type) and sometimes by testing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In terms of &quot;contracts&quot;, if you change the contract as you come down the hierarchy, it wasn't really a contract. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sadly, too many books don't understand this and define meaningless, and difficult to work with, &quot;hierarchies&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to avoid this issue, is to define Vehicle as an interface and then define Bicycle as another interface that extends Vehicle. Now your intent is clear. Classes implementing an interface have &lt;em&gt;only&lt;/em&gt; the public methods defined in their interface and nothing more. Now you have interfaces of &lt;em&gt;concepts&lt;/em&gt; which is what they are really intended to model, and classes of &lt;em&gt;objects&lt;/em&gt; that conform to specific concepts. This may be the mental model you seek, actually.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I discussed Polymorphism at some length here: &lt;a href=&quot;https://cseducators.stackexchange.com/a/4050/1293&quot;&gt;https://cseducators.stackexchange.com/a/4050/1293&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me add some things here to point to a better way. One of the lessons is that subclassing is generally overused. Some books present it as the &quot;really big thing&quot;. Instead, programming by composition is much more valuable. When you create a class give it parts that are instances of some other, simpler, class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the immediate problem here. Give Vehicle a method &lt;em&gt;makeSound&lt;/em&gt;. Give each subclass of it an instance field that refers to some kind of object that might make a typical sound. For a bicycle object it might be a Horn object. Then when any vehicle is sent the makeSound message it &lt;em&gt;delegates&lt;/em&gt; the making of the sound to the object that is part of its composition. Delegation is the big idea here. Now you don't need to change the protocol in different classes. Just change the implementation, but giving different &quot;parts&quot; to different vehicles. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At least one very commonly used book has something like the following hierarchy. First a Point class. A point has some coordinates. Then, for the first (ugh) example of subclassing is a Circle class. This is &quot;easy&quot; to write, since if you subclass Point all you need to add is a radius value. But to a mathematician, is every circle a specialization of point?  It is backwards, of course. Taking it farther, a Cylinder can subclass Circle just by adding a height value. This makes it very easy to type in, but very foolish, both mathematically and from a program design standpoint. If you create a Cylinder, what sort of variable should you use to refer to it. If you don't use a Cylinder variable, then within the next few lines you are very likely to have to cast the variable, or, if you have put such things into a List then you are going to have to type case them (or equivalent) when you look at them again. Don't do that. But what &lt;em&gt;can&lt;/em&gt; you do better. Use delegation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you build your Circle class, don't make it an extension of Point. Instead, give it an instance variable of type Point. A Circle is a different kind of thing. It isn't a point, but it HAS-A point as a field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise the Cylinder HAS-A Circle for its base. Much cleaner. The cylinder delegates some of its actions to its base when it receives a message. Likewise the base (a Circle) delegates some messages to its location (a Point).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you have a defensible design, but it might not have used subclassing at all. You get reuse (via delegation) and don't confuse the nature of things and require ad-hoc decision making throughout a long program. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-15T17:52:08.653" LastActivityDate="2018-10-15T17:52:08.653" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="5131" PostTypeId="5" CreationDate="2018-10-14T02:56:01.087" Score="0" Body="&lt;p&gt;Generics allows classes, methods, and interfaces to have one or more class types as parameters. Generics are commonly used in Java and are somewhat analogous to templates in C++. Read more: &lt;a href=&quot;https://en.wikipedia.org/wiki/Generics_in_Java&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Generics_in_Java&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="830" LastEditorUserId="1293" LastEditDate="2018-10-20T20:22:56.750" LastActivityDate="2018-10-20T20:22:56.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5132" PostTypeId="4" CreationDate="2018-10-14T02:56:01.087" Score="0" Body="Used for questions that address generics in Java and other languages. Generics are often used to restrict collections to a single contained type so that the system can guarantee correctness in some cases. " OwnerUserId="830" LastEditorUserId="1293" LastEditDate="2018-10-20T20:20:34.787" LastActivityDate="2018-10-20T20:20:34.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5133" PostTypeId="2" ParentId="5128" CreationDate="2018-10-15T17:10:03.300" Score="3" Body="&lt;p&gt;So as not to confuse issues, let me give more detailed advice here on why the students are going wrong and about their mental model. I'll try to keep this distinct from the problems of what I consider a poor example of subclassing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first lesson that you need to give them is the distinction between a message and a method. A method is the implementation some actions or information request. A message is the invocation of those actions. Methods are defined in classes. Messages are sent to objects generally via a variable of some kind. Be clear about the terminology. Don't say function (except static methods). Don't say &quot;call a method&quot;. Say &quot;send a message&quot;. Just as you would IRL. Language is important. If you want students to have a good mental model, use appropriate language. If you use the language of C, they will think like C programmers, but OO isn't like that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second lesson is that objects receive messages and every message is interpreted &lt;em&gt;by the object&lt;/em&gt; that receives it in terms of its own &lt;em&gt;most specific&lt;/em&gt; class. It doesn't matter which variable refers to it, or the declared type of the variable (so long as it is legal). The interpretation of the message is specific to the object. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third lesson is that the &quot;system&quot; knows different things at compile time and at run time. At compile time it only knows the declared types of things, not the actual types. At run time the system &quot;knows&quot; the actual type of an object being referred to (more accurately, an object knows its own type). But objects are only created at run time. At compile time, all we have is the text of the program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fourth lesson is that variables don't &quot;hold&quot; values. Variables &lt;em&gt;reference&lt;/em&gt; values. You can actually take this view even for int values without loss. The implementation is immaterial to a valid mental model. An int variable refers to an int. It can later refer to a different int. &quot;Holding&quot; has no place here. This makes the reference model of objects much easier to grok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fifth lesson is that objects get a type only when they are created. The same is true for all values, actually. Moreover, no value ever &lt;em&gt;changes&lt;/em&gt; its type. Its type is immutable as long as it is in existence. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting lessons 4 and 5 together, a variable can &lt;em&gt;refer&lt;/em&gt; to different objects at different times (when legal in the type system). But no value changes its type, nor does the variable change its (declared) type. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason for declaring variables to have a type and to give values a type at creation is to avoid a large set of programmer errors as you create the program so they don't have to be caught (or missed) at run time. Other languages (Python, Ruby) don't give a declared type to variables, so there are a larger number of potential errors that can escape if testing isn't rigorous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think these rules are sufficient to dispel the variable mismatch issues in the question asked here, but can extend if comments make it necessary. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On the question of language and especially the notion of a &quot;message&quot; vs a &quot;call&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In languages like C one &quot;calls&quot; a function. And in languages like Java, one sends a &quot;message&quot; to an object requesting a service. The actual mechanism for this is quite different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In C, one can examine the text of the program and determine precisely what will happen when a function is called. The &quot;dispatch&quot; of the function is direct - a sort of direct goTo. Note the words &quot;determinable from the &lt;em&gt;text&lt;/em&gt; of the program.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Java you cannot in principle know precisely which method will be dispatched when you send a message as this depends on the specific type of the object that receives the message, not on the text of the message (the text of the program). Of course if the program uses no polymorphism at all, so that the specific type to which every variable refers is known then than won't be true, but in general if object A and B both implement interface I, then x.mumble(3) can be different depending on whether, at that run time instant, x refers to an A or to a B. Therefore you can't &quot;call&quot; methods (other than static methods) of A or B, you can only send a message to the object referred to that you would like service &quot;mumble&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you ignore this, then polymorphism will be &lt;em&gt;much&lt;/em&gt; harder to understand. Since the mechanism is different, different language is called for and appropriate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To respond directly to the comment that generated this addendum, no, you don't &quot;send a message to a knife to cut&quot;. YOU cut with the knife. The knife isn't an actor here. You are and only you. But if you had a household of service robots you would send messages to them since they are actors that &quot;know&quot; how to carry out their own actions. &quot;Daneel, cut the bread.&quot; is a message. The robot knows how to cut, but Charlee might cut differently (say with a laser). Here you use messages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately you want to be able to think in a language. If you use misleading terminology (leading you to think that you have more &quot;control&quot; than you really do), then you will just confuse yourself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a specific example. Suppose you have a Set (with A, B, and I) taken from above. Now you iterate over the set and send &quot;mumble(t)&quot; to each element. Different things happen and the text of the program doesn't tell you what will happen other than that it is &lt;em&gt;some&lt;/em&gt; implementation of a method defined in I - not the explicit method. The objects are in control. The receiver of a message, not the sender, is in control. Request a service - send a message. Dispatch is indirect via the object, not direct from the code invoking the service. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-30T00:27:04.457" LastActivityDate="2018-10-30T00:27:04.457" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5134" PostTypeId="1" CreationDate="2018-10-15T21:11:44.783" Score="3" ViewCount="235" Body="&lt;p&gt;I'm thinking about an assignment based around the game 2048. This would be towards the end of a &lt;em&gt;first&lt;/em&gt; programming course at the &lt;em&gt;university&lt;/em&gt; level and assumes the students have been introduced to at least two dimensional arrays, loops, conditionals and methods. The purpose is to have the students practice these skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would represent the &lt;code&gt;board&lt;/code&gt; as a two dimensional array of &lt;code&gt;int&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would require a method (e.g. &lt;code&gt;merge(int[] row)&lt;/code&gt;) which does the work on an individual row of the puzzle when the move is to slide left. The idea is to encapsulate the work of a slide in a single, testable method. &lt;em&gt;This also emphasizes that a two dimensional array is an array of array, and that one can work on a single row at a time.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are your opinions on the following ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Should a single move in the game be implemented as (&lt;code&gt;move(direction)&lt;/code&gt;) or as individual methods (&lt;code&gt;up() down() left() right()&lt;/code&gt;)?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;One idea for completing the game involves rotating the board by multiples of 90 degrees. Then a move can be implemented as a three step process:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Rotate board to one orientation&lt;/li&gt;&#xA;&lt;li&gt;Slide all rows left (&lt;code&gt;merge(board[row])&lt;/code&gt; for each &lt;code&gt;row&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Rotate board back to original orientation&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Another idea is to show them that move right can be implemented by the process&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;reverse a row&lt;/li&gt;&#xA;&lt;li&gt;slide it left (&lt;code&gt;merge(board[row]&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;reverse the row again&lt;/li&gt;&#xA;&lt;li&gt;For columns, copy the values from a column into a one dimensional temp array, then perform the &lt;code&gt;merge(temp)&lt;/code&gt; and then copy back to the board. This may also require reverses, depending on the up/down selection.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Require a method to produce a list of empty cells for use in picking the location of the next &quot;insertion&quot;. This could be a list of &lt;code&gt;int&lt;/code&gt; to demonstrate how a single index can map to a row/col using &lt;code&gt;div&lt;/code&gt; and &lt;code&gt;mod&lt;/code&gt; operations. Alternatively, it could be a list of &lt;code&gt;pairs&lt;/code&gt; of row/column.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The last wrinkle is to decide what to actually stored in each board location. The simple answer is just the value. However, an interesting variation might be to store the &lt;code&gt;log2&lt;/code&gt; of the value. By doing this, you get an index that can be used to select, for example, the background color of each square of the board. This changes the logic of &lt;code&gt;merge()&lt;/code&gt;, so that&#xA;combining adjacent cells ups the value by 1, rather than adding two values together.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Am I trying to put too many different concepts into this assignment? Your opinions and suggestions are appreciated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="104" LastEditDate="2018-10-18T01:19:17.167" LastActivityDate="2018-10-24T12:44:18.857" Title="Project based on game 2048" Tags="|java|undergraduate|project|algorithms|data-structure|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5135" PostTypeId="1" CreationDate="2018-10-16T04:42:58.207" Score="1" ViewCount="364" Body="&lt;p&gt;For a beginner who wants to walk down the path of programming and developing and etc. &lt;strong&gt;What is a &lt;em&gt;brief&lt;/em&gt; explanation of the differences of the two&lt;/strong&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify, Computer science is CS while software or computer engineering is IT what is the simple difference between IT and CS? Thank you&lt;/p&gt;&#xA;" OwnerUserId="6062" LastEditorUserId="41" LastEditDate="2018-10-18T07:55:32.220" LastActivityDate="2018-10-19T18:40:36.663" Title="What is the difference between computer science and computer engineering in brief" Tags="|computer-history|programming|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5136" PostTypeId="2" ParentId="5135" CreationDate="2018-10-16T13:31:53.433" Score="6" Body="&lt;p&gt;I think you're still slightly confused yourself, actually.  All of the fields below have a great deal of overlap because they are in similar parts of the world&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Computer Science&lt;/strong&gt;: Computer Science is the broad study of computational systems, which can be a little frustrating, because people often use the term to describe some specific subset.  If you major in &quot;computer science&quot; at a university, it is not at all clear what you will be studying after a few intro courses until you inspect the curriculum. It is perfectly possible to get a CS degree without studying almost any content from the other fields outlined below. However, &lt;em&gt;all of those terms&lt;/em&gt; could possibly be called &quot;computer science&quot; depending on the context.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I (and some others) hold that Computer Science is purely the branch of mathematics that deals with computation. Some people try to keep things less ambiguous by adding the word &lt;em&gt;theoretical&lt;/em&gt; before CS to indicate the mathematical field, but this is not always the case. (Take a look at the &lt;a href=&quot;http://cs.stackexchange.com&quot;&gt;Computer Science Stackexchange&lt;/a&gt; to get a sense of what I would term &quot;CS&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Software Engineering&lt;/strong&gt;: The art and science of creating good software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Information Technology&lt;/strong&gt;: The field concerned with the hardware and software infrastructure that manages networks and data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Computer Engineering&lt;/strong&gt;: a field that mixes Electrical Engineering with Software Engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Mechatronics&lt;/strong&gt;: a field that combines Computer Engineering with mechanical engineering.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-10-19T18:40:36.663" LastActivityDate="2018-10-19T18:40:36.663" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5137" PostTypeId="2" ParentId="5128" CreationDate="2018-10-16T13:39:46.870" Score="1" Body="&lt;p&gt;This is only a partial answer, and it is aiming at doing something very practical in your classroom right away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I rather liked the old GridWorld case study from AP Computer Science for this, as there were various sorts of &lt;code&gt;Actor&lt;/code&gt;s, all of whom had their own &lt;code&gt;act()&lt;/code&gt; method.  (This is also the approach used in GreenFoot.)  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It allowed you to create an &lt;code&gt;ArrayList&amp;lt;Actor&amp;gt;&lt;/code&gt; and add many different Actors.  &lt;code&gt;Rock&lt;/code&gt;s, &lt;code&gt;Flower&lt;/code&gt;s, &lt;code&gt;Critter&lt;/code&gt;s, etc, and then loop through your list and just run &lt;code&gt;act()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can quickly imitate, in a very silly way, something similar using an &lt;code&gt;ArrayList&lt;/code&gt;.  The code is ridiculous, but in terms of exploring the simple nuts-and-bolts of upcasting, downcasting, type, and polymorphism, it's actually a great example.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact that it works at all already gives students an immediate sense of what is happening.  I'd present them with the code, and ask them to predict what it will do.  Then run it a few times, and begin to ask them questions like, &quot;Why does this work at all?&quot; And &quot;Could I call &lt;code&gt;.length()&lt;/code&gt; on the items in &lt;code&gt;silliness&lt;/code&gt;? Why or why not?&quot; And &quot;Given the code you're seeing here, could you imagine a legitimate reason to group different sorts of Objects together?&quot;  And &quot;Why do the Objects all print different things to the screen, even though silliness only thinks that they are &lt;em&gt;Objects&lt;/em&gt;, not Strings or arrays or whatever?&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ArrayList&amp;lt;Object&amp;gt; silliness = new  ArrayList&amp;lt;Object&amp;gt;();&#xA;for (int i = 0; i &amp;lt; 10; i++)&#xA;    silliness.add(nextObject());&#xA;for (Object mystery : silliness)&#xA;    System.out.println(mystery);&#xA;&#xA;// . .. . . . elsewhere...&#xA;&#xA;public Object nextObject(){&#xA;    Random rand = new Random();&#xA;    int randomNum = rand.nextInt(4);&#xA;    if(randomNum == 0)&#xA;        return new int[10];&#xA;    else if(randomNum == 1)&#xA;        return new String(&quot;Silly String!&quot;);&#xA;    else if(randomNum == 2)&#xA;        return new ArrayList&amp;lt;Integer&amp;gt;();&#xA;    else&#xA;        return new Integer(31415);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This code, as ridiculous as it is, gives a nice, simple touch-point in your discussions with students throughout the unit that can help them make sense of the polymorphic behaviors.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-10-16T13:39:46.870" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5138" PostTypeId="2" ParentId="5134" CreationDate="2018-10-16T17:07:37.117" Score="1" Body="&lt;p&gt;First of all, it seems like rather nice bones of a 2-dimensional array lab. It does not strike me as being too many things at all.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The interface is cleaner with &lt;code&gt;move(direction)&lt;/code&gt;, but the internal logic is cleaner divided into methods.  Why not the best of both words?  Provide them with starter code that will utilize private methods:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;public void move(direction){&#xA;  switch(direction){&#xA;    case UP:&#xA;       slideUp();&#xA;    case DOWN:&#xA;       slideDown();&#xA;   case LEFT:&#xA;       slideLeft();&#xA;   case RIGHT:&#xA;       slideRight();&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;That is another way, also valid.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It seems excessively finicky to require implementation details down to this level.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once again, I would provide the interface, but not these sorts of implementation details.  You can provide both ways as suggestions, but leave it up to them.  They may also choose a third option that you have not mentioned.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;This fits very nicely if you are providing some sort of GUI starter code, which would justify an implementation detail like this one.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-10-24T12:44:18.857" LastActivityDate="2018-10-24T12:44:18.857" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5140" PostTypeId="2" ParentId="5128" CreationDate="2018-10-16T23:40:56.357" Score="0" Body="&lt;p&gt;There is yet another flaw indicated in the code as presented, but it is of a different kind, so I've separated this out into a separate answer. One of the principles of good OO design is called &quot;Tell, don't Ask&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What this means is that whenever possible, we should tell an object to do something to advance our computation rather than asking it for the information we need in order to advance that computation elsewhere. Generally, void methods are of the &lt;em&gt;tell&lt;/em&gt; variety, and others are of the &lt;em&gt;ask&lt;/em&gt; kind. In the sample code, the drive method tells a Vehicle to do something. This is fine. What it does is determined by its own class and by arguments in the method (here none). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the &lt;em&gt;honkHorn&lt;/em&gt; method doesn't tell a Bicycle to honk its horn. It asks for a piece of information (a String) that might be used elsewhere in the program to indicate the sound of a program. The Bicycle, itself, does no honking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do this sort of thing a lot - gather information from objects and act on that information - what it means is that the actual behavior of the program is distributed around the program, where it can be harder to maintain than if it is localized within the objects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not every program can avoid such accessor methods altogether (nor should that be a goal for most programs), but, when you consider adding an accessor to a class, try to decide if the locus of the action shouldn't better be within the object itself, rather than somewhere, maybe not yet determined, else in the program. Tell the objects to do your bidding. Don't just treat them as convenient data stores with the logic elsewhere. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-10-17T13:51:16.297" LastActivityDate="2018-10-17T13:51:16.297" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5141" PostTypeId="2" ParentId="5134" CreationDate="2018-10-17T00:06:57.243" Score="0" Body="&lt;p&gt;This will be mostly just caveats and things to think about. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One problem you will have is that the original code and some other versions are all online as open source. It will be hard to keep your students &quot;in the dark&quot; so that they can grow themselves (mushroom principle of education, I guess). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, for a 4 by 4 square array, the standard array operations (scanning, collecting, ...) using loops are a bit inefficient. For example, your rotate method for an array can be done with about 20 assignments, just keeping track of subscripts. That might be a very valuable exercise in itself, of course. But loop overhead in such a small array starts to overwhelm the operations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, I haven't thought in detail about this yet, but you might want to consider a program that uses more space than the minimum, keeping, for example, two versions of the matrix simultaneously, with one rotated 90 degrees from the other. This will achieve adjacency of both rows (in one copy) and columns (in the other). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An object based version might also be possible, so that the &quot;cells&quot; of the matrix can be simultaneously row and column adjacent. This might move some of the logic into those cell objects as well. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-17T00:06:57.243" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5143" PostTypeId="1" AcceptedAnswerId="5165" CreationDate="2018-10-18T21:59:10.767" Score="5" ViewCount="682" Body="&lt;p&gt;I am a computer engineer, and I’m teaching computer sciences one hour per week to a student who failed her second-year university degree. She needed some help to have a better understanding of programming, and increase her grade in this field. Computer science is not the main subject of her degree which is based on maths and physics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I asked her if she wanted to emphasise on a difficult subject for her, or if I should start from scratch and explain programming as if it was totally new for her. She chose the second solution, so I started to explain her the base of programming, binary, variables, functions, conditional statements, loops. And now I emphasis on the most common data structure ever, the array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach her how to use an array, manipulate its element, etc...&#xA;As she had to use programming to solve problems of graph theory, physics measurements, and mathematical algorithms which use a lot of matrices and arrays, I spend about six hours to make her be more familiar with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I simplified it to make her use one-dimensional arrays with a simple algorithm, and she just told me that she can’t understand how arrays will be of any use for her, for her everyday life. She aims to get job in the field of statistics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explained to her, that she uses array everyday without thinking about it. For example when you log in a website, there’s somewhere an array (or an object) which stores your username, password, email, and compares it to what is stored in a database. But she didn’t feel very enthusiastic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So  I can understand that not everybody enjoys programming, and as I am not a statistician I can’t really tell her about how useful this can be for a statistician.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to actually make her change her mind about programming or show her the use of it for a statistician ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;I work as Web developper so I am not used to statistics. I can't think about useful example or exercise to show her the usage of arrays in statistics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&#xA;She already saw by herself that was I taugh her about arrays is usefull in various situation. She saw that know, as she understood arrays, she can now solve problems she wasn't able to solve before.&lt;/p&gt;&#xA;" OwnerUserId="6077" OwnerDisplayName="Med" LastEditorUserId="6077" LastEditDate="2018-11-12T09:18:36.070" LastActivityDate="2018-11-12T09:18:36.070" Title="Explaining why arrays are important for statisticians" Tags="|student-motivation|python|struggling-students|" AnswerCount="8" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5144" PostTypeId="2" ParentId="5143" CreationDate="2018-10-19T18:20:03.907" Score="2" Body="&lt;p&gt;So these are two different questions. To show her how important arrays are compared to for example lists you could use a metaphor like a book. &#xA;If you want to find page 831 with a list you need to look at every single page before that. With an array you just jump to page 831 which is a lot faster. &#xA;In the future she will work with big chunks of data. This means she has to be efficient. Arrays are the way to achieve it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second part why programming is important. You could ask people who already work in the industry to give you day to day tasks they have to deal with and show her this way that if she works in this field she will use programming a lot. From my experience people who work in statistics are always happy to help people who are interested in there work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also it is important to remember that a company will choose someone with coding experience if they have the same qualifications otherwise. &lt;/p&gt;&#xA;" OwnerUserId="6075" LastActivityDate="2018-10-19T18:20:03.907" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5145" PostTypeId="2" ParentId="5143" CreationDate="2018-10-19T18:27:54.167" Score="1" Body="&lt;p&gt;In statistics you deal with possibly large sets of data. Sometimes you need all of the data available at once for some sort of processing. Arrays are helpful for this. Sometimes you need to sort the data. Again, arrays can be helpful, as can binary trees. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finding the median of a set of values is interesting. Initially it sounds like it is a sorting problem, but it is a bit more subtle than that. But arrays are still useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lists, by the way, which are similar to arrays in some ways, are possibly even more fundamental. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some things are worth studying for no other reason than that they help you expand your mental facilities. Studying things somewhat on the periphery of your main interest can help you, potentially, in that main line study. Programming is like that for statistics, as is mathematics in general. When you learn things you generally increase your potential for learning other things. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-19T18:27:54.167" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5146" PostTypeId="2" ParentId="5143" CreationDate="2018-10-19T19:06:42.497" Score="8" Body="&lt;p&gt;If you are tutoring her, it is wonderful that you are trying to motivate the material in a practical way, but don't beat yourself up too much if you aren't that successful at persuading her. Some people just get themselves into a sort of myopic headspace where the only things that they need to learn are the exact operations that they will perform later on in their life.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it has been my experience that there is often something else going on in these situations. People aren't creating these excuses because of what will be practical in the future. They have no idea what the future holds. They actually create these utilitarian excuses simply because they don't find the topic &lt;em&gt;intrinsically fun&lt;/em&gt; yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This also explains why you make no headway when you show her the utilitarian benefits; they aren't truly what is preventing her from diving in. Your best bet, then, is to show her why you think this whole field is amazing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if all else fails, go back to a utilitarian approach, but stick to the most direct reason: she needs this so that she will pass her class next semester.  That was a strong enough motivation for her to meet with you in the first place, so it should work out well enough to at least get you through the lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-10-19T19:06:42.497" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5147" PostTypeId="2" ParentId="5102" CreationDate="2018-10-19T22:04:12.817" Score="2" Body="&lt;p&gt;I have tried using two platforms designed for gamification: Classcraft and Coursemology. Classcraft is more general, and applicable to a younger audience (middle school) while Coursemology looks more like a traditional LMS. Coursemology also is designed to be used for CS courses as assignments and &quot;missions&quot; can include programming tasks with public/private unit tests applied. There is grading within the LMS as well as points. The points are what is public - although it can be set so the point totals only are public, not student names themselves (ie students know their comparative rank.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used Coursemology in 4 sections of a first year highschool CS course using Python. Each section was generally around 25 students. Here were my observations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;At first, students jokingly almost mocked the ladder. Like they were pretending not to care. But they kept talking about it. Then they stopped talking about it - and they started seeking out the extra tasks that would give them more points&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It did not motivate the laggards. Once a student fell a but behind, it was difficult to motivate them.  Now, this is true in any classroom. If a student falls behind early, it may be challenging to convince them that they can still succeed. It may be more difficult to convince that same student if they see that they are 30k points behind.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's difficult to know how the average student  improved as a result.  I have no data on grades, or comparison in say exam results.  One of the things that was different was that I was using more, small challenges using the autograder.  Students seemed to do better, but they were getting some feedback more regularly.  So the gamification seemed to help a bit, but if you are using autograded small challenges in addition to larger assignments, then maybe there is little benefit to be had in adding gamification.  That said, in my opinion, gamifying a course can cause an instructor to rethink how their course works in other ways. Using more, smaller challenges leading to sporadic larger challenges (think level bosses), and requiring points to reach new levels to get new content can create individualized paths.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All that said, I did a very poor job totally resigning the course completely to leverage the gamification elements. I was learning the LMS, making up challenges, and guessing at point value as I went along.  That's not a recipe for a sensational implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, don't gamify a course unless you want students to game it.  That's not a big concern, since students already game courses.  They look for loopholes to gain maximum marks with minimal effort.  But be prepared for students looking to simply get points.  I would like to go back to gamification, but only under a couple stipulations.  The LMS for tracking points makes it easy to still use pair programming challenges.  Also easy to add points for things like collaboration skills, communication, and even simple things like demonstrating a design stage before implementation.  **In general, I think the real value is in gamification the &lt;em&gt;process&lt;/em&gt; of being a student, not simply the products. ** Perhaps that's easily done by adding more badges.&lt;/p&gt;&#xA;" OwnerUserId="695" LastActivityDate="2018-10-19T22:04:12.817" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5149" PostTypeId="2" ParentId="5143" CreationDate="2018-10-23T00:44:42.940" Score="3" Body="&lt;p&gt;Arrays are like dressers: they allow you to organize a collection of objects and store them in a single place.  A dataset in stat should be seen as an array of results (numbers, vectors, etc.).  The array object is provided with a nice array of methods for searching itself, inserting items, and and for item access.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-10-23T00:44:42.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5150" PostTypeId="2" ParentId="5110" CreationDate="2018-10-23T00:58:12.737" Score="6" Body="&lt;p&gt;Imagine two guys at a door. Each says, &quot;No, you go first.&quot;  Result: deadlock.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-10-23T00:58:12.737" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5151" PostTypeId="1" CreationDate="2018-10-23T07:32:02.037" Score="4" ViewCount="223" Body="&lt;p&gt;I was asked to teach Javascript to total beginners. Since it would most likely be free of charge, I would rather not spend time making my own slides and material. I would follow a book or some other existing material, draw things on whiteboard for further clarification, do simple quizzes, and focus on helping students actually code stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally this book or material would:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Cover Javascript but also HTML and CSS basics&lt;/li&gt;&#xA;&lt;li&gt;Have some quizzes&lt;/li&gt;&#xA;&lt;li&gt;Be interesting for beginners&lt;/li&gt;&#xA;&lt;li&gt;Be more modern JS oriented&lt;/li&gt;&#xA;&lt;li&gt;Also touch upon NodeJS with some command line and server development&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6090" LastEditorUserId="150" LastEditDate="2018-10-23T08:52:46.400" LastActivityDate="2018-12-13T13:27:40.770" Title="Beginner Javascript course - recommended books" Tags="|resource-request|javascript|html|css|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5152" PostTypeId="2" ParentId="5143" CreationDate="2018-10-23T19:09:39.340" Score="6" Body="&lt;p&gt;Have you tried a simple statistics formula such as &lt;span class=&quot;math-container&quot;&gt;$$mean = \left(\sum_{i=1}^{n} x_i\right) / n$$&lt;/span&gt; This maps exactly to array notation. Explain that the array &lt;code&gt;x&lt;/code&gt; refers to the entire set of values and that &lt;code&gt;x[i]&lt;/code&gt; refers to a single element in the set. Then show a simple loop that performs the computation.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="3842" LastEditDate="2018-11-06T20:24:31.200" LastActivityDate="2018-11-06T20:24:31.200" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5153" PostTypeId="2" ParentId="5110" CreationDate="2018-10-24T00:59:18.353" Score="2" Body="&lt;p&gt;When there is a slide in the playground where many children want to slide, they need to queue and each one needs to check if the slide is free (i.e. if the previous child got up from the bottom of the slide) before going down. If they don't check it, they may run into one another and hurt themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is what happened to your programs* - some where playing carelessly, and caused accidents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you gave own slide to each of the programs, so that they can play safely, even if they want to slide simultaneously!&#xA;&lt;a href=&quot;https://i.stack.imgur.com/MuYCD.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/MuYCD.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use aquapark water slides instead if you think that the normal ones are not convincingly dangerous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;* Perhaps these where threads, but I don't think the distinction is important. Better to keep one term.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2018-10-24T00:59:18.353" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5155" PostTypeId="2" ParentId="3859" CreationDate="2018-10-26T14:50:42.240" Score="1" Body="&lt;p&gt;I'm using many examples involving trees (height of a tree, number of leaves, ...) or graphs (number of edges in a fully connected graph, ...). The advantage is that if I force students to draw the first three or four steps, they are usually capable of deriving the equation by themselves. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-26T14:50:42.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5156" PostTypeId="1" AcceptedAnswerId="5158" CreationDate="2018-10-26T18:23:09.707" Score="-1" ViewCount="86" Body="&lt;p&gt;What are macros in programming language ? And we use these macros and for which perpose.I saw a YouTube video and also read from a link but am cofused about why we use them.&lt;/p&gt;&#xA;" OwnerUserId="6071" LastEditorUserId="6071" LastEditDate="2018-10-26T19:40:01.807" LastActivityDate="2018-10-26T20:18:31.747" Title="What are Macros in programming language am little bit confuse . why we use them for which perpose?" Tags="|functional-programming|programming-paradigms|programming-environment|" AnswerCount="1" CommentCount="2" ClosedDate="2018-10-27T02:25:48.870" ContentLicense="CC BY-SA 4.0" />
  <row Id="5157" PostTypeId="1" AcceptedAnswerId="5162" CreationDate="2018-10-26T18:59:27.850" Score="9" ViewCount="407" Body="&lt;p&gt;I have a group of students with a very shaky understanding of functions and their purpose (encapsulation, reuse, modularization). The assignments I give them require them to write simple functions that return boolean T/F, an integer or a simple Python object (str, list, etc.), then have the caller use the returned value in a print statement. Their programs are written in Python and run from the Windows command line.&#xA;The problem is that from the command line, the programs work but if you look inside it's a mess. The functions ignore the parameters to reach into the main for global variables (misunderstand the idea of parameter passing), the input validity checking is done in the caller (defeating the idea of encapsulation, e.g is day of month valid for a given month), or the function prints the result without returning anything. The worst that I get is the function does all the work of the main and of the function, for example when asking for a simple function to add 1 to its argument, I get:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def add1(x):&#xA;    myval = int(input(&quot;Number?&quot;))&#xA;    print(myval+1)&#xA;&#xA;add1(x)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;...which of course is nonsense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's my question... Can I craft an exercise that calls a simple function like add1() that would give a dramatically wrong output, e.g. cause the screen to &quot;blow&quot; up if the function printed instead of returned, or stalled if it kept asking for input. I'm thinking of something that reads a large file of text or numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are at the community college level and are not programmers -- they are in electronics technology (and some are convinced that there is no software involved in electronics). I use Python but this is (mostly) language independent (I see the same shaky understanding with C++ functions in the Arduino world in another course).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&#xA; --Louis&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2020-11-01T13:31:59.340" Title="Exercise or example to reinforce idea of functions?" Tags="|best-practice|teaching-analogy|exercises|" AnswerCount="8" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5158" PostTypeId="2" ParentId="5156" CreationDate="2018-10-26T20:18:31.747" Score="3" Body="&lt;p&gt;What macro are, and how the work, changes from language to language. That said, they are very generally a way to reuse code, often by doing searches and replacements within the code before it gets compiled or interpreted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in C and C++ you could type:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;string&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which is a macro asking for the entire contents of the file &quot;string&quot; to be placed where the #include instruction line is. That makes the code in that file available to the code in the file the programmer is writing, all with only one instruction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes macros can also be used to make code easier to read or understand by either changing the name of something or by changing how certain code looks in specific situations. Macros can also be used to ensure code for some regularly occurring or complex task gets written properly.&lt;/p&gt;&#xA;" OwnerUserId="6113" LastActivityDate="2018-10-26T20:18:31.747" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5159" PostTypeId="2" ParentId="5157" CreationDate="2018-10-26T20:21:58.767" Score="0" Body="&lt;p&gt;You can call the function using the &lt;a href=&quot;https://docs.python.org/3/library/unittest.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;python unit test framework&lt;/a&gt; and run different tests against it. Simple print-statements and other things will most probably no longer work.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-26T20:21:58.767" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5160" PostTypeId="1" AcceptedAnswerId="5161" CreationDate="2018-10-26T20:34:42.677" Score="-1" ViewCount="184" Body="&lt;p&gt;Arrays start from 0 then 1,2... But why are indexes positive, why are indexes not negative? &lt;/p&gt;&#xA;" OwnerUserId="6071" LastEditorUserId="6109" LastEditDate="2018-10-28T14:57:02.463" LastActivityDate="2019-06-09T12:55:19.053" Title="Why does array index not start from -1 why have indexes to be positive?" Tags="|arrays|" AnswerCount="1" CommentCount="10" ClosedDate="2018-10-28T18:20:39.007" ContentLicense="CC BY-SA 4.0" />
  <row Id="5161" PostTypeId="2" ParentId="5160" CreationDate="2018-10-26T20:51:03.907" Score="4" Body="&lt;p&gt;You are starting with a base memory address and you are adding an offset having the size of one array element for each following element. This makes address calculation very easy (base address + n * size of data structure). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Negative indexes are not allowed because you would refer to the memory address in front of your base address, which means you might destroy other variables content.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastEditorUserId="204" LastEditDate="2019-06-09T12:55:19.053" LastActivityDate="2019-06-09T12:55:19.053" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5162" PostTypeId="2" ParentId="5157" CreationDate="2018-10-27T00:53:37.363" Score="7" Body="&lt;p&gt;Instead of an example, use a metaphor. Get yourself a frisbee - ultimate disk and two packs of sticky notes. You are the caller of a function. Another person is the function itself. Write a value on the sticky note and stick it to the frisbee. The &lt;em&gt;pass&lt;/em&gt; it to the function (person). The person catches the disk, and replaces the stick note with a new one with a new computed &lt;em&gt;function&lt;/em&gt; value. They then &lt;em&gt;return&lt;/em&gt; the disk to you. You get the computed value and announce it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without the return value you get nothing. You can use any function you like but zero or one arguments is the easiest to manage.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A slightly more sophisticated version can be used to discuss pass by value and pass by reference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to Mike Clancy of UCBerkeley. It is a classic from many years ago. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-10-27T00:53:37.363" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5163" PostTypeId="2" ParentId="5157" CreationDate="2018-10-27T14:35:36.690" Score="7" Body="&lt;p&gt;I saw the light at the end of the fiber optic cable as soon as you said that these are students of electronics. There is nothing more modular and encapsulated than that! Software is simply electronics without the hardware part. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you said to them, &quot;What are the building blocks of a simple AM radio receiver?&quot; they would (hopefully) reply something like: antenna, tuning, rectification, filter, audio output... A crystal radio has all of those. They already know that it is pointless to build the antenna in to the filter, or duplicate the tuning parts more than once. They know that they can work in teams to produce parts that fit together to make a complete radio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So speak to them in a language they already know: the functional relationship of parts and wholes. Using globals instead of parameters would be like having extra cables going outside the radio to connect different parts of it to the signal path or the power supply. Can you say &quot;Rube Goldberg&quot;? I knew you could. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Man, let me teach them. I have been studying electronics on my own since before anyone I knew even had seen a computer. Electronics students should be the easiest audience in the world to teach programming to. Use examples they already know.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2018-10-27T14:35:36.690" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5165" PostTypeId="2" ParentId="5143" CreationDate="2018-10-29T14:26:43.007" Score="3" Body="&lt;p&gt;Try to let her model a questionaire and aswers from different people. Ask her how she would organize the data on a sheet of paper. Let her do so for &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;one questionaire filled in by one person&lt;/li&gt;&#xA;&lt;li&gt;question 1 (e.g. &quot;your age&quot;) for all questionaires&lt;/li&gt;&#xA;&lt;li&gt;all questions for all questionaires&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This should result in two 1d-arrays (and bring up the topic of data types, lists can be a solution) and one 2d-array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Those data representations are quite common in statistics, based on those you can e.g. calculate the median, standard deviation, min, max, ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are using a language with an simple interface to gnuplot (like python and mathplolib), you can easily visualize array contents using box plots, scatter plots, etc. This is a direct link to statistics. It is simple to copy-paste example and adapt code from the tutorials, so even a beginner can have nice visual results.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-29T14:26:43.007" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5166" PostTypeId="2" ParentId="5091" CreationDate="2018-10-29T14:49:14.060" Score="0" Body="&lt;p&gt;This answer is just to add an aspect to the existing answers:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't blame the code given too much: It is a very good example if you want to explain how the python interpreter actually works! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could show the code and ask the students, whether &lt;code&gt;name&lt;/code&gt; really is available in &lt;code&gt;greeting()&lt;/code&gt; since &lt;code&gt;greeting&lt;/code&gt; is defined at a point in time where the interpreter does no know anything abount &lt;code&gt;name&lt;/code&gt;. Then show a step-by-step walkthrough in a visual debugger. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Afterwards, you can explain why this is a really bad idea, e.g. by using different functions asking for names etc. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-29T14:49:14.060" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5167" PostTypeId="2" ParentId="5086" CreationDate="2018-10-29T14:57:41.470" Score="1" Body="&lt;p&gt;The only way is to make the unpopular popular! Give your students the right motivation to learn things - but be careful about &quot;important&quot; legacy technology. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you are teaching, focus on the core concepts - those are similar for many languages or topics. COBOL might be outdated, the concepts behind are not. When the students understand the concepts of imperative, procedural languages, it will take them a week to learn COBOL when needed - but I would never ever teach it! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For other unpopular things like standards etc.: Focus on the most important topics and throw the students into real world problems so they understand why they are needed. Most or our students hate QU topics, but when they are returning from their internships at larger companies, they understood that those topics are crucial. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-29T14:57:41.470" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5168" PostTypeId="2" ParentId="5071" CreationDate="2018-10-29T15:06:39.757" Score="5" Body="&lt;p&gt;Maybe it is a bit overkill, but I'm teaching python and C in parallel to CS beginners. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The languages are syntactically similar enough to lower the burden of learning two languages, but the students understand the &quot;problem&quot; of typing and get a better idea of what is happening in behind in python. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fun fact: In the beginning, all like Python, because it requires no typing. At week three, all love C because it is clearer. In week 6, we are having two fractions in the course, one loving C, the other loving python (or hating C / python ;-) ). The students preferences are changing quite often during this course and this gives me a lot good teaching opportunities. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-29T15:06:39.757" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5169" PostTypeId="2" ParentId="5012" CreationDate="2018-10-29T15:27:22.223" Score="2" Body="&lt;p&gt;My five year old had really fun with &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.google.com/doodles/celebrating-50-years-of-kids-coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.google.com/doodles/celebrating-50-years-of-kids-coding&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;and even scratch was fun to her, even though she was not able to read at that point in time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rot13 might be nice as well (secret languages are great to kids), and if you are having more time, you could try to play &lt;a href=&quot;https://en.wikipedia.org/wiki/RoboRally&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Robo Rally&quot;&gt;https://en.wikipedia.org/wiki/RoboRally&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-10-29T15:27:22.223" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5170" PostTypeId="2" ParentId="5071" CreationDate="2018-10-29T22:27:37.173" Score="0" Body="&lt;p&gt;Perhaps in the example code that you show them, introduce them to Python 3 Type Hints (PEP 484 -- Type Hints &lt;a href=&quot;https://www.python.org/dev/peps/pep-0484/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.python.org/dev/peps/pep-0484/&lt;/a&gt; ). It's a bit of a kludge because the typing is still dynamic, but it at least shows that we care about the arguments and return values.&#xA;It looks like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;def greeting(name: str) -&amp;gt; str:&#xA;    return 'Hello ' + name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2018-10-29T22:27:37.173" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5172" PostTypeId="2" ParentId="5128" CreationDate="2018-10-31T15:55:29.767" Score="1" Body="&lt;p&gt;This discussion of the design of the code is a worthwhile one to have. However, regardless of ones opinion, one is likely to encounter code which follows this pattern. Therefore, it is important to understand what is happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The line &lt;code&gt;Vehicle v = b;&lt;/code&gt; is giving an alternate name to the &lt;strong&gt;same&lt;/strong&gt; object. Additionally, it is saying &lt;em&gt;&quot;v, you are a bicycle, but I am going to treat you as an ordinary vehicle. I will ignore anything special about you.&quot;&lt;/em&gt; As a result, any method of &lt;code&gt;Vehicle&lt;/code&gt; that &lt;code&gt;Bicycle&lt;/code&gt; overrides will be honored. However, I will not call any of your &lt;code&gt;special&lt;/code&gt; methods. The compiler enforces this by generating the error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is exactly what happens when you declare the type of a variable to be an &lt;code&gt;interface&lt;/code&gt;. You are promising only to invoke the methods defined by that &lt;code&gt;interface&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2018-10-31T15:55:29.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5173" PostTypeId="2" ParentId="5128" CreationDate="2018-10-31T17:49:09.620" Score="1" Body="&lt;p&gt;I'm not so surprised that people struggle with something like &lt;code&gt;Bicycle b = new Bicycle(); Vehicle v = b;&lt;/code&gt;. It is not a very practical example, and it doesn't really dictate what behavior you would expect. What about using more realistic and practical example(s)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can use some examples from &lt;a href=&quot;https://cseducators.stackexchange.com/q/4689/4884&quot;&gt;this question&lt;/a&gt;. &lt;a href=&quot;https://cseducators.stackexchange.com/a/4702/4884&quot;&gt;My answer there&lt;/a&gt; describes implementation of arithmetic expressions. This was one of the examples used in my Object Programming course, and I think it's an excellent one (I list its advantages in the answer). Of course Java implementation would look differently and would use actual inheritance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that basics of inheritance and methods dispatch are actually very simple and intuitive (if you have a Bicycle, why would you expect to &lt;em&gt;not&lt;/em&gt; behave like a bicycle?), but not very easy to describe in words, or on abstract examples. My general idea is that you should first build the expectations for a mechanism that behaves in particular way, and then present inheritance as fulfillment of this expectation. In other words, you first build the mental model, and only then give it a name. Otherwise you risk that people will first create wrong mental model that will be hard to fix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One approach would be to actually implement these arithmetic expressions using one class with enum type tag and switch statements or ifs. It is easily demonstrable, that this approach is pretty inflexible (and rather ugly), and that it would be useful to give it a structure in which method implementations are grouped by behavior. I believe at this point explaining interfaces/inheritance should be easier, as you have a tangible problem which they solve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I don't have any measurable experience in using this approach, but I think I have seen it working (while studying myself).&lt;/p&gt;&#xA;" OwnerUserId="4884" LastActivityDate="2018-10-31T17:49:09.620" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5174" PostTypeId="2" ParentId="5143" CreationDate="2018-11-01T04:24:55.053" Score="5" Body="&lt;p&gt;I had a student some time back who also really struggled with concepts like this, but who was interested in research in psychology which for her was largely about statistics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Statistical data is nothing but arrays, or perhaps &lt;em&gt;tables&lt;/em&gt;, that is, 2-dimensional arrays. Statisticians conduct trials consisting of &lt;em&gt;observations&lt;/em&gt;. An observation is a simultaneous measurement of some &lt;em&gt;variables&lt;/em&gt;. The numeric (&quot;quantitative&quot;) variables are distinguished from &quot;categorical&quot; variables that assume values in a prescribed finite set. Anyway, the variables typically go across the columns and the observations go down the rows of the table. The R programming language/environment is based entirely on arrays for this reason and many of its most important statistical functions are optimized to work on &quot;columns&quot; of a table: that is, arrays.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would explain to your student how the vast majority of statistical observation is in fact naturally in array form. If she has any spreadsheets to show you you can find many examples of arrays in her data and show how the calculations she has already done to analyze them are in fact array-based calculations as suggested in another answer with means. An array-based language like R, but really any language, will lend itself to some calculations that can be a real pain to do in something like Excel. Find those examples and I think you will have made some progress.&lt;/p&gt;&#xA;" OwnerUserId="6111" LastActivityDate="2018-11-01T04:24:55.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5175" PostTypeId="2" ParentId="5128" CreationDate="2018-11-02T11:52:03.567" Score="0" Body="&lt;p&gt;I notice you expressed your concerns without once using the word 'pointer' (or even 'reference'). This may be a problem. You also talk about v = b meaning &quot;b is stored in v&quot;, but that's not really what this means. It means the pointer &quot;v&quot; gets overwritten by the pointer &quot;b&quot;, which is a pointer to the object &quot;b.&quot; (b-dot). The object doesn't &quot;fit inside&quot; its pointer. I'm nitpicking here because although Java calls its implicit smart pointers 'references', they are pointers and this concept is essential to grasp in understanding their behavior.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Primarily, students need to learn that any non-primitive Java variable, which is a pointer, is a completely different entity from the object it points to. These two things are separate: they're created in separate places in code, they mean very different things when you use them, and they can have different types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually illustrate this by drawing the pointer as a triangle, labeling it with its type above and its variable name (if it isn't anonymous) below. The object I draw as a circle with its type above and its object name (variable-dot) below, and I illustrate the abstract value of the object in the circle.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I have an Set&amp;lt;Integer&gt; pointer called foo, the type of foo is pointer to Set&amp;lt;Integer&gt; (though I'd generally just say that aloud and label it Set&amp;lt;Integer&gt;) and the name of foo is foo. The type of the object might be HashSet&amp;lt;Integer&gt;, and its name would be &quot;foo.&quot; as in &quot;foo-dot&quot;. This is because when you use the dot operator in Java, it automatically gives you the object. Any time you omit the dot you're talking about the pointer, and anytime you use . you're talking about the object. So &quot;foo.&quot; is the literal name of that object (or one literal name, if it has aliases).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Object types must be class types, but the pointer type can be any supertype of the object type because (for example) a HashSet&amp;lt;Integer&gt; is a &lt;em&gt;kind&lt;/em&gt; of Set&amp;lt;Integer&gt;. Thus, it's still type-safe for a pointer of that type to point to an object of that type: HashSet&amp;lt;Integer&gt; must contain all of the methods described in Set&amp;lt;Integer&gt;, so any method we can call on the pointer will have a corresponding body in the object (provided the pointer is not pointing to null).&lt;/p&gt;&#xA;" OwnerUserId="2846" LastActivityDate="2018-11-02T11:52:03.567" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5176" PostTypeId="1" CreationDate="2018-11-02T13:08:59.253" Score="35" ViewCount="4153" Body="&lt;p&gt;I'm teaching some introduction lessons to a classroom of 6-8 year olds about basic 21st century skills. A fundamental part of this is how computers represent numbers, words and images, which all starts with understanding binary representation of a number.&lt;/p&gt;&#xA;&lt;p&gt;When explaining this in the past, I have never not confused anyone with notation. For example trying to explain the difference between '11' (binary) and '11' (decimal) is hopelessly confusing because it looks like the exact same thing, and saying 'one one' almost always leads someone to think 'well one plus one is two, what is this dude going on about it being 3'.&lt;/p&gt;&#xA;&lt;p&gt;I think the problem is that we use the same symbol for decimal and binary notation here, while there is not strictly a reason for it (it's convenient if you already know how it all works, but not before that).&lt;/p&gt;&#xA;&lt;p&gt;So I'm thinking of using different symbols. Like ● for 'this bit is on', and ⊗ for 'this bit is off', so that I would write e.g.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;3 = ●●&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;5 = ●⊗●&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Any ideas on this? Would this help? Are there already other symbols being used for this purpose, symbols that don't rely on the glyphs we use for 0-9?&lt;/p&gt;&#xA;" OwnerUserId="6129" LastEditorUserId="27" LastEditDate="2021-01-26T19:18:53.597" LastActivityDate="2023-01-25T11:43:41.673" Title="Teaching binary to 6-8 year olds" Tags="|introductory-lesson|" AnswerCount="20" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="5177" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T13:48:49.403" Score="10" Body="&lt;p&gt;I was going to start by asking what was wrong with &lt;span class=&quot;math-container&quot;&gt;$11_2$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$11_{10}$&lt;/span&gt;, and then I noticed the ages you were referring to.  Six year olds!  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, a bit of frame-challenging advice: I'm not sure that counting in binary is what I would focus on at that age at all.  You might have better luck with finite state machines, which are great CS concepts that you can play lots of physical games with.  You can put states on the floor and have kids jump around, or you can have kids pass picture-notes to one another based on state and observe the results.  You can even have them try to draw out simple machines by watching behaviors of other kids acting out your &quot;script&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if the goal &lt;em&gt;really is&lt;/em&gt; binary counting at 6-8 years old, I would start with symbols like &quot;•&quot; and &quot;◦&quot;, or even start with symbols like &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;□□    □    &#xA;□□    □    □    L    |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... using &quot;count the lines&quot; as a property, and then extend that to dots, so &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;□□    □    &#xA;□□    □    □    L    |&#xA;•     ◦    •    ◦    •&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... becomes ...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;□□         &#xA;□□         □         |&#xA;•          •         •&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;... becomes 21.  And only when they're familiar with the dots, at the very end of the lesson, I'd get into something &lt;em&gt;very silly&lt;/em&gt; that people do with this system!  They use 1s and 0s for •s and ◦s!  If the kids laugh, then your joke landed, and the kids will be beginning to see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then see if they can connect 10101 with &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;□□         &#xA;□□         □         |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-11-02T13:48:49.403" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5178" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T14:25:49.577" Score="14" Body="&lt;p&gt;Just to calibrate expectations: at the lower end of that age range, the kids will have only just started learning about the place-value system in decimal. I wouldn't try to leverage knowledge of things like &quot;carrying&quot; in decimal over to binary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own kids are at boundaries of your age range, and in first and second grade they use things like &quot;tens frames&quot; and &quot;hundreds frames&quot;. You might consider making twos/fours/eights frames or perhaps better: blocks, &lt;span class=&quot;math-container&quot;&gt;$1\times 2$&lt;/span&gt; joined block pairs, &lt;span class=&quot;math-container&quot;&gt;$2\times 2$&lt;/span&gt; squares of joined blocks, and &lt;span class=&quot;math-container&quot;&gt;$2\times 2\times 2$&lt;/span&gt; cubes of joined blocks. Then show them (or let them explore) how you only ever need at most one of each block type to make a number. Binary then just consists of a table of the number of each block type that you used. &lt;/p&gt;&#xA;" OwnerUserId="1879" LastActivityDate="2018-11-02T14:25:49.577" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5179" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T14:41:51.463" Score="39" Body="&lt;p&gt;Use money.  Tell your students to image a country has bills that are in denominations of powers of 2:  1, 2, 4, 8, 16....  Now tell them this:  For a given number, count out that money with as few bills as possible.  You use a &quot;greedy algorithm:&quot;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use the largest bill possible.&lt;/li&gt;&#xA;&lt;li&gt;Repeat this until you have counted out the amount.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Questions to ask:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Did you ever use more than one bill from any denomination?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They should observe this is never necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now write a 1 for the largest bill.  If the next denomination down is not present, put a 0; otherwise, put a 1.  Repeat until you descend through the denominations.  You have the binary expansion of the integer you specified.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is concrete and very easy for students to grasp.  This &quot;greedy algorithm&quot; works for any base: Use the largest bill you can can count out as many as you can at each stage.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-11-02T14:41:51.463" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5180" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T17:33:35.583" Score="9" Body="&lt;p&gt;We made bracelets in APCS Principles (9th - 12th grade). I bought a bunch of blue and white (school colors) beads. Blue was on, white was off. They then made bracelets of their names or initials using 5 bits. A was 1 (w-w-w-w-b), B was 2 (w-w-w-b-w), etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Kids seemed to enjoy it, and I caught a few wearing their bracelets walking around the halls days later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own kids, 6 and 9, came in after school and saw the beads and wanted to make their own bracelets. By the time they were finished the 9 year old had made 6 or 8 bracelets for different friends and was going to explain how they worked the next day at school.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only thing I'm planning on changing for next year is adding a different bead color to represent the start / end of the string.  &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2018-11-02T17:33:35.583" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5181" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T19:47:31.570" Score="6" Body="&lt;p&gt;Please see the note in the last few paragraphs for an important caveat. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before you get too deep into this, you should look at the work of Piaget. For example: &lt;a href=&quot;http://alumni.media.mit.edu/~stefanm/society/som_final.html&quot; rel=&quot;noreferrer&quot;&gt;http://alumni.media.mit.edu/~stefanm/society/som_final.html&lt;/a&gt;. Note that children of that age have almost no ability to do abstraction and won't for several years. Whatever you do has to be very concrete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a wider discussion, see: &lt;a href=&quot;https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457&quot; rel=&quot;noreferrer&quot;&gt;https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, while symbols can be meaningful to them, they are still likely pre-operational. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You  might also think about contacting a local Montessori school to see what goes on there with students of that age. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note, of course, that the reason that they can't grok using old symbols for new ideas is, precisely, the lack of abstract thinking ability. Catch them again around age 12 or so. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, thinking a bit more on this topic, let me suggest that introducing new symbols might be counterproductive. They may get the idea firmly embedded in their minds that you are teaching them things that are important and should be retained. Then, in junior high or so, they will have to &lt;em&gt;unlearn&lt;/em&gt; what you so carefully taught them. In my view, it is a serious error to teach people things they later need to unlearn/forget/ignore/reject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once had a college student who couldn't grasp the idea of operator precedence. It turns out he was taught the wrong rules in HS and internalized them deeply. He couldn't understand why his Java programs didn't work correctly. His earlier teacher was highly respected so he fought me rather than learn the correct rules. He though I was lying to him that Java performed multiplications before additions rather than strict left to right evaluation of all operators. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm starting to think this may be a minefield best left unexplored. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-11-02T23:09:33.670" LastActivityDate="2018-11-02T23:09:33.670" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5182" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T21:30:42.000" Score="7" Body="&lt;p&gt;Sometimes light bulb on/off symbols are used, and in fact if you show a real circuit with a battery, a switch and a light bulb before you start teaching binary numbers you could explain why the computer needs just two symbols to count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, as a personal recollection, I learned binary on my own thanks to an 80's version of this toy: &lt;a href=&quot;https://www.youtube.com/watch?v=EM_-APWFX2s&quot; rel=&quot;noreferrer&quot;&gt;https://www.youtube.com/watch?v=EM_-APWFX2s&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2018-11-02T21:30:42.000" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5183" PostTypeId="2" ParentId="5176" CreationDate="2018-11-02T22:05:28.717" Score="11" Body="&lt;p&gt;At that age, I would skip binary notation entirely and focus on &lt;strong&gt;combinatorics&lt;/strong&gt; problems (simple ones) whose answers are most clearly understood as combinations of powers of two.&lt;/p&gt;&#xA;&lt;p&gt;Any combinatorics (counting) problem where the full set of answers can be &lt;em&gt;systematically written down by hand,&lt;/em&gt; and then counted, is the most appropriate.  Or if it can be physically constructed, that's even better than being written down.&lt;/p&gt;&#xA;&lt;p&gt;For instance, someone else mentioned colored beads.  That's great.  So get some actual beads, red and green or whatever, just two colors, and sit the student down and ask, &amp;quot;How many &lt;em&gt;different&lt;/em&gt; patterns of three beads in a row can you make with these?&amp;quot;  Of course they'll eventually come up with the answer &amp;quot;8,&amp;quot; but it may take them a while to get there.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;When you consider it in depth, the fundamental reason why binary notation is useful &lt;em&gt;is&lt;/em&gt; because it naturally represents the answers to combinatorics problems involving two possible states.  If our computer systems were to have three possible states rather than two, then ternary notation would be a more natural system for representing computer data.&lt;/p&gt;&#xA;&lt;p&gt;From that standpoint, introducing combinatorics &lt;em&gt;first&lt;/em&gt; before discussing notation is simply a single instance of a more general teaching philosophy I follow: in particular, that the formulas or notations must come &lt;em&gt;after&lt;/em&gt; the underlying &lt;em&gt;reasons&lt;/em&gt; why they're important to know.&lt;/p&gt;&#xA;&lt;p&gt;This principle can be sloppily summarized as &amp;quot;motivating examples&amp;quot; but that loses a lot in translation; really what I'm saying is to &lt;a href=&quot;http://www.appliedscholastics.org/l-ron-hubbard/teaching.html&quot; rel=&quot;noreferrer&quot;&gt;&amp;quot;Form patterns of computation in the individual with regard only to their usefulness.&amp;quot;&lt;/a&gt;  Binary notation &lt;em&gt;is&lt;/em&gt; useful, but it's more important to lead the student to realize that for himself or herself, than it is to teach it as a rote pattern.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The keynote with regard to conveying that &amp;quot;1001101&amp;quot; can be used to represent the same quantity as &amp;quot;77&amp;quot; is to start with the &lt;em&gt;meanings&lt;/em&gt; of those symbols, and worry about the actual symbols used later on.  This could all be done in one short tutoring session so long as the student's mind is coaxed into action rather than passively recording the information that you're &amp;quot;teaching.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;I would &lt;strong&gt;have the student choose his or her own symbols to use.&lt;/strong&gt;  They're completely unimportant, so don't let the student get hung up on them.  I might start out by using stars and diamonds, just to make the point.  Those are obviously inconvenient to draw.  So then we might switch to circles and squares at the student's suggestion.  And then squares and circles, just to switch things up.  And then I could switch us to minus and plus for a minute or two, and then tell the student:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;So you can see it doesn't really matter what pictures we use or what we draw, what matters is that we have two of them, and that we've decided which of the two comes first.  You can use anything you like and you'll still wind up with the same answer, 8, when you list the possibilities out and count them up.  But the pictures that we &lt;em&gt;usually&lt;/em&gt; use, so other people will understand our list also, are just &amp;quot;0&amp;quot; and &amp;quot;1&amp;quot;.  And 0 comes before 1, so then our list would look like:&lt;/p&gt;&#xA;&lt;p&gt;000&lt;br /&gt;&#xA;001&lt;br /&gt;&#xA;010&lt;br /&gt;&#xA;011&lt;br /&gt;&#xA;100&lt;br /&gt;&#xA;101&lt;br /&gt;&#xA;110&lt;br /&gt;&#xA;111&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Then you can number the list &amp;quot;1&amp;quot; through &amp;quot;8&amp;quot; and the connection should come pretty quickly, at least with an 8 year old.  (A 6 year old I would do the same thing but not try to teach actual binary numbers.)&lt;/p&gt;&#xA;" OwnerUserId="1103" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-02T22:05:28.717" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5184" PostTypeId="2" ParentId="5151" CreationDate="2018-11-02T22:48:12.517" Score="5" Body="&lt;p&gt;A great resource to learn JavaScript is Eloquent JavaScript by Marijn Haverbeke: &lt;a href=&quot;https://eloquentjavascript.net/&quot; rel=&quot;noreferrer&quot;&gt;https://eloquentjavascript.net/&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can download the pdf for free, or you can read it online, and this is probably a better choice since you can take advantage of the code sandbox.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is definitely suitable for beginners but a wide range of topics is covered, included Node.js (chapter 20). However, with regards to your requests, HTML and CSS are introduced but you will probably need supplementary material about them.&lt;/p&gt;&#xA;" OwnerUserId="3842" LastActivityDate="2018-11-02T22:48:12.517" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5185" PostTypeId="2" ParentId="5176" CreationDate="2018-11-03T04:03:50.347" Score="3" Body="&lt;p&gt;An example from Basic Computing book is coming to my mind here: Suppose you have some torches or light bulbs and want to convey a message using the combination of those bulbs/torches/LEDs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can understand that this example can still be bit too much for 6-8 years old, but you can make it a fun activity for them by giving them torches and give them some examples to work with. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you can use some cartoon characters pairs: Tom or Jerry, Buggs Bunny or Daffy Duck, etc. &lt;em&gt;(unsure whether kids watch these classic cartoons anymore, so you can find a more relatable cartoon pair)&lt;/em&gt; or maybe some example from basic technology &lt;em&gt;(Our 6-8yr old these days are pretty good at basic knowledge of mobile phones, TVs, etc.)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said this all, I confess its not easy to convey it all to kids who have just begun the decimal system. The first time ever I heard of binary (it was part of text) was at the age of 12 and even then, I couldn't grasp it too quickly. I feel for the kids if they are being asked to perform the binary arithmetic as well.&lt;/p&gt;&#xA;" OwnerUserId="2537" LastActivityDate="2018-11-03T04:03:50.347" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5188" PostTypeId="2" ParentId="5176" CreationDate="2018-11-03T21:06:40.970" Score="1" Body="&lt;p&gt;For German speaking folks take a look at&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://kinder.wdr.de/tv/die-sendung-mit-der-maus/video-bis--zaehlen-102.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://kinder.wdr.de/tv/die-sendung-mit-der-maus/video-bis--zaehlen-102.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;where fingers are used.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastEditorUserId="6109" LastEditDate="2021-01-10T21:09:33.020" LastActivityDate="2021-01-10T21:09:33.020" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5189" PostTypeId="2" ParentId="5176" CreationDate="2018-11-04T16:48:08.587" Score="7" Body="&lt;p&gt;The way I got my kids interested in binary representation was to discuss up to what number they could count on one hand. Learning they could count up to 31 and then understanding why, made the trick. You can then impress them yet again when you show them that with ten fingers then can count to 1023. &lt;/p&gt;&#xA;" OwnerUserId="6142" LastEditorUserId="6142" LastEditDate="2018-11-04T20:52:26.610" LastActivityDate="2018-11-04T20:52:26.610" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5190" PostTypeId="2" ParentId="5176" CreationDate="2018-11-05T01:03:45.437" Score="3" Body="&lt;p&gt;The largest problem is probably trying to sell binary code as a number system, particularly in this age group. As some other answers suggested the combinatorics aproach is probably the way to go. I would even stay away from 0s and 1s because that already has another meaning to them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think that the beads is a good starter to first give them a grasp of how the number of possibilities in which to order them.&lt;br&gt;&#xA;My idea would be a game where 5 kids are sitting in a row. This is basically the second phase after the beads. Each of the 5 kids has a number assigned in the order 16, 8, 4, 2, 1. Then the class is asked for a number between 0 and 31. If it is 21 the procedure goes like this. The first kid just has to check if his number fits into the target number. In this case it does and he stands up, the next one (or the class) has to now check the difference 21-16=5. Again check if the nummer fits, which it doesn't, and the kids remains seated and might say &quot;done&quot;. The next on fits again and get's up, leaving a remainder of 1, kid no. 4 remains seated and kid no. 5 gets up for that remaining 1. This could be written to the board as 21 = +o+o+ or filled an empty circles or the class can be asked which symbols they would prefer. &lt;strong&gt;u&lt;/strong&gt; and &lt;strong&gt;d&lt;/strong&gt; might also be intuitive for &lt;strong&gt;up&lt;/strong&gt; and &lt;strong&gt;down&lt;/strong&gt;.&lt;br&gt;&#xA;There can be a few examples, eventually well picked neighbouring numbers to show a flip of 2 adjacent positions.&lt;br&gt;&#xA;If it goes well up to that point you can even count up, but as a teacher you should be familiar with that, so that it goes right and the system is applied correctly. To explain what I mean it should go like this. Right kid gets up &quot;one&quot;, first kid down and second up &quot;two&quot;, first kid up &quot;three&quot;, first and second down and third up &quot;four&quot; ... Imagine the power of for example 8 when 3 kids sit down and one gets up.&lt;br&gt;&#xA;To finally close the bridge to a general application of this you can explain that the same can be done for the alphabet and instead of counting up numbers you can also count up letters.&lt;br&gt;&#xA;It is possible that 31 is a bit high for 5 year olds for the calculation part.&#xA;The good part is the physical involvement, which I think is a useful tool to enter their brains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What also just came into my mind is Morse Code, which is also somehow binary in using short and long sounds. But I really have no idea if kids today know anything about it and if this would be a useful tool. Maybe a question to the class might give some feedback in that regard. It could also be mentioned on the side in a few explaining sentences.&lt;/p&gt;&#xA;" OwnerUserId="6145" LastEditorUserId="6145" LastEditDate="2018-11-05T01:09:08.523" LastActivityDate="2018-11-05T01:09:08.523" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5191" PostTypeId="2" ParentId="5176" CreationDate="2018-11-05T01:37:04.527" Score="2" Body="&lt;p&gt;Your students already know what 1 and 0 mean, and those meanings are applicable to binary arithmetic. With different glyphs, your students will have to mentally decode those glyphs into 1s and 0s in order to understand what you are saying, so it will be harder to understand than it should be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, ⊗ looks a lot like ⊕, which could get confusing later if you want to discuss Boolean logic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest representing the radix with parenthesis and subscript eg &lt;span class=&quot;math-container&quot;&gt;$(10101010)_2$&lt;/span&gt;. Or use the binary literal format of a modern programming language eg &lt;code&gt;0b10101010&lt;/code&gt;. These make the radix unambiguous without confusing your students.&lt;/p&gt;&#xA;" OwnerUserId="6146" LastActivityDate="2018-11-05T01:37:04.527" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5192" PostTypeId="2" ParentId="5176" CreationDate="2018-11-05T15:28:34.397" Score="1" Body="&lt;p&gt;I would start by reviewing how the mathematics curricula explains the numbers to these children.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have been surprised in the past when looking at education books of young children that when teaching numbers, &lt;em&gt;they explained bases&lt;/em&gt;! There is a lot of counting numbers as &lt;em&gt;X hundreds, Y tens Z units&lt;/em&gt;, using colored stickers for each position, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you are never again asked to write 123 as 100 + 20 + 3.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when having to learn binary or hexadecimal, that's exactly what you need to do, realize that 123d is just 1×10² + 2×10¹ + 3×10⁰ and 123h will be 1×16² + 2×16¹ + 3×16⁰, and so for any base.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, start by checking how they are|will already learn the numbers and see how to make binary encoding fit into them. If a yellow dot will mean tens, use yellow for 2, not for 8 (maybe with an extra symbol to mean binary), etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The curricula will vary a lot between places and editions, and this may not be applicable to your specific case, but I think it's important to adapt to how they are learning the numbers (or will learn them later) so that they can learn the concept as the one thing it really is, instead of being taught by different people as separate and unrelated things.&lt;/p&gt;&#xA;" OwnerUserId="2821" LastActivityDate="2018-11-05T15:28:34.397" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5193" PostTypeId="2" ParentId="5176" CreationDate="2018-11-05T19:15:25.627" Score="2" Body="&lt;p&gt;I once saw how my brother had figured out binary numbers (many, many years ago) and it seemed just so intuitive! And I figured out an even better way of showing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've no doubt seen mechanical counters. Like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Gebuehrenzaehler57.JPG/240px-Gebuehrenzaehler57.JPG&quot; alt=&quot;Mechanical counter&quot;&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the counter you have multiple rolls with digits on them. When the first roll completes a full circle, the second one moves ahead by one. Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Binary is the same, except instead of 10 digits on each roll, you have just two. But counting still works! There are even some videos on YouTube where someone has made a mechanical binary counter.&lt;/p&gt;&#xA;" OwnerUserId="6155" LastActivityDate="2018-11-05T19:15:25.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5194" PostTypeId="1" CreationDate="2018-11-05T19:46:12.447" Score="4" ViewCount="266" Body="&lt;p&gt;Fellow educators,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am teaching a project based course composed of two parts. The first half of the course focuses on basic concepts and activities that serve as preparation for the second half where students work on a project. The project is based on a grading rubric and, for students, it is very easy to evaluate their own progress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lately some students started leaving class earlier. The early leavers are actually the best performing ones and have already accomplished the minimum project goals. Thus, they are already approved in the course even though we still have one month left... (&amp;lt;-- this sounds like a problem...) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is: how to improve the &quot;end-game&quot; of project based courses to avoid students leaving early and help them to stay motivated?&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-04-24T13:43:14.360" Title="Improve motivation in the final part of a project based course" Tags="|student-motivation|project|evaluation|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5195" PostTypeId="2" ParentId="5194" CreationDate="2018-11-05T20:26:54.537" Score="0" Body="&lt;p&gt;If they have nothing to do and have completed their tasks, why should they stay? Motivated for &lt;em&gt;what&lt;/em&gt; exactly? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to accept the fact that some students don't have a grade maximizing strategy or attitude toward every course. Perhaps their time can better be spent on other courses once they reach the point that &lt;em&gt;satisfies&lt;/em&gt; their goals. They may not consider your course or field to be essential to their goals. They may not be driven by grades as a result. If they think they have the knowledge they need for their &lt;em&gt;real&lt;/em&gt; goals, then, in their mind, they are done. A better grade isn't an enticement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to give them a reason to stay. You could add requirements, making the project harder with the hardest tasks worth only a few points. You could make the project into a group project where collaboration is required. But you may need to make the project more inherently &lt;em&gt;interesting&lt;/em&gt; to them, so that they want to do more without prompting by carrots or sticks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could use a Scrum-like process with a project &quot;backlog&quot; and feed new requirements to students when they complete what they have. Of course you need to expand the scope of the project so that in the last days there is still something to do, but do it in a way that doesn't result in grade disadvantages for those that don't go beyond the basic requirements. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But make-work will not motivate them. You need to be more subtle. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find a way to have a discussion session with those students who finish early to learn why they aren't more interested in staying. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I agree completely that letting them evaluate their own work is a good thing. Adding risk to grading would be a step backwards. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-11-06T11:57:54.683" LastActivityDate="2018-11-06T11:57:54.683" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5196" PostTypeId="2" ParentId="5176" CreationDate="2018-11-05T20:51:04.317" Score="1" Body="&lt;p&gt;I think the biggest piece of confusion comes from the words representing quantities; in particular, the word TEN.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you disassociate TEN from the quantity that represents the number of your fingers, and instead frame TEN as word noting when it's time to &quot;start over&quot; with a new quantity set, you are more than halfway towards your goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And before you get to binary, and to reinforce that &quot;TEN&quot; is just a word representing a quantity, I'd instead focus on teaching Octal.  Once your students can get used to a number system where you skip the &quot;words&quot; EIGHT and NINE, your students will be more able to wrap their brains around binary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might introduce the Octal system by way of frogs since frogs have 8 toes total on their front legs. That's to say what would the number system look like if it were created by frogs (8 instead of 10 digits)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An interesting dynamic also for frogs is that there are 10 toes on their back legs.  Perhaps an interesting story could be derived from this where frogs find themselves having to switch between the Octal and Decimal system.&lt;/p&gt;&#xA;" OwnerUserId="6156" LastActivityDate="2018-11-05T20:51:04.317" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5197" PostTypeId="2" ParentId="5194" CreationDate="2018-11-05T23:09:50.657" Score="1" Body="&lt;p&gt;In my program, we have a year-long culminating capstone project which has a format that might work well for you.  Traditionally, high school seniors in this area of the world catch a disease called &quot;senioritis&quot; that prevents them from doing a lot of work as they enter into the last few months of high school.  It's a highly contagious disease, though once caught, you often gain a subsequent immunity (such as in college or graduate school).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The format of the year is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Choose projects&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Work towards completion&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Give final presentations to outside judges&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Final cleanup and submission&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Here are the details for steps 2-4 that make this all work:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Working towards completion&lt;/strong&gt; is done using milestones.  The students decide what the next logical part of their project is, and negotiate with the teacher what they will accomplish by the next check-in date. (They also negotiate what the next check-in date will be).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience, I have to dial my students back more often than I have to push them forward. Students often have big ideas, and little sense of how long those ideas will take to enact.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I keep a public calendar of which groups I will need to see each day. With any extra time, I check in with active groups to see if they need any help.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Final presentations&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We rehearse our final presentations in small assignments during the weeks leading up to the big day, and I give critiques to help improve the presentations as we go. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the big day, we use a big(ish) venue, invite the underclass CS majors, and have a panel of outside experts as judges.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is extremely important that the teacher not be an evaluator for the final presentations. This keeps the pressure up, both on the students, and on the teacher! &#xA;Instead, outsiders are brought in (and provided a grading rubric!) who will judge the final projects and finally presentations on their merits.  Some of these outsiders may still be from our institution, but not all of them, and no one who has been in any way involved in a project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These final grades are averaged together, and will eventually be mixed in with the milestone grades.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But first, the student is given... a zero!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, not really. But the grade they receive from the judges is provisional. They have to finish up the last pieces in order to receive this grade.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Final cleanup and submission&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the phase, usually about 2 weeks after the presentations, during which the students have to do their 'i's and cross their 't's. Is the project actually finished and documented? Do the clients have the access and support they need to actually use them? Are the projects actually submitted on GitHub to the teachers? Have the students filled out an end-of-program questionnaire?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once those pesky boxes are all checked, students are finally awarded the grades from the presentations.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Put all together, all of these moving parts seem to prevent senioritis completely. The high fliers want to put their best foot forward for the outside experts. The strugglers work very hard to make sure that their project actually comes together before the big day. The final checklist means that I am not left with a bunch of 99% completed projects at the end of the whole process.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-11-05T23:09:50.657" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5198" PostTypeId="1" CreationDate="2018-11-06T13:16:39.100" Score="1" ViewCount="211" Body="&lt;p&gt;I'm a programmer, and I want to continue as such, but I want to explore new areas. I know the future is in the big data, and virtual reality (for example), but I don't know if they have less coding and more of other knowledge. To explain it:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In big data or machine learning, I need to know statistics, but will I use it more than python and/or R?&lt;/li&gt;&#xA;&lt;li&gt;In Virtual Reality or Video Games I need to know Unity and there's a lot of 3D in it, so, will I do modeling in 3D more than programming on C++?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I want to explore other things of current interest that do not include web design but I can't see clearly what is required for each option.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do I need to learn or do to work in currently interesting (&quot;hot&quot;) areas, but remain primarily a programmer? &lt;/p&gt;&#xA;" OwnerDisplayName="user6160" LastEditorUserId="1293" LastEditDate="2018-11-07T14:57:48.263" LastActivityDate="2018-11-16T02:35:33.660" Title="How can I remain a programmer and move into currently &quot;hot&quot; areas?" Tags="|self-learning|programming|" AnswerCount="3" CommentCount="9" ClosedDate="2018-11-16T07:56:32.377" ContentLicense="CC BY-SA 4.0" />
  <row Id="5199" PostTypeId="2" ParentId="5198" CreationDate="2018-11-06T15:45:51.627" Score="4" Body="&lt;p&gt;This depends a great deal on how you want to drive the ideas of the programs you write - and on who drives those ideas. Pretty much any application area of CS requires some deep knowledge of the domain, not just the techniques and mechanics of programming. Even game programming is pretty deep stuff these days. As you say, both VR and Machine Learning requires background far beyond programming, both in CS (algorithms and such) and in the application area and associated tools such as statistics or ray-tracing or whatever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to be self driven in the development you will just have to face the need to get that background. Online courses might help, or evening classes in a local university. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you are willing to let others drive the direction of the project, then you can build stuff quite happily though the vision will be that of others. Agile software development is especially well suited to this, separating the specifiers and the developers quite comfortably. At a large company like IBM, there are separate departments for idea development and refinement and the developers who build those ideas into code. The &quot;idea department&quot; is full of graphic designers, business specialists, product testers, etc., while the development department is full of skilled programmers and database specialists. In an agile workplace these two groups of people work closely together over the life of a development project in a way that is flexible so that goals can be changed along the way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It can be rewarding to do this, though the vision driving the project isn't your vision. The others are, then, responsible for having the deep domain knowledge that you don't have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want to do it all yourself, you need to develop that knowledge too. You can probably do it incrementally, but you still need to obtain it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It might be true that you already have domain knowledge about some things. If you can also come up with problems that need solving in those domains you may have the basis for building things. At least for a while. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there were an easy path through this, it would already very likely be well travelled. Not many of us have a brilliant idea that will open a completely new domain along with the skill to develop it. Both Steves were needed in the development of Apple. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-11-07T13:54:39.883" LastActivityDate="2018-11-07T13:54:39.883" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5200" PostTypeId="2" ParentId="5157" CreationDate="2018-11-06T20:44:06.290" Score="0" Body="&lt;p&gt;If classes are guns, functions are sort of like bullets. Not a guns take the same rounds, not all classes have the same functions. But some classes can have the same base classes therefore have some similar functions; some guns have the same manufacturer and take the same bullets. Instances of a class can call functions, just as a gun can shoot bullets. Maybe thats why call of duty calls it &quot;create a class&quot;...&lt;/p&gt;&#xA;" OwnerUserId="4979" LastActivityDate="2018-11-06T20:44:06.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5201" PostTypeId="2" ParentId="5176" CreationDate="2018-11-07T21:49:46.067" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I'm teaching some introduction lessons to a classroom of 6-8 year olds about basic 21st century skills. A fundamental part of this is how computers represent numbers, words and images, which all starts with understanding binary representation of a number.&lt;/p&gt;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&lt;p&gt;So I'm thinking of using different symbols. Like ● for 'this bit is on', and ⊗ for 'this bit is off' ...&lt;/p&gt;&#xA;&lt;p&gt;-- Roel&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;My son just turned 8 and I've run into this same problem many times. I've found it an interesting and rewarding challenge to try to explain concepts without getting too deep into technical details.&lt;/p&gt;&#xA;&lt;p&gt;For my son, (and even many adults) I've found it extremely valuable to &lt;strong&gt;not&lt;/strong&gt; talk much (if at all) about binary, place value, and number bases (at least at first) as bytes are what everyone uses and talks about near daily. I've also found it good to avoid talking about specific numerical quantities and focusing instead on what those quantities represent, such as letters, brightnesses, etc. In some conversations I also found it useful to explain that bytes in a computer are taking up physical space inside the memory of the machine, just as letters on paper take up space.&lt;/p&gt;&#xA;&lt;h2&gt;Teaching Binary Numbers:&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Sometimes light bulb on/off symbols are used ...&lt;/p&gt;&#xA;&lt;p&gt;-- totera&lt;/p&gt;&#xA;&lt;p&gt;An example from Basic Computing book is coming to my mind here: Suppose you have some torches or light bulbs and want to convey a message using the combination of those bulbs/torches/LEDs.&lt;/p&gt;&#xA;&lt;p&gt;-- Failed Scientist&lt;/p&gt;&#xA;&lt;p&gt;... I have never not confused anyone with notation.&lt;/p&gt;&#xA;&lt;p&gt;-- Roel&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;When I tried to teach my son binary in order to explain how numbers worked in a computer I found that what worked best was to keep things simple and only build from ideas he already knew and nothing else. The usual light switch (or LED) analogy seemed to help some, but working with our hands was best. I considered using blocks, drawing pictures, and so on, but ended up not needing to.&lt;/p&gt;&#xA;&lt;p&gt;Simple counting, doubling, and adding were things he already knew. Place value, not so much, but it wasn't hard for my son to get the general idea that each of his fingers could represent a number twice as much as the one before it, and you add them all together after you hold them up. Each finger can either be up or down; added or not.&lt;/p&gt;&#xA;&lt;p&gt;He was then very impressed with how we could count to 31 on just one hand, and 1023 using both hands. This understanding actually came &lt;strong&gt;after&lt;/strong&gt; explaining what bytes were and getting him to understand them.&lt;/p&gt;&#xA;&lt;h2&gt;Teaching How Computers Store Letters, Words, and Images&lt;/h2&gt;&#xA;&lt;p&gt;The really important part was to explain that a &amp;quot;byte&amp;quot; was a number in the computer, and that it could represent different things, like one letter, or how bright a color was. Explaining that a byte was 8 bits came later when he began learning what bits were.&lt;/p&gt;&#xA;&lt;p&gt;As for words, I told him that you could lay out the letters of the alphabet in a row and count them, and that's how computers know what letters are, because the people who build computers decided which numbers would be which letters. I was then able to explain from there how many bytes it would take to make various kinds of documents around our house.&lt;/p&gt;&#xA;&lt;p&gt;Explaining pictures also started with a recap on bytes. I explained that 1 byte told the computer how much of a color was in a picture. The computer would read that number and see how much red was in the picture. I next Googled &amp;quot;color mix venn diagram&amp;quot; so we could have a conversation about how pictures are only made of red, green, and blue, and thus 3 bytes are needed to talk about color. From there I was able to explain that those 3 bytes don't actually describe the entire picture, just one very tiny dot, and that you then need &lt;strong&gt;a lot of bytes&lt;/strong&gt; to draw one image.&lt;/p&gt;&#xA;" OwnerUserId="6113" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-07T21:49:46.067" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5203" PostTypeId="2" ParentId="1408" CreationDate="2018-11-09T04:41:56.043" Score="2" Body="&lt;p&gt;I see you've already accepted a great answer, but I'd like to give my knee-jerk reactions to your questions directly.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What I'm trying to ask here is, how do I get my mindset to their level?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5176/teaching-binary-encoding-using-different-symbols/5201#5201&quot;&gt;this question here&lt;/a&gt; we were talking about how to teach binary to 6-8 year-olds. What I said there I think touches on this question (I said a lot and am not going to repeat it here).&lt;/p&gt;&#xA;&lt;p&gt;Very generally, what I do is assume nothing as far as previous knowledge and I especially try to keep things very goal/task focused, meaning, discussing what we want the computer to do, and the higher level ideas of how the computer does it. I only break things down into something more technical and specific when needed.&lt;/p&gt;&#xA;&lt;p&gt;Language is especially important! Only introduce one term at a time and explain them thoroughly each time you add a new word to the jargon you want someone to understand. It actually helps to know, and use often, other (preferably simpler) terms while explaining an idea. For example, a variable is a &amp;quot;labeled box&amp;quot;, or a &amp;quot;small dry erase board&amp;quot;. A function is a &amp;quot;list of instructions&amp;quot;. This actually brings me to your next question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;They struggle with understanding what a variable is, have trouble understanding flow of the program. What can I demonstrate to make them understand better?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Use as many real-world objects and analogies as possible. As I said above, variables are labeled boxes, cubbies, white boards, or any other object that holds information and can be emptied and refilled. Functions are just lists, and things like if statements can be thought of as &amp;quot;splits in a road&amp;quot; of instructions (or steps) your program is following.&lt;/p&gt;&#xA;&lt;p&gt;I found it really useful when couching in college to use office workers (or any person doing any job) to represent objects and behaviors within a program. Personifying parts of a program can really help a lot in explaining how they work together.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;... if it becomes a discussion about tracking the level of a game or the current high score ... -- Peter&lt;/p&gt;&#xA;&lt;p&gt;It needs to be fun, and games really help. -- Edwin&lt;/p&gt;&#xA;&lt;p&gt;Like the other responders, I find that visual and game-related applications ... will get and keep attention better than learning the &amp;quot;traditional&amp;quot; way ... -- Matthew&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I really like all the talk of having kids make games in order to learn programming. When I was 14 and first learning C++ I made lots of little games too. I'd like to caution not to lose focus though. Regardless of what kind of program is being made that doesn't change how the teaching itself, the careful explanation of ideas, needs to be done. Please, make the packaging colorful and interesting, but keep in mind that concepts build on each other and need to be addressed in an order that makes sense and keeps questions flowing naturally.&lt;/p&gt;&#xA;" OwnerUserId="6113" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-09T04:41:56.043" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5204" PostTypeId="1" CreationDate="2018-11-09T09:08:44.727" Score="42" ViewCount="14168" Body="&lt;p&gt;I am thinking of offering classes for people, maybe take 5 to 10 at the time. There would be 4 hours every Saturday, twice a month, for three months. So in total 6 such sessions. The language thought would be Javascript (and HTML, CSS). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was planning to offer it to adults and kids, and especially interesting would be for a parent and child to do it together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think is a minimum age for which I should accept students, alone and with a parent?&lt;/p&gt;&#xA;" OwnerUserId="6090" LastEditorUserId="1293" LastEditDate="2020-01-30T13:58:06.700" LastActivityDate="2022-11-02T02:05:07.767" Title="What is good age to start learning programming?" Tags="|programming|" AnswerCount="16" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5205" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T11:03:02.010" Score="4" Body="&lt;p&gt;You can start at 7 (maybe younger): I have taught this age. We used scratch (the language), it is well suited to this age, and older.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have only taught a single student at a time, at this age. We coded next to each other, taking ideas from each other. e.g. I would add arrow key control, the student would copy that bit of code, I would ask “Can we do this for a second character?, How do we …?” We make good progress (In similar number of (but shorter) sessions): arrow keys, drawing, multi-sprites, mouse control, edge bounce, sprite detection, score, …&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-11-09T11:03:02.010" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5206" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T12:28:33.050" Score="44" Body="&lt;p&gt;Let me urge a bit of caution if you try to combine teaching of youngsters with their parents. Before you decide, you should look at the work of &lt;a href=&quot;https://www.verywellmind.com/piagets-stages-of-cognitive-development-2795457&quot; rel=&quot;noreferrer&quot;&gt;Piaget&lt;/a&gt; on the stages of development. Adults and teens from about 12 can learn abstractly, but those younger probably haven't yet developed the changes in the brain (including physical changes) that make that possible. Starting from around 7 kids can learn things like computing, but only very concretely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I bring this up so that you don't wind up with classes that serve no one very well and frustrate everyone. Some programming environments stress the concrete and are good for youngsters (Scratch, Logo, and other visual systems) but adults learn very differently. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your goal is primarily to have the parents help their younger kids to learn while learning just a bit themselves, then, I think you can be successful. Just keep it concrete and probably visual. But if you are asking more of the parents, then they might not be so satisfied and you will be inundated with questions that come from their deeper way of thinking and that won't have answers that the kids can grok. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if you want to start with teens and older you should have a group that is much more uniform in their mental structure and abilities so it would make a wider variety of techniques possible. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-11-09T12:28:33.050" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5208" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T14:53:59.690" Score="5" Body="&lt;p&gt;I started with BASIC on the ZX80 at 8 (self taught), I graduated to Z80 machine code at about 10. So, I'd guess js would probably be fine from 10+&lt;/p&gt;&#xA;" OwnerUserId="6170" LastActivityDate="2018-11-09T14:53:59.690" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5209" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T16:39:23.400" Score="0" Body="&lt;p&gt;I like Scratch: It is a great start to learn programming.&#xA;Children were taught programming in the company where I worked. The greatest successes was with 9→12 year old children. The younger ones did not show much interest. But did tasks well.&lt;/p&gt;&#xA;" OwnerUserId="6172" LastEditorUserId="204" LastEditDate="2018-11-10T14:36:26.467" LastActivityDate="2018-11-10T14:36:26.467" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5210" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T19:53:51.127" Score="6" Body="&lt;p&gt;I've been teaching kids (7~13) for the last four years or so, languages including Scratch, Python, Java, and C++. Surprisingly, kids can understand these languages even at a young age.&lt;/p&gt;&#xA;&lt;p&gt;The best time is about 7 ~ 12, starting with Scratch. The minimum age would be around 7 because, even for a beginner, many examples and practices will involve some sort of creating a game or app that requires basic math or science knowledge such as x, y coordinate, calculating numbers, etc. Also, in general, screen time is harmful, in my opinion, especially for very young kids. Spending several months to a year on Scratch, and then teach them how to type fast using some typing game websites. Then, you may teach them Python first, and then JavaScript when they become 10 to 12 years old.&lt;/p&gt;&#xA;&lt;p&gt;Basic knowledge in math such as arithmetics and better yet the concept of variables and functions in algebra can be very helpful when kids gain some experience with programming.&lt;/p&gt;&#xA;" OwnerUserId="6176" LastEditorUserId="9154" LastEditDate="2021-07-16T03:40:24.830" LastActivityDate="2021-07-16T03:40:24.830" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5211" PostTypeId="2" ParentId="1408" CreationDate="2018-11-09T20:12:41.420" Score="1" Body="&lt;p&gt;I taught kids Python last year, and I used &quot;Python for Kids: A Playful Introduction To Programming&quot; as a textbook.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But... Before I taught them Python, I taught them Scratch for several months so that they can grasp the basic concept of Scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I taught them how to type fast because I noticed that their typing skills are not up to be ready for coding. There are lots of fun typing game websites. Their favorite was nitrotype.com. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I taught Python, I basically walked through the Python for Kids textbook, and made sure that they finished all the questions in the textbook. Kids really enjoyed the last project, Snake game, in the book.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My lecture notes on Python can be found here -- &lt;a href=&quot;https://github.com/geekdojo-io&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/geekdojo-io&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6176" LastActivityDate="2018-11-09T20:12:41.420" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5212" PostTypeId="2" ParentId="4875" CreationDate="2018-11-09T20:57:08.337" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;How can we encourage/enforce/demand/cajole students into making a good faith effort on a difficult problem without making them feel defeated at the end?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'm going to have to agree with Heather&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I think sometimes it's because they don't even know where to begin, and when you think about it, this makes sense.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Any lack of motivation is most likely coming from confusion or misunderstanding. It &lt;em&gt;can&lt;/em&gt; be fatigue or personality, but the best place to start is with finding holes in the student's knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People don't know what they don't know and this applies to adults and children alike. So I like to ask something along the lines of &quot;What do you understand about this?&quot;, or &quot;Where were you last doing well?&quot; This helps find a starting point. You can then recap something understood, then add only the tiniest bit of information to it and check to see if they're still following you. Keep going like this, slow steps with checks, and you will often find the problem. After that I usually find that motivation to attempt a difficult problem returns, or at least other problems reveal themselves after the first one is eliminated.&lt;/p&gt;&#xA;" OwnerUserId="6113" LastActivityDate="2018-11-09T20:57:08.337" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5213" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T21:10:31.507" Score="19" Body="&lt;p&gt;This is a much less useful answer than I wanted it to be, but I'm posting it in case it helps someone.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm not a teacher, but I've found that most 13-year-olds can learn to program using production languages (Python's a good one). However, I'll regale what I remember of my experience learning my first programming language. (WARNING: Tangents ahead.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;On a Windows 98 SE&lt;sup&gt;1&lt;/sup&gt;, aged five or six&lt;sup&gt;2&lt;/sup&gt; I was trying to open All Of The Things&amp;trade; to see what would happen. I happened to right click &lt;code&gt;autoexec.bat&lt;/code&gt;, and there was an option called &quot;Edit&quot;... which opened up Notepad! When I double-clicked it, it popped up a message saying that I &quot;couldn't run Windows when Windows was already running&quot; but when I pressed &quot;Edit&quot;, there it was! Code that I could read!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It wasn't long&lt;sup&gt;3&lt;/sup&gt; before I realised that you just needed the &lt;code&gt;.BAT&lt;/code&gt; extension. All of the programs I'd written looked like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@echo off&#xA;cls&#xA;echo Hello!&#xA;echo This is a secret message.&#xA;echo Press a key&#xA;pause &amp;gt; NUL&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because I'd never seen any examples of a batch file other than these examples, I didn't know that you could run arbitrary programs from Batch files. I &lt;em&gt;did&lt;/em&gt; know that you could run &lt;code&gt;command /?&lt;/code&gt;, so when I found another batch file with an &lt;code&gt;IF&lt;/code&gt; command in it, my programs evolved to:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;@echo off&#xA;cls&#xA;&#xA;echo Secret Message!&#xA;if exist secret.txt type secret.txt&#xA;if exist secret.txt pause&#xA;if exist secret.txt exit&#xA;&#xA;if not exist secret.txt echo Enter your secret message &amp;gt; secret.txt&#xA;edit secret.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Crude, I know, but I didn't know about the web back then. (In fact, I thought Ethernet was the modern version of &quot;Internet&quot; (a modem port) and used neither, save as a magical device that brought back flash games when the browser crashed or I accidentally hit F5.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also discovered that Windows popped up a scary warning message about system instability when I renamed the &lt;code&gt;.bat&lt;/code&gt; file to &lt;code&gt;.com&lt;/code&gt; and tried to run it. I always wanted to make a proper executable program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I later learned Scratch 1.4 on a Windows XP machine (aged 6 or 7), though I was thrilled to bits when I discovered that XP supported Batch Files too.&lt;sup&gt;4&lt;/sup&gt; Scratch didn't let me make .EXE files, but that didn't really matter because I could make proper games and had all of the blocks available to me. (Now I have &quot;documentation&quot;, where I can find new blocks, but I didn't know about that at the time.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later, I learned JavaScript on Khan Academy, but got frustrated when I couldn't just copy the JavaScript into a &lt;code&gt;.js&lt;/code&gt; file and run it... so I gave up. This was because I wasn't told the difference between JavaScript proper and the Khan Academy-provided functions. (I also wasn't told that you needed a web browser to get a DOM and graphical rendering.) I later got a Scratch account and was introduced to Small Basic by my primary school head teacher; the rest is history.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I expect that, if I'd had programming super-geniuses around me to help, I could've been building web pages with JavaScript (instead of saving Word Documents as boring, non-JavaScripted HTML/inline CSS files and manually stripping out the Word cruft through trial and error) and programming fully-featured executables in Small Basic (instead of not even being able to imagine the &lt;em&gt;concept&lt;/em&gt; of a compiler) aged 8. Though... the skills that allow me to quickly pick up new languages &lt;em&gt;now&lt;/em&gt; were acquired through lots and lots and lots of doing-it-myself and figuring-it-out, so being babysat and hand-held through the process would have hindered, not helped.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;: a parental discard (as with every laptop up to my very first (which I recently fixed up (read: replaced non-functioning Windows with functioning Debian) and am currently typing this answer on)) which, if I remember correctly, was reinstalled twice after it became completely unusable (MS Paint scribbles were painstakingly preserved via floppies).&lt;br&gt;&#xA;&lt;sup&gt;2&lt;/sup&gt;: perhaps around the time I discovered the File Associations dialog and was disappointed that I couldn't make a &lt;code&gt;.wizzwizzfile&lt;/code&gt; type that was a valid WAV, TXT and BMP file (an idea I got from my open-everything-in-Notepad phase, which lead to the destruction of Microsoft Paint and many, many tears before it was recopied from the installation disk)&lt;br&gt;&#xA;&lt;sup&gt;3&lt;/sup&gt;: at 30 minutes a day, maximum; permission had to be sought every time I wanted to use a laptop&lt;br&gt;&#xA;&lt;sup&gt;4&lt;/sup&gt;: I remember noticing that XP supported multi-line &lt;code&gt;IF&lt;/code&gt;, but 98 didn't; my only emotion was annoyance, and only very minor excitement at discovering the annoying workaround and manually porting the programs back by duplicating the &lt;code&gt;IF&lt;/code&gt; line.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;How is this relevant? Well, it tells us a few things about how young children can learn programming:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;The child needs to be curious.&lt;/strong&gt; Don't just sit them down and start talking at them. Don't just show them a flashy animation or a neat game and say &quot;You can make one of these!&quot;; they need to have questions. If they're not interested in figuring it out, they're not interested.&lt;br&gt;&#xA;I recommend asking a parent / young-child-teacher how to get a child interested in something.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The child needs to have something to tinker with.&lt;/strong&gt; For me, it was Windows 98; as a DOS-based system there was an accessible, interesting &quot;puzzle&quot;, but as a Windows system there was a nice friendly GUI that wasn't easy to break.&lt;br&gt;&#xA;I still have a deep-rooted fear of white-on-blue monospace jumpscares and system beeps, so I'd recommend giving the children something that, when it fails, uses no new UI elements (no persistent red bold text, no popups with a yellow warning sign, etc.). If possible, it should keep on trucking. My recommendation would be Debian with LXDE, with a short GRUB timer, without wireless web access, for the following reasons:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;YouTube is very good at distracting without educational value.&lt;/strong&gt; You don't want the child to discover YouTube. Even the most banal flash games have more educational value than endless novelty, since they can provide inspiration. YouTube stifles boredom, so stifles curiosity. The computer shouldn't become a YouTube machine.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Manuals can be downloaded.&lt;/strong&gt; The only thing that can't be downloaded is Stack Overflow, but they're too young for that anyway; you need to be able to distinguish between good and bad answers to use SO, and SO assumes a minimum amount of knowledge. &lt;code&gt;man&lt;/code&gt; manuals are the right sort of difficulty, I think, since they're as easy to understand as their topic, but boring enough that they aren't your first port of call (you try to figure it out yourself first).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;GRUB shouldn't be discovered early.&lt;/strong&gt; GRUB should be part of the pretty pictures that show up while the computer is booting (after the manufacturer logo and before the scrolling text), but it shouldn't hang around for 5 seconds. 5 seconds is long enough for a child to get bored, mash some keys, and the computer to not start up. &lt;em&gt;But&lt;/em&gt; eventually the child will get curious about what those pretty pictures are, and mash some keys.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Debian is mostly stable.&lt;/strong&gt; It doesn't BSOD when you do strange things, and even if your keyboard-mashing happens to be a valid ELF file and you set the executable flag and run it, you're not going to overwrite the kernel or trigger a system crash (just the humble segfault).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Most things are text files.&lt;/strong&gt; In Windows, if you manage to crack the shell-level dereferencing of &lt;code&gt;.lnk&lt;/code&gt; files (not &lt;code&gt;.Ink&lt;/code&gt; files) and open one directly in Notepad, you'll see a binary file with &lt;code&gt;T e x t   t h a t   l o o k s   l i k e   t h i s&lt;/code&gt; that you can't edit easily because those &quot;spaces&quot; are actually null bytes; in Debian, if you &quot;right-click -&gt; Add to desktop&quot; a program, you'll get a text file (INI, iirc) that you can tinker with.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Debian's used in real life.&lt;/strong&gt; The only other OS (family) that I know of that matches enough of the criteria is DOS-based Windows, but almost nobody uses that any more (so its knowledge, while still serving &lt;em&gt;me&lt;/em&gt; well multiple times a week, is a lot less useful) and its warning messages are scary. Debian's are scary too, but not &lt;em&gt;quite&lt;/em&gt; as scary and only when you've used &lt;code&gt;sudo&lt;/code&gt; to mess something up. Which brings me to the next point:&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Non-elevated users can still do loads, without permanently breaking much.&lt;/strong&gt; Liberal use of read-only Python scripts with the set-uid flag set can extend this further.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Lots of Debian's written in scripts.&lt;/strong&gt; Mostly Python or Sh, which are both good to learn and relatively easy to fiddle around in because they're text files. Showing the child IDLE will keep them occupied for hours. Make sure to show them &lt;code&gt;help&lt;/code&gt;!&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;You can access all of the code.&lt;/strong&gt; Simply press Up in pcmanfm a few times and you're in the root directory!&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Source code is available.&lt;/strong&gt; It'd be a good learning experience to be taught about compilers and go &quot;Ooooh, &lt;em&gt;that&lt;/em&gt;'s what the &lt;code&gt;programname.c&lt;/code&gt; files were!&quot; (since the child will probably try, and fail, to run these files bearing similar names to runnable programs).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Almost all programs accept &lt;code&gt;--help&lt;/code&gt;.&lt;/strong&gt; While it's not as easy to discover as DOS's &lt;code&gt;/?&lt;/code&gt; (perhaps a reason to favour DOS), if a child is told about &lt;code&gt;--help&lt;/code&gt; they can work out how to use pretty much anything. Same with &lt;code&gt;man&lt;/code&gt; and &lt;code&gt;info&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;You can set up backups with &lt;code&gt;rsync&lt;/code&gt;, &lt;code&gt;tar&lt;/code&gt; and &lt;code&gt;cron&lt;/code&gt;.&lt;/strong&gt; Backups. Backups a thousand times. You do &lt;em&gt;not&lt;/em&gt; want a sad child who has just erased everything they can write to by trying out &lt;code&gt;rm -rf / --no-preserve-root&lt;/code&gt; (or, at least, you don't want them to be sad for any longer than necessary to learn that lesson &lt;em&gt;early&lt;/em&gt;, which in my experience is about 5 seconds). I recommend making backups to a remote machine every 10 minutes, and using &lt;code&gt;tar&lt;/code&gt;'s incremental backups feature to ensure that every version is saved.&lt;br&gt;&#xA;Note that I didn't say &quot;make sure they can't delete all their files&quot;; nothing should be off-limits. Plymouth shouldn't even run on startup, nor should the OS boot into &lt;code&gt;startx&lt;/code&gt; immediately (though for a very young child you might want it to).&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;A teacher who knows everything and can be asked questions is useful.&lt;/strong&gt; I would've liked this a lot. Unfortunately, no such teacher exists... but is that such a bad thing? You can show them how to find stuff out for themselves, if they're old enough! I tend to use &lt;a href=&quot;https://start.duckduckgo.com/&quot; rel=&quot;noreferrer&quot;&gt;DuckDuckGo&lt;/a&gt;, since it doesn't constantly advertise Chrome and YouTube at you in deceptive popups at the side. The child can ask to look something up, plug in the Ethernet cable (located elsewhere; hence the laptop), find the documentation page and unplug it again; if they get to the point where they &lt;em&gt;need&lt;/em&gt; to look stuff up frequently (the Stack Overflow point) you can start teaching them like an adult. Until then, answer all their questions, and when they ask a big one you can teach it to them. Be interested in what they're doing, but don't give unsolicited lectures (&quot;Do you want to know about X / how to do Y?&quot; is good, but &quot;X does blah blah blah&quot; is not).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Code should have immediate effects.&lt;/strong&gt; When you run the program, something should happen. Scratch is good for this, but a diet of Scratch and nothing else is not as effective as it should be. You want to train a polyglot.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;A tutorial that uses good style, or no tutorial at all.&lt;/strong&gt; I've used tutorials with good style and bad style, and learned languages without any tutorials (just a few example programs) and it's pretty tricky to unlearn bad style. You can get good style by osmosis, but that's much easier when you've got good style in the first place. I'm not sure where I learned the importance of style, so you'll have to figure that one out yourself.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To summarise:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Age: 2&lt;br&gt;&#xA;Use ScratchJr or similar. It has pretty buttons and you can make things move, and it gets you interested in programming.&lt;/li&gt;&#xA;&lt;li&gt;Age: 4&lt;br&gt;&#xA;Use MIT Scratch (offline), and have an OS that can be pulled apart. Lots of the things that are done won't be directly programming-related (e.g. spending 20 minutes completely destroying the UI) but it's all learning things that you probably take for granted that you know (e.g. that multiple things can use the same value for font colour, or that pink and green are lovely colours for window titlebars). Have Python available.&lt;/li&gt;&#xA;&lt;li&gt;Age: whenever they seem ready  &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start to teach them &quot;grown up&quot; programming languages. Don't say something like &quot;Scratch isn't a real programming language&quot;; that's disheartening and false.&lt;/li&gt;&#xA;&lt;li&gt;Introduce them to the Scratch website; it's a good programming community.&lt;/li&gt;&#xA;&lt;li&gt;Start introducing more abstract programming techniques.&lt;/li&gt;&#xA;&lt;li&gt;Once they've reached the &quot;minimum knowledge&quot; in both a single &quot;grown up&quot; programming language &lt;em&gt;and&lt;/em&gt; in programming in general, show them Stack Overflow, the Font Of All Knowledge&amp;trade;. (Perhaps also Wikipedia, the Font Of &lt;em&gt;All&lt;/em&gt; Knowledge&amp;trade;, but only if you don't mind them being &lt;a href=&quot;https://www.xkcd.com/214/&quot; rel=&quot;noreferrer&quot;&gt;very distracted&lt;/a&gt; for a few months.)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6174" LastEditorUserId="6174" LastEditDate="2018-11-11T22:45:00.337" LastActivityDate="2018-11-11T22:45:00.337" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="5214" PostTypeId="2" ParentId="5204" CreationDate="2018-11-09T22:11:50.657" Score="5" Body="&lt;p&gt;Having taught small groups of children &lt;code&gt;HTML&lt;/code&gt;, &lt;code&gt;CSS&lt;/code&gt;, and &lt;code&gt;JS&lt;/code&gt; as holiday programs, my thoughts are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;be aware that many parents send their kids to classes for one or both of these reasons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to babysit them&lt;/li&gt;&#xA;&lt;li&gt;to &amp;quot;enrich&amp;quot; the children in something the children are not really interested in.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If young students (&amp;lt; 12) are not interested, you can get them about as far as understanding that there are bits of the code they can change that will change messages or backgrounds. If older students are not interested, they will get more out of it, but you will have to focus more on &amp;quot;making it cool&amp;quot; than understanding concepts.&lt;/li&gt;&#xA;&lt;li&gt;Whether or not there is a good level of interest, the children will at times be bored, tired, or some will be behind and others ahead. You need to have some easy and fun distractions/topic changes, or ways to keep the fast ones busy and look for signs that students are losing the ability to concentrate. At this point it is unlikely to re-invigorate them with some whiz-bang, they either need a break or have reached their limits for the day. (So you need activities they will enjoy that don't require concentration.)&lt;/li&gt;&#xA;&lt;li&gt;In the 5-10 age range there is a mixed bag of typing skills. Some students are very slow or struggle to recognize special characters. (So, Scratch. Or &lt;a href=&quot;http://make.gamefroot.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GameFroot&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;I would say that age is much less important than &lt;em&gt;age range&lt;/em&gt;. If you have everything from 5 to 15-year-olds, you &lt;strong&gt;are not teaching them all the same thing, even if they are all doing the same activity&lt;/strong&gt;. If the students are of a similar age, you can teach concepts appropriate for that age without trouble and be aware of who is falling behind.&lt;/li&gt;&#xA;&lt;li&gt;Parents and children should be OK; the parents expect that the content is at a level the children will understand. But children and adults are not good, because the children slow things down so much. However 15+ is fine, and 12+ is probably OK, especially if they are interested.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2592" LastEditorUserId="9154" LastEditDate="2021-07-15T15:23:21.120" LastActivityDate="2021-07-15T15:23:21.120" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5215" PostTypeId="2" ParentId="5204" CreationDate="2018-11-10T08:56:48.610" Score="23" Body="&lt;h2&gt;The minimum age&lt;/h2&gt;&#xA;&lt;p&gt;I honestly don't think there is a minimum age. While it's true that very young children have a harder time thinking in abstract terms than adults, it does not mean that children are incapable of it. For example, I started teaching my daughter very basic shell commands at 7 years old. She's now 10 and is relatively fluent with the command line and can even write basic C programs.&lt;/p&gt;&#xA;&lt;p&gt;For her, the most important thing was to make it a requirement for her to use at least the very basics of the language in order to utilize the computer. I gave her a Debian-based system that was all hers. However, while I gave her a flash drive with a few games to play, I did not provide desktop icons for them. She had to learn how to open a terminal, change directories, mark files as executable, and run them. That satisfied her for a time, but eventually, she wanted to do more, like set a timer on the computer. That's when I taught her how to use the &lt;code&gt;sleep&lt;/code&gt; command.&lt;/p&gt;&#xA;&lt;p&gt;Other children might not learn the same way. You may not be able to, or want to, restrict their access to easier-to-use operating systems. Each child learns best in a different way. Despite that, there are a few things that everyone requires to learn a programming language:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;They must be comfortable typing (real typing, not hunt-and-peck typing).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They have to have a language that lets them &lt;em&gt;do&lt;/em&gt; something, not just see &amp;quot;Hello, World&amp;quot;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They need to enjoy it as a learning experience, not a chore.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;The choice of language&lt;/h2&gt;&#xA;&lt;p&gt;I would strongly recommend against JavaScript. The language is convoluted and often does not make sense intuitively. As for HTML and CSS, those are not programming languages but languages designed for markup. Unless you go into the complex HTML5 + CSS3 territory, they won't be enjoying it any more than you enjoy learning new serialization formats (which I presume you don't).&lt;/p&gt;&#xA;&lt;p&gt;Instead, I would recommend something like Bash. For a language that is more powerful, I would suggest either C or Python. The latter is certainly easier to learn, but C can help give a better understanding of low-level memory handling (yes, even young children can learn the difference between the stack and the heap!). Additionally, Python likes to enforce a maxim where there's only &lt;em&gt;one&lt;/em&gt; correct way to do something. This can limit creativity. There's nothing more enjoyable than giving a child a task and seeing them come up with a solution that you didn't even think of yourself!&lt;/p&gt;&#xA;&lt;h2&gt;Getting them interested&lt;/h2&gt;&#xA;&lt;p&gt;No one likes being forced to understand an abstract concept that they do not enjoy. If programming is taught as a strict logical language, it will be no more fun than math is for many kids. If, on the other hand, accomplishing a task will allow them to reap a reward, motivation goes way up. This can be done easily with robotics. Everyone, both boys and girls, loves robots! Machines like the Lego NXT can be programmed either using a silly graphical interface or in pure C.&lt;/p&gt;&#xA;&lt;p&gt;Basic programming can be learned by using an operating system shell. For children raised in the 80s and 90s, that often came from BASIC from various personal computers (Amstrad, Sinclair, etc.). Nowadays with fancy GUIs, that skill has been lost. You can re-introduce it with a shell of some kind, whether it's something like FreeDOS (a FOSS version of MS-DOS) or a Linux or UNIX distribution, a shell allows someone new to programming to see &lt;em&gt;immediate&lt;/em&gt; results.&lt;/p&gt;&#xA;" OwnerUserId="6182" LastEditorUserId="6182" LastEditDate="2022-11-02T02:05:07.767" LastActivityDate="2022-11-02T02:05:07.767" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="5216" PostTypeId="2" ParentId="5204" CreationDate="2018-11-10T16:22:36.087" Score="15" Body="&lt;p&gt;Never.&lt;/p&gt;&#xA;&lt;p&gt;My parents sent me to programming courses when I was 7-9 years old or so, the first half of the 80s. Completely useless knowledge today, but that is not the worst part of it - the worst part of it is that at a time when I should have learned to interact with other humans I spent a lot of time in front of a computer. I also took the STEM way through school and university because of this. It wasn't until I was around 25 I realised that this was completely wrong for me and I would never have elected to go to these courses as a kid unless my parents had pushed me.&lt;/p&gt;&#xA;&lt;p&gt;Programming is easy to learn, and probably will be even easier in 10-15 years when these kids have grown up. Kids don't need artificially more screen time or earlier introduction to computers than they will have anyway.&lt;/p&gt;&#xA;&lt;p&gt;These kids are far better of if you play board games with them, take them on a walk in the forest, read a book for them, play some football, teach them to swim, play an instrument, visit a farm and interact with cows and pigs or something like that. And yes, it is mutually exclusive with programming.&lt;/p&gt;&#xA;&lt;p&gt;If a 16-year-old wants to learn programming on her/his own initiative, fine but don't force young kids to live their parents' dreams.&lt;/p&gt;&#xA;&lt;p&gt;Besides, recently there has been a lot of articles about how the Silicon Valley elite stops their children from spending time with their phones and computers. That should make you think.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.businessinsider.com/silicon-valley-parents-raising-their-kids-tech-free-red-flag-2018-2?r=US&amp;amp;IR=T&amp;amp;IR=T&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.businessinsider.com/silicon-valley-parents-raising-their-kids-tech-free-red-flag-2018-2?r=US&amp;amp;IR=T&amp;amp;IR=T&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.theguardian.com/technology/2015/may/23/screen-time-v-play-time-what-tech-leaders-wont-let-their-own-kids-do&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.theguardian.com/technology/2015/may/23/screen-time-v-play-time-what-tech-leaders-wont-let-their-own-kids-do&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.thriveglobal.com/stories/silicon-valley-execs-are-wary-of-the-devices-they-created/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.thriveglobal.com/stories/silicon-valley-execs-are-wary-of-the-devices-they-created/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;and so on.&lt;/p&gt;&#xA;&lt;p&gt;That includes programming. Just. Don't. Do. It.&lt;/p&gt;&#xA;" OwnerUserId="6187" LastEditorUserId="27" LastEditDate="2021-07-16T03:42:34.253" LastActivityDate="2021-07-16T03:42:34.253" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5217" PostTypeId="1" CreationDate="2018-11-10T21:57:21.270" Score="5" ViewCount="801" Body="&lt;p&gt;I’m looking for the best way to maintain a school lab. There are 20 PCs in the lab. All with windows 10.&#xA;What would be the best way to configure them, so that the student will be able to use them, program in visual studio, eclipse, etc, but will not be able to corrupt the system?&#xA;Or provide a way to restore some baseline.&#xA;Currently using toolwiz timefreeze, but experiencing a lot of problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: while investigating the options and reading the (excellent) answers, I started to wonder, why not use windows built in functionality?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prevent windows destruction: provide the students with a user that cannot do installations and has it's own folder space.&lt;/li&gt;&#xA;&lt;li&gt;Restore: Use windows restore.&#xA;Am I missing something? Did someone tried it? with this solution, I would not need to install anything...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6188" LastEditorUserId="6188" LastEditDate="2018-11-13T09:11:45.600" LastActivityDate="2024-01-18T10:44:10.533" Title="Best way to install and maintain windows 10 in a computer lab" Tags="|classroom-management|windows|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5218" PostTypeId="2" ParentId="5204" CreationDate="2018-11-10T23:27:21.847" Score="4" Body="&lt;p&gt;If you teach them problem-solving you will help them far more than if you teach them the syntax of any programming language. Those that know problem-solving generally won't be coming to such classes to learn syntax.&lt;/p&gt;&#xA;&lt;p&gt;To have both kids and adults participate, I advise you to teach &amp;quot;physical programming&amp;quot; instead of stuff on the computer. It will be much easier to find a task interesting for both adults and kids no matter their age, and it will give even young child feeling he/she achieved something. Additionally, it is far more social than sitting in front of a computer - you could have everyone participate and &amp;quot;program&amp;quot; a single robot/car/... at the same time, or you could have pretty interesting competitions perhaps even with a small prize for the winner.&lt;/p&gt;&#xA;&lt;p&gt;Now, when to start - I wouldn't teach younger than 3 simply to avoid liability if they end up eating blocks or whatever. But if you push that liability to parents, you can teach even younger ones. Primary school kids are old enough you could have a group without parents present.&lt;/p&gt;&#xA;&lt;p&gt;To start as early as possible: Cubetto is a wooden robot that knows &lt;code&gt;forward&lt;/code&gt; and &lt;code&gt;rotate left&lt;/code&gt;/&lt;code&gt;right&lt;/code&gt; (by 90 degrees). Plus a single function that can take 4 commands. It is a decent choice for the classroom as it is fairly sturdy. There are other alternatives with similar difficulty (say code-a-pillar is cute and cheaper, but it will break faster). Tasks mainly involve variations of &amp;quot;how will we get from our current position over there&amp;quot;. Difficulty range is suitable from 2-7 or so, though you could create some &amp;quot;challenges&amp;quot; that wouldn't be trivial even for most parents.&lt;/p&gt;&#xA;&lt;p&gt;Primary school, teenagers, nearly everyone: Lego. Nearly everyone has Lego bricks at home, many have technic bricks too, so having something that fits right in is great. Plus, the difficulty range available is pretty huge - it won't be trivial even for adults that know programming. You can start with about 6-year-old children here. Nearly endless options what to do, competitive challenges are organized for primary schools every year and you could steal some of their ideas and put a fresh spin on it (depending on whether you want to increase or decrease difficulty - depends on your group age and skill).&lt;/p&gt;&#xA;" OwnerUserId="6190" LastEditorUserId="27" LastEditDate="2021-07-16T03:38:13.637" LastActivityDate="2021-07-16T03:38:13.637" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5219" PostTypeId="2" ParentId="5217" CreationDate="2018-11-11T00:11:27.117" Score="6" Body="&lt;p&gt;I have experience managing a lab for student-use. We utilized &lt;a href=&quot;https://www.faronics.com/products/deep-freeze/enterprise&quot; rel=&quot;noreferrer&quot;&gt;Deep Freeze&lt;/a&gt;. I was not responsible for configuring it, but based on what you say you would like to have in terms of OS management, I believe it would check those boxes. We could set specific times for booting up and shutting down. Additionally, we could restore a non-corrupt image each day if something happened. It allowed extensive control and security. I'd encourage you to look into it. I also don't know the cost, so I can't speak to what you'd be paying per device. However, it worked incredibly well across campus.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-11-11T00:11:27.117" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5220" PostTypeId="1" CreationDate="2018-11-11T04:33:02.500" Score="2" ViewCount="493" Body="&lt;p&gt;I was thinking this for quite long, should i teach my little brother about programming in the age of 7-8? Because it will help him in the future in 12th standard and in university life. I want him to learn C++, Java, Html.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think should i start teaching him or let him grow more till 10 or 12?&lt;/p&gt;&#xA;" OwnerUserId="6192" LastEditorUserId="204" LastEditDate="2018-11-12T10:38:32.990" LastActivityDate="2018-11-19T23:30:28.707" Title="Is it okay to teach C++ to my 7 year old brother?" Tags="|java|language-choice|programming|c++|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5221" PostTypeId="2" ParentId="5143" CreationDate="2018-11-11T07:40:38.787" Score="3" Body="&lt;p&gt;It shouldn't be so difficult to come to a point where she really wants to use arrays. Just ask her what she has done so far in the mathematics/physics part of her degree. I am 100% sure that there will be something for which she needed linear algebra to solve it. Decoupling of harmonic oscillators for example, or just any eigenvalue problem in quantum mechanics. Then ask her to write a program which does these calculations without using arrays. Make it big enough. &lt;span class=&quot;math-container&quot;&gt;$10\times 10$&lt;/span&gt;-matrices should do the job. If she doesn't give up after declaring 100 variables with distinct names, then she will definitely give up at the first instance of matrix multiplication, when she realizes, that she can't loop over those 100 names and that she has to write out every arithmetic operation one by one.&lt;/p&gt;&#xA;" OwnerUserId="6194" LastActivityDate="2018-11-11T07:40:38.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5222" PostTypeId="2" ParentId="5220" CreationDate="2018-11-11T15:33:11.290" Score="2" Body="&lt;p&gt;C++ seems like an awfully steep climb for someone that age with no experience. I'm not sure what educational resources are available directed at that age. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest that you start out with something more forgiving. Python has been a pretty good choice and has an OO core without quite so many &quot;guns, knives, and clubs&quot; which was an original description of the difference between Java and C++. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most important, however, is that there are materials available for both Python and Java that are directed at younger learners. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Java, for instance, the &lt;a href=&quot;https://www.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot system&lt;/a&gt; provides a graphical system that provides both a visual environment and a fairly strong programming support environment that is amenable to younger learners. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know of anything quite comparable in Python, but there may be some things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the things that you might want to think about is that a new learner doesn't need to start with a bare screen and no support, building everything as they go. Virtual worlds can be constructed, by teachers or authors, that enable a beginner to do interesting things much earlier than they can if they just start by learning int variables and &lt;code&gt;if&lt;/code&gt; statements. If you spend all of your time learning syntax and low level ideas you may not get to do anything interesting and so get bored easily. Better in many ways to work in and modify an existing system (in well considered ways) than to have to build up from nothing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-11-11T15:33:11.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5224" PostTypeId="2" ParentId="5204" CreationDate="2018-11-11T22:14:41.560" Score="3" Body="&lt;p&gt;&lt;strong&gt;&lt;em&gt;tl;dr&lt;/em&gt;-&lt;/strong&gt;  You probably shouldn't encourage youngsters to take your course if it's designed for adults.  Adults who want to program need to learn about specific syntax and technologies that can be used today, while children are better off focusing on the abstract concepts.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Adults and children tend to have different learning needs&lt;/h3&gt;&#xA;&lt;p&gt;Adults who want to program need to know the specific syntax, technologies, tools, and environments that exist today.  They need to know the quirks of different browsers (for JavaScript/HTML/CSS), the idioms of their chosen language, and the best practices for writing actual code.&lt;/p&gt;&#xA;&lt;p&gt;Children should also learn about programming, but their learning goals will tend to be different.  They have no need to know anything about today's web browsers, API's, idiomatic styles, etc., any more than a modern programmer needs to know about how to program an old-time computer with punch cards.  It's useless information – or, worse, potentially harmful misinformation that they'll be worse off for having to unlearn later.&lt;/p&gt;&#xA;&lt;p&gt;If a child's parents try to enroll them in your course, you might advise them that, while it's probably a good idea for their child to learn about programming, you're going to teach the details behind how to write programs for today's systems.  By contrast, their child is more likely to benefit from a course that focuses on the concepts behind how computers work, without wasting the student's focus on modern implementation details.&lt;/p&gt;&#xA;&lt;h3&gt;There may be exceptions&lt;/h3&gt;&#xA;&lt;p&gt;Some younger students might actually want to learn modern implementation details.  For example, there're kids out there who want to learn more for the same reasons adults do, such that they'll need to know the trivia behind present-day JavaScript/HTML/CSS even though that trivia is likely to be useless by the time they're an adult.&lt;/p&gt;&#xA;&lt;p&gt;In those cases, you might need to consider allowing them in your course on a more logistical level.  For example, are you prepared to handle a misbehaving child?  Are there any laws about childcare that must be observed?&lt;/p&gt;&#xA;&lt;p&gt;If you've got all of that covered, then you might choose to allow younger students into your course.&lt;/p&gt;&#xA;" OwnerUserId="39" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-11T22:14:41.560" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5225" PostTypeId="2" ParentId="5220" CreationDate="2018-11-12T08:22:32.610" Score="4" Body="&lt;p&gt;I want to tack on to Buffy's answer by focusing on one line from your question: &quot;&lt;em&gt;I want&lt;/em&gt; him to learn C++,Java,Html&quot; (emphasis added).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The bigger question should be &quot;What does &lt;em&gt;he&lt;/em&gt; want to learn?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the beautiful challenge that is teaching is getting students to want to learn what we want to teach them. What has your brother shown interest in? What has he told you that he wants to learn? What are his hobbies? How could something about those hobbies be expressed/constructed in a program? Above all else, &lt;strong&gt;where do his interests align with what you can teach him?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd encourage you to read &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1408/how-do-i-approach-teaching-python-to-12-year-olds-as-a-first-time-teacher&quot;&gt;this thread&lt;/a&gt; about starting students in Python, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3957/engagement-advice-on-creative-computing&quot;&gt;this thread&lt;/a&gt; on engagement with computing, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/4183/programming-language-for-teenagers&quot;&gt;this thread&lt;/a&gt; about programming languages for teenagers (shout out to Processing!), and &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5204/what-is-good-age-to-start-learning-programming&quot;&gt;our recent HNQ&lt;/a&gt; about the age at which students should begin learning programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make it fun and engaging for him. Have him build a game, one that he himself would want to play. The language skills will come with time (and intellectual maturity). What you can do now is two-fold: pique his interest for the future and teach him the essential concepts of computational thinking that underpin programming in any language.&lt;/p&gt;&#xA;" OwnerUserId="76" LastActivityDate="2018-11-12T08:22:32.610" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5226" PostTypeId="2" ParentId="5220" CreationDate="2018-11-12T10:36:57.427" Score="2" Body="&lt;p&gt;I have tried to learn and teach &lt;code&gt;C++&lt;/code&gt;, I have seen others try to learn or teach it. I have seen people come out of university, having “Learnt it”. I have seen no success. None of these people have learnt it well, few have learnt it at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only exception are those that first learn another OO language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best OO language to learn first is Eiffel. However I would not start with OO (For anyone). For a 7 year old, I would start with Scratch.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider also, not using a computer at all until age 11. That is no computer at all: no desktop, no laptop, no tablet. There is much computer science that can be learnt without a computer. See CS-unplugged. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-11-12T10:36:57.427" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5227" PostTypeId="2" ParentId="5217" CreationDate="2018-11-12T10:48:22.070" Score="4" Body="&lt;h1&gt;If I had to do it&lt;/h1&gt;&#xA;&lt;p&gt;I would run Debian Gnu/Linux on each machine, and then run Microsoft's Windows in Virtual-box. I would then use Virtual-box's snap-shotting tool to reset MS-Windows every time a student logs off.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Price: zero;&lt;/li&gt;&#xA;&lt;li&gt;Cost: probably some training of IT support staff;&lt;/li&gt;&#xA;&lt;li&gt;Time to restore: near zero, the time it takes MS-Windows to boot. though you could take the snapshot after boot, to make it faster. Other benefits you get Debian Gnu/Linux, as used by the top 500 super computers and most of the internet and web. )&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Alternatively&lt;/h1&gt;&#xA;&lt;p&gt;I would run Debian Gnu/Linux with Mono-Develop and Eclipse.&lt;/p&gt;&#xA;&lt;p&gt;Mono-Develop is a .net IDE. It is very similar to MS's Visual Studio: both are better than each-other, in different ways. It is hard to judge which is best. However Mono-Develop is Free. That is you have Freedom how you use it, you are also free to copy it, and to install it on any computer (including student's computer), and are free to keep it installed after graduation (there are other freedoms also).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-11-12T10:53:56.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5228" PostTypeId="2" ParentId="5198" CreationDate="2018-11-12T15:12:44.770" Score="1" Body="&lt;p&gt;What's &quot;hot&quot; changes.  And, as Yogi Berra said: &quot;It's tough to make predictions, especially about the future.&quot;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, fairly often, kids (high school, college, or even school drop-outs) are among the ones who spot (or create) the &quot;hot&quot; trends earliest.  So, one possibility is to attend &quot;hackathons&quot; and &quot;code camps&quot;, ones that attract a fairly young audience (but preferably not the commercially sponsored ones that are an attempt to exploit some free coding), and find out in what areas the &quot;kids&quot; are coding, as well as what tools they are using.  Hopefully, you've learned to hunt down and learn from online resources, as these things can happen a year or years before physical books and corporate courses appear.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the &quot;hot&quot; coding trend can die out fairly quickly as well.  By the time a shelf full of books on some coding language or toolkit appears in the stores, they might well be on their way to the remainder bin to make room for some newer &quot;hotter&quot; current tech trend.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2018-11-13T17:33:53.303" LastActivityDate="2018-11-13T17:33:53.303" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5229" PostTypeId="2" ParentId="5204" CreationDate="2018-11-12T23:16:42.523" Score="2" Body="&lt;p&gt;My minimum age would be 12-13ish.&lt;/p&gt;&#xA;&lt;p&gt;I taught myself programming at the age of 13, on one of the first-gen 8bit home computers. I consider myself to have been the ultimate nerd back then. I slurped up every bit of information I found in books or magazines. So that's that.&lt;/p&gt;&#xA;&lt;p&gt;My youngest child is 9 now, and quite the nerd as well - but for her, that still means games, Minecraft, etc. I daresay I have tried a little bit to encourage her exploring with Scratch etc., but hit little interest. Mainly because it is hard to motivate a 9yo finding a &amp;quot;domain&amp;quot; to program in - the joy in purely abstract stuff (like first data structures, control logic, etc.) is just not there for her, yet. She would be motivated by &lt;em&gt;results&lt;/em&gt; (like, and I kid you not, &amp;quot;Daddy, I would like to program... can you show me how I can program my own Minecraft, next weekend&amp;quot;). But anything you can program today is by necessity so vastly inferior to even the simplest web game etc. they can play, that it's hard if they are not internally motivated.&lt;/p&gt;&#xA;&lt;p&gt;For these ages, I found the Nintendo Labo series excellent, or websites like Pixel Papercraft, where they can combine child-adequate real-world skills (working with pen, paper, scissors, etc.) with &amp;quot;tech&amp;quot;. I fully expect us to upgrade to something like Lego Mindstorm or whatever gadgets there will be around when she's about 12-13. And I may introduce her to some programming using Javascript or something else which leads to immediate results (don't, also, dismiss the IoT angle, i.e., Arduinos and the like - having lights blinking, etc. can be fulfilling as well; and their language is far simpler than any PC language with its plethora of libraries and special stuff going on).&lt;/p&gt;&#xA;&lt;p&gt;There may obviously be exceptions, and it's harder in our case because she is only starting to learn English, so all the really good resources are closed to her yet. That may or may not be a factor you can alleviate if you roll your own course, obviously.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="9154" LastEditDate="2021-06-30T06:53:31.710" LastActivityDate="2021-06-30T06:53:31.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5232" PostTypeId="2" ParentId="5204" CreationDate="2018-11-13T17:12:25.333" Score="3" Body="&lt;p&gt;I am not sure if just a simple age number would suffice.&lt;/p&gt;&#xA;&lt;p&gt;I think, for a child to be able to learn to program, the following requirements need to be met:&lt;/p&gt;&#xA;&lt;h2 id=&quot;the-child-needs-to-be-able-to-write-simple-english-ehk3&quot;&gt;The child needs to be able to write simple English&lt;/h2&gt;&#xA;&lt;p&gt;For an English native speaker that means being able to write fluently. For a child that is learning English as a second language, that might be a lot later. When my father tried to teach me programming at the age of 10, my English was so poor that I struggled more having to memorize keywords than I did learning programming concepts. In the end, I gave up quickly. But when I tried it again at age 14, that was no problem anymore.&lt;/p&gt;&#xA;&lt;h2 id=&quot;the-child-needs-to-grasp-basic-math-iwp3&quot;&gt;The child needs to grasp basic math&lt;/h2&gt;&#xA;&lt;p&gt;I think the association between maths and programming is overrated (being a great programmer does not necessitate being a great mathematician). That said, knowing the basics of maths (especially variables, calculations, and functions) is necessary or at least greatly helps to understand some basic programming concepts. While the specifics of mathematical variables and functions and their programming counterparts differ slightly, knowing their mathematical version helps a lot to understand these programming concepts. Also, if they are old enough to understand the mathematical concepts, they are old enough to understand simple programming concepts.&lt;/p&gt;&#xA;&lt;h2 id=&quot;the-child-needs-to-be-interested-wm78&quot;&gt;The child needs to be interested&lt;/h2&gt;&#xA;&lt;p&gt;Especially at a young age being interested in the topic is more important than anything. And by that, I don't only mean that the child is interested in the idea of programming, but that the child actually likes doing it. Children (same as many other people) might have misconceptions of what programming is. They might like the idea of whipping up another Minecraft in half an hour, but they might not stick with it as soon as they learn that programming entails hours of concentrated hard work only to make something that looks rather simple.&lt;/p&gt;&#xA;&lt;p&gt;Another aspect of this is that many parents would like their kids to learn programming and send them to a programming course, even though the kids don't care for it at all. In such cases, it is almost impossible to teach them anything at all.&lt;/p&gt;&#xA;&lt;h2 id=&quot;abstract-thought-7u09&quot;&gt;Abstract thought&lt;/h2&gt;&#xA;&lt;p&gt;Depending on what exactly you want to teach, some things might require some abstract thoughts abilities that are only developed during the development of the child. But firstly, the age where these abilities are developed varies wildly. Secondly, these abilities are rarely what limits a child from understanding programming.&lt;/p&gt;&#xA;&lt;p&gt;As a side note: don't start with JS/HTTP/CSS. This might be a good start for an adult, but it is a terrible start for a child. There are just way too many dependencies that they need to learn before they can make something cool.&#xA;In my work teaching youth programming I found, that to keep them motivated it is important that they learn to do something cool, something fun, and something that they can show off. I like to use Python. Within the first ten minutes or so I teach them about text input and output, ifs and variables. I don't go into details here, just do the very basics. Then I let them start on their own little text adventure game. After they built the first few scenes, I show them loops, to make a combat scene or something like that. Then I show them, that it is much easier to organize each scene into a function, that is called from another function. Then I show them how to use returns and the main loop to avoid a long call stack (each scene function now returns the next scene's function that is executed in the main loop).&#xA;On the second day, I use a library like pygame to show them how to make a little graphical game, like a scrolling racing game. Again, skip specifics and only teach the minimum necessary. There is enough time for specifics later.&lt;/p&gt;&#xA;&lt;p&gt;Just don't ever use the textbook approach with kids, where you basically go through a 500-page book and still are stuck in the command line having built nothing at all.&lt;/p&gt;&#xA;" OwnerUserId="2858" LastEditorUserId="9154" LastEditDate="2021-07-15T15:22:50.323" LastActivityDate="2021-07-15T15:22:50.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5233" PostTypeId="1" CreationDate="2018-11-14T10:07:51.883" Score="3" ViewCount="104" Body="&lt;p&gt;As one learns programming, how useful it is to spend time to solve hard problems? Like, I saw a problem solving site where one task is for example to find a regular expression for decimal numbers divisible by 9 or do regular expression for a particular problem that is as small as possible (in sense of number of characters in the expression). Is there worth of spending time to try those kind of problems or should one always try to solve problems as easily as possible?&lt;/p&gt;&#xA;" OwnerUserId="6230" LastActivityDate="2018-11-16T02:23:43.623" Title="Should one study programming by doing hard problem?" Tags="|self-learning|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5234" PostTypeId="2" ParentId="5233" CreationDate="2018-11-14T11:40:32.300" Score="3" Body="&lt;p&gt;It is probably a mistake to &lt;em&gt;always&lt;/em&gt; do one or the other. If you are learning a hard task (becoming a competent programmer), it isn't helpful if you mix in another hard task as well (hard problems). Initially, it is good to write programs for problems that you already understand well, so that you can focus on the creation. A program has both form and content. If you work on very hard problems exclusively, it is possible that you will wind up just hacking a solution together without any elegance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you never solve hard problems it won't become clear to you why advanced programming structures and paradigms are needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice would be to start out your programming education with fairly easy problems - that you can get your mind around easily. But mix in a harder problem or two as you go. Then when you become more proficient with the forms, move to harder problems and occasional very hard ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are stretching your brain in two dimensions here. Eventually you want it to be very flexible. But you can stretch more in one dimension than the other at a time. If your problems are so difficult that you get frustrated then you may not make much progress on any dimension. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, of course, problems that seem hard to a novice programmer, may not seem very hard to a pro. You learn a lot of tricks-of-the-trade as you go along. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also the problem that you mentioned doesn't result in a very big program. It is a bit tricky, of course, but very small as programs go. You want to reach a place where you can intelligently create &lt;em&gt;very&lt;/em&gt; large programs. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-11-14T11:59:54.683" LastActivityDate="2018-11-14T11:59:54.683" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5236" PostTypeId="2" ParentId="1408" CreationDate="2018-11-14T18:41:58.230" Score="1" Body="&lt;p&gt;The important thing to focus on is basic programming concepts. The language itself isn't as important at this early stage. I'll shamelessly promote my book, because it is appropriate here: &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/1718198450&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Super Simple Programming Book: Learn Basic Programming Concepts With Python&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a quick read, and it uses short and simple programs to teach the fundamental programming concepts like data, input/output, loops, decisions, etc. The book assumes no prior programming experience or knowledge. It uses a friendly and inviting tone as well. I must warn you that it isn't a good reference, because it doesn't aim to be. The goal is to quickly build a foundation, so students can continue their programming journeys on their own.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2018-11-14T18:41:58.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5237" PostTypeId="2" ParentId="5204" CreationDate="2018-11-14T18:46:27.323" Score="0" Body="&lt;p&gt;I think it really depends on the level you want (or are qualified) to teach at. There are &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/158089884X&quot; rel=&quot;nofollow noreferrer&quot;&gt;programming books for toddlers&lt;/a&gt;. Code.org has &lt;a href=&quot;https://studio.code.org/courses&quot; rel=&quot;nofollow noreferrer&quot;&gt;courses for K-12&lt;/a&gt;. The additional challenge with using HTML/CSS/JavaScript is that you also have to teach some web development concepts. A standalone programming language like Python or Java might be better, depending on your goals and motivations.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2018-11-14T18:46:27.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5238" PostTypeId="2" ParentId="4781" CreationDate="2018-11-14T18:52:59.957" Score="1" Body="&lt;p&gt;People are different, so what's &quot;fun&quot; depends on the person. But in my experience teaching college students, the most fun programming assignments are games or contests. For example, I have an assignment where students must create HTTP clients to move their characters around a 2D board (which I display on a screen). After some practice, I reveal an AI &lt;em&gt;villain&lt;/em&gt; that will chase students and &quot;eliminate&quot; them. I've never seen more laughter and enjoyment in my classes. Some students continued working on the assignment at home, to try and defeat the villain. That's when you know your assignment is fun, and more importantly, effective.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try out some of the King of the Hill (KoTH) programming concepts here: &lt;a href=&quot;https://codegolf.stackexchange.com/search?q=KOTH&quot;&gt;https://codegolf.stackexchange.com/search?q=KOTH&lt;/a&gt; . You might find some examples to work with.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2018-11-14T18:52:59.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5239" PostTypeId="2" ParentId="5233" CreationDate="2018-11-14T19:28:30.653" Score="3" Body="&lt;p&gt;This question reminds me of the thought-provoking question: &lt;em&gt;Would you rather slay one horse-sized duck or 100 duck-sized horses.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For beginners, I recommend solving lots of simple problems. This practice is crucial to learning, because all the programming concepts are new, and you need to experience them. For example, sometimes it takes several programs that use a single &lt;strong&gt;for&lt;/strong&gt; loop to really understand how a &lt;strong&gt;for&lt;/strong&gt; loop works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For advanced programmers, the hard problems can be beneficial. But what makes them hard? Is it the length of the program? Is it low-level or advanced concepts (e.g., threads). I would accept a very difficult assignment if it meant learning something useful or desirable.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, I tell my students to practice writing lots of programs, no matter how small/large, easy/difficult. Any program is better than not writing one.&lt;/p&gt;&#xA;" OwnerUserId="1529" LastActivityDate="2018-11-14T19:28:30.653" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5240" PostTypeId="2" ParentId="5217" CreationDate="2018-11-14T20:09:58.310" Score="0" Body="&lt;p&gt;We are using bwLehrpool for very large installations. The project wiki is here &lt;a href=&quot;https://www.bwlehrpool.de/doku.php/allgemein/was_ist_bwlehrpool&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bwlehrpool.de/doku.php/allgemein/was_ist_bwlehrpool&lt;/a&gt;, but unfortunately it is in German and the service is for universities in one of the German federal states, but maybe this answer is helpful for someone in the same situation as we are.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-11-14T20:09:58.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5242" PostTypeId="1" CreationDate="2018-11-15T22:41:00.950" Score="5" ViewCount="287" Body="&lt;p&gt;We are teaching an &quot;introduction to cs&quot; course (bachelor level) and in the first half of a year students are learning the fundamental principles of procedural languages. We are using python 3 and C as exemplary languages for this part. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up until now, I moved on to C++ and the object oriented part of python 3 in the second half of the year to demonstrate object oriented languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Java is currently tought in the third semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All three languages will be needed by the students later on, so the pros and cons of C, C++ and python 3 are not part of the question...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now we decided to start introducing Java one semester earlier instead of C++. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While we were discussion the course design I joked &quot;why don't we just skip Java and move to Kotlin&quot;, and since I had this idea I'm really considering it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you already have experiences with Kotlin in teaching? Would you consider replacing Java entirely by Kotlin? Or would you just mention its existence?&#xA;Any pros and cons? How about GUI design etc. (I used qt in the old course)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our students might develop smartphone apps as well as webservices in those languages. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2019-02-13T16:33:31.280" Title="Java or Kotlin for beginners (procedural programming knowledge is existing)?" Tags="|java|programming|kotlin|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5243" PostTypeId="2" ParentId="5233" CreationDate="2018-11-16T02:23:43.623" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Is there worth of spending time to try those kind of problems or should one always try to solve problems as easily as possible?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;You should work on problems that are fun and interesting to you, and that are slightly harder than the problems you're already comfortable with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming is a &lt;strong&gt;craft&lt;/strong&gt;, similar to playing a musical instrument or playing a sport. You have to &lt;strong&gt;practice&lt;/strong&gt; programming to improve, exactly the way you have to practice playing the piano or throwing a baseball.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When learning to play the piano, do you always play the songs that are easiest for you, or do you always try to play the hardest song ever written? When learning how to hit a baseball, do you only practice with slow underhand tosses, or do you only practice with 100 MPH curveballs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer is none of the above. You practice by getting a little bit better every day. For piano, maybe you learn a new song that's a little bit more complicated than the song you learned last month. For baseball, maybe you practice with somebody who throws the ball a little bit faster over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same is true of programming. You have to meet yourself where you are. Don't spend too much time on stuff you already have memorized (although, there is some merit to &lt;a href=&quot;https://en.wikipedia.org/wiki/Kata_(programming)&quot; rel=&quot;nofollow noreferrer&quot;&gt;programming kata&lt;/a&gt;), but don't spend too much time struggling on impossible problems either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, you should try to keep yourself just slightly outside of your own comfort zone. You also might want to read about the &lt;a href=&quot;https://en.wikipedia.org/wiki/Zone_of_proximal_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;zone of proximal development&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Specifically, here's what I recommend:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Give yourself an achievable goal.&lt;/strong&gt; The goal should be fun and interesting to you, and it should be achievable in a reasonable amount of time. A single weekend is a good starting point. Finish that goal, and then iterate. Explore topics that you're interested in, but do it with short achievable steps.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-11-16T02:23:43.623" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5244" PostTypeId="2" ParentId="5198" CreationDate="2018-11-16T02:35:33.660" Score="0" Body="&lt;p&gt;&lt;strong&gt;Learning is not a &lt;a href=&quot;https://en.wikipedia.org/wiki/Zero-sum_game&quot; rel=&quot;nofollow noreferrer&quot;&gt;zero-sum game&lt;/a&gt;.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning about statistics does not mean that you can't, or won't, learn Python or R. Learning about C++ does not mean you can't, or won't, learn about 3D modeling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, learning one thing often makes it easier to learn other things, even if they seem unrelated at first. For example, maybe somebody with a background in statistics can learn more about Python using a statistics library. Or maybe somebody who knows C++ can learn about 3D modeling by importing their models into a graphical engine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of these things are &lt;strong&gt;tools&lt;/strong&gt;, just like a hammer or a saw. A carpenter doesn't learn about a saw &lt;strong&gt;instead of&lt;/strong&gt; learning about a hammer. They learn about both, and part of their expertise is knowing when to use each.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In big data or machine learning, I need to know statistics, but will I use it more than python and/or R?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It completely depends on the specific role. There are some machine learning roles that are more statistics than programming. There are other machine learning roles that are more programming than statistics.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In Virtual Reality or Video Games I need to know Unity and there's a lot of 3D in it, so, will I do modeling in 3D more than programming on C++?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It completely depends on the specific role. There are some game development roles that are more 3D modeling than software development. There are other game development roles that are entirely software development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've cherry-picked a few examples of some skills you might need in some of these roles, but it's a &lt;a href=&quot;https://en.wikipedia.org/wiki/False_dilemma&quot; rel=&quot;nofollow noreferrer&quot;&gt;false dichotomy&lt;/a&gt;. Machine learning requires people from many different backgrounds: programming, statistics, ethics, management, customer support, API development, etc. Game development requires artists, programmers, level designers, sound engineers, writers, colorists, etc. Not every game is made in Unity. Not every game is 3D.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, do what you enjoy the most, and stop worrying about it. I'll repeat the advice I just gave in &lt;a href=&quot;https://cseducators.stackexchange.com/a/5243/2068&quot;&gt;this question&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Give yourself an achievable goal.&lt;/strong&gt; The goal should be fun and interesting to you, and it should be achievable in a reasonable amount of time. A single weekend is a good starting point. Finish that goal, and then iterate. Explore topics that you're interested in, but do it with short achievable steps.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-11-16T02:35:33.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5245" PostTypeId="1" CreationDate="2018-11-17T18:41:05.247" Score="8" ViewCount="360" Body="&lt;p&gt;I am not a teacher.  I'm an adult with learning disabilities.  I have autism and memory problems.  As a child, I was way behind and stuck in &lt;a href=&quot;https://www.gemmlearning.com/can-help/learning/info/specific-learning-disability/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SLD&lt;/a&gt;, where the teachers had little interest in teaching, so I learned nothing.  Nor did I have an interest in learning, until I..  Well, had stolen a science book from a class room, 3 grades up, and I began doing the work out of it on my own for fun.&lt;/p&gt;&#xA;&lt;p&gt;Now I'm an adult and have made nothing of my life but I've found a new obsession and that's to learn everything I can about computer science, but it's not that easy to teach myself.  I find it frustrating but I keep going.  My question is, is it even possible for someone like me (who can't even do math) to learn, remember and deploy what I learn?  Should I just give up? I would like to have a job in the field some day, but I feel I'm just not good enough to try any more.&lt;/p&gt;&#xA;" OwnerUserId="6242" LastEditorUserId="1090" LastEditDate="2022-03-16T17:49:55.693" LastActivityDate="2022-05-18T16:41:06.230" Title="Learning disabilities as a barrier - should I stop learning?" Tags="|student-motivation|self-learning|" AnswerCount="6" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5246" PostTypeId="2" ParentId="5245" CreationDate="2018-11-17T21:20:13.560" Score="4" Body="&lt;p&gt;Yes, I think you should stick with it. There is much you can learn and achieve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are different routes you can go depending on what you are comfortable with doing. You could continue to learn informally or you could try and enter a formal program of education at an appropriate level. As mentioned by @Buffy it might be useful to have someone who can assist you in thinking about the best path.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also depends on your final goal - do you want to just work with computers or do you want develop new computer hardware or new computer software, or do you just like the problem solving?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some paths to working with computers, particularly computer science might need some school level qualifications in things like science, maths and English. Although you found these hard before, now you are older you might be able to make progress. I don't know about your locality but in many areas there are colleges that can help adults who are late returners to education to get the necessary catch-up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it may not be straightforward for you. I know some adults on the autistic spectrum have had such traumatic experiences in earlier school that returning to formal study would be one of their stress points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The start for computer science is to begin with the basics and learn how simple computers work and not get bogged down in the detail of modern computers. You can then build up from that basic. Building computers from parts, installing operating systems and doing hobbyist activities, perhaps by finding a local group is also another possible route.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is so much to learn by just working with computers that I (and others around here on Stack Exchange) have been doing it for some considerable time (half a century) and still learn new stuff about computers every day.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think if we knew more about what motivated you we could give less general answers, but I wanted you to see that someone was thinking about how to help.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;sub&gt;&lt;sup&gt;PS: I do work in higher education with students with learning disabilities, particularly on the autistic spectrum and see success stories every year.&lt;/sup&gt;&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2018-11-17T21:20:13.560" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5247" PostTypeId="2" ParentId="5245" CreationDate="2018-11-17T21:50:11.123" Score="5" Body="&lt;p&gt;This may take more than one edit to finish. Please be patient. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no reason to give up. There are many highly ranked people in the CS community who are pretty far out on the autism spectrum. But they have learned to act productively. With effort, you can too. But it takes a lot of effort, as you know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My first recommendation is to develop a &lt;em&gt;skills assessment&lt;/em&gt; for yourself. What do you do well and what do you find hard. Your assets and liabilities. A trusted advisor can help you with this as he/she can see things that you miss. Then you want to apply your strengths to help overcome your weaknesses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The most important thing, in my view, is not that you achieve any particular level of competence, but that you develop a satisfying life for yourself, whatever that is, and whatever that takes. Your post seems to suggest that it will include pushing yourself as hard as you can. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you believe yourself to have both poor math and CS skills, you may need to work on both of those. But you can do it together, and a bit at a time. But if you have a typical case, one of your strengths is that you can focus intently. That is helpful in both math and CS. Work on some CS idea/problem. If the math gets sticky, then go to that for a bit to work on the basics. Your progress may be slow at first, but that is true of nearly everyone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't depend on memory alone for learning. Take lots of notes - and I recommend paper notes for it, not computer notes. Writing out ideas is a form of practice that will solidify the concepts in your mind. When you are out wandering about, make sure you have something to write on - such as a few index cards, on which you can capture ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If social interaction is a big difficulty for you, you should also find ways to work on that. One way to interact with people without losing yourself is to learn to role-play the way actors do. You try to &quot;become&quot; someone that can interact freely, just by pretending you are someone else who has that skill. An important CS researcher/speaker/writer developed these skills by joining an acting group in which the roles were formalized. He is an excellent public speaker now. It will be psychologically very difficult at first, but this idea has been used successfully. I don't have quite the same difficulty, but improved my social interaction just by forcing myself to speak when I'd rather just &quot;hide.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing you may need is an academic guide. The classroom may not be your most comfortable environment, but the stated curriculum of a college can give you a sense of what is important to learn so that you work toward meaningful goals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I'll try to improve this as I think of things)&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-11-17T21:50:11.123" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5248" PostTypeId="2" ParentId="5245" CreationDate="2018-11-18T15:14:08.907" Score="6" Body="&lt;h1&gt;Do it for the fun of it&lt;/h1&gt;&#xA;&lt;p&gt;You say that you have made nothing of your life; You say that you have an obsession with learning CS. If so then what does it matter what the outcome is. If you enjoy it then continue to learn.&lt;/p&gt;&#xA;&lt;h1&gt;It's not you&lt;/h1&gt;&#xA;&lt;p&gt;I used to have a learning disability, but then I got a new teacher.&lt;/p&gt;&#xA;&lt;p&gt;You seem to blame your self. Autism is not a &lt;strong&gt;bad&lt;/strong&gt; thing, is is a &lt;strong&gt;different&lt;/strong&gt; thing. Just because you teachers did not know how to teach you, it does not mean that you are unteachable. You showed that, when you stole that science book. I did the same think with a maths book, when in year 6. I was expected to work my way through what seemed like an endless supply of maths books. One day I took the last book several grades above where I was working. I was motivated and completed the book, I then stole the teachers grading book and marked it my self (the teachers would not help). I had got close to 100%. It was at this point that I realised that my disability was the teachers. Shortly after this I changed school, and made a lot of progress.&lt;/p&gt;&#xA;&lt;h1&gt;Autism and programming&lt;/h1&gt;&#xA;&lt;p&gt;As a software engineer I worked with a lot of people. I have Dyslexia, some were normal, some were jerks, some had autism, etc. The people with autism and some others, were not good at working with the wider company, but were very good programmers. We protected them from people they did not know well, because we valued them. We could give them jobs that they could do better than the rest of us. Everyone has strengths, but they are not all the same. Don't judge yourself or others by what they can not do, but by what they can do.&lt;/p&gt;&#xA;&lt;h1&gt;What to learn&lt;/h1&gt;&#xA;&lt;p&gt;Most importantly learn what interests you.&lt;/p&gt;&#xA;&lt;p&gt;You have a massive advantage, because you are not aiming toward exams, or work targets. These often cause people to take short-cuts across the swamp, and to get stuck. You can learn in a way that maximises learning.&lt;/p&gt;&#xA;&lt;h1&gt;“Someone like me”&lt;/h1&gt;&#xA;&lt;p&gt;If you believe you can, or if you believe you can't, then you are correct; Your belief in your ability has a very big affect on what you can do, so carry on with you positive thinking. And when you mess-up (because you will; we all do), then just try again. Success is the ability to continue in the face of failure.&lt;/p&gt;&#xA;&lt;p&gt;Have a watch of this video&#xA;&lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve?language=en&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve?language=en&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;“Success is the ability to continue in the face of failure.” (thanks to clive in the comments)&lt;/li&gt;&#xA;&lt;li&gt;“SUCCESS consists in staggering from failure to failure without loss of enthusiasm.” (found by me, probably once said by someone famous)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2022-05-12T17:16:42.187" LastActivityDate="2022-05-12T17:16:42.187" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5249" PostTypeId="2" ParentId="5242" CreationDate="2018-11-19T18:21:00.723" Score="1" Body="&lt;p&gt;My preferred curriculum is to teach relatively few languages explicitly, but require others in projects, even large projects. Then draw it together in a &lt;em&gt;principles&lt;/em&gt; course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students in the US come to a CS program knowing some imperative programming, even if they think of it otherwise. But their background is usually very weak and they don't write effective or maintainable programs. They write too few, too large functions, for example with deeply nested logic structures that are hard to unpack. They need to be taught how to write differently. It can be a struggle for many to not just build deeper and deeper logic structures, with lots of badly named flags, etc., hacking a more or less workable solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in my view, the curriculum, as it relates to programming, focuses on abstraction and how to use it effectively in the different programming paradigms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, three languages are sufficient to cover (most of) the ground. A low level language in which you can write things that need to be close to the machine. An object-oriented program in which you can discuss the various kinds of abstraction and encapsulation. A functional language in which you can discuss higher level constructs (first class functions, etc). If that is followed by a &lt;em&gt;language principles&lt;/em&gt; course in which you can take a meta level view of the language paradigms, it should be possible, in theory, for a student to learn any new language (until a new paradigm comes along). Paradigms are, by their nature, hard. The principles course can dip a toe into several languages other than the ones the students know, just to give them the flavor of the range of possibilities. This is separate from any compiler course, though. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My preferred method is to start with the OO paradigm as it is sort of mid-way between imperative and functional. I don't start with low level constructs (int, float, if, while) however, but with OO features programmed in a prepared simulation that allows Turing Complete programming without any of the low level detail. The &quot;primitives&quot; of the simulation are much higher level, constructed objects with well defined behavior. From that base you can introduce both higher and lower level ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The German system, however, has much more opportunity to do various things as there are more courses in the curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, actually &lt;em&gt;teaching&lt;/em&gt; both Python and Java seems to be a waste of resources to me. Teach one and in another course, do a project in the other. The ideas are nearly the same and the differences can be learned by osmosis. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know Kotlin, actually, but brief examination suggests that its benefit is in concurrency. That is actually a different paradigm, of course, to the &quot;big three&quot;. But if they know Java or Python, a project based course focusing on concurrent programming in Kotlin might be feasible, with relatively little emphasis on the other features of the language. I wonder a bit if the language is stable enough currently to make it a fundamental part of a curriculum. Hence a project rather than a full course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-11-19T18:21:00.723" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5250" PostTypeId="2" ParentId="791" CreationDate="2018-11-19T23:11:38.473" Score="1" Body="&lt;p&gt;A refrigerator: You put food in the freezer. To take out oldest food, first, you need to take out all newer food.&lt;/p&gt;&#xA;" OwnerUserId="6176" LastEditorUserId="6176" LastEditDate="2018-11-20T00:22:59.443" LastActivityDate="2018-11-20T00:22:59.443" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5251" PostTypeId="2" ParentId="5220" CreationDate="2018-11-19T23:30:28.707" Score="1" Body="&lt;p&gt;It's okay, but I think it's a bad idea. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've taught my kids C++ when they were age of 9 using a beginner book on building a game using C++ after they had a brief education on Scratch and Python. They liked it, but I thought it was a waste of time because the language, toolsets and many of study materials are not kids friendly. Almost everything about C++ slows them down compared to higher-level languages such as Python and JavaScript. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The better order for kids to learn programming is Scratch -&gt; Python -&gt; JavaScript. Once they build a solid foundation how to program and solve problems with Python and/or JavaScript (this will take at least a year or two), you may consider teaching more advanced languages such as Java and/or C++.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unlike olden days when there were good reasons to learn Java or C++ as a language of choice, the benefit of learning Java or C++ is shrinking fast for beginners these days because there are so many materials and opportunities available for easier languages and growing support for those languages. For example, many programming competition websites and event the UASCO training site support Python. In the past, many of sites only supported Java and C++.&lt;/p&gt;&#xA;" OwnerUserId="6176" LastActivityDate="2018-11-19T23:30:28.707" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5252" PostTypeId="2" ParentId="5157" CreationDate="2018-11-19T23:50:23.643" Score="1" Body="&lt;p&gt;I think the example you showed on the original question is more about exception handling and unit testing rather than explaining the concept of function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to teach students on explaining the concept of function in a very simple way such as &quot;Why is a lego so successful? Because it uses blocks! Function is like a lego block. It's about reusability, modular programming.&quot;, and give them enough time (maybe several weeks or so) to practice with different kind of examples to naturally get familiar with using functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The error-handling and unit-testing are more advanced concept and technique. It's probably best to teach these concepts once students are pretty good at writing code in general. I would suggest to actually teach this almost at the end of the course. It's important in the real-world software development, but for learning, I think these are less important compared to other topics.&lt;/p&gt;&#xA;" OwnerUserId="6176" LastActivityDate="2018-11-19T23:50:23.643" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5254" PostTypeId="1" CreationDate="2018-11-20T14:55:37.823" Score="-1" ViewCount="88" Body="&lt;p&gt;I am a CSE undergrad 1st yr student. I would like to know how software that companies use change from time to time. Can't they have a single standard software? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example: in my school they suggested me to use Borland C++ but I also had Turbo C++ in my PC so I realized that it was some except some variations were there.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If so suggest me a site where you can come across standard software for different languages. &lt;/p&gt;&#xA;" OwnerUserId="914" LastEditorUserId="2068" LastEditDate="2018-11-20T18:49:03.437" LastActivityDate="2018-11-20T19:19:30.490" Title="Standardization of software" Tags="|programming|c++|" AnswerCount="1" CommentCount="3" ClosedDate="2018-11-20T19:19:32.033" ContentLicense="CC BY-SA 4.0" />
  <row Id="5256" PostTypeId="2" ParentId="5254" CreationDate="2018-11-20T19:19:30.490" Score="2" Body="&lt;p&gt;Programming languages are like tools. Different tools are better for different tasks. Hammers are useful for certain tasks, and saws are useful for other tasks. The same is true of programming languages and other programming tools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, one construction company might get their &lt;a href=&quot;https://en.wikipedia.org/wiki/Lumber&quot; rel=&quot;nofollow noreferrer&quot;&gt;wood&lt;/a&gt; from a place that only sells full-sized logs, which they then have to saw into individual lumber pieces. Another company might get their wood from a place that sells individual lumber pieces, so they don't have to saw it themselves. That first company would require more saws than the second company.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back to programming: maybe one company designs software for embedded systems. They'd probably use more C, or maybe even machine language. Another company might design web applications. They would be more likely to use JavaScript or other web technologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even with C++, there can be differences. Maybe one company is working with a legacy system that requires them to use a particular version of C++, but another company is only working with a single system so they can use the latest and greatest version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each company is working towards a slightly different set of goals, so their technology (the set of tools they use) is going to be slightly different. You aren't going to find a single source of &quot;standard software&quot; because there's no such thing.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-11-20T19:19:30.490" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5257" PostTypeId="1" AcceptedAnswerId="5259" CreationDate="2018-11-25T15:20:37.940" Score="4" ViewCount="2301" Body="&lt;p&gt;Some students think that programming courses are tough and hard. I personally know some teachers who say to their students that programming is not their cup of tea. How much percent this thing is true that learning programming is tough. According to me if people interested in this then nothing is difficult for them. How can I convince my students that programming is not as difficult as they think?                       &lt;/p&gt;&#xA;" OwnerUserId="6226" LastEditorUserId="6719" LastEditDate="2019-03-13T14:49:10.937" LastActivityDate="2019-04-05T15:16:50.167" Title="Why some students think that programming is difficult and hard to learn, how I convince my students that programming is not difficult as they think?" Tags="|best-practice|student-motivation|programming|" AnswerCount="9" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5258" PostTypeId="2" ParentId="5257" CreationDate="2018-11-25T15:28:33.067" Score="5" Body="&lt;p&gt;Everyone finds some things hard. It differs for different people depending on their background and their interests. But it also depends on the quality of their teaching. More important, some people catch on to new things more quickly than other things and more quickly than other people on a given task. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't be likely to tell a student that this is so hard that you aren't going to get it. That would set an expectation that would be hard to overcome. But I might want to say that this will take some time and effort to master. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good teaching of programming (like most things, actually) requires lots of practice and lots of feedback. You don't learn it by listening to a lecture &lt;em&gt;about&lt;/em&gt; it. You have to actually &lt;em&gt;do&lt;/em&gt; it. It is like a lot of physical activities, in fact. If you want to learn to swim, you need to practice it. A lecture isn't going to make you a swimmer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, they won't find it easy just because you tell them it is easy. That could be frustrating to those without the needed background. You need to show them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to do this effectively is to &lt;em&gt;flip the classroom&lt;/em&gt; in which the activities that they do when face-to-face are not listening to lectures, but actually programming, building a project. This can be most effectively done in small groups (pairs) so that they can teach one another to a certain extent and you have fewer interventions you need to make when someone goes off course for a bit. Their &quot;homework&quot; isn't to do some programming assignment, but to read (book, online, handout) what would otherwise be a lecture. You can test the readings with simple, short, quizzes that don't contribute much to the grade. You don't want to stress memorization, but practice, hence make the quizzes count for relatively little compared to the advancement of programming projects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One interesting thing that students can do for &quot;homework&quot; is to read a program that has the features you want them to know and ask them to write a few paragraphs explaining it. Writing of any kind is always useful for students and this will let you see if they get it or if you need to spend time on certain details. I'll note that much of what goes on in a traditional lecture doesn't really need to be said, as nearly all of your students will already understand it without the lecture. They still need the practice of course, but knowing who needs extra help is important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, students can &lt;em&gt;repair&lt;/em&gt; a program with minor errors of the sort that is the current topic of interest.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-11-25T15:42:52.630" LastActivityDate="2018-11-25T15:42:52.630" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5259" PostTypeId="2" ParentId="5257" CreationDate="2018-11-25T15:38:52.897" Score="11" Body="&lt;p&gt;Careful! That's a pretty aggressive statement, and is liable to make folks who really do have trouble feel pretty bad about themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may want to take a look at &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3881/is-there-some-meaningful-percentage-of-students-who-cant-learn-to-program&quot;&gt;this question&lt;/a&gt;. Whether you believe the answer to ultimately be yes or no, you will find that even the most adamantly &quot;no&quot; teachers admit to some number of students who have enormous difficulties &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interest is highly important, of course, but how your brain is wired matters a great deal as well. Don't discount real difficulties that people face. That's the kind of thing that causes people to beat themselves up mentally, when they're alone with their own thoughts.  Interest is important, but may not be sufficient, and dismissing the problems others face can be unkind.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-11-25T15:38:52.897" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5261" PostTypeId="2" ParentId="5257" CreationDate="2018-11-26T08:54:08.863" Score="3" Body="&lt;p&gt;In addition to the other answers: I'm usually telling my students, that a programming language is easy to learn - the basic vocabulary is just about 10-20 words and in their language courses they learned more words in a shorter period of time. Even the grammar is much simpler then in natural languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually they are a bit shocked when I tell them in week 3-4 that they now know everything they need to build their own Word / Windows / racing game / ... So there must be something else! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I try to give them small assignments and enough time to play around with every new concept. Once they feel that they can accomplish even little things, the motivation to learn more is better. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastEditorUserId="104" LastEditDate="2019-03-24T07:57:14.277" LastActivityDate="2019-03-24T07:57:14.277" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5262" PostTypeId="1" CreationDate="2018-11-26T18:22:45.347" Score="6" ViewCount="150" Body="&lt;p&gt;I've been teaching inductive proofs of code correctness to high school students for three years now, and the instruction has steadily improved.  Many of the students come in not having done inductive proofs in math yet, so it takes some time to teach this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As of this year, the large majority of my students are writing virtually 100% correct proofs for algorithms that they have never seen before.  However, this takes a large amount of class time (many weeks), and it has become a box-ticking exercise that the students are not excited by.  This is certainly not what I want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are a list of some of my personal favorite takeaways from this unit:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You are proving an infinite number of things using a finite amount of ink.&lt;/li&gt;&#xA;&lt;li&gt;We normally conceptualize our variables as just that: variable.  But really, they are a cascading series of constants, and the reality is that the runtime program goes sliding through these constants. We can designate these constants using subscripts.  If you have a &lt;code&gt;for&lt;/code&gt; loop in which &lt;code&gt;i&lt;/code&gt; increments from 0 to 50, &lt;span class=&quot;math-container&quot;&gt;$i_0$&lt;/span&gt; is always 0, and &lt;span class=&quot;math-container&quot;&gt;$i_1$&lt;/span&gt; is always 1.  They're not truly variable.  It's a subtle distinction, but I find it beautiful, and I also believe that it is a nice lead-in to that aspect of functional programming.&lt;/li&gt;&#xA;&lt;li&gt;We can make real guarantees about code in the first place.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;This list has been thus-far unconvincing to my students.  I need to make this unit more exciting.  How do I demonstrate to my students that this is both interesting and beautiful?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-12-13T15:13:34.653" Title="Making induction meaningful" Tags="|student-motivation|induction|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5264" PostTypeId="2" ParentId="5262" CreationDate="2018-11-27T21:38:20.543" Score="3" Body="&lt;p&gt;I try to introduce induction not only as method for proving an algorithm, but as a method for developing algorithms as well. The idea is from &lt;em&gt;Introduction to Algorithms&lt;/em&gt; by Udi Manber. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes the way of thinking&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;solve the problem for n=1&lt;/li&gt;&#xA;&lt;li&gt;think about how you can calculate (n+1) once you know n&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;helps them to develop solutions on their own. And it helps with understanding recursion as well ;-). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fun fact: Around Christmas I given them the following assignment: Why does this inductive &quot;proof&quot; not work in real life:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hypothesis: I need only one match to light all candles in a very large christmas tree.&#xA;Proof:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;n = 1; I can light one candle using the match.&lt;/li&gt;&#xA;&lt;li&gt;n --&gt; (n+1): I move the match to the next candle and light this candle&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6109" LastEditorUserId="1293" LastEditDate="2018-12-13T15:01:51.313" LastActivityDate="2018-12-13T15:01:51.313" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5265" PostTypeId="2" ParentId="5257" CreationDate="2018-11-27T23:57:18.823" Score="9" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;According to me if people interested in this then nothing is difficult for them.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is a dangerous viewpoint, and I strongly urge you to reconsider. Many students find programming difficult. If you tell them that it &lt;strong&gt;should&lt;/strong&gt; be easy, then you're going to dissuade them from pursuing it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;This programming stuff is really hard for me. My teacher told me that it should be easy, so that must mean I'm really bad at it. I guess this isn't for me after all!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I think you should acknowledge that yes, programming is hard. It's normal to feel frustrated or to not immediately know how to solve a problem. Then teach them how to approach that: &lt;a href=&quot;https://happycoding.io/tutorials/how-to/program&quot; rel=&quot;noreferrer&quot;&gt;break problems down into smaller steps&lt;/a&gt;, debug, research, read through documentation, etc. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can I convince my students that programming is not as difficult as they think?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Again, the first step is to acknowledge that their feelings are valid and normal. Being frustrated is a normal part of programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then focus on &lt;strong&gt;why&lt;/strong&gt; they're frustrated. I think many students find programming difficult not because of the syntax, but because of the logic involved. Programming is really a process of breaking down a goal into smaller sub-steps and then identifying the syntax that accomplishes a particular sub-step. Even if students memorize syntax, this process is often new to them, and that's where they get stuck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that getting students over the initial &quot;programming is too hard / too nerdy / too mathy for me&quot; hurdle is very important. For that, you might look into doing the &lt;a href=&quot;https://hourofcode.com&quot; rel=&quot;noreferrer&quot;&gt;Hour of Code&lt;/a&gt; challenge. Have students get something up and running, and they'll realize that it's not as hard as they thought it would be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But after that, you need to acknowledge the aspects of programming that are difficult, and introduce strategies they can use to solve the problems they're stuck on.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2018-11-27T23:57:18.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5266" PostTypeId="1" CreationDate="2018-11-28T16:42:08.153" Score="0" ViewCount="71" Body="&lt;p&gt;I'm thinking of studying, &quot;What makes a good explanation?&quot; in the context of introductory computer science problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there's any pre-existing dataset containing introductory computer science problems (e.g. for loops), as well as multiple different explanations to each of such questions? Ideally, the explanations would be rated, but I can use a crowdwork service such as Amazon MTurk to generate ratings if they are not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One example of such a dataset in the language learning area could be Duolingo's comments section, where users can rate comments (which are very often explanations) left by other users in response to questions.&lt;/p&gt;&#xA;" OwnerUserId="6279" LastActivityDate="2018-11-30T17:35:03.970" Title="What makes a good explanation?" Tags="|exercises|" AnswerCount="1" CommentCount="2" ClosedDate="2018-12-04T22:52:04.527" ContentLicense="CC BY-SA 4.0" />
  <row Id="5267" PostTypeId="2" ParentId="5262" CreationDate="2018-11-28T21:48:00.617" Score="4" Body="&lt;p&gt;Since you are doing this in the context of code correctness, one incentive is to tell student that in some cases, you have to &lt;em&gt;prove&lt;/em&gt; code, not &lt;em&gt;test&lt;/em&gt; it. Anything critical (pick up your example, nuclear plant command system, plane autopilot, …) requires the highest level of confidence. Tests are always going to be partial. They will test 1, 10, 1000 possible inputs but that's it. You need to show that your program behaves well for all possible input.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since many programs work by splitting their large input into smaller cases, proofs by induction are a good fit. It also gives a high degree of confidence since often, the structure of the proof will follow the program step by step (while a proof by contradiction would only be remotely related to the code).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also show that often, a proof by induction will give you an actual program. The basic toy example is the one of the Tower of Hanoi (where you have three pegs and N discs). The proof of the theorem stating &quot;it takes 2^N moves&quot; is actually the recursive algorithm that implements the moves (and you can make an animated version of the algorithm in JS or something to make it visual).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another example is quicksort. Give the code of quicksort. The (strong) induction proof of correctness has the exact same structure has the code.&#xA;You can use several divide and conquer algorithms for this (Binary search also works very well AND is really cool because you can also show another issue with proof of code : Most 'student' implementation of binary search are buggy, since they tend to write middle = (left + right)/2 which will overflow for large arrays (where left+right &gt; max_int). This bug was present in the Java standard library. So you also have to talk about the mathematical model of the program (used for proofs, where you have potentially infinite memory, Natural numbers) and the program (fixed size integer, limited, memory, …).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2018-11-28T21:48:00.617" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5269" PostTypeId="2" ParentId="5266" CreationDate="2018-11-30T01:13:25.493" Score="1" Body="&lt;p&gt;I don't think you're going to find a good data set that contains what you're looking for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason is, teaching and learning are very subjective. I don't think there's any one definition of what makes a &quot;good&quot; explanation. An explanation that I think is helpful might not be very useful for you, and vice-versa.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, maybe one person just wants to get something working and doesn't care about what it's doing behind the scenes. For them, a simple &quot;copy this line of code&quot; would be most useful. Compare that to somebody else who is much more interested in the background of why things work. For them, a more in-depth analysis including history and lower-level details would be more useful.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I can use a crowdwork service such as Amazon MTurk to generate ratings&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't think you can. The only way you can do this is by having people read the descriptions and then rate them: but based on what? How easy they were to read? How much detail they went into? Whether the person learned something?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comparing curricula is a bit of an &lt;a href=&quot;https://en.wikipedia.org/wiki/Apples_and_oranges&quot; rel=&quot;nofollow noreferrer&quot;&gt;apples and oranges&lt;/a&gt; comparison. What would you compare? Student grades?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might be able to get something vaguely similar to what you're describing if you use Stack Overflow's data. Stack Overflow releases all of its question and answer data, and you can query that. Start &lt;a href=&quot;https://data.stackexchange.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; or google &quot;Stack Overflow data&quot; for a ton of results. Maybe take all of the answers to every question tagged with &lt;a href=&quot;/questions/tagged/for-loop&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;for-loop&amp;#39;&quot; rel=&quot;tag&quot;&gt;for-loop&lt;/a&gt; and compare them based on how many votes they got?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in the end, learning is subjective, so you aren't going to find an objective data set.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-11-30T17:35:03.970" LastActivityDate="2018-11-30T17:35:03.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5270" PostTypeId="1" AcceptedAnswerId="5308" CreationDate="2018-11-30T07:54:25.887" Score="7" ViewCount="819" Body="&lt;p&gt;First of all I'm sorry if the wording of my question is off so let me be more specific with what I mean;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my University we have some platforms we can code on and hand in assignments. They usually let us have as many tries as we want to (Not like they could stop us from compilling outside of the platform) but not once any lecturer or educator has discouraged us from compilling and testing our code as much as we'd like. This is also the case for the exam enviroments (Just with the restriction of a time limit) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm asking this out of curiosity, because I've developed a pretty bad habit of &lt;a href=&quot;https://en.wikipedia.org/wiki/Programming_by_permutation&quot; rel=&quot;nofollow noreferrer&quot;&gt;programming by permutation&lt;/a&gt;/&lt;a href=&quot;https://en.wikipedia.org/wiki/Shotgun_debugging&quot; rel=&quot;nofollow noreferrer&quot;&gt;shotgun debugging&lt;/a&gt; and in my first few months of Programming and even after 1.5+ years I still fall back to it sometimes. Part of the issue was probably, that I was never forced, or at least encouraged to spend as much time as possible to think about my code until I try something new again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a bigger reason educators generally see it as pointless to try to enforce a compile limit, or am I reading too much into the whole thing? &lt;/p&gt;&#xA;" OwnerUserId="6282" LastEditorUserId="27" LastEditDate="2018-12-02T18:26:20.583" LastActivityDate="2021-03-24T17:22:47.797" Title="Why do educators not set an upper bound for the amount of times we're allowed to compile code?" Tags="|programming|debugging|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5274" PostTypeId="2" ParentId="5270" CreationDate="2018-11-30T17:45:33.043" Score="7" Body="&lt;p&gt;Back in my day (which wasn't &lt;strong&gt;that&lt;/strong&gt; long ago), many of the tests for my programming courses involved writing code on a piece of paper, with a pencil. In this environment, I couldn't rely on the compiler at all. Your teachers might not want to do this because it involves a lot more hands-on grading, which might not make sense for your class size.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can also think of a few other reasons to avoid limiting code compilations:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It doesn't match real life. Like you've experienced, even &quot;real&quot; developers rely on the compiler to tell them where something is wrong.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It doesn't match other subjects. Have you ever taken a math test where you were only allowed to use your eraser 3 times? Or written an essay where you could only use the backspace key 10 times?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's not enforceable. Even if I wanted to limit the number of times you compile your code, there's no way for me to stop you from writing the code in your favorite IDE and then copying it into my system. (Well, I could force you to use a locked-down system in a Faraday cage, but why bother?)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There are bigger fish to fry. I'd be more worried about students copying each other's work, or getting a full code solution from Stack Overflow.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Shotgun debugging is not a shortcut to an answer. In fact, shotgun debugging generally takes longer than walking through the logic and figuring out what to do. My guess is that students who resort to shotgun debugging in tests and assignments generally perform worse than students who think through their code, without any teacher restrictions or interventions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your meta-point of teaching students to think about their code is a good one though. I think &lt;a href=&quot;https://happycoding.io/tutorials/how-to/program&quot; rel=&quot;noreferrer&quot;&gt;the process of breaking problems down into smaller steps&lt;/a&gt; is the most important skill a person can learn, and it's much more important than memorizing syntax. The only way to learn this skill is by practicing it over and over again. Every time you faced an assignment where you thought &quot;how do I even start this?&quot; was your teacher trying to teach you this lesson.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Part of the issue was probably, that I was never forced, or at least encouraged to spend as much time as possible to think about my code until I try something new again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't think it's fair to blame your teacher or your education on you relying on shotgun debugging. The truth is that we all rely on it from time to time. And if you already personally recognize the value in thinking through your code, but still fail to do it, then there isn't much a teacher can do to help with that.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-11-30T23:19:15.187" LastActivityDate="2018-11-30T23:19:15.187" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5275" PostTypeId="2" ParentId="5270" CreationDate="2018-12-01T00:46:48.757" Score="7" Body="&lt;p&gt;My philosophy is &quot;use professional tools&quot; and creating an experience that is like being in real programming shop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The compiler can help you get rid of silly errors very fast without wasting time on unnecessary puzzling.  If professional devs avail themselves of this, I think my students should have it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, most of the compilers we are using are OSS and can be installed on any PC.  Such a restriction makes little sense to me.  How, in the face of this fact, do you enforce it?&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-12-01T00:46:48.757" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5276" PostTypeId="2" ParentId="5270" CreationDate="2018-12-01T07:10:43.217" Score="10" Body="&lt;p&gt;I do it the other way round: I encourage my students to compile and test very often!&lt;/p&gt;&#xA;&lt;p&gt;Of course, just changing random lines of code until the result seems to work is not a good idea and this should be avoided. I try to encourage thinking about the code by writing the essential parts in pseudocode first and writing the documentation of functions prior to implementing them.&lt;/p&gt;&#xA;&lt;p&gt;What I want the students to do (especially in the beginning) is that they mentally decompose their program and test every testable step separately and check whether they are still on the right track. With more experience the tested chunks of code are growing, but in the beginning I sometimes compile nearly after each line of code I'm demonstrating to show how a program develops.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastEditorUserId="1035" LastEditDate="2021-03-22T21:32:13.060" LastActivityDate="2021-03-22T21:32:13.060" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5279" PostTypeId="2" ParentId="5270" CreationDate="2018-12-02T15:04:18.300" Score="4" Body="&lt;p&gt;While limiting use of compiling and testing, will stop same bad behaviours, it will also stop the best behaviours.&lt;/p&gt;&#xA;&lt;p&gt;Test driven development is one of the best ways to write software, and it involves a lot of compiling and a lot of testing. However it is not about guessing (the shot gun approach).&lt;/p&gt;&#xA;&lt;h1&gt;Test driven development&lt;/h1&gt;&#xA;&lt;p&gt;Test driven development is about doing &lt;strong&gt;one thing at a time&lt;/strong&gt;, writing the simplest test that will fail, writing the simplest code to make the test pass (&lt;strong&gt;the simplest thing that can work&lt;/strong&gt;), and repeating.&lt;/p&gt;&#xA;&lt;p&gt;With one thing at a time, the steps are tiny. No more than 3 lines of code, usually less than one. Never more than 5 minutes away from the previous test.&lt;/p&gt;&#xA;&lt;p&gt;You write the tests first: That way you can test the test, by running it and seeing it fail. It will not be clear, what you are trying to do, until you can write a test for it.&lt;/p&gt;&#xA;&lt;p&gt;To make the test pass, do the simplest thing that can work, and no more. Don't think ahead.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Test-driven_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Test-driven_development&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;notes:&lt;/p&gt;&#xA;&lt;p&gt;It is also a good idea to also be using a revision control system (such as mercurial, &lt;code&gt;hg&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Ones you have practised for a bit, start using an automated unit-test tool.&lt;/p&gt;&#xA;&lt;p&gt;One you have done all that for a bit, see &lt;a href=&quot;https://en.wikipedia.org/wiki/Transformation_Priority_Premise&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Transformation_Priority_Premise&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-12-08T11:20:24.837" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5281" PostTypeId="1" AcceptedAnswerId="5282" CreationDate="2018-12-03T05:57:45.223" Score="2" ViewCount="432" Body="&lt;p&gt;It is well accepted that processing sorted arrays is easier and efficient. What would be the pedagogical approach to explain how and why it is more efficient to process sorted collections than unsorted collections.&lt;/p&gt;&#xA;" OwnerUserId="6291" LastActivityDate="2018-12-08T18:35:56.350" Title="Why and how is it efficient to process sorted arrays than unsorted arrays?" Tags="|java|c|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5282" PostTypeId="2" ParentId="5281" CreationDate="2018-12-03T06:22:47.483" Score="6" Body="&lt;p&gt;First, it is not &quot;well accepted&quot; that processing sorted array is more efficient. It depends on what you do. If you spend your time inserting, for instance, then sorted arrays are not necessarily a good choice. You are better off inserting at the end (say if you have resizable arrays such as &lt;code&gt;Vector&amp;lt;X&amp;gt; or ArrayList&amp;lt;X&amp;gt;&lt;/code&gt; in Java), and then sort afterwards (you'll pay &lt;span class=&quot;math-container&quot;&gt;$O(N*log(N))$&lt;/span&gt; instead of &lt;span class=&quot;math-container&quot;&gt;$O(N²)$&lt;/span&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is true that if you don't have insertions (or very few insertions with respect to searching or other operations for instance) then it is more efficient.&#xA;If you want to find an element in a sorted array, you can use binary search which is &lt;span class=&quot;math-container&quot;&gt;$O(log(N))$&lt;/span&gt; while if your array is not sorted you have to scan the whole thing which is &lt;span class=&quot;math-container&quot;&gt;$O(N)$&lt;/span&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise if you want to perform set operations on two sorted arrays (intersection, union, difference), then doing so on sorted Arrays is linear. If they are not sorted you will be either quadratic (naive algorithm) or have to use an auxiliary data structure (such as a hash table).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorted arrays have the same complexity for these operations than the more involved tree structures (AVL or red-black trees) and they have a very compact and simple representation. But you pay the price that insertion is more expensive, since it has to maintain the order of elements.&lt;/p&gt;&#xA;" OwnerUserId="746" LastEditorUserId="204" LastEditDate="2018-12-05T08:29:53.273" LastActivityDate="2018-12-05T08:29:53.273" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5283" PostTypeId="2" ParentId="650" CreationDate="2018-12-03T07:47:46.510" Score="1" Body="&lt;p&gt;While both notations have their use, I would only use flow charts when the algorithm lends itself to it, namely when the algorithm is made of loops and conditionals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your algorithm is recursive for instance, or rely fundamentally on a particular data structure (for instance a stack or a queue) then flowcharts won't help you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience I found that flowcharts are useless except for the most simple algorithms, but work very well to model user interactions or protocol (i.e. as like simplified UML sequence diagrams or finite state machines).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2018-12-03T07:47:46.510" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5286" PostTypeId="2" ParentId="650" CreationDate="2018-12-05T08:21:36.650" Score="0" Body="&lt;p&gt;To answer the question, first look at what level each language is.&lt;/p&gt;&#xA;&lt;p&gt;We have&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The language that the problem will be implemented in&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;li&gt;Assembler&lt;/li&gt;&#xA;&lt;li&gt;Machine code (Lowest level)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Where do flowcharts and pseudo code fit in.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pseudo code&lt;/li&gt;&#xA;&lt;li&gt;The language that the problem will be implemented in&lt;/li&gt;&#xA;&lt;li&gt;…&lt;/li&gt;&#xA;&lt;li&gt;Flow charts&lt;/li&gt;&#xA;&lt;li&gt;Assembler&lt;/li&gt;&#xA;&lt;li&gt;Machine code (Lowest level)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Flow charts: Graphical high level assembler, or at best python with &lt;code&gt;goto&lt;/code&gt;s.&#xA;It is useful if you are writing a program for a human to follow. E.g. procedures in a factory (but please get a software engineer to do it in a structured way).&lt;/p&gt;&#xA;&lt;p&gt;Pseudo code: Once the un-compilable high-level language, but then we made compilers. It is still &lt;strong&gt;useful for learner programmers&lt;/strong&gt;. They can write the program, without worry about the language, comment the pseudo code, and then inter-leave with real code. (Trouble is this is counter productive for an experienced programmer, for most tasks.)&lt;/p&gt;&#xA;&lt;h1&gt;In summary&lt;/h1&gt;&#xA;&lt;p&gt;Both are a terrible design tool. Real programmers don't use them for designing programs. However pseudo code is a very good learning tool. Use pseudo code in the classroom, and for the NEA.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2018-12-05T08:21:36.650" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5287" PostTypeId="2" ParentId="5281" CreationDate="2018-12-05T08:40:21.753" Score="4" Body="&lt;p&gt;I would do it unplugged. Give then a sorted stack of cards, get them to find a number. Repeat with an unsorted list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ensure that there are gaps, &lt;strong&gt;not a sequence&lt;/strong&gt;, but sorted. I got caught out with this, pupils could find a card in a sequence in &lt;span class=&quot;math-container&quot;&gt;$O(1)$&lt;/span&gt;.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-12-05T08:40:21.753" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5288" PostTypeId="1" CreationDate="2018-12-05T14:07:57.850" Score="3" ViewCount="82" Body="&lt;p&gt;Me and my friend are both in high school taking a “PLTW” Engineering class, where our goal is to design a solution to any problem and work on that solution over the course of the year. We’re reaching out to this forum in hopes to receive some advice on our startup&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After careful consideration of different projects we could pursue, we came up with the idea of a platform that could provide comp. Sci. students with all the resources they would need to develop their careers. We would take on any willing instructors with backgrounds in coding that would be able to use the students as a means of developing their personal projects, while simultaneously teaching them how to code. Everyone benefits. We hope to expand this past just students, and take on more and more staff. The students would leave the program with experience in their field and proficiency of 1 or more languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main goal of our platform is to provide a network for students and teachers to collaborate and work on projects while developing their skills as coders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where we are at&#xA;Right now we are in the planning phase. We need to reach out to different communities for not only advice but for reassurance that people would want to take part in this project with us. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What we need help with&#xA;If anyone has had experience with assembling people for a project, or just starting a project in general, we would really appreciate any advice you might have for us.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So our question is&#xA;How do we go about finding people that would be willing to invest in our idea? We would need teachers, students, and anyone else who is qualified and willing to work with us.&lt;/p&gt;&#xA;" OwnerUserId="6305" LastActivityDate="2018-12-06T00:06:29.773" Title="Advise on a class project" Tags="|lesson-ideas|teaching-analogy|project|ap-computer-science-a|coding-style|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5289" PostTypeId="2" ParentId="5288" CreationDate="2018-12-05T14:26:17.313" Score="1" Body="&lt;p&gt;I hate to be the one to dampen your enthusiasm, but your project as described seems wildly optimistic with an unachievable scope. For example, &quot;all the resources they would need to develop their careers&quot; implies that you include at least everything in an undergraduate curriculum, including non CS courses. But that already exists. A more reasonable scope would be something like &quot;all the resources they would need to be successful in the first two CS courses.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But an additional caveat is that such a resource might be used for student cheating as easily as it could be used for learning. If that is the case, then many people would be unlikely to participate, especially those with the most knowledge. That isn't a necessary consequence, but one you would have do design against. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that this site, and SE in general, already provides much of what you want to do, I think, except for the collaborative project part. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, computer mediated collaborative work is in itself a worthy goal that is not well supported by existing tools. There used to be some tools (Eclipse plugins) that permitted pair programming to be done. They were a bit awkward to use, unfortunately, partly due to latency, partly due to design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, it isn't a bad thing to have a large goal. But if you want to do something big, make sure that you can do it incrementally, so that even if (when) you don't achieve it all, you have something valuable at the end of the year. Even a useful remote pair programming system would be a pretty good project for a few students to achieve in a year. It could be written in any language, but if it is coordinated with a major IDE, could support other languages (i.e. the tool itself would be language neutral). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I may expand on this in coming days as additional suggestions occur to me. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-05T14:26:17.313" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5290" PostTypeId="2" ParentId="5288" CreationDate="2018-12-06T00:00:00.673" Score="2" Body="&lt;p&gt;Buffy's answer is already spot-on, but here's another $0.02.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;We would take on any willing instructors with backgrounds in coding that would be able to use the students as a means of developing their personal projects, while simultaneously teaching them how to code. Everyone benefits.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think you're vastly underestimating how much work it is to delegate tasks, to bundle those tasks up in a format that another person can approach, and to generally manage other people. It's also very difficult to deal with time management (or lack thereof), and to manage expectations (and decide what happens when expectations are not met).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're asking instructors (who are already extremely busy) to work as program managers, for free, on projects staffed by people who are going to need a ton of hands-on help. There is a huge time cost here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You've basically just described an internship, and generally both parties are paid for their time. If you aren't planning on paying the people involved, then I'm afraid you aren't going to see many volunteers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your heart sounds like it's in the right place though, so I'd recommend doing another round of brainstorming. The best advice I can give you is to &lt;strong&gt;start smaller&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you might rethink your project to be something more like a way to connect students to open-source projects looking for help. &lt;a href=&quot;https://cseducators.stackexchange.com/q/1106/2068&quot;&gt;This question&lt;/a&gt; has a bunch of resources you might want to check out.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2018-12-06T00:06:29.773" LastActivityDate="2018-12-06T00:06:29.773" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5295" PostTypeId="2" ParentId="5242" CreationDate="2018-12-06T19:56:58.877" Score="6" Body="&lt;p&gt;I've been using Kotlin for two years now on an introductory course on imperative programming (bachelor's first semester) and I'm very happy with this decision. Before Kotlin, I was using Java for the same course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some of the benefits:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No need to explain what are classes on a imperative programming course, since Kotlin programs can only have a main() top level function (like C)&lt;/li&gt;&#xA;&lt;li&gt;It is a &quot;safe&quot; language in the sense that it prevents most novice mistakes at compilation time (uninitialised variables, type conversion errors, etc.) &lt;/li&gt;&#xA;&lt;li&gt;For simple interactive programs (e.g., ask two numbers and compute their sum), you don't need all the complexity of the &lt;code&gt;Scanner&lt;/code&gt;/&lt;code&gt;BufferedReader&lt;/code&gt; classes, just use &lt;code&gt;readLine()&lt;/code&gt; and &lt;code&gt;println()&lt;/code&gt; (without the &lt;code&gt;System.out&lt;/code&gt;). This makes the initial learning curve much more pleasant.&lt;/li&gt;&#xA;&lt;li&gt;It forces the students to think about the little things that are essential when you are taking the first steps in programming: mutable vs immutable variables, nullable vs non nullable types, mandatory variable initialisation, implicit vs explicit types, conditions as expressions, etc...&lt;/li&gt;&#xA;&lt;li&gt;It is easy to jump to Java in later courses (than say Python or Javascript)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Most of all, from my experience students find it more motivating to learn to program in Kotlin than Java, since they have to write less to accomplish the same things while at the same time feeling protected about runtime errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice: go for Kotlin.&lt;/p&gt;&#xA;" OwnerUserId="4340" LastEditorUserId="793" LastEditDate="2019-02-13T16:33:31.280" LastActivityDate="2019-02-13T16:33:31.280" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5296" PostTypeId="2" ParentId="5281" CreationDate="2018-12-08T18:35:56.350" Score="1" Body="&lt;p&gt;If an array is unsorted, and you want to check an item for membership in it, that is O(n) time procedure.  If it is sorted, you can use divide-and-conquer to do this task in O(log(n) time.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2018-12-08T18:35:56.350" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5298" PostTypeId="1" CreationDate="2018-12-10T21:25:31.153" Score="3" ViewCount="269" Body="&lt;p&gt;At first I will say, I known some basics Python and Haskell. For now I decided to follow my programming road with Python. I have chosen a few issues and their learning path, hence I would like to know if they will be a good way to get to know Python programming language better, with the implementation of algorithms including languages, with the implementation and knowledge of data structures and modules and frameworks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I would like to ask what should I add to my list or delete? Of course, the issues will be mixed up so that you do not learn only data structures all day long and maybe it is a good idea? Additionally, I would like to know if additional projects or exercises are needed in all situations? I know that some issues are very easy and after reading I am able to notice the problems, advantages, disadvantages or exemplary implementation that arise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have mistaken the forum, I am sorry and I am asking for appropriate redirection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the list looks like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Programming and some other derivatives&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object-oriented&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Classes&lt;/li&gt;&#xA;&lt;li&gt;Objects&lt;/li&gt;&#xA;&lt;li&gt;Interfaces&lt;/li&gt;&#xA;&lt;li&gt;Abstraction&lt;/li&gt;&#xA;&lt;li&gt;Encapsulation&lt;/li&gt;&#xA;&lt;li&gt;Polymorphism&lt;/li&gt;&#xA;&lt;li&gt;Inheritance&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Duck Typing&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;SOLID rules&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;one responsibility&lt;/li&gt;&#xA;&lt;li&gt;open + closed&lt;/li&gt;&#xA;&lt;li&gt;substitutions Liskov&lt;/li&gt;&#xA;&lt;li&gt;segregation of interfaces&lt;/li&gt;&#xA;&lt;li&gt;reversing dependencies&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Tests&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unitary&lt;/li&gt;&#xA;&lt;li&gt;Functional&lt;/li&gt;&#xA;&lt;li&gt;Integration&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Monkey Patching&lt;/li&gt;&#xA;&lt;li&gt;REST&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;HATEOAS&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;PEP8&lt;/li&gt;&#xA;&lt;li&gt;MOCKS&lt;/li&gt;&#xA;&lt;li&gt;VirtualENV&lt;/li&gt;&#xA;&lt;li&gt;Asynchrony&lt;/li&gt;&#xA;&lt;li&gt;Python Idioms&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Decorators&lt;/li&gt;&#xA;&lt;li&gt;Gneratory&lt;/li&gt;&#xA;&lt;li&gt;Mapping&lt;/li&gt;&#xA;&lt;li&gt;Meta class&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Any other things from Python&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mutable and immutable objects&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__init__&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;__str__&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;iteration&lt;/li&gt;&#xA;&lt;li&gt;self&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;MVC&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;MVT&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Frameworks&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;flask&lt;/li&gt;&#xA;&lt;li&gt;pandas&lt;/li&gt;&#xA;&lt;li&gt;tornado&lt;/li&gt;&#xA;&lt;li&gt;django (basics)&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Patterns&lt;/li&gt;&#xA;&lt;li&gt;ORM&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Modules&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;NumPy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;NoSQL&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;MongoDB&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;SQL&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;MySQL&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Additional items&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Git&lt;/li&gt;&#xA;&lt;li&gt;Docker&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Project patterns&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Observer&lt;/li&gt;&#xA;&lt;li&gt;Builder&lt;/li&gt;&#xA;&lt;li&gt;Facade&lt;/li&gt;&#xA;&lt;li&gt;Factory&lt;/li&gt;&#xA;&lt;li&gt;Singleton antisense&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Data structures&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basics&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Stack&lt;/li&gt;&#xA;&lt;li&gt;Queue&lt;/li&gt;&#xA;&lt;li&gt;List&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One directional&lt;/li&gt;&#xA;&lt;li&gt;Two-directional&lt;/li&gt;&#xA;&lt;li&gt;With the sentry&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Trees&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Binary&lt;/li&gt;&#xA;&lt;li&gt;Binary searches&lt;/li&gt;&#xA;&lt;li&gt;BSP&lt;/li&gt;&#xA;&lt;li&gt;AVL&lt;/li&gt;&#xA;&lt;li&gt;T&lt;/li&gt;&#xA;&lt;li&gt;B&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Graphs&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Algorithms&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Operating principles&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;divide and conquer&lt;/li&gt;&#xA;&lt;li&gt;greedily&lt;/li&gt;&#xA;&lt;li&gt;dynamic&lt;/li&gt;&#xA;&lt;li&gt;linear&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Techniques&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;procedural&lt;/li&gt;&#xA;&lt;li&gt;recursive&lt;/li&gt;&#xA;&lt;li&gt;object-oriented&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sorting&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Bubble&lt;/li&gt;&#xA;&lt;li&gt;Insertion&lt;/li&gt;&#xA;&lt;li&gt;Quick&lt;/li&gt;&#xA;&lt;li&gt;Merge&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Search&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Linear&lt;/li&gt;&#xA;&lt;li&gt;Binary&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Graphs&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dijkstra&lt;/li&gt;&#xA;&lt;li&gt;DFS&lt;/li&gt;&#xA;&lt;li&gt;BFS&lt;/li&gt;&#xA;&lt;li&gt;Kruskal&lt;/li&gt;&#xA;&lt;li&gt;Prim&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Data mining&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;C4.5&lt;/li&gt;&#xA;&lt;li&gt;k-means&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6325" LastEditorUserId="793" LastEditDate="2019-02-14T23:51:29.250" LastActivityDate="2019-02-14T23:51:29.250" Title="What is the best way to learn an object oriented programming language with framework, data structure and alogrithms?" Tags="|self-learning|python|programming|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5299" PostTypeId="2" ParentId="5298" CreationDate="2018-12-10T21:36:35.987" Score="7" Body="&lt;p&gt;You certainly don't need a list longer than this one. If you do even half of this you will have learned enough to know pretty much what should be next. Having a complete list now gives you very little. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you really need is &lt;em&gt;practice&lt;/em&gt; and &lt;em&gt;feedback&lt;/em&gt;. For practice, find some significant problem and build a program to solve it. Use the best methodology you know about (including testing) and if it works, fine, otherwise look at some other methodologies. You can often find problems in books or online, but knowing that something is significant is harder for a self learner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the biggest impediment for the self learner is getting adequate feedback. Just because something works isn't evidence that it is actually good or well structured. For feedback you need someone with more python knowledge than you have and who can comment on your code and even on your approach. That is one of the big advantages of taking regular courses. A teacher/professor can provide problems that are &lt;em&gt;just hard enough&lt;/em&gt; to stretch your skills, but also give you the feedback on what you are doing and point to the next steps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But reading about all those things won't make a programmer out of you, nor will building a &quot;complete&quot; list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write programs. Get feedback. There is no shortcut. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-10T21:36:35.987" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5300" PostTypeId="2" ParentId="5298" CreationDate="2018-12-11T13:13:23.257" Score="5" Body="&lt;p&gt;Your list of items is very complete and would fill a good part of a Bachelor's degree curriculum. One thing to not overlook is that some of the aspects you highlight make little sense in the context of Python.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, interfaces (as in Java Interfaces) express the behavior of classes that implements them, and can simulate multiple-inheritance. In Python, you have some kind of abstract classes and multiple-inheritance, which allows you to have the same results, but work really differently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise, the notion of type polymorphism (as in parametric polymorphism or Java/C# generics) is precisely that a function/method &lt;em&gt;cannot&lt;/em&gt; inspect a parametric argument. In Python, function arguments are not typed so all this is moot. You can pass any argument to any function and it may or may not fail depending on what the function does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not a critic of Python, but rather a remark that for some concepts, most of the teaching material that you will find will use another language (where the concepts makes more sense). Trying to shoehorn them in Python may result in non-idiomatic code that is both hard to read and does not fully illustrate the concept you study and its benefits.&lt;/p&gt;&#xA;" OwnerUserId="746" LastEditorUserId="746" LastEditDate="2018-12-11T14:06:40.493" LastActivityDate="2018-12-11T14:06:40.493" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5302" PostTypeId="1" CreationDate="2018-12-11T21:20:59.673" Score="14" ViewCount="436" Body="&lt;p&gt;Imagine students in a course on algorithms &amp;amp; data structures, which are given homework assignments to implement things like trees, hash sets, sorting algorithms, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Due to the high number of students per semester and limited resources, grading is heavily assisted by automatic unit tests. The TAs will still scan through the code, but if all or most of the test cases fail and there is no simple fix in sight, students will get 0 points on an assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, this can happen very quickly. Consider implementing a balanced tree as an example. If students fail to correctly reference the nodes, insertion, removal and searching, - despite being implemented correctly if seen individually - will not work and can hardly be tested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As expected, some students do complain about their poor grade and argue that &lt;em&gt;&quot;although they acknowledge that their data structure does not work entirely, they at least implemented various sub-tasks correctly&quot;&lt;/em&gt;. This may even be correct, but the TAs very often do not have the time to dig deep in the code and grade the internal functions of the students implementation. Especially for more complex data structures, it would also take too much time to fully comprehend and even debug the (erroneous) implementations.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;My question is, if it is okay to grade programming assignments based on this &lt;strong&gt;external view&lt;/strong&gt; (does the implementation pass the tests?) or should grading rather be based on an &lt;strong&gt;internal view&lt;/strong&gt; (are the things implemented by the student correct if seen individually?).&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One important remark: In this specific scenario, students were not given the unit tests, since they are expected to test their implementation themselves.&lt;/p&gt;&#xA;" OwnerUserId="6328" OwnerDisplayName="blu3r4y" LastEditorUserId="6328" LastEditDate="2019-01-12T16:21:52.190" LastActivityDate="2019-05-14T16:27:37.870" Title="Should programming assignments be graded based on results from unit tests or based on the similarity to the correct implementation?" Tags="|grading|homework|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5303" PostTypeId="2" ParentId="5302" CreationDate="2018-12-11T21:49:59.073" Score="3" Body="&lt;p&gt;I agree with Buffy, the question would be perfect for cseducators SE. But still, I try to give an answer which might be generalized to other disciplines as well:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this is absolutely ok - but it affects your teaching style and goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want the students to be 100% perfect, this is the way to go. It's a hard lesson, but in real world scenarios they are facing more or less the same situation. My Physcis teacher at school took the same attempt and argued, that it does not make a difference if you want to drive to school and crash into the tree next to school or next to your house - you don't make it!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fully understand the burden of reading students code - I do the same and it can be a great pain. But if you do it, you can give individual feedback and you'll understand, which are the most common mistatkes and adress them in your course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One compromise could be to offer different test sets, let's say some tests for each function needed for the complete task. That would allow to give points partially, but still you can not give points for a correct recursion, loop or whatever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An additional thought: You might consider giving a few test cases so the students can at least test if their code understands the input and delivers the output in a format your test understands. I don't know if this is a real world problem with your students, but it would be an issue with mine ;-). &lt;/p&gt;&#xA;" OwnerUserId="6109" OwnerDisplayName="OBu" LastActivityDate="2018-12-11T21:49:59.073" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5304" PostTypeId="2" ParentId="5302" CreationDate="2018-12-11T23:36:51.640" Score="7" Body="&lt;p&gt;Actually, life isn't so simple as to choose one &lt;em&gt;or&lt;/em&gt; the other here. Code needs to be well structured &lt;em&gt;and&lt;/em&gt; it needs to be correct. Given that students are learning, you can't really expect that they will be perfect on either of these and so you need to take both in to account. A program could, be well designed and built but have some, as yet undiscovered, flaw that prevents it from passing its tests. If the students hack it up to get tests to pass they are going backwards, not forwards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS students have a lot to learn. Programming is important, but not the most important thing. But to advance on many of the other goals of the CS curriculum, students need to build good code. Even better, would be the ability to build maintainable code, since many of them will start their careers in programming-heavy jobs. Even if they go to grad school, much of what they do will depend on being able to write good code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in grading, points should be gained or lost depending on both code and correctness. If the code is not correct, then someone needs to make an analysis about why the code is failing. It could be something simple or profound. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my view if a program can't be understood easily and/or seems to be hacked together, it should receive few points. If a program, on the other hand, passes few tests then it is a much more subtle problem that needs deeper analysis. Don't neglect it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the question heading you talk about the &quot;correct implementation&quot;. I worry about that. Students should not be graded on similarity to any reference implementation, certainly. There are more than a few ways to write a correct program. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-11T23:36:51.640" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5305" PostTypeId="2" ParentId="5302" CreationDate="2018-12-12T01:58:37.290" Score="-2" Body="&lt;p&gt;Unless the objective of the exercise is to copy an implementation (say from Java to C++), the &quot;similarity&quot; to any other implementation should have no weight in the grading. At least not in a positive sense. The similarity to another implementation could, however, be a warning sign for plagiarism. Everything else in the question is &lt;em&gt;up for debate&lt;/em&gt;, so to speak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;fairness&quot; of the grading only hangs on two principles: Consistent application of standards and advance notice of those standards. If the same standard, or evaluation, is applied to all the work received, and the assigned grade would be the same regardless of which student turned it in, or which TA assigned the grade, then the standards are applied consistently. Prior to the examination, or assignment, the students need to be informed as to how their work will be evaluated. In the course syllabus, or in the beginning of the course is the best time to inform them, of course. If they have been given such a notice, and then their work is evaluated according to that guide, there should be nothing to object to - from a &quot;fairness&quot; point of view. Knowing that there will be unit tests, even without knowing what those might be, is still acceptable, so long as the same unit tests are applied in a uniform manner to all the work evaluated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How &quot;fair&quot; the evaluations are, however, likely has very small significance to how well the evaluations move the students toward the course objectives. Likewise, how such projects would be evaluated in a real-world workplace environment likely does not move them in the direction of meeting the course objectives. Of course, if the class is the &lt;strong&gt;final&lt;/strong&gt; course in a series, the objective of which is to produce work-ready employees, then a purely external view of &lt;em&gt;works&lt;/em&gt; vs. &lt;em&gt;fails&lt;/em&gt; might be appropriate. In all other cases, however, such an extreme approach is not a very pedagogical approach. (As a side note, a binary go/no-go grade does not fit well into a scaled grading system either.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an idealized world, the student projects are a chance for the instructor to determine how well the student has apprehended the course materials thus far, discover where the student has stumbled, and take corrective measures to return the student to where they should be relative to the course materials. Teachers, of every stripe, are an over-worked, under-paid, unappreciated lot. (The TA's get to share in that &quot;glory&quot;, and will become just as over-worked as the instructors.) As such many of the opportunities to learn about the difficulties and misunderstandings the students have will be missed when grading assignments. Having a rubric, published by preference, which the TA can apply to the evaluation often helps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course objectives, naturally, have greater weight in the rubric than other criteria. Yet non-course objectives should be included. While seldom included in the course specifications, clean code, naming conventions, documentation or self-documenting code, and adherence to coding style can all be covered by the rubric, and encouraged, thereby, in the students' work. Requiring adherence to such guidelines benefits the instructor (and TA's) in applying fine-grained grading evaluations. It can also aid the students in completing the projects, obtaining better results from the code, ease the burden of debugging the code prior to submission, and developing good habits for when they do enter the workforce, where go/no-go evaluations really matter. (I prefer to give more points to a clean almost-working program, than to a impenetrable kludge that passes every known test. The former can be maintained, including fixing the current version. The latter can probably only be maintained after being re-coded in some understandable manner.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, my view is only one way of seeing the job of &quot;instructor.&quot; As to &lt;em&gt;it is okay to grade programming assignments based on this external view&lt;/em&gt;, the answer is; &quot;While it is less than ideal, yes, it is okay to do so.&quot;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-12-12T01:58:37.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5306" PostTypeId="1" CreationDate="2018-12-12T13:34:04.737" Score="3" ViewCount="221" Body="&lt;p&gt;We have been considering moving JavaScript into our core curriculum for vocational-readiness reasons.  However, our core CS curriculum focuses on concepts that won't become out of date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are certain languages that are pure, or close to pure, and lend themselves to teaching certain concepts.  Java (or Eiffel) for Object Oriented Programming makes sense.  Scheme, OCaml, SML, or especially Haskell is similar for functional programming.  Many other languages can, of course, be used for these concepts!  But sometimes the language itself brings advantages to bear when learning fundamental concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have wide discretion about what goes into our curriculum, but we are a little unsure about what core programming or theoretical CS concepts would be natural to teach using JavaScript.  We are considering functional programming, but that feels a bit Frankensteinian.  Would concurrency be a great fit?  Event-based programming? Is there something else that we are missing entirely?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2018-12-12T13:50:28.160" LastActivityDate="2019-01-12T23:28:06.320" Title="JavaScript to teach Theoretical Computer Science" Tags="|javascript|cs-theory|" AnswerCount="5" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5307" PostTypeId="2" ParentId="5306" CreationDate="2018-12-12T15:38:05.153" Score="6" Body="&lt;p&gt;Maybe a bit of an orthogonal answer, but let me try to refocus your thinking. I don't think that teaching a lot of languages, especially if they are similar to one another in some way is a big advantage for students. Giving them experience with different paradigms (ways of thinking) on the other hand is a big advantage. While I prefer Java (for its libraries), Ruby is actually a more pure OO language as, is, of course, Smalltalk and its successors. Scheme or Haskell can be used for FP, of course, and one has actual syntax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Javascript, on the other hand is another OO language. It is different from the usual candidates, however, since it is prototype, rather than class, based. But that is a detail that an experienced OO programmer can become familiar with outside of any course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, many universities have a Language Principles course in the curriculum in which students study the fundamental ideas of languages without necessarily building a compiler for any of them. An older book covering this is by &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0201590654&quot; rel=&quot;noreferrer&quot;&gt;Ravi Sethi&lt;/a&gt;. You need to be careful that you focus on &quot;principles of&quot; and not &quot;examples of&quot; languages, however. But it is a good place to take a meta level view of languages and paradigms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want to have students learn a new language, especially one for which they also grok the basic paradigm, a project course is a good way to do it. Students build something significant in a new language. If you design the project you could also require aspects that they haven't seen much of before, such as concurrency. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I would recommend against forcing the use of a language in a way that isn't natural to its design. While Java now has functional elements, I wouldn't use it to teach about FP as a paradigm. Frankenstein built a monster, of course. No need to repeat it. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-12T15:38:05.153" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5308" PostTypeId="2" ParentId="5270" CreationDate="2018-12-13T11:56:48.983" Score="13" Body="&lt;h2&gt;Because it's a meaningless obstacle&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Putting an upper limit on compilations is like telling a car manufacturer that they must build a new supercar, but are only allowed to test drive it a few times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that you're pushing your developers/mechanics to &lt;em&gt;theorize&lt;/em&gt; about whether something would or wouldn't work, instead of actually finding out.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Theories are really just educated guesses; so do you genuinely think that guessing more often will achieve a better result than testing more often?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Because that's not the purpose of education&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Especially in a hands-on field such as software development, the goal to learning programming is to &lt;strong&gt;keep trying until you stop failing&lt;/strong&gt;. That inherently means that failing (and thus needed another compilation in the future) is an inevitable step in the process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You seem to think that compiling often is indicative of a &quot;bad&quot; programmer. It isn't, but let's explore that assumption.&lt;br&gt;&#xA;What exactly is your perceived problem with compiling more often? If a &quot;bad&quot; programmer is able to deliver the same end result in the same amount of time as a &quot;good&quot; programmer, does it really matter whether they compiled often or not? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Clients/managers tend to not care about &lt;em&gt;how&lt;/em&gt; a programmer achieves their goal, they only care &lt;em&gt;that&lt;/em&gt; they achieve it within the set parameters. If anything, I'd be more willing to hire the programmer who continually fact-checks himself (by compiling), compared to the programmer who assumes they know what they're doing (rarely compiling) and thus will get stuck needing to retrace their steps afterwards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're suggesting is the equivalent of not permitting students to redo their calculations on a math exam. You're trying to teach them the exact opposite behavior of what you should be teaching them.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Because that's not how it works in a professional environment&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Once you get to the stage of being a self-sufficient developer, there is still much to learn. One thing that junior developers often do wrong is down the problem into sufficiently small and simple parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, &lt;strong&gt;it is better to build something with 50 simple components than it is to build it with 10 moderately complex components.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cleverness can be damning as a developer. When you're developing something, you understand the ins and outs, and you might find a very clever trick/workaround that may seem counterintuitive at first but actually solves your problem nicely. This can manifest itself in different ways: overly terse syntax, lack of accurate naming, an overly complex algorithm, lack of self-documentation, requiring specialized knowledge of a particular tool/library, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, your cleverness can be your undoing when you (or someone else) needs to reevaluate this code in the future. If there's a bug, it will be hell to find out where the bug is located.&lt;br&gt;&#xA;But even when there is no bug, e.g. if the requirements change, you will need to be able to pull the existing logic apart to introduce your changes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Putting a hard limit on # of compilations wrongly incentivizes developers to only compile (and thus test) large changesets. When anything goes wrong, it's very hard to pinpoint where exactly it went wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you compile (and thus test) small changesets, it's very easy to see where it went wrong, as there is only a limited amount of changes that have occurred between the last (working) version and the current (failing) version.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is the core argument for using unit testing and continuous integration. Developers are urged to take the &lt;strong&gt;smallest possible incremental steps&lt;/strong&gt;, so that their code can be tested every step of the way, thus making it easier to find the source of a bug/error.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since there is no purpose to retesting without recompiling; if you want to test often, you must therefore also compile often.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I've developed a pretty bad habit of programming by permutation/shotgun debugging and in my first few months of Programming and even after 1.5+ years I still fall back to it sometimes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;When all else fails, shotgun programming is the most reliable method of figuring things out.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That is not to say that shotgun programming should be your primary development approach, as it can lead to time wastage. But when all your clever logging and theorizing fails to solve the problem at hand, shotgun debugging pretty much guarantees that you can take (admittedly slow) steps towards finding the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As much as I am pro-shotgun (in certain cases), I do concede that wanton shotgun debugging can be used as a way to brute force a solution and avoiding having to understand the problem, which is counterproductive in an educational context. But this is part of a bigger issue that is not easily preventable.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, some students may rely on StackOverflow as a snippet repository and avoid having to understand the snippet or why it works.&lt;br&gt;&#xA;To be clear: as a software developer I use it as a snippet repository as well, but I use it as a shortcut or not having to reinvent the water, not as a way to avoid having to learn the core skills required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issues of students writing code that works but they do not understand why (regardless of whether it's copy/pasting or brute forcing a solution) is not something you can address with a simple test. This is where &lt;strong&gt;oral exams&lt;/strong&gt; are most useful, because you can very quickly gauge the difference between a student who found the right snippet, and a student who understands the core problem and how to approach solving it.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2018-12-13T12:04:43.817" LastActivityDate="2018-12-13T12:04:43.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5309" PostTypeId="2" ParentId="5151" CreationDate="2018-12-13T13:15:16.723" Score="0" Body="&lt;p&gt;a book that i recommend for you is &lt;em&gt;Head First JavaScript Programming&lt;/em&gt; at this link the description is found &lt;a href=&quot;https://www.oreilly.com/library/view/head-first-javascript/9781449340124/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the book description&lt;/a&gt;&#xA;but if you need to make the lecture more interesting I would recommend that you use this site for learning JavaScript which is &lt;a href=&quot;https://www.codecademy.com/learn&quot; rel=&quot;nofollow noreferrer&quot;&gt;code academy&lt;/a&gt; the course is named introduction to JavaScript this site provides an introductory course to JavaScript and give instant feedback to the student of what is right and wrong and i use it in my lectures as an introductory course in introduction to programming the web &lt;/p&gt;&#xA;" OwnerUserId="6310" LastEditorUserId="1293" LastEditDate="2018-12-13T13:27:40.770" LastActivityDate="2018-12-13T13:27:40.770" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5310" PostTypeId="2" ParentId="5262" CreationDate="2018-12-13T15:13:34.653" Score="1" Body="&lt;p&gt;This isn't really an answer, but I hope will provide a bit of insight for the OP into thinking about and presenting the problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that recursion (in computing) and induction (in mathematics) are complementary, not identical ideas. The interplay between the two can give insight. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In mathematical induction, we normally work &lt;em&gt;outward&lt;/em&gt; from the base case. For example, in an inductive definition, you first establish (for example) that 1 is a Natural Number. You then define the inductive case(s) based on that. So, the general case is valid because you can work forward, through a finite number of steps, until you reach the case for, say 42. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In programming recursion, we work and think in the other direction. While we may state or prove the base case first, the program written for the general case(s) work &lt;em&gt;inward&lt;/em&gt; toward that base. We write a solution of a more complex case in terms of &lt;em&gt;known or assumed&lt;/em&gt; solutions for the simpler case(s). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope I'm not being overly subtle here, and admit that it may be just a personal way of thinking, but I find it helpful. In induction, we start at the base and work outward until we are stopped by a more complex case (42). In recursion we start with the complex case and work backwards until we are stopped by the base case. In both we need an argument of finiteness, of course, but they seem subtly different to me. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since this is just an insight, not an answer, I've marked it as community owned.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-13T15:13:34.653" CommentCount="0" CommunityOwnedDate="2018-12-13T15:13:34.653" ContentLicense="CC BY-SA 4.0" />
  <row Id="5312" PostTypeId="1" AcceptedAnswerId="5346" CreationDate="2018-12-18T10:36:41.080" Score="4" ViewCount="524" Body="&lt;p&gt;I am new to Computer Sciences, working as machine learning engineer. I only know the basics of programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I improve my technical comprehension so that I will be able solve different problems in Computer domain?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Currently I have difficulty understanding technical blogs. The terms and jargon confuse me. Even after searching for those jargon in Google, I feel I don't reach anywhere.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance I was given a problem of image processing yesterday by the seniors in my company. I had no idea how to go about it. When I read about it words like 'parsing', structure comprehension were thrown at me. I would like to know whether it is the lack of computer background that's the problem or comprehension or something else. How am I to deal it?&lt;/p&gt;&#xA;" OwnerUserId="6345" LastEditorUserId="8651" LastEditDate="2020-02-14T05:52:22.143" LastActivityDate="2020-02-14T05:52:22.143" Title="How can I improve my understanding in Computer Science?" Tags="|student-motivation|self-learning|struggling-students|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5313" PostTypeId="2" ParentId="5306" CreationDate="2018-12-18T12:15:45.870" Score="1" Body="&lt;p&gt;I was wondering the other day. Who would I hire? &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Someone with good theory knowledge, that used educational languages (Eiffel for OO, scheme for functional, both for simple and creating DSLs). Or &lt;/li&gt;&#xA;&lt;li&gt;Someone with some knowledge of the languages that we use here. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I think I would hire the people that learnt the educational languages, and so have a better understanding. I can then train then in the language that I use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see little value in the panic to teach what will be used at work. They will get this experience when they start work, or if they do a project using these tools (after learning to do it properly). And work will not teach them what they missed at school/college/university.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2018-12-18T12:15:45.870" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5314" PostTypeId="2" ParentId="5312" CreationDate="2018-12-18T12:26:49.667" Score="1" Body="&lt;p&gt;I would find out what your current strengths are, and what your work requires and focus on the intersection (what is common in both) of these. (What were you hired for?). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then concurrently (at the same time, well not exactly the same time, evenings and weekends and spare time at work), start learning stuff that will help you.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2018-12-18T12:32:51.977" LastActivityDate="2018-12-18T12:32:51.977" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5315" PostTypeId="2" ParentId="5312" CreationDate="2018-12-18T14:38:28.640" Score="4" Body="&lt;p&gt;You have a big job. The only way to do it is to just start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The undergraduate CS curriculum, which forms a good basis, is about 500 hours of direct instruction and another 1000 or so hours of practice. The instruction is guided and the topics are selected by experts. You are trying to do all of that on  your own. Big job, but not impossible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could start by viewing the curriculum of a respected college or university and finding out which text books they use. Don't buy them all at once, but it will give you a list of topic areas that you need to consider. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you can proceed in one of several ways - need driven or interest driven or structured. You can also use a combined approach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The need driven approach says to study now what you need now in your job. That is pretty good, except, as you have seen, you may not have the background to understand some of the topics as you are probably jumping into the middle of a deep subject. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The interest driven approach says to study what you want to study now. What seems interesting? Same problem though. You lack some of the basics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The structured approach is to generally follow the course of study that you found in your look at college curricula. Programming, data structures, algorithms, ... The curricula are designed to provide the prerequisite knowledge for any given topic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need to use any one of the strategies exclusively. But if you find that you are studying something for which you don't have the prerequisite knowledge you will need to go back to those (hopefully more elementary) topics to enable your current study. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can study the various topics in different ways. Books, online tutorials, online courses, courses at local colleges, speaking to colleagues, forming a study group, hiring a tutor, ... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Big job. Just start and don't stop. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-18T14:38:28.640" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5316" PostTypeId="2" ParentId="5060" CreationDate="2018-12-19T08:12:42.793" Score="0" Body="&lt;p&gt;This might be a starting point, though the language and style is more for non-academics:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;IT Demystified: The IT handbook for digital leaders, Ade McCormack 2017&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;At least the TOC and samples I could see have what I expected.&lt;/p&gt;&#xA;" OwnerUserId="5943" LastActivityDate="2018-12-19T08:12:42.793" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5317" PostTypeId="2" ParentId="5306" CreationDate="2018-12-19T08:46:21.850" Score="2" Body="&lt;p&gt;One idea which might be a bit too trade-schooly but which I offer in case you disagree: the practice of software engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One big difference between Java and JavaScript is that Java has enormous standard libraries, and JavaScript has very little. In consequence, JS forces you to either reinvent the wheel or learn to use a package management system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use of revision control would also fit into the title I proposed, and obviously that can be done with almost any language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would take a lot of work to set up, but you could even do a kind of open group project where the class is divided in quarters for the first half of the practical side, with each group given a spec for a library and instructed to publish their implementation to an in-house repository. Then in the second half each individual must develop a project which uses the four libraries. Wrap up with written feedback on why they chose the dependencies they chose for the second half, and read out selected feedback to the class. The goal would be to learn by experience the value of documentation and encapsulation.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2018-12-19T08:46:21.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5319" PostTypeId="2" ParentId="5306" CreationDate="2018-12-19T18:15:38.420" Score="2" Body="&lt;p&gt;All programming languages are tools. Whether one is a programmer, a computer scientist, a student, or an instructor, the &lt;em&gt;tool&lt;/em&gt; status of programming languages remains constant. Selecting the right tool for the job, out of those which are available at the time, becomes an exercise in itself. The second half of the exercise is how to use the tools you &lt;em&gt;do have&lt;/em&gt; to achieve your objectives, even when the tool available is not the one you would prefer, nor even in the top tier of the tools best suited for the task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;JavaScript just might not have anything about it which makes it better than others available to you for covering, or demonstrating, &lt;em&gt;any&lt;/em&gt; of the &quot;core programming or theoretical CS concepts.&quot; Such a position, however, does not disqualify it for use as a teaching tool. Neither in your situation, nor in a general sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As stated, the choice to move JavaScript into your core curriculum is &quot;for vocational-readiness reasons,&quot; rather than for some concept it demonstrates uniquely well. Perhaps, then, it ought to be used as a tool in the same direction. Not being a certified prognosticator my predictions are not worth much. Nevertheless, I think JavaScript will be a work-place tool for some time to come. Teaching it to your students is likely to be of value to them, even if there is no shining spot in theoretical concepts for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can still use JavaScript as a tool to teach some concepts - educational concepts. Use the learning of JavaScript to teach them how to learn. Both how to learn in general, and how to learn a new coding language. Should they get into a career path that never sees the need for JavaScript code, they are still very likely to encounter the need to learn a new language at least once in their career, if not in their further education. Perhaps you can also include education on how to evaluate a language for its strengths and weaknesses, or a segment on how, and why, new languages are created.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using such an approach enables inclusion of JavaScript in the curriculum and offers multiple objectives in the &quot;vocational-readiness&quot; direction. It also avoids following in Dr. Frankenstein's footsteps.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-12-19T18:15:38.420" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5320" PostTypeId="1" CreationDate="2018-12-22T16:52:31.880" Score="4" ViewCount="155" Body="&lt;p&gt;I am thinking about &quot;dissecting&quot; my code with students, going line by line and commenting (why is this the condition of the while? What does this piece of code do?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A simple example can be found here: &lt;a href=&quot;https://docs.google.com/document/d/1mxTE_E2_YKq-yhaXAfBxYP11uaRm7bSXTnP55bMnPyQ/edit&quot; rel=&quot;noreferrer&quot;&gt;https://docs.google.com/document/d/1mxTE_E2_YKq-yhaXAfBxYP11uaRm7bSXTnP55bMnPyQ/edit&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I would like a better tool for the job. As you can see, in docs, the comments are far away from the code and not linked to their respective by any visual cue. They are also all on the same color. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tryed some highlighting tools for docs, but they seem to just highlight,not add colored comments&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am looking for ideas, inside or outside google docs, to do the job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For inspiration (no way am I ever doing something this pretty!) here is an image from a headfirst book&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/H7riz.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/H7riz.png&quot; alt=&quot;Head first diagram&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4251" LastActivityDate="2018-12-28T18:01:58.297" Title="Code highlight for classroom use" Tags="|lecture-tools|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5321" PostTypeId="2" ParentId="5320" CreationDate="2018-12-22T19:49:58.670" Score="4" Body="&lt;p&gt;I'm taking a very basic approach when I do it: I use my Editor and comment line by line. This way I can directly show alternatives and effects if something does not work as planned. &#xA;Usually I'm developing the code live to avoid that students get distracted by the code to come. &#xA;The good thing about this approach is, you can show them how you can develop a program from scratch and how you are digging into the finer aspects of problem solving. E.g. you can &quot;forget&quot; one condition in a loop and create an endless loop - and show them how you can find the mistake. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing I did which comes closer to your UML example: I'm using a surface tablet in my class and sometimes I'm just taking a quick screenshot and use the pen to write on this screenshot. This works nicely and does not need additional tools (once you are having a tablet with pen).&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2018-12-22T19:49:58.670" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5322" PostTypeId="2" ParentId="5320" CreationDate="2018-12-22T20:39:57.133" Score="5" Body="&lt;p&gt;I would suggest two things. Both of them, however, require that you give them printouts of the code so that they can make notations of their own without having to use any tool. Just write on the paper. Also, I'm assuming that your code is in small pieces, say, short methods. For me, a method is long at about five lines and a method that covers a page is incomprehensible. I have anecdotal evidence from industry that the latter is also true. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One method, assuming that you have given students the code is to just project it from your normal IDE and highlight it with the mouse. Ask the students about it and talk about it. Asking is probably more effective. You don't need to write anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another uses a tool like Powerpoint. Build a deck in which each page shows exactly the same code but with different sections highlighted as you desire, using one or more colors. You can flip between pages as you talk, flipping both forward and backward as needed. But, again, ask the students to explain, rather than giving your own explanations. This way you can pick up misconceptions they might have and correct them. Make sure that the code itself has the same alignment on each page. Then when you flip, only the highlighting changes and students don't need to readjust the context. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you can project against a writable surface rather than a screen. If you project on a whiteboard (and can ignore the glare) you can use marker pens to annotate - especially when the students say the right thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make it interactive. Broadcast is much less effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, since you are putting effort in anyway, make sure that you &lt;em&gt;always&lt;/em&gt; use &lt;em&gt;intention revealing names&lt;/em&gt; in your demo code. Don't use x, y, z, i, j, k. Make the names come from the problem being solved, not the solution. For example &lt;em&gt;counter&lt;/em&gt; is a name from the solution. But negative_value_counter is a name from the problem (of counting negative values - duh). In this way, if you are primarily teaching them about how to structure programs, you can focus on the structure (if, while, ...) rather than having them wonder about the purpose of abstract names. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-12-22T20:47:40.763" LastActivityDate="2018-12-22T20:47:40.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5323" PostTypeId="2" ParentId="5320" CreationDate="2018-12-22T23:51:29.117" Score="3" Body="&lt;p&gt;I create code-comprehension sheets outlined in one of two ways (depending on the code): code on the left, with questions on the right, or code with questions interspersed like comments.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a few uses for such sheets:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Check comprehension of what we've just gone over.&lt;/li&gt;&#xA;&lt;li&gt;Force students to try to examine and digest code &lt;em&gt;prior&lt;/em&gt; to going over it together (to increase interest/retention when we go over the material.)&lt;/li&gt;&#xA;&lt;li&gt;Assessments.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Typically I will do this with 1-3 pages of code that has to be understood on several different levels in order to make sense of it.  Think objects, or assembly code.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2018-12-22T23:51:29.117" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5325" PostTypeId="1" CreationDate="2018-12-27T18:41:08.593" Score="6" ViewCount="188" Body="&lt;p&gt;I'm in need of major help at my current job. I'm a HS teacher and I teach a private school - I just started in August, two days before school started and five days before the previous teacher left for a different school for another opportunity, and I'm the new computer science teacher. I have a masters in CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two of my classes are going very well (CS 1 and CS 2), and I'm very much in my element teaching those classes. They're not perfect, but I have some awesome ideas for building them over the years. The classes are about coding, which I am very confident in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am having major trouble with my 3rd class - Computer Hardware and Software. The course description is based on the A+ technician curriculum. Not only is it my largest and rowdiest class, but I'm having severe problems coming up with lessons or curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have an IT background. I was originally told months ago that I have to teach A+ because that was what is in the course description, and that I have to teach the concepts of the course. The problem is, I don't have an IT background, I have a CS background, and so I'm supposed to teach what is in A+.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't have A+ certification, I'm not a technician by trade, I don't know all the ins and outs of different motherboards, processors or input/output ports - I mean, I have an informal understanding of those things, but I am not sure how to make this stuff interesting for 10th graders who all are already students with ADHD and are very bored right now. I find myself not having fun lessons ever, and I even cried in the middle of class because I'm boring and I have no idea what I'm doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My administrator says I can't change the class during the school year - I've made it clear since the beginning of the year that this is not my expertise. What should I do? I bought 10 raspberry pis and I want to use those to teach physical computing, but even that is coding, and not A+ at all, and it's something I have to learn myself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm the only computer science teacher here at my school, and so I don't think my colleagues or my administrator understand that 1) A+ is not really a college prep curriculum, nor is it computer science, 2) Parents care more that their students are learning important things that meeting whatever was in the course description. I don't mean to be rude, but I feel like no one is teaching A+ to college-prep students, they're teaching coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do? Does anyone have experience teaching A+ to high school students?&lt;/p&gt;&#xA;" OwnerUserId="3990" LastEditorUserId="1293" LastEditDate="2018-12-31T16:20:09.223" LastActivityDate="2018-12-31T16:20:09.223" Title="How can I set up and deliver a Computer Hardware Course for the first time?" Tags="|curriculum-design|secondary-education|information-technology|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5326" PostTypeId="1" CreationDate="2018-12-28T00:25:47.030" Score="7" ViewCount="396" Body="&lt;p&gt;The textbooks that I know about, teaching databases, are not complete. In the sense that they lack a complete set of assignments, homework, projects, slides and instructor manual. Do you know of any new textbook that is complete in this sense?&lt;/p&gt;&#xA;" OwnerUserId="6385" LastEditorUserId="204" LastEditDate="2018-12-28T10:20:11.627" LastActivityDate="2019-12-07T16:23:58.133" Title="Do you know of a complete textbook for teaching databases?" Tags="|resource-request|databases|textbook|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5327" PostTypeId="2" ParentId="5325" CreationDate="2018-12-28T08:05:01.040" Score="6" Body="&lt;p&gt;&lt;strong&gt;Somebody is going to be spending some money.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the question, it seems that the school has not set up a lab environment for the course. Your purchase of Pis was a good move in the right direction. To be useful, your &lt;em&gt;Computer Hardware and Software&lt;/em&gt; course needs to be more of a lab style course than a knowledge-based course such as history or math. Making it more hands-on for the students might even help reduce the rowdiness and tame the ADHD.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Test Basics&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is no age requirement, from CompTIA, for taking the tests. CompTIA does, however, recommend 13 as a likely minimum age. (A point to return to later.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The overview from &lt;a href=&quot;https://certification.comptia.org/training/self-study/books/a-220-901-220-902-study-guide#tab1&quot; rel=&quot;noreferrer&quot;&gt;CompTIA&lt;/a&gt; provides:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Specifically, we recommend that you have the following skills and knowledge before starting this course:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Recognize the main components of a PC and different data media such as USB drives and DVD.&lt;/li&gt;&#xA;  &lt;li&gt;Start the computer and navigate the desktop.&lt;/li&gt;&#xA;  &lt;li&gt;Use Windows Explorer to create directories and subdirectories and manage files.&lt;/li&gt;&#xA;  &lt;li&gt;Use a web browser such as Internet Explorer to view websites.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;After reading the CompTIA A+ 220-901 Certification Study Guide, you will be able to:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Identify types and characteristics of PC, laptop, and mobile device components, including motherboard, CPU, memory, and storage, input, and output devices.&lt;/li&gt;&#xA;  &lt;li&gt;Install, configure, and troubleshoot peripheral devices and system components.&lt;/li&gt;&#xA;  &lt;li&gt;Install, configure, and troubleshoot print devices.&lt;/li&gt;&#xA;  &lt;li&gt;Install, configure, and troubleshoot wired and wireless LAN links and Internet access devices.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;  &#xA;  &lt;p&gt;After reading the CompTIA A+ 220-902 Certification Study Guide, you will be able to:&lt;/p&gt;&#xA;  &#xA;  &lt;ul&gt;&#xA;  &lt;li&gt;Install, configure, and troubleshoot the Microsoft Windows, Linux, and OS X PC operating systems plus iOS, Android, and Windows mobile devices.&lt;/li&gt;&#xA;  &lt;li&gt;Configure and manage PC and mobile device network connectivity plus users, groups, and shared resources in a typical SOHO network.&lt;/li&gt;&#xA;  &lt;li&gt;Use anti-virus tools to prevent and recover from malware infections.&lt;/li&gt;&#xA;  &lt;li&gt;Configure access control measures, such as authentication, security policy, encryption, and firewalls.&lt;/li&gt;&#xA;  &lt;li&gt;Perform basic PC maintenance while working safely and responsibly and communicate effectively with customers.&lt;/li&gt;&#xA;  &lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Based on the test expectations, I would surmise that while you may not be well versed in each objective, you have a solid foundation of experience and exposure which will make gaining the requisite knowledge easier than you're anticipating. In practical terms, the level of knowledge being tested is mostly just a notch or two above &quot;common knowledge&quot; anyway. Reading the book by Mike Meyers (&lt;em&gt;see next section&lt;/em&gt;) could be all you need to learn about the A+ to be able to teach it to your students. I'd still recommend getting a copy of the Official study guides anyway, even if you find a used one somewhere. The manner they present the information is influenced by how they will test for it, and knowing that will help you design your course to help ready your students for the test.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Instructor Prep&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It seems a bit much to expect that high school students would be able, and willing, to purchase their own copy of the official &lt;a href=&quot;https://store.comptia.org/product/978-1-64274-000-4&quot; rel=&quot;noreferrer&quot; title=&quot;Buy the official study guide&quot;&gt;CompTIA A+ Study Guide&lt;/a&gt;. As the instructor, however, you probably should. As an alternative, or supplement, you could read &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/125958951X&quot; rel=&quot;noreferrer&quot;&gt;CompTIA A+ Certification All-in-One Exam Guide, Ninth Edition (Exams 220-901 &amp;amp; 220-902)&lt;/a&gt;, by Mike Meyers. In various versions, his CompTIA related books have been recommended reading. This book is probably available in your &lt;a href=&quot;https://www.worldcat.org/search?q=bn%3A+978-1259589515&amp;amp;qt=advanced&amp;amp;dblist=638#%2528x0%253Abook%2Bx4%253Aprintbook%2529format&quot; rel=&quot;noreferrer&quot; title=&quot;Library search results&quot;&gt;local public library&lt;/a&gt;, or through &lt;a href=&quot;https://en.wikipedia.org/wiki/Interlibrary_loan&quot; rel=&quot;noreferrer&quot; title=&quot;Wikipedia entry about Interlibrary Load system&quot;&gt;ILL&lt;/a&gt; if they don't have it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a guide for developing your course you can at least review the objectives for the two A+ tests, (hardware) &lt;a href=&quot;https://certification.comptia.org/docs/default-source/exam-objectives/comptia-a-220-901-exam-objectives.pdf&quot; rel=&quot;noreferrer&quot; title=&quot;Hardware test objectives&quot;&gt;220-901&lt;/a&gt; and (software) &lt;a href=&quot;https://certification.comptia.org/docs/default-source/exam-objectives/comptia-a-220-902-exam-objectives.pdf&quot; rel=&quot;noreferrer&quot; title=&quot;Software test objectives&quot;&gt;220-902&lt;/a&gt;. An extra problem is that the 220-901/220-902 test series is old. They were launched in Dec., 2015, and are set to be retired in July 2019. If a partial objective for the course is to prepare the students to pass the exams after the course, there could be a timeline issue. The current test is set to retire at about the same time as the students would be finished with the course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The CompTIA tests are billed as &quot;vendor-neutral&quot; and they do cover the majority of the field, including Linux, Mac OS, iOS, and Android, in their testing. Windows is still the priority for the testing, with almost all the software and networking scenarios involving Windows-based tools for their solution. That said, without the exposure and practice with Linux, and the mobile OSes, they are unlikely to achieve a passing score on the real tests. What little there is for Android and iOS can be discussed and some of the students can practice on their personal phones, since it mostly involves increasing security or connecting to networks and email servers. The improved security on their devices will not be a bad thing at all.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Lab Prep&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While it is not, technically, required, the A+ preparation course will be most effective if it is based on in-lab experience more than memorization of material. (Think of automotive mechanics more than chemistry.) Especially in the hardware section (220-901), what the students need to learn is what they can &lt;em&gt;do&lt;/em&gt; rather than &lt;em&gt;know&lt;/em&gt;. The software test (220-902) is more evenly split between skills and knowledge. Even so, doing it will mean more than knowing it. This means having a &quot;lab&quot; available to practice in. The lab does not need to be anything permanent at all. One A+ Prep course that I was familiar with at a community college used a regular classroom. The instructor had all the elements needed stored in a collection of plastic crates and they were wheeled into the classroom on a hand truck for the class twice a week.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Build a test lab with a couple desktop computers with monitors, a couple network hubs and/or routers, cables that work (and some that don't :D) and extra hardware (HDD, RAM, printer, external devices including USB HDD).  In this case cutting edge is not as good as old-school. An old Intel Pentium Dual Core/AMD Athlon 64 x2 with a motherboard that is just new enough to include a SATA port along the IDE port(s) and smallish HDDs, 150-300GB, in a mix of IDE and SATA. An extra advantage of using the older (ancient?) hardware is that you can probably find it very inexpensively in thrift shops and second hand stores. Since it is for school, you may even convince a local electronics recycling center to donate some of those parts. If you can amass sufficient spares you won't have to worry about the occasional damaged parts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, even a non-working notebook (laptop) which can be dissected, and a few samples of other portables to allow the students to see the internals, would be helpful. Opening a notebook computer can be tricky - usually there is one piece you have to &quot;pry&quot; off first, after which it becomes a &lt;a href=&quot;https://en.wikipedia.org/wiki/Puzzle_box&quot; rel=&quot;noreferrer&quot;&gt;puzzle box&lt;/a&gt;, removing screws and pieces in the proper order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the software side, specifically the OSes, you can get by with, and I recommend using, Windows XP Pro, and an older Linux more appropriate for the collected hardware. The &quot;latest and greatest&quot; Linux kernel will probably work on the suggested systems, yet newer kernels will not supply any additional benefits to the students, be larger, and take longer to install. A system that can be installed from a CD (not a DVD) and operate without updates or extra installed packages allows the students to practice setup and configuration of Linux without needing an Internet connection for the box each time. Likewise, with Windows XP Pro, Service Pack 2, you can do a complete install without having to access the Web for updates or drivers. As the system will be installed, and then removed, repeatedly, there is no issue with the licensing for Windows, and you will not have to perform activation. One legal CD-KEY is all you need. (Several copies of the install disk, however, is strongly advised.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Motivation&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This probably the hardest part to give pointers on, as I have never met your students, and do not know anything about their background. The one point that seems to apply in almost any situation, however, is &quot;self-interest.&quot; Other than the rare student who loves knowledge for its own sake, they are not going to be very motivated by &quot;knowing&quot; something unless it makes &quot;getting&quot; something easier. knowledge of why the students are in that class could help. If they took that course because the school/district/state requires it, the only &quot;motivation&quot; they start the course with is &quot;pass the class.&quot; Worse, though likely, is that the course had a reputation as an &quot;Easy A&quot; with the prior instructor, and the current students selected your course to avoid doing any learning while collecting a needed elective credit for graduation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned in the prior section, CompTIA has no age requirements for the A+ Certification. If the course has, or can be given, the objective of passing the CompTIA A+ Certification tests after completion, one possible motivation can be that your students, still &quot;minors&quot;, can obtain a certification that is meant for adults, and having it might open doors for summer jobs, with &lt;strong&gt;good&lt;/strong&gt; pay that even a lot of adults couldn't get. The exams themselves are not inexpensive, however. The CompTIA A+ Certification requires two tests, and they are $219 US each, with no refund for not passing. If the school was willing to fund, as a scholarship, the testing for students who get an 'A' in the course, that might provide an inducement as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The subject matter for your &lt;em&gt;Computer Hardware and Software&lt;/em&gt; course is, by nature, dry. The sector layout of spinning rust just is &lt;em&gt;not&lt;/em&gt; exciting. I like having my systems &lt;em&gt;very&lt;/em&gt; personalized, yet I don't find reading about config settings the least bit entertaining. (I probably will not remember what the settings mean next week either.) Making something, and seeing your work produce results, can be quite fulfilling, however. If you are able to create the &quot;lab&quot; and the students can learn about the hardware by building a computer from scratch, there is the challenge of getting it done, and the thrill of seeing it come alive the first time when they get it right. The more &quot;boxes&quot; you have available for building, the better. Still, with just wo, you can make it into a team project, and the teams can take turns building a system. You can even create a pattern where one team builds part of the system, and another team finishes it without knowing what the first team did until the examine the partial build in person.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;ADHD Considerations&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If the students truly are ADHD, as the question states, then the hands on approach will help even more. In addition, you can limit your &quot;lecture&quot; time to short segments inter-spaced with some form of &lt;a href=&quot;https://en.wikipedia.org/wiki/Kinesthetic_learning&quot; rel=&quot;noreferrer&quot; title=&quot;Wikipedia entry about Kinesthetic learning&quot;&gt;kinesthetic learning&lt;/a&gt;. Something as simple as passing around an HDD to examine can break the lecture into manageable chunks, give the students an excuse to move their bodies, and help them associate something physical with whatever you've been saying. As a general beginning point, limit the time students have to pay attention to you to intervals of 20 minutes, or less. Allow, or encourage, moving about the room for a couple minutes between segments. Walking about the room, or other large motor movements often help with alertness and can improve focus during the other times.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-12-28T08:05:01.040" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5328" PostTypeId="2" ParentId="5326" CreationDate="2018-12-28T08:48:34.227" Score="3" Body="&lt;p&gt;I have found the Shelly Cashman Series&amp;reg; of books to be effective. All too often the focus is on Microsoft products. In this case, Access is the database used in &lt;a href=&quot;https://www.cengage.com/c/shelly-cashman-series-microsoft-office-365-access-2016-comprehensive-1e-pratt/9781305870635&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Shelly Cashman Series&amp;reg; Microsoft&amp;reg; Office 365 &amp;amp; Access 2016: Comprehensive, 1st Edition&lt;/em&gt;&lt;/a&gt;, (2017).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Table of Contents:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Microsoft's New Productivity Tools for School and Work.&#xA;  Office 2016 and Windows 10: Essential Concepts and Skills.&#xA;  1. Databases and Database Objects: An Introduction.&#xA;  2. Querying a Database.&#xA;  3. Maintaining a Database.&#xA;  4. Creating Reports and Forms.&#xA;  5. Multiple-Table Forms.&#xA;  6. Advanced Report Techniques.&#xA;  7. Advanced Form Techniques.&#xA;  8. Macros, Navigation Forms, and Data Macros.&#xA;  9. Administering a Database System.&#xA;  10. Using SQL.&#xA;  11. Database Design.&#xA;  Index.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Also worth a look is &lt;a href=&quot;https://www.cengage.com/c/concepts-of-database-management-9e-starks&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Concepts Of Database Management 9th&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Table of Contents:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;ol&gt;&#xA;  &lt;li&gt;Introduction to Database Management.&lt;/li&gt;&#xA;  &lt;li&gt;The Relational Model 1: Introduction, QBE, and Relational Algebra.&lt;/li&gt;&#xA;  &lt;li&gt;The Relational Model 2: SQL.&lt;/li&gt;&#xA;  &lt;li&gt;The Relational Model 3: Advanced Topics.&lt;/li&gt;&#xA;  &lt;li&gt;Database Design 1: Normalization.&lt;/li&gt;&#xA;  &lt;li&gt;Database Design 2: Design Method.&lt;/li&gt;&#xA;  &lt;li&gt;DBMS Functions.&lt;/li&gt;&#xA;  &lt;li&gt;Database Administration.&lt;/li&gt;&#xA;  &lt;li&gt;Database Management Approaches.&#xA;  Appendix A: Comprehensive Design Example: Marvel College.&#xA;  Appendix B: SQL Reference.&#xA;  Appendix C: MySQL.&#xA;  Appendix D: &quot;How Do I&quot; Reference.&#xA;  Appendix E: Using Access to Create a Web App.&#xA;  Appendix F: A Systems Analysis Approach to Information-Level Requirements.&lt;/li&gt;&#xA;  &lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Both books are from Cengage, which does very well with print and ebook options, including a student access area to download materials for the practice work of each chapter and source material for the exercises. They also have extensive material available online for instructors, often including PowerPoint slides and test generators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(As a student, I've found the Cengage books I've used to be good for learning from. The download area sometimes includes even more exercises than the book presents. Sometimes the Shelly Cashman Series&amp;reg; of books seems too elementary for my tastes, but my fellow students have always seemed to like them well enough. So I can recommend Cengage as a resource from a student perspective as well.) &lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2018-12-28T08:48:34.227" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5329" PostTypeId="2" ParentId="5326" CreationDate="2018-12-28T17:57:58.697" Score="8" Body="&lt;p&gt;I've taught a lot of people SQL in person (over 3000), and I've had to cobble together materials out of a bunch of resources to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Exercises:&lt;br&gt;&#xA;&lt;a href=&quot;http://sqlzoo.net&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://sqlzoo.net&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;http://pgexercises.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://pgexercises.com&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&quot;https://www.codewars.com/?language=sql&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/?language=sql&lt;/a&gt;  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For slides, you can use mine, just fork them and remove the branding (they are CC-licensed, the branding is just there to look nice): &lt;a href=&quot;https://slides.com/lizh/sql-intro&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://slides.com/lizh/sql-intro&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make diagrams or have students make diagrams with: &lt;a href=&quot;https://app.quickdatabasediagrams.com/#/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://app.quickdatabasediagrams.com/#/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Usually the way I see SQL courses go:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Start by covering enough to get them through querying- have them start with one of the exercise sets above. You may want to break it down into a few class periods - basic querying and filters, followed by joins, and then more complex joins / functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, have them model data. If you model some data for them, then present a problem for them to do in groups, they usually get the idea pretty well and can self-grade. Then, have them choose something to model individually.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students should first try to model some data that has 2-3 relations, then model data with a many-to-one relation, then more complex relationship models (relating through 3 or 4 tables).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some really great things to model, either as a class or as individual projects:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Books (books are great because you can start with a simple model, then factor it out to third normal form, and then identify where it would vary by application greatly, eg amazon.com vs a library, they need different data models).&lt;/li&gt;&#xA;&lt;li&gt;Keyboard shortcuts (because you can relate them to applications, and keys)&lt;/li&gt;&#xA;&lt;li&gt;Transit (routes and schedules and busses, most students are familiar)&lt;/li&gt;&#xA;&lt;li&gt;Food (you can go a million different ways with this, this is a very difficult data model to do properly)&lt;/li&gt;&#xA;&lt;li&gt;Content (users, posts, comments, upvotes, block list. Do this one yourself as an example, it's in too many walkthroughs to be a good assignment.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If this helps, I am the CTO over at enki.com, and we have an open-source CC-licensed curriculum here: &lt;a href=&quot;https://github.com/enkidevs/curriculum&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/enkidevs/curriculum&lt;/a&gt;&#xA;and a free app students can use to do daily practice with SQL here: &lt;a href=&quot;https://enki.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://enki.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6386" LastEditorUserId="6704" LastEditDate="2019-12-07T16:23:58.133" LastActivityDate="2019-12-07T16:23:58.133" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5330" PostTypeId="2" ParentId="5320" CreationDate="2018-12-28T18:01:58.297" Score="4" Body="&lt;p&gt;You need to know about &lt;a href=&quot;http://pythontutor.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://pythontutor.com/&lt;/a&gt; - they have line-by-line execution and a diagram showing memory and how it changes. They also have more than just Python, they have Java,  C,  C++,  JavaScript, &amp;amp; Ruby&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have used this resource in my classes and it makes it &lt;em&gt;so amazing&lt;/em&gt; to explain how memory, references, and classes work. The C tutor really helps with pointers as well.&lt;/p&gt;&#xA;" OwnerUserId="6386" LastActivityDate="2018-12-28T18:01:58.297" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5331" PostTypeId="2" ParentId="4143" CreationDate="2018-12-28T18:11:59.220" Score="1" Body="&lt;p&gt;From &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0465045669&quot; rel=&quot;nofollow noreferrer&quot;&gt;Douglas Hofstader's Metamagical Themas&lt;/a&gt;, comes the idea of the Porpuquine. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A nine quilled porpuquine has nine quills, each of which is an eight quilled porpuquine. Of course an eight quilled porpuquine has exactly eight quills, each of which is a seven quilled porpuquine. Etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you can explore Quine. And you can do some computing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more complete story in the book is worth a look, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2018-12-28T18:11:59.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5333" PostTypeId="1" CreationDate="2018-12-30T14:45:14.493" Score="2" ViewCount="129" Body="&lt;p&gt;I am a TA for complexity theory course. I want to explain the Exponential Time Hypothesis (ETH) to undergraduate students. They have done algorithm and theory of computation course. They know about SAT problem, with brute force algorithms to solve SAT. I have explained the ETH hypothesis in less than half hour.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way is like this &lt;a href=&quot;https://en.wikipedia.org/wiki/Exponential_time_hypothesis&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;The hypothesis states that &lt;span class=&quot;math-container&quot;&gt;$3$&lt;/span&gt;-SAT (or any of several related NP-complete problems) cannot be solved in subexponential time in the worst case&quot;. The exponential time hypothesis, if true, would imply that P ≠ NP, but it is a stronger statement. It can be used to show that many computational problems are equivalent in complexity,in the sense that if one of them has a subexponential time algorithm then they all do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I then try to explain the each important point of the of definition. I don't this will be the right way. I want to convey the significance of the ETH.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question :&lt;/strong&gt; How to explain ETH to undergraduate students?&lt;/p&gt;&#xA;" OwnerUserId="6393" LastEditorUserId="1293" LastEditDate="2018-12-30T14:54:54.010" LastActivityDate="2018-12-30T20:53:40.573" Title="How to explain ETH to undergraduate students?" Tags="|complexity-theory|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5334" PostTypeId="2" ParentId="5333" CreationDate="2018-12-30T15:50:00.647" Score="1" Body="&lt;p&gt;I'm not sure I understand your dilemma, especially for the students you describe. Many computational problems can be shown to be &quot;reducible&quot; to others using a sub exponential (usually polynomial) run time algorithm. That is to say, a solution to one of these problems can be transformed into a solution of a different problem in polynomial time. The most interesting cases are those in which the transformation can be done in either direction using (say) polynomial time. Thus, if any of these &lt;em&gt;equivalent&lt;/em&gt; problems can be solved in general in sub exponential time, then all of them can, since the transformation is sub exponential. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can still get a doctorate for showing such equivalence of problems, in fact. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The significance is, of course, that a very large set of questions will be answered if someone can show that any of these &quot;equivalent problems&quot; are sub exponential and similarly if one can show that exponential time is &lt;em&gt;required&lt;/em&gt; for any of them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While &lt;em&gt;time&lt;/em&gt; is the usual measure of such things, &lt;em&gt;space&lt;/em&gt; can also be used for a similar sort of analysis. Some problems can be quickly solved using a lot of space. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that if your specific need is to show why the ETH isn't &lt;em&gt;equivalent&lt;/em&gt; to the statement &lt;span class=&quot;math-container&quot;&gt;$P ≠ NP$&lt;/span&gt; then I haven't said enough. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2018-12-30T16:24:33.100" LastActivityDate="2018-12-30T16:24:33.100" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5335" PostTypeId="2" ParentId="5333" CreationDate="2018-12-30T20:53:40.573" Score="2" Body="&lt;p&gt;It seems that you are aiming to convey the significance of disproving ETH? If you're looking to leave some impression, it's always better to show rather than tell.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think your students need to see some examples of practical areas and difficult problems that efficiently reduce to SAT. If you can demonstrate to them that SAT is a &quot;funnel&quot; of sorts for many other kinds of problems, your students can piece together for themselves why solving SAT in sub-exponential time would be game-changing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some example problems could include task scheduling, the traveling salesman problem (and by extension, pretty much any sort of path-finding problem), register-allocation in code compilation, general propositional logic inference, etc. You can also discuss industries that use SAT-solving already, like circuit design and e-commerce.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would take a fair bit of work, but you could even demo using a SAT-Solver; Sudoku is a popular and relatively easy example problem, and it never fails to amaze me how quickly it solves even the hardest of puzzles. If you need one, CryptoMiniSat is a great off-the-shelf SAT-Solver &lt;a href=&quot;https://github.com/msoos/cryptominisat/releases&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/msoos/cryptominisat/releases&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2018-12-30T20:53:40.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5337" PostTypeId="2" ParentId="3840" CreationDate="2019-01-02T22:37:21.960" Score="1" Body="&lt;p&gt;A project one of my students did was to build a data visualization pipeline where python was used for data preprocessing and javascript was used for web-based data visualization using a javascript framework. That worled out very well and used the strengths of both languages.&lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2019-01-02T22:37:21.960" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5338" PostTypeId="2" ParentId="5312" CreationDate="2019-01-05T07:37:07.967" Score="-3" Body="&lt;p&gt;while learning a programming first you should visualize the output and it will make easier you to code as well as u will be upgrade from the basis.&#xA;while doing the work don't take stress and do it.do in interesting way so that you wont get boring and you will find the solution of problem easily.&lt;/p&gt;&#xA;" OwnerUserId="6415" LastActivityDate="2019-01-05T07:37:07.967" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5339" PostTypeId="1" CreationDate="2019-01-06T03:30:03.357" Score="5" ViewCount="1293" Body="&lt;p&gt;I'm trying to improve the grading process and I need to write some guidelines for the graders. Students submit Java code for the assignments. Any ideas/suggestion about how to structure the grading?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2019-05-14T16:17:43.460" Title="How to write a grading rubric for coding assignments?" Tags="|grading|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5340" PostTypeId="2" ParentId="5326" CreationDate="2019-01-06T03:46:16.170" Score="1" Body="&lt;p&gt;&quot;Fundamentals of Database Systems&quot; (Elmasri, Navathe) is a good textbook. Still, from the practical point of view, there are no practical assignments one can use for students. Also, there is no complete set of exercises with solutions. Links given above are interesting, but not complete, especially for the normalization process. &lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2019-01-06T03:46:16.170" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5341" PostTypeId="1" AcceptedAnswerId="5347" CreationDate="2019-01-06T06:20:33.843" Score="2" ViewCount="248" Body="&lt;p&gt;I have experience with Python and now am learning C++, I am finding the lack of an interpreter or a repl to be a serious hinderance when learning the language, as well as the ability to type &lt;code&gt;help(func)&lt;/code&gt; in the interpreter when I get stuck. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What changes to the development environment, or to my approach to learning, can I make to increase my speed of learning?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Is there a typical development flow that compiled language programmers use that make them efficient?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do they create fast feedback loops between code edits and results?&lt;/p&gt;&#xA;" OwnerUserId="6417" LastEditorUserId="6417" LastEditDate="2019-01-12T04:14:13.607" LastActivityDate="2019-01-12T04:14:13.607" Title="How to learn to program compiled languages efficiently when coming from an interpreted language?" Tags="|self-learning|programming|c++|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5342" PostTypeId="2" ParentId="5339" CreationDate="2019-01-06T11:08:55.770" Score="4" Body="&lt;p&gt;Since the nature of your question implies sharing personal experience rather than providing some guidelines grounded on hard evidence, I'll take the liberty to share mine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past I tried to develop a fine-grained scheme for my courses, but now I think it was a mistake. Such schemes cause more troubles than they do good: they are difficult to follow for the graders, students ask why someone got 8 points instead of 9 points, and there is too much room for subjective interpretation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;After years of teaching, I realised a simple thing: we must separate educational goals from the grading process. As an educator I strive to provide the best explanations as I can and I try to give them examples of good code and show the difference between good and bad practices. However, as a grader, I only have to rank students according to their performance, and my practice shows that &lt;em&gt;regardless of the scheme&lt;/em&gt; the same students tend to go up or down. Therefore, I try to simplify my scheme every year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, currently I tend to focus on rather short assignments, each taking at most 2-3 hours to accomplish for a skillful student. Then I grade each of them on the scale 0-3 and give the same weight for each assignment (this is of course simplification as they aren't equal, but it works reasonably well).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The subsequent logic is as follows:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;0 - empty submission / plagiarism / doesn't compile &lt;/li&gt;&#xA;&lt;li&gt;1 - passes some tests &lt;/li&gt;&#xA;&lt;li&gt;2 - passess most tests, but fails sometimes &lt;/li&gt;&#xA;&lt;li&gt;3 - perfect submission&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Sometimes I extend it to 0-5 if I want to ask some additional questions that had to be answered within their submission and/or want to give an additional point for coding style.&lt;/p&gt;&#xA;" OwnerUserId="6409" LastActivityDate="2019-01-06T11:08:55.770" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5343" PostTypeId="2" ParentId="5339" CreationDate="2019-01-06T11:17:45.833" Score="2" Body="&lt;p&gt;What I'm doing is: I give points for each relevant idea / concept in the program. E.g. if you have to loop through a data structure and you have to do something with the content, I would give point for the loop construction and points for the content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The graders can now check whether the loop is correct and if the inner content is correct and give points for this. If students use a different technique (e.g. while instead of for), they can still decide whether the loop is doing as intended and give the points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are insisting in specific soliutions (e.g. you &lt;em&gt;have&lt;/em&gt; to use a &quot;for&quot;-loop), you should note this. Still, it would be possible to get some points for the content. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a simple test about python lists this could look like this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;feld = [5, 55, 555, 5555, 55555] # 1Pkt.&#xA;&#xA;print(&quot;Output:&quot;)&#xA;print(feld[0]) # 0,5 Pkt.&#xA;print(feld[4]) # 0,5 Pkt.&#xA;print(feld[2]) # 0,5 Pkt.&#xA;&#xA;feld[1] = 42 # 1Pkt.&#xA;&#xA;for z in feld: # 1,5 Pkt&#xA;    print(z, end=&quot;, &quot;) #0,5 Pkt. (&quot;end&quot; is not relevant)&#xA;print()&#xA;&#xA;print(feld[:2]) # 0,5 Pkt.&#xA;print(feld[2:])     # 0,5 Pkt.&#xA;print(feld[::-1]) # 0,5 Pkt.&#xA;print(feld[::2]) # 0,5 Pkt.&#xA;&#xA;summe = 0 #0,5 Pkt.&#xA;for z in feld: # 1 Pkt.&#xA;    summe += z # 1 Pkt.&#xA;print(&quot;Summe =&quot;, summe) #0,5 Pkt.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The problem becomes more difficult the larger the assignments are and the more variations you are having in the solutions. You could still try to decompose the overall problem and give points for parts of the solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, I suggest that you try to avoid to have different grades for the same (sub-)task - this ensures at least consistency of the grades. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2019-01-06T11:17:45.833" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5344" PostTypeId="2" ParentId="5339" CreationDate="2019-01-06T17:33:34.730" Score="3" Body="&lt;p&gt;When students are learning to program they should be focused on more than getting the &quot;right&quot; answer. If a pro is writing quick-n-dirty code that will be discarded, the answer is important. But in all other cases, a program will have a lifetime and this needs to be considered. Therefore it also needs to be taught - and learned. Focusing too much on details works against this goal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rubric should reward correctness, of course, but it should also reward structure. It should &lt;em&gt;not&lt;/em&gt; reward speculative programming, however: programming that &lt;em&gt;might&lt;/em&gt; be useful in the future but isn't now. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, in my view, the comments that are put on the students work should be more important than the points assigned. This is how you teach individual students and get them to advance. I realize that in the modern world, if you are teaching 800 students and have a staff of 40 to help you do it, someone else has to provide those specific comments. But if you ignore that altogether you are leaving the world of teaching and entering the world of pure performance - like a play - where there are not real requirements on the &quot;audience&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also difficult to justify a too specific grading rubric. If one student has earned 88 points and another has 89 or 90, can you say that there is some essential difference in their learning? Broad grading categories and the opportunity to revise work are much more valuable to the student than a strict point scale. It also lessens the need, in their minds, to argue about small points - especially when they need guidance and practice on bigger ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the scale is very large, it is useful to have a meeting with the graders before grading begins, but after some of the papers have been looked at (briefly). Only then can you get an idea about what is needed. Making it perfectly objective isn't the goal. The goal is to elicit change in the brains of the students. It will help, in such situations if the TAs have a stable set of students to work with, so that they can help with the individual guidance. To do this and to assure some uniformity can be difficult, of course. It might require that grades and comments are reviewed, perhaps by another TA than the one that normally works with a given student. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note, that I may be defining &quot;improve the grading process&quot; differently than you originally did. To me, things only improve if the students skills improve. Everything else should work to achieve that. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2019-01-07T09:53:46.273" LastActivityDate="2019-01-07T09:53:46.273" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5345" PostTypeId="2" ParentId="5341" CreationDate="2019-01-07T11:46:30.897" Score="1" Body="&lt;p&gt;You can find REPLs for C++ with an online search, but my advice would be different. I do the following with Java, but equivalent tools for C++ exist. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I use a sophisticated IDE (Eclipse) that, among other things, does error highlighting as I type. A typed language like C++ permits many errors to be caught early, normally in the compiler, but they can be pushed back into the development environment prior to formal compilation. That works for most syntax errors and for many structural errors, such as omitting a declaration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, I use &lt;em&gt;Test Driven Development&lt;/em&gt; to build serious code. I just JUnit, which is tailored for Java, of course, but there are equivalent &quot;units&quot; (TDD frameworks) for most languages. The rule here is &quot;no code without a failing test&quot;. The idea is that before you write any code you write a test for it based on the specification you have or that you create on the fly. The test captures your intent directly. You write the test for a function before you begin to write the function. It fails of course, since it can't even compile. But the IDE can automatically insert the stub for the function into the code. You then provide the function body and run the test again. If it fails you need to think again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But TDD is even better than that, since when you run the &quot;test&quot; you are actually running &lt;em&gt;all of the tests&lt;/em&gt;; the test &lt;em&gt;suite&lt;/em&gt;. So, if something used to work and now an earlier test breaks you get immediate feedback on it and, since the only thing you changed is that one method body, the source of error is usually pretty obvious. Moreover, tests are run independently of each other so that a failure of one test doesn't cascade into other failures that obscure the problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a workflow quite different from that of a REPL, so it takes some practice. But the IDE can do many things for you in addition to what is described here. The best of them have a plugin architecture in which you can easily add additional tools as needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Two additional notes. First, is that I use the same tools and techniques when programming Python and Ruby. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, having built many compilers, you should understand that the actual difference between a processor for a compiled language and an interpreted one is surprisingly small. The processing for the interpreted language has everything but the final stage code generator. But if it is to be efficient, it still creates an intermediate form of the program, possibly a tree or even an abstract assembler language version. Some of the optimization can be omitted, but only the late-stage optimizations, normally. So, an IDE for an interpreted language isn't so odd. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-01-07T12:32:24.227" LastActivityDate="2019-01-07T12:32:24.227" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5346" PostTypeId="2" ParentId="5312" CreationDate="2019-01-08T11:25:55.700" Score="5" Body="&lt;p&gt;Abstract definitions are a deep rabbit hole. To illustrate the point:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;First attempt&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine a non-English speaker trying to read the dictionary. First word: &lt;a href=&quot;https://en.oxforddictionaries.com/definition/aardvark&quot; rel=&quot;noreferrer&quot;&gt;Aardvark&lt;/a&gt;. &lt;em&gt;A nocturnal badger-sized burrowing mammal of Africa, ...&lt;/em&gt;&lt;br&gt;&#xA;Wait, what does &lt;a href=&quot;https://en.oxforddictionaries.com/definition/nocturnal&quot; rel=&quot;noreferrer&quot;&gt;nocturnal&lt;/a&gt; mean? &lt;em&gt;Done, occurring, or active at night.&lt;/em&gt;&lt;br&gt;&#xA;Wait, what does &lt;a href=&quot;https://en.oxforddictionaries.com/definition/occur&quot; rel=&quot;noreferrer&quot;&gt;occurring&lt;/a&gt; mean? ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And this is the core of the issue: you end up with an ever-growing web of definitions composed of words whose definitions you don't understand. You've already had to look up more than three words and you're &lt;em&gt;still&lt;/em&gt; not quire sure what an aardvark (the first word) is!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Second attempt&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's try again. You're learning English because you want to work as a chef cook in an English speaking zone. You're going to be a pasta chef, so how about you look up the translation of dishes you know how to make. Afterwards, look up the translation of the ingredients you use to make these dishes.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Why was the second attempt so much more succesful? Simply put, because you were looking up the words that belong to a concrete concept you already know and understand.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When I read about it words like 'parsing'&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you look up what parsing is, you will get some vague and generalized definition. The dictionary isn't much help here, even when looking at the computing definition. Google tells me:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[COMPUTING] analyse (a string or text) into logical syntactic components. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This definition won't help you if you've never done any parsing before, or you haven't even thought about doing the act of parsing (even if you didn't know that it's called parsing).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So let's approach this from the other way: You are writing an application, and the users expect to be able to upload an excel file so that the data from the file can be saved in your application('s database).&lt;br&gt;&#xA;How do you do that? Well, you will have to open up the file, look at the content of the file, and then add this data to your database.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you know that, it will make more sense what parsing is: parsing is &lt;strong&gt;making sense of the content you receive&lt;/strong&gt;.&lt;br&gt;&#xA;This can take on many forms, not just the reading of excel files. For example, when you ask Siri (or Alexa, or the Google Assistant) a question, it &lt;em&gt;parses&lt;/em&gt; your sentence in order to understand what it means. When your web browser receives HTML from the web server, it &lt;em&gt;parses&lt;/em&gt; the HTML in order to figure out what it needs to show to the user. When you load a savegame in a videogame, the game &lt;em&gt;parses&lt;/em&gt; the save file to know what your last saved game state was.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;So how do you learn computer science concepts?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The general rule is to approach it from a &lt;strong&gt;practical&lt;/strong&gt; side. First, you try to accomplish something. When you struggle accomplishing it, or you want to read up on doing it even better; you will be able to look at the documentation and will already understand its inherent goal or what it adds.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I am horrible at trying to understand new frameworks by reading the documentation or even seeing it presented. I learn much quicker by trying to use this, obviously failing because I don't know how to do things, and then look up how to do [simple thing, e.g. make the text bigger] in this framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By using this practical approach, my search for information is a &lt;strong&gt;directed&lt;/strong&gt; search (like the chef looking for the translation of a dish he knows), as opposed to an abstract search (learning random words in the hopes that you'll want to use them in the future).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not saying abstract searches can't be interesting. We've all spent some times clickbrowsing through Wikipedia or TV Tropes to find interesting things. But the abstract nature of computer science makes it hard to innately understand something you didn't know about before.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best science teachers I've had always employed a similar strategy. At the beginning of the class, they pose a seemingly simple question, but the students are unable to actually find the answer. And only &lt;em&gt;when they're curious about the answer to this question&lt;/em&gt;, the teacher starts to explain how to find the answer.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Other resources&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above answer is written in regards to your desire to self-learn. Of course, there are better ways of learning CS through courses and lectures. These courses are specifically designed to introduce concepts to you in a way that you understand them.&lt;br&gt;&#xA;When self-learning, it's hard to know where to start and to separate the simple topics from the complex ones.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is part of your issue. E.g. &quot;parsing&quot; is by no means a beginner topic. But if you had already learned the basics of file manipulation, collection (and preferably some OOP), the concept of parsing would've been a lot easier to understand from the get to. This is where guided courses help to, they ensure that you learn the necessary basics before starting on the more complex topics.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;As an aside&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I was given a problem of image processing yesterday by the seniors in my company&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I don't mean to offend, but if you're currently struggling to grasp what parsing it, you're &lt;em&gt;way&lt;/em&gt; out of your league of broaching the topic of image processing. There seems to be a huge disconnect between your current skill level and the tasks you're being given.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether you're in over your head at your current job, or your seniors are oblivious to your technical skill level, in either case I suggest being open about what you do and do not yet grasp. Trying to tackle complex subjects without the necessary basic skills is not only going to take a lot of time and effort, but it will inevitably teach you some bad habits because you will be unaware of alternative options.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-01-08T11:34:13.000" LastActivityDate="2019-01-08T11:34:13.000" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5347" PostTypeId="2" ParentId="5341" CreationDate="2019-01-09T13:14:11.363" Score="4" Body="&lt;p&gt;Your question deserves a long discussion, but I will try to narrow it down to few points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, remember that you are dealing not just with a &quot;compiled language&quot; such as Java or C# (that could be &lt;em&gt;much&lt;/em&gt; easier targets for you), you are dealing with C++ that was designed with backward compatibility with C as a killer feature, and C was created in late 70s. It means that C++ indeed implements &lt;em&gt;numerous&lt;/em&gt; design decisions that look archaic/obsolete/strange for a modern learner. Say, the whole system of header files is a hacky substitute for a proper package management. Thus it would be good for you to study carefully major language features and understand the true reason why they exist. In many cases you'll find newer and better alternatives to old tools (such as &lt;code&gt;std::vector&lt;/code&gt; objects vs. arrays)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, use a good IDE. For instance, if you place a cursor under &lt;code&gt;printf()&lt;/code&gt; (or any other library function) in MS Visual Studio and hit &lt;code&gt;F1&lt;/code&gt;, it will jump to the extensive online manual, so this is not an issue. Also you will get autocomplete features similar to those available for Python (e.g., type a variable name, then a dot, and see a list of member functions).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, think of a compiler as of a subsitute for REPL (and there are true REPL environments for C++, such as the one available at &lt;a href=&quot;https://repl.it/languages/cpp&quot; rel=&quot;nofollow noreferrer&quot;&gt;repl.it&lt;/a&gt;). When you type a Python program, you don't know anything about its correctness until you run it. In C++ you can catch many errors just by compiling. So by the time of the first run you will already eliminate all syntax errors and many other errors related to type mismatching. I was learning Python &lt;em&gt;after&lt;/em&gt; C++, and for me a source of constant annoyance was to make sure that &lt;em&gt;every single line of code&lt;/em&gt; is executed before I could even &lt;em&gt;hope&lt;/em&gt; it is correct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus your typical session will look like &quot;type some lines -&gt; compile -&gt; type some lines -&gt; compile -&gt; run&quot;). Since you are asking about &quot;fast feedback loops&quot;, I can tell that really good C++ programmers invest considerable effort in the type system used in their code. They don't use &lt;code&gt;int&lt;/code&gt; everywhere even if they can. They use incompatible types for incompatible entities, declare member functions as &lt;code&gt;const&lt;/code&gt; if they shouldn't modify objects, and add &lt;code&gt;static_assert&lt;/code&gt; statements where possible, and avoid type casting. In other words, they make the compiler do the job. In the best case, if such code compiles, it works correctly. So the real feedback loop is concentrated on the stage of compilation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, remember that C++ is a complex hardware-oriented language with long history (just look at the sheer size of Stroustup's &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/0321958322&quot; rel=&quot;nofollow noreferrer&quot;&gt;definitive guide&lt;/a&gt;), so approach it with patience. Mastering it takes time, indeed, be persistent and don't expect fast results.&lt;/p&gt;&#xA;" OwnerUserId="6409" LastActivityDate="2019-01-09T13:14:11.363" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5348" PostTypeId="1" CreationDate="2019-01-10T15:21:44.623" Score="6" ViewCount="907" Body="&lt;p&gt;We are teaching an AP CS class and the topic of 2d-arrays is coming up. There are plenty of cool and approachable sample applications for standard rectanglular arrays - matrix math, MIDI music, sudoku, connect-4, game-of-life, etc....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it's hard to think of examples for 2d-arrays with non-uniform row lengths, aka &quot;jagged&quot; or &quot;ragged&quot; arrays. Here's a simple example: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;{{1,2,3},&lt;br&gt;&#xA; {4,5},&lt;br&gt;&#xA; {6,7,8,9}&lt;br&gt;&#xA;}&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The ideal example would be simple or common enough for students to have the intuition for the task, but interesting enough to see how irregular-sized rows can be useful and even natural in certain situations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some ideas we've already floated but am not yet convinced I love: Pascal's triangle/Plinko, graphs represented with adjacency lists.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Addendum&lt;/strong&gt;: Many good ideas so far. One clarification - I would love examples that would NOT be better implemented as an array of &lt;em&gt;lists;&lt;/em&gt; adjacency lists for graphs, for example, are likely better that way.&lt;/p&gt;&#xA;" OwnerUserId="5614" LastEditorUserId="5614" LastEditDate="2019-01-11T13:31:54.607" LastActivityDate="2019-01-11T13:31:54.607" Title="What is a good teaching example/application for jagged arrays (2d arrays with irregular row lengths)?" Tags="|lesson-ideas|secondary-education|labs|ap-computer-science-a|arrays|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5349" PostTypeId="2" ParentId="5339" CreationDate="2019-01-10T18:03:11.597" Score="5" Body="&lt;p&gt;This is what I have for my Java assignments. Notice that this is not a programming course, but an algorithms course.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Compiling and running (8 points)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1.a 0 points if the program doesn't compile. No points for the rest. Grading complete.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;1.b If the code compiles and runs:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;a   Full points if it succeeds in all test cases.&#xA;b   0.5 deducted for each failing test case.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2. Readability and submission (2 points)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;2.1 Documentation (Oracle official)&#xA;    a. 0.5 points for complete commenting&#xA;    b. 0.4/0.2/0 (%) if we detect 0-25/25-50/75-100 (%) missing comments where expected.&#xA;    You should at least use clear commenting for the following:&#xA;&#xA;        a. Classes and interfaces&#xA;        b. Fields&#xA;        c. Methods, including all input parameters and return values&#xA;&#xA;2.2 Indentation (Oracle official)&#xA;&#xA;    a. 0.5 for appropriate indentation&#xA;    b. 0.4/0.2/0 (%) for 3/6/more violations&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;2.3 Submission:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(0) 1 points for (not) correctly following the requirements for submission.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would appreciate your feedback on this.&lt;/p&gt;&#xA;" OwnerUserId="6430" LastActivityDate="2019-01-10T18:03:11.597" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5350" PostTypeId="2" ParentId="5348" CreationDate="2019-01-10T18:42:14.417" Score="4" Body="&lt;p&gt;Hmm, here are a few ideas:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Calculating student GPA where the grades are all stored in an array of arrays, and the different semesters have different numbers of courses.&lt;/li&gt;&#xA;&lt;li&gt;Make a lookup table of prime factors.&lt;/li&gt;&#xA;&lt;li&gt;Consider an array of arrays of paths to hike, and local maximum / local minimum elevations passed along the way. Since there will be a different number of local maxima/minima along the way, the array will naturally be jagged.  Figure out which hiking path involves the least climbing.&lt;/li&gt;&#xA;&lt;li&gt;Same as above, but now instead store the elevation every x number of meters.  Since the hiking paths are somewhat different lengths, the array will naturally be jagged.  Determine which path has the lowest average slope for a hiker who has difficulty with hills.&lt;/li&gt;&#xA;&lt;li&gt;(More advanced than AP, probably) Many &lt;a href=&quot;http://www.sudoku-space.com/stairstep-sudoku/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sudoku variants&lt;/a&gt; often suggest jagged arrays.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Also, for what it's worth, if you organize your midi-like events by time, it's actually ragged.  Different numbers of notes are played (or stop playing) at different times.  If you play a triad, you will have three events.  If you play a triad at the same time as you stop playing a previous melodic note, you now have four events.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-01-10T18:42:14.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5351" PostTypeId="2" ParentId="5348" CreationDate="2019-01-10T19:04:10.547" Score="3" Body="&lt;p&gt;An example which I think could be useful to you, both because it's a &quot;ragged&quot; array and because students are likely to see it again later if you talk about parsing text, is splitting text by line and by character:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[&#xA;  [&quot;G&quot;, &quot;o&quot;, &quot;o&quot;, &quot;d&quot;],&#xA;  [&quot;M&quot;, &quot;o&quot;, &quot;r&quot;, &quot;n&quot;, &quot;i&quot;, &quot;n&quot;, &quot;g&quot;],&#xA;  [&quot;E&quot;, &quot;v&quot;, &quot;e&quot;, &quot;r&quot;, &quot;y&quot;, &quot;o&quot;, &quot;n&quot;, &quot;e&quot;, &quot;!&quot;]&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-01-10T19:04:10.547" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5352" PostTypeId="2" ParentId="5341" CreationDate="2019-01-10T19:36:54.353" Score="1" Body="&lt;p&gt;I would say that you need to learn a completely different (old fashioned, perhaps archaic) programming paradigm, non-interactive coding.  In Ye Olden Ancient days, a programmer would often write out a complete program (or at least large parts) on paper, before even going near a computer (or punch card machine).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try it as an exercise.  See how much code (how many lines) you can write (on paper, or into a plain text editor), and have it run correctly when first compiled and run.  You might learn to think more about certain aspects of the code, before typing, and perhaps end up a better programmer (even after going back to helpful interactive IDEs).  Compared to coders who only know how to compose within fast feedback loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will also prevent learning the bad habits from randomized hack-and-slash trial-and-error coding (that, while possibly helpful in certain exploratory and learning situations) which can become a problematical practice within many high quality/reliability coding paradigms (those that don't include 100% provable unit test coverage).&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2019-01-10T19:36:54.353" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5353" PostTypeId="2" ParentId="5348" CreationDate="2019-01-10T21:10:56.090" Score="4" Body="&lt;p&gt;I would suggest the game KenKen. Although it is played on a square board, one can easily represent the constraints as a ragged array. Represent each constraint as a single line in a file. Each line contains a variable number of &quot;tokens&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first token contains an operation and value (e.g. &lt;code&gt;+6&lt;/code&gt;) with the remaining tokens are a list of the cells in that constraint. The cell location could be represented as a pair of comma separated indices (e.g. &lt;code&gt;3,1&lt;/code&gt;) or in a spreadsheet like notation (e.g. &lt;code&gt;B5&lt;/code&gt;). In either case the line can be split on whitespace resulting in a ragged array. However, variation in the lengths will not be very great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've thought about combining this with Sudoku to show inheritance. Both KenKen and Sudoku are played on a square board and share the constraints that each row/column must contain unique values from a range. They are different in how the additional constraints are defined.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2019-01-10T21:10:56.090" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5354" PostTypeId="2" ParentId="5348" CreationDate="2019-01-10T21:37:59.427" Score="4" Body="&lt;h1&gt;Transportation:&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Presuming that your location has some form of public transportation, there will be intersection points where multiple lines meet. Lacking public transit locally, there is still the nearest commercial airport. In many cities the bus, or rail, system has a hub, which makes a good example for a larger data-set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the chosen point, multiple bus lines connecting, the bus terminal, or airport, create a 'table' of the departures, grouped by route number, destination, carrier, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Selecting one bus stop I frequent, there are 5 different buses which stop there. One is a short circulator, one is a long-range route with frequent service, and the others are 'normal' routes. Creating a 2-dimensional array with only those five routes gives a nicely 'ragged' array.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[&#xA;    12 [05:46,06:46,07:46,08:46,09:46,10:46,11:46,12:46,13:46,14:46,15:46,16:46,17:46,18:46,19:41],&#xA;    15 [06:26,06:56,07:21,07:41,07:56,08:16,08:31,08:56,09:19,09:59,10:39,11:19,11:59,12:39,13:19,13:54,14:22,14:42,15:02,15:27,15:47,16:07,16:27,16:47,17:07,17:27,17:46,18:01,18:21,18:36,19:01,19:25,19:55,21:05,22:15,23:25],&#xA;    18 [00:15,05:06,05:46,06:10,06:37,06:55,07:10,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:12,10:27,10:42,10:57,11:12,11:27,11:42,11:57,12:12,12:27,12:42,12:57,13:12,13:27,13:42,13:57,14:12,14:27,14:42,14:59,15:12,15:27,15:42,15:57,16:12,16:27,16:42,16:57,17:07,17:17,17:27,17:37,17:52,18:07,18:22,18:37,18:52,19:07,19:22,19:42,20:07,20:32,20:57,21:22,21:52,22:22,22:50,23:20],&#xA;    43 [04:43,05:13,05:50,06:24,06:51,07:21,07:51,08:21,08:51,09:26,10:01,10:46,11:51,12:56,13:38,14:06,14:51,15:21,15:56,16:26,16:56,17:31,18:05,18:40,19:20,20:40,22:00,23:30],&#xA;    71 [06:10,06:46,07:21,07:56,08:31,09:11,09:51,10:49,11:44,12:39,13:34,14:29,15:06,15:41,16:16,16:51,17:26,17:55,18:45,20:00,21:20]&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Stop #3860&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h3&gt;Possible sequence of learning:&lt;/h3&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Hypothetical transfer point with an 'even' array, each bus departs in half-hour intervals and has the same number of departures. Develop procedures to process that table.&lt;/li&gt;&#xA;&lt;li&gt;Change the schedule for one route to every 20 minutes, and add an extra couple hours to another route. Now, with a ragged array, see how the procedures break, and how to fix them.&lt;/li&gt;&#xA;&lt;li&gt;Create a new table, based on &quot;live&quot; data. See if the new procedures can handle that, and fix whatever breaks.&lt;/li&gt;&#xA;&lt;li&gt;Add a third dimension by making the table cover both, or all 4, directions buses can depart in. Again, see how well the procedures handle the new dimension, fixing what breaks.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The bus stop I used has buses going three different directions (W[15,43], NW[12.71], S[18]) from the one bench. Across the street are two more stops, one with departures in three directions (NE[71], E[15], SE[18,43]) and the other with a single direction (S[12]). By stop there are three elements at the top level, and by direction there six elements.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Add another layer of complexity by adding stops to the routes, in a new table. Each route has a number of 'time points' which are usually in a printed/published schedule. The times for each bus, on each route, can become a 3-dimensional table as well.&lt;/li&gt;&#xA;&lt;li&gt;Change the whole data-set by switching from bus stops to a hub, such as an airport, train depot, or truck terminal.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Bonus:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;With the two sets of tables developed, you are now in a position to move into directed graphs. No longer do the traveling sales agents have to travel some foreign routes to unknown places with &quot;costs&quot; which are hypothetical. Now they can travel to known points in the city with real-world time constraints based on catching buses and making transfer connections.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-01-10T21:37:59.427" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5355" PostTypeId="1" CreationDate="2019-01-11T09:31:04.987" Score="5" ViewCount="424" Body="&lt;p&gt;I learnt about trees and graphs from my textbooks (undergraduate level) last year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now I'm doing competitive programming and unable to solve questions involving these concepts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I fail to understand that a given question needs DFS or BFS for solving. I know these algorithms, but when it comes to questions which don't directly mention that DFS/BFS should be applied then I'm unable to solve them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always run away from these questions because I just know the concepts but fail to reproduce them in my code and have just learnt and never coded.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone help me in suggesting the path that I should follow to learn to solve such questions that appear in programming competitions like &quot;Codeforces&quot;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please, provide any references such as videos or any site for noobies.&lt;/p&gt;&#xA;" OwnerUserId="6434" LastEditorUserId="793" LastEditDate="2019-02-13T01:27:46.183" LastActivityDate="2019-02-13T01:27:46.183" Title="How to learn to solve trees, graphs questions for competitive programming" Tags="|self-learning|algorithms|data-structure|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5356" PostTypeId="2" ParentId="5355" CreationDate="2019-01-11T11:04:26.167" Score="3" Body="&lt;p&gt;In fact you are adressing an important issue: You were learning concepts, but you are unable to transfer the concepts to real world problems. This is a major issue in many higher education scenarios and e.g. my students always complain, that they do not find the answers to my question in the course material. Of course they don't, otherwise I would not have to ask the question - I assume they are capable of reading and writing ;-).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now how can you come to that next level of understanding? The answer once again is practice! You have to understand the underlying structure of a problem (e.g. use a divide and conquer approach to decompose the problem) and build a solution based on well-known blocks (like DFS / BFS, sorting, ...). The final step is to adapt the algorithm to your data structures or other specific needs of your problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have to do this over and over again to get practice. Often it helps if you are trying to understand how others did if for some problems, and websites like Codeforces can give you good examples of problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After some practice, you will have gained a good intuition on how to decompose a specific problem. Especially for trees and graphs it is always helpful to draw your data structures and think about how an algorithm would traverse the data structure. &lt;/p&gt;&#xA;" OwnerUserId="6109" LastActivityDate="2019-01-11T11:04:26.167" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5357" PostTypeId="2" ParentId="5348" CreationDate="2019-01-11T11:52:06.067" Score="0" Body="&lt;p&gt;This &quot;not an answer&quot; is just an attempt to give some perspective to the issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We often use arrays to keep track of information. Each entry (I'll call it a &quot;row&quot; here for reasons that will become obvious) holds some data we need to keep. Sometimes the entry for a row is complex, not simple. Sometimes it is just an object of some type, but sometimes it is a collection of things. We can use any sort of collection for an entry (row). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the sorts of entries we might consider is an array. Each row of our original array is, itself, an array (though heterogeneous situations are possible also). So, we get an array of arrays. There is nothing in general that says that each of those arrays needs to be of the same length, as the information stored in a row might vary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But (insight coming) here each of the rows has a definite meaning in your problem, but the &quot;columns&quot; have little or no meaning. Less meaning in any case. The situation isn't symmetric. It may be possible, for example, to swap rows in the array without losing essential information. But it may not be possible to swap columns in the same (lossless) way, though that depends on the problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in user &lt;a href=&quot;https://cseducators.stackexchange.com/a/5350/1293&quot;&gt;Ben I.'s prime factor&lt;/a&gt; example, a row contains the prime factors of a given number. But a column is essentially meaningless. In fact, the use of an array, rather than some other collection is optional. It could, as well, have been a tree-set.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Matrices don't have these characteristics, of course. The columns are as meaningful as the rows. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-01-11T11:52:06.067" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5358" PostTypeId="1" AcceptedAnswerId="5359" CreationDate="2019-01-11T20:10:09.337" Score="15" ViewCount="9114" Body="&lt;p&gt;I teach programming at a university, at 2 freshmen courses. My students are being introduced to programming for the first time, so we have to teach them about algorithms, variables, control flow, functions, arrays (lists), etc. So this course covers the very basics. And every single year I see the same outcome: they get confused, frustrated, and the common question of &quot;what are these exercises for&quot; always arises. We don't even cover OOP and don't teach anything GUI (only CLI programs, just for them to grasp problem solving and creating algorithms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So this year I'm trying to take a different approach: I'd like to start my course by showing them how to build a GUI program, at first by just asking them to copy and paste, until they have a working program by the end of the first class. Of course they won't understand a thing at first. But if I show them all the topics &quot;in action&quot; then I can introduce them to the students during the course and review the project we made on our first class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, I'm not exactly sure what to show them. I think something like a calculator would be far too simple and might not be too attractive to young, 18-year old students that own mobile devices and see all kinds of cool applications every day. But something like a minesweeper game might be just too big a project for me to show as an example on the first class, considering they will be watching me build a program and trying to mimic what I do without understanding yet, so if this part of my class lasts for too long it might bore them to death :P&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know my course doesn't cover GUI, but I've noticed young students are not familiar at all with command-line, so maybe I can just tell them there are things on the program I'm showcasing that they will learn in future courses. As long as they get to see examples of the more basic stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, any good suggestions?&lt;/p&gt;&#xA;" OwnerUserId="4062" LastActivityDate="2023-10-12T13:26:01.763" Title="Any simple Python GUI projects for beginner/novice programming students?" Tags="|project|python|" AnswerCount="9" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5359" PostTypeId="2" ParentId="5358" CreationDate="2019-01-11T21:15:39.247" Score="10" Body="&lt;p&gt;Unfortunately, GUI programming is sufficiently different from algorithmic programming that if you start with it students can get the wrong idea about what a program should look like. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I write an algorithmic program, using good OO techniques, a method of five lines is starting to be too long. The granularity of a good OO program can be very small with the complexity in the interactions between objects rather than in the methods themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But GUI programs typically have long and boring methods that are mostly just messages to library code, rather than being interesting in themselves. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, with some preparation, you can/should provide a framework in which the students can work, so that they don't start with an empty page and nothing but language features. You provide a library tailored for their education. Your library can contain the GUI code and they build the algorithms to fit it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back in the 1980's the book &lt;em&gt;Karel the Robot&lt;/em&gt; by Richard Pattis did a similar thing for structured programming in Pascal. He provided a simulator along with the GUI code. Students wrote programs to make a robot do interesting things. By &quot;interesting&quot;, I mean that the system was Turing Complete, so that, in theory, any program could be written within the framework. It actually used a very small, Pascal-like, language with only a few primitives. Students didn't actually program with integers and strings, but with the primitive elements of the simulation. But, Turing Complete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Karel the Robot has been updated to modern OO standards and versions exist for Java, Python, and Ruby. The Java version has been used for APCS courses and in college level courses as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Java, there is a special resource called the &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;noreferrer&quot;&gt;Greenroom&lt;/a&gt; that provides many other teacher-written simulation frameworks in which the students program. I don't know of a similar resource for Python, but you could, perhaps tailor some of the ideas there to Python. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-01-11T21:15:39.247" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5360" PostTypeId="2" ParentId="5358" CreationDate="2019-01-11T22:23:37.103" Score="11" Body="&lt;p&gt;In my experience, good introductory programming courses meet three overarching goals:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Empower&lt;/strong&gt; students to create simple programs outside of the scope of the class by giving them the technical skills and the practice to begin being independent. This includes teaching the basics of one usable language. &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inspire&lt;/strong&gt; students to continue learning and using their skills once the class ends (independently and/or by signing up for the next class in the sequence).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Prepare&lt;/strong&gt; students for the next step in their learning. In many cases, this means that certain topics and concepts must be covered so that students can enter the next class at the correct level. It should also include giving students practice with the skills needed for basic independent learning including debugging, googling to find solutions to problems, and initial exposure to reading and utilizing documentation.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;It sounds like you have seen issues with goal number two, where your students do not feel inspired. However, I am concerned that introducing your introductory students to GUI building right off the bat will jeopardize goal number one. GUI has a lot of overhead, and as you said, your students will not understand what they are doing and will be frustrated by their inability to build anything without heavy guidance/pre-built pieces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My suggestion is to strike a middle balance. Have them build command line applications that they fully understand, but that are interesting or useful in some way. Better yet, give them some choice in which projects to tackle so that they are more invested.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some neat things that students of mine have built in the command line without any OOP:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Guess the Number Game (the computer generates a number and tells the user if they are too high or too low)&lt;/li&gt;&#xA;&lt;li&gt;Fortune Teller Games (using arrays and randomization)&lt;/li&gt;&#xA;&lt;li&gt;Personality Quiz&lt;/li&gt;&#xA;&lt;li&gt;Hangman Game&lt;/li&gt;&#xA;&lt;li&gt;Random Name Generator&lt;/li&gt;&#xA;&lt;li&gt;Text Based Adventure&lt;/li&gt;&#xA;&lt;li&gt;Reverse Guess the Number Game (The user picks a number and the computer has to guess. This is a great jumping off point for first introducing the concept of an algorithm, since the program needs to make &quot;smart&quot; decisions.)&lt;/li&gt;&#xA;&lt;li&gt;Minesweeper, battleship, connect four, etc. are great for 2D arrays/lists when you get there&lt;/li&gt;&#xA;&lt;li&gt;Flash Card Application (students can even actually use this to study for tests for other classes!)&lt;/li&gt;&#xA;&lt;li&gt;Calculator (if that's too easy, have it do harder math. Can your students build a calculator that solves algebraic equations? Can they make it take derivatives? Solve trig problems? You can apply it to whatever math they likely are learning at the time)&lt;/li&gt;&#xA;&lt;li&gt;To do list manager&lt;/li&gt;&#xA;&lt;li&gt;An application that manages a student roster or waitlist for a class&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I hope these ideas help!&lt;/p&gt;&#xA;" OwnerUserId="6308" LastEditorUserId="6308" LastEditDate="2019-01-13T18:40:08.283" LastActivityDate="2019-01-13T18:40:08.283" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5361" PostTypeId="2" ParentId="5358" CreationDate="2019-01-12T04:10:48.173" Score="2" Body="&lt;p&gt;What about a circuit python project to finish off the semester? There's no GUI as such, but you can show them a cool demo, then have them learn codes that builds towards some kind of cool interactive project. Doesn't have to be big or expensive, but lets them truly make something tangible out of their code. An Arduino was really the first thing that got me motivated to stick with programming.&lt;/p&gt;&#xA;" OwnerUserId="6435" LastActivityDate="2019-01-12T04:10:48.173" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5362" PostTypeId="2" ParentId="5358" CreationDate="2019-01-12T04:43:21.413" Score="3" Body="&lt;p&gt;There is a good class on Coursera for interactive game programming in Python by some professors from Rice University, which I used when I started learning Python. It's really good at introducing the ideas very gradually, but eventually creates a pretty sophisticated game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There might be some ideas you can get from the course, or maybe you could do an inverted classroom?&#xA;&lt;a href=&quot;https://www.coursera.org/learn/interactive-python-1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.coursera.org/learn/interactive-python-1&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6417" LastActivityDate="2019-01-12T04:43:21.413" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5363" PostTypeId="2" ParentId="5358" CreationDate="2019-01-12T12:52:18.573" Score="1" Body="&lt;p&gt;There is little point these days in making a GUI program, except in the most rare cases, especially with Python. In the age of the internet, most programs are best served as web apps. I expect this will be most relevant to your students' interests as well. For Python I would suggest starting with Flask or Django. There are good Django tutorials here:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://docs.djangoproject.com/en/2.1/intro/tutorial01/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.djangoproject.com/en/2.1/intro/tutorial01/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://tutorial.djangogirls.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://tutorial.djangogirls.org/en/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And I like this Flask one:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of these should show you how to make a basic app, which has a GUI in the form of a web interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also consider something more visual in the form of basic data analysis and plotting with Jupyter notebooks.&lt;/p&gt;&#xA;" OwnerUserId="6439" LastEditorUserId="6439" LastEditDate="2019-01-12T13:08:12.530" LastActivityDate="2019-01-12T13:08:12.530" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5364" PostTypeId="2" ParentId="5306" CreationDate="2019-01-12T23:28:06.320" Score="1" Body="&lt;p&gt;One interesting idea might be to ask your student to try re-implementing different parts of the web ecosystem, which would naturally involve using JavaScript.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, one project might be to guide your students through writing a simplified version of libraries like React or Angular -- probably after having your students use those libraries directly so they know what they're trying to emulate. This can be an opportunity to teach about some of the more interesting programming paradigms like functional reactive programming. (React was originally written in Ocaml, so you could maybe dovetail things there).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could instead turn this into a mini compilers or parsing lesson: when writing React code, you can optionally embed HTML-like expressions (JSX) in your code. You could maybe explore having your students write a pre-processor for JSX: parsing and manipulating AST representing HTML-like expressions is probably going to be easier then manipulating ASTs representing full-fledged programs. (The one complication is that JSX is intermixed with JavaScript. So, to simplify this assignment, you should probably provide a regular JS parser the students can hook into/invoke.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More broadly, I think teaching your students how more complex libraries or framework work is likely to be a more valuable and long-lasting skill compared to just teaching whatever language or library is trendy today. I don't think it particularly matters &lt;em&gt;which&lt;/em&gt; library or framework you're implementing: the main value comes from the act of exploring some non-trivial implementation, and from &quot;peeking&quot; under the layers of abstraction we're already used to. And if you can give students exposure to JS (or whatever other language) at the same time, great.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A somewhat different idea is to double-down on compilers-related stuff -- JavaScript is actually a somewhat common target language (e.g. see languages like TypeScript or CoffeeScript that transpile to JS). For example, you could start by transpiling some homespun language into JS (or a simple language like lisp), then ask them to write an interpreter for their custom language, then finish off by asking your students to write a compiler generating webassembly. There's a lot of existing tooling/scaffolding you could probably use here to try and smooth out some of the rough edges. And to keep things simple, you'll have the student implement all of this in JS (or maybe TypeScript?), because why not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main disadvantage of these ideas is, of course, that it'll likely take a non-trivial investment of time to pull off. If you have only a few weeks to cover JavaScript, you'd likely need to significantly scope these project ideas down, or just not use them altogether. As the others have said, you'll probably want to avoid gratuitously welding two unrelated CS topics together, or avoid giving your students the &quot;frankenstein&quot; experience.&lt;/p&gt;&#xA;" OwnerUserId="732" LastActivityDate="2019-01-12T23:28:06.320" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5365" PostTypeId="2" ParentId="5358" CreationDate="2019-01-13T16:40:37.853" Score="1" Body="&lt;h1&gt;On command line&lt;/h1&gt;&#xA;&lt;p&gt;To make command line programs make sense, you need to first teach Unix (Or another OS with a workable command line: VMS, Amiga-dos, sorry I can't think of any others that are still relevant).&lt;/p&gt;&#xA;&lt;p&gt;When one can see the value in a powerful command line, where one can complete tasks much more quickly and with less pain, then it becomes obvious why one would write ones own command line programs.&lt;/p&gt;&#xA;&lt;h1&gt;On GUI&lt;/h1&gt;&#xA;&lt;p&gt;Yes for graphical programming, but this is not GUI programming.&lt;/p&gt;&#xA;&lt;p&gt;I have used python turtle, it aids learning because it gives immediate feedback. I have used it to teach the basics, in schools. It could also be used to teach algorithms: First teach basics, then add drawing of data sets, then …&lt;/p&gt;&#xA;&lt;h1&gt;UnPlugged&lt;/h1&gt;&#xA;&lt;p&gt;Also consider teaching some of it unplugged. You can teach algorithms, by having the students be the data, by having a student direct, by having a student explain, by using props e.g. backs of cards, white boards, paper, mini-whiteboards, …&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csunplugged.org/en/&lt;/a&gt; for some ideas. This site is aimed at primary school teachers, but most of it can be adapted.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-01-13T16:40:37.853" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5367" PostTypeId="2" ParentId="5358" CreationDate="2019-01-16T19:35:07.240" Score="1" Body="&lt;p&gt;I teach event-driven GUI programming in Java.  This requires machinery. First of all, students need to be good at writing functions and procedural programs. Secondly, they need to understand polymorphism and inheritance, as these are vital tools.  So, we are beyond the range of beginners here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you teaching Java, GUIs are a compelling use case for the whole inheritance mechanism.  Java8 lambdas make the writing of callbacks simpler and more fun.  I use the JavaFX framework for this purpose. If you are doing this in java11, it is tricky to get set up and configured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see this as a game for novices.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2019-01-16T19:35:07.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5371" PostTypeId="1" CreationDate="2019-01-25T17:42:02.513" Score="9" ViewCount="558" Body="&lt;p&gt;I put together elaborate, &lt;em&gt;very&lt;/em&gt; carefully planned out lectures, complete with highly distilled exemplars, student teach-backs, and mid-lecture activities to check for understanding.  I've had feedback that my students really &lt;em&gt;enjoy&lt;/em&gt; these lessons and appreciate how much work I put in to making sure that my examples are really clear.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it has come to my attention that, perhaps due to a course structure which gives students lots of chances to re-demonstrate mastery if they initially struggle, a certain number of the students are only half-engaged with my lecture.  Since I realized this, I have spoken to a few of them, and they agree that the lessons are fun, but say that they are stressed by other courses, and sometimes this causes them to work on other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On one level, I don't mind this.  Student stress is real, and I have ample evidence to demonstrate to me (or to others!) that the students ultimately master the material that I teach them.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On another level, however, being lax about this does a disservice to &lt;em&gt;them&lt;/em&gt; (as we could progress faster for everyone if kids took the learning opportunity more seriously), and to &lt;em&gt;me&lt;/em&gt;, as I have put almost unreasonable amounts of time into distilling rich and complex ideas into explanations that are both beautiful and clear.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm further motivated by the fact that I get evaluated by my administrators, and I have now been dinged twice by having some of the kids off-topic for short bursts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm toying with the idea of adding little, basic quizlets to the ends of my lectures for which students would be &lt;em&gt;immediately&lt;/em&gt; responsible.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The questions would purposefully not be difficult.  They'd be more on the level of, &quot;were you paying attention to what we just did?&quot;  Basic recall, simple factoids, etc.  I already give a difficult test or quiz at the end of the unit, so I don't need this quiz to do much more than (1) give students a chance to dredge up information from memory&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/sup&gt; and to help motivate students to take fuller advantage of the lesson opportunities I am giving them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question, then, is two-fold: (1) are quizlets a good solution to my problem?  And (2), if they are a good solution, is there any wisdom from the trenches on how to pull these together so that they are effective without bringing on substantially more grading work?  I'd like to make them as useful in the learning process as they can be, but I have to be careful about what I take on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;sup&gt;&lt;strong&gt;1&lt;/strong&gt; - See &lt;a href=&quot;https://teachingcenter.wustl.edu/wp-content/uploads/2015/05/iteach2008_mcdaniels_quizzes.pdf&quot; rel=&quot;noreferrer&quot;&gt;points 2, 3, and 4&lt;/a&gt; for how this directly enhances learning.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-01-28T08:34:55.573" Title="Quizzes after lectures" Tags="|classroom-management|assessment|lecture-tools|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5372" PostTypeId="2" ParentId="5371" CreationDate="2019-01-25T18:09:33.003" Score="2" Body="&lt;p&gt;Think about it a bit more generally. If all you want is to &lt;em&gt;force&lt;/em&gt; their engagement, then it will probably work to some extent, with most of them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you expand the goal you can do much more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quiz immediately after hearing/seeing something only really tests short term memory, not true learning. An exercise, rather than a quiz would force engagement, but do a bit more in aiding reinforcement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A quiz the next day, based solely on the previous day's material, given at the start of class, where they know it is coming, will give them a chance to let the information settle, especially if there was an exercise overnight that tried to solidify the material. These quizzes an count for a small, but non-trivial part of the grade. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would seek to integrate any quizzes into a longer term learning strategy for the students, rather than using it for any simple purpose. Students need to take notes, not just listen. They need, however, to take &lt;em&gt;effective&lt;/em&gt; notes, not just try to capture everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students always have a few index cards available (a Hipster PDA) you can ask, at the end of any class for the most important ideas of that class, based on what they have written on their cards. You can accept or reject suggestions. You can make sure there is agreement and that the other students &quot;get it&quot;. You can call on students to give &quot;big idea of the day&quot; suggestions, rather than asking for volunteers. You can award points for good/great suggestions (and note them on your own note card for the student). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next day you can review by asking for the big idea of the previous day, or the main theme or big idea of the previous week. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, get them to &lt;em&gt;write&lt;/em&gt; short summaries of the lecture with pen and paper, capturing what is key. This act of writing is a kind of reinforcement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can even hint about the big ideas as you go along. This is easiest to manage if you lecture facing them, rather than a whiteboard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More elaborate schemes are possible, such as asking every student to submit a half page summary of each lecture at the beginning of the next class. You have to scan these, of course, and you have to guard against students copying them from each other (to some extent).  &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Alternative to the quiz/note idea is just to make the entire course more interactive, such as a flipped classroom. This forces engagement as you aren't lecturing, and they are actually doing things that reinforce learning. You can do that instead of quizzes, or you can blend it a bit. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-01-25T18:24:34.847" LastActivityDate="2019-01-25T18:24:34.847" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5373" PostTypeId="1" CreationDate="2019-01-25T18:15:24.347" Score="1" ViewCount="100" Body="&lt;p&gt;I'm teaching linear algebra, and thought I'd show my students &lt;a href=&quot;https://www.ocf.berkeley.edu/~fricke/projects/israel/paeth/rotation_by_shearing.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Paeth's rotation by shearing algorithm&lt;/a&gt; as a nice quick example of matrix manipulations. I'd like to include the information of which graphics libraries actually implement this, and I wasn't able to find anything other than the linked 2007 webpage referencing &quot;ImageMagick, pnmrotate, etc&quot;. Can anyone give an updated, larger list?&lt;/p&gt;&#xA;" OwnerUserId="6485" LastActivityDate="2019-01-25T18:15:24.347" Title="Which image rotation libraries use the Paeth algorithm?" Tags="|image-processing|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5374" PostTypeId="2" ParentId="5371" CreationDate="2019-01-25T22:50:00.813" Score="3" Body="&lt;p&gt;I have a few thoughts on this topic. One is a couple ideas about how quizzes could be implemented (if you choose to use them), and the other is some more general thoughts on the tactics that I use to solve problems like this.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Quizzes Without Extra Grading&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;What are your opinions on peer grading or self-grading? I've seen both work nicely for things like this (short, low-pressure quizzes that aren't too hard).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They require a little bit of logistics, since each student needs a normal colored pen and a &quot;grading&quot; pen, and it's easiest if you supply those. Then you require that normal pens are collected before grading starts, and that students do not have their own writing implements out, and it typically goes well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This would require you to put aside more time during class, since a 5-minute quiz takes at least an additional 5 minutes to grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The pro of students grading their own work is that it becomes a way of reflecting and learning from the experience. If they get a question wrong, they get immediate feedback about the correct answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you might want to look into giving digital quizzes. They would have to be multiple choice or fill in the blank, but they auto-grade, saving you the time. I know that Google Forms has a method of doing this, and there are a bunch of other platforms too. Your students could take the quizzes on their phones, or computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This system tends to be quick and you can integrate it into the entire lesson, not just the end. I had a professor in my undergrad who would lecture for a bit and then pause for us to answer a question or two. Before continuing. It was her way of doing understanding checks. You could easily establish small point values for each question so that they &quot;count.&quot;&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To Quiz or Not to Quiz&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Personally, I've found that increased examination does not tend to increase student attention. I theorize that there are two reasons for this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, many quizzes happen &quot;later&quot; - either at the end of class or even several days or weeks later. Most students (especially teenagers, although adult students as well) have trouble remembering potential consequences that seem far off. If the exam is important enough to overcome this problem, then it's probably invoking some level of anxiety or fear, which is a large detractor from student focus and engagement. It may solve your problem of &lt;em&gt;looking&lt;/em&gt; like your students are paying attention, but I believe that it's unlikely to actually increase their learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My second theory is that people tend to believe that they are better at multitasking than they are. If you gave an anonymous poll to your students and asked if they ever do work for other classes during your lectures and how much attention they pay to your lectures, I would bet quite a bit that they all feel that they are always attentive, even though you know that not to be the case. Thus, saying &quot;Oh, it's very important to pay attention!&quot; seems unlikely to change behavior because they really believe that they are/can pay attention while doing other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what are the other options? You could do the honest but maybe frowned upon thing of talking to your students and saying &quot;hey guys. I know you're busy. I know you sometimes finish up other homework while in this class. I'm mostly fine with it on occasion; as long as you get your work done and feel like you're learning what you want to learn, I don't really see a problem. But it makes us look bad when a senior teacher/dean/etc. sees you doing that. So we have some options. I can change something about the way the class is structured (quizzes, etc.), or you can keep the distractions to a minimum, especially when we have guests.&quot; Whether this will work mostly depends on your students and your relationship with them. It also obviously depends on the institution you teach at.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;A Non-Quiz Suggestion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You've mentioned that you're already putting a lot of thought and work into every lesson. So this might not be a solution that seems feasible. But my personal strategy for student engagement is to keep the students active throughout the lesson. I try to talk for 5-10 minute chunks, broken up by having students work through practice problems or explore ideas. Maybe you can take your current activities and spread them out a bit more throughout the lesson? If students are changing tasks frequently, it will be easier for them to stay engaged and harder for them to pull out something else to become involved in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want more concrete information on what this could look like, pick an example lesson and post another question. I'm sure that lots of people will have a wide range of ideas for active learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope some of these things help. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="6308" LastActivityDate="2019-01-25T22:50:00.813" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5375" PostTypeId="2" ParentId="5371" CreationDate="2019-01-26T08:39:55.433" Score="1" Body="&lt;p&gt;I'll address the second part first: These quizzes are meant to make sure students were listening and paying attention. As such, any partially completed quiz indicates partial listening (given that the quiz questions are along the lines of &quot;name one thing/point/property/etc. I mentioned while discussing &amp;lt;some subject covered during the lesson&amp;gt;&quot;). This means that a student who paid any attention would be able to answer the entire quiz correctly, which leads to this: grading is easy, as it is somewhat binary here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, the quizzes need not affect final grade. This can either be said to the students, or left unsaid. Each option has its pedagogical benefits (personally, I would tell them sometime mid-course, so that by that time they already subconsciously see a need in paying attention, even if it doesn't directly affect their grades). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Returning to the first paragraph of this answer: a condition for quizzes to be a good solution. Questions in the quiz should be answerable by someone with very minimal knowledge of the subject. All the answers to the questions should appear nearly explicitly in the lecture itself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, a question shouldn't rely on the students' ability to remember &lt;em&gt;all&lt;/em&gt; the details. As an example (the one from the 1&lt;sup&gt;st&lt;/sup&gt; paragraph) &quot;name one thing/point/property/etc.  mentioned while discussing &amp;lt;some subject covered during the lesson&amp;gt;&quot; can be answerable by a student who listened and remembers that you talked about &lt;code&gt;foo&lt;/code&gt; while teaching about &lt;code&gt;bar&lt;/code&gt;. They might not remember you also mentioned &lt;code&gt;baz&lt;/code&gt;, or &lt;code&gt;qux&lt;/code&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Metasyntactic_variable#General_usage&quot; rel=&quot;nofollow noreferrer&quot;&gt;or some other ones&lt;/a&gt;. But if they got, say, more than 2 out of the 6, then it's safe to assume that they were listening. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is just an example for a quiz question, but the idea is that minimal understanding of the material is more than enough to &quot;get full marks&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For building the quiz, you can request help for a member of a different faculty. Or perhaps simply try some quiz, and see how well it is answered by the students that usually do listen (those who sit in the front row, or those who participate). This should give some indication whether your quiz serves its purpose.&lt;/p&gt;&#xA;" OwnerUserId="150" LastActivityDate="2019-01-26T08:39:55.433" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5376" PostTypeId="2" ParentId="5371" CreationDate="2019-01-26T13:56:29.323" Score="1" Body="&lt;h1&gt;Yes it is a good idea to review regularly&lt;/h1&gt;&#xA;&lt;p&gt;Memory decays over time, but each time in is refreshed, it will last longer.&#xA;A rule of thumb is to revise after 1 hour, less than a day, ½ week, 1 week, 1 month, 3 months, 1 year, 10 years, 30 years, then you will never forget.&lt;/p&gt;&#xA;&lt;p&gt;see also &lt;a href=&quot;https://en.wikipedia.org/wiki/Forgetting_curve&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Forgetting_curve&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;but how to do it.&lt;/p&gt;&#xA;&lt;h1&gt;Non-summative&lt;/h1&gt;&#xA;&lt;p&gt;Summative assessment is not good: while formative assessment has a positive affect. Summative assessment has a negative effect, even when combined with formative assessment. Therefore we need to eliminate summative assessment.&lt;/p&gt;&#xA;&lt;p&gt;If not summative then what?&lt;/p&gt;&#xA;&lt;h1&gt;Summery approach&lt;/h1&gt;&#xA;&lt;p&gt;At &lt;a href=&quot;https://courses.exa.foundation/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://courses.exa.foundation/&lt;/a&gt; the author, recommends that we get our students to study for them self, and then to &lt;strong&gt;summarise what they have learnt on a single sheet of plain paper. Mostly pictures, few words, and fast to assess&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;All   pages   must    be  numbered,   1   to  40  with    one topic   per page,   per week.&lt;/p&gt;&#xA;&lt;p&gt;Each  homework    must    meet    the following   5 requirements:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Write  the complete    title   and date    in  full eg.    Tuesday 12th September   2017 on    each    page,   underlined&lt;/li&gt;&#xA;&lt;li&gt;You    should  include a   minimum of  words to    summarise   the topic.  Do   not    copy    the words   from    the text.&lt;/li&gt;&#xA;&lt;li&gt;Make   full    use of  the page for    each    topic   by  scaling your    notes   &amp;amp;    images appropriately   to  use of  all the space.&lt;/li&gt;&#xA;&lt;li&gt;You    must    include diagrams,   sketches    or cartoon  doodles to  visually represent the  topic,  try to  use humour.&lt;/li&gt;&#xA;&lt;li&gt;Highlight  key words and   phrases,    using   underline,  highlighter pens. Explain   technical   terms.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-01-26T13:56:29.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5377" PostTypeId="2" ParentId="5371" CreationDate="2019-01-27T19:31:17.087" Score="1" Body="&lt;p&gt;It sounds like that you want a quick, simple solution to the issue, and while quizlets might not 'maximize learning' they &lt;em&gt;can&lt;/em&gt; be quick and simple. I would suggest a quick warmup (i.e., they come in, and five minutes after the bell rings they turn it in, so maybe four quick multiple choice questions and one short response) done on Google forms [since you're teaching CS, i'm assuming you have tech in the classroom]. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Google forms are uber easy to set up and can be set to automatically grade, meaning that all you need to do is skim through the results and check the short answers yourself. I wouldn't grade them, but instead set up a 'must do well on a minimum of four warmups a week or else you talk to me' system [remember, these warmups are meant to be fairly easy if you were paying attention]. I've had a bunch of teachers use the warmup system, and it effectively forces people to recall the previous day, and get them in gear for that day. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If google forms isn't a great option for you, here's an alternate: hand out a warmup sheet to everybody for the week, and at the beginning of the day put up e.g. a powerpoint slide with your five questions. Then, when the five minutes are up, come around with a stamp and stamp the ones that are good. At the end of the week, have them turn it in, and just count number of stamps. That might help reduce the grading effort.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-01-27T19:31:17.087" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5378" PostTypeId="2" ParentId="5371" CreationDate="2019-01-28T08:10:27.093" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I'm toying with the idea of adding little, basic quizlets to the ends of my lectures for which students would be immediately responsible.&lt;br&gt;&#xA;  The questions would purposefully not be difficult. They'd be more on the level of, &quot;were you paying attention to what we just did?&quot; Basic recall, simple factoids, etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I'd advise against this. While it sounds like it directly addresses the problem, it's liable to backfire and exaerbate the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While this test would create an obstacle for the willful slackers, it's also going to become an obstacle for students you're not intending to target: students having an off day, students struggling with the material, students who doubt their own skills until they feel they've got a grasp on things, ... These students are all going to feel pressure &lt;em&gt;during&lt;/em&gt; your lecture knowing that an inevitable quiz is coming at the end of the lecture.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect your response to this &lt;em&gt;may&lt;/em&gt; be along the lines of&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;I'm only going to ask them to repeat the lecture, not to have them show they fully grasp it.&quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;But then your quiz is going to be about &lt;em&gt;the lecture itself&lt;/em&gt;, not the material that the lecture is about. A student who is ahead of the curve and already understands the current topic might be justified in allocating their time and effort towards other courses they are in fact struggling with, but now you're requiring them to mimic your words back to you. Taking it even further, they could even be helping someone next to them, thus missing particular things you've said.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Comparatively, if you did your quiz at the start of the &lt;em&gt;next&lt;/em&gt; lecture, then your quiz can focus on the material more than the actual lecture itself. This enables the &quot;expert&quot; students to not have to listen to you explain something they already understand; and the &quot;slower&quot; students have had a week's time to catch up on anything they may have sturggled to understand the first time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a way, quizzing someone directly after your lecture is asserting/guaranteeing that you are able to perfectly explain something and have people immediately understand it. Even if that is not the goal of the quiz, your students will &lt;em&gt;perceive&lt;/em&gt; this to be the goal, and it is going to create (possibly unspoken) friction for them.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(1) are quizlets a good solution to my problem?&lt;br&gt;&#xA;  And (2), if they are a good solution, is there any wisdom from the trenches on how to pull these together so that they are effective without bringing on substantially more grading work? I'd like to make them as useful in the learning process as they can be, but I have to be careful about what I take on.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The short answer: It would be wrong for you to cater your curriculum so that students can instead focus on other courses. However, countering this by &lt;strong&gt;cracking down on student focus is not a good solution and is likely going to exacerbate the issue for the students&lt;/strong&gt;.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've all had teachers who felt entitled to continue the class after the bell rang. We've also had teachers who were sticklers for arriving to class on time. Both teachers can argue that their expectation is reasonable. But a student who is forced to stay late in one class and thus be late for the next one, is going to resent both teachers because pleasing one teacher would get them in trouble with the other teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you double down on student focus, that's essentially what you're doing. To the students, it will come across as a &lt;a href=&quot;https://en.wikipedia.org/wiki/NIMBY&quot; rel=&quot;nofollow noreferrer&quot;&gt;NIMBY&lt;/a&gt;-like &quot;&lt;em&gt;my&lt;/em&gt; course is more important than the other ones!&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an alternate solution here that alleviates the issue for students: &lt;strong&gt;optional&lt;/strong&gt; &lt;strong&gt;quizzes&lt;/strong&gt; that focus on the subject matter (not the lecture) and what you will be testing for during the end of unit quiz. The implicit suggestion is that &quot;when you can answer these questions, you have grasped the essence of the subject matter&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For students who are struggling with other courses, are having trouble grasping the subject matter, or simply those who are succumbing to stress, this create a pressure-free guideline on the important points to take away from your lecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For students who already master the subject matter, they can be used as a way to reaffirm that they understood the full subject matter of the lecture and didn't miss a smaller chunk that is in fact new to them.&lt;br&gt;&#xA;This enables them to very quickly identify that they don't need to go through this any deeper and thus can focus on other courses where they're not ahead of the curve. This is a major boon to relieving stress, because it cuts out &quot;wasted&quot; time (mind the quotes) that they could've spent better.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For this reason, some lecturers in college (when I was a student) used to start the lecture off with such a quiz (merely presenting it, not actually handing out sheets). Anyone who knew the answer to all questions was free to leave (it was up to the students to decide for themselves), because they wouldn't learn anything new during that lecture and could instead take the time to dedicate effort towards classes where they did need to catch up to the curriculum. This of course assumes you're in an educational context when attendence is not mandatory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can, if you want, &lt;strong&gt;enable students to hand in these optional quizzes&lt;/strong&gt;. This mean it's up to the student to decide whether they want/need your feedback. The request for help from these students is going to outweigh the effort of having to grade (I sincerely hope). Other students who are already confident in their grasp of the subject matter won't bother with the optional quizzes and thus won't require you to go through the effort of marking those (trivial to the students) quizzes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any student who does not grasp the subject matter, does not ask for help and does not self-test themselves will be caught out by the end of unit test. However, any approach that would catch these students quicker (e.g. at the end of the lecture, as per your goal) would also create an obstacle for other students.&lt;br&gt;&#xA;In short, you can't police daydreaming. And even if you could, &lt;strong&gt;the rigorous nature of your policing is going to cause more issues than it solves&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-01-28T08:34:55.573" LastActivityDate="2019-01-28T08:34:55.573" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5379" PostTypeId="1" CreationDate="2019-01-30T21:37:50.773" Score="3" ViewCount="400" Body="&lt;p&gt;We are currently researching what curriculum to use/adapt for the 2019-2020 school year. It will be our first year offering &lt;a href=&quot;https://en.wikipedia.org/wiki/AP_Computer_Science_A&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CSA&lt;/a&gt;. The students taking the class will have had 3-7 years of computers science classes and plan to go into a computer science program.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Anyone have strong feelings on what AP CSA curriculum to use?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="6501" LastEditorUserId="694" LastEditDate="2020-11-12T12:54:54.040" LastActivityDate="2024-03-26T20:00:45.153" Title="Curriculum choice for AP Computer Science A" Tags="|secondary-education|java|ap-computer-science-a|curriculum-review|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5381" PostTypeId="1" AcceptedAnswerId="5382" CreationDate="2019-02-01T18:30:00.393" Score="3" ViewCount="383" Body="&lt;p&gt;I have heard a lot of people saying C++ is a hard language to learn and is not a good language to start. I myself am a beginner in programming and have jumped straight into C++ as soon as I heard that being a programmer is way more useful for creating games compared to someone who just knows how a game engine works(Its what I heard). So far, I enjoy learning it and have not found it difficult to understand. But I have also heard that it gets harder as you progress. The reason why I decided to learn C++ in the first place is so that in the future when I turn 18, I'll be one of the top choices for big companies and be able to be more experienced than my fellow programmers in the future since C++ is the main language used by big industries. Should I stop now and learn a different language like C or C#?&lt;/p&gt;&#xA;" OwnerUserId="6506" LastEditorUserId="27" LastEditDate="2019-02-01T18:39:47.560" LastActivityDate="2019-02-06T12:13:19.337" Title="Is learning C++ recommended for beginners?" Tags="|self-learning|c++|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5382" PostTypeId="2" ParentId="5381" CreationDate="2019-02-01T19:03:54.973" Score="6" Body="&lt;p&gt;I wouldn't fuss too much over whether a language is &quot;hard&quot; or &quot;easy&quot;.  There are plenty of reasons to learn a language.  Learning for a career is a great reason!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Languages are usually organized around certain central ideas.  Haskell is a pure functional language, Eiffel is a pure Object Oriented language, and C is designed to reflect very closely what a processor does.  C++ is designed to be a cross between C and object oriented programming, so there are several different paradigms at work at the same time.  That can make it a little more difficult to learn because there are simply more concepts at play.  However, the early basics should be fairly easy in any language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C++ does appear to be the most heavily used language in the gaming industry.  However, there are a few caveats:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What sort of games would you like to be involved with making?  Browser games rarely use C++.&lt;/li&gt;&#xA;&lt;li&gt;Languages change, but concepts are long-lasting.  While learning, keep pushing yourself to learn new ideas, not just new procedures.  That way, you'll be better positioned to switch over to a different language if it turns out that the wonderful gaming job you land is actually in HTML5, or Python, or in some language that hasn't even been invented yet.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-02-01T19:03:54.973" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5383" PostTypeId="2" ParentId="5381" CreationDate="2019-02-01T21:00:00.673" Score="3" Body="&lt;p&gt;welcome to our community ;)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Is learning C++ recommended for beginners?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In general, I would suggest that it is not the optimal choice for a beginner, since there are other languages out there that are powerful, widely supported, used in a range of industries and (perhaps most importantly for a beginner) have a simple syntax with powerful features.  I am thinking specifically of Python in this regard.  You can even learn many of the &quot;classic&quot; game concepts and code games using PyGame or arcade- two libraries that provide a lot of support for game development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reading further into the details below the initial question posed- in your particular case, given that you are grasping it at the moment and not experiencing any difficulty as yet- I would say &lt;strong&gt;Go For It!&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Keep going and when you have difficulties, do some research, watch YouTube videos, take some of the brilliant MOOCs that are out there, code for fun and pleasure, to achieve a goal, and keep going.  It sounds like you are highly motivated, and that is one of the MOST important things!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary- in general, no- Python (imho).  In your case- Yes!&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2019-02-01T21:00:00.673" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5386" PostTypeId="1" CreationDate="2019-02-02T15:53:14.053" Score="1" ViewCount="201" Body="&lt;p&gt;I am currently looking for what book to use/adapt for the 2019-2020 school year for students Grade 2 to 8 ICGSE or CBSE or other pattern.&lt;/p&gt;&#xA;" OwnerUserId="6123" LastEditorUserId="204" LastEditDate="2019-02-09T17:30:43.750" LastActivityDate="2019-02-09T17:30:43.750" Title="latest Book (2018/19) for Computer Science for Grade 2 to 8 students" Tags="|textbook|" AnswerCount="1" CommentCount="4" ClosedDate="2019-02-09T17:32:02.597" ContentLicense="CC BY-SA 4.0" />
  <row Id="5387" PostTypeId="2" ParentId="5386" CreationDate="2019-02-02T16:23:33.173" Score="2" Body="&lt;p&gt;Since you are asking about a wide range of ages, let me suggest that no single book is likely to do the job for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, let me suggest a web site &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; which uses non computer resources to teach simple concepts of CS, including Computational Thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main idea is that many things, including toys, can give youngsters appropriate metaphors that will bring them to a mindset that helps them later learn things more formally. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do an online search for &lt;em&gt;Computational Thinking&lt;/em&gt;, which will reveal a large number of resources, some (not all) of which will be appropriate for you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wouldn't try at this level, to focus very much on computer programming, though &lt;a href=&quot;https://scratch.mit.edu&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt; is directed at youngsters. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-02-02T16:23:33.173" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5389" PostTypeId="2" ParentId="3951" CreationDate="2019-02-03T03:09:26.967" Score="4" Body="&lt;p&gt;I don't know how you frame the motivation for NFAs, but something I've found helpful is to put this up front, before introducing them.  Something like the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;DFAs are the answer to the question &quot;what does computing mean if we only have control and no memory of any kind?&quot;  They are essentially flowcharts, an intuition every student understands.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;NFAs are the answer to the &quot;next&quot; question, namely &quot;What can we do if we can execute flowcharts in parallel?  Not just a little parallel, but unlimited?  Let's give them even more usefulness and suppose that we can extract the right answer if it appears on any thread, instantly.  Does this give us any advantage over just one flowchart?&quot;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I've found my students are able to do quite well with this intuition, because they're willing to suspend disbelief regarding the conceptual hurdle that &quot;magic&quot; -- the primary mechanism that defines NFA execution -- cannot be implemented in a real machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, when they learn that the &quot;magic&quot; of an NFA gives nothing new over a DFA, many of them become quite excited.  As they should :-)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;[EDIT]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To expand on my comment, I've found that I can carry this story throughout the semester, as motivation for every one of the theoretical devices.  Philosophically, I think of the automata theory course (at least the first, undergrad version) as centered around the question &quot;what do we mean by the idea of computing?&quot;  This in turn divides into two, interlocking questions:  what power do we get by adding certain capabilities (in memory, memory access, and concurrency), and what price do we pay for adding them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I gave what I see as the answers to these questions for finite state automata above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next one in the story is the idea of adding memory, without worrying about how much, but with only limited access abilities.  Following Sipser and most every other automata textbook, this means memory with only stack access and no limit on concurrency:  i.e. NPDAs. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;ASIDE:   I first learned this stuff out of Floyd &amp;amp; Beigel's magnificent text, &quot;The Language of Machines&quot;&quot;, and they insert an intermediate study between FSAs and NPDAs, namely the capability of memory that can do nothing but count up and down (what they call &quot;counters&quot;).  These are strictly more powerful than FSAs (they can solve the balanced parentheses problem), and strictly less powerful than PDAs, either deterministic or not.  It's kind of a cool thing to add if you can, because it gives an easier to read yet fully formed notion of the idea of simulation as a mechanism for studying expressiveness.  There's also at least one, very practical application that I know of, from language implementation:  checking whether a &lt;code&gt;break&lt;/code&gt; statement is correctly placed within a loop.  About half of my compilers students try to do this with the same technique they use for checking nested comments in the lexer:  incrementing a counter when a loop is entered, decrementing it when a loop is exited, and checking that the counter is positive  when a break is encountered. If your language supports nested procedure definitions, this won't work, and the nonequivalence of counter and stack machines explains why.  This side topic takes time, though, and I've only ever seen it in the Floyd &amp;amp; Beigel text, which is, sadly, long out of print.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anyway, memory with only end access and unbounded concurrency gives you the class of CFGs, of course.  By the time we get through that and the CFG pumping lemmas, I've found my students enjoy the overarching story enough that they appreciate the detour into DPDAs enough to revisit the question &quot;with end access memory, does concurrency give us any advantage?&quot;  I've never found time to really study deterministic PDAs (which is okay for me, since I also teach our compilers course :-) ), but students do seem to enjoy learning that the answer to the concurrency question for stacks is that is does make a difference.  I even managed once to show how the existence of an inherently ambiguous context free language gives an an alternative proof of the nonequivalence in expressiveness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, there are Turing machines, of course, which represent the answer to the question of what we get when we combine control flow with unbounded memory and &lt;em&gt;no limit&lt;/em&gt; on access.  The fact that concurrency once again becomes irrelevant to expressibility is mind blowing to me, and it seems to be to those students that aren't exhausted by the semester, since we're always near the end at this point.  If one needs a good story to explain this, it's in the fact that concurrency can always be implemented by threads and sufficiently powerful thread scheduling (which is, essentially, what the proof of simulation of NTA by DTA is).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, I try to include the Universality Theorem, at least a mention of it.  More than any other result, I find that this one ties Turing machines to real programming languages in a very effective way, because it guarantees that every &quot;real&quot; programming language can be implemented with the minimum tool set of deterministic control flow and random access memory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Including the Universality Theorem also has the nice advantage of making the non-computability results more concrete.  It's not just that Turing machines can't answer such questions: no real programming language can, and the combination of the Halting Problem and Universality explains why!&lt;/p&gt;&#xA;" OwnerUserId="4799" LastEditorUserId="4799" LastEditDate="2019-02-03T14:28:21.973" LastActivityDate="2019-02-03T14:28:21.973" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5391" PostTypeId="2" ParentId="137" CreationDate="2019-02-05T19:08:53.180" Score="1" Body="&lt;p&gt;One vestige of octal notation is in UNIX (includes macosx) file permissions.  You can say ($ is your system prompt)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ chmod 644 file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and change all rings (user, group, and other) permissions in a quick and compact way.  The first argument to &lt;code&gt;chmod&lt;/code&gt; is a three-digit octal number.  The first digit represents user permissions, the second group, and the third others.  Read permission has value 4, write 2, and execute 1.  The combinations work as follows&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0  none&#xA;1  x&#xA;2  w&#xA;3  wx&#xA;4  r&#xA;5  rx&#xA;6  rw&#xA;7  rwx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, in the example above, the user has read/write permission, groups read, and others read.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2019-02-05T19:08:53.180" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5393" PostTypeId="2" ParentId="5381" CreationDate="2019-02-06T12:13:19.337" Score="1" Body="&lt;p&gt;Yes some people recommend it. These are the “What is use in industry?” people. However this is the wrong question, it may be easier and quicker to learn several languages first.&lt;/p&gt;&#xA;&lt;h1&gt;My experience&lt;/h1&gt;&#xA;&lt;p&gt;I have tried to hire C++ programmers. It is very hard, there is a lot of variance between claims and reality. Most people claiming many years of C++ can not write good program (bug-free, easy to maintain …), and graduates have no clue. I could never again try to hire C++ programmers. It is better to hire good programmers, that know another OO language, and cross train. Eiffel is a good OO language to learn OO well. Java, C#, javascript are other popular languages, that while not as bad as C++, are far from ideal teaching/learning languages.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-02-06T12:13:19.337" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5394" PostTypeId="1" AcceptedAnswerId="5397" CreationDate="2019-02-09T03:34:12.730" Score="4" ViewCount="116" Body="&lt;p&gt;I'm teaching a capstone (the final class in an undergraduate program) software engineering course in which we are developing Android applications in Java. I consider test-driven development and unit testing important but am having trouble coming up with Android-related assignments, since so much mobile programming is about user interfaces and synchronization, neither of which are ideal for unit testing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only thing I've thought of is that they could unit test a database running on Android, which would also let me introduce mocking, but that doesn't sound very interesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any suggestions of a small but interesting Android project suitable to TDD and unit testing?&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="204" LastEditDate="2019-02-10T14:35:22.200" LastActivityDate="2019-03-17T02:00:43.263" Title="What's a good unit testing assignment for Android?" Tags="|labs|unit-testing|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5395" PostTypeId="2" ParentId="5394" CreationDate="2019-02-09T12:00:54.573" Score="2" Body="&lt;p&gt;I assume that there is &lt;em&gt;some&lt;/em&gt; logic in the app, somewhere. Hard for me to imagine it otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you build the client side with a &lt;a href=&quot;https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot; rel=&quot;nofollow noreferrer&quot;&gt;Model-View-Controller&lt;/a&gt; architecture, the testing can be done on the model (as is most natural) and possibly on the controller. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the server side is also built by the students, then it may also require logic beyond data access. So that can also be tested, either directly on the server side, or with mock clients. Maybe both. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I admit, though, that I don't build these things. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-02-11T14:36:28.357" LastActivityDate="2019-02-11T14:36:28.357" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5397" PostTypeId="2" ParentId="5394" CreationDate="2019-02-10T11:42:13.897" Score="1" Body="&lt;p&gt;&lt;strong&gt;Tic tax toe.&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Begin game. Test model state is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;nbsp;---------&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Move(x, 1, 1). Test model state is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&amp;nbsp;----x----&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Scoring bowling.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Begin game. Test score is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;0&lt;/p&gt;&#xA;&#xA;&lt;p&gt;knock down 3 pins. Test score is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Knock down 3 pins then 7 pins. Test score is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;13&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unit testing is orthogonal to android. Nothing about android keeps you from unit testing. You just have to insist on doing it. That means using a design that accommodates it. &lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="1401" LastEditDate="2019-02-10T20:34:49.057" LastActivityDate="2019-02-10T20:34:49.057" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5399" PostTypeId="1" CreationDate="2019-02-13T14:06:16.187" Score="2" ViewCount="230" Body="&lt;p&gt;I'll be sitting in for a teacher next week and I'll be teaching about arrays in c#. They've been taught about variables, basic types (int, string, double) and how to print data to the console. They began the class with no programming experience. I tried to build this so it would be interactive and they could test it and see for themselves what the code does. Any spelling corrections or other improvements are welcome just try and keep it simple :D&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: The keyboard shortcuts are for Visual Studio.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    /*&#xA;    * !IMPORTANT! Select areas marked in between # and press &quot;ctrl + k + u&quot;&#xA;    * to test the code. After testing select it again and press &quot;ctrl + k + c&quot;!&#xA;    */&#xA;&#xA;    /*&#xA;    * RULE OF PROGRAMMING! Everything is always in English, comments,&#xA;    * variable names etc...&#xA;    */&#xA;&#xA;    /*&#xA;    * So you know what variables are, a variable has a Type for example:&#xA;    * string, int and double there are many others but you dont need to know&#xA;    * those yet. Think of a variable as a name given to a storage area &#xA;    * in the computers memory.&#xA;    */&#xA;&#xA;    /* &#xA;    * When you want to reserve a storage area in the computers memory,&#xA;    * its called &quot;defining&quot;.&#xA;    * When defining a variable you are only reserving the area for &#xA;    * that name! You are not giving it a value so you cant output it yet.&#xA;    */&#xA;&#xA;    //#&#xA;    //int i;        // this is how u define a variable&#xA;    //#&#xA;&#xA;    //Now to give this variable a value you use &quot;=&quot; sign&#xA;    //#&#xA;    //int i;&#xA;    //i = 1;&#xA;    //int j = 2;    // all in one step&#xA;    //Console.WriteLine(&quot;i: {0} j: {1}&quot;, i, j);&#xA;    //#&#xA;&#xA;    /*&#xA;    * Variables are to store one piece of data in the computers memory. &#xA;    * Arrays are used to store a collection of data.&#xA;    * So think of a array as a collection of variables of the SAME!!!! type. &#xA;    * So instead of having variables: &#xA;    * number1, number2, number3, .... number99. &#xA;    * You have a array called numbers.&#xA;    */ &#xA;&#xA;    /* &#xA;    * In arrays we dont call each value a variable tho, we call it a &#xA;    * &quot;element&quot;. An array has a FIXED amount of variables or so called elements.&#xA;    */ &#xA;&#xA;    /* &#xA;    * You define a array just like a variable, its type so for example a &#xA;    * int array and give it a name:&#xA;    */ &#xA;    //#&#xA;    //int[] numbers;&#xA;    //#&#xA;&#xA;    /* &#xA;    * Since we want it to be a new array we will tell the computer that, &#xA;    * we also need to tell it how many elements it will have,&#xA;    * because remember arrays have a fixed amount of elements they can have. &#xA;    * We do this like so:&#xA;    */&#xA;    //#&#xA;    //int[] numbers;&#xA;    //numbers = new int[10];      // 10 being the fixed amound of elements&#xA;    //int[] numbers = new int[10];  // all in one step&#xA;    //#&#xA;&#xA;&#xA;    /*&#xA;    * So a array is a &quot;list&quot; of elements and as I said a element is like &#xA;    * a variable, however a element has a &quot;index&quot; instead of a name.&#xA;    * So to access a certain element we use its index instead of a name. &#xA;    * Indexes are always numbers! and the first index in a array is always &#xA;    * 0!!! never 1!&#xA;    * So the indexes of a array that has 10 elements would be &#xA;    * 0,1,2,3,4,5,6,7,8,9.&#xA;    * Lets assign a value to the first element and then output its value.&#xA;    */&#xA;&#xA;    //#&#xA;    //int[] numbers = new int[10];&#xA;    //numbers[0] = 1;     //0 is the index and we are assigning the value 1&#xA;    //Console.WriteLine(&quot;fist element value: {0}&quot;, numbers[0]);&#xA;    //#&#xA;&#xA;    /*&#xA;    * But we have a array with 10 elements so lets add 10 numbers to our&#xA;    * array:&#xA;    */ &#xA;    //#&#xA;    //int[] numbers = new int[10];&#xA;    //numbers[0] = 1;&#xA;    //numbers[1] = 2;&#xA;    //numbers[2] = 3;&#xA;    //numbers[3] = 4;&#xA;    //numbers[4] = 5;&#xA;    //numbers[5] = 6;&#xA;    //numbers[6] = 7;&#xA;    //numbers[7] = 8;&#xA;    //numbers[8] = 9;&#xA;    //numbers[9] = 10;&#xA;    //#&#xA;&#xA;    /* &#xA;    * It isn't very nice to add values to a array like that because u&#xA;    * have lots of lines of code so lets do the same with a for loop:&#xA;    */&#xA;    //#&#xA;    //int[] numbers = new int[10];&#xA;    //  /*&#xA;    //  * We tell it to start at the first index thats why index = 0, then we&#xA;    //  * want it to stop when the index is 9 so we tell it to stop when its&#xA;    //  * smaller then the arrays length which is 10, then we tell it to&#xA;    //  * increment(add 1) after each loop.&#xA;    //  */&#xA;    //for (int index = 0; index &amp;lt; numbers.Length; index++)     &#xA;    //{&#xA;    //    numbers[index] = index + 1;     // index + 1 becuase we want the values 1 - 10&#xA;    //}&#xA;    //#&#xA;&#xA;    /* &#xA;    * Now that we have a array with 10 values we want to output the contents&#xA;    * of that array we could write 10x Console.WriteLine(number[index])&#xA;    * after the loop.&#xA;    * however we can also use the same loop that we used to add the values &#xA;    * since we know this goes through the entire array.&#xA;    */&#xA;    //#&#xA;    //int[] numbers = new int[10];&#xA;    //for (int index = 0; index &amp;lt; numbers.Length; index++)&#xA;    //{&#xA;    //    numbers[index] = index + 1;&#xA;    //    Console.WriteLine(numbers[index]);&#xA;    //}&#xA;    //#&#xA;&#xA;    /* &#xA;    * But what if we add some values and then want to change a value and then&#xA;    * output them, the output in the for loop would just show the old values&#xA;    * not the new ones.&#xA;    * You can quickly output a array by using the foreach loop.&#xA;    */&#xA;    //#&#xA;    //int[] numbers = new int[10];&#xA;    //for (int index = 0; index &amp;lt; numbers.Length; index++)&#xA;    //{&#xA;    //    numbers[index] = index + 1;&#xA;    //    Console.WriteLine(numbers[index]);&#xA;    //}&#xA;    //numbers[5] = 3;     // Changing the value, so now the value at index 5 is 3 not 6&#xA;    //numbers[7] = 16;    // 16 not 8&#xA;&#xA;    //foreach (int number in numbers)     // Since our array contains int values we tell it for each int in the array do something.&#xA;    //{&#xA;    //    Console.WriteLine(number);&#xA;    //}&#xA;    //#&#xA;&#xA;    /* &#xA;    * Now you know the basics of arrays, lets look at how to find out at &#xA;    * which index a certain value is saved in the array. For things like&#xA;    * this c# has built in functions/methods, most languages will have &#xA;    * built in functions that do a lot of things for you. Lets say we have &#xA;    * a String array of animals and we want to find out where the shark &#xA;    * is saved.&#xA;    */&#xA;    //#&#xA;    //string[] animals = new string[5] { &quot;tiger&quot;, &quot;giraffe&quot;, &quot;shark&quot;, &quot;elephant&quot;, &quot;panda&quot; };  // This automatically adds the values to the array when creating it.&#xA;    //int indexOfShark = Array.IndexOf(animals, &quot;shark&quot;);     // We are giving this function the array to search through and the value we want to find and it will return the index, as a int.&#xA;    //Console.WriteLine(&quot;shark is saved at index {0}&quot;, indexOfShark);&#xA;    //#&#xA;&#xA;&#xA;    /*&#xA;    * Some other useful functions are sort and reverse, they do what their &#xA;    * name says they do :)&#xA;    */&#xA;    //#&#xA;    //string[] animals = new string[5] { &quot;tiger&quot;, &quot;giraffe&quot;, &quot;shark&quot;, &quot;elephant&quot;, &quot;panda&quot; };&#xA;    //Array.Sort(animals);    // Alphabetically for string and smalles to largest for int and double.&#xA;&#xA;    //Console.WriteLine(&quot;Sorted:&quot;);&#xA;    //foreach(String animal in animals)&#xA;    //{&#xA;    //    Console.WriteLine(animal);&#xA;    //}&#xA;    //Array.Reverse(animals); // Reversed order.  &#xA;&#xA;    //Console.WriteLine(&quot;Reversed:&quot;);&#xA;    //foreach (String animal in animals)&#xA;    //{&#xA;    //    Console.WriteLine(animal);&#xA;    //}&#xA;    //#&#xA;&#xA;    Console.ReadLine();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6543" OwnerDisplayName="Lucifer Uchiha" LastEditorUserId="27" LastEditDate="2019-02-13T20:18:10.193" LastActivityDate="2019-02-15T05:02:59.863" Title="C# Array Lesson Plan" Tags="|c#|lesson-review|" AnswerCount="3" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5400" PostTypeId="2" ParentId="5399" CreationDate="2019-02-13T17:49:04.727" Score="1" Body="&lt;p&gt;There are a couple of things I would do before presenting this. The goal of the suggested change is to prevent students from getting the idea that things are the same when they are only incidentally similar. First, I'd do the animals array first so that the idea of an index is separate completely from the values stored in the array. The one is an integer and the other is a string. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I wouldn't use the number array as you have done it, but (a) give it a different name that might be more &quot;intention revealing in a real problem&quot; and (b) use a more complex formula than just &lt;code&gt;index + 1&lt;/code&gt;. For example, something like &lt;code&gt;powers[index] = 2 ^ index;&lt;/code&gt; (Which is Math.pow(2, index), of course). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But anyway something with a more complex relationship to the index. The reasoning is that the similarity can be misleading as to the intent. Doing animals first helps with this, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When a construct has a lot of parts, it can help beginners if the parts are as different from each other as possible so that their natural human classification system doesn't merge concepts that should be separate.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-02-13T17:57:22.653" LastActivityDate="2019-02-13T17:57:22.653" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5401" PostTypeId="2" ParentId="5399" CreationDate="2019-02-13T20:09:51.877" Score="3" Body="&lt;p&gt;Treat your pupils with all the respect they deserve.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They deserve teaching material that is free from obvious spelling and grammar mistakes. To reach this, paste your code into Microsoft Word or another spell checker and go through the whole document carefully. As of now, there are at least 30 issues in your document, which is far too easy for the pupils to spot. After that, hand the material to a human proof reader, for getting the final polishing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They deserve to be treated as humans. Saying u to them doesn't accomplish that. It just leaves a sloppy impression on you as the teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I support &lt;a href=&quot;https://cseducators.stackexchange.com/a/5400&quot;&gt;Buffy's approach&lt;/a&gt; of preventing them from confusing any of the concepts by not starting with an &lt;code&gt;int[]&lt;/code&gt; but with a &lt;code&gt;string[]&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An array is fundamentally different from the data types they know by now (&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;string&lt;/code&gt;), because assigning arrays doesn't copy its value, it copies just the reference. Be prepared to answer questions regarding this difference.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The C-style &lt;code&gt;for&lt;/code&gt; loop for initializing an array is very hard to grasp. Therefore I'd rather start with the animals array and using an array initializer. I also like the simple &lt;code&gt;foreach&lt;/code&gt; loop for writing an array because it doesn't have much syntactic overhead.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Only after these introductions would I start with the &lt;code&gt;for (int i = 0&lt;/code&gt; loop. This is already fairly advanced stuff.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like your approach of introducing the &lt;code&gt;Array.IndexOf&lt;/code&gt; function before teaching the pupils to implement it themselves. It's complicated enough to call a function. Too bad that C# doesn't provide an &lt;code&gt;Array.Shuffle&lt;/code&gt; function. I think that function would give the pupils plenty of things to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe you can make them enter a string, convert the letters of the string into an array and then sort that array. This gives them anagrams, and they can show them to each other to guess what the original words were. The code for that is pretty simple and I think they'll understand it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Console.Write(&quot;Enter a word: &quot;);&#xA;string word = Console.ReadLine();&#xA;&#xA;char[] chars = word.ToCharArray();&#xA;Array.Sort(chars);&#xA;&#xA;Console.WriteLine(chars);&#xA;&#xA;Console.ReadLine();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4028" LastEditorUserId="4028" LastEditDate="2019-02-13T20:31:05.337" LastActivityDate="2019-02-13T20:31:05.337" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5402" PostTypeId="2" ParentId="5394" CreationDate="2019-02-14T13:54:44.380" Score="1" Body="&lt;p&gt;I have written a &lt;a href=&quot;https://senseis.xmp.net?PhantomGo&quot; rel=&quot;nofollow noreferrer&quot;&gt;small game for Android&lt;/a&gt;, which I published &lt;a href=&quot;https://github.com/rillig/Phantom-Go-Android&quot; rel=&quot;nofollow noreferrer&quot;&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a board game, and I have written unit tests for all important parts of the program, especially for placing stones on the board. These tests are in the &lt;code&gt;app/src/test&lt;/code&gt; folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since I have translated the app into several languages, I have put the string messages into Android-style XML files. To test whether these string templates are filled with the correct placeholders, I had to test them in a more realistic environment. Therefore these had to go into the &lt;code&gt;app/src/androidTest&lt;/code&gt; folder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code is already more than a year old and I'm still satisfied with it. Therefore I think it makes a good example.&lt;/p&gt;&#xA;" OwnerUserId="4028" LastActivityDate="2019-02-14T13:54:44.380" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5403" PostTypeId="1" AcceptedAnswerId="5404" CreationDate="2019-02-14T15:43:03.407" Score="10" ViewCount="959" Body="&lt;p&gt;In my beginner experience as a teacher, the thing that's strucking me most is a sensation of my students' inability to express their (valid!) thoughts in code. Let me deepen it a bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I inherited a last year class that was supposed to know C from their previous years. Anyway they struggled in manually tracing the execution of the code they see, being it mine or theirs.&#xA;After some work I could test and evaluate them again and it now seems to me that they are actually quite good at reasoning about a sort of &quot;abstract idea&quot; of what they want their algorithms to do: they can use our natural language to say things like scan this, sum that, stop here or there, and they are pretty much correct. What they seem to have big difficulties in is saying the same thing using a formal language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They moreover have this (to me, crazy) habit of writing huge blocks in main() without splitting anything, and even worse the only way they think about of producing output is writing to the world: they don't contemplate returning from a function. One (brilliant!) boy once asked me with big amazement after my seemingly strong assertion: &quot;oh, so you mean that strlen() is a function?&quot;.&#xA;Of course I may understand where this comes from, but I suspect it's not healthy for their learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me that a possible reason of this observed behaviour might lie in having taught them to build huge state machines without making them have a clue that they are building huge state machines: they can reproduce some they have already seen but are really lost when needing to make a new one. Even having them apply small modifications seems to me more like a blind trial from their part than some reasoning about the meanings. The building blocks of the language do not play well together in their minds or they are just unable to think about the state transitions in the code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have to push myself a bit more I can say that I suspect all this is a reflection of the non composability of state machines, making their use in teaching to absolute novices not effective, whereas functions are known to be composable and would presumably lead to better results, &lt;strong&gt;in terms of being a means for mapping an individual's thoughts to formal language&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is my analysis plausible? Have you experienced anything similar? Is there any available scientific literature on these phenomena? How would you test them to investigate deeper their difficulties and how would you try to show them a more effective route? Is there anything you would do to improve the methodology for next classes?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Should state machines be introduced somehow more explicitly, with better examples, showing how do they actually solve problems before throwing them to the poor students with a burden of syntax that they know nothing about? They even told me clearly that syntax is the only thing they focused all their energies on in their previous years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I am doing in younger classes is proposing functions first (as in functional paradigm), to solidify the concept of building a small composable block that has input and output, waiting a bit more in the future to introduce state transitions using the classic drawing turtle of fame with the hope that its visual feedback might make things tangible.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2020-12-15T03:12:37.943" Title="Students seem to be unable to use code to express their ideas. Is the teaching methodology improvable?" Tags="|programming|lesson-order|" AnswerCount="5" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5404" PostTypeId="2" ParentId="5403" CreationDate="2019-02-14T16:02:07.480" Score="7" Body="&lt;p&gt;There is a lot to unpack here, but first, YES, the teaching methodology can be improved, but that is always true, an unending quest. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I'll note that C is a language with enough pitfalls that many people struggle with it at the detail level, finding it harder to think more globally. My preference, perhaps not open to you, is to start with a language at a higher level of abstraction generally and then, later in the curriculum, work both downward toward the machine and upward from where you start. An OO or pure functional language, if well taught, makes abstraction easier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the biggest recommendation I'd make to address the problems you state is to introduce (at the beginning) &lt;em&gt;unit testing&lt;/em&gt; and &lt;em&gt;test driven development&lt;/em&gt; (TDD). Find a good testing environment for your language and insist on its use: No Code Without a Failing Test. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I normally start out a course with TDD, combined with giving assignments in an already logically decomposed way. Instead of a large program to write (large is relative, of course), I give them the &quot;top down&quot; decomposition initially that, in C they would be able to implement by writing a lot of functions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, at the beginning, I relieve them of having to face a blank screen with a large problem and nothing but 'main()' to work with. Later you can continue this, but making the pieces bigger, requiring some decomposition (helper functions) be developed. My mantra for a &quot;too big function&quot; is about five lines. My mantra for &quot;too complex function&quot; is nesting more than two levels. You can break these rules for especially boring code, but not for the interesting logic of a program, or it will be impossible to understand and maintain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that breaking a problem up into parts is how Agile Development (Extreme Programming, Scrum, ...) actually work, with the Customer (in this case you) giving the Team (your students) manageable problems each of which contributes value. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, with TDD, you can provide some tests initially along with simple requirements. Teach them to stop programming when the tests pass. Or, write additional tests and make them pass. But the tests are small and simple, usually without internal logic, and the application code needed to make them pass should also be simple function and uses of functions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-02-14T16:02:07.480" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5405" PostTypeId="2" ParentId="1205" CreationDate="2019-02-14T19:56:02.380" Score="1" Body="&lt;p&gt;I used &lt;a href=&quot;https://stepik.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;stepik.org&lt;/a&gt; for my functional programming lab (in Java). It works like a charm.&#xA;As for me, the only missing part is plagiarism detection. I believe you should it give it a go!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With stepik, you have the features of a basic LMS (learning management system). Basically you can publish an online course (with several chapters..); you can get &quot;students&quot; to join the course, publish assignments; if needed define time window to submit assignments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Among assignments (quizzes, Fill in the blanks, ...), it is possible to set up code assignments. For the code assignment, most of popular programming languages are possible (including Java, Python, C/C++, SQL, ...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order to assess an assignment, you need to define a test case. Typically, inputs are read from the console (for instance using &lt;code&gt;new Scanner(System.in).nextLine()&lt;/code&gt; in Java), then the student's solution output needs to match the expected output defined for the test case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More details can be found in &lt;a href=&quot;https://support.stepik.org/hc/en-us/articles/360000159673-Types-of-assignments&quot; rel=&quot;nofollow noreferrer&quot;&gt;stepik assignement types&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6548" LastEditorUserId="27" LastEditDate="2019-02-21T13:05:24.603" LastActivityDate="2019-02-21T13:05:24.603" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5406" PostTypeId="2" ParentId="5403" CreationDate="2019-02-15T00:49:41.287" Score="6" Body="&lt;p&gt;I am surprised to hear of State Machines being introduced anywhere early in a curriculum. They are a solution to a particular kind of problem, and wouldn't make much sense outside of it. So, this is an indication to me that the curriculum is getting things backwards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Humans need to learn things starting with very concrete situations that are graspable. Then they can start to use those concrete ideas as building blocks. Then they can start to reason about the blocks, with a bit of abstraction, then a bit more. You can't start with abstraction, the brain simply does not work that way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, after years of nights of good sleep, enough ideas and familiarity will accumulate for motivated people to start to think on their own about things like programming. (And math. Music. Art. Philosophy... Etc.) But it doesn't come easy or fast. Sounds like a song I heard long ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If people developed programming in a particular way, maybe that is the best way to teach people about programming? If brains produced those ideas in a particular order, maybe that is how brains work and we should respect that and follow it? You can't push a rope uphill, but pulling on it works every time.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2019-02-15T00:49:41.287" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5407" PostTypeId="2" ParentId="5399" CreationDate="2019-02-15T05:02:59.863" Score="0" Body="&lt;p&gt;Have you or the teacher that you're filling in for explained the difference between primitive data types and reference data types?  If these are to be future developers, they should understand how things are stored on the stack and on the heap.  Since this is probably their first non-primitive data type, this is probably the time to make the explanation.  It will become important as you get into objects.  It can lead into an explanation of when setting x = y and chancing x also changes the value of y when both x and y are reference types and how that differs when x and y are primitive types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find it helpful to draw the stack space and the heap space on the whiteboard and when you're going through code, you can modify the stack and heap accordingly so that they get a good understanding of what is going on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if what you entered here is for distribution you might consider checking the grammar and spelling.  I find it very distracting when I read something that isn't written as well as it could be.  For example:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In arrays we dont call each value a variable tho, we call it a &#xA;    * &quot;element&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fix &quot;don't&quot;, &quot;though&quot;, and &quot;an&quot; element&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are others and I'm not picking on you, so I just suggest you read through it again and fix any similar issues.  If you need help proofreading it, let me know, and I'll provide more examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another idea is to explain how the string type works and what immutable means.  I notice that you're explaining some of the array methods.  That is great.  But once you start talking about the methods associated with strings the concept of immutability becomes important.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;string x=&quot;My String&quot;;&#xA;Console.WriteLine(x);&#xA;Console.WriteLine(x.ToLower());&#xA;Console.WriteLine(x);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because a string is immutable, what is written to the console is the following:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;My String&#xA;my string&#xA;My String&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Good Luck with your class.&lt;/p&gt;&#xA;" OwnerUserId="6549" LastActivityDate="2019-02-15T05:02:59.863" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5408" PostTypeId="1" CreationDate="2019-02-15T11:10:30.333" Score="6" ViewCount="418" Body="&lt;p&gt;For a software course about rich client Javascript applications we want students to be able to choose what framework they will use. Now to give us a little bit of control we want them to be able to choose from Vue.js, React or Angular. As far as I can see Angular and React are both almost equal in technical complexity. But Vue.Js, although it's very popular, seems more flat and shallow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to test students if they are able to build a solution that is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Modular (components, modules, etc) &lt;/li&gt;&#xA;&lt;li&gt;Has complex user interaction&lt;/li&gt;&#xA;&lt;li&gt;Is tested via unit test and UI testing&lt;/li&gt;&#xA;&lt;li&gt;Follows the separation of concern principle&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My question: Can Vue.JS compete with Angular and React based on the criteria listed above?&lt;/p&gt;&#xA;" OwnerUserId="6551" LastEditorUserId="8651" LastEditDate="2020-01-01T12:10:57.150" LastActivityDate="2020-01-01T12:10:57.150" Title="Angular vs React vs Vue" Tags="|programming|javascript|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5409" PostTypeId="1" AcceptedAnswerId="5412" CreationDate="2019-02-15T11:37:52.593" Score="3" ViewCount="177" Body="&lt;p&gt;Some time ago, I needed to teach git in the class. So I took a 6 hours course in one of the online courses websites (I think it was udemy or coursera). The course was so good, that I was wondering why I have to teach this myself at all? Why not tell the students to view the course at home and ask me if they have any questions? The online course has many advantages that I cannot hope to have in class:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each student can learn in his/her own pace;&lt;/li&gt;&#xA;&lt;li&gt;Every several minutes, there is a pause and a short question so that the students can check their understanding before proceeding;&lt;/li&gt;&#xA;&lt;li&gt;Every hour or two, there is an intermediate summary with a quick quiz that is graded automatically;&lt;/li&gt;&#xA;&lt;li&gt;The lectures are very polished, clear, with many examples. And, they have more time than me (I had only 3 hours) so they can elaborate more, and the students can choose whether to go deeper.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Of course, I cannot just say that I do not come to teach, because it is against the rules of the department. But, from the students' perspective, it seems much better to learn from home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So my questions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Should I recommend to my students &quot;learn everything at home before the class, and come to class only if there is something you want to ask&quot;?&lt;/li&gt;&#xA;&lt;li&gt;Is there another way to combine online courses with frontal teaching in a fruitful way?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="204" LastEditDate="2019-02-16T16:50:57.033" LastActivityDate="2019-02-16T16:50:57.033" Title="Using online courses instead of / in addition to traditional lecturing" Tags="|classroom-management|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5410" PostTypeId="2" ParentId="5409" CreationDate="2019-02-15T12:55:07.957" Score="2" Body="&lt;p&gt;I often refer students to tutorials and videos as a supplement to my classes.  They find this helpful because a video can be paused while they experiment with the concepts on their computers.  Sometimes I will assign a tutorial and then have them do an activity in class where they apply the ideas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is lots of great stuff out there. Don't ignore it.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2019-02-15T12:55:07.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5411" PostTypeId="1" CreationDate="2019-02-15T13:33:01.190" Score="3" ViewCount="592" Body="&lt;p&gt;Last year I taught a programming course, and used an automatic grading system for grading the students' homework (in addition to other evaluation measuares). It worked quite well; the bottleneck was the need to write test-cases for each assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This year, I would like to have the students themselves write the test-cases - both to save time, and to have them practice this important skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought of the following scheme:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In each of the 10 assignments, 10% of the students will be the &quot;test set&quot; and the other 90% will be the &quot;train set&quot;.&lt;/li&gt;&#xA;&lt;li&gt;The &quot;test set&quot; students will write test-cases - each student will write e.g. 10 test-cases.&lt;/li&gt;&#xA;&lt;li&gt;The &quot;train set&quot; students will solve the assignment; their solutions will be tested using the test-cases of the test-set.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The problem with this scheme is that, if the solution of student A from the train-set fails on the test-case of student B from the test-set, it is not clear whether it's because an error in student A's solution or an error in student B's test-case. Of course I can look and see who is correct, but this requires a lot of work and undermines the idea of automatic grading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I improve this scheme to allow automatic or almost-automatic grading of both homework assignments and test-cases?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2019-02-19T04:40:04.530" Title="Automatic grading of test-cases" Tags="|grading|auto-graders|unit-testing|information-technology|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5412" PostTypeId="2" ParentId="5409" CreationDate="2019-02-15T13:50:57.490" Score="5" Body="&lt;p&gt;What you have described is about half of what is known as a flipped classroom. This concept has been explored in other questions here and at the Academia forum. The idea is that instead of lecturing, face to face time is filled with activities that can only be done face to face and the students are given &quot;assignments&quot; to read or explore video and other online information outside of class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would normally be practice and experience on the student's own time (standard classroom) is now done during the class periods where you get a chance to observe them. You also get a chance to permit group work and sharing, but in an environment in which you can see that any rules are adhered to. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The flipped classroom is very handy in the beginning CS courses where students need to get a lot of practice, but also get stopped when they get to questions that they can't answer and then wait for a chance to have them answered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But your face time needs to be more (much more) than just you answering questions. That is only serving one or a few students at a time. You need to design activities in which they can all benefit. Group work in a flipped classroom is also useful as many of the questions that arise in the course of an activity can be answered by the students themselves and their team mate(s) and so don't need to come to you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many instructors flip the classroom for the entire course, never lecturing in the traditional sense, but you can also apply it to specific topics. The upside of doing it just a bit is that you get practice with it yourself, but the downside is that the students will be awkward with it initially and won't likely do enough outside class periods. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On an orthogonal track, online courses are a mixed-value resource. For certain kinds of learners (like yourself) they can be valuable. For others, they don't work at all. The typical drop-out figures for online courses are appalling. I don't think that is primarily due to the quality of the &lt;em&gt;material&lt;/em&gt; but rather to a mismatch with learning styles of the students. I don't have research on that, however, but would love to see it. One problem with video is that a student can't ask a question in the middle of it. If they miss a point, they can replay, but can't really get a clarification. I also question whether students are able, in such courses, to get appropriate practice and (more important) feedback on their practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But combining an online &quot;course&quot; with good &lt;em&gt;practice-and-feedback&lt;/em&gt; can be a plus, provided that you design it properly, taking account of the different needs of different students. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Here us another question on &lt;a href=&quot;https://cseducators.stackexchange.com/q/1121/1293&quot;&gt;Flipped Classroom&lt;/a&gt;. A simple search for &quot;flipped&quot; at &lt;a href=&quot;https://academia.stackexchange.com/&quot;&gt;Academia&lt;/a&gt; will turn up a wealth of information. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-02-15T13:59:58.390" LastActivityDate="2019-02-15T13:59:58.390" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5414" PostTypeId="2" ParentId="5411" CreationDate="2019-02-15T20:56:39.090" Score="4" Body="&lt;p&gt;Have you thought about having a solution that you create and test the students test cases against your solution? Then you have a stable platform for running the student defined tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also run test cases which you prepare against the student's code. Now you have graded the two parts independently of one another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just out of curiosity, what did you use for auto-grading?&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2019-02-15T20:56:39.090" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5415" PostTypeId="2" ParentId="5411" CreationDate="2019-02-16T16:11:22.137" Score="3" Body="&lt;p&gt;If you run all implementations against all tests, then you can see anomalies. If you put results into a grid, then any failures should show up as a line: horizontal for implementations, vertical for tests. Any odd failures will still need investigating, but there should be few.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-02-16T16:11:22.137" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5416" PostTypeId="2" ParentId="5403" CreationDate="2019-02-16T16:50:12.200" Score="2" Body="&lt;p&gt;I will add to this, choice of language is also important, learning &lt;code&gt;C&lt;/code&gt; (and forget &lt;code&gt;C++&lt;/code&gt;) and how to program at the same time is to hard (see zone of proximal development).&lt;/p&gt;&#xA;&lt;p&gt;Even Java is to hard:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Explaining &lt;code&gt;public static void Main(string[] args)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Explaining that all programs need a main, but don't put anything in it, except &lt;code&gt;new Program().run();&lt;/code&gt; (main does not scale).&lt;/li&gt;&#xA;&lt;li&gt;Don't use static it does not scale, but we have to use it in lesson 1.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;public&lt;/code&gt;/&lt;code&gt;private&lt;/code&gt; in lesson 1.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;void&lt;/code&gt; in lesson 1, but don't use it, we will use functions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;May be with Unit Testing we can avoid main, but this is just the start. As an experienced programmer, I can do Java, but I find it exhausting, the amount of extra work that I have to do, just to express the most simple of ideas.&lt;/p&gt;&#xA;&lt;h1&gt;So what to choose&lt;/h1&gt;&#xA;&lt;p&gt;A language with contracts: adding pre/post conditions, will give you a clearer idea of what it is you are trying to do. If you don't know what you are trying to do, then how can you do it.&lt;/p&gt;&#xA;&lt;p&gt;A language with a clean syntax, no extraneous words (public static void …). &lt;code&gt;=&lt;/code&gt; means &lt;code&gt;=&lt;/code&gt;, and assignment has its own symbol/keyword.&lt;/p&gt;&#xA;&lt;p&gt;Is functional, or promotes functional.&lt;/p&gt;&#xA;&lt;p&gt;A language with good defaults: data-attributes are private by default, methods are public by default.&lt;/p&gt;&#xA;&lt;p&gt;The programming model, maps well to the theoretical model. E.g. Theoretical Object-oriented model maps to programming model (this is not true of most OO languages), or functional model maps to programming model.&lt;/p&gt;&#xA;&lt;p&gt;Has a simple exception system (these are often overly complex). Not to hard to understand, but hard to work with.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-02-16T16:50:12.200" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5417" PostTypeId="1" AcceptedAnswerId="5436" CreationDate="2019-02-16T19:41:17.840" Score="52" ViewCount="31452" Body="&lt;p&gt;I'm at final year of my graduation in Computer Science in Brazil. The university that I study is one of the best in the country and my passion is for Software Engineering. It disappoints me, in Software Engineering classes, that no Design Patterns are taught at all, my professor only commented about their existence. From my point of view, this is terrible for every student, because the problems in the real world, both in academia and in the industry, can be more easily handled with a good choice of design pattern. So I'm thinking, this can reduce the quality of the course?&lt;/p&gt;&#xA;" OwnerUserId="6555" OwnerDisplayName="olegario" LastEditorUserId="1293" LastEditDate="2019-02-16T21:55:20.880" LastActivityDate="2019-03-13T23:05:42.937" Title="How bad is a Computer Science course that doesn't teach Design Patterns?" Tags="|curriculum-design|" AnswerCount="11" CommentCount="42" ContentLicense="CC BY-SA 4.0" />
  <row Id="5418" PostTypeId="2" ParentId="5417" CreationDate="2019-02-16T20:03:55.423" Score="157" Body="&lt;p&gt;There is more to a CS degree than programming and more to programming than Design Patterns. I'm actually an expert in such things and have designed and published a few as a committed member of the patterns community. If I were teaching you programming in some object-oriented language you would certainly learn about and use many such patterns, but you might never hear the names, just the usage as good ways to write programs in a certain set of languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I have a friend, also in the community, who is well known and has designed many things fundamental to areas of programming languages who doesn't use the standard design patterns you are probably thinking of at all. The reason is that he programs in LISP and CLOS, not Java and C++. His informed opinion about the design patterns is that they are merely corrections for flaws in certain languages, primarily C++. Many of the kinds of things that design patterns accomplish in C++ are done in more natural ways within Common Lisp itself without needing any such mental tricks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it may well be that your curriculum is flawed, but not teaching the patters in the &lt;em&gt;Gang of Four&lt;/em&gt; book is not the only indicator. (Some of those authors are friends of mine, in fact). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Moreover, there is more (much more) to CS than programming. Have you learned data structures and algorithms? Have you learned architecture and databases? Have you learned data communications and concurrency? Have you learned to work in teams on large projects? Have you learned to think abstractly and to decompose problems and compose solutions? Those are vitally important too. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-02-16T20:03:55.423" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="5419" PostTypeId="2" ParentId="5417" CreationDate="2019-02-17T00:25:34.407" Score="51" Body="&lt;p&gt;Buffy's answer perfectly addresses your question about design patterns. I would just like to add a bit of perspective about CS curricula in general.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science (CS) is very young compared to other scientific disciplines. For example maths or biology are strongly structured disciplines which rely on a quite well defined corpus of must-know basics. Of course these fields evolve, but the standard undergrad curriculum is not very different from what it was 20 years ago. On the contrary, CS is a fast evolving discipline and it is very different from what it was 20 years ago. Of course there are some broadly accepted topics, but there is no clear consensus about what a CS curriculum should contain. This is why different institutions might provide students with a significantly different background, but that doesn't necessarily mean that one is better than the other. It's important to keep in mind that a good CS curriculum is not one which provides students with the knowledge of their time, but one which prepares them to adapt and acquire new knowledge all along their professional career.&lt;/p&gt;&#xA;" OwnerUserId="6125" LastActivityDate="2019-02-17T00:25:34.407" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5421" PostTypeId="1" CreationDate="2019-02-17T11:32:44.320" Score="2" ViewCount="120" Body="&lt;p&gt;Please, can anyone recommend a simple online code review scripts/website similar to udacity. Instructor upload students code to the scripts, they add inline comments and can send the URL to the student. I need something very simple. No need for auto-grading. If not available, is there any library I can use to build my own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attached is the screenshots for clarification.&lt;a href=&quot;https://i.stack.imgur.com/nyDoH.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nyDoH.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6568" LastEditorUserId="6568" LastEditDate="2019-02-18T05:22:11.940" LastActivityDate="2019-02-18T18:53:20.577" Title="Online Code Review Scripts Like Udacity" Tags="|grading|programming|lesson-review|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5422" PostTypeId="1" CreationDate="2019-02-17T11:38:52.243" Score="3" ViewCount="649" Body="&lt;p&gt;I've been searching for a detailed definition about what computer science is about for years, when one day I came across these&#xA;two documents: &lt;a href=&quot;https://www.acm.org/binaries/content/assets/education/curricula-recommendations/cc2005-march06final.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computing curricula 2005 report&lt;/a&gt; and &lt;a href=&quot;https://www.acm.org/binaries/content/assets/education/cs2013_web_final.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Science Curricula 2013&lt;/a&gt;.&#xA;The latter, more importantly, lists the knowledge areas and their relative content that an undergraduate student in computer science should know.&#xA;The content of each knowledge area is divided in core-topics and elective-topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I want to ask is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) What exactly are the knowledge areas? Are they the fields of computer science where Ph.D. students can focus their research?&#xA;If yes, then how about architecture and organization (AR)? Isn't it the knowledge area where only computer/electrical engineers can focus their research?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Is this curricula applicable worldwide or does each country have its own?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) Some topics are elective. How can I study the elective topics I'm interested in since my university didn't have enough time and resources to teach them?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any answer will be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="6570" LastActivityDate="2019-02-17T14:01:18.267" Title="About the ACM and IEEE-CS Computing Curricula" Tags="|curriculum-design|self-learning|curriculum-review|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5423" PostTypeId="2" ParentId="5422" CreationDate="2019-02-17T12:36:48.587" Score="1" Body="&lt;p&gt;The professional societies publish Curriculum Guidelines simply to guide universities in setting undergraduate curricula. They may be used by anyone, anywhere, but are not, normally, required. Note that the societies are private membership organizations, not official bodies. You can join them if you wish, but there are membership fees, normally less for students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The guidelines are created periodically (say every decade) by volunteer committees and try to represent a consensus of professionals. Each version goes through several published preliminary versions that anyone can comment on. The comments are considered by the committee. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal of the committee is to design a &quot;model curriculum&quot; that is appropriate for either advancement to graduate school or to industry employment if a student has, at least, most of the knowledge implied. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not, in general, a guide to PhD study, but those starting a doctorate should already have solid background in all of the areas of a model curriculum. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some university CS programs are accredited by &lt;a href=&quot;https://www.abet.org/accreditation/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ABET&lt;/a&gt;, which has its own expectations for curriculum as well as faculty standards, etc. This is a bit more official, but still not required. ABET is another private organization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your university doesn't have courses in some area, you can ask them what can be done to &quot;fix&quot; that. You can also seek instruction in the missing areas through private instruction, another university, or online courses. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-02-17T12:36:48.587" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5424" PostTypeId="2" ParentId="5417" CreationDate="2019-02-17T12:37:47.453" Score="12" Body="&lt;p&gt;In general, a good education is one that teaches you to think. A good computer science education isn’t one that teaches you any specific language or technique but one that exposes you to many different concepts such as algorithms and data stuctures, as well as theories such as functional, logical programming, and objected-oriented programming, and relational database theory. At the end of it, you should be able to teach yourself new languages and tools, and pick up new paradigms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are some basics that I would expect every computer science education to include, such as at least one assembly language, an understanding of Turing machines, algorithmic complexity, but design patterns isn’t one of those.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do see it as a missed opportunity though: design patterns could be covered in one lesson as part of a course on object-oriented design.&lt;/p&gt;&#xA;" OwnerUserId="1037" LastActivityDate="2019-02-17T12:37:47.453" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5425" PostTypeId="2" ParentId="5422" CreationDate="2019-02-17T14:01:18.267" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;1) What exactly are the knowledge areas? Are they the fields of computer science where Ph.D. students can focus their research?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;These are outlines of undergraduate courses. The document is descriptive, not proscriptive.  A Ph.D. should be about expanding the field in some form, so while it could be within one of the areas outlined in the document, it certainly does not have to be.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If yes, then how about architecture and organization (AR)? Isn't it the knowledge area where only computer/electrical engineers can focus their research?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Absolutely. This would be something to consider with your own PhD advisor.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;2) Is this curricula applicable worldwide or does each country have its own?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The documents listed were based in the USA, and as I mentioned, they are merely descriptive.  If more programs were studied, there would undoubtedly be more (and more varied!) curricula. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seemed to me that there was quite a lot of heterogeneity already in those documents.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;3) Some topics are elective. How can I study the elective topics I'm interested in since my university didn't have enough time and resources to teach them?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Textbooks are wonderful resources. There may also be coursework in places like Udemy or Coursera.  And, of course, finding resources or looking over curricula are always on-topic here at CSEd, so that is one more resource available to you.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-02-17T14:01:18.267" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5426" PostTypeId="2" ParentId="5417" CreationDate="2019-02-17T15:24:00.960" Score="15" Body="&lt;p&gt;Buffy has stated much of what I would have, so I won't repeat. But do read that answer carefully.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The first point is, university is for proper formal education, which means heavy theory and less practicals. University is not for job training (there are lesser schools for that). That is what makes a university education better than a job training school, and what makes the starting income higher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second point is this. Education is deteriorating badly, CS in particular. In all countries (Brazil is actually less damaged than many Western countries). The basics are not being taught properly, or not being taught at all. Any of the CS graduates that we hire are clueless about basic logic, but they are expert is some irrelevant thing from last year that everyone has forgotten about this year because there is a new fad and terminology. They lack logic in their speech; their thinking; and of course their programs.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Half the time, in order to cut through the argument, I have to draw an &lt;a href=&quot;https://en.wikipedia.org/wiki/Structured_systems_analysis_and_design_method&quot; rel=&quot;noreferrer&quot;&gt;SSADM&lt;/a&gt; diagram, or an &lt;a href=&quot;https://en.wikipedia.org/wiki/IDEF0&quot; rel=&quot;noreferrer&quot;&gt;IDEF0&lt;/a&gt; model, or a flowchart, or code the important part for them in &lt;code&gt;awk&lt;/code&gt;, which scares the bejeezus out of them. Then the lights go on in their heads, and they can code. The problem is they can code, but they cannot think.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Instead, many unnecessary, current-fad things are being taught. Design patterns is one of them. Without the underlying foundation, it is quite meaningless. Sure, the marketing is good, just as it is for chaos theory and other forms of insanity. The problem with it is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;it approaches the target bottom-up (thinking, and good systems design, is top-down)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;it has patterns in mind. Not design patterns (design is not a pattern), but implementation patterns.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;it promotes a single tool mentality (Maslow's Hammer: if all you have is a hammer, every problem looks like a nail).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It teaches you to look at the problem in terms of a predefined set of solutions (all bad, and very limited), and just match one to the other. Good for simple robots (without AI). Not good for humans, or AI-capable robots. It is like when learning to be a barista, learning 100 ways to froth the milk, and to make pretty pictures in the foam, but not learning what coffee is, or where it comes from.  On the other hand, if you learn the basics, you can make any type of coffee, and anoint it with an infinite number of pictures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need to learn:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to understand and analyse problems&lt;/li&gt;&#xA;&lt;li&gt;know design and methods, and apply them&lt;/li&gt;&#xA;&lt;li&gt;methodologies and standards (unless you work in China)&lt;/li&gt;&#xA;&lt;li&gt;SSADM and IDEF0, not UML (it is not a standard, and it has no facility for analysis or for design)&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;problem decomposition, and then solution composition&lt;/li&gt;&#xA;&lt;li&gt;architecture (literally, the way to ensure that each code segment is deployed in the right location)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;come up with a complete system (good case studies)&lt;/li&gt;&#xA;&lt;li&gt;for programming, you need:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Logic, formal logic, and even more logic&lt;/li&gt;&#xA;&lt;li&gt;proper diagramming&lt;/li&gt;&#xA;&lt;li&gt;ability to program in any language (not stuck to Java or C++ or OO/ORM ... it is quite useless to be able to code objects without understanding deeply what the heck the object is)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;for everything, you need to understand normalisation properly (it is pretty limited to know only the NFs, or to apply them only to data).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;the problems in the real world, both in academia and in the industry, can be more easily handled with a good choice of design pattern&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;No. If you said that in an interview, I wouldn't hire you, because it indicates a very narrow mindset, and a lack of understanding that problem solving, not pattern matching, is the CS skill that I am hiring you for. In the real world, we need what I have explained above.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Trust your university, and your teachers, not the latest faddy books.&lt;/p&gt;&#xA;" OwnerUserId="6574" LastEditorUserId="1314" LastEditDate="2019-02-19T04:06:33.710" LastActivityDate="2019-02-19T04:06:33.710" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5427" PostTypeId="2" ParentId="5417" CreationDate="2019-02-17T17:17:39.093" Score="33" Body="&lt;p&gt;It has been well known for decades by anyone coming out of University that, as you say, &lt;em&gt;&quot;the problems in the real world, both in academia and in the industry, can be more easily handled with a good choice of design pattern&quot;&lt;/em&gt;. And it has been well known for almost as long that this claim is wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you have a problem, you come up with a way to solve it that suits that problem and also the surrounding context. Then, if you want to describe your solution, you can find some terms/names for it &amp;mdash; sometimes, there is already a name for the solution, so you can just use that name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you don't do is look at a problem and say &quot;I know, I'll use the visitor pattern&quot; just because it's a thing that has a name. That is an arse-backwards way to approach problem solving. You might utter that phrase out loud if you've concluded that the appropriate solution indeed does look like the visitor pattern, quite by chance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Design patterns are a descriptive tool, not a problem-solving tool.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is unusual for a University to &lt;em&gt;not&lt;/em&gt; make this error, and you've mistaken it for an omission. It is possible that it is an omission. If so, I'd say it's a fortunate one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would have hoped, however, that your professor would at least pay lip service to design patterns because &amp;mdash; rightly or wrongly &amp;mdash; you will encounter loads of people in industry who treat design patterns as god, and you will need to know when to recognise this, and you will need to come up with your own opinion on whether/when they are applicable. To simply not mention them at all in a course also seems unfortunate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In conclusion, it's not necessarily &quot;bad&quot; that your course doesn't teach patterns. It's either an omission, or it's &quot;good&quot;. There's not really much way to know without having a productive, educational discussion with your course convener.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, do bear in mind that &quot;computer science&quot; and &quot;software development&quot; are completely different things; though many Universities mistakenly call software development courses &quot;computer science&quot; out of habit, it's possible that your course is an honest-to-god CS course, in which the whole discussion of design patterns isn't particularly relevant anyway.&lt;/p&gt;&#xA;" OwnerUserId="4731" LastActivityDate="2019-02-17T17:17:39.093" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5428" PostTypeId="2" ParentId="5417" CreationDate="2019-02-17T23:51:50.733" Score="10" Body="&lt;p&gt;Since Buffy already gave such a good answer, I will post here my experience with an advanced course that focused on OOP and Design Patterns taken at a very prestigious Brazilian university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is, teaching Design Patterns is not easy. Remember that the GoF book was written as a compilation of the author's many years of experience in complex projects. Each pattern is proposed as an answer to problems that arise on certain situations. However, most students have negligible experience during college and have never experienced the difficulties described in the book. So you end up with a course that answers a lot of questions that were never asked in situations that are new to most students. In my case this took form of long expositions of patterns, their motivations and shallow examples of use. Many students slept during class, memorized the patterns for the exam, got reasonably good grades and surely forgot everything afterwards. After an entire course of OOP and Patterns, most students were far from experts in patterns and I suspect they would remember very few patterns, if any at all, a month after the course. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-02-17T23:51:50.733" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5429" PostTypeId="2" ParentId="5403" CreationDate="2019-02-18T17:18:14.093" Score="5" Body="&lt;p&gt;In addition to Buffy's excellent suggestions, I might suggest reframing your own thinking.  You are thinking and speaking rather abstractly.  Little phrases like &quot;a means for mapping an individual's thoughts to formal language&quot; and the question &quot;Should state machines be introduced somehow more explicitly, with better examples&quot; hint to me that you're really thinking about how to get them directly to your way of thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The truth is that abstract ideas are not great starting points for great learning.  Abstraction is a way of grouping seemingly disparate ideas to allow us to utilize them more readily or more flexibly.  That's actually a key idea!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we grok this notion of abstraction, then the way to achieve flexible, abstract thinking is to first have fluency with the smaller, disparate concrete ideas.  Only after several of these ideas are firmly entrenched and comfortable can we then look at them as system and make successful links between the ideas.  (BTW, I am using the word &quot;successful&quot; here as a marker for an abstraction that we can readily utilize.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This fits in with our lived experience.  Typically, we see some small systems, discover (or learn about) how they actually operate the same way, and then expand on the abstraction through new linked ideas over time.  When the system works well, rich and complex ideas get boiled down to very simple underlying mechanisms, so that we ultimately can apply the abstraction readily in many different mental domains.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This distillation takes time, and it requires us to have at least a few well-understood pieces before it really kicks in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finite State Machines are wonderful, powerful concepts, but these students who haven't figured out when to utilize a function aren't there yet.  Even if you show them the abstraction, they aren't mentally positioned to take any real advantage of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Therefore&lt;/strong&gt;, your best bet is to hit the concrete ideas that you want &lt;em&gt;hard&lt;/em&gt;.  Make sure they have a few of the micro-skills, and provide direct instruction.  Then, introduce abstractions slowly as systems are mastered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One last thought for you: it's absolutely normal for kids to come out with only a middling understanding of the material in a prior course.  As frustrating as that can be, we muddle by with half-understandings all the time in many domains.  Don't think it beneath you to briefly run over material again, both to remind those who have forgotten, and to give a hand to those who never quite got it the first time.  (Keep these kids in your heart when you make your reviews, and the kids who just needed a reminder will be better off for it as well.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-02-18T17:18:14.093" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5430" PostTypeId="2" ParentId="5417" CreationDate="2019-02-18T18:05:35.697" Score="3" Body="&lt;p&gt;The vocabulary of computer science is not as well established as the vocabulary of mathematics.  Many words have different and contradictory meanings in different contexts, and it would thus be common for different people to describe some particular concept using seemingly-unrelated words, or use the same words to describe unrelated concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Certain books have become sufficiently popular that many people have adopted the vocabulary used thereby.  The notion that code to accomplish similar tasks would often be written in similar fashion precedes by decades any attempt to formally recognize any particular set of Design Patterns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although it's useful for people to have a consistent vocabulary that can concisely describe certain common patterns, there's nothing particularly &quot;magic&quot; about it.  Being able to recognize why it is useful for certain kinds of code to accommodate certain combinations of actions is more important than knowing that a popular book refers to some combination of abilities as the &quot;Woozle Pattern&quot;.&lt;/p&gt;&#xA;" OwnerUserId="2073" LastActivityDate="2019-02-18T18:05:35.697" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5431" PostTypeId="2" ParentId="5421" CreationDate="2019-02-18T18:53:20.577" Score="1" Body="&lt;p&gt;My company has a training program for software engineering interns. A computer science problem is given to them that they have to code. Every individual intern is going to create a PR to one of our company's repository. Without merging the PR, an instructor can do a code review and add comments, just like Udacity's. IMO, &lt;a href=&quot;https://github.com/features/code-review/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt; is better for code review than Udacity. It has everything that Udacity has to offer and much more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, they are learning the GitHub workflow which may be helpful in companies that use GitHub (like mine).&lt;/p&gt;&#xA;" OwnerUserId="4266" LastActivityDate="2019-02-18T18:53:20.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5432" PostTypeId="2" ParentId="5411" CreationDate="2019-02-19T03:14:24.643" Score="2" Body="&lt;p&gt;Very interesting strategy. You are essentially putting the 10% test case-writers in the role of a sophisticated recruiting agent who is &quot;interviewing&quot; the rest of the 90% of the class for a job. It is probably not really fair, since the 10% are probably not sufficiently mature to identify the key concepts to be tested, but the class discussion (or perhaps outraged complaints?)  from the consequences (or should I say carnage?) should be extremely &quot;rich&quot;. I hope you are ready for an interesting challenge.&lt;/p&gt;&#xA;" OwnerUserId="6588" LastEditorUserId="6588" LastEditDate="2019-02-19T04:40:04.530" LastActivityDate="2019-02-19T04:40:04.530" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5433" PostTypeId="1" AcceptedAnswerId="5439" CreationDate="2019-02-19T12:05:40.507" Score="1" ViewCount="234" Body="&lt;p&gt;So I had my students go to &lt;a href=&quot;http://www.nodejs.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;NodeJS.org&lt;/a&gt; to download Node.js, and they did it with no problems. Two days later, I had them go to &lt;a href=&quot;http://www.nodejs.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;NodeJS.org&lt;/a&gt; again, but none of us could access the site, not even from the designated &quot;teacher's computer&quot; of the classroom I was using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However my laptop, which was connected to the school's wireless service for teachers, could still access the site. I'm assuming classroom computers and the school wireless are on separate networks. Could this mean that the anti-&lt;a href=&quot;https://en.wikipedia.org/wiki/Denial-of-service_attack&quot; rel=&quot;nofollow noreferrer&quot;&gt;DDos&lt;/a&gt; system at &lt;a href=&quot;http://www.nodejs.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;NodeJS.org&lt;/a&gt; basically mistook us for a potential &lt;a href=&quot;https://en.wikipedia.org/wiki/Denial-of-service_attack&quot; rel=&quot;nofollow noreferrer&quot;&gt;DDoS&lt;/a&gt; and blocked us? There were about 20 students. A week later we could access the site again.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm just wondering if anyone else experienced anything like this? &lt;/p&gt;&#xA;" OwnerUserId="6591" LastEditorUserId="5296" LastEditDate="2019-02-22T15:12:01.530" LastActivityDate="2019-03-18T14:41:35.870" Title="Do some websites block school building/classroom IP networks because they mistake us for possible DDOS?" Tags="|classroom-infrastructure|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5434" PostTypeId="2" ParentId="5417" CreationDate="2019-02-19T15:40:17.277" Score="8" Body="&lt;p&gt;I came out of college with a fresh CS degree in 1989, to find that my colleagues were on average very much older than me (obviously), had by-and-large never heard any of the fancy &quot;structured programming&quot; lingo that was taught in my software engineering course at the time, and in fact mostly didn't even have CS degrees themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Three decades later, the shoe's on the other foot. Our fresh-out-of-school new hires like to talk a lot in pattern lingo that didn't exist in the 1980s, and most of which honestly doesn't need to exist today. 20 years from now it will be a new fad, with new lingo.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So no, I wouldn't worry about it too much. Other than your younger co-workers, not having memorized the pattern lingo isn't going to hamstring you in the field a whole lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But are there fundamental things that come along with Design Patterns that you really need to know as a professional? I'd say the results there are mixed. Let's look at the tables from the &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_design_pattern#Classification_and_list&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia page on patterns&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the &quot;Concurrency Patterns&quot; table, pretty much everything in there is standard concurrency programming, that I learned in school 30 years about without benefit of the GoF lingo. Outside of that, I see about six things in all the other tables that I can say I've used over the years, when needed, but it's all just pedestrian stuff. If you have half a brain, you'd figure that out yourself if you ever need to. However, there are two exceptions: &lt;a href=&quot;https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization&quot; rel=&quot;nofollow noreferrer&quot;&gt;RAII&lt;/a&gt; and Singletons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;RAII is such a powerful concept and central concept, that it really should be taught. The peace of mind from not having to worry about dynamic resource lifetimes is one of the real game-changers that happened during my career. However, I'm not sure I'd call it a &quot;pattern&quot;. Design Patterns and Code Complete seem to agree, because they don't include it. This should definitely be taught, but I don't think you need the overall &quot;pattern&quot; structure around it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Singletons are just an object-oriented hack to get yourself globals, and &lt;a href=&quot;https://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons&quot;&gt;should almost never be used&lt;/a&gt;. If they are taught at all in school, it should be as an anti-pattern to avoid, along with gotos. Yet both &lt;em&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Design_Patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Design Patterns&lt;/a&gt;&lt;/em&gt; and &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Code_Complete&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code Complete&lt;/a&gt;&lt;/em&gt; positively teach them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So no, I wouldn't worry about your software engineering class not being pattern-focused. You can get by just fine without them.&lt;/p&gt;&#xA;" OwnerUserId="1139" LastEditorUserId="1314" LastEditDate="2019-03-13T23:05:42.937" LastActivityDate="2019-03-13T23:05:42.937" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="5435" PostTypeId="2" ParentId="5433" CreationDate="2019-02-19T16:28:08.477" Score="2" Body="&lt;p&gt;I've had it go the other way...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Website (self hosted Moodle) worked while we set it up. Worked fine first period. Something got triggered on the school network and decided that too many students were going to the site so it got blocked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same as you I could still get to it from my computer, but students couldn't. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-02-19T16:28:08.477" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5436" PostTypeId="2" ParentId="5417" CreationDate="2019-02-19T20:21:36.103" Score="2" Body="&lt;p&gt;I wouldn't worry to much about it. My CS program at Arizona State University (circa 2010) only had Design Patters as an elective class. I knew plenty of people who never took it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this comes down to the difference between &quot;Computer Science&quot; and &quot;Software Engineering&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science focuses more on the theoretical side of things (algorithms, mathematical models of computing, how operating systems and compilers work, etc). It's stuff you don't directly use very often, but gives you the foundation to do any type computer work you want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software Engineering, on the other hand, is &quot;how to make stuff&quot;. It answers questions of &quot;How do I design the software I'm creating?&quot;, &quot;How can teams of programmers best work together?&quot;, &quot;How can engineering teams best work with non-engineers?&quot;, etc. It's more about the big picture view of how to make software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS programs generally don't spend much time on all the engineering stuff. There are so many things to learn about programming and software engineering that there is no way any university program could cover a sizable fraction of it. So they focus on the theory that will help you learn the rest on your own or as you work in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll say this much about my experience: Even though I did take the design patterns elective at my school, it was only quick intro. It took years working before I felt like I started to get a handle of why, when, and how to use them well. And I still feel like I have a long way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So as I said, don't worry to much about it. Get yourself a decent reference book, skim through it just to get a feel for what patterns are out there, and then be mindful of them as you go to work as an engineer. You'll figure it out as you go along.&lt;/p&gt;&#xA;" OwnerUserId="6598" LastActivityDate="2019-02-19T20:21:36.103" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5437" PostTypeId="2" ParentId="5417" CreationDate="2019-02-19T22:44:33.823" Score="4" Body="&lt;p&gt;There isn't that much to &quot;Teach&quot; about design patterns.  You should be able to skim one of the books in a few hours and possibly try to implement a few yourself if they confuse you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the most part design patterns make up for deficiencies in languages or patterns.  For instance, in OO it is pretty much impossible to connect from two different &quot;Entry Point&quot; objects to a shared object, so we use the singleton pattern.  A better solution is to use Spring (Which is more like enhancing your language to solve the problem) and then we no longer need a Singleton &quot;Design Pattern&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were using a perfect programming language you shouldn't honestly NEED any patterns (Any pattern in your code is, in essence, not DRY).  Design patterns are used for something that cannot be directly expressed in your language and is either too simple or too messy to put into a library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We don't have a perfect language so we still make use of patterns. Reading about patterns isn't difficult and will give you a common language to use with your team.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose if I were teaching computer science I'd require a pattern book and suggest it be read, maybe test on it, but I don't think I'd waste much class time on it.&lt;/p&gt;&#xA;" OwnerUserId="1399" LastEditorUserId="1399" LastEditDate="2019-02-20T00:10:58.343" LastActivityDate="2019-02-20T00:10:58.343" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5438" PostTypeId="2" ParentId="5417" CreationDate="2019-02-20T01:20:11.433" Score="3" Body="&lt;p&gt;Computer Science and Software Engineering are very related but also different disciplines. When I went through my degree (ABET accredited program, US) Software Engineering was an elective (as it is &lt;em&gt;absolutely&lt;/em&gt; not necessary to be a good computer scientist - though some may disagree), and in that class you learned design patterns. We would joke these were the &quot;trade school&quot; electives for CS graduates because if you took them you were probably going straight to industry. I took them, I went straight into industry. I took 4 programming-oriented classes in total. Two in the beginning to get your familar with the common language, and two at the end (the SE classes). Everything in the middle was pen and paper mathematics, algorithms, data structures, and compilers. Yes, many things were &lt;em&gt;implemented&lt;/em&gt; in software. But it was not the &lt;em&gt;central theme&lt;/em&gt; of the class. To me, design patterns are trivia that you can pick up on the job. A class is just a nice way to get started. I learned everything being a professional software engineer. In hindsight, the classes were outdated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You are also vastly overestimating the complexity of academic code. Yes, sometimes it can get very hairy but take a stroll around arxiv. Can you name 10 papers that would be improved by knowing the Gang of Four book cover to cover? Doubtful. Proof of concept code is exactly that - it's a proof of concept. It's up to software engineers to grok it and make it beautiful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is so much more to Computer Science than software engineering. There are so many sub fields and software engineering is just one very very tiny one. Equating software engineering with the entire field of Computer Science is more-or-less the result of code schools being so prevalent (in my opinion). We (as a field) should really work to dispel this myth.&lt;/p&gt;&#xA;" OwnerUserId="6602" LastActivityDate="2019-02-20T01:20:11.433" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5439" PostTypeId="2" ParentId="5433" CreationDate="2019-02-20T16:15:25.663" Score="3" Body="&lt;p&gt;Yes.  I have a web development class.  If more than 5 people connect to the free hosting site, it stops anyone else from connecting via FTP, since we appear to all have the same IP address.  Multiple connections from the same site can be a script running, and most users will not appear to have multiple connections.&#xA;I do: Demo using the FTP client, go through some of the issues with connecting (error messages etc.) and then, because of this restriction, I will either:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Manage the class in groups (if a small class) or&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Give them a task (ftp their site) to perform at home for review at the next class&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is annoying, but as indicated above, it is likely to detect DOS or other malevolent connections.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="104" LastEditDate="2019-03-18T14:41:35.870" LastActivityDate="2019-03-18T14:41:35.870" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5442" PostTypeId="2" ParentId="1299" CreationDate="2019-02-26T23:29:44.283" Score="-3" Body="&lt;p&gt;As far as I know, the word Function does not have a different meaning in mathematics and computers.  To compute is to do mathematics, and all a computer does is compute functions - nothing more.  Functions (and yes, that includes subroutines) in computers are functions in mathematics, period.  They may be functions of other functions, and so on, but they are nonetheless functions, and that is, by definition, all they are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If there has been some confusion among your students in your teaching of the word Function, can you consider the possibility that your students are confused because you are teaching them the exact opposite of what is in fact true?&lt;/p&gt;&#xA;" OwnerUserId="6669" LastActivityDate="2019-02-26T23:29:44.283" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5443" PostTypeId="2" ParentId="4717" CreationDate="2019-02-27T00:06:39.997" Score="1" Body="&lt;p&gt;For starters, there is no such thing as an &quot;Intro CS in Java&quot; course, and the word Interface would never come up in such a course anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;Computer Science&quot; means using computers to solve problems.  Nevermind the fact that Java would never have made it out of the gate were it not for being named after a drink we are all addicted to.  Problem solving has nothing to do with Java, and a weighty language like Java has no place in an Intro class, unless your school is pandering to corporations, or Mao Tse Deng has designed your CS program to go from Freshman to Ph.D in three years.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Intro to CS students should be learning about assignment statements, conditional statements, writing small swap functions, learning about basic loops, memory allocation, and then recursion, fractals, string types, and then toward the end, some more interesting and complex functions and a little bigger programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since Java is garbage collected, and its syntax doesn't represent machine code instructions, there is no place for it in an Intro to CS class, or any CS class really.  This is a science class, not a syntax class.  Use C.  If your students are asking about interfaces, then you are doing something very seriously wrong in your intro class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, regarding lying, I don't know if you are a foreign teacher or not, but it's an extremely strange question in the West.  A teacher should NEVER LIE to a student to any degree and for ANY reason.  A student in a classroom is essentially in a hypnotic state of &lt;em&gt;a priori&lt;/em&gt; belief in your authority as the true instruction.  Your students will take your lie, or stretching of the truth, at face value, and will cherish that belief FOREVER.  Most humans hold their beliefs not because they make sense, but because that was the first believe introduced to them on a subject.  Very few people every reach logical escape velocity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By lying, you will destroy the credibility of your colleagues and any future teacher (who does NOT lie) who will teach that student correctly, and thus will contribute in a very dangerous way to the breakdown of the pillars of civil society itself, which rest on the first principal of integrity.&lt;/p&gt;&#xA;" OwnerUserId="6669" LastEditorUserId="27" LastEditDate="2019-03-02T18:40:43.207" LastActivityDate="2019-03-02T18:40:43.207" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5444" PostTypeId="2" ParentId="4515" CreationDate="2019-02-27T00:36:37.983" Score="-2" Body="&lt;p&gt;philipxy's comment is correct.  There is one true language: mathematics.  Just explain what you are doing to your students, without using &lt;em&gt;any&lt;/em&gt; computer language.  If it's confusing them in one language, why double the confusion, rather than eliminate it altogether?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Except for maybe a small example here or there, the answer is No, you should not be venturing into procedural programming (I assume that's what you mean when you say C#) when teaching a functional programming class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are only two programming paradigms: functional and procedural.  (And no, OO is not one of them.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;strong&gt;purpose&lt;/strong&gt; of teaching functional programming is to teach students to think in terms of building a circuit, that is, a black box function of other black box functions, &lt;strong&gt;without state&lt;/strong&gt; (otherwise known as global variables), and also to teach complex recursion (again without state).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of eliminating state is to teach students that a computer program is nothing more than just one big function, and that's it.&lt;/p&gt;&#xA;" OwnerUserId="6669" LastEditorUserId="27" LastEditDate="2019-02-27T03:37:04.507" LastActivityDate="2019-02-27T03:37:04.507" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5445" PostTypeId="1" CreationDate="2019-02-27T21:17:16.987" Score="3" ViewCount="1339" Body="&lt;p&gt;I am growing suspects that the ubiquitous analogy between algorithms and recipes be not so well founded, especially for theoretically oriented students. I am wondering if this may contribute to the evidence of students having difficulties with even simple loops. I believe that bad analogies make more harm than no analogies, so I ask.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My wondering is that recipes, if superficially similar to the idea of sequential steps, do not really &lt;em&gt;encode the logic&lt;/em&gt; that is sought to be explained: the logic of state transitions.&#xA;Of course there are state transitions in recipes, but i do not feel they being the &lt;em&gt;characterising properties&lt;/em&gt;, nor are they the &lt;em&gt;target of attention&lt;/em&gt; (I also like cooking). State transitions in recipes (and similar physical operations analogies) seem to be not even caused by the &quot;program&quot; but just happening because of physics. And typically what we get from students struggles is exactly their inability to follow (or design) state transitions. Probably because a fundamental property of a real computer program is that of being the acting cause and not the observer of state transitions, and this is not captured by the analogy. Another issue is that computing systems are typically discrete while physical analogies tend to be continuous, both in time and measured (variables) dimensions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What screams for attention in recipes are instead &quot;data&quot; dependency constraints (cannot throw in the spaghetti before the water boils), or a kind of &quot;event-driven&quot; situation, and i do not recall seeing students struggling with data dependencies, which might be because 1. the recipe analogy is good in teaching them or (I suspect more probably) 2. it's not what they need help for: data dependencies being more innate than state transitions, especially in a forcefully sequential environment (of course this is a hypothesis, any experiments known?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On a more concrete side it seems to me that the real world software counterpart of recipes are those things that we usually call scripts: something I love and had made a lot of and which I know perfectly fit their niche problems, but not something that is known for exposing nice theoretical properties, which, I suspect, is what matters more when learning, in order to build a clear mental model of algorithms (and because my pupils are generic science students and not specialist computer developers).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Realistic programs, and especially subprograms if we want to divide et impera, are not sequences of operations but sequences of state transitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think of this analysis? Have any empirical data? Does an analogy that takes more care of state transitions exist and I have missed it?&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2019-03-06T16:14:35.580" Title="Is the algorithm-recipe analogy a good or a bad one?" Tags="|teaching-analogy|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5446" PostTypeId="2" ParentId="5445" CreationDate="2019-02-27T21:30:40.347" Score="5" Body="&lt;p&gt;Actually, you are loading a metaphor/analogy with too much import and influence. An analogy isn't supposed to be &lt;em&gt;exactly the same thing&lt;/em&gt; as the thing of which it is an analogy. It is only supposed to be similar to that thing &lt;em&gt;in some way&lt;/em&gt;. But not in all ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Analogies and metaphors in teaching computing are intended only to overcome the initial static inertia caused when a student has no idea whatever about a concept. To use it well, you need to do a couple of things, one of which is to move away from it as soon as is possible. But the more important thing is to be aware of how the analogy fails to &lt;em&gt;be&lt;/em&gt; the thing analogized and to watch for misconceptions in the student's mind that are actually induced by the analogy itself. You then need to give a correcting lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can analogize loops with cooking recipes as: stir the sauce until it thickens. This isn't an algorithm, of course, since it has undefined terms, especially in the stopping condition. If that gives the students a quick mental picture of repetition then fine. But if they put too much weight on &quot;stir&quot; or think that an imprecise stopping condition is normal in programming, then I need to make a correction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes that correction is with another, better analogy, but usually it is just a more precise and technical discussion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't put so much weight on any given metaphor. Use it to introduce concepts but know when it fails and make corrections for those (hopefully few) students who draw the wrong conclusion. You can thus avoid being overly detailed and pedantic, losing students in the interactions between all of the small bits that go into anything complex. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I've been told that professional bakers follow their recipes more faithfully than professional chefs do. More careful measuring, for example. But even bakers have to deviate as the flour they use can vary in moisture content, requiring adjustments. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-02-27T21:36:58.277" LastActivityDate="2019-02-27T21:36:58.277" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5447" PostTypeId="2" ParentId="5445" CreationDate="2019-02-28T19:37:25.893" Score="1" Body="&lt;p&gt;I think the analogy holds up rather well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, a program is a text and so is a recipe: they are both texts.&amp;nbsp; A text can be read, shared, and edited.&amp;nbsp; The recipe is typically meant to be followed &amp;amp; executed by a human whereas the program is meant to be followed &amp;amp; executed by computer language.&amp;nbsp; Both are meant to be read and updated, refined, adjusted, maintained by humans.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, a text can be analyzed, for, as you point out, state transitions, and perhaps steps or operations that accomplish those transitions.&amp;nbsp; The recipe starts with raw ingredients and forms them into finished product, whereas the program consumes input and turns that into desired output.&amp;nbsp; Both share the concept of intermediate results that are in turn used to produce the results for the next step and finally the finished product.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For another, a text can be analyzed for logical errors, which applies to both recipes and programs: a recipe might have typos; a recipe may suggest doing something in an order that is physically impossible &amp;#8212; computer programming has these errors as well.&amp;nbsp; If you post your recipe online you might get feedback on how well it works and what can be adjusted.&amp;nbsp; A code review is similar, though in programming we also have the automated feedback from the compiler or interpreter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Recipes and programs can both be tested.&amp;nbsp; The both allow some variation of inputs and outputs, as well as introducing a notion of acceptable inputs and acceptable outputs.&amp;nbsp; Sometimes these things go unstated, other times, formally stated (a souffle should stand and not fall, a program should produce certain results).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As @Buffy is saying you can take the analogy further in that recipes can have conditional steps as well as repetitive sections.&amp;nbsp; Recipes can even have formulas (e.g. for every 1000 feet in altitude, boil another 3 min).&lt;/p&gt;&#xA;" OwnerUserId="3799" LastEditorUserId="3799" LastEditDate="2019-02-28T20:07:23.197" LastActivityDate="2019-02-28T20:07:23.197" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5448" PostTypeId="1" CreationDate="2019-03-06T01:01:35.090" Score="12" ViewCount="340" Body="&lt;p&gt;I have been appointed to change the contents of an Operating Systems course, because it was too IT oriented. I mean the lectures were oriented only to know the differences between some OS like Windows, Linux or Unix. From my perspective, and considering the recommendations of the ACM Computing Curricula, I believe that the course should include some hands-on programming in the development of some parts of an operating system. The problems that I am currently facing are the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The students that I will teach they had only an introductory Python course, so I was planning to teach some C at the beginning of the term.&lt;/li&gt;&#xA;&lt;li&gt;I remember that in the old-good days with the use of floppy disks it was &quot;fun&quot; to give a skeleton of an OS for the students to modify and that it could boot on a computer. How can I emulate the same behavior in modern computers?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Actually, are there any kind of emulators or tools that could help the student to learn the concepts of OS by using some C programming? I do not want them to become experts in the field of OS, but at least that they do know what is happening inside an OS and not see it like a black box.&lt;/p&gt;&#xA;" OwnerUserId="4161" LastEditorUserId="793" LastEditDate="2019-03-08T16:08:45.750" LastActivityDate="2019-03-21T03:33:31.890" Title="How to teach operating systems development nowadays?" Tags="|operating-systems|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5449" PostTypeId="2" ParentId="5448" CreationDate="2019-03-06T13:19:03.473" Score="3" Body="&lt;p&gt;There are two standard texts that have stood the test of time. Both are fairly deep:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1498712436&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;XINU&lt;/a&gt; shows how to build an OS that externally resembles UNIX, but isn't (XINU = Xinu Is Not Unix), using a microkernel architecture (unlike Linux). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1118063333&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Operating Systems Concepts&lt;/a&gt; is more of an overview of OS concepts and how they interrelate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first book can be used if you want students to do a lot of programming and experimentation. The second if you are more interested in concepts with less programming. The second can also be used more as a reference backing up your own lectures and course outline. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both have been updated recently, though earlier editions are classics. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-03-06T13:19:03.473" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5450" PostTypeId="2" ParentId="5445" CreationDate="2019-03-06T16:14:35.580" Score="5" Body="&lt;p&gt;I have never been a professional educator for computer programming at the very beginner level, but I have used the &quot;recipe&quot; analogy in a lot of situations where I am not acting as a formal educator.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I flavor (see what I did there) the analogy, by describing the computer as the absolutely most simple-minded assistant cook that you can possibly imagine. So if you want a cup of sliced carrots, you have to tell them how to slice a carrot, how to know when they have sliced enough, and tell them to keep slicing carrots till they have enough. &lt;/p&gt;&#xA;" OwnerUserId="6699" LastActivityDate="2019-03-06T16:14:35.580" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5451" PostTypeId="1" AcceptedAnswerId="5468" CreationDate="2019-03-07T14:59:50.847" Score="5" ViewCount="662" Body="&lt;p&gt;I'm becoming more and more convinced that starting with an imperative attitude is not doing a favor to the students, especially if it's all about scheduling and repeating some &lt;code&gt;scanf&lt;/code&gt; and &lt;code&gt;printf&lt;/code&gt; in loops. I ignore if this teaching technique has any systematic treatment or evidence of efficacy. To me it seems that it produces students unable to process data, as I'll explain soon.&lt;/p&gt;&#xA;&lt;p&gt;I have a class of students who show the following features, for which I'm unable to find a good framework besides listing them (but perfectly and angrily knowing where they come from):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;They are convinced that &lt;code&gt;for (i=0; i&amp;lt;5; i++) return i&lt;/code&gt; is going to return 5 results. They are obviously so much confused in thinking that they're doing a minor variation of &lt;code&gt;for (i=0; i&amp;lt;5; i++) printf(&amp;quot;%d\n&amp;quot;, i)&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Given a function that needs X as input they constantly point out to me that somewhere in the first lines we need to read X from somewhere, they just ignore that we can add another argument as needed.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;They cannot trace the execution of a for loop, they don't check the loop condition: to them it's just &amp;quot;I do the body N times&amp;quot;, I don't yet know what do they think of the index used in the loop besides that it magically happens to take the values 0..N-1.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I'm on the edge of despair. Just showing them how I'd do something and explaining its operational interpretation obviously doesn't work, they even show a sort of resistance to abandon this method of doing any imaginable thing just by throwing &lt;code&gt;scanf&lt;/code&gt;'s and &lt;code&gt;printf&lt;/code&gt;'s around. Do you have any suggestions for better framing their difficulties, or any examples that might be illuminating in this situation?&lt;/p&gt;&#xA;&lt;p&gt;I am finding incredibly difficult to produce some wrong code that might appear correct in their eyes and could possibly shock them and making them understand that things are a bit different from what they believe. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6546" LastEditorUserId="204" LastEditDate="2022-04-13T22:53:20.530" LastActivityDate="2022-04-13T23:01:47.670" Title="Examples of innocent looking faulty code for shock effect" Tags="|lesson-ideas|code-example|" AnswerCount="6" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5452" PostTypeId="2" ParentId="5451" CreationDate="2019-03-07T21:58:44.553" Score="6" Body="&lt;p&gt;My advice to all of these problems is the same. Your students do not know how to draw out memory. This is a basic technique that most people who have been programming for a while do mentally, but that nearly all students need to be explicitly taught and shown on paper. &lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How to Draw Memory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is a good chance that you have seen something like this before. Maybe when you were learning to program, or maybe when watching another instructor teach a beginner class. Drawing memory is about physically (with pencil or chalk) drawing a diagram of the state of the program's memory. For beginner programmers, some things are typically abstracted away, such as the idea of a register and the specifics about how memory is loaded and stored.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am going to create a short video tutorial, showing how I personally draw memory, including how I draw loops and functions, but here are some basics in text form:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Variable is declared =&gt; I write the name of the variable and draw a box with a slash through it to signal that it is Null.&lt;/li&gt;&#xA;&lt;li&gt;The Variable is defined =&gt; I erase the slash and write the value in the box. If the variable is ever reassigned, the value is erased, and the new value is written in its place.&lt;/li&gt;&#xA;&lt;li&gt;The Variable is a pointer =&gt; the box contains an arrow to another, larger box that holds the data.&lt;/li&gt;&#xA;&lt;li&gt;Loop =&gt; I draw loops (and other smaller scope constructs) as circles or &quot;bubbles.&quot; At the top are the condition and an iterator value if it's a for loop (the iterator value is drawn like any other variable). An arrow points from the bottom of the loop to the condition. All locally scoped values are drawn inside the circle, and the whole thing is erased once the loop finishes.&lt;/li&gt;&#xA;&lt;li&gt;Function =&gt; I draw functions as large blocks. At the very top, any parameter values are placed in their own box that is linked with an arrow. All locally scoped values, loops, etc. are drawn inside the function block, and the output is linked to the bottom of the box. I typically do not erase function boxes since they are likely to be used again, but you can if you wish.&lt;/li&gt;&#xA;&lt;li&gt;Print Statements =&gt; I find it helpful to have a three-board view when drawing memory. One display contains the code, which we will go through line-by-line. The next display contains my drawing, an abstract representation of what the program &quot;knows.&quot; The third contains the text output. This helps students visualize the distinction between what is happening and what is displayed to the console.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;How to Teach Drawing Memory&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;In lecture, you should draw memory constantly. Any time you review what a piece of code does, you should draw it out with and for your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since your students already sort-of know some basics, you will likely need to go back and explicitly teach them how to draw. Talk to them about why it's important to understand what the program knows at any given time and how it flows through lines of code, and ask them to brainstorm some ways to keep track of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, show them the basics for a very simple program that they understand. Something that declares and defines two variables and uses an if statement. Have them practice the drawing structure in small groups or pairs on a slightly different problem. Switch gears back to your normal lecture topic. The next lecture, have your students tell you how to draw yet another variant on the same few lines of code. If they can do that, introduce the next drawing construct, maybe a while loop. Repeat this slow and methodical process over the course of several lectures until your students are able to draw anything they can code. Then, when you introduce a new concept, you should show them how to draw and visualize it as part of the initial learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is to make drawing second nature so that they do it when they hit a bug or look at code that is not their own. Tell them that eventually, they will be good enough at drawing that they can do it in their heads, but that for now, they should always do it on paper or a board so that they can practice. Until they are at least intermediate programmers, you should encourage or even mandate that your students draw the state of memory every time they approach a problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you teach them this important skill, you should have them practice on code that works and on code that does not work. Give them something with a bug- a one-off error, or a logical issue. Tell them to draw it out or do it with them on the board. Once they are done, ask them to tell you what the issue is and how to fix it. Have them draw it again once it's fixed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they know how to draw, you can ask them to do so in all sorts of situations. Put it on a quiz or test. Require a memory drawing before helping with a bug in their projects. Make sure your TAs do the same. Have them continue to draw memory during class, and encourage them to draw out tricky parts of assignments as they work on them.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;How Drawing Solves Your Students' Confusion&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;You gave three specific examples of holes in understanding. Drawing solves all three.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;They are convinced that for (i=0; i&amp;lt;5; i++) return i is going to return 5 results. They are obviously so much confused in thinking that they're doing a minor variation of for (i=0; i&amp;lt;5; i++) printf(&quot;%d\n&quot;, i).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A drawing of a function only has one return value, and it is at the bottom. They will see clearly that once a value is returned, the function is over. Since they won't reach the return statement until the end, they will return once, the final value of i. Due to erasing past values, they will only see the most recent assignment.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Given a function that needs X as input they constantly point out to me that somewhere in the first lines we need to read X from somewhere, they just ignore that we can add another argument as needed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A drawing of a function has input values included. In practicing drawing, you will demonstrate that those inputs can be used as defined variables.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;They cannot trace the execution of a for loop, they don't check the loop condition: to them it's just &quot;I do the body N times&quot;, I don't yet know what do they think of the index used in the loop besides that it magically happens to take the values 0..N-1.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Drawing the loop involves updating the iterator each time through. They will never forget again after drawing out a loop that updates 10+ times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this helps, I will try to upload a rough video tutorial in the next few days and will update my answer with a link.&lt;/p&gt;&#xA;" OwnerUserId="6308" LastActivityDate="2019-03-07T21:58:44.553" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5453" PostTypeId="2" ParentId="5451" CreationDate="2019-03-07T22:57:02.960" Score="4" Body="&lt;p&gt;I recognize the feeling of despair!  However, I don't think that you want what you are asking for.  The most shocking bit of code that I know to show students is the code I wrote up &lt;a href=&quot;https://stackoverflow.com/questions/27308336/an-interesting-bit-of-reflective-code-in-java&quot;&gt;here&lt;/a&gt;.  Beware, it's quite strange!  If you want a bit of fun, don't look at my explanations.  Just copy the code into an IDE, look it over, make a guess about what it will do, and run it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;I don't think that this will help you with your students, however!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;What you're pointing to are what I call &amp;quot;cognitive traps&amp;quot;, and they must be addressed very specifically during instruction.  You're already on the right track in that you are spotting them, but I don't think you'll make a lot of headway trying to find a single, unified solution.&lt;/p&gt;&#xA;&lt;h1&gt;The problem with being an expert&lt;/h1&gt;&#xA;&lt;p&gt;There is no one key understanding that will, for a novice, unify everything into a sensible framework.&lt;/p&gt;&#xA;&lt;p&gt;There's actually a reason for this, which I previously wrote about in my answer &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5403/students-seem-to-be-unable-to-use-code-to-express-their-ideas-is-the-teaching-m/5429#5429&quot;&gt;here&lt;/a&gt;. In essence, overarching frameworks are the toolsets of experts.  Factoids and small systems are the toolsets of novices.  The way that novices become experts is typically by learning a set of small systems, and then in later revisitings, seeing how they are actually similar ideas.&lt;/p&gt;&#xA;&lt;p&gt;Experts often wish to teach novices to see the big system, and show how all of the smaller systems operate under the same principles.  If we could only get them to think about it the way we do, they would be able to work so fluidly!  Principle to small systems is a top-down method of learning.&lt;/p&gt;&#xA;&lt;p&gt;An alternative is to move bottom up: here, look at these three, apparently separate ideas.  Now, let's link them together!  While I am very impressed with @GreenGriffin's answer, I believe that this is the approach that they are taking here.&lt;/p&gt;&#xA;&lt;p&gt;I would contend (and I know that our top user, Buffy, has also said this many times) that when we learn deeply, we actually do it in a spiral: we revisit an idea many times, each time enriching it by linking it to other ideas.  This fits nicely with our current understanding of &lt;a href=&quot;https://www.nap.edu/read/9853/chapter/8&quot; rel=&quot;nofollow noreferrer&quot;&gt;learning in the brain&lt;/a&gt;, in which information is physically structured within the brain as a pattern of interconnected neurons, and new information is learned by linking new ideas to old ones that we have already mastered.&lt;/p&gt;&#xA;&lt;h1&gt;Getting practical&lt;/h1&gt;&#xA;&lt;p&gt;So, what's a teacher to do?  First, with regards to the three very specific things you've mentioned, explicitly call attention to them when you are presenting function calls and loops.  They are traps that students can fall into, and you want to head them off at the pass.  Give them a chance to practice doing it correctly immediately, and demonstrate what happens when they do it wrong.  The longer you teach, the more such traps you'll discover and can thus help student avoid.  That's part of becoming a better teacher.&lt;/p&gt;&#xA;&lt;p&gt;And as for the large systems, revisit older ideas and keep linking them to new ideas as you teach them.  Ask students to reflect directly on how this idea and that idea are similar.  Ask students to make a drawing of how a loop iterator actually operates.  The more that we help students link ideas together, the more abstractly they'll be able to work.&lt;/p&gt;&#xA;&lt;p&gt;It's not a lightning-fast quick fix, but you will see improvement if you keep making improvements!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-03-07T22:57:02.960" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5454" PostTypeId="2" ParentId="5451" CreationDate="2019-03-08T21:27:31.720" Score="1" Body="&lt;p&gt;I, too, will give a somewhat orthogonal answer to your quest. I would suggest that you find a way to incorporate unit testing into your Java based course with Unit. You can give them tests or require that they write tests. You can require an explanation of them when tests fail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you incorporate testing deeply into your teaching and requirements (&lt;a href=&quot;https://en.wikipedia.org/wiki/Test-driven_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;Test First - Test Driven Development&lt;/a&gt;) these sorts of misconceptions should start to disappear. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you demonstrate code to your class live with some projection equipment you can demonstrate such things to good effect. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-03-08T21:27:31.720" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5455" PostTypeId="2" ParentId="5448" CreationDate="2019-03-09T11:48:57.873" Score="3" Body="&lt;p&gt;First I would recommend to start by using an operating system, such as Gnu (&lt;a href=&quot;https://www.debian.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Debian&lt;/a&gt; etc), but any Unix will do. Most people have not used an OS: Most people just run applications, but don't interact with the OS. Microsoft's Windows, does not provide anything much to interact with (a file manager, and some config tools). It is mostly just a platform to write stand-alone applications.&lt;/p&gt;&#xA;&lt;p&gt;Implementing, threading, memory management, etc. without having used them, will be a very abstract activity. Pupils will see the complexity, without seeing the use.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, do this after&#xA;writing non-kernel parts of the OS. e.g. re-implement &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, etc.  in python.&#xA;(In first year of Uni we did this in C. But I thing that python will be easier, and nothing will be lost.)&lt;/p&gt;&#xA;&lt;p&gt;You could even implement a shell, and/or play with &lt;code&gt;exec&lt;/code&gt; and &lt;code&gt;fork&lt;/code&gt;. e.g.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;#!/usr/bin/python3&#xA;&#xA;import os&#xA;stdout_id=1&#xA;&#xA;pipe_out,pipe_in = os.pipe()&#xA;print (&amp;quot;pipe is: &amp;quot;,(pipe_in,pipe_out))&#xA;&#xA;pid=os.fork()&#xA;print(&amp;quot;forked&amp;quot;)&#xA;&#xA;if pid&amp;lt;0:&#xA;    print (&amp;quot;fork error&amp;quot;)&#xA;    exit()&#xA;elif pid == 0:&#xA;    print (&amp;quot;I am child:&amp;quot;, str(os.getpid()))&#xA;    os.close(pipe_out)&#xA;    del pipe_out&#xA;    os.write(pipe_in,b&amp;quot;hello1&amp;quot;)&#xA;    #pipe=os.fdopen(pipe_in,&amp;quot;w&amp;quot;)&#xA;    #pipe.write(&amp;quot;hello2&amp;quot;)&#xA;    #os.write(pipe_in,&amp;quot;hello3&amp;quot;)&#xA;    #exit()&#xA;    #pipe.flush()&#xA;    #os.write(pipe_in,b&amp;quot;world&amp;quot;)&#xA;    #os.dup2(pipe_in,stdout_id)&#xA;    #os.execvp(&amp;quot;ls&amp;quot;,(&amp;quot;ls&amp;quot;,&amp;quot;-l&amp;quot;))&#xA;    print(&amp;quot;child here again&amp;quot;)&#xA;else:&#xA;    print (&amp;quot;I am parent:&amp;quot;, str(os.getpid()))&#xA;    print (&amp;quot;parent: child's pid=&amp;quot;+str(pid))&#xA;    os.close(pipe_in)&#xA;    del pipe_in&#xA;    pipe=os.fdopen(pipe_out,&amp;quot;r&amp;quot;)&#xA;    for l in pipe:&#xA;        print(&amp;quot;parent recieved: &amp;quot;, l )&#xA;&#xA;print( &amp;quot;done: &amp;quot;+str(os.getpid()))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can play with this code, by selectively removing &lt;code&gt;#&lt;/code&gt;s.&#xA;This will probably not run on Microsoft's Windows (It may in WSL).&lt;/p&gt;&#xA;&lt;p&gt;“are there any kind of emulators or tools that could help…?”&lt;/p&gt;&#xA;&lt;p&gt;If you don't have some sort of Unix on you computer (Gnu/Linux, BSD, UNIX, MacOS, WSL), then you can install Gnu/Linux inside Virtual Box.&lt;/p&gt;&#xA;&lt;h1&gt;On writing the kernel&lt;/h1&gt;&#xA;&lt;p&gt;Do this last. Choose a good architecture (x86 is a mess, ARM is easier). The raspberry-pi is a cheep (≈£30 + box + power + SD card) computer that uses the ARM CPU. You will also have to do parts of the kernel in assembler: The dispatcher (part of the thread scheduler), and parts of the Memory Manager, can not be done in C.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-03-09T15:06:33.427" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5456" PostTypeId="1" CreationDate="2019-03-12T10:48:38.613" Score="2" ViewCount="185" Body="&lt;p&gt;I'm going to teach using the well known drawing turtle, with one developed by me to fit my students, so in case it can also be modified. It features drawing movement, non-drawing movement and pen color change.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main goal is letting them have a strong visual feedback and appreciate the decomposition of complex movements. I have some examples that use functions to represent &quot;subtasks&quot; and repetitions to generate nice drawings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm anyway a bit stuck here, say at the visual artist stage, I'd like to show them the use of a while kind of loop instead of a statically limited for, but I don't have good ideas besides using the &quot;while&quot; condition to stop some recursion based for example on the next step length (imagine drawing a spiral with increasing step length and wanting to halt at some point).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems to me that my main difficulty has to do with the absence of interesting states from the examples, the only one that comes to mind being precisely the use of a step length.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The system also features 2 things.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A stack for saving turtle configurations, you can push the current position and pop it later... Fractals? It seems that those coming to my mind are more easily accessed by recursion than by a stack.&lt;/li&gt;&#xA;&lt;li&gt;The ability to save a user state and access it, it can be used for example to keep a counter that changes when desired and is then used to choose a pen color from a palette. It can contain arbitrary data and the motivation was to use it as an aid for learning about mutating variables.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I anyway seem to not have good ideas for examples to link these tools to actual interesting problems. Any suggestions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can be easily computed by the turtle?&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2020-12-16T18:15:13.007" Title="Turtle examples for loops and variables, or even something else" Tags="|lesson-ideas|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5457" PostTypeId="2" ParentId="5456" CreationDate="2019-03-12T11:06:25.170" Score="1" Body="&lt;p&gt;What your system is missing, actually, seems to be a feedback mechanism in which the turtle can &quot;sense&quot; something about the world it is in. If it, for example, could sense edge walls, then it could use that sense for conditional constructs. In Karel the Robot and its successors (Karel J Robot, Monty Karel, ...) there are a number of things that a robot can sense such as walls and &quot;beepers&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;while (karel.frontIsClear())...&lt;/code&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can have multiple turtles then one turtle sensing something about another is another possibility for feedback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, until you get something like that (sensing about the world) you can probably only write conditional and looping constructs based on stored information in the program itself, such as counters. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-03-12T11:06:25.170" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5458" PostTypeId="2" ParentId="5448" CreationDate="2019-03-12T14:33:06.507" Score="6" Body="&lt;p&gt;Implementing a whole OS may not be the best approach if you want your students to learn operating system concepts. This is specially true if your students are not proficient in C and Assembly, since major parts like booting, context switching and virtual memory need to be coded in Assembly. This might be daunting for students that have experience only with Python.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An alternative approach is presented in &lt;a href=&quot;http://csapp.cs.cmu.edu/&quot; rel=&quot;noreferrer&quot;&gt;Computer Systems: A programmers perspective&lt;/a&gt;. It is a very in depth book, but instead of implementing everything the authors decided to study the System Calls in the POSIX specification as a way to illustrate Operating System Concepts. IMHO it maintains a very good balance between the abstract concepts and their concrete implementations. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-03-12T14:33:06.507" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5459" PostTypeId="2" ParentId="5456" CreationDate="2019-03-12T15:29:44.310" Score="1" Body="&lt;p&gt;I agree with Buffy's fine answer if your imagination is running towards feedback systems. In terms of the ubiquitous turtle, however, there are still a few interesting things you could do off the top of my head.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, having students simply create drawings is already a plus.  Have them draw a face.  Have them draw a car.  Have them draw a face &lt;em&gt;and then draw over it to change its expression&lt;/em&gt;.  (Fill gets a little funny here!)&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Fractals are a wonderful way to illustrate recursion.  No base case is actually strictly necessary in order to get the effect, and you could use the fact that the turtle continue to soldier on long past the point that it matters as a nice motivator for a base case.  Later, when you are determining values prior to displaying them, you can hark back to the turtle to show why you need the base case there as well.  &lt;em&gt;We can't display until the computation ends, so we need to figure out when to &quot;stop the turtle&quot;.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.enchantedlearning.com/math/tally/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tally Marks&lt;/a&gt; are a great way to do unary addition and multiplication, no edge detection required.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For stacks, create a randomized, symmetrical rainbow in which the order of the colors you use at the top of the rainbow must be the same order of colors at the bottom, but reversed.  Something like this:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/HOKWu.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/HOKWu.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-03-12T15:29:44.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5460" PostTypeId="2" ParentId="5257" CreationDate="2019-03-12T17:04:40.457" Score="5" Body="&lt;p&gt;Others have already said well why you shouldn't dismiss the difficulties of your students. I'll address this other portion of the question:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;How can I convince my students that programming is not as difficult as they think?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;By making it easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Easy things are those that conform to our mental models, so every person has easy things different from those of others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, one point working for everyone is that of separating distinct ideas and let them be understood independently, while at the same time making their connections explicit. Of course this is not easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, programming may become difficult because usually all these are presented at the same time, in one big introductory mix:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Purpose and objectives of computing&lt;/li&gt;&#xA;&lt;li&gt;Syntax&lt;/li&gt;&#xA;&lt;li&gt;The specifics of the example problem&lt;/li&gt;&#xA;&lt;li&gt;The solution of the same problem&lt;/li&gt;&#xA;&lt;li&gt;General ideas of computation models: abstract entities not explicitly discussed (which is a rich and complex topic in its own right)&lt;/li&gt;&#xA;&lt;li&gt;Specific ideas of the concretely adopted computation model: the chosen language (mind the distinction between syntax and language)&lt;/li&gt;&#xA;&lt;li&gt;Extra/magic: libraries, various boilerplate stuff we just need to make it work&lt;/li&gt;&#xA;&lt;li&gt;The need for solutions to be generalizable to differing inputs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All these are intertwined. An abstract discourse doesn't make sense without at least one concrete instance. On the other hand a concrete instance might be too complex without its accompanying simplified abstraction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The tools used must also make it easier to actually separate what must be separated, to minimize the unnecessary noise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The less concepts the easier it is to learn, the less your tools demand knowing the easier it will be for the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concrete examples following.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One simple and standalone enough concept is that of function, the result of which is calculated by substituting the variables with the parameter values in an expression. It is a powerful primitive with a solid theory behind it and it is at the heart of the meaning of computation. It also is familiar to the students for their mathematical counterpart: computer science deals with the very concrete point of calculating the result, whereas the mathematical function just denotes it without saying more. It can be imagined on paper. After understanding it can be translated to formal syntax. From there you can build the following steps, being always grounded on something they are already familiar with instead of jumping straight to complex automatons written with curly braces from lesson 0, as they have no previous experience whatsoever with automatons and will not understand them without a concrete model.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How instead to make computer science difficult: I think of those &quot;funny&quot; introductory paragraphs on some books that discuss at length how to put together a strategy for an automaton to be followed to reach a longed for result, often with examples having nothing to do with computations and which no one would approach in such a contrived manner. I have a book with this example of &quot;how to go to sleep the computer scientist way&quot;, the solution is &quot;1. change clothes, 2. wash teeth, 3. enter bed, 4. turn lights off&quot;, wow! Now the student is ready for algorithms with curly braces (lol): irrelevant order made relevant, unknown automaton primitives, no management of state mutation (that will magically appear in the code), no input to configure the operations, no output result of interest. In short: nothing related to what they're going to learn. That doesn't help students the least: its ambiguity is dangerous, the student is left without knowing what he's doing because he has no model for his automaton to be instructed. He will just try to say random things totally unrelated to computation and will start his journey to despair for not understanding what automatic computation is and will pass on the voice that computer science is difficult. A clear model is of the utmost importance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And finally there's a real inherently difficult point: students can learn many tools but then they need their own creativity to make use of them, and this is not easily taught as far as I know. You can show examples and talk about how to analyze and synthesize solutions, progressively enrich their tool set, preferably from distant disciplines, but then it's their job to invent and test their solutions.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2019-03-12T17:04:40.457" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5461" PostTypeId="1" AcceptedAnswerId="5464" CreationDate="2019-03-13T07:11:44.273" Score="5" ViewCount="280" Body="&lt;p&gt;i'm a new instructor &amp;amp; also new here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How do you teach Theory of Automata / Formal Language Theory / Computation Complexity? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is it theory only, or including programming? If theory only, how deep - for example, are they supposed to be able to prove, how deep? If programming, what kind? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be much appreciated if you can share your wisdom. If there're other similar threads, would appreciate it very much if you can share the link. I'm also still reading the threads here, and browsing the internet for the syllabus of other universities. I don't have any TA, and nobody to discuss about this course in my department (theoretical CS is mostly non-existent here, most focus on application).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you very much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I wonder how other professors/TAs managed to give programming assignments to their students, such as building a CYK algorithm-based parser, but they provided the parser/compiler/backbone (?). &lt;/p&gt;&#xA;" OwnerUserId="6701" LastEditorUserId="1293" LastEditDate="2020-05-31T15:26:36.950" LastActivityDate="2020-05-31T15:26:36.950" Title="How do you teach Theory of Automata / Formal Language Theory / Computation Complexity?" Tags="|lesson-ideas|student-motivation|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5464" PostTypeId="2" ParentId="5461" CreationDate="2019-03-13T10:35:38.813" Score="5" Body="&lt;p&gt;The course is often theoretical, taught like a math course, which it is, actually. In fact, my daughter has a doctorate in Philosophy and this was one of her doctoral courses since it relates to Epistemology. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is actually more material than can be covered in a single course, I think. Formal language theory could be introduced as part of a Languages and Compilers sequence to separate it out a bit. This is how I taught formal languages so as to motivate scanners and parsers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Automata and Computability is quite a lot on its own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a third way to teach the course, actually, which is to teach the insights, rather than going through the proofs. What does it all actually mean if you look at it from a bit of a distance. What does it mean for problems to be equivalent? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you want to have a course that includes programming, you should at least look at &lt;a href=&quot;http://www.jflap.org&quot; rel=&quot;noreferrer&quot;&gt;JFlap&lt;/a&gt;, which is a system for teaching the course and was developed by Susan Rodger at Duke. The system lets you simulate finite automata and can support either a theoretical or insight driven course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple of old books, now somewhat hard to find, that I consider classics and excellent introductions. Both are by V. J. Rayward-Smith:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0632011769&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;A First Course in Formal Language Theory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0632013079&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;A First Course in Computability&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are both small books but are good for the basics and for generating insight. They are worth having, even if you don't use them as course texts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There have been a lot of books published since I studied this subject. If I had to teach a complete course, the first book I would consider would be&#xA;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/113318779X&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to the Theory of Computation&lt;/a&gt; by Michael Sipser. I expect it would be clear and deep. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-03-13T18:26:56.680" LastActivityDate="2019-03-13T18:26:56.680" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5466" PostTypeId="2" ParentId="5157" CreationDate="2019-03-14T13:07:42.807" Score="2" Body="&lt;p&gt;Sorry this is a half answer because I haven't concrete examples right now. Besides, the answer with the electronic analogies is already so great. But one point attracts me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the level where I imagine your students are, they do not need the modularity effectiveness that can be obtained with well structured functions. Indeed, you report from them mistakes of not following &quot;your&quot; way of doing things, but no concrete reason is dictating that your way is better than, for example, the cited way of implementing &lt;code&gt;add1&lt;/code&gt;, therefore they may be lost wondering what are you asking them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;problem&quot;, so to say, is that in their situation functions do not serve any purpose of encapsulation, reuse, modularization. More: these are most probably just empty words for them, they don't have any encapsulation need and are therefore unable to recognize this never encountered concept. So this is why the electronic analogy is great: it lets them connect with something they know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But from the computing side of things there's more. It seems that you are letting your students somehow follow a path of prehistoric programmers discovering how to take advantage of that strange creature called processor armed only with a sharp stone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We may think that all our reuse or modularization needs will be perfectly served by &lt;code&gt;goto&lt;/code&gt;. One sunny morning a programmer wakes up in his cave and observes that some problems are very very similar to one another and can be solved by repeating the same basic instructions with slight differences. He takes his stones and starts forging his &lt;code&gt;goto&lt;/code&gt; into something more elaborate: the point where you land after the jump doesn't start right away but inspects some mysterious values called parameters and only after that the work can begin, being different depending on the actual parameters seen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is the learning path that the students are following then what is needed is a case where they must do some operations in differing incarnations: if they do not feel this need they won't understand what are you wanting from them. In your introducing examples nothing of this kind was needed: if I just need to add1 then read, +1, write, end of story.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One problem alone doesn't need functions. A class of similar problems does. Ultimately, a computing system is one calculating a function, i.e. solving a class of problems, represented as differing inputs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, unfortunately I don't have such examples in mind right now, but I hope it may be easier to invent them by having a clearer picture of their nature.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2019-03-14T13:07:42.807" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5468" PostTypeId="2" ParentId="5451" CreationDate="2019-03-15T02:21:01.460" Score="5" Body="&lt;p&gt;It sounds like the program of study has a few bugs if 4th or 5th year students cannot reason about a loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I taught myself programming in 9th grade by writing simple programs that printed shapes on the screen using characters. For example, make a solid rectangle. Now modify the program to make it a hollow rectangle. Accept input to get the width and height, etc. Now draw triangles. Now diamonds scrolling up the screen. Now make them hollow...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than fight against scanf and printf, use them in a way that is direct, gives immediate feedback, and is somewhat interesting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can introduce functions by taking the inner loop and making it into a &quot;draw a line&quot; function, with a variable length, offset and hollowness. Then build another function that makes a shape by calling the first function in a loop.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they can't handle functions, nested loops and conditions after that, you have my permission to yield to despair.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2019-03-15T02:21:01.460" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5469" PostTypeId="2" ParentId="5394" CreationDate="2019-03-17T02:00:43.263" Score="1" Body="&lt;p&gt;As part of their coursework, my students build a master/detail application with a simple search field on the master page.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They have a testing assignment to write a JUnit functional test validating search-form input, as well as a Mockito test validating that search-form entries are correctly stored into / read from shared preferences. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could go deeper w/ those two areas, and also assign UI tests that validate form rendering &amp;amp; correct passage to the detail activity. &lt;/p&gt;&#xA;" OwnerUserId="3767" LastActivityDate="2019-03-17T02:00:43.263" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5470" PostTypeId="1" CreationDate="2019-03-17T23:27:39.303" Score="3" ViewCount="136" Body="&lt;p&gt;I teach AP Computer Science A and game design classes at the high school level in Washington state (where &quot;revision control systems&quot; are a grade level expectation (GLE) for 11th and 12th grade - all of the classes are mixed grade level, but that is probably a discussion for another day). We use the game design classes as our &quot;bait&quot; to get kids interested in CS, but there are usually some pretty sharp and motivated kids in those classes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want the students to work on collaborative projects and many of them want an easy way to move their work back and forth between home and our lab. This, and having a way to make mistakes and then back out of them (and the state GLEs) are motivating me to teach them how to use a revision control system. I'm inclined towards Git and GitHub both because I have experience with them and because GitHub offers private repositories to schools.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our intro level game design class uses Code.orgs Game Lab which has a minimal, but useful revision control system. In AP CS and the upper level game design class we use a JetBrains IDEA (IDEA and Rider respectively) which have support for a variety of revision control systems built in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When does revision control rise to the level of a &quot;needed understanding&quot; for students?&lt;/li&gt;&#xA;&lt;li&gt;What are essential skills with revision control tools?&lt;/li&gt;&#xA;&lt;li&gt;What are best practices (or good sources for learning about them)?&lt;/li&gt;&#xA;&lt;li&gt;What tools to teach? I'm comfortable with Git and GitHub, and they are widely used, but are they good teaching tools?&lt;/li&gt;&#xA;&lt;li&gt;Command line vs. GUI vs. IDE integrated interface?&lt;/li&gt;&#xA;&lt;li&gt;If you're a college CS teacher, what do you want your incoming students to know?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="134" LastEditorUserId="134" LastEditDate="2019-03-17T23:38:28.820" LastActivityDate="2019-03-23T00:58:06.670" Title="Teaching Revision (Change) Control Systems In High School CS Classes" Tags="|curriculum-design|revision-control|github|git|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5471" PostTypeId="2" ParentId="5433" CreationDate="2019-03-18T03:20:51.450" Score="2" Body="&lt;p&gt;It is very common for institutions to use a single IP address and Network Address Translation (NAT) to avoid the problems of getting and maintaining a larger IP address space. As a result a website experiences all of the traffic from the institution as a single user. Depending on the threshold for password failures or rate limiting the traffic may see the school's traffic as a DOS attack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may be able to contact the provider and see if they can adjust the threshold for your site's IP address - I know this is possible on Drupal based sites. If they are unwilling it might be worth asking if they would prefer that you use, and could recommend, an alternative site that is able to handle schools (and kids who don't type well and who forget passwords).&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2019-03-18T03:20:51.450" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5474" PostTypeId="2" ParentId="5257" CreationDate="2019-03-20T03:30:55.147" Score="3" Body="&lt;p&gt;OK, maybe I'm just a contrarian, but the approach that I take is to validate the experience that programming is sometimes hard. I tell my students that pretty much every developer hits patches where programming feels &lt;strong&gt;hard&lt;/strong&gt;. The compensation is that it is also fun, and rewarding, and a &quot;worthy&quot; challenge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I point out that they are learning a new language (albeit a relatively simple one if you measure by the size of the dictionary or the number of grammatical constructs), a new way of thinking, an often cryptic system for reporting errors, and dealing with an often fanatical &quot;grammar nazi&quot; (the compiler).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then I make my early assignments fun and expressive and small - I want there to be motivation and room to experiment and I try to encourage a culture in the class where it is ok to &quot;fail&quot; and where throwing code out and starting over is an option (hence keeping early assignments small).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the intro class I try to have grades be weighted towards solidity of understanding than on the number of concepts covered - so that a slower moving student still has a chance at a passing grade. I also encourage pair programming (when I figure out how to teach it and manage it well I'll require it) and collaboration in general.&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2019-03-20T03:30:55.147" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5476" PostTypeId="2" ParentId="5470" CreationDate="2019-03-20T13:36:49.430" Score="2" Body="&lt;p&gt;I agree with the CSTA Standards that revision control is an important skill by upper high school.  My school has a GitHub account and it is good for both revision practice and for using Agile boards for task management, which is an important methodology for students to know as they move to college.  I think there is value in either GUI or Command Line knowledge.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some resources about Agile in Education:&#xA;&lt;a href=&quot;https://www.agileineducation.org/examples.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.agileineducation.org/examples.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I like this resource for revision control:&#xA;&lt;a href=&quot;https://betterexplained.com/articles/a-visual-guide-to-version-control/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://betterexplained.com/articles/a-visual-guide-to-version-control/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main ideas are backup/restore, synchronize (sharing resources with multiple people), tracking changes, sandboxes, branching, and merging.&lt;/p&gt;&#xA;" OwnerUserId="6741" LastEditorUserId="6741" LastEditDate="2019-03-21T14:26:49.533" LastActivityDate="2019-03-21T14:26:49.533" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5477" PostTypeId="2" ParentId="5257" CreationDate="2019-03-20T13:40:48.210" Score="6" Body="&lt;p&gt;I suggest looking into &lt;a href=&quot;https://www.mindsetkit.org&quot; rel=&quot;noreferrer&quot;&gt;Growth Mindset&lt;/a&gt; resources, both to understand why students feel this way and why others excel despite facing difficulties.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way I help students get past that initial hesitation is to implement the Lifelong Kindergarten method from the MIT Media Lab.  It's the 4P method: make projects, on a topic that you feel passionate, with your peers, and (at first) make sure the EFFORT and not the result is graded, so it feels like play.  When students know they can't fail if they try, that is liberating.&lt;/p&gt;&#xA;" OwnerUserId="6741" LastEditorUserId="1293" LastEditDate="2019-03-20T13:55:30.087" LastActivityDate="2019-03-20T13:55:30.087" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5478" PostTypeId="2" ParentId="5448" CreationDate="2019-03-21T03:33:31.890" Score="4" Body="&lt;p&gt;You might consider using &lt;a href=&quot;https://github.com/mit-pdos/xv6-public&quot; rel=&quot;nofollow noreferrer&quot;&gt;MIT's xv6&lt;/a&gt; which they describe as &quot;xv6 is a reimplementation of Dennis Ritchie's and Ken Thompson's Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern x86-based multiprocessor using ANSI C.&quot; It can be run in a VM.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Phillip Opperman has a very accessible set of blog posts, &lt;a href=&quot;https://os.phil-opp.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Writing an OS in Rust&lt;/a&gt;, it's in it's &quot;2nd edition.&quot; The parts on writing the assembler to set up the machine (x86 as well) are particularly good.&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2019-03-21T03:33:31.890" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5480" PostTypeId="1" CreationDate="2019-03-21T14:09:48.087" Score="4" ViewCount="114" Body="&lt;p&gt;I am my school's new AI Program Architect and I also serve on the national AI4K12.org working group that is writing K12 AI Standards. I would love to ensure that we are broadly including CS educators and their ideas in writing programs and curricula that encompass the field of AI for K-12.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What AI resources do you use in your class?&#xA;What are the essential ideas that students need to know?&#xA;What should students be able to do at the end of class? &#xA;If you incorporate AI in cross-disciplinary courses, please share those ideas as well.  &lt;/p&gt;&#xA;" OwnerUserId="6741" LastActivityDate="2019-03-22T20:07:39.337" Title="What are the essential ideas that students need to know about Artificial Intelligence?" Tags="|artificial-intelligence|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5481" PostTypeId="1" CreationDate="2019-03-22T13:30:25.310" Score="3" ViewCount="82" Body="&lt;p&gt;Students from premedical background feel difficulty in programming. They have no basic concepts of programming, so they are unable to do good programming. I have searched but didn't get any solution which help me to improve the programming skills of medical background student.&lt;/p&gt;&#xA;" OwnerUserId="6722" LastEditorUserId="204" LastEditDate="2019-03-22T19:58:45.237" LastActivityDate="2019-03-22T19:58:45.237" Title="What teaching techniques can be used, in teaching students from a medical background, to improve their programming?" Tags="|student-motivation|teaching-analogy|programming|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5482" PostTypeId="2" ParentId="5481" CreationDate="2019-03-22T14:09:14.440" Score="2" Body="&lt;p&gt;To get the premedical students involved you can tell them that by the end of the course they will be able to dissect a program. It may not be as gross as a frog, but it will be more interesting. Unlike the frog, when done dissecting the program they can bring it back to life.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next thing requires that you mean what you say, and follow through with actions that match. Tell the class that their marks in the course will be based on their performance in the course and their apprehension of the course material, not upon their major or program of study.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Final thing is to forget which students are pre-med, chemistry majors, fine arts students, or comp-sci majors, and teach the class as if all the students are willing and able to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one thing that did catch my eye in the question was that the students in question have no basic concepts of programming. That causes me to wonder if some students are taking a course which should have a prerequisite course and does not, or if the course has been designed, unintentionally perhaps, based on the premise that incoming students have those basic concepts even though it is listed as an entry course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps it has been the history of the course that students arrived with prior experience even though it was an entry course, and the faculty has grown accustomed to that and adjusted the course accordingly.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-03-22T14:09:14.440" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5483" PostTypeId="1" AcceptedAnswerId="5510" CreationDate="2019-03-22T19:15:03.067" Score="2" ViewCount="210" Body="&lt;p&gt;Next term, I'm going to teach an introductory Data Science class for the first time. In the past, others have taught it in either R or Python. My first inclination was to teach it in R because the language is specifically for statistics (and not a general programming language like Python). However, I see a lot of promise in Python's Pandas library. I haven't used Pandas myself, but I have more than enough time that I could familiarize myself with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are your thoughts on R vs Python vs a bit of both? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, the Data Science curriculum exposes students to both. Which do you think is more appropriate to begin?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Course details:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Prereqs include CS1 (C++) and Statistics&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Topics include the analytics life cycle, data integration and&#xA;modeling, relational databases and SQL, text processing and sentiment&#xA;analysis, and data visualization. Emphasis is placed on reproducible&#xA;research, code sharing, version control, and communicating results to&#xA;a non-technical audience.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;First of two DS classes as part of a DS certificate (Minor is &amp;lt;&#xA;Certificate is &amp;lt; Major) with predominantly Comp Sci and Stats majors&#xA;enrolled&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I am currently teaching the Advanced DS class (the follow-up course)&#xA;with a concentration on R, but that could potentially change in the&#xA;future as well. Sooner or later, if they complete the certificate, they will get experience in both R and Python. The question is which comes first.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I can choose the textbook, but will give strong preference to free,&#xA;online resources&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6746" LastEditorUserId="6746" LastEditDate="2019-03-26T19:02:53.863" LastActivityDate="2019-04-08T21:09:00.393" Title="Thoughts on language for Intro to Data Science?" Tags="|curriculum-design|language-choice|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5484" PostTypeId="2" ParentId="2897" CreationDate="2019-03-22T19:31:27.203" Score="1" Body="&lt;p&gt;I'm late to the conversation, but wanted to offer...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;GUI application: GitKraken&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Several people have mentioned other GUI applications for git. I had explored a lot of them when I decided to integrate basic git in my introductory (college) courses and found &lt;a href=&quot;https://www.gitkraken.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitKraken&lt;/a&gt; to be far better than its alternatives, predominantly because:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is free-of-charge download, and doesn't require you to use one particular IDE&lt;/li&gt;&#xA;&lt;li&gt;It is cross-platform AND looks the same on MacOS/Windows/*nix&lt;/li&gt;&#xA;&lt;li&gt;It has a better interface that is easier to learn&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Tutorial: Learn Git Branching from js.org&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also echo the recommendations for going through (at least the &quot;Main&quot; modules) from the &lt;a href=&quot;https://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learn Git Branching tutorial&lt;/a&gt;. It is interactive and has been so effective that I now assign it as homework for my Software Engineering students to learn some of the more advanced.&lt;/p&gt;&#xA;" OwnerUserId="6746" LastEditorUserId="6746" LastEditDate="2019-03-22T20:06:28.767" LastActivityDate="2019-03-22T20:06:28.767" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5485" PostTypeId="2" ParentId="5480" CreationDate="2019-03-22T20:07:39.337" Score="2" Body="&lt;h1&gt;Computers are stupid&lt;/h1&gt;&#xA;&lt;p&gt;Do some role playing.&#xA;Have students describe how to draw a house, they can not use house words, just geometry words: line, square, triangle, etc.&lt;/p&gt;&#xA;&lt;p&gt;Get one volunteer to  take a pen to the white board, they don't know what is being described, and follow instructions (I normally take on this role first. I do what they say, &lt;strong&gt;but not what the mean&lt;/strong&gt;).&lt;/p&gt;&#xA;&lt;h1&gt;Dangers of AI&lt;/h1&gt;&#xA;&lt;p&gt;The evil, or not so evil overlords: AI does what it was asked to do. AI algorithms but us into silos, make us vote for trump and brexit, advertise to us, etc.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-03-22T20:07:39.337" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5486" PostTypeId="2" ParentId="5470" CreationDate="2019-03-23T00:58:06.670" Score="2" Body="&lt;p&gt;It's encouraging to see these skills start to make their way in earlier in computing education. I'm a college professor and teach (among other things) our Software Engineering class so this subject is near and dear to my heart. To answer your questions one by one:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;When does revision control rise to the level of a &quot;needed understanding&quot; for students?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;From what I observe, it becomes most essential once students are working on non-trivial projects. That is, once projects are collaborative OR last for more than a couple weeks OR intend to be actual software with real users, then maintaining versions of the source code becomes more and more valuable. With the combination of more than one of those factors, it becomes more essential.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are essential skills with revision control tools?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Essential to a professional or to a beginning programmer? To put it broadly, college students should learn to be able to efficiently share code across a team and maintain its versions over time. That means being comfortable working with remote repositories and resolving merge conflicts as well.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What are best practices (or good sources for learning about them)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;That is a big question that could have its own long answer. However, since your students will be working in teams, one of the worst habits I see in students is when they want their code to be perfect and &quot;done&quot; before sharing it with anyone else. This often comes from a place of either perfectionism or a lack of confidence. When students wait too long to try to merge their work with others', the differences are often very difficult to resolve. Get students to practice making targeted, small changes and sharing those revisions early and often.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What tools to teach? I'm comfortable with Git and GitHub, and they are widely used, but are they good teaching tools?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, they work well and students tend to appreciate gaining exposure to them because they are so common in industry. GitHub is steadily improving in how they support educational use. Students can get free accounts and &lt;a href=&quot;https://classroom.github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub Classroom&lt;/a&gt; is helpful at some unique classroom needs (such as batch downloading all project submissions, or giving students &quot;skeleton&quot; code but keeping each student's fork private to just the individual student and the instructor).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Command line vs. GUI vs. IDE integrated interface?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Use what works with the rest of your class. I wouldn't change your environment just for the sake of Git. Several popular IDEs now integrate Git (and remote hosts like GitHub), but if you're not already using one that supports it, I recommend &lt;a href=&quot;https://gitkraken.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitKraken&lt;/a&gt; -- a free, cross-platform GUI application -- if you want a consistent, easy interface for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Personally, I just use command line (and my students do too, but that doesn't necessarily mean it is appropriate for all classes/students).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you're a college CS teacher, what do you want your incoming students to know?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Honestly, most students don't come in with any previous experience. Even in my (upper-level) Software Engineering class, I have to work with the assumption that &lt;em&gt;some&lt;/em&gt; students will have never seen git before my class. In that respect, anything will be an improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, one request I make is try to avoid students getting in the habit of automatically staging &lt;em&gt;all changed files&lt;/em&gt; (using &lt;code&gt;git commit -a&lt;/code&gt; or &lt;code&gt;git add .&lt;/code&gt;) &lt;em&gt;all the time&lt;/em&gt;. It is a habit that is hard to break and makes for poor version documentation and ugly messes of unrelated changes being lumped together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also highly recommend using &lt;a href=&quot;https://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;js.org's Learn Git Branching&lt;/a&gt; interactive tutorial, which is conveniently broken into small modules so you can assign the ones you think are most appropriate for your students. In Software Engineering, I require students to complete all the modules, but in introductory programming classes, they usually just learn some very basics (init, clone, pull, push, status, add, commit).&lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-03-23T00:58:06.670" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5488" PostTypeId="2" ParentId="5257" CreationDate="2019-03-24T22:06:18.393" Score="4" Body="&lt;p&gt;Your question immediately reminded me of Andrew Luxton-Reilly's paper, &quot;Learning to Program is Easy&quot; from a couple years ago at &lt;a href=&quot;https://dl.acm.org/citation.cfm?id=2899432&quot; rel=&quot;nofollow noreferrer&quot;&gt;ITiCSE&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's the abstract:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The orthodox view that &quot;programming is difficult to learn&quot; leads to uncritical teaching practices and poor student outcomes. It may also impact negatively on diversity and equity within the Computer Science discipline. But learning to program is easy --- so easy that children can do it. We make our introductory courses difficult by establishing unrealistic expectations for novice programming students. By revisiting the expected norms for introductory programming we may be able to substantially improve outcomes for novice programmers, address negative impressions of disciplinary practices and create a more equitable environment.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you don't have ACM Digital Library access, he also has the &lt;a href=&quot;https://www.researchgate.net/publication/305081807_Learning_to_Program_is_Easy&quot; rel=&quot;nofollow noreferrer&quot;&gt;full text up on ResearchGate&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-03-24T22:06:18.393" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5490" PostTypeId="2" ParentId="5483" CreationDate="2019-03-26T15:02:46.623" Score="1" Body="&lt;p&gt;Python is more widely used in industry and is a general programming language, so will be more advantageous for students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;R will be useful if your students aim primarily for life sciences and/or academic jobs. But even there Python is used extensively.&lt;/p&gt;&#xA;" OwnerUserId="3767" LastActivityDate="2019-03-26T15:02:46.623" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5492" PostTypeId="1" AcceptedAnswerId="5502" CreationDate="2019-03-26T19:01:09.547" Score="26" ViewCount="6346" Body="&lt;p&gt;Vulkan is a very useful API for rendering projects, and I would like to learn how to use it as it opens up new possibilities for doing some rendering tricks much more efficiently than in OpenGl.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am having significant trouble learning it, however. It is a very complex API with many essential details. These details, while useful, are not interesting enough in and of themself to reliably hold my attention for long periods, even if I put in significant effort. I find when I go through the &lt;a href=&quot;https://vulkan-tutorial.com/&quot; rel=&quot;noreferrer&quot;&gt;written tutorials&lt;/a&gt; that I get very distracted by almost anything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, when I was reading about its mechanism for selecting a GPU in a multi-GPU system instead of focusing on the syntax that I want to learn, I ended up thinking about all the implications of such a selection existing, compared to the fact that it does not in OpenGl. Distractions such as that end up drastically increasing the time that I need to spend on the reading, and skimming is not an option either as the details really are important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are also diminishing returns as my ability to use will power to remain focused diminishes much more quickly than I would like it to (I can only get through maybe ~10 pages of this reading in a single sitting while maintaining the focus that I feel is necessary.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This problem is not unique to Vulkan. I had the same problem, but to a much lesser extent, when learning OpenGl. In that instance, I was able to find video tutorials that explained the necessary concepts very succinctly. This helped both because the explanations were more succinct, with only the necessary information (including theory when appropriate) to use the API (and I could look at written alternatives when I wanted more details). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I attempted this for Vulkan, however, &lt;a href=&quot;https://www.youtube.com/watch?v=wHt5wcxIPcE&quot; rel=&quot;noreferrer&quot;&gt;the only video tutorials that I could find&lt;/a&gt; were both outdated and contradicted the text tutorials in a few places, making me very weary of using them as I may pick up bad practices or outdated Vulkan. Video tutorials also work well for me as they keep on moving even if I get temporarily distracted, thus pulling my attention back. When reading, if I get distracted I automatically stop reading.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also like to note that this isn't an issue of lazyness; I am willing to put in significant time to do it, but I find that my ability to focus is quickly diminishing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As such, I ask: How can I learn Vulkan (Ideally, the advice will be applicable to other similar tasks as well) reasonably efficiently and how can I counter the described road-blocks?&lt;/p&gt;&#xA;" OwnerUserId="6762" LastEditorUserId="27" LastEditDate="2019-03-26T22:00:05.607" LastActivityDate="2019-03-28T19:55:55.880" Title="How can I get through very long and very dry, but also very useful technical documents when learning a new tool?" Tags="|self-learning|" AnswerCount="11" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5493" PostTypeId="2" ParentId="5492" CreationDate="2019-03-26T19:09:56.727" Score="4" Body="&lt;p&gt;I am right there with you; I find it incredibly difficult to work through something substantial and new without disappearing down many little rabbit holes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's a simple idea: have you considered just making a list of &quot;questions to answer&quot;?  It would be for items that you want to explore in order to flesh out your understanding, but aren't in the main thread of your learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Items on the list would resolve in one of four ways:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It graduates to the main thread when you stop understanding what is going on.&lt;/li&gt;&#xA;&lt;li&gt;You come to understand it over time without doing an explicit research, just from context and osmosis.&lt;/li&gt;&#xA;&lt;li&gt;Through devoted time (perhaps at the end of a session, when your attention is starting to flag anyway), you eventually fill in the hole with some side-research.&lt;/li&gt;&#xA;&lt;li&gt;It turns out to be unimportant enough that it never comes up again, and can safely be ignored.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The most important things, I think, are not to go down every rabbit hole you see right away, and to reserve some time to go through the list from time to time and fill in some of the missing puzzle pieces.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-03-26T19:09:56.727" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5494" PostTypeId="2" ParentId="5492" CreationDate="2019-03-26T20:41:19.167" Score="11" Body="&lt;p&gt;I've found that a useful trick is to have a specific project or end goal in mind. That helps to focus your attention on completing that project or goal, and gives you a &lt;em&gt;purpose&lt;/em&gt; to think about what you're reading. It can also help you retain more of what you're reading, since you're always applying the new things you're learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Frequently, you'll be able to find beginner oriented projects online that you could try to build, or maybe you have some vision or project that you want to use this new technology for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that having a project or goal really helps you 1) stay motivated to keep reading 2) retain the material (and have some code snippets to use later), and 3) not get lost down long rabbit holes (although this still requires some willpower).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-03-26T20:41:19.167" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5495" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T00:51:57.837" Score="28" Body="&lt;p&gt;Man, I'm right there with you. I understand completely your situation, as I've been there myself many times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key, I find, is not reading the tutorials. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, I pick a few projects - starting with something that's &quot;hello, world&quot; level. I google and read enough to be able to do that. Then I pick a slightly harder project - for Vulkan, maybe pick a scene of intermediate difficulty, and google and read enough to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you keep doing this, you very quickly obtain a practical base of knowledge. There are, however, disadvantages to this - obviously, there will be holes in your knowledge, and you could miss style guidelines depending on what you're looking at to write your code (e.g., when I first learned python, I came into it knowing how to program in javascript - so my first instinct was to write variable names in camelCase, and it was only after several years that I actually read PEP8 and changed to under_scores, though in my defense I didn't even realize style guides were a thing at the time). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might even wish to go through this approach, and then read through the tutorials with the perspective of someone who's &quot;brushing up&quot; - this might fill in the crevices the more trial and error method doesn't fill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, however, you wish to fully work through the documentation straight off, I'd recommend reading a paragraph/section, and writing down something about how you'd use what you just learned about in a real program - i.e., mentally applying the small details. You want to build up a 'web' of details, with lots of connections between the nodes, so that every node is much easier to 'get to' (remember). The more you know, the more you remember (as odd/obvious as that sounds).&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-03-27T00:51:57.837" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5497" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T07:45:55.033" Score="3" Body="&lt;p&gt;Almost all of my advice is from &lt;a href=&quot;https://www.coursera.org/learn/learning-how-to-learn&quot; rel=&quot;nofollow noreferrer&quot;&gt;Courseras &quot;Learning how to learn&quot;&lt;/a&gt; which I highly recommend.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Take breaks. &#xA;Study for maybe 20 minutes then take a short break.&#xA;Do something physical in these breaks if possible like some squats, push-ups or go for a short walk.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure you have plenty of fresh air. &#xA;High levels of CO2 and low levels of O2 make us tired.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take notes.&#xA;After reading a section write down what you learned.&#xA;You might even make these a blog post or do a short talk about it.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do practical things.&#xA;This was recommended by others: Instead of just brute force learning, pick a task and learn what you need to learn for that task. &#xA;This helps with motivation and also by linking the knowledge to other experiences making it easier to remember.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Take notes about what to learn.&#xA;You mention getting sidetracked often by looking stuff up that is not directly related to what you are trying to learn right now.&#xA;Use your notes to write down what you'd like to look up then look it up when the time is right.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Repeat.&#xA;We can't internalize complex knowledge directly. &#xA;We need to repeat and practice it.&#xA;With software APIs, &lt;a href=&quot;https://en.wikipedia.org/wiki/Kata_(programming)&quot; rel=&quot;nofollow noreferrer&quot;&gt;katas&lt;/a&gt; are a proven way to do that.&#xA;When you learn something new, make a tiny project putting the knowledge to use.&#xA;This should take about 30min.&#xA;Repeat this project after a short break. &#xA;Then again maybe on the next day.&#xA;Repetition with increasing time in between makes sure the knowledge ends up in long term memory.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="2454" LastActivityDate="2019-03-27T07:45:55.033" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5498" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T10:00:11.377" Score="2" Body="&lt;p&gt;Suggestions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do not just read the API, but focus on actually doing what you want to do. I don't know Vulcan, but many other APIs, language specifications, protocol specifications etc. You &lt;em&gt;can&lt;/em&gt; skim them quickly to see what the API has to offer (the general topics, architectural overview etc.). But then try to &lt;em&gt;use&lt;/em&gt; the API. At first, you will immediately hit your first roadblocks. Then go and try to overcome each individual block, by delving into the dry documentation. Your carrot is the small goal you are currently trying to achieve. This is a good point for StackOverflow as well... if you have very concrete problems, you can just ask.&lt;/li&gt;&#xA;&lt;li&gt;Avoid tutorials. Exceptions notwithstanding, they are the devil for building deep know-how, in my experience and strong opinion. They are often outdated; they represent the usual limited understanding of the author. They are specialized to whatever the author needed at the moment, and his opinions about how APIs should be used. About the only good case for tutorials is for a short &quot;hello world&quot;-style piece which gets you running from a blank slate (i.e., gives you the bare minimum commands to compile your first program or whatever you're doing). But as soon as you have even the slightest working bit of program, get rid of them ASAP.&lt;/li&gt;&#xA;&lt;li&gt;Do not feel that you are somehow inferiour or whatever. In my long experience, most people do not want to, or actually cannot read specifications/reference documentation. You are in good company. But don't give up...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2019-03-27T12:14:46.110" LastActivityDate="2019-03-27T12:14:46.110" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5499" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T10:16:20.220" Score="1" Body="&lt;p&gt;You're not alone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to focus on &quot;what do I need to know now?&quot;. On first reading, you need to understand the basic concepts. Try to find the sections of the document that explain them. (Many technical documents are bad at explaining them, or don't put the explanations in the obvious place.) If you find some text that you don't understand because you don't know what the words mean, stop reading (there's absolutely no point carrying on) and try and find where in the document the words are explained.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you find a section that's all about edge cases (how does the system handle division by zero), recognise that and skip it. You don't need to know that right now.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On your first reading, try not just to absorb the content, but also to form an assessment of what kind of document you are reading. What kind of reader is it aimed at, and is that you? Which is going to be more useful, the examples, or the formal narrative? How careful is the writer about explaining things? Does it use terminology consistently and accurately? Understanding how the writer's mind is working can help your reading: if you come across a word like &quot;specify&quot; or &quot;denote&quot;, are they using it carefully or carelessly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think carefully about how to balance reading with hands-on experimentation. Some people start the hands-on too early, before they understand the concepts; that can lead to you drawing false conclusions about the system's behaviour, and to frustration that you can't make anything work. But if the documentation has &quot;Hello world&quot; examples to take you through things gently, then try them out. Not only will it give you confidence that you're following the text and making progress, it will keep you fresh and stop you falling asleep.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2019-03-27T10:16:20.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5501" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T18:15:19.250" Score="3" Body="&lt;p&gt;One very simple technique I have found useful in processing information which I do not understand easily, is to review it multiple times, preferably in different sessions.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You said:  &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;(I can only get through maybe ~10 pages of this reading in a single sitting while maintaining the focus that I feel is necessary.)  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;and this implies to me that you consider the reading something to do once. I have found that reading the same material again and again (ideally with sleep periods between these sessions, but at least with some rest), allows me to understand things that I cannot understand on the first reading.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that this makes your reading process &lt;em&gt;even longer&lt;/em&gt;, but it is one way to get the job done, and at least the enhanced understanding of subsequent reads can provide you with some more motivation to carry you through.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One suggestion here could be to split your time between (a) reading at the &quot;head&quot; of your progress through the documentation, and (b) re-reading parts of the documentation you've already read previously, and then possibly (c) re-reading parts you've already re-read, i.e. re-re-reading.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On second and third readings, you brain will be able to find deeper connections between the seemingly disparate details, and the material will seem less &quot;dry&quot;.&lt;/p&gt;&#xA;" OwnerUserId="6772" LastActivityDate="2019-03-27T18:15:19.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5502" PostTypeId="2" ParentId="5492" CreationDate="2019-03-27T19:16:21.737" Score="9" Body="&lt;p&gt;As someone who has read through the OpenGL and Vulkan specifications, I've always found that it's best to digest them in bite-sized chunks. &lt;em&gt;Never&lt;/em&gt; try to binge on the whole document in one day. Indeed, the kind of &quot;distraction&quot; you're talking about, thinking about the ramifications of a particular API, is a &lt;em&gt;good&lt;/em&gt; thing; it helps the knowledge stick.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two ways to read something like this, depending entirely on your familiarity with the subject matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are unfamiliar with the subject (for this Vulkan example, you would be a person who doesn't have much of an idea on how 3D graphics works), it's best to just start at the beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Read a chapter of the specification. As you're reading it, try to map the concepts it talks about to things you already know. Also, try to make note of what it has aluded to (specifications are not written like reference documentation; they will often talk about concepts not yet introduced), so that when you get to that part, you'll understand how it fits in. Lastly, think about the implications of what is said in that chapter; try to wrap your brain around what it all means.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next day, read another chapter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have some familiarity with the system, then I would say it's best to start with what is familiar to you, and branch out from there. For example, if you were a modern OpenGL user who is learning Vulkan, you might start with the chapter on drawing commands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you jump into the middle like this, you'll hear about a lot of concepts you don't know: devices, command buffers, pipeline stages, etc. But you'll also start noticing that some of them are similar to things you &lt;em&gt;do&lt;/em&gt; know: shader stages, primitives, etc. That helps build a translation layer between what you know and what you don't, as well as giving you some places to start learning more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once you have a list of Vulkan topics you don't know, then you start following links to chapters and sections that talk about them. Go to the section on command buffers, and you'll find stuff about queues, devices, and that all important Vulkan topic, synchronization. Each of these steps should be its own session of investigation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you do this, it's best to treat these new topics as black boxes; don't try to speculate too much about what they do until you've actually read about them. Or at the very least, if you speculate about them, be willing to readjust your speculation based on any reality you later discover.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, and regardless of which way you're doing it, you should take notes. That is always helpful when dealing with complex information like this. Write down what it is you think these complex things are. If you find out that something isn't how you thought it would be, change your notes.&lt;/p&gt;&#xA;" OwnerUserId="1614" LastActivityDate="2019-03-27T19:16:21.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5504" PostTypeId="2" ParentId="5492" CreationDate="2019-03-28T00:58:24.470" Score="6" Body="&lt;p&gt;The answers by &lt;a href=&quot;https://cseducators.stackexchange.com/a/5495/2068&quot;&gt;heather&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/a/5494/2068&quot;&gt;thesecretmaster&lt;/a&gt; are already spot-on: give yourself a &lt;strong&gt;project&lt;/strong&gt; to work towards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;APIs are tools. It doesn't really make sense to &quot;learn an API&quot; by itself, in the same way that it doesn't make sense to &quot;learn a hammer&quot; by itself. You should be figuring out how a specific tool solves a specific problem. For that, you need a problem first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another suggestion I haven't seen in any of the existing answers is: &lt;strong&gt;write your own documentation&lt;/strong&gt; as you read through the existing documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you read through a page of their documentation, try to boil it down to a bare minimum. What was the takeaway? It's probably a sentence or two, or a snippet of code. Start your own documentation that collects these takeaways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you have enough of these takeaways, you can start thinking about: How would you organize the documentation differently? What should &quot;hello world&quot; look like? What topic should come right after that?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I highly recommend publishing your new and improved documentation somewhere: to a personal blog, as a pull request to the original documentation, or as answers on Stack Overflow. But even if you don't publish them, the process of coming up with them in the first place can be extremely educational.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2019-03-28T00:58:24.470" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5506" PostTypeId="2" ParentId="5483" CreationDate="2019-03-28T11:43:02.243" Score="0" Body="&lt;p&gt;As for me, Python is the best thing for entering to Data Science. As you see, among Python is a very popular, mainstream general-purpose programming language, it also has an extensive range of purpose-built modules and community support. Many online services provide a Python API.&lt;/p&gt;&#xA;" OwnerUserId="6786" LastActivityDate="2019-03-28T11:43:02.243" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5508" PostTypeId="2" ParentId="5492" CreationDate="2019-03-28T19:09:25.303" Score="3" Body="&lt;p&gt;I do read one time fully, without worrying about remembering. And then I pick a beginner project and start learning by doing. There is no way to read and remember all those dry details.  But you will remember where to look when you get stuck in your projects. I was quite successful with this method, many times. &lt;/p&gt;&#xA;" OwnerUserId="1449" LastActivityDate="2019-03-28T19:09:25.303" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5509" PostTypeId="2" ParentId="5492" CreationDate="2019-03-28T19:55:55.880" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;For example, when I was reading about its mechanism for selecting a&#xA;  GPU in a multi-GPU system instead of focusing on the syntax that I&#xA;  want to learn, I ended up thinking about all the implications of such&#xA;  a selection existing, compared to the fact that it does not in OpenGl.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes humans can not be programmed. This is not a good way to learn. You are being distracted, because what you are reading is not useful. Syntax is not the important bit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an experienced programmer, I just look it up as I go. I need to find something that gives me a good overview of &lt;strong&gt;what&lt;/strong&gt; it does (not how), what the philosophy of it is. Then I just get on with it (very slowly at first), and look stuff up just-in-time. Sometimes I look stuff up more than once.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-03-28T19:55:55.880" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5510" PostTypeId="2" ParentId="5483" CreationDate="2019-03-29T12:30:49.393" Score="8" Body="&lt;p&gt;The biggest strength of R when it comes to Data Analysis is in its &lt;strong&gt;data visualization&lt;/strong&gt;. As you've mentioned it is a more or less &lt;strong&gt;dedicated tool for statistical analysis&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing with Python is that &lt;strong&gt;you can easily go a bit off course&lt;/strong&gt; with the lectures because for Statistical Analysis &lt;strong&gt;you'll have to understand, install and work with different libraries/APIs&lt;/strong&gt; for plotting (matplotlib/pandas/plotly) and processing your data (scipy/pandas again/numpy). These may take different approaches for installing and working with besides being tools on their own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;RStudio already sets up everything for you&lt;/strong&gt; for the most part so you can just focus on implementation; if you happen to need something extra installing packages from CRAN is incredibly easy letting you do it from the script itself rather than opening a terminal with &lt;code&gt;conda&lt;/code&gt; or &lt;code&gt;pip&lt;/code&gt; or whatever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My notes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If your interest is teaching &lt;strong&gt;more Data Science, as a tool in itself&lt;/strong&gt;, go with R. It will let you focus more on concepts which are general.&lt;/li&gt;&#xA;&lt;li&gt;If you're interested in teaching General Programming as &lt;strong&gt;a tool for Data Science&lt;/strong&gt; and maybe other things, go with Python. &lt;/li&gt;&#xA;&lt;li&gt;If you like both ideas, &lt;strong&gt;I'd start with R and replicate results with Python later&lt;/strong&gt; to show its integration with different tools. This way your students will see both approaches are feasible in the case they go out there and see it in the job market.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6794" LastActivityDate="2019-03-29T12:30:49.393" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5511" PostTypeId="1" CreationDate="2019-03-30T18:13:25.467" Score="6" ViewCount="556" Body="&lt;p&gt;The faculty and students at my small minority-serving institution think of our environment as being supportive and cooperative. This is very important in CS, since programming is a team sport, and students are expected to seek help from each other (and TAs and me).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have heard recently from two unconnected students about other students ignoring or being rude to them (such as walking away mid-question). The complainants don't give names, and I have no idea who they're talking about. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost all of the students in our program belong to at least one demographic underrepresented in CS and/or in the US. The students who have been mistreated belong to multiple such demographics and think that may be a factor. I have no way of knowing if they're right. Each is the only student of their cohort in their demographic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;What can I do to encourage students to better treat classmates?&lt;/strong&gt; Some have been at the institution much longer than others. The ones who feel mistreated are newer arrivals. While my top goal would be changing students' behavior, we all know it isn't always possible to get people to change. &lt;strong&gt;If I can't get people to change, how can I know who should deserve bad citizenship grades or to not get letters of recommendation?&lt;/strong&gt; I am not interested in furthering the careers of people who mistreat others.&lt;/p&gt;&#xA;" OwnerUserId="6802" LastEditorUserId="27" LastEditDate="2019-04-10T19:50:42.263" LastActivityDate="2019-04-10T19:50:42.263" Title="How do I deal with students being unkind to each other when I'm not there?" Tags="|student-motivation|collaboration|classroom-environment|" AnswerCount="3" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5515" PostTypeId="2" ParentId="5511" CreationDate="2019-04-04T22:08:10.447" Score="2" Body="&lt;p&gt;I have a couple thoughts of how I'd handle it:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address it with the bad actors 1-on-1, but don't assume bad faith&lt;/strong&gt;. We might not know the whole story and there might have been a good reason to walk away from a situation &lt;em&gt;or&lt;/em&gt; it is possible that the bad actor has poor social skills. Give them the benefit of the doubt, but explain why that kind of behavior creates a hostile environment that is not good for education.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Discuss in class what makes for a good working/learning environment&lt;/strong&gt;. Not necessarily directly mentioning the situation, you can still emphasize a need for students to take agency in being part of a nurturing environment. I haven't had the exact same circumstances, but I have found it helpful by acknowledging that most jobs require interpersonal skills and that I've known even talented developers who have been passed up for good jobs because no one wanted to put up with their attitudes. In that same notion, I tell my software engineering students that I expect them to behave like professionals and like the class is a part-time job. That includes treating others with respect, even if they don't consider each other friends.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you find it is a continuing problem, you might consider working into your assessment plan some way (even as a small percentage of the overall grade) to evaluate individuals' professionalism in-and-out of the classroom.&lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-04-04T22:08:10.447" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5516" PostTypeId="1" CreationDate="2019-04-05T13:28:59.523" Score="3" ViewCount="135" Body="&lt;p&gt;What are easy to use MOOC open source platforms? Something that I could install on my servers to provision education. I'm looking for ready to use CMS (content management system) type of software with automactic grading of computer science assignments and course content management, where students could run pieces of code and watch lectures, and interact with TAs. ALternatively, the hosted solutions would work too.&lt;/p&gt;&#xA;" OwnerUserId="6827" LastActivityDate="2019-05-09T20:27:24.197" Title="open source MOOC platforms" Tags="|grading|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5517" PostTypeId="2" ParentId="5069" CreationDate="2019-04-05T14:15:41.503" Score="3" Body="&lt;p&gt;Java has a Streams API that works with all of its collections.  You create a stream with a source, transform or filter it with intermediate operations, and do something with it using a Consumer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All Collections in Java have a .stream() method that creates a stream from the collection.  You can also create streams from files, as well as creating streams of random objects from a Random.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Intermediate operations include filter, which accepts a Predicate as an argument, and map and friends that can transform objects into objects of other types or primitives.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consumers include facilities to place the contents of a Stream into any Collection, System.out::println, and other pure side-effect operations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This requires an understanding of lambdas and functional interfaces (our second-trimester course in Java covers these).  This mechanism is powerful and succinct, and it does not alter the collection the stream is attached to.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2019-04-05T14:15:41.503" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5518" PostTypeId="2" ParentId="5257" CreationDate="2019-04-05T15:08:44.327" Score="3" Body="&lt;p&gt;Programming is like playing a piano: it's easy after you spend enormous amount of time practicing it. Those who love programming do not notice how much time they spent learning it, because it's so fun to them that time flies. Every time you went to search a new trick didn't feel like work at all. It felt like playing a game. However, it was time that your brain spent learning. Little by little these people accumulated thousands of hours of practice. It was not easy at all for their bodies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you do not like programming then every minute spent doing it was felt by your entire body and mind. That's why their entire body resisted every minute of it. So, the chances are they quit after a few days or hours before the results started showing. Look at people learning piano, the first year they can't produce much of a sound at all. Most people quit early. However, if somehow you go through it, after many thousands of hours it becomes easy. Look at master piano players, their fingers are dancing on the keybooard producing beautiful music. The reason piano and programming is difficult to some is that they don't like it. There is no way to make them like it either. You can't make someone like something. They either do or do not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't like piano analogy, I'll say that differential geometry is not difficult. Try convincing programmers that it's easy.&lt;/p&gt;&#xA;" OwnerUserId="6827" LastEditorUserId="6827" LastEditDate="2019-04-05T15:16:50.167" LastActivityDate="2019-04-05T15:16:50.167" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5519" PostTypeId="1" CreationDate="2019-04-05T15:45:05.737" Score="4" ViewCount="166" Body="&lt;p&gt;some students in my class are leaving CS because programming is difficult and think that it will not give them bright future. how to motivate that students, that their interest is develop in programming and they become satisfied for their future. &lt;/p&gt;&#xA;" OwnerUserId="6722" LastActivityDate="2019-04-06T01:04:16.553" Title="how to motivate student that programming will give bright future to them?" Tags="|student-motivation|self-learning|programming|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5520" PostTypeId="2" ParentId="5519" CreationDate="2019-04-05T16:14:08.710" Score="8" Body="&lt;p&gt;This might be a mistake, actually. Everyone is different. People like doing different things. Programming isn't for everyone, nor is the wider world of Computer Science as a whole. My daughter, for example, is perfectly happy as a Philosopher. My son is perfectly happy outside academia. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Convincing someone to do something (a kind of advertising) may do them harm in the long run. People spend millions of dollars convincing people to consume sugary drinks, to their detriment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you make the classes interesting, with interesting problems to solve, those who want to do it will stay. Wish the others well and focus on those who want to work at it. Some of us have found that group work (pair programming) is a motivator, introducing a social aspect to learning as well. On the other hand, it is possible to make learning programming as dull and demotivating as learning multiplication tables. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that many things are hard. Becoming an olympic athlete is hard. Some people are willing to put in the work to do it. For others, it isn't worth that effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Saying the &quot;future is bright&quot; is something you can't honestly predict. Many things could happen that make it less bright. The need for people specializing in CS might decline in future years as some processes become more regularized. This has been the history of the world, actually. One takes a chance on the future no matter what you do, so you might as well follow your own dreams, not those of someone else. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-05T16:24:23.443" LastActivityDate="2019-04-05T16:24:23.443" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5521" PostTypeId="2" ParentId="5519" CreationDate="2019-04-05T22:07:59.957" Score="2" Body="&lt;p&gt;I used to teach adults (most well after college age) programming so they could get jobs after a disability caused them to leave their previous job. They were highly motivated to learn enough in one year to get hired. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I focussed on was to make their learning free of unnecessary difficulty by pointing out the usual problem areas and trying to make my explanations direct, clear, memorable and interesting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your excitement about programming will interest them. Some will drop out, but that is not your issue. For any problems you cannot directly solve in your classroom, get help from the administration, and just focus entirely on your part, which is to teach and assist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Be sure to explain that at times programming IS difficult and frustrating, and sometimes we have to choose a different way of solving a problem. Usually later it can be changed when a better solution is seen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's the best advice I have for you. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2019-04-05T22:07:59.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5522" PostTypeId="2" ParentId="5519" CreationDate="2019-04-06T00:22:58.513" Score="2" Body="&lt;p&gt;Do you maintain contact with your former students?  I have a sizeable number of former students earning nice livings at places such as Apple, Microsoft, Google, Facebook, and YouTube. Others are in great graduate programs.  Some are academics at places such as Stanford, UMiami, and UMaryland.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are doing very well.  I use my network to benefit my current and former students.  It's quite powerful.  And it serves as a beacon to my present students.&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="21" LastEditDate="2019-04-06T01:04:16.553" LastActivityDate="2019-04-06T01:04:16.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5523" PostTypeId="1" CreationDate="2019-04-06T11:45:07.907" Score="1" ViewCount="122" Body="&lt;p&gt;In CS I have been taught other programming languages than java. Now in final year project they are demanding project in java. So is there an easy technique to learn java fast?&lt;/p&gt;&#xA;" OwnerUserId="6722" LastEditorUserId="204" LastEditDate="2019-04-06T19:34:05.083" LastActivityDate="2019-04-08T06:46:21.383" Title="How to make project in java language, for students who doesn't know java?" Tags="|self-learning|java|project|programming|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5524" PostTypeId="2" ParentId="5523" CreationDate="2019-04-06T12:04:22.487" Score="3" Body="&lt;p&gt;There is a &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1479171824&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; called Fixer Upper that can be used for this purpose. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prepare a fairly large Java program that includes the features you want them to use. In this case it would probably be best if they know how to write that program in their &quot;native&quot; programming language: a familiar seeming project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then insert several errors into the program of various kinds. Some of them just simple syntax errors but some of them more complex, even some that break the program so that it doesn't quite solve the problem correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give them an assignment to fix the program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you combine this with unit testing, which they may already know, it will give them some additional practice and skill. If you want them to do the fix-up especially fast, make it a pair-programming exercise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I normally use this sort of thing as a quick start for a new programming language or even for complete novice programmers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure that the overall structure of your program is very good. If it isn't, then they will learn the wrong lessons. Start with a structure that you want them to emulate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A variation on this is to take such a program and go through it in lab rather than making it homework. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that reading a large program is insufficiently &quot;active&quot; to achieve the desired outcomes. Having to repair it will engage the students more deeply into both the problem and the language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My ideal program for this would be several pages long and would include several classes. It would use a variety of design techniques, including a few design patterns. It would favor composition over inheritance as the mechanism for variability. It would define structure with interfaces. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A major variation of this is that the fixer-upper program could, itself, form the core of the project the students will do. Now the students are truly engaged from the start. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-06T12:25:29.417" LastActivityDate="2019-04-06T12:25:29.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5527" PostTypeId="1" CreationDate="2019-04-08T13:30:44.933" Score="8" ViewCount="299" Body="&lt;p&gt;I often take help from online videos to improve my programming skills, but I am not successful. Videos help me in debugging my code, but I am not improving my programming. Is there any other way through which I can improve my programming?&lt;/p&gt;&#xA;" OwnerUserId="6722" LastEditorUserId="5219" LastEditDate="2019-08-10T20:15:56.963" LastActivityDate="2019-08-10T20:15:56.963" Title="How can programming skills be improved?" Tags="|self-learning|programming|struggling-students|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5528" PostTypeId="2" ParentId="5527" CreationDate="2019-04-08T14:54:44.993" Score="9" Body="&lt;p&gt;The only way to learn a lot of things, maybe most things, is practice and feedback. In a standard course (not online), the professor assigns some work to do - homework, projects, .... The professor then gives you feedback on it - grades, but hopefully more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn on your own, you want to try to simulate this as much as you can. So, to learn something, you not only have to see and hear about it, or even read about it, you have to do it. Moreover, you need some way to get feedback on the success of your efforts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the videos don't suggest projects then you will have to find them elsewhere, perhaps in a textbook. Do a lot of small and large projects. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But then the feedback part is just as important. One possible way to simulate that is to work with a friend in your learning. Each of you does the same exercise separately and then exchange your work and each comment on and improve the other's work. This isn't perfect, since the other person isn't an expert, but it is better than nothing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might even be able to use an online forum to get comments on your attempts. The &lt;a href=&quot;https://codereview.stackexchange.com/&quot;&gt;Code Review&lt;/a&gt; here, might work for you, though I don't know how welcoming they are of novices.  Be sure to see their &quot;help center&quot; for guidance. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-08T14:57:51.147" LastActivityDate="2019-04-08T14:57:51.147" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5529" PostTypeId="2" ParentId="5483" CreationDate="2019-04-08T21:09:00.393" Score="2" Body="&lt;p&gt;In my experience, there is less 'overhead' with R, especially if you use incredible resources like Intro to Data Science&amp;lt;&lt;a href=&quot;https://rafalab.github.io/dsbook/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://rafalab.github.io/dsbook/&lt;/a&gt;&gt; and R for Data Science&amp;lt;&lt;a href=&quot;https://r4ds.had.co.nz/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://r4ds.had.co.nz/&lt;/a&gt;&gt; You can more quickly focus on data wrangling, visualization and stats. I think R is more bang for the buck in terms of getting at data and meaning. Rstudio/ the R community is very supportive, resourceful and smart. In my first Intro to DS class I had thought I would focus on Python but as I experimented I found that I did indeed need to spend much more time teaching syntax and that took away from the focus on the work.    For my 'natural born programmer' students, they like Python.  For my new students- coming in to work with data but not coming from a programming background- they really like R.  The tidyverse has been a godsend (ggplot, dplyr and other libraries) and  the libraries/resources for spatial data are awesome.  There is no wrong decision- but I think in future I will stick to R for Intro. Eventually, if professional, one needs more than one language but you'll never get to be a professional if you don't get a start!&lt;/p&gt;&#xA;" OwnerUserId="6841" LastActivityDate="2019-04-08T21:09:00.393" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5531" PostTypeId="1" CreationDate="2019-04-09T08:02:56.737" Score="2" ViewCount="264" Body="&lt;p&gt;I am new to teaching the particular syllabus I have been asked to teach and I am confused by the approach given for several of the algorithms. For example the stack implementation based on the course materials given below seems very convoluted. I'm curious to hear if others would share my concerns if they had to teach about stacks in this way, or if they can offer any insight into the advantages of this approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The concerns I have which I'm curious to hear your opinion about are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Using the call by reference approach makes the &lt;code&gt;push&lt;/code&gt; and &lt;code&gt;pop&lt;/code&gt; calls&#xA;very unwieldy&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The algorithm appears to be O(n) rather than O(1)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The algorithm is hard to follow (IMO)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is possible to implement a stack in a much simpler fashion, which&#xA;would allow student to focus more on conceptual understanding of the&#xA;behavior and use of stacks, and to see the link between the concept&#xA;and the implementation more clearly.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;# NullPointer should be set to -1 if using array element with index 0&#xA;NULLPOINTER = -1&#xA;&#xA;#Declare record type to store data and pointer&#xA;class Node:&#xA;        def __init__(self):&#xA;                self.Data = &quot;&quot;&#xA;                self.Pointer = NULLPOINTER&#xA;&#xA;def InitialiseStack():&#xA;        Stack = [Node() for i in range(8)]&#xA;        TopOfStack = NULLPOINTER  # set start pointer&#xA;        FreeListPtr = 0  # set starting position of free ist&#xA;        for Index in range(7):&#xA;                Stack[Index].Pointer = Index + 1&#xA;        Stack[7].Pointer = NULLPOINTER  # last node of free list&#xA;        return (Stack, TopOfStack, FreeListPtr)&#xA;&#xA;&#xA;def Push(Stack, TopOfStack, FreeListPtr, NewItem):&#xA;        if FreeListPtr != NULLPOINTER:&#xA;        # there is space in the array&#xA;        # take node from free list and store data item&#xA;                NewNodePtr = FreeListPtr&#xA;                Stack[NewNodePtr].Data = NewItem&#xA;                FreeListPtr = Stack[FreeListPtr].Pointer&#xA;                # insert new node at top of stack&#xA;                Stack[NewNodePtr].Pointer = TopOfStack&#xA;                TopOfStack = NewNodePtr&#xA;        else:&#xA;                print(&quot;no space for more data&quot;)&#xA;        return (Stack, TopOfStack, FreeListPtr)&#xA;&#xA;&#xA;def Pop(Stack, TopOfStack, FreeListPtr):&#xA;        if TopOfStack == NULLPOINTER:&#xA;                print(&quot;no data on stack&quot;)&#xA;                Value = &quot;&quot;&#xA;        else:&#xA;                Value = Stack[TopOfStack].Data&#xA;                ThisNodePtr = TopOfStack&#xA;                TopOfStack = Stack[TopOfStack].Pointer&#xA;                Stack[ThisNodePtr].Pointer = FreeListPtr&#xA;                FreeListPtr = ThisNodePtr&#xA;                return (Stack, TopOfStack, FreeListPtr, Value)&#xA;&#xA;def OutputAllNodes(Stack, TopOfStack) :&#xA;        CurrentNodePtr = TopOfStack # start at beginning of list&#xA;        if TopOfStack == NULLPOINTER :&#xA;                print(&quot;No data on stack&quot;)&#xA;        while CurrentNodePtr != NULLPOINTER : # while not end of list&#xA;                print(CurrentNodePtr, &quot; &quot;,Stack[CurrentNodePtr].Data)&#xA;        # follow the pointer to the next node&#xA;                CurrentNodePtr = Stack[CurrentNodePtr].Pointer&#xA;&#xA;Stack, TopOfStack, FreeListPtr = InitialiseStack()&#xA;Stack, TopOfStack, FreeListPtr = Push(Stack, TopOfStack,&#xA;FreeListPtr, &quot;first item&quot;)&#xA;Stack, TopOfStack, FreeListPtr = Push(Stack, TopOfStack,&#xA;FreeListPtr, &quot;second item&quot;)&#xA;Stack, TopOfStack, FreeListPtr = Push(Stack, TopOfStack,&#xA;FreeListPtr, &quot;third item&quot;)&#xA;Stack, TopOfStack, FreeListPtr, value = Pop(Stack, TopOfStack, FreeListPtr)&#xA;print(value)&#xA;OutputAllNodes(Stack, TopOfStack)&#xA;&lt;span class=&quot;math-container&quot;&gt;```&lt;/span&gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="6843" LastEditorUserId="6843" LastEditDate="2019-11-24T08:54:11.207" LastActivityDate="2019-11-24T08:54:11.207" Title="Pedagogical issues with Stack Implementation" Tags="|algorithms|python|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5532" PostTypeId="2" ParentId="5531" CreationDate="2019-04-09T11:44:16.867" Score="9" Body="&lt;p&gt;Actually, the code is terrible, but I don't think its purpose is to illustrate a stack so much as to illustrate in a very rudimentary way how heap allocation works. (Worse than &quot;terrible&quot;, it isn't &quot;pythonic&quot;). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you are wrong about the efficiency. Only the initialize function is O(n). Push an pop are O(1) as should be obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But no serious code should &lt;em&gt;print&lt;/em&gt; as a solution to a failure condition. The program itself should fail in some predictable way. Likewise no &lt;em&gt;general&lt;/em&gt; implementation of a stack should hard code the maximum size. As such, this code teaches very bad programming habits. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason I don't think it is intended to represent a stack structure is the tuples that are returned from push and pop. Normally push is a mutator returning nothing and pop is an accessor returning &lt;em&gt;only&lt;/em&gt; the top value in the stack. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, a stack as an abstraction should encapsulate the free list pointer (i.e. next free slot if any) and this reveals it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The capitalization of variables is also oddly done for a Python program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree that it is hard to follow, but that is a consequence of the above. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing positive that I will say about the code and how it might be actually valuable pedagogically, has to do with a philosophical interpretation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you &lt;em&gt;modify&lt;/em&gt; a stack (or anything, really), one way to think of it is that you have a different stack - a new thing that didn't exist before. This code emphasizes that view of mutation. So to push onto a stack, you supply a stack, etc, and you get back a stack. A stack goes in and a stack comes out, a conceptually new thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, it works if that is your main lesson, but less so as a stack per se. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is valuable &lt;em&gt;only&lt;/em&gt; if you want to emphasize that view of mutation. But this is at odds with the normal (philosophical) view of an encapsulated data structure - that its identity is maintained in the face of change. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, it is valuable for students to consider both views as different programming languages stress one over the other. Haskell, for example, has the &quot;new value&quot; idea built in rather than the &quot;modified value&quot; that you normally see in OOP. In Haskell if you push onto a stack, you get back a stack. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll also note that there is a &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1479171824&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pedagogical Pattern&lt;/a&gt; called &lt;em&gt;Toy Box&lt;/em&gt; that suggests that one can introduce a complex topic with a trivial implementation that get across key ideas without going into the complexity. While I might prefer simpler code to show how a heap grabs blocks but must know where they are, this code might be considered an example of a Toy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another pedagogical pattern is called &lt;em&gt;Spiral&lt;/em&gt; and implies that teaching can introduce simple versions of complex topics early before students are ready for the full explanation. Then later, when it is time to learn it in detail (another loop in the spiral) they have been primed to integrate it into their thinking. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-09T12:54:32.713" LastActivityDate="2019-04-09T12:54:32.713" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5533" PostTypeId="2" ParentId="5511" CreationDate="2019-04-09T15:03:19.637" Score="1" Body="&lt;p&gt;This guy's teaching is the best I've ever found on conflict-reducing communication: &lt;a href=&quot;https://www.amazon.co.uk/Life-Enriching-Education-Communication-Performance-Relationships/dp/1892005050&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.co.uk/Life-Enriching-Education-Communication-Performance-Relationships/dp/1892005050&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary, keep observations separate from judgments and communicate on the level of needs. Also, empathize first, before expressing yourself.&lt;/p&gt;&#xA;" OwnerUserId="6843" LastEditorUserId="27" LastEditDate="2019-04-10T18:24:35.153" LastActivityDate="2019-04-10T18:24:35.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5535" PostTypeId="2" ParentId="5511" CreationDate="2019-04-10T18:48:23.120" Score="1" Body="&lt;p&gt;First, as Kevin Buffardi pointed out, don't assume bad faith. Poor social skills may be playing a role, and it's also the case that everyone finds people who just rub them the wrong way from time to time.  &lt;em&gt;No one is universally liked.&lt;/em&gt;  Unless you have a strong reason to believe that there is specific vindictiveness or some sort of &quot;-ism&quot; at the heart of the trouble, you would not be justified in direct penalties (such as poor grades).  It is also the case that some people have chips on their shoulder from their own experiences or disadvantages, and this may manifest as inappropriate reactions to others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, since the students on the receiving end of this behavior won't name names, there is no ethical way for you to discover who the offenders are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is available to you, then, is to speak communally about the importance of being respectful to one another, and affording everyone basic dignity.  You can remind students that the world is small, that the community you are in together is tiny, and that everyone should be pulling for the same team.  Everyone is there with goals, everyone there is human (with all of the faults and flaws that that entails), and everyone needs the space and safety to try new things, grow, and learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can mention that there have been reports of some bad behavior, and you are trying for the moment not to punish, but to appeal to their deeper senses of self: they are simply capable of being better people than that.  That is what you expect from them, and that is what everyone needs in order to learn and feel safe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, reiterate that you are always available to anyone if they would like to speak privately.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-04-10T18:48:23.120" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5538" PostTypeId="2" ParentId="3504" CreationDate="2019-04-12T10:56:01.893" Score="1" Body="&lt;p&gt;As for the ready-made solutions, you can check Computer Code Originality Checker &lt;a href=&quot;http://codep.lab.p1k.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://codep.lab.p1k.org/&lt;/a&gt; (for Python language). It is based on an effective fuzzy searching algorithm that deals with the above-mentioned plagiarism techniques, detecting both absolutely similar and partly similar sequences in the source code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The service is free, but the registration is required for access. &#xA;Here is the link to the Registration Form: &#xA;&lt;a href=&quot;https://docs.google.com/forms/d/e/1FAIpQLSfa0dgcWBp70NHFwKk44H5QwpA8Appjwj4eZ7GO5YW62xy7Lw/viewform?usp=sf_link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.google.com/forms/d/e/1FAIpQLSfa0dgcWBp70NHFwKk44H5QwpA8Appjwj4eZ7GO5YW62xy7Lw/viewform?usp=sf_link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6854" LastEditorUserId="6854" LastEditDate="2019-04-24T08:15:51.557" LastActivityDate="2019-04-24T08:15:51.557" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5541" PostTypeId="2" ParentId="5527" CreationDate="2019-04-17T15:42:52.587" Score="3" Body="&lt;p&gt;One good way to improve is to try new projects. Think of a problem and try to create a solution for it. That forces you to look at new tools and techniques. Another thing I do is revisit old code about once a year. I go back to it to see if I can improve it with new things I've learned or to catch old miatakes. When I can improve the code with things I've learned, it's encouraging because I can see my progress. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, there is a lot of info out there. When I first started programming and wanted to improve, my biggest problem was that I didn't know where to start. So, I looked at the Software Development Lifecyle because it cuts the process of developing software into different chunks &gt; Planning, Analysis, Design, Implementation, Test &amp;amp; Integration, and Maintenance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, I focused on learning about skills and tools for each of those chunks. For example, when I wanted to learn about testing, I looked up &quot;testing tools&quot; and &quot;testing methods&quot; for software and tried out new tools and techniques whenever I started a new project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even if you're not specifically interested in software development, the skills you'll learn by looking further into each piece of that life cycle will help you. For instance, let's say you write a lot scripts and you look at the maintenance piece of the software development lifecycle. By looking into maintenance techniques, you may find better ways to write code to make it more efficient and easier to maintain. Essentially, looking at pieces of the life cycle helps narrow down the areas you're looking at a bit so you don't get overwhelmed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last thing: keep in mind programming skills don't always have to deal with just writing code. Improving programming skills can also include how you package your code, how structure/design it, or becoming familiar with how code is compiled.&lt;/p&gt;&#xA;" OwnerUserId="5476" LastActivityDate="2019-04-17T15:42:52.587" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5542" PostTypeId="1" AcceptedAnswerId="5543" CreationDate="2019-04-18T00:30:39.490" Score="3" ViewCount="89" Body="&lt;p&gt;It's the end of the semester, so my students are pretty burnt out, and a bit of sugar might go a long way (plus, evaluations are around the corner ;-). I'm envisioning a tactile class where students would carry out the selection sort algorithm to sort an array of candy bars by length (or height, or size), by physically swapping candy bars. I would also have them write down the number of comparisons required, to get a better understanding of the time complexity. Ideally, every student (or pair) would get 4 pieces of candy. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can anyone suggest candy that naturally comes packaged into 4 or more different sizes?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;All I could think of is how Hershey bars can be broken along natural dividing lines into different numbers of squares, and how Toblerone bars also have natural break points. But both are chocolate and might melt. I'm embarrassed to admit I'm not much of an expert on candy bar types.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2019-04-19T01:15:53.983" Title="Suggestions for teaching selection sort with candy" Tags="|lesson-ideas|undergraduate|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5543" PostTypeId="2" ParentId="5542" CreationDate="2019-04-18T02:41:29.037" Score="3" Body="&lt;p&gt;Actually, I might suggest a slightly different tact: provide a variety of candies (small boxes of nerds, Hershey's kisses, and the like) and have them selection sort by preference order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They can also sort by height, brightness, weight, or duration of the candy experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And as long as you're at it, you might first have them just sort it one of those ways however they do it naturally, which can lead to a nice discussion about why we can't articulate what we're doing very well, but it's some sort of massively parallel selection sort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can do a number of sorts, culminating in your selection sort by preference order.  And at the very end, tell them all to look around at their neighbors sorts to see if there are any obvious trades that they should be making!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-04-18T02:41:29.037" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5544" PostTypeId="2" ParentId="5542" CreationDate="2019-04-18T11:41:15.163" Score="2" Body="&lt;p&gt;This sounds like a bad plan. Students won't learn much of anything by sorting four items. Especially if they can &quot;see&quot; all of the remaining items. They don't need a scan if they can visually select the next item. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that you sort tokens instead. Then use the candy as prizes for various things, or just make it a sorting &quot;party&quot; where the yummies are free. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need around 10 or so tokens for each group to get any sense about efficiency. And you need to write instructions, especially for selection sort, that make it impossible to see all of the values at once. One way is to use &quot;poker chips&quot; with numbers on one side. When face down you have to examine them one at a time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make sure that whatever sort you use and whatever props that you don't make it possible to use non-algorithmic human capabilities like sight or touch to avoid following the rules. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Safety note. Your profile says you teach college. For those teaching youngsters, however, note that not every kid can handle sugar for medical reasons. Other treats might be necessary. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-18T11:52:48.627" LastActivityDate="2019-04-18T11:52:48.627" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5546" PostTypeId="2" ParentId="5542" CreationDate="2019-04-19T01:15:53.983" Score="2" Body="&lt;p&gt;My personal favorite way to teach sorting is with rubber ducks. I have a large set of ducks that have numbers on the bottom. Since they sit with the number covered, the students have to pick up a duck to check the number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could do something similar with candies if you wanted, where you write a number or letter or something on the outside of the package that will sit face down.&lt;/p&gt;&#xA;" OwnerUserId="6308" LastActivityDate="2019-04-19T01:15:53.983" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5548" PostTypeId="2" ParentId="5527" CreationDate="2019-04-19T02:38:09.010" Score="4" Body="&lt;p&gt;You can follow below points according to your stage of learning. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you done with basic syntax of any programming language then try to solve logical problems from various platform like hackerrank, codechef and many more. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Find out other  techniques or methods to solve same problem in different ways. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you done with logical question then try for Object Oriented Programming in that particular language.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;After that you can go with Data Structures and Algorithms. Try to implement Tree, Hash tables, etc. After learning it's theory and syntax. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you already a developer then you can try following suggestion. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Learn and try some new frameworks in you field. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Search and learn how to make you project scalable. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Search for adding security in projects and programs. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Participate in online hackathon and work with team. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Learn how to integrate like you are back end developer and one of your friend either IOT or app or something else then try to integrity with your platform or do project something like that. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Try reverse engineer code of someone else from online source and learn new techniques and methods.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6884" LastActivityDate="2019-04-19T02:38:09.010" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5551" PostTypeId="1" CreationDate="2019-04-20T05:49:14.047" Score="15" ViewCount="10211" Body="&lt;p&gt;I recently had a student in my Intro to CS class ask me: what is a file? I can't honestly say I had a good answer for him. Those of us who have been around a while &lt;em&gt;know&lt;/em&gt; what a file is, but I was at a bit of a loss to explain it to a novice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today's students believe (and rightfully so) that a file is an icon-thingy in a folder or on the Desktop. They have some vague idea that there are files for images (JPEG, GIF, PSD, etc.), files for music (MP3, WAV), files for doing office stuff (docx, pptx, etc.), and maybe even HTML files. But they don't know what's &lt;em&gt;in&lt;/em&gt; a file. That's where I kind of stumbled around for a few minutes because I didn't have a good answer prepared, nor a really good demonstration.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking back, I think I might have shown him what a text file looks like using a hex editor. Maybe also a simple image format such as PBM or BMP. I searched around on YouTube for a good video, but found pretty much nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you've been asked this question before, what's your answer? What &lt;em&gt;is&lt;/em&gt; a file?&lt;/p&gt;&#xA;" OwnerUserId="6704" LastActivityDate="2021-10-05T10:17:33.363" Title="What is a file?" Tags="|operating-systems|file-system|" AnswerCount="10" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5552" PostTypeId="2" ParentId="5551" CreationDate="2019-04-20T13:03:20.123" Score="2" Body="&lt;p&gt;Was in a conference the other day and someone was showing intercept security... A .exe file started with MZ. Why? Those are the initials of the man who created the first DOS executable file format. Many kinds of files have 'signatures' in the first few bytes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used to use a tool called 'strings' that would show any displayable sequences of characters in an otherwise 'binary' file. Helpful sometimes. We have gotten far away from this level of reality in our everyday use of computers, so it is good to show that there is really no mystery, it is all just a heap of ideas people have had over time, piled up in layers. Start at the bottom with characters and follow the clues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Attack it in many ways, showing the aspects of 'files' that are meaningful to you. Give some of the history. I am sure you can come up with analogies. One issue is that although 'file' makes some sense, 'folder' does not, because we don't ever nest manila folders! Nnnnt! The other term, 'directory', has fallen in to disuse, and really is not any better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is a synonym for what we call folder...? There isn't one! It is a brand new concept, like variables. Nothing else in our world is like that. This is why we have to show that analogies are limited and misleading. You have to actually &lt;em&gt;know&lt;/em&gt; some things.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2019-04-20T13:03:20.123" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5553" PostTypeId="2" ParentId="5551" CreationDate="2019-04-20T14:04:12.530" Score="4" Body="&lt;p&gt;&quot;File&quot; is an abstraction. Even worse, we use it for different abstractions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well, suppose I copy a file to this site, and you download it. Would you say it is the &lt;em&gt;same file&lt;/em&gt;?  What do you mean by &lt;em&gt;same&lt;/em&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually, we'll have, more or less, parts of our hard disks (or is it a floppy?) containing bytes which we understand (through the magic of operating systems) as a representation of the same informations.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2019-04-20T15:50:51.753" LastActivityDate="2019-04-20T15:50:51.753" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5557" PostTypeId="2" ParentId="5551" CreationDate="2019-04-20T20:55:55.303" Score="2" Body="&lt;p&gt;Nothing wrong with citing all the &quot;dictionary&quot; definitions found on the Internet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd add that a file tends to be the lowest level of abstraction of a container or boundary around data that the Operating System manages.  That is the file's name is accessed through the OS and if you want to know the bits and bytes of data &quot;in&quot; the file you need an Application or program to read/write the file.  The OS &quot;promises&quot; to return the data to any Application in the same order in which the creating Application specified but physically the OS may scatter the data to the wind - as long as the OS can return the data properly to some Application.&lt;/p&gt;&#xA;" OwnerUserId="6892" LastActivityDate="2019-04-20T20:55:55.303" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5558" PostTypeId="1" AcceptedAnswerId="5613" CreationDate="2019-04-20T21:34:52.723" Score="5" ViewCount="573" Body="&lt;p&gt;I am preparing a lesson about polymorphism in C++ and I would like to give an original example other than animals and shapes and I am really struggling with it because I realize polymorphism is not that useful for real concrete applications.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can someone suggest a good example of polymorphism use?&lt;/p&gt;&#xA;" OwnerUserId="6890" LastEditorUserId="204" LastEditDate="2019-04-21T21:13:21.437" LastActivityDate="2019-05-03T14:29:13.240" Title="Concrete example for polymorphism use?" Tags="|polymorphism|" AnswerCount="6" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5559" PostTypeId="2" ParentId="5558" CreationDate="2019-04-21T00:15:35.150" Score="3" Body="&lt;p&gt;Bearing in mind that the only good analogy or example or metaphor of a computer thing is the computer thing, because computer things are not really like anything else (or they would just be that thing anyway):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created an example for my students using a Tic Tac Toe game, which can be played by a human against the computer, or having it play many games against itself and tally the results. I created 5 strategies, each built on the one simpler than it, as follows  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Idiot - picks a square at random  &lt;/li&gt;&#xA;&lt;li&gt;Naive - tries for center then corners, then invokes Idiot.  &lt;/li&gt;&#xA;&lt;li&gt;Blocker - tries to block the predicted next move of opponent if it would lead to a win.  &lt;/li&gt;&#xA;&lt;li&gt;Winner - tries for a winning move itself.  &lt;/li&gt;&#xA;&lt;li&gt;Killer - (I forget how this one works, see if you can figure it out.)  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I was able to explain how the strategies are based on a simpler one and add some capability. The 'Tournament' feature played each strategy against all others 10,000 times and showed the results. It was very convincing. So, &lt;strong&gt;games&lt;/strong&gt; might be a good realm to explain.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2019-04-21T00:15:35.150" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5561" PostTypeId="2" ParentId="5551" CreationDate="2019-04-21T18:05:55.477" Score="8" Body="&lt;p&gt;I would approach this pragmatically, beginning with the metaphor that kicked it off.  I would tell the students something like this:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine that it's 1925, and you're working at a giant company like General Electric as a secretary.  There are files, meaning pieces of paper, for all kinds of things. Personnel files about employees, files of record for payments, files of company policies, board meetings, tax documents, you make it.  There are hundreds of rooms holding thousands of file cabinets holding millions of files in hanging folders.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the metaphor of a file, then, is a document with some information about something.  And the metaphor for the folder is as a place to store those files.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also call these folders &quot;directories&quot;, another metaphor.  A &quot;directory&quot; is from the same etmological root as direction, and it means &quot;to guide&quot;.  So, folders can be thought of as places where files sit, or can be thought of as a guide to where files are.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But translating that idea to the very alien mind of a computer involves some tweaks.  First there's the idea that folders can contain folders, which can contain more folders still.  This is incredibly convenient, and using the same metaphor as &quot;directory&quot;, we call the list of folders and subfolders and subfolders that bring us to a particular file as a &quot;path&quot;.  Get it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the files themselves, there are two perspectives to think about this.  Again, the metaphor is there, but it breaks apart a bit in translation:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is from the file system, which is concerned with being able to store and retrieve these files.  As far as the file system is concerned, a file is a size and a series of locations as to where the various parts of the file are stored.  This is because the files don't have to be contiguous inside the computer.  It doesn't actually matter if the first half is stored over here in the hard drive and the second half is stored somewhere else, since the file system will retrieve it for us as if it were one document anyway.  The file system just has to keep track of everything so that the files can be assembled properly when they are needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second perspective is the perspective of a file itself, which is really just some way to store some data, after all.  So far, that's just like a file in our big office.  But our files can store so many different kinds of data! We aren't just storing readable text.  We can store pictures.  We can store sounds.  We can store runnable code.  All of these require very different internal organizations, so the contents of files are extremely variable.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many files begin with some sort of metadata.  &quot;Hey, I'm a picture, and this is my encoding and my color depth and my size and and and and...&quot;.  Some files depend on the file system to just remember what kind of files they are.  Every file is designed to be read by programs or by the computer itself, and is highly organized to make this possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, a &quot;file&quot; means different things in different contexts, and the only overriding idea is that a file is a way to group data together.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-04-21T18:05:55.477" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5562" PostTypeId="2" ParentId="5558" CreationDate="2019-04-21T18:36:54.307" Score="6" Body="&lt;p&gt;Say you want to present a choice of interactive games &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;   out.println(&quot;Which game (...) ?&quot;);&#xA;   Game game;&#xA;   switch (in.nextLine()) {&#xA;   case &quot;HI-LO&quot; : &#xA;         game = new HighLowGame();&#xA;         break;&#xA;   case &quot;Riddle&quot; : &#xA;         game = new RiddleGame();&#xA;         break;&#xA;        ...&#xA;   }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Here you are. You have polymorphism. The &lt;code&gt;game&lt;/code&gt; variable may refer to objects of different types.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, how to play a game (in textual form) ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;     out.println(game.getPresentation());&#xA;     while(! game.isOver()) {&#xA;         out.println(game.getQuestion());&#xA;         out.print(&quot;&amp;gt; &quot;);&#xA;         game.submitAnswer(in.nextLine());&#xA;         out.println(game.getMessage());&#xA;     }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Polymorphic code. Now what is in a Game?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    interface Game {&#xA;        String  getPresentation();&#xA;        boolean isOver();&#xA;        String getQuestion();&#xA;        void submitAnswer(String line);&#xA;        String getMessage();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An implementation ?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;class RiddleGame implements Game {&#xA;    String getPresentation() {&#xA;         return &quot;What cheese is made backwards?&quot;;&#xA;    }&#xA;    String getQuestion() {&#xA;         return &quot;Guess it!&quot;;&#xA;    }&#xA;    boolean found = false;&#xA;    void submitAnswer(String line) {&#xA;        found = line.trim().equals(&quot;edam&quot;);&#xA;    }&#xA;    boolean isOver() {&#xA;        return found;&#xA;    }&#xA;    String getMessage() {&#xA;        return found ? &quot;you got it:&quot; : &quot;no, it isnt&quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Boring java details omitted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;[rant] &#xA;Most introductory examples for OOP are utterly silly and totally inadequate to explain that classes are here to offer &lt;strong&gt;services&lt;/strong&gt;. This unfortunate fact leads them to a lot of misconceptions.&#xA;[/rant]&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of OOP is NOT to build taxonomies of animals, or make container objects with a getter and a setter for each attribute. It is not to model even a simplified view of the real world. It is there to write code which &lt;strong&gt;does&lt;/strong&gt; something.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Oh, well, I see you don't like the RiddeGame because it knows only one joke.  So introduce a RiddleProvider as a parameter, whose job is to supply a Riddle  (question + answer pair).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can imagine several kinds of RiddleProviders, so it is itself an interface with different implementations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The simplest is the AlwaysTheSameRiddleProvider, which only know one joke, just like me. Others can run a predefined sequence, or a random choice, from an array, or from a file. Again, they offer a &lt;strong&gt;service&lt;/strong&gt; to be used by another object.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2019-05-01T13:09:23.320" LastActivityDate="2019-05-01T13:09:23.320" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5563" PostTypeId="2" ParentId="5558" CreationDate="2019-04-21T21:29:45.357" Score="3" Body="&lt;p&gt;As a professional software engineer, I used polymorphism all of the time.&#xA;Here are a few examples.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Printer driver, is inherited by different printer drivers.&lt;/li&gt;&#xA;&lt;li&gt;Window: different types: vertical packing, horizontal packing, stackable, free. Are all types of window, they all contain other displayables. Window also inherits from displayable (so windows can contain windows.&lt;/li&gt;&#xA;&lt;li&gt;Container libraries.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I well designed system can use inheritance all over the place. But can also be over used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note there are many ways to do polymorphism, including:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;run time, poylmorphism: virtual inheritance, templates, function pointers.&lt;/li&gt;&#xA;&lt;li&gt;compile time: &lt;code&gt;#include&lt;/code&gt; (arrange for different files to be included).&lt;/li&gt;&#xA;&lt;li&gt;link time: arrange for different libraries to be linked.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-04-21T21:29:45.357" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5564" PostTypeId="2" ParentId="5558" CreationDate="2019-04-22T01:45:07.163" Score="5" Body="&lt;p&gt;Almost any popular library such as Boost will have tons and tons of code with polymorphism examples. For instance, look at &lt;a href=&quot;https://www.boost.org/doc/libs/1_70_0/doc/html/poly_collection/reference.html&quot; rel=&quot;noreferrer&quot;&gt;Polymorphism models write up&lt;/a&gt; in Boost. I'm sure, you used them a lot too, e.g. iterators in containers, streams and so on. They're extremely practical&lt;/p&gt;&#xA;" OwnerUserId="6827" LastActivityDate="2019-04-22T01:45:07.163" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5565" PostTypeId="2" ParentId="5551" CreationDate="2019-04-22T01:57:39.047" Score="6" Body="&lt;p&gt;The question is actually quite deep. For instance, I'm sure you've heard the phrase &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Everything_is_a_file&quot; rel=&quot;noreferrer&quot;&gt;everything is a file&lt;/a&gt;,&quot; that is associated with a design of Unix operating system. So, the answer could be puzzling &quot;a file is almost everything in Unix,&quot; for example devices can &quot;look like&quot; files to some processes. They use a file as a common interface between many processes. Hence, the file is quite a general notion of a sequence of bytes in Unix.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My simple answer would be that a file is a sequence of bytes with a reference to them, by which you can access these bytes.&lt;/p&gt;&#xA;" OwnerUserId="6827" LastActivityDate="2019-04-22T01:57:39.047" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5566" PostTypeId="1" AcceptedAnswerId="5711" CreationDate="2019-04-22T03:41:39.207" Score="6" ViewCount="410" Body="&lt;p&gt;Some students come to CS field but they have no idea about any programming language. Either they will have the background of engineering or medical. But still they want to make CS their field. What technique should be applied on them to take start, clear their initial concepts and make ready them how to code any program?&lt;/p&gt;&#xA;" OwnerUserId="6894" LastEditorUserId="150" LastEditDate="2019-04-24T10:34:55.800" LastActivityDate="2019-05-25T16:34:09.860" Title="How to teach C++ language to beginners of (BSCS) students who have no any idea about it?" Tags="|programming|c++|" AnswerCount="4" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="5567" PostTypeId="2" ParentId="5566" CreationDate="2019-04-22T14:44:34.133" Score="2" Body="&lt;p&gt;I would make it hands on and C-based, with very little OOP in the beginning. You can code in C++ using it as a &quot;better&quot; C. You'd introduce classes by the way without making a big deal of OO stuff. I'd focus on I/O, data structures, particularly, containers such as lists and arrays, and algorithms such as search and sorting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe write simple utilities, e.g. renaming files in the directory using wild cards. Building pipes like in Unix tools, e.g. write on program that reads from input stream and replaces special characters with spaces, then output result into output stream. Then write another program that reads IOS and counts words, then outputs. Then you make a silly pipe out of these two etc. This type of exercise packs a lot of different concepts together and can make things interesting to non CS students. This stuff will easily fill the semester.&lt;/p&gt;&#xA;" OwnerUserId="6827" LastActivityDate="2019-04-22T14:44:34.133" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="5568" PostTypeId="2" ParentId="5566" CreationDate="2019-04-23T12:13:13.070" Score="4" Body="&lt;p&gt;While I would suggest a different language for beginners, I'll take it as given here that the students need to learn C++ and not just programming for general use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case, teach them Modern C++. That means C++ versions 14 and 17 and don't bother with anything earlier. To do this find a good book that focuses on those versions (or later if you are reading this in the future) and has been developed by someone who has good knowledge of pedagogy as well as the language. There are a couple of books available on Amazon that meet this criteria. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that you give up nothing by starting with the current version. The book will still cover the low level details that were inherited from C and that are still useful. You won't spend time trying to learn the things that have become obsolete for modern software development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, the important point is that a modern language comes with a set of idioms that enable its proper use. A language is &lt;em&gt;not&lt;/em&gt; just a collection of features that you combine arbitrarily. It was designed with a vision. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, once you get beyond trivial programs, you want to learn the current idiomatic usage of the language (whatever it is) along with the lower level details. In particular, you don't want to spend time on the idiomatic usage of an earlier version of the language once they have become obsolete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will also note that programming in a language requires the programmer to adopt some mental model. If a language is well designed, then it is possible to program completely within that model without worrying about how that model is implemented in some lower level model. That is to say, the model will be both &lt;em&gt;consistent&lt;/em&gt; and &lt;em&gt;complete&lt;/em&gt;. So, a book with good pedagogy will emphasize how you use that model to create useful artifacts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage of Modern C++ is that many of the pitfalls of earlier versions (and especially those of C) have been removed through the use of standard libraries. Lots of the kinds of errors that seem invariably to creep into commercial software don't occur at all (and so fewer viruses,...) if the programmer understands the libraries and the proper idiomatic use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no need to take an historical approach to computing, starting with machine level programming and working UP to some higher level. That was my approach, actually, since I grew up with that history and have been programming for over 45 years. I didn't then use the languages that I use today since they didn't exist, not because it was better, in some way, for me to use primitive languages first. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that if a language does &lt;em&gt;not&lt;/em&gt; provide a complete and consistent abstraction model for programming (if it isn't &lt;em&gt;Turing Complete&lt;/em&gt;) then you &lt;em&gt;would&lt;/em&gt; have to try to understand its features in terms of some lower level implementation mode. Otherwise you can learn the language directly and understand how the parts fit together idiomatically to write &lt;em&gt;any&lt;/em&gt; program using a single mental model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you, as an individual want to learn everything bottom up, then go ahead. But if you are a teacher, I suggest that you don't impose that way of learning on your students. It is inefficient and unnecessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once the students learn to program at a given (complete and consistent) level of abstraction they can &lt;em&gt;then&lt;/em&gt; learn about how things are built or use them to build higher level abstractions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I had a choice of first teaching language today, it would probably be either Haskell (functional) or Scala (Object oriented). Both of these offer complete and consistent mental (abstraction) models as well as rich libraries. The teaching method would be to teach the idiomatic usage, not just the features. There are others that would serve equally well. The mental model needs to be taught along with the language. That is a pedagogical issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However for someone with less background in language principles and in programming pedagogy, I'd probably rather recommend Python or Java, just because of the wealth of teaching materials available, combined with a rational abstraction model. Creating good teaching materials in any language is hard work. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'll also note here that many people have the experience that the second language they learn is the hardest, especially if it is either quite similar or quite different. That is due to the fact that your first language teaches you (you believe) &lt;em&gt;how to program&lt;/em&gt;, so, the new language feels awkward and one tries to apply the idioms of the old language to the new one. It won't work. Even languages as close as Java and Ruby have different idioms. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-23T17:56:20.347" LastActivityDate="2019-04-23T17:56:20.347" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5569" PostTypeId="1" CreationDate="2019-04-24T02:06:36.947" Score="5" ViewCount="135" Body="&lt;p&gt;I'm teaching an upper-division college Programming Languages course, in which students have learned some Scheme, Haskell, and Go. Students' strongest language is Java, which we use in most of our courses. I have a free 75-minute lecture period. Any recommendations how to use that time? I can have the students bring their laptops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My reasons for wanting to introduce Kotlin are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Showing how the functional programming has been added onto an imperative object-oriented language they know well.&lt;/li&gt;&#xA;&lt;li&gt;Showing them how Kotlin uses a stripped down version of Java's syntax without losing expressiveness.&lt;/li&gt;&#xA;&lt;li&gt;Augmenting what they are learning in another class of mine, in which they are learning to program Android in Java. (That's why I chose Kotlin rather than Scala.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2019-04-24T03:52:28.027" LastActivityDate="2019-04-27T20:27:37.007" Title="How to introduce Kotlin in a Programming Languages course" Tags="|introductory-lesson|functional-programming|kotlin|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5570" PostTypeId="2" ParentId="5569" CreationDate="2019-04-24T03:29:46.243" Score="3" Body="&lt;p&gt;I think the answer to that depends on how you're structuring the course overall, and what Kotlin brings to the teaching of those ideas.  I know of three distinct approaches to an upper-division PL course:  the &quot;paradigms&quot; curriculum (à la Sebesta's book), the &quot;interperter/design space&quot; curriculum (EOPL, Scott's &quot;Programming Language Pragmatics&quot;, Louden, Turbak/Gifford/Sheldon, etc.), and the hybrid theory/implementation curricula (less common and few things in print: the Racket team, Norman Ramsey's adaptation-in-progress of Samuael Kamin's book).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do any of these describe what you're doing with your course?  What is it that Kotlin brings to the class that is not already represented by the other three functional languages your students have learned?&lt;/p&gt;&#xA;" OwnerUserId="4799" LastActivityDate="2019-04-24T03:29:46.243" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5572" PostTypeId="5" CreationDate="2019-04-24T10:24:40.997" Score="0" Body="&lt;p&gt;C++ is a programming language created as an extended version of C. It can be object oriented and generic and can also work with &lt;a href=&quot;https://en.wikipedia.org/wiki/Low-level_programming_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;low-level memory&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;C++ has been used in CS education for many reasons. While still relatively low-level (e.g. pointers and other C concepts), it can also be used to teach OOP.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More information can be found in the &lt;a href=&quot;https://en.wikipedia.org/wiki/C%2B%2B#Language&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++ Wikipedia page&lt;/a&gt;, and on the &lt;a href=&quot;https://isocpp.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++ website&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2019-04-24T10:24:40.997" LastActivityDate="2019-04-24T10:24:40.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5573" PostTypeId="4" CreationDate="2019-04-24T10:24:40.997" Score="0" Body="Questions about instruction specific to the programming language C++. Use this tag only when the language used would affect the question significantly (if your question uses C++ as an example, but does not focus on the language itself, you need not use the tag)." OwnerUserId="150" LastEditorUserId="150" LastEditDate="2019-04-24T10:24:40.997" LastActivityDate="2019-04-24T10:24:40.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5574" PostTypeId="2" ParentId="5569" CreationDate="2019-04-24T13:13:03.800" Score="2" Body="&lt;p&gt;Just free associating here, actually. The single session of 75 minutes is awfully short to actually have you do anything and &lt;em&gt;then&lt;/em&gt; have the students learn anything. So....&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, flip the classroom for that session even if you don't generally. Give them a week (more or less???) to study Kotlin on their own, so that they have some sense about its syntax and main features. You may have to give them an outline of what to focus on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the single session, have them build a stateless server for some simple app using Kotlin in small groups, even pairs. Making it stateless lets you more easily stress the FP aspects (I think, but haven't actually tried it). Note: still thinking about the stateless part. Think about sending them something the evening before the session to get them thinking about what is coming. Not a spec, though, since some will try to do too much beforehand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possibility that will help speed up the day's work is to send them a skeleton application the night before. The task of the class will be to extend the skeleton to something useful. I would probably do that if it were my class, actually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the last quarter hour for a retrospective on what they learned and point them toward the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know if this would be successful. It might fail. It might require modification for a future use. Owen Astrachan at Duke as advocated that some small percentage of what you do in a course &lt;em&gt;should&lt;/em&gt; be experimental so that you can learn more about what works and what doesn't. But be prepared for it to fail so that students can learn even from failure. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-24T16:26:18.017" LastActivityDate="2019-04-24T16:26:18.017" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5575" PostTypeId="1" CreationDate="2019-04-25T18:44:37.120" Score="2" ViewCount="247" Body="&lt;p&gt;I have taught AP Computer Science A for years, but I have not taught AP Computer Science Principles as of yet.  My understanding of the course is that it's quite flexible on terms of languages taught.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been noodling around with creating a course in game design using Unity, and I wondered how much that could be merged into APCSP.  Has anyone taught APCSP using Unity for a substantial portion of the course, and how did that go?  Alternatively, is this really not possible under the AP curriculum?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-06-10T23:34:58.903" Title="AP Computer Science Principles and Unity" Tags="|ap-cs-principles|game-design|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5576" PostTypeId="1" AcceptedAnswerId="5577" CreationDate="2019-04-25T19:22:13.400" Score="-1" ViewCount="104" Body="&lt;p&gt;As a student we didn't have interest in every subject of computer science because some of these subjects have different domains of learning. But in case if you have didn't properly done with one subject you are not able to get through the other important subjects like #CC , #Automata, #Data structures etc. &#xA;what should we do in that case if we have no interest in these subjects like #Machine Learning and (#Data analysis and algorithms) and also the instructor make these subjects more boring for us? &lt;/p&gt;&#xA;" OwnerUserId="7913" LastActivityDate="2019-08-08T22:00:10.367" Title="how can i build up interest in learning some dry but important subjects of BS(CS)?" Tags="|student-motivation|self-learning|computational-thinking|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5577" PostTypeId="2" ParentId="5576" CreationDate="2019-04-26T15:18:18.140" Score="5" Body="&lt;p&gt;I hate to be unkind, but I wonder if you are blaming others for your own lack of effort and commitment. I don't think that everything that you need to study needs to be &quot;interesting&quot; before you make a success of it. Some things just need to be done and done well. It is hard, of course, when it isn't interesting, but if you have a goal then you can work through that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own experience in grammar and early secondary school was that I was a complete loss and wasn't interested in anything there. But I had no goal, so it didn't matter. I eventually &quot;came 'round&quot; but I was a late starter. My only goal in school was to not be there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you can't work through hard things when you &lt;em&gt;do&lt;/em&gt; have a goal, then you aren't likely to be successful as every minor rock becomes a mountain to get over. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think your instructor is &quot;boring&quot;, maybe s/he is, but that should be a challenge to learning, not a block. You don't help yourself by just quitting when the subject or the presentation is boring. The tasks are the same. You need to do a lot of exercises, write a lot of programs, etc. Hopefully the instructor will find a way to give you the necessary feedback, but there are books, etc. that cover the material. Not every teacher will be Michael Sipser, though you will be lucky if you find a few who are exemplary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your education is your responsibility. It isn't something dumped into your head by others. Being entertaining isn't actually part of the job description of any teacher. Setting the conditions in which learning can occur is, of course. But that mostly involves setting tasks for the student and then evaluating them and giving feedback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer the question directly: focus on your goals and use them to smooth out the hard bits. Don't focus on the difficulties and miss your goals. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-26T15:31:00.007" LastActivityDate="2019-04-26T15:31:00.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5579" PostTypeId="1" AcceptedAnswerId="5580" CreationDate="2019-04-27T18:45:09.457" Score="58" ViewCount="26573" Body="&lt;p&gt;I am curious why computer-science majors have to learn calculus to receive their bachelor’s degrees. My father worked as a software engineer for twenty years and never used it. It seems to have little more value in programming than other forms of mathematics. What is it about calculus that makes it a requirement for computer-science majors? Is it just that it's a tradition in STEM fields?&lt;/p&gt;&#xA;" OwnerUserId="5334" LastEditorUserId="25" LastEditDate="2019-04-28T21:15:49.143" LastActivityDate="2020-05-08T20:43:58.283" Title="Why do computer-science majors learn calculus?" Tags="|mathematics|" AnswerCount="18" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5580" PostTypeId="2" ParentId="5579" CreationDate="2019-04-27T20:22:20.967" Score="63" Body="&lt;p&gt;There are several answers:&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Answer 1: Not all CS programs&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;First, not all CS programs require calculus in order to get a bachelor's degree. The Bachelor of Arts (BA) program at Mills College, where I teach, does not require calculus. Instead, we require two semesters of discrete mathematics, which we consider far more useful to computer scientists, because it (at least the way we teach it) includes:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;inductive proofs&lt;/li&gt;&#xA;&lt;li&gt;Boolean logic&lt;/li&gt;&#xA;&lt;li&gt;proof by contradiction&lt;/li&gt;&#xA;&lt;li&gt;sets&lt;/li&gt;&#xA;&lt;li&gt;combinatorics&lt;/li&gt;&#xA;&lt;li&gt;basic probability&lt;/li&gt;&#xA;&lt;li&gt;recurrence relations&lt;/li&gt;&#xA;&lt;li&gt;graph theory&lt;/li&gt;&#xA;&lt;li&gt;matrices&lt;/li&gt;&#xA;&lt;li&gt;regular expressions&lt;/li&gt;&#xA;&lt;li&gt;finite state automata&lt;/li&gt;&#xA;&lt;li&gt;formal languages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3&gt;Answer 2: Scientific foundation&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;That said, getting a Bachelor of Science (BS) degree from Mills or just about any other school requires calculus as part of general scientific knowledge, along with introductory chemistry, biology, physics, etc., none of which we claim someone will necessarily be useful to a computer scientist. These courses are part of the college-wide BS core, not specified by any individual department. The idea is that anyone holding a BS degree should understand the fundamentals of major scientific fields even if they will never apply them in their careers. (Similarly, most colleges require students to take classes in history, even though they are unlikely to become time travelers.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Answer 3: Historical reasons&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;Computer science as an academic discipline has not been around that long. Most CS programs started within either Mathematics or Electrical Engineering programs. Both of those fields legitimately require calculus. I went to MIT, where CS was added to the EE department. All CS majors were required to learn both digital and analog electronics, the latter of which requires calculus.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Personal thoughts&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;In my decades as a computer scientist, including in industry, I never used any of what I learned in the required calculus (I, II, and III), linear algebra, or differential equations. That said, they did give me the background to go into computer graphics, electrical engineering, or machine learning, had I later chosen to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whether programs &lt;em&gt;should&lt;/em&gt; require calculus is another question. &lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="58" LastEditDate="2019-04-29T23:31:27.820" LastActivityDate="2019-04-29T23:31:27.820" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5581" PostTypeId="2" ParentId="5569" CreationDate="2019-04-27T20:27:37.007" Score="2" Body="&lt;p&gt;What I ended up doing (partly because I didn't have much prep time for me or the students) was using the class period to have pairs of students work together through &lt;a href=&quot;https://play.kotlinlang.org/koans/overview&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kotlin Koans&lt;/a&gt;. I walked around pointing out similarities to and differences from other languages we studied.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantage of this approach was that students got to actively learn parts of the language. The major disadvantages were not providing the history and not ensuring that all important concepts were introduced. I plan to do those in a subsequent lecture, if time permits.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2019-04-27T20:27:37.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5582" PostTypeId="2" ParentId="5579" CreationDate="2019-04-27T20:41:00.733" Score="12" Body="&lt;p&gt;This isn't really an answer, but I'd like to say a few things about calculus. I think that what is needed by a CS major from that realm and what is needed by a math major are very different. As such, I think that if calculus is taught to CS majors, and to history majors, for that matter, the needs imply that it might be a different sort of course than that taken by the math majors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, not a lot of people who have taken Elementary Calculus (i.e. Calc I, II, and III) actually have much insight into what is really the point. It is easy to get lost in details of differentiation and integration and techniques and such without realizing that it is really a study of the relationship between what happens locally with a function (differential calc) and what happens globally (integral calc). It is all tied together by the Fundamental Theorem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But even the nature of the derivative is poorly understood for a long while - it took me several years of graduate study in math to really grok it. The derivative you study in Elementary Calculus is really only one specific form of a wide variety of possibilities. The limit used in Elementary Calculus could be replaced by alternatives. The difference quotient in the derivative could be replaced by another &quot;average ratio of change&quot;. This would result in a different theory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the standard version of Elementary Calculus (note that I keep writing Elementary&quot;) is very good for understanding the behavior of well behaved functions: those that are mostly continuous. But aside from Catastrophe Theory (why do bridges fall down unexpectedly?) it is these continuous functions that form the basis of understanding a lot of the applications of both math and CS. Probability, for example, depends on calculus once you get past counting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, elementary calculus is useful for applications of rational thought to the real world - which CS folk do a lot of. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the &quot;nice&quot; functions of elementary calculus are pretty boring to a mathematician. The interesting functions are those that are misbehaved - even wildly misbehaved - even wildly misbehaved everywhere. A function that is continuous but nowhere differentiable starts to be interesting. A function that is continuous everywhere but zero, but takes on every real value in every neighborhood of zero starts to be interesting. That is where the calculus sequence is headed for math majors, but it probably isn't very useful for a CS person. How about functions not even defined on the rationals. Is that a &lt;em&gt;yummy&lt;/em&gt; or a &lt;em&gt;yucky&lt;/em&gt;? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, a good compromise, if a university can arrange it, is to have a single course that is something like Calculus I with some ideas of the derivative and the integral, but focused on why these are important (rates of growth, etc) rather than just computational details, might be worth designing and offered generally to people interested in becoming widely educated, rather than becoming mathematicians. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that this precise subject was the basis of my doctoral work: variations on the ideas of calculus and the deeper meaning for the study of functions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-04-27T21:15:30.803" LastActivityDate="2019-04-27T21:15:30.803" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5583" PostTypeId="2" ParentId="5579" CreationDate="2019-04-27T20:45:48.207" Score="15" Body="&lt;p&gt;Much of the material one learns in school has no direct utility in one's job as a software engineer. Conversely, much of the working knowledge one needs as an industry practitioner is not gained in school. What school is supposed to do is provide some basic knowledge and a basic framework for learning, out of which an individual is going to actively retain a small-ish portion for their day-to-day use on the job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, much engineering work is multi-disciplinary, and therefore &quot;surplus&quot; knowledge is not exactly useless: it can provide a useful bridge to other disciplines. Calculus in particular occurs in the math that describes physical processes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In today's global economy, it is likely that one will switch employers and job specializations multiple times in one's career. At the start of one's career it is impossible to foresee what knowledge is going to come in handy later on. About twenty-five years into my career, I found myself interfacing to domain specialists whose bread and butter are differential equations. When I was in school, studying for a CS degree, I could have taken optional classes to learn about differential equations, but decided not to as I was already struggling with my math workload. So late in my career I came to regret my earlier decision, as it put me at a disadvantage relative to colleagues with a working knowledge of differential equations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exact nature and number of math classes required in a CS program may in part be driven by departmental tradition. For example, in the school I attended, the CS program had grown out of the math program in the early 1970s. Therefore, math was heavily emphasized. In fact, as an undergrad I took exactly the same math classes as students in the math program. Out of those, linear algebra turned out to be useful for computer graphics, and numerics turned out to be useful for high-performance computing. Multi-dimensional analysis and statistics I never needed again, but it might have been quite different had my career taken me in a data science direction. &lt;/p&gt;&#xA;" OwnerUserId="1940" LastActivityDate="2019-04-27T20:45:48.207" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5584" PostTypeId="2" ParentId="5579" CreationDate="2019-04-27T22:35:24.040" Score="51" Body="&lt;p&gt;It's certainly of little use in CS fields which centre on databases, OSes, general PC applications, and anything like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's somewhat important in CS fields relating to data transmission. Whilst this is mostly centred on OSI layers and the like, there is theoretical work by Nyquist and Shannon which underpins it, and the theory is ongoing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However calculus and extensions from it are critical for a number of other major CS areas. Off the top of my head:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Digital signal processing for audio&lt;/li&gt;&#xA;&lt;li&gt;Digital signal processing for graphics&lt;/li&gt;&#xA;&lt;li&gt;Computer modelling of processes&lt;/li&gt;&#xA;&lt;li&gt;Optimisation of processes&lt;/li&gt;&#xA;&lt;li&gt;CGI&lt;/li&gt;&#xA;&lt;li&gt;Games with objects moving (most obviously in 3 dimensions, but even working out position changes for a varying speed in 1 dimension needs calculus)&lt;/li&gt;&#xA;&lt;li&gt;Computer vision&lt;/li&gt;&#xA;&lt;li&gt;Electronic control systems for anything that moves (cars, planes, missiles, machinery, ...)&lt;/li&gt;&#xA;&lt;li&gt;Some forms of data compression, especially lossy data/audio compression&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All of these either use calculus directly, or use further maths which is derived from calculus.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastEditorUserId="1864" LastEditDate="2019-04-28T02:13:10.510" LastActivityDate="2019-04-28T02:13:10.510" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="5585" PostTypeId="2" ParentId="5579" CreationDate="2019-04-27T23:08:04.700" Score="26" Body="&lt;p&gt;In addition to good answers given, some others.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Plenty of computer scientists do use calculus, and other important math.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's good general mathematical training, which is helpful to learn to think rigorously about other topics later on.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Building on the above, it's helpful for understanding (not just learning to write down, but understanding) some CS topics that might not directly require calculus, like growth rates of functions and big-O notation.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You could ask a similar question about, say, doctors and organic chemistry, and i think similar answers would apply.&lt;/p&gt;&#xA;" OwnerUserId="5751" LastActivityDate="2019-04-27T23:08:04.700" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5586" PostTypeId="2" ParentId="5579" CreationDate="2019-04-28T02:38:47.223" Score="25" Body="&lt;p&gt;While it's true that &lt;em&gt;today&lt;/em&gt; not all CS programs require calculus, I believe the answer to this question will change due to trends in Machine Learning and Data Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, many topics in Machine Learning -- such as neural networks -- require knowledge of derivatives to really understand common algorithms like gradient descent.  Familiarity with vector calculus, partial derivatives, etc., is essential for this reason.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, with the explosion in big data we need future CS grads to understand data science fundamentals -- including a deeper appreciation of probability and statistics than before, which invariably means more calculus.  Deriving the basic Normal distribution, for example, requires integrals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, I believe it is &lt;em&gt;now&lt;/em&gt; essential that CS grads learn calculus, even if calculus wasn't always required before.&lt;/p&gt;&#xA;" OwnerUserId="7920" LastActivityDate="2019-04-28T02:38:47.223" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5587" PostTypeId="2" ParentId="5579" CreationDate="2019-04-28T03:45:05.107" Score="-5" Body="&lt;p&gt;As Computer Science students, you should know the fundamentals of university mathematics, for the further development of your own skills.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that all science-oriented persons must study mathematics. For one thing, that study helps you to learn both of your subjects. And fundamentally, philosophically, I don't think that the two subjects are divided. Which is mathematics, and which is science? They are of a piece, essentially—they form an undivided unity.&lt;/p&gt;&#xA;" OwnerUserId="7922" LastEditorUserId="7958" LastEditDate="2019-05-03T17:15:48.870" LastActivityDate="2019-05-03T17:15:48.870" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5588" PostTypeId="2" ParentId="5551" CreationDate="2019-04-28T10:16:53.727" Score="5" Body="&lt;p&gt;I think in this case a short answer is better than a long one, which is harder, but I might give it a shot:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A file is a list of bytes and an identifier [location].&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Make sure to explain that there are no physical files and the term is just an abstraction.&#xA;With my definition you can explain the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you create a new file with a different identifier but the same bytes, it is a copy of the file.&lt;/li&gt;&#xA;&lt;li&gt;If you just change the identifier [location], you say the file moves.&lt;/li&gt;&#xA;&lt;li&gt;If you keep the identifier but change the bytes, the file is said to change.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The identifier can be different - e.g. a filename (&amp;quot;C:\Desktop\MyFile.txt&amp;quot;) or a URL (&amp;quot;https://www.mydomain.edu/MyFile.txt&amp;quot;) - but the content is basically always a list of 0 to many bytes.&lt;/p&gt;&#xA;&lt;p&gt;You could go into details how files are stored and how HTTP works, but in the end you only need to explain the abstraction to understand what &amp;quot;file&amp;quot; means.&lt;/p&gt;&#xA;" OwnerUserId="7929" LastEditorUserId="11073" LastEditDate="2021-09-25T20:32:03.720" LastActivityDate="2021-09-25T20:32:03.720" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5591" PostTypeId="2" ParentId="5579" CreationDate="2019-04-28T19:03:23.203" Score="2" Body="&lt;p&gt;During my CS course, I developed the rather cynical theory that the CS faculty were using the Math faculty to fill out their curriculum. It saved them time and effort and so it was that we taught some really hairy math which I can't imagine ever being of use to me. 3D integration anyone? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I ever were to be working on a project that needed such things, I'd expect a subject matter expert to be providing the requirements, just as I'd expect a botanist to be writing the specification for controlling an asparagus greenhouse. Of course some math is valuable, but I think it lingers in CS just because it was often the mathematics department that originally had to teach computing to undergraduates.&lt;/p&gt;&#xA;" OwnerUserId="7938" LastActivityDate="2019-04-28T19:03:23.203" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5592" PostTypeId="2" ParentId="5579" CreationDate="2019-04-28T21:14:41.273" Score="4" Body="&lt;p&gt;Despite more than 30 years of programming professionally I have yet to use calculus for work.  Does that mean it was a waste?  No--my observation from school is that you only truly learn the material that you use in future classes.  Calculus is the step above differential equations--and I have used that knowledge professionally more than once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(And note that I have used the results of calculus in a program I whipped up to solve a problem.  I looked it up, though--my calculus is far too rusty to have handled the integration involved.  I have also had the experience of looking at a bit of code and being utterly unable to understand what a key equation was doing.  In hindsight I realize it was the integration of stuff I understood but that was before I had taken calculus, I couldn't see the relationship.)&lt;/p&gt;&#xA;" OwnerUserId="668" LastActivityDate="2019-04-28T21:14:41.273" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5593" PostTypeId="2" ParentId="5579" CreationDate="2019-04-29T03:07:28.707" Score="-4" Body="&lt;p&gt;Calculus is a hard and rigorous sequence of courses amounting to 12 to 15 semester credits. It is readily available in most any college so it was easy to include in the requirements in the 60s and 70s which established momentum for it. Taking it you learn skills of organization and time management as much than anything else. You learn how to think and absorb information at lightning speed. If you can learn Calculus then the similarity to what you need for computer science will very likely carry over. These skills are useful for a programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I speak of my own experience taking Calculus while studying Computer Science at the university.&lt;/p&gt;&#xA;" OwnerUserId="7943" LastEditorUserId="8708" LastEditDate="2019-12-17T04:04:53.360" LastActivityDate="2019-12-17T04:04:53.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5595" PostTypeId="2" ParentId="5579" CreationDate="2019-04-29T13:31:37.550" Score="5" Body="&lt;p&gt;Given all the answers, I'm kind of surprised I didn't see anyone mention this, but...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back in the 80's when I was taking CS (and likely somewhat in the vicinity of when your father took it), Accredited Computer Science was still fairly new as a degree. Very few colleges offered it as its own stand-alone school. For most, it was a department in either their School of Engineering, or their School of Mathematics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Schools all have their own graduation requirements, but &lt;strong&gt;both of those types of schools are quite likely to require calculus.&lt;/strong&gt; In my case, it was under the School of Engineering, so I was required to not only take 3 semesters of Calculus, but also two semesters of Chemistry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now Chemistry is a &lt;em&gt;Noble&lt;/em&gt; subject (pun intended), worthy of study, but probably not vital to a typical CS degree holder. I certainly didn't learn much of it from that huge lecture class where the instructor spoke with badly accented Norwegian, the TA's in incomprehensible Chinenglish, and a 17% on tests was a passing grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Degree graduation requirements are just something you have to deal with as a College student. We were also required to take 2 semesters of English (which served me much better in my career), and 4 other semesters of Liberal Arts classes, all of which were wonderful experiences I'm glad I had, because I took stuff I was really interested in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that being said, you don't know where your career is going to lead. You need a good survey of knowledge on damn near everything, and this goes double for math. 10 years after graduation I found myself writing software for flight simulators, where the communications protocol we used called out using &lt;a href=&quot;https://en.wikipedia.org/wiki/Quaternion&quot; rel=&quot;noreferrer&quot;&gt;quaternions&lt;/a&gt; to calculate the position and rotation of other aircraft in between updates. This was pre-Web, so I found myself driving all over town looking for a book telling me how to do that. &lt;/p&gt;&#xA;" OwnerUserId="1139" LastEditorUserId="1139" LastEditDate="2019-04-29T13:44:05.093" LastActivityDate="2019-04-29T13:44:05.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5596" PostTypeId="2" ParentId="5579" CreationDate="2019-04-29T18:19:07.347" Score="2" Body="&lt;p&gt;Calculus is not useless to computer scientists. But it is not very useful either. If the required mathematical fields in CS were ranked, according to usefulness and/or necessary depth, the list would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Logic&lt;/li&gt;&#xA;&lt;li&gt;Linear Algebra&lt;/li&gt;&#xA;&lt;li&gt;Probability Theory&lt;/li&gt;&#xA;&lt;li&gt;Discrete Mathematics/Abstract Algebra&lt;/li&gt;&#xA;&lt;li&gt;Numerical Analysis&lt;/li&gt;&#xA;&lt;li&gt;Number Theory&lt;/li&gt;&#xA;&lt;li&gt;Complexity Theory&lt;/li&gt;&#xA;&lt;li&gt;Calculus/Real Analysis&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;You can certainly quibble about the importance order, but that misses the point, the point is that Calculus will always be ranked fairly low. Calculus by its nature concerns itself with the infinite, but computer scientists are mostly interested in finite things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe it is taught because of inertia and because universities are slow to adapt their curriculum.&lt;/p&gt;&#xA;" OwnerUserId="7963" LastEditorUserId="7963" LastEditDate="2019-04-29T20:35:39.630" LastActivityDate="2019-04-29T20:35:39.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5597" PostTypeId="2" ParentId="5579" CreationDate="2019-04-30T00:33:59.377" Score="6" Body="&lt;p&gt;There are many good answers here, but ultimately your question comes down to, &quot;Why does A require X, when my dad was B for many years.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software engineering is not a field that only seeks out computer scientists.  I work in software engineering right now having graduated CS, but I work along side of other software engineers from various engineering degree programs, math degree programs, and science degree programs. In short, you do not actually need a computer science degree to be a software engineer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What does this mean about computer scientists? What do they do that is different?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As others have so very well pointed out, there are areas that computer scientists are pioneering. Machine Learning is one example, but look at the other answers for more good ones.  Another area that hasn't been mentioned is computing theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short, a computer scientist major learns calculus, not because it is necessary for software engineering, which does not require a CS degree at all, but because of what Computer Scientists can potentially do: Software pioneering, refinement, and computational theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of this is academic in nature, some of this is still something you can get a job doing in the commercial sector. My former boss at this company has a Ph. D. in computer science, and I know 2 others who work here that also do, and they handle slightly different work. One is in charge of R&amp;amp;D, another is in charge of developing a brand new system no one has ever conceived of before, and I'm not sure what the other one does.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In short though, if you were looking to get into software development, you are right, you likely do not need Calculus, you also don't need a Computer Science degree. However, if you want to be a top innovator in computing, that's when you want to get that degree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: An example of a Computer Scientist who is not doing software development with his degree is the one I was able to sit in on for his Graduate Thesis. He was doing microcircuit design using machine learning data models, and had developed a 4 bit adder that was smaller than 50x50x50 microns^3. So there are also other fields you can go into with Computer Science.&lt;/p&gt;&#xA;" OwnerUserId="7967" LastEditorUserId="7967" LastEditDate="2019-04-30T00:40:33.520" LastActivityDate="2019-04-30T00:40:33.520" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5598" PostTypeId="2" ParentId="5579" CreationDate="2019-04-30T03:16:29.100" Score="3" Body="&lt;p&gt;&lt;strong&gt;Computer Science is not Software Engineering&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This depends on your definitions, of course, and in most common definitions they are very closely related.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the long and the short of it is, there is a difference between sorting an array (which in many programming languages is about as simple as calling array.sort()), and implementing the underlying logic of the .sort() function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software Engineering is more about knowing WHY and WHEN to sort, rather than HOW to sort.  Very often, these lines can get quite blurred - for instance, if engineering a high-performance application, it may be important to understand the underlying algorithm to fine-tune the WHEN, or maybe even write a supporting routine that heuristically chooses from a set of possible sorting algorithms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Algorithms, and many other HOWs of computers and Computer Science, often require Calculus to understand and research.  These things are commonly much less useful in day-to-day Software Engineering.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please also see this &lt;a href=&quot;https://cs.stackexchange.com/questions/55462/how-when-is-calculus-used-in-computer-science&quot;&gt;CS SE question&lt;/a&gt; for why calculus is something very useful for the study of Computer Science in general.&lt;/p&gt;&#xA;" OwnerUserId="7970" LastActivityDate="2019-04-30T03:16:29.100" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5599" PostTypeId="1" AcceptedAnswerId="5600" CreationDate="2019-04-30T11:33:29.197" Score="1" ViewCount="192" Body="&lt;p&gt;As in computer science field we have to learn several programming languages like C++, Java, C#, python, php etc to complete our tasks and home assignments. However you are good in only one language. As I know all languages are related to each other at some extent, but it's difficult for me to remember syntax for all languages and doing different tasks for these to become familiar to these. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I improve and learn other languages easily so that I can perform my assignments easily and in less time? &#xA;If anyone can guide me.&#xA;Thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="7913" LastEditorUserId="204" LastEditDate="2019-04-30T21:54:02.983" LastActivityDate="2019-08-19T19:33:21.327" Title="How can I improve other programming languages while having command on one language" Tags="|self-learning|programming|computational-thinking|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5600" PostTypeId="2" ParentId="5599" CreationDate="2019-04-30T12:51:51.470" Score="2" Body="&lt;p&gt;Once you learn how to program with a given paradigm, learning other languages in that same paradigm should be fairly straightforward. One of the best ways is to write a large program in the new language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if other tools than those you are used to are more commonly used with the new language use those tools as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there are some subtitles. For example, Java and Python are quite close conceptually. But the differences require that you &quot;think different&quot; about some things. For example, dynamic vs static typing is a really big difference between the two languages even though they are both OO languages at base. In Java you write (I hope) a lot of interfaces. In Python it would be odd to do so, even if actually possible (with different syntax). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, if you need to learn a language in a different paradigm, say a functional language rather than those you have in your list, then it might be good to go back to a &quot;know nothing&quot; stage and start with a good book intended for beginners in that language. This is because the thought process in, say Scheme, is quite different from that in Java. For example, it is a bit of a subtle thing to write a linear time process to reverse a list in Scheme if you are thinking like a Java programmer. But the way that you do that task efficiently is a mind expander. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for a &quot;similar&quot; language, build something big with appropriate tools and watch for the tricky bits. For a &quot;different&quot; language, start over. Here &quot;similar&quot; means the same overall paradigm. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-04-30T12:51:51.470" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5601" PostTypeId="2" ParentId="5579" CreationDate="2019-04-30T16:06:34.370" Score="1" Body="&lt;p&gt;We actually used integration to derive big-O complexity in an upper-level course on complexity theory. I remember being quite impressed at the time, because no, I &lt;em&gt;hadn't&lt;/em&gt; used it in any of my prior CS classes. Unfortunately, I don't remember the details -- it's been a very long time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I'd gone into modeling and simulation, or if I'd stuck with graphics, I'm quite sure I would have used it more.&lt;/p&gt;&#xA;" OwnerUserId="7979" LastActivityDate="2019-04-30T16:06:34.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5602" PostTypeId="2" ParentId="5579" CreationDate="2019-04-30T16:16:09.190" Score="3" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Calculus requires several semesters of concerted effort to master. It is not as easily picked up on the job, unlike learning a new computer language (I have programmed in 28 professionally) or library. College should teach key building blocks not easily acquired in another setting.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I didn't need that calculus until I got a job dealing with insurance research, such as modeling the effect of hurricanes on a real estate policy. Insurance work is loaded with math, including calc. Try numerical integration in 1,000 dimensions without it!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to do programming related to financial instruments (like I did at another job, working at CRD on their investment management system), calculus is heavily involved.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to work in scientific computing (like I currently do at Shell, the oil major) calculus comes in handy. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to work in optimization and operations research (like I did at EF Education, in the Travel industry, when optimizing the consolidation of tours based on matching parameters), it also comes in handy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Any programming that requires obtaining expert domain knowledge outside of simple website design or business database programming and report prep is likely to bring you into contact with problems that require advanced math. If you don't have that knowledge, you get stuck writing the CRUD (and there is always loads of CRUD to write). If you do, you get to tackle the fun problems and be the tech lead.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bottom Line&lt;/strong&gt;: If learning all the new stuff fast and being superproductive at writing and testing lots of commonplace code is your forte, there is a place for you in software. If solving really hard problems and getting recognition and compensation for doing that is what you want.... LEARN CALCULUS!&lt;/p&gt;&#xA;" OwnerUserId="7980" LastActivityDate="2019-04-30T16:16:09.190" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5603" PostTypeId="1" CreationDate="2019-04-30T18:43:03.610" Score="2" ViewCount="28" Body="&lt;p&gt;We have &lt;a href=&quot;https://www.tealsk12.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;TEALS&lt;/a&gt; (a NGO which supports CS education in US with programs that team industry professionals with CS classrooms - both in person and remotely) distance learning support for our CS classes - industry mentors join the class remotely to help teach the class. I'd like to hear from others who are teaching in similar environments about what hardware they are using - especially in general terms:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What features to look for.&lt;/li&gt;&#xA;&lt;li&gt;What makes the gear durable (or fragile).&lt;/li&gt;&#xA;&lt;li&gt;What do your students like - and what do they resist.&lt;/li&gt;&#xA;&lt;li&gt;Anything else that would help to guide choices of hardware to support a distance learning model.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;The specific classes are AP CS A and AP CS Principles, if that matters.&lt;/p&gt;&#xA;" OwnerUserId="134" LastEditorUserId="134" LastEditDate="2019-05-01T14:29:28.193" LastActivityDate="2019-05-01T14:29:28.193" Title="Hardware (cameras, headsets) for TEALS supported classrooms" Tags="|secondary-education|ap-computer-science-a|ap-cs-principles|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5604" PostTypeId="2" ParentId="5579" CreationDate="2019-05-01T20:28:13.737" Score="2" Body="&lt;p&gt;There are some parts of Computer Science that use Calculus. DSP is an obvious one. Linear Regression, which is an ML technique, uses gradient descent to minimize a cost function. I learned about gradient descent in Multi-Variable Calculus (Calc 3). Newtonian physics obviously involve some calculus, and are in turn used in things like physics engines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, I think CS programs should give students a decent math foundation, since it is an engineering discipline, and is entangled with many other sciences. When solving more science-y problems, mathematics are bound to come up. Calculus is a pretty fundamental area of math, whose absence seems like a serious gap to me. &lt;/p&gt;&#xA;" OwnerUserId="7966" LastActivityDate="2019-05-01T20:28:13.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5605" PostTypeId="2" ParentId="5599" CreationDate="2019-05-02T08:54:08.897" Score="3" Body="&lt;p&gt;Looking at Buffy's answer it's clear to me that I've understood the question quite differently, so I will set some context before I get to the point.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;However you are good in only one language.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I think that this is too strong: it's possible to be good in several languages &lt;em&gt;if&lt;/em&gt; you use them all frequently. However, I do know the feeling. The main language used in my undergrad course was Java, and that was virtually the only language I used in the 7.5 years after graduating. But for the past 9 years the primary language in most of the projects I've worked on has been C#. Now when I revisit Java I keep typing &lt;code&gt;string&lt;/code&gt; and getting compile-time errors until I correct it to &lt;code&gt;String&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, the key word there is &lt;em&gt;primary&lt;/em&gt;. One project was written in C# but used a code generation tool whose templates were in some weird Visual BASIC variant for which I never found documentation, and in addition had large and complex SQL stored procedures. Real world projects often contain an unholy mess of different languages, chosen for good or bad reasons, and the ability to handle that is a useful skill to develop.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;As I know all languages are related to each other at some extent, but it's difficult for me to remember syntax for all languages&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Supplement your memory. Write revision notes as though you were preparing for an exam on the differences between the language: one side of paper (A4 or letter) where you list the most important mappings from your strongest language to the target language. E.g. if your strongest language is Java then your notes for C# might include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;import&lt;/code&gt; is &lt;code&gt;using&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Method names begin with upper case&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Map&lt;/code&gt; is &lt;code&gt;IDictionary&lt;/code&gt; and &lt;code&gt;HashMap&lt;/code&gt; is &lt;code&gt;Dictionary&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Generic types are reified, so if you have a static field &lt;code&gt;Foo&lt;/code&gt; in a class &lt;code&gt;Bar&amp;lt;T&amp;gt;&lt;/code&gt; then &lt;code&gt;Bar&amp;lt;string&amp;gt;.Foo&lt;/code&gt; is a different field to &lt;code&gt;Bar&amp;lt;int&amp;gt;.Foo&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Also, use IDEs where possible. It's much quicker to fix compile-time errors as soon as you type them than to wait until you've finished a unit and can attempt to compile. Auto-completion for syntax is also getting quite advanced now.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2019-05-02T08:54:08.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5606" PostTypeId="1" CreationDate="2019-05-02T16:42:15.513" Score="5" ViewCount="8342" Body="&lt;p&gt;Is there any relationship between a computer science student and DLD course? I am studying for a Bachelors of Science and Engineering degree, and we are studying DLD (Digital Logic Design) in my second semester.&lt;/p&gt;&#xA;&lt;p&gt;We've learned so many things about DLD but nothing is related to the CS or SE. It's all about gates and related to Electrical Engineer.&#xA;Is there any need of DLD in Software Engineering? While the main thing which is concern for us is Programming Languages and Computers System?&lt;/p&gt;&#xA;" OwnerUserId="6192" LastEditorUserId="27" LastEditDate="2024-03-08T14:49:25.120" LastActivityDate="2024-03-08T14:49:25.120" Title="Why Computer Science students learn Digital Logic Design?" Tags="|programming|" AnswerCount="7" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5607" PostTypeId="1" AcceptedAnswerId="5608" CreationDate="2019-05-02T17:53:13.777" Score="4" ViewCount="88" Body="&lt;p&gt;I took a programming course from an open university in Finland. One task was something like the following:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find largest connected sequence of numbers from given set. For example, if input is &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1,2,3,5, the output should be 1,2,3. If the input is 2,4,5,7,9, the output is 4,5. etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Are there opinion what should a student do when he or she sees such a problem?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mean there are problems. For example, a mathematician might say that connectedness is a term from topology and some spaces are connected, not sequences. A punctual student might say that one has to define terms rigorously. No matter how many examples you give, there might be a new sequence that might or might not be connected. Therefore, one should always define terms rigorously instead of give just examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what should a student do when he sees a problem where something is not given rigorously? And is it possible to study computer science such a way mathematics students do as they define everything rigorously and they do sound reasoning for everything? I hope to see some analogy as mathematics can be studied by studying ZFC and reduce many things to the set theory.&lt;/p&gt;&#xA;" OwnerUserId="7989" LastEditorUserId="7989" LastEditDate="2019-05-02T18:15:12.493" LastActivityDate="2019-05-03T01:23:10.630" Title="Should an educator define terms rigorously?" Tags="|teaching-analogy|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5608" PostTypeId="2" ParentId="5607" CreationDate="2019-05-02T19:18:06.863" Score="2" Body="&lt;p&gt;You have two complementary questions here. What should the student do, and what should the professor do. I'll handle them separately. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whenever you can't understand what is being asked of you, ask for a better or more complete explanation. You can't fairly answer a question that you don't understand. Of course, you should be aware of standard terminology and should be able to depend on that being a shared knowledge. But even if that is not the case, you should ask, or consult other sources, so that you don't have gaps in your education. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question of what the professor should do, however, is a bit more flexible. Mathematicians and other technical people are rigorous about some things because they are more important and generally useful than other things. For example, we are rigorous about the definition of the derivative in calculus and about what it means to sort numerically. But some things don't need the same care. If a professor needs to put a name to something for a single conversation and it isn't a generally useful or well known concept then there may be no need for complete rigor. A shared, but informal, understanding may be enough for the current purpose. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, for example, if the professor wants to define something rigorously, I suspect that s/he will want to remember that definition for the long term. If it comes up in an exercise but you will be expected to have learned it well for a later exam, then some rigour is called for. But for the actual example you give, &lt;em&gt;connected sequence&lt;/em&gt; is probably enough, with a few examples to get you on the right track. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, If you are in doubt about the importance of a term, then ask about that also. &quot;Do we need a rigorous definition here? Will we return to this concept?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes a teaching analogy or metaphor is enough. If &lt;em&gt;everything&lt;/em&gt; were made strictly rigorous your education would become much more difficult (more to remember) and for most learners, much more boring. People are good about learning from metaphor. But professors need to be careful not to load too much onto any given metaphor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that rigor in mathematics is mostly a feature of the previous century. People formalized what was, up to then, considered well known without formalisms. Even today, people discovering new mathematics may struggle for a while about what are the correct formalisms for a new concept. It may take a while for it to &quot;shake out&quot;. The important things then get properly defined and names that evoke the correct mind set are applied - or we hope so, in any case. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2019-05-02T22:01:43.053" LastActivityDate="2019-05-02T22:01:43.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5609" PostTypeId="2" ParentId="5606" CreationDate="2019-05-02T19:32:06.147" Score="6" Body="&lt;p&gt;You don't say if this is a full course in digital logic or just a part of another course. My own preference would be to make it a part of a course unless the entire program is heavy on engineering. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I find a short introduction to digital logic, along with some practice exercises to be useful, provided that the students take away the right lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The lesson that I aim for in teaching Programming Languages and Computers Systems is that a complex system can be properly designed as a series of levels (a stack) in which each level has two properties. The first is that the current level is completely built on just the level below and nothing else. The level below was sufficient in every way to define the current level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;More important, for something like programming languages, is that each level is conceptually complete and completely consistent. Complete means that in order to program you can think at any given level and don't need to consider other things - even the lower levels. Consistent means that you won't find contradictory things at any level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This means that you can, as a Java programmer, write any conceivable program without thinking about how Java was implemented. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Digital logic is usually taken as the lowest level in this stack - gates. From that we can build more complex things - adders. Adding a bit of physics to that we can build actual machines that act the way the math says the gates should behave. The next level up (perhaps) is machine language (actually microcode these days, but that is just another level). Above that is assembler language, then, perhaps something like C. But each level is complete and consistent. You don't need to think about gates as a C programmer. Nor do you need to know how the Java tools were constructed and whether they are expressed in Java, or C, or assembler. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each level gives you a mental model that you can work with and the model won't desert you. It is complete and consistent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other big idea is that as you go up the stack, the ability to express new abstractions increases. Gates and machine language have no abstraction facilities. Assembler language gives abstractions of simple operations, but little else. Once you reach high level languages you get abstractions for things like functions and objects. You get to define and name complex things and program in terms of those complex things rather than gates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But some study of digital logic and gates gives you a base on which this is built. It isn't &quot;turtles all the way down&quot;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-02T19:32:06.147" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5610" PostTypeId="2" ParentId="5606" CreationDate="2019-05-02T21:58:32.167" Score="4" Body="&lt;p&gt;Logic is used &lt;strong&gt;A lot&lt;/strong&gt; in programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is little difference between hardware and software. It is just an implementation detail. The choice of what goes where is a balance between cost and speed, but where ever it goes it is just logic: if you implement it in Python, C♯, assembler, HTML, electronics, or mechanical. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-05-02T21:58:32.167" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5611" PostTypeId="2" ParentId="5607" CreationDate="2019-05-03T01:23:10.630" Score="2" Body="&lt;p&gt;It seems to me that you are perhaps overstating the rigor of a math classroom. I have yet to encounter a math class without a tremendous amount of hand-waving to skip past the difficult bits.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science is really two different fields under one term. One is a branch of mathematics, and when you study those aspects, you will find the formalisms you crave. Information Theory, Lambda Calculus, Algorithmic Analysis... you will enjoy all of these things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, computer science also encompasses software engineering, which, like any form of engineering, would be utterly bogged down by engaging in too many of these sorts of formalisms (and which are sometimes nearly impossible to define in any case.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When studying the engineering aspects, such as in the example you gave, the right thing to do is to ask clarifying questions if needed, but otherwise remember that these are human forms of communication, and the goal is to teach you certain key engineering elements using toy programs. &#xA; Get the gist of what the professor is asking for and move on with it.  You have important things to learn, after all.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-03T01:23:10.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5612" PostTypeId="2" ParentId="5558" CreationDate="2019-05-03T11:01:21.660" Score="4" Body="&lt;p&gt;One of the most used examples of polymorphism in real code would be &lt;code&gt;sort&lt;/code&gt;. You don't write a comparison sort method for each type of object: you write one comparison sort method and then either implement a comparator for the type or make your objects implement a &lt;code&gt;Comparable&lt;/code&gt; interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope this example convinces you to change your opinion that &quot;&lt;em&gt;polymorphism is not that useful for real concrete applications&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2019-05-03T11:01:21.660" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5613" PostTypeId="2" ParentId="5558" CreationDate="2019-05-03T13:32:02.463" Score="3" Body="&lt;p&gt;Let me give some background that will, I hope, change a few minds about polymorphism and how it should be used and when its use should be avoided. The essence of it is that too many of the examples are naive and incorrect. They may serve as metaphors, but are, in practice, unworkable. Let me try to show why and also show how polymorphism can be extremely useful - even essential in OO style programming.&lt;/p&gt;&#xA;&lt;p&gt;One of the problems is that most OO languages permit things to be built in a way that they should not be built. That isn't special to OO, of course. You can write 20 page functions with &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; statements nested 15 deep in C, of course, though no one can understand or maintain the code. Likewise you can use concrete subclassing in a way that builds equally mis-formed software. One of the first examples of subclassing to appear in print was that a Circle class was a subclass of a Point class. It was done this way because it was easy to do, not because it was sensible. A circle isn't a special kind of point. But to build the Circle class from a Point class you could just add a single field for the radius and use the point coordinates for the center. But it makes no sense.&lt;/p&gt;&#xA;&lt;p&gt;First, the Animal hierarchy is unsuitable teaching students about polymorphism unless you remember that the entire hierarchy consists of abstractions, not concrete &amp;quot;objects&amp;quot;. There are no instantiations of class Mammal, or Vertebrate. Those are merely abstractions. There are Kangaroos, of course, but there are no subclasses of Kangaroo, unless Kangaroo itself is an abstraction.&lt;/p&gt;&#xA;&lt;p&gt;Likewise Vehicle is a poor vehicle (heh heh) for teaching polymorphism as there are too many variations in the concrete things that carry that description. A bicycle, a golf cart, an automobile, and a tractor-trailer rig are all Vehicles. So is a Sherman Tank. They have very little in common other than mobility and the capability of carrying things. If you try to build a &amp;quot;hierarchy&amp;quot; of such things, the variations will overwhelm the commonalities. They are more &amp;quot;unlike&amp;quot; than they are &amp;quot;like&amp;quot;, in fact. Just as for Animal.&lt;/p&gt;&#xA;&lt;p&gt;The problem, as I see it, is that people try to give examples that are &amp;quot;too big&amp;quot;. Top-level design with polymorphism. This is hard to manage and usually fails. In fact, one of my rules for building good software is that any concrete hierarchy that needs to add publicly visible elements in subclasses is fundamentally broken. Why is that?&lt;/p&gt;&#xA;&lt;h3&gt;Why it's broken&lt;/h3&gt;&#xA;&lt;p&gt;In building good software we need to manage complexity. Complexity is what kills us. It makes our programs buggy if not well managed and it also makes them hard to maintain. Suppose that you are at a point in a program in which you, the programmer, have built a structure that required ten thousand decisions to be made and the software didn't hide any of them from you at the current line you are writing. You need to take account of every decision that has been made. It is impossible. It is nearly impossible to maintain more than about seven independent items in your mind. Software is intended, actually, to hide such decisions. It is why that 15 level selection structure is impossible to maintain. Polymorphism is a way to manage complexity if used well, but since it can be used badly it can also add to the complexity burden. So, you need a way to use it well and to teach good usage.&lt;/p&gt;&#xA;&lt;p&gt;For example, suppose that I have, in Java, a List of Vehicles. Suppose that Vehicle is a superclass and that every subclass of Vehicle has added different public features. The bicycle and tractor-trailer classes know about number of gears, but it is irrelevant for golf carts. All is well until we try to remove items from the List and operate on them. All &lt;em&gt;the program&lt;/em&gt; knows about them is that they are vehicles unless either (a) we remember the most specific class of each item externally (mentally) or (b) we provide a way for the program to recapture the most specific class. Since (a) is essentially impossible, Java provides for (b), of course. But having to ask instanceof questions or do some sort of class based switch means that we have completely given up the advantages of polymorphism. We need to recapture the most specific thing when polymorphism is supposed to let us deal with general things. You are back to writing &lt;code&gt;if&lt;/code&gt; statements when they shouldn't be needed (if you had done a better job).&lt;/p&gt;&#xA;&lt;h3&gt;How to do better.&lt;/h3&gt;&#xA;&lt;p&gt;Suppose that instead of thinking of using polymorphism at a large scale, think of it at a much smaller scale. Don't try to get some polymorphic sense about vehicle overall, but think about how vehicles are actually built in the real world. I'll take bicycle as a simple example.&lt;/p&gt;&#xA;&lt;p&gt;I have a lot of bicycles, actually. I have a nice one that is suitable for trail riding and for expeditions and even for the road. How is that. The bike I'm thinking of is composed of parts. It has a seat, wheels, gears, etc. I'll focus on just those. When I first purchased it the bike was set up primarily for moderately comfortable use on mild trails. It worked well for that. But the parts I mentioned are all replaceable. By changing the saddle I can make it better fit my anatomy. By changing the wheels I can make it much nicer on the road - both lighter and with a smoother ride. By changing the gears - even the number of gears I can make it more useful for serious rocky trails or for more modest prepared surfaces. This is polymorphism used well. I can easily swap parts and by giving it one part at one time and a different part at another time I can give it different behavior. It is the behavior that is polymorphic, not the interface. The two sets of wheels I have for this bike are interchangeable, but behave very differently. The saddles enable one use or another, for one rider or another. But the interface between the saddle and the rest of the bike is fixed. And I don't need to remember each time I switch gears whether I have the road wheels or the trail wheels on the bike. It &amp;quot;works&amp;quot; the same, but &amp;quot;behaves&amp;quot; differently without any decisions (if-this-then-that) on my part as I ride. The only time I need to make decisions is when I set up the bike for a ride (or an expedition) and then the bike itself &amp;quot;remembers&amp;quot; all of those decisions and behaves appropriately. I don't have to remember whether I'm on the &amp;quot;expedition bike&amp;quot; or the &amp;quot;fast road&amp;quot; bike. Nor do I have to recapture that knowledge at any point in my ride.&lt;/p&gt;&#xA;&lt;p&gt;You can build software this way also. Build complex objects with composition - lots of part. Put the polymorphism in the parts. Each kind of part has an interface that doesn't need to be tailored to use (i.e. no added public features in subclasses). When the object of which these polymorphic things are a part needs to change its behavior, swap out one part for another. The overall object's interface didn't change, but its behavior does.&lt;/p&gt;&#xA;&lt;p&gt;For example, in a Calculator, sometimes pressing the &amp;quot;five&amp;quot; key does one thing (accumulates into the current display value) and sometimes does something different (begins the next value in the computation after an operator key). You can use different objects to handle these two things. The calculator either has an accumulator object or an initiation object attached to the five key. The objects are swapped at appropriate times, but once the object is swapped the calculator itself has different behavior. But, the key idea, is that the accumulator object and the initiation object have exactly the same interface. This means that I, the programmer, don't need to remember which it is, the calculator remembers that, and I the programmer don't need to recapture the specific class of the object attached to the numeric key since I interact with both of them (as a programmer) in exactly the same way.&lt;/p&gt;&#xA;&lt;p&gt;This is true polymorphism. Other ways of using it are very ad-hoc and require external complexity management that is better handled by the software itself.&lt;/p&gt;&#xA;&lt;p&gt;This is how automobiles are built these days. You can buy most cars with different engines, different seats, different entertainment systems, etc. But each of those various engines presents the same interface to the rest of the automobile. Therefore they are swappable without modifying the chassis, and by swapping them they change the behavior of the object of which they are a part.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Let me add a simple rule of thumb for OO programmers who might benefit from the guidance.&lt;/p&gt;&#xA;&lt;p&gt;Think of every addition you make to the public interface of a concrete subclass (even when implementing an interface) as a &lt;strong&gt;failure&lt;/strong&gt;. It is sometimes necessary to do it and even the libraries show evidence of it, but think of every new public feature (in a concrete class) as a &lt;em&gt;failure&lt;/em&gt; of design. You are building in the necessity to do ad-hoc decision making in the future. You can probably avoid that by rethinking the design. Every ad-hoc decision you don't need to make in the original build and especially in maintenance is a BIG WIN.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-05-03T14:29:13.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5614" PostTypeId="1" AcceptedAnswerId="5615" CreationDate="2019-05-03T16:18:55.210" Score="1" ViewCount="188" Body="&lt;p&gt;As I am a student of BS(CS) computer science and a beginner in this field. As a student in the first semester I don't know about any basic language or other techniques to improve my assignment skills. My instructors also insult me because of doing poorly on assignment having no such pattern and skills. They said I have no idea how to do an assignment no matter that will be technical or either theory work. They said I have no idea to work  in any software or any other tool. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I improve my skills of doing my assignment? Like assignment official format, front end display? &lt;/p&gt;&#xA;" OwnerUserId="7913" LastEditorUserId="1293" LastEditDate="2019-05-03T17:14:39.803" LastActivityDate="2019-05-03T17:30:49.707" Title="How can I do the best assignments as being a computer science student?" Tags="|self-learning|assessment|soft-skills|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5615" PostTypeId="2" ParentId="5614" CreationDate="2019-05-03T17:07:18.350" Score="2" Body="&lt;p&gt;I'm surprised by your question. In the first semester of a program you shouldn't already be expected to know much of anything. But you should be expected to learn a lot of things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you learn by asking a lot of questions. Also by answering some of those yourself through reading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the most important thing to do is to do a lot of exercises and have your professor give you feedback on how to make them better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To learn how to program you have to write a lot of programs and to think about why they work or why they don't. You have to learn how to use the tools and what information they give you. That also takes practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I worry that you say your instructor insults you. Certainly some teachers do that, but perhaps they are really just criticizing your work. But they need to say more than just &quot;this is bad&quot;. They need to give you some help on how to make it better. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, reading and listening to the instructor is not enough. You have to practice. The more you practice the better you get. Just like futbol. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the rules imposed by your institution and professors, you might also consider forming a study group of fellow students so that  you can try to learn together. Some places don't allow it, of course, but it can be helpful when possible. But be careful not to give the impression that you are just copying assignments from one another. A study group has to be about learning. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-05-03T17:30:49.707" LastActivityDate="2019-05-03T17:30:49.707" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5616" PostTypeId="2" ParentId="5516" CreationDate="2019-05-03T17:35:17.053" Score="3" Body="&lt;p&gt;I will attempt to break down your query as best I can:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;MOOC open sourc&lt;/strong&gt;e that I could &lt;strong&gt;install on my servers&lt;/strong&gt; to provision education: Canvas, Sakai or Moodle, BUT the downside of having these on your own servers are that you have to complete the updates yourself and many institutions do a &quot;fresh install&quot; each Summer during break.  It is worth considering a cloud version (LMS): you can get a Moodle account on Moodlecloud.com or try out canvaslms.com; Depending on your specific use-case, would Google Classroom work as an option?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;ready to use CMS (content management system) type of software...  course content management,&lt;/strong&gt; I used to upload all of my content to the LMS- these days I structure all my notes, exercises, files, presentations etc. into a folder in my DropBox/OneDrive/GoogleDrive.  I can folders of notes as a link in the LMS.  The advantage is that I can:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add/Remove notes&lt;/li&gt;&#xA;&lt;li&gt;Update content&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;all without having to delete old notes/upload new notes.  I can simply manipulate files on my computer which will synch with the online drive- the LMS acts as a repository of links and the content is elsewhere, and more easily managed.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;This is a setup I suggested for a company that are planning to introduce an LMS where I also suggested hosting all the links on a thinklink as well- very little is actually in the LMS, but it's used as a repository.  The advantage (imho) is that is allows you to rebuild your course and use resources in other courses more easily, so you can update once in one location, and the &quot;linked resource&quot; is updated wherever it is used:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/Xcned.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Xcned.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;watch lectures, and interact with TAs&lt;/strong&gt;.  All LMS allow you to embed videos (better to embed from YouTube or similar rather than upload large videos to your own server) and provide a chat or forum feature.  If the forum-type/chat in the LMS does not suit you, you will find something like Disqus that you can embed into the course.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;students could run pieces of code&lt;/strong&gt;.  This is the trickiest.  I sometimes write tests that the students can download and run to test their own code. It gives them a chance to look at &quot;test code&quot; and if they take the time to figure out what the code is doing, they will learn something.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is much more easy to use a MCQ quiz to autograde.  Cloze question types have words missing so this could work in a quiz format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another option is to use peer grading and to give each student a rubric to mark peers- often used in many MOOCs and I've done it in Moodle in the past.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a site like &lt;a href=&quot;http://rosalind.info/problems/locations/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rosalind&lt;/a&gt; or Co&lt;a href=&quot;https://codingbat.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt; for exercises and grading&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to write your own specific test conditions, then &lt;a href=&quot;https://codehs.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeHS&lt;/a&gt; might just give you the features and flexibility that you want.  Because these code graders are not (afaik) integrated into the more popular LMS, you could have the student post a screenshot of their code passing the tests (or not).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want something that will return the grade to the LMS gradebook, then there may be something that complies with the (relatively new) &lt;a href=&quot;https://www.imsglobal.org/cc/primeronCCConformance.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Common Cartridge&lt;/a&gt; but I am unaware of a tool to meet your requirements at this time.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Hope that this helps answer your question, and that it is of some benefit to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sean.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2019-05-03T17:53:46.797" LastActivityDate="2019-05-03T17:53:46.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5617" PostTypeId="1" AcceptedAnswerId="5618" CreationDate="2019-05-04T18:50:41.050" Score="3" ViewCount="396" Body="&lt;p&gt;Mostly students can't code or they are not interested or they become lazy in their work or they are not confident enough to make their own logic and check it before teacher.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For all these students they copy code assignments from other students (which are the intelligent students of the class) and hand it in to the teacher.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So which method must be applied to them so that all students start to code on their own, make their own logic and be confident on their own work?&lt;/p&gt;&#xA;" OwnerUserId="6894" LastEditorUserId="8651" LastEditDate="2020-01-30T16:26:37.740" LastActivityDate="2020-01-30T19:34:13.863" Title="How to make students confident enough to stop copying each other's code assignment?" Tags="|student-motivation|struggling-students|cheating|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5618" PostTypeId="2" ParentId="5617" CreationDate="2019-05-04T20:09:14.703" Score="4" Body="&lt;h1&gt;Growth&lt;/h1&gt;&#xA;&lt;p&gt;You say they copy the intelligent students, so first watch &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve?language=en&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve?language=en&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Feedback&lt;/h1&gt;&#xA;&lt;p&gt;Then stop with the sumative assessment (Stop grading them). Encourage mistakes: I just heard of a company that has a mistakes wall. They seed it with a few famous quotes about mistakes. Then the leaders (teachers) add some and sign them. If others (students) add to the wall, then the first ones are praised (and awarded prizes), until it becomes the norm.&lt;/p&gt;&#xA;&lt;p&gt;Help them to get in a situation where they are making small changes, making many small errors, experimenting, learning from feedback as the program runs. Give them code to change. Encourage small changes. Encourage testing after every change.&lt;/p&gt;&#xA;&lt;h1&gt;Programming&lt;/h1&gt;&#xA;&lt;p&gt;Before teaching programming languages, teach them how to program, and before that teach them how to solve problems: That is start unplugged.&lt;/p&gt;&#xA;&lt;p&gt;Get them to do every problem manually. Teach them to think like a computer. Get them to solve problems like they are a stupid robot.&lt;/p&gt;&#xA;&lt;p&gt;Then get them to document what they have done. As a set of steps. Get them to test it. Get them to ask their peers to test it. Show them how to test it. Get them to debug/fix it. Show them that you make mistakes. Show them how you fix your own mistakes.&lt;/p&gt;&#xA;&lt;p&gt;Then when it is working, show them how to translate it, into the chosen programming language.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-05-04T20:17:53.840" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5619" PostTypeId="1" CreationDate="2019-05-04T19:36:06.077" Score="5" ViewCount="214" Body="&lt;p&gt;Here is a table of the Staten Island subway:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;| STOP | STATION         |&#xA;|------+-----------------|&#xA;|    1 | St. George      |&#xA;|    2 | Tomkinsville    |&#xA;|    3 | Stapleton       |&#xA;|    4 | Clifton         |&#xA;|    5 | Grasmere        |&#xA;|    6 | Old Town        |&#xA;|    7 | Dongan Hills    |&#xA;|    8 | Jefferson       |&#xA;|    9 | Grant           |&#xA;|   10 | New Dorp        |&#xA;|   11 | Oakwood Heights |&#xA;|   12 | Bay Terrace     |&#xA;|   13 | Great Kills     |&#xA;|   14 | Eltingville     |&#xA;|   15 | Annadale        |&#xA;|   16 | Hugenot         |&#xA;|   17 | Prince’s Bay    |&#xA;|   18 | Pleasant Plains |&#xA;|   19 | Richmond Valley |&#xA;|   20 | Arthur Kill     |&#xA;|   21 | Tottenville     |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and here is an Elisp function that maps a number to a name:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;(defun sisubstops (s)&#xA;  (pcase s&#xA;    ((guard (or (&amp;lt; s 1) (&amp;gt; s 21))) (message &quot;Hey, just stops 1 through 21, please!&quot;))&#xA;    ('1 (message &quot;St. George&quot;))&#xA;    ('2 (message &quot;&quot; Tomkinsville))    &#xA;    ('3 (message &quot;Stapleton&quot;))&#xA;    ('4 (message &quot; Clifton&quot;))&#xA;    ('5 (message &quot; Grasmere&quot;))       &#xA;    ('6 (message &quot; Old Town&quot;))       &#xA;    ('7 (message &quot; Dongan Hills&quot;))&#xA;    ('8 (message &quot; Jefferson&quot;))&#xA;    ('9 (message &quot; Grant&quot;))     &#xA;    ('10 (message &quot; New Dorp&quot;))&#xA;    ('11 (message &quot; Oakwood Heights&quot;))&#xA;    ('12 (message &quot; Bay Terrace&quot;))   &#xA;    ('13 (message &quot; Great Kills&quot;))   &#xA;    ('14 (message &quot; Eltingville&quot;))&#xA;    ('15 (message &quot; Annadale&quot;))       &#xA;    ('16 (message &quot; Hugenot&quot;))  &#xA;    ('17 (message &quot; Prince’s Bay&quot;))&#xA;    ('18 (message &quot; Pleasant Plains&quot;))&#xA;    ('19 (message &quot; Richmond Valley&quot;))&#xA;    ('20 (message &quot; Arthur Kill&quot;))   &#xA;    ('21 (message &quot; Tottenville&quot;))))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, when I'm trying to tell students that this is a function of a basically non-continuous phenomenon, i.e., we're not dealing with a function like &lt;code&gt;f(x) = x^2&lt;/code&gt;, rather a function that matches stops to names -- &lt;em&gt;but it is still a function&lt;/em&gt; -- how can I get this across? One idea would be to got deep into Lambda Calculus and talk about how LC does conditionals. My first goal is to distinguish between &lt;em&gt;continuous&lt;/em&gt; versus &lt;em&gt;discrete&lt;/em&gt;; and yet I've written a Lisp function that can't really be represented as any sort of normal math function e.g., &lt;code&gt;S(n) = M*n&lt;/code&gt;where &lt;code&gt;M&lt;/code&gt; is some sort of machine or constant that takes a stop number and turns it into a stop name. Any ideas how, yes, this is a function? Or is this just a misnomer, i.e., comp-sci using/abusing the term function. So yes, how is &lt;code&gt;sisubstops&lt;/code&gt; really a function?&lt;/p&gt;&#xA;" OwnerUserId="7996" OwnerDisplayName="147pm" LastEditorUserId="7996" LastEditDate="2019-05-12T20:36:06.040" LastActivityDate="2019-05-12T20:36:06.040" Title="Discrete function is also a math function?" Tags="|functional-programming|mathematics|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5620" PostTypeId="2" ParentId="5619" CreationDate="2019-05-04T22:50:07.763" Score="1" Body="&lt;p&gt;In math, a &lt;a href=&quot;https://en.wikipedia.org/wiki/Function_(mathematics)&quot; rel=&quot;nofollow noreferrer&quot;&gt;function&lt;/a&gt; is just an association between each element in a set X and a specific element in set Y. X and Y can be any well defined set: real numbers, rational numbers, integers, even integers, odd integers, all the real numbers except 0, words, names of states, names of cities, etc. Calling a table mapping between between bus stop numbers and bus stop names a function is perfectly sound mathematically as long as no single stop maps to two different names.&lt;/p&gt;&#xA;" OwnerDisplayName="Charles E. Grant" LastActivityDate="2019-05-04T22:50:07.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5621" PostTypeId="2" ParentId="5619" CreationDate="2019-05-05T00:31:43.180" Score="5" Body="&lt;p&gt;Focus on the idea that the sets can be finite. They don't need to be defined by a formula. Any set of ordered pairs is a relation. If there is a unique second element for any given first element then it is a function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, the set of pairs {(5,2), (5,4)} is not a function, since the value associated with 5 is not unique. This is a relation: a set of ordered pairs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But {(5,2), (6,2)} IS a function since the value associated with 5 is unique and the same is true of 6. It is a &lt;em&gt;constant function&lt;/em&gt;, by the way, since all values map to 2. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally {(5, 2), (6, 3)} is a function and its inverse is {(2, 5), (3, 6)} which is also a function. Thus the original here is called &lt;em&gt;invertible&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't need Lambda Calculus or any mathematics to show what a function is. Finite functions can be computed by table lookup or by hash maps. An array is a function from a certain set of integers to some other set (the values). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Actually functions defined by formulas in computing are often problematic since computations of many values (say Real Values) are only approximate. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-05-05T13:56:51.237" LastActivityDate="2019-05-05T13:56:51.237" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5622" PostTypeId="2" ParentId="5619" CreationDate="2019-05-05T01:10:01.023" Score="3" Body="&lt;p&gt;Talk about step functions. This might get the point across that functions do not need to be continuous. (I think going into lambda calculus would just confuse your students here - there's no need.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for whether this is really a function - sure it is! To make it clearer, here's something you can do. The written numbers we have - '7', for instance - just stand in for the concept of seven. We could really use the symbol 'a' to stand in for the concept of seven. (Just as we can use any variable name to hold the value inside - though we do tend to choose variable names that 'make sense' to us.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that in mind, what keeps us from saying that 'St. George' is just another symbol? Nothing. The symbols don't matter, the relation between them does - that's what makes a function a function.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-05-05T01:10:01.023" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5624" PostTypeId="2" ParentId="5619" CreationDate="2019-05-05T13:49:35.553" Score="1" Body="&lt;p&gt;I guess I'm slightly confused about what your students are confused about.  Did they somehow get tripped up by the definition of function?  If so, I can't help but wonder what you did to cause that, because I've never encountered any sort of reaction to the term whatsoever.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As others have addressed, your example is still a perfect set-to-set function.  That said, we can certainly code things that at least &lt;em&gt;represent&lt;/em&gt; non-functions (such as &lt;code&gt;Random&lt;/code&gt;), but calling them &quot;computer functions&quot; seems sufficient to avoid most confusions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this comes up in your classroom, I would just say that a mathematical function is a set to set mapping, and that computer functions behave that way often enough to have earned the name &quot;function&quot;, even if they're not strictly mathematical functions in the same way.  Side-effects (such as mutability) and randomness are two instances where computer functions behave more broadly than mathematical functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Of course, if you want to get down to the level of bits and wires, our non-functions become true functions once again, but that may actually be more confusing depending on the level of the students involved.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-05T13:49:35.553" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5626" PostTypeId="1" AcceptedAnswerId="5628" CreationDate="2019-05-07T07:06:39.297" Score="1" ViewCount="70" Body="&lt;p&gt;As a student my instructor gave me a scenario and a title and I have to work on that as a project. I searched a lot about these and watch videos , read blogs but didn't get a well defined answer. I have to understand the basic idea and working of that scenario and have to built up a project on that. But I am confused in getting the basic requirements and objectives of that scenario title based. Please if anyone can help me that how can I understand easily that title and get all points clearly? &#xA;The given title is 'Online School Monitoring System'. &#xA;Thanks in advance &lt;/p&gt;&#xA;" OwnerUserId="7913" LastActivityDate="2019-05-25T10:51:01.877" Title="How can I build up the understanding of a project?" Tags="|undergraduate|project|resource-information|computational-thinking|active-learning|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5627" PostTypeId="1" AcceptedAnswerId="5631" CreationDate="2019-05-07T11:32:15.197" Score="2" ViewCount="43" Body="&lt;p&gt;A long shot, but perhaps somebody here can help. &#xA;I'm planning a workshop (=3 hours, mixed presentation bits + &quot;hands-on&quot; parts, ~30 people). It includes a (brief) section on setting up a simple server on DigitalOcean. Some of the participants will be directly interested in this and would probably benefit from leaving the workshop with an account and server set up. Some will not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wondering if there's any/a best way to deal with this.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want to show, concretely, how one would set this up. But I don't want to spend 15 minutes clicking through an interface with everybody staring. Ideally this would be a hands-on part. &lt;/li&gt;&#xA;&lt;li&gt;I don't want to force those participants to set up an account if they don't need it (they'd need their credit cards)&lt;/li&gt;&#xA;&lt;li&gt;I don't want to have half the people setting it up, the other half wasting their time. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My only idea so far is to make this dependent on the number of people actually interested in setting up an account, and allocating a final part of the workshop for this. Those not interested can leave earlier. But it doesn't sound optimal either.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anybody have any better ideas? This &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3393/workshops-on-cloud-azure&quot;&gt;related question&lt;/a&gt; did something similar but is basically too much presentation.  &lt;/p&gt;&#xA;" OwnerUserId="275" LastActivityDate="2019-05-07T16:09:00.123" Title="Hand-on ideas on tutorial on setting up a cloud-based server" Tags="|curriculum-design|workshops|" AnswerCount="2" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5628" PostTypeId="2" ParentId="5626" CreationDate="2019-05-07T11:35:11.930" Score="3" Body="&lt;p&gt;I think it would be improper to give you advice on the content of your project. Your professor assigned it so that you would learn something and you will learn more by doing that part yourself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I think you are making a mistake by assuming that after the original instruction from your professor you can't go back for more advice. But if you just ask for help you may get less than you need. Again, that is because the professor wants you to do the work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest you do this. Before you actually start the project, write up a detailed proposal for what you think you should do based on the studying you have already done. &quot;This is what I understand. This is what I propose to do.&quot; Use your own judgement about what are the best steps to take. You may be correct or not. Doing it will help you refine your ideas, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, show that to your professor and ask for advice on it. If you make it clear that you have &quot;done your homework&quot; you are likely to get better advice. If you can do this in a face to face conversation you will also get to ask some questions about what you still see as gaps. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It isn't necessary to go from point A to point Z without any intermediate steps.  And it isn't precisely correct to ask others to fill in those steps. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-07T11:35:11.930" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5629" PostTypeId="1" CreationDate="2019-05-07T12:19:58.887" Score="0" ViewCount="294" Body="&lt;p&gt;I have some students that are from medical background and have no concept of programming. So, which language I should teach to them to make their basic concept of programming perfect?&lt;/p&gt;&#xA;" OwnerUserId="6722" LastEditorUserId="1035" LastEditDate="2019-07-13T22:01:12.703" LastActivityDate="2019-07-13T22:01:12.703" Title="Through what basic programming language can beginners easily get the concept of programming?" Tags="|student-motivation|best-practice|programming|" AnswerCount="5" CommentCount="1" ClosedDate="2019-07-06T08:36:49.113" ContentLicense="CC BY-SA 4.0" />
  <row Id="5630" PostTypeId="2" ParentId="5629" CreationDate="2019-05-07T12:36:19.410" Score="5" Body="&lt;p&gt;Actually, this depends much more on the teaching methodology you use rather than the language. The best answer might just be the language that you, yourself, are most productive in. But if you aren't a programmer yourself, it may be very difficult for you to teach them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, if I had to name a language that is (a) fairly modern and (b) fairly forgiving of beginners and (c) widely used and (d) a useful tool for people with other interests, then it would probably be Python. If you give up one or more of my criteria there are many other choices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the teacher needs to be proficient in the language and its use. Programming is a way of thinking, not just knowledge of the features of a language. I worry that, just because you are asking this question, that you may not have the required background to do a good job of this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, all is not lost. I asked a question of my own here a while ago that might provide some guidance to you if you are, indeed, a novice programmer yourself. See the question and at least my answer to &lt;a href=&quot;https://cseducators.stackexchange.com/q/4379/1293&quot;&gt;How do you teach something when you don't know it yourself&lt;/a&gt;.  The short version is you admit your lack of knowledge and learn it along with the students. But first you need to find good tools and resources. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you use Python, make sure you use V3 and not the earlier and incompatible V2. It isn't any harder to start with the current version. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-05-07T12:51:41.703" LastActivityDate="2019-05-07T12:51:41.703" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5631" PostTypeId="2" ParentId="5627" CreationDate="2019-05-07T15:40:12.663" Score="2" Body="&lt;p&gt;Let me give an idea, though it will shoot down your proposal, I guess. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Face to face time with students is precious. Use it only for those things that are best done that way. Three or four hundred years ago lecture was very efficient since even books were unavailable and very expensive. A hundred years ago books became reasonable for a student to purchase so lecture changed a bit and the book and its exercises took on a larger role. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today, as you suggest, we can do live demonstrations of things and have interactive sessions. But the time with students is still precious. If you want to demonstrate something or have students do something in a lab where they follow your direction, you should make sure that the topic is something that is really important and advances your main teaching goals. Setting up servers isn't likely to be in that category unless the course itself is about server management. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem with work-along demos is that the students, if there are more than about ten will get out of sync. Some of them will be confused. Some of them will, when typing or otherwise interacting with the machine, miss an essential instruction from you and get lost. They will get blocked if they see something unexpected, and if it is new to them, the unexpected is expected. They will come up with questions and wait, fairly passively, until their questions are answered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are doing something truly essential, then all of these difficulties are worth it in the long run. But for the inessential and even for some essential things use handouts or web pages. Use official documentation that you point to, perhaps supplemented. Give them a way to ask their questions in a way that doesn't intrude on face time. I found a mailing list dedicated to each course as a way to do this. Especially when other students are encouraged to answer student questions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the &quot;big impact&quot; methodologies for the &quot;big impact&quot; ideas. Face time is the biggest of all. It is often even a waste to use it for lecture - a broadcast mechanism, rather than a personal one that might be used instead. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-07T15:40:12.663" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5632" PostTypeId="2" ParentId="5627" CreationDate="2019-05-07T16:09:00.123" Score="0" Body="&lt;p&gt;For the record, I agree with @Buffy's response that it is not a great use of course time, and it sounds like you will be taking that advice.  I have just two things to add:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you believe that this is something students will likely get stuck on, you can provide time after the workshop for those who wish to stick around so that you can help them if they run into trouble.&lt;/li&gt;&#xA;&lt;li&gt;If you actually still want to integrate it into your workshop, the way to do it would be to have a second activity (ideally open-ended) for everyone, and have those creating accounts join into the second activity when they are ready.  (Beware that this might be frantic for you for about 15 minutes or so, as you are answering people's questions in several different domains at the same time.  Having a helper can smooth this over nicely.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-07T16:09:00.123" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5633" PostTypeId="1" CreationDate="2019-05-08T15:48:22.217" Score="1" ViewCount="86" Body="&lt;p&gt;I'm interested into knowing your experiences about introducing problem solving to primary school pupils.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a PhD candidate in Operations Research and, together with my University or my public library, I have organized some laboratories dedicated to problem solving for kids, trying both to entertain children and to make them learn different aspects of mathematics and computer science like they usually see.&#xA;Up to now, we have used some puzzles and games (like the 15 puzzle), labyrinths, exercises taken from some local competitions (logical, reasoning, counting, etc.). We have shown them a wide range of topics: sorting algorithms, recursion, very simple automa, trees and family relationships, countings, combinatorial examples, cryptography methods (like Caesar's cipher), etc. The primary goal is to let pupils being fascinated by maths, informatics and their several fields and applications. We would like to increase their creativity, reasoning and modeling abilities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have attended some university course about teaching and didactic methods, and now I would like to develop a more structured course, probably focused on one subject than on multiple ones. Beyond the topics, anyway, I kindly ask you to share your experiences, what worked and specially what didn't, speaking in terms of didactics methods.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you in advance.&lt;/p&gt;&#xA;" OwnerUserId="8005" LastEditorUserId="8005" LastEditDate="2019-05-08T20:04:37.580" LastActivityDate="2019-05-09T20:09:59.993" Title="How to introduce problem solving to primary school pupils?" Tags="|lesson-ideas|teaching-analogy|algorithms|primary-school|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5634" PostTypeId="2" ParentId="5633" CreationDate="2019-05-08T16:53:06.117" Score="0" Body="&lt;p&gt;There are a couple of resources that you might want to look at. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; which has a lot of resources for learning about computing and algorithms without actually using a computer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another that you can mine for ideas is the archive of &lt;a href=&quot;https://archive.org/details/creativecomputing&quot; rel=&quot;nofollow noreferrer&quot;&gt;Creative Computing&lt;/a&gt;. Very little of what you will find there is directly usable, but it is a great source of ideas. It was pitched to computer hobbyists of a certain age in a long ago era. But a lot of it is accessible, conceptually, to younger learners. But most of the program code is in BASIC, though it is fairly easy to port to other languages if needed. But the concepts are what makes it valuable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I especially valued something called the French Military Game (September 1979) which is a simple board game that can be used to introduce simple concepts of AI. The machine learns from its errors. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-05-08T20:05:42.147" LastActivityDate="2019-05-08T20:05:42.147" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5635" PostTypeId="2" ParentId="5629" CreationDate="2019-05-08T20:57:32.933" Score="2" Body="&lt;p&gt;I have used pascal, python, VB and C. Each have their own advantages/disadvantages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;pascal - was designed as a language for learning programming but it is quite old and&#xA;         uses an LL(1) type syntax (left associative grammar) that is rarely used&#xA;         today i.e. one writes X : integer; rather than int X; Generally pascal has a&#xA;         'clunky' feel when compared with modern languages.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;python - seems to be the popular choice but there is a major problem in that you will&#xA;         have to use some kind of IDE. tab and space space space space space &#xA;         look very much the same when a student's program won't compile. The problem &#xA;         with the IDE is that the learner can get confused between language features &#xA;         and IDE features. Python is also a functional programming language so better&#xA;         suited to learners who have done functions in maths. Beginners will find&#xA;         procedural languages easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;VB     - I would not recommend VB as it is integrated into an IDE in which IDE&lt;br&gt;&#xA;         features and language features overlap. The programming paradigm of event&#xA;         driven programming is also bad for learners. However it is easy to get quick&#xA;         results which motivate some learners. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;C      - My learners found C the hardest language but the C classes produced the best&#xA;         programmers in the end. Some learners however found it difficult to make&#xA;         progress at all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe there is an argument for a project to develop a new language which is LR like &#xA;C. possibly a subset of C or a version of C with additional string support and a &#xA;simplified expression syntax! Perhaps D fits that bill somewhat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would advise that the choice of environment and compiler is also really important. You will want to concentrate on language not compilation issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also forget to mention LOGO turtle graphics. This is a surprisingly sophisticated programming language that allows an accessible introduction to the basic concepts of sequence, iteration, condition and function call. I often used this for the first couple of lessons with total beginners to get the concepts behind programming embedded before moving on to a more 'serious' language.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastEditorUserId="8007" LastEditDate="2019-05-09T20:14:22.807" LastActivityDate="2019-05-09T20:14:22.807" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5636" PostTypeId="2" ParentId="5619" CreationDate="2019-05-08T21:14:05.360" Score="4" Body="&lt;p&gt;Actually they are not the same thing at all. In mathematics a function consists of a univalent map between a domain and a range this is a subset of a cartesian product or just as you have described, a table. The continuous case is an extension to infinate&#xA;domains and ranges, usually over the real numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functions in computing do not always behave this way. For example the read() &quot;function&quot; can return any number of values depending on the input, functions can make use of clocks and random number generators - results might even depend on instrumentation e.g. thermometers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question was about discrete vs continuous functions for which I have always found&#xA;this diagram useful :-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/PUnND.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/PUnND.png&quot; alt=&quot;Discrete function&quot;&gt;&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An explanation can proceed by considering numbers instead of shapes - abstracting to sets and then considering fractions/reals etc. But beware - the concepts are not the&#xA;same in maths and computing although &quot;function&quot; composition works in both cases. Just be clear that this has nothing to do with the discreteness or continuousness of the setup. I suppose the real difference is that functions in computing can have side effects and like read() can be multivalued. Usually in computing the inverse function is harder to define too.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-08T21:14:05.360" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5637" PostTypeId="2" ParentId="5551" CreationDate="2019-05-08T21:34:15.160" Score="1" Body="&lt;p&gt;A slightly different but insightful take on this :-&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On UNIX systems everything is a file. A file of data is a datafile but a directory (folder) is also a file. A device is a file (found in the /dev directory). Programs are executable files and even running program and system states have associated files (found in /run). Network connections are files that can be read and written. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose that explains why its difficult to define what a file is. In a physical sense it is just a list of connected disk or tape or memory sectors containing codes for data values.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-08T21:34:15.160" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5638" PostTypeId="2" ParentId="3504" CreationDate="2019-05-08T21:45:44.910" Score="1" Body="&lt;p&gt;You may be interested in the Levenshtein distance metric. This is used to compare sequences and is robust to quite a number of different transformations. Its implemented in the core PHP library (for some reason) and the Wikipedia article below contains a C implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Levenshtein_distance&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Levenshtein_distance&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-08T21:45:44.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5639" PostTypeId="2" ParentId="4319" CreationDate="2019-05-08T22:20:35.880" Score="1" Body="&lt;p&gt;I am a big fan of Bem's theory of self perception when it comes to student motivation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Self-perception_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Self-perception_theory&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On one occasion I attended a staff meeting where the Head of Department asked how we could reward students who tried hard. Various lecturing staff suggested treats, days out, cinema vouchers. I said &quot;extra homework&quot; which made everyone stop short, but I was right. For a student that is motivated, extension exercises are a good reward. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get students to have &lt;em&gt;intrinsic&lt;/em&gt; motivation I argue that a teacher should never use rewards. Any clever student will reason that if a reward is offered for completing an activity then this indicates that without the reward the student might not do the activity i.e. this is an activity the student does not want to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead offer a barrier to participation. Now the student reasons that the barrier is there because the activity has an intrinsic reward so great that the barrier is worth overcoming. So in my class only those students who have completed their theory homework can take part in practical lab sessions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Seems to work ;)&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-08T22:20:35.880" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5640" PostTypeId="2" ParentId="5551" CreationDate="2019-05-08T22:43:03.917" Score="1" Body="&lt;p&gt;I'd actually answer this question from an &lt;em&gt;Intro&lt;/em&gt; student from more of the &lt;strong&gt;HCI perspective&lt;/strong&gt;, because they likely have more experience &lt;em&gt;using&lt;/em&gt; a computer than understanding how the computer works. @MichelBillaud had a similar notion in suggesting it as an abstraction (although most intro students won't fully appreciate what abstraction means the point of asking what a file is). &lt;strong&gt;Relating the abstraction to what they already understand in the physical world helps establish a good foundation.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd start by explaining that the first personal computers with graphical interfaces (&lt;a href=&quot;https://en.wikipedia.org/wiki/Xerox_Star&quot; rel=&quot;nofollow noreferrer&quot;&gt;Xerox Star&lt;/a&gt; if they want a historical context) faced the challenge of making it easy for someone who works in an office learn how to work with a computer, which stores information digitally instead of on paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an office, they might have records of a client's information that they'd traditionally write on a piece of paper and store it away in a file cabinet. That &lt;strong&gt;file is a record of related information that you can look up by a name&lt;/strong&gt;. That metaphor works for computers. They store information electronically instead of on paper, but that &lt;strong&gt;digital record is organized in one place and can be looked up by the file name&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From there, you can build upon that fundamental to explain different file formats (e.g. plain text vs binary) or how the metaphor extends to other abstractions of digital data represented in ways people can relate to in the physical world (e.g. folders, storage, copying/moving and recycle/trash, to &lt;a href=&quot;https://en.wikipedia.org/wiki/WIMP_(computing)&quot; rel=&quot;nofollow noreferrer&quot;&gt;other WIMP metaphors&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-05-08T22:43:03.917" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5641" PostTypeId="2" ParentId="5633" CreationDate="2019-05-09T20:09:59.993" Score="1" Body="&lt;p&gt;I have taught problem solving to older learners who studied a range of diagnostic, design and contingency problems. I'm not sure what age group you are talking about which would be handy to know in answering this question.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is a diagnostic group activity solvable using informal constraint satisfaction.&#xA;&lt;a href=&quot;https://sites.lsa.umich.edu/inclusive-teaching/2017/08/16/who-owns-the-zebra/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sites.lsa.umich.edu/inclusive-teaching/2017/08/16/who-owns-the-zebra/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Planning activities also work well, surely there will be an end of term party to plan?&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-09T20:09:59.993" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5642" PostTypeId="2" ParentId="5516" CreationDate="2019-05-09T20:27:24.197" Score="1" Body="&lt;p&gt;Totally 100% Moodle. It is (relatively) easy to set up, free, has an enormous user community and is popular with learners. There are binary Moodle packages to install onto linux servers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are add ons for automated grading of CS work but this will require some extra work. Moodle does support tex/Latex maths markup though which often makes life easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found BlackBoard to be better at large scale student and course administration than at achieving learning outcomes. Moodle has many styles of activity that support a wide range of teaching and learning strategies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://moodle.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://moodle.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having said this, no such system is easy to set up, nor is it necessarily easy to create content for it. There is a definitely a learning curve and a workload to using any MOOC.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-09T20:27:24.197" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5643" PostTypeId="2" ParentId="5606" CreationDate="2019-05-09T20:40:23.390" Score="2" Body="&lt;p&gt;It is really useful to understand the low level operation of the machine when programming in languages like C. Understanding how the digital circuits actually do the work aids understanding of one and two's complement arithmetic, and the relative speeds of integer and floating point operations. Having a sound understanding of the fetch/decode/execute cycle is also useful if you want to develop microcode or assembler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is often the case that problems at a software level can only be understood with a knowledge of the digital systems. For example, read through some of this post :- &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/11227809/why-is-it-faster-to-process-a-sorted-array-than-an-unsorted-array&quot;&gt;https://stackoverflow.com/questions/11227809/why-is-it-faster-to-process-a-sorted-array-than-an-unsorted-array&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also need to program embedded systems, GPU cards, and control any number of low level devices later in your career. Gaining the understanding for this will depend on knowing the digital design basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most important of all I would say that without this knowledge it is not possible to really understand how a computer works. There would always be a mystery for you regarding exactly how the computer operates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this motivates a little :)&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-09T20:40:23.390" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5644" PostTypeId="1" CreationDate="2019-05-10T10:38:57.577" Score="13" ViewCount="11713" Body="&lt;p&gt;I’m mostly interested in the coding aspect of the CS and SE majors curricula. And I’m trying to decide between the two. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each major has its pros and cons, and they prepare you in very different ways for a career in coding.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science courses that are provided at my local university range from parallel programming to algorithm design. There's also computer organization/architecture and web programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is to my understanding that (some of) these are exclusive to CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know this post might attract subjective opinions but I'm not looking for answers that simply fill in the blanks. Instead I hope for a final answer where perhaps one major is preferred to the other. Is a question of this nature feasible?&lt;/p&gt;&#xA;" OwnerUserId="8012" LastActivityDate="2022-01-28T11:44:46.817" Title="On studying Computer Science vs. Software Engineering to become a proficient coder" Tags="|curriculum-design|undergraduate|programming|" AnswerCount="12" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="5645" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T11:24:45.060" Score="25" Body="&lt;p&gt;You can find a fair amount of information about accredited programs in the US &lt;a href=&quot;https://www.softwareengineerinsider.com/articles/computer-science-vs-software-engineering.html&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;, including links to schools that have one or the other programs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, Software Engineering is more directed at the processes involved in creating software, and Computer Science is more generally focused on the underlying theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I'd suggest that both programs have a focus beyond &lt;em&gt;just&lt;/em&gt; programming. In fact, you don't need any formal education to be a programmer, so either sort of program will help you develop programming skills. But that isn't the actual main focus of either. For example, an individual programmer may have little need to know about large scale software process so long as they can do their part in the larger scheme of things. He or she may be able to build things while having little understanding of the theory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also say that a &quot;career&quot; as a coder isn't going to be especially rewarding, either in pay or in responsibility. Many people start out there, but it is much more important, in any field, to know &lt;em&gt;what should be built&lt;/em&gt; rather than &lt;em&gt;how to build things&lt;/em&gt;. A degree program will give you some insight into the more important problem (though more is needed). But an entry level job after a degree may require programming but if it is the end point then your education was really wasted.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I, myself, sometimes do a lot of coding, but it is never the main thing. It is just a tool that can be used for the realization of something important. Focus on that last part, not the actual coding.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;a href=&quot;https://www.macrumors.com/2019/05/10/apple-ceo-tim-cook-says-no-degree-needed-to-code/&quot; rel=&quot;noreferrer&quot;&gt;Tim Cook of Apple&lt;/a&gt; has recently said that you don't need a degree to be a coder. Actually, though, he meant more than just &quot;coder&quot;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1206" LastEditDate="2019-05-12T22:45:49.077" LastActivityDate="2019-05-12T22:45:49.077" CommentCount="20" ContentLicense="CC BY-SA 4.0" />
  <row Id="5646" PostTypeId="2" ParentId="5606" CreationDate="2019-05-10T12:13:52.417" Score="2" Body="&lt;p&gt;I hope your course is teaching you skills which will be relevant if you decide to pick up whatever new technology comes along in 10 years time. Some courses might look to be aimed at people who can turn out generic code using whichever language was hot 5 years ago, and it may well be that the digital logic module is unchanged since the 1980's - but that doesn't mean it is irrelevant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Assuming your course is generic, there are a wide range of career choices that follow the course. &lt;a href=&quot;https://insights.stackoverflow.com/survey/2019&quot; rel=&quot;nofollow noreferrer&quot;&gt;Developer - Full Stack&lt;/a&gt; might be hot in 2019, but there are plenty of other fields which need a different focus, are not electronics or standard cell design, but benefit from closer understanding of the hardware. You might be working in a cross functional team, and need to speak to hardware folks (or worse, trying to interpret a slightly incomplete specification). You might be making a trade-off between doing work on a CPU, GPU, NN, or FPGA. You might be testing CPU designs. I guess you're unlikely to end up implementing CPU architectures, but other people on your course might.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course developer doesn't usually know in advance what field you will want to work in, and will usually be trying to avoid closing down your future options (unless the course is tightly focused on training a specific work task).&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2019-05-10T12:13:52.417" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5647" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T12:46:26.903" Score="4" Body="&lt;p&gt;The answer is that neither course will provide a 'better' coder, but one course might be best for an individual if they think they start off with a clear idea of where they want to end up. Further, one of the courses will have a better lecturer (even if they are both delivered by the same individual, there will be some imbalance in their knowledge).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider a couple of potential high performing coding roles. Low level operating system for a high performance application, and computer vision for self-driving vehicles. I imagine that CS would be a better starting point for the former, SE for the latter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Within each of these task areas, you will find experts from both backgrounds, and for an employer there should be no preference. Often, pure maths/science would be similarly valuable to an employer, providing you can demonstrate the ability to learn to code to a suitable standard (and maybe this hits the point you are asking?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a career, there are also many non-core skills that are just as important - and these will be taught by a much wider range of courses. Your employer might use SCRUM, but they just want to know that you can explain your final year project clearly in 10 minutes. They can teach you the workflow if they think you can learn it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The best course for you is one that engages you, not one that teaches any specific skills.&lt;/p&gt;&#xA;" OwnerUserId="41" LastActivityDate="2019-05-10T12:46:26.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5648" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T14:28:25.093" Score="3" Body="&lt;p&gt;The reputation of the schools involved, the job placement results, and the classes you get to take probably matter more than the actual degree you get.  Having said that, I will admit that, in my case, the engineering degree I chose offered a bit more of a practical mindset than the science degree, which was a bit more research/creativity based.  But that was just a matter of the schools that accepted me back when I was in college, and may not be true anymore for those particular choices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And while I may not be using anything I was taught directly, the mindset of engineering (the real world is messy, so build things that are practical, flexible, and strong) still shows up in what I do, so it was the correct degree for me.&lt;/p&gt;&#xA;" OwnerUserId="2084" LastActivityDate="2019-05-10T14:28:25.093" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5649" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T14:53:13.417" Score="4" Body="&lt;p&gt;&quot;Coding&quot; is impossibly broad, so it's hard to know exactly how to advise you.  There is no &lt;em&gt;one right approach&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, if you want to know about testing, quality assurance, and project management, Software Engineering is for you.  If you want to know about topics like AI, how the operating system works, or the limits of computability, then you want Computer Science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As every answer so far has indicated, you can enter into the job market with either and still be successful.  There is also a good deal of overlap between the two, and most schools give you space for electives, which can further blur the distinction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, the approach I advise is to take a close look at the specific programs that you have been accepted to.  Look over their course sequences and electives, and if it helps, speak with a faculty member over the phone (or in person) to discuss how their program will meet your needs and interests.  The best decision will be at a program-by-program level.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-10T14:53:13.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5650" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T14:56:17.037" Score="11" Body="&lt;p&gt;From my experience, you don't get good at coding while in college. You'll learn to code, but writing good code comes, in my opinion, much more from experience than education (and I say this as a student who has work experience). These two majors focus more on things around the code, so choosing your major will really depend on what you want to do next.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software engineering (bias, that's what I'm studying) is much more about the &quot;application life cycle&quot;. This includes : Working with other people to write requirements that will evolve properly with time, define architecture that will easily scale with the requirements of the application and manage a billion things (deadlines, risk, quality, teams, clients, budget, providers, etc.). It's also about understanding algorithms, data structure, database and everything that will make your code great enough to be delivered in production to satisfy clients. I think studying this made me a much more valuable employee because I can think about the future and plan accordingly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer science is, from what I know (which is way less than SE), more theoretical. It's more about relationship between mathematics and programming and understanding how languages, compilers, etc. work. It's more of a research work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's also something you need to understand from a professional environment. Only being a good coder is rarely enough for you to be valuable, there are many other skills that are just as important and depending on your major you'll develop some of them more than others.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To answer the end of your post, &lt;strong&gt;no, a major is not preferable to the other.&lt;/strong&gt; This is not opinion based, if one was preferable to the other the other wouldn't exist. It really comes down to what you want.&lt;/p&gt;&#xA;" OwnerUserId="5070" LastActivityDate="2019-05-10T14:56:17.037" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5651" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T16:02:36.053" Score="1" Body="&lt;p&gt;I would say that the two most valuable skills you can pick up from a typical university course of study are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;analysis / design skills, both for functionality and data, and an appreciation for the importance of these&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&quot;programming in the large&quot;, or at least an appreciation for it -- it's been said that most university assignments are like baking a strawberry pie, software work in the real world is more like setting up a factory to produce pies&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As @IEatBagels notes, software engineering curricula tend to focus more on requirements and data analysis, so you'll get more of #1 in SE classes.&lt;br&gt;&#xA;But in my experience you get more of #2 in CS classes, particularly things like operating system design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would say the two types of curricula are complementary.  Whichever one you choose, you should have some freedom in selecting courses, so make sure you're well grounded in these two areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an aside: If I had to pick one thing I wish I had learned in college that was not taught (or at least not emphasized), it would be the use of version control.  But maybe that just shows my age ...&lt;/p&gt;&#xA;" OwnerUserId="2501" LastActivityDate="2019-05-10T16:02:36.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5652" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T17:30:07.603" Score="-1" Body="&lt;p&gt;Choose the one that is faster to complete. The programming trends change year by year so it is more important to have more experience. Anyways nowdays you can find online all the things you need to improve yourself.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I was studying, the waterfall process was the thing, and extreme programming just appeared. Until I finished no one was using waterfall. So no point studyng programming  4-5 years when you can finish in 2-3 and then keep yourself updated with the current trends. Also you will not get much specialized knowledge at uni, but you will have to study yourself, depending on the things you work on. For example, if you are developing a distributed database, you will probably want to study paxos algorithm, but if you are working on a 3D game or developing a software for graphics card, you will need to study shading algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should choose the one that is faster to complete, and keep yourself updated with the newest trends. For example nowdays it is serverless development, while if you were studying at uni a couple of years ago, you wouldn't learn about that process. Uni is not very good for our industry because we need to continue learning in order to keep our knowledge up to date. I would even go as far to say that value/cost ratio for studyng CS/SE in Uni is very bad. The best programmers learn continuously without the need for someone to teach them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know a lot of great programmers who don't have a degree in CS or SE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are studyng something where you need a lot of expensive equipment (like radiology, specimens, dead people, electronic microscopes, lasers), then it is better to go to uni. But you don't need uni to learn programming processes, languages, architectures etc. On the contrary, you need to keep learning a lot, even after you finish faculty.&lt;/p&gt;&#xA;" OwnerUserId="2054" LastEditorUserId="2054" LastEditDate="2019-05-10T20:16:08.213" LastActivityDate="2019-05-10T20:16:08.213" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5653" PostTypeId="1" CreationDate="2019-05-10T17:55:59.337" Score="4" ViewCount="1989" Body="&lt;p&gt;I've taught AP Computer Science A for over a decade now, and an administrator has asked me to look into transitioning to IB.  (We already have some programs in the school that use IB, so we would potentially be joining into that.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nothing is set in stone, and we may choose not to go down this path.  However, I am having a lot of trouble figuring out what that transition would even &lt;em&gt;look&lt;/em&gt; like from the perspective of a CS teacher.  How much programming is actually covered?  Are the curricula similar?  Is IB more rigorous?  What new curricular material would I need to develop?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found &lt;a href=&quot;http://www.intuitor.com/student/AP_CompSci_II_Syl.php&quot; rel=&quot;noreferrer&quot;&gt;Mr. Roger's IB Page&lt;/a&gt;, which seems to indicate that AP CS A can be an effective first year for the two year IB curriculum.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the difference, then, between AP Computer Science and IB Computer Science?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-24T11:46:14.200" Title="How does IB Computer Science compare with AP Computer Science?" Tags="|ap-computer-science-a|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5654" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T19:30:35.837" Score="5" Body="&lt;p&gt;I recommend that you study computer science, as that will also teach you the basics of software engineering. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;From having 2+ decades of professional experience &amp;amp; seeing how people behave in both of those areas, what I've noticed is that studying computer science helps one become a better software engineer. However, trying to become a software engineer first, shows that a developer's skills in computer science will be lacking &amp;amp; show amateurish mistakes, over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People try to hide those mistakes, by championing their work/libraries/frameworks as &quot;better&quot; than anyone else's. That might be a good sales pitch for a quick prototype for a demo, but when trying to use libraries &amp;amp; frameworks in massive-scale enterprise-level projects, those libraries &amp;amp; frameworks show the lack of skills that the original code authors had.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In today's web development landscape, everyone is afraid of &quot;reinventing the wheel&quot;. So they reach out &amp;amp; cobble together everyone else's code into their project. You can build wonderful tools like &lt;a href=&quot;https://slack.com/&quot; rel=&quot;noreferrer&quot;&gt;Slack&lt;/a&gt; in that manner. However, if someone asks you to add a feature to extend the functionality of your application... you'll often times be faced with the reality of having to &lt;em&gt;EDIT&lt;/em&gt; someone else's underlying component. No software developer wants to do that. So they reply back to the person making that request, that &quot;It's &lt;strong&gt;not&lt;/strong&gt; possible to extend that software to add that requested feature.&quot; In today's NPM eco-system, your project can have 10,000+ automatically downloaded &amp;amp; included sub-components! Do you really want to look through any of those to fix your code? Software engineers might edit 1 sub=component, but not 10, 100, 1,000, nor 10,000! SE's simply want to plug &amp;amp; play components (like Lego bricks). They don't usually want to design customized components (bricks), which are what makes the website (&amp;amp; toys) look really cool! (How is a Lego spaceship supposed to look really cool, without a radar dish or laser guns?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were a computer scientist, who also had software engineering skills... then you could write your own library &amp;amp; framework, with a small core group of components, which would play nicely together. Then when someone asks, can we add 1 feature, you can reply, &quot;yes &amp;amp; I can add 2-4 other features too!&quot; Software engineers can work for almost any company, but some research labs (like NASA) or massive scale companies (like Amazon) could prefer Ph.D.'s in computer science over SE's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Learning the theory behind writing software will turn you into a better computer programmer. It will also allow you to design your own algorithms in the future. Both tracks will pay well in the future, so don't worry about that. What you want to avoid is getting 20 years down the road &amp;amp; being seeing as someone who doesn't know how to program. To become a rockstar developer, study computer science. You'll also learn software engineering along the way as you start writing code &amp;amp; building web based projects! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck in your studies &amp;amp; future endeavours!&lt;/p&gt;&#xA;" OwnerUserId="8021" LastActivityDate="2019-05-10T19:30:35.837" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5655" PostTypeId="2" ParentId="5644" CreationDate="2019-05-10T22:05:33.067" Score="2" Body="&lt;p&gt;To a great extent I think the answer depends on your personality and interests. You say that you are mainly interested in the coding aspect of the two subjects and you are correct when you say that the two strands prepare you differently for a career.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the CS branch you will learn more theory which is important for a programmer. It is likely that the work will be more interesting and the approach more open to innovation, play and trying new things out. CS is a science subject so you will be able to try out new ideas and investigate techniques. Be prepared for some hard maths.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The SE branch will focus more on design methodology and also people skills. Software engineers need to be good at teamwork and have good interpersonal skills. There are more opportunities to work with people, work on large projects and more routes into management. SE is an engineering discipline so it is based on standards. You will be expected to stick to standard ways of doing things to build production quality systems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would say that you will not learn to code at college but through your own practice. The coding assignments you get in CS will be more interesting and give you greater scope to develop your skills than those in the SE strand. This will help to motivate you for your own projects. That is how you will learn to be an excellent programmer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have said that your interest is coding, but what is your personality type? Are you a task oriented person (CS) or a people oriented person (SE). Of course, if you are mainly thinking about money you might consider Business Studies (BS).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Whatever choice you make there will be career choices for you if you develop high level skills. This does not mean you will be rich but you will be unlikely ever to be poor if you complete either course. My advice would be to choose the course that interests you most. Live your own life and enjoy it.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2019-05-10T22:05:33.067" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5657" PostTypeId="2" ParentId="5644" CreationDate="2019-05-11T15:55:56.423" Score="1" Body="&lt;p&gt;Look at the required classes for each degree. In my experience, software engineering requires more core engineering type classes, while computer science requires a few more math/computer science theory classes. Also keep in mind that these are just the classes that are required. I would wager that at most schools there is enough elective flexibility that a student could take the same exact classes and get either a software engineering or a computer science degree. For example, my bachelor's degree was in electrical engineering, and I believe there were only two classes I did not take that would be required for a computer science degree. And obviously there is much less inherent overlap between CS and EE than CS and SE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also say that 5 years after graduation, there is effectively no difference. It really matters what you do in your job, career and free time, and either degree will give a very similar background. I'm sure it seems like it matters greatly now, but it really doesn't. I also contend that answers stating that a computer scientist is better at abstract reasoning, or a software engineer just wants plug and play solutions is over-generalized nonsense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So in summary, I would just look at the required classes and see which ones interest you more. For me personally, I found engineering in general to be more interesting than theoretical math. I thought I might be interested in low level hardware, so I went Electrical Engineering, but literally took every required class for SE and only took a few EE specific classes. So I think your premise that CS and SE prepare you very differently is flawed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one major exception is if you want to pursue a PhD and/or have a more research focused career, then there are differences, but even still it doesn't really matter at the undergrad level.&lt;/p&gt;&#xA;" OwnerUserId="8032" LastActivityDate="2019-05-11T15:55:56.423" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5658" PostTypeId="1" AcceptedAnswerId="5703" CreationDate="2019-05-11T17:19:29.903" Score="0" ViewCount="273" Body="&lt;p&gt;For a student of BS(CS), a supervisor wants documentation of final year project with high vocabulary and with less plagiarism, but the students write documentations on their own, without copying paste process but still there are a lot of mistakes and plagiarisms in documentation. What method should be applied to make documentation with less plagiarism and with broad vocabulary?  &lt;/p&gt;&#xA;" OwnerUserId="6894" LastEditorUserId="1293" LastEditDate="2019-05-11T19:24:15.207" LastActivityDate="2019-05-23T20:00:58.120" Title="How to make perfect documentation of FYP with less plagiarism?" Tags="|student-motivation|computational-thinking|struggling-students|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5659" PostTypeId="2" ParentId="5658" CreationDate="2019-05-11T19:42:36.830" Score="1" Body="&lt;p&gt;Ideally, of course, the professor should teach you how to do this as part of the course. It isn't a simple or obvious task. Large companies, such as IBM and Oracle, employ documentation specialists who have special training and work with other technologists to produce the documentation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you were a teacher and didn't have a lot of time to teach documentation, I would recommend letting students do a first draft without much direction and then letting them revise it after giving them feedback. This would let the teacher focus comments on the actual issues that arise rather than needing to give a comprehensive course. Perhaps your teacher would agree to do that, but I'll assume not. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility that you might be able to employ, but only with the teacher's permission, would be to have pairs of teams work together to help refine each other's documentation. One team can give advice to the other on what is needed and on what problems might be seen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, to include a high level of vocabulary in the documentation, you should probably start with a list of terms that you want to include. You can, perhaps, have a glossary that explains them. Then make sure that their use appears in the documentation itself. Normally there are two kinds of documentation: system and user. Make sure that you know whether both are required and for either, make your vocabulary meet the needs of those who need it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To avoid plagiarism you write like you would any academic work. If you need something that others have done, cite it and build a bibliography. If you need to quote from existing documentation, make sure that you quote properly and sparingly. Say where ideas come from (citation) and then either make short quotes from it or paraphrase the ideas from the citation in your own words. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In general, though, in writing documentation, put yourself in the mindset of the person who needs the documentation; perhaps an end user. Likewise if the documentation is to explain the internals of your project for your teacher, then give explanations in more technical terms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, I suspect that you ask this question at the end of the course, when it is really too late to plan the documentation from the beginning. A larger group could have one member (two?) work throughout the project primarily as the documenter. Alternatively, you could see to documentation along the way if everyone contributes to it. Every few hours of work, document what you have. But that isn't possible if you write documentation only at the end. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also, perhaps use an example of professional documentation. If you are writing in Java, for example, the java doc in each class provided in the libraries begins with a conceptual level view of that class. That is technical documentation. But in addition, Oracle provides many web pages that explain how Java is actually used, not just what it is. You might use that as a guide. Similar things exist for most languages. But that should just give you an idea of the kinds of information you need to include and how to organize it. Vocabulary and plagiarism are separate issues. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-11T19:42:36.830" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5660" PostTypeId="1" AcceptedAnswerId="5663" CreationDate="2019-05-12T18:33:34.920" Score="1" ViewCount="52" Body="&lt;p&gt;For students, there are a lot of different tasks which are given by their lecturer. &#xA;One of the task is that to make a professional video tutorial of specific topic which is related to Computer Science. And then upload that video on you tube to give help to others students. But there is one problem how to make a good video tutorial which should be understandable to every one who want to watch and get benefit from it. What technique should be applied during making video?&lt;/p&gt;&#xA;" OwnerUserId="6894" LastActivityDate="2019-05-13T19:52:37.247" Title="What technique should be used to make video tutorial for BS(CS) students?" Tags="|student-motivation|struggling-students|active-learning|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5661" PostTypeId="2" ParentId="5644" CreationDate="2019-05-12T23:04:43.107" Score="1" Body="&lt;p&gt;(emphasys mine:)&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I’m mostly interested in the coding aspect of the CS and SE majors&#xA;  curricula. (...) Each major has its pros and cons, &lt;strong&gt;and they prepare&#xA;  you in very different ways for a career in coding.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Well, yes. That's because a graduation in computer science (CS) prepares you to be a &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Computer_scientist&quot; rel=&quot;nofollow noreferrer&quot;&gt;computer scientist&lt;/a&gt;&lt;/strong&gt;, while one in software engineering will graduate you as a &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Software_engineer&quot; rel=&quot;nofollow noreferrer&quot;&gt;software engineer&lt;/a&gt;&lt;/strong&gt;. As much obvious as that should be, I find it often isn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both careers are so much more than just coding, though. And if you join any of those without an explicit desire to be either a scientist or an engineer, you are setting yourself up to failure IMO. I've met guys who graduated in both, and they make very bad programmers indeed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some countries, an undergraduate course (as Bachelor of Science) &lt;strong&gt;software development&lt;/strong&gt; (sometimes offered along with systems analysis) is available, and that is usually the best choice if your aim is to become a proficient programmer (note that a programmer is already more of a developer than a coder).&lt;/p&gt;&#xA;" OwnerUserId="1206" LastActivityDate="2019-05-12T23:04:43.107" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5662" PostTypeId="2" ParentId="5644" CreationDate="2019-05-12T23:39:26.407" Score="2" Body="&lt;p&gt;Some of the best programmers I know were educated in disciplines like electrical engineering or pure science. I don't think the degree you take limits how good you can be as a working software engineer/programmer/coder/(your preferred term). However all those people started working at a time when you had to learn about pointers and memory layout and bitwise operations so whatever language they work in now, they're aware of what's going on at low levels. Over the years they have adapted to various languages, to various revision control, continuous integration and other practises.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programmers starting now don't have to know all that to put together things that function. I expect if you looked at the degree to which old programmers and young programmers were equipped to read and understand Knuth's books you would find that the older ones were better off, for this reason. Not a criticism, but if you need to know some high level framework for your job, that's what you get to know, not how to understand quicksort in MMIX.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think there is a lot of value in a program that deals with pointers and discrete logic and digital circuit building blocks. Those aren't picked up on the job unless you go on to be an embedded programmer (likely you won't if you can't answer questions about those things in an interview). Having to explore languages like Lisp and C and even assembly might seem hard but they teach a lot.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Software engineering &lt;em&gt;is&lt;/em&gt; learned on the job. The engineering part of building a program and maintaining it is something you do every day. And in various ways in various places. It is as important to adapt to the way things are done as it is to do things &quot;right&quot; when working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only constant in this job is change. I learned the waterfall model at university but nobody does that any more. The only benefit of that semester now is that I have a better basis for knowing why not to do that. Practical things like that get outdated so fast but the theory of computer science doesn't really date.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for all those reasons - computer science all the way. Learning about software engineering without first knowing computer science seems a bit like like going into engineering without mathematics. &lt;/p&gt;&#xA;" OwnerUserId="8042" LastEditorUserId="8042" LastEditDate="2019-05-12T23:44:40.547" LastActivityDate="2019-05-12T23:44:40.547" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5663" PostTypeId="2" ParentId="5660" CreationDate="2019-05-13T19:52:37.247" Score="0" Body="&lt;p&gt;I don't have a lot of good suggestions for you. However, if you really want a &lt;em&gt;professional&lt;/em&gt; quality video, you need to use a professional. The videos deployed by Open University UK, for example, are prepared in the BBC studios with large (large) budgets. I assume you have to get by with something less. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Different platforms have different tools, but there are video/audio capture applications for most of them. You might also need to use various camera and microphone setups, including wearable microphones, in order to capture what you want. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you will still have a big problem. One is that it is difficult to capture audio in such a way that it can be heard and understood by your audience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bigger problem is the time (and software) needed to edit what you capture so that it makes sense to the viewer. Pacing and sequencing are very important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The key to success for do-it-yourself, however, is to use repetition and feedback to learn how to do it, the same way that students learn. Make something with some tools and then get someone to give you feedback on it. Repeat and repeat again until you get it right. Eventually you will make something you like. Or decide to hire a professional. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-13T19:52:37.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5664" PostTypeId="2" ParentId="1205" CreationDate="2019-05-14T16:03:41.447" Score="3" Body="&lt;p&gt;These are some popular tools that the community should look into for a reasonable grading setup:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr.com&lt;/a&gt; (Disclaimer: I'm one of the authors of this free tool)&lt;/li&gt;&#xA;&lt;li&gt;HackerRank.com&lt;/li&gt;&#xA;&lt;li&gt;domjudge.org&lt;/li&gt;&#xA;&lt;li&gt;mooshak.dcc.fc.up.pt&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2019-05-14T16:03:41.447" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5665" PostTypeId="2" ParentId="5339" CreationDate="2019-05-14T16:17:43.460" Score="0" Body="&lt;p&gt;Grading coding assignments should consist of the following parts&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;automated tests&lt;/li&gt;&#xA;&lt;li&gt;plagiarism checks&lt;/li&gt;&#xA;&lt;li&gt;code quality (lint checks)&lt;/li&gt;&#xA;&lt;li&gt;a short manual review of each submission&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the tests are written properly, I would imagine that anyone who passes the automated tests, plagiarism checks, and code quality checks should qualify for at least a B (or the equivalent in your course). On top of that, the manual review of the code determines whether the student used the correct approach and whether the submission matches expectation. This is where the student can reach A or A+.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many tools that can help you streamline this process. I recommend checking &lt;a href=&quot;https://autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr.com&lt;/a&gt; (disclaimer: I'm one of the authors)&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2019-05-14T16:17:43.460" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5666" PostTypeId="2" ParentId="5302" CreationDate="2019-05-14T16:27:37.870" Score="2" Body="&lt;p&gt;The 'external view' is important as it ensures the submission is correct. These tests should be similar to Acceptance Testing since you are checking whether the submission meets the 'business' requirements i.e. the requirements laid out in your question. I highly recommend automating this process with unit tests or console based tests (check output matches the expected output).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 'internal view' is what motivates your students to do better since only a person can judge this properly. Students are not motivated to write good code when they are only being judged by automated tests. I recommend looking over each student's submission and ensuring that they have followed the correct approach have met proper code quality standards.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, you can't give a lot of time to looking over each submission UNLESS the 'external view' tests are automated and you don't have to download and run the code for the 'internal view' reviews.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest automating your process using &lt;a href=&quot;https://autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr&lt;/a&gt; (disclaimer: I am the author of this free tool)&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2019-05-14T16:27:37.870" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5667" PostTypeId="2" ParentId="5606" CreationDate="2019-05-14T21:24:51.653" Score="3" Body="&lt;p&gt;Well, you would be amazed at the number of times I have reviewed code with a complex condition or nested-if statements where some condition got missed that I flagged by drawing a simple truth table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the big problem is that without a digital logic course you likely won't understand &quot;state machines&quot; and that's a &lt;strong&gt;REALLY&lt;/strong&gt; big deal.  And state machines pervade quite a lot of programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you hear the word &quot;protocol&quot;, there is a state machine underneath somewhere.  If you have &quot;concurrency&quot;, there is a state machine.  &quot;Parser&quot; or &quot;regular expression&quot;--ayup, state machine.  &quot;Agent&quot; or &quot;behavior&quot;--also probably a state machine.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you can design state machines implicitly without knowing that you did.  State machines are kinda common sense.  But, it's often a lot easier to deal with state machines when you know what you built, can name it, communicate about it, and use tools specifically built to deal with it.&lt;/p&gt;&#xA;" OwnerUserId="2273" LastActivityDate="2019-05-14T21:24:51.653" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5668" PostTypeId="1" CreationDate="2019-05-15T05:17:30.163" Score="0" ViewCount="65" Body="&lt;p&gt;I am a student of BS(CS), There are two courses that I don't understand why they are in our scheme? As we know that in CS we learn programming courses. Our concern is with programming languages like python, C++, Java, Html, CSS and so on. But I can't see the use of these two courses which are belong to Electrical Engineering. Why are these two courses in our scheme?&lt;/p&gt;&#xA;" OwnerUserId="6894" LastEditorUserId="204" LastEditDate="2019-05-15T12:07:09.367" LastActivityDate="2019-05-15T12:07:09.367" Title="Why do computer science students learn electronics and electric circuit analysis?" Tags="|programming|" AnswerCount="0" CommentCount="6" ClosedDate="2019-05-15T15:27:19.373" ContentLicense="CC BY-SA 4.0" />
  <row Id="5671" PostTypeId="1" CreationDate="2019-05-16T14:34:14.563" Score="2" ViewCount="243" Body="&lt;p&gt;I have PDF slides prepared in Latex.  I would like to have all of my slides in a website where students can find all learning materials, animations, examples, etc. Do you have any experience with creating HTML/CSS/other from slides? Is there any framework you would recommend?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: I would like to write everything in HTML/CSS so I can add links and animations of algorithms in the future.&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="6410" LastEditDate="2019-05-17T13:26:32.433" LastActivityDate="2023-01-31T11:48:17.593" Title="How to create webpage slides for teaching?" Tags="|resource-request|lecture-tools|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5672" PostTypeId="2" ParentId="5671" CreationDate="2019-05-16T17:06:48.820" Score="0" Body="&lt;p&gt;If you can get the slide deck into Google Slides you can publish to the web from there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With your slides open, select Publish to Web on the File menu. From there click on Embed and then the Publish button.  You'll get an HTML snippet that uses an iframe. Copy and paste that into your HTML and it'll look just like it does in the presentation. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-05-16T17:06:48.820" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5674" PostTypeId="2" ParentId="5629" CreationDate="2019-05-17T03:18:23.320" Score="1" Body="&lt;p&gt;Once upon a time, a lot of medical professionals picked up Mumps and Basic all by themselves.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Simple interactive command line Basic, not even requiring a programming editor or IDE to complicate things.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2019-05-17T03:18:23.320" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5675" PostTypeId="2" ParentId="5606" CreationDate="2019-05-17T03:27:38.853" Score="0" Body="&lt;p&gt;The implementation of any realistic software system is based on electronic elements.  Those elements use electricity, generate heat, take up volume, and require propagation time to operate and interconnect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The more a CS student learns a feel for this physical electronic basis, the less likely they might be to waste time and energy (and thus money) when implementing some software solution.  (CO2 emissions and all that for the &quot;politically correct&quot; valuation of a programming solution.)&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2019-05-17T03:27:38.853" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5676" PostTypeId="2" ParentId="5671" CreationDate="2019-05-17T10:04:56.953" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://pandoc.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;pandoc&lt;/a&gt; can convert slides written in markdown to a html presentation using &lt;a href=&quot;https://github.com/hakimel/reveal.js/&quot; rel=&quot;nofollow noreferrer&quot;&gt;reveal.js&lt;/a&gt;. pandoc can go markdown-&gt;latex (beamer) too. Not sure about going latex-&gt;reveal.js but it could be possible.&lt;/p&gt;&#xA;" OwnerUserId="6633" LastActivityDate="2019-05-17T10:04:56.953" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5677" PostTypeId="2" ParentId="5606" CreationDate="2019-05-17T12:34:00.063" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;We've learned so many things but nothing is related to the CS or SE.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Beyond any shadow of doubt, &lt;strong&gt;logic is the core skill of any programmer&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you're studying BSE, I'll use an example that is common to the field of enterprise software (as opposed to e.g. hardware drivers). For reference, this is a fairly common problem and by no means a fringe case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have two date ranges (i.e. each range has a start date and an end date). I want to know if they overlap in any way. Please write the code necessary to evaluate if these two ranges overlap.&lt;br&gt;&#xA;&lt;em&gt;If you want a problem situation: You're making an application for hotel reservations and you need to make sure that you don't double book a room. No two reservations can exist for the same room on the same day.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is no way to not use logic to answer the question. Because you need to account for many different situations. An overlap is created if:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;range1 is fully in range2 &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;or&lt;/strong&gt; range2 is fully in range1 &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;or&lt;/strong&gt; range1 is before but partially overlaps range2 &lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;or&lt;/strong&gt; range2 is before but partially overlaps range1.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/AIBUV.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;This is a diagram of all possibilities you need to account for&lt;/a&gt; (ignore case 5).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a coder, you will work out the logic needed for each of the four cases, and then &lt;strong&gt;or&lt;/strong&gt; their results to see if any of them are true. That's the basic approach to checking if one of many conditions is true.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you worked it out and knew how to reduce the logic (remove duplicates, negate the logic, or remove things that are invariably proven by an already existing check), you would see that it's much simpler than that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;bool thereIsOverlap = !(range1.end &amp;lt; range2.start || date2.end &amp;lt; range2.start);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And that is a whole lot simpler than fully writing out all of those checks.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It's all about gates and related to Electrical Engineer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As I mentioned before, logical gates are essential to programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reason you're seeing this in the context of electrical engineering is because that is a very simple context in which to see its practical applicability. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I want this lamp to turn on while I press the button. &lt;/li&gt;&#xA;&lt;li&gt;I want this lamp to turn off when I press the button. &lt;/li&gt;&#xA;&lt;li&gt;I want a buzzer to go off when the this button is pressed and another one is not. &lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Consider electrical engineering as the example scenario, rather than the ultimate goal of the lesson. Because you're not learning about electricity (which is obviously a major part of electrical engineering), you're only learning about logic and how to apply it.&lt;br&gt;&#xA;Electrical engineers and programmers both use logical gates, and the principle of understanding them is exactly the same, even if their practical application is for different purposes.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-05-17T12:39:33.517" LastActivityDate="2019-05-17T12:39:33.517" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5678" PostTypeId="2" ParentId="5671" CreationDate="2019-05-17T16:56:21.900" Score="2" Body="&lt;p&gt;One of our instructors at CSU does his entire course web site using &#xA;&lt;a href=&quot;https://www.pmwiki.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pmwiki&lt;/a&gt;, which uses a markup language. If you follow certain conventions, it can be converted to a slide show in the browser. For an example how this works, see  &lt;a href=&quot;https://www.cs.colostate.edu/~cs253/Spring19/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.colostate.edu/~cs253/Spring19/&lt;/a&gt; This is a C++ course for students in the second year. On the home page is a link to the slide technology used. I believe it is java script that takes the HTML file and renders it in a slide format. If you look at the Schedule page and click any of the links to lecture material, you will see a straight web page. At the top left corner is a link that will render the page as a slide show. You can advance through the slide show using the arrow keys.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the other instructors takes screen shots of the PowerPoint slides and embed them in the HTML page. For an example of this style, see &lt;a href=&quot;http://www.cs.colostate.edu/~cs410/yr2018fa/more_progress/show01/all_slides.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If either of these interest you, I can put you in touch with the specific instructors.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="6794" LastEditDate="2019-06-19T11:06:59.487" LastActivityDate="2019-06-19T11:06:59.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5679" PostTypeId="1" AcceptedAnswerId="5680" CreationDate="2019-05-18T08:21:27.880" Score="6" ViewCount="821" Body="&lt;p&gt;I'll start by admitting I'm not a teacher. But I am a professional computer programmer with over 20 years of experience and a BS in computer science. I'm also a dad. My daughter is 9 years old and is about to finish 3rd grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She does very well in school, her favorite subject is math and for the last year she's participated in a computer club. She enjoys it immensely and is at the top of her class there -- but no thanks to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've tried to talk to her about programming many times, but somehow it just doesn't work. I don't push it either. Recently she made her way into a programming competition final, and we tried to study the previous year's questions for practice. It was difficult. For some reason she kept getting discouraged.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I talked about this to my wife who is also a computer programmer (hey, it runs in the family!) and with whom I've also always had problems whenever I tried to explain her something programming-related. She helped me put the problem into words - at least somewhat.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea is that I somehow make it sound... too easy? Like it should be obvious. But when it doesn't immediately click, it makes the listener feel stupid. And that's when learning stops and inecurities kick in.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do try to be as encouraging as I can. I'm never impatient, I don't chastise (or give any negative feedback at all) and if the first explanation doesn't click, I try to come up with another and another and another. But when you know the subject very well then it's hard to imagine what it's like for someone who doesn't, and to understand just what doesn't click -- especially if they can't explain it themselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Atr there any tricks or methods that can help me here? I'd love to teach the subject that we both love to my daughter, but this is an obstacle that I just don't see how to overcome.&lt;/p&gt;&#xA;" OwnerUserId="6155" LastEditorUserId="204" LastEditDate="2019-05-21T08:02:44.917" LastActivityDate="2019-06-11T01:12:50.157" Title="How to teach so that your student doesn't feel stupid?" Tags="|programming|methods|" AnswerCount="7" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5680" PostTypeId="2" ParentId="5679" CreationDate="2019-05-18T11:55:11.280" Score="4" Body="&lt;p&gt;Teaching someone you have a close relationship with can be difficult or impossible for many people. And it isn't just an issue on the &quot;teacher&quot; side of the relationship but is also evident in possible psychological effects on the &quot;student&quot; side. It is best to recognize this and may be necessary to avoid such attempts. I know that I've found similar difficulties and have given some thought to why they occur. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the one hand, your relationship makes it difficult for you to see why your child doesn't get it - she is obviously very smart. Your kid after all and we always think our kids are best. It is hard to recognize that effect, even when it is very strong. Compounding this is that you &lt;em&gt;do&lt;/em&gt; understand all of this stuff, but forget that there was a time when you were totally lost about how it all worked. Now that it all fits you don't remember a time when it was just a bunch of disjoint pieces. This too can be very strong. So you get frustrated. And while you are sure that you aren't expressing dissatisfaction, are you really sure you can control the small muscles in your face that others can easily interpret?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, your &quot;student&quot; wants more than anything to please you, but can't and so also gets frustrated. The frustration leads to avoidance and, if you keep pushing, further frustration and avoidance. A vicious circle. Few kids like to feel that they are a &quot;disappointment&quot; to a parent. (The same is true for other kinds of relationships in many cases.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A third element is that you may not completely understand that the mind of a nine year old is different (in kind) from that of an adult. In a few years this will change, and may have begun already. The studies of &lt;a href=&quot;https://en.wikipedia.org/wiki/Piaget%27s_theory_of_cognitive_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;Piaget&lt;/a&gt; explain all of this. Kids learn differently than adults, with logic being much less important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can make a couple of suggestions that might help. I doubt that this is a complete list, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is to just give it up and hire a tutor who is familiar with both the topic and the age group. You can tutor the tutor if you like if they are not quite as advanced as yourself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second idea, speculative at best, is to create a group of kids your child's age and teach them all. I'd suggest four, say, as the right size. Now you have a more formal, less fraught, relationship with the class and, if you can manage to treat them all the same, many of the psychological effects of teaching your child will be lessened (not completely relieved). I would, myself, make their learning group based, rather than individual, with lots of small group projects. At that age some &lt;a href=&quot;https://csunplugged.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;non computer activities&lt;/a&gt; are likely appropriate. Use lots of analogies and metaphors in teaching, also. You could also, somehow, encourage student vs teacher mindset so that your kid is encouraged to separate psychologically from you and join with her &quot;classmates.&quot; This might actually make it easier and less likely that she will feel that she is not disappointing you (a big deal for a kid) by not &quot;getting it&quot; immediately. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2019-05-21T08:11:07.367" LastActivityDate="2019-05-21T08:11:07.367" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5682" PostTypeId="2" ParentId="5679" CreationDate="2019-05-19T05:04:00.903" Score="7" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The idea is that I somehow make it sound... too easy? Like it should&#xA;  be obvious. But when it doesn't immediately click, it makes the&#xA;  listener feel stupid. And that's when learning stops and inecurities&#xA;  kick in.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This reminds me of the first time I was teaching an intro to programming class and I was going through a live demo of how some code worked. I mistakenly had an error in my code and got a compilation error. One of my students gasped and said, &lt;strong&gt;&quot;You get those too?!&quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Previously, it hadn't occurred to me that students thought that people who are &quot;good&quot; at programming didn't get errors. They thought there was some inherent quality that I had that prevented me from making errors like they did.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd recommend modeling the problem-solving process. Try doing one of the problems yourself and just let her watch and ask questions. Think aloud and describe everything that goes through your head. Even try explaining different approaches you might consider in solving the problem. It helps demystify the problem solving process of programming when novices get to witness your thinking (and debugging) process. &lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-05-19T05:04:00.903" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5684" PostTypeId="1" CreationDate="2019-05-19T21:03:17.950" Score="-1" ViewCount="111" Body="&lt;p&gt;My younger brother is having a hard time learning programming. This seems strange because he's very good at other computer related subjects. He isn't choosing any other field, so how can he develop his interest towards Programming?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He is also very good at calculations and is interested in football.&lt;/p&gt;&#xA;" OwnerUserId="8066" LastEditorUserId="2395" LastEditDate="2019-06-24T11:04:04.587" LastActivityDate="2019-06-24T11:04:04.587" Title="How To develop One's Interest in Programming" Tags="|lesson-ideas|programming|" AnswerCount="2" CommentCount="2" FavoriteCount="0" ClosedDate="2019-06-01T18:46:29.170" ContentLicense="CC BY-SA 4.0" />
  <row Id="5685" PostTypeId="2" ParentId="5679" CreationDate="2019-05-19T21:31:22.377" Score="-4" Body="&lt;p&gt;I just simply give you one advice just don't put the burden of work on your students just give them as much work as they can do. And try to do the task step by step in lecture and give them free hand to approach you anytime.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to me this is the best thing to do. In this way you get attached with your students even with the low ones.  &lt;/p&gt;&#xA;" OwnerUserId="6714" LastEditorUserId="204" LastEditDate="2019-05-21T08:00:57.020" LastActivityDate="2019-05-21T08:00:57.020" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5687" PostTypeId="1" CreationDate="2019-05-20T12:23:44.747" Score="1" ViewCount="30" Body="&lt;p&gt;I want to make the sequence diagram of my project..&#xA;what should i do to make it easily? Anybody know any Site then give me the link.&#xA;Thanks for any help.&lt;/p&gt;&#xA;" OwnerUserId="6714" LastActivityDate="2019-05-20T12:23:44.747" Title="How to make sequence diagram?" Tags="|curriculum-design|methods|" AnswerCount="0" CommentCount="3" FavoriteCount="0" ClosedDate="2019-05-20T19:01:38.773" ContentLicense="CC BY-SA 4.0" />
  <row Id="5688" PostTypeId="2" ParentId="5679" CreationDate="2019-05-21T08:07:50.447" Score="0" Body="&lt;h1&gt;Encourage and model mistakes&lt;/h1&gt;&#xA;&lt;p&gt;First see what Carol Dweck has to say on mistakes &lt;a href=&quot;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then model mistakes, encourage you daughter to make mistakes, give her space to experiment (give a learning-goal, but give her space to do it on her own).&lt;/p&gt;&#xA;&lt;p&gt;(this is not a full answer, I am only adding one point to what is already here)&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-05-21T08:07:50.447" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5689" PostTypeId="2" ParentId="5671" CreationDate="2019-05-21T08:33:07.693" Score="1" Body="&lt;h1&gt;Some options&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;just put the PDFs on the site.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;runestone&lt;/code&gt; — allows you to create interactive webpages, with programming code.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sozi&lt;/code&gt; — for creating animated slideshows from SVGs.&lt;/li&gt;&#xA;&lt;li&gt;You can generate SVGs from &lt;span class=&quot;math-container&quot;&gt;$LaTex$&lt;/span&gt;. First use a &lt;span class=&quot;math-container&quot;&gt;$Tex$&lt;/span&gt; engine that creates DVIs, then convert the DVIs to SVGs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-05-21T08:33:07.693" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5690" PostTypeId="1" CreationDate="2019-05-21T17:10:47.103" Score="6" ViewCount="3410" Body="&lt;p&gt;I am trying to introduce the idea of stacks and queues in a course on data structures.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For stacks, my idea was to show some interesting examples of problems, like evaluating an expression in RPN, or checking whether a bracket sequence is well bracketed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would be a good example of a few problems where queues are the canonical objects to use?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One example I could think of is Breadth First Search. But what else? Ideally, I would like some simpler problems which can be presented with even lesser background.&lt;/p&gt;&#xA;" OwnerUserId="3036" LastActivityDate="2019-07-14T11:09:43.660" Title="What are some good problems which can be solved with a queue?" Tags="|student-motivation|data-structure|" AnswerCount="9" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5691" PostTypeId="2" ParentId="5690" CreationDate="2019-05-21T17:23:13.237" Score="2" Body="&lt;p&gt;One classic type of problem is handling communications - especially asynchronous communications from multiple sources. That may be a bit much in an elementary course if you want to mostly avoid race conditions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a problem with a single producer and a single consumer can also be informative, though it doesn't completely avoid race conditions. Have some simple process produce some data (an object, say) and queue it. Have another process dequeue objects when available and handle them. The consumer can busy-wait on the queue in simple cases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is most informative when the producer is sometimes a bit faster than the consumer so that the queue normally has something to be processed. But other problems occur if it is consistently faster, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also use such things as an introduction to the ideas around race conditions, dropped data, etc, since anomalies will eventually occur without some form of synchronization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such a simple setup that introduces a much deeper set of ideas is called a &lt;em&gt;Toy Box&lt;/em&gt; in the Pedagogical Patterns community. The application isn't truly realistic, but gets students thinking about deeper issues that will be covered later in their education. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-21T17:23:13.237" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5692" PostTypeId="2" ParentId="5690" CreationDate="2019-05-21T20:57:53.623" Score="3" Body="&lt;h2&gt;The Shunting Yard Algorithm&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;To go along with your example of evaluating RPN, you can convert infix notation into RPN with the &lt;a href=&quot;https://en.wikipedia.org/wiki/Shunting-yard_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Shunting Yard algorithm&lt;/a&gt; It uses both a stack and a queue, although the queue is really only used as an FIFO output; the algorithm never reads from it. This algorithm has the benefit of being practical, and its use is immediately apparent. Plus, combined with an RPN evaluator, the students can create something they could actually use.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Operating system scheduling&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Queues are an important part of operating system scheduling, and are the exclusive data structure used in round-robin scheduling.  A toy scheduler for cooperative tasks has a simple enough structure that it is almost trivial to implement, and gives an insight to what multi-threading looks like on a single core machine.  Talking about scheduling can also provide a lead in into other topics including asynchronous communication  and priority queues.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an added benefit of this topic: if you are a fan of talking about CS in a historical context, round robin scheduling and queues gives you an excuse to talk about the &lt;a href=&quot;https://medium.com/delta-force/the-magic-behind-apollo-cf89aede34d4&quot; rel=&quot;nofollow noreferrer&quot;&gt;the moon landings&lt;/a&gt;. &lt;/p&gt;&#xA;" OwnerUserId="2040" LastEditorUserId="2040" LastEditDate="2019-05-22T04:13:22.087" LastActivityDate="2019-05-22T04:13:22.087" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5693" PostTypeId="2" ParentId="5690" CreationDate="2019-05-22T17:28:30.517" Score="3" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Ideally, I would like some simpler problems which can be presented with even lesser background.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Fortunately, queues are used often in everyday scenarios. If you're just trying to teach the general First In First Out (FIFO) concept of a queue (and not necessarily how it solves more complex computing problems), then there are a lot of opportunities to show people &quot;getting in line&quot; / &quot;queueing&quot; such as:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Buying tickets to a concert (e.g. Ticketmaster)&lt;/li&gt;&#xA;&lt;li&gt;Grading students' work in a first-come-first-serve basis&lt;/li&gt;&#xA;&lt;li&gt;Processing online orders for Packaging/Shipping (e.g. e-commerce warehouse)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If you want to tie the example back to software, you can discuss any of these as a software application (i.e. online ticket sales, gradebook app, warehouse management app).&#xA;Some of these examples can also segue into more advanced topics in queueing, such as priority queues or using multiple queues.&lt;/p&gt;&#xA;" OwnerUserId="6746" LastActivityDate="2019-05-22T17:28:30.517" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5694" PostTypeId="2" ParentId="5690" CreationDate="2019-05-22T18:08:57.350" Score="7" Body="&lt;p&gt;One example I've used for students in the past is a shared printer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I have five people using a printer all at once I will have a problem if two of the five attempt to print at the same time.  What can I do?  I can put up a sign on the printer--&quot;Only One User At A Time Please&quot; and hope everyone sees and follows it.  Of course then the users need to coordinate their use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can (software) lock it so that only one person can print at any time.  But when the second user tries to print he or she is blocked until the printer is free.  And the third user is blocked longer etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or I can set up a queue.  As each user prints the print job goes to the queue.  The printer looks at the queue for jobs to print and as it prints them it removes them from the queue.  No one is blocked and the printer doesn't fail because two people try to print at the exact same moment.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2019-05-22T18:08:57.350" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5695" PostTypeId="2" ParentId="5690" CreationDate="2019-05-22T19:54:41.307" Score="3" Body="&lt;ul&gt;&#xA;&lt;li&gt;Nearly everything in Unix Gnu/Linux, e.g. &lt;code&gt;ls | less&lt;/code&gt;. Queues make it possible to do interprocess communication without semaphores, locks, mutexes, and all that nasty stuff. (If you can't keep it constant, then a queue is the next best thing)&lt;/li&gt;&#xA;&lt;li&gt;An ethernet switch: it need to read the first 6 bytes, then route the whole lot to the desired port. To do this is delays the message through a queue, while reading the first 6 bytes, and deciding where to send it.&lt;/li&gt;&#xA;&lt;li&gt;Interfacing to (slow/fast) hardware. There will be a mismatch between the speed of hardware and the routines that service them. Therefore but incoming and outgoing data into a queue. e.g. keystrokes are held in a queue until a process in ready to process them.&lt;/li&gt;&#xA;&lt;li&gt;A website processes requests in the order received.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-05-22T19:54:41.307" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5696" PostTypeId="2" ParentId="5684" CreationDate="2019-05-22T20:20:28.240" Score="2" Body="&lt;p&gt;It's difficult to know how to answer your question because you don't provide some important details.  However I'll try anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One resource I've heard of is &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;.  Scratch is an interactive, on-line learning lab where people of all ages can experiment with building simple programs with the Scratch programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a good list of alternatives to Scratch &lt;a href=&quot;https://www.educationalappstore.com/blog/alternatives-to-scratch/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.  Some of the alternatives they list are:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://snap.berkeley.edu/snapsource/snap.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Snap&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.kodugamelab.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;KODU&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And several others as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might also try out &lt;a href=&quot;https://www.khanacademy.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Khan Academy&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!  If you can provide more details it'd help us to give you a better answer!&lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2019-05-22T20:20:28.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5698" PostTypeId="2" ParentId="5690" CreationDate="2019-05-23T07:18:42.530" Score="1" Body="&lt;p&gt;Turn-based games where players can drop out (either voluntarily or by losing) before the game is over. At a high level, you have a queue of players. You pop the player from the head of the queue, process their turn, and then push them back to the end of the queue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Queues also have applications in simultaneous-move games, as a way of ensuring that each player gets their fair share of processing, but that's more subtle.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2019-05-23T07:18:42.530" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5699" PostTypeId="2" ParentId="5629" CreationDate="2019-05-23T11:50:34.490" Score="0" Body="&lt;p&gt;I think to learn programming language for beginner then you have to tell him/her Java because it is used in Android Studio and in other tools. And most important it depends on you how you teach him/her. Because he/she know nothing about programming so can start their programming from any programming language but my prefer is Java. &lt;/p&gt;&#xA;" OwnerUserId="6714" LastEditorUserId="204" LastEditDate="2019-05-25T09:59:35.403" LastActivityDate="2019-05-25T09:59:35.403" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5700" PostTypeId="2" ParentId="5690" CreationDate="2019-05-23T14:56:35.360" Score="1" Body="&lt;p&gt;You can do level-order traversal of a binary tree using a queue.  &lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2019-05-23T14:56:35.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5702" PostTypeId="2" ParentId="5629" CreationDate="2019-05-23T19:42:57.147" Score="0" Body="&lt;p&gt;The best programming language for me is Java because it is now used in most of the programming tools. I am also a Bachelor student and learning Java, and you are talking about the new one so according to this you can start from any programming language.&lt;/p&gt;&#xA;" OwnerUserId="8078" LastEditorUserId="204" LastEditDate="2019-05-25T09:58:24.043" LastActivityDate="2019-05-25T09:58:24.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5703" PostTypeId="2" ParentId="5658" CreationDate="2019-05-23T20:00:58.120" Score="2" Body="&lt;p&gt;The problem of literary in education is much more severe in the work of institutions where it is difficult to show individual contributions in different fields in particular. With many others, we found the evidence of literature in the last year of the undergraduate projects. This is an important part of our program. The undergraduate partnership is about 20% of the degree award. Current approaches to detecting non-original material are defective, this paper describes an alternative procedure that integrates with the Internet-based project system that combines the management, monitoring and promotion of good and fair ways. It explains the paper issues associated with the current approach, the use of natural language processing techniques to help prevent literature and its blocking, and to report some preliminary results.&lt;/p&gt;&#xA;" OwnerUserId="8078" LastActivityDate="2019-05-23T20:00:58.120" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5704" PostTypeId="2" ParentId="5684" CreationDate="2019-05-24T10:22:23.733" Score="-1" Body="&lt;p&gt;Don't force your brother towards programming. First of all you should know his interest. Find he is interested in which area of computers. Everyone differs in their approach towards computer. Someone likes computer repairing, troubleshooting, programming... There's lots of interesting things about computer. Not only programming. Ask him about his interest. &lt;/p&gt;&#xA;" OwnerUserId="6323" LastActivityDate="2019-05-24T10:22:23.733" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5706" PostTypeId="1" AcceptedAnswerId="5733" CreationDate="2019-05-24T18:49:43.853" Score="2" ViewCount="333" Body="&lt;p&gt;I'm a student in the UK, and I have a computer science lesson every two weeks. Most people would think computer science is my favourite subject, as I started coding from a very young age, but the computing teacher cannot teach it properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Firstly, she teaches things like copyright and made me spent a lesson researching a lawsuit between Ed Sheeran and Matt Cardle. She hasn't taught us a single programming language except a few lessons on small basic once, which there is obviously no need for, and she could have taught a modern language like python or JavaScript. We spend a month or so making magazine covers in Adobie's photoshop. We were recently doing “Should the internet be a human right?”, which isn't remotely useful. I have shown her the wikipedia page on computer science, and she says stuff like “Wikipedia is not credible” and “I know the syllabus better than you”.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, we had a test recently, and I answered all the questions correctly (to the best of my knowledge, and checked after), yet she marked many questions wrong, for example, one question was “Why may someone not be able to access the sites on the internet (Give 3 reasons)”, and 2 of mine were “Legal Restrictions (eg, article 13)” and “ISP may be blocking/slowing down the website (Due to the removal of net neutrality)”, and she marked both answers wrong. She also gives incorrect answers marks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She also teaches things which are incorrect, like “This spam email is a spam email because it recommends using Firefox, which is an insecure browser”, and when I say it is not, she says it is because she doesn't like using it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do about this?&lt;/p&gt;&#xA;" OwnerDisplayName="user8090" LastEditorUserId="204" LastEditDate="2019-05-25T09:27:16.937" LastActivityDate="2019-06-11T02:11:40.743" Title="What do I do if my computing teacher does not teach the subject properly?" Tags="|secondary-education|" AnswerCount="4" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5707" PostTypeId="2" ParentId="5706" CreationDate="2019-05-25T09:40:28.367" Score="6" Body="&lt;p&gt;All of that is in the key-stage 3 syllabus (it is not all programming). However it may be that the teacher is over focused on one bit.&lt;/p&gt;&#xA;&lt;h1&gt;What is in the new computing syllabus&lt;/h1&gt;&#xA;&lt;p&gt;The new computing syllabus (post ICT), consists of three parts: Computer science, IT, and digital literacy. The timetabling people often make up name, so not wise to get to hung up about it.&lt;/p&gt;&#xA;&lt;p&gt;You can download the syllabuses, here are some resources:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.computingatschool.org.uk/data/uploads/ComputingCurric.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.computingatschool.org.uk/data/uploads/ComputingCurric.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.computingatschool.org.uk/data/uploads/cas_secondary.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.computingatschool.org.uk/data/uploads/cas_secondary.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.computingatschool.org.uk/data/quick_start_secondary/progression_path.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.computingatschool.org.uk/data/quick_start_secondary/progression_path.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Where does copyright fit in&lt;/h1&gt;&#xA;&lt;p&gt;Within digital literacy there is a small section on, aspects of the law and ethics: copyright, patent, trademark, computer misuse, privacy, plagiarism sharing is caring, &lt;a href=&quot;https://www.gnu.org/philosophy/free-sw.en.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;free software&lt;/a&gt;, etc; internet safety; evaluating resources (e.g. Wikipedia articles).&lt;/p&gt;&#xA;&lt;p&gt;Copyright is a &lt;strong&gt;small&lt;/strong&gt; part of the syllabus. Here is where copyright is mentioned (indirectly):&lt;/p&gt;&#xA;&lt;p&gt;“They need to be aware of their legal and ethical responsibilities” — page 15 of &lt;a href=&quot;https://www.computingatschool.org.uk/data/uploads/cas_secondary.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.computingatschool.org.uk/data/uploads/cas_secondary.pdf&lt;/a&gt; and “Explains and justifies how the use of technology impacts on society, from the perspective of social, economical, political, legal, ethical and moral issues” — last column grey section of &lt;a href=&quot;https://www.computingatschool.org.uk/data/quick_start_secondary/progression_path.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.computingatschool.org.uk/data/quick_start_secondary/progression_path.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1&gt;What to do next&lt;/h1&gt;&#xA;&lt;p&gt;Check to see if you teacher is only teaching part of the syllabus, then consider helping by sharing some of the resources below.&lt;/p&gt;&#xA;&lt;p&gt;There are also a lot of teaching resources, here are a few.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csunplugged.org/en/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://helloworld.raspberrypi.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://helloworld.raspberrypi.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-06-01T18:45:56.680" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="5708" PostTypeId="2" ParentId="5626" CreationDate="2019-05-25T10:51:01.877" Score="3" Body="&lt;p&gt;Each project manager will tell you that the success of your project refers to planning. This can take some effort at first, but in the long run having a clearly defined project plan will save you time, money, and a lot of headaches once you start the project. To start creating a project plan, focus on defining the project. Define goals and targets, define tasks, and be aware of legitimate killers and get feedback. A clearly defined project plan can help you guide you through the project, but this does not mean that you can completely neglect the project and expect it to be completed without reviewing, reviewing, and monitoring the project continuously. As a project management, you also have to be skillful in effective management of your time. If not, how do you expect the project to be completed on time?&lt;/p&gt;&#xA;" OwnerUserId="8078" LastActivityDate="2019-05-25T10:51:01.877" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5709" PostTypeId="2" ParentId="5679" CreationDate="2019-05-25T15:08:41.273" Score="-1" Body="&lt;p&gt;Good book by father &amp;amp;  son team: &quot;Hello World!&quot;, 2nd edition,&#xA;Warren and Carter Sande,&#xA;Manning , &#xA;&lt;a href=&quot;https://www.manning.com/books/hello-world-second-edition&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.manning.com/books/hello-world-second-edition&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2019-05-25T15:08:41.273" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5710" PostTypeId="2" ParentId="5566" CreationDate="2019-05-25T15:17:20.740" Score="1" Body="&lt;p&gt;Arduino, it's  full C++ 2011 underneath the &quot;Arduino Language&quot;. What they call &quot;libraries&quot; are classes. The physical computing aspect is a good way to keep interest.&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2019-05-25T15:17:20.740" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5711" PostTypeId="2" ParentId="5566" CreationDate="2019-05-25T16:34:09.860" Score="2" Body="&lt;p&gt;There are many ways to do this, they basically rely on the &quot;culture&quot; of students and the purpose that they should learn. C++ is a multiple model and not &quot;pure&quot; in any of them, so... Teaching language and realism is a process: start with some courses before the process: Make them know about the two, compilers, etc. do not go into detail, but tell the path to learn. Avoid the IDE: Use the command-line editor. You can insert the IDE later. But always give a wide look. Variables, and jobs must run ads together. Study Module C++ and indicators &quot;problem combo&quot;, consider: string &quot;base type&quot;, with Device: Table, Composite: Products and Model style: Map. Presenting the template as soon as possible, and teaching the context recursion. Also show recursion in specialization. Introducing the concept of &quot;recollected&quot; &quot;Position indicator&quot;. &lt;/p&gt;&#xA;" OwnerUserId="8078" LastActivityDate="2019-05-25T16:34:09.860" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5713" PostTypeId="2" ParentId="908" CreationDate="2019-05-26T02:27:27.807" Score="0" Body="&lt;p&gt;I think the answer is YES. Because in this era, teach TDD as early as possible will give valuable benefits to forming disciplined programmers.&lt;/p&gt;&#xA;" OwnerUserId="2930" LastActivityDate="2019-05-26T02:27:27.807" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5714" PostTypeId="2" ParentId="908" CreationDate="2019-05-26T09:09:44.570" Score="2" Body="&lt;p&gt;Yes, but introduce it one step at a time (Zone of Proximal Development).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Manual testing is the absolute minimum, needed to know if you have written the program that you intend to (feedback). Incrementally adding to a program is the only effective way to get a program to work (quick feedback). Therefore as least to manual TDD, from the start.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then latter add teacher written unit-tests (acceptance criteria / What I am Looking For).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then latter have the students write them.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-05-26T09:09:44.570" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5716" PostTypeId="1" CreationDate="2019-05-27T21:58:27.937" Score="2" ViewCount="77" Body="&lt;p&gt;I want to do an in-class demo for students.&lt;br&gt;&#xA;I am wondering if there's a way I can project my code editor for students to see, and still have a document with written code (like a cheat sheet) which only I can see.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please suggest how this might this be done&lt;/p&gt;&#xA;" OwnerUserId="8100" LastEditorUserId="150" LastEditDate="2019-05-28T05:51:45.867" LastActivityDate="2019-05-28T05:51:45.867" Title="Projecting the In- class demo screen" Tags="|coding-style|classroom-infrastructure|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5717" PostTypeId="2" ParentId="5716" CreationDate="2019-05-27T22:57:26.280" Score="2" Body="&lt;p&gt;Assuming you have a standard projector, here are two ways that I do this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A printout.  Nothing like going old-school and having physical paper in front of you.  Your students can't see what you've got written down. As a side benefit, you can comment in notes about things to say.  Want to code in some errors and then fix them to make a point? It's easy to document a process this way.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Set your laptop to use dual-monitors, and use the primary as your laptop screen. And the secondary as your projector screen.  A side benefit here is that the text doesn't get as difficult to read on the projected screen.  A challenge is potentially having to turn your head when typing.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-27T22:57:26.280" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5718" PostTypeId="2" ParentId="5716" CreationDate="2019-05-28T01:09:36.910" Score="1" Body="&lt;p&gt;I have a notebook that's mirrored to a ceiling mounted projector. And I use multiple desktops on Windows 10 to switch between applications if I'm doing more than one thing.  I usually go from memory, but have a printed copy of what I'm demoing to fall back on just in case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also have Adobe Connect running so that students can mirror my screen to their screen. Computers are setup so students are facing either a side or back wall so being able to mirror keeps the from having to bend their necks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I record a screen cast and upload the video so they can come back to it later like notes. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-05-28T01:09:36.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5719" PostTypeId="1" CreationDate="2019-05-28T12:21:48.957" Score="2" ViewCount="532" Body="&lt;p&gt;I am teaching robotics at something like an afterschool but is free for everyone aged 12-19 years. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first problem I encountered was poor equipment and facilities, but I obtained some funds and I was able to buy laptops, new soldering irons, Arduino starter kits and more. I was reticent to put into use all at once and I opened up only one soldering iron to see how pupils would use it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, we have safety instructions which include rules like do not degrade lab equipment and I repeated rules but after a few weeks pupils started to play putting soldering tip to wet sponge so water boiled and sounded nice to them, and what disappointed me was some holes in the soldering iron plastic case.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am the only teacher, I can't supervise all pupils at once and teaching here is consuming because everyone is at a different phase of constructing an electronic circuit for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was thinking to track the usage of equipment and with the very first occasion to punish the children by calling home to his parents or even to exclude them, but this seems unfair since everyone could damage equipment intentionally.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What should I do to be able to have all of the equipment on the table but this kind of damage to not exist?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't care if damage occurs when equipment is operated wrong or damaged by mistake. I don't want pupils to think of equipment like toys and play with them damaging them and workspace.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other cases of damage:&#xA;- Cutting wires with wirecutter even if they don't need it&#xA;- drilling holes in worktable with a drill bit&#xA;- melting plastic with the soldering iron tip&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know, partially it's my fault because I can't keep everyone at the same time captivated but damage should not occur.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for attention&lt;/p&gt;&#xA;" OwnerDisplayName="Companion" LastEditorUserId="27" LastEditDate="2020-12-16T03:08:03.753" LastActivityDate="2020-12-16T18:05:42.330" Title="What to do when pupil destroy lab equipment?" Tags="|classroom-management|classroom-environment|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5720" PostTypeId="2" ParentId="5719" CreationDate="2019-05-28T12:28:40.853" Score="9" Body="&lt;p&gt;&lt;em&gt;How should I prevent damage to equipment?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Number each piece of equipment, assign each student (or each group of students) a number, and instruct students (or groups of students) to use only their numbered piece of equipment. Explain that each student (or group of students) is responsible for their piece of numbered equipment and they will face punishment if equipment is damaged. &lt;/p&gt;&#xA;" OwnerUserId="8103" OwnerDisplayName="user2768" LastActivityDate="2019-05-28T12:28:40.853" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5721" PostTypeId="2" ParentId="5719" CreationDate="2019-05-28T12:37:41.577" Score="4" Body="&lt;p&gt;Some ideas, not all of which may be useful to you:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you need to be aware that the age group is problematic, having little realization of the consequences of their actions. The older students can be expected to behave a bit better, but even those have only the beginnings of adult sensibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find a way to get an assistant. Paid or volunteer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have students work in pairs and make the pair responsible for their equipment. You should probably assign the pairs so that Beavis and Butt-Head don't choose to work together. Maybe exploit age differences to choose good pairs, with the more responsible students guiding the others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it is probably unrealistic that some students will &quot;report&quot; misdeeds of others, it is possible that you can encourage a few &quot;influencers&quot; in the group to positively change the bad behavior of others through word and action. That is, have a &quot;team&quot; of responsible students speak to others when poor behavior is imminent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Charge every student a &quot;deposit fee&quot; that will be returned at the end of the class if there is no damage. If you can't asses damage against individuals, only a fraction of the deposit is returned after deducting a damage assessment. But be prepared for an accurate accounting of the funds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Exclude, with no refund, any student seen to be damaging equipment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Get the parents more involved, with a signed paper from them that their child is responsible for damage and they will be assessed a fee if necessary. Contact the parents for any willful damage when noticed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have a session in which the students are actually asked to think up the worst thing they could do with the equipment. The intent here is to get their &quot;creative destruction&quot; impulses out in the open but in a harmless way. When they come up with &quot;ideas&quot; have them speculate on appropriate punishments for the various transgressions. &lt;/p&gt;&#xA;" OwnerUserId="1293" OwnerDisplayName="Buffy" LastActivityDate="2019-05-28T14:34:19.050" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5722" PostTypeId="2" ParentId="5719" CreationDate="2019-05-28T14:22:55.497" Score="0" Body="&lt;p&gt;Before you give your students the equipment, make sure the documentation is right. The safety instructions should be as clear as possible and easy to understand. Also, aside from this doc, make your students and their parents (since some are under 18) sign another paper that states that any potentially intentional destruction of the equipment will be investigated by you, and those responsible for the damage will pay for their misconduct.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So be more strict. It is not fair to you, who struggled to obtain those robots for the kids who really want to learn how to code them, for some kids are really poorly educated by their parents and want to destroy the equipment. It is also not fair to the others, who probably know how to take care of the robots. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You should also consider to name some responsible kids to be observers and to report to you how other kids treat the equipment. If some kids are neglectful with the equipment, then stop giving them the robots for a period of time.&lt;/p&gt;&#xA;" OwnerDisplayName="someone in the crowd" LastActivityDate="2019-05-28T14:22:55.497" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5723" PostTypeId="2" ParentId="3372" CreationDate="2019-05-29T12:28:13.687" Score="3" Body="&lt;p&gt;It seems to me that your students are asking for &lt;strong&gt;external validation&lt;/strong&gt;: they want evidence that other people (the industry) value what you are teaching. For these students abstract claims such as &quot;This will help you write better non functional code&quot; or &quot;you might need it in the future&quot; usually do not suffice. Toy examples such as computing array/string length or mean/variance of a set of values are also equally insufficient because these problems are easily solved. Many other answers provided great concrete examples that might help to alleviate this need, but I believe that few have touched on what I believe to be a core issue: your courses that involve FP appear to rely mostly on intrinsic motivation (the drive to learn because something is cool, essentially). In a certain way, students are expected to be enthusiastic just because they signed up for the course. There is nothing wrong with having a curious mindset and wanting to learn a lot of things just because, but expecting most students to behave this way is not realistic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will expand on a different approach that involves changing the way the courses are taught to take into account students who are not intrinsically motivated. You could try being pragmatic and choose a difficult problem as an excuse to present FP concepts and tools. Essentially, functional Programming exists because it can solve a set of problems &quot;better&quot; than other tools. In some cases &quot;better&quot; means easier, in other it means at larger scale or more readable or less error prone. Start by presenting these problems and base your course activities around solving them. You can then go crazy with FP and present all functional goodness that we all know and love, but in a context where they are clearly valuable. If you can't find a context where something is valuable but you really want to teach it, you can make it an extra activity for those who are intrinsically motivated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For instance, lazy evaluation and immutability are incredibly valuable in Spark and presenting them in this context can help sell these ideas. Compare this approach with a program using MPI and you have an easy winner. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-05-29T12:28:13.687" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5724" PostTypeId="1" CreationDate="2019-05-30T13:29:13.857" Score="4" ViewCount="136" Body="&lt;p&gt;I am teaching several classes consisting of 12-15 year-olds the beginnings of programming by exposing them to &lt;a href=&quot;https://www.playcodemonkey.com/challenges/0&quot; rel=&quot;noreferrer&quot;&gt;Code Monkey&lt;/a&gt; and &lt;a href=&quot;https://codecombat.com/play/dungeon&quot; rel=&quot;noreferrer&quot;&gt;Code Combat&lt;/a&gt;. These resources successfully engage most of my students and follow a smooth progression such that most of my students are able to follow along mostly unaided. (There are significant differences in how fast different students go though the exercises, but that aside.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is about similar follow-up resources: &lt;strong&gt;&lt;em&gt;Are there any resources out there&lt;/strong&gt;, for once my students have worked their way through Code Monkey and Code Combat, that will allow them &lt;strong&gt;to continue developing their programming skills&lt;/strong&gt;, without the difficulty going up too much all at once (causing them to quit), but also without stagnating at the level of Code Combat?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To provide some context on what Code Monkey and Code Combat cover: some basic movement commands, basic looping, named variables, and that is pretty much it I think.&lt;/p&gt;&#xA;" OwnerUserId="6033" LastEditorUserId="6033" LastEditDate="2019-05-30T16:27:11.297" LastActivityDate="2019-09-10T15:32:21.617" Title="Are there any resources out there to continue developing my students' programming skills after Code Combat" Tags="|resource-request|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5725" PostTypeId="2" ParentId="5724" CreationDate="2019-05-30T16:37:43.030" Score="1" Body="&lt;p&gt;If you are willing to switch to Java and also willing to do a bit of work upfront preparing (or finding) scenarios, then I recommend that you look at &lt;a href=&quot;https://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt;. It is a graphical framework for programming in Java that gives students a lot of feedback on their programs and includes an integrated development environment as well as the graphics screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Along with Greenfoot, the system, there is a teacher's forum that provides support but also contributed scenarios that anyone can use. See &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Greenroom&lt;/a&gt;. I have contributed a few scenarios to the system myself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same people that created Greenfoot have also built BlueJay, which is a more traditional Java IDE, but also intended for novices. They also have a book that is a good introduction to programming using the Greenfoot system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greenfoot requires installation on a machine currently, though they are working on a browser based system I think. You can make the scenarios as simple or as complex as you like and you can provide as much or as little scaffolding for the students as you like. Generally speaking the code behind a given scenario is open for students to see and modify. This can be a useful learning experience - reading and maybe modifying code that is more sophisticated than you can currently create. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: I am an occasional contributor to Greenfoot, but not part of the development team. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-05-30T16:37:43.030" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5726" PostTypeId="2" ParentId="5724" CreationDate="2019-05-30T17:08:10.123" Score="1" Body="&lt;p&gt;Greenfoot is an excellent recommendation (as per @Buffy).  If you wanted to stay in the games arena (and not move onto Java), at the machine level, we introduce assembly with &lt;a href=&quot;https://tomorrowcorporation.com/humanresourcemachine&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;, which the kids enjoy very much.  It's worth noting that the challenges become quite hard towards the end, but they ramp up nicely, so this works well for students who proceed and different paces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're looking for a more competitive arena, &lt;a href=&quot;https://www.makeuseof.com/tag/best-programming-games/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Screeps&lt;/a&gt; has always looked promising to me, and certain types of students would find it highly motivating.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-05-30T17:08:10.123" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5727" PostTypeId="2" ParentId="3372" CreationDate="2019-05-30T17:49:07.337" Score="2" Body="&lt;p&gt;Out in the real world (and I use this phrase only because the question is about the criticism of functional programming being useless) a functional language that is used often is SQL.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have seen too many reasonable developers that are unable to grasp how to use SQL effectively because they can only think iteratively and not “functionally”. I have seen way too much code where only basic SQL is used to retrieve a result set and then rather complex loops, lists, dictionaries etc are used to further refine the results.&lt;/p&gt;&#xA;" OwnerUserId="1037" LastActivityDate="2019-05-30T17:49:07.337" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5728" PostTypeId="1" AcceptedAnswerId="5731" CreationDate="2019-05-30T18:29:17.327" Score="13" ViewCount="2062" Body="&lt;p&gt;I've been teaching Java and C# for years and I'll be picking up a web development (HTML, CSS, JS) course in the fall semester because our department is down a faculty member and won't be filling the position.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I can run unit tests on Java and C# to make sure the code students are submitting is correct without an issue, but I don't know how to efficiently assess websites. My school uses Cengage for curriculum delivery and their MindTap product does assessments, but I don't want to rely on that for the primary driver in class for a number of reasons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I efficiently and effectively assess student work other than reading through all their code and observing every web page? There has to be some tool out there that I can work with to do an initial sweep for me... right?&lt;/p&gt;&#xA;" OwnerUserId="8104" LastEditorUserId="8651" LastEditDate="2020-01-04T12:07:07.923" LastActivityDate="2020-01-04T12:07:07.923" Title="How can you efficiently assess students web coding?" Tags="|assessment|javascript|html|css|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5729" PostTypeId="2" ParentId="5706" CreationDate="2019-05-30T20:23:39.477" Score="3" Body="&lt;p&gt;So it sounds as if you've got a teacher that you're not thrilled with.  While I can't make concrete recommendations, I have got a few thoughts:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you stay with CS/Software Development you're going to run into people you consider incompetent or foolish or plainly out of their depth.  Sadly you'll find those people are in charge every now and again.  I'd suggest rather than grousing about how clueless this teacher is about CS, you look upon this as an opportunity to learn how to work with people who don't have the same level of expertise as yourself. It's a valuable skill to cultivate.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't know you at all so I'm taking a big liberty here but the tone of your question (and some of your comments) sounds as if you're already starting down the path of the stereotypical arrogant-jerk nerd. Lest I be misunderstood I say that as someone who was (and still sometimes is) an arrogant-jerk nerd.  Fight that tendency.  If you do go down that path (and, as I say, I'm assuming a lot from the tone of your question) you'll find that it's simply counterproductive for most of life.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastEditorUserId="4689" LastEditDate="2019-06-05T14:16:35.060" LastActivityDate="2019-06-05T14:16:35.060" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5730" PostTypeId="2" ParentId="5728" CreationDate="2019-05-30T20:51:56.917" Score="8" Body="&lt;p&gt;For me, 60 is a very large class. Let me focus on a course design, extrapolated from other areas, in my case, the compiler course. The intent here is to make assessment feasible, rather than to say how to do it explicitly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would have two projects for the course. The first is individual and lasts two weeks. It would be to extend a framework that I provide and when completed would contain in the simplest way, the elements required for the larger project. It would count for a small portion of grading. But, I'd have to actually grade it. To make this feasible, I'd have them high light all changes from my base code. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second project is done in teams. I'd choose the teams so that the total number is reasonable. Maybe five people per team, giving you about a dozen projects being done at once. I would also specify this project and possibly supply some base code giving a framework. Each team works separately on the project in parallel. It isn't a division of a larger project, but a &quot;competition&quot; of teams working on the same thing. With everyone working on the same project structure, I only have one thing to think about when grading. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd give them clear instructions about now NOT to manage their projects. No &quot;dividing up the work&quot; for example. Everyone is responsible for every part. I would try to convince them that dividing the work is actually more work for everyone since they need to integrate at some point. For beginners this is almost always a bad thing to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would teach them how to run an agile team using something like XP. Iterations can be weekly or every other week. In particular, no one is permitted to commit code that only they worked on, avoiding the &quot;prima donna&quot; problem. I've had the teams name themselves, or I've named them, to build esprit d'corps: Fire, Ice, Wind, .... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also want to look at their code, but I now have a more reasonable work load. I would, again, have them highlight any changes they make from previous versions and include all past work (along with my comments) whenever they turn in the next iteration. It is now easy for me to see their progress. Each team turns in a folder each iteration. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would (probably) require public demos of the projects at the end of the course, with each team having a few minutes to show their results. I normally require that everyone participate in the demo, but with five members per team it might be impossible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would use peer assessment within each team to get an idea about how people behave when not under my view. Peer assessment is always positive. &quot;What is the main contribution of each team member? What is your own chief contribution?&quot;. Actually I usually, for a team of five, would have everyone give positive assessments of each of the top three contributors. If no one labels &quot;jimmy&quot; as a top contributor, I learn something. If everyone mentions &quot;jimmy&quot; I learn something else. But a positive assessment is more likely to be accurate and avoids the problem of people not wanting to say negative things about their friends. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everyone gets the same grade on the big project unless there are serious reasons to do otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have sometimes created (randomly) a &quot;leader&quot; of each team. The leader is not a manager, but is simply my main contact with each team so that I can get and give feedback when necessary. Try to do interventions early, if needed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I usually use an asynchronous communication mechanism (a mailing list) so that anyone can ask a question at any time. I encourage others to answer questions as well as ask them, so I don't need to answer every question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is to reduce the load to a manageable level and still give individual feedback periodically. I haven't tried to automate grading in any way, but just made the scope of my problem more feasible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the course grade would be on the second project not the final exam (if any). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could either use face time for lectures, or I could flip the classroom, letting the teams work together in lab and providing &quot;content&quot; through videos or readings done after hours. With a flipped design, I get to monitor each team in real time. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-05-30T21:12:36.977" LastActivityDate="2019-05-30T21:12:36.977" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5731" PostTypeId="2" ParentId="5728" CreationDate="2019-05-30T23:19:22.323" Score="9" Body="&lt;p&gt;Much less detail than the excellent &lt;a href=&quot;https://cseducators.stackexchange.com/a/5730/104&quot;&gt;post&lt;/a&gt; by &lt;a href=&quot;https://cseducators.stackexchange.com/users/1293&quot;&gt;Buffy&lt;/a&gt;, but directly to the question. Replace unit tests with validations and linters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have the students create all content in distinct files: HTML, CSS, and JS. Any styles or JavaScript in the &lt;code&gt;.html&lt;/code&gt; file is &lt;em&gt;invalid&lt;/em&gt; for the project(s). There are many validators and linters for all three, as well as for any other &quot;code&quot; you choose to use/allow, such as PHP, Ruby, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since a unit test only gives go/no-go results, a validator is at least as effective. A visual check of the resulting page/site shouldn't take but a few moments as well. If it validates and looks correct, it must be &quot;right.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you also wish to instill, or enforce, coding standards, comments, indentation, etc., a linter may help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Running a series of validators and linters, checking the operations of the page/site, and visually scanning the code should take much less time than grading a paper-based exam, so you are still time ahead. If the students are provided access to similar tools, if not the exact ones, or exact settings you use, they can develop the habit of applying the &quot;test&quot; to their own code as part of their development work-flow.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As an extra note, if you need to compare versions/iterations of their code, you can use a system such as &lt;code&gt;git&lt;/code&gt;, which need not be based on GitHub, or even use remote repos at all. Each student can be required to create a GPG key for their project work, and sign their commits. With that system, you can use the built-in diff function to see the changes and be certain who committed what.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-05-30T23:19:22.323" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5732" PostTypeId="1" AcceptedAnswerId="5734" CreationDate="2019-05-31T07:46:15.687" Score="3" ViewCount="168" Body="&lt;p&gt;In less than one month I'll be graduating from the equivalent of high school (I'm in Latvia). In my high school you also get a certificate based on which career you choose eg. a Chef or a Computer Technician. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Starting next semester there is going to be a new study called a &quot;Programmer Technician&quot;, which I have been received an offer to teach )because I've been working as a programmer since I was 15 years old). How would I go on to teaching, like assess the students, give them homework (eg. how much etc.). How prepared should I be when the lesson happens. Stuff like that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently 20 years old, and the students will be 16 year olds&lt;/p&gt;&#xA;" OwnerUserId="8106" LastEditorUserId="58" LastEditDate="2019-08-14T11:39:18.923" LastActivityDate="2019-08-14T11:39:18.923" Title="Recent Graduate becomes a teacher" Tags="|lesson-ideas|student-motivation|best-practice|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5733" PostTypeId="2" ParentId="5706" CreationDate="2019-05-31T10:18:06.377" Score="6" Body="&lt;h2&gt;Make the best with what you got.&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As &lt;a href=&quot;https://cseducators.stackexchange.com/a/5729/6794&quot;&gt;Onorio pointed out in his answer&lt;/a&gt;, you'll inevitably come across educators with superficial or even outdated understanding in some topics. In fact you may come across senior devs in enterprises with the same profile.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this doesn't mean there is nothing that you can learn from them. &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don't lock yourself into thinking that they are always wrong, or that you are always right.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is vital as it will not only make you insufferable to work with from their perspective, it could also shut down your own personal development. You want to learn, not prove a point.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn to filter that which is &lt;em&gt;obviously&lt;/em&gt; wrong but entertain why some things are being brought up&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Refine your current understanding of things by discussing it with others (like how you are doing here). This is important even if you have no concerns about the person teaching. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To start off in your case, Copyright has &lt;strong&gt;a lot&lt;/strong&gt; of relevance for code which can be understood as creative work. For instance, do you know what Code Licenses are and how/why they are attributed? At my job we were basically stuck for 3 months because of this, since advancing further without paying mind to that could cost us thousands! &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your teacher may have utterly failed in effectively bridging the context since you are here, but understanding a &quot;line by line copy&quot; lawsuit makes sense because talking copyright makes sense. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Wikipedia is &lt;strong&gt;not actually credible as citation&lt;/strong&gt; since it can change at any time, so if you ever wanna source it look for, well, the citations at the bottom of the page. You'll find out CS is not exactly a standardized course so such reference is indeed shut down easily after you look!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Understand other perspectives, and how to work with them.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is this teacher's background and experience? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They believe the things they say for a reason: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Maybe they are from a more design/pedagogy oriented background and don't teach much programming because they barely use it nowadays; &lt;/li&gt;&#xA;&lt;li&gt;Maybe their cultural background influences their relationship with you regarding hierarchy so there is no point in discussion with them specifically; &lt;/li&gt;&#xA;&lt;li&gt;Maybe they took another professor's notes and &quot;answers sheet&quot; as they legitimately don't care because they need to fill hours in their spreadsheet. &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since you are an enthusiast, such syllabus would serve only as a way to introduce you to some concepts in either case even if perfectly administered. You'll always have to go out and work them on your own if you want to grow; in Software Development you'll be constantly disappointed for the most part if you believe otherwise!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; You won't have to deal with this person forever, &lt;strong&gt;be humble&lt;/strong&gt; and &lt;strong&gt;learn what you can&lt;/strong&gt; even if it indeed is only &quot;what common misconceptions people are being taught&quot; or &quot;top 10 signs to look out for when interacting with superiors&quot;.&lt;/p&gt;&#xA;" OwnerUserId="6794" LastEditorUserId="6794" LastEditDate="2019-05-31T10:27:00.477" LastActivityDate="2019-05-31T10:27:00.477" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5734" PostTypeId="2" ParentId="5732" CreationDate="2019-05-31T12:25:44.807" Score="3" Body="&lt;p&gt;I will draw on and supplement my &lt;a href=&quot;https://academia.stackexchange.com/a/130930/75368&quot;&gt;answer&lt;/a&gt; pointed to in a comment.&lt;/p&gt;&#xA;&lt;p&gt;The main things you need to create for a course are&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A syllabus, listing topics and how much time (approximately) you will spend on each one.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A list of student activities (exercises and projects) that they will be required to do to learn the material. This is the most important element.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A way to give individual feedback to each student on their work. This can be hard, depending on scale, and may require assistants at large scale.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A way to get feedback from the students on their learning and on their perception of the course.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Some mechanism for delivering the &lt;em&gt;content&lt;/em&gt; of the course. This can be lecture, books, notes, videos, online materials, etc. Don't assume that lecture is the only possibility.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;When creating the first draft of the syllabus, it is helpful to have more material than you can likely cover. But it is essential that you know which topics are critical for the students and which might be dropped when time becomes an issue. Students can learn some things on their own, of course. Make sure you have a timeline that will include the critical topics.&lt;/p&gt;&#xA;&lt;p&gt;When creating the student activities, make sure that you emphasize the critical topics. And, for a first time teacher, realize that people learn through reinforcement and feedback. Nobody learns much on first seeing or hearing it. You need to actively engage the brain. This normally implies some repetition, both in exercise and in lecture. But feedback is also necessary so that students don't somehow draw the wrong conclusions from what the see, hear, and do. A simple grade on an exercise is not sufficient. Individual face to face discussion is best, but usually infeasible. Written comments are the normal compromise.&lt;/p&gt;&#xA;&lt;p&gt;To obtain student feedback I always found that an anonymous channel was useful. In fact, though it feels scary, a &lt;em&gt;public&lt;/em&gt; but anonymous channel. If a student said that the course was terrible in some way, but it wasn't, other students would correct the writer. I didn't ever need to respond. Students often do course evaluations at the end, but that isn't sufficient to let you make corrections if necessary. A periodic questionnaire is one mechanism.&lt;/p&gt;&#xA;&lt;h3&gt;Some things to consider about course structure.&lt;/h3&gt;&#xA;&lt;p&gt;The main thing to look at is how you use face to face session. Do you &amp;quot;broadcast&amp;quot; material via lecture or otherwise or do the students use that time as a laboratory. If the latter, then &lt;em&gt;content&lt;/em&gt; is made available to them at other times, through videos or written material. This is called a &lt;em&gt;flipped classroom&lt;/em&gt; and a lot has been written about it. You can also do a hybrid, with some course sessions devoted to lecture, some to questions, some to lab work, etc.&lt;/p&gt;&#xA;&lt;p&gt;One advantage of the flipped classroom, especially with young students, is that you get to be present to monitor their learning in real time. But you will need a way to make sure that they actually study the content. A short daily quiz is one possibility if it becomes an issue. Another is requiring a one page written summary of the material studied.&lt;/p&gt;&#xA;&lt;p&gt;The next important thing to look at is how much collaboration and group work you will permit and require. For some things it is useful for students to be required to work strictly alone. If that is the case, make sure that you have made the rules explicit. But in computing, especially, group work is very valuable and so, at some point, it should be permitted. At some point it should be encouraged. At some point it should be required.&lt;/p&gt;&#xA;&lt;p&gt;For group work you need to decide who defines the groups and how. Self chosen groups sometimes works, but not always. There are advantages for instructor chosen groups as well as for self chosen ones. One interesting way to choose teams is for the instructor to choose team &amp;quot;captains&amp;quot; and for the captains to choose team members in rotation, as is done in forming &amp;quot;sandlot sports teams&amp;quot;. The captains can serve as communication conduits with the instructor, but are not, explicitly, team managers.&lt;/p&gt;&#xA;&lt;p&gt;For group work, also, it is best to discourage (or forbid) &amp;quot;simply&amp;quot; dividing up the work between members. This is almost always a failure with novices. They don't realize that it adds a complex step of integrating their individual work and often fail at it. Likewise any underperforming member can end the success of the whole group.&lt;/p&gt;&#xA;&lt;p&gt;It should be obvious that communication is essential in education as it is done today. I find it useful to find a mechanism in which students can always get their questions answered, either by myself or by another student. For this I provide a mailing list to which every student is subscribed. Students are encouraged to ask and answer questions, but also adhere to any sharing rules in place (no posting code...). I found this more useful, being asynchronous, than group chats, though I also used those on occasion, posting a transcript after the chat finished. This might be less essential in a flipped classroom, however.&lt;/p&gt;&#xA;&lt;h3&gt;Some things to consider when delivering the course for the first time.&lt;/h3&gt;&#xA;&lt;p&gt;You will most likely have too much in the syllabus and will almost assuredly try to do too much. Not an absolute, of course, but pretty common for a new teacher. So be prepared to be especially flexible with everything, including grading. Focus especially on the student tasks and on their progress, not on your own activities (lectures,...). If they have a good experience, then they will be encouraged to continue their studies.  If not, they may decide to leave the field unnecessarily. That doesn't mean being &amp;quot;easy&amp;quot;. You can be demanding, but you have to be fair. You have to be reasonable.&lt;/p&gt;&#xA;&lt;p&gt;I'll note, in particular, that a large project in a course can be a &amp;quot;success&amp;quot; even if no student or group completes it.&lt;/p&gt;&#xA;&lt;p&gt;You also need to be aware, especially at novice levels, that the students may not be experienced learners. Many students find things easy for many years and don't learn how to apply themselves. But then, they hit a block and don't have any skills to carry them past it. This is one reason we require that exercises be done as homework or otherwise.&lt;/p&gt;&#xA;&lt;p&gt;But students also may not know, and likely don't, how to take notes effectively and extract key ideas from readings. You may need to teach them how to do this and require it. Again, repetition is key. Taking notes and never looking at them again is not especially effective. Making summaries of your notes is much better (reinforcement).&lt;/p&gt;&#xA;&lt;p&gt;And don't forget to make notes for yourself about each student. This goes beyond grades. A note-card for each student is useful, noting any blocks you see or any special requirements. Dating each interaction can be useful if conflicts ever occur.&lt;/p&gt;&#xA;&lt;h3&gt;Finally&lt;/h3&gt;&#xA;&lt;p&gt;Do a retrospective after the course to set an initial plan for the next time you do this course or something similar. What works. What needs to be improved. Keep notes for yourself.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that the course is a success if the students learn something useful. You can &lt;em&gt;feel&lt;/em&gt; like it is a failure, but it isn't if the students succeed. Sometimes stumbling when answering questions and not knowing the answer, immediately, to a question is a good thing. Some things are hard and it doesn't do the students any good if they get the misconception that they are always supposed to be easy. When that happens they can feel like failures, when things are really just &lt;em&gt;hard&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-05-31T16:25:18.680" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5737" PostTypeId="2" ParentId="5706" CreationDate="2019-06-02T07:57:30.513" Score="0" Body="&lt;p&gt;You could go and research and read the course on your own. That's what I always do when I don't understand lectures in school or when a subject is treated poorly. &#xA;You can do that by visiting educational online platforms such as pluralsight and even watching videos on youtube and you can also read books on the subject in which you face difficulties.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also hire a home teacher for that subject too.    &lt;/p&gt;&#xA;" OwnerUserId="8114" LastEditorUserId="4689" LastEditDate="2019-06-11T02:11:40.743" LastActivityDate="2019-06-11T02:11:40.743" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5738" PostTypeId="2" ParentId="5728" CreationDate="2019-06-02T17:00:46.873" Score="1" Body="&lt;p&gt;Assessing web dev courses at scale can be tricky because you have to consider the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ensure that the resulting web app &lt;strong&gt;looks&lt;/strong&gt; as expected&lt;/li&gt;&#xA;&lt;li&gt;all functionalities should work as expected with the &lt;strong&gt;correct logic&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;the &lt;strong&gt;code quality&lt;/strong&gt; to make everything work should meet the industry standard&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;With 60 students (or any number over 20 really), this can get really tricky.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;My recommendation would be to find tools that help you do the following:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Asses the looks: You should be able to preview the submission without downloading and running anything locally (&lt;a href=&quot;https://codesandbox.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeSandbox&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Correct logic: Either run E2E tests and/or unit tests (&lt;a href=&quot;https://pptr.dev/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Puppeteer&lt;/a&gt;, &lt;a href=&quot;https://jestjs.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jest&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Code quality: linters (&lt;a href=&quot;https://eslint.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ESLint&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I would also recommend giving a try to &lt;a href=&quot;https://autogradr.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;AutoGradr&lt;/a&gt; that does all of the above in a single tool and is built specifically for educators such as yourself. (Disclaimer: I'm the author of this free tool)&lt;/p&gt;&#xA;" OwnerUserId="1397" LastActivityDate="2019-06-02T17:00:46.873" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5741" PostTypeId="1" CreationDate="2019-06-03T21:03:52.793" Score="0" ViewCount="74" Body="&lt;p&gt;I'm developing a big data algorithms course, and would love to teach students how to use &lt;a href=&quot;https://www.ibm.com/developerworks/library/bd-streamsintro/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;IBM's InfoSphere streams platform&lt;/a&gt;, which I once used years ago. Does anyone have experience reaching out to companies like IBM to request a version for academic purposes? First I'd need a version for me to play with and develop course materials, then maybe one for students (perhaps at a discounted price) to learn during the course. I've poked around IBM's website, but can't find any clear &quot;contact us&quot; email address. Hoping someone here can suggest a way forward. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2019-07-04T01:02:05.243" Title="Is it easy for professors to get academic versions of software from IBM?" Tags="|resource-request|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5742" PostTypeId="2" ParentId="5741" CreationDate="2019-06-03T21:18:28.990" Score="1" Body="&lt;p&gt;This is a question to ask on the SIGCSE mailing list. A member there was primarily an educator and now works as a sort of liaison to the SIGCSE community. She will probably respond to such a question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suspect that they still have grants available that, with some work on your part, might solve your needs. You might need to write up a research proposal, of course. Easy? Maybe no. Possible? Maybe yes. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-06-04T00:16:26.330" LastActivityDate="2019-06-04T00:16:26.330" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5743" PostTypeId="2" ParentId="5690" CreationDate="2019-06-04T00:59:48.787" Score="1" Body="&lt;p&gt;Here's a real-life example from a previous job: the &lt;a href=&quot;https://en.wikipedia.org/wiki/Federal_Aviation_Administration&quot; rel=&quot;nofollow noreferrer&quot;&gt;Federal Aviation Administration&lt;/a&gt; uses queueing models for a ton of their algorithms, from scheduling flight departures to rerouting flights because of severe weather.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Googling &quot;&lt;a href=&quot;https://www.google.com/search?q=faa+queueing+models&quot; rel=&quot;nofollow noreferrer&quot;&gt;FAA queueing models&lt;/a&gt;&quot; will return a ton of research papers that are pretty interesting, although probably too advanced for an introductory class. You could simplify the exercise into a simulation of an airport.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another real-life example that I think about often are &lt;a href=&quot;https://en.wikipedia.org/wiki/Supermarket&quot; rel=&quot;nofollow noreferrer&quot;&gt;supermarket&lt;/a&gt; lines. Maybe make an assignment out of this question: what's the most efficient way to get X people through Y checkout lanes?&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2019-06-04T00:59:48.787" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5744" PostTypeId="2" ParentId="5671" CreationDate="2019-06-06T11:52:14.950" Score="0" Body="&lt;p&gt;Create a Beamer presentation using RMarkdown, with Rstudio or any other tool.&#xA;Prepare your slide content using Markdown.&#xA;Click on the 'Knit' to format and view as HTML or PDF of the slides. Renders beautifully.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/32ZmD.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/32ZmD.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8120" LastEditorUserId="8120" LastEditDate="2023-01-31T11:48:17.593" LastActivityDate="2023-01-31T11:48:17.593" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5745" PostTypeId="2" ParentId="5728" CreationDate="2019-06-06T14:08:17.777" Score="0" Body="&lt;p&gt;Another thought that comes to mind is that you can, to some extent, automate checking of web pages with &lt;a href=&quot;https://www.seleniumhq.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;selenium&lt;/a&gt;.  It would be a very large lift and your students would be forced to follow certain conventions in building their web pages but that may be an approach which could automate part of the work for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to insure I'm being clear, I'd envision you writing a set of tests which could automatically be run against the student web pages to check for the presence or absence of certain elements. &lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2019-06-06T14:08:17.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5746" PostTypeId="1" AcceptedAnswerId="5749" CreationDate="2019-06-06T14:12:56.250" Score="2" ViewCount="86" Body="&lt;p&gt;Would anyone refer me to exercises or resources to help learners build their research skills?  I mean I'm trying to get learners to think in terms of solving their own problems before bothering other, more senior, developers. Part of solving their own problems is knowing how to google for potential solutions--how to research. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know of exercises I might use as learning activities to reinforce this skill?&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;EDIT:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;This is for a work training situation.&lt;/p&gt;&#xA;" OwnerUserId="4689" LastEditorUserId="27" LastEditDate="2019-06-06T18:14:05.523" LastActivityDate="2019-06-14T20:48:11.733" Title="Are There Exercises To Build Software Development Research Skills?" Tags="|active-learning|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5748" PostTypeId="1" CreationDate="2019-06-09T12:53:43.713" Score="3" ViewCount="176" Body="&lt;p&gt;I will be teaching key-stage-3 pupils, in a school with no key-stage 4 or 5 in the computing subjects. Some of these pupils may wish to do computing at key-stage-5 at another school. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have experience of teaching A-level students, that have not done GCSE computer-science? Or even University teachers teaching students with no prior experience (&lt;strong&gt;Please give context in your answer&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can I do to better prepare them? While still giving age appropriate lessons.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Other factors: Because of the size of the computing department, I will have less time with them than I have had in other schools (one hour a week for 1/3 of a year).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Translation: &lt;a href=&quot;https://en.wikipedia.org/wiki/Key_Stage&quot; rel=&quot;nofollow noreferrer&quot;&gt;key-stage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;key-stage 3: age 11→14&lt;/li&gt;&#xA;&lt;li&gt;key-stage 4: age 15→16, first external exams, GSCE, level 1 and 2.&lt;/li&gt;&#xA;&lt;li&gt;key-stage 5: age 16→18, (A-level, level 3)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2019-06-19T07:15:48.833" LastActivityDate="2019-06-19T16:09:24.230" Title="What do A-level students, that have not done GCSE, struggle with?" Tags="|curriculum-design|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5749" PostTypeId="2" ParentId="5746" CreationDate="2019-06-09T17:42:46.820" Score="2" Body="&lt;p&gt;This &lt;a href=&quot;https://ahrefs.com/blog/google-advanced-search-operators/&quot; rel=&quot;nofollow noreferrer&quot;&gt;article&lt;/a&gt; contains advanced google options to refine searches, you could make them into exercises for a work training simulation using Jupyter Notebooks such as &quot;Search for stackoverflow intext: ag-grid AND module.ts&quot;, or exercises to walk git branches to become more familiar with the project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also teach them to create a personal database of questions they've already asked, and how to search it, just so they aren't asking senior developers the same question twice. &lt;/p&gt;&#xA;" OwnerUserId="8128" LastActivityDate="2019-06-09T17:42:46.820" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5750" PostTypeId="2" ParentId="5724" CreationDate="2019-06-09T17:51:28.667" Score="3" Body="&lt;p&gt;You could try the &lt;a href=&quot;https://www.bootstrapworld.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bootstrap&lt;/a&gt; curriculum, the materials are free and can integrate with existing curriculum instead of being electives. A talk about the design of the program, and how to design highschool computer science curriculum in general is given &lt;a href=&quot;https://www.youtube.com/watch?v=5c0BvOlR5gs&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; by one of the Co-directors of Bootstrap, Professor Shriram Krishnamurthi from Brown University. &lt;/p&gt;&#xA;" OwnerUserId="8128" LastActivityDate="2019-06-09T17:51:28.667" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5751" PostTypeId="2" ParentId="1205" CreationDate="2019-06-09T18:16:10.440" Score="2" Body="&lt;p&gt;I have seen universities use linters and test suites to automatically check the correct state of the assignment so it can be submitted. Here is an example in &lt;a href=&quot;http://www.krivers.net/15112-f17/notes/cs112_f17_linter.py&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python&lt;/a&gt; or the student assignment &lt;a href=&quot;http://csapp.cs.cmu.edu/3e/datalab-handout.tar&quot; rel=&quot;nofollow noreferrer&quot;&gt;helper programs&lt;/a&gt; in C, used for the book CS:App as another example of possible small programs you could include with assignments to make this easier to review submissions.&lt;/p&gt;&#xA;" OwnerUserId="8128" LastActivityDate="2019-06-09T18:16:10.440" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5752" PostTypeId="2" ParentId="3491" CreationDate="2019-06-10T23:52:55.510" Score="3" Body="&lt;p&gt;Maybe I'm misunderstanding the question or maybe I keep skipping over a line, but it seems like the question is more about how to help students figure out how to actually use IDEs (what buttons to click, etc) rather than about how to convince them that IDEs are helpful.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How you help students adapt to an IDE depends on which IDE it is, but a &quot;cheat sheet&quot; of some features and potentially unfamiliar terms will help. If you can, you could also have an additional non-lecture session (e.g. regular or extra professor or TA office hours held group-style, a lab) held for students to attend if they want help setting up and navigating an IDE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently a CS undergraduate student and TA. A few anecdotes behind my answer:&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A lot of the CS classes I've taken have had an extra non-lecture session at the beginning of the semester for installation and troubleshooting help. For classes with lab sections, the extra session was a lab; for other classes, it was an extra office hours session or even just the first regular office hours. The professors don't even have to be there if there are TAs (although usually the professors are there).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I had to use Eclipse in one of my CS 2 classes (so this anecdote isn't as relevant). That was so confusing to understand (why won't drag-and-drop work the same?! Why can't I delete files from my system from right inside Eclipse like I could with jGrasp?! and other grievances), and even after reading who knows how many pages about what the heck workspaces even are (yes, including &lt;a href=&quot;https://stackoverflow.com/questions/13552266/eclipse-workspaces-what-for-and-why&quot;&gt;this one&lt;/a&gt;; to an early CS student--a.k.a. in everyday vernacular--&quot;project&quot; and &quot;application&quot; sound pretty interchangeable, but they're clearly used differently in that top answer...), I didn't quite figure out workspaces.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Everything you said about Eclipse resonated so strongly with me, but especially #2.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eclipse also seemed excessive for the assignments we were doing in this early CS class, and we were never given anything that would make any of the seemingly extra features that were also &lt;em&gt;required&lt;/em&gt; seem reasonable. (Still haven't in my classes. I'm half-expecting to get a wake-up call or crash course in the future once I'm out in the Real World.) I never did quite overcome my frustration with Eclipse enough to actually understand how to properly use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I managed to get by with some explanations provided by the professor and TAs about how Eclipse works so that I could at least submit working project files.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Last year (2018), I downloaded Visual Studio Code. This was so much easier to get used to. I don't remember how much I needed to do when I first installed it, but I definitely am not bothered every time I open it up like I am with Eclipse. To me, it works like a very enhanced text editor/file manager, no extra features shoved in my face (although they're there if I want to use them).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a commenter who said Visual Studio pretty much works &quot;out of the box&quot;. I can only speak from experience for VS Code, but I agree.&lt;/p&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2019-06-10T23:52:55.510" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5753" PostTypeId="2" ParentId="5679" CreationDate="2019-06-11T00:35:12.450" Score="2" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The idea is that I somehow make it sound... too easy? Like it should be obvious. But when it doesn't immediately click, it makes the listener feel stupid.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h1&gt;Dismissive Language&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It's common to want to put your student at-ease by saying things like this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&quot;You &lt;strong&gt;just&lt;/strong&gt; need to transmogrify the jabberwocky.&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;&lt;strong&gt;All you need to do&lt;/strong&gt; is reverse the polarity on the tachyon emitters.&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;After you call the recursive stochastinator, &lt;strong&gt;the rest is easy&lt;/strong&gt;.&quot;&lt;/li&gt;&#xA;&lt;li&gt;&quot;&lt;strong&gt;Of course,&lt;/strong&gt; the next step is to liquify the whatchamacallit.&quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Humans use this kind of language to reassure the person we're talking to. We're trying to say &lt;em&gt;&quot;don't worry, it's not as bad as you think it is!&quot;&lt;/em&gt; - the problem is that this usually has the exact opposite effect.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By telling somebody that something should be easy, we're alienating them when it's &lt;strong&gt;not&lt;/strong&gt; easy, which in computer science is quite often. &lt;em&gt;&quot;My teacher told me this should be easy, but I'm really confused, I guess I'm just really bad at it.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.dropbox.com/s/g9igfzl5u55lvyj/Su_Mathematical%20Microaggressions.pdf?dl=0&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mathematical Microaggressions&lt;/a&gt; discusses this language. It's from a math perspective, but it's a good primer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To improve this, the first thing I'd do is monitor your own language. Maybe record yourself speaking and then listen back to it.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;The Process&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;As others have said, it's also important for you to demonstrate &lt;strong&gt;the process&lt;/strong&gt; of solving a problem rather than jumping straight to the answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching something, especially if you have more experience than the topic you're teaching, it can be tempting to lay it all out at once. &lt;em&gt;&quot;To get the total of an array of integers, you'd track the sum in a variable, then use a for loop to iterate over the array and increment the variable by the value at each index.&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a couple problems here:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You haven't checked in with your student, so they're probably lost. &lt;em&gt;&quot;I stopped understanding what you were saying about 3 words in...&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;You haven't shown them how you obtained this information in the first place. &lt;em&gt;&quot;How am I supposed to remember all of that?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;You haven't demonstrated what to do when things go awry, or when they encounter a slightly different problem. &lt;em&gt;&quot;Okay now I've memorized how to compute a sum, but what about an average?&quot;&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;To improve this, I think it's important to show your student &lt;strong&gt;how&lt;/strong&gt; you got this information, and what steps they should follow when they're facing something similar by themselves. This should also include steps like planning, getting error messages (which is a totally normal part of programming, but is often skipped over when teaching), and debugging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&quot;Let's start about by coming up with a goal. What do we want to do? Okay, how can we break that down into smaller steps? Now let's focus on the first step. Where can we find more information? Oh, we got an error message, that's totally normal! Let's read through it to figure out what it's saying...&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I wrote up a little meta-tutorial on this process &lt;a href=&quot;https://happycoding.io/tutorials/how-to/program&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Engage&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;I also think it's important to make sure you're meeting students where they live. Specifically, I would make sure that your student is interested in whatever topic you're discussing, or that you at least &quot;brand&quot; the topic with something personal to them. If you're talking about getting the sum of an array of integers, make that the total number of &lt;code&gt;&amp;lt;insert thing your student is interested in&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can all feel pretty tedious, especially if you have more experience than your students. It's tempting to jump to the &quot;interesting stuff&quot; without making sure your students are along for the journey.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But teaching is a different skill than writing code. And like any skill, the best way to improve is through practice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could also take a step back and try to find a set of tutorials that you and your daughter can enjoy together, instead of putting all of the teaching on yourself. &lt;a href=&quot;https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coding Train&lt;/a&gt; has a bunch of beginner-friendly videos that might be fun.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2019-06-11T00:52:14.243" LastActivityDate="2019-06-11T00:52:14.243" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5754" PostTypeId="2" ParentId="5679" CreationDate="2019-06-11T01:12:50.157" Score="2" Body="&lt;p&gt;You got some good specific answers already. Here are a couple of small points that could be useful when teaching in general:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Without seeing a transcript of one of your explain-the-programming sessions, I can't say for sure, but it's possible that your word choice is also a factor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example: Something I run into a lot is the word &lt;em&gt;just&lt;/em&gt;, as in &quot;What is a for-loop?&quot; &quot;You're just telling the program to do something a certain number of times.&quot; &lt;em&gt;Just&lt;/em&gt; makes some people feel relieved (&quot;oh, that's not too complicated, I can do that&quot;), but it makes other people (or even the same people under different circumstances) feel discouraged (&quot;why didn't I figure that out myself?&quot; / &quot;if it's so simple, why do I still not get it?&quot;), even if your tone is not condescending or pitying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(This is one of my bad habits. I've been trying to only use &lt;em&gt;just&lt;/em&gt; when I feel it's a good choice for the student/situation rather than all the time.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I also can't say for sure whether this next point applies to you in particular, but I often find that when people (including me) make something sound easy or obvious, it's because we're explaining how to do something rather than guiding the student through their work. It's like giving a kid a sheet with advice and tips on how to build a big tower (&quot;here are all the facts I've gathered over the years that you should know&quot; / &quot;these are beginner mistakes&quot; / the idea that to be good, you can't make these mistakes) versus working through why their current tower keeps falling down (also gives you the opportunity to explain that you understand whatever the erroneous line of reasoning is and that maybe anyone could make that mistake).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That might not apply to you at all. I don't know.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2019-06-11T01:12:50.157" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5755" PostTypeId="1" CreationDate="2019-06-11T06:21:20.063" Score="5" ViewCount="219" Body="&lt;p&gt;The last day of school is a half day for us and it isn't one where my students are too engaged...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Last year I showed &lt;strong&gt;Hidden Figures&lt;/strong&gt; and it went over pretty well. Many students were stunned by the lack of respect afforded to people of color in the '60s (and to this day).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looking for suggestions for other school appropriate CS related movies (my classes are at high school level - US ages 14-18 more or less, but movies for any age range would be welcome).&lt;/p&gt;&#xA;" OwnerUserId="134" LastEditorUserId="134" LastEditDate="2019-06-17T19:58:56.273" LastActivityDate="2019-06-19T01:36:42.317" Title="End of Year Movies For CS Classes" Tags="|resource-request|computer-history|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5756" PostTypeId="2" ParentId="5755" CreationDate="2019-06-11T11:05:31.433" Score="7" Body="&lt;ul&gt;&#xA;&lt;li&gt;The Imitation Game: Alan Turing's life through the lens of his work on breaking the Enigma code at Bletchley Park during WWII and his later prosecution as a homosexual during the 1950s. It touches on computer science, World War 2, equality, women's role is CS and society, etc. The movie also casts Turing, inaccurately, as socially awkward and a loner. This provides an opening to explore the &quot;lone programmer&quot; stereotype and the role of teams in real projects.&lt;/li&gt;&#xA;&lt;li&gt;The Social Network: Interesting look into silicon valley culture, and has a bit of CS content towards the beginning when Zuckerberg is hacking into the various Harvard photo troves. It can be fun to freeze frame at those moments and discuss what is going on. (Much of it isn't really that complicated!)&lt;/li&gt;&#xA;&lt;li&gt;Inception: a total scifi fantasy, but it does illustrate recursion. — for more info on recursion see &lt;a href=&quot;https://cseducators.stackexchange.com/a/5756/204&quot;&gt;https://cseducators.stackexchange.com/a/5756/204&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2019-06-17T22:18:15.593" LastActivityDate="2019-06-17T22:18:15.593" CommentCount="0" CommunityOwnedDate="2019-06-11T11:05:31.433" ContentLicense="CC BY-SA 4.0" />
  <row Id="5757" PostTypeId="1" AcceptedAnswerId="5761" CreationDate="2019-06-12T11:07:29.670" Score="2" ViewCount="165" Body="&lt;p&gt;I've planned a shallow and broad curriculum for a summer program (5 days a week for 2 weeks, 9:00 to 17:00) or sorts, and the flow of the subjects seems flawed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The students are gifted (not a prerequisite, but most of them are) highschoolers with either no background in programming, or very little background. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose is to interest them in learning programming. More specifically, to give them a taste of some aspects of various languages, hoping that each will find something they like and, being naturally curious, they might pursue the subjects they liked a bit more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The curriculum I have in mind is more or less:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Using &lt;code&gt;C&lt;/code&gt;: &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Intro to the simplest of things&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;printf(&quot;Hello World!\n&quot;);&lt;/code&gt; and the like&lt;/li&gt;&#xA;&lt;li&gt;most importantly, &lt;strong&gt;introduction to types&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Using &lt;code&gt;C++&lt;/code&gt;/&lt;code&gt;Java&lt;/code&gt;:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;very brief overview of OOP, just at the concept level&lt;/li&gt;&#xA;&lt;li&gt;&quot;Things&quot; are described in &lt;code&gt;class&lt;/code&gt;es which have properties etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;Using &lt;code&gt;JavaScript&lt;/code&gt;:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Intro to functional programming. Again, just at the concept level&lt;/li&gt;&#xA;&lt;li&gt;&quot;Things&quot; are described with functions.  &lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;and finally:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;Using &lt;code&gt;python&lt;/code&gt;:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;finish with small tasks for them to get some hands on experience and things to show their friends&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As I see it, the main issue is, for lack of a better word, &lt;em&gt;synergy&lt;/em&gt;. Subjects 2 and 3 seem highly disconnected. Moreover, I fear that for the students, the things they learnt in &lt;code&gt;C&lt;/code&gt; and &lt;code&gt;C++&lt;/code&gt; will seem &quot;pointless&quot;, since most of them will think that they don't use those concepts and ideas in the tasks in part 4. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How might I bridge between OOP in Java or C++, with functional programming in JavaScript? Personally, I thought using Java's functional interfaces could work, but that would require teaching about interfaces, making the course far less &quot;shallow&quot; than it should be. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Might there be a simple or neat &quot;trick&quot; to connect the two subjects?&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;PS: Any other suggestions regarding the partial curriculum I outlined are also welcome. &lt;sub&gt;It's the first I've built from nothing&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="150" LastEditDate="2019-06-12T12:08:45.377" LastActivityDate="2019-08-08T21:24:42.197" Title="Shallow, broad and general introduction to programming" Tags="|curriculum-design|secondary-education|" AnswerCount="4" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="5758" PostTypeId="2" ParentId="5408" CreationDate="2019-06-12T11:40:41.343" Score="2" Body="&lt;p&gt;Yes, from my experience it can.&lt;/p&gt;&#xA;&lt;p&gt;Regarding modular programming: Vue is rather similar to React in this matter.&lt;/p&gt;&#xA;&lt;p&gt;Components can be created and treated rather similarly to the way one treats React.Component objects. While the two frameworks are different, the mindset for dealing with components is essentially the same.&lt;/p&gt;&#xA;&lt;p&gt;This means that user interactions are also somewhat identical. I'm not entirely sure what you mean by &amp;quot;complex&amp;quot;, but these Vue components can handle events (such as clicking etc.)&lt;/p&gt;&#xA;&lt;p&gt;As for unit testing, well: &lt;a href=&quot;https://v2.vuejs.org/v2/guide/unit-testing.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Their guide page does a better job at explaining than I do&lt;/a&gt;. Essentially, one can use Jasmine or other UnitTest frameworks, and the &lt;code&gt;Vue&lt;/code&gt; instance is the mediator between regular ol' javascript, and the components you want to test.&lt;/p&gt;&#xA;&lt;p&gt;This mediation by the &lt;code&gt;Vue&lt;/code&gt; instance brings me to the final point: Vue doesn't exactly separate concerns in this regard. Most things are channeled through this instance. I haven't looked into it enough to be sure, but my guess is that it's more like a factory than a container for other things.&lt;br /&gt;&#xA;This would make it much more concern-separated. But again, &lt;a href=&quot;https://v2.vuejs.org/v2/guide/single-file-components.html#What-About-Separation-of-Concerns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Vue.js knows better than I do&lt;/a&gt;. A more in-depth explanation can be found &lt;a href=&quot;https://medium.com/@s.molinari/templating-separation-of-concerns-or-separation-of-technology-or-something-else-123a3d41f0b4&quot; rel=&quot;nofollow noreferrer&quot;&gt;in this medium.com post&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, while Vue might seem more shallow at first, I find that it isn't. It's just somewhat different than the other two, but more similar to React.&lt;/p&gt;&#xA;" OwnerUserId="150" LastEditorUserId="-1" LastEditDate="2022-09-27T22:35:34.400" LastActivityDate="2019-06-12T11:40:41.343" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5759" PostTypeId="2" ParentId="5757" CreationDate="2019-06-12T16:52:48.433" Score="3" Body="&lt;p&gt;With two weeks, you'd be better off focusing on a bit. If you are teaching C++/Java, why Python?  I would choose only one of those three languages, as they are all fairly similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, if you wanted to do some OOP, have you considered using C#/Unity? It results in some quite fun projects right out of the gate, and they are working in a fully professional environment as they begin.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose with only 10 days, I would think about either doing web development or Unity, and I would spend a bit of time working with GitHub in either case.  Two weeks just isn't a huge amount of time, and students appreciate coming out with a few firm skills that they can comfortably use.  Both web dev and game development lend themselves towards extensible projects so that advanced students can zoom ahead and learn more, while slower students can actually master some basics.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-06-12T16:52:48.433" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5760" PostTypeId="1" CreationDate="2019-06-13T10:05:51.710" Score="4" ViewCount="130" Body="&lt;p&gt;I am looking to create interactive workbooks that teach the Gnu/Linux terminal to students. This would be presented in such a way that one half of the screen is an interactive terminal, running the Gnu &lt;code&gt;bash&lt;/code&gt; Unix shell, and the other half of the screen is a workbook, with steps that the student must follow in the included shell. The output from the students' shells would be automatically graded, to ensure that they have correctly followed the steps from the workbook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, I have found two such 'services' &lt;a href=&quot;http://tuxlab.org/#/&quot; rel=&quot;noreferrer&quot;&gt;http://tuxlab.org/#/&lt;/a&gt; and &lt;a href=&quot;https://github.com/jakebailey/ua&quot; rel=&quot;noreferrer&quot;&gt;https://github.com/jakebailey/ua&lt;/a&gt; , There are also GitHub classrooms which may fall into this category. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone else aware of products like this? Preferably open source.&lt;/p&gt;&#xA;" OwnerUserId="8140" LastEditorUserId="104" LastEditDate="2019-06-14T05:31:42.767" LastActivityDate="2020-06-03T21:02:40.373" Title="Creating Interactive Gnu/Linux shell programming courses" Tags="|curriculum-design|resource-request|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5761" PostTypeId="2" ParentId="5757" CreationDate="2019-06-13T10:36:37.210" Score="5" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;The purpose is to interest them in learning programming. More specifically, to give them a taste of some aspects of various languages, hoping that each will find something they like and, being naturally curious, they might pursue the subjects they liked a bit more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Comparison of programming languages doesn't make sense until they've first mastered the basic concepts, so two weeks doesn't seem like enough time to get onto this. I think you'd be better off taking one language which supports functional and OOP styles, covering both, and then maybe doing a small Rosetta Code presentation in the last day or two, with a handout which they can refer to after the course has finished.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm also not convinced that the students' curiosity will work that way (&quot;This idea of first class functions is fun: what can I do with it?&quot;). I think that the hook should be that programming lets you do things which are fun and/or useful. The difficulty with coming up with examples is that no two students will agree 100% on what things are fun and/or useful. Games are a good bet for fun, although graphics tend to be complicated and you risk needing to dedicate lots of time to teaching/revising trigonometry and quadrature. I'm not sure whether today's youth would find text adventures fun. The concept of databases as useful is another reasonable bet: most people will collect something or follow a sport, and you can build and query structured data to enhance both of those. Pick a language which has easy serialisation and you don't need to bother with &quot;real&quot; databases (although maybe mention them in the handout).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Although I've never used it myself, Swift looks like a reasonable teaching language if you want compile-time typing. From looking at examples on Rosetta Code it seems to have clean syntax and support imperative, functional, or OOP styles.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2019-06-13T10:36:37.210" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5763" PostTypeId="2" ParentId="5755" CreationDate="2019-06-13T12:42:06.757" Score="4" Body="&lt;p&gt;In no particular order:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hacking_Democracy&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacking Democracy&lt;/a&gt; (Documentary) - An investigation into the risks of online and electronic voting.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Code_(2001_film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Code&lt;/a&gt; (Documentary) - About Linux and the free software movement, with many well known figures in Linux and free software.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Pirates_of_Silicon_Valley&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pirates of Silicon Valley&lt;/a&gt; - About the Apple / Microsoft rivalry in the early days of the PC.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Social_Network&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Social Network&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Ex_Machina_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ex Machina&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/2001:_A_Space_Odyssey_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;2001: A Space Odyssey&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, a website from one of our students:&#xA;&lt;a href=&quot;https://hackermovie.club/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://hackermovie.club/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;" OwnerUserId="2727" LastEditorUserId="134" LastEditDate="2019-06-18T09:33:03.160" LastActivityDate="2019-06-18T09:33:03.160" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="5764" PostTypeId="2" ParentId="3491" CreationDate="2019-06-14T20:45:05.597" Score="2" Body="&lt;p&gt;This is a good opportunity to offer a workshop on using the IDE. The workshop could be useful for multiple courses and classes so that other educators could also benefit from this. On top of it, it could allow the students who already have knowledge with the IDE the opportunity to teach a workshop session and to help other students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The workshop can be offered by the department, and it can be offered similar to writing tutorial sessions or office hours.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Keep the IDE tutorial separate from the course itself.&lt;/em&gt; As you said, they're industrial-strength and should not eat into the material of the course.&lt;/p&gt;&#xA;" OwnerDisplayName="user8146" LastActivityDate="2019-06-14T20:45:05.597" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5765" PostTypeId="1" CreationDate="2019-06-14T20:45:45.250" Score="5" ViewCount="158" Body="&lt;p&gt;Are there any assignment repositories that you use for assignment ideas? I am aware of the &lt;a href=&quot;http://nifty.stanford.edu/&quot; rel=&quot;noreferrer&quot;&gt;Nifty Assignments&lt;/a&gt; from Stanford and have used several. There are a lot of good fine grained problems on &lt;a href=&quot;https://www.hackerrank.com/&quot; rel=&quot;noreferrer&quot;&gt;HackerRank&lt;/a&gt;, but I would not incorporate the work of a commercial group into an assignment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, they would come with a write up and be licensed for general reuse with inclusion of a standard disclaimer, etc. Assignments with multiple parts so students get to live with their own code over a period of time would be great.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="27" LastEditDate="2019-06-15T01:42:14.270" LastActivityDate="2019-06-16T14:00:08.920" Title="Assignment repositories" Tags="|lesson-ideas|resource-request|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5766" PostTypeId="2" ParentId="5746" CreationDate="2019-06-14T20:48:11.733" Score="1" Body="&lt;p&gt;One recommendation is to get them to answer a few StackOverflow questions of which they have zero knowledge of.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another recommendation is to get them to use the ACM Digital Library (or some other database) to search for materials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both are good ways to learn to search using keywords and what to search for next when they've hit a dead-end.&lt;/p&gt;&#xA;" OwnerDisplayName="user8146" LastActivityDate="2019-06-14T20:48:11.733" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5768" PostTypeId="2" ParentId="5765" CreationDate="2019-06-16T03:56:07.207" Score="5" Body="&lt;p&gt;Engage CS Edu (&lt;a href=&quot;https://www.engage-csedu.org/&quot; rel=&quot;noreferrer&quot;&gt;https://www.engage-csedu.org/&lt;/a&gt;) is another repository, which, like Nifty Assignments, is curated by peer review.&lt;/p&gt;&#xA;" OwnerUserId="4799" LastActivityDate="2019-06-16T03:56:07.207" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5769" PostTypeId="2" ParentId="5765" CreationDate="2019-06-16T14:00:08.920" Score="5" Body="&lt;p&gt;At the beginning of every year I buy the UIL contest packet from the previous year from &lt;a href=&quot;http://store.uiltexas.org/computer-science/&quot; rel=&quot;noreferrer&quot;&gt;http://store.uiltexas.org/computer-science/&lt;/a&gt; .  UIL is an organization that's over athletic and academic competitions in Texas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each packet is only $4 and contains around 50 programming problems and 200 multiple choice questions that were used in contests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes I use &lt;a href=&quot;https://fivethirtyeight.com/tag/the-riddler/&quot; rel=&quot;noreferrer&quot;&gt;Riddler problems&lt;/a&gt; from FiveThirtyEight.com as a starting point for assignments. They're mathy, but with a little work can become programming problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also math heavy, &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt; has some good smallish type problems that can be solved with code. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-06-16T14:00:08.920" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5771" PostTypeId="2" ParentId="5748" CreationDate="2019-06-18T20:17:46.800" Score="3" Body="&lt;p&gt;Insufficient programming experience is the thing that impedes progress at A-Level, in my experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The current UK A-Levels from OCR exam board (less so AQA) emphasises &quot;Computational Thinking&quot; (CT), such as abstraction, as a theme of the course. CT, as delivered in the course material, has some overlap with stages in system development stages such as analysis. Also there is another strand &quot;problem solving&quot; and another &quot;computational methods&quot;. There are more &quot;traditional&quot; topics such as data structures and algorithms. There are questions in the exam where a student has to analyze, correct, modify or create from scratch a pseudocode &quot;snippet&quot; to address a particular small-scale algorithmic problem such as navigating a tree data structure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;With that context, the most basic exercises in the course are usually beyond those A-Level students with little prior exposure to programming. The rigours of getting code to run or compile without syntax errors or fix basic logical errors is an alien task to these students and they often give up, submitting source code that does not compile or run (if Python). These students often have no &quot;framework&quot; of what an algorithm is; to take input data and transform it in some way. Lack of this &quot;mental framework&quot; means CT is just &quot;pile of words&quot; to neo-programmers; they have no concrete experience against which to relate abstraction, decomposition, recursion, concurrency etc. Often assignments are submitted, which if in a programming language don't run, let alone produce correct outputs under any inputs. Pseudocode assignments are very difficult to mark because of a host of basic syntax errors. For some, submitting &quot;something&quot; is &quot;job done&quot; by the student because the time to develop the necessary skills, understanding, approach, identifying and diagnosing errors is just not &quot;there&quot;. Pseudocode is used because the exam uses it rather than a specific language such as Java or C# or C++ or .... to &quot;level the field&quot; among all candidates who may have been taught by someone with knowledge or preferences for a specific language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is also a requirement to produce and document a non-trivial program / system - weighted at 20% of the final course mark. Those students with no programming background make slow progress in all stages of the development and the resulting code is usually rather limited in technical complexity - although there is ongoing debate on teacher's forums as to the necessity for &quot;complexity&quot; in the project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One possible explanation for this (and it's just my opinion) is the inexperienced students haven't had exposure to 1) short term failure of their efforts, i.e. their programs don't work, but 2) the reassurance that eventually, with effort, they can fix their &quot;local&quot; errors and solve the overall problem. So, some prior programming experience develops the right perseverence mindset which I feel is more important than &quot;good&quot; programming style or wide/deep knowledge. Continued engagement will refine the skill.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is entirely possible for a student with no programming background to develop those technical and problem-solving skills over 18 months - but it is rare - and often the student will drop out feeling the course is completely inaccessible. However, if the above sounds entirely negative our highest achieving student last year had no programming background prior to starting the course.&lt;/p&gt;&#xA;" OwnerUserId="8155" LastEditorUserId="8155" LastEditDate="2019-06-19T16:09:24.230" LastActivityDate="2019-06-19T16:09:24.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5772" PostTypeId="2" ParentId="5748" CreationDate="2019-06-18T22:56:49.063" Score="2" Body="&lt;p&gt;Keep going as normal, just adapt the lessons to give what they may not have studied yet.  In other words give a quick and usable pattern and explain only the bits of it that they need to know (give a formula and what it does but not how to derive it, give code and what it does without explaining how it does it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Context: I teach something in between programming and mathematics (intro to machine learning) to undergrads plus a couple of non-computer science grads (e.g. biology), at a London university.  I do it within a similar time-scale as you: 2 hours a week over 1/3 of the year. My course has as pre-requisites python programming (another course) and GCSE.  But since those requisites are not formally tracked a lot of students just enroll due to the fanciness of ML these days.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;No GCSE &lt;em&gt;often&lt;/em&gt; means (in the worst cases) &lt;strong&gt;very poor mathematical understanding&lt;/strong&gt;: e.g. people who managed to get through school without getting right triangle rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Surprisingly most people are pretty good at using formulas whilst not very good at thinking why the formulas work the way they do.  What I do in order to get the majority of students to understand is:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I write down the formulas I need and tell them that they just work.&lt;/li&gt;&#xA;&lt;li&gt;Take one part of the formula and draw a graph, then another part and draw another graph.&lt;/li&gt;&#xA;&lt;li&gt;Walk over the room in the same fashion as both graphs go in order to demonstrate formula behaviour.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I find that someone can understand what parts of a formula do, despite not being able to understand how we get to the formula or how the complete graph looks.  e.g. we have a part of a formula which searches a bigger and bigger part of space, whilst another part of the formula reduces the first behaviour when we get more points found.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students are alright in being fed mathematics as something that &lt;em&gt;&quot;works for these specific problems&quot;&lt;/em&gt;, without the theoretical bit on how it links with the rest of mathematics.  And, to be fair, whether math is something that describes the entire universe or just something we came up with to make specific problems work is an ongoing philosophical discussion.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For the programming bit, i.e. students who come without programming knowledge, I have just shallow experience.  This is probably an opinionated belief so take it with a spoonful of salt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I find that no-one ever managed to teach a student how to program.  One can only do two things: give the students resources in the right order (from simple to more complicated), and give the students interesting problems to solve given their level.&#xA;For example, teaching a few lines of code that fetch an HTML page for data scraping is just boilerplate that will get forgotten; but teaching the scraping as boilerplate but then teaching some interesting analysis that can be done by walking the DOM and hyperlinks often encourages imaginative thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Full example: I always give students a data scraping exercise in which they need to evaluate the percentage of male and female actors/actresses in Die Hard movies, by scraping the Wikipedia pages for the movies.&lt;/p&gt;&#xA;" OwnerUserId="8156" LastEditorUserId="27" LastEditDate="2019-06-19T14:47:02.173" LastActivityDate="2019-06-19T14:47:02.173" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5773" PostTypeId="2" ParentId="5755" CreationDate="2019-06-19T01:27:00.457" Score="5" Body="&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hackers_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hackers&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hackers_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/6/67/Hackersposter.jpg/220px-Hackersposter.jpg&quot; alt=&quot;Hackers&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The film follows a group of high school &lt;a href=&quot;https://en.wikipedia.org/wiki/Security_hacker&quot; rel=&quot;nofollow noreferrer&quot;&gt;hackers&lt;/a&gt; and their involvement in a corporate extortion conspiracy. Made in the 1990s when the &lt;a href=&quot;https://en.wikipedia.org/wiki/Internet&quot; rel=&quot;nofollow noreferrer&quot;&gt;Internet&lt;/a&gt; was unfamiliar to the general public, it reflects the ideals laid out in the &lt;a href=&quot;https://en.wikipedia.org/wiki/Hacker_Manifesto&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacker Manifesto&lt;/a&gt; quoted in the film: &lt;em&gt;&quot;This is our world now... the world of the electron and the switch [...] We exist without skin color, without nationality, without religious bias... and you call us criminals. [...] Yes, I am a criminal. My crime is that of curiosity.&quot;&lt;/em&gt; Despite receiving mixed-to-negative reviews and failing at the box office upon release, Hackers has since achieved &lt;a href=&quot;https://en.wikipedia.org/wiki/Cult_classic&quot; rel=&quot;nofollow noreferrer&quot;&gt;cult classic&lt;/a&gt; status.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bicentennial_Man_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bicentennial Man&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bicentennial_Man_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/f/fc/Bicentennial_man_film_poster.jpg/215px-Bicentennial_man_film_poster.jpg&quot; alt=&quot;Bicentennial Man&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Bicentennial Man&lt;/strong&gt;&lt;/em&gt; is a 1999 American &lt;a href=&quot;https://en.wikipedia.org/wiki/Science_fiction_film&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Science fiction film&quot;&gt;science fiction&lt;/a&gt;  &lt;a href=&quot;https://en.wikipedia.org/wiki/Comedy-drama_film&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Comedy-drama film&quot;&gt;comedy-drama film&lt;/a&gt; starring &lt;a href=&quot;https://en.wikipedia.org/wiki/Robin_Williams&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Robin Williams&quot;&gt;Robin Williams&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Sam_Neill&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Sam Neill&quot;&gt;Sam Neill&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Embeth_Davidtz&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Embeth Davidtz&quot;&gt;Embeth Davidtz&lt;/a&gt; (in a dual role), &lt;a href=&quot;https://en.wikipedia.org/wiki/Wendy_Crewson&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Wendy Crewson&quot;&gt;Wendy Crewson&lt;/a&gt;, and &lt;a href=&quot;https://en.wikipedia.org/wiki/Oliver_Platt&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Oliver Platt&quot;&gt;Oliver Platt&lt;/a&gt;. Based on the novel &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Positronic_Man&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;The Positronic Man&quot;&gt;The Positronic Man&lt;/a&gt;&lt;/em&gt; by &lt;a href=&quot;https://en.wikipedia.org/wiki/Isaac_Asimov&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Isaac Asimov&quot;&gt;Isaac Asimov&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Robert_Silverberg&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Robert Silverberg&quot;&gt;Robert Silverberg&lt;/a&gt; (which is itself based on Asimov's original novella &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Bicentennial_Man&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;The Bicentennial Man&quot;&gt;The Bicentennial Man&lt;/a&gt;&lt;/em&gt;), the plot explores issues of &lt;a href=&quot;https://en.wikipedia.org/wiki/Human_condition&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Human condition&quot;&gt;humanity&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Slavery&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Slavery&quot;&gt;slavery&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Prejudice&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Prejudice&quot;&gt;prejudice&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Maturity_(psychological)&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Maturity (psychological)&quot;&gt;maturity&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Intellectual_freedom&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Intellectual freedom&quot;&gt;intellectual freedom&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Conformity&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Conformity&quot;&gt;conformity&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Sex&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Sex&quot;&gt;sex&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Love&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Love&quot;&gt;love&lt;/a&gt;, and &lt;a href=&quot;https://en.wikipedia.org/wiki/Death&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Death&quot;&gt;mortality&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Indie_Game:_The_Movie&quot; rel=&quot;nofollow noreferrer&quot;&gt;Indie Game: The Movie&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Indie_Game:_The_Movie&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/f/fc/Indie_Game_The_Movie_poster.png/220px-Indie_Game_The_Movie_poster.png&quot; alt=&quot;Indie Game: The Movie&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Indie Game: The Movie&lt;/strong&gt;&lt;/em&gt; is a 2012 &lt;a href=&quot;https://en.wikipedia.org/wiki/Documentary_film&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Documentary film&quot;&gt;documentary film&lt;/a&gt; made by Canadian filmmakers James Swirsky and Lisanne Pajot. The film is about the struggles of independent game developers &lt;a href=&quot;https://en.wikipedia.org/wiki/Edmund_McMillen&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Edmund McMillen&quot;&gt;Edmund McMillen&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Tommy_Refenes&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Tommy Refenes&quot;&gt;Tommy Refenes&lt;/a&gt; during the development of &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Super_Meat_Boy&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Super Meat Boy&quot;&gt;Super Meat Boy&lt;/a&gt;&lt;/em&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Phil_Fish&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Phil Fish&quot;&gt;Phil Fish&lt;/a&gt; during the development of &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fez_(video_game)&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Fez (video game)&quot;&gt;Fez&lt;/a&gt;&lt;/em&gt;, and also &lt;a href=&quot;https://en.wikipedia.org/wiki/Jonathan_Blow&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Jonathan Blow&quot;&gt;Jonathan Blow&lt;/a&gt;, who reflects on the success of &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Braid_(video_game)&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Braid (video game)&quot;&gt;Braid&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Chappie_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chappie&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Chappie_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/7/71/Chappie_poster.jpg/220px-Chappie_poster.jpg&quot; alt=&quot;Chappie&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The film, set and shot in &lt;a href=&quot;https://en.wikipedia.org/wiki/Johannesburg&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Johannesburg&quot;&gt;Johannesburg&lt;/a&gt;, is about an artificially intelligent law enforcement robot captured and taught by gangsters, who nickname it Chappie.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Short_Circuit_(1986_film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Short Circuit&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Short_Circuit_(1986_film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/b/b8/Short_Circuit_%281986_film_poster%29.jpg/220px-Short_Circuit_%281986_film_poster%29.jpg&quot; alt=&quot;Short Circuit&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The film's plot centers upon an experimental military robot that is struck by lightning and gains a more humanlike intelligence, with which it embarks to explore its new state. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/WALL-E&quot; rel=&quot;nofollow noreferrer&quot;&gt;WALL-E&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/WALL-E&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/c/c2/WALL-Eposter.jpg/220px-WALL-Eposter.jpg&quot; alt=&quot;WALL-E&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It follows a solitary  &lt;a href=&quot;https://en.wikipedia.org/wiki/Trash_compactor&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Trash compactor&quot;&gt;trash compactor&lt;/a&gt;  robot on a future,  &lt;a href=&quot;https://en.wikipedia.org/wiki/Planetary_habitability&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Planetary habitability&quot;&gt;uninhabitable&lt;/a&gt;, deserted Earth, left to clean up garbage. However, he is visited by a probe sent by the starship  &lt;em&gt;Axiom&lt;/em&gt;, whom he falls in love with and pursues across the galaxy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Matrix&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Matrix&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/The_Matrix&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/c/c1/The_Matrix_Poster.jpg/220px-The_Matrix_Poster.jpg&quot; alt=&quot;The Matrix&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It depicts a &lt;a href=&quot;https://en.wikipedia.org/wiki/Dystopia&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Dystopia&quot;&gt;dystopian&lt;/a&gt; future in which humanity is unknowingly trapped inside a &lt;a href=&quot;https://en.wikipedia.org/wiki/Simulated_reality&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Simulated reality&quot;&gt;simulated reality&lt;/a&gt;, the Matrix, created by thought-capable machines (&lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_being&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Artificial being&quot;&gt;artificial beings&lt;/a&gt;) to distract humans while using their bodies as an energy source. When computer programmer Thomas Anderson, under the &lt;a href=&quot;https://en.wikipedia.org/wiki/Security_hacker&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Security hacker&quot;&gt;hacker&lt;/a&gt; alias &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Neo_(The_Matrix)&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Neo (The Matrix)&quot;&gt;Neo&lt;/a&gt;&quot;, uncovers this truth, he &quot;is drawn into a rebellion against the machines&quot; along with other people who have been freed from the Matrix.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;h2&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/I,_Robot_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;I, Robot&lt;/a&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/I,_Robot_(film)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/en/thumb/3/3b/Movie_poster_i_robot.jpg/220px-Movie_poster_i_robot.jpg&quot; alt=&quot;I, Robot&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In the year &lt;a href=&quot;https://en.wikipedia.org/wiki/2035&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;2035&quot;&gt;2035&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Humanoid&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Humanoid&quot;&gt;humanoid&lt;/a&gt;  &lt;a href=&quot;https://en.wikipedia.org/wiki/Robot&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Robot&quot;&gt;robots&lt;/a&gt; serve humanity, which is protected by the &lt;a href=&quot;https://en.wikipedia.org/wiki/Three_Laws_of_Robotics&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;Three Laws of Robotics&quot;&gt;Three Laws of Robotics&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2019-06-19T01:36:42.317" LastActivityDate="2019-06-19T01:36:42.317" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5774" PostTypeId="1" CreationDate="2019-06-22T23:09:23.597" Score="4" ViewCount="131" Body="&lt;p&gt;In mathematics, we have lots of undergraduate research journals. In CS, you can publish by either conference proceedings or journal papers. Are there peer-reviewed conferences or journals aimed at research by undergraduate students? I am already aware of MCURCSM (but it didn't happen last year, and might not in 2019 either). Thanks!&lt;/p&gt;&#xA;" OwnerUserId="294" LastEditorUserId="1035" LastEditDate="2022-06-04T10:30:59.197" LastActivityDate="2022-06-04T10:30:59.197" Title="Publication outlets for research by undergraduates?" Tags="|publication|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5775" PostTypeId="2" ParentId="5774" CreationDate="2019-06-23T17:06:39.863" Score="3" Body="&lt;p&gt;I am not aware of any journals for undergraduate research journals in computer science. Note that anyone can submit to the journals and conferences, there can be student only papers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;ACM does have a student research competition at two levels, one for undergraduates and one for graduate students in computer science. Those are held at many conferences. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://src.acm.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACM SRC Web page&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8176" LastActivityDate="2019-06-23T17:06:39.863" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5776" PostTypeId="2" ParentId="5774" CreationDate="2019-06-23T19:12:56.487" Score="2" Body="&lt;p&gt;A number of CS conferences also have Poster Sessions at which work in progress, for example, can be presented. They may not have the same prestige as a full paper, but are useful for beginners at research to get feedback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another possibility, in the absence of specialized conferences for undergraduates is joint work with a professor at any conference. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you don't need any credentials to submit to a CS conference (other than some interesting work). Interesting work by teams of students, with or without a professor as co-author, are another possibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a professor that is familiar with some conference and its standards, there is no reason you can't have one or more of your students submit to it when you think it is ready for prime time. Even the experience of getting rejected can be useful to a beginner if the reviewers give helpful comments. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-06-23T19:18:34.447" LastActivityDate="2019-06-23T19:18:34.447" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5777" PostTypeId="1" AcceptedAnswerId="5780" CreationDate="2019-06-27T08:41:00.597" Score="5" ViewCount="598" Body="&lt;p&gt;With a bunch of colleagues we will start learning Python together. I'm a programmer, but I'm new to python. Most of my colleagues know some VBA, but are generally new to programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What IDE do you suggests? Features I'm looking for: simple interface, some debugging features, autocomplete, inline help, intlisense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thonny IDE looks promising, super simple to install with bundled Python interpreter, it does have autocomplete, but is nowhere near Visual Studio levels of inline help (like intellisense or pupup tooltips etc.).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any recommendations?&lt;/p&gt;&#xA;" OwnerUserId="51" LastEditorUserId="204" LastEditDate="2019-06-27T14:48:11.587" LastActivityDate="2019-11-01T18:55:13.737" Title="Python IDE for beginners" Tags="|best-practice|python|adult-education|ide|" AnswerCount="7" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5778" PostTypeId="2" ParentId="5777" CreationDate="2019-06-27T10:14:21.083" Score="2" Body="&lt;p&gt;My preference might be different from most, but some of the things you seem to be asking for are inconsistent. For me, an &quot;IDE for beginners&quot; is one that doesn't need to be abandoned for a different language. Once you spend the time to learn it, you can adapt it to anything. For me, also, that means a professional level IDE like Eclipse, which I now use for everything. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But Eclipse isn't, technically, just and IDE, but a plug-in platform. You can plug in just about any language, but you can also plug in UI elements that can tailor it to beginners, say, showing fewer elements - or more. But anyone who can handle Visual Studio won't be put off by Eclipse. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It supports just about anything you could want as a programmer, including unit testing. And, like riding a bicycle, once you know it, you know it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note: I'm not affiliated with Eclipse. Just a long-time user. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-06-27T10:14:21.083" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5779" PostTypeId="2" ParentId="5777" CreationDate="2019-06-27T15:48:41.977" Score="1" Body="&lt;p&gt;Why would you use an IDE anyway ? You can go directly with command line, either with Linux or Windows, you'll just need a text editor and a command line terminal and here you go. (I recommend Sublim Text)&lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2019-06-27T15:48:41.977" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5780" PostTypeId="2" ParentId="5777" CreationDate="2019-06-27T16:00:23.067" Score="4" Body="&lt;p&gt;I'm not a fan of full IDEs for beginners. A few years ago I switched my first year students (Java) from NetBeans to an online tool without any autocomplete or helpers for most assignments and found that they've gotten way stronger at writing code. I think the automatic stuff that helps out while programming becomes a crutch for newbies. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our intro teacher, who teaches Python, really likes Idle for his first year students because it's so simple. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also used PyCharm with second and third year students, and really like it. It's what I personally use when I'm writing Python code. The free community edition is plenty for classroom use, but they've also got free licenses for students, teachers and classroom labs if you wanted to use the pro version. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;a lot of their mistakes are because the tool told them to&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So much this. When NetBeans highlights something in yellow, students feel that they have to click on it and follow the programs advice even when they have no clue what it's saying. &lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-06-27T16:00:23.067" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5781" PostTypeId="2" ParentId="5777" CreationDate="2019-06-27T20:09:14.907" Score="4" Body="&lt;p&gt;Visual Studio Code.  Easy to set up and designed to be simple.  I used to use PyCharm and PyScripter with good results.  VSC is more versatile. Eclipse is a management pig for beginners.  You have to learn Eclipse along with learning Python.  Eclipse is great for pros.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastEditorUserId="6566" LastEditDate="2019-07-07T14:19:39.420" LastActivityDate="2019-07-07T14:19:39.420" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5782" PostTypeId="2" ParentId="5757" CreationDate="2019-06-27T20:29:15.817" Score="1" Body="&lt;p&gt;I agree with several of the replies.  You are biting off more than you can chew.  Have fun with one or two languages instead of dabbling in several.  What you are planning for in 2 weeks is more than I would take on for a semester no matter how sharp the kids are.  I have been teaching high school programming and CS for 30 years so I know kids.  For beginner programmers at the high school level I would go with Small Basic and do a bunch of turtle graphics.  Draw castles, houses and tesselations.  Great for teaching fundamentals of programming in a fun way for kids.  Then I would go to Python with Visual Studio Code.  If you have any budget buy some Lego EV3 robot kits and use the VSC extension for the EV3.  The Unity/C# is another thing that is fun.  Coding would not be an emphasis, the C# used in Unity is pretty high level, so the kids would be doing a lot of cut and paste coding but there is nothing wrong with that.  The idea of a summer camp is to have fun, not be buried in tedious.  Nine to five is going to be bad enough.  Forget the C/C++/OOP.  They can do that when they hit college.  &lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-06-27T20:29:15.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5783" PostTypeId="2" ParentId="5724" CreationDate="2019-06-27T20:40:15.283" Score="2" Body="&lt;p&gt;Look at Small Basic or Scratch or Alice.  All are great and have a lot of support out there.  Designed to get and keep kids interested in programming.  A little bit more advanced is Visual Studio Code with Python and the Lego EV3 extension.  Programming robots in Python.  What more could you ask for in the way of getting kids interested in programming?&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-06-27T20:40:15.283" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5784" PostTypeId="1" CreationDate="2019-06-29T02:07:41.557" Score="3" ViewCount="137" Body="&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; How should I be thinking about assessing technical experience for admission into an educational program?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At my day job, I help run a program that invites undergraduate students to get &quot;real world&quot; experience working on a technical project with a team, under the mentorship of a professional software engineer. The program is currently 10 weeks long and involves working remotely on a team of 3 on a Java servlets-based web app.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far, the program has been invite-only, but we're planning to open it up to the public. We're still thinking about ways to do that (might be fodder for a separate question), but in any case we're going to be in a situation where we have more candidates than we can accept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The program is designed to support students with a relatively high experience level. They need to be comfortable coding in Java (including OOP, basic data structures, and tracing through an existing codebase), they need to pick up basic HTML and JavaScript, and they need to quickly grok client-server communications (e.g. get and post requests). Not to mention git, GitHub, Maven, workspace setup, team communication, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We're not expecting any of our students to already be experts in any of the above. But they do need to be pretty comfortable asking questions, debugging, reading through documentation, and tracing through code. This is a virtual program where we don't get a lot of 1:1 coaching time with the students, so they need to be pretty self-motivated.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question is:&lt;/strong&gt; How can I determine which candidates will be a good fit for this program?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We've experimented with students assessing themselves as part of the application (e.g. &lt;em&gt;on a scale of 1-5, how familiar with OOP are you?&lt;/em&gt;), but IMVHO this ends up not being a good indicator of actual experience level. We've thought about sending out some sort of assignment that they submit as part of their application, but to really test for everything we want, the assignment would be just as complicated as the real codebase we give them. Plus, what we're really trying to test for is a willingness to ask questions, time management, and enthusiasm more than pure technical experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;With all of that in mind, the whole point of the program is to welcome students into computer science and encourage them to pursue a software engineering career, so in a perfect world, the assessment would come across as friendly and not too intimidating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry, this ended up being longer than I intended. I know this is a very broad question, but I'm looking for a general framework for how to think through this. I'd also be curious to learn more about how other groups are handling this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I appreciate any insights into how I should be thinking about this problem.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2019-06-30T02:12:32.967" Title="How can we determine which students are a good fit for an educational program?" Tags="|best-practice|undergraduate|assessment|student-perceptions|outreach|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5785" PostTypeId="2" ParentId="5784" CreationDate="2019-06-29T04:50:13.917" Score="3" Body="&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt; Approximate the &quot;real world&quot; practice/environment as the assessment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Pre-setup&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;To begin with, I'm going to presume that there is some form or pre-screening, and/or qualification process. I.e.: having taken &lt;em&gt;such &amp;amp; such&lt;/em&gt; course(s), being actively enrolled in some, possibly specific, institution, passed through an interview, etc. The process below most likely would be quite unwieldy with a couple hundred applicants, but should be reasonable with a few dozen. Especially if administered in batches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, as the program &lt;em&gt;involves working remotely&lt;/em&gt;, I would expect that there is some form of real-time communication channel that will be utilized in the day-to-day working setup. I do not mean the telephone either. I could be as simple as using some form of I/M (AOL, Yahoo!, Messenger, etc.) or it could be an in-house developed and employed enterprise solution. Issues and comments on GitHub are good, but not sufficient when dealing with a mentor-ship program. Ideally, the solution (using different tools if necessary) needs to include a &quot;private&quot; channel between the mentor and mentee, and a &quot;team&quot; channel. A third channel for all the mentors and mentees to network, outside of the project development would also be beneficial.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Old tools, which I would recommend migrating from if in use, are Skype and TeamSpeak, though either would be better than nothing (provided you want to pay for TeamSpeak anyway). Two current tools I would suggest investigating are &lt;a href=&quot;https://keybase.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;Keybase&lt;/a&gt; and &lt;a href=&quot;https://discordapp.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Discord&lt;/a&gt;. Both are available for install on Windows, macOS, Linux, iPhone, and Android, as well as being usable form within a web browser. Both are also free, though Discord does have enhanced content available for a membership fee. Discord has voice channel capabilities, while Keybase does not. Keybase offers end-to-end encryption and has the ability to share, under encryption, files as well as having the ability to integrate with &lt;code&gt;git&lt;/code&gt; and create an encrypted repository outside of GitHub. As a user of both, Keybase would be my choice for a professional development environment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Assessment setup&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I would suggest having the assessment as a collection of small projects. Adapted to the project and environment they will be working on, of course. Each assessment can target one or two skills rather than having a full-scale project to assess everything at once.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Projects could include:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a routine to perform &lt;em&gt;this task&lt;/em&gt; given parameters of &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;Y&lt;/code&gt;, and &lt;code&gt;Z&lt;/code&gt; and returning &lt;code&gt;t&lt;/code&gt; and &lt;code&gt;v&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Given this pre-existing routine, extend it to handle &lt;em&gt;this&lt;/em&gt;.&lt;/li&gt;&#xA;&lt;li&gt;This method, given &lt;code&gt;(one, two, 15, false)&lt;/code&gt; should return &lt;code&gt;expected_result&lt;/code&gt;, instead it returns &lt;code&gt;bad_answer&lt;/code&gt;. Why? Fix-it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In some of the assessments you can intentionally include ambiguous information, incomplete data, or other conditions which can only be handled by asking you (hence the need for real-time communication). Provided you've made it clear that questions are not only allowed, but encouraged and expected, they should be able to contact you with the questions. This also allows for checking how they deal with time management, if at some point you are &quot;unavailable&quot; and they don't get an answer. Do they plow ahead, developing based on a guess? Do they stop, waiting for an answer? Or, do they &quot;table&quot; that problem and work on another one?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the work environment will include TDD or Agile, then the assessment should have the elements of that in some of the problems. As the work involves working as part of a team of 3, it would also be ideal if you could have the first few assessments deal with their own work, then have an assessment, or more, where three of the candidates, who may not even know each other, work on one project together. You could also have two candidates, and the third is a &quot;ringer&quot; who already works for the company.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As remote workers you will have no control over what resources they employ, including looking up how to write Java on Google. My opinion is that knowing how to find the answer is more important than knowing the answer. With those two points in mind, you could explain that &quot;Google is your friend&quot; or include links to the resources, including style guides, which most closely match your current standards, and encourage them to use those links in developing the &quot;answers&quot; to their assignments. This allows you to include ever harder issues, or more advanced concepts, and not only assess their knowledge, but their ability to expand that knowledge.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;GitHub&lt;/h2&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;You can also incorporate git and GitHub into the assessments, as early as the first one if you wish, by having them create their own GitHub account, provide an archive of the starting code if needed, and have each assessment be its own repository in their account. You can then use the issues and comments there to give feedback, even forking their repository, creating a new branch and making a pull request in their repository. One thing I would suggest &lt;strong&gt;not doing&lt;/strong&gt; on GitHub is having a repository, or collection of repositories, from which the assessments, and code, are distributed. You could create a collection of separate accounts for yourself which are used with exactly one candidate at a time, and &quot;reset&quot; between as needed. With one account and all the repositories used in it, all the candidates would be able to see all the assessments, including ones they have not been assigned yet, and all the work of other, or prior, candidates.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-06-29T04:50:13.917" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5786" PostTypeId="2" ParentId="5784" CreationDate="2019-06-30T02:12:32.967" Score="2" Body="&lt;p&gt;Seems to me like you should have everyone submit a project within some theme you select every year (to prevent copying of previous projects). (This wouldn't be a general assignment, but more a sort of &quot;show me something cool&quot;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Provide some boundaries - e.g., must be written in Java, must be submitted as a github repo, etc, that test some of what you need (you note in your question that you can't do everything - that's fine) - and then review the projects. I understand that for 1k submissions, this is probably pretty hard, but: this sort of thing will automatically weed it down to those who put in the time to make a project, and a bunch of these projects will probably be semi-easy to throw out - this project blew up when I tried to clone it? This project isn't even written in Java? This project has no OOP? This project is precisely two lines of code and one of them is a comment? And so forth. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also tests exactly what you're looking for: the big thing in your question seems to me to be that the applicant is &lt;em&gt;self-motivated and willing to learn&lt;/em&gt;. What better way to check that than an open-form project? In terms of the willingness to ask questions, that's the great thing about something like this, versus a test: google is open to the programmer. That probably sounds stupid, but if you're looking for a person who needs to be able to learn quickly and figure out problems for themselves, you very much &lt;em&gt;don't&lt;/em&gt; want to test pre-existing knowledge like a test would, you want to give them something open form that you submit where google, SO, and other resources are accessible - it's a much better simulation of what they'd actually be doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The only real downside here is that this may come across as too intimidating. I think the key there is good phrasing in whatever the applicants see (the rules, or website, or what-have-you) - make it clear that you're not looking for the next Donald Knuth, but instead for someone willing to screw around, google, work, and put something kind of cool together. This may still be too much. However, I personally feel like it'd be a better approach than a more generic screening process.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-06-30T02:12:32.967" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5787" PostTypeId="1" AcceptedAnswerId="5788" CreationDate="2019-05-16T07:56:28.380" Score="24" ViewCount="823" Body="&lt;p&gt;I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My experience has been mixed. It seems like the problem is that now the students think that the various algorithms &lt;strong&gt;are&lt;/strong&gt; the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?&lt;/p&gt;&#xA;" OwnerUserId="8394" OwnerDisplayName="Zur Luria" LastActivityDate="2019-08-08T21:42:29.800" Title="Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?" Tags="|algorithms|" AnswerCount="12" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5788" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T08:27:30.527" Score="38" Body="&lt;p&gt;Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think perhaps a better analogy:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pseudocode: you need to put an egg into the flour mixture&lt;/li&gt;&#xA;&lt;li&gt;Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Presenting only the pseudocode &lt;em&gt;might&lt;/em&gt; make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.&lt;/p&gt;&#xA;" OwnerUserId="8197" OwnerDisplayName="Art" LastActivityDate="2019-05-16T08:27:30.527" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5789" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T08:24:27.413" Score="7" Body="&lt;p&gt;I understand your dilemma, but from a general pov it's better to present content through pseudocode. This actually gives students the freedom to explore multiple languages. When you present your code in a particular language you are making them comfortable with that language alone and they might find it hard to shift to other languages later on. The main purpose of learning algorithms is to know how they work rather than implementing them in a particular language. Regarding resources, I would suggest looking up books like &lt;a href=&quot;http://web.karabuk.edu.tr/hakankutucu/CME222/MIT[1].Press.Introduction.to.Algorithms.2nd.Edition.eBook-TLFeBOOK.pdf&quot; rel=&quot;noreferrer&quot;&gt;Introduction to Algorithms&lt;/a&gt;. You can also refer to &lt;a href=&quot;https://www.hackerearth.com/practice/codemonk/&quot; rel=&quot;noreferrer&quot;&gt;CodeMonk&lt;/a&gt; which is an online portal which has a collection of all known problems and algorithms to look into.&lt;/p&gt;&#xA;" OwnerDisplayName="Vikas Shetty" LastActivityDate="2019-05-16T08:24:27.413" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5790" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T08:18:58.473" Score="3" Body="&lt;p&gt;I think the best is to do a comparison. The algorithm may be a cooking recipe that may be written in many languages but produce always the same cake.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo-code is like describing the recipe with pictures. There is not a unique grammar or way to &quot;talk&quot; in pseudo-code but anyone should be able to interpret it. By reading the pseudo-code written by someone, one may often guess what is his favorite language. The main rule is to forbid the language specific keywords.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching an algorithm in a specific language is not a problem in my opinion as long as anyone understand it. But if you want someone to master this algorithm, you have to make him try it by hand. Make him do the different steps of the algorithm on a small example. In fact it is again like cooking the cake... You can remember a recipe much easier if you actually have cooked it.&lt;/p&gt;&#xA;" OwnerDisplayName="Vince" LastActivityDate="2019-05-16T08:18:58.473" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5791" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T18:31:09.410" Score="4" Body="&lt;p&gt;Neither alone is enough for a good dish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd go with pseudo code in the lecture, and use homework to give students practice in turning pseudo code into real code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using pseudo code in the lecture has the pragmatic reason that pseudo code is, by nature, somehow vague. You want to use it as a tool to be able to concisely state ideas that still contain all important details, but abstract as many of the unimportant ones away.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because of this, it takes  some time to gauge, as a student, how pseudo your pseudo code actually is allowed to be: &lt;br&gt;&#xA;As an example, at the start of the course, pseudo code shouldn't involve a (merge-)sort, but once you're done with that chapter, there's no harm in adding the line &quot;sort the array A&quot; without further explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I'd say that the easiest way for a student to learn what is, and what is not, allowed in pseudo code, is by getting a feel for it, simply by osmosis over time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if some students have problems understanding your pseudo code, then they still have enough resources (books, or even interactive coding sessions of the algorithm) showing them how the algorithms would look like in an actual programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, to understand the design and working  of an algorithm, it helps immensely to have coded it yourself, at least partially, once. &lt;br&gt;&#xA;Therefore, by letting your students program the algorithm (or letting them finish a partially programmed algorithm) and then tasking them to &quot;play with it&quot;, they'll get a good look on the other side of the medal as well.&lt;/p&gt;&#xA;" OwnerUserId="5017" OwnerDisplayName="Sudix" LastActivityDate="2019-05-16T18:31:09.410" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5792" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T15:28:41.797" Score="6" Body="&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Pseudocode helps a lot by removing anything unnecessary, and focusing entirely on the algorithm, which can already be hard to understand as is. It's also faster to express ideas : if a student wants to write a different algorithm than the one you taught them, it can be really cumbersome if they have to deal with every details of Java.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As others said, it's good for students to come up with their own implementation in code of the pseudo-code algorithm. They need to really understand it, while if they just paste code or learn it by heart they won't necessarily understand every subtlety.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I think most universities do this already (mine did), but I think the best is pseudocode for the course, and real code for practical exercises.&lt;/p&gt;&#xA;" OwnerUserId="8193" OwnerDisplayName="Teleporting Goat" LastActivityDate="2019-05-17T07:57:10.067" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5793" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T15:12:48.870" Score="6" Body="&lt;p&gt;One of the key points here is that you are teaching to future &lt;strong&gt;&lt;em&gt;engineers&lt;/em&gt;&lt;/strong&gt;, even if at academic level. The very nature of engineering is solving problems by &lt;em&gt;implementing&lt;/em&gt; a solution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore I think that presenting the pseudocode is useful to give your student the correct theoretical POV to frame the problem, BUT showing them an actual, working implementation is key to make them develop their engineering skills. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Much better would be to show them the pseudocode and make them &lt;em&gt;try&lt;/em&gt; to come up with an implementation first, then show them yours. But this requires honing their skills first, probably. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As their skills improve, you may also dare show them &lt;em&gt;more than one&lt;/em&gt; implementation, possibly in two or more languages. Of course this depends on their actual knowledge of the languages you are going to use. If they know only, say, Java, showing them an additional implementation in another language could backfire and confuse them more.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, I'm assuming that it's not your duty to teach them another computer language, otherwise, it could be a useful approach: start with pseudocode, show a reference implementation in a known language (e.g. Java) and finally show them how to reimplement the algorithm in the new language they must learn.&lt;/p&gt;&#xA;" OwnerUserId="941" OwnerDisplayName="Lorenzo Donati" LastActivityDate="2019-05-16T15:18:47.557" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5794" PostTypeId="2" ParentId="5787" CreationDate="2019-05-16T12:41:48.140" Score="26" Body="&lt;p&gt;Actually I am of the opinion that you should &lt;strong&gt;not&lt;/strong&gt; present your own code, but rather get the students to implement the algorithms you teach them, which you give in pseudocode, and give them the freedom to choose any one of a fixed set of languages that you are familiar with, such as C++/Java/Python. Really, the only way students can truly understand an algorithm is when they face the real task of implementing it, but the key ideas behind an algorithm can be sufficiently conveyed via pseudocode.&lt;/p&gt;&#xA;" OwnerUserId="8195" OwnerDisplayName="user21820" LastActivityDate="2019-05-16T12:41:48.140" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5795" PostTypeId="2" ParentId="5787" CreationDate="2019-05-17T11:49:37.940" Score="5" Body="&lt;p&gt;Writing from a students point of view:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a course regarding algorithms and data structures two years ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first  exercise consisted of implementing a program with a certain behavior (Search in a sorted array, etc.).&#xA;In the next lecture we would discuss an algorithm &lt;strong&gt;in pseudocode&lt;/strong&gt; which fulfills the requirement of the previous exercise, only in a more efficient manner. The next exercise consisted of another goal to achieve (sort an array, ...) and a implementation of the pseudocode we discussed earlier in the lecture. We could freely choose the language for implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These assignments made every student give their best since we compared the runtimes of our algorithms among ourselves.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The course was well received among all of the ~30 students. For myself I think I learnt a lot since you can also focus on optimization instead of only making something work.&lt;/p&gt;&#xA;" OwnerDisplayName="bautista" LastActivityDate="2019-05-17T11:49:37.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5796" PostTypeId="2" ParentId="5787" CreationDate="2019-05-17T12:49:23.853" Score="6" Body="&lt;p&gt;When I took algorithms, my first professor used a pseudo-code of his choosing.  It may have been clear in his mind, but in was pretty opaque in they eyes of his students.  It was a much dreaded class, and hard to get useful knowledge from.  Then he had a heart attack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;New professor (let's call him &quot;Finkle&quot;), discarded the previous class notes and textbook.  Finkle wrote new notes (replacing the book) and explained algorithms using Pascal (it was the 1980's).  Pascal was much more clear than the pseudo-code AND IF YOU DID NOT UNDERSTAND HOW SOMETHING WORKED, YOU COULD RUN THE CODE AND LEARN. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That class ended up being the most valuable class in my whole undergraduate education.&lt;/p&gt;&#xA;" OwnerDisplayName="paul carpenter" LastActivityDate="2019-05-17T12:49:23.853" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5797" PostTypeId="1" AcceptedAnswerId="5799" CreationDate="2019-07-04T12:55:18.973" Score="11" ViewCount="2576" Body="&lt;p&gt;I'm from Brazil and I'm involved with programming language teaching for, at least, ten years. I have a background in computer science and my colleagues tend to use the term &lt;code&gt;vector&lt;/code&gt; to describe an array in programming languages like C or Java. I particularly HATE this use of the therm vector, since vectors and matrices are mathematical entities that can be added, multiplied and so on, while arrays and multidimensional arrays can't. I know that there are languages that these constructs exists, like MATLAB, but they don't exists natively in the most used general purpose programming languages. In Java there is an data structure called &lt;code&gt;Vector&lt;/code&gt;, that is, in fact, a synchronized list that can't be added, for exaxmple. C++ also has a &lt;code&gt;vector&lt;/code&gt; data structure/container in STL that is a list too and is not a mathematical vector.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I always explain this for my students, that some people call arrays as vectors and multidimensional arrays as matrices and that this is kinda wrong. I tell them that an array can be used to represent a vector, but that it is not a vector! The same for matrices.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to know what do you think about it! Do you think that is correct or not to call arrays as vectors? If so, why? Is this &quot;missconception&quot; common in your country?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm sorry if I sounded pedantic. My confusion was introduced by one of my professors during my undergraduate course. He was a mathematician/physicist working with computer science. Maybe this was the reason. I will correct it now, thank you!&lt;/p&gt;&#xA;" OwnerUserId="8199" LastEditorUserId="8199" LastEditDate="2019-07-05T01:00:53.760" LastActivityDate="2019-07-05T01:00:53.760" Title="Array or vector? Two dimensional array or matrix?" Tags="|arrays|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5798" PostTypeId="2" ParentId="5797" CreationDate="2019-07-04T14:40:06.480" Score="7" Body="&lt;p&gt;I believe that the CS notion of a vector is not related to the concept of a vector as a fixed size set of components, and rather comes from the idea of a rank 1 tensor (which is also called a vector). A rank 1 tensor is simply a list of elements that is indexed linearly, so you only need one coordinate to retrieve an element (as opposed to a matrix, which is a rank 2 tensor, which requires two coordinates to locate an element).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;http://mathworld.wolfram.com/TensorRank.html&quot; rel=&quot;noreferrer&quot;&gt;Here is a link to Wolfram MathWorld about tensor rank&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I think that I'd take some issue with your definition of matricies and vectors as &quot;mathematical entities that can be added, multiplied and so on.&quot; Matricies and vectors in mathematics each are defined based on their structures, and from those structures we can define convenient operations/properties such as multiplication, addition, etc. Thus matricies and vectors in CS are both still fundamentally the same as mathematical matricies and vectors because they share the same structure. However (for non-numerical types) they will not have the same properties as we have with numbers in mathematics.&lt;/p&gt;&#xA;" OwnerUserId="58" LastEditorUserId="58" LastEditDate="2019-07-04T14:46:31.940" LastActivityDate="2019-07-04T14:46:31.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5799" PostTypeId="2" ParentId="5797" CreationDate="2019-07-04T15:40:11.787" Score="8" Body="&lt;p&gt;First, see &lt;a href=&quot;https://cseducators.stackexchange.com/q/4717/1293&quot;&gt;this question on being pedantic&lt;/a&gt;. Second, consider the fact that you are teaching Computer Science and not Mathematics. The former is not a subset of the latter. There is some overlap, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, I see no issue with being precise about terminology when students might be studying both fields. If you want to clearly distinguish between vector and array, I think that is fine, though you may possibly just be stressing the wrong thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Vectors in mathematics are used to &lt;em&gt;understand&lt;/em&gt; things. (That is the core of pure math, after all). Arrays, call them what you will, in CS are used to &lt;em&gt;build&lt;/em&gt; things that are useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But lots of things vary between math and CS. Addition of integers means one thing in math. The fact that it normally means modulo addition (with a fairly large modulus) is seldom stressed initially and is irrelevant for many (not all) purposes. Likewise real values mean quite different things in math and in CS. If you spend too much time on the details of the differences you may not have time for what are, fundamentally, more important issues in novices learning CS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, the reason that Matrix isn't a fundamental type in a language like Java is that it isn't needed often enough in the work of professionals to make it part of the infrastructure. You can, of course, build a Matrix class and provide the mathematical operations that might be wanted for some applications, just as Mathematica has done. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, mathematics is like CS language structure in a lot of ways. In math the Peano axioms are, for example, enough to define the structure of the natural numbers. Other things can be defined and built on top of that structure. Likewise in Java, a Vector of Objects is a (somewhat) simple bit of infrastructure that can be used as the basis of more complicated and useful things. So, in both, one has a simple basis that can be extended for the purpose at hand. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note also, that few &lt;em&gt;general purpose&lt;/em&gt; programming languages have anything like a matrix as a primitive. Normally a two dimensional structure is more like an array of arrays (vector of vectors) and so in the second dimension the index limits can vary. But OO languages can, of course, control that and have &quot;true&quot; matrices, though a &quot;row&quot; and a &quot;column&quot; in such a structure are quite different in the implementation. But, again, in mathematics the row and the column are &lt;em&gt;ideas&lt;/em&gt;, and in CS they are implementations (built things). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well... I suppose that any Turing Complete language is &quot;general purpose&quot; in some sense. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-07-04T16:00:28.053" LastActivityDate="2019-07-04T16:00:28.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5800" PostTypeId="2" ParentId="5797" CreationDate="2019-07-04T17:01:56.753" Score="7" Body="&lt;p&gt;You are correct and incorrect at the same time. Nomenclature is important when teaching, and when programming. Being pedantic about nomenclature is a slipper slope and a morass. As noted by @Buffy in another answer, that's been addressed here as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of &lt;code&gt;vector&lt;/code&gt; and &lt;code&gt;matrix&lt;/code&gt; they have specific meaning, usage, and properties in mathematics. They also have many other meanings, in different fields. (See &lt;a href=&quot;https://en.wiktionary.org/wiki/matrix#English&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;matrix&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://en.wiktionary.org/wiki/vector#English&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;vector&lt;/code&gt;&lt;/a&gt; in Wiktionary.) There is a similar problem with many words used in CS; 'table' (a flat surface for food or work) and 'case' (an enclosure for holding or carrying things) are two examples I can think of. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When teaching something it is important to ensure that the students understand the terms you are using. If they have prior knowledge of some terms from another field, it can help to compare and contrast the usage in CS and the other field. It is also important for the students to understand that what a term means in this field may not be the same, or even close, as the same term in a different field. Unfortunately, mathematics and computer science are very close, often intertwined, and the terms are often very close, and that can make correct usage of nomenclature much harder.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suppose it becomes even more difficult when the language used in the field is also a foreign language to the students. The key is to correctly use the terms from the field you are working with, even if Java has the data structure &lt;code&gt;Vector&lt;/code&gt; which doesn't behave the same as a &quot;vector&quot; in mathematics. The mathematics &quot;vector&quot; also has no correlation to the &quot;vector&quot; which is the carrier of a disease-causing agent. Neither is more &lt;em&gt;correct&lt;/em&gt;, nor less so. When used correctly in their field they are understood. When used outside their field, they can be easily confused. Focus on what it means, here and now, in your course, not what it might mean somewhere else. After all, the CS field cannot just create new words for everything merely because all the words are already taken.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-07-04T17:01:56.753" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5801" PostTypeId="2" ParentId="5797" CreationDate="2019-07-04T17:55:45.653" Score="6" Body="&lt;p&gt;When introducing terms that have different meanings in different fields, first, accept that both uses are correct.  As others have alluded, this is a case of two different fields using the same term in two different ways based on a similarity to a root idea.  Disparaging the use of the language to your students might make them feel worse about the usage, or might make them feel worse about you, but it won't change the accepted term of art in the field, so there is no benefit to your complaint.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, don't skip past it. Mention both uses to your class, and remind them that they will need to keep context in mind when they encounter the term in the future, as it has two different accepted meanings.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hopefully your students, as a result of your instruction, have less confusion than you did.  If so, congratulations on a job well done!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-07-04T17:55:45.653" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5803" PostTypeId="2" ParentId="5777" CreationDate="2019-07-07T17:46:54.273" Score="1" Body="&lt;p&gt;If you’re interested in developing algorithms, I’ve found &lt;a href=&quot;https://jupyter.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jupyter Notebook&lt;/a&gt; to be a great way to develop Python (or R).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It lets you develop in a “web page” and everything displays in a browser.&lt;/p&gt;&#xA;" OwnerUserId="1660" LastActivityDate="2019-07-07T17:46:54.273" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5804" PostTypeId="1" CreationDate="2019-07-09T02:07:00.387" Score="7" ViewCount="283" Body="&lt;p&gt;I'm teaching introductory programming for high school. Back in the day, when I was starting out, DOS and Unix terminal prompt was normal UI, and console apps would spark kids interest.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, on the other hand, kids grow up on the web, and a console program would look quite &lt;em&gt;uninspiring&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, I'm not sure if JS (which is &lt;em&gt;the&lt;/em&gt; web language) is a good introductory language. It's got a lot of gotchas which can confuse beginners, and I was thinking that a language like Python or Go would be a better introductory language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, they don't have much of a front-end, and I don't want to teach two languages at the same time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do people suggest?&lt;/p&gt;&#xA;" OwnerUserId="8211" LastEditorUserId="8651" LastEditDate="2020-04-28T03:57:26.693" LastActivityDate="2020-04-28T03:57:26.693" Title="What is a good introductory language for high school?" Tags="|secondary-education|language-choice|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5806" PostTypeId="2" ParentId="5804" CreationDate="2019-07-09T10:46:51.720" Score="1" Body="&lt;p&gt;If Advanced Placement CS is in their future, then Java is probably the best language choice as it is still used in APCS. There are also a lot of resources for Java development that also permit graphics based insight. The course probably wouldn't be about developing for the web, though. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But because of the APCS link there are a lot of resources intended for novice programmer development. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One resource (Java) that is very useful for such students, and has a lot of project ideas built in to it is &lt;a href=&quot;https://www.greenfoot.org/door&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt;, which uses a rectangular grid to place visual representations of objects and lets them move an interact according to the student program. There is also a dedicated teacher resource for it: &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt;. It has additional greenfoot projects and a forum for discussion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Otherwise, Python is a pretty good choice for beginners. It has less syntactic load. But the set of resources for novices is a bit more scattered. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But any programming that uses some visual metaphor is better for student understanding than just numeric programming. It needn't be web based, but should be graphical. Games are pretty good for this provided that they aren't just textual. Any simple board game can provide a nice way to visualize what a corresponding program needs to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, one way to avoid the two language issue in web development is to have the students build only the back end or only the front end with you providing the other. It also defines a set goal that students can program toward. The part you build can be in a different language than that used by the students, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-07-09T10:46:51.720" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5807" PostTypeId="2" ParentId="5804" CreationDate="2019-07-09T13:02:48.720" Score="1" Body="&lt;p&gt;I agree with Buffy that a great way to think about it isn't &quot;language&quot;, but &quot;language + library&quot; or &quot;language + provided code&quot;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;David Malan does a masterful job if this in his CS50 course, and anyone can see these labs. Those labe are  impractically large-scale for someone without his &lt;em&gt;staffing&lt;/em&gt;, but they give a sense of what is quite exciting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Buffy's recommendation of Greenfoot is absolutely excellent. I have colleagues who use it this year, and they described it as one of the best pedagogical tools they've ever encountered.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also recommend looking into game engines. Unity allows you to create exciting projects from Day 1, and gives you an entry point into C#.  Godot is great if you'd like a more Python-like language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, remember that these are merely starting points. Once the kids are up and running in the basics of the language (and enjoying themselves), you can take them out of the starting environment in almost any different direction. If you find it interesting, and present it with enthusiasm, they will usually be with you.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-07-09T13:02:48.720" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5808" PostTypeId="2" ParentId="5804" CreationDate="2019-07-09T14:04:05.043" Score="1" Body="&lt;p&gt;There is no better first line-code language than Small Basic.  Lots of nice simple projects for beginners.  Python and especially Java can be very intimidating to beginners and will scare away many kids.  Small Basic is a step up from Scratch.  There are a lot of beginner routes out there to get kids started.  Another excellent language is Alice.  I have my programming students build a scene from Shakespeare using Alice.  If you have access to Lego EV3 robots Small Basic has an extension for them.  There is also an EV3 extension for Visual Studio Code/Python if you want to step up to a more difficult language.  Be careful what you start kids off with.  Throw Python or Java at them you retain maybe 10% of the kids for the next class.  I introduce Python in the 3rd semester.  By then the kids are not intimidated by programming and problem solving techniques.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-07-09T14:04:05.043" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5811" PostTypeId="2" ParentId="5804" CreationDate="2019-07-12T17:26:58.907" Score="0" Body="&lt;p&gt;You might want to consider Visual Basic or Delphi where it is simple to create graphical user interfaces.&lt;/p&gt;&#xA;" OwnerUserId="8219" LastActivityDate="2019-07-12T17:26:58.907" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5812" PostTypeId="2" ParentId="5690" CreationDate="2019-07-14T11:09:43.660" Score="1" Body="&lt;p&gt;The two killer applications that immediate come to mind are event handlers and discrete event simulation.  The use of queues in event handling is a little more complicated, as the process also involves interrupts (hardware and/or software) and events can be deleted from the queue before they are ever handled (for example, GUI events that become redundant when the second one happens before the first is handled), but the core mechanism is a queue.  For example,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/363397/how-does-an-event-listener-work&quot;&gt;StackExchange:  How does an event listener work?&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discrete event simulation shows up in many places throughout the natural sciences, of course.  I'm procrastinating from writing right now and need to get back to it, so here's &lt;a href=&quot;https://en.wikipedia.org/wiki/Discrete-event_simulation&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Wikipedia entry&lt;/a&gt; and a &lt;a href=&quot;http://users.cs.northwestern.edu/~agupta/_projects/networking/QueueSimulation/mm1.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;very nice tutorial lesson&lt;/a&gt;.  &lt;/p&gt;&#xA;" OwnerUserId="4799" LastActivityDate="2019-07-14T11:09:43.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5813" PostTypeId="1" CreationDate="2019-07-16T00:57:52.900" Score="5" ViewCount="174" Body="&lt;p&gt;I'm serving as a tech lead for a student group's charity project. We're building a website which puts a bunch of homelessness resources in one place. There are two goals to the project: create a useful website, and let students learn as they build it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The group is comprised of all levels of college CS student. Most have never done web dev or worked with any of the associated technologies. People get uneasy when I mention using a JS framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to make sure they get out of it what they came in for -- which by all reports is learning -- but I'd prefer that they enjoy it and don't quit (which would be totally fair, cause they are volunteering their time). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The group has been asking why we should use a framework. I say &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;testing&lt;/li&gt;&#xA;&lt;li&gt;reusability&lt;/li&gt;&#xA;&lt;li&gt;dealing with state&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;They feel that learning multiple things at once could be bad, and that this would be overkill. Honestly, I'm not sure if it would be overkill. It could be. But learning vanilla JS is certainly less valuable than learning React.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Am I being dense? More importantly, would the project better reach it's goals by using a framework, or not?&lt;/p&gt;&#xA;" OwnerDisplayName="Qfwfq" LastActivityDate="2021-02-04T12:11:10.827" Title="Framework vs Vanilla JS for students" Tags="|web-development|" AnswerCount="5" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5814" PostTypeId="2" ParentId="5813" CreationDate="2019-07-16T01:26:20.970" Score="2" Body="&lt;p&gt;I believe that &lt;em&gt;after&lt;/em&gt; getting to know html and css, starting with Vanilla JS or with a framework are both the same thing to a new student that knows nothing, he'll be learning new things from the beginning so if you think learning a framework is more valuable than starting with Vanilla JS then go ahead start with a framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When it comes for professional working, most of the jobs require working with frameworks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now some people will ask &quot;but how do you want to teach them a framework without giving them the basics of JavaScript?&quot;. That's a wrong question. Again, to a new student they both aren't related. Vanilla JS is &lt;em&gt;not&lt;/em&gt; considered the basics of a framework, the basics is JS yes but why not learn JS &lt;em&gt;through&lt;/em&gt; the framework. PS that's how i learned about the new ES features, started with react native directly.&lt;/p&gt;&#xA;" OwnerUserId="8227" OwnerDisplayName="mAhMoUdDaFeR" LastActivityDate="2019-07-16T01:26:20.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5816" PostTypeId="1" AcceptedAnswerId="5817" CreationDate="2019-07-16T15:48:05.853" Score="3" ViewCount="177" Body="&lt;p&gt;Should one first understand its logic and see its implementation? Or should one try to implement it first oneself?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How should one learn so that one can quickly implement the algorithm or data structure quickly if needed? By practising implementing it repeatedly?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All in all, please throw light on the ways you find it efficient to learn algorithms.&lt;/p&gt;&#xA;" OwnerUserId="8233" LastEditorUserId="204" LastEditDate="2019-07-17T09:20:31.310" LastActivityDate="2019-08-08T21:12:24.157" Title="How should one go into learning algorithms and data structures? What do you think is an efficient way to do so?" Tags="|self-learning|algorithms|data-structure|active-learning|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5817" PostTypeId="2" ParentId="5816" CreationDate="2019-07-16T16:01:01.863" Score="3" Body="&lt;p&gt;First, if you aren't taking a course, get a good book that has a lot of exercises. Use the exercises to guide your learning. Try to find a way to get some feedback on your attempts. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The way you learn just about anything &lt;em&gt;deeply&lt;/em&gt; is to get a lot of reinforcement and feedback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, it is seldom necessary with today's languages and libraries to implement standard data structures. It &lt;em&gt;is&lt;/em&gt; however, necessary to understand the fundamental of each and their relationship to various sorts of efficiencies when applied to various sorts of problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to get a deep understanding is to learn the technique of developing algorithms (not just data structures) from pre and post conditions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My go-to book for doing that is by &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;David Gries&lt;/a&gt;. It isn't cheap, but it can change the way you think about programs. I've mentioned it elsewhere here. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't have other ways to get feedback, you might be able to form a group of like minded people who exchange work and comment on each other's attempts. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-07-16T16:01:01.863" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5818" PostTypeId="2" ParentId="5813" CreationDate="2019-07-16T18:56:39.470" Score="2" Body="&lt;p&gt;As a general rule, everything has its benefits. The trick is finding the tool which has as many of the benefits you need, or want, with as few of the problems you want to avoid. The choice of which JavaScript framework, including none, is no different. Often the choice is made by the management, or dictated by the established code-base. That could very well be the reason supplied to the group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that it would be better to explain to the group why you've chosen to use a framework, and why you've selected React (as it seems you have). The reasoning should be project-based, not based on the utility to the group later in the job market. Learning vanilla JS is not, as you suggest, less valuable than learning React, or some other framework. Neither in general, nor in the job market. There are needs for programmers who can do vanilla JS and those who are fluent in React.js - and Vue.js, Meteor.js, Backbone.js, and Angular.js 2, among others. Which ever framework you select might not be any more valuable, eventually, to the students' future than vanilla would be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The reasons to use a framework, when you do, can include the points you've already mentioned. If those are points which are important to the project. The issue of learning multiple things at once is not really an issue. First off, they are already learning several things - HTML, CSS, design, UX, and probably some of the aspects of the server setup and maintenance. Whether they are learning vanilla JS, and how to keep everything working and bug free, or leaning a JS framework becomes insignificant.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The final question &lt;em&gt;would the project better reach it's goals by using a framework, or not?&lt;/em&gt; isn't something that can answered anonymously. It is something which has to be evaluated in context for the project itself. In this case it seems the &quot;project&quot; has two objectives: the finished product and the learning of the group.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Using a JS framework vs vanilla JS is similar to planning a road trip to Miami. There are many routes that will get there. It isn't even necessary to use a map. You can keep picking your road by knowing that you want to go east and south. Eventually you will get there. There may be some excellent scenery along the way. There may also be a few detours, road blocks, and dead-ends. How you choose to plan, and which roads you use, depends on the purpose of the trip. If the point is to see the country between here and there, taking country roads and scenic byways with little pre-planning could be the best option. Anything goes, and you can pick any road, stop anywhere, and do anything you want. If, on the other hand, the point is to get to Miami for Spring Break, a better choice might be to use a map, travel on Interstate highways, with targeted stop-over points each night. Using the first, free-form, method could make you late for the party. Maybe even not get there before it was time to head back for classes after the break. The Interstate system is the &quot;framework&quot; which has been built to make travel easier. It's not always the best choice, it's only one of the choices, and serves well for one of the possible purpose of a road trip.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Knowing that there are options, and how to select between them, could be more important than the choice you make for the current project.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-07-16T18:56:39.470" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5819" PostTypeId="2" ParentId="5813" CreationDate="2019-07-17T09:11:55.420" Score="0" Body="&lt;h1&gt;Yes&lt;/h1&gt;&#xA;&lt;p&gt;To make JS learn-able, you need to use a library to clean it up. For example doing a foreach of an object in JS has many problems. However using a library can make it much simpler.&lt;/p&gt;&#xA;&lt;h1&gt;No&lt;/h1&gt;&#xA;&lt;p&gt;Using a complex library will make learning more complex.&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion&lt;/h1&gt;&#xA;&lt;p&gt;Only use libraries that make it simpler, but do use them.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-07-17T09:11:55.420" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5820" PostTypeId="1" AcceptedAnswerId="5822" CreationDate="2019-07-18T14:32:09.617" Score="24" ViewCount="5175" Body="&lt;p&gt;Most of the books I read give examples using &lt;code&gt;printf&lt;/code&gt; and &lt;code&gt;scanf&lt;/code&gt;. At some point the students know perfectly how to use these two functions but they don't know about &lt;code&gt;stdin&lt;/code&gt;, &lt;code&gt;stdout&lt;/code&gt; and &lt;code&gt;argv&lt;/code&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To me and according to many programming principles (e.g. KISS) a program should not interrupt the execution for prompting the user. Instead, and this is a much clever approach, the developer should learn to use the power of pipes and use the options and the arguments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ whatdaywas 1982 02 16&#xA;Monday&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is much better than: &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;$ whatdaywas&#xA;Enter a year: 1982&#xA;Enter a month: 2&#xA;Enter a day: 16&#xA;It was a Monday. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any rationale behind this pedagogical approach?&lt;/p&gt;&#xA;" OwnerUserId="6890" LastEditorUserId="1293" LastEditDate="2019-07-18T19:59:30.270" LastActivityDate="2021-02-24T23:41:23.517" Title="Why teach C using scanf without talking about command line arguments?" Tags="|programming|c|" AnswerCount="7" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5821" PostTypeId="2" ParentId="5820" CreationDate="2019-07-18T14:50:42.113" Score="6" Body="&lt;p&gt;Ultimately they need to understand both ways. Which you do first seems to be a matter of preference - or maybe just following the textbook. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They need to understand at some point that 'main' in C is an interface with the OS. But, since you can't teach everything at once, you have do pick the order of instruction. But teaching command line params later can give you a way to talk about &quot;elegance&quot; in program design. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, the program written to accept args needs to behave properly if none (or too few) are presented. Often this defaults to prompting for data in simple programs. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-07-18T14:50:42.113" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5822" PostTypeId="2" ParentId="5820" CreationDate="2019-07-18T16:13:33.380" Score="25" Body="&lt;p&gt;I think that the rationale is so you don't have to introduce arrays and array notation on day 1. Typically, arrays enter into the picture at roughly the same time as loops, which would take place a few weeks or months later, depending on the pacing of your course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, if you want to start with command line programs, it's not a huge problem to do so.  At the very, very beginning of programming, there are always a few magical incantations that students must type, but won't fully explore until later.  &lt;code&gt;args[0]&lt;/code&gt; could easily be such an incantation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a side benefit to this approach, your students may have an easier time when they come to arrays, since they've already used them a bit.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-07-18T16:13:33.380" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5823" PostTypeId="2" ParentId="5820" CreationDate="2019-07-18T23:30:12.207" Score="14" Body="&lt;p&gt;Because, traditionally, programs iterate over data. See &lt;a href=&quot;https://en.wikipedia.org/wiki/Jackson_structured_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;JSP&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Admittedly, prompting the user for data is weird, however we're talking about beginners here, having them try to remember what the different fields of data they have to enter isn't the point of the exercise, and is likely to make them view interacting with computers as needlessly complicated. As a bonus, prompting for the values helps make the beginner programs self documenting - the text of the prompt is an explanation of the variable that is to be read - so this will hopefully help our novice programmers understand the simple program without introducing the complex topic of comments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I was taught it wasn't legitimate in early versions of pascal to output before input, so you couldn't prompt for input.)&lt;/p&gt;&#xA;" OwnerUserId="8237" LastEditorUserId="8237" LastEditDate="2019-07-19T23:15:31.603" LastActivityDate="2019-07-19T23:15:31.603" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5824" PostTypeId="2" ParentId="5820" CreationDate="2019-07-19T05:54:38.500" Score="17" Body="&lt;p&gt;Because everything around C language education is just utterly awful. That's really all there is to it. &lt;code&gt;scanf&lt;/code&gt; should not be taught, but it is. It's rarely useful, and you can discover it on your own if you need it. &lt;code&gt;gets&lt;/code&gt; should not be taught, but it is. It's not even part of the language any more for the past eight years. I say this as one of the folks (through my work on &lt;a href=&quot;https://www.musl-libc.org/intro.html&quot; rel=&quot;noreferrer&quot;&gt;musl libc&lt;/a&gt;) seriously working on the future of the C language. Education around C is utterly backwards and needs drastic rethinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No actual software people use operates in terms of prompts, much less ones that don't have any sort of line editing or navigation forward/back in the process. (OK, some masochists use &lt;code&gt;make config&lt;/code&gt; still, but...) Input to real-world programs arrives via command lines (possibly files specified on command lines or provided as stdin), GUIs, sensors, input over some sort of network protocol, etc. The easiest first case to teach is the command line, and your students are going to have to learn a little bit about it anyway to invoke the compiler if they don't already know it. By starting to teach input from the command line, you &lt;em&gt;show students how programs they're already familiar with are doing something they do&lt;/em&gt;, rather than giving them an example that seems forced/unnatural/foreign.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others have commented that using the command line requires getting into arrays early, but you can paper over that until students are ready. I find processing input from stdin to be a good place to start too, &lt;em&gt;with the caveat that you use input redirection&lt;/em&gt;. Behaviors like terminal line buffering/canonical mode are not at all intuitive to students, and detract from teaching the language. If you instead have them process input redirected from text (or binary) files, you can avoid that. Just don't use &lt;code&gt;scanf&lt;/code&gt;. It's awkward, unintuitive, and often unsafe. Start with &lt;code&gt;getc&lt;/code&gt;/&lt;code&gt;putc&lt;/code&gt;, then &lt;code&gt;fgets&lt;/code&gt; when you're ready to do some parsing.&lt;/p&gt;&#xA;" OwnerUserId="1327" LastEditorUserId="1314" LastEditDate="2019-07-20T12:30:25.963" LastActivityDate="2019-07-20T12:30:25.963" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5825" PostTypeId="2" ParentId="5820" CreationDate="2019-07-19T18:28:55.407" Score="12" Body="&lt;p&gt;From my own experience tutoring young CS students, user input is actually a tricky concept.  If it were not for user input, the results of any program could be pre-compiled into nothing but its output.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You get one lesson from getting all the input right at the beginning, with argc/argv, but from that point on, its just the computer churning.  You get a different lesson from getting input during the execution of the program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that the idea of getting input from the user is surprisingly non-intuitive, given that nearly every program we interact with on a daily basis does it.  This suggests that introducing it early helps prune misconceptions about how computers work before they become a real problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously not every student is the same, but a particular pattern I found occurs more than I'd like is that they can understand what a program should do when it executes but not how that actually happens.  They can look at&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;BOOL x = TRUE;&#xA;if (x)&#xA;    printf(&quot;Hello\n&quot;);&#xA;else&#xA;    printf(&quot;World\n&quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;And they can intuit that the program should print &quot;Hello&quot;, but they can't intuit how a computer can possibly do so.  As best as I can tell they figure the compiler does the &quot;magic,&quot; and figures out which printf to use (we'll ignore optimizers for a moment).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, when the values come from input, you can no longer think about the computer as a magic device which reaches the final result immediately.  You have to see that it is following steps.  We know this, but it seems many students don't grasp this at first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have inputs coming from argv, its easier to keep this illusion going.  If you have input during the program, after the program has already done something, you have to realize what's going on quicker.  In particular, it gets you closer to the point of realizing that the input the computer asks for may vary based on previous inputs (press 1 to calculate the area of a circle, press 2 to calculate the area of a rectangle.  Depending on the next scanf/gets, the computer will ask for one additional number or two)&lt;/p&gt;&#xA;" OwnerUserId="812" LastEditorUserId="812" LastEditDate="2019-07-19T21:48:58.387" LastActivityDate="2019-07-19T21:48:58.387" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5826" PostTypeId="1" CreationDate="2019-07-21T09:03:46.727" Score="3" ViewCount="14422" Body="&lt;p&gt;Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use to teach students about the divide and conquer method before going to more complex algorithms?&lt;/p&gt;&#xA;" OwnerUserId="8260" LastEditorUserId="919" LastEditDate="2019-07-31T18:16:06.873" LastActivityDate="2020-12-17T14:11:01.677" Title="A real world example for the divide and conquer method" Tags="|teaching-analogy|algorithms|" AnswerCount="6" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="5827" PostTypeId="2" ParentId="5826" CreationDate="2019-07-21T10:36:49.543" Score="7" Body="&lt;p&gt;The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coincidentally, there is a list of divide and conquer algorithms found &lt;a href=&quot;https://www.geeksforgeeks.org/divide-and-conquer/&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;.  It's a pretty long list, and might have cast too wide a net.  I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer.  However, it could be that upon closer inspection, they are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students.  This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-07-21T10:36:49.543" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5828" PostTypeId="2" ParentId="5826" CreationDate="2019-07-21T14:34:54.397" Score="13" Body="&lt;p&gt;Back around 1985, Susan Merritt created an &lt;a href=&quot;https://dl.acm.org/citation.cfm?id=214925&quot; rel=&quot;noreferrer&quot;&gt;Inverted Taxonomy of Sorting Algorithms&lt;/a&gt;. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types &lt;em&gt;easy split/hard join&lt;/em&gt; and &lt;em&gt;hard split/easy join&lt;/em&gt; varieties. Merge sort is of the former type. Quick sort is the latter. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-07-21T14:34:54.397" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5829" PostTypeId="2" ParentId="5826" CreationDate="2019-07-22T02:48:04.310" Score="4" Body="&lt;p&gt;These sorts of patterns are a bit tricky in real life.  In nice easy computer-science land, every step is the same, just smaller.  Merge sort is clearly the ultimate easy example of this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In real life, we tend to break things up along useful lines.  If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together.  When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that.  In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We see this in real life more often than blind divisions because we, as humans, know we can divide along &lt;em&gt;useful&lt;/em&gt; lines.  The closest I know of that is quicksort's attempt to find a middle index to partition with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One thing I find tricky about these divide and conquer algorithms is that they &lt;em&gt;look&lt;/em&gt; like an infinite regression.  You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth.  Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that.  Showing that &quot;if I can sort a list of length n, I can sort a list of length 2n&quot; would be the more traditional mathematical induction approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together &lt;a href=&quot;https://www.youtube.com/watch?v=ywWBy6J5gz8&quot; rel=&quot;nofollow noreferrer&quot;&gt;a thrilling Hungarian dance&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2019-07-22T02:48:04.310" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5830" PostTypeId="2" ParentId="5787" CreationDate="2019-07-22T16:59:18.597" Score="3" Body="&lt;p&gt;I see two very different reasons to use pseudo-code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, being precise. You want to describe an algorithm in details, without being dependent of the particularities of some programming language. That's the way algorithms are presented in the CS literature. Maybe you avoid a language war, but then, you are dependent of the particularities of your notations anyway, so it sort of defeats its own purpose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, being vague. You want to explain ideas on how to do things, with more or less details.  Maybe what you want to show, is a succession of intermediary steps that lead to an algorithm, and later a program. Because you want to teach, not the version of algorithm X published by Y in 19xx, but &lt;em&gt;how to build&lt;/em&gt; algorithms, and this generally requires several steps of refinement with, in the middle, some yet-no-so-well-defined actions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pseudo-code allows discussion of approaches to a problem, without solving it entirely. For example the (in)famous  &quot;find the largest difference between 2 elements from an array&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One approach is&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;largest = 0&#xA;for each pair (i,j) of indices&#xA;   if the difference between t[i] and t[j] is &amp;gt; largest&#xA;       change largest&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and another&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;find the min and the max of the array&#xA;largest is the difference&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;such pseudo-code is precise enough to discuss the 2 solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Same kind of discussion about &quot;should we use incomplete/incorrect UML diagrams when teaching&quot; ? &lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2019-07-24T11:36:53.590" LastActivityDate="2019-07-24T11:36:53.590" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5831" PostTypeId="2" ParentId="5826" CreationDate="2019-07-23T09:20:00.357" Score="2" Body="&lt;p&gt;If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.&lt;/p&gt;&#xA;" OwnerUserId="8276" LastEditorUserId="919" LastEditDate="2019-07-31T18:13:21.220" LastActivityDate="2019-07-31T18:13:21.220" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5832" PostTypeId="1" AcceptedAnswerId="5833" CreationDate="2019-07-27T13:13:50.827" Score="1" ViewCount="237" Body="&lt;p&gt;I'm a student at a liberal arts college who has recently been taking classes at a tech school due to our schools cross-exchange program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did not do well last semester, so I have spent the summer educating myself. I learned C by doing all of the exercises in the previous book I read.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I'm doing something that a professor told me to do in a tech school, study algorithms in C. So, I bought a textbook Algorithms in C. But this textbook is asking me questions about algorithms I don't fully grasp how to answer, so I cracked open Intro to Algorithms 3rd edition and resolved to get through Chapter 3 at least so I know how to analyze algorithms properly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the thing, I have been reading textbooks all summer, this is the third book I have gotten to, and it's difficult. It's difficult because, I don't understand how to problem solve the questions in the book until I get to the answer key on the internet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This isn't good, and I need a method or a way of seeing this properly. Without the online answers guide, I would have never solved most of the questions in chapter 1 and 2. I understand them now, but I'd rather be able to get through them on my own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another question: Is it important to do every exercise in this book?&lt;/p&gt;&#xA;" OwnerUserId="8288" LastActivityDate="2019-07-29T16:22:59.073" Title="This question is for anyone who has read Introduction to Algorithms by MIT press 3rd edition - Exercises, how to make them easier?" Tags="|self-learning|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5833" PostTypeId="2" ParentId="5832" CreationDate="2019-07-27T19:35:49.377" Score="4" Body="&lt;p&gt;While it isn't necessary to do every exercise in a book, it is important &lt;em&gt;to be able&lt;/em&gt; to do every exercise in the book. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, while it isn't necessary to write every algorithm, it is necessary &lt;em&gt;to be able&lt;/em&gt; to write every algorithm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But learning is another issue. Reading alone isn't enough to learn something. I think you already understand that. You need practice with what you've read to make sure that you have a deep and long lasting understanding of the topic. So, as you've already discovered, you need to do a lot of well chosen exercises. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But even that isn't enough. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need &lt;em&gt;feedback&lt;/em&gt; on your attempts. You need someone to look at your work and tell you where you have done the right thing and where you need improvement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Reinforcement and feedback are the key to learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not sure where you will be able to find this feedback. That is the real value of taking courses - the feedback is built in. Unfortunately not every course gives enough feedback, of course. If it is just grades, it isn't enough. You need it pointed out where &lt;em&gt;and why&lt;/em&gt; something didn't work so that you don't build bad habits. (Reinforcement without feedback can be counterproductive). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps there is a professor who would be willing to look at your work. Perhaps you have another more advanced student available. Some people create study groups to give feedback to each other. Even an online &quot;buddy&quot; who can evaluate what you've tried. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note, also, that having the answers available isn't really sufficient feedback until you learn how to find the misconceptions that led you to the wrong answer. It is little misconceptions that can throw you off and someone giving good feedback can help you get the insight to avoid them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find someone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for &lt;em&gt;making it easier&lt;/em&gt;, only reinforcement, feedback, and time will do that. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-07-27T19:35:49.377" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5834" PostTypeId="2" ParentId="5832" CreationDate="2019-07-28T00:55:19.023" Score="2" Body="&lt;p&gt;I would add to Buffy's completely wonderful answer only this: do not fret too much if you don't always get the questions on your own, particularly in a self-learning context.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of these algorithms took brilliant people years to come up with, and while they have now been well established and boiled down to their essentials, do not be fooled; they represent deep thinking and deep mathematical truths.  If it takes some time to absorb them, that does not mean that you are doing poorly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of your study as gardening, and your consistent efforts will be rewarded over time.  There is no requirement that you learn everything deeply in your first pass.  Just be patient with yourself, and learn your lessons well.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2019-07-28T01:32:56.840" LastActivityDate="2019-07-28T01:32:56.840" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5835" PostTypeId="2" ParentId="5832" CreationDate="2019-07-29T16:22:59.073" Score="1" Body="&lt;p&gt;Let me offer you another perspective. Since you study at a liberal arts college, I presume you are not majoring in computer science. So, the book you are talking about (Cormen's) isn't really a simple one. It is intended for CS students with a certain background that you might lack.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is not much profit in trundling through a difficult book if you realize how solve an exercise only after seeing an actual solution. Yes, perhaps, you might be able to learn some algorithms by heart, but it looks like algorithms are not becoming a part of your natural thinking process. When you see a solution, you can understand it; but you can't come up with your own ideas since this &quot;algorithmic thinking&quot; is not a part of your normal daily cognitive process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both &quot;Algorithms and C&quot; and &quot;Intro to Algorithms&quot; are detailed books in part intended to serve as reference material. The latter book also contains a fair bit of maths. I don't think you are supposed to memorize every single procedure described there: it should be enough to know what is doable, what is the general idea of a solution, and how complex a particular algorithm is. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand that you need to prepare for an exam, but if you had more time, I'd say that the &quot;proper&quot; way of understanding algorithms is to pick up a much simpler book (such as Grokking Algorithms) and try solving simpler problems entirely on your own. If you face an easy task, you should be able to figure out how to solve it, and then you'll be able to appreciate other, more efficient ways of achieving the same result. Comparing your solution with a more efficient solution is more helpful for self-improvement than just checking the answers, I believe.&lt;/p&gt;&#xA;" OwnerUserId="6409" LastActivityDate="2019-07-29T16:22:59.073" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5836" PostTypeId="1" CreationDate="2019-07-31T14:19:41.710" Score="3" ViewCount="171" Body="&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Closest_pair_of_points_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;closest pair problem&lt;/a&gt; is the famous problem of finding out the closest pair of points given an arbitrary set of points on a plane. This problem has a divide and conquer algorithm and often is used in algorithms classes to illustrate the divide and conquer paradigm.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also intend to do the same, but I would like to begin with some comments on why this algorithm is useful. Are there any interesting examples I can use here? A google search reveals nothing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is for an introductory algorithms course, and the audience is not expected to be an expert on this topic and has a mediocre level of mathematical maturity.&lt;/p&gt;&#xA;" OwnerUserId="3036" LastActivityDate="2019-08-03T22:34:21.940" Title="What is the closest pair problem useful for?" Tags="|student-motivation|algorithms|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5839" PostTypeId="2" ParentId="360" CreationDate="2019-07-31T14:58:53.297" Score="0" Body="&lt;p&gt;An interesting bug occurred during a practice job interview when creating a method that tests whether a substring (the needle) is in a string (the haystack). You can play with &lt;a href=&quot;https://repl.it/repls/CandidOccasionalRegister&quot; rel=&quot;nofollow noreferrer&quot;&gt;the code on repl.it&lt;/a&gt; or see it here.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;import java.util.Objects;&#xA;&#xA;class Main {&#xA;&#xA;  public static void main(String[] args) {&#xA;    // Add more test cases.&#xA;    String[] needles = {&quot;a&quot;, &quot;a&quot;, &quot;ab&quot;};&#xA;    String[] haystacks = {&quot;a&quot;, &quot;b&quot;, &quot;ba&quot;};&#xA;    for (int i = 0; i &amp;lt; needles.length; i++) {&#xA;      boolean expected = haystacks[i].contains(needles[i]);&#xA;      boolean actual = isSubstring(needles[i], haystacks[i]);&#xA;&#xA;      System.out.println(String.format(&#xA;        &quot;%s -- isSubstring(\&quot;%s\&quot;, \&quot;%s\&quot;) has expected value %b&quot; +&#xA;        &quot; and actual value %b&quot;, &#xA;        expected == actual ? &quot;PASS&quot; : &quot;FAIL&quot;,&#xA;        needles[i], haystacks[i],&#xA;        expected, actual));&#xA;    }&#xA;  }&#xA;&#xA;  /**&#xA;   * Tests whether the given substring (the needle) is in the full string&#xA;   * (the haystack).&#xA;   *&#xA;   * @param needle the substring&#xA;   * @param haystack the full string&#xA;   * @return true if the substring is contained in the full string, false otherwise&#xA;   */&#xA;  public static boolean isSubstring(String needle, String haystack) {&#xA;    Objects.requireNonNull(needle);&#xA;    Objects.requireNonNull(haystack);&#xA;&#xA;    if (needle.isEmpty()) {&#xA;      return true;&#xA;    }&#xA;&#xA;    for (int i = 0; i &amp;lt; haystack.length(); i++) {&#xA;      // Check if next haystack character matches first haystack character.&#xA;      if (haystack.charAt(i) == needle.charAt(0)) {&#xA;        // If so, see if the rest of the strings match.&#xA;        if (isSubstringHelper(haystack, needle, i + 1)) {&#xA;          return true;&#xA;        }&#xA;      }&#xA;      // If not, advance the haystack index and try again.&#xA;    }&#xA;    return false;&#xA;  }&#xA;&#xA;  private static boolean isSubstringHelper(String haystack, String needle, int hi) {&#xA;    for (int ni = 1; //  The character with index 0 has already been tested.&#xA;         ni &amp;lt; needle.length() &amp;amp;&amp;amp; hi &amp;lt; haystack.length(); &#xA;         ni++, hi++){&#xA;      if (haystack.charAt(hi) != needle.charAt(ni))&#xA;        return false; &#xA;    }&#xA;    return true;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I would suggest removing all but the first pair of test cases before assigning to students.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2019-07-31T18:12:50.637" LastActivityDate="2019-07-31T18:12:50.637" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5840" PostTypeId="1" AcceptedAnswerId="5841" CreationDate="2019-08-01T15:55:45.347" Score="3" ViewCount="112" Body="&lt;p&gt;Which recording method is best used for computer science. The Cornel method or the subsequent method developed by Scott Young who mastered the MIT program in a year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To be honest, I have problems keeping notes. Or it’s rewritten textbooks. Or it’s rewritten truncated textbooks. Or these are bare examples without explanation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When conducting a synopsis, my thoughts are not logical and not consistent. Well, speaking in short, when I open my synopsis, I don’t understand anything in it.&lt;/p&gt;&#xA;" OwnerUserId="8187" LastEditorUserId="27" LastEditDate="2019-08-02T02:11:19.017" LastActivityDate="2019-08-02T02:11:19.017" Title="Method for keeping records in a computer science notebook?" Tags="|self-learning|adult-education|notes|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5841" PostTypeId="2" ParentId="5840" CreationDate="2019-08-01T19:20:51.580" Score="4" Body="&lt;p&gt;Based on what you say about yourself, I'd guess that the Cornel system is probably better than either of the &lt;a href=&quot;https://sidsavara.com/note-taking-strategies/&quot; rel=&quot;nofollow noreferrer&quot;&gt;other two described &lt;em&gt;here&lt;/em&gt;&lt;/a&gt;. But that is just because you suggest that you seem to lack the ability, currently, to pull out the big ideas as they occur and the other two methods depend on doing that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, the goal of all of this isn't really effective note taking. You can have the best notes in the world and still not learn anything. The goal is to learn and to do that you need to reinforce the ideas that are presented, not just capture them in notes. But note that the Cornel system, as described at the link, includes this step as an essential part. Review the notes you take. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd go farther, actually. Not only review the notes, but write summaries of them periodically. And don't wait too long before doing that, so you don't lose the track of what you were learning in the meantime. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reinforcement trick is to write the important ideas on note cards and &lt;em&gt;always&lt;/em&gt; carry a few of these around with you, along with a few blank cards and a pen. Then you can review while otherwise spending wasted time waiting for a bus or whatever. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in a subject like CS or mathematics where you are actually expected to &lt;em&gt;do&lt;/em&gt; something with what  you learn, it is also important to do exercises and solve problems soon after any lesson. This will, again, firm up the learning. Even better if there is someone to give you feedback on your solutions. This normally happens when exercises are assigned, but you might have to arrange it on your own for others. Study groups can be useful for this if they are well designed, requiring actual work from every member. Reading solutions is nothing like producing them. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For what it's worth I now just capture ideas on directly on note cards. One idea per card. I can then group and rearrange the ideas by physically manipulating the cards. Summaries can be developed from the cards. Questions can be written on the backs of the cards. Different colored cards can be used for different sorts of things. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-08-01T19:49:47.093" LastActivityDate="2019-08-01T19:49:47.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5842" PostTypeId="2" ParentId="5836" CreationDate="2019-08-03T22:34:21.940" Score="4" Body="&lt;p&gt;Rosen, &lt;em&gt;Discrete Mathematics and its Applications&lt;/em&gt;, Sec. 8.3, says:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;This problem arises in many applications such as determining the&#xA;  closest pair of airplanes in the air space at a particular altitude&#xA;  being managed by an air traffic controller.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2019-08-03T22:34:21.940" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5843" PostTypeId="1" CreationDate="2019-08-04T22:04:05.370" Score="2" ViewCount="219" Body="&lt;p&gt;I wondered what attempts were made to classify programming exercises for students in their learning path, just like taxonomy in biology.&#xA;For example :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A &quot;concept covered&quot; criteria from generic to specific:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;At level 1, we have &quot;general&quot; concepts : Iteration, Recursion, Abstract Data Type, Conditionals, etc.&lt;/li&gt;&#xA;&lt;li&gt;At level 2, we have &quot;less-general&quot; concepts : For Loop, tail recursion , List, Ternary operator&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A &quot;difficulty&quot; criteria such as easy, intermediate, hard.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;According to my research on many search engines like &lt;a href=&quot;https://dblp.uni-trier.de/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the dblp computer science bibliography&lt;/a&gt;, the only one that is much mentioned is Bloom's Taxonomy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are other classifications, besides that one?&lt;/p&gt;&#xA;" OwnerUserId="8306" LastEditorUserId="204" LastEditDate="2019-08-10T08:04:55.583" LastActivityDate="2020-11-07T18:02:24.937" Title="Classification of programming exercises" Tags="|student-motivation|teaching-analogy|student-perceptions|static|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5845" PostTypeId="2" ParentId="5843" CreationDate="2019-08-04T22:26:01.743" Score="2" Body="&lt;p&gt;In one sense this is hopeless as you probably can't come up with a classification that everyone would agree with. On the other hand, it is certainly possible for you to come up with a classification that is useful to you and to other people who think and teach like you do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the real problem is that &quot;what is elementary&quot; is bound up with teaching methodology and how an instructor chooses to create and deliver a course. The danger is that people will start to think that you need to teach what a taxonomy calls elementary &lt;em&gt;first&lt;/em&gt;. That may not be the best course. It implies that one can only learn computing from the lowest level (say, C) to higher levels (say, Scheme) and that is known to be false. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you are willing to match a taxonomy to a pedagogical system and deep ideas about the way that people learn, then it might be possible, even useful to do so, but, I think, it would only be valid for that system and possibly invalid for others. Just for example, tail recursion is pretty elementary if you are learning Scheme as a first language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is also a larger issue of program structure - what you imagine the nature of computation to be. These are even more &quot;elementary&quot;, in a certain sense, than the things you list. For example, structured programming and object oriented programming (to name just two paradigms) have very different ideas about the nature of computation, but those underlying ideas are usually implemented with the simple tools you mention (among others, which are missing). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, using modern programming tools, it is possible to create an environment in which the student learns to program, where the environment itself defines all of the primitives, both values and actions. These environments are normally called simulations and they can be very sophisticated - Turing Complete, in fact. Any &quot;model&quot; of computation can be simulated this way. I point you to &lt;a href=&quot;https://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt;, for example, and it's companion teacher's site &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Greenroom&lt;/a&gt;. The latter has a large number of such simulated programming &quot;worlds&quot; that can be adapted to teaching novices. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't mean to discourage you, but ask you to consider that the problem is bigger than you imagine and your &quot;solution&quot; might only apply to a small part of the whole landscape. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-08-05T00:04:54.180" LastActivityDate="2019-08-05T00:04:54.180" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5846" PostTypeId="1" CreationDate="2019-08-05T03:15:42.187" Score="4" ViewCount="341" Body="&lt;p&gt;In a data structures course, we see trees, balanced trees, hash tables. These have an important thing in common: we can use them to keep a collection of elements (with operations add and remove) and test for an element in the data structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to use them to define a &quot;overarching&quot; abstract data type, with each of them as an implementation. Is there a name for this ADT?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The set ADT unfortunately supports more operations (see &lt;a href=&quot;https://en.wikipedia.org/wiki/Set_(abstract_data_type)#Operations&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Set_(abstract_data_type)#Operations&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="4251" LastActivityDate="2019-08-08T20:54:03.797" Title="Abstract data type that has &quot;include&quot; &quot;remove&quot; and &quot;is in&quot; and only those" Tags="|data-structure|data-types|" AnswerCount="2" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5847" PostTypeId="2" ParentId="5846" CreationDate="2019-08-05T06:23:50.823" Score="3" Body="&lt;p&gt;Carrano, &lt;em&gt;Data Abstraction &amp;amp; Problem Solving with C++: Walls and Mirrors&lt;/em&gt; begins by introducing a simple ADT kind of like you're talking about, called a &quot;Bag&quot;. But it is not used as a base class for later examples (e.g., trees, et. al.). From Sec. 1.5:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/lTFXH.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/lTFXH.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2019-08-05T06:23:50.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5849" PostTypeId="2" ParentId="5787" CreationDate="2019-08-07T23:29:08.743" Score="1" Body="&lt;p&gt;To answer your question: my experience of using pseudocode is that it works perfectly well in combination with actual code. It would be like a photography teacher explaining the basis of composition by drawing instead of pointing at actual photos. As long as photos that use the rules are shown also, this is great. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your experience raised a more important concern, one which I think that the other 1010 answers did not address. You said: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My experience has been mixed. It seems like the problem is that now&#xA;  the students think that the various algorithms &lt;em&gt;are&lt;/em&gt; the java code.  &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Indeed. My experience of people has been that there are two kinds:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Those who can generalize about a subject  &lt;/li&gt;&#xA;&lt;li&gt;Those who can not (yet)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I had a student who thought he would be great at programming because he had done a lot of RPG2. His approach was to memorize everything - the book, my lectures, stuff he found on his own... Alas, his brain could not memorize everything. No one's can. We cannot function on the level of detail and master complex things, it is simply impossible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, your students who are trying to dig to China with a spoon need to learn to use larger concepts and tools. They need to do this by starting with small concepts and tools, and master them all as they go along. I don't know a single programmer who started out at a high level and never mastered the basics. It is impossible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A program is nothing more than the coordinated operation of billions of transistors, possibly spread across machines linked by many technologies connected across large geographic areas. A mind is nothing more than the coordinated firing of trillions of nerve cells. But for us to understand, we need to be familiar with all of the levels. I think that this is beyond anyone, but what else do we have to occupy ourselves?&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2019-08-07T23:40:30.287" LastActivityDate="2019-08-07T23:40:30.287" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5850" PostTypeId="1" CreationDate="2019-08-08T12:41:34.407" Score="1" ViewCount="58" Body="&lt;p&gt;I am a programmer in a small department creating some new tools and applications with ASPX and SQL, and explaining the methodology to co-workers, and writing documentation (so the question here qualifies as 'teaching'). Having programmed for 30 years and many times created particular systems of multiple connected parts, I think that OOP is probably not the big deal we make of it, but I would like to know how I could have designed the system described below in a more Object Oriented way - to recast it if needed and move forward with more explainable projects in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In brief, the &quot;File Cabinet&quot; system I created recently is to facilitate recreating the intranet used by hundreds of people where I work. The intranet consists of many thousands of files and links to internal and external pages, programs and tools. The File Cabinet idea says that there are two basic ways to show links on the intranet and allow authorized users to make changes, instead of asking the web maintainer to make every single change for them. The two ways are: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Present a folder in the OS as a set of links to files and folders. Users make changes by placing new files in the appropriate place in the filesystem. This display method duplicates some Windows Explorer functionality in a web page.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide a method where authorized users can maintain sets of 'Sections' on a Page containing a list of links in each section. The entire page would render just by reading an SQL table listing the sections, and an SQL table listing the links in each section. Users can add and change links and upload files if necessary.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have it working. The appearance can be customized using a CSS file. The two methods of seeing the content look the same to normal users. Users who can maintain the site already know how to move files around, and can be shown how to use the Editable Links method. These two methods should dramatically reduce the effort of recreating the department's intranet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I used ASPX to define data sources (SQL or the OS filesystem) and ListViews to generate an HTML table or a set of nesting HTML div's to render the content. The code-behind is VB.Net and most of it is just responding to clicks, manipulating the data before presentation and so on. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Could this project have been built in an Object Oriented manner? I think that most of the applications I create, particularly for our department's intranet, are not really amenable to OO, because they basically consist of only a data source and rendering method. The complexity has to do with manipulating data as it passes between the source and screen. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this &quot;too simple&quot; for OO? Or just a different kind of situation? Are web applications usually designed with objects? &lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2019-08-08T12:47:11.783" LastActivityDate="2019-08-09T07:30:45.310" Title="How to recast an ASPX application as Object Oriented" Tags="|object-oriented-paradigm|web-development|databases|programming-paradigms|server-client|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5851" PostTypeId="2" ParentId="5843" CreationDate="2019-08-08T12:54:58.407" Score="2" Body="&lt;p&gt;Another classification criterium would around the &lt;em&gt;type&lt;/em&gt; of exercise. Some exercises are 'here is a problem, write a piece of code to solve it' or 'design a (piece of a) software system'. Others are 'here is some partial code, or code with a mistake, complete or fix it'. Another type is given correct code with the lines in randomised order, put the lines in the correct order (Parson's problems). Modifying or refactoring code are further examples. Exercises could also be presented as multiple choice questions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a blog post on these and other exercise types, see &lt;a href=&quot;http://third-bit.com/2017/10/16/exercise-types.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://third-bit.com/2017/10/16/exercise-types.html&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8315" LastEditorUserId="8315" LastEditDate="2019-08-13T13:42:14.840" LastActivityDate="2019-08-13T13:42:14.840" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5852" PostTypeId="2" ParentId="5846" CreationDate="2019-08-08T20:54:03.797" Score="0" Body="&lt;p&gt;Some data structure texts I've seen use &quot;bag&quot; as a generalization of stack/queue/deque: can add items (repetitions allowed), can extract items (no order assumed, i.e. LIFO, FIFO; same sequence of insertions/extractions could give a different output sequence), ask if it is full. No &quot;check if element is present&quot;, though. Perhaps what you are looking for is a set or multiset.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T20:54:03.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5853" PostTypeId="2" ParentId="5816" CreationDate="2019-08-08T21:12:24.157" Score="1" Body="&lt;p&gt;You need to understand the problem the data structure is trying to solve, how it is used (algorithms around it). You need to be able to see any alternatives and their advantages and disadvantages, specially when managing lots of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You need some guide, concrete problems to solve, somebody who tells you the relevant mathematics (yes, understanding &lt;em&gt;why&lt;/em&gt; one alternative is better than another is mathematics). And try your hand at writing your own programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many texts available for free, like the series &lt;a href=&quot;https://opendatastructures.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Open Data Structures&lt;/a&gt; (available in several programming languages, rather decent); Jeff Ericson's &lt;a href=&quot;http://jeffe.cs.illinois.edu/teaching/algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms&lt;/a&gt; text is very good, if somewhat heavy going; there are many sets of (more or less) polished lecture notes and textbook drafts floating around, like the &lt;a href=&quot;http://algorithmics.lsi.upc.edu/docs/Dasgupta-Papadimitriou-Vazirani.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;one by Dasgupta et al&lt;/a&gt;. The classic book by Cormen et al &quot;Introduction to algorithms&quot; is encyclopaedic; Sedgewick and Wayne's &quot;Algorithms&quot; is very nice.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T21:12:24.157" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5854" PostTypeId="2" ParentId="5757" CreationDate="2019-08-08T21:24:42.197" Score="1" Body="&lt;p&gt;You need to pique their interest. That means doing some sort of GUI work, perhaps creating a little game, store and retrieve some data. I'd recommend using Python: simple syntax, has all sorts of bells and whistles (OOP! Lots of libraries for all sort of stuff, even symbolic math).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please don't try to show them several languages! Somebody said &quot;learning the first language takes a year&quot; (traditionally, &quot;Programming&quot; and Data Structures&quot;), &quot;the second six months, then you learn a language in a month&quot;. That coincides with my experience (as long as the languages aren't too different!). But that first year is required, and it is hopefully the same language. Different ways of expressing, e.g. a loop, just confuse newbies for no purpose.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T21:24:42.197" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5855" PostTypeId="2" ParentId="5732" CreationDate="2019-08-08T21:30:10.630" Score="2" Body="&lt;p&gt;Please do get the requisite material from whoever did teach it before you! Also look around for colleagues who are willing to share their experiences with you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching introductory programming is &lt;em&gt;not&lt;/em&gt; easy. As an experienced programmer, you just don't remember what the stumbling blocks were when you started out, and probably won't understand many of the problems your students run into.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As always, remember you are certainly not the first one doing this, look around how others do it, see what works and what doesn't.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="5219" LastEditorUserId="27" LastEditDate="2019-08-08T22:54:54.120" LastActivityDate="2019-08-08T22:54:54.120" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5856" PostTypeId="2" ParentId="5787" CreationDate="2019-08-08T21:42:29.800" Score="1" Body="&lt;p&gt;&quot;Pseudocode as first language&quot; is a terrible idea. Some of the hurdles a newbie programmer faces is to understand that you have to spell everything out, precisely; that the computer does as told, not as it should; the need for variables (and names, and types/structures) to store data; to organize operations into the right order. Most of that can be glossed over in pseudocode, and there is no compiler/test run that shows mistakes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, as a help, as a way of sketching solutions for newbies a sort-of-our-language pśeudocode is useful; later, when they have overcome the first round of obstacles, it is an useful tool for design and communication, and the language can take second row seat.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T21:42:29.800" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5857" PostTypeId="2" ParentId="5576" CreationDate="2019-08-08T22:00:10.367" Score="3" Body="&lt;p&gt;Motivation to work through &quot;boring&quot; material can be from knowing that it is the required foundation for more interesting stuff. Or you might try to find some interesting angle to it. Perhaps it is presented to you in a way that doesn't match your style, look for alternative expositions (other lecture notes, videos on YouTube, rummage around in Wikipedia to see if any interesting connections show up).&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T22:00:10.367" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5858" PostTypeId="2" ParentId="5527" CreationDate="2019-08-08T22:11:31.427" Score="1" Body="&lt;p&gt;It is just like learning how to ride a bike: by programming. And by reading good (and also bad!) programs critically.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pick some (simple!) problem to solve, have a go at it. Look for some open source package that interests you, pick some &quot;for newbies&quot; task (if they advertise some).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Check out textbooks and tutorials for your favourite language. Look around for more advanced data structures and algorithms (there are tons of lecture notes on those subjects available). A bit of combinatorics/discrete math is a must for a well-rounded programmer.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2019-08-08T22:11:31.427" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5859" PostTypeId="2" ParentId="5850" CreationDate="2019-08-09T07:30:45.310" Score="2" Body="&lt;p&gt;The object-oriented and procedural, or imperative, paradigms, and the functional, logical and mathematical, or declarative, paradigms are just that &quot;paradigms.&quot; They are the embodiment of thought patterns and methods for modeling solutions. So long as the end result of a paradigm, the language used to implement it, is Turing complete, and the associated hardware can handle the needed elements, a solution that can be developed in one paradigm can usually be reproduced in another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue shifts from &quot;can it be done this way?&quot; to &quot;is this a satisfactory way to do it?&quot; Some problems are better suited to one method while other are easier to solve using a different method. Using any paradigm to solve a problem, or implement a system, requires the ability to &quot;think&quot; within the model which the paradigm embodies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think it is fair to classify any practical solution as too simple, or too complex, for any given paradigm. Especially within the education arena, where the goal is learning how to employ the paradigm, and most &quot;problems&quot; are structured to meet educational objectives more than &quot;real-world&quot; problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an &quot;example&quot; for future projects, the described system might even be too large for the students to apprehend while also trying to learn the basics it employs. If it had a smaller scale to it, the project could model several different paradigms in concert. Web applications are commonly developed using the MVC architectural pattern. The handling of the data (model of MVC) could be accomplished using a functional language, the HTML/JavaScript/CSS (the view of MVC) can be implemented well with procedural, non OO programming. The OO programming can be done in the system which gathers the data, and adjusts it according to the directives from the user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However it's done, the hardest part will likely be converting something you know well, done in the paradigm you are most comfortable with, into something you don't have as much practice with, using a paradigm which is, for all practical purposes, a foreign concept. Having a bad example is likely worse than having no example. If you cannot &quot;think&quot; in OO style, you're unlikely to produce good OO code. Similarly, if you know VB.Net very well and don't know PHP very much, you can probably produce excellent examples of solutions in ASPX/VB.Net, and very poor examples in PHP. If you still want to reproduce your system using OO, or functional, programming, find a colleague who is proficient in the paradigm of choice to implement it for you.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-08-09T07:30:45.310" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5860" PostTypeId="1" CreationDate="2019-08-10T14:42:28.343" Score="0" ViewCount="55" Body="&lt;p&gt;I'm actually studying (free studying using online books) to pass the Pivotal Spring core certification and i need some exercices (online or pdf) to practice in order to master the framework as well, especially &#xA;Spring dependancy module&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any resources would be awesome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="8319" LastEditorUserId="150" LastEditDate="2019-08-12T11:16:33.187" LastActivityDate="2019-08-12T11:16:33.187" Title="Spring core exercices" Tags="|self-learning|resource-request|java|exercises|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5862" PostTypeId="1" CreationDate="2019-08-10T18:43:14.530" Score="3" ViewCount="69" Body="&lt;p&gt;I came across another reference to how CS education does not produce bimodal grade distributions etc. Also re-read some stuff about gender issues, that women are not mentored and supported and so on. I have no desire to raise those issues again. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I do feel that there is some sort of difference in motivation. Not to do with gender, race, income, etc, but just as a human trait. We have the OCEAN traits in Psychology (Openness, Conscientiousness, Extroversion, Affability / Amiability, and Neuroticism. These seem to be universal. Is motivation something that varies among people? Can differences in motivation affect how hard they study, persevere, self-teach, find alternatives, and other factors that lead to success in studying and in the workplace? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does Motivation vary? (Not the actual question, just the premise.) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is Motivation what we need to focus on regardless of any other factors?&lt;/strong&gt; (The actual question.) Three factors of motivation are Autonomy, Mastery and Purpose. I see those all as being self-defined, relevant only to oneself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know that since I was a child, anything I chose for myself as my goal, whether learning about electronics, or resisting my schoolwork, I pursued with the greatest force and energy that I could rouse. Everything else was simply not important. So, when I went to college, I already knew I wanted to learn programming, nothing else mattered. I didn't have mentoring, I barely even went to office hours. I just did it on my own, which is what I did in all my pursuits of personal interest, like radio, or learning photography or whatever. So, I am at a loss to understand why college students do not know what they want to major in, or why they are not motivated to work on their core courses. Why don't they leave college and just do what they &lt;em&gt;actually wish to&lt;/em&gt; instead? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that because I was Introverted (one of the OCEAN traits) I preferentially chose tasks for myself that were intrinsically rewarding when pursued alone, and which could not be blocked by having no access to other people. 'Others' and their preferences were the block, so I &quot;routed around&quot; it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Please enlighten me. Maybe motivation is bimodal, and is the real issue underlying inequity, etc? if I understand other people better, I can do better. &lt;/p&gt;&#xA;" OwnerUserId="5349" OwnerDisplayName="Scott Rowe" LastEditorUserId="27" LastEditDate="2019-08-15T15:09:20.767" LastActivityDate="2019-08-15T15:09:20.767" Title="Any relevant research in Motivation?" Tags="|student-motivation|struggling-students|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5863" PostTypeId="2" ParentId="5862" CreationDate="2019-08-11T09:17:54.187" Score="3" Body="&lt;p&gt;&lt;em&gt;Understanding people better can enable you to more effectively teach them.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Taken as axiomatic, this can be a helpful thought. It can also be a distraction. The value depends on how it's applied. When trying to understand &quot;people&quot;, you can aim to understand people as a collective of unknown size, from unknown backgrounds, and unknown individualities; something you cannot ever &quot;know&quot; or understand. Conversely, you can aim to know the 35 students in your classroom, with backgrounds, experience, limitations, and gifts which you &lt;em&gt;can&lt;/em&gt; know, and whom you can begin to understand. At least with respect to how that information affects their performance within your subject matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have no links to research into motivation, and can only suggest that if any were found it would be inefficient to read it, or the conclusions drawn from it. The &lt;em&gt;results&lt;/em&gt; would be extrapolations of an imperfect model using statistical analysis gathered by researchers with some pet theory to prove, or disprove. The 'repulsive' statement you found is merely one example of many which can be &quot;concluded&quot; from some observation. While, within the experience of the writer that statement might be true, it could be also be untrue in others' experience. What's left out of the statement are the conditions which define &quot;fail&quot;, what consequences there are for failure, what is expected to be gained by success, and how much effort is required to achieve what &quot;change&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I will be passed over for a promotion unless I gain 6 inches on my biceps and increase my bench-press limit by 100 pounds, and the promotion has a net increase of 15% in pay, I'd personally be willing to &quot;fail&quot; rather than change. Given a different set of conditions, 3% pay increase for learning a new Java framework, I might not consider &quot;failure&quot; as an option.  (I don't know Java, so I'd have to learn that first.) In the second case, to me, the change is more desirable, even though the consequence of failure is one-fifth that of the first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;People, as an amorphous mass, can be classified, categorized, and &quot;pigeon-holed&quot; neatly by any study or research project. People, as one-on-one real individual humans, seldom fit into any neat &quot;system,&quot; no matter how well researched, or refined it may be. If a system were ever developed that could classify people, manufacturing lines could be reduced to producing the one version that fit the needs, and wants, of everyone. We would have the 'one' computer system, with the 'one' OS that everyone could use to do everything they needed. The 'perfect' automobile could be made in the correct color, black according to the legend of Mr. Ford, and the Big-Four would be out of business. And, in your case, you could write to last, perfect, syllabus and lesson plan for each course you teach. (I'll not hold my breath for any of these things.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly enough, I did have some college classes, and I somehow match part of what you described. I did not know what I wanted to major in. I never did manage to &quot;focus&quot; on the core courses. Nor have I managed to collect so much as an Associate's in anything, despite having nearly 150 semester credit hours collected. (I did manage to earn, by accident, a &quot;certificate&quot; for &lt;em&gt;Linux Professional&lt;/em&gt;, which surprised me when it came in the mail after I failed to collect it from the office.) I've been connected to computing, and electronics, for decades, and will always be doing something within those areas. Yet I was not sure that should be my major. Perhaps it would be better to major in business, and use my computer skill within that arena? Of course, it didn't help much that I viewed computers as &quot;fun&quot; either. When ever I do &quot;work&quot; with computers it feels like being paid to play, and I almost feel guilty collecting the check.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;motivation&quot; you seek to understand exists in everyone. It remains individual as to what can activate, or trigger that motivation, or which subject(s) it might be applied to. The target of motivation may not even be a goal, it could be a journey. Some may be motivated to achieve some tangible reward, or to avoid some imagined consequence. Others could be motivated by the &quot;rush&quot; of doing something, or of experiencing the stillness of doing nothing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That &lt;em&gt;you&lt;/em&gt; don't see, or recognize, the motivation of another does not mean it does not exist. &quot;Absence of evidence is not evidence of absence.&quot; (And there ends a 3 hour tour into the rabbit hole of &lt;em&gt;The Demon-Haunted World: Science as a Candle in the Dark&lt;/em&gt;.)&lt;/p&gt;&#xA;" OwnerUserId="104" OwnerDisplayName="Gypsy Spellweaver" LastActivityDate="2019-08-11T09:17:54.187" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5864" PostTypeId="1" AcceptedAnswerId="5865" CreationDate="2019-08-17T22:06:59.700" Score="4" ViewCount="444" Body="&lt;p&gt;I have a friend who, in his mind, has the wrong image about programming. Whenever I mention that programming is fun and that one can enjoy it very much especially if they like solving problems (both math and algorithm related), he stares at me and repeats &quot;if this then do this.. what's so hard or fun about writing that?&quot; and that's just annoying. It is as if one would say &quot;&lt;em&gt;ah well, maths.. 1+1 = 2 there u go!&lt;/em&gt;&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Is there a way I can make him paint a better picture in his mind regarding this field?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;About 10 years ago when he was younger, he did try basic programming and that's what I believe he is basing his judgement on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Not sure if this is the right place to post this but let's see... )&lt;/p&gt;&#xA;" OwnerUserId="8335" LastActivityDate="2019-08-27T13:32:18.043" Title="Explain to someone that programming isn't just all &quot;if&quot;s and &quot;else&quot;s" Tags="|programming|adult-education|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5865" PostTypeId="2" ParentId="5864" CreationDate="2019-08-18T03:10:30.903" Score="7" Body="&lt;p&gt;Obviously your friend is using a bit of hyperbole, and in truth, however annoyed you may be by his blithe dismissal of our entire field, he may not be open to being persuaded.  You may have to resign yourself to not &quot;winning&quot; this argument.  From what you've written, this is what I suspect is the real answer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For what it's worth, he's not, strictly speaking, &lt;em&gt;wrong&lt;/em&gt;.  Data storage and branching are a huge portion of what computers actually do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you still want to attempt to capture him, you might point him towards image recognition.  Sure, it's &quot;if this then do this&quot; in theory, but two different images of birds will share not a single pixel in common, so how do you teach a machine that can only look at one pixel at a time to identify one?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&quot;Computer Science is no more about computers than astronomy is about telescopes.&quot; &lt;em&gt;-misattributed to Edsger Dijkstra&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Of course, even if he concedes the complexity of the problem, that's still a ways away from seeing the joy in trying to solve it. I'm not sure there's truly a way from here to there if he's not interested in taking an honest look.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-08-18T03:10:30.903" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5866" PostTypeId="1" AcceptedAnswerId="5867" CreationDate="2019-08-19T07:37:21.687" Score="1" ViewCount="94" Body="&lt;p&gt;I teach programming in french where we use the ambiguous names &lt;code&gt;labo&lt;/code&gt; for &lt;code&gt;laboratoire == laboratory&lt;/code&gt; or &lt;code&gt;tp&lt;/code&gt; for &lt;code&gt;travail pratique == practical work&lt;/code&gt;. In both way I can use the short notation &lt;code&gt;labo&lt;/code&gt; or &lt;code&gt;tp&lt;/code&gt;, but I would like to write my pratical works in english and I feel cumbersome to name each one &lt;code&gt;practical-work-00&lt;/code&gt;... &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I heard of &lt;code&gt;lab&lt;/code&gt; which looks nice, but is it correct to use this term?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a consensus or a short notation to refer to practical work assignments in computer science?&lt;/p&gt;&#xA;" OwnerUserId="6890" LastActivityDate="2019-08-25T22:53:11.857" Title="Abreviation of practical work assignment?" Tags="|labs|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5867" PostTypeId="2" ParentId="5866" CreationDate="2019-08-19T10:54:54.123" Score="2" Body="&lt;p&gt;Yes, &lt;em&gt;lab&lt;/em&gt; is frequently used as a term to denote a medium size assignment. &lt;em&gt;Exercise&lt;/em&gt; would be used for a shorter one, and &lt;em&gt;project&lt;/em&gt; for something more extensive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the terminology isn't standardized so you can use your own terms, as long as the reader understands them. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'll also note, that just as in programming it isn't the &lt;em&gt;typing&lt;/em&gt; that makes writing hard, so, IMO, abbreviations have limited utility and are often counterproductive. Written work is normally, and appropriately, a bit more formal than conversational work. This is due to the fact that the audience is wider and you don't know as much about it. So clarity over brevity should probably be valued. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-08-19T10:54:54.123" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5868" PostTypeId="2" ParentId="5864" CreationDate="2019-08-19T11:36:40.617" Score="2" Body="&lt;p&gt;What about music?&#xA;A C white note on a partition means a specific frequency for a specific amount of time. And a partition is just a sequence of such commands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Looks pretty dull to write such a thing, no ?&lt;/p&gt;&#xA;" OwnerUserId="2574" LastActivityDate="2019-08-19T11:36:40.617" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5869" PostTypeId="2" ParentId="93" CreationDate="2019-08-19T18:16:53.077" Score="1" Body="&lt;p&gt;I believe that the learning of WEB programming must start with understanding the concepts: XML, HTML, DOM, HTTP, REST / RPC and javascript bases. Javascript is easier to understand if students have ideas about functional and objective paradigms.&lt;/p&gt;&#xA;" OwnerUserId="8338" LastActivityDate="2019-08-19T18:16:53.077" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5870" PostTypeId="2" ParentId="5599" CreationDate="2019-08-19T18:44:40.320" Score="1" Body="&lt;p&gt;An effective way to learn another programming language is learning compared to the known language.&#xA;  Ideally I think one language should be learned for each important paradigm: C / C ++ for imperative / objective paradigms, lisp / Haskel for functional paradigm and SQL for declarative paradigm - the rest of the languages being a combination of these paradigms.&#xA;As for the syntax there is &quot;Intellisence&quot; or equivalent.&lt;/p&gt;&#xA;" OwnerUserId="8338" LastActivityDate="2019-08-19T18:44:40.320" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5871" PostTypeId="2" ParentId="5599" CreationDate="2019-08-19T19:33:21.327" Score="2" Body="&lt;p&gt;I teach classes that each use different languages: Python, C#, Visual Basic, Thunkable, Scratch, Alice, Small Basic and a few other odds and ends.  I am not good in any of them off hand, but I have a set of resource locations that will refresh my memory or show me the important features of the languages.  I learn how to learn languages.  I get the language syntax confused all the time switching back and forth like I do so I have to have samples handy as to how a particular task is done in a particular language.  I still mess up regularly but the kids all think I am a nut case anyway so not big deal.  They live with it.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-08-19T19:33:21.327" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5873" PostTypeId="2" ParentId="5864" CreationDate="2019-08-20T11:50:33.920" Score="2" Body="&lt;p&gt;Depending on the person there may be different approaches, here are a few:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Listen to them, ask them to tell you about their experiences.&lt;/li&gt;&#xA;&lt;li&gt;Tell them about your experiences (Don't work about difficulty, it is just a story).&lt;/li&gt;&#xA;&lt;li&gt;Consider different programs that can be written, to solve a problem that they may have.&lt;/li&gt;&#xA;&lt;li&gt;Solve a problem for them.&lt;/li&gt;&#xA;&lt;li&gt;Puzzles: Show some programming puzzles.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prove that you can write any program (is Turing complete), without conditionals (this also rules out recursion, except infinite). (I have done this)&lt;/li&gt;&#xA;&lt;li&gt;Prove that you can write any program (is Turing complete), without iteration: You will need conditionals, and (at least tail) recursion.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Show alternatives to conditional code: tables (conditional data), polymorphism (Lizcov substitution),&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-08-20T11:50:33.920" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5874" PostTypeId="2" ParentId="5864" CreationDate="2019-08-20T19:49:35.983" Score="2" Body="&lt;p&gt;I don't really think it's your job to convince your friend that programming is fun. But I'm going to answer because I think there are other situations where presenting the &quot;fun&quot; parts of computer science has benefits, e.g. when teaching an introductory class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Focus on the end result rather than on the process.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead of focusing on the act of writing code and trying to paint that as a fun process, focus on the cool stuff you can create with code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which examples you use depends on who you're talking to. You might talk about &lt;a href=&quot;https://en.wikipedia.org/wiki/Creative_coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;creative coding&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Generative_art&quot; rel=&quot;nofollow noreferrer&quot;&gt;generative art&lt;/a&gt;. You might talk about &lt;a href=&quot;https://en.wikipedia.org/wiki/Video_game_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;game development&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Procedural_generation&quot; rel=&quot;nofollow noreferrer&quot;&gt;procedural generation&lt;/a&gt;. You might talk about &lt;a href=&quot;https://en.wikipedia.org/wiki/Artificial_intelligence&quot; rel=&quot;nofollow noreferrer&quot;&gt;artificial intelligence&lt;/a&gt; or healthcare or &lt;a href=&quot;https://en.wikipedia.org/wiki/Category:Scientific_simulation_software&quot; rel=&quot;nofollow noreferrer&quot;&gt;scientific simulations&lt;/a&gt;. You might talk about art, or sports, or dance, or music, or prose.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Show your audience examples of interesting things that were created with code. Then show them how to do it themselves.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See also: &lt;a href=&quot;https://cseducators.stackexchange.com/a/4785/2068&quot;&gt;How to teach a person to enjoy programming?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2019-08-20T19:55:06.390" LastActivityDate="2019-08-20T19:55:06.390" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5875" PostTypeId="1" AcceptedAnswerId="5877" CreationDate="2019-08-21T09:22:28.850" Score="5" ViewCount="391" Body="&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Do you know of a method/system that can determine the run time complexity of code automatically?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At our university we have a system in place that allows students to submit their code and get feedback on whether or not they satisfy the functional requirements of the exercise.&#xA;This is excellent and works well for many of our courses, especially the introductory courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also use it for courses that teach more advanced algorithmic concepts, focusing on run time. We have exercises that ask them to implement for example dynamic programming solutions in &lt;span class=&quot;math-container&quot;&gt;$O(n^2)$&lt;/span&gt; time.&#xA;Currently we use the automated tests to check for the functional requirements and have some tests with larger datasets and a time out to hopefully distinguish between &lt;span class=&quot;math-container&quot;&gt;$O(n^3)$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$O(n^2)$&lt;/span&gt; solutions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps to nobody's surprise this system is not perfect, with some students optimising the wrong parts of their code to hand in an &lt;span class=&quot;math-container&quot;&gt;$O(n^3)$&lt;/span&gt; (or worse) solution and get it through the tests. Thus for the graded assignments our TAs also check all of these by hand to make sure the solution is really &lt;span class=&quot;math-container&quot;&gt;$O(n^2)$&lt;/span&gt; and they deduct some points if it is not.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, do you know of systems or methods that can automatically check the run time &lt;em&gt;complexity&lt;/em&gt; of code (in terms of big-O), rather than the actual run time (in seconds)?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In case this is relevant: the programming language used at our university is Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(NB: I've seen &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3199/incorporating-algorithmic-complexity-in-grading&quot;&gt;this question&lt;/a&gt; and appreciate the concerns about including this in grading. For introductory courses I would not do this. For the courses that focus on finding the most efficient algorithm to solve problems however it is one of the learning objectives :))&lt;/p&gt;&#xA;" OwnerUserId="8184" LastActivityDate="2019-08-21T12:27:47.173" Title="System to validate run time complexity requirements" Tags="|algorithms|grading|" AnswerCount="2" CommentCount="1" FavoriteCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5876" PostTypeId="2" ParentId="5875" CreationDate="2019-08-21T10:50:04.253" Score="4" Body="&lt;p&gt;I'll accept a bit of risk here, but claim that this isn't possible in general unless the student writes very naive code. But in the courses for which you want to use it, that doesn't seem likely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Imagine a linear algorithm implemented as two nested loops. The outer loop depends on the &quot;n&quot; that you are interested in, say the length of an array. The inner loop does not, but in some non obvious way. For example the inner loop may have a fixed (or bounded) number of iterations where the bound isn't obvious at that place in the program. This would be difficult to detect in general, and the analysis might report quadratic rather than linear if the code is a bit obfuscated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar sort of (looking) program with an inner loop somewhat independent of the outer loop might result in a cubic run time algorithm but with only two loops. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could probably come up with a recursive example as well (usual consulting rates apply). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that determining the complexity automatically would require a semantic analysis of the code deeper than that done by compilers. I think that might be possible in principle, but I doubt that such an analysis could be executed in a reasonable time. It might even be equivalent to the halting problem. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some types of complexity can be statically analyzed of course. I use &lt;em&gt;cyclotomic complexity&lt;/em&gt; as a measure of program quality and there are auto checkers for that. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-08-21T10:50:04.253" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5877" PostTypeId="2" ParentId="5875" CreationDate="2019-08-21T12:27:47.173" Score="6" Body="&lt;p&gt;Buffy is provably correct (no risk needed!) that it is impossible to do it with automated code analysis, as this is an attempt to figure out &lt;em&gt;when a program will finish&lt;/em&gt; (i.e. the &lt;a href=&quot;https://en.wikipedia.org/wiki/Halting_problem&quot; rel=&quot;noreferrer&quot;&gt;halting problem&lt;/a&gt;.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can get a very good guess, however, by using a few (very) differently sized input data sets, run the program on each one multiple times, and observe the results on a graph.  This is fairly trivial for a human, and takes very little time.  It may be less trivial for an automated statistical analysis, but I will defer to other who know more about such things to decide whether that is possible or not.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-08-21T12:27:47.173" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5878" PostTypeId="1" AcceptedAnswerId="5890" CreationDate="2019-08-24T20:33:24.053" Score="4" ViewCount="156" Body="&lt;p&gt;About me: I started development in python. I consider my self as an intermediate Vim user. I am comfortable with many bash shell commands. For all the python projects (like django or numerical optimization related), I simply open multiple terminals in i3 and then edit different files using vim and get things done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is a fact about me, I have never done project development in C++ ( long back I did write some single source code file in C, but that is all). I would like to develop some expertize in doing C++ based project development using command line interface (no IDE for sure). I know that there will be an addition compiling and linking overhead (this is where python is so good).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I need to learn some tools which will allow me which help me to create good workflow ( or say environment ) to do development of C++ based projects using cli (command line interface). I suspect that the 3 tools which are must for me to create such cli (terminal) based workflow are :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;a compiler ( gcc)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;gdb for debugging via command line&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;make ( for build automation)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Can anyone refer me to a book ( or any other resource like online courses, videos, blogs ) which would help me to learn those tools for building a terminal based workflow and would teach me some C++ language itself ?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note1: Most of the C++ books I found online would simply teach C++ development using some IDE, I have not found a single book which teaches C++ development using make and gdb (or any other command line tools).&lt;/p&gt;&#xA;" OwnerUserId="8353" LastEditorUserId="204" LastEditDate="2019-09-27T19:27:02.090" LastActivityDate="2019-09-28T13:29:41.130" Title="Tell me a book ( or resources) for creating a good terminal based workflow (for building, debugging) for c++ based project development" Tags="|self-learning|resource-request|c++|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5879" PostTypeId="2" ParentId="5866" CreationDate="2019-08-25T22:53:11.857" Score="1" Body="&lt;p&gt;I sympathize; for example, in my class schedule spreadsheets sometimes I've put thought into abbreviations for the column headers so I'm not wasting unnecessary space on the sheet/page. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do assign projects out of our textbook, and so I try to echo whatever term the book uses; this may vary from course to course for me. Some common terms might be:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Exercise (Ex.)&lt;/li&gt;&#xA;&lt;li&gt;Homework (Hwk.)&lt;/li&gt;&#xA;&lt;li&gt;Programming Challenge (PC)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2019-08-25T22:53:11.857" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5880" PostTypeId="1" AcceptedAnswerId="5886" CreationDate="2019-08-26T06:23:01.863" Score="4" ViewCount="697" Body="&lt;p&gt;I want to practice my problem-solving skills that involve the usage of a tree data structure (e.g. &lt;code&gt;Binary Search Tree&lt;/code&gt;, &lt;code&gt;Heap&lt;/code&gt;, &lt;code&gt;Fenwick Tree&lt;/code&gt;, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem should make me search for the right tree data structure and apply it in solving the problem, but not manipulate the tree itself. Hence, problems like the lowest common ancestor, inorder traversal, etc. do not count.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One nice problem that I know is as follows:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;N pixels in a row are originally coloured as white:&#xA;WWWWWWWWWWWWWWW // N=15 in this case&#xA;&#xA;We now keep recolouring all pixels between position i and position j &#xA;with a different colour c for T times:&#xA;&#xA;T = 1: WWWBBBBBWWWWWWW // i = 4, j = 8, c = B&#xA;T = 2: WWWBBGGGGWWWWWW // i = 6, j = 9, c = G&#xA;T = 3: YYYBBGGGGWWWWWW // i = 1, j = 3, c = Y&#xA;T = 4: YBBBBBGGGWWWWWW // i = 2, j = 5, c = B&#xA;...&#xA;&#xA;At the end, you are asked to print the colour of each pixel.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since N and T can be large, one requires a tree data structure to efficiently update the colour pattern of the pixels. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Can anyone suggest good programming problems of this nature?&lt;/p&gt;&#xA;" OwnerUserId="8356" LastEditorUserId="8356" LastEditDate="2019-09-19T15:29:39.073" LastActivityDate="2020-07-12T12:00:52.807" Title="What are competitive programming problems that require a tree data structure to solve them?" Tags="|algorithms|data-structure|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5881" PostTypeId="1" CreationDate="2019-08-26T18:50:01.577" Score="2" ViewCount="156" Body="&lt;p&gt;My colleague and I are considering bringing Greenfoot into our AP classes this year, and while Interfaces have been removed from the AP subset, we will continue to teach them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Greenfoot itself seems to either not have, or to have thoroughly hidden, interfaces.  However, we are not interested in reinventing the wheel if it's not necessary.  Are there good lab activities that heavily feature interfaces already developed for Greenfoot?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, are there any strong lab ideas for Greenfoot and interfaces that we could run with?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-08-27T00:09:49.997" Title="Interfaces and Greenfoot" Tags="|ap-computer-science-a|interface|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="5882" PostTypeId="2" ParentId="5881" CreationDate="2019-08-26T19:24:15.963" Score="2" Body="&lt;p&gt;Yes, Greenfoot certainly has interfaces. I doubt that they would take them out. The people who built greenfoot are likely as appalled as I am about the College Board action on interfaces. But there is no UI element that specifically adds a new interface to a project. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But they may not appear in the same place that most classes do in the sidebar. Look at the bottom of the list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the menu option to create a &quot;New Class&quot;. Edit the resulting template to change it to a legal interface. Compile and save. This was with v 3.5. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can do the same with other &quot;class-like&quot; things such as enumerations. The compiler hiding behind greenfoot is &lt;em&gt;all&lt;/em&gt; of Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also go to &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://greenroom.greenfoot.org&lt;/a&gt; and ask such questions there (after joining). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, many of the labs that you find on both the greenfoot and greenroom sites will use interfaces. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-08-27T00:09:49.997" LastActivityDate="2019-08-27T00:09:49.997" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5883" PostTypeId="2" ParentId="5881" CreationDate="2019-08-26T22:07:18.013" Score="2" Body="&lt;p&gt;One huge advantage to using Greenfoot is the visualization and interactive nature of the application. Using and demonstrating interfaces will take some work though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Anything&lt;/strong&gt; that gets added to the world will be displayed and interacted with as it's &lt;em&gt;actual type&lt;/em&gt; via the context menu. This can be confusing as students will be able to execute (via the context menu) all methods that are in its hierarchy: Object, Actor, ASubClass, etc. Even if the &lt;em&gt;declared type&lt;/em&gt; is an interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, when working programmatically the coder will be restricted to the methods defined by the &lt;em&gt;declared type&lt;/em&gt; (&lt;em&gt;the interface&lt;/em&gt;). This is very useful and worth demonstrating via code completion (ctrl+.) and compiler errors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using interfaces add clarity to the design and responsibility of classes in an application. This is a great lesson for students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a Greenfoot application most visible objects are Actors. In many applications programmers are making &lt;strong&gt;use&lt;/strong&gt; of the World/Actor mechanism (by subclassing), yet these classes often have their own unique behavior and semantics that are separate and distinct from the Actor class and are only Actors to leverage the Greenfoot World/Actor architecture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will see these issues clearly if you create any scaffolded exercises or simulations of your own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use &lt;a href=&quot;https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&quot; rel=&quot;nofollow noreferrer&quot;&gt;Conway's Game Of Life&lt;/a&gt; as a project for a few labs. The logic behind the simulation is very easy to understand and implement, and this allows the student to focus on design issues that interfaces help with. A cell can really only live or die; is represented by an Actor subclass; but should never be able to behave as one, ie move or rotate. &lt;a href=&quot;https://drive.google.com/open?id=1Kl1TVb08HbQytifyT9jaQ1CoQuBCV8Ij&quot; rel=&quot;nofollow noreferrer&quot;&gt;See Demo&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://csis.pace.edu/~bergin/KarelJava2ed/greenfoot.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karel J Robot&lt;/a&gt; is another good simulator that can used for labs (also available to educators via &lt;a href=&quot;https://greenroom.greenfoot.org/door&quot; rel=&quot;nofollow noreferrer&quot;&gt;GreenRoom&lt;/a&gt;), as can any tile-based game or application. The next demo is the introduction to interfaces lesson from the text book &lt;em&gt;A Gentle Introduction to Object Oriented Programming with Karel J Robot&lt;/em&gt; where each contractor implements a Worker interface to build a part of the house. &lt;a href=&quot;https://drive.google.com/open?id=1SerQ_OAesFIeU9YKEFZE97BDL6HXV8zn&quot; rel=&quot;nofollow noreferrer&quot;&gt;See Demo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3840" LastEditorUserId="3840" LastEditDate="2019-08-26T22:20:48.943" LastActivityDate="2019-08-26T22:20:48.943" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5884" PostTypeId="2" ParentId="5864" CreationDate="2019-08-27T06:08:39.140" Score="0" Body="&lt;p&gt;Sadly your friend sounds to be a product of current bad programming practices he probably also thinks that program is just about learning a language . so give your friend this problem to solve:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;old fashioned phone keypad had letters to translate into numbers such that you have phone numbers like 1 800 call me so write a function that translates any letter into its corresponding number on the phone keypad without using any if statement (or switch,etc). ..&lt;/p&gt;&#xA;&#xA;&lt;p&gt;this is what real programming is about. using too many if statements is typically considered bad programming.  sadly proper software engineering principles are being missed these days in order to turn programming into programming for dummies but many corporations still know the difference&lt;/p&gt;&#xA;" OwnerUserId="3417" LastActivityDate="2019-08-27T06:08:39.140" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5885" PostTypeId="2" ParentId="5864" CreationDate="2019-08-27T13:32:18.043" Score="1" Body="&lt;p&gt;Here's one that is recent (and in the news): Machine Learning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alpha Zero is a program developed to &lt;strong&gt;learn&lt;/strong&gt; how to play chess based on only the rules of the game.  It &lt;em&gt;learns&lt;/em&gt; by playing games against itself and evaluating the positions and results of the game.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is revolutionary and will change the face of how we interact with computer systems.  Professional chess players are now learning from the games that Alpha Zero has played.&lt;/p&gt;&#xA;" OwnerUserId="3840" LastActivityDate="2019-08-27T13:32:18.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5886" PostTypeId="2" ParentId="5880" CreationDate="2019-08-27T19:26:30.797" Score="2" Body="&lt;p&gt;One nice problem that I found is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Given n segments in 2D Euclidean space, find two segments that intersect.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Seek for &lt;span class=&quot;math-container&quot;&gt;$O(n \cdot log(n))$&lt;/span&gt; solution.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cp-algorithms.com/geometry/intersecting_segments.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cp-algorithms.com/geometry/intersecting_segments.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8356" LastActivityDate="2019-08-27T19:26:30.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5887" PostTypeId="2" ParentId="5880" CreationDate="2019-08-28T10:30:44.487" Score="3" Body="&lt;p&gt;How about Huffman encodings?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Given a text that uses an alphabet of &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; unique characters, how can we uniquely encode the alphabet so that the text uses the smallest amount of bits?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;More formally for Huffman encodings (as formulated by Tardos &amp;amp; Kleinberg in their book &lt;em&gt;Algorithm Design&lt;/em&gt;):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Given an alphabet and a set of frequencies for letters, we would like to produce a prefix code that is as efficient as possible - namely, a prefix code that minimises the average number of bits per letters &lt;span class=&quot;math-container&quot;&gt;$ABL(\gamma) = \sum\limits_{x\in S} f_x|\gamma(x)|$&lt;/span&gt;. We will call such a prefix code optimal.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This has an &lt;span class=&quot;math-container&quot;&gt;$O(n \log n)$&lt;/span&gt; solution.&lt;/p&gt;&#xA;" OwnerUserId="8184" LastEditorUserId="8184" LastEditDate="2019-08-28T13:40:41.900" LastActivityDate="2019-08-28T13:40:41.900" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5890" PostTypeId="2" ParentId="5878" CreationDate="2019-08-30T21:14:05.083" Score="3" Body="&lt;p&gt;For &lt;code&gt;make&lt;/code&gt; consider &lt;a href=&quot;https://www.oreilly.com/openbook/make3/book/index.csp&quot; rel=&quot;nofollow noreferrer&quot;&gt;O'Reilly book&lt;/a&gt;. It is a perfect intro. Honest to goodness.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&quot;http://shop.oreilly.com/product/9780596100278.do&quot; rel=&quot;nofollow noreferrer&quot;&gt;GDB&lt;/a&gt; one is not so much an educational tool, it is a reference, but I doubt you'd find anything which would teach you how to use GDB any better. The GDB learning curve is short and easy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also doubt that there is a resource dedicated to &lt;code&gt;gcc&lt;/code&gt; any better than the online documentation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the C++ language I strongly recommend the foundational classics by Stroustrup (try &lt;a href=&quot;http://www.stroustrup.com/programming.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Principles and Practice&lt;/a&gt; for starters and see how it goes).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: your request seems to be well aligned with &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/013937681X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;another classic&lt;/a&gt;. Never mind it was published in 1984. Still very much applicable.&lt;/p&gt;&#xA;" OwnerUserId="182" LastEditorUserId="182" LastEditDate="2019-08-30T21:25:04.250" LastActivityDate="2019-08-30T21:25:04.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5892" PostTypeId="1" AcceptedAnswerId="5894" CreationDate="2019-08-31T20:24:43.803" Score="0" ViewCount="108" Body="&lt;p&gt;Cloud Foundry &lt;a href=&quot;https://basics-workshop.cfapps.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;open sourced their curriculum&lt;/a&gt; to train students on how to use it. Are there any other open source courses out there or organizations who collects training that is open sourced? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To clarify: I am looking for training for hardware/software that has been open sourced. Not open source software that has training.&lt;/p&gt;&#xA;" OwnerUserId="8374" LastEditorUserId="8374" LastEditDate="2019-08-31T20:40:13.290" LastActivityDate="2019-09-04T09:03:43.960" Title="Open Source Training" Tags="|industry-training|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5894" PostTypeId="2" ParentId="5892" CreationDate="2019-09-02T07:34:43.000" Score="3" Body="&lt;p&gt;First, there is a scientific journal that may include publications of such material that are what you are looking for: &lt;a href=&quot;http://jose.theoj.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Journal of Open Source Education&lt;/a&gt;, &quot;An educator friendly journal for publishing computational learning modules and educational software.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, but I am not sure this is completely relevant to your question, there are the open source computational lesson from &lt;a href=&quot;https://carpentries.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Carpentries&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Software Carpentry has &lt;a href=&quot;http://software-carpentry.org/lessons/&quot; rel=&quot;nofollow noreferrer&quot;&gt;lessons&lt;/a&gt; on the unix shell, version control (git and mercurial), programming in Python or R, R for Reproducible Scientific Analysis and more&lt;/li&gt;&#xA;&lt;li&gt;Data Carpentry has &lt;a href=&quot;https://datacarpentry.org/lessons/&quot; rel=&quot;nofollow noreferrer&quot;&gt;lessons&lt;/a&gt; more tailored to a research domain, on data analysis, but includes programming as well&lt;/li&gt;&#xA;&lt;li&gt;not yet part of The Carpentries, but under development is &lt;a href=&quot;https://hpc-carpentry.github.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;HPC carpentry lessons&lt;/a&gt;: shell, Python, Chapel, Snakemake&lt;/li&gt;&#xA;&lt;li&gt;there is also Library Carpentry, but their &lt;a href=&quot;https://librarycarpentry.org/lessons/&quot; rel=&quot;nofollow noreferrer&quot;&gt;lessons&lt;/a&gt; are more tailored to librarians&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All these lessons are CC-BY.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimer: I am on The Carpentries Executive Council&lt;/p&gt;&#xA;" OwnerUserId="8315" LastEditorUserId="8315" LastEditDate="2019-09-02T20:27:28.967" LastActivityDate="2019-09-02T20:27:28.967" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5895" PostTypeId="2" ParentId="5892" CreationDate="2019-09-04T09:03:43.960" Score="0" Body="&lt;p&gt;Disclaimer: advertising(?) my own material here! Not sure if it is okay to do this, if not please let me know and I will remove this post!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have also opened all the materials of a course I teach on Algorithms &amp;amp; Data structures here: &lt;a href=&quot;https://gitlab.ewi.tudelft.nl/ads-maths/course-material&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gitlab.ewi.tudelft.nl/ads-maths/course-material&lt;/a&gt;&#xA;It's an introduction to complexity analysis of algorithms, basic data structures (lists, hashsets/maps, trees, and graphs), and some algorithms that operate on graphs (like traversals and shortest path algorithms).&lt;/p&gt;&#xA;" OwnerUserId="8184" LastActivityDate="2019-09-04T09:03:43.960" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5896" PostTypeId="2" ParentId="5880" CreationDate="2019-09-04T11:49:36.383" Score="1" Body="&lt;p&gt;Another one is the following job scheduling problem:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;N jobs are arriving with priorities:&#xA;&#xA;priority_1  arrival_time_1  execution_time_1&#xA;priority_2  arrival_time_2  execution_time_2&#xA;...&#xA;priority_N  arrival_time_N  execution_time_N&#xA;&#xA;The arriving jobs are queued. When the CPU can process the next job, he will pick&#xA;the one that has already arrived and has the highest priority in the queue. The&#xA;job will then be processed for a time equal to its execution time.&#xA;&#xA;Determine the maximum time some job will have to wait in the queue until being&#xA;processed.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An efficient implementation of the queue will give &lt;span class=&quot;math-container&quot;&gt;$O(N \cdot log(N))$&lt;/span&gt; solution.&lt;/p&gt;&#xA;" OwnerUserId="8356" LastActivityDate="2019-09-04T11:49:36.383" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5897" PostTypeId="2" ParentId="5724" CreationDate="2019-09-05T22:55:00.440" Score="2" Body="&lt;h1&gt;Game Maker&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Game Maker is how I developed most of my programming skills when I was that age.  It has a very user-friendly UI that has pre-generated scripts for new users.  What's great about it is that the premade scripts are made of real code that they can dive into when they get their feet wet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First you start by making a bullseye bounce around the room by giving it some simple premade instructions (When this thing is spawned, it moves in a random direction.  When it hits the top side of the screen, reverse its vertical direction, etc).  Then you add some interaction, like causing an action to occur when you click on it (makes a sound effect, increases point by +1, destroy the object, create new object). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once they get the hang of it, make a brickout game.  Teach them how to make powerups and new types of bricks.  Teach them the value of planning for any contingency by having them test their own games.  My first real, enjoyable game I made, for myself, was a Brickout game that slightly randomized the direction of the ball each time it hit the wall or paddle, took in consideration the direction of the paddle when a ball hit it so you had some control, had 5 or so powerups, 2 switch bricks that turned certain bricks solid or non-solid, and so on.  If I had free time, I was perfecting my game, trying to tighten on that one boundaries bug I found when I collected too many speed+ penalties that caused the ball to move so fast the outer bounds check didn't have time to process in a step, or work on that new idea I came up with to have a paddle on both sides of the screen for harder levels.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Game Maker is not limited in the slightest, as it's been used to make critically acclaimed games like Hyper Light Drifter, Undertale, Nidhogg, Iji, and Risk of Rain.  Your students may recognize some of these.  I've personally enjoyed all of them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nor is Game Maker overly complex.  A simple understanding of loops, events, collisions and hit-boxes are the most unintuitive things a student needs to learn.  The rest comes with persistence, which is not unlike any professional programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You will definitely need to be lenient in terms of time and structure for some of the class, as it will feel closer to real programming than a program designed to imitate it (like Code Combat).  The good news is that it's so intuitive that the students who don't need your assistance will quickly advance themselves while you are busy.  Having done a few 3-hour seminars for highschool students, this is exactly what I experienced (helping 1/3 of the class personally while the rest teach themselves).  This does create a quandary for a long-term curriculum for a regular classroom, as you will have to balance keeping education open for those who want to teach themselves while keeping the pace rigid so that those who need assistance don't fall behind.  A good solution to this is by:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide extra credit, up to a cap, for weekly assignments.  So they have a week to make a working concept of a game, and how fun/efficient/complex their solution is determines their grade/extra credit.  &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make each weekly assignment be different in its goals, with a strict to-do list for each day.  Week 3, Day 1, create a simple AI for a moving creature.  Week 3, Day 2, modify the AI to have some interactive functions (when player gets within X Pixels, activate Attack mode).  Have a prebuilt version made for each day and go over the mechanics from the previous day, maybe even using students' examples of problems and successes.  This allows everyone to see a working foundation that you can use to show specific mechanics, while also allowing them to make something new without them getting stuck with their personal projects.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="8386" LastEditorUserId="8386" LastEditDate="2019-09-10T15:32:21.617" LastActivityDate="2019-09-10T15:32:21.617" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5899" PostTypeId="2" ParentId="5878" CreationDate="2019-09-06T22:00:00.557" Score="2" Body="&lt;p&gt;This answer is based on the assumption that you are a competent programmer, but want to improve your C++ and learn how to design and write larger scale programs. I find the best way to start is to imitate something existing. This means reading code. Another tool you didn't mention, but which will be part of a project, is for source code control (likely &lt;code&gt;git&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a learning tool for understanding C++ development I would suggest that you find an open source c++ project on a topic of some interest to you. You don't have to contribute to the project, but simply use it as a guide on how large scale projects are structured.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Down load the source per the instructions and practice &quot;building&quot; the project. Now you are ready to study the structure of the project. It is likely made up of many files, distributed over a number of directories. Each logical piece may have a &lt;code&gt;Makefile&lt;/code&gt; associated with it controlled by higher level &lt;code&gt;Makefiles&lt;/code&gt;. &#xA;Begin by examining the directory and file structure and understanding how it was decomposed into pieces. You don't have to understand every piece, but rather get a feel for the overall structure. Of course this is only the structure the authors came to use and may be different for other projects. Things to notice are whether the structure places headers and source in the same or different directories and whether the .o are in separate directories. Are .o files linked into libraries or used directly? Look for the &lt;code&gt;Makefiles&lt;/code&gt; and study how they are structured to build things based on the actual structure. You many find that the project may be built in different ways (e.g. debuggable or optimized, etc). Study how those choices are reflected in the &lt;code&gt;Makefiles.&lt;/code&gt; You will likely be doing a lot of reading of manuals for Make and reading answers in stackoverflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Projects will likely contain resources for testing a build. Study the methodologies used and how they are incorporated into the project. They are also likely to contain the means to distribute a &quot;new&quot; version, either as source or as a binary. Again, study the options and try to understand the processes involved.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are looking for advanced C++, you could look at the &lt;code&gt;Boost&lt;/code&gt; sources and understand what they did in building various C++ libraries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As you begin to understand projects, take ideas and apply them to something you want to work on. Begin small and add ideas as you learn. Study other projects in the same way to become familiar with other arrangements. You goal is to learn what techniques to employ in various situations so that you can choose what is appropriate for your work.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2019-09-06T22:00:00.557" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5900" PostTypeId="2" ParentId="5826" CreationDate="2019-09-09T23:59:54.230" Score="1" Body="&lt;p&gt;MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm.  You keep splitting the collection in half until it is in trivial-to-sort pieces.  This splitting reduces sorting from O(n^2) to O(nlog(n)).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second example:  computing integer powers.  if the power is even, square base and integer divide exponent by 2.  If it's odd, do the same and multiply by a factor of the base.  This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.&lt;/p&gt;&#xA;" OwnerUserId="21" LastEditorUserId="21" LastEditDate="2019-09-12T23:46:40.277" LastActivityDate="2019-09-12T23:46:40.277" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5901" PostTypeId="2" ParentId="5110" CreationDate="2019-09-10T06:30:56.427" Score="1" Body="&lt;p&gt;I would use the nursery tale of two goats across a narrow bridge. Once the first goat is on the bridge, the second one needs to wait before getting on the bridge till the first has crossed over, so as to avoid a collision. That is also why road workers use flags also called semaphores to coordinate traffic on lane closures.&lt;/p&gt;&#xA;" OwnerUserId="8398" LastActivityDate="2019-09-10T06:30:56.427" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5902" PostTypeId="2" ParentId="5110" CreationDate="2019-09-10T17:14:42.600" Score="1" Body="&lt;p&gt;I think a case that hasn't been covered yet is the possibility of work being completed twice or work being lost due to a race condition. Here is an example to fill that gap:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You have 2 groups of dogs, the &quot;carriers&quot; and the &quot;pick up-ers&quot;. They are on opposite sides of a field, and in the middle is a small cup, which only one ball can fit on top of. The carriers have a pile of tennis balls, and have been trained to bring the balls to the cup. The pick up-ers have been trained to take a ball out of the cup and bring it back to their side. You are watching this happen and counting the number of balls that have been brought over by counting the dogs-with-balls-in-their-mouths that reach the pick-up-ers side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What happens if two carrier try and put a ball in the cup at the same time? One will fall on the ground, and won't get picked up, causing you to lose that tennis ball. Or what if two pick-up-ers try and grab the same ball and both grab it together? You'll count it as two, since two dogs-with-balls-in-their-mouths crossed the finish line, but actually only one ball has been carried.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-09-10T17:14:42.600" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5903" PostTypeId="1" AcceptedAnswerId="5905" CreationDate="2019-09-11T19:48:28.667" Score="3" ViewCount="181" Body="&lt;p&gt;I'm taking a course on data structures and algorithms and it follows the book Introduction to Algorithms, 3rd Edition (ISBN-10: 9780262033848) by Charles E. Leiserson, Clifford Stein, Ronald Rivest, and Thomas H. Cormen. Judging by the way the first few weeks of class have gone, I will be teaching myself directly from the book with very little lecturing/instruction. Does anyone know of any resources, especially free, online courses that they could recommend to help me get through this class? I am struggling. &lt;/p&gt;&#xA;" OwnerUserId="8405" LastEditorUserId="27" LastEditDate="2019-09-11T21:55:51.507" LastActivityDate="2019-09-13T11:06:53.250" Title="Understanding Introduction to Algorithms, 3rd Edition" Tags="|resource-request|algorithms|data-structure|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5904" PostTypeId="2" ParentId="5903" CreationDate="2019-09-11T20:27:32.057" Score="3" Body="&lt;p&gt;The key to learning this, or much of anything, is reinforcement and feedback. Reinforcement comes from doing exercises and solving problems in a course like this and the book has plenty of mid chapter and end chapter exercises and problems. You can do a lot of these. All of them may be asking too much, but you want to be able to answer any of them. Getting more explanation may help or not, but only if it helps you solve those problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feedback, however, may be the bigger problem. Where you can properly seek it may or may not be a problem. If the rules in your place permit study together then you can work with one or two other students in a study group. Each of you solves some set of problems on your own. Then you meet and discuss your solutions. I'm not suggesting you collaborate on formal assignments as that may be treated as cheating (or not, depending on the prof), but all of the &quot;other&quot; exercises are, to me, fair game for collaboration. Doing them gives the reinforcement. Discussing them gives the feedback. Look for insights from each exercise that go beyond that exercise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In universities such as yours, you often will have access to a TA. That person should also be able (and willing) to give you feedback on what you do. If they are wise and you seek hints from them, you will only get minimal hints, not solutions. Seek the insights, not just the solutions. Go to them for feedback, not hints, primarily. Likewise in a study group. And if your professor doesn't get angry when you spend too much time in their office, then spend a lot of time in their office. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Others may be able to supply online course resources, but I'll warn you that such things may make it harder if they divert you in any way from the main task: reinforcement and feedback. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try to space out your study so that cramming for exams isn't necessary. It will be counterproductive for almost everyone and almost every situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other hints:&#xA;Take notes on index cards. Carry those cards and review them frequently. Carry blank cards so you can make notes as you get insight or have questions that need to be answered later. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sleep and get enough exercise. i.e. rest your mind and energize your body. The overworked mind is inefficient. The insufficiently oxygenated body is also inefficient. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-09-11T20:27:32.057" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5905" PostTypeId="2" ParentId="5903" CreationDate="2019-09-13T01:25:53.990" Score="1" Body="&lt;p&gt;For anyone with a similar question who reads this in the future, I found &lt;a href=&quot;https://www.youtube.com/watch?v=0IAPZzGSbME&amp;amp;list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; very helpful series of YouTube videos concerning algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I liked it because the series covers topics in a similar order to the book. There is no assumption of what you do or don't know, material is covered from the ground up. Each video provides multiple examples of problems.&lt;/p&gt;&#xA;" OwnerUserId="8405" LastEditorUserId="27" LastEditDate="2019-09-13T11:06:53.250" LastActivityDate="2019-09-13T11:06:53.250" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5906" PostTypeId="1" CreationDate="2019-09-13T19:09:27.653" Score="21" ViewCount="4189" Body="&lt;p&gt;I teach as a private tutor and most of my students are prohibited to use techniques and/or language constructs that they haven't been taught!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a really broad variety of stuff that is prohibited like foreach-loops, switch-statements, functions/methods, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What do you think is the benefit of this rule or why do most schools and universities have such a rule?&lt;/p&gt;&#xA;" OwnerUserId="8354" LastEditorUserId="58" LastEditDate="2019-09-13T19:40:59.207" LastActivityDate="2023-11-04T02:39:32.820" Title="What's the benefit of prohibiting the use of techniques/language constructs that have not been taught?" Tags="|programming|project|homework|" AnswerCount="10" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="5907" PostTypeId="2" ParentId="5906" CreationDate="2019-09-13T19:35:18.107" Score="38" Body="&lt;p&gt;Rules like this are generally instituted because the teacher is attempting to teach a concept made moot by one of these constructs. For example, as a teacher, if you're teaching bitwise operators and ask students to implement absolute value, it simply makes no sense to permit the students to use whatever library function does absolute value. You're teaching bitwise operators, and the fact that they know of the library function doesn't help them learn bitwise operators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe that because you're asking here, the reason for the prohibition isn't as obvious as in my example, but my guess (without knowing the specifics of the situation) is that the prohibited constructs are not what are being taught so, for that course, the students knowledge of a more advanced concept is irrelevant to the subject matter being taught.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-09-13T19:35:18.107" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5908" PostTypeId="2" ParentId="5906" CreationDate="2019-09-13T20:35:11.110" Score="11" Body="&lt;p&gt;I think that the &lt;a href=&quot;https://cseducators.stackexchange.com/a/5907/1293&quot;&gt;answer of thesecretmaster&lt;/a&gt; is correct but let me add a bit of advice to an instructor who would do this. Just as you, the OP, wonder yourself, the rule doesn't seem to make a lot of sense and it won't make sense to students either. It may cause resentment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if an instructor wants to use a rule like this then, I think that a general rule against using things not yet taught is foolish. However, you can achieve the same result by carefully stating the problem you want solved. So, for example, following thesecretmaster, instead of asking for the students to compute the absolute value ask them to compute the absolute value using only the bitwise operators. In other words, put the specific restriction into the question itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This brings up an important teaching and learning technique called &quot;creativity under constraint&quot;. Some wood working artists, for example, use only hand tools, forgoing power tools. Furniture makers I've known do this. The restricted set of tools forces them to make better use of the tools that the &lt;em&gt;do&lt;/em&gt; use, becoming more skilled in the process. But, to impose it on someone else requires that you make it clear why it is a good idea to do this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've discussed Creativity Under Constraint here in the past in other contexts. See &lt;a href=&quot;https://cseducators.stackexchange.com/a/1111/1293&quot;&gt;this post&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/a/2883/1293&quot;&gt;this other one&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-09-14T20:26:57.330" LastActivityDate="2019-09-14T20:26:57.330" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5909" PostTypeId="2" ParentId="5906" CreationDate="2019-09-13T23:00:05.613" Score="24" Body="&lt;p&gt;Where it stems from is, of course, because the &lt;em&gt;lab&lt;/em&gt; is not the thing that the instructors want solved. After all, the posed lab problem is not unsolved, and your solution will only be unique (if at all) in some surface way.  This is the source of the feeling that people have that the restrictions are unreasonable: they feel like &lt;em&gt;solving the lab&lt;/em&gt; is somehow the purpose of the assignment, and therefore any high quality solution is to be praised.  But, of course, that's not the point at all.&lt;/p&gt;&#xA;&lt;p&gt;So if solving the problem isn't the deeper purpose of a lab, then what is?  Typically, we are teaching an algorithm, a language feature, a data structure, or some other mental model of how something works.  The lab is conjured as something that lends itself to that problem, and that is the goal of the instruction.  I want to engender mastery of linked lists, or stack management, or two-dimensional arrays, or memory management, or... whatever the focus is.&lt;/p&gt;&#xA;&lt;p&gt;The lab problem itself is entirely secondary, even if it does not in any way feel like this to the student.  The problem posed to students is simply meant to provide a rich environment to play around with the learning target, and to gain some measure of experience wrestling with it.&lt;/p&gt;&#xA;&lt;p&gt;The problem that we run into, then, is that there is no problem that cannot be solved in many ways.  I can search as hard as I might for a problem that would be much, much harder to solve in a manner perpendicular to the purpose of the lab, and sometimes I will have some success.  But sometimes I will not, because sometimes &lt;em&gt;no such problem exists&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There exists no problem that can be solved with a linked list that cannot also be solved with an arraylist.  I could provide starter code to try to force my approach, but that simultaneously increases the difficulty of creating the lab while decreasing the thought that must go into solving it.&lt;/p&gt;&#xA;&lt;p&gt;A blanked ban, such as &amp;quot;you may use no bang operators in your Racket lab&amp;quot; is an imperfect solution, but all of the solutions are imperfect, and sometimes a ban feels like the least of the evils.&lt;/p&gt;&#xA;&lt;p&gt;This is not a blanket defense; such bans can be careless, or needless, or clumsily done.  I try hard to avoid them in my own instruction, but I don't always succeed.  If it seems unfair to restrict my students' approach, it is also unfair to my students if they don't delve far enough into the course material because they originally thought of a different solution, and they just stuck with it.  That keeps them on their own familiar territory and cheats them of the chance to learn the material in the course, which they may well need in their next course, or later on in their life.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-06-29T14:16:25.600" LastActivityDate="2023-06-29T14:16:25.600" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5910" PostTypeId="1" CreationDate="2019-09-14T13:57:09.657" Score="1" ViewCount="159" Body="&lt;p&gt;I'm trying to create a programming competition with personalized challenges for my class, using Hackerrank.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing is: I need to show only the minimum relevant code to solve the challenge, and leave out any extra code needed to run the test cases, since this will just be confusing for beginners trying to learn programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created an easy challenge where participants should write a C++ function to determine if a given year is a leap year or not. I created the challenge and some test cases. But when I preview the challenge I get a template like this showing up:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;map&amp;gt;&#xA;#include &amp;lt;set&amp;gt;&#xA;#include &amp;lt;list&amp;gt;&#xA;#include &amp;lt;cmath&amp;gt;&#xA;#include &amp;lt;ctime&amp;gt;&#xA;#include &amp;lt;deque&amp;gt;&#xA;#include &amp;lt;queue&amp;gt;&#xA;#include &amp;lt;stack&amp;gt;&#xA;#include &amp;lt;string&amp;gt;&#xA;#include &amp;lt;bitset&amp;gt;&#xA;#include &amp;lt;cstdio&amp;gt;&#xA;#include &amp;lt;limits&amp;gt;&#xA;#include &amp;lt;vector&amp;gt;&#xA;#include &amp;lt;climits&amp;gt;&#xA;#include &amp;lt;cstring&amp;gt;&#xA;#include &amp;lt;cstdlib&amp;gt;&#xA;#include &amp;lt;fstream&amp;gt;&#xA;#include &amp;lt;numeric&amp;gt;&#xA;#include &amp;lt;sstream&amp;gt;&#xA;#include &amp;lt;iostream&amp;gt;&#xA;#include &amp;lt;algorithm&amp;gt;&#xA;#include &amp;lt;unordered_map&amp;gt;&#xA;&#xA;using namespace std;&#xA;int main() {&#xA;    /* Enter your code here. Read input from STDIN. Print output to STDOUT */&#xA;    return 0;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;First problem is: it's importing too many additional headers and stuff that won't be used here. And also, it would be better to show just the function signature, so I created a stub using the language they provide for it:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function(boolean, leapyear, integer x #ADD YOUR CODE HERE)&#xA;integer(x)&#xA;invoke(boolean, result, leapyear, x)&#xA;print(boolean, result)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;When I save it I can see in the &lt;strong&gt;Body&lt;/strong&gt; section the function signature I want:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/tOOR4.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/tOOR4.png&quot; alt=&quot;code stub&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But now when I preview it, it's showing me all that &quot;head&quot; and &quot;tail&quot; information, which I don't know how to hide:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;bits/stdc++.h&amp;gt;&#xA;&#xA;using namespace std;&#xA;&#xA;string ltrim(const string &amp;amp;);&#xA;string rtrim(const string &amp;amp;);&#xA;&#xA;/*&#xA; * Complete the 'leapyear' function below.&#xA; *&#xA; * The function is expected to return a BOOLEAN.&#xA; * The function accepts INTEGER x as parameter.&#xA; */&#xA;&#xA;bool leapyear(int x) {&#xA;&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    ofstream fout(getenv(&quot;OUTPUT_PATH&quot;));&#xA;&#xA;    string x_temp;&#xA;    getline(cin, x_temp);&#xA;&#xA;    int x = stoi(ltrim(rtrim(x_temp)));&#xA;&#xA;    bool result = leapyear(x);&#xA;&#xA;    fout &amp;lt;&amp;lt; result &amp;lt;&amp;lt; &quot;\n&quot;;&#xA;&#xA;    fout.close();&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;string ltrim(const string &amp;amp;str) {&#xA;    string s(str);&#xA;&#xA;    s.erase(&#xA;        s.begin(),&#xA;        find_if(s.begin(), s.end(), not1(ptr_fun&amp;lt;int, int&amp;gt;(isspace)))&#xA;    );&#xA;&#xA;    return s;&#xA;}&#xA;&#xA;string rtrim(const string &amp;amp;str) {&#xA;    string s(str);&#xA;&#xA;    s.erase(&#xA;        find_if(s.rbegin(), s.rend(), not1(ptr_fun&amp;lt;int, int&amp;gt;(isspace))).base(),&#xA;        s.end()&#xA;    );&#xA;&#xA;    return s;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;So, writing code stubs seem to be the way to go, provided I can hide that &quot;head&quot; and &quot;tail&quot; information.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone know how to do this? or at least how to hide all the #include madness if I use the default template?&lt;/p&gt;&#xA;" OwnerUserId="4062" LastActivityDate="2019-09-14T13:57:09.657" Title="Hackerrank challenges for a programming course: hide code and show only what is relevant?" Tags="|programming|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5911" PostTypeId="2" ParentId="2" CreationDate="2019-09-14T19:47:59.430" Score="2" Body="&lt;p&gt;That seem an  important question.   Here is my input.&#xA;'m using repl.it for a month, created ~60 assignments in 10 classrooms (java,c#).&#xA;(Both basics, and also  recursion, lined-lists and Queues. ) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea of web-based-ide &amp;amp; auto-checking &amp;amp; status-report-to-teacher is &lt;strong&gt;fantastic&lt;/strong&gt; ! &#xA;It gets students very fast to code, and see results, also teacher knows immediately the situation of the class.&#xA;Also some students find it hard to concentrate and listen to me, so they can go do tasks. &#xA;It is very easy to learn to use repl both for teacher and student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teacher can create testbench and that saves a lot of time to students, so they can focus on their tasks, and get better testing to their code. Such testbench can include creating of various  trees/arrays/linked lists , so students can focus on the method they need to write, and get a lot done automatically for them.&#xA;It is easy to student to figure out what teacher wanted in a task, since she can see the testcases ! ( so it saves teacher communication time!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We randomly divided a 30 HS-students-class in half, 15 with me and 15 with another teacher, my class using  repl.it, had progressed &lt;em&gt;much&lt;/em&gt; faster, compared to the others that used traditional ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;**** repl.it  is both great and at the same time, far from great ****&lt;/p&gt;&#xA;&#xA;&lt;p&gt;repl.it opened my eyes, now i want more from it. &#xA;There are details that make the experience  sub-optimal :&#xA;-)  test-cases need to be entered using many gui clicks,  why can't there be &lt;em&gt;one&lt;/em&gt; file,with many lines  input/output (see VPL-Moodle) ?&lt;br&gt;&#xA;-)  Small tasks like renaming an assignment, accessing my solution, publishing, take way too many clicks, and between clicks we need to wait for web. &#xA;-) no source control,  if you by mistake clicked 'delete' for a test case it is gone  forever.Same for changes to source code.&#xA;-)  hard to maintain assignments/classrooms over time, in collaboration with other teachers. &#xA;Guess there should be text files (under wiki/github/jenkins etc.), that contains &lt;em&gt;all&lt;/em&gt; assignment info (question text, start/test-bench code visible to students, testcases inputs and outputs , solution ) ,  that can be put to other teachers review and improve, like an open source or a wiki  project.&#xA;- hard  to maintain common files (teacher utils) common to all assignments  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that there is going to be some serious money in &quot;web-based-ide &amp;amp; auto-checking &amp;amp; status-report-to-teacher&quot;   and would like to see some aggressive competition.&#xA;Currently the only tool i know is repl.it.&lt;/p&gt;&#xA;" OwnerUserId="8419" LastActivityDate="2019-09-14T19:47:59.430" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5912" PostTypeId="2" ParentId="5906" CreationDate="2019-09-15T02:28:18.667" Score="3" Body="&lt;p&gt;In addition to the good reasons given in the other answers: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes students find code on the Internet that they can just copy into the assignment without understanding. In a coding class it seems reasonable to require students to understand the code they submit. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an instructor I would consider telling students that if they use techniques not covered in class they may be required to explain these techniques to the instructor.&lt;/p&gt;&#xA;" OwnerUserId="2492" LastActivityDate="2019-09-15T02:28:18.667" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5913" PostTypeId="2" ParentId="5906" CreationDate="2019-09-15T21:44:44.803" Score="2" Body="&lt;p&gt;Benefit: forces students to stay with and practice required concepts of the unit/exam or subset of the course.&lt;/p&gt;&#xA;" OwnerUserId="8425" LastActivityDate="2019-09-15T21:44:44.803" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5914" PostTypeId="1" AcceptedAnswerId="5918" CreationDate="2019-09-16T06:53:25.353" Score="-1" ViewCount="148" Body="&lt;p&gt;I would like to design or develop program or game to teach non CS-major(engineering students) programming  languages.My question is which one will be effective games or designing program?&#xA;If so any suggestions or programs/games examples will be help!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="8429" LastActivityDate="2019-09-16T17:06:55.110" Title="what would be a best approach to teach programming to non CS major?" Tags="|programming|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5915" PostTypeId="2" ParentId="5906" CreationDate="2019-09-16T08:38:00.707" Score="1" Body="&lt;p&gt;Students need to learn how to deal with strict rules, imposed by their programming environment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In real life, the rules are dictated by the limit of your programming language or processor. Easy example: You cannot use an instruction, that is not implemented in your microprocessor. So you need to stick to the rules of your processor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you now use a common programming language for teaching, you cannot teach every feature of it, so you won't hit any limitation of a language like C++. Still the student needs to be able deal with such limitations. So you for example tell the student &quot;Implement a factorial without using the factorial function in the standard library&quot;, to impose an artificial limitation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This seems silly, as the standard library factorial may be more optimized (e.g. using iteration when your lecture was about recursion or even optimizing on a specific processor), but later in real life, the student will encounter more complicated tasks, that are not covered by any existing library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This requires that he learned how to implement something himself instead of always relying on existing libraries. In the end, someone build the library, when there was no existing library for this function. And this someone may be a former student of you.&lt;/p&gt;&#xA;" OwnerUserId="4631" LastActivityDate="2019-09-16T08:38:00.707" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5916" PostTypeId="2" ParentId="5914" CreationDate="2019-09-16T12:12:50.567" Score="1" Body="&lt;p&gt;In general this would probably vary depending on the audience, both the age and the interests of the potential students. But since you say engineering students I will also assume young adults. This audience has some familiarity with mathematics and other technical subjects most likely. As such they aren't really all that different in background, only in interests, from computer science students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My advice, then, for this group, would be to use any good introduction to programming intended for CS students. You could use any language, I think, but choose one that you are really familiar with. Engineering students will probably need to write programs over their careers, though most likely smaller ones rather than building commercial applications. I would think that modern C++ or Python would be good choices, depending on your own background. Either can be used by engineers in their own professional work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In many such books, the exercises/problems will have a somewhat mathematical flavor, which should fit well with the existing skills of the students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't see how building games would be useful unless you get really deep into how modern graphics and game engines are created. But that sort of thing is far beyond what you can do in an introductory course. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I said &lt;em&gt;modern&lt;/em&gt; C++. If you use that language, don't use a book that requires the student to work through the entire history of C++ from C onwards. Choose one that stresses the recent standards and makes use of modern libraries.  For Python, make sure it is Python-3, not 2. Python-2 is about to become obsolete. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-09-16T12:12:50.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5917" PostTypeId="2" ParentId="5906" CreationDate="2019-09-16T13:03:33.337" Score="1" Body="&lt;p&gt;To give a more detailed example to @thesecretmaster's answer:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sometimes language constructs hide the underlying complexity. That might be beneficial when coding, but counterproductive when teaching. Take these loop examples:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int i=0; i&amp;lt;n; ++i) {&#xA;  // example statement&#xA;  array[i] = 5; &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In many languages, this can be written as a for-each loop (sometimes known under different names), such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;for (int variable : array) {&#xA;  variable = 5;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The second code example makes it way harder to explain the concept of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Loop_invariant&quot; rel=&quot;nofollow noreferrer&quot;&gt;loop invariant&lt;/a&gt;. Questions such as:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;What is the last element, &lt;code&gt;array[n]&lt;/code&gt; or &lt;code&gt;array[n-1]&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;How can you run the loop only for elements after the 3.?&lt;/li&gt;&#xA;&lt;li&gt;How can you proof that the loop terminates?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;become much harder to explain when students simply use the foreach feature.&lt;/p&gt;&#xA;" OwnerUserId="8431" LastActivityDate="2019-09-16T13:03:33.337" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5918" PostTypeId="2" ParentId="5914" CreationDate="2019-09-16T17:06:55.110" Score="2" Body="&lt;p&gt;You should start out by figuring &lt;strong&gt;why&lt;/strong&gt; these students are learning CS.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it because they're interested in game development?&lt;/li&gt;&#xA;&lt;li&gt;Are they doing it for career advancement?&lt;/li&gt;&#xA;&lt;li&gt;Is there extra credit involved? (Is this an independent study?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In other words, what do these students hope to get out of your lesson? What do you hope they get out of it? Why are you both there? What are your motivations? What are the student's motivations?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I'm not requesting that you tell us the answer to these questions. Instead, the answers to those questions should inform the way you teach your lessons.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if your students are all interested in &lt;a href=&quot;https://en.wikipedia.org/wiki/Indie_game_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;indie game development&lt;/a&gt;, then something like Game Maker would be a logical language choice. If they're interested in statistics analysis, Python or R would be logical. If they're interested in &lt;a href=&quot;https://en.wikipedia.org/wiki/Creative_coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;creative coding&lt;/a&gt;, then &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt; or &lt;a href=&quot;https://p5js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;P5.js&lt;/a&gt; would make sense. There are many many approaches, languages, frameworks, and libraries to choose from. What you choose depends on the &lt;strong&gt;why&lt;/strong&gt; of your context. There isn't one single &quot;best&quot; approach.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;My question is which one will be effective games or designing program&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Either one &lt;strong&gt;might&lt;/strong&gt; be effective, depending on your goals.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If so any suggestions or programs/games examples will be help!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This has been discussed many times on this site, so I'd recommend starting with a search. Here are a few places to get started:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4785/2068&quot;&gt;How to teach a person to enjoy programming?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4186/2068&quot;&gt;Programming language for teenagers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2798/2068&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/5874/2068&quot;&gt;Explain to someone that programming isn't just all “if”s and “else”s&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/173/2068&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/19/2068&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2019-09-16T17:06:55.110" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5919" PostTypeId="1" CreationDate="2019-09-17T11:42:24.600" Score="0" ViewCount="47" Body="&lt;p&gt;I wondered what attempts were made to use tag(s) with programming exercises so that anyone can search / find (etc.) exercises just like books in a library.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example (in user story format):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a student in Java, I would like to find exercise on recursion.&lt;/li&gt;&#xA;&lt;li&gt;As a student, I would like to find MCQ exercises for iteration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8306" LastEditorUserId="27" LastEditDate="2019-09-18T03:08:45.227" LastActivityDate="2019-09-18T03:08:45.227" Title="Programming exercise Tagging" Tags="|resource-request|struggling-students|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5920" PostTypeId="2" ParentId="5906" CreationDate="2019-09-17T17:56:15.540" Score="2" Body="&lt;p&gt;There are some great answers and discussion here about reasons why a teacher may forbid certain syntactic constructs for a given assessment. I have an additional perspective on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A student cannot possibly learn the entire language all at once. Not only is there syntax to learn, but also how to put the pieces together into coherent programs. It is a &lt;em&gt;lot&lt;/em&gt; to learn for a novice programmer. So the language must be introduced incrementally, starting with basic constructs and layering more advanced ones on top of them. Whether such constructs really are more &quot;advanced&quot; is informed by the curriculum and pedagogy.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students may have more advanced knowledge. Perhaps they read ahead in the book; maybe they have had prior programming experience; it could be they saw something on Stack Overflow and they understood it. Whatever the reason, some students may have knowledge that others do not. By restricting what constructs can and cannot be used in an assignment, the instructor is &lt;strong&gt;leveling the playing field.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students are barely able to keep up with the syllabus and know only what information has been presented to them. Others may know more. The restrictions are intended to ensure that everyone is playing by the same rules. The instructor has carefully designed the assessments so they are solvable using only the concepts students are expected to have at that point in the curriculum. To some students that may feel like a straightjacket, but they need to keep in mind that most other students won't feel constrained at all because they don't know there is anything else.&lt;/p&gt;&#xA;" OwnerUserId="6704" LastActivityDate="2019-09-17T17:56:15.540" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5921" PostTypeId="2" ParentId="5919" CreationDate="2019-09-17T23:43:53.293" Score="1" Body="&lt;p&gt;There are a lot of reasons this hasn't happened, and probably won't. The first is that the exercise would need to be published somewhere that was effectively searchable. Some instructors will post exercises online, but not all. Many, in fact, want to keep them private so that they can reuse them in the future. Posting them online often leads to bad behavior, such as searching for solutions, rather than actually doing the exercise as intended. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another problem would be the establishment of a consistent set of tags. For a small site such as this one, it can be done, even if imperfectly. For the entire &lt;em&gt;world&lt;/em&gt; wide web it would be a much harder (impossible?) task. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you have done &lt;em&gt;all&lt;/em&gt; of the exercises in your course textbook and yearn for more, you can often find books of exercises on various topics. I think this used to be more common than now, but for some subjects they can be found. I remember Schaum's outline series in the past. The still seem to be in print. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your course instructor can, perhaps, loan you another textbook with even more exercises. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-09-17T23:43:53.293" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5922" PostTypeId="1" CreationDate="2019-09-18T18:57:45.663" Score="3" ViewCount="315" Body="&lt;p&gt;Does it make sense to introduce methods even before objects? What we are attempting to do is to get students out of the &quot;everything in main()&quot; mode as soon as possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suppose one starts out with a simple program to compute the roots of a quadratic equation. One can imagine the &lt;code&gt;main()&lt;/code&gt; method (very early in the course) looking something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;   Scanner src = new Scanner(System.in);&#xA;   System.out.print(&quot;Enter coefficient a&quot;);&#xA;   double a = src.nextDouble();&#xA;   // similar pairs of lines for b and c&#xA;   double rad = Math.sqrt(b*b - 4*a*c);&#xA;   System.out.println(&quot;1st solution is&quot; + (-b + rad)/(2*a));&#xA;   // print second root&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now we want to introduce methods to demonstrate decomposition into methods invoked from &lt;code&gt;main()&lt;/code&gt;t each of which does some parts of the work. One can imagine method signatures like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;    double getCoefficient(String prompt, Scanner src) {...}&#xA;    double computeRad(double a, double b, double c) { }&#xA;    void   printRoot(String label, double a, double b, double rad) {&#xA;            // called twice, once with rad, once with -rad }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If we want to call these methods from &lt;code&gt;main()&lt;/code&gt; the methods must be declared &lt;code&gt;static&lt;/code&gt;. Alternatively one can create an instance of the class and invoke the (non-static) methods via the instance. But, we really haven't discussed objects yet (or at least objects the student writes). Our group is split between the static vs non-static approach. The other split involves passing both objects and primitives to methods as this can get into the discussion of pass-by-reference. However, the latter discussion can be brought up later when revisiting methods in future work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If we go the &lt;code&gt;static&lt;/code&gt; route, then later we must point out that many/most methods are non static. If we go the &lt;code&gt;new X()&lt;/code&gt; route, one ends up talking about constructors, even if we use a default constructor.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where and how do you introduce method in your first programming course? Is the proposed structure too advanced? How might you alter it?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE 1:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I mostly agree with Objects early, but I wanted to do methods even before&#xA;conditionals. I have students&#xA;use Objects before creating their own classes. Thus the many small methods. Yes, it is encapsulated in a class, but I don't need to deal with constructors yet.&#xA;My style of programming was dramatically changed when I took MIT's SICP at HP in the&#xA;1980's.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To flush out my ideas I created the following:&#xA;&lt;a href=&quot;https://www.cs.colostate.edu/~fsieker/QuadEqn.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;QuadEqn&lt;/a&gt;. &#xA;The assignment consists of several parts. Part A is designed to be completed&#xA;before conditionals are introduced. Parts B, C, and D come later, perhaps as&#xA;lab short exercises rather that full blown assignments. I have run this by our&#xA;undergrad TA's but would like to solicit additional feedback as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, thanks&lt;/p&gt;&#xA;&#xA;&lt;p&gt;UPDATE 2:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks for all the valuable feedback! I have not decided on using a methods first approach, but am simply trying it out to see how it would come together.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2019-11-06T20:47:16.303" LastActivityDate="2019-11-07T15:01:20.477" Title="methods early in Java - before objects" Tags="|java|" AnswerCount="7" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5923" PostTypeId="2" ParentId="5922" CreationDate="2019-09-18T19:09:21.297" Score="5" Body="&lt;p&gt;The two general approaches to teaching OO that I've seen are &quot;objects first&quot; and &quot;objects last&quot;.  Objects first takes the notion that, since we are teaching OO, we should start with instances, APIs, method calls, and inheritance.  (See &lt;a href=&quot;https://www.greenfoot.org/door&quot; rel=&quot;noreferrer&quot;&gt;Greenfoot&lt;/a&gt; as an excellent start to an objects-first curriculum if you are interested in exploring this approach.)  Eventually, you start to delve further into the nitty-gritty of the language, adding in arrays, loops, mods, etc, etc, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Objects last follows the historical developments more directly, teaching imperative programming without OO first in order to highlight some of the thought process that went into developing OOP in the first place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are taking an objects-last approach to your course (and it sounds like you are), then methods naturally fall before objects, and need to be included.  Methods were an important development for both code clarity and code reuse.  Though it's true that everything will need to be &lt;code&gt;static&lt;/code&gt; at first, you can either leave this in as a temporary magical incantation, or make note of it as something exciting that will come later, and that about two-thirds of the way through the course, you will flip everything on its head, and those &lt;code&gt;static&lt;/code&gt; markers will largely go away.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-09-18T19:09:21.297" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5924" PostTypeId="2" ParentId="5922" CreationDate="2019-09-18T23:15:05.557" Score="3" Body="&lt;p&gt;In my opinion methods/functions should be introduced really early as they prevent the duplication of code. In general, as least according to my experiences, they seem to be introduced quite late, mostly as a final topic in first grade of engineering classes or at the start of the second grade. The use of &lt;code&gt;static&lt;/code&gt; shouldn't be problematic and can even be useful, if you build on that and point out the differences when introducing objects and instances.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally I would really point out scopes, as you might use the same names for parameters as you have used as variable names in main. That's a topic that is often forgotten, or at least not talked about enough, but would be really important to be understood by all students.&lt;/p&gt;&#xA;" OwnerUserId="8354" LastEditorUserId="8354" LastEditDate="2019-09-19T12:09:38.790" LastActivityDate="2019-09-19T12:09:38.790" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5925" PostTypeId="1" CreationDate="2019-09-19T18:07:14.750" Score="2" ViewCount="104" Body="&lt;p&gt;I teach an intro to programming course which covers mostly the basics (data types, control flows, functions, arrays, pointers, singly linked lists, circular linked lists, doubly linked lists, without any OOP concepts). The course is taught using C++ but the focus is not on C++ but on the core concepts (the language is just there for implementation, so we only cover the very basics of it).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So far we've been using raw pointers to build linked lists. But I was wondering if students would benefit from switching to smart pointers. I know there are many pros to smart pointers, but I also fear students (who are novice to programming) would &quot;get used&quot; to leaving the cleanup to the compiler, as they wouldn't need to worry about dangling pointers or memory leak problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think the benefits of raw pointers are that students acquire good practices (same reason they don't learn about high-level structures like vectors or maps yet, until they go on the next course and start with OOP). Also I think raw pointers could be a more &quot;standard&quot; way to learn linked lists, since the course doesn't focus on C++ but on the programming fundamentals, and the more C++ specific it gets, the harder it might be to transfer these concepts to a different language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for now I've always believed it a good idea to stick to raw pointers, but I don't want to trust my (limited) knowledge on the matter and would like to hear other opinions :)&lt;/p&gt;&#xA;" OwnerUserId="4062" LastActivityDate="2019-09-20T12:14:04.303" Title="Teaching data structures with C++: should I go with smart instead of raw pointers?" Tags="|pointers|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5926" PostTypeId="2" ParentId="5925" CreationDate="2019-09-19T19:05:13.740" Score="2" Body="&lt;p&gt;In my view, C++ isn't a toy. It is a professional language that should be approached in a professional way. With that in mind, the latest versions are a vast improvement in safety over the earlier versions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Bjarne Stroustrup once said something like: In C you can shoot yourself in the foot. In C++ you can blow your leg off. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, use C++:17 or later and use smart pointers. There is no reason to teach students techniques that are considered obsolete. Find a good book that is compatible with that philosophy, not one that uses a &quot;historical&quot; approach. The past was left behind for a reason. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, teach C if you want to teach lower level concepts or Java for higher ones. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that many of us had to take an historical approach to C++ since we started when it was only a preprocessor for C itself. It has come a long way since then and modern developments have made it safer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An anecdote might be instructive. I once spent 24 hours finding an allocation bug in a C++ program. The correction required a single character change in the source. Not very productive. Smart pointers would have made such things much better. I now much prefer languages with good garbage collectors to having to solve the memory management problem again (and again) in every program. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-09-20T12:14:04.303" LastActivityDate="2019-09-20T12:14:04.303" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5927" PostTypeId="2" ParentId="5925" CreationDate="2019-09-19T22:01:51.310" Score="2" Body="&lt;p&gt;Be careful that you don't create a needless gateway topic. Students should have to wrestle with certain primary issues during every lab experience, but there is little reason to make things besides these primary issues any harder than they need to be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus I largely agree with Buffy, though I would add that if you are specifically teaching a lesson about memory management, it would be perfectly reasonable to switch back to raw pointers &lt;em&gt;for the lab associate with that part of the course.&lt;/em&gt; &#xA; After all, at that point, &lt;code&gt;free&lt;/code&gt; is a prime learning target.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see little benefit to simply wrestling with memory when the learning targets actually lie elsewhere, and I would not want to put other key concepts at risk for students who have trouble with this one topic.   If they struggle with pointers, but can still master other topics, then that is a positive.  Students can always circle back later to shore up a single weakness if they are ever in a position to directly manage memory, but I wouldn't want to compound this problem more than is necessary.  And, of course, there is a very good chance that they will never need to directly manage memory, as most modern languages do this for you.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-09-19T22:01:51.310" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5928" PostTypeId="2" ParentId="5922" CreationDate="2019-09-20T10:59:15.770" Score="4" Body="&lt;p&gt;I second Ben. I and csabinho's views above. While there are semantic differences between methods, procedures, functions and subroutines that are paradigm-dependent, at a high level they can all be considered as ways of organising related code into reusable and more manageable chunks. Pretty much all programming paradigms support this, even scripting languages. So I don't think they should tied to objects and only introduced along with objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand your concern around &lt;code&gt;static&lt;/code&gt; and the fact that methods are inherently tied to objects in Java, but I don't think this is problematic, students have to deal with so much &quot;boilerplate&quot; when learning to program in Java I think they're used to just overlooking things until they need to understand them. The fact that most methods are non-&lt;code&gt;static&lt;/code&gt; can be introduced along with objects. There is also the reduced cognitive load advantage of objects being a new concept on its own, without methods also being new (no &lt;code&gt;new&lt;/code&gt; pun intended).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Structuring code into reusable chunks with methods/functions/procedures/subroutines is so fundamental to good software design that I think it should be introduced as early as possible. Otherwise student's learn bad design habits that have to be unlearned/untaught later. It also ends up making life easier for students in the long run. Working on huge main methods is every professional engineer's nightmare, we shouldn't expect students to have to cope with it! &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is anecdotal obviously, but I've seen methods introduced late, when students have been dealing with main methods 100s of lines long for months. There were some visible &quot;a-ha&quot; moments when they realised how much easier it was to work with code structured into methods, and many of them reported how much easier they found it. &lt;code&gt;static&lt;/code&gt; didn't pose any mayor difficulties. &lt;/p&gt;&#xA;" OwnerUserId="6633" LastActivityDate="2019-09-20T10:59:15.770" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5929" PostTypeId="1" CreationDate="2019-09-22T18:39:05.087" Score="0" ViewCount="62" Body="&lt;p&gt;Already last year I encountered the great &lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://worrydream.com/LearnableProgramming/&lt;/a&gt; and it was much needed fresh air (while I was suffocating in my provided &quot;textbooks&quot;: cobbled collections of random things difficult to follow). But for some reason I didn't appreciate it fully. I read it again now and, wow, it's so wonderful that I can't really express how I appreciate this thorough and lucid thought style.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Well my point is now a bit more mundane. The examples in the essay look very real, but I couldn't find any reference to the tool used, I only understood (from different sources) that it's Bret's own creation. I would like to use it directly or as a starting point for further work as it looks so well done and it is a &lt;em&gt;lot&lt;/em&gt; of work. It would without doubt benefit the students infinitely. I would even pay for it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I found choc: &lt;a href=&quot;https://www.newline.co/choc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.newline.co/choc&lt;/a&gt;. But it seems to be partial and missing at least the abstraction of vars and functions (see the essay).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anyway, just to be clear and explicit: thanks a lot to Bret for making what is arguably the best tool for computer science teaching I have ever seen, going &lt;em&gt;really&lt;/em&gt; to the fundamental needs of students.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2019-09-22T18:39:05.087" Title="Software tool as in Bret Victor's demo" Tags="|student-motivation|student-perceptions|lecture-tools|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5930" PostTypeId="1" AcceptedAnswerId="5931" CreationDate="2019-09-23T17:49:44.870" Score="1" ViewCount="202" Body="&lt;p&gt;Somebody wants to develop applications for his cell phone in Java. He does not know programming and he does not know Java. Should he start learning Java on his cell phone or would he better off learning how to program Java on his PC?&lt;/p&gt;&#xA;" OwnerUserId="8449" LastEditorUserId="8354" LastEditDate="2019-09-24T12:13:20.787" LastActivityDate="2019-10-01T18:37:16.967" Title="Learning to program a Cell Phone" Tags="|curriculum-design|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5931" PostTypeId="2" ParentId="5930" CreationDate="2019-09-23T19:06:36.053" Score="3" Body="&lt;p&gt;I don't see any particular reason that using a mobile device API would be any worse than learning Java on a PC. But an environment on a desktop that uses simulation of the mobile might be a good way to work. Note that programming &lt;em&gt;for&lt;/em&gt; the phone is different from programming &lt;em&gt;on&lt;/em&gt; the phone. The latter is probably restricting (small screen, terrible keyboard, ...). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more direct, rather than a more circuitous route to a goal might be good, actually. But if the goal is Java generally, with its wider API, then programming on a phone would be limiting. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, programming on the desktop with emulators may ease the porting problem so that the code runs on more than one phone. The iPhone doesn't support Java, for example, but a desktop environment might, in principle, be able to translate for that device. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But note that I don't do this myself. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-09-23T19:06:36.053" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5932" PostTypeId="1" CreationDate="2019-09-23T20:28:11.543" Score="4" ViewCount="124" Body="&lt;p&gt;I use repl.it,  and one problem i note, is that each new test case has to be added by many gui-web clicks.&#xA;it is both slow and annoying, and makes it harder to :&#xA;1) send to other teacher to review the testcase&#xA;2) store the assignment in github ( for backup/ development/review)&#xA;3) see all tests cases at once&#xA;4) transfer info between sites ( if a better site is found, i want to transfer all the assignments data inc. testcases easily to the better site).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Saw in another SE-CS-educators thread, STEPIK  site and in some other thread VPL for Moodle was suggested. &#xA;How many have used VPL-Moodle for K12 ?   and STEPIK ?    (  grades 10-12) &#xA;Are there any &lt;em&gt;other&lt;/em&gt; autograder sites, that support one-file-that-contains-all-test-cases  ? &lt;/p&gt;&#xA;" OwnerUserId="8419" LastEditorUserId="27" LastEditDate="2019-09-23T23:05:25.963" LastActivityDate="2019-09-27T06:23:35.990" Title="Any auto grading site that supports all-testcases-in-one-file (and/or in github)?" Tags="|resource-request|auto-graders|unit-testing|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5933" PostTypeId="2" ParentId="5930" CreationDate="2019-09-23T23:42:40.063" Score="1" Body="&lt;p&gt;In my opinion learning to develop apps as a first step seems to have a quite steep learning curve. Maybe start with console applications first and get into programming slowly but steadily! Don't try flying to the moon when you don't even have a paper plane!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And of course Buffy mentioned a lot of important points as well.&lt;/p&gt;&#xA;" OwnerUserId="8354" LastActivityDate="2019-09-23T23:42:40.063" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5934" PostTypeId="2" ParentId="5930" CreationDate="2019-09-25T16:27:45.333" Score="4" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Should he start learning Java on his cell phone or would he better off learning how to program Java on his PC?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;These aren't your only options.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMVHO, Java, especially Android, has a pretty steep learning curve. I would recommend starting with something like &lt;a href=&quot;https://processing.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Processing&lt;/a&gt; to learn the fundamentals, and then I would use those fundamentals to transition to core (desktop) Java. When you have a good grasp on that, then I'd move to more advanced topics like mobile development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you've tagged your post with &lt;a href=&quot;/questions/tagged/curriculum-design&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;curriculum-design&amp;#39;&quot; rel=&quot;tag&quot;&gt;curriculum-design&lt;/a&gt;, here's how I would design a curriculum. I would split it up into at least 3 different courses:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Course 1: Intro to Programming. Use Processing to introduce the fundamentals: functions, variables, loops, control flow.&lt;/li&gt;&#xA;&lt;li&gt;Course 2: Advanced Programming. Use Java to introduce OOP, inheritance, data structures, algorithms. (In the US I believe this is the standard AP CS class?)&lt;/li&gt;&#xA;&lt;li&gt;Course 3: Mobile Development. (After course 2 you can branch out into many topics, not just mobile development.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That's my two cents, but I know other people approach it from other directions. For example I know many folks teach web development first. And Google has at least one &lt;a href=&quot;https://appliedcsskills.withgoogle.com/syllabus.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;curriculum&lt;/a&gt; that uses Android to teach the fundamentals.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The question of how to learn the fundamentals of CS has been asked here a few times before, so I'd recommend starting with a search. Here are a few posts to get you started:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4785/2068&quot;&gt;How to teach a person to enjoy programming?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/4186/2068&quot;&gt;Programming language for teenagers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/2798/2068&quot;&gt;Order to Teach Topics in an Intro Programming Class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/5874/2068&quot;&gt;Explain to someone that programming isn't just all “if”s and “else”s&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/173/2068&quot;&gt;Programming languages specifically designed for beginners&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/q/19/2068&quot;&gt;Using Processing as an entry point in an Introductory Course&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;There are many potential paths through computer science education, and I think the best thing you can do is try a few out and see which one works best for you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, like &lt;a href=&quot;https://cseducators.stackexchange.com/a/5931/2068&quot;&gt;Buffy said&lt;/a&gt;, you probably don't want to program &lt;strong&gt;on&lt;/strong&gt; a cell phone. Even if you're programming a mobile app, you're almost always programming on a computer, and then exporting the app to a phone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Shameless self-promotion: I've written a series of tutorials that take you from Processing all the way through core Java and onto web development and Android, available at &lt;a href=&quot;https://happycoding.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;HappyCoding.io&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2019-09-25T16:27:45.333" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5935" PostTypeId="1" AcceptedAnswerId="6010" CreationDate="2019-09-25T20:23:12.060" Score="3" ViewCount="161" Body="&lt;p&gt;I've been recently helping someone with their beginners Python programming course at their university (though I don't think the specific language is particularly important). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At times I'm frustrated, because I seem to be unable to push them to bridge, what seems to me to be, incredibly small leaps in logic. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At one point there was a question that stated &quot;using the solution to Q1, solve Q2, but do it for a range of numbers&quot;.  They were able to do Q1 on their own, they were able to independently understand ranges in python, and how to iterate over them, and create lists with ranges. What they couldn't seem to understand, is that basically copying and pasting the code from Q1 into the for loop would do exactly what they asked. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to present analogous scenarios to give hints, heck tie it to real life (&quot;you know how to make an omelette, what do you need to do to make 10?&quot;).  They seemed to &quot;get&quot; these other things, but when it came to looking at code and trying to apply the same logic, they just straight up had no idea what to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After a long time they were not able to grasp the problem, and I didn't feel comfortable literally just telling them the answer.  They eventually talked to another person who gave them a solution (not what they used) and that helped them finish their own independent solution that was 99% of the way there. After the class after the homework was due, they noted how they essentially &quot;face palmed&quot; after the professor explained the expected solution (basically copy paste Q1, as I described).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think part of the issue is that they have yet to cover functions, which would make it a whole lot easier: abstract away the Q1 part of the question, and thus make it easier for them to make that leap.  On the other hand I fear that I'm too far removed from the point where I had started learning to relate to their learning experiences (I remember when I didn't even understand for loops, so at least I know I had some of the same issues when I was younger).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything I can do in these types of scenarios?&lt;/p&gt;&#xA;" OwnerUserId="3168" LastEditorUserId="27" LastEditDate="2019-10-30T12:20:37.363" LastActivityDate="2019-10-30T12:26:35.493" Title="Teaching past the &quot;symbology&quot; of a language" Tags="|teaching-analogy|struggling-students|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5936" PostTypeId="2" ParentId="5935" CreationDate="2019-09-25T23:50:47.073" Score="2" Body="&lt;p&gt;This is hard to diagnose without much more information, but my first thought is that this student is thinking too concretely. They are thinking about &lt;em&gt;values&lt;/em&gt; and haven't abstracted out the idea that the actual value, 3, doesn't matter, but that &quot;the idea of a value&quot; does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the student has a good understanding of math (say algebra) then a &lt;em&gt;variable&lt;/em&gt; isn't something that varies or can take different values. It is an unknown, but it has a &lt;em&gt;fixed&lt;/em&gt; value. The terminology in programming is the same (variable), but the idea behind it is different. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps you can explore that area to see if that is the case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second idea is that you are perhaps making a somewhat longer jump into iteration than the student is ready for and need to work out a few more simple examples until insight comes. And don't mean cooking eggs. Examples in code, traced out so that the &lt;em&gt;flow&lt;/em&gt; of execution becomes more natural: the sequential nature of the execution. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lots of other possibilities, of course. A complete diagnosis would probably require watching the student in action. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-09-25T23:50:47.073" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5937" PostTypeId="2" ParentId="5932" CreationDate="2019-09-26T10:31:29.360" Score="4" Body="&lt;p&gt;At the TU Delft we've developed &lt;a href=&quot;https://weblab.tudelft.nl/&quot; rel=&quot;nofollow noreferrer&quot;&gt;WebLab&lt;/a&gt;, which is used in various CS related courses. It has support for programming assignments, for which students code their solutions in a web-editor, and run their code against their own tests, and the spec-tests.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Grades are automatically calculated based on the number of succeeding specification tests.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;As a &lt;code&gt;Course Manager&lt;/code&gt;, you specify the &lt;code&gt;spec-tests&lt;/code&gt; by writing JUnit tests in a single file (in case of Java).&lt;/li&gt;&#xA;&lt;li&gt;Students can run the spec-tests, and the UI will only reveal the test score to students, while managers have access to the complete output of the program.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Optionally, the automatically computed grade can be combined with &lt;code&gt;manual grading components&lt;/code&gt; (e.g. a checklist).&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It provides an interface to walk over all submissions. &lt;/li&gt;&#xA;&lt;li&gt;Each &lt;code&gt;Grader&lt;/code&gt; can be assigned their share of the submissions to be graded&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Other types of assignments supported include: &lt;code&gt;Essay questions&lt;/code&gt; (manual grading), &lt;code&gt;Multiple Choice questions&lt;/code&gt; (automatic grading), &lt;code&gt;File Submission questions&lt;/code&gt; (manual grading) and &lt;code&gt;Peer Review questions&lt;/code&gt; (manual grading). For programming assignments it has built-in support for Java, Scala, Python and C, but this can be extended with any language for which you can provide a Docker image that handles input/outputs results in WebLab format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can sign up and enrol for &lt;a href=&quot;https://weblab.tudelft.nl/wl101/demo-assignment-types/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this demo-course&lt;/a&gt; to get an idea of its interface as a student.&#xA;If you're interested, we can set up a demo course for you by &lt;a href=&quot;https://weblab.tudelft.nl/about&quot; rel=&quot;nofollow noreferrer&quot;&gt;submitting a course request&lt;/a&gt; (sign in first).&lt;/p&gt;&#xA;" OwnerUserId="8453" LastEditorUserId="8453" LastEditDate="2019-09-27T06:23:35.990" LastActivityDate="2019-09-27T06:23:35.990" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5938" PostTypeId="2" ParentId="5930" CreationDate="2019-09-27T05:07:24.043" Score="0" Body="&lt;p&gt;I think there is a subtle point missing from the concept of programming. When you stop to think about it, teaching someone to write an app for Android or iOS is not just programming in Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Small steps make long journeys. Writing apps may be the goal but first you would need to have a foundation in Java. Then you can build on that by learning the Android API. In reality, what you are really doing is writing an extension to the android OS. Here is how I see things…&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;APP&quot; EXTENDS &quot;ANDROID&quot;&#xA;      EXTENDS &quot;JAVA&quot;&#xA;      EXTENDS &quot;C&quot;&#xA;      EXTENDS &quot;ASSEMBLY&quot;&#xA;      EXTENDS &quot;MACHINE CODE&quot;&#xA;      EXTENDS &quot;HARDWARE&quot;&#xA;      EXTENDS &quot;HUMAN&quot;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;To learn Java I think it would be easire to start someplace that does not require the odd (to a new person) expanation to take a bunch of steps not related directly to Java in order to learn Java.&lt;/p&gt;&#xA;" OwnerUserId="8457" LastEditorUserId="694" LastEditDate="2019-10-01T18:37:16.967" LastActivityDate="2019-10-01T18:37:16.967" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5939" PostTypeId="2" ParentId="5930" CreationDate="2019-09-27T13:53:05.000" Score="2" Body="&lt;p&gt;I presently teach an app building course at high school.  I did a lot of research as to what platform to use to build the apps.  For Android Android Studio is the big gun.  It uses Java.  AS has a killer learning curve and requires nice computers.  I am not good at Java (I teach Python) and the school has junk for computers.  Keep digging.  I found Thunkable.  Flat learning curve and runs great on junk.  The kids can actually build decent apps for both iPhone and Android.  If your goal is to teach Java then building apps is the hard way to go.  &lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-09-27T13:53:05.000" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5940" PostTypeId="2" ParentId="4104" CreationDate="2019-09-27T18:17:22.090" Score="0" Body="&lt;p&gt;One technical option is repl.it,  it is a web IDE ( supporting all languages), and anyone with a link to a 'repl' can edit and run (or from browser).&lt;br/&gt; &#xA;(i think they support github, not sure).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They also have multi-player option, that few folks can edit the same file simultaneously!&lt;br/&gt; &#xA;( never used multi-player, nor github integration, but used the ide, it is good, yet without built-in SC).&lt;/p&gt;&#xA;" OwnerUserId="8419" LastEditorUserId="204" LastEditDate="2019-09-27T18:56:42.677" LastActivityDate="2019-09-27T18:56:42.677" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5941" PostTypeId="2" ParentId="5878" CreationDate="2019-09-27T19:43:41.727" Score="4" Body="&lt;p&gt;Do it in two steps: There are resources for each part.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start by learning how to compile, link, run code, and launch the debugger, from the command line.&lt;/li&gt;&#xA;&lt;li&gt;Then learn how to write make files.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You should also read &lt;a href=&quot;http://aegis.sourceforge.net/auug97.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Recursive Make Considered Harmful&lt;/a&gt; by Peter Miller. It should direct you away from a lot of common bad practice. When I applied what I learnt from it, to re-right a make file, with the intention to make it simpler, so that it would be easier to add to. It also became twice as fast (but that is not the reason to read this).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="27" LastEditDate="2019-09-28T13:29:41.130" LastActivityDate="2019-09-28T13:29:41.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5943" PostTypeId="1" CreationDate="2019-09-28T18:15:42.687" Score="1" ViewCount="1207" Body="&lt;p&gt;I will teach algorithms for 4 days for some students. It will be their first course in computer science before learning coding with Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My fear is to bore them as I was bored at the university :(&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a fun way to teach algorithms ?&lt;/p&gt;&#xA;" OwnerUserId="8464" LastActivityDate="2019-11-29T03:19:07.397" Title="Fun way to teach algorithms" Tags="|algorithms|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5944" PostTypeId="2" ParentId="5943" CreationDate="2019-09-28T20:02:08.323" Score="3" Body="&lt;p&gt;I think this is hard to do in four days. You can barely touch the surface. I think that the most you can likely do is give them an appreciation for why the study of algorithms is useful and important. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is one general sort of algorithm that is &quot;easy&quot; to carry out before students learn to program: Linear Recursion. There are many such problems. The basic idea is that one student &quot;plays&quot; the base case in the recursion and others &quot;play&quot; the recursive case. A simple example is counting the length of a list. The base case, when asked &quot;how many&quot; replies &quot;one&quot;. The others, when asked &quot;how many&quot; pass the same message to the student in line to their left and if told, say, five, by that student, replies six. The professor lines up the student and asks the first student &quot;how many&quot;. If it happens to go to the base case, the prof gets &quot;one&quot;, but otherwise the message gets passed down and reflected by the &quot;base case&quot; and (after a lot of noise&quot; gets back the length of the list. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A similar thing can be done. I've held &quot;choir practice&quot; with a bunch of students where each student has a script. The overall script is to recite &lt;a href=&quot;https://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;There was an old lady who swallowed a fly&quot;&lt;/a&gt;, which you can find on the net. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've also had success with Matryoshka. How do you &quot;paint&quot; a Matryoshka? You can &quot;apply color&quot; to a given figure before the recursion or after. You can even &quot;apply&quot; color to the bottom on the winding phase and to the top on the unwind. The recursion is either (winding phase) &quot;apply color, pass paint&quot; or (unwinding phase) &quot;pass paint, apply color&quot;. The base case just applies color and returns. This is an important lesson for students, that you can &quot;do work&quot; in a recursion on both the winding and unwinding phase. Some students miss this essential idea. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Another general area that can be explored prior to learning programming is the idea of sorting and what is required to do it. There are a lot of subtleties that are usually glossed over but that can be explored before you even start to program. For example &quot;How do you sort the numbers 1 through 10 numerically&quot;. Answer, you don't. They are  already sorted. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can ask &quot;Why do we want to sort?&quot;. Connecting it to the search problem and a real-world scenario and maybe even binary search. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another subtle issue is the distinction between the size of the multiset (bag) that you are sorted and the size of the set of values from which they are drawn. For example, sorting a list of int or long values can always be done in linear time (linear in the size of the bag, length of the list). This is because the collection of expressible long values is finite. See Radix Sort for example. In general, sorting (mathematical) integer values is harder, since the set of integers is infinite even when the bag to be sorted is finite. Radix sort can be carried out by a group of student &quot;actors&quot;, if you either discuss binary representations, OR, adapt the algorithm of a &lt;a href=&quot;https://en.wikipedia.org/wiki/IBM_card_sorter&quot; rel=&quot;nofollow noreferrer&quot;&gt;mechanical sorting machine&lt;/a&gt; to use human actors. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another fun thing to do with sorting is to try to have a competition for the least efficient sorting algorithm anyone can come up with. I can think of some doozies that are either extremely inefficient in space or in time. I have a completely infeasible sorting algorithm that is linear in time but requires too much space. Other inefficient (in time) algorithms are possible. For example, randomize the list and then check. Repeat until sorted. If you have a truly random number generator this is guaranteed to halt (law of large numbers in probability). There are a lot of possibilities. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In my first reading of the question here, I somehow completely missed the fact that the students didn't know anything about programming (oh my). If they do, then the following might be appropriate, but they would be hard to do otherwise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One &quot;interesting&quot; algorithm is just Huffman Encoding. How do you minimize the number of bits sent to encode a message using an alphabet with a given frequency of use. There are several things that need to be discussed here, including the economics of data transmission. &quot;Less is More&quot;. Then there is the question of the alphabet and its characteristics &lt;em&gt;in use&lt;/em&gt;. See Poe's &lt;em&gt;The Gold Bug&lt;/em&gt; for a discussion that is actually incorrect, but interesting and has the right idea if the wrong numbers. Don't be naive and try to use the distribution of the message itself as the source of statistics on the alphabet. It can't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next you need to discuss tree structures, etc, and the bit encoding of the message, including the need to be able to separate the message into discrete characters, since the encoding doesn't use the same number of bits for each character (the essence of the problem, actually). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note also that even a naive but accurate distribution provides &lt;em&gt;some&lt;/em&gt; improvement. Huffman is optimal for a given distribution. So, discuss optimization, as opposed to satisfaction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now you need to discuss and maybe implement both the encoding and the decoding algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can discuss space time tradeoffs. We trade time (for encoding/decoding) for space (bits sent). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An &quot;overnight&quot; thought experiment for the students: Why can't you use the message itself to determine the distribution? It takes a bit of thought and may be obvious or not. But a long discussion here previously showed why it can't work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even spend a bit of time on the difference between linear scanning of a set of data and searching through a tree that has been previously constructed.  This could get you close to something like binary search to put a &quot;future work&quot; idea in their minds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other similar examples. The key is a problem in which the naive solution (same number of bits per character) can be improved (fewer bits for common characters), then showing how to develop the algorithm to do the improvement. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One problem I find magical is the &lt;a href=&quot;https://cseducators.stackexchange.com/a/4868/1293&quot;&gt;Dutch National Flag&lt;/a&gt; as discussed at the link and the book by Gries. A linear time sorting algorithm for a restricted kind of data. Since DNF only involves an array and a few index variables, it can be done with students as &quot;actors&quot; representing the Red, White, and Blue values. A few other actors (index values) point at the corresponding &quot;slot&quot; in the array to keep track of the algorithm as it progresses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think other algorithms that use an array or list can be handled similarly, but it is probably necessary to stick to linear running time algorithms. That is just because time is limiting and little insight can be gained if the thing is too complex or takes so much time that the details obscure the main points. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-09-29T14:12:48.323" LastActivityDate="2019-09-29T14:12:48.323" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5945" PostTypeId="2" ParentId="93" CreationDate="2019-09-29T00:28:12.630" Score="3" Body="&lt;p&gt;Teaching web programming would be self defeating to the topic. On the other had using examples of parsing “CSS” files or “HTML” files would aid them in learning web development, while maintaining the intended goal of the course. Personally I hate web development as a matter of personal taste. I wish my school offered a “C” programming class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is truly nice to see that there are teachers trying to find ways to tailor their courses to what the students are interested in. Keep up the good work.&lt;/p&gt;&#xA;" OwnerUserId="8457" LastActivityDate="2019-09-29T00:28:12.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5946" PostTypeId="2" ParentId="5943" CreationDate="2019-09-29T02:58:41.390" Score="1" Body="&lt;p&gt;Do I understand correctly that you're teaching kids already that have not yet learned any programming? And that you are trying to teach them algorithms?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would not focus on a programming language at all; they are not ready to implement algorithms yet in actual code.  Instead, I would focus on Computational Thinking.  Let them act out various approaches to solving a problem and turn them into recipes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would look at &lt;a href=&quot;https://cseducators.stackexchange.com/q/2612/27&quot;&gt;ice-breaker games&lt;/a&gt; and at resources for Computational thinking for nice, active learning ideas to get at algorithms without all of the cumbersome programming at the start.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-09-29T02:58:41.390" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5947" PostTypeId="1" CreationDate="2019-09-27T21:27:39.143" Score="1" ViewCount="443" Body="&lt;p&gt;This semester in my university we learned C++ but I feel like I am not as good at programming as I should be, and I am also interested in game development so of course it will be helpful for me in future.&lt;/p&gt;&#xA;&lt;p&gt;So I decided to learn it completely and not like leaving in the middle but I don't know from where should I take a course that can be best for me.... I chose a course from Udemy website (&lt;a href=&quot;https://bit.ly/2nW4ayE&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bit.ly/2nW4ayE&lt;/a&gt;) but I am not sure that I should go with it or should I take another course?&lt;/p&gt;&#xA;&lt;p&gt;After that my main goal is to learn game development. I have zero knowledge in it. But I think I should go with Unreal Engine. I am solo for game development. I also find a course for learning Unreal Engine from Udemy. So should I do Unreal Engine or another engine?&lt;/p&gt;&#xA;&lt;p&gt;And should I learn anything other before starting game development solo, while I learn programming I can have enough time for learning anything other that can be helpful for game development. Would you suggest anything?&lt;/p&gt;&#xA;&lt;p&gt;Please also tell me if is it a good idea to learn C++ and then starting game development.&lt;/p&gt;&#xA;" OwnerUserId="8470" OwnerDisplayName="Erad Ali" LastEditorUserId="1090" LastEditDate="2022-11-12T12:00:58.773" LastActivityDate="2022-12-13T18:51:40.007" Title="Want to be good at programming (C++) and then start learning game development, where should I start?" Tags="|programming|active-learning|c++|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5948" PostTypeId="2" ParentId="5947" CreationDate="2019-09-28T05:00:04.537" Score="5" Body="&lt;p&gt;How do you eat an elephant? One bite at a time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, learn how to properly code in C++.  This can be done by reading &quot;The C++ Programming Language 4th edition&quot; by Bjarne Stroustrup (The creator of C++) and coding at the same time; that is, while you read the book.  The key word here is &quot;properly&quot;, though.  The following is a very accurate quote about C++: &quot;In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg.&quot;  Improper use of the &quot;new&quot; keyword in C++ can lead to big problems. &#xA;This one actually got me, since I had a Java background prior to learning C++.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, learn about game development.  This will involve learning about how to build physics engines and collision detection systems (using spatial data structures).  A little bit of knowledge on vector calculus can go a long way when developing a physics engine.  You will also need to learn computer graphics.  You can buy a book on OpenGL, which is a graphics library that you can use in C++.&lt;/p&gt;&#xA;" OwnerDisplayName="Gary Drocella" LastActivityDate="2019-09-28T20:17:50.230" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5950" PostTypeId="1" CreationDate="2019-10-02T16:05:19.200" Score="0" ViewCount="250" Body="&lt;p&gt;I am now in high school and have to do research. But I am not sure which research question to choose. I would like to talk about programming languages and therefore something within computer science. Can someone give me some examples of research questions where you don't need a lot of prior knowledge? Thank you very much in advance.&lt;/p&gt;&#xA;" OwnerUserId="8476" OwnerDisplayName="Jonge Roge" LastActivityDate="2019-10-11T22:15:35.830" Title="Research question thesis" Tags="|programming|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5951" PostTypeId="2" ParentId="5950" CreationDate="2019-10-02T21:57:34.240" Score="1" Body="&lt;p&gt;Rather than try to give you an answer directly, let me direct you to a web site that is full of ideas, not for research, but for how programming and programmers can affect things. &lt;a href=&quot;http://paulgraham.com/articles.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Paul Graham&lt;/a&gt; is a computer scientist, mostly associated with the Lisp family of languages and has done some very interesting things with Common Lisp. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But his essays are just ideas that are interesting, if nothing else. Reading them is likely to give you ideas as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Poking around in them might give you some ideas. But, you might also want to think about not making your research too narrow. Not just programming or programming languages, or even just CS, but how it all relates to the wider world and the other things you've been studying. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-02T21:57:34.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5952" PostTypeId="2" ParentId="5947" CreationDate="2019-10-03T17:52:37.390" Score="-2" Body="&lt;p&gt;C++ may be a bit difficult for a first exposure of programming. I suggest starting with a java course, which is traditionally used as an entry-level programming language. Additionally, you could sign up for a web dev class that includes HTML, CSS3, and JavaScript. HTML is simple to learn and can help you become familiar with the world of coding.&lt;/p&gt;&#xA;" OwnerUserId="8481" LastActivityDate="2019-10-03T17:52:37.390" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5953" PostTypeId="2" ParentId="5947" CreationDate="2019-10-05T15:03:59.450" Score="1" Body="&lt;p&gt;For a gaming novice I would suggest Unity instead of Unreal.  Unity has a lot more learning resources online.  Unity uses C# which is Microsoft's version of Java.  Unity and Unreal are comparable, each has its pluses and minuses.  An excellent place to start with Unity is at learntocreategames.com.  You can actually communicate with the author.  Prices are very affordable.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-10-05T15:03:59.450" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5954" PostTypeId="1" CreationDate="2019-10-06T03:21:56.127" Score="0" ViewCount="85" Body="&lt;p&gt;The course should be discussed in c language. &#xA;I am presently learning basic computer programming through a book and while doing the questions from the book from a chapter say array, I found out most of the questions are based on algorithm, so I want to study all major algorithms before attempting these computer&lt;/p&gt;&#xA;" OwnerUserId="8916" LastEditorUserId="8916" LastEditDate="2019-10-08T05:32:05.900" LastActivityDate="2019-10-08T05:32:05.900" Title="Is there any series of videos in which all the main algorithms are discussed without going into things like time complexity and space complexity" Tags="|programming|algorithms|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5956" PostTypeId="2" ParentId="5954" CreationDate="2019-10-06T17:48:56.253" Score="0" Body="&lt;p&gt;I would not start with &lt;code&gt;C&lt;/code&gt; as your first language, though it is a 700% (May be more) better choice than &lt;code&gt;C++&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A good series is Structure and Interpretation of Computer Programs -- MIT Press. There is a &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0262510871&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;book&lt;/a&gt; and a series of &lt;a href=&quot;https://www.youtube.com/watch?v=2Op3QLzMgSY&quot; rel=&quot;nofollow noreferrer&quot;&gt;videos&lt;/a&gt; of lectures. They use Scheme, a LISP variant, which is a good choice for a first language. It uses the functional paradigm, however, which is very different from C. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While you may thing that you should choose a language that you will use at work, as this seems like the quickest way to arrive at where you want to be. I strongly suspect that it is faster to first learn to program (with whatever language makes this easier), and then learn a language (the one that you will eventually work with). I would like to see if there is any research on this. There is research that says that learning two things at once (e.g. programming and a language) is much much harder (possibly &lt;span class=&quot;math-container&quot;&gt;$n\times{}m$&lt;/span&gt; instead of &lt;span class=&quot;math-container&quot;&gt;$n+m$&lt;/span&gt;). So if we make the learning-the-language part easier, then over all cognitive load will be reduced &lt;strong&gt;a lot&lt;/strong&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have however noticed that graduates that have studied industrial languages, can not (in general) program. However those that can program (but only know learning languages), cad be quickly taught a new language. And people that know more than one language, are better programmers.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note: lisp is used in the programming of quantum computers (as it is easy to write compilers in it), so should no be classed as just a learning language.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2019-10-07T17:49:00.197" LastActivityDate="2019-10-07T17:49:00.197" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5957" PostTypeId="2" ParentId="5954" CreationDate="2019-10-07T10:22:28.490" Score="1" Body="&lt;p&gt;Your question doesn't make much sense. First, there are literally thousands of major algorithms, and many of them are quite involved. You don't begin your studies with Red-Black Trees because even their purpose will elude you until you've (at the very least) spent some time dealing with sorts and searches.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, if you eliminate time complexity and the actual steps to make an algorithm possible, what is left? A vague discussion of the purpose of the algorithm? Needless to say, no such discussion would include any bits of actual programming, especially not in a low-level language like C.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Speaking of which, why are you focused on C? Do you have a particular reason for this choice of language?  C is a &quot;low-level&quot; language, which means it works quite closely to how machines think, and quite differently from how people think. This is sort of like taking a math class that provides only axioms, and makes the student prove all of the important results on their own. I am not suggesting that there is no value there, but (1) it is much, much harder, and (2) you're more likely to simply give up in frustration when you can't seem to do anything at all, even after months of effort.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Beginners, particularly if self-taught, should start in higher-level languages where they can begin to learn how to actually undergo the process of programming without having to worry yet about pointer arithmetic and memory management.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-10-07T10:22:28.490" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5958" PostTypeId="1" AcceptedAnswerId="5968" CreationDate="2019-10-07T18:31:52.047" Score="2" ViewCount="101" Body="&lt;p&gt;I was teaching an intro to Programming class, full of social scientists. After explaining that the basic building blocks of a program are called tokens, I took them through Keywords, Identifiers, Literals etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was asked a question. And have been reading to find answers in books and online. &#xA;They asked if we group the basic elements of a program under the word &quot;token&quot;, then what word groups the other program elements. e.g. expressions, statements and blocks, that are derived from tokens?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Help with a reference or a term that classifies these constructs as a group.&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="27" LastEditDate="2019-10-08T00:31:26.767" LastActivityDate="2019-10-10T06:51:08.153" Title="A category to classify expressions, statements and blocks" Tags="|programming|syntax|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5959" PostTypeId="2" ParentId="5958" CreationDate="2019-10-07T20:36:26.520" Score="2" Body="&lt;p&gt;This is a surprisingly complex question. In many languages one can distinguish between &lt;em&gt;commands&lt;/em&gt; and &lt;em&gt;expressions&lt;/em&gt;. A command is something that changes the state of the computation. An expression is something that returns a value, but doesn't change the state. This is actually a good mental model even in languages that can confuse the two ideas in small or large ways. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some languages consider statements to be commands, but in C, for example, an assignment statement is also an expression that has a value equal to the value assigned to the variable on the left. That may or may not be the value of the expression on the right, actually, as when a short is assigned to a long. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Likewise blocks can either be commands or expressions in most languages. A function block is an expression, returning what the function returns (more or less) but it can also have command-like properties if it changes the state generally, say by modifying a non-local variable. But the if-clause in an if statement is usually just a command. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I don't think there is a single unifying category for all three of your items, but the distinction between &lt;em&gt;commands&lt;/em&gt; and &lt;em&gt;expressions&lt;/em&gt; is useful. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is useful for another reason as well. In C a &quot;function&quot; can return a value or not (void functions). But programs are easier to understand if a function that returns a value does &lt;em&gt;not&lt;/em&gt; also change anything in the non-local state. Then functions when invoked will be either expressions (the value returned) or commands (the state changes) but never both. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But C also has a distinction that even command-like functions often return an error state indicator, zero if there are no errors. So common practice gets in the way of the useful rule in the paragraph above. C++ can use exceptions instead of error codes, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in more &quot;modern&quot; languages, the distinction between expressions and commands is maintained with a bit more clarity. Java, for example. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-07T20:36:26.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5960" PostTypeId="2" ParentId="5958" CreationDate="2019-10-07T20:46:48.117" Score="0" Body="&lt;p&gt;I just learned quite a bit from Buffy's wonderful answer! I would only add that a &lt;em&gt;token&lt;/em&gt; is simple the smallest unit of text that carries semantic meaning to the compiler.  Thus,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;int func(int input){&lt;/code&gt; has 7 tokens (four word tokens and three symbol tokens). An escape character in a string such as &lt;code&gt;\&quot;&lt;/code&gt;, then, is a note to the tokenizer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How they are later grouped and interpreted are decisions for later in the compilation process, based on the contents of each token.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think that I would try to relate token to either of your other terms, as the relationship is in no way straightforward.  Expressions can be tokens (such as &lt;code&gt;42&lt;/code&gt;), or can be groups of tokens (&lt;code&gt;x + 5&lt;/code&gt;). That depends on the contents of the tokens themselves.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2019-10-07T20:50:55.020" LastActivityDate="2019-10-07T20:50:55.020" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5962" PostTypeId="1" CreationDate="2019-10-08T05:00:34.097" Score="8" ViewCount="1988" Body="&lt;p&gt;I'm preparing a class on the modified BNF notation that python uses. I.e.,&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Each rule begins with a name (which is the name defined by the rule) and ::=. A vertical bar (&lt;code&gt;|&lt;/code&gt;) is used to separate alternatives; it is the least binding operator in this notation. A star (&lt;code&gt;*&lt;/code&gt;) means zero or more repetitions of the preceding item; likewise, a plus (&lt;code&gt;+&lt;/code&gt;) means one or more repetitions, and a phrase enclosed in square brackets (&lt;code&gt;[ ]&lt;/code&gt;) means zero or one occurrences (in other words, the enclosed phrase is optional). The &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;+&lt;/code&gt; operators bind as tightly as possible; parentheses are used for grouping. &lt;a href=&quot;https://docs.python.org/3/reference/introduction.html#notation&quot; rel=&quot;noreferrer&quot;&gt;Source&lt;/a&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For this class, I'm not allowed to assume the students have prior knowledge in CS. Thus I must rely on concepts from general knowledge to provide examples in the use of BNF. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words, I can't use something like&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;longstringitem ::= longstringchar | stringescapeseq&lt;/code&gt;,&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I must use something like this instead:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9&lt;/code&gt;&lt;br&gt;&#xA;&lt;code&gt;&quot;a digit is defined as either 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9&quot;&lt;/code&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some non-CS concepts that can be used to illustrate the &lt;code&gt;*&lt;/code&gt; sign (zero or more repetitions of the preceding item,) the &lt;code&gt;+&lt;/code&gt; sign (one or more repetitions,) the phrase enclosed in &lt;code&gt;[]&lt;/code&gt; (zero or one occurrences) and the &lt;code&gt;()&lt;/code&gt; (used for grouping) from the BNF notation?&lt;/p&gt;&#xA;" OwnerUserId="8366" LastEditorUserId="8366" LastEditDate="2019-10-08T05:11:37.720" LastActivityDate="2019-10-08T22:34:05.327" Title="What are some non-CS concepts that can be defined using BNF notation?" Tags="|teaching-analogy|introductory-lesson|adult-education|syntax|layperson|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5964" PostTypeId="2" ParentId="5962" CreationDate="2019-10-08T05:46:58.433" Score="10" Body="&lt;p&gt;Going with real-world things which they should be familiar with are best, even if it is completely outside of education. As you have applied the tag for adult education, I'm going to presume it is outside of normal university/college courses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bit of creativity and looking around can develop many an idea as long as you get &lt;em&gt;outside the box&lt;/em&gt;. The cafeteria might be a good place to look.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;entree ::= pizza | hamburger | steak&#xA;side_dish ::= corn | coleslaw | fries&#xA;beverage ::= coffee | tea | milk | soda&#xA;dessert ::= (apple|pumpkin) pie | (peach|cherry) cobbler | ice cream&#xA;meal ::= water beverage* entree side_dish+ [dessert]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The water is mandatory (already on the table perhaps), it's possible to have as many drinks, and refills, as you wish. There is always an entree, one side dish is included, but you may have more. Finally, if you choose, you may have a desert.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If the situation is at a regular educational institution you can experiment with using degree requirement courses, and electives. There's enough there to allow the students to create their own versions as practice as well.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="1219" LastEditDate="2019-10-08T07:13:31.420" LastActivityDate="2019-10-08T07:13:31.420" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5965" PostTypeId="2" ParentId="5962" CreationDate="2019-10-08T07:15:05.687" Score="4" Body="&lt;p&gt;The literary arts are full of structured strings. The main problem there is finding ones which have sufficiently interesting structure. E.g.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;play ::= act+&#xA;act ::= scene+&#xA;scene ::= (stage-direction | line)+&#xA;stage-direction ::= &quot;Enter&quot; actor+ | &quot;Exit&quot; actor+&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;/users/104/gypsy-spellweaver&quot;&gt;Gypsy Spellweaver&lt;/a&gt; helpfully points out that this can be elaborated to incorporate even more structure as&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;play ::= act ( act* [intermission act+] )*&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;although you may want to distinguish between &lt;code&gt;play&lt;/code&gt; (the text) and &lt;code&gt;play-performance&lt;/code&gt; (which may have intermissions) and use that as an illustration of sharing rules between grammars.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastEditorUserId="1219" LastEditDate="2019-10-08T07:40:54.207" LastActivityDate="2019-10-08T07:40:54.207" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5966" PostTypeId="2" ParentId="5962" CreationDate="2019-10-08T13:26:02.437" Score="2" Body="&lt;p&gt;Let me try to give a more interesting example, that can't be expressed as a set of simple regular expressions. BNF, properly speaking, is about the &lt;em&gt;structure&lt;/em&gt; of a thing, such as a language. As such, the parts have relationships to one another. So, in computer languages &amp;quot;if&amp;quot; and &amp;quot;while&amp;quot; are tokens (word symbols, keywords), and tokens can be defined by regular expressions, the sequence &amp;quot;if while&amp;quot; isn't legal in Python, since the BNF that defines the structure contains no such form.&lt;/p&gt;&#xA;&lt;p&gt;The following won't be perfect, and I'll need to leave out a lot for want of time to complete it. Take ellipsis (...) as meaning that I'm leaving things out, not as any formal symbol. Literals are quoted. Unquoted words are defined with other BNF productions in the same language (the &lt;em&gt;non terminals&lt;/em&gt; of the BNF.&lt;/p&gt;&#xA;&lt;p&gt;And note that I'm trying to generate a description of a car, not a car.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;carDescription ::= chassis &amp;quot;containing both&amp;quot; propulsionSystem &amp;quot;and surrounded by&amp;quot; body.&lt;/p&gt;&#xA;&lt;p&gt;chassis ::= (&amp;quot;rectangular&amp;quot; | &amp;quot;triangular&amp;quot;) framework &amp;quot;with wheels at vertices&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;framework ::= &amp;quot;reinforced&amp;quot; ( &amp;quot;steel&amp;quot; | &amp;quot;fiberglass&amp;quot;) &amp;quot;semirigid structure&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;propulsionSystem ::= fuelPoweredEngine | motor&lt;/p&gt;&#xA;&lt;p&gt;propulsionSystem ::= (fuelPoweredEngine | motor) propulsionSystem&lt;/p&gt;&#xA;&lt;p&gt;motor ::= &amp;quot;electric motor and battery&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;etc.&lt;/p&gt;&#xA;&lt;p&gt;Note that propulsion system is the recursive way of saying that a propulsion system is one or more &amp;quot;thingies&amp;quot; that provide power. It is equivalent to the + in regular expressions.&lt;/p&gt;&#xA;&lt;p&gt;But the intent isn't to define individual, unrelated things, but the overall structure of a complex things that is made of parts, some of which are other complex things. Regular Expressions don't have that power, but BNF does.&lt;/p&gt;&#xA;&lt;p&gt;And please note that my intention here isn't to be completely accurate (pedantic) but simply to try to demonstrate the essence of BNF as opposed to RE. It is one of the fundamental ideas of the Chomsky Language Hierarchy.&lt;/p&gt;&#xA;&lt;p&gt;Since BNF and REs were actually created in the service of defining &lt;em&gt;languages&lt;/em&gt; such as Python, it is difficult to divorce the idea from language. Hence my example is for a description of a car (which is language) not for a car itself, which is too complicated to express as BNF since the actual form of the connections between things in an actual car are critical. I left out the drive train, for example, which connect the propulsion system to the wheels and the control system that regulates the propulsion system. I don't have a theorem for you but am pretty sure that it would be beyond BNF to do this. Even if it were, the complete description would need the complexity of an engineering diagram and even then would leave out physical principles of combustion or conversion of electrical to mechanical energy.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-10-08T22:34:05.327" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5967" PostTypeId="2" ParentId="5962" CreationDate="2019-10-08T19:19:47.210" Score="4" Body="&lt;p&gt;Mathematical expressions or natural language are good candidates for these.&#xA;e.g. from &lt;a href=&quot;http://matt.might.net/articles/grammars-bnf-ebnf/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://matt.might.net/articles/grammars-bnf-ebnf/&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; &amp;lt;expr&amp;gt; ::= &amp;lt;term&amp;gt; &quot;+&quot; &amp;lt;expr&amp;gt;&#xA;         |  &amp;lt;term&amp;gt;&#xA;&#xA; &amp;lt;term&amp;gt; ::= &amp;lt;factor&amp;gt; &quot;*&quot; &amp;lt;term&amp;gt;&#xA;         |  &amp;lt;factor&amp;gt;&#xA;&#xA; &amp;lt;factor&amp;gt; ::= &quot;(&quot; &amp;lt;expr&amp;gt; &quot;)&quot;&#xA;           |  &amp;lt;const&amp;gt;&#xA;&#xA; &amp;lt;const&amp;gt; ::= integer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;which I think is a good candidate because it exposes the interesting recursive qualities from expansion.&lt;/p&gt;&#xA;" OwnerUserId="8492" LastActivityDate="2019-10-08T19:19:47.210" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5968" PostTypeId="2" ParentId="5958" CreationDate="2019-10-10T06:45:02.453" Score="1" Body="&lt;p&gt;People create categories as needed to manage complexity. A language designer has defined syntactic &amp;amp; semantic things--including categories of things--relevant to their purposes &amp;amp; so can anyone--specific or fuzzy. It's unhelpful &amp;amp; misconceived to expect that somehow categories are out there to be uncovered or that everything must be in a category or that any pattern one gets a glimpse of is evidence of a category out there to be uncovered. This is a case of the fallacy of Reification. Of mathematics, Kronecker said, &quot;God made the integers; all else is the work of man.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In programming languages, expressions, statements and blocks are categories of language strings or trees with associated grammar production rules. Relevant helpful larger grouping for these are things like definitions, programs &amp;amp; compilation units. But those are ad hoc per the language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally, what helpful syntactic categories there are is driven by what helpful semantic categories there are. Sadly, programming languages' semantics are typically poorly taught. Even though its semantics are the raison d'etre of a language.&lt;/p&gt;&#xA;" OwnerUserId="2485" LastEditorUserId="2485" LastEditDate="2019-10-10T06:51:08.153" LastActivityDate="2019-10-10T06:51:08.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5969" PostTypeId="1" CreationDate="2019-10-10T12:44:16.347" Score="6" ViewCount="899" Body="&lt;p&gt;In my experience, as a general observer of the world around me, and as someone who teaches some really simple basics in python to non-IT students, it does seem to me that general computer literacy (&lt;em&gt;of those that use/have to use computers&lt;/em&gt;*) declined, compared to &lt;em&gt;back in the day&lt;/em&gt;™.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When we had fight with flimsy Windows98 (or geek it out in unwelcoming linux, but that never was a mainstream thing) even for normal tasks, you had to have some basic understanding of what you're doing (or you got punished with crashes and viruses) and computers were seen as practical, but complicated machines.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nowadays, way more people use computers everyday (and I'd theoretically put smartphones into that category), but everything is easy and appified and marketing makes you believe those things work with unicorn farts and magic. Everything even remotely technical gets hidden from users, there's dozens of mechanisms protecting you from all kinds of stuff and phones generally are a black box that you're supposed to just consume on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So from my experience, most people are overwhelmed by even the most simple things, like working in a folder structure or the realization that you can use a keyboard to make the computer do things or that error messages can contain more than just &lt;em&gt;&quot;Oops, something happened&quot;&lt;/em&gt; and that you should please read them before shouting for the teacher that &lt;em&gt;&quot;It just doesn't work!&quot;&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Now am I just having nostalgia or is my observation valid?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would suppose there should be some literature on this subject, but this is totally out of my field, and google scholar doesn't bring up anything useful when looking for &lt;code&gt;&quot;computer literacy&quot; smartphones&lt;/code&gt;. So I guess I'm mostly looking for objective literature on this subject.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;And don't get me wrong, I don't want to go back to the time where computers where only mastered by the most 1337 wizards and win98 would surprise you everyday with a new fuckup. I love it that I have the power of all my trashed computers in my pocket and that I can simplify things that once used to be hard. And I'm aware that this simplification opened up a whole new world for a lot of people, but I feel like there's also some negatives associated with it, and I'd like to see what I can do to counter those.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*There is probably a whole different discussion to be had on the issue that many, many more people now are using computers (in the &lt;em&gt;traditional&lt;/em&gt; PC/Laptop Form, but mostly, smartphones), so that the general &quot;amount&quot; of computer literacy in the population probably went up, see the answer by @Kevin Workman, but for this, I'm focused on the literacy of the users, not of users and non-users combined.&lt;/p&gt;&#xA;" OwnerUserId="8497" LastEditorUserId="694" LastEditDate="2019-10-23T07:59:08.923" LastActivityDate="2019-10-23T07:59:08.923" Title="Did the spread of smartphones increase or decrease general computer literacy?" Tags="|digital-literacy|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="5970" PostTypeId="1" CreationDate="2019-10-10T16:25:37.060" Score="3" ViewCount="396" Body="&lt;p&gt;I'm trying to find an online source or textbook with problems+solutions for problems in dynamic programming, number theory, graph theory, greedy algorithms, etc. Do you know of any?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2019-11-30T01:07:56.823" Title="Any website/textbook with problems+solutions in algorithms?" Tags="|programming|algorithms|" AnswerCount="3" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5971" PostTypeId="2" ParentId="5969" CreationDate="2019-10-10T19:39:28.380" Score="2" Body="&lt;p&gt;Cool question and I'd be really interested to see some statistics on it and hopefully some discussion.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've noticed the same thing. Students come into class that are &quot;good at computers.&quot; They're on computers all the time and can do pretty much whatever they need to do for school and fun, but don't have any understanding of how it works. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I had to guess I don't think it's that smartphones or making computers easier to use is decreasing computer literacy. I think it's just that those are more consumers of the device would have been less likely to use a computer before they were so easy to use. They would have just not used a computer. A student of today that knows how to use Google Docs and little else would be a student that would have handwritten a paper 30 years ago instead of using a word processor. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course, this is just a guess. I've got nothing to back it up :)&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-10-10T19:39:28.380" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5972" PostTypeId="2" ParentId="5969" CreationDate="2019-10-11T01:29:07.607" Score="3" Body="&lt;p&gt;If somebody has some statistics, that would make a great answer, but in the meantime I'll offer some thoughts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First off, I think it depends on what you mean by &quot;general computer literacy&quot;. I can think of a few interpretations:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you pick a random person, how computer-literate are they?&lt;/li&gt;&#xA;&lt;li&gt;If you pick a random person &lt;em&gt;who owns a computer&lt;/em&gt;, how computer-literate are they?&lt;/li&gt;&#xA;&lt;li&gt;If you assign a score to &quot;computer literacy&quot; and then calculate that score for every person and then take the average, what would that number be?&lt;/li&gt;&#xA;&lt;li&gt;If you assign a score to &quot;computer literacy&quot; and then calculate that score for every person &lt;em&gt;who owns a computer&lt;/em&gt; and then take the average, what would that number be?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Are we asking about everybody, or are we only asking about the people who own a computer?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;According to &lt;a href=&quot;https://www.census.gov/content/dam/Census/library/publications/2017/acs/acs-37.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;the US census&lt;/a&gt;, ~60% of American households had a computer in 2003, compared to ~80% in 2015. So &lt;strong&gt;if we're asking about everybody&lt;/strong&gt;, then I would guess that general computer literacy has gone up, because more people have access to computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In other words: if you don't have access to a computer, you have a computer literacy &quot;score&quot; of 0. If you have access to a computer, even if you aren't an expert in computer science, your &quot;score&quot; is above zero. So if we're asking about everybody, then the literacy increases as more people own computers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;If we're only asking about people who own a computer&lt;/strong&gt;, then I think it's fairly obvious that &quot;computer literacy&quot; has gone down, but I don't think that's necessarily a bad thing. Until recently, you had to &lt;em&gt;know what you were doing&lt;/em&gt; in order to work with a computer, like you've outlined in your question. Since then, hardware and software companies have done a great job of making their products more accessible, i.e. easier to use even if you aren't an expert. The previously-required expertise has not been necessary, so &quot;computer literacy&quot; has gone down.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, &lt;strong&gt;I don't think all of this hinges on smartphone usage.&lt;/strong&gt; People have been complaining about the new generation of non-tech-savvy users since the internet began. &lt;a href=&quot;https://en.wikipedia.org/wiki/Eternal_September&quot; rel=&quot;nofollow noreferrer&quot;&gt;Eternal September&lt;/a&gt; happened in 1993.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anecdotally, I started college in 2004, before smartphones were popular (the iPhone was released during my junior year). Plenty of my classmates chose the Computer Science department because they were &quot;good at computers&quot;. Many of these students struggled when they found out that being &quot;good at computers&quot; meant more than playing video games.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;This phenomenon is more general than computer science.&lt;/strong&gt; I don't have any numbers to back this up, but I've often observed that anytime something becomes more accessible to the general public, many of the previous &quot;experts&quot; see the craft as becoming &quot;watered down&quot; rather than celebrating the fact that more people are participating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To come up with a specific example: thanks to the internet, now anybody can record themselves playing music, and put that out in the world. Compare that to how music was shared in 1980, and it's easy to see that more people are sharing their music now. But because it's so easy, many of these people are not professional musicians. Many of them are &lt;em&gt;not good&lt;/em&gt; at music (yet). So because more people are playing music, does that mean music literacy has increased? Or because more novices are playing music, does that mean music literacy has decreased?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More total people are using computers, but of the people using computers, more of them are novices. Does that mean computer literacy has increased or decreased?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;You can ask the same question about anything that has been made more accessible or shareable.&lt;/strong&gt; Has art literacy decreased because &lt;strong&gt;more&lt;/strong&gt; people are posting their doodles online? There are more novices participating, but does that mean &quot;general literacy&quot; is increasing or decreasing?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing to consider is that &lt;strong&gt;&quot;computer literacy&quot; is very broad.&lt;/strong&gt; If I'm an expert in ethics in AI, but I've never touched a command line, am I computer-illiterate? If I'm an expert in Linux but I don't know how to use a web browser, am I computer-literate? I would argue that we're trading some kinds of expertise (like navigating the file system) for other kinds of expertise (like navigating social media). One isn't inherently better or &quot;more computer-y&quot; than the other.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think &lt;strong&gt;it's easy to forget how it feels to be a novice.&lt;/strong&gt; Being new to a subject is &lt;strong&gt;really hard&lt;/strong&gt;, and as experts we tend to forget that feeling. So when we work with a novice, we can be dismissive or frustrated- &quot;it's just a for loop, what don't you understand?&quot; But we're forgetting that it took us a year to figure for loops out. A little empathy goes a long way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll end this with a conversation I had a few years ago that stuck with me. I had a coworker, who went to college back when they used punch cards, where they had to walk to the only mainframe on campus (uphill, both ways) at midnight to run their code. I asked him: do you get frustrated by this new generation of coders who don't know how anything works under the hood?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;He responded: &quot;No way! The new generation can do things I never dreamed of doing!&quot; &lt;/p&gt;&#xA;" OwnerUserId="2068" LastEditorUserId="2068" LastEditDate="2019-10-14T20:12:19.220" LastActivityDate="2019-10-14T20:12:19.220" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5973" PostTypeId="2" ParentId="5122" CreationDate="2019-10-11T14:06:20.083" Score="3" Body="&lt;p&gt;This answer is a complement to Buffy's and is more oriented towards future applications of autograding.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The description of the assignment gave me the impression that your autograder is rather lazy. Instead of checking whether the functions the students have written are correct it executes a bunch of operations and compare a checksum of the result. Although this does check if the code is correct, it only produces &lt;strong&gt;right&lt;/strong&gt; or &lt;strong&gt;wrong&lt;/strong&gt; diagnostics. A small error like using &lt;code&gt;&amp;lt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;=&lt;/code&gt; is undetectable by this method. In other words, the autograder helps you (the instructor) to detect problems in the code, but it does not help students to understand their mistakes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I prefer using autograders that behave more like unit testing. They go through all functions of the class students defined and test inputs and outputs. If there is something wrong it prints a nice message stating where it fails, for which input and lists current output and expected output. You can still grade only for correct solutions if you want to, but students get much more feedback on their progress. You also get more information about their performance and can see where the failing students made mistakes they could not figure out how to correct. You can even publish a set of &quot;simple&quot; tests and require students to write tests for tricky cases. IMHO this is a much more &quot;modern&quot; approach to grading and it has the added benefit of getting students used to software testing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are not convinced by the argument above, let's explore a more technical perspective. A class is, essentially, a contract that says that a certain number of methods will behave in a certain way. How these methods are implemented should not be of concern to the caller (at least in term of correctness). In this situation, checking each method for correction is a very reasonable approach. It also allows for partial credit: a student that implemented some methods correctly deserves a better (but maybe still failing) grade than a student that did not implement a single method correctly.&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-10-11T14:06:20.083" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5974" PostTypeId="2" ParentId="5969" CreationDate="2019-10-11T17:49:34.360" Score="0" Body="&lt;p&gt;Yes other have noticed this. For example the Raspberry Pi foundation. They are trying to combat it by producing a cheap computer £35 (like in the old days of home computing). That runs Gnu/Linux (a modern Unix clone).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would start by finding out what they have to say on it.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-10-11T17:49:34.360" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="5975" PostTypeId="2" ParentId="5950" CreationDate="2019-10-11T22:15:35.830" Score="1" Body="&lt;p&gt;You could do a study on say:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Evolution of programming languages.&lt;/li&gt;&#xA;&lt;li&gt;How software development has driven hardware development e.g. how increasing size of code drives requirements for larger storage.&lt;/li&gt;&#xA;&lt;li&gt;Since it's a high school research, you could study how computers have changed  our lives or the way we use time in a day&lt;/li&gt;&#xA;&lt;li&gt;You may take any programming language and study how it has evolved, the founder(s), versions,  it's major principles, with sample code etc. C++ will be most interesting in this regard IMHO, cos it has evolved and is still evolving significantly from its beginnings in the 1980s. &#xA;Hope these get you thinking of something&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="8489" LastActivityDate="2019-10-11T22:15:35.830" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5976" PostTypeId="2" ParentId="5969" CreationDate="2019-10-11T22:21:15.310" Score="0" Body="&lt;p&gt;In my opinion the self-perception of digital knowledge has gone up, while the digital knowledge, or at least the percentage of digitally literate people, based on the amount of users of digital devices, itself might have stayed the same. I usually call people who feel like &quot;digital natives&quot;, but are just well trained monkeys(who are maybe paid with peanuts ;-) ), &quot;digital naives&quot;. I really have to stress that my views are just based on my personal experiences, which have of course no scientific relevance at all!&lt;/p&gt;&#xA;" OwnerUserId="8354" LastActivityDate="2019-10-11T22:21:15.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5977" PostTypeId="2" ParentId="5777" CreationDate="2019-10-11T23:09:52.737" Score="1" Body="&lt;p&gt;I would really recommend Pyzo(formerly known as IEP) especially because of these three reasons:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it's lightweight, so it works with any laptop if it is fast enough for the operating system&lt;/li&gt;&#xA;&lt;li&gt;it's simple and &lt;strong&gt;NOT&lt;/strong&gt; too packed with features&lt;/li&gt;&#xA;&lt;li&gt;it includes an IPython console which uses the major advantage of interpreted languages that they are, Hello Captain Obvious, interpreted on the fly&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8354" LastActivityDate="2019-10-11T23:09:52.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5979" PostTypeId="2" ParentId="5122" CreationDate="2019-10-15T04:52:56.190" Score="2" Body="&lt;p&gt;Late answer: I agree greatly with @igordsm's response above (emphasize unit testing with more detailed feedback, not just a &quot;pass/fail&quot; output), so this should be considered in support of that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I agree with the comment by @pojo-guy that the specification seems &quot;unnecessarily convoluted and artificial&quot;. Having read the specifications for the 1st and 4th projects, the tone also seems a bit snarky in a way that I would not recommend. Have the specification run 5 or 6 pages seems pretty long to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the main thing is that I would recommend you consider changing your grading policies, as several of the terms seem poorly considered. E.g.:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;First, the whole idea of a binary auto-grader with a checksum output seems to have a bad &quot;code smell&quot;, as we say. Anecdotally I hear lots of stories of CS professors trying to be clever in this way, with them and their students being perpetually frustrated that the auto-grader isn't working exactly as desired. And what's the point of checksum output anyway, versus a yes/no correct output test? Recommendation: Consider grading in ways other than auto-grader alone. Simplify the auto-grader to use a yes/no test suite (&lt;a href=&quot;http://codekata.com/kata/kata02-karate-chop/&quot; rel=&quot;nofollow noreferrer&quot;&gt;example&lt;/a&gt;). Increase visibility. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Second, giving zero credit in any case when the output is not exactly correct. Do you not wish to consider any aspect of a solution being partly correct, or issues of code formatting, readability, documentation, reusability, etc? I think all of those things are important items for which to provide feedback (and hence partial credit). Recommendation: Expand the grading criteria to cover other important issues than just correctness (and secondarily give opportunities for partial credit).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Third, having half of the grade component judged by competitive ranking of the speed of the programs can have deleterious effects. (a) Pedagogically, it turns the students against each other, and prevents them from sharing knowledge on even the theoretical level (even potentially sabotaging each other). (b) Students will be judged and graded on different criteria across semesters, depending on the strength of their cohort. (c) The focus on speed can take all the oxygen away from students being able to focus on correctness, which should come first (as I've seen back when I taught assembly). Recommendation: Not generally grading on speed, except maybe one special assignment. Failing that, compare to fixed time benchmarks, not relative to other students. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Fourth, the prize of writing a recommendation letter to only the top-performing student strikes me as somewhere between distasteful and immoral. You should be writing letters for any student who is qualified, in my opinion -- which should be more than 4 per semester. This element gives the signal of a professor who is just lazy and a barrier against student success in principle. Recommendation: Delete this unique &quot;prize&quot; and offer letters openly to more students. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Fifth, the final assignment takes a little bit too much glee in how unique, &quot;clever&quot; it is, and does a humble-brag about how little time it took the instructor to come up with it and solve it. Again, this smells bad. In  my experience, any test question that I consider &quot;clever&quot; or fun/interesting is a recipe for disaster for my students -- regardless of how elegant or short I can personally make the solution. Recommendation: Assuming you have some quality textbook that you're teaching from, stick to projects from, or similar to those in the book, which have presumably been developed and tested by book authors and reviews over several years and classrooms. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2019-10-18T00:38:46.763" LastActivityDate="2019-10-18T00:38:46.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5980" PostTypeId="2" ParentId="5970" CreationDate="2019-10-15T17:38:12.447" Score="4" Body="&lt;p&gt;Based on clarification in comments, &lt;a href=&quot;https://algs4.cs.princeton.edu/code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Algorithms&lt;/em&gt; 4th ed. by Sedgewick and Wayne&lt;/a&gt; seems to meet your criteria. The book itself doesn't seem to have an official PDF version (I haven't searched for unofficial ones of dubious provenance), but the code is available both at the linked page and &lt;a href=&quot;https://github.com/kevin-wayne/algs4&quot; rel=&quot;nofollow noreferrer&quot;&gt;on Github&lt;/a&gt;, and includes solutions to selected exercises.&lt;/p&gt;&#xA;" OwnerUserId="1219" LastActivityDate="2019-10-15T17:38:12.447" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5982" PostTypeId="1" CreationDate="2019-10-18T09:55:02.973" Score="2" ViewCount="465" Body="&lt;p&gt;I know that most computer science students learn things like they are assumed some basic knowledge of programming and they are learning gradually more accurate reasoning and ways to produce more reliable code. But on the other hand, I studied myself to be a mathematician and found it very interesting to learn axioms and build the whole theory to just a few assumptions, rigorous definitions and I was sure that everything works if there is no contradiction between axioms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there anything similar learning curve for studying computer science for math majors? Can one learn first Turing machines, then to build core of OS, then hex editor, then C compiler, the some theorem proving software like Coq and then prove that the OS is free from bugs etc. &lt;/p&gt;&#xA;" OwnerUserId="8518" LastActivityDate="2019-10-23T09:13:16.247" Title="How to learn computer science from bottom to up?" Tags="|self-learning|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5983" PostTypeId="1" CreationDate="2019-10-18T11:21:01.763" Score="0" ViewCount="128" Body="&lt;p&gt;Are there any universities that give you a Bachelor's in programming? I am aware of Computer Science BSc, but it's a little too broad in scope.&lt;/p&gt;&#xA;" OwnerUserId="8012" LastActivityDate="2019-10-20T00:49:18.797" Title="Is there any formal education for programming? Other than a CS degree?" Tags="|programming|adult-education|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5985" PostTypeId="2" ParentId="5983" CreationDate="2019-10-18T14:15:54.537" Score="0" Body="&lt;p&gt;I doubt that you will find a &lt;em&gt;reputable&lt;/em&gt; Bachelor's degree in Computer Programming. Programming is just a tool for the production of &quot;interesting&quot; things. It requires skill to wield that tool, but it isn't, by itself, broad enough to constitute an actual Bachelor's degree. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Computer Science degree, on the other hand focuses on programming in the first year so that students will be skilled enough in the tool to be able to explore the interesting things like databases, operating systems, artificial intelligence, human factors engineering, and a host of others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming can be fun, but it can also be used to explore and understand those &quot;interesting&quot; things, how they are designed, why they are important, and how to build them when necessary. And you can make a bit of money as a programmer as long as someone else has the knowledge about what is important or you can accrue it in other ways. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-18T14:15:54.537" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5986" PostTypeId="2" ParentId="5982" CreationDate="2019-10-18T14:35:10.410" Score="4" Body="&lt;p&gt;Yes, it is possible to do that, but it is terribly inefficient. It will take you approximately forever, partly because it is no longer true that any single person can now understand &lt;em&gt;all&lt;/em&gt; of Computer Science. The boundary was passed somewhere around the turn of the century, just as in mathematics it happened around the turn of the previous century. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you start from the very beginning, ignoring everything that came later, you will deny yourself the possibility to benefit from the big ideas that developed along the way that the history followed. One of the biggest ideas in computing is the idea of &lt;em&gt;abstraction&lt;/em&gt; and understanding that buys you a lot in understanding and also in guiding your learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A Turing Machine, just like pure Machine Language, has no abstraction facilities whatever. Assembly language adds a bit. Fortran and Cobol added more. But it was the Algol family of languages that really solidified the importance of abstraction and it was languages like Lisp and Smalltalk that extended it to modern levels of understanding. But if you have a good understanding of abstraction, such as you would learn from programming in Java or Python, then you can more easily move down to simpler (less abstraction) languages and move upwards to higher levels (database, AI, etc). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you have a misunderstanding, actually, and are conflating Computer &lt;em&gt;Programming&lt;/em&gt; with Computer &lt;em&gt;Science&lt;/em&gt;. They are not the same. Programming at a high or low level is just a tool for understanding more important and more interesting things. (I'm not claiming you have this misunderstanding, but your question leaves hints of it, at least.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most students of computer science start with some high(er) level language, often Java or Python. From there they move up and down the abstraction scale. I've built (finite) Turing Machines and explored them deeply when studying Algorithms. But I didn't start there. I'm old enough that Fortran and Basic were my first languages. But then Pascal taught me about a certain kind of abstraction (procedural) and later Smalltalk taught me object abstraction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've never built a full OS, but have built a kernel. A micro kernel is really only a few lines of code, actually, but to understand that you have to take a layered view of an OS (abstraction again). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've built a lot of compilers, but always in higher level languages (C and higher). I've built editors, but not text editors. Graphical drag and drop editors are more interesting in today's world. Think Scratch, though that wasn't me. But my higher level view of what constitutes a program (abstraction) enables me to build any of those things as well as future things for which the need might arise. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, again, while a purely historical, low level to high level, approach is possible, it isn't, in my well-formed and long-held opinion, the best way. In particular, you don't have to independently re-develop the idea of abstraction to become a good programmer and to use abstraction effectively to get to the &quot;interesting&quot; things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that is &lt;em&gt;just&lt;/em&gt; the programming part. There is much more in &lt;em&gt;Computer Science&lt;/em&gt; and you won't get to that soon enough if you recapitulate the entire history of computing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-18T14:35:10.410" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5987" PostTypeId="2" ParentId="5982" CreationDate="2019-10-18T19:05:36.713" Score="3" Body="&lt;h1&gt;On high and low level&lt;/h1&gt;&#xA;&lt;p&gt;First let me say that low -&amp;gt; high level in programming is very different (and often opposing) to low -&amp;gt; high level in education.&lt;/p&gt;&#xA;&lt;p&gt;Educationally you want to start with what you know and move one step at a time to new lands. You want to start concrete and move to the abstract.&lt;/p&gt;&#xA;&lt;p&gt;Programmingly you should not move from low level to high level (hardware -&amp;gt; machine code -&amp;gt; OS -&amp;gt; ...). The technically low level, is educationally abstract (high level).&lt;/p&gt;&#xA;&lt;h1&gt;A suggestion&lt;/h1&gt;&#xA;&lt;p&gt;From reading your background, but depending on your age, I would recommend: structure and interpretation of computer programs. Both the videos and the book. You will learn many many things, including but not limited to: writing compilers, OS stuff (streams, concurrency, etc) and low level machines.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://mitpress.mit.edu/sites/default/files/sicp/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://mitpress.mit.edu/sites/default/files/sicp/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=2Op3QLzMgSY&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=2Op3QLzMgSY&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I would also consider other languages such as Snap. If there are good resources on teaching it well.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-10-18T19:05:36.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5988" PostTypeId="2" ParentId="5982" CreationDate="2019-10-19T17:08:56.487" Score="2" Body="&lt;p&gt;About &quot;Computer Programming from Bottom to Top&quot;, I recommend the book By Nisan and Shoken.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The Elements of Computing Systems: Building a Modern Computer from First Principles&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://www.nand2tetris.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.nand2tetris.org/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Computer &lt;em&gt;Science&lt;/em&gt; is a rather different story)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Actually mathematics were never built by laying definitions + axioms and then deducing theorems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Look at numbers:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Complex numbers&lt;/em&gt; appeared in 1545 as tricks to deal with radicals of cubic equations. The correspondence with points in the 2D space R^2 became clear in 1799.&lt;/li&gt;&#xA;&lt;li&gt;Speaking about R, the first formal definition of &lt;em&gt;reals number&lt;/em&gt; was given by Cantor in  1871&lt;/li&gt;&#xA;&lt;li&gt;and (apparently not so) &lt;em&gt;natural numbers&lt;/em&gt; 0, 1, 2 ... got an axiomatization  only in the 1860-1890 (Peano etc.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Anyway, it didn't prevent mathematicians to play with questions about numbers since centuries / millenaries. Like showing the square root of 2 is not a rational number.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Definitions, axioms and formal theories are introduced when they help to clarify things and solve problems.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2019-10-20T11:35:17.257" LastActivityDate="2019-10-20T11:35:17.257" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="5989" PostTypeId="2" ParentId="5983" CreationDate="2019-10-20T00:49:18.797" Score="1" Body="&lt;p&gt;The short answer: no!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The long answer:&#xA;In my opinion if you really just want to focus on programming either a paid programming course could be the correct choice or just self-taught learning by doing. Of course you'll miss lots of theoretical things that will be important for an abstract view of programming. And also more complicated problems might need the theoretical knowledge you would gain at university.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want some certification of your knowledge, I would recommend you to gain enough knowledge in a language that has certifications and just get this certification.&lt;/p&gt;&#xA;" OwnerUserId="8354" LastActivityDate="2019-10-20T00:49:18.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5990" PostTypeId="1" CreationDate="2019-10-21T16:06:04.063" Score="3" ViewCount="557" Body="&lt;p&gt;The book should be easy to read, or at least average. The level for reading such a book is the MATH and CS school curriculum. It should also be expanded on topics related to CS, and also be narrated in a light manner. It should be kind of in a intro tutorial before starting a middle combinatorics.&lt;/p&gt;&#xA;" OwnerUserId="8187" LastEditorUserId="27" LastEditDate="2019-10-21T21:53:44.013" LastActivityDate="2023-03-17T12:07:46.070" Title="Is there a good book for combinatorics for programmers?" Tags="|self-learning|resource-request|discrete-math|" AnswerCount="2" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5991" PostTypeId="2" ParentId="5982" CreationDate="2019-10-23T09:07:20.003" Score="1" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Can one learn first Turing machines, then to build core of OS, then hex editor, then C compiler, the some theorem proving software like Coq and then prove that the OS is free from bugs etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Can you learn anything in any arbitrary order if you put in enough effort? Sure. But there are things you're glossing over.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You never really mentioned what your learning goal is, but I'm going to assume your goal is to learn skills that you could build a career out of, rather than just having a look around the history of CS as a recreational exercise.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If it is a recreational exercise, then you can just do what you want. It's the equivalent of freely walking around in a museum and looking at whatever you're interested in.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;0. Computer science vs computer science&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer depends on what you mean by &quot;computer science&quot;. If you're purely focus on the algorithmic theory of it all, then this follow the same general approach as math and therefore you can/should learn it the same way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the examples you use in your question seems to be much more focused on practical applications of CS, rather than the theoretical algorithmic. Here, the same logic does not hold true, and the rest of the answer is written to address &quot;software development&quot; rather than theoretical computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;1. Obsolete means useless&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if you want to learn how to build a car, you could start by learning to build a cart, and you could take a deep look at the intricacies of minimizing wear and tear on a wooden axle. But it'd be a lot of effort to learn something that is no longer relevant today, and it won't meaningfully contribute to your experience as a car mechanic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Similarly, if you want to be a C# developer, there's no point in learning Assembler first. Just because Assembler came before C# and somewhat inspired the C# creators does not mean it's beneficial to learn it now that C# is a well established platform on its own.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;2. Catching up to current technology&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't forget how fast the industry moves. If you spend time and effort learning the old and outdated things, by the time you're done learning about them, some things that were current back when you started may be outdated by now, so you'd have to learn them too. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The software development field moves at a breakneck speed and it's already hard for professionals &lt;em&gt;who are already at the forefront&lt;/em&gt; to keep up with new developments. As a learner, you will be slower (due to inexperience) and you have more ground to cover (because you're not at the forefront).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sure, if you focus on a particular specialization of software development, you're going to have less ground to cover, but I'd advise against starting out with tunnel vision. Programmers are incredibly sensitive to the &quot;when you have a hammer, everything looks like a nail&quot; adage and if you teach yourself a limited skillset, you're likely to end up trying to use this skillset in inefficient ways because you don't know of a better way.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;3. Conventionalism over universalism&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Math is different. Math is universal, and the core principles have not changed for millennia. You can't really learn the newer things without understanding what they are based on.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good mathematics are a matter of &lt;strong&gt;universal correctness&lt;/strong&gt;. You can independently rediscover math and end up with the exact same end result.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming paradigms, however, are &lt;em&gt;fashionable&lt;/em&gt;. It's not about what's universally correct, but rather about what works. In a different ecosystem, different paradigms prevail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good programming is a matter of &lt;strong&gt;convention&lt;/strong&gt;. If you rebuild programming paradigms from the ground up, you are likely to end up with completely different paradigms. Even if they are &lt;em&gt;as&lt;/em&gt; correct, they will still be fundamentally different from the current paradigms and you won't be a compatible employee for most (if not all) companies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Way back when processing power was the biggest bottleneck, low-level programming reigned supreme as it gave developers control over every minor aspect of the application in order to squeeze every bit of performance out of it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nowadays, with processors being everyday powerhouses, the bottleneck has shifted towards maintainability of the codebase. The prime focus now is human-readable and change-friendly code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The rift between the old and new lines of thinking are massive. They share little to no common ground anymore, and this means that learning one way is mostly going to teach you things that the other way labels as &quot;bad practice&quot;. If you err on the side of learning the old way first, you're going to have to make every (nowadays) bad practice mistake.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;4. Divide and conquer&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Essentially, every mathematician needs to understand math from the ground up, from the axioms to the specialized applications thereof. You can't be a mathematician if you don't understand &lt;code&gt;1 + 1 = 2&lt;/code&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But software development specifically aims towards ensapsulation of responsibilities. I don't know how a compiler works internally, but it doesn't matter because &lt;strong&gt;someone already made it&lt;/strong&gt;. I don't need to know how it works for me to do my job, I just need to use it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What you're suggesting is akin to saying that you need to understand chemical combustion, oil refining, the vulcanization of rubber, ... and car manufacturing before you can properly drive a car, and that's simply not the case. Knowing how something is built and knowing how to use it are two different things, often important to different people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, you don't &lt;em&gt;need&lt;/em&gt; to know how things like the C compiler or your OS have been built in order for you to use them (for software development), and it's much better to not look under the hood until you are experienced enough to look under the hood and actually understand what's happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;5. Historic knowledge is a nice-to-have&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't get me wrong, I still like looking at older technologies once in a while, but I do not rely on that for understanding modern technologies. It's always interesting to know more about the evolution of a field and how things have changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But if you're focusing on current-day-employability (which is what I assume your learning goal is), then obsolete technologies are not relevant for acquiring the needed skills.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-10-23T09:13:16.247" LastActivityDate="2019-10-23T09:13:16.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5992" PostTypeId="1" CreationDate="2019-10-23T01:52:36.167" Score="1" ViewCount="345" Body="&lt;p&gt;I was a college student majoring in computer engineering, but dropped out because of several issues (social situation, interest, etc). I always wanted to study computer science, but didn't do it because i thought that my parents won't let me (because they were so proud when i got to one of the most prestigious college in my country). When I dropped out, I got some talk with my parents and they gave me permission to do whatever I want. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that time I talk to them and I said that I will go to coding bootcamp, but after some research I found that coding bootcamp won't make you a real software engineer and it's pretty hard to find a job compared to computer science graduates. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the differences between coding bootcamp and a computer science degree? Especially in terms of the advantages and disadvantages of each.&lt;/p&gt;&#xA;" OwnerDisplayName="t0pp4" LastActivityDate="2020-01-02T23:08:59.643" Title="Coding bootcamp vs. computer science" Tags="|undergraduate|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5993" PostTypeId="2" ParentId="5992" CreationDate="2019-10-23T12:31:20.230" Score="7" Body="&lt;p&gt;First, be aware that Computer Programming and Computer Science are not the same thing. The term Computer Engineering might, in practice, be the same as Computer Science, but it can also be much different (software vs hardware focus). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coding bootcamps and other, similar, programs, such as online courses almost certainly lack both the depth and breadth of education and skill building that you should expect from a reputable Computer Science program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, businesses need computer programmers, but the  jobs they offer are not very exciting and are at a pretty low level, lacking an obvious path to a long term career. &quot;Coders&quot; work at the direction of others and have little say in what they build or much in the design process. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Still, computer science graduates often work initially as &quot;coders&quot; but, with more knowledge, can be given more responsibility. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think of programming as nothing more than a tool that helps you explore deep ideas (database, ai, machine learning, ...), but it is those ideas, not programming that is the important thing. You may need to be adept in using the tool, but it remains just a tool. It is fun, but it isn't the essence of a computer science degree. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming can get you a job, but it won't assure a career. Of course, once you are in a company, there may be opportunities for you to learn the rest of it, but a degree provides a (hopefully) well thought out curriculum that meets both the modern needs of employers and the intellectual rigor that lets you build a career either in industry or academia. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a sense of it, look at the curriculum of any reputable university. Both the required courses and the electives. That will give you a sense of the breadth required. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-23T12:31:20.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5994" PostTypeId="1" AcceptedAnswerId="6000" CreationDate="2019-10-24T16:18:34.063" Score="3" ViewCount="112" Body="&lt;p&gt;For example, words like &quot;method,&quot; &quot;puts,&quot; and &quot;object&quot; do not have as much linguistic markedness as &quot;comparator,&quot; &quot;eff-gets,&quot; and even &quot;function&quot; (because context alone at the very least conjures up the math term). So, for example, how do you make clear when explaining classes that when you say &quot;your method doesn't work,&quot; that you mean the class's function doesn't work rather than the manner in which a student is carrying out the task at hand doesn't work? My current method(!) is to never use the word with its mundane meaning in a tutoring context: &quot;In the last &lt;em&gt;session&lt;/em&gt;, the professor went over &lt;em&gt;ways&lt;/em&gt; for writing &lt;strong&gt;methods&lt;/strong&gt; for a &lt;strong&gt;class&lt;/strong&gt;.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(It may be the case that this isn't a problem for some, but in my first year, I didn't realize that &quot;for-loop&quot; wasn't jargon on the first exposure.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: People have missed the point of the question. The &lt;em&gt;names&lt;/em&gt; of certain CS concepts have more markedness (“standing-out-ness”) than the names of other concepts. Which particular concepts do not matter: “variable” sounds more like a jargon word, more like a reason to have the ears perk up and know to start taking notes, than “assignment.” When speaking out loud, how do you non-stiltedly mark jargon whose meaning may be overshadowed by a more common meaning in a non-jargon context?&lt;/p&gt;&#xA;" OwnerUserId="8043" LastEditorUserId="8043" LastEditDate="2019-10-25T00:59:05.977" LastActivityDate="2019-10-25T12:32:11.710" Title="How do you distinguish jargon from normal language in explaining a concept?" Tags="|best-practice|undergraduate|computational-thinking|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="5995" PostTypeId="1" AcceptedAnswerId="6003" CreationDate="2019-10-24T23:53:10.943" Score="8" ViewCount="830" Body="&lt;p&gt;Before I ask my question, some background may be apposite to provide context. Please indulge me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the institute I teach, our Intro to Programming. It involves a coverage of C language. We believe C is the most foundational and least verbose of most of the popular and heavily used modern languages, such as C++, C#, Java, Python etc. (you may not agree with our position, but that’s a discussion for another day). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our institute trains people in various trades and skill areas including programming. We try to attract people to programming, by allowing them to take our Intro to Programming course regardless of what they registered to learn.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our Intro to Programming class thus is a mix of different students from different backgrounds and at different levels of education (O’ level students looking to prepare for exams or learn a skill, under- and post grads, self-taught people, professional programmers crossing over to C who feel they need a sound foundation, our registered programming trainees etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We attempt to give them sound fundamentals covering history of programming, basic concepts, variables, i/o, sequential, branching and looping constructs, doing maths with C, functions, data structures fundamentals, arrays and pointers. After covering up to arrays and pointers, we teach them C-structs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My experience has been: the students learn up to arrays easily, get some trouble with pointers but get by after a lot of scaffolded and non-scaffolded exercises. However, when it comes to C-structs, it takes a lot of effort to get them to understand even the basic concepts of C-structure members and struct variables. They confuse struct members with variables and try to declare or access members the way they would an ordinary variable as I would show below.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Though I try to make the concept of structs as intuitive as possible, I run regularly in to this confusion in students. Consider this snippet below, as a typical example of what I use to introduce structs.  The example, struct &lt;code&gt;MyshoppingCart&lt;/code&gt; has 3 members (&lt;code&gt;orangeNos&lt;/code&gt;, &lt;code&gt;grainKgs&lt;/code&gt; &amp;amp; &lt;code&gt;meatKgs&lt;/code&gt;) and 3 variables: my cart content for Monday (&lt;code&gt;cartM&lt;/code&gt;), for Wednesday (&lt;code&gt;cartW&lt;/code&gt;) and my cart contents for Sunday (&lt;code&gt;cartS&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;struct MyshoppingCart   // struct definition&#xA;{&#xA;  int orangeNos;&#xA;  float grainKgs;            // struct members&#xA;  float meatKgs;&#xA;} cartM, cartW;     // struct variables declaration type 1&#xA;&#xA;int main()&#xA;{&#xA;    struct MyshoppingCart cartS;  // struct variable declaration type 2&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;With a simple struct like this, students show three difficulties.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you tell them &lt;code&gt;cartM&lt;/code&gt; and &lt;code&gt;cartW&lt;/code&gt; in the example above are struct variables, they ask why then are they not declared inside as members like &lt;code&gt;int orangeNos;&lt;/code&gt; and &lt;code&gt;double grainKgs;&lt;/code&gt; If I explain they are not inside because they represent an instance of the structure, they get more confused.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If I try to explain different ways to declare struct variables i.e. method 1: right after and following the closing brace of the struct definition and method 2: inside main using the name of the structure as prefix, the confusion increases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It takes lengthy explanation and many examples to get some semblance of understanding from many of the students.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When you get to accessing members of the structure and you tell the students, we can do this by using the dot notation as in:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;(Code example)&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;cartM.orangeNos = 5;&#xA;cartS.meatKgs   = 3.7;&#xA;printf(&quot;No of oranges in my Monday cart is %d\n&quot;,  cartM.orangeNos);&#xA;printf(&quot;Mass of Meat in my Sunday cart is %.2f\n&quot;, cartS.meatKgs);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A student will just go ahead in accessing say &lt;code&gt;orangeNos;&lt;/code&gt; to write something like:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;printf(&quot;No of oranges in Monday cart is %d \n&quot;, orangeNos);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;You tell him/her it’s wrong and: All hell just gets foot lose! They… just…. don’t …. get it …..EASY! He/she gets more confused!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My Question is:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Are these difficulties symptoms of cognitive overload? Or what could be the likely problem?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have tried questioning students, but I have not gotten answers that may give me insight to the root of the problems. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone encountered similar problems teaching C-structs and how did you overcome it; getting students to learn it like a breeze? Please share your experiences or even suggestions you think might help me make learning structs easier and less herculean for my students.&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8651" LastEditDate="2020-02-05T20:14:41.030" LastActivityDate="2024-02-16T21:23:14.667" Title="Students' confusion over C structure members and structure variables" Tags="|best-practice|teaching-analogy|programming|c|c++|" AnswerCount="6" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="5996" PostTypeId="2" ParentId="5994" CreationDate="2019-10-25T00:02:12.667" Score="2" Body="&lt;p&gt;Actually, a &lt;em&gt;static&lt;/em&gt; method of a class is the same as a function. The context that is available in the body includes the parameters and the containing (non local) variables. But an ordinary (non static method) is different. It also has as its context the actual object that was sent the &lt;em&gt;message&lt;/em&gt; that invoked the method. So, the concepts are different and if you don't get that part the whole meaning of OO programming can be lost. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You &quot;call&quot; a function (static method), but you send a message to an object, via some reference variable that refers to an object of some class. The actual class may not be obvious (or even knowable) from the text of the program without executing it. The class of the object actually determines how the message is handled (which method is invoked). It isn't the text of the program, but the dynamic behavior of it that matters. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, consider a list that contains objects of some class along with objects of its subclasses. It is heterogeneous in a certain well defined way. You insert into that list in some way and later, at a different part of the program you want to process all of the objects in that list. So you get an object and you send it a message. If the message is defined in the superclass then the objects of subclasses will understand it, but each might have the message implemented with a different method. When you extract the object from the (heterogeneous) list you don't actually know what class it has other than that it conforms in some way to the protocol of some superclass. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you can follow the above, you may start to see how important the language actually is and how misleading it can be to use simpler, but inaccurate, language. Dynamic dispatch is the essence of OO programming and what really distinguishes it from other paradigms. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-25T00:02:12.667" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5997" PostTypeId="2" ParentId="5994" CreationDate="2019-10-25T00:06:01.220" Score="2" Body="&lt;p&gt;It is a CS class isn't it? You cannot refuse to use the language of the trade simply because it may have a different meaning for beginners. By all means use the jargon. That may help reinforce the concept in the students' minds. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You just may need to put the extra effort to disambiguate frequently by adding say: I mean your program method. We do this every where. Forexample, a Physics teacher may tell students the field near the GSM tower is strong &amp;amp; then add something like: I mean the electromagnetic field. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the jargon bro: they are the more precise scientific terms. Any euphemism or &quot;by-pass&quot; may end up beclouding the concept and befuddling the students.&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-10-25T00:26:13.640" LastActivityDate="2019-10-25T00:26:13.640" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5998" PostTypeId="2" ParentId="5995" CreationDate="2019-10-25T11:17:53.190" Score="5" Body="&lt;p&gt;You are teaching a fundamentally low level language. It is intentionally close to the hardware. Initially it was intended as a high level assembly language for one of the early computers of the Digital Equipment Corporation (a PDP-7).&lt;/p&gt;&#xA;&lt;p&gt;So, having chosen that, you might as well teach it according to its design. A &lt;code&gt;struct&lt;/code&gt;, fundamentally, is a &amp;quot;structured value&amp;quot;, a complex sort of thing with named parts. It represents a contiguous block of bits with entries at various points. So a value of type &lt;code&gt;MyShoppingCart&lt;/code&gt; is a block of (say) 80 bits where various parts of it are named. So &lt;code&gt;orangeNos&lt;/code&gt; is a name for the first (say) 16 bits of that block, etc. Those are the members: parts of the whole. A &lt;code&gt;float&lt;/code&gt; is a simpler sort of &lt;em&gt;value&lt;/em&gt;, having only one part visible in C (though internally it is also structured.&lt;/p&gt;&#xA;&lt;p&gt;Now a struct &lt;em&gt;valued&lt;/em&gt; variable, such as &lt;code&gt;cartM&lt;/code&gt; or &lt;code&gt;cartF&lt;/code&gt;, is a block of all (say) 80 bits. A given program might have several of these.  But &lt;code&gt;orangeNos&lt;/code&gt; has no independent meaning other than as part of some &lt;em&gt;particular&lt;/em&gt; block of bits: the &lt;code&gt;orangeNos&lt;/code&gt; &amp;quot;section&amp;quot; of that block. So, &lt;code&gt;orangeNos&lt;/code&gt;, itself, has no value, but &lt;code&gt;cartM.orangeNos&lt;/code&gt; does. &lt;code&gt;cartM&lt;/code&gt; is a block of bits. &lt;code&gt;cartM.orangeNos&lt;/code&gt; is an entry point into &lt;em&gt;that&lt;/em&gt; block. But &lt;code&gt;orangeNos&lt;/code&gt; itself has no meaning since no particular block is being referenced.&lt;/p&gt;&#xA;&lt;p&gt;If you want to get even closer to the machine, &lt;code&gt;cartM&lt;/code&gt; is actually the machine memory address of a block of bits. &lt;code&gt;cartM.orangeNos&lt;/code&gt; is a machine address of a location within the block that &amp;quot;starts&amp;quot; at address &lt;code&gt;cartM&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I'll note that other, higher level, languages don't need to be explained in terms of machine code, but since C is already at that level, you might just as well point out the, rather simple, mappings.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;An array is also a structured value. It is homogeneous in structure, so each part has the same size, enabling indexing. A struct is heterogenous, so indexing doesn't work (not simply, at least).&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2024-02-16T21:23:14.667" LastActivityDate="2024-02-16T21:23:14.667" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="5999" PostTypeId="2" ParentId="5995" CreationDate="2019-10-25T12:19:50.937" Score="7" Body="&lt;p&gt;First off, if your students are truly mastering pointers on their first course, hats off to you. That's quite a lot of material to pack into a semester.&lt;/p&gt;&#xA;&lt;p&gt;Structs involve a mess of abstractions not present in anything you mentioned before in your course. What you are doing involves:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;user-defined&lt;/em&gt; types&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;instances&lt;/em&gt;,&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;dot-notation&lt;/em&gt;, which is &lt;em&gt;syntactically inconsistent&lt;/em&gt; with array notation (i.e. &lt;code&gt;arr[7]&lt;/code&gt; vs &lt;code&gt;arr.7&lt;/code&gt;), but otherwise essentially identical.&lt;/li&gt;&#xA;&lt;li&gt;A side effect statement in which you declare your type and your variables together, in one statement.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I suspect that each one of these requires breaking down and practice.  The last one, in particular, might not be worth the time.  You don't actually need it, and side-effects should be approached with caution in any case.  They cause confusion even for experienced programmers.&lt;/p&gt;&#xA;&lt;p&gt;One intuitive case to practice is with some simple geometry and a &lt;code&gt;point&lt;/code&gt; struct.  For some reason, my students find &lt;code&gt;p1.x - p2.x&lt;/code&gt; intuitive, and this gives them a bit of practice using instances without a lot of struggle.  This understanding doesn't always translate to other structs, however.  Instances really are a strange concept, and, at least in my classroom, it takes a while to hammer it home.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2024-02-10T12:44:29.640" LastActivityDate="2024-02-10T12:44:29.640" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6000" PostTypeId="2" ParentId="5994" CreationDate="2019-10-25T12:32:11.710" Score="3" Body="&lt;p&gt;In direct answer to your question: not much.  I keep my approach here very simple.  I do as I would for any other time that a word could have two meanings.  If the word use feels ambiguous, I clarify which version I mean.  If it doesn't, I let it stand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It sounds like you're trying to put a lot of careful discipline into your speech patterns.  There's nothing wrong with that; it's admirable!  It may even help to stem a bit of confusion, but I honestly haven't found that being more relaxed (and clarifying as needed) has caused many roadblocks for my students, so I don't worry about it too much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I do occasionally discuss trap words when first introducing them, just to make clear to my students that there are now two meanings in play.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-10-25T12:32:11.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6001" PostTypeId="1" CreationDate="2019-10-25T16:39:39.217" Score="1" ViewCount="94" Body="&lt;p&gt;I am planning to make a free JavaScript online video series. The first chapter covers the Javascript history and its capabilities. Following is a transcript of the video.&lt;/p&gt;&#xA;&lt;p&gt;I would like it to be reviewed by someone good at JavaScript. Check for the correctness, the accuracy of facts, and any other suggestions or improvements that might seem necessary. I would especially require scrutiny in the 'abilities' section of the script to see if the definitions hold true.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Javascript History and Capabilities&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;JavaScript was created at Netscape Communications by Brendan Eich and his team in 10 days, in May 1995.&#xA;Its syntax and functionality were inspired by Java, Scheme, and Self.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Javascript was first named as Mocha, later renamed as LiveScript.&#xA;LiveScript was again renamed to JavaScript to gain popularity as the 'younger brother' of Java&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;JavaScript was meant to manipulate web pages by modifying the DOM to show, hide or change content dynamically&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is used for online form submissions and animations.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is the Defacto client-side scripting language of browsers, a popular choice on servers as well.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;ECMAScript is a scripting language specification standardized by Ecma International, it is a set of guidelines to design a scripting language. JavaScript is an implementation of ECMAScript&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Javascript is a scripting language since it is interpreted by browsers and there is no intermediate compiled code.&#xA;Modern browsers now use JIT compilers to 'semi compile' it in order to optimize its execution&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Javascript is single-threaded to minimize complexities with concurrency&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In browsers and servers Javascript codes are parsed (read) inside an environment called Javascript Engine.&#xA;Javascript engine compiles it to machine language and instructs the OS to execute the instructions&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Some notable javascript engines are&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;V8 – in Chrome and Opera.&lt;/li&gt;&#xA;&lt;li&gt;SpiderMonkey – in Firefox.&lt;/li&gt;&#xA;&lt;li&gt;ChakraCore - in Microsoft Edge.&lt;/li&gt;&#xA;&lt;li&gt;Nitro or SquirrelFish - in Safari&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Abilities&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;can run multiple tasks simultaneously without blocking any of the tasks (Asynchronous)&lt;/li&gt;&#xA;&lt;li&gt;can exchange data asynchronously with a server across a network (Fetch API or AJAX)&lt;/li&gt;&#xA;&lt;li&gt;can react to user actions such as mouse click, keypress, etc (event handling)&lt;/li&gt;&#xA;&lt;li&gt;can switch between tasks in a single-threaded execution (concurrency)&lt;/li&gt;&#xA;&lt;li&gt;can make use of object-oriented concepts (prototype-based Object Model)&lt;/li&gt;&#xA;&lt;li&gt;can manipulate DOM of the browser to change the display of the webpage&lt;/li&gt;&#xA;&lt;li&gt;can store data locally on browsers (cookies, local storage, etc)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Restrictions placed in the browser for the sake of data safety&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Does not provide low-level CPU and memory access&lt;/li&gt;&#xA;&lt;li&gt;Cannot implicitly access files or OS functions&lt;/li&gt;&#xA;&lt;li&gt;users need to explicitly provide file access by input tags as well as for input device access such as camera and microphone, cannot access other tabs of the browser.&lt;/li&gt;&#xA;&lt;li&gt;It follows the 'same-origin policy' wherein javascript from one domain cannot access resources from a different        domain if it doesn't have a CORS header&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Javascript running on the server side have full access to the file system, input devices, and OS functions. it does not follow      'same-origin policy'&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Javascript Capabilities depend on the implementation of the javascript engine and the interfaces provided to it by the environment.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Other languages compile into javascript which is then parsed by javascript engines.&#xA;One such notable language is TypeScript which adds strict typing and object orientation.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8543" LastEditorUserId="9279" LastEditDate="2020-07-08T11:44:00.070" LastActivityDate="2020-10-15T22:32:45.687" Title="Need review of course content: Javascript History and Capabilities" Tags="|javascript|curriculum-review|lesson-review|materials-review|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6002" PostTypeId="2" ParentId="5995" CreationDate="2019-10-25T23:28:22.647" Score="5" Body="&lt;p&gt;Try explaining to your students the concept of a product type using a simple notion of an x,y-coordinate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We can illustrate a notion of pair of (integer) coordinates as an integer array of size 2.&amp;nbsp; Whenever we need to access the x-coordinate, we access &lt;code&gt;[0]&lt;/code&gt; element and y-coordinate, the &lt;code&gt;[1]&lt;/code&gt; element, for example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A struct also does this &amp;#8212; however, introducing a name for each position, and syntax for these accessing elements instead of using subscripting (while in C the struct construct also removes the ability to index by number).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A struct also has the following differences from an array:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A struct can have different members of different data types, whereas an array has all the same members.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A struct variable can be assigned and passed by value like a primitive type, whereas there is no notion of assigning or passing an array by value in C.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A struct will fail type match with another struct of the same composition but different type name &amp;#8212; structs in C use nominal type matching, whereas arrays of same (element) declaration will succeed in type matching (they use structural type matching).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2019-10-25T23:28:22.647" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6003" PostTypeId="2" ParentId="5995" CreationDate="2019-10-26T16:15:29.523" Score="4" Body="&lt;p&gt;I'm not convinced that the issue is necessarily related to using a language like &lt;strong&gt;C&lt;/strong&gt;, or even cognitive overflow. I think that students often need a number of examples to illustrate a concept to be able to find the paradigm that works for them. Sometimes aspects of the example themselves use things that they cannot immediately relate to from the real world.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I see that @ErikEidt suggested using X,Y co-ordinates. This is one example that would work if the students have used graphical co-ordinates. Another one that is based on mathematics would be complex numbers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Examples that I have often used is a library catalogue entry where books are described by author and title, and another one is a bank account record where information like customer name, address and account number are used, then again online customer records with name, address, item and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students just learn by repetition repetition. Just showing them one example and then asking for an assessment will only work for the most quick minded students in the class who may have understood the concept already.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is not about &lt;strong&gt;C&lt;/strong&gt; per-se, or any language, but showing enough examples of a concept in use until the average (or even below average) student manages to grasp the concept. &lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2019-10-26T16:15:29.523" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6004" PostTypeId="2" ParentId="5995" CreationDate="2019-10-26T22:01:49.470" Score="4" Body="&lt;p&gt;@Ben said most of what I was about to write. However I have one more thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The example is terrible. A shopping cart for a shop that sells exactly 3 things, nothing more and nothing less, and never will it change. This is an alien enough concept, to confuse them. They know what a shop is, and this type of shop does not exist. They will try to match the code to what they know about shops and fail.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore chose a different model. &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2019-10-26T22:01:49.470" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6005" PostTypeId="1" AcceptedAnswerId="6008" CreationDate="2019-10-29T00:33:57.060" Score="3" ViewCount="197" Body="&lt;p&gt;What will be a simple analogy to use in teaching non-CS people the concept of interrupt as part of OS topic?&lt;/p&gt;&#xA;" OwnerUserId="8489" LastActivityDate="2019-10-30T05:36:07.317" Title="Analogy to teach beginners the concept of interrupt" Tags="|teaching-analogy|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6006" PostTypeId="2" ParentId="6005" CreationDate="2019-10-29T11:38:51.147" Score="3" Body="&lt;p&gt;Fire alarm goes off during exam. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nasty uncle Ben shows up in the middle of supper. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tire blows out while driving.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Student raises hand during lecture. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Baby wakes up in the night, screaming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Anything in general, that happens without warning and that requires attention or action of some kind. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-10-29T11:38:51.147" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6007" PostTypeId="2" ParentId="6005" CreationDate="2019-10-29T13:20:08.660" Score="1" Body="&lt;p&gt;A good analogy would be (sorry, smartphone ringing, i've got to leave)&lt;/p&gt;&#xA;" OwnerUserId="2103" LastActivityDate="2019-10-29T13:20:08.660" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6008" PostTypeId="2" ParentId="6005" CreationDate="2019-10-30T02:29:04.083" Score="3" Body="&lt;h1&gt;Classroom activity.&lt;/h1&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A. &lt;strong&gt;The prep.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Some project requiring a few minutes of the students' time. Writing down definitions from the board, or researching something online. Anything which fits within the normal operations of the class, and requires each student to do their own work and excludes other activities.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A useful possibility here would be to create some defined directory structure on their local/lab computer, including starter source files, which will be needed for later code projects. (If the students have workstations and the course will involve code work in the following weeks.)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;A small project, or a few such, which one student can be asked to do during class. Hand back graded papers, distribute lesson materials, move a table, etc. &lt;/li&gt;&#xA;&lt;li&gt;A tennis ball, ping-pong ball, or Nerf ball. Something light, and safe to use in the classroom. If available, a ball large enough to require both hands to catch would be best.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;B. &lt;strong&gt;The activity&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;At any point during the class period, at the beginning is not required, assign the main task above to the students.&lt;/li&gt;&#xA;&lt;li&gt;At the point when the students should be approximately one-third done with the task, ask one to perform the simple task. If there are multiple simple tasks planned, they can be started in a staggered manner, or they can be performed one at a time. In the case of more than one simple task, allow all but the final one to be completed, and the involved students to return to the originally assigned task.&lt;/li&gt;&#xA;&lt;li&gt;While the final, or only, task is being performed, surprise the student performing it by telling them to &quot;think fast&quot; or &quot;catch this&quot;, and toss the ball to them with barely enough time to react.&lt;/li&gt;&#xA;&lt;li&gt;Allow the final simple task to be completed after the ball has been tossed, and allow all the students to complete the main task.&lt;/li&gt;&#xA;&lt;li&gt;Proceed with the lecture, or discussion, on interrupts.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;C. &lt;strong&gt;Taking points&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;While the OS is loaded, the computer is always &lt;em&gt;doing&lt;/em&gt; something. Typically the on-screen clock is updated in most windowed environments. Who know what &quot;housekeeping&quot; activities are happening under the hood. If nothing else, the system is looking for further instructions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prior to the assignment being given, the students were &lt;em&gt;doing&lt;/em&gt; something. Thinking about the last class, planning what to do after class, looking at the clock, or, at the very least, waiting for what you would say next.&lt;/li&gt;&#xA;&lt;li&gt;The primary assignment was an example of &lt;em&gt;event-driven&lt;/em&gt; operations, where the system is idle until something is requested. The user launches a program, for example. The request is handled, and then the system goes idle again, awaiting another event to respond to.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;While following instructions, the system is also monitoring other sources of instructions; interrupts. A normal interrupt causes the system to pause one task, at some convenient point, and process the new request. Completion of the new request is followed by resuming the original, or interrupted, task.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When asked to perform the simple task, the affected student did not stop immediately and begin the new task. They did not stop writing mid-stroke on a letter, or probably even mid-word, if writing. They did, however, pause the main activity to handle the simple assignment, and returned to complete the main activity once they had accomplished the simple request.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Different tasks and interrupts have different priorities, and when, or even if, the system responds to them depends on relative priorities of the task to be interrupted and the interrupt itself.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each student involved did their own &lt;em&gt;scheduling&lt;/em&gt; around the simple tasks. Completing a letter, work, line, thought, or sentence was their choice. None of them (hopefully) assigned a low enough priority to the simple task as to complete the main assignment before starting the simple task.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;In some systems there are interrupts with an assigned priority as to be unavoidable. Factory floor robotics &lt;strong&gt;must&lt;/strong&gt; respond to a safety sensor, for example. The computer might ignore most pressed keys if something is running. &lt;kbd&gt;CTRL&lt;/kbd&gt;+&lt;kbd&gt;C&lt;/kbd&gt; is often an exception to that rule. &lt;kbd&gt;CTRL&lt;/kbd&gt;+&lt;kbd&gt;ALT&lt;/kbd&gt;+&lt;kbd&gt;DEL&lt;/kbd&gt; is almost always an exception, in Microsoft Windows anyway. Such interrupts are often called &lt;em&gt;priority&lt;/em&gt; interrupts.&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Catching the ball was not planned by the receiving student, yet the response was instantaneous, even if the ball was dropped.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;D. &lt;strong&gt;Bonuses&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If there was more than one simple task applied, and two, or more, were being done at the same time, multi-core threading can be discussed.&lt;/li&gt;&#xA;&lt;li&gt;If, when trying to catch the ball, the student dropped the papers, or somehow &lt;em&gt;messed up&lt;/em&gt; the task, you can discuss security exploits which operate on &lt;em&gt;exceptions&lt;/em&gt;; divide-by-zero errors, segmentation faults, etc.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2019-10-30T05:36:07.317" LastActivityDate="2019-10-30T05:36:07.317" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6009" PostTypeId="2" ParentId="6005" CreationDate="2019-10-30T05:14:50.380" Score="0" Body="&lt;p&gt;I would use the example of when one thought runs into another in your head, and two words are interleaved as a result, for example if you're trying to say &quot;awesome&quot; and also &quot;exciting,&quot; you'll say &quot;awe -- citing&quot; or &quot;ex -- some.&quot; This is because the process of you saying one word has been interrupted by some thought and jumped to saying another word. I think that this is an experience that many people have had, and really accurately gives the &lt;em&gt;feeling&lt;/em&gt; of an interrupt, i.e. an immediate involuntary jump to something else.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if you're looking for an analogy which will better lead to some kind of project or programming insight, this may not be the best analogy.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-10-30T05:14:50.380" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6010" PostTypeId="2" ParentId="5935" CreationDate="2019-10-30T11:28:23.913" Score="4" Body="&lt;h2&gt;Knowing how to use a tool is different from knowing why/when to use a tool&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;At a basic level, there is a difference between having certain skills and learning to apply/orchestrate these skills to achieve something more complex.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Forrest Gump was a good runner, but had no knack for understanding American football and needed to be told to run when it was time for him to run. Forrest has a skill (running), but was notoriously incapable of seeing the bigger picture (how to win a football match). This is made painfully clear when Forrest does not stop running when he reaches the endzone, instead running into the stadium.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In order for students to orchestrate the separate skills they have (iteration, calculation, ...) they must first be comfortable with the skills themselves and know them like the back of their hand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now, your students are Forrest Gump. You taught them to run. You have not yet taught them how to decide for themselves why/when/where they should run and why/when/where they shouldn't.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Breaking down the problem is a skill on its own&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Additionally, understanding that a complex challenge can be solved using an orchestration of basic skills requires your students to learn how to break down the problem.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;They seemed to &quot;get&quot; these other things, but when it came to looking at code and trying to apply the same logic, they just straight up had no idea what to do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Based on your description, I infer that you're expecting this to automatically happen, but that's not the case.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;After a long time they were not able to grasp the problem, and I didn't feel comfortable literally just telling them the answer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a teacher, if your students do not know the answer, it's counterproductive to withhold the answer from them. It's akin to the old &quot;if you don't know what's wrong then I'm not going to tell you&quot; joke. Clearly, the fact that they are not finding the solution means that they are currently unable to find the solution. Withholding the answer perpetuates the issue and is going to lead to dispirited students who no longer care to look for the answer when they don't know the answer yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach them to break down the problem &lt;strong&gt;without touching any code&lt;/strong&gt;. Walk them through the problem description, and analyse the issue to see if you can break it down into smaller steps.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In theory, you should never tell them how to solve it. All you should do it break down the problem in smaller and smaller steps until your students realize that they already know how to solve these (sufficiently small) steps. Depending in your students' skill level, you may have to break things down repeatedly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they &lt;em&gt;really&lt;/em&gt; aren't getting it, then it's time to consider if the students have have enough exposure to the rudimentary skills that you're asking them to orchestrate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you break down a complex problem down to e.g. number addition and students still don't respond to it (&quot;I know how to solve &lt;em&gt;that&lt;/em&gt; part&quot;), then you're either dealing with disinterested students or students who aren't comfortable with the basics yet.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Functions are essential constructs toward abstraction&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I think part of the issue is that they have yet to cover functions, which would make it a whole lot easier: abstract away the Q1 part of the question, and thus make it easier for them to make that leap.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Yes, this is probably the biggest factor in why they're not thinking in abstracted terms. However, it's not so much that they should already know functions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you introduce functions with simple examples that do not yet warrant functions, then students are left wondering what the purpose of a function is other than &quot;to put things elsewhere&quot;. Coincidentally, my wife is taking a beginner's development course and this is exactly the stage they are at.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather, this is the exact moment for you to introduce functions. Let them solve Q1 on their own, and then refactor Q1 to use a function. Tell them that it's the same solution but in a different form and do not elaborate on the purpose of functions yet; only explain how it works.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, when you let them tackle Q2, let them do it by themselves, without any suggested &lt;code&gt;for&lt;/code&gt; loop. Wait for them to make the mistake of copy/paste repeating themselves. More importantly, &lt;strong&gt;let them make that mistake&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When they've made that mistake, present a (fictional) Q3 in which you ask for them to perform this calculation for one million numbers, and then look as they all sigh and moan about the challenge.&lt;br&gt;&#xA;Alternatively, you could phrase Q3 as a change to the calculation logic, which will require them to change all instances of their copy/pasted code. Bot options lead to the same result: unhappy students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you've created the perfect audience that is incentivized to learn about method abstraction and how to prevent copy/pasting in code. Refer them back to your Q1-with-a-function solution. Work out Q2 using that pre-existing function. Work out Q3 with that same function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This will convey the importance of abstraction (functions) as opposed to brute force (copy pasting). Work smarter, not harder.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;A practical example&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Pythagorean theorem - calculate the hypotenuse of a right angle triangle when given the length of the other sides.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;We all know the theorem, where &lt;code&gt;c&lt;/code&gt; is the hypotenuse:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;c² = a² + b²&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or when we solve for &lt;code&gt;c&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;c = √(a² + b²)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;But how do you write an application that finds the value of &lt;code&gt;c&lt;/code&gt;?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a developer, you immediately start breaking it down into core tasks: addition, squaring (or multiplication), square rooting.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;But your students aren't going to think this way&lt;/strong&gt;. So far, they've been introduced to problems for which there was an explicitly existing tool. Their first few challenges were all one-trick-ponies, i.e. they could be solved by knowing a particular keyword and implementing it.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Logically, they are going to expect that this challenge (just like the ones before) will have a simple one-keyword-answer, which it doesn't. Walk them through it. Tell them there is no short answer to this, they must cobble something together with what they know. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Present the challenge to your students, and ask how they are going to solve this. If no one starts breaking down the problem, ask them to do the math manually: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What is the length of the hypotenuse when the length of the other sides is 3 and 4?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When they tell you the right answer (5), ask them to show their working out. What you will get is a &lt;strong&gt;written-word-pseudo-code answer&lt;/strong&gt; to the programming challenge. Something along the lines of:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;em&gt;I squared the 3 and the 4, I added them together, and then I calculated the square root.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As they explain this, write it down:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Square the numbers&lt;/li&gt;&#xA;&lt;li&gt;Add them together&lt;/li&gt;&#xA;&lt;li&gt;Take the square root&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;And now ask them if they know how to solve any of these bullet points individually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you will get students who see that the complex challenge (Pythagorean theorem) is nothing more than a combination of simpler challenges (multiplication/squaring, addition, square rooting) which they already know the answer to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To really sell it, you could enforce that the challenge must explicitly break down the problem into these three steps:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Enforce that students make four separate methods:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;calculateSquare(x)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;add(x,y)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;calculateSquareRoot(x)&lt;/code&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;calculateHypotenuse(a,b)&lt;/code&gt; where you've explicitly disallowed any direct calculation and are only allowing them to declare/assign variables and call the other three methods.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;If the students still seem to struggle doing this on their own, split the students into groups of three, where each student tackles &lt;strong&gt;one&lt;/strong&gt; of the three &quot;simple&quot; methods. &#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When they are finished creating their own methods, they can then work together at implementing the main &lt;code&gt;calculateHypotenuse(a,b)&lt;/code&gt; method which will rely on the methods they just created.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-10-30T12:26:35.493" LastActivityDate="2019-10-30T12:26:35.493" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6011" PostTypeId="2" ParentId="5943" CreationDate="2019-10-30T13:56:56.577" Score="3" Body="&lt;p&gt;A loaf of bread, a knife, a jar of peanut butter and a jar of jelly.  Write an algorithm to build a PB&amp;amp;J.  Have one of the kids follow the literal direction written by a different kid.  This project have been a favorite starter for algorithms for 30 years.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-10-30T13:56:56.577" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6012" PostTypeId="1" AcceptedAnswerId="6014" CreationDate="2019-10-31T21:58:43.250" Score="2" ViewCount="187" Body="&lt;p&gt;I am trying to make studying computer science interesting for freshmen students. This will help them apply what is taught in the class to real life projects. My intention is to divide the class into groups and have them select a project from list of projects. These projects must be fun and not discouraging to attempt. It needs to be something they can reflect on after a few years from now and be happy they worked on it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I currently do not have great list of fun projects for them. Please can anyone assist direct me to a resource or text book that will help out or share a list of projects.&lt;/p&gt;&#xA;" OwnerUserId="8570" LastEditorUserId="1293" LastEditDate="2019-11-01T09:39:44.480" LastActivityDate="2019-11-01T20:12:10.097" Title="Undergraduate Computer Science Projects" Tags="|project|computational-thinking|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6013" PostTypeId="1" CreationDate="2019-10-31T22:06:22.757" Score="2" ViewCount="82" Body="&lt;p&gt;I'm about to start teaching a class of 10 people. I do it for free, and I search after a platform for home assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That platform should be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt; 1. Free&#xA; 2. Support multiple users and multiple assignments&#xA; 3. Allow me to comment on specific lines of their code&#xA; 4. (Ultimately) allow them to change their solution without cleaning the comments&#xA; 5. Very simple for solution submission (no SCM systems involved)&#xA; 6. Could be or not be self-hosted&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Is there any known system that has these features?&#xA;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6859" LastActivityDate="2019-11-01T14:49:43.507" Title="Platform for annotating students' code assignments" Tags="|classroom-management|assessment|classroom-environment|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6014" PostTypeId="2" ParentId="6012" CreationDate="2019-11-01T12:03:20.410" Score="2" Body="&lt;p&gt;Nna, its a challenge always. Your question resonates with me. I was and still is at the same situation where I am looking for interesting projects for my coding students. You asked for online resources or books or a list. I will share general principles I came to of how to create interesting projects in my similar difficulties (more difficult because I work in a developing country where resources aren’t easily available, and internet service is expensive and sometimes erratic). I’ll share specific examples in some cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Before that note something: in view of the level of your students, they may not do great projects “they can reflect on …” and use later yet because of their limited knowledge and experience. However, for beginner what you should strive at is to give them work that will exercise, stretch and consolidate their coding muscles.&#xA;My suggestions may not work for you. If they don’t I hope they stimulate enough tangential thinking in you that gets you there. Amen.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now some “thinkPoints;” for students’ coding projects:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On strategy for giving projects: For freshmen, generally don’t expect “big” projects, give baby projects that are either stand-alone or parts of a bigger project which the students have to tie together at the end of their second semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;consider posing problems from subjects they take or which you or them can find material for them to understand the issues involved e.g.&#xA;For Maths: Algebra, Coordinate Geometry, Arithmetic and Numerical analysis, Matrices, solving cubic equations, simultaneous equations etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For Physics: areas of interest may be topics in Mechanics like program to resolves or compose for forces, a program that takes input of any combination of time, distance and velocity etc. and automatically selects and uses the appropriate equation of motion to compute the required value. Smaller projects may be calculating linear &amp;amp; cubic thermal expansivities, receiving gas process inputs and the program making a judgement whether the process is isothermal, isochoric, adiabatic etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If they take general studies courses like Economics or are majors of it, better. Give them to develop a program that takes as input prevailing interest rates, liquidity rates and other macro-economic variables (you deem necessary), analyse them and give a prescription of whether the economy is on course, overheating or about to go bust. A more micro project will be like asking them to develop a program that calculates elasticity of demand and advise whether the demand is elastic, inelastic, unitary elastic etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For medical people or even others, let them build a program that calculates Body Mass Index (BMI) given height and weight of a person, use the derived value to advice a patient if he/she is obese  etc. and whether he/she is predisposed or not to hypertension and allied obesity diseases. The program should make a prescription of diet, drugs or life style change as is appropriate&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other subject matter, business or operational areas, Etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Where you or your students have no expertise in a subject matter in which you see an interesting project topic like the BMI example above, get a subject matter expert to prepare you a project background info paper that provides basic understanding. Take your students through and tell them to go read up more. That’s what every programmer does in subject matters areas (and there are many) of which we have no training or knowledge.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Set up academic type projects: E.g.&#xA;A menu-driven quiz that allows user choose a subject to take quiz from. The user picks any random number from a range of numbers of questions (“Enter any Question number you want to answer between 1 – 10”), is presented a question and allowed to choose an option or enter some text as answer. The score is announced and cumulated with previous scores and he/she chooses another question to answer till he/she decides to stop. At the end he/she is told his/her scores and congratulated or encouraged to try better next time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A program that presents small amounts of materials as part of a lesson, allows student to branch of to find any further information. At certain points in the lesson, the user is given and graded on short quizzes before proceeding to next lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Program to receive raw test/exam scores, convert them to letter grades (A, B, C etc.), and grade points (4.0, 3.5, 3.0 etc.), calculate G.P.A and C.G.P.A, highlights areas of students best performance and advises where the student can improve next term/semester then prints an e-mail to the student, faculty and his/her parents.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A synonym/vocabulary game where the system puts up a definition/usage or synonym and the student has to supply or choose from options, the correct word or synonym.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take a problem you have in the operations or processes of the department or institution or personal life of the students and use as coding project. In these matters, involve the students. Ask their ideas, you may be surprised at the bountiful harvest of project topics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For online resources, the easiest place to find good projects are the competitive coding sites like Codebyte, Project Euler, HackerRank, Codewars, CodeChef etc. However, as @Buffy has pointed out earlier, students could go to the sites too. &amp;amp; they could copy and paste code for you therefore doing nothing. So, always borrow project concepts from these sites and give it your own twist, complication and/or a local dimension that they can’t find easy online. &amp;amp; test google your final assignment concept to see if you too find anything thus verifying if they can easily “copy and paste” answers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope even if you find nothing you can use here, your creative juices will have been stimulated to get you thinking of problems for students “baby” coding projects.&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-11-01T20:12:10.097" LastActivityDate="2019-11-01T20:12:10.097" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6015" PostTypeId="2" ParentId="6013" CreationDate="2019-11-01T14:49:43.507" Score="2" Body="&lt;p&gt;I was not aware of GitHub ClassRoom as mentioned by @Ryan_Nutt above, but I have been using repl.it for &lt;a href=&quot;https://repl.it/site/docs/classrooms/intro&quot; rel=&quot;nofollow noreferrer&quot;&gt;classroom&lt;/a&gt; coding exercises.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It will do auto-correction (based on unit-tests or output matching) and will allow commenting.  Students do not need to be able to use git, and can code their solution in an ide or online. Pasting their code in will let them test if it passes.  You can view and comment on their code, albeit not an inline comment you can reference the line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is free.  I link to it from Moodle and with the link the class can &quot;join&quot; my repl class.  It also lets them save code in the cloud so that code from class can be saved online and therefore accessible from home.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's worth a look and could be built up over time (exercises etc.). I have 10 in my class at the moment, am teaching with Python, and was able to import 115 questions another teacher had created, so there is opportunity to get up an running relatively quickly.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an aside, I did find that creating questions from fresh a bit cumbersome but some of this may be because I found it difficult to even get started making a classroom at the beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this might be of some benefit to you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sean.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2019-11-01T14:49:43.507" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6016" PostTypeId="1" CreationDate="2019-11-01T18:18:26.233" Score="2" ViewCount="144" Body="&lt;p&gt;I've been mulling this over for several hours, and have looked at a tangentially related question &lt;a href=&quot;https://cseducators.stackexchange.com/questions/430/problematic-student-at-a-very-high-level/445#445&quot;&gt;here&lt;/a&gt;.  That question was about making a task more challenging for a &quot;more confident&quot; learner. I have what I call &quot;hacker versions&quot; of programming tasks in code, such as producing a GUI version of RPSLS rather than the CLI style we do initially in class.  There were no extra points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Here, I was wondering can I/ should I have a &quot;simplified&quot; assignment that would be &quot;easier&quot; and be weighted &quot;downwards&quot;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The class have previously completed a use case (table and diagram) for accessing a course on Coursera, so they had to identify a range of use-cases, including identifying 'extend' and 'include' cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I teach a course (introductory) in software architecture at roughly the level of first year in third level.  The outline for the assessment (1 of 8 summative assessments) states &quot;Derive a test case from a provided use case&quot;.  Examples in class were the &quot;classic&quot; ATM test-case, as well as a vending machine and an e-payment site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the same time, in another module (code) we used the doctest module (Python) with the testmod() function to check test cases in the docstring.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/0P4Xb.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/0P4Xb.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I created a simple use-case diagram for submitting an assignment on Moodle.  There are a number of test cases that this prompts.  I am/was considering another (perhaps simpler) use case based around the type of code we did in class and this prompts several types of exceptions and even an alternate flow.  I wrote some code &lt;a href=&quot;https://repl.it/@seanrattigan/multipleends?language=python3&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; as an example of what I am considering.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The test-case template would have to be completed by the learner to show that they have considered all the possible problems that can arise... for example, a negative int should raise a ValueError, using two strings should raise a TypeError and so on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did a sample test-table in class based on a area_circle(rad) function, and so I was thinking this might be an option for the &quot;less confident&quot; (as described on CS50 pset2 referenced in the first link) but &lt;strong&gt;as I think about it more, if the learner completes this then they achieve the learning outcome, and I should NOT have it weighted to be of less worth&lt;/strong&gt; than one which could be considered more difficult.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, after all this, I am inclined towards giving both options to the class, with no differentiation between points, but I still wonder:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Should I offer both options?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) Is there ever a case for creating an assessment with &quot;less worth&quot; to allow a learner achieve some marks, or if the &quot;lesser&quot; task demonstrates that they meet a learning outcome, is this unfair?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done something like this (easier version with less points) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know I could have been more succinct in my question, but appreciate any feedback you can give. Thank you.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="1035" LastEditDate="2020-05-31T18:59:06.150" LastActivityDate="2020-05-31T18:59:06.150" Title="How might I structure an assignment with two &quot;levels&quot;?" Tags="|lesson-ideas|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6017" PostTypeId="2" ParentId="6016" CreationDate="2019-11-01T18:32:25.310" Score="5" Body="&lt;p&gt;I didn't go through all the details, but can share an experience. I once taught a database course to a bunch of good students. The course covered lots of things such as relational theory as well as the internal structure of the data in such a database system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;For one assignment I gave the students a choice, either a simple one or a rather harder one. The harder one was to implement B+ trees if I remember correctly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The easier one had something to do with hash maps or such. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The instructions were that you could choose which, but if you'd already in your life built a hash map then you would find the easy one boring and the other would be interesting. A surprising number actually did the harder assignment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They were weighted and graded the same. There was no benefit to the harder one other than learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the students were eager to learn and that made it possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I'd recommend against a system in which only low grades could be earned from a simpler assignment. I think that is psychologically damaging. Like deciding to fail before you even start. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-01T18:32:25.310" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6018" PostTypeId="2" ParentId="5777" CreationDate="2019-11-01T18:55:13.737" Score="2" Body="&lt;p&gt;I start my students on &lt;a href=&quot;https://blockly.games/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blockly&lt;/a&gt; for coding, as I find it is really useful to develop some algorithmic thinking.  There is a &lt;a href=&quot;https://developers.google.com/blockly/&quot; rel=&quot;nofollow noreferrer&quot;&gt;developer section&lt;/a&gt; where you can create code with blocks (like Scratch) and &quot;see&quot; the equivalent Python/Javascript/Lua/PHP/Dart.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We use NotePad++ for html and css but will swap to Atom.io next year (most like Sublime Text but free). When we start coding in Python, we use the same text editor for this as well, and so the class must use the terminal/shell to navigate to the file location and run their code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As other answers suggest, there are no supports in Notepad++ such as autocomplete or autoindent.  Learners really have to get used to doing it for themselves.  After a few weeks, I introduce the &lt;a href=&quot;http://pep8online.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;PEP8 check&lt;/a&gt;.  There is also an auto-correct version &lt;a href=&quot;https://www.tutorialspoint.com/online_python_formatter.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; but I don't show this until they have worked on fixing some code in class. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are waiting to have Thonny installed as it looks like the &lt;strong&gt;best IDE for Python Beginners&lt;/strong&gt; imho.  I know learners last year struggled with PyCharm, which is my own preferred IDE.  There are many great IDEs out there, but from my evaluation of them all, I have settled on Thonny as a great &quot;beginner&quot; IDE and PyCharm as my preferred &quot;intermediate&quot; IDE, although there is little difference with Eclipse or Visual Studio Code imho.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2019-11-01T18:55:13.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6019" PostTypeId="2" ParentId="6016" CreationDate="2019-11-01T19:44:11.763" Score="1" Body="&lt;p&gt;At least give it a bonus. In the “real world,” things get more “rewarded” if they are more user-friendly. More people use things that have lower barriers to entry to use. I’m just a student and I have TA’d once, but all my classes that have offered doing harder things (Hopcroft minimization on a partially built NFA and DFA graph generator, for example, or using user input on an assembly language assignment) have offered them for bonus points. &lt;/p&gt;&#xA;" OwnerUserId="8043" LastActivityDate="2019-11-01T19:44:11.763" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6020" PostTypeId="2" ParentId="6016" CreationDate="2019-11-02T12:49:41.860" Score="2" Body="&lt;p&gt;Ooh, I have experience with this one!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried once giving a huge lab with lower scores for progressively simplified versions (to allow for students with lower abilities to still complete the lab), and it backfired tremendously.  There was a lot of anger, and students did far worse than they should have by opting into inappropriately high versions.  It was a consistent phenomenon, and matches up with the psychological understanding that we are more afraid to &lt;em&gt;lose&lt;/em&gt; than we are happy about &lt;em&gt;gaining&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And thinking about it now, their anger makes total sense.  We should grade a student on their work, here and now, in our class.  The fact that other people exist who find that work simple should not mean that high grades are intrinsically out of reach.  We are penalizing people not for their efforts in the class, but for the existence of other people.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That was several years ago. Since then, I have used tiered assignments many more times, but under a different scheme: I award a laughably small amount of extra credit for the harder version (typically 2 to 3 points out of 100), and still allow for a grade of 100 on the low version.  &lt;em&gt;After all, the higher version only exists to make sure I am not wasting the time of the more advanced students.&lt;/em&gt;  There are always students who take the harder versions under this scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many students are motivated to learn, and don't want to do assignments without any challenge to them at all.  The small reward is simply a token of encouragement to assure the student that you really do want them to try and stretch themselves, and that is really often enough.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-11-02T12:49:41.860" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6021" PostTypeId="2" ParentId="5970" CreationDate="2019-11-02T18:52:34.700" Score="4" Body="&lt;p&gt;There are a number of sites with challenges- once you complete a challenge you can often view other solutions, and many of these sites (not all) support multiple languages.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://codingbat.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.hackerrank.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;HackerRank&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://rosalind.info/problems/locations/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rosalind&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.pythonchallenge.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Python Challenge&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.topcoder.com/challenges&quot; rel=&quot;nofollow noreferrer&quot;&gt;TopCoder&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler&lt;/a&gt; &lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.codechef.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coding Chef&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Even the &quot;Python Challenge&quot; tasks can be solved with another language since all you are looking for each time is the next url.  A scan of each site will give you a good idea if the problem sets are useful, or if they spark ideas for your own challenges.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Worth a look I think.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2019-11-02T18:52:34.700" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6022" PostTypeId="1" AcceptedAnswerId="6023" CreationDate="2019-11-02T21:51:25.787" Score="0" ViewCount="159" Body="&lt;p&gt;A younger friend of mine, a high school student I have been encouraging to take his Computer Studies class seriously, and possibly go for CS in tertiary education, brought this problem to me. He was given a term paper by his teacher in the course of which he had to discuss language constructs in programming. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Being a diligent student, he had done most of the assignment but wanted to impress his teacher in addition with a definition of the term language construct as used in programming. He showed me his jottings from books and on-line but complained he could not find definition he could quote or material simple enough to enable him create a very good definition of his own. In spite of this, he came up with and showed me his definition below:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;&quot;a language construct is a part of a program that does &#xA;      some special work.&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;He wanted my opinion on whether the above definition will be satisfactory for his teacher. I was uneasy to say ok/not ok. I felt the definition was too fuzzy but I could not come up immediately with something more accurate YET WITH LANGUAGE SIMPLE ENOUGH to be at his vocabulary level! This is the dilemma. So I searched in the literature available to me, on-line too. I even read this thread on StackOverflow:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/10057524/what-does-language-construct-mean&quot;&gt;https://stackoverflow.com/questions/10057524/what-does-language-construct-mean&lt;/a&gt;&#xA;and this one on Quora: &#xA; &lt;a href=&quot;https://www.quora.com/What-is-a-construct-in-programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.quora.com/What-is-a-construct-in-programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got many explanations but no compact definition. I thought hard about it. I made no headway. I also found this definition from Wikipedia (which incidentally is the only one that came close to a compact definition of the term):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;“A language construct is a syntactically allowable part of a &#xA; program that may be formed from one or more lexical &#xA; tokens in accordance with the rules of a programming &#xA; language. The term Language Constructs is often used as &#xA; a synonym for control structure, and should not be &#xA; confused with a function.”&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, the definition was full of jargon and bombast (&quot;syntactically allowable&quot;, &quot;lexical ...&quot;) which were way over my friend’s head. Furthermore, the last sentence of the Wikipedia definition begged a question of what is and what is not a programming construct. Considering it, shall we say class, object, structures, hash tables and such are not programming constructs? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We tried to pick elements of the Wikipedia definition, translate it to simpler language and incorporate in my friend’s definition, and the result got verbose and so long, it lost the compactness of a definition. The target is to come up with a definition of the term programming construct” that is simple, within the vocabulary level of a high school student, precise enough to clearly delimit the scope of where construct starts and where it ends (so one can easily see what is a construct and what is not). I and my friend have discussed in the last three days on it and we seem to be getting into an intellectual quagmire: the more we try to step forward, the more intractable it gets.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I bring this here because we are teachers. As teachers, we are used to having to define basic concepts. I am hoping to get some precision and lucidity that AUGMENTS my friend’s definition and makes it more rounded. Lets help a serious young man who has done his due diligence and needs some scaffolding. Thanks people. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just a lucid, compact and rounded definition at the vocabulary level of a high school student please. (I will ensure you are acknowledged in my friend's paper if your definition is not an extension of his, and is used by him).&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-11-05T15:25:47.640" LastActivityDate="2019-11-05T15:25:47.640" Title="Simple, Compact, Rounded Definition of the term &quot;Programming Construct&quot;" Tags="|student-motivation|secondary-education|introductory-lesson|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6023" PostTypeId="2" ParentId="6022" CreationDate="2019-11-02T23:06:27.410" Score="1" Body="&lt;p&gt;&lt;em&gt;A &quot;programming construct&quot; is a sequence of zero or more words and symbols that is legal for the language and also complete.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The above &lt;em&gt;mostly&lt;/em&gt; works, but not all programming systems are built from words and symbols. One can program graphically, for example. Therefore &quot;sequence&quot; isn't quite right. But it works for the majority of common languages. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are two issues. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is that what is &quot;legal&quot; varies a lot. So, in the definition you found, words like &lt;em&gt;lexical&lt;/em&gt; are important, since the lexical structure of a language determines which words and symbols can be used, but is agnostic about how they are used. Likewise &lt;em&gt;syntactically allowable&lt;/em&gt; is how we talk about how those (lexical) symbols can be put together to form a legal &lt;em&gt;construct&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, by saying &quot;legal for the language&quot;, I'm hiding a lot of detail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second issue is that almost all languages are recursive in some sense. So a &quot;programming construct&quot; can contain other programming constructs recursively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In some languages (Pascal) the empty string is actually a construct and can represent a &lt;em&gt;statement&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Common examples of programming constructs are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;variables&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;functions and procedures&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;expressions&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;assignments&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;classes&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;values&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;commands &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;programs&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;etc etc etc&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But note that these are not necessarily distinct categories. For example, values can be expressions. And functions can be values (some languages). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also note the my definition says that the sequence needs to be &lt;em&gt;complete&lt;/em&gt;. Some sequences of symbols might be &quot;part of a construct&quot; but not a construct. Leaving off the terminating period in a Pascal program leaves you with only part of a program, not the complete construct. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But note that &lt;em&gt;objects&lt;/em&gt; are not (normally) programming constructs since they are a feature of the running program, not the text of the program itself. They aren't part of the &lt;em&gt;language&lt;/em&gt; and don't exist until the program runs. (There are exceptions to this - some languages have a different idea of &lt;em&gt;object&lt;/em&gt; than do Java and Python.) And I said &quot;text&quot; which brings us back to the &quot;sequence&quot; issue, which isn't universal. But this is why the word &quot;language&quot; was important in the definition. Programming Constructs are part of the language in which we express programs, not part of what the program does when it executes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Things are messy. &lt;em&gt;It's complicated&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-02T23:06:27.410" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6025" PostTypeId="1" AcceptedAnswerId="6031" CreationDate="2019-11-04T14:41:59.370" Score="2" ViewCount="77" Body="&lt;p&gt;I'm trying to set up a remote cloud Linux server with multiple logins for a class in Linux basics, BASH and C programming. We want our students to be forced to work exclusively in the shell to improve their comfort and skills with terminals - they already have considerable familiarity with IDEs. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To achieve this, I want my students to be able to SSH into a shared server with unique logins. They should then work in their little sandbox and submit their work in specific directories that I will auto-grade from an admin login.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm currently trying AWS's basic EC2, but it's unclear if all of the following is possible: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;1) Add username/passwords on TOP of a RSA keypairs. It seems clear that I can do unique keypairs OR username/password, but not yet clear if I can do both...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2) How to use just 1 RSA keypair for all student logins, rather than a different keypair for each login (to facilitate quick distribution/set-up, and to control security at-large conveniently)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3) How to let users set their own passwords - ideally initial password is universal, but on day 1 they could personalize.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm starting to suspect AWS may not be the best solution for what I'm trying to accomplish. I've looked briefly at CloudSigma's product but am unsure if there is a cloud service that better fits what I'm trying to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done something similar? I know many universities do essentially this, though usually with their own servers rather than cloud-based ones.&lt;/p&gt;&#xA;" OwnerUserId="5614" LastEditorUserId="5614" LastEditDate="2019-11-04T20:16:14.760" LastActivityDate="2019-11-06T08:30:08.993" Title="Setting up a cloud-server SSH login procedure for a class? (AWS)" Tags="|resource-request|classroom-infrastructure|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6026" PostTypeId="2" ParentId="5922" CreationDate="2019-11-05T01:57:05.187" Score="2" Body="&lt;p&gt;IMHO, the response by @Ben I. and the advocacy for OOP first by @Buffy capture the essence of your problem. You have to choose whether to go imperative first or OOP from the outset. Once you make the choice, the other matters resolve naturally. However, there are considerations that affect your choice. Incidentally, you did not tell us if your students are completely new to programming or have had some previous exposure. This is one key consideration in the choice of direction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Other considerations are: what is the thrust of your curriculum? How much time do you have to cover the curriculum’s content? One semester? Two? How many contact hours do you get in a week? Will the time available afford you the luxury to start imperative and come later to OOP as we do traditionally? Or you have to hit the ground running OOP to cover much before time lapses, as @Buffy would have loved? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If your students are stark new to programming, starting them with objects (from my experience teaching many beginner classes), may be problematic later. Creating objects and classes requires so much background knowledge you end up having to explain too many things in one lesson, generating cognitive overload. If you manage somehow, to get them to learn the higher abstractions, sooner or later, you have to come back down from the gang plank to do lower level things like control structures, arrays etc. Trouble is: it is more difficult for someone who has learnt to drive an automatic car to learn to drive a car with manual gear.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, if your students have had some programming knowledge or are running another parallel course in the semester under consideration, by all means go OOP outrightly, Now! For, whatever they could not learn with your OOP Java, will be made up by the past exposure or the parallel course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So for complete beginners, go imperative first. Teach static methods soon after covering the elementaries and control structures + if possible, arrays. I appreciate yours and @Buffy’s concern about the proactive inhibition, earlier knowledge of static methods may cause when you get to classes/objects, and the subsequent difficulty unlearning. However, the benefits of teaching method/functions early in a first programming course overwhelm any “side effect” of it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It teaches the student disciplined and good structuring of code and also as you noted, it weans them off the “everything-in-main()” bad habit early. One significant benefit of this I learnt by experimenting different order of topics with different beginner streams I have taken is: the students that have written functions/methods in earlier lessons learn to write a class/object faster and easier. They transfer learning of the naming rules and layout of functions/methods etc. to the writing of classes/object. Makes your teacher’s life easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Secondly, a beginner that has not written any aggregate entity like function/method or struct (C++) with many statements in the block can get overwhelmed at first. So learning methods first, facilitates writing class/objects and, especially a class with large number of statements and structural complexity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Besides, static methods are part of class/object. Teaching it before teaching class reduces the cognitive load when you subsequently come to teach class since hopefully, you won’t have to explain that part again. You can focus on other things like why privating/who publicking, Messrs. constructors/destructors et.al. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also helps the students build more sophisticated programs early. They can play with controls structures and method calls to create more interesting things even before knowing how to use class/objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As per the concerns about static methods not being thread safe etc., I understand from Java 8 onward some of these issues have been addressed. For example, we can have static methods in interfaces too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, a caveat: if you choose to go imperative first, let them at least learn control structures (branching &amp;amp; looping constructs) &amp;amp; scope before teaching them methods as @csabinho had pointed out. Scope may be taught in the course of teaching methods when you explain perishing of variables as you go out of scope, out of the fence, though.&#xA;So make your choice in light of your situation and that of your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;PS: I looked up your QuadEqn exercise. It was good. I like the annotation especially. But leave the part where they pass parameters to main () till the end. Else the cognitive payload will kill the smooth learning I expect from your exercise.&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-11-05T12:23:57.193" LastActivityDate="2019-11-05T12:23:57.193" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6027" PostTypeId="2" ParentId="5922" CreationDate="2019-11-05T11:15:47.337" Score="2" Body="&lt;h2&gt;Methods and objects&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Does it make sense to introduce methods even before objects?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;At a base level, your suggestion that methods only make sense in the context of objects relies on the idea that methods are only used with objects, which is not the case. Functional programming very much eschews objects (to a reasonable degree) and very much relies on functions instead, proving the point that functions and objects are not married.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;To static or not to static&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If we go the static route, then later we must point out that many/most methods are non static.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Much to the chagrin of my teachers and senior developers, I do not distinguish functions from methods as they are the exact same thing to me. To me, staticness (or not) is irrelevant to define the purpose of a function.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you might be on the other side here and very much separate methods and functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you think they are separate definitions, then you are in luck. When you later introduce objects, you talk about &lt;em&gt;methods&lt;/em&gt;. Before, when you were dealing with statics, you would've only been talking about functions, so there's less of a collision and you don't need to go back on your words after introducing objects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you don't think they are separate definitions, then you are in luck. Since staticness then isn't a core part of the definition of &quot;method&quot; and &quot;function&quot;, then you don't need to change your students understanding of methods/functions just because you start using non-static methods.&lt;br&gt;&#xA;Instead, focus a lesson on static vs non-static to get the point across that they should be used in different scenarios. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally speaking, students think statically before they learn to think object(ive)ly, so it makes sense for you to stick to that order.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;A practical example&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Where and how do you introduce method in your first programming course?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Functions teach two important skills: abstraction and the avoidance of repetition. They are both very easy to demonstrate, but need to be demonstrated in different ways:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Ask your students to perform a particular calculation (e.g. count the letters in a string)&lt;/li&gt;&#xA;&lt;li&gt;Ask your students to perform this calculation ten times (e.g. on a &lt;code&gt;string[10]&lt;/code&gt;). They will probably copy/paste code. Let them. Don't correct them.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The third step is different based on what you want to teach them. If you're teaching them to avoid repetition:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;Ask your students to perform this calculation one million times (e.g. on a &lt;code&gt;string[1000000]&lt;/code&gt;). They will immediately sigh at the thought of having to copy/paste this another 999,990 times. (Though this is a personal thought, I believe that any student who mindlessly starts doing it without complaints does not have the right mindset to become a developer)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;If you're teaching them about abstraction:&lt;/p&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;Ask your students to change the calculation logic (e.g. only count vowels). If they don't mind making the same change ten times, either get them to increase the repetition before making a change, or simply require them to make change after change, making the calculation increasingly complicated.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;In either case, the same will happen: your students will be unhappy about all the stupid brute force copy/pasting. When they've reached the point of discontent, it's time for you to demo something to them:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Solve task 1 using a function for the calculation. Agree with them that the function isn't truly necessary here.&lt;/li&gt;&#xA;&lt;li&gt;Solve task 2 when you already have the existing function. Point out how little time it took you.&lt;/li&gt;&#xA;&lt;li&gt;Solve task 3 (whichever you picked) and have them realize that your solution means that they could either execute the logic any arbitrary number of times without needing to change anything (other than the input array size), or only needed to change the function body once instead of changing the copy/pasted logic X times.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;h2&gt;To summarize&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Teaching follows a strict pattern of incentivization. Unincentivized students don't care about your lesson, whereas incentivized students take it to heart. I've always been a fan of this quote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea.&lt;br&gt;&#xA;  &lt;em&gt;--Antoine de Saint-Exupery&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If your students balk at the idea of a function and think of it as &quot;pointless extra effort&quot;, then they clearly haven't experienced the horrors of programming in a world without functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Rather than expect them to take your word for it, make them experience the issues with not using functions. Make them hungry for a better way to do the horrible task they have been assigned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when they're hungry enough, show them the better way. Suddenly, they will love and accept functions as opposed to groaning at them.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-11-05T11:28:27.390" LastActivityDate="2019-11-05T11:28:27.390" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6028" PostTypeId="2" ParentId="6022" CreationDate="2019-11-05T12:51:34.193" Score="2" Body="&lt;h2&gt;Rephrasing&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;a language construct is a part of a program that does some special work&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is indeed too vague. First of all, every program is built specifically to do a particular job. &quot;Special&quot; is subjective, often synonymous with &quot;custom tailored&quot; and thus any program can be called a &quot;special work&quot;. By logical extension, any part of a program is therefore part of that program's special job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The quickest (but not perfect) fix here would be&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;a language construct is a &lt;strong&gt;part of a language&lt;/strong&gt; that does some special work&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It's still too vague, but it hits the nail &lt;em&gt;more&lt;/em&gt; on the head. Constructs are very specifically not something you've written yourself, i.e. they are not part of your program but were already part of the language/compiler.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More specifically, I would define a language construct as &lt;strong&gt;a predefined operation of the language&lt;/strong&gt;, i.e. it is not something that developers must build for themselves.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Learners don't yet grasp the big picture&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;...by semantical definition of what a learner is.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I could not come up immediately with something more accurate YET WITH LANGUAGE SIMPLE ENOUGH to be at his vocabulary level!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In software development, where everything is so abstract, you only understand a given name (= dictionary entry, vocabulary) &lt;strong&gt;when you understand the underlying concept&lt;/strong&gt;. If your friend does not have a particular word in their vocabulary, they do not understand the underlying concept.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a way, their inability to define what a language construct is specifically proves that they either don't know what a language construct is, or they don't understand some key concepts that language constructs (and their definition) inherently rely upon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The purpose of providing this definition to the teacher is not to give the teacher some wisdom that they already have. The purpose is for your friend to &lt;strong&gt;show that he knows it&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The proper solution for this is for your friend to either dig deeper into the concepts that he's trying to tackle, or to not overreach at the moment.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Overly complex definitions&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“A language construct is a syntactically allowable part of a program that may be formed from one or more lexical tokens in accordance with the rules of a programming language. The term Language Constructs is often used as a synonym for control structure, and should not be confused with a function.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This sounds like a quote from &lt;a href=&quot;https://youtu.be/cHZl2naX1Xk?t=80&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Architect in The Matrix&lt;/a&gt;, who is often ridiculed for using near-nonsensical liguistic complexities merely as an &lt;a href=&quot;https://www.merriam-webster.com/dictionary/affectation&quot; rel=&quot;nofollow noreferrer&quot;&gt;affectation&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I could delve into abstract analogies as to why the Architects innate desire to abstract and define is very similar to what you're trying to do, but I'm instead going to focus more on the specifics of software engineering.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Languages vs frameworks&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Considering it, shall we say class, object, structures, hash tables and such are not programming constructs?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;A language is different from its framework, and this is a very important distinction (that your friend may not understand yet).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Take the example of C# and the .Net Framework. &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; is part of the .Net framework, it is not part of the C# language. However, interfaces and generic type parameters are part of C#.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, an application is just layers upon layers code, where any layer tends to rely on the predefined concepts in the layer beneath it. As a basic model:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The language provides language constructs and a syntactical definition&lt;/li&gt;&#xA;&lt;li&gt;A framework extends functionality by creating additional predefined concepts which rely on the language constructs&lt;/li&gt;&#xA;&lt;li&gt;An application relies on its framework (and language) and can rely on all predefined concepts at its disposal in order to achieve its goal in the best way possible.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To you as an application developer, the lines between language features and framework features can be muddied (because it doesn't really matter to you where it comes from). But for framework designers and language designers, these distinctions are incredibly important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At a base level, &lt;strong&gt;a language is globally pervasive whereas a framework can be avoided selectively&lt;/strong&gt;. For example, I am able to write my own &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; as long as I avoid namespace conflicts with my framework's &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt;. Good practice suggests I don't do this, but I am technically able to do so.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, I am never able to use &lt;code&gt;for&lt;/code&gt; or &lt;code&gt;switch&lt;/code&gt; anywhere in my code for anything other than referring to my language's constructs. Good/bad practice doesn't even come into it, it's just outright prohibited to repurpose these constructs as their definitions are globally persisted through all of the code (written in that particular language).&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Education through definition&lt;/h2&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The target is to come up with a definition of the term programming construct” that is simple, within the vocabulary level of a high school student&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;When you drill down into software development, things become &lt;em&gt;more&lt;/em&gt; complex, not less. The diligence you are putting effort into is what is leading you to the increasing complexity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ask a beginner programmer what a &quot;hello world&quot; application does. Now ask them on the intricacies of how these characters are displayed on the screen. They are patently unable to do the latter because you're asking them something they do not yet grasp, yet they already display top-level knowledge by being able to understand the purpose of a &quot;hello world&quot; application.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I am hoping to get some precision and lucidity that AUGMENTS my friend’s definition and makes it more rounded. Lets help a serious young man who has done his due diligence and needs some scaffolding. Thanks people.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Your question is based on the underlying principle that one learns by observing strict definitions and derives understanding from them. I want to challenge that frame of mind, especially in the field of software engineering.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The vast majority of good developers I've worked with are all &quot;hands on&quot; developers. They learn by doing, and their vocabulary naturally grows with their skill. If you put these developers in a classroom and get them to learn definitions of things they do not yet understand, or have not yet encountered in practice, they are going to either actively reject or genuinely forget the intricacies you've poured into these definitions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not saying that it's impossible to learn the theory before the practice, but for abstract fields such as software development it's so very fickle to understand a theoretical definition &lt;em&gt;without misinterpretations&lt;/em&gt; if you don't have practical experience to rely on. It's not impossible, but it is highly improbable.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Just a lucid, compact and rounded definition at the vocabulary level of a high school student not explanations please.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Abstract concepts don't work without practical examples. You cannot teach a child what addition is without at some point having used physical objects to show addition in reality.&lt;br&gt;&#xA;You can teach a child to blindly accept and parrot the symbology of &lt;code&gt;1 + 1 = 2&lt;/code&gt;, but they won't understand what it represents in the real world. Furthermore, if they only recognize the symbology and not the meaning, then they will be unable to answer &lt;code&gt;2 + 2&lt;/code&gt; or &lt;code&gt;1 + 1 + 1&lt;/code&gt; as they cannot apply the general concept of addition as they have not yet understood it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Compared to children, adults are significantly less capable of deriving understanding from parroted information. Compared to adults, software developers are even less capable of doing so; and those that do blindly accept and parrot things often end up stagnating in their job by repeating what they know instead of perpetually reevaluating their approach.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;&lt;strong&gt;Abstractions stem from practical applications, not the other way around&lt;/strong&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Your friend's definition of a language construct should not be the start of their understanding on what a language construct is. Their ability to define a language construct is the &lt;strong&gt;resulting proof&lt;/strong&gt; that they have understood what a language construct is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't pour your effort into definition. Pour your effort into practical experimentation. The definition will naturally come from your practical experience.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-11-05T14:54:39.123" LastActivityDate="2019-11-05T14:54:39.123" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6029" PostTypeId="2" ParentId="5922" CreationDate="2019-11-05T15:51:20.087" Score="2" Body="&lt;p&gt;I've hesitated to provide an answer for this since it would be, necessarily, very long. But I've spent more than 20 years on this basic question and suppose I need to bite the bullet and try to clear up misconceptions that should have been dispelled generally years ago. My focus has long been on how to teach programming &lt;em&gt;effectively&lt;/em&gt;, as well as programming languages in general.&lt;/p&gt;&#xA;&lt;p&gt;And for starters, you don't teach programming by teaching a lot of syntax. Nor is the difference between languages primarily their syntax. Not if they represent different &lt;em&gt;paradigms&lt;/em&gt;, at least.&lt;/p&gt;&#xA;&lt;p&gt;I apologize in advance for the denseness of this. I hope it is accurate. My writing in general has been described as accurate but too dense. Because of this, it may be hard to grok the implications of some of it without reflection.&lt;/p&gt;&#xA;&lt;p&gt;When we teach a first course in &lt;em&gt;programming&lt;/em&gt;, &lt;em&gt;per se&lt;/em&gt;, the course has to answer the fundamental question &amp;quot;What is a program?&amp;quot;. Giving a concise definition to a beginner will just lose them, but, by the end of the course, they should have a good understanding of an answer as well as guidance in &lt;em&gt;How To Program&lt;/em&gt;. If the course leaves them confused about that you have done a disservice and they will, mentally, need to start over to get an understanding of what is a program and how do we construct one.&lt;/p&gt;&#xA;&lt;p&gt;Everything we do in that first course should be directed to that end. What is a program? How do we create one?&lt;/p&gt;&#xA;&lt;p&gt;Sadly, too many people think of a programming language as a bunch of &lt;em&gt;stuff&lt;/em&gt; thrown together, features, that can be used in any way you like. While that is literally true, it leads to terrible, unmaintainable, impossible to understand, cruft. We need to do better and our students need to have proper guidance.&lt;/p&gt;&#xA;&lt;p&gt;In fact, language designers don't think that way at all.&lt;/p&gt;&#xA;&lt;p&gt;However, there are &lt;em&gt;different&lt;/em&gt; conceptions about &lt;em&gt;what a program is&lt;/em&gt;, and those different conceptions (paradigms) lead us to different answers to the question &amp;quot;What is a program?&amp;quot; and the question &amp;quot;How do we create one?&amp;quot; Especially, how do we create a beautiful, useful, maintainable, understandable, program?&lt;/p&gt;&#xA;&lt;p&gt;My university once declined to hire a very smart guy because he admitted that the program he created as the basis of his dissertation was so complex that he couldn't really understand it and was afraid to modify and extend it because it was so fragile. A naive understanding of programs and programming will leave you in exactly that place. It's creator has lost control of the creation. A Frankenstein Program.&lt;/p&gt;&#xA;&lt;p&gt;There are others, but the three main paradigms are Functional, Procedural, and Object-Oriented. I will try to explain each of these in turn and also explain why one shouldn't try to mix them with beginners (and mix them only very carefully for experts - C++, say). Each of these paradigms has a different answer to the question &amp;quot;What is a program?&amp;quot; They also give guidance about how to construct a program &lt;em&gt;within that paradigm&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Note that for all of these paradigms, the descriptions and the definitions are highly recursive, even when the programs written in them are not.&lt;/p&gt;&#xA;&lt;p&gt;And note that once you have answered the question &lt;em&gt;What is a Program&lt;/em&gt; for any paradigm, you can write any program at all. All the paradigms are Turing Complete hence equivalent in power. If you master any of the paradigms, and have adequate language tools, then you don't need any other paradigm to be able to write programs. Some may be more suitable for some kinds of problems, but all are capable.&lt;/p&gt;&#xA;&lt;h2&gt;Functional Programming&lt;/h2&gt;&#xA;&lt;p&gt;Since this paradigm is less important to the current question I won't expand it so deeply. But a functional program in something like Scheme, or even Standard ML, is an expression that, when evaluated, gives the answer to a problem. Normally that expression is a function, expressed usually as a list, and the evaluation usually results in another list.&lt;/p&gt;&#xA;&lt;p&gt;But that brings us to the question of what is a function and an expression. An expression could be simple, like a value (42), or it could be a list, or it could be the result of applying a function to some arguments, which are, themselves, expressions. Note the recursion.&lt;/p&gt;&#xA;&lt;p&gt;The question of How to Program is, then, you create an expression to represent the solution. If the expression requires function evaluations then those functions are, themselves, written to evaluate expressions that are smaller problems within the larger problem. When the overall function is evaluated it starts a cascade of evaluations of functions solving the smaller problems and then the original function constructs a solution from the solutions of the sub problems.&lt;/p&gt;&#xA;&lt;p&gt;And no, that description isn't suitable for a novice. They need seasoning and practice so that the definition starts to emerge in a way that they can eventually (end of the course) understand.&lt;/p&gt;&#xA;&lt;p&gt;But note that this is recursive. An expression is composed from expressions, many of which are the results of function invocations.&lt;/p&gt;&#xA;&lt;p&gt;There is more that can be said, and I could probably refine this quite a bit, but that is really the essence of functional programming. &lt;em&gt;What is a functional program?&lt;/em&gt; It is an expression. How do I create a program? By creating an expression that represents the answer I want, probably by writing functions that are themselves compositions of functions.&lt;/p&gt;&#xA;&lt;p&gt;But note that this &amp;quot;definition&amp;quot; means nothing to a novice. Gibberish. They  learn it by writing simple expressions and simple functions, then progressing to more complex situations in which an expression needs to be composed from the invocations of several functions. If you look at a well-formatted Scheme program (i.e. properly indented) the indentation shows the structure.&lt;/p&gt;&#xA;&lt;h2&gt;Procedural Programming (aka imperative)&lt;/h2&gt;&#xA;&lt;p&gt;Procedural programming was probably best defined by Edsger Dijkstra for the Algol family of languages, such as Algol, Pascal, and Modula-2. In this paradigm a Program is a &lt;em&gt;procedure&lt;/em&gt; that when executed produces a solution to a problem. How do you create a program (procedure)? If the problem is simple enough, you just write down the solution as the body of the procedure.&lt;/p&gt;&#xA;&lt;p&gt;But mostly, trying to do that results in a mess since the problem is too hard to understand (and solve) in a single pass without decomposition. Therefore, in order to write that procedure (solve that problem) you factor out sub problems that, collectively, have three characteristics:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The sub problem is a problem in its own right. The nature of the problem and what would constitute a solution is known.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The sub-problem is solvable with a procedure, in theory.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;There is a known way to recompose the solutions to the sub problems into a solution of the overall problem.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Then, the sub problems need procedures to solve them. To do that, you proceed recursively decomposing those problems as needed into smaller problems with the above three characteristics. The recursion stops when you can actually solve all the smallest problems with (simple) procedures. Then you recompose those procedures into the solution you initially desired.&lt;/p&gt;&#xA;&lt;p&gt;This is why procedures can be nested in languages like Pascal and why C isn't ideal as a Procedural Programming Language. Additionally, the ability to nest functions implies (in these languages, at least) that variables defined at one level are visible at lower levels (scoping), but not elsewhere. This disciplined approach to information hiding/revealing is very powerful. In particular it is used to reduce coupling and increase cohesion in programs. (I can expand this if needed.)&lt;/p&gt;&#xA;&lt;p&gt;What is a Procedural Program? It is a tree of procedures where each node in the tree represents the solution of a sub problem, with lower nodes representing the decomposition of a problem and leaves of the tree represent simply written procedures needing no further decomposition.&lt;/p&gt;&#xA;&lt;p&gt;How do you create a Procedural Program? You construct the tree from the top down, decomposing as needed to extract simpler problems and then re-composing solutions to solve the overall problem.&lt;/p&gt;&#xA;&lt;p&gt;Again. This explanation means nothing to a novice. They &lt;em&gt;learn&lt;/em&gt; it from practice. Start with relatively simple problems/programs that don't require decomposition and progress to more complicated ones to get practice with both the decomposition of problems and the recomposition of solutions.&lt;/p&gt;&#xA;&lt;p&gt;And none of what I have said has anything to do with if-statements and while-statements and integer variables and such. That isn't the essence. Those are used only for structure at the very lowest level of the program. If you try to define the overall (complex) program using only these you will fail all of the criteria of what makes a program &lt;em&gt;good&lt;/em&gt;. In particular, as little as two pages of such code can be unintelligible even to its creator. (I have evidence of this from a very important - mission critical - project at a major US company. And, well, student projects, of course.)&lt;/p&gt;&#xA;&lt;p&gt;So, to &lt;em&gt;think&lt;/em&gt; as a procedural programmer, you think in terms of procedures (some of which are functions) and, if the problem is difficult, imagine all of the simpler problems that, if they could be solved, would represent the solution you desire. Solve the simpler problems with procedures.&lt;/p&gt;&#xA;&lt;h3&gt;Note 1.&lt;/h3&gt;&#xA;&lt;p&gt;In both procedural and functional paradigms the text of the program is tree-like. Namely nested structures. But the running program is also tree-like. A procedure or function can invoke its &amp;quot;child&amp;quot; nodes generating a run-time tree of execution. Call &lt;em&gt;down&lt;/em&gt; the structure. Return &lt;em&gt;up&lt;/em&gt; the structure. The tree is traversed (in time) as the program executes. And in both of these paradigms, the program is &lt;em&gt;thought of&lt;/em&gt; as a process, not a thing. It answers a &amp;quot;how does it work?&amp;quot; question, not a &amp;quot;what is it?&amp;quot; sort of question. And most of the &lt;em&gt;structure&lt;/em&gt; of such a program is a description of an algorithm. The overall program &lt;em&gt;does&lt;/em&gt; something. It's parts &lt;em&gt;do&lt;/em&gt; some part of that. The structure models the process. This will be different in object-oriented programming.&lt;/p&gt;&#xA;&lt;h3&gt;Note 2.&lt;/h3&gt;&#xA;&lt;p&gt;Until recently procedural programming in the above model was impossible in Java, since functions couldn't be nested. The introduction of Lambdas in Java 8 has changed that, but for a different purpose. And I'm pretty doubtful anyone has yet used lambdas in this way. And if you do, you come to something closer to a functional program than a procedural one. But if you want to solve a large and complex problem with &lt;em&gt;static&lt;/em&gt; methods in Java, the structure is flat, not nested. All of those functions are at the same level in the program. This is actually the programming model of FORTRAN. One function that solves part of the problem of another can't be nested inside that other function.&lt;/p&gt;&#xA;&lt;h3&gt;Note 3.&lt;/h3&gt;&#xA;&lt;p&gt;In a procedural program, at any time that a procedure is called, the actual text of the program will tell you precisely which code will be executed. But in a functional program this may not be the case. This is because functions are, themselves, &lt;em&gt;values&lt;/em&gt; that can, for example, be stored in lists and passed around as arguments to other functions and then invoked. In other words, you may need to actually execute a functional program to determine what it will do next. We shall see this again with object-oriented programs, but in a different way.&lt;/p&gt;&#xA;&lt;h2&gt;Object-Oriented Programming&lt;/h2&gt;&#xA;&lt;p&gt;While Simula 67 was technically the first OO language, the slightly later Smalltalk better represents what we think of today as an object oriented language. (C++ derives from Simula and is actually a multi-paradigm language, or paradigm-agnostic language, not, specifically an OO language.) The following doesn't describe Javascript, since it came from yet another trend that started with the language Self. Javascript has objects, but no classes.&lt;/p&gt;&#xA;&lt;p&gt;What is an object oriented program? It is the orchestration of a web of interacting encapsulated values (objects). The web of interactions produces the solution to the problem at hand. The interactions are modeled as &lt;em&gt;services&lt;/em&gt; that an object provides to other objects.&lt;/p&gt;&#xA;&lt;p&gt;How do you write an OO program? You first analyze the internal structure of the problem and determine its &amp;quot;parts&amp;quot; you model these parts as faithfully as necessary for your purposes (objects). You also define the web of interactions, partly externally (function &lt;em&gt;main&lt;/em&gt;), but mostly  internally as determined by the needs of the objects.&lt;/p&gt;&#xA;&lt;p&gt;Example: If you want to solve problems about traffic flow (self driving), you model the transportation system to some necessary level of detail. A transportation system has parts: it &lt;em&gt;has&lt;/em&gt; roads and bridges, cars, busses, intersections, signals, detours, ... These &amp;quot;parts&amp;quot; are modeled by objects, which are, in turn, described by classes. There is only one &amp;quot;system&amp;quot; but it has several &amp;quot;cars&amp;quot;, etc. The cars interact, on occasion, with each other and with other objects,&lt;/p&gt;&#xA;&lt;p&gt;Example: A student information system has parts: courses, students, instructors, records, rules and exceptions, ... The parts interact: students enroll (a service) in classes, etc.&lt;/p&gt;&#xA;&lt;p&gt;Example: A calculator has parts: one or more displays, keys, internal stacks, ... The parts interact. Key presses (a service) cause changes in the display (sometimes). ....&lt;/p&gt;&#xA;&lt;p&gt;What, then, is an object? An object is an encapsulated actor that is comprised of both data and behavior. The behavior models services that the object can provide. The data can only be acted on by requesting a service of it. In a complex program, the &amp;quot;data&amp;quot; within an object is made up of other (lower level) objects, that provide services to the containing object. (Note the recursion here).&lt;/p&gt;&#xA;&lt;p&gt;What services can an object provide? These services are defined by an interface, that might be stated explicitly or not. Each service is modeled as a protocol for a procedure or function (collectively called methods). In smalltalk derived languages (Java, Python, ...) the protocols are defined in classes, that also specify the data used by objects created from the class.&lt;/p&gt;&#xA;&lt;p&gt;Objects are created dynamically as the program runs, not statically from the program syntax. A class is a description of a certain type of object, but the objects are distinct. Most classes can be used to create many, independent, objects of the same type, but individually encapsulated. Objects (via their services) can create other objects, both internal to their own structure and externally.&lt;/p&gt;&#xA;&lt;p&gt;Communication (the web of interactions) in an OO system is via messages. A message requests a specific object to perform a specific service. Some services return data (functional). Some update internal structures of the objects or request further services of other objects without returning data (procedural). While possible to do both, it is discouraged as it makes the program more complex and harder to maintain. It isn't forbidden, but novices should be discouraged until they have more experience. (A saw &lt;em&gt;can&lt;/em&gt; be used as a hammer, but the novice is discouraged.)&lt;/p&gt;&#xA;&lt;p&gt;It is a feature of OO programming that the text of a program cannot predict, precisely, the code to be executed when a message is sent. This is similar to the situation in Functional programming where functions are values. Objects from different classes can be sent the same messages, provided that the classes implement the same interface (In Java you need explicit implementation of a defined interface, but not in Python.) The implication of this is that when a reference variable &amp;quot;points to&amp;quot; some object that is defined by an interface, the code to be executed is only &amp;quot;known&amp;quot; to the object - and the object doesn't exist in the text of the program but only at runtime. And, the implication of &lt;em&gt;that&lt;/em&gt; is that you program to interfaces, not to specific class structures. The same is true in subclassing. Objects from the subclass implement (at least) the interface of the superclass, but may do so in different ways. (See the notes on polymorphism, below.)&lt;/p&gt;&#xA;&lt;p&gt;---- Complete for now, but I'll think some more. -----&lt;/p&gt;&#xA;&lt;h2&gt;Good and Bad OO Programs&lt;/h2&gt;&#xA;&lt;p&gt;Here are some rules for creating good programs. I'll focus on Java. In Python and Ruby they would be a bit different. The rules in those other languages still hold, but those languages give you a bit less support for them since they are dynamically typed where Java is statically (compile time) typed.&lt;/p&gt;&#xA;&lt;p&gt;True experts can break these rules, but normally consider them. But in the first course, insist on them and teach students that dangers lie outside the safe zone provided by the rules. &amp;quot;Here there be monsters!&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Don't write big classes: classes should be small with only a few methods. They should be single purpose. Do one thing well on request.&lt;/p&gt;&#xA;&lt;p&gt;Don't write long methods: methods should be short with very low &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cyclomatic Complexity&lt;/a&gt;. I start to get itchy when a method is more than three statements or when I need nested statements. The complexity of an application isn't in the individual methods (or classes) but in the &lt;em&gt;interactions&lt;/em&gt; between objects. This skill, factoring a complex program into small and simple parts, is one of the most important and hardest to develop. It needs to be practiced.&lt;/p&gt;&#xA;&lt;p&gt;Write a lot of classes: This is a consequence of the first two rules. A system is made up of a lot of parts, but the parts, themselves are simple.&lt;/p&gt;&#xA;&lt;p&gt;Use subclassing very sparingly and never deeply. Novices tend to break this rule, thinking that subclassing is the &lt;em&gt;Big Idea&lt;/em&gt; of OO programming. It actually isn't. There is much more power in using composition and polymorphism than in subclassing.&lt;/p&gt;&#xA;&lt;p&gt;Write classes whose internal data is mostly other objects, not language primitives: Complex parts are made from simpler parts. This is the purpose of inner classes. You can hide the structure of an object by hiding the structure of its parts. This is encapsulation and data hiding done well. A car object has an engine object. An engine object has piston objects. A piston has bushing objects. Complex things made up of simpler things. But a car (as a whole) doesn't need to &amp;quot;know&amp;quot; about pistons. Only the engine does. And certainly the transportation system can ignore pistons. This is programming by composition. Composition is really the &lt;strong&gt;Big Idea&lt;/strong&gt; of OO.&lt;/p&gt;&#xA;&lt;p&gt;Write a lot of interfaces, even if only one class will implement a given interface: The interface documents your intent. Understanding the intent, and programming only to that intent, is what makes complexity manageable.&lt;/p&gt;&#xA;&lt;p&gt;If you create a subclass, don't also extend its implicit interface: That is, don't add additional public methods. You will be forced at some point to use static polymorphism to resolve things if you do. If you need new &amp;quot;features&amp;quot; then extend the formal interface instead and have the subclass implement that interface. (I've found this to be one of the most important measures of code comprehensibility.) A circle isn't a subclass of (special case of) a point. Use subclassing for specialization, not extension.&lt;/p&gt;&#xA;&lt;p&gt;Most reference variables should be typed with an interface, not a class: This also helps you avoid the trap of being forced into static polymorphism (and warned, at least) when you fall into it.&lt;/p&gt;&#xA;&lt;p&gt;Use &lt;em&gt;only&lt;/em&gt; public and private for class features. The others are for experts. Protected, in Java, is a land mine. All data elements, other than constants, should be private. Among the methods, only the service-defining ones are public. Protected is intended for large teams building complex software over several packages. Unspecified visibility increases the possibility of linking between elements of a class, complicating maintenance and extension. Just. Say. No.&lt;/p&gt;&#xA;&lt;p&gt;Use static methods sparingly and only for their intended purpose. A method that tells you the number of cars created by the Car class is static. A method that tells you the color of an individual car is not static and returns information separately by each individual object.&lt;/p&gt;&#xA;&lt;p&gt;Don't build classes speculatively, thinking that you might want them later. (Reuse is overrated). Classes are there for purpose-build (bespoke) objects, not for general principles. Don't build the Car class in your transportation system model until you know you need it. Don't commit much to its interface until you know &lt;em&gt;how&lt;/em&gt; it will be used and what actual services it must provide. A mutator to change the color might be completely superfluous. Build what you need, when you need it.&lt;/p&gt;&#xA;&lt;p&gt;Achieve polymorphism in a program, not via subclassing as such, but by judiciously replacing one object with another. Both have the same interface, but each performs some process in a different way. See the Strategy and Decorator &lt;a href=&quot;https://en.wikipedia.org/wiki/Design_Patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;Design Patterns&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3&gt;A note on OO libraries&lt;/h3&gt;&#xA;&lt;p&gt;One would like to use the libraries supplied with a language as models for good programming in the language. Unfortunately it doesn't work out so well. Library code breaks many of the rules I suggest above as you are probably aware. There are two aspects.&lt;/p&gt;&#xA;&lt;p&gt;First is the the goals of a library writer are very different from those of an application programmer. The former is providing general purpose services for programmers, rather than purpose built solutions for users. The modeling problem, in particular, is simpler.&lt;/p&gt;&#xA;&lt;p&gt;And second, the library writers are experts who interact with other experts to define the libraries. When they break a rule they do so very carefully and after long thought and testing.&lt;/p&gt;&#xA;&lt;p&gt;Class nesting and using protected features are often used in libraries. But so are lots of interfaces and extensions of interfaces. But these are expert-only tools.&lt;/p&gt;&#xA;&lt;p&gt;“Do not meddle in the affairs of wizards, for they are subtle and quick to anger.”&lt;/p&gt;&#xA;&lt;h3&gt;Polymorphism: static and dynamic&lt;/h3&gt;&#xA;&lt;p&gt;Selection statements in a programming language are a form of polymorphism. They provide different actions, depending on circumstances. But this is static polymorphism. Almost all programmers are familiar with it, even if not by that name.&lt;/p&gt;&#xA;&lt;p&gt;Dynamic polymorphism, however, is something that happens only at run time. If a variable references an object, then a message to the object names the variable, not the object directly. If the variable refers to different objects of different classes (but the same interface) then different things can occur when the same message statement is re-executed. And the text of the program doesn't normally reveal this. In Java, however, you can subvert the system by forcing static polymorphism using something like the &lt;em&gt;instanceof&lt;/em&gt; operator. Through it you can learn the specific class of an object (usually) and you can then know the precise code that will be fired in a message. But this usage represents a failure. You should never need to write code that does this, and if you really need it then your program is broken in other ways. Perhaps you used subclassing naively. This sort of programming is a &lt;em&gt;code smell&lt;/em&gt; that indicates something sick or wounded elsewhere. Let your program heal to avoid it. Let dynamic polymorphism be your friend. If you need to fight it, you need to rethink how you are using your tools. Hammer, meet Saw.&lt;/p&gt;&#xA;&lt;p&gt;And don't confuse polymorphism with subclassing.&lt;/p&gt;&#xA;&lt;h2&gt;How Abstraction fits this scheme&lt;/h2&gt;&#xA;&lt;p&gt;Abstraction (simple names for complex phenomena) are vital to all three paradigms. But different languages have more or fewer ways to do it. Procedural abstraction (naming a complex process) is about all that is available in Pascal (or C). But class based abstraction (naming of things) can be a very powerful adjunct. So powerful, in fact, that it becomes the main tool. Model the things. Give them good names. And, the rules I've suggested (lots of small classes and methods) means that you create abstractions for many things in an OO program when built as described above. You become a &lt;em&gt;namer of things&lt;/em&gt;. Which, itself, is a kind of wizard.&lt;/p&gt;&#xA;&lt;p&gt;What emerges from programming OO in the way described here, when mastered, is programs that are expressed directly in the language of the model - which is closely related to the language of the problem and in terms of our &lt;em&gt;intent&lt;/em&gt;. The opposite is programs expressed mostly in terms of language primitives which, at best, are mere surrogates for our intent.&lt;/p&gt;&#xA;&lt;h2&gt;Pedagogy&lt;/h2&gt;&#xA;&lt;p&gt;Given my insistence that students learn from repetition (reinforcement) and feedback, if I want to teach them to program in Java, I have to do objects first. Otherwise they get too little practice on the &lt;em&gt;most&lt;/em&gt; important things. But I never start with an empty class and an empty main method. Students in a course I'd be willing to teach will start with a substantial amount of scaffolding that lets them focus on the important things, rather than low level syntactic details.&lt;/p&gt;&#xA;&lt;p&gt;Students can work to extend an existing system. With care, a simulation can be created that allows the students to program in a Turing Complete environment while emphasizing the essence of &amp;quot;What is a program?&amp;quot; and &amp;quot;How do I build it?&amp;quot;. The &lt;a href=&quot;https://greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenfoot&lt;/a&gt; programming system provides a fairly rich set of starting points. The Greenroom site, linked from there, is the specific teacher resource. (I know the developers and have contributed to Greenfoot, but have no connection.)&lt;/p&gt;&#xA;&lt;h2&gt;Conclusions&lt;/h2&gt;&#xA;&lt;p&gt;If you are using an object-oriented programming language, learn (and teach) how to do it well. Don't use it for things (other paradigms) for which it is ill suited. Teach students in the first course &lt;em&gt;some&lt;/em&gt; paradigm, but only one. paradigm, so that they have a meaningful answer to the two questions: What is a program? How do I create one?&lt;/p&gt;&#xA;&lt;p&gt;So, for a formal answer to the question posed, no, I wouldn't do that. It is actually more like C programming. If I wanted to teach C and its concepts (and have done), I'd use C. C is a better C, anyway.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-11-07T15:01:20.477" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6030" PostTypeId="2" ParentId="5922" CreationDate="2019-11-06T03:05:49.030" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;Does it make sense to introduce methods even before objects?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Short answer: Yes. Without arguing that it's necessarily &lt;em&gt;better&lt;/em&gt;, it's at least a &lt;em&gt;reasonable&lt;/em&gt; approach; it's common enough that major textbooks are published following that strategy. For example, the Gaddis &lt;em&gt;Starting Out with Java&lt;/em&gt; books have two variants, for whichever approach you prefer:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0134802217&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gaddis, &lt;em&gt;Starting Out with Java: From Control Structures through Objects&lt;/em&gt;.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0134462017&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gaddis, &lt;em&gt;Starting Out with Java: Early Objects&lt;/em&gt;.&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the former, writing methods is introduced in Chapter 5 (before writing classes), and indeed, all of the examples in that chapter necessarily have the &lt;strong&gt;static&lt;/strong&gt; keyword. It works sufficiently well enough that this particular textbook is now on its 7th edition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll point out that Gaddis also has an analogous pair of textbooks for C++. At my institution we do use the &quot;control structures through objects&quot; version (largely with a procedural C-like first semester, and then an object-oriented second semester, using the single textbook for the year-long sequence). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also I will recall that circa 2002 or so I was at another institution where I proposed this approach for our Java sequence, and other faculty argued that no, that wasn't logically possible when teaching Java. But here we are almost 20 years later and that's exactly what my current department does. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One more thing to consider: Among my friends who are practicing software engineers, one (in his late 20's) a few weeks ago complained bitterly to me that the pure-OOP philosophy with Java taught throughout his undergraduate program was almost entirely a waste, as he uses none of it for his work in web services. But functional thought is something he certainly uses daily, so he argued there should have been more of that in his education. &lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2019-11-06T19:24:20.423" LastActivityDate="2019-11-06T19:24:20.423" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6031" PostTypeId="2" ParentId="6025" CreationDate="2019-11-06T08:30:08.993" Score="2" Body="&lt;p&gt;I believe that using one key for access, even with unique passwords, is inadvisable. Teaching moments aside, each student should have their own, revocable, restrict-able, key pair. However, as I understand the intentions, you should be able to achieve your goal this way.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Short answer&lt;/h2&gt;&#xA;&#xA;&lt;h3&gt;Point 1:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Edit the instance's &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; file and check that these lines are there:&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;PubkeyAuthentication yes&#xA;PasswordAuthentication yes&#xA;PermitEmptyPasswords no&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Then add this line to require the use of &lt;strong&gt;both&lt;/strong&gt; a key and password to access the instance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;AuthenticationMethods publickey,password&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Point 2:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Create the &lt;em&gt;one key to rule them all&lt;/em&gt; with &lt;code&gt;ssh-keygen&lt;/code&gt; or &lt;code&gt;gpg&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy the private key file to each local machine which will access the EC2 instance&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Create user accounts for each student on the EC2 instance&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For each user account on the instance add the public key to this file:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;/home/$USER/.ssh/authorized_keys&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h3&gt;Point 3:&lt;/h3&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;At the beginning of the term/course have each student login to their assigned account on the EC2 instance and set a new password.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Explanations&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;During the provisioning of the EC2 instance, and probably later as well, you have the option of assigning a key for SSH access. The Amazon EC2 console, Network &amp;amp; Security, Key Pairs is the place to handle the key pair for &lt;em&gt;your&lt;/em&gt; access to the EC2 instance. There you can have Amazon create the key pair for you, or import a key pair's public key which you have made locally. The default account, created when the EC2 instance is created, and the key pair you create/import for that account to access the EC2 instance, are the equivalent of &lt;code&gt;root&lt;/code&gt; on a local machine, sometimes the username is, in fact &lt;code&gt;root&lt;/code&gt; on the EC2 instance. That key pair should be shared with the students as often as you share your password with them. (Can anyone say &quot;&lt;em&gt;never&lt;/em&gt;&quot;?).&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Point 1 - Password &lt;em&gt;and&lt;/em&gt; RSA key required to login&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The first three lines control what the SSH host (EC2 instance) will accept. &lt;code&gt;PubkeyAuthentication&lt;/code&gt;&lt;sup&gt;&lt;a href=&quot;https://man.openbsd.org/sshd_config#PubkeyAuthentication&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; has to be &lt;code&gt;yes&lt;/code&gt; (the default) or the host will not even accept keys, valid or not. &lt;code&gt;PasswordAuthentication&lt;/code&gt;&lt;sup&gt;&lt;a href=&quot;https://man.openbsd.org/sshd_config#PasswordAuthentication&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; defaults to &lt;code&gt;yes&lt;/code&gt;, and could be commented out, or even missing, and it would still work. The caveat here is that thigs will go very bad if it is set to &lt;code&gt;no&lt;/code&gt;. (Bad, in this case, means destroying the EC2 instance and creating a new one, as the final settings will require a key and a password, yet &lt;code&gt;no&lt;/code&gt; here will prevent the SSH host from asking for one.) The &lt;code&gt;PermitEmptyPasswords&lt;/code&gt;&lt;sup&gt;&lt;a href=&quot;https://man.openbsd.org/sshd_config#PermitEmptyPasswords&quot; rel=&quot;nofollow noreferrer&quot;&gt;3&lt;/a&gt;&lt;/sup&gt; setting of &lt;code&gt;no&lt;/code&gt; just stops the students from accessing their account over SSH with an empty password. It &lt;em&gt;will not&lt;/em&gt; prevent them from setting their password to a blank one. If they do, they'll have to get the instructor's assistance to reset the password, and maybe learn a lesson in the process. Lastly, the setting &lt;code&gt;AuthenticationMethods&lt;/code&gt;&lt;sup&gt;&lt;a href=&quot;https://man.openbsd.org/sshd_config#AuthenticationMethods&quot; rel=&quot;nofollow noreferrer&quot;&gt;4&lt;/a&gt;&lt;/sup&gt; specifies what methods are required for authentication.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The EC2 instances are supposed to be operationally equivalent to bare-metal Linux installs. (All be it, without the hardware acquisition and maintenance costs.) Treat yours as such. Each student should have their own, regular Linux, account on the EC2 instance, with all the normal restrictions and settings that you would use if it were a server in your lab room. As the owner of the instance, effectively if not actually &lt;code&gt;root&lt;/code&gt;, you can access the student user directories and process/validate/censor them as needed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The process of creating a new user on an EC2 instance is the same as any other Linux install. &lt;code&gt;sudo adduser new_user_name&lt;/code&gt;. As I understand it, newly create user accounts on the EC2 instance will not have the needed directory structure for using SSH access. The process for creating it, and adding the public key at the same time, are fairly short.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;sudo adduser new_user_name&#xA;sudo su - new_user_name&#xA;mkdir .ssh&#xA;chmod 700 .ssh&#xA;echo &quot;ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDcsebwlu3jVUJfPunR8aENmxcRQKva00MDi7aiyeSh7cpzQpCFK/gqTRGmqZvI6H/0QImek5JfPkJDgUkPHfhlawHRKrEzsvCeiPzKuMT1UHs5wASqHuxTJrjklJeR/knFxdCZZ4kyYFFomdFKsLTR5VPLK/2H3c6APs4+XPxE2Q== gypsyspellweaver@cseducators.stackexchange.com&quot; &amp;gt; .ssh/authorized_keys&#xA;chmod 0600 .ssh/authorized_keys&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Where _new_user_name_ is the name of the user account you wish to create, and the long &lt;code&gt;echo&lt;/code&gt; line contains the &lt;code&gt;.pub&lt;/code&gt; file contents for the student access key that you've created beforehand. (Description below.) (In this example I used a 1024-bit key just to keep the sample line short. In practice it should be 2048-bit, at least. AWS EC2 does not accept DSA keys, and I don't know if they accept Ed25519 keys.)&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Point 2 - One key for all&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;As mentioned above, the key pair &lt;em&gt;you&lt;/em&gt; use to access the EC2 instance gives you root powers. That is not the &lt;em&gt;one&lt;/em&gt; key you want the students using. Of course, the key &lt;strong&gt;+&lt;/strong&gt; passphrase setting applies to you as well, once you have set it in the &lt;code&gt;sshd_config&lt;/code&gt; file, so even with your key pair, the students would need to know, or guess, your password as well. Still, that's easier than getting the key should be. Making a second key for all the students to use is simple enough, and you can even make it without a passphrase. The command, on a local machine,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;ssh-keygen -b 4096 -t rsa -N '' -C student_access@AWS-EC2 -f student_access&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;will create the key pair, saved in &lt;code&gt;student_access&lt;/code&gt; for the private key, and &lt;code&gt;student_access.pub&lt;/code&gt; for the public key.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The content of &lt;code&gt;student_access.pub&lt;/code&gt;, which is a long single line, is what is quoted in the &lt;code&gt;echo&lt;/code&gt; command in the above snippet, to be copied into each students' EC2 home directory structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other file, &lt;code&gt;student_access&lt;/code&gt;, is the file which needs to be distributed to each computer, and to each appropriate account on each computer, which is supposed to have access to the EC2 instance. In addition, if the students are expected to have access to the EC2 instance from their personal devices, that same key will have to be made available to them so that it can be imported into their devices. Home computers and laptops are expected. Mobile devices, however, are also possible. I routinely use my cheap Samsung Galaxy J1 to SSH into servers I maintain. It is possible, with more work on your end, to have a different passphrase on each of the distributed copies of the private key. The command above creates one without a passphrase. Removing the &lt;code&gt;-N ''&lt;/code&gt; option will cause &lt;code&gt;ssh-keygen&lt;/code&gt; to prompt for a passphrase during creation. After the private key is copied to a different computer, of different directory, the command &lt;code&gt;ssh-keygen -p -f student_access&lt;/code&gt; will prompt for the old (if one exists) and new passphrases, re saving the private key with that passphrase. Having a passphrase on the key will prompt for it when the key is used, with some caching, causing the SSH access to be double passphrase protected. Of course, knowing the passphrase also allows the student to change it to a blank, also valid, passphrase with no way for you to enforce it having one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;No matter how it is done, with or without passphrases, you could end up having nearly a hundred copies of the &lt;strong&gt;private&lt;/strong&gt; key floating around in student hands. That is per class. In addition, so that they don't &lt;em&gt;loose&lt;/em&gt; the key, you can expect that some of the students will email it to themselves, causing it to be even more &quot;distributed&quot; than your original plans.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If, as I do, you prefer to use &lt;a href=&quot;https://gnupg.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GnuPG&lt;/a&gt; for handling keys, the following snippet will create the key pair, in a soon to be deleted sandbox directory.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;mkdir sandbox&#xA;pushd sandbox&#xA;mkdir -p .keyring/{openpgp-revocs,private-keys-v1}.d&#xA;chmod -R 0700 .keyring/&#xA;gpg --homedir .keyring --batch --pinentry-mode loopback --passphrase '' --quick-generate-key student_access@AWS-EC2 rsa4096 auth 12m&#xA;gpg --homedir .keyring/ --batch --pinentry-mode loopback --passphrase '' --output student_access.gpg --export-secret-key student_access@AWS-EC2&#xA;gpg --homedir .keyring/ --output student_access.pub --export-ssh-key student_access@AWS-EC2&#xA;popd&#xA;mv sandbox/student_access.* .&#xA;rm -rf sandbox&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;code&gt;student_access.pub&lt;/code&gt; file is, again, the one to use in each user account on the EC2 instance, and looks the same as that created by &lt;code&gt;ssh-keygen&lt;/code&gt; above. The &lt;code&gt;student_access.gpg&lt;/code&gt; file is copied to each local machine, and account, where the command &lt;code&gt;gpg --import student_access.gpg&lt;/code&gt; is used from within that local account, adding it to the user's default keyring.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The option group &lt;code&gt;--batch --pinentry-mode loopback --passphrase ''&lt;/code&gt; in two of the commands creates, or uses, a blank passphrase for the key. Removing the entire group results in prompting for the passphrase during creation, and exporting the private key. Alternatively, it is possible to include the passphrase in the commands by placing it inside the single quotes. The command to change the passphrase in this processes is &lt;code&gt;gpg --change-passphrase student_access@AWS-EC2&lt;/code&gt; with a prompt for both the old and new passphrases.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Point 3 - Let students pick their password&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;This is standard Linux behavior after creating a user for each on the EC2 instance, and takes care of itself. The only &lt;em&gt;protection&lt;/em&gt; taken in this setup is to prevent them from making their choosen password as blank. If, as mentioned above, the make that choice, they will be locked out of their account until you issue the command: &lt;code&gt;sudo passwd user_name&lt;/code&gt; and enter a new password, which they would be expected to change, to a non-blank version this time.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Alternative setup:&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Teaching Linux basics and BASH implies the command line as well. That seems like a good time to also cover some of the aspects of security. The rollout of the provisioning for each term can be included in the corsework. This can include the command line use of &lt;code&gt;ssh-keygen&lt;/code&gt;, or GnuPGP (&lt;code&gt;gpg&lt;/code&gt;), as the case may be. (Both is also an option.) The inclusion of C in your couse suggests that &lt;code&gt;git&lt;/code&gt; could also be included, in which case I would recommend the use of &lt;code&gt;gpg&lt;/code&gt;, as that will allow creation of both an authentication key for access to the EC2 instance and a signing key to use on signed commits in the repository. Especially usefull if you have group projects planned.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teaching about security should also imply that you are &lt;em&gt;doing&lt;/em&gt; security with the setup of the students' system. The single RSA key pair seems contrary to that. If a student leaves the course early you would be expected to create a new key pair, and redistribute it all over again. Otherwise that student need only guess another student's password, if it wasn't already shared with them, or they didn't watch it being typed, and have access to a former classmate's account. Of course, that applies even if the student has not left. They could still have learned another's password and then have access to a fellow student's area, and work, on the EC2 instance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having a key pair unique to each student can be more complicated. Especially if the local computer situation is such that any student could be using any workstation. It is possible that the use of EC2 instances for the student workarea is the solution to the other problems associated with undesignated workstations in the classroom. Some of the issues can be resovled with roaming profiles for the school network. If that is not something the school has established, however, it isn't any help here either. Using USB thumb drives is also an option, and the SSH key, or GnuPG keyring, could be kept there, either by default as part of the login profile, or manually. The &lt;code&gt;ssh&lt;/code&gt; command allows for the identity file to be explicitly named with the &lt;code&gt;-i /path/to/identity/file&lt;/code&gt; option, and the &lt;code&gt;gpg&lt;/code&gt; command accepts the &lt;code&gt;--homedir /path/to/keyring&lt;/code&gt; option as well as the &lt;code&gt;GNUPGHOME=/path/to/keyring&lt;/code&gt; environment variable. In both cases the thumbdrive could be the path used.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The other side of the complication can be significantly reduced by using shell scripts for creating and distributing the key pairs, if it is not added as lesson material for hands-on lab work in the course. The first day of class could be built around accessing the EC2 instance prior to public key authentication, where they change their password and create, import, and backup their keys. Use &lt;code&gt;ssh-keygen&lt;/code&gt; for the first day. Later, when their corsework has progressed to that point, create, and authorize new keys using &lt;code&gt;gpg&lt;/code&gt;, which can be expanded later by adding a signing subkey for git commits, and then an encryption key for other work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The snippets given above (for creating the keys, and for provisioning the EC2 instance) are well suited for using shell parameters in variables and the entire class could be supplied with keys, and EC2 user accounts, using scripts you create, and cancel the majority of the &lt;em&gt;work&lt;/em&gt; you would need to do for each class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The security issues, in my mind, seem to outweigh the &quot;convenience&quot; of a single key, and scripting can greatly reduce the time and effort involved in using unique key pairs for each student, and even for each device students might have, and wish to use for the class. Android and iOS apps for SSH have either the ability to generate key pairs, or to import them. Some have both options. A few also have the ability to export their private keys for storage.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2019-11-06T08:30:08.993" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6032" PostTypeId="1" AcceptedAnswerId="6038" CreationDate="2019-11-06T16:55:54.673" Score="4" ViewCount="347" Body="&lt;p&gt;Next semester I will be TAing a computer organization/assembly language course. I will be full-fledgedly (co-)teaching the lab. The first lab will take place before the first lecture, so me and the other TA will partly be responsible for preparing the students to not resent this class they're forced to take. At this point, the students have taken an intro class with Python and a class on OO concepts in Java, and they might be taking a language-agnostic algorithms class at the same time. The professor's standard way of motivating the concept on the first day is showing how going through an array column by column is slower than row by row even though they give the same result using the same approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Therefore, I have to motivate on two fronts: why is assembly programming (or even C) interesting/relevant, and why is computer organization interesting/relevant. The latter may seem obvious if you're already in the know, but it sure didn't for me before I took this very course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are some of the points that I already intend to include in my opening spiel (everything that starts with a backslash is spurious):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;If you go into data science: the information in this course will explain why certain programs are slow, which is important if you're churning a lot of data.&lt;br&gt;&#xA;\You will learn how to write faster programs in general.&lt;br&gt;&#xA;You will understand how computers actually work, no magic [I don't have to mention that they won't learn everything].&lt;br&gt;&#xA;\This class might make you interested in systems-level programming, even considering a career.&lt;br&gt;&#xA;Do you ever feel awed at those other guys with their cool Arduino or Raspberry Pi projects? This class will teach you how to do what they do.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are some other motivators that I can include?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: Just to be clear: I have no control over the lab, and definitely none over the lecture. I won't even be present for the professor's lecture. What I have control over is what I explain as I explain the pre-baked labs, which in the first three weeks include an introduction to ssh, C, certain binary algorithms, and pointers. Aside from the ssh, these are supposed to segue everyone into asm.&lt;/p&gt;&#xA;" OwnerUserId="8043" LastEditorUserId="8043" LastEditDate="2019-11-13T22:50:23.690" LastActivityDate="2020-10-27T21:56:40.820" Title="How do you wow second-year students into saying &quot;bare-metal programming is cool!&quot;?" Tags="|student-motivation|assembly|architecture|hardware|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6033" PostTypeId="2" ParentId="6032" CreationDate="2019-11-06T17:59:29.547" Score="4" Body="&lt;p&gt;You may not win if you just use words. Instead, give them interesting but challenging exercises to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the most fun exercises I ever did was to produce a &lt;a href=&quot;https://en.wikipedia.org/wiki/Quine_%28computing%29&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quine&lt;/a&gt; in assembly language. But, instead of producing a textual version of itself, as most Quines do, it produces a running copy in memory and then executes (branches to) that copy. The copy seems to act as if the program is moving through memory. As such, the program is called an Animal. This was once a standard exercise at Dartmouth, and I learned it from faculty and students there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A more elaborate version will erase the old copy as it creates the new. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The book XINU (XINU Is Not Unix) by Douglas Comer has some interesting things. One of which is a microkernel for an OS. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unfortunately, this is also one of the skills needed by machine level hackers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To run such a program you need to assure that the OS won't get in your way, however, so you might need to do this on a simulator. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also do interesting things with race conditions and such that are harder to teach in higher level languages. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-06T17:59:29.547" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6034" PostTypeId="1" CreationDate="2019-11-06T22:11:45.380" Score="3" ViewCount="92" Body="&lt;p&gt;I was reading this article “Ten quick tips for teaching programming” by Neil C. C. Brown and Greg Wilson at &lt;a href=&quot;https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5886386/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5886386/&lt;/a&gt;  It had many useful suggestions one of which was “Don’t just Code” which I deciphered as: in addition to making students write code, we can also make them look at code and make meaning of it or engage with it in some way that gets them to think computationally. One way to do this they suggested was using Parsons Problems (That one is new to me).  I quote them here:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;For example, a growing number of educators are &#xA;including Parsons Problems in their pedagogic repertoire &#xA;[20, 27]. Rather than writing programs from scratch, &#xA;learners are given the lines of code they need to solve a &#xA;problem, but in jumbled order. Reordering them to solve &#xA;the problem correctly allows them to concentrate on &#xA;mastering control flow without having to devote mental &#xA;energy to recalling syntax or the specifics of library &#xA;functions. They are also liked by learners; Ericson et al. &#xA; [28] found that learners were more likely to attempt &#xA; Parsons Problems than nearby multiple choice questions &#xA;  in an e-book.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;I looked up the researches referred to above as [20, 27]. The 20 reference at &lt;a href=&quot;http://doi.acm.org/10.1145/2839509.2844617&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://doi.acm.org/10.1145/2839509.2844617&lt;/a&gt; validated and extended the original Parsons’ research at: &lt;a href=&quot;http://dl.acm.org/citation.cfm?id=1151869.1151890&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dl.acm.org/citation.cfm?id=1151869.1151890&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They implemented their Parsons Problems as web based drag and drop exercise. I get the general sense of how to create Parsons Problems. I want to use them. But I work in a part of the world where internet service is expensive and sometimes erratic. Similarly with electric power supply. So I wanted to design a paper based or some non-computer-based, physical media form of Parsons Problems that does not require use of electrical power or web access. I want to begin to use them in my lab/revision classes. However the logistics of their construction and use on non-computer media is not clear and/or problematic to me.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One option I considered was using flash cards with codes written on them for students to rearrange in the correct order of the code. One challenge with flash cards is the bulk. For example, consider an Intro Programming Class with students from several departments as high as 70 or more. Suppose you need a set of say 8 flash cards carrying the code for one program.  For a class of 70 students, that would amount to producing 70 sets of 8 flash cards (i.e. 560 cards). Multiply this for say 300 some exercises for different topics and different programming subjects and you begin to see the challenge. There are resource constraints here. There is also problems of handling the bulk, and keeping the cards in good condition from one use to another etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any ideas how one can produce non web-based Parsons Problems in some (preferably, physical/hard copy) form that is much cheaper, less bulky, durable and yet engaging for the students i.e. they don’t just write answers, they shuffle and move, and do some activity with the options?&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-11-06T22:16:55.140" LastActivityDate="2024-02-15T21:44:13.213" Title="How to construct non computer-based, Paper Parsons Problem" Tags="|lesson-ideas|resource-request|labs|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6035" PostTypeId="1" CreationDate="2019-11-06T22:22:23.367" Score="0" ViewCount="45" Body="&lt;p&gt;I've tried googling for this but I'm not sure I'm searching for the correct terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is anyone aware of any research on the differences between teaching novice software developers how to write code and teaching experienced software developers a second or third programming language?  Even higher up Bloom's taxonomy, teaching them a different programming paradigm (e. g. functional vs. imperative).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would be surprised if the approach were not quite different but what I'm looking for is some sort of empirical basis for certain practices (or avoiding certain practices).  &lt;/p&gt;&#xA;" OwnerUserId="4689" LastActivityDate="2019-11-06T23:12:38.260" Title="Research On Teaching A Second Programming Language/Paradigm" Tags="|scientific-papers|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6036" PostTypeId="2" ParentId="6035" CreationDate="2019-11-06T22:57:21.687" Score="1" Body="&lt;p&gt;I don't have research on it, but some experience. In this case it was teaching functional to those with some other background as part of a language principles course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a terrible Lisp/Scheme programmer so I was as outside my comfort zone as the students were. I did two things. First, I used Standard ML instead of Scheme. I can program effectively in ML, though I realize that the concrete syntax is a crutch. I need that crutch but also used it to teach students who were used to programming with such actual keywords and such. Thus, I used syntax to keep them closer to their own comfort zone. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second thing, was comfort zone breaking. I taught by focusing specifically on the functional thought process, rather than teaching the language as if it were something fresh. &quot;This is how you have to conceptualize the program!&quot; &quot;Yes, they call them variables, but they are really constants! Deal with it.&quot; &quot;You are used to thinking &lt;em&gt;this&lt;/em&gt; way. Now you need to think &lt;em&gt;that&lt;/em&gt; way.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Functional programs also have a number of design patterns that are pretty ubiquitous. These patterns are part of the programmer's tool kit because if you aren't careful you can write some terrifically inefficient programs with lists if you don't know the patterns (tricks, if you will). An example is appending one list to another. It is a linear time problem, but a naive program is probably quadratic. This is probably hard at first sight for any new functional programming novice, but what is obvious to an imperative programmer just doesn't work efficiently. So, the instructor needs to know those patterns as much as they know the paradigm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A pedagogical trick you can use, especially for manipulating lists, is to simulate the operations/algorithms using students as values and building up a list (a lineup of students). They walk through an algorithm and see how values are manipulated. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, teaching novices with no background at all (do they still exist?) is a bit simpler. Start with simple things that build confidence for more complex things, never leaving the paradigm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But as response to your observation that it is probably different teaching novices and others is &lt;em&gt;yes&lt;/em&gt;. Otherwise the experienced programmers will assume too much that turns out to be wrong. The novices have fewer assumptions to make. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I'm pretty sure I've said this before here, but paradigms (consistent ways of thinking) are difficult to change. My go-to example is the change over from highly trained knights on horseback, typically noblemen, to mass armies of lightly trained peasant infantry. The Battle of Agincourt was in 1415 and proved decisively that knights were obsolete as the French army (and much of the nobility) was destroyed by an army of English longbowmen. But in about 1500, Henry VIII (1491-1547) started his training as a knight. He was the last English king who went through the complete training. So, it took about 100 years to recognize that a paradigm had died and been replaced with another. Even in England, which won at Agincourt. Henry's armor (and I think that of his horse) can be seen in the White Tower within the Tower of London. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-11-06T23:12:38.260" LastActivityDate="2019-11-06T23:12:38.260" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6037" PostTypeId="2" ParentId="6034" CreationDate="2019-11-07T01:42:52.493" Score="1" Body="&lt;p&gt;If you have a metal surface to work on, such as some whiteboards, you can get &quot;magnetic paper&quot;. These are sheets of various sizes that are magnetic and can be written on with markers or printed on. With erasable markers they can be reused. They can also be cut to size with a scissors. They will, of course, stick to any metal surface and can be removed and replaced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Search for &quot;magnetic paper&quot; to find several varieties and brands. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-07T01:42:52.493" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6038" PostTypeId="2" ParentId="6032" CreationDate="2019-11-07T12:07:48.313" Score="7" Body="&lt;p&gt;First, just a disambiguation: are you teaching Assembly language or C? Cos, they are not same as your question seems to suggest. C is a high-level procedural clean code language with tremendous abilities to speak to the bare metal similar to but not as Assembler pls. It may help you bridge to assembly but it is not assembly. Let that be clear to your students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Never taught machine programming/ASM. But your question touches something in me: the need to wow! the student; I have same predilection with students. So I felt obliged &amp;amp; did some talking with friends in the know and some research. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here’s the widow’s mite I pieced together. Hope it helps:&#xA;You can add the following to your first lab “sales pitch’:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Let the first lab be a NO CODE, no Technical stuff class. Just getting familiar with selves and ASM in a general way with nothing too technical and thus “intimidating” or “off-putting”. The class should be (pardon my cliché): sugar and spice and all things nice. Toward this:&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add to your spiel, a history of Assembly telling them of Kathleen Booth &amp;amp; others etc. Make it interesting. Search &amp;amp; find some spectacular successes and exploits using ASM and also some disasters of sloppy ASM. Apart from sparking interest and discussion, the last part will have the additional pedagogic value of sensitising the students to their power as oracles speaking to the small dumb “god” in the machine. Also it will put them on notice of the enormous responsibilities their heightened power as bare metal oracles imposes on them to avoid sloppy code (not only for ASM but programming generally).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Let the students see how the higher level languages with their swagger and leaky algorithms are actually, mostly dependent on ASM and C. Let them see that a lot of our higher level constructs e.g. macro were borrowed from Assembler.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As @Buffy I. rightly pointed out, talk alone can’t win a non-committal or skeptical mind. To give them something interesting: show them some good things (e.g. games) made in Assembler and display for them on slide (s) the assembly code snippets that made such things. In this regard I found some of these online and hope they may help or stimulate some interesting ideas:&#xA;&lt;a href=&quot;https://spectrum.ieee.org/geek-life/reviews/three-computer-games-that-make-assembly-language-fun.amp.html&quot; rel=&quot;noreferrer&quot;&gt;https://spectrum.ieee.org/geek-life/reviews/three-computer-games-that-make-assembly-language-fun.amp.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.quora.com/What-are-some-cool-assembly-language-projects-I-can-do?top_ans=21546329&quot; rel=&quot;noreferrer&quot;&gt;https://www.quora.com/What-are-some-cool-assembly-language-projects-I-can-do?top_ans=21546329&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://brianslam.wordpress.com/2014/04/06/assembly-is-fun-sort-of/&quot; rel=&quot;noreferrer&quot;&gt;https://brianslam.wordpress.com/2014/04/06/assembly-is-fun-sort-of/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://news.ycombinator.com/item?id=16710543&quot; rel=&quot;noreferrer&quot;&gt;https://news.ycombinator.com/item?id=16710543&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This one is a Compendium of Assembly Coding Practices from Coding Project. It may help illuminate your teaching:&#xA;&lt;a href=&quot;https://www.codeproject.com/Articles/1116188/40-Basic-Practices-in-Assembly-Language-Programmin&quot; rel=&quot;noreferrer&quot;&gt;https://www.codeproject.com/Articles/1116188/40-Basic-Practices-in-Assembly-Language-Programmin&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2019-11-07T13:25:15.990" LastActivityDate="2019-11-07T13:25:15.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6039" PostTypeId="1" CreationDate="2019-11-10T14:15:27.063" Score="6" ViewCount="1396" Body="&lt;p&gt;Every year I focus on one of my courses to overhaul a bit. Partly because I'm supposed to have professional goals, and this is one that's pretty easy to admin to understand. But I also get bored teaching the same thing every year.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Right now I've got a third-year independent study course (high school). When I started the job a few years ago I basically just continued what the previous teacher was doing. Students propose a project during the first two weeks and then have the year to build it. The biggest catch is that there's almost no accountability for the students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm wanting to change it into a more formal curriculum, and I'm leaning towards a languages class. These are 3rd or 4th-year students that have taken AP-A and Data Structures which are both taught in Java and may have a bit of experience with Python or JavaScript depending on the year. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So with that lead-in, I'm looking for some feedback on the plan.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We do 6, six-week grading terms. The plan is to do a different language each six-weeks. I'm leaning towards doing Python and a crash course in HTML/CSS/JS during two of the terms. And then I'm skimming 7 Languages in 7 weeks and the sequel for ideas on what other languages to do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;They'll have already done 2 years of Java, so I'd like to stay away from OOP and C-family languages as much as possible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I'd like it to be project heavy. Maybe one big project per language. I don't want to do many, if any, small lab type assignments. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any thoughts or tips from those that might have been down this route before?&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2019-11-11T17:47:21.167" Title="Languages class in high school" Tags="|secondary-education|curriculum|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6040" PostTypeId="2" ParentId="6039" CreationDate="2019-11-10T15:07:23.533" Score="11" Body="&lt;p&gt;First, some caveats come to mind. The difference between languages isn't primarily syntax, even languages in the same paradigm family. Once a student has a solid basis of programming in a single language, say Java, they have developed a way of thinking about transformation of problems into solutions. They have ways to assure that their programs are correct and complete. One hopes, at least. Changing to a different language requires that they learn to think in a different way, whether it is small or large. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once considered applying for a job where the focus was to be on languages (my specialty). They wisely specified in the call for applications &quot;Principles of&quot; not &quot;Examples of&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basis of my suggestions, following, is to focus on the principles, not the examples. And the principles involve ways of thinking, not syntax. It is pretty common for people moving from one programming language to another to just write in the old style. A Python program that is just &quot;misspelled Java&quot;, isn't really a Python program. It isn't pythonic, in the jargon.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a university curriculum there are often (or were) two courses devoted to languages: Language Principles, and Languages and Compilers. I taught both of these for many years. By the time students take the first course in the sequence they are well grounded in at least one language and have likely seen a couple more, mostly in passing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you are correct in wanting to stay mostly away from other OO languages, except: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The difference between Java and Python (or Ruby) isn't the syntax. It is that Java is statically typed and the others are dynamically typed. If a Java program compiles (and you haven't used casting incorrectly), then it is type correct and will not fail for type errors when running. That isn't true for a Python program since the (still strong) typing is done at runtime, not at compile time. So, one major problem for the Python programmer that isn't faced by the Java programmer, is what tools and techniques (ways of thinking) does the Python programmer need to employ to assure that the (compilable) program they write will actually run to completion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, if you want students to learn to &lt;em&gt;think&lt;/em&gt; in a different paradigm than what they learned first, you will need to give them time and experience. I think that six weeks per paradigm is probably sufficient if it is done well and fairly intense, focusing specifically on &lt;em&gt;how to think like a &lt;strong&gt;whatever&lt;/strong&gt; programmer&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some possibilities for languages after OO. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Scheme (Racket) or Standard ML (aka SML). A minor point, but some functional languages use eager evaluation of function arguments (like Java) and others use lazy evaluation. The programming style is a bit different for these two cases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Modula 2 (or Dijkstra's presentation language) or Oberon. These are for pure procedural programming. Top down problem decomposition, solution of simple problems as procedures, bottom up solution integration.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;SQL and the underlying Relational DB theory that underlies it. A really different paradigm. Recent versions are Turing Complete and can be used (awkwardly) as general purpose programming languages. A chance to explore Turing Completeness and maybe even Turing Machines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some concurrent programming language. Maybe Rust, which is both modern and a C replacement, Erlang. Or even a data flow language like &lt;a href=&quot;https://en.wikipedia.org/wiki/Swift_(parallel_scripting_language)&quot; rel=&quot;noreferrer&quot;&gt;Swift&lt;/a&gt; -- note: That isn't Apple's language of the same name.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some simple and uniform Assembler Language (not Intel). You need an emulator, though. A simple memory model. A uniform Register set.  Both pdp-11 and MC68000 fit the bill-- more --&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prolog  Logic programming where the program is descriptive, not algorithmic. Actually, SQL has that characteristic also. The algorithms are (almost) all built in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perl or bash scripting language&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lots of choices - the list isn't complete at all. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Late in your sequence you could have students work in small groups to produce a report (with examples) on some language of their choice, taken from a list that you supply. You could use a lottery system of some sort to make sure each group has a different language. The language can be wildly different, &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_programming_languages&quot; rel=&quot;noreferrer&quot;&gt;There are a lot of possibilities&lt;/a&gt;. I would probably include R, Self, Processing, Forth or Postscript, Bash, ... -- more -- for my own list. You could also let them make proposals for languages not on your list if they can give you a (written) reason for another language. Don't let them misspell Java, of course. And make sure a processor is available to them for any language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I suggest that the last few weeks (you say six week terms) would be to summarize what has been learned in the previous segments and make some things very explicit. For example, dynamic v. static typing. You could also give them an idea about what a compiler might look like for a simple language, in particular the separation of lexical, syntactical, semantic, and optimization components of a compiler. A good source for the latter (instructor resource) is Per Brinch Hansen's, &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0130830984&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;On Pascal Compilers&lt;/a&gt;. You can probably find a copy in a good academic library. Another good source (again, for the teacher) is David Gries's &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Science of Programming&lt;/a&gt;. The latter book does an interesting thing beyond its stated purpose, which is to you how an imperative programmer &lt;em&gt;should&lt;/em&gt; think in terms of pre and post conditions while developing algorithms. It uses a simple language for exposition that is the same as that used by Edsger Dijkstra in his scholarly papers. A compiler for this language is, like the Hansen book, quite accessible. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You obviously can't do all of this. Nor would a university course. But, I would use at least the following in developing the course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Choose languages from different paradigms and focus on that - the deep semantics, not the syntax. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Think about all the variations open to the language designer and try to cover as many as you can. Static v. Dynamic typing. Concrete v. Abstract syntax. Strong v. weak typing. Garbage Collected v not. General purpose v. special purpose. Many v. Few abstraction mechanisms. -- more --&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In going from one fragment of the course to the next, I'd think about how different the next language is from the previous. Scheme is very different from Java (no syntax, no variable state, dynamic typing,...). SML, at least has syntax and a very interesting type inference system that permits typing at compile time in a functional language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Summarize at the end. Provide room for a lot of discussion. Have the students write reports and not just programs. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-11-10T19:21:35.877" LastActivityDate="2019-11-10T19:21:35.877" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6041" PostTypeId="2" ParentId="6039" CreationDate="2019-11-10T17:00:32.677" Score="1" Body="&lt;p&gt;I took a class in programming languages that was absolutely awful. We spent about 3 weeks per paradigm, and had 12-16 hour labs due every week.  Each paradigm was different and new, and I couldn't morph my mind around them fast enough.  (I was also not that motivated at that particular moment in my life, which certainly didn't help matters.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have spent much of my career working around that class, and making sure that I didn't do something like that to my own student's.  There was too much variation, it came too fast, and it was just too hard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interestingly enough, a fellow student on that class who has since become a CS professor and researcher in programming languages also flagged that class as one that was quite important in his own teaching.  Apparently, he has been also madr avoiding those mistakes a centerpiece of his own teaching career.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem, as we both agreed, was that real paradigm shifts (such as to functional languages) take real time to absorb.  If the goal is to meaningfully be able to think and program in a functional language, them give that the time it deserves.  I currently teach Scheme to kids in a very, very similar place to the one you describe.  (High school, having had AP and Data Structures)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I start functional programming in November, abd find that it takes about 2 months to get them vaguely comfortable, and the rest of the year to get them really able to think in the new way.  I cover other topics in CS during the remaining months, but assign all of the labs in Scheme.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, you don't have to take it that far. After all, anyone who goes to college for CS will take another functional language, so you can just be a first exposure.  But be aware that it takes real time, and real effort, to think in a completely new way.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-11-10T17:00:32.677" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6042" PostTypeId="1" CreationDate="2019-11-10T23:27:58.390" Score="1" ViewCount="135" Body="&lt;p&gt;I'm running into some annoying technical problems in trying to incorporate JavaFX into my CS1 class, mainly arising from the constraints of avoiding/minimizing material they haven't yet learned.  Specifically. the class is an objects-late approach, and by this point, they've seen the standard imperative control flow constructs, static method definitions, and object &lt;em&gt;usage&lt;/em&gt;, though not yet class definitions.  They're about to learn arrays, and they'll see class definitions and the basic notions of inheritance and encapsulation behind interfaces after that.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Up to this point, they've learned to write console-based applications, with input taken from command line arguments or else interactively, using Scanners.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this very moment, I want to detour in to graphics, because algorithmic art is wonderful, and students love it.  In the past, I've used Swing for this, starting from the templates in David Eck's textbook (&lt;a href=&quot;http://math.hws.edu/javanotes/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to Programming Using Java&lt;/a&gt;).  Here, for example, is a simple program that repeatedly prompts the user for (x,y) coordinates and a color choice, then displays a dot at that location and color (as you can see, this one was shown after introducing arrays, but before class definitions):&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;import java.awt.*;&#xA;import java.awt.event.*;&#xA;import javax.swing.*;&#xA;&#xA;import java.util.Scanner;&#xA;import java.util.InputMismatchException;&#xA;&#xA;public class Drawing extends JPanel { &#xA;&#xA;    static final int MAX_DOTS  = 100;&#xA;&#xA;    static int[] xs = new int[MAX_DOTS];&#xA;    static int[] ys = new int[MAX_DOTS];&#xA;    static Color[] cs = new Color[MAX_DOTS];&#xA;    static int numDots = 0;  // the number of array cells actually used&#xA;&#xA;    public static void main (String[] args) {&#xA;&#xA;        // 1. Set up the drawing area&#xA;        Drawing d = new Drawing();&#xA;        d.setBackground(Color.WHITE);&#xA;        d.setPreferredSize(new Dimension(700,450));&#xA;&#xA;        // 2. Set up the window&#xA;        JFrame window = new JFrame(&quot;Drawing window&quot;); &#xA;        window.setContentPane(d);  &#xA;        window.pack();   &#xA;        window.setLocation(150,100);  &#xA;        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&#xA;        window.setResizable(true);&#xA;        window.setVisible(true);  // show the window on the screen&#xA;&#xA;        Scanner inp = new Scanner (System.in);&#xA;&#xA;        while (numDots &amp;lt; MAX_DOTS) {&#xA;            System.out.print(&quot;x y c (0:red, 1:green, 2:blue, 3:yellow) --&amp;gt; &quot;);&#xA;            int x = inp.nextInt();&#xA;            int y = inp.nextInt();&#xA;            Color c = colorOf(inp.nextInt());&#xA;            xs[numDots] = x;&#xA;            ys[numDots] = y;&#xA;            cs[numDots] = c;&#xA;            numDots = numDots + 1;&#xA;&#xA;            d.repaint();     // schedule a re-drawing of the image&#xA;&#xA;            // flush the input stream to get ready for the next input:&#xA;            inp.nextLine();  &#xA;        } // while&#xA;&#xA;        System.out.println(&quot;No more dots to draw.  Press ENTER to exit the program&quot;);&#xA;        inp.nextLine();&#xA;        window.dispose();  &#xA;    } // main&#xA;&#xA;    // Quick and dirty integer to color map.&#xA;    static Color colorOf(int c) {&#xA;        Color[] colors = {Color.red, Color.green, Color.blue, Color.yellow};&#xA;&#xA;        if (0 &amp;lt;= c &amp;amp;&amp;amp; c &amp;lt; colors.length) {&#xA;            return colors[c];&#xA;        } else {&#xA;            return Color.black;&#xA;        }&#xA;    } // colorOf&#xA;&#xA;    protected void paintComponent(Graphics g) {&#xA;        super.paintComponent(g);&#xA;&#xA;        for (int i = 0; i &amp;lt; numDots; i++) {&#xA;            // We use the assumption that a single dot is represented in the&#xA;            // array elements xs[i], ys[i], and cs[i]&#xA;            Color savedColor = g.getColor(); &#xA;            g.setColor(cs[i]);&#xA;            g.fillOval(xs[i],ys[i],15,15);&#xA;            g.setColor(savedColor);&#xA;        } //for&#xA;    } //paintComponent&#xA;&#xA;} // Drawing class&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The primary interaction is the loop in main that prompts for coordinates, adds entries to the parallel arrays, and calls the JPanel's repaint() method.  No class definitions, no lambdas or ActionListeners, no invocation of separate threads via a run() method.  It is as simple as I know how to make graphics at this level, while still using a real-world Java framework.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I cannot figure out how to do this kind of interaction in JavaFX, within these constraints.  Here's where I'm stuck:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;import javafx.application.Application;&#xA;import javafx.scene.layout.BorderPane;&#xA;import javafx.scene.Scene;&#xA;import javafx.stage.Stage;&#xA;import javafx.scene.canvas.Canvas;&#xA;import javafx.scene.canvas.GraphicsContext;&#xA;import javafx.scene.paint.Color;&#xA;&#xA;import java.util.List;&#xA;import java.util.Scanner;&#xA;&#xA;&#xA;/**&#xA; *  This file can be used to draw simple pictures.  Just fill in&#xA; *  the definition of drawPicture with the code that draws your picture.&#xA; */&#xA;public class Circles extends Application {&#xA;&#xA;    private static Canvas canvas;&#xA;&#xA;    public static void main(String[] args) {&#xA;        //        launch();  // Boilerplate:  essentially, this starts the window&#xA;        launch(args);&#xA;&#xA;        if (Circles.canvas != null ){&#xA;            Scanner inp = new Scanner(System.in);&#xA;&#xA;            while (true) {&#xA;                System.out.print(&quot;x y : &quot;);&#xA;                int x = inp.nextInt();&#xA;                int y = inp.nextInt();&#xA;                drawCircle(canvas.getGraphicsContext2D(),x,y);&#xA;            }&#xA;        }  else {&#xA;            System.err.println(&quot;Fatal:  no canvas created.  Bailing out.&quot;);&#xA;            System.exit(1);&#xA;        }&#xA;    } // main&#xA;&#xA;    public static void drawCircle(GraphicsContext g, int x, int y) {&#xA;&#xA;        int colorChoice = (int)(4*Math.random());&#xA;        switch (colorChoice) {&#xA;        case 0:&#xA;            g.setFill(Color.RED);&#xA;            break;&#xA;        case 1:&#xA;            g.setFill(Color.GREEN);&#xA;            break;&#xA;        case 2:&#xA;            g.setFill(Color.BLUE);&#xA;            break;&#xA;        case 3:&#xA;            g.setFill(Color.YELLOW);&#xA;            break;&#xA;        }&#xA;&#xA;        g.fillOval(x - 50, y - 50, 100, 100 );&#xA;        g.setStroke(Color.BLACK);&#xA;        g.strokeOval( x - 50, y - 50, 100, 100 );&#xA;    }&#xA;&#xA;&#xA;    /**/&#xA;    //------ Implementation details: DO NOT EXPECT TO UNDERSTAND THIS ------&#xA;&#xA;    public void start(Stage stage) {&#xA;        List&amp;lt;String&amp;gt; argList = getParameters().getRaw();&#xA;&#xA;        int width = Integer.parseInt(argList.get(0));&#xA;        // The width of the image.  You can modify this value!&#xA;        int height = Integer.parseInt(argList.get(1));&#xA;        // The height of the image. You can modify this value!&#xA;&#xA;        Circles.canvas = new Canvas(width,height);&#xA;        drawPicture(canvas.getGraphicsContext2D(), width, height);&#xA;&#xA;        BorderPane root = new BorderPane(canvas);&#xA;        root.setStyle(&quot;-fx-border-width: 4px; -fx-border-color: #444&quot;);&#xA;        Scene scene = new Scene(root);&#xA;        stage.setScene(scene);&#xA;        stage.setTitle(&quot;Simple Graphics&quot;); // STRING APPEARS IN WINDOW TITLEBAR!&#xA;        stage.show();&#xA;        stage.setResizable(false);&#xA;    }&#xA;&#xA;} // end SimpleGraphicsStarter&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Yes, I realize that I can get the effect I want by adding a runLater() call, to dispatch a separate thread.  I'm skating on thin enough ice with my students as it is, though:  there is only so much boilerplate you can ask them to accept and work within.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do any of you have suggestions for how I can pull off this kind of interaction within these constraints?&lt;/p&gt;&#xA;" OwnerUserId="4799" LastActivityDate="2019-11-22T10:07:45.830" Title="JavaFX and console-based interfaces, at the CS1 level" Tags="|java|undergraduate|programming|javafx|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6043" PostTypeId="2" ParentId="5990" CreationDate="2019-11-11T00:02:34.837" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;[From your comment] P.S need such combinatorics after which I can understand the course of data structures and algorithms.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Combinatorics doesn't factor into data structures and algorithms in this way. If your goal is to understand data structures and algorithms, combinatorics is an irrelevant topic.&lt;/p&gt;&#xA;&lt;p&gt;Combinatorics is also quite vague, as this can effectively include the integer number sequence, which is effectively &amp;quot;knowing how to count&amp;quot;.&lt;br /&gt;&#xA;While software development will generally expect you to count numbers from time to time, there's a vast difference between counting and the subjects that a book on combinatorics will delve into. Again, the latter is irrelevant to get a basic understanding of data structures and algorithms.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is there a good book for combinatorics for programmers?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;As far as I'm aware and my research could uncover, there is no such book tailored to software engineers. The field of combinatorics is not part of the field of software engineering. Combinatorics is a part of maths, not CS, and therefore is explained in a mathematical context.&lt;/p&gt;&#xA;&lt;p&gt;Note that it is true that early examples in CS training courses often use simple maths. However, this is done purely because students will generally understand the simple maths and therefore are able to fully focus on the programming challenge without being distracted by the mathematical operations in the example.&lt;/p&gt;&#xA;&lt;p&gt;If you are able to count and perform elementary operations (+,-,*,/) then you have enough knowledge to learn to program. Additional mathematical operations may be a nice-to-have for more advanced examples, but they don't require in-depth mathematical skills. If you passed high school maths (based on my experience, you don't need anything above the math 14-year-olds are taught in school), then you are as prepared as you need to be.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Obvious caveat&lt;/strong&gt;: Unless your intention is to delve into programming specifically to tackle more advanced mathematical calculations. But that's not what a learner should be focusing on.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="9154" LastEditDate="2021-05-25T08:35:36.600" LastActivityDate="2021-05-25T08:35:36.600" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6045" PostTypeId="2" ParentId="6039" CreationDate="2019-11-11T16:22:33.920" Score="1" Body="&lt;p&gt;I teach a high school independent study class that does this but it is a course intended for beginning programming students.  The languages are therefore beginner languages.  It does give them an intro to an interesting spectrum though.  I use code.org (Star Wars or Frozen or Classic Maze), Alice, Small Basic, Thunkable, micro:bit and, depending on the student, a little Python.  Right now I am spending a large chunk of the semester with Thunkable and a couple of Indian Ed projects.  At one time I was going to include a HTML/CSS/Java script module but there was simply not enough time in the semester to do it correctly.  Thunkable fitted easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My goal is not for the students to get fluent with each platform, but to get a taste for what is out there and to get comfortable with finding learning resources.  I feel learning how to learn a language is a lot more important than having a particular syntax or paradigm memorized.  Several of the comments mention the difficulty switching between language paradigms if going with heavy languages.  I agree, that is why I use simple languages intended for students.  The languages are simple but fun to tinker with.  For example the Alice project is to find a Shakespeare scene to build an animation of.  The Small Basic is a simple turtle graphics project.  Nothing complicated but enough to get the general idea of the possibilities of each environment.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fact your students are much more advanced would maybe require more depth in the projects but it still could be a course for the kids to have a lot of fun making artifacts with fun languages.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2019-11-11T16:22:33.920" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6046" PostTypeId="2" ParentId="6039" CreationDate="2019-11-11T17:47:21.167" Score="2" Body="&lt;p&gt;I took such a class at university.  (This was in the 1980s, so most of the classes used some imperative language, at the time the primary languages were PL/I and Pascal, with some FORTRAN and COBOL; but these were in the process of being replaced by Ada and C.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did find the course to be very enriching, but the students (including me) had already had a minimum of 4 semesters' worth of CS classes, including at least one required upper level course.  (It sounds like your students will be at least as well prepared; I note this mostly for the benefit of other readers.)&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;The first few weeks of the languages course were spent using SNOBOL and the last few weeks using LISP, mostly because the instructor wanted us to understand that there were very different paradigms out there than the imperative mode we'd mostly been exposed to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;middle&quot; weeks were spent looking at various features typically associated with imperative languages: input/output formatting, record structures, scoping (including nested functions/procedures), etc.  IIRC we used a textbook called &lt;em&gt;Programming Language Landscape&lt;/em&gt; or similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Concerning the SNOBOL and LISP portions of the class, the lab assignments were small and focused.  The instructor was explicit that his goal was not to make us experts, but rather to &quot;raise awareness&quot; as it were, and prepare us for further and more focused learning in those areas if we wanted to pursue that.  (For example, there were a couple of AI classes, but those were electives).&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;For an introductory / survey course I think I would recommend going a similar route, i.e. small assignments rather than large projects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would also echo some of the other answers @Buffy's in particular and say you should perhaps not focus so much on different &lt;em&gt;languages&lt;/em&gt; as different &lt;em&gt;paradigms&lt;/em&gt;.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or perhaps a different twist on a familiar theme.  The C standard I/O library design is generally considered to be an object-oriented abstraction (and a fairly good one), despite not being written in an OO language.  So implementing an OO design in a non-OO language might be an interesting idea ... or to look at how a non-OO language such as Modula or Ada (8x) handles encapsulation. &lt;/p&gt;&#xA;" OwnerUserId="2501" LastActivityDate="2019-11-11T17:47:21.167" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6047" PostTypeId="1" CreationDate="2019-11-12T20:12:30.010" Score="2" ViewCount="66" Body="&lt;p&gt;Is there any good source/textbook with notes about db indexing with examples?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="8651" LastEditDate="2019-12-17T02:59:55.393" LastActivityDate="2019-12-17T02:59:55.393" Title="Materials on database indexing with examples" Tags="|resource-request|databases|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6048" PostTypeId="2" ParentId="6047" CreationDate="2019-11-12T20:19:58.387" Score="1" Body="&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Database_index&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt; entry is informative. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0131873253&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Database Systems: The Complete Book&lt;/a&gt; by Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom  is probably good. Older versions of database books by Ullman have been accurate and reliable. I haven't seen the latest version, though. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Actually, most of my experience with Ullman has been his compiler books, not database. Still, though, a reliable person. More than just a random author. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-11-12T20:57:43.170" LastActivityDate="2019-11-12T20:57:43.170" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6049" PostTypeId="2" ParentId="6032" CreationDate="2019-11-12T23:08:03.463" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Forth_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Forth&lt;/a&gt; is very interesting language which can run on bare metal, and also be as high level as you want (I've see a compiler/interpreter of subset of Pascal implemented in 11 pages)  and will stretch brain of your students. I know it did mine :-)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And is trivial to code some definitions in Assembly if you want.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code is incredibly compact, ideal (and still used) for embedded systems.&lt;/p&gt;&#xA;" OwnerUserId="1480" LastActivityDate="2019-11-12T23:08:03.463" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6050" PostTypeId="2" ParentId="6042" CreationDate="2019-11-14T14:31:26.350" Score="3" Body="&lt;p&gt;Instead of a &lt;code&gt;System.in/out&lt;/code&gt; based dialog, you may consider a &lt;code&gt;Pane&lt;/code&gt; containing&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a &lt;code&gt;Canvas&lt;/code&gt; for drawing&lt;/li&gt;&#xA;&lt;li&gt;a &lt;code&gt;TextField&lt;/code&gt; for user input.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Here is a sample program (hard-coded constants, to keep it short):&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;package application;&#xA;&#xA;import javafx.stage.Stage;&#xA;&#xA;import javafx.application.Application;&#xA;import javafx.application.Platform;&#xA;import javafx.event.ActionEvent;&#xA;import javafx.scene.Scene;&#xA;import javafx.scene.canvas.Canvas;&#xA;import javafx.scene.canvas.GraphicsContext;&#xA;import javafx.scene.control.Label;&#xA;import javafx.scene.control.TextField;&#xA;import javafx.scene.input.MouseEvent;&#xA;import javafx.scene.layout.BorderPane;&#xA;import javafx.scene.paint.Color;&#xA;&#xA;public class Main extends Application {&#xA;&#xA;    Canvas drawingArea = new Canvas(300, 300);&#xA;    TextField inputLine = new TextField();&#xA;&#xA;    double[] x = new double[100];&#xA;    double[] y = new double[100];&#xA;    int nb = 0;&#xA;&#xA;    @Override&#xA;    public void start(Stage primaryStage) {&#xA;        try {&#xA;            // Build the scene&#xA;            BorderPane root = new BorderPane();&#xA;            root.setTop(new Label(&quot;Type exit, or coordinates&quot;));&#xA;            root.setCenter(drawingArea);&#xA;            root.setBottom(inputLine);&#xA;            Scene scene = new Scene(root, 400, 400);&#xA;&#xA;            inputLine.setOnAction(this::processLine);&#xA;&#xA;            updateDrawing();&#xA;&#xA;            primaryStage.setScene(scene);&#xA;            primaryStage.show();&#xA;        } catch (Exception e) {&#xA;            e.printStackTrace();&#xA;        }&#xA;    }&#xA;&#xA;    void addPoint(double nx, double ny) {&#xA;        if (nb &amp;gt;= 100) {&#xA;            return;&#xA;        }&#xA;        x[nb] = nx;&#xA;        y[nb] = ny;&#xA;        nb++;&#xA;    }&#xA;&#xA;    void processLine(ActionEvent event) {&#xA;        String line = inputLine.getText().trim();&#xA;&#xA;        // should we stop it?&#xA;        if (line.equals(&quot;exit&quot;)) {&#xA;            Platform.exit();&#xA;        }&#xA;        // items separated by spaces&#xA;        String[] items = line.split(&quot;\\s+&quot;);&#xA;        if (items.length != 2) {&#xA;            return;&#xA;        }&#xA;        try {&#xA;            addPoint(Double.parseDouble(items[0]),&#xA;                    Double.parseDouble(items[1]));&#xA;            inputLine.clear();&#xA;        } catch (NumberFormatException e) {&#xA;            // ...&#xA;        }&#xA;        updateDrawing();&#xA;    }&#xA;&#xA;    void updateDrawing() {&#xA;        GraphicsContext gc = drawingArea.getGraphicsContext2D();&#xA;&#xA;        gc.setFill(Color.RED);&#xA;        gc.fillRect(0, 0, drawingArea.getWidth(), drawingArea.getHeight());&#xA;&#xA;        gc.setFill(Color.YELLOW);&#xA;        for (int i = 0; i &amp;lt; nb; i++) {&#xA;            gc.fillOval(x[i]-10, y[i]-10, 20, 20);&#xA;        }&#xA;    }&#xA;&#xA;    public static void main(String[] args) {&#xA;        launch(args);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The event-related stuff is kept to a minimal &lt;code&gt;inputLine.setOnAction(this::processLine)&lt;/code&gt;, and your students will immediately want you to explain to add points with the mouse.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Answer:&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;    drawingArea.setOnMouseClicked(this::processMouse);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;    void processMouse(MouseEvent event) {&#xA;        addPoint(event.getX(), event.getY());&#xA;        updateDrawing();&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It also happens to be much simpler to code than &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;using the &lt;code&gt;TextField&lt;/code&gt; (a dozen lines of code above)&lt;/li&gt;&#xA;&lt;li&gt;or running a text-based dialog (nobody even wants to try to propose a solution :-))&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2019-11-22T10:07:45.830" LastActivityDate="2019-11-22T10:07:45.830" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6051" PostTypeId="1" CreationDate="2019-11-15T21:32:21.690" Score="2" ViewCount="105" Body="&lt;p&gt;For example, does it makes sense to write tutorial called &lt;code&gt;Best Intellij shortcuts&lt;/code&gt;. You can already find so many shortcuts online in many places. If the answer is &quot;There is no need for new article since many of them already exist&quot; then why there is tons of tutorials how @Autowired annotation works? If you google for &quot;spring @Autowired&quot; you will find a lot of materials about how that annotation works, some written in back in 2012. and some of them in 2019 and they are almost totally the same. Also, I am sure that even before all of those articles that information was available in spring documentation. I think that the value of that new tutorial would be to highlight the best ten annotations.&lt;/p&gt;&#xA;" OwnerUserId="8615" LastActivityDate="2019-11-18T12:17:14.033" Title="Does it make sense to write tutorial when content of the tutorial can be already learned from internet without that tutorial?" Tags="|lesson-ideas|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6052" PostTypeId="2" ParentId="6051" CreationDate="2019-11-16T16:28:14.813" Score="3" Body="&lt;p&gt;Well, I'd suggest you should, for a couple big reasons:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Most people who are learning jump between resources and look for good ones. I often tell people who are learning something that if they're stuck and nothing makes sense, to try a different resource. It is just as often the fault of the resource as the person. For this reason, it is to learner's advantage to have lots of different resources they can try out there. Some like videos. Some think bullet list articles are great. Others want to sit down in a course. The internet caters to all of those choices.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As admirable as your goal of teaching others is, this should be just as much for yourself - indeed, one of the best ways of learning is teaching. Explaining something solidifies that understanding in your own mind.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is good to learn how to convey your ideas - how to write well. I guarantee you that if you keep writing articles like this, you'll look back at the first one years later and see how far your writing style has come.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-11-16T16:28:14.813" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6053" PostTypeId="2" ParentId="6032" CreationDate="2019-11-16T16:42:08.963" Score="1" Body="&lt;p&gt;I would argue the best way to do this is have some demonstrations prepared: things they can build with the tools you're teaching that &quot;look&quot; flashy and exciting. Show some cool programs written in C, demonstrate some sort of Arduino-based program that looks interesting (a relatively simple one I've seen waters plants), something in assembly that looks interesting, and so forth.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Make them say, &quot;I want to build that!&quot; before you give them the tools to build it or things like it.&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2019-11-16T16:42:08.963" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6054" PostTypeId="1" CreationDate="2019-11-18T11:45:41.733" Score="0" ViewCount="104" Body="&lt;p&gt;What's the best approach to learning a library, framework etc.I find it overwhelming initially as to where should I start learn such things. Is it like you start taking up a course and then try to implement it. Or just start applying directly and learn as you go. If it's the latter could you just elaborate what you do? As I start studying in the latter way i.e learning as I go, I find myself getting a lot of doubts and confusion regarding the content. I start with tensorflow for eg, but I end up searching for different things as new things come up while studying, this makes me frustrated and directionless. What approach can I take here?&lt;/p&gt;&#xA;" OwnerUserId="6345" LastEditorUserId="1293" LastEditDate="2019-11-18T12:49:13.137" LastActivityDate="2019-11-18T13:00:26.883" Title="What is the best approach to learning things in CS?" Tags="|student-motivation|self-learning|struggling-students|active-learning|" AnswerCount="1" CommentCount="0" ClosedDate="2019-12-07T16:24:48.473" ContentLicense="CC BY-SA 4.0" />
  <row Id="6055" PostTypeId="2" ParentId="6051" CreationDate="2019-11-18T12:10:07.897" Score="1" Body="&lt;p&gt;&lt;em&gt;Note: I'm conflating teacher/mentor in the answer as it applies to both, albeit to slightly different degrees.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A teacher's ability to teach directly derives from their understanding of the material they're teaching. When I say &quot;material&quot;, that also includes the teacher resources.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does that mean you're not allowed to use existing materials? Of course not. But if you rewrite it, you learn it, and when you learn it, you tend to know it better than if you just linked to a resource that you didn't write. It's not a requirement, but it will generally improve the quality of both your teacher's resource &lt;em&gt;and&lt;/em&gt; your ability as a teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That being said, especially for software development, I find it very valuable to sometimes give students a URL to highlight the fact that &lt;em&gt;this information can be found online&lt;/em&gt;. Similarly, rather than answer a question, I might give them a google query which I suspect will have the answer in the top results.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is value to teaching students to find things themselves, but this is not a good starting point when your students are total newcomers. It's more effective to first guide them and selectively feed them information, and when they are comfortable with the basics, to then teach them how to learn about new things by looking them up.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;If you google for &quot;spring @Autowired&quot; you will find a lot of materials about how that annotation works, some written in back in 2012. and some of them in 2019 and they are almost totally the same&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;As a simple analogy, if I'm googling to find a list of the best mobile games, I will include the current year specifically to ensure that the list I get is current. Similarly, your tutorial writers are going to make current adaptations, which may be the same (if nothing changed) or not (if things have evolved).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're thinking to yourself that &quot;the 2019 article should only list the &lt;strong&gt;new&lt;/strong&gt; things&quot;, that would mean that a new student needs to look up the 2019 article, the 2018 article, the 2017 article, ... and so on until the initial release of the subject matter. That's not a great resource for a beginner, especially if e.g. &quot;new in 2017&quot; features were later supplanted by &quot;new in 2019&quot; features.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;As a technical example, think about how hard it would be to understand a code file by only seeing its initial add to version control and the diffs that have occured since then. Wouldn't you much prefer to just see the file &quot;as is&quot; today?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, when tailored to beginners, the 2019 article should be a comprehensive list of information that a beginner can base themselves on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There's a vast difference between articles tailored to beginners and experts. Your expectations of &quot;no repetition&quot; in articles only works for experts who already know the parts that would otherwise be repeated.&lt;br&gt;&#xA;Beginners, however, don't want these parts to be omitted because they don't yet know them (to them, it's not &lt;em&gt;repeated&lt;/em&gt; content). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you only publish incremental articles, then the effort to enter a field as a beginner increases as a technology becomes older (because you'd need to parse more and more incremental tutorials).   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Instead, it makes more sense to regularly do a &quot;current state of the technology&quot; article which explains the entire ecosystem (current to the period of publishing), and these are the tutorials you are referring to.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;does it makes sense to write tutorial called Best Intellij shortcuts&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Specifically for shorcuts (and similar), these things often end up being used as a &lt;strong&gt;cheat sheet&lt;/strong&gt;, which means that it's much more valuable to have a list of &lt;em&gt;all&lt;/em&gt; (relevant) shortcuts as opposed to only the new ones.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I would like to create a community of inexperienced developers(with &amp;lt; 2 years of experience) so I can offer them mentorship.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If we extend the &quot;why more than one tutorial&quot; premise of the question, why would you want to mentor people when they can already find tutorials online?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extending it even further, why do schools even have teachers when the students already have the school books in their possesions?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The answer to that question, much like the answer to the premise of your posted question, is that &lt;strong&gt;guidance is a personalized trajectory&lt;/strong&gt;, and an online article cannot adapt itself based on a student's understanding. Letting students figure it out for themselves, while not technically impossible, is going to throw students in the deep end (being unable to separate beginner and advanced topics creates a lot of confusion).&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;For example, I can tell them to read about SOLID principles or design patterns and then if they don't understand clearly I can help them.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;It seems like you are taking the &quot;throw them in the deep end&quot; approach, and plan to only teach them when they struggle in the deep end. That's not a judgment, just an observation. It's a valid teaching technique (as a student this is exactly what works best for me).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using that approach, it makes sense to rely more on existing articles than to manually rewrite them, as your immediate focus is on &lt;a href=&quot;https://en.wikipedia.org/wiki/Autodidacticism&quot; rel=&quot;nofollow noreferrer&quot;&gt;autodidactism&lt;/a&gt;, as this immediately teaches the student to find their own resources.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2019-11-18T12:17:14.033" LastActivityDate="2019-11-18T12:17:14.033" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6056" PostTypeId="2" ParentId="6054" CreationDate="2019-11-18T13:00:26.883" Score="2" Body="&lt;p&gt;The best approach to learning just about everything is twofold. You need to practice and you need feedback on your attempt. You learn by reinforcement, not by seeing something once. This is why coursework depends on student exercises, not just lectures and textbooks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, to learn a new thing, I suggest that you first get an overview idea of it, say from some internet readings or a book. Don't go too deep into it yet. Then, find a project that you can build using that technology and work on that. Go back to readings and such as necessary when you get stuck, but make the project and its completion a learning goal. Your readings may suggest a project, actually, but don't use too much of the explanation of the project, or especially its solution, to guide you. Build it yourself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that doesn't solve the &quot;feedback&quot; problem. This is always difficult for self learners. &quot;How do I know I've done the right thing?&quot; Perhaps you can find a more experienced person to give you feedback. A teacher or professor with wide experience is probably best. But you can also try to find or form a group of people with similar interests that you can meet with to share ideas. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the absence of other things, if you can find an actual text book on the topic, it will probably have exercises. Do as many of them as you can find time for, without reference to any answer key. Find a way to verify your answers (feedback), even if it is just a testing framework that verifies your intent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll also note that learning on your own is difficult for other reasons. Suppose you know A and want to learn B. Your approach to B will probably be heavily influenced by what you already know of A. But that may not be the best approach. Knowing the C language and trying to learn Scheme, for example, requires a clear break with what you already know and you need to take a new mental approach. Even moving from one language like Java to a &quot;similar&quot; one like Python, requires a fair amount of rethinking. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-18T13:00:26.883" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6063" PostTypeId="2" ParentId="3933" CreationDate="2019-11-25T14:57:24.340" Score="3" Body="&lt;p&gt;Failing to find an answer, I wrote this with Billy and Miles: &lt;a href=&quot;https://dlnext.acm.org/doi/abs/10.1145/3366016&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dlnext.acm.org/doi/abs/10.1145/3366016&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;From the abstract:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The change in the English computing curriculum and the shift towards computer science (CS) has been closely observed by other countries. Female participation remains a concern in most jurisdictions, but female attainment in CS is relatively unstudied. Using the English national pupil database, we analyzed all exam results (n = 5,370,064) for students taking secondary school exams in 2016, focusing on those students taking GCSE CS (n = 60,736), contrasting this against ICT (n = 67,359).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Combining gender with ethnicity and the IDACI poverty indicator, we find that females from the poorest areas were more likely to take CS than those from the richest areas and that CS was more popular among ethnic minority females than white females. ICT was far more equitable for females and poorer students than CS.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS females typically got better grades than their male peers. However, when controlling for average attainment in other subjects, males got 0.31 of a grade higher. Female relative underperformance in CS was most acute among large female cohorts and with girls studying in mixed-gender schools. Girls did significantly better than boys in English when controlling for CS scores, supporting theories around female relative strengths lying outside STEM subjects.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The move to introduce CS into the English curriculum and the removal of the ICT qualifications look to be having a negative impact on female participation and attainment in computing. Using the theory of self-efficacy, we argue that the shift towards CS might decrease the number of girls choosing further computing qualifications or pursuing computing as a career. Computing curriculum designers and teachers need to carefully consider the inclusive nature of their computing courses.&lt;/p&gt;&#xA;" OwnerUserId="48" LastActivityDate="2019-11-25T14:57:24.340" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6064" PostTypeId="1" CreationDate="2019-11-27T09:20:05.873" Score="1" ViewCount="122" Body="&lt;p&gt;I am a non-cs graduate and would love to be a &lt;em&gt;machine learning&lt;/em&gt; engineer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have learned to code, and know the basics of Machine learning. Now I would like to know what &quot;basics of CS&quot; I should learn to be completely job ready. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I sometimes have difficulties reading CS documentations, and don't know how programs and computers work in the background. I am also naiver on topics like &lt;em&gt;memory management&lt;/em&gt;, &lt;em&gt;operating systems&lt;/em&gt;, &lt;em&gt;networking&lt;/em&gt;, &lt;em&gt;electronics stuff&lt;/em&gt; like &lt;em&gt;microprocessor&lt;/em&gt;, &lt;em&gt;compiler design&lt;/em&gt; etc. Are these all necessary for my transition to AI? If they are, would you please recommend me a short learning path or books or videos. I hope I wouldn't need to go deep in these areas.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="6345" LastEditorUserId="204" LastEditDate="2019-11-28T21:28:09.397" LastActivityDate="2019-11-28T21:28:09.397" Title="What are the basics of CS that I should know, before I start my journey into machine learning" Tags="|self-learning|artificial-intelligence|machine-learning|documentation|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6065" PostTypeId="2" ParentId="6064" CreationDate="2019-11-27T11:07:16.153" Score="3" Body="&lt;p&gt;The first two paragraphs of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Machine_learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia article on Machine Learning&lt;/a&gt; will give you a good outline of the things you need to know. Algorithms and Data Structures are key from CS, but you also need quite a lot of things like Statistics, Mathematics, Pattern Recognition and such. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a pretty long road if you start out &lt;em&gt;only&lt;/em&gt; knowing how to program. It is also a field with a lot of current activity and a lot will change before you get very far along that road. It is good to have a goal, but if you start late in a &lt;em&gt;hot&lt;/em&gt; area you need to keep a flexible outlook so that you have options if that field &lt;em&gt;cools off&lt;/em&gt; while you study. But those same things needed for ML are also good for other things as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the courses you mention probably aren't especially necessary but your statement that you have trouble with documentation is a bit worrying. Perhaps that will change with practice. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are a young person starting out, don't commit too deeply to any one path. Learn the basics so that you can choose later when you know more, both about yourself and about the state of research at that time. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-11-27T11:07:16.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6067" PostTypeId="2" ParentId="6064" CreationDate="2019-11-27T14:00:04.397" Score="2" Body="&lt;p&gt;It's hard to know what you really know from just your assertion that you've &quot;learned to code and know the basics of Machine learning as well.&quot; Do you mean that you can write a script/notebook in Python/R using libraries like sklearn or tensorflow? Can you do a full ML pipeline - preprocess data, train a model, then test and evaluate it's performance (oh, and then actually deployed it in an app/website)? Have you written any of your own classes/algorithms from scratch, even as an exercise? Do you know the basics of &lt;em&gt;machine learning&lt;/em&gt; (including classics like SVMs and Decision Trees/Forests), or only more specifically &lt;em&gt;deep learning&lt;/em&gt; (just neural networks)? Have you written code to tackle a problem &lt;em&gt;without&lt;/em&gt; ML to see if it could be simpler and more effective? If the answer to any of these things is &quot;not yet,&quot; those are certainly gaps in your basic coding and ML expertise that you'd probably need to convince an employer that you'd be an asset. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of the specific topics that you mentioned are 98% of the time not too relevant to the daily work of machine learning practitioners, but understanding the basics of memory management and (as Buffy mentioned) the space/time efficiency of Algorithms and Data Structures will be pretty important once your ML projects get bigger: ML often uses a LOT of processing and memory resources, especially if you're not careful. I'd say definitely take a proper Algorithms and Data Structures course if you have not before (there are several good ones on Coursera). &lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2019-11-27T14:00:04.397" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6068" PostTypeId="2" ParentId="6047" CreationDate="2019-11-28T08:46:36.353" Score="1" Body="&lt;p&gt;The text book I use for teaching database indexing is &quot;Database Systems Concepts&quot; by Silberschatz, Korth and Sudarshan. The book is regularly updated to keep pace with the multiple advances happening in the data management domain. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The chapter on indexing in the book is good and has a few examples. You can get a feel for the examples from the slides made available by the authors at &lt;a href=&quot;https://www.db-book.com/db7/slides-dir/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.db-book.com/db7/slides-dir/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For B+tree indexing, you can find many visualisation tools online. I have used the below one on many occasions:&#xA;&lt;a href=&quot;https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8653" LastActivityDate="2019-11-28T08:46:36.353" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6069" PostTypeId="2" ParentId="5326" CreationDate="2019-11-28T08:51:05.537" Score="2" Body="&lt;p&gt;Database Systems Concepts by Silberschatz, Korth and Sudarshan comes with a comprehensive instructor/student resources web site provided by the authors. You can find slides, assignments and even a web based tool to practice SQL at &lt;a href=&quot;https://www.db-book.com/db7/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.db-book.com/db7/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are an instructor in a qualified educational institution, you can contact the book publisher. They provide additional resources for instructors like solutions to selected end of chapter exercises etc. &lt;/p&gt;&#xA;" OwnerUserId="8653" LastActivityDate="2019-11-28T08:51:05.537" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6070" PostTypeId="2" ParentId="5109" CreationDate="2019-11-28T08:55:50.237" Score="1" Body="&lt;p&gt;I worked as a data modeler at Siebel. One of the books that the Siebel data model is based upon is Data Model Patterns by David C. Hay. The book will not teach you how to build great data models. It is a collection of robust data models that are used in big systems used world wide. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The one book that I have used (in teaching) that focusses solely on data modelling is the text book &quot;Data Modelling and Database Design&quot; by Richard Scammel and Narayan S. Umanath. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of the above books are available on Amazon.com &lt;/p&gt;&#xA;" OwnerUserId="8653" LastActivityDate="2019-11-28T08:55:50.237" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6071" PostTypeId="2" ParentId="2828" CreationDate="2019-11-28T09:02:43.277" Score="1" Body="&lt;p&gt;Great question! I went through the same dilemma as you. After reading multiple perspectives on database normalization, I condensed my learning into the article at &lt;a href=&quot;https://bkmjournal.wordpress.com/2010/07/29/database-normalization-as-i-remember-it/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bkmjournal.wordpress.com/2010/07/29/database-normalization-as-i-remember-it/&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One suggestion I have for you is to make students &quot;measure&quot; the cost of a denormalized schema by executing update and delete statements on schemas that are not normalized. One example of how the cost can be measured is in measuring the number of SQL statements needed to execute one logical update (a full address repeated in every pending order of a customer). &lt;/p&gt;&#xA;" OwnerUserId="8653" LastActivityDate="2019-11-28T09:02:43.277" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6072" PostTypeId="2" ParentId="3962" CreationDate="2019-11-28T09:14:08.377" Score="1" Body="&lt;p&gt;You can look at the datasets used for TPC benchmarks. You can find the tools and instructions needed at &#xA;&lt;a href=&quot;http://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp&lt;/a&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The advantages of the TPC benchmarks are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The data is generated and loaded by scripts. The schema is also created by SQL scripts (like you have asked). &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The size of the database you want to create is configurable. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The benchmarks are used widely and hence knowledge of their structure and usage will come in handy. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;The main disadvantage of the dataset is that most of the data generated is random data and hence may not make much sense to human readers. &lt;/p&gt;&#xA;" OwnerUserId="8653" LastActivityDate="2019-11-28T09:14:08.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6073" PostTypeId="1" CreationDate="2019-11-28T13:23:07.637" Score="15" ViewCount="5105" Body="&lt;p&gt;Nowadays, kids as young as six years are being taught coding through various tools such as MIT's &lt;a href=&quot;https://en.wikipedia.org/wiki/Scratch_%28programming_language%29&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;. I wonder what is the point of teaching coding at such a tender age. They will go for a job after 10-15 years, so what is the rationale of teaching coding (and in some schools robotics as well) now?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there a scientific study that supports the claim of a benefit of teaching coding at a young age?&lt;/p&gt;&#xA;" OwnerUserId="8654" LastEditorUserId="1314" LastEditDate="2019-12-01T14:23:29.383" LastActivityDate="2019-12-01T14:23:29.383" Title="What is the point of teaching coding and robotics to kids as young as six years old?" Tags="|programming|" AnswerCount="8" CommentCount="17" ContentLicense="CC BY-SA 4.0" />
  <row Id="6074" PostTypeId="2" ParentId="6073" CreationDate="2019-11-28T13:40:34.897" Score="35" Body="&lt;p&gt;I think the intent of such courses is to teach &lt;a href=&quot;https://en.wikipedia.org/wiki/Computational_thinking&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Computational Thinking&lt;/em&gt;&lt;/a&gt;, not programming as such. Programming is, I think, just one tool among others. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There has been quite a lot of activity recently on computational thinking, which is a good thing. Any &quot;patterns of thought&quot; that can be distinguished and taught seems to me to be a good thing. We teach math and language skills for about the same reason to youngsters. For just about anyone, having several differnt &quot;ways of thinking&quot; gives you an advantage as you grow. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, coding implies the &quot;creation&quot; of things. When I was about 5 years old my schoolroom had a set of very large building blocks. We created structures with those and I always look back on that as a good thing to have done. For youngsters the act of creation is a really good thing to teach, no matter the medium (art, music, ..., programming). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But educators aren't trying to create coders as a profession at that age, any more than we are trying to create &quot;professional readers&quot;. It is just a tool to aid cognitive development (or should be). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do a web search on &quot;computational thinking&quot; to see some things about where this comes from. One of my doctoral students has focused her career on these ideas, actually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &lt;a href=&quot;https://www.csunplugged.org/en/&quot; rel=&quot;noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; for a closely related set of ideas. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Let me add a couple of points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, robotics, especially, can be fun. Creativity paired with fun is a winner. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, in as much as students &lt;em&gt;are&lt;/em&gt; able to create useful programs, those skills can be used (and expanded) later in their education. A bit of coding in a math or science course (at least) can add to the learning process of those subjects and, one hopes, help the student generate insights that will deepen their knowledge. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;However, I have very mixed feeling about things like &lt;a href=&quot;https://code.org/learn&quot; rel=&quot;noreferrer&quot;&gt;Code.org&lt;/a&gt;. These are being pushed by large companies with an agenda that is not, fundamentally, education centered. They seem a lot like marketing programs to me. I also worry, at least a bit, on the overemphasis of programming games. While games can be motivating, I think they give too narrow a focus. Commercial games also very likely have an overall negative effect on student learning and growth. There have been recent studies showing young students spending too much time looking at screens in more or less nonproductive ways. The time might be better spent building with blocks and kicking balls around. I'm a much bigger fan of things in CS Unplugged than I am of code.org. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-11-29T14:16:52.463" LastActivityDate="2019-11-29T14:16:52.463" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6075" PostTypeId="2" ParentId="6073" CreationDate="2019-11-29T02:10:07.580" Score="14" Body="&lt;p&gt;Why teach English or art at a young age? Because it's a mode of expression and communication. Because proficiency requires learning the tools, learning the idioms, experimenting and developing a voice and a style. Because that path of development takes years if not decades. Although many students won't choose to make coding a major part of their adult lives, the ones that do will benefit from having started that familiarization process earlier. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And the ones that don't will still have &lt;em&gt;something&lt;/em&gt; which hopefully leaves them with a better understanding of the world and the people around them. Computers are ubiquitous, &lt;em&gt;someone&lt;/em&gt; tells them all what to do, and I find it frankly horrifying that the average person may think of it as something completely out of their ken. Everyone should have the chance to program (even if not very well), paint (even if not very well), play an instrument (even if not very well), etc. just to bring those activities down to earth.&lt;/p&gt;&#xA;" OwnerUserId="1970" LastActivityDate="2019-11-29T02:10:07.580" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6076" PostTypeId="2" ParentId="5943" CreationDate="2019-11-29T03:19:07.397" Score="2" Body="&lt;p&gt;A crowd favorite of the Beauty and Joy of Computing (BJC) course from Dan Garcia and many other creative leaders:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each group of 4 students gets a deck of shuffled playing cards. Groups race the clock to deliver the deck in sorted order, ace to king within suits, suits alphabetically. BJC uses that activity first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had interesting results one year using that activity later in the semster, and modifying it: each group gets two distinguishable decks shuffled together, one of them missing a card. Race the clock to identify the card I retained from your group.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way, athe key is the post-race discussion. What algorithm did your group follow? What is the best algorithm? Does the answer to the previous question depend on how well the deck is shuffled? Does it depend on which card is missing? Nice tie ins available to complexity and worst case time efficiency.&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2019-11-29T03:19:07.397" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6077" PostTypeId="2" ParentId="6073" CreationDate="2019-11-29T09:50:21.390" Score="1" Body="&lt;p&gt;Here's my opinion based on some experiences:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I told you everyone is happy with their job, that would be a lie for sure. There are plenty of people that hate their jobs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the others mentioned, it teaches them a lot, just like any other subject in school. In addition to that, programming and computing are very new and young topics which have a huge development potential. As we have seen within the past 50-60 years, computers lead to great technological advances (unlike art for example). At this tender age kids are very well suited to absorb information and make use of it. In addition to that, there are many tools, like Lego Mindstorms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Lego Mindstorms is basically assembling Legos that also have a small computer that kids can &quot;code&quot; to have different behaviours while working with them, and in the process see how computers, programming and sensors work. All of that while they are playing with Legos. In my eyes this teaches them that work CAN be fun.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I was 27 years old the first time I touched &lt;a href=&quot;https://en.wikipedia.org/wiki/Lego_Mindstorms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lego Mindstorms&lt;/a&gt;. I was amazed. I loved it, even though I was very far from being a child. I was also able to see the potential value that it would add to the development of a kid's way of thinking. I think it is a wonderful &quot;educational toy&quot;. In my opinion any sort of development is positive, especially when it comes to something that is yet to be fully figured out.&lt;/p&gt;&#xA;" OwnerUserId="8658" LastEditorUserId="104" LastEditDate="2019-11-30T08:31:08.903" LastActivityDate="2019-11-30T08:31:08.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6078" PostTypeId="2" ParentId="6073" CreationDate="2019-11-29T11:47:18.213" Score="3" Body="&lt;p&gt;A lot of kids learn some sort of crafting, be it paper cutting, origami etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Without citing any sources, I'd say that it seems that teaching forms of creation building and creation are crucial for the development of the kid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Nowadays, there is a new way to build things: you get a general purpose &lt;em&gt;thing&lt;/em&gt; and you &lt;em&gt;program&lt;/em&gt; it into solving your specific task/problem rather than building the &lt;em&gt;thing&lt;/em&gt; you specifically need. It's a simple change of perspective, a different way of building and creating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any type of creation requires some skills, be they motor skills in crafting or painting, problem solving (e.g. how to mix colors to get a certain nuance), etc. Every activity involves different aspects of this and programming focuses on developing the analytical skills and problem solving skills. Which are very much transferable to many other activities.&lt;/p&gt;&#xA;" OwnerUserId="1380" LastActivityDate="2019-11-29T11:47:18.213" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6079" PostTypeId="2" ParentId="6073" CreationDate="2019-11-29T15:01:57.057" Score="6" Body="&lt;p&gt;&lt;em&gt;Is there any scientific study that supports the claim of any benefit of teaching coding at a young age?&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not specifically for coding, but there is substantial evidence that teaching different approaches to creative self-expression are beneficial.  This is why primary education also often includes music, acting, writing stories, and &quot;constructive&quot; arts such as sewing and woodwork.  Simple coding is as valid a form of creative self-expression as making a collage picture, playing &quot;Twinkle twinkle little star&quot; on the recorder, or sewing a bag for your sports kit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To see primary education solely in terms of &quot;will this lead to a career?&quot; is to entirely miss the point.  Such a reductive view of primary education should in the end lead to children solely used as &lt;a href=&quot;https://museum.wales/childrenoftherevolution/work/resources/childrens_jobs_mines/&quot; rel=&quot;noreferrer&quot;&gt;air-door boys&lt;/a&gt; or the like, in whatever local industry employs their parents.  This was precisely the argument originally used against educating the &quot;lower classes&quot;, because workers were not perceived to have a pressing need for literacy and numeracy.  The skills required for a worker were not academic, and could be learnt as the child became physically able to do the job.  Other factors were not considered important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As we all know (I hope!), primary education exists partly to teach some basic facts and techniques, but partly also to develop children as human beings with an active and creative interest in the world.  In a world where software now plays such a large role in day-to-day life, it's curious to think that we might need a scientific study to tell us that there is a benefit to giving children a basic introduction to it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you're focussing more specifically on the age (you mentioned 6 as a lower limit), then that does depend on the child.  Using a Sphero, my son could manage simple &quot;if-then&quot; conditions and program a simple series of actions in order when he was 7.  Like many skills, it's a case of presenting them in a way which is easy to understand, with a learning curve which allows one basic skill to be established before moving onto the next.  Sequential actions are generally easy for children to understand, and if they are ready for games like Ludo or Monopoly which have &quot;if this happens then do that&quot; kind of rules, they have the conceptual framework for basic coding already.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastEditorUserId="1864" LastEditDate="2019-11-29T18:28:05.720" LastActivityDate="2019-11-29T18:28:05.720" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6081" PostTypeId="2" ParentId="5970" CreationDate="2019-11-30T01:07:56.823" Score="2" Body="&lt;p&gt;The Sedgwick resource is excellent. Besides online chapter summaries and code examples, it has a corresponding Coursera class with videos and grades exercises.&lt;/p&gt;&#xA;" OwnerUserId="3767" LastActivityDate="2019-11-30T01:07:56.823" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6082" PostTypeId="2" ParentId="6073" CreationDate="2019-11-30T03:04:38.077" Score="1" Body="&lt;p&gt;I fell in love with programming when I was 6 years old and today I am a senior developer who still loves programming. I have had almost no formal training, and I have worked with a lot of formally trained developers who couldn't program their way out of a paper bag, possibly due to starting to learn programming as an adult.&lt;/p&gt;&#xA;&lt;p&gt;The fundamentals of programming logic don't change although individual languages change very quickly and there will be many new programming languages invented by the time a 6 year old graduates. I can read code written before I was born, and as long as I understand the language, I can follow the logic. The world is getting more technically literate, so without a little familiarity with logic, computers and smartphones are just magic devices that often work, and bizarrely misbehave.&lt;/p&gt;&#xA;&lt;p&gt;This is not to say that all children should be expected to grow up to be programmers, nor would that be a good idea! It's the same as everyone having enough first-aid knowledge to not need to make a doctor's appointment for a scratch, and more importantly, to be able to decide when they can fix a problem themselves, and when to seek outside help.&lt;/p&gt;&#xA;&lt;p&gt;Sticking with the doctor analogy, you want medical students to have a basic understanding before they enter university. Student programmers should have some exposure to programming before they start to see if they like it or not. I feel some people think programming is glamourous and an easy path to a high paying job, which it isn't!&lt;/p&gt;&#xA;&lt;p&gt;Personally, if I'd had no exposure to programming until I was 18 and entered university, I doubt I'd be a professional programmer today. I found that tertiary courses are taught at the wrong level, often getting bogged down in irrelevant details that are not useful when actually programming. Not many people would think of teaching such complex details to 6 year olds. They only need to know enough to get their code working, and why it works when it does, and why it doesn't when they've introduced a mistake.&lt;/p&gt;&#xA;&lt;p&gt;I should also point out that teaching young children how to code is not a new concept, although it's been embraced much more than ever before. The &lt;a href=&quot;https://en.wikipedia.org/wiki/Logo_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logo&lt;/a&gt; &amp;quot;&lt;a href=&quot;http://cyberneticzoo.com/cyberneticanimals/1969-the-logo-turtle-seymour-papert-marvin-minsky-et-al-american/&quot; rel=&quot;nofollow noreferrer&quot;&gt;turtle&lt;/a&gt;&amp;quot; was invented to make programming appealing to children. Here's an image from 1969:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/sP4mO.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/sP4mO.jpg&quot; alt=&quot;Logo turtle 1969&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Children have to be taught something in school, with most countries having combined primary and secondary education of around 12 years. There are two basic reasons I can think of for teaching a subject:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;that subject will be useful in later life&lt;/li&gt;&#xA;&lt;li&gt;that subject will broaden their minds and make them more rounded people.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We teach them English (in English speaking countries and many non-English speaking countries) because in 12 years, a good knowledge of English will more likely be helpful, not useless. We teach them maths because maths is useful. We teach arts, history, and geography because they broaden the mind. We teach them computer science because CS broadens the mind, and it is becoming increasingly useful.&lt;/p&gt;&#xA;&lt;p&gt;Mind broadening subjects are only useful if the individual works in that area, or if that area is peripheral to their work. A doctor need to know a little geography because certain infections are concentrated in certain areas, and they need to know a little history because certain diseases have been wiped out, so shouldn't be diagnosed. How plate tectonics works, or what happened during the battle of 1066 are unlikely to help a doctor treat disease.&lt;/p&gt;&#xA;&lt;p&gt;For an average person, a little knowledge of logic can help them demystify a computer's behaviour. For example, searching for &amp;quot;cats and dogs&amp;quot; or &amp;quot;cats or dogs&amp;quot;. In English &amp;quot;and&amp;quot; and &amp;quot;or&amp;quot; can sometimes be used interchangeably:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Pet owners with cats or dogs need to be careful of mosquitoes that can infect their pets with heartworm.&lt;/p&gt;&#xA;&lt;p&gt;Pet owners with cats and dogs need to be careful of mosquitoes that can infect their pets with heartworm.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The above two sentences mean the same thing in English, but the below two pseudo code fragments mean different things in CS:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;TELL be-careful-of-mosquitoes TO pet-owner-has-cat OR pet-owner-has-dog&lt;/p&gt;&#xA;&lt;p&gt;TELL be-careful-of-mosquitoes TO pet-owner-has-cat AND pet-owner-has-dog&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The first one means what you'd expect in English. The second one means that only pet owners who have both a cat and a dog need to be careful of mosquitoes.&#xA;This is unintuitive to most people not familiar with computing logic.&lt;/p&gt;&#xA;&lt;p&gt;So teaching CS to 6 year olds helps prepare them for a world increasingly dependent on technology. I don't see a need to have a scientific paper to answer this question any more than &amp;quot;Are there any scientific studies that support the claim of any benefit of teaching English at a young age?&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="1279" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-11-30T03:04:38.077" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6083" PostTypeId="2" ParentId="6073" CreationDate="2019-11-30T03:34:15.537" Score="2" Body="&lt;p&gt;Well, I'm gonna to talk about my sister's experience...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When my sister was seven years old I taught her how to program using Scratch.  When she was nine, I taught her how to use &lt;a href=&quot;https://appinventor.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;AppInventor&lt;/a&gt;.  Now she doesn't program any more, but she understands the basic concepts about computer science.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She's able to use some advanced resources, like &lt;code&gt;bash&lt;/code&gt;, and she's able to understand  most of the articles about the internet of things and news about technology.  With this she's also able to talk with our parents about our network problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think this knowledge is important to children because it is the future, and when I was her age I would have liked to learn these things.  If I had learned computer science by her age I would probably be exponentially smarter now.  But I want my sister to learn this now because I want a better future for her.  &lt;/p&gt;&#xA;" OwnerUserId="8666" LastEditorUserId="104" LastEditDate="2019-11-30T08:36:56.377" LastActivityDate="2019-11-30T08:36:56.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6084" PostTypeId="2" ParentId="6073" CreationDate="2019-12-01T09:23:35.917" Score="3" Body="&lt;p&gt;After I learned programming, all other topics suddenly became much easier. Math especially, but also literature, philosophy, psychology, chemistry and so on.&#xA;Not only does programming helps unlock a sort of &quot;meta-thinking&quot; even when you're &lt;em&gt;away&lt;/em&gt; from the computer, it also helps you build practical tools. I remember writing small toy programs to help me understand math and geometry concepts I was struggling with, such as perspective and polynomials.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A lot of people see math as a prerequisite to programming. But I think it's the other way around. They help each other, in a braid. A well-applied concept from discrete mathematics can save you hours of CPU cycles, but, experience with a programming language interpreter can make you quickly understand concepts in math or other fields.&lt;/p&gt;&#xA;" OwnerUserId="8674" LastActivityDate="2019-12-01T09:23:35.917" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6085" PostTypeId="1" CreationDate="2019-12-01T16:35:26.160" Score="0" ViewCount="4526" Body="&lt;p&gt;Do you know of any website or other source with partial/complete solutions to problems from Algorithms book of Jeff Erickson?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2019-12-01T17:38:17.850" Title="Solutions to problems from Algorithms Jeff Erickson" Tags="|algorithms|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6086" PostTypeId="2" ParentId="6085" CreationDate="2019-12-01T17:38:17.850" Score="1" Body="&lt;p&gt;Sometimes a publisher will provide an answer key, but only to people it is pretty sure are educators. You might write to either an author or the publisher to see what is available. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But that book was published by the author, so contact him for information. I suspect there is a web site. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-12-01T17:38:17.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6087" PostTypeId="2" ParentId="6016" CreationDate="2019-12-04T17:42:31.833" Score="3" Body="&lt;p&gt;My larger assignments are often tiered. There is a minimal expectation of the work to be done and for this a student can earn about 85% of the total score--right in the middle of the &quot;B&quot; range. I provide a menu of extras they can add to earn the remaining points--and even exceed 100%. Often the students and I will collaborate to come up with the menu of extras.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, a recent assignment involved asking the user for a ZIP/Postal code, fetching the current weather conditions from an online weather service, and then displaying the temperature, city name, and wind speed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Extras included:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Toggle units between metric and imperial. Kelvin, too, if they wish. Must use methods to do the conversion.&lt;/li&gt;&#xA;&lt;li&gt;Display wind speed in smoots per day. Again, use a method to do the conversion.&lt;/li&gt;&#xA;&lt;li&gt;Display an icon showing the current conditions. Learn how to map conditions onto an icon filename.&lt;/li&gt;&#xA;&lt;li&gt;Display the forecast for the next few days. Use an array to hold the data.&lt;/li&gt;&#xA;&lt;li&gt;Change the fonts, background color, button appearance.&lt;/li&gt;&#xA;&lt;li&gt;etc..&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;All the extras have to be documented so I (the grader) know what features to look for.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I haven't had any pushback from the students. Sometimes life gets in the way and they only have time to complete the minimal assignment. But everyone has an opportunity to earn the extra points because many of the extras are really easy to implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Providing students some extras to implement gives them more creative control over their projects. I can't begin to count the number of times other students got excited over seeing what others did. &quot;How did you get the background color to change based on the temperature?&quot; &quot;How did you get it to look up your location automatically?&quot; It gets them talking to each other and, inevitably, learning takes place.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Tiering assignments puts the score they receive squarely on their shoulders. I think this is where some students get upset; they don't want to be responsible for their own grade. Be up-front with them: tell them they get to decide what their grade will be. Tell them this gives them an opportunity to complete the assignment even if they can't do all of it. Tell them an &quot;A&quot; on an assignment is reserved for students who go above and beyond the minimal requirements. Then make it relatively easy to go &quot;above and beyond.&quot;&lt;/p&gt;&#xA;" OwnerUserId="6704" LastActivityDate="2019-12-04T17:42:31.833" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6088" PostTypeId="1" CreationDate="2019-12-05T17:42:21.717" Score="6" ViewCount="124" Body="&lt;p&gt;I was teach on mathematics that on real line small numbers are on left and big numbers are on right. Therefore, I think the comparison 0&amp;lt;1 is more natural than 1&gt;0, and in general, x less than y is easier to read than y greater than x. Is there any statistics if there are less bugs on programs that uses only less than comparisons than programs uses greater than comparisons or both?&lt;/p&gt;&#xA;" OwnerUserId="8690" LastActivityDate="2019-12-09T09:17:03.677" Title="Is less than comparison more natural than greater than comparison?" Tags="|best-practice|" AnswerCount="3" CommentCount="2" ClosedDate="2019-12-18T02:58:32.333" ContentLicense="CC BY-SA 4.0" />
  <row Id="6089" PostTypeId="1" CreationDate="2019-12-06T16:56:20.067" Score="1" ViewCount="55" Body="&lt;p&gt;Do you know any textbook with problems+solutions to support teaching of linear programming and reductions? In particular for: standard and slack forms, formulation of problems as linear programs, simplex method and algorithm, duality, etc.&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="8651" LastEditDate="2019-12-17T02:59:49.467" LastActivityDate="2019-12-17T02:59:49.467" Title="How to teach linear programming and reductions?" Tags="|programming|algorithms|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6090" PostTypeId="2" ParentId="6088" CreationDate="2019-12-07T01:20:32.263" Score="3" Body="&lt;p&gt;First, I doubt that there are any such statistics because the effect would seem to be so small as to be overwhelmed by other, more common, things. You could, perhaps, create an instrument (as in a compiler) to look for such things and look for effects in, say, unit tests of the code. But that implies that a lot of things come together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I would also suggest that your basic understanding of human psychology may be naive. It could well be that there are people who actually think more effectively in &quot;greater than&quot; mode. As a mathematician, I've often been confused by left-right and by east-west, especially when they all show up in the same context. But it is, I'm pretty sure, because, I look at things with a &quot;frameless&quot; view. What is left and what is right depends on where I think of myself as viewing from. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, some times it is just more &quot;natural&quot; to express things with greater than, as in &quot;error &gt; 0.05&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I think a teaching &quot;rubric&quot; that punished students for using one form over the other would be misplaced. It would, in some situations, lead the user to perform an extra step in their thinking, and that, alone, could lead to an error. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2019-12-07T01:20:32.263" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6091" PostTypeId="2" ParentId="6088" CreationDate="2019-12-07T02:15:03.890" Score="3" Body="&lt;p&gt;Similar to Buffy, I suspect that which use is more natural depends on the framing of the problem.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (countdown &amp;gt; 0)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;makes perfect sense.  By contrast,&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;while (0 &amp;lt; countdown)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;feels less intuitive, if only because there is a bias towards leaving the variable on the left side of an expression.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think that the key (and this is what I would communicate to my students) is to make whatever choices you make carefully reflect the mental model of the problem.  This should create the clearest code, and produce the fewest errors.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-12-07T02:15:03.890" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6092" PostTypeId="1" AcceptedAnswerId="6093" CreationDate="2019-12-07T09:43:23.077" Score="2" ViewCount="197" Body="&lt;p&gt;I've asked this myself sometimes already. A lot of knowledgeable developers are using Stackoverflow to give advice and help solving other peoples problems - for free. Giving back your own knowledge and helping students, newcomers or just less experienced developers can be a really good thing. It's a great feeling to know that you've helped someone. I wonder if people would also be up for voluntary (donations at maximum) mentoring other people - face to face via video chat (assuming the person mentored is actually intending to learn and not just trying get help on a project for free from an expert).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know there are sites like codementor, but they are all based on a fixed hourly rate - you can basically only hire a mentor/expert.&lt;/p&gt;&#xA;" OwnerUserId="8691" LastActivityDate="2020-11-20T01:33:11.840" Title="Would you mentor other people for free/voluntary donations?" Tags="|adult-education|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6093" PostTypeId="2" ParentId="6092" CreationDate="2019-12-07T13:36:48.613" Score="3" Body="&lt;p&gt;I is hard to give a sufficiently nuanced answer to this question. There are many factors. I will try to give my own perspective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, I give away a lot for free in this forum and in others, both within the SE framework and to the &lt;a href=&quot;https://sigcse.org/sigcse/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SIGCSE&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/AP_Computer_Science&quot; rel=&quot;nofollow noreferrer&quot;&gt;APCS&lt;/a&gt; communities. So, my basic instinct is to be generous with my skills and experience. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, not everyone is as economically advantaged as everyone else. Some people would like an education but various factors, both economic and political, make that very difficult. In the US, the tax system used for support of schools is incredibly unfair to many people. If you live in a rich area, you have good schools. If you live in a poor area your schools will find a very difficult time providing you the education you deserve. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third, an educated populace is a good thing. The education available to an individual shouldn't depend on where they live (locally or otherwise), or their particular economic circumstances. To insist that everyone must pay their own way for an education leads to a sub-optimally educated general population, which is a poor path to progress for a nation or the world. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, fourth, if something is given to you, you may not appreciate it sufficiently, or work to optimize the potential of the gift. I've retired from academia (several years ago), but still teach Tai Chi. It has always been the practice of Tai Chi masters that students must pay something to obtain instruction. Even if it is just a few eggs or a kilo of grain. And the purpose of payment isn't for the support of the masters, but so that the students will be more likely to apply themselves and take advantage of the instruction. It is, in many ways, a mutual gift system. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a common flaw in free online courses, that students tend to drop out at too-high rates. If they commit nothing, they probably don't feel obligated to commit to the work required to learn. People paying for higher education, often work hard because they are already &quot;investing&quot; a lot of money and want a good return and will therefore &quot;invest&quot; a lot of effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you want to know whether I would, personally, teach for nothing, you'd have to tell me who the students are and what it is that they are willing to &quot;invest&quot; of themselves. If you can find a way to somehow assure that they will do the work necessary so that my efforts aren't just wasted, then I'm willing to listen. But, yes, I'm willing to contribute, provided that I think I can make a difference, somehow. But that is easier in small face-to-face groups than in broadcasting to the web. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, providing the conditions for true learning online are very difficult. If you read other things I've written here and on academia.se you will understand that I have definite ideas about learning and what it takes (primarily reinforcement and feedback) and both of those are hard to arrange &lt;em&gt;faithfully&lt;/em&gt; on the web. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="2516" LastEditDate="2020-01-19T12:03:53.873" LastActivityDate="2020-01-19T12:03:53.873" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6094" PostTypeId="1" CreationDate="2019-12-09T03:09:35.040" Score="8" ViewCount="905" Body="&lt;p&gt;What is the most traditional or meaningful order for learning formal languages, automata, compilers and parsing, if there's one at all? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Would students benefit from a parallel course in formal languages/automata, so as to highlight the connections?&lt;/p&gt;&#xA;" OwnerUserId="4350" LastEditorUserId="104" LastEditDate="2019-12-09T04:11:06.103" LastActivityDate="2019-12-09T09:02:52.733" Title="Order of learning formal languages, automata, compilers and parsing" Tags="|curriculum-design|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6095" PostTypeId="2" ParentId="6094" CreationDate="2019-12-09T04:29:27.783" Score="11" Body="&lt;p&gt;I'm happy to stand corrected if someone else comes in with a more experienced answer, but automata and formal languages are typically taught together as two aspects of computational theory, since different sorts of automata represent different sorts of languages.  Among other reasons, it's hard to have a discussion about the computing power of modified automata without having the languages to refer to.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for compilers and parsers, if the goal of a compilers course is to show a student how written code can be translated into machine code, how could you approach one without the other?  &quot;This compiler takes a... tree... and turns it into machine code.&quot; The topics are significantly enough interrelated that I would have trouble imagining a sequence where they don't get mixed in together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I believe (though I have not done a thorough search of course sequences to back this up) that compilers is typically taught sometime after computational theory, since it helps to be at least nominally familiar with the notion of a grammar before you begin.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-12-09T04:29:27.783" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6096" PostTypeId="2" ParentId="6094" CreationDate="2019-12-09T09:02:52.733" Score="3" Body="&lt;p&gt;From my experience: compilers is basically the crown jewel subject where all the others come together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First year you start out with regular languages and finite state automata, and you see how that relates to your basic programming class. In two other classes, you see how propositional logic relates to basic circuit design.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second year, you get into context-free grammars and in a class that only somewhat feels related to it, concepts of programming languages. Meanwhile you get computer architecture making a bridge from hardware to assembly language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third year, compiler construction brings them all together.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2019-12-09T09:02:52.733" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6097" PostTypeId="2" ParentId="6088" CreationDate="2019-12-09T09:17:03.677" Score="5" Body="&lt;p&gt;I think the typical order has more to do with grammatical conventions actually.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Joe is heavier than Bob&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Joe is the subject, the one we're talking about; Bob is just an object we compare against.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Joe weighs more than 90kg&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;vs.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;90kg is less than Joe weighs&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The second one is a very odd sentence.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;[subject] [verb] [object]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;[variable] [operator] [constant]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This would be a pretty normal construction, such as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x &amp;lt; 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;or&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x &amp;gt; 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;but odd would be:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;0 &amp;lt; x&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Because the value of 0 isn't changing. Zero is not the &quot;subject&quot; of what we're doing. &lt;code&gt;x&lt;/code&gt; is the subject, the variable, the interesting thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So what if we're comparing two variables?&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;x &amp;lt; y&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;It's possible both of these are new values to us, but intuitively, this code feels like it's more about &lt;code&gt;x&lt;/code&gt; than about &lt;code&gt;y&lt;/code&gt;. Consider:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;if x &amp;lt; y: do something&#xA;if x &amp;gt; z: do something&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Now, clearly, &lt;code&gt;x&lt;/code&gt; is our main subject, running against various other variables to see if something needs to be done.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;So, my impression is that any preference for &lt;code&gt;&amp;lt;&lt;/code&gt; over &lt;code&gt;&amp;gt;&lt;/code&gt; or otherwise pales in comparison for the preference to put the &quot;subject&quot; of the comparison on the left.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2019-12-09T09:17:03.677" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6099" PostTypeId="1" CreationDate="2019-12-13T15:10:07.573" Score="4" ViewCount="192" Body="&lt;p&gt;I'm going to do a course for my entire University, this means students that are in the last year and also in the first year. What can I do so what I teach isn't too hard to understand for the first year students and also isn't too basic for the last year students?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I'm teaching is a complete web app stack&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;git =&amp;gt; html/css/javascript =&amp;gt; react&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For some students (last year) html is basic and easy, but in the first year, many haven't learn it yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there some strategy or things I can do to make it more balanced for all students?&lt;/p&gt;&#xA;" OwnerUserId="8707" LastEditorUserId="27" LastEditDate="2021-01-26T22:42:37.773" LastActivityDate="2021-01-26T22:42:37.773" Title="How do you teach when your students have wildly different backgrounds?" Tags="|lesson-ideas|best-practice|web-development|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6100" PostTypeId="2" ParentId="6099" CreationDate="2019-12-13T15:56:17.433" Score="2" Body="&lt;p&gt;I don't know what options are open to you, so I'll hope you have a free hand. I certainly did as I got farther along in my career, but a newcomer might think this is risky. In fact it is well proven:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd suggest that you base much of the grading on the work of groups rather than individuals and I would &lt;a href=&quot;https://en.wikipedia.org/wiki/Flipped_classroom&quot; rel=&quot;nofollow noreferrer&quot;&gt;flip the classroom&lt;/a&gt;. This gives you the advantage of observing the groups in almost all of their activities. The &quot;material&quot; and &quot;content&quot; of the course is obtained through readings and video, not through lectures. What happens when the students are face to face is that they work in groups to produce something, perhaps ultimately a web site in such a course as you have. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But this might not work if you scale is huge. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you should also create the teams yourself and assure a variety of levels and types of experience in each team. A simple questionnaire for each student on the first day can help you decide how to divide up the teams. The teams should be small, to enable simple communication, but probably at least four per team. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In such a course you also need to have the students do &quot;peer evaluations&quot;, perhaps periodically. If you manage this well you can also achieve a fairly high degree of the better, more experienced students aiding the others. But to do peer evaluations successfully, it has to feel safe. It should be entirely positive based. In a group of five, I would ask students &quot;Who were the two most helpful members of your group? Why? What was their contribution?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can modify the above to suit your course, and you can also tell the students that being seen by team mates as helpful will give a grading bonus. Don't ask students to evaluate everyone, but just to give positive comments when appropriate. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you also need to employ &quot;self evaluation&quot; in any such scheme. &quot;What was your own chief contribution to the team's work?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The goal is to get a spirit of cooperation going, rather than competition. This means, of course, that you need to make it possible for everyone to get full marks. Therefore &quot;grading on the curve&quot; will ruin it, since it is a fundamentally competitive zero-sum situation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In team based work, I also required teams to present their work to the class at the end of the course. I also required each teammate to participate in some way in the presentation. This was a bit hard on introverts, but it was a skill that they need to develop in any case if they are to have a career. Even if the career is outside CS. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that &lt;a href=&quot;https://en.wikipedia.org/wiki/Peer_assessment&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peer Assessment&lt;/a&gt; is a wider topic than what I suggest here. I don't necessarily suggest all of that, but do suggest that peers focus on positive aspects only. This makes it &quot;safer&quot; and, I think, more honest. I once had to upgrade a student who I thought was slacking based on the fact that his teammates (who I knew were working hard) praised his contributions. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-12-13T16:08:29.760" LastActivityDate="2019-12-13T16:08:29.760" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6101" PostTypeId="2" ParentId="6099" CreationDate="2019-12-13T21:35:43.473" Score="1" Body="&lt;p&gt;Another option, in addition to Buffy's, is to create tiered assignments.  Then students can either opt in to the level that they choose, or you can specify fully (&quot;freshman must take option 1), or you can set certain parameters (&quot;seniors must choose at least level 3 of this assignment for full credit.&quot;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Grading should not be substantially more difficult as long as the tiers are closely related.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, as a word of warning: although it might feel intuitive to do so, do not fall into the trap of not offering full credit for lower tiers.  What you will wind up with is students who are genuinely beginners attempting inappropriately hard work in order to try to obtain full credit, and possibly messing up to a considerable degree.  Make your lowest tier according to what you feel like the lowest students should be doing, and then give them full credit for full work.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2019-12-13T21:35:43.473" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6102" PostTypeId="2" ParentId="6099" CreationDate="2019-12-14T12:06:09.233" Score="2" Body="&lt;p&gt;In other cases I would just simply advise against offering a course open to people with widely varied skill levels, because it forces you to basically scale it down to the lowest acceptable level. Normally, you would like to say &quot;sign up for the course on Y only if you already know how to do X&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in this case, knowledge of HTML(+++) is something that is just very unevenly distributed among students. It's fairly common for students to have picked it up on the side, or even before they went to university in the first place, but also entirely possible that they didn't, because academically it's not seen as all that &quot;deep&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I would say, make a modular course (Git, basic HTML, basic CSS, basic JS, some more advanced Git/HTML/CSS/JS, and finally getting to the main meal, React). For each module, you prepare content to teach it to people who haven't mastered that yet. But everyone can try to &quot;test out&quot; of a module at the start: if they can pass a small exam showing they already know that skill.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If everyone passes, apparently you don't have to spend much time on that module, leaving you more time for advanced topics at the end of the course.&lt;/li&gt;&#xA;&lt;li&gt;If almost everyone passes, then you can focus on some remedial teaching for the few who didn't and get them up to speed with the rest. Since they're going to have to do this outside main hours, this works best if it's only a small group in absolute terms.&lt;/li&gt;&#xA;&lt;li&gt;If it's half-half, or only a few people passes the test, then you can allow the people passed to skip this module of the course, but perhaps do an alternative enrichment exercise.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Emphasize that it's completely non-judgmental; passing a test-out test or not has no impact on final grade. If you pass, you get an enrichment activity that's worth a modest amount of points. If you don't pass, you get the core training to help you pick up this necessary skill, which is worth the same modest amount of points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The meat of the points for the course will be located in the last modules. After all, that's what the course is all about. The earlier modules are just to ensure everyone has the groundwork to be able to handle it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To contrast my answer with that of Buffy and Ben I; mine would aim to reduce the difference in level between the best and worst, because you're focusing on a specific finishing point you want to reach. Theirs are more about making sure everyone learns as much as possible during the course, in the same general topic area.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2019-12-14T12:06:09.233" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6104" PostTypeId="1" CreationDate="2019-12-19T17:21:18.117" Score="16" ViewCount="3360" Body="&lt;p&gt;I am teaching middle school kids (aged 11-13) some basic JavaScript and want to get some &quot;professional&quot; opinions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am introducing JavaScript with a simple function with a variable, a prompt, if/else, and a couple of alerts. This function (14 lines total) then repeats a series of times (say 10 times) changing the prompt and the conditional in the if/else for a total of say 140 lines. Otherwise the function remains the same. In the lesson, we will be using trinket.io to run the code in browser, and I am able to give them a partially complete piece of code to work from.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I know best programming is to not repeat when you can use additional variables and arguments passed through functions. I am doing that programming with a more advanced class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;My question is this:&lt;/strong&gt; If just introducing JavaScript and wanting to teach syntax of these basic features, is it better to have students do the repeating (that works but is not programmatically the best way to program) or is it better to teach them the &quot;correct&quot; way where the program is simplified but includes more code understanding than we are ready to introduce?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here is the code (I repeated it once to show the differences).&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;function askQuestion1()&#xA;{&#xA;  var answer = prompt (&quot;What body system contains the heart, blood, arteries, and veins?&quot;) .toLowerCase();&#xA;   if (answer===&quot;circulatory&quot;) {&#xA;    alert (&quot;Correct!&quot;);&#xA;     score += 100;&#xA;     alert (&quot;Your total score is now &quot; +score);&#xA;  }&#xA;  else {&#xA;    alert (&quot;Sorry, incorrect.&quot;);&#xA;     score -= 100;&#xA;     alert (&quot;Your total score is now &quot; +score);&#xA;  }&#xA;}&#xA;function askQuestion2()&#xA;{&#xA;  var answer = prompt (&quot;What body system contains the brain, spinal cord, and nerves?&quot;) .toLowerCase();&#xA; if (answer===&quot;nervous&quot;) {&#xA;   alert (&quot;Correct!&quot;);&#xA;    score += 200;&#xA;    alert (&quot;Your total score is now &quot; +score);&#xA;  }&#xA;  else {&#xA;    alert (&quot;Sorry, incorrect.&quot;);&#xA;    score -= 200;&#xA;    alert (&quot;Your total score is now &quot; +score);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8720" OwnerDisplayName="Bill Pratt" LastEditorUserId="58" LastEditDate="2019-12-21T21:24:04.163" LastActivityDate="2019-12-21T21:24:04.163" Title="What is the best way to teach JavaScript functions to middle schoolers?" Tags="|introductory-lesson|javascript|lesson-review|" AnswerCount="5" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6105" PostTypeId="2" ParentId="6104" CreationDate="2019-12-19T18:54:01.710" Score="5" Body="&lt;p&gt;Middle school is a great place to start teaching kids programming, and especially JavaScript. I have guest taught something similar for third graders, and it went so much better than I had expected.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code structure is not important for introductions. Engagement is the most important aspect for kids, and building a game is a great way to do that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the beginner level, having them just take something, and place it in is gold. I tend to prefer having students transcribe at that level, where they are given a printout and then are walked through adding the code themselves (maybe this is what you had planned, or similar).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't really see the need for repetition at all here though, because it doesn't really benefit them much as written. What I would suggest would be to allow them to come up with their own question2, their own accepted answer, and their own score bonus. This will allow them to not only better understand which inputs correlate with which outputs or behaviors, but will also introduce a good amount of fun to the activity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Introducing fun, especially at the end of an activity once the main goal was accomplished, is a great way to build engagement. Never underestimate the value of joy :)&lt;/p&gt;&#xA;" OwnerUserId="2461" LastActivityDate="2019-12-19T18:54:01.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6106" PostTypeId="2" ParentId="6104" CreationDate="2019-12-20T01:31:53.463" Score="29" Body="&lt;p&gt;I apologize in advance, but I'm going to be a bit hard on you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, your goal of keeping it simple is a good one that I applaud. You are right, IMO, not to bring in advanced features too early. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this is not the sort of code I would show to a beginner. Ever. It is the kind of code that, if submitted by an early teen would be fine, but not the sort of code that a teacher should show, lest it be emulated. If this were submitted by a college first year student, as part of some project, it would be severely downgraded. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think students should only ever be shown code, from instructors, that they would be proud to emulate. But I think the lessons taught in this code need to be unlearned before the student can gain a proper understanding of how to program. I would use some completely different example, even if I was only interested in syntax, which I don't think you should be. You can also teach deeper lessons, just by example, by choosing what code you present to students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me list a bunch of criticisms of the code, that are easily corrected, but using a different framework possibly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, the function names aren't descriptive in any way of what the function does. Also, they aren't functions in the classic sense since they return nothing, but that is just an issue with how javascript is built. They are procedures (actually &lt;em&gt;commands&lt;/em&gt; since they don't have arguments either). But &quot;intention revealing names&quot; are a really good idea so everyone should use them, and novices should see them. So, &lt;em&gt;askCirculatoryQuestion&lt;/em&gt; is preferable to askQuestion1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, the formatting is a bit sloppy. A minor issue, but, if you are only a bit sloppy it won't be easy to teach them not to be. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, your var should probably be a const. There is no intention to change it. (Note: I'm not a javascript wizard, so I hope this is possible in this context.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you use an identity comparison, so, in the first function neither &quot;the circulatory&quot; nor &quot;circulatory system&quot; would be accepted. This is a human factors issue and may be the main objection to the example overall. An example without such an issue could probably be easily devised. But code that frustrates uses is not what you should show beginning students. But parsing user input is a genuinely difficult problem, of course. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Next, you make assignment here to a global variable, which is a tool that shouldn't be in the beginner's toolbox. It is an advanced incantation suitable only for trained wizards. Such practice makes larger programs much harder to understand and debug. Even wizards use this &quot;spell&quot; sparingly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, blasting alerts from a function is likely to mislead them when you try to teach real functions (that return values). Too many students have a very hard time with the notion of &quot;return&quot;, and think that blasting out the answer is the correct way to write a function. You are laying a trap here that can cause issues later. (Confession: I once had that misconception. It made it difficult to understand program flow.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Overall, my suggestion is to show students only the sort of code you'd like to see from them, not just now, but in the future. Yes, keep it simple and yes, keep it motivating, but make it poetry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The code you will get from them is probably going to be worse than the code you give to them. So, always show them something they can emulate and that any teacher would be proud to see from a student. Make it easy for them to build good habits from the start. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But note that your concerns are not the same as mine. I agree that it is too early at the start to stress things like the &quot;say it once&quot; principle and such. And an exercise in which you have them write the analog of your second function after giving them the first wouldn't be a bad idea. It reinforces some skills, which is a good thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, sorry to be so hard on you. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But lest I be entirely negative, let me also give an idea for something similar that works on more levels than syntax. I'll stick with functions and if-else as the primary lesson. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Show the students a function &lt;em&gt;maxOfTwo&lt;/em&gt;, that returns the maximum of two arguments. The function doesn't &quot;alert&quot; but, instead returns the value. Then write a driver to test it and have the students execute that a few times. Note that the function needs no local values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;After that, work out with the students a &lt;em&gt;maxOfThree&lt;/em&gt;, that has three arguments. Do this one two ways. First with nested if statements and again by employing maxOfTwo instead. Don't give this as an assignment, but work out the logic with them and then write the (poetic) code. You may want to introduce a local value, so it is a bit more sophisticated on two levels (locals and nesting). But using &lt;em&gt;maxOfTwo&lt;/em&gt; twice is a truly beautiful solution that shows the power of abstraction and reduces complexity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then, you can assign &lt;em&gt;medianOfThree&lt;/em&gt; to them to work on. I suggest that it might be worthwhile to have them work out the logic of it in small groups and then come up with the code. They can either write out the code individually (probably a good thing) or in their group. Then critique the code as I have done here. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;And don't lose track of the point that writing functions is more about &lt;em&gt;abstraction&lt;/em&gt; than anything else. It makes programs easier to understand. The only code hidden by the &lt;em&gt;maxOfTwo&lt;/em&gt; function is a single if-else statement. But calling the function (assuming it has a good name) makes the intent of the program immediately clear at that point, where the expanded if statement does not. This, I think, is much more important than the ability to call the function from more than one place and know that the effect is the same. Note that obfuscated code still runs correctly, but it is the understanding that separates the programmer from the machine. So, always use &lt;em&gt;intention revealing names&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2019-12-21T15:17:46.853" LastActivityDate="2019-12-21T15:17:46.853" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6107" PostTypeId="2" ParentId="6104" CreationDate="2019-12-20T12:07:32.453" Score="2" Body="&lt;p&gt;I think if you're teaching anyone something like programming, you should show them the elements in isolation first, and then combine them once they seem to have a grasp of what you taught them. (software's great for this, since a &quot;statement&quot; is a pretty generic concept)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm assuming you mean &quot;function&quot; in the sense of a callable function which runs a block of code and returns.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think you should focus on re-usability when showing what functions are/how they work. When I was learning, the thing that got them planted in my head firmly is that you can just write some huge block of code once and get it to run at any point later with a single line.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think a better example of a function would take an argument, and perform some action based on that argument.&#xA;e.g. a &lt;code&gt;greet(name)&lt;/code&gt; function which prints out &lt;code&gt;Hello $name! Your name is $num letters long.&lt;/code&gt; when called.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could then show the function being called multiple times, with the results depending on what's passed into the function. (e.g. hard-code the string in one invocation, and pass the response from &lt;code&gt;prompt()&lt;/code&gt; in another.)&lt;/p&gt;&#xA;" OwnerUserId="8723" LastActivityDate="2019-12-20T12:07:32.453" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6108" PostTypeId="2" ParentId="6104" CreationDate="2019-12-21T09:38:03.777" Score="1" Body="&lt;h1&gt;I wouldn't.&lt;/h1&gt;&#xA;&lt;p&gt;Based on my experiences as a student teacher in the Australian education system, typically actual coding doesn't get taught until grades 9-10, at which point the language is typically Python because of its relatively simple syntax.&lt;/p&gt;&#xA;&lt;p&gt;At the age range you're discussing, students are typically taught a visual block programming language like &lt;a href=&quot;https://en.wikipedia.org/wiki/Scratch_%28programming_language%29&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt; in one unit (year or semester, depending on how the school's structured their IT course), to teach them about the programming thinking (loops, Boolean logic, etc) without worrying about correct syntax, and then taught HTML and CSS in the following unit to teach them about the importance of syntax and to get them used to typing code into a computer.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2019-12-21T09:38:03.777" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6109" PostTypeId="2" ParentId="6104" CreationDate="2019-12-21T21:21:28.973" Score="1" Body="&lt;p&gt;To answer your question directly, I think it would make sense to teach the students the more complicated looping structure first, so that they maintain a good sense of what clean code looks like. Unless, of course, you're going to teach them looping later on in the same lesson and want to use this as an example of bad code, but if you're just introducing them to programming, giving bad examples right of the bad likely isn't the best way to do it.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;In the larger sense, I think you're approaching this lesson wrong.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, I tend to recommend not including syntactic sugar when introducing programming for the first time, because that requires the student to understand more then they really need to. I mention this because I see you using features such as &lt;code&gt;foo -= bar&lt;/code&gt; instead of &lt;code&gt;foo = foo - bar&lt;/code&gt; and &lt;code&gt;foo === bar&lt;/code&gt; (because the difference between &lt;code&gt;===&lt;/code&gt; and &lt;code&gt;==&lt;/code&gt; should be taught later on).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, you're introducing a whole lot at once. To understand the code snippets you've given, the students will need to first understand &lt;code&gt;if&lt;/code&gt; / &lt;code&gt;else&lt;/code&gt; statements, blocks, mutable variables, general language syntax, typing, string concatenation, and variables at the least. And most importantly, functions! Functions are very nontrivial for someone who hasn't seen programming before. You really ought to break down this lesson into the smaller pieces first, and then, once your students are able to grasp those pieces, then they can put it together into a larger project like the one you've described. But, at that point, they should already know what loops and how they work, so you won't even have this question :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Re-evaluate your approach to teaching this lesson. Break down the topic into smaller building blocks and teach those smaller building blocks first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck with the lesson!&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2019-12-21T21:21:28.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6110" PostTypeId="1" AcceptedAnswerId="6111" CreationDate="2019-12-21T21:37:57.707" Score="3" ViewCount="168" Body="&lt;p&gt;I found a puzzling site where one puzzle was to find a string whose MD5-hash is given. Is such a puzzles good for learning? I mean, I believe that hash might be cracked by using enough computing resources. You might learn distributed computing or GPU/assembly programming if you try to make a cracker as fast as possible. On the other hand, why should one spend weeks to crack some hashes?&lt;/p&gt;&#xA;" OwnerUserId="8731" LastActivityDate="2019-12-22T10:32:04.883" Title="Is it worth to learn to make a MD5-hash cracker?" Tags="|algorithms|exercises|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6111" PostTypeId="2" ParentId="6110" CreationDate="2019-12-22T10:32:04.883" Score="5" Body="&lt;p&gt;I have used a similar idea - writing an &lt;a href=&quot;https://en.wikipedia.org/wiki/SHA-1&quot; rel=&quot;noreferrer&quot;&gt;SHA-1&lt;/a&gt; hash cracker - as a mini-project for students learning Java. These students had previously learned to program in other languages, so they had experience with variables, if/else, loops and functions; the main goal was to get them used to Java's syntax, but some of the specific things they had to do were:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Import and use a library method (&lt;code&gt;DigestUtils.sha1&lt;/code&gt; from the Apache Commons library).&lt;/li&gt;&#xA;&lt;li&gt;Write a &lt;code&gt;for&lt;/code&gt; loop over a range of characters instead of a range of integers.&lt;/li&gt;&#xA;&lt;li&gt;Use nested &lt;code&gt;for&lt;/code&gt; loops to generate every combination of characters, of a fixed length.&lt;/li&gt;&#xA;&lt;li&gt;Use recursion to generate every combination, where the password length is a parameter.&lt;/li&gt;&#xA;&lt;li&gt;Estimate how long it would take to crack a password of a particular length by brute force.&lt;/li&gt;&#xA;&lt;li&gt;Read from a text file with one word on each line.&lt;/li&gt;&#xA;&lt;li&gt;Test their code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Your question implies you are thinking of writing your own implementation of the hash function itself. I think that's probably less worthwhile, since you'll just be directly translating from the hash function's specification into code, or from an implementation in one programming language to another. You would be practicing your skills in reading and making sense of specifications or code, and you might learn some things about bitwise operators; but the design of a hash function is arbitrary and opaque to almost everybody, and there would not be much real &quot;problem solving&quot; required.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think for a learner-programmer, there is more to gain from using a library for the actual hash function, and writing the rest of the cracking program yourself - i.e. the part which generates the candidate passwords to feed into the hash function. For example, the next mini-project I got those students to do involved generating all combinations of playing cards to work out probabilities of winning in a simple card game; this is not entirely unlike generating combinations of characters for a password, and some students did notice the similarity.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2019-12-22T10:32:04.883" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6112" PostTypeId="2" ParentId="3881" CreationDate="2019-12-23T07:19:19.880" Score="4" Body="&lt;p&gt;I think the answer is &quot;yes&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It seems obvious that there is a segment of the population with severe intellectual disabilities, severe learning disabilities, brain damage, cognitive inability to read or do problem-solving, etc., who will be unable to do programming. The real, difficult, question is: What percentage of the population is that? (Or perhaps, as educational leaders with limited time and resources: For what sort of students is it profitable for us to invest resources into their programming education?)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As partial evidence, it seems clear that on the continuum of subject matter, computer science is intellectually demanding in a special way. &lt;a href=&quot;https://dl.acm.org/citation.cfm?id=1272879&quot; rel=&quot;nofollow noreferrer&quot;&gt;Benneden/Caspersen start their 2007 article&lt;/a&gt; with the following: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;It is generally accepted that it is very difficult to learn to&#xA;  programming. For example Bergin and Reilly note that&#xA;  &lt;em&gt;It is well known in the Computer Science Education (CSE) community that students have difficulty with programming courses and this can&#xA;  result in high drop-out and failure rates.&lt;/em&gt; (p. 293).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Current data show that computer science has the highest dropout rate of any college major. E.g.: &lt;a href=&quot;https://www.computerweekly.com/news/252467745/Computer-science-undergraduates-most-likely-to-drop-out&quot; rel=&quot;nofollow noreferrer&quot;&gt;10% of UK CS student drop out in the first year&lt;/a&gt;, with next-highest major at about 7%. (see &lt;a href=&quot;https://www.hesa.ac.uk/news/07-03-2019/non-continuation-tables&quot; rel=&quot;nofollow noreferrer&quot;&gt;HESA data&lt;/a&gt;, 2017-2018, Table NC1). Similar discussions are seen in &lt;a href=&quot;https://www.irishtimes.com/news/education/concern-over-drop-out-rates-in-computer-science-courses-1.2491751&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ireland&lt;/a&gt; and &lt;a href=&quot;http://trinitynews.ie/2016/02/why-are-computer-science-drop-out-rates-so-high/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Trinity College&lt;/a&gt;, etc. Borzovs et. al. in &lt;a href=&quot;http://journals.ru.lv/index.php/ETR/article/viewFile/175/680&quot; rel=&quot;nofollow noreferrer&quot;&gt;Latvia 2015&lt;/a&gt; share their motivation for a study this way:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;In recent years the observed practically stable trend to lose from&#xA;  one-third to half of students in the first year of computing studies&#xA;  motivated us to explore, whether the world has not found indeed a&#xA;  method, how to determine in advance such applicants that have no&#xA;  chance to overcome the first study year. On the one hand, the dropout&#xA;  students and the teaching staff have wasted their  resources...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Benneden/Caspersen show an overall worldwide dropout rate of about 33% from the programs that responded to their survey (about 12%). Interestingly, it's almost impossible to find hard data from U.S. 2-year programs, but I think the following estimate is accurate:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A colleague from the ACM Education Council mentioned an internal&#xA;  report of community colleges (two-year schools) in the US who were in&#xA;  a coalition to improve their retention rates in CS. One school&#xA;  reported an average failure rate, over a ten year period, of 90%!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Related, on SE Mathematics Educators, we have the question: &lt;a href=&quot;https://matheducators.stackexchange.com/questions/11396/what-fraction-of-the-population-is-incapable-of-learning-algebra/&quot;&gt;What fraction of the population is incapable of learning algebra?&lt;/a&gt; Ben Crowell, looking at demographic and standardized-test scores, has an answer where he estimates around 50%. Separately, I found an overview of research into Piaget's theory of learning stages (Mary Carol Day, &lt;a href=&quot;http://www.ascd.org/ASCD/pdf/journals/ed_lead/el_198110_day.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Thinking at Piaget's Stage of Formal Operations&quot;&lt;/a&gt;, &lt;em&gt;Educational Leadership&lt;/em&gt;, October 1981), which found that among those tested, only a similar 50% could ever perform at the terminal &quot;formal operational stage&quot;, which would seem highly related to performance in math and computing:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Piaget's position has often been used to predict that one who can&#xA;  think in a formal operational manner will always do so. However, only&#xA;  about 50 percent of those over 12 years of age who are presented with&#xA;  tests of formal operations perform in what would be considered a&#xA;  formal operational manner. This is true of college-educated adults as&#xA;  well as adolescents. In addition, even people who use formal&#xA;  operational skills on one task may not use them on another.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Anecdotally, when I started teaching CS courses at a community college about 20 years ago, my starting assumption was a passionately-held &quot;no, of course anyone can learn programming!&quot;. That particular ship broke and sank on the first day, when I sat with a student after class for an extra 3 hours trying to get him to understand the first lab, until he said, &quot;I just can't get this&quot;, and walked off. Now I'm going to believe what that student told me, as I've seen it many, many times in this context. In fact, in some cases I think it's cruel and dispiriting and immoral to continue encouraging some people to pursue CS programs, e.g., after they've failed to pass CS1 for several semesters in a row. My instinct would be to politely challenge those who think otherwise to try and teach CS at a U.S. open-admissions community college for a semester.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I will hold forth that there's a fairly large segment of the population that can never understand the concept of a &lt;em&gt;variable&lt;/em&gt; no matter how much or long or how many strategies they use to try. This is similar to the observation by Joel Spolsky, one of the founders of the Stack Exchange network, &lt;a href=&quot;https://www.joelonsoftware.com/2006/10/25/the-guerrilla-guide-to-interviewing-version-30/&quot; rel=&quot;nofollow noreferrer&quot;&gt;who wrote&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;I’ve come to realize that understanding pointers in C is not a skill,&#xA;  it’s an aptitude... &lt;em&gt;For some reason most people seem to be born&#xA;  without the part of the brain that understands pointers&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2019-12-24T05:55:02.863" LastActivityDate="2019-12-24T05:55:02.863" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6115" PostTypeId="2" ParentId="5728" CreationDate="2019-12-26T16:41:31.103" Score="0" Body="&lt;p&gt;I think Buffy's answer is an excellent philosophy of how to solve this, but I would add a specific thing to it: dependency breaks.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Back when I was learning Compiler Construction, we were supposed to develop a Pascal compiler in several steps, each building on the next bit. If you couldn't solve part A, you couldn't even begin to work on part B. Or of your implementation of B was poor, you'd be hobbled in part C too. That's sliding towards &quot;either you do this class excellently or you fail miserably&quot;. Not great for students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So to avoid that, use dependency breaks. The first project should give you a setup for the next project, and that one for the last project. But after the first project has been handed in, graded, and feedback given, there's also a code skeleton available from which to start working on the second project, if you're not so happy with your first project.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having explicit dependency breaks also makes it easier to reshuffle teams in between projects, in case students drop out of the class or members of a team have a falling out.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In summary: dependency breaks make the class more robust.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2019-12-26T16:41:31.103" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6117" PostTypeId="2" ParentId="3590" CreationDate="2019-12-31T19:33:17.780" Score="1" Body="&lt;p&gt;It depends on what you consider &lt;em&gt;teaching&lt;/em&gt; revision control. One can learn how to use &lt;em&gt;git&lt;/em&gt; like a glorified Dropbox in an afternoon. Even if working in groups, usually everyone just commits code directly to &lt;code&gt;master&lt;/code&gt; with no explicit peer-reviewing or use of topic branches. If &quot;taught&quot; at this level then I agree with @Konerak: it is not University-level knowledge and, frankly, there's not much to learn anyway.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, this is not how VCSs are used &quot;in the real world&quot; (read: Open Source Software). You see, VCS are all about facilitating asynchronous collaboration. This includes distributing code, storing history, branching and merging. But in most coursework &lt;strong&gt;students usually do not work on a project that is developed by people other than their friends and that will continue to exist when the semester ends.&lt;/strong&gt; Thus, most of the advantages of using VCS are non-issues for students. Sure, they can benefit from its use, but most coursework can be completed without VCS with approximately the same amount of time and effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO, VCS are not something that should be &lt;em&gt;taught&lt;/em&gt;, in the sense of making it a curriculum item. It is a tool that naturally appears when students learn about &quot;professional&quot; development workflows and best practices. Many VCS features exist to support practices such as &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;separate a stable version from development (topic branches)&lt;/li&gt;&#xA;&lt;li&gt;organize history and ensure each feature can be rolled back easily (rebase and squash commits)&lt;/li&gt;&#xA;&lt;li&gt;marking versions as release (tagging)&lt;/li&gt;&#xA;&lt;li&gt;accepting contributions without granting commit access (patches / Pull Requests)&lt;/li&gt;&#xA;&lt;li&gt;peer reviewing (patches / PRs)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These are not situations that students encounter when developing projects for the first few times. So, to wrap up, universities do not teach &quot;real&quot; VCS because either&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;it is hard/laborious to create courses that simulate a development workflow that actually needs them; or&lt;/li&gt;&#xA;&lt;li&gt;their curriculum is directed towards graduating PhD candidates.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2019-12-31T19:33:17.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6118" PostTypeId="2" ParentId="5579" CreationDate="2020-01-02T01:49:03.147" Score="3" Body="&lt;p&gt;A boring fact, a story, and a practical reason from a real-life department meeting:&lt;/p&gt;&#xA;&lt;h1&gt;The boring fact&lt;/h1&gt;&#xA;&lt;p&gt;Com Sci programs are accredited. In the US they like to go by the official group -- the ACM (Association for Computing Machinery). They recommend Calculus in a round-about way. From the &lt;a href=&quot;https://www.acm.org/binaries/content/assets/education/cs2013_web_final.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;2013 ACM curriculum&lt;/a&gt;, page 50:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;we believe that a CS program must provide students with a level of&#xA;&amp;quot;mathematical maturity.&amp;quot; [...] some programs use calculus requirements&#xA;not as a means for domain knowledge, but more as a method for helping&#xA;develop such mathematical maturity [...] early in a college-level&#xA;education. [...] undergraduate CS students need enough mathematical&#xA;maturity to have the basis on which to then build CS-specific&#xA;mathematics&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It's saying you need to math-up your freshmen with classes such as: Calculus. End of list.&lt;/p&gt;&#xA;&lt;h1&gt;The story&lt;/h1&gt;&#xA;&lt;p&gt;An early maxim was &amp;quot;you can't program what you don't know&amp;quot;. An obvious example: Grace Hopper was a mathematician, and coded math equations. In the 60's, most programmers would be writing accounting software. At that time my midwestern state school had Com Sci students taking required accounting classes (and not only because Des Moines was a hub for Insurance, banking, and direct mailings). Later, as the arms race heated up, there was a national push for rocket-science -- Calc and Physics. We wanted enough coders to aim ballistic missiles at the Rooskies. In the 80's my old school required a year of both, and only recently dropped Physics (now it's a year of any science).&lt;/p&gt;&#xA;&lt;p&gt;No one thought Accounting or  Calc made you a better programmer. They though they made you better at programming Accounting or Calc.&lt;/p&gt;&#xA;&lt;h1&gt;The practical reason from a real-life department meeting&lt;/h1&gt;&#xA;&lt;p&gt;During an 00's curriculum discussion us faculty talked about cutting Calc. We wanted to since our students didn't need it, but we couldn't do it. We talked about moving our Discreet Math class up front, but rejected it. For one thing, it had some coding, but mostly we couldn't teach another huge freshman section. It was enough trouble staying on top of the huge Programming I and II sections. It turns out Calc is special since the Math Dept. is already teaching giant sections of it for the entire Engineering College. Physics was special the same way. We thought about putting Linear Algebra instead of Calc, but it's a small, fast-paced 3rd-year class -- asking the Math Dept. to convert it for 200 1st-years would have been impractical.&lt;/p&gt;&#xA;&lt;p&gt;So, because of historical reasons, Calc is often the only math class a big group of 1st year students can take. But say your school isn't known for Com Sci and the Dept. gets only a few majors (and exists mostly to teach non-majors). Then it makes sense to have your dozen new majors take Combinatorics right away, or your other ideal 1st math class.&lt;/p&gt;&#xA;" OwnerUserId="8773" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-05-08T20:43:58.283" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6120" PostTypeId="2" ParentId="3590" CreationDate="2020-01-02T15:23:07.923" Score="1" Body="&lt;p&gt;&lt;strong&gt;Computer Science projects don't bring out the true power of version control&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't get me wrong, it's useful. But it's not &lt;em&gt;as&lt;/em&gt; useful and vital as it is in industry.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS projects tend to be &quot;proof of concept&quot; projects, with a short lifetime: after you pass the class, you don't care what becomes of it. Also, the team behind the software is relatively constant: you do a project alone, or with a few fellow students, do the project, and go separate ways.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If something goes wrong with you code and you lose it, or it gets corrupted because people are mixing in their contributions, that's bad of course. But since the project is relatively new, recovering is easier than it is in a years-old industry project. And worst case, you fail a deadline or fail the course. In industry, you could be losing a &lt;em&gt;lot&lt;/em&gt; of money &lt;em&gt;per hour&lt;/em&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In industry, an application has to be deployed to one or possibly multiple environments, by a team that hires and fires members, and it has to keep working for several years of development. Version control helps such a large team of diverse specialists work together, for a long term. It makes deployment far easier, and it makes it possible to roll back a version that somehow doesn't work in production, in a very short time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So while version control is valuable in academic environments, it's &lt;em&gt;far more&lt;/em&gt; valuable in industry.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2020-01-02T15:23:07.923" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6121" PostTypeId="2" ParentId="5992" CreationDate="2020-01-02T16:51:23.380" Score="1" Body="&lt;p&gt;&lt;strong&gt;The length&lt;/strong&gt;: a full degree in CS (or engineering) takes &lt;em&gt;at least&lt;/em&gt; 4 years to complete. The duration of most bootcamps is usually measured in &lt;em&gt;months&lt;/em&gt;. Obviously they can not be equivalent and this brings suspicion to anyone that states differently. IMHO, the small duration of the courses brings three concerns:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;as @Buffy said, the knowledge and depth is constrained mainly by the small duration of the bootcamp;&lt;/li&gt;&#xA;&lt;li&gt;in my experience, rushing through content does not result in longing knowledge. Without time for exploration, students might be able to only reproduce the situations they have experienced during the bootcamp.&lt;/li&gt;&#xA;&lt;li&gt;students have little time to grow into adulthood. While this works fine for people that are transitioning from other careers, students fresh out of high-school may leave the bootcamp still very immature and probably not ready for employment.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;The reputation&lt;/strong&gt;: universities have earned a reputation of graduating students that, over the course of their careers, become good professionals. A reputable university often produces, in average, &lt;em&gt;excellent&lt;/em&gt; professionals (in part because they only enroll &lt;em&gt;excellent&lt;/em&gt; students, but this is another conversation). Also, universities are usually enduring institutions. Many have existed for a long time and will continue to do so. Coding bootcamps are usually young and have not earned yet the confidence that they are able to consistently graduate students that become good professionals. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thus, besides @buffy 's considerations about the possible careers for CS majors, other factors also play significant role in why coding bootcamps are not being recognized by the market as positively as universities. You can still do a coding bootcamp and turn out to have a successful career, just keep in mind that your career path might look very different from someone whot went through the traditional university training. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2020-01-02T16:51:23.380" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6122" PostTypeId="1" CreationDate="2020-01-02T17:59:20.147" Score="8" ViewCount="413" Body="&lt;p&gt;Recently Python and Java have started to be the de facto standard for teaching CS1/2. This means that students arrive in courses like Embedded Systems, Operating Systems or High Performance Computing without any experience with the &lt;em&gt;C&lt;/em&gt; language. Where I teach we have a special &quot;C marathon week&quot; that provides an introduction to basic &lt;em&gt;C&lt;/em&gt; programming to students who already code in Python and Java. We currently have an exam to try and measure students' mastery of &lt;em&gt;C&lt;/em&gt;, but our approach is very empirical. We have &lt;em&gt;impressions&lt;/em&gt; about what what they have learned during the first week, but very little of it is actually measurable. Mind you, students are able to do all the coursework, but we do not understand the relationship between their success and our introductory activity nor are able to quantify how much knowledge they gained during the semester (but after the introductory week). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, are there best practices regarding evaluating their knowledge of &lt;em&gt;C&lt;/em&gt; (or any other programming language) separately from their basic programming knowledge? This might generalize to other programming languages/technologies as well, so answers might not need to focus specifically on &lt;em&gt;C&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I am looking for something like concept inventories, but that focuses on the mastery of &lt;em&gt;C&lt;/em&gt; and not on introductory programming. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastEditorUserId="8043" LastEditDate="2020-01-24T16:15:41.907" LastActivityDate="2020-02-16T22:40:02.280" Title="How can we measure proficiency in programming languages?" Tags="|assessment|c|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6123" PostTypeId="2" ParentId="6122" CreationDate="2020-01-02T18:27:48.553" Score="8" Body="&lt;p&gt;I think you are taking a good approach with your boot camp. I'd only suggest a warm up exercise/mini-project in which students get some practice, perhaps writing in groups (pair-programming, perhaps). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One useful sort of project is called a &lt;em&gt;fixer-upper&lt;/em&gt;. There is a pedagogical pattern by that name, actually. Give the students a program that you have written. Make it fairly large (bigger than they could write themselves). Make it a good a C program as you can. Then break it in a few ways. Some of the introduced errors are syntactical, which the compiler can catch. Others are more subtle and require thinking. The exercise is to fix the program. It is a good &quot;hot&quot; introduction to a language. In another course than those you suggest, I might give them a program that solves a problem they already know how to solve in, say, Python. But here, it might be better to do something that makes them think about memory. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, I wouldn't worry overly about mastery at this level. Any &quot;predictor&quot; will be imperfect. Students can grow into the language along with the OS concepts, for example. I learned a lot about machine level programming in just such an environment. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The student needn't be perfect in one thing before they move on to the next. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you may need to provide additional feedback or mini-lessons along the way if they seem to be a bit off track. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-01-02T18:27:48.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6124" PostTypeId="2" ParentId="5992" CreationDate="2020-01-02T23:08:59.643" Score="2" Body="&lt;p&gt;Years ago I worked for a software company.  I was not a coder for the company. I worked with clients doing interface modification and design.  While I was there all but one of the 20 or so coders were laid off.  The coding was shipped off to Vietnam.  The CS people who actually designed the software were the money makers.  &lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2020-01-02T23:08:59.643" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6125" PostTypeId="1" AcceptedAnswerId="6126" CreationDate="2020-01-03T09:54:08.280" Score="1" ViewCount="96" Body="&lt;h2&gt;Background&lt;/h2&gt;&#xA;&lt;p&gt;I have a friend who loves applied math and physics, but hates programming. She is learning python right now because she thinks it's helpful in getting a math-related job, and her mom forces her to learn programming despite how much she hates it. I suggested to not go into a career that involves doing things she hates, but she said that she likes her career decision. It's just the programming part of it that she doesn't like. She also said she never had a choice because of the expectation from her family and the necessity of programming in math-related careers.&lt;/p&gt;&#xA;&lt;h2&gt;Problem&lt;/h2&gt;&#xA;&lt;p&gt;I feel really sad for her. Knowing that she has no choices, I tried helping her enjoy programming, so that even though she still has to program, she wouldn't find it boring.&lt;/p&gt;&#xA;&lt;h2&gt;What I have tried&lt;/h2&gt;&#xA;&lt;p&gt;This question is similar to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/4781/how-to-teach-a-person-to-enjoy-programming&quot;&gt;How to teach a person to enjoy programming?&lt;/a&gt; But it is different because my friend doesn't like the things she made. People in the other question suggested that it is the products that make programming enjoyable. But she is saying that she doesn't like the products either. She would rather solve problems by hands than to have a program that solves problems for her, because she thinks using programs to solve problems feels like cheating, and prefers to solve problems in a more elegant algebraic way.&lt;/p&gt;&#xA;&lt;p&gt;I also got her to make some simple programs that do simple tasks like counting the significant digits, and rewriting numbers in scientific notations, but she couldn't see any real-life applications of them.&lt;/p&gt;&#xA;&lt;h2&gt;What I'm looking for&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some physics or math projects with real-life applications that she can make with python. (She likes university-level physics and math, but is still a beginner in python)&lt;/li&gt;&#xA;&lt;li&gt;Any other ways that can make her not hate programming&lt;/li&gt;&#xA;&lt;li&gt;Maybe some things to say to let her know the fun parts of programming&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8774" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-01-03T18:19:41.177" Title="How to make someone enjoy programming if they don't like the products they make?" Tags="|lesson-ideas|student-motivation|" AnswerCount="1" CommentCount="4" ClosedDate="2020-01-03T21:36:40.307" ContentLicense="CC BY-SA 4.0" />
  <row Id="6126" PostTypeId="2" ParentId="6125" CreationDate="2020-01-03T18:19:41.177" Score="2" Body="&lt;p&gt;I don't normally answer questions that I've voted to close, but I'll make an exception here. I think your quest is doomed. Sorry. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think that pressing is just going to make it worse. Perhaps you can impress that on the mother. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One can be successful in applied math or physics without programming. It is a helpful tool, but not essential for everything. She can be a success without it, most likely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, the time will, perhaps, come when she needs to use programming to solve some problem that really drives her interest. That is the time that you might be of help, but not now. It is now just a distraction. Wait for the need to become obvious to her. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Tai Chi we learn to be soft in our actions and movements. But that doesn't mean they are ineffective. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-01-03T18:19:41.177" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6127" PostTypeId="1" CreationDate="2020-01-04T02:02:02.570" Score="4" ViewCount="1226" Body="&lt;p&gt;Students are very happy when they see some real applications of the theory. Any suggestions for interesting examples of knapsack problems?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2020-05-12T07:58:28.900" Title="What are some real life applications of the knapsack problems class?" Tags="|teaching-analogy|algorithms|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6131" PostTypeId="2" ParentId="3939" CreationDate="2020-01-07T21:27:02.563" Score="0" Body="&lt;p&gt;When you park the car as object: open the door, drive in, get out, close the door.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you park the car as into relational database: You need additionally to disassemble the car into 4 wheels, 4 seats, engine, battery, wiring, drain fuel tank, etc, and put everything into proper shelf.&lt;/p&gt;&#xA;" OwnerUserId="1480" LastActivityDate="2020-01-07T21:27:02.563" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6134" PostTypeId="1" CreationDate="2020-01-08T21:37:51.053" Score="3" ViewCount="120" Body="&lt;p&gt;Consider the following two competing incentives in teaching a first Intro to CS course for CS majors. In my case, the course must use C++ -- that's a given.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first incentive is that the course needs to provide a solid foundation, which includes understanding how things work under the hood and implies teaching pointer, raw array and string, dynamic allocation etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second incentive is the focus on developing algorithmic thinking and taste for elegant code. This incentive seems to be served best by teaching the smallest and the simplest-to-use possible subset of the language sufficient to solve algorithmic problems, gradually getting to the level of problems used in informatics olympiads for high school. So, for example, &lt;code&gt;std::vector&lt;/code&gt; would be taught instead of raw array and pointers would not be mentioned. This would probably also mean excluding the need to handle errors in the exercises, so as to not spoil the taste of writing short and elegant code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which approach is preferred? Or maybe a third approach?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Clarifications following the reply by @Ben I.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am presenting this as a choice between two approaches, because I believe that the two approaches are in conflict. Low-level features of the language are complicated. To help students understand them, one needs to give a lot of technical examples and exercises. This totally takes the focus away from algorithmic thinking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, I am writing under the assumption that, once I am convinced about the correct way of teaching, I can try to convince my colleagues to consider changes in the follow-up courses as well. Right now the curriculum is built on the first approach. The big picture that I see is that there are many CS graduates who know programming languages, but few who are good programmers. Look at the questions at &lt;a href=&quot;https://leetcode.com/problemset/all/&quot; rel=&quot;nofollow noreferrer&quot;&gt;leetcode.com&lt;/a&gt;. Almost all of them are about algorithmic thinking, because employers are looking for good programmers.&lt;/p&gt;&#xA;" OwnerUserId="8794" LastEditorUserId="8794" LastEditDate="2020-01-09T08:25:04.783" LastActivityDate="2020-01-11T11:25:14.813" Title="An Intro to CS course in C++ for CS majors: laying a solid low-level foundation or simple tools and algorithmic thinking?" Tags="|c++|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6135" PostTypeId="2" ParentId="6134" CreationDate="2020-01-08T22:10:37.133" Score="2" Body="&lt;p&gt;You wrote:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The first incentive is that the course needs to provide a solid foundation, which includes understanding how things work under the hood and implies teaching pointer, raw array and string, dynamic allocation etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This is not the only definition of a &quot;solid foundation&quot;.  I would suggest that your second approach is also a &quot;solid foundation&quot;, but towards a different goal.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could make a wonderful course out of low-level computer workings, and your students could learn a tremendous amount.  Your &quot;second incentive&quot; is higher-level, and you could make a wonderful course out of this as well.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In truth, I am not sure that your goals are entirely opposed to one another.  You can teach high-level thinking and still mention what is going on under the hood, and you can teach good coding style in a low-level language.  No matter which basic approach you take, you really should make an effort to help students see at least a bit of the other side.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But in answer to your question about a basic initial approach, I might suggest the following: we often think about introductory courses as preparing us for our long-term futures, but I would argue that on a far more practical level, course 101 lays the foundation for 102, 103, 201, 202, 303, and so forth.  You are setting the stage for future learning.  Therefore, the best (introductory) course is the one that helps the students &lt;em&gt;get the most learning out of their later, more advanced courses&lt;/em&gt;.  After all, those courses are where the rubber will really meet the road.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, what will set them up for success as they proceed through your entire program?  Have a few conversations with your colleagues, and take a careful look at your program's course catalog.  The answer may become fairly obvious.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-01-08T22:10:37.133" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6136" PostTypeId="2" ParentId="6134" CreationDate="2020-01-09T13:24:55.123" Score="2" Body="&lt;p&gt;Consider that computers (the hardware) and programs (the software) are designed and built as a layered system. Each layer defines a complete and consistent model of computing that can be used without any reference to lower levels - except in the implementation. You can program effectively in, say, Scheme, without reference to silicon or to registers or to physical memory, or to assembler language, or anything beyond what is defined in Scheme itself. Each layer is complete unto itself and consistent within itself. Lower levels are for compiler builders, not for programmers working in a particular language. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider that most programmers don't ever build OS kernels or device drivers except possibly in a specialized course. Most spend their efforts solving problems useful to users. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider that you can teach a given level without reference to any other level. A variable is a reference to a value. The value is defined within a range. The variable might be able to later reference a different value. The values can be combined to create other values using well defined and consistent rules. The matching of a variable to a memory location mixes levels in a way that is essential to a compiler builder, but not to an application programmer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider that C and low level C++ is a minefield for beginners with many places to go wrong and get lost and frustrated. Once mastered, they are a beautiful thing for low level programming, but mastery comes slowly unless you have an overall picture of what you really want to attain. I could once program some beautiful things in C++ but felt the language and tools were fighting me every step of the way. I didn't actually need the low level stuff (even though I often built compilers) so gave it up. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Consider that C++ has been remaking itself for 35 years into something at a higher level. It has, in fact, been moving away from its roots as &quot;a better C&quot;. Even more so than C as a replacement assembler language for early DEC machines. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were going to recommend using C++ for beginners, I would recommend using the latest version (17) and finding a book that emphasizes that. Use the modern libraries exclusively. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teach students to program at a higher level and stay consistent within that level. That is why the level was created in the first place. Once they &quot;know what a program is&quot; they can then branch out to either lower or higher levels as needed. But mixing levels doesn't do them any favors, since it isn't needed and just adds complicaiton. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We don't, in fact, have to force students to recapitulate the entire history of computing before they can begin to solve the problems that need solving today. Sadly, too many people think that such a recapitulation is necessary. The reason for this is that they learned computing over those 35 years and so think back on how they first learned. But the ideas they learned way back then are now pretty much obsolete. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even the &quot;machine model&quot; most people might use to illustrate how a program is executed (memory transfer) is obsolete. Hardware doesn't look like that anymore and the OS makes it look even less like that. A CPU and memory. A few general registers. A monolithic memory (RAM). Nope. Now it's multilevel cache, separate data and program cache, paged memory management, specialized registers, etc. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Save the complicated multi-level stuff for the compiler and OS courses. By then they should know how to program. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll note that Bjarne Stroustrup, who created C++ once said something like: “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.”   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Or, for fun: &lt;a href=&quot;http://www.softpanorama.org/Lang/Cpp_rama/humor.shtml&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.softpanorama.org/Lang/Cpp_rama/humor.shtml&lt;/a&gt; (which has an alternate quote). &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;A problem with teaching a high level language, however, is that the instructor probably already knows low-level languages and is far too likely to &quot;explain&quot; things in terms of a mapping. But the mapping may be to something that the students don't, themselves, already understand unless they, too, have been made to do the recapitulation of programming history. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, you need to think about how to answer questions &lt;em&gt;within&lt;/em&gt; the (complete and consistent) level defined by the language. And you need to be prepared. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-01-09T14:12:00.807" LastActivityDate="2020-01-09T14:12:00.807" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6137" PostTypeId="2" ParentId="6134" CreationDate="2020-01-11T10:58:17.380" Score="1" Body="&lt;p&gt;Don't do it. Learning C++ is a MASSIVE undertaking. C++ is many many times bigger than C. Doing this at the same time as learning to program, will give sub-optimal results. I have tried to hire C++ programmers in the past. Almost all of the candidates could not even program: did not understand the most basic concepts. We had to hire non-C++ programmers, and cross train. (it is quicker to learn to program, and then learn C++). For your goals, it will be better to teach two languages: A good beginner language, and C. (I had not read your last 2 paragraphs when I wrote this)&lt;/p&gt;&#xA;&lt;h1&gt;With respect of solid foundation:&lt;/h1&gt;&#xA;&lt;p&gt;I think this is often miss-understood. The concept of abstract/high-level vs low-level  in computer-science/programming, is usually the complete opposite to that in teaching theory.&lt;/p&gt;&#xA;&lt;p&gt;High-level programming, is less abstract from what the student already knows. So therefore should be the foundation. Think about how many car drivers there are, and how many of them can even check their windscreen-wash-level, let alone make a repair.&lt;/p&gt;&#xA;&lt;p&gt;Therefore start high and conditionally work your way down (depending on specialist course).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-01-11T10:58:17.380" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6138" PostTypeId="2" ParentId="6134" CreationDate="2020-01-11T11:25:14.813" Score="0" Body="&lt;blockquote&gt;&#xA;  &lt;p&gt;I am presenting this as a choice between two approaches, because I believe that the two approaches are in conflict. Low-level features of the language are complicated. To help students understand them, one needs to give a lot of technical examples and exercises. This totally takes the focus away from algorithmic thinking.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I would challenge that frame to say that yes, they're in conflict in the sense that time spent on the one is time not spent on the other. But what you may actually need is something else: a well-rounded basis in C++.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My original introduction to C++ spent time both on low-level aspects like pointers, as well as abstract ideas like sorting. Then in computer architecture class, we dove into things like hardware-aware programming, and in compiler construction into how language constructs are translated into machine instructions. Low-level stuff. In algorithmics and data structures courses on the other hand, we focused on the abstract programming ideas, building up towards higher level technique.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;All of these follow-up courses depended on C++, but both of the two &quot;opposing&quot; axes you bring up turned out to be necessary.&lt;/p&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2020-01-11T11:25:14.813" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6139" PostTypeId="2" ParentId="4605" CreationDate="2020-01-12T00:34:37.240" Score="1" Body="&lt;p&gt;The persons who could answer your question best are the students themselves. Why don't you ask them?&#xA;Seriously though, there might be a host of reasons why a given person is novelty-shy. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First of all, however pleasant knowledge might be, any learning process is intrinsically painful, so some reluctance is only to be expected from any pupil or student at some point.&#xA;Besides, computing is extremely abstract. Maybe not as much as maths, but still it takes a bit of time before you can really create something beyond learning basic vocabulary. For those who are passionate about the subject it's a breeze. For others, that initial period requires a leap of faith.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe some of your students are simply not interested in programming, in which case they will likely try and avoid the chore of learning more unpleasant stuff.&lt;br&gt;&#xA;Or maybe they are struggling to keep up and feel too insecure to tackle new concepts.&lt;br&gt;&#xA;Or maybe they are having it too easy and don't see the point in learning new tricks if the problems they are given can be solved without.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Depending on the cause of their reluctance, you might for instance:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;openly discuss their lack of interest and make a deal with them: do the bare minimum honestly and I'll try to make it as painless as possible&lt;/li&gt;&#xA;&lt;li&gt;work on the student's self confidence. Try to find a couple of relays among the most advanced students that can spend some time helping others in group projects.&lt;/li&gt;&#xA;&lt;li&gt;give them something worth tackling the new concepts. Ideally a project where old tricks either don't work or are too impractical.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As a student, my best memories are from classes where I felt I belonged. Not necessarily as a successful student, sometimes quite the contrary. By &quot;belong&quot; I mean I knew what to expect and felt in agreement with the teacher - even if that was sometimes limited to agreeing to disagree :)&lt;br&gt;&#xA;I loathed electronics and had disastrous grades, but I managed to strike a deal with a few teachers who would clearly state what they expected of me and respect my lack of interest.&#xA;I also had a couple of teachers who took the time to devise problems for advanced students and kept us interested while the rest of the class struggled with system programming basics.&#xA;Plus a couple of teachers who helped me overcome an initial reluctance to dive into some domains.&#xA;Lastly, I remember one college teacher to whom I am still grateful today for opening a window to all that marvellous literature. Decades later, I met again with a college friend, and to my consternation she told me these French courses had bored her silly :). It took me a real effort to accept the idea that these lectures I had found so captivating could have been perceived as plain chores by some!&#xA;So any teacher's trick is likely to work magnificently with one student and fail spectacularly with another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I tried to emulate that behaviour in my few teaching experiments, with mixed success to be honest, but at least I always avoided the pitfall of being a one trick pony.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Always try and listen to what the students have to say (if anything), that would be my first and last advice.&lt;br&gt;&#xA;If they know you sincerely try to take their needs into account and expect reasonable things of them - within the limits of what you are expected to teach them, of course, they will usually go to great lengths to be worthy of your respect and fulfil your expectations. At which point problems like the one you evoke in your question cease to be major issues, in my limited experience.&lt;/p&gt;&#xA;" OwnerUserId="2486" LastActivityDate="2020-01-12T00:34:37.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6140" PostTypeId="2" ParentId="761" CreationDate="2020-01-12T15:12:47.353" Score="0" Body="&lt;p&gt;When I speak, which I try to keep to a minimum: Short instructions (duplicated on handouts or board), I enforce the following rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students will:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Rules for the whole school (they call it active listening):&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Face the person that is addressing the class. Teacher, other student, visitor.&lt;/li&gt;&#xA;&lt;li&gt;Not talk or fidget or make a noise.&lt;/li&gt;&#xA;&lt;li&gt;Pay attention and listen to the best of their ability, so that they can answer questions.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Additional rule&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Monitors off.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If the class can cope with looser rules, then I can allow monitors on (and continuing work) for short notices. So long as they are silent.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also use a count-down 3-2-1, so that they know when I will start talking.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;OK 3 - active-listening and monitors off - 2 - 1 - ...&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;or &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;OK announcement in 3 - 2 - 1 - ...&quot;&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-01-12T15:12:47.353" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6141" PostTypeId="1" AcceptedAnswerId="6142" CreationDate="2020-01-14T14:13:47.787" Score="1" ViewCount="71" Body="&lt;p&gt;Is there any guidelines how to make sure that code you write won't be copyrighted anywhere? I meet sometimes situations where I write code that does some particular small thing but there is a similar code on the Internet without licenses. Then I need to think alternative more unnatural solution or how to modify the code more messier to avoid copyright issues.&lt;/p&gt;&#xA;" OwnerUserId="8819" LastActivityDate="2020-01-14T14:30:59.820" Title="How to verify that code you write is not copyrighted anywhere?" Tags="|programming|" AnswerCount="1" CommentCount="1" ClosedDate="2020-01-14T19:25:02.333" ContentLicense="CC BY-SA 4.0" />
  <row Id="6142" PostTypeId="2" ParentId="6141" CreationDate="2020-01-14T14:30:59.820" Score="1" Body="&lt;p&gt;Don't worry about &quot;similar&quot; code. Copyright is about copying, not about similarity. If you wrote it independently of any other, then there shouldn't be an issue. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is also the rule that in some situations there is &quot;only one way&quot; to say something. So if some phrases (or coding patterns) appear in several places it isn't evidence of infringement. The number of ways you can write an iteration through a list is pretty small, after all. Problems recur in computing. So the &quot;natural&quot; programs that solve them also recur. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, copyright is about publishing. If you don't publish your code then it won't be an issue either. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-01-14T14:30:59.820" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6143" PostTypeId="1" CreationDate="2020-01-14T18:21:26.770" Score="1" ViewCount="52" Body="&lt;p&gt;I will be teaching a course to college students in their 3rd year in college study.  So far, they have taken only one programming course in MATLAB. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have a package, i.e., is a set of functions, that simulate a certain task in our research field. It is written in MATLAB. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;We want to introduce the students to this package and make them know how to use the model without implementing the functions themselves. The students are 3rd year college students who took only one programming course in MATLAB.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I thought about setting up an example problem for the students to go through in the computer lab, run it and answer some questions. For example, calculate the mean of &quot;x&quot;. What does the results in &quot;y&quot; mean? Are they realistic?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is this the best method to teach such a computer lab? How do you teach well known packages, e.g., Akka, Spark, etc. in computer labs?&lt;/p&gt;&#xA;" OwnerUserId="8821" LastEditorUserId="27" LastEditDate="2020-01-14T19:15:54.060" LastActivityDate="2020-01-14T19:22:51.293" Title="How can I teach the students a package/module in a computer lab?" Tags="|curriculum-design|labs|exercises|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6144" PostTypeId="2" ParentId="6143" CreationDate="2020-01-14T19:22:51.293" Score="1" Body="&lt;p&gt;What you suggest is pretty typical for work in a lab. But I assume that you want them to know the package for a reason. You might tailor a few exercises that are related to that purpose so that it is an easy step for them from the lab to the intended use. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also the sort of thing that might work well with pair programming if they need experience with that (they do, actually). Pairing will also free you up from answering simple questions that block students from forward movement while you only need to deal with more serious questions. Pairing is good in general for making everyone more productive. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can also save some time at the end for getting suggestions from students about how this package applies to their more general task. Just a check that they see the relevance. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-01-14T19:22:51.293" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6145" PostTypeId="1" CreationDate="2020-01-14T22:25:31.270" Score="2" ViewCount="138" Body="&lt;p&gt;As they say, you don't get a second chance to make a good first impression. Are you aware of any notes/slides appropriate for a first lecture in databases?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2020-01-18T21:19:54.907" Title="What would be your ideal first lecture in a databases course?" Tags="|teaching-analogy|databases|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6147" PostTypeId="2" ParentId="6145" CreationDate="2020-01-15T10:24:26.443" Score="3" Body="&lt;h2&gt;Similarities&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;For a first lesson, what you want to focus on are &lt;strong&gt;anchor points&lt;/strong&gt;, i.e. how databases are something that's closely related to what students already know and understand.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The prime example here is &lt;strong&gt;Excel&lt;/strong&gt;. We've all seen a data table at some point, e.g. your grades/report card from school are a data table, or your bank transaction history.&lt;br&gt;&#xA;My SO is currently in the process of a career change in IT, and I suggested her to substitute &quot;table&quot; with &quot;Excel file&quot;, and it really helps to understand the big (though certainly massively oversimplified) picture.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Understanding that, a database can easily be described as a &lt;strong&gt;folder of Excel files&lt;/strong&gt;. This is again massively oversimplified, but enough for an introductory understanding of what a database's purpose is.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Note that you could also represent a database as a single Excel file with multiple sheets. However, for display purposes I prefer having my tables in separate windows, which is easier when working with separate Excel files. It's purely a visual decision.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;A practical example&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;My favorite example, probably because it's what I was taught as a first example, is Blockbuster, i.e. a simple video renting service. It's an example that can be adapted to students' growing understanding of a database structure.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In a first version, you have a single table where each record represents a rental, with customer info (e.g. name), DVD info (e.g. movie title), and rental info (e.g. return date)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a customer rents multiple videos at the same time, it quickly becomes cumbersome to have to repeat their personal information, which leads to version 2: separating the customer information into its own table, and &lt;strong&gt;referencing&lt;/strong&gt; the specific customer (by ID) in the rentals table.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The same logic then also leads you to separating the video tapes into a table of their own, analogous to the customer example.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This three table structure is fairly straightforward, easy to develop from what was initially a single table, and it teaches most core concepts for database modeling: tables, columns, records, primary keys, foreign keys, and the basics of data normalization.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2&gt;Database design is a theory, not a technology&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It's interesting to note that you could, time permitting, demonstrate the above implementation of a video rental database using a literal folder of Excel files. This helps separate the distinct skills of designing a database (i.e. deciding the structure) and implementing a particular database system (e.g. SQL Server, Oracle, ...)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I strongly suggest separating the two, as the complexity of learning a particular system often distracts from students learning about and appreciating the theoretical database design skill.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2020-01-15T10:24:26.443" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6148" PostTypeId="2" ParentId="761" CreationDate="2020-01-15T14:55:28.097" Score="1" Body="&lt;p&gt;Divide the room down the middle.  Left hand desk face left, right hand desk face right.  Aisle down the middle.  Get a wireless keyboard/mouse setup and move around.  Turn all desks 180 degrees so the kids have to turn around to look at the board.  Get a remote management system for the lab so you can control computers.  These are all solutions.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2020-01-15T14:55:28.097" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6149" PostTypeId="1" AcceptedAnswerId="6151" CreationDate="2020-01-15T15:57:31.643" Score="2" ViewCount="210" Body="&lt;p&gt;I apologize; I know this question is sort of open-ended and if I could think of a way to make it more specific, I would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What would you consider a piece of CS so fundamental that it would be analogous to an elementary student learning his/her multiplication tables?  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think maybe looping code, maybe data types, and/or conditional statements.  I'm looking for pointers to any scientific literature on this topic and any input anyone cares to share.   &lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are the absolute fundamentals that every developer must master regardless of paradigm (OOP, FP etc) or language? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Feel free to close this if it's too broad but if you do vote to close please suggest how I can narrow the question as well. &lt;/p&gt;&#xA;" OwnerUserId="4689" LastEditorUserId="1293" LastEditDate="2020-01-15T19:37:08.290" LastActivityDate="2020-02-07T20:33:24.330" Title="What is the CS Analog To Learning One's Multiplication Tables?" Tags="|programming|introductory-lesson|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6150" PostTypeId="2" ParentId="6149" CreationDate="2020-01-15T18:02:31.573" Score="3" Body="&lt;p&gt;There are three ideas that are fundamental. The first is &quot;sequential&quot; action. One item and then the next. The second is &quot;alternation&quot; one thing or another, but not both. The third is repetition. A thing repeated some number of times. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The last is a bit more complicated because of the two cases, definite repetition and indefinite (until something happens) repetition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you have these you have a basis. And notice I didn't say &quot;if statements&quot; and &quot;loops&quot;. Those are just ways of doing things in different paradigms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But recursion is a special case of repetition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the next level are values and expressions. Again, not variables, but values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And then, the biggest idea: abstraction. We can name things. We can name values or operations or ...&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I left out concurrency, even though it is pretty fundamental. But it is seldom studied by novices. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;And note, of course, that the &quot;three big ideas&quot; are themselves abstractions over more concrete representations that might occur in various languages. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Also, in some ways the things I mention here are more fundamental to computing than the multiplication tables are to math. For example, I can't imagine a CS graduate without a firm grounding in these. But I earned a PhD in math before I learned my multiplication tables.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-01-15T19:47:01.730" LastActivityDate="2020-01-15T19:47:01.730" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6151" PostTypeId="2" ParentId="6149" CreationDate="2020-01-16T11:09:03.020" Score="6" Body="&lt;p&gt;&quot;Analogous&quot; could mean different things, depending on which analogy you choose to make. To me, the key thing about learning multiplication tables is that you are memorising the answers to some simple questions which will appear as subproblems to many other things you have to do; so that you don't have to derive the answers again each time those subproblems occur. @Buffy's answer describes some of the fundamental abstract concepts which programmers certainly need a solid understanding of, but I would not count things like &quot;sequence&quot; and &quot;alternation&quot; as problems for which we apply solutions from memory; so I infer that @Buffy sees a different analogy to the one I do.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the analogy as I see it, there are some commonly-occurring subproblems in imperative programming which we do use memorised solutions to. I would think of @Buffy's fundamental ideas as analogous to the ability to do multiplication, and the understanding of when/why to multiply; they should be learned before it makes sense to memorise the answers to multiplication questions. Likewise, understanding what sequential, conditional and iterative statements are and when/why to use them in a program should precede memorising how to apply them to solve particular problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To give some idea of the kind of subproblems and memorised-solutions I mean, the below list is not at all complete, but should help to illustrate by example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Q: &lt;em&gt;How to iterate over just some elements of a collection?&lt;/em&gt; A: Write a loop over the collection, and an &lt;code&gt;if&lt;/code&gt; statement inside the loop to &quot;filter&quot; for just the elements you want to iterate over. The code for processing each element should go inside the &lt;code&gt;if&lt;/code&gt; statement.&lt;/li&gt;&#xA;&lt;li&gt;Q: &lt;em&gt;How to find the sum of a collection of numbers?&lt;/em&gt; A: Initialise a variable &lt;code&gt;sum = 0&lt;/code&gt;, and use a loop to do &lt;code&gt;sum += x&lt;/code&gt; for each &lt;code&gt;x&lt;/code&gt; from the collection.&lt;/li&gt;&#xA;&lt;li&gt;Q: &lt;em&gt;How to count the number of occurrences of something in a collection?&lt;/em&gt; A: Initialise a variable &lt;code&gt;count = 0&lt;/code&gt;, and write &lt;code&gt;count += 1&lt;/code&gt; each time that thing is detected to have occurred.&lt;/li&gt;&#xA;&lt;li&gt;Q: &lt;em&gt;How to find the &quot;best&quot; (maximum, minimum, etc.) thing in a collection?&lt;/em&gt; A: Initialise a variable &lt;code&gt;best&lt;/code&gt; to be the first thing from the collection, and write a loop over the remaining elements. Each time a new element &lt;code&gt;x&lt;/code&gt; is observed, check if &lt;code&gt;x&lt;/code&gt; is &quot;better&quot; than the current &lt;code&gt;best&lt;/code&gt;, and if it is, update &lt;code&gt;best = x&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;These memorised solutions to commonly-occurring subproblems are closely related to the ideas of &quot;roles of variables&quot; as described by &lt;a href=&quot;http://www.cs.joensuu.fi/~saja/var_roles/role_intro.html&quot; rel=&quot;noreferrer&quot;&gt;Sajaniemi&lt;/a&gt; and &quot;plans&quot; as described by &lt;a href=&quot;https://www.ics.uci.edu/~redmiles/inf233-FQ07/oldpapers/SollowayEhrlich.pdf&quot; rel=&quot;noreferrer&quot;&gt;Soloway &amp;amp; Ehrlich&lt;/a&gt;; I use the word &quot;plans&quot; to describe them. I'm not aware of any comprehensive list of them; I was able to think of some, which I've &lt;a href=&quot;https://dsaa.werp.site/post/algorithmic-plans/&quot; rel=&quot;noreferrer&quot;&gt;written about in Python&lt;/a&gt; and used for teaching undergraduate students (with limited success - perhaps we didn't spend long enough for the students to memorise the plans by repeated practice). I have written a similar document for Java which I don't have to hand immediately, but I can post it later if there is interest.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2020-01-16T11:09:03.020" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6152" PostTypeId="1" CreationDate="2020-01-16T19:50:48.000" Score="1" ViewCount="70" Body="&lt;p&gt;My students currently submit their code in Bitbucket and create a pull request. Bitbucket has a code review tool that allows me to create comments tied to specific lines in the code. I really like this. However, it only lets me comment on the diff, so I can only comment on code in the most recent commit. I want to be able to comment on the entire source file. Is there a tool that lets me do that in a similar fashion? &lt;/p&gt;&#xA;" OwnerUserId="623" LastEditorUserId="8651" LastEditDate="2020-01-21T13:26:11.930" LastActivityDate="2020-01-21T13:26:11.930" Title="Putting feedback comments on source code when grading" Tags="|grading|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6153" PostTypeId="2" ParentId="6152" CreationDate="2020-01-17T01:12:29.363" Score="1" Body="&lt;p&gt;The diff is between the most recent commit and the start of the branch. It's not just the diff of the last commit, it's every commit (stacked on top of each other) since the branch's origins. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that weren't the case, it'd be nigh impossible to provide meaningful feedback to a code review for a branch's pull request.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2020-01-17T01:12:29.363" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6154" PostTypeId="2" ParentId="327" CreationDate="2020-01-17T16:42:27.320" Score="1" Body="&lt;p&gt;The responses cover pretty much everything about notetaking in general. However, one thing that wasn't mentioned is the possibility of students using their laptops as an accommodation, which means that if you ban laptops, you will end up having these students who need their laptops out themselves to their peers as individuals who require accommodations. While some students are fine with it or have use cases that are a little more obvious to onlookers (e.g. someone using a captioning service), others whose use cases are discreet (notetaking) may want to keep it that way. Unfortunately, discrimination based on dis/abilities still exists--in all areas of life, but it can be especially bad among computer science students (speaking from personal experience, although I've had some amazing experiences, too), so this can't quite be just an afterthought.&lt;/p&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2020-01-17T16:42:27.320" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6155" PostTypeId="2" ParentId="2897" CreationDate="2020-01-18T14:13:56.950" Score="2" Body="&lt;h2&gt;What worked for me...&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;was working with Git. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hadn’t used any kind of version-control software when I started college (I was a teenager!). I had mostly been using MonoDevelop to program in C#, but boy were those just not interesting or good programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I had a little experience with the command line; I could &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; and the like, but nothing like the beautiful pipelines I wield today. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I got started using Git, as a freshman in CS, because I wanted to use GitHub pages and Jekyll to make a blog.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I followed some simple CLI instructions to get up and running. (I’ll link back today’s equivalent if I find it later.) Because it was just me working, I didn’t have to learn much to use Git like this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;About this time, I took a detour and start upping my command-line game, learning vim and bash, hosting my Dotfiles on GitHub (the early history is frankly embarrassing, but it’s nice to know how far I’ve come).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I was also working on class projects then. I started keeping those in Git, even just locally. Until one day I decided to put my unit tests for an assignment on GitHub to share with the class. Suddenly I had PRs and issues and I had to learn how to branch better and deal with merge conflicts, among other things to use Git effectively to collaborate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That was 2016-2017.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That was before I had a good grasp on git’s internal object database, its beautiful graph model, its immutability, what a rebase was, how to use submodules and worktrees, or any of my other day-to-day git tasks. I now use all of these things pretty regularly. &lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Recap&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;So, in a few months of just working on things I cared about, I had learnt enough to be dangerous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A few months later (especially after reading &lt;a href=&quot;https://git-scm.com/book/en/v2&quot; rel=&quot;nofollow noreferrer&quot;&gt;this excellent book&lt;/a&gt;—several times), I was a bit of a wizard. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, several years later, I’m preparing to give an intro workshop to beginners at Pearl Hacks. Unfortunately, since I don’t have time to cover the command line too, we’ll be using GitHub Desktop, but the journey will be more or less the same. We’ll cover the basics, and get them going on something they care about. And I’ll give them resources for when they’re ready to dive deeper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Passion is such a great teacher. &lt;/p&gt;&#xA;" OwnerUserId="6137" LastEditorUserId="6137" LastEditDate="2020-01-20T12:30:45.537" LastActivityDate="2020-01-20T12:30:45.537" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6156" PostTypeId="2" ParentId="6145" CreationDate="2020-01-18T21:19:54.907" Score="0" Body="&lt;p&gt;First, be clear of the learning objectives. &quot;Databases&quot; could mean many things: &#xA;1 how to use a DB, eg retailer or wholesale parts supplier;&#xA;2 how to program (in x-language) using an RDBMS as backing-store;&#xA;3 DBA training;&#xA;4 and quite likely more...&#xA;NB I am assuming RDBMS, and thus SQL (there are others!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I major in vocational training with occasional forays into the tertiary world. Thus, the first-contact is often imbued with (complexity) anxiety and possibly motivational issues (I'm only here 'cos the boss said!). Practical &quot;mastery&quot; is very much the name of the game - extensive theory is only most useful to DBAs and similar!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;1:&#xA;Unless the client dictates the tool-set, I most usually employ MySQL. It is available for many PC OpSys and relatively easy to install on an institution's network, plus free for trainees to download to their own systems. There are other choices and this is not an advert! Another factor when choosing tools is whether you wish to use something 'more' than SQL, particularly for DDL activity and ERDs. MySQL-Workbench has proven manageable, even at the user-level. Oracle offers name-brand tools which do this, and more. See also Postgres, but remember that MS-SQL may require paid-licenses and has a somewhat different approach and syntax-requirements. Over the years, (cough) decades, I've discarded 'toys'. The tool MUST reflect the trainees' (eventual) work environment (NB such does NOT apply at high schools, where concepts&gt;tools)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;2:&#xA;A sample DB is another important consideration. The data should familiar to the trainees, as well as it offering a consistent schema applicable throughout (at least) this particular course (until 'schema' becomes the learning-objective). NB without limiting the trainees from either making or finding/downloading their own! However the 'Blockbuster' example (eg the older versions of Sakila), whilst familiar to us, may not suit today's tertiary cohorts (who download movies rather than visiting a rental bricks-and-mortar store and may have never even heard of that company!).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;*&#xA;Putting the two (immediately-above) considerations together, may invite us to consider some of the on-line/cloud offerings available, should one be compatible with your technical environment (and learning objectives); because one inherits the advantages of a 'package-deal' plus the technical challenges of installation and configuration (almost) disappear! (I have no such experience, and will welcome contributions)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;3:&#xA;In the realm of presentation-aids, I've run-the-gamut. The issue of conveying information is complicated by extensive multi-table diagrams and multi-column tables requiring a high-resolution display - discounting many 'projectors'. Accordingly, these days I prefer to use a central projector for any notes, reminders, task-assignments (often coming out of an LMS), whilst slaving the students' machines to my demo-computer's screen. The multi-presentational advantages are paralleled by learners' physical movements, and thus feedback...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Cognitive Psychology:&#xA;The cognitive theory [@Flater] is indisputable. However (and with any due apologies) herewith a vehement dispute to the use of spreadsheets for 'prior knowledge' (for exactly the same cog-psy reason!). The philosophies and objectives of DBs are radically-different from those of spreadsheets. In fact, I specifically warn trainees to put such analogies out of their minds. It may 'work' at first, but... many learning-difficulties later arise from mental-map dissonance caused by over-applying such &quot;previous knowledge&quot;, instead of properly appreciating the relational paradigm. Because there is a code-then-run sequence of tasks (cf MS-Excel's type a formula, press Enter, see the answer), it seems that, in-practice, trainees rapidly appreciate even basic differences and are thus uninclined towards the analogy. Remember that even identifying a &quot;cell&quot; is different: in spreadsheets it is a column-letter and row-number combination, which is most dissimilar to SQL's select+projection algebra. (with apologies to MS-SQL users who may take advantage of the record-number facility, which is indeed a row-number even as it is not within international-standard SQL)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The basic presentation (and mental-model) of a database is exactly how we see the data presented by a command-line SQL query or a workbench tool - namely a &quot;table&quot;. Few, of any category of trainee, are ever unhappy with this. If the sample-DB includes something like a list of Person, Product, Customer, etc, then the analogy and mental 'anchor-points' are readily transferable - and readily appreciated (and accumulated) in the learning mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Approach:&#xA;Typically, my first class is either from start-of-day until tea-break, eg 0830~1000, or from then until lunch-break, eg 1025~1200. I have exactly one teaching-objective: that during that first break trainees will think, and hopefully discuss amongst themselves how much &quot;easier&quot; this is than they thought (usually with some sense of 'relief', cf anxiety)!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Accordingly, I 'slave' all student devices to mine, open the chosen tool, and demonstrate how to grab a single table and show it unadorned and unfiltered. Immediately I use terminology without first defining it, eg &quot;table&quot;, &quot;row&quot;, &quot;column&quot;. Note that this is the reverse of the old, traditional, lecture approach of requiring trainees to absorb 'the lingo' first! I may not even display definitions of these terms, because they are readily apparent (make it 'homework' to read such guff, if desired...) Next, we can move to selection and projection (still with the single table). To use the traditional lesson-plan aphorism, 'by the end of this session', trainees appreciate being able to limit which data-items (columns) are displayed/avoid 'overload' and 'distraction'; and being able to limit the 'great, long list' to a useful and usable sub-set, eg all the customers in this town, products in this range, ...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As mentioned, &quot;mastery&quot;:&#xA;Accordingly, at each of the three stages, I stop demonstrating and invite the trainees to have-a-go (on their own devices). They are given an assignment which is almost word-for-word the previous demonstration, but either using a different table/fields or even the same table but with different selection/projection criteria (depends upon topic/sample dB, etc).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;By then the time has gone, and it's an opportunity to listen to the break-chatter. Upon resuming, we have a solid base to either (depending upon your preferences/objectives) jump into some of the theory, or to extend the practical demonstration-led 'discovery' into such ideas as joining multiple-tables...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Conclusion:&#xA;Hopefully this contribution is seen as an alternative approach to those of previous responses to your question; whilst at the same time not differing too widely from your own in terms of topical-coverage (possible differences relating to slightly different course/final objectives).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards =dn&lt;/p&gt;&#xA;&#xA;&lt;p&gt;NB there is NO intent of malice towards @Flater. Learning-success comes from the trainer/mento successfully 'marrying' all of the learning factors into a working and workable 'whole'. This includes the preferences and personalities involved.  Whatever works for you/him/her/them/me/others, ie enables confident and capable 'graduates', is the right thing to do!&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2020-01-18T21:19:54.907" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6157" PostTypeId="2" ParentId="327" CreationDate="2020-01-19T15:17:43.407" Score="0" Body="&lt;p&gt;It's depend on student age and how they are knowledgeable.&#xA; firstly &#xA;if student  brain very good at writing and grasping Powers like UG graduating students you can use computer notes.&#xA;else &#xA;if they are developing fundamentals then you can use Notebooks.&lt;/p&gt;&#xA;" OwnerUserId="8830" LastActivityDate="2020-01-19T15:17:43.407" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6158" PostTypeId="1" CreationDate="2020-01-19T18:45:39.723" Score="7" ViewCount="291" Body="&lt;p&gt;How should computer science, software engineering or ICT be integrated into the Waldorf curriculum?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Steiner-Waldorf education derives from the anthroposophical philosophy of Rudolf Steiner, and places lots of emphasis on Music, Art and Craft. Students study a &quot;Main lesson&quot; in the morning, followed by specialist lessons (though the exact pattern varies from school to school). The issue of &quot;age-appropriate learning&quot; is very important.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;Yellow Book&quot; of the Waldorf curriculum mentions computing, but it is short and seems not to have been updated since the 1980s.  Anthroposophical theorists have a distrustful relationship with TVs, Computers and other devices with screens, which makes teaching computing difficult. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have any Waldorf teachers taught computing in their schools? How did you do it? &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd particularly like to know at what age should children start learning, and how should they progress in computing in the Waldorf context. and did you teach computing in the main lesson or later in the day?&lt;/p&gt;&#xA;" OwnerUserId="8831" LastActivityDate="2020-07-09T15:00:20.020" Title="Computer Science in the Waldorf curriculum" Tags="|curriculum-design|social-context|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6159" PostTypeId="1" AcceptedAnswerId="6175" CreationDate="2020-01-19T23:37:47.650" Score="1" ViewCount="134" Body="&lt;p&gt;While I'm sure that the comp-sci 101 mistake of having a triple nested loop with two recursive calls is sure to be cured by a decent comp-org class, it can have the unintended side-effect of turning students, enlightened by this hidden knowledge of registers and memory management, become obsessive about unrolling loops in trivial ways and trying to out-O3 the compiler like it's ($CURRENT_YEAR - 40).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What is the prevention to this error of learning in the course of teaching the subject? I doubt that most students will ever be in a situation where there will be a difference caused by writing something like &lt;code&gt;struct baz{char a; int z; char b;};&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8043" LastActivityDate="2020-01-29T01:15:30.903" Title="How to prevent organization/OS students from becoming premature optimizers?" Tags="|coding-style|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6160" PostTypeId="2" ParentId="2897" CreationDate="2020-01-21T07:29:24.677" Score="2" Body="&lt;p&gt;It was @Torek over at stackoverflow  who made a comment  which I believe is the nub of the problem. It went something like&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The git implementers tend to emphasize  implementation over policy&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It is the corollary to this that is hitting you and your students viz&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;git is badly documented not in the sense that documentation is absent but in the sense that&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;chockful of too many details&lt;/li&gt;&#xA;&lt;li&gt;badly ordered&lt;/li&gt;&#xA;&lt;li&gt;abstractions either absent&lt;/li&gt;&#xA;&lt;li&gt;Or leaky&lt;/li&gt;&#xA;&lt;li&gt;Poor/absent precis/for-dummies docs — you never know when you've stumbled onto an internal detail or poweruser tool&lt;/li&gt;&#xA;&lt;li&gt;All plastered over with endless fanboyism&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Case in point&lt;/p&gt;&#xA;&lt;h1&gt;Lineendings&lt;/h1&gt;&#xA;&lt;h2&gt;History Capsule&lt;/h2&gt;&#xA;&lt;p&gt;In the beginning  Linus Torvalds made cavalier  comments about the fact that git only dealt with &lt;em&gt;data&lt;/em&gt;, ie bytes, and he could not  care less about &lt;code&gt;lf&lt;/code&gt; vs &lt;code&gt;crlf&lt;/code&gt; questions.    As hindsight  showed this was terribly wrong, though it worked at the time,  for the wrong reasons — viz all the kernel devs sharing code were making the same assumptions — source code files should use &lt;code&gt;lf&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;As the net widened to Microsoft's Windows users it became clear that this was an untenable assumption; &amp;quot;Cured&amp;quot; by the hack called &lt;code&gt;autocrlf&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When git comprehensively knocked out all the other versioning competition the clunkyness of the autocrlf-hack and its epidemic consequences emerged.&#xA;Later &amp;quot;Cured&amp;quot; by &lt;code&gt;gitattributes&lt;/code&gt; replacing &lt;code&gt;autocrlf&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;No doubt &lt;code&gt;gitattributes&lt;/code&gt; is a vast improvement over &lt;code&gt;autocrlf&lt;/code&gt;, but (in by humble opinion) not nearly enough.&lt;/p&gt;&#xA;&lt;p&gt;Following I'll try and elaborate what's wrong.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/a/59644154/3700414&quot;&gt;This answer&lt;/a&gt; of mine is at a more practical level: with the current git feature-set how to work round the issues.&lt;/p&gt;&#xA;&lt;p&gt;For here I'd like to take a more hi-level view&lt;/p&gt;&#xA;&lt;h2&gt;Philosophical gaffes and Pedagogical consequences&lt;/h2&gt;&#xA;&lt;p&gt;A binary file is a sequence of bytes&lt;/p&gt;&#xA;&lt;p&gt;A text file is different.&#xA;It's a sequence of &lt;em&gt;lines&lt;/em&gt; each of which is a sequence of &lt;em&gt;char&lt;/em&gt;s&lt;/p&gt;&#xA;&lt;p&gt;That one can be serialized as the other is an irrelevancy. The relevant point is that as data-structures they are different.&lt;/p&gt;&#xA;&lt;p&gt;And so if I ask you&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Do you work on an lf or a crlf OS?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The most reasonable (and polite) answer you can respond with is&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That's none of your business&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In the same way that&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What is the color of your shirt (or skin)?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;is answered.&lt;/p&gt;&#xA;&lt;p&gt;JFTR the number of possibilities is endlessly larger than {lf, crlf, cr}. Consider pasting a text file into a code block here on stackexchange. It's entirely conceivable that all lineendings transmogrify into &amp;lt;br/&amp;gt;s and actually disappear!&lt;/p&gt;&#xA;&lt;p&gt;And in all these cases questions about this are best handled with&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;not your business&lt;/li&gt;&#xA;&lt;li&gt;not relevant&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Not_even_wrong&quot; rel=&quot;nofollow noreferrer&quot;&gt;not even wrong&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Instead...&lt;/p&gt;&#xA;&lt;h1&gt;Git does it wrong all over&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Messages such as &lt;code&gt;lf will be replaced by crlf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Documentation that is clunky and unabstract  eg &lt;code&gt;git stores text as lf&lt;/code&gt;. Why is this anyone's business (other than git plumbing implementer's?) Following from&lt;/li&gt;&#xA;&lt;li&gt;Abstractions that leak all over. Eg discussions in terms of lf/crlf files rather than nix-text Vs windows-text. All resulting in...&lt;/li&gt;&#xA;&lt;li&gt;Erroring out too late at the wrong time and place. Eg safecrlf true only by intention not by default.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Suggestions&lt;/h1&gt;&#xA;&lt;p&gt;If you want a lightweight graduated introduction to version control you can consider&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Revision_Control_System&quot; rel=&quot;nofollow noreferrer&quot;&gt;RCS&lt;/a&gt; (*nix only)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fossil_(software)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fossil&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;etc&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Not suggestions I make too willingly : git has comprehensively won the version-war and avoiding it is just postponing.&lt;/p&gt;&#xA;&lt;p&gt;So if we realize that we must willy-nilly bite the bullet, the other answers here do a better job than I can.&lt;/p&gt;&#xA;&lt;p&gt;All I'll say is not too constructive: the &lt;em&gt;docs&lt;/em&gt; are the problem more than the &lt;em&gt;design&lt;/em&gt;. Concentrate there.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Added later&lt;/h2&gt;&#xA;&lt;p&gt;I just &lt;a href=&quot;https://stackoverflow.com/questions/73009368/getting-the-warning-message-in-the-working-copy-of-file-path-crlf-will-be-re#comment128952688_73009368&quot;&gt;discovered&lt;/a&gt; the hilarious fact that the old message &lt;code&gt;LF will be replaced by CRLF&lt;/code&gt; is now flipped to &lt;code&gt;CRLF will be replaced by LF&lt;/code&gt; &lt;strong&gt;for the same problem!!&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Does this mean the git-devs themselves are confused? Not at all — the surrounding text is suitably changed in older and newer version. What it does mean (IMHO) is that the level of abstraction for communications between the git system and vanilla users is quite impaired. It should not be talking verbs — replaced — but nouns — Windows/*nix files... as vi, emacs and any decent editor does.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-08-10T04:53:06.950" LastActivityDate="2022-08-10T04:53:06.950" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6161" PostTypeId="2" ParentId="6159" CreationDate="2020-01-21T13:39:30.507" Score="2" Body="&lt;p&gt;I'm honestly not that I would address this problem at all within my own courses, but if it is to be faced, I suspect that the solution would be something like this:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Immerse students in their current layer.&lt;/li&gt;&#xA;&lt;li&gt;Really teach the metaphor and thought-process of the layer that they are currently in, and only accept code that utilizes that model of thinking.&lt;/li&gt;&#xA;&lt;li&gt;Warn students about the dangers of premature optimizing&lt;/li&gt;&#xA;&lt;li&gt;Show students how to use a profiler in order to figure out what is actually slowing their code down.  Tell students to address their efforts here.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-01-21T18:37:26.967" LastActivityDate="2020-01-21T18:37:26.967" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6162" PostTypeId="2" ParentId="6159" CreationDate="2020-01-22T01:35:17.083" Score="2" Body="&lt;p&gt;It might be helpful to use a tool such as &lt;a href=&quot;https://godbolt.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Compiler Explorer&lt;/a&gt;. It allows one to put side by side C code and its compiled version. It can be used to show that the compiler often generates the same assembly code for the &quot;naive&quot; code and the hand &quot;optimized&quot; one. It also supports compiler flags, so you could use it to show the difference between unoptimized code and &lt;code&gt;-O3&lt;/code&gt;. &lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2020-01-22T01:35:17.083" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6163" PostTypeId="1" CreationDate="2020-01-22T08:59:51.607" Score="0" ViewCount="182" Body="&lt;p&gt;Today I wanted implement a deep learning model in openvino. So I went to the page here and started reading. After starting the reading, I struggle to understand things and started to deviate a lot from my objective. For example:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Speeds time-to-market via an easy-to-use library of computer vision&#xA;functions and pre-optimized kernels&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;what are pre-optimized kernels?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Includes optimized calls for computer vision standards including OpenCV*, OpenCL™, and OpenVX*.&#xA;What are optimised calls?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Intel® Media SDK  Offers access to hardware accelerated video codecs&#xA;and frame processing&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;what is SDK?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A set of simple console applications demonstrating how to use the&#xA;Inference Engine in your applications&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;what is console appplications,inference engine?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I am not a CS graduate. What can I do to improve, should I take a CS curriculum? Sometimes I exactly don't understand certain things, but I proceed with a rough idea. Am I trying to understand in detail here? I don't know, because I am perfectionist. Else what can I do to improve?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: The  &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5312/how-can-i-improve-my-understanding-in-computer-science&quot;&gt;related answer&lt;/a&gt; is quite good. But I wanted to know, how to approach a concept where we need to understand the theory. Sometimes you may need to understand what is happening behind it before implementing it. What can one do in such cases?&lt;/p&gt;&#xA;" OwnerUserId="6345" LastEditorUserId="204" LastEditDate="2020-07-31T16:35:59.583" LastActivityDate="2020-07-31T16:35:59.583" Title="I struggle to understand technical things in cs? What can I do to improve?" Tags="|self-learning|struggling-students|" AnswerCount="1" CommentCount="1" ClosedDate="2020-01-22T14:15:12.003" ContentLicense="CC BY-SA 4.0" />
  <row Id="6164" PostTypeId="2" ParentId="6163" CreationDate="2020-01-22T11:51:33.530" Score="2" Body="&lt;p&gt;Here are two pianists&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=_bjKDJD-CLc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lovely lady 1&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://youtu.be/LhInwkq4nAw&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lovely lady 2&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Do you realize no 2 was once no 1?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's an &lt;a href=&quot;https://youtu.be/FapaI1bxH2s&quot; rel=&quot;nofollow noreferrer&quot;&gt;In between  stage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To get a handle on the issue you need &#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Outliers_(book)&quot; rel=&quot;nofollow noreferrer&quot;&gt;ten thousand hour rule&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can reduce 10,000 hours to 1000 hours and go from world class to normal professional. Perhaps 1000 to 100 and go from professional to modestly proficient.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But even@100 that's about classroom time of two typical university courses. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Put another way musical proficiency takes about 10-15 years of work, medical 5-10.&#xA;Computer/software takes 3-4. Maybe you can reduce 3 to 1. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you put in that 1 gruelling year of work? &lt;/p&gt;&#xA;" OwnerUserId="8837" LastActivityDate="2020-01-22T11:51:33.530" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6168" PostTypeId="1" CreationDate="2020-01-24T00:31:17.227" Score="1" ViewCount="132" Body="&lt;p&gt;I may tutor a student who just started learning &quot;school C&quot;, by which I mean that strange kind of C seen only on school books (and that in my opinion &quot;cripples the mind&quot;, so to say, but I digress). I need to quickly understand her misconceptions, as she is saying that she has many doubts, she says &quot;the char function&quot;, &quot;the for function&quot;, &quot;no idea what ++ is&quot; and the like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;She looks brilliant nonetheless, besides having great confusion on cs things (and a decreasing engagement of course), therefore I'd prefer a very direct and practical way of getting to her errors, not spending a lot of time repeating concepts that might bore her. I'm quite good at understanding my pupils' mind maps given their answers and fix them but not so good at creating questions/problems that pose the right challenges and let the misconceptions provoke errors in their solutions, mostly because it all seems too simple to me whereas it looks like many students find this topic complex. The only thing that comes to my mind is generating a lot of situations hoping to see her wrong somewhere, clearly not a systematic approach.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let's say, in our terms, that I don't know well how to identify the corner cases that I ought to be testing and I feel like risking to follow only the happy paths of her thought processes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, I read somewhere that a common misconception is to think that given something like &lt;code&gt;while (relation) { ... }&lt;/code&gt; then the student thinks that whenever the relation becomes false something happens (break? I don't know), anywhere in the midst of the block. (I have a compelling feeling of why this specific case might happen).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What are, from your experience (hoping not to make the question too subjective), or from literature, the most common misconceptions and false beliefs that beginning students have? What problems can I give her to extract the most errors?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think both reading and writing problems, from tracing the execution to fizzbuzz or rainfall style, are there other important exercise types that I shouldn't forget? Anything without code?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sorry if the question seems boring, I looked for examples a lot, found only a few articles but not really satisfying. Seems that I couldn't find a good catalog of misconceptions and relative inquire methods.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2020-01-24T15:35:59.883" Title="Which are common misconceptions about code execution? How to efficiently debug my student?" Tags="|exercises|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6169" PostTypeId="2" ParentId="6168" CreationDate="2020-01-24T15:26:22.203" Score="1" Body="&lt;p&gt;I may add to this as ideas occur to me, but here is a starter version. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't state the general academic level of the student, so I'll assume secondary school or beginning university. The student has studied Algebra at least and has some background in math. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second really big misconception is that a program is just like math. In particular, in C, the misconception that a statement like&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;x = y + 1;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;is an equation to be solved, rather than an operation to be performed. But this is based on the first misconception that a &quot;variable&quot; in algebra is the same sort of thing as a &quot;variable&quot; in programming (in C like languages). In fact, in algebra, a variable doesn't &lt;em&gt;vary&lt;/em&gt;, it is a fixed but possibly undetermined value. In C, the value can vary. In algebra, the above represents a relationship. In programming it is an operation. So, first, solve those two possible misconceptions with examples, exercises, and explanations as necessary. Once you do that &lt;code&gt;++y&lt;/code&gt; makes some sense as an operation. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third big misconception is just that a computer executes an &lt;em&gt;algorithm&lt;/em&gt;, which is a &lt;em&gt;sequential&lt;/em&gt; execution of defined steps. The program counter, PC, keeps track of the &quot;current state&quot; of the algorithm. In the while loop, the test only gets executed when the PC comes to it in an unrolling of the loop into a sequence of operations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My personal preference is to teach &quot;variables&quot; as &quot;references to values&quot; not as contents of memory locations. So &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;x = 5;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;means that &lt;code&gt;x&lt;/code&gt; refers to 5, not that it &lt;em&gt;is&lt;/em&gt; 5. Then you avoid the problem that if the next statement is &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;x = x + 1;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;that the student thinks that five has magically become six. It is just that now &lt;code&gt;x&lt;/code&gt; refers to a different value. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Caveats. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I'm assuming C-like languages. In lisp-like languages algebra variables and lisp &quot;variables&quot; are actually the same - undetermined/unspecified but immutable values. Also in Fortran IV, you could actually make five magically turn into six. History lesson there, though. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, of course, modern high performance computers aren't strictly sequential anymore, with speculative execution at branch points. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In fact, with a bit of finesse you can discuss a C program with no reference to any actual machine at all. It defines an algorithm. Full Stop. The finesse part is just about the PC mentioned earlier. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-01-24T15:35:59.883" LastActivityDate="2020-01-24T15:35:59.883" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6170" PostTypeId="1" CreationDate="2020-01-26T01:31:55.037" Score="1" ViewCount="219" Body="&lt;p&gt;I have to teach CT to Standard 5 students (11 to 13 yrs). To explain the concept, I am trying to explain to them how CT is beneficial in today's world. The way I learn and appreciate things is by comparison. So I would like to see an example problem which is solved first using a trivial method (without thinking about CT, but still using a computer), and then applying CT. Ultimately which one is better in certain terms can be analyzed and evaluated. The appreciation will be better this way. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While I can see many examples of CT being applied, but I could not find a side by side comparison. If you know any resource that has exactly this thing, please point me to that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="8654" LastEditorUserId="8651" LastEditDate="2020-01-28T15:14:07.617" LastActivityDate="2020-01-28T15:14:07.617" Title="An example that compares a computational with a non-computational thinking approach" Tags="|computational-thinking|code-example|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6171" PostTypeId="2" ParentId="2651" CreationDate="2020-01-26T18:29:22.123" Score="1" Body="&lt;p&gt;There is no &quot;limitation&quot; or &quot;tradeoff&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is, we express ideas at a given level of abstraction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The &quot;forall&quot; is for ranging over the values in a collection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The for(int i = 0; i &amp;lt; n; i++) etc is for ranging over numbers, that sometimes happen to be the valid indices in some array. Quite a different matter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use the appropriate level of abstraction. The for loop is not a limitation over the while loop, or goto+if constructs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Edit: actually some colleagues don't want to teach the foreach, because it comes with a break when you want to leave it before its natural end, which happens rather frequently.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, you know, break is somehow like goto, which is considered awful and definitely forbidden. Burn these heretics and their for each loop!&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2020-01-27T06:21:00.863" LastActivityDate="2020-01-27T06:21:00.863" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6172" PostTypeId="2" ParentId="6170" CreationDate="2020-01-27T13:44:40.040" Score="3" Body="&lt;p&gt;I think you have a misunderstanding about something, but I can't say precisely what. You seem to really be asking for two different sorts of CT, not CT vs something else. Both math and CS require some facility in CT and, thus, CT is a prerequisite, whether taught explicitly or learned on one's own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if a student can provide a &quot;trivial&quot; solution to a programming question then they are already engaged in computational thinking. So no &quot;example&quot; is likely to be very powerful in extending their thinking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But CT is much broader than that and is a skill that people need in general, not just for computing. You need it at the market to pay for things and check that you get the right change (or, you did before electronic payments became ubiquitous). But thinking in terms of orders of magnitude, at least is useful even when reading the newspaper about scientific discovery and maybe even politics. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let me suggest a couple of things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you students seem to be weak in CT, then teach that &lt;em&gt;prior&lt;/em&gt; to getting in to the details of programming, which has its own pitfalls. Use something like &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; if you want something directly connected to computing, or a more general approach. If they are already strong in such things, there may not be any need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second, independent of the strength of the student background, use a lot of metaphor in introducing new concepts rather than being pedantic about the details of programming. Use &quot;real life&quot; examples of the concepts so that students &quot;get an idea&quot; first about some important topic. But, always be aware that metaphors have limits and they can give the wrong idea about things. So, be ready to dispel those misconceptions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;An example is &quot;search for the &lt;em&gt;reddest apple&lt;/em&gt;&quot;. This might be useful as a metaphor, unless you can see all of the apples at once and use powerful visual cues that don't have an analog in computing, where things need to be looked at one or two at a time. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-01-27T13:44:40.040" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6175" PostTypeId="2" ParentId="6159" CreationDate="2020-01-29T01:15:30.903" Score="2" Body="&lt;p&gt;The way that everyone generally learns this lesson is to spend a significant amount of time tracking down an efficiency issue that is nowhere near where you expected it to be. I'm not sure there's another way to really learn the lesson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As an example, here's an exercise which illustrates the problem:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Write an implementation of an open-addressing hash table set. The keys are 64-bit integers. There are two operations: initialise, and &quot;add an element if it doesn't exist, return a boolean which says if it was already there&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Use a prime-sized table, and make sure it grows if it gets too full (e.g. require that it start modest-size and grows if the length of a collision chain is greater than some constant). The hash function should be specified to eliminate that as a variable, but of course students are free to implement it however they like.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The exercise is to write it and test it for correctness as well as you can, doing all the optimisations that you can think of, do all the timings you want, but don't actually profile it yet.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Give your best guess as to where the biggest remaining bottleneck is. Now use instruction-level profiling to find out where it actually is.&lt;/p&gt;&#xA;" OwnerUserId="8855" LastActivityDate="2020-01-29T01:15:30.903" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6177" PostTypeId="2" ParentId="5617" CreationDate="2020-01-30T19:34:13.863" Score="2" Body="&lt;p&gt;I have been fighting this for 30 years without a true solution.  I think it is human nature to take the shortest way and if that involves copying code the students will do it.  I teach at a high school and my classes are small enough to actually see the kids code so I have less issue with this than those teachers with large classes or classes where the students do all their coding outside class (university classes).  Some students like the challenge coding presents and will do their own work.  Others are not into challenges and will be perfectly happy with copying.  Solutions?  Slightly unique assignments, tests on code understanding, and short live coding quizzes.  Some are practical, some only kind of work.  Good luck.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2020-01-30T19:34:13.863" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6180" PostTypeId="2" ParentId="4528" CreationDate="2020-02-07T19:23:29.353" Score="1" Body="&lt;p&gt;I am looking between doing a free wix or weebly site for my students or even a youtube channel with updated examples of work in a slideshow format. But companies do not only want to see finished work. I do a lot of work with Savannah College of Art and Design, as my high school career academy is just down the road. They have had several design students get hired not from their finished work but from their working portfolio look books/ and process books. Many companies are requesting at least one complete process for a project so they can see not just what a person can create, but how the designer thinks and processes their work. Companies that have hired from a process book are Coca-Cola, Google and a few others that I can't remember off the top of my head. But generally you don't want to put every single thing you have completed, but you want a wide variety of work. College applications for university design programs are generally the same. &lt;/p&gt;&#xA;" OwnerUserId="8876" LastActivityDate="2020-02-07T19:23:29.353" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6181" PostTypeId="2" ParentId="6149" CreationDate="2020-02-07T19:28:12.517" Score="3" Body="&lt;p&gt;@kaya3 answer is wonderful. I view the questions listed as things that I must be able to do by rote. When I see a particular problem, I can write the skeleton of the code without thought. The pattern is so ingrained that its use is mechanical.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the current environment we have access to all kinds of libraries for different data structures. We no longer need to be able to build them from scratch, but we still need to understand which data structure matches our needs the best and the implications in choosing that particular implementation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thirty years ago (longer ?) I would have said the ability to produce the basic data structures (array based, linked list - single/double/circular, trees - and how to traverse them, hash tables - handling collisions, ...) should all be rote code patterns. Now the rote knowledge is knowing which to pick, and the implications of the choice.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These are a few more that came to mind:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Q: How to swap the values of two variables? A: Use a temp variable&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Q: How to find the unique elements of a collection? A: Start with an empty collection answer and add elements only when the value is not present. How do you make this efficient?&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Q: How to implement findFirst()/findLast() and handling &quot;not found&quot;? A: Understand which data structure(s) might make this easy/hard and select a &quot;not found&quot; strategy.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Q: How do you do X? A: Learn to construct good Google queries and when you find something that provides useful information, and include the link in your work so you can find it again!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Q: I've found something that may help me do what I need to do. How do I incorporate it in my code? A: Write a &lt;strong&gt;small&lt;/strong&gt; test program containing the code, test it and really understand what it does. &lt;strong&gt;Then&lt;/strong&gt; merge it into your code.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2020-02-07T20:33:24.330" LastActivityDate="2020-02-07T20:33:24.330" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6182" PostTypeId="2" ParentId="4922" CreationDate="2020-02-08T05:34:25.837" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;The difference between a programmer and a designer is that that the programmer says «This or that» the designer says «This and that»&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Your question is v pertinent to our times because of the plethora of media available and the paucity of hard data on their relative advantages.&lt;/p&gt;&#xA;&lt;p&gt;Hence an &lt;em&gt;and&lt;/em&gt; is better than an &lt;em&gt;or&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Importance of Media&lt;/h2&gt;&#xA;&lt;p&gt;Anecdote&lt;/p&gt;&#xA;&lt;p&gt;I was having trouble getting responses from my class ...&lt;/p&gt;&#xA;&lt;p&gt;Me: Do you just not read mail?&lt;br /&gt;&#xA;Class: (deafening silence)&lt;br /&gt;&#xA;Me: Will facebook be better than email?&lt;br /&gt;&#xA;Class: (silence but less deafening)&lt;br /&gt;&#xA;Me: So what works for you folks?&lt;br /&gt;&#xA;(after much cajoling)&lt;br /&gt;&#xA;Class: Whatsapp!&lt;/p&gt;&#xA;&lt;p&gt;So then I started sending mails &lt;strong&gt;primed&lt;/strong&gt; by a whatsapp. And put at end communication problems!&lt;/p&gt;&#xA;&lt;p&gt;Later I stopped using something as dinosaurial as mail(!!) and keep all actual material in google-class/github... Always initiated by whatsapp!&lt;/p&gt;&#xA;&lt;h2&gt;Moral?&lt;/h2&gt;&#xA;&lt;p&gt;You likely lose a large section of your potential audience by simply choosing a medium other than youtube.&lt;/p&gt;&#xA;&lt;p&gt;Nevertheless all the responses praising dense text over audio-visual is v valid.  Hence I'd say : Use both&lt;/p&gt;&#xA;&lt;p&gt;In fact I'd suggest 3-way bidirectionally linked:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Lectures on youtube&lt;/li&gt;&#xA;&lt;li&gt;Indexed presentations of above&lt;/li&gt;&#xA;&lt;li&gt;Code on github with Readmes/comments pointing to above two&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Notes&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Maybe jsfiddle better than github??&lt;/li&gt;&#xA;&lt;li&gt;I prefer light-weight emacs+orgmode to MS/Libre presentation. But I'm old!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-02-08T09:51:00.977" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6183" PostTypeId="1" AcceptedAnswerId="6186" CreationDate="2020-02-09T20:58:52.380" Score="2" ViewCount="90" Body="&lt;p&gt;I have a class of 25 students. We want to learn programming robots using a blockly-type programming language. I would prefer having a robot for every student or at least one per every two students. Price is a concern. I would like to spend about max $50 per student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am mostly working with middle-school kids (7th and 8th grades). Most have never worked with robots nor have they programmed in any language (including blockly).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Does anyone have any recommendations?&lt;/p&gt;&#xA;" OwnerUserId="8882" LastEditorUserId="27" LastEditDate="2020-02-11T17:42:23.573" LastActivityDate="2021-05-03T14:57:58.740" Title="Robotics Recommendations" Tags="|block-based-programming|robotics|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6184" PostTypeId="1" CreationDate="2020-02-10T02:41:56.723" Score="1" ViewCount="58" Body="&lt;p&gt;I will be tabling at a high school career fair and would like to have printed fliers about careers involving computer science. Does anyone know where I can find ones that are free (either to print or have sent to me)?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-03-06T20:19:31.167" Title="Suggested fliers for high school career fair?" Tags="|student-motivation|secondary-education|careers|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6185" PostTypeId="2" ParentId="2897" CreationDate="2020-02-10T15:46:38.443" Score="1" Body="&lt;p&gt;I'll start by echoing the fantastic resource in FallenNode's answer (&lt;a href=&quot;https://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://learngitbranching.js.org/&lt;/a&gt;) which visualizes git very well and game-ifies the learning experience.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also recommend: &lt;a href=&quot;http://git-school.github.io/visualizing-git/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://git-school.github.io/visualizing-git/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's an open sandbox tool for visualizing various sequences of git commands, including situations with remote repositories.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll add one more tutorial resource that is not visual, but pretty good for learning the basics of remote git work: &lt;a href=&quot;https://github.com/jlord/git-it-electron&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/jlord/git-it-electron&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Download installation binaries at: &lt;a href=&quot;https://github.com/jlord/git-it-electron/releases&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/jlord/git-it-electron/releases&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2020-02-10T15:46:38.443" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6186" PostTypeId="2" ParentId="6183" CreationDate="2020-02-11T17:26:33.140" Score="3" Body="&lt;p&gt;Take a look at the Edison Programmable V2.0 Robot. (&lt;a href=&quot;https://www.robotshop.com/en/edison-programmable-v20-robot.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.robotshop.com/en/edison-programmable-v20-robot.html&lt;/a&gt;)  Available from Amazon.  Also Makeblock mBot Robot Kit (Amazon.com)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have read some articles about the Edison be used in school successfully.  The Makeblock I just saw on Amazon.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2020-02-11T17:26:33.140" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6187" PostTypeId="1" CreationDate="2020-02-14T13:09:12.173" Score="5" ViewCount="135" Body="&lt;p&gt;I am a mathematician who has done programming in Python, Java, and R. I would like to learn to make neural networks and artificial intelligence. Are there any good books for self learning AI for a person like me who loves learning theory behind neural networks, and who can learn by proving theorems and thinking the theory behind AI? When I just read Tensorflow's or Keras's documentation, I found that I couldn't understand how the networks work.&lt;/p&gt;&#xA;" OwnerUserId="8891" LastEditorUserId="204" LastEditDate="2020-02-15T21:16:43.697" LastActivityDate="2020-03-24T10:04:09.857" Title="Learning suggestions for AI and neural networks for a mathematician" Tags="|self-learning|resource-request|artificial-intelligence|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6188" PostTypeId="1" CreationDate="2020-02-15T08:27:09.750" Score="1" ViewCount="103" Body="&lt;p&gt;I am sorry if this is not the right place to ask this, but I would really like to know.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have finished a computer programming bootcamp and found I took to programming deeply. Some of my course mates have found jobs which are not 'junior developer' jobs (i.e. jobs which focus heavily on feature building, rather than on QA, etc...).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would like to take the course of maximum learning, so is doing a typical junior developer job an important stepping stone on the way to being a great developer? The bootcamp did not teach TDD, so perhaps a 'junior' pathway is a sensible one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Thank you for any thoughts.&lt;/p&gt;&#xA;" OwnerUserId="8894" LastActivityDate="2020-02-16T18:50:05.137" Title="Should I start out as a “junior developer”?" Tags="|careers|" AnswerCount="2" CommentCount="4" ClosedDate="2020-02-19T18:01:25.677" ContentLicense="CC BY-SA 4.0" />
  <row Id="6189" PostTypeId="2" ParentId="6188" CreationDate="2020-02-15T11:46:57.867" Score="1" Body="&lt;p&gt;Yes you need to start at the bottom. Find somewhere where you will get good experience. Also practice at home. Do coding katas, use revision control, practice test-driven-development, use &lt;a href=&quot;https://en.wikipedia.org/wiki/Transformation_Priority_Premise&quot; rel=&quot;nofollow noreferrer&quot;&gt;transformation priority&lt;/a&gt;, study functional programming, learn the history of programming (much of the best stuff was invented in the 1960s), study user interaction design. (just don't do it all at the same time, you have a life-time to do it in.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However note that most developers have less that 5 years experience, because of exponential (this word is being used correctly here) growth in number of developers, with a doubling rate of 5 years. Therefore you should expect to change to a more senior role soon.  &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-02-15T11:46:57.867" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6190" PostTypeId="2" ParentId="6188" CreationDate="2020-02-16T18:50:05.137" Score="2" Body="&lt;p&gt;Feature building is a junior developer job. It's also a senior developer job. Feature building is part of any developers job.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;QA is testing of those features. If you become a QA specialist you won't be developing features at all. You also won't be using TDD. TDD comes before the code under test. Not after.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;QA testers come in two types: &lt;a href=&quot;https://sqa.stackexchange.com/a/27737/17901&quot;&gt;manual testers&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Test_automation&quot; rel=&quot;nofollow noreferrer&quot;&gt;automation testers&lt;/a&gt;.  Automation testers are often feature developers as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If someones convinced you that newbies must start in QA they've feeding you crap and I wouldn't want to work there. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some shops don't even have QA roles because the developers test the crap out of their own stuff and then hand it to a peer to test it again with fresh eyes. Some do all that and then still hand it to a QA group who spend all day doing nothing but gleefully breaking software.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;QA is a speciality in and of itself. It's a mindset as much as it's ever a job title.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But QA is not where newbies need to start and it's not a dumping ground for sub par developers. QA is where you put your best or it's not QA.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At the end of the day, a junior developer is just someone who might learn a thing or two from a senior developer. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for the career advice find people doing these jobs and ask them what their day is like. That will tell you what you're likely to learn in those roles.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastActivityDate="2020-02-16T18:50:05.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6191" PostTypeId="2" ParentId="6122" CreationDate="2020-02-16T22:40:02.280" Score="1" Body="&lt;p&gt;One type of assessment might be to focus on the key differences between their previous knowledge and the new programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One key difference of C from Python is that C natively deals with a finite linear addressable memory.  So one might test a students knowledge of that linearity (arithmetic on pointers and the potential for memory corruption), and finiteness (give them an algorithm that would explode in memory usage without GC, and have them fix it for use with a finite memory and no built-in GC).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are other key difference that might or might not be as important or more important for you purposes.  Test as appropriate.&lt;/p&gt;&#xA;" OwnerUserId="59" LastActivityDate="2020-02-16T22:40:02.280" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6192" PostTypeId="2" ParentId="6092" CreationDate="2020-02-16T22:52:12.193" Score="2" Body="&lt;p&gt;A key difference with stackoverflow vs. private mentoring is that one doesn't need to be invested in any particular person's understanding.  If the OP doesn't get it, marks my answer down, upvotes or checkmarks an answer I consider incorrect, no problem for me.  Maybe some other random person(s) will find my answer useful. Or useless. About which I may never find out.&lt;/p&gt;&#xA;&lt;p&gt;With individual mentoring, there is a more personal feedback loop: one must try to actually figure out what's wrong with the students brain that keeps them from understanding (or my own brain that makes my explanation incomprehensible).  Those may or may not be possible.  But if one succeeds, especially after some effort, the result can create a positive emotional experience.&lt;/p&gt;&#xA;" OwnerUserId="59" LastEditorUserId="59" LastEditDate="2020-11-09T02:19:48.783" LastActivityDate="2020-11-09T02:19:48.783" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6193" PostTypeId="1" AcceptedAnswerId="6198" CreationDate="2020-02-18T16:04:49.663" Score="8" ViewCount="8241" Body="&lt;p&gt;I am looking to get into a software engineer role and I need some fundamental knowledge of Computer Science Engineering concepts. Will David Milan's basic Computer Science course from Harvard, &lt;a href=&quot;https://online-learning.harvard.edu/course/cs50-introduction-computer-science/&quot; rel=&quot;noreferrer&quot;&gt;CS50x&lt;/a&gt;, be enough to accomplish this?&lt;/p&gt;&#xA;" OwnerUserId="5482" LastEditorUserId="27" LastEditDate="2020-02-19T16:18:59.673" LastActivityDate="2020-02-19T18:00:02.607" Title="Is the CS50x course enough to get the generic knowledge of a CS grad?" Tags="|self-learning|curriculum-review|curriculum|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6194" PostTypeId="2" ParentId="6193" CreationDate="2020-02-18T18:14:30.063" Score="8" Body="&lt;p&gt;The purpose of an introductory course is threefold:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;To lay out the field, and give the student a sense of what that field involves and entails.&lt;/li&gt;&#xA;&lt;li&gt;To provide the fundamental background knowledge one would need to proceed further into the field.&lt;/li&gt;&#xA;&lt;li&gt;To help students figure out whether this is a field they should pursue further.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I have only a passing familiarity with the CS50x courses, so someone with more intimate knowledge me jump into correct me, but my impression is that these courses focus mostly on goal number two.  Goal number 1 is laudatory, but the truth is that the field is so broad, it would be impossible to do justice to even a small subset of the fields of knowledge within computer science and computer engineering in an introductory course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That's not to say that it would be a bad idea to go through this course if you're looking to change fields. There's a reason that this material has been created as an introduction. This is fundamental knowledge that you'll need in order to learn more advanced concepts, and you will likely not have much success without approaching these fundamentals (whether in CS50 or elsewhere).  But don't expect that the course alone will put you in good stead all by itself. More likely, it will simply help you get set up to learn further.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-02-18T18:14:30.063" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6195" PostTypeId="2" ParentId="6193" CreationDate="2020-02-18T18:34:30.187" Score="6" Body="&lt;p&gt;The course is broad and it is short. It is no more than an introduction. It would, I think, give you an idea about whether this is a good path for you to take. But it won't carry you very far along the path. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's breadth precludes much depth. Several languages are discussed. Several core ideas, from algorithmic thinking to data structures. It is, of course, that breadth that makes it valuable as a first course, as you get to look at a lot of things that will be developed more completely in courses that follow this one. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, a deep knowledge of all that and more is needed for a career. It is a worthwhile thing to do as a starter, but expect to need more. If it is successful, then you will wind up &lt;em&gt;wanting&lt;/em&gt; more, actually. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And don't expect it to be easy, assuming you want to learn much from it. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note also that an undergraduate &quot;major&quot; in CS in the US is normally 15 or more CS courses (in addition to math, etc), of which this would be the first. You probably don't need all of that knowledge from 15 courses, but they are what forms the &quot;foundation&quot;. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-02-19T13:12:28.613" LastActivityDate="2020-02-19T13:12:28.613" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6196" PostTypeId="2" ParentId="213" CreationDate="2020-02-18T22:52:07.337" Score="1" Body="&lt;p&gt;Some train stations (but not many) have a platform 0:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=SPQRNmXVP8s&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=SPQRNmXVP8s&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you are lucky enough to live in one of these towns, then it may be a very good example.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-02-18T22:52:07.337" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6197" PostTypeId="2" ParentId="6193" CreationDate="2020-02-19T08:25:41.647" Score="3" Body="&lt;p&gt;Starting with CS50 is good, but it's just a beginning.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm a newbie in programming, and I started learning it with many sources including CS50.&#xA;(As far as I know, CS50x is almost the same as CS50. if it's not, please comment me. CS50 is Harvard's computer science course for very beginners.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;CS50 is a very good course for a beginner, especially if you wanna grab the whole picture of programming but not going deeper too much.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It starts with learning C, so you can learn the basic concepts of memory address and pointer. And it covers modern languages such as Python(of course only basics though), and also you'll even learn some simple web development.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, if you're a beginner and don't know what to learn first, then CS50 is a good way to go.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But I think you should dig much more to get some knowledge of CS undergrad. In CS undergrad, you learn algorithms, data structures, networks, operating systems, computer structures, etc. These are very very important if you wanna become a high-level software engineer.&lt;/p&gt;&#xA;" OwnerUserId="8906" LastEditorUserId="27" LastEditDate="2020-02-19T13:09:02.563" LastActivityDate="2020-02-19T13:09:02.563" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6198" PostTypeId="2" ParentId="6193" CreationDate="2020-02-19T08:32:53.107" Score="14" Body="&lt;p&gt;No, not by a long shot, although Harvard's CS50x is an excellent introduction which provides around 10 hours of lectures then problem sets which support approximately 100 hours of practice at programming by solving Computer Science problems (not quite the same as software engineering problems).    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most typical entry-level software engineers (regardless of their background) will likely have spent several thousand hours learning their craft by the time they start their first job (Something roughly equivalent to the amount of time a typical graduate may have had after 3 years at university). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This obviously includes programming and core computer science concepts, but most importantly it involves having hands-on exposure to building some working software (Which is about far more than just writing code -- actually, writing code is only a small part of the total amount of work which goes into building working software).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While it's certainly true that Software Engineering is rooted in Computer Science, and computational thinking skills are an essential prerequisite, that capability is nowhere near enough on its own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Generally speaking, most software engineering problems also have a degree of subjectivity built on top of that - i.e. they go beyond just needing to find solutions based on logic;  most of the problems faced by software engineers are more about humanity - meaning that the vast majority of issues involved in building software can't be solved just by writing an algorithm. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Just to provide a few examples - this list is neither complete nor comprehensive, but hopefully illustrates the kinds of things that are learned through hands-on experience of working on software projects (even spare-time hobby projects and open-source software):&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Requirements gathering and analysis&lt;/li&gt;&#xA;&lt;li&gt;Software design principles and approaches to software design (e.g. consideration towards interfaces, modularity, and automated testing)&lt;/li&gt;&#xA;&lt;li&gt;Pragmatism and consideration towards real-world constraints (e.g.  people's time, or their willingness to accept change, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Communication, knowledge-sharing and collaboration with other developers (e.g. peer reviews, pairing)&lt;/li&gt;&#xA;&lt;li&gt;UI/UX Design&lt;/li&gt;&#xA;&lt;li&gt;Communication with users and stakeholders, including managing their expectations and seeking their feedback. &lt;/li&gt;&#xA;&lt;li&gt;Teamwork and being able to function within processes and procedures that allow many people to contribute to the same project/codebase.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;On top of that, there's also the fact that software engineering often tends not to be about using code to solve every problem but to include a lot of effort reusing other people's existing/working/tested solutions to avoid re-inventing the wheel (For example, &quot;devops&quot; tools, app frameworks, cloud services, 3rd-party libraries, O/S capabilities etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This often includes trying out tools/libraries/frameworks to check their capabilities, then figuring out how to integrate your code with those things (e.g. through programmatic APIs, configuration management, build/integration/deployment processes, automation/scripting, etc.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is not to say you need to be any kind of expert in these things for an entry-level Software Engineering position, however once you're confident in the core skills of computer science, programming and computational thinking,  it'll be important to focus learning around building software - at which point a lot of issues around tools/APIs/libraries/frameworks start to crop up, and so should the issues around understanding software design, testing, pragmatism, and (ideally) a lot of interaction with other programmers. &lt;/p&gt;&#xA;" OwnerUserId="6562" LastEditorUserId="6562" LastEditDate="2020-02-19T18:00:02.607" LastActivityDate="2020-02-19T18:00:02.607" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="6199" PostTypeId="2" ParentId="6193" CreationDate="2020-02-19T15:05:42.903" Score="0" Body="&lt;p&gt;Yes. It worked for me. I wrote about it on my blog:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://andydavi.es/blog/I-took-CS50/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://andydavi.es/blog/I-took-CS50/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://andydavi.es/blog/how-to-become-a-software-developer-in-nine-months/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://andydavi.es/blog/how-to-become-a-software-developer-in-nine-months/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8909" LastActivityDate="2020-02-19T15:05:42.903" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6200" PostTypeId="1" CreationDate="2020-02-19T23:36:07.983" Score="3" ViewCount="209" Body="&lt;p&gt;I've seen many platforms that allow companies to interview prospective developers by means of coding challenges, but those are always paid.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm trying to find some tool where I can create my own exercises and test cases and tell my students to go solve the challenge and see if their code passes all tests, and then maybe get a rank list of whose code has better performance (in order to make it look like a &quot;competition&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the past I tried to host a contest through Hackerrank but it was too cumbersome and there was no way to hide lots of auto-generated code that would just confuse my students.&lt;/p&gt;&#xA;" OwnerUserId="4062" LastEditorUserId="27" LastEditDate="2020-09-13T14:27:00.957" LastActivityDate="2020-09-13T14:27:00.957" Title="Is there a free platform to host coding challenges within a class?" Tags="|assessment|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6201" PostTypeId="2" ParentId="6200" CreationDate="2020-02-20T13:21:30.780" Score="4" Body="&lt;p&gt;It doesn't do ranking in any manner, but &lt;a href=&quot;https://codingbat.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt; permits you to create challenges with tests for your class in either Python or Java.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While the interface begins assuming that you will have one method, you can add as many methods as you wish.  However, you are limited to one class (so no inner classes), and you are forbidden Exceptions, so the projects would have to be fairly small in scope.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-02-20T13:21:30.780" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6202" PostTypeId="1" CreationDate="2020-02-21T22:14:25.433" Score="4" ViewCount="148" Body="&lt;p&gt;I have a vague notion that I could create some sort of introductory activity for Objects.  There would be worksheets (&quot;programs&quot;) to get kids (high school, in this case) to physically go through the process of isolating behavioral groupings into different people, and using message passing to solve a problem or accomplish an algorithm, but I don't have a great idea for one to actually implement.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It would be a bonus if it wasn't immediately apparent what problem the students were solving at first, but the final output created a nice &quot;A-ha!&quot; moment.  This would allow us to talk about the benefits of dividing a problem into component/machines instead of merely into sub-functions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Has anyone done something like this?  Or does anyone have an idea for a fun, physical activity to introduce some core OOP notions?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-02-25T21:23:51.087" Title="Physical Activity for Objects" Tags="|lesson-ideas|introductory-lesson|object-oriented-paradigm|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6203" PostTypeId="2" ParentId="6202" CreationDate="2020-02-21T22:56:37.797" Score="4" Body="&lt;p&gt;If the objects are something like robots or other things that &quot;move&quot;, like froggies, or such, then you can do things like maze solving and other interesting things. If they can move some sort of other objects by picking them up and putting them down in piles, then you can sort and such. Of course they need some sensory behavior to sense boundaries. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a number of scenarios available for Greenfoot for example that permit this sort of thing, either with a Java program or with student &quot;actors&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The left hand rule for walking a connected maze is kind of fun. And there are actually sorting routines for physical objects that are unlike the usual algorithms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it is moving under some constraint that makes it work. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Find the resources at the &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt; for ideas. I think the first scenario in Greenfoot involved Wombats, but the developers were then in Australia. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you can have the students simulate a cpu that executes the program, moving some objects on a game board. The hard part of this, however, is capturing the message passing idea of OO. That is a bit easier if the students are, themselves, objects, since speaking/asking is a lot like message passing. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-02-21T23:56:50.063" LastActivityDate="2020-02-21T23:56:50.063" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6204" PostTypeId="1" CreationDate="2020-02-23T18:51:20.467" Score="6" ViewCount="196" Body="&lt;p&gt;I teach a course in C++. Often, students submit a homework assignment that works well in their computer (they send me a screenshot showing that it compiles and runs perfectly), but when I run the assignment on my computer, I get a &quot;segmentation fault&quot;. This is, most probably, due to some pointer-related bug or an uninitialized variable, that results in an &quot;undefined behavior&quot;: in the students' computer this &quot;undefined behavior&quot; happens to work fine, but it is still an error. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I tell this to the students, they do not know how to work towards solving the problem, since they cannot even see it on their computer. There are 160 students (with 2 instructors and 3 TAs) in the course, and I do not have time to debug their submissions on my computer, or to give them my computer for debugging.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;One solution is to have a shared server, and have all students submit their exercises in the same server, so that everyone - including me - work in exactly the same environment. However, currently I do not have such a server so students work on their own computers, which can be Windows, Linux or Mac.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Additionally, having an identical environment for everyone is not a complete solution, since it is still possible that a submission happens to work well on this identical environment, despite it having an &quot;undefined behaviour&quot; bug. An identical environment thus only guarantees that, if the students do not see an error, then I will not see it too.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;How can I help students debug their code in this situation?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: A related problem is that, when the students submit such a solution and I tell them they have a bug, they say &quot;the bug is in your computer! See, my code works well on my computer!&quot;. So a related question is: how can I explain to them that there is a bug in their code, even when they do not see it?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="204" LastEditDate="2020-03-03T22:47:50.943" LastActivityDate="2020-03-04T22:39:05.660" Title="Debugging a submission that works well on student's computer but not on my computer" Tags="|programming|c++|homework|debugging|" AnswerCount="5" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6205" PostTypeId="2" ParentId="213" CreationDate="2020-02-23T23:02:56.167" Score="4" Body="&lt;p&gt;Think about human ages.  Babies that are newly born are at age 0.  That's zero-based indexing.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2020-02-23T23:02:56.167" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6206" PostTypeId="2" ParentId="6204" CreationDate="2020-02-24T14:01:38.900" Score="3" Body="&lt;p&gt;Your student/staff ratio is pretty unfavorable. This makes everything difficult. If you had a few more TAs or could find the schedule time, I'd make one of the TAs the person to handle all such technical issues. It would need to be the one with the highest &quot;geek cred&quot; I think. But debugging stuff shouldn't be the instructor's job. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the job of the super geek TA would be to figure out why such things happen and to feed it back to the instructors so that such things can be avoided in the future. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The symptoms you exhibit might be as simple as the fact that student machines probably have different memory configurations and so bounds errors might get caught on one, but not another. And if they have different OS's and different versions of C++ then there are lots of places for failure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with over a hundred students, your time isn't well spent debugging the code of individuals. Appeal to the administration for adequate support. Offload such things to that support staff. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your top geek might also be able to schedule a periodic &quot;debugging lab&quot; for students. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-02-24T14:31:12.200" LastActivityDate="2020-02-24T14:31:12.200" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6207" PostTypeId="2" ParentId="6204" CreationDate="2020-02-24T17:10:39.690" Score="5" Body="&lt;p&gt;You've said that having an identical environment for everyone would be an incomplete solution, since students' code could still work &quot;by accident&quot; in that environment. One option would be to provide access to &lt;em&gt;two&lt;/em&gt; or more sufficiently different environments which would be the same for everyone; such environments could be provided in several ways, for example:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Distribute virtual machine images, with instructions for how students can use them to test their code.&lt;/li&gt;&#xA;&lt;li&gt;Provide access to virtual machines through a paid service; for example, &lt;a href=&quot;https://www.codio.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codio&lt;/a&gt; is specifically designed for use in CS education.&lt;/li&gt;&#xA;&lt;li&gt;There are some web services such as &lt;a href=&quot;https://repl.it/languages/cpp&quot; rel=&quot;nofollow noreferrer&quot;&gt;repl.it&lt;/a&gt;, which compile and run your code, and show the results in a console.&lt;/li&gt;&#xA;&lt;li&gt;Some universities have student-run computing societies offering accounts for students on a shared server.&lt;/li&gt;&#xA;&lt;li&gt;Different environments may already be available if students are on campus, and the campus has enough different computer labs open for student use at some times.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;To catch undefined behaviour when grading submissions, you could test their code in the same two (or more) environments that students have been encouraged to use. Assuming you have a script that can automatically run all submissions, it shouldn't be a lot of extra work to run that script twice.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Another option is to provide students with a software tool which can detect and report undefined behaviour, as discussed in &lt;a href=&quot;https://stackoverflow.com/q/7237963/12299000&quot;&gt;this Q&amp;amp;A on Stack Overflow&lt;/a&gt;. Such a tool could also be used to give feedback to students whose submissions fail on your machine during grading; although static analysis and other techniques won't generally be able to detect &lt;em&gt;all&lt;/em&gt; kinds of undefined behaviour, the kinds they do detect should cover most or all of the mistakes that students are likely to make.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastEditorUserId="8562" LastEditDate="2020-02-24T22:12:17.503" LastActivityDate="2020-02-24T22:12:17.503" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6208" PostTypeId="2" ParentId="6204" CreationDate="2020-02-24T21:31:59.523" Score="2" Body="&lt;p&gt;You could encourage them to use tools like compiler warnings and &lt;code&gt;valgrind&lt;/code&gt; to try to check for bugs.&lt;/p&gt;&#xA;" OwnerUserId="5963" LastActivityDate="2020-02-24T21:31:59.523" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6209" PostTypeId="1" CreationDate="2020-02-25T11:26:01.600" Score="3" ViewCount="280" Body="&lt;p&gt;I am an assistant professor preparing a 5 lecture series 'introduction to programming'. The target audience are first year engineering undergrads - from a mix of mechanical, electrical, electronic, telecomms and civil engineering majors. Some of these students will never have programmed before. We will use Matlab.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am expecting that many of these students will never have coded before and almost all will not have seen Matlab before. They will need Matlab in all subsequent years of their degree.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Given the extremely limited time for this course, how can I give best bang for their buck, without it being too dry?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Is there something cool we could work towards creating over the 5 weeks?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More info: There are 5 x 4 hours sessions. Classroom cannot be flipped as there will be 50+ students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Editing here to thank everyone who has taken the time and effort to give extremely helpful detailed replies. I appreciate it guys.&lt;/p&gt;&#xA;" OwnerUserId="8935" OwnerDisplayName="scivix" LastEditorUserId="1293" LastEditDate="2020-03-09T19:51:50.397" LastActivityDate="2020-03-09T22:07:16.733" Title="What do programming novices need to know when using MatLab?" Tags="|programming|introductory-lesson|" AnswerCount="6" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6210" PostTypeId="2" ParentId="213" CreationDate="2020-02-25T13:13:29.403" Score="9" Body="&lt;p&gt;Rulers start at zero:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/nx70f.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nx70f.jpg&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At zero centimetres, you have nothing, whereas at one centimetres, you have one unit of length. Memory is similar: You start filling at the beginning (zero), hence, the first &lt;em&gt;x&lt;/em&gt;-memory units contain &lt;em&gt;x&lt;/em&gt; units of data, the next unit contains unit &lt;em&gt;x+1&lt;/em&gt;. &lt;/p&gt;&#xA;" OwnerUserId="8103" LastActivityDate="2020-02-25T13:13:29.403" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6212" PostTypeId="2" ParentId="6209" CreationDate="2020-02-25T15:42:00.130" Score="2" Body="&lt;p&gt;I teach programming to graduate students in public policy, with a focus on data.  So while engineering students might be different, I think there will be a lot of similarities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you're running an intensive bootcamp where the students will be putting in far more hours than a typical class would call for (are you?), I think the biggest obstacle to doing &quot;something cool&quot; that you'll run into is the uneven abilities of new programmers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As with my field, I imagine many of your students aren't interested in programming per se; they're interested in programming only as a means to do engineering.  In a typical course, this means you're going to have some students still struggling with data types and functions after five weeks, while others are done with that after week one.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If I were teaching a 5-week course myself (I work primarily in Python), I would probably try to have everyone building a game by the end.  Something basic, like a card game.  While the goal isn't for them to be game developers, it's something many of your students will think is &quot;cool&quot;, which will inspire them to get a grasp of how the language works along the way.  I might then have them collect the results of iterations of the game into a dataset to do some basic data work with.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'm not terribly familiar with Matlab, but if that's not a suitable goal for that platform, try to get as close to the game theme as you can.  The mix of all types of engineers might make that difficult, but what about something that takes in the design of a wall, then calculations to knock it down?  I'm not an engineer, but something that is only loosely practical, fun, and a good primer of the language.&lt;/p&gt;&#xA;" OwnerUserId="8928" LastActivityDate="2020-02-25T15:42:00.130" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6213" PostTypeId="2" ParentId="6209" CreationDate="2020-02-25T17:02:31.930" Score="5" Body="&lt;p&gt;With only 5 sessions, I would abandon the idea of building something cool, and focus with laser-like precision on whatever they &lt;em&gt;need to know&lt;/em&gt; going forward in their coursework.  There is such a small amount of time to learn the basics of any programming language.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;MatLab supports lambdas, objects, and GUI design, but unless they are going to get into rather serious programming, I imagine that you would steer clear of these.  (I don't know how you would cover any of them in 5 days with novices in any case.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The danger in heading towards UI and a game is that they will come out without being able to do what they presumably need in the next class, such as matrix multiplication, or graphing an integral multiplication.  You may be better using your five sessions to delve into five areas of greatest need, as determined by the future required coursework of your students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-02-25T17:02:31.930" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6215" PostTypeId="2" ParentId="6204" CreationDate="2020-02-25T21:09:18.613" Score="3" Body="&lt;p&gt;As early as possible in the course, and again when appropriate examples arise, you should &quot;round up the usual suspects.&quot;  (It's a Dick Tracy reference, but that does not really help.) You could include this as a &quot;sidebar&quot; feature of many classes.  And you could have a &quot;crib sheet&quot; listing the most common such mistakes.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example one frequent mistake is the &quot;wild pointer.&quot; You allocate memory using &quot;new&quot; and have a pointer point at it. Then you later delete this memory through the pointer. Then still later you reference the same memory through the pointer. Your program no longer owns that memory, it's a protection fault. There are several common variations on this, and it can be very hard to debug.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is just one example. There are a bunch of these. If you make them aware of these early in the class then hopefully you will get them learning how to code well, not just vigorously. In C++ there are a number of idioms that seriously reduce wild pointers.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could dedicate part of one class to debugging an example of this kind of error. It would probably save you a &lt;em&gt;lot&lt;/em&gt; of time marking assignments. Or if they have tutorial time, that could be a task you drop on your tutors.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could get them into the following books to look for more, and other related issues. These are the books I wish I had when I was learning C++.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0201615622&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Exceptional-Engineering-Programming-Problems-Solutions/dp/0201615622/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/020170353X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Accelerated-C-Practical-Programming-Example/dp/020170353X/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0735619670&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8929" LastActivityDate="2020-02-25T21:09:18.613" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6216" PostTypeId="2" ParentId="6202" CreationDate="2020-02-25T21:23:51.087" Score="2" Body="&lt;p&gt;The guy who taught me object-oriented used three very simple examples.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thing about objects that many students find hard is that the main thing about an object is its interface. You have an interface with a contract for behavior. Any object that can satisfy the contract can, in principle, get hooked up through that interface.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the first example he used was electrical wall sockets. You can't see the stuff behind the wall, it's information hiding. It's a type, since you can plug any electrical device in there. Even devices that are created after the socket is installed. And you can plug your device into any socket, even sockets that are installed after you got your device. And you can even do things like inheritance using things like extension cords or power bars. And you can do testing by using a circuit checker. And even limited behavior since the socket's circuit breaker may have been tripped.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second example he used was salt dispensing at a theme restaurant.  This table had a simple little salt shaker. This one had a little train that came out and dispensed salt. This one had a Ferris wheel. This one had a little cuckoo clock that popped out and gave you salt. He used this to push the idea of interface and contract for behavior. For example, he had a &quot;my reservoir is empty&quot; message that the dispenser would give out. You can easily make this example more complicated. So each dispenser had a &quot;dispense&quot; command, and a &quot;how much in my reservoir&quot; data getting function, and a &quot;refill my reservoir&quot; function. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The third example he used was the weather report produced by the local weather forecaster. This would get put in the paper and read by various people around town. The salt miner wanted to know if it would rain so he could cover the salt. The ice cream truck wanted to know the temperature to predict sales. The log flume ride wanted to know about wind because they could not operate if it was too windy. The artist at 12th and Main wanted to know when there would be a pretty sunset. And so on. So the weather forecaster accessed one part of the news paper interface to load up the weather report. Then each of the clients of the newspaper accessed a different line of the data reporting part of the paper to get the data they wanted. &lt;/p&gt;&#xA;" OwnerUserId="8929" LastActivityDate="2020-02-25T21:23:51.087" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6217" PostTypeId="2" ParentId="6209" CreationDate="2020-02-26T01:37:35.333" Score="2" Body="&lt;p&gt;I teach an introductory programming course, with many students who have never programmed before. My course is 13 weeks, but the first 5 cover what I consider to be the basics. I have 3 hours of lectures and 2 hours of labs per week.&#xA;So here's a suggestion for 5 weeks:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Week 1: The basic idea of thinking algorithmically, ordering the steps of a process. You can use the logo turtle to get them to &quot;write some code&quot; on day 1. (see for instance the online editor here: &lt;a href=&quot;https://www.tortue-logo.fr/en/logo-turtle&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.tortue-logo.fr/en/logo-turtle&lt;/a&gt;). Then teach variables and expressions, decomposing an arithmetic computation in several steps (e.g. calculating how much you'll spend per month on gasoline, given the distance to your workplace, the mileage of your car, and the price of gas).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Week 2: using if conditions and boolean expressions, with or/and. Incorporating those into algorithms. What you can code with that: things like the absolute value, compute the solutions of a second-degree equation (using built-in square root), calculate income tax in a toy setting (with several tax brackets). If time permits, start talking about loops.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Week 3: Loops. Once you have the semantics of the while / for statements, you show them a classic algorithm such as Euclid's GCD algorithm: describe it by a flowchart and show how to translate it to code. Then move on to trying to figure out the steps of solving a problem, showing them classic techniques like using an accumulator to compute a sum (e.g. the sum of even integers between A and B).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Week 4: Functions. How you can package a computation in a function, with inputs and related outputs. Insists on the goals of modularity, abstraction, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Week 5: Working with lists and / or matrices (since Matlab is heavily focused on matrices). By the end of it they can't do terribly &quot;fun&quot; stuff like games, but there are some scientific applications of interest, like a LFSR to do simple cryptography (that's what I do in my fifth-week lab). For students who aren't afraid of some math, there's plenty of useful math-oriented algorithms like approximating an integral (with rectangles or trapezes and such), using Heron's algorithm to approximate the square root, etc. I think with Matlab you can also plot graphs quite easily, so there are definitely interesting applications there.&lt;/p&gt;&#xA;" OwnerUserId="8931" LastActivityDate="2020-02-26T01:37:35.333" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6220" PostTypeId="2" ParentId="6209" CreationDate="2020-02-28T23:23:42.793" Score="1" Body="&lt;p&gt;I don't know Matlab, so this answer is mostly about generic programming concepts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The core of programming is problem solving, so I would think the best use of the limited time you have available would be to focus on computational thinking and providing them with the techniques they will need to be able to think their way around a problem sufficiently to be able to express a solution in code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Matlab is of course designed specifically for solving problems rooted in various Scientific, Mathematical and Engineering domains, so ideally, any example programs you use for demonstration and explaining the concepts should be as close as possible to the types of problems that the students will be solving by themselves.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the pre-requisites for being able to write the code to solve a problem is to have gained a clear understanding of the problem being solved, so it would be useful to stick to problems which the learners would already be able to understand on-paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It could be useful to look at the Harvard CS50 syllabus as a starting point, it places a heavy emphasis on developing computational thinking skills by challenging learners to solve typical programming problems: &lt;a href=&quot;https://cs50.harvard.edu/ap/syllabus/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs50.harvard.edu/ap/syllabus/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of the concepts covered in the first 3-4 lessons of the CS50 syllabus are universally applicable to programming in any language, and David J Malan's delivery of these concepts in his lectures seems to go down very well with his students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;A number of other specific techniques which I believe would be useful:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Problem decomposition, illustrated by describing a complex problem, analysing it and dividing into sub-problems.&lt;/li&gt;&#xA;&lt;li&gt;Steps to solving a problem by starting with example/test inputs, describing the steps, and reaching a result 'by-hand'.&lt;/li&gt;&#xA;&lt;li&gt;Pattern recognition and using generalisation to describe a solution using pseudocode, then translation into a runnable program &lt;/li&gt;&#xA;&lt;li&gt;Using the debugger to set breakpoints, inspect variables and step through code to find/fix errors. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Terminology, as well as the 'grammar' of the language is of course important too - there's a lot of jargon to to absorb in a very limited space of time.     &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Newcomers frequently find themselves spending a great deal of time attempting to decypher syntax errors, so some of the most important terminology for them to understand will be the words/phrases which frequently appear in the Matlab error frame - for example, misuse of particular symbols/operators, or incorrect use of particular data types. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps finally, make sure to include frequent reminders that they can (and should) be making extensive use of Google and StackOverflow to find out what the syntax errors and other jargon means as well.   &lt;/p&gt;&#xA;" OwnerUserId="6562" LastEditorUserId="6562" LastEditDate="2020-02-28T23:28:45.117" LastActivityDate="2020-02-28T23:28:45.117" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6221" PostTypeId="1" AcceptedAnswerId="6223" CreationDate="2020-03-01T16:21:38.753" Score="4" ViewCount="276" Body="&lt;p&gt;I'm a retired college teacher.  I've been asked to &quot;teach coding&quot; to a dozen very bright seventh-graders using the Micro:Bit kits the school has on hand.  I have a total of seven contact hours available.  In three hours, we've learned about algorithms, variables, and operators.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On Tuesday we'll write a program for &quot;red light / green light&quot; and learn the difference between sequence and selection.  The following week we'll do something with a loop and I'll add &quot;iteration&quot; to the vocabulary.  While I probably won't say &quot;Structured Programming Theorem,&quot; I &lt;em&gt;was&lt;/em&gt; going to tell the kids that sequence, selection, and iteration are &quot;all you need.&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The trouble is, the MakeCode block language has &quot;on-blocks&quot; which fire when events occur, &lt;em&gt;e.g.&lt;/em&gt; &quot;on Button A pressed.&quot;  You can't avoid these.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, how do I explain events, or &quot;on-blocks&quot; in the context of sequence, selection, and iteration?  (The best I've been able to come up with so far is that there's a hidden loop of &lt;code&gt;if&lt;/code&gt; statements checking for events, which is probably how the on-blocks are actually implemented, but unlikely to be satisfying to twelve-year-olds.)&lt;/p&gt;&#xA;" OwnerUserId="3524" LastActivityDate="2020-03-25T23:14:38.767" Title="Explaining Event-Driven Programming in the context of the Structured Programming Theorem" Tags="|block-based-programming|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6222" PostTypeId="2" ParentId="6221" CreationDate="2020-03-01T18:19:31.227" Score="3" Body="&lt;p&gt;I don't see that there's anything to explain, because there's no apparent contradiction between a set of language constructs being &quot;all you need&quot;, and a language having more constructs than are &quot;needed&quot;. Languages are designed to have constructs that are useful for human programmers to easily and concisely express what a program should do, not just a minimal set of constructs for it to be possible to express programs.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's not even necessary to explain that event-driven languages are implemented using hidden conditional statements and loops; and as Buffy notes in the comments, they may not actually be implemented that way anyway. If you want to tell your students that they &lt;em&gt;could&lt;/em&gt; be, then I see no problem with that. But consider this:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Untyped lambda calculus is Turing complete, so &quot;all you need&quot; is function definitions and function application. Does that imply that conditional statements and loops must be implemented with hidden function definitions and hidden function applications? Well, no, it doesn't imply that.&lt;/li&gt;&#xA;&lt;li&gt;The logical NAND operation is functionally complete, so &quot;all you need&quot; is NAND gates. Does that imply that computers are made only of NAND gates? Again, no, it doesn't.&lt;/li&gt;&#xA;&lt;li&gt;As shown in &lt;a href=&quot;http://stedolan.net/research/mov.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;this paper&lt;/a&gt; and amusingly demonstrated in &lt;a href=&quot;https://github.com/xoreaxeaxeax/movfuscator&quot; rel=&quot;nofollow noreferrer&quot;&gt;this compiler&lt;/a&gt;, the x86 &lt;code&gt;mov&lt;/code&gt; instruction is &quot;all you need&quot;, i.e. any C program can be compiled to a sequence of unconditional writes to memory (at addresses read from memory). But the rest of the x86 instruction set is, of course, not implemented that way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;What I will suggest is that if you do want to mention that sequence, conditional statements and loops are &quot;all you need&quot;, then you should add that real programming languages have more control-flow constructs than just those, because the additional ones (e.g. subroutines/function calls and &lt;code&gt;return&lt;/code&gt;, &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt;, event loops…) are convenient.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastEditorUserId="8562" LastEditDate="2020-03-02T13:25:25.343" LastActivityDate="2020-03-02T13:25:25.343" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6223" PostTypeId="2" ParentId="6221" CreationDate="2020-03-02T12:33:02.117" Score="1" Body="&lt;p&gt;In the spirit of K.I.S.S., I believe that you can call this &quot;selection&quot; (it is), and no one will bat an eyelash.  At this stage, selection within a program won't be fully differentiated from selection by a user in any case, so no one will be expecting anything different in any case.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you feel the need to explain further, just say that, if you think about it, these really seem like &lt;code&gt;if&lt;/code&gt; statements, too. They just don't use the word for it. But if we were to go somewhere into the code that makes the whole program go, we'd discover that our instincts are correct, because there really are &lt;code&gt;if&lt;/code&gt; statements that drive this, and they look something like:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;if button A gives a signal, find the &quot;on Button A pressed&quot; block and run from there.&lt;/code&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-03-02T12:33:02.117" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6224" PostTypeId="2" ParentId="6221" CreationDate="2020-03-03T17:51:40.517" Score="2" Body="&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I am aware that this does not directly answer the question, but I it still useful nonetheless to question the question itself. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;IMHO, it seems you are overthinking this issue. You are introducing a whole new world of programming to 12 year olds in seven hours. There will be many huge gaps in their understanding and many things will remain partial knowledge. And that's OK. Make them passionate about the subject and they will search for more about the parts they are interested in. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Micro:bits allows for lots of interesting experiments using the inputs/outputs. Instead of worrying about &quot;Selection, Iteration and Sequence&quot; you could focus on, you know,  &lt;em&gt;building cool stuff&lt;/em&gt;. If it were me, I would rather have students finishing the course with something of their own making and that they know how to explain how it works to their parents than worrying about abstract CS concepts many college students struggle to understand.&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2020-03-03T17:51:40.517" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6225" PostTypeId="2" ParentId="6204" CreationDate="2020-03-04T14:02:13.317" Score="2" Body="&lt;p&gt;Is this using different versions of &lt;code&gt;gcc&lt;/code&gt;?&#xA;Have the students compile with full warnings and with different level of optimizations.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I wonder: could the emitted warnings be of a kind that the compiler will only warn about at a certain optimization level?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Either way: making the students see the effects of this type of side-effect is very valuable in itself. Now, how to ensure that they deduce the issues, &lt;em&gt;that&lt;/em&gt; would be interesting and valuable.&lt;/p&gt;&#xA;" OwnerUserId="8675" LastEditorUserId="27" LastEditDate="2020-03-04T22:39:05.660" LastActivityDate="2020-03-04T22:39:05.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6226" PostTypeId="2" ParentId="6184" CreationDate="2020-03-06T20:19:31.167" Score="2" Body="&lt;p&gt;All of the best fliers I found were at the &lt;a href=&quot;https://www.ncwit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;NCWIT website&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.ncwit.org/sites/default/files/resources/microsoft_digitalskills_cs_toolkit_092018.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer science is for everyone&lt;/a&gt;, pp. 13-16&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.ncwit.org/resources/why-should-young-people-consider-careers-computing-and-information-technology&quot; rel=&quot;nofollow noreferrer&quot;&gt;Why Should Young People Consider Careers in Computing and Information Technology?&lt;/a&gt; (also in &lt;a href=&quot;https://www.ncwit.org/losjovenes&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spanish&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.ncwit.org/resources/community-college-pathway-it-and-computing-careers&quot; rel=&quot;nofollow noreferrer&quot;&gt;Community College Pathway to IT and Computing Careers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.ncwit.org/resources/university-pathway-it-and-computing-careers&quot; rel=&quot;nofollow noreferrer&quot;&gt;University Pathway to IT and Computing Careers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.ncwit.org/resources/which-computing-pathway-right-me&quot; rel=&quot;nofollow noreferrer&quot;&gt;Which computing pathway is right for me?&lt;/a&gt; (also in &lt;a href=&quot;https://www.ncwit.org/node/5296&quot; rel=&quot;nofollow noreferrer&quot;&gt;Spanish&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-03-06T20:19:31.167" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6227" PostTypeId="2" ParentId="6209" CreationDate="2020-03-06T20:44:18.330" Score="2" Body="&lt;p&gt;I studied and TA'd electrical engineering and computer science in college and graduate school. You have a unique opportunity versus most introductory programming languages that use general languages like java or python because Matlab, which is a portmanteau for &quot;Matrix Laboratory&quot;, is a language that is meant to be very interactive, intuitive to mathematically-savvy students, and easy to pick up and includes the constructs of 1-d vectors, 2-d matrices, and n-dimensional tensors as first-order data structures (I know you know all this, but I'm stating it for other readers who may be less familiar with this language). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of your students will have a background in linear algebra and matrix notation and use in mathematics from their courses in all of the state engineering disciplines. Therefore, you can focus less on teaching fundamental of data types, data structure, control flow logic, hierarchy and namespaces, and instead build up from intuitive Matrix-like mathematical operations that naturally have sequences of repeating steps with exit conditions.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;1st-week of introduction to typical matrix problems in the engineering sciences, and walking them through building the simple scripts to execute those.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;2nd-week add Matlab function wrapper per file concept as an introduction to hierarchy and namespace (informally, this is how it works, not focusing on the deeper theoretical aspects) of scoping local variables in input/return values. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;3rd-week show how there are lots of the simple operations (like matrix multiples, inverting matrices, DFT and FFT, that are prebuilt library functions, and study some tradeoffs on choosing them and how they deal with padding, non-invertible data sets, etc.)&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;4th and 5th-week focus on a large programming project that does something interesting with larger data and doing something iterative like gradient descent on a simple pattern match like regression, or simple cases of convex cost function search, or even backpropagation in a 3-layer neural network. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Pre-build much of the base and helper code and have them learn how to use what they learned so far to code the inner loop of the iterations. Definitely give them the code that they can easily tweek so they get some experience generating graphics to demonstrate (and debug) the optimization iteration sequence.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8962" LastEditorUserId="27" LastEditDate="2020-03-06T20:48:54.520" LastActivityDate="2020-03-06T20:48:54.520" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6228" PostTypeId="2" ParentId="973" CreationDate="2020-03-08T18:06:29.747" Score="0" Body="&lt;p&gt;Binary math is an imperative to understand automation. 36 years on the job with 14 years on podium. Especially today where the the world is full of assumptions. All new employees I have had could not conceive how the physical inputs and outputs work in relationships to the masterful programming they developed. &lt;/p&gt;&#xA;" OwnerUserId="8968" LastActivityDate="2020-03-08T18:06:29.747" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6229" PostTypeId="2" ParentId="583" CreationDate="2020-03-08T21:50:11.613" Score="1" Body="&lt;p&gt;To add to &lt;a href=&quot;https://cseducators.stackexchange.com/a/724/8562&quot;&gt;Simon's answer&lt;/a&gt;, I've used the &quot;phone number&quot; analogy, but using a phone number as a reference to a person, rather than as a reference to a phone. The example is meant to explain the behaviour of algorithms like the below, when you have a list created like &lt;code&gt;[Person()] * 10&lt;/code&gt; in Python:&lt;/p&gt;&#xA;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;for person in people:&#xA;    person.wear_hat()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;If you really had a list of 10 people, then the result would be that each person in the list is wearing a hat. But the real behaviour is like you have a list of ten phone numbers. You call the first number and tell them to put on a hat, then you call the second number and tell them to put on another hat, and so on. But the list has ten copies of the same phone number, so you just called the same person ten times, and by the end of the loop the person on the other end of the phone is wearing ten hats.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want to be completely accurate, this isn't &lt;em&gt;exactly&lt;/em&gt; the distinction between &quot;passing by reference&quot; and &quot;passing by value&quot;. In fact, every value in Python is a reference, and references are always passed by value. (See also &lt;a href=&quot;https://stackoverflow.com/a/40523/12299000&quot;&gt;this explanation&lt;/a&gt; of the same fact about non-primitive types in Java.) That said, the example elucidates how using references can have different behaviour to using copies, which is the key point you're trying to get across; conceptually the same example could be written in C++ using reference parameters.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I also think the phone number/person analogy for references is good because it evokes the idea that calling a method is a form of &lt;a href=&quot;https://en.wikipedia.org/wiki/Message_passing&quot; rel=&quot;nofollow noreferrer&quot;&gt;message passing&lt;/a&gt;, an important concept in OOP and concurrent programming.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastEditorUserId="8562" LastEditDate="2020-03-08T21:55:41.223" LastActivityDate="2020-03-08T21:55:41.223" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6230" PostTypeId="2" ParentId="6209" CreationDate="2020-03-09T22:07:16.733" Score="0" Body="&lt;p&gt;I think I'd try to hook them with &lt;strong&gt;image processing&lt;/strong&gt;. Maybe with &lt;a href=&quot;https://en.wikipedia.org/wiki/Canny_edge_detector&quot; rel=&quot;nofollow noreferrer&quot;&gt;an edge detection algorithm&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Feature_detection_(computer_vision)#Feature_detectors&quot; rel=&quot;nofollow noreferrer&quot;&gt;something else along those lines&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Topics that get naturally covered:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Basic syntax, data, and other features of the language&lt;/li&gt;&#xA;&lt;li&gt;Basic program structure and design (not many libraries needed, you get to cook the dark magic yourself) &lt;/li&gt;&#xA;&lt;li&gt;Matrix manipulation, (algebra and entrywise)&lt;/li&gt;&#xA;&lt;li&gt;&quot;The scientist's approach to programming&quot;: try something, look at the result (literally in this case, because the results are pictures), and if it looks good, move on and build on that result. We're not trying to create software engineers here.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Particular benefits:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Matlab (or Octave) might actually be a good choice for implementing image processing algorithms in the real world, so the topic doesn't feel forced. (Somewhat unlike using Matlab for &quot;intro to programming&quot;..)&lt;/li&gt;&#xA;&lt;li&gt;Shows Matlab and programming as a tool for getting work done (&quot;oh, the source image needs to be rotated?  Hold on while I whip up this nifty rotation matrix..&quot;)&lt;/li&gt;&#xA;&lt;li&gt;In case the students don't yet see matrices as the best thing since Sliced (&lt;a href=&quot;https://en.wikipedia.org/wiki/Sliced_(TV_series)&quot; rel=&quot;nofollow noreferrer&quot;&gt;2019&lt;/a&gt;), this might double as a sales pitch for matrix algebra too.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Pretty pictures!&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;(Really, the final bullet point is the important thing. Finding the result to an interesting physics problem just doesn't cut it as the behaviour-reinforcing reward a beginning programming student needs. With image manipulation, it's not entirely unheard of that some even fiddle with the code in their free time.)&lt;/p&gt;&#xA;" OwnerUserId="4424" LastActivityDate="2020-03-09T22:07:16.733" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6231" PostTypeId="1" CreationDate="2020-03-10T01:42:15.070" Score="15" ViewCount="701" Body="&lt;p&gt;As you may know, schools in many parts of the world will remain closed for a long time due to the coronavirus outbreak.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Italy, the government has invited schools to provide remote teaching, and since many schools are subscribers of &lt;a href=&quot;https://en.wikipedia.org/wiki/G_Suite&quot; rel=&quot;noreferrer&quot;&gt;G Suite&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Office_365&quot; rel=&quot;noreferrer&quot;&gt;Office 365&lt;/a&gt;, teachers are giving online lessons using web conferencing services (&lt;a href=&quot;https://en.wikipedia.org/wiki/Google_Hangouts#Google_Hangouts_Meet&quot; rel=&quot;noreferrer&quot;&gt;Google Hangouts Meet&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Microsoft_Teams&quot; rel=&quot;noreferrer&quot;&gt;Microsoft Teams&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now, the main problem is with tests.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regarding computer science, if we know that &quot;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/14/cheating-on-labs&quot; title=&quot;example&quot;&gt;it is spectacularly easy to cheat on computer science labs&lt;/a&gt;&quot; (and in my tests students have to write code on paper), we can just imagine how simple is to cheat in an online test, whether it is an assignment to be submitted after several days, or a few minute quiz.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A different assignment for each student is not a solution, since lazy students could ask clever students to solve their assignment, so I think I am forced to abandon tests which require students to write their own code.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Maybe a better idea could be a quiz with automatically generated questions, like a code snippet and the request to determine the output for a given input, with different input values and variable names for each student.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Do you know any tool to create such questions? Or do you have any other suggestions?&lt;/p&gt;&#xA;" OwnerUserId="3842" LastEditorUserId="8651" LastEditDate="2020-04-03T22:24:33.527" LastActivityDate="2020-12-09T03:00:44.517" Title="How can I design online tests and prevent cheating?" Tags="|secondary-education|exams|lecture-tools|distance-learning|cheating|" AnswerCount="7" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6232" PostTypeId="2" ParentId="6231" CreationDate="2020-03-10T12:42:54.107" Score="15" Body="&lt;p&gt;I don't think there are any published tools to generate programming assignments, though there are articles that &lt;em&gt;describe&lt;/em&gt; such tools (such as &lt;a href=&quot;https://academicworks.cuny.edu/cgi/viewcontent.cgi?article=1251&amp;amp;context=ny_pubs&quot; rel=&quot;noreferrer&quot;&gt;this one from a CUNY&lt;/a&gt;, or &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.679.7627&amp;amp;rep=rep1&amp;amp;type=pdf&quot; rel=&quot;noreferrer&quot;&gt;this one from Croatia&lt;/a&gt;, so one option is to try to contact those authors and find out whether they would share their results with you.)&lt;/p&gt;&#xA;&lt;p&gt;I will state categorically that there is no way of guaranteeing that students will not cheat.  As the old saying goes, &amp;quot;locks are to keep honest people honest.&amp;quot;  Putting road blocks in the way of cheating will help dissuade students from trying, both because it becomes more of a bother, and because it gives them a chance to remind themselves of the ethics involved.&lt;/p&gt;&#xA;&lt;p&gt;The bit about ethics is important, actually, and it can be remarkably effective all on its own.  Dan Ariely did an excellent set of studies about this, which he summarized hilariously in this &lt;a href=&quot;https://www.ted.com/talks/dan_ariely_our_buggy_moral_code?language=en&quot; rel=&quot;noreferrer&quot;&gt;TED talk&lt;/a&gt;.  If you don't want to watch that, then you can read this blurb from his blog, though the talk is well worth the time and much more interesting.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;We used an honor code in an experiment at MIT in 2007. We asked a few hundred undergraduates to do some simple math problems but didn’t give them enough time to finish. We then asked them to score their own tests and tell us how well they had done, with payment of $1 for each question they reported getting right. The students were asked to shred their papers afterward—but our shredder didn’t really work, so we could see how they had done. Many cheated. We had a second group of students follow the same procedure but only after they first signed the honor code. Signing the honor code before the test eliminated cheating altogether.&lt;/p&gt;&#xA;&lt;p&gt;The effectiveness of such a code doesn’t stem from signing it, though. It comes from being reminded about moral issues. If your students eventually stop thinking about the ethics code as they sign it, it will lose its power. If they keep reading and reflecting on the code, its effectiveness might increase.&lt;/p&gt;&#xA;&lt;p&gt;I ask my own students to write their own version of an ethics code—not because I’m especially interested in their interpretations but because it helps to ensure thought.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://danariely.com/2016/06/25/ask-ariely-on-genuine-greetings-moral-reminders-and-interest-aversion/&quot; rel=&quot;noreferrer&quot;&gt;Dan Ariely&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So, one way of working around the COVID-19 problem is to combine both ethical thinking and a few roadblocks to help gently &lt;em&gt;dissuade&lt;/em&gt; cheating:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Remind students about ethics up front, at the top of your exam. (I make them copy out, by hand, an honor statement.  On a computerized exam, I would provide an image of the statement and make them type it.)&lt;/li&gt;&#xA;&lt;li&gt;Schedule the exam in advance.  Give the exam at a specific time, and a narrow window (say, 10 minutes) to begin the exam.&lt;/li&gt;&#xA;&lt;li&gt;There is no need to make different exercises for each student.  Make 3 programming problems, and assign each student to different problems using a rule.  This decreases the chances that they will have a friend in the class with the same problem.&lt;/li&gt;&#xA;&lt;li&gt;Require that the exam be finished within a reasonable time from the start time.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;It's not foolproof.  They could, for instance, have their parent sitting next to them, telling them the answers.  But you can't do anything about such a scheme.  What you can do is set up roadblocks and set the stage for ethical action on the part of your students.  If Ariely's studies are any guide, you should get the large majority of students to submit honest work this way, and that is probably the best you can hope for.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-03-15T19:35:57.967" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6233" PostTypeId="2" ParentId="6231" CreationDate="2020-03-10T13:42:46.910" Score="3" Body="&lt;p&gt;This isn't really an answer and requires long term thinking, but perhaps this is an opportunity to start to rethink how we evaluate students. I'm not a big fan of testing. Especially high stakes testing and testing dependent on memorization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Perhaps there is just a better way to determine whether students have mastered the material. I depended much more on paired and small group projects for evaluation, combined with peer evaluation. This was toward the end of my teaching career after I'd learned some things about teaching and learning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But pairs can work over the internet as can groups of up to about five or so students if you provide a rich set of communication tools. Also, pairs meeting face to face isn't as dangerous in the spread of disease as large groups (citation needed, I suppose). But people can also choose how to meet, on-line or in person, as long as you don't force them to meet face to face. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, my base position is that if we can learn how to evaluate students without traditional testing it would be a step forward. The Pedagogical Patterns Project has some thoughts on all of that, of course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-03-10T13:42:46.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6234" PostTypeId="1" CreationDate="2020-03-10T20:12:05.497" Score="5" ViewCount="199" Body="&lt;p&gt;The current situation with the spread of a serious disease worldwide has caused a number of universities and schools to move courses to an online model where students don't meet face to face in large groups. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem of evaluating students then arises, and traditional tests are ill suited for an online model as it is much harder to monitor them or assure validity. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, any evaluation method should foster learning, not just memorization, so traditional testing has its own downside. Perhaps the current emergency can result in finding better evaluation methods that are also amenable to use online, as well as in traditional classrooms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Have you used innovative evaluation methods - beyond testing - that foster good learning and proper student habits but which can be adapted to courses that don't meet face to face for instruction or testing? Can you describe what you do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My own preference has long been to replace traditional tests in ordinary classrooms, and especially high risk, anxiety inducing, tests with small group and pair projects. This was combined with peer evaluation. In the current situation, it might be acceptable for students to meet in pairs or small groups with less risk than meeting in larger groups. But, it would probably have to be done in a way that meeting face to face is optional. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2020-03-18T20:24:59.500" LastActivityDate="2020-04-16T22:37:39.753" Title="What evaluation methods can be used that don't involve testing but are adaptable to online courses" Tags="|evaluation|distance-learning|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6235" PostTypeId="2" ParentId="6234" CreationDate="2020-03-10T21:50:24.593" Score="5" Body="&lt;p&gt;As part of an algorithms module (first-year undergraduate level), I got students to choose a computational problem from a list of options I provided, write an algorithm to solve it, and write a 750-word report explaining:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The problem in their own words,&lt;/li&gt;&#xA;&lt;li&gt;How their algorithm works (with code), and&lt;/li&gt;&#xA;&lt;li&gt;How they tested it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Students had a few weeks to complete this task, worked in their own time, and then submitted their report to the university's Moodle site; so this kind of assessment could work equally well in a non-face-to-face course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The idea behind asking students to explain their algorithm came from the fact that interviewees for software jobs often have to solve a problem during the interview and explain how their solution works. Being able to explain how one's code works is also important for many other things a programmer might do, like rubber-duck debugging, code review, or writing good answers on Stack Overflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your question doesn't dwell on it, but one of the key differences between in-person and online assessments is the opportunity for cheating and the difficulty of detecting it. As a convenient side-effect of having students explain the problem and their solution in their own words, suspected cheaters can be identified in two ways:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A student who is unable to write the code themselves is usually also unable to adequately explain how the code works.&lt;/li&gt;&#xA;&lt;li&gt;A student who also copies the explanation (or parts of it) can be detected by standard tools such as TurnItIn, so you don't need a more sophisticated tool for comparing code similarity.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the former case, a poor explanation deserves a low grade anyway, whether or not they cheated. In the latter case, my experience of running the assessment over two years with ~250 students each year is that TurnItIn works well enough for catching students who copy from an online source or from each other. With fewer students, you can group the assessment submissions by which problem they attempted, and probably notice any collusion yourself even without a tool like TurnItIn.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2020-03-10T21:50:24.593" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6236" PostTypeId="1" CreationDate="2020-03-10T22:09:31.957" Score="7" ViewCount="345" Body="&lt;p&gt;Today, university after university in the US announced moving to online classes. This is perhaps easier in CS than in, say, ceramics or dance, but it still presents unique challenges. &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Can anyone recommend tools for hosting online class meetings with active learning? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;I know I could use Zoom or google chat to simply lecture to students, but when I teach I like to get students working in groups to solve problems. Is there anything like Zoom that allows for a &quot;talk to your neighbor&quot; moment? Or should I just assign students a buddy and have them facetime each other during the active learning portions of class?&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Another question is: what are the other needs we should be thinking about? &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;For instance, I just saw a new question asking about proctoring exams. I'm also thinking about online discussion forums like Piazza where students can get debugging help from each other (the sorts of easy questions they often ask me during class or office hours). But I'm sure there are many aspects of course management I'm not yet thinking about, and hoping others can chime in and suggest some (plus, ideally, software that can help). Feel free to retag. Thanks!&lt;/p&gt;&#xA;" OwnerUserId="294" LastEditorUserId="27" LastEditDate="2020-03-18T20:24:39.377" LastActivityDate="2020-03-18T20:24:39.377" Title="Tools for running classes remotely" Tags="|lecture-tools|distance-learning|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6237" PostTypeId="2" ParentId="6231" CreationDate="2020-03-10T22:15:19.363" Score="7" Body="&lt;p&gt;I agree with Ben I. and Buffy. I'm planning to cancel the remaining exams in the semester (assuming my university ends up moving to online instruction) and replace them with projects. Many studies have shown that project-based learning is more effective for most learners, and especially for learners from underrepresented groups.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;That said, if I needed to proctor an exam remotely, I'd write an exam that's taken online (e.g. using Jupyter Notebooks) and then have all my students share their screens with me. I might also ask them to keep their mics on and their volume off, so I could hear if there was talking going on, but students wouldn't be bothered by the noise coming from each others' settings. You could even just record the whole hour long thing as a video on your machine, and students would know that if they cheated there would be a recording that the professor could dig through in the future to catch them. I think that would be a strong enough disincentive to cheat. It doesn't help with silent texting, but it stops students from actually talking to anyone else who is physically present, or from googling when they should be working on the exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;EDIT: I just learned about a software called &quot;respondus lockdown browser&quot; for exams. You get a two month free trial, which should get you through the end of the semester if deployed at the right time. It prevents students from opening any window other than the one you give them (e.g. to google) and it also films them using their webcam (e.g. to prevent checking the book or texting).&lt;/p&gt;&#xA;" OwnerUserId="294" LastEditorUserId="294" LastEditDate="2020-03-11T15:38:59.827" LastActivityDate="2020-03-11T15:38:59.827" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6238" PostTypeId="2" ParentId="6234" CreationDate="2020-03-10T22:20:21.670" Score="3" Body="&lt;p&gt;I agree with kaya3. You can assign open-ended projects where students apply techniques from the course. Or you can give them more structured projects, e.g., from this book by Havill (the website includes skeleton code):&#xA;&lt;a href=&quot;http://discovercs.denison.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://discovercs.denison.edu/&lt;/a&gt;&#xA;or inspired by these data science projects by Nolan and Temple Lang:&#xA;&lt;a href=&quot;http://rdatasciencecases.org/Data.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://rdatasciencecases.org/Data.html&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could build up to the projects with more and more complex problem-solving done in an online system, where the grading is automatic, like CodingBat. Students can go to Preferences and &quot;Share To&quot; so that their instructor can see a report on their progress. You could assign them 4-5 problems a week, and a project after a couple of weeks of building up their problem solving ability. A zillion exercises in Python can be found on my various pages on there:&#xA;&lt;a href=&quot;https://codingbat.com/home/david.white@denison.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://codingbat.com/home/david.white@denison.edu/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2020-03-10T22:20:21.670" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6239" PostTypeId="2" ParentId="6236" CreationDate="2020-03-10T23:18:57.457" Score="2" Body="&lt;p&gt;A good beginning is to see what tooling is already in place at your institution. Rare are the schools which have zero online content. If it's already in use, you have an expert base to draw on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Not knowing how it's grown over the past decade I can only suggest investigation into Blackboard. As a student I found it easy to use and the non-tech teachers seemed comfortable with it.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of the features, student-facing, which I recall being used are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Online testing, multiple choice through essay (grading I have no clue about)&lt;/li&gt;&#xA;&lt;li&gt;Timed dissemination of resources (date-based and progress-based)&lt;/li&gt;&#xA;&lt;li&gt;Seemingly full featured messaging:&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Non real-time student-instructor message panel&lt;/li&gt;&#xA;&lt;li&gt;real-time one-on-one chat for instructor-student&lt;/li&gt;&#xA;&lt;li&gt;real-time group (class) chat, with instructor piority&lt;/li&gt;&#xA;&lt;li&gt;student-student (controlled by enrolled class) non real-time messaging&lt;/li&gt;&#xA;&lt;li&gt;gradebook with current and progressive totals, with access to the results of each assignment for review&lt;/li&gt;&#xA;&lt;li&gt;instructor to class broadcast messages&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;Personal contact controls seemed to be well made, including using a system supplied email (a couple schools had student email systems) or personal 3rd party email (Gmail, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Ability for student to personalize their interface and link their classes together and merge course calendars into a personal calendar.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;My most recent use of Blackboard was in 2011, and goes as far back as at least 2004, perhaps more. (An earlier school had something like it, but I don't recall if it was Blackboard or otherwise.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Found their website, but haven't done any looking. They are [Blackboard.com][&lt;a href=&quot;https://www.blackboard.com/]&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.blackboard.com/]&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="104" LastEditorUserId="104" LastEditDate="2020-03-11T00:36:16.933" LastActivityDate="2020-03-11T00:36:16.933" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6240" PostTypeId="2" ParentId="6236" CreationDate="2020-03-15T10:11:34.260" Score="1" Body="&lt;p&gt;Here is what I do in my one-to-one sessions. It can be adapted for group sessions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both me and the student login (&lt;code&gt;ssh&lt;/code&gt;) to a central server (a raspberry pi). From here we can launch Gnu &lt;code&gt;screen&lt;/code&gt; to allow us to share a command-line session. We can also launch a VNC server, and both remote connect to it (via &lt;code&gt;ssh&lt;/code&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also use your mobile phones, so we can talk (for us the price is included in the monthly bill). There is also software that can do this. Keep it independent of the other tools, so that you can keep the voice channel open, while changing other things.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both Gnu &lt;code&gt;screen&lt;/code&gt; and VNC, allow view-only connections. This can be used when you want a not trusted buddy to collaborate, they won't be able to type though.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To allow both parties to interact, a session could be spun up in docker. It will have little overhead, however the docker image will need everything that is needed by the students. You could let them install software, but this will be forgotten, when the container is stopped.   &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-03-15T10:11:34.260" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6241" PostTypeId="1" CreationDate="2020-03-17T14:54:12.610" Score="4" ViewCount="112" Body="&lt;p&gt;If one has to teach a 15-week course titled &quot;Artificial Intelligence and Machine Learning&quot; to the postgraduate students of Electronic Engineering, what topics should one teach? Assume the students have not learned any dedicated course on AI or Machine Learning before.&lt;/p&gt;&#xA;" OwnerUserId="8993" LastActivityDate="2020-06-03T22:06:30.573" Title="Which topics should one cover in teaching a course titled “Artificial Intelligence and Machine Learning”?" Tags="|artificial-intelligence|machine-learning|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6242" PostTypeId="1" CreationDate="2020-03-18T20:24:07.677" Score="2" ViewCount="135" Body="&lt;p&gt;We've done pair programming for years with the rule of two kids, one screen, and the kids sitting next to each other.  We have found this to be a tremendously valuable process.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now that all instruction is distance learning due to COVID-19, are there virtual solutions that would allow our students to simulate something like this?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="1293" LastEditDate="2020-03-19T12:35:30.313" LastActivityDate="2020-03-26T20:39:44.187" Title="Distributed Pair Programming in distance education" Tags="|pair-programming|distance-learning|" AnswerCount="4" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6243" PostTypeId="2" ParentId="6187" CreationDate="2020-03-18T21:37:48.630" Score="2" Body="&lt;p&gt;@kaya3's comment links an excellent e-book, which describes the math in fair detail. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'll never get tired of recommending 3blue1brown's amazing video series that both motivates the problem and gives basic intuition but doesn't shortchange the math: &lt;a href=&quot;https://www.3blue1brown.com/neural-networks&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.3blue1brown.com/neural-networks&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5614" LastActivityDate="2020-03-18T21:37:48.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6244" PostTypeId="2" ParentId="6187" CreationDate="2020-03-18T22:58:39.240" Score="2" Body="&lt;p&gt;The online textbook &lt;a href=&quot;http://neuralnetworksanddeeplearning.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Neural Networks and Deep Learning&lt;/em&gt;&lt;/a&gt; by Michael Nielsen is quite good for mathematical content. It assumes the reader understands calculus, but requires no prior knowledge of machine learning. The book's own introduction explains fairly well what the book is about:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The purpose of this book is to help you master the core concepts of neural networks, including modern techniques for deep learning. ... One conviction underlying the book is that it's better to obtain a solid understanding of the core principles of neural networks and deep learning, rather than a hazy understanding of a long laundry list of ideas. If you've understood the core ideas well, you can rapidly understand other new material.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2020-03-18T22:58:39.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6246" PostTypeId="2" ParentId="6242" CreationDate="2020-03-19T08:52:04.190" Score="3" Body="&lt;p&gt;My suggestion would be to utilize seprate tools for elements of the process rather than try to find a packaged solution, or modify an existing tool which is 'not quite right' for the task.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Quick summary is:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use Discord for communications, text and/or audio&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Restricted channels for each pair to utilize while coding&lt;/li&gt;&#xA;&lt;li&gt;Open channel for students to contact the instructor&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/li&gt;&#xA;&lt;li&gt;use the GoLive feature of Discord for the &quot;driver&quot; to stream their active IDE to the &quot;navigator&quot; (GoLive will stream a &quot;terminal&quot; window, it does not have to be a game.)&lt;/li&gt;&#xA;&lt;li&gt;use &lt;code&gt;git&lt;/code&gt; to &quot;lock in&quot; the code between role switches with commits&lt;/li&gt;&#xA;&lt;li&gt;use GPG keys for signing of commits and to authenticate the SSH pushes&lt;/li&gt;&#xA;&lt;li&gt;use GitLab as the remote repository&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2&gt;Use Discord for communications&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;As the instructor:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a Discord server&lt;/li&gt;&#xA;&lt;li&gt;Create a public text channel for the students to reach you in&lt;/li&gt;&#xA;&lt;li&gt;Create a public text channel for the students to share in (you can monitor, but don't communicate here)&lt;/li&gt;&#xA;&lt;li&gt;Create a &lt;em&gt;role&lt;/em&gt; for each assigned student pair&lt;/li&gt;&#xA;&lt;li&gt;Create a private text channel for each &lt;em&gt;role&lt;/em&gt; above&lt;/li&gt;&#xA;&lt;li&gt;Create a private audio channel for each &lt;em&gt;role&lt;/em&gt; above&lt;/li&gt;&#xA;&lt;li&gt;Enable each &lt;em&gt;role&lt;/em&gt; to send/read messages, or connect and use GoLive, in the &lt;em&gt;role&lt;/em&gt;-specific text and voice channels&lt;/li&gt;&#xA;&lt;li&gt;As students join, however you get them to connect, assign them to the &lt;em&gt;role&lt;/em&gt; which matches the assigned pairings&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;As the owner of the server the instructor will be able to read the chat in all text channels, hear the conversation in any audio channel, and view any of the windows being streamed. Instructor preference and style take priority, but my suggestion is to limit any messages sent by the instructor to the designated channel. Moderator type actions can, and of course should, be taken in any channel. Going remote still leave &quot;classroom discipline&quot; in the instructor's hands.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the school term progresses, it's likely that pairs are reassigned frequently. Perhaps as often as each new project. Once a project is graded, the associated text channel could be reset, or removed.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use &lt;code&gt;git&lt;/code&gt;&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;While &lt;code&gt;git&lt;/code&gt; may not be &lt;em&gt;The one &lt;strong&gt;true&lt;/strong&gt; source control system&lt;/em&gt;, it is a popular one. The command line use of it can be quite complicated, especially for advanced purposes. The basics of it, however, are quite manageable for students. GUI tools also exist, though I'm reluctant to endorse any one, or even recommend their use. With students learning to use &lt;code&gt;git&lt;/code&gt; it is probably better for them to learn the CLI commands, which will work on any OS, and on any system with &lt;code&gt;git&lt;/code&gt; installed. The GUI they learn might not work on the system they have to use later, for work or for advanced classes. The GUI probably won't work if they have to use SSH for any reason as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Using &lt;code&gt;git&lt;/code&gt;, as long as both students have access to the repo, allows for one to make changes, commit the results, and pass control to the other when they switch roles. As an extra benefit, since the current &quot;navigator&quot; will have the last committed version locally, they can scan through the file(s) to review other parts while directing the &quot;driver&quot;. Ensuring that identifier names and parameters are used correctly, for example, without disturbing the &quot;driver&quot; with those details, allowing the driver to concentrate on the section of code being changed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As a benefit to the students, they'll have the ability to unroll changes that were leading down a dead-end. As a benefit to the instructor, each commit will be blamed to the student driving. Additionally, by following the diffs, it's likely that when the team gets lost in the weeds, the instructor can see what thinking started the problem, and help them to see the way out.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Use GPG keys&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The &quot;remote&quot; aspect of this is challenging for instructors to &quot;watch&quot; the students work. Having to worry about who is doing the work and who is not only adds to the work load. Requiring that the students GPG-sign their commits can help with that some. Not only will the repository assign the updates to the user, it will also verify that the user claiming the updates is the same one who signed them. There is no encryption involved, just a signing of the commit to prove who made it. Using it, however, might require the students to install GnuPG on their systems. Encouraging them to do so shouldn't cause any issue, and it can be a good habit to develop for later as well.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The process of setting up a key for use with the &lt;code&gt;git&lt;/code&gt; program, and for connecting to the remote repository is fairly simple. Even from the command line.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Generate the key pair to use. The key pair needs to have both singing and authorization capabilities.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;gypsy@spellweaver:~&amp;gt; gpg --quick-generate-key &quot;Student Name &amp;lt;email.name@some-school.edu&amp;gt;&quot; future-default auth,sign&#xA;We need to generate a lot of random bytes. It is a good idea to perform&#xA;some other action (type on the keyboard, move the mouse, utilize the&#xA;disks) during the prime generation; this gives the random number&#xA;generator a better chance to gain enough entropy.&#xA;gpg: key A822359C643A77A4 marked as ultimately trusted&#xA;gpg: revocation certificate stored as '/home/gypsy/.gnupg/openpgp-revocs.d/11716FF672B9DD368C174F26A822359C643A77A4.rev'&#xA;public and secret key created and signed.&#xA;&#xA;pub   ed25519/A822359C643A77A4 2020-03-19 [SCA] [expires: 2022-03-19]&#xA;    Key fingerprint = 1171 6FF6 72B9 DD36 8C17  4F26 A822 359C 643A 77A4&#xA;    Keygrip = 92F62A329D3CBBBE64BFA8DABC6F4348623AB256&#xA;uid                            Student Name &amp;lt;email.name@some-school.edu&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;The ASCII version of the public key will be needed when setting up the repository.&#xA;This block will be copy-pasted to the repository within the user's account settings.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;gypsy@spellweaver:~&amp;gt; gpg --armor --export A822359C643A77A4&#xA;-----BEGIN PGP PUBLIC KEY BLOCK-----&#xA;&#xA;mDMEXnMHZxYJKwYBBAHaRw8BAQdAjh6qOGnp5b0GTNZEHL4wIrIljwxLlxfU8/F5&#xA;l8TZVNC0KVN0dWRlbnQgTmFtZSA8ZW1haWwubmFtZUBzb21lLXNjaG9vbC5lZHU+&#xA;iJ0EExYKAEUWIQQRcW/2crndNowXTyaoIjWcZDp3pAUCXnMHZwIbIwUJA8JnAAsL&#xA;CQ0IDAcLCgMBBAYVCgkICwMFFgMBAgACHgECF4AACgkQqCI1nGQ6d6RXEAD/Rdhz&#xA;kh+gNvnO367JYqdoIwFiIsW4a2mq3d4nqNE6migBAM3m8cMO2Ww2u5+O7l8P4GuI&#xA;EMTlK2WWckAEJUGS1pMO&#xA;=6LSb&#xA;-----END PGP PUBLIC KEY BLOCK-----&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;The public key needs to be saved in SSH format.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;gypsy@spellweaver:~&amp;gt; gpg --output id_ed25519.pub --export-ssh-key email.name@some-school.edu&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;The public key will be needed when setting up the repository on GitLab.&#xA;The last line is what will be copy-pasted in the settings of the repository for the SSH key.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;gypsy@spellweaver:~&amp;gt; cat id_ed25519.pub&#xA;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII4eqjhp6eW9BkzWRBy+MCKyJY8MS5cX1PPxeZfE2VTQ openpgp:0x643A77A4&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;ol start=&quot;5&quot;&gt;&#xA;&lt;li&gt;the &lt;code&gt;git&lt;/code&gt; program needs to be set to always gpg-sign commits and told which key to use&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;git config --global commit.gpgsign &quot;true&quot;&#xA;git config --global user.signingkey &quot;A822359C643A77A4&quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2&gt;Use GitLab as the remote repository&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;Usually GitHub vs GitLab is more about personal preference than any project-based requirements. The granularity of permissions in GitLab is better than GitHub, allowing the instructor to grant access to the assignment repos on a per-user basis. GitLab allows for unlimited private repositories without having to create a paid account. Let's face it, as a rule educators don't have the spare funds to support enterprise level tooling. GitLabs give for free what GitHub will charge for. As it is student work, private repos seems more appropriate on two grounds. First, normally student assignments are not available to the general public. Even more so when dealing with under-age students. Second, by having private repos, with only the pair of students working on it being granted access, the ability to copy one team's work by another team is greatly reduced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Three additional factors available from GitLab which might be useful are: 1) Discord Notifications, 2) their Continuous Integration (CI) pipeline, and 3) the ability to install a local, or self-hosted, GitLab for greater security. Depending on the language being use, the CI pipeline might help in keeping variations in build environments between student systems, or between their system and the instructor's system, from hiding or creating errors.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Tidbits and Notes&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;One possible downside to Discord is that it &lt;em&gt;can&lt;/em&gt; also be used for video calls. That, however, is a something which is available through the &quot;friends&quot; section rather than in the &quot;server&quot; you would be responsible for, so it shouldn't count against you, or the application.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A bonus for Discord is that the odds are high that most of the students already have it installed, and know how to use it. They probably know how to use it better than the instructor would.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For the current crisis (COVID-19) Discord has increased the size of GoLive streams to 50. That shouldn't matter unless it's decided to us the GoLive feature for the instructor to do demonstrations, which is also a possibility.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If the students have an assigned email account from the school, it is probably a good idea to require that such email be the one associated with the GPG keys and the accounts on GitLab. Official required communications should be done by email using that address as well. Assignment instructions, due dates, grades, etc., rather in the untracked space of Discord.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To &quot;invite&quot; the students to the Discord server, create short-lived, single-use invites for each student, and send that in an email to them rather than a general invited for the class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For most Linux systems, &lt;code&gt;git&lt;/code&gt; is a simple install, directly from the default software repositories. For Windows it takes a bit more work. A guide, which seems to be pretty good, is &lt;a href=&quot;https://www.computerhope.com/issues/ch001927.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to install and use Git on Windows&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An advantage, and possible disadvantage of using the GoLive option is that each student can have their own version of the IDE, customized to their preferences. It's even possible they could use a different IDE than they would in class, and different from what their partner is using.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The potential problem with this is that they could become lost in the IDE and the instructor, having never used &lt;em&gt;that one&lt;/em&gt; might not be able to help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;An unplanned benefit could be that new insights into student preferences, including IDE choices, can be obtained by noticing which IDE students gravitate towards, and how they use them. Once classroom instruction is able to resume, a change of IDE for in-class use might be in order.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The 24/7 availability of the tools can get the students into the habit of &quot;calling&quot; the instructor an anytime, without thinking that there are other things to do, or classes to work with. Setting a time for &quot;class&quot; where you will be available on the server for direct contact, perhaps during the same time-span as class was held when it could be held. To avoid the appearance of always being available it might be worth creating a different server for each class, keeping your &quot;office hours&quot; on each server in turn.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2020-03-19T08:52:04.190" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6247" PostTypeId="2" ParentId="6242" CreationDate="2020-03-19T10:23:30.633" Score="1" Body="&lt;p&gt;In the past I've successfully used XPairtise for Eclipse. The Eclipse marketplace shows this and a couple of others: &lt;a href=&quot;https://marketplace.eclipse.org/category/free-tagging/pair-programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://marketplace.eclipse.org/category/free-tagging/pair-programming&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A separate voice or text channel might be good to use with it. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you want something with a fast and seamless switch between driver and navigator and also integration with the testing system. Eclipse with a plugin gives you that. The switch of roles should be as quick as passing the keyboard from one person to the other in co-located programming. Here it might be &quot;click a button to switch roles.&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that XPairtise hasn't been updated for a while and the others listed are newer. I haven't tried them.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A web search for &quot;distributed pair programming&quot; will probably give more information.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-03-19T12:05:38.303" LastActivityDate="2020-03-19T12:05:38.303" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6248" PostTypeId="2" ParentId="6242" CreationDate="2020-03-21T20:01:57.730" Score="2" Body="&lt;p&gt;I've been experimenting with AWS Cloud9 with a view to remote pair-programming (at the professional level). Also, as a means of (vocational level) coaching of young professionals currently working-from-home. Might it meet your needs?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, Amazon have various educational tie-ups, which your school/system might investigate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Disclaimers: AWS is subject to US 'export controls'; some don't like using such service-providers in principle; I have no link to AWS other than as a user.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Regards =dn&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2020-03-21T20:01:57.730" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6249" PostTypeId="2" ParentId="6234" CreationDate="2020-03-22T23:40:02.487" Score="0" Body="&lt;p&gt;One excellent resource to introduce students to Python programming remotely is CMU CS Academy (with which I am affiliated). CMU CS Academy is a free online, interactive high school computer science curriculum.  The curriculum includes notes, exercises with an autograder, creative tasks at the end of each unit to apply what they have learned so far, as well as quizzes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;They are currently providing daily webinars for educators interested in learning more.  You can sign up at &lt;a href=&quot;https://academy.cs.cmu.edu/r/12103?fbclid=IwAR0b7O9En6dRqFp6p8a2cik62GAXlHyiWqnXK3oELM3afHReZQf-lrakBrk&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://academy.cs.cmu.edu/r/12103?fbclid=IwAR0b7O9En6dRqFp6p8a2cik62GAXlHyiWqnXK3oELM3afHReZQf-lrakBrk&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8998" LastEditorUserId="27" LastEditDate="2020-03-24T02:02:24.093" LastActivityDate="2020-03-24T02:02:24.093" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6250" PostTypeId="2" ParentId="6221" CreationDate="2020-03-23T23:33:59.513" Score="2" Body="&lt;p&gt;Two ideas: &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The recommendation for teaching is usually to explain things in a way that the students can understand. Usually this means giving an age-appropriate response to questions that young children ask. The key is to present your material, and only go outside it when someone &lt;em&gt;asks&lt;/em&gt; a question. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It is fine to say that Sequence, Selection and Iteration are all that you need to write a &lt;em&gt;program&lt;/em&gt;. But to have a &lt;em&gt;computer&lt;/em&gt; you also need interrupts, otherwise the computer would not respond to us at all. &lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;When the subject of interrupts came up, I would say that originally, there was an interrupt line that went straight in to the CPU and which caused it to set aside what it was doing and invoke a different (small) program to handle the interrupt. Then I would explain that this is how the keyboard is read, the mouse handled, the screen redrawn, and basically almost everything else that makes a computer actually interact with people, rather than just calculating something invisibly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Interrupts are on a different level than programming. It changes a machine in to a tool that responds. Otherwise we would still be using punched cards. Programming is necessary to get the computer to 'talk' to us, but not sufficient for it to 'listen'. &lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2020-03-23T23:33:59.513" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6251" PostTypeId="1" CreationDate="2020-03-24T06:43:49.903" Score="1" ViewCount="81" Body="&lt;p&gt;Sorry if not a question about Computer Science / IT / digital literacy. However I am teaching these, and it is about use of IT (Communication Technology) in teaching.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have now started to teach multiple people remotely (3 classes of &gt;20, yesterday). Key stage 3 pupils (years 7-9) (ages 11-14 ish).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have sent them work to do. Some of them just get on with in. Others are having difficulty. The problem that I am having is with feedback.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some are not telling me what a wonderful job of study they are doing (I found out later).&lt;/li&gt;&#xA;&lt;li&gt;Some are asking for help, but are not clear &quot;I don't get it!&quot;. &quot;I tried it, and it does not work&quot;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;How do a train this second group in how to give good feedback. I have no idea what these comments mean. They could mean:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I did it, this was too easy, did I miss something. (I would still want them to express what they did and show evidence of learning).&lt;/li&gt;&#xA;&lt;li&gt;I don't know what you are asking me to do. &lt;/li&gt;&#xA;&lt;li&gt;I know &lt;strong&gt;what&lt;/strong&gt; to do, but not &lt;strong&gt;how&lt;/strong&gt; to do it.&lt;/li&gt;&#xA;&lt;li&gt;I can't open the resource.&lt;/li&gt;&#xA;&lt;li&gt;I know what to do. I know how to do it. If I was in the classroom, then I could do it, but I can't do it here. Because {I don't have the correct equipment, I don't know how to set it up}.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="27" LastEditDate="2020-03-24T15:54:38.827" LastActivityDate="2020-03-29T04:14:56.847" Title="Training students to give better feedback, when remote teaching" Tags="|distance-learning|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6252" PostTypeId="2" ParentId="6187" CreationDate="2020-03-24T10:04:09.857" Score="3" Body="&lt;p&gt;Higham and Higham's &lt;a href=&quot;https://arxiv.org/pdf/1801.05894.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Deep Learning: An Introduction for Applied&#xA;Mathematicians&lt;/a&gt; is a fairly short introduction to neural networks that is written with mathematicians in mind.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another reference I would recommend is Shalev-Shwartz and Ben-David's &lt;a href=&quot;https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Understanding Machine Learning: From Theory to Algorithms&lt;/a&gt;, particularly chapter 20.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of the above approach neural network theory in the more traditional Definition–Theorem–Proof structure. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I think it is worthwhile to build a simple network yourself in order to learn the principles before diving into a framework such as TensorFlow, if you're hoping to gain understanding of the principles rather than treating a neural network as a black box which might work, or not. The recommendation of &lt;a href=&quot;http://neuralnetworksanddeeplearning.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Neural Networks and Deep Learning&lt;/a&gt; in kaya3's answer is useful for this, as Nielsen does write neural networks from scratch to demonstrate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For some theoretical background you may also find interest in &lt;a href=&quot;https://www.sciencedirect.com/science/article/abs/pii/0893608089900208&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hornik et al. (1989)&lt;/a&gt; and &lt;a href=&quot;https://www.nature.com/articles/323533a0&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rumelhart et al. (1986)&lt;/a&gt; if you have access.&lt;/p&gt;&#xA;" OwnerUserId="2" LastActivityDate="2020-03-24T10:04:09.857" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6253" PostTypeId="2" ParentId="6251" CreationDate="2020-03-24T15:57:32.967" Score="3" Body="&lt;p&gt;Since you are working remotely, I might direct them to a Google Form that asks followup questions.  So, if they initially chose &quot;Something doesn't work!&quot; the form would follow up with a series of questions:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What, very specifically, doesn't work?&lt;/li&gt;&#xA;&lt;li&gt;What is it doing instead?&lt;/li&gt;&#xA;&lt;li&gt;What have you tried so far?&lt;/li&gt;&#xA;&lt;li&gt;Please paste only the relevant parts of your source code here.  (Don't give me parts of the source code that you are sure are not relevant!)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;It's almost like (gently) easing the kids in to SE norms :)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-03-24T15:57:32.967" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6254" PostTypeId="2" ParentId="6251" CreationDate="2020-03-24T17:50:20.567" Score="2" Body="&lt;p&gt;Even before the course starts give them a document that explains something of your concerns. The important point is that &quot;I can't read your mind.&quot; You have to tell me about your problems. Give a few examples of the kinds of things that don't help and show better alternatives for each. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I note that the students are quite young and may have some trouble learning this (as any) lesson. But it is better to deliver the message at the start to everyone so that it doesn't sound like individual criticism when you remind someone that you can't read their mind. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But a few examples might help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, what BenI. said. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-03-24T17:50:20.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6255" PostTypeId="2" ParentId="6221" CreationDate="2020-03-25T23:14:38.767" Score="3" Body="&lt;p&gt;You might first begin by explaining how a program begins running. The program is not always running. It simply stored somewhere, but dormant. Some event &lt;strong&gt;external&lt;/strong&gt; to the program causes it to run. Generally this is a click on an icon. Some running program is notified of this click and does the work necessary to get the selected program running.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When you write an &lt;code&gt;on-block&lt;/code&gt; you are defining some code to to be run &lt;strong&gt;when&lt;/strong&gt; a specific  &lt;strong&gt;external&lt;/strong&gt; event occurs. That is, you don't see the invocation of this code within in your own program. But you have told the outside world that if an event occurs, notify me by running this block of code. If you never define such a block, then your program will not be notified that it has happened. Since the &lt;code&gt;on-block&lt;/code&gt; is inside your program it can alter the state of the program. As Scott Rowe pointed out, your program is &quot;listening&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ultimately, it all begins with the hardware and operating system. Actions like keyboard presses, or mouse movement cause an electrical signal. The interrupt handler looks at the signals and decides what to do with them. Eventually, it is passes them on to the program(s) that have expressed interest in the event. But just because program has expressed interest in a type of event, doesn't mean it will receive that event. A drawing program is interested in mouse movement so you can &quot;draw&quot; things by moving the mouse. But even if the program is running, it will only receive the event when the mouse is &lt;strong&gt;in&lt;/strong&gt; the window, and the window has &lt;strong&gt;focus&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And when your program terminates, it will no longer receive any events until it is run again. If you turn off your computer, no signals are handled. You can type on the keyboard, but there is nothing listening.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2020-03-25T23:14:38.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6257" PostTypeId="2" ParentId="6242" CreationDate="2020-03-26T20:39:44.187" Score="1" Body="&lt;p&gt;Keep it simple and integrate into tools that your school is already using as much as possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, my university is using MS Teams (which &lt;a href=&quot;https://products.office.com/en-us/microsoft-teams/remote-learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;may currently be free for everyone&lt;/a&gt;). To do pair programming, each pair of students sets up a call with each other and one person shares their IDE window (we use Thonny). The other one then requests control, so either person can play either role (driver or navigator).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Edits welcome for corresponding info about Zoom.)&lt;/p&gt;&#xA;" OwnerUserId="4860" LastActivityDate="2020-03-26T20:39:44.187" CommentCount="0" CommunityOwnedDate="2020-03-26T20:39:44.187" ContentLicense="CC BY-SA 4.0" />
  <row Id="6259" PostTypeId="1" CreationDate="2020-03-27T18:33:49.097" Score="7" ViewCount="435" Body="&lt;p&gt;I'd like to try teaching an online lesson to high school CS students on modeling the spread of a virus. Ideally it would be something that could be coded in a spreadsheet, Code.Org's Game Lab or App Lab, or in Unity.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd appreciate any pointers to how to get started – what are the important underlying concepts for students to understand, what are the minimal skills they would need to produce a &quot;satisfying&quot; model, what are the key variables that a model should incorporate?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions about how to get my own head around the field, or videos of modelers talking about their work, or articles would all be welcome.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;First: many thanks for the great and concrete suggestions coming in, they really help.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Second: this is, or could be, a collaboration across disciplines – math, CS, health, social studies, and art / graphic design all have a role in developing and presenting a good model.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Third: clearly, in these times, this is a distance learning question as well.&lt;/p&gt;&#xA;" OwnerUserId="134" LastEditorUserId="134" LastEditDate="2020-03-28T18:08:40.230" LastActivityDate="2020-03-30T13:13:01.503" Title="HS Lessons On Modeling Virus Spread" Tags="|lesson-ideas|distance-learning|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6260" PostTypeId="2" ParentId="6259" CreationDate="2020-03-27T19:07:37.723" Score="4" Body="&lt;p&gt;Here are two resources that might be appropriate, but neither is a spreadsheet model. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first is a resource called Contagion that has just been created for the Greenfoot Java system (IDE plus resources). You can find it at the &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The second is a section on Simulation in a book called &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1940113067&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polymorphism Companion&lt;/a&gt;. The book is actually the second volume of a pair and you might need the first one also &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1940113059&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polymorphism: As It Is Played&lt;/a&gt;. They are both about using polymorphism, especially in Java. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both of these resources model a disease spreading through a population. They have various parameters you can set to get some realistic(ish) results. Think of a &lt;em&gt;Disease&lt;/em&gt; interface, for example, with diseases of various characteristics implemented via polymorphism. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-03-28T00:01:14.790" LastActivityDate="2020-03-28T00:01:14.790" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6261" PostTypeId="1" CreationDate="2020-03-27T21:59:25.107" Score="1" ViewCount="44" Body="&lt;p&gt;I need to create tests on Blackboard and customize access time for different groups of students. Anyone knows how to do this?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="27" LastEditDate="2020-03-28T00:22:40.497" LastActivityDate="2020-03-28T00:22:40.497" Title="How to limit access to tests on Blackboard?" Tags="|exams|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6262" PostTypeId="2" ParentId="6259" CreationDate="2020-03-27T22:01:57.213" Score="5" Body="&lt;p&gt;I teach a Mathematical Modeling elective at the high school where Ben I. and I teach. I would love to do an in-depth object-based model using programming with my students, but generally speaking I don't have the ability to assume that all of my students know how to code. &lt;em&gt;Most of them,&lt;/em&gt; but not all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, my solution is typically to use spreadsheets and the standard differential equation models to deal with disease spread. One of the simplest models is what's called the SIR model, which is an example of a &lt;a href=&quot;https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology&quot; rel=&quot;noreferrer&quot;&gt;compartmental model&lt;/a&gt; . Because these mathematical models are focused on total numbers in each category of the population and not on individuals, a spreadsheet is sufficient to see what happens.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Typically, for a three-compartment model, you need a minimum of three columns/variables to track overall counts. I would strongly recommend a fourth to keep track of time, and if you want, a fifth to keep track of deaths. You will need initial values for each quantity and parameters that are used to keep track of movement from one category to another.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, if I use the F1 cell to store the virulence parameter of the disease, F2 to store the recovery rate and F3 to store the lethality parameter, then we can build the model. I also recommend including a time-step parameter somewhere, let's say in F4. This will give you one control that will help to avoid calculation nonsense if some of your numbers are too large.&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;          A         B         C         D          E         F&#xA;1         Time      Suscept   Infected  Recovered  Dead      virulence (1/1000000)&#xA;2         0         10000     1         0          0         recovery (1/100)&#xA;3         A2+F$4    B formula C formula D formula  E formula lethality (1/1000)&#xA;4         c  o  p  y     t  h  e     f  o  r  m  u  l  a  s  time step (0.1)&#xA;&#xA;Where the B formula in B3 is =B2-F&lt;span class=&quot;math-container&quot;&gt;$4*(F$&lt;/span&gt;1*B2*C2)&#xA;Where the C forumla in C3 is =C2+F&lt;span class=&quot;math-container&quot;&gt;$4*(F$&lt;/span&gt;1*B2*C2-F&lt;span class=&quot;math-container&quot;&gt;$2*C2-F$&lt;/span&gt;3*C2)&#xA;Where the D formula in D3 is =D2+F&lt;span class=&quot;math-container&quot;&gt;$4*(F$&lt;/span&gt;2*C2)&#xA;Where the E formula in E3 is =E2+F&lt;span class=&quot;math-container&quot;&gt;$4*(F$&lt;/span&gt;3*C2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Drag those formulas down as far as you want and make a scatter plot with all of the variable columns highlighted and you have a basic differential equation epidemiological model. It can be used to convey the &lt;em&gt;very important fact&lt;/em&gt; that the most dangerous diseases to a population are the ones which are highly contagious, and not the ones that will kill you quickly, and that the ones which are highly lethal are actually safer for the population.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want other lessons from this, you're going to need to delve into the more complicated epidemiological models that demonstrate the effects of things like imposed quarantine, self-quarantine behavior, gathering of sick people at hospitals, vaccination, re-infection, or multi-stage diseases.&lt;/p&gt;&#xA;" OwnerUserId="281" LastActivityDate="2020-03-27T22:01:57.213" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6263" PostTypeId="2" ParentId="6259" CreationDate="2020-03-28T15:04:50.640" Score="4" Body="&lt;p&gt;You probably could adapt A. K. Dewdney’s “Sharks and Fishes” programming challenge from his old Scientific American column (&lt;a href=&quot;https://www.cs.mcgill.ca/~carl/fishnsharks.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.mcgill.ca/~carl/fishnsharks.html&lt;/a&gt;).  Here’s another example of it being used in education &lt;a href=&quot;https://people.eecs.berkeley.edu/~jrs/61bf06/hw/pj1/readme&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://people.eecs.berkeley.edu/~jrs/61bf06/hw/pj1/readme&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In this case, you could just have one subject type (people) but maintain states for them with pixel colors :&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;White: Uninfected&lt;/li&gt;&#xA;&lt;li&gt;Yellow: Infected but asymptomatic (optional)&lt;/li&gt;&#xA;&lt;li&gt;Red: Infected&lt;/li&gt;&#xA;&lt;li&gt;Green: Recovered (immune)&lt;/li&gt;&#xA;&lt;li&gt;Black: Deceased&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;You can make the people like sharks in that they move around (unless sick or deceased) and have a chance of infecting others within a certain distance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you can study how changing parameters affects the spread:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Population total/density&lt;/li&gt;&#xA;&lt;li&gt;Probability of infection&lt;/li&gt;&#xA;&lt;li&gt;Range of contact for infection&lt;/li&gt;&#xA;&lt;li&gt;Length of illness before recovery/mortality&lt;/li&gt;&#xA;&lt;li&gt;Chance of recovery vs mortality&lt;/li&gt;&#xA;&lt;li&gt;Social Behavior: people/sharks move towards each other, vs moving away from each other&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Initially, it might be easier to just start with the Sharks and Fishes problems and when completed, morph it into a mobile infection problem.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively, you could start with a non-mobile problem (ie., people don't move), just make sure that in the initial distribution of people, everyone is adjacent to at least one other person.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;I had missed the part about doing it in a spreadsheet.  If you mean just doing it with spreadsheet formulas, then you'll probably run into a problem with circular references.  In Excel I think that you can use either the Optimization tools or else advanced settings to get around that, but its tricky.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In Excel for Windows (but not the other OS's) you can use VBA to implement a simple model like this.  I did it decades ago, but I don't have any of those with me now.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If a full blown VBA project is too much, then you could also do it with just sheet formulas and one or two simple VBA macros.  Let me know if you want and I can explain how.&lt;/p&gt;&#xA;" OwnerUserId="2178" LastEditorUserId="2178" LastEditDate="2020-03-30T13:13:01.503" LastActivityDate="2020-03-30T13:13:01.503" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6264" PostTypeId="2" ParentId="6251" CreationDate="2020-03-29T04:14:56.847" Score="2" Body="&lt;p&gt;The brutal truth is that most of us are quite weak when it comes to asking questions. Given the age-group with which you're working, I'm a little surprised. I thought youngsters a little less ego-defensive.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my experience with MOOCs, grads seemed to ask questions constructively: I was doing 'this', expecting 'that' (most often, what the coursework predicts), but 'something else' occurred. When the demography changed to more 'ordinary people', the quality of questioning declined.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Hey, even my first-before-all-else position as telephone 'TechSupport' to my mother, suffers from this problem: &quot;how did it go?&quot; &quot;Oh, I did that but nothing happened; so I'm just waiting&quot; or &quot;press the Menu button&quot;, &quot;but I can't see a menu button on the keyboard&quot; - and she's ninety, not nine! (and had better not ever read this!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd consider it rude were one of my tutors to say things like: &quot;you have to tell me 'everything' because my crystal ball is broken&quot; despite the (massive) temptation to do so. Take a deep breath before responding - even help someone else before coming-back to 'the problem'. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, if you are receiving 'the same question', that may indicate a 'gap' in the materials. Similarly, there is no harm in answering 'Barney's' &quot;similar question' by referring him to the response you gave 'Fred'. In fact, it may encourage them to help each by answering each other's questions (collaboration, social learning, ...) - but I presume you have some sort of 'bulletin board' discussion environment cf one-to-one email or similar.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your students (and many of my vocational trainees) are used to having you/someone 'right there'. So, remote work is a big change for them too. Frustration will arise! Meantime, don't discount your own frustration at trying to help but being unable to see even the slightest hint of what (s)he's doing and the results thereof!&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I have found that giving out pages of HowTo advice at the beginning of a course is largely wasted. Probably because there is so much (other) 'bureaucracy' at a time when most are feeling 'enough already! Just get on with it...'. Even(?) university students are guilty of this. When we refer them to such hand-outs, the excuses come back thick-and-fast - inevitably, &quot;I didn't read it&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Accordingly, you might like to devote some time to explaining 'the new normal' during your next class - perhaps a 'filler'/break in-between major teaching-objectives; or whilst giving pause before repetition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;You could even give them an assignment to do with a member of their family - the student is blind-folded or facing the other way/into a corner, the other operates the computer or carries-out some common (multi-step) task but with &quot;dumb insolence&quot; (only acting literally, to the letter-of-the-law). It's a 'what is computer programming' exercise, but questions are a form of instruction too! Thereafter link the lesson-learned to question-asking skills on-line...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, remember how last-minute-merchants tend to be in a state of 'panic'? They may not intend to be quite so rude or to give opaque descriptions. Sometimes addressing the person 'behind' the question can help. Once the trainee has settled, a more meaningful conversation should follow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Which brings me to the suggestion that (I'm assuming assignments span days), it is a good idea to ask a question which encourages thought about the assignment on (perhaps) a daily basis. Firstly, you are encouraging an early start (we can but hope!). Secondly, repetition is a key to 'learning' (apologies!). Thirdly, you help kids who don't have self-organisation skills, which they will also need to be learning if this is their first on-line course! However, the big-win is that with 'good design' of your reminder/follow-ups, it should start to encourage questions to take the form: 'you know how you said... well when I tried... and this is what happened... How come?' which helps to create exactly the structure for which you yearn! &#xA;(well OK, sorry but nothing's perfect!)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may like to take a look at &lt;a href=&quot;https://blog.edx.org/tips-for-successful-online-learning/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://blog.edx.org/tips-for-successful-online-learning/&lt;/a&gt; plus its links. There used to be a free, not-for-credit course as a gentle introduction to learning on-line, but my quick-look, just now, failed to spot it. NB that course took a trainee's point-of-view cf the plethora of 'transitioning to teaching on-line' courses aimed at teachers! (that said, if you've never been trained to present on-line, might such a course include exactly this question?) &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Try also &lt;a href=&quot;https://www.futurelearn.com/using-futurelearn/why-it-works&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.futurelearn.com/using-futurelearn/why-it-works&lt;/a&gt; although that seems to be the hows-and-whys of their implementation of many of Hattie's ideas and philosophies. They also offer &lt;a href=&quot;https://www.futurelearn.com/learning-guide&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.futurelearn.com/learning-guide&lt;/a&gt; as a PDF or epub (registration required) but you would have to heavily re-word this before use directly with students in such young age-groups (use with their parents might be another and valid approach though)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Welcome to this brave, new, world! All the best... =dn&#xA;(Disclaimer: I have used the edX platform to present (and answer questions) for many years)&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2020-03-29T04:14:56.847" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6266" PostTypeId="1" AcceptedAnswerId="6267" CreationDate="2020-03-30T20:40:09.177" Score="4" ViewCount="181" Body="&lt;p&gt;I am a retired college teacher, now trying to teach computing to middle school kids.  One of the parts of the definition of &quot;algorithm&quot; is that it must be &quot;effectively computable.&quot;  I'm looking for an example that is &lt;em&gt;not&lt;/em&gt; Turing computable.  I've used &quot;solve world hunger&quot; in the past, but but that seems fuzzy and amorphous.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today I've spent some time with &quot;Label an arbitrary statement as true or false,&quot; but I can't make it sing in a way that kids will say, &quot;Yeah... that's right.&quot;  Busy Beaver and the halting problem are both too complicated to explain in a few minutes.  (I know about &lt;a href=&quot;http://www.lel.ed.ac.uk/~gpullum/loopsnoop.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scooping the Loop Snooper&lt;/a&gt; and have even assigned it as reading, but it would still take too much classroom time.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Suggestions, either of new ideas or of a way to make &quot;Label an arbitrary statement...&quot; sing to the students would be most appreciated.&lt;/p&gt;&#xA;" OwnerUserId="3524" LastActivityDate="2020-11-29T22:34:28.230" Title="Counter-Example for Computability" Tags="|lesson-ideas|" AnswerCount="6" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6267" PostTypeId="2" ParentId="6266" CreationDate="2020-03-31T03:40:04.797" Score="2" Body="&lt;p&gt;I guess I'm not understanding what the problem is with &lt;em&gt;fuzzy&lt;/em&gt; when talking about computability with a group of 12 year olds.  They can instantly grok the notion that the question isn't one that computers can address.  You could also go with moral/ethical dilemnas.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you want something more mathematical that they can still probably understand, ask them whether the last digit of &lt;span class=&quot;math-container&quot;&gt;$\pi$&lt;/span&gt; is computable, even by the fastest computer that could ever exist in some theoretical universe.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Finally, there's always my favorite undecidable problem on Wikipedia: &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_undecidable_problems#cite_note-9&quot; rel=&quot;nofollow noreferrer&quot;&gt;Determining whether a player has a winning strategy in a game of Magic: The Gathering.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-03-31T03:40:04.797" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6268" PostTypeId="2" ParentId="6266" CreationDate="2020-03-31T11:01:39.160" Score="1" Body="&lt;p&gt;The key feature of a Turing Machine is that it is finite, though unbounded. Any problem that implies actual infinity either in time (halting) or space (the tape), isn't Turing Computable. So, computing &lt;em&gt;all&lt;/em&gt; the digits of pi (an infinite sequence) isn't computable, though a TM can compute any prefix. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you don't even need to discuss irrational numbers to come up with an example. A TM can't list &lt;em&gt;all&lt;/em&gt; of the odd integers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The Halting Problem on the other hand is concerned with time. Any computation must take a finite (though unknown) amount of time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And even though the TM is normally described as having an infinite tape, the requirement that an algorithm terminate (finite time) implies that only a finite section of the tape can be read or written (finite space). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And I think that an accurate description of the limits of a TM lets you avoid magic as well as the fundamentally unknowable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Owen Astrachan (Duke U) once presented a simple illustration of the Halting Problem. If you look on &lt;a href=&quot;https://users.cs.duke.edu/~ola/papers.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;his &quot;papers&quot; page&lt;/a&gt;, follow the link labelled &lt;em&gt;Self Reference&lt;/em&gt; (a pdf). I've pointed to the containing page since it should be of general interest to readers here. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-03-31T12:30:40.937" LastActivityDate="2020-03-31T12:30:40.937" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6269" PostTypeId="2" ParentId="6266" CreationDate="2020-03-31T16:12:54.510" Score="6" Body="&lt;p&gt;Strachey's proof for the Halting Problem is accessible to anyone who accepts reasoning by contradiction.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;See &#xA;&lt;a href=&quot;https://academic.oup.com/comjnl/article/7/4/313/354243&quot; rel=&quot;noreferrer&quot;&gt;https://academic.oup.com/comjnl/article/7/4/313/354243&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/XrkFg.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/XrkFg.png&quot; alt=&quot;Small note by C. Strachey&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2103" LastActivityDate="2020-03-31T16:12:54.510" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6270" PostTypeId="2" ParentId="6266" CreationDate="2020-03-31T17:33:07.003" Score="2" Body="&lt;p&gt;This isn't an answer, but you might find it interesting for this age level. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've included it because at this stage of development, some discussion of finite, infinite, bounded, and unbounded might be a useful concept to teach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is a programming assignment in two parts. A number is rational if and only if its decimal expansion repeats a finite sequence of digits infinitely. This results in the two parts of the assignment.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example 3/7 = 0.428571... where the ellipsis is the infinite repetition of the six digits just preceding it. And 1/5 = .20 just repeats 0 infinitely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part 1 of the assignment. Write a program in your favorite programming language that will take a rational number - a fraction - less than 1 (so that it's leftmost digit will be 0) and find the minimal decimal repeating sequence. For 3/7 it would be 4, 2, 8, 5, 7, 1. This is actually an exploration of the standard &quot;by-hand&quot; division algorithm that was and maybe is known to all students. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part 2. Take a repeating decimal value less than 1 and find the fraction equivalent to it with the fraction given in lowest terms. That is, find the numerator and the denominator of the fraction in lowest terms. This requires finding the GCD of two values so that you can reduce a first computed value to lowest terms. 3/7 is quite interesting as an example here since it probably requires finding the GCD of two rather large values. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a lot to talk about here, including various ways to find GCD and even to find the digits of the decimal expansion one after the other. You can also use it as an introduction to irrational numbers, since a student can &lt;em&gt;imagine&lt;/em&gt;, at least, a non repeating decimal. Using a diagonal process you can even demonstrate the existence of such a value. You can also explore the maximum length of the repeating sequence for a rational number wrt the denominator of the fraction in lowest terms. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And a fun fact is that .9..., with 9's repeating forever, is equal to 1. Therefore the decimal expansion needn't be unique 1 is also 1.0. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And note, in the context of the question asked here, while a TM can't compute &quot;all the digits&quot; of 3/7 (an infinite sequence), it &lt;em&gt;can&lt;/em&gt; compute the repeating prefix. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Since it isn't an answer, I've marked it for community ownership.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-04-01T00:20:15.637" LastActivityDate="2020-04-01T00:20:15.637" CommentCount="2" CommunityOwnedDate="2020-03-31T17:33:07.003" ContentLicense="CC BY-SA 4.0" />
  <row Id="6271" PostTypeId="1" CreationDate="2020-03-31T17:51:11.020" Score="5" ViewCount="210" Body="&lt;p&gt;As a result of the coronavirus pandemic, many colleges and universities have implemented policies to allow students to take classes pass/fail this semester. Students will now be asking their advisors about the consequences of this decision. It seems like it would be good to have some consensus about whether or not graduate programs in CS, or jobs in CS, would hold it against CS majors if they took a CS course pass/fail this semester instead of for a grade. Many students are facing severe displacement (e.g. living in quarantine camps in their home countries, lacking reliable internet at home, needing to take on jobs to help their family pay bills after a layoff, etc). My gut instinct is that employers would probably prefer to see a &quot;Pass&quot; grade on a transcript rather than a grade that lowers a student's GPA. I also suspect graduate programs would understand &quot;Pass&quot; grades for this semester, even in core courses like operating systems. But I'm not sure, and it's a high stakes decision for students. I would love feedback from the community of CS professors.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2020-04-01T19:54:56.463" Title="Advising college students about whether to take classes pass/fail" Tags="|undergraduate|advising|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6272" PostTypeId="2" ParentId="6271" CreationDate="2020-03-31T18:07:15.117" Score="6" Body="&lt;p&gt;Unfortunately, at the current time, a student would be making a decision with incomplete information. I'd be more interested in how graduate schools will treat such grades and I don't know of any who have stated a policy yet. I'm pretty certain that employers haven't really even thought of it yet. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I hope, of course, that they (grad schools and employers) will be reasonable. I also hope, of course, that advisors will be able to give good and accurate letters of recommendation for students no matter which way the students choose on this question. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there is a vast amount of disruption even beyond the obvious. Expect that even good students will have trouble keeping up to their normal standards. It will require a lot of ongoing support. Some students are stuck in travel-hell. Some will lose family members. Some will have poor connections to their universities. Much, much more. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, at this time, it is hard to recommend one choice over the other. What is sensible to do now, with available information, may prove sub-optimal when the policies fall in to place. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But you can lobby your own institutions for the quick creation and dissemination of reasonable policies. It is probably required that the whole academic establishment come together with principles. The current mix of policies may actually be adding to the chaos while trying to solve the issue individually. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-03-31T18:07:15.117" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6273" PostTypeId="2" ParentId="6271" CreationDate="2020-04-01T19:54:56.463" Score="5" Body="&lt;p&gt;Given the scale of this pandemic, and the hard questions being faced by many schools, I strongly suspect that graduate schools will be okay with Pass/Fail, if only because more and more institutions are utilizing it for this semester.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are just a few universities and colleges that have instituted the change to P/F (or a close variant): Smith, Middlebury, Grinnell, Northwestern, CUNY, Harvard, Stanford, Columbia, Dartmouth, and MIT.  The list isn't even slightly close to being exhaustive, it was just what I got today from the top result on my Google search, along with assertions that &quot;most schools&quot; have either moved or are considering moving to P/F.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is likely that the schools to which your students will be applying with their pass/fail grades will themselves have been issuing pass/fail grades during this period, so I expect that admissions officers will look elsewhere on the transcript for more detailed information about student performance.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Obviously this creates some winners and some losers, as it assigns more weight to the other semesters of a student's undergraduate career, but it does not appear that it will be any kind of &quot;black mark&quot;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-01T19:54:56.463" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6275" PostTypeId="2" ParentId="3339" CreationDate="2020-04-03T09:08:11.397" Score="2" Body="&lt;h1&gt;Because it is an easy question to start with?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;It only takes seconds to count the LOC in a project. Faster than asking. So the point is not the factual information by itself. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point is starting an interview with a &lt;em&gt;nervous&lt;/em&gt; student, about a &lt;em&gt;project&lt;/em&gt; of some size. Not a 20 lines exercise for which an interview with each student is a waste of time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Question followed by: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how many files? &lt;/li&gt;&#xA;&lt;li&gt;What are the most important ones? &lt;/li&gt;&#xA;&lt;li&gt;Their responsibilities?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Please show some significant part of the code and explain it to me.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2020-04-05T07:49:42.530" LastActivityDate="2020-04-05T07:49:42.530" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6276" PostTypeId="2" ParentId="6266" CreationDate="2020-04-06T02:08:27.703" Score="4" Body="&lt;p&gt;I would beware of vague examples like &quot;solve world hunger&quot; because it is not a well-defined mapping from program inputs to program outputs. The problem description doesn't tell you what input such a program would expect, nor how to determine whether the program's output is correct. So, it doesn't capture the formal idea of computability. I wouldn't try to teach a formal definition at school level, but I'd still try to teach something &lt;em&gt;consistent&lt;/em&gt; with the formal definition, to avoid promoting misconceptions.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here are two concrete examples which work both intuitively while still being formally uncomputable:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There is no algorithm which takes an arbitrary calendar date as input, and outputs an array containing the lottery numbers for that date.&lt;/li&gt;&#xA;&lt;li&gt;There is no algorithm which takes as input an arbitrary calendar date and a person's name, and outputs the first word that person speaks on that date.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;As well as it being intuitively impossible to predict lottery numbers in the future, a truly random sequence is uncomputable in the formal sense with probability 1. For the second example, you can give the following proof: whatever algorithm you write, I can run it with tomorrow's date and my own name, wait until midnight and then say any word your algorithm didn't output.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2020-04-06T02:08:27.703" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6278" PostTypeId="1" CreationDate="2020-04-07T23:40:52.850" Score="6" ViewCount="126" Body="&lt;p&gt;I've attended a couple online classes and I'll be teaching my own in a short while. And what I noticed is that usually the lecturer has a lot of interruptions from people who ask them to repeat something, to clarify on a topic, or they even divert the topic to ask something else (like &quot;can I do the same thing with a different IDE?&quot;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When I teach on-site I notice I don't have as many questions as I've observed here (probably because &quot;hiding&quot; behind a computer screen makes people more comfortable to ask questions). And I really welcome all kinds of questions and hate it when someone gets behind just because they're afraid to ask.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So I'm trying to find a balance here. It would be a great thing if I had someone assisting students, so they can go on a private chat with whoever is asking a question and answer without disrupting the class. But that's not a possibility here. It's just me. And I also know another option would be to say all questions will be answered at the end of the lecture, but I'm hesitant on this since the risk of leaving people behind during the class is higher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Any other ideas on how to handle this? I'd hate to be one of those lecturers that talks non-stop with people just nodding without understanding too much of what's being said.&lt;/p&gt;&#xA;" OwnerUserId="4062" LastActivityDate="2021-08-27T15:42:19.863" Title="Online classes: Any good ways to avoid having too many interruptions but at the same time not leaving anyone behind?" Tags="|online|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6279" PostTypeId="2" ParentId="6278" CreationDate="2020-04-08T03:17:18.537" Score="3" Body="&lt;p&gt;If you use Zoom, one strategy you can employ is to have all students divert their questions to the chat window. This would allow you to scan them, but choose which ones to answer at which times.  Diverting questions could be ignored or put off until later, while important confusions could be addressed immediately.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-08T03:17:18.537" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6280" PostTypeId="2" ParentId="6278" CreationDate="2020-04-09T04:01:39.260" Score="6" Body="&lt;p&gt;If you go through your lectures, you'll find most of the them actually cover between 3 and 6 separate distinct topics: what would have been the top-level items seen in good student notes. We can take advantage of this to improve online delivery. Well before an online class meeting, look at your notes and identify those topic areas. Now instead of one meeting, think in terms of a separate session (usually 10 minutes or less) for each of those shorter topic areas.&lt;/p&gt;&#xA;&lt;p&gt;Even better, you can almost always find good content freely available online that will cover those topics. Where finding a single replacement for the complete lecture would not have been possible, the smaller topics &lt;em&gt;will&lt;/em&gt; each likely have a good option or two available. This online content will often be &lt;em&gt;produced&lt;/em&gt;, in that it has good lighting, supporting animations, edited closed captions, etc. If you define the topic narrowly enough, this often even holds for upper-level undegrad work (graduate coursework may be different).&lt;/p&gt;&#xA;&lt;p&gt;Now you can assign these videos as prerequisites for your class meeting (often with a very short and low-value quiz, just to provide the extra incentive for students to complete this work). You may still need to cover one or two of your original topics personally, but finding the videos is often much less work than creating or delivering your own.&lt;/p&gt;&#xA;&lt;p&gt;This now lets you change how the conference session is run, whether on Zoom, Hangouts, Teams, Skype, WebEx, BBB, BlueJeans, or whatever. Lecture content is now much shorter, if it happens at all, and therefore less susceptible to these interruptions. Instead, these meetings are about handling class business: introducing homework, setting expectations, providing review material and guides, helping students understand where to pay the most attention in the outside material, and &lt;strong&gt;answering questions&lt;/strong&gt;... you know, the kind of question that would have been an interruption before. It's now part of the primary purpose of the session.&lt;/p&gt;&#xA;&lt;p&gt;Pedagogically this is called a flipped classroom approach, and it has a number of documented benefits outside or our current situation: Students learn better with the shorter 10 minute sessions, they have the original lecture material for review, they can catch up much easier for missed class times, they can use their video player to slow down or speed up delivery, or pause to take notes without disrupting other students, and it increases student access to the instructor.&lt;/p&gt;&#xA;&lt;p&gt;I think instructors are sometimes wary of the flipped approach for three reasons: one is it seems like a lot of work to set up, though I'd argue it's less work over time. Second, it seems like it devalues them as an instructor, though I could argue it increases student engagement with the instructor, and therefore the opposite is true. And finally, they feel like they couldn't actually find good content to replace their existing lectures. That is where this answer comes to bear. If one looks at a full 40 minute lecture, that's probably true, but if you break up the lecture into the major bullet points I believe you'll usually find something to cover several or all of those smaller sections.&lt;/p&gt;&#xA;" OwnerUserId="871" LastEditorUserId="871" LastEditDate="2021-08-27T13:51:58.290" LastActivityDate="2021-08-27T13:51:58.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6281" PostTypeId="2" ParentId="6278" CreationDate="2020-04-09T15:13:24.323" Score="2" Body="&lt;p&gt;This is a small addendum and variation on the answer of &lt;a href=&quot;https://cseducators.stackexchange.com/a/6280/1293&quot;&gt;Joel Coehoorn&lt;/a&gt;. There is the possibility, also, of making the course completely asynchronous so that those with various issues can still learn even if they can't connect at a certain time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;First, though, the advice to reduce &quot;content&quot; segments to about 10 minutes is both excellent and is supported by research. For each segment, provide exercises. For each exercise, provide individual feedback on attempts at solutions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The source of the content segments is probably much less important than the follow up. Some from you, some from others is a good suggestion. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, to make it asynchronous, as well as low bandwidth, you can just use a common text sharing platform to communicate with the students. Instant messaging on mobiles is terrible for this, but there is &quot;chatroom&quot; software that permits both synchronous chats, but also capture of the stream for publishing elsewhere for those who can't participate in real time. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But for years, I ran important graduate courses using primarily a common mailing list to which all students and their professors were subscribed. Students could ask questions at any time and all would see the question and answer stream. There is an advantage to that, since lots of questions don't get asked but should get asked if only individual interactions are used. The professor doesn't need to answer the same question over and over. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Text alone may be enough, but a platform that lets you share images as well may be needed. But image sharing need not be ubiquitous to be effective. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But, in my courses, students were also encouraged to answer one another's questions as well as ask them. So the professor only has to answer about half the questions, though must correct misconceptions. But even that is useful for learning. You need ground rules, of course. Asking for solutions and providing them is off limits. Hints can be asked for, but should be provided only by the professor. You need a separate stream for students to submit work. But simple email works for that provided that the scale is reasonable. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the overall effect of such an asynchronous system is that students can work at any time and don't get stuck as they would (and do) when everything must go through the professor at a time and place certain. Learning can go on round the clock. &quot;Class&quot; never ends. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;All the tools to do this are available and free. Low band-width can be an advantage. Preserving message streams is a definite advantage for planning future iterations of a course. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-04-09T15:13:24.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6282" PostTypeId="1" AcceptedAnswerId="6283" CreationDate="2020-04-09T22:19:50.627" Score="4" ViewCount="132" Body="&lt;p&gt;I mentor online (in assembly language and computer architecture) at codementor.io.&amp;nbsp; The way I work is to have a zoom meeting with a student to instruct them on what they are confused or stuck on.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;More and more, due to changes in the way course work is being carried on during the epidemic, I'm having new students as me for help with take home exams.&amp;nbsp; Of course, I won't do that if I know it is happening.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Many of these such requests directly and blatantly ask for help with an exam; however some students appear to have lied that they are doing practice exams or have homework assignment they need some help with when it really was a take home exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here's what I do when I encounter a new student asking for help.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For some, I look for urgency for a very specific time they want me be available&lt;/li&gt;&#xA;&lt;li&gt;With some I feel I need to ask them directly if this is an exam or practice&lt;/li&gt;&#xA;&lt;li&gt;I generally ask what the time frame is&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I get concerned if the time frame is either immediate or very specific time (say tomorrow) and/or there are multiple question that are somewhat randomly related and it is not obviously a practice exam.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But with the latest changes, moving to home and online study, more and more I'm seeing exams being given as take home and with a two or so day time period, so my approaches to detecting situations that I don't want to be in are not working as well as I'd like, and, I'm being approached more often.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a tough situation and I do sympathize with students because at least right now with sudden changes there is some chaos; many are not getting the instruction they need and help from faculty, and for the moment, increasingly so because of the pandemic.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Further, instructors &amp;#8212; who are suddenly shifting from in-class exams to take home exams &amp;#8212; are probably not versed in best practices against cheating.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My question is, does anyone have any advice on the subject, e.g. on how to help honest students (e.g. practice exams, theory, etc..) while avoiding cheating on exams?&lt;/p&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2020-04-10T03:30:50.080" Title="Seeking advice on mentoring without participating in exam cheating in the new chaotic environment of the pandemic" Tags="|exams|cheating|mentoring|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6283" PostTypeId="2" ParentId="6282" CreationDate="2020-04-10T03:30:50.080" Score="2" Body="&lt;p&gt;If I were to try some online sleuthing, the first question I would ask is for the course's website, if there is one, or for links to recent assignments. This has the double benefit that your primary goal in doing this is to make sure that your instruction is as helpful as it can be.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If students cannot provide this, then my next question would be about how you can go about contacting the teacher, for the same reason.  Your instruction can simply be better targeted at this point if you have some sense of what the course is doing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My guess is that at this point, most cheaters who wish to hide what they are doing will give up on working with you.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(As an aside, you may find that some teachers have, as a practical matter, made their exams entirely open-internet and open-help, and hold a standard that if the student understands what they have written, then they will accept the work. In this case, your assistance might not be considered cheating at all.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-10T03:30:50.080" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6284" PostTypeId="2" ParentId="3339" CreationDate="2020-04-10T13:28:19.120" Score="2" Body="&lt;p&gt;As others have noted, the simple lines of code doesn't always have a lot of meaning in terms of the project's quality.  My guess is that the question is primarily intended to catch the outliers, those projects with a lot less or more code than average.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the programming industry I have noticed an odd trend among certain programmers that go through great lengths to make their code as terse as possible.  Variables are short, each line is crammed with as many instructions as possible, etc. Some constructs such as &quot;comprehensions&quot;, streams, lambdas or map/reduce allow you to pack a lot of complexity into a few lines.  This results in code that takes up the minimum of space but is often hard for humans to interpret, as if the programmer forgets that humans look at code as often as computers do.  Programs like this would have far fewer lines of code than average but be of poor quality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;On the other hand, a common mistake made by novice programmers is to write a routine, then copy and paste it and make a few small changes to it.  Sometimes called &quot;copy pasta&quot; this is a poor programming practice because it results in code that is redundant and the same bug can appear in many places in the code.  Restructuring and refactoring code can be tricky and time consuming and when programmers get in a hurry they sometimes just copy paste.  Programs like this would have far more lines of code than average but be of poor quality.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course the simple line of code check doesn't catch either of these situations, there are automatic ways of trying to detect code quality but they are much more complex and subjective.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2020-04-10T13:28:19.120" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6285" PostTypeId="2" ParentId="6231" CreationDate="2020-04-16T22:19:56.513" Score="4" Body="&lt;p&gt;At my University, we had the chance to modify the syllabus, if needed, to remove or decrease the weight of &quot;traditional&quot; written tests. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;While in most programming courses eliminating tests is not a problem, as most of us were already relying mostly on assignments, group works, oral presentations, and so on, there are some courses, were more traditional tests may eventually still make sense.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of them are assuming that these are open-book tests, so the questions involve some degree of understanding of the topics and not simply memorization. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some of my colleagues are using a tool called Exam.net that is capable of recording the student's face and the exams are made in full screen, and whenever the student comes out full screen, the test may automatically be blocked, and the student has to ask the teacher to unlock it. Even Moodle has a similar feature that allows you to have a locked full-screen window, which can be used along with other tools such as Zoom to record the student's face. Some colleagues are also using Google Forms and Microsoft Forms along with Zoom for the same purpose. Some of these tools also have features to control the student's IP address.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I see with these approaches is related to the fact that you are only seeing the student's face. You cannot see who else is in the room, who is typing, if the student has multiple screens, if the student is using TeamViewer of any other tool and someone else is answering on their behalf. So although it is possible to have some more control, in the end, these measures end up working more like some kind of a way to make us feel that we are doing the right thing to make the tests valid. In the end, I believe that there is not a 100% cheating-prof testing solution. If anyone knows of one, I certainly would also like to use it. :)  &lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2020-04-16T22:19:56.513" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6286" PostTypeId="2" ParentId="6234" CreationDate="2020-04-16T22:37:39.753" Score="1" Body="&lt;p&gt;If your main concern is related to cheating in tests, there are some ways to somehow minimize it (not 100%, though).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am in &quot;forced&quot; quarantine since March 4th, so, almost all the 2nd semester is held online (I haven't returned to the uni since, so haven't the students). :)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I and all the CS teachers at my Uni rely mostly on small quizzes, oral presentations, small assignments or larger individual ou group projects. Traditional tests will still take place, but their weight in the final grade was reduced. In any case, it is almost always assumed that the tests are open-book tests, so the students are asked to give their opinion or apply some concepts and not simply give definitions.&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2020-04-16T22:37:39.753" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6289" PostTypeId="1" CreationDate="2020-04-19T12:34:02.363" Score="4" ViewCount="97" Body="&lt;p&gt;Team projects seem to run in to difficulties fairly often. One complaint is that some member doesn't actually do anything, causing dissension or the failure of the project altogether. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Too often, left to their own devices, teams simply &quot;divide up the work&quot;, ignoring that separate threads need to be integrated and that this can be the major part of the effort. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My joke example is five people writing a 5000 line program with one person writing the first thousand lines, the next person writes the next thousand, etc. All in parallel. But imagine also a team project in which a &lt;a href=&quot;https://en.wikipedia.org/wiki/Limerick_(poetry)&quot; rel=&quot;noreferrer&quot;&gt;Limerick&lt;/a&gt; is to be written with each member writing one line, all in parallel. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The opposite effect is when one student simply does everything, ignoring everyone else on the team. And often, then, complains that they got no help. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;How much prior instruction about &lt;em&gt;team process&lt;/em&gt; is required before such assignments are given? More important, what should that instruction include? It might also be useful to comment on how much the evaluation should correspond to the process and not just the product produced. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are a number of smaller issues within this question, of course, such as what does it mean to &quot;contribute equally&quot;. How can we convey good team practice in light of such issues? &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-11-29T22:27:29.400" Title="What &quot;process instruction&quot; should instructors give students when assigning a team project?" Tags="|group-work|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6290" PostTypeId="2" ParentId="6289" CreationDate="2020-04-19T20:55:47.123" Score="1" Body="&lt;p&gt;I am in some ways a poor person to answer this, because this is something that I've struggled with.  There was one recent lab where I was quite successful, though, and I leave it here without any promise of generality:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most recently, when assigning a very hard lab, I pointed out that divide and conquer was a silly approach when the coding assignment is intellectually challenging.  (In this case, students were making a Lambda Calculus REPL and interpreter/solver).  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Dividing the task up is a way to ensure that no one fully understands what the other person did, because each stage is tremendously complex.  The end result would be labs that never actually came together and functioned, and no one on the team able to understand exactly why it wasn't working.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I explained this, and pointed out as well that pair programming is a way to make sure that there are two sets of eyes on these intricate pieces, and two brains engaged to make sure that both the problem and the solution (both difficult in their own right) ultimately made sense to everyone.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This worked extremely well. I don't think that any group divided the work, and certainly not in any substantial way.  (There may have been brief periods of independent work while a student was absent, for instance, but that is unavoidable in the structure of my school.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also worth noting that almost all of the labs came in working, and from my code interviews, it was clear that each student understood well what that had done, so that is further evidence that there was little dividing of the work going on.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-19T20:55:47.123" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6291" PostTypeId="2" ParentId="6289" CreationDate="2020-04-19T22:39:28.553" Score="2" Body="&lt;p&gt;Before you assign students their first team project some instruction is needed. You can't assume that they will understand teamwork any more than that they will understand recursion without instruction. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But first, you should decide on how you want their teams to behave. In this answer, I'll consider only a team structure that requires a team leader who will assign tasks and be responsible for the overall project, including the integration of the pieces done by the various team mates. This is only one of many possible team structures but here I'll stick to just this. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If this is the team structure you assume will be used, don't assume that it will just happen and coalesce without your efforts at the start and throughout. Among other things they are too likely to spend far too much time at the start on organization, leaving too little for the actual work.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The first consideration is to decide on both the teams and on how the leader is to be chosen. You can force it a bit by choosing the leaders yourself, assuming that the scale of things permits it and you know something about the students. One way that I had success with in such a situation is to use a round-robin sandlot baseball method. I would choose the leaders/captains and the captains would alternately choose team members until everyone was chosen. This assumes that the students know one another generally. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Teams can choose their own leaders, also, perhaps via an election. But make sure that the choice is made immediately and that you learn who the leaders are. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Alternatively you can choose the teams yourself, either randomly or using some knowledge you have of their abilities. It is probably a mistake to let teams just coalesce into groups of friends as things are likely to be too lopsided in many ways. You want the better students distributed around the teams as well as the strugglers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;This structure is asymmetric, with a few students, the captains, having a special role. Let them know that &quot;equal participation&quot; isn't the same thing as saying everyone does the same thing. People can contribute differently to a successful programming project, with some doing most of the programming, others writing user manuals, others doing research or testing. But they will need some instruction on the kinds of roles and the leaders will need some instruction about how to assign roles (or take volunteers) for the various tasks. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Let the leaders know that their job is primarily coordination and communication (with you). Encourage them to have frequent meetings with their teams, and constant feedback if there are any problems. Let the leaders know that flexibility is needed and that some members who take on a task will need help in completing it. Make sure that the leader make allowance for such things. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to communicate all of this to a team is to give them a few descriptions of projects that succeeded and a few that failed, with an explanation of why. Horror stories to help them avoid the most common pitfalls. And one of the big pitfalls is not having adequate time for integration of individual efforts. It isn't going to all fall together in the last few hours. Emphasize that. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And, since the team members will play different roles in the project, give them a &quot;role book&quot; that describes how to carry out one's own role and interact with others. But everyone should know not only their own role but that of others as well. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One of the big lessons that some of them, at least, won't have understood, is that it is a learning experience, not product development. Students can learn even if a project doesn't really build much. Put the emphasis on learning, not getting over a finish line on an arbitrary (and possibly too short) time scale. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Another thing to communicate to the captains is that if trouble arises you need to learn of it immediately. Perhaps the project needs refocusing or rescaling. Perhaps the captain will need help in dealing with a non-participant. And if you have frequent meetings with the captains (perhaps in a group) you can feed them &quot;management&quot; hints for the teams. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One way to have meaningful meetings with the captains is to do it with the entire class present. You and the captains discuss issues while the others listen and take notes. These can be quite short meetings if the scale is small enough, say five or so teams. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Part of the instruction of the teams, perhaps through the leaders, is to encourage team members to help one another whenever needed. A team project isn't just the sum of a bunch of individual projects thrown together. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you intend to use peer evaluation at the end of the project, make sure that they understand that at the start. In fact, it is best to give them details, such as what precise form it will take. My own preference is to have people say positive things about the most productive members rather than to rate or grade everyone. I also require a self evaluation along with any peer evaluation: &quot;What was your chief contribution?&quot;.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that this style of project is not my favorite, but it is for many. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-04-20T12:09:45.697" LastActivityDate="2020-04-20T12:09:45.697" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6292" PostTypeId="1" AcceptedAnswerId="6356" CreationDate="2020-04-20T15:09:26.183" Score="4" ViewCount="3870" Body="&lt;p&gt;I am teaching a second year programming course for adult students. It is an introduction to C++, with a chapter on Git. I'm not covering Makefiles and while I could find a bit of time to talk about build systems, the course is already pretty loaded (as any &quot;introduction&quot; to C++ can be).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The issue is that our school currently only supports Microsoft Visual Studio 2019, which is a behemoth and much too big for the tiny hello-world-ish stuff we need to do. It forces my adult students to go deeper into debt just to buy a new computer to run the thing.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is also very complex and forces me to teach about managing Visual Studio's projects and files, competencies that are not really useful outside of Visual Studio.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've been doing a lot of work with online tools (especially repl.it and onlinegdb.com), but our internet can be flaky and I would much rather have an offline tool.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, that IDE should be: &lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simple, so it is not overloaded with features we won't need,&lt;/li&gt;&#xA;&lt;li&gt;Lightweight, to work on older computers,&lt;/li&gt;&#xA;&lt;li&gt;Offline, for when the internet goes into molasses-mode,&lt;/li&gt;&#xA;&lt;li&gt;Portable, since students use various versions of Windows, Linux and Mac.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I am aware it is more of a wishlist and that there might not be a tool able to do all this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What I've tried so far :&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Adequate match:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;CodeLite: Seems like a stable and up-to-date version of Code::Blocks/Dev-C++. Must install a compiler and debugger however, but it seems easy enough with GCC/GDB on Linux/Mac and Win-Builds' MinGW-w64 install on Windows. It also requires to add the executables to the $PATH environment variable on Windows. &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Partial match:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sublime Text: Lightweight and easy to use. Build system seems to be unique to Sublime Text however, but is not too hard to use. Nagware which require to pay for the official version.&lt;/li&gt;&#xA;&lt;li&gt;Geany: Very lightweight, but not easy to use. Would require to teach Makefiles.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Bad match:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Code::Blocks: It is too unstable. It keeps crashing and students are confused whether their code is wrong or Code::Blocks is misbehaving again. &lt;/li&gt;&#xA;&lt;li&gt;JetBrains CLion: Better than Visual Studio, but still heavy and complex to use.&lt;/li&gt;&#xA;&lt;li&gt;Apache Netbeans: Current version (11.0) does not support C/C++.&lt;/li&gt;&#xA;&lt;li&gt;Apple XCode: It is not portable outside of Mac. &lt;/li&gt;&#xA;&lt;li&gt;Spyder3: Nice IDE, but really minded for Python.&lt;/li&gt;&#xA;&lt;li&gt;Visual Studio Code: Too many complex configuration files, unique to VS Code. &lt;/li&gt;&#xA;&lt;li&gt;Atom w/ gpp-compiler package: The IDE is added on top of the text editor. Error messages are difficult to read since they are on popups. Uses command-line GDB for debugging. The gpp-compiler package itself is still buggy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Also, I tried to compile a list that already exists and is better documented at &lt;a href=&quot;https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9058" LastEditorUserId="9058" LastEditDate="2020-05-26T23:20:42.987" LastActivityDate="2021-02-20T19:01:12.150" Title="Looking for a simple, offline, portable, lightweight IDE for C++ with a compiler and debugger" Tags="|c++|ide|" AnswerCount="2" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="6293" PostTypeId="2" ParentId="6289" CreationDate="2020-04-20T17:18:04.020" Score="0" Body="&lt;p&gt;There is another way to organize a team project that is most appropriate if there are only one or two teams and the course is mostly about completing a large project. The compiler course or a &quot;senior&quot; capstone course often has these characteristics. This is the Agile Software Development approach. It requires a lot of instructor inputs, though fewer at the beginning. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Note that I'm assuming in this that the scale is reasonable. If the class is too large it will be hard to manage this unless there are enough TAs already proficient in the process. That may be an unreasonable assumption for many.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an Agile Software Development project,  a team is self directed but acts to satisfy requirements made by a &quot;customer&quot; who provides the requirements incrementally in the form of short &quot;stories&quot;, mostly representing features. The customer also needs to accept work as it is done (or reject it) and can redirect the project at frequent intervals (iterations). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here the instructor (or perhaps a TA) acts as customer and provides a set of short development stories and prioritizes them for development. The stories can change as the project progresses and the stories themselves can be changed and added to. The project works in short cycles. A story should be small enough that a pair of students working together can complete it in a week (or, perhaps a day if a flipped classroom is used). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most agile teams also need a &quot;coach&quot; to get them started and to help them learn the various agile practices such as paired programming and test first development. The instructor, or a TA, serves also as the coach. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here the initial instruction about process can be done as a demonstration where two people, perhaps the instructor and a student pair program to develop and test a few simple stories. The instructor carries on a dialog about what is happening and only a few practices are used. It is actually best if the second person is already proficient in the process so that roles can be switched as needed between the &quot;driver&quot; who writes the code and the &quot;navigator&quot; who gives guidance. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Agile development works well in a classroom situation if there is time available each &quot;iteration&quot; for a retrospective on the work done so far by the team. This is the point at which the instructor can comment on process and where it works and doesn't, as well as the point at which the project can be redirected as necessary. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Here, the process instruction is done incrementally and continuously. There is no team &quot;leader&quot; and the members all use the same processes. A pair of students selects a currently important story and works on it until it is completed or the iteration ends. The coach/instructor is available for both process and technical assistance. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Note that I'm describing some of the &quot;personal process&quot; practices of &lt;a href=&quot;https://www.amazon.com/Extreme-Programming-Explained-Embrace-Change-dp-0321278658&quot; rel=&quot;nofollow noreferrer&quot;&gt;Extreme Programming&lt;/a&gt;, which I find useful in general. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-04-21T12:44:51.427" LastActivityDate="2020-04-21T12:44:51.427" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6294" PostTypeId="1" CreationDate="2020-04-22T10:04:04.330" Score="5" ViewCount="156" Body="&lt;p&gt;Like many of you, in the last weeks, I've been forced to move to distance teaching/learning. While our university has always suggested us to use Zoom, from the first moment, several students said that we should have gone with Discord (which I've never even heard of until then). Among other things, they liked Discord (and not Zoom) because the &quot;chat&quot; didn't disappear after each session and it is much easier to share images and other files. They've also mentioned that Discord was a good choice because they were already there, and so, they didn't need to install another app and create another account. They were also looking for an away to stay closer to the teacher.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, I decided to give it a try. I've created a &quot;server&quot; and invited them to that server. After a session with them, I've sure realized that for &lt;strong&gt;the classes&lt;/strong&gt; Discord is not as good as Zoom, however, for a more informal way of contact with the students it may be a good choice. Interestingly, several students mentioned that they don't consider a good idea to &quot;mix business with pleasure&quot;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I understand some pros and cons. Any thoughts on this?&lt;/p&gt;&#xA;" OwnerUserId="1144" LastActivityDate="2020-05-06T00:23:23.453" Title="Is it OK to use &quot;informal&quot; systems such as TeamSpeak or Discord to support classes?" Tags="|student-motivation|distance-learning|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6295" PostTypeId="2" ParentId="6294" CreationDate="2020-04-22T11:55:06.397" Score="3" Body="&lt;p&gt;We use Zoom (school-mandated for classes), students organized Discord rooms for contact with the TAs (and I believe among themselves), I understand they also have Facebook and WhatsApp and probably Telegram groups for study groups and other more informal contacts.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We are all in explorarory mode, I'd just say &quot;use what works&quot;.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2020-04-22T11:55:06.397" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6296" PostTypeId="2" ParentId="6294" CreationDate="2020-04-23T02:12:08.137" Score="5" Body="&lt;p&gt;We've been using Discord as a central place for all class discussion, and Zoom only for live lessons (rare) and small group meetings, and unpublished YouTube links for most lectures.  So far this has been working quite well.  If I'm totally honest, Discord may be the best part of our workflow.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Discord gives a nice sense of community and comity. Its informal nature is a real boon to keeping class spirit alive, with reactions and animated gifs easily accessible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You can &quot;pin&quot; important announcements so that they stay at the top.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It also allows for code formatting for short code excerpts just like here on StackExchange, with ` around text to get this effect:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You're using &lt;code&gt;x&lt;/code&gt; in your function, but shouldn't you just call &lt;code&gt;getRemaining()&lt;/code&gt; instead?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;And you can format code to any language using three backticks and a language nane&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;```scheme&#xA;(define nekst (cadr (last lyst)))&#xA;(perform-func nekst)&#xA;```&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;That will create syntax highlighting in a Discord comment, and you can replace &lt;code&gt;scheme&lt;/code&gt; with the language of your choosing.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-23T02:12:08.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6297" PostTypeId="1" CreationDate="2020-04-23T08:01:07.150" Score="6" ViewCount="324" Body="&lt;p&gt;I have been trying to think of an example of &lt;code&gt;xor&lt;/code&gt; to connect with what students already know. I did some searches. But everything I found, seems to have unconsciously switched to procedural.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example:&#xA;They say for &lt;code&gt;and&lt;/code&gt; &quot;the lights are on and my eyes are open&quot;.&#xA;But when they get to &lt;code&gt;xor&lt;/code&gt;, they say &quot;Choose this xor choose that&quot;. This is not a boolean predicate that evaluates to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. This is a selection.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So the question:&#xA;Can you provide an example of use of &lt;code&gt;xor&lt;/code&gt; in a boolean statement, that is accessible to students, that are new to boolean?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I am not yet interested in all the beautiful things that can be done with xor. That is easy. At this stage I am trying to connect to what we say in English language.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="9097" LastEditDate="2020-05-03T09:23:48.427" LastActivityDate="2020-06-19T15:02:27.727" Title="A beginner example of xor, that is functional (does not switch to procedural)" Tags="|boolean-algebra|" AnswerCount="10" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="6298" PostTypeId="1" AcceptedAnswerId="6306" CreationDate="2020-04-23T08:43:04.233" Score="1" ViewCount="77" Body="&lt;p&gt;I'm looking for an application that I can compile live, in class to show the students that compilation takes time, but brings speed benefits in the end, whereas interpreted languages always take time, but need no compiling.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Of course I can just simply compile and run some hello world (e.g. this &lt;a href=&quot;https://en.wikibooks.org/wiki/Fortran/Hello_world&quot; rel=&quot;nofollow noreferrer&quot;&gt;FORTRAN version&lt;/a&gt;), but that would just zip through in microseconds, whereas compiling, say, Firefox would take forever, involve many confusing additional steps and be way too complicated to illustrate the point (and probably fail anyways).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Ideally, I'm looking for an application that takes a minute to 3 (on a tad older hardware, think 5 years old i5) to compile, and really just takes one &lt;code&gt;gfortran -o hello hello.f90&lt;/code&gt; like command to get started and results in a binary that I can run in terminal that produces some simple and easily visible result (A plot? Some calculator?).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd prefer fortran or C and it all should be happening on a Linux system.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The point of that application would not be to show anything in fortran or C, or to detail the intricacies of compiling, it's solely to show that this can take time, but generally is fast afterwards. I intend to maybe talk 5 minutes about the whole thing, about 3 of which, it'll compile in the background. The main subject of the course is teaching python, an interpreted language.&lt;/p&gt;&#xA;" OwnerUserId="8497" LastEditorUserId="8497" LastEditDate="2020-04-24T14:47:32.543" LastActivityDate="2020-04-24T14:47:32.543" Title="(FOSS) Application to show/explain compilation?" Tags="|resource-request|compiling|language-types|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6299" PostTypeId="5" CreationDate="2020-04-23T08:49:22.650" Score="0" Body="&lt;p&gt;For questions about different types of programming languages. E.g. Interpreted languages vs. compiled languages, or functional vs. imperative languages.&lt;/p&gt;&#xA;" OwnerUserId="8497" LastEditorUserId="27" LastEditDate="2020-05-02T10:07:27.750" LastActivityDate="2020-05-02T10:07:27.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6300" PostTypeId="4" CreationDate="2020-04-23T08:49:22.650" Score="0" Body="For questions about different types of programming languages. E.g. Interpreted languages vs. compiled languages." OwnerUserId="8497" LastEditorUserId="8497" LastEditDate="2020-04-28T03:57:02.787" LastActivityDate="2020-04-28T03:57:02.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6301" PostTypeId="5" CreationDate="2020-04-23T08:50:30.190" Score="0" Body="&lt;p&gt;Questions about teaching the concept of 'compiling' source code into an executable program.&lt;/p&gt;&#xA;" OwnerUserId="8497" LastEditorUserId="8497" LastEditDate="2020-05-02T10:07:40.970" LastActivityDate="2020-05-02T10:07:40.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6302" PostTypeId="4" CreationDate="2020-04-23T08:50:30.190" Score="0" Body="Questions about teaching the concept of 'compiling' source code into an executable program." OwnerUserId="8497" LastEditorUserId="8497" LastEditDate="2020-05-02T10:06:37.230" LastActivityDate="2020-05-02T10:06:37.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6303" PostTypeId="2" ParentId="6298" CreationDate="2020-04-23T10:42:41.387" Score="1" Body="&lt;p&gt;Actually you have a misconception about compilers vs interpreters in the modern age. The stages of compilation (simplified) are&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Syntax Analysis (scanners - find the words and symbols and replace with internal values)&lt;/p&gt;&#xA;&lt;p&gt;Structural Analysis (parsers - build a tree equivalent)&lt;/p&gt;&#xA;&lt;p&gt;Optimization (maybe several stages - tree pruning etc)&lt;/p&gt;&#xA;&lt;p&gt;Code Generation (output the translated code)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The only difference between this and an interpreter is the last step. The output of the optimization code (likely still a tree but possibly an abstract machine code) is walked at execution.&lt;/p&gt;&#xA;&lt;p&gt;So, it is incorrect to say that an interpreter doesn't need 'compilation'. What it doesn't need is code generation which is normally a small part of the time involved in running a compiler. The scanner takes up most of the time unless the optimizations are very sophisticated.&lt;/p&gt;&#xA;&lt;p&gt;I'll leave this here for now but a simple language can be defined with a BNF. If it is LL(1) then a recursive descent parser is pretty simple. If it has few symbols then a scanner is pretty simple. Ignore optimization (null optimization). Then you can either produce a code generator for some simple abstract machine simulator that looks like machine language (a compilation) or you can directly interpret the tree output by the parser (an interpretation).&lt;/p&gt;&#xA;&lt;p&gt;But no reasonable interpreter today would work directly off of the source code during the interpretation. Scanning and parsing at least are the same as in a compiler. And scanning is the slow part since a decision needs to be made at every character of the input. Actually several decisions for many.&lt;/p&gt;&#xA;&lt;p&gt;I don't have a FOSS application for you, but it isn't terribly difficult to build one for a simple input language. One of the easiest is a prefix version of arithmetic, since it is easy to parse into a tree:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;code&gt;+ 3 4&lt;/code&gt; should yield 7&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;+ 3 * 4 5&lt;/code&gt; should yield 23.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is &lt;a href=&quot;https://en.wikipedia.org/wiki/Polish_notation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polish Notation&lt;/a&gt;, so named since no one wanted to remember how to spell Łukasiewicz, the name of its inventor.&lt;/p&gt;&#xA;&lt;p&gt;If you stick to single digit literal values (no variables) and single character operators, it is dead simple to both scan and parse. The parser is the driver and calls the scanner for the next symbol. The parser produces a tree.&lt;/p&gt;&#xA;&lt;p&gt;Whether it produces an output value (an interpreter) or an executable (a compiler is up to you. The simplicity comes from the fact that machine code is also often just polish notation. But if the architecture is a stack machine with all operations done on the stack the compiler version gets a bit more complex.&lt;/p&gt;&#xA;&lt;p&gt;Then the first example translates to&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;push 3&lt;/p&gt;&#xA;&lt;p&gt;push 4&lt;/p&gt;&#xA;&lt;p&gt;add&lt;/p&gt;&#xA;&lt;p&gt;print (producing 7)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;However, the value of compilation isn't obvious from this example since the scanner and parser are so trivial (hence fast).&lt;/p&gt;&#xA;&lt;p&gt;But it becomes more interesting if you make the language a bit more complicated. Suppose, for example that you permit both integer and non-integer values. Now you have to distinguish between integer and floating point operations. The beauty of pre-processing is that the disambiguation needs to be done only once, whether in a compiler or interpreter, not on every pass if the operation is in a loop, for example.&lt;/p&gt;&#xA;&lt;p&gt;And if you add non-literal values, such as variables, then you also probably need a symbol table. Again, process once use many in both the interpreter and the compiler.&lt;/p&gt;&#xA;&lt;p&gt;The overall lesson here is that a compiler and an interpreter differ by a lot less than most people think they do.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you understand Pascal then an absolutely elegant introduction to the structure of compilers is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0130830984&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;On Pascal Compilers&lt;/a&gt; by Per Brinch Hansen. There aren't many CS books that can be described as literature, but this is one. Not cheap anymore, but it will be in many libraries.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I also just found the following which might be suitable for a first compiler course or as the basis of a demo: &lt;a href=&quot;http://eli-project.sourceforge.net/pascal_html/pascal-.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://eli-project.sourceforge.net/pascal_html/pascal-.html&lt;/a&gt;. I haven't had a chance to evaluate it, though. My old compiler course used something similar.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="-1" LastEditDate="2020-06-18T08:36:57.023" LastActivityDate="2020-04-23T15:42:32.723" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6304" PostTypeId="2" ParentId="6297" CreationDate="2020-04-23T13:47:28.460" Score="2" Body="&lt;p&gt;This was fun!  Here are three, and I will update as I think of more:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;You may go on the symphony trip if you are in the music history class or if you are not enrolled in any arts class this semester.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You want to find people for your cliff-climbing trip? You're in the wrong place.  Ask around in the groups that took the jogging or bike trips up the mountain on Mountain Day, not the group that took the bus trip!&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Whether you got here by some connection to the uppity-ups or just by sheer dumb luck, you're my problem now.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-23T13:47:28.460" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6305" PostTypeId="2" ParentId="6297" CreationDate="2020-04-23T19:55:55.827" Score="-1" Body="&lt;p&gt;I am going to the local animal shelter. I will adopt a dog xor I will adopt a cat. (I only plan to adopt one pet.)&lt;/p&gt;&#xA;" OwnerUserId="2492" LastActivityDate="2020-04-23T19:55:55.827" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6306" PostTypeId="2" ParentId="6298" CreationDate="2020-04-24T04:31:22.147" Score="3" Body="&lt;p&gt;One crazy suggestion, &lt;em&gt;install Python from &lt;a href=&quot;https://www.python.org/downloads/source/&quot; rel=&quot;nofollow noreferrer&quot;&gt;source&lt;/a&gt;&lt;/em&gt;. Configure time about 42 sec. and compile time either around 3 minutes, or 48 sec with &lt;code&gt;make -j&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Your class will be using Python anyway, and seeing how long it takes to build from C vs. how long it takes to run &lt;code&gt;Hello World&lt;/code&gt; in Python ought to begin to give them some appreciation of the differences.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;Otherwise, two options that I'd considered are one with a relative fast compile and the other with a longer compile.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Fast compile - C source&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;The option for a fast, but watchable, compile is &lt;code&gt;curl&lt;/code&gt;, which is probably already on the system. &lt;code&gt;curl&lt;/code&gt; is written in C. It is available on &lt;a href=&quot;https://github.com/curl/curl/releases&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitHub&lt;/a&gt;. &lt;code&gt;curl&lt;/code&gt; is released under its own &lt;a href=&quot;https://curl.haxx.se/docs/copyright.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;license&lt;/a&gt; which is similar to MIT/X, but not identical. If &lt;code&gt;curl&lt;/code&gt; is on the system already you can perform the &lt;code&gt;configure&lt;/code&gt; and &lt;code&gt;make&lt;/code&gt; commands, and then stop. The students will be able to see what goes into the process of compiling it, and you won't have to modify your system with the actual install. The original install of &lt;code&gt;curl&lt;/code&gt; can be used to show what it does. Of course, once you demonstrate the speed of the binary it's nice to have a flashy result. As &lt;code&gt;curl&lt;/code&gt; does not require the returned file to be rendered in a browser, you could have a simple ASCII-art file to download. Hosted on the same computer, and using the &lt;code&gt;127.0.0.1&lt;/code&gt; IP would, of course, be the fastest, and best show of the difference between compile and run times. A simple demo of what could be downloaded could be &lt;a href=&quot;https://www.gypsyspellweaver.work/hello_class&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;HELLO CLASS&quot;&lt;/a&gt;. &lt;code&gt;curl https://www.gypsyspellweaver.work/hello_class&lt;/code&gt; or from the &lt;a href=&quot;https://gist.githubusercontent.com/GypsySpellweaver/76a32555ac899d9034132a164f4f1c70/raw/bece7923c2b9ff2bcd0e9f52f6f2436188294119/hello_class&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gist&lt;/a&gt;, &lt;/p&gt;&#xA;&#xA;&lt;p&gt;My expirements, using an AMD FX 8300 8-core CPU, gives configure times in the one minute range and compile times in the one minute range. In both cases there shouldn't be the need to add any switches or options, and while speaking you won't have to think about &lt;em&gt;what options was I supposed to use?&lt;/em&gt; for the commands. Timing your delivery around the process should be reasonably simple, and the process is fast enough to not become boring for the students to observe.&lt;/p&gt;&#xA;&#xA;&lt;h2&gt;Slow compile - FORTRAN source&lt;/h2&gt;&#xA;&#xA;&lt;p&gt;There is a project for physics (good place to look for FORTRAN programs) called &lt;a href=&quot;https://octopus-code.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Octopus&lt;/a&gt; for doing virtual experiments. Octopus is released under the &lt;a href=&quot;https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt&quot; rel=&quot;nofollow noreferrer&quot;&gt;GPL ver 2&lt;/a&gt; license, and contains external libraries licensed under a variety of other OpenSource license. The current list of licenses can be found in the &lt;a href=&quot;https://gitlab.com/octopus-code/octopus/-/blob/develop/COPYING&quot; rel=&quot;nofollow noreferrer&quot;&gt;GitLab&lt;/a&gt; repository. The program does have some dependencies, all of which were easily found in my SUSE repositories for simple installation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Again, using my system, I found the &lt;code&gt;./configure&lt;/code&gt; command to be quite fast, typically under 30 sec. The compile time, however, was much longer, avg. of 8 min. Use of the &lt;code&gt;-j&lt;/code&gt; flag on &lt;code&gt;make&lt;/code&gt; was significant in this case, avg. of 3 minutes to compile. As in the &lt;code&gt;curl&lt;/code&gt; case, there's no need of switches or options (unless you want to use the &lt;code&gt;-j&lt;/code&gt; swwitch on &lt;code&gt;make&lt;/code&gt; for the time savings.&lt;/p&gt;&#xA;&#xA;&lt;h3&gt;Octopus dependencies&lt;/h3&gt;&#xA;&#xA;&lt;p&gt;The non-optional dependencies listed on the installation &lt;a href=&quot;https://octopus-code.org/wiki/Manual:Installation&quot; rel=&quot;nofollow noreferrer&quot;&gt;page&lt;/a&gt; are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cpp (should be there already)&lt;/li&gt;&#xA;&lt;li&gt;Perl (should be there already)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.tddft.org/programs/Libxc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Libxc&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.fftw.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;FFTW&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.netlib.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;LAPACK &amp;amp; BLAS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://www.gnu.org/software/gsl/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GSL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;Since SUSE had these in their repos, I'm guessing they're likely in the repos of other major repos. Just be sure that the development packages, &lt;code&gt;-devel&lt;/code&gt; or &lt;code&gt;-dev&lt;/code&gt;, are installed as those include the headers needed to build other programs, such as Octopus.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the case of Octopus I have no real idea what would make a fast, and simple, output for the maiden launch of the program. Their website gives a simple run to use. It involves creating an input file, always named &lt;code&gt;imp&lt;/code&gt;, in the current directory and running &lt;code&gt;octopus&lt;/code&gt;. The simple input file is:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CalculationMode = gs&#xA;&#xA;%Coordinates&#xA; 'H' | 0 | 0 | 0&#xA;%&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Using that example, the best I can create for a demo is to trap the output to a log file, then display the convergence result data. &lt;code&gt;octopus &amp;gt;&amp;amp;log; cat static/convergence&lt;/code&gt;. Using my system as a reference, the typical run time is between 1.000s and 1.025s. Changing the command to &lt;code&gt;octopus &amp;gt;&amp;amp;log; octopus &amp;gt;&amp;amp;log; cat static/convergence&lt;/code&gt; so that the command runs twice, using the results of the first run to fine-tune the results of the second run, adds approx. .650s to each run. The output of the single run is a table of 9 results and the double run produces a table of one result.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;As a final resource, if none of these ideas work for your situation, or instructional style, you could look through the list of programs, organized by language, on &lt;a href=&quot;https://dmoz-odp.org/Computers/Programming/Languages/&quot; rel=&quot;nofollow noreferrer&quot;&gt;dmoz&lt;/a&gt;. Surely something there will work for your presentation.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2020-04-24T04:31:22.147" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6307" PostTypeId="2" ParentId="5653" CreationDate="2020-04-24T11:46:14.200" Score="1" Body="&lt;p&gt;About IB Computer Science. &#xA;             Computer Science is regarded as an experimental science, alongside biology, chemistry, design technology, physics and environmental systems and societies – and sits in the Group 4 list of subjects. The IB Computer Science course is a rigorous and practical problem-solving discipline.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AP Computer Science Principles is ideal for students who are less interested in Java or who would like a big picture view of computing. ... Both computer science classes have a great deal to offer high school students. Since they vary in several important ways, students should research each course before enrolling.&lt;/p&gt;&#xA;" OwnerUserId="9071" LastActivityDate="2020-04-24T11:46:14.200" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6308" PostTypeId="2" ParentId="6297" CreationDate="2020-04-24T12:09:05.753" Score="3" Body="&lt;p&gt;Say I’ve got two coins. They can each take on two states (heads or tails). Flip em both; &lt;code&gt;xor&lt;/code&gt; can tell you if they are different (not-equal).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The name has exclusive in it because when xor is yes/1/true, the heads are exclusive. That is, one head excludes the other. This is also true for the tails.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="9097" LastEditDate="2020-05-02T19:58:25.987" LastActivityDate="2020-05-02T19:58:25.987" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6309" PostTypeId="2" ParentId="6297" CreationDate="2020-04-24T20:27:16.833" Score="2" Body="&lt;p&gt;The more I think about this, the more that I'm convinced that the &lt;code&gt;or&lt;/code&gt; doesn't independently carry the weight of exclusivity in any circumstance &lt;em&gt;outside of choices&lt;/em&gt;, and that any exclusivity has to be provided by context of two options that can't coexist.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But the key problem with this for the CS teacher is that in those circumstances, having two &lt;code&gt;true&lt;/code&gt; inputs doesn't evaluate to &lt;code&gt;false&lt;/code&gt;, it just doesn't make any sense in the first place.  This means that the English &lt;code&gt;or&lt;/code&gt; will never truly and entirely carry the intuitive behaviors of &lt;code&gt;xor&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would love to be proven wrong about this, but I don't think I am.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-04-24T20:27:16.833" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6310" PostTypeId="2" ParentId="6297" CreationDate="2020-04-24T20:53:34.917" Score="3" Body="&lt;p&gt;Let me give a not-answer that may be just about as valuable as an answer. Natural language is ambiguous. Many uses of &lt;em&gt;or&lt;/em&gt; in natural language have an &lt;em&gt;xor&lt;/em&gt; intent. Your intention, I expect, is to make the lesson clear that the meaning of these two computing operators isn't the same. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;It may actually be more dramatic if you use examples that explore the ambiguity in natural language and contrast it with the specific (logic based) meaning in programming that will get the message across more dramatically than simple examples where natural language seems to do the right thing. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, the answer to &quot;Would you like bacon or sausage?&quot; is &quot;yes - both&quot;. And people chuckle (assuming no ethnic or religious restrictions, of course). But the distinction between inclusive and exclusive or is easy to teach noting that we try to avoid such ambiguous constructs in programming languages. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-04-24T20:53:34.917" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6311" PostTypeId="2" ParentId="6297" CreationDate="2020-04-25T14:55:08.753" Score="4" Body="&lt;p&gt;I can't tell whether I've missed something in the other answers or comments, but the natural language equivalent of XOR is to ask &quot;is there any &lt;em&gt;difference&lt;/em&gt;?&quot; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Used in a sentence which follows the broad format of those in the question, you'd be saying something like &quot;the light is on differs-from the door is open&quot;, with the compound 'differs-from' element being the XOR operator.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even in computer science, the XOR and XNOR operators typically go by other aliases, such as Not-Equal and Equal operators, respectively.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2020-04-25T14:55:08.753" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6314" PostTypeId="2" ParentId="6297" CreationDate="2020-04-28T12:09:10.247" Score="1" Body="&lt;p&gt;Here's an example - A 2 way switch&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Both 'up'  / both 'down' == off&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Single 'down' == on&lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, in English, one can perhaps say, &quot;The light is on if switch A is down &lt;code&gt;xor&lt;/code&gt; switch B is down&quot; &lt;/p&gt;&#xA;" OwnerUserId="9086" LastEditorUserId="9086" LastEditDate="2020-04-28T14:08:15.270" LastActivityDate="2020-04-28T14:08:15.270" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6315" PostTypeId="2" ParentId="6292" CreationDate="2020-04-29T04:19:38.887" Score="2" Body="&lt;p&gt;Small == Old.  Modern IDE != Small.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, would Turbo C++ or OpenWatcom work?  I believe both have &quot;free&quot; licenses.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caution: your students will get spoiled by how fast Turbo C++ is and then complain about every other compiler in existence.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="2273" LastActivityDate="2020-04-29T04:19:38.887" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6316" PostTypeId="2" ParentId="6297" CreationDate="2020-04-29T23:27:48.097" Score="-1" Body="&lt;p&gt;Am I leaving a comment or an answer but not both?&lt;/p&gt;&#xA;" OwnerUserId="2485" LastActivityDate="2020-04-29T23:27:48.097" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6317" PostTypeId="2" ParentId="6127" CreationDate="2020-05-01T01:09:08.303" Score="3" Body="&lt;p&gt;I'll probably try with this one, from an actual software I almost developed.&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There's a factory that produces paints in various colours. &lt;/li&gt;&#xA;&lt;li&gt;The factory has a single production line that can produce only one colour in a given moment. It's capacity is also limited, i.e. 1000 litres per day regardless of the colour produced.&lt;/li&gt;&#xA;&lt;li&gt;Different colours have different production costs and are sold at different prices. I.e.: white is cheap to produce and is selling price is low. Gold is expensive to produce because metal sand has to be added in the paint to give it a shiny note. Gold is also sold at higher price. Red lies in between. &lt;/li&gt;&#xA;&lt;li&gt;Different customer requires different amount of paint, i.e.: customer A asks for 1000 litres of white, customer B and customer C asks for 250 litres of gold each, customer D for 700 litres of red.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;That given, the problem is to find the mix of production that maximise the profit.&lt;/p&gt;&#xA;" OwnerUserId="5196" LastActivityDate="2020-05-01T01:09:08.303" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6318" PostTypeId="2" ParentId="6297" CreationDate="2020-05-02T15:35:20.720" Score="2" Body="&lt;h1&gt;Experimental Approach&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;This is based on the &lt;a href=&quot;https://cseducators.stackexchange.com/a/6308/9097&quot;&gt;example given by candied_orange&lt;/a&gt;, which I found intriguing because of its simplicity. The example was (slightly edited here):&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Say I’ve got two coins. They can each take on two states (heads or tails). &#xA;  Flip em both; &lt;code&gt;xor&lt;/code&gt; can tell you if they show different states (not-equal coin sides).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;This hypothesis can be empirically verified by a scholar. The coins are physical, everyday objects, which could help to get &quot;in touch&quot; with the topic. Here is what can be observed, by stating the mentioned xor question:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;CoinA | CoinB | XOR (&quot;are they different?&quot;)&#xA;--------------------  &#xA;heads | heads | no  &#xA;tails | tails | no  &#xA;heads | tails | yes  &#xA;tails | heads | yes&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;In Boolean terms this would of course map to &lt;code&gt;heads=0&lt;/code&gt;, &lt;code&gt;tails=1&lt;/code&gt;, &lt;code&gt;no=0&lt;/code&gt;, &lt;code&gt;yes=1&lt;/code&gt; for example.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Replace &quot;they&quot; in the xor-question with the &quot;coin sides&quot; or &quot;states&quot; or &quot;inputs&quot; as it seems fitting for the explanation. Maybe it makes it clearer when talking about &quot;are they &lt;strong&gt;both/all&lt;/strong&gt; different&quot; to underline the &quot;exclusiveness&quot; of &lt;code&gt;xor&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This can also (maybe later on) lead to the awareness that &lt;code&gt;not xor&lt;/code&gt; (&quot;not different&quot;) is the same as &quot;equality&quot; (&lt;code&gt;==&lt;/code&gt; operator) with the paraphrasing question &quot;are they not different (=equal)?&quot;. So &quot;all are different&quot; and &quot;all are same&quot; are inverse to each other, logically.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Paraphrasing XOR&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;The thoughts on the subject of the insufficiency to put the meaning of xor into clear words and the suspected unsuitability of using just &quot;or&quot; sentences, &lt;a href=&quot;https://cseducators.stackexchange.com/a/6309/9097&quot;&gt;posted by Ben I. with comments by Buffy and ctrl-alt-delor&lt;/a&gt; lead to the following idea:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To paraphrase the xor operation, you could use &quot;either or&quot; sentences. As in &quot;Either eggs or pancakes?&quot; But this does still not exactly cover it. To make an &quot;exclusiveness&quot; statement about two objects (=inputs) you need a predicate to build a decision, which was stated in the original post and &lt;a href=&quot;https://cseducators.stackexchange.com/a/6305/9097&quot;&gt;by ctrl-alt-delor in the comments on another question&lt;/a&gt;. An example could be: &quot;What is tastier? Either pancakes or eggs?&quot; which optionally/implicitly should state &quot;Pick one exclusive/single option and discard the other. &quot;Both/All&quot; and &quot;None&quot; would not be valid answers then.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One downside mentioned by Ben I. is, that the predicate of &quot;tastier&quot; does not yield a &quot;true/false&quot; nor a &quot;yes/no&quot; answer, but a &quot;this or that&quot; answer.&lt;br&gt;&#xA;Taking the coin example with the &quot;are they different&quot; question yields the desired answer scheme in Boolean terms.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It is quite difficult to find other fitting examples. Imagine having a triangle and a disc cut from paper. The xor questions that come to mind are &quot;Do they both have a sharp tip?&quot;, &quot;Which is smaller? The triangle or the disc?&quot;, &quot;Are they both made from paper?&quot;, &quot;Are they equal?&quot;. Each must be carefully evaluated to decide if they generate suited xor statements in Boolean terms.&lt;br&gt;&#xA;This can be used as reciprocal exercise to link common language questions to the xor interpretation.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;To emphasize the &quot;exclusive&quot; character of xor, it should be made clear, that &quot;if you chose pancakes, you do not get eggs&quot; and vice versa, but this would be the unwanted procedural way of a selection, though.&lt;/p&gt;&#xA;" OwnerUserId="9097" LastEditorUserId="9097" LastEditDate="2020-05-03T05:54:12.410" LastActivityDate="2020-05-03T05:54:12.410" CommentCount="1" CommunityOwnedDate="2020-05-02T16:12:26.277" ContentLicense="CC BY-SA 4.0" />
  <row Id="6320" PostTypeId="1" CreationDate="2020-05-04T17:35:30.010" Score="7" ViewCount="343" Body="&lt;p&gt;I intend to lead a nephew through the exercises of sequence, selection, and iteration via Python.  I also intend to introduce hardware sensors for data collection.  If there is a better choice  (I learned via C++ and embedded opcode programming), for a high school student, I would be interested in understanding other options.  I have minimal experience with Python, however, I have had success with barcode readers, databases, string processing using Python.&lt;/p&gt;&#xA;&lt;p&gt;Which programming language best prepares high school students for a STEM college major and why? &lt;strong&gt;Any STEM: not necessarily a CS or even a EE major.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I would like the student to master the fundamentals:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sequence&lt;/li&gt;&#xA;&lt;li&gt;selection&lt;/li&gt;&#xA;&lt;li&gt;iteration&lt;/li&gt;&#xA;&lt;li&gt;utilizing library functions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The student should master these fundamentals so that he/she can search and recognize these concepts in another language (MATLAB, Ada, C, Smalltalk, etc.)&lt;/p&gt;&#xA;&lt;p&gt;The choice of language is important in the sense that one must consider the audience and balance the need for &lt;strong&gt;simplicity&lt;/strong&gt; (from the standpoint of 14 years old) and &lt;strong&gt;pedagogical quality&lt;/strong&gt;: as a stepping stone to future  STEM problem-solving activities.&lt;/p&gt;&#xA;&lt;p&gt;Reasons for my initial selection of Python include my observation that MIT is teaching &lt;a href=&quot;https://youtu.be/OgO1gpXSUzU?t=977&quot; rel=&quot;nofollow noreferrer&quot;&gt;statistics, which assumes fluency in Python&lt;/a&gt;.  Other reasons include a large number of Python libraries to support Raspberry Pi sensors and boards.&lt;/p&gt;&#xA;&lt;p&gt;If you are an instructor at the university level, please state this in your reply.&lt;/p&gt;&#xA;" OwnerUserId="9107" OwnerDisplayName="gatorback" LastEditorUserId="9154" LastEditDate="2021-07-16T03:35:32.373" LastActivityDate="2021-07-16T03:35:32.373" Title="What language best prepares a high school student for a STEM undergraduate major?" Tags="|programming|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6321" PostTypeId="2" ParentId="6320" CreationDate="2020-05-04T19:24:41.937" Score="6" Body="&lt;p&gt;There isn't a best language, other than the language that you know well and can use for modeling things. Python is good. And it is reasonably straightforward for a young beginner.&lt;/p&gt;&#xA;&lt;p&gt;Don't fall into the trap of thinking that a lot of languages learned superficially is valuable. It isn't and can lead you astray.&lt;/p&gt;&#xA;&lt;p&gt;But the things you list aren't enough. The big idea of modern computing languages is &amp;quot;abstraction&amp;quot;. Object oriented languages like Python do a pretty good job creating values that have sensible behavior that can be composed into programs.&lt;/p&gt;&#xA;&lt;p&gt;In the US, a CS educational program (a &lt;em&gt;major&lt;/em&gt;) is more likely to use Java than other languages, though it isn't universal. Another good language is Scheme, but with a C++ background you might have a harder time teaching the essence of it.&lt;/p&gt;&#xA;&lt;p&gt;And, don't fall into the trap of teaching Python as if it were C++ with more words. Each language has a mental model that is worth the effort to learn.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-07-05T16:02:21.660" LastActivityDate="2021-07-05T16:02:21.660" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6322" PostTypeId="2" ParentId="5760" CreationDate="2020-05-04T20:35:49.073" Score="1" Body="&lt;p&gt;Not sure about automatic grading, but you can try this combo:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://jupyter.org/documentation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jupiter&lt;/a&gt; as basic infrastructure&lt;/li&gt;&#xA;&lt;li&gt;with the &lt;a href=&quot;https://github.com/takluyver/bash_kernel&quot; rel=&quot;nofollow noreferrer&quot;&gt;bash_kernel&lt;/a&gt; to add support for bash exercises&lt;/li&gt;&#xA;&lt;li&gt;and &lt;a href=&quot;https://nbgrader.readthedocs.io/en/stable/&quot; rel=&quot;nofollow noreferrer&quot;&gt;nbgrader&lt;/a&gt; for the grades.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I never used nor tested this particular combination, but you can dig a little bit the documentation to check if it works for you.&lt;/p&gt;&#xA;" OwnerUserId="5196" LastActivityDate="2020-05-04T20:35:49.073" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6323" PostTypeId="2" ParentId="6241" CreationDate="2020-05-04T21:46:40.860" Score="1" Body="&lt;p&gt;Here's my proposal.&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A little bit of math to &quot;refresh&quot; the concepts needed in the next module.&lt;/li&gt;&#xA;&lt;li&gt;A little bit of statistics. This is my opinion can be used to analyze data sets from a statistical point of view, useful for some machine learning trained algorithms.&lt;/li&gt;&#xA;&lt;li&gt;The basics of one programming language you want to use across the course. Not knowing all the details I would say Python because there are a lot of libraries for ML available.&lt;/li&gt;&#xA;&lt;li&gt;Main neural networks and examples.&lt;/li&gt;&#xA;&lt;li&gt;Expert systems. Not very much hype about these currently, but in my opinion a good option.&lt;/li&gt;&#xA;&lt;li&gt;Machine learning algorithms and examples. &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="5196" LastActivityDate="2020-05-04T21:46:40.860" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6324" PostTypeId="2" ParentId="6294" CreationDate="2020-05-06T00:23:23.453" Score="3" Body="&lt;p&gt;Like you and one of the other answerers (as of writing this), in a class I TA for, we use Zoom for lectures and Discord for something else--in our case, we use Discord for office hours (undergrad, grad, and professor). Some of our TAs were the ones who thought of using a Discord server when we first moved everything online, so they ran the idea by the professor and set up the server. It's been 1.5 months now and it seems to work well enough.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you asked for thoughts on this, I'll share my thoughts. So this is a little bit rambly. My apologies.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Our particular setup involves having a general voice channel that any student can enter and then multiple voice channels that only the TAs and professor can enter and exit freely. Students must be pulled in by a TA or professor, and we each help one student at a time. The general voice channel + the general text channel, in which students should post what they need help with, are basically our queue. Once we're helping a student, we can stay in Discord, or we can move to Zoom.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Students must also request a Student role before they get access to anything more than the text channel in which they request the role, but we don't have any kind of verification system in place. Theoretically, though, we could have a verification system by having students message us a school ID that all students have that is not particularly sensitive information but is still relatively sensitive: You can easily find this ID for any currently enrolled student at our university if and only if you are also a currently enrolled student or faculty at our university, and the professors and TAs for any given class can see this ID for all students enrolled in that class (but students cannot see each other's IDs in this manner, nor can they see the roster unless the professor makes it visible).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We have posted the link to our Discord server in places where only those who are currently enrolled can directly see the link. So even without a verification system, the risk of having outsiders enter is low, and any outsiders who enter are likely to be students' friends. There's a lot of trust going on here.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;We also have a TA Lounge voice channel for just the TAs. Since we have multiple TAs during the same OH, I find that this channel helps to preserve the sense of camaraderie that we had before moving everything online, especially on slow days :) I love TA bonding time.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Even though some of us TAs are technically online all the time on Discord, we only help students with stuff like homework during our office hours, and we make sure students know that. We answer logistical questions whenever we see them, though; I think we've been treating those questions as if they were posted on Piazza, which we check at various times.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some students are clearly using their existing Discord accounts, and a small number don't even have any identifying information in their display name or Discord tag/ID. I personally don't see any issues with students using their personal accounts or even not displaying personal information as long as there is nothing obviously problematic like an offensive avatar or name. So far, we haven't had any issues like trolls or unprofessional behavior, and if there are any outsiders then they've been keeping quiet. Due to our lack of verification, there is the risk that a casual, low-tech bad actor can come in and get a bunch of the students' real names or private message other students and pretend to be nicer than they actually are or do some other social engineering, but I think this is basically the same risk as having a Facebook or something. (I say that as someone who refuses to have a Facebook account.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It's a little different among the TAs who have existing Discord accounts, although all of us have our real names as display names. Some TAs are using their existing accounts. I personally made a new account because of the reason you listed in the question; I think &quot;mixing business with pleasure&quot; is more relevant for people in instructor positions than for students. On my existing Discord account, I'm in many servers, ranging from game communities to communities of students at my university, and I already feel strange about using the same account for servers where I don't know everyone in real life by definition and servers where I can easily meet people in real life by definition. (I've always wondered about the reaction people will have if we happen to be in both a game server and a &quot;real life&quot; server. I don't have to worry too much since I'm always nice :) But the prospect still makes me a little nervous.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Something to note: &lt;strong&gt;You can't share your screen or see shared screens when you are in Discord on a web browser.&lt;/strong&gt; I and some students found out that out firsthand in 1-on-1 sessions as well as the one time we decided to have a lecture-style session during OH. This is particularly relevant for computer science classes in general, compared to classes in other disciplines. (I am logged in to my &quot;professional&quot; Discord on my laptop's browser and my iPad so that I can remain logged in to my personal Discord on the Discord apps on my laptop and phone.)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;While requiring students to download some kind of app for communication that isn't required by the school (Slack comes to mind) is not unheard of in classes, it feels strange to require students to download Discord, which isn't primarily marketed for professional/business use and which people may already know as a platform for gaming communities and other informal communities. I think what's going on is context collapse. But I suppose there isn't anything that's actually wrong with that. As the cherry on top of the strange feeling, though, it feels weird to require students to download the Discord app when the web browser version exists and is very functional, even though it's missing a feature that is important to students in our class. I'm not quite sure how to articulate why.&lt;/p&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2020-05-06T00:23:23.453" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6327" PostTypeId="1" CreationDate="2020-05-09T20:28:23.640" Score="5" ViewCount="413" Body="&lt;p&gt;I need a detailed  automata theory (or Theory of Computation) video lecture series to go hand in hand with the classic text books mentioned &lt;a href=&quot;https://cstheory.stackexchange.com/questions/1955/books-on-automata-theory-for-self-study&quot;&gt;in this question&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The books are fine but I am having problem in understanding many portions of the texts on my own. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I want to develop an intuition about the theory and related problems which I feel I am quite lacking. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;(I am following &quot;Introduction to Automata Theory, Languages, and Computation&quot; by Hopcroft, Ullman, Motwani)&lt;/p&gt;&#xA;" OwnerUserId="9125" LastEditorUserId="58" LastEditDate="2020-05-18T20:31:12.667" LastActivityDate="2020-06-05T18:48:25.053" Title="Detailed lecture series for automata theory or theory of computation" Tags="|self-learning|resource-request|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6328" PostTypeId="1" CreationDate="2020-05-11T11:11:44.593" Score="2" ViewCount="48" Body="&lt;p&gt;What would one suggest to learn web development? I was educated to mathematician and have done data-analysis. Now I was asked to do web pages, and I would like to practice that. However, it seems to be tricky to learn how to make sites to look good in both laptops and mobile browsers. Therefore, I would like to know good books, lecture notes, studying roadmap etc. to learn responsive web development by HTML and CSS. I like to learn those technologies first as the free host github sites supports those.&lt;/p&gt;&#xA;" OwnerUserId="9129" LastEditorUserId="1293" LastEditDate="2020-05-11T12:25:09.153" LastActivityDate="2020-05-11T12:26:56.767" Title="How to learn web design if backround is on mathematics and data analysis?" Tags="|self-learning|web-development|html|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6329" PostTypeId="2" ParentId="6328" CreationDate="2020-05-11T11:40:35.317" Score="1" Body="&lt;p&gt;Just about everything you need can be found in one or another book. &lt;a href=&quot;http://shop.oreilly.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;O'Reilly&lt;/a&gt; has a large selection of reputable work. (No affiliation) But a topical search online or at Amazon will get you what you need. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you prefer video, a search at YouTube, say, will turn up lots of possibilities. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Prefer recent books and videos, however. Straight html is seldom used for serious work these days. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-05-11T12:26:56.767" LastActivityDate="2020-05-11T12:26:56.767" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6330" PostTypeId="2" ParentId="6127" CreationDate="2020-05-12T07:58:28.900" Score="2" Body="&lt;p&gt;-Tim Roughgarden gives an example of selecting TV advertisements for a fixed time interval, different price for different kinds of goods advertised, and of course different duration for each ad. (called Knapsack auctions) &#xA;&lt;a href=&quot;https://youtu.be/BMoSLmuJsak&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/BMoSLmuJsak&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;-I think there r examples on utilizing networks fixed B.W., not very sure of the details. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;-Then, in these days with COVID-19 nothing wrong with the classic super market bag example (u want to store as useful goods as u can carry, with all deals &amp;amp; discounts they r offering u). Even without coronavirus, there is an MIT prof. that uses the supermarket example in his AI lectures.    &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://youtu.be/leXa7EKUPFk&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/leXa7EKUPFk&lt;/a&gt; (hope it's this exact lecture) &lt;/p&gt;&#xA;" OwnerUserId="9131" LastActivityDate="2020-05-12T07:58:28.900" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6331" PostTypeId="1" AcceptedAnswerId="6357" CreationDate="2020-05-13T04:39:33.227" Score="0" ViewCount="99" Body="&lt;p&gt;I am currently researching some good content/problems to teach my students. I am referring to Mensa's Book on Logical thinking, which has a good amount of puzzles for all age groups. Is there any other site I should refer to? And what are your suggestions on teaching methodology through online session?&lt;/p&gt;&#xA;" OwnerUserId="9134" LastEditorUserId="9134" LastEditDate="2020-05-13T18:39:33.203" LastActivityDate="2020-05-25T02:23:11.370" Title="How do I teach problem solving and logical thinking to students of age group 12-18yrs through online session" Tags="|lesson-ideas|teaching-analogy|problem-structure|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6332" PostTypeId="1" CreationDate="2020-05-13T11:38:35.303" Score="0" ViewCount="66" Body="&lt;p&gt;Do you know of any courses using Haskell to illustrate Computational Theory topics?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="27" LastEditDate="2020-05-14T01:11:16.143" LastActivityDate="2020-05-14T01:11:16.143" Title="Computer Science Theory with Haskell?" Tags="|resource-request|cs-theory|complexity-theory|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6333" PostTypeId="2" ParentId="5023" CreationDate="2020-05-13T22:51:32.937" Score="1" Body="&lt;p&gt;Everything naturally starts at 0. In the beginning, there was nothing. Now, there is all.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You might want to know if you have something or not, and how many as well. It's just easier to say how many.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Also, try counting without 0.&lt;br/&gt;&#xA;1, 2, 3, 4, 5, 6, 7, 8, 9&#xA;That's only 9 numbers. But if you count 10-19, you have 10 different numbers. 10-20, you have 11. It's easier to just go by the 10s place and group the numbers in tens.&lt;/p&gt;&#xA;" OwnerUserId="9136" LastEditorUserId="204" LastEditDate="2020-05-14T12:07:07.290" LastActivityDate="2020-05-14T12:07:07.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6335" PostTypeId="1" CreationDate="2020-05-13T20:56:44.923" Score="5" ViewCount="257" Body="&lt;p&gt;I teach an intro programming course in a social science department. My field is geographic information systems. The goal for the course is for the students to understand scripting in an interpreted language so that they can automate analytical workflows or add custom functionality to off-the-shelf software. The language we use is Python, but the question is more general than that.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Programming languages have some way of obtaining input and displaying output. There is a long tradition in computer science of starting with &lt;code&gt;&quot;Hello, World!&quot;&lt;/code&gt; as a basic program that produces output. Additionally, output statements can be used to display the state of variables for debugging purposes. Introducing input and output is common in computer science textbooks (&lt;em&gt;Think Python&lt;/em&gt; &lt;a href=&quot;http://greenteapress.com/thinkpython2/html/thinkpython2002.html#sec8&quot; rel=&quot;nofollow noreferrer&quot;&gt;1.3 The first program&lt;/a&gt;) as well as domain specific texts such as the one that I use for this course.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem I am running into is that beginning students can't seem to unlearn this after we move on to new material. Throughout the semester they turn in assignments that are littered with unnecessary &lt;code&gt;print&lt;/code&gt; statements. These are &quot;harmless&quot; in the sense that they don't alter program logic, but make for sloppy code, and are perhaps not harmless if the students think that they &lt;em&gt;need&lt;/em&gt; to do this and don't transition to, for example, using the IDE for variable inspection as they code.&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Q. Is it necessary or advisable to teach text-based input and output (e.g. Python's &lt;code&gt;input&lt;/code&gt; and &lt;code&gt;print&lt;/code&gt; functions) in a non-CS intro programming course?&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Is there pedagogical value? Does it teach something necessary? If so, can it be delayed? What are the alternatives, or is there no alternative?&lt;/p&gt;&#xA;" OwnerDisplayName="Lee Hachadoorian" LastEditorUserId="1035" LastEditDate="2020-05-31T18:59:15.933" LastActivityDate="2020-06-19T12:50:12.187" Title="Is it necessary or advisable to teach text-based input and output in a non-CS intro programming course?" Tags="|programming|introductory-lesson|" AnswerCount="6" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6336" PostTypeId="2" ParentId="6335" CreationDate="2020-05-13T22:49:11.393" Score="5" Body="&lt;p&gt;I've been coding for 20 years in non-cs fields. I've worked on several &gt;100k line code bases. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Almost every program I write comunicates with the outside world via text, usually a file hand or file-handle-like connection to stdin and stdout. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In addition, I also almost exclusively  do my debugging via print statements (or output to debugging logs). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;IDEs and graphical debuggers can be very useful tools, but they can become a crutch that excuses the student from thinking. Print statements encorage the student to really reason about the logical and flow of their program - they must be able to hold the program in their mind and understand where it is going to be important to output a variable state, or just ping &quot;here&quot; to the terminal. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now obviously I wouldn't insist that students must do this when working on large, complex code bases, but while they are making simpler things, things where holding the whole structure in your head is possible, then I think it is good for them.&lt;/p&gt;&#xA;" OwnerUserId="9251" OwnerDisplayName="Ian Sudbery" LastActivityDate="2020-05-13T22:49:11.393" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6337" PostTypeId="2" ParentId="6335" CreationDate="2020-05-14T01:27:46.553" Score="4" Body="&lt;p&gt;When it comes to input and output, it has been my experience that students cling to whatever they are immersed in first.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;print&lt;/code&gt; is great to make sure that your language is properly installed and hooked up with your IDE because it can typically be run in 1 line with no libraries, dependencies, linkages, etc.  After that, it can be dispensed with if you wish.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As Ian pointed out, there are plenty of people who stick with printing to the console, and there is nothing wrong with this per se.  But if you want your kids immersed in a different toolset with a different UI because it will be more useful in your field, that's fine, and you should pull them into that environment as soon as you conceivably can.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-05-14T01:27:46.553" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6338" PostTypeId="2" ParentId="6335" CreationDate="2020-05-14T12:18:42.743" Score="1" Body="&lt;p&gt;I have wondered the same. Since the 1980s when we down-graded to Microsoft's windows, The concept of standard-in and standard-out no-longer seems relevant, to most learners. So does it make sense to continue to write programs that write to standard-out?&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What can we do?&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use turtle graphics&lt;/strong&gt; (I have done this).&lt;/li&gt;&#xA;&lt;li&gt;Create windowing programs (this it to hard for a beginner, and win forms is un-necessarily hard for an expert).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Embrace the command line&lt;/strong&gt;: upgrade to Gnu/Linux, teach the command line, write bash scripts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the Unix shell we use text in and out. The output of one program in the input to the next. A function returns data by sending it to standard out (printing). So if you print it, then it is returned or passed to the next program in a pipe-line.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-05-25T10:34:09.390" LastActivityDate="2020-05-25T10:34:09.390" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6339" PostTypeId="1" CreationDate="2020-05-15T07:06:58.970" Score="3" ViewCount="282" Body="&lt;p&gt;I teach a course on C++ for 2nd year undergraduates in computer science. So far, the exams in my course contained mostly code-writing questions, such as &quot;write a class that implements a binary tree and supports the following methods: ...&quot;, or &quot;write unit-tests for a class that implements a complex number testing the following methods: ...&quot;. During the semester, the students have very similar homework assignments, so students who have worked the assignments on their own should get high grades on this exam. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The problem is that such an exam is very hard to read and grade. So this year I would like to try a differnet kind of exam, similar to a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cloze_test&quot; rel=&quot;nofollow noreferrer&quot;&gt;cloze test&lt;/a&gt;. The idea is to give them an implementation of a class (e.g. a binary tree), but with some important words or statements missing. They have to complete the missing words. For example: there is a destructor heading but its content is missing, or vice-versa: the content is there but the heading is missing. I plan to have about 100 missing words, each of which is worth 1% of the total grade.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;My questions are:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I design such a cloze-test such that it will be easy for students who have solved the homework assignments by themselves, but hard for students who have  not?&lt;/li&gt;&#xA;&lt;li&gt;Is this cloze-test used anywhere else for a programming language? I will be happy to see working examples so that I can get design ideas.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2021-12-17T22:41:14.520" Title="How to design a cloze test for a programming language?" Tags="|programming|exams|c++|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6341" PostTypeId="2" ParentId="6339" CreationDate="2020-05-16T12:43:25.240" Score="1" Body="&lt;p&gt;Let me suggest a deeper analysis of the situation. As you describe it, I think it is too simplistic. Or, if not, then too hard to communicate standards. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, why should every &quot;fill in&quot; have the same value? Different parts of a program are more important than others. In Java, for example, missing a semicolon is almost never an issue when you use an IDE that does various sorts of completions. Spelling errors are very hard to make in Eclipse (and others) for example. And, as a very experienced programmer with many languages and paradigms under my belt, I do depend on these &quot;creature comforts&quot; in programming. Even this site has a spell corrector. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;And if the fill ins have different weight, I think it will be hard to communicate that in a way that doesn't impede the student work. Certainly in needs to be transparent. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But let me suggest something similar, though it won't solve your &quot;easy to grade problem&quot;. I question the validity of that in any case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is a &quot;Fixer Upper Pedagogical Pattern&quot; (google it) that describes a certain kind of exercise. It might be adapted for an exam, especially if it were earlier used as a homework assignment. The idea is that you write a fairly significant program that solves an interesting problem. This should be a few hundred lines of code, perhaps. You then break the program in a few places. Some of the errors you introduce are purely syntactic (and perhaps fixable by an IDE). Others are deeper and require more understanding of the program and the problem it solves. I would never use it with an error in which the wrong underlying algorithm were used, however. The program is called a &quot;fixer upper&quot; and the student task is to repair the program (and pass a test suite, perhaps). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I don't think that this sort of exercise will separate the superstars from the plodders, but rather the superstars will find it easy and the plodders will need  to spend more time with it. But that is exactly what you want them to do. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Since you know where the program was broken it may not be an extremely difficult task to find where they have made changes and a &lt;em&gt;diff&lt;/em&gt; scan will show you that in any case. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Caveat. I've never had to scale a course beyond about 50 students, and seldom beyond 30, so have no experience if you are closer to 80, or 800. But at those scales, unless you have a lot of help in managing the course, the educational system itself is broken and should be fixed. Students need individual feedback. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-05-16T12:43:25.240" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6342" PostTypeId="2" ParentId="6339" CreationDate="2020-05-17T00:19:24.193" Score="6" Body="&lt;p&gt;I don't think that an entire Cloze test is practical, and in any case, it does not assess deep understanding well.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;One problem with longer Cloze examples is that they force the student not only to understand the goal, but also your particular implementation, which will often feel quite foreign to them, even if they are strong students.  A further problem with Cloze-style is that, the more blanks you leave, the more possible combinations of correct answers you leave.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I once had a student fill in a top portion, meant to initialize a variable prior to a loop, with a correct lambda statement that solved the overall problem, and then fill in the following loop fill-ins in such a way as to make sure the loop never entered.  The solution was a good one, so it received full credit.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I use a mix of problem types on my exams. Short Cloze-style questions can address syntactic understanding and the ability to accomplish very basic operations, such as identifying three compatible statements to put in a &lt;code&gt;for&lt;/code&gt; loop to&#xA;look through an array.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Multiple choice questions are good at making sure that particular distinctions are being made. I use these to isolate what I call &quot;cognitive traps&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Coding exercises are, indeed, hard to grade, but they are also necessary for testing whether everything can be pulled together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you need to bring down the grading time, you may want to consider keeping the examples short and making AP-style code rubrics, as they can make the grading far easier.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-05-17T00:19:24.193" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6343" PostTypeId="2" ParentId="6327" CreationDate="2020-05-17T00:37:22.063" Score="3" Body="&lt;p&gt;A quick google search reveals two courses on the MIT OCW website:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-045j-automata-computability-and-complexity-spring-2011/index.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Automata, Computability, and Complexity&lt;/a&gt; taught by Scott Aaronson; has Sipser along with two other texts as recommended reading, and comes with lecture notes and assignments&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://ocw.mit.edu/courses/mathematics/18-404j-theory-of-computation-fall-2006/index.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Theory of Computation&lt;/a&gt; taught by Sipser himself (!) with the 2nd edition of his textbook as required reading. It comes with assignments, exams, and notes on what readings should be done for each section, but does not have lecture notes uploaded.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;If neither of these suit, there is a &lt;a href=&quot;https://ocw.mit.edu/courses/find-by-topic/#cat=engineering&amp;amp;subcat=computerscience&amp;amp;spec=theoryofcomputation&quot; rel=&quot;nofollow noreferrer&quot;&gt;whole category&lt;/a&gt; on the MIT OCW website that has computational theory course materials. &lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;If you want video lectures, there is &lt;a href=&quot;https://www.youtube.com/playlist?list=PLslgisHe5tBM8UTCt1f66oMkpmjCblzkt&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; series on YouTube taught by a UC Davis professor based upon Sipser's textbook (the series is 26 lectures, each about 1hr15 in length). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most of these are based on Sipser, not Hopcroft et al., but Sipser is another classic text recommended in the question you link, so I figure these will likely work for you. Good luck!&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2020-05-17T00:37:22.063" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6344" PostTypeId="2" ParentId="6327" CreationDate="2020-05-19T07:44:30.673" Score="3" Body="&lt;p&gt;In the course I co-teach on Automata, Computability and Complexity Theory we use the &lt;a href=&quot;https://www.youtube.com/playlist?list=PLbtzT1TYeoMjNOGEiaRmm_vMIwUAidnQz&quot; rel=&quot;nofollow noreferrer&quot;&gt;excellent videos by Harry Porter&lt;/a&gt; to replace our classical lectures, and use our contact hours instead to practice with the material together with the students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Porter follows the book &quot;Introduction to the Theory of Computation&quot; by Sipser. &lt;/p&gt;&#xA;" OwnerUserId="8184" LastActivityDate="2020-05-19T07:44:30.673" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6345" PostTypeId="5" CreationDate="2020-05-22T08:07:41.957" Score="0" Body="&lt;p&gt;For questions about teaching programming (as opposed to e.g. &lt;a href=&quot;/questions/tagged/cs-theory&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;cs-theory&amp;#39;&quot; rel=&quot;tag&quot;&gt;cs-theory&lt;/a&gt;). Please consider whether a more specific tag is appropriate, e.g. &lt;a href=&quot;/questions/tagged/functional-programming&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;functional-programming&amp;#39;&quot; rel=&quot;tag&quot;&gt;functional-programming&lt;/a&gt; or one of the language tags.&lt;/p&gt;&#xA;" OwnerUserId="1035" LastEditorUserId="1035" LastEditDate="2020-05-31T18:58:44.660" LastActivityDate="2020-05-31T18:58:44.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6346" PostTypeId="4" CreationDate="2020-05-22T08:07:41.957" Score="0" Body="For questions about teaching programming (as opposed to e.g. [cs-theory]). Please consider whether a more specific tag is appropriate." OwnerUserId="1035" LastEditorUserId="1035" LastEditDate="2020-05-31T18:58:49.130" LastActivityDate="2020-05-31T18:58:49.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6347" PostTypeId="1" CreationDate="2020-05-22T10:37:48.720" Score="26" ViewCount="4058" Body="&lt;p&gt;A big part of understanding an idea deeply (such as a math theorem, for example) is being able to imagine a thought process which would lead one to invent or discover that idea. Michael Nielsen sometimes calls this &quot;discovery fiction&quot;. The goal is not necessarily to understand the true history of how the idea was developed, as the true history might be unnecessarily complicated, and might involve many wrong turns before stumbling onto the right idea. Rather, the goal is to imagine a thought process that would lead someone naturally to the idea, in a way that seems almost obvious.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; What thought process would lead to the invention of object-oriented programming?&lt;/p&gt;&#xA;" OwnerUserId="1979" LastActivityDate="2020-06-04T09:20:27.993" Title="What thought process would lead one to invent object-oriented programming?" Tags="|object-oriented-paradigm|" AnswerCount="12" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6348" PostTypeId="2" ParentId="6347" CreationDate="2020-05-22T11:22:17.413" Score="7" Body="&lt;p&gt;At its very core, software development is the skill of taking a complex problem and breaking it down repeatedly until it contains many simple problems.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;When explaining the difference between OOP and FP, I often resort to a (massively oversimplified) approach in how both of these approaches break down a complex problem into its constituent parts, but they use a different order of operations.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A customer wants to purchase a product. They contact a vendor, ask for a pricing, buy the product and then the vendor ships the order.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;An OOP developer breaks it down like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A &lt;code&gt;Customer&lt;/code&gt; wants to purchase a &lt;code&gt;Product&lt;/code&gt;. They contact a &lt;code&gt;Vendor&lt;/code&gt;, ask for a &lt;code&gt;Pricing&lt;/code&gt;, buy the &lt;code&gt;Product&lt;/code&gt;and then the &lt;code&gt;Vendor&lt;/code&gt; ships the &lt;code&gt;Order&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In short, an OOP developer first defines &quot;things that exist&quot; (objects/entities/...), and will at a later stage write the behaviors (interactions between objects).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But an FP developer breaks it down like this:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;A customer wants to &lt;code&gt;purchaseProduct&lt;/code&gt;. They &lt;code&gt;contactVendor&lt;/code&gt;, &lt;code&gt;askForPricing&lt;/code&gt;, &lt;code&gt;buyProduct&lt;/code&gt; and then the vendor &lt;code&gt;shipsOrder&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;In short, a FP developer first defines &quot;things that can be done&quot; (features/functions/actions), and will at a later stage write the necessary data (objects/entities/...) that are needed to chain these actions together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;em&gt;both&lt;/em&gt; approaches, you will eventually have developed both the actions (purchasing, contacting, ...) and the data (customers, products, ...), but you first defined one before you defined the other. OOP developers start with the data, FP developers start with the actions.&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;: What thought process would lead to the invention of object-oriented programming?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Initially, software development following a scientific context, where it was used mostly to assist scientist in calculating values with better performance and accuracy. At this point, functional programming reigned supreme, as mathematics are inherently defined as a set of functions/operations.&lt;br&gt;&#xA;When someone was asked to develop an algorithm, the purpose of the algorithm was explained to them by a physicist/mathematician, and therefore the instructions already following a functional pattern.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, at some point software started being used in a non-scientific context, for data in/output. In this world, there is a tendency to take a more OOP-like approach by first defining the data records that are expected to contain the data.&#xA;When someone was asked to develop software for this, they received instruction in an object-like format.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Having to translate the object-like specifications to functional language wasn't easy, but it could be made significantly easier by having the language mirror the specifications (as it reduces the need for complex translations). This is where OOP languages started emerging, which specifically defined the data points before any interactions between them would be discussed.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2020-05-22T11:22:17.413" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6349" PostTypeId="2" ParentId="6347" CreationDate="2020-05-22T19:32:19.637" Score="11" Body="&lt;p&gt;Even though you mention fearing the complexity of looking at wrong turns in its development, I think it is still instructive to change the question from &quot;What &lt;em&gt;would&lt;/em&gt; lead to the invention of object-oriented programming?&quot; to &quot;What &lt;em&gt;did&lt;/em&gt; lead to the invention of object-oriented programming?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You don't have to give the complete history to pull out the main motivations. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Starting with Simula:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Kristen Nygaard started writing computer simulation programs in 1957.&#xA;  Nygaard saw a need for a better way to describe the heterogeneity and&#xA;  the operation of a system. &lt;a href=&quot;https://en.wikipedia.org/wiki/Simula#History&quot; rel=&quot;noreferrer&quot;&gt;1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then on to the motivation behind Smalltalk's initial development: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Let me [Alan C. Kay] first present the general development of the Smalltalk-72&#xA;  system up to the transition to Smalltalk-76, and then follow that with&#xA;  the several years of work with children that were the primary&#xA;  motivation for the project. &lt;a href=&quot;http://worrydream.com/EarlyHistoryOfSmalltalk/#p17&quot; rel=&quot;noreferrer&quot;&gt;2&lt;/a&gt; &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;With this interesting tidbit thrown in: &lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;One day, in a typical PARC hallway bullsession, Ted Kaehler, Dan&#xA;  Ingalls, and I were standing around talking about programming&#xA;  languages. The subject of power came up and the two of them wondered&#xA;  how large a language one would have to make to get great power. With&#xA;  as much panache as I could muster, I asserted that you could define&#xA;  the &quot;most powerful language in the world&quot; in &quot;a page of code.&quot; They&#xA;  said, &quot;Put up or shut up.&quot;&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;I had originally made the boast because McCarthy's self-describing&#xA;  LISP interpreter was written in itself. It was about &quot;a page&quot;, and as&#xA;  far as power goes, LISP was the whole nine-yards for functional&#xA;  languages. I was quite sure I could do the same for object-oriented&#xA;  languages plus be able to do a reasonable syntax for the code a la&#xA;  some of the FLEX machine techniques. &lt;a href=&quot;http://worrydream.com/EarlyHistoryOfSmalltalk/#p17&quot; rel=&quot;noreferrer&quot;&gt;2&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Then this realization, also from Alan C. Kay regarding Simula and its influence on Smalltalk:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;What I got from Simula was that you could now replace bindings and&#xA;  assignment with goals. The last thing you wanted any programmer to do&#xA;  is mess with internal state even if presented figuratively. Instead,&#xA;  the objects should be presented as sites of higher level behaviors&#xA;  more appropriate for use as dynamic components.&lt;/p&gt;&#xA;  &#xA;  &lt;p&gt;Even the way we taught children (cf. ahead) reflected this way of&#xA;  looking at objects. Not too surprisingly this approach has&#xA;  considerable bearing on the ease of programming, the size of the code&#xA;  needed, the integrity of the design, etc. &lt;a href=&quot;http://worrydream.com/EarlyHistoryOfSmalltalk/#p17&quot; rel=&quot;noreferrer&quot;&gt;2&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;Now finally, C++&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The motivation for creating a new language originated from&#xA;  Stroustrup's experience in programming for his PhD thesis. Stroustrup&#xA;  found that Simula had features that were very helpful for large&#xA;  software development, but the language was too slow for practical use,&#xA;  while BCPL was fast but too low-level to be suitable for large&#xA;  software development. When Stroustrup started working in AT&amp;amp;T Bell&#xA;  Labs, he had the problem of analyzing the UNIX kernel with respect to&#xA;  distributed computing. Remembering his Ph.D. experience, Stroustrup&#xA;  set out to enhance the C language with Simula-like features. &lt;a href=&quot;https://en.wikipedia.org/wiki/C%2B%2B#History&quot; rel=&quot;noreferrer&quot;&gt;3&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So what actually led to the development of OO programming? To summarize:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Frustrations with the difficulty of accomplishing a set of tasks with the current tools available.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A desire to make building complex, reliable programs easier for others (especially children).&lt;/p&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A bit of a desire to show off, prove oneself, and overcome seemingly impossible technical hurdles.&lt;/p&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;I would argue that variations on these three points are what drive nearly every technical innovation in computer science.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-05-22T19:32:19.637" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6350" PostTypeId="2" ParentId="6347" CreationDate="2020-05-22T19:59:53.347" Score="7" Body="&lt;p&gt;I did a Computer Science degree before OOP effectively existed, nearly 50 years ago&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At that time, the professors felt very constrained by the limited choice of variable types, which was leading to unneeded complexity in programming when trying to carry around complex tightly coupled &quot;objects&quot; inside of code.  &lt;em&gt;I quoted &quot;objects&quot;, because they weren't using that term at the time.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;IMHO The need to create arbitrary &quot;objects&quot; was the driving force behind OOP and the first stage was in languages such as Algol68, which allowed you to create early forms of arbitrary &quot;objects&quot;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Eventually, this led to private and public variables and functions, and then into inheritance and then all the bells and whistles on modern OOP.&lt;/p&gt;&#xA;" OwnerUserId="9158" LastActivityDate="2020-05-22T19:59:53.347" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6351" PostTypeId="2" ParentId="6347" CreationDate="2020-05-22T20:10:38.260" Score="14" Body="&lt;p&gt;There are a number of different ideas that are all called OO.  I'm going to focus on the Simula-style OO.  Here's my fiction which I think isn't too far off from reality:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As computers became more powerful, the amount of entities in an model started to grow.  In addition, the different types of entities in these models was also increasing.  These models had the concept of the data for these entities which represented their state called 'structures'.  They also had the concept of behaviors that could be applied to these entities called 'methods'.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Because these entities were heterogeneous, the data in the structures wasn't always the same.  While all the entities might have some data elements such as a position in space, there were other data elements that were specific to some types of entities.  This presented a problem.  Some methods were common to entities such as movement.  But since the data structures had inconsistencies, making sure these common methods worked for all structures was difficult especially when a common method might need to work with properties that didn't exist on all entities.  Additionally, there were methods specific to entities and if a method used with an incompatible entity the results were unpredictable and possibly disastrous.  While careful programming could overcome these challenges, this was tedious error-prone work.  Productivity slowed dramatically as the complexity of the models increased.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;What was needed was a way to organize the program in order to eliminate the need to manually keep track of all of these competing concerns.  The first idea was to classify these objects into hierarchies.  Then the methods wouldn't need to understand every different  kind of entity, they would only need to consider the classifications that were relevant to behavior and the structure of the data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next idea was to reorganize the methods so that they were aligned to the classes themselves.  This removed the need for lots of special cases inside of the methods for different classes.  The method was already specific to the class.  Within a hierarchy, a class could 'inherit' behavior from a more general class in it's hierarchy or 'override' the behavior to make it more specific to it's needs.  Note: inheritance was later determined to create more problems than it solved beyond very limited use.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;These approaches resolved most of the problems with the complexity of these models.  Now the data structures could be modified for a given entity without having to consider the entire design.  New entities i.e. 'classes' could be added with relative ease.  OO would continue to be refined but these features established the core of the approach.&lt;/p&gt;&#xA;" OwnerUserId="2087" LastActivityDate="2020-05-22T20:10:38.260" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6352" PostTypeId="2" ParentId="6347" CreationDate="2020-05-22T22:52:56.690" Score="1" Body="&lt;p&gt;It is like the Unix philosophy: &#xA; - Write programs that do one thing and do it well.&#xA; - Write programs to work together. &#xA; - Write programs to handle text streams, because that is a universal interface (OO languages oppose this rule).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unix is object oriented, it even has a garbage collector (but written in C, a non OO language). &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;OO languages make it easier to make and join many small programs (classes).&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Classes contain global variables (global to the class, not the program), because globals make it easier, but they don't scale to large programs.&#xA;Programs change, you may need to improve, or re-use just one part.&#xA;Therefore create many small programs, and connect them together.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may do this the Unix way, or via an OO language (depending on which is best for a given job). For example rule 3 of the Unix philosophy stats that components should use text to communicate. This may not always be the best choice. Most Unix components have one input and one output (though this is not fixed), making pipelines easy. But other communication structures are hard. Copying data from one object/process to another, may not be the most efficient solution, OO languages allow just a reference to be passed. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;OO also incorporates functional programming, procedural programming, and structured programming (part of procedural, and functional).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I apologise as I have said nothing on the invention of OO, Only on the invention of OO languages. So it would be amiss to not state the obvious. OO languages make it easier to program in OO. But it is also possible (and very common), to use OO languages and not program in an OO way (e.g. use of static in Java). &lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-05-22T22:52:56.690" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6353" PostTypeId="2" ParentId="6347" CreationDate="2020-05-23T07:07:01.810" Score="2" Body="&lt;p&gt;While the existing answers are more than enough to answer the question, I'd like to share a very practical example of such a thought process. Consider the good old C type &lt;code&gt;FILE*&lt;/code&gt;. This type is an opaque handle to a stream of data, you can read from it, write to it, etc.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But what happens when you try to reuse, for example, &lt;code&gt;fprintf&lt;/code&gt; to format a string, except that you want to do it in-memory, rather than writing it to a file descriptor? Eventually the functions &lt;code&gt;fmemopen&lt;/code&gt; and &lt;code&gt;open_memstream&lt;/code&gt; were standardized in POSIX.1-2008 that allowed you to create a &lt;code&gt;FILE*&lt;/code&gt; handle that would write to a supplied in-memory buffer, thus solving the issue.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But there are still so many types of custom streams that we'd like to create. The only way to create a custom &lt;code&gt;FILE*&lt;/code&gt; handle is to use an unportable GNU extension &lt;code&gt;fopencookie&lt;/code&gt; which allows you to supply pointers to your own custom functions, needed to implement the FILE* behaviour. It has a very convoluted interface, but at least gets the job done.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In the end, we have a rudimentary implementation of polymorphism through several complicated, non-portable functions. Now think of how many other types could benefit from this.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In an OOP language, &lt;code&gt;FILE*&lt;/code&gt; would be an interface that anyone could implement. The standard library could provide helpful implementations of File, like FixedBufferFile and DynamicBufferFile, but the users has the power to create their own implementations and pass them to existing functions to achieve code reuse.&lt;/p&gt;&#xA;" OwnerUserId="9165" LastActivityDate="2020-05-23T07:07:01.810" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6354" PostTypeId="2" ParentId="6347" CreationDate="2020-05-23T18:52:52.570" Score="6" Body="&lt;p&gt;The core notion of the eponymous object emerges from the desire to bundle information which belongs together in &lt;em&gt;structures&lt;/em&gt; or &lt;em&gt;records&lt;/em&gt;. As COBOL shows, this is a natural projection of tabulated data into databases and computer memory in general. The alternative &amp;mdash; keeping each field in a separate variable &amp;mdash; becomes a maintenance nightmare which worsens exponentially with the program complexity. Bundling associated data in this way is a paradigm shift towards emphasizing the &lt;em&gt;rows&lt;/em&gt;, as opposed to &lt;em&gt;columns&lt;/em&gt;, of tabulated data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Each row can be conceived as a single complex data item, a record, a &lt;strong&gt;structure.&lt;/strong&gt; Once you have structures you write subroutines that take them, or pointers to them, as parameters. That is fundamentally what object orientation is about: Objects consisting of structured data plus &lt;strong&gt;operations on them.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The next step is almost minor: You bundle the functions with the data in a supercharged, self-contained structure called a &lt;strong&gt;class,&lt;/strong&gt; so that you can pass the set of allowed functions around together with the data. As a side effect, this obviates the need to pass the specific object as a parameter to the operation because the operation &lt;em&gt;is part of&lt;/em&gt; the specific set of data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Once we realize that &lt;em&gt;the object owns its operations,&lt;/em&gt; wouldn't it be nice if we could customize the behavior? Voila, &lt;strong&gt;polymorphism.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Later (because this is a painful realization through maintenance cycles) we realize that it is easier to keep &lt;em&gt;behavior&lt;/em&gt; compatible than &lt;em&gt;data&lt;/em&gt; (&quot;I don't even want to know your true inner reality: I only care about how you present yourself&quot; &amp;mdash; almost a Turing test for objects&lt;sup&gt;1&lt;/sup&gt;); &lt;strong&gt;interfaces&lt;/strong&gt; are born.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But it all started with bundling data.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;hr&gt;&#xA;&lt;sub&gt;&lt;sup&gt;1&lt;/sup&gt; And, may I say, such an American attitude. It's Skinner's approach vs. Freud's.&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="1675" LastEditorUserId="1675" LastEditDate="2020-06-04T09:20:27.993" LastActivityDate="2020-06-04T09:20:27.993" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6355" PostTypeId="2" ParentId="6347" CreationDate="2020-05-25T02:05:31.400" Score="4" Body="&lt;p&gt;As a former software engineer turned math &amp;amp; CS lecturer, the story that I'm telling all through my CS 1 &amp;amp; 2 courses is one of: &lt;em&gt;Imagine working on a large program with a large team of programmers.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Like: A million-line program with 50 programmers cooperating for 2-3 years, which is approximately the environment I was in with my first engineering job after college. This is a situation which is almost beyond the imagination of my community-college students -- with work and tests done in isolation, and maybe 50-line programs max over the yearlong sequence.  &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In my perspective, almost all the structures in high-level OOP languages (C++, Java) are in place to support large teams working on large projects. Even simple functions are an overwhelming hurdle for our students about halfway through CS 1; it seems like more typing and more busy-work and more restrictions, for no good reason, in a context when nothing is getting reused or called from multiple locations anyway. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;In CS 2 when we hit OOP the data-hiding is likewise completely bafflng when my students first see it. But I try to reiterate the story every day; you've got a million-line program which is far too big (in terms of data, variable identifiers) for any human being to memorize all of it. The data-hiding is done to remove parts of the program and mark them as &quot;you don't need to know or care or memorize this&quot;, and remove mental burden from my teammates, and prevent them from accidentally messing up the data in question (enforced by the compiler itself). That's enormous. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;I describe inheritance likewise as a way to get new objects written while minimizing the amount of new code that my teammates need to write, and of course polymorphism has a similar story. That said, I've seen multiple thinkers lately assert that those aspects are not super critical (e.g., Go doesn't support inheritance), and it's the data-hiding that was really the shining treasure that makes working cooperatively in large teams possible.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fred Brooks wrote a follow-up to his essential &lt;a href=&quot;https://en.wikipedia.org/wiki/No_Silver_Bullet&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;No Silver Bullet&quot;&lt;/a&gt; essay (included in the revised version of &lt;em&gt;The Mythical Man-Month&lt;/em&gt;), which continued the almost total pessimism except with the single bright spot of OOP. Speaking of modularity, encapsulation, inheritance, and strong abstract data-types, he wrote, &quot;The attractiveness of object-oriented approach is that of a multivitamin pill: in one fell swoop (that is, programmer retraining), one gets them all. It is a very promising concept.&quot;&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2020-05-25T14:06:37.527" LastActivityDate="2020-05-25T14:06:37.527" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6356" PostTypeId="2" ParentId="6292" CreationDate="2020-05-25T02:12:36.400" Score="4" Body="&lt;p&gt;My department uses Dev-C++. It's free, simple, offline, portable, and lightweight. Windows native.&lt;/p&gt;&#xA;&lt;p&gt;Over the years the maintainer has swapped hands a number of times, it's occasionally gone a number of years without updates, and the size of the install has increased. But I like it quite a bit. As of this edit it got a new maintainer and update to v.6 a few months ago (November 2020):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.embarcadero.com/free-tools/dev-cpp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dev-C++ v.6 by Embarcadero (72 MB, 1/31/21)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://orwelldevcpp.blogspot.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dev-C++ v.5 by Orwell (49 MB, 4/27/15)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.bloodshed.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dev-C++ v.4 by Bloodshed (9 MB, 10/10/05)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Mirrors for the v.6 version that avoid the current maintainer's request for a lot of personal data can be found &lt;a href=&quot;https://embarcadero-dev-c.updatestar.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://www.softpedia.com/get/Programming/Coding-languages-Compilers/Embarcadero-Dev-C.shtml&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2021-02-08T20:09:25.117" LastActivityDate="2021-02-08T20:09:25.117" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6357" PostTypeId="2" ParentId="6331" CreationDate="2020-05-25T02:23:11.370" Score="1" Body="&lt;p&gt;I would go back through old copies of GAMES magazine (libraries may have a stash somewhere).  They go the whole way back to something like 1977 and generally have lots of puzzles of various levels.  Apparently they merged together with another company back a couple of years ago.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://gamesmagazine-online.com/product/vintage-games-packs/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gamesmagazine-online.com/product/vintage-games-packs/&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In particular, I'm thinking of some puzzles where you are given a bunch of statements about a group of people and then have to derive all the information about them from logical inferences.  Generally, you'd have to lay out a diagram of some form and use that to either associate or block particular combinations until you figured everything out (much like sudoku but with logical constructions of words--this stuff predated sudoku by a long way).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;As the teacher, you can &quot;run the diagram&quot; while the students can try to discuss the various implications of the statements.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;(Edit: I just remembered a book I had a &lt;em&gt;long&lt;/em&gt; time ago called &quot;Puzzles for Pleasure&quot; by E. R. Emmet--also a good source).&lt;/p&gt;&#xA;" OwnerUserId="2273" LastActivityDate="2020-05-25T02:23:11.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6358" PostTypeId="2" ParentId="6347" CreationDate="2020-05-25T11:44:18.907" Score="1" Body="&lt;p&gt;I don't know that this is historically accurate but this reminds me of &lt;a href=&quot;https://en.wikipedia.org/wiki/Gestalt_psychology&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gestalt psychology&lt;/a&gt;, which states that we perceive patterns and &quot;organisations&quot; better than individual components.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Most likely, it must have occurred to multiple programmers of that era that building large programs with multiple distinct entities would be simpler by organizing variables by entity. This approach would still have some difficulties to it if you needed multiple instances of complex entities.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;At this point, I think it becomes a natural (but non trivial) thought process evolution to want to create a pattern of methods and members and identify it by a specific name.&lt;/p&gt;&#xA;" OwnerUserId="9181" LastActivityDate="2020-05-25T11:44:18.907" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6359" PostTypeId="2" ParentId="6347" CreationDate="2020-05-25T13:43:53.530" Score="2" Body="&lt;p&gt;The idea of objects in programming predates Alan Kay.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The earliest example that I know of was from &lt;a href=&quot;https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ivan Sutherland's Sketchpad program from 1961.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sutherland submitted that work for his PhD in 1963.  It describes how the system works, and how the system was developed.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In that case, it appears to me that there was a visual concept that turned out to be a useful abstraction in programming.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Sketchpad allowed the user to define a drawn object, and reuse that object in further drawings.  You could define an arc, and use it to define an eye.  Then you could use two eyes in defining a face.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This is object orientated work.  The concept of reusing the drawing elements was then reflected in the organization of the underlying program code.  The language itself was not object oriented - Sketchpad was written before there were object oriented languages.  I'm not sure what language was used, though it seems there were extensions (macros) written which extended it to make it easier to write Sketchpad.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The preface to that paper (written in 2003 when the PDF was created from the original dissertation) refers to Alan Kay and Simula.  It also mentions that Alan Kay's concept of object oriented programming was influenced Simula and Sketchpad - and that Sketchpad and Simula both stem from earlier work by Douglas Ross.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In any case, the concept of objects (though not named that by Sutherland) seems to have gotten into Sketchpad by the process of finding objects in a real situation (drawing) which were then influenced the structure of the code used to represent and manipulate drawings in the computer.&lt;/p&gt;&#xA;" OwnerUserId="9182" LastEditorUserId="9182" LastEditDate="2020-05-25T15:51:42.450" LastActivityDate="2020-05-25T15:51:42.450" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6360" PostTypeId="1" CreationDate="2020-05-27T11:52:36.470" Score="1" ViewCount="152" Body="&lt;p&gt;Do you know of any online resource with ideas/projects for an Algorithms and Data Structures course? Topics in the course include: basic data structures (array, list, stack, queue, priority queue, graphs, trees), sorting, hashing, etc.&#xA;Such a course is typically for freshmen and grading is based on:&#xA;1. Correctness&#xA;2. Documentation&#xA;3. Use of abstraction and design patterns.&#xA;4. Efficiency.&#xA;It's becoming more and more important for assignments to be somehow auto-gradable, at least with respect to correctness and efficiency.&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="6410" LastEditDate="2020-05-27T19:10:14.140" LastActivityDate="2020-05-27T19:10:14.140" Title="Coding assignments for algorithms and data structures?" Tags="|algorithms|data-structure|code-example|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6361" PostTypeId="2" ParentId="6360" CreationDate="2020-05-27T16:47:21.263" Score="2" Body="&lt;p&gt;I'm not aware of any singular, central repository for assignment ideas.  My sources for project ideas when my own well begin to run dry are:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Textbooks.  Often, a problem in a problem set will trigger an idea for a full-blown lab assignment.&lt;/li&gt;&#xA;&lt;li&gt;Other similar courses posted by other professors.  Obviously, it is important not to simply steal someone's idea.  I will adapt the assignment and make it my own.  If it is still substantively similar to the original when I am done, I will credit the original professor with a link to the original assignment.  (I have also on a small number of occasions reached out to a professor directly for permission to simply use one of their assignments directly. It has been my experience that people have been very gracious in these situations, both granting permission, and sometimes providing additional supporting materials such as rubrics, exemplar answers, and autograder test cases.)&lt;/li&gt;&#xA;&lt;li&gt;I just generally keep an eye out for fun lab ideas and write them down when they come to me, even (especially!) if they are for classes that I am not currently teaching, because I have found this to be a useful resource when I begin to teach a new class.&lt;/li&gt;&#xA;&lt;li&gt;We assign a fair number of open-ended projects.  I have not historically used these as source ideas for future lab assignments, but there is no reason that I couldn't do so, and thinking upon it now, I probably should.  I would, of course, share this with the students in question.  Most students would probably be flattered at the idea of their project being adapted to a full course lab, though if someone had objections, I would not press them.  Ideas are hard to come by, but not &lt;em&gt;that&lt;/em&gt; hard.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-05-27T16:47:21.263" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6362" PostTypeId="2" ParentId="6347" CreationDate="2020-05-27T21:36:20.977" Score="2" Body="&lt;p&gt;The development of OOPS can be explained with three considerations:  &lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Able to be described so as to be understood  &lt;/li&gt;&#xA;&lt;li&gt;Able to be taught  &lt;/li&gt;&#xA;&lt;li&gt;Able to be enforced  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;Many people develop great facility with something so as to become experts. For example, I had a great Welding Instructor once. An expert might be able to teach a few people in person, or perhaps not be capable of doing that. If not, everything they learned is eventually lost, and in any case, cannot be generally used. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Fortunately, my Welding Instructor could teach, but also fortunately, we had a textbook, so that he did not have to teach every single thing, and I could refer to the resource later. So, we need a system that can be written about, with standard terms and agreed on conventions. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;To build something large, like a bridge or software system, there need to be standards that can be objectively verified and enforced. Everyone needs to be trained. Welders go to Trade School. Programmers learn at a University, on the job, or through courses or self-study. But they ideally all learn the same thing, and apply it uniformly. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So, basically, OOPS came about &quot;because Science&quot;. And thus we have its offspring: Bureaucracy. But it is important to realize that, unlike Welding, which has absolute physical constraints (it is based on Engineering), programming is basically arbitrary. The CPU doesn't really care what language you wrote the code in. The language and associated systems have a lot more to do with how human minds work, and most importantly, their limitations. As Edsger Dijkstra said, most of programming is an attempt to compensate for the strictly limited size of our skulls. The people who are best at programming are the people who realize how small their brains are. They are humble.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;It takes a humble person to design a large system without building their ego in to it. I am not sure if any of the current paradigms have achieved that. &lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2020-05-27T21:36:20.977" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6365" PostTypeId="2" ParentId="6347" CreationDate="2020-05-29T15:21:10.833" Score="2" Body="&lt;p&gt;As @alephzero said, even though the original Fortran didn't have structs or records, people still created and programmed objects &amp;#8212; using a set of arrays, where each array holds one field for all the objects, and thus an object is represented by the same index position in each array.&amp;nbsp; An object can be passed as a parameter by its index; an object's fields can be accessed using array references.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Object-based programming has been around forever, and OOP represents a long series of little improvements to make object programming easier.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Don't have structs or record (a product type): use arrays.&amp;nbsp; Don't have tagged unions: use a enum.&amp;nbsp; Don't have enum's: use an integer.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The thought process is something like: we're doing this programming but it is painful to duplicate this or annoying to write it this way, so why not make linguistic improvement.&amp;nbsp; Just a long series of removing pain points in the way we program.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, in many languages, objects were programmed using structures &amp;amp; unions, and polymorphism was handled using tagged unions (enums) with switch statements (for dispatch).&amp;nbsp; This works, but has pain points, of having to having to edit numerous switch statements spread throughout the code every time a new enum (class) is added.&amp;nbsp; Further, back then at least, there is no error give by the compiler if you forget to expand one switch statement.&amp;nbsp; So, people searched for a way to collect related code together, and reduce these pain points.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Design patterns tend to exist so that we can name and share programming techniques &amp;#8212; they are our first formalization.&amp;nbsp; Parallel arrays are no longer a design pattern because all languages today have some sort of product type.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Today our design patterns include, visitors, double dispatch, containers for dependency injection and inversion of control.&amp;nbsp; In future we may see languages that either build these concepts in or make them easier to use.&lt;/p&gt;&#xA;" OwnerUserId="3799" LastEditorUserId="3799" LastEditDate="2020-05-29T15:48:26.530" LastActivityDate="2020-05-29T15:48:26.530" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6366" PostTypeId="1" CreationDate="2020-05-30T12:42:29.577" Score="1" ViewCount="200" Body="&lt;p&gt;The course includes: Regular Languages, Context-Free Languages, Turing Machines, Decidability, Reductions, etc. Do you know of any collection of problems/solutions suitable for a senior course?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2020-06-05T18:31:33.723" Title="Any website or textbook with problems/solutions for Computer Science Theory?" Tags="|textbook|cs-theory|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6367" PostTypeId="2" ParentId="6366" CreationDate="2020-05-30T21:06:57.470" Score="1" Body="&lt;p&gt;The standard text is probably the &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/113318779X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sipser book&lt;/a&gt;.  It's fantastic, and the problem sets are quite intellectually rich.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-05-30T21:06:57.470" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6368" PostTypeId="1" AcceptedAnswerId="6369" CreationDate="2020-06-04T12:14:47.757" Score="5" ViewCount="1558" Body="&lt;p&gt;The question may be found in the following link. I have been asked in the comments to provide my question on this Stack Exchange site.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;&lt;a href=&quot;https://english.stackexchange.com/questions/536469/is-there-a-word-for-mathematics-physics-data-analytics&quot;&gt;Is there a word for mathematics/physics/data-analytics/…?&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="9207" LastEditorUserId="1314" LastEditDate="2020-06-05T11:49:52.017" LastActivityDate="2020-06-05T16:00:14.777" Title="In what branch of science does technology belong?" Tags="|computer-history|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6369" PostTypeId="2" ParentId="6368" CreationDate="2020-06-04T13:14:40.023" Score="13" Body="&lt;p&gt;Actually, technology &lt;em&gt;per se&lt;/em&gt; isn't science. But then, neither is mathematics. Technology is normally about the creation of things. Science is about using a certain methodology for trying to discern the truth about the world and natural processes. If you define natural processes broadly, including human processes, then social science is also science. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;But mathematics is about using logical process to explore the implications of basic assumptions (axioms).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;But both science and mathematics are about &lt;em&gt;ideas&lt;/em&gt;, whereas technology is about &lt;em&gt;things&lt;/em&gt;. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Technology, as in iPhones and respirators and all, is about the creation of useful things. That is basically why you can &lt;em&gt;patent&lt;/em&gt; inventions, but you can only copyright scientific papers. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Some sorts of technology, say vaccines, depend on science to assure safety and efficacy. And some sorts of technology depend on mathematics, such as computers and bitcoin. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Computer Science has elements of both science and technology. But one normally gets a PhD in CS for discoveries on the scientific side, even if the science is an exploration of something created on the technological side. CS actually has elements of mathematics as well, such as in algorithm analysis and computability theory. &lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-06-04T18:19:11.450" LastActivityDate="2020-06-04T18:19:11.450" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6370" PostTypeId="2" ParentId="6368" CreationDate="2020-06-05T16:00:14.777" Score="4" Body="&lt;p&gt;Science is theory and Technology is putting science into implementation.&#xA;Science is like learning swimming by seeing youtube and Technology is diving into a water body and swimming yourself.&#xA;So my dear Technology is not a branch of science, but itself technology is practical implementation or practical ways of implementation.&lt;/p&gt;&#xA;" OwnerUserId="9213" LastActivityDate="2020-06-05T16:00:14.777" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6371" PostTypeId="2" ParentId="6366" CreationDate="2020-06-05T18:31:33.723" Score="2" Body="&lt;p&gt;I agree that Introduction to the Theory of Computation by Sipser is good text, but I also recommend taking a look at the &lt;a href=&quot;http://web.stanford.edu/class/archive/cs/cs103/cs103.1184/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Stanford CS103 course page archive&lt;/a&gt;, which has a lot of great supplementary resources, including handouts, problem sets, and lecture notes.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-05T18:31:33.723" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6372" PostTypeId="2" ParentId="6335" CreationDate="2020-06-05T18:46:36.603" Score="2" Body="&lt;p&gt;You've asked several questions here, so I'll attempt to address them separately. However, a big disclaimer that a lot of what you've asked for is subjective, so take my opinions here with a grain of salt.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: In my experience, text-based output is essential for teaching debugging, however text-based input is a huge pain and generally isn't all that engaging for an introductory course. There are no concepts intrinsic to text-based input that can't be deferred until later.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q. Is it necessary / advisable to teach text-based input and output in a non-CS intro programming course?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I would definitely advise teaching text-based output, solely because it's the easiest way to teach and use debugging. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;Unless you have a good reason to teach text-based input (and here &quot;good reason&quot; is defined as &quot;connects to your course outcomes in some way&quot;), I don't think there's any reason to try to fit text-based input into your course solely for tradition. Is it useful? sure. Is it necessary for a intro course for non-cs majors? No.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q. Is there pedagogical value?&lt;/strong&gt; &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is some value in all knowledge, but the sheer breath and depth of topics available to be taught in an introductory programming course is such that you have to draw some lines in the sand as to what to keep and what to cut. I suggest those lines are connected to your course outcomes. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q. Does it teach something necessary?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The main thing it's going to teach your students is that taking text-based input and doing something useful with it is a non-trivial exercise with lots of edge cases.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If that concept is central to your course outcomes, then you should include it. Otherwise...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q. If so, can it be delayed?&lt;/strong&gt; &#xA;It can absolutely be delayed. How long it can be delayed depends on the scope and sequence of the program this course is a part of. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Q. What are the alternatives, or is there no alternative?&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you mean &quot;what are the alternatives for allowing students to create interactive programs&quot;? There are plenty. You could use windows with buttons, arrow keys, audio / video input devices, etc... &lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-05T18:46:36.603" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6373" PostTypeId="2" ParentId="6327" CreationDate="2020-06-05T18:48:25.053" Score="2" Body="&lt;p&gt;I high recommend taking a look at the &lt;a href=&quot;http://web.stanford.edu/class/archive/cs/cs103/cs103.1184/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Stanford CS103 course page archive&lt;/a&gt;, which has links to very engaging lectures, and lot of great supplementary resources, such as handouts, problem sets, and lecture notes / slides.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-05T18:48:25.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6374" PostTypeId="1" CreationDate="2020-06-03T17:31:11.043" Score="4" ViewCount="68" Body="&lt;p&gt;I'm trying to categorize university courses of the department of computer science and electronic engineering.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Such courses may include:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Data Analytics and Machine Learning&lt;/li&gt;&#xA;&lt;li&gt;Computer Science and Physics&lt;/li&gt;&#xA;&lt;li&gt;Computer Science and Mathematics&lt;/li&gt;&#xA;&lt;li&gt;Cyber Security &lt;strong&gt;(NETWORKS CATEGORY)&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Computer Science and AI &lt;strong&gt;(COMPUTING CATEGORY)&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;With this small list of courses, if I were to combine courses in categories, what would be the best word to use for 1/2/3&lt;/p&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did some research and found out that science can be separated in &lt;strong&gt;Pure Sciences&lt;/strong&gt; and &lt;strong&gt;Applied Sciences&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Pure Science&lt;/strong&gt; includes:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Physical Science (Physics, Chemistry, Astronomy)&lt;/li&gt;&#xA;&lt;li&gt;Earth Science (Geology, Oceanography, Paleontology, Meteorology, Petrology)&lt;/li&gt;&#xA;&lt;li&gt;Life Science (Botany, Zoology, Genetics, Medicine, Nuitrition)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;But I'm not sure where &lt;strong&gt;TECHNOLOGY&lt;/strong&gt; (Computation, Engineering, ...) belongs as well as &lt;strong&gt;ARTS&lt;/strong&gt;?&lt;/p&gt;&#xA;" OwnerUserId="9207" OwnerDisplayName="Loizos Vasileiou" LastEditorUserId="27" LastEditDate="2020-06-06T22:01:34.883" LastActivityDate="2020-06-19T13:02:08.847" Title="Is there a word for mathematics/physics/data-analytics/....?" Tags="|curriculum|" AnswerCount="3" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6375" PostTypeId="2" ParentId="6374" CreationDate="2020-06-04T17:33:19.183" Score="2" Body="&lt;p&gt;Very nice explanation from @Buffy, on the Computer Science Educators SE.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/6368/in-what-branch-of-science-does-technology-belongs/6369#6369&quot;&gt;In what branch of science does technology belong?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9207" OwnerDisplayName="Loizos Vasileiou" LastEditorUserId="9207" LastEditDate="2020-06-08T23:06:18.290" LastActivityDate="2020-06-08T23:06:18.290" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6376" PostTypeId="2" ParentId="6374" CreationDate="2020-06-05T14:15:44.800" Score="6" Body="&lt;p&gt;&lt;strong&gt;Sciences of the Artificial&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;There are many ways to categorize the sciences.  Herbert Simon (Nobel Prize winner, pioneer of artificial intelligence as well as economics, organization theory, etc.) wrote a book-length essay called &lt;em&gt;The Sciences of the Artificial&lt;/em&gt; to make a case for why the &quot;applied&quot; sciences have a rightful place in academia.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;In &lt;em&gt;The Sciences of the Artificial&lt;/em&gt;, Simon laid the foundations for a philosophy of the artificial and a science of design. Artificial (i.e. “man-made”) things surround us. They are constrained by physical laws and, if we want, we can study them “objectively” using the natural sciences: for example, a physicist could take an airplane as a given and study the way it is affected by the flow of wind. But this doesn’t really capture the whole truth of the artifact. An artifact such as an airplane also embodies certain goals that we need to grasp if we are to understand it.&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;“If science is to encompass these objects and phenomena in which human&#xA;  purpose as well as natural law are embodied, it must have means for&#xA;  relating these two disparate components.” (Simon, p. 3)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;An artifact for Simon could be seen as a meeting point between an “inner environment”, the way the artifact itself worked, and an “outer environment”, the problem it addresses and the context in which it operates. The relationship between the inner and outer environments is where we find human purpose. A problem solver, engineer, or designer is someone who tries to make the inner environment appropriate to the outer environment. For example: for the inventor of an airplane, the outer environment is characterized by the known laws of gravity and air pressure. He makes choices about the inner environment (the materials to use, the type of engine, and so forth) in order to achieve a goal—flight.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;&quot;Goals&quot; as subject of study&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For a while I did a lot of reviewing papers in the &quot;design science&quot; domain in my academic field.  Somewhere in all of that material (I can't remember the author) I came across a categorization of the sciences that used the relationship between the science and &lt;em&gt;human purpose&lt;/em&gt;:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;em&gt;physical sciences&lt;/em&gt; such as mathematics, physics, chemistry, pay no attention to human goals.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;em&gt;social sciences&lt;/em&gt; such as psychology, sociology, economics, study human motivations as natural phenomena, but are indifferent to them.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;em&gt;design sciences&lt;/em&gt; or &lt;em&gt;sciences of the artificial&lt;/em&gt; such as architecture, engineering, medicine, business, allow researchers to take sides, to work on important human goals.  They study &lt;em&gt;problems&lt;/em&gt; as perceived by humans, and they study &lt;em&gt;solutions&lt;/em&gt;, both using scientific methods.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="9212" OwnerDisplayName="workerjoe" LastActivityDate="2020-06-05T14:15:44.800" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6377" PostTypeId="1" CreationDate="2020-06-07T03:04:01.470" Score="3" ViewCount="66" Body="&lt;p&gt;I am an undergraduate student, and I have an idea which I want to explore and write a research paper on. But I am totally new to this.&#xA;I don't have good CS community at my place. &#xA;So I can only look for a distant mentor.&#xA;Please tell me how and where (sites, forums) it is possible.&lt;/p&gt;&#xA;" OwnerUserId="9217" LastActivityDate="2020-07-04T14:56:46.463" Title="How can I find someone online to mentor me on my first research paper?" Tags="|struggling-students|collaboration|scientific-papers|mentoring|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6378" PostTypeId="2" ParentId="6377" CreationDate="2020-06-07T18:04:28.267" Score="0" Body="&lt;p&gt;Depending on how serious you are (and what you mean by the word &quot;research&quot;) your best bet may well be to search out professors in that area of research, no matter where they are in the world.  You could simply explain your position to them, and ask for they would be willing to work with you on the paper.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;You may well get some &quot;yes&quot; answers.  This could also be a good way to start a relationship that could lead to a doctorate.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-06-07T18:04:28.267" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6379" PostTypeId="2" ParentId="6320" CreationDate="2020-06-07T20:26:52.413" Score="5" Body="&lt;p&gt;If you want to teach them how to &lt;em&gt;code&lt;/em&gt; or &lt;em&gt;how to implement algorithms&lt;/em&gt;, then any language will do just as well as any other.&lt;/p&gt;&#xA;&lt;p&gt;But if you want to prepare them &lt;em&gt;to be successful in STEM&lt;/em&gt;, then here are the top three skills I wish all of my undergraduate students had more experience with:&lt;/p&gt;&#xA;&lt;h1&gt;1. Basic Problem Solving&lt;/h1&gt;&#xA;&lt;p&gt;The most important thing to teach someone you want to help prepare for a STEM major is &lt;em&gt;problem solving&lt;/em&gt;. Specifically:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to look at a situation/scenario/question and clearly define the problem.&lt;/li&gt;&#xA;&lt;li&gt;How to break that problem up into smaller parts.&lt;/li&gt;&#xA;&lt;li&gt;How to solve each part independently and/or sequentially as needed.&lt;/li&gt;&#xA;&lt;li&gt;How to put those independent solutions back together into a complete solution to the original problem.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Teaching this skill doesn't require a specific language or even a computer. In fact, I often tell me students that they shouldn't even open up their code editors until they have these steps clearly worked out on paper or a whiteboard in some way.&lt;/p&gt;&#xA;&lt;h1&gt;2. How to Read Technical Documentation&lt;/h1&gt;&#xA;&lt;p&gt;Over the last couple of decades, &lt;a href=&quot;https://www.nngroup.com/articles/how-people-read-online/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the way people read complex information has changed dramatically&lt;/a&gt;, driven largely by how online content is presented.&lt;/p&gt;&#xA;&lt;p&gt;When my students hit mid-level courses and assignment instructions consist of things like &amp;quot;Go learn how such and such library works and then solve this problem with it,&amp;quot; many of them struggle with figuring out how to read the documentation and instead fallback to YouTube videos.&lt;/p&gt;&#xA;&lt;p&gt;There are some great video-based tutorials, but most tools and technologies in CS change so fast, nothing beats being able to go directly to the most up-to-date docs and read through the technical details of how the API works.&lt;/p&gt;&#xA;&lt;h1&gt;3. Communication Skills / Working Well With Others&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.forbes.com/sites/susanadams/2014/11/12/the-10-skills-employers-most-want-in-2015-graduates/#4bebb14f2511&quot; rel=&quot;nofollow noreferrer&quot;&gt;This survey posted in Forbes&lt;/a&gt; shows the top 10 skills employers look for in technology hires. Notice how specific technical skills don't show up on the list until way down at number 7:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Ability to work in a team structure&lt;/li&gt;&#xA;&lt;li&gt;Ability to make decisions and solve problems (tie)&lt;/li&gt;&#xA;&lt;li&gt;Ability to communicate verbally with people inside and outside an organization&lt;/li&gt;&#xA;&lt;li&gt;Ability to plan, organize and prioritize work&lt;/li&gt;&#xA;&lt;li&gt;Ability to obtain and process information&lt;/li&gt;&#xA;&lt;li&gt;Ability to analyze quantitative data&lt;/li&gt;&#xA;&lt;li&gt;Technical knowledge related to the job&lt;/li&gt;&#xA;&lt;li&gt;Proficiency with computer software programs&lt;/li&gt;&#xA;&lt;li&gt;Ability to create and/or edit written reports&lt;/li&gt;&#xA;&lt;li&gt;Ability to sell and influence others&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The most desired skills are those that fall under good communication and teamwork.&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion&lt;/h1&gt;&#xA;&lt;p&gt;Obviously the technical know-how needs to be there in the end, but a new student with strong problem solving, reading comprehension, and communications skills is going to be much more successful in a STEM career than a student who lacks those skills but has experience with a dozen different programming languages.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastEditorUserId="9157" LastEditDate="2021-07-05T15:41:41.183" LastActivityDate="2021-07-05T15:41:41.183" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6380" PostTypeId="2" ParentId="6377" CreationDate="2020-06-07T22:36:55.057" Score="1" Body="&lt;p&gt;I would suggest taking to professors at your institution. If the semester is in session, you can go to their office hours; otherwise, you can email your advisor or another professor who knows you. Even if it's outside their area, they should be able to steer you in the right direction. &lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-06-07T22:36:55.057" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6381" PostTypeId="1" CreationDate="2020-06-08T01:02:23.133" Score="2" ViewCount="136" Body="&lt;p&gt;I would like to know if there are some tools to teach the following topics in a programming paradigms course:&lt;/p&gt;&#xA;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Demonstration of lexical rules&lt;/li&gt;&#xA;&lt;li&gt;Demonstration of grammar rules, such as tree parsers of Backus-Naur forms&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;p&gt;I found that one can teach this topics by using Flex and Bison, but it requires some previous knowledge in C and C++ languages. In any case, are there some alternatives to these tools?&lt;/p&gt;&#xA;" OwnerUserId="4161" LastEditorUserId="8651" LastEditDate="2020-06-15T17:07:09.430" LastActivityDate="2020-06-15T17:07:09.430" Title="Are there any recommended tools for teaching syntax and grammar of programming languages?" Tags="|programming|syntax|programming-paradigms|" AnswerCount="1" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6382" PostTypeId="2" ParentId="6381" CreationDate="2020-06-08T14:04:25.940" Score="4" Body="&lt;p&gt;I agree with @Buffy's comment. If your goal is to teach the concepts of lexical rules and context-free grammar, I would focus on that rather than on using tools to build parsers from those grammar rules.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I've found that if you have first taught regular expressions and finite automata, that you can teach these concepts quite nicely within that scope using toy languages that you invent and derive in class.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;For example, you could create a language defined as:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;L = {w | w is a pair of positive integers which are added or subtracted}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;For example, these would all be valid strings in such a language: { &quot;3 + 2&quot;, &quot;5 - 1&quot;, &quot;0 + 2&quot;, ... }&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Then you could define your grammar by deciding what set of variables (V), set of terminals (Σ), set of substitution rules (R), and start variable (s) you need to describe that language. &lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;G = (V, Σ, R, s)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;This can all be done in a class or group discussion on paper (or whiteboard) without any tools. I find it easiest for students to come up with Σ first, then use that to deduce the members of &lt;em&gt;V&lt;/em&gt;, then &lt;em&gt;R&lt;/em&gt;, then s.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;A guided discussion could go something like:&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;&lt;em&gt;Σ&lt;/em&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&quot;Let's decide what kinds of things we could see in our set of terminals, what symbols (some people refer to these as tokens, though parsers think of these differently) would we see in this language?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;According to our definition of L, this could be any positive integer, a plus, or a minus. So the set &lt;em&gt;Σ&lt;/em&gt; could be defined as:&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{ℤ+, +, -}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;&lt;em&gt;V&lt;/em&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&quot;Now, how could we group these things together?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&quot;The things we're seeing are either &lt;em&gt;positive-integer&lt;/em&gt; things, or &lt;em&gt;Operator&lt;/em&gt; things, a valid &lt;em&gt;Expression&lt;/em&gt; in our language always appears in this form:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Expression -&amp;gt; positive-integer Operator positive-integer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Since the set of things that can be a positive-integer is already represented by ℤ+ in our set of terminals (&lt;em&gt;Σ&lt;/em&gt;), that leaves only two types of things in our set of variables:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;{ Expression, Operator }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;&lt;em&gt;R&lt;/em&gt;&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&quot;Now, let's come up with the substation rules for this language. We already said that:&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Expression -&amp;gt; positive-integer Operator positive-integer&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&quot;Since &lt;em&gt;positive-integer&lt;/em&gt; is a terminal, we just need a set of rules for &lt;em&gt;Operator&lt;/em&gt;. What kinds of things can an Operator be?&quot;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Operator -&amp;gt; +&#xA;Operator -&amp;gt; -&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;&quot;So that means the complete set of rules is:&quot;&lt;/p&gt;&#xA;&#xA;&lt;pre&gt;&lt;code&gt;Expression -&amp;gt; positive-integer Operator positive-integer&#xA;Operator -&amp;gt; +&#xA;Operator -&amp;gt; -&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h1&gt;s&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&quot;Now, we just need to decide what the starting variable should be. Which element of &lt;em&gt;V&lt;/em&gt; should be our top-level item?&quot;&#xA;...&#xA;&quot;Expression&quot;&lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Next Steps&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;From this point, you can then walk through derivations for the grammar. Depending on where you want to go next, you could then illustrate the grammar as a finite automata or as a parse tree, or express it in Backus-Naur form.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you still want to discuss parsers, I've also given students assignments where I provide them with a simple grammar definition like the above, and ask them to implement a DFA that can determine if a provided string is a valid expression in the language. This is a lot easier if you've already discussed regular expressions.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-08T14:04:25.940" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6383" PostTypeId="2" ParentId="6158" CreationDate="2020-06-09T14:48:38.947" Score="1" Body="&lt;h1&gt;Waldorf / Steiner and Technology Use&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;Waldorf schools aren't against the use of technology in education, they take the stance that introducing technology too early is harmful to natural educational development in students.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;This quote about Waldorf schools in the UK (where they're also referred to as &quot;Steiner&quot; schools, since Rudolf Steiner pioneered the movement) sums up the rationale:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;The hugely sensible approach taken by Rudolf Steiner schools is that computers only become useful in the teen years once children have mastered fundamental, time-honoured ways of discovering information and learning, such as practical experiments and books. &lt;a href=&quot;https://www.heraldscotland.com/news/12769909.reading-is-a-habit-that-we-cant-afford-to-lose/&quot; rel=&quot;nofollow noreferrer&quot;&gt;1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;If you're afraid that this is backwards-thinking in the information age, it is perhaps telling that some of the biggest proponents of Waldorf schools are parents &lt;a href=&quot;http://dailynightly.nbcnews.com/_news/2011/11/30/9118340-the-waldorf-way-silicon-valley-school-eschews-technology&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt; and tech executives &lt;a href=&quot;https://www.nytimes.com/2011/10/23/technology/at-waldorf-school-in-silicon-valley-technology-can-wait.html?pagewanted=all&amp;amp;_r=0&quot; rel=&quot;nofollow noreferrer&quot;&gt;3&lt;/a&gt; who live and work in Silicon Valley.  &lt;/p&gt;&#xA;&#xA;&lt;h1&gt;Digital Literacy Curricula in Waldorf / Steiner Schools&lt;/h1&gt;&#xA;&#xA;&lt;p&gt;&lt;em&gt;Digital Literacy&lt;/em&gt; is a common term used to describe the use of technology in education, though this isn't a Waldorf construct. (It's championed by everyone from Harvard &lt;a href=&quot;https://dssg.fas.harvard.edu/initiatives/literacy/&quot; rel=&quot;nofollow noreferrer&quot;&gt;4&lt;/a&gt; to the Public Library Association &lt;a href=&quot;http://www.ala.org/pla/initiatives/digitalliteracy&quot; rel=&quot;nofollow noreferrer&quot;&gt;5&lt;/a&gt;).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;However, in Waldorf Schools, digital literacy is typically applied in a more &quot;holistic&quot; way (another tenant of Waldorf education). &lt;/p&gt;&#xA;&#xA;&lt;p&gt;The approach taken by the San Francisco Waldorf School &lt;a href=&quot;https://www.sfwaldorf.org/education/grade-school/digital-literacy&quot; rel=&quot;nofollow noreferrer&quot;&gt;6&lt;/a&gt; is a good representation of these principles (though not all schools follow this same breakdown):&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Early Education&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Young children learn through imitation, imagination, movement, play. Teachers tell beautiful stories with complex vocabulary and sentence structure. Children are unencumbered by the passive consumption of fixed media images, which scientific research confirms are difficult to process and can hinder learning.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Grade School&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Media-free classrooms are places of human connection and experiential, creative lessons. Middle schoolers are introduced to digital literacy, exploring questions of online behavior, information resources, and social citizenship. Families agree upon class community guidelines for the introduction of technology.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;High School&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Students use technological tools for learning and creation, and teachers cultivate critical thinking through discussion-based seminars and inquiry-based exploration. There is a media center, rotating laptop carts, and cloud-based resources. Phones are turned off to create a space for learning and social connection.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So, if you want to follow true Waldorf pedagogy, technology should be introduced in the secondary/high-school years, and done so in a way that is &quot;holistic&quot;, though some variations do exist.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-09T14:48:38.947" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6384" PostTypeId="2" ParentId="5575" CreationDate="2020-06-10T23:34:58.903" Score="1" Body="&lt;p&gt;Unity has a &lt;a href=&quot;https://blogs.unity3d.com/2019/08/14/create-with-code-learn-teach-computer-programming-by-making-games/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&quot;Create with Code&quot; curriculum&lt;/a&gt; that is aligned to ISTE standards:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;Most importantly, Create with Code is designed to work in the classroom. Aligned to ISTE Standards for computer science education, educators can leverage the free course curriculum to support instruction inside and outside of class. Flexible teaching materials are provided in addition to the learner-facing instructional videos...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;The above site has an ISTE standards alignment document, as well as a scope and sequence, set of lesson plans, and a course syllabus. Many of the ISTE standards map pretty well to to &lt;a href=&quot;https://apcentral.collegeboard.org/pdf/ap-computer-science-principles-course-and-exam-description.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP CSP standards.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;AP CSP is pretty flexible in terms of which set of tools you use, so I think you'd be safe with Unity: &lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/fQHwO.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/fQHwO.png&quot; alt=&quot;screenshot of tools listed in linked document&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-10T23:34:58.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6385" PostTypeId="2" ParentId="5379" CreationDate="2020-06-11T14:59:51.010" Score="0" Body="&lt;p&gt;With the amount of preparation you're describing, the only thing your students will likely need is a course that teaches them Java syntax and object oriented programming, as the AP CSA exam assumes knowledge of Java:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;(from &lt;a href=&quot;https://apcentral.collegeboard.org/pdf/ap-2020exam-sample-questions-computer-science.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://apcentral.collegeboard.org/pdf/ap-2020exam-sample-questions-computer-science.pdf&lt;/a&gt;)&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Code.org has &lt;a href=&quot;https://code.org/educate/curriculum/apcsa&quot; rel=&quot;nofollow noreferrer&quot;&gt;a nice list of Java curricula&lt;/a&gt; that specifically target the AP CSA outcomes, but really any &quot;Fundamentals of Java&quot; course or online tutorial would likely be just fine.&lt;/p&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-06-11T14:59:51.010" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6386" PostTypeId="1" CreationDate="2020-06-12T17:00:16.810" Score="4" ViewCount="594" Body="&lt;p&gt;Whenever I searched for &quot;best book for computer architecture&quot; in google, the first result to come up was this book &quot;Computer Architecture : A quantitative approach&quot;(3rd Edition) by Henessy and Patterson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/CPCur.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/CPCur.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The said book seems to be quite popular and is followed as the text book in many colleges throughout the world. Even the amazon reviews of the said book is quite good. Now many people said me that the 3rd edition is better than the 4th edition and though the 5th edition of the said book is out now, I could get hold of a cheap used copy of the 3rd edition. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;There is an introductory text pertaining to &quot;Computer Organization&quot; by the said authors, which is quite easy (and not bulky) and one can easily go through it without much effort as this very organization book starts from the very basics.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now coming to my question. How should I read this book, &lt;strong&gt;Computer Architecture: A Quantitative Approach&lt;/strong&gt; for the first time ? There are quite a few things I want to add, the book is quite bulky and the language and terminology (till the end of first chapter) is not quite easy as in the very first chapter of the book the author talks about things such as &lt;em&gt;trace driven simulation,embedded benchmarks&lt;/em&gt; and so on, and I feel that the author assumes one is quite familiar with concepts,as is evident from the way the text is written in the first chapter. I have not yet started reading the second chapter. There are few more things, in each chapter the author talks about real life examples of the processors or the other hardware and gives a case study of the same. Though it is good for better understanding, but might be of more importance in the subsequent reads, after one has gone through the basics or the core sections in each and every chapter.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to know how can I read this very book for the first time, to build my concepts,(I want to sort of learn only the necessary and sufficient concepts of each and every chapter, in depth though in the first reading) and after having a more or less rough but deep idea of the content of the entire book, I want to read the book again in totality, reading the portions which I might have skipped in the first read. The above book is quite bulky (I am not afraid of that, had it been so, I would not even bought it) and chances are there that I might get lost till I read the book entirely. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;So can a schedule be suggested to me, which I shall follow to read the book, I want a schedule or a routine, which I shall follow in a hardcore manner while my first read, with selected but important necessary and sufficient topics from each chapter and a well ordering of the same.( Sort of programming the playback of old video compact discs on VCD players,such that out of the many tracks only those are played and in the order in which I program my player).&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I did not face such a problem while reading a textbook before, I have read many texts like Ullman's Automata, Tenenbaum's Data Structure, even Morris Mano's Computer System Architecture... &lt;a href=&quot;https://www.cs.utah.edu/~rajeev/cs6810/&quot; rel=&quot;nofollow noreferrer&quot;&gt;I have even gone through the lecture series by Prof.  Rajeev Balasubramonian to build the foundations which uses the 5th edition of the said text&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;p&gt;Now I want to focus on reading the text. Any help shall be highly appreciable.&#xA;If any part of my post is not correct or my tags are incorrect, do rectify me.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-06-13T13:23:35.257" Title="Study the book &quot;Computer Architecture- A quantitative approach&quot; (3rd Edition) for the first time" Tags="|self-learning|resource-request|textbook|architecture|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6387" PostTypeId="2" ParentId="6386" CreationDate="2020-06-13T02:55:16.357" Score="5" Body="&lt;p&gt;I think you first need to decide what your goals are. Are you interested in computer architecture because:&lt;/p&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You want to design computer hardware and so need to understand it at a fundamental level?&lt;/li&gt;&#xA;&lt;li&gt;Or because you want to write software whose performance is enhanced by an above-average understanding of computer architecture?&lt;/li&gt;&#xA;&lt;li&gt;Or because you are just mildly curious about how computer architecture works?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;p&gt;In the preface to the 3rd addition, the authors talk about why they selected the material they did, and they give this warning:&lt;/p&gt;&#xA;&#xA;&lt;blockquote&gt;&#xA;  &lt;p&gt;To allow for this new material, we reduced the extent of introductory material, assuming the knowledge of the concepts in our introductory text, &lt;em&gt;Computer Organization and Design: The Hardware/Software Interface.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&#xA;&lt;p&gt;So my advice is to start with that introductory text. If all you're interested in is a passing understanding of how the architecture works so you can write better software, or because you're just curious, then you can probably stop at that point.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The introductory text (at least the 4th edition of it) also includes a chart at the beginning listing which sections of the book should be read for a hardware focus or software focus, which should be read carefully, which can be glossed over, and which are just interesting but not necessary.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;If you really want to understand modern computer architecture at a fundamental level, then after finishing the introductory text, you should probably get a later edition of the advanced text.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The fourth edition added coverage of multicore chips, which is a pretty fundamental aspect of modern computer hardware. The fifth edition has some pretty significant changes and adds an emphasis on mobile device architecture. &lt;/p&gt;&#xA;&#xA;&lt;p&gt;As for what order to cover the chapters, each edition is a bit different, but the the preface of each one contains suggested reading paths depending on what your goals are. The later editions go into more detail on this (by section rather than by chapter). &lt;/p&gt;&#xA;" OwnerUserId="9157" LastEditorUserId="9157" LastEditDate="2020-06-13T13:23:35.257" LastActivityDate="2020-06-13T13:23:35.257" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6388" PostTypeId="1" CreationDate="2020-06-14T18:56:54.247" Score="1" ViewCount="80" Body="&lt;p&gt;I want to do self-study for Computer Architecture and I wish I could get hold of a detailed video lecture series that goes hand in hand with the classic text &quot;Computer Architecture: A Quantitative Approach&quot; by Hennessy and Patterson.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;The video lecture series would help me understand the concepts in the said book in a better manner, because without an instructor I feel I might not get to extract the most of the subject.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-06-14T18:56:54.247" Title="Detailed video lecture series that follows &quot;Computer Architecture: A Quantitative Approach&quot; by Henessy Patterson" Tags="|self-learning|resource-request|architecture|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6390" PostTypeId="1" CreationDate="2020-06-18T15:30:14.480" Score="3" ViewCount="176" Body="&lt;p&gt;I think the &lt;a href=&quot;https://llvm.org/docs/tutorial/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://llvm.org/docs/tutorial/index.html&lt;/a&gt; assumes you know too much. It's written in an unfamiliar language to me, OCaml, and they assume you know about lexers, parsers, AST. Any thorough beginner tutorials out there?&lt;/p&gt;&#xA;" OwnerUserId="9238" LastEditorUserId="27" LastEditDate="2020-06-19T00:33:53.640" LastActivityDate="2020-07-20T14:02:30.217" Title="Any good beginner tutorials for learning LLVM" Tags="|self-learning|compiling|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6391" PostTypeId="2" ParentId="6335" CreationDate="2020-06-18T16:15:02.283" Score="2" Body="&lt;p&gt;The reason that a simple text based interface is often used is that it is very simple to implement and run, and you don't have to spend time in the class teaching the student how to build a UI or GUI or other ways to interact with the program.&lt;/p&gt;&#xA;&lt;p&gt;Littering the code with print statements is inefficient but is probably how a majority of coders learned how to debug their code. What's important is understanding what is happening as each line executes.&lt;/p&gt;&#xA;&lt;p&gt;The question from a teaching perspective is what are the alternatives?  You could take time to teach the students other ways of interacting with the code, or put them into an integrated environment of some kind.  Or provide them with a pre-built UI or GUI and just tell them not to worry about how that is created.&lt;/p&gt;&#xA;&lt;p&gt;I often wonder to what extent educators will allow students to use modern IDE's.  These are very sophisticated now and either provide suggestions or outright fix your syntax, API calls, some will even offer performance optimizations.  On one hand it is important that any coder really understand the details of this and should do it themselves without an IDE, on the other hand you don't want a student to use up all of their time in the class struggling with some simple syntax issue.&lt;/p&gt;&#xA;" OwnerUserId="1292" LastActivityDate="2020-06-18T16:15:02.283" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6392" PostTypeId="2" ParentId="6335" CreationDate="2020-06-19T12:50:12.187" Score="1" Body="&lt;p&gt;I was about to argue in favor of using &lt;code&gt;print&lt;/code&gt; as a debugging tool because it's easier for students to understand than a debugger. But I changed my mind: I think using a good debugger during lecture to show students what is happening to control flow and to variable values as some new concept executes may help students create a useful mental model. The side-effect is that students may be comfortable using the debugger, mimicking what they saw in class.&lt;/p&gt;&#xA;&lt;p&gt;I still think (as others have noted) that console-based input/output is beneficial in its simplicity. In principle you could provide a GUI as part of the starter code for assignments until you're ready to teach students how to write their own -- but in a 1-semester intro-to-CS course I'm not sure that I'd want to take time away from other topics to teach GUI development. Tough call.&lt;/p&gt;&#xA;" OwnerUserId="9208" LastActivityDate="2020-06-19T12:50:12.187" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6393" PostTypeId="2" ParentId="6374" CreationDate="2020-06-19T13:02:08.847" Score="1" Body="&lt;p&gt;In answer to the original question, finding a &amp;quot;category&amp;quot; for&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Data Analytics and Machine Learning&lt;/li&gt;&#xA;&lt;li&gt;Computer Science and Physics&lt;/li&gt;&#xA;&lt;li&gt;Computer Science and Mathematics&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;in the same vein as the &amp;quot;networks&amp;quot; and &amp;quot;computing&amp;quot; categories, I might call 2 &amp;amp; 3 (and possibly 1) &lt;em&gt;Applied Computing&lt;/em&gt; since they aren't about a CS topic but rather about applying CS topics to the benefit of other fields.&lt;/p&gt;&#xA;" OwnerUserId="9208" LastActivityDate="2020-06-19T13:02:08.847" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6394" PostTypeId="2" ParentId="6297" CreationDate="2020-06-19T14:43:31.167" Score="0" Body="&lt;h2&gt;Parity of a sum&lt;/h2&gt;&#xA;&lt;p&gt;In other words, when is &lt;code&gt;a+b&lt;/code&gt; odd and when is it even?&lt;/p&gt;&#xA;&lt;p&gt;The sum of two integers (&lt;code&gt;a+b&lt;/code&gt;) is odd only if &lt;em&gt;exactly one&lt;/em&gt; of the two terms (&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;) is odd. If both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are odd, then their sum is even. If both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are even, then their sum is also even.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, when trying to find out if &lt;code&gt;a+b&lt;/code&gt; is odd, we need to use an &lt;code&gt;xor&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[A+B is odd] = [A is odd] XOR [B is odd]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Compare this to multiplication, where we specifically need &lt;strong&gt;both&lt;/strong&gt; &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; to be odd if &lt;code&gt;a*b&lt;/code&gt; is to be odd.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[A*B is odd] = [A is odd] AND [B is odd]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Similarly, when we're looking for products that are even, we use the inverse, which is an &lt;code&gt;or&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[A*B is even] = [A is even] OR [B is even]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;At least one of them must be even, but both can be even as well.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Just for completion's sake, if we're looking for even sums, then we have to use the much less commonly used &lt;a href=&quot;https://en.wikipedia.org/wiki/XNOR_gate&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;xnor&lt;/code&gt;&lt;/a&gt; (which is the inverse of &lt;code&gt;xor&lt;/code&gt;, where both need to be equal)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[A+B is even] = [A is even] XNOR [B is even]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This sounds complicated, but it usually usually boils down to an equality check:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[A+B is even] = [A is even] == [B is even]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;It's hard to come up with natural examples of an &lt;code&gt;xor&lt;/code&gt;, for two main reasons:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In natural languages, the word &amp;quot;or&amp;quot; generally refers to &lt;code&gt;xor&lt;/code&gt;, but not exclusively so. The difference is implied contextually. Compare the following examples:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do you want to buy many toys or one expensive toy?&lt;/li&gt;&#xA;&lt;li&gt;Can Tom or Cindy please come to the front desk please.&lt;/li&gt;&#xA;&lt;li&gt;I like cars that are blue or yellow&lt;/li&gt;&#xA;&lt;li&gt;It's ambiguous whether I like cars that are blue and yellow, or whether I only like cars that are fully yellow or fully blue (this sentence itself is a compounded example of using &amp;quot;or&amp;quot; and whether it means &lt;code&gt;or&lt;/code&gt; or &lt;code&gt;xor&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;In real life, &lt;code&gt;xor&lt;/code&gt; is actually quite rare, when you already exclude things like choices or binary states&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;code&gt;xor&lt;/code&gt; is more commonly encountered in cases where both terms would cancel each other out, as having only one term &amp;quot;active&amp;quot; means that their effect exists and is not canceled out.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2020-06-19T15:02:27.727" LastActivityDate="2020-06-19T15:02:27.727" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6395" PostTypeId="2" ParentId="6390" CreationDate="2020-06-19T19:47:02.333" Score="0" Body="&lt;p&gt;This isn't really an answer, but a suggestion that before you try to jump into tools that enable/facilitate compiler construction, you need to study the key ideas. If you don't know anything at all of scanning, parsing, optimization, and code generation, the tools are just gibberish.&lt;/p&gt;&#xA;&lt;p&gt;Since you say this is for a course, look to the text assigned, I think. The standard is by &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0321486811&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Aho, Lam, Sethi, and Ullman&lt;/a&gt;. There are simpler ones, but ASTs are pretty fundamental.&lt;/p&gt;&#xA;&lt;p&gt;Almost any good book will have an early overview of the process.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-06-19T19:47:02.333" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6396" PostTypeId="2" ParentId="6390" CreationDate="2020-06-20T13:33:11.930" Score="1" Body="&lt;p&gt;As stated in Buffy's answer, you'll want to first be familiar with the other steps of compilation, because code generation is typically the last step in the compiler pipeline. If you haven't already, I'd suggest looking in to lexing and parsing as well. Optimization is nice as a bonus, but llvm does a good deal of optimization on its IR by itself.&lt;/p&gt;&#xA;&lt;p&gt;Once you're familiar with the general outline of how a compiler works, you can start building one yourself. There is a language that is designed to be easy to build a llvm compiler for, called Kaleidoscope, and I'd recommend looking up a tutorial for building a Kaleidoscope compiler in whatever language you choose. llvm has bindings to many different languages ranging from haskell to C, although you will likely have the best experience learning in C++ since that's how llvm's API is implemented.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2020-06-20T13:33:11.930" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6398" PostTypeId="2" ParentId="213" CreationDate="2020-06-21T16:25:33.030" Score="2" Body="&lt;p&gt;The &lt;strong&gt;ground floor&lt;/strong&gt; is the &lt;em&gt;de facto&lt;/em&gt; 0th floor.&lt;/p&gt;&#xA;&lt;p&gt;Humans are born at &lt;strong&gt;age 0&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Military time&lt;/strong&gt; starts at &lt;strong&gt;0&lt;/strong&gt;:00. Despite the day having 24 hours, it is not correct to write 24:00.&lt;/p&gt;&#xA;&lt;p&gt;As a side-note, Japanese TV uses &lt;strong&gt;0-indexed 12-hour notation&lt;/strong&gt;. That means 11 AM is followed by 0 PM, not 12 PM.&lt;/p&gt;&#xA;" OwnerUserId="9244" LastActivityDate="2020-06-21T16:25:33.030" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6401" PostTypeId="1" AcceptedAnswerId="6403" CreationDate="2020-06-24T16:26:36.167" Score="5" ViewCount="218" Body="&lt;p&gt;In short: Does learning how to make software, have its place inside universities? If so which parts of it?&lt;/p&gt;&#xA;&lt;p&gt;I was studying in a university in Russia. I don't want to name its name and location. I wanted to become a software developer. Following some people's advice I entered a faculty that was mostly about math. All its teachers are mathematicians. So most of our subjects were just different kinds of math. There also was some programming but much less. I was told by other students and teachers that how I pass Calculus and Algebra exams was the most important thing and that programming exams were unimportant at all. Many different teachers and students were saying that &amp;quot;a university does not need to teach programmers&amp;quot;. They say that &amp;quot;it's not science&amp;quot; and &amp;quot;it's nothing but craftsmanship&amp;quot;. During a defense of diploma people sometimes ask programmers something like &amp;quot;That's all interesting but that's not math so why it's a diploma work?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;When I talked with people who were actually working as software developers they were saying that &amp;quot;If you don't how to fix problems with Linux and don't know a single architecture pattern then as a programmer you are really nothing&amp;quot;. They also said that &amp;quot;I wouldn't hire a developer who doesn't tell me that HP-UX is a bad OS when I mention it&amp;quot;. In university we spent a single lecture on patterns(and not even all students but some) and none on Linux and other operating systems. And I knew literally nothing about HP-UX. I had to learn 90% of my skills myself via books, online-tutorials and documentation.&lt;/p&gt;&#xA;&lt;p&gt;In our country IT is a very popular industry. Because of that the math faculty students are 90% wannabe programmers. Teachers really hate that as they want math to be popular again. They say that &amp;quot;computer science ate math&amp;quot;(That's citation of a teacher during a lesson, &amp;quot;Информатика съела математику&amp;quot;). The teachers despise us programmers. The employers in Russia prefer candidates with a degree but will gladly accept those without it. The students try to pass all exams only to have the degree, they don't care about subjects at all. They forget everything when they come out of a room after an exam. It's seems like students and teachers declared war against each other.&lt;/p&gt;&#xA;&lt;p&gt;I left university without any degree. Now I work as JS-developer. I myself participate in interviews to hire new developers. I ask them about things like Single Responsibility Principle, how to write clean code and how to create indexes in SQL. I know that SRP is not a law of physics, it comes without a good scientific proof. But I need it from by workers.&lt;/p&gt;&#xA;&lt;p&gt;The question is how do Universities in other countries approach teaching software development? Do they actually target it? Is actually becoming a real software developer that will be respected by employers and not a scientist is a valid goal for a university student?&lt;/p&gt;&#xA;" OwnerUserId="9263" OwnerDisplayName="Gherman" LastEditorUserId="204" LastEditDate="2020-07-01T21:36:18.190" LastActivityDate="2020-07-02T09:06:51.893" Title="Software development vs universities and scientific papers" Tags="|mathematics|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6402" PostTypeId="1" CreationDate="2020-06-26T12:54:16.067" Score="3" ViewCount="231" Body="&lt;p&gt;I'm planning to design an introductory course to CS and programming for kids of 8-12 grade and see that we have Scratch for catching an eye in the beginning and getting instant result on place.&lt;/p&gt;&#xA;&lt;p&gt;But I need something about procedural programming as a replacement for Pascal, where kids could do something step by step without any abstractions. What I see is that I can potentially use either PICO-8 or TIC-80 fantasy consoles, but I don't see any materials or attempts to use Lua language for this goal. So the question is - why?&lt;/p&gt;&#xA;&lt;p&gt;What are the drawbacks of teaching this way? (If we had non-dead Pascal with advanced graphical library like in DrRacket and good contemporary API - I'd rather have used this instead).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPD&lt;/strong&gt;: The question is inspired by the post of my colleague on Medium: &lt;a href=&quot;https://medium.com/@astynax/%D0%BD%D0%B5-%D0%B2%D1%81%D1%91-%D1%82%D0%B0%D0%BA-%D0%BF%D0%BB%D0%BE%D1%85%D0%BE-%D0%B5%D1%81%D1%82%D1%8C-%D1%87%D0%B5%D0%BC%D1%83-%D1%83%D1%87%D0%B8%D1%82%D1%8C-30e4f50213a1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://medium.com/@astynax/%D0%BD%D0%B5-%D0%B2%D1%81%D1%91-%D1%82%D0%B0%D0%BA-%D0%BF%D0%BB%D0%BE%D1%85%D0%BE-%D0%B5%D1%81%D1%82%D1%8C-%D1%87%D0%B5%D0%BC%D1%83-%D1%83%D1%87%D0%B8%D1%82%D1%8C-30e4f50213a1&lt;/a&gt; (Google translatable to english from Russian)&lt;/p&gt;&#xA;" OwnerUserId="6387" LastEditorUserId="6387" LastEditDate="2020-07-02T09:52:14.367" LastActivityDate="2020-08-01T10:06:20.767" Title="How to embed TIC-80 into Computer science 101 course" Tags="|secondary-education|teaching-analogy|programming-paradigms|abstraction|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6403" PostTypeId="2" ParentId="6401" CreationDate="2020-06-26T22:37:36.537" Score="5" Body="&lt;p&gt;Short answer: yes.&lt;/p&gt;&#xA;&lt;p&gt;Disclaimer: I'm an Associate. Pr. of Computer Science in a University in France. We have several undergraduate and graduate programs that lead to bachelor and master's degree of Computer Science.&lt;/p&gt;&#xA;&lt;p&gt;As the degree is about Computer Science, we do teach software engineering (among other topics : databases, networking, logic, architecture, compilers, ...).&#xA;Some applied program are very applied (the students are working in a company for the duration of their studies, switching every two or three weeks between their company and the lectures at the Uni).&lt;/p&gt;&#xA;&lt;p&gt;A computer science curriculum where one learns about software development is quite standard (from working with several colleagues from around the world I now that such things exist in the US, UK, most of Europe, Asia, Australia, …).&lt;/p&gt;&#xA;" OwnerUserId="746" LastActivityDate="2020-06-26T22:37:36.537" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6404" PostTypeId="2" ParentId="6401" CreationDate="2020-06-27T07:58:51.947" Score="4" Body="&lt;p&gt;The relation of math and CS is an important question but also fraught and contentious and therefore tends to tendentious rather than balanced discussion.&#xA;It's particularly hard to discuss because one will inevitably have biases.&#xA;And yet as I said it &lt;em&gt;is&lt;/em&gt; important.&lt;/p&gt;&#xA;&lt;p&gt;The Dec 1989 &lt;a href=&quot;https://dl.acm.org/doi/10.1145/76380.76381&quot; rel=&quot;nofollow noreferrer&quot;&gt;position paper&lt;/a&gt;&#xA;On the cruelty of really teaching computer science&#xA;by Edsger Dijkstra and the subsequent discussion by eminent computer scientists is a good starting point to see how diverse (and emotive!) the views on this can be.&lt;/p&gt;&#xA;&lt;p&gt;As a summary Dijkstra says that&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Computing is a radical novelty&lt;/li&gt;&#xA;&lt;li&gt;We generally understand the new — novelties — in terms of the familiar old for which we institute &lt;em&gt;metaphors&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;But when the novelty is radical the metaphors become shallow and confuse more than they illumine&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So far so good!&lt;/p&gt;&#xA;&lt;p&gt;But then he goes on to suggest that the metaphor of &amp;quot;engineering&amp;quot; is unhelpful and that the metaphor of math is the correct one.&lt;/p&gt;&#xA;&lt;p&gt;Naturally he finds disagreement on that count!&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Added later&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.lesswrong.com/posts/gfAkp2wMy4zHrAfic/goedel-s-legacy-a-game-without-end&quot; rel=&quot;nofollow noreferrer&quot;&gt;This&lt;/a&gt; just came my way — a nice roller-coaster showing the deep historical connections between math and CS.&lt;/p&gt;&#xA;&lt;p&gt;Note: I'm in no way discounting that your experience of studying CS from die-hard mathematicians must have been dystopic. It's just v hard to get this right even for conscientious teachers!&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2020-07-02T09:06:51.893" LastActivityDate="2020-07-02T09:06:51.893" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6405" PostTypeId="2" ParentId="213" CreationDate="2020-06-27T16:48:57.873" Score="3" Body="&lt;p&gt;Distances in boardgames with discrete spaces. For example: Chess, wargames, Dungeons &amp;amp; Dragons played on a battlemap, etc. Counting movement, the space you start in counts as space zero (or more accurately: if a piece stays in the same space, then it has moved zero distance).&lt;/p&gt;&#xA;&lt;p&gt;There are a number of situations in wargames and RPGs where two pieces might share the same space; and if one shoots at the other, then the distance between them is considered to be zero. Many D&amp;amp;D magic spells have a range listed as zero to reflect this (thinking past editions here; current edition explicitly says &amp;quot;Self&amp;quot; or &amp;quot;Touch&amp;quot; in these cases).&lt;/p&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2020-06-27T16:48:57.873" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6406" PostTypeId="1" CreationDate="2020-06-28T21:56:41.493" Score="2" ViewCount="1253" Body="&lt;p&gt;I am a student from CS background. I am currently going through &lt;em&gt;&lt;strong&gt;&amp;quot;Introduction to Algorithms&amp;quot;&lt;/strong&gt;&lt;/em&gt; By Cormen et. al.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/RNZUB.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/RNZUB.png&quot; alt=&quot;CLRS&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It is indeed a classic and a master-piece from the four authors. Each and every algorithm in it is written in the simplest manner possible. Each and every algorithms have analysis involved in a hardcore manner. Thought it is a fantastic book on algorithm design and analysis and many sources recommend it for data structures as well but I find that the data structures section is quite less in the above book.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I have gone through the data structure book below :&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/lHPA4.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/lHPA4.png&quot; alt=&quot;Data structures using C and C++ by Tanenbaum et. al&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Data structures using C and C++ by Tanenbaum et. al&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Though the above book deals with the various topics of data structure I found that many of the implementations of the data structures and their manipulation algorithms have been made unnecessarily complex and it took quite a lot of time to understand certain pieces of codes which otherwise could have been written in a much more elegant manner. This makes it difficult to recall the algorithms in the text which is far beyond intuition at some places. Though the book contains algorithms of the data structure manipulations but at most places the hardcore analysis is missing.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;So could any one recommend me a book on data structure which is as elegant as CLRS , simple and lucid, which would help me for myself study. Even if it does not revolve around any particular programming language - it is fine, but if it does it would it be good if the language is a modern one and not the older ones like PASCAL, FORTRAN,... (although even in CLRS 2nd edition they follow the PASCAL like pseudo-code structure, but it is fine as long as it does not go into the nicks and nacks of the features special to these vintage languages)&lt;/p&gt;&#xA;" OwnerUserId="9124" LastEditorUserId="9124" LastEditDate="2020-06-29T05:56:54.960" LastActivityDate="2020-07-01T11:50:58.247" Title="Book recommendations for self studying Data Structures in depth in an elegant manner" Tags="|self-learning|resource-request|textbook|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6407" PostTypeId="2" ParentId="6406" CreationDate="2020-06-29T09:47:48.717" Score="3" Body="&lt;p&gt;You might find &lt;em&gt;&lt;a href=&quot;http://people.cs.vt.edu/%7Eshaffer/Book&quot; rel=&quot;nofollow noreferrer&quot;&gt;Data Structures and Algorithm Analysis&lt;/a&gt;&lt;/em&gt;, by &lt;a href=&quot;http://people.cs.vt.edu/%7Eshaffer/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Clifford A. Shaffer&lt;/a&gt;, to be helpful. There are versions for C++ and Java available. (The 3rd edition is old already [2013], and the prior editions were titled &lt;em&gt;A Practical Introduction to Data Structures and Algorithm Analysis&lt;/em&gt;.)&lt;/p&gt;&#xA;&lt;p&gt;It does get very in-depth into the field, including the mathematics involved in analysis and proofs. That said, however, my first read through it (2nd Ed.) was very helpful in many ways, and I didn't then know anything about C++.&lt;/p&gt;&#xA;&lt;p&gt;As a 2013 book, some of the coding might be in a style or format which is no longer considered &amp;quot;best practice.&amp;quot; This is likely more true for the manner in which Object Oriented Programming is utilized than for the syntactical style. The material, discussion, and analysis are still as valid as ever.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The link above is to the author's page where the PDF versions are available, along with many resources to accompany the book. Of course, if you must have a dead-tree version, they are still available, new and used, from places such as Amazon.&lt;/p&gt;&#xA;&lt;p&gt;The author has stopped updating the PDF and print versions of the book in favor of an online version. I have not experimented with the online version, although a quick peek at it leads me to believe that it is available for &amp;quot;in-class&amp;quot; use and for independent study. As such, it might be more useful to you than the PDF version.&lt;/p&gt;&#xA;&lt;p&gt;As a caution, I've also seen a 4th Edition with the same title, but by a different author. It may, or may not, be an updated version of the same book, done with the original author's help and blessings. Having never read the 4th Edition I cannot say if it's connected at all.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;To give a better idea of the content, and layout, of the book, I am listing an abridged version of the books Table of Contents.&lt;/p&gt;&#xA;&lt;h2&gt;Contents&lt;/h2&gt;&#xA;&lt;h3&gt;I  Preliminaries&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Data Structures and Algorithms&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A Philosophy of Data Structures (The Need for Data Structures :: Costs and Benefits) | Abstract Data Types and Data Structures | Design Patterns (Flyweight :: Visitor :: Composite :: Strategy) | Problems, Algorithms, and Programs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Mathematical Preliminaries&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sets and Relations | Miscellaneous Notation | Logarithms | Summations and Recurrences | Recursion | Mathematical Proof Techniques (Direct Proof :: Proof by Contradiction :: Proof by Mathematical Induction) | Estimation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Algorithm Analysis&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Introduction | Best, Worst, and Average Cases | A Faster Computer, or a Faster Algorithm? | Asymptotic Analysis (Upper Bounds :: Lower Bounds :: Θ Notation :: Simplifying Rules :: Classifying Functions) | Calculating the Running Time for a Program | Analyzing Problems | Common Misunderstandings | Multiple Parameters | Space Bounds&#xA;3.10 Speeding Up Your Programs&#xA;3.11 Empirical Analysis&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;II Fundamental Data Structures&lt;/h3&gt;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;Lists, Stacks, and Queues&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Lists (Array-Based List Implementation :: Linked Lists :: Comparison of List Implementations :: Element Implementations :: Doubly Linked Lists) | Stacks (Array-Based Stacks :: Linked Stacks :: Comparison of Array-Based and Linked Stacks :: Implementing Recursion) | Queues (Array-Based Queues :: Linked Queues :: Comparison of Array-Based and Linked Queues) | Dictionaries&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Binary Trees&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Definitions and Properties (The Full Binary Tree Theorem :: A Binary Tree Node ADT) | Binary Tree Traversals | Binary Tree Node Implementations (Pointer-Based Node Implementations :: Space Requirements :: Array Implementation for Complete Binary Trees) | Binary Search Trees | Heaps and Priority Queues | Huffman Coding Trees (Building Huffman Coding Trees :: Assigning and Using Huffman Codes :: Search in Huffman Trees)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Non-Binary Trees&#xA;&lt;ul&gt;&#xA;&lt;li&gt;General Tree Definitions and Terminology (An ADT for General Tree Nodes :: General Tree Traversals) | The Parent Pointer Implementation | General Tree Implementations (List of Children :: The Left-Child/Right-Sibling Implementation :: Dynamic Node Implementations :: Dynamic “Left-Child/Right-Sibling” Implementation) | K-ary Trees | Sequential Tree Implementations&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;III Sorting and Searching&lt;/h3&gt;&#xA;&lt;ol start=&quot;7&quot;&gt;&#xA;&lt;li&gt;Internal Sorting&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sorting Terminology and Notation | Three Θ(n2) Sorting Algorithms (Insertion Sort :: Bubble Sort :: Selection Sort :: The Cost of Exchange Sorting) | Shellsort | Mergesort | Quicksort | Heapsort | Binsort and Radix Sort | An Empirical Comparison of Sorting Algorithms | Lower Bounds for Sorting&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;File Processing and External Sorting&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Primary versus Secondary Storage | Disk Drives (Disk Drive Architecture :: Disk Access Costs) | Buffers and Buffer Pools | The Programmer’s View of Files | External Sorting (Simple Approaches to External Sorting :: Replacement Selection :: Multiway Merging)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Searching&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Searching Unsorted and Sorted Arrays | Self-Organizing Lists | Bit Vectors for Representing Sets | Hashing (Hash Functions :: Open Hashing :: Closed Hashing :: Analysis of Closed Hashing :: Deletion)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Indexing&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Linear Indexing | ISAM | Tree-based Indexing | 2-3 Trees | B-Trees (B+ -Trees :: B-Tree Analysis)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;IV  Advanced Data Structures&lt;/h3&gt;&#xA;&lt;ol start=&quot;11&quot;&gt;&#xA;&lt;li&gt;Graphs&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Terminology and Representations | Graph Implementations | Graph Traversals (Depth-First Search :: Breadth-First Search :: Topological Sort) | Shortest-Paths Problems (Single-Source Shortest Paths) | Minimum-Cost Spanning Trees (Prim’s Algorithm :: Kruskal’s Algorithm)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;12&quot;&gt;&#xA;&lt;li&gt;Lists and Arrays Revisited&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Multilists | Matrix Representations | Memory Management (Dynamic Storage Allocation :: Failure Policies and Garbage Collection)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;13&quot;&gt;&#xA;&lt;li&gt;Advanced Tree Structures&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tries | Balanced Trees (The AVL Tree :: The Splay Tree) | Spatial Data Structures (The K-D Tree :: The PR quadtree :: Other Point Data Structures :: Other Spatial Data Structures)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;V Theory of Algorithms&lt;/h3&gt;&#xA;&lt;ol start=&quot;14&quot;&gt;&#xA;&lt;li&gt;Analysis Techniques&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Summation Techniques | Recurrence Relations (Estimating Upper and Lower Bounds :: Expanding Recurrences :: Divide and Conquer Recurrences :: Average-Case Analysis of Quicksort) | Amortized Analysis&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;15&quot;&gt;&#xA;&lt;li&gt;Lower Bounds&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Introduction to Lower Bounds Proofs | Lower Bounds on Searching Lists (Searching in Unsorted Lists :: Searching in Sorted Lists) | Finding the Maximum Value | Adversarial Lower Bounds Proofs | State Space Lower Bounds Proofs | Finding the ith Best Element | Optimal Sorting&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;16&quot;&gt;&#xA;&lt;li&gt;Patterns of Algorithms&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dynamic Programming (The Knapsack Problem :: All-Pairs Shortest Paths) | Randomized Algorithms (Randomized algorithms for finding large values :: Skip Lists) | Numerical Algorithms (Exponentiation :: Largest Common Factor :: Matrix Multiplication :: Random Numbers :: The Fast Fourier Transform)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;17&quot;&gt;&#xA;&lt;li&gt;Limits to Computation&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reductions | Hard Problems (The Theory of N P-Completeness :: N P-Completeness Proofs :: Coping with N P-Complete Problems) | Impossible Problems (Uncountability :: The Halting Problem Is Unsolvable)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="104" LastActivityDate="2020-06-29T09:47:48.717" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6408" PostTypeId="1" AcceptedAnswerId="6413" CreationDate="2020-06-29T12:52:26.633" Score="1" ViewCount="271" Body="&lt;p&gt;I am currently in third year of my Computer Science UG degree. I wanted to know what are the best certifications for a data scientist.&#xA;Found that Data Science Council of America (DASCA) is the most comprehensive one requiring 5+ years of experience in research and analytics. Also there is the SAS program and dozen more.&lt;/p&gt;&#xA;&lt;p&gt;I wanted to know:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Which are the best certifications?&lt;/li&gt;&#xA;&lt;li&gt;How can I prepare for DASCA?&lt;/li&gt;&#xA;&lt;li&gt;Which other certifications should I do meanwhile preparing for DASCA?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9217" LastActivityDate="2020-07-02T14:45:06.263" Title="How can I prepare for DASCA Data Science certification if I am in UG?" Tags="|mentoring|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6409" PostTypeId="2" ParentId="6402" CreationDate="2020-06-30T16:47:34.097" Score="3" Body="&lt;p&gt;Being on this site since the beginning, I have many times now encountered this notion that &lt;em&gt;for introductory courses&lt;/em&gt;, higher level languages mean that students will deal with more abstraction and lower-level languages mean that they will deal with less abstraction, but I believe that this is fundamentally incorrect.&lt;/p&gt;&#xA;&lt;p&gt;I'm going to actually recommend a frame-shift that I hope you will find helpful, and along the way, I hope to also persuade you to a different way of thinking about introductory programming courses.&lt;/p&gt;&#xA;&lt;p&gt;I myself learned on BASIC and Pascal, so I have no specific objections to these languages.  There is plenty of learning to be had in such languages!  But there was also plenty of abstraction. It's not as if the &amp;quot;Read fetch execute&amp;quot; cycle, memory management, operating system architecture, or secure program memory segmentation are somehow magically apparent to a Pascal beginner, nor is that an appropriate goal for a beginning programming course.  All of these languages (even C) are truly &amp;quot;high-level languages&amp;quot; full of metaphors and abstract ideas, and none of them will give a student &lt;em&gt;any&lt;/em&gt; sense of what is going on under the good.&lt;/p&gt;&#xA;&lt;p&gt;Don't believe me?  Consider how much is &amp;quot;explained&amp;quot; to a student in this Pascal code:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;type&#xA;   color = ( red, black, blue, silver, beige);&#xA;   car_color = array of [color] of boolean;&#xA;var&#xA;   car_body: car_color;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Contrast that with this Java code for Greenfoot, which is a system made to teach beginners in Java, and spawns a Zombie at location (50, 50):&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;world.addObject(new Zombie(), 50, 50);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;How much of what is going on &amp;quot;under the hood&amp;quot; will be understood in either example by a beginner?  How clear is the expected behavior from what we type?&lt;/p&gt;&#xA;&lt;p&gt;The purpose of high-level languages is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;To abstract away what is happening inside of the computer.  People didn't want to learn new assembly languages, architectures, and capabilities for every new processor.  Abstracting away what computer do is #1 on this list because it is the most important, and it is what drove us away from assemblies and into high-level languages in the first place.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To make some kinds of tasks easier to accomplish.  The above code example is great.  The compiler makes and manages an array for you!  No multiplication to find the offset from the initial memory location on the stack needed!  And the fact that I can now, in that same Pascal program, write:&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;if car_color[blue] then &#xA;   writeln('blue paint has been applied' );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;...is fantastic.  It's useful!  It makes the programmer's intentions clear!  But it tells me nothing about &lt;code&gt;blue&lt;/code&gt; not existing in the run-time execution at all, since it was remapped by the compiler to a 4-byte integer, or how &lt;code&gt;writeln&lt;/code&gt; sends information to the console.  The compiler allows me to work at the level of a metaphor, and handles the details all the way down.&lt;/p&gt;&#xA;&lt;p&gt;I guess here's what I'm getting at: when you study any programming language, you are studying at the level of that programming language.  Importantly, all of the stuff below that level is 100% opaque, and this is by design.  It is in no way true that studying a non-OO imperative language will leave students feeling like everything makes sense, but studying an OO language will leave students feeling like everything is a mystery.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Both approaches uncover a tiny bit about one particular layer, and still leave basically everything as a mystery.&lt;/strong&gt;  It will take your students many more years of study before they feel like they have a handle on what computers actually do.&lt;/p&gt;&#xA;&lt;p&gt;This is not to advocate for OO specifically, but rather to suggest that you reframe your question like so: &lt;em&gt;since no particular programming language choice is going to explain things at a higher or lower level than the particular metaphors employed by that specific language, which language choice will get my students a lot of mileage as they go forward, both in terms of what they are capable of in my course, and in terms of what explorations it opens up for them afterwards?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;My recommendation for &lt;em&gt;that&lt;/em&gt; question is probably Java, Python, or JS.  Since you're starting from the language &lt;strong&gt;Scratch&lt;/strong&gt;, you might naturally go a game-building route to start, using PyGame in Python, Greenfoot in Java, or GDevelop in JS (Note: I have no experience with GDevelop, I just found it with a Google search).&lt;/p&gt;&#xA;&lt;p&gt;Good luck with your course!  Hopefully it will be a very satisfying and enriching experience, both for you and for your students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-06-30T22:44:30.213" LastActivityDate="2020-06-30T22:44:30.213" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6410" PostTypeId="2" ParentId="6406" CreationDate="2020-07-01T07:54:40.460" Score="3" Body="&lt;p&gt;At my school we do use Carrano and Henry, &lt;a href=&quot;https://www.pearson.com/us/higher-education/program/Carrano-Data-Abstraction-Problem-Solving-with-C-Walls-and-Mirrors-7th-Edition/PGM333670.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Data Abstraction &amp;amp; Problem Solving with C++: Walls and Mirrors&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Walls_and_Mirrors&quot; rel=&quot;nofollow noreferrer&quot;&gt;Walls and Mirrors&lt;/a&gt; series has been in publication since 1986, and over the years has seen editions in Pascal, Modula-2, C++, and Java. (Most recent editions in C++.) In 2018 it won the McGuffey Longevity Award ​for​​ ​textbooks whose excellence has been demonstrated over time.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2020-07-01T11:50:58.247" LastActivityDate="2020-07-01T11:50:58.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6411" PostTypeId="2" ParentId="6401" CreationDate="2020-07-02T00:54:00.183" Score="1" Body="&lt;p&gt;I am sorry to hear about your negative experience. It sounds like you did find work that you enjoy and are good at.&lt;/p&gt;&#xA;&lt;p&gt;Over 30 years ago I graduated from a publicly funded&#xA;university in the US with &amp;quot;Bachelor of Science, Engineering - Computer Science&amp;quot;. I had also attended a privately funded university which had the Computer Science curriculum under the Mathematics Department. The degree program under Engineering included courses in Digital Design, Operating Systems design, a Compiler development project and some networking. (And of course, lots of Calculus, which I did poorly at, having no interest in math, and very little incentive.)&lt;/p&gt;&#xA;&lt;p&gt;The program of study was not really about teaching how to write software, but instead: writing software while learning about how computer systems are designed and function. So, any programming skills were acquired in passing. There were no great tools and frameworks then, like Git and so on. We sat at individual machines, in the loop of Edit, Compile, Test, using text editors, and floppy disks to store our work.&lt;/p&gt;&#xA;&lt;p&gt;When I got a job, it was during a recession and I ended up at a software company with about 100 people, whose main product was built in COBOL. (They redeveloped it twice while I worked there, in a 4GL, then as a web product.) I wrote and maintained PC software, but later worked on the server end of the web product. I found that my education had primed me with lots of ideas that were useful where I worked. I could analyze and solve problems that other people in the company did not have the background for.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I think that there is a place for this sort of 'university' education, and being a generalist in software design and systems-level concepts is a great thing. But I also think that being able to get a job and support yourself is too. There should be a training program for becoming &amp;quot;just a coder&amp;quot; as people disparagingly say. Well, lots of people just 'work', they don't all have to be innovators.&lt;/p&gt;&#xA;&lt;p&gt;Surprisingly, being a systems-level programmer who can develop complex and unusual programs and tools is not all that useful in the real world, apparently, because people don't see it, recognize it. Even churning out new stuff does not mean it will be used. Business processes and considerations stymie a lot of innovation. Perhaps there should be a university for business process improvement? Programmers work hard at &amp;quot;Getting Stuff Done&amp;quot;. Someone should really be making use of all that output.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2020-07-02T00:54:00.183" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6413" PostTypeId="2" ParentId="6408" CreationDate="2020-07-02T14:45:06.263" Score="1" Body="&lt;p&gt;I'm going to rephrase your question a bit:&lt;/p&gt;&#xA;&lt;h2&gt;&amp;quot;Is it worth preparing for the DASCA Data Science certification, and if not, what should I do instead?&amp;quot;&lt;/h2&gt;&#xA;&lt;p&gt;I teach data science and counsel with a lot of students looking for jobs, as well as employers looking for people to hire. I've also worked as a data science consultant for a few years.&lt;/p&gt;&#xA;&lt;p&gt;I have never heard of this certification. I've talked to a few other data scientists that I know, and they also haven't heard of this certification.&lt;/p&gt;&#xA;&lt;p&gt;In the world of data science, there are largely two credentials that count:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A degree in &lt;em&gt;something&lt;/em&gt; from a major university. These days, that something can be:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;data science&lt;/li&gt;&#xA;&lt;li&gt;computer science&lt;/li&gt;&#xA;&lt;li&gt;software engineering&lt;/li&gt;&#xA;&lt;li&gt;statistics&lt;/li&gt;&#xA;&lt;li&gt;in some cases, a degree specific to the problem domain you're interested in. (Economics or foreign policy are common examples)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Actual data science experience. This can be real-world experience, such as an undergraduate research project, a senior project / capstone class that you design yourself, personal projects that you document, Kaggle competition results, etc...&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The employers I've talked to in my capacity as a teacher and as a consultant typically don't give much stock to certificates on their own.&lt;/p&gt;&#xA;&lt;p&gt;They've found that people who focus on certificates either have too little real project experience (e.g. they know how to solve a couple of specific, clearly defined problems), lack the ability to do data pre-processing (which is the what data scientists spend the vast majority of their time doing), or lack experience working with a team.&lt;/p&gt;&#xA;&lt;p&gt;There are of course exceptions to this, but by and large, you'll have a much better time if you focus on getting real project experience.&lt;/p&gt;&#xA;&lt;h2&gt;What to do instead&lt;/h2&gt;&#xA;&lt;p&gt;Unless there's a very compelling reason for you to get this particular certification, (you love collecting certificates for fun, someone is paying you for it, or there's a particular job you want that lists this certificate as an explicit requirement), here's what I would recommend you do instead:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Finish your UG degree, making sure that you take steps necessary to have as many meaningful data science projects as you can, preferably ones where you work with a team of people. Use the resources of your UG program to help you network with people in the industries you're interested in, find a good internship, visit career fairs, etc...&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look for personal projects you can do that will show you have explored different aspects of data science, &lt;em&gt;especially&lt;/em&gt; data preprocessing. This can be things you just decide to do on your own, UCI datasets you explore for fun, Kaggle competitions or explorations, etc... Treat these like real research / business problems.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure you document these results somewhere public, such as GitHub or Kaggle via Jupyter notebooks, or in some other way that makes it easy for you to share them with potential employers. This should go beyond just &amp;quot;here's my regression result&amp;quot;, but a discussion of the choices you made, how they impacted the results, and caveats about your conclusions. &lt;a href=&quot;https://www.kaggle.com/mviola/titanic-eda-simple-model-0-80861/notebook&quot; rel=&quot;nofollow noreferrer&quot;&gt;This Jupyter notebook on Kaggle&lt;/a&gt; is a great example of what I'm talking about.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9157" LastActivityDate="2020-07-02T14:45:06.263" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6415" PostTypeId="2" ParentId="4065" CreationDate="2020-07-03T17:25:20.243" Score="0" Body="&lt;p&gt;Besides all of these good answers, I want to add one thing. Make them familiar with the world of &lt;strong&gt;Competitive Programming&lt;/strong&gt; and &lt;strong&gt;Problem Solving&lt;/strong&gt; where they would learn by playing. They would learn how to approach and solve a problem. Some of the most common &lt;em&gt;competitive programming&lt;/em&gt; and &lt;em&gt;problem solving&lt;/em&gt; platforms are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.urionlinejudge.com.br/judge/en/login&quot; rel=&quot;nofollow noreferrer&quot;&gt;URI OJ&lt;/a&gt; - There are a lot of problems here for the beginner from adding two numbers to much more.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://onlinejudge.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;UVa OJ&lt;/a&gt; - Here, they would learn how computer program works for checking two files! Statistics of this site is better seen &lt;a href=&quot;https://uhunt.onlinejudge.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; in uHunt.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://codeforces.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codeforces&lt;/a&gt; - This is a good site for competitive programming, as well as problem solving. New problems come in almost every week. The most important part here is, one could see other's code after a contest. Editorials for problems are available. This is a Russian platform.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://atcoder.jp/contests/&quot; rel=&quot;nofollow noreferrer&quot;&gt;At Coder&lt;/a&gt; - Similar platform like Codeforces, but this is a Japanese platform. Don't worry, in both of the platforms, English version is available.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.codechef.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodeChef&lt;/a&gt; - This is another similar platform. This is an Indian site.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.hackerrank.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacker Rank&lt;/a&gt; - Besides basic programming, they also have tracks for Data Structures, Algorithms, Databases, AI etc. Though I do not recommend those tracks for a beginner.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://projecteuler.net/archives&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler&lt;/a&gt; - There are so many interesting problems here. Here, only answer of one scenario should be submitted instead of submitting code.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://vjudge.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Virtual Judge&lt;/a&gt; -  This is a Chinese platform. Contests could be arranged here taking problems from different online Judges.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://toph.co/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Toph&lt;/a&gt; - A Bangladeshi platform for both competitive programming and problem solving.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://alpha.sustcseoj.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SourceCode (Temporary Name)&lt;/a&gt; - Our students made this platform, though it is in a very early stage. The name is not yet finalized. We take programming exams through it. There are several problems for problem solving.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are a lot of interesting things on the internet. We should encourage and entertain our new students with these tools, rather than compelling him to know complex things.&lt;/p&gt;&#xA;&lt;p&gt;(My answer seemed not relevant to the question, but it is relevant as you could submit answers in C/C++.)&lt;/p&gt;&#xA;" OwnerUserId="9279" LastActivityDate="2020-07-03T17:25:20.243" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6416" PostTypeId="2" ParentId="6377" CreationDate="2020-07-04T14:56:46.463" Score="1" Body="&lt;p&gt;Answering your questions with suitable answers&#xA;for doing research you must have the following:-&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A topic or brief subject on which you want to work. In CS field, start find faults and raising questions to yourself about the topic you learn, e.g. while learning sorting in Data structure, what other technique you can suggest while simplifying existing techniques, etc.&lt;/li&gt;&#xA;&lt;li&gt;After the topic is decided, find who had done what work on your topic. It means to find references to your research work, because without references you cannot write research paper. e.g. search websites of IEEE or research gate.&lt;/li&gt;&#xA;&lt;li&gt;Read any book on research methodology otherwise you will remain just a blogger. hahaha&lt;/li&gt;&#xA;&lt;li&gt;Al last but not the least, find a research guide online or offline.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;For any other queries, you can post me again&lt;/p&gt;&#xA;" OwnerUserId="9213" LastActivityDate="2020-07-04T14:56:46.463" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6417" PostTypeId="1" CreationDate="2020-07-05T19:16:18.150" Score="3" ViewCount="1029" Body="&lt;p&gt;Java is updating on a regular basis and it being so the corresponding text books to study Java also changes. Now I do not know why the edition &lt;em&gt;&amp;quot;Java 2: The Complete Reference&amp;quot;&lt;/em&gt; by &lt;em&gt;Herbert Schildt&lt;/em&gt; is so famous, in the sense that I find most educators having a copy of this particular edition and there are abundant used copies of the same available at cheap rates.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/kITtF.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/kITtF.png&quot; alt=&quot;Java 2: The Complete Reference&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;No doubt it is based on an older version of Java, but what is the special in this particular edition.&lt;/p&gt;&#xA;&lt;p&gt;I am quite confused as to which edition to follow, as in many cases of other texts I have seen that older editions are at times better and clearer in the meaning and newer editions tend to go less lucid at times.&lt;/p&gt;&#xA;&lt;p&gt;With the advancement of Java in this rapid rate, which edition to follow (edition 11 is the latest I hope) and how to be updated of the advancements (if I am suggested to follow the latest edition, it is going to get old within a couple of years).&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-07-06T16:22:44.900" Title="Java: The Complete Reference, which edition to follow" Tags="|self-learning|java|textbook|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6418" PostTypeId="2" ParentId="6417" CreationDate="2020-07-05T19:49:27.407" Score="5" Body="&lt;p&gt;For a student, any recent edition will be fine. Don't overthink it. The first task is to become thoroughly familiar with the mental model required of a Java programmer. Or even, for the very experienced, the mental model of a programmer in general.&lt;/p&gt;&#xA;&lt;p&gt;Most, but not all of the recent changes in Java are in the libraries, but even the more fundamental additions can wait until you can program effectively in &lt;em&gt;any consistent subset&lt;/em&gt; of the language. The intimate details of most recent additions are much less important than gaining a facility with the ideas of abstraction, composition, inheritance, encapsulation, and such.&lt;/p&gt;&#xA;&lt;p&gt;And yes, the language will either continue to change or it will become obsolete. Don't worry about that until you can't solve some programming problem effectively with what you already know.&lt;/p&gt;&#xA;&lt;p&gt;And a good textbook is probably more valuable to you at this point than a reference in any case. Reference material tends to present features in isolation, which is essentially worthless. The features need to work together to be effective. Textbooks will tell you that better than a reference guide.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-07-05T19:49:27.407" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6419" PostTypeId="2" ParentId="6417" CreationDate="2020-07-06T08:28:27.163" Score="8" Body="&lt;p&gt;The fundamental question is, whether your goal is to learn &lt;em&gt;programming&lt;/em&gt; (in which case the language doesn't matter at all … theoretically at least) or to learn Java.&lt;/p&gt;&#xA;&lt;p&gt;If you want to learn programming, the programming language and the version doesn't really matter. It only matters insofar as to understand the examples, and to understand the concepts behind the code, you need to understand the programming language. So, the code and the programming language should be as simple as possible … e.g. a language like Scheme or Smalltalk, or you already need to know the language.&lt;/p&gt;&#xA;&lt;p&gt;If you want to learn Java, then you should use a recent book, because there has been a lot of stuff introduced that not only makes stuff easier to read and write, but that fundamentally changes the way Java programs are written.&lt;/p&gt;&#xA;&lt;p&gt;Sun dropped the &amp;quot;2&amp;quot; from &amp;quot;Java 2&amp;quot; in 2004. That should give you an indication as to how old this book is. It covers Java 2 1.4, which was released in 2002.&lt;/p&gt;&#xA;&lt;p&gt;You don't have to chase every version, every release, every edition, every new feature (especially with the new 6-month release cycle), but since 2002, there have been multiple new features in the Java language that &lt;em&gt;fundamentally change&lt;/em&gt; how Java code is written:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Java 5 (2004):&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Generics&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Annotations&lt;/li&gt;&#xA;&lt;li&gt;Autoboxing/Autounboxing&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;enum&lt;/code&gt;s&lt;/li&gt;&#xA;&lt;li&gt;Varargs&lt;/li&gt;&#xA;&lt;li&gt;The enhanced &lt;code&gt;for&lt;/code&gt; loop&lt;/li&gt;&#xA;&lt;li&gt;[LIB] JSR166 Concurrency APIs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Java 7 (2011)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;[LIB] Extended JSR166 Concurrency APIs&lt;/li&gt;&#xA;&lt;li&gt;[LIB] NIO.2&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Java 8 (2014)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Lambdas&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;default&lt;/code&gt; methods on &lt;code&gt;interface&lt;/code&gt;s&lt;/li&gt;&#xA;&lt;li&gt;[LIB] &lt;strong&gt;The &lt;code&gt;Stream&lt;/code&gt; API&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Java 9 (2017)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;module&lt;/code&gt;s&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;[LIB] Reactive Streams&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Java 10 (2018)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Local variable type inference&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Java 14 (2020)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;switch&lt;/code&gt; expressions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;[I &lt;strong&gt;bolded&lt;/strong&gt; the ones I deem to be particularly disruptive. I marked some features as [LIB] which are &lt;em&gt;library additions to the Java platform&lt;/em&gt; and not &lt;em&gt;language features&lt;/em&gt;, but are nonetheless important. E.g. NIO.2 offers a whole new, much higher-level, much improved way of interacting with files. And &lt;code&gt;Stream&lt;/code&gt;s essentially mean that you will never have to iterate over a collection ever again.]&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Value Types&lt;/em&gt; and &lt;em&gt;&lt;code&gt;sealed&lt;/code&gt; Types&lt;/em&gt; will bring another major shift in the near future (possibly as early as Java 15 (October 2020)). In particular, &lt;code&gt;sealed&lt;/code&gt; Types will allow modeling &lt;em&gt;Algebraic Sum Types&lt;/em&gt; in Java, which opens up a fundamentally different way of structuring programs.&lt;/p&gt;&#xA;&lt;p&gt;Oracle has recently started to include so-called &lt;em&gt;Previews&lt;/em&gt; as well, these are features that are shipped as part of an official release, so they reach a wide audience, but that are not guaranteed to be supported in future releases in that form. They may be changed or dropped completely. One of those features is &lt;code&gt;record&lt;/code&gt;s that currently ship as a preview in Java 14. While they aren't as disruptive as some of the others (Generics, lambdas, Value Types, &lt;code&gt;sealed&lt;/code&gt;) as they are just syntactic sugar, they allow to drastically reduce the amount of code for simple data classes, and thus make it easier to see what is going on.&lt;/p&gt;&#xA;&lt;p&gt;For example, this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;final class Point {&#xA;    private final int x;&#xA;    private final int y;&#xA;&#xA;    Point(int x, int y) {&#xA;        this.x = x;&#xA;        this.y = y;&#xA;    }&#xA;&#xA;    public int x() {&#xA;        return x;&#xA;    }&#xA;&#xA;    public int y() {&#xA;        return y;&#xA;    }&#xA;&#xA;    @Override&#xA;    public boolean equals(Object that) {&#xA;        if (!(that instanceof Point)) {&#xA;            return false;&#xA;        }&#xA;&#xA;        var other = (Point) that;&#xA;        return x() == other.x() &amp;amp;&amp;amp; y() == other.y();&#xA;    }&#xA;&#xA;    @Override&#xA;    public int hashCode() {&#xA;        return x() ^ y();&#xA;    }&#xA;&#xA;    @Override&#xA;    public String toString() {&#xA;        return &amp;quot;Point[x=&amp;quot; + x + &amp;quot;, y=&amp;quot; + y + &amp;quot;]&amp;quot;;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Can be written in Java 14 as this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;record Point(int x, int y) { }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="945" LastEditorUserId="945" LastEditDate="2020-07-06T10:01:16.667" LastActivityDate="2020-07-06T10:01:16.667" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6420" PostTypeId="2" ParentId="6417" CreationDate="2020-07-06T12:50:52.840" Score="5" Body="&lt;p&gt;I'll try to give a few actual textbook recommendations.&lt;/p&gt;&#xA;&lt;p&gt;If the goal is to learn Java for regular programming, I would avoid like the plague any Java book that doesn't at least go through Java 5, at which point it practically became a different language.  I have always found David Liang to be quite a clear writer, and &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/935306578X&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;his most recent text&lt;/a&gt; (finally) introduces Java 5 features such as generics.&lt;/p&gt;&#xA;&lt;p&gt;If you're looking for a book that shows you the deeper beauty of object oriented programming, &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1940113059&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Joseph Bergin's got your back&lt;/a&gt;.  This isn't a book about Java features, but really more about the &lt;em&gt;why&lt;/em&gt; of things.  Please note that after reading it, you will constantly run into people saying very silly things about OO online.  Many people really, really seem to think that they understand it because they have learned some of its mechanics, but they truly don't understand the core idea at all.&lt;/p&gt;&#xA;&lt;p&gt;In terms of more recent language features, I'm not familiar with this &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0134685997&quot; rel=&quot;noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;book by Joshua Bloch&lt;/a&gt;, but it is well reviewed, and covers far more recent developments than the Liang book.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-07-06T12:50:52.840" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6421" PostTypeId="2" ParentId="6417" CreationDate="2020-07-06T16:22:44.900" Score="2" Body="&lt;p&gt;I would recommend you to rely more on online tutorials. They are updated as fast as the language itself.&lt;/p&gt;&#xA;&lt;p&gt;Buy one good latest book. That will help you set the foundation (not that you cannot set foundation from online tutorials.)&lt;/p&gt;&#xA;&lt;p&gt;I left programming in Java more than 7 years ago but I have still managed to stay up to date on it through OTLs like Pluralsight, LinkedIn Learning (formerly Lynda.com) and O’Reilly. And I know I am not far behind because I interview with companies in Java while coding in C++ at work.&lt;/p&gt;&#xA;" OwnerUserId="9286" LastActivityDate="2020-07-06T16:22:44.900" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6422" PostTypeId="1" CreationDate="2020-07-07T22:11:28.343" Score="4" ViewCount="102" Body="&lt;p&gt;I am a CS undergraduate student, strictly speaking I am fond of studying theoretical CS subjects, the corresponding books just attract me. Now in theoretical CS we probably have &lt;em&gt;algorithm design and analysis&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For the said sub-branch in CS among many other books I follow the classic text &lt;em&gt;Introduction to Algorithms&lt;/em&gt; by Cormen et. al. The book simply follows a logical mathematical approach for the said sub-branch. Now just reading a text and comprehending is not enough, I feel that learning is not complete unless it is put to test. Nothing can be better than the exercises and the problems at the end of each chapter in the text. I make an attempt to solve each and every exercise and problems but under the background that I am doing self-study, there is no way I could reach out to some-one who could check my approach.&lt;/p&gt;&#xA;&lt;p&gt;Most of the solution manuals which are available as the first three search results of &amp;quot;CLRS Solution&amp;quot; of google search contains a lot of errors and simply I probably waste time in proving that where they are wrong.( The third search result is even not in English.)&lt;/p&gt;&#xA;&lt;p&gt;Could anyone help me out by referring to me a standard solution manual without any errors. I am asking for a solution manual just to tally my own approach, whether at all it is correct or how a better approach would be to solving a problem. This would better help me in seasoning myself as how to &amp;quot;think&amp;quot; or how others thought are different from those of mine. Believe me I would not blindly refer to it without putting any effort myself.&lt;/p&gt;&#xA;&lt;p&gt;Or in case if such solution manual is not available (which is most probably the situation) could anyone please guide me as to how to tackle my problem single handed ,remembering that I am doing self study.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-07-07T22:11:28.343" Title="Error free solution manual for &quot;Introduction to Algorithms&quot; by Cormen et al. for self study or alternative method to tackle them single handed" Tags="|self-learning|resource-request|algorithms|textbook|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6423" PostTypeId="1" CreationDate="2020-07-08T21:37:55.867" Score="2" ViewCount="206" Body="&lt;p&gt;Alfred V. Aho, Jeffrey D. Ullman have written&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The theory of parsing, translation, and compiling. Volume 1 Parsing 1972 and Volume 2 Compiling 1973&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Compilers: Principles, Techniques, and Tools 2ed 2006, i.e. the dragon book.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Are the two-volumn books more advanced or complete than the dragon book?&lt;/p&gt;&#xA;&lt;p&gt;Is the dragon book supposed to replace the two-volumn books?&lt;/p&gt;&#xA;&lt;p&gt;Are the two-volumn books outdated or still very relevant?&lt;/p&gt;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2020-07-08T22:27:37.793" Title="The theory of parsing, translation, and compiling, v.s. Compilers: Principles, Techniques, and Tools?" Tags="|textbook|compiling|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6424" PostTypeId="2" ParentId="6423" CreationDate="2020-07-08T22:27:37.793" Score="3" Body="&lt;p&gt;A lot has been done since 1973. But for an introduction, the earlier books should be fine.&lt;/p&gt;&#xA;&lt;p&gt;For a more advanced treatment, choose a modern book, of course.&lt;/p&gt;&#xA;&lt;p&gt;Another book that I like a lot is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0130830984&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;On Pascal Compilers&lt;/em&gt; by Brinch Hansen&lt;/a&gt; from 1985. While it is written in Pascal, it is one of the true pieces of CS Literature. It restricts itself to Recursive Descent parsing which is suitable for LL(1) languages. But my view of languages is that the &lt;em&gt;should&lt;/em&gt; be LL(1) for readability, though compilers might use LR techniques for efficiency.&lt;/p&gt;&#xA;&lt;p&gt;So, it depends on what you need. If you are a novice at this and haven't yet built any compilers an older book might actually be superior.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-07-08T22:27:37.793" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6426" PostTypeId="1" CreationDate="2020-07-09T16:25:29.017" Score="2" ViewCount="574" Body="&lt;p&gt;Now for a student who is trying to master the subject of &amp;quot;Compiler Design&amp;quot; which book should he/she follow (written by Aho, Ullman)?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;1) Principles of Compiler Design By Aho Ullman (1977)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ZCiGx.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ZCiGx.png&quot; alt=&quot;Principles of Compiler Design&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I find that the used copies of these text is still available online. Is it so that this particular edition inspite of being old is in great demand.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;2) Compilers: Principles, Techniques and Tools (2nd edition) by Aho, Ullman, Sethi (2006)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/RBPRf.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/RBPRf.png&quot; alt=&quot;Compilers: Principles, Techniques and Tools&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I would like to know which one would be more suitable for a novice student having knowledge of only automata theory. Which book has a more lucid language? Which one is more preferable for a student performing self-study. I wanted to ask this question because &lt;a href=&quot;https://cstheory.stackexchange.com/a/1958/57676&quot;&gt;in this answer&lt;/a&gt; it is said that older editions of few texts are sometimes better. So it is always better to have a good guidance before diving into a subject learning.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/6423/the-theory-of-parsing-translation-and-compiling-v-s-compilers-principles-t&quot;&gt;Here&lt;/a&gt; the question asks whether &amp;quot;the two volume books are more advanced or complete than the dragon book.Is the dragon book supposed to replace the two-volume books? Are the two-volume books outdated or still very relevant?&amp;quot; The book which is being referred to as &amp;quot;two volume book&amp;quot; is different from the book marked as (1) in my question.&lt;/p&gt;&#xA;&lt;p&gt;Now I am asking specifically which one among the two books which are referred by me are more easy to read? Which has a more lucid language.&lt;a href=&quot;https://cstheory.stackexchange.com/a/1958/57676&quot;&gt;In this answer&lt;/a&gt; here they say that the automata book by Ullman in the newer editions have changed the elegance of the actual text. Many important portions have been removed and at portions it lacks clarity. Now my question is which among the two books are better or are they equivalent? I had difficulty in following the second edition of the automata book so I felt like asking it here, such that before I begin, I am guided properly.&lt;/p&gt;&#xA;&lt;p&gt;To learn the basics an old book does not matter, because foundations should remain the same, but I want to read those foundations in an elegant manner, without being puzzled by unclear or in-depth explanation of the same.(which at times happen if a new co-author is introduced)&lt;/p&gt;&#xA;" OwnerUserId="9125" LastEditorUserId="9125" LastEditDate="2020-07-09T20:08:05.133" LastActivityDate="2020-07-29T09:01:46.823" Title="Principles of Compiler Design v/s Compilers: Principles, Techniques and Tools by Aho, Ullman" Tags="|self-learning|resource-request|textbook|compiling|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6427" PostTypeId="2" ParentId="5880" CreationDate="2020-07-12T12:00:52.807" Score="0" Body="&lt;p&gt;You have a list &lt;span class=&quot;math-container&quot;&gt;$[l_1, l_2, ..., l_N]$&lt;/span&gt; of &lt;span class=&quot;math-container&quot;&gt;$N$&lt;/span&gt; distinct integers.&lt;/p&gt;&#xA;&lt;p&gt;Then you receive &lt;span class=&quot;math-container&quot;&gt;$K$&lt;/span&gt; queries where the query &lt;span class=&quot;math-container&quot;&gt;$q_i = (a_i, b_i)$&lt;/span&gt; asks you to find&#xA;the minimal element in the sublist &lt;span class=&quot;math-container&quot;&gt;$[l_{a_i}, l_{a_i+1}, ..., l_{b_i}]$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Preprocess the list to serve &lt;span class=&quot;math-container&quot;&gt;$K$&lt;/span&gt; queries in less than &lt;span class=&quot;math-container&quot;&gt;$O(K \cdot N)$&lt;/span&gt; time.&lt;/p&gt;&#xA;" OwnerUserId="8356" LastActivityDate="2020-07-12T12:00:52.807" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6428" PostTypeId="1" AcceptedAnswerId="6430" CreationDate="2020-07-14T19:08:40.617" Score="3" ViewCount="152" Body="&lt;p&gt;I study mathematics and sometimes I have difficulties to find proofs or counterexamples to some problems. Is it useful to learn programming to find counterexamples or proofs? How useful it is for mathematician to learn for example Coq or Lean?&lt;/p&gt;&#xA;" OwnerUserId="9305" LastActivityDate="2020-08-06T10:18:00.690" Title="How useful it is for math student to learn programming to find proofs or counterexamples?" Tags="|programming|mathematics|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6429" PostTypeId="1" CreationDate="2020-07-15T09:59:58.570" Score="3" ViewCount="97" Body="&lt;p&gt;I need a set of problems for beginner Haskell course represented as a problem book or workbook.&#xA;Can you help me find any to give them as a homework on weekly basis?&#xA;I was able to find only one book in such a sense but in Portuguese. Is there any in English?&#xA;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6387" LastEditorUserId="6387" LastEditDate="2020-07-15T10:16:09.567" LastActivityDate="2021-07-26T08:10:15.007" Title="Problem book for Haskell course" Tags="|textbook|functional-programming|homework|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6430" PostTypeId="2" ParentId="6428" CreationDate="2020-07-16T11:13:15.933" Score="4" Body="&lt;p&gt;This is pretty much in the realm of opinion, but as a math PhD and a long time CS professor, I'd guess the answer is no. Programming is fun and programming can be useful, but its application to proving theorems in mathematics is very specialized and a bit limited. And it generally doesn't apply to the sorts of things a struggling math student wants to learn.&lt;/p&gt;&#xA;&lt;p&gt;There are a couple of exceptions in which programming was instrumental in establishing a proof. One is the &lt;a href=&quot;https://en.wikipedia.org/wiki/Four_color_theorem&quot; rel=&quot;nofollow noreferrer&quot;&gt;Four Color Theorem&lt;/a&gt; which was originally proved with a computer because of the huge number of different possible planar maps. But mathematicians, like myself, find that proof unsatisfying and would prefer one that was more analytical and which would lead to more insight. But these sorts of cases are very rare.&lt;/p&gt;&#xA;&lt;p&gt;But, theorem proving, like anything else is a skill best learned through practice. Once you have tried and eventually succeeded at proving some theorems, perhaps after false starts, you will start to gain insight. Every success can lead to the next success. But it is hard work. And the work may not get easier as you go, since you will probably take on harder problems. But practice, practice, practice.&lt;/p&gt;&#xA;&lt;p&gt;Programming does, however, give you some practice with thinking logically and breaking a hard problem down into smaller, easier, parts. In that sense programming can be a bit helpful. But to learn math, just &lt;em&gt;do&lt;/em&gt; math.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, there are &lt;a href=&quot;https://en.wikipedia.org/wiki/Automated_theorem_proving&quot; rel=&quot;nofollow noreferrer&quot;&gt;automated Theorem Provers&lt;/a&gt; that can do some interesting things. But their results don't generally lead to the insight into a problem that a mathematician needs and to build one of them requires deep insight to start with.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-07-16T11:13:15.933" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6431" PostTypeId="1" AcceptedAnswerId="6432" CreationDate="2020-07-16T16:45:19.033" Score="4" ViewCount="294" Body="&lt;p&gt;In our Bachelor curriculum the course Operating Systems and Computer Networks (5 CP) is designated to be taken in the second semester.  Currently it uses C, and while I'm personally very fond of C, it does usually overwhelm the students to learn C enough in order to be able to complete the practical exercises.&lt;/p&gt;&#xA;&lt;p&gt;However, the focus of the course is not to learn a language but rather the concepts and applying them in small exercises, while getting a &amp;quot;feel&amp;quot; for operating systems or low-level development.&lt;/p&gt;&#xA;&lt;h1&gt;Issues with C and Rust&lt;/h1&gt;&#xA;&lt;p&gt;Issues students had with C:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reading the documentation / man-pages: They're often written for much more experienced people.&lt;/li&gt;&#xA;&lt;li&gt;Self-teaching C: It's difficult to find resources both understandable and 'to the point' and 'correct'. Most C only resources, often top hits on Google (e.g. geeks4geeks), are simply wrong  code.&lt;/li&gt;&#xA;&lt;li&gt;Dealing with undefined behavior.&lt;/li&gt;&#xA;&lt;li&gt;Dealing with complex and difficult-to-understand error messages by the compiler.&lt;/li&gt;&#xA;&lt;li&gt;Compilation of the program.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A few of these issues could be addressed with Rust:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The documentation is excellent.&lt;/li&gt;&#xA;&lt;li&gt;Online-Tutorials don't need to be perfect as with C, since the compiler is pedantic enough.&lt;/li&gt;&#xA;&lt;li&gt;There's no/less undefined behavior.&lt;/li&gt;&#xA;&lt;li&gt;The toolchain is easy to use.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Other languages and their issues:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Python is a popular choice, however I had bad experiences with students being unable to verify their code correctly since it's never compiled and the missing type system can be daunting sometimes as well. Also it often creates a bit too much abstraction in order to be able to look 'into' things.&lt;/li&gt;&#xA;&lt;li&gt;Go was used in some advanced courses here for networked programming or parallel programming.  It has nice tooling as well but targets a different kind of abstraction as well.&lt;/li&gt;&#xA;&lt;li&gt;C++ is simply too complex, while improves some areas of C above, it does so without really removing the pitfalls of C.&lt;/li&gt;&#xA;&lt;li&gt;Java has similar issues as Go and Python here.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Rust Low-Level Abstraction Library&lt;/h1&gt;&#xA;&lt;p&gt;However Rust has many abstractions that actually stop us from being able to really 'go down' the stack and look 'into' what's happening (at least, without understanding the details of Rust which isn't the goal).  For example for the students to fiddle around with syscalls they are supposed to write a small cat(1) program using open,close,read,write(3) etc.  There's of course the &lt;code&gt;libc&lt;/code&gt; crate but using that basically requires knowledge of C and Rust to really deal with things.  I thus drafted a small library which I currently host &lt;a href=&quot;https://git.imp.fu-berlin.de/koenigl2/ti3-rust/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; with really thin abstractions around those syscalls that make dealing with them from Rust quite nicer. &lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;The code logic is now quite similar, but hopefully the easier tooling helps the students:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;ssize_t n = read(src, buffer, sizeof(buffer));&#xA;if (n &amp;lt; 0) { return 1; }&#xA;if (n == 0) { return 0; }&#xA;&#xA;const size_t read = (size_t)n;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Becomes:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-rust prettyprint-override&quot;&gt;&lt;code&gt;let read = match read(src, &amp;amp;mut buffer, BUFSIZ) {&#xA;    0 =&amp;gt; return 0,&#xA;    n if n &amp;lt; 0 =&amp;gt; return 1,&#xA;    n =&amp;gt; n as size_t,&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And similarly&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;while (remaining &amp;gt; 0) {&#xA;        ssize_t written = write(dest, &amp;amp;buffer[read - remaining],&#xA;                                remaining);&#xA;        if (written &amp;lt; 0) { return 1; }&#xA;&#xA;        remaining -= written;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is now:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-rust prettyprint-override&quot;&gt;&lt;code&gt;let mut remaining = read;&#xA;while remaining &amp;gt; 0 {&#xA;    let written = match write(dest, &amp;amp;mut buffer[read - remaining..], remaining) {&#xA;        n if n &amp;lt; 0 =&amp;gt; return 1,&#xA;        n =&amp;gt; n as size_t,&#xA;    };&#xA;    remaining -= written;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I also think it's far less confusing for students to have &amp;quot;return values&amp;quot; to be separate from program &amp;quot;exit codes&amp;quot;.  However I'd like to hear some opinions or get some feedback whether you think this is worth pursuing.&lt;/p&gt;&#xA;&lt;p&gt;For those wanting to try this, in &lt;code&gt;Cargo.toml&lt;/code&gt; add:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-toml prettyprint-override&quot;&gt;&lt;code&gt;[dependencies]&#xA;libc = &amp;quot;0.2&amp;quot;&#xA;ti3-rust = { git = &amp;quot;https://git.imp.fu-berlin.de/koenigl2/ti3-rust.git&amp;quot; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;Remaining Issues&lt;/h1&gt;&#xA;&lt;p&gt;Some things are lost when using Rust.  Since &lt;code&gt;cargo&lt;/code&gt; now handles building, the possibility to learn about (Preprocessing) -&amp;gt; Compilation -&amp;gt; Assembly -&amp;gt; Linking is lost.  While the goal is not to be CLI compilation magicians, I think understanding this pipeline does help to reason about certain OS behavior.  However one might rightfully argue that this is simply too in-depth for a 5 CP second semester course anyway.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; However this library should not be used in the real-world as it simply wraps the low-level functions in the libc with &lt;code&gt;unsafe&lt;/code&gt; blocks and does some ugly casting.&lt;/p&gt;&#xA;" OwnerUserId="9311" LastEditorUserId="204" LastEditDate="2020-07-16T21:46:17.103" LastActivityDate="2020-07-16T21:57:57.917" Title="Teaching an absolute beginners class Operating Systems with Rust" Tags="|programming|language-choice|c|operating-systems|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6432" PostTypeId="2" ParentId="6431" CreationDate="2020-07-16T21:57:57.917" Score="8" Body="&lt;p&gt;Trying to learn many things at once: A language, an operating system, creating command line tools, compilation, etc. goes against cognitive load theory. That is why so many students fail. Keep it simple teach one thing at a time. You will do it in less time to can then teach the other things, with time to spare.&lt;/p&gt;&#xA;&lt;p&gt;As a tutor I have taught a student, to create various Unix tools using python. We made: &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;tee&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, etc. and a simple shell. It did not obscure anything about how operating systems work. It did reduce cognitive load&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-07-16T21:57:57.917" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6433" PostTypeId="1" CreationDate="2020-07-17T17:17:31.627" Score="1" ViewCount="50" Body="&lt;p&gt;I was going through the text &lt;em&gt;Introduction to Algorithms&lt;/em&gt; by &lt;em&gt;Cormen et. al.&lt;/em&gt; but faced some issues with the Fibonacci Heap section, especially the intuitive working of the charging and discharging of the potential function. When is the charging triggered or when is the discharging triggered. Without a proper a guidance ( I am doing self study) it is quite difficult for me to understand the details behind this specific topic on my own.&lt;/p&gt;&#xA;&lt;p&gt;I had asked few of my questions &lt;a href=&quot;https://cs.stackexchange.com/questions/128411/essence-of-the-cost-benifit-obtained-by-using-markings-in-fibonacci-heaps-by&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://cs.stackexchange.com/questions/128410/intuition-behind-the-entire-amortized-concept-of-fibonacci-heap-operations&quot;&gt;here&lt;/a&gt; but while writing this question, I haven't received an answer. Probably this means that topic is quite difficult (from the intuition and tear-down point of view, this is what I feel , may be others might differ).&lt;/p&gt;&#xA;&lt;p&gt;Anyways, could anyone recommend me video lectures which shall instruct me and inculcate in me the intuition of the working of the Fibonacci Heap. It shall be very helpful me and other who are probably in need of the same.&lt;/p&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-07-17T17:17:31.627" Title="Detailed video lecture that gives in-depth explanation of the intuition behind Fibonacci Heaps operations" Tags="|self-learning|resource-request|databases|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6434" PostTypeId="1" CreationDate="2020-07-20T11:32:29.127" Score="1" ViewCount="67" Body="&lt;p&gt;I'm still student in university, and I need 2 years to graduate, but the thing is I still don't know anything about computer science other than problem solving, C++/Python OOP and DataStructure; I know these are heavy important subjects but I'm still lost, my university is also lost for me and I have the power to learn more and more alone but all I need is a clear plan to do that..&lt;/p&gt;&#xA;&lt;p&gt;I think this question had been asked hundreds of times.. But still there's no good enough answers.. So let me rephrase the question and ask this :&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;How to know what kind of majors do I want to learn and work with in the future as graduated computer science student? AND Where to find a tree-plan of skills that I need to learn to reach my goal on that major? AND When I find that tree of skills, Where to learn those skills other than my University?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So I need to know what major I do really need, and how to learn it in a very good way..&lt;/p&gt;&#xA;&lt;p&gt;Please give me any helpful websites, articles, tests to know what major I want (idk if that's even exist) and anything you see it could help me :D&lt;/p&gt;&#xA;&lt;p&gt;Thanks in advance&lt;/p&gt;&#xA;" OwnerUserId="9317" LastActivityDate="2020-07-20T11:32:29.127" Title="Clear plan for self-study?" Tags="|self-learning|" AnswerCount="0" CommentCount="9" ClosedDate="2020-08-05T13:41:17.253" ContentLicense="CC BY-SA 4.0" />
  <row Id="6435" PostTypeId="2" ParentId="6428" CreationDate="2020-07-20T13:42:16.843" Score="1" Body="&lt;p&gt;The only thing that programming can do for you is teach you logical thinking, if you have problems there.&lt;/p&gt;&#xA;&lt;p&gt;The computer won't let you use assumptions or take shortcuts. You have to create a complete, logical sequence of instructions to get from the problem to the solution. And that skill is of course also needed for mathematical proofs.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2020-07-20T13:42:16.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6436" PostTypeId="1" CreationDate="2020-07-22T10:29:31.777" Score="1" ViewCount="203" Body="&lt;p&gt;Out of my own interest, I have been self-learning Java over the past few months.&lt;/p&gt;&#xA;&lt;p&gt;I decided I should take this to a greater advantage, so I have been considering taking the OCP (&lt;a href=&quot;https://www.oracle.com/uk/corporate/features/oracle-certification.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oracle Certified Professional&lt;/a&gt;) . I presume that the OCP is more useful than &lt;a href=&quot;https://en.wikipedia.org/wiki/AP_Computer_Science&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP Computer Science A&lt;/a&gt;, which is my other option.&lt;/p&gt;&#xA;&lt;p&gt;However, my concern is whether admission officers know anything about the OCP, compared to AP Computer Science A, which university admission officers are familiar with.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, would it be a bad decision (and waste of money) to take the OCP over AP Computer Science A? Should I take both?&lt;/p&gt;&#xA;" OwnerUserId="9322" LastEditorUserId="694" LastEditDate="2020-08-30T12:31:40.593" LastActivityDate="2021-01-27T13:07:35.847" Title="AP Computer Science A vs. OCP" Tags="|self-learning|java|ap-computer-science-a|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6437" PostTypeId="2" ParentId="6436" CreationDate="2020-07-22T13:32:04.797" Score="1" Body="&lt;p&gt;First, I applaud your ambition!&lt;/p&gt;&#xA;&lt;p&gt;The first OCP exam covers roughly what AP did until this most recent year, when the college board stripped out Interfaces. I would still suggest that they are mostly equivalent, but there are a few practical advantages to the AP Test:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It is substantially cheaper.&lt;/li&gt;&#xA;&lt;li&gt;Colleges recognize it for admissions purpose. (As you point out, an admissions officer is unlikely to have heard of the OCP, and would question how it compares to AP, and why you didn't just take AP)&lt;/li&gt;&#xA;&lt;li&gt;Many colleges, at least in North America, automatically award credit or alter your course placement based on your AP scores. No equivalent system exists for OCP.&lt;/li&gt;&#xA;&lt;li&gt;Because OCP is a professional exam, and you are unlikely to join the profession for at least 5 years (assuming a 4 year college), the exam may be considered dated by the time you get into industry, and it seems obvious that a college major will count for more than the lowest-level Oracle exam in any case. TBH, I've never heard of anyone asking for job applicants to provide Oracle scores, though I imagine that it probably happens somewhere or they wouldn't still offer the exam.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;One last thought for you: you do not have to take the course to register for the test, so you can self-study. If you wish to go this route, but your &lt;em&gt;school&lt;/em&gt; won't allow you to register yourself for the exam without being enrolled in the course, you should still be able to sign up at a different location.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-07-22T13:32:04.797" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6438" PostTypeId="1" CreationDate="2020-07-22T22:13:32.640" Score="3" ViewCount="199" Body="&lt;p&gt;I was commissioned to prepare an advanced course on Computer Networks with updated topics. My students have already passed the Computer Networking course using A. S. Tanenbaum's book. They gave enough on the theory and I would like to give you something more practical.&lt;/p&gt;&#xA;&lt;p&gt;They recommended that I address security and network administration issues but I'm still not sure.&#xA;Do you have any ideas? I listen to suggestions&lt;/p&gt;&#xA;" OwnerUserId="9318" LastEditorUserId="1293" LastEditDate="2021-04-11T14:54:49.457" LastActivityDate="2023-09-29T11:17:36.600" Title="What to teach in an Advanced Computer Networking course?" Tags="|networks|course-design|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6440" PostTypeId="1" CreationDate="2020-07-27T17:23:32.493" Score="2" ViewCount="115" Body="&lt;p&gt;I have created a PowerPoint presentation and I want to create a video of me presenting it. I'm looking for a software to make my life easier. The features I'm looking for are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Can record a 25-minute video for free.&lt;/li&gt;&#xA;&lt;li&gt;Works on Mac.&lt;/li&gt;&#xA;&lt;li&gt;Can record the screen and me (audio+video).&lt;/li&gt;&#xA;&lt;li&gt;Lets me rewind while recording and continue from there, so that if I make a tiny mistake I can just go a few seconds (or one slide) back and continue recording.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Any suggestions would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="9335" LastEditorUserId="9335" LastEditDate="2020-07-27T17:37:13.113" LastActivityDate="2020-08-19T12:23:37.993" Title="Creating a pre-recorded lecture" Tags="|lecture-tools|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6441" PostTypeId="2" ParentId="6440" CreationDate="2020-07-28T03:59:24.207" Score="1" Body="&lt;p&gt;If you don't mind skipping your own face, your easiest, cheapest option is probably PowerPoint itself.  PowerPoint allows you to record audio (and animations) for each slide, set up timing for the next slide to start automatically, and export the entire thing as a video.&lt;/p&gt;&#xA;&lt;p&gt;I'm not aware of any product that both fits criteria 1 (free) and criteria 3 (&lt;em&gt;video&lt;/em&gt; of you).&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-07-28T03:59:24.207" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6442" PostTypeId="2" ParentId="6438" CreationDate="2020-07-29T08:50:18.437" Score="4" Body="&lt;p&gt;I created an Advanced Computer Networking course offered at Master's level which follows an earlier undergraduate course in networking (which I also created and teach).&lt;/p&gt;&#xA;&lt;p&gt;I'll offer some insights, suggestions and thoughts, but they will just be off-the-cuff rather than a formal curriculum plan (I've done enough of those).&lt;/p&gt;&#xA;&lt;p&gt;The first thing to start is to not assume that the students have fully absorbed and are usefully fluent on everything in Tanenbaum! Start with revision, focusing on those parts of the material that would be essential to grasp to move on to the advanced material. Do not revise by just going through it again, but do it through asking questions and raising problems so they can determine if they understand the material well enough. In particular I brought out routing at the network layer as being critical, as well as multiplexing at the transport layer, as well as the whole 7 layer model again.&lt;/p&gt;&#xA;&lt;p&gt;I then focused on larger issues that students may not have encountered when administering their own machine. Things that happen at ISP level and internet backbone level, such as BGP, AS numbering and the protocols and databases involved.&lt;/p&gt;&#xA;&lt;p&gt;A lot can also be done with security, such as the law and ethics. What is a network administrator permitted  to do and when does managing a network exceed the authority allowed (such as entrapment). I looked at honeypots for example, as well as logging.&lt;/p&gt;&#xA;&lt;p&gt;In a more advanced course I also put more emphasis on self-learning. Things such as monitoring media for incident reports; making presentations on security incidents over the last 12 months, for example.&lt;/p&gt;&#xA;&lt;p&gt;In terms of network management SNMP and tools that use it can be covered in more detail, including network discovery, network mapping and so on. As practical work I get them to program an SNMP tool to learn about the object encoding mechanisms and also about packet capture.&lt;/p&gt;&#xA;&lt;p&gt;I have more ideas, but this might get you started.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2020-07-29T08:50:18.437" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6443" PostTypeId="2" ParentId="6426" CreationDate="2020-07-29T09:01:46.823" Score="4" Body="&lt;p&gt;Although it is not quite what you are asking, I deprecated these two books when teaching compiler design as many otherwise capable students are finding them tough going. I started to focus on more practical based books. Its a matter of top-down versus bottom-up approaches to the material (not the parsing).&lt;/p&gt;&#xA;&lt;p&gt;I now prefer Grune:&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Modern Compiler Design&amp;quot;, Grune, van Reeuwijk, Bal, Jacobs, Langendoen, Published by Springer 2012. ISBN 978-1461446989&lt;/p&gt;&#xA;&lt;p&gt;But choosing books to recommend to students is a very personal thing and others may have other choices.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sub&gt;&lt;sup&gt;I learned from the 1971 classic &amp;quot;Compiler Construction for Digital Computers&amp;quot; by Gries, but not something you can use on a modern course!&lt;/sup&gt;&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2020-07-29T09:01:46.823" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6444" PostTypeId="2" ParentId="6440" CreationDate="2020-07-30T13:14:02.620" Score="5" Body="&lt;p&gt;&lt;a href=&quot;https://obsproject.com/&quot; rel=&quot;noreferrer&quot;&gt;OBS Studio&lt;/a&gt; fills your description.&lt;/p&gt;&#xA;&lt;p&gt;It is not the easiest program to use, but you can find plenty of tutorials on YouTube.&lt;/p&gt;&#xA;&lt;p&gt;While rewinding the recording again might seem appealing, it is very common to find out more errors &lt;em&gt;after&lt;/em&gt; you complete the recording. In that case, you need a better video editor. OBS studio might be enough, but &lt;a href=&quot;https://www.shotcut.org/&quot; rel=&quot;noreferrer&quot;&gt;shotcut&lt;/a&gt; is your best bet.&lt;/p&gt;&#xA;" OwnerUserId="8747" LastActivityDate="2020-07-30T13:14:02.620" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6445" PostTypeId="1" CreationDate="2020-07-31T02:25:41.513" Score="2" ViewCount="391" Body="&lt;p&gt;JUnit seems to work well for unit tests, but I'm not interested in unit tests, I want to test and entire command line application as a black box.&lt;/p&gt;&#xA;&lt;p&gt;I have created a text-based adventure game project for my students and I am trying to build an auto-grader. I do not have any web infrastructure and I would prefer to just creating a local application to test students' submissions. I also would like it to be easy enough to students to use to check their work (JUnit doesn't seem to be easily usable outside of an IDE).&lt;/p&gt;&#xA;&lt;p&gt;I am looking to create a program that will attempt to compile a students code and run the game through all the possible paths. I could just build something like this from scratch, but I feel like there should already be some kind of framework to make handling test cases and printing results easy. I haven't found anything outside of web-based services, which isn't what I'm looking for.&lt;/p&gt;&#xA;&lt;p&gt;Is there any library to help with this, or am I better off just making my own grader from scratch?&lt;/p&gt;&#xA;" OwnerUserId="9343" LastActivityDate="2020-07-31T22:21:47.910" Title="Is there a Java library for testing command line applications?" Tags="|java|grading|auto-graders|" AnswerCount="3" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6446" PostTypeId="2" ParentId="6445" CreationDate="2020-07-31T15:37:37.780" Score="0" Body="&lt;p&gt;I doubt that there is such a library, but, depending on what you expect from your students there are things you might be able to build.&lt;/p&gt;&#xA;&lt;p&gt;First, it is possible to compile and run one Java program from another. Here is a page that describes the how to do it: &lt;a href=&quot;https://www.journaldev.com/937/compile-run-java-program-another-java-program&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.journaldev.com/937/compile-run-java-program-another-java-program&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once you can do that, you can, perhaps, read a set of regular expression patterns from a file and match them against what the student program produces using the Pattern class.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-07-31T15:37:37.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6447" PostTypeId="2" ParentId="6445" CreationDate="2020-07-31T16:31:54.567" Score="3" Body="&lt;p&gt;There is &lt;code&gt;expect&lt;/code&gt;. It is designed to test interactive command-line systems. For non-interactive programs it is easier.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;expect&lt;/code&gt; is not java, but as pointed out in the comments. The language is irrelevant, as the testing is done from the outside.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-07-31T16:31:54.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6448" PostTypeId="2" ParentId="6440" CreationDate="2020-07-31T16:51:28.807" Score="0" Body="&lt;p&gt;If we look at the world of movies. We see that long single takes (cut less scenes) are rear and often talked about. There are hard to do, and slow down the pace of a movie. Consider recording in smaller slices.&lt;/p&gt;&#xA;&lt;p&gt;Next consider that mistakes can improve teaching. If you show your students that you also make mistakes, then you can improve their confidence. When I teach the same class over and over, I get good at it. When doing demonstrations, I have to concisely add in mistakes. I am demonstrating how to program. If I show that I get it correct first time, then I am not showing right.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-07-31T16:51:28.807" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6449" PostTypeId="1" AcceptedAnswerId="6451" CreationDate="2020-07-31T19:57:39.753" Score="4" ViewCount="346" Body="&lt;p&gt;I would like to start volunteering with kids and young teengers in my community by introducing them to programming. I thought teaching them the basics of python would be a good start. I have some experience with teaching in general (but not with teaching kids about programming).&lt;/p&gt;&#xA;&lt;p&gt;Are there any resources that could help me or at least inspire me to make a good curriculum that goes over many concepts with turtle?&lt;/p&gt;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="9347" LastActivityDate="2021-05-23T05:05:05.567" Title="Any good resource for introducing kids to programming using Python's Turtle Graphics?" Tags="|curriculum-design|" AnswerCount="7" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6450" PostTypeId="2" ParentId="6445" CreationDate="2020-07-31T20:04:35.380" Score="1" Body="&lt;p&gt;This answer is based on the using features and commands available in a Linux environment. The basic idea is to use file redirection to feed input to the program under test (&lt;code&gt;PUT&lt;/code&gt;) and collect output, both &lt;code&gt;stdout&lt;/code&gt; and &lt;code&gt;stderr&lt;/code&gt;. This describes a small system that we have used at Colorado State University that I wrote. If anyone is interested, I can supply both the scripts and some documentation. Using them would require modifications on the part of the tester to accommodate location of submissions, etc that are particular to CSU.&lt;/p&gt;&#xA;&lt;p&gt;The basic idea is to execute a single test case, collect its output and assess the result. The test framework is language agnostic as it is used to test programs written in a variety of languages. It is written in &lt;code&gt;bash&lt;/code&gt; and takes advantage of many Linux utilities. A test case consists of a single line of text containing a testName, number of points for the test, and the actual Linux command necessary to run the test. The &amp;quot;language&amp;quot; of the test case has some simple macro capability to make it easy to write multiple test cases easily. For example, the macro &lt;code&gt;$inputFile&lt;/code&gt; is expanded to &lt;code&gt;input/$testName&lt;/code&gt;, and likewise for &lt;code&gt;$output&lt;/code&gt;. The tester creates multiple input files named the same as the testName in the directory &lt;code&gt;input&lt;/code&gt;.The required output redirection is done by the framework, so that the actual command is often as simple as &lt;code&gt;java SomeProgram &amp;lt; $inputFile&lt;/code&gt; or &lt;code&gt;./myprog &amp;lt; $inputFile&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Assessment is done using &lt;code&gt;diff&lt;/code&gt;, comparing the output of the &lt;code&gt;PUT&lt;/code&gt; to that of a master solution. &lt;code&gt;diff&lt;/code&gt; has lots of options to ignore case, white space, etc to loosen up the actual comparison. The master solution's output is collected by simply running the framework and renaming its output as the master. The &lt;code&gt;diff&lt;/code&gt; is presented in a colored side-by-side format as that is easier for the students to understand than a standard &lt;code&gt;diff&lt;/code&gt; output. A student gets no/full points depending on the diff. A typical program has many test cases. Optional post-processing to assess points is possible as is the ability to add in material generated manually.&lt;/p&gt;&#xA;&lt;p&gt;In a complete test, the framework takes test cases from a text file, processed them one by one, and collects all output in a single file. At the completion, the file is post-processed to extract the individual test case scores and prepend them to the raw output. The student sees a total score, individual test case scores and finally the results of each test case.&lt;/p&gt;&#xA;&lt;p&gt;To test the entire class, the framework processes a list of the student ID's from a text file. Each ID corresponds to a directory containing the submission for that student. The submission consists of a &lt;strong&gt;single&lt;/strong&gt; file, though that file is frequently a &lt;code&gt;tar/jar/zip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The actual build of the &lt;code&gt;PUT&lt;/code&gt; is driven by a &lt;code&gt;Makefile&lt;/code&gt;. This may be supplied by the person running the tests or many be a required part of the submission. The framework simple performs a &lt;code&gt;make&lt;/code&gt; and runs the resulting code. Part of the specification of the assignment is the name/class of the executable. For testing scripts, the &lt;code&gt;Makefile&lt;/code&gt; may simply insure that the &lt;code&gt;execute&lt;/code&gt; permission is set.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2020-07-31T22:21:47.910" LastActivityDate="2020-07-31T22:21:47.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6451" PostTypeId="2" ParentId="6449" CreationDate="2020-08-03T20:14:17.573" Score="5" Body="&lt;p&gt;I have found that Python is not the best tool for teaching elementary and middle school students an intro to programming.  Turtle is nice, but you run out of things to do pretty quickly.  If you move on from Turtle to console based coding, many students find it less engaging.&lt;/p&gt;&#xA;&lt;p&gt;Scratch and similar visual languages are much more engaging for younger learners.  You will be surprised how full featured they are.  There is a lot of great algorithmic teaching that you can do with these.&lt;/p&gt;&#xA;&lt;p&gt;If you really want a traditional text-based language, you might check out Greenfoot (for Java).  But again, younger learners get lost in the symbols pretty quickly, so it would not be my first recommendation.  Scratch can be much more intuitive for them.&lt;/p&gt;&#xA;" OwnerUserId="192" LastActivityDate="2020-08-03T20:14:17.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6452" PostTypeId="2" ParentId="6449" CreationDate="2020-08-03T20:23:54.027" Score="2" Body="&lt;p&gt;I concur with Bryan R that Turtle might not be a great choice for an in-depth introduction.  A quick google search for &amp;quot;python turtle lesson plans&amp;quot; reveals that most plans are for one to three lessons, after which, you have pretty much exhausted what Turtle has to offer.&lt;/p&gt;&#xA;&lt;p&gt;There are various paid resources for Python Turtle at &lt;a href=&quot;https://www.teacherspayteachers.com/Browse/Search:python%20turtle&quot; rel=&quot;nofollow noreferrer&quot;&gt;teacherspayteachers&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you are open to a slightly different, more graphical, version of Turtle (called &amp;quot;Tina&amp;quot;), there is a whole book of lesson plans available &lt;a href=&quot;https://nclab.com/wp-content/media/2017/12/Turtle1LessonPlans.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;at nclab&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-08-03T20:23:54.027" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6453" PostTypeId="2" ParentId="1260" CreationDate="2020-08-05T10:31:10.010" Score="1" Body="&lt;p&gt;I can recommend giving your students some tasks from Codility, like this one on &lt;a href=&quot;https://app.codility.com/programmers/lessons/1-iterations/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Iterations&lt;/a&gt; or these ones on &lt;a href=&quot;https://app.codility.com/programmers/lessons/6-sorting/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sorting&lt;/a&gt;. There are several different tasks sorted by topics and a PDF with explanation provided for each topic. Another benefit of those is that your students will have an opportunity to practice for job interview tasks they will face in the future.&lt;/p&gt;&#xA;" OwnerUserId="9359" LastActivityDate="2020-08-05T10:31:10.010" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6454" PostTypeId="1" AcceptedAnswerId="6640" CreationDate="2020-08-05T23:50:14.640" Score="1" ViewCount="80" Body="&lt;p&gt;I hope I'm addressing the right community. I was redirected here from CS.SE. For a project for my students, I need to find some weighted graphs (oriented or not) to benchmark their algorithms (shortest paths, flows...). The idea is for them (and me) :&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;to test their code on small examples (running code with the processor they have between the ears ;-), but not completely trivial,&lt;/li&gt;&#xA;&lt;li&gt;to test their code on a bunch of larger examples (say from 10 to 10000 nodes) to find the complexity from experience, and compare it with what they would expect from their algorithms.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The algorithms I want them to study :&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dijkstra,&lt;/li&gt;&#xA;&lt;li&gt;Bellman-Ford,&lt;/li&gt;&#xA;&lt;li&gt;Floyd-Warshal&lt;/li&gt;&#xA;&lt;li&gt;Ford-Fullkerson (for the good ones).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are a few samples on the companion site of the ALGS4 course from R. Sedgewick (&lt;a href=&quot;https://algs4.cs.princeton.edu/44sp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Shortest Paths&lt;/a&gt;), it could be OK for benchmarking, but I would like some more datas, encoded in this simplest way (or easily convertible). Examples don't have to contain background (I mean, if there is one, it can be interesting, but then I would have to strip the original datas from all the commentaries...).&lt;/p&gt;&#xA;&lt;p&gt;Maybe someone here is aware of some samples and could point me to it.&lt;/p&gt;&#xA;&lt;p&gt;Thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="6121" LastEditorUserId="6121" LastEditDate="2020-08-09T12:02:58.863" LastActivityDate="2020-11-29T22:10:14.480" Title="Dataset colection of weighted graphs" Tags="|graph-theory|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6455" PostTypeId="2" ParentId="6428" CreationDate="2020-08-06T10:18:00.690" Score="3" Body="&lt;p&gt;Programming is very useful in the process of conjecturing, and to some extent even in proofs.&lt;/p&gt;&#xA;&lt;p&gt;Here are some examples from my own research, in theoretical computer science and combinatorics:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;An algorithm for maximum coverage (a basic combinatorial optimization problem) employs a non-standard objective function, with finely tuned parameters. These parameters were obtained by solving a linear problem on a computer. The parameters depend on &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;, so I solved the linear programs corresponding to small &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;, and generalized the solution. The solver also found the tight constraints, and this was very instrumental in the proof.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The construction of the Gelfand–Tsetlin basis for the Johnson scheme (equivalently, a canonical eigenvector basis for the Johnson and Kneser graphs) came out of some experimentation in a computer algebra system; I don't know whether you consider this programming.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Several papers in social choice theory aimed at proving phenomena which were first observed experimentally; this required programming in an efficient language.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Optimal gadgets in a paper in circuit complexity were found by exhaustive search using an efficient computer program.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I would say that programming is a useful skill, at least in certain areas of mathematics.&lt;/p&gt;&#xA;" OwnerUserId="1536" LastActivityDate="2020-08-06T10:18:00.690" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6456" PostTypeId="1" CreationDate="2020-08-06T14:23:01.117" Score="2" ViewCount="259" Body="&lt;p&gt;I am student from CS background and I have Operating Systems in my upcoming semester. A simple search around the internet revealed that that &lt;em&gt;Operating System Concepts&lt;/em&gt; by  &lt;em&gt;Silberschatz&lt;/em&gt; and &lt;em&gt;Galvin&lt;/em&gt; is one of the best ones to follow.&lt;/p&gt;&#xA;&lt;p&gt;Now the above text is probably in its 10th edition currently. Now I won't be able to afford a physical copy of the latest edition, so I was looking around for few cheap used copies and found abundance of &lt;em&gt;5th&lt;/em&gt; edition and few &lt;em&gt;6th&lt;/em&gt; edition texts.&lt;/p&gt;&#xA;&lt;p&gt;Are these two older editions still recommended? If I only want to build my basics and I have no prior knowledge of the above subject. Any help shall be greatly appreciated...&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/uV7Q8.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/uV7Q8.png&quot; alt=&quot;6th edition&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;sub&gt;&lt;i&gt;6th edition&lt;/i&gt;&lt;/sub&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/J8Nct.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/J8Nct.png&quot; alt=&quot;5th edition&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;sub&gt;&lt;i&gt;5th edition&lt;/i&gt;&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2020-08-07T07:11:52.973" Title="Operating System Concepts by Silberschatz and Galvin, how much down the edition timeline can I go to safely understand the core-concept" Tags="|self-learning|resource-request|textbook|operating-systems|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6457" PostTypeId="2" ParentId="6456" CreationDate="2020-08-07T07:11:52.973" Score="4" Body="&lt;p&gt;I don't know this book in particular, but I do know Computer Science text books in general, and offer this advice:&lt;/p&gt;&#xA;&lt;p&gt;Consider the title: &lt;em&gt;Operating System Concepts&lt;/em&gt;. It is about basic and fundamental concepts that underlie operating systems. The basic concepts, the core material of the text, are not going to change much from first edition to the tenth.&lt;/p&gt;&#xA;&lt;p&gt;You are not being asked to study the text in such detail that you would be able to discover the differences between versions.&lt;/p&gt;&#xA;&lt;p&gt;Many computer science books do get out of date. If the book was a user manual for Windows or a iMac then having an up to date one might be important, but I suspect not in this case.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2020-08-07T07:11:52.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6458" PostTypeId="2" ParentId="6449" CreationDate="2020-08-08T14:09:59.893" Score="1" Body="&lt;p&gt;If these kids are true beginners Python is a bit much.  Try Scratch or Alice.  If you really want a line-code language go for Small Basic.  All of these have excellent resources available on their website.  Thunkable and App Inventor can also be a good start if you want to try something different.&lt;/p&gt;&#xA;" OwnerUserId="2476" LastActivityDate="2020-08-08T14:09:59.893" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6459" PostTypeId="1" CreationDate="2020-08-09T19:53:19.843" Score="0" ViewCount="90" Body="&lt;p&gt;Is there any &lt;a href=&quot;https://en.wikipedia.org/wiki/Jackson_structured_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jackson&lt;/a&gt; based IDE for programming?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/g3k9P.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/g3k9P.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I mean, an IDE in which you can place the sentences in sequence from left to right.&lt;/p&gt;&#xA;&lt;p&gt;I am looking for something similar to &lt;a href=&quot;https://sourceforge.net/projects/pseint/&quot; rel=&quot;nofollow noreferrer&quot;&gt;PSeInt&lt;/a&gt; (spanish), although PSeInt has only Flowchart classic and Nassi-Shneiderman, you can put similar programs in the comments.&lt;/p&gt;&#xA;&lt;p&gt;The following is a snapshot of PSeInt with classic flowchart&#xA;&lt;a href=&quot;https://i.stack.imgur.com/m313l.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/m313l.png&quot; alt=&quot;Classic Flowchart&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;And also I have the following example&#xA;&lt;a href=&quot;https://i.stack.imgur.com/QbaD0.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/QbaD0.png&quot; alt=&quot;Classic Flowchart Example 2&quot; /&gt;&lt;/a&gt;&#xA;Also you can convert the chart to a Nassi-Shneiderman chart, which will look as follow&#xA;&lt;a href=&quot;https://i.stack.imgur.com/zmzNU.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/zmzNU.png&quot; alt=&quot;Nassi-Shneiderman Flowchart&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9368" LastEditorUserId="9368" LastEditDate="2022-12-26T02:09:19.777" LastActivityDate="2022-12-26T02:10:28.420" Title="Jackson based IDE for programming" Tags="|programming|ide|gui|graph-theory|flowcharts|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6462" PostTypeId="1" AcceptedAnswerId="6475" CreationDate="2020-08-10T19:48:31.377" Score="6" ViewCount="568" Body="&lt;p&gt;For a beginner&#xA;Is it right to use the concept of hotel room and passenger as an analogy to explain the concept of variable?&lt;/p&gt;&#xA;" OwnerUserId="9368" LastActivityDate="2020-09-04T09:48:13.010" Title="Concept of variable" Tags="|programming|variables|data-types|" AnswerCount="7" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6463" PostTypeId="2" ParentId="6462" CreationDate="2020-08-10T20:18:43.343" Score="2" Body="&lt;p&gt;I think it is a mistake to do this since it ties the &amp;quot;concept&amp;quot; of a variable, which is a language dependent item to an implementation on a certain kind of hardware. Yes, variables are often implemented in such a way, but the concept is independent of any implementation.&lt;/p&gt;&#xA;&lt;p&gt;A computer language creates a self-referential and self-consistent virtual world. It is better that we use metaphors from such a world than from implementations. Also, if students eventually study OO languages or even pointers, they will often get confused by these sorts of descriptions. See the caveat at the end, however.&lt;/p&gt;&#xA;&lt;p&gt;A better metaphor, in my view, is that a variable is a relationship between a &amp;quot;name&amp;quot; and a &amp;quot;value&amp;quot;. The name might be simple (x) or complex (a[i]), but it is still just a name and it &amp;quot;represents&amp;quot; the value. It doesn't &amp;quot;hold&amp;quot; the value, but represents it.&lt;/p&gt;&#xA;&lt;p&gt;Let me try to explain the reason I find this metaphor superior. First, students, in their real lives, understand &amp;quot;names&amp;quot; as representations of things.&lt;/p&gt;&#xA;&lt;p&gt;At a given point in time/space a given name can only &amp;quot;represent&amp;quot; or &amp;quot;stand for&amp;quot; a single thing, though that &amp;quot;thing&amp;quot; might be complex. Buffy is my name here and it represents me. Other places and times Buffy represents other things (dare I say vampire slayers?). So, a variable isn't fixed for all time but can refer to different things at different times. Scopes in programs are a kind of place. The same name can refer to different things in different places. People already understand these things.&lt;/p&gt;&#xA;&lt;p&gt;Also note that &amp;quot;I&amp;quot;, the real world thing, am not &amp;quot;Buffy&amp;quot;. &amp;quot;Buffy&amp;quot; is not &amp;quot;me&amp;quot;, but something that &lt;em&gt;refers&lt;/em&gt; to me.&lt;/p&gt;&#xA;&lt;p&gt;In an OO language, a reference variable is also just a name that &lt;em&gt;refers&lt;/em&gt; to an object. It isn't the object, but a reference. If students already think of names as references then this is much easier to grasp.&lt;/p&gt;&#xA;&lt;p&gt;In a language like C, a pointer variable can also be described this way. Take a declaration like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;int  *ip&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The ip and *ip are just different names for different things. ip refers to one thing and *ip to something else. In fact ip is, itself, a reference to the other thing.&lt;/p&gt;&#xA;&lt;p&gt;Summary:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Names are simple or constructed.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Names refer to things.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A name can refer to one thing at a time, but it can be changed at another time&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A name can refer to one thing in a give place (at a time) but can reference a different thing (simultaneously) in a different place.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is exactly, I think, how names behave in the real world. It is also how variables behave when implemented on current kinds of hardware.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Caveat. If you are teaching implementations, specifically, such as in a compiler course, the hotel room idea is fairly valid, though most hotel rooms can hold more than one thing at a time. So, even there, the metaphor has unfortunate possible misleading consequences.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2020-08-11T22:16:13.170" LastActivityDate="2020-08-11T22:16:13.170" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6464" PostTypeId="2" ParentId="6438" CreationDate="2020-08-11T19:17:30.473" Score="0" Body="&lt;p&gt;Could do worse than check out the CISCO CCNA curriculum for ideas.&lt;/p&gt;&#xA;" OwnerUserId="9370" LastActivityDate="2020-08-11T19:17:30.473" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6465" PostTypeId="2" ParentId="6231" CreationDate="2020-08-11T19:38:33.583" Score="1" Body="&lt;p&gt;I rather agree with Buffy, put simply, my argument is that a more collaborative approach does bear more fruit. Especially if the goal is to show understanding of concepts and a how to put them into practice to solve a common problem. Rather than focusing on an individual’s response, see how they interact and problem-solve in a team utilising all the different skill sets/ levels available in the group. Rather than putting the onus on the students to perform, it instead empowers them to take control of the assignment.&#xA;Isn’t this what we want them to do in the workplace eventually?&#xA;I have found that feedback from the group on how members contributed is fairly consistent with reality. Students were pretty honest and stern in their feedback! I work with 11 to 18 year olds, but I’ve tried the same model with adults with success.&lt;/p&gt;&#xA;" OwnerUserId="9370" LastActivityDate="2020-08-11T19:38:33.583" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6466" PostTypeId="1" CreationDate="2020-08-12T17:07:13.650" Score="0" ViewCount="91" Body="&lt;p&gt;I've taught AP CSP for a few years and am interested in teaching CS50 AP, but I'm having trouble getting started.   The links in the getting started guide at &lt;a href=&quot;https://cs50.harvard.edu/ap/2020/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs50.harvard.edu/ap/2020/&lt;/a&gt; aren't working.&#xA;I've tried to email ap@cs50.harvard.edu, but no response yet.&lt;/p&gt;&#xA;&lt;p&gt;Anybody have a suggestion?  Of course I can use the freely available material, but from a recorded workshop I watched there are tools for teachers that could be useful.&lt;/p&gt;&#xA;" OwnerUserId="786" LastActivityDate="2021-01-29T23:05:10.450" Title="Is CS50 AP available for new teachers for 2020-2021?" Tags="|ap-cs-principles|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6468" PostTypeId="2" ParentId="6462" CreationDate="2020-08-14T13:35:46.490" Score="7" Body="&lt;p&gt;Why complicate matters with contrived analogies like hotel rooms and guests?&lt;/p&gt;&#xA;&lt;p&gt;It is much more straightforward to take the analogy of a simple paper &amp;quot;form&amp;quot; (which absolutely everyone in contact with the Western world has used and understands), and understand that there are spaces or &amp;quot;boxes&amp;quot; on the form which are referred to by names. The person completing the form enters data into those boxes. Additionally, there exists Tippex, and the data in any given box can usually be overwritten - with computers moreso than with paper, overwriting is common. The content of a box - the thing written into it (or the absence of any entry) - is generically called the &amp;quot;value&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The boxes in this paper analogy are the equivalent of computer variables. The declaration of a variable is the equivalent to defining a new box - that is, allocating space on the form and providing that space with an associated name.&lt;/p&gt;&#xA;&lt;p&gt;This analogy of a paper bureaucracy fully extends to all other computer concepts.&lt;/p&gt;&#xA;&lt;p&gt;A function call, for example, is the summoning of another form from the shelf. We transfer certain &amp;quot;input&amp;quot; values from the existing form to this new form. We then perform a set of calculations,.or other administrative operations (like gathering other stored data, searching filing cabinets, etc.), and finally we arrive at a set of &amp;quot;return&amp;quot; values which are transferred back to the existing form, and the &amp;quot;new&amp;quot; form is then thrown in the bin.&lt;/p&gt;&#xA;&lt;p&gt;I often think a serious deficit in modern IT teaching and discourse, is that too few people are taught basic administrative principles and their equivalent implementations using paper.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2020-08-14T13:35:46.490" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6469" PostTypeId="2" ParentId="6462" CreationDate="2020-08-14T22:02:07.367" Score="4" Body="&lt;p&gt;You can also use @Steve paper form idea for a second use, namely the importance of naming. I have often given students a paper form with boxes of different lengths, labeled A, B, C, etc. I then explain that their ability to fill in the form correctly (with information about themselves) will account for 50% of their final grade. Of course, they immediately ask &amp;quot;What goes in each box?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Instead of answering directly, I show them a sample form already filled in. I use values that look like first/last name, but use names which could easily be either a first name or last name (e.g. Thomas/Kelly). Between the names there is a short box containing a single letter A. Middle initial, right! The idea is to demonstrate that even given data values, one is never certain what that value is. The &lt;strong&gt;name&lt;/strong&gt; must convey to the reader what the value is. At the end, I show a form with appropriate labels for each box. For the short box, the label is &amp;quot;Grade I hope to get&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;This can be augmented by taking a short piece of code (I like to use quadratic equation), and obfuscate with names that look like Dr Seuss made up words. I ask them to explain what the code does. It is difficult when the variable names have no meaning in connection to the problem. I explain that their own code will become equally unfathomable unless they choose good names. Furthermore, asking the instructor for help solving a problem will be difficult if the instructor can not read/understand their code.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public class Seuss { // with apologies to Dr Seuss and John Lennon&#xA;&#xA;  public static double snuvs(String s) { return Double.parseDouble(s); }&#xA;&#xA;  public static void main(String[] jlbboo) {&#xA;&#xA;    int lorax=0, quimney=2;&#xA;    double beft, obsk, kweet, zong, lerkim, skirtz;&#xA;&#xA;    beft   = -snuvs(jlbboo[1]);&#xA;    kweet  =  snuvs(jlbboo[quimney]);&#xA;    obsk   =  snuvs(jlbboo[lorax]);&#xA;    zong   =  obsk * quimney;&#xA;    lerkim =  beft * beft;&#xA;    skirtz =  lerkim - zong * kweet / 0.5;&#xA;    beft  /=  zong;&#xA;&#xA;    if (skirtz &amp;lt; lorax)&#xA;      System.out.println(&amp;quot;Imagine the two numbers\nIt's easy if you try&amp;quot;);&#xA;    else if (skirtz == lorax)&#xA;      System.out.println(beft);&#xA;    else {&#xA;      skirtz = Math.pow(skirtz, 1.0/quimney)/zong;&#xA;      System.out.println((beft+skirtz) + &amp;quot;,&amp;quot; + (beft - skirtz));&#xA;    }&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2020-08-16T14:55:07.377" LastActivityDate="2020-08-16T14:55:07.377" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6470" PostTypeId="1" CreationDate="2020-08-17T17:16:39.217" Score="3" ViewCount="196" Body="&lt;p&gt;I'm collecting a list of possible items for grading rubric for a coding assignment. Below is a start. Is this complete, or am I missing important criteria? I welcome other ideas.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Effectiveness&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Runs without errors&lt;/li&gt;&#xA;&lt;li&gt;Passes all unit tests&lt;/li&gt;&#xA;&lt;li&gt;Handles all typical cases&lt;/li&gt;&#xA;&lt;li&gt;Handles common edge cases&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Elegance&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Uses language idioms&lt;/li&gt;&#xA;&lt;li&gt;Selects correct data structures&lt;/li&gt;&#xA;&lt;li&gt;Select correct built-in functions&lt;/li&gt;&#xA;&lt;li&gt;Uses packages appropriately&lt;/li&gt;&#xA;&lt;li&gt;No unnecessarily repeated work&lt;/li&gt;&#xA;&lt;li&gt;No unnecessary hard coding&lt;/li&gt;&#xA;&lt;li&gt;Can scale well with potentially large inputs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Readability&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Clear, semantic naming&lt;/li&gt;&#xA;&lt;li&gt;A single lines only contains a single idea&lt;/li&gt;&#xA;&lt;li&gt;No unnecessary variables&lt;/li&gt;&#xA;&lt;li&gt;Style always follows conventions&lt;/li&gt;&#xA;&lt;li&gt;Consistent formatting/indentation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Documentation&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All modules have a docstring&lt;/li&gt;&#xA;&lt;li&gt;All functions have a docstring&lt;/li&gt;&#xA;&lt;li&gt;Each line has a comment&lt;/li&gt;&#xA;&lt;li&gt;All documentation are meaningful and complete thoughts&lt;/li&gt;&#xA;&lt;li&gt;All documentation are formatted consistently according style guidelines&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8455" LastEditorUserId="27" LastEditDate="2020-08-18T18:58:08.863" LastActivityDate="2021-06-02T10:43:46.350" Title="Items on grading rubric for a coding assignment" Tags="|assessment|" AnswerCount="2" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6471" PostTypeId="1" AcceptedAnswerId="6474" CreationDate="2020-08-17T19:09:37.827" Score="9" ViewCount="2354" Body="&lt;p&gt;In the past students have submitted hardcopy of the programs and output for grading (electronic version was also supplied if I wanted to run the programs).&lt;/p&gt;&#xA;&lt;p&gt;I always annotated and graded the source listing and associated output on the paper copies that I then returned to students in class. Now with COVID-19 and teaching all online, I will only have Canvas submissions, and I am able/willing to print them as needed, but no way to get feedback/hardcopy easily back to students. This is particularly important for my CS I students.&lt;/p&gt;&#xA;&lt;p&gt;What are you all doing with regard to this? Annotating paper is the most time efficient way for me to do this. I had one colleague last spring who took images of all the grading and then uploaded a set of .jpgs for each student - a ridiculously time consuming process that she gave up on soon.&lt;/p&gt;&#xA;&lt;p&gt;Scribbling on source code, circling sections etc is what I'd like to do.&lt;/p&gt;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Please note that this is mostly for my CS 1 course - many of these students will not have had any programming experience. They will struggle enough with the basics of Eclipse and Java - so I don't necessarily want to burden them with extra technical demands.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="433" LastEditDate="2020-08-19T00:34:13.390" LastActivityDate="2020-08-19T17:24:41.683" Title="Grading source code in an online environment" Tags="|programming|grading|assessment|online|" AnswerCount="5" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="6472" PostTypeId="2" ParentId="6471" CreationDate="2020-08-17T19:27:10.577" Score="7" Body="&lt;p&gt;It has never occurred to me to use printouts of code, even though I have an older colleague who does this.  To me, it seems a little odd as an approach and inefficient.&lt;/p&gt;&#xA;&lt;p&gt;That said, if you wish to have a similar workflow digitally, you might want to consider using a tablet computer with a pen, Microsoft OneNote, and then saving the final output as a PDF.  This will allow you to draw, scribble, and write freely on their submitted code.  As a side benefit, you'll also be able to put in links, pictures, or other diagrams, assorted and sundry as you find useful.&lt;/p&gt;&#xA;&lt;p&gt;Typically, I provide feedback either in bullet points or side-by-side in person (&amp;quot;in person&amp;quot; in this context means using screen share in Zoom).&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-08-17T21:20:56.743" LastActivityDate="2020-08-17T21:20:56.743" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6473" PostTypeId="2" ParentId="6471" CreationDate="2020-08-17T20:32:07.617" Score="3" Body="&lt;p&gt;If you can create PDF files (as you indicated in comments) you can use Adobe Acrobat Reader (the free one) to add comments from a keyboard into the code and save it. This is what I use for most student work, listings, dissertations and so on. You can save it and re-upload to the VLE or whatever feedback mechanism being used.&lt;/p&gt;&#xA;&lt;p&gt;Of course, if you have a tablet device or even a sketching pad attached to a desktop you can add more freehand annotations in the old style.&lt;/p&gt;&#xA;&lt;p&gt;However, I have moved from annotating code for a more test-based development mechanism for giving coding feedback. The students now have to run the test scripts I write and upload the results rather than the code at intermediate stages for formative feedback. I only feedback on the code at the summative stage. I find that, with &amp;gt;250 students, I need to let the computer do more of the work whilst still trying to give some form of helpful information to the students.&lt;/p&gt;&#xA;&lt;p&gt;There are, of course, pricier tools specifically designed for scribbling that others may mention.&lt;/p&gt;&#xA;&lt;p&gt;Another way of doing things is to interact with the students' actual code base and not a listing, using something like Visual Studio Live Code Share. This give feedback at the actual point where they start to deviate from common sense. Some colleagues are doing this technique.&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="1314" LastEditDate="2020-08-19T08:10:18.977" LastActivityDate="2020-08-19T08:10:18.977" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6474" PostTypeId="2" ParentId="6471" CreationDate="2020-08-18T09:33:23.533" Score="14" Body="&lt;p&gt;I would suggest you use a code review tool. This is something they will likely need to be using when working in industry. So worth upskill them on it now.&lt;/p&gt;&#xA;&lt;p&gt;You can use githubs one for free.&#xA;(You are teaching version control so that should be easy enough)&lt;/p&gt;&#xA;&lt;p&gt;Get your students to create a pull request and review that.&lt;/p&gt;&#xA;&lt;p&gt;You can highlite specific lines and put comments against them etc.&lt;/p&gt;&#xA;" OwnerUserId="2152" LastActivityDate="2020-08-18T09:33:23.533" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6475" PostTypeId="2" ParentId="6462" CreationDate="2020-08-18T12:57:22.377" Score="5" Body="&lt;p&gt;The use of an analogy is to provide a familiar jumping-off point to introduce something new. Since variables are unique features of computing systems, different from how anything else in the universe functions, we need some way to cross the gap. Let's look at how useful the analogy of hotel room and guest is, bearing in mind that most analogies do not survive contact with the students, for more than a few minutes.&lt;/p&gt;&#xA;&lt;p&gt;The essential feature of this analogy is that you have a fixed thing, the room, which can have different contents: varying guests over time. Good. The very first thing out of a student's mouth&#xA;(or keyboard) is likely to be: &amp;quot;can there be multiple guests in a room?&amp;quot; Hooray! Thinking! This was the objective.&lt;/p&gt;&#xA;&lt;p&gt;Yes, you could use a One Dimensional Array (please do not call it a vector, which means something quite different to most students), or you could use a List. Quick explanation there...&lt;/p&gt;&#xA;&lt;p&gt;Next idea: There is more than one room in most hotels! If you look at the building from outside, you see a two dimensional array of rooms, usually. The analogy hardly even needs for this idea to be broached, it just falls right out of the image. So, yes: a computer is basically a vast rectangle of boxes to put values in. Modern computers allow for different sized and shaped boxes, and even on-the-fly shapes like something conveyed with XML.&lt;/p&gt;&#xA;&lt;p&gt;Hotel rooms have identifying information. In retreat centers, the rooms can have names, often the names of flowers or something. For computers -- which are essentially mathematical -- we just use numerical addresses. But names are so handy, so we layer those on top. We can define any old names for our any old arrangement of any sized boxes.&lt;/p&gt;&#xA;&lt;p&gt;Now the analogy runs out of steam (or gasoline, or battery, or protons...) and we have introduced the subject in a way that students can visualize and therefore, hopefully let go of the nuts in the Southeast Asian Monkey Trap and move on. Some one of them might &lt;a href=&quot;https://www.goodreads.com/author/quotes/14525.Ram_Dass?page=5&quot; rel=&quot;noreferrer&quot;&gt;&amp;quot;continue writing the figure '1' &amp;quot;&lt;/a&gt; and you have another Ramanujan on your hands, but it is unlikely.&lt;/p&gt;&#xA;&lt;p&gt;In 8th grade, over 40 years ago, my math teacher wheeled a Teletype to the front of the room and proceeded to explain about computer memory and variables, and then we connected to the School System's computer (the Police Department had one too, it was pretty exciting) and we created simple programs and stored them on paper tape. The essential facts about computers have not changed, because they can't.&lt;/p&gt;&#xA;&lt;p&gt;The other answers made good points about naming and paper forms, so those should be mentioned also. But computers, variables, programs... are not like anything else, and that is why we have them, otherwise we would just have the other things instead. Because computers are so singular and incredible, we need to explain how they &lt;em&gt;actually work&lt;/em&gt;, not paper over that. A construction worker who could only pick out wallpaper would not be much use when it came to building walls, putting in wiring and plumbing and so on.&lt;/p&gt;&#xA;&lt;p&gt;And because those who do not learn from the history of computer system development are doomed to wander in the wilderness for 40 years. Other people have made a lot of the mistakes for you! Learn why they made those mistakes. Most likely, it is because they took some fixed idea they had too far, and couldn't make themselves agree with other people about stupid things like big-endian vs little-endian, which should never have been a thing. If you pick up the analogy by the pointy end, you can get fatally bitten by it.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2020-08-18T13:04:13.587" LastActivityDate="2020-08-18T13:04:13.587" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6476" PostTypeId="2" ParentId="6471" CreationDate="2020-08-19T02:29:31.973" Score="2" Body="&lt;p&gt;You can try PDF Viewer Pro by PSPDFKit, saw it in the top list on iOS App Store a few days back, looks like it does what you need. I say iPad because I think it allows you easier to create circles and lines than using a mouse on a notebook.&lt;/p&gt;&#xA;" OwnerUserId="9400" LastActivityDate="2020-08-19T02:29:31.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6477" PostTypeId="2" ParentId="6440" CreationDate="2020-08-19T12:23:37.993" Score="5" Body="&lt;p&gt;For high-stakes presentations, I suggest writing a script. 1 page of well-spaced A4 reads back at ~3 minutes and allows you to get your points across clearly and concisely, especially points that need to be well-phrased.&lt;/p&gt;&#xA;&lt;p&gt;This should enable you to do a one-take presentation on Zoom or OBS.&lt;/p&gt;&#xA;&lt;p&gt;If you baulk at writing a presentation, record yourself, transcribe it (I think that’s built into Word on a Mac) then tidy it up. If you are like me, that will involve deleting many instances of the word “arm”.&lt;/p&gt;&#xA;" OwnerUserId="9403" LastActivityDate="2020-08-19T12:23:37.993" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6478" PostTypeId="1" CreationDate="2020-08-19T16:32:29.397" Score="1" ViewCount="64" Body="&lt;p&gt;I'd like to move to mastery-based grading and have drafted a set of rubrics for my undergraduate computer architecture class. I am having trouble with the one for computer arithmetic, which includes two's complement and IEEE floating-point formats. I have the following criteria:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Converting between decimal and two's complement, including&#xA;identifying the largest and smallest numbers&lt;/li&gt;&#xA;&lt;li&gt;Comparing two's complement numbers&lt;/li&gt;&#xA;&lt;li&gt;Understanding two's complement limitations (carry into and borrowing from the sign bit)&lt;/li&gt;&#xA;&lt;li&gt;Converting between decimal and IEEE floating-point formats, including identifying the largest and smallest numbers (not counting&#xA;special values).&lt;/li&gt;&#xA;&lt;li&gt;Comparing floating point numbers&lt;/li&gt;&#xA;&lt;li&gt;Understanding floating point limitations (underflow, overflow, range limits, precision limits)&lt;/li&gt;&#xA;&lt;li&gt;Choosing best numeric representation, given range, accuracy, and performance requirements&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I am concerned that there are too many critiera. (Not shown are the ratings for different levels of proficiency.)  It also raises the question of how a student shows they know how to, say, convert between decimal and two's complement. Do I keep testing them until they show me one successful conversion in each direction, or do they have to demonstrate that they can consistently do so? Is this too trivial of a skill to test, given that they'll forget the details, which aren't really important, five minutes after the test?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-08-22T22:22:13.137" Title="Creating a rubric for computer arithmetic" Tags="|undergraduate|grading|number-system|floating-point|twos-complement|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6479" PostTypeId="5" CreationDate="2020-08-19T16:44:55.777" Score="0" Body="" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2020-08-19T16:44:55.777" LastActivityDate="2020-08-19T16:44:55.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6480" PostTypeId="4" CreationDate="2020-08-19T16:44:55.777" Score="0" Body="Concerning the two's complement representation of signed integers. This includes understanding the representation, range, and risk of overflow (carrying into or borrowing from the sign bit) and low-level operations on two's complement numbers. It would not include ordinary use of integers in high-level languages unless range, size, and overflow are concerns." OwnerUserId="283" LastEditorUserId="283" LastEditDate="2020-08-19T16:44:55.777" LastActivityDate="2020-08-19T16:44:55.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6481" PostTypeId="2" ParentId="6471" CreationDate="2020-08-19T17:24:41.683" Score="2" Body="&lt;p&gt;Note this answer does assume a batch scanner is available.&lt;/p&gt;&#xA;&lt;p&gt;If you insist on working with printed pages, you could prevent doing (much) manual work returning the files if you either:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Keep track of the order of the printed files, correct them, put them in a batch scanner and automatically return the corrected files. Though I could imagine this is not an option due to risk of mixing files due to scanner/printing glitches.&lt;/li&gt;&#xA;&lt;li&gt;Another option could be to print a qr code on the page,print the pages, correct the pages put the corrected papers back into a batch scanner, and process the images using a qr decoder to allocate the files accordingly, this way you are (almost, depending on how good the qr scanner is) certain that the correct corrected papers are returned to the right students. You could also get a notification on the papers that were not scanned correctly since you know how many you printed and hence should scan.&lt;/li&gt;&#xA;&lt;li&gt;If you don't want to be searching for a place to put the qr code in their paper, you could give the students a latex template, or convert their code into a latex template with a qr code belonging to their study number.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;In my experience &lt;code&gt;pyzbar&lt;/code&gt; can be a bit tedious to set up but I found it to practically work identifying qr codes in printed- and scanned pages. Not claiming this is the best solution, I think there would be easier solutions and like DarcyThomas answer better.&lt;/p&gt;&#xA;" OwnerUserId="9405" LastActivityDate="2020-08-19T17:24:41.683" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6482" PostTypeId="1" AcceptedAnswerId="6513" CreationDate="2020-08-20T00:41:12.293" Score="5" ViewCount="210" Body="&lt;p&gt;I would like to teach my software engineering students &lt;code&gt;git&lt;/code&gt; and to introduce key ideas in a presentation. Creating slides from scratch does not seem like a good use of time, since there are probably better ones already out there that I could use. I have found PDFs of presentations, but they are not editable, and I do not know their license. I am not interested in materials specific to a given site, such as GitHub or GitLab. I would like to find high-quality slides (in PowerPoint, Google Slides, or some other standard format) that I can freely edit and use.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-09-01T20:49:31.043" Title="Where can I find high-quality editable slides for teaching git?" Tags="|resource-request|git|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6484" PostTypeId="2" ParentId="6482" CreationDate="2020-08-22T03:55:21.597" Score="1" Body="&lt;p&gt;I know of no freely/commercially available presentations, but I do know of a site that feels a lot like a presentation as you use it: &lt;a href=&quot;https://learngitbranching.js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learn Git Branching&lt;/a&gt;. It's interactive and gives a hands-on intro to the most basic git features as it explains them. Plus, everything is visualized in real-time, so you and your students get instant feedback on what the command did to the pretend repo.&lt;/p&gt;&#xA;&lt;p&gt;My thought is that you could either use that site in front of your students (or perhaps just use git itself and some sample files), or you could have your students use the site and follow along with you.&lt;/p&gt;&#xA;&lt;p&gt;Honestly, from my own experience, that site (along with using git on small practice projects) was exponentially more educational/memorable than &lt;em&gt;any&lt;/em&gt; presentation I've seen so far at my university, or found online. I don't just agree that making your own presentation would be a waste of your time, but I think you should consider a different format all together. Git, just like programming, is better learned through doing.&lt;/p&gt;&#xA;" OwnerUserId="6113" LastActivityDate="2020-08-22T03:55:21.597" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6485" PostTypeId="1" CreationDate="2020-08-22T13:37:06.060" Score="3" ViewCount="73" Body="&lt;p&gt;I am looking for advice for September with a new format for our daily schedules for high school CS.&lt;/p&gt;&#xA;&lt;p&gt;As part of my board's grade 9-12 return to school plan, students will be in one of 3 cohorts of a class.  They will take two courses at a time over 10 weeks.  Daily class time is greater than normal, whether in school or online.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cohort A &amp;amp; cohort B alternate coming to school and working &lt;em&gt;synchronously&lt;/em&gt; online&lt;/li&gt;&#xA;&lt;li&gt;cohort A &amp;amp; B also alternate which course (of their 2) that they attend when they are at school.  A cohort only attends one course per day at school&lt;/li&gt;&#xA;&lt;li&gt;cohort C is online only&lt;/li&gt;&#xA;&lt;li&gt;when one cohort is in class, the other two are designated to be online doing &lt;em&gt;synchronous&lt;/em&gt; learning.&lt;/li&gt;&#xA;&lt;li&gt;cohorts are all in the same class/section&lt;/li&gt;&#xA;&lt;li&gt;over a 4 week sample, a student in cohort A would have a day focused on their CS class for 5 days in class, and for 5 days online. The other 10 school days would be for another class.  They are spaced out in what seems like a sporadic way&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Looking for advice on program delivery from any angle.  Course format, assessment, student communication, and related tools.&lt;/p&gt;&#xA;&lt;p&gt;I am having a hard time visualizing anything other than treating it like an online course where some days some of the students happen to be in the same room as me.&lt;/p&gt;&#xA;" OwnerUserId="695" LastEditorUserId="58" LastEditDate="2021-04-11T13:32:29.573" LastActivityDate="2021-04-11T13:32:29.573" Title="Teaching in class and online cohorts CS" Tags="|assessment|lecture-tools|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6486" PostTypeId="2" ParentId="6470" CreationDate="2020-08-22T13:38:50.690" Score="5" Body="&lt;p&gt;So, if I were reading code, I would object if someone submitted code with every line commented.  I am not aware of any professional code that does this, and when I occasionally receive code from students where this is done, it is simply cluttered.  I believe that the real criteria here is clarity.  Excellent variable naming will often accomplish this sans comments.&lt;/p&gt;&#xA;&lt;p&gt;Consider:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;if ( maxSoFar &amp;lt; currentValue )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;vs&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;if ( maxSoFar &amp;lt; currentValue ) // Find out if the maximum is less than the current value&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Truly, the comment adds nothing to the code here.  As a practical matter, it has been my experience that over-commenting makes my students work difficult to grade by reducing the clarity.&lt;/p&gt;&#xA;&lt;p&gt;Unrelatedly, a missing criterion is having a run-time appropriate to the desired algorithm.&lt;/p&gt;&#xA;&lt;p&gt;As a practical matter, you may find this rubric difficult to grade with. You will need to give careful attention to weights, and to how those weights will actually be evaluated.  (e.g. in a 3-point category, what sort of work would grant 3 points, what would grant 2 points, and what would grant 1 point?)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-09-22T03:13:32.233" LastActivityDate="2020-09-22T03:13:32.233" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6487" PostTypeId="2" ParentId="6462" CreationDate="2020-08-22T15:11:46.017" Score="4" Body="&lt;p&gt;Using labels as a metaphor over boxes has merit and has been examined.&lt;/p&gt;&#xA;&lt;p&gt;This post looks at it from an early learner standpoint:&#xA;&lt;a href=&quot;https://www.felienne.com/archives/6063&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.felienne.com/archives/6063&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;There is a good post on this here that is more technical.&#xA;&lt;a href=&quot;https://hellokangning.github.io/post/variables-are-labels-not-boxes/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://hellokangning.github.io/post/variables-are-labels-not-boxes/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;When looking at the strength of the metaphors to their &amp;quot;real life&amp;quot; examples:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;labels apply to one thing, boxes can contain many things&lt;/li&gt;&#xA;&lt;li&gt;if you have a named box, you already applied a label to a box that may contain a thing&lt;/li&gt;&#xA;&lt;li&gt;a thing can have many labels applied (aliasing) whereas a thing can only be in a single box&lt;/li&gt;&#xA;&lt;li&gt;applying a new label does not remove an old label, putting something in a new box should take it out if the old box (it doesn't here though)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="695" LastActivityDate="2020-08-22T15:11:46.017" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6488" PostTypeId="2" ParentId="6478" CreationDate="2020-08-22T22:22:13.137" Score="1" Body="&lt;p&gt;I missed this question!&lt;/p&gt;&#xA;&lt;p&gt;I will attempt to provide feedback in parts:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I am concerned that there are too many critiera.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I don't understand the reason for this concern, so I cannot comment upon it. The criteria seem reasonable to me.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;It also raises the question of how a student shows they know how to, say, convert between decimal and two's complement. Do I keep testing them until they show me one successful conversion in each direction, or do they have to demonstrate that they can consistently do so?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I would personally be happy with a one-time demonstration within my own classroom (see below)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is this too trivial of a skill to test, given that they'll forget the details, which aren't really important, five minutes after the test?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think it's perfectly acceptable to explain to students that you are asking them to learn a skill that you expect will be temporary (converting a floating point number to IEEE) in order to help them get their heads around a deeper, more profound understanding that you hope will be permanent and intuitive (e.g. the general nature of floating point in practical computation).&lt;/p&gt;&#xA;&lt;p&gt;In my classroom, I have students reproduce proofs with a similar explanation. I explain that, after &lt;em&gt;memorizing&lt;/em&gt; a proof and reproducing it for me, I do not imagine that they will be able to reproduce it again 5 years later.  But I expect that they will come to understand the structure of the proof well enough that the next time they encounter such a structure, they won't be immediately lost, and I also expect that they will roughly remember that the fact that they proved is, itself, true.&lt;/p&gt;&#xA;&lt;p&gt;In this case, while none of your students will presumably remember, give years out, exactly how to figure out what the least significant bit would be in an IEEE representation, you can expect that the students will (long term!) remember the tiered nature of the IEEE structure, and the broad-strokes, general elements of what it stores.&lt;/p&gt;&#xA;&lt;p&gt;I think those are good and sufficient goals, and I think that the students will be okay with learning it as long as you break down the expected long-term benefits of the short-term learning.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-08-22T22:22:13.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6491" PostTypeId="2" ParentId="6485" CreationDate="2020-08-26T14:20:09.670" Score="2" Body="&lt;p&gt;I am in an almost identical situation to you, and I suspect that many, many CS teachers around the world are in similar boats right now.&lt;/p&gt;&#xA;&lt;p&gt;I think you're right about the fundamental truth of it; you cannot keep different students coordinated if they do different things, and you cannot have them do the same thing unless the online-only cohort can also participate.  This leaves us with the sole (unappealing) option to treat everything like distance learning.&lt;/p&gt;&#xA;&lt;p&gt;That doesn't mean that there are &lt;em&gt;no&lt;/em&gt; advantages to the new arrangement!&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The kids who will be with you in person will be able to easily and directly ask you questions.&lt;/li&gt;&#xA;&lt;li&gt;The kids in front of you will also be easier for you to informally poll if you want to check in and make sure that what you're saying isn't losing the majority of the people.  (When I say &lt;em&gt;informally poll&lt;/em&gt; I also mean to just scan your eyes around the room, and use your teacher-instinct to see whether many kids seem lost.  This was very hard to do during purely online education.)&lt;/li&gt;&#xA;&lt;li&gt;Some kids were getting lost during purely virtual instruction, and having them in person some of the time will give you a chance to talk to them face to face, and hopefully to reel those students back in.  I suspect that coming in to school at least some of the time will make the entire thing seem more real, both for you and for the students.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If your in-class kids each have an electronic device, you should make sure that they have headphones to avoid audio feedback issues.  If they don't all have devices at school, you may need to do some photocopying, or &amp;quot;play&amp;quot; your materials at them from the front of the room.&lt;/p&gt;&#xA;&lt;p&gt;Here's to hoping that this whole mess is very temporary.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-08-26T14:20:09.670" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6492" PostTypeId="2" ParentId="6462" CreationDate="2020-08-27T14:18:49.333" Score="2" Body="&lt;p&gt;I have to teach basic computer skills, applications and using online platforms in advance of programming this year.&lt;/p&gt;&#xA;&lt;p&gt;Since I will do some Spreadsheet work, I plan to initially use a cell to demonstrate an example of a variable...&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It has a (cell) reference (which can be changed to something with semantic meaning)&lt;/li&gt;&#xA;&lt;li&gt;It has a value (including Null/None/&amp;quot;nothing&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;this value has a &amp;quot;type&amp;quot; or &amp;quot;class&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;There can be sub-classes (number is parent to int and decimal etc) and different langs define these differently&lt;/li&gt;&#xA;&lt;li&gt;Another cell can reference that variable by it's reference&lt;/li&gt;&#xA;&lt;li&gt;As @TooManyCooks indicates, it is possible to demonstrate aliasing with a named cell (something I had not thought of)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We can reference a cell with a formula in it- this formula may represent a function which &amp;quot;takes in&amp;quot; something (perhaps) and &amp;quot;returns&amp;quot; something...&#xA;We can link sheets, so a variable can refer to something that &amp;quot;lives&amp;quot; in another tab, or file, or image or web address... thus variables refer to other &amp;quot;things&amp;quot; or &amp;quot;objects&amp;quot; which can be... anything (in theory).&lt;/p&gt;&#xA;&lt;p&gt;These ideas relate to what @Steve and @Buffy have already identified.&lt;/p&gt;&#xA;&lt;p&gt;I've been thinking that &lt;strong&gt;some&lt;/strong&gt; concepts of functional programming are present in Spreadsheets, and &lt;strong&gt;some&lt;/strong&gt; OOP concepts are present in Database... since I have to teach both in advance of programming this year, perhaps these concepts can be conveyed in advance.&lt;/p&gt;&#xA;&lt;p&gt;Another useful tool may be the &lt;a href=&quot;http://www.pythontutor.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;visualizer&lt;/a&gt; as this will let you &amp;quot;see&amp;quot; it in action using a range of languages.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/v01Kq.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/v01Kq.png&quot; alt=&quot;Multi-language visualizer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Again you can see the variable has a type, reference, value etc.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/pezkE.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/pezkE.png&quot; alt=&quot;Variables have a value, type etc.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hope that this might prove useful or prompt other ideas in addition to all of the fine suggestions already provided.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2020-09-04T09:48:13.010" LastActivityDate="2020-09-04T09:48:13.010" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6493" PostTypeId="1" CreationDate="2020-08-28T14:54:44.757" Score="3" ViewCount="85" Body="&lt;p&gt;Is anyone aware of freely available KANBAN materials that can help students (and myself!) reinforce the key concepts?  I understand that the main concepts are not actually that complicated.  Ideally, I'm looking for worksheets or activities that can be done to bolster understanding before my students begin year-long group projects that will utilize the method.&lt;/p&gt;&#xA;&lt;p&gt;It would be a wonderful extra bonus if the materials helped point the way around traps that beginners to the process might fall into.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-08-31T07:57:16.050" Title="KANBAN materials" Tags="|soft-skills|agile-development|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6494" PostTypeId="2" ParentId="6493" CreationDate="2020-08-29T18:58:06.570" Score="3" Body="&lt;p&gt;I have found &lt;a href=&quot;https://trello.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;trello&lt;/a&gt; quite a good tool to communicate the ideas of Kanban in class.  You can do an example in class of &amp;quot;To do&amp;quot; &amp;quot;In progress&amp;quot; and &amp;quot;Complete&amp;quot; for a very simple version of the board... decide how to assign tasks to people/ allow people pull tasks, color code for a category or priority, add weightings (effort/time) and deadlines/targets... all very easy to use.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/C8cUJ.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/C8cUJ.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;There are also plugins that can enhance the use of trello such as&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Kanban WIP for Trello&lt;/li&gt;&#xA;&lt;li&gt;Trello Folds (Kanban for Trello)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There is a full tutorial &lt;a href=&quot;https://blog.trello.com/kanban-data-nave&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; that you will find useful as a resource and as a guide.  Play with it, try it out and see what you think.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2020-08-29T19:25:54.613" LastActivityDate="2020-08-29T19:25:54.613" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6495" PostTypeId="1" AcceptedAnswerId="6496" CreationDate="2020-08-30T00:27:19.393" Score="26" ViewCount="4324" Body="&lt;p&gt;I have a background of 20+ years professional coding, but my heart is really in teaching. About three years ago, I started tutoring ages grade 6 through adult in coding topics.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;introduction to coding in Python or Java&lt;/li&gt;&#xA;&lt;li&gt;AP CS A help&lt;/li&gt;&#xA;&lt;li&gt;for independent students, long-term projects like an role-playing game&lt;/li&gt;&#xA;&lt;li&gt;competitions (CodeWars, US Computing Olypiad)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I like my code to be simple and comprehensible, with the feeling of confidence that it works... a simple thought process by which I can understand (and anyone can understand) what my code does.&lt;/p&gt;&#xA;&lt;p&gt;So I teach that. I teach breaking things into encapsulated sections, I teach testing and debugging techniques.&lt;/p&gt;&#xA;&lt;p&gt;I also teach how to make use of your brain better and work smart, not hard.&lt;/p&gt;&#xA;&lt;p&gt;Several of my students have been with me for three years, and they've all grown a lot, and they're a pleasure to work with because they picked up this clean thought style.&lt;/p&gt;&#xA;&lt;p&gt;But... is this the only approach to teaching? Is it the best approach?&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that most of my students aren't going to be professional coders. Keep in mind that I'm a bit obsessive and probably could stand to lighten up a little and let my students work in whatever way they would like.&lt;/p&gt;&#xA;&lt;p&gt;Recently a student came to me, interested in doing US Computing Olympiad problems. The thing is, he had barely learned anything about coding. He had a little Java knowledge, but was weak on creating classes and really didn't even understand how to use functions. I suggested that we work on fundamentals and he balked - from his point of view, you didn't need functions to solve these problems, and he had searched the web for other solutions and none of them used functions. (All the code is in main())&lt;/p&gt;&#xA;&lt;p&gt;At first I figured he was in for a disappointment when he realized these problems were over his head. Well, shiver me timbers, he has solved about 10 problems so far using this technique. I can't even figure out what his code is doing or why it should work.&lt;/p&gt;&#xA;&lt;p&gt;He doesn't do testing even! He just submits his code and keeps tweaking it until it passes the online judge test cases.&lt;/p&gt;&#xA;&lt;p&gt;So I finally said that consider it a limitation on my part, I'm only really able to work in my normal method and that if he really doesn't want to do things my way, he has to find a tutor who can work with him like this.&lt;/p&gt;&#xA;&lt;p&gt;Finally there came a reason why he's interested in me and my methods - he did see that it would be useful to test and debug, and he did find a few USACO solution online that used functions and classes, so now he has a mild interest in learning that from me.&lt;/p&gt;&#xA;&lt;p&gt;I guess what I'm asking then, is when you are mentoring someone, how do you negotiate this balance between &amp;quot;teaching them clean work&amp;quot; and &amp;quot;let them work in the method most natural to them&amp;quot;?&lt;/p&gt;&#xA;" OwnerUserId="9246" LastEditorUserId="204" LastEditDate="2020-08-31T07:24:54.147" LastActivityDate="2020-09-02T04:11:24.130" Title="When mentoring individuals, teach clean coding and simple/effective thinking or let them do it their way?" Tags="|java|algorithms|" AnswerCount="11" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6496" PostTypeId="2" ParentId="6495" CreationDate="2020-08-30T03:30:40.900" Score="36" Body="&lt;p&gt;As someone who has now taught CS for many years, let me first reassure you that teaching clear, clean coding is entirely worthwhile. I think this is &lt;em&gt;especially&lt;/em&gt; true for those who will not go off into software professionally, because editing, and being able to express ideas in a clean, clear manner is a skill that serves people well in any field.  (I've written a bit about &lt;a href=&quot;https://cseducators.stackexchange.com/a/132/27&quot;&gt;my approach to teaching good coding style&lt;/a&gt; before on this site.&lt;/p&gt;&#xA;&lt;p&gt;Now, USACO is something a bit different. These competitive programming situations are designed for coding speed, program speed, and correct output.  You get no points for maintainable code, clear thinking, or reasonable variable names.  These contests can be great learning experience as long as the student understands that they are getting intense (and good!) practice on only one small piece of a larger puzzle.  I would definitely try to contextualize this for the student, though I caution you that you may never win over this particular student. He may have already become somewhat set in his thinking.&lt;/p&gt;&#xA;&lt;p&gt;Here's something silly you can do to attempt to demonstrate the value of clean code to the student: take some nice, clean code for a USACO-style problem and introduce an obvious edge-case bug that crashes the program (an array out of bounds or somesuch).  Refactor it to give it USACO-style names, like &lt;code&gt;m&lt;/code&gt; and &lt;code&gt;pf&lt;/code&gt;. Shove everything into &lt;code&gt;main&lt;/code&gt;.  Make sure that there are no strings to make obvious what the program is supposed to do.  Reverse loop styles to make them less appropriate (i.e. switch &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;).  Screw up the indentation. Generally make a mess of it.  Have fun!&lt;/p&gt;&#xA;&lt;p&gt;Print out your spaghetti onto physical paper and ask the kid to find the bug. You can even tell him the type of bug. Tell him he had 10 minutes.  At the end, ask him what the whole thing does.&lt;/p&gt;&#xA;&lt;p&gt;Then give him the original version, with clean names, good use of functions, comments to explain what the functions do, and generally clean design. Ask him to find the bug again, and ask him what the code does.&lt;/p&gt;&#xA;&lt;p&gt;Now tell him that he's just been hired to maintain hundreds of thousands of lines of buggy code that someone else made.  If the code all looked like the first example, how long would he give it before he quit that job?&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-09-01T12:17:18.057" LastActivityDate="2020-09-01T12:17:18.057" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6497" PostTypeId="2" ParentId="6495" CreationDate="2020-08-30T09:58:04.187" Score="3" Body="&lt;p&gt;Learning is like searching for a treasure hidden in the forest. The teacher can teach to use tools that make the task easier, also provides some tips in order to deal with implementation problems realted to the tool's maturity. The teacher should avoid re-invent the wheel, althougth must speak about the history of how it was invented.&lt;/p&gt;&#xA;" OwnerUserId="9368" LastActivityDate="2020-08-30T09:58:04.187" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6498" PostTypeId="2" ParentId="6495" CreationDate="2020-08-30T13:55:14.640" Score="7" Body="&lt;p&gt;I emphasize readability and maintenance of code. Therefore, I will assign a project and later turn around and require another student to complete the second half of it. Everyone ends up maintaining someone else's code as a result.&lt;/p&gt;&#xA;&lt;p&gt;I think you should continue teaching your good habits and thinking styles. That said, you see a student doing Olympiad problems on his own and solving in a way which you would not. Perhaps this is the trade off between readability and maintenance and simply solving a problem in its first draft form. The student you are talking about could of course refactor his code but his interest is in the solution. At any level arriving at a solution is very important. We can talk more on code style and refactoring later.&lt;/p&gt;&#xA;&lt;p&gt;When it comes to teaching in the classroom, there are curricular objectives to achieve. I outline the requirements and the students are assessed on their performance demonstrating or achieving them. This one function only student may well solve many problems but will not achieve all my objectives. It's also tough to always think of new challenging assignments that require reuse of functions.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastActivityDate="2020-08-30T13:55:14.640" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6499" PostTypeId="2" ParentId="6495" CreationDate="2020-08-30T15:17:54.753" Score="3" Body="&lt;h3&gt;Explain and demonstrate the purpose of functions, in context.&lt;/h3&gt;&#xA;&lt;p&gt;Putting everything in main() might work for toy programs, but in real programming you want to use functions for a specific reason: you want your code to be able to repeatedly do perform a particular task, producing a particular kind of output when given a particular kind of input. Depending on the age of the student and their level of mathematical education, you might draw the analogy of mathematical functions, like y = f(x).&lt;/p&gt;&#xA;&lt;p&gt;One possible way to do this might be to introduce them to recursive programming, but another other way might be to introduce them to APIs and libraries - if you're calling a piece of code somebody else made, it can't be in your main(), and that means that if you're writing that code for other people to use, the code you write can't be in main() either.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2020-08-30T15:17:54.753" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6500" PostTypeId="2" ParentId="6495" CreationDate="2020-08-31T07:38:32.427" Score="4" Body="&lt;h1&gt;Programming vs language&lt;/h1&gt;&#xA;&lt;p&gt;This is the difference between learning to program, and learning a language. It will have analogies in human languages (English, French, etc.) One can know a language, but is one understood; is one poetic; is one concise, is one un-ambiguous.&lt;/p&gt;&#xA;&lt;h1&gt;Does it scale&lt;/h1&gt;&#xA;&lt;p&gt;Un-clean code does not scale. It is like &lt;code&gt;goto&lt;/code&gt; and global valuables, they are only bad when the program gets big. OO solves globals, by having small programs (classes) with encapsulated globals, and giving you the tools to join them together. Procedural (and everything that derives from it), gives you &lt;code&gt;goto&lt;/code&gt;s encapsulated in &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, etc.&lt;/p&gt;&#xA;&lt;h1&gt;Evidence&lt;/h1&gt;&#xA;&lt;p&gt;One has to learn for ones self. You can teach what is right, but in the end a student will need to find out for them selfs.&lt;/p&gt;&#xA;&lt;h1&gt;Good examples&lt;/h1&gt;&#xA;&lt;p&gt;Ensure that your examples are clean.&lt;/p&gt;&#xA;&lt;h1&gt;Teaching order&lt;/h1&gt;&#xA;&lt;p&gt;Start with the cleanest techniques:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;foreach&lt;/code&gt; over &lt;code&gt;for&lt;/code&gt; or &lt;code&gt;while&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;constants over mutation&lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;A challenge that needs recursion&lt;/h1&gt;&#xA;&lt;p&gt;Find an easy challenge that needs recursion. Or at least where the recursive solution is simpler. I use fractal trees (probably not impossible to do without recursion).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-08-31T07:38:32.427" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6501" PostTypeId="2" ParentId="6493" CreationDate="2020-08-31T07:57:16.050" Score="0" Body="&lt;p&gt;Note: Agile and Lean are pretty much the same thing.&#xA;Scrumban is a very subtly modified scrum, to replace time boxes with kanban technique of minimising work in progress.&lt;/p&gt;&#xA;&lt;p&gt;I have seen lots of writing and talks that discuss the observation that too heavy a focus on tools distracts from the core principles. Therefore others and I suggest that you don't use specialist tools. If possible use paper or white boards, or use a shared document (e.g. google docs). Having the class invent the tool will help them understand what it is doing for them, and what it is not.&lt;/p&gt;&#xA;&lt;p&gt;e.g. is it needed (not value added): putting stuff on the board early, it then becomes obsolete, before it is used. Or putting too much effort into a board item, but its value does not match the effort.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-08-31T07:57:16.050" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6502" PostTypeId="2" ParentId="6495" CreationDate="2020-08-31T16:44:46.107" Score="4" Body="&lt;p&gt;Teaching introduces a strong two-way dependency. As a student, one needs a certain amount of trust in the teacher - otherwise, if they already know better, then why on Earth would they need the teacher in the first place. So, if the student is there of their own volition, this already established a need: they need help. The student needs to understand that this sort of a demand originates with them, that they are the one who asked for help.&lt;/p&gt;&#xA;&lt;p&gt;Once the student-originating demand is established, there comes the teachers job: they become &lt;em&gt;responsible&lt;/em&gt; for the progress of the student, &lt;em&gt;as long as&lt;/em&gt; the student does what they were asked to do (e.g. doesn't skip practicing an instrument, or does the math problem sets assigned, etc.). This is the strong bidirectional dependency, and it has consequences: the student is always free to do things their own way, but they are free to do it  &lt;em&gt;on their own&lt;/em&gt;. As long as they are being guided by a teacher, they need to follow the teacher. I'm assuming here that the teacher is competent and responsible to the student's unique needs - I'm far from decrying &amp;quot;put up or shut up&amp;quot;, not at all!&lt;/p&gt;&#xA;&lt;p&gt;In the case you presented, the student simply doesn't know enough to have the wherewithal to make any sort of decisions. And moreover, &lt;em&gt;they already use functions!&lt;/em&gt; I'm pretty much sure that their program needs to do I/O, or whatever. So their idea that functions are &amp;quot;not necessary&amp;quot; is a delusion: they are necessary, because they use them. And thus, they need to be able to create their own. If your student insists on doing this &amp;quot;their own way&amp;quot; for too long, you have to explain to them this two-way binding: &lt;strong&gt;you can take responsibility for their progress only as long as they trust and follow your advice&lt;/strong&gt;. If they already know better, they don't need you after all, and you must bid them good-bye. Otherwise, it'll be totally pointless: you'll be frustrated, the student will be frustrated, and on top of it all: the student will blame their frustration on you!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;If the student is willing to get frustrated by not following reasonable advice, set them free so that they understand what consequences their own choices bring&lt;/strong&gt;. You &lt;em&gt;do not want to get involved in such situations&lt;/em&gt; - it's totally counterproductive. It doesn't help any that two people get frustrated: if the student wants frustration, &lt;strong&gt;let them enjoy frustration on their own&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Teaching is a contract. If either side bails, it's null and void.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;It is very important here to note that I didn't even consider the &amp;quot;letting the student do the work in the way most natural to them&amp;quot;, since it's a non-sequitur in this case. The student has &lt;em&gt;no way of most natural work&lt;/em&gt; at all. They don't nearly have any way of knowing what's natural since they haven't even &lt;em&gt;begun&lt;/em&gt; to get the experience needed to explore what comes natural. It's like having a piano student try to tell you what's &amp;quot;most natural&amp;quot; to them after 3 months of once-a-week lessons. It's nonsense. They'll begin to appreciate what feels natural after they've put a few hundred hours of practice in. Same here: &lt;strong&gt;There's nothing &amp;quot;natural&amp;quot; to a student that has but a few hours of experience&lt;/strong&gt;. The whole idea of things being &amp;quot;natural&amp;quot; to such students is based on an absurdly fantastic premise that I can't even begin to understand. Let's not go there. It's a case of being able to write down a sentence, or an idea (that there is something &amp;quot;natural&amp;quot; here to begin with), and then believing it has any meaning just by the fact that you were able to enunciate it. Nope.&lt;/p&gt;&#xA;" OwnerUserId="9440" LastEditorUserId="9440" LastEditDate="2020-08-31T16:53:34.987" LastActivityDate="2020-08-31T16:53:34.987" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6503" PostTypeId="2" ParentId="213" CreationDate="2020-08-31T17:07:15.037" Score="0" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;where can we find 0-indexing outside of CS and grounded in everyday human experience?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;This is really begging the question (in the strict sense)&lt;/strong&gt;: you assume that there's any need for it, whereas I boldly claim that there's none whatsoever, making the question moot. In fact, I think it's really counterproductive, and is an attempt to solve a non-existent problem.&lt;/p&gt;&#xA;&lt;p&gt;As far as educational theories go, such a question is very loaded. Are you sure that such everyday human experience will have any other applicability to the problem? It's like trying to teach quantum mechanics while referring to everyday human experience: it's totally futile, since there's no everyday human experience that has any resemblance to what happens on quantum level, and if there is then the resemblance is wholly superficial.&lt;/p&gt;&#xA;&lt;p&gt;See, the heart of the problem is whether there is any way to continue deduction based on human experience. If you refer to human experience, the students will naturally try to rely on what they know from &amp;quot;real life&amp;quot; as they go on in their studies, and they'll try to rely on that &lt;em&gt;first&lt;/em&gt;, before reaching into the &amp;quot;unfamiliar&amp;quot; but task-specific knowledge. In most cases, the real-life &amp;quot;analogues&amp;quot; are &lt;strong&gt;baggage&lt;/strong&gt;, since any further deductions one makes based on them tend to be either outright invalid, or subtly broken.&lt;/p&gt;&#xA;&lt;p&gt;I personally don't think that there's much to 0-indexing. Tell the students that it's a convention no different from starting to count at 1. It's something we agreed to, and when you use some programming languages, the convention is 0-based. That's all there's to it. You can explain to the students that it's no different to agreeing to greet the teacher by saying &amp;quot;hello&amp;quot; or &amp;quot;good [morning|afternoon]&amp;quot; rather than &amp;quot;yo brother, what's up?&amp;quot;. It's entirely arbitrary, it's based on a-priori decision to treat the &amp;quot;yo brother&amp;quot; form of address as informal or disrespectful or what have you.&lt;/p&gt;&#xA;" OwnerUserId="9440" LastEditorUserId="9440" LastEditDate="2020-08-31T17:14:32.973" LastActivityDate="2020-08-31T17:14:32.973" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6504" PostTypeId="2" ParentId="6495" CreationDate="2020-08-31T17:35:23.230" Score="1" Body="&lt;p&gt;There will come a day when a problem is too hard or too large for him to solve on his own (of course). He is being academically lazy and it will handicap him. Thats a common pitfall for bright kids. It's totally OK to experiment and 'go your own way' when learning for the first time. Learning should be fun. It will help him relate to new information he receives and put it into some context. Play helps people become interested. Work is what guarantees long term success. Allow for play, but don't let him break his own legs.&lt;/p&gt;&#xA;&lt;p&gt;Its your job as someone older and wiser, to make sure kids don't hurt themselves when they play.&lt;/p&gt;&#xA;" OwnerUserId="9441" LastActivityDate="2020-08-31T17:35:23.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6505" PostTypeId="2" ParentId="4821" CreationDate="2020-08-31T17:57:46.460" Score="1" Body="&lt;p&gt;&lt;strong&gt;The fix is in accepting that failure, sometimes repeated failure, is not &lt;em&gt;merely&lt;/em&gt; an option, but is absolutely necessary and an integral part of success&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The goal is to reduce the number of drop-outs: students who start a program, but leave it before completion.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Is it? Who says so? Is that yet another law of Nature we forgot to be told about? There are academic environments where drop-outs are how students learn about stuff not working out, they are pretty much a given... I dropped out of an automation and robotics M.Sc. degree at age 18, only to take Ph.D.-level robotics classes a decade-and-a-half later, on another continent, and enjoying them immensely. No regrets. It's &lt;strong&gt;good&lt;/strong&gt; that I attempted it and dropped out of that life-sapping uninspired quagmire!&lt;/p&gt;&#xA;&lt;p&gt;The corollary: sometimes you do want to enter something just to appreciate it's not for you - not necessarily in the absolute, but at least at a given moment in time, or in a given mode of presentation (this includes institutional culture). And trust me: institutional culture matters &lt;strong&gt;a whole darn lot&lt;/strong&gt;. There are teaching institutions that do a superb job at the lectern, yet the culture may be wholly unbearable to a particular student. Whenever I think about studying just about anything in place X, I want to throw up: no &amp;quot;resources&amp;quot; would have helped beforehand! I had to try it and leave.&lt;/p&gt;&#xA;&lt;p&gt;But unfortunately I know where your question comes from: it's the deeply American obsession with an educational system that financially ruins a good chunk of the students who enter. The solution to avoid the ruin is &lt;strong&gt;not ever, not even once, to avoid drop outs&lt;/strong&gt;. Instead, it is to appreciate the fact that this fantasy of a student getting a loan, entering a major, finishing it, getting a job, and then paying it off in a reasonable amount of time is completely unrealistic for most people. &lt;strong&gt;It is doing everyone the most disservice to attempt to wrap the educational system around this fantasy, and thus to attempt to avoid drop outs in order not to ruin the students' finances, or avoid dropping in some &amp;quot;rankings&amp;quot; or eligibility for student loans&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The failure is an integral part of success. Until the American academia wraps their thick collective head around this fact, there's no salvation, only misery.&lt;/strong&gt; Life continuously bears this out, yet people pretend the problem is elsewere. It's nuts.&lt;/p&gt;&#xA;&lt;p&gt;In other words, the question as stated is totally begging the question in the most horrific way possible: the assumptions made ruin lives. I'm not joking.&lt;/p&gt;&#xA;" OwnerUserId="9440" LastEditorUserId="9440" LastEditDate="2020-08-31T18:03:14.157" LastActivityDate="2020-08-31T18:03:14.157" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6506" PostTypeId="2" ParentId="6495" CreationDate="2020-08-31T18:21:41.877" Score="3" Body="&lt;p&gt;Back off on clean coding until they can appreciate it. Take named constants (&lt;code&gt;const int maxScore=14&lt;/code&gt;) as an example. Showing const along with regular variables will only confuse students -- why is there a special word to make a variable useless? Later using it to &amp;quot;fix&amp;quot; &lt;code&gt;if(s1&amp;gt;14)&lt;/code&gt; will probably still confuse them -- it's more typing and more difficult to see the 14. Wait until they're comfortable with normal variables and are doing longer stuff like &lt;code&gt;if(s1&amp;gt;14) s1=14;&lt;/code&gt; with another for &lt;code&gt;s2&lt;/code&gt;. The students can now appreciate how a &lt;code&gt;maxScore&lt;/code&gt; constant isn't too much bother and makes the program easier to write.&lt;/p&gt;&#xA;&lt;p&gt;Or take &amp;quot;may get bigger later&amp;quot; functions. Early on, &lt;code&gt;bool win() { return score&amp;gt;=21; }&lt;/code&gt; is just going to convince students that functions are stupid -- bools are hard, functions are hard to read -- it's all just a terrible way to write &lt;code&gt;if(score&amp;gt;=21)&lt;/code&gt;. But if you wait until they know functions better, and when they've seen a single line of code blow-up into a dozen, and they're comfortable with functions inside math -- then it's natural to say &amp;quot;we'll probably want to add more rules for winning, so let's just move it out of the way and into a function&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;It might seem obvious to teach naming conventions along with the rules for identifiers, but students confuse the two. Sometimes in their confusion they &amp;quot;fix&amp;quot; syntax errors by making a &amp;quot;more proper&amp;quot; variable name. Instead let them play around with: x, y, count1, count2, A,B,C, number, and hit_points. Let them name functions: f1, function2, and results. At some point they'll naturally become curious how the Pros do it, and what &amp;quot;ways to pick good names&amp;quot; is called.&lt;/p&gt;&#xA;&lt;p&gt;Decades ago we had a serious cowboy-coder problem. It seemed like new coders were born knowing that obscure (but working) code was how to prove your manhood. We worked hard to stomp that out, but maybe did too good a job. We're not training Jedi's here, where the slightest chink will turn them to the Dark Side. It's fine, probably even good, to let them play with sloptastic coding for a while.&lt;/p&gt;&#xA;" OwnerUserId="8773" LastEditorUserId="8773" LastEditDate="2020-09-01T19:06:43.550" LastActivityDate="2020-09-01T19:06:43.550" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6507" PostTypeId="1" CreationDate="2020-08-31T20:05:56.797" Score="5" ViewCount="274" Body="&lt;p&gt;I am an undergrad going into my junior year this semester. I really wanted to explore algorithmic game theory, as my university has some excellent professors in that field. However, as my undergrad is drawing to a close, it is seeming increasingly likely that I will not be able to do this in my undergrad if I don't step up and teach myself the basics. However, looking online, I am unable to find anything &amp;quot;basic&amp;quot; for intro students to the subject. Would you have any recommendations on how to start learning algorithmic game theory?&lt;/p&gt;&#xA;&lt;p&gt;I am well versed in regular game theory&lt;/p&gt;&#xA;" OwnerUserId="9443" LastEditorUserId="9109" LastEditDate="2021-08-26T10:27:08.547" LastActivityDate="2021-08-26T10:27:08.547" Title="Algorithmic Game Theory as an undergrad" Tags="|self-learning|resource-request|undergraduate|algorithms|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6508" PostTypeId="2" ParentId="4821" CreationDate="2020-08-31T22:06:58.743" Score="0" Body="&lt;h3&gt;Teach students coding in high school.&lt;/h3&gt;&#xA;&lt;p&gt;In Australia, the national curriculum makes teaching students coding mandatory up until year 10, after which it becomes an elective. As a result, you’d be able to expect most school-leaver students entering university to have at least some experience with the negative aspects of IT, and those who would be disinclined to work in OT would be less likely to apply for an undergraduate IT degree.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2020-08-31T22:06:58.743" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6509" PostTypeId="2" ParentId="6462" CreationDate="2020-09-01T00:42:29.930" Score="2" Body="&lt;p&gt;I don't think you can say any analogy is &amp;quot;right&amp;quot; or &amp;quot;wrong&amp;quot; across the board. Whether an analogy makes sense or not depends on the context of both the teacher and the student, and I don't think we can tell you whether any particular analogy is &amp;quot;right&amp;quot; for your context.&lt;/p&gt;&#xA;&lt;p&gt;I personally avoid analogies when I'm talking about &lt;a href=&quot;https://happycoding.io/tutorials/processing/using-variables&quot; rel=&quot;nofollow noreferrer&quot;&gt;using&lt;/a&gt; and &lt;a href=&quot;https://happycoding.io/tutorials/processing/creating-variables&quot; rel=&quot;nofollow noreferrer&quot;&gt;creating&lt;/a&gt; variables. I explain that a variable is a name that holds a value. I don't think that an analogy would make that more clear, at least for my context.&lt;/p&gt;&#xA;&lt;p&gt;That being said, one of the most effective resources I've seen for explaining Java variables are these two articles:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://javaranch.com/campfire/StoryCups.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cup Size -- a story about variables&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://javaranch.com/campfire/StoryPassBy.jsp&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pass-by-Value Please (Cup Size continued)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These articles use an analogy of variables being coffee cups with names written on them. In this analogy, &lt;code&gt;Object&lt;/code&gt; references are remote controls that you put inside a cup, and it's one of my go-to references when explaining that Java is pass-by-value.&lt;/p&gt;&#xA;" OwnerUserId="2068" LastActivityDate="2020-09-01T00:42:29.930" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6510" PostTypeId="2" ParentId="6495" CreationDate="2020-09-01T07:01:18.433" Score="1" Body="&lt;p&gt;I'll probably get some hate for this, but I personally hate coding in classes and Java in general, it's just not my cup of tea. But I can appreciate good, clean code. I program mostly in php and this makes the use of proper classes less important, as you can just physically separate it into separate pages. But I understand when classes are necessary/use-full. It might be a good idea to show him coding in unity, or similar, as that is a case where classes are very useful and arguably even necessary.&lt;/p&gt;&#xA;" OwnerUserId="9447" LastActivityDate="2020-09-01T07:01:18.433" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6511" PostTypeId="1" AcceptedAnswerId="6522" CreationDate="2020-09-01T15:27:54.207" Score="2" ViewCount="228" Body="&lt;p&gt;I'm looking for a text for a course in object oriented programming.  Most of the students will have done some programming courses in the past, but the background of the students is varied so the purpose of this course is to ensure that they are all well grounded in basic programming and object-oriented ideas such as abstraction, design by contract, polymorphic code, generic code, etc.  The language of the course is probably Java, but could also be Python.&lt;/p&gt;&#xA;&lt;p&gt;I had suggested Barbara Liskov's textbook, &lt;em&gt;Program Development in Java: Abstraction, Specification, and Object-Oriented Design&lt;/em&gt;.  But unfortunately it is out of print.  (Although still available as an e-book.)&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;This is graduate level for a professional masters in computer engineering. However the educational background of the students is quite varied and some are, quite frankly, not competent at programming when they arrive. Hence this fairly low-level course.&lt;/p&gt;&#xA;" OwnerUserId="1074" LastEditorUserId="1293" LastEditDate="2020-09-01T15:46:34.140" LastActivityDate="2021-11-24T22:57:29.257" Title="Looking for a text book on object-oriented concepts and programming" Tags="|resource-request|object-oriented-paradigm|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6512" PostTypeId="2" ParentId="6495" CreationDate="2020-09-01T17:29:45.897" Score="2" Body="&lt;p&gt;What do you mean your students are not going to become professional coders?&lt;/p&gt;&#xA;&lt;p&gt;Is your education only meant to become a hobby for them? You mentioning coding competitions seems to indicate that this is the case.&lt;/p&gt;&#xA;&lt;p&gt;I think what you really meant is that these people will not be full-time programmers but that they will program as part of their jobs.&#xA;People in this sort of job (scientists for example) are very often producing the most horrid and unreadable mess of a codebase you could imagine.&#xA;I believe the culprit is that they had no real formal education in programming other than &amp;quot;how do I get it to do what I want&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The vast majority of people who code for a living and are educated in &lt;em&gt;how&lt;/em&gt; to code will value readability above absolutely everything else, probably like you do.&#xA;For people who have the experience of working with large codebases over long periods of time &lt;em&gt;and&lt;/em&gt; the knowledge of how to make this easier, making it easier is their number one priority.&lt;/p&gt;&#xA;&lt;p&gt;The problem then is people who have to maintain large code-bases over long periods but don't know how to make that easy.&#xA;Or in fact, don't know that it is at all possible to make it easy.&#xA;I suspect part of your job is to teach people who could find themselves in this situation in the future.&lt;/p&gt;&#xA;&lt;p&gt;Kids doing short puzzle-like programming exercises will almost certainly believe that the right metric to evaluate whether a piece of code is good or not is speed or memory usage or even brevity.&#xA;It is therefore your responsibility to teach them that the one thing that matters the most in code is whether the code communicates its ideas and intent effectively.&#xA;That is admittedly a much harder thing to teach, because not everyone will accept your arguments.&#xA;It's a bit like teaching a toddler that fire is dangerous: they believe you, but still have to try by themselves.&lt;/p&gt;&#xA;&lt;p&gt;I like Human Resource Machine just as much as the next person, and it is frankly an amazing game, but that's all it is: a game.&#xA;One person's ability to solve programming puzzles and their value as a programmer in a real life scenario are borderline unrelated.&#xA;I'd say it's totally ok to indulge in a little bit of puzzle-solving and I think it's very likely more motivating for the students.&#xA;But fundamentally if you don't focus on larger scale projects then you will fail to address the real problems.&lt;/p&gt;&#xA;&lt;p&gt;If you really succeed and can follow these students over multiple years then at the end you should be able to reach several higher level concepts.&#xA;First, that there is beauty and elegance to be found in code.&#xA;Second, that elegant, simple and beautiful code is much harder to write.&lt;/p&gt;&#xA;&lt;p&gt;Much too often people have this almost unconscious rule in their head going &amp;quot;if it was difficult to write then it should be difficult to read&amp;quot;.&#xA;Almost all programmers went through a phase at some point (some never escape it) where they think writing complex code using obscure functionalities is a demonstration of their coding prowess.&#xA;You have to dispel that idea and confront it openly.&#xA;It's when code reads like it is self-evident that it was most likely the hardest to write, much like writing a research paper or a book.&lt;/p&gt;&#xA;" OwnerUserId="5241" LastActivityDate="2020-09-01T17:29:45.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6513" PostTypeId="2" ParentId="6482" CreationDate="2020-09-01T20:49:31.043" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://tom.preston-werner.com/2009/05/19/the-git-parable.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tom Preston-Werner&lt;/a&gt;'s wonderful &lt;a href=&quot;https://tom.preston-werner.com/2009/05/19/the-git-parable.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Git Parable&lt;/a&gt; has been made into a &lt;a href=&quot;https://github.com/jherland/git_parable&quot; rel=&quot;nofollow noreferrer&quot;&gt;presentation&lt;/a&gt; by Johan Herland. The slides, which are available in ODP and Google Slides formats, are  licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2020-09-01T20:49:31.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6514" PostTypeId="2" ParentId="6466" CreationDate="2020-09-01T21:13:38.167" Score="2" Body="&lt;p&gt;I just noticed that CS50 AP has just come back to life at &lt;a href=&quot;https://cs50.harvard.edu/ap/2021/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs50.harvard.edu/ap/2021/&lt;/a&gt; with new access information and so on, so I'm all set.&lt;/p&gt;&#xA;" OwnerUserId="786" LastActivityDate="2020-09-01T21:13:38.167" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6515" PostTypeId="2" ParentId="6495" CreationDate="2020-09-02T04:11:24.130" Score="4" Body="&lt;p&gt;I'll give you a straight, simple, and practical answer. Teach clean coding and simple effective thinking. Because in the practical world, the codes are big and have a lot of integration. The reality is that a single coder does not code all of it. As a teacher, you should teach something that is practically feasible. Teach a student to write such a code that other students can read and understand it.&lt;/p&gt;&#xA;" OwnerUserId="9460" LastActivityDate="2020-09-02T04:11:24.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6516" PostTypeId="2" ParentId="5176" CreationDate="2020-09-02T19:50:52.797" Score="0" Body="&lt;p&gt;Why don't just consequently use &lt;span class=&quot;math-container&quot;&gt;$11_{2}$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$11_{10}$&lt;/span&gt; and teach it the same way it's done at universities? I don't see how this would be any more difficult than starting confusing things with symbols that just add complexity on top of a difficult thing.&lt;/p&gt;&#xA;&lt;p&gt;The most confusing thing in school for me was when teachers tried to simplicate stuff ...&lt;/p&gt;&#xA;&lt;p&gt;If it was me, I'd teach them the whole abstract thing and leave simplified constructs unless your students really need it.&lt;/p&gt;&#xA;" OwnerUserId="9464" LastEditorUserId="27" LastEditDate="2020-09-03T01:11:22.417" LastActivityDate="2020-09-03T01:11:22.417" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6517" PostTypeId="1" CreationDate="2020-09-04T04:51:23.193" Score="3" ViewCount="31" Body="&lt;p&gt;A trace table problem is code that you follow along by hand and fill out variable values at each line. For example.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;0  msg = 'hello'&#xA;1  num = 5&#xA;2  num = num + 1&#xA;3  if num &amp;lt; 6:&#xA;4      msg = 'goodbye'&#xA;5  print(msg)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The table is filled out with variable values at each line number.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;line | num | msg     | &#xA;0    |     | 'hello' |&#xA;1    | 5   | 'hello' |&#xA;2    | 6   | 'hello' |&#xA;3    | 6   | 'hello' |&#xA;4    |     |         |&#xA;5    | 6   | 'hello' |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This would be for a collection of beginner language problems, to provide practice and review understanding of programming language operations. These are the CS 101 style problems of what does this print, or what is x at the end of this. An initial topic list might be as follows.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;variable declaration&lt;/li&gt;&#xA;&lt;li&gt;function declaration&lt;/li&gt;&#xA;&lt;li&gt;function calls&lt;/li&gt;&#xA;&lt;li&gt;if / else if / else&lt;/li&gt;&#xA;&lt;li&gt;for / while&lt;/li&gt;&#xA;&lt;li&gt;arithmetic&lt;/li&gt;&#xA;&lt;li&gt;scope&lt;/li&gt;&#xA;&lt;li&gt;asynchronous&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Are there any resources or existing collections for these types of problems? Specifically looking for Javascript but I can adapt other problems to the language.&lt;/p&gt;&#xA;" OwnerUserId="9468" LastActivityDate="2020-09-04T11:25:43.143" Title="Are there problem sets for trace table problems? If not, what are some good topics to cover?" Tags="|pseudo-code|problem-structure|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6518" PostTypeId="2" ParentId="6517" CreationDate="2020-09-04T11:25:43.143" Score="1" Body="&lt;p&gt;I'm not aware of such resources, and I expect that there wouldn't be. These are great problems, but you (hopefully) only need to do a few of them until the concepts click into place.&lt;/p&gt;&#xA;&lt;p&gt;I didn't know these were called trace table problems, but I have often provided them to struggling students in three different contexts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Absolute beginners&lt;/strong&gt;, where it helps students understand the ideas of assignment and execution order&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Strugglers&lt;/strong&gt;, where it helps students understand whatever has them lost, and&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Students working on very low-level problems&lt;/strong&gt;, such as assembly, or on processor design.  Here it is more of a basic survival tool. There are few, if any, meaningful variable names, and working your way through the values is a straightforward way of figuring out what is going on.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;And this gets me to why I don't think you'll find a specific resource for problems like these: in all three of these scenarios, the actual prompt is the specific code we're studying.  Tracing the values is just a tool to understand the code that is in front of you.  The value-add (and the overarching purpose) comes from that code, not from the trace table per se.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-09-04T11:25:43.143" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6519" PostTypeId="1" AcceptedAnswerId="6521" CreationDate="2020-09-05T15:13:42.793" Score="3" ViewCount="178" Body="&lt;p&gt;People have different modalities in their imaginings. Some imagine things visually, some spatially, some by touch, some by smell, and some other ways.&lt;/p&gt;&#xA;&lt;p&gt;What if a student claims to not have the ability to imagine things visually or spacial?&lt;/p&gt;&#xA;&lt;p&gt;The student is fresh, just starting on their journey into programming.&lt;/p&gt;&#xA;&lt;p&gt;What abstractions can I use to help such a student to develop good cognitive abilities in formulating their intent before they write code?&lt;/p&gt;&#xA;&lt;p&gt;As clarification: I consider this question pretty agnostic regarding any imperative programming language (although, student has to learn C++, PHP, Java)&lt;/p&gt;&#xA;" OwnerUserId="2799" LastEditorUserId="2799" LastEditDate="2020-09-07T19:51:14.250" LastActivityDate="2020-09-27T00:05:36.497" Title="Ways to imagine a computer program for a student without photographic visualisation" Tags="|programming|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6520" PostTypeId="2" ParentId="6519" CreationDate="2020-09-06T22:28:51.320" Score="3" Body="&lt;p&gt;For visualising a program in advance of coding, and as a tool to aid in clear development, perhaps the &amp;quot;classic&amp;quot; flowchart may be useful? You can also &amp;quot;see&amp;quot; blocks that may later become functions, and the concept of modularisation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/pKZsu.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/pKZsu.png&quot; alt=&quot;Simple Flowchart&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;A useful tool to &amp;quot;see&amp;quot; code during execution may be the visualizer as this will let you &amp;quot;see&amp;quot; it in action using a range of languages.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/v01Kq.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/v01Kq.png&quot; alt=&quot;Multi-language visualizer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can step through the code and the learner can clearly &amp;quot;see&amp;quot; the flow of execution, all of the variables, their values and type/class and so on.&lt;/p&gt;&#xA;&lt;p&gt;I have also used this on occasion to debug pieces of code where there would be something unexpected happening- it is very useful.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/pezkE.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/pezkE.png&quot; alt=&quot;Step through code and see it execute visually&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Of course the languages supported are limited, but include some of the more popular choices.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2020-09-07T19:19:26.693" LastActivityDate="2020-09-07T19:19:26.693" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6521" PostTypeId="2" ParentId="6519" CreationDate="2020-09-06T23:35:05.490" Score="3" Body="&lt;p&gt;I introduce concepts by their shapes when it makes sense. An array is a line, a loop is a coil (and coils have ends), an infinite loop is a circle.&lt;/p&gt;&#xA;&lt;p&gt;There is &lt;a href=&quot;https://www.insidehighered.com/news/2019/01/09/learning-styles-debate-its-instructors-vs-psychologists&quot; rel=&quot;nofollow noreferrer&quot;&gt;no real evidence&lt;/a&gt; to support the notion of visual learners, kinesthetic learners, etc.  It helps to conceive of these concepts as shapes, and so we can teach them along with these shapes.  Whatever the student believes or doesn't believe about their own visual sense, they can navigate their room in the dark because of a visuo-spacial awareness, and they navigate this without being aware of what thought-process they are using.  It is up to us to help them utilize the appropriate senses for the concept in question.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-09-06T23:35:05.490" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6522" PostTypeId="2" ParentId="6511" CreationDate="2020-09-07T00:35:52.803" Score="3" Body="&lt;p&gt;My suggestion is &amp;quot;Object Oriented Programming in Python&amp;quot; by Goldwasser &amp;amp; Letscher&#xA;&lt;a href=&quot;https://cs.slu.edu/%7Egoldwamh/oopp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs.slu.edu/~goldwamh/oopp/&lt;/a&gt;&#xA;It's a free PDF download, or you can buy a paper copy.&#xA;They have a companion graphics module that is simple to understand for rudimentary GUI applications.&#xA;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2020-09-07T00:35:52.803" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6523" PostTypeId="2" ParentId="14" CreationDate="2020-09-07T01:31:21.930" Score="1" Body="&lt;p&gt;I teach at the community college level, in Ontario's Colleges of Applied Arts and Technology system. My students generally study electronics and don't have any burning desire to become programmers. I teach hardware interfacing and realtime responses to hardware or external events with Python, CircuitPython and Arduino, on Windows or Raspberry Pi.&#xA;For academic integrity, I have several approaches.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Minimize the temptation. Generous deadlines, appropriate difficulty, open ended assignments and lots of opportunities to ask questions.&lt;/li&gt;&#xA;&lt;li&gt;Avoid reusing assignments. Last year's assignment was an auto ranging voltmeter, this year was a direct digital synthesis waveform generator, and so on. This gets rid of code reuse from one cohort to the next.&lt;/li&gt;&#xA;&lt;li&gt;In my course policy, I refer to the MIT policy on coding, it's quite reasonable in that it's enough to give credit in comments. &lt;a href=&quot;https://integrity.mit.edu/handbook/writing-code&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://integrity.mit.edu/handbook/writing-code&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;For my second year class, I use a source code management system  (previously Fossil, now Mercurial and TortoiseHg) and award marks for intelligent use of the system, including meaningful commits and commit messages. It looks really bad when a program appears in a single commit on the due date.&lt;/li&gt;&#xA;&lt;li&gt;And yes, I routinely use MOSS, but warily. It works as a front end. I look at the top of the list and examine the code. Most of the similarities are idioms of the language like &amp;quot;for line in input_file:&amp;quot; and can be dismissed. What I look for (as pointed out in the NY Times story) is a pattern of similar mistakes or unusual coding, renamed identifiers, or shuffled order of function definitions.&lt;/li&gt;&#xA;&lt;li&gt;Finally I will overlook some cases where a pair or trio of students have very similar solutions who are known to work together in all their courses. I observe their interactions in the labs (not just programming class, electronics etc,) and  it's pretty obvious that learning is happening. Typically it's one or two of the more eager students pulling a friend along who's also motivated but needs the help to keep up. I can't stop it, might as well embrace it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This year it's going to be a lot harder because most of my teaching is remote and I can't get a feel for who's doing what, and who are in the lead peloton drafting the rest.&lt;/p&gt;&#xA;&lt;p&gt;Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2020-09-07T01:31:21.930" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6524" PostTypeId="2" ParentId="6507" CreationDate="2020-09-07T15:05:35.713" Score="0" Body="&lt;p&gt;You could: Try some online classes/tutorials, e.g., on YouTube, read textbooks recommended by university classes (at your level), or buy the highest ranked textbooks on Amazon.&lt;/p&gt;&#xA;" OwnerUserId="8103" LastActivityDate="2020-09-07T15:05:35.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6525" PostTypeId="1" CreationDate="2020-09-07T15:40:32.617" Score="2" ViewCount="101" Body="&lt;p&gt;I have been working with the ACM Curriculum Guidelines for proposing courses and topics related to CS in the Faculty that I am currently working on. The core document that we have been using was the ACM Computing Curricular Guidelines from 2013. At the beginning of this year, it emerged the ACM Computing Curricula 2020, which I believe is an improvement over the original document from ACM circa 2005, which defined the guidelines of CS-related careers. The document can be found on:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cc2020.nsparc.msstate.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cc2020.nsparc.msstate.edu/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here I have some doubts about this initial draft. I have seen that (in my personal opinion) it is a little bit awkward. It mentions the different &amp;quot;flavors&amp;quot; of CS worldwide, and then it shows some tools that could be used to measure to see how much CS one career has, even though it does not mention where and how to use these tools. The nice thing about this document is that it contains a set of competencies that should be attained from each undergraduate CS-related field, which, by the way, vaguely reminds me of the ABET competencies system. However, I miss the style of the Curriculum Guidelines of 2013; in which there were recommendations on how to distribute the Body of Knowledge into different Knowledge Areas. Also, even it gave a summary of the recommended topics in each Tier (core or elective).&lt;/p&gt;&#xA;&lt;p&gt;In summary, I would like to know if one should use this document of 2020 in conjunction with the document that appeared in 2013. Maybe is that ACM will develop another document as an upgrade to the 2013 curriculum guidelines? Any comments or suggestions on how to use this new ACM CS 2020 guidelines?&lt;/p&gt;&#xA;&lt;p&gt;Thanks&lt;/p&gt;&#xA;" OwnerUserId="4161" LastActivityDate="2020-10-07T17:02:30.343" Title="relationship between ACM curriculum guidelines from 2013 and computing curricula 2020" Tags="|curriculum-design|acm|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6526" PostTypeId="2" ParentId="6525" CreationDate="2020-09-07T16:08:35.603" Score="-1" Body="&lt;p&gt;Actually, since it is a draft report, you have an opportunity to influence the final version. Contact one or both of the Co-chairs. They can also give you some more information on their thinking. I'm not personally involved in this, but know several of the participants. They are likely to be helpful.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-09-07T16:08:35.603" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6529" PostTypeId="1" AcceptedAnswerId="6531" CreationDate="2020-09-10T18:36:05.433" Score="5" ViewCount="163" Body="&lt;p&gt;I'm teaching an Algorithms class (junior/senior level), and we've just proved the validity of the Master Theorem. I'd like some good questions on it, both for homeworks and for exam questions. Problem is, most questions I've seen online seem to just give the constants (e.g. a=2, b=2, c=1, now solve for the Θ class), which isn't very intellectually challenging.&lt;/p&gt;&#xA;&lt;p&gt;So what are some real-world recursive algorithms whose running times can be analyzed with the Master Theorem? I have a very limited list already:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Merge sort (possibly quick sort too, but that's a little problematic)&lt;/li&gt;&#xA;&lt;li&gt;Binary search&lt;/li&gt;&#xA;&lt;li&gt;Traversing a balanced binary tree&lt;/li&gt;&#xA;&lt;li&gt;Ternary search (finding the max of a unimodal function)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Anything else?&lt;/p&gt;&#xA;" OwnerUserId="5211" LastActivityDate="2020-09-10T22:31:06.217" Title="Looking for good Master Theorem examples" Tags="|undergraduate|algorithms|exercises|recursion|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6530" PostTypeId="1" CreationDate="2020-09-10T22:24:40.587" Score="14" ViewCount="2235" Body="&lt;p&gt;I teach a computer science course and I like to share sample solutions to assignments after the assignment is due.  I think it helps students learn to see a solution sheet with sample solutions and notes on common mistakes, immediately after the assignment is due.  However, I face all too much cheating: some students upload these solutions to websites like Course Hero, and then when I reuse those problems in a future semester, now it's all too easy and tempting for other students to search and find those solutions and copy from them.  I would prefer to avoid that situation.&lt;/p&gt;&#xA;&lt;p&gt;Are there any technical solutions that would allow me to share solutions with students, but in a way that makes it more difficult for them to share the solutions with others?&lt;/p&gt;&#xA;&lt;p&gt;Right now I share solutions as a PDF.  Unfortunately it's very easy to download that PDF and then upload it to a site like CourseHero.  Is there some better way to allow students to view solutions, while making it harder for students to upload them elsewhere?  I know I'm not going to make it impossible -- if nothing else, students can take a sequence of screenshots -- but if I make it tedious enough, then I suspect that would help.  I suspect many of the students who upload solutions are not doing it to be malicious, but because of dark patterns at sites like CourseHero that pressure them to upload something, so if I can make it more onerous to upload solutions, they might upload something else instead.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone know of any technology that might meet this need?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I'm not interested in answers that tell me to never reuse problems in a future semester.  I ask for your trust that I am aware of the pedagogical tradeoffs and have valid reasons to do so.  I am willing to elaborate if you feel you need to hear that, but I suspect it is a tangent.&lt;/p&gt;&#xA;" OwnerUserId="1106" LastActivityDate="2022-01-11T15:04:19.423" Title="How to share solutions in a way they won't get uploaded" Tags="|cheating|" AnswerCount="9" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6531" PostTypeId="2" ParentId="6529" CreationDate="2020-09-10T22:31:06.217" Score="4" Body="&lt;p&gt;A famous example is &lt;a href=&quot;https://en.wikipedia.org/wiki/Strassen_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Strassen's matrix multiplication algorithm&lt;/a&gt;, whose running time satisfies the recurrence &lt;span class=&quot;math-container&quot;&gt;$T(n) = 7T(n/2) + O(n^2)$&lt;/span&gt;. A similar example is &lt;a href=&quot;https://en.wikipedia.org/wiki/Karatsuba_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Karatsuba's algorithm&lt;/a&gt; for fast integer multiplication, whose running time satisfies the recurrence &lt;span class=&quot;math-container&quot;&gt;$T(n) = 3T(n/2) + O(n)$&lt;/span&gt;. Other algorithms for multiplying matrices or integers supply even more examples of this sort.&lt;/p&gt;&#xA;&lt;p&gt;The running time of the median-of-medians &lt;a href=&quot;https://en.wikipedia.org/wiki/Median_of_medians&quot; rel=&quot;nofollow noreferrer&quot;&gt;linear time selection algorithm&lt;/a&gt; satisfies the recurrence &lt;span class=&quot;math-container&quot;&gt;$T(n) = T(0.2n) + T(0.7n) + O(n)$&lt;/span&gt;, which might be too challenging to analyze.&lt;/p&gt;&#xA;&lt;p&gt;FFT is a classical example of an extremely useful divide-and-conquer algorithm, whose running time satisfies the recurrence &lt;span class=&quot;math-container&quot;&gt;$T(n) = 2T(n/2) + O(n)$&lt;/span&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1536" LastActivityDate="2020-09-10T22:31:06.217" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6532" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T02:26:23.717" Score="17" Body="&lt;p&gt;I don't have real answers, and I suspect there are none.  I also reuse prompts, if only because good ones are almost absurdly hard to come up with, write-ups and supporting code take time, etc, etc, etc.&lt;/p&gt;&#xA;&lt;p&gt;I've taken a series of steps to mitigate the cheating.  Some of these are peculiar to my own situation, and may not translate directly to another context, but they also illustrate the type of thinking I use when I consider this particular (and particularly intractable) problem.&lt;/p&gt;&#xA;&lt;p&gt;The first is to not weigh labs heavily in the grading.  This sucks, because they are a huge portion of both the work and the learning in the class, but &lt;em&gt;they are not trustworthy as high-stakes assessments&lt;/em&gt; if you do your assessment at the end by looking at the final result. (There is genuinely no getting around this fact.)&lt;/p&gt;&#xA;&lt;p&gt;I explain this to my students, and encourage them, then, to use the labs as learning opportunities. The brunt of their grade comes from tests and quizzes. The labs help them to prepare.&lt;/p&gt;&#xA;&lt;p&gt;Next I talk about plagiarism.  I require them to keep in comments links to stackoverflow, indications of where friends have helped them, and any other sources they used.  I point out that even very veteran software developers use stack overflow regularly, and I assure them that this sort of help is not cheating as long as it is cited.&lt;/p&gt;&#xA;&lt;p&gt;Next, I make sure that my lab write-ups are extremely clear.  Cheating typically centers around nervousness more than laziness. When students feel like they are not quite sure how to be successful, but nevertheless fear the consequences of failure, cheating is a natural outcome.&lt;/p&gt;&#xA;&lt;p&gt;Then I have in-class working sessions where I go around and observe how the students are doing, and help them get un-stuck.  This allows me to see regular progress, and helps the students to learn from the labs.&lt;/p&gt;&#xA;&lt;p&gt;Finally, I grade some of the labs as code-review interviews, and award a harsh, current grade, and a second, more generous grade for once the required refactoring is complete.&lt;/p&gt;&#xA;&lt;p&gt;I don't believe myself in thinking that this entirely nips the problem in the bud, but I have reason to believe that the outright copying is minimal in this setup.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-09-11T02:26:23.717" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6533" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T03:00:45.240" Score="7" Body="&lt;p&gt;Jack Applin (a two time winner of the Obfuscated C contest) at Colorado State University has created a Perl script called shadow. It takes any text file and spits out an HTML file as output that is readable in a browser, but not much else. Essentially it creates an HTML table, but does it in a way that is is not printable, nor copy-able. The file can have an expiration date so it won't render after a specified time. Different cells span different number of rows and columns and have different number of characters in them. Characters in cells may be rendered both left to right and right to left. Random characters are inserted in the output but rendered as non visible. Every character is encoded, so one doesn't see any of the original file's characters in the output file.&lt;/p&gt;&#xA;&lt;p&gt;EDIT:&#xA;While OCR can read the text, the benefit of the obfuscation is in the &amp;quot;wow&amp;quot; factor for students. When they try to cut/copy and see what happens, they immediately start asking questions on how the page was produced and declare they are going to unscramble it. Always nice to get students asking questions.&lt;/p&gt;&#xA;&lt;p&gt;Jack has given me permission to post the script and you may find it at &lt;a href=&quot;http://www.cs.colostate.edu/%7Efsieker/shadow&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.cs.colostate.edu/~fsieker/shadow&lt;/a&gt; .&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2020-09-14T18:53:15.090" LastActivityDate="2020-09-14T18:53:15.090" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6534" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T08:06:02.797" Score="7" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I'm not interested in answers that tell me to never reuse problems in a future semester.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Well in that case the answer is simple: you can't stop people from sharing these example solutions.&lt;/p&gt;&#xA;&lt;p&gt;Obfuscation or any kind of self destructing documents are trivially circumvented by just taking a screenshot.&lt;/p&gt;&#xA;&lt;p&gt;If you could block taking screenshots in the OS you couldn't block the user from running it in a VM and screenshotting that.&lt;/p&gt;&#xA;&lt;p&gt;If you'd detect and block VMs they could take a picture with a phone.&lt;/p&gt;&#xA;&lt;p&gt;If you'd only show them in a protected environment and forbid phones they could just write things down manually.&lt;/p&gt;&#xA;&lt;p&gt;This is a race to the bottom you could never win.&lt;/p&gt;&#xA;" OwnerUserId="9494" LastEditorUserId="204" LastEditDate="2020-09-19T22:10:17.450" LastActivityDate="2020-09-19T22:10:17.450" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6536" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T23:21:49.557" Score="6" Body="&lt;p&gt;What about a barium meal test?&lt;/p&gt;&#xA;&lt;p&gt;Let's say you have 8 questions that can be ordered in any way, that's 8! = 40,320 different combinations.&lt;/p&gt;&#xA;&lt;p&gt;Or let's say you have a line like the following:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;char* res = fun(a, (void*) b);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Rewrite it to something like this:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;char *res=fun ( a,(void *)b ) ;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;You now have 6 places which you can vary, for 2^6 = 64 combinations.&lt;/p&gt;&#xA;&lt;p&gt;Then write something like this at the top of the instructions:&#xA;&amp;quot;The wording and ordering of the questions are slightly different in each PDF. It is considered cheating to upload solutions online. If you do it, you will be caught.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;You'd of course also want to add their name to the PDF in clear print, as well as some more subtle watermarks (that they'll be expected to find) to show that you mean business.&lt;/p&gt;&#xA;&lt;p&gt;It should be quite trivial to automate this process using LaTeX. There are also more low-tech solutions, like changing the PDF metadata to indicate the uploader, or embedding gratuitous images and hiding individual watermarks in them.&lt;/p&gt;&#xA;" OwnerUserId="9499" LastActivityDate="2020-09-11T23:21:49.557" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6537" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T23:26:21.220" Score="4" Body="&lt;p&gt;First, the obvious disclaimer: it is not possible to completely avoid that they share your solutions. You need to provide &lt;em&gt;something&lt;/em&gt;* to the students, and that something they will be able to share.&lt;/p&gt;&#xA;&lt;p&gt;Second, try to produce a bit of variation between your assignments. For example, I may resolve a problem with a given file, and then change the order of the columns in the assignment file, just to force the students to do a little more than copying the provided recipe. The needed change is trivial, yet every year some student fail to do that. ☹&lt;/p&gt;&#xA;&lt;p&gt;In some cases you may be able to create an assignment template, from which you can then easily create multiple variations (different numbers, names, even the order of the sentences might allow some tweaking...).&lt;/p&gt;&#xA;&lt;p&gt;Third, watch the resources hat your students may be using, and try to avoid them the temptation. You may set search alerts for full phrases from your solutions, be aware of Stack Overflow questions similar to your assignment whose answers may be tempting to copy. If you have published on the website for the subject a set of solved assignments from past years, and you hand out a lab exam using one of them, disable the resource during the exam.&lt;/p&gt;&#xA;&lt;p&gt;Fourth, detection. You may want to keep a local copy of the assignments handed out past years by other students (assuming this is allowed)  so that you could find the original if someone submits the same solution as a previous year student [different than themselves]. You may want to tag your pdf with some hidden text, use weird variable names unlikely they would come up with or even intentionally include minor spelling mistakes that act as a brown M&amp;amp;M when you review it.&lt;/p&gt;&#xA;&lt;p&gt;You may distribute solutions in such way that each student receives a different document. That could be for yourself to know the submitter, such as an entry on document metadata or steganographically tagging the solutions. Or it may be a document clearly watermarked with the student personal details, as that would discourage them to share it (they could be removed, but that requires more effort than simply uploading the file you gave them).&lt;/p&gt;&#xA;&lt;p&gt;Fifth, make sure to make clear what can and cannot be done. Even if it's already buried on the institution honor code, it doesn't harm to include a redundant note on your own Syllabus saying that copying without attribution is cause on its own for failing the whole subject (not just that exam). On the other hand, I'd recommend to also list what &lt;em&gt;can&lt;/em&gt; be done. While some people with no regards for the others work, other students would completely avoid acceptable resources afraid of this rule.&lt;/p&gt;&#xA;&lt;p&gt;Finally, for a different type of course, pdf marked as not-copyable and pages as images may be appropriate. However, in Computer Science you often have problems where the students &lt;em&gt;should&lt;/em&gt; copy the code, compile and run the professor solution, compare its output with the one of its own solution, etc. I'd dare most students won't do that, albeit that would greatly help them acquire the concepts being taught.&lt;/p&gt;&#xA;" OwnerUserId="2821" LastActivityDate="2020-09-11T23:26:21.220" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6538" PostTypeId="2" ParentId="6530" CreationDate="2020-09-11T23:45:37.137" Score="0" Body="&lt;p&gt;In my prior I focused on how to share &lt;em&gt;the teacher solutions&lt;/em&gt;. Here I will cover a different approach.&lt;/p&gt;&#xA;&lt;p&gt;Rather than providing an official solution to the exam, you may host an interactive lesson where the assignments are collaboratively solved by the whole class (or at least, those actively participating). So rather than providing &lt;em&gt;your&lt;/em&gt; solution, you get the classroom to contribute their own. This may lead to a solution of worse quality, and it more demanding from the instructor, which would need to notice issues &amp;quot;on the fly&amp;quot;. It is likely to be more realistic and have the students more involved (if not for its own, because it's a class they would attend, rather than a pdf they might choose not to open)&lt;/p&gt;&#xA;&lt;p&gt;You can select relevant snippets from submitted solutions to include and collectively ask/show the issues on it. However note that forces you to correct them much quicker so you have that data available for the solving session.&lt;/p&gt;&#xA;" OwnerUserId="2821" LastActivityDate="2020-09-11T23:45:37.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6539" PostTypeId="2" ParentId="6530" CreationDate="2020-09-12T04:30:40.607" Score="0" Body="&lt;p&gt;If they need to upload 10 documents, then offer 10 documents on your website, that they can use. maybe some old exercises you don't need anymore?&lt;/p&gt;&#xA;" OwnerUserId="9500" LastActivityDate="2020-09-12T04:30:40.607" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6540" PostTypeId="2" ParentId="6530" CreationDate="2020-09-12T07:03:43.203" Score="6" Body="&lt;p&gt;Are you aware of the “Mountweazel” concept?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fictitious_entry&quot; rel=&quot;noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Fictitious_entry&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since it is impossible to prevent things being available a lateral approach is to include details that make it possible to quickly identify copying.&lt;/p&gt;&#xA;&lt;p&gt;Not a cure but might be a treatment to what ails you.&lt;/p&gt;&#xA;" OwnerUserId="9502" LastActivityDate="2020-09-12T07:03:43.203" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6541" PostTypeId="2" ParentId="2808" CreationDate="2020-09-12T12:36:52.913" Score="4" Body="&lt;p&gt;The fundamental element of a computer is a memory cell, which we often refer to as a variable. But what is most important about it is that it can instantly take a new value by being given an electrical input. This is the thing to know, and without knowing that, you know nothing about computers. This is the thing that is a unique feature, different from any other machine or natural object.&lt;/p&gt;&#xA;&lt;p&gt;When we compare memory cells to math, we are making a huge mistake. The word 'variable' was a mistaken term. It distorts and hides the reality of this marvelous thing, a device which can take new values. The metaphor has led us all in to a ditch.&lt;/p&gt;&#xA;&lt;p&gt;If you did not ask yourself when you first heard about a computer, &amp;quot;&lt;em&gt;How could such a thing possibly work&lt;/em&gt;?&amp;quot; then you need to go back and ask yourself that question now. Without wondering about that and solving it for yourself, you don't really know why a computer is so singular and ultimately different from every other thing, and why it will be able to do the things the brain can do someday. Only a brain is a brain, in all the universe, and only a computer is a computer. This is wondrous.&lt;/p&gt;&#xA;&lt;p&gt;Let's not hide that from students. Reveal it right away. It is not 'difficult' if you simply tell them the truth. But you have to know the truth first. If you are not still amazed, you have not understood.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2020-09-12T12:36:52.913" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6542" PostTypeId="1" CreationDate="2020-09-13T20:23:52.953" Score="0" ViewCount="54" Body="&lt;p&gt;I am involved in a website project, where main implementation language is PHP. Main development is done by two full-time developers, who lack a lot of understanding about program architecture and modern PHP features. I am involved in the project part time.&lt;/p&gt;&#xA;&lt;p&gt;Development was done a long time without any code review process, so low quality code is currently running on the website.&lt;/p&gt;&#xA;&lt;p&gt;Some specific areas of concern:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;app related data is stored in a single deeply nested associative array&lt;/li&gt;&#xA;&lt;li&gt;functions are used with way too many arguments&lt;/li&gt;&#xA;&lt;li&gt;functions are not used appropriately&lt;/li&gt;&#xA;&lt;li&gt;no knowledge of unit tests&lt;/li&gt;&#xA;&lt;li&gt;a lot of trivial functionality is reinvented instead of using available solutions&lt;/li&gt;&#xA;&lt;li&gt;no separation of abstraction levels (database operation, result processing and theme output on same code block)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I am looking now options how to get these developers' motivated about improving their skills and how to actually accomplish improvement goal. At the same time, development work should not be affected too much.&lt;/p&gt;&#xA;&lt;p&gt;There is a code review process now, and I am pointing out things there. However, I have no idea if they really understand the concepts.&lt;/p&gt;&#xA;&lt;p&gt;Any ideas how to most effectively make progress on developer skills and at the same time improve existing code?&lt;/p&gt;&#xA;" OwnerUserId="9511" LastActivityDate="2020-09-13T20:23:52.953" Title="How to take PHP junior developers to senior level" Tags="|student-motivation|self-learning|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6543" PostTypeId="1" AcceptedAnswerId="6545" CreationDate="2020-09-14T23:55:38.227" Score="5" ViewCount="202" Body="&lt;p&gt;I'm a freelance computer science tutor with junior high and high school students (working outside of school - I give them assignments.&lt;/p&gt;&#xA;&lt;p&gt;Mostly my assignments are problems we find online, such as Codewars or USACO problems. This isn't the best way to teach them about large project issues, such as &amp;quot;maximize cohesion, minimize coupling&amp;quot; or clear structure and documentation.&lt;/p&gt;&#xA;&lt;p&gt;When I had fewer students I did unique projects with each one, but that takes way too much time outside the session for me to prepare. So what I'm looking for now is some kind of project I can do with my students that would teach large project concepts.&lt;/p&gt;&#xA;&lt;p&gt;This project may be fairly complex. But -- it should be the kind of complexity that my students can wrestle with on their own. I need to be able advise them on it in a one hour lesson. The problem with most student projects is that they spend the week making a mess of things and I can't sort them out in an hour.&lt;/p&gt;&#xA;&lt;p&gt;It should be doable in Python or C++. I don't know much about web programming so that's probably out.&lt;/p&gt;&#xA;&lt;p&gt;It should be fun and hold their attention - which probably means graphical game. I can't think of a text-based project which would hold their attention enough. If we use Qt then at least that is available in both C++ or Python.&lt;/p&gt;&#xA;&lt;p&gt;(I don't want to use PyGame - too primitive and frustrating as a game engine.)&lt;/p&gt;&#xA;&lt;p&gt;A simple game alone probably wouldn't teach &amp;quot;maximize cohesion minimize coupling&amp;quot; very well. Perhaps a game in which they implement the AI strategy? That might have complex enough algorithms. Maybe we could even play their AI's against each other.&lt;/p&gt;&#xA;&lt;p&gt;Maybe a turn-based game like Civilization? (A primitive form of it, of course.)&lt;/p&gt;&#xA;" OwnerUserId="9246" LastActivityDate="2020-11-29T21:53:07.310" Title="What would be a good project for teaching big program concepts?" Tags="|project|game-design|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6544" PostTypeId="2" ParentId="6543" CreationDate="2020-09-15T01:02:58.913" Score="2" Body="&lt;p&gt;I think you're onto the right track.  I've had great luck teaching these sorts of concepts in Unity, where you are trying to get so many different systems to operate together that architecture really starts to demonstrate its value.&lt;/p&gt;&#xA;&lt;p&gt;And that's the key; you can't push this much beyond where they can see the value in it.&lt;/p&gt;&#xA;&lt;p&gt;When I work with middle school students, I only gently lean on students for clean code.  I've found that most of what middle school students program is too small in scope for good practice to demonstrate its own value back to the students.&lt;/p&gt;&#xA;&lt;p&gt;In high school, on the other hand, I have a different tact.  I get my initial buy-in to the notion of clean(er) coding by having the kids try to interpret short bits of absolutely abysmal code.  (These are very short, and purely meant to demonstrate how very hard code can get to interpret if you don't follow at least some norms.  You can see an answer where I have discussed this practice &lt;a href=&quot;https://cseducators.stackexchange.com/a/132/27&quot;&gt;here&lt;/a&gt;.)&lt;/p&gt;&#xA;&lt;p&gt;I will later follow up with code interviews in which they explain code that they created months ago.  By this point, they have mostly forgotten what they did, and we can establish the idea that clean code is usually self-explanatory, and that the person who will most likely be editing their old code is... them.  And that the person who most benefits, then, from being able to read it is &lt;em&gt;also them&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;One huge advantage you have by tutoring (as opposed to a classroom environment) is that code reviews become the most natural way to work, so you get a chance to look over their code in great detail and clarify good practices in ways that feel genuine to the student and their experience.  Take full advantage of this, but remember that you will not be able to get buy-in to cleaner coding until they can really feel the benefits.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-09-15T01:02:58.913" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6545" PostTypeId="2" ParentId="6543" CreationDate="2020-09-15T01:19:47.443" Score="5" Body="&lt;p&gt;You're definitely on the right track with your project scope but high school students can pay attention to large scale text based games.  I have had great success having them implement Blackjack.  This project is large by nature but you can place restrictions on how they solve the problem.  I've found that using three classes helps cut down on confusion.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The card class creates a single card object for use in the deck class&lt;/li&gt;&#xA;&lt;li&gt;The deck class creates a deck of 52 cards made of card objects, also includes a shuffle and dealTopCard method&lt;/li&gt;&#xA;&lt;li&gt;The hand class lets them actually deal a hand to themselves and play against a simple computer (the AI is simple to program)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I give this problem to AP CSA students in two parts, the deck and card classes with methods, and the hand class with functional game parts.&lt;/p&gt;&#xA;&lt;p&gt;For higher level students, I give an open ended problem to algorithms &amp;amp; data structures kids where they need to write an algorithm that will procedurally generate a solvable (and interesting) puzzle.  It forces them to do their own research while implementing core functionality to a game.  Typically slide puzzles work well because they can be represented in a 2d array.&lt;/p&gt;&#xA;&lt;p&gt;Middle School students tend to lack the attention to work on and understand a large and complex program.  Drawing an animal with Python turtles or something similar can be a good way to show how quickly bad code can get out of hand.  Just mentioning Discord bot is a good way to grab attention.  Going through the steps of creating a bot that does something even as simple as outputting a link by chat command goes over very well.&lt;/p&gt;&#xA;&lt;p&gt;I have plenty more examples but as a general rule, the more &amp;quot;out there&amp;quot; the program while having clearly defined instructions, the better it holds high school student's attention.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastActivityDate="2020-09-15T01:19:47.443" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6547" PostTypeId="1" CreationDate="2020-09-17T09:21:43.993" Score="5" ViewCount="508" Body="&lt;p&gt;I am working for a company, and a target for this year is to increase the level of CS knowledge among the staff.&lt;/p&gt;&#xA;&lt;p&gt;The company does mostly engineering stuff so the people come from an engineering background, they might have some knowledge of programming, such as what is a variable, control flow, etc. but classes are virgin territory. That is kind of the average level there.&lt;/p&gt;&#xA;&lt;p&gt;Me and a few others with knowledge (formal CS background, working in the AI team of the company) were assigned to increase the level of knowledge in the office. Basically each mentor was assigned a handful of mentees and the mentor decided what to teach and what exercises to give etc. to improve the algorithmic thinking and C++ competency.&lt;/p&gt;&#xA;&lt;p&gt;I paired up with a colleague and we pooled our mentees. For some people it worked great. People went from variable names like &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;ok&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt; and thousands of lines of copy-pasted code in &lt;code&gt;main()&lt;/code&gt; to actually nice variable names, class hierarchies with abstract classes/interfaces, clean code to the point where (almost) no comments were needed, etc.&lt;/p&gt;&#xA;&lt;p&gt;I tend to think that we are doing something right, especially since my colleague and I also teach at our university (which is among the top3 in the country), create training materials, held multiple training sessions on different subjects, regularly mentor interns with great success and also did volunteer work tutoring middle school children in introductory programming, with parents at the end asking us to continue the tutoring for money. So we are not exactly new to teaching, and our experiences seem to indicate that we are not bad at it either.&lt;/p&gt;&#xA;&lt;p&gt;However I have a student that doesn't seem to grasp some concepts at all even after multiple (&amp;gt;5) explanations using different methods and analogies. Will also forget basic techniques in the span of hours.&lt;/p&gt;&#xA;&lt;p&gt;For example he needs a copy of a &lt;code&gt;vector&amp;lt;int&amp;gt;&lt;/code&gt; (C++). He will do the old song and dance:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cpp prettyprint-override&quot;&gt;&lt;code&gt;vector&amp;lt;int&amp;gt; copy;&#xA;for (int i = 0; i &amp;lt; my_vec.size(); i++)&#xA;    copy.push_back(my_vec[i]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We told him several times and explained why it was better, faster, prettier to just do:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cpp prettyprint-override&quot;&gt;&lt;code&gt;vector&amp;lt;int&amp;gt; copy = my_vec;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;He always forgot to do this for his homework until we made his homework to clean up his code and implement a single utility function.&lt;/p&gt;&#xA;&lt;p&gt;He cleaned up the code, then in that utility function went right back to the &lt;code&gt;for&lt;/code&gt; method. And when we pointed this out it took a couple of minutes and helping questions for him to realize what he did wrong.&lt;/p&gt;&#xA;&lt;p&gt;Another example is that as a first project the mentees have to implement a basic Hill Climbing algorithm.  This project has been given in June. We have people who will begin implementing Genetic Algorithms this week and it won't even be hard for them. People who have started from variable names like &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;ok&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt; and thousands of lines of copy-pasted code in &lt;code&gt;main()&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Without precise instructions he's barely able to create functions like with 1-2 rounds of review &amp;quot;you get a vector of vectors as an argument. compute &lt;code&gt;f&lt;/code&gt; on each of the vectors and return the index of the first vector where the value of &lt;code&gt;f&lt;/code&gt; is above some threshold &lt;code&gt;x&lt;/code&gt;&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The hill climbing algorithm was explained exactly 7 times to him in different ways, with both me and my colleague actually spending time to come up with new analogies. Every time this mentee will enthusiastically say that this time he understood better than all the other times and then do something like just compute the best neighbor of the starting point and return that neighbor, and then name the function &lt;code&gt;firstImprovement&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The problem is that this person does not appear disinterested. When we explain things he nods and looks like he is concentrating and that makes us try again and again because it looks like he's trying too, but the issues above have been a thing for months. On a problem as simple as Hill Climbing.&lt;/p&gt;&#xA;&lt;p&gt;Has anyone ever had such experiences? Any advice? Or any other site where this question would be appropriate?&lt;/p&gt;&#xA;" OwnerUserId="9524" LastEditorUserId="13819" LastEditDate="2023-09-15T17:15:35.387" LastActivityDate="2024-02-17T21:16:31.570" Title="Student not understanding explanation the 1st, 2nd... and 8th time" Tags="|struggling-students|" AnswerCount="5" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6548" PostTypeId="1" AcceptedAnswerId="6551" CreationDate="2020-09-17T21:59:57.597" Score="3" ViewCount="153" Body="&lt;p&gt;I'm a freelance tutor working with high school students, giving them programming assignments in languages like Python, Java, C++, and others.&lt;/p&gt;&#xA;&lt;p&gt;In recent months I've seen the value of using English - getting them to write documentation and also to write down rough drafts of their algorithms in pseudocode. I'm wondering what other teachers do with this. (I'll give an example with an Euler problem.)&lt;/p&gt;&#xA;&lt;p&gt;The goal is to get them to think at a high level. Typically they like to dive into code. It's not concrete to them if they aren't writing code. I get it, developing a higher-level understanding is something that takes time. But I think I need to push it a little - they are just avoiding pseuocode and documentation past the point when they are really ready to use it.&lt;/p&gt;&#xA;&lt;p&gt;One obstacle is their general writing abilities. The students who don't write well in any context, like English class, find it the hardest to write documentation and pseudocode.&lt;/p&gt;&#xA;&lt;p&gt;To give an example, let's consider Euler 46, &amp;quot;Goldbach's other conjection&amp;quot; &lt;a href=&quot;https://projecteuler.net/problem=46&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://projecteuler.net/problem=46&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This project involves testing different ways of adding squares and primes, in some kind of nested for loop. Typically they want to start out with details like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for (int n = 0; n &amp;lt; ???; n++)&#xA;{&#xA;    for (int i = 0; i &amp;lt; ???; i++) &#xA;    {&#xA;        for (int j = 0; j &amp;lt; ???; j++)&#xA;        {&#xA;            ??? generate square and prime S and prime P ???&#xA;            if (2 * s + p == n)&#xA;                break; // and do what then ???&#xA;        }&#xA;    }   &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Where I have put question marks is where they aren't sure what to put. But they begin wrestling with each place I have put question marks right away. That means they are struggling with low level details right away before they really understand the gestalt of the problem. Also they will throw in a &lt;code&gt;break&lt;/code&gt; without having considered ahead of time how that will play out.&lt;/p&gt;&#xA;&lt;p&gt;What I'm trying to get them to do is write pseudocode like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;For every N, an odd composition number we are testing, in some range&#xA;    For every prime P &amp;lt; N&#xA;        if N - P is not twice a square, we found an exception. print or mark it&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Of course this is a big leap, so I guide them to it gradually. (The benefits of working as a tutor and not a classroom teacher.) When they think at a high level, they can also see choices available to them. like maybe that pseudocode could be modified to be made more effcient.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;For every N, an odd composition number we are testing, in some range&#xA;    For every value 2 * S where S is a square&#xA;        if N - 2*S is not a prime, we found an exception. print or mark it&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;They can reflect on the difference long before they have wrestled with the details of for loops. They can think about how they might efficiently test if a number is prime. Maybe they've seen before this idea of generating a hash set of primes and think about whether that's faster than trying to find out if a number is a square (which requires a sqrt operation).&lt;/p&gt;&#xA;&lt;p&gt;Then there's documentation. The difference between something low level like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// set i to 0. increment i and stop when it's n &#xA;for (int i = 0; i &amp;lt; n; i++) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and higher level like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// loop over possible test values (i)&#xA;for (int i = 0; i &amp;lt; n; i++) {&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What I'm looking for from the answers is whether other teachers have found it useful to bring English into helping them develop higher-level understanding. &amp;quot;Chunking&amp;quot; concepts for example (thinking with high-level or abstract concepts). And how successful is this? Does it depend on a student's ability to use English in the first place?&lt;/p&gt;&#xA;" OwnerUserId="9246" LastActivityDate="2020-09-28T05:36:58.720" Title="How useful is English (pseudocode and documentation) in aiding understanding?" Tags="|pseudo-code|documentation|" AnswerCount="3" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="6549" PostTypeId="2" ParentId="6548" CreationDate="2020-09-18T08:46:00.547" Score="2" Body="&lt;p&gt;Warning : I am not a teacher of any kind, just a developer and I will tell about by personal feelings/experience&lt;/p&gt;&#xA;&lt;p&gt;For me when I write in pseudocode I write in my native language (not English but I am sure it applies for all peoples native languages).&lt;/p&gt;&#xA;&lt;p&gt;My native language is the language I use everyday since I was born, this is a language I know really well.&lt;/p&gt;&#xA;&lt;p&gt;When writing directly in a programming language you use a language that you don't know entirely and which sometimes (for low level languages like C or C++) forces you to think low level because there are specific rules.&lt;/p&gt;&#xA;&lt;p&gt;When I was a student I always wanted to write code directly and never think beforehand. After acquiring some experience (especially with big/ complex programs), I understood that thinking of the code in an abstract manner helps a lot.&lt;/p&gt;&#xA;&lt;p&gt;I think forcing to write in English might be good but it might be better for them to discover that by themselves. I they try to make complex programs they will have to write in English to understand what they are doing and then they will continue doing it.&lt;/p&gt;&#xA;" OwnerUserId="9513" LastActivityDate="2020-09-18T08:46:00.547" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6550" PostTypeId="1" CreationDate="2020-09-18T15:30:11.377" Score="0" ViewCount="83" Body="&lt;p&gt;In Hopcroft-Motwani-Ullman there are exercises on this topic. What is another good reference (textbook/website) for fractional/quotient regular languages, possibly with examples?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2021-01-17T04:06:40.903" Title="Any materials on fractional/quotient languages?" Tags="|cs-theory|complexity-theory|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6551" PostTypeId="2" ParentId="6548" CreationDate="2020-09-18T22:10:55.023" Score="3" Body="&lt;p&gt;I believe that the core issue you're dealing with is that programming is too enjoyable, which makes outlining a program/writing pseudocode not interesting.  It is a tough sell because in the time that students could be understanding a problem, they could be doing it (which is more fun).  You need to demonstrate the value that pseudocode provides and what kind of issues it can avoid.  This is easier to show off in big programs.&lt;/p&gt;&#xA;&lt;p&gt;When I assign big projects and students come up with their own implementation that shows they didn't think about the problem, I ask them to start over.  This is my compromise for not forcing them to write pseudocode.  The idea behind starting over is they now understand the problem and the pitfalls well enough to start coding for real.  &lt;strong&gt;In a way, all that code they wrote, was just a harder version of pseudocode.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I'm not sure what level you're teaching, but towards the end of AP CSA, the majority of my students have started a program over.  They are resistant in the moment, but the following year, almost all of them gave thanks.  Knowing how to start over is not the same as learning to write pseudocode, but both result in a better understanding of the problem.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastEditorUserId="9498" LastEditDate="2020-09-28T03:01:44.183" LastActivityDate="2020-09-28T03:01:44.183" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6552" PostTypeId="2" ParentId="6547" CreationDate="2020-09-19T21:49:14.310" Score="2" Body="&lt;h1&gt;Some ideas&lt;/h1&gt;&#xA;&lt;p&gt;Order of teaching may be a problem. Teach the specialised easy to use method before the general hard to use one.&lt;/p&gt;&#xA;&lt;p&gt;Re-consider the choice language, you are trying to teach programming at the same time as teaching a very hard language, this puts a very high cognitive load on the student.&lt;/p&gt;&#xA;&lt;p&gt;Teach test-driven programming. See PRIMM for how to do this in teaching.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-09-19T21:49:14.310" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6553" PostTypeId="2" ParentId="6547" CreationDate="2020-09-21T13:09:57.557" Score="7" Body="&lt;p&gt;Maybe you are stressing things of minor importance. You gave us two examples.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;vector&amp;lt;int&amp;gt; copy;&#xA;for (int i = 0; i &amp;lt; my_vec.size(); i++)&#xA;    copy.push_back(my_vec[i]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;sure is lengthy, and probably also a bit slower than the C++ expert version of&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;vector&amp;lt;int&amp;gt; copy = my_vec;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But it does its job and is readable (while e.g. to me as a Java guy, I'd struggle to remember that the assignment operator here does a copy of the data structure). And, regarding performance, we all know that in at least 90% of all cases, it doesn't matter. And if it matters, I'd search for a solution where the vector doesn't have to be copied at all.&lt;/p&gt;&#xA;&lt;p&gt;Regarding Hill Climbing: During 40 years of software development, I rarely ever needed hill climbing, and I've been working in algorithm-sensitive areas. So, unless your students' jobs need things like hill climbing regularly, think of exercises better matching their everyday needs.&lt;/p&gt;&#xA;&lt;p&gt;To summarize it: You're not preparing that guy for a PhD in computer science (which most probably isn't needed for his job and out of scope for him as well), but giving him some tools to improve the software engineering aspects of his work.&lt;/p&gt;&#xA;&lt;p&gt;With this guy, I'd switch from a fixed curriculum to practical reviews of production code, concentrating on readability, robustness and structure, looking at code written by different developers. If he struggles there as well, then have a nice, deep talk with him.&lt;/p&gt;&#xA;&lt;p&gt;EDIT, as requested by OP&lt;/p&gt;&#xA;&lt;p&gt;Regarding the &amp;quot;nice, deep talk&amp;quot;: If that guy really struggles hard with basic concepts of software engineering, then he'll probably never catch up with the others. That mindset of specifically-structured thinking is not given to everybody. So, he should understand that his talents might be somewhere else.&lt;/p&gt;&#xA;&lt;p&gt;He can choose whether he wants to pursue his career as a software engineer, with the risk of always staying behind all the others. Or he can find a different role in the team where his talents shine. It might be he is good at understanding the customers' way of thinking, or at hardware development and interfacing, or UI design, or management, or quality assurance, or whatever. Software development teams need so many roles besides coding, there might well be tasks where he can shine.&lt;/p&gt;&#xA;&lt;p&gt;That's what I'd talk about with him. You should try to make this a positive experience for him. Maybe you already observed some of his talents, so you can suggest some migration path. For that talk, interpersonal skills are most important.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditDate="2020-09-22T13:42:28.437" LastActivityDate="2020-09-22T13:42:28.437" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6554" PostTypeId="2" ParentId="6470" CreationDate="2020-09-22T13:01:27.407" Score="5" Body="&lt;p&gt;First, there are a couple of things on the list that are wrong. Ben I. has covered one of them. Comments on every line are a &amp;quot;code smell&amp;quot;. If the code itself isn't obvious from its naming and structure then it is broken.&lt;/p&gt;&#xA;&lt;p&gt;But lots of comments in the code indicate another fault. The methods/functions you are writing are too long and too complex to understand. Unfortunately, a lot of people, not just students, write code that they can't understand. If your methods are more than a few lines long or your structured statements are nested deeply (more than 3) then your code is nearly impossible to understand.&lt;/p&gt;&#xA;&lt;p&gt;I suggest that you learn about &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cyclomatic Complexity&lt;/a&gt; as it applies to programming. I get itchy when my code has complexity &amp;gt; 3 and find it impossible when it reaches 7. (Even though the recommendation is to break it down at 10 - ugh). Related to this is &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Magical_Number_Seven%2C_Plus_or_Minus_Two&quot; rel=&quot;nofollow noreferrer&quot;&gt;The magic number seven&lt;/a&gt;, which explains why complex things are hard/impossible to understand.&lt;/p&gt;&#xA;&lt;p&gt;I would also object to the &amp;quot;no unnecessary variables&amp;quot; rubric. Of course, it depends on what you mean by unnecessary. Often, by introducing a variable (and giving it an &lt;a href=&quot;http://wiki.c2.com/?IntentionRevealingNames&quot; rel=&quot;nofollow noreferrer&quot;&gt;intention revealing name&lt;/a&gt; you can often improve its clarity by making the intent obvious. (Whoa, I haven't linked to Ward's original wiki in a long time. Ward Cunningham invented the wiki, BTW.) I will often, for example, create a named variable to use as an argument to a function rather than just passing the expression defining the variable. This makes it much clearer.&lt;/p&gt;&#xA;&lt;p&gt;Don't imagine that such &amp;quot;extra variables&amp;quot; make the code less efficient. Any decent compiler will notice the limited lifetime of such variables and optimize them away. And, of course - Ward again - &lt;a href=&quot;http://wiki.c2.com/?PrematureOptimization=&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Premature optimization is the root of all evil&amp;quot; - Knuth&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I could quibble a bit more, but those two points are important. If the code is clear it can be extended or fixed. If it isn't then you are in deep trouble.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Caveats. Of course, the above depends on the language you use. If you write assembly language it is impossible to reveal intent other than with comments, so you need a lot of them. Maybe even one per line in some (not all) cases. If you write in a language that doesn't let you declare a variable at the point of first use then it is harder to justify those extra variables that have to be declared long before they have a &amp;quot;meaning&amp;quot; in the code.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;One reason that I recommend Eclipse as the development environment is that it has lots of features to make &amp;quot;nice&amp;quot; code. It will factor out methods to reduce complexity, for example. It has a plug-in to show you the complexity. It is much more than a text editor since what it shows you in the &amp;quot;text&amp;quot; window is actually a rendering of the parse tree. It will also reformat the code to fit the desired convention.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="9154" LastEditDate="2021-06-02T10:43:46.350" LastActivityDate="2021-06-02T10:43:46.350" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6555" PostTypeId="1" CreationDate="2020-09-22T21:57:02.447" Score="5" ViewCount="1832" Body="&lt;p&gt;What are the reasons that &lt;a href=&quot;https://en.wikipedia.org/wiki/AP_Computer_Science&quot; rel=&quot;nofollow noreferrer&quot;&gt;AP Computer Science A&lt;/a&gt; is using Java as its programming language?&lt;/p&gt;&#xA;&lt;p&gt;While Java is a great language in general, it has high verbosity, which is quite important for a timed exam.&lt;/p&gt;&#xA;&lt;p&gt;How about other programming languages, perhaps something more modern, like Rust or Go? Maybe even C++?&lt;/p&gt;&#xA;" OwnerUserId="9322" LastEditorUserId="9322" LastEditDate="2023-01-14T22:10:21.537" LastActivityDate="2024-03-30T02:40:03.653" Title="Why does AP Computer Science A use Java?" Tags="|ap-computer-science-a|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6556" PostTypeId="2" ParentId="6555" CreationDate="2020-09-22T22:03:33.727" Score="3" Body="&lt;p&gt;It takes a lot of time and a lot of infrastructure to set up for a new language in AP CS. At the time of its creation, Java was much simpler than today and had a lot of desirable characteristics, including a pretty good graphic layer. So, proposals were made and a lot of effort was put into the infrastructure. That is difficult to abandon.&lt;/p&gt;&#xA;&lt;p&gt;Starting over with a clean slate, I might pick Python, myself, but others might disagree.&lt;/p&gt;&#xA;&lt;p&gt;But choosing a professional language for a beginning course comes with a lot of issues. I found, back when I was a serious C++ programmer, that I could write some beautiful stuff, but the language fought me every inch of the way. That isn't something I'd like to put on a novice just starting out.&lt;/p&gt;&#xA;&lt;p&gt;But an AP course is a lot more than just a language and a few exercises.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-09-22T22:03:33.727" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6557" PostTypeId="2" ParentId="6555" CreationDate="2020-09-23T01:26:53.010" Score="6" Body="&lt;p&gt;Particularly since they have recently removed interfaces and abstract classes, I would say that there are no particularly important &lt;em&gt;philosophical&lt;/em&gt; reasons that they are using Java.  At this point, it was a historical decision.&lt;/p&gt;&#xA;&lt;p&gt;The exam began in Pascal, and when they looked for a way to move towards Object Orientation, they switched (in 1996) to C++.  This was &lt;a href=&quot;http://www.cs.williams.edu/%7Ekim/ETSCplus.html&quot; rel=&quot;noreferrer&quot;&gt;controversial at the time&lt;/a&gt;, as Java was very modern and was thought by many to be a conceptually better language, particularly for students.&lt;/p&gt;&#xA;&lt;p&gt;They switched from C++ to Java in the 2003-2004 school year largely for two reasons:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Java was considered to be a better object-oriented language, particularly with regards to inheritance, and the compiler does a much better job at checking to make sure that beginners aren't doing silly things that they definitely shouldn't be doing.&lt;/li&gt;&#xA;&lt;li&gt;College programs around the country were taking up Java, so it better reflected the reality of the introductory courses that students would be getting credit for.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You can read the justification for the switch to Java courtesy of the ever-magical &lt;a href=&quot;https://web.archive.org/web/20040124182231/http://www.collegeboard.com/ap/pdf/adhoc_report_surveys.pdf&quot; rel=&quot;noreferrer&quot;&gt;wayback machine&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Given the recent changes to the AP Test, it does not appear that there is any particular good &lt;em&gt;pedagogical&lt;/em&gt; reason to stick with Java at this point.  In fact, the latest iteration of the test basically ignores the most important features of OO, instead emphasizing a great number of imperative concepts.  However, the testing language is unlikely to change any time soon, as &lt;a href=&quot;https://www.codio.com/blog/2019-survey-cs-teaching&quot; rel=&quot;noreferrer&quot;&gt;Java is still the dominant language at universities for teaching introductory Computer Science&lt;/a&gt;, and these are the institutions that must agree to provide credit if the AP exam is to continue to provide value.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-09-26T04:00:12.063" LastActivityDate="2020-09-26T04:00:12.063" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6558" PostTypeId="1" AcceptedAnswerId="6561" CreationDate="2020-09-24T16:59:25.243" Score="3" ViewCount="429" Body="&lt;p&gt;One benefit of having a class provide a static factory method rather than public constructors is the method can return an instance of a subclass.&lt;/p&gt;&#xA;&lt;p&gt;For example, if the class &lt;code&gt;Rectangle&lt;/code&gt; had a subclass &lt;code&gt;Square&lt;/code&gt;, there could be a static method &lt;code&gt;Rectangle.newInstance(int width, int length)&lt;/code&gt; that sometimes returned a &lt;code&gt;Rectangle&lt;/code&gt; and sometimes a &lt;code&gt;Square&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What is a compelling example of the benefit of this approach? Students could easily ask in this case why the client didn't call the &lt;code&gt;Square&lt;/code&gt; constructor if the width and length are equal. (I can give them an answer to that question, but it would be better to have an example good enough that they wouldn't even ask.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edits&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;For those of you who answered that I shouldn't have a static factory method return an instance of a subclass, I follow the guidance of the great Josh Bloch, who considers that a positive use of static factory methods (Effective Java, Item 1).&lt;/p&gt;&#xA;&lt;p&gt;For those who told me that a good use of static factory methods is that the programmer can choose their name, which is not the case with constructors, I already know and teach that.&lt;/p&gt;&#xA;" OwnerUserId="283" LastEditorUserId="283" LastEditDate="2022-08-14T22:06:00.140" LastActivityDate="2022-08-14T22:06:00.140" Title="What's a good example of a static factory method returning instances of subclasses?" Tags="|java|object-oriented-paradigm|code-example|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6559" PostTypeId="2" ParentId="6558" CreationDate="2020-09-24T17:37:18.787" Score="2" Body="&lt;p&gt;I would first ask what that hierarchy buys you overall in an application and, more important, in the student understanding.&lt;/p&gt;&#xA;&lt;p&gt;In general, I find concrete subclassing to be problematic and easily abused, as well as confusing.&lt;/p&gt;&#xA;&lt;p&gt;If you are satisfied that it is essential in some way, then an example could involve the characteristics of some figures coming from a file, or other input, in which the &lt;em&gt;programmer&lt;/em&gt; doesn't make the decision about which constructor, but the program has to make the decision on the fly.&lt;/p&gt;&#xA;&lt;p&gt;But even that suggestion implies that maybe you are thinking &amp;quot;too concretely&amp;quot; about things.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I hope I'm not too harsh here with your particular hierarchy, which is fine. But there are people out there who would make Rectangle a subclass of Square since &amp;quot;all you have to do is add another dimension.&amp;quot;. Likewise for them a Point has Circle as a subclass, which in turn has Cylinder as a subclass and so on down the rabbit hole. This sort of confused thinking has been around since Turbo Pascal and still appears in some text books.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;For novices you can also turn this sort of thing into a good lesson on what is &amp;quot;known&amp;quot; at compile time vs what can only be known at runtime. The latter is under control of the program itself and only indirectly by the programmer. This knowledge will serve them well if they ever need to write a compiler, for example.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-09-24T18:44:24.047" LastActivityDate="2020-09-24T18:44:24.047" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6560" PostTypeId="2" ParentId="6558" CreationDate="2020-09-24T21:11:57.157" Score="4" Body="&lt;p&gt;I don't have a good answer to this. However here are my thoughts.&lt;/p&gt;&#xA;&lt;h1&gt;Named constructors&lt;/h1&gt;&#xA;&lt;p&gt;A good use for static factory, is to implement named constructors: Java, C#, C++, et al do not have named constructors. However named constructors can be useful, as they allow you to document different ways of constructing an object. Therefore use a static factory, to create the object. The static factory will use private un-named constructors.&lt;/p&gt;&#xA;&lt;h1&gt;Problems with the pattern&lt;/h1&gt;&#xA;&lt;p&gt;However other uses of static factory seem to be an anti-pattern.&lt;/p&gt;&#xA;&lt;p&gt;You now have a super-class depend on the sub-class. The sub-class already depends on the super-class.&lt;/p&gt;&#xA;&lt;p&gt;The static constructor can also easily break the single responsibility principle: the class is a thing and a factory for a thing.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2020-09-25T18:24:58.860" LastActivityDate="2020-09-25T18:24:58.860" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6561" PostTypeId="2" ParentId="6558" CreationDate="2020-09-25T04:20:53.577" Score="2" Body="&lt;p&gt;My go-to for programming patterns these days are games, because it is easy to create compelling examples.&lt;/p&gt;&#xA;&lt;p&gt;It has never occurred to me before to have a factory return its own subclass, so I apologise if I turn out to be off the mark here!&lt;/p&gt;&#xA;&lt;p&gt;However, the use I immediately thought of was an enemy factory that &lt;em&gt;only&lt;/em&gt; provides instances of its subclasses, randomly (or by some rule) choosing which enemy to generate.  This still fulfills the purpose of the factory, should be simple to understand, and allows you to keep some sort of &lt;code&gt;List&amp;lt;Enemy&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="204" LastEditDate="2020-09-25T17:43:32.643" LastActivityDate="2020-09-25T17:43:32.643" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6562" PostTypeId="2" ParentId="6519" CreationDate="2020-09-25T18:07:20.090" Score="2" Body="&lt;p&gt;This brings to mind what Christopher Alexander (an architect, and the inventor of pattern languages).&lt;/p&gt;&#xA;&lt;p&gt;Architecture is traditionally a visual discipline. However Alexander says that in the first stages of a design, when we are exploring user need. We should use linear language (spoken, written, even sign-language e.g. BSL ).&lt;/p&gt;&#xA;&lt;p&gt;However we need to keep ideas simple.&lt;/p&gt;&#xA;&lt;p&gt;Therefore&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Consider what a function/procedure/variable does, before considering how it will do it (or whether it will be a function, procedure or variable).&lt;/li&gt;&#xA;&lt;li&gt;Decide how you will test it before you write it.&lt;/li&gt;&#xA;&lt;li&gt;Write only as much code that is needed to make the test pass.&lt;/li&gt;&#xA;&lt;li&gt;Write only as much test that is needed to make the test fail.&lt;/li&gt;&#xA;&lt;li&gt;Keep each function/procedure/variable simple: ensure it does one thing, and consequently short.&lt;/li&gt;&#xA;&lt;li&gt;Name functions/procedures/variables well: give them names that make sense at the point of use.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;I have the same problem.&lt;/h1&gt;&#xA;&lt;p&gt;I sometimes work with people that are brilliant. They create code that is so complex that even they don't always understand it. I can not do this. My code is simple. My code has very few bugs. My code has higher functionality. But I just can't write complex code.&lt;/p&gt;&#xA;&lt;p&gt;I can't debug complex code. However I have found that I can guess where the code will break (without really understanding it), and am very good at finding some of the bugs (no one can find them all in overly complex code, not even brilliant people).&lt;/p&gt;&#xA;&lt;p&gt;I think it is this inability that has led me to investigate and discovering methods to writing software, that have a high probability of producing bug free, easy to maintain code.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-09-25T18:07:20.090" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6563" PostTypeId="1" AcceptedAnswerId="6565" CreationDate="2020-09-25T23:23:54.500" Score="4" ViewCount="472" Body="&lt;p&gt;I'm looking for effective strategies and projects for introducing non-linear data structures to students.  I currently teach linked lists, stacks, and then introduce binary trees.  A lot of students struggle with the idea that an entire structure is stored in one variable and is not in any particular order (other than infix, prefix etc).  The other thing I notice is weak recursion skills tend to spell doom when first trying to learn these data structures and their operations.  What are some ways for a struggling student to practice recursion in a meaningful way (projects or tools)?  What are some good accompanying algorithms for trees, and eventually self balancing binary trees?&lt;/p&gt;&#xA;&lt;p&gt;The course focuses on C and is aimed at advanced high school students.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastActivityDate="2020-11-28T21:30:35.200" Title="First Time Learning Non-Linear Data Structures" Tags="|secondary-education|algorithms|data-structure|c|" AnswerCount="5" CommentCount="3" FavoriteCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6564" PostTypeId="2" ParentId="6563" CreationDate="2020-09-26T03:52:19.833" Score="2" Body="&lt;p&gt;Weak recursion skills are, indeed, the big problem here.  I also teach advanced high school students, and over the years, I have found that about 15% of students &amp;quot;get&amp;quot; recursion quite quickly, but I haven't found any shortcuts to getting the other 85% to mastery.  Instead, we slog through, using a functional language (Racket) for about 8 weeks.  By the end of that time, they are all quite good at recursion; the language demands it.&lt;/p&gt;&#xA;&lt;p&gt;If I were limiting myself to an imperative language, then I would resign myself first and foremost to the idea that it simply takes time to absorb the norms of recursion.  Unfortunately, eight weeks is about right.  You can break it down as &amp;quot;base case first, then the recursive case&amp;quot; until you're blue in the face, but it will simply take time and a lot of practice for students who have &lt;em&gt;already&lt;/em&gt; gotten quite good at thinking imperatively to be able to switch over to a paradigm so starkly different.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps have them start by building a linked list of ints, one method at a time.  Let them try the given, then show them how to do it.  Build &lt;code&gt;append(int)&lt;/code&gt;, then &lt;code&gt;length()&lt;/code&gt;, then &lt;code&gt;find(int)&lt;/code&gt;, then &lt;code&gt;insert(int, int)&lt;/code&gt;, then, then, then... you can pick an order based on how you wish to present it all.&lt;/p&gt;&#xA;&lt;p&gt;You could then follow this up by bringing them back to their very early programming assignments and ask them to redo the assignments, but ban &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, and &lt;code&gt;goto&lt;/code&gt; (assuming you ever let them use that -- yuck!).  Tell them that the only way permissible to get a loop structure is to use function calls, and allow them to work in pairs without any sort of penalty if they get themselves right and truly stuck.  This will get them used to the mechanics of recursion without having an attendant data structure to also have to learn about.&lt;/p&gt;&#xA;&lt;p&gt;I'd avoid trees until they are able to build mildly complex programs using recursion, because the cognitive tax of recursion is too high to additionally make sense of the data structure (never mind self-balancing!  With how long this all takes, you may decide to forgo that goal for now.)&lt;/p&gt;&#xA;&lt;p&gt;If you do find any faster ways, please post a self-answer.  The only approach I've found is to slog, slog, slog, slog.  It takes time, but it works well, and everyone does eventually get quite good at it.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-09-26T12:22:14.077" LastActivityDate="2020-09-26T12:22:14.077" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6565" PostTypeId="2" ParentId="6563" CreationDate="2020-09-26T12:00:25.483" Score="4" Body="&lt;p&gt;I'm not sure this qualifies as an actual answer, but let me suggest that you give yourself a course in &lt;a href=&quot;https://en.wikipedia.org/wiki/Structural_induction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Structural Induction&lt;/a&gt;. Perhaps you already know of this, of course. But the main idea is that the processing of a data structure (the method invocations) matches the structure of the data itself.&lt;/p&gt;&#xA;&lt;p&gt;Thus, for a binary tree, a method processing an internal node (or the root) will make (recursive) calls to the two child nodes, with the recursion ending at a leaf. This is actually how a recursive descent compiler works, with the processing (parsing) exactly following the structure of the language as defined in a (LL) grammar.&lt;/p&gt;&#xA;&lt;p&gt;One important lesson that you have to teach is that a recursion can do &amp;quot;work&amp;quot; both on the winding phase (before the recursive calls) or after (when they return). That is easily demonstrated with the following code (pseudocode) snippet:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Global s &amp;lt;- 0;&#xA;Fun recur x {&#xA;    If x &amp;gt; 0 {&#xA;        Print x; // winding phase&#xA;        recur x - 1;&#xA;        s &amp;lt;- s + x;&#xA;        Print x; // unwinding phase&#xA;    } Else {&#xA;        Println;&#xA;    }&#xA;    return s;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Translate that to your favorite language and see what it outputs for a call like &lt;code&gt;recur 10&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For a tree structure that means that you can recurse (twice) before you process the current node, thus having the results of the two recursions available. This is often called &amp;quot;bottom-up&amp;quot; processing. OR, you can work top-down by computing something in the current node and passing it down with the two recursive calls. Bottom-up processing can be used to construct a tree, for example as is often done in optimizing compilers.&lt;/p&gt;&#xA;&lt;p&gt;As proof of a &amp;quot;deeper&amp;quot; understanding of recursion. Ask the students to write a linear running time function to copy a list. A quadratic function is easy, but linear running time is a bit harder.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;To teach the winding v unwinding idea I often used a matryoshka. Imagine that you have an unpainted matryoshka (which I do), and you want to &amp;quot;paint&amp;quot; it. You can either &amp;quot;apply colors&amp;quot; before the recursion of &amp;quot;paint&amp;quot; or after, stopping at the innermost doll. You can talk about how messy your fingers get if you do all of the &amp;quot;apply colors&amp;quot; operations on the winding phase, since you have to open a freshly painted doll. A bit weirder, though it demonstrates the point, is that you can &amp;quot;apply colors&amp;quot; to one half on the winding phase and to the other half on the unwinding phase.&lt;/p&gt;&#xA;&lt;p&gt;As a bridge from linear to tree-like structures, imagine a matryoshka that has two &amp;quot;inner&amp;quot; dolls instead of one for each intermediate doll.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-09-27T10:19:16.220" LastActivityDate="2020-09-27T10:19:16.220" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6566" PostTypeId="2" ParentId="6519" CreationDate="2020-09-27T00:05:36.497" Score="4" Body="&lt;p&gt;This may sidestep the question a bit, but perhaps you can have the student make physical drafts of what they want their program to do at first, kind of like making multiple drafts of essays.&lt;/p&gt;&#xA;&lt;p&gt;As an undergraduate, I sometimes joked that I used an awful lot of paper for a computer science student. I found that dumping everything from my head or even the problem statement onto pieces of paper (more portable) or a very large whiteboard helped me to organize my thoughts and eventually figure out what I wanted to do for my harder programming assignments as well as the problem sets in my algorithms class. I also did this when I was just starting out in CS and programming, just on a smaller scale and not for very long. This was especially helpful when I was learning about recursion.&lt;/p&gt;&#xA;&lt;p&gt;I also found this helpful for helping students when I was a TA for the CS department's discrete mathematics course, which was taught in two different styles: paper and pencil, and with a theorem prover language (Lean) (a lot of students felt like it was programming). It especially helped for the latter style, as students sometimes knew what they wanted to do in a proof but couldn't figure out how to express the proof in Lean because they didn't understand how they were supposed to understand the syntax. Based on what some of those students said, I think drawing everything out for them helped them to eventually visualize on their own.&lt;/p&gt;&#xA;&lt;p&gt;If the student is just starting out with programming, the drafts shouldn't be too complex yet, so hopefully they won't be too taxing and they can be a stepping stone to eventually being able to getting mental images of program structures.&lt;/p&gt;&#xA;" OwnerUserId="8132" LastActivityDate="2020-09-27T00:05:36.497" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6567" PostTypeId="2" ParentId="2808" CreationDate="2020-09-27T13:33:18.027" Score="1" Body="&lt;h1&gt;Assignment is bad&lt;/h1&gt;&#xA;&lt;p&gt;This is basically the functional language position.&#xA;And much of Backus landmark &lt;a href=&quot;https://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;rct=j&amp;amp;url=https://dl.acm.org/ft_gateway.cfm%3Fid%3D1283933%26type%3Dpdf&amp;amp;ved=2ahUKEwj4kfCOuInsAhUJzTgGHaRTCpQQFjAAegQICxAC&amp;amp;usg=AOvVaw2CJCimPqlvybGfpxgk5oK2&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turing award&lt;/a&gt;&#xA;remains relevant nearly 50 years on.&lt;br /&gt;&#xA;We could rehash those arguments if we wish; but it's good to have something like the Backus TAL as a point of departure for that.&lt;/p&gt;&#xA;&lt;h1&gt;Mutation&lt;/h1&gt;&#xA;&lt;p&gt;Mutation often looks like assignment but is worse&lt;/p&gt;&#xA;&lt;p&gt;A small Python session showing&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;no assignment&lt;/li&gt;&#xA;&lt;li&gt;assignment,&lt;/li&gt;&#xA;&lt;li&gt;mutating function&lt;/li&gt;&#xA;&lt;li&gt;mutating assignment&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Session&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt; # Functional behavior; no assignment/mutation no problems&#xA;&amp;gt;&amp;gt;&amp;gt; a = [1,2,3]&#xA;&amp;gt;&amp;gt;&amp;gt; c = [a,a]&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3], [1, 2, 3]]&#xA;&amp;gt;&amp;gt;&amp;gt; a+[4]&#xA;[1, 2, 3, 4]&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3], [1, 2, 3]] # unchanged&#xA;&#xA;# Assignment; but still harmless&#xA;&amp;gt;&amp;gt;&amp;gt; a =[1,2,3]&#xA;&amp;gt;&amp;gt;&amp;gt; c = [a,a]&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3], [1, 2, 3]]&#xA;&amp;gt;&amp;gt;&amp;gt; a = a + [4]&#xA;&amp;gt;&amp;gt;&amp;gt; a&#xA;[1, 2, 3, 4] # changed as expected &#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3], [1, 2, 3]] #unchanged as expected &#xA;&amp;gt;&amp;gt;&amp;gt;&#xA;&#xA;#append looks like + but it actually mutates&#xA;&amp;gt;&amp;gt;&amp;gt; a = [1,2,3]&#xA;&amp;gt;&amp;gt;&amp;gt; c = [a,a]&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3], [1, 2, 3]]&#xA;&amp;gt;&amp;gt;&amp;gt; c[0].append(4)&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[1, 2, 3, 4], [1, 2, 3, 4]]&#xA;# Note how changing c[0] changed c[1]&#xA;# ie the unholy alliance between aliasing&amp;amp;mutation&#xA;&#xA;&amp;gt;&amp;gt;&amp;gt; d = [[1,2,3] for i in [1,2]]&#xA;&amp;gt;&amp;gt;&amp;gt; d&#xA;# A d which looks just like c&#xA;[[1, 2, 3], [1, 2, 3]]&#xA;&amp;gt;&amp;gt;&amp;gt; d[0].append(4)&#xA;&amp;gt;&amp;gt;&amp;gt; d&#xA;[[1, 2, 3, 4], [1, 2, 3]]&#xA;# But changing c[0] doesn't change c[1]&#xA;# ie different aliasing&#xA;&#xA;&#xA;&amp;gt;&amp;gt;&amp;gt; a = [1,2,3]&#xA;&amp;gt;&amp;gt;&amp;gt; c = [a,a]&#xA;&amp;gt;&amp;gt;&amp;gt; a[:] = [4,5] # mutation note the ':'&#xA;&amp;gt;&amp;gt;&amp;gt; c&#xA;[[4, 5], [4, 5]]  # WHAZZAT! &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;What do I recommend&lt;/h1&gt;&#xA;&lt;h2&gt;1st choice&lt;/h2&gt;&#xA;&lt;p&gt;Use a language like Haskell -- no assignment, no mutation.&lt;br /&gt;&#xA;Or at least Scheme/ML where these are mostly not used&lt;/p&gt;&#xA;&lt;h2&gt;2nd choice&lt;/h2&gt;&#xA;&lt;p&gt;Use a language like Python as a &amp;quot;functional assembly language&amp;quot;.&lt;br /&gt;&#xA;ie Use it like a functional language; don't teach mention append/extend etc the mutating methods.&#xA;When some smart Alec comes up using these break his code in the above paradigm!&lt;/p&gt;&#xA;&lt;p&gt;This is what I often end up doing.&lt;/p&gt;&#xA;&lt;h2&gt;3rd choice&lt;/h2&gt;&#xA;&lt;p&gt;Teach all the mess and confuse the students&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="1035" LastEditDate="2020-10-11T13:37:05.240" LastActivityDate="2020-10-11T13:37:05.240" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6568" PostTypeId="2" ParentId="6563" CreationDate="2020-09-27T14:01:51.957" Score="3" Body="&#xA;&lt;h1&gt;Is Recursion hard?&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/L._Peter_Deutsch&quot; rel=&quot;nofollow noreferrer&quot;&gt;Peter Deutsch&lt;/a&gt;, the creator of the smalltalk implementation that inspired the Java-jit (and much else), famously said:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;To iterate is human, to recurse divine&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So you and your struggling students are in august company!&lt;/p&gt;&#xA;&lt;p&gt;Now let's turn over to math. And not just math but...&lt;/p&gt;&#xA;&lt;h1&gt;Basic school math&lt;/h1&gt;&#xA;&lt;p&gt;Here are two identities&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$$&#xA;\begin{aligned}&#xA;a(b+c)  &amp;amp;= ab + ac &amp;amp; \text{distributive law} \\&#xA;x^{m+n} &amp;amp;= x^m x^n &amp;amp; \text{index law}&#xA;\end{aligned}&#xA;$$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;I guess everyone will agree that &lt;em&gt;in the context of school math&lt;/em&gt; these are&#xA;unproblematic? Almost trivial?&lt;/p&gt;&#xA;&lt;p&gt;Lets special-case the above with &lt;span class=&quot;math-container&quot;&gt;$c=1$&lt;/span&gt; in the first and &lt;span class=&quot;math-container&quot;&gt;$n=1$&lt;/span&gt; in the second and we get&#xA;&lt;span class=&quot;math-container&quot;&gt;$$&#xA;\begin{aligned}&#xA;a(b+1) &amp;amp;= ab + a \\&#xA;x^{m+1} &amp;amp;= xx^m&#xA;\end{aligned}&#xA;$$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Lets now ponder...&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are these equations in any way difficult?&lt;/li&gt;&#xA;&lt;li&gt;Do you (anyone) find it an issue that they are recursive?&lt;/li&gt;&#xA;&lt;li&gt;Does one even &lt;strong&gt;notice&lt;/strong&gt; that they are recursive?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(Assuming that the answer to all the above is no,no,no)&lt;br /&gt;&#xA;Lets ask now:&lt;br /&gt;&#xA;Whats this to do with programming?&lt;/p&gt;&#xA;&lt;p&gt;Well... All we need are base cases, respectively&#xA;&lt;span class=&quot;math-container&quot;&gt;$$a.0 = 0$$&lt;/span&gt;&#xA;&lt;span class=&quot;math-container&quot;&gt;$$x^0 = 1$$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;And we get a complete recursive specification for multiplication as repeated addition and exponentiation as repeated multiplication&lt;/p&gt;&#xA;&lt;p&gt;These can be trivially&lt;sup&gt;1&lt;/sup&gt; translated to haskell as&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;a*(b+1) = a*b + a&#xA;a*0     = 0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;x^(m+1) = x*(x^m)&#xA;x^0     = 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;Returning to the Programming world&lt;/h1&gt;&#xA;&lt;p&gt;Ok so you say that this is some math-toy. What's it to do with programming?&lt;/p&gt;&#xA;&lt;h1&gt;An inappropriate pun&lt;/h1&gt;&#xA;&lt;p&gt;In almost all today's programming languages you can write the &amp;quot;statement&amp;quot;&#xA;&lt;code&gt;i = 1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;And in math we write &lt;span class=&quot;math-container&quot;&gt;$i = 1$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Doing the first makes the second true; or staying in the programming world, after &lt;code&gt;i = 1&lt;/code&gt;&#xA;&lt;code&gt;i == 1&lt;/code&gt;&#xA;becomes true&lt;/p&gt;&#xA;&lt;p&gt;So what's the big deal?&#xA;Well programmers also write&#xA;&lt;code&gt;i = i+1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;(Or moral equivalents like &lt;code&gt;i++&lt;/code&gt; &lt;code&gt;i += 1&lt;/code&gt; etc)&lt;/p&gt;&#xA;&lt;p&gt;So after &lt;code&gt;i = i+1&lt;/code&gt; does &lt;code&gt;i == i+1&lt;/code&gt; ?!&lt;/p&gt;&#xA;&lt;p&gt;Lets ask our math-respecting executor Haskell:&lt;br /&gt;&#xA;One can easily enough &lt;em&gt;write&lt;/em&gt;&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt; i = i+1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And no trouble...it seems&lt;/p&gt;&#xA;&lt;p&gt;But when we ask what is &lt;code&gt;x&lt;/code&gt; we get, almost literally, an explosion!&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt; ? i&#xA; &#xA; ERROR: Control stack overflow&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In effect our executor is saying that it got into trouble trying to &amp;quot;solve the equation&amp;quot; &lt;span class=&quot;math-container&quot;&gt;$i=i+1$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h1&gt;So is the problem in programming or math??&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;Mathematicians&lt;/strong&gt; would almost universally protest at &lt;span class=&quot;math-container&quot;&gt;$i=i+1$&lt;/span&gt; as&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;wrong&lt;/li&gt;&#xA;&lt;li&gt;impossible&lt;/li&gt;&#xA;&lt;li&gt;no (finite) solution&lt;/li&gt;&#xA;&lt;li&gt;or just plain nonsense&lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Clearly if we &lt;strong&gt;programmers&lt;/strong&gt; accept &lt;code&gt;i=i+1&lt;/code&gt; as normal and ok we cannot then expect our &lt;strong&gt;programs&lt;/strong&gt; to respect &lt;strong&gt;mathematical&lt;/strong&gt; concepts.&lt;/p&gt;&#xA;&lt;p&gt;So it seems we have&lt;/p&gt;&#xA;&lt;h1&gt;An inevitable dilemma: Programming XOR Mathematics&lt;/h1&gt;&#xA;&lt;p&gt;This seems like a very high price to pay!&lt;/p&gt;&#xA;&lt;p&gt;But there's good news!&lt;/p&gt;&#xA;&lt;p&gt;A large number of very intelligent people for many decades have thought about the problem and come to a very simple conclusion:&lt;/p&gt;&#xA;&lt;h1&gt;The culprit is assignment&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Once you have assignment, a mathematical semantics of our programming language is a lost cause&lt;/li&gt;&#xA;&lt;li&gt;Throw the assignment out of the programming language (and morally equivalent things like mutating data-structures)&lt;sup&gt;2&lt;/sup&gt; and your programming language essentially becomes mathematics&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;A bit of terminology&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Those who think as above and prefer assignment-free&lt;sup&gt;3&lt;/sup&gt; languages are typically called &lt;em&gt;functional&lt;sup&gt;4&lt;/sup&gt; programmers&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Languages with assignment are called &lt;em&gt;imperative languages&lt;/em&gt; (and from the pov above OO and classic imperative languages are much the same)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Conclusion&lt;/h1&gt;&#xA;&lt;p&gt;So in answer to your explicit statement: &lt;em&gt;My students find recursion hard!&lt;/em&gt; and its implied questions: &lt;em&gt;Am I or my students doing something wrong?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The answer is Yes: Using imperative programming in a first programming course&#xA;&lt;sup&gt;5&lt;/sup&gt; befuddles their thinking&lt;/p&gt;&#xA;&lt;p&gt;Or hear &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budget%20Council%20concerning%20Haskell.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra's take&lt;/a&gt; on this&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; Ok for those who try this in haskell there are some wrinkles -- Ive tested in &lt;a href=&quot;https://en.m.wikipedia.org/wiki/Gofer_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;gofer&lt;/a&gt;&#xA;-- &lt;strong&gt;GO&lt;/strong&gt;od &lt;strong&gt;F&lt;/strong&gt;or &lt;strong&gt;E&lt;/strong&gt;quational &lt;strong&gt;R&lt;/strong&gt;easoning -- a Haskell predecessor which facilitates this kind of playing around better than Haskell&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;2&lt;/sup&gt; Mutation is actually much worse than assignment; in fact mutation messes up imperative programming as much as imperative programming messes up mathematics. A &lt;a href=&quot;https://cseducators.stackexchange.com/a/6567/8837&quot;&gt;brief trailer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;3&lt;/sup&gt; And sequencing... A story for another day&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;4&lt;/sup&gt; &amp;quot;Functional&amp;quot; is actually a misnomer; something like &amp;quot;mathematical&amp;quot; would have been better.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;5&lt;/sup&gt; Imperative programming of course must be taught; if it is done in a later course, there is no unnecessary confusion.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2020-11-01T15:24:54.257" LastActivityDate="2020-11-01T15:24:54.257" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="6569" PostTypeId="2" ParentId="6563" CreationDate="2020-09-27T17:02:26.060" Score="3" Body="&lt;p&gt;I tried a hybrid of both your suggestions together @Buffy, @Rusi&#xA;Beginning with induction principle leading to an inductive definition...for lists in haskell.&lt;/p&gt;&#xA;&lt;p&gt;We began by proving that:&#xA;&lt;span class=&quot;math-container&quot;&gt;$$\sum_{i=0}^n i = \frac{n(n+1)}{2}$$&lt;/span&gt; as learnt in school. Then we dwelt a bit on the process and the structure of numbers and how induction indeed proves our claim.&#xA;That the process of construction of numbers is (+1)&#xA;and from here we took a leap to (x:xs) as the process of construction of lists&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sum [] = 0&#xA;sum (x: xs) = x + magic&#xA;              where&#xA;                 magic = sum xs&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The &lt;strong&gt;magic&lt;/strong&gt; was the induction hypothesis. And we did not simplify the code until this sunk in.&lt;/p&gt;&#xA;&lt;p&gt;So I never once called it recursion, always induction.&lt;/p&gt;&#xA;&lt;p&gt;Its been &lt;strong&gt;magic&lt;/strong&gt;al! week3 into intro course and the kids are pumping out all kinds of recursive definitions. And now they use the words synonymously!&lt;/p&gt;&#xA;" OwnerUserId="9549" LastEditorUserId="9549" LastEditDate="2020-09-27T17:36:52.940" LastActivityDate="2020-09-27T17:36:52.940" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6570" PostTypeId="2" ParentId="6548" CreationDate="2020-09-28T05:36:58.720" Score="4" Body="&lt;p&gt;Funny, I came here to look for advice on getting students to write pseudocode, because mine struggle so much to do it. So here is why I want them to do it. If I set the activity up properly, and they engage with it, then they will really be planning their program before they start to write it. There are different reasons people like to &amp;quot;dive in&amp;quot; to code. Sometimes an entire solution just occurs to you and there's no reason not to start right in. But sometimes, it's because you don't know any other way. Just start typing and see what pops out. This leads to &amp;quot;programming by perturbation&amp;quot;, where you arrive somewhere kind of close to a solution by a mix of chance and lucky guesses, and just kinda change symbols here and there until it &amp;quot;works&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;I've tried assigning flowcharts over the years, but I think pseudocode works better for my teaching style. I can explain more clearly what I want the students to try to do. They still resist, and because the little details (like &lt;code&gt;for&lt;/code&gt; loop fiddling) are still more enticing to think about than the big picture of how the program will do its job, I still have to nudge them and encourage them to keep the birds-eye view. So for me (and perhaps this also addresses other comments on your question), it's not so much that pseudocode is really a great way to think deeply or at a high level. It's that insisting on a natural-language description of the problem and its solution seems to be an effective path toward my goal. And what is the goal? To make sure that the learners have a mental model of what their program should do—all or most of the way through, not just the first step, and perhaps even anticipating some tricky edge cases—before they start nesting up a bunch of &lt;code&gt;for&lt;/code&gt; loops and &lt;code&gt;break&lt;/code&gt; statements. That's the first thing, the immediate goal of the lesson.&lt;/p&gt;&#xA;&lt;p&gt;Now to really answer your question, my experience suggests that learners can learn the most when they explain their solutions to others. This is not really possible to do, unless you've practiced the kind of communication we're talking about. You don't explain your program by reading the listing verbatim. You have to paraphrase it so that its parts correspond to your mental model, because the model is ultimately what you are conveying to the listener. In fact, I'm much less interested in whether students can produce programs that solve the problems I pose than in their thought processes along the way, which they can only convey to me by explanations in the natural languages we share.&lt;/p&gt;&#xA;" OwnerUserId="6111" LastActivityDate="2020-09-28T05:36:58.720" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6572" PostTypeId="2" ParentId="927" CreationDate="2020-09-30T18:36:08.410" Score="2" Body="&lt;p&gt;Set a standard for the course and adhere to that standard.  If a student cannot meet that standard, inform the student of their options.  However, do not water down the teaching as that negatively impacts the other students, the value of the major and the prestige of the school.&lt;/p&gt;&#xA;&lt;p&gt;There is a school in my area that pumped out a lot of CS students that were inept in CS positions.  We've now decided that a CS degree from that school means you know a lot of Excel formulas, but can't analyze business processes or write functional code. Internally, we no longer consider a CS degree from that school as a qualification for a CS position, though they make great accountants. :)&lt;/p&gt;&#xA;" OwnerUserId="4380" LastActivityDate="2020-09-30T18:36:08.410" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6573" PostTypeId="2" ParentId="5023" CreationDate="2020-10-05T06:55:10.587" Score="3" Body="&lt;p&gt;An example from a non-technical field where counting is universally from 1 and it has strange consequences.&lt;/p&gt;&#xA;&lt;p&gt;In music, chord intervals start from unision or 1st — that is the two notes sound the same note — and go up 2nd 3rd 4th 5th 6th 7th 8th which is an octave. Thus:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Aqnit.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Aqnit.jpg&quot; alt=&quot;Octave intervals&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now we go further up from the octave :&#xA;9th 10th 11th 12th 13th 14th 15th = 2 octaves&lt;/p&gt;&#xA;&lt;p&gt;Notice something strange? The 8th of the octave did not double to a 16th of two octaves!&lt;/p&gt;&#xA;&lt;p&gt;What gives?&#xA;The real issue is this:&lt;/p&gt;&#xA;&lt;h1&gt;An octave has 7 notes!&lt;/h1&gt;&#xA;&lt;p&gt;&amp;quot;Octave&amp;quot; itself is a misnomer!&lt;/p&gt;&#xA;&lt;p&gt;ie C, D, E, F, G, A, B is the &amp;quot;octave&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;After that the &amp;quot;loop&amp;quot; repeats at/from the next C.&lt;/p&gt;&#xA;&lt;p&gt;And so if we had counted — better measured — the C-C chord — the so-called &amp;quot;unision&amp;quot; — as a zeroth then C-D, a single whole-tone step, would be a first and so on upto C-C being a 7th. And continuing C-(next)C would be a 14th thereby keeping our (arithmetic) expectation intact.&lt;/p&gt;&#xA;&lt;p&gt;Of course the key as many others have pointed out is that the distance &lt;em&gt;measured&lt;/em&gt; rather than &lt;em&gt;counted&lt;/em&gt; between C and itself &lt;strong&gt;is zero!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h1&gt;In more Math language&lt;/h1&gt;&#xA;&lt;p&gt;In ℤ {0,1} are special&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The infinite cyclic group (ℤ,+)&#xA;has 0 identity and 1 generator&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The field ℝ (or ℚ) has no generator&#xA;ie 0 remains special, 1 less so.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2020-10-05T07:46:28.980" LastActivityDate="2020-10-05T07:46:28.980" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6578" PostTypeId="1" AcceptedAnswerId="6580" CreationDate="2020-10-10T18:52:07.247" Score="4" ViewCount="136" Body="&lt;p&gt;I'm not sure if someone can help or if this is even the right place to ask, but I've been looking for a while for a marvelous essay / blog post / article from an author whose name I don't recall, that I had stumbled upon a few years ago.&lt;/p&gt;&#xA;&lt;p&gt;From what I recall, the author had been credited as an inspiration for Khan Academy's &amp;quot;Intro to Computer Programming&amp;quot; interface. The author says in that article that much better than this interface can be done.&lt;/p&gt;&#xA;&lt;p&gt;The essay is then a point-by-point lesson on UX design in general, going over possible improvements to Khan Academy's UI/UX interface for learning code, as a detailed example of each of the points he is making.&lt;/p&gt;&#xA;&lt;p&gt;Thank you very much to anyone that might know what I am referring to, and link me to it.&lt;/p&gt;&#xA;" OwnerUserId="9588" LastActivityDate="2020-10-12T18:29:49.470" Title="Looking for a blog article on the UI/UX design of an interactive coding interface like Khan Academy's" Tags="|resource-request|resource-information|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6579" PostTypeId="1" CreationDate="2020-10-12T11:37:53.950" Score="4" ViewCount="85" Body="&lt;p&gt;I am teaching an elective course on algorithms for 3rd year undergraduates. There are 12 weekly assignments, each of which is worth 1% of the grade, and a final exam which is worth 88%. I would like to encourage the higher-level students to get into research, and to this end I would like to first encourage them to read research papers. So I plan to add a bonus assignment on research papers related to the course topic. My current plan is to offer them a list of papers and have each student pick a different one. The assignment will have 4 parts, each of which is worth 6% bonus points:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Parts 1+2: understanding the paper&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Summarize the paper in your own words: what problem is the paper trying to solve? What are the existing solutions? What is the new algorithm? What problems are left for future work?&lt;/li&gt;&#xA;&lt;li&gt;Construct at least 3 substantially different examples for the algorithm presented in the paper (besides the examples given in the paper, if any): run the algorithm by hand on each example, and show that the outcome indeed satisfies the output guaratees of the algorithm.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;Parts 3+4: programming the algorithm&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;Write in Python (or another programming language) a skeleton of an implementation of the main algorithm in the paper. A &amp;quot;skeleton&amp;quot; is the heading of a function, without the function implementation. Write unit-tests based on your examples from part 2.&lt;/li&gt;&#xA;&lt;li&gt;Program the algorithm and test it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The idea of the programming part is that programming an algorithm requires a very detailed understanding of the algorithm. Additionally, my students are very good at programming, but not as good at reading research papers, so this part of the exercise is like a bridge between what they are good at and the new skill I would like them to learn.&lt;/p&gt;&#xA;&lt;p&gt;I will be happy for feedback and further suggestions regarding this plan, both in general (e.g. is this indeed a good way to encourage good students to get into the world of research?) and in the details (e.g. is the partition to 4 parts reasonable?).&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2020-10-12T19:27:08.557" Title="Feedback request: an assignment on programming a research paper" Tags="|algorithms|homework|scientific-papers|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6580" PostTypeId="2" ParentId="6578" CreationDate="2020-10-12T18:29:49.470" Score="7" Body="&lt;p&gt;I found it !! Boy, I'm so glad. Had a bolt of insight in how I should use Google's advanced search features, and I found it.&lt;/p&gt;&#xA;&lt;p&gt;Here is the article:&#xA;&lt;a href=&quot;http://worrydream.com/LearnableProgramming/&quot; rel=&quot;noreferrer&quot;&gt;http://worrydream.com/LearnableProgramming/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;An article by Bret Victor, from 2012. A great read, for those curious.&lt;/p&gt;&#xA;" OwnerUserId="9588" LastActivityDate="2020-10-12T18:29:49.470" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6581" PostTypeId="2" ParentId="6579" CreationDate="2020-10-12T19:27:08.557" Score="2" Body="&lt;p&gt;With regards to your setup, one concern that I have is that the steps might not make a lot of sense, at least as written.  It would be very useful if you provided one exemplar of what you mean for a summary to look like, and what you would like an algorithm &amp;quot;run by hand&amp;quot; to look like.  For the first part, a summary could mean two sentences, or it could mean a few pages with diagrams that break down the activity.  As for the second, I am not sure what is meant by &amp;quot;run by hand&amp;quot;, and it would not surprise me in the least if others also find it confusing.&lt;/p&gt;&#xA;&lt;p&gt;Now, there is the question you didn't ask.  Structurally, a course with 88% of the grade as a final exam is, for all functional purposes, a course with 100% of the grade as a final exam.  Why devalue all of the work, and permit a single bad day to destroy a student's entire semester (and possibly put their entire academic career at risk?)&lt;/p&gt;&#xA;&lt;p&gt;I once had a student come into an exam several hours after her mother and brother died in a catastrophic car accident.  She didn't say anything, sat for the exam, worked on only two of the problems, turned it in and walked out of the room.  This was not for a super-high-stakes final, just for a regular quiz!&lt;/p&gt;&#xA;&lt;p&gt;I only found out several days later what had happened.  I quietly threw out the quiz, and gave her a new one after she returned and had had some time to pull her academic life back in order.&lt;/p&gt;&#xA;&lt;p&gt;I have had students come in after catastrophes, I've had them come in sick, I've had them come in after relationship breakups... none of these were students that came in at my request.  They just showed up.  These experiences have made me very wary of single-entry, &amp;quot;do or die&amp;quot; exams.&lt;/p&gt;&#xA;&lt;p&gt;Why not three exams at 22%, 22%, and 44%?  This softens the &amp;quot;bad day&amp;quot; problem, and also gives students at least &lt;em&gt;some&lt;/em&gt; feedback along the way to help them right the ship if they think that they're in better shape than they really are.&lt;/p&gt;&#xA;&lt;p&gt;Remember that we don't teach topics, we teach people.  They are our charges, and we are ultimately there to help them.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-10-12T19:27:08.557" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6582" PostTypeId="2" ParentId="6001" CreationDate="2020-10-15T22:32:45.687" Score="1" Body="&lt;p&gt;I think this answer is the second derivative.&lt;/p&gt;&#xA;&lt;p&gt;Maybe it depends on who are you are targeting with the course.  If it's someone who is just graduating from using a browser to writing something in the browser; the student will be completely lost.  If it's someone who has most of an undergraduate CS education, including a course on compilers; you are fine.&lt;/p&gt;&#xA;&lt;p&gt;I'm teaching an introductory course on web tech right now at &lt;a href=&quot;https://ashesi.edu.gh&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ashesi University&lt;/a&gt;; and while my students have been programming in python for a while; have taken data structures your description would lose most of them.  Part of the answer depends on where you are going.  You may need to give some context on the history of the internet.  Especially with current college students; they are all digital natives who don't remember a time before browsers and cell phones; so I might start with some basics on the world wide web; and the problem JavaScript and its ilk were meant to solve.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In the beginning the web was focused solely on structured markup.&lt;/li&gt;&#xA;&lt;li&gt;As MOSAIC (the first graphical web based browser built by a team at University of Illinois) transitioned to commercial products, notably Netscape's Navigator browser and Microsoft's Internet Explorer; there was a realization that tags themselves were not enough; and there was competition between commercial players in integrating scripting as part of the web; initially thought of as a way to provide more sophisticated animation as part of the page.&lt;/li&gt;&#xA;&lt;li&gt;The language Java was emerging from Sun Microsystems (now part of Oracle) as a new, type safe and object oriented language derived from the language C's syntax.&lt;/li&gt;&#xA;&lt;li&gt;Netscape embraced Java; and began writing much of their software in it.&lt;/li&gt;&#xA;&lt;li&gt;JavaScript as a language has very little to do with Java the language other than sharing a name.  JavaScript is interpreted, is not type safe--that is it does not enforce checking that integers are integers, strings are strings, etc--and models many of it's best features from functional programming languages like Lisp.  Like Java it does use a C like syntax; and while it support objects, they are supported using prototypical--where object definition is implicit--rather than class inheritance as languages like Java and Python do where class definition is separate from object instantiation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In my class we did a section on early internet evolution that put alot of this in context (one class; where I had guest speakers who worked on building early browsers...I'm a dinosaur too so I know other dinosaurs).&lt;/p&gt;&#xA;&lt;p&gt;Then the other stuff is good to illustrate the difference.  Esp. with node one of the practical things to discuss is since it was an embedded language to start; alot of features people take for granted (say coming from Java) like packages and modules aren't part of the core engine.  Those had to be invented so that JavaScript could run in a REPL when node was introduced.&lt;/p&gt;&#xA;" OwnerUserId="9604" LastActivityDate="2020-10-15T22:32:45.687" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6583" PostTypeId="1" CreationDate="2020-10-19T08:12:42.530" Score="7" ViewCount="110" Body="&lt;p&gt;As a teacher on an IT high school, I am teaching the basics of C#, JavaScript and PHP (in different years of their study of course)&lt;/p&gt;&#xA;&lt;p&gt;For about 3 years I had been happily using the repl.it classrooms. In this environment the pupil could&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;see the assignment&lt;/li&gt;&#xA;&lt;li&gt;write and &lt;strong&gt;execute&lt;/strong&gt; code&lt;/li&gt;&#xA;&lt;li&gt;interact with the console&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;and I could&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;inspect his/her code&lt;/li&gt;&#xA;&lt;li&gt;execute it&lt;/li&gt;&#xA;&lt;li&gt;give comments&lt;/li&gt;&#xA;&lt;li&gt;see whether he had tried and/or submitted&lt;/li&gt;&#xA;&lt;li&gt;Also, depending on the language&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I could either set some of his/her submissions as finished&lt;/li&gt;&#xA;&lt;li&gt;or they simple passed all unit tests and were closed automatically.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However, repl.it had announced the clousure of its classrooms at the end of 2020, replacing it with Repl teams, which are an immature product much less reliable and comfortable compared to the previous classrooms, lacking some of its features&lt;/p&gt;&#xA;&lt;p&gt;I am looking for any suggestions for an enviroment we could migrate to. I know big universities usually have their own closed systems. But, it there some service that is open to public, for a reasonable fee?&lt;/p&gt;&#xA;" OwnerUserId="9620" LastActivityDate="2020-10-27T05:31:42.003" Title="REPL environment for teacher assignments" Tags="|best-practice|classroom-management|classroom-infrastructure|programming-environment|evaluation|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6584" PostTypeId="2" ParentId="5157" CreationDate="2020-10-22T05:40:33.897" Score="3" Body="&lt;p&gt;I like to think about pure function as a transmutation of inputs. Just like in Alchemy you connect Fire and Water to get Steam. Fire and Water are inputs, Steam is output. Or treat function as an assembly machine -- it takes resources, and converts those into another resource.&lt;/p&gt;&#xA;&lt;p&gt;After that try posing a question: given two integer numbers as an input, what kinds of transmutation about these two numbers can you think about?&lt;/p&gt;&#xA;&lt;p&gt;So first idea should be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;add numbers to get a number&lt;/li&gt;&#xA;&lt;li&gt;multiply numbers&lt;/li&gt;&#xA;&lt;li&gt;substract numbers&lt;/li&gt;&#xA;&lt;li&gt;divide numbers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And usually that's it, I mean, student fantasy often stops here. Now your turn to make &amp;quot;how did I not think about it?&amp;quot; in student's brain:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;substract first number from second (change argument order)&lt;/li&gt;&#xA;&lt;li&gt;modulo divide two numbers&lt;/li&gt;&#xA;&lt;li&gt;integer part of division&lt;/li&gt;&#xA;&lt;li&gt;exponentiate numbers&lt;/li&gt;&#xA;&lt;li&gt;treat numbers as triangle sides and compute hypotenuse by Pythagorean rule&lt;/li&gt;&#xA;&lt;li&gt;min or max of two&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Make sure students understood what every of these functions had done to two numbers. Ask them &amp;quot;anything else?&amp;quot; and if they produce more math examples (combinations), this is good, but at some step stop them and show this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;drop second (i.e., function which takes two arguments, and returns only first)&lt;/li&gt;&#xA;&lt;li&gt;drop first&lt;/li&gt;&#xA;&lt;li&gt;return those two back as a 2-tuple&lt;/li&gt;&#xA;&lt;li&gt;return those two back as a swapped 2-tupple&lt;/li&gt;&#xA;&lt;li&gt;return nothing&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Now again, ask students &amp;quot;anything else?&amp;quot;, make sure they understand how a function can take two arguments and do nothing, and return nothing, this is quite counterfactual for some. It is good if some list results are guessed, otherwise, show yourself:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;return list, where first arg is repeated second arg times&lt;/li&gt;&#xA;&lt;li&gt;range of numbers from min arg to max arg&lt;/li&gt;&#xA;&lt;li&gt;sum of consecutive numbers from min arg to max arg&lt;/li&gt;&#xA;&lt;li&gt;numbers from 1 to first arg with second arg step&lt;/li&gt;&#xA;&lt;li&gt;numbers from 1 with first arg as step and second arg item count&lt;/li&gt;&#xA;&lt;li&gt;first arg count primes, each divided by second arg&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Make sure students are able to visualize each example, of how two numbers transform to list. The biggest sign of this is when they get the pattern and try to produce own examples. After some time, you break their brain again:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a list where number 42 is repeated first arg times, and then second arg is repeated 200 times&lt;/li&gt;&#xA;&lt;li&gt;a list where first arg is repeated 3 times, then second arg is repeated 3 times, then first arg is repeated 4 times&lt;/li&gt;&#xA;&lt;li&gt;a list where 3 is repeated first arg times, then 0 and this whole pattern is repeated second arg times x5&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ask students &amp;quot;anything else?&amp;quot;, and if they grok pattern they should start some random list generations with some random numbers. The more random examples, the better, creativity is not easy. But at some point you break their brain once more:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;given two args, return a function which will take one more arg and return sum of three args&lt;/li&gt;&#xA;&lt;li&gt;given two args, return a function which will take one arg and ignore previous two args alltogether, and return square of an argument&lt;/li&gt;&#xA;&lt;li&gt;given two args, return a function which takes list as an argument, and returns range of numbers from this list using two previous args&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It is mind-shifting to think about function which returns a function, but if students can provide own examples (however fantastic), this is very good sign. Good if somebody can create function which returns a function which returns a function. But if not:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;takes 2 args, returns a function, which takes no args and returns a function which takes 1 arg and returns pair of previous 2 args each multiplied by arg in innermost function (sic!)&lt;/li&gt;&#xA;&lt;li&gt;return a function, which takes a function as an argument, and returns application of this arg function to previous 2 args&lt;/li&gt;&#xA;&lt;li&gt;return a function, which takes a function as an argument, applies it first arg, and then applies itself to this result, and continues this process second arg times&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;After students brain is completely devastated by trying to imagine this, you show a few more examples:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;compare two numbers and return &amp;quot;less&amp;quot;, &amp;quot;greater&amp;quot;, &amp;quot;equal&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;return True if both are greater than 42, False otherwise&lt;/li&gt;&#xA;&lt;li&gt;convert numbers to strings and return them combined&lt;/li&gt;&#xA;&lt;li&gt;translate these numbers to Mongolian and return a tuple of string representations&lt;/li&gt;&#xA;&lt;li&gt;... show creativity!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ok, and after all this done, ask the original question again &amp;quot;what can a function do with two numbers&amp;quot; and check student recall, how many of these examples were really grokked. The simple &lt;code&gt;def plus(a, b): return a + b&lt;/code&gt; will now look different in student's head&lt;/p&gt;&#xA;&lt;p&gt;P.S. After lesson is done, you tell &amp;quot;all the examples we talked about were about pure functions. But if we consider impure functions, then ...&amp;quot; :)&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-10-22T05:40:33.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6585" PostTypeId="2" ParentId="5157" CreationDate="2020-10-23T05:17:00.903" Score="3" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Can I craft an exercise ... that would give a dramatically wrong output, e.g. cause the screen to &amp;quot;blow&amp;quot; up if the function &lt;strong&gt;print&lt;/strong&gt;-ed instead of &lt;strong&gt;return&lt;/strong&gt;-ed...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;[my emphasis]&lt;/p&gt;&#xA;&lt;p&gt;Early in my Python classes I do (something like) this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; def foo(x):&#xA;...   print(2*x + 3)&#xA;... &#xA;&amp;gt;&amp;gt;&amp;gt; def bar(x):&#xA;...   return (2*x + 3)&#xA;... &#xA;&amp;gt;&amp;gt;&amp;gt; foo(4)&#xA;11&#xA;&amp;gt;&amp;gt;&amp;gt; bar(4)&#xA;11&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So they &lt;strong&gt;look&lt;/strong&gt; quite the same, don't they?&lt;/p&gt;&#xA;&lt;p&gt;Now &lt;strong&gt;use&lt;/strong&gt; them:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; [bar(x) for x in range(5)]&#xA;[3, 5, 7, 9, 11]&#xA;&amp;gt;&amp;gt;&amp;gt; [foo(x) for x in range(5)]&#xA;3&#xA;5&#xA;7&#xA;9&#xA;11&#xA;[None, None, None, None, None]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="1035" LastEditDate="2020-11-01T13:31:59.340" LastActivityDate="2020-11-01T13:31:59.340" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6586" PostTypeId="2" ParentId="6583" CreationDate="2020-10-27T05:31:42.003" Score="1" Body="&lt;p&gt;I have been teaching with Cocalc for a few years. It has most of the features you are looking for, but unless you are using python with nbgrader there is perhaps not much support for unit tests/autograding. It's not perfect but it gets the job done, with less frustration to me than trying to grade this stuff in Canvas. Also, I can rely on the simplicity of identical environments, no more babysitting each student's installation and worrying about Windows vs Mac setup, etc.&lt;/p&gt;&#xA;&lt;p&gt;Cocalc allows the creation of &amp;quot;courses&amp;quot; where each student can receive &amp;quot;Assignments&amp;quot; and &amp;quot;Handouts&amp;quot; from the instructor. The students' projects are self-contained VMs and you can do a bit of central administration on them. They can use free ones, or upgrade for a small fee. You can do some LMS-type things there too, such as grade and comment on returned work. &lt;a href=&quot;https://cocalc.com/doc/teaching.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here's a link to the Teaching documentation.&lt;/a&gt; There are a good amount of videos and blog posts put up by other enthusiasts as well.&lt;/p&gt;&#xA;" OwnerUserId="6111" LastActivityDate="2020-10-27T05:31:42.003" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6587" PostTypeId="1" CreationDate="2020-10-27T11:24:19.087" Score="6" ViewCount="267" Body="&lt;p&gt;What are collaboration sites for CS teachers?&lt;/p&gt;&#xA;&lt;p&gt;The CS Educators StackExchange is nice'n'friendly, but here are some topics I'd like to be discussed, which are outside of StackExchange policy:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;case studies: show to others direct experience when teaching a class&lt;/li&gt;&#xA;&lt;li&gt;honest skill transfer efficiency for a specific methodology, the real percentage of students who &amp;quot;got it&amp;quot; and became programmers or got computational thinking&lt;/li&gt;&#xA;&lt;li&gt;practice set tasks, which were used alongside main course&lt;/li&gt;&#xA;&lt;li&gt;collection of programming problems, which student found &amp;quot;interesting&amp;quot; and which turned students into love/understanding with programming&lt;/li&gt;&#xA;&lt;li&gt;collection of bad practice problems, which made more frustration than learning benefit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So far I haven't found any centralized resources except this StackExchange, but maybe there are others? I struggle now because I have to create practice task set for my course and really can't use the knowledge of precious generation of teachers, as information is highly decentralized.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-10-28T02:30:14.843" Title="CS educators collaboration communities?" Tags="|collaboration|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6588" PostTypeId="2" ParentId="6587" CreationDate="2020-10-27T11:44:47.903" Score="4" Body="&lt;p&gt;Strangely, just after posting a question I found a list of additional link collections:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/zamansky/awesome-cs-education&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/zamansky/awesome-cs-education&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/quobit/awesome-python-in-education&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/quobit/awesome-python-in-education&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/3947/9632&quot;&gt;https://cseducators.stackexchange.com/a/3947/9632&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And one chat:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://chat.stackexchange.com/rooms/59174&quot;&gt;https://chat.stackexchange.com/rooms/59174&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I still think there should be more, but this is a start.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-10-27T11:44:47.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6589" PostTypeId="2" ParentId="6587" CreationDate="2020-10-27T13:41:25.877" Score="1" Body="&lt;p&gt;Computing At Schools (in the UK), has a forum:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://community.computingatschool.org.uk/forums/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://community.computingatschool.org.uk/forums/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2020-10-27T13:41:25.877" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6590" PostTypeId="2" ParentId="6587" CreationDate="2020-10-27T17:37:02.770" Score="3" Body="&lt;p&gt;ACM &lt;a href=&quot;https://sigcse.org/sigcse/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SIGCSE&lt;/a&gt; has a regular and active mailing list for members. Questions on pedagogy and such are frequent there.&lt;/p&gt;&#xA;&lt;p&gt;The College Board &lt;a href=&quot;https://apcommunity.collegeboard.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;APCS system&lt;/a&gt; has a number of mailing lists for various interests and, again, teaching methodology is a common thread, though it can be pretty specific to Advanced Placement and its course and exam system.&lt;/p&gt;&#xA;&lt;p&gt;Both will require membership. SIGCSE is more general and more directed at university level teaching. The College board more for secondary school. But there is a lot of overlap.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-10-27T17:37:02.770" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6591" PostTypeId="2" ParentId="6543" CreationDate="2020-10-27T20:16:50.180" Score="1" Body="&lt;p&gt;Here is the set of mini-projects, I've designed but never took in class. So, completely untested, though most of this was either done by me or by my peers back in past.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Games:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Nim game. Any variant&lt;/li&gt;&#xA;&lt;li&gt;Tic-Tac-Toe&lt;/li&gt;&#xA;&lt;li&gt;Checkers&lt;/li&gt;&#xA;&lt;li&gt;Tetris&lt;/li&gt;&#xA;&lt;li&gt;Breakout&lt;/li&gt;&#xA;&lt;li&gt;Asteroids&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Bioinformatics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;all sorts of algorithms on RNA/DNA:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;nucleotide frequency analysis&lt;/li&gt;&#xA;&lt;li&gt;comparing genomes, finding best matches (nice one -- check which of coronaviridae RNAs are most similar to NCov-SARS-2019)&lt;/li&gt;&#xA;&lt;li&gt;search most common substrings in RNA (those must be interesting by defintion, especially if they are long)&lt;/li&gt;&#xA;&lt;li&gt;search substrings with N-mutations&lt;/li&gt;&#xA;&lt;li&gt;search for palindromic substrings&lt;/li&gt;&#xA;&lt;li&gt;more alogorithm examples and inspiration at &lt;a href=&quot;http://rosalind.info/problems/tree-view/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://rosalind.info/problems/tree-view/&lt;/a&gt; and &lt;a href=&quot;https://www.bioinformaticsalgorithms.org/bioinformatics-chapter-1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bioinformaticsalgorithms.org/bioinformatics-chapter-1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;visualize RNA self-assembly. Build either terminal or arc views. This is real world usage of palindrome algorithm&lt;/li&gt;&#xA;&lt;li&gt;visualize DNA replication, create simulation &amp;quot;soup&amp;quot; of nucleotides (A, T, C, G) and enzymes (polymerase, primase, ligase, and others), which all move randomly, and when primase &amp;quot;randomly&amp;quot; finds out primer DNA combination, the replication process starts. There are tons of youtube videos on how this is done, but still nice to see this &amp;quot;soup&amp;quot; in own implementation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Physics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simulate ideal billiard -- balls hit balls or walls using Newtonian physics&lt;/li&gt;&#xA;&lt;li&gt;simulate ideal gas (similar to above), show pressure as total impulse of balls on walls, and temperature as average kinetic energy of balls. Simulate &amp;quot;volume&amp;quot; change, or &amp;quot;wall temperature&amp;quot; and energy transfer&lt;/li&gt;&#xA;&lt;li&gt;car moves on 2D, simulate proper steering, sudden brakes, drift behavior on high speeds, car track and window scrolling when car rides&lt;/li&gt;&#xA;&lt;li&gt;gravitation simulator. Either Solar system, or just plenty of bodies all entangled with gravity force&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Math:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;implement: all sorts of averages, factorial, integer power, combination count, etc...&lt;/li&gt;&#xA;&lt;li&gt;implement: all sorts of irrational functions and computations (sin, cos, sqrt, arctan, arcsin, exp, ln, pi, e, power through exp and ln)&lt;/li&gt;&#xA;&lt;li&gt;implement: all sorts of operations with vectors and matrices&lt;/li&gt;&#xA;&lt;li&gt;implement: long arithmetics (yeah, I know Python has Decimal, still nice to know how is it done)&lt;/li&gt;&#xA;&lt;li&gt;implement: numeric integration (several kinds)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Robo stuff:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cellular automata (actually, I'll point to this topic here: &lt;a href=&quot;https://natureofcode.com/book/chapter-7-cellular-automata/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://natureofcode.com/book/chapter-7-cellular-automata/&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;labyrinth creation and solving&lt;/li&gt;&#xA;&lt;li&gt;implement A* and visualize&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Coding theory:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;all sorts of encodings: number bases, UTF-8 encoding, msgpack integers, etc...&lt;/li&gt;&#xA;&lt;li&gt;encoding with error detection and correction: random bit errors, duplication as anti-error technique, Hamming code, CRC32&lt;/li&gt;&#xA;&lt;li&gt;entropy encoding (Shannon-Fano)&lt;/li&gt;&#xA;&lt;li&gt;math expression parser (with parens and operator priority)&lt;/li&gt;&#xA;&lt;li&gt;Brainf*ck interpreter&lt;/li&gt;&#xA;&lt;li&gt;implement x86_64 assembler, which can compile directly to machine codes. Macros support is optional, but of special interest!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Graphics. All of these should be done using two primitives: putpixel() and getpixel():&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simples: horizontal line, vertical line, rectangle, filled rectangle, thick line&lt;/li&gt;&#xA;&lt;li&gt;harder: line between two points, line by one point and angle, circle and filled circle, anti-aliasing drawing for line and circle, draw polygon by it's vertices, flood-fill, rotate square&lt;/li&gt;&#xA;&lt;li&gt;complicated: duplicate part of screen with support of alpha channel and color key, mirror part of screen, rotate texture (with arbitrary center), scale texture, pixel blurring after scaling, mirror using guiding line&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Psychology:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;implement SRS tool like Anki or Memrise&lt;/li&gt;&#xA;&lt;li&gt;implement Schulte test&lt;/li&gt;&#xA;&lt;li&gt;implement &amp;quot;Organization of Dot&amp;quot; training puzzle generator&lt;/li&gt;&#xA;&lt;li&gt;implement Corsi block test&lt;/li&gt;&#xA;&lt;li&gt;implement N-Back&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Though you wanted some large project, so you can combine several of above into one big project. You may also add topics like &amp;quot;databases&amp;quot; to some of those (the psychology ones -- store all the data in shared DB). The &amp;quot;visualize&amp;quot; are pretty hard projects too.&lt;/p&gt;&#xA;&lt;p&gt;The big idea for these projects is to ignite more ideas after implementation done.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-10-27T20:16:50.180" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6592" PostTypeId="2" ParentId="6032" CreationDate="2020-10-27T21:56:40.820" Score="2" Body="&lt;p&gt;I may be late to game, but you should target four &amp;quot;wow&amp;quot;s:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&amp;quot;wow, how small .exe file is!&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;wow, how fast this program is compared to Python!&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;wow, and THAT is how it's done!&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;wow, I'm a hacker now!&amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For first one, you should compare compiled sizes of some Go, C++, C and assembler programs which all do a same thing. (Mandelbrot fractal generator in Asm is 61 bytes! Check &lt;a href=&quot;https://github.com/leto/asmutils/blob/master/src/bonus/mandelbrot.asm&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/leto/asmutils/blob/master/src/bonus/mandelbrot.asm&lt;/a&gt;, it is runnable)&lt;/p&gt;&#xA;&lt;p&gt;For second you should show implementation of some number crunching algorithm (beware GPU computing -- try to find example, which can't be sped up with GPUs or optimized by SIMD)&lt;/p&gt;&#xA;&lt;p&gt;For third one, I like to explain the MBR (even though it is no longer popular). You can put a small command line in 512 bytes of MBR, and load it as floppy in QEMU or from USB on real hardware. It often looks like miracle that you can run code without OS. (&lt;a href=&quot;http://www.osdever.net/tutorials/view/hello-world-boot-loader&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.osdever.net/tutorials/view/hello-world-boot-loader&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;For fourth one, show how to disassemble code in a disassembler, edit some string, save and run it with new string. Patching binaries no longer will look like mystery.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-10-27T21:56:40.820" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6593" PostTypeId="2" ParentId="6587" CreationDate="2020-10-28T02:30:14.843" Score="2" Body="&lt;p&gt;If you're in the USA, there is also &lt;a href=&quot;http://csteachers.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSTA&lt;/a&gt;, for which there are no &amp;quot;topicality&amp;quot; requirements.  The chapters are led by teachers, and the meetings are among teachers.&lt;/p&gt;&#xA;&lt;p&gt;I've found my chapter to be a useful resource for simply comparing notes and talking to other CS teachers.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-10-28T02:30:14.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6594" PostTypeId="2" ParentId="5204" CreationDate="2020-11-02T05:45:21.533" Score="0" Body="&lt;p&gt;I think there is no fixed or right age to learn coding. It totally depends whether the child is really interested or curious to learn coding. Many schools &amp;amp; private institutions have incorporated coding in their core curriculum. Learn coding kids at a young age helps in developing their overall growth. It encourage critical thinking as well as problem solving skills among kids.&lt;/p&gt;&#xA;" OwnerUserId="9659" LastEditorUserId="2418" LastEditDate="2021-06-22T14:42:56.750" LastActivityDate="2021-06-22T14:42:56.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6595" PostTypeId="1" CreationDate="2020-11-03T21:16:52.417" Score="2" ViewCount="104" Body="&lt;p&gt;Piazza recently started serving ads.  Are there any reasonable alternatives to Piazza that are effective for CS courses, for handling questions from students online?  I would find it useful to be able to follow the Stack Exchange model as much as possible.&lt;/p&gt;&#xA;" OwnerUserId="1106" LastActivityDate="2020-11-03T21:16:52.417" Title="Alternative to Piazza for online Q&amp;A" Tags="|lecture-tools|distance-learning|online|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6596" PostTypeId="2" ParentId="583" CreationDate="2020-11-07T17:40:10.153" Score="1" Body="&lt;p&gt;I found a nice and visual metaphor for this. It won't work for aphantasiacs (probably) as it requires imagination of surreal objects.&lt;/p&gt;&#xA;&lt;p&gt;First is to make clear distinction between values and addresses. But I won't call those &amp;quot;values&amp;quot; and &amp;quot;addresses&amp;quot;. I'll call those boxes and ... tentacles!&lt;/p&gt;&#xA;&lt;p&gt;Yes! &lt;em&gt;Tentancles&lt;/em&gt;! So imagine a number as a box, and imagine this box extrude or generate tentacles. Many tentacles, or no tentacles. Some tentacles are named, other anonymous. But all these tentacles belong to (originate from) same box.&lt;/p&gt;&#xA;&lt;p&gt;So, a function is just a transformer box -- you put stuff in, and get some result out. But due to technical limitation of this transformer box, all the stuff we put in -- we put just a copy of that stuff. Yeah, each time we &lt;em&gt;run&lt;/em&gt; a function machine, we make copies of boxes and use those there. But this also allows us to preserve original boxes, so that's good news.&lt;/p&gt;&#xA;&lt;p&gt;But functions are fine with putting &lt;em&gt;tentacles&lt;/em&gt; as inputs. Yes, we have to duplicate that tentacle, but it still originates from some box. And when function acts on tentacle, it first &amp;quot;pulls&amp;quot; the box and does some work. It can potentially modify that box. It was tentacle what was made a copy, not a box itself.&lt;/p&gt;&#xA;&lt;p&gt;So pass-by-value is when function expects a copy of box, and pass-by-ref is when function expects a copy of box tentacle.&lt;/p&gt;&#xA;&lt;p&gt;(this metaphor is quite generalizable. Tentacle has a small box on it's end. And that small box can also generate tentacles! &lt;code&gt;int**&lt;/code&gt; essentially)&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Most other answers are good, but I found that abstract &amp;quot;address&amp;quot; or &amp;quot;index&amp;quot; are hard to imagine, so they are ignored and this starts doomed spiral of failure to understand. Thinking of &amp;quot;address&amp;quot; or &amp;quot;index&amp;quot; already requires rule-based thinking, which we can't assume in general audience.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-11-07T17:40:10.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6597" PostTypeId="2" ParentId="5843" CreationDate="2020-11-07T18:02:24.937" Score="0" Body="&lt;p&gt;For what I propose, are following types:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;imagine stuff in head&lt;/li&gt;&#xA;&lt;li&gt;make combinations/permutations of N items, preferably in head&lt;/li&gt;&#xA;&lt;li&gt;make combinations/permutations of N rules, preferably in head&lt;/li&gt;&#xA;&lt;li&gt;forward reading (tracing): given code and initial values, determine result&#xA;values&lt;/li&gt;&#xA;&lt;li&gt;backward reading (detective): given code and it's output, determine it's input&lt;/li&gt;&#xA;&lt;li&gt;given some simple rules, generate code to solve a simple task&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;think of&lt;/em&gt; and &lt;em&gt;build&lt;/em&gt; database of objects in code&lt;/li&gt;&#xA;&lt;li&gt;read an example algorithm: what does it do?&lt;/li&gt;&#xA;&lt;li&gt;read an example program: what interesting patterns do you see?&lt;/li&gt;&#xA;&lt;li&gt;solve a problem&lt;/li&gt;&#xA;&lt;li&gt;write a real program&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Most focus on &amp;quot;solve a problem&amp;quot; category, as it is direct skill, but other are helpful for primary mindset education.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-11-07T18:02:24.937" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6598" PostTypeId="1" CreationDate="2020-11-16T20:55:38.660" Score="48" ViewCount="21511" Body="&lt;p&gt;Data pretty regularly shows that computer science programs have among the highest failure and dropout rates of any college program. A number of sources all echo the finding that roughly one-third of incoming CS majors do not progress to a second year, higher than most other majors.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.computerweekly.com/news/252467745/Computer-science-undergraduates-most-likely-to-drop-out&quot; rel=&quot;noreferrer&quot;&gt;Computer science undergraduates most likely to drop out&lt;/a&gt; (ComputerWeekly.com, 2019)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.irishtimes.com/news/education/concern-over-drop-out-rates-in-computer-science-courses-1.2491751&quot; rel=&quot;noreferrer&quot;&gt;Concern over drop-out rates in computer science courses&lt;/a&gt; (The Irish Times, 2016)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://trinitynews.ie/2016/02/why-are-computer-science-drop-out-rates-so-high/&quot; rel=&quot;noreferrer&quot;&gt;Why are computer science drop-out rates so high?&lt;/a&gt; (Trinity News, 2016)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I teach computer science majors at a U.S. community college, and the non-passing rates are even higher in this context. A few times in my introductory programming course, I will mention this fact (that computer science is among the hardest majors), partly to set expectations that students will need to work hard to succeed.&lt;/p&gt;&#xA;&lt;p&gt;This semester I had a student in my virtual office hour ask, &amp;quot;Why is computer science harder than other majors, as you say?&amp;quot;, and I was a bit flat-footed for a good response.&lt;/p&gt;&#xA;&lt;p&gt;So: What would be the best reply to a beginning CS student who asks, &amp;quot;Why is CS hard?&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="204" LastEditDate="2020-11-16T21:56:44.923" LastActivityDate="2021-07-21T14:50:00.727" Title="Why is computer science hard?" Tags="|struggling-students|student-perceptions|" AnswerCount="17" CommentCount="27" ContentLicense="CC BY-SA 4.0" />
  <row Id="6599" PostTypeId="2" ParentId="6598" CreationDate="2020-11-16T22:07:10.753" Score="56" Body="&lt;p&gt;The difficulty of CS (true or imagined) and the drop out rates are not the same thing. Let me start an answer, but it might take several iterations to get all my thoughts together on the two ideas.&lt;/p&gt;&#xA;&lt;p&gt;Two themes come immediately to mind.&lt;/p&gt;&#xA;&lt;p&gt;The first is periodic and I don't know where we are in the period at the moment. But in certain combinations of economic factors and media hype, a lot of students go in to CS not really understanding what they are getting in to but are lured by the, perhaps elusive, draw of big salaries. There is a lot of hype out there about AI at the moment, and self driving cars, and going to Mars, etc. People get in for the wrong reasons and decide they really didn't understand what it was and that they don't really like it. It doesn't need to be hard to drive people away, just boring.&lt;/p&gt;&#xA;&lt;p&gt;The second major theme is that there is a lot of bad teaching around CS as has always been the case. Some people teach it as misspelled mathematics, which it is not. Some people in elementary and secondary schools are forced to teaching CS and especially Advanced Placement CS when they have little understanding of the topic and just try to stay &amp;quot;one week ahead&amp;quot; of the students. This is, and has always been a recipe for disaster. I don't blame the teachers who have to do this as many are forced in to it (in the US) simply because schools are underfunded and understaffed with too few specialist teachers.&lt;/p&gt;&#xA;&lt;p&gt;WRT the second theme, it might even be that the current push to teach &amp;quot;CS&amp;quot; in elementary schools is actually part of the problem, not the solution. A serious college level course in CS might be shocking to someone who has only dabbled in trivial elements of programming. In particular CS is NOT programming, though skill in programming is needed.&lt;/p&gt;&#xA;&lt;p&gt;Too many beginning students and teachers think that programming is &amp;quot;if&amp;quot; and &amp;quot;while&amp;quot; and &amp;quot;assignment&amp;quot; and nothing else. The current AP curriculum, I think, is seriously flawed (dropping interfaces, in particular). Students program in &amp;quot;rich&amp;quot; languages and environments using only the lowest level concepts, never really understanding abstraction or (gasp) polymorphism. Compare that with big ideas that you find in a philosophy or (hopefully) history course.&lt;/p&gt;&#xA;&lt;p&gt;And if you combine that with asking them to write programs that they find boring, they aren't likely to stick around for long.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-11-16T22:07:10.753" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="6601" PostTypeId="2" ParentId="6598" CreationDate="2020-11-17T21:03:18.147" Score="23" Body="&lt;p&gt;Here's an attempt at an answer, with some reflections, and then hopefully at the end a concise reply that we could deliver to an introductory student. For the purposes of this answer, I'll assume that in the first year or so, teaching computer science is synonymous with teaching software engineering.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Motivating Quote&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Edsger Dijkstra wrote in his paper, &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/EWD1036.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;On the cruelty of really teaching computer science&lt;/em&gt;&lt;/a&gt; (1988):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;From a bit to a few hundred megabytes, from a microsecond to a half an&#xA;hour of computing confronts us with the completely baffling ratio of&#xA;&lt;span class=&quot;math-container&quot;&gt;$10^9$&lt;/span&gt;! The programmer is in the unique position that his is the only&#xA;discipline and profession in which such a gigantic ratio, which&#xA;totally baffles our imagination, has to be bridged by a single&#xA;technology. He has to be able to think in terms of conceptual&#xA;hierarchies that are much deeper than a single mind ever needed to&#xA;face before.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;An Open Question&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Prelude A: This is an area of ongoing research, and there's no consensus theory at this time. While the difficulty (as evidenced by high fail rates) has been known for decades, no predictive educational theory as to why this is the case has garnered significant evidence. (&lt;a href=&quot;https://cte-blog.uwaterloo.ca/?p=5153&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intriguing example from 2015&lt;/a&gt; that ultimately did not support its hypothesis.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;STEM, but Moreso&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Prelude B: Of course, CS is in the STEM meta-discipline, and those programs are commonly more demanding than non-STEM courses. Like any STEM field, CS is technical, detail-oriented, and has objectively right and wrong answers (at least in terms of what counts as a syntactically valid program, a program that produces logically correct results, and so forth).&lt;/p&gt;&#xA;&lt;p&gt;That said, the data seems to show that CS has even higher non-success rates than other STEM courses, so from this point on we'll inspect what makes CS even more challenging.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;A Deep Stack&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;As Dijkstra alluded to, CS has a uniquely &amp;quot;deep stack&amp;quot; of technologies and systems in which the practitioner must work, master, and smoothly adjust conceptual level of abstracted thought within the course of a work day. Some have called the computer the most complex creation of mankind; e.g., in the title of David Eck's introductory CS textbook, &lt;a href=&quot;http://math.hws.edu/TMCM.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;The Most Complex Machine&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Likewise, consider Joel Spolsky's &lt;a href=&quot;https://en.wikipedia.org/wiki/Leaky_abstraction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Law of Leaky Abstractions&lt;/a&gt;: &amp;quot;All non-trivial abstractions, to some degree, are leaky.&amp;quot; As much as we would &lt;em&gt;like&lt;/em&gt; to encapsulate computing technologies into neatly abstracted layers, this turns out to not be completely feasible. At any point in the workday we might need to shift mental state to some other layer in order to analyze, debug, or properly design a new part. E.g.: It's just a few conversational steps from thinking about worldwide internet protocols, to the need for check codes and error-handling, to the existence of cosmic rays in the physical universe that might corrupt transmitted data.&lt;/p&gt;&#xA;&lt;p&gt;In this regard, I sometimes point students to this image (I believe first originating from a website that no longer exists, but e.g., &lt;a href=&quot;https://electronics.stackexchange.com/questions/353915/what-is-the-role-of-isa-instruction-set-architecture-in-the-comp-arch-abstract&quot;&gt;referenced here&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/KICI7.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/KICI7.png&quot; alt=&quot;Computing Layers of Abstraction; in 10 layers from physics to applications&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Syntactical Strictness&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;In CS, the work is mediated by the computer system itself, which is fairly demanding in its syntactical strictness. Compare to work written in math, physics, chemistry, etc.: it will likely be read by a human instructor, who may be able to forgive or fill in some smaller errors in spelling, grammar, punctuation, etc. But with computer syntax no such flexibility is possible: if a single symbol is misplaced, then no defined program exists. Particularly for students with ID's such as dyslexia, this may be a significant extra challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Need for Language Skills&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The computing student also needs fairly high-end reading, writing, and communication skills. Problems are almost never delivered in purely symbolic form, as may sometimes be done in math, physics, chemistry, etc. Everything is a &amp;quot;word problem&amp;quot;, and students must be proficient at reading, interpreting, asking for clarification (in a natural language, e.g., English), then designing, implementing, and testing, and finally documenting and explaining the design and code (again in English). Interfaces to the user must likewise be clearly expressed. For students with weak English skills, possibly still learning the language for many foreign students, this is another significant challenge (probably more than other STEM fields).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wide Domain Knowledge&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Related to the English communication skills noted above, the student likewise needs a lot of &amp;quot;domain specific knowledge&amp;quot;. Introductory problems are likely to come from many different fields -- e.g., in my own course, book exercises involve geometry, statistics, savings interest, sound waves, biological population growth, workplace employment rules, taxation, meteorology, sports, corporate finance, etc. If a student has been deprived of a wide range of learning opportunities about the world, then they will be further disadvantaged.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Technologies for Teams&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The other thing that I personally find challenging in teaching introductory programming is that so many of the core features of modern languages are designed to support large teams working cooperatively on long-term projects (see Brooks, et. al.). But for many reasons (such as the need to master all the basics), students are working on assignments and tests in isolation. Features such as modular functions, scope rules, local variables, classes and objects, encapsulation and data-hiding, etc., really only make sense in terms of a large team of programmers, engaged in a division of labor, communicating in a structured way so as to not corrupt the overall system. This is a story that I'm constantly trying to tell to my students and want them to visualize, but I fear that the lack of concrete experiences with this &amp;quot;large team, complex software&amp;quot; reality makes it hard to fully appreciate.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;So here's my stab at a brief answer to the inquiring student: &lt;em&gt;Computer science is something of an everything-discipline.&lt;/em&gt; One needs to develop good skills in the entire STEM spectrum (science, technology, engineering, and math), as well as top-end reading, writing, and human communication skills, and be able to work well both alone and in a team. The computing professional must be detail-oriented (to the level of individual symbols), simultaneously be able to keep the big-picture in mind, and adjust the level of conceptual abstraction at any time. One also needs to be able to digest a fairly large amount of new technical detail at a rapid pace, learn about other arbitrary domains in the world to interface with them, and be committed to continually learning new fields and technologies throughout one's career.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2021-07-21T14:50:00.727" LastActivityDate="2021-07-21T14:50:00.727" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6602" PostTypeId="2" ParentId="6598" CreationDate="2020-11-18T02:28:24.350" Score="39" Body="&lt;p&gt;First, I somewhat dispute the premise of the question.  I don't necessarily believe that it &lt;em&gt;is&lt;/em&gt; harder.  I think there may be some other elements at play.&lt;/p&gt;&#xA;&lt;p&gt;Unlike many other college fields, students often have little to no formal background in the topic prior to entry -- in fact, many have little to no relevant background at all.  That means that they're coming in blind.  By contrast, many college majors come populated with students who have years of background in a topic, and are fairly certain that they like aspects of the field.  (Consider majors like mathematics, music, or English, in which students will typically enter in with many, many years of built-up skills.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;(As an aside, there is a small added difficulty.  Using modern apps on phones and websites not only teaches students little about computer science, but in my experience, it has almost been a negative.  It gives students the feeling that they are mastering aspects of computing, but hides away so many details that I believe it can actually &lt;em&gt;add&lt;/em&gt; to the frustrations of students once they are faced with actual programming, working with command lines, importing libraries, etc.)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Additionally, CS has also, and fairly suddenly, become a wildly popular major.  They come, I think, largely because they believe that this is where the jobs are.  Few of them come because they have deep enthusiasm about the field.  In reality, most of the students entering have little to no practical experience.&lt;/p&gt;&#xA;&lt;p&gt;This will make for some frustrating mismatches.  To use an example from above, if a large population of students who had literally never read an eighth note (quaver) suddenly enter into college music majors, do you expect that the results would be very different from what you are seeing among your computer science population?  Certainly, a fair number of them will be able to pick up and get things sorted out, but there will absolutely be a sizeable population who will find that wall too hard to climb.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-11-18T02:28:24.350" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6604" PostTypeId="2" ParentId="6598" CreationDate="2020-11-18T15:43:42.453" Score="17" Body="&lt;p&gt;From my experiences (I studied about 15-20 years ago, and my cohort lost 50% of students within the first four semesters), the main reasons are these:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Many students do not really know what CS is about. They might think that it's about learning how to work with computers, or become &amp;quot;power users&amp;quot;, or programmers, or something along these lines. I don't think the general public generally knows what CS is. I daresay this is not much different from an electrical engineering student expecting to weild a solder iron a lot; or a mechanical engineering student expecting to work with a metal lathe. At least in my western country, there really was no good way for a young pupil to really find out about this.&lt;/li&gt;&#xA;&lt;li&gt;Some topics actually &lt;em&gt;are&lt;/em&gt; really hard; for example if you leave the mainstream programming languages and dig into functional, logic or constraint programming, or theoretical CS topics.&lt;/li&gt;&#xA;&lt;li&gt;Some topics are maybe not very hard, but unless somone is really interested in them already, the university might not necessarily present the topic in a way that creates interest. In my time, there were the classic lectures like how to build a compiler for a programming language; or more theoretical topics like automatons, temporal correctness and such. I think I can count the number of students in &amp;quot;my&amp;quot; class who were really interested in the topic on one hand, amongst dozens or in some courses hundreds.&lt;/li&gt;&#xA;&lt;li&gt;I don't know how this is these days, but in my country, in the 1990's, CS was strongly coupled to maths - we had plenty of obligatory maths lectures which we shared with beginning maths or physics students; hardcore linear algebra, functional analysis, statistics etc. - totally irrelevant for 99% of all CS students, but there was no way to avoid it. This most certainly got rid of quite a few students for better or worse.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;By the way, this does not end in the university; the same phenomenon happens in IT companies - you get a few high-flyers who really live and breathe IT and CS (as far as CS applies to IT in modern software projects at all...), and plenty of people who just do their job on most days, or eventually find out that it's just not for them.&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2020-11-20T07:49:10.160" LastActivityDate="2020-11-20T07:49:10.160" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6605" PostTypeId="2" ParentId="6598" CreationDate="2020-11-18T16:11:57.353" Score="12" Body="&lt;p&gt;Maybe some of those who &amp;quot;fail&amp;quot; should have been somewhere else rather than funneled into computer science.&lt;/p&gt;&#xA;&lt;p&gt;There needs to be a differentiation between those who want to study computer science (advance the state of the art) and those who just want to write programs (make use of existing techniques and tools.)&lt;/p&gt;&#xA;&lt;p&gt;I'm in the &amp;quot;just write programs&amp;quot; camp.  I don't belong in computer science.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I'm going to present the view from someone who left computer science early  - one of those from the &amp;quot;failure and dropout&amp;quot; group.&lt;/p&gt;&#xA;&lt;p&gt;Me.&lt;/p&gt;&#xA;&lt;p&gt;I am a programmer.  I make a good living writing programs.&lt;/p&gt;&#xA;&lt;p&gt;Way back when I was young, I learned to program on home computers.  Early 1980s.&lt;/p&gt;&#xA;&lt;p&gt;Telling a machine what to do isn't difficult.  It has a limited vocabulary that you can &amp;quot;speak&amp;quot; to it in, and it has a limited ability to give you responses.  You break the task down to pieces and phrase it in the vocabulary the computer has and tell it how to assemble its response.  No big deal, though you do have to understand the task yourself first.&lt;/p&gt;&#xA;&lt;p&gt;When I started taking university courses, the options were MIS (management information systems - managing computer systems) and computer science.  I didn't want to baby sit the machines, I wanted to program them and ended up in computer science.&lt;/p&gt;&#xA;&lt;p&gt;Computer science at the time was more about the theory, the mathematics of how computer logic and algorithms work.  That is, studying things that would let you make better computers or discover new algorithms.&lt;/p&gt;&#xA;&lt;p&gt;That wasn't what I wanted at all.  I wanted to learn how to be a better programmer.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Better approaches to breaking down problems.&lt;/li&gt;&#xA;&lt;li&gt;Better ways to organize my work.&lt;/li&gt;&#xA;&lt;li&gt;Learn more about other languages.&lt;/li&gt;&#xA;&lt;li&gt;Learn how to make an easy to use program (user interfaces.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;None of that was taught in the courses available to me.&lt;/p&gt;&#xA;&lt;p&gt;We were exposed to other programming languages - there were several courses that were dedicated to specific languages.&lt;/p&gt;&#xA;&lt;p&gt;All I wanted was to be a better programmer, and all I could get was things that I'd need to (someday) be able to do computer science research.&lt;/p&gt;&#xA;&lt;p&gt;I'm not in the least interested in designing a hashing algorithm.  I'm interested in writing a program that makes some task easier - and that might involve using hashes or dictionaries or linked lists or what have you.&lt;/p&gt;&#xA;&lt;p&gt;What I wanted wasn't available at that time and place, so I quit.  I went off and joined the US Air Force, then got a job working in electronics, then cycled my way back to programming through my work experience.&lt;/p&gt;&#xA;&lt;p&gt;My experience with computer science was that I want to make things, but all I was learning was how to someday be qualified for research.&lt;/p&gt;&#xA;&lt;p&gt;Imagine somebody who is good with a hammer and a saw, and he wants to be a carpenter.  He tells the folks in school that he'd like to build things - houses or furniture or bridges - and they send him to college to study mechanical engineering.  Mechanical engineering teaches him how to design the things, but that's not what this guy wants.  He wants to be out there on the construction site, driving nails and cutting wood.  He drops out of college, and goes off looking for a way to do what he's interested in.&lt;/p&gt;&#xA;&lt;p&gt;That's me and computer science.  I want to make things with the tools and materials available, not develop new tools and materials.&lt;/p&gt;&#xA;&lt;p&gt;It takes some theory (of course it does) to be able to write programs.  You need some idea of how the machines work, and how things get from code to execution.  You don't need to be able to design a CPU in order to use it.&lt;/p&gt;&#xA;&lt;p&gt;Could it be that many of the dropouts just don't want what computer science has to offer?&lt;/p&gt;&#xA;&lt;p&gt;We &lt;strong&gt;need&lt;/strong&gt; computer science, just like we &lt;strong&gt;need&lt;/strong&gt; mathematicians and physicists and architects.  We also &lt;strong&gt;need&lt;/strong&gt; people who write programs just like we &lt;strong&gt;need&lt;/strong&gt; people who pick up a hammer and a saw and build the things the architects and engineers design.&lt;/p&gt;&#xA;&lt;p&gt;Is there a better place to learn programming than in a computer science setting?  Maybe that's where some of those &amp;quot;failures&amp;quot; and &amp;quot;dropouts&amp;quot; need to be - learning to do things with today's tools rather than looking for tomorrow's tools.&lt;/p&gt;&#xA;&lt;p&gt;Maybe those folks who fail just needed to directed to a more appropriate place so that they can succeed at the underlying task that brought them to computer science.&lt;/p&gt;&#xA;" OwnerUserId="9182" LastActivityDate="2020-11-18T16:11:57.353" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="6607" PostTypeId="2" ParentId="6598" CreationDate="2020-11-18T22:20:06.247" Score="5" Body="&lt;p&gt;Computer science demands a set of qualities, some of which are somewhat antithetical.   One is the attention to detail.  Another is the creative ability to build strong abstractions that are both powerful and useful.  This involves some pretty heavy lifting in the big picture thinking department.  However, it is hard to get off the ground in programming if you are unable to manage the syntactical exigencies of the language you are programming in.   It is also hard to get off the ground if you cannot walk through a complex chain of logic.&lt;/p&gt;&#xA;&lt;p&gt;In short, it requires some very serious effort and a very special mix of skills to become a good programmer.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2020-11-18T22:20:06.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6608" PostTypeId="2" ParentId="6598" CreationDate="2020-11-18T22:49:17.413" Score="8" Body="&lt;p&gt;Looking back on my experience and education as a software engineer, I think the largest &lt;em&gt;inherent&lt;/em&gt; contributors of difficulty in computer science are that it has exceptionally strict and unforgiving standards for correctness, and that solving problems in it often requires an exceptional degree of questioning or ignoring &amp;quot;common sense&amp;quot; basic assumptions.&lt;/p&gt;&#xA;&lt;p&gt;In many (or most?) other fields, getting something wrong by a small margin usually has an effect that is worse than desired by a correspondingly small margin. There are exceptions, of course, but there's usually a region of tolerable error. In software source code, it is not only &lt;em&gt;not rare&lt;/em&gt;, but actually &lt;em&gt;common&lt;/em&gt; for small mistakes to have large or even catastrophic consequences.&lt;/p&gt;&#xA;&lt;p&gt;Those small mistakes in software source code often appear superficially to be completely correct. That apparent correctness tends to rest on an assumption so basic that programmers don't even realize they've made it. Logical reasoning as typically practiced by humans involves an enormous number of unstated assumptions, all predicated on a life experience in a world governed by physics and inhabited by other humans. Computers don't have those assumptions, and operate by their own internal logic that was artificially created by legions of computer scientists. To find and fix software errors, or to prevent them, a software engineer needs to be skilled at examining those assumptions and stripping them away to correctly follow the computer's logic, and that is a skill that actively opposes many people's instincts.&lt;/p&gt;&#xA;&lt;p&gt;In short, to succeed well in computer science, a student needs to master a counterintuitive skill, and the bar for mastery is close to being pass/fail.&lt;/p&gt;&#xA;" OwnerUserId="9721" LastActivityDate="2020-11-18T22:49:17.413" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6609" PostTypeId="2" ParentId="6598" CreationDate="2020-11-19T06:06:39.077" Score="6" Body="&lt;p&gt;In addition to the many good answers on here, as a past student, TA and instructor in CS — most programming assignments and projects often take large amount of time, even if slimmed down to just fundamentals. There is a definite learning curve to build the skills, and personal mental model surrounding syntax, compilation, building, layout, debugging and deciphering build errors, and that’s before the more interesting data structures and algorithms kick in.&lt;/p&gt;&#xA;&lt;p&gt;At my uni, there were the “Big 3” 4th year courses that were advised a) not to take more than one a term, b) to take a lighter course load if possible. Despite this, all nighters were a given, and some labs even had couches to crash on. The graphics course was hands down one of these, given the involved and highly detailed work required to get things working. And it is the same effort and work ethic that is essential to eg. the games industry which still motivates many people to register in CS.&lt;/p&gt;&#xA;&lt;p&gt;Some people realize this time commitment and determine they either don’t have, or don’t want to spend their time this way.&lt;/p&gt;&#xA;" OwnerUserId="9729" LastActivityDate="2020-11-19T06:06:39.077" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6610" PostTypeId="2" ParentId="6598" CreationDate="2020-11-19T07:33:16.077" Score="1" Body="&lt;p&gt;I think there is a element where people are picking up on this 'everyone in the future must be able to code' attitude that has become fashionable in the last ten years or so. This is of course as ridiculous as saying everyone must be an engine mechanic or concert pianist. Everyone should be computer-literate, able to be safe online, spot malware and so on. The young men and women with a natural ability for coding should be spotted early and put into educational streams that encourage and support them and probably into decent apprenticeships\internships afterward.&lt;/p&gt;&#xA;&lt;p&gt;Also these days so much of the coding world revolves around web applications and one look at that insanely over-complicated mess would put anyone off.&lt;/p&gt;&#xA;" OwnerUserId="8659" LastActivityDate="2020-11-19T07:33:16.077" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6613" PostTypeId="2" ParentId="6598" CreationDate="2020-11-20T00:44:43.323" Score="-1" Body="&lt;p&gt;I don’t see anyone mentioning the fact that programming ≠ computer science.  These are two entirely different disciplines, and it seems to me that there isn’t enough emphasis on this fact.&lt;/p&gt;&#xA;&lt;p&gt;Take a look at Stanford’s CS 101 &lt;a href=&quot;https://online.stanford.edu/courses/soe-ycscs101-sp-computer-science-101&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://online.stanford.edu/courses/soe-ycscs101-sp-computer-science-101&lt;/a&gt; and the list of topics covered.  Not a single one has anything to do with computer science.  Compare those topics to &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science&lt;/a&gt;, and try to figure out how those topics even get you started on the path to figuring out how you might even frame those questions, let along solve them.&lt;/p&gt;&#xA;&lt;p&gt;Computer science is hard because it’s a branch of symbolic logic and logic is hard.&lt;/p&gt;&#xA;" OwnerUserId="9396" LastActivityDate="2020-11-20T00:44:43.323" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6614" PostTypeId="2" ParentId="6092" CreationDate="2020-11-20T01:33:11.840" Score="3" Body="&lt;p&gt;As a current computer science tutor, I'd say there's a lot more detail and conditions regarding if, and how much, I'd help students for free.&lt;/p&gt;&#xA;&lt;p&gt;My college pays me for my time spent tutoring (I'm actually on the clock now, waiting between students), but the tutoring is completely free to the students, and I get paid whether a student shows up or not.&lt;/p&gt;&#xA;&lt;p&gt;When I'm not officially tutoring for the college, I'm still typically happy to help a struggling classmate or friend with their course. However, there is a limit to the extent I'll go, if I feel the effort isn't being reciprocated on their part.&lt;/p&gt;&#xA;&lt;p&gt;For example, a few of my students (in my official, paid tutoring) always show up having not read the assignment, or attempted to start it without my help. In my experience, this makes for a very frustrating, slow session, where I'm basically talking them through every step of the process (&amp;quot;no, put the semicolon after the parentheses, then press enter&amp;quot;). I wouldn't dedicate any extra time beyond what's required to help these students, as they're clearly not putting any effort in on their own.&lt;/p&gt;&#xA;&lt;p&gt;However, I'm also a participant in my college's robotics club, and I'm thrilled to work with helping the club members learn to program, as they have a genuine interest in learning, and reciprocate by teaching me when they can (many have extensive experience with metal working for example, but none with programming).&lt;/p&gt;&#xA;&lt;p&gt;Likewise, it makes a huge difference for a student to come in having already attempted the problem, and able to describe the specific issue they're stuck with.&lt;/p&gt;&#xA;&lt;p&gt;It also helps a ton if they're just being generally friendly and appreciative of my help (pretty much all students are polite, but some just stand out for their sheer friendliness).&lt;/p&gt;&#xA;&lt;p&gt;Regarding a theoretical unpaid service for helping others, I'd likely be happy to contribute to such a project, except for the fact that I know I'd end up far too much time on it, it's just too hard to say no to a struggling student. I learned very quickly why my college tutoring center policy is to not give your contact information to students. It's nice to be able to help them, until they're pleading for help preparing for their finals, and you have your own finals to focus on!&lt;/p&gt;&#xA;&lt;p&gt;By the way, I haven't looked into it too much, but I believe there is a community that sounds similar to what you're describing, in the &lt;a href=&quot;https://www.reddit.com/r/ProgrammingBuddies/&quot; rel=&quot;nofollow noreferrer&quot;&gt;r/programmingbuddies subreddit&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9757" LastActivityDate="2020-11-20T01:33:11.840" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6615" PostTypeId="2" ParentId="6598" CreationDate="2020-11-20T15:48:51.067" Score="3" Body="&lt;p&gt;Computer Science, as taught, is a combination of Mathematics and Computer Programming.  Mathematics is the part that is the theory of computing, and programming is the art of applying it.&lt;/p&gt;&#xA;&lt;p&gt;I'll dub the Mathematics party &amp;quot;theoretical&amp;quot;, and the programming part &amp;quot;applied&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Now, both parts are hard.  But are hard for somewhat different reasons.&lt;/p&gt;&#xA;&lt;h2&gt;Applied Computer Science&lt;/h2&gt;&#xA;&lt;p&gt;Programming is hard for a few reasons.  Every programming problem is judged first not by your instructor, but by the world's most harsh marker; the compiler/interpreter.  Every program you write ends up being instructions for some idiot-savant computer to follow.&lt;/p&gt;&#xA;&lt;p&gt;It is like trying to write an essay in English, but if your letters aren't formed right, you have any spelling mistakes, or there is any grammar errors, the teacher isn't able to actually read your essay.  Instead, they are forced to examine each word in isolation, then after verifying them themselves they can look at each sentence in isolation, etc.&lt;/p&gt;&#xA;&lt;p&gt;This creates a sharp discontinuity in your initial ability to get things done.  The syntax of the languages you are using is, almost unavoidably, harsh on relative beginners.&lt;/p&gt;&#xA;&lt;p&gt;Once you pass that tier, you end up with yet another situation where there are discontinuous errors that are harsh on relative beginners.&lt;/p&gt;&#xA;&lt;p&gt;Programming is the art of managing insane amounts of complexity while telling a complete idiot how to solve a problem, exactly.&lt;/p&gt;&#xA;&lt;p&gt;The ability for computers to do things exactly as described, extremely quickly, means programs are some of the most complex things humanity has ever designed on purpose.  As someone learning programming, you end up building increasingly complex things.  Each stage of this effort has to not only be good, but perfect, as errors in a lower tier of complexity will compound and make the next one impossible to do.&lt;/p&gt;&#xA;&lt;p&gt;When you write a statement, your variables and operators can't have errors, or the statement won't work.&lt;/p&gt;&#xA;&lt;p&gt;When you write a function, your statements can't have errors, or the function won't work.&lt;/p&gt;&#xA;&lt;p&gt;When you write an algorithm, your functions can't have errors, or the algorithm won't work.&lt;/p&gt;&#xA;&lt;p&gt;When you connect algorithms into a simple program, the algorithms can't have errors, or the program won't work.&lt;/p&gt;&#xA;&lt;p&gt;You have to reach near-100% reliability on each tier, and learn how to deal with the less-than-100% reliability, before you can get any kind of reliability on the next.&lt;/p&gt;&#xA;&lt;p&gt;To handle this, programmers have come up with increasingly abstract patterns.  Each of these patterns is [b]hard[/b] to master, as they encapsulate extremely complex problems with seemingly arbitrary rules.&lt;/p&gt;&#xA;&lt;p&gt;A short list of these patterns that programming students find hard to master might include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Variables&lt;/li&gt;&#xA;&lt;li&gt;Assignment vs Equality&lt;/li&gt;&#xA;&lt;li&gt;Control flow and looping&lt;/li&gt;&#xA;&lt;li&gt;Recursion&lt;/li&gt;&#xA;&lt;li&gt;Sub procedures/functions&lt;/li&gt;&#xA;&lt;li&gt;Pointers and indirection&lt;/li&gt;&#xA;&lt;li&gt;Code generation and macros&lt;/li&gt;&#xA;&lt;li&gt;Resource management and lifetime&lt;/li&gt;&#xA;&lt;li&gt;Threading&lt;/li&gt;&#xA;&lt;li&gt;Encapsulation&lt;/li&gt;&#xA;&lt;li&gt;Purity&lt;/li&gt;&#xA;&lt;li&gt;Mutability&lt;/li&gt;&#xA;&lt;li&gt;Asynchronicity&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(in no particular order, and not comprehensive).&lt;/p&gt;&#xA;&lt;p&gt;People learning programming often run into one of these, and just can't get it.  And unless you get it, you can't get past that barrier, and often fail out.  (One of the advantages of Java and other managed languages to teach programming is that you can neglect much of pointers and resource management and teach other stuff at beginner levels; the downside is you graduate people who don't have to learn that stuff.)&lt;/p&gt;&#xA;&lt;p&gt;These are all levels of abstraction programmers have developed to manage increasingly complex programs.  Strategies that work at lower levels of complexity fail at higher ones, so students who are using &amp;quot;ill advised&amp;quot; strategies can easily pass a course then fall apart in the next one.&lt;/p&gt;&#xA;&lt;h2&gt;Theoretical Computer Science&lt;/h2&gt;&#xA;&lt;p&gt;This branch is all about understanding the idea of computation, as opposed to the art.  You do need it in order to do certain kinds of applied computer science problems, so even in &amp;quot;professional&amp;quot; courses it is taught.  And as academics are teaching it, often it is included anyhow, as the theoretical computer science often is needed to expand the entire field of knowledge of computer science.&lt;/p&gt;&#xA;&lt;p&gt;This is a branch of mathematics, and like most kinds of mathematics requires iterative mastery.  In order to do multiplication effectively, you have to not only be able to do addition, but you have to master it.  That very simple step is mirrored along the entire tower of mathematical knowledge.&lt;/p&gt;&#xA;&lt;p&gt;In many other fields, you can muddle along with the previous foundation layer having issues, and maybe patch it up later.  But when you try to do that in mathematics things just fall apart.&lt;/p&gt;&#xA;&lt;p&gt;Mathematics in much of the world is initially taught by people who hate and are bad at mathematics -- elementary school teachers.  So we end up with a lot of people with a poor foundation in ciphering showing up in secondary education, then muddling though classes without every achieving mastery, then deciding to go into a lucrative field (programming).  And without mastery of the previous tiers of mathematics, the theoretical computer science they teach is extremely difficult.&lt;/p&gt;&#xA;&lt;p&gt;The student, whose goal was &amp;quot;get a highly paid programming job&amp;quot;, finds this abstract computer science both hard and difficult to connect to their goal.  Their problems with the material are foundational; they don't have the background required.  The educators problem is that teaching that background requires fixing their 10 years of primary and secondary mathematics the student came in with.&lt;/p&gt;&#xA;&lt;p&gt;Cutting theoretical computer science for applied computer science courses is plausible, but then the students aren't able to predict very well how to make programs do new tasks without taking forever to do them (programming efficiency, algorithmic complexity), or deal with logic problems surrounding multi-threaded programming, or a myriad of other important skills in the applied field.&lt;/p&gt;&#xA;&lt;h2&gt;Real World&lt;/h2&gt;&#xA;&lt;p&gt;Programming is currently a lucrative, expanding field.  This has a number of impacts.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Students are drawn to it not out of intrinsic interest or inclination, but because they want to make money at it.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Experts are harder to convince to be teachers, as not-teaching is lucrative, and teaching is difficult.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The number of students grows over time, so the previous generation of students (who supply the teachers) is smaller.  This makes the problem of finding teachers harder.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The field itself is young.  With other fields, we know millions of ways not to teach it; with computer science, we haven't had time to make as many mistakes and refine our education.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;On top of that, the profession is a relatively solitary one.  So it draws introverts; convincing introverts to have a career teaching students is an extra problem, reducing the pool of potential teachers further.&lt;/p&gt;&#xA;" OwnerUserId="978" LastActivityDate="2020-11-20T15:48:51.067" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6616" PostTypeId="1" CreationDate="2020-11-20T16:25:20.323" Score="0" ViewCount="120" Body="&lt;p&gt;The pandemics has incredibly increased the number of cheating cases. Do you know of any script (bash or other scripting language) for checking a bunch of Java code submissions for similarity? I know I could use &lt;code&gt;diff&lt;/code&gt;, but it would be hard to detect similarity.&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2020-11-20T21:45:51.963" Title="Cheating detection script" Tags="|programming|java|cheating|" AnswerCount="1" CommentCount="2" ClosedDate="2020-11-22T22:53:33.750" ContentLicense="CC BY-SA 4.0" />
  <row Id="6617" PostTypeId="2" ParentId="6616" CreationDate="2020-11-20T16:46:54.987" Score="3" Body="&lt;p&gt;Take a look at MOSS from Stanford (&lt;a href=&quot;https://theory.stanford.edu/%7Eaiken/moss&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://theory.stanford.edu/~aiken/moss&lt;/a&gt;). It is an easy to use free web service that compares files and reports similarities. You set up a free account and submit a request and what is returned is a URL to a report showing the similarities of various files.&lt;/p&gt;&#xA;&lt;p&gt;I have found that the easiest way to do this is to submit a .tar file structured at the first level as a series of sub directories, each identifying a single student (name, studentID, etc). Beneath each student directory are the file(s) they have submitted. These commonly have exactly the same names as the assignment typically specifies the class names of the Java classes.&lt;/p&gt;&#xA;&lt;p&gt;For small assignments, you will get a high correlation between students as there is only so much variation possible, but you can look at the &amp;quot;most similar&amp;quot; and get a good feel for whether cheating is likely to have taken place. Depending on how the students actually submit their programs, it may be easy to write a script that automates the process. I'm happy to share details with anyone&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2020-11-20T21:45:51.963" LastActivityDate="2020-11-20T21:45:51.963" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6618" PostTypeId="2" ParentId="6598" CreationDate="2020-11-20T17:12:57.300" Score="2" Body="&lt;p&gt;I have been a professor of computer science and engineering (CSE) in the USA for a number of years in ABET accredited CAC and EAC undergraduate programs (graduate programs do not have ABET accreditation in CSE as I recall).  Reading these comments, I have a few things to mention.&lt;/p&gt;&#xA;&lt;p&gt;The first is the economic motivation -- accumulation of wealth or even gainful employment.  Most of such accumulation is based upon technology, not basic science or engineering.  Many of the students I have met do not understand the difference between Information Technology (IT) and CSE.&lt;/p&gt;&#xA;&lt;p&gt;Why is CSE much more difficult than IT?  CSE is a highly abstract intellectual field that nonetheless has very concrete instantiations.  CSE uses, develops, and requires &amp;quot;higher&amp;quot; mathematics.  Does an IT person who is &amp;quot;information security certified&amp;quot; (typically with a vendor-based credential) understand encryption in terms of the actual mathematics (for example, I use both the declassified Shannon monograph as well the details of AES as explained in the original Rijndael exposition), or quantitative threat estimation, Nash game theory and what goes beyond Nash, etc.?&lt;/p&gt;&#xA;&lt;p&gt;Admittedly, this is beyond what is covered in an ACM CS-1 course, but the issue is &amp;quot;why&amp;quot; do students find CSE &amp;quot;hard&amp;quot; (that is, a discipline in which many cannot demonstrate understanding proficiency).&lt;/p&gt;&#xA;&lt;p&gt;IT is by comparison &amp;quot;easy&amp;quot; -- CSE requires mathematics, some of it developed by CSE persons, not &amp;quot;mathematicians&amp;quot;, and the use of other fields to understand CSE whereas most IT-trained (and vendor &amp;quot;certified&amp;quot;) persons know specifics of installing and &amp;quot;maintaining&amp;quot; a particular technology from a particular vendor (more or less the equivalent of &amp;quot;how-tos&amp;quot;). As an example: why does a real computer create heat?  Because it produces information and thus reduces entropy, that requires work that in turn produces waste heat (increasing the entropy external to the created information) -- and requires an understanding of at least classical thermodynamics, or preferably an understanding of statistical mechanics and how entropy arises.&lt;/p&gt;&#xA;&lt;p&gt;Coding is not too difficult, but algorithm design and then establishing that the algorithm is provably correct is not as easy.  As neurosynaptic or quantum processors become more readily deployed, the issues will only increase.  An IT person working on a quantum processor will memorize rules, but will most likely not have an understanding of quantum mechanics (and the underlying mathematics).&lt;/p&gt;&#xA;&lt;p&gt;Some may interpret these statements as &amp;quot;elitist&amp;quot;; the issues are reality, not elitism.  With intensive tutoring and dedication on the part of both the student and the tutors, many students who currently do not &amp;quot;survive&amp;quot; to a CSE ABET-accredited or equivalent diploma, can graduate.  I have seen it and done it (with help from my TAs and myself) -- but those who dispense resources (funds, personnel, facilities) do not provide those resources, and students who could &amp;quot;swim&amp;quot; instead &amp;quot;sink&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="9758" LastEditorUserId="27" LastEditDate="2020-11-20T17:35:01.263" LastActivityDate="2020-11-20T17:35:01.263" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6619" PostTypeId="2" ParentId="6598" CreationDate="2020-11-21T05:55:47.820" Score="0" Body="&lt;p&gt;I would say the answer is shifting from &amp;quot;the strangeness of the platform&amp;quot; to &amp;quot;the raw number of operations that have to be perfect.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;In the past, when computers were weaker, what made CSci so hard is that the tools did not fit the problems as well as we might like.  There's something very unintuitive about how you had to work with them.  And there's some real beauty in seeing how people grappled with this with cunning intuitions.  The greats like Alan Turing and Grace Hopper truly revolutionized things with cunning shifts in intuition.&lt;/p&gt;&#xA;&lt;p&gt;Nowdays, what I think makes CSci so hard is that the primary thing we do is operations that have to get repeated many many many many times.  As I type this, in the USA, we are dealing with the 2020 national elections.  There's great frustration in the handling of 330,000,000 slips of paper (give or take, depending on voter turnout) and getting them into the right places and making sure they're all done right.  Its hard.  And it has to be done 330 million times.  We can afford to make a few mistakes here and there, we just try to keep them small so that they don't change the result of the election.&lt;/p&gt;&#xA;&lt;p&gt;A while back, I did a computer science task which involved 4,000,000,000,000 operations, all of which had to be done absolutely perfectly in order for the answer to be valid.  Four &lt;em&gt;trillion&lt;/em&gt; operations.&lt;/p&gt;&#xA;&lt;p&gt;For me, it was a Tuesady.  There was nothing weird about these requirements.  That was just sort of the usual daily expectations.  I didn't even warm up a grid, which would have added a few zeros to that.  That kind of perfection is just part of the job.&lt;/p&gt;&#xA;&lt;p&gt;The tools you use to immaculately manage 4 trillion operations while you sit back and sip your coffee are, obviously, rather exacting.  And its rare that we find places to use them outside of CSci, so there's not much room to develop intuition.  I don't care how fast radix sort is, if you have to sort a bunch of numbers, you'll typically do it the intuitive way rather than the theoretically optimal way.  And, having done it both ways, the theoretically optimal way is often slower (until you get to very large numbers of records).&lt;/p&gt;&#xA;" OwnerUserId="812" LastEditorUserId="812" LastEditDate="2020-11-21T16:24:23.940" LastActivityDate="2020-11-21T16:24:23.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6622" PostTypeId="2" ParentId="6598" CreationDate="2020-11-21T20:18:21.463" Score="1" Body="&lt;p&gt;Maybe computer science is hard, because it gets lost in translation. Consider the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The processor that you are writing code for is a bunch of logic blocks&lt;/li&gt;&#xA;&lt;li&gt;the language that you are using is a set of logic blocks as well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Maybe the correct way to write software manuals is to simply show the logic block behind each keyword, and restrict human language to aftermarket tutorials, and how to manuals.&lt;/p&gt;&#xA;" OwnerUserId="9707" LastEditorUserId="204" LastEditDate="2020-11-22T10:50:30.037" LastActivityDate="2020-11-22T10:50:30.037" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6625" PostTypeId="1" AcceptedAnswerId="6649" CreationDate="2020-11-23T16:03:51.133" Score="0" ViewCount="354" Body="&lt;p&gt;I have just graduated from university with a B.S. in Economics. I am looking into changing fields into something less abstract and more practical, Computer Science.&lt;/p&gt;&#xA;&lt;p&gt;I have the choice between a couple options.&#xA;Either a two year bachelor's degree with a two year master's degree in computer science.&#xA;Or a four year bachelor's degree in computer science engineering. You can call it software engineering.&lt;/p&gt;&#xA;&lt;p&gt;I'm wondering if there are any concrete differences between the options.&lt;/p&gt;&#xA;" OwnerUserId="8012" LastActivityDate="2021-04-08T02:05:58.477" Title="Difference between a Bachelor's degree and a Master's degree in CS" Tags="|undergraduate|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6626" PostTypeId="2" ParentId="6598" CreationDate="2020-11-24T07:02:56.897" Score="0" Body="&lt;p&gt;The &lt;a href=&quot;https://cseducators.stackexchange.com/a/6613/1293&quot;&gt;answer of jmoreno&lt;/a&gt; states:&#xA;Compare those topics to &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science&lt;/a&gt;, and try to figure out how those topics even get you started on the path to figuring out how you might even frame those questions, let alone solve them.&lt;/p&gt;&#xA;&lt;p&gt;Computer science is hard because it’s a branch of symbolic logic and logic is hard. End excerpt.&lt;/p&gt;&#xA;&lt;p&gt;Two comments: the List of Unsolved Problems (after having read the Wikipedia item) are considered within the context of classical digital computing -- using integers or perhaps natural numbers, and within the Church-Turing hypothesis, on a Universal Turing Machine (UTM) or, for parallel architectures, on a Parallel Random-Access Machine (PRAM).  There are models different from either of these (with unsolved problems and conjectures); two of the most promising are quantum computers (and information transfer) and a rather more empirical approach, neurosynaptic computing (that has other names for similar concept).  Quantum computing has a formal theory and is just starting to develop working hardware that instantiates quantum architectures.  Neurosynaptic computing is a much more empirical approach to producing something akin to actual &amp;quot;artificial intelligence&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;For example, one model uses an empirical connectome (at a specific scale of detail, not necessarily at each neuron and other brain components), observed from a non-human primate.  This connectome is then modeled with solid-state electronic components (e.g., VLSI circuits that actually are fabricated).  If the original biological brain has &amp;quot;intelligence&amp;quot;, then the neurosynaptic electronic solid-state instantiation (model) is envisioned to have similar intelligence.  The understanding of &amp;quot;how&amp;quot; the machine works, that is, a provably correct classical or quantum algorithm does not necessarily apply, but the empirical observations are intended to emulate what the biological brain would have done, including learning and adaptation to new &amp;quot;stimuli&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;My point is this:  in addition to the stated classical unsolved problems, completely different approaches to computation are being proposed and actually developed into physical machines (with the understanding that biological systems are, in this sense, physical machines -- no supernatural invocations involved). The issues that make computer science &amp;quot;hard&amp;quot; are now harder. The other point is that computer science uses logic (the first-order classical predicate calculus or perhaps higher orders), but in many ways goes beyond such logic.  It requires mathematics (including &amp;quot;arithmetic&amp;quot;) to establish algorithms; however, once one accepts that, one is beyond logic that provably is consistent and complete, and faces instead the problem of Gödel's incompleteness theorems.&lt;/p&gt;&#xA;" OwnerUserId="9758" LastEditorUserId="1293" LastEditDate="2020-11-24T13:32:21.603" LastActivityDate="2020-11-24T13:32:21.603" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6627" PostTypeId="1" CreationDate="2020-11-25T21:58:06.827" Score="1" ViewCount="36" Body="&lt;p&gt;I found that Advanced Programming Unix Environment and The Linux Programming Interface provide specific programming knowledge to me, compared to the concepts introduced in OS text books such as the dinosaur book Operating System Concepts.&lt;/p&gt;&#xA;&lt;p&gt;Are there equivalences for distributed systems:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;books for programming environments/interfaces of distributed systems (either for specific interface, or better yet, some abstract interface)?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;books for concepts of distributed systems? (Are Courloris' book and Tanenbaum's book the best books available?)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2020-11-25T21:58:06.827" Title="Books for programming environments/interfaces of distributed systems?" Tags="|textbook|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6628" PostTypeId="2" ParentId="5176" CreationDate="2020-11-26T13:27:30.660" Score="0" Body="&lt;p&gt;James Tanton makes it very clear how binary numbers emerge: Exploding Dots&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=bvglHQk-Ygs&amp;amp;list=PLoBaXWXBi2d6JJ-HpXk38SmkCFrGX9iJD&amp;amp;ab_channel=JamesTanton&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=bvglHQk-Ygs&amp;amp;list=PLoBaXWXBi2d6JJ-HpXk38SmkCFrGX9iJD&amp;amp;ab_channel=JamesTanton&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-11-26T13:27:30.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6630" PostTypeId="1" CreationDate="2020-11-27T18:12:59.677" Score="2" ViewCount="37" Body="&lt;p&gt;Are there practical applications (or other reasons) to teach (2,3) and AVL search trees with both keys and the associated information (as opposed to only search keys) in the internal nodes, as opposed to internal nodes having only keys and leaves having the information associated to them?&lt;/p&gt;&#xA;&lt;p&gt;Two generic Data Structures implementing the Dynamic Dictionary Abstract Data Type are &amp;quot;(2,3) Trees&amp;quot; and &amp;quot;AVL Trees&amp;quot;. Such a dynamic dictionary data structure implements (at least) the methods insert(key,info), search(key), remove(key,info). When teaching those, in order to simplify, save space and draw examples quicker, one can omit the &amp;quot;information&amp;quot; part, hence reducing the dynamic dictionary abstract data type (ADT) to a dynamic set ADT. This generates some minor technical differences:&lt;/p&gt;&#xA;&lt;p&gt;A. inserting the pairs (10,A), (20,B), (30,C) in a dictionary (2,3) Tree yields a tree of height 1, with the pair of keys (20,30) at the ternary root separating 3 leaves coding for the 3 pairs (10,A), (20,B), (30,C); while&lt;/p&gt;&#xA;&lt;p&gt;B. inserting the keys 10,20,30 in a set (2,3) Tree yields a tree of height 2, with a binary node (20) at the root, separating two binary nodes (10) and (30) [separating 4 empty leaves, if this makes any sense].&lt;/p&gt;&#xA;&lt;p&gt;I find solution B a bit confusing to me (albeit I can cope with that) but, more importantly, confusing to undergraduate students, who end up learning how a search tree works without understanding why it works this way. I am wondering if it is an example of simplification making it (voluntarily) more complicated, or if there are reasons (e.g. practical applications) to study search trees with information (or pointers to information) along with the search keys in the internal node.&lt;/p&gt;&#xA;&lt;p&gt;Notes: Obviously  enough,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Splay trees SHOULD have the information (or pointer to it) along with the search keys in the node; and&lt;/li&gt;&#xA;&lt;li&gt;any search tree optimizing memory accesses (such as B-Trees) should have all information in the leaves in order to minimize paging while navigating the internal nodes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9786" LastActivityDate="2020-11-29T18:07:15.307" Title="Teaching (2,3) and AVL Trees: information in internal nodes or in external nodes?" Tags="|data-structure|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6631" PostTypeId="2" ParentId="6630" CreationDate="2020-11-27T22:34:59.550" Score="3" Body="&lt;p&gt;I think the two situations are entirely different in applications. In the case that the internal nodes are only search keys we find applications in database indices. By associating keys with internal nodes we obtain space efficient dictionary types.&lt;/p&gt;&#xA;&lt;p&gt;The contrast between the two cases could help learners understand the concepts more easily. By focusing on the differences between the two cases, perhaps without too much reference to the implementation of the tree operations themselves, learners would better understand the utility of the datatype.&lt;/p&gt;&#xA;&lt;p&gt;Once that is the case you could choose either case to explore the operations in more detail. Or why not be groovy and use red/black trees. As a student I found AVL and 2-3 tree theory deeply boring whereas red/black trees were quite exciting. I think because the rules are so much more interesting, involving colours rather than arithmetic.&lt;/p&gt;&#xA;&lt;p&gt;As a teacher I have always regarded me being confused as a sure sign that my learners will be. Perhaps more visuals would help out - and that means colours - and those tree rotations are beautiful!&lt;/p&gt;&#xA;&lt;p&gt;I would also say that such things are not really confusing - its just how they work out - like music, its just that way. Similarly AVL trees and 2-3 trees being the data type analogue of Manhatten Transfer are less inspiring to a modern audience than &lt;a href=&quot;https://www.youtube.com/watch?v=HZfnmNf5MwA&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=HZfnmNf5MwA&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What you say about splay trees, and the finer implementation details of B+tree indices is correct, but who really cares - not your students - they are already confused. Give them some colours, give them a taste of the good stuff and ... then start looking at 2-3 trees, I mean, when you are no longer bored, confused and not listening - but instead - curious and inspired, those 2-3 trees ... well are they&#xA;Fibonachi? I mean, thats better than dyadic surely ....&lt;/p&gt;&#xA;&lt;p&gt;Answer - its best if your students are still awake after 10 minutes, ;)&lt;/p&gt;&#xA;" OwnerUserId="8007" LastEditorUserId="8007" LastEditDate="2020-11-29T18:07:15.307" LastActivityDate="2020-11-29T18:07:15.307" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6632" PostTypeId="2" ParentId="6563" CreationDate="2020-11-27T22:57:41.490" Score="2" Body="&lt;p&gt;I would probably go with expression trees.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;2 + ( 6 * x * 3 )  ---&amp;gt;  &#xA;&#xA;         +&#xA;       /   \&#xA;       2    *&#xA;           /  \&#xA;           *  3&#xA;          / \&#xA;         6   x&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It demystifies something, it's based on pre-existing knowledge, there are umpteen ways to generate practical exercises and it represents an abstract use of the&#xA;data type. It's also fun.&lt;/p&gt;&#xA;&lt;p&gt;Moving on you could look at common sub-expressions as a way of introducing DAGs.&#xA;The tree traversals have different applications also - e.g. postorder traversal&#xA;is useful for evaluation.&lt;/p&gt;&#xA;&lt;p&gt;Sorry, its not a pseudo academic answer oozing with self aggrandising polemic but it seems to fit the tone of your question. Worked well with my lot.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastEditorUserId="8007" LastEditDate="2020-11-28T21:30:35.200" LastActivityDate="2020-11-28T21:30:35.200" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6633" PostTypeId="1" CreationDate="2020-11-28T17:24:21.400" Score="2" ViewCount="178" Body="&lt;p&gt;Is there any list of concepts re computer science? I'm a uni student with gaps of time in the study due to illness and I want to revise things, but because of reduced course loads and weird ordering due to illness. I'm not sure what I remember or not. And looking for tutors online they only seem to tutor in one thing.&lt;/p&gt;&#xA;&lt;p&gt;I'm not sure what I should prioritize or what order to revise in - so I know what to work on with a tutor or which area to start? I've done an intro Python course, Java course re bigger project, HCI, linear algebra, Discrete Maths, Multivariate Calculus, Algorithms, Computer Systems course with small amount of C, Stats course, Information Systems (SQL and DB Design, 2nd year one on internals like B+ index and other stuff, Big Data). I've also done 2 specific Bioinformatics courses and Biology-related courses regarding Bioinformatics stuff.&lt;/p&gt;&#xA;&lt;p&gt;Plus I've gone on websites like HackerRank or codename or CodeCombat or exercise. I know there's edX and Coursera.&lt;/p&gt;&#xA;&lt;p&gt;Probably the wrong place to ask, but I wish I could have a checklist because the current approach of doing things on websites is not helping me. Oh, when I did these courses I got results in the top 2 grading scale categories, but because of time...&lt;/p&gt;&#xA;" OwnerDisplayName="user9790" LastEditorUserId="9154" LastEditDate="2021-07-15T15:22:09.960" LastActivityDate="2021-07-15T15:22:09.960" Title="Are there any lists of concepts in a re computer science?" Tags="|self-learning|undergraduate|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6634" PostTypeId="2" ParentId="6633" CreationDate="2020-11-28T17:37:02.020" Score="3" Body="&lt;p&gt;At degree level it isn't likely you will find a single book or teacher to cover all the material.&lt;/p&gt;&#xA;&lt;p&gt;I would make a list of the course titles that you have missed then go to the &lt;strong&gt;library&lt;/strong&gt;. You will probably find a section of books for each of your course topics. Usually the course notes will have a recommended textbook.&lt;/p&gt;&#xA;&lt;p&gt;If you are struggling you could also talk to your course tutor.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-28T17:37:02.020" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6635" PostTypeId="2" ParentId="6633" CreationDate="2020-11-28T19:09:03.513" Score="5" Body="&lt;p&gt;Look at the list of courses offered at the undergraduate and master's level at your own university and a couple of others. The course titles should give you a pretty good idea of the range of things.&lt;/p&gt;&#xA;&lt;p&gt;The list of courses you say you've had may be a bit focused on applications, rather than theory, and on maths rather than CS. I'm not seeing Operating Systems or Compilers and Language Principles, for example.&lt;/p&gt;&#xA;&lt;p&gt;Any single university's catalogue should be pretty close to covering it, but might miss one or two things. Look at two or three online. Some will even provide a syllabus if you can find the professors that normally teach the courses.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-11-28T19:09:03.513" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6636" PostTypeId="2" ParentId="6598" CreationDate="2020-11-28T21:21:47.447" Score="2" Body="&lt;p&gt;My head of department posed a question at a staff meeting, &amp;quot;how can we reward those students that work really hard?&amp;quot;. My colleagues suggested cinema tokens, shop vouchers, prizes, ..., you get the picture.&lt;/p&gt;&#xA;&lt;p&gt;When it was my turn I said &amp;quot;extra homework&amp;quot;. There was a silence, then the head of department asked me if I &amp;quot;was serious&amp;quot;. To which I replied yes, because the students that work hard like the subject and have intrinsic motivation, so they want to learn more, and so, the best reward we can offer is extra homework.&lt;/p&gt;&#xA;&lt;p&gt;I was really thinking about Bem's theory of self perception. &lt;a href=&quot;https://en.wikipedia.org/wiki/Self-perception_theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;Self perception theory&lt;/a&gt;. Our political representatives and managers want to see success in STEM subjects generally, so many false promises, bribes and other forms of encouragement are applied to 'encourage' learners into STEM. I believe that particularly in CS our learners are being driven by the promise of &lt;em&gt;extrinsic&lt;/em&gt; rewards.&lt;/p&gt;&#xA;&lt;p&gt;Whether it is the promise of a large salary, the association of CS with 'fun' technologies or the social kudos associated with the movie images of hackery, none of the drivers are really about the subject. On arrival, instead of slick, fun and cool our learners find it takes 200 lines of C coding to put a dot on a screen, three years of pure maths courses to understand why neural networks don't work really and after reading a pile of books 2m high, countless RFCs and a half the UNIX manual pages they are still unable to understand what's wrong with their sendmail.conf or build a stable kernel, or use &lt;em&gt;vim&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;And why would they bother? Afterall, they are here for the salary, the fun, the kudos. They want to drive sports cars whilst playing CODwars and wearing hoodies. They don't want &lt;a href=&quot;https://ftp.gnu.org/old-gnu/Manuals/m4-1.4/html_chapter/m4_5.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;. And they aren't interested in &lt;a href=&quot;http://www.optimization-online.org/DB_FILE/2009/03/2266.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;that&lt;/a&gt; either. Our basic problem is that they are the wrong students with the wrong motivations.&lt;/p&gt;&#xA;&lt;p&gt;Out teaching strategies don't help either. Nobody is going to get taught CS. A few might learn if they're motivated though. If the teacher hasn't read Vygotsky and the class isn't based on some constructivist learning principles you can forget it. It was hard enough to learn CS forty years ago when it was &lt;a href=&quot;https://previews.123rf.com/images/rtdesignstudio/rtdesignstudio0912/rtdesignstudio091200311/6133572-showing-small-thing-gesture.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;this big&lt;/a&gt;. Now its like &lt;a href=&quot;https://www.macmillandictionary.com/thesaurus-category/british/complicated-and-difficult-to-understand&quot; rel=&quot;nofollow noreferrer&quot;&gt;...&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The problem isn't that computer science is hard, its too easy. At least until you get to University when the truth finally kicks in (I am somewhat reminded of WW1 heroes off to 'give the old hun a kicking, hoorah' who then find themselves waiting to go over the top at Passchendaele). Out students are totally unprepared for the actual reality. CS &lt;em&gt;is&lt;/em&gt; maths, plus compiler design, the vim editor, gray codes, the use of tensor algebra to model shapes (Bookstein), the use of analytical topology to prove results about Perceptrons (Minsky and Pappert), the Godel incompleteness theorem, using gdb effectively, engineering philosophy, automated theorem proving, why this &lt;code&gt;b = (b * 0x0202020202ULL &amp;amp; 0x010884422010ULL) % 1023&lt;/code&gt; reverses a byte in three machine operations and with solving the integer knapsack using intelligent backtracking we get the tip of the iceberg.&lt;/p&gt;&#xA;&lt;p&gt;Great! There's loads of fun to be had in CS, infinities of it. But it isn't easy. We should return to teaching our young learners assembly language, get them editing real source code, throw all the maths from the trapezium rule to matrix inversions to axioms for semi-groups with unity &lt;em&gt;at school&lt;/em&gt;. Its hard and maddening - work in groups,  overclock the CPUs and watch them melt, rebuild kernels. Lets make it hard but lets have our students wanting to do actual CS. Failing that we will have no choice but to make it illegal, then we'll be seeing talent everywhere.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-28T21:21:47.447" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6639" PostTypeId="2" ParentId="6543" CreationDate="2020-11-29T21:53:07.310" Score="2" Body="&lt;p&gt;There are some very good ideas in the answers but have you considered asking your learners to perform a simple task on a very large piece of code? For example, adding a new item to the GIMP about menu or changing the error messages the AWK compiler to include the date of compilation using &lt;code&gt;__DATE__&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I feel that learners are too often presented with exemplar code and rarely with real world code that, for example, contain large sections of Fortran 77 mixed that call libraries of routines written in assembler commented in German.&lt;/p&gt;&#xA;&lt;p&gt;Many of our lessons concentrate on the need to have well structured and documented code with helpful comments. It is only when confronted with modifying code that the importance of this becomes evident. There are practical difficulties with large software objects for which tools such as grep and sed are very handy, again the importance of this only comes from maintaining code not from writing it.&lt;/p&gt;&#xA;&lt;p&gt;[ As an adjunct you could introduce your learners to the obfuscated C competition https://www.ioccc.org/ and ask them if they fancy maintaining some of that! ]&lt;/p&gt;&#xA;&lt;p&gt;I find students really like this approach as they start with something that works e.g. an alpha-beta pruning draughts playing program written in pascal, over which they have rights to augment and modify. This gives the learners a sense of empowerment rather than a feeling that after 10 hours of work they can sort six numbers into order having written a program they know nobody will ever use.&lt;/p&gt;&#xA;&lt;p&gt;I have also some specially written code for exercises which I have deliberately written to reflect some poor programming practices or code problems which illustrate why techniques for large software projects exist. I have variously, commented out large parts of the code; used #define statements in slightly misleading ways; used inconsistent interfaces etc. The aim then is to get the learners to form criticisms of the code.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-29T21:53:07.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6640" PostTypeId="2" ParentId="6454" CreationDate="2020-11-29T22:10:14.480" Score="3" Body="&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/aFfui.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/aFfui.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;For any problems involving graphs for which you need test data you can use Knuth's less well known work 'The Stanford Graph Base'. This includes many data sets designed to test all kinds of graph problems. The materials are described at &lt;a href=&quot;https://www-cs-faculty.stanford.edu/%7Eknuth/sgb.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www-cs-faculty.stanford.edu/~knuth/sgb.html&lt;/a&gt; and are available for download at &lt;a href=&quot;ftp://ftp.cs.stanford.edu/pub/sgb/sgb.tar.gz&quot; rel=&quot;nofollow noreferrer&quot;&gt;ftp://ftp.cs.stanford.edu/pub/sgb/sgb.tar.gz&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-29T22:10:14.480" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6641" PostTypeId="2" ParentId="6289" CreationDate="2020-11-29T22:27:29.400" Score="1" Body="&lt;p&gt;My software engineering project as an undergraduate (many many years ago) involved teams of five. Later as a postgraduate I was responsible for the assessment for the same exercise. The marking scheme involved a 50% component of peer marking.&lt;/p&gt;&#xA;&lt;p&gt;Not disclosed was that 30% of the remainder was related to the rms deviation of the marks awarded between team members. Consequently teams that agreed they had divided the work evenly got the bonus whereas teams who rewarded one individual did not.&lt;/p&gt;&#xA;&lt;p&gt;There was a verification process of course, and moderation but the approach worked very well.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-29T22:27:29.400" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6642" PostTypeId="2" ParentId="6266" CreationDate="2020-11-29T22:34:28.230" Score="2" Body="&lt;p&gt;Emil Post's correspondence problem is quite a good example. Its nice because it can often be solved by inspection in simple cases but there is no known algorithm for doing so. Its good to know about too - twice in my career I have been asked to solve it, so knowing it was undecidable certainly helped me.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Post_correspondence_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Post_correspondence_problem&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Unscrupulous employers can exploit the undecidability by preventing their employees from validating their payslips. If employees are paid in multiple parts for jobs performed over multiple contracts matching the payments to the work is an example.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-11-29T22:34:28.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6643" PostTypeId="2" ParentId="6598" CreationDate="2020-11-30T12:49:32.240" Score="-1" Body="&lt;p&gt;This discussion may soon be moot.&lt;/p&gt;&#xA;&lt;p&gt;Consider the following article from the New York Time Tech section:&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Meet GPT-3. It Has Learned to Code (and Blog and Argue)&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.nytimes.com/2020/11/24/science/artificial-intelligence-ai-gpt3.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.nytimes.com/2020/11/24/science/artificial-intelligence-ai-gpt3.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;That article links to this one: Where an English interpreter writes code on the fly...&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://twitter.com/sharifshameem/status/1283322990625607681&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://twitter.com/sharifshameem/status/1283322990625607681&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Just FYI.&lt;/p&gt;&#xA;" OwnerUserId="9707" LastActivityDate="2020-11-30T12:49:32.240" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6644" PostTypeId="1" CreationDate="2020-12-01T10:44:52.817" Score="2" ViewCount="69" Body="&lt;p&gt;Good afternoon, colleagues!&#xA;We're planning a year-long intro course to computer science for middle schoolers and going to use Logo as a main language but also looking for alternatives available to 5-6th graders. I'm looking for learning materials we can start to work from. Can you recommend anything that has a week-by-week plan with homeworks and in-class assignments to see if we're able to fit in limits we have?&lt;/p&gt;&#xA;&lt;p&gt;Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6387" LastEditorUserId="1293" LastEditDate="2020-12-01T13:14:22.733" LastActivityDate="2020-12-02T21:23:48.130" Title="Logo course scaffolding" Tags="|introductory-lesson|functional-programming|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6645" PostTypeId="1" CreationDate="2020-12-02T18:14:18.957" Score="4" ViewCount="84" Body="&lt;p&gt;I am supervising a team that is currently trying to build an online competitive programming course/school for a collection of high-schools in Turkey that all belong to a certain private educational institution.&lt;/p&gt;&#xA;&lt;p&gt;As a former graduate of one of these high-schools, having competed in physics Olympiad and currently studying CS I have been offered this job along with other college students studying CS, some of whom have won medals in national and international Olympiad in informatics.&lt;/p&gt;&#xA;&lt;p&gt;Our team has already made an outline for a curriculum and started teaching to a group of c. 80 students over Zoom.  Although we are confident in how and what to teach, we are unsure which platform to use as an LMS for uploading, sharing and organizing course material like presentations, assignments, etc. As a provisional solution we are currently using Discord but  are aware that in the long run Discord is not optimal as an LMS, as there is no way to share and organize course material in a structured manner. We are considering a better and more professional solutions but having very little experience in this area we are unsure which option to choose. Following have been considered:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Microsoft Teams&lt;/li&gt;&#xA;&lt;li&gt;Moodle or a similar LMS&lt;/li&gt;&#xA;&lt;li&gt;A custom build website&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I have been told that moodle is difficult to set up and is an overkill. Developing a custom web-site seems not very practical too. Do you think microsoft Teams can be suitably used as course/learning management system, where course material and assignments can be managed in a structured way? Do you have any other suggestions?&lt;/p&gt;&#xA;" OwnerUserId="9803" LastEditorUserId="9803" LastEditDate="2020-12-02T21:29:28.103" LastActivityDate="2020-12-03T21:45:47.147" Title="Platform recommendation for an online competitive programming school" Tags="|secondary-education|classroom-management|distance-learning|online|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6646" PostTypeId="2" ParentId="6644" CreationDate="2020-12-02T21:23:48.130" Score="3" Body="&lt;p&gt;Scratch comes with a large document of &lt;a href=&quot;https://scratch.mit.edu/educators&quot; rel=&quot;nofollow noreferrer&quot;&gt;day-by-day lessons along with labs&lt;/a&gt;.  As a side benefit, due to the exploratory nature of Scratch, creating new assignments is fairly simple.  &amp;quot;Create a movie about ____&amp;quot; or &amp;quot;create a small game that involves bouncing&amp;quot; or &amp;quot;create a game that responds to sounds as the controls&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Actually, that blank is great.  You can tell the students to create a &amp;quot;movie&amp;quot; or a game about any topic the kids are studying elsewhere in the curriculum, and allow them to make use of all of the techniques they've learned and explore other parts of the program.&lt;/p&gt;&#xA;&lt;p&gt;To my thinking, it's also advantageous to use scratch concurrently with logo, since using two systems will introduce the key computer science concepts twice within two giant, open, exploratory worlds.  This increases the chances that the kids will see the parallels and really begin to absorb the computer science concepts.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-02T21:23:48.130" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6647" PostTypeId="2" ParentId="6645" CreationDate="2020-12-02T21:41:24.850" Score="3" Body="&lt;p&gt;My first instinct is that &lt;em&gt;any&lt;/em&gt; LMS is overkill.  LMSs manage classrooms, it's true, but they also are designed to help manage &lt;strong&gt;schools&lt;/strong&gt;, and most of the administrative end (and most of the features outside of the literal classroom aspects, and even many of the features within the classrooms) of any LMS would be completely useless to you.  Busing, medical designations, learning disability plans, school lunch designations, guidance counselor assignments, etc, etc, etc, etc, etc, are all beyond what you need for such a small program.&lt;/p&gt;&#xA;&lt;p&gt;I'm assuming that most of what you're looking for is a way to distribute and receive assignments.  If this is, indeed, the case, I actually recommend using GitHub.&lt;/p&gt;&#xA;&lt;p&gt;At the start, kids can simply use your repo as a way to download files through the web interface, and can submit early assignments through Discord, just as you've already done.  After they're comfortable with the GitHub interface for downloading, you can start having them fork projects.  Introduce git functionality slowly, and keep supporting them with Discord in the meantime.&lt;/p&gt;&#xA;&lt;p&gt;You'll get two big big benefits out of this approach:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You don't have to get into anything &lt;em&gt;nearly&lt;/em&gt; as heavyweight as an LMS.&lt;/li&gt;&#xA;&lt;li&gt;The students will slowly become familiar and comfortable with basic git actions.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-02T21:41:24.850" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6648" PostTypeId="2" ParentId="6645" CreationDate="2020-12-03T21:45:47.147" Score="3" Body="&lt;p&gt;Google Classroom is a clean and feature light interface for managing the distribution and collection of course materials of a wide media variety. I teach about 100 students across five courses each semester using this platform. If you need a grade book that is integrated as well.&lt;/p&gt;&#xA;&lt;p&gt;I link to repl.it and let students fork my code in the cloud for some assignments and demos. I may link to and collect GitHub links as well.&lt;/p&gt;&#xA;&lt;p&gt;Repl classroom has unit testing built in for some languages. This might be helpful depending on the problem solving you are teaching . I list a number of activities per day on google classroom that I have listed over on Repl with unit testing.&lt;/p&gt;&#xA;&lt;p&gt;Unless the school you are partnering with has GSuite setup for their organization you may eventually run into some storage restrictions with google drive.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastActivityDate="2020-12-03T21:45:47.147" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6649" PostTypeId="2" ParentId="6625" CreationDate="2020-12-03T22:18:27.843" Score="1" Body="&lt;p&gt;From my experience in Canada, a master's is about specializing and focusing on a particular topic within the field while a bachelor's is about becoming a practitioner within the field.&lt;/p&gt;&#xA;&lt;p&gt;If, as you state, your goal is to obtain a more practical degree then both options can do that but in different ways:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A four-year bachelor's degree will provide you with breadth in CS;&lt;/li&gt;&#xA;&lt;li&gt;A 2-year split master's will teach you the basics of CS to allow you to focus on a particular area within CS in your master's.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you are looking to leverage your existing Economics with CS somehow then the master's is what you are looking for because you are adding CS to Economics.  If you are looking to become a computer scientist or programmer / software engineer, then the bachelor's is what you are looking for.  You will still learn (or be expected) to program in a master's in CS but you will be less focused on that in a master's than a bachelor's.&lt;/p&gt;&#xA;&lt;p&gt;Note that at the end of either program you will have a CS degree, but you will have different skills and its which skills you are looking to obtain that should help with your choice.&lt;/p&gt;&#xA;" OwnerUserId="9806" LastActivityDate="2020-12-03T22:18:27.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6650" PostTypeId="2" ParentId="6625" CreationDate="2020-12-03T23:51:09.000" Score="0" Body="&lt;p&gt;If you're trying to get away from the abstract to focus on tangible, demonstrable topics, software engineering is likely a preferable option. In the US, a good computer science program will have much more theory as well as getting into the nitty gritty of how computers work. You can expect courses like compiler design, operating systems, as well as a healthy dose of math. Software engineering will likely offer courses more suited to developers entering the workplace, like structured systems analysis &amp;amp; design which talk about SDLCs. You'll come out of both programs knowing how to program but the focus will be pretty different.&lt;/p&gt;&#xA;&lt;p&gt;I would be wary of a two year bachelors into a masters program because you may not have an adequate amount of time to find that thing to focus on.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastActivityDate="2020-12-03T23:51:09.000" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6651" PostTypeId="2" ParentId="5456" CreationDate="2020-12-04T12:33:30.417" Score="1" Body="&lt;p&gt;I make a different take on Turtle for complete beginners. I plan to introduce concepts gradually, to minimize cognitive load, hence my curriculum is not like one found on internet. For example, bounded loops, conditionals, variables and variable modifications are not introduced from start. And so, any examples with variables are not allowed.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Introduce &lt;code&gt;turtle.forward(50)&lt;/code&gt;, &lt;code&gt;turtle.left(90)&lt;/code&gt;, &lt;code&gt;turtle.color(&amp;quot;green&amp;quot;)&lt;/code&gt; and how they compose and make an angle. Ask to draw a square using this framework. Ask to draw an octagon, a hexagon (huh, hexagon causes beginners to start experimenting!). In my experience it can take full hour for them (12-yo) to actually grab the idea and environment. Extra bonus for those who can draw arbitrary regular N-gon.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Introduce &lt;code&gt;turtle.right(X)&lt;/code&gt;, &lt;code&gt;turtle.penup()&lt;/code&gt;, &lt;code&gt;turtle.pendown()&lt;/code&gt; and ask to draw some regular frames: cage, pyramid, etc. The images to reproduce are currently stored here: &lt;a href=&quot;https://hackmd.io/@pythondemo-v2/Sk6_t3Viw#Level-1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://hackmd.io/@pythondemo-v2/Sk6_t3Viw#Level-1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Part of previous task is to draw a few letters using turtle and make a word of those. The whole idea of those tasks is to make students write hundred of lines to get comfortable (or bored) with typing.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Next concept to introduce is eternal loop. Show how N-gon can be drawn using infinitely running turtle with just 2-3 commands. Show how small change to angle can make turtle go wild (the &lt;code&gt;turtle.left(91)&lt;/code&gt; example). It is best if student makes this change on it's own, as it causes WOW effect. Extremely unexpected.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Next concept to introduce is delayed code. The thing called &amp;quot;procedure&amp;quot;, or &amp;quot;function&amp;quot;, &amp;quot;abstraction&amp;quot; I name as &amp;quot;delayed named code&amp;quot;. Look, &lt;code&gt;while True:&lt;/code&gt; makes code block execute forever, and &lt;code&gt;def one_side():&lt;/code&gt; makes code block not execute at all, but available to run later many times.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Also it is still easy to introduce mathematical operations &lt;code&gt;/ 2&lt;/code&gt; and &lt;code&gt;* 3&lt;/code&gt;, which can be used to calculate angles to rotate (e.g., half of 90 is 45, but half of 45 is fractional, so maybe it makes sense to use &lt;code&gt;45 / 2&lt;/code&gt; or &lt;code&gt;90 / 4&lt;/code&gt; instead).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;And finally, introduce function parameters and how they are used when calling a procedure. Also introduce &amp;quot;default&amp;quot; argument value, to simplify code. Treat arguments as read-only -- use many times but don't change them.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;At this point (procedures, arguments and math expressions) Turtle becomes complex enough to teach concepts of code structuring and namings (of procedures and arguments). It makes sense to spend a few lessons on this stage and ask to draw many diagrams (&lt;a href=&quot;https://hackmd.io/@pythondemo-v2/Sk6_t3Viw#Level-2&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://hackmd.io/@pythondemo-v2/Sk6_t3Viw#Level-2&lt;/a&gt; for inspiration). Factoring letters from 3 each into it's own procedure can help creating larger words, which is, well, why procedures are really needed.&lt;/p&gt;&#xA;&lt;p&gt;After this stage, I plan to introduce event listeners, lists of colors and angles, loop over list, coordinate system, pair type and such. Variables and conditionals (and loops in loops) should be introduced very gradually and only after previous concepts have clicked.&lt;/p&gt;&#xA;&lt;p&gt;The bigger problem is to provoke drawing or experimenting ideas in student heads...&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-12-04T12:33:30.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6652" PostTypeId="2" ParentId="6449" CreationDate="2020-12-04T12:44:41.257" Score="1" Body="&lt;p&gt;I disagree with other commenters who say Turtle is not the best intro to programming. I've explained a planned curriculum in another answer, &lt;a href=&quot;https://cseducators.stackexchange.com/a/6651/9632&quot;&gt;https://cseducators.stackexchange.com/a/6651/9632&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The great thing about turtle is that it can be used to teach modularity through procedures. Teach to extract the repeating pattern. Teach to name things (and yes, sensible naming of things is a problem for beginners). Teach typing familiarity with full names &lt;code&gt;turtle.forward(50)&lt;/code&gt;, rather some simplified. Teach procedure parameters and how they pass through functions. Teach procedure as an argument to procedure. Teach Descartes coords and coords manipulation. Teach events.&lt;/p&gt;&#xA;&lt;p&gt;Each of these is hard topic, and turtle can provide lots of visual feedback to simplify understanding. Parametric graphics/animation is a good start.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-12-04T12:44:41.257" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6653" PostTypeId="2" ParentId="5358" CreationDate="2020-12-04T16:45:57.173" Score="2" Body="&lt;p&gt;I've tried running some demos before starting class and collecting preferences of different children. The list of demo programs is here &lt;a href=&quot;https://gist.github.com/danbst/ae4fd7cbb1ea97d5efbc80bd06b50075&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gist.github.com/danbst/ae4fd7cbb1ea97d5efbc80bd06b50075&lt;/a&gt;, all of which can run out-of-box on any python installation (with tkinter).&lt;/p&gt;&#xA;&lt;p&gt;Of those the most complicated is Minesweeper using TKinter &lt;a href=&quot;https://bit.ly/2ViDFAP&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bit.ly/2ViDFAP&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But, most interestingly, children often like terminal programs, not just GUI. Here's my collection of various preferences:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;labyrinth (terminal)&lt;/li&gt;&#xA;&lt;li&gt;ascii cats animation, cowboy (terminal game), minesweeper (Tk), nonuniform fractal trees (turtle)&lt;/li&gt;&#xA;&lt;li&gt;labyrinth, fractal trees&lt;/li&gt;&#xA;&lt;li&gt;diagonal maze (terminal), DNA animation (terminal), Hilbert curve (turtle), ascii-art digital clock (terminal), Matrix-like animation (terminal)&lt;/li&gt;&#xA;&lt;li&gt;minesweeper, cowboy&lt;/li&gt;&#xA;&lt;li&gt;Koch snowflake (turtle), minesweeper&lt;/li&gt;&#xA;&lt;li&gt;Mona Lisa (turtle drawing image), Koch snowflake, DNA animation, World map (terminal)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As you see, even though there were GUI and graphical programs, many children still liked terminal-only demos, or interactive. The &amp;quot;cowboy&amp;quot; program (&lt;a href=&quot;https://bit.ly/37pNqmk&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bit.ly/37pNqmk&lt;/a&gt;) is ridiculously simple, but still generates &amp;quot;fun&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-12-04T16:45:57.173" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6654" PostTypeId="2" ParentId="2793" CreationDate="2020-12-04T17:29:01.553" Score="1" Body="&lt;p&gt;I feel like &amp;quot;loops&amp;quot;, &amp;quot;variables&amp;quot;, &amp;quot;conditionals&amp;quot;, etc is a pretty loose distinction. For example, even that technically eternal loop is just a an example of &lt;code&gt;while&lt;/code&gt; loop, mentally it is a much much bigger thing, completely different. Or, another example, temporary variable is mentally different from initial or result variables.&lt;/p&gt;&#xA;&lt;p&gt;What makes it worse, &amp;quot;conditionals&amp;quot; are simple to define, but vastly increase possible ways to write a program. Like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;without loops and conditionals you can write programs, though those look simple (slightly more interesting if events are already introduced)&lt;/li&gt;&#xA;&lt;li&gt;with loops (but without conditionals) you can write repetetive programs, a big class of programs. For example, you can now compute &lt;span class=&quot;math-container&quot;&gt;$\pi$&lt;/span&gt;&lt;/li&gt;&#xA;&lt;li&gt;with conditionals (but without loops) you can't write much sensible programs. Even if you write one, it doesn't look fun&lt;/li&gt;&#xA;&lt;li&gt;with both loops and conditionals program space EXPLODES, however, beginner can't see that this explosion is zillion times larger than what was before.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;FWIW, is to introduce &amp;quot;incomplete&amp;quot; concepts, kinda &amp;quot;cliff-hangers&amp;quot;. The eternal loop allows you to iterate things. Uh-oh, that you can't use to bound iterations, otherwise you could do X1, X2, X3, X4, .... (here students have to feel that &amp;quot;uh-oh&amp;quot;). Next lesson: Hang on, but we actually can do bounded iteration! (introduce for loop, students should recall which things they should be able to implement now).&lt;/p&gt;&#xA;&lt;p&gt;Cliffhanger stuff (know ahead stuff you have no way doing at this point of learning) is underestimated in education.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2020-12-04T17:29:01.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6655" PostTypeId="2" ParentId="2793" CreationDate="2020-12-04T21:08:35.140" Score="2" Body="&lt;p&gt;Here is my recipe.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Begin with the language's type system.  If the language has a REPL, use it.&lt;/li&gt;&#xA;&lt;li&gt;Introduce variables.  Indicate if variables have type (statically-compiled languages) or if they are typeless names (a la Python).&lt;/li&gt;&#xA;&lt;li&gt;Introduce the idea of object (state/identity/behavior).  Objects are smart data and they can do work for you.  Have the students manipulate the fundamental types of objects in the REPL.  At this juncture, all programs are &amp;quot;boring&amp;quot; because they run their lines in seriatum&lt;/li&gt;&#xA;&lt;li&gt;It's time to divide the world into two types of statements, worker statements and boss statements.&lt;br /&gt;&#xA;Worker statements are imperative statements with the tacit subject &amp;quot;computer.&amp;quot;  Boss statements &amp;quot;own&amp;quot; chunks of code.  They are grammatically incomplete sentences.  They alter the flow of execution in a program.&lt;/li&gt;&#xA;&lt;li&gt;It's time for the first boss statement, the function.  Explain how computing functions differ from mathematical ones.  Make sure you do a careful explanation of mathematical functions and show examples (such as string length) of mathematical functions that occur often in computing.&lt;/li&gt;&#xA;&lt;li&gt;Time for three more boss statements:  if, elif/else if, and else.&lt;/li&gt;&#xA;&lt;li&gt;A little recursion please, before we break out loops.&lt;/li&gt;&#xA;&lt;li&gt;Iteration: indefinite (while) and definite(for) loops.  This opens the door to fileIO.&lt;/li&gt;&#xA;&lt;li&gt;Creating custom objects using classes and OO.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="21" LastActivityDate="2020-12-04T21:08:35.140" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6658" PostTypeId="2" ParentId="6231" CreationDate="2020-12-08T23:29:14.367" Score="0" Body="&lt;p&gt;I write my exams in a way that students need to know the concepts regardless of outside resources (other than someone else taking the exam for them).  Consider doing away with questions that can be copied and pasted into an IDE and the answer is spit out.&lt;/p&gt;&#xA;&lt;p&gt;A few examples may be to ask them to demonstrate short circuiting, or to identify an algorithm and determine if it is correct.  I allow students full internet access, any notes and any IDE of their choice during my exams, but they are under a tight time limit.  They are of course not allowed to collaborate and to the best of my ability, it looks like they are honoring that.&lt;/p&gt;&#xA;&lt;p&gt;I agree with every answer that says to get rid of tests, but if you're stuck teaching APCSA, it is a disservice to not prepare students with tests.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastActivityDate="2020-12-08T23:29:14.367" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6659" PostTypeId="1" AcceptedAnswerId="6660" CreationDate="2020-12-09T01:53:34.323" Score="5" ViewCount="2611" Body="&lt;p&gt;I am currently in the 10th grade. I would like to get started in competitive programming. This are the things I know now:&lt;/p&gt;&#xA;&lt;p&gt;Mathematics - Currently in pre-calculus Well Mathematics in my country is pretty unstructured. You would be studying bits of everything, and not one after the other. So I self studied up to Algebra II (Algebra I, geometry) so that I can cover it in more depth than in my school, though in school I'm learning through trigonometry stuff, algebra I &amp;amp; II stuff and geometry in varying orders.&lt;/p&gt;&#xA;&lt;p&gt;Programming:&lt;/p&gt;&#xA;&lt;p&gt;1.Knows the basics of C, Python, C++(main currently learning)&lt;/p&gt;&#xA;&lt;p&gt;CS50X completed&lt;/p&gt;&#xA;&lt;p&gt;HTML,CSS ,JS and sqlite3 with python&lt;/p&gt;&#xA;&lt;p&gt;What I want to learn for competitive programming(I am unsure):&lt;/p&gt;&#xA;&lt;p&gt;Discrete Mathematics&#xA;Algorithms&#xA;Data Structures&#xA;4.Dynamic Programming&lt;/p&gt;&#xA;&lt;p&gt;and I am hoping you'll help me to structure the remaining necessities and knowledge required. I found some blogs at many places but they were incomplete i.e. they are not well enough for beginners to you know get started on.&lt;/p&gt;&#xA;&lt;p&gt;I am aiming currently for IOI.&lt;/p&gt;&#xA;&lt;p&gt;UPDATE:&lt;/p&gt;&#xA;&lt;p&gt;I am from India.&lt;/p&gt;&#xA;&lt;p&gt;National qualifications:&lt;/p&gt;&#xA;&lt;p&gt;These are the stages of IOI qualification in my country:&lt;/p&gt;&#xA;&lt;p&gt;1.Zonal Olympiads - Either written(pen &amp;amp; paper) or Programming or both&#xA;(about 500-800 participants in each)&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Next round National Olympiads if qualified in previous (about 250 - 400 participants)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;3.Next if qualified National training camp(about 30)&lt;/p&gt;&#xA;&lt;p&gt;4.Top 4 are chosen from it to represent at IOI.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit: I am from India.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit: I am currently taking discrete mathematics online.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;I believe I know where to practice.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Which should be first book/course/material to learn?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="9831" LastEditorUserId="1293" LastEditDate="2020-12-10T15:30:03.390" LastActivityDate="2020-12-10T15:30:03.390" Title="What and where should I study for competitive programming?" Tags="|self-learning|resource-request|programming|textbook|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6660" PostTypeId="2" ParentId="6659" CreationDate="2020-12-09T02:22:43.963" Score="8" Body="&lt;p&gt;If your aiming for the IOI, the first step has to be figuring out how to get onto your country's delegation.  In the USA (where I am), that means USACO.  If not, then you will have to determine what that pathway is.  Every country has some method of determining delegates.&lt;/p&gt;&#xA;&lt;p&gt;The next step would depend a &lt;em&gt;lot&lt;/em&gt; on how those delegations are formed within your country.  You may have to join a team, and there will presumably be some sort of coach.  Most of your preparation and learning will probably focus on the competition used in your country.&lt;/p&gt;&#xA;&lt;p&gt;And in terms of what to study, the competition itself looks to be very, very focused on algorithms.  Until you can find more specific resources to the competitions within your own nation, you could spend time practicing the &lt;a href=&quot;https://ioinformatics.org/page/contests/10&quot; rel=&quot;noreferrer&quot;&gt;older, published IOI problems&lt;/a&gt; and &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt; problems, which seem similar in nature.&lt;/p&gt;&#xA;&lt;p&gt;It's hard to be more specific than that without knowing your country of origin.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-09T02:22:43.963" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6661" PostTypeId="2" ParentId="6659" CreationDate="2020-12-09T02:42:01.293" Score="6" Body="&lt;p&gt;Ben's answer on how to find and join a team is spot on.  I'll address what you should be studying.&lt;/p&gt;&#xA;&lt;p&gt;Competitive programming generally is about correct use of algorithms and data structures.  There are college courses available on youtube for mastering that subject.  At a bare minimum, you should be comfortable implementing a linked list, graph, stack, heap, and binary search tree from scratch (a lot of these require recursion).  Once you've mastered those, try to find an algorithm that is reliant on each one to help you build pattern recognition for quickly identifying when a problem calls for a certain structure.&lt;/p&gt;&#xA;&lt;p&gt;So many problems are graph problems at their core (including most tree problems), so expanding in that area is always good.  Dynamic programming will be useful as you approach upper level problems that have strict space and runtime requirements.&lt;/p&gt;&#xA;&lt;p&gt;Good luck, and remember that programming is not always linear progression.  You may struggle for months and have a major breakthrough when you least expect it.&lt;/p&gt;&#xA;" OwnerUserId="9498" LastActivityDate="2020-12-09T02:42:01.293" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6662" PostTypeId="2" ParentId="6231" CreationDate="2020-12-09T03:00:44.517" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Maybe a better idea could be a quiz with automatically generated&#xA;questions, like a code snippet and the request to determine the output&#xA;for a given input, with different input values and variable names for&#xA;each student.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I actually have successfully implemented this (in part) for my first-semester programming tests this year. For example: Using the Blackboard LMS, there is a question type called &amp;quot;Calculated Formula&amp;quot; which supports a question with variable numbers, and a numerical answer based on a formula behind the scenes (supplied by the instructor). It then generates a number of iterations of each question with the variables randomly filled in according to supplied parameters. The list of question iterations is explicitly recorded in advance, so the instructor can spot-check that they are all reasonable. When the test is deployed each student gets a randomly selected variant from this list.&lt;/p&gt;&#xA;&lt;p&gt;While this type of question is probably intended for other continuous science courses (physics, biology, etc.) I've managed to wrestle this into working for my basic computing class. For example, I've constructed questions that ask about the results from:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sequential assignment statements&lt;/li&gt;&#xA;&lt;li&gt;Arithmetic results (including integer division and modulus)&lt;/li&gt;&#xA;&lt;li&gt;Logical operators (in C++, where values are 0 or 1)&lt;/li&gt;&#xA;&lt;li&gt;Decision statements (if/else, switch)&lt;/li&gt;&#xA;&lt;li&gt;Looping statements (how many times will this iterate? what is the result of this accumulator?)&lt;/li&gt;&#xA;&lt;li&gt;Function calls (pass-by-value and reference)&lt;/li&gt;&#xA;&lt;li&gt;Array access and manipulations (accumulators)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are ways in which this is limited and I'm fighting against the system. For example, the system has no built-in modulus operator, so I need to recreate that using the available division and floor operator. There's no looping operator, so I can vary array contents, but not the size of the array or the iterations in the accumulator loop. I have a question with a random sequential accumulator that uses the Gaussian formula to generate the result on the back-end. Ironically, it seems like more difficult questions have simpler formulas, and vice-versa.&lt;/p&gt;&#xA;&lt;p&gt;But I've found this to be of limited use, because it doesn't test actual constructive programming, knowledge of terms, etc. These questions only constitute 25% of my Programming I tests, and I didn't see any particular way to use the same ideas in Programming II, for example. They also take quite a bit of creative work to construct, granted the system wasn't really designed to support them. But nonetheless I'm happy to have them as part of my repertoire.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2020-12-09T03:00:44.517" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6663" PostTypeId="2" ParentId="6659" CreationDate="2020-12-09T22:35:32.913" Score="1" Body="&lt;p&gt;I can recommend two things.  Project Euler is great for sharpening your algorithmic skills. Also, you can sign up for USACO's training program. It is excellent and you can compete in the USACO competition.  It's completely free.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2020-12-09T22:35:32.913" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6664" PostTypeId="1" AcceptedAnswerId="6665" CreationDate="2020-12-10T01:15:30.840" Score="3" ViewCount="124" Body="&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I am currently working with a university to design an online Machine Learning and Cloud Computing course. We are closely following &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1492032646&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hands-On Machine Learning&lt;/a&gt; by Geron. The author of this book has created many useful Jupyter Notebooks with examples that follow the text.&lt;/p&gt;&#xA;&lt;p&gt;I have been creating new Jupyter notebooks by supplementing his example Jupyter notebooks with paragraphs and bullet points excerpted directly from the text. The plan is to make instructional videos that work through the notebooks.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Could any of this be construed as plagiarism? Obviously, I'm not suggesting to the students that I am the author of the notebooks. I am completely transparent that the notebooks are based off Geron's textbook and supplementary materials.&lt;/p&gt;&#xA;&lt;p&gt;Is this ok? What's the best way to be transparent if it is okay to proceed down this path?&lt;/p&gt;&#xA;" OwnerUserId="9840" LastActivityDate="2020-12-10T01:57:23.277" Title="Concern over plagiarism in designing online course" Tags="|plagiarism|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6665" PostTypeId="2" ParentId="6664" CreationDate="2020-12-10T01:57:23.277" Score="3" Body="&lt;p&gt;So, as a matter of fine distinction, what you are doing cannot be &lt;em&gt;plagiarism&lt;/em&gt; if it is credited.  It could still be theft, and it could still be unethical, but plagiarism is passing someone else's work off as your own.&lt;/p&gt;&#xA;&lt;p&gt;If you are having the students purchase the textbook, I would reach out directly to the author and explain what you are doing.  Since he will be compensated by the textbook purchases, he may well agree to allow it, which would eliminate the ethical issue.&lt;/p&gt;&#xA;&lt;p&gt;Even if you are not having students purchase the book, some authors are simply generous enough in spirit that they would nevertheless agree to such an arrangement.&lt;/p&gt;&#xA;&lt;p&gt;The ethical alternative is to come up with your own exercises and explanatory texts.  These can closely follow the spirit and outline of the author's text if you think he has a great approach, and you can point students towards his book as an excellent and highly recommended source.  (You would still have to credit the author to the degree that his contributions and organization of the material is a resource for you, but if you do not use his text or exercises, then that would be all you would have to do.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-10T01:57:23.277" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6666" PostTypeId="1" AcceptedAnswerId="6667" CreationDate="2020-12-11T13:11:34.810" Score="2" ViewCount="90" Body="&lt;p&gt;I am looking for books on computers, in a now special sense:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.lexico.com/en/definition/computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.lexico.com/en/definition/computer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;noun&#xA;&#xA;1 An electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program.&#xA;‘The laws were designed to prosecute people who hack into computers and steal information.’&#xA;&#xA;1.1 A person who makes calculations, especially with a calculating machine.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Once I have read an article that in 1950, obviously the second meaning existed only in the Oxford Advanced Dictionary.&lt;/p&gt;&#xA;&lt;p&gt;Now, do you know a good book on these people before the advent of electronic computers. using pen and paper?&lt;/p&gt;&#xA;" OwnerUserId="274" LastEditorUserId="1293" LastEditDate="2020-12-11T14:13:13.387" LastActivityDate="2020-12-16T18:47:26.070" Title="Book recommendation on human &quot;computers&quot;" Tags="|textbook|computer-history|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6667" PostTypeId="2" ParentId="6666" CreationDate="2020-12-11T13:29:00.267" Score="3" Body="&lt;p&gt;It isn't a textbook, but &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0062363603&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hidden Figures&lt;/a&gt; is both a book and a movie.&lt;/p&gt;&#xA;&lt;p&gt;The same author, Margot Lee Shetterly, produced versions of the book both for adults and for young readers. The movie is quite uplifting. I haven't read the book, but assume it is the same.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.history.com/news/human-computers-women-at-nasa&quot; rel=&quot;nofollow noreferrer&quot;&gt;History.com&lt;/a&gt; has an article about these remarkable women.&lt;/p&gt;&#xA;&lt;p&gt;One of them: &lt;a href=&quot;https://en.wikipedia.org/wiki/Katherine_Johnson&quot; rel=&quot;nofollow noreferrer&quot;&gt;Katherine Johnson&lt;/a&gt; died this year. She is featured in the movie.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-12-11T13:37:44.920" LastActivityDate="2020-12-11T13:37:44.920" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6668" PostTypeId="2" ParentId="6666" CreationDate="2020-12-12T02:13:54.573" Score="5" Body="&lt;p&gt;It is not clear to me what exactly OP is looking for, but one relevant book is: David Alan Grier, &amp;quot;When Computers Were Human&amp;quot;, Princeton University Press 2005. The author served for several years as editor in chief of the &lt;em&gt;IEEE Annals of the History of Computing&lt;/em&gt;. He was inspired to work on the book when he learned that his grandmother had graduated with a degree in mathematics in 1921 and that some of her fellow female graduates went to work as human computers. The book covers about two centuries between the 1760s and the 1960s.&lt;/p&gt;&#xA;&lt;p&gt;In June 2005 Grier gave a lively hour-long presentation at the Computer History Museum also entitled &amp;quot;When Computers Were Human&amp;quot;, a video recording of which is available on &lt;a href=&quot;https://www.youtube.com/watch?v=YwqltwvPnkw&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;One large early project, directed by Gaspard Riche de Prony, that ran from about 1790 to 1801 is described in I. Grattan-Guiness, &amp;quot;Work for the Hairdressers: The Production of de Prony’s Logarithmic and Trigonometric Tables&amp;quot;, &lt;em&gt;Annals of the History of Computing&lt;/em&gt;, Vol. 12, No. 3, Jul. 1990, pp. 177-185. The title makes reference to the following fascinating detail:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;These calculations were done by the third section, a large team of between 60 and 80 assistants. Many of these workers were unemployed hairdressers: one of the most hated symbols of the &lt;em&gt;ancien regime&lt;/em&gt; was the hairstyles of the aristocracy, and the obligatory reduction of coiffure “as the geometers say, to its most simplest expression” left the hairdressing trade in a severe state&#xA;of recession. Thus these artists were converted into elementary arithmeticians, executing only additions and subtractions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;A key personality in the final phase of the history of projects involving human computers was the mathematician Gertrude Blanch (1897-1996), described in David Alan Grier, &amp;quot;Gertrude Blanch of the Mathematical Tables Project&amp;quot;, &lt;em&gt;IEEE Annals of the History of Computing&lt;/em&gt;, Vol. 19, No. 4, Oct.-Dec. 1997, pp. 18-27, as follows:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Gertrude Blanch can be viewed as either the last and most important leader of human computers or one of the first numerical analysts for electronic computers. From 1938 to 1948, she was the technical director of the Mathematical Tables Project, the largest and most sophisticated of the human computing groups.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I originally came across Gertrude Blanch as author of the paper &amp;quot;Numerical evaluation of continued fractions&amp;quot;, &lt;em&gt;SIAM Review&lt;/em&gt;, Vol. 6, No. 4, Oct 1964, pp. 383-421.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastEditorUserId="1940" LastEditDate="2020-12-12T04:13:30.603" LastActivityDate="2020-12-12T04:13:30.603" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6669" PostTypeId="1" CreationDate="2020-12-12T03:57:36.200" Score="2" ViewCount="64" Body="&lt;p&gt;I am teaching logic gates. I would like to know if anyone knows if there are any conventions for writing combinations of logic gate functions. For example&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;NOR  gate =&amp;gt; NOT (A OR B)&#xA;NAND  gate =&amp;gt;  NOT (A AND B)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Would it be acceptable to represent the above functions as&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;NOR  gate =&amp;gt; NOT (A OR B)  as A NOR B&#xA;NAND  gate =&amp;gt;  NOT (A AND B) as A NAND B ?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="9845" LastActivityDate="2020-12-16T18:41:11.577" Title="Are there any conventions for writing logic statements for combinations of logic gate functions?" Tags="|lesson-ideas|computational-thinking|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6670" PostTypeId="1" CreationDate="2020-12-12T03:59:22.690" Score="3" ViewCount="393" Body="&lt;p&gt;I present to you two scenarios that are different, but not enough to warrant two questions.&lt;/p&gt;&#xA;&lt;p&gt;Scenario 1: You discover that a student copied some section of the code verbatim from the docs of some relevant (or possibly not-relevant-but-applicable) module. Something more significant than the setup is required (because then this scenario would be too trivial to include).&lt;/p&gt;&#xA;&lt;p&gt;Scenario 2: For the open source language you choose, the submissions need a convenient interface for an auto-grader. It needs to have a standard library. If not for the fact that it’s part of a larger code base, it would never be segregated. Indeed, it is never meant to be segregated from a larger context. And the student worked around these two coincidences due to oversight by copying this relevant but inaccessible-through-the-normal-interface portion of code into an assignment.&lt;/p&gt;&#xA;&lt;p&gt;It is safe to assume that these courses are for beginners. We see that the docs or some subsection of the stl wasn’t even an independent function. Or it doesn't have what is required to solve a problem. This means that understanding what is being done is then &lt;em&gt;more&lt;/em&gt; critical. What should I say? What should I do?&lt;/p&gt;&#xA;" OwnerUserId="8043" LastEditorUserId="9891" LastEditDate="2021-01-05T20:01:13.667" LastActivityDate="2021-01-11T20:52:07.597" Title="“What do you mean it’s plagiarism? It’s from the docs!”" Tags="|code-example|plagiarism|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6671" PostTypeId="2" ParentId="6669" CreationDate="2020-12-12T09:49:33.003" Score="2" Body="&lt;p&gt;You ask whether your proposed representation would be acceptable. Offhand, I would be cautious about infix notation for these negative operators.&lt;/p&gt;&#xA;&lt;p&gt;In English, &lt;code&gt;A NOR B&lt;/code&gt; would be expressed as &amp;quot;neither A nor B&amp;quot;. &lt;code&gt;A NAND B&lt;/code&gt; would be expressed as &amp;quot;not A and B&amp;quot;. Often, intensifiers will also be prefixed to emphasise a NAND or NOR case and clarify the scope of the negative, such as &amp;quot;not both A and B&amp;quot;, or &amp;quot;not any of A or B&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;In both cases, the negative is introduced first in English, before the list of items, which accords more closely with the structure of the representations you are trying to replace - &lt;code&gt;NOT(A OR B)&lt;/code&gt; etc..&lt;/p&gt;&#xA;&lt;p&gt;Even on a technical front, I'm not familiar with a programming language that has NOR or NAND infix operators.&lt;/p&gt;&#xA;&lt;p&gt;If you must contract these expressions or use the name of the operator, I would suggest &lt;code&gt;NOR(A,B)&lt;/code&gt; and &lt;code&gt;NAND(A,B)&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Another problem is when there are more than two inputs. Unlike AND and OR, NAND and NOR are not associative, whereas &amp;quot;nor&amp;quot; in English has the same meaning and associative property as &amp;quot;or&amp;quot; (it's the introducing word &amp;quot;neither&amp;quot; which applies negation to the whole set, after they have been ORed together).&lt;/p&gt;&#xA;&lt;p&gt;So &lt;code&gt;NOT(A OR B OR C)&lt;/code&gt; corresponds to the English &amp;quot;neither A nor B nor C&amp;quot; (i.e. none of the set is true), but that is not the same as &lt;code&gt;A NOR B NOR C&lt;/code&gt; (the meaning of which I can't mentally parse into English, and I'd have to sit down and write out a truth table to be sure).&lt;/p&gt;&#xA;&lt;p&gt;Nand, of course, does not exist as an English word, but &lt;code&gt;A NAND B NAND C&lt;/code&gt; is equally different from &amp;quot;not A and B and C&amp;quot; in English (i.e. not all of the set is true) and from &lt;code&gt;NOT(A AND B AND C)&lt;/code&gt; formally.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastEditorUserId="9075" LastEditDate="2020-12-12T09:55:53.960" LastActivityDate="2020-12-12T09:55:53.960" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6673" PostTypeId="2" ParentId="6670" CreationDate="2020-12-12T21:56:56.377" Score="14" Body="&lt;p&gt;So, my take on this is to sit down with the student and have roughly this talk:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;So, I'm a little disappointed by the lab you handed in, for two reasons.  The first is that it is pushing on the edges of plagiarism.  Now, I'm not going to go through the formal process, and there is going to be no punishment this time.  I am instead assuming that this is a distinction that you were unaware of, and I am going to make sure that you are completely aware of it now:&lt;/p&gt;&#xA;&lt;p&gt;Plagiarism means passing off someone else's work as your own, and this code isn't really your own, and your source isn't fully cited.  As I said, I'm not going to pursue this further at this time, but in academic work, you should be citing sources for &lt;em&gt;anything&lt;/em&gt; that is not entirely your own.&lt;/p&gt;&#xA;&lt;p&gt;The second reason I'm disappointed is because you've even more deeply misunderstood the purpose of the assignment.  You clearly came in thinking that the purpose here was to &lt;em&gt;accomplish the task&lt;/em&gt;.  I know that in industry, the idea is often to just get working code out.  But in spite of what you might think, I actually care very little about &lt;em&gt;[insert the result of the lab here, such as &amp;quot;the number of brick arrangements in this oddly-specified wall&amp;quot; or &amp;quot;whether the character in this game can correctly identify a collision&amp;quot;]&lt;/em&gt;.  Why do you suppose I created this assignment?  Was it because this is an unsolved puzzle, and there is a pressing need to accomplish this task?&lt;/p&gt;&#xA;&lt;p&gt;Of course not! These problems have been solved many times before.&lt;/p&gt;&#xA;&lt;p&gt;The purpose of the task is to help you learn and absorb the material, and to help make you a better student and a more capable person.  The ideas in this lab are foundational, and carefully chosen to help you build up to bigger and more difficult ideas in the future.  I want you to absorb these ideas well enough that you can mentally use them to build those bigger and more complex ideas.  The goal was never this algorithm per se.  The goal has always been mastery, so that you can move on to even bigger and better things with a good chance of success.&lt;/p&gt;&#xA;&lt;p&gt;I think you can see where I'm going with this.  You have kinda cheated me by giving in work that's only &lt;em&gt;sort of&lt;/em&gt; your own, and you have kinda cheated yourself by only &lt;em&gt;sort of&lt;/em&gt; wrestling with the topic well enough to master it.&lt;/p&gt;&#xA;&lt;p&gt;We will survive this today, and we will move forward.  But I need you to understand that this isn't the way to approach lab work.  Can I now trust that I won't get this sort of work turned in again?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;... and after the student agrees ...&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Good. Labs are for learning. I hope that the rest of your day is pleasant.  Take care, and I will see you again in class.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-12T21:56:56.377" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6674" PostTypeId="1" AcceptedAnswerId="6686" CreationDate="2020-12-13T10:29:05.923" Score="7" ViewCount="520" Body="&lt;p&gt;I am currently in my first year (in Bangalore, India) and I'm eager to get into competitive coding and programs like GSOC. I'm not aware of too many besides the two in my title, though.  I'd love to learn about a few more that people take part in so that I can plan ahead.&lt;/p&gt;&#xA;" OwnerUserId="9851" LastEditorUserId="9851" LastEditDate="2020-12-17T07:30:28.313" LastActivityDate="2021-07-12T05:42:23.807" Title="What are some events/contests besides GSOC and ICPC that a first year undergrad Computer Science Engineering student should get involved with?" Tags="|programming|" AnswerCount="2" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6675" PostTypeId="2" ParentId="6666" CreationDate="2020-12-14T14:18:14.380" Score="1" Body="&lt;p&gt;There's a chapter in Richard Feynman's autobiography, &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0393355624&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Surely You're Joking Mr. Feynman&lt;/em&gt;&lt;/a&gt; in which he describes* writing a &amp;quot;program&amp;quot; for a roomful of human computers and, what it looked like when they were &amp;quot;executing&amp;quot; it.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;* Describes at a pop-science kind of level. It's not an instruction manual.&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2020-12-14T14:18:14.380" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6676" PostTypeId="2" ParentId="5403" CreationDate="2020-12-14T16:51:25.420" Score="2" Body="&lt;p&gt;Here's a late answer, but I think has observations for the OP that others haven't highlighted sufficiently.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;They moreover have this (to me, crazy) habit of writing huge blocks in&#xA;main() without splitting anything, and even worse the only way they&#xA;think about of producing output is writing to the world: they don't&#xA;contemplate returning from a function. One (brilliant!) boy once asked&#xA;me with big amazement after my seemingly strong assertion: &amp;quot;oh, so you&#xA;mean that strlen() is a function?&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I teach in a community college curriculum that uses C++ for the initial two-semester sequence of programming. (Using Gaddis, &lt;em&gt;Starting out with C++: from control structures through objects&lt;/em&gt;; i.e., control structures 1st semester, objects 2nd semester). The single biggest hump for our students is to accept modularizing their programs into separate functions, which occurs about halfway into the 1st semester.&lt;/p&gt;&#xA;&lt;p&gt;I think I broadly feel why they really, really don't want to start doing that. They're legitimately able to get a working program by writing all the statements in main() up to the point. The overhead of learning to add prototype, header, code, call (which of those requires the type? the identifier? both?), parameters, arguments, pass-by-value vs. pass-by-reference, return value, scoping rules, what counts as a good name, etc. is not insignificant to them. If they can just get the immediate assignment working without grappling with that new gauntlet of concepts, then they'd generally prefer to do that. Plus the advantage is really not evident at that point: they're not working in a large team-environment where the division of labor really pays off. They're not hitting any radical increase in complexity where it's infeasible to cram a few more lines into main(). Even the textbook's labs and examples are not super hygienic about this.&lt;/p&gt;&#xA;&lt;p&gt;So I am aware that I really need to hit this very hard all through the last 1.5 terms of our curriculum. I make modularizing programs an explicit requirement for all programs from that point forward, and reiterate in the directions for all assignments and tests. A hefty point penalty is deducted otherwise (i.e., the entire 20% component for &amp;quot;Readability&amp;quot;). I uniquely spend two days reviewing the concept and justification. I uniquely (in any course I teach) have a slide in shouty 120-point font laying out the demand. The book also seems to know this is the major hurdle, as it has a double-length series of labs for that particular chapter.&lt;/p&gt;&#xA;&lt;p&gt;In brief: Modularizing the code seems like the single biggest hurdle, and the curriculum really must dedicate significant time to getting students on board with it.&lt;/p&gt;&#xA;&lt;p&gt;Now, in the OP's case they're really in a major dilemma if they're receiving students at the end of a curriculum and this hasn't happened to date. Teaching the early courses in a context of finite state machines, global variables, and no modularity, is perilously close to causing irreparable brain injury in this regard. It's not entirely clear what the OP's context, requirements, or flexibilities are, but solutions probably need to pick from among the following:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If the OP has any power over the institutional curriculum, &lt;em&gt;change it&lt;/em&gt;, so that modularity for future changes and expansions is taught and tested at an early stage.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If the OP does not have any power over the rest of the curriculum, but has significant flexibility in their own course design, then they likely should spend 2+ weeks at the start of the course explicitly teaching students this methodology. It's actually not bad to set that as the major theme of the course on Day 1 in a big banner to get their attention (and keep touching back to that all semester long).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If the OP hasn't any power over the program's overall curriculum, and also lacks any flexibility for what gets taught in their own course (some kind of mandated higher-level curriculum) then they need to bite the bullet and accept that most of the students are simply not going to be able to interface with higher-level concepts, and fail them. Maybe a one-day &amp;quot;review&amp;quot; at the start of the course, and reference to materials on the subject, is the best you can do.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you have no power over the program sequence, and no flexibility in the individual course design, and are also not allowed to fail most of the students, then what can you do? Resign oneself to giving out fraudulent grades or leave the position, I guess.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There are times when I kind of wish the modularity issue was more up-front, but in my opinion it's even less comprehensible at a point when no task takes the 5-7 statements or so that makes a cognizable function. That is: if initially every function is itself just a single statement then there's no way you can convince students that's not a big waste of time and effort (because it is). So I do think you need to establish data declarations, assignment, conditionals, and loops before you've got enough mechanics that you can legitimately abstract a chunk of functionality into a modular and reusable function.&lt;/p&gt;&#xA;&lt;p&gt;An anti-example of the latter: there's an open-source work by Busbee, &lt;em&gt;Programming Fundamentals -- A Modular Structured Approach Using C++&lt;/em&gt; that attempts to present modular functions first and foremost. Ch. 1 introduces a function which is a wrapper around the Windows &lt;code&gt;system(&amp;quot;pause&amp;quot;)&lt;/code&gt; statement. But in the need to avoid all the other scoping details at this point, he falls into a trap of using global variables for all the data-passing, and gets stuck with it. I don't think there's any example in the entire text of ever using parameters, local variables, or return values (which is of course absolutely deadly to the cause).&lt;/p&gt;&#xA;&lt;p&gt;In summary: &lt;em&gt;Somewhere&lt;/em&gt; in the curriculum you've got to dig in and spend time clarifying this most-difficult-and-important part of the subject matter (modularizing code into functions). You're not going to get it happening by just saying it once and wishing it to be. You need some initial work developing the basic toolkit in the main function, but then need to transition to modular designs, and the longer this gets delayed the more bad habits will need unlearning later on.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2020-12-15T03:12:37.943" LastActivityDate="2020-12-15T03:12:37.943" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6677" PostTypeId="5" CreationDate="2020-12-16T03:11:53.993" Score="0" Body="&lt;p&gt;If the question is specifically about tools for the teacher, consider instead using &lt;a href=&quot;/questions/tagged/lecture-tools&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;lecture-tools&amp;#39;&quot; rel=&quot;tag&quot;&gt;lecture-tools&lt;/a&gt;. If the question is about items to teach with, either physical or virtual, you can use &lt;a href=&quot;/questions/tagged/classroom-infrastructure&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;classroom-infrastructure&amp;#39;&quot; rel=&quot;tag&quot;&gt;classroom-infrastructure&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-12-16T03:11:53.993" LastActivityDate="2020-12-16T03:11:53.993" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6678" PostTypeId="4" CreationDate="2020-12-16T03:11:53.993" Score="0" Body="The Classroom Environment pertains to things like room layout, which equipment to physically have within a space, or how to arrange materials in space.  " OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-12-16T03:11:53.993" LastActivityDate="2020-12-16T03:11:53.993" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6680" PostTypeId="1" CreationDate="2020-12-16T16:48:06.140" Score="5" ViewCount="279" Body="&lt;p&gt;I am looking for an elegant textbook to be followed for self-study in an objected oriented programming course at the undergraduate level. Our course is as shown:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/N6Uv9.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/N6Uv9.png&quot; alt=&quot;course details&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I humbly request you to suggest to me a book which shall help me in self-studying the concepts which are given above, a book which shall be as an instructor and make me understand the concepts excellently. I know the basics of Java but I am unaware of most of the technical terms used in the curriculum attached above.&lt;/p&gt;&#xA;&lt;p&gt;Our course instructor is a bit weird and she is going on just reading the Java reference book by Hebert Schildt in the slide of each class and she does not explain the points given in the curriculum like iterator patterns, Model-view-controller pattern, and others. When I asked her what is iterator pattern, she said that it is a loop, that's all.&lt;/p&gt;&#xA;&lt;p&gt;I do not want to study the subject just for name's sake (superficially), I always attempt to master what I learn. Please could you help me out?&lt;/p&gt;&#xA;&lt;p&gt;Moreover, if anyone could provide me video lectures to go hand in hand with a textbook, then it shall be helpful for me. I do not like the way I am being taught at our place.&lt;/p&gt;&#xA;&lt;p&gt;Thank you. Hope you can understand my trouble... I beg you to help me out.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;[I am not worth criticizing the instructor, but it is my utter frustration that has made me put this question here so that I can get hold of some suitable and good learning resources.]&lt;/p&gt;&#xA;" OwnerUserId="9125" LastEditorUserId="9154" LastEditDate="2021-05-30T20:23:58.263" LastActivityDate="2021-05-30T20:23:58.263" Title="Best book and video lecture series to follow for an &quot;object oriented programming&quot; course for advanced undergraduates" Tags="|self-learning|resource-request|java|object-oriented-paradigm|textbook|" AnswerCount="3" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6681" PostTypeId="2" ParentId="5719" CreationDate="2020-12-16T18:05:42.330" Score="2" Body="&lt;p&gt;Run a class/small group exercise where you ask learners to come up with good plans for making sure the equipment doesn't get damaged. They could look at topics like&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Producing risk assessments for different types of equipment.&lt;/li&gt;&#xA;&lt;li&gt;Lab rules for using the equipment safely (i.e. safely for the equipment).&lt;/li&gt;&#xA;&lt;li&gt;Correct storage.&lt;/li&gt;&#xA;&lt;li&gt;Publicising the need to be careful with the equipment e.g. posters.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you have a learners who have a difficult or negative attitude but who are also clever you could give them responsibilities e.g. verifying that all equipment is accounted for at the end of the lesson, that procedures are followed. I do &lt;em&gt;not&lt;/em&gt; mean putting these learners in charge of others or giving them a social power, I mean simply responsibilities for the equipment.&lt;/p&gt;&#xA;&lt;p&gt;Basically get the learners to come up with their own solutions and get them involved in the deployment and enforcement of such.&lt;/p&gt;&#xA;&lt;p&gt;Do not attempt to use punitive methods to prevent this because if you do you will only encourage that behaviour amongst a section of your cohort. Financial penalties and/or threats will be counter-productive as you risk escalating conflict between yourself and your learners.&lt;/p&gt;&#xA;&lt;p&gt;Furthermore punitive approaches emphasise that it is &lt;em&gt;your&lt;/em&gt; equipment or the &lt;em&gt;school's&lt;/em&gt; equipment and not &lt;em&gt;their&lt;/em&gt; equipment. &amp;quot;Unfortunately if &lt;em&gt;our&lt;/em&gt; equipment is damaged we will have to learn using bookwork instead of practical work&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The exercises suggested could also be used for a component of your assessment as there are clear learning outcomes.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-12-16T18:05:42.330" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6682" PostTypeId="2" ParentId="5456" CreationDate="2020-12-16T18:15:13.007" Score="1" Body="&lt;p&gt;They're in LOGO so you might need to translate them ...&lt;/p&gt;&#xA;&lt;p&gt;Random Walk&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;to random_walk :s&#xA;&#xA;repeat :s [ifelse [(random 10) &amp;gt;= 5] [lt 45 fd 10 rt 45] [rt 45 fd 10 lt 45]]&#xA;&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Sierpinski Gasket&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;TO SIERPINSKI :LENGTH :LEVEL&#xA;    ; this creates the &amp;quot;filled&amp;quot; version; to display the outline, make the&#xA;    ; last two lines of  this procedure into comments - by placing&#xA;    ; a semi-colon at the beginning of the lines&#xA;&#xA;    IF (:LEVEL &amp;lt; 0) [STOP]&#xA;    REPEAT 3 [SIERPINSKI :LENGTH * (1 / 2) (:LEVEL - 1) FD :LENGTH RT 120]&#xA;    PU RT 30 FD 3 PD FILL&#xA;    PU BK 3 LT 30 PD&#xA;END&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Might need a bit of debugging but there are some ideas in there&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;;&#xA;; LOGO DEMONSTRATION PROGRAMS&#xA;; &#xA;; Author    Jon Guiton&#xA;; Date      2/10/2011&#xA;; Usage     demo&#xA;;&#xA;&#xA;;&#xA;; The cat/mouse demo uses these two functions to calculate the distance&#xA;; between the turtle (cat) and mouse (mouse). This is used to decide when&#xA;; the cat has caught the mouse.&#xA;;&#xA;&#xA;to distance :xdif :ydif&#xA;    output sqrt ((xdif * xdif) + (ydif * ydif))&#xA;end&#xA;&#xA;to distance_to_mouse :tpos :mpos&#xA;    output distance ((first :tpos) - (first :mpos)) ((last :tpos) - (last :mpos)) &#xA;end&#xA;&#xA;;&#xA;; This is the main procedure for the cat/mouse demo. The cat just keeps moving&#xA;; towards the mouse until it has caught up with it.&#xA;;&#xA;to cat_mouse_demo :difficulty&#xA;    cs&#xA;    while [(distance_to_mouse pos mousepos) &amp;gt; 5] [&#xA;        setheading towards mousepos&#xA;        fd 10&#xA;        wait (10 - :difficulty)&#xA;    ]&#xA;    cs&#xA;    label [GAME OVER]&#xA;end&#xA;&#xA;;&#xA;; This is the main procedure for the UPPERCASE demo. Just keep reading text&#xA;; and converting it to uppercase until an empty line is read in.&#xA;;&#xA;to to_upper_demo&#xA;    cs&#xA;    print [Type some text, a blank line ends the demo...]&#xA;    make &amp;quot;text readword&#xA;    while [not emptyp :text] [&#xA;        print uppercase :text&#xA;        make &amp;quot;text readword&#xA;    ]&#xA;end&#xA;&#xA;;&#xA;; This is the main procedure for the sounds demo. It uses the sound [frequency, duration]&#xA;; predicate to make the sounds. The formulas just scale the frequency and sounds to a&#xA;; better range of values.&#xA;;&#xA;to sounds_demo&#xA;    while [&amp;quot;true] [&#xA;        sound [exp(((last mousepos) + 100) / 20), (((first mousepos) + 100) / 3)]&#xA;        wait 10&#xA;    ]&#xA;end&#xA;&#xA;;&#xA;; This is the stub for the menus demo which is actually the main program.&#xA;;&#xA;to menus_demo&#xA;    print [You are using the menus demo!]&#xA;    print [Press any key to continue...]&#xA;    ignore readchar&#xA;end&#xA;&#xA;; &#xA;; This is the main menu procedure. This also clears the text screen to make things&#xA;; work more neatly and checks for input errors. Notice that it uses a CASE statement&#xA;; which is more convenient than lots of IF statements.&#xA;;&#xA;to main_menu&#xA;    make &amp;quot;time_to_exit &amp;quot;false&#xA;    while [not :time_to_exit] [&#xA;        cleartext&#xA;        print [---------------------------]&#xA;        print [Logo Demonstration Programs]&#xA;        print [---------------------------]&#xA;        print []&#xA;        print [1. Cat and Mouse game demo.]&#xA;        print [2. To Upper demo.]&#xA;        print [3. Sound demo.]&#xA;        print [4. Menus demo.]&#xA;        print [5. Exit demo.]&#xA;        print []&#xA;        print [Please enter a number...]&#xA;        case readchar [&#xA;            [ [1] cat_mouse_demo 5]&#xA;            [ [2] to_upper_demo]&#xA;            [ [3] sounds_demo]&#xA;            [ [4] menus_demo]&#xA;            [ [5] make &amp;quot;time_to_exit &amp;quot;true]&#xA;            [ else &#xA;                print [] &#xA;                print [Sorry, that is not a valid option]&#xA;                print [press any key to continue...]&#xA;                ignore readchar&#xA;                print []&#xA;            ]&#xA;        ] &#xA;    ]&#xA;end&#xA;&#xA;; &#xA;; This is the main demo program. It just initialises the screen, runs the main loop&#xA;; procedure and finishes the program nicely.&#xA;;&#xA;to demo&#xA;    cs&#xA;    main_menu&#xA;    print [Bye! Have a nice day!]&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-12-16T18:15:13.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6683" PostTypeId="2" ParentId="6670" CreationDate="2020-12-16T18:35:49.573" Score="3" Body="&lt;p&gt;Not sure you can blame the learner really. If the information was obtained by R&lt;em&gt;ing&lt;/em&gt;TFM then full marks. Hacking the standard library - unconventional but shows initiative.&lt;/p&gt;&#xA;&lt;p&gt;The real problem was the assignment wasn't it? You say that the answer was literally written in the manual, that the standard library had a routine for it...hmm.&lt;/p&gt;&#xA;&lt;p&gt;Now there is a &lt;em&gt;real danger&lt;/em&gt; here of getting confused about the difference between a) the rules of coding b) the rules of the classroom.&lt;/p&gt;&#xA;&lt;p&gt;If there was copyright violation its a problem for a) but since the language is open source a little tricky for you. You might penalise the student for not supplying &lt;em&gt;you&lt;/em&gt; with the GPL3 (or whatever) though they did actually provide the source code.&lt;/p&gt;&#xA;&lt;p&gt;If the problem is that the assessment didn't go to plan (b) then I think you are to blame to be honest. Next time, be more inventive with the programming assessment and/or set a more significant 'hacking some code solutions out of the standard library' exercise where &lt;em&gt;you&lt;/em&gt; make it clear that you expect a proper license.&lt;/p&gt;&#xA;&lt;p&gt;Don't blame your learners for your own mistakes. Live and learn and have your learners follow &lt;em&gt;that&lt;/em&gt; example.&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-12-16T18:35:49.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6684" PostTypeId="2" ParentId="6669" CreationDate="2020-12-16T18:41:11.577" Score="1" Body="&lt;p&gt;I'd use pictures. These have formal standards. Then annotate the pictures with notation.&lt;a href=&quot;https://i.stack.imgur.com/Dz7JL.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Dz7JL.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-12-16T18:41:11.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6685" PostTypeId="2" ParentId="6666" CreationDate="2020-12-16T18:47:26.070" Score="2" Body="&lt;p&gt;Got a lovely cover... alternatively any textbook on computing with a publication date of 1939 or earlier.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0813800471&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Computing-Before-Computers-William-Aspray/dp/0813800471&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/LizZE.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/LizZE.png&quot; alt=&quot;Asprey (ed), &amp;quot;Computing before computers&amp;quot;, Iowa State Pr 1990&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8007" LastActivityDate="2020-12-16T18:47:26.070" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6686" PostTypeId="2" ParentId="6674" CreationDate="2020-12-17T08:36:14.527" Score="9" Body="&lt;p&gt;There are lots of international programming competitions for undergraduate students .Here are some of the well known competitions(not mentioned by you).As you didn't mention what kind of competitions you were looking for, here are some general competitions. I have provided links to past problems so you can decide which fits you best.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;a href=&quot;https://codingcompetitions.withgoogle.com/codejam&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Code Jam&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Code Jam is Google's longest running global coding competition, where programmers of all levels put their skills to the test. Competitors work their way through a series of online algorithmic puzzles to earn a spot at the World Finals, all for a chance to win the championship title and $15,000.&lt;/p&gt;&#xA;&lt;p&gt;How it works?&lt;/p&gt;&#xA;&lt;p&gt;Register and compete in Code Jam’s Online Qualification Round. It lasts 27 hours, but you won't need that long to earn the round’s qualifying point minimum. Once you do, you’ll advance to Online Round 1. They offer three sub-rounds for Round 1, and you can compete in as many as it takes for you to finish in the top 1,500 of any of these rounds.&lt;/p&gt;&#xA;&lt;p&gt;The top 1,500 from each sub-round move on to compete for a spot in the top 1,000 contestants of Code Jam Online Round 2. These top 1,000 contestants advance to Online Round 3 and earn a limited edition Code Jam t-shirt.&lt;/p&gt;&#xA;&lt;p&gt;The top 25 contestants from Code Jam Online Round 3 will compete in the Virtual World Finals for the championship title and a cash prize of $15,000.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://codingcompetitions.withgoogle.com/codejam/archive&quot; rel=&quot;nofollow noreferrer&quot;&gt;Past Problems&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;a href=&quot;https://codingcompetitions.withgoogle.com/hashcode&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Hash Code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hash Code is a team programming competition, organized by Google, for students and professionals around the world. You pick your team and programming language and we pick an engineering problem for you to solve. This year’s contest kicks off with an Online Qualification, where your team can compete virtually from wherever you’d like, alongside your virtual Hub. Top teams will then be invited to compete from our virtual World Finals.&lt;/p&gt;&#xA;&lt;p&gt;How it works?&lt;/p&gt;&#xA;&lt;p&gt;Once you’ve registered for the contest, you’ll gain access to their Judge System. The Judge System is their online platform where you’ll form your team, join a Hub, practice, and compete during the rounds. During the Online Qualification, you’ll watch their YouTube livestream to be introduced to the problem, and your team will have four hours to solve an optimization problem using the programming language and tools of your choice. Teams can also compete alongside other teams in your area by joining a virtual Hub . The top teams from the Online Qualification will be invited to the virtual World Finals, where they’ll work together to solve another challenge and compete for cash prizes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://codingcompetitions.withgoogle.com/hashcode/archive&quot; rel=&quot;nofollow noreferrer&quot;&gt;Past Problems&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;3.&lt;a href=&quot;https://codingcompetitions.withgoogle.com/kickstart&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Kickstart&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Kick Start is a global online coding competition, consisting of three-hour rounds of a variety of algorithmic challenges designed by Google engineers. Participants can compete in one or all online rounds held throughout the year, and will have the opportunity to develop and grow their programming abilities while getting a glimpse into the technical skills needed for a career at Google (top participants may be invited to interview at Google).&lt;/p&gt;&#xA;&lt;p&gt;How it works&lt;/p&gt;&#xA;&lt;p&gt;Register for Kick Start once on the website and you’ll be set up to compete in any round you’d like! When each round is open, the three-hour countdown begins and you’ll compete on our website solving algorithmic and mathematical problems. Following the round, you can check out your rankings and the round analysis. If you were a top competitor, you may be contacted by Google for a chance to interview.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://codingcompetitions.withgoogle.com/kickstart/archive/2019&quot; rel=&quot;nofollow noreferrer&quot;&gt;Last year's problems&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;4.&lt;a href=&quot;https://imaginecup.microsoft.com/en-us&quot; rel=&quot;nofollow noreferrer&quot;&gt;Microsoft Imagine Cup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Reimagine technology solutions in a competition designed to help you make a difference in an online world. With four new competition categories—Earth, Education, Health, and Lifestyle—there’s even more opportunity to share your tech ideas for some of today’s most pressing global challenges. What could you create next?&lt;/p&gt;&#xA;&lt;p&gt;Transform your ideas into action with a purpose-driven application using Microsoft Azure technology. You could win mentorship from Microsoft experts, the chance to showcase your work on a global stage, and other great prizes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/student-developer-blog/meet-the-2020-imagine-cup-world-champion-team-hollo-from-hong/ba-p/1400674&quot; rel=&quot;nofollow noreferrer&quot;&gt;Get Inspired&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;5.&lt;strong&gt;&lt;a href=&quot;https://www.facebook.com/codingcompetitions/hacker-cup/&quot; rel=&quot;nofollow noreferrer&quot;&gt;facebook Hacker Cup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hacker Cup is Facebook's annual open programming competition. Open to participants around the world, we invite you to apply problem-solving and algorithmic coding skills to advance through each year’s online rounds, win prizes, and have a chance to make it to the global finals and win the grand prize.&lt;/p&gt;&#xA;&lt;a href=&quot;https://www.facebook.com/codingcompetitions/hacker-cup/2019/qualification-round&quot; rel=&quot;nofollow noreferrer&quot;&gt;&#xA;Last year qualification round&lt;/a&gt;&#xA;&lt;p&gt;Here are some other &amp;quot;competitions&amp;quot; and resources for practice:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;a href=&quot;https://codeforces.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codeforces&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Codeforces is a project joining people interested in and taking part in programming contests. On one hand, Codeforces is a social network dedicated to programming and programming contests. On the other hand, it is a platform where contests are held regularly, the participant's skills are reflected by their rating and the former contests can be used to prepare. Codeforces constantly develops and we plan to improve the platform to give the participants the opportunity to organize their own contests, filling the project with learning content, developing Codeforces as a training and learning platform.&lt;/p&gt;&#xA;&lt;p&gt;It also provides contests and practice for ICPC.&lt;/p&gt;&#xA;&lt;p&gt;Codeforces conducts different competitions for different rated coders regularly and you can participate in it depending on your Codeforces rating.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://codeforces.com/blog/entry/456&quot; rel=&quot;nofollow noreferrer&quot;&gt;Competition structure&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It may also conduct competitions with other companies and sponsors at times.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;a href=&quot;https://atcoder.jp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;atcoder.jp&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;AtCoder is a programming contest website based in Japan.&lt;/p&gt;&#xA;&lt;p&gt;There are three types of official contests in AtCoder:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;AtCoder Grand Contest (AGC). This is our best contest. The problems will have high originality and require interesting observations.&lt;/li&gt;&#xA;&lt;li&gt;AtCoder Regular Contest (ARC). The problems may be a bit typical compared to AGC problems, but still we think most of you can enjoy them and they are good for practice.&lt;/li&gt;&#xA;&lt;li&gt;AtCoder Beginner Contest (ABC). This is mainly targeted for those who are new to competitive programming. The problems will be easy and educational.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;3.&lt;a href=&quot;https://www.spoj.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SPOJ&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;SPOJ (Sphere Online Judge) is an online judge system with over 315,000 registered users and over 20,000 problems. Tasks are prepared by its community of problem setters or are taken from previous programming contests. SPOJ allows advanced users to organize contests under their own rules and also includes a forum where programmers can discuss how to solve a particular problem.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;4.&lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.&lt;/p&gt;&#xA;&lt;p&gt;The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.&lt;/p&gt;&#xA;&lt;p&gt;The intended audience include students for whom the basic curriculum is not feeding their hunger to learn, adults whose background was not primarily mathematics but had an interest in things mathematical, and professionals who want to keep their problem solving and mathematics on the cutting edge.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;P.S: There are a lot of other programming competitions but it all depends on your interests(including hackathons, A.I competitions, obscure code competitions etc.)&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="9831" LastEditorUserId="9831" LastEditDate="2021-07-12T05:42:23.807" LastActivityDate="2021-07-12T05:42:23.807" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6687" PostTypeId="2" ParentId="5826" CreationDate="2020-12-17T14:11:01.677" Score="1" Body="&lt;p&gt;The typical examples for introducing divide and conquer are binary search and merge sort because they are relatively simple examples of how divide and conquer is superior (in terms of runtime complexity) to naive iterative implementations. FFT can also be used in that respect.&lt;/p&gt;&#xA;&lt;p&gt;Among these, merge sort is the best example. Binary search is a degenerate case for explaining divide and conquer because you divide the problem into two subproblems, but you discard one of them almost trivially, so you are not actually combining the solution of several subproblems but just solving one of them.&lt;/p&gt;&#xA;&lt;p&gt;But on my experience (I have lectured that several years), merge sort makes it also very hard for many novice students to grasp the idea of divide and conquer because it combines too many different conceptual problems at the same time. In order to implement merge sort efficiently, they will need to understand the technique of divide and conquer, the execution tree that occurs under the hood, the implementation of the division phase (thus working with indices if you want efficiency) and the implementation of the conquer phase (linearly).&lt;/p&gt;&#xA;&lt;p&gt;You can start with an easier example such as computing the average of an array:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;def average(arr):&#xA;    assert arr, 'Expected non-empty array'&#xA;    if len(arr)==1:&#xA;        avg = arr[0]&#xA;        n = 1&#xA;    else:&#xA;        mid = len(arr)//2 # or any value with 0 &amp;lt; mid &amp;lt; len(arr)&#xA;        avgL, nL = average(arr[:mid])&#xA;        avgR, nR = average(arr[mid:])&#xA;        n = nL + nR&#xA;        avg = (avgL*nL + avgR*nR) / n&#xA;    return (avg, n)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This example introduces the idea (instead of the advantages) of divide and conquer in a way that all students can intuitively understand. The key point is to highlight that the recursive calls solve exactly the same problem but for small instances, and that you can use those solutions of smaller instances to solve the problem for the large instance.&lt;/p&gt;&#xA;&lt;p&gt;The example may appear trivial for many professors, but it is already shocking for many students and it will let them focus on understanding the technique itself and its execution, rather than details and optimizations. The example can also serve as guinea pig for analyzing the complexity of several different scenarios, such as when the array is copied on each call instead of being passed as a slice reference, or when mid is chosen as one third or as a constant.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, this example will naturally raise questions among students about its complexity and the possibility of parallelizing the computation, which may make some of them enthusiastic and creative.&lt;/p&gt;&#xA;&lt;p&gt;Afterwards you must of course explain and analyze merge sort and binary search, emphasizing on how important they are because they beat naive iterative implementations.&lt;/p&gt;&#xA;" OwnerUserId="9864" LastActivityDate="2020-12-17T14:11:01.677" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6688" PostTypeId="2" ParentId="6550" CreationDate="2020-12-18T03:14:26.127" Score="1" Body="&lt;p&gt;&lt;a href=&quot;https://www.google.co.in/books/edition/An_Introduction_to_Formal_Languages_and/hsxDiWvVdBcC?hl=en&amp;gbpv=1&amp;dq=right+quotient+automata&amp;pg=PA104&amp;printsec=frontcover#v=onepage&amp;q=right%20quotient%20automata&amp;f=false&quot; rel=&quot;nofollow noreferrer&quot;&gt; An Introduction to formal Languages and Automata &lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.cs.nott.ac.uk/~psznhn/G52LAC/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Included in the University of Nottingham's Languages and Computation Course resources&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The book An Introduction to Formal Languages and Automata  by Peter Linz can be used as an alternative or complement to Hopcroft-Motwani-Ullman.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://dl.acm.org/doi/book/10.5555/1206580&quot; rel=&quot;nofollow noreferrer&quot;&gt;An excerpt from&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The latest edition of Linz’s theory textbook follows the same outline as the previous one: it begins with a chapter on mathematical preliminaries; moves through the Chomsky hierarchy (regular, context-free, and recursively enumerable languages, with a brief mention of context-sensitive languages); and concludes with one chapter each on the topics of undecidability, alternate models of computation, and complexity classes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The presentation suits your needs : gives formal definitions, provide examples, give mathematical justifications (usually complete proofs), and end with a set of exercises. Solutions to some of the exercises appear in the appendix.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;More than anything else, the book needs to provide readers with a broader framework that naturally motivates the many topics covered. Instructors looking for a general reference on automata and formal languages, or a textbook for a mathematically sophisticated audience, should take note that Linz’s book lacks a comprehensive bibliography (the one-page list of references consists primarily of other theory textbooks).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Overall, the work is appropriate for the author’s stated purpose: a textbook for an introductory undergraduate course on the theory of computation—provided that the students have sufficient mathematical preparation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="9831" LastEditorUserId="9831" LastEditDate="2020-12-18T03:58:21.423" LastActivityDate="2020-12-18T03:58:21.423" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6689" PostTypeId="1" CreationDate="2020-12-18T06:40:50.117" Score="5" ViewCount="181" Body="&lt;p&gt;I want to teach students about default function arguments.&lt;/p&gt;&#xA;&lt;p&gt;I have a bad habit of cooking-up contrived examples.&lt;/p&gt;&#xA;&lt;p&gt;To prove that I am not a student cheating on their homework, I shall provide you with the following code. I really can write an example of a function without default arguments on my own, it is simply too contrived:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class SandwhichMaker:&#xA;&#xA;    FISH = &amp;quot;&amp;quot;&amp;quot;&#xA;              /&amp;quot;*._         _&#xA;          .-*'`    `*-.._.-'/&#xA;        &amp;lt; * ))     ,       ( &#xA;          `*-._`._(__.--*&amp;quot;`.\ &#xA;        &#xA;    &amp;quot;&amp;quot;&amp;quot;&#xA;&#xA;    @classmethod&#xA;    def publicly_make_sandwhich(klass, bread, veggie, meat = &amp;quot;fish&amp;quot;, sauce = None):&#xA;        if (sauce == None):&#xA;            sauce = klass.meat_to_sauce(meat)&#xA;        bread  = str(bread)&#xA;        veggie = str(veggie)&#xA;        meat   = str(meat).lower()&#xA;        if meat == &amp;quot;fish&amp;quot;:&#xA;            meat = SandwhichMaker.FISH&#xA;        sandwhich = klass.privatly_make_sandwhich(bread, veggie, meat, sauce)&#xA;        return sandwhich&#xA;&#xA;    @classmethod&#xA;    def meat_to_sauce(cls, meat):&#xA;        if meat.lower() == &amp;quot;fish&amp;quot;:&#xA;            return &amp;quot;tartar sauce&amp;quot;&#xA;&#xA;    @classmethod&#xA;    def privatly_make_sandwhich(cls, bread, veggie, meat, sauce):&#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;        PRECONDITION: all input parameters are strings&#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;        seperator = &amp;quot;\n&amp;quot; + 40 * &amp;quot;-&amp;quot; + &amp;quot;\n&amp;quot;&#xA;        sandwhich = seperator.join([&#xA;            &amp;quot;\n\n&amp;quot;,&#xA;            bread,&#xA;            veggie,&#xA;            meat,&#xA;            sauce,&#xA;            bread&#xA;        ])&#xA;        return sandwhich&#xA;&#xA;&#xA;sw = SandwhichMaker()&#xA;&#xA;sandwhich = sw.publicly_make_sandwhich(&amp;quot;whole wheat&amp;quot;, &amp;quot;cucumber&amp;quot;, &amp;quot;fish&amp;quot;)&#xA;&#xA;print(sandwhich)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Console output:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;----------------------------------------&#xA;whole wheat&#xA;----------------------------------------&#xA;cucumber&#xA;----------------------------------------&#xA;&#xA;              /&amp;quot;*._         _&#xA;          .-*'`    `*-.._.-'/&#xA;        &amp;lt; * ))     ,       ( &#xA;          `*-._`._(__.--*&amp;quot;`.\ &#xA;        &#xA;    &#xA;----------------------------------------&#xA;tartar sauce&#xA;----------------------------------------&#xA;whole wheat&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So, my example function with default arguments is as follows:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;publicly_make_sandwhich(klass, bread, veggie, meat = &amp;quot;fish&amp;quot;, sauce = None):&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The default &lt;code&gt;meat&lt;/code&gt; is &lt;code&gt;&amp;quot;fish&amp;quot;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;I really want students to see how default arguments can be useful.&lt;/p&gt;&#xA;&lt;p&gt;I thought about downloading a few open source code repositories.&lt;br /&gt;&#xA;I could then search all text-files for a regular expression (regex) to find functions having default arguments.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;\(\s*\w*\s*\w+\s*=[^),][^)]*\)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Exactly one left parenthesis ... &lt;code&gt;[1, 1]&lt;/code&gt; of &lt;code&gt;(&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Zero or more of any white-space character (&lt;code&gt;[0, +inf]&lt;/code&gt; of &lt;code&gt;\s&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;optional data-type such as &lt;code&gt;float&lt;/code&gt; or &lt;code&gt;int&lt;/code&gt;. zero or more letters, numbers or underscores. &lt;code&gt;[1, +inf]&lt;/code&gt; of &lt;code&gt;[a-zA-Z0-9_]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;zero or more white-space characters&lt;/li&gt;&#xA;&lt;li&gt;one or more letters, numbers or underscores.&lt;/li&gt;&#xA;&lt;li&gt;zero or more white-space chars&lt;/li&gt;&#xA;&lt;li&gt;exactly one equals sign&lt;/li&gt;&#xA;&lt;li&gt;exactly one character except right-paren or comma&lt;/li&gt;&#xA;&lt;li&gt;zero or more character other than right-paren&lt;/li&gt;&#xA;&lt;li&gt;exactly one right-parenthesis&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It would be easier just to ask a human being for a good example.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2020-12-19T13:40:49.863" Title="What is a real-world (production-code) example of a function having default arguments?" Tags="|functional-programming|code-example|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6691" PostTypeId="1" CreationDate="2020-12-18T10:19:23.843" Score="1" ViewCount="433" Body="&lt;p&gt;What to recommend as a pre-requisite reading before Cormen's &amp;quot;Algorithms&amp;quot; to make this book easier to get through for 10-12th graders? Any courseware available for kids, books, courses, etc.?&lt;/p&gt;&#xA;" OwnerUserId="6387" LastActivityDate="2020-12-19T05:16:07.573" Title="Cormen's &quot;Algorithms&quot; pre-requisites" Tags="|secondary-education|algorithms|ap-cs-principles|mathematics|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6692" PostTypeId="2" ParentId="6689" CreationDate="2020-12-18T10:34:13.990" Score="4" Body="&lt;p&gt;I recently used default arguments to write an API method for a mail sending library: The method needs a subject, a body and a &amp;quot;To&amp;quot; recipient, &amp;quot;Cc&amp;quot; and &amp;quot;Bcc&amp;quot; are optional:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;def send(subject, body, to, cc=None, bcc=None):&#xA;    &amp;quot;&amp;quot;&amp;quot;&#xA;    Send a message with the given data using the earlier configured SMTP server and the earlier configured from address.&#xA;    :param subject: The subject (one-line string)&#xA;    :param body: The contents (multiline string)&#xA;    :param to: Recipient address (string)&#xA;    :param cc: CC address (string or None)&#xA;    :param bcc: BCC address (string or None)&#xA;    &amp;quot;&amp;quot;&amp;quot;&#xA;    # The following to helper functions are omitted for brevity&#xA;    msg = _create_message(subject, body, to, cc, bcc)&#xA;    _send_message(msg)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I also quite often use this to specify default constructor arguments for machine learning setups, so that I can change the parameters when experimenting, but have a default variant during development:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;import random&#xA;&#xA;class MulticlassPerceptron:&#xA;&#xA;   def __init__(self, epochs=100, learning_rate=0.9, random_seed=15):&#xA;      self.epochs = epochs&#xA;      self.learning_rate = learning_rate&#xA;      random.seed(random_seed)&#xA;      ...&#xA;&#xA;   def train(self, training_data):&#xA;      for epoch in range(self.epochs):&#xA;         for datapoint in training_data:&#xA;            ...&#xA;&#xA;train_dataset = ...&#xA;m = MulticlassPerceptron()&#xA;m.train(train_dataset)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Generally, I make quite heavy use of default arguments whenever I write scripts for myself, because for me they are a perfect compromise between those two objectives:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;No one else than me will use the scripts, and my configuration is pretty constant, so there is no need for complex &lt;code&gt;Config&lt;/code&gt; objects etc.&lt;/li&gt;&#xA;&lt;li&gt;It is bad practice to hardcode things that are technically changeable parameters.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So what I usually do is write methods that have only default arguments which store my default configuration: This is an easy way to store a configuration (satisfies objective 1) but could be changed if the need ever arises (satisfies objective 2).&lt;/p&gt;&#xA;&lt;p&gt;Does this help you? If not, I'm happy to add more examples.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2020-12-18T10:34:13.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6693" PostTypeId="2" ParentId="6689" CreationDate="2020-12-18T14:49:27.380" Score="3" Body="&lt;p&gt;I like TuringTux's answer quite a lot.  If you're looking for a simpler example for the classroom just to illustrate, you might consider printing an array with an optional delimiter.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public void printArray(IList&amp;lt;T&amp;gt; array, string delimiter = &amp;quot;, &amp;quot;) &#xA;{ &#xA;    foreach (T in array)&#xA;    {&#xA;        Console.Write(T + delimiter);&#xA;    }&#xA;    Console.WriteLine();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This way, I can call&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int[] arr = {1, 2, 3};&#xA;&#xA;printArray(arr);&#xA;printArray(arr, &amp;quot;&amp;quot;);&#xA;printArray(arr, &amp;quot;--&amp;gt;&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and wind up with the output&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;1, 2, 3, &#xA;123 &#xA;1--&amp;gt;2--&amp;gt;3--&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;sup&gt;(Apologies if any mistakes slipped through into the code -- I didn't actually try it out.  The idea should be clear enough, though.)&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;The advantage here is that the example isn't purely silly, so the utility is clear enough, but the entire thing is simple enough to also allow mid-to-low level students to understand what they're seeing.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-12-18T17:42:24.363" LastActivityDate="2020-12-18T17:42:24.363" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6694" PostTypeId="2" ParentId="6691" CreationDate="2020-12-19T05:16:07.573" Score="1" Body="&lt;p&gt;Basically some experience with Discrete Mathematics and Probability , elementary Calculus is also recommend. And students are expected to be familiar with mathematical proofs, proofs by induction and good knowledge of a programming language.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;An Excerpt From CLRS&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;What are the prerequisites for reading this book?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You should have some programming experience. In particular, you should understand recursive procedures and simple data structures such as arrays and linked lists.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You should have some facility with mathematical proofs, and especially proofs by mathematical induction. A few portions of the book rely on some knowledge of elementary calculus.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/index.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;From a OpenCourseWare course thought by Prof. Charles Leiserson (The L in CLRS) based on CLRS in Fall of 2008&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This course teaches techniques for the design and analysis of efficient algorithms, emphasizing methods useful in practice. Topics covered include: sorting; search trees, heaps, and hashing; divide-and-conquer; dynamic programming; amortized analysis; graph algorithms; shortest paths; network flow; computational geometry; number-theoretic algorithms; polynomial and matrix calculations; caching; and parallel computing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;: A strong understanding of programming and a solid background in discrete mathematics, including probability, are necessary prerequisites to this course.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;These are the prerequisite courses recommended for Introduction to Algorithms&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/index.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;6.001 Structure and Interpretation of Computer Programs&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This course introduces students to the principles of computation. Upon completion of 6.001, students should be able to explain and apply the basic methods from programming languages to analyze computational systems, and to generate computational solutions to abstract problems.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2015&quot; rel=&quot;nofollow noreferrer&quot;&gt;6.042J / 18.062J Mathematics for Computer Science&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This course covers elementary discrete mathematics for computer science and engineering. It emphasizes mathematical definitions and proofs as well as applicable methods. Topics include formal logic notation, proof methods; induction, well-ordering; sets, relations; elementary graph theory; integer congruences; asymptotic notation and growth of functions; permutations and combinations, counting principles; discrete probability. Further selected topics may also be covered, such as recursive definition and structural induction; state machines and invariants; recurrences; generating functions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://qr.ae/pNZLDA&quot; rel=&quot;nofollow noreferrer&quot;&gt;Professor Cormen's answer on this subject&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;We assume that the reader has some programming experience, including recursion, and knows how to read and write rigorous mathematical proofs. The discrete mathematics facts needed to analyze the algorithms in the book appear in the appendices.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://qr.ae/pNZL6U&quot; rel=&quot;nofollow noreferrer&quot;&gt;More of Professor Cormen's answers&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;First, it’s possible that you do not have the mathematical sophistication to follow all the mathematics in the book. You should have had a discrete mathematics course or, at the very least, know how to read and write proofs. The mathematical foundations appear in the four appendix chapters.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="9831" LastActivityDate="2020-12-19T05:16:07.573" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6696" PostTypeId="2" ParentId="6680" CreationDate="2020-12-19T07:59:53.973" Score="2" Body="&lt;p&gt;It seems like the course outline is sort-of (mostly?) object oriented programming.  If you're feeling lost in that, you might want something like chapter 11 in this book: &lt;a href=&quot;https://runestone.academy/runestone/books/published/apcsareview/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://runestone.academy/runestone/books/published/apcsareview/index.html&lt;/a&gt;.  That might help you to feel a little bit more grounded as you proceed in your course.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-19T07:59:53.973" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6697" PostTypeId="2" ParentId="6689" CreationDate="2020-12-19T13:40:49.863" Score="5" Body="&lt;p&gt;Probably the most basic example is Python's &lt;code&gt;print&lt;/code&gt; function, which has keyword arguments &lt;code&gt;sep&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2020-12-19T13:40:49.863" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6698" PostTypeId="2" ParentId="6680" CreationDate="2020-12-20T22:23:15.483" Score="4" Body="&lt;p&gt;Two books come to mind. Both build a project and you learn about object-oriented program design and testing. However, both assume at least a good grasp of basic Java. Nether will cover all of the topics you mentioned, nor do they have videos, but will give you a good idea of how to develop larger programs. You will learn a lot by code reading and osmosis. Both books use Java for implementation.&lt;/p&gt;&#xA;&lt;p&gt;The first book (&lt;a href=&quot;https://csis.pace.edu/%7Ebergin/polymorphismBook/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csis.pace.edu/~bergin/polymorphismBook/index.html&lt;/a&gt;) builds a simple four-function calculator. It emphasizes test-driven development and assumes at least a simple knowledge of JUnit testing. The book shows how to decompose a problem into small manageable pieces and take advantage of polymorphism (hence the name of the book). I also like the companion book as it takes a further look at the same problem, but with alternative implementations. Both are paperback books available for approx $20. The author's web page (&lt;a href=&quot;https://csis.pace.edu/%7Ebergin&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://csis.pace.edu/~bergin&lt;/a&gt;) also has links to a lot of material he has written.&lt;/p&gt;&#xA;&lt;p&gt;The second book (&lt;a href=&quot;http://craftinginterpreters.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://craftinginterpreters.com/&lt;/a&gt;) builds an interpreter for an object-oriented language. It is a far larger and much more complex project. The author does an excellent job of explaining concepts and demonstrating incremental development. If you just made it through the chapter on Scanning, you will have learned a tremendous amount. You will have a much better idea of how Java takes your source files and breaks them down into pieces. Best of all, the book is free to read.&lt;/p&gt;&#xA;&lt;p&gt;Lastly, if you like videos, check out (&lt;a href=&quot;https://online-learning.harvard.edu/course/cs50-introduction-computer-science?delta=0&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://online-learning.harvard.edu/course/cs50-introduction-computer-science?delta=0&lt;/a&gt;). It is Harvard's intro to CS course and covers a whole variety of topics and languages. You can enroll for free and actually do the assignments or just watch videos and work on your own. The instructor is wonderful.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="9154" LastEditDate="2021-05-26T13:55:29.597" LastActivityDate="2021-05-26T13:55:29.597" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6699" PostTypeId="1" CreationDate="2020-12-21T08:51:59.003" Score="7" ViewCount="697" Body="&lt;p&gt;I am teaching some high school students, also the first time programmers, some basic programming concepts and applications.  When introducing loop I find that using it to &lt;strong&gt;check prime number&lt;/strong&gt; (and find prime numbers within a number range with nested loop) is a good example. It teaches them the concept of loop but also make them think, e.g. it just need to loop to &lt;span class=&quot;math-container&quot;&gt;$\sqrt{n} + 1$&lt;/span&gt;, no need to loop to &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I would like to know other examples like that to introduce loop, not too easy or too hard (for high school students) and better to have some practical application.&lt;/p&gt;&#xA;" OwnerUserId="9884" OwnerDisplayName="Qiulang" LastEditorUserId="9884" LastEditDate="2022-09-17T03:15:10.167" LastActivityDate="2022-09-17T03:15:10.167" Title="What are good, practical labs and activities for loops?" Tags="|lesson-ideas|secondary-education|algorithms|looping|" AnswerCount="6" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6700" PostTypeId="2" ParentId="6699" CreationDate="2020-12-21T09:12:06.650" Score="1" Body="&lt;p&gt;Given two positive integers &lt;span class=&quot;math-container&quot;&gt;$x$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$y$&lt;/span&gt;, write a program that prints the quotient &lt;span class=&quot;math-container&quot;&gt;$\lfloor\frac{x}{y}\rfloor$&lt;/span&gt; and the remainder &lt;span class=&quot;math-container&quot;&gt;$x\%y$&lt;/span&gt;, using only the &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; operations.&lt;/p&gt;&#xA;" OwnerDisplayName="Bader Abu Radi" LastActivityDate="2020-12-21T09:12:06.650" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6701" PostTypeId="2" ParentId="6699" CreationDate="2020-12-21T19:27:44.583" Score="4" Body="&lt;p&gt;Note that the following are intended for the instructor, not always directly for the student. If used well they require some analysis, not just coding, from the student.&lt;/p&gt;&#xA;&lt;p&gt;Use the fact that the sum of the first &lt;em&gt;n&lt;/em&gt; odd numbers is &lt;span class=&quot;math-container&quot;&gt;$n^2$&lt;/span&gt; to compute the integer square root of an integer.&lt;/p&gt;&#xA;&lt;p&gt;Test data should include 63, 64, and 65 to catch edge cases.&lt;/p&gt;&#xA;&lt;p&gt;This can be extended past the decimal point and optimized in various ways to compute more accurate approximations of square roots.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Notes on the above, but I suggest you try it before peeking:&lt;/p&gt;&#xA;&lt;blockquote class=&quot;spoiler&quot;&gt;&#xA;&lt;p&gt;To make it a bit more obvious, this involves using inverse functions and computing inverses. The loop actually needs to count subtractions and uses facts about perfect squares to compute square roots. That same idea might be exploited for other problems.&#xA;&#xA;Note that &lt;span class=&quot;math-container&quot;&gt;$\lfloor$&lt;/span&gt;  &lt;span class=&quot;math-container&quot;&gt;$\sqrt 65$&lt;/span&gt; &lt;span class=&quot;math-container&quot;&gt;$\rfloor$&lt;/span&gt; = 8.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Other simple things:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;How many digits does an integer have?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How many bits are required to represent an integer? (Note that the structure is the same as the above)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How many times does zero (for example) appear in the decimal representation of an integer.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Sum of the digits of a given integer.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is the number of 1 bits in a binary representation of an integer even or odd?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Read a real value x from input. Then read the successive coefficients of a polynomial from input and evaluate the polynomial at x. Note that the stopping condition needs to be specified and by varying it you can have different systems. Reading it from input is one of the obvious variations. Hardcoding it is another. Later on, the coefficients can be in an array, of course.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In teaching loops it is important to also give exercises where the correct number of iterations is zero. For example, give x and y, find the number of multiples of 3 that are larger than x but less than y. Don't exclude the initial condition y &amp;lt; x.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Nested loops: Once you have the solution to &amp;quot;is X prime?&amp;quot;, how many primes are there between a given x and y?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;A bit harder:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Euclidean_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Euclid's algorithm&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Extensions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Use other similar sums (than the sum of odds) to compute other things.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Look at the &lt;a href=&quot;https://en.wikipedia.org/wiki/Taylor_series&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia article on Taylor Series&lt;/a&gt; to get some ideas about how to approximate some interesting functions with sums.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;A solution to the square root problem follows, using a personal (executable) pseudocode:&lt;/p&gt;&#xA;&lt;blockquote class=&quot;spoiler&quot;&gt;&#xA;&lt;p&gt; &lt;pre&gt;&lt;code&gt;    $ &amp;quot;Computes the integer square root of a non-negative number&amp;quot;;&#xA;    With&#xA;      value; current; count; odd; // integer variables&#xA;    Program&#xA;      Read value;&#xA;      current &amp;lt;- value;&#xA;      count &amp;lt;- 0;&#xA;      odd &amp;lt;- 1;&#xA;&lt;br /&gt;&#xA;      While current &amp;gt;= odd {&#xA;          current &amp;lt;- current - odd;&#xA;          odd &amp;lt;- odd + 2;&#xA;          count &amp;lt;- count + 1;&#xA;      }&#xA;&lt;br /&gt;&#xA;      Print &amp;quot;The integer square root of &amp;quot;, value, &amp;quot; is &amp;quot;, count;&#xA;    End &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2020-12-24T17:45:34.240" LastActivityDate="2020-12-24T17:45:34.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6702" PostTypeId="2" ParentId="6699" CreationDate="2020-12-21T19:51:35.223" Score="1" Body="&lt;p&gt;Since we introduce loops before we introduce arrays, we will often do simple programs like ask a user how many numbers they want to enter, and then find the sum of the numbers entered.&lt;/p&gt;&#xA;&lt;p&gt;Similarly, they can practice these concepts a few times to find the maximum, minimum, and average of the numbers entered.  Having a few very similar tiny projects like this can be useful as a way to let the kids internalize the structure a little and begin to feel comfortable with it.&lt;/p&gt;&#xA;&lt;p&gt;You can also have them make a nice, rolling report of compound interest for a retirement calculator.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2020-12-21T22:17:42.613" LastActivityDate="2020-12-21T22:17:42.613" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6703" PostTypeId="2" ParentId="6699" CreationDate="2020-12-21T22:24:45.293" Score="4" Body="&lt;p&gt;I'm adding in a second answer to look at a few heftier assignments, worthy of a lab.  These were created by a truly fantastic colleague of mine.&lt;/p&gt;&#xA;&lt;p&gt;The game &lt;strong&gt;Nim&lt;/strong&gt; is excellent for a loop with no arrays.  You can use just three variables to keep track of the state of the game, and a variable and an &lt;code&gt;if&lt;/code&gt; statement to deal with the player.  (Kids at this level will &lt;em&gt;often&lt;/em&gt; try to simply copy their code from player 1 for player 2, and won't think to simplify the structure by using a variable -- that's a good segue into the idea of defensive coding, wherein you assume that your code is always &lt;em&gt;somehow&lt;/em&gt; buggy, and you make efforts not to proliferate the bugs all over the place.  That same idea dovetails nicely into function calls as well.)&lt;/p&gt;&#xA;&lt;p&gt;We also have an &lt;strong&gt;Electronic Piggy Bank&lt;/strong&gt; assignment where the user can add in &lt;code&gt;p&lt;/code&gt; (penny), &lt;code&gt;n&lt;/code&gt; (nickel), &lt;code&gt;d&lt;/code&gt; (dime) and &lt;code&gt;q&lt;/code&gt; (quarter) as many times as they want.  The program will keep a running tally of the amount in the piggy bank.  The user can then type &lt;code&gt;exit&lt;/code&gt; to finish up and see the final report.  Again, this is a lab that requires keeping track of several variables, and motivated the use of loops and branching, but doesn't require arrays to be effective.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2020-12-21T22:24:45.293" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6704" PostTypeId="2" ParentId="6699" CreationDate="2020-12-23T04:38:28.140" Score="1" Body="&lt;p&gt;Write a loop that reverses the characters of a string.&lt;/p&gt;&#xA;" OwnerUserId="2492" LastActivityDate="2020-12-23T04:38:28.140" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6705" PostTypeId="1" CreationDate="2020-12-27T17:29:23.110" Score="1" ViewCount="177" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Most technologists have some basic understanding of quantum computing.&#xA;Quantum bits are represented by qubits, and information isn’t simply a&#xA;zero or one, it can be both at the same time, representing much more&#xA;information.  A quantum effect known as entanglement linking two&#xA;particles allows instantaneous communication.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, quantum computing promises to be a disruptive technology&#xA;with such dramatic speed improvements that real tractable solutions to&#xA;hard problems could be solved in hours and days. These same problems&#xA;would take hundreds of years to solve on our best supercomputers,&#xA;known as a classical computer, by brute-forcing their way searching&#xA;through all possible solutions.&lt;/p&gt;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Reference: Ludlow, Nella. Forbes. &lt;a href=&quot;https://www.forbes.com/sites/cognitiveworld/2019/02/24/why-quantum-computings-time-is-now/?sh=5d56306358d4&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Why Quantum Computing's Time Is Now&lt;/em&gt;&lt;/a&gt;. Feb 24, 2019. Date Accessed - Dec 27, 2020.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Quantum Computing is regarded as one of the most &lt;em&gt;disruptive technology&lt;/em&gt; as well as &lt;em&gt;emerging technology&lt;/em&gt;[1,2]. This field has attracted a lot of computational startups and investments in the recent years[3, 4, 5]. With such a pretty new field to learn and work on lacks some material/online courses to self learn Quantum Computing from Computer Science and Engineering perspective. So, the question focuses on the good quality resources to/for:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Self-Learning Quantum Computing to build Quantum Computing Simulations on a digital Computer.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Development of software, programming of such computer systems.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Hardware and Physical implementation from the perspective of CS Engineers.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Deployment and Integration (hybrid systems) with Digital Computer.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Related areas of disruption of cryptography, internet, data, AI, etc.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;The answers may be answered in the forms of links/resources to - scientific articles, papers, online courses/videos and Books that can aid or teach self learner Quantum Computing.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Bibliography:&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Sharma, Vivek. &lt;a href=&quot;http://www.marshall.usc.edu&quot; rel=&quot;nofollow noreferrer&quot;&gt;www.marshall.usc.edu&lt;/a&gt;. &lt;a href=&quot;https://www.marshall.usc.edu/blog/what-makes-quantum-computing-disruptive&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;What makes Quantum Computing disruptive?&lt;/em&gt;&lt;/a&gt;. Oct 23, 2017. Date Accessed - Dec 27, 2020.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Cipher Brief. &lt;a href=&quot;http://www.thecipherbrief.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;www.thecipherbrief.com&lt;/a&gt;. &lt;a href=&quot;https://www.thecipherbrief.com/why-should-i-care-about-quantum-computing&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Why Should I Care about Quantum Computing?&lt;/em&gt;&lt;/a&gt;. Mar 19, 2020. Date Accessed - Dec 27, 2020.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Vance, Jeff. Network World. &lt;a href=&quot;https://www.networkworld.com/article/3489098/10-hot-quantum-computing-startups-to-watch.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;10 hot quantum-computing startups to watch&lt;/em&gt;&lt;/a&gt;. Feb 15, 2019. Date Accessed - Dec 27, 2020.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Bajpai, Prableem. Nasdaq. &lt;a href=&quot;https://www.nasdaq.com/articles/quantum-computing%3A-how-to-invest-in-it-and-which-companies-are-leading-the-way-2020-02-11&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Quantum Computing: How To Invest In It, And Which Companies Are Leading the Way?&lt;/em&gt;&lt;/a&gt;. Feb 11, 2020. Date Accessed - Dec 27, 2020.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Qureca. &lt;a href=&quot;https://www.qureca.com/overview-on-quantum-initiatives-worldwide/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Overview on quantum initiatives worldwide&lt;/em&gt;&lt;/a&gt;. Sept 7, 2020. Date Accessed - Dec 27.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9898" LastEditorUserId="9898" LastEditDate="2020-12-27T17:39:09.753" LastActivityDate="2022-10-22T01:04:20.553" Title="Self Learning Quantum Computing and helpful resources that can aid, guide and teach Quantum Computing from CS&amp;E perspective" Tags="|self-learning|resource-request|quantum-computing|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6706" PostTypeId="2" ParentId="6705" CreationDate="2020-12-28T05:28:34.177" Score="3" Body="&lt;p&gt;The answer written here has been referenced from some of the leading Quantum Computing research Journals or Publications. The interested readers are advised to visit their website in order to get the rough idea of research trend and field segments before self reading Quantum Computing.&lt;/p&gt;&#xA;&lt;p&gt;The publications/journals include -  &lt;em&gt;IEEE Quantum&lt;/em&gt;, &lt;em&gt;Quantum Information Processing&lt;/em&gt; by &lt;em&gt;Springer&lt;/em&gt;, &lt;em&gt;Journal of Quantum Computing&lt;/em&gt; By &lt;em&gt;Tech Science Press&lt;/em&gt;, &lt;em&gt;Quantum Journal&lt;/em&gt; and &lt;em&gt;Quantum Computing&lt;/em&gt; by &lt;em&gt;IOP&lt;/em&gt; [1, 2, 3, 4, 5]. Trends were mainly picked up from Google Scholar, ArXiv Open Access Repos and Online Courses by Reputed Universities.&lt;/p&gt;&#xA;&lt;p&gt;The interested enthusiast may start from the notes/cheatsheets before moving to books/online course videos.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Methodology&lt;/h2&gt;&#xA;&lt;p&gt;Books were given preference over paper as it can be more helpful for a self learner or anyone needing assistance/help in the field. The main books are solemnly chosen on the basis of higher citations (quality and research impact), whereas reference books on the basis of citations (atleast more than 50 for the given topic) as well as date of publication (newer material given more preference). The order of listing is on the basis of &lt;em&gt;citations only!&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The answer includes video material/courses as well as papers/cheatsheets that'd be helpful for a beginner in an &lt;em&gt;arbitrary order and not in any preference!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Cheatsheets/Notes&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/research/uploads/prod/2018/05/40655.compressed.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Microsoft Research - Quantum Computing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;Books&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Computing and Quantum Information :&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Quantum Computation and Quantum Information&lt;/em&gt; By Michael A. Nielsen &amp;amp; Isaac L. Chuang&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;Reference Books:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Introduction to Quantum Computation and Quantum Information&lt;/em&gt; By Hoi Kwong Lo, Sandu Popescu, Tim Spiller&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;A First Introduction to Quantum Computing and Information&lt;/em&gt; By Bernard Zygelman&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Networking :&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Quantum Networking&lt;/em&gt; By Rodney Van Meter&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;Reference Books:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Schrödinger’s Killer App Race to Build the World’s First Quantum Computer&lt;/em&gt; By Jonathan P. Dowling&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Artificial Intelligence:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;1.&lt;em&gt;Quantum Machine Learning&lt;/em&gt; By Siddhartha Bhattacharyya, Indrajit Pan, Ashish Mani, Sourav De, Elizabeth Behrman, Susanta Chakraborti (Eds.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;Reference Books:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;1.&lt;em&gt;Supervised Learning with Quantum Computers&lt;/em&gt; By Maria Schuld Francesco Petruccione&lt;/p&gt;&#xA;&lt;p&gt;2.&lt;em&gt;Quantum Machine Learning What Quantum Computing Means to Data Mining&lt;/em&gt; By Peter Wittek&lt;/p&gt;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Optics:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;A guide to experiments in Quantum Optics&lt;/em&gt; By Hans A Bachor, Timothy C Ralph&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;The Quantum Theory of Light&lt;/em&gt; By Rodney Loudon&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simulations and Hardware:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Quantum Optics for Engineers&lt;/em&gt; By F.J. Duarte&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;2.&lt;em&gt;Dancing with Qubits&lt;/em&gt; By Robert S Sutor&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Error Correction and Fault Tolerance :&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Quantum Error Correction&lt;/em&gt; - DA Lidar, TA Brun&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantum Entanglement:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;1.&lt;em&gt;Geometry of Quantum States: An Introduction to Quantum Entanglement&lt;/em&gt; By Ingemar Bengtsson, Karol Życzkowski&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;Important Papers/Resources on Quantum Mechanics&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A. EINSTEIN, N. ROSEN and B. PODOLSKY, Phys. Rev. 47, 777 (1935). &lt;a href=&quot;https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777&quot; rel=&quot;nofollow noreferrer&quot;&gt;Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?&lt;/a&gt;;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Introduction to Quantum Mechanics&lt;/em&gt; By David J. Griffiths&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Spontaneous_parametric_down-conversion&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Spontaneous parametric down-conversion&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;Courses/Video Lectures&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://nptel.ac.in/courses/115/101/115101092/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Quantum Information and Computing&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://onlinecourses.nptel.ac.in/noc19_cy31/preview&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quantum Computing&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Bibliography&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;IEEE Quantum. &lt;a href=&quot;https://quantum.ieee.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://quantum.ieee.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Quantum Information Processing. &lt;a href=&quot;https://www.springer.com/journal/11128&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.springer.com/journal/11128&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Journal of Quantum Computing. &lt;a href=&quot;https://www.techscience.com/JQC/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.techscience.com/JQC/index.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Quantum - The open journal for Quantum Science. &lt;a href=&quot;https://quantum-journal.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://quantum-journal.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Quantum computing. &lt;a href=&quot;https://iopscience.iop.org/article/10.1088/0034-4885/61/2/002/meta&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://iopscience.iop.org/article/10.1088/0034-4885/61/2/002/meta&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9898" LastActivityDate="2020-12-28T05:28:34.177" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6707" PostTypeId="1" AcceptedAnswerId="6716" CreationDate="2020-12-29T16:03:01.973" Score="3" ViewCount="224" Body="&lt;p&gt;Tl;dr - the subject is enough. For background, read below.&lt;/p&gt;&#xA;&lt;p&gt;I am a professional, freelance, embedded software developer. I first learned about C++ in the 90s and taught myself from a book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0201395193&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++ for C programmers&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The beauty of that was that it assumed that I knew C and didn't have to spend chapter after chapter explaining how to declare a variable/what a variable is, function/passing parameters/returning a result, loops, etc, etc, etc.&lt;/p&gt;&#xA;&lt;p&gt;So, it cut quickly to the chase and I started learning from page 1, rather than skipping forward.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Fast (?) forward a few decades, and I no longer code (much) assembler.  Work seems to be split between C, Ada (mostly for defence) and C++.&lt;/p&gt;&#xA;&lt;p&gt;It has been four years since my last C++ gig, and, industry being conservative does not adopt new version of languages for some time, until they can be seen to be widely accepted as stable (if any of you non-industry guys what to know why, then we generally want to wait until &amp;quot;they get the bugs out of the new compiler&amp;quot;. Given that a lot of embedded can be life-critical, you can understand why).&lt;/p&gt;&#xA;&lt;p&gt;So, now I am seeing ads requiring C++ 2014 and 2017 (and my latest experience is 2003). The delicious irony of this is that I know, from bitter experience, that coding standards will forbid me from using the new features intruded in those versions.&lt;/p&gt;&#xA;&lt;p&gt;All of my life, I have taught myself new languages &amp;amp; concepts from books. Earlier this year, I took a leap of faith &amp;amp; taught myself Flutter/Dart (for personal, non-professional use) from &lt;a href=&quot;https://www.udemy.com/course/flutter-bootcamp-with-dart/&quot; rel=&quot;nofollow noreferrer&quot;&gt;a Udemy course&lt;/a&gt;. That was an eye-opener, and I won't be responsible for the death of any more trees in future.&lt;/p&gt;&#xA;&lt;p&gt;But, I digress (this entire screed has been a digression, if you ask me). I have now purchased &lt;a href=&quot;https://www.udemy.com/share/103LceAEITeFZUTXUB/&quot; rel=&quot;nofollow noreferrer&quot;&gt;another Udemy course&lt;/a&gt; to learn C++.&lt;/p&gt;&#xA;&lt;p&gt;And, finally, after all of that, my question is still the same as its title - &amp;quot;I know C++ 2003 How to start learning C++ 2017 ?&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Do I watch the start of each chapter, and skip if I yawn? Do I read the table of contents and take a stab at where to jump in?&lt;/p&gt;&#xA;&lt;p&gt;Given that you are a group of educators, I imagine that this is not a new situation to you, but am not sure that it has an answer which does not involve the length of pieces of string.&lt;/p&gt;&#xA;" OwnerUserId="4116" LastActivityDate="2021-01-05T15:01:06.567" Title="I know C++ 2003 How to start learning C++ 2017?" Tags="|self-learning|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6708" PostTypeId="2" ParentId="6707" CreationDate="2020-12-29T16:34:39.987" Score="3" Body="&lt;p&gt;I would guess that taking such courses is a gross waste of time unless they are specifically focused on recent additions to C++. Most of the &amp;quot;beginning C++ courses&amp;quot; won't even get you to essential new features.&lt;/p&gt;&#xA;&lt;p&gt;I haven't followed updates to the language for a long time but first, I think that the &amp;quot;new&amp;quot; language is backward compatible with the &amp;quot;old&amp;quot; language (unlike Python). So, what you need are incremental changes in most things to what you already know.&lt;/p&gt;&#xA;&lt;p&gt;But I also think that the programming style in modern C++ has changed, depending more on library code than was true in the past. What you need to do is find a way to become comfortable with that newer programming style.&lt;/p&gt;&#xA;&lt;p&gt;I would think that a book like this one from the very capable &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1491903996&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scott Myers&lt;/a&gt; would get you started. I don't have the book, but Myers has been trustworthy in the past. Use the ideas there to build something significant.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2020-12-29T16:34:39.987" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6709" PostTypeId="1" CreationDate="2020-12-31T09:48:23.930" Score="4" ViewCount="851" Body="&lt;p&gt;I have taught my high school students to write some simple python scripts, taking some ideas from &lt;a href=&quot;https://automatetheboringstuff.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Automate the Boring Stuff with Python&amp;quot;&lt;/a&gt;, e.g. changing file names in a folder to a specific naming pattern.&lt;/p&gt;&#xA;&lt;p&gt;My next goal is to teach them object-oriented concepts and if possible give them some &amp;quot;real&amp;quot; examples to try themselves. But most of the materials I find (most of google's top search results) about OO programming (not just python) are laden with poor examples, if I may say so. I really don't like to use car/vehicle or animal/dog to teach them the OO concept and OOP.&lt;/p&gt;&#xA;&lt;p&gt;A. it is boring (you know high-school kids)&lt;br /&gt;&#xA;B. it has no real use.&lt;br /&gt;&#xA;C. as one comment said &amp;quot;they are fatally flawed.&amp;quot;  (But if you really like to use the animal example, check this &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/205459/object-oriented-design&quot;&gt;&amp;quot;Object-Oriented Design&amp;quot;&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;I plan to use &lt;a href=&quot;https://docs.python.org/3/library/pathlib.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;pathlib&lt;/a&gt; (btw, they already have a basic idea of the difference between Windows and UNIX)&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/jvahy.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jvahy.png&quot; alt=&quot;pathlib&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;GUI development could be another good example to teach OOP but I don't want to teach them GUI yet.&lt;/p&gt;&#xA;&lt;p&gt;Any suggestion to introduce OO with the &amp;quot;real&amp;quot; example?&lt;/p&gt;&#xA;&lt;p&gt;BTW, I’m not a strong advocate of object-oriented programming. But the &lt;code&gt;pathlib.Path&lt;/code&gt; class is a useful abstraction especially compared with os.path, although the high school students are unlikely to appreciate that.&lt;/p&gt;&#xA;&lt;p&gt;---- update ----&lt;/p&gt;&#xA;&lt;p&gt;I find the python logging module is another good example, but it seems too complicated for non-experienced programmers.&lt;/p&gt;&#xA;&lt;p&gt;When using the logging module we mainly use 3 objects, &lt;strong&gt;Logger, Handler, Formatter&lt;/strong&gt;. Logger is the &lt;strong&gt;facade&lt;/strong&gt;, as &lt;a href=&quot;https://docs.python.org/3/howto/logging.html#loggers&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.python.org/3/howto/logging.html#loggers&lt;/a&gt; said,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Logger objects have a threefold job. First, they expose several methods to application code so that applications can log messages at runtime. Second, logger objects determine which log messages to act upon based upon severity (the default filtering facility) or filter objects. Third, logger objects pass along relevant log messages to all interested log handlers.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Handler is a good example to use &lt;strong&gt;inheritance&lt;/strong&gt; &lt;a href=&quot;https://docs.python.org/3/howto/logging.html#useful-handlers&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.python.org/3/howto/logging.html#useful-handlers&lt;/a&gt; and handlers use formatters, which hide the complexity of LogRecord, to the format log message.&lt;/p&gt;&#xA;&lt;p&gt;In addition to these classes, there are a number of &lt;a href=&quot;https://docs.python.org/3/library/logging.html#module-level-functions&quot; rel=&quot;nofollow noreferrer&quot;&gt;module-level functions&lt;/a&gt; for convenient use.&lt;/p&gt;&#xA;&lt;p&gt;Overall it is a good example of using &lt;strong&gt;composition&lt;/strong&gt; and aggregation.&lt;/p&gt;&#xA;&lt;p&gt;But I am not an expert on the python logging module, I hope someone who is familiar with the python logging module may add an answer to my question.&lt;/p&gt;&#xA;&lt;p&gt;--- update 2 ----&lt;/p&gt;&#xA;&lt;p&gt;I found Alan Kay answered the question &lt;a href=&quot;https://qr.ae/pNDvTp&quot; rel=&quot;nofollow noreferrer&quot;&gt;“What are the five features of the object-oriented paradigm that you consider to be important for good software engineering practice?&lt;/a&gt;” with these words, in my opinion, resonate with the answer Buffy gave. But how to convey these ideas to high school students or non-experienced programmers is another challenge,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;a “part” construct that can protect it's inside from its outside, and&#xA;vice versa&lt;/p&gt;&#xA;&lt;p&gt;a “communications” construct that can convey interactions and deal&#xA;with dependencies&lt;/p&gt;&#xA;&lt;p&gt;a “system” construct that is a combination of parts and communications&#xA;that can fit in a part recursively, and everything is made this way&lt;/p&gt;&#xA;&lt;p&gt;the “messages” that are communicated are also in terms of the systems&lt;/p&gt;&#xA;&lt;p&gt;the system that is being made is made with the same kinds of system&#xA;...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;--- update 3 ---&lt;/p&gt;&#xA;&lt;p&gt;The recent log4j security flaw made me come back to my own although my question has nothing to do with log4j. I know python logging module is &lt;a href=&quot;https://realpython.com/python-logging/&quot; rel=&quot;nofollow noreferrer&quot;&gt;adopted from Log4j&lt;/a&gt;, so I think this can be used as a good example to how different programming languages borrow the idea from each other. If the students have some knowledge about java, I may consider to introduce them this old article &amp;quot;&lt;a href=&quot;https://bitworking.org/news/2006/08/python_isnt_java_without_the_compile/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python isn't just Java without the compile&lt;/a&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;BTW, Buffy gave answer about calculator as an example to practice OO, but I will argue it will depends on how you design the question and the project, e.g. here &amp;quot;&lt;a href=&quot;https://www.digitalocean.com/community/tutorials/how-to-make-a-calculator-program-in-python-3&quot; rel=&quot;nofollow noreferrer&quot;&gt;How To Make a Calculator Program in Python 3&lt;/a&gt;&amp;quot; without introducing OO concepts at all.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2022-01-07T08:08:37.643" LastActivityDate="2022-01-07T08:08:37.643" Title="Some real practical example to teach object-oriented concepts and programming (in python)" Tags="|lesson-ideas|curriculum-design|secondary-education|object-oriented-paradigm|" AnswerCount="4" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6710" PostTypeId="2" ParentId="6709" CreationDate="2020-12-31T14:53:05.470" Score="5" Body="&lt;p&gt;I expect to update this a few times and hope to eventually have a long answer.&lt;/p&gt;&#xA;&lt;p&gt;But let me start by explaining some things that you may already be aware of, but other readers may not.&lt;/p&gt;&#xA;&lt;p&gt;First, OO programming is not, fundamentally, about inheritance and too many books and authors fail to understand that. Moreover, they use inheritance in a dreadful way that makes software hard to understand and harder to maintain.&lt;/p&gt;&#xA;&lt;p&gt;For example, note that the Linnaeus style hierarchy of the biological world is almost entirely one of &amp;quot;interfaces&amp;quot; and not even &amp;quot;abstract classes&amp;quot;, much less concrete classes. There are no instantiated &amp;quot;mammals&amp;quot;, for example. It is only at the leave of the hierarchy that things actually exist, other than as ideas. There is some genetic continuity, of course.&lt;/p&gt;&#xA;&lt;p&gt;Second, there are some principles that can guide you in writing and teaching OO design, but they require discipline. And part of that discipline is to control the situations in which you &amp;quot;break&amp;quot; the rules.&lt;/p&gt;&#xA;&lt;p&gt;My first advice for anyone wanting to be an OO programmer is not to think in terms of inheritance, but, rather, of composition. Complex things (objects) are &lt;em&gt;composed&lt;/em&gt; of other things (objects) that are a bit simpler than the containing object and provide it some essential service. If you write classes where all (or even most) of your instance variables are language primitives, then you don't really get it. And if those instance variables (objects or primitive) have a lot of getters and setters, then you aren't doing OO Programming at all.&lt;/p&gt;&#xA;&lt;p&gt;In fact, making the above mistakes, requires that the programmer keep track of all details at all points of the program where OO is designed to capture decisions so that they needn't be &amp;quot;checked&amp;quot; again. Set it and forget it, so to speak.&lt;/p&gt;&#xA;&lt;p&gt;So, if you want to build an automobile, don't think of it as a subclass of vehicle (which gains you nothing: a personal drone and a battleship are both vehicles). Think of it instead of being composed of various parts: engine, transmission, controls, accommodations, etc. And those parts are, themselves, composed of parts. An engine &lt;em&gt;has&lt;/em&gt; igniters and pistons, exhaust, etc. Many of those are composed of parts also. It is only at the lowest, simplest level that you build with primitives.&lt;/p&gt;&#xA;&lt;p&gt;Two of the principles that are worth keeping in mind and following almost always are the &lt;a href=&quot;https://en.wikipedia.org/wiki/Liskov_substitution_principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;Liskov Substitution Principle&lt;/a&gt; and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Law_of_Demeter&quot; rel=&quot;nofollow noreferrer&quot;&gt;Law of Demeter&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The first suggests that if you extend a class with a subclass you don't also extend the public interface of the subclass. Then all subclass objects are substitutable, differing in behavior but not in interface. Demeter, on the other hand, forces you to write more explicit code that makes relationships clear to a reader. Of course it also forces you to introduce more names, and if they are &lt;em&gt;intention revealing names&lt;/em&gt; then your code is clearer.&lt;/p&gt;&#xA;&lt;p&gt;The Liskov principle, of course is one of the elements of &lt;a href=&quot;https://en.wikipedia.org/wiki/SOLID&quot; rel=&quot;nofollow noreferrer&quot;&gt;SOLID&lt;/a&gt; which you also need to incorporate into your thinking.&lt;/p&gt;&#xA;&lt;p&gt;In my own programming I'm very faithful to Liskov, also defining Interfaces for most things before I write classes. I'm less faithful to Demeter in the heat of battle, cascading messages. But then I sometimes also need to unravel those a.b.c.d sorts of cascades to figure out what I really mean.&lt;/p&gt;&#xA;&lt;p&gt;One goal I have in writing OO code is to seek to write only very short methods with a minimum of structure. In other words I try to minimize &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cyclomatic Complexity&lt;/a&gt;. My palms start to get itchy after the fourth statement in a method or if the complexity level reaches three. I can't always get away with that, but it is a goal. The solution is to refactor complexity mercilessly. Factor out methods, of course, but also &amp;quot;parts&amp;quot;, creating new classes to manage the complexity. Even if many of those classes are Singletons the code is usually improved and having the goal in mind from the start, means that the refactoring step is less needed.&lt;/p&gt;&#xA;&lt;p&gt;Design patterns are tools that you need to be an effective programmer in most OO languages. Especially helpful ones are Strategy, Decorator, Observer, and Iterator. Most of these are actually used to build the various Java libraries.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Now, to get to the actual question asked here. But note that a lot of learning can take place even if the students never reach completion of the project in the allotted time. An agile approach (Extreme Programming, say, with you as &amp;quot;Customer&amp;quot;) to development leaves them with &lt;em&gt;some&lt;/em&gt; functionality even if not all specifications are implemented.&lt;/p&gt;&#xA;&lt;h3&gt;Dungeon Game&lt;/h3&gt;&#xA;&lt;p&gt;Build a text based dungeon game. The main objects are characters (people), places, and things. The places are organized in some sort of map, maze, or grid. Things happen when characters enter places. Characters find and carry things. The things have actions, depending on the kind of thing. A &amp;quot;spell&amp;quot; is a &amp;quot;thing&amp;quot; whose action might depend on context. A &amp;quot;transporter&amp;quot; object might work differently in different rooms (strategy objects).&lt;/p&gt;&#xA;&lt;p&gt;Note that the classic board game &lt;a href=&quot;https://en.wikipedia.org/wiki/Snakes_and_ladders&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chutes (or Snakes) and Ladders&lt;/a&gt; is a simplified version of this. A text based version avoids a lot of complexity.&lt;/p&gt;&#xA;&lt;h3&gt;Calculator&lt;/h3&gt;&#xA;&lt;p&gt;A calculator has parts such as keys and the display. Less visible are the internal memory, possibly a stack. Even the operations can be objects. The behavior of the keys changes, depending on the state of the computation (Strategy pattern). It is possible to build a simple calculator without a single IF statement, actually.&lt;/p&gt;&#xA;&lt;h3&gt;Abstract Computer with an Assembly language&lt;/h3&gt;&#xA;&lt;p&gt;A Stack Based computer processor simulation is pretty straightforward. There may be accumulators and such, but a single stack on which all operations are done is simple and complete. The operations can be objects (parts). One advantage of this example is that most of the necessary methods can be very short. A program can be read with a Java Scanner object. It needs a program counter at least and possibly a frame pointer if the language is to support subroutines.&lt;/p&gt;&#xA;&lt;h3&gt;Sticky Notes (I haven't tried this)&lt;/h3&gt;&#xA;&lt;p&gt;An application that lets users keep notes and cross reference and organize them. Some classes might be Notes, Keywords, Connections, Lists.&lt;/p&gt;&#xA;&lt;h3&gt;Jeopardy&lt;/h3&gt;&#xA;&lt;p&gt;A simulator for the jeopardy game from TV. Categories, Answers, Questions, Teams, Scores.&lt;/p&gt;&#xA;&lt;p&gt;(Back soon, maybe).&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-06-02T10:49:32.690" LastActivityDate="2021-06-02T10:49:32.690" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6711" PostTypeId="2" ParentId="6709" CreationDate="2021-01-01T21:03:49.853" Score="-2" Body="&lt;p&gt;How about a boring*, but realistic, commercial example? When the students leave the &amp;quot;hallowed halls&amp;quot; and become entrepreneurs in start-ups, they will be faced with the relationships between Customer, Product, and Sale (Transaction).&lt;/p&gt;&#xA;&lt;p&gt;By keeping all of the Product data (for example) 'together', we introduce the advantage of encapsulation over a basic data structure, eg array. There is scope for hierarchies (later).&lt;/p&gt;&#xA;&lt;p&gt;Per earlier &amp;quot;composition&amp;quot; responses, when we look at an Address we see that each Customer must have one, oh wait, more than one if his/her billing address is distinct from the delivery address. So, if an Address is part of a Customer, should Customer &amp;quot;inherit&amp;quot; from Address? (&amp;quot;is a&amp;quot; cf &amp;quot;has a&amp;quot;!) What about the difference between a personal customer and a corporate?&lt;/p&gt;&#xA;&lt;p&gt;Do both have a name, and address, ...? How are they similar/where do they differ? How do we keep track of the individual from the Corporation with whom we are dealing?&lt;/p&gt;&#xA;&lt;p&gt;What happens when we make a sale? Is this data to be part of the purchasing-Customer's object, or the Product object - or objects, or what? Thus, &amp;quot;Interfaces&amp;quot; (in some languages), an invitation to expand the SRP into micro-services, drop into APIs...&lt;/p&gt;&#xA;&lt;p&gt;There's plenty of scope for SOLID principles, best practices, language differences, and all-the-fun-of-the-fair. Meantime, you could 'dress up' problems to make the toy-examples seem 'real' any-which-way; and the students are learning 'how the world works' and thus (hopefully) enthused to progress.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;personal opinion: can't imagine how Pathlib avoids the &amp;quot;boring&amp;quot; criterion (besides it has its own struggles with 'the concrete', given its abstraction from the OpSys - which is already an abstraction ... Alice, rabbit hole, Toto != Kansas...)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2021-01-01T21:03:49.853" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6713" PostTypeId="1" CreationDate="2021-01-04T14:52:18.260" Score="4" ViewCount="107" Body="&lt;p&gt;I'm adding a bit about k-maps to my processors course, but being unfamiliar with them until now, I want to check that I am covering the correct things.  Here is what I am currently covering:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How k-maps can be created and read (up through 4 variables -- I have decided to skip the 5th variable for now)&lt;/li&gt;&#xA;&lt;li&gt;The importance of the funny ordering in the axis (&lt;span class=&quot;math-container&quot;&gt;$00$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$01$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$11$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$10$&lt;/span&gt;) as a way to ensure that only one bit must be transformed to arrive at any neighboring position&lt;/li&gt;&#xA;&lt;li&gt;To derive expressions from k-maps, rectangles of 1s can be of size 1, 2, 4, or 8 only.&lt;/li&gt;&#xA;&lt;li&gt;How to actually derive an expression from a k-map&lt;/li&gt;&#xA;&lt;li&gt;How to derive expressions from k-maps when there are undefined regions within the k-map.&lt;/li&gt;&#xA;&lt;li&gt;Using k-maps to derive a Sum of Products (a.k.a. Disjunctive Normal Form) and a Product of Sums (Conjunctive Normal Form)&lt;/li&gt;&#xA;&lt;li&gt;The inverse relationship between the size of a rectangle and the number of variables that define it.&lt;/li&gt;&#xA;&lt;li&gt;Spotting xor values (perhaps I don't need this?  It doesn't seem much emphasized in materials I've found, since they mostly focus on finding SoP and PoS)&lt;/li&gt;&#xA;&lt;li&gt;k-maps wrap around, so you can make a rectangle that starts on the left edge and wraps leftwards to the right edge, or from the top and wrap upwards to the bottom.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So, should I skip xor?  Is there something I should add?  Am I covering the right things?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-17T14:22:43.273" Title="Subtopics to cover within Karnaugh Maps" Tags="|boolean-algebra|curriculum-review|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6714" PostTypeId="1" CreationDate="2021-01-04T21:27:39.923" Score="1" ViewCount="1076" Body="&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/4AuOF.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/4AuOF.png&quot; alt=&quot;TCP header format&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I am bad at memorizing things. So could anyone recommend me some mnemonics, so that I can remember the fields of the header...&lt;/p&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2021-01-05T16:44:54.327" Title="Mnemonics to remember the TCP header fields" Tags="|self-learning|resource-request|networks|" AnswerCount="1" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6715" PostTypeId="1" CreationDate="2021-01-05T03:40:07.957" Score="1" ViewCount="74" Body="&lt;p&gt;I am about to start my second semester of community college with the intention of transferring to a state university, where I will pursue a degree in computer science. I think this is a good fit for me, as I love logic, coding, math, and am doing well at a software development internship. Problem solving is one of my best strengths, so I don't foresee any issues with my studies.&lt;/p&gt;&#xA;&lt;p&gt;This being said, I love cinematography, visual effects, and story telling itself. I appreciate the art of cinema for both its technical and creative aspects and would love to be involved in this industry too.&lt;/p&gt;&#xA;&lt;p&gt;Can I realistically combine both of these passions into one career? If so, how?&lt;/p&gt;&#xA;" OwnerUserId="9913" LastActivityDate="2021-01-05T03:40:07.957" Title="CSCI Major with a love for film" Tags="|self-learning|" AnswerCount="0" CommentCount="5" ClosedDate="2021-01-05T03:56:03.127" ContentLicense="CC BY-SA 4.0" />
  <row Id="6716" PostTypeId="2" ParentId="6707" CreationDate="2021-01-05T15:01:06.567" Score="6" Body="&lt;p&gt;I had a similar problem 8/9 years ago, but with C++11.&lt;/p&gt;&#xA;&lt;p&gt;The trick is that there is no trick. You simply sit and use the feature you want to use. Besides that it is also beneficial to know C++14 before getting into C++17 and know C++11 before getting familiar with C++14 features. (Obviously prerequisite for C++11 is C++03/98, but that's already covered by OP).&lt;/p&gt;&#xA;&lt;p&gt;If getting up-to-date with C++17 (C++20 actually was vote in 2020) I would start with feature list grouped &lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;. The problem is that there are so many of them that one may have problems in how to approach them, thus I've provided an ordered list that shows how I would teach it to people:&lt;/p&gt;&#xA;&lt;h2&gt;C++11 warm-up&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#nullptr&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;nullptr&lt;/code&gt;&lt;/a&gt; - you won't be using &lt;code&gt;NULL&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; for null pointers anymore&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#static-assertions&quot; rel=&quot;noreferrer&quot;&gt;static assertions&lt;/a&gt; - allows you to enforce some assertions at compile time&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.cppreference.com/w/cpp/language/enum&quot; rel=&quot;noreferrer&quot;&gt;scoped enums&lt;/a&gt; - no more enums collisions!&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#type-aliases&quot; rel=&quot;noreferrer&quot;&gt;type alias&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Basic C++11 stuff&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;move semantics (&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#move-semantics&quot; rel=&quot;noreferrer&quot;&gt;overview&lt;/a&gt; + &lt;a href=&quot;https://stackoverflow.com/questions/3106110/what-is-move-semantics&quot;&gt;SO question&lt;/a&gt;) - move semantics and rvalue references are the corner stone of modern C++, what follows is the rule of 5 (or 3/5/0 if being precise)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#rvalue-references&quot; rel=&quot;noreferrer&quot;&gt;rvalue references&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#special-member-functions-for-move-semantics&quot; rel=&quot;noreferrer&quot;&gt;move semantics in a class&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.cppreference.com/w/cpp/language/rule_of_three&quot; rel=&quot;noreferrer&quot;&gt;rule of 3/5/0&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#auto&quot; rel=&quot;noreferrer&quot;&gt;auto&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#lambda-expressions&quot; rel=&quot;noreferrer&quot;&gt;lambda expressions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#range-based-for-loops&quot; rel=&quot;noreferrer&quot;&gt;ranged for loops&lt;/a&gt; - because &lt;code&gt;for(auto const&amp;amp; e: {1, 2, 3}) { std::cout &amp;lt;&amp;lt;e &amp;lt;&amp;lt;'\n'; }&lt;/code&gt; is so cool :)&lt;/li&gt;&#xA;&lt;li&gt;classes related stuff:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#default-functions&quot; rel=&quot;noreferrer&quot;&gt;default functions/methods&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#deleted-functions&quot; rel=&quot;noreferrer&quot;&gt;deleted functions/methods&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#final-specifier&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;final&lt;/code&gt; keyword&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#constexpr&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;constexpr&lt;/code&gt; specifier&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#initializer-lists&quot; rel=&quot;noreferrer&quot;&gt;initializers lists&lt;/a&gt; - it is used mainly in &lt;code&gt;std::vector&amp;lt;...&amp;gt;&lt;/code&gt; so it's important to know how it works and what are problems involved with them (it is not my favourite C++11 feature)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Extra C++11 stuff&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/tg-m/modern-cpp-features/blob/master/CPP11.md#tuples&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;std::tuple&lt;/code&gt;&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;But avoid &lt;code&gt;std::tie&lt;/code&gt;, prefer structured bindings from C++17 (you can break the rule here and look them up ahead)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#stdthread&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;std::thread&lt;/code&gt;&lt;/a&gt; - no more &lt;code&gt;pthreads&lt;/code&gt;!&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#stdref&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;std::ref&lt;/code&gt;&lt;/a&gt; - useful when you want to pass references to other threads&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#variadic-templates&quot; rel=&quot;noreferrer&quot;&gt;variadic templates&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP11.md#forwarding-references&quot; rel=&quot;noreferrer&quot;&gt;forwarding references&lt;/a&gt; - useful when want to preserve move semantics when dealing with templates&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;C++14 &amp;amp; C++17&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;After these basics I would read about the other C++11 related features or moved to C++14 features listed &lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP14.md&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt; (and consult C++11 features list when necessary). Note that C++14 was a nice little amendment to C++11 so there aren't many new (and cool) stuff.&lt;/li&gt;&#xA;&lt;li&gt;C++17 features worth mentioning (very subjective opinion, at this point you should already know what you want/need to know):&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#inline-variables&quot; rel=&quot;noreferrer&quot;&gt;inline variables&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#structured-bindings&quot; rel=&quot;noreferrer&quot;&gt;structured bindings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#constexpr-if&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;if constexpr&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#folding-expressions&quot; rel=&quot;noreferrer&quot;&gt;fold expressions 1&lt;/a&gt; and &lt;a href=&quot;https://en.cppreference.com/w/cpp/language/fold&quot; rel=&quot;noreferrer&quot;&gt;fold expressions 2&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#lambda-capture-this-by-value&quot; rel=&quot;noreferrer&quot;&gt;lambda &lt;code&gt;this&lt;/code&gt; capture changes/updates&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#stdvariant&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;std::variant&lt;/code&gt;&lt;/a&gt; + &lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md#stdoptional&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;std::optional&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;C++20&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP20.md#concepts&quot; rel=&quot;noreferrer&quot;&gt;Concepts&lt;/a&gt; are the new big thing&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP20.md#immediate-functions&quot; rel=&quot;noreferrer&quot;&gt;immediate functions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;IMHO &lt;a href=&quot;https://en.cppreference.com/w/cpp/language/modules&quot; rel=&quot;noreferrer&quot;&gt;modules&lt;/a&gt; will be a dead end as long as C++ will be split into header and implementation fiels (besides Rust have better package/modules concept). But that's just an opinion bouncing in my head.&lt;/li&gt;&#xA;&lt;li&gt;Remaining C++20 and previous version stuff (obviously only a fraction was covered in this post :)).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="9962" LastActivityDate="2021-01-05T15:01:06.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6717" PostTypeId="1" CreationDate="2021-01-05T16:26:52.670" Score="5" ViewCount="277" Body="&lt;p&gt;Has anyone tried live polling during (in-person or remote synchronous) class? I was planning to use Poll Everywhere, but they don't allow for long questions containing code. There's a new service called ItemPool that does allow this, but is missing advanced features like LMS integration, PowerPoint/Keynote/Google Slides integration, etc. Wondering if anyone has experience or advice. Here's a sample question:&lt;/p&gt;&#xA;&lt;p&gt;What is the value of &lt;code&gt;y&lt;/code&gt; after executing the following code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;x = 37&#xA;y = x + 2&#xA;x = 20&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;a. 39&lt;/p&gt;&#xA;&lt;p&gt;b. 22&lt;/p&gt;&#xA;&lt;p&gt;c. 35&lt;/p&gt;&#xA;&lt;p&gt;d. 20&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the great ideas!&lt;/p&gt;&#xA;&lt;p&gt;I've realized my wish list (LMS integration, code formatting, autograding and export, support for mobile devices so I can reuse once we're back in person, free) is unreasonably long.&lt;/p&gt;&#xA;&lt;p&gt;I may give up on tracking participation for a grade - this will allow me to simply post the question on a slide, and collect simple A/B/C/D responses any number of ways: Webex polls, Poll Everywhere (free account), ItemPool (which has code formatting), etc.&lt;/p&gt;&#xA;&lt;p&gt;If the questions live in my slides rather than hardcoded into a specific platform, it should be less work to switch platforms in the future. And I'll have greater control over the look so I can include formatted code, equations, etc.&lt;/p&gt;&#xA;" OwnerUserId="9963" LastEditorUserId="27" LastEditDate="2021-01-07T03:02:35.507" LastActivityDate="2021-01-07T07:42:29.857" Title="Ways to do live polling (aka ConcepTests) during class" Tags="|classroom-infrastructure|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6718" PostTypeId="2" ParentId="6714" CreationDate="2021-01-05T16:44:54.327" Score="1" Body="&lt;p&gt;The first bit is where it is going. An intermediary needs this to forward it. It goes first so that at least in theory it can start forwarding before it has finished receiving. Next is the symmetrical data (where it is from). This is common to most protocols (ethernet mac-addresses, IP addresses, tcp/udp ports, …).&lt;/p&gt;&#xA;&lt;p&gt;Next the two sequence numbers, in the same order as before: to (the sequence number of this segment), from (the sequence number of the last segment that I got from you).&lt;/p&gt;&#xA;&lt;p&gt;Next the length of what remains, you need the length before you can start reading the rest (there is no other way to know where the the end is.&lt;/p&gt;&#xA;&lt;p&gt;Then various flags, the window size and the rest.&lt;/p&gt;&#xA;&lt;p&gt;Of this I only remember the first two (the two addresses). The rest I look up.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-01-05T16:44:54.327" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6719" PostTypeId="1" CreationDate="2021-01-05T17:36:50.123" Score="1" ViewCount="75" Body="&lt;p&gt;In my course we discuss algorithms (greedy, dp, div &amp;amp; conquer, etc.) and efficiency. Do you have any experience with assignments that consider also time of execution as a criterion for grading? Do you use any tools for measuring execution time?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2021-01-05T19:58:01.083" Title="Algorithm Design challenges" Tags="|algorithms|grading|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6720" PostTypeId="2" ParentId="6717" CreationDate="2021-01-05T17:51:48.210" Score="3" Body="&lt;p&gt;My students are all on a Discord server with me, so when it comes time for polling, I hijack the reaction system in Discord to get it done.&lt;/p&gt;&#xA;&lt;p&gt;One nice feature is that it does syntax highlighting for any language that you specify, and you can also install mathjax on your server if you'd like to be able to represent mathematical functions.  Here's a question I polled recently.  The question itself is quite a lot of fun, and is from &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/032133678X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java Puzzlers by Bloch and Gafter&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;**What will this Java code output?**&#xA;&#xA;```java&#xA;public static void main(String[] args){&#xA;   final String pig = &amp;quot;length: 10&amp;quot;;&#xA;   final String dog = &amp;quot;length: &amp;quot; + pig.length();&#xA;   System.out.println(&amp;quot;Animals are equal: &amp;quot; + pig == dog);&#xA;}&#xA;```&#xA;&#xA;React with:&#xA;:one: `Animals are equal: true`&#xA;:two: `Animals are equal: false`&#xA;:three: `false`&#xA;:four: The code will fail on an exception&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This outputs in Discord as:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/bsqFg.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/bsqFg.png&quot; alt=&quot;Discord Polling Image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Students then react with one, two, three, or four.&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;It doesn't allow reactions to be hidden, so if this is an important feature to you, then I would look elsewhere.&lt;/p&gt;&#xA;&lt;p&gt;I've also found it useful for getting a sense of where my students are in an activity when they go to breakout rooms to work in pairs or trios:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/lCHAr.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/lCHAr.png&quot; alt=&quot;Image of polling question with some actual reactions&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is very informal polling, but you can see how useful such information can be during virtual instruction.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;1 - The answer is 3.  Surprised?&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-01-05T21:39:32.073" LastActivityDate="2021-01-05T21:39:32.073" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6721" PostTypeId="2" ParentId="6719" CreationDate="2021-01-05T18:44:29.710" Score="3" Body="&lt;p&gt;Execution time is unreliable due to variations in hardware and, especially, operating systems. Paging and multi-level cache can make such things worthless. That is why theoretical measures are used.&lt;/p&gt;&#xA;&lt;p&gt;The actual execution time depends on the specific implementation of the algorithm, not its structure. Implemented poorly in Java it will run slower than if implemented well in C (and conversely). Paged operating systems, such as Unix and its variants (and others) put an extra load on algorithms at scale. Multi level cache can speed things up but vary between processors.&lt;/p&gt;&#xA;&lt;p&gt;Efficiency of an algorithm is a theoretical concept and so is measured theoretically, perhaps by counting comparisons. This might mean something if you compare two algorithms on the same hardware, but may even be misleading if the implementation causes, for example, page thrashing.&lt;/p&gt;&#xA;&lt;p&gt;In addition, most modern OSs are multiprogrammed and a given program has little control over whether it has complete control over the processor while it executes, or even over a single thread.&lt;/p&gt;&#xA;&lt;p&gt;But most operating systems will have a way to give you the actual running time of the execution of a program. A few thousand executions will give you an accurate picture for that algorithm on that set of inputs, but might vary widely if you double the inputs.&lt;/p&gt;&#xA;&lt;p&gt;See the &lt;a href=&quot;https://www.devopsrun.com/t-how-to-get-current-unix-timestamp-or-epoch-time-from-a-linux-command-line&quot; rel=&quot;nofollow noreferrer&quot;&gt;Linux date command&lt;/a&gt; for example. You can integrate it into a shell script that executes a program a few thousand times and get some averages.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-01-05T18:55:14.177" LastActivityDate="2021-01-05T18:55:14.177" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6722" PostTypeId="2" ParentId="6719" CreationDate="2021-01-05T19:58:01.083" Score="2" Body="&lt;p&gt;To build on what @Buffy said, one way you could go about it in a language like Java is to make them use your own custom data-wrapping objects.  If the algorithm takes &lt;code&gt;int&lt;/code&gt;s, pass in &lt;code&gt;Ent&lt;/code&gt;s instead.  If your algorithm takes doubles, use &lt;code&gt;Dobles&lt;/code&gt; -- the name doesn't matter.&lt;/p&gt;&#xA;&lt;p&gt;The reason to do this is that you can implement &lt;code&gt;Comparable&lt;/code&gt; and override &lt;code&gt;equals(...)&lt;/code&gt; in order to keep track of accurate counts of all comparisons with static variables.  Then you can use reasonable ranges to figure out the run-time of the operation, regardless of the system clock, threading, or the hilarious cat videos running on your computer while you are grading labs.&lt;/p&gt;&#xA;&lt;p&gt;You'd have to explain to the students what you are doing, and mention that extracting the data and simply using it directly for the comparisons would be considered a cheat, and that anyone engaging in such actions would have automatic zeros on the assignment.&lt;/p&gt;&#xA;&lt;p&gt;If I took this route, I would also provide direct sample code that simply demonstrates how to mimic &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;gt;=&lt;/code&gt; functionality with the provided data types.  I would not consider figuring out &lt;em&gt;how&lt;/em&gt; to use my wrappers something that the students should need to do.  The wrappers would be in place purely for the purposes of accurate grading.  They shouldn't, themselves, be part of the puzzle of the assignment.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-05T19:58:01.083" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6723" PostTypeId="2" ParentId="6717" CreationDate="2021-01-05T21:56:38.383" Score="2" Body="&lt;p&gt;I don't want to be seen as endorsing any particular product, and also suggesting something that I myself have not used or tried, but in order to pass on another experience point I might have to do that. You were specifically asking for some experiences from other places.&lt;/p&gt;&#xA;&lt;p&gt;My colleagues speak highly of &lt;strong&gt;Mentimeter&lt;/strong&gt; for this use in live lectures, both in person in the lecture theatre (whether it be hundreds or dozens of students) or what we do now, using online teaching (with MS Teams, as it happens).&lt;/p&gt;&#xA;&lt;p&gt;We also use Discord, but we do not use Discord so much for synchronous teaching communication. I am told the the experience is better with Mentimeter. Personally I'm still a primitive and I collect the  in the Teams chat which does enough for me!&lt;/p&gt;&#xA;&lt;p&gt;But your mileage may vary.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2021-01-05T21:56:38.383" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6725" PostTypeId="2" ParentId="6713" CreationDate="2021-01-06T05:33:21.793" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;What should I cover re Karnaugh maps in my processor course?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Some more context perhaps about logic minimization??&lt;/p&gt;&#xA;&lt;p&gt;To convey the general sense and idea of minimization, karnaugh maps are fine.&lt;/p&gt;&#xA;&lt;p&gt;But pragmatically beyond 4-5 variables they're useless. At which point you begin to need the more program oriented &lt;a href=&quot;https://en.m.wikipedia.org/wiki/Quine%E2%80%93McCluskey_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Quine McCluskey method&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Even that runs out of steam rapidly due to combinatorial explosion — a 32 variable minimization would result in hundreds of billions on min-terms!&lt;/p&gt;&#xA;&lt;p&gt;Leads to&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Espresso_heuristic_logic_minimizer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Espresso&lt;/a&gt; : strictly speaking heuristic not optimization&#xA;though generally found good enough.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Should xor spotting be covered?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.springer.com/gp/book/9781461279242&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra&lt;/a&gt;&#xA;/ &lt;a href=&quot;https://www.springer.com/gp/book/9780387941158&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gries&lt;/a&gt;&#xA;have some zany stuff on an equivalence-centered approach to logic. And equivalence is just the negation of xor.&#xA;That's book length in itself!&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2021-01-06T12:56:18.520" LastActivityDate="2021-01-06T12:56:18.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6726" PostTypeId="2" ParentId="6717" CreationDate="2021-01-07T07:42:29.857" Score="3" Body="&lt;p&gt;I have the same ambition, but also the same problem - there isn't a single tool that fits all my requirements. So I ended up showing the questions as a set of slides (I write these in a markup language) and use Mentimeter for collecting answers - without copying the question and answers into Mentimeter. I use a generic set of &amp;quot;Question 1 - option 1, option 2... Mentimeter slides that I reuse each time I need it, which is most weeks of my semester long course.&lt;/p&gt;&#xA;&lt;p&gt;An advantage of Mentimeter is that it allows you to hide results first, then show the tally of votes, without having to indicate what is the right answer. A disadvantage is that the free account is limited (my institution has provided a license).&lt;/p&gt;&#xA;&lt;p&gt;Alternative platforms are Google Forms (free) and Socrative (freemium model).&lt;/p&gt;&#xA;" OwnerUserId="8315" LastActivityDate="2021-01-07T07:42:29.857" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6727" PostTypeId="1" CreationDate="2021-01-08T13:15:00.197" Score="1" ViewCount="86" Body="&lt;p&gt;Good day,&#xA;I have learnt the basics of C++ and now know how to write simple console applications using codeblocks.&lt;/p&gt;&#xA;&lt;p&gt;I would very much like to create a fully functional application like a calendar or notes app.&lt;/p&gt;&#xA;&lt;p&gt;Can someone help me find resources such as tutorials or textbooks where I can be guided, step by step, to make an app (a very simple one would suffice)?&lt;/p&gt;&#xA;" OwnerUserId="9966" LastEditorUserId="27" LastEditDate="2021-01-08T13:26:07.203" LastActivityDate="2021-01-23T10:49:48.727" Title="Creating a complete application" Tags="|self-learning|resource-request|c++|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6730" PostTypeId="1" AcceptedAnswerId="6738" CreationDate="2021-01-10T13:03:34.293" Score="14" ViewCount="2836" Body="&lt;p&gt;I'm looking for a function or algorithm that requires extensive bit manipulation, but is not complicated in its nature and purpose, so that students remain focused on bit operations.&lt;/p&gt;&#xA;&lt;p&gt;Now I use Win32 API &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;GetVersion()&lt;/a&gt;: it returns system version components encoded in a 32-bit integer. Although deprecated, it's a comprehensive real-world example that requires masking, shifts, and bit testing. Students also learn to figure out needed operations from documentation.&lt;/p&gt;&#xA;&lt;p&gt;However, I'd like to move away from MS-Windows. What an equivalent facility might be? It may even be an external library, if it's free and easy to plug in (we already use libcurl).&lt;/p&gt;&#xA;&lt;p&gt;The language is C++. Students are 1st year, not pure CS (industrial automation).&lt;/p&gt;&#xA;" OwnerUserId="9967" LastEditorUserId="204" LastEditDate="2021-01-16T15:51:28.247" LastActivityDate="2021-01-29T05:37:54.590" Title="Realistic task for teaching bit operations" Tags="|programming|" AnswerCount="13" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6731" PostTypeId="2" ParentId="6730" CreationDate="2021-01-10T13:25:07.890" Score="6" Body="&lt;p&gt;One of my first (Fortran) programs was one to use bit masks to find all prime numbers less than some large number. I my case the maximum was twice the number of bits in the memory locations available to a user program, but a refinement can bypass that by stating a start point.&lt;/p&gt;&#xA;&lt;p&gt;The idea is that in a large array, every bit of every word represents an odd number. A mask is a word that has bits set corresponding to multiples of some prime and a set of masks repeats the sequence of multiples until it repeats. So a set of masks for 17 has every 17th bit set.&lt;/p&gt;&#xA;&lt;p&gt;The set of masks is then applied (bit operations) to the large array of &amp;quot;odds&amp;quot;, leaving only those that are not multiples of that prime. Repeat for the next prime. Create the &amp;quot;mask list&amp;quot; and then apply it to the array.&lt;/p&gt;&#xA;&lt;p&gt;The masks are easier to create than it seems and the whole operation is very fast. I'll let you think about which bit operations should be used.&lt;/p&gt;&#xA;&lt;p&gt;The result is an array consisting of words with only prime number equivalent bits set, which can then be read out for the actual values.&lt;/p&gt;&#xA;&lt;p&gt;The actual execution of this on old (IBM 1130) hardware was pretty dramatic since it is so compute and memory intensive. It was obvious to operators running the machine when my program was executing by just looking at the lights on the front panel of the machine. You will miss that experience, sadly.&lt;/p&gt;&#xA;&lt;p&gt;If you are really innovative, note that it can probably be parallelized.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-01-10T13:25:07.890" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6732" PostTypeId="2" ParentId="6730" CreationDate="2021-01-10T15:10:19.727" Score="8" Body="&lt;p&gt;Possibly prior to Buffy's wonderful answer, if the goal is to help students gain practice and fluency with the basic operations:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Addition and subtraction without using &lt;code&gt;+&lt;/code&gt; and &lt;code&gt;-&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Multiplication by 2s and integer division by the same.&lt;/li&gt;&#xA;&lt;li&gt;The Russian Peasant algorithm for more general multiplication.&lt;/li&gt;&#xA;&lt;li&gt;A string comparison that ignores case (presumably using ascii)&lt;/li&gt;&#xA;&lt;li&gt;If you provide a 7-segment display, they can encode BCD onto the 7-segment display.&lt;/li&gt;&#xA;&lt;li&gt;And finally, in the spirit of &amp;quot;give a man a fire, and he'll be warm for the night, but set a man on fire and he'll be warm for a lifetime&amp;quot; you can have them learn to swap numbers in place without a temporary variable.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-10T15:10:19.727" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6733" PostTypeId="2" ParentId="6730" CreationDate="2021-01-10T16:38:11.867" Score="2" Body="&lt;p&gt;Two assignments that I have used are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;a library for setting/getting bit fields from an integer value.&lt;/li&gt;&#xA;&lt;li&gt;performing floating point addition/subtraction without using floating point types.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The library may be used in the second assignment. Alternatively, the second assignment can be completely standalone. The assignments are in C and are for a course in computer organization. Part of this course involves the LC3 assembly language, so the concept of bit fields comes into play when extracting the opcode and operands from the instruction. This is done when they write a simulator for the LC3 computer. Sometimes the students write an assembler and thus need to produce a &amp;quot;binary&amp;quot; value from the opcode and operands.&lt;/p&gt;&#xA;&lt;p&gt;Both assignments assume that the student has had an introduction to binary/hex numbers. I would be happy to supply all the source materials.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.cs.colostate.edu/%7Efsieker/CurrentSemester/assignments/FIELD/doc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.colostate.edu/~fsieker/CurrentSemester/assignments/FIELD/doc&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.cs.colostate.edu/%7Efsieker/CurrentSemester/assignments/FLOAT.C/doc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.colostate.edu/~fsieker/CurrentSemester/assignments/FLOAT.C/doc&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2021-01-10T16:38:11.867" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6734" PostTypeId="2" ParentId="6730" CreationDate="2021-01-11T02:48:51.197" Score="3" Body="&lt;p&gt;One I've used is an algorithm which solves &lt;a href=&quot;https://en.wikipedia.org/wiki/Latin_square&quot; rel=&quot;nofollow noreferrer&quot;&gt;Latin squares&lt;/a&gt; (the algorithm is easy to extend to Sudoku puzzles). When solving by hand, it's common to keep track of which digits are possible in each cell. Bitmasks can be used analogously in an algorithm, so for example if 1, 3 and 4 are the possible digits in some cell then &lt;code&gt;0b0000011010&lt;/code&gt; represents this set of possibilities (the bits are numbered from least significant to most significant, and the 0th bit is unused because the digit 0 is unused).&lt;/p&gt;&#xA;&lt;p&gt;The students then need to write a few methods to manipulate bitmasks, which will simplify the writing of the rest of the algorithm:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Test if a digit is possible: &lt;code&gt;(mask &amp;amp; (1 &amp;lt;&amp;lt; digit)) != 0&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Remove a digit from a set of possibilities: &lt;code&gt;mask &amp;amp;= ~(1 &amp;lt;&amp;lt; digit)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Initialise a set of possibilities so all &lt;code&gt;n&lt;/code&gt; digits are allowed: &lt;code&gt;((1 &amp;lt;&amp;lt; n) - 1) &amp;lt;&amp;lt; 1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Count how many digits are possible: various ways to do this using bitwise operations in a loop.&lt;/li&gt;&#xA;&lt;li&gt;Get the smallest possible digit from a set of possibilities: various ways.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The &lt;code&gt;|&lt;/code&gt; and &lt;code&gt;^&lt;/code&gt; operations can also be motivated by wanting to add or toggle a digit as a possibility; in my case, the solver algorithm did not require doing either.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2021-01-11T02:48:51.197" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6735" PostTypeId="2" ParentId="6730" CreationDate="2021-01-11T13:28:02.430" Score="27" Body="&lt;p&gt;Maybe a bit too complicated, but fun nevertheless: Teach them about &lt;a href=&quot;https://en.wikipedia.org/wiki/Bitboard&quot; rel=&quot;noreferrer&quot;&gt;bitboards&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Conveniently enough, a chess-board has precisely 64 squares, so a 64-bit integer can store one bit of boolean information per square. Now the whole state of the board (disregarding en-passant and castling for now) can be encoded by having one integer per type of figure and one integer for all white figures.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Want to find the white pawns? use &lt;code&gt;pawn &amp;amp; white&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The black pawns? &lt;code&gt;pawn &amp;amp; !white&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Want to find all occupied squares? &lt;code&gt;all = pawn | rook | knight | bishop | king | queen&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Squares reachable by white pawns in a normal move? &lt;code&gt;(pawn &amp;amp; white) &amp;lt;&amp;lt; 8 &amp;amp; !all&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;In a two square move? &lt;code&gt;(((pawn &amp;amp; white &amp;amp; 0xff00) &amp;lt;&amp;lt; 8 ) &amp;amp; (!all) ) &amp;lt;&amp;lt; 8) &amp;amp; !all&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The possibilities range from trivial to requiring detailed understanding of bit-operations and they are indeed used by real chess engines. If you provide a bit of code to visualize the results, these might also be fun to simply toy around with.&lt;/p&gt;&#xA;" OwnerUserId="9395" LastActivityDate="2021-01-11T13:28:02.430" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6736" PostTypeId="2" ParentId="6730" CreationDate="2021-01-11T15:24:27.910" Score="2" Body="&lt;p&gt;How about graphics?&lt;/p&gt;&#xA;&lt;p&gt;Start out simple with requiring them to do things like &amp;quot;make a bitmask that starts at bit 7 and ends at bit 12&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Use a single-bit image format.  Display the results on the screen in black and white.&lt;/p&gt;&#xA;&lt;p&gt;Now have 3 bitmasks, one for each of RGB.  The library takes the 3 bitmasks and combines them to display it on the screen.&lt;/p&gt;&#xA;&lt;p&gt;Now they have to find the mask for the combined colors -- the ones that have RG (yellow), GB (aqua), RB (fuchsia), and RGB (white) turned on.&lt;/p&gt;&#xA;&lt;p&gt;Now we change the compositing rule.  Things that have any two channels produce the third.  Things that have one channel twice produce black.&lt;/p&gt;&#xA;&lt;p&gt;You can keep doing more stuff.  Shift one the channels 1, or X, pixels left or right.  Stretch one of the channels by a factor of 2, 3, an integer.  Stretch a channel by a rational factor.&lt;/p&gt;&#xA;&lt;p&gt;Apply a texture; given a mask-channel, apply it to a set of other channels that represent a color texture you want to see in that mask-channel.&lt;/p&gt;&#xA;&lt;p&gt;Punch through.  Given a mask-channel, produce a hole in a set of other channels.&lt;/p&gt;&#xA;&lt;p&gt;Horizontal squeeze by 2, 4, 8 16; given a scanline, count how many bits are in each run.  Library displays the result (with anti-aliasing!)&lt;/p&gt;&#xA;&lt;p&gt;Vertical squeeze.  Shuffle two scanlines together so you can feed it to horizontal squeeze and get a vertical one.&lt;/p&gt;&#xA;&lt;p&gt;Zoom out.  Do a 4x vertical and 4x horizontal squeeze to get a 4x zoom out.&lt;/p&gt;&#xA;&lt;p&gt;This can go even further; the occlusion based painting algorithm uses bit operations in place of the usual alpha calculations.  (a 4x4 mask can be represented as a 16 bit value; instead of (both premultiplied color) &lt;code&gt;A' = A0*(1-A1) + A1&lt;/code&gt; and &lt;code&gt;C' = C0*(1-A1) + C1&lt;/code&gt; we get &lt;code&gt;A' = A1|A0&lt;/code&gt; and &lt;code&gt;C' = C1 + BitCount(A0&amp;amp;~A1)*C0/16&lt;/code&gt;, for example.)&lt;/p&gt;&#xA;&lt;p&gt;But the point is, you can (with a library) turn their bit operation work into visible graphics effects, with the students not having to know anything about how the graphics part works.&lt;/p&gt;&#xA;&lt;p&gt;If you write the library well, they can also get to play with fun and strange visual effects.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;pre&gt;&lt;code&gt;using mutable_scanline = std::span&amp;lt;uint32_t&amp;gt;;&#xA;using scanline = std::span&amp;lt;const uint32_t&amp;gt;;&#xA;&#xA;ScanlineDrawing create_drawing();&#xA;// 1 bit per pixel&#xA;void ScanlineDrawing::draw_bw( scanline );&#xA;// 1 bit per channel, 3 bits per pixel&#xA;void ScanlineDrawing::draw_rgb3( scanline );&#xA;// values only go up to 2^(bits_per_pixel-1).&#xA;void ScanlineDrawing::draw_greyscale( scanline, int bits_per_pixel );&#xA;void ScanlineDrawing::draw_rgb_x( scanline, int bits_per_pixel );&#xA;&#xA;void ScanlineDrawing::display();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;there is our basic library.&lt;/p&gt;&#xA;&lt;p&gt;We also get a test harness that provides you with scanlines to process.&lt;/p&gt;&#xA;&lt;p&gt;Functions to write:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void fill( mutable_scanline, int start, int length );&#xA;&#xA;// take 3 bw channels and make a single rgb3 one.&#xA;std::vector&amp;lt;uint32_t&amp;gt; make_rgb3( scanline, scanline, scanline );&#xA;&#xA;// Overwrites [start, start+length) bits in dst with bits from src.&#xA;// all bits must be within dst's range, or no guarantees&#xA;void blit( scanline src, mutable_scanline dst, int start, int length );&#xA;&#xA;// moves values amount right (or left if negative).&#xA;// Fills blanks with 0s.&#xA;void shift( mutable_scanline, int amount );&#xA;&#xA;// moves values amount right (or left if negative).  Stuff falling off&#xA;// edge shows up on other side&#xA;void rotate( mutable_scanline, int amount );&#xA;&#xA;// scale the scanline down.  Tail should be 0s&#xA;void scale_by_2( mutable_scanline );&#xA;&#xA;// scale the scanline down.  Tail should be 0s&#xA;void scale_by_4( mutable_scanline );&#xA;&#xA;// scale the scanline down.  Tail should be 0s&#xA;void scale_by_16( mutable_scanline );&#xA;&#xA;// take any number of channels, and interlace them 1 bit at a time&#xA;std::vector&amp;lt;uint32_t&amp;gt; interlace( std::span&amp;lt;const scanline&amp;gt; );&#xA;&#xA;// take any number of channels, and interlace them width bits at a time&#xA;std::vector&amp;lt;uint32_t&amp;gt; interlace( std::span&amp;lt;const scanline&amp;gt;, int width );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;build some test harnesses to use the above and they'll be able to do most of what I described above.&lt;/p&gt;&#xA;&lt;p&gt;Calls &lt;code&gt;fill&lt;/code&gt; (which students write)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void make_square( std::span&amp;lt;mutable_scanline&amp;gt;, int x, int y, int size );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Calls shift or rotate:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void do_pan( std::span&amp;lt;mutable_scanline&amp;gt;, int dx, int dy, bool bWrap=false );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Copies src multiple times over dst -- calls blit and shift.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void tile( std::span&amp;lt;scanline const&amp;gt; src, std::span&amp;lt;mutable_scanline&amp;gt; dst, int offsetx, int offsety );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Instead, calls blit and rotate:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void tile2( std::span&amp;lt;scanline const&amp;gt; src, std::span&amp;lt;mutable_scanline&amp;gt; dst, int offsetx, int offsety );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;// zooms by a factor of 2 or 4.  Uses &lt;code&gt;interlace(scan, width)&lt;/code&gt; and &lt;code&gt;scale_by_4&lt;/code&gt; or &lt;code&gt;scale_by_16&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void zoom_x2( std::span&amp;lt;mutable_scanline&amp;gt; )&#xA;void zoom_x4( std::span&amp;lt;mutable_scanline&amp;gt; )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Here we have relatively simple tasks in a real framework that does real things on the real screen.&lt;/p&gt;&#xA;&lt;p&gt;You expose the new programmer to &amp;quot;real programs&amp;quot; they can read over, and mimic the style of.&lt;/p&gt;&#xA;&lt;p&gt;You can have bonus assignments like &amp;quot;make a pretty drawing using a custom-written function&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;You can convert real pictures into this format; the anti-aliasing zoom trick lets you get up to 4 bits of color in each channel, which is enough to have a real color picture show up.  The bit-operations applied to 15 bits per pixel channels still works, you just have to pan by multiples of 15 horizontally.  So you could even get a successful program to generate a little animation.  ;)&lt;/p&gt;&#xA;" OwnerUserId="978" LastEditorUserId="978" LastEditDate="2021-01-11T19:54:12.817" LastActivityDate="2021-01-11T19:54:12.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6737" PostTypeId="2" ParentId="6730" CreationDate="2021-01-11T18:19:15.533" Score="4" Body="&lt;p&gt;Here's a few ideas for things that a student might conceivably end up working with.  Some of these are a bit more advanced than your basic example of decoding a byte-packed list of numbers from an API.  The more advanced ones are also somewhat skewed towards cryptography, both because it's a field I'm familiar with and because cryptographic algorithms tend to make heavy use of bit manipulation.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;As a simple basic exercise, why not just implement &lt;strong&gt;a basic &lt;a href=&quot;http://www.cplusplus.com/reference/bitset/bitset/&quot; rel=&quot;nofollow noreferrer&quot;&gt;bitset&lt;/a&gt;-like class&lt;/strong&gt;?  Start with a fixed number of, say, 32 or 64 bits (so that they can be comfortably stored in a single integer) and just provide operations for setting, clearing and testing individual bits.  Then move on to more complex set operations like taking the union or intersection of two bitsets and testing whether two bitsets have any set bits in common or whether one bitset is a subset of another.  And finally extend the class to allow an arbitrary number of bits.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Implement a &lt;a href=&quot;https://en.wikipedia.org/wiki/Bloom_filter&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Bloom filter&lt;/strong&gt;&lt;/a&gt;.  The bit operations needed are similar to &lt;a href=&quot;https://cseducators.stackexchange.com/a/6731&quot;&gt;Buffy's prime number sieve example&lt;/a&gt;, i.e. setting and examining individual bits in an array (and could be easily implemented using the bitset class from the first exercise above, if you choose to start with it), but unlike finding (relatively small) prime numbers, Bloom filters are actually useful as more than just a learning exercise.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Implement a &lt;a href=&quot;https://en.wikipedia.org/wiki/Linear-feedback_shift_register&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;linear feedback shift register&lt;/strong&gt;&lt;/a&gt;, and use it to &lt;a href=&quot;https://en.wikipedia.org/wiki/Computation_of_cyclic_redundancy_checks&quot; rel=&quot;nofollow noreferrer&quot;&gt;calculate a cyclic redundancy checksum&lt;/a&gt;.  CRCs are everywhere in industry, and knowing how they work is certainly useful.  And LFSRs have plenty of &lt;a href=&quot;https://en.wikipedia.org/wiki/Linear-feedback_shift_register#Applications&quot; rel=&quot;nofollow noreferrer&quot;&gt;other uses&lt;/a&gt; as well.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As an extension of the above, implement a &lt;a href=&quot;https://en.wikipedia.org/wiki/Stream_cipher&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;stream cipher&lt;/strong&gt;&lt;/a&gt; based on a &lt;em&gt;non&lt;/em&gt;-linear feedback shift register.  One possibly interesting advanced exercise, off the top of my head, could be to give the students a naïve (one bit per iteration) reference implementation of &lt;a href=&quot;https://en.wikipedia.org/wiki/Trivium_(cipher)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Trivium&lt;/a&gt; and ask them to make it faster.  (The algorithm is designed so that up to 64 bits can be generated per iteration by using bitwise operations on 64-bit words.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Introduce your students to &lt;a href=&quot;https://crypto.stackexchange.com/questions/2700/galois-fields-in-cryptography/2718#2718&quot;&gt;Galois fields&lt;/a&gt; and have them implement &lt;a href=&quot;https://en.wikipedia.org/wiki/Finite_field_arithmetic&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;arithmetic operations in GF(2&lt;sup&gt;&lt;em&gt;n&lt;/em&gt;&lt;/sup&gt;)&lt;/strong&gt;&lt;/a&gt; for some number of bits &lt;em&gt;n&lt;/em&gt;.  Addition is trivial — it's just bitwise XOR.  For multiplication, you have a bunch of options: carryless multiply and then reduce, Russian peasant multiplication, multiplication via discrete logarithms, etc.  You may also want to &lt;a href=&quot;https://crypto.stackexchange.com/questions/12956/multiplicative-inverse-in-operatornamegf28/12962#12962&quot;&gt;compute the multiplicative inverse&lt;/a&gt;; this can be done using a variant of Euclid's algorithm, or again via discrete logarithms.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once you have an implementation of the multiplicative inverse in GF(2&lt;sup&gt;8&lt;/sup&gt;), use it to implement the &lt;a href=&quot;https://en.wikipedia.org/wiki/Rijndael_S-box&quot; rel=&quot;nofollow noreferrer&quot;&gt;AES S-box&lt;/a&gt;, and then actual &lt;a href=&quot;https://en.wikipedia.org/wiki/Advanced_Encryption_Standard&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;AES encryption&lt;/strong&gt;&lt;/a&gt;.  As a learning exercise, I'd suggest splitting this into multiple parts: first implement each of the component operations (SubBytes, ShiftRows and MixColumns; each features different kinds of bit manipulation) independently, then combine them into the full round function (together with AddRoundKey, which is just a bitwise XOR), then implement the &lt;a href=&quot;https://en.wikipedia.org/wiki/AES_key_schedule&quot; rel=&quot;nofollow noreferrer&quot;&gt;key schedule&lt;/a&gt; and finally put it all together.  (You may also want to have a brief side discussion of &lt;a href=&quot;https://crypto.stackexchange.com/questions/20228/consequences-of-aes-without-any-one-of-its-operations&quot;&gt;why each of the components is necessary&lt;/a&gt;.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;As an alternative to all this crypto stuff, implement an interpreter for some simple bytecode or assembly-like language, such as (a subset of) the &amp;quot;&lt;a href=&quot;http://vyznev.net/corewar/guide.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Redcode&lt;/a&gt;&amp;quot; language used in &lt;a href=&quot;https://en.wikipedia.org/wiki/Core_War&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Core War&lt;/strong&gt;&lt;/a&gt;.  While this &lt;em&gt;can&lt;/em&gt; be done using few if any bit operations using a naïve representation of the instructions, for efficiency (and pedagogy) it's a good idea to pack the opcode, modifiers and addressing modes of each instruction into a single integer.  (16 bits will just suffice for ICWS'94 Redcode, if you leave out the LDP and STP instructions.) Decoding this then provides a nice example of practical bit manipulation, somewhat similar to your Windows version number decoding example.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Also, in general, as soon as your students have a bit of familiarity with bit manipulation, I'd suggest going through some lists of &lt;a href=&quot;https://graphics.stanford.edu/%7Eseander/bithacks.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;bit twiddling hacks&lt;/strong&gt;&lt;/a&gt; and introducing your students to some useful tricks that can be done with just a few bit operations, such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://graphics.stanford.edu/%7Eseander/bithacks.html#ModulusDivisionEasy&quot; rel=&quot;nofollow noreferrer&quot;&gt;calculating the remainder modulo a power of 2&lt;/a&gt;,&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://graphics.stanford.edu/%7Eseander/bithacks.html#DetermineIfPowerOf2&quot; rel=&quot;nofollow noreferrer&quot;&gt;checking whether an integer is a power of 2&lt;/a&gt;, or&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/22081738/how-does-this-algorithm-to-count-the-number-of-set-bits-in-a-32-bit-integer-work&quot;&gt;counting the number of 1 bits in an integer&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(The last one might also be useful as part of the bitset exercise, for implementing a set size operation.)&lt;/p&gt;&#xA;" OwnerUserId="1439" LastActivityDate="2021-01-11T18:19:15.533" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6738" PostTypeId="2" ParentId="6730" CreationDate="2021-01-11T20:35:07.913" Score="3" Body="&lt;p&gt;&lt;strong&gt;varints&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Implement encoding and decoding something like &lt;a href=&quot;https://developers.google.com/protocol-buffers/docs/encoding#varints&quot; rel=&quot;nofollow noreferrer&quot;&gt;Protobuf's varint&lt;/a&gt;, perhaps without using negative numbers. Quoting:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Each byte in a varint, except the last byte, has the most significant bit (msb) set – this indicates that there are further bytes to come. The lower 7 bits of each byte are used to store the two's complement representation of the number in groups of 7 bits, least significant group first.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So to decode you need to go through a byte string and:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Take the 7 LSBs&lt;/li&gt;&#xA;&lt;li&gt;Shift those 7 LSBs into the output variable&lt;/li&gt;&#xA;&lt;li&gt;Check the MSB and continue or break&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;GPIO/hardware&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also, as mentioned in comments, hardware does usually require bit manipulation when writing drivers to interface with control registers (I have seen the reply stating it's not viable, just mention this for completeness). This is most prominent in GPIOs, where you can for example have one 32 bit register splits as 16 two-bit fields, one per GPIO.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;BCD&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Just remembered, there's another use case &lt;em&gt;very&lt;/em&gt; common in electronics which you actually &lt;em&gt;can&lt;/em&gt; do with pure software: &lt;a href=&quot;https://en.wikipedia.org/wiki/Binary-coded_decimal&quot; rel=&quot;nofollow noreferrer&quot;&gt;Binary-coded decimal&lt;/a&gt;. The simplest version, which Wikipedia calls &lt;em&gt;Natural BCD&lt;/em&gt; encodes two decimal digits as two separate 4-bit values in a single byte. This type of coding was used with 7-segment displays and to this very day is quite common in real-time clock ICs.&lt;/p&gt;&#xA;" OwnerUserId="9976" LastEditorUserId="9976" LastEditDate="2021-01-12T01:26:05.607" LastActivityDate="2021-01-12T01:26:05.607" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6739" PostTypeId="2" ParentId="6670" CreationDate="2021-01-11T20:52:07.597" Score="1" Body="&lt;p&gt;I think it was in some Python tutorial I read ages ago, but at the very beginning, in bold, there was a statement (paraphrasing from memory):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Whatever you do, &lt;strong&gt;do not copy the code&lt;/strong&gt;. Copying code stops you from learning, from remembering. Rewrite it. Paraphrase it. Do not copy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Perhaps the student who copied that code id not know of this principle? Personally it was quite late when I read that and came to this realization. Earlier I'd just read tutorials and copy-paste the snippets since I've read and understood them anyway.&lt;/p&gt;&#xA;" OwnerUserId="9976" LastActivityDate="2021-01-11T20:52:07.597" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6740" PostTypeId="2" ParentId="6730" CreationDate="2021-01-12T00:33:29.547" Score="0" Body="&lt;p&gt;Create a class that acts somewhat like an array of small numbers, but is, in fact, entirely encoded in an unsigned 32 bit number.  Say, encode six numbers between 0 and 31 into 32 bits (aligning on an oddball bit-number (5 in this case) makes it likely that they will not find any samples on-line that they can copy directly).&lt;/p&gt;&#xA;&lt;p&gt;They have to be able to set a value at an index, get a value at an index, and maybe enumerate the entire collection.&lt;/p&gt;&#xA;&lt;p&gt;You could also randomly change the bit alignments in order to reduce copying (though I would skip 4, 8 and 16).&lt;/p&gt;&#xA;" OwnerUserId="9979" LastActivityDate="2021-01-12T00:33:29.547" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6741" PostTypeId="2" ParentId="473" CreationDate="2021-01-12T03:42:21.377" Score="0" Body="&lt;p&gt;It has been a long time since this question was asked, but in the meantime, we have begun to incorporate something rather kanban-ish into our senior year capstone course at my school.&lt;/p&gt;&#xA;&lt;p&gt;We did a large-scale curriculum review with industry engineers, students, teachers, guidance counselors, and college professors, and we decided to integrate agile into our senior year capstone projects.&lt;/p&gt;&#xA;&lt;p&gt;Many of the answers here seem to reflect upon whether you should do this at all, but since we are actually doing it, I thought it might be worthwhile to explain what we have done and why.&lt;/p&gt;&#xA;&lt;h1&gt;What we are doing&lt;/h1&gt;&#xA;&lt;p&gt;Our projects are roughly five months long, and typically involve working with an outside client.  We are using &lt;a href=&quot;http://www.trello.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;trello boards&lt;/a&gt; with roughly the following setup (student initials have been blacked out):&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/qHGci.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/qHGci.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sprint meetings with our student groups are roughly once every two weeks.  Students place there goals for the next week in &amp;quot;To Do&amp;quot; and create a card color for the week.  By the end of the sprint, the goal is to have all of those cards in &amp;quot;Testing&amp;quot; (or in &amp;quot;Blocked&amp;quot;) and to have a new batch of cards (in a new color) in &amp;quot;To Do&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;At that point, we have a weekly meeting to talk over their progress, look at the project and the code, check in on their communications with the client, negotiate the next set of goals (or the next date), and award grades for the sprint.&lt;/p&gt;&#xA;&lt;h1&gt;Goals&lt;/h1&gt;&#xA;&lt;p&gt;The process helps keep things moving in the classroom during such a large-scale project, and familiarizes the students with some industrial practice.  It was nevertheless important to us that the process itself remain simple and low-overhead enough as to not step in the way of the work itself.&lt;/p&gt;&#xA;&lt;p&gt;We are not far into the projects yet, but so far, things appear to be going well, and students have expressed that the process has remained helpful.  If the students begin to report that it is not helping, then we will revisit the requirements and make modifications as needed.  &lt;em&gt;At the end of the day, we are transplanting an industrial process into the classroom.  The translation does not have to be exact to be in the spirit of the original, and if it must be modified in order to function in this environment, then that must be okay.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, it must be of use within the projects that the students have in front of them, or it will feel like a chore instead of a helpful organizing process.  That is (and must be!) the final arbiter of how to organize an agile process in the classroom.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-12T03:42:21.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6742" PostTypeId="2" ParentId="6730" CreationDate="2021-01-12T10:18:01.693" Score="2" Body="&lt;p&gt;This is not a single function/algorithm, but emulator development heavily relies on bit manipulation. One interesting task for students could be to implement the opcode parsing for the Chip-8 . This means, provided a framework that implements the device abstraction (memory, registers), sound, and graphics, the only remaining task is to parse the opcodes and write the correct data into the registers (which are represented by variables).&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/akowald/CHIP-8/blob/master/chip8.cpp#L538&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a Github project of a Chip-8 emulator where the massive if/else branch handles each opcode. An opcode table can be found on &lt;a href=&quot;https://en.wikipedia.org/wiki/CHIP-8#Opcode_table&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I think this is a great exercise, because most of the work is messing with bits and simply writing data into a variable (which represents a register). The task can be broken down into many small units (each opcode/groups of opcodes). After successful implementation, the students have a working emulator and can play pong or other games, which can be a very rewarding feeling. This task gives the students a first look at hardware architecture (what is a register, instruction pointer, and memory) without the complexity of modern CPUs. Lastly, the Chip-8 is very small and more advanced students can peek around the source code and with some guidance or documentation might be able to understand it fully.&lt;/p&gt;&#xA;&lt;p&gt;A drawback is that there are many implementations on Github and it is easy to cheat and look it up. A bigger hurdle is that it requires quite a lot (depending on systems programming knowledge) of initial work from the teacher to implement the framework. As this is a graphics application, it might take some time until it works on every students computer if they use a mix of operating systems and versions.&lt;/p&gt;&#xA;" OwnerUserId="9980" LastActivityDate="2021-01-12T10:18:01.693" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6743" PostTypeId="2" ParentId="6730" CreationDate="2021-01-12T21:17:45.540" Score="4" Body="&lt;p&gt;Reading and editing the files created by Minecraft requires a fair bit of bit manipulation, and would likely grab the attention of at least some of your students. The bittiest part is that, for a chunk with K different kinds of blocks, the blocks themselves are stored as a dense array of log(K) bit numbers. The Minecraft wiki has an excellent description of the file format, which is another advantage of this task- good documentation makes for fast learning.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://minecraft.gamepedia.com/Chunk_format&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://minecraft.gamepedia.com/Chunk_format&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3246" LastActivityDate="2021-01-12T21:17:45.540" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6745" PostTypeId="2" ParentId="6730" CreationDate="2021-01-13T19:55:48.320" Score="2" Body="&lt;p&gt;What may be the very best algorithm for demonstrating the value of bit shifts is &lt;em&gt;division!&lt;/em&gt; Everyone learning CS should have very solid intuitions around division, and &lt;em&gt;trying to divide two numbers using only addition, subtraction, bit shifts and comparison&lt;/em&gt; is a wonderful demonstration of the power of bit shifting.&lt;/p&gt;&#xA;&lt;p&gt;I would go through two steps (levels of enlightenment, if you will):&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Division using repeated subtraction&lt;/strong&gt; of the divisor from the dividend. Easy enough to understand, but gets inefficient with big numbers, as it scales with O(n)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Division using repeated subtraction of powers of two&lt;/strong&gt; of the divisor from the dividend. Easy to show how it works (and why it's so efficient) by demonstrating counting by 2 divisors, and then 4 divisors, and then 8 divisors, and then generalizing to powers of two. Scales with O(log(n))&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;It's a great problem for 3 reasons:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;No explanation of the problem needed&lt;/strong&gt;: Everyone already knows what division is, and has a solid understanding of how it works&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The inefficient, non-bit-shifty solution is easy&lt;/strong&gt;: Most students should be able to figure out Step 1 above on their own given enough time. I would give them 5 minutes or so to think hoping someone in the room stumbles on it before introducing that solution&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;There are multiple variants of the bit-shifty solution&lt;/strong&gt;: For those who struggle to grasp the first variant of the bit-shifty solution, &lt;a href=&quot;https://leetcode.com/problems/divide-two-integers&quot; rel=&quot;nofollow noreferrer&quot;&gt;there are several alternatives&lt;/a&gt; that are fairly easy to recognize as mathematically equivalent, so try the above solution for everyone, and then try additional solutions for those few for whom the above doesn't click, and within a few minutes everyone is on the same page. If you can't see the solutions on LeetCode, look up division by two with bit shifting, there are several ways of making it work&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="9989" LastActivityDate="2021-01-13T19:55:48.320" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6746" PostTypeId="2" ParentId="5176" CreationDate="2021-01-14T23:04:40.007" Score="0" Body="&lt;p&gt;I've used Garlikov's Socratic approach to teaching binary in the classroom to rave reviews:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.garlikov.com/Soc_Meth.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.garlikov.com/Soc_Meth.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I think not just the format but also the particular questions he asks and how he frames the discussion make his use of this technique effective.&lt;/p&gt;&#xA;" OwnerUserId="4919" LastEditorUserId="4919" LastEditDate="2021-01-17T12:36:45.830" LastActivityDate="2021-01-17T12:36:45.830" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6749" PostTypeId="1" AcceptedAnswerId="6752" CreationDate="2021-01-16T16:51:05.973" Score="0" ViewCount="140" Body="&lt;p&gt;Not because one would want to take on two tasks, but so that if one project is  already filled/assigned,they could be assigned another one,instead of  being turned down from  the organization&lt;/p&gt;&#xA;&lt;p&gt;I have seen answers about the number of organizations one can  apply to,but not the number of projects per organization&lt;/p&gt;&#xA;&lt;p&gt;I am in my first year and completely new to &lt;a href=&quot;https://en.wikipedia.org/wiki/Google_Summer_of_Code&quot; rel=&quot;nofollow noreferrer&quot;&gt;GSoC&lt;/a&gt; (google summer of code) and have just about begun exploring..&lt;/p&gt;&#xA;" OwnerUserId="9999" LastEditorUserId="204" LastEditDate="2021-01-20T10:33:54.013" LastActivityDate="2021-01-20T10:33:54.013" Title="How many projects(within the same organisation) can one apply for in GSoC (google summer of code)?" Tags="|programming|project|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6750" PostTypeId="1" CreationDate="2021-01-16T17:21:59.337" Score="7" ViewCount="1059" Body="&lt;p&gt;Due to the Corona crisis I was forced in to a temporary career switch. Currently I am working as a sort of &amp;quot;supervisor&amp;quot; for students in a controlled environment where they do projects provide from companies. So they get some practical work experience while not directly working at a company (Seeing most companies don't accept interns due to the corona crisis).&lt;/p&gt;&#xA;&lt;p&gt;My issue however is that the students (in my opinion) are nowhere near the level they are supposed to be. They are in their second year of college(software engineering), yet barely have complete understanding of the basics. This is partially due to classes falling out due to the Corona crisis, but also in my eyes because their program is slow paced and wrongly focused (Nearly the entire year is dedicated towards HTML/CSS, they barely touched PHP/JavaScript/Databases and had nothing in terms of documentation).&lt;/p&gt;&#xA;&lt;p&gt;This forces me to spend more time doing lectures and teaching them what they were supposed to learn then actually doing my so called &amp;quot;supervisor&amp;quot; duties of managing the projects. To help them increase their level of knowledge I started making my own little assignments for them to practice with and referring online tutorials to them but, I can not force them to do them so a large chunk just ignores it.&lt;/p&gt;&#xA;&lt;p&gt;Seeing I am doing a good-job I will also be doing extra groups as of February and will be giving actual lectures besides my supervisor role.&lt;/p&gt;&#xA;&lt;p&gt;This is my first &amp;quot;teaching&amp;quot; job and I am wondering how I can advise the school to make changes in their curriculum without sounding like a know it all/arrogant. Seeing the students have shown to me that with the right structure they are more then able to grasp the material but the schools pace and prioritization of the materials is to slow/focused on the wrong things. As a result the students literally telling me that they don't see the &amp;quot;urgency&amp;quot; of doing their work seeing the got way to much time to do it and it's boring due to the ease of it.&lt;/p&gt;&#xA;" OwnerUserId="8867" LastEditorUserId="660" LastEditDate="2021-01-26T06:42:26.400" LastActivityDate="2021-01-26T06:42:26.400" Title="How to advise change in a curriculum as a new teacher" Tags="|curriculum-design|" AnswerCount="5" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6751" PostTypeId="2" ParentId="6750" CreationDate="2021-01-16T19:42:00.450" Score="3" Body="&lt;p&gt;My advice and experience isn't happy here. If this is a temporary position that you don't expect to hold, then it won't matter much, however. And note my caveat after the break below.&lt;/p&gt;&#xA;&lt;p&gt;The only thing you can really do is point out the deficiencies. What competencies would be required of these students for the task at hand and statements that they are poorly prepared. How to deal with that would be up to the more formal faculty with curriculum experience. They might decide that no changes are needed and that the students will have what they need at the proper time.&lt;/p&gt;&#xA;&lt;p&gt;But the unhappy part is that they won't be happy with you and will resist what you say. Well, maybe that is too strong, but they won't gladly hear your concerns. I've tried to do a similar thing when I held a permanent (TT) position and learned that &amp;quot;we have our ways of doing things and they are fine, so shut-up&amp;quot;. If you can accept that as a possibility, then go ahead and say what needs to be said. Otherwise, bite your tongue, carry on, and find something easier to do.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;It sounds like their educational program is focused on web development and nothing further. That might be fine for them, but not for you. Perhaps there is just a mismatch between that and what the current projects require. So, another option would be to use more &amp;quot;webby&amp;quot; sorts of projects than general application development.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-01-16T19:42:00.450" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6752" PostTypeId="2" ParentId="6749" CreationDate="2021-01-16T19:47:44.610" Score="0" Body="&lt;p&gt;For the &lt;a href=&quot;https://en.wikipedia.org/wiki/Google_Summer_of_Code&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Summer of Code&lt;/a&gt; I would interpret their student advice &lt;a href=&quot;https://developers.google.com/open-source/gsoc/faq&quot; rel=&quot;nofollow noreferrer&quot;&gt;from the FAQ&lt;/a&gt; to imply that you can apply to as many &lt;em&gt;projects&lt;/em&gt; as you like, but can only be accepted in one. It doesn't seem to be the number of organizations, but the number of projects.&lt;/p&gt;&#xA;&lt;p&gt;Caveat. I don't make the rules. But given that Google is pretty experienced in such things, I'd guess that if you apply to more than you should, that the system will kick out the extras.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-01-16T19:59:20.913" LastActivityDate="2021-01-16T19:59:20.913" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6753" PostTypeId="2" ParentId="6750" CreationDate="2021-01-16T20:14:53.030" Score="7" Body="&lt;p&gt;You might not like this answer, but I would be cautious. There could be many reasons why their curriculum is laid out in the way that is.&lt;/p&gt;&#xA;&lt;p&gt;They might be dealing with students of more varied abilities at the start than you think. They might have later coursework that depends upon mastery of the current coursework. They might only have it in place for historical reasons.  This current curriculum may well be in place because of certain problems with another approach that they took in the past.  Or, they may feel that the mission of their program is somewhat different than you think it is.  (This last is almost a given, actually.)&lt;/p&gt;&#xA;&lt;p&gt;Therefore, the first order of business is, at least for a while, to do more listening than speaking.&lt;/p&gt;&#xA;&lt;p&gt;Now, as for what you can do: at least in the US, many institutions that teach to the ages you mention have periodic curriculum reviews. Sometimes these committees can even involve outside representatives from industry.  You could express your interest in serving on such a committee if your institution engages in this practice.&lt;/p&gt;&#xA;&lt;p&gt;Beyond that, you can certainly share your observations.  &lt;em&gt;Most&lt;/em&gt; people (though certainly not all) would be willing to engage in such a discussion with someone who is not pushy or overly-opinionated.  And, in such a conversation, you may well find that there is openness to change!  What I would stress, however, is that you should &lt;em&gt;also&lt;/em&gt; remain open to the idea that things are in place for reasons that you simply don't know, and they might not ultimately choose to change the structure.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-16T20:14:53.030" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6754" PostTypeId="2" ParentId="6750" CreationDate="2021-01-16T20:51:42.830" Score="2" Body="&lt;p&gt;In thinking about the caveat at the end of my &lt;a href=&quot;https://cseducators.stackexchange.com/a/6751/1293&quot;&gt;other answer&lt;/a&gt; here I have a different tack you might take to make your life better.&lt;/p&gt;&#xA;&lt;p&gt;Rather than trying to mold the students to things that the current projects require and that they will probably learn in the future, why not mold the projects to what the students already know? Life would be easier, though the results less useful to you. But reinforcing what they have learned would be very useful to them, I think (actually, I know).&lt;/p&gt;&#xA;&lt;p&gt;This answer was also partly influenced by another &lt;a href=&quot;https://cseducators.stackexchange.com/q/6749/1293&quot;&gt;recent question&lt;/a&gt; here on the Google Summer of Code. Students, there, build projects with the help of some organization, but the organization makes no commitment to use any of the results. It is purely an attempt to expand student horizons. They have enough different kinds of projects that your issue doesn't arise, and students can match themselves to projects for which the feel competent.&lt;/p&gt;&#xA;&lt;p&gt;You might explore that option with the companies you work with.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-01-16T20:51:42.830" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6755" PostTypeId="2" ParentId="6750" CreationDate="2021-01-17T01:45:44.010" Score="2" Body="&lt;p&gt;I would second the recommendation to be cautious.  &amp;quot;Newbies&amp;quot;, no matter what the field, tend to have more energy, more enthusiasm, and less knowledge of the specific context for curricular decisions and the players and issues involved.  It is difficult for people with a strong point of view to present it without sounding arrogant or blinded to other factors that may be even more important to the faculty.  Listen more, link in to the &amp;quot;interpersonal skills&amp;quot; site cited above, and try to understand why they are doing it in this way.  It may be that your additions may be valuable for a subset of students, but not all.  Be open to different possibilities.&lt;/p&gt;&#xA;" OwnerUserId="10000" LastActivityDate="2021-01-17T01:45:44.010" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6756" PostTypeId="2" ParentId="6713" CreationDate="2021-01-17T14:22:43.273" Score="2" Body="&lt;p&gt;I am teaching part of a Maths module that includes boolean logic- the assessment included creating digital circuits, labelling each point to derive the final expression, applying boolean logic (De Morgens etc) to the expression to minimise the term (which is by far the most difficult part for learners), creating the truth table, SOP and POS, creating the K-Map and deriving the expressions, and creating the minified circuit.&lt;/p&gt;&#xA;&lt;p&gt;After explaining the logic of each of the gates, they build some circuits using an emulator of sorts. As it happens two of the circuits are equivalent, and they result in an XOR function.  Learning point 1- XOR is useful as it can replace a bunch of other gates.&lt;/p&gt;&#xA;&lt;p&gt;As an aside, XOR could be used to rebuild a drive bit level&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;HD1: 0110&#xA;HD2: 1100&#xA;HD3: 1010 (HD1 Xor HD2)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;so if any one drive is destroyed, the data can be rebuilt- e.g. HD2 gets fried- rebuild new drive H4&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;HD1: 0110&#xA;HD3: 1010 &#xA;HD4: 1100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It's an interesting and pretty cool application of XOR.&lt;/p&gt;&#xA;&lt;p&gt;In practise XOR can yield some nice circuit reduction but learners do tend to find it difficult using XOR in minimising.&lt;/p&gt;&#xA;&lt;p&gt;In terms of the importance if minimising, I look at the reduction in complexity and the real-life reduction in cost- number of gates and thus the number of chips, board space and layout time.&lt;/p&gt;&#xA;&lt;p&gt;Here is a completed labelled circ from a previous assignment completed in &lt;a href=&quot;https://sourceforge.net/projects/circuit/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logisim&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/intq6.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/intq6.png&quot; alt=&quot;Sample circuit&quot; /&gt;&lt;/a&gt;&#xA;Now, this can be reduced to 2 NOT gates and one OR. I should 'warn' that Logisim can generate the minified (SOP or POS) term, the K-Map and terms and generate circuits as well- which might be more than you want it to do.  At worst you could use it for creating some useful examples.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/8zwC9.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/8zwC9.jpg&quot; alt=&quot;Space Invaders PCB, 1970s&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here's a board from the 1970s. It's hard to make out any gates but there is a 74LD274 (3-input NOR gates) on there- hard to read. Given that the hardware &amp;quot;is&amp;quot; the software to a large degree here, the importance of reducing complexity and chip count was important. As already pointed out- it's not as important these days, but application of logical thought is just as important in software design.  An appreciation of the complexity implemented in hardware design is important, I think.&lt;/p&gt;&#xA;&lt;p&gt;I hope this might help with linking these elements together with K-Maps, since I suspect that you also cover these other topics.  As to how much focus you place on each part, you'll have to decide how much importance you place on each.  I think the outline of sub-topics is pretty good.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2021-01-17T14:22:43.273" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6757" PostTypeId="2" ParentId="6750" CreationDate="2021-01-17T21:12:44.457" Score="1" Body="&lt;p&gt;I would strongly warn against saying anything.&lt;/p&gt;&#xA;&lt;p&gt;You could ask questions to find out why things are like they are.&#xA;You could note that you dont think your students are where they should be.&#xA;You could question whether y'all need to make changes to be more effective with the covid style of learning now used.&lt;/p&gt;&#xA;&lt;p&gt;If you could prove that you have ideas that would work then you could cautiously ask about doing those.  But in the OP I see your OPINION more than I see any facts that things must be changed&lt;/p&gt;&#xA;" OwnerUserId="10002" LastActivityDate="2021-01-17T21:12:44.457" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6758" PostTypeId="1" CreationDate="2021-01-19T08:29:13.927" Score="6" ViewCount="245" Body="&lt;p&gt;Reading this question &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/344522/do-we-really-need-oo-languages-to-manage-software-complexity&quot;&gt;Do we really need OO languages to manage software complexity?&lt;/a&gt; on one of SE sites and my own experiences in teaching object-oriented concept, e.g. &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6709/some-real-practical-example-to-teach-object-oriented-concepts-and-programming-i&quot;&gt;Some real practical example to teach object-oriented concepts and programming (in python)&lt;/a&gt; has kept me wondering &lt;strong&gt;what are common questions students may ask when they first learn OOP&lt;/strong&gt; ?&lt;/p&gt;&#xA;&lt;p&gt;For example in that question the author asked,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I am a beginning CS student ... In the first semester we were introduced to OOP concepts like encapsulation,  data hiding, modularity ...&lt;/p&gt;&#xA;&lt;p&gt;But I think all the principles used to manage complexity like&#xA;modularity, encapsulation, data hiding and so on can be very easily&#xA;implemented by procedural languages. So why really OOP if we can&#xA;manage complexity without it?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I also have to admit that I have own struggle, e.g I asked this question &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/419122/does-oop-overemphasize-the-importance-of-noun-and-thus-put-action-verb-in-the-le&quot;&gt;Does OOP overemphasize the importance of noun and thus put action/verb in the less importance position ？&lt;/a&gt; on that site too (no student has asked me this question though). My question was closed and even got 2 delete votes but that is alway my concern.&lt;/p&gt;&#xA;&lt;p&gt;If my students or my colleagues who have experience with javascript and like to learn OOP, I will always let them compare &lt;a href=&quot;https://momentjs.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;momentjs&lt;/a&gt; with &lt;a href=&quot;https://date-fns.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;date-fns&lt;/a&gt;, both deal with date and provide the similar functions, both do a good job, but momentjs an OOP library and date-fns is a function library.&lt;/p&gt;&#xA;&lt;p&gt;My purpose is let them understand there are more than one ways to do things.&lt;/p&gt;&#xA;&lt;p&gt;So what are common questions your students ask ?&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-01-19T11:36:20.070" LastActivityDate="2021-02-06T10:23:44.110" Title="Common questions students may ask when they learn OOP?" Tags="|lesson-ideas|object-oriented-paradigm|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6759" PostTypeId="1" CreationDate="2021-01-19T08:51:09.693" Score="3" ViewCount="140" Body="&lt;p&gt;I wanted to analyze the history of educational programming languages and their evolution up to the present (and probably make the presentation out of it for middle schoolers). Can you recommend any supportive materials with deep historical retrospective analysis since 1960s (Logo Turtle, Squeak etc.)?&lt;/p&gt;&#xA;" OwnerUserId="6387" LastActivityDate="2021-05-10T12:46:33.017" Title="History of educational programming languages" Tags="|language-choice|computer-history|programming-environment|secondary-education|" AnswerCount="2" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="6760" PostTypeId="2" ParentId="6758" CreationDate="2021-01-20T04:01:37.157" Score="4" Body="&lt;p&gt;I read through most voted questions tagged &lt;strong&gt;object oriented&lt;/strong&gt; on &lt;em&gt;softwareengineering.stackexchange.com&lt;/em&gt; and &lt;em&gt;stackoverflow.com&lt;/em&gt;. I feel some questions on  softwareengineering site are quite common when learning OOP while questions on stackoverflow are more related to practical programming questions that are more likely asked by professionals.&lt;/p&gt;&#xA;&lt;p&gt;So I listed some questions from softwareengineering site,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/154228/why-is-it-good-to-split-a-program-into-multiple-classes&quot;&gt;Why is it good to split a program into multiple classes?&lt;/a&gt;. This question was indeed asked by a high school student.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/288990/do-objects-in-oop-have-to-represent-an-entity&quot;&gt;Do objects in OOP have to represent an entity?&lt;/a&gt;. My students do ask me this question.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/120019/whats-the-benefit-of-object-oriented-programming-over-procedural-programming&quot;&gt;What's the benefit of object-oriented programming over procedural programming?&lt;/a&gt; this one is somewhat related to the &amp;quot;manage software complexity&amp;quot; question in my question and I do discuss with my colleagues another interesting question that was asked on quora &lt;a href=&quot;https://www.quora.com/How-does-Linux-maintain-such-a-large-code-base-when-C-isnt-an-object-oriented-language-Is-the-code-base-all-messed-up&quot; rel=&quot;nofollow noreferrer&quot;&gt;How does Linux maintain such a large code base when C isn't an object oriented language? Is the code base all messed up?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/7618/does-oop-fulfill-the-promise-of-code-reuse-what-alternatives-are-there-to-achie&quot;&gt;Does OOP fulfill the promise of code reuse? What alternatives are there to achieve code reuse?&lt;/a&gt; I am not sure if students will ask this question and I have my own double to the question too.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/257885/when-writing-object-oriented-code-should-i-always-be-following-a-design-pattern&quot;&gt;When writing object-oriented code, should I always be following a design pattern?&lt;/a&gt;. This site also has a question about design pattern, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5417/how-bad-is-a-computer-science-course-that-doesnt-teach-design-patterns/5418#5418&quot;&gt;How bad is a Computer Science course that doesn&amp;#39;t teach Design Patterns?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/157526/explanation-on-how-tell-dont-ask-is-considered-good-oo&quot;&gt;Explanation on how “Tell, Don't Ask” is considered good OO&lt;/a&gt;. Only after they gain some coding experiences can they ask/appreciate the question. But it is a good one.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/297090/should-i-create-a-class-if-my-function-is-complex-and-has-a-lot-of-variables&quot;&gt;Should I create a class if my function is complex and has a lot of variables?&lt;/a&gt; One answer there was also my recommendation to my students when they have such question, &amp;quot;Use a class, but also provide a free standing function, that only constructs the object, calls the method and returns the result, the class that you use internally really becomes just an implementation detail of your public function&amp;quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Quora also has some interesting questions I feel people will ask when they first learn OOP, I list some here:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.quora.com/Can-anyone-in-a-programmers-position-survive-in-the-modern-tech-industry-software-or-no-software-without-OOP-What-else-is-required-for-the-future&quot; rel=&quot;nofollow noreferrer&quot;&gt;Can anyone (in a programmer's position) survive in the modern tech industry (software or no software) without OOP?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.quora.com/How-often-do-software-developers-use-OOP&quot; rel=&quot;nofollow noreferrer&quot;&gt;How often do software developers use OOP?&lt;/a&gt;. One answer there by Kurt Guntheroth is interesting &amp;quot;Any time you write a program longer than about 1,000 lines, you should use OOP. 1000 lines? Why’s that ...?&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.quora.com/When-is-object-oriented-programming-not-a-good-fit&quot; rel=&quot;nofollow noreferrer&quot;&gt;When is object-oriented programming not a good fit?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Hopefully I can get some other answers.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-01-21T09:12:23.170" LastActivityDate="2021-01-21T09:12:23.170" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6761" PostTypeId="2" ParentId="6727" CreationDate="2021-01-23T10:49:48.727" Score="1" Body="&lt;p&gt;Writing a fully functional application, even if that application is 'trivial' quickly becomes complex and will need some good thinking on paper before starting your code. I would suggest learning a software development proces that starts with requirement analysis and takes you all the way to technical design from which you can start your code. The one I know is called ICONIX (for object oriented programming) described in &amp;quot;Use Case Driven Object Modeling with UML - Theory and Practice&amp;quot;. The book uses a bookstore as an example application and is very hands-on. The application is developed using Java and the Spring framework. It is essentially a step-by-step guide to application development. Through object oriented analysis, you will create a detailed design in the form of a class diagram with attributes and methods allocation, and sequence diagrams for the most critical features. You will work through one use-case at a time and iteratively develop a fully functioning application.&lt;/p&gt;&#xA;" OwnerUserId="10016" LastActivityDate="2021-01-23T10:49:48.727" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6763" PostTypeId="1" CreationDate="2021-01-24T12:24:42.723" Score="5" ViewCount="788" Body="&lt;p&gt;I'm currently as a TA developing a series of programming assignments for a bachelor course on machine learning. Since we expect the number of students taking this course to grow in the future, we're looking at autograding to see if it's useful for us. In particular, we're looking at using &lt;strong&gt;Github Classroom&lt;/strong&gt;. I have a number of related questions about this. Feel free to answer all or only some of them.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Autograding leans heavily on unit tests to grade, and these unit tests are in the students' repositories. This means students can work on their code until it satisfies all the tests, which would result in a perfect grade. What kind of assignment setup/grading setups are possible that aren't so all or nothing?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Can you stop students from altering files in the repository that they're not supposed to alter? For example, if their starter code contains a file &lt;code&gt;assignment.py&lt;/code&gt; and &lt;code&gt;tests.py&lt;/code&gt;, can you enforce that they only change the assignment file?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Is it possible to apply hidden unit tests, that aren't visible in the students' starter code repository? For example, we might want them to implement a ML algorithm, then test it on a dataset they haven't seen yet, to see if it generalizes well. Also, it would enable us to have a tamper-proof unit test (see point 2).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What are general issues to watch out for when using autograding for (some of) the assignments in a course? Or Github Classroom-specific problems?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What are in general best practices for using autograding in a course?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="8696" LastActivityDate="2021-01-25T17:43:38.637" Title="Using autograding (Github Classroom) - pitfalls and best practices?" Tags="|python|auto-graders|machine-learning|github|unit-testing|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6764" PostTypeId="2" ParentId="6763" CreationDate="2021-01-24T18:11:38.317" Score="2" Body="&lt;p&gt;In the auto grader I use, the following process is followed:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The students files are copied into a pristine work area&lt;/li&gt;&#xA;&lt;li&gt;The &amp;quot;provided&amp;quot; file(s) are removed from the work area&lt;/li&gt;&#xA;&lt;li&gt;If I intend to use MOSS, the remaining files are copied for later use&lt;/li&gt;&#xA;&lt;li&gt;The &amp;quot;provided&amp;quot; file(s) are copied into the work directory&lt;/li&gt;&#xA;&lt;li&gt;The result is built (if necessary)&lt;/li&gt;&#xA;&lt;li&gt;Tests are executed and graded&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Note that the &amp;quot;provided&amp;quot; file(s) copied in at step 4 may be a superset of the file(s) provided to the student in the assignment and typically contain other/additional test cases.&lt;/p&gt;&#xA;&lt;p&gt;If the build fails because a student has modified a &amp;quot;provided&amp;quot; file, the students gets no points. If Java assignments, the provided file is often a interface, sometimes an abstract class. In C/C++ assignments, the provided file is often a header file.&lt;/p&gt;&#xA;&lt;p&gt;If some test cases are provided and reused verbatim in the final run, those test cases only account for 60% of the final grade. Thus, the student can not receive a passing grade by just making those test cases pass.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2021-01-24T19:22:05.297" LastActivityDate="2021-01-24T19:22:05.297" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6765" PostTypeId="1" CreationDate="2021-01-24T23:26:43.480" Score="1" ViewCount="72" Body="&lt;p&gt;I have to teach an Intro to Programming class of students with some exposure to proccedural programming, arrays and loops etc. However, they have not taken any course in oop and templates. It is a requirement of the course to teach pointers. I felt teaching raw pointers only will be incomplete; it is appropriate to provide the students a fuller, mordern C++ Intro wrt pointers. This implies teaching smart pointers.&lt;/p&gt;&#xA;&lt;p&gt;How do you explain the syntax of smart ptrs to these students without having to teach them first about classes, constructors &amp;amp; destructors dynamic memory and templates?&lt;/p&gt;&#xA;" OwnerUserId="8489" LastEditorUserId="8489" LastEditDate="2021-01-24T23:56:32.840" LastActivityDate="2021-01-25T16:56:39.343" Title="Teach smart pointers to beginners with no knowlege of OOP or templates" Tags="|teaching-analogy|c++|pointers|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6767" PostTypeId="1" CreationDate="2021-01-25T14:06:09.267" Score="4" ViewCount="1126" Body="&lt;p&gt;Due to the coronavirus crisis, internships became hard to come by, due to companies not being able to house any students. So local colleges/companies made an arrangement in which one company would set up a organization (where I am part of) that pools projects from several companies and redistributes them to the students who work in a location provided by the schools.&lt;/p&gt;&#xA;&lt;p&gt;Now the company that is doing the redistribution is actually getting paid for the assignments the students are doing and have strict deadlines. And we are nearing the final weeks of the first round of this system and he has become rather critical of the outcome of the projects.&lt;/p&gt;&#xA;&lt;p&gt;He thinks the projects could have been done better, comparing the results of the students (the youngest student is 17, and the eldest is 24 with the majority being between 18/20. Who just completed their first year (just below bachelor level) which was poked full with holes due to coronavirus) with professionally-made similar sites from major companies (that most likely had more time, resources and knowledge going in).&lt;/p&gt;&#xA;&lt;p&gt;I argued that when doing the projects we should keep the educational level of the student in mind, and can't expect high end stuff from them seeing they just got started (especially seeing that on paper they don't have any time to learn, but have to be &amp;quot;productive&amp;quot;). I have tried teaching them, but there are several wildly different projects and in the limited time I got with them I am not able to go by every project to give a proper in-depth course on how to best do it.&lt;/p&gt;&#xA;&lt;p&gt;How could I convince my employer to ease up on the students, because in my opinion it was unwise to take on paid projects when you only got a bunch of first year college students to it in a rather limited time? And how could I advise him to simply say not take on so much work or such high demanding work when he knows that the skill level and time frame of the &amp;quot;employees&amp;quot; are so limited (because the next group is scheduled to start in February).&lt;/p&gt;&#xA;&lt;p&gt;Background:&lt;/p&gt;&#xA;&lt;p&gt;My employer has a small IT company, and the students are sort of his interns. My current job (three days a week at least) is to manage the students (although I have contact with the school/teachers, I am on the commercial side of the story). My job includes giving them their projects, and guide, advise, and supply them. But due to the coronavirus crisis they missed a lot of classes, so I spend most of my time (especially in the first weeks) tutoring them than anything else.&lt;/p&gt;&#xA;" OwnerUserId="8867" LastEditorUserId="1314" LastEditDate="2021-01-26T13:31:00.717" LastActivityDate="2021-01-26T13:31:15.203" Title="How should I handle over-demanding assignment providers?" Tags="|undergraduate|project|" AnswerCount="3" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6768" PostTypeId="2" ParentId="6767" CreationDate="2021-01-25T14:34:57.890" Score="4" Body="&lt;p&gt;Let me point you to the &lt;a href=&quot;https://summerofcode.withgoogle.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Summer of Code&lt;/a&gt; site. Look at the characteristics of the problems and the relationship to the project providers.&lt;/p&gt;&#xA;&lt;p&gt;It is explicitly an &lt;em&gt;educational project&lt;/em&gt;  site, and project providers (companies) make no claim that they will use any of the code that students write.&lt;/p&gt;&#xA;&lt;p&gt;I haven't been involved with it, but assume that some process vets the projects for level and appropriateness to the &lt;em&gt;educational&lt;/em&gt; mission.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps you need to institute a similar set of rules and expectations. You could serve as a filter. Or you could set up a small group of educators to assist. The only change required is to make it known that &amp;quot;suggested&amp;quot; projects might need to be filtered out for various reasons. Hopefully that is a safe position for you to take.&lt;/p&gt;&#xA;&lt;p&gt;I'm also a bit concerned that people are using unpaid labor for commercial projects. The students can gain &lt;em&gt;something&lt;/em&gt; if the projects are appropriate, but it can cost them greatly otherwise, as you note.&lt;/p&gt;&#xA;&lt;p&gt;Just make it known that not all projects are appropriate and that they will be filtered.&lt;/p&gt;&#xA;&lt;p&gt;And note that each project needs &lt;em&gt;clear and explicit&lt;/em&gt; &lt;strong&gt;educational&lt;/strong&gt; objectives. These probably need to be supplied by educators. They will help people decide on the appropriateness of any project for their classroom use.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-01-25T14:41:57.427" LastActivityDate="2021-01-25T14:41:57.427" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6769" PostTypeId="2" ParentId="6767" CreationDate="2021-01-25T15:08:23.630" Score="9" Body="&lt;p&gt;We run projects with real-world clients from within our school building.&lt;/p&gt;&#xA;&lt;p&gt;I would add to Buffy's beautiful answer one idea that we've communicated to the clients that our students will be working with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;As gifted and wonderful as our students are, recognize that they are still students, and the primary purpose here is educational.  The work that your group does should not be mission-critical.  An ideal project is in the &lt;em&gt;nice-to-have&lt;/em&gt; category.&lt;/p&gt;&#xA;&lt;p&gt;If you have discussed doing something more significant with your group, and they understand the challenges and are willing to undertake the project, then we will not stand in the way.  Such projects can be valuable learning experiences!  While we do provide support and oversight to the project groups, our ultimate target is learning.  Please be prepared to provide extra support as needed if you are relying on the outcome.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think this nicely captures an important aspect of internship projects.  They can be useful.  Heck, ideally, they &lt;em&gt;should&lt;/em&gt; be useful.  That's part of what makes a good internship so motivating!  But students are still developing their skills, and the results can be &lt;em&gt;uneven&lt;/em&gt;.  I wouldn't rely on it for mission-critical pieces of my work.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-25T15:08:23.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6770" PostTypeId="2" ParentId="6765" CreationDate="2021-01-25T16:56:39.343" Score="3" Body="&lt;p&gt;I hate giving advice like this, but my honest advice here would be not to do so.  Or, at least, don't do it without consulting with your colleagues first.&lt;/p&gt;&#xA;&lt;p&gt;Students (and your fellow teachers in future courses) depend on you getting through the required material in the course.  If you find that you have extra time at the end of the semester, then by all means, go back and try to take a stab at smart pointers.  But I wouldn't endanger your odds of getting to the end of the material that students will be expected to know in future coursework.  That could create far larger problems for the students going forward.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-01-25T16:56:39.343" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6771" PostTypeId="2" ParentId="6763" CreationDate="2021-01-25T17:43:38.637" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;1, 2, &amp;amp; 3&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In most cases, I'm okay with them having the tests ahead of time. The only thing that concerns me a bit is that they can edit the tests, and GitHub would use those.&lt;/p&gt;&#xA;&lt;p&gt;What I do, and it's typically only on larger weight assignments, is to download all of the repositories. I'll then copy either a clean copy of the test files or a new set of test files and run that.&lt;/p&gt;&#xA;&lt;p&gt;Normally I'll put the clean files in the root of the projects I download and run something like &lt;code&gt;copy ../test.py . &amp;amp; python test.py&lt;/code&gt; to copy the clean version and use that.&lt;/p&gt;&#xA;" OwnerUserId="30" LastActivityDate="2021-01-25T17:43:38.637" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6772" PostTypeId="2" ParentId="6767" CreationDate="2021-01-26T05:00:33.667" Score="3" Body="&lt;p&gt;My business view on this arrangement is:&lt;/p&gt;&#xA;&lt;p&gt;students ↔ middle man ↔ customers&lt;/p&gt;&#xA;&lt;p&gt;Where students are dodgy (unreliable by nature), but cheap (receive study credit and no compensation), while the middle man organisation promised the customers results at some price.&lt;/p&gt;&#xA;&lt;p&gt;If this arrangement works, the middle man gets rich, although then, the ethics are out of the door.&lt;/p&gt;&#xA;&lt;p&gt;In a way, the arrangement is not very different from any outsourcing company, and perhaps lessons can be learnt from those.&lt;/p&gt;&#xA;&lt;p&gt;A couple of ideas:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;let several students for on each task, independently. Submit the best work to the customer, and discard the rest.&lt;/li&gt;&#xA;&lt;li&gt;refund unsatisfied customers, and proceed with more tasks from customers whose expectation was more reasonable (and are thus satisfied).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10035" LastEditorUserId="1314" LastEditDate="2021-01-26T13:31:15.203" LastActivityDate="2021-01-26T13:31:15.203" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6775" PostTypeId="2" ParentId="6730" CreationDate="2021-01-29T05:37:54.590" Score="1" Body="&lt;p&gt;Reading or writing a binary file usually involves bit operations. This is especially true for older formats created back when memory and disk were scarce and the authors were trying to minimise file size by packing as many values into a byte as possible.&lt;/p&gt;&#xA;&lt;p&gt;Maybe set a project to write a pair of utilities to convert files between a common modern format and an older one that's fallen out of favour but still sees a fair amount of support despite not being as common as it once was. This would have the advantage of support in existing software to make it easy to both make test cases and to test the program outputs.&lt;/p&gt;&#xA;&lt;p&gt;As an example, Creative Labs' VOC format supports several low-bit-depth sample formats (which definitely need bit operations to extract individual samples from) and was fairly common back in the days before Windows 95, but got displaced by WAV. Both formats support a variety of encodings and are reasonably well-documented.&lt;/p&gt;&#xA;&lt;p&gt;If you've already covered audio through the use of some library, like SDL, or are planning to do so, you could have a project of making a playback program for another assignment.&lt;/p&gt;&#xA;&lt;p&gt;And yes, I know someone else suggested reading Minecraft chunks, but I don't think that's a good fit as it's a bit too specialised a format. I think something more generic like audio or images would be a better fit, as it's fairly easy to see a need to include support for loading one of those files in a larger program.&lt;/p&gt;&#xA;" OwnerUserId="10050" LastActivityDate="2021-01-29T05:37:54.590" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6776" PostTypeId="1" CreationDate="2021-02-02T07:28:46.113" Score="1" ViewCount="46" Body="&lt;p&gt;I am currently teaching in a community college that includes teaching introductory programming course in &lt;code&gt;C++&lt;/code&gt;. I also have a colleague who is currently teaching networking course with a laboratory hands-on part (I also teach this one before). Both of these courses are good for four (4) credits. Now, my question is &lt;strong&gt;how many preps&lt;/strong&gt; are these courses considered in your school, is it good for one preparation (or one prep) or two preps? In my programming class by the way most of my students if not all have no prior programming experience in high school, so the teaching is more challenging than normal. Also, the networking course the lab could include actual cabling, accessing a router physically (via cable) and configuring routers virtually. I am saying this because from our college the only courses that are considered two preps are chemistry and physics classes.&lt;/p&gt;&#xA;" OwnerUserId="6065" LastActivityDate="2021-02-02T07:28:46.113" Title="Number of preps for networking and programming courses" Tags="|programming|networks|curriculum|" AnswerCount="0" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="6777" PostTypeId="1" CreationDate="2021-02-03T03:46:43.333" Score="13" ViewCount="3823" Body="&lt;p&gt;I'm teaching an undergrad Intro to Programming for Non-majors this semester (in Python) and I'm looking for some fun projects for my students that are engaging but not too difficult for them. This is my first go around with this course.&lt;/p&gt;&#xA;&lt;p&gt;I've looked at their majors to see if I could come up with projects that might relate to it, but that didn't spark any ideas.&lt;/p&gt;&#xA;&lt;p&gt;Maybe some games, like Tic-Tac-Toe? Does anyone have suggestions that have worked well for them?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: These are typical undergrad students at a US university, so about 18 - 22 year olds, with no programming background. The main focus is on imperative rather than OOP. In the past I haven't found an easy way to introduce graphics with Python or GUIs, but perhaps there's some nice stuff out there now. I don't think Turtle graphics would hold their attention very much or very long, also seems more age appropriate to younger students I believe.&lt;/p&gt;&#xA;" OwnerUserId="433" LastEditorUserId="433" LastEditDate="2021-02-03T13:11:23.873" LastActivityDate="2021-04-09T23:06:54.007" Title="What are some fun projects for non-CS majors?" Tags="|lesson-ideas|student-motivation|programming|" AnswerCount="17" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="6778" PostTypeId="2" ParentId="6777" CreationDate="2021-02-03T10:13:43.547" Score="3" Body="&lt;h1&gt;Python turtle&lt;/h1&gt;&#xA;&lt;p&gt;Related to what their major is if you can find something relevant else&#xA;&lt;code&gt;import turtle&lt;/code&gt; # this module allows some visual output, that can be interesting, and gives good feedback.&lt;/p&gt;&#xA;&lt;h1&gt;Jupiter notebooks / google colab notebook.&lt;/h1&gt;&#xA;&lt;p&gt;It allows you to create pages using markdown (same as this site), and to incorporate python code, tables, and charts. Tables can be input or output, charts are output, there are other inputs such as sliders. This is good for any one with a scientific interest, as they can continue using it in their major.&lt;/p&gt;&#xA;&lt;h1&gt;Linguistic analysis / text generation&lt;/h1&gt;&#xA;&lt;p&gt;Write a program to create writing in the style of. You can do this with a 2 stage markov chain (a what?). You just generate a table containing the probability of the next word. e.g. for the short phrase &amp;quot;the cat sat on the mat&amp;quot;, both &amp;quot;cat&amp;quot; and &amp;quot;mat&amp;quot; have a 0.5 probability of following a &amp;quot;the&amp;quot;. With a long enough training text, you can get it to generate its own texts.&lt;/p&gt;&#xA;&lt;p&gt;You will have to write the program for them, or at least partly. What you write must work, but not be complete, so that they can add to it. But now I am digressing onto an answer for another question.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2021-02-03T14:26:30.287" LastActivityDate="2021-02-03T14:26:30.287" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6779" PostTypeId="2" ParentId="2691" CreationDate="2021-02-03T14:08:15.567" Score="1" Body="&lt;p&gt;The following sentence from JLS Section 4.3.1&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object&amp;quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;is sometimes exhibited as an &amp;quot;proof&amp;quot; that Java actually has pointers.&lt;/p&gt;&#xA;&lt;p&gt;Putting it in context:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Language specification documents are not the kind of material beginners are expected to learn programming from ;&lt;/li&gt;&#xA;&lt;li&gt;at the time (90's), &amp;quot;serious programmers&amp;quot; (the intended readers of language specifications) were probably familiar with mainstream programming languages of the time.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Before Java, most programming languages (C, C++, FORTRAN, Cobol, ...- counter-examples are SmallTalk and Lisp) shared the notion of a variable as a name for a memory chunk &lt;strong&gt;containing&lt;/strong&gt; the binary representation of some information.&lt;/p&gt;&#xA;&lt;p&gt;Java has some obvious similarities (syntax) with C++, but drastically differs on that notion : a variable refers to &lt;strong&gt;a value&lt;/strong&gt; (of primitive type) or an object. An object is not &lt;em&gt;contained&lt;/em&gt; in a variable.&lt;/p&gt;&#xA;&lt;p&gt;So assigning an object in Java doesn't involve the duplication of that object.&lt;/p&gt;&#xA;&lt;p&gt;It's a point to be stressed (heavily) when explaining Java to confused C++ programmers. And a simple way to do it is to say Java variables contain references, which are like &lt;strong&gt;C++&lt;/strong&gt; pointers containing addresses of objects (and are magically de-referenced without a star).&lt;/p&gt;&#xA;&lt;p&gt;But it's only a way to illustrate concepts of Java with a metaphor, borrowing from a different world. It only helps if you know C++ beforehand. Having to teach pointers first makes the thing more complicated.&lt;/p&gt;&#xA;&lt;p&gt;The basic explanation is&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;objects exist somewhere in the memory space,&lt;/li&gt;&#xA;&lt;li&gt;references indicate where they are,&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Actually pointers are not a &amp;quot;very hard&amp;quot; subject (addresses as first class data). The beginner's difficulties come from the algorithmic side of linked data structures.&lt;/p&gt;&#xA;" OwnerUserId="2103" LastEditorUserId="2103" LastEditDate="2021-02-05T20:05:51.103" LastActivityDate="2021-02-05T20:05:51.103" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6780" PostTypeId="2" ParentId="6777" CreationDate="2021-02-03T15:16:24.017" Score="10" Body="&lt;p&gt;Here is a concept but it works much better with visual feedback.&lt;/p&gt;&#xA;&lt;h2&gt;Simulate a Pandemic.&lt;/h2&gt;&#xA;&lt;p&gt;A pandemic requires a &lt;em&gt;world&lt;/em&gt; with &lt;em&gt;inhabitants&lt;/em&gt; that can be in one of several states, such as healthy, sick, dead. The pandemic spreads from sick inhabitants to &amp;quot;neighbor&amp;quot; inhabitants who are healthy. &amp;quot;Dead zones&amp;quot; stop the spread. You can also erect barriers to the spread to simulate oceans and such. People can get well or not and be reinfected or not. The pandemic can &amp;quot;jump&amp;quot; to simulate air travel and such.&lt;/p&gt;&#xA;&lt;p&gt;Such a thing can be highly parameterized for infection rates and everything else.&lt;/p&gt;&#xA;&lt;p&gt;A two dimensional array can represent the world and you can &amp;quot;attach&amp;quot; the edges in various ways to simulate a sphere or torus or möbius strip.&lt;/p&gt;&#xA;&lt;p&gt;The simulation runs through iterations.&lt;/p&gt;&#xA;&lt;p&gt;If you want to think of the whole thing as MVC, what I've described is the Model part, which normally is independent of the Views and Controllers in any case.&lt;/p&gt;&#xA;&lt;p&gt;The idea is stolen from a book, &lt;em&gt;Polymorphism Companion&lt;/em&gt;, but there is enough above to build it.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-02-03T19:12:28.763" LastActivityDate="2021-02-03T19:12:28.763" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6781" PostTypeId="2" ParentId="6777" CreationDate="2021-02-03T19:04:47.943" Score="11" Body="&lt;p&gt;Another fun game is &amp;quot;Spelling Bee&amp;quot; from the New York Times&#xA;(&lt;a href=&quot;https://www.nytimes.com/puzzles/spelling-bee&quot; rel=&quot;noreferrer&quot;&gt;https://www.nytimes.com/puzzles/spelling-bee&lt;/a&gt;). You supply a file containing words. The student program reads the file and selects words that match the rules. The milestones are from a past project from Reed College.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Print all the words that can be spelled using a fixed string (e.g. &amp;quot;AZDIRWY&amp;quot;). The first letter is the required letter.&lt;/li&gt;&#xA;&lt;li&gt;Prompt the user for a string and print a list of words or take the string as a command line parameter.&lt;/li&gt;&#xA;&lt;li&gt;Generate a score for each word and the total score.&lt;/li&gt;&#xA;&lt;li&gt;Generate the graphics to draw the string as it appears in the paper (six hexagons containing optional letters surrounding a central hexagon with the required letter), along with the list of words.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You could potentially go a slightly different direction and let the python program generate HTML output and view the results in a browser. This illustrates dynamically generated HTML.&lt;/p&gt;&#xA;&lt;p&gt;Another variation would be to preprocess a &amp;quot;dictionary&amp;quot;, removing all words that are too short or contain more that seven distinct characters. Then create multiple files, one for each possible beginning letter. You now have cut down the search space. You might also have the students sort the answers, perhaps by word score.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2021-02-04T15:43:30.137" LastActivityDate="2021-02-04T15:43:30.137" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6782" PostTypeId="2" ParentId="6777" CreationDate="2021-02-03T20:42:04.773" Score="3" Body="&lt;p&gt;At my institution, we (often) take our courses' final products in a different direction: free choice, working as a pair (or in a trio).&lt;/p&gt;&#xA;&lt;p&gt;Students write 2 to 3 ideas (&amp;quot;proposals&amp;quot;) within a google doc, and then talk among themselves to find projects that seem like a good fit.&lt;/p&gt;&#xA;&lt;p&gt;They then write up short proposals, and divide tasks into &amp;quot;must-have for a minimum viable product&amp;quot;, &amp;quot;important&amp;quot;, and &amp;quot;nice-to-have&amp;quot;.  We added this step after years of watching some subset of students get completely lost in the weeds.  We came to call them the &amp;quot;font color&amp;quot; students, and we found that having that list upfront enables us to point back to it and redirect the students towards the most important parts of the project.&lt;/p&gt;&#xA;&lt;p&gt;They have a few weeks to work when the teachers walk around the room offering support, and then they give a final presentation.&lt;/p&gt;&#xA;&lt;p&gt;The final product is not a huge portion of the grade, because a fair number of the projects don't quite come together.  We consider that developmentally appropriate; students are very poor at gauging how much they can get done in 2 weeks and how long things will take.  Free projects also force students to explore new avenues, and we did not want to penalize such explorations, as learning how to wrap your brain around new libraries and new challenges is both hard and virally important.&lt;/p&gt;&#xA;&lt;p&gt;Instead, the students give a presentation on what they wanted to produce and what libraries they used, and then they demo what they have and reflect on what went well and what could have gone better.  Personally, I also add in a requirement that students show us one interesting thing in their code, though my colleagues do not do this. In any case, the presentations are a lot of fun, and some number of the projects are always very impressive.  It's a fun way to end a course on a nice, uplifting note.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-02-03T20:42:04.773" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6783" PostTypeId="2" ParentId="5813" CreationDate="2021-02-04T07:47:31.253" Score="1" Body="&lt;p&gt;I will first let them be familiar with the web developer roadmap here &lt;a href=&quot;https://github.com/kamranahmedse/developer-roadmap&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/kamranahmedse/developer-roadmap&lt;/a&gt;. They may feel overwhelmed by the information list there. But for college CS students I think it is important to know what it takes to be a qualified web developer.&lt;/p&gt;&#xA;&lt;p&gt;I will also suggest them to check 2020 js survey &lt;a href=&quot;https://2020.stateofjs.com/en-US/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://2020.stateofjs.com/en-US/&lt;/a&gt;, this survey has done for 4 years I guess. So they can have a sense of the latest development of js.&lt;/p&gt;&#xA;&lt;p&gt;About the question why we should use a framework I will let them check &lt;a href=&quot;http://todomvc.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://todomvc.com/&lt;/a&gt;. it is a very interesting web and project to compare/show how to use all different kinds of frameworks and just vanilla js to build a todo web app. So they can have a sense of what framework can do for us. If they have never done web dev before they may feel overwhelmed again. Besides, some frameworks there have &amp;quot;died&amp;quot; so I may just try react/vue/jquery/es6.&lt;/p&gt;&#xA;&lt;p&gt;A point here is (except for compare the frameworks) there many ways to do web developments, no right or wrong way but for the beginners we can choose a way with flat (relative) learning curve. I sometime advice my friends not to use angular because learning ts and the framework at the same time is too hard for beginners (using your students' word &amp;quot;learning multiple things at once could be bad&amp;quot;) but learning js with jquery (or anything to manipulate dom) is probably necessary for web development.&lt;/p&gt;&#xA;&lt;p&gt;BTW, if they just want to learn js they may try nodejs. But learning nodejs is another big topic.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastActivityDate="2021-02-04T07:47:31.253" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6784" PostTypeId="2" ParentId="6777" CreationDate="2021-02-04T08:59:52.530" Score="2" Body="&lt;p&gt;It is not said for how much time the students shall dedicate to their projects, e.g., as an exercise / lab class, or for a (perhaps multiple) week long one.  If aiming for shorter ones, I recommend to find inspiration from the sources teaching «this is the problem x, along which we develop technique y».  Seek-out for projects which may simplify the day-to-day work for the attendees.  Sources of inspiration then could be&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Al Sweigart's &lt;a href=&quot;https://automatetheboringstuff.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Automate the Boring Stuff with Python&lt;/em&gt;&lt;/a&gt;  (note, this is only part of a &lt;a href=&quot;https://inventwithpython.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;series&lt;/a&gt;); e.g. let Python read / write .csv, spreadsheet, word, or .pdf files; crawl web sites; initiate use of regexes&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Ken Youens-Clark's &lt;a href=&quot;https://www.manning.com/books/tiny-python-projects?a_aid=youens&amp;amp;a_bid=b6485d52&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Tiny Python Projects&lt;/em&gt;&lt;/a&gt; (&lt;a href=&quot;https://www.youtube.com/playlist?list=PLhOuww6rJJNP7UvTeF6_tQ1xcubAs9hvO&quot; rel=&quot;nofollow noreferrer&quot;&gt;one of his playlists&lt;/a&gt;). Initially based on a course for attendees from biosciences, the theme in the background is how to formalize writing scripts (his &lt;a href=&quot;https://github.com/kyclark/tiny_python_projects/blob/master/bin/new.py&quot; rel=&quot;nofollow noreferrer&quot;&gt;new.py&lt;/a&gt;) once and for all, and to include automated quality control (&lt;code&gt;Makefile&lt;/code&gt; and &lt;code&gt;pytest&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;examples of advanced tutorials on youtube, e.g., user sentdex' &lt;a href=&quot;https://www.youtube.com/playlist?list=PLQVvvaa0QuDcOdF96TBtRtuQksErCEBYZ&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Python Programming for Finance&lt;/em&gt;&lt;/a&gt;, or Derek Bana's &lt;a href=&quot;https://www.youtube.com/playlist?list=PLGLfVvz_LVvQjNJr85J4U_lxDg8vgqvcO&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Master Statistics with Python&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The listing above can't be exhaustive.&lt;/p&gt;&#xA;" OwnerUserId="10073" LastActivityDate="2021-02-04T08:59:52.530" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6785" PostTypeId="2" ParentId="5813" CreationDate="2021-02-04T12:11:10.827" Score="1" Body="&lt;p&gt;You have to understand that the learning curve for learning a JS framework like &lt;code&gt;React&lt;/code&gt; is more complex than simply learning &lt;strong&gt;Vanilla JS&lt;/strong&gt;. Learning an arrow function for example is much easier than learning an arrow function plus functional components, state, props, hooks and third party Redux. However, if you are allowed to segregate students based on their aptitude for learning new stuff then you might consider the more advance ones assigning them learning this stuff. You might also assign others in doing simply testings.&lt;/p&gt;&#xA;&lt;p&gt;Also, I don't know if you tried &lt;a href=&quot;https://svelte.dev/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SvelteJS&lt;/a&gt;. &lt;code&gt;SvelteJS&lt;/code&gt; is much closer to vanilla JS and use normal CSS (no JSX) and the learning curve is definitely lower than learning React or even VueJS.&lt;/p&gt;&#xA;" OwnerUserId="6065" LastActivityDate="2021-02-04T12:11:10.827" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6786" PostTypeId="2" ParentId="6777" CreationDate="2021-02-04T12:44:11.247" Score="7" Body="&lt;p&gt;As a non-CS adult, when I'm learning a new language I like to write programs to solve some of the &lt;a href=&quot;https://projecteuler.net/archives&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt; problems.  Stick to the lower numbered problems and they're not too hard for non-mathematicians.&lt;/p&gt;&#xA;&lt;p&gt;For me, these problems are fun.  There is enough information given in the problems to make sure that non-mathematicians understand the goal.&lt;/p&gt;&#xA;&lt;p&gt;Good Luck!&lt;/p&gt;&#xA;" OwnerUserId="1012" LastActivityDate="2021-02-04T12:44:11.247" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6787" PostTypeId="2" ParentId="6777" CreationDate="2021-02-04T13:30:38.213" Score="4" Body="&lt;p&gt;For the imperative decision making aspects, one of the best approaches I have personally found for getting people interested is to have them write programs that &lt;em&gt;play&lt;/em&gt; a game (not writing the game itself, but writing a program that can stand in for a human playing the game).&lt;/p&gt;&#xA;&lt;p&gt;This challenges them to think analytically about how the game is played, and that analytical thinking is one of the single most important things to learn to be good at programming.&lt;/p&gt;&#xA;&lt;p&gt;The card game twenty-one (blackjack/pontoon/vingt-un) is an example of an easy starting point, because:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The rules are &lt;em&gt;very&lt;/em&gt; simple, easily explained in about five minutes even to someone who has never heard of the game before.&lt;/li&gt;&#xA;&lt;li&gt;The resultant programs tend to be very compact and run very fast (meaning you can run each student’s program hundreds of thousands of times to get a good idea of how it performs). It’s actually possible to write a basic AI for twenty-one in only a few dozen lines of code.&lt;/li&gt;&#xA;&lt;li&gt;A simple but near optimal strategy comes intuitively to most people (namely, keep taking new cards until you are at or above a specific value (most people tend to prefer somewhere around 18) and then pass).&lt;/li&gt;&#xA;&lt;li&gt;A truly optimal strategy requires actually evaluating what the other players have and figuring out the probability of taking a new card putting you over 21 based on that.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;From there, you can branch out into other simple games. Card games tend to work very well for this because they force the students to account for basic probability to have their program do well, but also generally require more than just probability for an optimal strategy.&lt;/p&gt;&#xA;&lt;p&gt;With a bit of extra prep-work, you can even set this up as a ‘tournament’ type thing (ideally not affecting grades, because that gives a bit of an unfair advantage to those who have the skills to figure out a truly optimal strategy) as a way to encourage those in the class who enjoy competition.&lt;/p&gt;&#xA;" OwnerUserId="2523" LastEditorUserId="2523" LastEditDate="2021-02-04T13:48:02.563" LastActivityDate="2021-02-04T13:48:02.563" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6788" PostTypeId="1" AcceptedAnswerId="6789" CreationDate="2021-02-04T15:24:43.760" Score="2" ViewCount="610" Body="&lt;p&gt;Several years ago, I put together this little memory address exploration for my students to help them to understand pointers, arrays, the stack, and the heap.&lt;/p&gt;&#xA;&lt;p&gt;I just compiled and ran it in a new environment (gcc on a AWS Linux server) and the order of the parameters for &lt;strong&gt;foo&lt;/strong&gt; are different from what I would expect. The local function variables (d1 and e1) now have a higher address in comparison to the function parameters (a1, b1, and c1).&lt;/p&gt;&#xA;&lt;p&gt;The addresses for the parameters / variables in function &lt;strong&gt;foo&lt;/strong&gt; are listing as:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;amp;a1: fa2740fc&#xA;&amp;amp;b1: fa2740f0&#xA;&amp;amp;c1: fa2740e8&#xA;&amp;amp;d1: fa27410c&#xA;&amp;amp;e1: fa274100&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Any thoughts on why variables &lt;em&gt;d1&lt;/em&gt; and &lt;em&gt;e1&lt;/em&gt; have higher addresses than &lt;em&gt;a1&lt;/em&gt;, &lt;em&gt;b1&lt;/em&gt;, and &lt;em&gt;c1&lt;/em&gt;?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;#include &amp;lt;stdlib.h&amp;gt;&#xA;#include &amp;lt;string.h&amp;gt;&#xA;&#xA;int* foo (int a1, int b1[], int *c1)&#xA;{&#xA;  int d1 = *c1 + a1;&#xA;  int *e1;&#xA;  &#xA;  e1 = malloc (sizeof(int));&#xA;&#xA;  printf (&amp;quot;5) Addresses of arguments/variables of foo:\n&amp;quot;);&#xA;  printf (&amp;quot;   Update your stack sketch.\n&amp;quot;);&#xA;  printf (&amp;quot;     &amp;amp;a1: %x\n&amp;quot;, &amp;amp;a1);&#xA;  printf (&amp;quot;     &amp;amp;b1: %x\n&amp;quot;, &amp;amp;b1);&#xA;  printf (&amp;quot;     &amp;amp;c1: %x\n&amp;quot;, &amp;amp;c1);&#xA;  printf (&amp;quot;     &amp;amp;d1: %x\n&amp;quot;, &amp;amp;d1);&#xA;  printf (&amp;quot;     &amp;amp;e1: %x\n\n&amp;quot;, &amp;amp;e1);&#xA;&#xA;  printf (&amp;quot;6) Values of arguments/variables in foo:\n&amp;quot;);&#xA;  printf (&amp;quot;   Include these on your stack sketch as well.\n&amp;quot;);&#xA;  printf (&amp;quot;     a1: %x\n&amp;quot;, a1);&#xA;  printf (&amp;quot;     b1: %x\n&amp;quot;, b1);&#xA;  printf (&amp;quot;     c1: %x\n&amp;quot;, c1);&#xA;  printf (&amp;quot;     d1: %x\n&amp;quot;, d1);&#xA;  printf (&amp;quot;     e1: %08x\n\n&amp;quot;, e1);&#xA;&#xA;  printf (&amp;quot;7) *c1 == %x, why?  Explain using your stack drawing.\n\n&amp;quot;, *c1); &#xA;  &#xA;  printf (&amp;quot;8) e1 is a reference to an integer, much like c1.  Why is e1 so\n &amp;quot;);&#xA;  printf (&amp;quot;   different in value?\n\n&amp;quot;);&#xA;&#xA;  return e1;&#xA;}&#xA;&#xA;&#xA;int main ()&#xA;{&#xA;  int a = 5;&#xA;  int b[] = {8, 14, -7, 128, 12};&#xA;  int c = 10;&#xA;  int d = 14;&#xA;&#xA;  printf (&amp;quot;1) Locations...\n&amp;quot;);&#xA;  printf (&amp;quot;   Use these locations to sketch the stack.\n&amp;quot;);&#xA;  printf (&amp;quot;     &amp;amp;a: %x\n&amp;quot;, &amp;amp;a);&#xA;  printf (&amp;quot;     &amp;amp;b: %x\n&amp;quot;, &amp;amp;b);&#xA;  printf (&amp;quot;     &amp;amp;c: %x\n&amp;quot;, &amp;amp;c);&#xA;  printf (&amp;quot;     &amp;amp;d: %x\n\n&amp;quot;, &amp;amp;d);&#xA;  &#xA;  printf (&amp;quot;2a) Values:\n&amp;quot;);&#xA;  printf (&amp;quot;   Why does b != 8?\n&amp;quot;);&#xA;  printf (&amp;quot;     a: %x\n&amp;quot;, a);&#xA;  printf (&amp;quot;     b: %x\n&amp;quot;, b);&#xA;  printf (&amp;quot;     c: %x\n&amp;quot;, c);&#xA;  printf (&amp;quot;     d: %x\n\n&amp;quot;, d);&#xA;&#xA;  printf (&amp;quot;2b) Values:\n&amp;quot;);&#xA;  printf (&amp;quot;   What memory address is *b accessing?\n&amp;quot;);&#xA;  printf (&amp;quot;     *b: %x\n\n&amp;quot;, *b);&#xA;  &#xA;  printf (&amp;quot;3) Notice that the following increase by 4 each, why?\n&amp;quot;);&#xA;  printf (&amp;quot;     &amp;amp;(b[0]): %x\n&amp;quot;, &amp;amp;(b[0]));&#xA;  printf (&amp;quot;     &amp;amp;(b[1]): %x\n&amp;quot;, &amp;amp;(b[1]));&#xA;  printf (&amp;quot;     &amp;amp;(b[2]): %x\n&amp;quot;, &amp;amp;(b[2]));&#xA;  printf (&amp;quot;     &amp;amp;(b[3]): %x\n\n&amp;quot;, &amp;amp;(b[3]));&#xA;&#xA;  printf (&amp;quot;4) Pointers can be added, but the addition might have interesting results.\n&amp;quot;);&#xA;  printf (&amp;quot;   Explain why b + 1 != b + 1 in the normal way of thinking about addition.\n&amp;quot;);&#xA;  printf (&amp;quot;     b:   %x\n&amp;quot;, b);&#xA;  printf (&amp;quot;     b+1: %x\n&amp;quot;, b+1);&#xA;  printf (&amp;quot;     b+2: %x\n&amp;quot;, b+2);&#xA;  printf (&amp;quot;     b+3: %x\n\n&amp;quot;, b+3);&#xA;  &#xA;  foo (a, b, &amp;amp;c);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="192" LastEditorUserId="192" LastEditDate="2021-02-04T17:07:25.320" LastActivityDate="2021-05-09T23:17:33.003" Title="Order of parameter / variables on stack in C" Tags="|c|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6789" PostTypeId="2" ParentId="6788" CreationDate="2021-02-04T17:28:50.080" Score="6" Body="&lt;p&gt;I haven't delved into the details, but if a language doesn't define its own implementation (few do) then the implementation will vary depending on the architecture for which it is compiled. It will also vary over time as research provides hints and clues about efficiency (both compile time and run time efficiency).&lt;/p&gt;&#xA;&lt;p&gt;So, one stack protocol might be appropriate for one architecture, but wildly inefficient on another, depending on the registers available for the stack as well as, perhaps, paging systems, and all the rest. So, the implementer will take advantage of whatever hardware is available on the machine of interest.&lt;/p&gt;&#xA;&lt;p&gt;The normally thought of &amp;quot;normal&amp;quot; architecture (register-transfer) disappeared in the 60's or so. It is fun to think about and to simulate, but not especially realistic. C was designed originally for the PDP-7 architecture, which is pretty much obsolete.&lt;/p&gt;&#xA;&lt;p&gt;Also, if a compiler uses some top-down techniques derived from LL processing as well as more &amp;quot;normal for C&amp;quot; bottom up processing, the parameters, in particular might wind up in a different order. For example, a compiler might use an intermediate language that is itself compiled and who can say what the characteristics of that intermediate language might be.&lt;/p&gt;&#xA;&lt;p&gt;It doesn't affect your question, I think, but heap implementations might differ wildly between implementations.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-02-04T17:36:36.867" LastActivityDate="2021-02-04T17:36:36.867" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6790" PostTypeId="2" ParentId="6788" CreationDate="2021-02-04T19:03:46.470" Score="3" Body="&lt;p&gt;As Gypsy Spellweaver suggested, I posted the question to StackOverflow. It turns out the first 8 int / pointer parameters can get passed via registers rather than via the stack.&#xA;&lt;a href=&quot;https://stackoverflow.com/questions/19351451/printf-arguments-not-pushed-on-the-stack&quot;&gt;Printf arguments not passed on the stack&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="192" LastActivityDate="2021-02-04T19:03:46.470" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6791" PostTypeId="2" ParentId="6777" CreationDate="2021-02-04T19:43:36.903" Score="1" Body="&lt;p&gt;I know for me, personally, when I'm learning a new language, what helps me most is to have a means of collecting simple user input through a console. (Text or numbers, that's all) What this allows me to do is make simple &amp;quot;games&amp;quot; that don't focus a lot on graphics/presentation/game design, but rather execution. It allows me to focus on figuring out how I can use the least code possible, how I can organize data in the best ways, how to disassemble the user's input into something that my program can read/respond to, etc, etc.&lt;/p&gt;&#xA;&lt;p&gt;I recently learned Java, and mid way through learning I challenged myself to make an infinite math game. This was a game that would procedurally generate very simple math problems, solve them, present them to the player, and then compare the player's input to the solved problem. If they matched, I add to the player's score and allow them to move on, if they don't match, I end the game and present the player with their score. (And also reveal the correct answer)&lt;/p&gt;&#xA;&lt;p&gt;Then, once I was more advanced in Java, I challenged myself to make an infinite &lt;em&gt;word&lt;/em&gt; game. Which was more challenging, but in all different ways. It kept it very interesting. The math game was hard to make because I had to think up a way to put together numbers + operators into a string, while also keeping them as something that Java could evaluate into an answer, however the word game was hard because I had to find a way to store many many words and pick from them randomly. Additionally, I challenged myself to allow the player to use &amp;quot;hints&amp;quot; to reveal a single letter of the word, and every time they used one it would reveal the next letter, in order. I also added categories and organized the words that way to add additional challenge for myself.&lt;/p&gt;&#xA;&lt;p&gt;I'm not sure these games exactly would be a good fit for you or your students (and I don't expect that they will be) but hopefully something along these lines could be very fun for them and challenge them in all the right ways. Hope this helps.&lt;/p&gt;&#xA;" OwnerUserId="10076" LastActivityDate="2021-02-04T19:43:36.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6792" PostTypeId="2" ParentId="6788" CreationDate="2021-02-04T20:09:18.500" Score="1" Body="&lt;p&gt;Why not. It is totally arbitrary. There may be no reason. It has to be one way, it is useful to be consistent. But there are many many orders even &lt;code&gt;c1, b1, e1, e1, a1&lt;/code&gt;, are any other order. The &lt;code&gt;C&lt;/code&gt; standard makes no guarantee. However it does say that it a lot of circumstances you can get a pointer to a variable. It says that you can use a pointer to traverse an array. However it says that it is &lt;strong&gt;undefined&lt;/strong&gt; what is beyond the variable or array. You &lt;strong&gt;can not&lt;/strong&gt; know the relative address of one variable from another, as the offset is &lt;strong&gt;undefined&lt;/strong&gt;. I think relative position within structures is &lt;strong&gt;implementation defined&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Undefined means that it can change (change each time it is compiled).&lt;/p&gt;&#xA;&lt;p&gt;One reason that it may change, is a system called &amp;quot;address space randomisation&amp;quot;. It is a security measure, to make it harder to do a buffer overrun (and similar) attack, on buggy software.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-02-04T20:09:18.500" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6793" PostTypeId="2" ParentId="6777" CreationDate="2021-02-05T09:04:19.093" Score="1" Body="&lt;h2&gt;MicroPython&lt;/h2&gt;&#xA;&lt;p&gt;I'd like to suggest that you look at &lt;a href=&quot;https://en.wikipedia.org/wiki/MicroPython&quot; rel=&quot;nofollow noreferrer&quot;&gt;MicroPython&lt;/a&gt;, not because it is a subset of Python, but because it runs on a growing number of microcontrollers, and there are many complete educational projects built on them.&lt;/p&gt;&#xA;&lt;p&gt;For example, for about $9 you can get the &lt;a href=&quot;https://m5stack.com/products/atom-matrix-esp32-development-kit&quot; rel=&quot;nofollow noreferrer&quot;&gt;m5atom&lt;/a&gt; which is a read-to-use device that you can plug in to usb, where it appears as a serial port. You download a Python source file to it, and your code can draw on the led display, detect button presses, send infra-red codes, detect movement,&#xA;listen to Bluetooth, use Wi-fi.&lt;/p&gt;&#xA;&lt;p&gt;There are many other manufacturers providing similar devices and environments, such as the new &lt;a href=&quot;https://www.raspberrypi.org/documentation/pico/getting-started/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Raspberry Pi Pico&lt;/a&gt; and the BBC &lt;a href=&quot;https://microbit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;micro:bit&lt;/a&gt;, and Adafruit (they call their version CircuitPython), for the same or even lower prices, though you don't need to buy a device per person.&lt;/p&gt;&#xA;&lt;p&gt;No need for an IDE (though I believe there are some). A simple command line program lets you talk to the python interpreter directly, or use it to download a Python file. Or some manufacturers provide an in-the-browser IDE (&lt;a href=&quot;https://makecode.microbit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;example&lt;/a&gt;) that can simulate and/or download the resulting source into the device over usb.&lt;/p&gt;&#xA;&lt;p&gt;There is something very rewarding about seeing something physically tangible happen when you run your code.&lt;/p&gt;&#xA;" OwnerUserId="10079" LastActivityDate="2021-02-05T09:04:19.093" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6794" PostTypeId="2" ParentId="6777" CreationDate="2021-02-05T11:27:41.980" Score="3" Body="&lt;p&gt;&lt;strong&gt;Web scraping&lt;/strong&gt; is a vast domain that might interest students. Python is great for string matching (the power of regular expressions!), for parsing HTML  (or XML or JSON) into structures that are so much more simple to manipulate.&lt;/p&gt;&#xA;&lt;p&gt;There are even sites that provide APIs to help. The Python &lt;a href=&quot;https://praw.readthedocs.io/en/latest/getting_started/quick_start.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Praw&lt;/a&gt; library allows you to wander down Reddit pages your students may already be reading, using just a few lines of code.&lt;/p&gt;&#xA;&lt;p&gt;There are &lt;a href=&quot;https://wiki.python.org/moin/RssLibraries&quot; rel=&quot;nofollow noreferrer&quot;&gt;RSS parsers&lt;/a&gt; to be constantly in the know, with many site providing RSS feeds.&lt;/p&gt;&#xA;&lt;p&gt;From there, you can progress to &lt;a href=&quot;https://selenium-python.readthedocs.io/getting-started.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;selenium&lt;/a&gt; to show how bots click buttons for you, and can warp reality into the fake world we see, with so little effort.&lt;/p&gt;&#xA;" OwnerUserId="10079" LastActivityDate="2021-02-05T11:27:41.980" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6795" PostTypeId="2" ParentId="3840" CreationDate="2021-02-05T12:40:17.130" Score="0" Body="&lt;p&gt;Many web sites now use &lt;em&gt;ajax&lt;/em&gt; to call back to the server to make dynamic updates to an already loaded page. This is perfect for mixing Javascript with Python, as there are several standalone web servers written in Python, such as &lt;a href=&quot;https://docs.cherrypy.org/en/latest/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CherryPy&lt;/a&gt; that can handle this, often using JSON data. &lt;a href=&quot;https://docs.cherrypy.org/en/latest/tutorials.html?highlight=ajax#tutorial-8-make-it-smoother-with-ajax&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example tutorial&lt;/a&gt;. The &lt;em&gt;jquery&lt;/em&gt; library is often also used, but it is not essential.&lt;/p&gt;&#xA;&lt;p&gt;HTML5 also provides the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/WebSocket&quot; rel=&quot;nofollow noreferrer&quot;&gt;websocket&lt;/a&gt; communication api, that is great for streaming data from a server, such as a ticker. There are several Python libraries that provide this.&lt;/p&gt;&#xA;" OwnerUserId="10079" LastActivityDate="2021-02-05T12:40:17.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6796" PostTypeId="2" ParentId="6777" CreationDate="2021-02-05T14:48:20.497" Score="1" Body="&lt;p&gt;&lt;strong&gt;Make a Snake (Python) game&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;My very first class in collage (CS) was to make a snake game.&#xA;We got some code (like input control and rendering) and just had to connect the pieces and do some simple coding. This class was basically to get everybody comfortable with using the IDE and coding.&lt;/p&gt;&#xA;&lt;p&gt;The good thing was that those of us that found it very easy could add improvements to the game like sound and better graphics. And the teacher could concentrate on helping those that needed basic help.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Snake_(video_game_genre)&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Snake_(video_game_genre)&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10082" LastActivityDate="2021-02-05T14:48:20.497" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6797" PostTypeId="2" ParentId="6777" CreationDate="2021-02-05T14:53:41.823" Score="1" Body="&lt;h1&gt;Design a Vending Machine&lt;/h1&gt;&#xA;&lt;p&gt;A straight forward project that I've seen used and worked through myself is to implement a vending machine. Pretty much everyone knows how a vending machine works, so there isn't a learning curve on what the requirements are.&lt;/p&gt;&#xA;&lt;p&gt;It can be really simple, using a command line interface to enter money, select an option, and get change back.&lt;/p&gt;&#xA;&lt;p&gt;You could add basic inventory management, keeping track of how many of each item are available - even storing the current inventory in a file, giving the need to work with persisting data in a variety of file formats (simple text file, JSON/YAML)&lt;/p&gt;&#xA;&lt;p&gt;After the command line version is working, they can learn to create a GUI to represent the vending machine, using the same underlying code. This can help to discover the need to separate business logic from representation.&lt;/p&gt;&#xA;" OwnerUserId="2918" LastActivityDate="2021-02-05T14:53:41.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6798" PostTypeId="2" ParentId="6709" CreationDate="2021-02-05T15:10:27.273" Score="1" Body="&lt;p&gt;I found a Python class to be so simple to write (for &amp;quot;mundane&amp;quot; tasks), that they can grow naturally out of a desire to simplify and refactor code in development. It is very much a &lt;em&gt;pragmatic&lt;/em&gt; bottom-up approach; you were expecting to hack some simple code for a particular purpose, then it grows a bit and you find you have several functions handling &amp;quot;structures&amp;quot; that were tuples or arrays or even globals.  Suddenly, you see the light and create a class, and the code size gets divided by 2 or more, and is &lt;em&gt;so much simpler&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is an easy way to argue for OOP, by taking some &amp;quot;flat&amp;quot; concrete existing code and looking for the abstraction that could be made, moving the data out of the function parameters, into the class, and using &lt;code&gt;self&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Things like inheritance can similarly be discovered almost naturally; you use an existing class that doesn't quite do what you want and you need to change it; instead of copying and modifying it, you subclass and change or add a method.&lt;/p&gt;&#xA;&lt;p&gt;For concrete examples, you can look at computer hardware itself. At a low level, registers are often partitioned into several disparate functions. If you want to set a feature bit to 1, you need to shift it left 20 bits, read the current value of the register, mask out bits 0 to 5 as they are &amp;quot;write 1 to clear&amp;quot;, and so on. Try emulating a serial port 16550 uart; it is good for the soul. And, of course, if you use MicroPython running on a real microprocessor, you could probably even try out your code.&lt;/p&gt;&#xA;" OwnerUserId="10079" LastEditorUserId="9154" LastEditDate="2021-06-01T03:34:05.297" LastActivityDate="2021-06-01T03:34:05.297" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6799" PostTypeId="2" ParentId="6777" CreationDate="2021-02-05T19:12:00.177" Score="2" Body="&lt;p&gt;&lt;strong&gt;Sound&lt;/strong&gt; is another subject that can be as simple or complex as you like. The format of a &lt;a href=&quot;https://docs.fileformat.com/audio/wav/&quot; rel=&quot;nofollow noreferrer&quot;&gt;wav file&lt;/a&gt; is already pretty complex. You can read the header in Python, and then decode the pcm data stream and, for example, write a new file with half the volume. It should be easy to verify by ear if your program got it right! By only reading and writing files the tricky business of handling audio hardware can be avoided.&lt;/p&gt;&#xA;&lt;p&gt;Even with this simple format, there are lots of things to try, like detecting and removing silence, or almost silence; converting stereo to mono; re-sampling at a lower rate; generating a sine wave tone at 440hz; superimposing tones; fading two files into one; calculating the average volume every 10 seconds and drawing the envelope shape down the terminal like a cash till printer; drawing a VU meter on the terminal using carriage-return to go back to the start of the line.  Perhaps you can find out how shazzam identifies music?&lt;/p&gt;&#xA;&lt;p&gt;I see there is now a Python &lt;a href=&quot;https://docs.python.org/3/library/wave.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;wave&lt;/a&gt; library to simplify things once the basics have been understood.&#xA;There is also a pyaudio library to play and record streams, and I see examples using matplotlib for the graphics, which is going a bit far. For non-dynamic output, the SVG format could be interesting, as it is directly viewable in a browser, and there are some Python libraries for it.&lt;/p&gt;&#xA;" OwnerUserId="10079" LastActivityDate="2021-02-05T19:12:00.177" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6800" PostTypeId="2" ParentId="6777" CreationDate="2021-02-06T09:57:36.707" Score="2" Body="&lt;p&gt;I teach first/second semester students C, and what I usually do is start with rather simple tasks like finding out whether a year is a leap year, a wordcount (wc) or ls program etc.&lt;/p&gt;&#xA;&lt;p&gt;Later I progress to &amp;quot;projects&amp;quot;.  Most of thess---this is C after all---are simply taken from UNIX console utilities:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;nc: Connect to TCP/UDP/UNIX sockets or listen on them&lt;/li&gt;&#xA;&lt;li&gt;tar: Archive (not compress!) files.  This is actually surprisingly easy!  Bonus benefit that their archive files can be decompressed by other tar Programs!&lt;/li&gt;&#xA;&lt;li&gt;PCM picture manipulation:  PCM is a simple text based picture format.  They can build programs to manipulate saturation or invert colors and then display them in an image viewer&lt;/li&gt;&#xA;&lt;li&gt;interactive PCM picture manipulation:  The previous can be expanded, with SDL in our case, to also draw a simple GUI.&lt;/li&gt;&#xA;&lt;li&gt;snake:  Either with SDL or curses/termbox&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In my experience, all can be implemented after roughly a week.  The specific project to choose is up to themselves, they can also implement their own ideas after speaking with us.&lt;/p&gt;&#xA;" OwnerUserId="9311" LastActivityDate="2021-02-06T09:57:36.707" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6801" PostTypeId="2" ParentId="6758" CreationDate="2021-02-06T10:23:44.110" Score="1" Body="&lt;p&gt;This is a really nice question! Your answer covers a lot of ground too.&lt;/p&gt;&#xA;&lt;p&gt;I’d like to offer a reflection on what might motivate these questions.&lt;/p&gt;&#xA;&lt;p&gt;In my experience, learners who encounter OOP early in their journey have to wrestle with a few different challenges, including:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They’ve not yet experienced the problem/s that OOP solves.&lt;/li&gt;&#xA;&lt;li&gt;They believe that there is a perfect solution to all programming challenges waiting to be discovered.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;These give rise to a whole load of questions, confusions and, in some cases, insecurities.&lt;/p&gt;&#xA;" OwnerUserId="10085" LastActivityDate="2021-02-06T10:23:44.110" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6802" PostTypeId="2" ParentId="6547" CreationDate="2021-02-06T11:15:54.260" Score="2" Body="&lt;p&gt;Ah, this is a tricky one and you’re clearly dedicated to helping this person so I imagine you’re finding this hard.&lt;/p&gt;&#xA;&lt;p&gt;I read the core issue as being that the person you’re trying to help is not giving you honest feedback. I.e. they repeatedly indicate that they understand some thing or some explanation when in fact they do not.&lt;/p&gt;&#xA;&lt;p&gt;If this is true, there’s likely to be some quite fundamental stuff which they’re yet to grasp that is blocking them from making progress on the task/s in hand but, because they’re not open about (or aware of?) what that is, you’re focussed on the wrong things.&lt;/p&gt;&#xA;&lt;p&gt;I’d start by trying to reveal their current mental model of something simple - by that I mean simple to them, not simple to you. They may feel quite vulnerable during this exercise and it’s important that they do not fear reprisal. You could consider asking another member of staff, who is just a few steps ahead of this person, to be a mentor. This might create a space where the latter feels safe.&lt;/p&gt;&#xA;" OwnerUserId="10085" LastActivityDate="2021-02-06T11:15:54.260" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6803" PostTypeId="2" ParentId="6547" CreationDate="2021-02-07T08:53:43.753" Score="3" Body="&lt;p&gt;It's rather easy to observe that there is a pretty significant proportion of people who simply cannot ever program, do algebra-level math, etc. See also the following SE questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/3881/is-there-some-meaningful-percentage-of-students-who-cant-learn-to-program/6112#6112&quot;&gt;Is there some meaningful percentage of students who can&amp;#39;t learn to program?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://matheducators.stackexchange.com/questions/11396/what-fraction-of-the-population-is-incapable-of-learning-algebra/&quot;&gt;https://matheducators.stackexchange.com/questions/11396/what-fraction-of-the-population-is-incapable-of-learning-algebra/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Trying for a zero-tolerance &amp;quot;no one can fail to do this&amp;quot; is counter-productive and a waste of resources. Some of us (e.g., U.S. community college) teach in a situation where that describes the majority of our students. After 3 tries in your case you're basically wasting your company's time.&lt;/p&gt;&#xA;&lt;p&gt;Lay out the situation to you manager, with time spent on the task, and see if they want you to continue pursuing this.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2021-02-07T08:53:43.753" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6804" PostTypeId="1" CreationDate="2021-02-08T14:38:08.147" Score="5" ViewCount="160" Body="&lt;p&gt;My niece is 11 this year and has shown a surprisingly deep interest in programming. She will spend hours on Khan Academy, using their javascript/processingjs environment. This is educational, but it's not a toy or a visual/drag-and-drop interface; it's raw javascript, with a bit of help from the compiler (in the form of a cartoon character that says things like &amp;quot;are you missing a semi-colon?&amp;quot;).&lt;/p&gt;&#xA;&lt;p&gt;Since I'm the programmer in the family, I've been working with my niece to develop her interest, and I'm unsure how to go about it further. She wants to develop video games or animations, so she'll look at programs that other people have written, but these are generally big and hard to follow. What she can do on her own is find individual lines of code that she can understand, like a call to &lt;code&gt;fill(color)&lt;/code&gt; and she'll change the color, or &lt;code&gt;rect(x,y,width,height)&lt;/code&gt; and change the parameters to change where the rectangle is drawn.&lt;/p&gt;&#xA;&lt;p&gt;When I work with her, she'll ask for features, and I'll implement them and explain, and she seems to follow the explanation, but she can't generate the code herself, or understand how to decompose a complex task into pieces small enough that she can implement them, and then assemble the pieces into what she wants to build&lt;/p&gt;&#xA;&lt;p&gt;I'm wondering if there's a curriculum or toolkit out there that would guide a child--slowly--through the skills. AFAICT, the Khan academy system isn't really that kind of thing, more like an environment and some tutorials, and access to other people's code, but not a linear course to follow.&lt;/p&gt;&#xA;&lt;p&gt;I'm thinking of something like &lt;a href=&quot;https://www.pythonlikeyoumeanit.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python Like You Mean It&lt;/a&gt;, but for kids, and ideally oriented towards graphical output--something that the child could follow along in a linear way, to provide structure to her studies.&lt;/p&gt;&#xA;&lt;p&gt;Or would that run the risk of killing a budding interest, and should I just let her play and wait and see where it goes?&lt;/p&gt;&#xA;" OwnerUserId="10097" LastEditorUserId="1293" LastEditDate="2021-02-08T19:50:31.580" LastActivityDate="2021-05-09T02:28:58.967" Title="Curriculum for a primary school learner" Tags="|student-motivation|programming|primary-school|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6805" PostTypeId="2" ParentId="6777" CreationDate="2021-02-08T19:22:59.907" Score="1" Body="&lt;p&gt;Sudoku game/solver can be a fun project. I did this in my C/C++ class but should be good for Python as well. At the same time I did a Rust version so those that might be interested could compare them ;)&lt;/p&gt;&#xA;" OwnerUserId="10103" LastActivityDate="2021-02-08T19:22:59.907" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6806" PostTypeId="2" ParentId="6804" CreationDate="2021-02-08T19:41:59.170" Score="1" Body="&lt;p&gt;For Java ideas, look at the free to join &lt;a href=&quot;https://greenroom.greenfoot.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenroom&lt;/a&gt; that is a resource collection place for the Greenfoot programming environment. There are a wide variety of project (see Resources) for programming projects within this environment.&lt;/p&gt;&#xA;&lt;p&gt;Greenfoot is a scaffolding environment based on a grid like world that contains objects of various kinds that the student manipulates by writing programs. Each project is different and the granularity of the grid can be large or small.&lt;/p&gt;&#xA;&lt;p&gt;It is mostly used in secondary school and beginning university courses for a first course.&lt;/p&gt;&#xA;&lt;p&gt;For example, frogs might chase flies or just move to lily pads. Some of the scenarios are Turing complete but also minimal so that any program can be written with a minimum of constructs.&lt;/p&gt;&#xA;&lt;p&gt;Greenfoot contains its own editor and compiler and is highly graphical.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;One reason that I recommend Java, other than the wealth of resources, is that it is relatively easy to build the scaffolding of projects (worlds) within which the students program. Thus they don't need to start with a blank page and no conceptual guidance. The world itself provides a rich metaphor about what is possible and how to go about things.&lt;/p&gt;&#xA;&lt;p&gt;In particular, I believe that avoiding the details of the primitive data types of programming languages is a good thing for the beginner. It is possible to teach about half of the first university course with programmer defined primitives (robots, frogs, ...) rather than ints and floats. The implication is that students learn first about the structure of programs, not the trivia, and can learn the lesson that &lt;em&gt;abstraction&lt;/em&gt; is the big idea, whether function abstraction or object abstraction.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;There is a more general site: &lt;a href=&quot;https://bluej.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;BlueJ&lt;/a&gt;, built by the same team, that is a bit more sophisticated and doesn't rely on a grid based world. It is a full development IDE. It also has an associated &lt;a href=&quot;https://blueroom.bluej.org/door&quot; rel=&quot;nofollow noreferrer&quot;&gt;Blue Room&lt;/a&gt; where instructor-supplied projects are collected.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-02-08T21:25:32.577" LastActivityDate="2021-02-08T21:25:32.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6807" PostTypeId="2" ParentId="6804" CreationDate="2021-02-08T19:48:18.987" Score="3" Body="&lt;p&gt;You might want to explore &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; for use with any youngster. While it doesn't use programming, it provides some foundation in computational thinking and provides some metaphors, etc, that might be useful to learning even in an environment where the student is learning to program.&lt;/p&gt;&#xA;&lt;p&gt;I don't think it is necessary to do everything in the CS Unplugged curriculum &lt;em&gt;prior&lt;/em&gt; to starting programming. And you might not want to use any of it explicitly, but it is worth the effort for an inexperienced teacher to explore this at least.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-02-08T19:48:18.987" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6808" PostTypeId="2" ParentId="6804" CreationDate="2021-02-10T15:46:38.327" Score="4" Body="&lt;p&gt;My grand-daughter is interested in programming and has been from the age of 5 or so (and is now nearly 10).&lt;/p&gt;&#xA;&lt;p&gt;I teach programming at university and my son-in-law (her father) teaches at secondary school level so we both have experience at teaching different age ranges.&lt;/p&gt;&#xA;&lt;p&gt;We find the Usborne books to be very useful for that age range, and they are so interesting that I end up pointing some undergraduate students at them.&lt;/p&gt;&#xA;&lt;p&gt;In particular I like the &lt;a href=&quot;https://usborne.com/gb/lift-the-flap-computers-and-coding-9781409591511&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Lift-the-Flap Computers and Coding&amp;quot;&lt;/a&gt; title:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://usborne.com/gb/lift-the-flap-computers-and-coding-9781409591511&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/bOI7b.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The child in question now programmes in Scratch&lt;sup&gt;†&lt;/sup&gt; and Python.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;† Scratch is from MIT and designed for teaching coding to younger ages using visual programming. See &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://scratch.mit.edu/&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="694" LastEditorUserId="694" LastEditDate="2021-02-10T17:30:44.907" LastActivityDate="2021-02-10T17:30:44.907" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6809" PostTypeId="2" ParentId="6777" CreationDate="2021-02-10T20:48:22.843" Score="2" Body="&lt;p&gt;Other cool game with simple logic to it would be Conway's game of life.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10103" LastActivityDate="2021-02-10T20:48:22.843" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6810" PostTypeId="1" CreationDate="2021-02-11T11:24:27.413" Score="2" ViewCount="84" Body="&lt;p&gt;I came accross this handout of &lt;a href=&quot;https://www.aiunplugged.org/english.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;aiunplugged&lt;/a&gt;, specifically the topic of reinforcment learning (on page 12). I planned to do this boardgame, where students experience the concept of reinforcement learning. They play a simplefied (3x3 field) version of chess only with pawns. The goal of each player is to either reach one pawn to the side of the opponent, by capturing all of the figures (of the opponent) or blocking the opponent (no moves possoble for the opponent). One player is the machine and one is the human. The machine player has an additional sheet with possible moves based on the game state, which he/she first randomly chooses from. In the beginning the machine is losing a lot, however over time, when it starts to win, it will keep this move. Over time, when the bad moves of the machine are getting eliminated, the machine gets better, and after a while impossible to beat.&lt;/p&gt;&#xA;&lt;p&gt;So now my question: &lt;strong&gt;Since teaching from home is still ongoing, is there any digital equivalent of this game or does anyone know anything similar, where students should experience machine learning in a simplified manner?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Thank you&lt;/p&gt;&#xA;" OwnerUserId="2324" LastActivityDate="2021-02-12T04:35:05.173" Title="Trying out the concepts of machine learning during teaching from home" Tags="|artificial-intelligence|machine-learning|" AnswerCount="1" CommentCount="2" FavoriteCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6811" PostTypeId="1" CreationDate="2021-02-11T13:34:25.293" Score="2" ViewCount="77" Body="&lt;p&gt;I am looking for some introductions to the actor model. I don't mind books in specific programming languages, as long as they don't distract away or restrict the presentation of the model&lt;/p&gt;&#xA;&lt;p&gt;Is this a good one?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Actors: A Model of Concurrent Computation in Distributed Systems (MIT Press), by Gul Agha, 1986&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I am uncertain because&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it is a PhD dissertation which might be for things that were experimental and then found useless, and&lt;/li&gt;&#xA;&lt;li&gt;it was in 1986 and I am not sure how much the model has changed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="1532" LastActivityDate="2021-02-11T13:34:25.293" Title="introduction materials to the actor model?" Tags="|resource-request|textbook|concurrency|" AnswerCount="0" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6812" PostTypeId="2" ParentId="6810" CreationDate="2021-02-12T04:35:05.173" Score="3" Body="&lt;p&gt;While I don't know any digital equivalent of that particular game or neither I was introduced to RL this way either. But, still there are other games and videos that might help you to teach your students RL. Some of them were actually very useful when I was a beginner.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;EVOLUTION (By Keiwan Donyagard)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/SbRko.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/SbRko.png&quot; alt=&quot;EVOLUTION APP (It's a game to make people familiar with Reinforcement Learning)&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It's a downloadable Android App based Game where the players create creatures with bones (represented with Black Stick), joints (represented with Red circle/spot) and Muscles (red , connecting the bones). The organisms starts hundreds of thread and learns to walk bit by bit and after each iteration by iteration, they become perfect learners after few minutes.&lt;/p&gt;&#xA;&lt;p&gt;Link : &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.keiwando.Evolution&amp;amp;hl=en_US&amp;amp;gl=US&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://play.google.com/store/apps/details?id=com.keiwando.Evolution&amp;amp;hl=en_US&amp;amp;gl=US&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;Flappy Bird Video (Uses a bit of Deep Learning Methods, an example of Deep RL)&#xA;&lt;a href=&quot;https://i.stack.imgur.com/GHXmk.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/GHXmk.jpg&quot; alt=&quot;AI Playing Flappy Bird&quot; /&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://www.youtube.com/watch?v=WSW-5m8lRMs&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=WSW-5m8lRMs&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Google's DeepMind Playing Atari&#xA;&lt;a href=&quot;https://i.stack.imgur.com/7DvB2.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/7DvB2.jpg&quot; alt=&quot;Google DeepMind playing Atari&quot; /&gt;&lt;/a&gt;&#xA;&lt;a href=&quot;https://www.youtube.com/watch?v=V1eYniJ0Rnk&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=V1eYniJ0Rnk&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There are some experiments where AI did outsmart their creators and performed unexpectedly well too.&lt;/p&gt;&#xA;&lt;p&gt;Here are some videos:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=GdTBqBnqhaQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=GdTBqBnqhaQ&lt;/a&gt; (By Two Minute Papers)&#xA;&lt;a href=&quot;https://i.stack.imgur.com/s2oV7.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/s2oV7.jpg&quot; alt=&quot;Two Minute Papers' video&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;OpenAI Hide and Seek which actually breaks the game (&lt;a href=&quot;https://www.youtube.com/watch?v=kopoLzvh5jY&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=kopoLzvh5jY&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/rIOwE.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/rIOwE.jpg&quot; alt=&quot;OpenAI Hide and Seek&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Motivation: Reinforcement Learning and Deep Reinforcement Learning is an important field of study in AI because it is a general way to Build an AGI and ASI. (AGIs called Artificial General Intelligence and ASIs are called Artificial Super Intelligence.) The core development and framework of such systems have already been put in form of AIXI and AIXI-tl and they would definitely change the way whole humanity looks at it. Some of the notable researchers claim that Artificial Super Intelligence would be the last ever the biggest invention of Humanity and the most terrifying thing is that we still don't have a proper framework and ethical standards set for use of such super intelligent systems (Superintelligence: Paths, Dangers, Strategies, Nick Bostrom.). While some theoretical paper do have measures of frameworks on dangers of such systems (&lt;a href=&quot;https://arxiv.org/abs/1607.00913&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://arxiv.org/abs/1607.00913&lt;/a&gt;), but we still are far from specific idea about the matter. This is primarily because of lack of researchers here in this particular field. We hope more and more people join and contribute to the emergence, control and setup of ethical standards of such super intelligent Systems.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="9898" LastActivityDate="2021-02-12T04:35:05.173" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6813" PostTypeId="1" AcceptedAnswerId="6814" CreationDate="2021-02-14T16:02:39.687" Score="2" ViewCount="232" Body="&lt;p&gt;I want to start learning Java from scratch. But as a beginner, I don't know where to start or what to learn first. I have basic knowledge in C++ but Java is an entirely new area to me. Can anyone give me some instructions and good books to start properly?&lt;/p&gt;&#xA;" OwnerUserId="10115" LastEditorUserId="1035" LastEditDate="2021-03-25T16:27:15.500" LastActivityDate="2021-03-25T16:27:15.500" Title="How to learn Java as a beginner?" Tags="|self-learning|programming|java|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6814" PostTypeId="2" ParentId="6813" CreationDate="2021-02-14T16:31:47.007" Score="2" Body="&lt;p&gt;The first thing you need to understand is that your second language is, perhaps the hardest of all to learn. You already know &amp;quot;how to program&amp;quot; and so the second language seems to get in the way of that. Alternatively you just use the second language in the same way you used the first, resulting in ugly and sub-optimal programs. So, you want to guard agains that.&lt;/p&gt;&#xA;&lt;p&gt;It is actually somewhat easier to learn a second language if it is nothing at all like the first, since you can't try to impose habits from one language on the other and have to absorb the actual philosophy of the new language. So, Scheme, for example, after C++ (or before) forces you to think in a new way.&lt;/p&gt;&#xA;&lt;p&gt;So, learning Java after C++ is especially difficult, since the lowest level syntax of the two is nearly the same, but the underlying philosophy (paradigm) is quite different. In particular, Java and C++ both use what they call classes but they are really different creatures.&lt;/p&gt;&#xA;&lt;p&gt;One book I'd recommend very highly (since I know and trust one of the authors) is by &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0134477367&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Barnes and Kölling&lt;/a&gt;. It does, however depend on also using the &lt;a href=&quot;https://bluej.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;BlueJ&lt;/a&gt; IDE which they created and is available free online.&lt;/p&gt;&#xA;&lt;p&gt;The reason I recommend it is that it introduces &lt;em&gt;objects&lt;/em&gt; from the beginning, which is the fundamental difference between C++ and Java. So, if you put aside what you think you know about programming and believe in the authors, you should do well. They both have a very (very) deep understanding of what Object Orientation means.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;An alternative that would work, if you somehow object to BlueJ is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1119740207&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cay Horstmann's Big Java Early Objects&lt;/a&gt;. It, too, starts with objects which is my primary recommendation. I also know Cay. He also has a Late Objects version that I don't recommend for a bunch of reasons, but one is that the first part of that book would be likely to bore you. While it might seem an easier path, it won't take you where you need to go as directly as the Early Objects version.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;A third possibility, though it is intended more for first time programmers rather than for someone with experienced in another language, is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0970579519&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Karel J Robot&lt;/em&gt; by Bergin, Stehlik, Roberts, and Pattis&lt;/a&gt;. This book focuses entirely on object oriented programming in Java but does not try to teach the entire language. It does, however, provide a system in which any program can be written. Like Pattis' original &lt;em&gt;Karel the Robot&lt;/em&gt; it is an attempt to provide a minimal but complete system including a simulator in which interesting (and difficult) programs can be written.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-02-14T17:30:17.737" LastActivityDate="2021-02-14T17:30:17.737" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6816" PostTypeId="1" AcceptedAnswerId="6817" CreationDate="2021-02-16T14:07:27.380" Score="2" ViewCount="215" Body="&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hello, I am a third year undergraduate in CS. I am eager to pursue higher education from one of the best institutes in out country. For that I need to write a competitive exam, named GATE which had this &lt;a href=&quot;https://drive.google.com/file/d/15m1czm6LIqRhskbqLPNvcfqY0ot_8ZdT/view&quot; rel=&quot;nofollow noreferrer&quot;&gt;syllabus&lt;/a&gt; for this year 2021. The syllabus remains more or less the same each and every year.&lt;/p&gt;&#xA;&lt;p&gt;The pattern is as follows, 65 questions , time 3 hours.&#xA;So for each question, I can afford at most 2.76 mins, which is quite a constrained amount of time, considering the level of the questions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://pyq.ravindrababuravula.com/subjects/&quot; rel=&quot;nofollow noreferrer&quot;&gt;This&lt;/a&gt; is to give an idea about the level of the questions&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;As per the given syllabus, the exam asks quite involving questions on Graph Theory, with questions based on properties of graph algorithms, tree formed by traversals, or coloring or other important but at times unseen (by the candidates) properties or concepts. Mostly they tend to ask questions from unseen topics, which probably one has not handled previously unless he is quite lucky. In such cases they definite the topics and then asks on them.&lt;/p&gt;&#xA;&lt;p&gt;Usually questions are like select the most appropriate options or marking the true statements.&lt;/p&gt;&#xA;&lt;p&gt;Now it is quite difficult (for me at least) to understand in 2.76 mins the new concept (defined in the question), read the statements, find counter examples for them to prove them wrong. At worse for some statements it might happen, that I am unable to find the counter example in that 2.76 mins of time, but it might happen that a more difficult counter example might exist.&lt;/p&gt;&#xA;&lt;p&gt;One can have a look at the type of question in graph theory &lt;a href=&quot;https://pyq.ravindrababuravula.com/topic/?tp=Graph-Theory&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://pyq.ravindrababuravula.com/subject/?cs=Algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://pyq.ravindrababuravula.com/subject/?cs=Data-Structures&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Situation/Request&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I have gone through &lt;em&gt;CLRS&lt;/em&gt; and I am acquainted with the terminologies or graph theory algorithms and properties of tree produced by traversals etc. But the thing is that all these I have learnt, by going through the text many times and I have been quite slow at grasping those concepts given in &lt;em&gt;CLRS&lt;/em&gt;.I have even gone to &lt;em&gt;Kenneth Rosen's Discrete Mathematics&lt;/em&gt; texts.&#xA;As per the recommendations given in few coaching institutes (note that I do not go to any one of them, I do self study, got to know from my classmate), I have picked up &lt;em&gt;Narsingh Deo's Graph Theory&lt;/em&gt; text and I am going through it now.&lt;/p&gt;&#xA;&lt;p&gt;[I have solved most of the exercise questions of CLRS (except for the &lt;span class=&quot;math-container&quot;&gt;$\star$&lt;/span&gt; questions) mostly on my own but only for once, long a ago, while reading the text for the first time. Some questions even took a single day to think (too slow indeed). Rosen has a huge no of questions at the end of each text, that too I have solved not all but selectively as I found few problems repetitive there, and that too I have done only once. But I have read the text many more times (that too selectively), so that I do not forget the things which I have learnt...]&lt;/p&gt;&#xA;&lt;p&gt;Could anyone recommend me some good text or detailed video lecture series (not a very advanced one) that would help me to build &lt;em&gt;intuition&lt;/em&gt; behind graph theory properties or statements unknown to me. The texts which I have already read are classic and fine, but I find it difficult at times to answer questions in the GATE, (might be due to the short time or might be that I am not that sharp) but still I want to sharpen my skills in dealing with these problems of graph theory. Even the weightage of this subject is quite high every year.&lt;/p&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastEditorUserId="9124" LastEditDate="2021-02-16T14:42:31.450" LastActivityDate="2021-02-16T21:15:24.873" Title="Textbook or video lectures to develope intuition for solving any unseen Graph Theory problems" Tags="|self-learning|resource-request|algorithms|data-structure|graph-theory|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6817" PostTypeId="2" ParentId="6816" CreationDate="2021-02-16T20:56:54.603" Score="5" Body="&lt;p&gt;I'm writing only a partial answer, because I currently lack time. That means that I'm not properly sourcing everything, and largely working from my own memory.  I don't believe that anything I say below will be &lt;em&gt;wrong&lt;/em&gt;, though it is definitely possible that I might be forgetting a few things.  In any case, hopefully this will be enough to get you started / unstuck.&lt;/p&gt;&#xA;&lt;p&gt;The test does look quite difficult!  I teach several of the topics, and they were largely what I would expect from the end of an undergraduate university degree, but with the added pressure of timing and high stakes.  Ouch!&lt;/p&gt;&#xA;&lt;p&gt;When attempting to gain fluency (in any topic), you are looking to make a few kinds of connections:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&amp;quot;This is just like...&amp;quot; -- these connections allow you to utilize systems that your brain already understands well.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&amp;quot;These ideas group together&amp;quot; -- this is called &amp;quot;chunking&amp;quot;, and it is how we group small ideas into larger and larger pictures.  When you &amp;quot;chunk&amp;quot; ideas together, you are able to manipulate the chunk in your mind instead of all of the small details.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&amp;quot;This system looks like&amp;quot; -- much like #1, this allows you to &amp;quot;see&amp;quot; how systems work in your mind's eye.  Then you can manipulate your visuals.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;In essence, you are trying to &lt;em&gt;group&lt;/em&gt; and &lt;em&gt;simplify&lt;/em&gt; ideas.&lt;/p&gt;&#xA;&lt;p&gt;To gain fluency, additionally, don't be afraid of memorization (though don't focus on it exclusively, either.)  The purpose of memorization should not be to be able to regurgitate everything, but rather to give you quick enough recall that you can use the idea in a larger system.&lt;/p&gt;&#xA;&lt;p&gt;Think about it this way: there is a cognitive tax to using any idea that we know.  If the cognitive tax is very high, then using the idea takes nearly all of our focus.  This limits what we can learn, because to really understand larger ideas, we need space in the active, working parts of our brain to encompass all of the smaller ideas that the larger idea needs.  If the smaller ideas are taking up all of our active resources, that becomes impossible.&lt;/p&gt;&#xA;&lt;p&gt;Thus, the goal of memorization is to reduce cognitive tax.  If you are working hard to memorize beyond that, then you are wasting your efforts - you are not going to gain further fluency through memorization.  You need to instead focus on chunking, visualizing, and relating ideas to one another so that you can see bigger pictures and larger groups.&lt;/p&gt;&#xA;&lt;p&gt;Also, it is useful to practice on a mix of simple and hard problems.  The first group reinforce and strengthen the patterned connections that you have already made.  The second group force you to stretch those patterns out in new directions, and can help you spot new uses and simplifications.&lt;/p&gt;&#xA;&lt;p&gt;I have always found that teaching others helps me to gain fluency, as it forces me to make explanations that distill systems for other people.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-02-16T21:15:24.873" LastActivityDate="2021-02-16T21:15:24.873" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6818" PostTypeId="1" CreationDate="2021-02-17T00:23:48.083" Score="3" ViewCount="105" Body="&lt;p&gt;I am creating an exam, and I would like to try to incorporate a few &lt;a href=&quot;https://cseducators.stackexchange.com/questions/302/effectiveness-of-parsons-problems&quot;&gt;Parsons Problems&lt;/a&gt;.  I am beginning to wonder if this is reasonably possible.&lt;/p&gt;&#xA;&lt;p&gt;The advantages are (1) it allows struggling students to demonstrate some of their understanding, (2) it is potentially easy to grade.&lt;/p&gt;&#xA;&lt;p&gt;My question is with regards to that second item.  How could one grade a question like this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What ordering of these lines would create a program that swaps the first number and last number in array &lt;code&gt;fst&lt;/code&gt;?  Not every line given will necessarily need to be used.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;a. fst[fst.length-1] = temp;&#xA;b. int temp = fst[0];&#xA;c. int temp2 = fst[fst.length];&#xA;d. fst[0] = fst[fst.length-1];&#xA;e. fst[fst.length] = fst[0];&#xA;f. fst[0] = temp2; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There are a number of possible errors that students could make, and only two completely correct responses.&lt;/p&gt;&#xA;&lt;p&gt;They could:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Misorder lines&lt;/li&gt;&#xA;&lt;li&gt;Include distractor lines&lt;/li&gt;&#xA;&lt;li&gt;Not include needed lines&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So, how would one award a score to such a problem?  I want to devise something at least somewhat fair, and I am having trouble seeing how to award credit when there are various errors.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sub&gt;(NOTE: I am aware that there are richer, more meaningful ways to deeply assess student understanding.  I would love to grade everything by code reviews and write-ups, but the reality of my current work situation would make this absolutely impossible. I need ways to assess, even imperfectly, some amount of student understanding in a time-efficient way.  I must pick and choose what I assess deeply.  I am aware that any grading rubric will be imperfect.  What I wish to do is &lt;em&gt;the best I reasonably can.&lt;/em&gt;)&lt;/sub&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-02-17T23:56:23.457" LastActivityDate="2021-07-29T14:20:21.423" Title="How should Parsons Problems be graded?" Tags="|grading|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6820" PostTypeId="1" CreationDate="2021-02-18T20:08:00.487" Score="5" ViewCount="86" Body="&lt;p&gt;I have hit a plateau in learning to program in that while I know CS concepts and I can read and write a program such as a diminished &lt;code&gt;find&lt;/code&gt; clone, I cannot create anything that's spread across multiple files, and making meaningful changes to something already existing requires some comprehension that I at present lack. When I start reading a new project of someone else's in hopes to make changes, the first, hard, step is that I usually literally do not know where to start, as in which source file to read first, especially if it is a language which has nothing like a &lt;code&gt;Main&lt;/code&gt; class. I have done some inconsequential projects in Java before requiring multiple classes, thus multiple pages and no obvious start, but these projects were all small enough for me to hold the entire project in my head.&lt;/p&gt;&#xA;&lt;p&gt;What's the next step? How do I learn to work beyond making one-file scripts with one or two supporting and header files?&lt;/p&gt;&#xA;" OwnerUserId="8043" LastActivityDate="2021-02-19T14:59:20.990" Title="How do you read and write a project beyond a one-page script?" Tags="|self-learning|project|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6821" PostTypeId="2" ParentId="6820" CreationDate="2021-02-18T22:03:26.210" Score="2" Body="&lt;p&gt;It's a little hard to know how to answer this without actually sitting down with you and talking, because there could be so, so many things that are standing in your way.  Here are a couple of guesses and hints:&lt;/p&gt;&#xA;&lt;p&gt;If you are working within an OOP paradigm, then the place to start is with the names of the classes and their APIs (the public-facing method signatures).  Some classes within a large project, and their primary use-cases, should become immediately clear just from these details.&lt;/p&gt;&#xA;&lt;p&gt;Only after I have at least attempted to get a sense of those structures would I turn to &lt;code&gt;public static void main(String[] args)&lt;/code&gt;.  Often, that will be enough to get you going.&lt;/p&gt;&#xA;&lt;p&gt;Now, as OO projects get larger, it becomes increasingly difficult to interpret their behaviors by looking at the code.  The authors of &amp;quot;Design Patterns - Elements of Reusable Object-Oriented Software&amp;quot; likened determining behavior just by looking at code to figuring out how an ecosystem functions just by looking at animal taxonomies.  The details are there (in theory), but much of the structure of design patterns is to allow the flexibility to choose behaviors and objects &lt;em&gt;during run-time&lt;/em&gt;, so looking at the code outside of runtime can shed surprisingly little light.&lt;/p&gt;&#xA;&lt;p&gt;In such situations, it helps to have studied object design patterns so that you have a fighting chance of identifying the patterns you're seeing.  Documentation, if it exists, can be very helpful.  And, as much as possible, you will want to keep the classes, class names, and APIs in mind, and only delve into code in order to understand pieces of that larger puzzle -- that lofty level is is where the heart of the logic is for such programs.&lt;/p&gt;&#xA;&lt;p&gt;Oh, and debuggers are your friend when trying to capture and understand runtime behaviors!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-02-18T22:03:26.210" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6822" PostTypeId="1" AcceptedAnswerId="6824" CreationDate="2021-02-19T08:41:59.717" Score="1" ViewCount="299" Body="&lt;p&gt;My background:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I have completed the course CS50X which covered C, python, web development, and some data structures in C. I can currently use C, python, and javascript.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I want to learn C++ and I want to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Contribute to open source projects&lt;/li&gt;&#xA;&lt;li&gt;Competitive Programming&lt;/li&gt;&#xA;&lt;li&gt;Take part in App development if possible&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9831" LastActivityDate="2021-06-23T01:47:30.187" Title="How to learn C++?" Tags="|self-learning|c++|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6823" PostTypeId="2" ParentId="6820" CreationDate="2021-02-19T14:43:48.893" Score="3" Body="&lt;p&gt;For a language like Java, the way out is to pick a project that isn't just the solution of some equation(s) or a similar mathematical problem. Find a project in which the description of the problem can be analyzed as some &amp;quot;thing&amp;quot; that has discernible &amp;quot;parts&amp;quot;. The parts can be modeled as classes and the resulting objects composed into a solution.&lt;/p&gt;&#xA;&lt;p&gt;One that is simple enough is a calculator. A calculator has a &lt;em&gt;display&lt;/em&gt;. It has &lt;em&gt;keys&lt;/em&gt; that have &lt;em&gt;actions&lt;/em&gt;, which vary depending on the &amp;quot;state&amp;quot;. For example, the &amp;quot;5&amp;quot; key behaves differently in the case that the previous key was an operator or another numeric key. The &lt;a href=&quot;https://cseducators.stackexchange.com/a/6821/1293&quot;&gt;answer of Ben I.&lt;/a&gt; mentions design patterns. This is an example of the Strategy Pattern.&lt;/p&gt;&#xA;&lt;p&gt;Most calculators employ a stack or other hidden register beyond the display. Calculators have an operational &lt;em&gt;strategy&lt;/em&gt; of operation that differs for an RPN or an algebraic calculator. The precedence of the operators may be important, or not.&lt;/p&gt;&#xA;&lt;p&gt;The calculator can print out a &lt;em&gt;tape&lt;/em&gt; of recent operations, or not. It can have a GUI or not. If it has a GUI then you can build it with MVC or not.&lt;/p&gt;&#xA;&lt;p&gt;And if you want a real challenge (the &lt;em&gt;Polymorphism Challenge&lt;/em&gt; = writing a program with a limited budget for selection statements), it is possible to build such a thing without a single &amp;quot;if&amp;quot; or &amp;quot;while&amp;quot; statement, provided the user gives the key presses. This will give you very low Cyclomatic Complexity, which is a desirable feature of any program.&lt;/p&gt;&#xA;&lt;p&gt;But it is the &amp;quot;parts&amp;quot; composed into the whole that is the essence of this.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I've purposely not provided pointers to some of the terms here. You can explore them on wikipedia or elsewhere. But the polymorphism challenge search will lead you astray. Look &lt;a href=&quot;http://www.cs.uni.edu/%7Ewallingf/blog/archives/monthly/2012-02.html#e2012-02-19T12_17_41.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;HERE&lt;/a&gt; for guidance.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;And using JavaDoc consistently is a good habit. If you are extending an existing project then the JavaDocs already (hopefully) in place should be a good guide to the operation.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-02-19T14:59:20.990" LastActivityDate="2021-02-19T14:59:20.990" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6824" PostTypeId="2" ParentId="6822" CreationDate="2021-02-19T15:02:37.280" Score="4" Body="&lt;p&gt;So, if you're simply looking to convert the knowledge you already have, web searches like&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;C++ for C developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;C++ for javascript developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;C++ for python developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;... will get you up to speed.&lt;/p&gt;&#xA;&lt;p&gt;As a relative beginner, you'll also learn features of the original languages that you didn't know, and get a taste of what sorts of features professional developers find helpful and worthy of discussion.  Comparing languages like this is an excellent way of expanding your knowledge of programming languages as a field!&lt;/p&gt;&#xA;&lt;p&gt;If I were you, I'd also consider searches based on the languages you say you are already familiar with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;C for python developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Python for C developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;C for javascript developers&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;... and so on.&lt;/p&gt;&#xA;&lt;p&gt;You can find out quite a bit about programming languages as a field by working through these comparisons in languages that you already know.&lt;/p&gt;&#xA;&lt;p&gt;That's my answer to the question you've directly asked.  Before I go, though, I do have one important caveat: your goal shouldn't be to &amp;quot;learn&amp;quot; as many languages as possible.  Your goal right now should be to find a home base language that excites you enough that you want to delve deeply into it.  Depth is far more valuable than breadth, if only because picking up a new language is relatively easy (as demonstrated by my searches).  Honestly, as long as the languages share similar paradigms&lt;sup&gt;1&lt;/sup&gt;, you can translate most of your knowledge of one language to another in roughly an afternoon.&lt;/p&gt;&#xA;&lt;p&gt;So, by all means go and check out C++!  But when you've explored around a little, see if it also ignites your sense of fun and intrigue.  If it does, then really take some time to start to learn the language in depth.  You might spend a year, maybe a few years, or maybe only a few months before you lose interest.  But the goal is to dive deep, and really learn something &lt;em&gt;well&lt;/em&gt;.  As strange as it sounds, deep diving will ultimately give you a lot more flexibility than more shallow explorations as you learn and develop.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;1 - When they &lt;em&gt;don't&lt;/em&gt; share paradigms, such as moving from procedural to functional programming, then things become much more interesting, and the process of learning the language is much tougher, though the rewards are also much greater.&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-05-23T22:00:43.480" LastActivityDate="2021-05-23T22:00:43.480" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6826" PostTypeId="1" CreationDate="2021-02-21T11:17:43.583" Score="1" ViewCount="86" Body="&lt;p&gt;There is a lot of good research on how to teach introductory programming. But maybe(?) more important to most students is the ability to use a spreadsheet. What is the best way to teach introductory spreadsheets?&lt;/p&gt;&#xA;" OwnerUserId="48" LastEditorUserId="48" LastEditDate="2021-02-22T12:06:18.893" LastActivityDate="2021-02-27T00:26:09.903" Title="is there any good specific pedagogy research to teach spreadsheets?" Tags="|lesson-ideas|programming-paradigms|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6827" PostTypeId="2" ParentId="6826" CreationDate="2021-02-21T13:54:09.187" Score="3" Body="&lt;p&gt;While I've never taught spreadsheets to anyone other than myself, I don't think there is any unique magic here. In fact, since a spreadsheet is its own metaphor, the pedagogy should be fairly straight forward. It is like learning any other skill, even swimming.&lt;/p&gt;&#xA;&lt;h1&gt;Lots of practice. Lots of feedback.&lt;/h1&gt;&#xA;&lt;p&gt;What I'd do is create a list of short instructions (lectures or other) followed by a lot of exercises using what was in the recent instructions. The instructions can become increasingly complex as can the exercises. Feedback to students is required for the exercises, perhaps by grading, and perhaps by distributing correct (and maybe incorrect) solutions. The incorrect &amp;quot;solutions&amp;quot; can illustrate common mistakes so as to make them explicit in the minds of the students, thus making them recognizable when they occur in practice.&lt;/p&gt;&#xA;&lt;p&gt;One sort of exercise you might consider is a &amp;quot;fixer-upper&amp;quot; which is an example of a design pattern of the same name. A Fixer Upper is a partial solution to be completed by the students, or it is a complete solution that has had specific errors introduced that should be found and corrected. It is possible to combine these in a more sophisticated version, though simpler examples should be given at the start.&lt;/p&gt;&#xA;&lt;p&gt;I would also make sure that the students have access to the documentation of the spreadsheet program and are tested on their understanding of it. This can come by giving exercises that have not had prior instruction other than to point them to the details in the documentation.&lt;/p&gt;&#xA;&lt;p&gt;For the first exercises it is probably best to test single features, such as summing a column. For later ones, combinations should be introduced.&lt;/p&gt;&#xA;&lt;p&gt;And if you want to go to extremes, note that some spreadsheet systems are Turing Complete, so it is possible to do arbitrary programming within them. In particular, recursive programs are possible.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-02-21T13:54:09.187" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6828" PostTypeId="2" ParentId="2691" CreationDate="2021-02-21T21:01:51.763" Score="1" Body="&lt;p&gt;This is too long to be a comment:&lt;/p&gt;&#xA;&lt;p&gt;Java is a pass by value language.  You must understand that what variables store in Java.  Primitives store their values directly. Object types store heap memory addresses.  In either case, when you pass that an argument to a function that argument is evaluated, and then it is assigned to the function's parameter and it behaves like a local variable.&lt;/p&gt;&#xA;&lt;p&gt;So, if you are passing a variable to a function the evaluation process causes a copy of the bit pattern it is storing to be made.  In the case of an object, that's a copy of the memory address.  This is why I carefully explain the idea of memory address to my beginning programming students.  Python operates similarly, but it has no primitive types.  All Python data are objects stored on the heap.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-02-21T21:01:51.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6829" PostTypeId="2" ParentId="5820" CreationDate="2021-02-23T21:45:10.377" Score="3" Body="&lt;p&gt;This answer comes from experience teaching C to students that have about 2 years of programming experience in Python and no exposure to low-level programming. I teach an Operating Systems-like course and students take introductory C lessons before the main course.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;For C begginers strings are hard. Although the concept seems rather easy, students struggle with the differences between '0' and the number 0 and with the whole &amp;quot;we represent characters as numbers&amp;quot; thing. So, for many students coding &lt;code&gt;atoi&lt;/code&gt; is a challenge at first. Expressions such as such as &lt;code&gt;str[i] - '0'&lt;/code&gt; are not obvious at all and things like comparing characters make no sense (&lt;code&gt;str[i] &amp;gt;= '0' &amp;amp;&amp;amp; str[i] &amp;lt;= '9'&lt;/code&gt;). Even 'a' and 'A' being different sometimes confuse students.&lt;/p&gt;&#xA;&lt;p&gt;A second point is that &lt;code&gt;argv&lt;/code&gt; is a pointer to &lt;code&gt;char&lt;/code&gt; arrays, resulting in the type &lt;code&gt;char *argv[]&lt;/code&gt;. This is not ok until students are comfortable with pointers and even then a pointer to an array takes some thinking for many students. Drawing the pointers helps a lot here.&lt;/p&gt;&#xA;&lt;p&gt;Taking these two points into account, we use &lt;code&gt;scanf/printf&lt;/code&gt; because it allows us to have students accepting user input and showing program results right from day one. We also teach &lt;code&gt;fgets&lt;/code&gt; and input/output redirection as early as possible (so at least students understand that interacting with programs in the terminal is not the norm). The main point is that &lt;em&gt;C&lt;/em&gt; has strange syntax and inner workings for students that have only used Python, so taking it slow helps. Also, they do not know the use of &lt;code&gt;argc/argv&lt;/code&gt; yet, so we would have to teach it as well.&lt;/p&gt;&#xA;&lt;p&gt;Later in the semester, when they are more prepared, we present &lt;code&gt;argc/argv&lt;/code&gt; as a way of receiving arguments &lt;em&gt;from another program&lt;/em&gt;. Students by then are able to quickly understand how to use it and can write well-behaved programs.&lt;/p&gt;&#xA;&lt;p&gt;So, yeah.... teaching &lt;code&gt;scanf/printf&lt;/code&gt; without ever talking about proper command line programs is not a very good approach. I would even say more: teaching &lt;em&gt;C&lt;/em&gt; without a connection to how &lt;em&gt;C&lt;/em&gt; is actually used is not a very good approach. The connection might be weak at first, but it must be made strong at some point. Otherwise, why would we be teaching such strange language if the programs students code are much more easily done with other languages?&lt;/p&gt;&#xA;" OwnerUserId="5109" LastEditorUserId="5109" LastEditDate="2021-02-23T21:57:49.677" LastActivityDate="2021-02-23T21:57:49.677" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6830" PostTypeId="2" ParentId="330" CreationDate="2021-02-24T12:56:20.957" Score="1" Body="&lt;p&gt;Personally, one of the hardest things about using MOOCs in curricular university courses is that the target audience is usually very different. So although they theoretically offer &amp;quot;top instruction from world leading professors&amp;quot;, in practice they are not really teaching a course that fits into my particular context. In the end, either I adapt my course into something that fits the MOOC or it looks disconnected and possibly confusing. So using MOOCs as is might not save that much effort in comparison with developing my own materials or adapting another course. Can it be done? Sure, and it can be a quality proposal. It is just that saving instructor effort is probably not a key advantage.&lt;/p&gt;&#xA;" OwnerUserId="5109" LastActivityDate="2021-02-24T12:56:20.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6831" PostTypeId="2" ParentId="5820" CreationDate="2021-02-24T23:41:23.517" Score="0" Body="&lt;p&gt;Don't teach scanf. It is dangerous and it is a huge security leak.  Use getline instead and limit input size.  Then you can use functions in stdlib.h to parse your string into the desired type.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-02-24T23:41:23.517" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6833" PostTypeId="2" ParentId="27" CreationDate="2021-02-25T23:36:55.453" Score="2" Body="&lt;p&gt;Yes.&lt;/p&gt;&#xA;&lt;p&gt;If you don't like assembly programming, it's probably not the profession for you. The entire fundamental way a computer works can be learned through the ISA. If you understand how to program a machine using that, you will ingrain concepts that make it effortless to learn and apply and technology on top, so long as you have the will to continue to learn if it is required as the stack seems to needlessly and endlessly grows.&lt;/p&gt;&#xA;&lt;p&gt;In short, programming in any higher level language is ultimately programming a machine, and if you don't enjoy the details, you probably won't last very long as a programmer, or a least a very good, highly paid one, or one with great skills if you go more of the FOSS route. These two paths are not mutually exclusive either.&lt;/p&gt;&#xA;" OwnerUserId="10160" LastEditorUserId="10160" LastEditDate="2021-02-28T16:14:48.577" LastActivityDate="2021-02-28T16:14:48.577" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6835" PostTypeId="2" ParentId="6826" CreationDate="2021-02-27T00:26:09.903" Score="2" Body="&lt;p&gt;I have never taught spreadsheets, per se, but have given projects to create a working spreadsheet. To test theses implementations, one needs a sample spreadsheet that exercises the various functions implemented by the system. The one that students seemed to enjoy the most was a list of students, and their grades (all factitious) giving multiple exam grades and final exam grade, quiz grades, program grades, etc. The grades are combined in various ways (different weightings, throw out lowest, ...) to produce a numerical grade for each student. It is a process they are familiar with and they had fun putting in their own grades and running &amp;quot;what grade might I get&amp;quot; scenarios.&lt;/p&gt;&#xA;&lt;p&gt;I had them sort the final calculated grades and determine where the &amp;quot;breaks&amp;quot; between letter grades might fall. That was a manual exercise based on the data (since their implementation did not have conditionals), but gave the students a look at what teachers can go thru in the grading process.&lt;/p&gt;&#xA;&lt;p&gt;It seems like it would be good to introduce sample problems that the student can relate to. Also point out that spreadsheets were the original &amp;quot;killer&amp;quot; application that helped drive the use of personal computers in a business setting, and how the language opened up&#xA;&amp;quot;programming&amp;quot; to many users who never thought they could program.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2021-02-27T00:26:09.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6836" PostTypeId="1" CreationDate="2021-02-27T12:27:14.230" Score="5" ViewCount="204" Body="&lt;p&gt;I have had good results, and happy students, using &lt;a href=&quot;https://flukeout.github.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS diner&lt;/a&gt; to teach CSS selectors (I will share more in another question).&lt;/p&gt;&#xA;&lt;p&gt;And one of my students asked me if there is a similar game for html.&lt;/p&gt;&#xA;&lt;p&gt;Is there any site for learning html, gamified and in small increments, similar to what CSS diner offers for selectors?&lt;/p&gt;&#xA;&lt;p&gt;My students are around 19 years old, though resources for younger students might also be useful.&lt;/p&gt;&#xA;" OwnerUserId="4251" LastEditorUserId="2516" LastEditDate="2021-10-01T11:26:55.463" LastActivityDate="2021-10-01T11:26:55.463" Title="games for teaching html" Tags="|exercises|html|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6837" PostTypeId="1" CreationDate="2021-02-27T12:49:09.680" Score="3" ViewCount="118" Body="&lt;p&gt;CSS diner is a game for learning CSS selectors.&lt;/p&gt;&#xA;&lt;p&gt;But it goes &amp;quot;into the woods&amp;quot; relatively quickly, focusing more on breath of selectors than on mastery of fundamentals&lt;/p&gt;&#xA;&lt;p&gt;Can it be productively used to teach CSS for beginers?&lt;/p&gt;&#xA;" OwnerUserId="4251" LastActivityDate="2021-02-27T12:49:09.680" Title="How to use CSS diner to teach beginners in CSS" Tags="|exercises|css|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6838" PostTypeId="2" ParentId="6837" CreationDate="2021-02-27T12:49:09.680" Score="1" Body="&lt;p&gt;(as promissed in another question, this is my answer)&lt;/p&gt;&#xA;&lt;p&gt;focus only on the starting exercices (I go from 1 to 11)&lt;/p&gt;&#xA;&lt;p&gt;first teach the theory .class, #id, tag, and the selectors for and, or and child (ie p .some_child)&lt;/p&gt;&#xA;&lt;p&gt;Then allow them to to the exercices; and after do them together&lt;/p&gt;&#xA;&lt;p&gt;You can often solve one exercise in multiple ways. While this does not help the concept the exercise wants to teach, and sometimes is not very semantical (say, for example, selecting all apples inside plates and all pickes inside plates, when you wanted everything inside a plate) it helps reinforce the selectors&lt;/p&gt;&#xA;" OwnerUserId="4251" LastActivityDate="2021-02-27T12:49:09.680" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6839" PostTypeId="1" CreationDate="2021-03-05T08:39:25.967" Score="2" ViewCount="143" Body="&lt;p&gt;I've been interested in becoming a computer science/programming educator for a while now, and I have a real passion for it.&lt;/p&gt;&#xA;&lt;p&gt;I've taught a few people to code through sites like Khan Academy by answering questions and making examples and things, and I also tried out teaching on Reddit a bit, as well as Discord (through their video calling and screen sharing platform). I've taught a few people, but I would enjoy teaching more people, and with a more regular and consistent schedule.&lt;/p&gt;&#xA;&lt;p&gt;I've thought about platforms like Udemy, but I much prefer to teach on a more personal level, where I can be there with them while they try to code things and answer all their questions and provide them with examples and things. More of a tutoring sort of thing rather than just pumping out content.&lt;/p&gt;&#xA;&lt;p&gt;Do you guys know of any good ways I could get started? I'm not interested in teaching for a university or a highschool or anything like that at the moment, I'm mostly just looking for a way for me to get in touch with students online.&lt;/p&gt;&#xA;&lt;p&gt;Even if you don't feel like you have a perfect answer, feel free to share your thoughts and let me know what you think/if you have any ideas. Any comment or answer is appreciated, thanks in advance.&lt;/p&gt;&#xA;" OwnerUserId="10076" LastActivityDate="2024-02-12T18:02:04.933" Title="What's a good platform for independently teaching computer science and programming?" Tags="|programming|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6840" PostTypeId="2" ParentId="6839" CreationDate="2021-03-05T13:07:53.413" Score="1" Body="&lt;p&gt;Your question is quite broad, but I &lt;em&gt;think&lt;/em&gt; you're suggesting that you wish to tutor, and wish to tutor programming specifically.  In which case, I'd consider tools like Zoom and repl.it.&lt;/p&gt;&#xA;&lt;p&gt;The ability to live-code alongside your tutee, and watch as the work, closely approximates the experience of sitting at the same computer.  A video-conferencing app then allows you to talk directly, and the whiteboard feature of Zoom allows you to draw on a common paper together while you analyze problems together.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-03-05T13:07:53.413" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6841" PostTypeId="1" CreationDate="2021-03-05T15:18:52.390" Score="1" ViewCount="36" Body="&lt;p&gt;Does anyone know what topics I should start studying to form a foundation in PHP ? Loops, outputting data, manipulating a database etc. ?&lt;/p&gt;&#xA;&lt;p&gt;Edit: I want to start using PHP to create a social site. Something like Instagram, TikTok etc.&lt;/p&gt;&#xA;" OwnerUserId="10216" LastEditorUserId="10216" LastEditDate="2021-03-09T21:16:57.437" LastActivityDate="2021-03-09T21:16:57.437" Title="Forming a foundation in PHP" Tags="|programming|web-development|databases|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6844" PostTypeId="1" CreationDate="2021-03-10T15:10:08.303" Score="5" ViewCount="121" Body="&lt;p&gt;I am tutoring a student in GCSE level computing science- the OCR exams specifically. I also tutor A level as well as the Scottish equivalent.&lt;/p&gt;&#xA;&lt;p&gt;My other students all need to know SQL for their courses, as well as database fundamentals (i.e. what is a key, relationships, data types etc). But I cannot see this in the OCR GCSE course.&#xA;I have found past papers at GCSE level containing SQL/Database questions, but I cannot find it in the course specification.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.ocr.org.uk/Images/558027-specification-gcse-computer-science-j277.pdf&quot; rel=&quot;noreferrer&quot;&gt;https://www.ocr.org.uk/Images/558027-specification-gcse-computer-science-j277.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Am I right then in thinking we do not need to cover this? I realise the course changed for 2020, but this seems quite a large topic to drop. Can I be confident my student is not going to run into these type of questions in the exam, or am I looking at an incorrect document? Can anyone teaching GCSE confirm?&lt;/p&gt;&#xA;" OwnerUserId="10228" LastActivityDate="2021-07-26T07:57:21.577" Title="Have databases disappeared at GCSE?" Tags="|secondary-education|exams|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6845" PostTypeId="1" CreationDate="2021-03-12T19:48:18.170" Score="3" ViewCount="184" Body="&lt;p&gt;I am interested in learning &lt;em&gt;Compiler Design&lt;/em&gt; , and from many resources I came to know that &amp;quot;The Dragon Book&amp;quot; is a good textbook. (Below are the two editions of the said textbook. [Red Dragon and Purple Dragon])&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/5WEY5.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/5WEY5.png&quot; alt=&quot;Red Dragon Book&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;em&gt;Compilers: Principles, Techniques and Tools (Red Dragon)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;a href=&quot;https://i.stack.imgur.com/n8pWb.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/n8pWb.png&quot; alt=&quot;Purple Dragon&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$&lt;/span&gt;&lt;em&gt;Compilers: Principles, Techniques and Tools (Purple Dragon)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I am following the Red Dragon book currently, because it is a bit thinner and plan to cover the most important concepts from the Red Dragon and then move to the Purple Dragon to cover the possible extra topics introduced due to modern advancements.&lt;/p&gt;&#xA;&lt;p&gt;But since I am doing self-study, it is at times hard to understand the material without proper guidance.&lt;/p&gt;&#xA;&lt;p&gt;So if anyone knows about any video lecture series on Compiler Design which uses any of the above said text for reference, then it will be quite helpful to me (though I prefer a video lecture series based on the Red Dragon, but begin an old book, it might be difficult to find such a lecture series). It would be like taking an actual course, getting input from the instructor, and then improvising on the learning thereafter by reading the text.&lt;/p&gt;&#xA;&lt;p&gt;Being a self-learner, I am having a bit of difficulty in understanding a few concepts.&lt;/p&gt;&#xA;&lt;p&gt;[A rough look of the contents of the two books shows that:&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\text{Content$_{purple} \cap$ Content$_{red}$ = A substantial amount of the core compiler concepts}$&lt;/span&gt;,&lt;/p&gt;&#xA;&lt;p&gt;so if a video lecture series for any one of the above texts is provided I shall use it accordingly (i.e. watch the portions pertaining to the Red Dragon first, if the lecture series is based on the purple book)]&lt;/p&gt;&#xA;&lt;p&gt;Any help would be appreciated. Thank you.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;My main problem is that I find it difficult to get the concepts directly by reading it from the book for the first time, face difficulty in understanding the proofs on my own, unless someone pictorially explains me the concepts in a step by step manner (be it a proof of a theorem , or some concept, or terminology etc.) Indeed a professor makes the subject easier for a student to understand...&lt;/p&gt;&#xA;&lt;p&gt;Please help me.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastEditorUserId="9124" LastEditDate="2021-03-13T16:35:35.180" LastActivityDate="2021-03-13T16:35:35.180" Title="Is there any detailed video lecture series which uses “Compilers: Principles, Techniques and Tools” by Aho et al as the text book as a bible?" Tags="|self-learning|resource-request|compiling|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6847" PostTypeId="1" AcceptedAnswerId="6849" CreationDate="2021-03-14T19:54:06.157" Score="4" ViewCount="157" Body="&lt;p&gt;.NET expression trees can be used to write self-modifying compiled programs -- because it is possible to construct and compile a method at runtime, it is also possible for a method to rewrite its own code at runtime.&lt;/p&gt;&#xA;&lt;p&gt;.NET leverages this for dynamic typing in C#, taking advantage of the fact that even for dynamically-typed code, the vast majority of usages at a given call site will have the same types. Each dynamic call site has a corresponding expression tree, and a corresponding method. Every time a new set of types is encountered at this call site, additional logic which handles the new types will be added to the expression tree, which is then compiled into a new method; this new method becomes the method corresponding to this call site.&lt;/p&gt;&#xA;&lt;p&gt;Aside from the fact that I haven't been able to see this mechanism running live, I feel it's too complex and distracting from the simplicity of the primary concept.&lt;/p&gt;&#xA;&lt;p&gt;What relatively simple use case could I use to demonstrate the value of this property, of allowing the writing of a self-modifying program? Is there a standard example?&lt;/p&gt;&#xA;" OwnerUserId="4125" LastEditorUserId="4125" LastEditDate="2021-03-20T18:23:53.637" LastActivityDate="2021-05-03T20:53:13.890" Title="Simple use case for self-modifying programs" Tags="|teaching-analogy|computational-thinking|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6848" PostTypeId="2" ParentId="6847" CreationDate="2021-03-15T02:04:41.817" Score="5" Body="&lt;p&gt;I didn't write any myself, but I encountered several self-modifying MS-DOS batch files (this is possible due to the OS closing the batch file before executing each line), especially during the &lt;span class=&quot;math-container&quot;&gt;$1980$&lt;/span&gt;'s. I'm not sure if batch files fit within your definition of &amp;quot;programs&amp;quot;, or if this usage was from too long ago since the needs &amp;amp; reasons for this (i.e., primarily due to only a minimal amount of memory being available) don't generally apply now to modern computers. Nonetheless, having batch files modify themselves is a relatively simple concept, and was similarly done for fairly basic reasons as well, so this might make good examples for teaching purposes.&lt;/p&gt;&#xA;&lt;p&gt;I recall self-modifying batch files were used in several situations, but the main one was to change options based on user feedback. Wikipedia's &lt;a href=&quot;https://en.wikipedia.org/wiki/Self-modifying_code#Compound_modification&quot; rel=&quot;nofollow noreferrer&quot;&gt;Self-modifying code&lt;/a&gt; gives an example where a batch file runs a program that changes the file itself to next run what the user requested. However, I also recall seeing &amp;amp; using a batch file with a fairly complicated (at least for a batch file) menu type system, with the commands directly modifying the file itself based on user feedback, return codes from the menu and/or other programs which were run. I no longer have a copy of this batch, or any other related, files. As this was over &lt;span class=&quot;math-container&quot;&gt;$30$&lt;/span&gt; years ago, I don't recall any other details. Also, I haven't been able to find any such similar example online. Nonetheless, in &lt;a href=&quot;https://stackoverflow.com/q/906586/11726740&quot;&gt;Changing a batch file when its running&lt;/a&gt;, several answers, such as the &lt;a href=&quot;https://stackoverflow.com/a/9651656/11726740&quot;&gt;answer&lt;/a&gt; by &lt;a href=&quot;https://stackoverflow.com/users/1012053/dbenham&quot;&gt;dbenham&lt;/a&gt; and the &lt;a href=&quot;https://stackoverflow.com/a/9635783/11726740&quot;&gt;answer&lt;/a&gt; by &lt;a href=&quot;https://stackoverflow.com/users/463115/jeb&quot;&gt;jeb&lt;/a&gt;, give other examples of direct self-modifying batch files.&lt;/p&gt;&#xA;&lt;p&gt;Note that, as the Wikipedia article section states, these batch file self-modifications were done primarily due to how limited memory generally was in personal computers back then. Most, if not all, of the other reasons people wrote &amp;amp; used self-modifying batch files back then, as I recall, were also due to these significant memory limitations.&lt;/p&gt;&#xA;" OwnerUserId="9731" LastEditorUserId="9731" LastEditDate="2021-03-15T21:43:57.813" LastActivityDate="2021-03-15T21:43:57.813" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6849" PostTypeId="2" ParentId="6847" CreationDate="2021-03-15T15:38:48.580" Score="3" Body="&lt;p&gt;I haven't tried to build this but it seems to have the right characteristics&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://animalgame.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Animal Game&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In theory, new animals could be captured with new classes, extending the known list.&lt;/p&gt;&#xA;&lt;p&gt;The user thinks of an animal and the program asked a series of yes-no questions to &amp;quot;guess&amp;quot; the animal: &amp;quot;Does it have antlers?&amp;quot; etc. Depending on the answer, it asks a different question. The structure of the run-time is a tree with concrete values at the leaves: &amp;quot;Is it a moose?&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;If the machine &amp;quot;guesses&amp;quot; wrong, the user then supplies a question that would distinguish the guess from the animal chosen: &amp;quot;What question would distinguish an &lt;em&gt;antelope&lt;/em&gt; from a moose?&amp;quot;. Then the game restarts, remembering the new animal and where it fits in the hierarchy.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-03-15T15:38:48.580" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6850" PostTypeId="1" AcceptedAnswerId="7176" CreationDate="2021-03-17T19:40:24.830" Score="5" ViewCount="95" Body="&lt;p&gt;I'm using snap! in my high school computer science class (11th grade, ~16 years old) and I'd like to reduce the features (~blocks) that snap! provides by default. Reasons:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Simplify the interface&lt;/li&gt;&#xA;&lt;li&gt;Many blocks are not needed (not &amp;quot;allowed&amp;quot;) according to the curriculum&lt;/li&gt;&#xA;&lt;li&gt;I'd like to have the students see/develop the need for some blocks that simplify tasks (&amp;quot;index of ... in list&amp;quot; would be a good example), and have them implement them on their own.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I started digging through the code, but there has to be an easier way?&lt;/p&gt;&#xA;" OwnerUserId="5925" LastActivityDate="2021-12-22T20:54:34.123" Title="Reduce snap!'s features" Tags="|secondary-education|snap|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6851" PostTypeId="2" ParentId="6850" CreationDate="2021-03-17T20:16:53.447" Score="2" Body="&lt;p&gt;This is a bit of a frame-challenge, but what I'm understanding from your question is that your goals here are to: 1) Not overwhelm your students and avoid them getting lost in a plethora of blocks they won't need, 2) Force students to understand how to implement more complex blocks themselves.&lt;/p&gt;&#xA;&lt;p&gt;Have you considered instead of providing a restricted version of the language (which, could be complex to install and update and ensure every student is using the same version of), simply providing a list of &amp;quot;recommended&amp;quot; blocks? This could help to achieve your first goal, to act to guide students as to what they'll need for an assignment and avoid them being overwhelmed. And, this still allows students who want to explore a larger set of the languages features to do so if they want, something which I think should be encouraged.&lt;/p&gt;&#xA;&lt;p&gt;As for your second goal, this depends on your class but it may be effective to simply create an assignment around implementing more complex built-in blocks and enforce the restriction specifically for that assignment.&lt;/p&gt;&#xA;" OwnerUserId="58" LastActivityDate="2021-03-17T20:16:53.447" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6852" PostTypeId="1" AcceptedAnswerId="6869" CreationDate="2021-03-18T15:16:01.947" Score="2" ViewCount="151" Body="&lt;p&gt;I'm a high school student who has learned Java with the AP Computer Science A curriculum at school. My CS class used the University of Washington's &lt;a href=&quot;https://practiceit.cs.washington.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Practice-it site&lt;/a&gt; for practicing Java. I was wondering whether there was a similar open-to-public site for practicing Python, but I was unable to find a Python-practice website that matched Practice-it at the scale and quality of the problems. Could anyone provide some suggestions as to which website I could use?&lt;/p&gt;&#xA;&lt;p&gt;The reason why I want to study Python is because I wish to take an introductory class to deep learning on Coursera that uses Python. But because I only learned Java in high school, I studied Python on my own, and was looking for a website where I could practice writing programs in Python. Also, because I am looking into becoming a data scientist, I am taking the &lt;a href=&quot;https://www.coursera.org/learn/python-data-analysis&quot; rel=&quot;nofollow noreferrer&quot;&gt;applied data science course provided by UMichigan on Coursera&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The most complicated Java program that I wrote was a 321-line long superclass and a corresponding 60-line client code that when executed, produces an interactive four-in-a-row game.&lt;/p&gt;&#xA;" OwnerUserId="10242" LastEditorUserId="-1" LastEditDate="2021-04-11T13:37:28.143" LastActivityDate="2021-04-11T13:37:28.143" Title="Best online problem-bank style practice site for Python" Tags="|python|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6853" PostTypeId="2" ParentId="6852" CreationDate="2021-03-18T19:08:49.013" Score="2" Body="&lt;p&gt;I didn't spend a huge amount of time looking over the practiceit resource you linked, but I glanced at a few problems, and they seemed similar to &lt;a href=&quot;http://codingbat.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://codingbat.com&lt;/a&gt;, which has exercises in both Java and Python.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-03-18T19:08:49.013" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6854" PostTypeId="2" ParentId="1419" CreationDate="2021-03-19T13:54:29.387" Score="-1" Body="&lt;p&gt;I am not an educator, I am just a student. But I was also interested with the idea, so while I was reading books, taking courses, and writing sample programs, I was able to think of one analogy. I am not sure if my answer is correct, I would also like a comment on its correctness. Any ways, I have written an article so read it, correct me and also see if it something you could use. Here is a &lt;a href=&quot;https://medium.com/@hileabuis/database-vs-warehous-the-analogy-54db1f5de5a5&quot; rel=&quot;nofollow noreferrer&quot;&gt;link&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10245" LastActivityDate="2021-03-19T13:54:29.387" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6858" PostTypeId="1" AcceptedAnswerId="6864" CreationDate="2021-03-19T17:12:56.053" Score="4" ViewCount="396" Body="&lt;p&gt;I am asking this question on behalf of my brother. He is taking his first programming class. So far he has just learned the basics (if-then statements, for loops, while loops, etc.)&lt;/p&gt;&#xA;&lt;p&gt;The class is using the book Problem Solving and Program Design in C, but it's exercises are too easy. Is there a programming book or other resource that has more difficult exercises? Of course, the book doesn't have to be for C specifically, as we just need the problems.&lt;/p&gt;&#xA;" OwnerUserId="10249" LastActivityDate="2021-04-22T01:46:49.323" Title="Reference request for resource with difficult programming exercises" Tags="|textbook|exercises|" AnswerCount="6" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6859" PostTypeId="2" ParentId="6858" CreationDate="2021-03-19T17:53:17.097" Score="6" Body="&lt;p&gt;If he wants to have a blast biting into some very fun and challenging problems, &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt; is fantastic, and entirely language neutral.&lt;/p&gt;&#xA;&lt;p&gt;He may find that certain problems are out of his grasp until he learns a bit more programming, but there will be many that will be possible even with what he has.  (Arrays, structs, and pointers should make all of the problems accessible, even if some of them are still possibly too hard as &lt;em&gt;problems&lt;/em&gt; before he has a good understanding of linked lists and trees.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-03-19T17:53:17.097" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6860" PostTypeId="2" ParentId="6858" CreationDate="2021-03-20T08:37:19.493" Score="5" Body="&lt;p&gt;The &lt;a href=&quot;https://ioinformatics.org/&quot; rel=&quot;noreferrer&quot;&gt;International Olympiad in Informatics&lt;/a&gt; is an international competition for gifted young amateur programmers. The tasks from past editions are &lt;a href=&quot;https://ioinformatics.org/page/contests/10&quot; rel=&quot;noreferrer&quot;&gt;available online&lt;/a&gt;, including detailed problem descriptions, test cases, and test harnesses.&lt;/p&gt;&#xA;&lt;p&gt;While these tasks are described in a way that should be understandable to novice programmers, they are quite challenging and require a degree of creative thought not usually found in programming exercises.&lt;/p&gt;&#xA;" OwnerUserId="1775" LastActivityDate="2021-03-20T08:37:19.493" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6861" PostTypeId="2" ParentId="6858" CreationDate="2021-03-20T09:09:07.250" Score="6" Body="&lt;p&gt;Although the question is asking for a book, looking a &amp;quot;Project Euler&amp;quot; mentioned in another answer, I would like to suggest &lt;a href=&quot;https://www.codewars.com/&quot; rel=&quot;noreferrer&quot;&gt;Codewars&lt;/a&gt; might be what you are looking for. On codewars you choose your programming language and then you get different levels of problems to solve step by step. You not only test your answer with their built-in testing tool but also once correctly answered, you get to see other users answers. This is very useful because you see many different ways to solve the same problem and compare your way of doing it to others.&lt;/p&gt;&#xA;" OwnerUserId="10250" LastActivityDate="2021-03-20T09:09:07.250" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6862" PostTypeId="1" CreationDate="2021-03-20T15:43:42.123" Score="5" ViewCount="824" Body="&lt;p&gt;I'm gathering my wits to create a course that will focus a great deal on OO programming patterns (things like singleton, flyweight, command, etc, etc.)  I do &lt;em&gt;not&lt;/em&gt; have a lot of background in this topic yet.  I am currently learning the material as I develop the course for next September.&lt;/p&gt;&#xA;&lt;p&gt;It seems like having a way to graph out the patterns is necessary to such an endeavor, but UML also seems a bit nuts -- there are entire textbooks on the specifications.  Now, I understand that most of the UML diagram types would not be useful for a course in OO design patterns, but a few of them would be quite helpful.&lt;/p&gt;&#xA;&lt;p&gt;So my question, then, is how deeply into UML should I go?  Should I cover class and object diagrams?  Sequence diagrams?  Should I cover them in depth, or only in a shallow way?  Or is there a completely different method that I should be looking for in order to notate design patterns for my students?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-05-10T06:31:23.100" Title="How necessary is UML for a course in object programming patterns?" Tags="|object-oriented-paradigm|" AnswerCount="5" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="6863" PostTypeId="2" ParentId="6862" CreationDate="2021-03-20T16:11:17.617" Score="5" Body="&lt;p&gt;This depends on the level of the course you are teaching and what background the students have. But UML is a language unto itself and has sufficient expressiveness to use it as a way to generate program outlines. Personally, I find it a bit intrusive and, not unlike flow charts (flaw charts), can get in the way.&lt;/p&gt;&#xA;&lt;p&gt;But a simplification of UML is probably very useful showing relationships between classes. Boxes with arrows is probably enough to get started. If people are learning OO along with some OO language, then focus on the language and its uses, with UML-lite diagrams as a supplement. Visual learners will appreciate it.&lt;/p&gt;&#xA;&lt;p&gt;But, if you need to have a philosophy about programming in an OO language in order to avoid the traps. Just as in flow charts where it is entirely too easy to draw an arrow, leading to terrible code, the same can be true with UML.&lt;/p&gt;&#xA;&lt;p&gt;But, if your philosophy of OO is that a class is &amp;quot;a bundle of behavior&amp;quot;, rather than &amp;quot;bundle of data&amp;quot;, then you can use UML to show the public interface of a class (public methods) along with relationships, avoiding the &amp;quot;field&amp;quot; entries in the diagrams.&lt;/p&gt;&#xA;&lt;p&gt;Another issue, is that if you program using composition, rather than inheritance (as I recommend) then Inner Classes are important for hiding details of a composition. There was a time when UML supported this idea poorly. (Caveat: that may have changed).&lt;/p&gt;&#xA;&lt;p&gt;I'll especially note that for Strategy and Decorator patterns, which I find very useful to produce clean code with low &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;noreferrer&quot;&gt;cyclomatic complexity&lt;/a&gt;, that inner classes (composition) are especially useful. They are simple enough, like your other suggested patterns, that the UML diagrams for them won't be overwhelming. But still, a simplified (behavior only) view is enough.&lt;/p&gt;&#xA;&lt;p&gt;I think there is one use of UML that can be useful for novices if they work in teams and have actual team meetings. UML diagrams (simplified) can be used as a brainstorming tool permitting ideas to be quickly sketched, critiqued and, perhaps, abandoned.&lt;/p&gt;&#xA;&lt;p&gt;But the same is true of &lt;a href=&quot;https://en.wikipedia.org/wiki/Class-responsibility-collaboration_card&quot; rel=&quot;noreferrer&quot;&gt;CRC cards&lt;/a&gt;, which are nothing more than index cards used in a certain way. They are easy to use, share, annotate, and discard as needed.&lt;/p&gt;&#xA;&lt;p&gt;For advanced students, however, it might be necessary to go into the detail of UML to prepare them for the workforce.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Programming by composition means that for most classes, the inner workings are dependent on having &amp;quot;parts&amp;quot; that are, themselves, objects, not primitive values. Only the innermost items of a composition (of compositions) are primitives. This gives the programmer a way to control the semantics of the parts and develop the parts with their own methods. You can't do that if everything is an int or a long.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-03-20T16:20:38.117" LastActivityDate="2021-03-20T16:20:38.117" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6864" PostTypeId="2" ParentId="6858" CreationDate="2021-03-20T22:59:56.630" Score="3" Body="&lt;p&gt;Disclaimer 1: I haven't seen the book, and I have no idea what exercises it offers.&lt;/p&gt;&#xA;&lt;p&gt;Disclaimer 2: I haven't seen your brother's code.&lt;/p&gt;&#xA;&lt;p&gt;The goal of an easy exercise is to learn how to write the perfect code. OTOH, the beginner's code tends to be sloppy. For starters, point your brother to the &lt;a href=&quot;https://codereview.stackexchange.com&quot;&gt;Code Review&lt;/a&gt; exchange.&lt;/p&gt;&#xA;&lt;p&gt;When the community is comfortable, let him go on to implement classic algorithms. &lt;a href=&quot;https://en.cppreference.com/w/cpp/algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms library&lt;/a&gt; of STL is a good starting point. When he is comfortable with it, proceed with Cormen's &lt;em&gt;Introduction to Algorithms&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The next step is highly subjective. In my opinion, every programmer shall eventually work the way through Charles Wetherell's Etudes for Programmers; arguably the best collection of exercises of various toughness. I wish I had this book when I was still a student. It is not for novices though.&lt;/p&gt;&#xA;&lt;p&gt;PS: Don't let him do Project Euler (unless he is mathematically inclined). Don't let him folow the competitive sites either.&lt;/p&gt;&#xA;" OwnerUserId="182" LastEditorUserId="182" LastEditDate="2021-03-21T00:59:48.713" LastActivityDate="2021-03-21T00:59:48.713" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6865" PostTypeId="2" ParentId="6862" CreationDate="2021-03-21T01:02:09.917" Score="10" Body="&lt;p&gt;As a professional software developer, I would recommend minimizing the time spent teaching UML.  Teach the patterns.  If they learn some UML along the way, so much the better.  But don't burden them.&lt;/p&gt;&#xA;&lt;p&gt;In my experience, I've found value in using UML for somewhere around 3-5% of my work.  It usually provides its value after the fact, once I've already identified the design patterns, and I need to describe them to others quickly.  Often they don't actually need to understand, they just need enough of a warm-fuzzy to check off on my work.  UML is great for this!&lt;/p&gt;&#xA;&lt;p&gt;All too often I find that I need something that isn't handled in UML (like handling dependent types), or something that can easily be explained in one sentence rather than a dozen fancy boxes (like object lifespan management).  I can't think of a time where I've ever looked at a UML diagram and thought, &amp;quot;wait... if I use the Decorator pattern here, I can make this diagram look better.&amp;quot;  It never helped me for actual understanding of the patterns.  And I can't count the number of times where neither aggregation nor composition adequately described my relationships, leading me to fall back on just drawing a line between them and calling it a day!&lt;/p&gt;&#xA;&lt;p&gt;That being said, use a tool for what it is good for.  In the cases where UML does a good job of describing the pattern, use it!  I love UML for drawing basic inheritance hierarchies.  But I don't think it needs to be taught.   It's simply the way you choose to draw the patterns so that you can point to boxes and talk to them.  If a sequence diagram is the right way to describe &lt;a href=&quot;https://en.wikipedia.org/wiki/Mediator_pattern&quot; rel=&quot;noreferrer&quot;&gt;Mediator&lt;/a&gt;, use it.  Use it correctly, and don't spend too much time explaining what all of the symbols mean or why.  Don't worry about explaining why the activation box on the Mediator in the Wikipeida page is broken into two part.  Doing so will teach UML as one learns a natural language.&lt;/p&gt;&#xA;&lt;p&gt;If any of your students go on to become systems engineers, they will have to learn UML the &amp;quot;right&amp;quot; way.  And they will get to learn all of the kludges we use to make UML work in situations where it shouldn't.  You wont want any of those in your course.&lt;/p&gt;&#xA;&lt;p&gt;If you wish to support the students who will work under a systems person in the future, go with the natural learning approach -- show them the tools, and let them riff on them.  Let them express themselves in almost-UML.  Then construct the assignments in a way where requirements come down from a systems person in proper UML speak, and use that as your tool for teaching UML.&lt;/p&gt;&#xA;" OwnerUserId="812" LastActivityDate="2021-03-21T01:02:09.917" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6866" PostTypeId="2" ParentId="6862" CreationDate="2021-03-21T08:13:00.690" Score="10" Body="&lt;p&gt;You are teaching a course on design patterns,  not on UML. You just happen to be using UML for the graphical notations.&lt;/p&gt;&#xA;&lt;p&gt;As UML is not the subject, don't spend too much time on it. Spend just enough time so that your students understand what you mean with each symbol that gets used in class as if it were a notation you invented, but also tell them it is called UML.&lt;/p&gt;&#xA;&lt;p&gt;That way, it doesn't take over the subject of the class, but students interested in learning more can do so by themselves.&lt;/p&gt;&#xA;" OwnerUserId="10252" LastActivityDate="2021-03-21T08:13:00.690" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6868" PostTypeId="2" ParentId="6852" CreationDate="2021-03-22T16:12:30.760" Score="2" Body="&lt;p&gt;Assuming that you have solved some of the problems in Java, you have an &amp;quot;oracle&amp;quot; for your python solution. Rework a problem in Python and compare the results of your two solutions. The advantage is that since you have a basic idea of an algorithm to solve the problem, you can concentrate more on how to express the algorithm in a different language. If the web site gives you both the test cases and expected results, you are half way there. If not, you may also need to add code for you to test your Java solution independently of the web site.&lt;/p&gt;&#xA;&lt;p&gt;You will need a method of testing your python solution. Building the code necessary to test your solution and thinking up test cases is an incredibly valuable skill to learn. You might try rolling your own (learn how to use command line parameters) or learn to use one of the unit testing frameworks (search for python unit testing). In either case you will need to come up with test cases and feed them to your code. You can validate your python solution by comparing its result to the &amp;quot;oracle&amp;quot; result.&lt;/p&gt;&#xA;&lt;p&gt;You may find that you are initially writing Java code in python. This is natural as one transitions between languages. Over time (and by code reading other python examples) you will find yourself thinking in python. You might also look at &lt;a href=&quot;https://openbookproject.net/thinkcs/python/english3e/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://openbookproject.net/thinkcs/python/english3e/&lt;/a&gt; and &lt;a href=&quot;https://openbookproject.net/thinkcs/python/english3e/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://openbookproject.net/thinkcs/python/english3e/&lt;/a&gt; which are two similar texts (viewable free online) that approach the same material in both Java and Python.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2021-03-22T21:14:39.030" LastActivityDate="2021-03-22T21:14:39.030" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6869" PostTypeId="2" ParentId="6852" CreationDate="2021-03-22T16:34:50.870" Score="1" Body="&lt;p&gt;This not-quite-answer hopes to give you some guidance on your self learning, beyond what you ask. But first, learning Python to fulfill another purpose, such as taking a course that requires it, is fine. Need driven learning, as it were.&lt;/p&gt;&#xA;&lt;p&gt;But you have only written small (tiny, actually) programs in Java, certainly too small to teach you the advantages of OO programming in any language. And learning a lot of languages to write small programs is definitely NOT a CS education. In fact programming, in any language, is only a small part of a CS education, and only a tool for a larger purpose.&lt;/p&gt;&#xA;&lt;p&gt;I suggest that, pretty soon you branch out. One way is to take on a really big project; maybe 50 &lt;em&gt;pages&lt;/em&gt; of needed code. But you will also need a good grounding in data structures and algorithms (that is two things, not one) if you don't already have that. You will need those &lt;em&gt;in spades&lt;/em&gt; to become a data scientist. You should also, probably soon, take a course in database (both theory and practice, not just SQL).&lt;/p&gt;&#xA;&lt;p&gt;I suggest, also, that while learning Python after Java, that you focus on their differences, not their similarities. They are, in many ways quite similar, but the fact that Python checks the types of things only at runtime (Java at compile time) requires a different mind set. The syntactic differences are minor by comparison. Do a search for &amp;quot;pythonic&amp;quot; to get a sense about how a skilled Python programmer thinks.&lt;/p&gt;&#xA;&lt;p&gt;But the key point here is &amp;quot;lots of languages does not a computer scientist make&amp;quot;. Go deep in some language before you try to go broad. Otherwise you are just paddling in the kiddie pool.&lt;/p&gt;&#xA;&lt;p&gt;As to the question itself, no, I don't have a website to suggest. But if you have a good Java site you can answer the questions with a Pythonic view. You can, and should, build yourself a testing framework in which to test your answers to many (most?) of the questions to assure that you get what you expect, even if it is harder to test your &lt;em&gt;style&lt;/em&gt;. For that, a critique by an expert would be most helpful, provided you can find someone.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-03-22T16:34:50.870" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6871" PostTypeId="2" ParentId="5270" CreationDate="2021-03-24T17:22:47.797" Score="2" Body="&lt;p&gt;Here is something I tell my students.  Compiling is like voting in Chicago: do it early and often.  I tell them it is a bad idea to write a whole bunch of code without compiling because they then wind up having to sift through a ton of error messages.  If you compile fairly often, you will not have a big search field for finding errors.&lt;/p&gt;&#xA;&lt;p&gt;One of my principles is the &amp;quot;Little Red Riding Hood Principle&amp;quot; which says that you want to stay on or near the path (a compiling running program) so you don't get eaten by the wolf.  This wolf takes the form of a fusillade of error messages; you get &amp;quot;eaten&amp;quot; if you become discouraged enough to pitch your code and start afresh.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-03-24T17:22:47.797" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6872" PostTypeId="2" ParentId="6813" CreationDate="2021-03-25T12:08:56.257" Score="2" Body="&lt;p&gt;I'd like to reassure you that if you are accustomed to C++ Java won't be something really difficult to understand. Yeah, it's another language with its peculiarities but nothing enormously hard to cope with.  Start from the basics - this rule always works the best.&#xA;It's OK to be afraid of new things but they are interesting challenges at the same time.&#xA;Regarding the books, I recommend you this one - Java: Programming Basics for Absolute Beginners by Nathan Clark (found it in the list with various &lt;a href=&quot;https://codegym.cc/groups/posts/best-java-books-for-beginners&quot; rel=&quot;nofollow noreferrer&quot;&gt;best java books&lt;/a&gt;). It helps to structure the programming language and to get its concept even for a newbie.&lt;/p&gt;&#xA;&lt;p&gt;Along with books, you may add some online java courses. It's a great starter pack and the point where to start from.&lt;/p&gt;&#xA;" OwnerUserId="10257" LastActivityDate="2021-03-25T12:08:56.257" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6875" PostTypeId="2" ParentId="211" CreationDate="2021-03-29T13:39:36.720" Score="0" Body="&lt;p&gt;This was too long for a comment (Please view it as such)&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Way-of-teaching-reference&lt;/strong&gt;: I can recommend the way Jerry Cain (Stanford University) introduced the concepts in C in CS107 (Programming Paradigms) (available on iTunes-U).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Problem mixing&lt;/strong&gt;: I think you're mixing two problems:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(a) C syntax is difficult&lt;/li&gt;&#xA;&lt;li&gt;(b) pointer introduction&lt;br&gt;&lt;br&gt;&#xA;So &lt;code&gt;does the introduction of pointers and memory complicate the process so much so that confusion about arrays will increase rather than decrease?&lt;/code&gt; -&amp;gt; I wouldn't say so. I would rather say &amp;quot;introducing them in C might be counterproductive&amp;quot;. &lt;br&gt;&lt;br&gt;&#xA;Remember, that your &lt;code&gt;pointing finger&lt;/code&gt; is also a pointer: It can point at a bridge without being the bridge. If it's in your pocket it points at nothing. Your finger can also point at a glass of water. If you close your eyes, you will not recognize, if someone takes away the glass. So assuming your finger always points at the glass can be &amp;quot;dangerous&amp;quot;. Someone might exchange it for spinach soup.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nothing new&lt;/strong&gt;: Pointers and arrays are a very common concept in the real world. I see many educators overcomplicating explanations. Here's a guy explaining pointers by paper in drawers: (Japanese audio) &lt;a href=&quot;https://www.youtube.com/watch?v=qhquKBfPyDs&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=qhquKBfPyDs&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Every drawer has a paper saying &amp;quot;chocolate&amp;quot; (like the type in programming), where to find the next hint (pointer), and the information on how many hints are there to come (like the &lt;code&gt;*&lt;/code&gt; in C).&lt;/li&gt;&#xA;&lt;li&gt;He looks at all hints and finally finds the chocolate.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10203" LastEditorUserId="9154" LastEditDate="2021-05-26T11:30:03.250" LastActivityDate="2021-05-26T11:30:03.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6877" PostTypeId="1" CreationDate="2021-04-01T18:47:39.143" Score="2" ViewCount="91" Body="&lt;p&gt;I would like to make animation of algorithms in order for students to see the flow of an algorithm in a visual way.&lt;/p&gt;&#xA;&lt;p&gt;Like an alternative to &lt;a href=&quot;https://visualgo.net/en&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://visualgo.net/en&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I want to make custom animations like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks in advance!&lt;/p&gt;&#xA;" OwnerUserId="10331" LastActivityDate="2021-04-10T15:00:31.097" Title="Any tools or frameworks for visualisation of algorithms?" Tags="|algorithms|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6878" PostTypeId="2" ParentId="6877" CreationDate="2021-04-01T18:53:34.787" Score="3" Body="&lt;p&gt;Actually, a few years ago, there was a large effort to work on algorithm visualization and many tools were developed. &lt;a href=&quot;http://www.uwosh.edu/faculty_staff/naps/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tom Naps&lt;/a&gt; led part of that effort, but I suspect he is now retired.&lt;/p&gt;&#xA;&lt;p&gt;But a simple google search for &amp;quot;algorithm visualization&amp;quot; will turn up quite a lot of both tools and people.&lt;/p&gt;&#xA;&lt;p&gt;They aren't hard to build, actually, if you use a language like Java that has a large and sophisticated graphics library.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-04-01T18:53:34.787" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6881" PostTypeId="2" ParentId="6680" CreationDate="2021-04-07T16:29:42.253" Score="0" Body="&lt;p&gt;If this is your first trip to OOP and design patterns&#xA;Look for the text books:&lt;/p&gt;&#xA;&lt;p&gt;Head First: Java&lt;/p&gt;&#xA;&lt;p&gt;Head First: Design Patterns&lt;/p&gt;&#xA;&lt;p&gt;Awesome design pattern resource:&#xA;&lt;a href=&quot;https://refactoring.guru/design-patterns/catalog&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://refactoring.guru/design-patterns/catalog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I also create a simple code base on my repository&#xA;&lt;a href=&quot;https://github.com/clarkngo/design-patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/clarkngo/design-patterns&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10011" LastActivityDate="2021-04-07T16:29:42.253" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6882" PostTypeId="2" ParentId="6862" CreationDate="2021-04-07T16:43:20.340" Score="2" Body="&lt;p&gt;I recommend teaching UML only as deep as the required notation to understand the design patterns. Let them be exposed to analyzing UML diagrams and creating some. I believe this will be good foundation for them to google about specific concepts or notation in UML in the future if they need to.&lt;/p&gt;&#xA;&lt;p&gt;I will share good resources too:&lt;/p&gt;&#xA;&lt;p&gt;Online Visual Paradigm - have free academic partnership that your course/school can utilize&lt;/p&gt;&#xA;&lt;p&gt;Head First: Design Patterns&lt;/p&gt;&#xA;&lt;p&gt;Awesome design pattern resource:&#xA;&lt;a href=&quot;https://refactoring.guru/design-patterns/catalog&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://refactoring.guru/design-patterns/catalog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I also create a simple code base on my repository&#xA;&lt;a href=&quot;https://github.com/clarkngo/design-patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/clarkngo/design-patterns&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10011" LastActivityDate="2021-04-07T16:43:20.340" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6883" PostTypeId="2" ParentId="6852" CreationDate="2021-04-07T16:50:03.113" Score="1" Body="&lt;p&gt;Hackerrank has good basic programming questions&lt;/p&gt;&#xA;&lt;p&gt;Codewars is great for having a sense of a group and have a healthy competition. The dashboard will show your score and ranking between friends and same institution.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/dDvei.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/dDvei.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10011" LastActivityDate="2021-04-07T16:50:03.113" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6885" PostTypeId="2" ParentId="6858" CreationDate="2021-04-09T22:26:00.470" Score="1" Body="&lt;p&gt;Not exactly exercises, but you learn a lot about programming by working through books like Kernighan and Pike's &amp;quot;The practice of programming&amp;quot; (Addison-Wesley, 1999) and Bentley's &amp;quot;Programming Pearls&amp;quot; (Addison Wesley, 2nd edition 1999). They are &lt;em&gt;not&lt;/em&gt; books on any language's syntax, they show how to solve though problems elegantly.&lt;/p&gt;&#xA;&lt;p&gt;Be advised that those scoundrels have a knack of making hard problems seem almost trivial, with solutions of a couple dozen lines.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-04-09T22:26:00.470" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6886" PostTypeId="2" ParentId="6788" CreationDate="2021-04-09T22:50:10.960" Score="1" Body="&lt;p&gt;Depends on your machine (some ABIs decree the first few arguments -- of the right types -- are passed in registers, others say all go to the stack; but then again, some environments just diverge from what the machine's designer defined), on your compiler's whim (unless it has to match up with code written by others, it's up to it). A smart compiler may even decide that the function can be inlined, and thus make it dissappear completely.&lt;/p&gt;&#xA;&lt;p&gt;For one example of complex calling conventions, take a peek at Jorgensen's &lt;a href=&quot;http://www.egr.unlv.edu/%7Eed/assembly64.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;x86-64 assembly language programming with Ubuntu&amp;quot;&lt;/a&gt;, section 12.8 (page 171 et seq). And when you mix in varargs is when the real fun starts.&lt;/p&gt;&#xA;&lt;p&gt;Take a peek at e.g. the C standard: It is very careful to make clear that the order in which arguments are computed and stored is &lt;em&gt;not&lt;/em&gt; defined by the language.&lt;/p&gt;&#xA;&lt;p&gt;In your experiment the variables are required to be copied into memory, because you take their addresses. In which order they are placed in memory by the compiler is &lt;em&gt;not&lt;/em&gt; fixed by the language. The compiler might even pick the same location for some of them if it can prove that there is no use through the pointer before placing the next one there.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastEditorUserId="5219" LastEditDate="2021-05-09T23:17:33.003" LastActivityDate="2021-05-09T23:17:33.003" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6887" PostTypeId="2" ParentId="6777" CreationDate="2021-04-09T23:06:54.007" Score="1" Body="&lt;p&gt;For simple, but interesting, problems and guidance on language use consider Downey's &lt;a href=&quot;https://greenteapress.com/wp/think-python-2e/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Think Python&amp;quot;&lt;/a&gt; (Green Tea Press, 2nd edition). Make sure to pick the second edition (Python 3), the first one is Python 2 only. The full source to the book, exercises, and other material is available for free.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-04-09T23:06:54.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6888" PostTypeId="2" ParentId="6822" CreationDate="2021-04-10T01:11:26.387" Score="1" Body="&lt;p&gt;What specific open source programs/areas are you interested in? Check their webpages, download the sources and build them yourself, they often list &amp;quot;easy/for beginner&amp;quot; tasks, sniff around their development lists, peek at the bug reporting system. That should give you a better idea of the task you are taking on, and how friendly the community is. Perhaps they have pointers at good tutorials and even are willing to give a hand.&lt;/p&gt;&#xA;&lt;p&gt;To learn C++, check out &lt;a href=&quot;http://www.cplusplus.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;CPlusPlus&lt;/a&gt; and &lt;a href=&quot;https://en.cppreference.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;CPPReference&lt;/a&gt;. There are plenty of tutorials around elsewhere, but make sure to grab a new one (the language is still somewhat in flux). Then dig in and create patches for your favorite package. The first ones will probably be rejected or rewritten beyond all recognition by the stewards, but you'll learn a ton by looking at the changes.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-04-10T01:11:26.387" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6889" PostTypeId="2" ParentId="6759" CreationDate="2021-04-10T01:51:28.503" Score="1" Body="&lt;p&gt;I'd suggest you reconsider. To understand e.g. why Pascal is a nice teaching language you need to have a decent background in programming languages, some notion of teaching programming (the misconceptions by learners are often way, way different than you'd guess in your wildest nightmare), and hopefully some experience teaching.&lt;/p&gt;&#xA;&lt;p&gt;Languages specifically designed for teaching are a wildly varied  bunch, most never won any sort of wider traction. Or if they did, they soon outgrew the &amp;quot;to teach programming&amp;quot; range. Take a peek at BASIC and its recent incarnations (don't look like BASIC at all); languages like Pascal (designed to be easy to implement and teach); Logo and even (to some extent) Scheme are part of the flock.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-04-10T01:51:28.503" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6891" PostTypeId="2" ParentId="6877" CreationDate="2021-04-10T15:00:31.097" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I would like to make animation of algorithms in order for students to&#xA;see the flow of an algorithm in a visual way.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Get the game &lt;a href=&quot;https://tomorrowcorporation.com/humanresourcemachine&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Don't believe me then just watch this &lt;a href=&quot;https://youtu.be/HDrVlvUGfMI?t=217&quot; rel=&quot;nofollow noreferrer&quot;&gt;video&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What is really nice about this is that if you have a student who is having a problem with a basic concept you can have them play the game and talk about what they are thinking. This often helps in identifying the mental block the student is having and then you can just help them play the game and that should help them learn an analogy that helps them past the mental block.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2021-04-10T15:00:31.097" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6892" PostTypeId="1" AcceptedAnswerId="6904" CreationDate="2021-04-11T09:16:10.840" Score="3" ViewCount="39" Body="&lt;p&gt;I am having some difficulties to find free access documentation, lecture notes, scientific papers, or books, on a course I have to give. Course topic is &amp;quot;Services-centered design&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Course objectives are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use advanced design techniques applicable to large service oriented software systems.&lt;/li&gt;&#xA;&lt;li&gt;Apply advanced design techniques for a specific system.&lt;/li&gt;&#xA;&lt;li&gt;Evaluate design decisions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Course content is:&#xA;Concepts&#xA;Development cycle and life cycle (service oriented)&#xA;Principles of service-oriented application development&#xA;Templates&#xA;Protocols and standards&#xA;Approaches and implementation&lt;/p&gt;&#xA;&lt;p&gt;Thank you in advance for any help.&lt;/p&gt;&#xA;" OwnerUserId="3340" LastEditorUserId="3340" LastEditDate="2021-04-11T16:36:44.597" LastActivityDate="2021-04-18T18:52:04.537" Title="Services-centered design" Tags="|resource-request|introductory-lesson|labs|course-design|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6893" PostTypeId="5" CreationDate="2021-04-11T14:53:37.770" Score="0" Body="&lt;p&gt;In the US, at least, a &amp;quot;course&amp;quot; is a relatively short term (few months) study of a single topic, not a &amp;quot;course of study&amp;quot; which would be a &amp;quot;curriculum&amp;quot;. Use this tag for help in designing and specifying a single course, such as Data Structures. A &amp;quot;course&amp;quot; is a single unit within a &amp;quot;curriculum&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-04-11T14:53:37.770" LastActivityDate="2021-04-11T14:53:37.770" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6894" PostTypeId="4" CreationDate="2021-04-11T14:53:37.770" Score="0" Body="For questions related to the design of a single course, say, of approximately semester length. Questions about syllabus contents, grading options, etc. Use the [curriculum-design] tag for sequences of courses contributing to a degree. " OwnerUserId="1293" LastEditorUserId="1035" LastEditDate="2021-12-26T18:21:02.627" LastActivityDate="2021-12-26T18:21:02.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6895" PostTypeId="1" CreationDate="2021-04-12T15:29:19.623" Score="4" ViewCount="119" Body="&lt;p&gt;I don't remember that I saw sources section on Udemy tutorials or YouTube videos, whether they are a course or not. Even, on books such as,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.unf.edu/%7Ewkloster/2220/ppts/cprogramming_tutorial.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.unf.edu/~wkloster/2220/ppts/cprogramming_tutorial.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://cs.brown.edu/courses/cs173/2012/book/book.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs.brown.edu/courses/cs173/2012/book/book.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://lug.cs.uic.edu/wiki/lib/exe/fetch.php?media=cybersecurity_for_dummies._palo_alto_networks_edition_by_miller_l.c._z-lib.org_.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://lug.cs.uic.edu/wiki/lib/exe/fetch.php?media=cybersecurity_for_dummies._palo_alto_networks_edition_by_miller_l.c._z-lib.org_.pdf&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Nevertheless, I really care about plagiarism, ethics, copyright and any other rights of the people or companies and need help for following topic.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I am a computer engineer and I'll generate free or paid courses / videos in the informatics sector such as computer usage, programming, network administration, etc. on Udemy or YouTube.&lt;/p&gt;&#xA;&lt;p&gt;These courses &lt;strong&gt;completely&lt;/strong&gt; will be generated combination of the Turkish and English information on the web (to generate high quality courses) such as pdfs published by universities as above, videos, official websites (such as microsoft.com, apple.com, etc.), blogs, wikipedia, articles, etc. and will be published as Turkish.&lt;/p&gt;&#xA;&lt;p&gt;I know that I can't add directly bulk texts, images, video parts from different sources, etc. However, I need to add similar things to them to explain a topic. And I know that I can't tell an article's result is my work, etc.&lt;/p&gt;&#xA;&lt;p&gt;I plan to use a slider software for definitions section of the videos. However, I don't think every video will have this section. And I plan to tell what I understand from the sources with different words or sentences and add different examples as much as I can.&lt;/p&gt;&#xA;&lt;p&gt;Does my plan considered as stealing, non-ethical, plagiarism or copyright or any other right issue in this case? Do I need to credit every word or sentence seperately? How can I do this in a video?&lt;/p&gt;&#xA;&lt;p&gt;Or is it enough to add all of the links in bulk used to generate the course / video at the end of it? Do I need to specify author name, date, etc. of my sources as in academic paper? If yes, which standard should I follow?&lt;/p&gt;&#xA;" OwnerUserId="10394" LastActivityDate="2022-01-07T18:02:35.313" Title="How can I credit to sources I'll use for my paid or free video tutorials on YouTube or Udemy?" Tags="|ethics|plagiarism|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6896" PostTypeId="2" ParentId="6895" CreationDate="2021-04-12T15:36:26.703" Score="1" Body="&lt;p&gt;The most general rule is that once you cite, you are no longer plagiarizing.  You can submit someone else's entire paper, and as long as you (very clearly) note that you didn't write a word of it, and that it was someone else's paper that you found interesting, you are no longer &lt;em&gt;plagiarizing&lt;/em&gt;, as you are no longer representing someone else's work as your own.&lt;/p&gt;&#xA;&lt;p&gt;The standards for citation are different in different settings.  In fully formal papers, you need to cite fact-by-fact, because every contribution needs to be traced directly.  In a video, it is sufficient to say that what you're presenting isn't developed by you, but really the work of other incredible people, and that you will link to those sources at the bottom of the video.  Again, the standard is whether you represent the work as your own or not.&lt;/p&gt;&#xA;&lt;p&gt;A setting like an instructional video does not need (and typically does not support) each fact being separately cited.  Further, no one would expect it, any more than they would expect it in a lecture at university.&lt;/p&gt;&#xA;&lt;p&gt;Good luck creating your course!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-04-12T15:36:26.703" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6897" PostTypeId="1" CreationDate="2021-04-12T19:19:55.240" Score="7" ViewCount="716" Body="&lt;p&gt;I am currently following the red dragon book:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/PBj7n.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/PBj7n.png&quot; alt=&quot;Red Dragon Book&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;But most of the time, I have difficulty understanding the kinds of stuff in the book. Though the content is fine, and I end up asking questions on cs.StackExchange or StackOverflow. Then I thought of reading the reviews of the text and find out whether it is only me who is facing is the problem or there are people like me as well, finding the language hard to understand. Then I came across the &lt;a href=&quot;https://www.goodreads.com/book/show/703102.Compilers&quot; rel=&quot;noreferrer&quot;&gt;review&lt;/a&gt; page of this book in good reads and among many reviews, I found one which explains the problem with the text probably. Here it is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Good content, horrendous writing.&lt;/p&gt;&#xA;&lt;p&gt;The good thing about this book is it is comprehensive and covers a lot of ground from different vantage points. For example, the parsing chapters also cover the design of lex and yacc apart from basic topics. The type checking and runtime environment chapters had examples from C and ML to cover different scenarios.&lt;/p&gt;&#xA;&lt;p&gt;Now the bad parts. The book is awfully written and I cannot understand how can a book in its 2nd (or 3rd?) edition continue to be so bad. It was shoddy writing throughout but the prize for the worst writing is these topics:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Discussion of bottom-up parsing where they directly jump to deterministic graph without discussing the nondeterministic version.&lt;/li&gt;&#xA;&lt;li&gt;Implementation of L-attributed SDTs with an obtuse parser stack.&lt;/li&gt;&#xA;&lt;li&gt;Implementation of type unification with their shoddy graph data structure.&lt;/li&gt;&#xA;&lt;li&gt;Implementation of run time system for ML using &amp;quot;display&amp;quot; which is incomprehensible.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Another consistent problem is their horrible use of passive voice. This interacts really badly with their discussion of mathematical aspects. While the use of passive voice might be excusable, its shoddy use is not.&lt;/p&gt;&#xA;&lt;p&gt;Reading this book often felt like deciphering some ancient text. I needed to translate a lot of obtuse writing into something that can be understood in my head. This translation happens for all readings involuntarily but it was alarming I had to consciously do it for this book.&lt;/p&gt;&#xA;&lt;p&gt;I am not sure why is this book called a &amp;quot;classic&amp;quot; computer science book. It is more like a kind of book that students are forced to study by their professors. This book is impossible to read unless you are following some other source. I followed Prof. Alex Aiken's lectures&lt;/p&gt;&#xA;&lt;p&gt;This book might be responsible for the unpopularity of the study and research in programming languages. I agree compilers are not easy but this book has taken a difficult topic and made it incomprehensible thereby doing a disservice to this whole field of study.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I am not criticizing the text or authors. The only thing is that probably the text does not suit a self-learner like myself. Could anyone suggest a compiler text to substitute the red dragon book possibly? A book with easy language, such that one easily understand what the authors tried to mean just by reading a sentence once. This would help a self-learner to focus more on the concept rather than getting lost in finding out the meaning behind the lines.&lt;/p&gt;&#xA;&lt;p&gt;A book that is lucid and easy to read and equivalent in power to the red dragon book as far as the contents and the examples are concerned.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2021-06-19T10:42:05.987" Title="Book to substitute &quot;Compilers: Principles, Techniques and Tools&quot; by Ullman et. al. (popularly known as the red dragon book)" Tags="|self-learning|resource-request|textbook|compiling|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6898" PostTypeId="2" ParentId="6897" CreationDate="2021-04-12T20:36:59.360" Score="8" Body="&lt;p&gt;The &amp;quot;problem&amp;quot; with the dragon book is that it is so complete; intentionally so. Over its lifetime there have been tremendous advances in the theory and practice of building compilers. If you want &amp;quot;state of the art&amp;quot;, then you want the dragon book, probably a later (harder) edition, even.&lt;/p&gt;&#xA;&lt;p&gt;But it is a bit much, as you have seen, for a first course, or an overview of compiling. It is often used in graduate courses, for example, and, even then, in a follow-up course to one in Language Principles which discusses much of the underlying theory separately.&lt;/p&gt;&#xA;&lt;p&gt;While it is hard to find and a bit expensive, one of the best books for an introduction, and separately a bit of real literature in CS, get a copy of Brinch Hansen's &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0130830984&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;On Pascal Compilers&lt;/a&gt;. It shows how to build a compiler as well as a machine to execute the code using Recursive Descent Parsing, which is easy to understand and suitable for LL languages (with a few extensions for non-LL features).&lt;/p&gt;&#xA;&lt;p&gt;Most commercial compilers use LR compiling techniques even if the language is LL, simply for efficiency reasons, but the theory is much harder as are the compilers. For state-of-the-art understanding, you need to delve into LR, but for a first introduction, LL is enough and easy to understand.&lt;/p&gt;&#xA;&lt;p&gt;LL compiling is also called Predictive Parsing, since it is easy to look at a language statement and choose a method for translating it, usually using keywords. The suitable languages for LL parsing are also easy for a human to read and understand. If a language (feature) absolutely demands LR parsing, then it will be difficult for a person to read.&lt;/p&gt;&#xA;&lt;p&gt;For example, the Dangling Else Problem in if statements is a consequence of the construct not being LL, though  LL parsers usually have special hacks to handle this common construct.&lt;/p&gt;&#xA;&lt;p&gt;Once you can handle Hansen's book, the dragon book won't be so daunting.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="9154" LastEditDate="2021-06-19T10:42:05.987" LastActivityDate="2021-06-19T10:42:05.987" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6899" PostTypeId="1" CreationDate="2021-04-14T15:16:10.390" Score="2" ViewCount="88" Body="&lt;p&gt;I taught Theory of Computation last Fall and I believe it would be more interesting for students to add some coding implementations. Are you aware of any online course or textbooks in which Haskell (or other languages) are used to teach CS Theory concepts?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="6410" LastEditDate="2021-04-15T01:35:45.020" LastActivityDate="2021-04-15T16:06:30.967" Title="Do you know online courses with Haskell for Theory of Computation?" Tags="|programming|functional-programming|cs-theory|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6900" PostTypeId="1" CreationDate="2021-04-14T19:23:22.023" Score="2" ViewCount="49" Body="&lt;p&gt;I am a fresh Ph.D. student in information science. I know some python, C, Cobol, etc.&#xA;I know some sites to learn SQL for data science interviews.&lt;/p&gt;&#xA;&lt;p&gt;Can anybody tell me any resource available for data engineering, ETL, SSIS which teach from the beginner to pro level?&lt;/p&gt;&#xA;" OwnerUserId="10403" LastEditorUserId="10403" LastEditDate="2021-05-17T20:07:23.457" LastActivityDate="2021-05-17T20:07:23.457" Title="Data Engineering, ETL, SQL Server Integration Services(SSIS) resources form beginner to pro level" Tags="|sql|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6901" PostTypeId="2" ParentId="6899" CreationDate="2021-04-15T12:33:51.060" Score="1" Body="&lt;p&gt;I am not aware of any textbook or online course, no, but I do this myself within my own classroom, and I can share my approach.  I use Scheme instead of Haskell, but the method would port quite well to Haskell.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We spend some time learning a bit about coding in Scheme, and FP in general.&lt;/li&gt;&#xA;&lt;li&gt;We cover FSMs and regular expressions, and they code an FSM lab for which they create a &lt;code&gt;DFA&lt;/code&gt; and an &lt;code&gt;NFA&lt;/code&gt; function.  &lt;code&gt;DFA&lt;/code&gt; takes an input string and a machine &lt;span class=&quot;math-container&quot;&gt;$(Q, \Sigma, \delta, q_0, F)$&lt;/span&gt; and returns true or false.  &lt;code&gt;NFA&lt;/code&gt; takes an input string, a machine &lt;span class=&quot;math-container&quot;&gt;$(Q, \Sigma, \Delta, q_0, F)$&lt;/span&gt;, and a maximum number of iterations (to prevent infinite loops), and returns a boolean.&lt;/li&gt;&#xA;&lt;li&gt;We cover PDAs and context-free languages, and they create a &lt;code&gt;PDA&lt;/code&gt; lab very similar to &lt;code&gt;NFA&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;We go over Turing Machines, and depending on how much time remains in the term, we either do a &lt;code&gt;TM&lt;/code&gt; lab, or if there is not enough time, we do a variant on the Busy Beaver problem where I provide a TM, and their job is to create as many &lt;code&gt;1&lt;/code&gt;s on a tape as possible, with the caveat that the tape must halt by the time the lab is due, and they then submit their machine and a screenshot of the output summary screen.  This is done as a contest, and their contest score is &lt;span class=&quot;math-container&quot;&gt;$O / (S+A+I)$&lt;/span&gt;, where &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt; is the number of &lt;span class=&quot;math-container&quot;&gt;$1$&lt;/span&gt;s in the final output tape, &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt; is the number of states in the machine, &lt;span class=&quot;math-container&quot;&gt;$A$&lt;/span&gt; is the size of the unioned set of input symbols and tape symbols, and &lt;span class=&quot;math-container&quot;&gt;$I$&lt;/span&gt; is the number of prewritten states to the tape (i.e. the input).  Scores range from .5 to numbers in the quadrillions.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I do more things going forward with untyped &lt;span class=&quot;math-container&quot;&gt;$\lambda$&lt;/span&gt; Calculus, and talk a bit about the Church-Turing thesis, but my emphasis switches sufficiently away from computational theory at this point that I wouldn't put it in the same boat any more.  We eventually create a REPL and interpreter for untyped lambda calculus (back in Java, no longer in Scheme), that allows for interactions like so:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; 0 = \f.\x.x&#xA;Added (λf.(λx.x)) as 0&#xA;&amp;gt; succ = \n.\f.\x.f (n f x)&#xA;Added (λn.(λf.(λx.(f ((n f) x))))) as succ&#xA;&amp;gt; 1 = run succ 0&#xA;Added (λf.(λx.(f x))) as 1&#xA;&amp;gt; + = λm.λn.λf.λx.(m f) ((n f) x)&#xA;Added (λm.(λn.(λf.(λx.((m f) ((n f) x)))))) as +&#xA;&amp;gt; * = λn.λm.λf.λx.n (m f) x&#xA;Added (λn.(λm.(λf.(λx.((n (m f)) x))))) as *&#xA;&amp;gt; 2 = run succ 1&#xA;Added (λf.(λx.(f (f x)))) as 2&#xA;&amp;gt; 3 = run + 2 1&#xA;Added (λf.(λx.(f (f (f x))))) as 3&#xA;&amp;gt; 4 = run * 2 2&#xA;Added (λf.(λx.(f (f (f (f x)))))) as 4&#xA;&amp;gt; 5 = + 1 (* 2 2) &#xA;Added (λf.(λx.(f (f (f (f (f x))))))) as 5&#xA;&amp;gt; 7 = run succ (succ 5)&#xA;Added (λf.(λx.(f (f (f (f (f (f (f x))))))))) as 7&#xA;&amp;gt; pred = λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)&#xA;Added (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u))))) as pred&#xA;&amp;gt; 6 = run pred 7&#xA;Added (λf.(λx.(f (f (f (f (f (f x1)))))))) as 6&#xA;&amp;gt; - = λm.λn.(n pred) m&#xA;Added (λm.(λn.((n (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u)))))) m))) as -&#xA;&amp;gt; 10 = run succ (+ 3 6)&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f (f (f x)))))))))))) as 10&#xA;&amp;gt; 9 = run pred 10&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f (f x))))))))))) as 9&#xA;&amp;gt; 8 = run - 10 2&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f x)))))))))) as 8&#xA;&amp;gt; true = λx.λy.x&#xA;Added (λx.(λy.x)) as true&#xA;&amp;gt; false = 0&#xA;Added (λf.(λx.x)) as false&#xA;&amp;gt; not = λp.p false true&#xA;Added (λp.((p (λf.(λx.x))) (λx.(λy.x)))) as not&#xA;&amp;gt; even? = λn.n not true&#xA;Added (λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) as even?&#xA;&amp;gt; odd? = \x.not (even? x)&#xA;Added (λx.((λp.((p (λf.(λx.x))) (λx.(λy.x)))) ((λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) x))) as odd?&#xA;&amp;gt; run even? 0&#xA;true&#xA;&amp;gt; run even? 5&#xA;false&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I have much more to say about every one of these things individually, of course, but this answer is only a quick summary of what we do, so I will leave it here for now.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-04-15T12:33:51.060" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6902" PostTypeId="2" ParentId="6899" CreationDate="2021-04-15T15:25:53.020" Score="2" Body="&lt;p&gt;This is another not-an-answer that might provide some useful resources. The last is probably the best, but not Haskell related&lt;/p&gt;&#xA;&lt;p&gt;The two old standards for such a course are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Introduction to Automata Theory, Languages, and Computation&lt;/em&gt;, by Hopcroft, Motwani, and Ullman. Earlier editions were just Hopcroft and Ullman.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;Introduction to the Theory of Computation&lt;/em&gt; by Sipser.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I don't have the second book, and don't know if it includes any programming exercises, but there might be something in Scheme, knowing Sipser. Amazon's &amp;quot;Look Inside&amp;quot; doesn't seem to work for Sipser.&lt;/p&gt;&#xA;&lt;p&gt;Two additional books, both very old and hard to get but very highly recommended if you can find them - both short and straightforward with clear explanations are&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;First Course in Formal Language Theory (Computer science texts)&lt;/em&gt;&#xA;by V. J. Rayward-Smith, and&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;First Course in Computability (Computer Science Texts)&lt;/em&gt;&#xA;by V. J. Rayward-Smith&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The final suggestion is a software system with an associated text.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.jflap.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;JFlap&lt;/a&gt; was created by Susan Rodger and her colleagues at Duke to form the basis of such a course. Students can easily create all sorts of finite automata. The book they wrote to go with this is &lt;em&gt;JFap: An interactive Formal Languages and Automata Package&lt;/em&gt;, Rodger and Finley.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/JFLAP&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia has an overview&lt;/a&gt; of JFlap.&lt;/p&gt;&#xA;&lt;p&gt;Note that JFlap writes automata descriptions in XML which should be easy to parse in any language. All of the automata mentioned in the JFLap tutorial are available for download.&lt;/p&gt;&#xA;&lt;p&gt;I was part of the NSF evaluation of this system and it is really excellent.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-04-15T16:06:30.967" LastActivityDate="2021-04-15T16:06:30.967" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6903" PostTypeId="1" AcceptedAnswerId="6905" CreationDate="2021-04-17T20:05:53.613" Score="4" ViewCount="217" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/John_Milton_Gregory#The_Seven_Laws_of_Teaching&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt;  shows that in 1886 John Milton Gregory outlined his &amp;quot;The Seven Laws of Teaching&amp;quot;;  asserting  that a teacher should:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Know thoroughly and familiarly the lesson you wish to teach; or, in other words, teach from a full mind and a clear understanding.&lt;/li&gt;&#xA;&lt;li&gt;Gain and keep the attention and interest of the pupils upon the lesson. Refuse to teach without attention.&lt;/li&gt;&#xA;&lt;li&gt;Use words understood by both teacher and pupil in the same sense—language clear and vivid alike to both.&lt;/li&gt;&#xA;&lt;li&gt;Begin with what is already well known to the pupil in the lesson or upon the subject, and proceed to the unknown by single, easy, and natural steps, letting the known explain the unknown.&lt;/li&gt;&#xA;&lt;li&gt;Use the pupil's own mind, exciting his self-activities. keep his thoughts as much as possible ahead of your expression, making him a discoverer of truth.&lt;/li&gt;&#xA;&lt;li&gt;Require the pupil to reproduce in thought the lesson he is learning—thinking it out in its parts, proofs, connections, and applications til he can express it in his own language.&lt;/li&gt;&#xA;&lt;li&gt;Review, review, REVIEW, reproducing correctly the old, deepening its impression with new thought, correcting false views, and completing the true.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;My question is in today's on-line high stakes testing environment, how many of his &amp;quot;Laws of Teaching&amp;quot; are still relevant; in particular, to the teaching of computer science at the K12 grade school level.&lt;/p&gt;&#xA;" OwnerUserId="1568" LastEditorUserId="1568" LastEditDate="2021-04-17T21:39:31.900" LastActivityDate="2021-04-19T13:46:43.763" Title="How many of &quot;The Seven Laws of Teaching&quot; are still relevant for teaching computer science today?" Tags="|secondary-education|best-practice|active-learning|primary-school|online|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6904" PostTypeId="2" ParentId="6892" CreationDate="2021-04-18T18:39:18.870" Score="1" Body="&lt;p&gt;I finally found out that the right keywords for what I was looking for, given the course objectives and the course content are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Service-oriented software engineering&lt;/li&gt;&#xA;&lt;li&gt;Service-driven software&#xA;engineering&lt;/li&gt;&#xA;&lt;li&gt;Service-oriented software architecture&lt;/li&gt;&#xA;&lt;li&gt;Service-driven software architecture&lt;/li&gt;&#xA;&lt;li&gt;Services-centered software architecture design, ...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3340" LastEditorUserId="3340" LastEditDate="2021-04-18T18:52:04.537" LastActivityDate="2021-04-18T18:52:04.537" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6905" PostTypeId="2" ParentId="6903" CreationDate="2021-04-19T13:46:43.763" Score="3" Body="&lt;p&gt;These &amp;quot;laws&amp;quot; mostly reflect how people learn, so they are still quite relevant.  But going through:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Know thoroughly and familiarly the lesson you wish to teach; or, in other words, teach from a full mind and a clear understanding&amp;quot;)&lt;/strong&gt; is interesting in a CS context, since we often &lt;em&gt;don't&lt;/em&gt; have fantastic knowledge of the material, because it is so new. We have &lt;a href=&quot;https://cseducators.stackexchange.com/questions/4379/how-do-you-teach-something-when-you-dont-know-it-yourself&quot;&gt;a question about that&lt;/a&gt; which has some interesting discussion on teaching what you don't really know.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Gain and keep the attention and interest of the pupils upon the lesson. Refuse to teach without attention.&amp;quot;)&lt;/strong&gt; This is more a matter of philosophy, I think.  I sometimes do this, but I sometimes quite deliberately do not.  It depends on the goal of the moment.  As an example, there are sometimes things that I will do to help a subset of the students in my class.  I will even sometimes accompany this with directions such as, &amp;quot;if you weren't sure about number 3, then I will go through it very carefully because understanding this idea is key to understanding this field of study. However, if you got it right and feel quite confident that you understand ____, you can turn your attention to the lab for the next ten minutes or so.&amp;quot;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Use words understood by both teacher and pupil in the same sense—language clear and vivid alike to both.&amp;quot;)&lt;/strong&gt; This is (I hope) always the goal of communication, no?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Begin with what is already well known to the pupil in the lesson or upon the subject, and proceed to the unknown by single, easy, and natural steps, letting the known explain the unknown.&amp;quot;)&lt;/strong&gt; This is surprisingly controversial.  (Consider &lt;a href=&quot;https://hollyclark.org/wp-content/uploads/2017/08/Anthony-Gregorc-4-Mind-Styles.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Anthony Gregorc's learning categories&lt;/a&gt;)  However, it pretty well reflects what we know about how the brain learns.  (See the section on &lt;a href=&quot;https://courses.lumenlearning.com/austincc-learningframeworks/chapter/chapter-9-memory-and-information-processing/&quot; rel=&quot;nofollow noreferrer&quot;&gt;encoding&lt;/a&gt;), and it is certainly (uncontroversially, as far as I know) the most time-efficient way to impart information.  You might argue that there are possible long-term benefits to less-efficient means of instruction, such as supporting the soft skills in students of teaching themselves.  That is a controversial position, but certainly one that many people hold, particularly with older students, when it arguably has the least benefit.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Use the pupil's own mind, exciting his self-activities. keep his thoughts as much as possible ahead of your expression, making him a discoverer of truth.&amp;quot;)&lt;/strong&gt;  This is edge-of-your-seat teaching, and is unquestionably good! Though it can be quite hard to do well -- some topics lend themselves to this more than others.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Require the pupil to reproduce in thought the lesson he is learning—thinking it out in its parts, proofs, connections, and applications til he can express it in his own language.&amp;quot;)&lt;/strong&gt;  Other than the controversy I mention in #4, this is clearly good teaching in any topic.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;(&amp;quot;Review, review, REVIEW, reproducing correctly the old, deepening its impression with new thought, correcting false views, and completing the true.&amp;quot;)&lt;/strong&gt;  This is how you remove misunderstandings and help students transfer information to long-term storage, so it is vital.  Again, in some classrooms, teachers may deliberately choose not to do this, as it could be viewed as hand-holding when students should learn to be independent learners, even at the cost of immediate progress.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I've mentioned a few times the notion of allowing instruction to move slower in order to help students develop their own learning skills.  I almost entirely fall into the other camp, and believe that direct instruction can also help to create self-learning skills, but much of that depends on the richness of the information being presented.  I also provide some direct instruction on how to self-learn, and how students can monitor their own minds and understanding more effectively.  I don't have any way to know whether I am correct in this approach; it's unstudied, so it is more philosophical at the moment.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-04-19T13:46:43.763" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6906" PostTypeId="2" ParentId="4947" CreationDate="2021-04-20T19:14:32.410" Score="0" Body="&lt;p&gt;After examining a number of the relevant syllabi, I have come to the conclusion that the CS programs of the &amp;quot;top&amp;quot; CS schools, MIT, Stanford, Cal Tech, and CMU are all innovative and thereby different from those of Ivy League schools. (For instance, CMU offers a joint CS and Psychology degree.) To a lesser extent, this appears to be true of certain other schools such as Georgia Tech. You can debate which of these 4-5 CS programs is better or worse, but they are all highly &amp;quot;original.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;The programs at the Ivy League Schools (Cornell is partly an exception) follow more of a &amp;quot;cookie cutter&amp;quot; mold. Yale's program, for instance, is a &amp;quot;souped up&amp;quot; version of that found at state schools.&lt;/p&gt;&#xA;&lt;p&gt;Nowadays, at least, Yale's CS program, while &amp;quot;standard strong,&amp;quot; is no longer pioneering. The last time it was regarded as such was during the 1970s and 1980s. The reason is that they hired &lt;a href=&quot;https://en.wikipedia.org/wiki/Alan_Perlis&quot; rel=&quot;nofollow noreferrer&quot;&gt;Alan Perlis&lt;/a&gt; from what was then Carnegie Institute of Technology (now CMU) to head their CS department. Without Perlis (or his equivalent), Yale's CS program is no longer &amp;quot;cutting edge.&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="613" LastEditorUserId="613" LastEditDate="2021-04-22T03:53:48.160" LastActivityDate="2021-04-22T03:53:48.160" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6907" PostTypeId="1" AcceptedAnswerId="6984" CreationDate="2021-04-21T16:23:35.557" Score="1" ViewCount="203" Body="&lt;p&gt;I want to learn Go Language as it is popular these days. I tried some demo programs on &lt;a href=&quot;https://play.golang.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://play.golang.org/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Do we have some good resources to learn Golang? It looks pretty similar to C, C++ in some ways.&lt;/p&gt;&#xA;" OwnerUserId="10403" LastEditorUserId="204" LastEditDate="2021-05-28T15:32:05.750" LastActivityDate="2021-07-19T15:03:40.333" Title="Learning GoLang" Tags="|self-learning|programming|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6908" PostTypeId="2" ParentId="6858" CreationDate="2021-04-22T01:46:49.323" Score="1" Body="&lt;p&gt;The book by Jeff Erickson, &lt;a href=&quot;http://jeffe.cs.illinois.edu/teaching/algorithms/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Algorithms&amp;quot;&lt;/a&gt; is a (tough!) next step after getting confortable with the basics.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-04-22T01:46:49.323" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6910" PostTypeId="1" AcceptedAnswerId="6912" CreationDate="2021-04-22T06:24:09.737" Score="3" ViewCount="747" Body="&lt;p&gt;These days everybody is learning Python. I remember when we first started programming we were taught C Language. As a teacher which language should be taught first these days, C Language or Python?&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2024-02-12T19:48:55.787" Title="First programming Language : C or Python?" Tags="|python|c|" AnswerCount="6" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6911" PostTypeId="1" CreationDate="2021-04-22T07:41:16.583" Score="1" ViewCount="307" Body="&lt;p&gt;Is there any recommendation on an online platform that teaches and allows practicing object-oriented programming (OOP) in Python?&lt;/p&gt;&#xA;&lt;p&gt;I am familiar with Hackerrank and HackerEarth, however, they do not have practice problems related to Object-Oriented Programming in Python but they do have problems related to other concepts.&lt;/p&gt;&#xA;" OwnerUserId="10421" LastEditorUserId="9154" LastEditDate="2021-05-31T15:40:28.947" LastActivityDate="2023-03-24T17:04:05.483" Title="Online Platform for practicing Object Oriented Programming in Python" Tags="|programming|object-oriented-paradigm|python|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="6912" PostTypeId="2" ParentId="6910" CreationDate="2021-04-23T20:24:08.817" Score="11" Body="&lt;p&gt;The question is actually more complex than it might  appear, and really the answer can depend on the context. For example, at what age are the students when they are first taught to program? Is this in Primary School, High School or part of an undergraduate programme? The answer might be different in each case.&lt;/p&gt;&#xA;&lt;p&gt;It also depends on the purpose of teaching the initial programming language (IPL). Is the purpose to lead towards a practical skill (vocational programming), or is it to enable the teaching of some knowledge of algorithms (pedagogic programming), is it to enable the functioning of some devices (engineering programming) or is it to prepare students for further study? Each of these questions could lead to a different language as an IPL.&lt;/p&gt;&#xA;&lt;p&gt;For a very early age start of programming one does not have to worry about employment or future curricula so something engaging is important, so tools such as MIT Scratch have a role. For later childhood Python fills a nice niche, particularly as it can run on a wide variety of inexpensive  platforms (such as Arduino's, Raspberry Pi and so forth) which  provides accessibility and make it within the reach of the classroom and individual students.&lt;/p&gt;&#xA;&lt;p&gt;Conversely, if one is looking at an undergraduate IPL then it may depend on which degree programme is being considered. Is it a degree in Computer Science, Engineering, Biology, Chemistry or Physics? One would then need to take into account what graduate employers might be looking for and tailor to that market.&lt;/p&gt;&#xA;&lt;p&gt;Python might have value in some of these programs but the students would also have to learn other languages at some point. For example, Computer Scientists would need a wider experience that would embrace C#, C++ (among others). Electronic Engineers might need &lt;strong&gt;C&lt;/strong&gt;, but Computer Scientists less so. Biologists might need &lt;strong&gt;R&lt;/strong&gt;, Chemists and Physicists might still  need Fortran!&lt;/p&gt;&#xA;&lt;p&gt;However, I would say that I might never recommend &lt;strong&gt;C&lt;/strong&gt; as an IPL, and would start at C++ even for the most hardened Electrical Engineer. I only show Computer Science students &lt;strong&gt;C&lt;/strong&gt; in specific contexts (like working with flex and bison)!&lt;/p&gt;&#xA;&lt;p&gt;One thing I say to my students in the course where I look at Languages is that there is no one &lt;strong&gt;best&lt;/strong&gt; language. The choice of language for any particular situation is so very context dependent on resources available, skills available, the purpose of the programming and the end goal of the task, and for an IPL that advice still holds true.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2021-04-23T20:24:08.817" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6913" PostTypeId="2" ParentId="791" CreationDate="2021-04-24T11:43:40.370" Score="1" Body="&lt;p&gt;History in your browser, recurrence in functions, &amp;quot;undo&amp;quot; like control-z in many programs are examples of stack usage&lt;/p&gt;&#xA;" OwnerUserId="10429" LastActivityDate="2021-04-24T11:43:40.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6914" PostTypeId="1" CreationDate="2021-04-26T13:58:01.773" Score="0" ViewCount="75" Body="&lt;p&gt;As the question suggests, is it a good idea to teach Data Structure course in Python. Or what be any good rationale for teaching Data Structure course in Python and not in C++.&lt;/p&gt;&#xA;" OwnerUserId="10436" LastActivityDate="2021-04-27T15:53:25.743" Title="Why might be the benefits of teaching data structure course in Python?" Tags="|data-structure|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6916" PostTypeId="1" CreationDate="2021-04-27T14:55:50.100" Score="2" ViewCount="33" Body="&lt;p&gt;I'm exploring options for students to work on open source projects for academic credit. The Apache Software Foundation run a &lt;a href=&quot;https://community.apache.org/mentoringprogramme.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mentoring Programme&lt;/a&gt;, and also facilitate &lt;a href=&quot;https://community.apache.org/mentorprogrammeformaleducation.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;participating in the Mentoring Programme as part of formal education&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Are there other programmes like this, where open source organisations will work with a tutor to mentor a student on a real open source project? Also interested to hear if anyone has had experience with the Apache Mentoring programme.&lt;/p&gt;&#xA;" OwnerUserId="6633" LastActivityDate="2021-04-27T14:55:50.100" Title="Open Source Mentoring Programmes for Formal Education" Tags="|mentoring|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6917" PostTypeId="5" CreationDate="2021-04-27T15:04:47.067" Score="0" Body="&lt;p&gt;Many students benefit when somebody takes an interest in them and is willing to share expertise and guide them. A mentor might be a faculty member of an institution who takes a longer than one course interest in a student. But mentors might also come from industry or the community.&lt;/p&gt;&#xA;&lt;p&gt;Mentors might also give general advice beyond the technical, but which can be instrumental in keeping some students on track in their education.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-04-27T15:04:47.067" LastActivityDate="2021-04-27T15:04:47.067" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6918" PostTypeId="4" CreationDate="2021-04-27T15:04:47.067" Score="0" Body="Questions related to mentoring students studying Computer Science. Mentors might be professional educators or not. " OwnerUserId="1293" LastEditorUserId="27" LastEditDate="2021-04-27T15:07:53.040" LastActivityDate="2021-04-27T15:07:53.040" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6919" PostTypeId="2" ParentId="6914" CreationDate="2021-04-27T15:53:25.743" Score="4" Body="&lt;p&gt;Since we're missing a lot of information, this answer will be fairly bare-bones.&lt;/p&gt;&#xA;&lt;p&gt;There are no &amp;quot;right&amp;quot; or &amp;quot;wrong&amp;quot; answers here.  Everything hinges on the goal of the course.  And this is as it should be.  Usually, you choose the learning goals for the course, and then choose a language that helps you to achieve them.&lt;/p&gt;&#xA;&lt;p&gt;If the goal is to understand algorithms and data structures, you would want to work in the language that students would most easily grasp the underlying concepts.  Typically, that would point you towards high-level languages that handle garbage collection for you, but it might be a lower-level language if earlier coursework within the program gives students a lot of fluency in a that language.  (Garbage collection itself could be studied within an algorithms class, as it's essentially a graphs problem.)&lt;/p&gt;&#xA;&lt;p&gt;If the goal is to get a lot of practice with direct memory management, then you would certainly want to move towards a lower-level language such as C++.  This would come at the expense of some algorithms/data-structures study, but the tradeoff could be considered worthwhile.&lt;/p&gt;&#xA;&lt;p&gt;It all depends on the outcome the instructor is going for.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-04-27T15:53:25.743" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6920" PostTypeId="1" CreationDate="2021-04-28T12:11:14.183" Score="2" ViewCount="118" Body="&lt;p&gt;How to teach decorators to Undergrad students? I mean how make the concept crystal clear?&#xA;Sometimes it becomes complex as :&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;functions passing another functions in argument, adding new functionality to existing functions or classes without modifying the existing structure&amp;quot; and using &amp;quot;@&amp;quot; symbol confuses students.&lt;/p&gt;&#xA;&lt;p&gt;I know decorators are very powerful tools. Any suggestions for teaching them effectively?&lt;/p&gt;&#xA;" OwnerUserId="10403" LastEditorUserId="27" LastEditDate="2021-05-03T12:30:11.847" LastActivityDate="2021-05-03T12:30:11.847" Title="Decorators in Python" Tags="|undergraduate|object-oriented-paradigm|python|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6921" PostTypeId="1" CreationDate="2021-04-28T17:53:49.833" Score="4" ViewCount="162" Body="&lt;p&gt;A few years ago I visited a university (very likely an US university) lecture website that teaches perhaps file system or version control system (I'm really unsure here), which gradually lead students to build a simplified git. Can someone who has seen something similar tell me what lecture is it?&lt;/p&gt;&#xA;&lt;p&gt;(I have been searching using varied keywords but got nothing.)&lt;/p&gt;&#xA;" OwnerUserId="10453" LastActivityDate="2021-09-27T15:13:05.047" Title="a lecture that guides students to re-create git" Tags="|git|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6922" PostTypeId="2" ParentId="6920" CreationDate="2021-04-28T18:05:51.560" Score="1" Body="&lt;p&gt;There are two somewhat separate concepts of a decorator. I'm guessing that you mean the one related to using &amp;quot;first class&amp;quot; functions in Python or in a more traditional functional language. The other concept is from OO programming and involves the method structure of an object. They are related, of course, since a function in Python is an object.&lt;/p&gt;&#xA;&lt;p&gt;The first concept is discussed &lt;a href=&quot;https://realpython.com/primer-on-python-decorators&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. The other is in the standard OO design pattern literature in many places. For example, &lt;a href=&quot;https://www.tutorialspoint.com/design_pattern/decorator_pattern.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;But this is an idea for a project that could be implemented in either paradigm.&lt;/p&gt;&#xA;&lt;p&gt;Imagine a robot that has certain &amp;quot;reversible&amp;quot; action, moving, turning, etc. Suppose that you want to send the robot off on some sort of quest. The quest may be modified along the way as the robot encounters various obstacles or such. Suppose further that, at the end of the quest you want to have the robot return to its original position - a partial &amp;quot;undo&amp;quot; of its actions.&lt;/p&gt;&#xA;&lt;p&gt;The idea is to have a Strategy for the robot that it &amp;quot;carries&amp;quot; either as an object or as a function (The Strategy Pattern). For each action that you want to undo, have the robot &amp;quot;decorate&amp;quot; its strategy with an additional action that undoes the current action. For example, to undo a &amp;quot;left turn&amp;quot; you execute a &amp;quot;right turn&amp;quot; assuming that the robot will then be facing the opposite direction.&lt;/p&gt;&#xA;&lt;p&gt;In effect, you build up a stack of decorators that define all of the actions required to return to the base position from wherever it is at the moment.&lt;/p&gt;&#xA;&lt;p&gt;Each decorator will first execute the immediate undo action and then invoke the decorated item, unwinding the stack. But note that to &amp;quot;undo&amp;quot; all that is required is a single message, not a loop. The structure itself implements the repetition.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Implementation notes:&lt;/p&gt;&#xA;&lt;p&gt;If you are doing this with novices I have one bit of advice. The strategy and the decorator need &lt;em&gt;exactly&lt;/em&gt; the same interface. For the functional idea, that means the same parameter structure, and for the OO version the classes should have the same public method interface. If you break this rule (as pros might need to do on occasion) you will likely confuse the students as to what is essential in the idea.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-04-28T20:47:51.817" LastActivityDate="2021-04-28T20:47:51.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6923" PostTypeId="1" CreationDate="2021-04-29T21:58:09.393" Score="5" ViewCount="271" Body="&lt;p&gt;It is a well-known fact that we have a shortage of COBOL programmers. Why we do not re-introduce COBOL in our curriculum for the Undergraduate and Graduate Students?&lt;/p&gt;&#xA;&lt;p&gt;I know some schools are teaching mainframes but, they are very limited.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cacm.acm.org/news/244370-cobol-programmers-are-back-in-demand-seriously/fulltext#:%7E:text=Experienced%20Programmer%20Shortage&amp;amp;text=Although%20a%20few%20universities%20still,it%20today%20is%20extremely%20small.&amp;amp;text=In%20the%20age%20of%20apps,at%20retiring%20their%20mainframe%20systems&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cacm.acm.org/news/244370-cobol-programmers-are-back-in-demand-seriously/fulltext#:~:text=Experienced%20Programmer%20Shortage&amp;amp;text=Although%20a%20few%20universities%20still,it%20today%20is%20extremely%20small.&amp;amp;text=In%20the%20age%20of%20apps,at%20retiring%20their%20mainframe%20systems&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Since all the workforce for the COBOL is aging and getting retired. Banks, insurance, retail, airline, etc. are still using COBOL.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.howtogeek.com/667596/what-is-cobol-and-why-do-so-many-institutions-rely-on-it/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.howtogeek.com/667596/what-is-cobol-and-why-do-so-many-institutions-rely-on-it/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;IBM reported, &amp;quot;As late as 2017, 92 of the top 100 banks still used mainframes for their core businesses.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.tpr.org/technology-entrepreneurship/2019-05-23/how-cobol-still-powers-the-global-economy-at-60-years-old&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.tpr.org/technology-entrepreneurship/2019-05-23/how-cobol-still-powers-the-global-economy-at-60-years-old&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also, fresh graduates are getting a salary of $75K or above for COBOL. All this being said, is there a way to revive this beautiful language through our students?&lt;/p&gt;&#xA;" OwnerUserId="10403" LastEditorUserId="9154" LastEditDate="2021-05-24T13:04:11.827" LastActivityDate="2021-05-24T13:04:11.827" Title="COBOL programmers" Tags="|programming|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6924" PostTypeId="2" ParentId="6923" CreationDate="2021-04-29T23:10:14.373" Score="1" Body="&lt;p&gt;There is more to a CS education than programming. And the goal of a CS program isn't to create programmers for industry. People with a CS undergraduate degree can, on their own, learn enough COBOL to get a job.&lt;/p&gt;&#xA;&lt;p&gt;But some places will have a course or two. And an Information Systems curriculum is a more hospitable place for it, though the education there isn't focused on programming either.&lt;/p&gt;&#xA;&lt;p&gt;Note, however, that the language is quite a bit different from what it was in 1970.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-04-29T23:10:14.373" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="6925" PostTypeId="2" ParentId="6923" CreationDate="2021-04-30T12:59:56.077" Score="4" Body="&lt;p&gt;Programmers are free to pick up the language, and there are plenty of resources out there to help anyone who wishes to learn COBOL to do so.&lt;/p&gt;&#xA;&lt;p&gt;I could imagine a programmer boot camp that focused on COBOL, and it might be in the interest of the Big Banks to create just such an institution.  However, the mission of a &lt;em&gt;computer science&lt;/em&gt; program is quite different from the mission of a coding boot-camp.  Computer Science programs teach the core concepts of the field of computer science.  There are no important, underlying CS concepts that are best taught in COBOL, and this makes it a poor choice for most of what we do. While nods can be made to industry in language choice, computer science is what we are here to teach.&lt;/p&gt;&#xA;&lt;p&gt;The reason that there are so many institutions that still rely on COBOL is because they have a tremendous amount invested in that architecture from decades ago when the language really was still in use.&lt;/p&gt;&#xA;&lt;p&gt;However, there are also important reasons that the language is dying.  For instance take a look at &lt;a href=&quot;https://www.quora.com/What-are-the-reasons-for-the-death-of-COBOL-as-a-programming-language&quot; rel=&quot;nofollow noreferrer&quot;&gt;this quora post by the user &amp;quot;Jack Menendez&amp;quot;&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The assumption Dead is a matter of definition. However, the reasons why new applications are never written in COBOL is:&lt;/p&gt;&#xA;&lt;p&gt;COBOL has a special type called a Packed Decimal that is a fundamental type for a mainframe. COBOL code and databases used by COBOL are full of Packed Decimals. To a mainframe Packed Decimal works kind of like an integer on intel but it is a kind of decimal. So there are machine level instructions on the mainframe that can deal with the Packed Decimal add/subtract/Div etc. The intel architecture does not have any idea what Packed Decimals are so COBOL compilers that target Intel must create code that simulates them. COBOL runs much slower on the Intel architecture for this reason and can create binaries that are relatively large.&lt;/p&gt;&#xA;&lt;p&gt;COBOL programs are non-reentrant by their nature. In fact the code and internal data fields on the mainframe normally occupy the same contiguous piece of storage. This makes it hard to use COBOL in environments such as application servers that expect reentrant code. Application servers ported to the mainframe typically cannot use COBOL.&lt;/p&gt;&#xA;&lt;p&gt;COBOL code has a syntax that is not like other languages, writing &amp;quot;Hello World&amp;quot; in COBOL is kind of an ordeal for a beginner.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The increased salary for COBOL programmers is reasonable since there needs to be a way to reward programmers who take the time to learn languages that have little applicability elsewhere.  It is also part of the expense for maintaining dated software on decaying architectures.&lt;/p&gt;&#xA;&lt;p&gt;Every year, more and more of this COBOL code is being replaced as the maintenance costs go up and the ability to expand its functionality decreases.  And this is for the good!  While there will always be room for people who truly love the language to keep the flame alive, the large base of industry should be where people can be efficient, and that is no longer in COBOL.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-04-30T12:59:56.077" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6926" PostTypeId="2" ParentId="6920" CreationDate="2021-05-01T18:37:31.633" Score="3" Body="&lt;p&gt;Although it should probably be only one strategy among many, you might teach it through practical examples.  In this short program that uses flask_user (and&#xA;which students can install in just a few minutes) the decorator ensures that only authenticated users can use the route:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://flask-user.readthedocs.io/en/latest/quickstart_app.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://flask-user.readthedocs.io/en/latest/quickstart_app.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10353" LastActivityDate="2021-05-01T18:37:31.633" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6927" PostTypeId="1" CreationDate="2021-05-01T18:52:39.927" Score="1" ViewCount="232" Body="&lt;p&gt;If you have taught a course on MongoDB, Express, React and Node, what textbook would you recommend?  I'm particularly interested in open source textbooks authored on Github.  But I'm open to anything.&lt;/p&gt;&#xA;" OwnerUserId="10353" LastEditorUserId="27" LastEditDate="2021-08-07T12:09:37.260" LastActivityDate="2021-12-28T07:45:33.710" Title="MERN - Which textbook to use?" Tags="|textbook|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6928" PostTypeId="2" ParentId="6910" CreationDate="2021-05-01T20:54:11.527" Score="2" Body="&lt;p&gt;I can not answer directly because I know nothing about Python, but I first started to use C nearly 4 decades ago, and have used it for some really complex stuff. I love C# (I use it in the context of ASP.Net) and think it is very well designed and implemented. So, I would be biased no matter what, as you know, because you never forget your first language, which in my case was somewhere in the murky past of Basic, PDP-11 shell scripting, APL and Fortran, with punched cards and without...&lt;/p&gt;&#xA;&lt;p&gt;Anyway: I would suggest that the concept of &lt;strong&gt;Notional Machine&lt;/strong&gt; should be the absolutely most important consideration when first teaching anything about programming. Without a notional machine informing their understanding, students will know basically nothing about computing, and with a good foundation in one, they will know everything they need to know to learn new languages, systems, frameworks, etc, forever.&lt;/p&gt;&#xA;&lt;p&gt;So, choose a language that actually teaches computing in a way that is &lt;em&gt;generative&lt;/em&gt;, &lt;em&gt;extensible&lt;/em&gt;, with &lt;em&gt;sound metaphors&lt;/em&gt; and which has a &lt;em&gt;small grammar&lt;/em&gt; that is not too powerful. In other words, something like C without too much preprocessor tricks or frameworks thrown in. Frameworks are the sauce, teach then how to cook first (colorful metaphor).&lt;/p&gt;&#xA;&lt;p&gt;The problem is that there is such a forest of layers and tools now that actually seeing the machine in a way that contributes to notion-formation is very hard now. I would rather that students learn how to write simple command-line programs than know how to make a web site, because a lot of web site work is not really programming in any sense, it is just setting a lot of switches. And sadly, that misses the whole point of why we invented computers in the first place.&lt;/p&gt;&#xA;&lt;p&gt;Without the idea of program, they are technicians, not creators. So choose wisely.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2021-05-01T20:54:11.527" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6929" PostTypeId="2" ParentId="6923" CreationDate="2021-05-02T02:11:29.753" Score="-1" Body="&lt;p&gt;I keep returning to the idea that code should be simple and made to be thrown away. Build once, use a while, then let someone else be useful, creative, necessary, helpful... Let people build back better with something that didn't exist the first time around.&lt;/p&gt;&#xA;&lt;p&gt;So to me, this clinging to ancient code is a mentality of fear and scarcity, which we would be better off without. If it is too complex, simplify it and live with a simpler solution. This seems really &amp;quot;First World Problem&amp;quot; to me. There are a lot of programmers in other parts of the world, who need work.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2021-05-02T02:11:29.753" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6930" PostTypeId="1" CreationDate="2021-05-02T21:30:33.523" Score="4" ViewCount="93" Body="&lt;p&gt;At SigCSE this year a session participant said, roughly, &amp;quot;research shows that there is no correlation between 'early skill' is CS and a student's ultimate success in the field.&amp;quot; Unfortunately, I wasn't able to get a citation of the study or studies that came to this conclusion.&lt;/p&gt;&#xA;&lt;p&gt;I teach high school CS and have a significant number of students for whom my class is their first significant exposure to &amp;quot;rigorous&amp;quot; CS (where &amp;quot;rigor&amp;quot; means, more or less, attempting to develop the foundational skills and confidence to go on in CS, rather than &amp;quot;just playing&amp;quot;). I also have some students in every class who are real &amp;quot;rock stars.&amp;quot; I've been telling my students that they start where they start and their curiosity and persistence have a greater bearing on their success than their initial &amp;quot;acceleration&amp;quot; so I was thrilled to hear that there might be actual research that backs this up – especially if there is insight into how best to support the students who need time to build confidence and a foundation.&lt;/p&gt;&#xA;&lt;p&gt;Have you heard of research along these lines? Any pointers on finding it?&lt;/p&gt;&#xA;" OwnerUserId="134" LastActivityDate="2021-05-02T21:30:33.523" Title="Growth of Early CS Students" Tags="|scientific-papers|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6931" PostTypeId="2" ParentId="6910" CreationDate="2021-05-02T22:37:19.067" Score="5" Body="&lt;p&gt;Python is a fine language for learning algorithmic thinking and problem solving (see e.g. Downey's &lt;a href=&quot;https://greenteapress.com/wp/think-python-2e&quot; rel=&quot;noreferrer&quot;&gt;&amp;quot;Think Python&amp;quot;&lt;/a&gt; (Green Tea Press, 2nd edition 2016)). Python has an &lt;em&gt;enormous&lt;/em&gt; ecosystem, including all the range of packages for simple tasks up to heavyweight systems like &lt;a href=&quot;https://scipy.org&quot; rel=&quot;noreferrer&quot;&gt;SciPy&lt;/a&gt; for all sorts of scientific computing, &lt;a href=&quot;https://numpy.org&quot; rel=&quot;noreferrer&quot;&gt;NumPy&lt;/a&gt; for numerical computation (included in the previous one) and &lt;a href=&quot;https://www.sagemath.org&quot; rel=&quot;noreferrer&quot;&gt;SageMath&lt;/a&gt; for  wide range of mathematical tools. It is also extensively used to program front-ends for administrative tools on many Linux distributions. Very far from a toy language, it usually ranks in the first places of language popularity.&lt;/p&gt;&#xA;&lt;p&gt;C is a simple, low(ish) level language, very useful for tasks that require intimate access to the machine, like operating systems and all sort of system programs. There are good compilers available, that generate very efficient code. It's low-level nature with loopholes to allow fondling hardware at your heart's content, (somewhat) strict type system and lack of amenities like automatic garbage collection makes it harder to use (and a nightmare for newbies). Almost all software that you use daily is written in C.&lt;/p&gt;&#xA;&lt;p&gt;Both have their place, which one to select depends on the time available (pick Python if there is time for learning other languages later on as needed; pick C if time is at a premium and that will be the later language of choice, but be prepared to spend a lot of time getting e.g. pointers and arrays across).&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-05-02T22:37:19.067" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6932" PostTypeId="2" ParentId="6183" CreationDate="2021-05-03T14:57:58.740" Score="3" Body="&lt;p&gt;I'm a big fan of micro:bit and kits that companies build for them. For example, &lt;a href=&quot;https://category.yahboom.net/products/tinybit&quot; rel=&quot;nofollow noreferrer&quot;&gt;the Tinybit robot from Yahboom&lt;/a&gt;. It includes &lt;a href=&quot;http://www.yahboom.net/study/Tiny:bit&quot; rel=&quot;nofollow noreferrer&quot;&gt;programming activities&lt;/a&gt;. I've bought hundreds of these and had good experiences with 12 - 16 year olds who are new to programming.&lt;/p&gt;&#xA;" OwnerUserId="10464" LastActivityDate="2021-05-03T14:57:58.740" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6933" PostTypeId="2" ParentId="6847" CreationDate="2021-05-03T20:53:13.890" Score="0" Body="&lt;p&gt;On today's computers, in today's environment, it won't work. Program memory is out of bounds for writing, data memory is out of bounds for execution, both for very good reasons: They have been vehicles for grievous security failures.&lt;/p&gt;&#xA;&lt;p&gt;It is hard enough to write a program, harder still to write a program that in turn writes a program. Getting it to reliably change itself is insane.&lt;/p&gt;&#xA;&lt;p&gt;Teaching people to do this serves no purpose I can see.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-05-03T20:53:13.890" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6934" PostTypeId="2" ParentId="6674" CreationDate="2021-05-04T02:14:31.377" Score="1" Body="&lt;p&gt;If you want to hone your broader skills, better look around for a open source project that you personally use and that interests you, and dig in. You'll learn how to program, how to test and debug, how to triage bug reports, how to work together with a motley crew of people from all over the world. You'll be able to show your work to potential employers (open source means nobody can forbid you showing the &amp;quot;secret sauce&amp;quot;) later on.&lt;/p&gt;&#xA;&lt;p&gt;Programming competitions, or solving problems to be checked by some online judge, trains you in how to come up with a smart algorithm and write it in your favorite language. Programming &amp;quot;in the large&amp;quot; is much, much more than this.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-05-04T02:14:31.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6935" PostTypeId="2" ParentId="6633" CreationDate="2021-05-04T02:21:32.063" Score="1" Body="&lt;p&gt;I'd start looking at the &lt;a href=&quot;https://www.acm.org/education/curricula-recommendations&quot; rel=&quot;nofollow noreferrer&quot;&gt;ACM curriculum recomendations&lt;/a&gt;. They break down what a bachelor's degree should cover, in gread detail.&lt;/p&gt;&#xA;&lt;p&gt;Yes, it covers some four years of coursework, full time. No, as Euclid is reported to say, there is no royal road.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-05-04T02:21:32.063" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6936" PostTypeId="2" ParentId="6804" CreationDate="2021-05-06T02:49:34.417" Score="1" Body="&lt;p&gt;I'm surprised that no one has mentioned &lt;a href=&quot;https://code.org/student/middle-high&quot; rel=&quot;nofollow noreferrer&quot;&gt;Code.org (computer science curricula for middle-high school students page)&lt;/a&gt; so I will! They have a plethora of courses and short activities that allow students to develop games, apps, and websites in block-based languages and Javascript for free. They walk through the concepts very slowly and have videos and tutorials for everything.&lt;/p&gt;&#xA;" OwnerUserId="10464" LastEditorUserId="10464" LastEditDate="2021-05-09T02:28:58.967" LastActivityDate="2021-05-09T02:28:58.967" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6937" PostTypeId="2" ParentId="6449" CreationDate="2021-05-07T19:31:09.713" Score="3" Body="&lt;p&gt;I think I've recommended code.org before, but here I am recommending it again! I particularly like tools like AppLab (&lt;a href=&quot;https://code.org/educate/applab&quot; rel=&quot;nofollow noreferrer&quot;&gt;Link to the homepage of Code.org's AppLab&lt;/a&gt;) that allows students to flip between block-based and text-based (JavaScript) programming.&lt;/p&gt;&#xA;&lt;p&gt;If you're interested in diving into hardware with them (which I would recommend because kids love to make stuff they can play with) Makecode (&lt;a href=&quot;https://makecode.microbit.org/projects/turtle&quot; rel=&quot;nofollow noreferrer&quot;&gt;Link to MakeCode turtle projects page&lt;/a&gt;) allows you to flip between blocks and Javascript or Python. You don't have to buy the hardware to get started because there's a simulator. Makecode Arcade (&lt;a href=&quot;https://arcade.makecode.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Link to homepage of MakeCode Arcade&lt;/a&gt;) also let's you flip languages to build games.&lt;/p&gt;&#xA;" OwnerUserId="10464" LastActivityDate="2021-05-07T19:31:09.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6938" PostTypeId="1" CreationDate="2021-05-07T19:37:45.657" Score="4" ViewCount="131" Body="&lt;p&gt;I'm working with middle school teachers who are teaching a CS class with middle schoolers. The students have a &lt;em&gt;wide&lt;/em&gt; range of programming skills, and for some it would be beneficial to offer them an opportunity to plan out their programming work in flowcharts before they step up to implementing them in a language (we're using Scratch btw). &lt;br/&gt;&#xA;We used &lt;a href=&quot;https://www.canva.com/graphs/flowcharts/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Canva's flowchart maker&lt;/a&gt; and I think that worked decently well, but I'm curious if others have tried and had success with other tools.&lt;/p&gt;&#xA;" OwnerUserId="10464" LastActivityDate="2021-06-25T14:27:44.877" Title="Resources for flowchart programming for young, new programmers?" Tags="|programming|primary-school|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6939" PostTypeId="2" ParentId="6938" CreationDate="2021-05-07T20:49:41.777" Score="7" Body="&lt;p&gt;Honestly, I would be surprised if this method bore the kind of fruit that you hope for.  While flowcharts seem like a nice way to make ideas more concrete, I contend that they will actually become another level of abstraction that makes the task &lt;em&gt;harder&lt;/em&gt; for middle-school students, who are only now making the transition from concrete to abstract thinking.&lt;/p&gt;&#xA;&lt;p&gt;You're moving from boxes that represent ideas (Scratch, already one layer of abstraction) to boxes that represent arbitrary &lt;em&gt;groups&lt;/em&gt; of boxes (now two layers, with fuzzy bottom-layer boundaries designated in the bottom later), and then making macro-decisions using those larger boxes (two layers plus fuzzy boundaries plus a lot of flexible thinking).&lt;/p&gt;&#xA;&lt;p&gt;In short, I don't think you're going to find a big coding speed-up, or even higher quality output, from the students.  In this regard, it's a trap.&lt;/p&gt;&#xA;&lt;p&gt;However!  I'm not going to suggest that kids &lt;em&gt;can't&lt;/em&gt; use flowcharts.  In fact, I'm not even going to suggest that it's not valuable.  Kids who are beginning to develop abstract thought need to practice that skill-set in order to develop a richer ability to grasp abstractions as an adult.  However, I think that to do it well, you would have to be okay with the idea that it probably won't particularly help the kids with the actual coding tasks themselves, and furthermore decide that it is still worthwhile for other reasons.&lt;/p&gt;&#xA;&lt;p&gt;If you still wanted to proceed, I would take this backwards approach:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Have the kids code in Scratch first, which gets them started with as little abstraction as possible.&lt;/li&gt;&#xA;&lt;li&gt;Next have them construct flowcharts of what they have done, including a one-sentence description, and a NAME in the box (getting a good NAME can be quite hard)&lt;/li&gt;&#xA;&lt;li&gt;At this point, they would be better able to manipulate those boxes.  You can ask them to present their flowchart structures (and the accompanying programs, of course!) to the rest of the class.  You can also use the diagrams that they have created to help them if they get stuck (though they may have trouble applying the solutions for all of the reasons listed above).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you want to help them work in the other direction, you can provide a flowchart that works well, and then have them implement it in Scratch.  That can provide support for the concrete -&amp;gt; abstract transition they're undergoing, and also help them learn to move in both directions (Scratch-&amp;gt;flowchart, flowchart-&amp;gt;Scratch).&lt;/p&gt;&#xA;&lt;p&gt;I wouldn't ask them to work with poorly designed flowcharts (such as the ones that they themselves would make) from the start -- it's not clear to me that you'll get any sort of good result from an unsupported approach like this in a classroom setting.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-05-07T20:49:41.777" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6940" PostTypeId="2" ParentId="6449" CreationDate="2021-05-08T20:42:19.777" Score="3" Body="&lt;p&gt;LibreLogo, available as default plugin of Writer LibreOffice is a good choice. I teach it to primary teacher students but I also made labs with 7-10 years old kids. Unfortunately, the manual I wrote is in Italian (&lt;a href=&quot;http://iamarf.ch/unifi/Piccolo-manuale-LibreLogo.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Piccolo manuale di LibreLogo&lt;/a&gt; - Creative Commons License 2.5) but the coding examples are in English Logo. This text was written with the Bruner spiral curriculum in mind, i.e. you can find examples suited for primary school as well as secondary school students. I'm writing an English version (Building knowledge with turtle geometry) where I'm using both LibreLogo and Python. Will distribute it in the same way as soon as ready.&lt;/p&gt;&#xA;" OwnerUserId="10477" LastActivityDate="2021-05-08T20:42:19.777" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6941" PostTypeId="2" ParentId="6938" CreationDate="2021-05-09T22:13:59.687" Score="2" Body="&lt;p&gt;This is a very good and important question. People have doubted the usefulness of flowcharts for a long time, and derided them. But I have two things to say in their defense.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;It is vital to demonstrate that a correctly structured flowchart and basic pseudocode are one-to-one interchangeable, line by line. Each statement and line in the chart exactly matches one single line of text in the code, with no interpretation or errors possible. If you can write one correctly, you can write the other, and if your flowchart is not structured properly, you will not be able to write the code, at all. This is not magic. It simply means that the properly structured program is neither textual nor visual, and they are both simply &amp;quot;views&amp;quot; of the same underlying structure, which is not composed of either.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The underlying structure is what is important, and it is wordless, imageless, and impossible to describe. Fortunately, we have words and diagrams (these days).&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Every field of human endeavor that I can think of has both textual and visual representations. These are two equally good ways to convey the message. A field without one or the other would have to develop both, or it would not be learnable, teachable, usable. Denying that flowcharts are useful is like saying one of your hands or eyes is not.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The message, is not the code. It is not the picture. But, they are interconvertible, at the rate of 8k bytes per image (or more). Use both. Once you show how every line of code matches with a symbol or line on the flowchart, and especially, that the only difference between a While Loop and an If-Then is which end of the line has the arrowhead, you will have shown something that must be learned, but cannot be carried by words alone.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2021-05-09T22:13:59.687" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6942" PostTypeId="2" ParentId="6862" CreationDate="2021-05-10T06:17:57.360" Score="2" Body="&lt;p&gt;As I commented to the question I absolutely hated all Rational tools and since Rational was the driving force behind UML, so I was never a fan of UML. But I want to emphasized that I had quite some hand-on experience to make this point.&lt;/p&gt;&#xA;&lt;p&gt;Then I came across these 2 interesting articles I would like to share,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://buttondown.email/hillelwayne/archive/why-uml-really-died/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Why UML &amp;quot;Really&amp;quot; Died&lt;/a&gt; I agree most parts of this article, expect for this point &amp;quot;textual formats are terrible at representing visual layout.&amp;quot;, then why complained &amp;quot;No Text Format&amp;quot;. As a matter of fact, I like to use &lt;a href=&quot;https://mermaid-js.github.io/mermaid/#/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mermaid&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://garba.org/posts/2021/uml/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Has UML died without anyone noticing?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-05-10T06:31:23.100" LastActivityDate="2021-05-10T06:31:23.100" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6943" PostTypeId="2" ParentId="6759" CreationDate="2021-05-10T12:46:33.017" Score="1" Body="&lt;p&gt;I have a partial answer for you, about why BASIC and home computers in the early 1980's were so helpful to learning: it is how &lt;strong&gt;accessible&lt;/strong&gt; everything was. A kid could look inside the case and see what the parts were, and even do things like plug in a new disk drive or something else hardware related. This is difficult to do now with a phone, tablet or laptop.&lt;/p&gt;&#xA;&lt;p&gt;The BASIC interpreter was straightforward: it checked lines as you entered them and it ran the program. The realization that the interpreter was &lt;em&gt;a program&lt;/em&gt; was startling and fascinating. A program is reading my keystrokes, and running my program!&lt;/p&gt;&#xA;&lt;p&gt;The layer between what you could write in BASIC and how the hardware could be afffected was thin. It didn't take long to find out how much amusement a few POKE statements could generate. What was happening there?&lt;/p&gt;&#xA;&lt;p&gt;The interpreter ran on top of another program: the operating system. At this point, the mystery was sufficiently weird and in your face that you either wanted to learn more, or veer off into something less arcane. It was a fast trip to the edge of the rabbit hole, and you could learn more or get off any place along the way.&lt;/p&gt;&#xA;&lt;p&gt;I wrote programs on a DEC-10, Cyber 750, PDP-11s and other things, but these were not open-face like an Apple ][ or Atari 800 (it has 3 CPUs that all cooperate, somehow) or even a TRS-80 or PET. Without such accessibility early on in my learning environment, I might not have learned as much, as fast, as deeply, and so college and career would have started differently - probably less well. When we got back around to C with 68020 assembler to write parts of a compiler during my last year of college, it was home ground for me, but not so much many other students.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps new devices like the Raspberry PI are similar to 80's home PCs in some ways, but I haven't gotten my hands on one to know. If not, I think that the prospects for &amp;quot;learnable computing&amp;quot; are rather dimmer than they were in the bad old days. The important thing is the mystery behind the question: &amp;quot;&lt;em&gt;How could a computer possibly work?&lt;/em&gt;&amp;quot; and how BASIC, the simple OS and hardware were low barriers to entry to that story.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2021-05-10T12:46:33.017" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6950" PostTypeId="1" CreationDate="2021-05-17T13:39:19.017" Score="2" ViewCount="58" Body="&lt;p&gt;I am a Ph.D. student in Theoretical Computer Science (TCS). If I want to publish a survey paper, can I send that to a conference instead of a journal? Is that allowed?&lt;/p&gt;&#xA;&lt;p&gt;I am asking this because the quality of research in TCS is judged mostly by the top conferences (like SODA, STOC, and FOCS).&lt;/p&gt;&#xA;" OwnerUserId="9996" LastActivityDate="2021-05-17T14:27:42.377" Title="Do Theoretical Computer Science Conferences Accepts Survey Papers?" Tags="|cs-theory|" AnswerCount="1" CommentCount="2" ClosedDate="2021-05-19T01:07:25.640" ContentLicense="CC BY-SA 4.0" />
  <row Id="6951" PostTypeId="2" ParentId="6950" CreationDate="2021-05-17T14:27:42.377" Score="2" Body="&lt;p&gt;That is up to the individual conference. All of them have web sites that will explain what they prefer. I'm skeptical a bit, however.&lt;/p&gt;&#xA;&lt;p&gt;But, many such CS conferences have different &amp;quot;tracks&amp;quot; and different associated activities. You might find a better welcome at one of these. For example, some have an associated &amp;quot;educator's track&amp;quot; that might welcome something like this. But you need to check individually. The program chair (or conference chair) will probably respond to an email if you don't find what you are looking for online. Most such people have email addresses that are easy to discover even when not listed on the conference site.&lt;/p&gt;&#xA;&lt;p&gt;Theoretical conferences will, of course, prefer papers that extend the theory.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-05-17T14:27:42.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6953" PostTypeId="2" ParentId="6910" CreationDate="2021-05-18T12:48:48.777" Score="6" Body="&lt;p&gt;I started teaching Python at NCSSM in  2004.  Here are some reasons I chose it.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It is direct and simple, and there is not a whole ton of boilerplate to deal with at the beginning.  Hello, World looks like this&lt;/p&gt;&#xA;&lt;p&gt;print(&amp;quot;Hello, World&amp;quot;)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We all know what it looks like in Java (enclosing class needed) and C.&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;Delimitation occurs via whitespace.  Students who begin with Python tend to have excellent formatting habits when they learn other languages, because Python requires them.  There is a direct visual connection between the flow of a program and its appearance.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's a professional tool.  Students don't &amp;quot;outgrow&amp;quot; Python.  It has a rich standard library and numerous third-party libraries that make it an awesome tool.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It supports OO, functional, and imperative programming paradigms&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Memory management on the heap is largely abstracted away.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The built-in types provide a significant creative palette.   We teach our students to &amp;quot;use wheels, not re-invent them.&amp;quot;   An exception to this is when we are &amp;quot;dissecting&amp;quot; something to gain an understanding of how it works.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It runs on everything and web interfaces for it are freely available.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Long experience shows that Python is an excellent language for beginners.&lt;/p&gt;&#xA;&lt;p&gt;C is not great for beginners. However, it is very important.  In many ways it is the &amp;quot;Latin&amp;quot; of computer languages.  Every programmer should know it, because it lurks beneath the surface in so many places.  We teach it to students who are already proficient programmers.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-05-18T12:48:48.777" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6954" PostTypeId="2" ParentId="6910" CreationDate="2021-05-20T05:59:46.063" Score="1" Body="&lt;p&gt;At this moment, definitely &lt;strong&gt;Python&lt;/strong&gt;. Because it's very easy to learn, understand and implement. Also very big and huge community around the world in terms of any help and support needed at any point of time, Large number of packages available based on the need, which simplifies and make programmers life easy, specially beginners. Also there is no need of programming concepts to be known/aware, while start learning &lt;strong&gt;Python&lt;/strong&gt;.&lt;/p&gt;&#xA;" OwnerUserId="10550" LastActivityDate="2021-05-20T05:59:46.063" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6955" PostTypeId="1" CreationDate="2021-05-20T18:37:41.590" Score="3" ViewCount="702" Body="&lt;p&gt;I want my students (equivalent first-year college students) to work on &lt;a href=&quot;https://en.wikipedia.org/wiki/Algorithmic_paradigm&quot; rel=&quot;nofollow noreferrer&quot;&gt;algorithmic paradigms&lt;/a&gt; during a 2 hours practical programming session in OCaml.&lt;/p&gt;&#xA;&lt;p&gt;I chose the &lt;a href=&quot;https://en.wikipedia.org/wiki/Subset_sum_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;subset sum problem&lt;/a&gt; since it can illustrate different paradigms:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Given an array &lt;span class=&quot;math-container&quot;&gt;$A = [a_1, …, a_n]$&lt;/span&gt; of positive integer values, and a target &lt;span class=&quot;math-container&quot;&gt;$T$&lt;/span&gt;, is there a subset &lt;span class=&quot;math-container&quot;&gt;$I \subset \{1, …, n\}$&lt;/span&gt; such that &lt;span class=&quot;math-container&quot;&gt;$\sum\limits_{i\in I}a_i = T$&lt;/span&gt;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The algorithms I chose are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;brute force testing is interesting because students must iterate through all subsets;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Subset_sum_problem#Pseudo-polynomial_time_dynamic_programming_solution&quot; rel=&quot;nofollow noreferrer&quot;&gt;dynamic programming algorithm&lt;/a&gt; is a classical pseudo-polynomial time algorithm;&lt;/li&gt;&#xA;&lt;li&gt;even a (non-optimal) greedy algorithm can be worked on if we consider the optimization version of the problem.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;My question is about a divide-and-conquer algorithm. I couldn't find anything about it, so I thought about a way to do it:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If &lt;span class=&quot;math-container&quot;&gt;$n = 1$&lt;/span&gt;, answer &lt;span class=&quot;math-container&quot;&gt;$a_1 = T \vee 0 = T$&lt;/span&gt;, if &lt;span class=&quot;math-container&quot;&gt;$n = 0$&lt;/span&gt;, answer &lt;span class=&quot;math-container&quot;&gt;$0 = T$&lt;/span&gt;;&lt;/li&gt;&#xA;&lt;li&gt;Otherwise, if for any &lt;span class=&quot;math-container&quot;&gt;$t\in \{0, …, T\}$&lt;/span&gt;, SSE has a solution for &lt;span class=&quot;math-container&quot;&gt;$[a_1, …, a_{n/2}]$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$t$&lt;/span&gt;, and a solution for &lt;span class=&quot;math-container&quot;&gt;$[a_{n/2+1}, …, a_n]$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$T-t$&lt;/span&gt;, answer True;&lt;/li&gt;&#xA;&lt;li&gt;Otherwise answer False.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;One of the problem is that the time complexity is quite ugly to compute. I found the relation:&#xA;&lt;span class=&quot;math-container&quot;&gt;$$C(n, T) = \sum\limits_{t=0}^T\left(C\left(\frac{n}{2}, t\right) + C\left(\frac{n}{2}, T-t\right)\right) + \Theta(1)$$&lt;/span&gt;&#xA;I am not sure about the solution, but I found &lt;span class=&quot;math-container&quot;&gt;$\Theta(n^{1+\log_2 T})$&lt;/span&gt; but it might be too difficult to compute (however, this is a practial session, so computing time complexity formulas is not the main objective). I finally found out that by memoizing, the algorithm can reach a time complexity of &lt;span class=&quot;math-container&quot;&gt;$O(nT)$&lt;/span&gt;, which is the same as the DP algorithm.&lt;/p&gt;&#xA;&lt;p&gt;Currently, I have worked with students on the binary search and square-and-multiply algorithms. A future class session on mergesort and quicksort is already planned (as well as different classical examples for dynamic programming).&lt;/p&gt;&#xA;&lt;p&gt;Have you seen the previous algorithm (or something similar) anywhere? Do you think this algorithm (and the session overall) is relevant? If not, do you have any suggestion about another interesting problem for a 2h practical programming session?&lt;/p&gt;&#xA;" OwnerUserId="10555" LastEditorUserId="9154" LastEditDate="2021-05-24T09:59:15.170" LastActivityDate="2021-05-24T09:59:15.170" Title="Divide and conquer for subset sum problem" Tags="|lesson-ideas|programming|algorithms|lesson-review|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6957" PostTypeId="1" CreationDate="2021-05-21T05:42:36.993" Score="3" ViewCount="175" Body="&lt;p&gt;One of the popular algorithm design techniques is the Greedy Algorithm.&lt;/p&gt;&#xA;&lt;p&gt;Do we have real-world examples of Greedy Algorithm which we can teach Undergraduate students?&lt;/p&gt;&#xA;&lt;p&gt;I know the famous Djikstra's algorithm, Prim &amp;amp; Kruskal, Minimum spanning trees, etc.&lt;/p&gt;&#xA;&lt;p&gt;I want some examples which are very common in our day-to-day life.&lt;/p&gt;&#xA;" OwnerUserId="10403" LastEditorUserId="9154" LastEditDate="2021-05-24T13:03:07.437" LastActivityDate="2021-06-15T18:31:03.627" Title="Greedy Algorithm Approach" Tags="|undergraduate|algorithms|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6958" PostTypeId="2" ParentId="6957" CreationDate="2021-05-21T06:01:48.603" Score="2" Body="&lt;p&gt;Computing a maximum-weight basis in a matroid, which is a straight-forward generalization of Kruskal's algorithm. You may object that this is not &amp;quot;every day life&amp;quot;.  But well, that's pretty much the exhaustive answer to the question which problems can be solved using a greedy algorithm. :-) You can show them the proof that whenever the greedy algorithm is able to pick a set of maximum total element weight in a set system, then this set system is actually a matroid.&lt;/p&gt;&#xA;&lt;p&gt;So that's as &amp;quot;every day life&amp;quot; as it gets...&lt;/p&gt;&#xA;" OwnerUserId="10450" LastActivityDate="2021-05-21T06:01:48.603" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6959" PostTypeId="2" ParentId="6957" CreationDate="2021-05-21T13:11:15.663" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Interval_scheduling&quot; rel=&quot;nofollow noreferrer&quot;&gt;Interval scheduling&lt;/a&gt; is a quite common example, with real world applications.&lt;/p&gt;&#xA;&lt;p&gt;You could also consider &lt;a href=&quot;https://en.wikipedia.org/wiki/Graph_coloring#Greedy_coloring&quot; rel=&quot;nofollow noreferrer&quot;&gt;graph coloring algorithms&lt;/a&gt;, like Welsh-Powell's or &lt;a href=&quot;https://en.wikipedia.org/wiki/DSatur&quot; rel=&quot;nofollow noreferrer&quot;&gt;DSATUR&lt;/a&gt;, since it can also illustrate that greedy algorithms are not always optimal. This example is a bit less &amp;quot;real world-y&amp;quot;, but it has also applications in scheduling.&lt;/p&gt;&#xA;" OwnerUserId="10555" LastActivityDate="2021-05-21T13:11:15.663" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6960" PostTypeId="2" ParentId="6957" CreationDate="2021-05-22T00:54:54.570" Score="4" Body="&lt;p&gt;One example which is actually relatively common in everyday life, especially for people who do a lot of traveling (e.g., backpackers and some business people), is the &lt;a href=&quot;https://en.wikipedia.org/wiki/Knapsack_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;knapsack problem&lt;/a&gt;. The &lt;a href=&quot;https://en.wikipedia.org/wiki/Knapsack_problem#Applications&quot; rel=&quot;nofollow noreferrer&quot;&gt;applications&lt;/a&gt; section gives several other fairly common situations where this problem is encountered. The Wikipedia article also lists a few methods that can be used to determine a solution, but especially for relatively simple cases, something like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Knapsack_problem#Greedy_approximation_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;greedy approximation algorithm&lt;/a&gt; can be implemented fairly easily, and often works relatively well.&lt;/p&gt;&#xA;&lt;p&gt;Nonetheless, as that algorithm section states, a basic greedy algorithm may sometimes be far from optimal. I don't know of any examples offhand, but I suspect it should not be overly difficult to construct (or perhaps find online) a relatively simple one that would help to illustrate this point to your students.&lt;/p&gt;&#xA;" OwnerUserId="9731" LastEditorUserId="9731" LastEditDate="2021-05-22T23:26:57.390" LastActivityDate="2021-05-22T23:26:57.390" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6961" PostTypeId="2" ParentId="6449" CreationDate="2021-05-23T01:27:46.060" Score="1" Body="&lt;h2&gt;Start with Scratch!&lt;/h2&gt;&#xA;&lt;p&gt;Scratch has all of the turtle concepts in it natively (they call the turtles &lt;em&gt;sprites&lt;/em&gt;, and you can use the pen extension to draw), plus a ton of advantages that are critical for beginner programmers (especially young folks, but not exclusively; &lt;a href=&quot;https://cs50.harvard.edu/scratch/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Harvard uses Scratch for introducing coding in CS50&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;No typing skills are required (less of a problem for older learners, but can be a major blocker for youngsters -- I've taught Scratch to classes of 1st and 2nd graders and that's virtually impossible with Python).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No syntax frustrations because the blocks are all there in front of you.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;It's largely self-documenting; the blocks are all there in front of you.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Having all the blocks right there means you learn more by hands-on experiementation in Scratch; Python turtle shifts the focus to reading documentation and tutorials, switching between tabs or consulting books and guides, activities that tend to only be accessible to older audiences.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch's design eliminates many classes of silly bugs and lets students focus more on the payoff (fun) and on the high-level programming concepts without getting bogged down by the endless minutiae, gotchas and quirks that come with any powerful general-purpose language like Python.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch runs in the browser (the place where beginners will likely be working) natively, unlike Python which is not a browser technology; no need for (often buggy/slow/poor UX/UI) third-party sites like &lt;a href=&quot;https://trinket.io/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;trinket&lt;/a&gt; or &lt;a href=&quot;https://replit.com/languages/python_turtle&quot; rel=&quot;nofollow noreferrer&quot;&gt;repl.it&lt;/a&gt; or installing/setting up offline IDEs to make the development workflow tolerable.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch has a great community of inspirational projects (this can be a downside; some classes I've taught Scratch in turn into a battle against kids playing &lt;a href=&quot;https://scratch.mit.edu/users/griffpatch/&quot; rel=&quot;nofollow noreferrer&quot;&gt;griffpatch&lt;/a&gt; games all hour -- &lt;a href=&quot;https://snap.berkeley.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Snap&lt;/a&gt; or offline Scratch solves this problem, or using a browser extension or whitelist to keep them tied down to projects starting with their username...).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch has built-in, incredibly easy-to-use sprite, sound and audio editors; computer vision motion detection; advanced collision detection between sprites and colors; integrations with hardware extensions; etc. These features would be prohibitive to implement with a beginner in Python.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch makes asset management (images, sounds) effortless.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch has great builtin assets so students can get to creating something visually impressive right away. With turtle, they'll generally be drawing simple shapes for starters.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch is more effortlessly powerful than Python turtle in ways that are specific to the sort of projects beginners typically want to make (in addition to making turtle-oriented apps easier to make).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch offers a gentle introduction to coordinates by showing the mouse and sprite positions when the program isn't running. In general, Scratch has anticipated pain points like this and has baked solutions into the UI in ways Python turtle hasn't (and can't).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Scratch isn't exactly object-oriented, yet it has separate scripts for each sprite (data is shared globally but usually doesn't play much of a role in a typical beginner-level Scratch program), so there's enough separation but without all the baggage of OOP.&lt;/p&gt;&#xA;&lt;p&gt;It's true that state management and event handling for clones can be a major pain but that's pretty advanced Scratch that will probably never be encountered except by the most dedicated students.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Control flow in Scratch largely &lt;em&gt;just works&lt;/em&gt;. You can slap on a bunch of &amp;quot;forever&amp;quot; blocks and run the app without having to fuss with putting &lt;code&gt;turtle.mainloop()&lt;/code&gt; in the proper location. Event handling, clicks and messages are generally very easy to deal with for basic and intermediate use-cases.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Furthermore, Python turtle has a ton of disadvantages (or &amp;quot;characteristics&amp;quot;, to use a more measured word) that harm its usefulness for beginners:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;To be able to use Python turtle, you have to use Python on a decent-enough level. Python is a full-featured programming language that isn't trivial to gain a basic command of in its own right.&lt;/p&gt;&#xA;&lt;p&gt;If the primary goal is to learn &lt;em&gt;Python&lt;/em&gt; specifically, turtle isn't a bad way to do it, particularly for younger learners. But then again, most folks will probably learn Python without graphics because they're probably old enough to want to use it for something other than game design or animations.&lt;/p&gt;&#xA;&lt;p&gt;Scratch totally eliminates the distinction between the language and the graphical module (clearly, having decoupled modules is key to the usefulness of a general-purpose language like Python, but it's just a hindrance if you're only using it for turtle -- sort of like buying a whole car just to listen to the radio).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Variables and state are a bigger deal in Python, and it's really easy to get into ugly situations with global variables and functions and wind up with a mess. Yes, Scratch variables are global, but you can get pretty far without using them much at all.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;By nature, you (sort of) have to teach a certain amount of &lt;a href=&quot;https://en.wikipedia.org/wiki/Object-oriented_programming&quot; rel=&quot;nofollow noreferrer&quot;&gt;OOP&lt;/a&gt; along with Python's brand of turtle, but then the turtle module itself breaks various rules of OOP in ways that are questionable and sources of confusion, like &lt;a href=&quot;https://stackoverflow.com/questions/42874183/difference-between-turtle-and-turtle&quot;&gt;calling methods from the procedural interface along with the object-oriented interface&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The design of the turtle library from a software engineering perspective is a bit weird, involving various &lt;a href=&quot;https://stackoverflow.com/a/16120087/6243352&quot;&gt;awkward ways of doing basic things&lt;/a&gt;, &lt;a href=&quot;https://docs.python.org/3/library/turtle.html#turtle.down&quot; rel=&quot;nofollow noreferrer&quot;&gt;redundant and poorly-named methods&lt;/a&gt; (What does &amp;quot;pu&amp;quot; do? Does &amp;quot;down&amp;quot; move my turtle down? Oh wait, it puts the &lt;em&gt;pen&lt;/em&gt; down...), questionable design choices and a lot of bloat (150+ methods just to achieve what Scratch does in a few dozen blocks -- yes, half of these methods are duplicates in defiance of the &lt;a href=&quot;https://www.python.org/dev/peps/pep-0020/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Zen&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Window/screen/event management in turtle can be a headache.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Control flow in Python turtle can quickly ruin the party -- it requires some understanding of timers, blocking calls, first-class functions (for event handlers) and so forth. It's not uncommon for a student to &lt;a href=&quot;https://stackoverflow.com/questions/51991587/python-turtle-module-wont-run-my-code-on-python-3-6&quot;&gt;put a blocking call above other code and wind up wondering why the program hangs&lt;/a&gt; or &lt;a href=&quot;https://stackoverflow.com/questions/19018243/python-turtle-graphics-window-only-opens-briefly-then-closes&quot;&gt;forget to make a blocking call&lt;/a&gt; &lt;a href=&quot;https://stackoverflow.com/questions/7217405/turtle-graphics-not-responding&quot;&gt;to run the animation loop&lt;/a&gt;. Misunderstandings like this get in the way less frequently in Scratch. It's not impossible to miss some &lt;a href=&quot;https://stackoverflow.com/questions/60480328/attributeerror-partially-initialized-module-turtle-has-no-attribute-turtle&quot;&gt;&lt;em&gt;extremely&lt;/em&gt; subtle detail&lt;/a&gt; &lt;a href=&quot;https://stackoverflow.com/questions/53692691/dont-understand-this-attributeerror-module-turtle-has-no-attribute-turtle&quot;&gt;that halts your app&lt;/a&gt;, just harder with Scratch.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Python turtle involves a lot of &lt;a href=&quot;https://docs.python.org/3/library/turtle.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;combing the docs&lt;/a&gt; to figure out what stuff does. And that's just the module, not to mention the rest of the language.&lt;/p&gt;&#xA;&lt;p&gt;Add to that the fact that Python 2 has many subtle differences from Python 3, so it's super easy to wind up looking at the wrong docs entirely.&lt;/p&gt;&#xA;&lt;p&gt;Sure, these skills are super-important for actual development, but there's no point foisting them on anyone until they're mentally ready for the challenge.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Python has limited options for further pursuit of graphics/interactive applications. &lt;a href=&quot;https://en.wikipedia.org/wiki/Pygame&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pygame&lt;/a&gt; is a typical next step after Python turtle, but it can be a leap in both power and complexity and runs into the same old environment issues where it's simply &lt;a href=&quot;https://stackoverflow.com/a/8634287/6243352&quot;&gt;non-native for the browser&lt;/a&gt;, the de-facto beginner development environment. Once again, Scratch covers most of the features of Pygame a beginner would use and be able to appreciate.&lt;/p&gt;&#xA;&lt;p&gt;After turtle and Pygame (and maybe a &lt;a href=&quot;https://codereview.stackexchange.com/questions/240237/zork-like-text-adventure-w-python&quot;&gt;text adventure&lt;/a&gt; project), the stuff Python is useful for (&lt;a href=&quot;https://www.datacamp.com/learn/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;data science&lt;/a&gt;, AI/CV/NLP/ML, backend web apps, data mining, etc...) tends to be too complex and abstract for beginners of any age who prefer visualizations and interactivity. It's fine to switch between languages, though, so this isn't a complete deal-breaker, and Python certainly is used as a scripting language for most things eager students might want to investigate (say, robotics) and has a fantastic ecosystem of packages, so this is a somewhat minor point.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ironically (because of the very non-beginner-level context), one of the most effective uses of Python's turtle I've seen was as a lightweight visualizer in the coursework for a &lt;a href=&quot;https://www.udacity.com/course/artificial-intelligence-for-robotics--cs373&quot; rel=&quot;nofollow noreferrer&quot;&gt;graduate-level AI course on robotics&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Although this seems like a big rant against Python turtle (or even Python in general), I'm actually quite fond of turtle. It's a useful, simple, fun drawing package that's a great tool to have in Python. But I think it's overprescribed to many curricula or individual learners when Scratch would be far easier and more effective at achieving the goals of engagement and communicating the basics of programming for most audiences, particularly young ones.&lt;/p&gt;&#xA;&lt;p&gt;I emphasize the quirks of Python turtle because, as experienced programmers and educators, it's easy to forget all of the countless frustrations that come with learning programming for the first time. The extent to which Scratch streamlines the development experience and lets users work at a high enough level that they can build cool stuff with a minimal amount of frustrations and gotchas is remarkable.&lt;/p&gt;&#xA;&lt;p&gt;Students will have plenty of time to learn how to navigate docs, engineering patterns and language quirks once their appetite for coding has been whet and they're confident with basic control structures and logic.&lt;/p&gt;&#xA;&lt;h2&gt;Does Python/turtle offer anything to beginners?&lt;/h2&gt;&#xA;&lt;p&gt;Of course. Students who've spent at least a bit of time with Scratch and are eager to move on to Python specifically and have a decent reason for pursuing the language should be a fine fit for turtle. Turtle can be used for a handful of lessons to gently help translate concepts from Scratch into written code while introducing Python syntax and concepts like objects and methods.&lt;/p&gt;&#xA;&lt;p&gt;Some students feel that Scratch is a silly toy (understandable, given the colorful drag 'n drop interface and chipper, wholesome look, but incorrect) and want the feeling of something more &amp;quot;grown up&amp;quot;, i.e. a written language. In many cases, I've found ambitious students sometimes get more than they've bargained for and wind up going back to Scratch, at least temporarily, upon tasting the difficulty of Python: syntax errors, typing the code out, having no idea what to type or where to find help, little concept for the syntax and semantics of a program, etc.&lt;/p&gt;&#xA;&lt;p&gt;Students in typed languages are likely to require more hand-holding and guidance, and may develop less independence than block languages like Scratch.&lt;/p&gt;&#xA;&lt;p&gt;Python with turtle might be a better fit than Scratch for math classes for older students because stacking tons of math blocks in Scratch can get nasty. Peter Farrell has a great book and blog called &lt;a href=&quot;http://hackingmathclass.blogspot.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacking Math Class&lt;/a&gt; (but then again, he's &lt;a href=&quot;https://codepen.io/peterfarrell66/&quot; rel=&quot;nofollow noreferrer&quot;&gt;using a ton of p5.js nowadays&lt;/a&gt;; more on this below) that seems like a potential opportunity for turtle over Scratch. This use-case is mostly single-turtle (meaning you can use the procedural interface) and non-sprite-oriented, with coding based mostly on simple movement commands and focus on math formulas.&lt;/p&gt;&#xA;&lt;p&gt;That said, Python isn't necessarily my first choice to recommend as a beginner language, even after Scratch, because it's not as natively interactive as HTML5 (HTML, CSS and JavaScript). I think the benefits of Python for beginners are overrated, particularly for younger folk. Which brings me to my next point.&lt;/p&gt;&#xA;&lt;h2&gt;Consider HTML (and HTML5, &lt;a href=&quot;https://p5js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;p5.js&lt;/a&gt;)&lt;/h2&gt;&#xA;&lt;p&gt;It hasn't been mentioned yet in this thread, but HTML is a fantastic option to consider as an alternative to (or in addition to) a turtle-oriented curriculum. Yes, HTML is typed, isn't a genuine programming language, doesn't teach logic commands as turtle does and doesn't let you make games nearly as easily as Scratch (JavaScript required), but it has many benefits:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Instantaneous visual results with just a few lines of code.&lt;/li&gt;&#xA;&lt;li&gt;Most everyone's used a webpage, so the motivation is obvious.&lt;/li&gt;&#xA;&lt;li&gt;HTML is the most browser-native thing imaginable, so there are endless high-quality development environments that are robust and non-hacky.&lt;/li&gt;&#xA;&lt;li&gt;You can have fun interacting with famous websites by changing text, background colors, images, etc, often to silly effect.&lt;/li&gt;&#xA;&lt;li&gt;HTML is an extremely practical foundational lifelong skill even for people who don't consider themselves coders.&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;Math-y&amp;quot; logic like loops and conditional statements are gone, so HTML can bring practical, creative computer skills to a different audience.&lt;/li&gt;&#xA;&lt;li&gt;Web design scratches a different creative itch than Scratch, enabling students make a home on the internet and express their interests, values, personality, share images and ideas, link to other sites they like, and so forth.&lt;/li&gt;&#xA;&lt;li&gt;With some assistance, it's not difficult to do quizzes and interactive fiction projects using text, links and images and introduce interactivity into projects incrementally.&lt;/li&gt;&#xA;&lt;li&gt;HTML teaches tons of core CS concepts like trees/nesting/parent/child/ancestor, the idea of a &lt;em&gt;node&lt;/em&gt; or &lt;em&gt;element&lt;/em&gt; with state (input boxes) and properties, etc.&lt;/li&gt;&#xA;&lt;li&gt;HTML is a forgiving language -- things can get messed up but even if the markup a student has written is pretty borked, you can get something on the screen and avoid intimidating errors. Linters and validators built into most IDEs these days will auto-close tags and show problems. The most typical problem is something not showing up because it's in the wrong spot or a missed closing tag.&lt;/li&gt;&#xA;&lt;li&gt;HTML leads right into CSS and JavaScript, two outstanding domains for education. Adding style, buttons, alerts and forms to a basic HTML page can be tons of fun.&lt;/li&gt;&#xA;&lt;li&gt;It's easy to add interactive videos and audio to pages.&lt;/li&gt;&#xA;&lt;li&gt;CSS is extremely powerful and can do a lot with a little; cool animations can be added by copying and pasting from &lt;a href=&quot;https://www.w3schools.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;w3schools&lt;/a&gt; (yes, developers cringe, but just let beginners have fun making a mess!)&lt;/li&gt;&#xA;&lt;li&gt;Ditto for JS: let students copy little trinkets and click handlers into their page that can flash alerts, change text and colors, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;With these basics in place, &lt;a href=&quot;https://p5js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;p5.js&lt;/a&gt; becomes a logical next step as an alternative to Pygame or Python turtle. JS is natively visual and p5 is easy to run; just navigate to &lt;a href=&quot;https://editor.p5js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;p5's web editor&lt;/a&gt; or open a &lt;a href=&quot;https://codepen.io/p5js/pen/wreBKy&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codepen template&lt;/a&gt;. These environments are less brittle than the hacky Python graphics IDEs for browsers.&lt;/p&gt;&#xA;&lt;p&gt;HTML, CSS and JS offers a rich variety of next-steps for pretty much any interest, even traditionally Python-oriented domains like data visualization, robotics and AI. p5 can do turtle-style graphics with an arguably better/more intuitive design than Python turtle (particularly the setup/draw loop).&lt;/p&gt;&#xA;&lt;p&gt;p5's &lt;a href=&quot;https://p5js.org/reference/&quot; rel=&quot;nofollow noreferrer&quot;&gt;docs&lt;/a&gt; and &lt;a href=&quot;https://p5js.org/examples/&quot; rel=&quot;nofollow noreferrer&quot;&gt;examples&lt;/a&gt; are fantastic.&lt;/p&gt;&#xA;&lt;p&gt;Going the JS route instead of Python as a next step after Scratch seems like a great fit for students who are visually-oriented and prefer interactivity to console-based programs and utilities (although NodeJS does that just fine, too).&lt;/p&gt;&#xA;&lt;h2&gt;Consider Code.org&lt;/h2&gt;&#xA;&lt;p&gt;As &lt;a href=&quot;https://cseducators.stackexchange.com/a/6937/9426&quot;&gt;another post&lt;/a&gt; mentioned, &lt;a href=&quot;https://code.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;code.org&lt;/a&gt; is also great! The benefit of code.org over Scratch is that Scratch is a relatively unstructured sandbox which can overwhelm some learners. Code.org offers short block programming puzzles with clear structure and goals, teaching control flow, state and basic logic.&lt;/p&gt;&#xA;&lt;p&gt;Among many other small apps and sites, there's a code.org-like &lt;a href=&quot;https://www.google.com/doodles/celebrating-50-years-of-kids-coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Doodle&lt;/a&gt; that I've gotten good mileage out of with coding novices of all ages and might make a fantastic day-one start to a curriculum.&lt;/p&gt;&#xA;&lt;h2&gt;Honorable mentions&lt;/h2&gt;&#xA;&lt;p&gt;I don't have much experience with these, but &lt;a href=&quot;https://en.wikipedia.org/wiki/Racket_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Racket&lt;/a&gt; (for older students -- it does turtle graphics nicely, but the language is a Lisp) and something like &lt;a href=&quot;https://en.wikipedia.org/wiki/Lego_Mindstorms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lego Mindstorms&lt;/a&gt;, a block language for robotics, deserve mention (controlling a robot in Mindstorms is the same as controlling an on-screen turtle).&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2021-05-23T05:05:05.567" LastActivityDate="2021-05-23T05:05:05.567" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6962" PostTypeId="2" ParentId="6911" CreationDate="2021-05-25T19:54:04.487" Score="2" Body="&lt;p&gt;replit.com allows you to code online and you can also set up tests for the Repl, as well as embed the code into a blog or LMS.&lt;/p&gt;&#xA;&lt;p&gt;I've an example &lt;a href=&quot;https://replit.com/join/igqkjogb-seanrattigan&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; based on a tutorial &lt;a href=&quot;https://replit.com/talk/learn/Python-Advanced-Concepts-Explanation/7382&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. You'd need an account to &amp;quot;collaborate&amp;quot; but the images are below.&lt;/p&gt;&#xA;&lt;p&gt;The code runs the main.py file when the &amp;quot;Run&amp;quot; button is activated.&lt;/p&gt;&#xA;&lt;p&gt;I made a Point class in point.py and this is called from the main in main.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/ncEmH.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ncEmH.png&quot; alt=&quot;the Point class&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;There are other features such as version control, sharing for a collab, database, forking, etc.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/blTyB.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/blTyB.png&quot; alt=&quot;the main file that gets exeuted&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Repl introduced classroom some time ago- the demo &lt;a href=&quot;https://www.youtube.com/watch?v=PYHW-1BlVgc&quot; rel=&quot;nofollow noreferrer&quot;&gt;video&lt;/a&gt; shows some of the capabilities for assignments.  Last year this was replaced by &lt;a href=&quot;https://replit.com/teams-for-education&quot; rel=&quot;nofollow noreferrer&quot;&gt;Teams for Education&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;While better, it is not free, but there is a 4-month free trial -- you can see a demo of this &amp;quot;update&amp;quot; &lt;a href=&quot;https://www.youtube.com/watch?v=hCgGzIUJtY4&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Each student &amp;quot;gets their own copy&amp;quot; of an assignment, and the interface is quite pleasant- they can see due dates, status, etc, and you can build in unit tests that they should pass before submitting an assignment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/NzMmO.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NzMmO.png&quot; alt=&quot;Student view of assigned work&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Github classroom (&lt;a href=&quot;https://www.youtube.com/watch?v=2PuXdb8OLYo&amp;amp;t=2s&quot; rel=&quot;nofollow noreferrer&quot;&gt;demo here&lt;/a&gt;) is another option but may not be the easiest to start with.  Using Repl you could at least share code and have the class make their own Repls and write code to pass tests, or code a class given a class diagram or problem statement.&lt;/p&gt;&#xA;&lt;p&gt;Hope this helps.  Not exactly OOP Codingbat but might give you some ideas.  Another useful site is &lt;a href=&quot;http://programarcadegames.com/index.php?chapter=introduction_to_classes&amp;amp;lang=en&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;.  It approaches OOP with Python using games. PyGame will run in repl as well, allowing some collaboration on games with many classes to be completed.  An assignment can allow each student to get a fork of what you post, OR allow students in groups to get a fork between a group.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastEditorUserId="2706" LastEditDate="2022-02-27T14:53:25.933" LastActivityDate="2022-02-27T14:53:25.933" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6964" PostTypeId="2" ParentId="3971" CreationDate="2021-05-27T15:27:04.697" Score="3" Body="&lt;p&gt;I have one experience of introducing students with computability and complexity, in one 2-hour lecture. These &lt;em&gt;students&lt;/em&gt; are a bit unusual maybe: They are secondary teachers in some scientific field (maths, physics, etc.), most of them quite new to CS and programming. The lecture is part of a larger set of lectures, where they get some intuitions about algorithms and their complexity.&lt;/p&gt;&#xA;&lt;p&gt;Below is my course outline, which is by no means perfect but may give some ideas. It is very dense for a 2-hour lecture. Many concepts are not formally defined but I rely a lot on their intuition and their (very limited) programming experience.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Computability&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What does it mean to &lt;em&gt;compute&lt;/em&gt;?&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Many formalizations, that happen to be equivalent&lt;/li&gt;&#xA;&lt;li&gt;Choice of Python-like pseudo-code as the model&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Vocabulary: algorithms (=object in the model), partial function, decision problem, computable problem&lt;/li&gt;&#xA;&lt;li&gt;Algorithms as data, and existence of a universal algorithm (admitted)&lt;/li&gt;&#xA;&lt;li&gt;There exist uncomputable functions, by (un)countability (since some of the students knew the notion)&lt;/li&gt;&#xA;&lt;li&gt;The halting problem is undecidable: proved within the Python-like formalism&lt;/li&gt;&#xA;&lt;li&gt;Presentation of the Turing Machine model, using mainly examples&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Complexity&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Complexity of an algorithm &lt;em&gt;versus&lt;/em&gt; complexity of a problem&lt;/li&gt;&#xA;&lt;li&gt;Idea of grouping problems by &lt;em&gt;difficulty&lt;/em&gt; into &lt;em&gt;complexity classes&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;Classes P (polytime alg.) and NP (polytime verification alg.)&lt;/li&gt;&#xA;&lt;li&gt;Notion of reduction, NP-completeness and Cook-Levin Theorem (admitted)&lt;/li&gt;&#xA;&lt;li&gt;P = NP ?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10594" LastActivityDate="2021-05-27T15:27:04.697" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6965" PostTypeId="1" CreationDate="2021-05-30T16:35:54.300" Score="4" ViewCount="96" Body="&lt;p&gt;What are some free online AI/ML demos for grade 8-10 students?&lt;/p&gt;&#xA;&lt;p&gt;I am a high school teacher, and I am exploring apps and games which will help students understand and appreciate the world of  Artificial  Intelligence and its applications and become AI-Ready.&lt;/p&gt;&#xA;&lt;p&gt;I am looking for web browser-based applications only, including chrome web store; It need not be downloaded on the device, and cross-platform supported. For example, I found &lt;a href=&quot;https://experiments.withgoogle.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Experiments with Google&lt;/a&gt; very helpful, which has hundreds of experiments. Similarly, &lt;a href=&quot;https://aidemos.microsoft.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Microsoft AI demos&lt;/a&gt; has Machine Teaching, AI Route Planner, Text Analytics, Language Understanding, Video Indexer, Computer Vision, etc.&lt;/p&gt;&#xA;&lt;p&gt;DeepPavlov, a free and open-source AI, has a &lt;a href=&quot;https://demo.deeppavlov.ai/#/en/ner&quot; rel=&quot;nofollow noreferrer&quot;&gt;demo&lt;/a&gt;, which includes Entity recognition, Text QA, ODQA, Ranking, Intent classification, Insult detection, etc.&lt;/p&gt;&#xA;&lt;p&gt;Please suggest more similar programs. Thanks in advance!&lt;/p&gt;&#xA;" OwnerDisplayName="user10595" LastEditorUserId="9154" LastEditDate="2021-05-31T07:58:21.150" LastActivityDate="2021-07-26T07:48:56.547" Title="Free online AI/ML demos for grade 8-10 students" Tags="|resource-request|secondary-education|artificial-intelligence|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6966" PostTypeId="2" ParentId="211" CreationDate="2021-05-30T21:59:53.570" Score="1" Body="&lt;p&gt;In C, when you declare an array of type &lt;code&gt;int&lt;/code&gt; like so&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int n = 500;&#xA;int *a = malloc(n*sizeof(int));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;the name &lt;code&gt;a&lt;/code&gt; stores the heap memory address of a chunk of memory. When you use the sqaure-bracket operator as in &lt;code&gt;a[k]&lt;/code&gt;, you &amp;quot;go&amp;quot; to address &lt;code&gt;a&lt;/code&gt;.   Baked into the pointer data type is knowledge of the size of the type you have in your array; hence &lt;code&gt;a[k]&lt;/code&gt; means that after you go to &lt;code&gt;a&lt;/code&gt;, you move over &lt;code&gt;k&lt;/code&gt; integer spaces.  Note that the compiler generates the same code for &lt;code&gt;a[k]&lt;/code&gt; and &lt;code&gt;*(a + k)&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A similar thing occurs if you allocate this memory on the stack.&lt;/p&gt;&#xA;&lt;p&gt;Other languages have inherited this convention from C. One example that does not is R; it uses 1-based indexing. This is the explanation I give to my students, and they find it very reasonable.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-05-30T21:59:53.570" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6967" PostTypeId="2" ParentId="6709" CreationDate="2021-06-02T09:36:16.583" Score="-1" Body="&lt;p&gt;My go-to example for both data modeling and OOP (which in both cases revolve around a kind of normalization), is a &lt;strong&gt;video rental store&lt;/strong&gt;. It's maybe a very dated example, feel free to change it to a library or a rental store for other things, but I find that the video store example both highlights the intricacies of OOP and data normalization, while at the same time being a very simple context to grasp.&lt;/p&gt;&#xA;&lt;p&gt;The main goal is to build up to a three table/class diagram: &lt;code&gt;Customer&lt;/code&gt;, &lt;code&gt;Video&lt;/code&gt; and &lt;code&gt;Rental&lt;/code&gt; (which is the cross table between customers and videos).&lt;/p&gt;&#xA;&lt;p&gt;The rest of this answer is just tips on how to relate specific OOP basics to the example at hand.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Why objects?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Well, how would you store your video data, if you want to track three things for a rental: the customer name, address, video name, and expected date of return.&lt;/p&gt;&#xA;&lt;p&gt;Ask the students to write a very simple program that is able to tell you that Alice rented Antz, Bob rented Bee Movie, and Charlie rented Cars. Let them rely on some reusable &lt;code&gt;PrintRentalInfo&lt;/code&gt; method, but allow them to define the method parameters as they see fit.&lt;/p&gt;&#xA;&lt;p&gt;Students who haven't yet seen OOP will use four distinct arrays and rely on the fact that one video is found on the same index in all four arrays. Explain to them that instead of having a &amp;quot;bag&amp;quot; of customer names, a &amp;quot;bag&amp;quot; of addresses, a &amp;quot;bag&amp;quot; of video names, and a &amp;quot;bag&amp;quot; of return dates is not really easy to work with. Suggest the idea that instead of making a &amp;quot;bag&amp;quot; per data field, it would make more sense if we made a &amp;quot;bag&amp;quot; per rental.&lt;/p&gt;&#xA;&lt;p&gt;Build the &lt;code&gt;Rental&lt;/code&gt; class with the four properties. Build the same application as they did, but using OOP. This will show them object initialization, how different objects have the same structure but individually unique content, and how you can pass an object around (as opposed to multiple method parameters of primitive types).&lt;/p&gt;&#xA;&lt;p&gt;Really highlight how easy it is that you can move this rental &amp;quot;bag&amp;quot; around from method to method, keeping all relevant information together.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Why more than one class?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;A fourth customer appears. Her name is also Alice. You run into an issue here, because now you're unable to tell &lt;em&gt;which&lt;/em&gt; Alice has rented which videos, and you don't want to fine the wrong Alice.&lt;/p&gt;&#xA;&lt;p&gt;Also, the original Alice has called us to let us know her address has changed. Point out the difficulty of having to go through all the rentals and figuring out that you can't just blindly change &amp;quot;old_address&amp;quot; to &amp;quot;new_address&amp;quot;, because there may be other customers living on that same address who did not move with Alice. Also, you can't rely on the name either, as the fourth Alice has already made some rentals too.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;If the students keep protesting that you could do it based on the combination of name and address, as what happens if those two Alices live on the same address, and only one of them moves.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Suggest to the students that it would make a lot of sense if we had a separate list of all our customers and their addresses, so we could tell them apart by more than just their name, and easily change one person's details.&lt;/p&gt;&#xA;&lt;p&gt;Goal: build a &lt;code&gt;Customer&lt;/code&gt; class, and change &lt;code&gt;Rental&lt;/code&gt; so it includes a &lt;code&gt;Customer&lt;/code&gt; property as opposed to name/address properties.&lt;/p&gt;&#xA;&lt;p&gt;Focus: very much highlight how you can have two &lt;strong&gt;different&lt;/strong&gt; customer objects, even when their names and addresses are the same.&lt;/p&gt;&#xA;&lt;p&gt;Extra: You can take the same approach to creating the &lt;code&gt;Video&lt;/code&gt; class, so you can track the specific videos you have. Maybe leave this as an exercise to the students, as this is much of the same as before.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;From this point on, you can expand the business logic based on what you want to showcase.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; - Maybe the store rents &lt;code&gt;Video&lt;/code&gt; and &lt;code&gt;Game&lt;/code&gt;, but you still want &lt;code&gt;Rental&lt;/code&gt; to be able to link to either of them (using the base &lt;code&gt;RentableObject&lt;/code&gt; class)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Interface&lt;/strong&gt; - You can use the same example as inheritance.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data normalization&lt;/strong&gt; - How would we go about both tracking the movies we have available, and the individual physical cassettes (we could have multiple of the same movie)? How would be be able to track fines that a customer has incurred, and which of them they have already paid?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data transformation&lt;/strong&gt; - Our boss wants us to print a weekly report on all rentals made, rentals returned, incurred fines, and fines from before which &lt;em&gt;still&lt;/em&gt; haven't been paid.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Reference vs value&lt;/strong&gt; - Add a &lt;code&gt;Price&lt;/code&gt; to both the &lt;code&gt;Video&lt;/code&gt; and &lt;code&gt;Rental&lt;/code&gt;. Showcase how you set &lt;code&gt;rental.Price&lt;/code&gt; based on &lt;code&gt;video.Price&lt;/code&gt;, but when &lt;code&gt;video.Price&lt;/code&gt; later changes, &lt;code&gt;rental.Price&lt;/code&gt; is untouched. Now repeat the same exercise with a reference object (e.g. changing the customer's name).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I find that the context for this example is very easy to grasp, and has a lot of opportunity for expansion. This could grow into a long-term project that you keep expanding, which can be a valuable lesson if you want to teach your students about how to handle changing requirements and the benefits of clean coding, or maintenance and legacy development.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2021-06-02T09:36:16.583" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="6968" PostTypeId="1" CreationDate="2021-06-02T17:45:18.760" Score="7" ViewCount="117" Body="&lt;p&gt;I am a Faculty Teacher of Computer Science and am in my NQT year. I have been asked to re-apply for my job, to become a permanent teacher at the school, and have my interview next Tuesday. The school has asked me to teach E-safety, however I’ve only just taught the content I created a little less than 2 months ago.&lt;/p&gt;&#xA;&lt;p&gt;I want to teach cyber-security to the year 8’s and talk about white, grey, and black hat hackers, social engineering, phishing, and then how to prevent this kind of attack. However, my HOF has said cybersecurity isn’t E-Safety and with no other computer science teachers at the school, I’m turning to my fellow practitioners for some help. If cybersecurity isn’t E-Safety, what should I focus my lesson on?&lt;/p&gt;&#xA;" OwnerUserId="10607" LastEditorUserId="204" LastEditDate="2021-08-07T22:22:11.500" LastActivityDate="2021-08-07T22:22:11.500" Title="Is Cyber-Security E-safety or not" Tags="|security|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6969" PostTypeId="2" ParentId="6968" CreationDate="2021-06-02T18:16:20.927" Score="8" Body="&lt;p&gt;E-Safety is typically used to mean safety online, which for kids is usually a bit of awareness training around scams, dangers of dodgy sites, online bullying, awareness that anything that happens online can be permanent etc&lt;/p&gt;&#xA;&lt;p&gt;Cyber Security is learning about controls, attack and defence, risk management, hacking, perimeter security, social engineering... the list goes on: please visit &lt;a href=&quot;https://security.stackexchange.com/&quot;&gt;Security Stack Exchange&lt;/a&gt; to learn more - we have a huge list of topics.&lt;/p&gt;&#xA;&lt;p&gt;I give a lot of courses to schoolkids (12 years and older) and university students and while I mostly focus on the safety aspect, I do bring in a bit of cyber security as it can be interesting, it may inspire some of them to take it as a career, and knowing a bit can help them protect themselves. So you can probably spin it as an e-safety and cyber security module - there is value in both.&lt;/p&gt;&#xA;&lt;p&gt;A useful resource for both is the community of BSides events - I run BSides Edinburgh and BSides Glasgow, but there are ones all over the world. Cooper (&lt;a href=&quot;https://twitter.com/Ministraitor&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ministraitor&lt;/a&gt;) videos as many of the talks as he can and &lt;a href=&quot;https://administraitor.video/&quot; rel=&quot;nofollow noreferrer&quot;&gt;publishes them on his site&lt;/a&gt; - mostly infosec, but safety is covered in quite a few.&lt;/p&gt;&#xA;" OwnerUserId="2357" LastEditorUserId="2357" LastEditDate="2021-06-10T17:23:33.427" LastActivityDate="2021-06-10T17:23:33.427" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="6972" PostTypeId="2" ParentId="213" CreationDate="2021-06-15T09:06:55.390" Score="1" Body="&lt;p&gt;I realize this post is old. However, what helped me and what may help others is that 0 is indeed on the number line. The best analogy I can give to support this cause is related to a bank account.&lt;/p&gt;&#xA;&lt;p&gt;If you are -\$5 in your account and you add \$10. Your total sum is \$5. Placing this on the number line (as seen below) -5 becomes your &amp;quot;0&amp;quot; as you count up by 10. If you start -5 as 1, your short \$1. If you skip 0 in your addition of 10, you gain \$1.&lt;/p&gt;&#xA;&lt;p&gt;-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5&lt;/p&gt;&#xA;&lt;p&gt;Simplifying things to its core has been my most successful tool in life.&lt;/p&gt;&#xA;&lt;p&gt;GL,&lt;/p&gt;&#xA;" OwnerUserId="10678" LastEditorUserId="204" LastEditDate="2022-05-29T17:58:41.787" LastActivityDate="2022-05-29T17:58:41.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6973" PostTypeId="2" ParentId="6507" CreationDate="2021-06-15T17:59:25.227" Score="1" Body="&lt;p&gt;try Tim Roughgarden online AGT course &amp;amp; book&#xA;&lt;a href=&quot;https://youtube.com/playlist?list=PLEGCF-WLh2RJBqmxvZ0_ie-mleCFhi2N4&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtube.com/playlist?list=PLEGCF-WLh2RJBqmxvZ0_ie-mleCFhi2N4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;and those 2 lectures by Constantinos Daskalakis for the PPAD class&#xA;&lt;a href=&quot;https://youtu.be/TUbfCY_8Dzs&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/TUbfCY_8Dzs&lt;/a&gt;&#xA;&lt;a href=&quot;https://youtu.be/Ih0cPR745fM&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/Ih0cPR745fM&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;and Papa Dimitriou  2 lectures in Simons Institute&#xA;&lt;a href=&quot;https://youtu.be/ggi2PZbO0oQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/ggi2PZbO0oQ&lt;/a&gt;&#xA;&lt;a href=&quot;https://youtu.be/0cyR_fpOvOc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/0cyR_fpOvOc&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Tim Roughgarden is one of the pioneers in the AGT field, never knew anyone teach it or even studied it without referencing his 20 lectures book. Besides he is the original source for the Price of Anarchy(his PhD), I think participated in the Big USA spectrum auction. For the same reason I added Constantinos for the PPAD class it's his PhD, I personally understood it better from him. Papa Dimitriou is also like their mentor/GOD Father, but not too many lectures available online for him. Thanks u reminded me to add more resources&lt;/p&gt;&#xA;" OwnerUserId="9131" LastEditorUserId="919" LastEditDate="2021-08-11T17:52:01.150" LastActivityDate="2021-08-11T17:52:01.150" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6974" PostTypeId="2" ParentId="6957" CreationDate="2021-06-15T18:31:03.627" Score="1" Body="&lt;p&gt;u may find this example about the use of Edmond Karo Max-Flow Algorithm in World-War-2 interesting&#xA;&lt;a href=&quot;https://m.facebook.com/story.php?story_fbid=2969706433062743&amp;amp;id=2567729029927154&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://m.facebook.com/story.php?story_fbid=2969706433062743&amp;amp;id=2567729029927154&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;.&#xA;&lt;img src=&quot;https://i.stack.imgur.com/AY9V3.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&#xA;.&#xA;&amp;amp; I always find supermarket shopping a knapsack problem according to ur ability to carry goods!!!!&#xA;.&#xA;-If ur students r familiar with mining &amp;amp; cryptocurrencies u may tell them that transactions get selected in a block by some sort of auction on fees they offer as bids ( a greedy approach), although it's a knapsack problem since transactions have different sizes  &amp;amp; the block have a limited size&#xA;.&#xA;Also, in Tim Roughgarden Algorithmic Game Theory material u find TV advertisements selection of u assume fixed time interval, price depends on the type of ad.&#xA;-more important the USA spectrum auction viewed as a graph coloring problem, but maybe this is complicated for under-graduate students&#xA;.&#xA;This is the 3 colors&#xA;&lt;img src=&quot;https://i.stack.imgur.com/oRFWM.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&#xA;.&#xA;Then the heuristic to 2 colors&#xA;&lt;img src=&quot;https://i.stack.imgur.com/1FGZG.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/p&gt;&#xA;" OwnerUserId="9131" LastActivityDate="2021-06-15T18:31:03.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6976" PostTypeId="2" ParentId="6897" CreationDate="2021-06-16T20:24:14.623" Score="4" Body="&lt;p&gt;I last taught the Compiler course in 2008, that's a longtime with probably newer books have appeared. (ie sorry if the answer is somehow outdated)&lt;/p&gt;&#xA;&lt;p&gt;But I did had the same complains from the students, then one of them (Hussain Hassan Mehanna, he's probably a prof in UK now) told me that his friend in AUC uses a book called &amp;quot;Compiler Construction, Principles &amp;amp; Practice&amp;quot; by Kenneth C. Louden&#xA;I brought it, the faculty agreed, the students liked it; ..... it was fine&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/uffRl.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&#xA;But I kept the original classic one as a 2ndary reference, just not the textbook&lt;/p&gt;&#xA;" OwnerUserId="9131" LastEditorUserId="9131" LastEditDate="2021-06-17T02:55:11.993" LastActivityDate="2021-06-17T02:55:11.993" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6977" PostTypeId="1" CreationDate="2021-06-17T04:18:24.373" Score="3" ViewCount="517" Body="&lt;p&gt;What can be real-world examples to teach the difference between null and zero to high school students of computer science?&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-06-21T11:29:39.740" Title="Real world examples for the difference between null and zero?" Tags="|secondary-education|teaching-analogy|" AnswerCount="6" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6978" PostTypeId="1" CreationDate="2021-06-17T04:39:32.823" Score="2" ViewCount="75" Body="&lt;p&gt;As we know that MS excel plays an important part in the life of programmers, managers, scientists, engineers, statisticians, etc.&#xA;Shall we add a comprehensive course in excel for our high school students in CS?&#xA;It will definitely help them in a long run. Here are some of the sites which show the use of MS excel. There are a lot more uses.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.goskills.com/Excel/Resources/Uses-of-Excel-in-business&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.goskills.com/Excel/Resources/Uses-of-Excel-in-business&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/echTU.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/echTU.png&quot; alt=&quot;some statistics with Excel&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.wallstreetmojo.com/uses-of-excel/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.wallstreetmojo.com/uses-of-excel/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://magoosh.com/excel/10-best-uses-microsoft-excel/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://magoosh.com/excel/10-best-uses-microsoft-excel/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;and many more .........&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-07-10T20:00:26.570" Title="Adding MS excel in curriculum for highschool students" Tags="|secondary-education|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="6979" PostTypeId="2" ParentId="6977" CreationDate="2021-06-17T07:03:30.487" Score="2" Body="&lt;p&gt;Maybe didn't attend an exam, or register in the course, as apposed to took zero?&#xA;-Or the difference between not having an account in a certain bank &amp;amp; having a zero balance in ur account?&lt;/p&gt;&#xA;&lt;p&gt;(The students may feel bad luck about 1st example, so I suggest u skip it unless too necessary)&lt;/p&gt;&#xA;" OwnerUserId="9131" LastActivityDate="2021-06-17T07:03:30.487" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6980" PostTypeId="2" ParentId="6977" CreationDate="2021-06-17T14:23:07.207" Score="0" Body="&lt;p&gt;The possibility of a null pointer or a null reference is the soon-to-be-old-fashioned way to express what some programming languages represent with &lt;code&gt;optional&lt;/code&gt; data types.  In modern C++, &lt;code&gt;std::optional&amp;lt;foo&amp;gt;&lt;/code&gt; is the union of the &lt;code&gt;foo&lt;/code&gt; data type with a special value that means &amp;quot;no value,&amp;quot; or &amp;quot;not found,&amp;quot; or &amp;quot;invalid,&amp;quot; or whatever the programmer wants it to mean.&lt;/p&gt;&#xA;&lt;p&gt;IMO, you could teach that by imagining these two conversations:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Q: How many apples are in your basket?&#xA;A: zero.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;int numApplesIn(Basket basket);&#xA;std::cout &amp;lt;&amp;lt; &amp;quot;I have &amp;quot; &amp;lt;&amp;lt; numApplesIn(myBasket) &amp;lt;&amp;lt; &amp;quot; apples.\n&amp;quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The question asked for a number, and it can always be answered with a number. Zero is a number--a valid answer to the question.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Q: What's the name of the biggest car dealership in this town?&#xA;A: Null. (Nobody sells cars around here.)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;std::optional&amp;lt;string&amp;gt; findBiggestCarDealershipWithin(Municipality municipality);&#xA;auto dealer_name = findBiggestCarDealershipWithin(thisTown);&#xA;if (dealer_name.has_value()) {&#xA;    std::cout &amp;lt;&amp;lt; &amp;quot;The bigest dealership is &amp;quot; &amp;lt;&amp;lt; dealer_name &amp;lt;&amp;lt; '.\n';&#xA;}&#xA;else {&#xA;    std::cout &amp;lt;&amp;lt; &amp;quot;Sorry, Nobody sells cars around here.\n&amp;quot;;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The question asked for a single name, but there is &lt;em&gt;no name&lt;/em&gt; that would be a truthful answer to the question. The function must be able to return a any valid name, &lt;em&gt;or&lt;/em&gt; a special value that means &amp;quot;no such dealer exists.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;In a language that doesn't have &lt;code&gt;optional&lt;/code&gt;, The function would written to return a reference to a string or a pointer to a string; and a &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;nil&lt;/code&gt; reference/pointer would serve as the special value.&lt;/p&gt;&#xA;" OwnerUserId="1269" LastEditorUserId="1269" LastEditDate="2021-06-17T14:46:50.007" LastActivityDate="2021-06-17T14:46:50.007" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6981" PostTypeId="2" ParentId="6977" CreationDate="2021-06-17T14:54:59.243" Score="6" Body="&lt;p&gt;I explain the concept by mysteriously showing this image as a prop:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/NK3Qy.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/NK3Qy.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It always gets a laugh, which is nice :)&lt;/p&gt;&#xA;&lt;p&gt;Though, really, this image (which I haven't found before) might lead to a richer discussion:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/T9M2J.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/T9M2J.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;What I follow with is examples with arrays, along the lines of the following, and have students discuss in small groups what will work and what won't.  We then go over it as a whole group.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int[] arr;&#xA;System.out.println(arr);&#xA;System.out.println(arr.length);&#xA;System.out.println(arr[0]);&#xA;&#xA;int[] arr = null;&#xA;System.out.println(arr);&#xA;System.out.println(arr.length);&#xA;System.out.println(arr[0]);&#xA;&#xA;int[] arr = new int[0];&#xA;System.out.println(arr);&#xA;System.out.println(arr.length);&#xA;System.out.println(arr[0]);&#xA;&#xA;int[] arr = new int[1];&#xA;System.out.println(arr);&#xA;System.out.println(arr.length);&#xA;System.out.println(arr[0]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-06-17T14:54:59.243" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6982" PostTypeId="2" ParentId="6977" CreationDate="2021-06-17T19:45:31.050" Score="0" Body="&lt;p&gt;The idea of a &lt;em&gt;number&lt;/em&gt; zero and null are orthogonal, actually. A machine (such as an automobile) can be in the forward, reverse or neutral(null) state. Perhaps &amp;quot;off&amp;quot; is a better metaphor for null here.&lt;/p&gt;&#xA;&lt;p&gt;A contract can be &amp;quot;in force&amp;quot; or &amp;quot;null and void&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Laws can be nullified by courts.&lt;/p&gt;&#xA;&lt;p&gt;A win in an athletic contest can be made null by, for example, a doping agency.&lt;/p&gt;&#xA;&lt;p&gt;Most ancient cultures had no concept of zero as a number. There is no Roman Numeral for zero, of course. Money owed is a credit to one party and a debit to the other, but zero has no place since there is nothing owed.&lt;/p&gt;&#xA;&lt;p&gt;In the debit/credit example, the debit and credit are always &amp;quot;in balance&amp;quot;. Number can be introduced by saying that the &amp;quot;net&amp;quot; is zero.&lt;/p&gt;&#xA;&lt;p&gt;While the two ideas are orthogonal, they might be said to intersect at zero.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-06-17T20:19:02.043" LastActivityDate="2021-06-17T20:19:02.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6983" PostTypeId="1" CreationDate="2021-06-18T14:05:23.120" Score="2" ViewCount="103" Body="&lt;p&gt;I'm looking for a multiple-choice assessment to determine the efficacy of an introductory CS program. Preferably validated with some research and free to use but both of those requirements are flexible. Something language agnostic like the &lt;a href=&quot;https://dl.acm.org/doi/10.1145/3374135.3385321&quot; rel=&quot;nofollow noreferrer&quot;&gt;SCS1&lt;/a&gt; would be preferred though I've had difficulty getting access to the text of that assessment.&lt;/p&gt;&#xA;" OwnerUserId="10696" OwnerDisplayName="williambell" LastActivityDate="2021-06-19T20:02:41.773" Title="Is there a free to use validated Computer Science concept inventory?" Tags="|assessment|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6984" PostTypeId="2" ParentId="6907" CreationDate="2021-06-19T14:36:56.960" Score="1" Body="&lt;p&gt;I would like to mention some sites, books, and YouTube which I found for Golang:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Static Sites&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Effective Go is an official resource which is available for free from the official Go website &lt;a href=&quot;https://golang.org/doc/effective_go.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://golang.org/doc/effective_go.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Go by Example is a website with the most common examples &lt;a href=&quot;https://gobyexample.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gobyexample.com&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;the Golang FAQ section &lt;a href=&quot;https://golang.org/doc/faq&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://golang.org/doc/faq&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;YouTubes and Video sites&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/c/toddmcleod-learn-to-code/playlists&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/c/toddmcleod-learn-to-code/playlists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://gameswithgo.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gameswithgo.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Books&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Head First Go by Jay McGavren&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1491969555&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Head-First-Go-Jay-McGavren/dp/1491969555&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;An Introduction To Programming in Go by Caleb Doxsey&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.golang-book.com/books/intro&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.golang-book.com/books/intro&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Go in Action by Brian Ketelsen, Erik Saint Martin, and William Kennedy&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1617291781&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;a free online book on how to get started on Go &lt;a href=&quot;http://www.golangbootcamp.com/book/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.golangbootcamp.com/book/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;there are many more resources which we can search online...&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-06-19T14:36:56.960" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6985" PostTypeId="2" ParentId="6977" CreationDate="2021-06-19T16:33:35.063" Score="3" Body="&lt;p&gt;When you fill a form, and in the AGE field, you leave it empty THAT IS NULL.&#xA;If you instead of leaving it empty, you fill it with 0 (zero) THAT IS ZERO&lt;/p&gt;&#xA;" OwnerUserId="10697" LastActivityDate="2021-06-19T16:33:35.063" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6986" PostTypeId="2" ParentId="6983" CreationDate="2021-06-19T20:02:41.773" Score="1" Body="&lt;p&gt;Check &lt;a href=&quot;https://teachcomputing.org/curriculum/key-stage-4&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://teachcomputing.org/curriculum/key-stage-4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Perhaps Algorithms 1-2 is what matches best your request. Though it's assessments are mixed, not just MC, and Python-inspired.&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2021-06-19T20:02:41.773" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6987" PostTypeId="1" CreationDate="2021-06-21T04:58:32.913" Score="0" ViewCount="37" Body="&lt;p&gt;What could be good resources to teach Natural language Processing to Undergraduate students?&lt;/p&gt;&#xA;&lt;p&gt;I am using python as medium.&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-06-21T04:58:32.913" Title="Good resources to teach Natural Language Processing" Tags="|undergraduate|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="6988" PostTypeId="2" ParentId="6977" CreationDate="2021-06-21T11:18:21.503" Score="3" Body="&lt;h2&gt;Option 1: Scores&lt;/h2&gt;&#xA;&lt;p&gt;Arsenal is going to play Real Madrid tomorrow. What is their score today?&lt;/p&gt;&#xA;&lt;p&gt;Focus on the difference between a match which concluded 0-0 and a match which has not been played yet. For the latter, the score is &lt;strong&gt;non-existant&lt;/strong&gt;, which is what &lt;code&gt;null&lt;/code&gt; represents.&lt;/p&gt;&#xA;&lt;p&gt;In general, focus on examples where &lt;strong&gt;zero has meaning and is not synonymous with an absence&lt;/strong&gt;. A score is a great example because a 0 is a meaningful value which indicates an achieved result, as opposed to not having a result.&lt;/p&gt;&#xA;&lt;p&gt;Even in the toilet paper answer Ben I posted here, I suspects students will still answer the question &amp;quot;how many sheets are there on the roll?&amp;quot; with 1/0/0/0 respectively, rather than failing to answer the question because there is no roll or no roll holder.&lt;/p&gt;&#xA;&lt;p&gt;Human minds can account for badly posed questions in a way that logical algorithms cannot, and this is precisely why it's so hard for your students to understand that a compiler does not &amp;quot;think&amp;quot; they same way they do.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Option 2: Simulating a real-world exception&lt;/h2&gt;&#xA;&lt;p&gt;The way I was taught &lt;code&gt;null&lt;/code&gt; also worked well, in my opinion.&lt;/p&gt;&#xA;&lt;p&gt;The teacher picked a volunteer, and told them the following:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I want you to go to the end of the hall, in the storeroom. There is a piano in there. I want you to tell me how many keys it has. When you return and walk in, give me the answer, nothing more.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;When the student left, the teacher discussed with the class what they expected his answer to be. The main point to establish here was to get the class to agree that they were going to respond with a &lt;strong&gt;number&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When the student returned, their answer was, unsurprisingly:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I couldn't find a piano in the storeroom.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And this is in my opinion a really good example of what an exception (and in this particular case a null reference exception) is.&lt;/p&gt;&#xA;&lt;p&gt;The teacher then posed some hypotheticals to the student.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What would you have said if this was in the room?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ztn3qm.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ztn3qm.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And the student said &lt;strong&gt;17&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What would you have said if this was in the room?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/t3rKCm.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/t3rKCm.jpg&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And the student said &lt;strong&gt;0&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;And then the teacher asked why he didn't say 0 when he walked in. The obvious answer being:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Because there was no piano.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It was one of the better ways I've seen &lt;code&gt;null&lt;/code&gt; explained to a bunch of laymen. It still sticks with me to this day, while also (tangentially) explaining exactly what the purpose of an exception is as opposed to a return value.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2021-06-21T11:29:39.740" LastActivityDate="2021-06-21T11:29:39.740" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6989" PostTypeId="2" ParentId="6633" CreationDate="2021-06-21T12:16:59.230" Score="0" Body="&lt;p&gt;Trying to learn computer science by reading a list of concepts is like trying to learn a language by reading a dictionary. It's not the right tool for the job.&lt;/p&gt;&#xA;&lt;p&gt;A practical example, I have little to no English skill, so I'll start reading the dictionary.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;aardvark&lt;/strong&gt; - &lt;em&gt;noun&lt;/em&gt;&lt;br /&gt;&#xA;a nocturnal badger-sized burrowing mammal of Africa, with long ears, a tubular snout, and a long extensible tongue, feeding on ants and termites.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Wait, what does &amp;quot;nocturnal&amp;quot; mean?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;nocturnal&lt;/strong&gt; - &lt;em&gt;adjective&lt;/em&gt;&#xA;done, occurring, or active at night.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Wait, what does &amp;quot;occurring&amp;quot; mean?&lt;/p&gt;&#xA;&lt;p&gt;We're now several levels deep, and yet we still haven't gotten around to understanding what an aardvark is, because we still don't know what &amp;quot;mammal&amp;quot; or &amp;quot;tubular&amp;quot; means, which will requires further expeditions into the dictionary.&lt;/p&gt;&#xA;&lt;p&gt;A list of CS concepts, much like a dictionary, is a great tool for a &lt;strong&gt;targeted&lt;/strong&gt; lookup, i.e. you're looking for a specific bit of knowledge and you already understand the surrounding context and related concepts.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I'm not sure what I should prioritize or what order to revise in&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is precisely the difficulty with the way you're trying to approach your learning experience.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Probably wrong place to ask, but I wish I could have a checklist, because current approach of doing things on websites is not helping me.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;To be honest, this is simply showcasing the value of having a teacher-driven learning experience, and why a wiki can't outright replace a school.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;And looking for tutors online they only seem to tutor in one thing.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;People who have many skills, and a very specific group of skills that are all relevant to you, are harder to come by. To be fair, most schools don't have one teacher teaching the entire curriculum either.&lt;/p&gt;&#xA;&lt;p&gt;This generally stops after elementary/primary school, where the level of required knowledge is much greater than what one teacher can feasibly manage.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you are truly happy with a list, and all of the additional legwork involved in figuring things out for yourself, then you could even refer to resources like Wikipedia.&lt;/p&gt;&#xA;&lt;p&gt;But if you want to learn more efficiently and without the hard effort that autodidacticism requires, I suggest you focus on either a teacher-driven course, or tutorials on specific topics (whether with an in-person tutor or online tutorials).&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2021-06-21T12:16:59.230" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6990" PostTypeId="2" ParentId="5204" CreationDate="2021-06-22T03:58:01.653" Score="0" Body="&lt;p&gt;Today kids have probably been computer-savvy with video games, smartphones, tablets, and other electronics from a young age. They might also have started to express an interest in learning how to code and program their own games. But, is this a good idea, and you should allow young kids to jump into coding.&lt;/p&gt;&#xA;&lt;p&gt;Kids as young as 7 years of age can start coding and learning programming basics. In fact, coding for kids has gained popularity rapidly in recent years as the technology becomes increasingly part of everyday life. Kids who learn to code when they’re young can set themselves up for a lifetime of opportunities for success.&#xA;In fact, many of the FunTech coding summer camps and term-time courses with involve programming, are focused on game development.&lt;/p&gt;&#xA;&lt;p&gt;Since they can start grasping concepts from the age of 7. I recommend 7 years of age to be a good head start for both whether they learn alone or with their parent.&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-06-22T03:58:01.653" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6991" PostTypeId="2" ParentId="6507" CreationDate="2021-06-22T04:20:26.330" Score="1" Body="&lt;p&gt;&lt;strong&gt;Books:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The standard reference on Algorithmic Game Theory is the book by Nisan, Tardos, Roughgarden, and Vazirani.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Algorithmic Game Theory&#xA;&lt;a href=&quot;http://www.cambridge.org/journals/nisan/downloads/Nisan_Non-printable.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.cambridge.org/journals/nisan/downloads/Nisan_Non-printable.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Another book on AGT is by Kevin Leyton-Brown from UBC and Yoav Shoham from Stanford:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Multi-Agent Systems: Algorithmic, Game-Theoretic and Logical Foundations&lt;/p&gt;&#xA;&lt;p&gt;A free electronic copy has been made available by the authors as well:&#xA;&lt;a href=&quot;http://www.masfoundations.org/mas.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.masfoundations.org/mas.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I think there are half a dozen books by Roughgarden with &lt;strong&gt;&amp;quot;Twenty Lectures on Algorithmic Game Theory&amp;quot;&lt;/strong&gt; being one of the best books for beginners. All Books are available on amazon.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Courses:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you're interested in lecture notes and video lectures on Algorithmic Game Theory, then I would strongly urge you to have a look at Tim Roughgarden's course website:&lt;/p&gt;&#xA;&lt;p&gt;Algorithmic Game Theory (CS364A), Fall 2013&#xA;His lectures are amazing and surprisingly easy to grasp, especially considering the theoretical nature of the subject matter.&lt;/p&gt;&#xA;&lt;p&gt;There's also a sequel course on Mechanism Design if you're interested:&#xA;Frontiers in Mechanism Design (CS364B), Winter 2014&lt;/p&gt;&#xA;&lt;p&gt;If you're looking to brush up on a few game theory fundamentals you could go through the following two courses offered by Coursera:&lt;/p&gt;&#xA;&lt;p&gt;Introductory Course on Game Theory&#xA;&lt;a href=&quot;https://www.coursera.org/course/gametheory&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.coursera.org/course/gametheory&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Advanced Applications of Game Theory: Auctions and Social Choice Theory&#xA;&lt;a href=&quot;https://www.coursera.org/course/gametheory2&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.coursera.org/course/gametheory2&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10403" LastActivityDate="2021-06-22T04:20:26.330" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6992" PostTypeId="2" ParentId="6822" CreationDate="2021-06-23T01:47:30.187" Score="4" Body="&lt;p&gt;Stroustrup, Bjarne (May 2014) &amp;quot;Programming -- Principles and Practice Using C++&amp;quot; Addison-Wesley ISBN 978-0321-992789&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://stroustrup.com/programming.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://stroustrup.com/programming.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;1,000 pages. It will hurt. You will learn.&lt;/p&gt;&#xA;" OwnerUserId="6112" LastActivityDate="2021-06-23T01:47:30.187" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6993" PostTypeId="2" ParentId="6938" CreationDate="2021-06-25T14:27:44.877" Score="0" Body="&lt;p&gt;Flowcharts are useful to make sense of tangled code (i.e., pre-structured programming, see for examples Nijenhuis and Wilf's &lt;a href=&quot;https://www2.math.upenn.edu/%7Ewilf/website/CombAlgDownld.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Combinatorial Algorithms&amp;quot;&lt;/a&gt; (2nd edition 1978, Academic Press), careful exposition of complex code, written in FORTRAN (when it was still spelled that way). I'm not critisising the programs, they are brilliant examples of well-written code, just to very different standards (and in an area and at a time when short, fast code was at a premium). With today's structured programming languages (a handful of simple control structures you can nest and combine at will), pseudocode of some sort serves much the same purpose.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-06-25T14:27:44.877" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6994" PostTypeId="1" CreationDate="2021-06-27T05:05:02.377" Score="2" ViewCount="30" Body="&lt;p&gt;I am wondering about from where do I need to consult the upper said topics in a good depth in order to solve the questions intuitively. Please help me out in this regard. Please provide some video lectures from where I can learn this topics.&lt;/p&gt;&#xA;" OwnerUserId="10731" LastEditorUserId="10731" LastEditDate="2021-06-27T14:37:30.737" LastActivityDate="2021-06-27T14:37:30.737" Title="From where to study Query processing, Query optimization and Multiple Granularity protocol" Tags="|databases|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6995" PostTypeId="1" AcceptedAnswerId="6996" CreationDate="2021-06-29T06:49:16.057" Score="6" ViewCount="174" Body="&lt;p&gt;I'm looking at ways to improve assignments and reduce the amount of grading. Previously, there were two in-person lab classes with 15-20 students each week. Since Covid, there is now one online lab class with 40+ students each week. This course builds off a previous course where students learn basic Java programming (if statements, while loops, I/O, methods, and objects) and lead up to a more advanced course on data structures and sorting algorithms. It's meant to teach students object-oriented programming in Java by going into concepts such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Object-Oriented Design Principles&lt;/li&gt;&#xA;&lt;li&gt;JavaDoc&lt;/li&gt;&#xA;&lt;li&gt;Inheritance &amp;amp; Polymorphism&lt;/li&gt;&#xA;&lt;li&gt;Exception Handling&lt;/li&gt;&#xA;&lt;li&gt;GUI (Swing and JavaFx)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are currently 6 Java programming assignments (each worth ~2.5% for a total of 15% of their final grade). In each assignment, the student is expected to build a fully functional program that basically creates objects from and saves the objects back to a database (text file, random access file, and MySQL). The last 3 assignments build off of each other (I'm not sure if this should be kept or not).&lt;/p&gt;&#xA;&lt;p&gt;Another question was asked on how to automate grading (&lt;a href=&quot;https://cseducators.stackexchange.com/questions/1205/how-can-i-automate-the-grading-of-programming-assignments&quot;&gt;How can I automate the grading of programming assignments?&lt;/a&gt;) and the top answer suggests JUnit Testing, however, my students aren't introduced to JUnit testing until one of the last modules. I'm not sure if the Auto Grader is an option either because of our very limited budget, the size of the assignments, and pushback/criticism from other educators.&lt;/p&gt;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Larger class sizes, less class time.&lt;/li&gt;&#xA;&lt;li&gt;Completely online instead of face to face.&lt;/li&gt;&#xA;&lt;li&gt;6 large assignments with half of them building off of each other.&lt;/li&gt;&#xA;&lt;li&gt;Students aren't introduced to JUnit testing until the end of the course.&lt;/li&gt;&#xA;&lt;li&gt;Auto graders seem out of reach.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Questions&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How can I reduce the amount of grading for the assignments?&lt;/li&gt;&#xA;&lt;li&gt;How can the assignments be improved?&lt;/li&gt;&#xA;&lt;li&gt;Any other feedback to improve the assessments?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9960" LastEditorUserId="9154" LastEditDate="2021-06-30T04:29:01.443" LastActivityDate="2021-07-04T16:55:29.773" Title="Reduce Grading &amp; Improve Assignments" Tags="|programming|classroom-management|assessment|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6996" PostTypeId="2" ParentId="6995" CreationDate="2021-06-29T12:17:51.190" Score="4" Body="&lt;p&gt;One way that you could improve the output for the students (and thereby decrease the grading load on yourself) is to provide a sort of slapdash test-driven development.&lt;/p&gt;&#xA;&lt;p&gt;With each assignment, provide a guiding class with a runner.  In that runner, provide the tests you want the students to be able to pass, as well as intermediate tests, &lt;em&gt;in order&lt;/em&gt;.  Then comment out all of the tests.&lt;/p&gt;&#xA;&lt;p&gt;You don't need anything as complicated as JUnit.  Simple comments describing the output would be sufficient.&lt;/p&gt;&#xA;&lt;p&gt;Instruct students to uncomment each section one at a time, and then create enough code to pass the test.  If they ultimately cannot get everything working, they should submit the assignment with only as many sections uncommented as they can pass.&lt;/p&gt;&#xA;&lt;p&gt;Explain that, other than uncommenting, they may not make any other changes to the file you provide.&lt;/p&gt;&#xA;&lt;p&gt;This gives you complete compliance to an API and package system and a very good sense of what you're looking at as soon as you open their lab.  Your grading job has now become changing a few numbers or strings around to make sure that they didn't &amp;quot;cheat&amp;quot; the output that they claim to have achieved, and then reading through the code quickly for whatever else you see.&lt;/p&gt;&#xA;&lt;p&gt;I wouldn't personally make it a practice to hide any of the important tests, though that is your own choice.&lt;/p&gt;&#xA;&lt;p&gt;Here is a tiny, trivial example:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;    package planeLab;&#xA;&#xA;    public class PlaneRunner {&#xA;        public static void main(String[] args) {&#xA;            /*&#xA;            // Should output []&#xA;            PointPlane p = new PointPlane();&#xA;            System.out.println(p);&#xA;            // */&#xA;&#xA;            /*&#xA;            // Should output [(0,0)]&#xA;            p.addNode(new Point(0,0));&#xA;            System.out.println(p);&#xA;            // */&#xA;&#xA;            /*&#xA;            // Should output 17.071068&#xA;            p.addNode(new Point(5,5));&#xA;            p.addNode(new Point(0,5));&#xA;            System.out.println(p.allVertices());&#xA;            // */&#xA;&#xA;            /*&#xA;            // Should output 33.053326&#xA;            p.addNode(new Point(6,6));&#xA;            System.out.println(p.allVertices());&#xA;            // */&#xA;        }&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;em&gt;(Note that, along with the slapdash test-drive development approach here, there is also a slapdash way to easily uncomment sections.  The &lt;code&gt;// */&lt;/code&gt; allows you to legally comment out the preceding &lt;code&gt;/*&lt;/code&gt; line to pull a whole section back into live code.)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;As to the labs that build on one another, you can do it, but I would strongly suggest providing answers/starting points to students whose prior labs didn't come out well.  However, given the expense of providing an answer key to students, you might be better off just making the labs independent.&lt;/p&gt;&#xA;&lt;p&gt;That said, you can always provide starter code to accomplish similar goals for the last two labs in the set.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-06-30T12:05:45.580" LastActivityDate="2021-06-30T12:05:45.580" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="6997" PostTypeId="2" ParentId="6995" CreationDate="2021-06-29T22:08:40.967" Score="3" Body="&lt;p&gt;Here is a simple &amp;quot;runner&amp;quot; type of program that has the students practice recursion. &lt;a href=&quot;https://www.cs.colostate.edu/%7Efsieker/TestSemester/assignments/RECURSION/RECURSION.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cs.colostate.edu/~fsieker/TestSemester/assignments/RECURSION/RECURSION.html&lt;/a&gt;. The assignment consists of four Java files, only one of which is modified by the student. The four are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Shell.java - this is a shell-like program that takes a command from the keyboard, calls one method, and prints the result. The Shell program provides utilities to make it easy to enter arrays (String/int/double via CSVs) and easily produce empty and null values. The idea is to provide unit testing without JUnit. The actual tests can be entered via the keyboard or read from a text file. Processing commands from a file is the key to auto testing.&lt;/li&gt;&#xA;&lt;li&gt;Recursion.java is an abstract class that defines the signatures of the methods the students must implement. It also contains the processing for the commands of this assignment. It implements a help command to print a list of the commands and how to use each one.&lt;/li&gt;&#xA;&lt;li&gt;MyRecursion.java which is the starter file for the students to work on. They may use an IDE to generate stubs for each method. The student then has a fully functional program, albeit one that does not produce correct results. Thus, students can write and test one method at a time without having to comment out or uncomment code.&lt;/li&gt;&#xA;&lt;li&gt;SampleFile.java was a sample code to demonstrate how to use the Java File class. It is not actually part of the assignment but provided as an example.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The pattern of using Shell.java, XXX.java, and MyXXX.java was reused over many assignments, including those that build on previous assignments. However, it is not suitable for anything involving a GUI. A sample test file with answers was provided to the students to help with debugging the assignment. Testing required a separate text file with different test values.&lt;/p&gt;&#xA;&lt;p&gt;If you find this useful, let me know and I can provide additional information.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="9154" LastEditDate="2021-06-30T17:28:16.383" LastActivityDate="2021-06-30T17:28:16.383" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6998" PostTypeId="2" ParentId="6927" CreationDate="2021-07-01T08:18:55.730" Score="3" Body="&lt;p&gt;Back in 2017 I faced the exactly the same problem, except that it was MEAN.&#xA;So I bought the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1617294756&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Getting MEAN&amp;quot;&lt;/a&gt;. It had good reviews, probably the best review about MEAN. But then I found I didn't actually read the book too much because javascript changes so much every year that many things I read from the book may be obsoleted.&lt;/p&gt;&#xA;&lt;p&gt;Every time I read this article &lt;a href=&quot;https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;How it feels to learn JavaScript in 2016&amp;quot;&lt;/a&gt; I share the same feeling with the author &amp;quot;it is insane&amp;quot; and I keep coming back this article!&lt;/p&gt;&#xA;&lt;p&gt;But I will try to answer this question through my experience.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;express is relative stable, express remains in 4.x for couple of years, which is quite unusual in js world. I don't recommend books for express. Its website is good enough. Other knowledge about express may just gain from programming.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;To know express well, knowing node.js and its ecosystem is a must. When I learned nodejs back then I did buy the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/B079PZ2XY8&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Node.js 8 the Right Way&amp;quot;&lt;/a&gt; and borrowed the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1617290572&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Node.js in Action&amp;quot;&lt;/a&gt; But I will argue that no books about nodejs can keep up with the changes in nodejs world. So maybe just read the articles you google. But I notices I read a lot from &lt;a href=&quot;https://dev.to/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dev.to/&lt;/a&gt; , &lt;a href=&quot;https://2ality.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://2ality.com/&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://blog.logrocket.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://blog.logrocket.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Though my limited experience with MongoDB, I didn't like it at all, to me it is a poor product. There is old article called &lt;a href=&quot;https://pastebin.com/raw/FD3xe6Jt&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Don't use MongoDB&amp;quot;&lt;/a&gt; which I resonate a lot &amp;quot;if you're writing a toy site, or a prototype, something where developer productivity trumps all other considerations,it basically doesn't matter &lt;em&gt;what&lt;/em&gt; you use.  Use whatever gets the job done.&amp;quot; On quora there is a topic called &lt;a href=&quot;https://www.quora.com/How-much-credibility-does-the-post-Dont-use-MongoDB-have/answer/Ga%C3%ABtan-Voyer-Perrault?srid=uDt8&amp;amp;share=1&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;How much credibility does the post &amp;quot;Don't use MongoDB&amp;quot; have?&amp;quot;&lt;/a&gt; One of answers was provided by a guy called &lt;strong&gt;Gaëtan Voyer-Perrault&lt;/strong&gt;. He answered a lot question about MongoDB, for example you may check his answer &lt;a href=&quot;https://www.quora.com/Which-companies-have-moved-away-from-MongoDB-and-why-What-did-they-move-to/answer/Ga%C3%ABtan-Voyer-Perrault?share=1&amp;amp;srid=uDt8&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Which companies have moved away from MongoDB and why? What did they move to?&amp;quot;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Having said that I need to emphasize that it was based on my experience in 2017 &amp;amp; 2018. I don't how much has changed since then.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Knowing the concept of no-sql, key value store is probably equally important if someone wants to know mongo. So maybe you can teach your student redis. To learn redis I will recommend &amp;quot;redis in action&amp;quot;, it is free ebook you can read here &lt;a href=&quot;https://redislabs.com/ebook/redis-in-action/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://redislabs.com/ebook/redis-in-action/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Knowing modern javascript is the foundation, which I recommend &lt;a href=&quot;https://javascript.info/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://javascript.info/&lt;/a&gt;. When I started to learn js I remembered I thought about buying the book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1491952024&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;JavaScript: The Definitive Guide&amp;quot;&lt;/a&gt; But that book has 700 pages I remembered after seeing the page number I just gave it up. Reading 700 pages book to learn js is &amp;quot;just insane&amp;quot;. &amp;quot;eloquent javascript&amp;quot; is another popular book I see people recommend &lt;a href=&quot;https://eloquentjavascript.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://eloquentjavascript.net/&lt;/a&gt; but I only read &amp;quot;modern javascript&amp;quot;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A project not too simple and not complicated to tinker with is important. I remembered I played with this &lt;a href=&quot;https://github.com/OmarElGabry/chat.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/OmarElGabry/chat.io&lt;/a&gt; a lot, &amp;quot;A Real Time Chat Application built using Node.js, Express, Mongoose, Socket.io, Passport, &amp;amp; Redis.&amp;quot;  I also tried &lt;a href=&quot;https://www.meteor.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;meteor&lt;/a&gt; but I find it is too complicated for beginner and maybe not a good choice for a full stack app. But that is just my assessment.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;Some afterthought, to make a web app / website &lt;strong&gt;presentable&lt;/strong&gt;, knowing CSS is a must but when people talk about web programming I feel they mostly focus on javascript and don't pay enough attention to CSS. CSS requires a quite different skill set and I still don't have a clear idea about how much CSS knowledge is &lt;strong&gt;enough&lt;/strong&gt; for a programmer (but not for pro designers), &lt;strong&gt;programmer&lt;/strong&gt; as defined in &lt;a href=&quot;https://en.wikipedia.org/wiki/Programmer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Programmer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using a CSS framework is probably another must in 2021, but there are so many CSS frameworks out there it is hard to choose an appropriate one. I don't have an answer for CSS.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-12-28T07:45:33.710" LastActivityDate="2021-12-28T07:45:33.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6999" PostTypeId="2" ParentId="6995" CreationDate="2021-07-04T01:15:02.983" Score="5" Body="&lt;h3&gt;Autograding doesn't have to be all-or-nothing&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How can I reduce the amount of grading for the assignments?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The term &amp;quot;autograding&amp;quot; implies end-to-end work taking a zip file of submissions all the way to posting the completed grades onto your LMS via the API. I don't see the situation as all-or-nothing, and it seems like you'll only get so far without some automation.&lt;/p&gt;&#xA;&lt;p&gt;You can create small tools that automate the repetitive stuff, like downloading and organizing submissions and compiling them so they're all ready to go for hand-grading, if you don't already.&lt;/p&gt;&#xA;&lt;p&gt;For simple auto-grading, the only prerequisite is ensuring students adhere to input and output format guidelines, which is probably already done to help students understand the concept of delivering software that implements a specification and mitigating &amp;quot;works on my computer&amp;quot; or &amp;quot;guidelines weren't clear&amp;quot; excuses.&lt;/p&gt;&#xA;&lt;p&gt;If the project is command-line based, it shouldn't be hard to write a simple test suite, either one that uses the classes directly or works on I/O and runs subprocesses. It doesn't have to enforce everything and can assist spot checks to ensure usage of OOP concepts.&lt;/p&gt;&#xA;&lt;p&gt;MySQL increases the complexity a bit and is likely prohibitive to automate fully for you. However, depending on the nature of the assignment, something indirect like tearing down and respawning the solution process and wiping files between runs could validate that the student used the database without as much hassle as validating it directly. If you can establish that the correct I/O was emitted as a black box, you can grep or spot check the code by hand for the approproiate database calls.&lt;/p&gt;&#xA;&lt;p&gt;Assignments should be designed to avoid imposing artificial constraints such as prohibiting specific common language features. For example, in a database assignment, choose a task that's difficult to do with files and you won't need to waste time validating that students used a database. Tasks well-suited to a tool motivate the concept better.&lt;/p&gt;&#xA;&lt;p&gt;GUI programs are likely to stay hand-graded based on your circumstance, but a script that unzips and compiles all of the submissions seems like it'd give a nice boost and weed out early failures. You can also separate presentation from logic (as should be done anyway) and unit test the logic, then do a quick spot check on the GUI. I'm not sure how dominant GUI is in the projects.&lt;/p&gt;&#xA;&lt;p&gt;Many problems with student code can be found with smoke tests. My experience is most submissions are nearly totally successful, with a minor deduction or two, or totally crash and burn, with a handful of submissions in the middle. You can use your knowledge of the nature of your assignments to guide the amount and flavor of automation to pick the low-hanging fruit.&lt;/p&gt;&#xA;&lt;h3&gt;Provide harnesses&lt;/h3&gt;&#xA;&lt;p&gt;Offering simple harnesses as suggested in other answers is a great idea (essential, I'd say), but keep in mind that students don't need to understand all provided tools, they only need to be able to operate them as users. I've taken multiple classes where I never took the time to read or understand much of the provided test suite, some of which were &lt;a href=&quot;https://github.com/emichael/dslabs/blob/633785340430c00f008569cf6cf169fcbd37cbb2/labs/lab3-paxos/tst/dslabs/paxos/PaxosTest.java&quot; rel=&quot;nofollow noreferrer&quot;&gt;prohibitively complex&lt;/a&gt; or came in a binary.&lt;/p&gt;&#xA;&lt;h3&gt;Consider pushing JUnit forward&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;my students aren't introduced to JUnit testing until one of the last modules&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If your curriculum already covers JUnit, you might try to work that in as early as possible, then use it as a foundation for grading and validation through the rest of the course. If you provide the harnesses and boilerplate, these suites need not be &lt;em&gt;that&lt;/em&gt; much more complex than &lt;a href=&quot;https://cseducators.stackexchange.com/a/6996/9426&quot;&gt;Ben's plain file&lt;/a&gt;, and may even be simpler if you can arrange the boilerplate to be compilable out of the box and avoid potential syntax errors associated with commenting and uncommenting or otherwise messing with the test suite code.&lt;/p&gt;&#xA;&lt;p&gt;Unit testing is about as practical a skill as it gets, and it's unfortunate it wasn't a part of my undergraduate education. I only wrote unit tests after I started professional programming, and (as a client) from a coding challenge site &lt;a href=&quot;https://www.codewars.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codewars&lt;/a&gt;. If you check out the 7- and 8-kyu (easiest) kata (challenges) on Codewars, I think you'll find them on level for your students, yet they are driven by (mostly) understandable, simple test suites (the ones that aren't are generally sloppily written by the kata creator).&lt;/p&gt;&#xA;&lt;h3&gt;Promote collaboration&lt;/h3&gt;&#xA;&lt;p&gt;A graduate-level programming course I was a TA for permitted students to share test harnesses and test cases on the class discussion board. This increased collaboration and happiness in the class and made it easier for students to validate their work.&lt;/p&gt;&#xA;&lt;p&gt;Students that sought feedback on why their submissions failed were typically met with &amp;quot;did you run your code against the student-curated test suite?&amp;quot; Almost inevitably, they hadn't, and doing so led them to see their failing test cases and the power of collective effort.&lt;/p&gt;&#xA;&lt;p&gt;This doesn't seem as feasible for CS101B-level students who aren't accustomed to whipping up tests on a dime, though, but there could be a useful variant specific to your case that provides a win-win for students while cutting back on your work.&lt;/p&gt;&#xA;&lt;h3&gt;Other suggestions/thoughts&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How can the assignments be improved?&lt;/p&gt;&#xA;&lt;p&gt;Any other feedback to improve the assessments?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It's hard to say based on a high-level description alone, so these ideas might be wildly inapplicable.&lt;/p&gt;&#xA;&lt;p&gt;You mention &amp;quot;There are currently 6 Java programming assignments (each worth ~2.5% for a total of 15% of their final grade&amp;quot;. Assuming the traditional cutoffs of 70/80/90 C/B/C, a student can get a B in the class without doing any of the programming assignments? I had this arrangement in two graduate-level classes on algorithms and data analytics which were weighted heavily on exams, but for a CS101B-level class, this is surprising. It's been a few years since my last experience with such a class so maybe I'm out of the loop. I typically expect to see projects at about 50-60% and exams 30-50% with some occasional filler for participation and quizzes at 0-10%. It could be that written homework assignments are a decent chunk of the projects portion of the pie, but that should still leave projects 30% or so.&lt;/p&gt;&#xA;&lt;p&gt;It's interesting that you're asking for guidance with something that's a small fraction of the class yet seems to consume a disproportionate amount of your time, and presumably your students' time as well. If your students are investing as much time on these projects as you seem to be, the weight should reflect that.&lt;/p&gt;&#xA;&lt;p&gt;You mention you have 3 assignments that build in sequence: text file to random access file to MySQL. I'd probably skip the random access file and go straight to the database. It's much more practical, and I think students might tire of iterating on the same thing too much.&lt;/p&gt;&#xA;&lt;p&gt;Although files and databases are related in that they persist data, they're also unrelated in that they solve fundamentally different problems. I'd caution against trying too hard to create an artificial narrative as series projects sometimes do.&lt;/p&gt;&#xA;&lt;p&gt;As much as I like databases and files, they're a bit dry, more means to and end than anything, so I try to integrate them into fun projects like games or social apps when possible, sneaking vegetables into the pizza.&lt;/p&gt;&#xA;&lt;p&gt;In general, serial or long-term projects seem potentially divisive. I love a semester-long or serial project if it's something I'm invested in (usually because I had some control in picking it), but if I'm not, it tends to have the opposite effect. I associate long-term projects with upper-level courses where students have more agency and cohorts are smaller.&lt;/p&gt;&#xA;&lt;p&gt;Regarding autograders, &amp;quot;pushback/criticism from other educators&amp;quot; is an interesting remark. I'd be curious to hear more. A CS101B-level Python course I took at a community college in 2016 had a homebrew service that the instructor wrote which he used to grade assignments. Students submitted their assignment code after SSHing into the college server. I suspect the resistance and frustration expressed by some students was due to low technical sophistication, but also feeling like it was an alienating, robotic and inhumane way to run a class (oh, the irony) -- the professor didn't even look at my code before flunking it! One student called the instructor something to the effect of a pretentious geek before dropping the class.&lt;/p&gt;&#xA;&lt;p&gt;In hindsight, the professor hadn't done anything particularly shocking to an experienced programmer, and making students use SSH and the command line should have been seen by them as part of the programming knowledge skillset they were there to learn, so maybe the problem was creating the correct narrative behind the tool. I can see fellow educators being resistant to tooling as well for various reasons, but I also suspect we're all more comfortable with automation in education than we were in 2016, for better or worse.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2021-07-04T16:55:29.773" LastActivityDate="2021-07-04T16:55:29.773" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7000" PostTypeId="1" CreationDate="2021-07-07T09:49:00.237" Score="4" ViewCount="82" Body="&lt;p&gt;Often, I find it useful to teach some Python to students. In-person classes are easy in this regard, I can just go to &lt;a href=&quot;https://colab.research.google.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;colab.research.google.com&lt;/a&gt; and show them the concepts there. (It requires no technical knowledge to use it, that's why I prefer that over locally-run Jupyter notebooks.)&lt;/p&gt;&#xA;&lt;p&gt;Despite the claim that it is good for collaborative working, it does not update live as I write content in those notebooks, as Google Jamboard would, for example.&lt;/p&gt;&#xA;&lt;p&gt;Are there websites that provide Jupyter notebooks (with Python 3 backend) which I could use to work with students in real-time? By real-time, I mean that I want my students to see what I have written in a cell within a second at most.&lt;/p&gt;&#xA;" OwnerUserId="10754" LastEditorUserId="9154" LastEditDate="2021-08-08T14:32:52.037" LastActivityDate="2021-08-08T14:32:52.037" Title="Which websites provide real-time updated Jupyter notebooks for Python teaching?" Tags="|python|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7001" PostTypeId="2" ParentId="7000" CreationDate="2021-07-08T01:31:34.760" Score="3" Body="&lt;p&gt;I'm not terrifically familiar Jupyter notebooks.  I've only used them a few times myself, and I didn't realize that any of them could support simultaneous editing as you've described.&lt;/p&gt;&#xA;&lt;p&gt;However, &lt;a href=&quot;https://cocalc.com/doc/jupyter-notebook.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;cocalc&lt;/a&gt; appears to be able to do what you need, though it is a paid tool.  (Personally, I enjoy supporting companies that make really good tools, though I understand that others may feel differently about using paid software.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-07-08T01:31:34.760" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7002" PostTypeId="2" ParentId="6978" CreationDate="2021-07-10T20:00:26.570" Score="1" Body="&lt;p&gt;In my experience, engineers, statisticians and programmers will not use spreadsheets, they will use programming in languages such as R, python or matlab instead. To me it makes sense to spend a few hours teaching the basics of a spreadsheet app in high school so that students will know that it exists and will feel confident to learn more advanced usage if they need to. But the emphasis should be on teaching programming, which is much more powerful and less likely to be self-taught.&lt;/p&gt;&#xA;" OwnerUserId="10780" LastActivityDate="2021-07-10T20:00:26.570" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7003" PostTypeId="1" CreationDate="2021-07-11T16:11:59.100" Score="4" ViewCount="102" Body="&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Amortized_analysis&quot; rel=&quot;nofollow noreferrer&quot;&gt;Amortized analysis&lt;/a&gt; is often taught in algorithms classes, with the different &lt;em&gt;methods&lt;/em&gt; (aggregate, accounting, potential). It is &lt;em&gt;very important&lt;/em&gt; when discussing some data structures and their use in algorithms since worst-case analysis is sometimes quite far from the actual behavior.&lt;/p&gt;&#xA;&lt;p&gt;My question is: Where is an amortized analysis used, &lt;strong&gt;not&lt;/strong&gt; related to data structures?&lt;/p&gt;&#xA;&lt;p&gt;Two points to clarify what I mean by &lt;em&gt;not related to data structures&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Amortized analysis can be used to analyze &lt;a href=&quot;https://en.wikipedia.org/wiki/Kruskal%27s_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kruskal's algorithm&lt;/a&gt;, but it is very much related to data structure: the amortized aspect is related to the &lt;em&gt;union-find&lt;/em&gt; data structure.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Euclidean_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Euclidean algorithm&lt;/a&gt; to compute the gcd of two integers &lt;span class=&quot;math-container&quot;&gt;$a$&lt;/span&gt; and &lt;span class=&quot;math-container&quot;&gt;$b$&lt;/span&gt; can be analyzed through amortized analysis: though some step decreases &lt;span class=&quot;math-container&quot;&gt;$b$&lt;/span&gt; only by one unit, it actually decreases by a constant factor &lt;em&gt;in average&lt;/em&gt;. &lt;em&gt;Cf.&lt;/em&gt; for instance &lt;a href=&quot;http://www.lirmm.fr/%7Egrenet/publis/GV20.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;this paper&lt;/a&gt; (&lt;em&gt;caveat: I am one of the authors&lt;/em&gt;) that uses a potential function or the analysis in Knuth's book. I consider that this is amortized analysis not related to the data structure.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Of course, the border between &lt;em&gt;related to data structure&lt;/em&gt; and &lt;em&gt;not related to data structure&lt;/em&gt; is probably ill-defined. A more precise version of my question could then be: What are examples of amortized analysis of algorithms, that are least related to data structure?&lt;/p&gt;&#xA;" OwnerUserId="10594" LastEditorUserId="9154" LastEditDate="2021-08-22T18:12:28.530" LastActivityDate="2021-08-22T18:12:28.530" Title="Example of amortized analysis of algorithms rather than data structures" Tags="|algorithms|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7004" PostTypeId="1" CreationDate="2021-07-12T06:11:37.917" Score="1" ViewCount="55" Body="&lt;p&gt;&lt;a href=&quot;https://gateoverflow.in/43294/gate-cse-2013-question-53&quot; rel=&quot;nofollow noreferrer&quot;&gt;Here&lt;/a&gt; is a question that was asked in the GATE CS examination. It asks to find the number of bits required to color the pages to remove the problem of aliasing in VIPT caches. My peers out there suggested me the &lt;a href=&quot;https://www.udacity.com/course/high-performance-computer-architecture--ud007?fbclid=IwAR0HxrF_fQ63AgsYSYlgJtcRgY4m1xP5kWFE0TD1zxTC98JuGHQTZewG6Os&quot; rel=&quot;nofollow noreferrer&quot;&gt;HPCA course by Georgia Tech&lt;/a&gt;. The lectures there explain the problem of aliasing and deal with the situation where one allows the cache size to be small enough. But here in this question in the exam, there is no bound to the size of the cache, and the number of bits for page coloring is given by :&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$$\text{Bits for coloring = No. of bits in index and block offset part of virtual address}$$&lt;/span&gt;&lt;span class=&quot;math-container&quot;&gt;$$\text{- No. of bits used for page offset}$$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Actually, these are the bits that undergo a change during virtual address translation to a physical address. These virtual address bits used for indexing into the cache can cause two different virtual addresses which map to the same physical memory frame to map to different cache blocks.&lt;/p&gt;&#xA;&lt;p&gt;But what I do not understand is how the concept of page coloring [using as many bits as we calculated above] the main memory frames removes this problem of aliasing? Please can anyone suggest to me some resource (preferably a video resource) that explains this concept in detail possibly taking examples?&lt;/p&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastEditorUserId="9154" LastEditDate="2021-07-17T08:40:32.737" LastActivityDate="2021-07-17T08:40:32.737" Title="Resource (preferably video) explaining working of page coloring in details to solve problem of aliasing in Virtually Indexed Physically Tagged caches" Tags="|self-learning|resource-request|architecture|operating-systems|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7005" PostTypeId="1" AcceptedAnswerId="7028" CreationDate="2021-07-12T06:44:07.167" Score="0" ViewCount="267" Body="&lt;p&gt;What are the popular books for teaching CS in high schools in the USA?&lt;/p&gt;&#xA;&lt;p&gt;The programming language doesn't matter.&lt;/p&gt;&#xA;&lt;p&gt;I'm asking because I'm looking for more exercises to give to my students.&lt;/p&gt;&#xA;&lt;p&gt;I am a CS teacher not in the USA, and I want to expand the variety of my books.&lt;/p&gt;&#xA;&lt;p&gt;In my country, there is one company whose books almost all high schools learn with for CS.&lt;/p&gt;&#xA;&lt;p&gt;I am looking for a CS books recommendation. What's common in the USA high schools.&lt;/p&gt;&#xA;" OwnerUserId="10782" LastEditorUserId="1293" LastEditDate="2021-07-18T11:30:55.663" LastActivityDate="2021-07-30T22:03:52.640" Title="Recommended CS books for high school" Tags="|textbook|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7007" PostTypeId="2" ParentId="6699" CreationDate="2021-07-15T10:53:08.230" Score="1" Body="&lt;p&gt;Now I have another favorite example called &amp;quot;Buy Low, Sell High&amp;quot;, all the credit go to this article &lt;a href=&quot;https://realpython.com/numpy-array-programming/#buy-low-sell-high&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://realpython.com/numpy-array-programming/#buy-low-sell-high&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Given a stock’s price history as a sequence, and assuming that you are only allowed to make one purchase and one sale, what is the maximum profit that can be obtained? For example, given prices = (20, 18, 14, 17, 20, 21, 15), the max profit would be 7, from buying at 14 and selling at 21.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There are some challenges  to the high school kids, e.g. some came up with an idea to do it in 2 loops, first find the min then  the max or just 1 loop to find max &amp;amp; min. But what if max comes before min ? And the solution there as &amp;quot;find the difference between each price and a running minimum (element-wise), and then take the max of this sequence&amp;quot; is quite clever.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-07-16T03:36:25.927" LastActivityDate="2021-07-16T03:36:25.927" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7010" PostTypeId="2" ParentId="7003" CreationDate="2021-07-20T21:32:26.367" Score="1" Body="&lt;p&gt;Amortized analysis is appropriate to analyse a &lt;em&gt;sequence&lt;/em&gt; of operations. That is where your &amp;quot;data structure&amp;quot; bent comes into the picture. Your example of the analysis of the Euclidean algorithm is a case in point: You analyse the behaviour of a sequence of non-trivial operations on a very simple data structure (two elements).&lt;/p&gt;&#xA;&lt;p&gt;In any case, Jeff Erickson (of &lt;a href=&quot;https://jeffe.cs.illinois.edu/teaching/algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms&lt;/a&gt; fame) said he hasn't used his amortized analysis notes for quite some time.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-07-20T21:32:26.367" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7011" PostTypeId="2" ParentId="4232" CreationDate="2021-07-20T21:44:30.177" Score="1" Body="&lt;p&gt;In his &lt;a href=&quot;https://jeffe.cs.illinois.edu/teaching/algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms&lt;/a&gt; Jeff Erickson discusses and analyses a similar variant, which he calls &lt;em&gt;binary search&lt;/em&gt; (a terrible name, if you ask me): For a table of size a power of 2 when searching for key &lt;span class=&quot;math-container&quot;&gt;$k$&lt;/span&gt;, the idea is to check positions &lt;span class=&quot;math-container&quot;&gt;$h(k) \oplus r$&lt;/span&gt;, where &lt;span class=&quot;math-container&quot;&gt;$\oplus$&lt;/span&gt; is bit-by-bit exclusive or and &lt;span class=&quot;math-container&quot;&gt;$r$&lt;/span&gt; is the number of the try. It shares the benefit of quadratic probing that the probe sequence depends on the start point &lt;span class=&quot;math-container&quot;&gt;$h(k)$&lt;/span&gt; (not just the fact that the search landed there, thus avoiding primary clustering), it searches all the table (modulo a prime &lt;span class=&quot;math-container&quot;&gt;$m$&lt;/span&gt; --table size-- just half the positions are squares, so quadratic search will only look at half the table), and it has much better locality (it looks at an expanding window into the table).&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-07-20T21:44:30.177" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7013" PostTypeId="1" CreationDate="2021-07-24T08:01:09.447" Score="5" ViewCount="166" Body="&lt;p&gt;I grew up using an Apple IIe computer and I liked several things about it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It had no Internet access&lt;/li&gt;&#xA;&lt;li&gt;It had cool creative apps like Print Shop that I used to make stories and pamphlets&lt;/li&gt;&#xA;&lt;li&gt;It had Turtle LOGO which I noodled around with for hours at a time&lt;/li&gt;&#xA;&lt;li&gt;It had BASIC which I learned to program with&lt;/li&gt;&#xA;&lt;li&gt;It had cool educational games like Oregon Trail and Number Munchers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I'd like to construct a similar computer for my 4-year-old son. Minimally, I'd like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A locked-down UI that only permits him to use the applications I've set up&lt;/li&gt;&#xA;&lt;li&gt;A word processor that can print booklets for him to write his stories&lt;/li&gt;&#xA;&lt;li&gt;A vastly simplified UI, such as no formatting options on the word processor&lt;/li&gt;&#xA;&lt;li&gt;Modern graphics (colors, resolution, etc.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The nice-to-haves are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A Turtle LOGO application&lt;/li&gt;&#xA;&lt;li&gt;A real-time programming language interpreter&lt;/li&gt;&#xA;&lt;li&gt;DOSBox games&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Are there any products or projects like this, or groups of products or projects that I can stitch together? It seems like it would be a common thing to seek -- an airgapped kid's computer with enriching capabilities -- but my search to date has been unfruitful.&lt;/p&gt;&#xA;&lt;p&gt;I would be willing to pay $20 per month for something like this.&lt;/p&gt;&#xA;" OwnerUserId="10809" LastActivityDate="2021-07-30T10:47:36.787" Title="Educational kiosk-mode DOS or Apple II-style computer built on modern hardware?" Tags="|classroom-infrastructure|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7014" PostTypeId="2" ParentId="7013" CreationDate="2021-07-24T14:19:24.017" Score="3" Body="&lt;p&gt;What about something like an ipad in airplane mode?  You can use downloadable scratch, some drawing programs, and otherwise set up the device however you'd like.&lt;/p&gt;&#xA;&lt;p&gt;You would have to connect to USB or wifi to print, of course, but I imagine that, after putting a bit of time and effort into the setup, you will be able to get much of what you want in a device that your kid will find very appealing.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-07-24T14:19:24.017" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7015" PostTypeId="2" ParentId="7013" CreationDate="2021-07-24T20:45:24.100" Score="2" Body="&lt;p&gt;How about porteusKiosk&#xA;&lt;a href=&quot;https://porteus-kiosk.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://porteus-kiosk.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I think you can install the OS on first boot, where you have to set up everything the user should be able to use (and wifi passwords, etc) because it snapshots this image when firstly 'shutting down' and reloads it every boot to have a clean and 'self repairing' system.&lt;/p&gt;&#xA;&lt;p&gt;I don't have any first-hand experience, but i let someone explain it to me who used it on our school.&lt;/p&gt;&#xA;&lt;p&gt;Storing data would at best, (hopefully) work if thumb-drives are beeing used - since the system is self-resetting.&lt;/p&gt;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="10812" LastActivityDate="2021-07-24T20:45:24.100" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7016" PostTypeId="2" ParentId="6965" CreationDate="2021-07-26T07:48:56.547" Score="1" Body="&lt;p&gt;Machine Learning for Kids is a resource for teaching ML to school age students that I have recently been playing around with. &lt;a href=&quot;https://machinelearningforkids.co.uk/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://machinelearningforkids.co.uk/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It includes a range of projects that students can complete in Scratch, Python or App Inventor which range in challenge level.&lt;/p&gt;&#xA;&lt;p&gt;There is also a book you can buy but it is possible to use the site without the book.&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-26T07:48:56.547" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7017" PostTypeId="2" ParentId="6844" CreationDate="2021-07-26T07:57:21.577" Score="1" Body="&lt;p&gt;Some basic SQL is there. Look under 2.2.3 Additional programming techniques. They also need to know about SQL injection for the network security topic.&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-26T07:57:21.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7018" PostTypeId="2" ParentId="6429" CreationDate="2021-07-26T08:10:15.007" Score="1" Body="&lt;p&gt;Recently I've been reading through Richard Pawson's book on functional programming aimed at A-Level teaching. I teach the subject at A-Level so I'm always on the lookout for good resources. So far (I have read as far as chapter 6) it is the best explanation of FP I have come across. It comes with 60 exercises and an EAD which students can write their answers in. It is available to download here &lt;a href=&quot;https://community.computingatschool.org.uk/resources/5975/single&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://community.computingatschool.org.uk/resources/5975/single&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-26T08:10:15.007" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7019" PostTypeId="2" ParentId="6836" CreationDate="2021-07-26T09:37:04.493" Score="1" Body="&lt;p&gt;W3Schools have exercises that go up in small steps that go along with their tutorials &lt;a href=&quot;https://www.w3schools.com/html/exercise.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.w3schools.com/html/exercise.asp&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;For some project based exercises Raspberry Pi is good and I've used these in the classroom &lt;a href=&quot;https://projects.raspberrypi.org/en/projects/?software%5B%5D=html-css-javascript&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://projects.raspberrypi.org/en/projects/?software[]=html-css-javascript&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-26T09:37:04.493" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7021" PostTypeId="1" CreationDate="2021-07-29T10:55:06.157" Score="0" ViewCount="173" Body="&lt;p&gt;Is there any textbook you would recommend as appropriate for preparing a Web Programming college course? I would prefer a book that comes with sets of exercises, practice, code examples, etc. Students are university level expected to have programming knowledge and to know about Internet. No knowledge of particular Internet technologies is required. Do you have any good practices you can share about Web Programming teaching?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="6410" LastEditDate="2021-07-30T13:38:02.680" LastActivityDate="2021-07-30T13:38:02.680" Title="What is a good textbook for teaching Web Programming?" Tags="|programming|web-development|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7022" PostTypeId="2" ParentId="6818" CreationDate="2021-07-29T14:20:21.423" Score="1" Body="&lt;p&gt;Personally if I was including a Parsons problem in an assessment I think I would grade it on the number of lines the student got in the correct place. For example, if you had a program in which 6 lines of code made up the correct solution you could award a mark for getting the first 2 lines in the correct place, then another for the next 2 and finally a mark for the last 2 for a total of 3 marks. Alternatively, if you wanted to make it easier for students to access some marks you could give a mark for each line for a total of 6. The route you take will depend on your students.&lt;/p&gt;&#xA;&lt;p&gt;For students that make errors, you just look to see if they put any lines in the right place and award marks as appropriate.&lt;/p&gt;&#xA;&lt;p&gt;Here is a practical example I did with my students earlier this year:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pw = &amp;quot;1234&amp;quot;&#xA;correct = False&#xA;attempts = 0&#xA;while not correct and attempts &amp;lt; 3:&#xA;    password = input(&amp;quot;Enter your password&amp;quot;)&#xA;    if password == pw:&#xA;        print(&amp;quot;Password accepted&amp;quot;)&#xA;        correct = True&#xA;    else:&#xA;        print(&amp;quot;Incorrect password&amp;quot;)&#xA;        attempts += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;A possible mark scheme for this problem could be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Initialise variables in the correct place = 1 point&lt;/li&gt;&#xA;&lt;li&gt;Variable initialisation is followed by the while loop = 1 point&lt;/li&gt;&#xA;&lt;li&gt;Input is taken from the user within the while loop before the if/else structure = 1 point&lt;/li&gt;&#xA;&lt;li&gt;If/else structure is correct and follows the user input within&#xA;the while loop = 1 point&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You could increase the number of points for the question if you wanted by, for example, giving one for each variable initialisation or one for the if part of the if/else and one for the else part.&lt;/p&gt;&#xA;&lt;p&gt;In this problem I didn't include any distractor lines because of the difficulty of problem I wanted to create for my students who were new to iteration. But you could do the same thing whilst including distractor lines.&lt;/p&gt;&#xA;&lt;p&gt;I hope this is useful.&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-29T14:20:21.423" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7023" PostTypeId="2" ParentId="7021" CreationDate="2021-07-29T14:30:33.897" Score="3" Body="&lt;p&gt;This question is quite vague in terms of what you're asking for. I don't know the age of the students, their prior knowledge or what exactly you want to teach them other that &amp;quot;Web Programming&amp;quot; which could mean a lot of things.&lt;/p&gt;&#xA;&lt;p&gt;Assuming it is an introductory HTML/CSS/JS course you're teaching, I also teach this kind of course to students of various ages and abilities. Two resources I've found useful when doing this are the projects on Raspberry Pi &lt;a href=&quot;https://projects.raspberrypi.org/en/projects/?software%5B%5D=html-css-javascript&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://projects.raspberrypi.org/en/projects/?software[]=html-css-javascript&lt;/a&gt; and the content and exercises on W3Schools &lt;a href=&quot;https://www.w3schools.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.w3schools.com/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This unit on code.org might also be helpful although I have not used it myself &lt;a href=&quot;https://studio.code.org/s/csd2-2021&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://studio.code.org/s/csd2-2021&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I hope you find those suggestions useful. I don't teach practical web related courses other than introductory HTML/CSS so unfortunately I can't make suggestions on any other content you might be teaching.&lt;/p&gt;&#xA;" OwnerUserId="10817" LastActivityDate="2021-07-29T14:30:33.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7024" PostTypeId="2" ParentId="7013" CreationDate="2021-07-30T10:03:54.023" Score="0" Body="&lt;p&gt;Many of those goals are shared with:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The Raspberry Pi project.&lt;/li&gt;&#xA;&lt;li&gt;One laptop per child project.&lt;/li&gt;&#xA;&lt;li&gt;The Linux terminal project.&lt;/li&gt;&#xA;&lt;li&gt;Gnu/Linux&lt;/li&gt;&#xA;&lt;li&gt;Various educational tools in (for example Debian or Ubuntu).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These all use Gnu/Linux. Some provide a standalone Operating system, however all provide components that can be used in any Gnu/Linux (So you can use components of all of these together.&lt;/p&gt;&#xA;&lt;p&gt;The Raspberry Pi project is about trying to get back the control we had in the 1980s: self-contained, free to program it our-self, …&lt;/p&gt;&#xA;&lt;p&gt;The One laptop per child project is about being child friendly. It has a very nice kiosk-like UI and many child friendly activities.&lt;/p&gt;&#xA;&lt;p&gt;The Linux terminal project is probably better if you have multiple devices.&lt;/p&gt;&#xA;&lt;p&gt;A recommendation:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install Gnu/Linux (an operating system)&lt;/li&gt;&#xA;&lt;li&gt;On it install One Laptop per child (&lt;code&gt;sugar&lt;/code&gt;: named after the drug of choice for our children). On debian type &lt;code&gt;sudo apt install sucrose lightdm&lt;/code&gt; into the terminal of a user that has privileges.&lt;/li&gt;&#xA;&lt;li&gt;Set up an account to start in this mode.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Later as the child get older, add other software.&lt;/p&gt;&#xA;&lt;p&gt;I would also set up the fire-wall to block the child-user from accessing the internet (later this could be configured in a more subtle way, e.g. access through a filtering proxy). This will then allow the device to be connected to the network, so allowing updates, and you to do remote admin. (I would also block all incoming connections, except those that you need)&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I just did a quick search on one laptop per child. It may have poor maintenance (however it may not matter, it may still work fine). However there is much educational software available in Debian (a Gnu/Linux).&lt;/p&gt;&#xA;&lt;p&gt;Some other packages that may do what you want include: &lt;code&gt;junior-education&lt;/code&gt;, &lt;code&gt;education-tasks&lt;/code&gt;, &lt;code&gt;education-preschool&lt;/code&gt;, &lt;code&gt;education-primaryschool&lt;/code&gt;, …. These are meta packages. If you install them, then it will cause many educational programs to be installed. This will be surprisingly quick and use surprisingly little disk space (considering the amount of software installed).&lt;/p&gt;&#xA;&lt;p&gt;Sorry I can not be of more help. I have not been considering software for this age group for some years (15 or so).&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2021-07-30T10:47:36.787" LastActivityDate="2021-07-30T10:47:36.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7025" PostTypeId="1" CreationDate="2021-07-30T14:00:58.717" Score="1" ViewCount="69" Body="&lt;p&gt;Looking to find some of the best teachers in software engineering; not the best computer scientists or software engineers per se. But those who train and develop software engineers that and build great software in the industry. I'd like to learn about what they do that makes them a great teacher. I've found &lt;a href=&quot;https://en.wikipedia.org/wiki/Robert_C._Martin&quot; rel=&quot;nofollow noreferrer&quot;&gt;Uncle Bob&lt;/a&gt; to be one of the best but who else? I'd appreciate some resources as well.&lt;/p&gt;&#xA;" OwnerUserId="10865" LastActivityDate="2021-07-30T14:41:20.653" Title="Who is the best software engineering teacher you know? what makes them the best?" Tags="|lesson-ideas|best-practice|lecture-tools|" AnswerCount="0" CommentCount="4" ClosedDate="2021-07-31T13:02:01.977" ContentLicense="CC BY-SA 4.0" />
  <row Id="7027" PostTypeId="2" ParentId="287" CreationDate="2021-07-30T20:10:35.797" Score="1" Body="&lt;p&gt;I've thought about using userscripts as a tool, or even a foundation, for teaching front-end web development as well but haven't had an opportunity to try it out yet (I'll update this when I do!), so please take my musings with a grain of salt.&lt;/p&gt;&#xA;&lt;h2&gt;The &amp;quot;power user&amp;quot; vs &amp;quot;user&amp;quot; mentality&lt;/h2&gt;&#xA;&lt;p&gt;Userscripts are fundamentally a productivity tool. They offer organization, standardization, convenience and automation for power users. These benefits aren't likely obvious to entry-level programmers, especially younger audiences who are generally happy interfacing with technology in a very direct, surface level manner and probably won't see a pressing need to add a usability feature to, say, avoid repetitive tasks in their favorite app.&lt;/p&gt;&#xA;&lt;p&gt;While obvious educational opportunity exists here, I'd use caution to avoid over-emphasizing tools and concepts that are really geared towards programmers and power users rather than application users. It takes time for programming students to switch to a hacker/power user/automator mindset and appreciate things like git, design patterns, memory management, databases and so forth. I'd put userscripts in this bucket as well.&lt;/p&gt;&#xA;&lt;h2&gt;Teaching browser development tools is usually enough&lt;/h2&gt;&#xA;&lt;p&gt;When most of us teach broswer developer tools to entry-level programmers, we usually do fun stuff like the classic day-one activity of &amp;quot;hacking&amp;quot; Wikipedia or Google by changing article headers or search results. Although there's subtle practical power here that userscripts help harness, this is mostly a fun and zero-installation way to get them used to HTML, CSS and JS (what they are/do, what do they look like) and build familiarity with the tool they'll soon be using to debug their own sites.&lt;/p&gt;&#xA;&lt;p&gt;It's powerful to show students that they can easily look at and even manipulate the source that powers the websites they're visiting. One of the amazing aspects of the web is that the source is right there in front of you! There's a big &amp;quot;wow&amp;quot; factor there.&lt;/p&gt;&#xA;&lt;p&gt;But how far does the magic carry a curriclum? It's probably pretty short-lived, and a deep dive into the console has diminishing returns for early programmers. Students will want to get on to making their own app than messing endlessly with other people's apps, and for good reason. One must &lt;em&gt;write&lt;/em&gt; HTML, CSS and JS from scratch to understand it, and no amount of developer tools offers this. For more experienced programmers, this is less of an issue.&lt;/p&gt;&#xA;&lt;h2&gt;Who's the audience?&lt;/h2&gt;&#xA;&lt;p&gt;As with any educational tool, audience is everything. If the audience is a bunch of adults that are tired of repetitive clicking at their jobs, userscripting seems like a great way to empower and engage them without much effort.&lt;/p&gt;&#xA;&lt;p&gt;For younger audiences, I'd try for creative projects. Userscripts can automate playing online games like &lt;a href=&quot;https://en.wikipedia.org/wiki/Cookie_Clicker&quot; rel=&quot;nofollow noreferrer&quot;&gt;cookie clicker&lt;/a&gt;, manipulating a Discord chat in real-time, or tweeting responses to certain messages automatically. It'd be interesting to try to make online art with userscripts by applying radical and surprising alterations to web pages.&lt;/p&gt;&#xA;&lt;p&gt;Even if these sort of projects are cool, it's not clear that anything more than copy-pasting code (written in, say, Notepad++ or an online editor) into the console is necessary.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bookmarklet&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bookmarklets&lt;/a&gt; also offer persistence and relative ease of operation without a full-fledged userscript, with the downside that they're inelegant and more restrictive. I recommend The Coding Train's &lt;a href=&quot;https://thecodingtrain.com/learning/programming-with-text/11.2-bookmarklets.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;bookmarklet challenge&lt;/a&gt;. Interestingly, I don't see any userscript content (or &lt;a href=&quot;https://github.com/CodingTrain/Rainbow-Topics/issues&quot; rel=&quot;nofollow noreferrer&quot;&gt;suggestions&lt;/a&gt; that Daniel cover userscripts) from them.&lt;/p&gt;&#xA;&lt;p&gt;A userscript-focused curriculum seems like a better fit for an audience of programmers who know HTML5 basics, have made a few basic sites, games and apps and want to apply their skills to something new and interesting.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Advantages&lt;/h3&gt;&#xA;&lt;p&gt;Some advantages I can see of teaching JS (and HTML/CSS) through userscripts:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Environment set up is easy and userscript manager extensions like &lt;a href=&quot;https://www.tampermonkey.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tampermonkey&lt;/a&gt; have a built-in editor&lt;/li&gt;&#xA;&lt;li&gt;The coding is approachable, with caveats below&lt;/li&gt;&#xA;&lt;li&gt;Students work with other people's code, develop an appreciation for the complexity of real websites and gain exposure to many useful concepts&lt;/li&gt;&#xA;&lt;li&gt;It's empowering to be able to customize popular websites&lt;/li&gt;&#xA;&lt;li&gt;There are plenty of opportunities for creative projects&lt;/li&gt;&#xA;&lt;li&gt;Because the site is already created, there's less of a feeling of blank canvas or intimidation of building a huge project from the ground up to make something cool and useful&lt;/li&gt;&#xA;&lt;li&gt;Students can explore existing scripts&lt;/li&gt;&#xA;&lt;li&gt;It's rather unorthodox, so your curriculum stands out from the crowd. It could catch on like &lt;a href=&quot;https://automatetheboringstuff.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Automate the Boring Stuff with Python&lt;/a&gt;, an incredible book that manages to teach programming through a productivity lens in a way that's accessible and fun for nearly all audiences with basic computer literacy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Could be dry and de-motivating for the wrong audience; userscripts tend to be productivity/tooling -centric&lt;/li&gt;&#xA;&lt;li&gt;Potentially too much reliance on the console environment at the expense of obviously-beneficial greenfield projects built by hand (inexperienced students will need to do those anyway -- userscripts aren't a drop-in substitute)&lt;/li&gt;&#xA;&lt;li&gt;Not really a key skill, writing userscripts is always a sideline even among web programmers&lt;/li&gt;&#xA;&lt;li&gt;Possibly diminished sense of ownership relative to a greenfield app project&lt;/li&gt;&#xA;&lt;li&gt;Websites can change a lot and have hidden or nondeterministic complexities like &lt;a href=&quot;https://en.wikipedia.org/wiki/A/B_testing&quot; rel=&quot;nofollow noreferrer&quot;&gt;A/B testing&lt;/a&gt; that break userscripts (and your assignments) easily&lt;/li&gt;&#xA;&lt;li&gt;As suggested by OP, the massive size and complexity of sites can be intimidating, although dev tools does a great job of handling minified, modern production sites thanks to the live interactive virtual DOM tree&lt;/li&gt;&#xA;&lt;li&gt;Although the coding isn't typically advanced (running &lt;code&gt;document.querySelector()&lt;/code&gt; and calling &lt;code&gt;.click()&lt;/code&gt; or setting style attributes, injecting &lt;code&gt;innerHTML&lt;/code&gt;, etc), writing userscripts can easily slide into a plethora of advanced concepts like asynchrony, event listener behavior, DOM loading and resource requests, element visibility minutiae and countless other things an experienced programmer takes for granted or can research in situ, but are sometimes prohibitive to introduce to beginners.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Project idea brainstorm&lt;/h2&gt;&#xA;&lt;h3&gt;&amp;quot;Fun&amp;quot; project ideas for &amp;quot;kids&amp;quot; (some adults qualify)&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&amp;quot;Prank&amp;quot; a site to change the behavior in a subtle way, like making buttons run away from the mouse when the user tries to click on them. I've done these with kids and they enjoy showing the sites to their parents, teachers and friends.&lt;/li&gt;&#xA;&lt;li&gt;Expanding on the Twitter/Discord userscript idea: you can add a &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;MutationObserver&lt;/code&gt;&lt;/a&gt; or poll the message feed. When certain messages appear, the script can type a response. As a simple idea, the response could be a quote or gif pulled from an API, or could perform simple commands like &amp;quot;add two numbers&amp;quot;. This can create pretty exciting emergent behavior for students with multiple bots talking to each other. (Yes, you could write a legitimate Discord bot, but this achieves much of the same result with less effort)&lt;/li&gt;&#xA;&lt;li&gt;Create animations using &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;requestAnimationFrame&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;setTimeout&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;setInterval&lt;/code&gt;&lt;/a&gt;. Options are endless: make page text scroll like the old &lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt;, make background colors morph to make psychedelic patterns (seizure warning), add an animation trail to the mouse cursor, stretch page images comedically...&lt;/li&gt;&#xA;&lt;li&gt;Think creatively: manipulate Wikipedia text to create a &lt;a href=&quot;https://en.wikipedia.org/wiki/Mad_Libs&quot; rel=&quot;nofollow noreferrer&quot;&gt;mad libs&lt;/a&gt; story, &lt;a href=&quot;https://blackoutpoetry.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;blackout poetry&lt;/a&gt; or interactive fiction narrative.&lt;/li&gt;&#xA;&lt;li&gt;HTML5 audio is wild. For starters, check out the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API&quot; rel=&quot;nofollow noreferrer&quot;&gt;Web Speech API&lt;/a&gt;. Students create a userscript which reads the contents of a website or lets them type into a website by voice.&lt;/li&gt;&#xA;&lt;li&gt;Pointless fun: add rainbow color schemes to serious government websites, replace depressing images in the news with unicorns, automatically trigger clicks on links to browse sites programmatically, for example to play &lt;a href=&quot;https://www.patheos.com/blogs/religionprof/2017/12/seven-steps-jesus.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;seven steps to Jesus&lt;/a&gt; (probably use something other than Jesus, but the idea applies), etc.&lt;/li&gt;&#xA;&lt;li&gt;Use a machine learning library to analyze text sentiment on a page.&lt;/li&gt;&#xA;&lt;li&gt;Use a machine learning library to analyze a video stream and manipulate the page, for example, &lt;a href=&quot;https://realless.glitch.me/&quot; rel=&quot;nofollow noreferrer&quot;&gt;change background when you blink&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;More pointless fun: &lt;a href=&quot;https://github.com/chinchang/code-blast-codemirror&quot; rel=&quot;nofollow noreferrer&quot;&gt;Make text shake when you type&lt;/a&gt; or add physics to webpages using Matter.js.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As with any technology project, there's a lot of potential for abuse here, so it's important to keep it fun and remind students about not spamming, being nice online and not accidentally deleting a profile or sending their bank account balance to a phisher because of a script run amok.&lt;/p&gt;&#xA;&lt;h3&gt;&amp;quot;Serious&amp;quot; project ideas for &amp;quot;adults&amp;quot; (some kids qualify)&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All things API: fetch data from somewhere and put it into something. For example, hovering over a word with the mouse fetches a dictionary definition that appears in a tooltip.&lt;/li&gt;&#xA;&lt;li&gt;Changing color schemes to improve usability on a site&lt;/li&gt;&#xA;&lt;li&gt;Macros for repetitive tasks and accessing features buried in menus&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage&quot; rel=&quot;nofollow noreferrer&quot;&gt;localStorage&lt;/a&gt; or even a backend app with a database (could be hosted on &lt;a href=&quot;https://glitch.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;glitch&lt;/a&gt; for free) to remember specific actions taken on a page, for example, keep track of songs listened to on &lt;a href=&quot;https://bandcamp.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bandcamp&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Instead of wasting time watching the &lt;a href=&quot;https://cdn-images-1.medium.com/max/1600/1*99yygXrRR8ix1wDOsdjLKA.gif&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gmail/Hotmail logo&lt;/a&gt; when booting up email, show news headlines, a random fact or random Wikipedia article&lt;/li&gt;&#xA;&lt;li&gt;Injecting &lt;a href=&quot;https://codemirror.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codemirror&lt;/a&gt; into textareas to use, say, &lt;a href=&quot;https://userscripts.glitch.me/userscripts/vimify.user.js&quot; rel=&quot;nofollow noreferrer&quot;&gt;Vim keybindings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Improving page load times by blocking resource requests&lt;/li&gt;&#xA;&lt;li&gt;Automatically dismissing annoying pop ups&lt;/li&gt;&#xA;&lt;li&gt;Programmatically importing data into forms&lt;/li&gt;&#xA;&lt;li&gt;Scraping data that isn't easily copy-pasteable and without writing a back-end app&lt;/li&gt;&#xA;&lt;li&gt;Filtering unwanted posts and distracting features in social media streams&lt;/li&gt;&#xA;&lt;li&gt;Did I mention &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API&quot; rel=&quot;nofollow noreferrer&quot;&gt;web audio&lt;/a&gt;?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It turns out these are basically console/bookmarklet projects that aren't exactly essential to userscripting per se (and in many cases not inherent to the console environment), although userscripting certainly can help facilitate delivery.&lt;/p&gt;&#xA;&lt;p&gt;Also, much of these ideas are already implemented as bookmarklets, pre-written userscripts or &lt;a href=&quot;https://en.wikipedia.org/wiki/Browser_extension&quot; rel=&quot;nofollow noreferrer&quot;&gt;browser extensions&lt;/a&gt; (extensions are another thing worth considering for this sort of curriculum). It's OK to reinvent the wheel in the interests of learning and having fun.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;To summarize, userscripts are an interesting tool and there's definitely plenty of potential for educational use. A strong curriculum targeted to the right audience could offer an original angle to learning programming, but at the end of the day, the focus would really be on manipulating sites through the console and developer tools, with userscripts a handy way to streamline that process rather than an end in and of themselves.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2021-07-30T23:36:38.533" LastActivityDate="2021-07-30T23:36:38.533" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7028" PostTypeId="2" ParentId="7005" CreationDate="2021-07-30T22:03:52.640" Score="1" Body="&lt;p&gt;Take a look at &lt;a href=&quot;https://runestone.academy/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Runestone Interactive&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;They have several &lt;a href=&quot;https://runestoneinteractive.org/pages/library.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;books&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In particular in the US there are college credits that can be earned with special high school courses (&lt;a href=&quot;https://en.wikipedia.org/wiki/Advanced_Placement&quot; rel=&quot;nofollow noreferrer&quot;&gt;Advanced Placement&lt;/a&gt;). One of the courses for this is called &lt;a href=&quot;https://csawesome.runestone.academy/runestone/books/published/csawesome/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Awesome&lt;/a&gt;. There is also a &lt;a href=&quot;https://www.csawesome.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;teacher web site&lt;/a&gt; for CS Awesome.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2021-07-30T22:03:52.640" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7030" PostTypeId="2" ParentId="6968" CreationDate="2021-08-07T22:18:01.573" Score="0" Body="&lt;p&gt;I looked at the UK national caruculum, and CAS progression pathways (advisory document), and serprisingly don't see e-safety mentioned. I did see “use of … safely”. This was in the primary national caricula KS1 and KS1 (years 0 →6). and in the progression pathways under “communication and networks”.&lt;/p&gt;&#xA;&lt;p&gt;I have always though that tying e-safety into other topics to get a strong understanding was the best way to go. Better that “don't do this. don't do what you see adults do. Bla bla bla…”. If they understand thinks, if they understand their advosary, then we can discuss what can be done to protect our-selves.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-08-07T22:18:01.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7031" PostTypeId="1" CreationDate="2021-08-08T08:56:05.627" Score="0" ViewCount="36" Body="&lt;p&gt;What optimal resources you could recommend for a small Redis course with a preliminary academic foundation at the beginning of the book?&#xA;I would be grateful for an applied university-level curriculum if one exists.&lt;/p&gt;&#xA;" OwnerUserId="6387" LastEditorUserId="919" LastEditDate="2021-08-09T21:23:58.820" LastActivityDate="2021-08-09T21:23:58.820" Title="Resources for the Redis course" Tags="|resource-request|databases|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7033" PostTypeId="1" AcceptedAnswerId="7034" CreationDate="2021-08-15T16:52:24.593" Score="2" ViewCount="231" Body="&lt;p&gt;Can anyone recommend an introductory online course for the basics of html, css and javascript?&lt;/p&gt;&#xA;&lt;p&gt;It's for my son's International Baccalaureat course and the requirements appear to be pretty basic - e.g. draw a form and button, take some input from the form, do a simple calculation, output the result.&lt;/p&gt;&#xA;&lt;p&gt;They'll also need to do a bit of array pushing and popping at some point, I think.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, the course isn't being presented in a way that suits my son, and I was hoping to find something simple, well structured and pedagogic. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="10941" LastActivityDate="2023-03-07T08:50:06.650" Title="Introductory html, css, javascript online course" Tags="|javascript|html|css|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7034" PostTypeId="2" ParentId="7033" CreationDate="2021-08-15T18:33:50.847" Score="7" Body="&lt;p&gt;I would say that you should use &lt;a href=&quot;https://www.w3schools.com/&quot; rel=&quot;noreferrer&quot;&gt;w3schools.com&lt;/a&gt; it nicely covers the basics of HTML, CSS, JavaScript and a few other related things(I would really suggest looking at MySQL/PHP if you want to go in to web development what is also offered there).&lt;/p&gt;&#xA;&lt;p&gt;It's pretty much inline with the first half year/year of a web development college degree in the Netherlands.&lt;/p&gt;&#xA;&lt;p&gt;I always advise my students to follow the course next to their regular classes (I don't teach HTML/CSS/JavaScript myself) seeing it gives a good explanation, a nice try it yourself editor and covers things that they sadly don't get during their regular classes.&lt;/p&gt;&#xA;" OwnerUserId="8867" LastActivityDate="2021-08-15T18:33:50.847" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7035" PostTypeId="1" CreationDate="2021-08-16T19:56:40.300" Score="2" ViewCount="152" Body="&lt;p&gt;I read with interest the thread &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5606/why-computer-science-students-learn-digital-logic-design&quot;&gt;Why Computer Science students learn Digital Logic Design?&lt;/a&gt;, where Dr. Buffy and others argue for a programming abstraction stack that has logic at its bottom.&lt;/p&gt;&#xA;&lt;p&gt;Is anyone aware of a Computer Engineering (or Computer Science, or Electrical Engineering) curriculum with a required digital logic course that is a prerequisite for the first programming course?&lt;/p&gt;&#xA;" OwnerUserId="10947" LastEditorUserId="9426" LastEditDate="2021-08-17T11:11:28.287" LastActivityDate="2021-10-07T13:59:12.837" Title="Do any Computer Engineering programs have a required digital logic course that comes before the first course in programming" Tags="|curriculum-design|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7037" PostTypeId="1" CreationDate="2021-08-17T11:25:52.917" Score="2" ViewCount="186" Body="&lt;p&gt;Does it matter if when explaining assignments like &lt;code&gt;a = 10&lt;/code&gt; or &lt;code&gt;f = &amp;lt;function&amp;gt;&lt;/code&gt; we talk about &amp;quot;assign a value/object to a name&amp;quot; or &amp;quot;assign a name to a value/object&amp;quot;? I was wondering if the latter shows more clearly that &lt;code&gt;a&lt;/code&gt; or &lt;code&gt;f&lt;/code&gt; are labels with stick on an independent value/object?&lt;/p&gt;&#xA;" OwnerUserId="4350" LastActivityDate="2021-08-17T12:09:31.347" Title="Perspective on assignments" Tags="|programming|" AnswerCount="1" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7038" PostTypeId="2" ParentId="7037" CreationDate="2021-08-17T12:09:31.347" Score="5" Body="&lt;p&gt;There is a recent thread on the SIGCSE mailing list about whether assignment uses &amp;quot;labels&amp;quot; or &amp;quot;boxes&amp;quot; as an explanatory mechanism. I actually prefer &amp;quot;references&amp;quot;, which is a bit like labels but more abstract. And I avoid boxes like I avoid the pandemic.&lt;/p&gt;&#xA;&lt;p&gt;To explain &lt;em&gt;assignment&lt;/em&gt;, therefore, I wouldn't use the word &amp;quot;assignment&amp;quot; itself, but the word &amp;quot;associate&amp;quot;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Assignment associates a name with a value.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Note &amp;quot;with&amp;quot;, not &amp;quot;to&amp;quot; in the description, so being symmetric avoids your dilemma. You can substitute &amp;quot;and&amp;quot; for &amp;quot;with&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Note that the reference model for both objects and primitives is consistent if you keep in mind that the real difference is that some &amp;quot;values&amp;quot; are mutable and some are not.&lt;/p&gt;&#xA;&lt;p&gt;A given name can be associated with only one value at a time in a given context, but the context may be limited (scope...). The association can be changed or not depending on other factors (const...).&lt;/p&gt;&#xA;&lt;p&gt;The &amp;quot;name&amp;quot; might be complex (array entries: a[i] = ...) and even involve other associations (i in the previous example).&lt;/p&gt;&#xA;&lt;p&gt;Note that the &amp;quot;complex&amp;quot; name case, above, starts to break down. But, by the time that you get to arrays in a course, the idea of an assignment will already be so ingrained that the complication is unlikely to arise. If it does, just say that your original metaphor wasn't perfect, as few are.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-08-17T12:09:31.347" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7040" PostTypeId="2" ParentId="7035" CreationDate="2021-08-18T22:26:51.280" Score="2" Body="&lt;p&gt;I think in most places I experienced, a Digital Binary Logic primitives ( Binary, Hexa Vs Decimal, ASCII code, AND,OR, XOR definition,....) precedes the first programming course; but not a complete course only as a part of the general introduction usually from Barti Book (maybe I mis-spelled the author name)&#xA;The main digital logic design course usually comes in 2nd year&lt;/p&gt;&#xA;&lt;p&gt;I guess what must be a pre-requisite is math &amp;amp; discrete math; students have to know arrays, matrices, sets,..... and some operations on them to practice programming. In fact even the basic logic primitives, we first took thru SET Union &amp;amp; Intersection&lt;/p&gt;&#xA;&lt;p&gt;There are things we took for granted because our pioneers drew us the lines so we just do as our predecessors, but here there are some reasoning&#xA;-A developer should understand why increment is faster than +1, Shift is faster than multiply by 2, the use of registers, cache memory,...&#xA;-&amp;amp; as I wrote in the comment in Ethereum for example, System Programming will make it easier to understand EVM, tokens, parsing although not the same&#xA;-The primitives of Bitcoin on the other hand maybe easier for someone who knew even a little assembly&lt;/p&gt;&#xA;" OwnerUserId="9131" LastEditorUserId="9131" LastEditDate="2021-08-20T16:02:52.930" LastActivityDate="2021-08-20T16:02:52.930" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7041" PostTypeId="2" ParentId="7035" CreationDate="2021-08-19T12:58:04.133" Score="3" Body="&lt;p&gt;In my view, starting a &lt;em&gt;Computer Science&lt;/em&gt; program with digital logic makes no sense at all, though a course that covers it later is certainly valuable. The main tool of CS is programming, not digital logic.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, a program in Computer Engineering (if such even exist) would probably do well to start there. For Electrical Engineering it might also, but that isn't my field and I haven't examined curricula for it.&lt;/p&gt;&#xA;&lt;p&gt;But let me discuss why this might be reasonable in Computer Engineering or Electrical Engineering.&lt;/p&gt;&#xA;&lt;p&gt;In those fields, &lt;a href=&quot;https://en.wikipedia.org/wiki/Logic_gate&quot; rel=&quot;nofollow noreferrer&quot;&gt;digital logic&lt;/a&gt; isn' the bottom of a hierarchy, but is actually in the middle of one. It depends fundamentally on lower level things, is complete unto itself, and higher level things depend fundamentally on it. Computer engineering (building devices) uses digital logic in its design process, for example. It is a fundamental &lt;em&gt;tool&lt;/em&gt; that enables higher level things to be built in hardware, just as programming allows higher level things to be built in software (operating systems and such).&lt;/p&gt;&#xA;&lt;p&gt;In an engineering course (other than software engineering which is a bit misnamed, actually), digital logic is probably a more fundamental tool than programming. So, it is natural to start there.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-08-19T12:58:04.133" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7044" PostTypeId="1" AcceptedAnswerId="7048" CreationDate="2021-08-25T07:19:47.927" Score="17" ViewCount="4442" Body="&lt;p&gt;I am to teach Algorithms and Data Structures. There are lots of books that teach how to do algorithms in language X or Y. But I would like to teach algorithmic thinking per se, independent of the underlying programming language.&lt;/p&gt;&#xA;&lt;p&gt;Do you know any book or Internet resource for that? Especially that contains problems and exercises in the style of high school mathematics problems.&lt;/p&gt;&#xA;" OwnerUserId="274" LastActivityDate="2023-01-18T07:22:52.030" Title="Teaching algorithmic thinking without a programming language" Tags="|algorithms|computational-thinking|" AnswerCount="9" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7045" PostTypeId="1" CreationDate="2021-08-25T07:29:10.587" Score="1" ViewCount="128" Body="&lt;p&gt;Short Summary of the situation:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;I live on the Dutch countryside, here there are several colleges/universities that offer IT degrees (post-secondary vocational education/ Bachelor Degree/Master Degree). But most of those students go west to the city after graduating, creating a knowledge drain on the region while there are companies here that are actually looking for new IT employees.&#xA;To combat this local companies (Both companies who do and do not have IT as a core business), Schools and the local government are banding together to create an IT-Hub to bring students and businesses together. In an attempt to keep graduates in the area and to lure more IT-based companies to our region.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now here comes the issue, the IT-Hub is supposed to get assignments from the companies so that the students can work on them in a controlled environment. And although we got enough projects for the other fields (Design, web development, software engineering and so on) we are seriously lacking projects/assignments for &amp;quot;IT-Management&amp;quot; (IT-Management is stuff like security, server management, cisco, hardware repair and such).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Is there some website where I can find filler assignments for them until the companies themselves are able to provide some?(a Course might also work if there are no other options available) Or do any of you have any suggestions?&lt;/strong&gt;&lt;/p&gt;&#xA;" OwnerUserId="8867" LastActivityDate="2023-04-20T02:41:30.163" Title="Finding &quot;Filler&quot; projects for students" Tags="|lesson-ideas|project|hardware|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7046" PostTypeId="2" ParentId="7044" CreationDate="2021-08-25T09:37:13.447" Score="2" Body="&lt;p&gt;check this &lt;a href=&quot;https://youtu.be/8hly31xKli0&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://youtu.be/8hly31xKli0&lt;/a&gt;&#xA;Algorithms and Data Structures - Full Course for Beginners from Treehouse&lt;/p&gt;&#xA;&lt;p&gt;freeCodeCamp.org&lt;/p&gt;&#xA;" OwnerUserId="6660" LastActivityDate="2021-08-25T09:37:13.447" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7047" PostTypeId="2" ParentId="7044" CreationDate="2021-08-25T12:20:08.303" Score="4" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;But I would like to teach algorithmic thinking per se, independent of the underlying programming language.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The current classic book is&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Introduction to Algorithms&amp;quot; Third Edition by Thomas H. Cormen (&lt;a href=&quot;http://www.worldcat.org/oclc/1120499607&quot; rel=&quot;nofollow noreferrer&quot;&gt;WorldCat&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;It is a collage level book but then again so are computer algorithms.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2021-08-25T12:20:08.303" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7048" PostTypeId="2" ParentId="7044" CreationDate="2021-08-25T12:55:50.477" Score="33" Body="&lt;p&gt;When I attended a Mind, Brain, and Learning conference a few years ago, a lecturer posed the following question (paraphrased):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If I ask you to figure out the cube root of a number like 150 in your head, and ask Albert Einstein or Richard Feynman to do the same, they will probably come up with the answer faster than you do.  But who will be using more of their brain to do it?  You or the great physicists of the era?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The answer, he went on to explain, was that &lt;em&gt;you&lt;/em&gt; would be using more of your brain to do it.  He went on to explain that experts use surprisingly small numbers of neurons to accomplish tasks within their own field of expertise.  Experts have invested a great deal of time and calories into &lt;em&gt;streamlining&lt;/em&gt; those systems, and making them extremely efficient.&lt;/p&gt;&#xA;&lt;p&gt;Novices, by contrast, engage relatively vast swaths of their brains in order to accomplish tasks.&lt;/p&gt;&#xA;&lt;p&gt;The streamlining that the experts have done is mastering abstractions.&lt;/p&gt;&#xA;&lt;p&gt;To my way of thinking, your stated goal sounds very nice, but it doesn't really work.&lt;/p&gt;&#xA;&lt;p&gt;The problem is that we naturally move from concrete to abstract, which is done in three parts: (1) we learn how something works, (2) we make the observation that &amp;quot;&lt;em&gt;this&lt;/em&gt; is kind of like &lt;em&gt;that&lt;/em&gt;&amp;quot; and then (3) we continue with the questions, &amp;quot;what other things are like these things?  What are the common features in how they behave or function?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Within the brain, it is actually the same three part process: (1) understand a system, (2) use the  common parts of two systems to create a streamlined version of their common, essential parts, and then (3) connect that streamlined system to many other ideas.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;(Please note the order in which I created that abstraction for you in the previous two paragraphs, and consider whether it would have been somehow clearer if I reversed them.)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The second and third phases are actually cyclical.  When we connect to a new system (phase 3), we frequently wind up revisiting the second phase as the new, connecting ideas provide insight into the abstraction that we didn't notice before.  Also notice that the order remains &lt;strong&gt;concrete to abstract&lt;/strong&gt; even here, when we already have a good, abstract construction.&lt;/p&gt;&#xA;&lt;p&gt;When we do all this, we are building our abstraction, which can also be described as winnowing down a system to its essential features.  This process is insanely useful!  (More on that in a bit.)&lt;/p&gt;&#xA;&lt;p&gt;We don't work from abstract to concrete naturally, &lt;em&gt;unless we already have good, firm ideas of the particular abstract systems being used&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you want to get a sense of how hard this is for humans, notice how we struggle to explain the process of quantum computing, which puts us all in a position of having to begin abstractly, and attempting to concretize from there.  It's so hard for precisely this reason.  Without concrete systems that behave like the quantum systems, it is almost impossibly difficult for us to build up useful abstractions in the first place.&lt;/p&gt;&#xA;&lt;h1&gt;Why we frequently want to teach this way&lt;/h1&gt;&#xA;&lt;p&gt;You're not at all alone in wishing to teach the abstractions from the outset.  (It is a bit of a perennial issue here on CSEducators, actually.)  Teachers &lt;em&gt;often&lt;/em&gt; really want to begin from the abstraction.  It's instinctive!&lt;/p&gt;&#xA;&lt;p&gt;After all, a firm abstraction is &lt;em&gt;absolutely wonderful&lt;/em&gt;.  It is a little key that opens vast swaths of thought to the key holder.&lt;/p&gt;&#xA;&lt;p&gt;The abstraction is also &lt;em&gt;much simpler than any of the derived systems&lt;/em&gt;, which have little details that can be hard to understand without thoroughly understanding the abstraction that makes the whole system work in the first place.&lt;/p&gt;&#xA;&lt;p&gt;Once you have the abstraction in place, all of those confusing little details hardly need to be remembered.  They can be quickly and trivially re-derived when we need them.&lt;/p&gt;&#xA;&lt;p&gt;It makes sense that, almost as soon as we learn a good abstraction, we switch over to using it very heavily in our thinking.  It vastly simplifies and streamlines our thought process when faced with complex systems. Win-win!&lt;/p&gt;&#xA;&lt;p&gt;It is natural to want to get your students to think this way as well.  After all, &lt;strong&gt;if they can see the bigger picture the way that you do&lt;/strong&gt;, they will be able to take advantage of how &lt;em&gt;simple&lt;/em&gt; it all is, just like you do.  Why not start there, show them the beautiful simplicity, and then show them how trivial it is to now understand a lot of wonderful things?&lt;/p&gt;&#xA;&lt;p&gt;Hopefully you can see the answer: the students can't do it.  That mode of thinking is unlocked only by having at least one, and hopefully more, concrete, well-understood examples &lt;em&gt;first&lt;/em&gt;, because those concrete examples are what permit us to comprehend the key secondary features.&lt;/p&gt;&#xA;&lt;p&gt;Looking at it from a neural basis, the novice mind lacks the information that must be winnowed and simplified in order to create the streamlined pathways.&lt;/p&gt;&#xA;&lt;p&gt;We teachers can absolutely help guide students along the path to these kinds of abstractions.  But the first step to make it manageable for a human brain is to make sure that brain has a few concrete examples to work off of.&lt;/p&gt;&#xA;&lt;h1&gt;What we can really do&lt;/h1&gt;&#xA;&lt;p&gt;So how can you help your students get to the abstract part?   You (1) journey through a topic concretely. You (2 and 3) regularly point out when something they're learning is similar to something they've already learned.  You regularly discuss the abstract elements that are coming up.&lt;/p&gt;&#xA;&lt;p&gt;Start concrete, move slowly towards the abstract.&lt;/p&gt;&#xA;&lt;p&gt;It feels positively glacial to work this way, but that's partly an illusion. We simply forget how long it took us to find, winnow down, and make our own beautiful abstractions. The slow pace is really just the time it takes to build the abstraction in the students mind.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-08-28T13:52:16.960" LastActivityDate="2021-08-28T13:52:16.960" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7049" PostTypeId="2" ParentId="7044" CreationDate="2021-08-25T20:30:33.850" Score="7" Body="&lt;p&gt;When I was about eight years old, my teacher asked the class to describe fool-proof ways to make a cup of tea, or to strike a match then use it to light something like a gas-flame or a cigarette.&lt;/p&gt;&#xA;&lt;p&gt;How would that not meet your citeria?&lt;/p&gt;&#xA;" OwnerUserId="9185" LastActivityDate="2021-08-25T20:30:33.850" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7050" PostTypeId="2" ParentId="7044" CreationDate="2021-08-26T00:57:41.167" Score="9" Body="&lt;p&gt;About 20 years ago, I interviewed at a rather well known American software company.  I met with about a dozen people over a day that lasted from 8:30 to 4:30.&lt;/p&gt;&#xA;&lt;p&gt;One of the questions was to come up with an algorithmic solution to blindly traversing a space that looked like this, from one end to the other:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;+----+&#xA;|    |&#xA;|    |&#xA;|    +---------+&#xA;|              |&#xA;+---------+    |&#xA;          |    |&#xA;          |    |&#xA;          +----+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The solution it to take a step forward. If you bump into anything, rotate to the right (or to the left, just be consistent).  if you bump into something again, rotate 180 degrees.  If you don't bump into anything after any of these actions, take another step forward.  You'll eventually get to the end.&lt;/p&gt;&#xA;&lt;p&gt;You could draw something like that on the board and let suggest possible solutions.  Then you could see if the algorithm works in other maze-like shapes.&lt;/p&gt;&#xA;&lt;p&gt;I think coming up with simple exercises like this is a good way to stimulate algorithm thinking.&lt;/p&gt;&#xA;&lt;p&gt;You could also do this in groups, drawing the outline on the floor with tape.  Initially, a guider guides the person, giving instructions to a blind-folded (or pretend blind-folded) walker.  Once the walker gets to the end, the group gets to figure out how the walker could do this algorithmically, without a guider.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update: Another &lt;em&gt;Tape-On-The-Floor&lt;/em&gt; Example&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Tape off N cells in a row, each big enough for someone to stand in. Then tape off one more square not part of the array of cells. Label that last one &lt;code&gt;T&lt;/code&gt; for temporary.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;+----+----+----+----+----+----+----+---'+&#xA;|    |    |    |    |    |    |    |    |&#xA;|    |    |    |    |    |    |    |    |&#xA;|    |    |    |    |    |    |    |    |&#xA;+----+----+----+----+----+----+----+---'+&#xA;&#xA;      +----+&#xA;      |    |&#xA;      |  T |&#xA;      |    |&#xA;      +----+&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Randomly select N students and put them in the cells of the array. Tell them that the goal is to sort them out by height. Give them a few rules.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A cell (including the temporary one) can be empty or full&lt;/li&gt;&#xA;&lt;li&gt;A student must always be in a cell (or be transitioning between cells)&lt;/li&gt;&#xA;&lt;li&gt;Only one student can move at a time.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;See if they come up with a sorting algorithm. If not, coach them into coming up with a bubble sort. The temporary cell is to enable swapping (otherwise rule 3 is broken).&lt;/p&gt;&#xA;&lt;p&gt;Note, you are also talking about variables and possibly memory.&lt;/p&gt;&#xA;&lt;p&gt;Once they get sorted. Have them apply the same algorithm with a different comparator function and sort them out by first name.&lt;/p&gt;&#xA;&lt;p&gt;Then, get random stuff from the classroom (a pen, a stapler, a sheet of paper, etc). Now they can apply the same algorithm to different types with a different comparator.&lt;/p&gt;&#xA;&lt;p&gt;I'm trying to think of how to refactor out the swapping function.&lt;/p&gt;&#xA;" OwnerUserId="9979" LastEditorUserId="9979" LastEditDate="2021-08-27T02:46:40.453" LastActivityDate="2021-08-27T02:46:40.453" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7051" PostTypeId="1" CreationDate="2021-08-26T12:05:35.647" Score="2" ViewCount="167" Body="&lt;p&gt;I have been learning euclidean geometry since a long time and learned about many theorems but I am majoring in Applied Computer Science and I don't find any use of geometry in the CS field.&lt;/p&gt;&#xA;&lt;p&gt;I realize that CS is mainly about number theory and combinatorics and probability. I mostly aspire to be a Machine learning Engineer.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Are there any applications of Algebra or Calculus or even Physics in CS or similar fields like data science and machine learning?&lt;/li&gt;&#xA;&lt;li&gt;Are there any applications of Euclidean Geometry in Computer Science and engineering?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="10967" LastEditorUserId="13300" LastEditDate="2023-12-13T14:30:42.393" LastActivityDate="2024-03-31T15:33:45.873" Title="Applications of Euclidean Geometry" Tags="|careers|" AnswerCount="1" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="7052" PostTypeId="2" ParentId="7044" CreationDate="2021-08-26T15:26:33.330" Score="2" Body="&lt;p&gt;My go-to source for algorithmic thinking is &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Science of Programming&lt;/a&gt; by David Gries (one of my mentors in CS). Algorithms are expressed in an abstract language that was also used (and made popular for exposition) in the papers of Dijkstra.&lt;/p&gt;&#xA;&lt;p&gt;The basis of the algorithmic thinking was to examine preconditions and postconditions for a problem and to work from either end toward a solution. The technique is useful, also, in establishing the theoretical efficiency of an algorithm.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, the book is hard to come by, and expensive if you can find it.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-08-26T15:26:33.330" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7054" PostTypeId="2" ParentId="7044" CreationDate="2021-08-26T20:37:03.650" Score="2" Body="&lt;p&gt;I preferred to wrap up what in the comments &amp;amp; what is new here&lt;/p&gt;&#xA;&lt;p&gt;This course is usually called &lt;em&gt;&lt;strong&gt;Algorithms Design &amp;amp; Analysis&lt;/strong&gt;&lt;/em&gt;, I haven't taught say in 10 yrs but those are classics:&lt;/p&gt;&#xA;&lt;p&gt;-The famous K-nuth  &lt;em&gt;The art of Computer Programming&lt;/em&gt; vols 2,3&lt;/p&gt;&#xA;&lt;p&gt;-Sartaj Sahni book, I can't remember the name now, but it exactly explains the point; it starts with an outline of the main techniques &lt;em&gt;hill climbing, dynamic Programming, Divide-and-Conquer,...&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;-&lt;em&gt;The Hardest Problems&lt;/em&gt; by Sara Baase, but I don't recall now if this is under-graduate or post-graduate&#xA;(sorry the book name is &lt;em&gt;Computer Algorithms: Introduction to Analysis &amp;amp; Design&lt;/em&gt;, it is  just that chapter about P, NP, NPC,... we copied when were students 30yrs ago and is just became like built in my mind)&lt;/p&gt;&#xA;&lt;p&gt;-The grey book with navy blue tree leaves on it, probably by Ullman Hopcroft; sorry I can't remember the exact title.&lt;/p&gt;&#xA;&lt;p&gt;»»» In all cases programming languages differ in nature; I mean sure you can realize there's some differences between C++, Java, Python,...&lt;/p&gt;&#xA;&lt;p&gt;We do not want the student to mix the properties of the language ( for example what's easy &amp;amp; hard in it), the difficulty of coding with the abstract complexity of the Algorithm you are using.&lt;/p&gt;&#xA;&lt;p&gt;That's like a basic concept when you teach algorithm to explain the difference between the complexity of different algorithms Vs the running time of different implementations of the same algorithm&lt;/p&gt;&#xA;&lt;p&gt;I also found this book, although for high school, it might give an intuition of what you are asking about, or was it your original starting point???&#xA;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0873534409&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Teaching-Learning-Algorithms-School-Mathematics/dp/0873534409&lt;/a&gt;&#xA;&lt;a href=&quot;https://eric.ed.gov/?id=ED419669&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://eric.ed.gov/?id=ED419669&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9131" LastEditorUserId="9131" LastEditDate="2021-08-30T06:49:04.150" LastActivityDate="2021-08-30T06:49:04.150" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7055" PostTypeId="2" ParentId="7044" CreationDate="2021-08-27T10:03:05.500" Score="4" Body="&lt;p&gt;My go-to answer for this question would be &lt;a href=&quot;https://csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt;, an open-source &amp;quot;collection of free learning activities that teach Computer Science through engaging games and puzzles that use cards, string, crayons and lots of running around&amp;quot;. It has been around and maintained for at least 18 years now... and even if it may be a bit low-level for high school students, I expect that you can at least find inspiration there.&lt;/p&gt;&#xA;" OwnerUserId="10977" LastActivityDate="2021-08-27T10:03:05.500" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7057" PostTypeId="2" ParentId="6278" CreationDate="2021-08-27T15:42:19.863" Score="1" Body="&lt;p&gt;Since going online-synchronous at the start of the COVID pandemic, my intuition has been to shut off student audio &amp;amp; video at all times. So I lecture with visual slides &amp;amp; audio; students interact through text chat only. I never appear on camera, and neither do my students. (Using Blackboard Collaborate here.)&lt;/p&gt;&#xA;&lt;p&gt;I haven't heard of anyone else doing it this way, but the advantages seemed obvious to me. We stay very focused on the content material. We're never interrupted by outbursts, background noise, or poorly-timed questions. Queries come through in the text chat and I can scan and collectively address them when I get to a reasonable pause point. Students lacking or with low-level A/V equipment, or awkward study locations or privacy concerns, don't get embarrassed. Plus it makes the system/bandwidth requirements very light and accessible in all directions.&lt;/p&gt;&#xA;&lt;p&gt;I assume some educator somewhere will critique this as being impersonal, but in two years of fully online classes I've never had a single student complain about it. And audio interruptions simply aren't possible.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastActivityDate="2021-08-27T15:42:19.863" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7058" PostTypeId="1" CreationDate="2021-09-03T23:23:45.787" Score="4" ViewCount="285" Body="&lt;p&gt;I'm a math professor who will be teaching an undergraduate course in computer graphics next semester, and am looking for some resources to help me structure my course, specifically a textbook, although other resources/advice are welcome.&lt;/p&gt;&#xA;&lt;p&gt;My students will have knowledge of Python, Java, and linear algebra. I would like to be able to spend some time on the following topics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Building a basic 3d renderer (rasterizer) by hand in some programming language, using just a basic linear algebra library&lt;/li&gt;&#xA;&lt;li&gt;The theory of color (fun, would probably only be a week)&lt;/li&gt;&#xA;&lt;li&gt;Programming shaders in a common shader language&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Is there a text that would work for some/all of this?&lt;/p&gt;&#xA;" OwnerUserId="10999" LastActivityDate="2021-09-17T14:00:51.630" Title="Computer Graphics Textbook Recommendations" Tags="|curriculum-design|resource-request|textbook|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7059" PostTypeId="2" ParentId="7058" CreationDate="2021-09-06T12:05:35.413" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;other resources/advice are welcome&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;One topic worthy of teaching related to 3d graphics is &lt;a href=&quot;https://en.wikipedia.org/wiki/Collision_detection&quot; rel=&quot;nofollow noreferrer&quot;&gt;collision detection&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Many people get it wrong on their first and even first few attempts. To really get it correct you have to study the mechanics of how the real world and modeled world differ and how to correctly model the problem.&lt;/p&gt;&#xA;&lt;p&gt;If you are doing 3d graphics related to game design then these are also hard problems.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Camera position. In video games I can't count how many times the camera position made it harder to play the game.&lt;/li&gt;&#xA;&lt;li&gt;Ladders. Some games don't even show a character climbing a ladder because it is so hard.&lt;/li&gt;&#xA;&lt;li&gt;Doors. Just watch this video. &lt;a href=&quot;https://www.youtube.com/watch?v=AYEWsLdLmcc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Why video game doors are so hard to get right&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Comments for which bounty was awarded.&lt;/p&gt;&#xA;&lt;p&gt;I don't think I can do better than some of the answers to this &lt;a href=&quot;https://gamedev.stackexchange.com/q/12299/108025&quot;&gt;question&lt;/a&gt; on the Game Dev sister site.&lt;/p&gt;&#xA;&lt;p&gt;A more detailed write up noted in comment with above answer: &lt;a href=&quot;https://legends2k.github.io/note/cg_resources/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Graphics - Resource Materials for self-study&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2021-09-17T14:00:51.630" LastActivityDate="2021-09-17T14:00:51.630" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7061" PostTypeId="2" ParentId="17" CreationDate="2021-09-11T21:41:24.573" Score="1" Body="&lt;p&gt;Here is my cake-baking analogy:&lt;/p&gt;&#xA;&lt;p&gt;Suppose the recipe for a 3-layer cake said &amp;quot;first bake a 2 layer cake, then add flour, sugar, and butter, and put it in the oven&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;And the recipe for the 2-layer cake says &amp;quot;first bake a 1 layer cake, then add flour, sugar, and butter, and put it in the oven&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;But once you get to the 1-layer cake, that's it. You've reached the base case. The buck stops there. Unlike the recipes for the 2-or-more-layers cakes, the recipe for the 1-layer cake doesn't refer to any other recipes.&lt;/p&gt;&#xA;&lt;p&gt;I think this analogy captures the concept of the base case (the 1-layer cake) and the recursive step (add sugar, flour, and butter then bake).&lt;/p&gt;&#xA;" OwnerUserId="11017" LastActivityDate="2021-09-11T21:41:24.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7063" PostTypeId="1" CreationDate="2021-09-15T05:48:28.517" Score="1" ViewCount="268" Body="&lt;p&gt;&lt;strong&gt;I am still not finding the right book for my career path.&lt;/strong&gt; My first book related to programming on my university was Deitel How to Program C for Programming 1 subject, for Programming 2 we use C++ How to Program 10th ed Global 2017. I not finded Deitel Python Books until 2020 so I decide starting with Mark Lutz 2013 and Programming with Python 2017 T.R. Padmanabhan, a lot of theory very few exercises I don't like, I like a book with plenty of exercises for learn.&lt;/p&gt;&#xA;&lt;p&gt;Times Ago I decided to start with the Python Deitel New Book of the 2020 using the Function Chapter because I have previous knowledge using C, C++. I solved the function chapters of &lt;strong&gt;Python Deitel&lt;/strong&gt;  but I solved &lt;strong&gt;only 20 exercises&lt;/strong&gt;!. If we compare Deitel Python exercises of the Function Sections with &lt;strong&gt;C Deitel is 54&lt;/strong&gt;, &lt;strong&gt;Java&lt;/strong&gt; have A Deeper look of Methods &lt;strong&gt;39 exercises&lt;/strong&gt;, Deitel &lt;strong&gt;C++ Functions Chapter 61 exercises&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I understand there is a difference between &amp;quot;How to Program&amp;quot; and &amp;quot;Intro to Computer Science but I want to learn How to program with Python &lt;strong&gt;Can you recommend me a deep book of python for master my programming skills&lt;/strong&gt; at the level ( or more ) of the C++, C and Java? &lt;strong&gt;My career paths is Data Science and Artificial Intelligence&lt;/strong&gt; so I need a lot of programming skills for that and I feel I need much more than what books are offering( if the books not offer enough exercises do you know some website or github repository for do that? ).&lt;/p&gt;&#xA;&lt;p&gt;Books Reference:&lt;/p&gt;&#xA;&lt;p&gt;Deitel P. Intro to Python for Computer Science and Data Science 2020.pdf&lt;/p&gt;&#xA;&lt;p&gt;C How to Program Deitel 7th+++.pdf&lt;/p&gt;&#xA;&lt;p&gt;C++ How to Program 10th ed Global 2017 by Paul Deitel&lt;/p&gt;&#xA;&lt;p&gt;Deitel P.J., Deitel H.M. - Java How to Program 9th Edition.pdf&lt;/p&gt;&#xA;" OwnerUserId="11027" LastActivityDate="2021-09-18T21:37:06.240" Title="Is Deitel Intro to Python for Computer Science 2020 a resumed version of Deitel How to Program C, C++ and Java?" Tags="|self-learning|programming|textbook|python|careers|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7064" PostTypeId="2" ParentId="7063" CreationDate="2021-09-18T21:37:06.240" Score="3" Body="&lt;p&gt;A very nice book is Downey's &lt;a href=&quot;https://greenteapress.com/wp/think-python-2e&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Think Python&amp;quot; (2nd edition)&lt;/a&gt;. The link leads you to a free PDF, so you can take a look without cost. It teaches problem solving using Python, not Python per se. Make sure you get the second edition, which covers Python 3 (a somewhat different language than the obsolete Python 2).&lt;/p&gt;&#xA;&lt;p&gt;There are lots of pointers to documentation at the &lt;a href=&quot;https://www.python.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;official Python site&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-09-18T21:37:06.240" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7066" PostTypeId="1" CreationDate="2021-09-23T19:50:04.997" Score="0" ViewCount="357" Body="&lt;p&gt;I'm trying to learn computer science on my own and one of the resources I'm using is (&lt;a href=&quot;https://github.com/ossu/computer-science&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/ossu/computer-science&lt;/a&gt;) , so I found many people criticizing the &amp;quot;How to Code - Simple Data&amp;quot; course here (&lt;a href=&quot;https://www.classcentral.com/course/edx-how-to-code-simple-data-3465&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.classcentral.com/course/edx-how-to-code-simple-data-3465&lt;/a&gt;), so I just want to know if it's worth the time or not, if not can you please recommend a free alternative of this course?&lt;/p&gt;&#xA;" OwnerUserId="11006" LastEditorUserId="204" LastEditDate="2024-04-01T13:20:38.733" LastActivityDate="2024-04-01T13:20:38.733" Title="Is the &quot;How to Code - Simple Data&quot; course worth taking?" Tags="|self-learning|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7067" PostTypeId="2" ParentId="5551" CreationDate="2021-09-24T18:20:06.900" Score="1" Body="&lt;p&gt;A file is a &lt;strong&gt;metaphor&lt;/strong&gt;, representing a &lt;strong&gt;mental model&lt;/strong&gt; that would be familiar to office workers who were the initial users of computing systems.&lt;/p&gt;&#xA;&lt;p&gt;Different users in a different context require different metaphors as they have different mental models.&lt;/p&gt;&#xA;" OwnerUserId="11064" LastActivityDate="2021-09-24T18:20:06.900" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7069" PostTypeId="2" ParentId="6921" CreationDate="2021-09-27T15:13:05.047" Score="1" Body="&lt;p&gt;I think you are looking for &lt;a href=&quot;https://en.wikipedia.org/wiki/Retroactive_data_structure&quot; rel=&quot;nofollow noreferrer&quot;&gt;retroactive data structures&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;These are used with Git (&lt;a href=&quot;https://thescipub.com/pdf/jcssp.2020.906.915.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;ref&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;The MIT Open Courseware for &lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/index.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Advanced Data Structures&lt;/a&gt; by Prof. Erik Demaine teaches this in &lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/lecture-videos/session-2-retroactive-data-structures/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Session 2: Retroactive Data Structures&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;HTH&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2021-09-27T15:13:05.047" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7070" PostTypeId="1" CreationDate="2021-09-29T00:25:10.700" Score="0" ViewCount="56" Body="&lt;p&gt;In computer science theory some textbooks introduce fractional/quotient regular languages. In particular, given L1 and L2 languages on the same alphabet, the right quotient of L1 with L2 is defined as&lt;/p&gt;&#xA;&lt;p&gt;L1/L2 = {x : xy ∈ L1 for some y ∈ L2}.&lt;/p&gt;&#xA;&lt;p&gt;The left quotient is defined in a similar way. I was wondering if there are some real-life cases in which quotient languages can be useful. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2021-09-29T00:25:10.700" Title="What are the real-life use cases for for fractional/quotient regular languages?" Tags="|cs-theory|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7075" PostTypeId="1" CreationDate="2021-10-02T04:57:28.853" Score="1" ViewCount="110" Body="&lt;p&gt;I’m just graduated high school. I learnt java in high school, but the java I learnt was taught on bluej and we weren’t taught to create any software or anything. I want to start contributing to open source software, but when I look at the source files, it’s so overwhelming. It feels like the java I learnt in school did not make any difference at all.&lt;/p&gt;&#xA;&lt;p&gt;Where should I get started?&lt;/p&gt;&#xA;" OwnerUserId="11092" LastActivityDate="2021-10-05T13:47:11.763" Title="Getting started on contributing to open source and making software" Tags="|self-learning|secondary-education|programming|java|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7076" PostTypeId="2" ParentId="7075" CreationDate="2021-10-03T09:37:57.583" Score="2" Body="&lt;p&gt;I would suggest not rushing into trying to contribute unless you have a very willing mentor: I suspect it's relatively unusual for people to contribute to packages/programs that they themselves don't use (indeed, I would be worried if this wasn't the case). That is, if you are not actually consuming any open-source Java packages/programs, then you probably are not well placed to contribute to them because you don't understand their purpose, design, and usage, so you'll have little hope understanding the context of the code you might see.&lt;/p&gt;&#xA;&lt;p&gt;(Anecdote: I got into open-source by accident when a library I was using was missing a feature I wanted. It was a totally natural thing for me to report the missing feature, and then proceed to implement it: despite having never looked at the code-base before, I already knew my way around the APIs, I knew how I would actually use the feature (so it was already designed in my head), and I knew which other feature I would copy-and-paste to get myself going.)&lt;/p&gt;&#xA;&lt;p&gt;As such, I would strongly suggest - if you are not already - working on some personal projects where you can use some open-source packages: you will naturally become familiar with their design, and either you'll find problems you want to fix (which is ideal), or you'll be able to understand the context of other people's issues which is often necessary to produce a useful contribution.&lt;/p&gt;&#xA;&lt;p&gt;You should also use your own projects to teach yourself how to use the tools you'll need to make open-source contributions: version control (e.g. git), IDEs (e.g. IntelliJ), built-tools (e.g. Maven), testing (e.g. JUnit), etc. (it's unlikely that a high-school education has equipped you to use all of these tools well, though I could be wrong)&lt;/p&gt;&#xA;&lt;p&gt;Finally, contributing to open-source is a great and noble goal, but I'd further suggest not rushing into it because your contributions may just create work for the maintainers if you're not up-to-scratch, and that can be a miserable experience for everyone. My experience has always been that maintainers and other contributors will want to help you make your contribution, but this doesn't mean they actually have time to help you. As said in the comments on your question, issues marked 'good-first-issue' or 'easy' or whatever probably signal good issues for someone contributing to the project for the first time, but that doesn't necessarily mean they are suitable for someone contributing to &lt;em&gt;any&lt;/em&gt; project for the first time.&lt;/p&gt;&#xA;&lt;p&gt;Some obligatory notes on how to put a contribution together, because there is a lot more than just writing code:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read all the documentation on how to contribute: you may need to agree to a license, or perform other 'house-work' the first time around&lt;/li&gt;&#xA;&lt;li&gt;Look at other contributions to see what they look like: read 'resolved' comments in code-reviews to see what the maintainers are saying so that you don't make the same mistakes&lt;/li&gt;&#xA;&lt;li&gt;Take time to configure your development environment: you must run style-checkers and automated tests yourself if possible, otherwise you waste CI and maintainer effort (which may translate into your contribution being rejected/ignored)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In sum: if you are looking at the source files without the necessary context, you're liable to get stuck: this is true for everyone, even when they have years of experience with the language, because there is so much more to building software software than just the choice of language. Instead, build your confidence and competence by making your own software, steadily introduce the tools you'll &lt;em&gt;need&lt;/em&gt; to contribute to open-source projects, and find open-source packages that can help you with your own projects: you will inevitably find issues with them, and because you ran into this issues as a consumer, you will be in a much better position to report and deal with them.&lt;/p&gt;&#xA;&lt;p&gt;Once you've got your hand in, then it'll be much easier to pick up other people's issues on the same (or similar) projects, because you'll understand the context, have some familiarity with the codebase and tooling, and you'll hopefully understand the (non-trivial) workflow of making a contribution. Also, there is a good chance that if you find a problem, that other people will run into it as well (or indeed it may already have been reported): there is nothing selfish about only fixing issues that affect you.&lt;/p&gt;&#xA;" OwnerUserId="1333" LastActivityDate="2021-10-03T09:37:57.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7077" PostTypeId="2" ParentId="5551" CreationDate="2021-10-04T10:41:25.920" Score="2" Body="&lt;p&gt;&lt;em&gt;As is the case with most simplified explanation, I have glossed over some more advanced specific details that don't factor into the basics on file systems.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2&gt;File content&lt;/h2&gt;&#xA;&lt;p&gt;At its most basic level, a file is really just &lt;strong&gt;a sequence of ones and zeroes&lt;/strong&gt;. It's data. There's nothing more to it than that.&lt;/p&gt;&#xA;&lt;p&gt;This data can then be interpreted. We (or an application) take the ones and zeroes, attribute meaning to them, and this interpretation is informative to us (or an application).&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Interpretation&amp;quot; is the operative keyword here. The same arbitrary sequence of ones and zeroes can be interpreted in any way you want to. However, in most cases only one interpretation will make sense, and other interpretation will look like garbage.&lt;/p&gt;&#xA;&lt;p&gt;So how do we know which interpretation should be used for which file? Answer: the &lt;strong&gt;file extension&lt;/strong&gt;. A file extension denotes how the data in the file is structured, and therefore how it can be sensically interpreted.&lt;/p&gt;&#xA;&lt;p&gt;Your OS automates this process for you. Instead of you having to look at the extension and then find the correct application which can interpret your file in the way you need it to be interpreted, your OS automatically maps a given file extension to your preferred application. For example, you might configure Windows to open &lt;code&gt;.txt&lt;/code&gt; files with WordPad, or Notepad, or Notepad++, or some application you wrote yourself. All of these application are capable of performing the interpretation that a &lt;code&gt;.txt&lt;/code&gt; file needs.&lt;/p&gt;&#xA;&lt;p&gt;You can override this behavior. You can open a &lt;code&gt;.png&lt;/code&gt; file in Notepad. It won't make sense, but what you are seeing is the result of a &lt;code&gt;.txt&lt;/code&gt; interpretation being applied to a file whose data structure is that of a &lt;code&gt;.png&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;.txt&lt;/code&gt; files are very easy to interpret. Ignoring encoding for now (let's assume ASCII), every byte (= 8 bits) of the ones and zeroes represents a single number, which in turn represents a single character.&lt;br /&gt;&#xA;To really prove the point, you could do this manually. Let's say I want to store a text file containing &lt;code&gt;apple&lt;/code&gt;. You can use an &lt;a href=&quot;http://sticksandstones.kstrom.com/appen.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;ASCII table&lt;/a&gt; to look up what the numeric representation of each character is.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;a = 01100001&#xA;p = 01110000&#xA;p = 01110000&#xA;l = 01101100&#xA;e = 01100101&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you use your text editor of choice, set the encoding to ASCII, enter &lt;code&gt;apple&lt;/code&gt; and save the file, the file's ones and zeroes will exactly be the sequence of binary digits I just listed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;.txt&lt;/code&gt; is really easy, but file structures can get significantly more complex, to the point where it is no longer feasible for a human to manually interpret all the data. For example, even though a &lt;code&gt;.pdf &lt;/code&gt;file might only contain text (to your eyes) just like a &lt;code&gt;.txt&lt;/code&gt;, it actually stores a whole lot more data (text markup, file metadata, ...) and this makes it less than obvious to interpret the binary data ourselves.&lt;/p&gt;&#xA;&lt;p&gt;But to prove the point on how you can interpret files in a non-text example, suppose you (as a teacher) want to track whether your students were present/absent every day of school. Assuming you have 16 students, you could track this using a very simple sequence of 16 binary digits:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;1111111111011111&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Everyone was present that day, except student 11.&lt;/p&gt;&#xA;&lt;p&gt;Is this a good file format? Well, it's very efficient. But it also lacks context. There's an assumption on which students were in your class. There's no way to track justified absences, etc. To really cover all the information you need, you're going to need a more complex system. But if you assume a simple present/absent mark for a fixed list of students, the above file format could theoretically suffice.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Interesting experiment&lt;/strong&gt;&lt;br /&gt;&#xA;Take an existing Word/Excel file, one with an &amp;quot;x&amp;quot; in the file extension (&lt;code&gt;.docx&lt;/code&gt; or &lt;code&gt;.xlsx&lt;/code&gt;). Change its file extension to &lt;code&gt;.zip&lt;/code&gt; and try to open it. It... works!?&lt;br /&gt;&#xA;Since the advent of the new Office file formats, Word and Excel documents are really just secret zip archives, not custom binary file formats like they used to be. But by using a unique file extension instead of &lt;code&gt;.zip&lt;/code&gt;, people can still configure these &lt;code&gt;.docx&lt;/code&gt; or &lt;code&gt;.xlsx&lt;/code&gt; files to be automatically opened using Word/Excel instead of however they've configured &lt;code&gt;.zip&lt;/code&gt; files to be opened.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;File name (and path)&lt;/h2&gt;&#xA;&lt;p&gt;At its most basic level, a file name is just one long string of characters, nothing more.&lt;/p&gt;&#xA;&lt;p&gt;Obviously, we're likely going to want to store more than one file on our computer. So we need a way to reference each file that we store. This is why we give them a name, to tell them apart. This is no different from why humans give eachother names.&lt;/p&gt;&#xA;&lt;p&gt;As mentioned before, we add a file extension to the end of the name, so that we remind ourselves (and the OS) of the data structure that was used for the file content.&lt;/p&gt;&#xA;&lt;p&gt;But we often have a lot of files. We'd really like to organize them properly into little collections, instead of throwing them all on one big messy pile. To do this, we started prepending our filenames with what we call the &amp;quot;path&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;A path is nothing more than a (back)slash-separated sequence of names which list the hierarchy of how we'd like to organize our files. The OS will take the file name, split the names into the separate chunks, and will use that hierarchical information to show your files in a neat and organized manner.&lt;/p&gt;&#xA;&lt;p&gt;Every file's name is really just a combination of:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[folder chunks][name of the file].[file extension]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Take the example of the following file names:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;C:\Fruit\apple.txt&#xA;C:\People\PeopleILike\Tom.png&#xA;C:\Fruit\banana.txt&#xA;C:\People\PeopleIHate\Kevin.png&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you split the names in the chunks between the backslashes, you can start seeing the structure. For example, the first and third file have exactly the same chunks before their file name. Therefore, they belong in the same folder. The second and fourth file have a common first chunk, but then they have a different chunk. Therefore, they are found in the same parent directory but then live in a different subdirectory.&lt;/p&gt;&#xA;&lt;p&gt;If you apply this logic, just like how an OS does, you come up with the intended organisational structure:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;C/&#xA;├─ Fruit/&#xA;│  ├─ apple.txt&#xA;│  ├─ banana.txt&#xA;├─ People/&#xA;│  ├─ PeopleIHate/&#xA;│  │  ├─ Kevin.png&#xA;│  ├─ PeopleILike/&#xA;│  │  ├─ Tom.png&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We like to think of our file system as this neat nested system of folders and subfolders. But in the underlying file system, we don't actually store a &amp;quot;folder&amp;quot; by itself. A folder is really just generated dynamically based on the slash-separated chunks found in a file's name.&lt;/p&gt;&#xA;&lt;p&gt;This leads to some interesting effects:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Want to move a file? All you have to change is the file's path. You don't need to update a folder itself.&lt;/li&gt;&#xA;&lt;li&gt;Want to rename a folder? Then you're going to need to change this name in all of the files who contain this folder in their path.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;This is an oversimplification&lt;/strong&gt;. File systems are more complicated than this, because you need the ability to e.g. create empty folders. But this is a good first explanation of how the file system works.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;File metadata&lt;/h2&gt;&#xA;&lt;p&gt;Next to the file name and content, there's more things we know about the file, such as when it was created, whether it is read-only, any permissions attached to the file, ... These things are not stored in the file content. They are an addendum to the file.&lt;/p&gt;&#xA;&lt;p&gt;If you transfer a file from one file system to another, this data may be lost if the target system doesn't know how to work with the source system's metadata structure. However, this doesn't matter in terms of using the file itself. Your data is safe. You might just lose track of e.g. when your file was created.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2021-10-05T10:17:33.363" LastActivityDate="2021-10-05T10:17:33.363" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7079" PostTypeId="2" ParentId="7075" CreationDate="2021-10-05T13:41:10.703" Score="2" Body="&lt;p&gt;VisualMelon's answer is a good one; I wanted to extend the suggestion to start on solo projects.&lt;/p&gt;&#xA;&lt;p&gt;Every team sport consists of members who need to both be individually skilled and fit, and work well together as a team. All of these things are hard to learn, and therefore more often than not it is better to learn these one at a time. Therefore, a team is composed out of players who are already individually skilled and fit, so that they can then learn to work together without also having to learn the basics at the same time.&lt;/p&gt;&#xA;&lt;p&gt;The corollary here is that you should first hone your own development skill, before you start trying to take on team-based efforts. There are many conventions and (sometimes unspoken) rules about how to develop, which have no technical bearing (i.e. doing it in other ways works as well) but we've communally decided to all follow the same style just so your code and your colleague's code merges to form a codebase with a cohesive style and structure.&lt;/p&gt;&#xA;&lt;p&gt;Based on where you are right now, I suggest focusing on personal projects, and firstly focusing on getting things to work, even if the code is not pretty. Prettier code is obviously better, but if you're struggling to get things to work, having to also jump through the &amp;quot;pretty code&amp;quot; hoop at the same time isn't going to make your life easier.&lt;/p&gt;&#xA;&lt;p&gt;I would suggest a sequence of steps along the lines of this, only moving to the next step once you feel confident about your skills in the previous point.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Making it work&lt;/strong&gt; - Create personal projects, keep it simple, write most things yourself.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I suggest tackling at least a few projects. They don't have to be big, but it's good to start several projects from scratch, because you will see that your initial approach improves with experience, and you will avoid mistakes in later projects from the get go.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Making it better&lt;/strong&gt; - Learn to improve and refactor your code. Could you have done things better? Is there a reusable method you could've added to avoid needless repetition? Were you using OOP correctly?&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Revisit the projects from the first bullet point, preferably chronologically. You'll probably be able to immediately improve things based on what you've learned during the other projects you did.&lt;/li&gt;&#xA;&lt;li&gt;Ask someone to review your code when in doubt.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Making it conventional&lt;/strong&gt; - Try to apply generally agreed upon clean coding guidelines to your code. For OOP, a good start is SOLID and DRY.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Definitely consider code reviews here. Conventions often don't make sense when you're by yourself (everyone has their own style), but will start making a lot more sense when you hear others' points of view.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Working with existing code&lt;/strong&gt; - Find some open-source libraries and create some personal projects that make use of these libraries. The goal here is to learn how to write code that works with a pre-established library/codebase. This is a subtly different skill from when you wrote everything yourself.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do not change the other person's code. The goal is to learn to work &lt;em&gt;with&lt;/em&gt; the existing code, not rewrite it.&lt;/li&gt;&#xA;&lt;li&gt;If you struggle with any of the first three bullets point here, revisit them for these personal projects that implement other people's libraries. Using other people's code, which you cannot change, can bring to light mistakes you made in your personal projects (where you were able to rewrite parts to fit with your mistake).&lt;/li&gt;&#xA;&lt;li&gt;You can also find closed-source libraries to work with. This adds to the challenge by removing your ability to read the library code, meaning you can only learn from documentation and the interface the library has chosen to expose.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Extending existing code&lt;/strong&gt; -  Once you feel ready to write &amp;quot;conventional&amp;quot; code (i.e. following the commonly agreed upon guidelines), find an open-source library, preferably one you've already worked with or closely understand the purpose of. Fork it, and try to develop a new feature.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you're struggling to get started on adding new features, focus on bug reports instead. This will help familiarize you with the codebase, and it's usually easier to spot a mistake in existing code than it is to develop something from scratch.&lt;/li&gt;&#xA;&lt;li&gt;You may want to do some ghost development, where you develop the fork but never intend to check it in. That being said, if you're confident about your work, definitely feel free to get someone to review it or, if you're really confident, offer it up via a pull request.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2021-10-05T13:47:11.763" LastActivityDate="2021-10-05T13:47:11.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7080" PostTypeId="2" ParentId="7035" CreationDate="2021-10-07T13:59:12.837" Score="0" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I'm not saying it's not a good class to take, I'm saying that it's not really an &lt;em&gt;essential prerequisite&lt;/em&gt; anymore, and can be relegated to a more advanced class at a later stage to provide deeper knowledge and context.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The first year of college I did contained a boolean algebra class that delved into formal logic, boolean algebra, Karnaugh diagrams, ... Was it very useful for the programming classes we took? &lt;em&gt;Somewhat&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Learning how to refactor and simplify complex logical evaluations was definitely a good skill to have. Things like finding the negation of &lt;code&gt;(a || b) &amp;amp;&amp;amp; c&lt;/code&gt;, or simplifying &lt;code&gt;(a &amp;amp;&amp;amp; b) || b&lt;/code&gt; to &lt;code&gt;b&lt;/code&gt; are things that will definitely come in handy.&lt;/p&gt;&#xA;&lt;p&gt;Karnaugh diagrams? Not really. Thematically, they are also about simplifying logical evaluations, but they do it in a way that is unintuitive to someone who reads the end result, which makes for bad code readability and you'd be better off with a slightly less terse but considerably more readable alternative.&lt;br /&gt;&#xA;That being said, in certain contexts there are cases where efficiency trumps readability, and I've whipped out a genuine Karnaugh diagram in those situations.&lt;/p&gt;&#xA;&lt;p&gt;But my college days were 12 years ago, and it was an outdated course by contemporary standards. We were still being taught C (C++ was for year 2), and even did a week's introduction on Fortran and Cobol. In that situation, boolean algebra makes a lot of sense.&lt;br /&gt;&#xA;Since then, the scene has dramatically changed, and there's less stress on these oldschool logical skills. I work with people who have only just graduated, they never had any oldschool logic classes but they are IMO skilled developers (relative to their experience).&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I read with interest the thread Why Computer Science students learn Digital Logic Design?, where Dr. Buffy and others argue for a programming abstraction stack that has logic at its bottom.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If you ask me to design a software development course from scratch, I will innately focus on things I was taught. I will whip out Karnaugh diagrams, and C++ pointers, and data normalization, and ...&lt;/p&gt;&#xA;&lt;p&gt;It's natural for people to always advocate that the way they think about things is therefore a good summation of essential knowledge for new starters, but that is not always the case.&lt;br /&gt;&#xA;I'm not saying that these skills are completely useless, but not all of them are as relevant today as they were back in the day when the people (who today are experienced mentors) were still in school. Paradigms change, and different skills take priority.&lt;/p&gt;&#xA;&lt;p&gt;There is a significant difference between me and the fresh graduates who are 12 years my junior (at least 50% of the course material), but they are better prepared for the 2021 development scene than I would've been when I started working, which shouldn't be surprising at all.&lt;/p&gt;&#xA;&lt;p&gt;To summarize, while I personally very much value formal logic and still apply it in my work, I'm not as eager to claim that it is as essential to a newcomer than it was to me when I was a newcomer.&lt;/p&gt;&#xA;&lt;p&gt;To be clear: I'm not saying it's not a good class to take. &lt;strong&gt;I'm saying that it's not really an essential prerequisite anymore&lt;/strong&gt;, and can be relegated to a more advanced class at a later stage to provide deeper knowledge and context.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2021-10-07T13:59:12.837" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7081" PostTypeId="1" CreationDate="2021-10-09T10:41:11.817" Score="2" ViewCount="242" Body="&lt;p&gt;Hi I am looking for the resource for teaching the command line, the file system for high school student. I find some students have little idea of what the file system, not to mention navigating the file system using &lt;code&gt;cd/pwd/ls&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The materials I have investigated include &lt;a href=&quot;https://ubuntu.com/tutorials/command-line-for-beginners#1-overview&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;The Linux command line for beginners&amp;quot;&lt;/a&gt; and &lt;a href=&quot;https://www.learnenough.com/command-line-tutorial&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Learn Enough Command Line to Be Dangerous&amp;quot;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;But I feel them are a bit complicated for high school students. I like &amp;quot;The Linux command line for beginners&amp;quot; but I often get sidetracked by spending time explaining linux (which is another big topic) when most kids use Windows.&lt;/p&gt;&#xA;&lt;p&gt;So any recommendation (book included) for teaching those stuff ? In a way my question is related to &lt;a href=&quot;https://cseducators.stackexchange.com/questions/812/how-to-teach-the-value-of-the-command-line-in-high-school&quot;&gt;How to teach the value of the command line in high school?&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;From the comments I got so far I am updating my question to make my objective more clearly. First I want to them to learn some command lines. Even most kids are using Windows, it is easy to find information like &lt;em&gt;Windows and Unix command line equivalents&lt;/em&gt;, e.g. check &lt;a href=&quot;https://www.geeksforgeeks.org/linux-vs-windows-commands/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://www.lemoda.net/windows/windows2unix/windows2unix.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/wsl/&quot; rel=&quot;nofollow noreferrer&quot;&gt;WSL&lt;/a&gt; I have assumed it won't be too hard to learn unix/linux commands on windows but I have not tried yet. So the hard question maybe is to let them know what benefit(s) of learning command lines.&lt;/p&gt;&#xA;&lt;p&gt;I think having some basic knowledge of the file system is also important. Learning CLI will be also inevitable to expose some concept of fs to them. So I put them together when I asked the question.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2021-10-11T02:15:31.020" LastActivityDate="2021-12-22T15:07:54.840" Title="Resource recommendation for teaching the command line, file system for high school student" Tags="|secondary-education|command-line|file-system|" AnswerCount="3" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7082" PostTypeId="1" AcceptedAnswerId="7083" CreationDate="2021-10-13T09:05:17.043" Score="1" ViewCount="33" Body="&lt;p&gt;I have been asked so be the second on grading a paper a Student is going to write about &amp;quot;Creating a methodology for ensuring Code Security/Authenticity&amp;quot;. Sadly this is not my field of expertise.&lt;/p&gt;&#xA;&lt;p&gt;Now I'm looking for some basic information about methods or software that already exists, so I can get a baseline understanding of the Topic.&#xA;These are the Questions that are currently on my mind:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is there already an established best practices?&lt;/li&gt;&#xA;&lt;li&gt;What are commonly used Methods?&lt;/li&gt;&#xA;&lt;li&gt;What are the most important points when looking at Code Security?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The student will hopefully provide some basics in his paper but I would hate to go into this blind  just to be fair to the student.&#xA;I would be grateful if anyone could point me toward  any good introductory material?&lt;/p&gt;&#xA;" OwnerUserId="11114" LastActivityDate="2021-10-13T10:12:39.937" Title="Sources on the Topic Source Code Security/Authenticity" Tags="|resource-request|undergraduate|resource-information|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7083" PostTypeId="2" ParentId="7082" CreationDate="2021-10-13T10:12:39.937" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://dwheeler.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;David A. Wheeler&lt;/a&gt; has a collection of essays, including several on software security (particularly targeting Unix/Linux).&lt;/p&gt;&#xA;&lt;p&gt;There are lots of tools around, including sophisticated checkers that are build on LLVM, like &lt;a href=&quot;http://klee.llvm.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;klee&lt;/a&gt;. You'll also find discussions like &lt;a href=&quot;https://spectralops.io/blog/top-12-open-source-code-security-tools&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Top 12 Open Source Security Tools&amp;quot;&lt;/a&gt; with a bit of searching.&lt;/p&gt;&#xA;&lt;p&gt;There are lots of standards, look e.g. at &lt;a href=&quot;https://www.kiuwan.com/security-standards-in-software-development&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Security Standards in Software Development&amp;quot;&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-10-13T10:12:39.937" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7084" PostTypeId="2" ParentId="4195" CreationDate="2021-10-13T20:49:02.147" Score="1" Body="&lt;p&gt;Those problems are usually more in the line of 2 hour work to get it done, so I'd either sample &lt;em&gt;very&lt;/em&gt; carefully and/or simplify. For on-line exams the format of an input in a fixed format, no validation needed, and a fixed output is nice (can be graded by test cases). You'll want to add a code review. A generic rubric of mine for programs ran roughly like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;50% Running&#xA;&lt;ul&gt;&#xA;&lt;li&gt;15% Test cases given with the problem&lt;/li&gt;&#xA;&lt;li&gt;35% Unpublished test cases&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;50% Code quality&#xA;&lt;ul&gt;&#xA;&lt;li&gt;5% Compíles without warnings&lt;/li&gt;&#xA;&lt;li&gt;10% Code organization (decent variable/function names, comments,     consistent indentation, ...)&lt;/li&gt;&#xA;&lt;li&gt;20% Use of the language facilities (use switch/if, loops, ...)&lt;/li&gt;&#xA;&lt;li&gt;15% Use of library facilities that are appropriate, external tooling (&lt;code&gt;Makefile&lt;/code&gt; or such)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Obviously you'd adjust according if needed to tailor to particular problems. But tell them beforehand that this will be the rough grading scheme.&lt;/p&gt;&#xA;&lt;p&gt;You could asign some of the problems as homework, with a similar grading idea. But check first, I've seen problems misclassified as to best/recommended solution strategy, some &lt;em&gt;very&lt;/em&gt; hard problems are said to be &amp;quot;medium&amp;quot;, and sometimes the posed problem is just impossible to understand (looks nice at first glance, though). And check that solutions aren't available (some miscreants publish their solutions on &lt;a href=&quot;http://www.github.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;github&lt;/a&gt;).&lt;/p&gt;&#xA;" OwnerUserId="5219" LastActivityDate="2021-10-13T20:49:02.147" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7085" PostTypeId="1" CreationDate="2021-10-14T12:11:23.930" Score="1" ViewCount="52" Body="&lt;p&gt;I have been working as a software engineer for a few months now. I want to do research and possibly publish a research paper in the field of computer science. Is it possible to do it while I am working as a software engineer at a company? If yes, how do I find a mentor or a professor to guide me for it.&lt;/p&gt;&#xA;" OwnerUserId="11124" LastActivityDate="2021-10-14T12:11:23.930" Title="How to get research opportunities for software engineers?" Tags="|mentoring|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7086" PostTypeId="2" ParentId="4195" CreationDate="2021-10-17T17:12:56.177" Score="2" Body="&lt;p&gt;I have done something similar to this.  I've found &lt;a href=&quot;https://codingbat.com/java&quot; rel=&quot;nofollow noreferrer&quot;&gt;codingbat&lt;/a&gt; to be a great resource.  The exercises there are not complex and are structured in a way that later exercises build on previous ones. There are more exercises there for Java than Python but at worst it may be useful for prompting ideas.&#xA;&lt;a href=&quot;https://i.stack.imgur.com/AUGms.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/AUGms.png&quot; alt=&quot;CodingBat exercises&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, I have set classroom exercises using some of the ones here, not least because it shows them the tests that are run on the code and I would hope- gets them thinking about test cases, boundaries and so on.  Even though I had stated in previous years that some exam questions would be sourced from the site, I have been disappointed to see very few actually engage with the exercises.&lt;/p&gt;&#xA;&lt;p&gt;Last year I used &lt;a href=&quot;https://replit.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;replit&lt;/a&gt; for the first time.  Rather than use codingbat for code challenges, I was inspired to create my own version of it where I could actually &amp;quot;see&amp;quot; what people in the class were coding, and I could write my own tests to test their code.  I have found this to be extremely useful, and each evening I can review their code submissions, offer suggestions, see where they are having problems- syntax, logic, indentation (python), incorrect docstrings and so on.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/fPOMe.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/fPOMe.png&quot; alt=&quot;Exercises posted to the Edu Team&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;These are the codingbat-style exercises I wrote and posted. I can also set up tests that they can run and see what cases fail.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/H6hHW.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/H6hHW.png&quot; alt=&quot;one of the labs with a view of the unit tests&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once a learner views a lab, it forks a copy for them and I can see the clock icon. If they submit it, I will see an hourglass icon and how many tests were passed and then I review the file for things that unit test will not catch- tidyness and so on.  Once I have reviewed and accept the submission, it appears with a tick mark icon.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/UCA9d.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/UCA9d.png&quot; alt=&quot;overview of learner progress&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Admittedly it is more work than using something that it &amp;quot;there&amp;quot;, but I can jump into their repls and join them in coding, or observe them coding, add comments or chat in real time.  If we have to do remote work again this will be really useful, but even in class I find it useful as I do a &amp;quot;walk-through&amp;quot; akin to strolling around the room to see where each learner is at. I am pretty impressed by what is available on this platform.&lt;/p&gt;&#xA;&lt;p&gt;There are lots of videos that show how to use it- here is just one that I found useful.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://youtu.be/hCgGzIUJtY4&quot; rel=&quot;nofollow noreferrer&quot;&gt;Overview of using Teams for Edu&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2021-10-17T17:12:56.177" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7087" PostTypeId="1" AcceptedAnswerId="7089" CreationDate="2021-10-20T07:37:25.763" Score="4" ViewCount="1687" Body="&lt;p&gt;I am looking for a software engineering project idea (based on Object Oriented Programming) which does not include financial/accounting module, yet provides reasonable challenges in terms of research and modelling to undergraduate students. As this system needs to be implemented, it is preferable that web-based projects are not considered, as they require extensive coding challenges. The challenge is best to be in terms of OO design and requirements gathering.&lt;/p&gt;&#xA;" OwnerUserId="11137" LastActivityDate="2022-05-10T11:58:13.417" Title="Object Oriented Software Engineering Project" Tags="|object-oriented-paradigm|ap-computer-science-a|homework|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7088" PostTypeId="2" ParentId="7087" CreationDate="2021-10-20T13:43:01.287" Score="5" Body="&lt;p&gt;If you're looking for AP Computer Science A-level object stuff, &lt;a href=&quot;https://www.greenfoot.org/door&quot; rel=&quot;noreferrer&quot;&gt;Greenfoot&lt;/a&gt; is excellent.  It's an OO game-design environment created specifically for teaching about OO.  It's free (though there is a &lt;a href=&quot;https://www.greenfoot.org/book/&quot; rel=&quot;noreferrer&quot;&gt;textbook&lt;/a&gt; that can be quite helpful), and there is a large teacher community that regularly posts new labs and assignments.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-10-20T13:43:01.287" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7089" PostTypeId="2" ParentId="7087" CreationDate="2021-10-20T14:01:00.957" Score="10" Body="&lt;p&gt;Let me first make a suggestion. First, understand, yourself, what OO really means at a deep level. It is not, fundamentally, about inheritance, and when inheritance is employed it should be done so that all subclasses of a given class have &lt;em&gt;exactly&lt;/em&gt; the same interface with no additional public methods. To break this rule introduces entropy into the program, meaning that a programmer needs to understand the specifics of each class to employ it correctly.&lt;/p&gt;&#xA;&lt;p&gt;I've found text based games a poor way to do this, since the &amp;quot;things&amp;quot; that you define usually need different methods for their actions. Inheritance gives you very little in such a situation.&lt;/p&gt;&#xA;&lt;p&gt;Instead OO is best employed to implement &lt;em&gt;composition&lt;/em&gt;, in which a complex object is composed from different parts and the parts themselves may be simpler (or a further decomposition needed). But, in a situation like this, the parts can be defined by interfaces and the class hierarchies are very short (usually just 1).&lt;/p&gt;&#xA;&lt;p&gt;So, the fundamental idea is &amp;quot;Has a&amp;quot;, not &amp;quot;Is a&amp;quot;. A complex object &amp;quot;has&amp;quot; parts.&lt;/p&gt;&#xA;&lt;p&gt;A calculator is a good choice of project, since it has Keys, one or more Displays and some internal Operations that make it work. A Calculator is &lt;em&gt;composed&lt;/em&gt; of these parts and each part is defined by a class. Lots of classes, few hierarchies, lots of object interactions.&lt;/p&gt;&#xA;&lt;p&gt;Another one, if your students can handle it is actually a simulator for a simple computer. In particular, each operation of the simulator can be defined by a class, and all of the classes have exactly the same interface. The &amp;quot;Fetch, Increment, Decode, Do&amp;quot; cycle of a simple machine is easy to write and the operations implement methods for Decode and Do.&lt;/p&gt;&#xA;&lt;p&gt;But any complex item that can be decomposed into parts can serve as the basis of a project. The overall item's class has fields that are objects (not primitives) and the objects are defined by classes tailored to the operation of that part of the whole.&lt;/p&gt;&#xA;&lt;p&gt;This gives a lot of practice in writing classes to implement &amp;quot;things&amp;quot;, and doesn't fall in to the trap of wanting a &amp;quot;subclass&amp;quot; that is &amp;quot;something like&amp;quot; its superclass but not exactly and needs an extended interface that needs to be defined (and remembered) for each case.&lt;/p&gt;&#xA;&lt;p&gt;I find that the Strategy and Decorator &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_design_pattern&quot; rel=&quot;noreferrer&quot;&gt;design patterns&lt;/a&gt; are really helpful in implementing the ideas above. In particular, one can build a complex program that has &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; rel=&quot;noreferrer&quot;&gt;cyclomatic complexity&lt;/a&gt; = 1. The implication is that all of the complexity is in the interactions between objects&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If this is for high school use, then simulating a simple computer is an excellent choice (IMO), since it dispels some of the mystery of computation. Once the simple computer is built, one can also write a compiler for a simple higher level language that compiles to instructions for the simple computer. This can be as simple or as complex as you like, but a recursive descent compiler is simple and emphasizes the importance of recursion, which is another goal of courses for novices.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-10-20T15:41:23.127" LastActivityDate="2021-10-20T15:41:23.127" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7090" PostTypeId="1" AcceptedAnswerId="7091" CreationDate="2021-10-24T11:55:22.643" Score="1" ViewCount="67" Body="&lt;p&gt;Is there any good tutorial about how to make asymptotic notations rigorously? I think the way from Turing machines to the analysis of pseudocode is quite a big. Or is the situation that there are some material where people learn to use analysis but there is no book where all the details are written out explicitly?&lt;/p&gt;&#xA;" OwnerUserId="11155" LastEditorUserId="11155" LastEditDate="2021-10-24T12:54:31.420" LastActivityDate="2021-10-24T13:28:51.910" Title="How to learn asymptotic notations rigorously?" Tags="|algorithms|textbook|mathematics|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7091" PostTypeId="2" ParentId="7090" CreationDate="2021-10-24T13:28:51.910" Score="0" Body="&lt;p&gt;Asymptotic behavior is studied in many math fields such as analysis and statistics. In CS it shows up in complexity theory and the analysis of algorithms. Any good undergraduate book on any of those topics will give you the basis. But don't start with Turing machines. As you note, the path will be very very long and you might never get to what you want to learn.&lt;/p&gt;&#xA;&lt;p&gt;Even a few hours on wikipedia will teach you a lot. Start with &lt;a href=&quot;https://en.wikipedia.org/wiki/Asymptotic_analysis&quot; rel=&quot;nofollow noreferrer&quot;&gt;Asymptotic analysis&lt;/a&gt; and follow links from there. If you find it hard to read, find a textbook on Calculus to start.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-10-24T13:28:51.910" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7092" PostTypeId="2" ParentId="7081" CreationDate="2021-10-25T06:33:26.713" Score="0" Body="&lt;p&gt;Although the intended audience is graduate students, maybe the &lt;a href=&quot;https://swcarpentry.github.io/shell-novice/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Software Carpentry Unix Shell lesson&lt;/a&gt; is useful?&lt;/p&gt;&#xA;" OwnerUserId="8315" LastActivityDate="2021-10-25T06:33:26.713" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7093" PostTypeId="1" AcceptedAnswerId="7096" CreationDate="2021-10-25T08:34:09.250" Score="0" ViewCount="106" Body="&lt;p&gt;What would one suggest for a junior lever programming student to learn object oriented Python? For me, it is quite easy to understand objects in Java and non-object oriented Python but objects in Python seems weirder than in Java. Are there good books or lecture notes?&lt;/p&gt;&#xA;" OwnerUserId="11158" LastActivityDate="2021-10-26T15:18:01.787" Title="How to learn object oriented Python?" Tags="|self-learning|python|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7094" PostTypeId="1" CreationDate="2021-10-26T06:08:28.657" Score="11" ViewCount="9552" Body="&lt;p&gt;It is a really worrying situation. I do well with CS subjects, but at the end of day it is all useless as I don't know how to code.&lt;/p&gt;&#xA;&lt;p&gt;How do I learn to code to make projects? I can make small programs easily. I can't use programming to create good stuff.&lt;/p&gt;&#xA;&lt;p&gt;What should I start with? Recommend a book and course that teaches me enough to get started with projects.&lt;/p&gt;&#xA;" OwnerUserId="11163" LastEditorUserId="1314" LastEditDate="2021-10-31T18:54:48.317" LastActivityDate="2021-10-31T18:54:48.317" Title="I am a CS student, but I don't know how to code projects. How do I learn this?" Tags="|programming|" AnswerCount="6" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="7095" PostTypeId="2" ParentId="7094" CreationDate="2021-10-26T12:59:36.810" Score="4" Body="&lt;p&gt;The way to learn how to do this (or most anything) is to practice it so that experience gives you better results. You aren't going to learn it from a book or a video.&lt;/p&gt;&#xA;&lt;p&gt;And, a good way to do it is in partnership with someone else (search for Pair Programming, say at wikipedia).&lt;/p&gt;&#xA;&lt;p&gt;I suggest that you find someone, such as another student with similar concerns and approach one of your CS profs and ask them for an informal project that they might be willing to give you some feedback on. It might even be possible to arrange a bit of course credit in some places (Independent Study). One possibility for projects is to provide a &amp;quot;reference implementation&amp;quot; for some project that the professor already assigns to students or is contemplating doing so. A compiler, for example.&lt;/p&gt;&#xA;&lt;p&gt;One of the more interesting projects that I once built was an &amp;quot;Entity Relationship&amp;quot; modeling tool (a graphical program) to be used to design databases. I also built compilers for a variety of simple languages.&lt;/p&gt;&#xA;&lt;p&gt;I was self taught in CS in the early years and only got guidance later, but one of my earliest projects was to build a simulator for a simple computer. It had a few registers and a few instructions. The professor that teaches architecture probably has a machine specification that can serve as the basis.&lt;/p&gt;&#xA;&lt;p&gt;But the way to learn it is to do it. More than once. And try to get feedback from a professor on your trials. This will help you avoid building poorly designed and impossible to maintain projects.&lt;/p&gt;&#xA;&lt;p&gt;Some universities have a senior &amp;quot;capstone&amp;quot; project course that tries to bring together much of the curriculum in a single project. These are more likely to be team projects than otherwise, however.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-10-26T12:59:36.810" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7096" PostTypeId="2" ParentId="7093" CreationDate="2021-10-26T15:18:01.787" Score="1" Body="&lt;p&gt;The object models of Java and Python are just about the same. But the reference model is a bit different. But the biggest difference is that in Java, a reference variable is defined to have a certain type (class) and in Python it is just a name. In other words, in Java, references are typed. In Python they are untyped. But in both languages the objects themselves are strongly typed at time of creation.&lt;/p&gt;&#xA;&lt;p&gt;This difference implies that reference types (validity) are checked by the compiler - or even earlier when a good IDE is used. Thus Eclipse will highlight type errors in Java but cannot do so in Python. In Python, the validity of an expression is checked only when the program actually runs since any variable can actually refer to any object, regardless of type.&lt;/p&gt;&#xA;&lt;p&gt;In Python if you say foo.bar(x); then this is valid or not depending on whether, at that moment the object that foo references has a method bar with appropriate parameters. The actual type of that object doesn't matter, only its available methods do. But the object itself, as distinct from the reference to it, has a specific type that doesn't change.&lt;/p&gt;&#xA;&lt;p&gt;But in Java, this gets checked before the program runs, making error detection earlier in the process. If the declared class of foo, which is explicit in the program text has a matching bar method then the expression is guaranteed valid prior to the run.&lt;/p&gt;&#xA;&lt;p&gt;For the programmer, this implies that you need to take more care in writing your program in Python since you get fewer hints from the IDE or the compiler if you don't use an IDE. Thus thorough testing becomes even more important in Python since untested code can harbor errors for a long time undetected.&lt;/p&gt;&#xA;&lt;p&gt;I would hope that any decent undergraduate level programming text in either language will give you proper guidance and a mental model for that language.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-10-26T15:18:01.787" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7097" PostTypeId="2" ParentId="7094" CreationDate="2021-10-26T15:57:10.377" Score="13" Body="&lt;p&gt;My advice is not too dissimilar from Buffy.  I would try to get involved in projects with others.  You might look into the indie game development community, or into the open source community.  Join a project, contribute and observe.&lt;/p&gt;&#xA;&lt;p&gt;Aim small.  Even tiny-sounding projects will be surprisingly complex, and will help you to get your programming sea legs (&amp;quot;C&amp;quot; legs? Haha) under you.  Scale is the enemy of project completion.&lt;/p&gt;&#xA;&lt;p&gt;Finally, pair program whenever you can.  You'll start to get a feeling for how to choose and utilize libraries instead of building things from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Actually, this is the main trick of the people who seem to be mystifyingly good at building solo projects. Their big skill is to get good at choosing and utilizing libraries instead of building everything themselves.  By leveraging preexisting code, you can take an apparently large project (very hard for a person) and convert it into a small project.  The closer the library you choose to your needs, and the better you are at using it, the smaller the project becomes.&lt;/p&gt;&#xA;&lt;p&gt;Honestly, this is a big block for many of my students, who can learn to code themselves, but don't want to face the comparatively harder (or at least &amp;quot;surprisingly different&amp;quot;) task or learning to read and use code bases developed by other people.  Needless to say, the students who don't develop that skill are not able to build larger projects on their own.  There is just too much headwind if you can't utilize the work of others and instead must build everything yourself.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2021-10-27T18:33:52.970" LastActivityDate="2021-10-27T18:33:52.970" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7100" PostTypeId="2" ParentId="7094" CreationDate="2021-10-26T23:50:14.227" Score="9" Body="&lt;p&gt;If you're really new to programming, joining an open source project can be quite overwhelming. I would recommend picking up a puzzle challenge like &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;noreferrer&quot;&gt;Project Euler&lt;/a&gt;. Make a habit out of solving a challenge or two a day. Its great fun, and you'll find that you'll learn the basics quite quickly.&lt;/p&gt;&#xA;&lt;p&gt;Although I cannot agree more with what was said above, practice makes perfect, I would also recommend reading the language reference of the language you plan on using. In the case of Python, that would be &lt;a href=&quot;https://docs.python.org/3/reference/&quot; rel=&quot;noreferrer&quot;&gt;Python Language Reference&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;After that you can pick up on what the others suggested, like joining an Open Source project, etc.&lt;/p&gt;&#xA;&lt;p&gt;Best of luck to you!&lt;/p&gt;&#xA;" OwnerUserId="11172" LastActivityDate="2021-10-26T23:50:14.227" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7101" PostTypeId="2" ParentId="7094" CreationDate="2021-10-27T08:32:13.173" Score="2" Body="&lt;p&gt;As others have pointed out practice makes perfect. The best way to learn is by trying. Even recreating something that you have created before is a valuable since you often times realize what you could have done better once you are in the later stages of a project.&lt;/p&gt;&#xA;&lt;p&gt;If you are lacking an idea of what to build you could try:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.raytracerchallenge.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://www.raytracerchallenge.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It‘s a book that teaches you how to create your own ray tracer. The neat thing is that it does not use any specific programming language. It gives you instructions on what to do and test cases to test your code.&lt;/p&gt;&#xA;&lt;p&gt;If you are willing to spend some additional dollars you might also want to check out the Live Projects from Manning:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://liveproject.manning.com/#catalog-list&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://liveproject.manning.com/#catalog-list&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;They often run promotions where they cut prices by ~50%.&lt;/p&gt;&#xA;" OwnerUserId="11176" LastEditorUserId="11176" LastEditDate="2021-10-27T18:10:28.123" LastActivityDate="2021-10-27T18:10:28.123" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7102" PostTypeId="2" ParentId="7094" CreationDate="2021-10-27T11:35:21.303" Score="24" Body="&lt;h1&gt;Computer Science vs. Programming&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Really worrying situation. I do well with CS subjects but at the end of day it is all useless as I don't know how to code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;That is normal. Computer Science and Programming are two completely different things. You should not expect that studying one will not automatically make you learn the other, any more than you should expect studying astronomy will automatically make your learn how to blow glass.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://quoteinvestigator.com/2021/04/02/computer-science/&quot; rel=&quot;noreferrer&quot;&gt;It has been said that Computer Science is really a misnomer, and is akin to calling Astronomy &amp;quot;Telescope Science&amp;quot;&lt;/a&gt; – just because computers can be used to investigate information and processes doesn't mean that they are somehow inherent to that science, just like the fact telescopes can be used to investigate planets and stars doesn't mean that telescopes are somehow inherent to astronomy.&lt;/p&gt;&#xA;&lt;p&gt;There are some languages, for example German, French, and Italian, where the scientific discipline makes no reference to computers at all: in German, it is called &lt;em&gt;Informatik&lt;/em&gt;, in French &lt;em&gt;informatique&lt;/em&gt;, in Italian &lt;em&gt;informatica&lt;/em&gt; – all are a neologism based on &lt;em&gt;information&lt;/em&gt; and the Greek suffix &lt;em&gt;-ik&lt;/em&gt;. In Spanish, it is called &lt;em&gt;ciencias de la informática&lt;/em&gt; (similar to German, French, and Italian) or &lt;em&gt;ciencias de la computación&lt;/em&gt;: note the subtle difference to English, it is the science of comput&lt;strong&gt;ation&lt;/strong&gt;, not the science of comput&lt;strong&gt;ers&lt;/strong&gt;. Danish uses the terms &lt;em&gt;datalogi&lt;/em&gt; (a neologism formed by combining &lt;em&gt;data&lt;/em&gt; with the &lt;em&gt;-logi&lt;/em&gt; suffix as in geology, meteorology, metrology, etc.) for the stricter sense of the science of information, data, computation, and processes, and &lt;em&gt;informatik&lt;/em&gt; for a broader inter-disciplinary view of the effects of &amp;quot;datalogi&amp;quot; on society, politics, humanity, and the broader world in general; what might be called &lt;em&gt;Social Informatics&lt;/em&gt; in English.&lt;/p&gt;&#xA;&lt;p&gt;As you can see, in many languages, there is a clear distinction made between &amp;quot;Informatics&amp;quot; and computers. It is a rather unfortunate accident of history that the language which confuses the two also happens to be the lingua franca for it.&lt;/p&gt;&#xA;&lt;h1&gt;… and Software Engineering&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How do I learn to code to make projects? I can make small programs easily. I can't use programming to create good stuff.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You studied Computer Science to become good at Computer Science. In the same way, you need to study Programming to become good at Programming. In addition, you also need to study Software Engineering to become good at what they call &amp;quot;programming in-the-large&amp;quot;, i.e. programming large and complex systems collaboratively in a team over a longer period of time.&lt;/p&gt;&#xA;&lt;h1&gt;Books that teach Programming&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What should I start with? Recommend a book and course that teaches me enough to get started with projects.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I am personally a huge fan of &lt;a href=&quot;https://htdp.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;How to Design Programs (HtDP)&lt;/em&gt;&lt;/a&gt;. It teaches you, well, how to design programs. And it does this by giving you recipes to follow for how to analyze problems, solve them, transform them into algorithms and further into working programs.&lt;/p&gt;&#xA;&lt;p&gt;Note that &amp;quot;recipe&amp;quot; is basically another word for &amp;quot;program&amp;quot;, so in other words, the book teaches you programs for humans to run in their heads in order to generate programs to be executed by computers. How cool is that? :-)&lt;/p&gt;&#xA;&lt;p&gt;Note that the current, second edition of HtDP does not include Imperative Programming. That material was present in the first edition, but was removed to be covered in an as-of-yet unwritten second volume &lt;em&gt;How to Design Components / Classes&lt;/em&gt;. However, if you are interested in Imperative Programming, &lt;a href=&quot;https://htdp.org/2003-09-26/&quot; rel=&quot;noreferrer&quot;&gt;the first edition of HtDP is still available&lt;/a&gt; as is an early draft of &lt;a href=&quot;https://felleisen.org/matthias/htdc.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;How to Design Classes&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Note that HtDP assumes no programming knowledge and is targeted at high school students. But don't let that stop you: it just means that you'll probably be able to finish some early chapters faster, but I don't think you will be bored.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://Gustavus.Edu/+max/concrete-abstractions.html&quot; rel=&quot;noreferrer&quot;&gt;Concrete Abstractions&lt;/a&gt; is also a good read along similar veins. Like HtDP, it doesn't assume any programming knowledge.&lt;/p&gt;&#xA;&lt;p&gt;Another book that you might hear mentioned is &lt;a href=&quot;http://MITPress.MIT.Edu/sicp/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt;&lt;/a&gt; aka SICP. It is one of the greatest programming books ever written, and again, it doesn't assume any programming knowledge.&lt;/p&gt;&#xA;&lt;p&gt;It &lt;em&gt;is&lt;/em&gt;, however, geared to complete newbies &lt;em&gt;who study at MIT&lt;/em&gt;. And so, while it does not assume any programming knowledge, it &lt;em&gt;does&lt;/em&gt; assume quite a bit of &lt;em&gt;domain&lt;/em&gt; knowledge, e.g. in the fields of electrical engineering, physics and math. Note: these have nothing to do with the &lt;em&gt;concepts&lt;/em&gt; being taught, they are just needed to understand the &lt;em&gt;exercises&lt;/em&gt; and &lt;em&gt;examples&lt;/em&gt;. So, it might be better to read HtDP or Concrete Abstractions first, and then read SICP. However, since you are familiar with CS in general, I don't think you will have many problems.&lt;/p&gt;&#xA;&lt;h1&gt;Learning Programming vs. Learning Programming Languages&lt;/h1&gt;&#xA;&lt;p&gt;All three of these books teach Programming. What they don't teach, is a complex Programming &lt;em&gt;Language&lt;/em&gt;. I personally think that is a good thing. Learning a programming language takes a lot of time, just like learning &lt;em&gt;anything&lt;/em&gt; takes a long time. So, any second you spend learning a programming language, you are not spending learning programming.&lt;/p&gt;&#xA;&lt;p&gt;In my opinion, learning programming is more important than learning programming languages. You will almost never be in a position to choose your programming language anyway, and will have to learn whatever gets thrown at you. Let's face it: almost nobody gets hired to develop something completely novel completely from scratch based on no constraints whatsoever. You will almost certainly join an already existing team working on an already existing system, where the programming language to use has been chosen and set in stone long ago.&lt;/p&gt;&#xA;&lt;p&gt;All three (series of) books I mentioned above use very simple languages that can be fully taught / learned and understood in minutes.&lt;/p&gt;&#xA;&lt;h1&gt;How to learn Software Engineering&lt;/h1&gt;&#xA;&lt;p&gt;What all three books &lt;em&gt;also&lt;/em&gt; (unfortunately) don't teach is &lt;em&gt;Software Engineering&lt;/em&gt;. HtDP &lt;em&gt;does&lt;/em&gt; at least teach Testing and a bit of Debugging, and even suggests something similar to Test-Driven Development / Design. HtDP also teaches documenting requirements.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, and much to my regret, I cannot recommend any books or courses for learning Software Engineering. That is not to say there aren't any, only that I don't know of them. I, personally, consider myself to have been taught Software Engineering very badly, and been permanently damaged.&lt;/p&gt;&#xA;&lt;p&gt;There is the &lt;a href=&quot;https://wikipedia.org/wiki/Software_Engineering_Body_of_Knowledge&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Software Engineering Body of Knowledge (SWEBoK)&lt;/em&gt;&lt;/a&gt; and the &lt;a href=&quot;https://wikipedia.org/wiki/Software_Engineering_2004&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Software Engineering 2004 (SE2004)&lt;/em&gt;&lt;/a&gt;, but I feel that both of those are not really up-to-date with modern real-world Software Engineering practices and ignore modern real-world Software Engineering challenges. (For example, it is almost impossible nowadays in our interconnected world to disentangle good software engineering from security engineering.)&lt;/p&gt;&#xA;&lt;p&gt;Personally, I found it very enlightening to study both the &lt;a href=&quot;https://agilemanifesto.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Manifesto for Agile Software Development&lt;/em&gt;&lt;/a&gt; and the &lt;a href=&quot;https://agilemanifesto.org/principles.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Twelve Principles of Agile Software&lt;/em&gt;&lt;/a&gt; and the &lt;a href=&quot;https://manifesto.softwarecraftsmanship.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Manifesto for Software Craftsmanship&lt;/em&gt;&lt;/a&gt;. Please note: I am &lt;em&gt;not&lt;/em&gt; saying that Agile and Software Craftsmanship are the be-all-end-all of Software Engineering. I am merely saying that I personally found it interesting to study those two documents and their history, and think about what experiences made the people who wrote them become convinced that this is the best way to engineer software. The authors of both of those documents are experienced software engineers, who have both delivered many successful large, complex projects, and have seen many large, complex projects fail. What made them draw those particular conclusions from those failures and successes? I find that fascinating.&lt;/p&gt;&#xA;&lt;h1&gt;Deliberate Practice&lt;/h1&gt;&#xA;&lt;p&gt;However, here is the hard truth: whether it is Computer Science, Programming, Programming Languages, or Software Engineering, or even playing an instrument, painting, woodworking, sports, etc., the &lt;em&gt;only&lt;/em&gt; way to truly master something is &lt;em&gt;lots of deliberate practice&lt;/em&gt;. Note that the &amp;quot;deliberate&amp;quot; part of &amp;quot;deliberate practice&amp;quot; is important. Sitting and noodling &amp;quot;Knocking on Heaven's Door&amp;quot; on your acoustic guitar is not practicing guitar, that's playing a song. Going to the beach is not practicing swimming.&lt;/p&gt;&#xA;&lt;p&gt;And writing small tools for yourself is not practicing programming, that's &lt;em&gt;working&lt;/em&gt;. Someone once said: if you don't delete what you wrote immediately after writing it, then you're working, not practicing.&lt;/p&gt;&#xA;&lt;h1&gt;Kata&lt;/h1&gt;&#xA;&lt;p&gt;Some people swear by so-called &lt;a href=&quot;http://codekata.com/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Code Kata&lt;/em&gt;&lt;/a&gt;. Kata are an idea from several martial arts; they are a series of formalized techniques that are practiced repetitively and are performed in front of an audience.&lt;/p&gt;&#xA;&lt;p&gt;Similarly, Code Kata are simple exercises that you solve over and over again, ideally at some point performing them in front of an audience. Some people have tried setting their performances to music, such that, for example, some big refactoring which results in the deletion of a bunch of code coincides with a big climax in the piece.&lt;/p&gt;&#xA;&lt;h1&gt;Mentorship&lt;/h1&gt;&#xA;&lt;p&gt;One of the best ways of learning Software Engineering, or well, pretty much anything, is to find a &lt;em&gt;mentor&lt;/em&gt;. Especially in the Software Craftsmanship movement, which models itself somewhat after the concept of &lt;em&gt;Master Craftsmen&lt;/em&gt; in e.g. carpentry, mentorships / apprenticeships are fairly common, so you might find a mentor in one of their programs. You don't have to go to such extremes as e.g. &lt;a href=&quot;http://blog.coreyhaines.com/&quot; rel=&quot;noreferrer&quot;&gt;Corey Haines&lt;/a&gt; did, who actually spent the better part of a year on something akin to traditional &lt;a href=&quot;https://wikipedia.org/wiki/Journeyman_years&quot; rel=&quot;noreferrer&quot;&gt;Journeyman Years&lt;/a&gt;, but it wouldn't be the worst way to learn either.&lt;/p&gt;&#xA;&lt;h1&gt;Programming Languages&lt;/h1&gt;&#xA;&lt;p&gt;A note on programming languages: there are thousands of them. It is impossible to learn them all. However, programming languages implement &lt;em&gt;Programming Paradigms&lt;/em&gt; and there are only a few dozen of those. Programming Paradigms, in turn, are composed of &lt;em&gt;Concepts&lt;/em&gt;, and there's only about 20 of those. So, if you understand &lt;em&gt;Concepts&lt;/em&gt;, that will help you understand &lt;em&gt;Paradigms&lt;/em&gt;, which in turn will help you understand &lt;em&gt;Languages&lt;/em&gt;, without actually having to learn dozens of paradigms or hundreds of languages.&lt;/p&gt;&#xA;&lt;h1&gt;Paradigms&lt;/h1&gt;&#xA;&lt;p&gt;Peter van Roy has made a nice &lt;a href=&quot;https://www.info.ucl.ac.be/%7Epvr/paradigms.html&quot; rel=&quot;noreferrer&quot;&gt;poster with the 34 most important Programming Paradigms&lt;/a&gt;. A more thorough explanation of that poster is contained in the article &lt;a href=&quot;http://WWW.Info.UCL.Ac.Be/%7Epvr/VanRoyChapter&quot; rel=&quot;noreferrer&quot;&gt;Programming Paradigms for Dummies: What Every Programmer Should Know&lt;/a&gt; which appeared as a chapter in the book &lt;em&gt;New Computational Paradigms for Computer Music&lt;/em&gt;, edited by G. Assayag and A. Gerzso. Some examples of paradigms include the well-known &lt;em&gt;imperative programming&lt;/em&gt;, &lt;em&gt;functional programming&lt;/em&gt;, &lt;em&gt;ADT imperative programming&lt;/em&gt;, &lt;em&gt;ADT functional programming&lt;/em&gt;, and &lt;em&gt;sequential object-oriented programming / stateful functional programming&lt;/em&gt;, but also lesser known ones such as &lt;em&gt;concurrent constraint programming&lt;/em&gt;, &lt;em&gt;active object programming / object-capability programming&lt;/em&gt;, &lt;em&gt;constraint (logic) programming&lt;/em&gt;, or &lt;em&gt;multi-agent dataflow programming&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h1&gt;Concepts&lt;/h1&gt;&#xA;&lt;p&gt;Paradigms, in turn, are composed of &lt;em&gt;Programming Concepts&lt;/em&gt;. E.g. sequential object-oriented programming is composed of &lt;em&gt;record&lt;/em&gt;, &lt;em&gt;closure&lt;/em&gt;, &lt;em&gt;cell&lt;/em&gt;, and &lt;em&gt;procedure&lt;/em&gt;. If you add &lt;em&gt;thread&lt;/em&gt;, you get concurrent OO programming. The most important concepts include some well known ones like &lt;em&gt;cell (state)&lt;/em&gt;, &lt;em&gt;procedure&lt;/em&gt;, and &lt;em&gt;record&lt;/em&gt;, but also lesser known ones like &lt;em&gt;by-need synchronization&lt;/em&gt;, &lt;em&gt;nondeterministic choice&lt;/em&gt;, or &lt;em&gt;solver&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I would argue that understanding about 1/3 of those 18 concepts allows you to understand about 90% of the top 100 mainstream languages, if not more.&lt;/p&gt;&#xA;&lt;p&gt;This is an interesting example, where Computer Science concepts, more specifically concepts from the field of &lt;em&gt;Programming Language Theory&lt;/em&gt; are directly helpful in an industrial context, helping you to quickly learn programming languages by analyzing their paradigms and concepts.&lt;/p&gt;&#xA;&lt;p&gt;By far the best explanations of programming paradigms are found in Peter van Roy's works. Especially in the book &lt;a href=&quot;http://WWW.Info.UCL.Ac.Be/%7Epvr/book&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Concepts, Techniques, and Models of Computer Programming&lt;/em&gt; by Peter Van Roy and Seif Haridi&lt;/a&gt;. (&lt;a href=&quot;http://CodePoetics.Com/wiki/&quot; rel=&quot;noreferrer&quot;&gt;Here's the companion wiki.&lt;/a&gt;) CTM uses the &lt;a href=&quot;http://WWW.Mozart-Oz.Org/&quot; rel=&quot;noreferrer&quot;&gt;multi-paradigm Distributed Oz programming language&lt;/a&gt; to introduce all the major programming paradigms.&lt;/p&gt;&#xA;&lt;p&gt;My own experience has been that &lt;em&gt;really&lt;/em&gt; understanding a programming paradigm is only possible&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;one paradigm at a time and&lt;/li&gt;&#xA;&lt;li&gt;in languages which &lt;em&gt;force&lt;/em&gt; you into the paradigm&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Learning Concepts through Paradigms through Languages&lt;/h1&gt;&#xA;&lt;p&gt;Ideally, you would use a language which takes the paradigm to the extreme. In multi-paradigm languages, it is much too easy to &amp;quot;cheat&amp;quot; and fall back on a paradigm that you are more comfortable with. And using a paradigm as a library is only really possible in languages like Scheme which are specifically designed for this kind of programming. Learning lazy functional programming in Java, for example, is not a good idea, although there are libraries for that.&lt;/p&gt;&#xA;&lt;p&gt;Here's some of my favorites:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;object-orientation in general&lt;/strong&gt;: &lt;a href=&quot;http://SelfLanguage.Org/&quot; rel=&quot;noreferrer&quot;&gt;Self&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;prototype-based object-orientation&lt;/strong&gt;: Self&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;class-based object-orientation&lt;/strong&gt;: &lt;a href=&quot;http://NewspeakLanguage.Org/&quot; rel=&quot;noreferrer&quot;&gt;Newspeak&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;static class-based object-orientation&lt;/strong&gt;: &lt;a href=&quot;http://Eiffel.Com/&quot; rel=&quot;noreferrer&quot;&gt;Eiffel&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;multiple dispatch based OO&lt;/strong&gt;: &lt;a href=&quot;http://WWW.OpenDylan.Org/&quot; rel=&quot;noreferrer&quot;&gt;Dylan&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;functional + object-orientation&lt;/strong&gt;: &lt;a href=&quot;http://Scala-Lang.Org/&quot; rel=&quot;noreferrer&quot;&gt;Scala&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;functional programming&lt;/strong&gt;: &lt;a href=&quot;http://Haskell.Org/&quot; rel=&quot;noreferrer&quot;&gt;Haskell&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;pure functional programming&lt;/strong&gt;: Haskell&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;lazy pure functional programming&lt;/strong&gt;: Haskell&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;static functional programming&lt;/strong&gt;: Haskell&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;dynamic functional programming&lt;/strong&gt;: &lt;a href=&quot;http://Clojure.Org/&quot; rel=&quot;noreferrer&quot;&gt;Clojure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;imperative programming&lt;/strong&gt;: &lt;a href=&quot;http://Lua.Org/&quot; rel=&quot;noreferrer&quot;&gt;Lua&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;concurrent programming&lt;/strong&gt;: Clojure&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;message-passing concurrent programming&lt;/strong&gt;: &lt;a href=&quot;http://Erlang.Org/&quot; rel=&quot;noreferrer&quot;&gt;Erlang&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;metaprogramming&lt;/strong&gt;: &lt;a href=&quot;https://racket-lang.org/&quot; rel=&quot;noreferrer&quot;&gt;Racket&lt;/a&gt;, &lt;a href=&quot;http://Schemers.Org/&quot; rel=&quot;noreferrer&quot;&gt;Scheme&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;language-oriented programming&lt;/strong&gt;: &lt;a href=&quot;http://IntentSoft.Com/&quot; rel=&quot;noreferrer&quot;&gt;Intentional Domain Workbench&lt;/a&gt;, unfortunately defunct; try &lt;a href=&quot;http://jetbrains.com/mps/&quot; rel=&quot;noreferrer&quot;&gt;JetBrains MPS&lt;/a&gt; instead&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;What about syntax?&lt;/h1&gt;&#xA;&lt;p&gt;The most-often talked about part of programming languages are their respective syntaxes. Personally, I also find them the least important. You can learn to ignore syntax, or if it really bothers you, write a preprocessor. You cannot easily change a language's semantics or type system.&lt;/p&gt;&#xA;&lt;p&gt;Most mainstream languages nowadays borrow their syntax heavily from a small number of influential ancestors: blocks structured with curly braces from B (e.g. C, C++, Java, C#, ECMAScript, PHP, Rust, Go), blocks structured with keywords from Algol (e.g. Ruby), blocks structured through indentation from ISWIM (Python, Haskell), member selection with &lt;code&gt;.&lt;/code&gt; from … I don't know where :-D (almost all of them), message sending with whitespace from Smalltalk (Objective-C), types in front of identifiers from Algol, types after identifiers separated with a colon from maths, types after identifiers separated with whitespace, plus the Lisp family and ML family.&lt;/p&gt;&#xA;&lt;p&gt;Once you have seen some of them, you have seen (almost) all of them, and they are easy to learn. Also, modern code authoring tools help tremendously with intelligent autocompletion for writing code, and specific syntactical intricacies are often not that important for reading and understanding code. For example, many coding styles require parenthesizing complex expressions, so that knowing the subtle differences in operator precedences between different languages becomes a non-issue: except in interview puzzles designed to stump you (for which you can prepare and memorize them, and promptly forget them after the interview), or in really badly written code (which you need to carefully study anyway, since operator precedence typically is the least of your problems), you simply will not encounter them.&lt;/p&gt;&#xA;" OwnerUserId="945" LastEditorUserId="945" LastEditDate="2021-10-28T16:39:29.537" LastActivityDate="2021-10-28T16:39:29.537" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7103" PostTypeId="2" ParentId="7094" CreationDate="2021-10-27T14:28:55.577" Score="4" Body="&lt;p&gt;While I did study CS, I learned most of what I use daily on my own, previous to my studies. As an adolescent, I would find something that interests me, and figure out how to do it from whatever sources of information that were available (paper books mostly, at that time, there was no Internet yet, at least not for the general public).&lt;/p&gt;&#xA;&lt;p&gt;So, let your thoughts roam and find something - &lt;em&gt;anything&lt;/em&gt; - that sounds interesting to &lt;em&gt;you&lt;/em&gt;. If you're studying CS, then there should be &lt;em&gt;some&lt;/em&gt; reason why you picked that topic (aside from there being a lot of jobs on offer, and often substantial salary for good graduates). What fascinates you?&lt;/p&gt;&#xA;&lt;p&gt;Then whip out your programming language of choice and just &amp;quot;do  it&amp;quot;. Implement whatever you want. It should not even matter if it's big or small.&lt;/p&gt;&#xA;&lt;p&gt;Think about what you learned in your studies, and try to apply it. It is normal that CS is not very applicable - some universities tend to focus a &lt;em&gt;lot&lt;/em&gt; on the theoretical parts. Still, you can find out ways to do so.&lt;/p&gt;&#xA;&lt;p&gt;Example projects from myself:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I programmed a moderately simple 3D modelling tool (I daresay you would call it CAD these days).&lt;/li&gt;&#xA;&lt;li&gt;... made my own version of Breakout.&lt;/li&gt;&#xA;&lt;li&gt;... programmed a client-server 2D isometric multiplayer game (you would call it ARPG today, or if there were ever more than 2 players online for the very short time the servers were running, an very small MMORPG), including the net code, an integrated scripting language, and all the tooling, everything from scratch.&lt;/li&gt;&#xA;&lt;li&gt;... a tool which would parse a hypothetical programing language and displayed the internal representation as a graph on the screen (combining topics from Compiler Theory and Graph Theory)&lt;/li&gt;&#xA;&lt;li&gt;... (one of my favourites) a floppy disk utility for an 8 bit computer, written in assembler, and includinf a lot of low level features including a disk formatting routine. You get one try at guessing how I lost the source code to this application eventually.&lt;/li&gt;&#xA;&lt;li&gt;... used Prolog to make a tool to ... don't know what it was, maybe putting pupils into classes.&lt;/li&gt;&#xA;&lt;li&gt;... worked on a popular open source rogue-like game (similar to Nethack), ported it to a fringe OS and maintained it for some time.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And so on and so forth. You do not need to pick &lt;em&gt;those&lt;/em&gt; projects of course, but they all interested me. That stuff was possible back then even with quite limited information, and many more impressive projects should be much more accessible today with better tools and information.&lt;/p&gt;&#xA;&lt;p&gt;TL;DR: Pick something of interest, and then use your skills and knowledge to make it - if you are lacking skills and knowledge, obtain them in the process.&lt;/p&gt;&#xA;" OwnerUserId="652" LastActivityDate="2021-10-27T14:28:55.577" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7104" PostTypeId="1" CreationDate="2021-10-27T15:55:45.707" Score="1" ViewCount="54" Body="&lt;p&gt;I was going through GATE-CS questions, while solving I came across the following question &lt;a href=&quot;https://gateoverflow.in/578/gate-cse-1992-question-3-i&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Write short answers to the following:&lt;/p&gt;&#xA;&lt;p&gt;Which of the following macros can put a macro assembler into an infinite loop?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;.MACRO M1,X&#xA;.IF EQ,X  ;if X=0 then&#xA;M1 X+1&#xA;.ENDC&#xA;.IF NE,X  ;IF X≠0 then&#xA;.WORD X   ;address (X) is stored here&#xA;.ENDC&#xA;.ENDM&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre&gt;&lt;code&gt;.MACRO M2,X&#xA;.IF EQ,X&#xA;M2 X&#xA;.ENDC&#xA;.IF NE,X&#xA;.WORD X+1&#xA;.ENDC&#xA;.ENDM &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Give an example call that does so.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The actual question I guess had no explanation of what each line of the macro meant, but &lt;a href=&quot;https://www.geeksforgeeks.org/gate-gate-cs-1996-question-41/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; from another site got to know the meaning of the lines apparently.&lt;/p&gt;&#xA;&lt;p&gt;Please can anyone tell one tell me, what are these types of macros? [I know what are macros in C. Also know that the C processor, substitutes the macros in the actual line of the code. I mean to say that I am not unaware of what macro is but I want to know about it in detail.]&lt;/p&gt;&#xA;&lt;p&gt;But I want to know what is the syntax of writing these above macros, where are they are used? And the general method/theory of macro expansions. The above question is tagged under &amp;quot;assembler&amp;quot;. What is its connection with assembly language? Are these macros written in some assembly language?&lt;/p&gt;&#xA;&lt;p&gt;Could anyone recommend me a textbook, which shall help me build concepts on these topics? I could not find myself as I do not know what language are these macros are written in, also I do not know their meaning...&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2021-10-27T15:55:45.707" Title="Textbook recommendation for macros and assembler" Tags="|self-learning|resource-request|textbook|compiling|assembly|" AnswerCount="0" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7106" PostTypeId="1" CreationDate="2021-11-02T02:56:42.807" Score="1" ViewCount="85" Body="&lt;p&gt;Way back in the '90s, I read a choose-your-own-adventure style book,&#xA;where most sections ended in a choice of 2 or 3 different pages to turn to&#xA;(as is typical).&lt;/p&gt;&#xA;&lt;p&gt;However, this particular book was different from the others in this category,&#xA;as some of the sections ended with a code listing in BASIC,&#xA;and it required the reader to type out and execute the code listing in QBASIC,&#xA;and based on the execution output, the reader would know which page to turn to.&lt;/p&gt;&#xA;&lt;p&gt;This was very long ago, so I do not remember very much about the book,&#xA;not even the actual story, but the one specific thing that I do remember,&#xA;is that one of the code listings involved &amp;quot;encrypted messages&amp;quot;,&#xA;which you had to &amp;quot;decrypt&amp;quot;, and that this was simply by swapping&#xA;odd and even ASCII character codes.&lt;/p&gt;&#xA;&lt;p&gt;The closest thing I could find was &lt;a href=&quot;https://gamebooks.org/Category/44&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;,&#xA;except the book I am after is one with multiple BASIC listings embedded in the sections,&#xA;and not just a single one at the end.&lt;/p&gt;&#xA;&lt;p&gt;This book happened to be my first brush to &amp;quot;programming&amp;quot;, and the CYOA-style was (retrospectively) what got me motivated to get past the initial hurdle/struggle. I'm hoping to crowd-source the identification not only for nostalgia, but also to mine it for potential education ideas.&lt;/p&gt;&#xA;" OwnerUserId="11226" LastEditorUserId="27" LastEditDate="2021-11-03T16:42:34.087" LastActivityDate="2021-11-03T16:42:34.087" Title="Help identifying a '90s CYOA-style book with BASIC code listings" Tags="|resource-request|programming|textbook|code-example|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7107" PostTypeId="1" CreationDate="2021-11-02T11:28:56.323" Score="0" ViewCount="191" Body="&lt;p&gt;eg-: examples to create dfa, nfa, turing machine, pda, regular grammar, cfg problems etc. What is the best resource for it? Any book there? Or any thing else there?&lt;/p&gt;&#xA;" OwnerUserId="11227" LastActivityDate="2021-11-02T17:00:46.990" Title="Theory of computation study material with lots of solved examples-:" Tags="|self-learning|" AnswerCount="1" CommentCount="2" ClosedDate="2021-11-08T19:54:20.670" ContentLicense="CC BY-SA 4.0" />
  <row Id="7108" PostTypeId="2" ParentId="7107" CreationDate="2021-11-02T16:24:34.267" Score="2" Body="&lt;p&gt;The resource you probably want is &lt;a href=&quot;https://www.jflap.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;JFLAP&lt;/a&gt;, created by Susan Rodger at Duke University. It is a software system (in Java) in which you can create automata of all kinds and run simulations on them.&lt;/p&gt;&#xA;&lt;p&gt;Note that from the link above, you can reach the JFLAP book as well.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-11-02T17:00:46.990" LastActivityDate="2021-11-02T17:00:46.990" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7109" PostTypeId="2" ParentId="7106" CreationDate="2021-11-02T17:06:46.987" Score="0" Body="&lt;p&gt;If you search on Google (or Duck Duck Go) for &amp;quot;choose your own adventure, programming book&amp;quot; you will probably find what you are looking for as well as some modern interpretations.&lt;/p&gt;&#xA;&lt;p&gt;A few minutes clicking turned up &lt;a href=&quot;https://www.mobygames.com/game-group/choose-your-own-adventure-gamebook-adaptations&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-11-02T17:06:46.987" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7110" PostTypeId="2" ParentId="7106" CreationDate="2021-11-03T16:41:44.250" Score="1" Body="&lt;p&gt;There's genuinely not enough to go on here to find the book with online searches.&lt;/p&gt;&#xA;&lt;p&gt;However, you can find a listing of every book on BASIC ever published at the Library of Congress, all organized into various subcategories.  Your book is almost certainly in there.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://catalog.loc.gov/vwebv/search?searchArg=BASIC%20(Computer%20program%20language)&amp;amp;searchCode=SUBJ%2B&amp;amp;searchType=1&amp;amp;recCount=25&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://catalog.loc.gov/vwebv/search?searchArg=BASIC%20(Computer%20program%20language)&amp;amp;searchCode=SUBJ%2B&amp;amp;searchType=1&amp;amp;recCount=25&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-11-03T16:41:44.250" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7111" PostTypeId="2" ParentId="3504" CreationDate="2021-11-04T13:37:22.820" Score="2" Body="&lt;p&gt;There exist assessment methodology, which greatly reduces plagiarism incentives. Basically, it consists of following:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Students should submit home assessments every week, but those are not graded (!)&lt;/li&gt;&#xA;&lt;li&gt;Home assessments are provided in form of &amp;quot;program skeleton&amp;quot;, where students have to fill missing parts, while maintaining skeleton code. So they can't just copy-paste code from internet, they have to adapt it first, which requires code reading at least&lt;/li&gt;&#xA;&lt;li&gt;Roughly every 2 weeks there is graded assessment&lt;/li&gt;&#xA;&lt;li&gt;Without home assessment correctly done and submitted students are not allowed to participate graded assessment&lt;/li&gt;&#xA;&lt;li&gt;Graded assessment is done in lab, and involves making specific changes to programs, which were submitted by students as their home assessments. So they are familiar with both task and code, but to actually modify it they have to understand the code. So, code understanding and modification skill is graded.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;From article &lt;a href=&quot;https://scholar.google.com.sg/citations?view_op=view_citation&amp;amp;hl=en&amp;amp;user=Qd7aaTMAAAAJ&amp;amp;sortby=pubdate&amp;amp;citation_for_view=Qd7aaTMAAAAJ:W7OEmFMy1HYC&quot; rel=&quot;nofollow noreferrer&quot;&gt;Eliminating plagiarism in programming courses through assessment design(2016) Minh Ngoc Ngo&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9632" LastActivityDate="2021-11-04T13:37:22.820" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7112" PostTypeId="2" ParentId="349" CreationDate="2021-11-06T19:34:29.420" Score="1" Body="&lt;h3&gt;Existing answers have great suggestions...&lt;/h3&gt;&#xA;&lt;p&gt;There are many wonderful answers here, and I agree that, in general, &lt;code&gt;&amp;quot;hello ${name}&amp;quot;&lt;/code&gt; to introduce dynamic input/output and string concatenation (a natural lead-in to &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;else&lt;/code&gt; and something like a small quiz app), currency/temperature convertors to introduce mathematical operations and types are great second tasks. A temperature converter with hardcoded values is a refactor away from collecting input, introducing functions, conditions (prompt for Fahrenheit to Celsius or vice-versa) and loops (prompt for multiple temperature conversions).&lt;/p&gt;&#xA;&lt;p&gt;I also like the idea of &lt;a href=&quot;https://cseducators.stackexchange.com/a/3295/9426&quot;&gt;prematurely showing students code from a larger project they aren't expected to understand&lt;/a&gt;, with the idea of making a few small modifications and exposing them to the look and feel of the sort of applications they'll soon be creating. There's a risk of intimidation, so care would need to be taken, and eventually you'll have to pull back to a &amp;quot;next hello world&amp;quot;-sized step anyway.&lt;/p&gt;&#xA;&lt;h3&gt;... but what about audience, context and goals?&lt;/h3&gt;&#xA;&lt;p&gt;However, these answers seem to assume an audience of entry-level programming students. As &lt;a href=&quot;https://cseducators.stackexchange.com/questions/349/what-program-follows-hello-world/1257#comment14636_349&quot;&gt;pointed out in the comments&lt;/a&gt;, plenty of advanced tutorials and courses might begin with a &amp;quot;hello world&amp;quot;-style task.&lt;/p&gt;&#xA;&lt;p&gt;For example, in back end web development, any first-time Ruby on Rails tutorial will begin with getting the &amp;quot;Congratulations! You're on Rails!&amp;quot; screen up on localhost. For machine learning libraries, a classifier using the iris dataset is a canonical first order of business.&lt;/p&gt;&#xA;&lt;p&gt;The point here is that audience, language, framework and context matters in choosing a second task, and &amp;quot;hello world&amp;quot; isn't exclusive to beginning programmers or console-based contexts.&lt;/p&gt;&#xA;&lt;p&gt;With that in mind, a few answers recommend FizzBuzz after &amp;quot;hello world&amp;quot;. Initially, this struck me as rushing in too many fresh concepts that can take time for beginners to grasp: loops, booleans, branching and string manipulation. But if the audience has prior programming experience, FizzBuzz might be a reasonable difficulty for them. And if not, you can always build up, adding the conditions slowly, then the loop.&lt;/p&gt;&#xA;&lt;p&gt;I recently began learning Haskell from &amp;quot;hello world&amp;quot;, and found that I wrote a dozen or so smaller programs before I was able to write a FizzBuzz that accepted input, to cite an example of the language factor.&lt;/p&gt;&#xA;&lt;p&gt;Working backward from the goals of the course, the next step.&lt;/p&gt;&#xA;&lt;p&gt;I'll continue onward assuming beginners, though, since follow-ups to &amp;quot;hello world&amp;quot;s for experienced developers looking to learn the latest framework would be a case-by-case basis.&lt;/p&gt;&#xA;&lt;p&gt;In any situation, working backward from the goals of the course, the next step after &amp;quot;hello world&amp;quot; might become obvious.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;A &amp;quot;10 PRINT&amp;quot; approach&lt;/h3&gt;&#xA;&lt;p&gt;Answers so far mostly offer a command-line style, general-purpose task that would work in basically any language. But many languages (particularly educational ones like Racket, Scratch and BASIC) offer interesting features that make it easy to do relatively engaging and powerful things without much effort. One suggestion is to try to find and exploit these in whatever environment you're working in. In particular, I find that graphical programs, and particularly animations, are a great way to engage students, even if only ASCII.&lt;/p&gt;&#xA;&lt;p&gt;A classic example is &lt;a href=&quot;https://www.10print.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;10 PRINT&lt;/a&gt;, a simple BASIC program that produces a &lt;a href=&quot;https://www.youtube.com/watch?v=m9joBLOZVEo&quot; rel=&quot;nofollow noreferrer&quot;&gt;cool animation&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;10 PRINT CHR$(205.5+RND(1)); : GOTO 10&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;10 PRINT is not always as easy to achieve in other languages and environments (it exploits aesthetics of the environment's screen, native text wrapping, an easy-to-write infinite loop, and an easy-to-call random number generator), but there's often some other &amp;quot;hack&amp;quot; that happens to create a disproportionately cool effect of some sort in your language.&lt;/p&gt;&#xA;&lt;p&gt;For most scripting languages, it's pretty easy to provide boilerplate to do animations. In Python:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;from time import sleep&#xA;&#xA;while True:&#xA;    print(&amp;quot;hello world!&amp;quot;)&#xA;    sleep(1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Working with this basic framework, you can introduce numbers, math operations and string manipulation to add dynamism to the animation (and later on, explain the loop and import in more detail; it's good early exposure):&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;from time import sleep&#xA;&#xA;i = 0&#xA;while True:&#xA;    print(i % 10 * &amp;quot;@&amp;quot;)&#xA;    i += 1&#xA;    sleep(0.1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The &lt;code&gt;*&lt;/code&gt; operator in Ruby and Python and &lt;code&gt;x&lt;/code&gt; in Perl shows another easy trick for one-upping &amp;quot;hello world&amp;quot;. String repeat functions, when available, are fantastic: &lt;a href=&quot;https://www.destroyallsoftware.com/talks/wat&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;&amp;quot;Na&amp;quot; * 10 + &amp;quot; Batman!&amp;quot;&lt;/code&gt;&lt;/a&gt;. This works great with the &lt;a href=&quot;https://cseducators.stackexchange.com/a/355/9426&quot;&gt;print your name suggestion&lt;/a&gt; elsewhere in the thread.&lt;/p&gt;&#xA;&lt;p&gt;We can try 10 PRINT in Python (although the results won't be too impressive without the C64 monitor; consider adjusting terminal color and typeface prior to the session):&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;from time import sleep&#xA;from random import choice&#xA;&#xA;while True:&#xA;    print(choice(r&amp;quot;\/&amp;quot;), flush=True, end=&amp;quot;&amp;quot;)&#xA;    sleep(0.01)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;or print the &lt;code&gt;&amp;quot;\b&amp;quot;&lt;/code&gt; character to make a little animation in-place:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;from itertools import cycle&#xA;from time import sleep&#xA;&#xA;for c in cycle(&amp;quot;what's up?&amp;quot;):&#xA;    print(c, flush=True, end=&amp;quot;&amp;quot;)&#xA;    sleep(0.5)&#xA;    print(&amp;quot;\b&amp;quot;, end=&amp;quot;&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;or:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;for s in cycle((&amp;quot;hello&amp;quot;, &amp;quot;world&amp;quot;)):&#xA;    print(s, flush=True, end=&amp;quot;&amp;quot;)&#xA;    sleep(1)&#xA;    print(&amp;quot;\b&amp;quot; * len(s), end=&amp;quot;&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Even if students won't understand the code out of the box, they can play around with the string contents and speed, building intuition for what the shape of the code looks like and how it can create something dynamic and interesting with just a few lines.&lt;/p&gt;&#xA;&lt;p&gt;Al Sweigart has a repository of &lt;a href=&quot;https://github.com/asweigart/scrollart&quot; rel=&quot;nofollow noreferrer&quot;&gt;scroll art&lt;/a&gt; scripts for further inspiration, although most are more than a step after &amp;quot;hello world&amp;quot;.&lt;/p&gt;&#xA;&lt;h3&gt;Other ideas&lt;/h3&gt;&#xA;&lt;p&gt;Many languages have &lt;a href=&quot;https://en.wikipedia.org/wiki/Turtle_graphics&quot; rel=&quot;nofollow noreferrer&quot;&gt;turtle&lt;/a&gt; or &lt;a href=&quot;https://cseducators.stackexchange.com/a/3305/9426&quot;&gt;another minimal graphics library&lt;/a&gt; that lets you draw a circle with 2-3 lines of code and might be a great next step after &amp;quot;hello world&amp;quot;. This is a great choice for students coming from a Scratch background who may be prone to frustration at the relative difficulty of doing anything &amp;quot;fun&amp;quot; with text-based languages.&lt;/p&gt;&#xA;&lt;p&gt;In HTML, I find that a &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tag can open a world of creative options for &lt;a href=&quot;https://en.wikipedia.org/wiki/ASCII_art&quot; rel=&quot;nofollow noreferrer&quot;&gt;ASCII art&lt;/a&gt; without having to learn coding concepts immediately, similar to stacking a bunch of &lt;code&gt;print&lt;/code&gt; statements or a multiline string to create an &lt;a href=&quot;https://en.wikipedia.org/wiki/FIGlet&quot; rel=&quot;nofollow noreferrer&quot;&gt;ASCII banner&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The nonstandard &lt;a href=&quot;https://en.wikipedia.org/wiki/Marquee_element&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt;&lt;/a&gt; tags, although technically horrible, helped turn my generation on to web development, and are a great way to jazz up &amp;quot;hello world&amp;quot; (when supported). Sure, HTML is probably not relevant for most curricula here, but concepts like this can often inspire ideas for other languages.&lt;/p&gt;&#xA;&lt;p&gt;CSS offers powerful animation and transition techniques with just a line or two of code. For example, providing something like&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-html prettyprint-override&quot;&gt;&lt;code&gt;&amp;lt;style&amp;gt;&#xA;body {&#xA;  transition: all 2s;&#xA;}&#xA;body:hover {&#xA;  background: black;&#xA;}&#xA;&amp;lt;/style&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;can get students interacting with their app and provides a foundation for adding CSS properties, creating new elements and designs.&lt;/p&gt;&#xA;&lt;p&gt;For front-end JS, students can easily use the browser's development tools to manipulate content on Wikipedia or another popular website. For example, without writing code, they can change text to humorous effect while being exposed to the syntax and structure of HTML.&lt;/p&gt;&#xA;&lt;p&gt;If you don't mind sharing code students might not understand at first but will surely get a kick out of, you can try something like:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-js prettyprint-override&quot;&gt;&lt;code&gt;document.querySelectorAll(&amp;quot;*&amp;quot;).forEach(e =&amp;gt; {&#xA;  e.style.background = &amp;quot;#&amp;quot; + Math.random().toString(16).slice(-6);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;which sets all element backgrounds to random colors on a page, creating a glitchy art effect and hopefully giving students an idea of what's possible in the spirit of 10 PRINT. Snippets like these can open up conversations about &lt;a href=&quot;https://en.wikipedia.org/wiki/Creative_coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;creative coding&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Computer_art&quot; rel=&quot;nofollow noreferrer&quot;&gt;computer art&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/History_of_personal_computers&quot; rel=&quot;nofollow noreferrer&quot;&gt;history&lt;/a&gt; (even if those aren't the focus of the course).&lt;/p&gt;&#xA;&lt;h3&gt;It's OK to make a mess&lt;/h3&gt;&#xA;&lt;p&gt;Following the &lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt; principle, in most cases, it should be fine at this stage to let students make a mess and have fun, duplicate code everywhere, then enforce better software engineering principles later. Ugly and outside-the-box is encouraged. For web programming, grabbing snippets from &lt;a href=&quot;https://www.w3schools.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;w3schools&lt;/a&gt; is OK.&lt;/p&gt;&#xA;&lt;p&gt;For example, I've seen students push a few of their laptops together in a row and sync up the timing of their animations to make it look like text is scrolling between monitors! Encouraging creative, emergent collaboration among students and the tools in the environment enables students to create interesting experiences even with small amounts of code, as 10 PRINT does by exploiting aesthetic qualities of typeface and monitor.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-01-06T20:50:32.493" LastActivityDate="2022-01-06T20:50:32.493" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7113" PostTypeId="1" CreationDate="2021-11-11T07:23:00.800" Score="2" ViewCount="97" Body="&lt;p&gt;One thing that I am very clear is that there is no hard and fast algorithm to create CFG. The only wat to practice only. But how do I deal with new questions in exam? Are there types of problems that I need to know in order to be able to solve different types of problems? Can you guide me a bit about this issue?&lt;/p&gt;&#xA;" OwnerUserId="11256" LastEditorUserId="1293" LastEditDate="2021-11-11T13:20:20.933" LastActivityDate="2021-12-18T23:07:20.557" Title="How do I figure the types of problems in making Context Free Grammars?" Tags="|self-learning|" AnswerCount="1" CommentCount="8" ClosedDate="2021-12-30T06:33:18.747" ContentLicense="CC BY-SA 4.0" />
  <row Id="7116" PostTypeId="1" CreationDate="2021-11-16T17:39:51.503" Score="0" ViewCount="45" Body="&lt;p&gt;I'm an industry practitioner with a keen interest in education; recently I've been reading more about Vygotsky's &lt;a href=&quot;https://en.wikipedia.org/wiki/Zone_of_proximal_development&quot; rel=&quot;nofollow noreferrer&quot;&gt;Zone of Proximal Development&lt;/a&gt; and the theory of &lt;a href=&quot;https://en.wikipedia.org/wiki/Instructional_scaffolding&quot; rel=&quot;nofollow noreferrer&quot;&gt;Instructional Scaffolding&lt;/a&gt; whereby a student learns by performing a task while being provided the minimal needed support by an expert instructor. And then in a work context I suddenly had a lightbulb moment by connecting it to what we typically do in technical coding interviews in the industry - trying to figure out what is the minimal level of hints/support a candidate needs to solve a task at the expected level, and thus gain insights as to their capability gaps. And being on the candidate side of interviews in the past, I can report having learned a huge amount by receiving this kind of scaffolding from good interviewers.&lt;/p&gt;&#xA;&lt;p&gt;So here's my question: have there been any implementations of such interviews as an extensive tool for formal and ongoing formative assessment in either an academic course of studies or an industry setting? And if so, have there been measurements of the effectiveness of such an approach?&lt;/p&gt;&#xA;&lt;p&gt;In terms of related things I tried searching for so far:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I see similarities with the oral examination approach, but I only ever saw it used for summative, rather than formative assessments, and I've also not encountered any use of it in computer science education.&lt;/li&gt;&#xA;&lt;li&gt;From another angle, it is somewhat similar to what is commonly done in industry apprenticeships and on-the-job-training 'buddy' systems, which involve scaffolding in the context of pair-programming sessions, but I couldn't find any detail on it being done in a formal and consistent approach.&lt;/li&gt;&#xA;&lt;li&gt;Oh, and of course there are educational providers that actually focus on interview preparation, but from my experience, these generally focus on 'gaming' the interview process, as opposed to using it for the underlying learning objectives, and I couldn't find any literature to the contrary.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditDate="2021-11-17T00:39:39.640" LastActivityDate="2021-11-17T00:39:39.640" Title="The use of technical interviews for formative assessment" Tags="|assessment|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7117" PostTypeId="2" ParentId="7113" CreationDate="2021-11-18T22:09:55.253" Score="0" Body="&lt;p&gt;Here is one useful strategy. The union of context-free languages is context-free. If you can think of your target language as the union of simpler pieces, and you can think of a grammar for each piece (with start symbol &lt;span class=&quot;math-container&quot;&gt;$A_1$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$A_2$&lt;/span&gt;, etc.) then you can join all the grammars together with a production like &lt;span class=&quot;math-container&quot;&gt;$S \to A_1 \mid A_2 \mid \cdots$&lt;/span&gt;.&lt;/p&gt;&#xA;" OwnerUserId="6111" LastActivityDate="2021-11-18T22:09:55.253" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7118" PostTypeId="1" AcceptedAnswerId="7135" CreationDate="2021-11-20T00:18:38.010" Score="2" ViewCount="106" Body="&lt;p&gt;I want to get my students to &lt;strong&gt;exercise&lt;/strong&gt; the &lt;strong&gt;conditional-branching&lt;/strong&gt; mind-muscle. [edit: and I need it to be &lt;strong&gt;fun/playful&lt;/strong&gt;]&lt;/p&gt;&#xA;&lt;p&gt;I will ask them to read pseudo-code, then represent as a branching sketch[^1]. And vice-versa, go from illustration[^2] to pseudo-code.&#xA;Then of course coding practice.&lt;/p&gt;&#xA;&lt;p&gt;I wonder whether other teachers have found preferred[^3] conditional-branching exercising scenarios.&#xA;For &amp;quot;scenarios&amp;quot; I mean the stage-setting one does for an exercise to have meaning or sense beyond the pure technical ability. Real life scenarios are ok but magic fungi that split in half and multiply by two are also ok.&lt;/p&gt;&#xA;&lt;p&gt;Do you know any good conditional-branching exercising scenarios?&#xA;[^4]&lt;/p&gt;&#xA;&lt;p&gt;I'm right now thinking for a second class' homework. My students at this point are just familiar with assignment, &lt;code&gt;ints&lt;/code&gt; &lt;code&gt;strings&lt;/code&gt; and &lt;code&gt;floats&lt;/code&gt;, and printing and reading input... but of course I'm curious about any other that might have come to your mind.&#xA;Third class is lists and loops. Language is python. This line is mostly anecdotic but could be relevant.&lt;/p&gt;&#xA;&lt;p&gt;Sincere thanks&#xA;Let in the poetry&#xA;I'm happy about finding this sx&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;## 3/1 Update&lt;/p&gt;&#xA;&lt;p&gt;I am now thoroughly convinced that while loops fall into this class, as they are clearly conditional branching. In a longer course they might take a class on themselves, but since I've got eight classes I'd rather include them in this one and take the next one on for loops and lists than simple-mindedly slicing &amp;quot;loops&amp;quot; into its own class, as I feel somewhat inadequate to state that &amp;quot;there are two kinds of loops...&amp;quot; as I often read or hear.&#xA;This opens a lot of room for creative exercise scenarios. For instance offering a recurring menu could lead to fun name-composing.&#xA;Btw my students are high-schoolers mostly.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;em&gt;[^1]: (with no enforced appearance conditions, like the non-cute rhombus and whatnot)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;[^2]: (patiently drawn by the writer)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;[^3]: (&amp;quot;my lil battle horse&amp;quot;)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;[^4]: (I hope you'll spare me asking subjective, since I come with so much joy for my students and passion for the trade)&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="11276" LastEditorUserId="11276" LastEditDate="2021-12-03T14:44:38.947" LastActivityDate="2021-12-03T14:44:38.947" Title="What are some good conditional branching excercise scenarios?" Tags="|student-motivation|introductory-lesson|exercises|branching|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7119" PostTypeId="2" ParentId="7081" CreationDate="2021-11-20T14:46:44.843" Score="0" Body="&lt;p&gt;I have a video series on using UNIX on YouTube.  It is &lt;a href=&quot;https://www.youtube.com/playlist?list=PLlr7Jt5dPiv4-oAMaY1Vs8skvzRjPDy62&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.  This is useful for Mac/Linux users or if your students log onto a server to program at the command line (they should have this experience).&lt;/p&gt;&#xA;&lt;p&gt;Also, if you are a windows user, you can enable your BASH subsystem.  You then have a UNIX shell on your windows box.&lt;/p&gt;&#xA;&lt;p&gt;Alumni tell me that command-line skill is still highly valued.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-11-20T14:46:44.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7121" PostTypeId="2" ParentId="4324" CreationDate="2021-11-21T08:04:57.123" Score="1" Body="&lt;p&gt;I am a University EE Instructor and this year is my first year to teach DIGITAL I (which include Boolean Algebra).  In the course I primarily use ⋅, +, ¯ but the challenge with these is that they require special characters that some systems (like Canvas) do not support.  Also, for my slides and exams I have to use the equation editor and teaching that to the students as well is an extra barrier.  Using symbols that are on a keyboard make things a lot easier for me and the students.  For that reason I have started to prefer + for OR, ' for NOT and adjacency for AND.&#xA;Ex: DeMorgan's First Theorem is (A+B)'=A'B'&lt;/p&gt;&#xA;" OwnerUserId="11279" LastActivityDate="2021-11-21T08:04:57.123" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7122" PostTypeId="1" CreationDate="2021-11-23T04:17:32.300" Score="0" ViewCount="56" Body="&lt;p&gt;Does there exist a resource for exercises and problems of the form &amp;quot;design a program with the following specifications in time/space O(f(n))&amp;quot;?&lt;/p&gt;&#xA;&lt;p&gt;I am aware of competitive programming websites but i can't currently program due to migraines. I can't practice off these websites because often the best solution is some exponential algorithm which I will have no way of knowing whether it will work without implementing it.&lt;/p&gt;&#xA;&lt;p&gt;CLRS is a good resource for problems but there aren't enough to practice on a regular basis. I would like a resource preferably of the computer contest flavor but where I can practice on pen and paper rather than programming it.&lt;/p&gt;&#xA;&lt;p&gt;Alternatively, how can I make the most of programming contest problems so that I can practice algorithms with pen and paper without implementing anything?&lt;/p&gt;&#xA;" OwnerUserId="11284" LastActivityDate="2021-11-23T04:17:32.300" Title="Resource for practicing algorithms without programming? (migraine sufferer)" Tags="|self-learning|resource-request|algorithms|resource-information|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7123" PostTypeId="1" CreationDate="2021-11-24T06:34:00.283" Score="8" ViewCount="696" Body="&lt;p&gt;I have studied books on C like the classic &amp;quot;The C Programming Language [2e]&amp;quot; by Dennis Ritchie, Brian Kernighan or &amp;quot;C-The Complete Reference [4e]&amp;quot; by Herbert Schildt. But these texts are quite old and do not quite deal with the latest standards [They deal with C89 and C99]&lt;/p&gt;&#xA;&lt;p&gt;Can anyone suggest a good book on C which is more up-to date... and has descriptions of the standards... [Like in K&amp;amp;R book at the end of the book there is a manual but is not the standard: &lt;em&gt;&amp;quot;This manual describes the C language specified by the draft submitted to ANSI on 31 October, 1988, for approval as &amp;quot;American National Standard for Information Systems—Programming Language C, X3.159-1989.&amp;quot; The manual is an interpretation of the proposed standard, not the Standard itself, although care has been taken to make it a reliable guide to the language.&amp;quot;&lt;/em&gt;]&lt;/p&gt;&#xA;&lt;p&gt;Is there any book (or some other equivalent [online?] resource) which deals with modern standard in detail with possible illustrative code examples.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2021-11-24T17:58:13.990" Title="A more recent book (or equivalent resource) on C programming to be acquainted with the latest standards (or the language grammar)" Tags="|self-learning|resource-request|c|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7124" PostTypeId="1" CreationDate="2021-11-24T11:31:34.603" Score="0" ViewCount="76" Body="&lt;p&gt;My students have a hard time assigning correct responsibilities and methods to classes. They get confused about which method suits which class better.&lt;/p&gt;&#xA;&lt;p&gt;Suppose we have two classes, class A and class B. It may not be very clear if method m1() is best to belong to class A or to class B.&lt;/p&gt;&#xA;&lt;p&gt;Any references or methods that help in this regard is extremely appreciated.&lt;/p&gt;&#xA;" OwnerUserId="11137" LastEditorUserId="11137" LastEditDate="2021-11-24T16:55:03.083" LastActivityDate="2021-11-25T13:31:44.310" Title="How to decide which methods are responsibility of which classes" Tags="|resource-request|object-oriented-paradigm|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7125" PostTypeId="1" CreationDate="2021-11-24T11:34:24.950" Score="0" ViewCount="37" Body="&lt;p&gt;UML State diagrams could represent a single object, a system or a sub-system. I am looking for the best methods and resources which help students draw correct state diagrams, and at the right level of detail. Many thanks.&lt;/p&gt;&#xA;" OwnerUserId="11137" LastActivityDate="2021-11-24T11:34:24.950" Title="Regarding state diagrams - (different levels)" Tags="|resource-request|object-oriented-paradigm|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7126" PostTypeId="2" ParentId="7123" CreationDate="2021-11-24T16:21:30.323" Score="4" Body="&lt;p&gt;If you are already an advanced C programmer, perhaps you need to look at the actual standard, say, for C17. You can find information about the standards, including links to ISO documents here: &lt;a href=&quot;https://en.wikipedia.org/wiki/ANSI_C&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/ANSI_C&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The technical documentation for some of the modern compilers might also be a help. The same link mentions some of those.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2021-11-24T16:21:30.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7127" PostTypeId="2" ParentId="7124" CreationDate="2021-11-24T17:00:39.583" Score="3" Body="&lt;p&gt;I'm not going to name a resource, partly because it might be my own work. But I can give a mini-lesson.&lt;/p&gt;&#xA;&lt;p&gt;The question actually sounds like it comes from someone who is familiar with &amp;quot;procedural programming&amp;quot; in some way and wants to hammer the thinking mode from that into a completely different paradigm: OO programming.&lt;/p&gt;&#xA;&lt;p&gt;Different paradigms require different ways of thinking and it can be difficult, even impossible for some, to switch paradigms. It took me a long time to switch to a deep understanding of OO after being completely immersed in procedural programming. I'm still a very weak functional programmer unless I get some helps like the concrete syntax of something like Standard ML.&lt;/p&gt;&#xA;&lt;p&gt;In the procedural programming paradigm you consider a solution to be the result of carrying out a process. The process is carried out by one or more procedures (and/or functions). The &amp;quot;Way to Program&amp;quot; is one of writing complex procedures as some sort composition of simpler procedures. This seems to me to be the way of thinking that you (the OP) normally apply. If you try to force this way of thinking into OO it becomes very artificial. Hence the problem you face.&lt;/p&gt;&#xA;&lt;p&gt;In OO programming you don't think of a program or a solution as a process, but as the interaction of independent entities (objects) that each have &lt;em&gt;behaviors&lt;/em&gt; that can be invoked. The objects are self contained and present an interface to the larger program, perhaps defined by a class.&lt;/p&gt;&#xA;&lt;p&gt;So, the way to think in OO is &amp;quot;what are the objects and how do they behave&amp;quot;. Given a problem statement, think about the nouns, which normally represent &amp;quot;things&amp;quot; that can be objects. How do such &amp;quot;things&amp;quot; normally behave and how do they interact with other things with the same and different behaviors.&lt;/p&gt;&#xA;&lt;p&gt;Complex &amp;quot;things&amp;quot; can be composed of simpler things (other objects defined by other classes), not just primitives of the language. It is a big step too learn to model the problem space as objects composed of and interacting with other objects.&lt;/p&gt;&#xA;&lt;p&gt;Then the solution of the problem becomes something like a choreography getting the various objects to exhibit their inherent behaviors in a coherent way toward a goal.&lt;/p&gt;&#xA;&lt;p&gt;If you can start to think that way or teach it to your students, then your question goes away. The &amp;quot;methods&amp;quot; represent the behaviors of the objects, so there is no notion of &amp;quot;distributing&amp;quot; them to classes.&lt;/p&gt;&#xA;&lt;p&gt;Think of objects as &amp;quot;bundles of behavior&amp;quot;, with the public methods defining that behavior. Avoid thinking of them as &amp;quot;bundles of values&amp;quot; that get operated on by the methods. The methods are primary, the fields are there to support those behaviors.&lt;/p&gt;&#xA;&lt;p&gt;One aspect of the &amp;quot;bundles of behavior&amp;quot; idea is embodied in the &amp;quot;Tell, Don't Ask&amp;quot; principle. This means that most methods of an object tell it to do something, rather than ask it for information to be used elsewhere. This centralizes decision making (and mutation) in the object itself, rather than pushing it elsewhere in the program, which would make it harder to track. So, few methods should access information, and especially avoid accessing the values of fields.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;One of my favorite examples of paradigm change is the &lt;em&gt;Battle of Agincourt&lt;/em&gt; in which Henry V destroyed the French knighthood by changing the paradigm. He defeated and army of highly trained warriors (knights) with a peasant army (archers). The French had no way to reply.&lt;/p&gt;&#xA;&lt;p&gt;But it took about a century before nobles were no longer trained as knights, with Henry VIII being the last fully trained king-knight. Old lessons die hard.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-11-25T13:31:44.310" LastActivityDate="2021-11-25T13:31:44.310" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7128" PostTypeId="2" ParentId="7123" CreationDate="2021-11-24T17:58:13.990" Score="6" Body="&lt;p&gt;Ben Klemens' &lt;em&gt;&lt;a href=&quot;https://www.oreilly.com/library/view/21st-century-c/9781491904428/&quot; rel=&quot;noreferrer&quot;&gt;21st Century C&lt;/a&gt;&lt;/em&gt;, now in its second edition, doesn't necessarily &lt;em&gt;precisely&lt;/em&gt; meet this need, but I'd give it a shot anyway—it's not just a &amp;quot;description of the standard&amp;quot;, but also covers how modern C is used &lt;em&gt;in practice&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="11292" LastActivityDate="2021-11-24T17:58:13.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7129" PostTypeId="2" ParentId="6511" CreationDate="2021-11-24T22:57:29.257" Score="1" Body="&lt;p&gt;I can remember when I first read an early book about C++, and (knowing C) I wondered: &amp;quot;What is this all about? Just a more complicated way of doing things?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Years later I read the early C++ language specification (with much more stuff added), and I learned a lot of things to do,&lt;/p&gt;&#xA;&lt;p&gt;ELLIS, Margaret A. und Bjarne STROUSTRUP, 1990. The annotated C++ Reference Manual. 1. Murray Hill, New Jersey, U.S.A.: Addison-Wesley Publishing Company. ISBN 0-201-51459-1&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;but&lt;/strong&gt; I really had no idea what OOP is really about until I had read (German):&lt;/p&gt;&#xA;&lt;p&gt;MEYER, Bertrand, 1990. Objektorientierte Softwareentwicklung. München Wien: Prentice-Hall International Inc. ISBN 3-446-15773-5&lt;/p&gt;&#xA;&lt;p&gt;and later (2nd edition):&lt;/p&gt;&#xA;&lt;p&gt;MEYER, Bertrand, 1997. Object-Oriented Software Construction. 2. Upper Saddle River, NJ 07458, U.S.A.: Prentice-Hall, Inc. ISBN 0-13-629155-4&lt;/p&gt;&#xA;&lt;p&gt;Also nice:&lt;/p&gt;&#xA;&lt;p&gt;MEYER, Bertrand, 1994. Reusable Software. 1. Hemel Hempstead, Hertfordshire, U.K.: Prentice-Hall International (UK) Ltd. Prentice Hall Object-Oriented Series. ISBN 0-13-245499-8202&lt;/p&gt;&#xA;&lt;p&gt;In summary: You can do quite a lot of things with OO languages, but many things are &lt;em&gt;not&lt;/em&gt; OOP.&lt;/p&gt;&#xA;&lt;p&gt;Of course Eiffel is somewhat exotic.&lt;/p&gt;&#xA;" OwnerUserId="11293" LastActivityDate="2021-11-24T22:57:29.257" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7131" PostTypeId="1" CreationDate="2021-11-26T03:57:40.747" Score="5" ViewCount="446" Body="&lt;p&gt;I tried learning by  making projects, but found myself in a place where I would mug up things rather than learning anything.&lt;/p&gt;&#xA;&lt;p&gt;So I am currently doing textbook styled programming learning. I am reading a chapter. Then solving all programming  examples, maybe programming assignments, if I am interested, some mcqs as well. And find the output kind of exercises to familiarize myself with python.&lt;/p&gt;&#xA;&lt;p&gt;Is this right approach? Till now I am actually learning stuffs as my base is very strong. But is this sustainable? If I go on doing this, I will have my own python documentation tbh. Is this right approach? I am sceptical. Please guide. Also why didn't I learn by making projects? After what point of time of learning programming should I stumble into making projects? And what types of projects should I start with. Don't say hangman etc because I can barely code leap year program in python or any other languages.&lt;/p&gt;&#xA;" OwnerUserId="11298" LastActivityDate="2021-12-14T07:23:08.947" Title="Is learning programming by doing projects right way to learn programming" Tags="|self-learning|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7132" PostTypeId="2" ParentId="7131" CreationDate="2021-11-26T14:38:39.557" Score="3" Body="&lt;p&gt;Yes, learning by doing projects is an excellent way to learn programming (and problem solving through programming). Unfortunately the skill to create a good project and the skill to write a program for solution of it are completely different problems. The former skill replies heavily on already having deep knowledge of the latter.&lt;/p&gt;&#xA;&lt;p&gt;So, your problem is in coming up with problems and you don't have the skill to do that yet and probably won't for a long time if you are still having issues with the syntax and semantics of a programming language.&lt;/p&gt;&#xA;&lt;p&gt;I don't have a good Python reference for you, but in Java there is a website called &lt;a href=&quot;https://greenroom.greenfoot.org/door&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Greenroom&lt;/a&gt; that describes lots of projects. Any of those could be adapted (conceptually) to Python, though with difficulty.&lt;/p&gt;&#xA;&lt;p&gt;There is one other difficulty, however, and that is that when you make up your own projects and then build them, you may wander too much from the ideal when things get hard since there is not real standard to work towards. If you could find someone experienced in creating &lt;em&gt;useful&lt;/em&gt; projects who would feed them to you it would help.&lt;/p&gt;&#xA;&lt;p&gt;In my own case, I once found a book that described a few projects (in Fortran) that formed the early basis of my programming education: &lt;a href=&quot;https://www.worldcat.org/title/computing-problems-for-fortran-solution/oclc/409611&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Computing Problems for Fortran Solution&lt;/em&gt; by Teague&lt;/a&gt;. I think it would be hard to get a copy of it, but the problems themselves can be solved in other languages.&lt;/p&gt;&#xA;&lt;p&gt;Note that I've found that the best projects for beginners are those that come with a fair amount, maybe a lot) of already built code, providing a framework for the student in which to work. Starting with a blank page is very difficult when you are still learning.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-11-26T15:38:46.693" LastActivityDate="2021-11-26T15:38:46.693" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7133" PostTypeId="2" ParentId="7131" CreationDate="2021-11-28T14:29:31.020" Score="1" Body="&lt;p&gt;I often introduce new constructs &amp;quot;in context&amp;quot; by asking a question akin to, &amp;quot;Wouldn't it be useful if....?&amp;quot;   For example, I might introduce dictionaries in this way.&lt;/p&gt;&#xA;&lt;p&gt;Suppose you are performing an experiment such as tossing a fair coin until a head appears and you are interested in running the experiment 1,000,000 times to see what the distribution looks like.   You don't know right off what range of outcomes you might get, so wouldn't it be useful if, instead of using a list, you are able to index a tally on an arbitrary collection of integers.&lt;/p&gt;&#xA;&lt;p&gt;A dictionary is handy:  you can enroll an outcome in the dictionary by executing&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;tally[outcome] = 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and you can increase its tally with&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;tally[outcome] += 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In this way, you don't have to worry about creating a list in advance large enough to accommodate such a tally.  This tally-making pattern is useful in a variety of contexts.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-11-28T14:29:31.020" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7134" PostTypeId="2" ParentId="7131" CreationDate="2021-11-28T19:57:49.327" Score="2" Body="&lt;p&gt;I am constantly having to learn new things in order to teach them, so I am in this situation regularly.  If I were to teach myself from scratch, I would do a mix of essentially 4 things:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;My own projects&lt;/li&gt;&#xA;&lt;li&gt;Premade problems (such as your textbook examples)&lt;/li&gt;&#xA;&lt;li&gt;Tutorials&lt;/li&gt;&#xA;&lt;li&gt;Deeper dives into whatever aspect of the language interested me at that moment&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;All four of the activities work together in tandem.  They expand your horizons in different ways, but also have different caveats:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;My own projects:&lt;/strong&gt; these push your ability to figure things out, research, and get things moving. This is where you will experience much of your long-term grown. As an aside, I agree with one of the commenters that a project that doesn't bear fruit is still very valuable.  Many of the reasons for why languages are the way they are, and why we do things the way we do, is borne of the collective pain of projects that failed, and most of those practices won't (can't, really) make sense in your own mind until you've lived through some of the problems yourself.  (Can't figure out why we care about clear variable names?  Wait until you try to make sense of code that you yourself wrote just 7 months ago, and you will suddenly wish that you had left a clearer breadcrumb trail for yourself.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Premade problems:&lt;/strong&gt; these are, essentially, &lt;em&gt;curated study&lt;/em&gt;, and if properly organized, will allow you to explore at least a few topics with assurance that you'll visit all is the most important parts of those topics.  (In essence, you will learn at least some things &lt;em&gt;well&lt;/em&gt;). (BTW, free or paid courses also fit into this category, and paid courses with instructor feedback are essentially this, but on crazy steroids.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Tutorials&lt;/strong&gt; can get you moving rapidly outside of your knowledge and comfort zone, which is wonderful.  One caveat is that many tutorials on YouTube are, for whatever reason, given by self-learners. Ad a result, there is a lot of very messy code out there under the guise of &amp;quot;tutorials&amp;quot;.  So absolutely look to them to get you moving into new areas and pull you out of ruts, but treat the programming practices you see as somewhat suspect.   You'll find higher-quality information in the textbooks and on stack overflow.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Deeper dives into whatever aspect of the language interested me at that moment:&lt;/strong&gt; these are your &lt;em&gt;&amp;quot;strike while the iron is hot&amp;quot;&lt;/em&gt; moments.  You learn the most when your are highly motivated, so if something catches your fancy as especially fascinating, jump on it and see what you can grab from the internet's firehose of information.  You may not understand everything you find, but even that is useful, since it sets you up knowing more areas to be explore later.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once you get to the point where you can consistently make small-to-medium sized projects with a fair amount of success, more avenues of growth will open up to you as well.  At some point, you will really need to start getting feedback in order to continue your growth, but you can get yourself up and running without it at the start.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-11-28T19:57:49.327" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7135" PostTypeId="2" ParentId="7118" CreationDate="2021-11-28T23:24:56.583" Score="3" Body="&lt;p&gt;There are literally zillions of scenarios. Even before the loops are introduced. For example,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Min, max, and clipping a value into an interval.&lt;/li&gt;&#xA;&lt;li&gt;Figure out whether a year is a leap one.&lt;/li&gt;&#xA;&lt;li&gt;Determine if a Queen attacks a given square.&lt;/li&gt;&#xA;&lt;li&gt;Solve the quadratic equation in reals (&lt;code&gt;if det &amp;lt; 0:&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Calculate the value of a blackjack hand (an ace could be 1 or 11, your choice - just don't get busted if possible).&lt;/li&gt;&#xA;&lt;li&gt;Find the counterfeit coin with balance scales (you know those puzzles)&lt;/li&gt;&#xA;&lt;li&gt;Describe how to diagnose a network outage (is it the problem with your PC, the router, the  ISP, the backbone. or is it an Armageddon already?).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The last two are nice examples of a problem where the flowchart is more relevant than the code.&lt;/p&gt;&#xA;" OwnerUserId="182" LastActivityDate="2021-11-28T23:24:56.583" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7136" PostTypeId="2" ParentId="7131" CreationDate="2021-11-29T15:45:18.417" Score="3" Body="&lt;p&gt;Strictly, there is no clear answer. It depends on both you as a student, and what you intend to achieve. If the goal is to learn how to develop software, and you are someone who can learn from practical experience, then yes.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;So I am currently doing textbook styled programming learning. I am reading a chapter. Then solving all programming examples&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is perfectly fine too, and can definitely help you get started and find the lay of the land quicker. There are some things that you're only really going to learn the hard way and not from a book; but you'll eventually bump into those regardless of whether you used a book or not.&lt;/p&gt;&#xA;&lt;p&gt;Generally speaking, development lends itself well to practical learning, because most (if not all) of development is something we created because we wanted to get to a certain goal. That is precisely what practical learning teaches you, and that's why it tends to work very well here.&lt;/p&gt;&#xA;&lt;p&gt;Personally speaking, if you teach me the theory first, I tend not to really learn from it. I need to work at something, be stumped by it, and &lt;em&gt;then&lt;/em&gt; look up the theory behind it. When my mind has an active question, it registers the answer so much better than when you try to explain something that I don't yet know if I need it. But that's for me personally.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;my goal is to get a web developer job. so mugging up is right?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Most definitely&lt;/strong&gt;. I may be biased here because I am much better at backends than frontends; but web development, specifically visual layouting, is something that you very much have to learn by trying over and over to get it to look the way you want it to.&lt;br /&gt;&#xA;Guidance and mentoring definitely helps you get there, but you will definitely also need to learn how to shuffle things around when they're not looking quite right, and that's something you learn from experience more than explanation.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;And what types of projects should I start with. Don't say hangman etc because I can barely code leap year program in python or any other languages.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You're comparing apples and oranges here. Don't confuse difficult programming with having difficult rules.&lt;/p&gt;&#xA;&lt;p&gt;Leap year calculation is difficult &lt;em&gt;regardless&lt;/em&gt; of whether you're programming it or writing an explanation in English. It's just a really contrived rule set. Having a complex rule set is making things more difficult for you to also learn programming at the same time.&lt;/p&gt;&#xA;&lt;p&gt;It would be much better to program something which you already innately understand. This means that your mental effort can be focused on how to express what you already know (in English) in code, which is what programming is.&lt;/p&gt;&#xA;&lt;p&gt;The rules of Hangman are easy to explain in English. If that doesn't apply to you, pick something else that you know very well. The best example are games that young children can play, as these games inherently have a simple set of rules that is easy to remember. Tic Tac Toe, Hangman, even just something silly like &amp;quot;guess what number I'm thinking of&amp;quot; (and I'll tell you if it's higher or lower) would be perfectly fine.&lt;/p&gt;&#xA;&lt;p&gt;As long as you understand the rules of the game (or application), and know precisely what it should do (when explaining it in spoken language), you can break down most things.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The core skill of a programmer is more in the breaking down of a complex problem into smaller and easier ones than it is in writing the code itself.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Of course you first need to learn the code basics to get started, but you can make myriad games and applications using a very limited set of programming basics under your belt. If you know:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read user input&lt;/li&gt;&#xA;&lt;li&gt;Write output to the console&lt;/li&gt;&#xA;&lt;li&gt;Using variables (integers, strings, booleans)&lt;/li&gt;&#xA;&lt;li&gt;Simple mathematical operations (&lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Conditionals (&lt;code&gt;if&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Arrays (or any type of &amp;quot;list&amp;quot; in your language of choice)&lt;/li&gt;&#xA;&lt;li&gt;Iterations (&lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;foreach&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You can create pretty much any game for children.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2021-11-29T15:51:55.723" LastActivityDate="2021-11-29T15:51:55.723" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7137" PostTypeId="1" AcceptedAnswerId="7139" CreationDate="2021-12-04T09:19:11.947" Score="4" ViewCount="597" Body="&lt;p&gt;I have seen that programmers test their programs often to find out if there are bugs. But is there a way to prove mathematically that a software has no bugs? If it is possible, why it is used so seldomly? For example, Linux kernel has many bugs.&lt;/p&gt;&#xA;" OwnerUserId="11317" LastActivityDate="2021-12-24T16:13:11.630" Title="Is it possible to prove software to be bugless?" Tags="|mathematics|debugging|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7138" PostTypeId="2" ParentId="7137" CreationDate="2021-12-04T14:54:18.330" Score="0" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Is it possible to prove software to be bugless?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Within reason, e.g. &lt;a href=&quot;https://en.wikipedia.org/wiki/Halting_problem&quot; rel=&quot;nofollow noreferrer&quot;&gt;Halting Problem&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The most complete work I know of at present is&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://vst.cs.princeton.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Verified Software Toolchain&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The software toolchain includes static analyzers to check assertions about your program; optimizing compilers to translate your program to machine language; operating systems and libraries to supply context for your program. The Verified Software Toolchain project assures with machine-checked proofs that the assertions claimed at the top of the toolchain really hold in the machine-language program, running in the operating-system context.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="27" LastEditDate="2021-12-13T03:34:19.063" LastActivityDate="2021-12-13T03:34:19.063" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7139" PostTypeId="2" ParentId="7137" CreationDate="2021-12-04T14:54:55.427" Score="2" Body="&lt;p&gt;&amp;quot;In theory, theory is the same as practice, but not in practice.&amp;quot; (Often attributed to Yogi Berra).&lt;/p&gt;&#xA;&lt;p&gt;Let me try to explain why the problem is hard - harder than it seems. Some things can be formally verified, others not.&lt;/p&gt;&#xA;&lt;p&gt;First, a piece of software to be verified is part of an ecosystem. It interacts with other software that may not be verified. Moreover, it depends on other systems (software and hardware) down to the silicon level. There may be unfound issues both at a given level and in the software/hardware stack on which it depends.&lt;/p&gt;&#xA;&lt;p&gt;Second, software can be very complex. Humans have limited ability to see all the nuances that might be involved. In some areas math and math-like processes can help, but people also make mistakes. It is possible to verity some algorithms, but the software implementations of those algorithms are not always perfect. We can try to rely on automated proof systems, but they are also subject to having errors.&lt;/p&gt;&#xA;&lt;p&gt;Third, there is the question of what you mean by &amp;quot;errors&amp;quot;. Some important systems have fairly &amp;quot;fuzzy&amp;quot; requirement specifications. Error usually means &amp;quot;not conforming to the specification&amp;quot;, but the specification itself, being created (most cases) by a human, is subject to both error and incompleteness. Humans aren't very good at thinking about &amp;quot;everything&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Fourth, things change. A correctly operating software system exists in a changing world. Processors change, operating systems change, associated software (libraries) change. So it is difficult to say whether a system that was working properly last year continues to do so. Even when all the parts are &amp;quot;correct&amp;quot;, the interactions may introduce subtle errors.&lt;/p&gt;&#xA;&lt;p&gt;So, some things can be done and it is useful to extend what can be done, but we are, at the moment anyway, only really able to attack the most important issues and questions. The core problems we see. Formal verification of core processes helps, but, again, algorithms and implementations are not, precisely, the same thing.&lt;/p&gt;&#xA;&lt;p&gt;One may hope that sophisticated AI systems might help with this. But (IMO) currently available systems are flawed and overhyped. They can and do produce poor (even evil) outcomes. There is a joke in AI circles that &amp;quot;true&amp;quot; AI is ten years away and has been (to my knowledge) for at least five decades. And so it remains.&lt;/p&gt;&#xA;&lt;p&gt;Things that can be perfectly specified can likely be proven correct. But software isn't really like that. The problem remains hard. Testing is required, but it is also imperfect. Some practices (pair programming, test first, small increments) reduce the number of errors but can't guarantee their absence.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you want to learn an important technique in building error free software, I recommend a book: &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Science of Programing&lt;/a&gt; by David Gries. The idea is to develop programs from pre and post conditions (specifications, actually) and program invariants.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-12-04T17:07:48.500" LastActivityDate="2021-12-04T17:07:48.500" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7140" PostTypeId="1" AcceptedAnswerId="7141" CreationDate="2021-12-05T22:23:45.747" Score="6" ViewCount="769" Body="&lt;p&gt;I am planning to begin teaching Computer Science topics in video/slide form. I would like to be able to easily create visualizations of trees and graphs (and other data structures would be great as well). I have seen some other educators have great visualizations that allow them to beautifully visualize these concepts and even step through and highlight nodes or edges to make the content more engaging. However, I have tried googling and I can't seem to find software that does this well. I am open to either free or paid options, does anyone know any good software or tooling for this?&lt;/p&gt;&#xA;" OwnerUserId="11321" LastActivityDate="2022-02-15T11:50:43.367" Title="Graph / Tree Visualization Software" Tags="|programming|graph-theory|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7141" PostTypeId="2" ParentId="7140" CreationDate="2021-12-06T07:28:18.150" Score="8" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;easily create visualizations of trees and graphs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Microsoft_Visio&quot; rel=&quot;nofollow noreferrer&quot;&gt;Visio&lt;/a&gt;&lt;br /&gt;&#xA;The easiest way is to use a tool like Visio. It is &lt;a href=&quot;https://en.wikipedia.org/wiki/WYSIWYG&quot; rel=&quot;nofollow noreferrer&quot;&gt;WYSIWYG&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Also see &lt;a href=&quot;https://www.maketecheasier.com/5-best-free-alternatives-to-microsoft-visio/&quot; rel=&quot;nofollow noreferrer&quot;&gt;13 Free Alternatives to Microsoft Visio&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://graphviz.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;GraphViz&lt;/a&gt;&lt;br /&gt;&#xA;Very popular. Works with different grammars for defining the graphs with &lt;a href=&quot;https://graphviz.org/doc/info/lang.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;DOT&lt;/a&gt; being the most commonly used. Somewhat easy after you get past your fist few.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://plantuml.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;PlantUML&lt;/a&gt;&lt;br /&gt;&#xA;PlantUML is used to draw UML diagrams, using a simple and human readable text description. GraphViz must be installed to use. Also has an &lt;a href=&quot;http://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000&quot; rel=&quot;nofollow noreferrer&quot;&gt;online server&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://js.cytoscape.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cytoscape.js&lt;/a&gt;&lt;br /&gt;&#xA;Graph theory (network) library for visualisation and analysis. Works with JavaScript, HTML and JSON to create interactive HTML pages. Not easy to learn and use but once mastered can make dynamic graphs and even animate them, e.g. walking a tree.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://d3js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;D3&lt;/a&gt;&lt;br /&gt;&#xA;D3.js is a JavaScript library for manipulating documents based on data.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://gojs.net/latest/index.html?v220&quot; rel=&quot;nofollow noreferrer&quot;&gt;GoJS&lt;/a&gt;&lt;br /&gt;&#xA;A Web Framework for Rapidly Building Interactive Diagrams.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.ni.com/en-us/shop/labview/select-edition/labview-community-edition.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;LabVIEW&lt;/a&gt; Community Edition&lt;br /&gt;&#xA;LabVIEW offers a graphical programming approach to help you visualize every aspect of your application, including hardware configuration, measurement data, and debugging.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://docutils.sourceforge.io/rst.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Restructured Text&lt;/a&gt;&lt;br /&gt;&#xA;Markup Syntax and Parser Component of Docutils. The web sites can even include interactive content. &lt;a href=&quot;https://opendsa-server.cs.vt.edu/OpenDSA/Books/PL/html/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/LaTeX&quot; rel=&quot;nofollow noreferrer&quot;&gt;LaTeX&lt;/a&gt;&lt;br /&gt;&#xA;LaTeX is a software system for document preparation.&#xA;Diagrams in research papers are typically made using LaTeX. LaTeX is not easy. LaTeX is a Turning complete programming language with packages, hierarchies, add-ins, etc. For writing technical math notation this is a popular option.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.mathjax.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MathJax&lt;/a&gt;&lt;br /&gt;&#xA;Beautiful and accessible math in all browsers&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.markdownguide.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MarkDown&lt;/a&gt;&lt;br /&gt;&#xA;Markdown makes writing on the web fast and easy.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Web pages&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.w3schools.com/html/default.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML&lt;/a&gt; - The language for building web pages.&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.w3schools.com/css/default.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSS&lt;/a&gt; - The language we use to style an HTML document.&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.w3schools.com/sass/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sass&lt;/a&gt; - Reduces repetition of CSS and therefore saves time.&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.w3schools.com/js/default.asp&quot; rel=&quot;nofollow noreferrer&quot;&gt;JavaScript&lt;/a&gt; - The programming language of the Web.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.doxygen.nl/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Doxygen&lt;/a&gt;&lt;br /&gt;&#xA;Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL and to some extent D.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="2516" LastEditorUserId="2516" LastEditDate="2022-02-15T11:50:43.367" LastActivityDate="2022-02-15T11:50:43.367" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7142" PostTypeId="1" CreationDate="2021-12-09T06:37:48.083" Score="2" ViewCount="150" Body="&lt;p&gt;Many developing countries are having a large population that does not have access to computers/laptops. In such cases, what are the innovative ideas to teach and select students who like to study computer science and programming further?&lt;/p&gt;&#xA;" OwnerUserId="11328" LastActivityDate="2021-12-10T23:36:21.127" Title="How to teach programming to underprivilege kids who are not having access to laptop?" Tags="|programming|" AnswerCount="3" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7144" PostTypeId="2" ParentId="7142" CreationDate="2021-12-10T15:06:08.543" Score="2" Body="&lt;p&gt;I am not experienced in this area so these may be naive ideas so take this with a grain of salt:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Study the limits of computers:&lt;/strong&gt; &amp;quot;What can computers do? what can't they do?&amp;quot; We need citizens to understand the difference between what Hollywood movies say computers can do and what they actually can do (myths vs. reality).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Teach algorithmic thinking:&lt;/strong&gt; When I was little I helped my mother with the laundry.  I learned to match socks using various algorithms: linear search, grouping by size then searching within groups, etc.  I feel this experience helped me greatly when I was old enough to have access to a computer and needed to be able to describe tasks algorithmically.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Teach that computers are literal:&lt;/strong&gt; &amp;quot;do what I say, not what I want&amp;quot;.  An exercise like &amp;quot;the exact instructions challenge&amp;quot; can help younger students : &lt;a href=&quot;https://www.youtube.com/watch?v=Ct-lOOUqmyY&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=Ct-lOOUqmyY&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Share the computers they do have:&lt;/strong&gt; When I learned to code my school could only afford 1 computer for every 3 students in the class. The teacher created instructions based around this. We had to take turns, time how long we were using the computer, etc.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Do it on the phone:&lt;/strong&gt; Maybe there are programming assignments that can be done on their phones?  They might not have laptops but they might have Android or iPhones.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="53" LastActivityDate="2021-12-10T15:06:08.543" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7145" PostTypeId="2" ParentId="7142" CreationDate="2021-12-10T15:27:45.120" Score="2" Body="&lt;p&gt;I have two suggestions. The first is open to everyone, but the second depends on some local conditions and doesn't scale.&lt;/p&gt;&#xA;&lt;p&gt;First learn about &lt;a href=&quot;https://en.wikipedia.org/wiki/Computational_thinking&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computational Thinking&lt;/a&gt; and especially &lt;a href=&quot;https://www.csunplugged.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt;. Quite a lot of educators have been thinking about this for a while, though mostly about teaching young students some principles with the expectation that they might be involved with programming at a later time.&lt;/p&gt;&#xA;&lt;p&gt;Second, though it requires a lot of work. I was once involved in social service projects (student days) in poor areas in Mexico. The group I was involved with had some success in exploiting local resources on behalf of poor people in the local area. Quite frankly we put a guilt trip on some of the rich folks around about doing more to advance conditions in their own community. We didn't do it quite like that sounds, but by giving example as well as talking to people with resources about the work we were doing they just, sort of naturally, decided to help. Our own &amp;quot;sacrifice&amp;quot; of working with the poor helped those who could help see that they, too, could do something.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps someone local would donate some equipment when they upgrade. Perhaps local business would be willing to assist your students.&lt;/p&gt;&#xA;&lt;p&gt;Note, however, that this doesn't always work. One project I was part of was much less successful than another in this, but it was mostly due to local demographic features. Some places just don't have any resources beyond sweat.&lt;/p&gt;&#xA;&lt;p&gt;Along with local wealthy individuals, we also explored what governmental resources were available and taught the local poorer people how to effectively exploit them. Quite a lot was available if you only knew how to find it. So, we acted as a resource for finding resources.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;On Dec. 8, 2021, the New York Times published an article on how some people in the tech industry are starting to address this: &lt;a href=&quot;https://www.nytimes.com/2021/12/08/us/politics/safety-net-apps-tech.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.nytimes.com/2021/12/08/us/politics/safety-net-apps-tech.html&lt;/a&gt; (may be paywalled)&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-12-10T20:25:06.093" LastActivityDate="2021-12-10T20:25:06.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7146" PostTypeId="2" ParentId="7142" CreationDate="2021-12-10T23:36:21.127" Score="0" Body="&lt;p&gt;Here is a possible solution.  The school can put up a Linux server, which supports a multiuser environment. In fact, it's the best environment in which to learn to program.  Ubuntu Server is free software.  A wireless network in a lab equipped with Chromebooks could be set. up for a relatively small expense.  A package manager can be used to obtain all of the compilers you need.&lt;/p&gt;&#xA;&lt;p&gt;Then students could shell in with an inexpensive Chromebook.  The server would hold their work and accounts are protected via login authentication.  While it's not ideal, it cuts the cost a lot.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2021-12-10T23:36:21.127" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7147" PostTypeId="2" ParentId="7137" CreationDate="2021-12-12T16:06:06.173" Score="-1" Body="&lt;p&gt;Sort answer no: see Buffy's answer for an elaboration.&lt;/p&gt;&#xA;&lt;p&gt;Longer answer: We can do a lot better than we currently do.&#xA;Here are a few techniques.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Choice of language&lt;/li&gt;&#xA;&lt;li&gt;Functional / no-mutation (where possible)&lt;/li&gt;&#xA;&lt;li&gt;Eliminate null&lt;/li&gt;&#xA;&lt;li&gt;Design by contract: pre- / post-conditions, and invariants&lt;/li&gt;&#xA;&lt;li&gt;Static analysis&lt;/li&gt;&#xA;&lt;li&gt;Test first&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-12-12T16:06:06.173" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7148" PostTypeId="1" CreationDate="2021-12-13T15:22:22.107" Score="3" ViewCount="80" Body="&lt;p&gt;I am teaching a course in object design patterns for the first time, and it is not a topic I am extremely well versed in.  My students are well aware of this, and signed up for the course fully knowing that I would be exploring alongside them.  They are pretty enthusiastic to learn together, particularly since software engineering is an extremely rare topic for high schools.  They have all completed AP Computer Science A, meaning that they are familiar with object basics, polymorphism, etc.&lt;/p&gt;&#xA;&lt;p&gt;I heard from a friend whose graduate degree is in SE that her professor had assigned student presentations about design patterns, and it seems like a good idea to me. I would like to assign groups to each learn about, and present, one pattern to the class.  My current thought is to ask the students to structure their lessons thusly:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A description of the pattern itself (what is it?). Have students already seen it?  (Such as factory pattern with iterators)&lt;/li&gt;&#xA;&lt;li&gt;A working toy example of the pattern c#/unity (our platform for the course) to be share with their classmates&lt;/li&gt;&#xA;&lt;li&gt;A uml diagram of the toy example&lt;/li&gt;&#xA;&lt;li&gt;A uml diagram of the pattern in general (can be taken straight from the web)&lt;/li&gt;&#xA;&lt;li&gt;Lead a discussion about when the pattern would be appropriate&lt;/li&gt;&#xA;&lt;li&gt;Any other considerations that seem appropriate or important about the pattern&lt;/li&gt;&#xA;&lt;li&gt;A small review quiz to be shared with the class (as learning reinforcement)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I will model what I expect with two object patterns myself first (I was thinking about presenting singleton and observer patterns, though I am open to other suggestions if there are better choices), then allow them time to work in their own patterns.&lt;/p&gt;&#xA;&lt;p&gt;I figure that each group will have roughly 40 minutes to present, and 10 minutes out of a 50 minute period the next day for their reinforcement quiz.&lt;/p&gt;&#xA;&lt;p&gt;Here are my questions:&lt;/p&gt;&#xA;&lt;p&gt;Does this seem reasonable given the topic?  Are there elements that I am missing that are specific to design patterns?  Should I allow students to freely pick from the design patterns, or should I restrict them to easier ones?  Is there anything else I should know before embarking on this path with my students?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-12-27T23:53:17.767" Title="Object patterns student presentation format" Tags="|curriculum-design|object-oriented-paradigm|lesson-review|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7149" PostTypeId="2" ParentId="7148" CreationDate="2021-12-13T20:41:37.940" Score="2" Body="&lt;p&gt;I think the outline is fine, but it isn't clear from it that students will come away with the essential understanding of what patterns really are. They aren't just &lt;em&gt;cool things to do&lt;/em&gt;, but an essential step in architecture. The fact that they were first invented by an architect, not a programmer, (Christopher Alexander) is important.&lt;/p&gt;&#xA;&lt;p&gt;The materials you suggest don't seem to make this obvious.&lt;/p&gt;&#xA;&lt;p&gt;The essential components of a pattern are&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Name&lt;/li&gt;&#xA;&lt;li&gt;Context (when it makes sense to use it)&lt;/li&gt;&#xA;&lt;li&gt;Problem&lt;/li&gt;&#xA;&lt;li&gt;Forces (what pushes you both toward and away from possible resolutions)&lt;/li&gt;&#xA;&lt;li&gt;Solution&lt;/li&gt;&#xA;&lt;li&gt;Examples of use&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Of all of these, the hardest to grasp is the Forces. They aren't the reason why you use the chosen solution, but, rather, the things that need to be &amp;quot;balanced&amp;quot; for a true solution rather than an arbitrary one.&lt;/p&gt;&#xA;&lt;p&gt;Since your students will probably be using different sources, I suggest that you require that they take each supposed pattern and put it into an outline form, separating out the essential components as above.&lt;/p&gt;&#xA;&lt;p&gt;Discussions of the actual balance of competing/opposing forces can be very interesting.&lt;/p&gt;&#xA;&lt;p&gt;I once had a fairly long long-distance conversation with another author about the Iterator pattern. His idea was that each data structure should come with a single pointer/reference variable that could single out a specific element in the structure. He wrote a book (or three) in which these were used to iterate through lists and trees and such.&lt;/p&gt;&#xA;&lt;p&gt;But it took me a long time to convince him that he hadn't considered all the forces at play. In particular, an algorithm that required more than one such reference was hard to write. The proper balance separates the concept of the data structure from the iterator so that multiple iterators can be in play at the same time. (Yes, this was in the early days.) Now his books (quite good, generally) have got a better structure.&lt;/p&gt;&#xA;&lt;p&gt;The &amp;quot;problem&amp;quot; with the &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0201633612&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;GOF - Gang of Four&lt;/a&gt; book is that it doesn't discuss &lt;em&gt;problems&lt;/em&gt; for the various patterns. But, again, I think they wrote the book a bit too early when the community discussing patterns (I wasn't there yet) had an incomplete idea of what a software pattern should be.&lt;/p&gt;&#xA;&lt;p&gt;Focusing too much on the solution or the structure (UML, say) can leave you with unusable tools, since you need to be able to recognize the context in a given situation to be able to apply it and to know if the forces at play are actually the same (or close to) the forces that the given solution balances. If you don't see the context, you don't know which tool to reach for. If you get the forces wrong, you pick up the wrong tool for the task.&lt;/p&gt;&#xA;&lt;p&gt;In particular, since it is complicated and since your students are young and somewhat inexperienced, one pattern per team seems right. Lots of discussion and feedback seems right. But you will need to guide it. But if they can put the pattern into &amp;quot;outline&amp;quot; form they will have a good basis and discussion can resolve around that, not around details of some implementation.&lt;/p&gt;&#xA;&lt;p&gt;I would also suggest that you pick a set of patterns for your students that work together to build things. Some patterns are frequently used together and others are sort of esoteric. Pick the more common ones. The goal should be a mini &amp;quot;pattern language&amp;quot; that can form the core of their programming projects.&lt;/p&gt;&#xA;&lt;p&gt;I suggest you get a copy of Alexander's &lt;em&gt;A Pattern Language&lt;/em&gt; and try to grok the background of the origin story of software patterns. A lot of libraries probably have copies. You certainly don't need to read it all, but the point of it was &amp;quot;livable spaces&amp;quot;. Something worth thinking about in software.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-12-13T21:37:55.187" LastActivityDate="2021-12-13T21:37:55.187" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7151" PostTypeId="1" CreationDate="2021-12-15T17:19:18.453" Score="4" ViewCount="253" Body="&lt;p&gt;Nowadays, the standard way to learn computer science is at a university, though a formal computer science degree program or at least coursework. What I've been wondering is if there is a certification program or exam that exists outside of academia, or at least outside of traditional degree programs, that certifies that someone has mastered the basics of computer science (i.e. looping and branching, pointers, data types, recursion, stacks, queues, automata, Turing machines, Lambda calculus, etc.). Does such a program or exam exist?&lt;/p&gt;&#xA;&lt;p&gt;To be clear, I have found many exams and certification programs that cover various &lt;em&gt;programming languages&lt;/em&gt; and professional areas of computer work (e.g. repair, administration, management, etc.), but that's not really what I'm looking for. Someone certified in J2EE enterprise development or in Oracle 11g administration may be competent to hold an industry job but does not necessarily have a foundation in the theories of computer science (may not know the difference between a context-free grammar and a context-sensitive one, may not be aware of the proof of the Halting Problem, etc.). What I'm looking for would match at least most of the following criteria:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Can be studied for independently, without needing to enroll in formal university coursework.&lt;/li&gt;&#xA;&lt;li&gt;Is focused on computer science theory rather than practical or professional skills (e.g. debugging VBScript, writing Oracle queries, or building 3-tier enterprise apps in LAMP).&lt;/li&gt;&#xA;&lt;li&gt;Leads to some sort of recognized certification or qualification in computer science that, combined with an academic degree in &lt;em&gt;something else&lt;/em&gt;, could be considered equivalent to a degree in computer science.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I am aware that essentially all of computer science &lt;em&gt;can&lt;/em&gt; be studied independently without the assistance of a university, but that path does not normally lead to any sort of formal educational credential of achievement. I'm looking for something along the lines of, &amp;quot;Yes, my degree was in history with a minor in sociology, but I passed the International Competency Examination in Computer Science Theory with a score of A, so I'm at the same level as a typical computer science graduate.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;I am also aware of so-called &amp;quot;coding boot camps&amp;quot; that largely exist outside of academia, but those are still sort of an opposite to my question. They exist to impart and certify &lt;em&gt;professional&lt;/em&gt; competency (e.g. iOS mobile app development in Swift) rather than computer science fundamentals.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="1931" LastEditDate="2021-12-15T20:52:52.520" LastActivityDate="2022-11-05T04:41:49.670" Title="Is there a computer science certification program outside of academic programs?" Tags="|self-learning|resource-request|resource-information|exams|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7152" PostTypeId="2" ParentId="6339" CreationDate="2021-12-15T17:37:38.913" Score="1" Body="&lt;p&gt;Ben I. made a good point when he said &amp;quot; A further problem with Cloze-style is that, the more blanks you leave, the more possible combinations of correct answers you leave.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;A reliable Cloze test, to be easily gradable, should ensure that every &amp;quot;blank&amp;quot; can be graded independently of each other. Ben I.'s example of a student who solved the entire problem with a Lambda statement in the first blank is a good example. For a non-computer science example of a &amp;quot;bad&amp;quot; Cloze test, consider the following &amp;quot;vocabulary&amp;quot; or &amp;quot;English language&amp;quot; Cloze test:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to ______. ______ took it to the ______ .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Now, a student might answer as follows:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;mom&lt;/strong&gt;. &lt;strong&gt;She&lt;/strong&gt; took it to the &lt;strong&gt;post office&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Another student might say:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;the post office&lt;/strong&gt;. &lt;strong&gt;A postal worker&lt;/strong&gt; took it to the &lt;strong&gt;mail sorting facility&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'm sure you can think of a few more. What about:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;the police officer&lt;/strong&gt;. &lt;strong&gt;She&lt;/strong&gt; took it to the &lt;strong&gt;evidence room&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;General Vicks&lt;/strong&gt;. &lt;strong&gt;His lieutenant&lt;/strong&gt; took it to the &lt;strong&gt;war room&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;General Vicks's lieutenant&lt;/strong&gt;. &lt;strong&gt;He&lt;/strong&gt; took it to the &lt;strong&gt;general&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I gave the letter to &lt;strong&gt;the great brain-computer of Centaurus V&lt;/strong&gt;. &lt;strong&gt;One of the brain-computer's robotic sentries&lt;/strong&gt; took it to the &lt;strong&gt;Andromeda Galaxy&lt;/strong&gt; .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;All of these answers are reasonable, and all of them display inter-dependencies between the blanks. If the second blank includes a name or description of a man, it would probably be wrong for the second blank to consist of &amp;quot;she&amp;quot; or &amp;quot;it&amp;quot;!&lt;/p&gt;&#xA;&lt;p&gt;One way you can accomplish this restriction is with an &lt;em&gt;answer bank&lt;/em&gt;. For example, your students might be able to choose the correct answers from the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;i&lt;/li&gt;&#xA;&lt;li&gt;i++&lt;/li&gt;&#xA;&lt;li&gt;++i&lt;/li&gt;&#xA;&lt;li&gt;i+f&lt;/li&gt;&#xA;&lt;li&gt;i&amp;lt;f&lt;/li&gt;&#xA;&lt;li&gt;i&amp;gt;f&lt;/li&gt;&#xA;&lt;li&gt;i&amp;gt;=f&lt;/li&gt;&#xA;&lt;li&gt;item.Focus()&lt;/li&gt;&#xA;&lt;li&gt;i.Focus()&lt;/li&gt;&#xA;&lt;li&gt;i.Focus(item)&lt;/li&gt;&#xA;&lt;li&gt;item.Location.Transition()&lt;/li&gt;&#xA;&lt;li&gt;f&lt;/li&gt;&#xA;&lt;li&gt;firstItem&lt;/li&gt;&#xA;&lt;li&gt;secondItem&lt;/li&gt;&#xA;&lt;li&gt;item.GetDiscriminant()&lt;/li&gt;&#xA;&lt;li&gt;i&amp;lt;3&lt;/li&gt;&#xA;&lt;li&gt;f==i&lt;/li&gt;&#xA;&lt;li&gt;i&amp;gt;r&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Some of these answer choices might be red herrings, of course.&lt;/p&gt;&#xA;&lt;p&gt;A second way to do this would be to not provide an answer bank, but tell students what they must put in each blank. For example,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;for(int i=0; _____ ; i++) //write a boolean expression that ensures that the loop continues to run if i matches the loop invariant as follows....&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;A student who dropped in a complex Lambda that embedded a loop solving the entire purpose of the function the first time it is called and then exiting the function could then be marked &lt;em&gt;wrong&lt;/em&gt; as although the function would work, the student would not have followed directions.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="1931" LastEditDate="2021-12-17T14:31:27.420" LastActivityDate="2021-12-17T14:31:27.420" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7153" PostTypeId="2" ParentId="430" CreationDate="2021-12-15T18:39:34.237" Score="0" Body="&lt;p&gt;You say that the student already &amp;quot;knows the material&amp;quot;. If this is true, then this could be an ideal opportunity to offer the student Credit by Exam or some type of competency-based assessment.&lt;/p&gt;&#xA;&lt;p&gt;Offer the student a choice to take the final exam early and/or complete the most important course projects now. If the student passes, you can give them a passing grade for the course. If they fail, then tell them that they have not demonstrated mastery and need to keep working.&lt;/p&gt;&#xA;&lt;p&gt;One caveat to this is that it is probably unfair to limit this opportunity to just this one student, so you could offer it as an option to any student who wishes to short-circuit the course and complete it early. Read up on &lt;a href=&quot;https://www.ed.gov/oii-news/competency-based-learning-or-personalized-learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;Competency-Based Education (CBE)&lt;/a&gt; as that is exactly what that is. The focus of the course shifts from &amp;quot;sit through the material and not cause trouble&amp;quot; to &amp;quot;must demonstrate mastery of X, Y, and Z by passing Exams A, B, and C and completing Project D&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastActivityDate="2021-12-15T18:39:34.237" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7154" PostTypeId="1" CreationDate="2021-12-15T18:55:20.307" Score="34" ViewCount="8871" Body="&lt;p&gt;I remember 20 years ago (when I was doing my degree in computer science) that there were a lot of instructors who thought that the impending (&amp;quot;real soon now&amp;quot;) transition from using C++ as the programming language of instruction to Java represented a loosening of standards — i.e. that Java was &amp;quot;too easy&amp;quot; and allowed students to get away with not fully mastering concepts that Java handled on its own (e.g. manually freeing memory vs relying on the garbage collector). There were some good points to this argument but it also became clear that higher-level languages like Java and C# allow students to spend more time on advanced concepts (e.g. large and complex data structures) rather than chasing down another stray pointer or memory leak. After I had my degree in hand and started writing real software, I realized that I had spent so much time chasing segmentation faults and off-by-one errors in C++ that I really did have a shaky foundation on more abstract concepts. Seeing OOP implemented &lt;em&gt;right&lt;/em&gt; in C# was mind-blowing for me — now it finally &lt;em&gt;made sense&lt;/em&gt; why programming to an interface was how polymorphism worked.&lt;/p&gt;&#xA;&lt;p&gt;Are there any similar controversies &lt;em&gt;today&lt;/em&gt; in terms of what a computer science education should consist of or how it should be delivered?&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="-1" LastEditDate="2021-12-19T04:52:27.537" LastActivityDate="2022-02-11T14:12:56.643" Title="What controversies in computer science education exist today?" Tags="|curriculum-design|undergraduate|" AnswerCount="7" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="7155" PostTypeId="1" CreationDate="2021-12-15T19:08:18.953" Score="2" ViewCount="140" Body="&lt;p&gt;Are you aware of any recently published textbooks (2018-2022) suitable for an introductory course in databases? I've been using the classical textbooks so far, i.e. &amp;quot;Database Systems Complete Book&amp;quot;, &amp;quot;Fundamentals of Database Systems&amp;quot;, &amp;quot;Database System Concepts&amp;quot;. Would like to hear from you of any new entries, preferably with additional materials for instructors. Thank you!&lt;/p&gt;&#xA;" OwnerUserId="6410" LastActivityDate="2021-12-15T19:08:18.953" Title="Any recent textbooks for an &quot;Introduction to Databases&quot; course?" Tags="|undergraduate|databases|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7156" PostTypeId="2" ParentId="7154" CreationDate="2021-12-15T19:55:07.040" Score="18" Body="&lt;p&gt;One controversy within my department is whether it is a good idea to take time to both teach about and &lt;em&gt;enforce&lt;/em&gt; the very basics of coding style.  (Think indentation, variable naming, vertical spacing, or how often to comment.)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;One camp believes that it's vital, and that students producing &amp;quot;poor&amp;quot; code need to be redirected, even if the code meets all of the API specs.  They would contend that a student arriving at their third or fourth year of CS who (just for instance) still names variables with meaningless indicators like &lt;code&gt;str&lt;/code&gt;, &lt;code&gt;data2&lt;/code&gt;, or &lt;code&gt;num&lt;/code&gt;, or use unintelligible shortenings like &lt;code&gt;bk&lt;/code&gt;, &lt;code&gt;rf&lt;/code&gt;, &lt;code&gt;t&lt;/code&gt;, and &lt;code&gt;edp&lt;/code&gt; represent a failure of instruction.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The other camp believes that it's largely a waste of time, because it is time-intensive (as it involves carefully reading and editing a LOT of poor code), and it is self-correcting over time, as students will absorb norms both from modeled teacher code and from the pain of making bad coding decisions in their early years.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(I tried hard to keep my own biases out of those explanations, though a look through my post history would make clear which camp I belong to.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-12-15T19:55:07.040" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7158" PostTypeId="2" ParentId="7154" CreationDate="2021-12-15T20:33:10.880" Score="27" Body="&lt;p&gt;I just did a quick scan of the SIGCSE-MEMBERS mailing list for the past year and nothing stands out.&lt;/p&gt;&#xA;&lt;p&gt;The language wars continue to smolder with some balkanization (Java, Python, C#, JavaScript, ...) but not with the intensity of previous days. I doubt there will be special sessions on such things in the near future.&lt;/p&gt;&#xA;&lt;p&gt;There was a thread there on whether a variable is a &amp;quot;box&amp;quot; or a &amp;quot;label&amp;quot; with proponents of each side (Go Labels).&lt;/p&gt;&#xA;&lt;p&gt;Most have decided that the proper &amp;quot;current&amp;quot; paradigm is OO, but with some minor defections to functional programming.&lt;/p&gt;&#xA;&lt;p&gt;There is still, however, an iron curtain between the objects early and objects late worlds. So much so that one prominent author has two versions of his intro book, labeled as such.&lt;/p&gt;&#xA;&lt;p&gt;I see some discussion about whether using a sophisticated IDE or the command line is preferable.&lt;/p&gt;&#xA;&lt;p&gt;There is constant discussion, but not controversy, on inclusion in CS education.&lt;/p&gt;&#xA;&lt;p&gt;There is discussion about including more AI and Big Data, as you would expect.&lt;/p&gt;&#xA;&lt;p&gt;Note two things. There is more to CS than language choice and intro to programming, which is just a tool. And, the earlier controversies occurred at an inflection point when CS education moved from a primarily Structured Approach (Pascal, C,...) to an object oriented one. That paradigm shift was the cause of a lot of what then happened.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-12-15T21:03:43.950" LastActivityDate="2021-12-15T21:03:43.950" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="7159" PostTypeId="2" ParentId="7154" CreationDate="2021-12-15T20:43:43.783" Score="54" Body="&lt;p&gt;There is a big controversy about the &lt;em&gt;purpose&lt;/em&gt; of &amp;quot;Computer Science&amp;quot; education specifically.  This controversy has become hotter the the last few decades as CS has come to the fore as an important field.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One camp feel that &amp;quot;Computer Science&amp;quot; is akin to &amp;quot;programming&amp;quot;, and should be teaching real world skills.  In this view, education should be focused on what is practical, and to some degree resemble what is currently found in coding boot camps.&lt;/li&gt;&#xA;&lt;li&gt;The other camp feels that &amp;quot;Computer Science&amp;quot; is largely a branch of thought and mathematics, and an academic field in its own right.  Under this view, students studying CS should be exposed to things like inductive proofs of code correctness, how to map problem spaces onto NP, pushdown automata, serious algorithmic analysis, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I fall largely in the second camp, since computer science was a mathematical field long before programming had the impact that it now does.  I would, however, love to see undergraduate &amp;quot;programming&amp;quot; majors exist.  I think that, particularly among those in the second camp, that field isn't given its due -- it is far richer and complex than it is sometimes given credit for, and could easily fill a bachelor's degree (and then some!)&lt;/p&gt;&#xA;&lt;p&gt;Such a &amp;quot;programming&amp;quot; major would overlap to some degree with &amp;quot;computer science&amp;quot; majors, though that is hardly a unique situation.  There are plenty of university majors with a fair amount of overlap.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-12-15T20:43:43.783" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7160" PostTypeId="1" CreationDate="2021-12-16T06:25:09.033" Score="5" ViewCount="262" Body="&lt;p&gt;I teach in a secondary, first grade, school in Italy. The kids are 13 years old, on last year before second grade. I am teaching them the very basic of programming. Last year we did some flowcharts algorithms, this year we started code programming in Octave. I've teached them how to make simple algorithms with if/else and now I'm going to go for the for and while loops, but I struggle in finding exercises and examples which could be suitable for them, apart from cumulative sums/differences. Consider that they are very young and have just basic math knowledge. They don't even know what a matrix is, but I can overcome that by explaining at least a monodimensional one. But really I can use some help on exercise with for and while. Any help?&lt;/p&gt;&#xA;" OwnerUserId="11352" LastActivityDate="2022-01-04T04:40:12.260" Title="For and while loops examples for 12-13 years old class" Tags="|looping|" AnswerCount="5" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7161" PostTypeId="2" ParentId="7160" CreationDate="2021-12-16T09:42:39.270" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I struggle in finding exercises and examples which could be suitable for them.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;See: &lt;a href=&quot;https://runestone.academy/runestone/default/user/login?_next=/runestone/default/index&quot; rel=&quot;nofollow noreferrer&quot;&gt;Runestone Academy&lt;/a&gt;. Also see &lt;a href=&quot;https://csawesome.runestone.academy/runestone/books/published/csawesome/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CSAwesome&lt;/a&gt;. CSAwesome is used by hundreds of teachers in the US.&lt;/p&gt;&#xA;" OwnerUserId="2516" LastActivityDate="2021-12-16T09:42:39.270" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7162" PostTypeId="2" ParentId="7160" CreationDate="2021-12-16T12:33:23.813" Score="3" Body="&lt;p&gt;I'm not familiar with Octave, but here are some examples we use for while loops:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Collect a user's input until it is the correct type (such as asking the user for a number)&lt;/li&gt;&#xA;&lt;li&gt;Find a running sum of numbers until a user inputs 0&lt;/li&gt;&#xA;&lt;li&gt;A piggy bank that collects coins (represented by single-letter user inputs) that provides a total balance only after the user inputs &amp;quot;exit&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;Play tic-tac-toe until the game is won or has reached a draw. (Note that this game is small enough that you can do it with nine variables, which gives you flexibility based on what you've covered so far with your students)&lt;/li&gt;&#xA;&lt;li&gt;Play the game of Nim until a player has won, then begun a new game. (Loop in loop!)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A few caveats for you: don't introduce loops inside loops at first, and when you do, use methods to break it up.  There is plenty to master in single loops.&lt;/p&gt;&#xA;&lt;p&gt;I also wouldn't introduce for loops and while loops at the same time. Start with while, since for loops just jam all of the loop governance onto a single, weird line.  Let them work through loop logic in the more intuitive while structure first.&lt;/p&gt;&#xA;&lt;p&gt;When you do eventually get to for loops, you can show its equivalence to &lt;code&gt;while&lt;/code&gt;, and then do things like take a number range and return its sum.  Point out that the for loop is syntactic sugar just to show a loop's structure all at once, and that we tend to use it only in the simplest cases, such as when we know exactly how many iterations we want in advance.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-12-16T12:33:23.813" CommentCount="18" ContentLicense="CC BY-SA 4.0" />
  <row Id="7163" PostTypeId="2" ParentId="7154" CreationDate="2021-12-16T14:39:48.707" Score="7" Body="&lt;p&gt;There is some controversy over the Ethics of computer science. This is much more relevant to programmers than people studying the mathematical side of computer science, but is it the programmers job to refuse to code in unsafe ways?&lt;/p&gt;&#xA;&lt;p&gt;I was recently tasked with adding an update to our website which would have exposed our clients to a potential malicious actor through exploiting the clients trust on our website. I pushed back and suggested an alternative that protected the clients but limited how flexible the update was for our purposes.&lt;/p&gt;&#xA;&lt;p&gt;But is that my responsibility? Should I just have done what I was told? Is there a comparison with engineers designing potentially unsafe constructions?&lt;/p&gt;&#xA;" OwnerUserId="1404" LastActivityDate="2021-12-16T14:39:48.707" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7164" PostTypeId="2" ParentId="7154" CreationDate="2021-12-16T16:06:01.693" Score="16" Body="&lt;p&gt;There is debate over how to respond to students' changing mental model of files and directories (as highlighted in a recent &lt;a href=&quot;https://www.theverge.com/22684730/students-file-folder-directory-structure-education-gen-z&quot; rel=&quot;noreferrer&quot;&gt;Verge article&lt;/a&gt;.) This doesn't solely affect computer science education, but it is a bit of computer science affecting education as a whole.&lt;/p&gt;&#xA;&lt;p&gt;Essentially, having grown up with cloud services and ubiquitous, reasonably effective search functions for directories, students largely don't think in terms of directories anymore. They get by fine saving their coursework and personal documents in one huge folder or in disparate default save locations from each program, then searching for it later. Later in their education they run into a command line utility and are completely stumped by the concept that programs need to execute &amp;quot;in&amp;quot; a directory and have different behavior depending on &amp;quot;where&amp;quot; they're executed, these being totally new concepts in their mental model of a computer.&lt;/p&gt;&#xA;&lt;p&gt;The main debate is whether or not to spend time teaching students to think about directories, and if so how many of them. This concerns how important we feel knowledge of directories is to operate the tools of various fields. It also concerns how fundamental we feel the concept of directories is to computing (ultimately, they are higher-level constructs, the physical media doesn't organize data that way and we made the choice to impose a directory structure) and how much we would object if the next generation of software implementers erodes the directory model in their tools.&lt;/p&gt;&#xA;" OwnerUserId="11357" LastActivityDate="2021-12-16T16:06:01.693" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7165" PostTypeId="2" ParentId="7154" CreationDate="2021-12-17T10:16:25.077" Score="7" Body="&lt;h1&gt;ACM CC2013&lt;/h1&gt;&#xA;&lt;p&gt;Excerpted from chapter 5 Introductory Courses of&#xA;&lt;a href=&quot;https://www.acm.org/binaries/content/assets/education/cs2013_web_final.pdf&quot; rel=&quot;noreferrer&quot;&gt;ACM CS Curricula 2013&lt;/a&gt;.&lt;br /&gt;&#xA;Emphases added to highlight lurking controversies!&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In considering the &lt;strong&gt;changing landscape&lt;/strong&gt; of introductory courses, we&#xA;look at the evolution of introductory courses from CC2001 to CS2013.&#xA;CC2001 classified introductory course sequences into six general&#xA;models:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Imperative-first&lt;/li&gt;&#xA;&lt;li&gt;Objects-first&lt;/li&gt;&#xA;&lt;li&gt;Functional-first&lt;/li&gt;&#xA;&lt;li&gt;Breadth-first&lt;/li&gt;&#xA;&lt;li&gt;Algorithms-first&lt;/li&gt;&#xA;&lt;li&gt;Hardware-first&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;While introductory courses with these characteristic features&#xA;certainly still exist today, we believe that advances in the field&#xA;have led to an even &lt;strong&gt;more diverse set of approaches&lt;/strong&gt; in introductory&#xA;courses than the models set out in CC2001. Moreover, the approaches&#xA;employed in introductory courses are &lt;strong&gt;in a greater state of flux.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;An &lt;strong&gt;important challenge&lt;/strong&gt; for introductory courses... : Choosing what&#xA;to cover in introductory courses results in &lt;strong&gt;a set of tradeoffs&lt;/strong&gt; that&#xA;must be considered when trying to decide what should be covered early&#xA;in a curriculum.&lt;/p&gt;&#xA;&lt;p&gt;A defining factor for many introductory courses is...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;The choice of programming paradigm&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The choice of programming paradigm which then drives the choice of programming&#xA;language. Indeed, half of the six introductory course models listed in&#xA;CC2001 were described by programming paradigm (Imperative-first,&#xA;Objects-first, Functional-first). Such paradigm-based introductory&#xA;courses still exist and their relative merits continue to be debated.&#xA;We note that rather than a particular paradigm or language coming to&#xA;be favored over time, &lt;strong&gt;the past decade has only broadened the list&lt;/strong&gt; of&#xA;programming languages now successfully used in introductory courses.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;sup&gt;My comments: So language/paradigm choice at CS101 level remain as contentious as ever. It's just that C++ vs Lisp is now Haskell vs Python&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Platform&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;While many introductory programming courses make use of traditional&#xA;computing platforms (e.g., desktop/laptop computers) and are, as a&#xA;result, somewhat “hardware agnostic,”&lt;/p&gt;&#xA;&lt;p&gt;(Yet) the past few years have seen a growing diversity in the set of&#xA;programmable devices such as (Summarizing)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;web development&lt;/li&gt;&#xA;&lt;li&gt;mobile device (e.g., smartphone, tablet) programming&lt;/li&gt;&#xA;&lt;li&gt;specialty platforms, such as robots or game consoles&lt;/li&gt;&#xA;&lt;li&gt;physically-small, feature-restricted e.g. raspberry-pi&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In any of these cases, the use of a particular platform brings with it&#xA;&lt;strong&gt;attendant choices for programming paradigms,&lt;/strong&gt; component libraries,&#xA;APIs, and security. Working within the software/hardware constraints&#xA;of a given platform is a useful software-engineering skill, but also&#xA;&lt;strong&gt;comes at the cost&lt;/strong&gt; that the topics covered in the course may likewise&#xA;be limited by the choice of platform.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;The IDE-Language divide&lt;/h1&gt;&#xA;&lt;p&gt;Its 20 years since Oliver Steele noted the &lt;a href=&quot;https://blog.osteele.com/2004/11/ides&quot; rel=&quot;noreferrer&quot;&gt;IDE-Language divide&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;That the issue remains current can be seen &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7154/what-controversies-in-computer-science-education-exist-today/7164#comment18530_7158&quot;&gt;right here!!&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Closely related to the obvious ease + non-obvious disadvantages of using &lt;a href=&quot;http://www.paulgraham.com/avg.html&quot; rel=&quot;noreferrer&quot;&gt;Blub Programming Languages&lt;/a&gt; in CS-education.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;Note: When Paul Graham wrote that 20 years ago, the archetypal blub language was Java. Today I'd say it's python.&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h1&gt;CS: Algorithms? Or Data?&lt;/h1&gt;&#xA;&lt;p&gt;ACM curriculum 89 boldly stated&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The discipline of computing is the systematic study of algorithmic processes&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Consider how far we have come from that to today's world of machine learning: in short:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CS: Algorithms?? Or Data???&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To be fair in the 90s Peter Naur tried to rename &lt;em&gt;computer science&lt;/em&gt; to &lt;em&gt;datalogy&lt;/em&gt;. Evidently he was not very successful then...&lt;/p&gt;&#xA;&lt;p&gt;Here is a more recent one: &lt;a href=&quot;https://www.cs.cmu.edu/%7Erwh/papers/secp/secp.pdf&quot; rel=&quot;noreferrer&quot;&gt;A notable CMU prof&lt;/a&gt; tentatively suggests that:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Everyone knows that algorithms as we learned them at school are irrelevant to practice&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;sup&gt;Note the transition: 1990: CS = algorithms. 2001: algorithmic is one out of six contenders. 2014: Are algorithms relevant to CS?&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Does IT matter??&lt;/h1&gt;&#xA;&lt;p&gt;At the broadest level: In the 21 century &lt;a href=&quot;https://hbr.org/2003/05/it-doesnt-matter&quot; rel=&quot;noreferrer&quot;&gt;does IT really matter?&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2021-12-17T14:58:41.137" LastActivityDate="2021-12-17T14:58:41.137" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7166" PostTypeId="2" ParentId="7160" CreationDate="2021-12-17T18:24:28.027" Score="2" Body="&lt;p&gt;Look at the scratch resources at NCCE.&lt;/p&gt;&#xA;&lt;p&gt;Scratch is a graphical block based language designed for kids to learn programming.&lt;/p&gt;&#xA;&lt;p&gt;The National Centre for Computing Education, have produced various teaching resources. As an experienced programmer, and new teacher, I used these as is the first time, then started adapting them.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://teachcomputing.org/curriculum/key-stage-3&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://teachcomputing.org/curriculum/key-stage-3&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-12-17T18:24:28.027" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7167" PostTypeId="2" ParentId="7148" CreationDate="2021-12-17T19:08:35.893" Score="0" Body="&lt;p&gt;Beware the GOF book on design patterns: It has 3 problems.&lt;/p&gt;&#xA;&lt;h1&gt;Claims that there are only about 20 patterns&lt;/h1&gt;&#xA;&lt;p&gt;It states that it have all design patterns that there are. About 20.&lt;/p&gt;&#xA;&lt;p&gt;The original pattern book had about 240, and stated that this is by no means all of them.&lt;/p&gt;&#xA;&lt;p&gt;The GOF book mentions model view controller, and discusses how it can be implemented using design patterns. It does not list MVC as a pattern.&lt;/p&gt;&#xA;&lt;h1&gt;GUI confusion&lt;/h1&gt;&#xA;&lt;p&gt;All examples are for Graphical user interface design. This would continually confuse me. I would find a pattern that I thought was relevant. Start reading, and my brain would say “No this is not relevant”. My brain was matching to the GUI-ness of the pattern, and rejecting it. I could not train my self to overcome this. I have to re-write them (summarise them). The head-first book on the same patterns overcomes this.&lt;/p&gt;&#xA;&lt;h1&gt;Singleton&lt;/h1&gt;&#xA;&lt;p&gt;Singleton is an anti-pattern. It violates the single responsibility principle.&#xA;It is both a factory, and whatever else you want it to be. Split out into a class for the main functionality and one of the factory patterns.&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion&lt;/h1&gt;&#xA;&lt;p&gt;Other than that, it is a good book (but get the head first version). It was a pioneer in the programming field (but see also the Chritopher Alexander original). There are now many other books on programming patterns (e.g. Plop series)&lt;/p&gt;&#xA;&lt;p&gt;Use singleton and mono-state (not in the book). Only to wrap badly written code: e.g. code that assumes that every PC has one or zero serial ports.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2021-12-17T19:08:35.893" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7168" PostTypeId="2" ParentId="7160" CreationDate="2021-12-17T22:23:32.360" Score="3" Body="&lt;p&gt;The collatz conjecture is a great example of a while loop:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;start with any number&lt;/li&gt;&#xA;&lt;li&gt;if it's even, divide by 2&lt;/li&gt;&#xA;&lt;li&gt;if it's odd, times three and add 1&lt;/li&gt;&#xA;&lt;li&gt;stop if you ever reach 1. (what happens if you continue?)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The conjecture that you'll always reach 1 is just about the easiest to explain, hardest to prove, statement in math. As in: still open.&lt;/p&gt;&#xA;&lt;p&gt;For students to explore:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What's the longest route to 1 you can find?&lt;/li&gt;&#xA;&lt;li&gt;What's the biggest increase from the starting point?&lt;/li&gt;&#xA;&lt;li&gt;Et cetera.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-01-04T04:40:12.260" LastActivityDate="2022-01-04T04:40:12.260" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7169" PostTypeId="2" ParentId="7151" CreationDate="2021-12-17T22:31:23.920" Score="-1" Body="&lt;h1&gt;No, because those things are irrelevant in the real world.&lt;/h1&gt;&#xA;&lt;p&gt;Simply put, things like the Halting Problem and &amp;quot;context-free grammars&amp;quot; (whatever those are) are more or less irrelevant in the &amp;quot;real world&amp;quot; of employment. The only people who really care about them are academics working in the Ivory Tower of academia, so the only certifications for them are academic ones. If there's some oddball specific technology that actually cares about some specific mathematical concept, you can just get a certification on that specific technology.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, professional competency is the only thing that really matters, since the role of the educator is to prepare their students for the workforce.&lt;/p&gt;&#xA;" OwnerUserId="7971" LastActivityDate="2021-12-17T22:31:23.920" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7170" PostTypeId="2" ParentId="6339" CreationDate="2021-12-17T22:41:14.520" Score="1" Body="&lt;p&gt;Like you, I teach C++, and to a very similar audience. I find exams pretty pointless. I assign a bunch of homework exercises during the semester that ask them something very specific, but at the end of the semester they have to do a programming project. (I have several project ideas, to prevent them from doing something too simple.)&lt;/p&gt;&#xA;&lt;p&gt;The problem with C++ is that every student settles on a different subset of the language that they are comfortable with (for instance: for-i loop, vs range-based loops, vs modern ranges or writing their own iterator subclass). It looks to me like a Cloze test would force them in the straight jacket of &lt;em&gt;your&lt;/em&gt; preferred subset.&lt;/p&gt;&#xA;&lt;p&gt;Note: my classes are between 30-60 students. Reading the project writeups &amp;amp; judging the code takes me &amp;amp; a co-teacher about 2 days each.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2021-12-17T22:41:14.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7171" PostTypeId="1" CreationDate="2021-12-18T20:03:37.387" Score="8" ViewCount="292" Body="&lt;p&gt;I'm a mathematics professor tasked with teaching a computer graphics course in the spring. I decided to teach something very project-based using Javascript and THREE.js, based on my familiarity and how THREE.js seems to be very popular in web 3d development without being overly simplistic.&lt;/p&gt;&#xA;&lt;p&gt;This past semester, THREE.js dropped support for THREE.Geometry, changing the way to present procedurally created geometries to THREE.js. This broke most of my currently existing interactives, and has me rethinking how I want to present the idea of geometries to my students.&lt;/p&gt;&#xA;&lt;p&gt;Some questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it okay to plan on teaching a course based around such a dynamic (and I guess theoretically untrusted) third-party library?&lt;/li&gt;&#xA;&lt;li&gt;I have an old copy of THREE.js. Is it okay to teach a course asking my students to work with this old copy? (a separate question is whether this would be pedagogically a better presentation of the topic, which I asked on computergraphics.stackexchange: &lt;a href=&quot;https://computergraphics.stackexchange.com/questions/12406/which-provides-better-intuition-three-geometry-or-three-buffergeometry&quot;&gt;https://computergraphics.stackexchange.com/questions/12406/which-provides-better-intuition-three-geometry-or-three-buffergeometry&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;How do you live like this? I jest, but I would really appreciate some insights into teaching in such a dynamic field, where specifics I teach my students might not work in a year's time and general concepts might be out-of-date in five years.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="10999" LastActivityDate="2021-12-18T21:03:46.383" Title="Teaching with changing dependencies" Tags="|curriculum-design|best-practice|project|social-context|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7172" PostTypeId="2" ParentId="7171" CreationDate="2021-12-18T20:37:00.580" Score="4" Body="&lt;p&gt;If the mathematical and computer graphics core concepts are still sound, then yes, I would say that it is okay to teach using a dated library.  Not forever (short of a very good pedagogical reason), but it's okay to take some time to update your materials, as that is a significant endeavor.&lt;/p&gt;&#xA;&lt;p&gt;I would explain it to my students roughly this way:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I designed this class to illustrate some important core concepts of this field, and I am pretty excited by what I get to share with you!  The course was designed using THREE.js, which had a library, THREE.geometry, that was great for what we needed to do.  Anyway, developing the materials was a pretty large task, and I was pleased with how it all came out.&lt;/p&gt;&#xA;&lt;p&gt;Anyway, you know what they say about Murphy's Laws, right?  As it turns out, it's just our luck that they dropped support for THREE.geometry a few months ago.  I eventually plan to update my materials, but I haven't had the chance yet.&lt;/p&gt;&#xA;&lt;p&gt;In the meantime, the underlying stuff that I'm so excited to teach you about has all been developed using these old libraries, so I'm going to ask you to use a &lt;em&gt;very slightly dated&lt;/em&gt; library for now.  THREE.geometry was never the point of the course; it was the tool we were using to get at the underlying ideas, so I don't think this will be a huge handicap to what we're trying to do.  For my part, I promise I'm going to try to make the material interesting enough to be worth your while anyway.  Does that sound fair to everyone?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="27" LastActivityDate="2021-12-18T20:37:00.580" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7173" PostTypeId="2" ParentId="7171" CreationDate="2021-12-18T20:41:43.760" Score="4" Body="&lt;p&gt;I'll assume this is university level education, not a specific training course. Such things have different requirements.&lt;/p&gt;&#xA;&lt;p&gt;The goal is to teach principles and things that can stand the test of time. This is part of the basic understanding in math of course and we hardly consider the alternative.&lt;/p&gt;&#xA;&lt;p&gt;But if you use changing technology, and depend on it, then you will always be faced with this and students may get the wrong idea of what it is important to know. You don't want them to become experts in a specific piece of software at the expense of the underlying principles.&lt;/p&gt;&#xA;&lt;p&gt;I taught a lot of Java. But in coursework I never used nor depended on the latest versions of the Java libraries. There is enough in early versions, even Java 5, that for almost everything (other than, say capstone courses, the students can get a grounding in the principles that stay stable while other things are ephemeral. Even in advanced courses that required programming, the base/core projects were all built on stable technology.&lt;/p&gt;&#xA;&lt;p&gt;Rethink what you are doing. Computer graphics won't be the same in ten years as now, just as it wasn't the same ten years ago. But it should only be &lt;em&gt;necessary&lt;/em&gt; to change when the principles themselves change. I remember that ray-tracing was an inflection point in graphics, for example.&lt;/p&gt;&#xA;&lt;p&gt;For some things, you actually have to build your own tools that you have control over so that things don't slip out from under you.&lt;/p&gt;&#xA;&lt;p&gt;But, even if you do need to teach with volatile technology, be sure that you extract the principles and make sure that the students focus on those, not just making cool stuff.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2021-12-18T21:03:46.383" LastActivityDate="2021-12-18T21:03:46.383" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7174" PostTypeId="2" ParentId="973" CreationDate="2021-12-20T18:51:38.823" Score="1" Body="&lt;p&gt;(I see that a few answers, though not the accepted one, refer to floating point arithmetic.)&lt;/p&gt;&#xA;&lt;p&gt;I'm probably in the minority that I teach to engineering-type students, so most of my examples are in floating point numbers. And without understanding binary, how are they going to understand that the following happens&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;5^2 * (1/5 * 1/5) -1 = 1.192093e-07&#xA;5^2 * (1/5 * 1/5) -1 = 2.220446e-16&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;(for single &amp;amp; double precision respectively) and what this has to do with the fact that single precision has a 23 bit mantissa and double 51?&lt;/p&gt;&#xA;&lt;p&gt;Ok, I'm not sure that I would bother first-years with this, but second definitely.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2021-12-20T22:55:39.757" LastActivityDate="2021-12-20T22:55:39.757" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7175" PostTypeId="2" ParentId="7081" CreationDate="2021-12-22T15:07:54.840" Score="1" Body="&lt;p&gt;For a book, I like &lt;a href=&quot;https://nostarch.com/tlcl2&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Linux Command Line&lt;/a&gt;. There is a YouTube series, &lt;a href=&quot;https://www.youtube.com/c/MissingSemester&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Missing Semester&lt;/a&gt;. You can pick and choose the lectures that you like.&lt;/p&gt;&#xA;&lt;p&gt;There are an abundance of cheatsheets online.&lt;/p&gt;&#xA;&lt;p&gt;Most importantly, you need to have the experience yourself. You've got to have the knowledge, and master it well enough to adapt it for your audience.&lt;/p&gt;&#xA;" OwnerUserId="11413" LastActivityDate="2021-12-22T15:07:54.840" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7176" PostTypeId="2" ParentId="6850" CreationDate="2021-12-22T20:54:34.123" Score="2" Body="&lt;p&gt;Reviving this old question - there is now a feature to do this.&#xA;Snap! v7.0 was released in December 2021, and has &amp;quot;block reducing&amp;quot; as described here.&lt;/p&gt;&#xA;&lt;p&gt;A project creator can (1) create custom block palettes, or (2) filter/hide the blocks that are shown in the block palette. One of the options is to hide all blocks that are unused in the current project. This option can be changed at any time, and stays in place after saving and sharing the project.&lt;/p&gt;&#xA;&lt;p&gt;This feature is as an easy way to produce a smaller, more focused environment to code in. That could easily be used for pedagogical reasons: remove distractions for novices; create a Parsons Problem; force students to build the blocks they need to get a job done; etc.&lt;/p&gt;&#xA;&lt;p&gt;This feature is called a Snap! &amp;quot;microworld,&amp;quot; maybe a reference to the early computing-education idea from Seymour Papert.&lt;/p&gt;&#xA;&lt;p&gt;Release notes: &lt;a href=&quot;https://github.com/jmoenig/Snap/releases/tag/v7.0.0&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/jmoenig/Snap/releases/tag/v7.0.0&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11414" LastActivityDate="2021-12-22T20:54:34.123" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7177" PostTypeId="2" ParentId="7137" CreationDate="2021-12-23T14:33:54.790" Score="0" Body="&lt;p&gt;There are of course some way to make proof of your algorithm, that basically by doing some mathematical demonstration.&lt;/p&gt;&#xA;&lt;p&gt;That can be and is done in some very critical fields for instance in medical or air space but in general the cost of doing algorithm proof is way above the cost of the failure risk.&lt;/p&gt;&#xA;&lt;p&gt;Then as Buffy said, there's also the fact that in most non-critical software you will have some dependencies that you can't afford to prove.&lt;/p&gt;&#xA;&lt;p&gt;Testing is always about finding a compromise between cost/quality and needs. In general in industry we can not afford to prove every thing that's why the common practice is to test as much as possible. Even if some times that actually means not testing.&lt;/p&gt;&#xA;&lt;p&gt;So yes you can definitively prove that some code is bug-less but this is very costly and the complexity is exponential regarding the size of the software and its dependencies. Regarding calculus, things can also get very complicated very fast, think about floats and filters for instance, proving that the size of the smallest float uncertainty has or hasn't an impact on your algorithm is very complex and hence very costly, and pragmatically much of the time you do not need to worry about that.&lt;/p&gt;&#xA;&lt;p&gt;As I said it's always a risk reward kind of thing, what is the level of quality that you need, and how much are you ready to spend on that?&lt;/p&gt;&#xA;&lt;p&gt;As Buffy also said part of the problem is that you would also end up depending on hardware that can be trusted in general but can also have flaws.&lt;/p&gt;&#xA;&lt;p&gt;It's always a question of who/what do you trust, because you can go very deep in the rabbit hole and not even being really sure that there won't be any bug.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2021-12-23T14:33:54.790" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7179" PostTypeId="2" ParentId="7137" CreationDate="2021-12-24T16:13:11.630" Score="0" Body="&lt;p&gt;All the above answers are taking your question literally: if you have a program, how do you prove it to be correct. That is the wrong question. You should ask:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How do I make a program that is provably correct&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Let me quote the famous Edsger W. Dijkstra, from his Turing Award lecture:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Today a usual technique is to make a program and then to test&#xA;it. But: program testing can be a very effective way to show the&#xA;presence of bugs, but is hopelessly inadequate for showing their&#xA;absence. (cue laughter)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The only effective way to raise the confidence level of a&#xA;program significantly is to give a convincing proof of its&#xA;correctness. But one should not first make the program and then&#xA;prove its correctness, because then the requirement of providing&#xA;the proof would only increase the poor programmer’s burden. On the&#xA;contrary: the programmer should let correctness proof and program&#xA;grow hand in hand.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And now you need to read some pretty stiff literature by Dijkstra and Hoare...&lt;/p&gt;&#xA;&lt;p&gt;An important aspect of it is proving loops correct, which you do by stating the &amp;quot;invariant&amp;quot;: the predicate that is correct at the start/end of each iteration. Then the correctness of the whole loop is a result of a sort of inductive proof. In fact, if you do this the right way, the code becomes a sort of by-product of the mathematical correctness proof. And is therefore provably correct.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2021-12-24T16:13:11.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7180" PostTypeId="2" ParentId="1099" CreationDate="2021-12-27T17:48:43.140" Score="1" Body="&lt;p&gt;There are plenty of good answers here, so I'll just add the extremely simple example I concocted to show why addition is not associative.&lt;/p&gt;&#xA;&lt;p&gt;Suppose your have a decimal floating point system with one significant digit. Now what is &lt;code&gt;4+6+7&lt;/code&gt;? If you evaluate left to right it's &lt;code&gt;2 * 10^1&lt;/code&gt;, if you evaluate right to left it's &lt;code&gt;1 * 10^1&lt;/code&gt;. (This is with rounding. I give my students a bonus exercise of coming up with an example that uses truncation.)&lt;/p&gt;&#xA;&lt;p&gt;Worked out: &lt;a href=&quot;https://pages.tacc.utexas.edu/%7Eeijkhout/istc/html/arithmetic.html#Associativity&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://pages.tacc.utexas.edu/~eijkhout/istc/html/arithmetic.html#Associativity&lt;/a&gt;  and read the whole page for anything else you want to know about floating point math.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2021-12-27T19:45:05.540" LastActivityDate="2021-12-27T19:45:05.540" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7181" PostTypeId="2" ParentId="7148" CreationDate="2021-12-27T19:47:44.563" Score="1" Body="&lt;p&gt;I'm a student, not a professional educator.&lt;/p&gt;&#xA;&lt;p&gt;I think the resource that helped me understand design patterns the best was Game Programming Patterns &lt;a href=&quot;https://gameprogrammingpatterns.com/flyweight.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://gameprogrammingpatterns.com/flyweight.html&lt;/a&gt; which includes many original Go4 patterns as well as some gamedev-specific ones. You mentioned in a comment that this is already the textbook for the course, which I think is fantastic.&lt;/p&gt;&#xA;&lt;p&gt;I might try taking a look at it to get some inspiration for what students might include in their presentation. In particular, the book focuses on practical applications for each design pattern.&#xA;It might be interesting for students to include in their presentation:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A &lt;strong&gt;non-UML&lt;/strong&gt; diagram of the design pattern (basically &amp;quot;describe the pattern in your own words/images&amp;quot;)&lt;/li&gt;&#xA;&lt;li&gt;An existing app, program, or tool that they think uses their chosen design pattern, and what about the app that makes them think that design pattern is present.&lt;/li&gt;&#xA;&lt;li&gt;A mapping of their implementation/classes to each part of the design pattern (I think having them present both the original pattern and their implementation would probably accomplish this)&lt;/li&gt;&#xA;&lt;li&gt;An example scenario that would be very difficult/impossible to implement without their design pattern&lt;/li&gt;&#xA;&lt;li&gt;Sample scenarios in which the design pattern would be totally inappropriate.&lt;/li&gt;&#xA;&lt;li&gt;Their experiences working with the design pattern (did it make things easier, would it make things easier for a larger/smaller project)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I guess these suggestions generally highlight &lt;strong&gt;identifying&lt;/strong&gt; design patterns in other contexts, instead of just reproducing them.&lt;/p&gt;&#xA;" OwnerUserId="11428" LastEditorUserId="11428" LastEditDate="2021-12-27T23:53:17.767" LastActivityDate="2021-12-27T23:53:17.767" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7184" PostTypeId="2" ParentId="7087" CreationDate="2021-12-30T20:25:45.367" Score="2" Body="&lt;p&gt;On &lt;a href=&quot;https://theartofhpc.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this page&lt;/a&gt; are three textbooks. You want the 3rd one: C++/Fortran. It has a section with programming projects. These should be doable (in any OO language) after 1 or 2 semesters of programming, and should take students definitely 1 or 2 weeks of work.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-05-10T11:58:13.417" LastActivityDate="2022-05-10T11:58:13.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7186" PostTypeId="1" AcceptedAnswerId="7187" CreationDate="2022-01-02T13:08:41.623" Score="7" ViewCount="10002" Body="&lt;p&gt;One language is better. It is just better to learn one language rather than learn C++,&#xA;Python, C#, etc.&lt;/p&gt;&#xA;&lt;p&gt;Just build one language that makes you build apps, websites, games, AIs, etc.&lt;/p&gt;&#xA;" OwnerUserId="11448" LastEditorUserId="1314" LastEditDate="2022-01-03T13:49:32.890" LastActivityDate="2022-01-06T04:07:30.140" Title="Why isn't there one language to use instead of different programming languages?" Tags="|programming|" AnswerCount="16" CommentCount="31" ContentLicense="CC BY-SA 4.0" />
  <row Id="7187" PostTypeId="2" ParentId="7186" CreationDate="2022-01-02T14:25:42.120" Score="20" Body="&lt;p&gt;In theory, you only need one language and, provided that it is &lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_completeness&quot; rel=&quot;noreferrer&quot;&gt;Turing Complete&lt;/a&gt;, any language will do. But...&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;In theory, theory is the same as practice, but not in practice.&amp;quot; (Often attributed to Yogi Berra).&lt;/p&gt;&#xA;&lt;p&gt;If you only ever want to learn one language, it should probably be C, though C has a number of twists and turns that make it difficult to consistently produce error-free software. It is, however, a low (close to the hardware) enough language that you can do anything you like.&lt;/p&gt;&#xA;&lt;p&gt;However....&lt;/p&gt;&#xA;&lt;p&gt;If you program in a low level language for a long time, or if many people do so, then what you find is that the same sorts of things are being written over and over again and debugged over and over again. This is undesirable, so the practitioners will build libraries that capture things frequently done. But hundreds and hundreds of libraries have their own problems; among them, just finding what you need.&lt;/p&gt;&#xA;&lt;p&gt;So...&lt;/p&gt;&#xA;&lt;p&gt;People decide that it would be an advantage to &amp;quot;capture&amp;quot; the commonly done things as &amp;quot;abstractions&amp;quot; in a new language built on top of the old.&lt;/p&gt;&#xA;&lt;p&gt;In FORTRAN, for example, there were functions that captured commonly needed actions (trig functions, for example). FORTRAN was built on top of machine language, as was C, which also uses functions as its main abstraction mechanism.&lt;/p&gt;&#xA;&lt;p&gt;And then...&lt;/p&gt;&#xA;&lt;p&gt;Programmers decide that the actual structure of a program is looking a lot like the structure of some other program and so, just maybe, those structures can be captured as language &amp;quot;features&amp;quot;, leading to the writing of new languages.&lt;/p&gt;&#xA;&lt;p&gt;Now it starts to get interesting.&lt;/p&gt;&#xA;&lt;p&gt;Some folks have the insight that mutability of data isn't really essential to (most) computation and that programs compute &lt;em&gt;values&lt;/em&gt;, possibly complex. So a new language, say LISP, is created to capture this insight and it proves fruitful.&lt;/p&gt;&#xA;&lt;p&gt;Other folks find themselves doing a lot of modeling of &lt;em&gt;things&lt;/em&gt; and so they ask whether the properties and actions of those things can be captured directly at the language level, rather than have to be reconstructed from the simplest actions of something like C. That led to both Simula and Smalltalk (which have some conceptual similarities).&lt;/p&gt;&#xA;&lt;p&gt;Now, and this is the important bit:&lt;/p&gt;&#xA;&lt;p&gt;A language that does a good job with abstraction will provide to the programmer a complete (in the sense of Turing) and consistent mental model in which to program, making it unnecessary to think about the underlying implementation and even permitting you to forget that there is some machine that a program might manipulate.&lt;/p&gt;&#xA;&lt;p&gt;Such a language also provides a mental model of the nature of computation. A functional programmer is led/encouraged by the language (perhaps Scheme) to think in a certain way. Object Oriented Language (Smalltalk...) encourage you to think in a different way. Each of those mental models, if complete and consistent can help you formulate and solve programming problems as they arise. These different mental models are called &lt;em&gt;paradigms&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Just as you don't need to understand Sanskrit to understand English, you don't need to understand machine language to understand Scheme or Java. Each of those (among many others) provides a model of computation in which you can describe any computable process in a consistent way. Buried in all of that are the earlier libraries that people used to have to build, along with (big big point) the insights that were gained in earlier programming attempts.&lt;/p&gt;&#xA;&lt;p&gt;As long as we can envision higher levels of abstraction, there will be an impetus to create computer languages that try to capture those abstractions so that they can be manipulated &lt;em&gt;easily&lt;/em&gt; and &lt;em&gt;consistently&lt;/em&gt; by working programmers.&lt;/p&gt;&#xA;&lt;p&gt;And then, programmers who want to be productive, will try to match the language to the task at hand as well as choosing a language that has abstractions appropriate to that task.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;For an example of what I mean by capturing abstractions, consider the problem of building dynamic data structures such as binary trees and such. In a language like C or early versions of C++ these are specifically allocated (on the heap) but also need to be specifically deallocated somewhere in the program. The implication is that the memory management &amp;quot;problem&amp;quot; needs to be resolved in every program that uses dynamic allocation. Every program. In a language like Scheme or Java, on the other hand, there is a &lt;em&gt;garbage collector&lt;/em&gt; that assure that deallocation is done correctly. The garbage collector needs to be verified only once, not redesigned and re-validated for every program. This frees the program to put their mental energy elsewhere.&lt;/p&gt;&#xA;&lt;p&gt;I once (unintentionally) put a deallocation bug in a C++ program. The correction took me 24 hours to find. The solution required a one character change to the program. One character progress per 24 hours isn't very efficient.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-01-02T21:27:18.280" LastActivityDate="2022-01-02T21:27:18.280" CommentCount="19" ContentLicense="CC BY-SA 4.0" />
  <row Id="7188" PostTypeId="2" ParentId="7186" CreationDate="2022-01-02T20:34:08.510" Score="19" Body="&lt;p&gt;This is a CS variant of the Sapir-Worff hypothesis: your world view is shaped by your language. Different programming languages make you think in different ways, and are suitable for different purposes. In CS terminology, there are different &amp;quot;paradigms&amp;quot;. Some languages are imperative, some declarative. There are functional and logic languages. And they all make you think just a little differently.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-02T20:34:08.510" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7189" PostTypeId="2" ParentId="7186" CreationDate="2022-01-02T20:59:21.200" Score="42" Body="&lt;p&gt;I'm going to echo what &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7186/why-there-isnt-one-language-to-use-instead-of-different-programming-language/7187#7187&quot;&gt;Buffy said&lt;/a&gt;, but in a different manner.&lt;/p&gt;&#xA;&lt;p&gt;All of the great languages have a sort of direction that they point in. For instance, the &lt;a href=&quot;https://www.infoq.com/articles/excel-lambda-turing-complete/&quot; rel=&quot;noreferrer&quot;&gt;Excel language&lt;/a&gt; (yes! The one from the spreadsheets!) is really great at short scripts that manipulate and represent data. By contrast, the &lt;a href=&quot;https://en.wikipedia.org/wiki/C_%28programming_language%29&quot; rel=&quot;noreferrer&quot;&gt;C&lt;/a&gt; language is excellent at telling hardware what to do, while &lt;a href=&quot;https://en.wikipedia.org/wiki/Wolfram_Mathematica&quot; rel=&quot;noreferrer&quot;&gt;Mathematica&lt;/a&gt; excels at representing a lot of advanced mathematical functionality very simply.&lt;/p&gt;&#xA;&lt;p&gt;There is nominally no task that you can do in any of those languages that you cannot do in the others.  However, you will find it extremely difficult to go &lt;em&gt;against the grain&lt;/em&gt; of the language.  Want to create a program to rapidly edit and make visualizations of data in C?  You can do it, but you could spend years on it and never make it as convenient as Excel.  Want to do very small, very fast operations that C makes simple as could be? Excel would rapidly become a nightmare.&lt;/p&gt;&#xA;&lt;p&gt;The different languages have been created to optimize different kinds of actions, and the great languages each do exceedingly well at what they are designed for.&lt;/p&gt;&#xA;&lt;p&gt;That's the key to why we need different languages.  We need to do different tasks, and we want languages that generally work with us to get us there, and don't actively get in our way all the time.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-01-03T13:49:21.607" LastActivityDate="2022-01-03T13:49:21.607" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7190" PostTypeId="2" ParentId="7186" CreationDate="2022-01-02T23:58:53.140" Score="6" Body="&lt;p&gt;Really, when making your own language is something people or companies &lt;em&gt;can&lt;/em&gt; do, it's almost the default for that to start to occur.&lt;/p&gt;&#xA;&lt;p&gt;Let's say there &lt;em&gt;was&lt;/em&gt; just one language everyone used, or perhaps a couple of them to cover all the different paradigms. Chances are, not everybody's going to like parts of it. Maybe some aspect of the syntax seems weird to some users, or it's not fast enough, or it's not as portable as people wish it was. So, what happens? Someone makes a new one, quite possibly just an incremental improvement on the one they were using before (think C++, Kotlin, or Typescript).&lt;/p&gt;&#xA;&lt;p&gt;A programming language will never be &amp;quot;one size fits all&amp;quot;. People from different backgrounds, like C, Python, or Haskell, will find different syntax more intuitive, and will have different needs and expectations for what a language provides (e.g., garbage collection, first class functions, a large standard library, and so on). The natural result of this is more languages being made.&lt;/p&gt;&#xA;" OwnerUserId="9709" LastActivityDate="2022-01-02T23:58:53.140" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7191" PostTypeId="2" ParentId="7186" CreationDate="2022-01-03T02:12:11.860" Score="9" Body="&lt;p&gt;The US Department of Defense actually &lt;em&gt;did&lt;/em&gt; create and use one programming language for basically all its varied programming tasks for about 10 years. As stated in &lt;a href=&quot;https://www.answers.com/Q/A_programming_language_developed_by_the_US_department_of_defense_was_name_to_honor_a_famous_female_mathematician_Name_this_programming_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;A programming language developed by the US department of defense was name to honor a famous female mathematician Name this programming language?&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Ada is a structured, statically typed, imperative, and object-oriented high-level computer programming language, extended from Pascal and other languages. It was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense (DoD) from 1977 to 1983 to supersede the hundreds of programming languages then used by the DoD.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Also, &lt;a href=&quot;https://dwheeler.com/lovelace/doduse.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;U.S. DoD Use of Ada&lt;/a&gt; explains&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;With various exceptions and waivers the U.S. DoD was required to use Ada when it develops its own software. This requirement was often called the &amp;quot;Ada mandate&amp;quot;. A summary discussion of the U.S. DoD Ada mandate, as well as related documents, are available. The basic text of the Congressional mandate is:&lt;br&gt;&lt;br&gt;&amp;quot;Notwithstanding any other provisions of law, where cost effective, all Department of Defense software shall be written in the programming language Ada, in the absence of special exemption by an official designated by the Secretary of Defense.&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In the &lt;a href=&quot;https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language&quot; rel=&quot;nofollow noreferrer&quot;&gt;Does the Defense Department still promote the Ada programming language?&lt;/a&gt; Quora thread, the answer by &lt;a href=&quot;https://www.quora.com/profile/Rochus-Keller&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rochus Keller&lt;/a&gt; explains that the requirement mentioned above started in &lt;span class=&quot;math-container&quot;&gt;$1987$&lt;/span&gt;. Also, the answer by &lt;a href=&quot;https://www.quora.com/profile/Jim-Rogers-38&quot; rel=&quot;nofollow noreferrer&quot;&gt;Jim Rogers&lt;/a&gt; says&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A short history of the Ada language mandate is found in &lt;a href=&quot;https://acqnotes.com/acqnote/careerfields/ada-programming-language&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ada Programming Language - AcqNotes&lt;/a&gt;. The concluding paragraph indicates that the Ada Mandate was effectively removed in 1997 when the DoD began to embrace Commercial Off The Shelf (COTS) technology.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I've used quite a few different programming languages, but I've never done any programming using Ada, and know relatively little about the language. However, in 1987 (when Ada use was initially mandated) and 1988, I was working for Netron (a Toronto, Ont. company) on a COBOL related project with IBM for Westpac Banking Corporation in Sydney, Australia. I recall a discussion with several programmers (note I'm unsure to what extent any of them had used Ada before) about a major problem with Ada being that it tries to do basically everything, with this making it so large and complicated that it's difficult to learn and use, as well as it not being a particularly good choice for many programming tasks. On the other hand, the Quora &lt;a href=&quot;https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language&quot; rel=&quot;nofollow noreferrer&quot;&gt;thread&lt;/a&gt; I mentioned above has several Ada programmers explaining some of Ada's significant strengths.&lt;/p&gt;&#xA;&lt;p&gt;In conclusion, since the US DoD was unsuccessful (due to both subjective, as well as objective, reasons) in creating and using one language to fulfill almost all of its myriad requirements, I doubt that any entity, public or private, can create just &lt;em&gt;one&lt;/em&gt; programming language to be able to do basically everything well.&lt;/p&gt;&#xA;" OwnerUserId="9731" LastEditorUserId="9731" LastEditDate="2022-01-05T20:51:59.047" LastActivityDate="2022-01-05T20:51:59.047" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="7192" PostTypeId="2" ParentId="7186" CreationDate="2022-01-03T16:17:21.867" Score="24" Body="&lt;p&gt;Imagine you open a carpenter's toolbox and you see&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a hammer and some nails&lt;/li&gt;&#xA;&lt;li&gt;a screwdriver and some screws&lt;/li&gt;&#xA;&lt;li&gt;a bottle of glue&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You are incredulous. All three of these things are used for joining two pieces of wood together.  Why in the heck would the carpenter carry around &lt;em&gt;three&lt;/em&gt; different things that all do the same job?  Why would he learn how to use all three tools, when he could learn just one?&lt;/p&gt;&#xA;&lt;p&gt;Of course, the answer is that some tools are good for some jobs, but bad for others.  In some situations, glue works great but nails and screws would not.  Other situations, glue is horrible, screws are great, and nails would okay. For some jobs, all three might work equally well.&lt;/p&gt;&#xA;&lt;p&gt;It's the same with programming languages. For some jobs, this language is great but that language is horrible.  For others it is the opposite.&lt;/p&gt;&#xA;" OwnerUserId="11469" LastEditorUserId="1035" LastEditDate="2022-01-05T12:20:38.817" LastActivityDate="2022-01-05T12:20:38.817" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="7193" PostTypeId="2" ParentId="3105" CreationDate="2022-01-03T17:43:10.787" Score="3" Body="&lt;p&gt;There is an old joke, along the lines of &amp;quot;If automobiles improved like computers, you could now buy a car for $5 that would drive supersonic and do 1000 miles/gallon. And it would crash every minute.&amp;quot; Leave out the second part, and use the first part as an indication of the increase in power.&lt;/p&gt;&#xA;&lt;p&gt;But seriously. There is a saying, no longer entirely true, that a supercomputer has always cost 10 million dollars. (Actually, the very top now costs over 100 million, but it's still true for &amp;quot;ordinary supercomputers&amp;quot;.) My first super ran at 50M floating point operations/sec, and I've seen 50G and 50T come and go, and I now have a 50P (10-to-the-15: billion times faster) machine, and it still costs in that range. And it's still roughly the same size.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-01-03T18:10:24.617" LastActivityDate="2022-01-03T18:10:24.617" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7194" PostTypeId="2" ParentId="7186" CreationDate="2022-01-03T23:07:05.497" Score="3" Body="&lt;p&gt;In many companies you standardize on one or a few languages. This saves a lot of time and effort and basically makes the whole operation more efficient. In the company you can have a &amp;quot;dictator&amp;quot; deciding on how to work (well not actually a dictator, but might be called software architect or similar).&lt;/p&gt;&#xA;&lt;p&gt;But you cannot order other people or other companies to use the same language. The US military tried with the language Ada, but failed to impose the usage of it on everyone. Ada is sadly just about dead now, sadly because it was/is a really good language and could have replaced all of C, C++, Fortran and Cobol and some other languages as well.&lt;/p&gt;&#xA;&lt;p&gt;One driving factor for using several languages is what type of program you are writing and where it will run and the restrictions this sets for your choice. For a very common type of application today, a web application, the programming often falls inte three different parts and then three different languages. As example, see a largish web shop (say, &lt;a href=&quot;http://www.thomann.de&quot; rel=&quot;nofollow noreferrer&quot;&gt;www.thomann.de&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One part of the application runs in you web browser: say Edge or Firefox or Safari. Today the only computer language they support is javascript. (They use the languages HTML and CSS as well, but these are not general purpose computer languages, more like document specifications).&lt;/li&gt;&#xA;&lt;li&gt;The second part of your application runs on the computer server. Part is a standard web server (often Apache or IIS which you simply install as a function in your server). But the actual functionality you program in some language. It could be javascript (perhaps using nodeJS) or from a large choice of languages. Javascript is not very common from a number of reasons, you will probably find a mix of other languages used: Perl (early days of internet), PHP, Ruby (very good for some things), Erlang (very good for some things), C/C++ (good for some things). Often you knit together various components and frameworks in order to save developer time and get higher quality at a lower cost.&lt;/li&gt;&#xA;&lt;li&gt;The third part of your application is often a database. Databases, especially when you have millions of customers and orders and product and so on, are often accessed using a program language called SQL. There is not much choice for you there as that is what databases uses (there are alternatives of course, but not in quite as widespread usage). SQL is great for accessing databases but totally useless if you try to run in the web browser (simply will not work).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Could you even create one language for all different usages? Personally I say no! And even if someone did, a few years down the line people and companies would create and select other languages.&lt;/p&gt;&#xA;" OwnerUserId="4456" LastEditorUserId="4456" LastEditDate="2022-01-04T07:36:30.020" LastActivityDate="2022-01-04T07:36:30.020" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7195" PostTypeId="2" ParentId="7160" CreationDate="2022-01-04T02:43:13.780" Score="0" Body="&lt;p&gt;When I was teaching myself programming at age 14 I used nested For loops to make shapes on a text screen. For example, input a width and height and make a rectangle. Then modify the code to make it hollow. Then draw triangles, then diamonds.&lt;/p&gt;&#xA;&lt;p&gt;Eventually I had a program that continuously chose shapes and sizes at random (kids love random stuff) which scrolled up the screen indefinitely. It was easy to get started and had enough challenge to be interesting.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2022-01-04T02:43:13.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7196" PostTypeId="2" ParentId="7186" CreationDate="2022-01-04T06:49:37.850" Score="5" Body="&lt;p&gt;&lt;em&gt;The Title of your post, and the content are two very different questions!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Should you learn just one language?&lt;/h2&gt;&#xA;&lt;p&gt;I want to say initially &lt;strong&gt;yes&lt;/strong&gt;, but ultimately you may need to learn a number of languages in your career if you want to develop on or for the latest hardware and operating systems as they evolve.&lt;/p&gt;&#xA;&lt;p&gt;The programming language is really just syntax for compiler instructions. After you gain proficiency in a language you will hopefully gain an appreciation and understanding for how that language works, if not why it works. Different languages are written for different compilers, once you understand one language then picking up another language can be much simpler if you understand how the new language syntax structure relates to the language you are proficient in. So once you gain proficiency in one language, transferring to another should be much lower effort.&lt;/p&gt;&#xA;&lt;p&gt;The counter argument to this is that it takes a lot of practise and therefor a long time to gain proficiency in one language. Instead by learning and using multiple languages at the same time, you can pickup the similarities and differences quicker and may gain a better understanding of computer science concepts in general because you will more practised at differentiating between language and concept.&lt;/p&gt;&#xA;&lt;p&gt;From a formal education point of view, it becomes &lt;em&gt;practical&lt;/em&gt; from a tooling/teaching/resource perspective for institutions to streamline the teaching of many different concepts into using the same language. You want to minimise the time and effort it takes to get your learning and development environments up and running. If you reduce the language and environment options you can reduce the documentation and guidance that you may need to provide but you can also maximise the returns on pre-requisite knowledge across subjects/units.&lt;/p&gt;&#xA;&lt;p&gt;What is important to the institution is that the language(s) adopted are capable of providing relatable examples to cover key CS concepts and methodologies and that they can find instructors proficient enough to deliver the necessary content. Many of these practical concepts will drive the language selection and therefor the natural bias of that next cohort of students, which can further skew this conversation...&lt;/p&gt;&#xA;&lt;h2&gt;Why there isn't a single language?&lt;/h2&gt;&#xA;&lt;p&gt;Whilst one &lt;em&gt;perfect&lt;/em&gt; language might be a great idea, there are a lot of different competing opinions around what that &lt;em&gt;perfect&lt;/em&gt; language might be, &lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_completeness&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turing Completeness&lt;/a&gt;, though well accepted and established, is still just a theory and one of many opinions especially on how to very that the language is complete. ;)&lt;/p&gt;&#xA;&lt;p&gt;Before we try to create one &lt;em&gt;new&lt;/em&gt; and &lt;em&gt;perfect&lt;/em&gt; language, we would seek to find a way to incorporate some, if not all of the previous popular algorithms and abstractions that make each of the current languages &lt;em&gt;great&lt;/em&gt;. But can such a thing be done, who would be responsible for re-writing the code from existing frameworks and languages, how do we determine which to bring across, who can be trusted to verify the completeness of this language?&lt;/p&gt;&#xA;&lt;p&gt;There are many &lt;em&gt;general purpose&lt;/em&gt; programming languages that have been created in the past, and I'm sure we haven't seen the last of them. Typescript is an interesting example specifically of a higher order language that compiles into a lower order language &lt;em&gt;javascript&lt;/em&gt; for execution in web browsers, we will probably see more of this type of evolution in the future because it deosn't require any additional effort from hardware or OS vendors. There are many theoretical benfits that TypeScript offers over javascript, I think we all agree that TypeScript has its place, but in a simple HTML page I can quickly use Javascript to satisfy many requirements it will run effectively natively in the browser without needing further compilation.&lt;/p&gt;&#xA;&lt;p&gt;What tends to rule the discussion is effort in the form of Time. Time is money, if I can use something to achieve an outcome quicker than other options, then using it might make me more money. So I will consider it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/7187&quot;&gt;@Buffy raises some excellently phrased points&lt;/a&gt; but we need to recognise that programming languages are bound to commercial interests, whether that be the IDE, a storage or hosting platform or client end runtime framework or platform. As developers we are constantly fighting between what is theoretically &amp;quot;best&amp;quot; and what is a commercially viable or practical language for development for our particular client.&lt;/p&gt;&#xA;&lt;p&gt;The hardware or environments that code is deployed to can restrict the possible languages which will significantly contribute to the total cost of designing a solution. So regardless of our experience or language proficiency, we may come across a client that whose solution must be deployed to a very specific hardware or medium or that client may have their own&lt;/p&gt;&#xA;&lt;p&gt;Some hardware vendors have specifically designed their own languages either in an effort to protect their hardware or implementation IP or sometimes hardware/vendor providers are deliberately trying to create separate market verticals, sometimes driven from a greed/commercialisation point of view or sometimes as a deliberate legal avoidance technique.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Java was supposed to be the &lt;em&gt;killer&lt;/em&gt; all purpose language, &lt;em&gt;MS Developer Studio&lt;/em&gt; and early versions of &lt;em&gt;MS Visual Studio&lt;/em&gt; even included support for variants of java (j++, j#). The variations were an evolution of the original java, enhancements to increase developer productivity and in part driven so they could integrate the complied assemblies with Internet Explorer to avoid some trust and operational constraints that were enforced from the official JVM runtime specification.&lt;/p&gt;&#xA;&lt;p&gt;Even before official complaints, MS were working on C# as a Java replacement that they could support and package directly in their operating system and browser products without being dependant on the language and JVM specification controlled by a competing commercial provider. MS were sued by Sun Microsystems because the MS java implementation was not 100% compatible with the java specification and as part of the settlement java support was dropped before the release of Visual Studio .Net.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;To properly answer the &lt;em&gt;why&lt;/em&gt; we have multiple general use languages in the first place it might be helpful to talk to someone who has experience authoring multiple languages, &lt;a href=&quot;https://microsoft.fandom.com/wiki/Anders_Hejlsberg&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mr. Anders Hejlsberg&lt;/a&gt; comes to mind as co-designer to many general purpose languages including &lt;em&gt;Turbo-Pascal&lt;/em&gt; which replaced a previous general purpose language &lt;em&gt;Pascal&lt;/em&gt;, &lt;em&gt;Delphi&lt;/em&gt; and of course more recently &lt;em&gt;C#&lt;/em&gt; and &lt;em&gt;TypeScript&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What I appreciate about Hejlsberg's designs is that he does not just focus on the language itself but he strikes a pragmatic balance between all stakeholders including the complier and interpreters. He puts a lot of energy into ensuring the tools, documentation and support libraries are provided and maintained to keep the language commercially viable.&lt;/p&gt;&#xA;&lt;p&gt;His engineering work is sometimes criticised as being in part derivative of other languages or attempts, but how many of us have truely original thoughts anyway? Hejlsberg applies an iterative approach as he continues to find ways to improve developer productivity.&lt;/p&gt;&#xA;&lt;p&gt;What is interesting is that changing hardware technologies and costs over the years means that what we want and expect from computers is evolving. As tech evolves some software driven algorithms get packaged into or replaced by hardware implementations, and some hardware implementations become more cost or energy efficient to be implemented in software. This means that the languages need to evolve to cater for these changes, over time you reach a point where there is no easy way to add a new fundamental extension to your language without contradicting,  de-stabilising or rewriting all the previous rules and regulations. At that point, the next version, even if it has the same name or similar syntax, is probably a new language of its own.&lt;/p&gt;&#xA;" OwnerUserId="11481" LastEditorUserId="11481" LastEditDate="2022-01-06T04:07:30.140" LastActivityDate="2022-01-06T04:07:30.140" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7197" PostTypeId="2" ParentId="7151" CreationDate="2022-01-04T07:42:58.043" Score="3" Body="&lt;p&gt;If you do not agree with Industry based Certifications like those offered by Microsoft or other Independent online learning providers, then what you are really asking is &lt;em&gt;&amp;quot;Is there is an institution that will grant me a Degree if I pass their exams even if I didn't attend their classes&amp;quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The answer is then no, a Degree or Qualification is only recognised by industry and other providers if they trust that the Provider and their academic process. The certificate does not verify your knowledge, it verifies that you satisfied the attendance, knowledge scaffolding and assessment requirements of that institution.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is focused on computer science theory rather than practical or professional skills&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;and&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Leads to some sort of recognized certification or qualification in computer science&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;That is really a practical definition of an institution that separates them from  independent vendors, that they are &lt;em&gt;Recognized&lt;/em&gt; as a place that teaches CS theory, we don't check, we just know their name and expect their standards are greater than ours. Not all universities are recognized and of those that are, all are not equal.&lt;/p&gt;&#xA;&lt;p&gt;Many universities will offer credits for prior learning and experience, that may allow you to skip over entire subjects, but that is probably as close as you can get. If you have read all of the prescribed material and can demonstrate a level of proficiency and you might get a few more credits but you must still enroll and still complete the remaining units to achieve their qualification.&lt;/p&gt;&#xA;&lt;h3&gt;Is it necessary? What does it mean to be Industry Recognised?&lt;/h3&gt;&#xA;&lt;p&gt;Industry in general is practical, a CS graduate with no experience will require an investment of time to bring them up to proficiency in the workplace, a degree alone is not an indication that they can be proficient or even able to perform the necessary role, it is a reasonable standard but it is only a start point.&lt;/p&gt;&#xA;&lt;p&gt;Someone who has already demonstrated many years performing the expected role, and can show a high level of proficiency may not take much time to on-board into a role at all.&lt;/p&gt;&#xA;&lt;p&gt;Even if you have a CS degree, the next step should be to continue your education, either formally or by gaining other industry recognised certifications in the area that you wish to pursue.&lt;/p&gt;&#xA;&lt;p&gt;Some certifications like the &lt;a href=&quot;https://docs.microsoft.com/en-au/learn/certifications/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Microsoft Learning Certifications&lt;/a&gt; are very recognised in industry as a substitute or indication of experience. The same thing goes for different programming language based certifications, they indicate a level of experience or proficiency in that language, they are &lt;strong&gt;not&lt;/strong&gt; a substitute for a formal CS degree. However an Advanced C# certification for instance, is hard to attain without a sound understanding of the concepts from your definition:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;...looping and branching, pointers, data types, recursion, stacks, queues, automata, Turing machines, Lambda calculus, etc...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There is of course much more packed into CS, but industry will generally view a CS degree as a blank slate, someone who has been formally trained in &lt;em&gt;how to learn&lt;/em&gt; and will have been exposed to and may have an understanding of basic CS concepts and nomenclature.&lt;/p&gt;&#xA;&lt;p&gt;Industry recognised certifications certify a level of proficiency in a specific skill or operation, if these proficiencies align closly with the expectations of a role, then that cadidate may rate higher than a CS degree with no experience.&lt;/p&gt;&#xA;" OwnerUserId="11481" LastActivityDate="2022-01-04T07:42:58.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7198" PostTypeId="2" ParentId="7186" CreationDate="2022-01-04T08:15:09.910" Score="9" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;One language is better.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Sure, and if you ask five people &lt;em&gt;which&lt;/em&gt; one language is best, you'll get six answers.&lt;/p&gt;&#xA;&lt;p&gt;Computer programming is not a solved problem. We're still learning the best ways to do it. Some languages are better suited for certain tasks, but there's also plenty of room for differences of opinion even with a single well-defined problem domain.&lt;/p&gt;&#xA;" OwnerUserId="1970" LastActivityDate="2022-01-04T08:15:09.910" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7199" PostTypeId="1" AcceptedAnswerId="7202" CreationDate="2022-01-04T12:19:33.480" Score="2" ViewCount="241" Body="&lt;p&gt;Can somone point a mistake in my reasoning?&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It is possible to build an operating system.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A Turing complete programming language can by used to program an operating system.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;LaTeX is a Turing complete, so you can build an operating system with LaTeX.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You need a LaTeX to compile a tex-document, and that runs in some operating system.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Therefore, by 1, 2 and 3 you can build an operating system with LaTeX but by 4., you can't install it to any machine.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Is there a contradiction or has my reasoning an error?&lt;/p&gt;&#xA;" OwnerUserId="11483" LastActivityDate="2022-01-04T20:53:28.290" Title="Can one build an operating system with LaTeX?" Tags="|self-learning|turing-machines|" AnswerCount="2" CommentCount="1" ClosedDate="2022-01-04T21:12:43.160" ContentLicense="CC BY-SA 4.0" />
  <row Id="7200" PostTypeId="2" ParentId="7199" CreationDate="2022-01-04T13:10:26.670" Score="1" Body="&lt;p&gt;Actually you can do it and this sort of thing is often done. In particular, C compilers are often written in C itself. Even weirder, the first compiler for C on a new architecture might be written in C through an iterative process called &lt;em&gt;bootstrapping&lt;/em&gt;. So, since LaTex is actually a compiler, you can do the same thing.&lt;/p&gt;&#xA;&lt;p&gt;You work on such things in a series of stages, with only the very first stage needing to be done in another language (or no language other than absolute machine language).&lt;/p&gt;&#xA;&lt;p&gt;First write a simple thing that will only compile somewhat more complex things, not the full language. Write a somewhat more complex thing that only uses features supported by the simple thing. Then, compile the new thing with the simple thing. Replace the simple thing with the new thing as your basic compiler. Then repeat. Write the V2 new thing using only features of the V1 simple thing and compile it with V1. Replace V1 with V2 and repeat as necessary until Vn is what you want.&lt;/p&gt;&#xA;&lt;p&gt;In practice two or three iterations might be needed, but usually not more.&lt;/p&gt;&#xA;&lt;p&gt;In fact, the latest versions of most languages are written this way by writing a compiler for them in the language of the previous version of the language.&lt;/p&gt;&#xA;&lt;p&gt;There is usually a final stage in such bootstrapping in which a compiler for level n is written in the level n language itself, which only previously had a compiler written in level n-1 language. The compiler then compiles itself, and replaces the earlier version. Once this newest thing is compiled the result replaces the version that compiled it.&lt;/p&gt;&#xA;&lt;p&gt;I don't know when this was first used, but I'll guess it was during the development of C.&lt;/p&gt;&#xA;&lt;p&gt;For your application it is much simpler if you already have a LaTex system, write your OS to be compatible with that. Then compile it. Then replace your original OS with this new version. Presumably this new version has its own LaTex compiler.&lt;/p&gt;&#xA;&lt;p&gt;Alternatively, if you have a Turing Complete language (maybe C) on the new machine that doesn't have a LaTex system, write a compiler for LaTex in C on that new machine and compile it there. You now have a running LaTex compiler on that machine. So, write your LaTex compiler in LaTex and compile it with that first (C) version and then replace the first version with the new one. Now you have a Turning Complete language that you can use to write other programs.&lt;/p&gt;&#xA;&lt;p&gt;You can perform any &lt;em&gt;computational process&lt;/em&gt; on any Turing Machine, but it doesn't need to be easy.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;And, you should probably read the following pdf if you have any interest in compilers: &lt;a href=&quot;https://cs.cmu.edu/%7Erdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-01-04T14:36:49.983" LastActivityDate="2022-01-04T14:36:49.983" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7201" PostTypeId="2" ParentId="7186" CreationDate="2022-01-04T14:39:26.163" Score="4" Body="&lt;p&gt;One more aspect:&lt;/p&gt;&#xA;&lt;p&gt;Every non-trivial software project uses its own, problem-specific language. So, there's literally millions of programming languages in use.&lt;/p&gt;&#xA;&lt;p&gt;How that?&lt;/p&gt;&#xA;&lt;p&gt;Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.&lt;/p&gt;&#xA;&lt;p&gt;Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus &lt;strong&gt;creating the language you want to use for expressing your solution&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.&lt;/p&gt;&#xA;&lt;p&gt;With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (classes, fields, methods, ...) plays a much greater role.&lt;/p&gt;&#xA;&lt;p&gt;So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries provide a reasonably-good match to the problem-domain, so we don't waste precious resources on creating abstractions that would come for free with a different base language.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2022-01-04T14:39:26.163" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7202" PostTypeId="2" ParentId="7199" CreationDate="2022-01-04T15:03:47.710" Score="3" Body="&lt;p&gt;Somewhere between step 3 and 4 you make an unwarranted leap. TeX is Turing-complete, so you can write a computer &lt;em&gt;in TeX&lt;/em&gt; that does anything. However, that computer is not the one you're compiling your LaTeX document on. So you can not write an operating system for your PC in TeX/LaTeX.&lt;/p&gt;&#xA;&lt;p&gt;That said, most modern LaTeX versions have an OS escape: if you &lt;code&gt;\write18{command}&lt;/code&gt;, that command gets executed. That way you can still do file and whatever operations on your machine from LaTeX.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-04T15:03:47.710" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7203" PostTypeId="2" ParentId="7186" CreationDate="2022-01-04T15:40:05.550" Score="2" Body="&lt;p&gt;One more aspect:&lt;/p&gt;&#xA;&lt;p&gt;Every non-trivial software project uses its own, problem-specific language. So, effectively, we have millions of programming languages in use.&lt;/p&gt;&#xA;&lt;p&gt;How that?&lt;/p&gt;&#xA;&lt;p&gt;Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.&lt;/p&gt;&#xA;&lt;p&gt;Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus &lt;strong&gt;creating the language you want to use for expressing your solution&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.&lt;/p&gt;&#xA;&lt;p&gt;With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (framework, classes, fields, methods, ...) plays a much greater role.&lt;/p&gt;&#xA;&lt;p&gt;So, effectively, the top software layer for a given problem will look very much the same, no matter what base language was chosen. Only, it's packed into the syntax of the base language. E.g. using Java syntax (but would look quite similar in C, C++, C# and a lot of others)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Problem problem = readProblem();&#xA;Solution solution = computeSolution(problem);&#xA;writeSolution(solution);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Even in an &amp;quot;exotic&amp;quot; language like LISP, you'd recognize the same pattern:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;(let* ((problem (read-problem))&#xA;       (solution (compute-solution problem)))&#xA;    (write-solution solution))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You see, there's much more problem-specific vocabulary than base language in these lines of code.&lt;/p&gt;&#xA;&lt;p&gt;So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries come close to the problem-domain. If we choose the wrong base language, we waste development effort (= money) for creating the vocabulary for the higher-level functions that come for free in other languages.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2022-01-04T15:40:05.550" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7204" PostTypeId="2" ParentId="7186" CreationDate="2022-01-04T17:25:24.223" Score="2" Body="&lt;p&gt;From a pragmatic (software engineering) perspective...&lt;/p&gt;&#xA;&lt;p&gt;The world is filled with pre-existing pieces of software, written in different languages. Even if someone invented a new &amp;quot;perfect&amp;quot; programming language overnight, all this existing code would not just automatically disappear. It would remain in use, and someone would need to maintain it. So the new &amp;quot;perfect&amp;quot; language would just be one more language in that heterogeneous landscape.&lt;/p&gt;&#xA;&lt;p&gt;Now, if that new language was so good, maybe people would like to translate existing code into the new language. Manual translation would usually be unthinkable (too much code!). Automatic translation might be a possibility, but would often result in the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;automatically generated code may look &amp;quot;weird&amp;quot; and unreadable in places&lt;/li&gt;&#xA;&lt;li&gt;some aspects of the original language might be impossible to translate automatically&lt;/li&gt;&#xA;&lt;li&gt;existing code may be translated incorrectly, resulting in bugs&lt;/li&gt;&#xA;&lt;li&gt;existing code may be translated correctly, exposing bugs! (original implementation may only work &amp;quot;by accident&amp;quot;, because of some weird feature of the original language)&lt;/li&gt;&#xA;&lt;li&gt;performance might not be as good. Or maybe too good?? (see above. Changes in time of execution can have unpredictible side-effects)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Regarding the last point, consider hardware. Some languages are much &amp;quot;closer to the metal&amp;quot;, others are much more abstract. Translation between &amp;quot;high-level&amp;quot; abstract languages running on powerful hardware is feasible (nevermind the potential loss of performance, or the extra resources needed, just increase your CPU and/or add more RAM). The same cannot be said of embedded software running on much more specific and limited hardware.&lt;/p&gt;&#xA;&lt;p&gt;Consider also the human factor: new language may be great, but existing programmers may find it tedious (and a risky investment of their time) to learn yet another new language. Hence the slow adoption. Also, more money might be made by specialising in maintaining all the old libraries...&lt;/p&gt;&#xA;" OwnerUserId="11486" LastActivityDate="2022-01-04T17:25:24.223" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7205" PostTypeId="1" AcceptedAnswerId="7206" CreationDate="2022-01-04T19:11:12.997" Score="18" ViewCount="3558" Body="&lt;p&gt;I was introducing lists to someone young (in &lt;a href=&quot;https://en.wikipedia.org/wiki/Scratch_%28programming_language%29&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;). Creating a list is boring, so I opted to introduce something that you can do with lists, but requires some thinking: swapping. I introduced it by putting out four pencils in a row, like this. I asked them to swap the second and fourth items in the array (in reality).&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;| | | |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;They took both their hands, picked up the second and fourth pencils (each in one hand), and swapped them! That works in reality... but isn't right in computer science. So, I told them, try doing it with only one hand. Predictably, they couldn't. I introduced a temporary spot, where they could put one pencil. I was hoping they would do something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Second Item -&amp;gt; Temp spot&#xA;Fourth Item -&amp;gt; Second spot&#xA;Temp spot -&amp;gt; Fourth spot&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;They figured it out. But they asked me something like this: &amp;quot;Why can't I use two hands?&amp;quot;. I wasn't sure how to answer that. The obvious answer is... &lt;em&gt;the computer only has one hand&lt;/em&gt; (this was &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt;, so multithreading didn't exist). But... I'm hesitant to say that for two reasons: (1) in Python, the &amp;quot;two-hands&amp;quot; approach works (&lt;code&gt;a, b = b, a&lt;/code&gt;, see &lt;a href=&quot;https://stackoverflow.com/a/24844556/16886597&quot;&gt;this Stack Overflow question&lt;/a&gt;) and (2) multithreading exists, and there are some (obscure) ways to swap two variables without a temporary variable. So, how should I answer the question &amp;quot;why can't I use two hands&amp;quot;?&lt;/p&gt;&#xA;&lt;p&gt;Remember, they are just learning lists, so explaining something like multithreading would be too difficult.&lt;/p&gt;&#xA;&lt;p&gt;What's a good way to answer that question, without confusing them?&lt;/p&gt;&#xA;" OwnerUserId="11487" LastEditorUserId="1314" LastEditDate="2022-01-06T16:45:20.197" LastActivityDate="2022-01-13T10:12:57.183" Title="How to respond to the two-handed approach to swapping" Tags="|teaching-analogy|computational-thinking|arrays|primary-school|concurrency|" AnswerCount="10" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7206" PostTypeId="2" ParentId="7205" CreationDate="2022-01-04T20:22:41.430" Score="27" Body="&lt;p&gt;Don't overcomplicate things.  Your first instinct, that the computer only has one hand, was the correct one.&lt;/p&gt;&#xA;&lt;p&gt;This is a regular problem that new teachers have, and it sometimes takes a few years of frustration to burn out the idea that everything you say must be formally &lt;em&gt;true&lt;/em&gt;.  If we say something that is &lt;em&gt;untrue&lt;/em&gt;, the reasoning goes, the students will remember it and use that wrong idea to badly misunderstand things later.&lt;/p&gt;&#xA;&lt;p&gt;Let me give you a slightly different mental model of learning, and you'll find all of the support you need in the &lt;em&gt;absolutely fantastic&lt;/em&gt; book &amp;quot;How People Learn II&amp;quot;, which is a big volume that describes everything we really know from research about how learning actually works in the brain.&lt;/p&gt;&#xA;&lt;p&gt;We (1) build mental models by (2) connecting new information (3) to things that we already know.  Furthermore, (4) abstraction is the brain-process of finding the similarity in (5) similar mental models.  (6) In order to build upon prior knowledge, (7) it must already be fairly well understood.  If it's not, and you simply don't have the prerequisite knowledge, you are unlikely to build any mental model at all.&lt;/p&gt;&#xA;&lt;p&gt;(That should make some sense; if it's not already fairly concrete within your mind, it's too nebulous to glom new ideas onto.)&lt;/p&gt;&#xA;&lt;p&gt;So, with that as a model of learning, there are a few implications:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We need to help students build small, clear mental models.  They can then use these in the future to build further, richer models.  This lends itself very nicely to the KISS principle.  Don't try to introduce too many variations to the idea at once.  Leave the complicating for the next step, or you won't obtain any model at all.&lt;/li&gt;&#xA;&lt;li&gt;Before there is already a fairly clear mental model, learning isn't really taking place, so little of what is said will be directly remembered.  Corollary to this is that the danger of them being confused by some overly literal interpretation of what you said while explaining how to swap in Scratch once they encounter threading later down the line is completely negligible.  They won't remember much of the explanation until they can build a mental model, so they won't remember those kinds of details. In addition, there are simply too many cognitive models that have to be built between swap in Scratch and multithreading for one to hamper the other.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Don't let perfect be the enemy of progress.  Keep it simple and focused on the small concept they are learning &lt;em&gt;right now&lt;/em&gt;, and be comfortable that that will support them best as they grow and develop and complexify ideas later.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-01-05T05:59:03.663" LastActivityDate="2022-01-05T05:59:03.663" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7208" PostTypeId="2" ParentId="7205" CreationDate="2022-01-04T23:12:44.703" Score="17" Body="&lt;p&gt;Your problem is that you tried to let your student &amp;quot;program&amp;quot; without establishing a language. Thus they were free to write their own &amp;quot;language&amp;quot; in which you can do two things at once because you have two hands. If you'd asked them to rotate 3 objects, they would have picked up the third pencil in their mouth or so.&lt;/p&gt;&#xA;&lt;p&gt;You could have asked them &amp;quot;suppose you're a crane driver&amp;quot; then, because they obviously have only one crane, they would have solved the problem &amp;quot;correctly&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;May this also be a lesson to you to think very hard about everything you ask your students. Don't improvise. Or just learn for next time.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-01-05T11:35:41.853" LastActivityDate="2022-01-05T11:35:41.853" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7209" PostTypeId="2" ParentId="7186" CreationDate="2022-01-05T01:06:06.897" Score="3" Body="&lt;p&gt;There are a lot of great answers here which explain why it's &lt;em&gt;good&lt;/em&gt; that there are so many different programming languages. But that's not exactly what you asked; you want to know why there &lt;em&gt;are&lt;/em&gt; so many different programming languages.&lt;/p&gt;&#xA;&lt;p&gt;I think the answer to that is quite straightforward: programming languages are not actually that hard to create, and when somebody designs a new programming language, they aren't thinking &amp;quot;I want there to be more programming languages&amp;quot;, they are usually thinking &amp;quot;I want there to be &lt;em&gt;a&lt;/em&gt; language &lt;em&gt;like this&lt;/em&gt;&amp;quot;. Besides the motivation to design an &amp;quot;ideal&amp;quot; programming language without the drawbacks and blemishes of earlier languages (in the language designer's subjective opinion, which of course differs from every other language designer's subjective opinion), it is actually quite fun to design a programming language.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes a programming language exists simply because someone had &lt;a href=&quot;https://en.wikipedia.org/wiki/Whitespace_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;a funny idea&lt;/a&gt; for it at the pub. So it would be strange if there &lt;em&gt;weren't&lt;/em&gt; thousands of the things out there!&lt;/p&gt;&#xA;" OwnerUserId="8562" LastActivityDate="2022-01-05T01:06:06.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7210" PostTypeId="2" ParentId="7205" CreationDate="2022-01-05T01:19:45.787" Score="2" Body="&lt;p&gt;Ben's answer is great, but allow me to suggest that you don't need to &amp;quot;respond&amp;quot; to the two-handed approach at all: just say when you're explaining the problem in the first place that they can only use one hand and they can only hold one item at a time.&lt;/p&gt;&#xA;&lt;p&gt;Students are less likely to need a justification this way, because you haven't changed the rules to forbid a solution after they've come up with it themselves. If a justification is required, the question is not &lt;em&gt;&amp;quot;why can't I use two hands?&amp;quot;&lt;/em&gt;, but rather &lt;em&gt;&amp;quot;why is it useful to know how to do this with one hand?&amp;quot;&lt;/em&gt;. And the answer to that is that the solution using one hand can be translated directly into code, whereas the solution with two hands can't be.&lt;/p&gt;&#xA;" OwnerUserId="8562" LastEditorUserId="8562" LastEditDate="2022-01-05T01:28:07.967" LastActivityDate="2022-01-05T01:28:07.967" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7211" PostTypeId="2" ParentId="7205" CreationDate="2022-01-05T10:55:48.853" Score="22" Body="&lt;h3&gt;Re-evaluate what you think is &amp;quot;right&amp;quot;, because you aren't&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;but isn't right in computer science&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is simply incorrect.  Your student can create two variables called &lt;code&gt;LeftHand&lt;/code&gt; and &lt;code&gt;RightHand&lt;/code&gt;.  Copy value &amp;quot;red&amp;quot; from position 1 to &lt;code&gt;LeftHand&lt;/code&gt;, copy value &amp;quot;green&amp;quot; from position 4 to &lt;code&gt;RightHand&lt;/code&gt;, copy values back to positions 4 and 1 respectively.  Job done.&lt;/p&gt;&#xA;&lt;p&gt;Is this optimal?  No - but you didn't ask for optimal, you asked for a solution which works.  Your student gave you a working solution, and you've rejected it because of your own preconceptions of how many variables they &amp;quot;should&amp;quot; use, or how many steps it &amp;quot;should&amp;quot; take.  Neither of those preconceptions are correct.  There's no time or RAM pressures here, so the student is perfectly free to do it their way. (Edit following your comments elsewhere: Nor do they have to consider concurrency where someone else could move the pencils in between.)&lt;/p&gt;&#xA;&lt;p&gt;And not only are they free to do it this way - if they find it easier to understand then they &lt;em&gt;&lt;strong&gt;should&lt;/strong&gt;&lt;/em&gt;.  My background is in safety-related software.  Coding standards in safety-related software prioritise readability, maintainability and ease of understanding by other coders, ahead of pure speed, because the most intractable bugs almost always come from people trying to be too clever.  If you keep the concepts simple, you don't make mistakes and your code is more likely to work first time.&lt;/p&gt;&#xA;&lt;p&gt;In short, you are committing a cardinal mistake in software engineering, which is premature optimisation (which as every software engineer should know &lt;a href=&quot;https://wiki.c2.com/?PrematureOptimization&quot; rel=&quot;noreferrer&quot;&gt;is the root of all evil&lt;/a&gt;).  Your student is not making that mistake, and that currently makes them a &lt;em&gt;&lt;strong&gt;better&lt;/strong&gt;&lt;/em&gt; software engineer than you!&lt;/p&gt;&#xA;&lt;p&gt;Certainly after they've got a two-handed solution, you can have them do a one-handed version with a single slot.  You can then show them that it takes fewer steps and one less variable.  The answer to &amp;quot;why can't we...?&amp;quot; is simply &amp;quot;you can if you want, but look, it's more work&amp;quot;.  Most people would rather do less work, so it's a win all round.&lt;/p&gt;&#xA;" OwnerUserId="1864" LastEditorUserId="1864" LastEditDate="2022-01-05T14:11:38.333" LastActivityDate="2022-01-05T14:11:38.333" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7212" PostTypeId="2" ParentId="7205" CreationDate="2022-01-05T14:36:04.753" Score="3" Body="&lt;p&gt;In thinking about this, and especially &lt;a href=&quot;https://cseducators.stackexchange.com/a/7211/1293&quot;&gt;the answer of Graham&lt;/a&gt;, I think that what we really do in the standard three step process &lt;em&gt;is&lt;/em&gt; a two handed swap without thinking of it. So, it is a failure of the metaphor, actually. So, here is a reframing of the standard process:&lt;/p&gt;&#xA;&lt;p&gt;Pick up one stick with the left hand (i.e. temp is associated with the left hand). THEN, move the other stick with the right hand (the assignment). THEN put the stick in the left hand into the proper slot.&lt;/p&gt;&#xA;&lt;p&gt;Or:&lt;/p&gt;&#xA;&lt;p&gt;Second Item -&amp;gt; Left Hand&#xA;Fourth Item -&amp;gt; Second spot // using Right Hand&#xA;Left Hand -&amp;gt; Fourth spot&lt;/p&gt;&#xA;&lt;p&gt;All you need to explain is that (with a single processor) only one thing can be done at a time and so the swap-with-two-hands has to be sequenced in some way rather than happening simultaneously.&lt;/p&gt;&#xA;&lt;p&gt;This is to avoid issues in the more general case where you want to swap(m,n) where m and n could be the same. Both hands can't pick up the same stick simultaneously if it has to be sequenced. The bright kids will want to complain that you can't pick up a stick from an empty slot, but the small variation isn't too hard to explain if you think of it beforehand. The really astute ones will notice that assignment is copying, so &amp;quot;picking up one stick&amp;quot; in the program doesn't really leave that slot empty, as it does with physical objects.&lt;/p&gt;&#xA;&lt;p&gt;(ASIDE: there is a way to avoid that physical/virtual disconnect by using a reference (rather than copy) metaphor of variables, but it is likely not where you want to go with youngsters unless you do it ubiquitously. In essence, a variable is a reference to a value not a box that &amp;quot;holds&amp;quot; the value.)&lt;/p&gt;&#xA;&lt;p&gt;It also avoids discussions of race conditions with multiple processors.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-01-05T14:36:04.753" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7213" PostTypeId="2" ParentId="7186" CreationDate="2022-01-05T16:01:03.680" Score="2" Body="&lt;p&gt;There is a conflict of interest between organisations and developers which I believe is partly responsible for the creation and adoption of new languages.&lt;/p&gt;&#xA;&lt;p&gt;Organisations would probably want a single universal language because it would drive salaries down.&lt;/p&gt;&#xA;&lt;p&gt;However an individual developer would be well advised to stay ahead of the curve and learn additional languages because it will improve their earning potential.&lt;/p&gt;&#xA;" OwnerUserId="11506" LastActivityDate="2022-01-05T16:01:03.680" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7214" PostTypeId="2" ParentId="7205" CreationDate="2022-01-05T17:51:04.250" Score="3" Body="&lt;p&gt;I do the swap example pretending to have two largish (2-hands-to-lift) boxes side-by-side on a desk (with only enough room for two boxes). After we lift the first we have to look for a place to put it, which feels like creating the temp variable.&lt;/p&gt;&#xA;&lt;p&gt;But I don't think swap is an especially good example with lists. It's easier to explain swapping just any two variables, x and y. Lists are about using indexes. In Scratch we don't get as much fun with loops, but can do 2 step find-the-index-first stuff like &amp;quot;turn the first 9 into a 6&amp;quot; or &amp;quot;put 12's before and after the first 3&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;As far as &amp;quot;computer rules&amp;quot; I like a lighter touch. Swap is one of many clever tricks which happen to work, for now. Motivate the problem with how switching x and y starting with &amp;quot;set x to y&amp;quot; permanently erases x. Then explain how that 3-step dance is actually the standard swap trick. We could have had a built-in swap command but everyone was all &amp;quot;no, everyone knows the trick and it's just one extra step&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Esp. in Scratch you're hoping they like it and move onto a real language. At that point you're going to explain how &amp;quot;Scratch rules&amp;quot; like pre-making variables aren't computer rules at all. But we learned lots of concepts which mostly transfer over with minor changes. In the end: switching values of two variables is a thing; everyone calls it a swap; and it's good to know the trick just-in-case there's no built-in way.&lt;/p&gt;&#xA;" OwnerUserId="8773" LastActivityDate="2022-01-05T17:51:04.250" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7215" PostTypeId="2" ParentId="7205" CreationDate="2022-01-05T18:47:02.550" Score="5" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;They took both their hands, picked up the second and fourth pencils (each in one hand), and swapped them! That works in reality... but isn't right in computer science.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It depends on your paradigm.  You are teaching the swap algorithm you know, but haven't explained to the students (or at least in the question) what things are.   Here is a perfectly valid way to look at the operation, using two temp variables, 'Left Hand' and 'Right Hand':&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Second Item -&amp;gt; Left Hand&#xA;Fourth Item -&amp;gt; Right Hand&#xA;Left Hand -&amp;gt; Fourth spot&#xA;Right Hand -&amp;gt; Second spot&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In fact many students will do it this way (with two temp variables) when they attempt to do swapping for the first time, I'm pretty sure I did.  Some languages have swap operations built-in so you don't require a temporary variable.&lt;/p&gt;&#xA;&lt;p&gt;In this particular case I think it would make more sense to say that you can only move one pencil at a time rather than you have only one hand.  After all I could pick up the pencil in spot two and place it in slot four while picking up the pencil there at the same time with one hand.&lt;/p&gt;&#xA;&lt;p&gt;The analogy breaks down in other ways, for instance normally you make a copy of the item in the temp variable and it exists in two places until you overwrite it in the array.  I think using things like colored blocks here and making copies into variables would be a better way to visualize what is actually happening too...&lt;/p&gt;&#xA;" OwnerUserId="5154" LastActivityDate="2022-01-05T18:47:02.550" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7216" PostTypeId="2" ParentId="7186" CreationDate="2022-01-05T20:01:26.943" Score="3" Body="&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/7189/3168&quot;&gt;Buffy and Ben&lt;/a&gt; offer logical explanations to the plethora of languages that exist.  The ideas make sense, you need a better tool, you have a different niche. But languages don't exist solely because they work better than another language for a specific use case. There's a human element in there that makes things a whole lot less fun and a whole lot more arbitrary.&lt;/p&gt;&#xA;&lt;p&gt;For example, the list of languages Ben had, each are not the ideal language for their own use case, or exist in spite of other languages for not very nice reasons.&lt;/p&gt;&#xA;&lt;h3&gt;Excel&lt;/h3&gt;&#xA;&lt;p&gt;Excel's language is not the best for &amp;quot;short scripts&amp;quot; and is severely limiting compared to many dozens of languages, including python. For example, instead of having to execute statements hidden behind visual cells, it might make more sense to have a series of statements that refer to specific cells ie:&lt;/p&gt;&#xA;&lt;p&gt;suming an entire row.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cell[row][col] = sum(cell[row][:])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;or sum an entire square subsection:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cell[row][col] = sum(cell[row_start:row_end][col_start:col_end])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you want to do something like simple sum rows in a table if they meet a condition, that's near &lt;a href=&quot;https://stackoverflow.com/questions/65508264/excel-how-to-sum-rows-in-table-a-if-they-meet-a-condition-in-table-b&quot;&gt;incomprehensible&lt;/a&gt; in Excel's programming language:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;=SUMPRODUCT((ISNUMBER(FIND(UPPER(&amp;quot;(&amp;quot;&amp;amp;O&lt;span class=&quot;math-container&quot;&gt;$5:O$&lt;/span&gt;9&amp;amp;&amp;quot;)&amp;quot;),B5)))*I&lt;span class=&quot;math-container&quot;&gt;$5:N$&lt;/span&gt;9)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So clearly Excel's language is not the easiest or best choice for such a thing.&lt;/p&gt;&#xA;&lt;p&gt;The real reason Excel's language exists is because it already existed.  Here's what I mean.  The average users use case of Excel doesn't even include using the programming language directly, much less these summing routines.  Using a better language doesn't make a lot of &lt;em&gt;business&lt;/em&gt; sense, since it's relatively niche in the first place.  What's more, if you change to an objectively better language for the job, you've also alienated your pre-existing customer base, many of which will be angry and stubborn attempting to stick to their inferior product, since they don't want to learn.  You may be stuck supporting the &amp;quot;old way&amp;quot; regardless because of stubborn customers.&lt;/p&gt;&#xA;&lt;h3&gt;C&lt;/h3&gt;&#xA;&lt;p&gt;If we get to C, C doesn't exist because it is the best language for working with low level hardware/telling the hardware what to do.  C doesn't even map properly to large swaths of different devices it's used on, it can't encapsulate ideas of paged ram that many pieces of hardware have (where you can't address pieces of memory directly, you must first execute a function to be able to address a place where a piece of memory resides).  C often does extra work as well, because it doesn't have many compile time constructs, so you're often doing work at runtime that could be done at compile time, or using &lt;em&gt;another&lt;/em&gt; language to generate C code which represents your compile time construct.  C++, when you can use it, is objectively a better language for &amp;quot;mapping to hardware&amp;quot;, it is a 99.999% superset of C and can do things faster, easier, and less error prone.  But languages like Rust, are even better than that, as most functionality and many libraries are still available even after you remove the standard library.&lt;/p&gt;&#xA;&lt;p&gt;C is used because it already exists, and has a stable ABI.  Now that ABI thing might sound like a &amp;quot;neat programming language feature&amp;quot;, but really, it's another political thing. ABI, application binary interface, refers to how compiled programs interact with other compiled programs, calling functions from the assembly level in your code. If ABI's aren't stable, new versions of a language or compiler might cause previously working code, that was linked during runtime to another library, to no longer work. An ABI becomes stable when compilers agree not to change it.  The only reason C's ABI is stable is people agreed not to change it.  It's not because C is an elegantly written language, it's because people used it.&lt;/p&gt;&#xA;&lt;p&gt;C's niche today is for glue code because of it's ABI stability. Lots of other languages know how to talk with compiled C code because of this. C, because of its ubiquity, and how old it is, is supported by a wide variety of hardware.  This makes it convenient when targeting low level code for the widest set of devices, but it isn't a feature of the language that made it so.  Often it is used to boostrap OS's and programming languages because of this.  Some platforms don't support C++ and rust because no one's bothered to write implimentations for those platforms for those languages.  These languages are &amp;quot;more complicated&amp;quot; thus often it means that these other platforms don't want to put in the work to support them.  But for C++ and Rust implementations relying on LLVM, or other 3rd party IR tooling, it's not because of the language at all, it's because the vendors don't feel like putting in the support for LLVM targets.&lt;/p&gt;&#xA;&lt;h3&gt;Mathematica&lt;/h3&gt;&#xA;&lt;p&gt;Mathematica is not a nice language to use for most programmers.  It's really inefficient and the tooling ecosystem is entirely tied to wolfram products. It's not pleasant to use, and only appears &amp;quot;great&amp;quot; to a mathematician, because mathematicians don't want to learn programming languages, so you have to trick them into using the tools they actually need to use.  There are some nice visual features, unrelated to the language itself, but as we see with python notebooks, this can be accomplished in basically any language if someone put forth the effort. So that's not a positive for the language itself.  Mathematic symboligy is chronically overloaded to the point where even simple symbols, like the delta, can be confused within the same function for a multitude of different usages.  Mathematic symboligy is not efficient for understanding with that respect. Some one wise once said:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;[Mathematic] equations are like code golf you're forced to read&amp;quot;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The purpose of Mathematic symboligy is unfortunately not to for reading, but for easy writing and an &amp;quot;objective&amp;quot; symbolic set across language barriers. These equations are often written write and forget.&lt;/p&gt;&#xA;&lt;p&gt;Now others might tout mathematica's symbolic math power, and other utilities.  The problem with this is that this isn't due to the language itself, but the libraries &lt;em&gt;linked behind it&lt;/em&gt;.  I emphasize linked, because you don't even write actual symbolic evaluation utilities in Mathematica itself, they wrote that in an entirely different language, and give you a simple interface to those utilities. If that doesn't speak to how bad the language is for it's own use case, I'm not sure what does.  Unfortunately many of these implementations are non trivial, and the only thing that arguably rivals it, sympy, gets stuck with trivial symbolic equations. On top of that, because Mathematica is paid, they don't opensource these things, so better languages and ecosystems can't take advantage of the work they did on their inferior language.&lt;/p&gt;&#xA;&lt;h3&gt;The myth that languages don't try to rule them all.&lt;/h3&gt;&#xA;&lt;p&gt;So one more thing I'd like to point out, there &lt;em&gt;are&lt;/em&gt; attempts to have &amp;quot;one language&amp;quot; languages, many languages have &amp;quot;converged&amp;quot; to have so many utilities that they serve extremely broad niches.  One of the most famous and oldest examples, was Algol 60. It was supposed to be the successor to previous versions of Algol, and included a whole bunch of other programming paradigms inside of it. IIRC, it didn't have a successful compiler implemented for it, it was too big.&lt;/p&gt;&#xA;&lt;p&gt;But other languages have followed in its footsteps. C++ being a very very reminiscent example. C++ has expanded to include functional paradigms, imperative declarative.  C++ has expanded to attempt to &lt;em&gt;actually&lt;/em&gt; fill all possible niches, from low to high.  Now, ignoring arguments of how well it's actually managed to do these kinds of things, C++ has basically run into the algol situation, as of C++20.  C++20, in 2022, does not have a complete implementation. 2+years after the finalization of the standard, there's no compiler that supports &lt;em&gt;everything&lt;/em&gt; in c++20.&lt;/p&gt;&#xA;&lt;p&gt;But another thing I'd like to mention, is metaprogramming.  A very popular proposal to C++ would have added &lt;a href=&quot;http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0707r4.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;MetaClasses&lt;/a&gt; to the language, a facility that would have brought, implicitly many of the facilities found in C#/Java OOP, properties and many other features.  I bring this up to bring up the tendency for large updated programming languages to have features meant to implement other features. Features that overlap heavily into what were the niches of other programming languages.  C++ is not alone in this.  In swift you can overload any operator, and it similarly has a powerful meta programming capability.  In Python, you can modify the AST of the language itself at runtime, allowing you to implement powerful language extensions with out new compiler extensions or other advanced tools.  In Rust, despite implementations of it being compiled, you can use macros to emulate almost every feature imaginable, though it will often slow compile time, as macros in rust work off of the abstract syntax tree.&lt;/p&gt;&#xA;&lt;p&gt;And there's often good reason for people not wanting to jump ship to another DSL for certain workloads. Each of the languages I've discussed, each has their own downsides their own major faults maybe acceptable to a select few people, but not acceptable to everyone.  So people wish to stick to their own languages for all these facilities, and develop language features that enable them to do this.  Tooling comes packed in with their own language already, and they don't have to worry about odd build system interactions either.&lt;/p&gt;&#xA;&lt;h3&gt;Don't get me wrong, separate languages are still valuable.&lt;/h3&gt;&#xA;&lt;p&gt;While there is a push in many large popular languages to be able to fill virtually every niche, there's still value to DSLs.  A really good example of this, and probably the only really good example of this, is SQL.  While SQL has a lot of dialects, SQL is independently compiled from your host program running the queries, and is very small, and allows you to more easily construct database queries and actions vs most native general purpose programming language.&lt;/p&gt;&#xA;&lt;p&gt;Now there are funnily enough a few issues with this view still, many programming languages &lt;em&gt;embedd SQL syntax into themselves&lt;/em&gt;.  C and C++ have tools that do this, Rust has libraries that have macros that sort of do this.  Still the spirit of a DSL is still there.&lt;/p&gt;&#xA;&lt;p&gt;The other major issue is that SQL itself is... bad for a query language.  In another example of not-the-best-tool being in use because people use it, SQL, and most of its modifications and derivatives, are arguable outclassed by &lt;a href=&quot;https://en.wikipedia.org/wiki/Datalog&quot; rel=&quot;nofollow noreferrer&quot;&gt;Datalog&lt;/a&gt;, an modification to a language called prolog which was never meant to be a data base query language.  That's pretty sad.  One of the major culprits of the failures of SQL were the original designers at IBM of the language... who instead of using pre-defined &lt;a href=&quot;https://en.wikipedia.org/wiki/Relational_algebra#:%7E:text=In%20database%20theory%2C%20relational%20algebra,and%20defining%20queries%20on%20it.&amp;amp;text=The%20main%20premise%20of%20the,relations%20to%20an%20output%20relation.&quot; rel=&quot;nofollow noreferrer&quot;&gt;relational algebra&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Relational_calculus#:%7E:text=The%20relational%20calculus%20consists%20of,way%20to%20specify%20database%20queries.&quot; rel=&quot;nofollow noreferrer&quot;&gt;relational calculus&lt;/a&gt;, formal mathematical models which had been in use for decades prior and unlike other &amp;quot;mathematical models&amp;quot; are much &lt;em&gt;simpler&lt;/em&gt; than than what we practically use today, decided to just... not use them...&lt;/p&gt;&#xA;&lt;h3&gt;TLDR&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There's a big &amp;quot;i'm used to it&amp;quot; human factor to why some different languages exist, beyond and sometimes eclipsing the &amp;quot;fills a niche&amp;quot; argument.&lt;/li&gt;&#xA;&lt;li&gt;The best language for a job is often not the most popular language for a job.&lt;/li&gt;&#xA;&lt;li&gt;Languages may exist or be popular regardless if the language on its own merits is worth anything.&lt;/li&gt;&#xA;&lt;li&gt;languages have large amounts of libraries nobody bothered to make elsewhere will often get them used above others.&lt;/li&gt;&#xA;&lt;li&gt;languages are already established so people used them which causes people to use them more.&lt;/li&gt;&#xA;&lt;li&gt;Tools (debuggers, linters, editors, package managers, builders etc...) matter, take time, and compound the previous statement regardless of how good a programming language is.&lt;/li&gt;&#xA;&lt;li&gt;Some languages do actually try to do everything (C++, Algol 60, Python, Swift, etc...), in particular lower level languages often are able to find themselves able to embed zero cost abstractions that make them appear much higher level (iterators, static garbage collection, ownership), add features from different programming domains (functional, executors/declarative) which end up expanding to other programming languages domains.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3168" LastActivityDate="2022-01-05T20:01:26.943" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7217" PostTypeId="2" ParentId="7186" CreationDate="2022-01-05T21:56:21.300" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;One language is better.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Unfortunately, no, it is not.&lt;/p&gt;&#xA;&lt;p&gt;A language is a tool with specific tasks in mind. We don't go around thinking that we only need a hammer, and we don't need to worry about pliers, screwdrivers or saws just because we have a good hammer (and it is a lot easier to learn how to use a  hammer than using all those other tools.)&lt;/p&gt;&#xA;" OwnerUserId="11509" LastActivityDate="2022-01-05T21:56:21.300" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7218" PostTypeId="2" ParentId="7205" CreationDate="2022-01-06T01:21:58.080" Score="3" Body="&lt;p&gt;Analogies &amp;amp; metaphors are imperfect, so let's share the expectation that they are just illustrative.&lt;/p&gt;&#xA;&lt;p&gt;Rules of what is possible (and not) are very important, and we can compare the rules of pencils moved with hands and what computers can do — but we need to define both, in part so the rules for the metaphor can be compared with the those of a computer.&lt;/p&gt;&#xA;&lt;p&gt;These rules can be reasonably terse and simple to state.&lt;/p&gt;&#xA;&lt;p&gt;The computer can copy a value from one storage location to another storage location.  (Computers generally copy data rather than moving it.)&lt;/p&gt;&#xA;&lt;p&gt;Your hand can simulate action of making a copy, and whether the hand itself represent another storage location that can be utilized while doing something else is a matter of definition and explanation of rules.&lt;/p&gt;&#xA;&lt;p&gt;Since we're talking about information rather than physical items, I might prefer a metaphor of a spreadsheet: swapping two cells in a spreadsheet generally requires another free cell; a pencil and piece of paper with some boxes holding symbols might also work, you need to stipulate whether human memory is outside of the metaphor (i.e. not be used for storage).&lt;/p&gt;&#xA;&lt;p&gt;Programming languages support constructs &amp;amp; expressions that require additional implicit storage, and language implementations introduced temporaries for these purposes: Python's &lt;code&gt;a,b=b,a&lt;/code&gt; is such a construct, while any language's general purpose expressions is another: you can't really compute &lt;code&gt;a*b+c*d&lt;/code&gt; without holding the result of one of the multiplications somewhere (on paper, in your head, in storage...), while doing the other.&lt;/p&gt;&#xA;" OwnerUserId="3799" LastActivityDate="2022-01-06T01:21:58.080" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7219" PostTypeId="2" ParentId="7205" CreationDate="2022-01-07T15:39:12.500" Score="5" Body="&lt;p&gt;This question reminds me of when a student failed to understand why a third variable was needed to exchange the value of two variables (i.e. to swap A and B,  C=A, A=B, B=C). I managed to illustrate this to them by placing an item (mobile phone) in each of their hands, and asking them to swap the items between the hands. On attempting to do this, they immediately realised they needed a third location (the table) to achieve this.&lt;/p&gt;&#xA;&lt;p&gt;You may find your list-swapping activity works better if you &lt;em&gt;place the pencils in students' hands&lt;/em&gt;. This will help reinforce the idea that each pencil needs a location (hand) to be stored in at all times. You'll obviously need more than one student to make a list that's larger than two pencils, and pandemic-related distancing may be an obstacle.&lt;/p&gt;&#xA;&lt;p&gt;I'd suggest trying this activity with two or three students sat in a row, and using an odd number of pencils. This will ensure that there is only one hand available for moving pencils about at any time, without appearing to be an arbitrary rule that you've introduced.&lt;/p&gt;&#xA;" OwnerUserId="11516" LastEditorUserId="11516" LastEditDate="2022-01-09T13:33:59.570" LastActivityDate="2022-01-09T13:33:59.570" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7220" PostTypeId="2" ParentId="349" CreationDate="2022-01-07T17:57:04.837" Score="1" Body="&lt;p&gt;You say you're looking for a program&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;that builds upon the basics of printing one line on the screen.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I don't look at &amp;quot;hello world&amp;quot; as a basis to build upon. It's more of a sanity check: can the student use an editor, compile, run a program. The next program does not need to build on it per se.&lt;/p&gt;&#xA;&lt;p&gt;So for my students the next step is the &amp;quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Collatz_conjecture&quot; rel=&quot;nofollow noreferrer&quot;&gt;Collatz conjecture&lt;/a&gt;&amp;quot;. For that&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;They need expressions: &lt;code&gt;3*n+1&lt;/code&gt;, &lt;code&gt;n/2&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Conditionals: `if (n%2==0) n=n/2; else n=3*n+1;&lt;/li&gt;&#xA;&lt;li&gt;Loop: `while (n!=1) /* the above */&lt;/li&gt;&#xA;&lt;li&gt;Nested loops: find the starting point (say under 1000) with maximum length.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;And those do all built on each other. Prime number testing/finding is also a good one.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-07T17:57:04.837" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7221" PostTypeId="1" CreationDate="2022-01-08T02:10:47.357" Score="0" ViewCount="60" Body="&lt;p&gt;I plan to teach &lt;em&gt;&amp;quot;Introduction to Game Development&amp;quot;&lt;/em&gt; to the CS undergrads next semester. Keeping in view the trends in 2022 what would be an ideal course outline or topics to teach to train the students so that they can create awesome games and also make some living as well?&lt;/p&gt;&#xA;" OwnerUserId="11521" LastActivityDate="2022-01-08T02:10:47.357" Title="Advise needed: GameDev Course Outline" Tags="|game-design|" AnswerCount="0" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7222" PostTypeId="2" ParentId="3105" CreationDate="2022-01-09T00:32:12.780" Score="2" Body="&lt;p&gt;I suggest that's not realistically possible.&lt;/p&gt;&#xA;&lt;p&gt;When my niece (7) asked what had changed since I (60) was her age, I had to say &amp;quot;Pretty-much everything&amp;quot; and that remains true; true of society in general and more particularly of computing.&lt;/p&gt;&#xA;&lt;p&gt;Going back to computing power, you're looking at something that could easily be termed millions of times greater; inarguably, many thousands…&#xA;Who said a single death is a tragedy but a million deaths are merely statistics?&lt;/p&gt;&#xA;&lt;p&gt;Why not try the library scenario?&lt;/p&gt;&#xA;&lt;p&gt;Today almost any search engine will answer almost any question in a fraction of a second…&lt;/p&gt;&#xA;&lt;p&gt;Back in the '60s you had two choices, the computer route being to rely solely on what was filed locally.&lt;/p&gt;&#xA;&lt;p&gt;The other choice was to trek down to your local library, where a knowledgeable assistant might be able to find a helpful book. That almost certainly took an hour or so.&lt;/p&gt;&#xA;&lt;p&gt;Failing that, you could file a request… not a generic, search-engine-type question but a specific request for a particular title. That might squirm its way round the system for weeks… perhaps months.&lt;/p&gt;&#xA;&lt;p&gt;If you did get a hit, you'd trek down to the library again…&lt;/p&gt;&#xA;&lt;p&gt;So broadly, what now takes milliseconds might then have taken weeks or even months.&lt;/p&gt;&#xA;&lt;p&gt;Does that fit the bill?&lt;/p&gt;&#xA;" OwnerUserId="9185" LastActivityDate="2022-01-09T00:32:12.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7223" PostTypeId="2" ParentId="7205" CreationDate="2022-01-09T03:41:59.147" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/a/7211/8837&quot;&gt;Graham&lt;/a&gt; pointed out that the assumtions of the question are wrong.  And &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7205/how-to-respond-to-the-two-handed-approach-to-swapping#comment18833_7212&quot;&gt;Peter Cordes&lt;/a&gt; elaborated a bit in the comments.&lt;/p&gt;&#xA;&lt;p&gt;Considering a target &lt;a href=&quot;https://en.m.wikipedia.org/wiki/Very_long_instruction_word&quot; rel=&quot;nofollow noreferrer&quot;&gt;VLIW&lt;/a&gt; (Very Long Instruction Word)&#xA;architecture can help sharpen this argument further.&lt;/p&gt;&#xA;&lt;p&gt;The basic idea of VLIW is that a Very Long Instruction &amp;quot;horizontally&amp;quot; packs a number of instructions per single VL-instruction, all of which are executed in parallel in one machine cycle. The requirement is that the multiple instructions in a VL-instruction need to access disjoint memory/registers.&lt;/p&gt;&#xA;&lt;p&gt;In terms of more popular architectures, VLIW is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Like pipelined superscalar architectures except that the compiler rather than the hardware does parallelization scheduling&lt;/li&gt;&#xA;&lt;li&gt;Like RISC in that the complexity is shifted to the compiler&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;x = 1&#xA;y = 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;can be packed as one VL-instruction&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt; x = 1 // y = 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Whereas&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;x = 1&#xA;y = x + 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;can't because x overlaps.&lt;/p&gt;&#xA;&lt;p&gt;(Using the notation that multiple VL instructions are on multiple lines and &amp;quot;subinstructions&amp;quot; packed into a VL instruction are on one line &amp;quot;//&amp;quot; separated).&lt;/p&gt;&#xA;&lt;p&gt;With that background we can write swap as&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;lh = x // rh = y&#xA;x = rh // y = lh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Whereas your preferred solution&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;t = x &#xA;x = y&#xA;y = t&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is interlocked at each stage and so is hopelessly sequential.&lt;/p&gt;&#xA;&lt;h2&gt;tl;dr&lt;/h2&gt;&#xA;&lt;p&gt;The VLIW oriented swap is 33% faster — 2 vs 3 — than the standard imperative one. When it is naively sequentialized it's 25% slower — 4 vs 3.&lt;/p&gt;&#xA;&lt;h2&gt;Note&lt;/h2&gt;&#xA;&lt;p&gt;The two-hand analogy is right in being more efficient than with one hand. However it's not so right in this that it seems to be able to do it in &lt;em&gt;one&lt;/em&gt; single 2-handed swoop. Whereas (for VLIW at least) it's &lt;em&gt;two&lt;/em&gt; 2-handed swoops. Our hands have enough muscle intelligence to criss-cross without colliding whereas data-buses dynamically hop-skipping over each other is..  uh... still futuristic sci-fi.&lt;br /&gt;&#xA;IOW analogies/metaphors may help but don't go all the way.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-01-13T10:12:57.183" LastActivityDate="2022-01-13T10:12:57.183" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7224" PostTypeId="2" ParentId="7151" CreationDate="2022-01-10T07:48:17.573" Score="-1" Body="&lt;p&gt;If you really want a certification without attending classes from a legitimate university for your own knowledge. It happens in third world countries and their tier- 3 colleges. I can vouch by saying I have experienced this in my own surroundings, but nobody is going to say this out loud publicly.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can skip daily lectures.&lt;/li&gt;&#xA;&lt;li&gt;You can study and master whatever you want&lt;/li&gt;&#xA;&lt;li&gt;You just have to attempt the tests to complete the curriculum&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;But of course, this is not available online.&lt;/p&gt;&#xA;" OwnerUserId="11528" LastActivityDate="2022-01-10T07:48:17.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7225" PostTypeId="2" ParentId="146" CreationDate="2022-01-10T18:57:26.233" Score="2" Body="&lt;p&gt;Somewhat strangely given the name, Objects have little to do with things: they have to do with actions. Alan Kay, just about the original inventor of OO programming, somewhere defined an object as &amp;quot;a thing that you can ask to do things&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Since I teach programming to science-y students I use examples from math. For instance a &lt;code&gt;Point&lt;/code&gt; object. I don't care what it contains, only that you can ask it to translate itself, compute its distance to the origin, et cetera.&lt;/p&gt;&#xA;&lt;p&gt;What do objects have to do with data? Well, you could also take your Point program and write it using two variables for the coordinates of each point. But that would not be as clean. Also, it would make it prohibitive to change your whole program to polar coordinates. So an object is an abstraction from basic data types and defining behaviors on that abstraction.&lt;/p&gt;&#xA;&lt;p&gt;And then you go on to make a &lt;code&gt;Line&lt;/code&gt; object that comes from two Points, rather than four reals &lt;code&gt;x1,x2,y1,y2&lt;/code&gt;, et cetera.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-01-13T20:26:01.150" LastActivityDate="2022-01-13T20:26:01.150" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7226" PostTypeId="1" AcceptedAnswerId="7233" CreationDate="2022-01-10T11:21:38.877" Score="5" ViewCount="608" Body="&lt;p&gt;One recurring discussion I have on this site which I have never understood is:&lt;/p&gt;&#xA;&lt;p&gt;Why not teach people how computers work right away?&lt;/p&gt;&#xA;&lt;p&gt;This always leads people to speculate about cosmic strings and other not particularly relevant topics. No, just: what makes this particular machine that is powered by electricity &lt;em&gt;different from&lt;/em&gt; electrical machines that don't answer questions? In simple terms, how can an object perform steps, and how can steps decide and result in new information?&lt;/p&gt;&#xA;&lt;p&gt;It is not a hard question, and the answer, at least an initial one, takes about a half hour, even for a 14 year old. Why the resistance bordering on mania to just getting that over in the introduction? Maybe more students would take an interest, and fewer would be fuddled about assignment and variables later if we just told them straight up how the blooming thing functions? What's the motivation for explaining how the trick works in graduate school when you could get it over the first day?&lt;/p&gt;&#xA;" OwnerUserId="5349" OwnerDisplayName="Scott Rowe" LastEditorUserId="5349" LastEditDate="2022-01-11T11:43:00.830" LastActivityDate="2022-01-29T02:49:48.143" Title="Driven to Abstraction" Tags="|introductory-lesson|computational-thinking|hardware|" AnswerCount="8" CommentCount="18" ContentLicense="CC BY-SA 4.0" />
  <row Id="7227" PostTypeId="2" ParentId="7226" CreationDate="2022-01-10T15:07:24.593" Score="6" Body="&lt;p&gt;Why 5 operations when &lt;a href=&quot;https://en.wikipedia.org/wiki/One-instruction_set_computer&quot; rel=&quot;noreferrer&quot;&gt;one suffices&lt;/a&gt;???   (The &lt;a href=&quot;https://en.wikipedia.org/wiki/One-instruction_set_computer#Instruction_types&quot; rel=&quot;noreferrer&quot;&gt;subsection of above&lt;/a&gt; showing the more usual machine instructions as &amp;quot;macros&amp;quot; implemented in terms of that one instruction)&lt;/p&gt;&#xA;&lt;p&gt;Being sparse and minimal is great. But before that you need to wonder what CS really is about.&#xA;Here's some quotes from computer scientists that help you clarify your thoughts on that&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Computer science is not about machines, in the same way that astronomy is not about telescopes. There is an essential unity of mathematics and computer science&lt;/em&gt; &lt;a href=&quot;https://en.wikiquote.org/wiki/Computer_science#S_-_Z&quot; rel=&quot;noreferrer&quot;&gt;Michael Fellows&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;I don't need to waste my time with a computer just because I am a computer scientist&lt;/em&gt;  &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/transcriptions/EWD13xx/EWD1305.html&quot; rel=&quot;noreferrer&quot;&gt;Dijkstra&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Machine -- imperates&lt;br /&gt;&#xA;Programmer -- declarates&lt;br /&gt;&#xA;Language&lt;/em&gt; -- &lt;a href=&quot;http://blog.languager.org/2013/02/c-in-education-and-software-engineering.html#relevate&quot; rel=&quot;noreferrer&quot;&gt;relevates&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;http://blog.languager.org/&quot; rel=&quot;noreferrer&quot;&gt;R Mody&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Computer Science is a science of the artificial&lt;/em&gt; Simon and Newell&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Simplicity does not precede complexity, but follows it&lt;/em&gt; Alan Perlis&lt;br /&gt;&#xA;(Which is simpler an assembly language program or a scheme program?)&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;A programming language is low level when its programs require attention to the irrelevant&lt;/em&gt; Alan Perlis&lt;br /&gt;&#xA;(&amp;quot;What is there?&amp;quot; Vs &amp;quot;What is relevant?&amp;quot; which question is more important?  For teachers??)&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;The computing scientist could not care less about the specific technology that might be used to realize machines, be it electronics, optics, pneumatics, or magic&lt;/em&gt; &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/transcriptions/EWD09xx/EWD924.html&quot; rel=&quot;noreferrer&quot;&gt;Dijkstra&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Comes to the nub of the matter: You seem to think (things like) assignment are important to teach because they are &amp;quot;there&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;People of the opposite mindset neither believe its important to teach.&lt;br /&gt;&#xA;Nor for that matter even &amp;quot;there&amp;quot; -- I've &lt;strong&gt;never&lt;/strong&gt; seen a machine having anything like an assignment opcode. Registers, memory -- in a dizzying hierarchy of caches -- indirection, addressing modes, stacks, interrupts... I could continue.  But nothing remotely like assignment.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Maybe more students would take an interest, and fewer would be fuddled about assignment and variables later if we just told them straight up how the blooming thing functions?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Maybe... And a few determined teachers even succeed at this herculean task. Maybe you're one of them...&lt;/p&gt;&#xA;&lt;p&gt;But many more students would be engaged and teachers satisfied if we threw the baby-bathwater-mess -- assignment+imperative programming -- out and taught how to leap further with more hi level declarative languages.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt; JFTR: I consider OOP a bigger mess than imperative programming. Another subject...&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;And let me give the last word to Dijkstra (again!)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;It used to be the program’s purpose to instruct our computers;&lt;br /&gt;&#xA;it became the computer’s purpose to execute our programs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="8837" OwnerDisplayName="Rusi" LastEditorUserId="8837" LastEditDate="2022-01-11T05:05:56.990" LastActivityDate="2022-01-11T05:05:56.990" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7228" PostTypeId="2" ParentId="7226" CreationDate="2022-01-11T01:28:57.303" Score="4" Body="&lt;p&gt;First, I am not sure what the five operations you mention are.  And, or, xor, not are only four, and if you include the negations, you get nand, nor, and xnor.  I don't know whether you mean to move higher or lower on the abstraction ladder when you say &amp;quot;five operations&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Here are some possibilities:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The point at which is all becomes concrete is, I suppose physical chemistry, but I don't think you intend to start there.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Real computer pretend to be modified Turing Machines, but of course, real computers are strictly less powerful because they lack infinite memory.  In reality, they are actually very, very large Finite State Machines.  Do you mean to start there?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you mean to start with binary and arithmetic?  We are already quite high on the abstraction ladder at that point, since numbers as humans intuitively understand them don't really exist in the computer in any meaningful sense.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you mean to start with fetch, read, write, execute?  (I'm guessing not, since you referenced five things, and that is only four.)  Again, we're already far from anything concrete at this point, and we are also far lower than anything you'll see in an assembly language.  If I have my students begin here, they are not only entering at a highly abstract place, they are entering at an abstract place that has (a) gotten hard enough that it becomes hard for beginners to figure out steps on paper, and (b) is also low enough that it's also hard to see how a statement like &lt;code&gt;print(&amp;quot;hello world&amp;quot;)&lt;/code&gt; could possibly map to it.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you mean to start with program stacks?  Stack and heap?  Simple CLI stuff?  Stdin, stdout?  When you say &amp;quot;how assignment functions&amp;quot;, this is my best guess for what you intend.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you want to start with assembly?  It's very, very, very difficult for a beginner to make sense of something as simple as&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;`mov rdi, 1        ;   STDOUT_FILENO,` &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you want to start with &amp;quot;hello world&amp;quot; in C?  It's a natural point of entry, but of course, by the time you're there, you can't see down to the boolean algebra at all any more.  But at least you're in a procedural programming environment, so you can loop, call functions, and do a myriad of other things pretty easily.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you want to start with a higher level language like Java, Ruby, JavaScript, Python, Haskell, Scheme, or Prolog?  You're now in the world where students can immediately learn to do things that might matter directly in their lives.  But, of course, all of these languages are layers and layers and layers and layers of abstractions away from the &amp;quot;computer&amp;quot;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Do you want to start with software engineering, and hit clean coding and objects and object patterns from day 1?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So the first problem, and I really mean this: I have no idea what you're talking about when you say &amp;quot;computers can do five things&amp;quot; because I'm not aware of any layer of abstraction that has five things.&lt;/p&gt;&#xA;&lt;p&gt;The reality is that, as a teacher, &lt;strong&gt;you can enter at any of these points&lt;/strong&gt;.  But then you must work students slowly up and down from whatever point you have chosen, until the students understand every one of these layers.  (And make no mistake: that &lt;em&gt;is&lt;/em&gt; the goal.  Students should understand all of these layers at some point or another.)&lt;/p&gt;&#xA;&lt;p&gt;What you presumably don't &lt;em&gt;want&lt;/em&gt; to do is take more than one point of entry, and then leave the work of linking them until much later.  (You might &lt;em&gt;have&lt;/em&gt; to do this from time to time, but it should never be the goal, and you should make efforts to minimize the amount of time within the linking period.)&lt;/p&gt;&#xA;&lt;p&gt;So, for a teacher, the natural question becomes &lt;strong&gt;&amp;quot;at &lt;em&gt;&lt;strong&gt;which&lt;/strong&gt;&lt;/em&gt; point should I make my entry?&amp;quot;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;It's an important question, and one that real teachers hotly debate.  Most of us have settled roughly in the C-to-(whatever high level language you choose) spectrum as the initial entry point, but it's not universally so.  Some teachers begin with something called &amp;quot;Objects first&amp;quot; which pulls students to an even higher level right from the start.  Some teachers begin from a more electrical level, such as Raspberry Pi, and work their way up from there.  Everyone can make a case for why they believe they are starting in a good place.&lt;/p&gt;&#xA;&lt;p&gt;In truth, you can make a case for almost any point of entry. I think that people tend towards the higher levels of abstraction at the start because (1) kids in real life enjoy it and find it rewarding, year after year, and (2) it provides rich interactions with the computer that lend themselves to future explorations, no matter what the student's interests are.&lt;/p&gt;&#xA;&lt;p&gt;In a very practical sense, I have students who gravitate towards processors and security.  I have students who gravitate towards UI and UX.  I have students who gravitate towards game programming.  I have students who gravitate towards game &lt;em&gt;design&lt;/em&gt;.  I have students who gravitate towards web apps.  I have students who gravitate towards theoretical CS and mathematics.  If I have 30 real-life students, they will have 30 different centers of gravity in CS, so I want a point of entry that helps as many of them as possible towards their interests as fast as possible.  If I start at NAND gates, I do a disservice to my UX students, since it'll take them an extra year or two to get to the beginnings of what they want.&lt;/p&gt;&#xA;&lt;p&gt;Does that make sense?  I'm not aware of &lt;em&gt;anyone&lt;/em&gt; who argues that students shouldn't learn about every one of these layers, but there is a question of what order is most productive, a further question of what order helps students start learning about the things that interest them as quickly as possible, and a third question about what order helps students to learn things &amp;quot;best&amp;quot;.&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; - &amp;quot;Best&amp;quot; is also controversial, because people have radically different ideas about what the end-goal looks like, so the term cannot be well defined among the population.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-01-11T19:02:52.727" LastActivityDate="2022-01-11T19:02:52.727" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7229" PostTypeId="2" ParentId="7226" CreationDate="2022-01-11T13:22:05.470" Score="2" Body="&lt;p&gt;Maybe you have a point that there is a level to the hardware that is explainable. However, I don't see how it enlightens the use of a programming language.&lt;/p&gt;&#xA;&lt;p&gt;Besides, I don't think you realize how much the explanation that you seem to be proposing is also an abstraction. How precise are you going to explain how a computer works? Independent functional units? Branch prediction? Out-of-order execution? Clock domains?&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-11T13:22:05.470" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7230" PostTypeId="1" CreationDate="2022-01-11T14:33:01.140" Score="1" ViewCount="56" Body="&lt;p&gt;Given the surge of COVID cases many of us have to find different ways for giving online lectures. I use Zoom for lectures and I would like to know if there is any technology or combination of technologies in order to get a presentation in which slides are from my computer and the view of the instructor comes from the camera in a full body view. I would like something like in the image:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/Muccr.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Muccr.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Any ideas or suggestions about software I can use to get a similar effect?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="1293" LastEditDate="2022-01-11T14:44:45.257" LastActivityDate="2022-01-13T12:33:25.407" Title="Any technology for full body video with slides in Zoom" Tags="|lecture-tools|information-technology|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7231" PostTypeId="2" ParentId="6530" CreationDate="2022-01-11T15:04:19.423" Score="0" Body="&lt;p&gt;Your question is ambiguous: you talk about posting &amp;quot;solutions&amp;quot; (multiple) but I'm not sure if that's a single solution for each of multiple problems, or if you post more than one solution per problem. If the former, I have a problem with that, because there are usually multiple ways to solve a problem. Therefore I've adopted the following approach.&lt;/p&gt;&#xA;&lt;p&gt;Instead of giving full solutions, I post a discussion file, where I give only the crucial lines of the program taken from multple student submissions, with my comments. I don't see the point in posting a full solution: the students have worked on it, so missing the boilerplate does not impede understanding. And it prevents the &amp;quot;barefaced copying&amp;quot; problem.&lt;/p&gt;&#xA;&lt;p&gt;In my discussion file I'll start with the solutions I really like, give some that I have my doubts about, and some that I really don't like. All pointing out what I like and what not. I have yet to get complaints about this, and overhearing discussions &amp;quot;he showed our solution!&amp;quot; it even seems to have advantages over just posting my solution.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-11T15:04:19.423" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7232" PostTypeId="2" ParentId="7226" CreationDate="2022-01-11T15:32:56.260" Score="3" Body="&lt;p&gt;While it is possible to do as you suggest, and many people do it, I question its wisdom. There are many aspects to consider.&lt;/p&gt;&#xA;&lt;p&gt;The most important, however, is that if you are teaching CS then the likely most important idea (meta) is abstraction itself. CS is full of abstractions, with programming and programming languages being one of the key elements and so, is a good place to introduce it. In fact, having experience with both, it is abstraction that is fundamental to the overlap between mathematics and computer science. They differ in many ways, but share abstraction as a goal as well as a tool.&lt;/p&gt;&#xA;&lt;p&gt;If you try to avoid an abstract view and try to make everything as concrete as possible then you are doing the students a disservice in the long term. If that concrete view were necessary then there would be no reason for high level languages.&lt;/p&gt;&#xA;&lt;p&gt;As humans, we depend, fundamentally on abstraction in our human languages and in our interactions. It isn't a foreign concept as it might be to a chimpanzee. Computer languages exploit what the forebrain does best.&lt;/p&gt;&#xA;&lt;p&gt;Note that your conception of a machine is wildly outdated. It is, in fact, just an abstraction. There was a time (more than half a century ago) when such machines more or less existed, but no more. Others here have commented on the differences. You aren't describing a machine, but an abstraction of a machine to which computation can be reduced. But a Turing machine is, itself, such an abstraction.&lt;/p&gt;&#xA;&lt;p&gt;Almost all modern computer languages (some special purpose ones excepted) are &lt;em&gt;Consistent&lt;/em&gt; and &lt;em&gt;Turing Complete&lt;/em&gt;. The implication of this is that you don't need to go outside the language to explain computation. And, doing so can be a distraction from learning to use the paradigm represented by a language properly. You don't need to know how a &amp;quot;variable&amp;quot; in Lisp is represented to program effectively with them. You don't need to know the internal representation of lists (which might actually vary depending on the efforts an optimizing compiler might take.) to manipulate them. In fact, trying to reduce the Lisp notations to the actual actions of a physical machine is going to inhibit the learning of a novice.&lt;/p&gt;&#xA;&lt;p&gt;Certainly, by the time a student has a rich and complete education, they need to explore many of the abstraction levels used in computing. They probably also need to know something about the mappings between the levels if they are to extend the field as researchers. But the first course is not the place to do that if it forces them to try to write every Java program as if it were a C program or even a minimal (abstract) assembly language program. The compiler course will explore those issues once they have a foundation.&lt;/p&gt;&#xA;&lt;p&gt;So, as the &lt;a href=&quot;https://cseducators.stackexchange.com/a/7228/1293&quot;&gt;answer of Ben I.&lt;/a&gt; suggests, you can start at pretty much any level of abstraction for the first course, say the OO level, which I tend to use. Stay with that level and show that any program can be written thinking about the abstractions and tools available at that level &lt;em&gt;only&lt;/em&gt;. Use good metaphors for things, but treat them as metaphors. You don't need to leave that level to explain what a variable is, for example.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;One of the reasons that people continue to suggest that this mapping &lt;strong&gt;must be taught to novices&lt;/strong&gt; is that many teachers, having learned the field over a long period of time, actually grew up as the world of computing was changing, from simple machines and languages to richer and more useful ones. So, we learned low level stuff early on and that &amp;quot;helped&amp;quot; us when we moved to higher levels. It formed a base. And so, too many of us, in effect, teach with a historical view and ask our students to follow the same low to high path that we did. But, you don't need to recapitulate the history of computing to grok Python or Scheme. They are, remember, consistent and complete. In fact, if you try to do the &lt;em&gt;entire&lt;/em&gt; history in the first course then the course will last for more than half a century and when you finish the course the students will be half a century behind the times. I've been doing this for half a century myself and I've learned a heckofa lot. But most of what I've learned is actually obsolete.&lt;/p&gt;&#xA;&lt;p&gt;Pick an abstraction level (i.e. a paradigm). Pick a good language to represent that level. Teach &lt;strong&gt;that&lt;/strong&gt;, so that students have the skills to understand computation at that level. Leave that level only with metaphor or with anecdotes, not to 'splain how it &lt;em&gt;really&lt;/em&gt; works. Because it doesn't &lt;em&gt;really&lt;/em&gt; work that way at all if you have ever peeked at an optimizing compiler.&lt;/p&gt;&#xA;&lt;p&gt;The goal is insight.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;There are two Lisp list functions that I find instructive for thinking about the functional paradigm. Neither requires any machine view. Both require some essential &lt;em&gt;insight&lt;/em&gt; into functional programming. The two functions are to &lt;em&gt;clone&lt;/em&gt; a list and to &lt;em&gt;reverse&lt;/em&gt; a list, both in linear time. If you don't care about time, both are easy, but you need to think like a lisper to grok these. Try them.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-01-11T16:18:19.173" LastActivityDate="2022-01-11T16:18:19.173" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7233" PostTypeId="2" ParentId="7226" CreationDate="2022-01-11T15:46:31.287" Score="4" Body="&lt;p&gt;Buffy Ben Victor Eijkhout all in different ways talked of levels.&#xA;Let me try enumerating them for you from established sources. (Summarizing for brevity)&lt;/p&gt;&#xA;&lt;p&gt;Weste Eshraghian book on CMOS VLSI gives these levels&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Digital VLSI design is often partitioned into five levels of abstractions: architecture design, microarchitecture design, logic design, circuit design, and physical design. (going downward)&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Architecture describes the functions of the system.&lt;/li&gt;&#xA;&lt;li&gt;Microarchitecture describes how the architecture is partitioned into registers and functional units.&lt;/li&gt;&#xA;&lt;li&gt;Logic describes how functional units are constructed. eg ripple carry adder Or lookahead&lt;/li&gt;&#xA;&lt;li&gt;Circuit design describes how transistors are used to implement the logic.&lt;/li&gt;&#xA;&lt;li&gt;Physical design describes the layout of the chip.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Going upwards Tanenbaum's classic Structured Computer Organization (better in my view than much that followed) discusses the levels of a computer as follows: (going upward) Overlap deliberate&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol start=&quot;4&quot;&gt;&#xA;&lt;li&gt;Digital logic level&lt;/li&gt;&#xA;&lt;li&gt;Microarchitecture&lt;/li&gt;&#xA;&lt;li&gt;ISP&lt;/li&gt;&#xA;&lt;li&gt;Operating system (system calls as a VM over ISP)&lt;/li&gt;&#xA;&lt;li&gt;Assembly language&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;On the other side we can go further down and reach solid state physics -- of which I know even less than VLSI!&#xA;Wikipedia gives these main branches:&#xA;(I am guessing the descending order)&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol start=&quot;9&quot;&gt;&#xA;&lt;li&gt;electromagnetism&lt;/li&gt;&#xA;&lt;li&gt;metallurgy&lt;/li&gt;&#xA;&lt;li&gt;crystallography&lt;/li&gt;&#xA;&lt;li&gt;quantum mechanics&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;A special level&lt;/h1&gt;&#xA;&lt;p&gt;For some reason or other you believe that some level (nearabouts ISP?) is very special.  The onus is on you to explain why&lt;/p&gt;&#xA;" OwnerUserId="8837" LastActivityDate="2022-01-11T15:46:31.287" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="7234" PostTypeId="1" AcceptedAnswerId="7236" CreationDate="2022-01-11T16:15:57.167" Score="5" ViewCount="221" Body="&lt;p&gt;BACKGROUND: I teach a C++ course with 300 students where the grade is based on programming assignments. We use automatic tools to assess the assignment correctness (using many unit-tests), code quality (using &lt;code&gt;clang-tidy&lt;/code&gt;), and to check plagiarism. In addition, the students present some of their solutions to the lecturer or TA in an online interview, and are graded by six quality criteria: organization, testing, correctness, efficiency, readability, and safety (I used recommendations from &lt;a href=&quot;https://academia.stackexchange.com/&quot;&gt;here&lt;/a&gt; for the rubric).&lt;/p&gt;&#xA;&lt;p&gt;Last year, while I was interviewing students, I noticed a paradoxical phoenomenon: about half the students wrote perfect code (100% in all rubrics), and they all used very similar ideas - similar tricks, algorithms, etc. While the solutions were not entirely identical (so I cannot blame them for plagiarism), I was quite convinced that some of them shared their ideas with others. On the other hand, about half the students wrote mediocre code (60-70% in most rubrics), and their work was very different than others - I was quite convinced that they did all the work by themselves.&lt;/p&gt;&#xA;&lt;p&gt;It turned out that I gave a lower grade to students who did all work by themselves, than to students who (probably) consulted other students and used their ideas. My grading scheme does not properly encourage students to do original work. Note that the course guidelines do not forbid students to consult each other. But, I still want to encourage students to make the best effort to solve the homework by themselves.&lt;/p&gt;&#xA;&lt;p&gt;QUESTION: how can I design a grading scheme for programming exercises, which simultaneously encourage both quality and originality?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2022-01-11T20:55:20.553" Title="Grading programming exercises: the quality vs. originality paradox" Tags="|grading|homework|" AnswerCount="2" CommentCount="10" FavoriteCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7235" PostTypeId="2" ParentId="7234" CreationDate="2022-01-11T18:55:11.800" Score="3" Body="&lt;p&gt;First, let me congratulate you on a really thorough grading procedure for such a large class.  I am impressed!  I think that you have created an excellent balancing act among the realities of grading code among a large population, and I'm sure that your students benefit from it tremendously.&lt;/p&gt;&#xA;&lt;p&gt;Now, you wrote:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;about half the students wrote perfect code (100% in all rubrics), and they all used very similar ideas - similar tricks, algorithms, etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It reminds me very much of this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;All happy families are alike, but every unhappy family is unhappy in its own way&lt;/p&gt;&#xA;&lt;p&gt;―Leo Tolstoy, Anna Karenina, 1878&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And I think it's true.  In any happy family, partners agree upon roles together.  Partners largely respect and listen to one another.  Children are taught how to be in the world in a manner forged from love.  The path to familial harmony is relatively narrow compared to the infinity of ways that things can go terribly wrong.&lt;/p&gt;&#xA;&lt;p&gt;Turning back to code, while it's true that there are an infinity of possible answers to almost any coding prompt, it is also true that there are &lt;em&gt;very strong norms&lt;/em&gt; to good, clean code.  Many of your students will absorb these norms, so it makes sense, even without any collusion, that you will see many highly similar answers among those who do well.&lt;/p&gt;&#xA;&lt;p&gt;In addition, algorithms are far more proscribed than the contents of paragraphs.  In the end, they must work, and they should be understandable to others as well.&lt;/p&gt;&#xA;&lt;p&gt;Once you take into account readability, there are only so many reasonable approaches to finding the maximum element in an array, memoizing a function, or performing a DFS on a tree.&lt;/p&gt;&#xA;&lt;p&gt;So I guess I'd suggest that, at least from the evidence you wrote into the question, nothing is amiss, and you needn't worry.  Instead, keep up your excellent grading procedure!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-01-11T18:55:11.800" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7236" PostTypeId="2" ParentId="7234" CreationDate="2022-01-11T20:08:47.233" Score="4" Body="&lt;p&gt;Let me suggest two things, but I don't know if they will solve the problem.&lt;/p&gt;&#xA;&lt;p&gt;The first is that once you set the rubric you are stuck with it until you publicly replace it. You may be right that there was collaboration but your &amp;quot;feelings&amp;quot; can't be acted on without evidence. I think you understand that. If it only mentions quality and completeness then it is that which you must depend on. But, you could also require explanations of things as part of any assignment. In Java, we have JavaDocs for that where we describe the intent of any class and of important methods. They are harder to grade, but also harder to copy in any real way, since they use natural language.&lt;/p&gt;&#xA;&lt;p&gt;A short exposition, say a page, of what an assignment has accomplished and how could be submitted along with each assignment. Ideally it could include the &amp;quot;why&amp;quot; of major decisions, such as algorithm choice. Students would be required to explain their work, not just provide it.&lt;/p&gt;&#xA;&lt;p&gt;The second thing is to spell out explicitly (for the course, and perhaps for individual assignments) what sorts of collaboration are permitted and which are not. But to make this effective (hmmm, &lt;em&gt;more&lt;/em&gt; effective) you need to get them to actually affirm that they will respect it in all details, both the letter and the intent. It is one thing to say to students &amp;quot;You must do this.&amp;quot; and quite a different thing if the student says to you &amp;quot;I agree that I will do this.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;But in any conversation (oral or written) about an honor code, you need to actually explain why the rules are in place. After all, in the real world, collaboration is expected and the quality of the product is paramount. In an educational environment, it is the learning that is paramount, not the product. Students don't always understand that you didn't ask them to do something because you want the result. After all, you could have produced it yourself much more easily. Emphasize that any restrictions are to help ensure their skill development.&lt;/p&gt;&#xA;&lt;p&gt;And, of course, if you forbid them from communicating with one another they you almost certainly need to provide ways for them to communicate with you. My technique for this was a private mailing list that all staff and students were subscribed to. Students could ask questions (but not post solutions/code) to the list. The questions would get answered, perhaps by another student - in public. Everyone saw every question and every answer. This has the additional educational benefit that when one student asks a question it is likely that others do also, but hesitated to ask for whatever reason. No one needed to feel &amp;quot;stuck&amp;quot; and then tempted to break the rules.&lt;/p&gt;&#xA;&lt;p&gt;Like many things, students need to be taught how to behave.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note, of course, that the above doesn't address &amp;quot;originality&amp;quot; explicitly. If you want to encourage that, you may want to find a way to get that idea into your rubric. But you would need to be careful to define what you mean. Variable names taken from Pokemon probably isn't helpful. One way to make this work is to offer a few points in the rubric for &amp;quot;extensions&amp;quot; to the assignment. They would have to be explained in natural language at least, and, perhaps programmed. But a few points for suggesting some &amp;quot;novel&amp;quot; extension to the assignment might work and be hard to fake if arrived at collaboratively.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-01-11T20:55:20.553" LastActivityDate="2022-01-11T20:55:20.553" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7237" PostTypeId="2" ParentId="146" CreationDate="2022-01-13T04:13:09.303" Score="2" Body="&lt;p&gt;I asked a similar question &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6709/some-real-practical-example-to-teach-object-oriented-concepts-and-programming-i&quot;&gt;Some real practical example to teach object-oriented concepts and programming (in python)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I highly agree with what @Buffy answered here and in my question that it is composition not inheritance that we should emphasize (or inheritance is overemphasized) when teaching Object Oriented paradigm.&lt;/p&gt;&#xA;&lt;p&gt;To give analogy I will use the manager/worker example. I think most people are familiar with these 2 concepts and I have seen many codes name their objects just as manager/worker(sometime with jobs too). I find &amp;quot;&lt;a href=&quot;https://www.coreycleary.me/what-is-the-difference-between-controllers-and-services-in-node-rest-apis/&quot; rel=&quot;nofollow noreferrer&quot;&gt;What is the difference between Controllers and Services in Node REST API's?&lt;/a&gt;&amp;quot; explains the manager/worker example very well, so I just borrow his/her words&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If you think about what the manager's role is, he/she typically:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;manages the incoming work requests&lt;/li&gt;&#xA;&lt;li&gt;decides which worker should do the work&lt;/li&gt;&#xA;&lt;li&gt;splits up the work into sizable units&#xA;...&#xA;but does not do the work himself/herself (again, using a basic&#xA;stereotype here!)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;And, a worker typically:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;receives the request from the manager&lt;/li&gt;&#xA;&lt;li&gt;figures out the individual details involved in completing the request&lt;/li&gt;&#xA;&lt;li&gt;is generally only concerned with the tasks he/she has to complete&lt;/li&gt;&#xA;&lt;li&gt;not responsible for making decisions about the &amp;quot;bigger&amp;quot; picture&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The overarching theme is that the manager/controller receives the work, decides who should do it...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So manager/worker works together (composition) to do the job.&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;These 3 Q&amp;amp;A may be too hard for the beginner but they can be served for the follow up questions.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager&quot;&gt;Naming Classes - How to avoid calling everything a &amp;quot;Manager&amp;quot;?&lt;/a&gt;  The legendary &amp;quot;&lt;a href=&quot;https://martinfowler.com/bliki/TwoHardThings.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;two hard things in Computer Science&lt;/a&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/129537/can-manager-classes-be-a-sign-of-bad-architecture&quot;&gt;Can manager classes be a sign of bad architecture?&lt;/a&gt; Of course it depends.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/419122/does-oop-overemphasize-the-importance-of-noun-and-thus-put-action-verb-in-the-le&quot;&gt;What we should use instead of a &amp;quot;manager&amp;quot; class in a good OOP design?&lt;/a&gt; Short answer if a manager assumes too many responsibilities split it. Again this is also a good analogy in real life.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2022-01-14T05:11:15.973" LastActivityDate="2022-01-14T05:11:15.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7238" PostTypeId="2" ParentId="7230" CreationDate="2022-01-13T12:33:25.407" Score="3" Body="&lt;p&gt;This is fairly easily achievable with &lt;a href=&quot;https://obsproject.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OBS&lt;/a&gt;. There are &lt;a href=&quot;https://obsproject.com/forum/resources/obs-virtualcam.949/&quot; rel=&quot;nofollow noreferrer&quot;&gt;some plugins&lt;/a&gt; that can help you with setting it up with Zoom. You need to:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Set up a fairly big &lt;a href=&quot;https://en.wikipedia.org/wiki/Chroma_key&quot; rel=&quot;nofollow noreferrer&quot;&gt;Green Screen&lt;/a&gt; with decent lighting.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Capture the video feed of the person presenting via any camera. OBS makes it trivial to remove the uniform background and make it transparent (the Green Screen). Keep in mind that the correct and uniform illumination is important - otherwise some artifacts could appear in the image.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;OBS makes it (once again) trivial to lay the camera feed with background made transparent on some presentation.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The only downside is that the instructor speaks to the camera and points (if they point to anything at all) to a big, green wall of fabric. It's an inconvenience to them, but the end-user effect is quite spectacular (just like in the screenshot you've provided).&lt;/p&gt;&#xA;" OwnerUserId="11453" LastActivityDate="2022-01-13T12:33:25.407" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7239" PostTypeId="1" CreationDate="2022-01-15T13:20:36.783" Score="7" ViewCount="1035" Body="&lt;p&gt;In an introductory course on complexity and computing, I am thinking about including some programming tasks.&lt;/p&gt;&#xA;&lt;p&gt;I wonder what types of tasks I could give the students beyond &amp;quot;construct&amp;quot; a Turing Machine in Python that determines whether a number &lt;code&gt;p&lt;/code&gt; is prime.&lt;/p&gt;&#xA;&lt;p&gt;Even though I am hesitant and unsure what type of programming tasks are going to spark their interest and help them learn, I believe that implementing stuff by hand will make them appreciate the subjects in Mike Sipser's book even more.&lt;/p&gt;&#xA;&lt;p&gt;I would appreciate suggestions of tasks students might benefit from when implementing by hand in a modern programming language.&lt;/p&gt;&#xA;" OwnerUserId="11545" LastEditorUserId="11545" LastEditDate="2022-01-16T08:03:36.530" LastActivityDate="2022-01-18T06:21:54.270" Title="Do you include coding assignments in an intro to complexity and computation course?" Tags="|lesson-ideas|resource-request|undergraduate|complexity-theory|turing-machines|" AnswerCount="4" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7240" PostTypeId="2" ParentId="7239" CreationDate="2022-01-15T14:24:01.197" Score="4" Body="&lt;p&gt;I don't give many assignments in my coursework on that material, but I have a few important ones.   I have them implement NFA, DFA, and PDA in Scheme.  The function headers look like so:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-scheme prettyprint-override&quot;&gt;&lt;code&gt;(define (DFA input Sigma S s0 delta F)&#xA; ...)&#xA;&#xA;(define (NFA input Sigma Q q0 Delta F)&#xA; ...)&#xA;&#xA;(define (PDA input Sigma Gamma S s0 delta F)&#xA; ...)&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I will say that these activities are quite hard for the students.  That is likely because I am making them do it in Scheme (because they have &lt;em&gt;just learned&lt;/em&gt; functional programming and I want to expand on that skill), but their primary experience for years has been in Python and Java.&lt;/p&gt;&#xA;&lt;p&gt;In particular, the stack-as-cons-boxes combined with nondeterminism is &lt;em&gt;really&lt;/em&gt; hard for some of them to implement, so I have sometimes skipped the PDA assignment entirely.  I waffle about this assignment because of its difficulty.&lt;/p&gt;&#xA;&lt;p&gt;My main goal in all of these is really familiarity with the definitions of the functions.  By the time they've implemented NFA and DFA, they &lt;em&gt;know&lt;/em&gt; what (for instance) Sigma is, and our subsequent lessons in class reflect that fluidity.&lt;/p&gt;&#xA;&lt;p&gt;For Turing Machines, in light of the difficulties they have with functional programming, I bring them back to Java.  They implement a Turing Machine, and then use it for a contest that I call the Daring Duck.&lt;/p&gt;&#xA;&lt;p&gt;Daring Duck is a variant on the Busy Beaver problem.  The goal is that their function should output as many ones as possible on the tape, but it &lt;em&gt;must halt on its own&lt;/em&gt; before the deadline!&lt;/p&gt;&#xA;&lt;p&gt;While they must stick to the API for the Turing Machine, they are encouraged to think &lt;em&gt;extremely&lt;/em&gt; creativity about the Turing Machine implementation in order to best support their contest entry.  Importantly, while I specify the function call, I specify nothing about the format of the output, nor the internal memory representation of the tape.  Creative and engaged students can achieve scores in the millions, billions, or beyond, even in the space of a two-week assignment.&lt;/p&gt;&#xA;&lt;p&gt;For the duck assignment, since they can build any machine they wish with whatever starting input they wish, their final score is divided by the sum of:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;number of states&lt;/li&gt;&#xA;&lt;li&gt;cardinality of their chosen alphabet, and&lt;/li&gt;&#xA;&lt;li&gt;the number of cells already written to the tape as input.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(Null cells between the starting position of the head and some final character all count as input, so they can't just put a single stop character 3 billion spaces away and loop on null until they get there)&lt;/p&gt;&#xA;&lt;p&gt;The contest isn't a major part of their grade, just a few points for an attempt, and a &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/B00AQY18UG&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rubber Duck Trophy&lt;/a&gt; for the winner.&lt;/p&gt;&#xA;&lt;p&gt;Given how the score is calculated, I award a bit of extra credit on the overall assignment to anyone who manages to get a score above 1, because figuring out how to get past that particular hill is quite challenging, and requires them to think through Turing Machines and growth of functions in ways that they haven't before.  Not everyone gets to the flash of insight that allows them to grow beyond their states, alphabet, and starting input.&lt;/p&gt;&#xA;&lt;p&gt;I also participated in the first year of the contest!  In subsequent years, I've keep my score an absolute secret until the end of the contest, but I promise a free 100% test grade to anyone who beats me.  I know that that possibly sounds too generous, but in truth, none of my students have ever even come close to my score, so I'm okay with dangling that particular stick in front of them.  The big prize gets kids excited and engaged, and it also enhances the spirit of fun to compete against the teacher.&lt;/p&gt;&#xA;&lt;p&gt;Part of the reason I don't particularity grade the result of the contest is that there is brinkmanship among the top students, and sometimes they underestimate execution time, and so wind up with an unhalted machine at the deadline (Daring Duck score 0).  There are also crashed laptops, old and slow machines, forced windows updates, and every other difficulty you might imagine.  I don't want to penalize them for any of that stuff, much of which is out of their control.  I also don't want to turn something fun into something stressful.  I think it's a good learning activity, and a way to get them thinking about execution time in a new light, and that's good enough for me.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-01-15T14:47:25.833" LastActivityDate="2022-01-15T14:47:25.833" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7241" PostTypeId="2" ParentId="7239" CreationDate="2022-01-15T18:58:10.177" Score="2" Body="&lt;p&gt;I've never taught this sort of course, but I'd start at the bottom of the Chomsky hierarchy:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Program a finite state machine: coke vending machine.&lt;/li&gt;&#xA;&lt;li&gt;Program a pushdown automaton: parking garage with &amp;quot;is empty&amp;quot; indicator.&lt;/li&gt;&#xA;&lt;li&gt;Linear bounded automata (Did you delete my comment?) are always the hardest. I think primality testing would be an example here.&lt;/li&gt;&#xA;&lt;li&gt;By all means, have them program a Turing machine, do a &amp;quot;busy beaver&amp;quot; or so.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-15T18:58:10.177" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7242" PostTypeId="2" ParentId="7239" CreationDate="2022-01-16T04:53:59.707" Score="8" Body="&lt;p&gt;   &lt;sup&gt;I'll use “TCS” — theoretical computer science — as the name of your course&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Should an introductory TCS course have coding assignments?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Yes and no.&lt;/p&gt;&#xA;&lt;p&gt;Since there are two parts to that let me start with the third — the &lt;em&gt;And!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Analogy:&lt;br /&gt;&#xA;&lt;em&gt;When Johnny will only have candy and momma insists that spinach is good for him the result can be a difficult impasse. Yeah we all know because we've all been that Johnny/Debbie some time. And if we've grown well its because Momma is firm. And kind. And tells lies when needed.  In the case of momma the lie may take the shape of some &amp;quot;tasty&amp;quot; — more likely colorful — jam added to the spinach.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Programming in a TCS course  &lt;strong&gt;can&lt;/strong&gt; be relevant, even central. Mostly its unhealthy but necessary jam.  The point of this post is not to harp on the unhealthy jam but to remind about the underlying spinach!&lt;/p&gt;&#xA;&lt;p&gt;Yeah the typical CS student resists theory/math. And the resistance can be as bad as Johnny above so that some artful lying helps. &lt;a href=&quot;https://matheducators.stackexchange.com/questions/24549/combative-students-in-proofs-classes&quot;&gt;Here's&lt;/a&gt; a difficult story from the fringes, where I am sure that some of the kind of stuff you are trying to do would be helpful. But that it is helpful doesn't make it relevant.&lt;/p&gt;&#xA;&lt;p&gt;Aside:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The first course I taught in the 80s was a discrete math course. I've never worked harder in my life. And students have never hated me more.  So over years I changed my tack — less time on the course more on the engagement with students.  You learn with time that education is not happening if engaging is not. So that has to become a priority. So then over time the tables turned and while students stopped complaining, even showed their enjoyment, colleagues sometimes expressed their resentment — &lt;em&gt;You are charismatic. You can get away with murder. Doesn't mean what you are doing is right!&lt;/em&gt;  The &lt;em&gt;doing&lt;/em&gt; could be a wide variety of things… including teaching programming in a TCS course. And it can certainly help the larger teaching objective.  But it doesn't make it right. Because its not relevant.  To be fair maybe 98% students appreciated my ways. But there &lt;em&gt;are&lt;/em&gt; the 2% who protest the irrelevant intrusions. And they are right in doing so.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So we need to explore what are the aims and purposes of a TCS course.&#xA;Here are the basic ones that come to my mind:&lt;/p&gt;&#xA;&lt;h1&gt;1. Negative Results&lt;/h1&gt;&#xA;&lt;p&gt;I think these &amp;quot;Can't Do&amp;quot; results are the biggest and most significant content. You &lt;strong&gt;cannot…&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h2&gt;1.1 Write a regular expression/DFA that accepts a&lt;sup&gt;n&lt;/sup&gt;b&lt;sup&gt;n&lt;/sup&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Even though the almost identical a&lt;sup&gt;*&lt;/sup&gt;b&lt;sup&gt;*&lt;/sup&gt; is trivial. Usually in TCS context that goes by the moniker &lt;em&gt;pumping lemma.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So your &amp;quot;programming assignment&amp;quot;. here would be (say): &lt;em&gt;Write a python regexp that matches brackets.&lt;/em&gt;  And of course the answer is &lt;strong&gt;NO CAN DO.&lt;/strong&gt; The larger learning goal would be the appreciation of this classic &lt;a href=&quot;https://stackoverflow.com/a/1732454/3700414&quot;&gt;regexp to match html tags&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;1.2 Subsume Syntax under Context Free Syntax&lt;/h2&gt;&#xA;&lt;p&gt;In CFG:&#xA;If a language like C say is &amp;quot;statically&amp;quot; typed that means the type-system &lt;strong&gt;is syntax.&lt;/strong&gt; So if it is syntax why is it not part of the CFG? Because while it is syntax its not &lt;em&gt;context free syntax&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;1.3 Detect whether an arbitrary Turing machine will halt&lt;/h2&gt;&#xA;&lt;p&gt;And of course the TM egs are most famous — You cant detect an infinite loop &lt;strong&gt;in the most general case.&lt;/strong&gt;  I find it amazing how even PhDs in CS from good universities don't get halting. I've sat in masters degree defenses where the great professor asks (in effect) &lt;em&gt;Why did your compiler not prove correctness?&lt;/em&gt; If the student had a good grounding in TCS he would say: &lt;em&gt;Well respected Sir… There's is the  &lt;a href=&quot;https://en.wikipedia.org/wiki/Rice%27s_theorem&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rice theorem&lt;/a&gt;…&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1&gt;2. Universality Results&lt;/h1&gt;&#xA;&lt;p&gt;These are fuzzier — more philosophic than scientific — than the above. And yet closer to the heartbeat of the field.&lt;/p&gt;&#xA;&lt;p&gt;A colleague who was teaching TCS made the following insightful observation :&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;CS is the conjunction of machines, computation, logic, languages and information theory. TCS should highlight these connections.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;He candidly said that his course is light on logic and zero on information theory.  Nevertheless it doesn't take more than a few minutes to 3-way connect Shannon, Information theory and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Bit&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bit&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Some of these profoundly wide-ranging ideas...&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Church Turing thesis&lt;/li&gt;&#xA;&lt;li&gt;The equivalence of &lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_completeness#Examples&quot; rel=&quot;nofollow noreferrer&quot;&gt;widely different formalisms&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The relation of Turing-undecidability with Gödel-incompleteness with the lesser known &lt;a href=&quot;http://qubd.github.io/files/TarskiUndefinability.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Tarski undefinability&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The deep links of logic and computability...&lt;/li&gt;&#xA;&lt;li&gt;...Going to the fact that Gödel is where it all starts, Turing is &amp;quot;just&amp;quot; an engineering improvement...&lt;/li&gt;&#xA;&lt;li&gt;...To the &lt;a href=&quot;https://en.wikipedia.org/wiki/Use%E2%80%93mention_distinction&quot; rel=&quot;nofollow noreferrer&quot;&gt;use-mention distinction&lt;/a&gt; and why its central to CS.&lt;br /&gt;&#xA;[I sometimes tickle my students with this &amp;quot;proof&amp;quot;:&lt;br /&gt;&#xA;  Cat is a mammal.&lt;br /&gt;&#xA;  Mammal is a a 6-letter-word.&lt;br /&gt;&#xA;  Therefore cat is a 6 letter word&lt;br /&gt;&#xA;]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Perhaps mre recognizable in CS as the language-metalanguage distinction.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;To the giddy labyrinths of the famous Gödel-Escher-Bach&#xA;[I recently learned that a large no of CS-ists of today became that because they read GEB 30+ years ago. Heh! I'm one of them!]&lt;/li&gt;&#xA;&lt;li&gt;The AI-TCS link. From Minsky back to Turing AI and CS has strong links. Coincidence?&lt;/li&gt;&#xA;&lt;li&gt;The matching of the Chomsky hierarchy with the machine hierarchy. &lt;a href=&quot;https://cis.temple.edu/%7Ebeigel/book/LOM.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Floyd Beigel&lt;/a&gt; is good here.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Do you really cover all this?!&lt;/h3&gt;&#xA;&lt;p&gt;As I said above its ok to lie &lt;/p&gt;&#xA;&lt;p&gt;No we cant do all of that, we cant do most of that.  But if the teacher doesn't even have a sense of this direction I'd say the course has lost its way.&lt;/p&gt;&#xA;&lt;h1&gt;3. CS = Math&lt;/h1&gt;&#xA;&lt;p&gt;Turing was a mathematician, as was Church, von Neumann, Babbage, Ada Lovelace, &lt;a href=&quot;https://en.wikipedia.org/wiki/Stepped_reckoner&quot; rel=&quot;nofollow noreferrer&quot;&gt;Leibniz&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Pascal%27s_calculator&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pascal&lt;/a&gt;…  Is it simply coincidence that they are foundational in CS?? All the way back to al Khwarizmi whose book gives us algebra and whose name gives us algorithm!&lt;/p&gt;&#xA;&lt;p&gt;In Turing's seminal paper &amp;quot;a computer&amp;quot; was a mathematician doing a computation that was so dumbed-down that it was mechanizable in principle.&lt;/p&gt;&#xA;&lt;p&gt;Real computers made it so that that mechanizability goal would become practical as well&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately we've gone so far down that road that most of us find ourselves on the wrong side of &lt;a href=&quot;https://www.cs.utexas.edu/users/EWD/transcriptions/EWD13xx/EWD1305.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dijkstra's sneer&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;And I don't need to waste my time with a computer just because I am a computer scientist.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;One long term goal of having undergone a successful TCS course is that the student – later computer scientist – be firmly placed in the &lt;em&gt;science&lt;/em&gt; side. Else default to the &lt;em&gt;computer&lt;/em&gt; side!&lt;/p&gt;&#xA;&lt;p&gt;How far does programming in there help?&lt;br /&gt;&#xA;Note that's not a rhetorical question!]&lt;/p&gt;&#xA;&lt;p&gt;I do not wish to dissuade you from teaching programming in the TCS course… Just to give a feel for the sense of its relevance.&lt;/p&gt;&#xA;&lt;p&gt;If you want a programming-centered course that is directly and fully relevant to the aims of TCS look at Neil Jones' &lt;a href=&quot;http://hjemmesider.diku.dk/%7Eneil/comp2book2007/book-whole.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computability and Complexity from programming perspective&lt;/a&gt;.&lt;br /&gt;&#xA;Note: i am not &lt;em&gt;recommending&lt;/em&gt; it! It's a monograph not a text and heavy going for the less than well-equipped and strongly motivated.&lt;/p&gt;&#xA;&lt;h3&gt;More historical math-logic-CS-programming stuff&lt;/h3&gt;&#xA;&lt;p&gt;[Yeah first three my writings...]&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.languager.org/2015/03/cs-history-0.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Pre-history 0&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.languager.org/2015/07/cs-history-2.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Early History&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.languager.org/2015/04/cs-history-1.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Connections with Programming&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_pioneers_in_computer_science&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS-ist = Math-ician List&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;4. The Human Context&lt;/h1&gt;&#xA;&lt;p&gt;Most of us accept that our modern world is largely based on something vaguely called &amp;quot;science&amp;quot;. Notice the overlap &amp;quot;science&amp;quot; and &amp;quot;computer science&amp;quot;?&#xA;And that this science is the creation of some remarkable individuals called &amp;quot;scientists&amp;quot;. Maybe we teachers have some role to play in producing the scientists of tomorrow?&lt;/p&gt;&#xA;&lt;h3&gt;On the one hand...&lt;/h3&gt;&#xA;&lt;p&gt;Look at the typical CS curriculum. How much science is there?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some &amp;quot;surrounding&amp;quot; subjects eg discrete math, statistics...&lt;/li&gt;&#xA;&lt;li&gt;Some soft subjects eg management, economics...&lt;/li&gt;&#xA;&lt;li&gt;a great deal of technology which is typically classified as &amp;quot;core&amp;quot;&#xA;eg programming in some fashionable langauge, databases and OS that showcase some technology and so on and so forth&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In short you will find very little actual science in a typical CS curriculum... Other than the TCS course!  So TCS teachers have a special responsibility.&lt;/p&gt;&#xA;&lt;h4&gt;On the other...&lt;/h4&gt;&#xA;&lt;p&gt;Beyond being CS-ists and teachers we're ultimately humans ...     Participating in inducting our students into the fold of responsible adults.&lt;/p&gt;&#xA;&lt;p&gt;CS has a rather dubious role on the human scene...&#xA;In the larger CS curriculum, TCS a very special place toward this responsibility as follows:&lt;/p&gt;&#xA;&lt;p&gt;No one needs to be told that humanity finds itself in a mess from its burgeoning self-destruction capability.&#xA;And its hardly an exaggeration that this self-destruction capability is a direct consequence of our technological super prowess — nuclear winter? ecological disaster?? Pandemic mgmt for the big-corps not the living beings??? Just plain ol' drowning in our plastic garbage????&lt;/p&gt;&#xA;&lt;p&gt;And computer technology is ever the servile hand-maiden of every world-destructive possibility&lt;/p&gt;&#xA;&lt;p&gt;If we wish to contrinute to a world that will withstand our insane self destruction capability we need to have inhabitants that will withstand this insanity. And a key element of that is humans who can withstand the onslaught of so-called intelligent/AI systems that are mechanical at their core.&lt;/p&gt;&#xA;&lt;p&gt;To be able to do that the future generation needs to understand the nature of this technological insanity without losing their humanity.&lt;/p&gt;&#xA;&lt;p&gt;From the standard CS curriculum, a well-directed TCS can be one of the key components to that humane sane understanding.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-01-18T06:21:54.270" LastActivityDate="2022-01-18T06:21:54.270" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7243" PostTypeId="2" ParentId="7226" CreationDate="2022-01-16T22:44:05.997" Score="1" Body="&lt;p&gt;We have before us a question that is apparently of very little interest to almost everyone:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What makes this particular machine that is powered by electricity different from electrical machines that don't answer questions?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We know that computers manipulate symbols. How do symbols touch the world and cause lights to go on, cars to turn left, nuclear missiles to leave their silos...? It seems like an interesting, important, urgent question, which is a deep part of the reality humans have constructed for a couple lifetimes. And, people, especially students and teachers of computer related subjects, yawn and look at their iPhones instead, perhaps to order something to be delivered. Or turn off the light they left on at home.&lt;/p&gt;&#xA;&lt;p&gt;I am tempted to simply leave the world to its fate, except that I am stuck here with you, and your choices and knowledge affect my future. So I selfishly try to get you to wake up.&lt;/p&gt;&#xA;&lt;p&gt;Someone said that &lt;strong&gt;systems with too many levels are difficult to reason about&lt;/strong&gt;. It was probably someone in the CS field, so you can argue with them if you disagree. Someone else said that we learn from the concrete to the abstract, the particular to the general, simple to complex. All I am saying is that the point where symbols affect the physical world is pretty definite, and without that in operation, we wouldn't have to worry about things like missiles unintentionally leaving their silos, or automated cars hitting people. That seems to me like the place to start teaching, just like you start shop class in a shop. &lt;em&gt;Don't put your hand on that!&lt;/em&gt; Sorry, back to what I was saying...&lt;/p&gt;&#xA;&lt;p&gt;In the book &lt;strong&gt;Rationality&lt;/strong&gt; by Steven Pinker, he says:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The moral is that reasoning with logical rules at some point must simply be &lt;em&gt;executed&lt;/em&gt; by a mechanism that is hardwired into the machine or brain and runs because that's how the circuitry works, not because it consults a rule telling it what to do. We program apps into a computer, but its CPU is not itself an app; it's a piece of silicon in which elementary operations like comparing symbols and adding numbers have been burned.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If you don't think that this is the vital thing to know about a computer, I am not sure why, but you could take it up with him, as he is a more successful reasoner than I am.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2022-01-29T02:49:48.143" LastActivityDate="2022-01-29T02:49:48.143" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="7244" PostTypeId="2" ParentId="7239" CreationDate="2022-01-16T23:54:09.957" Score="1" Body="&lt;p&gt;&lt;strong&gt;Yes - things like sorts, regexes, and virtualization are great ways of explaining complexity and CS theory&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sorts are a great example.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=kPRA0W1kECg&amp;amp;ab_channel=TimoBingmann&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube video with sorts animated&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Implementing them myself in one of my courses let me experience n*log(n) vs n^2.  Students will see bubble sort taking much longer than quick-sort as the sample arrays get larger.&lt;/p&gt;&#xA;&lt;p&gt;So is regex.  Maybe a complete regex engine would be too much, but a paired-down one could still demonstrate why tag matching HTML will never work.&lt;/p&gt;&#xA;&lt;p&gt;I probably won't do a &amp;quot;build a touring machine in Python&amp;quot; project, but pick some sort of finite state machine problem and have them code it up.&lt;/p&gt;&#xA;&lt;p&gt;In my first theory class the professor assigned everyone &amp;quot;Build a state machine of the elevator in this building.&amp;quot;  I think it was the first day of class.  I remember he went over several assignments with the student's permission.&lt;/p&gt;&#xA;&lt;p&gt;What I remember&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;No one modeled the fire key&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Several people didn't model going up/going down, just went to the closes floor&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No one modeled restricted roof access&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;It showed all the students how easy it was to make bad code because they hadn't looked at the problem and really thought about what the underlying problem was.  Thinking about the underlying problem is what theory focuses on.&lt;/p&gt;&#xA;" OwnerUserId="11549" LastActivityDate="2022-01-16T23:54:09.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7245" PostTypeId="2" ParentId="7226" CreationDate="2022-01-17T09:42:00.053" Score="2" Body="&lt;p&gt;I teach year 8, some of this: Boolean logic, combining Boolean logic to make a memory bit, and an adder. We also go the other way to discover how to make logic with dominos, switches (Shannon), cogs, etc. However the bottom up approach is not the best way. Noor is the top down. You need both. Many CS principles are true independent of how they are implemented.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-01-17T09:42:00.053" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7246" PostTypeId="2" ParentId="7226" CreationDate="2022-01-17T13:47:57.937" Score="4" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Why not teach people how computers work right away?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;A driving lesson does not start with a mechanic course. A cooking class does not begin with a chemistry class. A house painter can start working before they know how to make paint and pigments. Musicians don't learn to build an instrument before they learn to play it.&lt;/p&gt;&#xA;&lt;p&gt;The content of a curriculum should be decided based on the relevance to the student. While it may be &lt;em&gt;interesting&lt;/em&gt; to know, does it meaningfully change how students learn to develop software? By and large, I'd say no.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That's what I wanted an answer to.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You're conflating &amp;quot;I'd like to know more about this&amp;quot; with &amp;quot;this should be taught by default&amp;quot;. The former is perfectly fine, but the latter is not its logical conclusion.&lt;/p&gt;&#xA;&lt;p&gt;Being interested in something is not a baseline for what kind of information would be interesting/relevant to everyone.&lt;/p&gt;&#xA;&lt;p&gt;From an education perspective, several considerations need to be weighed, such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it interesting to the students as a whole?&lt;/li&gt;&#xA;&lt;li&gt;Is this knowledge necessary?&lt;/li&gt;&#xA;&lt;li&gt;Is this knowledge relevant to the course goal?&lt;/li&gt;&#xA;&lt;li&gt;Can it be explained with relative ease?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Your question only passes the first of those bullet points at best (as I can't judge if the majority of students are interested in this as a staple of the curriculum), but IMHO not the other three.&lt;/p&gt;&#xA;&lt;p&gt;If it adds more complexity and does not pay back meaningful dividends, it's superfluous information that, while interesting, doesn't particularly &lt;em&gt;need&lt;/em&gt; to be in a curriculum.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2022-01-17T13:47:57.937" CommentCount="13" ContentLicense="CC BY-SA 4.0" />
  <row Id="7247" PostTypeId="2" ParentId="3590" CreationDate="2022-01-17T19:02:42.673" Score="0" Body="&lt;p&gt;One term that I don't see in the answers given is &amp;quot;Software Carpentry&amp;quot;. This is a collective name for all those skills (version control, unit testing, build systems, documentation generation) that are completely not academic, but useful for programmers of all stripes, including academic.&lt;/p&gt;&#xA;&lt;p&gt;The problem is where to find place in a university curriculum to teach software carpentry. Universities are (outside of studies such as computational engineering) more concerned with research-y topics, not &amp;quot;mere craft&amp;quot;, so they limit the time allocated for it. Plenty of universities barely teach a decent programming language: limiting themselves to some matlab and python, never mind that the poor students may be thrown in large C/Fortran code bases in their graduate career.&lt;/p&gt;&#xA;&lt;p&gt;So: source code control is &amp;quot;beneath&amp;quot; the CS professors; it's something the students are supposed to pick up on their own.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-17T19:02:42.673" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7250" PostTypeId="1" CreationDate="2022-01-24T05:07:36.947" Score="0" ViewCount="1103" Body="&lt;p&gt;A CS student here. My school is teaching only Java, and I figured I should pick up another language on my own. What would you say is the best programming language to learn right now in this market?&lt;/p&gt;&#xA;" OwnerUserId="11583" LastEditorUserId="204" LastEditDate="2022-01-24T13:55:09.687" LastActivityDate="2022-02-04T08:13:00.477" Title="What is the best programming language to learn right now?" Tags="|self-learning|student-motivation|programming|language-choice|language-types|" AnswerCount="3" CommentCount="12" FavoriteCount="0" ClosedDate="2022-01-24T15:51:09.780" ContentLicense="CC BY-SA 4.0" />
  <row Id="7251" PostTypeId="2" ParentId="7250" CreationDate="2022-01-24T10:02:31.547" Score="5" Body="&lt;p&gt;One of each kind, doesn't matter what it's called.&lt;/p&gt;&#xA;&lt;p&gt;If you understand the concept of a language, you can learn a new syntax in a couple of weeks; i.e. if you already know Perl and Python, learning Ruby probably won't really expand your expertise even if Ruby devs might be the most sought after and highest paid (just, an example, I have no idea who actually is paid the most). Now if you'd instead learn Lisp, you can add 'functional programming' to your list of skills. It will make picking up Haskell much easier. Not that you'd need either of the two in real life (probably) but you now have a better understanding of programming as a whole and more skills to advertise.&lt;/p&gt;&#xA;&lt;p&gt;If I were in charge of hiring, I'd be looking for a 'Web developer' not a Django or a Ruby-on-Rails dev. It's easier to teach a new framework than a concept.&lt;/p&gt;&#xA;&lt;p&gt;So here is a list of things which I would suggest you are able to cover:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;something that is fast to write&lt;/li&gt;&#xA;&lt;li&gt;something that is fast to execute&lt;/li&gt;&#xA;&lt;li&gt;something for databases&lt;/li&gt;&#xA;&lt;li&gt;something that can be read by a shell&lt;/li&gt;&#xA;&lt;li&gt;something functional&lt;/li&gt;&#xA;&lt;li&gt;something for desktop GUIs&lt;/li&gt;&#xA;&lt;li&gt;something for the internet&lt;/li&gt;&#xA;&lt;li&gt;something that can render nice images or games&lt;/li&gt;&#xA;&lt;li&gt;something for microcontrollers&lt;/li&gt;&#xA;&lt;li&gt;something to create mobile apps&lt;/li&gt;&#xA;&lt;li&gt;something describing hardware&lt;/li&gt;&#xA;&lt;li&gt;something to show off to the nerds like brainfuck-2D ;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This list is highly subjective, off the top of my head, and by no means complete (but a good starting point). However, there are a lot of people who get by perfectly fine with only one language. Also one language can cover more than one of the points of that list. If you really want, you can do all you shell-scripting with CSS.&lt;/p&gt;&#xA;" OwnerUserId="11138" LastEditorUserId="6719" LastEditDate="2022-02-04T08:13:00.477" LastActivityDate="2022-02-04T08:13:00.477" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7253" PostTypeId="2" ParentId="7250" CreationDate="2022-01-24T14:33:33.300" Score="0" Body="&lt;p&gt;There is no &amp;quot;best&amp;quot; second language for everyone. It depends on your goals. If you are only interested in future employment as a developer then one of the languages on the most popular (in industry) list is what you want. Both C and Python are quite hot at the moment, as is Javascript.&lt;/p&gt;&#xA;&lt;p&gt;But if your interest is more towards a complete understanding of computer science and, in particular, a deep understanding of languages, then you may want a language that is specifically quite different from what you already know. A member of the LISP family would be a good choice because it uses a different paradigm requiring different thought patterns. You can save niche languages for later (brainfuck). C is also quite different from Java, though the low level syntax is similar. But, it, too, requires a different way of thinking about how you conceptualize the solution of a complex problem. For this purpose, both Python and Ruby are a bit too close to Java to stretch your mental models sufficiently and you are likely to program either just like you would program Java. You can't do that with C or any LISP variant.&lt;/p&gt;&#xA;&lt;p&gt;So, the requirements for the job market and for a deep education are quite different.&lt;/p&gt;&#xA;&lt;p&gt;Any undergraduate program in CS is likely to require you to learn an assembly language at some point. A big step would be to teach yourself MIX from &lt;em&gt;The Art of Computer Programming&lt;/em&gt; by Knuth. It is a fairly generalized assembly language that has simulators available.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-01-24T14:33:33.300" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7254" PostTypeId="2" ParentId="7250" CreationDate="2022-01-24T15:12:30.377" Score="0" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;My school is teaching only Java, and I figured I should pick up another language on my own.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Good thinking!&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What would you say is the best programming language to learn right now in this market?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Depends on what &amp;quot;this market&amp;quot; is for you. If you want to go into robotics, then maybe C? If you want to go into Web development, then Javascript. Data science or analytics? Python, R, or Julia. DevOps? Ruby or Go. Computer graphics or gaming? C++. You see where I am going with this?&lt;/p&gt;&#xA;&lt;p&gt;That said, &lt;strong&gt;it does not matter&lt;/strong&gt;. Any second language you learn will help your understanding and market value, and what is most sought-after now may not be so hot anymore when you graduate. What you should mostly be looking for at this point of your career is to broaden your horizon. If you already know Java, then learning C# is quick but also sort of useless, since you will mostly find similar concepts used via a similar syntax. What you should be looking for instead are languages that teach you something new - functional programming, logic-oriented programming, or programming close to the hardware are probably the highest-gain ones (for a more complete list see &lt;a href=&quot;https://cseducators.stackexchange.com/a/7251/543&quot;&gt;Max' answer&lt;/a&gt;). Which of those is &amp;quot;most important&amp;quot; again depends on where you see yourself going in your career.&lt;/p&gt;&#xA;" OwnerUserId="543" LastActivityDate="2022-01-24T15:12:30.377" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7257" PostTypeId="2" ParentId="106" CreationDate="2022-01-30T06:30:50.127" Score="3" Body="&lt;p&gt;Below written from pov that functional programming (FP) is the only way to go.&#xA;This is of course not literally true. But people of other viewpoints can express their's better than I can. So I'll stay with mine; here goes!&lt;/p&gt;&#xA;&lt;h1&gt;Constructing the Ideal CS-101 language&lt;/h1&gt;&#xA;&lt;p&gt;The PL-no-1 becomes willy-nilly the mentalese or &lt;a href=&quot;https://plato.stanford.edu/entries/language-thought/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Language of Thought&lt;/a&gt; for the student for their life. Or at least for a long time after. So it behoves us to make good choices here!&lt;/p&gt;&#xA;&lt;p&gt;Following are the desiderata I consider key and the closest corresponding ideal language.  Here's a &lt;a href=&quot;https://en.wikipedia.org/wiki/Cognitive_dimensions_of_notations&quot; rel=&quot;nofollow noreferrer&quot;&gt;wider set&lt;/a&gt;. I invite you to think through your own personal set. Main point being:&#xA;&lt;strong&gt;Decide your attributes before your language.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The medium for CS-101 should:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Have low bar on use : Python&lt;/li&gt;&#xA;&lt;li&gt;Have clean type inference : ML&lt;/li&gt;&#xA;&lt;li&gt;Be conceptually simple : Scheme&lt;/li&gt;&#xA;&lt;li&gt;Have rich expressions : APL&lt;/li&gt;&#xA;&lt;li&gt;Have a mathematical (aka equational) feel : Haskell&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/7226/driven-to-abstraction&quot;&gt;Scott Rowe&lt;/a&gt; (and like-minded) will exclaim: Where in all this is...&lt;/p&gt;&#xA;&lt;h1&gt;The machine that makes this world possible?!&lt;/h1&gt;&#xA;&lt;p&gt;Yes machine understanding matters. But postponing that causes less damage than reversing the order to machine-first and have students get into the bad habit of getting hung up on implementation/efficiency questions and neglect semantics.  This is of course the point around which the maximum amount of disagreements and disputes occur. I don't claim to be without bias. I only claim to be on the better side.&lt;/p&gt;&#xA;&lt;p&gt;My slogan here:&lt;/p&gt;&#xA;&lt;h1&gt;Semantics before efficiency;&lt;/h1&gt;&#xA;&lt;h1&gt;Ontology before semantics&lt;/h1&gt;&#xA;&lt;p&gt;This answer will make sense if that is agreeable.&#xA;If its not you probably want to stop reading here!&lt;/p&gt;&#xA;&lt;p&gt;The first part of the slogan is sufficiently over quoted that I can leave it alone. The second is less known... And more important&lt;/p&gt;&#xA;&lt;p&gt;When we teach there are two things that interact:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the concepts we wish to teach&lt;/li&gt;&#xA;&lt;li&gt;the key-elements of the PL used&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Both these are the ontologies though from different domains.&#xA;When they gel the flow is smooth: rewarding to teacher, illuminating to student.&#xA;When not it becomes like Bernard Shaw's pig metaphor:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Never wrestle with a pig. You get dirty, and besides, the pig likes it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The last may be unverifiable but the rest stands&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;When the course objectives (teacher ontologies) and the PL's ontologies mismatch everyone suffers&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;An example: Lists (&amp;quot;singly linked lists&amp;quot;) in C start with:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;struct node&#xA;{&#xA;  T elem;    /* Whatever T may be */&#xA;  struct node *next;&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Did you notice that there are TWO types there? No?? Let me spell it out&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;typedef node *nodeptr; &#xA;struct node&#xA;{&#xA;  T elem;&#xA;  nodeptr next;&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;em&gt;Which of &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;nodeptr&lt;/code&gt; is the concrete C model for the abstract list type?&lt;/em&gt;&lt;br /&gt;&#xA;Now you may consider this a hairsplitting question but it becomes key from the ontology pov. Because from the ontology-pov the abstract list type falls between the two concrete C types &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;nodeptr&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In effect then all of C is coding up around the fact that:&lt;br /&gt;&#xA;&lt;strong&gt;Not only C has no lists; it does not even have user defined lists&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;[If you disagree with that look at &lt;a href=&quot;https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule&quot; rel=&quot;nofollow noreferrer&quot;&gt;Greenspun's tenth rule&lt;/a&gt;]&lt;/p&gt;&#xA;&lt;p&gt;IOW I discard the machine-first without much compunction.&lt;/p&gt;&#xA;&lt;p&gt;I also discard the OOP-first philosophy. Justifications for this are for elsewhere...&lt;/p&gt;&#xA;&lt;h1&gt;Other Desiderata&lt;/h1&gt;&#xA;&lt;p&gt;But there are other desiderata that are more real. I happen to choose to de-prioritize them. Others may — justifiably — choose otherwise. For example&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;FP is proverbially a good fit for parallel programming. If this matters Erlang will come high on your list. And if high becomes highest — great!&lt;/li&gt;&#xA;&lt;li&gt;Real world considerations invariably push against academic ones:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;Must be under JVM&lt;/em&gt; : Scala, Clojure&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Windows/.NET are my world&lt;/em&gt; : F#&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;You really want to push the FP envelope at its research-edges? Idris, Agda&lt;/li&gt;&#xA;&lt;li&gt;The main action is at meta level (you are a devotee/disciple of Paul Graham)? Common Lisp&lt;/li&gt;&#xA;&lt;li&gt;Etc.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There are dozens (maybe hundreds) of other attributes &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_system_quality_attributes&quot; rel=&quot;nofollow noreferrer&quot;&gt;we could study&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;All these have their legitimate provenance. They are just not important enough &lt;strong&gt;&lt;strong&gt;for me&lt;/strong&gt;&lt;/strong&gt;… &lt;strong&gt;&lt;strong&gt;at the moment&lt;/strong&gt;&lt;/strong&gt;.  [I wouldn't put it past Idris/Agda taking over the mantle of Haskell in 2035]&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Problem with OOP: You wanted a banana. You got a gorilla holding the banana and the entire jungle.&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.reddit.com/r/programming/comments/99izf/joe_armstrong_because_the_problem_with/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Joe Armstrong&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;My general suggestion would be towards this: You wanted FP. You chose Haskell.&#xA;Did you want the 700lb gorilla?&lt;/p&gt;&#xA;&lt;p&gt;This is usually taken as the FP-er Armstrong bashing OOP&lt;/p&gt;&#xA;&lt;p&gt;I am turning it round to and applying it to Haskell!  There's just way way way too too much there. For the sophisticated programmer it could be joyous like slurping around Willy Wonka's &lt;a href=&quot;https://en.wikipedia.org/wiki/Willy_Wonka_%26_the_Chocolate_Factory&quot; rel=&quot;nofollow noreferrer&quot;&gt;chocolate factory&lt;/a&gt;.  To the beginner its more like getting drowned.&lt;/p&gt;&#xA;&lt;h1&gt;Scheme&lt;/h1&gt;&#xA;&lt;p&gt;The trouble is that scheme really doesnt cut it as an FPL by 2022 standards.&lt;/p&gt;&#xA;&lt;p&gt;Much of Scott Rowe's continual tirades against scheme come from this: &lt;strong&gt;If they (SICP) were going to introduce assignment on pg 300 and invalidate those earlier 300 pages&lt;/strong&gt; why did they waste my time?&lt;/p&gt;&#xA;&lt;p&gt;The problem — &lt;em&gt;this problem&lt;/em&gt; — vanishes in Haskell: You cant do assignment/mutation… pg 3 Or 300 Or 3000. Not possible. Its just not there.&lt;/p&gt;&#xA;&lt;p&gt;The question is a non-trivial one; viz: How far to push in important desiderata? Informally into the culture? Or all the way formally into the language definition?&lt;/p&gt;&#xA;&lt;p&gt;At the broader level the view (to me at least) is murky.&lt;br /&gt;&#xA;At the beginner level its quite clear Haskell gets (&lt;strong&gt;this aspect!&lt;/strong&gt;) righter than scheme&lt;/p&gt;&#xA;&lt;p&gt;So then…&lt;/p&gt;&#xA;&lt;h1&gt;Haskell → Haskellish&lt;/h1&gt;&#xA;&lt;p&gt;Haskell is great but Haskell has lost its way into labyrinthine complexity of its legendary type system. See&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://twitter.com/headinthebox/status/1251647851077091328&quot; rel=&quot;nofollow noreferrer&quot;&gt;Erik Meijer&lt;/a&gt; Popular MOOC on FP&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://mail.haskell.org/pipermail/ghc-devs/2015-October/010068.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mark Lentczner&lt;/a&gt; resignation from release manager for The Haskell Platform&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.simplehaskell.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Simple Haskell&lt;/a&gt; A bunch of folks feeling similarly&lt;/li&gt;&#xA;&lt;li&gt;Google for ftp/amp for more nittygritty details about the controversy &lt;a href=&quot;http://nattermorphisms.blogspot.com/2015/02/ftp-dangers.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;eg&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;My summary:&lt;/p&gt;&#xA;&lt;p&gt;As a teacher, I wish to stay Haskell-ISH but not Haskell proper as in current ghc at least for CS-101. [Projects is another matter]&lt;/p&gt;&#xA;&lt;p&gt;Below I suggest alternatives for those who are convinced that Haskell-style FP is the way to go but not ghc itself (for now)&lt;/p&gt;&#xA;&lt;h1&gt;Nearest to Haskell&lt;/h1&gt;&#xA;&lt;h2&gt;Miranda&lt;/h2&gt;&#xA;&lt;p&gt;The original small super elegant expensive proprietory predecessor of Haskell. Recently &lt;a href=&quot;https://www.youtube.com/watch?v=ZkLE0jrflwQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;open sourced&lt;/a&gt;. Strongly recommended for teaching basic programming via FP.&#xA;A natural first choice for people who regard &lt;a href=&quot;https://www.amazon.in/Introduction-Functional-Programming-International-Computing/dp/0134841891&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bird&amp;amp;Wadler&lt;/a&gt; (Ed-1 mind you!) as the best CS book ever See &lt;a href=&quot;https://www.youtube.com/watch?v=9SBR_SnrEiI&quot; rel=&quot;nofollow noreferrer&quot;&gt;interview&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Gofer&lt;/h2&gt;&#xA;&lt;p&gt;Earliest and smallest language that can claim to be Haskell.&#xA;See Haskell-gofer &lt;a href=&quot;https://stackoverflow.com/a/26071288/3700414&quot;&gt;error message comparison&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The big thing going for it are the series of preludes that make it possibly to sequentially add complexity as Racket does with its teachpacks.&lt;/p&gt;&#xA;&lt;h2&gt;Pugofer&lt;/h2&gt;&#xA;&lt;p&gt;My &lt;a href=&quot;http://blog.languager.org/2014/09/pugofer.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;changes to gofer&lt;/a&gt; which I most use.&lt;/p&gt;&#xA;&lt;p&gt;No this is not a &amp;quot;shameless plug&amp;quot;. Its not documented for public use. Not really usable other than by my students/colleagues.&lt;/p&gt;&#xA;&lt;h2&gt;Hugs&lt;/h2&gt;&#xA;&lt;p&gt;Can reasonably be called &amp;quot;gofer 2&amp;quot;; falls between gofer and full (modern) haskell; a very sane choice for people going functional; as Erik Meijer demonstrated a &lt;a href=&quot;https://www.reddit.com/r/haskell/comments/3ove2e/got_the_welcome_email_from_edx_fp101x_course_hugs/&quot; rel=&quot;nofollow noreferrer&quot;&gt;few years ago&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Helium&lt;/h2&gt;&#xA;&lt;p&gt;Similar goals to pugofer in terms of beginner simplicity. &lt;a href=&quot;https://hackage.haskell.org/package/helium&quot; rel=&quot;nofollow noreferrer&quot;&gt;See&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Pure&lt;/h2&gt;&#xA;&lt;p&gt;When we get that the whole business of using FP as a general programming ideology is using math equations as a term reqriting system, an explcit rewriting-oriented language becomes an attractive choice. &lt;a href=&quot;https://agraef.github.io/pure-lang/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pure&lt;/a&gt; is one such.&lt;br /&gt;&#xA;[No first hand experience]&lt;/p&gt;&#xA;&lt;h1&gt;Wider Span&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Erlang : When concurrency is central&lt;/li&gt;&#xA;&lt;li&gt;ML family (SML Poly-ML, CAML, OCAML) : the original FPLs. In many ways neater than all the rest.&lt;/li&gt;&#xA;&lt;li&gt;Stay within the Java world : Clojure, Scala&lt;/li&gt;&#xA;&lt;li&gt;Stay within the .NET : F#&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Especially given your:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I learnt FP using SML decades ago&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;ML-family may be the sanest choice. Conversely using current publicity ratings to determine a CS-101 medium is really egregious. For those who don't see this there's no use to this conversation. For those who do, there's no need.  Still it may help to hear a Dijkstra hyperbole:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Programming should be taught with a language not implemented on campus&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Now you can ignore that, or take it literally. I hear it as Dijkstra giving us teachers the freedom to cock a snook at TIOBE indices!&lt;/p&gt;&#xA;&lt;h1&gt;In short my recommendation&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;For you Ben&lt;/strong&gt; take ML family if that makes you most comfortable. At least to start with.&lt;br /&gt;&#xA;[Others can sift the set nearest Haskell to their taste]&lt;/p&gt;&#xA;&lt;p&gt;I actually like ML family a great deal. Much more teacher-friendly and fad-unfriendly than the modern crop.&lt;/p&gt;&#xA;&lt;p&gt;Myself I dont use it because I am addicted to Haskell syntax.&#xA;[My ideal FPL would be an ML-semantics carrying a Haskellish syntax. No such exists that I know]&#xA;Call me silly but I really want my quick sort to be thusly&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-haskell prettyprint-override&quot;&gt;&lt;code&gt;qsort []      = []&#xA;qsort (x::xs) = qsort [y | y ∈ xs, x&amp;lt;y] ++ [x] ++ qsort [y | y ∈ xs, x≥y]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;sup&gt;Yeah my emacs is setup so that when I type &lt;code&gt;&amp;lt;-&lt;/code&gt; I get &lt;code&gt;∈&lt;/code&gt; &lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-01-31T09:12:22.977" LastActivityDate="2022-01-31T09:12:22.977" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7258" PostTypeId="1" CreationDate="2022-01-30T12:23:18.293" Score="3" ViewCount="48" Body="&lt;p&gt;Due to a teacher shortage I will have a class of &amp;quot;IT-Systems &amp;amp; Devices&amp;quot; students in a couple of weeks. The class should be group projects of 3 students in which they will have to do research (and interviews with me) to asses what the end goal of the project is and how they can get there.&lt;/p&gt;&#xA;&lt;p&gt;And of course they will need to build that end goal. My personal background is in software development so I sadly don't know any projects they could do.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone know some possible assignments or a site where I could find some? Because the teacher who used to do this left none behind.&lt;/p&gt;&#xA;&lt;p&gt;Subjects are in the area of:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Hardware setup/maintenance&lt;/strong&gt; (like setting up laptops/servers with&#xA;specific software or integrating security camera's or sensors in to a network.)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;(setting up a network including security and maintaining that network (Or things like a web/database server)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The difficulty is aimed at freshman college it-students.&lt;/p&gt;&#xA;" OwnerUserId="8867" LastActivityDate="2022-01-30T12:23:18.293" Title="Practical assignments Hardware/Server projects" Tags="|networks|hardware|" AnswerCount="0" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7259" PostTypeId="1" AcceptedAnswerId="7263" CreationDate="2022-01-30T14:15:15.310" Score="0" ViewCount="289" Body="&lt;p&gt;I am learning C++. I learned basics concepts  and OOP. The main things peoples are working on are GUI and API development with the help of C++. My question is, as a C++ learner is it a must for me to learn these in C++, because there are other languages to learn and develop these concepts (GUI , APIs ...)?&lt;/p&gt;&#xA;" OwnerUserId="11579" LastEditorUserId="1293" LastEditDate="2022-01-30T15:53:57.417" LastActivityDate="2022-01-31T21:36:02.167" Title="Is C++ much better than other languages?" Tags="|secondary-education|programming|c++|gui|" AnswerCount="3" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7260" PostTypeId="2" ParentId="7259" CreationDate="2022-01-30T15:25:44.757" Score="2" Body="&lt;p&gt;There is nothing wrong with learning C++ as your first or main language. It's an extremely big and complicated language, but that's only if you want to learn everything about it. &amp;quot;Modern&amp;quot; C++, meaning C++11 or newer can actually be used as an elegant language to teach programming in. Try to find a book that teaches C++17: there is a lot in older C++ versions that has been improved and there are &lt;em&gt;lots&lt;/em&gt; of tutorials out there that teach stuff you really should &lt;em&gt;not&lt;/em&gt; use.&lt;/p&gt;&#xA;&lt;p&gt;One of the main attractions of C++ is that you can write very high performance code in it. For example, C++ is really the language of choice for video games. But that's mostly for the deeper stuff, the actual video stuff. If you're interested in GUI applications you &lt;em&gt;can&lt;/em&gt; use C++ but you don't &lt;em&gt;have to&lt;/em&gt;. In your case I would let the choice of language be dictated by the platform you want to code for. If there is a de facto standard, use that.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-01-30T15:25:44.757" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7261" PostTypeId="2" ParentId="7259" CreationDate="2022-01-31T14:39:01.437" Score="1" Body="&lt;p&gt;As a software developer, I used C++ on several projects.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;First I learnt C.&lt;/li&gt;&#xA;&lt;li&gt;Then on the first C++ project I learn encapsulation.&lt;/li&gt;&#xA;&lt;li&gt;Then on the third C++ project I learn some more.&lt;/li&gt;&#xA;&lt;li&gt;Then on the forth C++ project I learnt Eiffel. In Eiffel I learnt polymorphism, inheritance, generics (templates), return type covariance, etc. ...&lt;/li&gt;&#xA;&lt;li&gt;I then learnt how to do these in C++.&lt;/li&gt;&#xA;&lt;li&gt;Then realised that C++ is a bad idea: It has some improvements to C, but also a load of blot, that gets in the way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I wish I had learn Eiffel first, it is a much quicker language to learn. It is quicker to learn Eiffel and then C++. Eiffel is also a much quicker language to program in. And compiles to programs of similar speed to C++: faster for big complex programs, slower for simple programs (but not much).&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion:&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Learn to program: Eiffel, Lisp.&lt;/li&gt;&#xA;&lt;li&gt;Use a high level language for most jobs.&lt;/li&gt;&#xA;&lt;li&gt;Use a hybrid of languages when you need to do low-level stuff.&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;golang&lt;/code&gt;, &lt;code&gt;Eiffel&lt;/code&gt;, or if you must &lt;code&gt;C&lt;/code&gt;, for speed. There may be others.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2022-01-31T14:48:20.063" LastActivityDate="2022-01-31T14:48:20.063" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7262" PostTypeId="2" ParentId="1090" CreationDate="2022-01-31T16:29:45.803" Score="1" Body="&lt;h1&gt;Execution? Or Evaluation?&lt;/h1&gt;&#xA;&lt;p&gt;One of the most pervasive metaphors that dominates programming is the idea of &lt;em&gt;execution&lt;/em&gt;. Programs execute, as do functions, as do the tiniest of assignment statements.&lt;/p&gt;&#xA;&lt;p&gt;One purpose of FP is to defeat — or at least deflate — this metaphor.&lt;/p&gt;&#xA;&lt;p&gt;The alternate metaphor that obtains in FP is &lt;em&gt;evaluation&lt;/em&gt;.  FP programs are basically calculators except that they are not over mere numbers but over arbitrarily complex data structures.&lt;/p&gt;&#xA;&lt;p&gt;To do FP is to &lt;strong&gt;replace execution by evaluation.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Abstract? or Concrete?&lt;/h1&gt;&#xA;&lt;p&gt;The related flip is that whereas OOP-ers like their data structures to be &lt;em&gt;abstract data types&lt;/em&gt; FP-ers try to keep all their data as concrete as possible.&lt;/p&gt;&#xA;&lt;p&gt;ie the Java embarrassment that &lt;code&gt;int&lt;/code&gt; is not a proper class is flipped into a positive and pervades the language/paradigm. If we can keep all types concrete its a Good Thing!&lt;/p&gt;&#xA;&lt;h1&gt;Lets see a session&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt;? 1 + 3&#xA;4 : ℤ&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Simple calc model like python; though notice the type&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? [1,2] ++ [3,4]&#xA;[1, 2, 3, 4] : ℒ.ℤ&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So the calc model applies to list data structures as to nos uniformly&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? [(&amp;quot;Eggs&amp;quot;, 12), (&amp;quot;Bread&amp;quot;, 2)]&#xA;[(&amp;quot;Eggs&amp;quot;,12), (&amp;quot;Bread&amp;quot;,2)] : ℒ.⦇ℒ.Char, ℤ⦈&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;More complex; notice that strings are just lists of &lt;code&gt;Char&lt;/code&gt;&#xA;No spurious excess ontologies here!&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? [(&amp;quot;Eggs&amp;quot;, 12), (&amp;quot;Bread&amp;quot;, 2)] ++ [(&amp;quot;PeanutButter&amp;quot;, 1)]&#xA;[(&amp;quot;Eggs&amp;quot;,12), (&amp;quot;Bread&amp;quot;,2), (&amp;quot;PeanutButter&amp;quot;,1)] : ℒ.⦇ℒ.Char, ℤ⦈&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And these more sophisticated data structures are as easily handled as the simplest; So far looks just like python&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? [(&amp;quot;Eggs&amp;quot;, 12), (&amp;quot;Bread&amp;quot;, 2)] ++ [&amp;quot;PeanutButter&amp;quot;]&#xA;ERROR: Type error in application&#xA;*** expression     : [(&amp;quot;Eggs&amp;quot;,12),(&amp;quot;Bread&amp;quot;,2)] ++ [&amp;quot;PeanutButter&amp;quot;]&#xA;*** term           : [(&amp;quot;Eggs&amp;quot;,12),(&amp;quot;Bread&amp;quot;,2)]&#xA;*** type           : ℒ.⦇ℒ.Char, ℤ⦈]&#xA;*** does not match : ℒ.(ℒ.Char)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Whoops! Type error&#xA;Python etc will give the error but at a later inconvenient point&lt;/p&gt;&#xA;&lt;p&gt;Now we move on&lt;/p&gt;&#xA;&lt;h1&gt;Expression trees&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt;ctype Expr where&#xA;  Plus, Mul : Expr → Expr → Expr&#xA;  Lf        : ℤ → Expr&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Whats the &lt;code&gt;ctype&lt;/code&gt;?? A &lt;strong&gt;concrete&lt;/strong&gt; type.&lt;br /&gt;&#xA;They (trees) can be constructed&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;trivially as an &lt;code&gt;Lf&lt;/code&gt; (leaf) wrapping an &lt;code&gt;ℤ&lt;/code&gt; to give a trivial tree&lt;/li&gt;&#xA;&lt;li&gt;Or take two trees &lt;code&gt;l&lt;/code&gt; and &lt;code&gt;r&lt;/code&gt; and make &lt;code&gt;Plus.l.r&lt;/code&gt;; Likewise &lt;code&gt;Mul.l.r&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What does it mean that the type is &lt;em&gt;concrete&lt;/em&gt;?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? Plus.(Lf.2).(Lf.3)&#xA;Plus.(Lf.2).(Lf.3) : Expr&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is trivial looking but actually deep&lt;br /&gt;&#xA;Just as &lt;code&gt;3:ℤ&lt;/code&gt; SELF-EVALUATES to &lt;code&gt;3:ℤ&lt;/code&gt; (the trivial case of evaluation)&#xA;&lt;code&gt;Plus.(Lf.2).(Lf.3) : Expr&lt;/code&gt; self-evaluates to itself&lt;/p&gt;&#xA;&lt;p&gt;Further just as &lt;code&gt;2+3&lt;/code&gt; (non-trivially) evaluates to &lt;code&gt;5&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Similarly for expression trees&#xA;If we want to say that the &amp;quot;2+3&amp;quot; tree is the l-subtree of the &amp;quot;(2+3)*5&amp;quot; tree&#xA;we could do&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;t1 = Plus.(Lf.2).(Lf.3)&#xA;t2 = Mul.t1.(Lf.5)&#xA;? t2&#xA;Mul.(Plus.(Lf.2).(Lf.3)).(Lf.5) : Expr&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Finally an expression evaluator&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;eval.(Lf.x)     = x&#xA;eval.(Plus.l.r) = eval.l + eval.r&#xA;eval.(Mul.l.r)  = eval.l * eval.r&#xA; &#xA;? eval.(Plus.(Lf.2).(Lf.3))&#xA;5 : ℤ&#xA;? eval.t2&#xA;25 : ℤ&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In short a tree data structure in 3 lines — NO IO NO MEMORY MGMT&lt;br /&gt;&#xA;And the exp-evaluator (or tree-interpreter) another 3 lines!&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-02-07T15:42:08.613" LastActivityDate="2022-02-07T15:42:08.613" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7263" PostTypeId="2" ParentId="7259" CreationDate="2022-01-31T17:43:08.853" Score="2" Body="&lt;p&gt;I will try to answer this question from a Computer Science Educator point of view.&lt;/p&gt;&#xA;&lt;h2&gt;C++ is a tool&lt;/h2&gt;&#xA;&lt;p&gt;First and foremost, C++ is a tool. Like any other language, it's designed to make accomplishing &lt;em&gt;certain&lt;/em&gt; types of tasks easier, but it &lt;em&gt;always&lt;/em&gt; comes with a cost.&lt;/p&gt;&#xA;&lt;p&gt;C++ tries to be usable almost everywhere with a great deal of flexibility. This inevitably comes with a cost of complexity. Some say it's the most complicated language out there (to know all the rules, not to accomplish certain tasks - this confusion leads to incorrect assertions that C and Assembly are more complex).&lt;/p&gt;&#xA;&lt;h2&gt;It can give you everything&lt;/h2&gt;&#xA;&lt;p&gt;Teaching C++ has its benefits. You can use one tool to teach pretty much everything there is - high level abstractions like generics, dependency injection with polymorphism, framework interactions, various package managing, resource acquisition and control, interactions with hardware in the lowest level.&lt;/p&gt;&#xA;&lt;p&gt;It's convenient to be able to teach pretty much everything while using one tool. But it has its costs.&lt;/p&gt;&#xA;&lt;h2&gt;It is incredibly complex and makes some tasks disproportionately harder&lt;/h2&gt;&#xA;&lt;p&gt;Computer Science students have many reasons to learn a programming language. It is important to not only provide reliable information, but to also encourage them to explore the possibilities on their own. C++ makes it hard. Very hard.&lt;/p&gt;&#xA;&lt;p&gt;Scott Meyers (a notable author from the C++ community) was once asked, what, in his opinion, is most lacking in C++. He said something among the lines of:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I am an author, so naturally I would want to know how is my book selling. I need to fetch those information from some online source, so in C++ I... yeah...&lt;/p&gt;&#xA;&lt;p&gt;Okay, forget networking. I have the data and I want to display them in a nice chart, so in C++ I... yeah...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;C++ does not have many of the common (some would even say &lt;em&gt;fundamental&lt;/em&gt;) features that are expected to be bundled in the language. Most students will be way more amazed by easily making some simple GUI application than by creating a console game for the 5th time. There is still no networking or GUI application in standard C++, and C++20 is almost implemented by the Big Three compilers.&lt;/p&gt;&#xA;&lt;h2&gt;Not everything can be solved by a third party library&lt;/h2&gt;&#xA;&lt;p&gt;Some would argue that third-party libraries exist for a reason. What's the problem with introducing a simple dependency and using it? After all, every programmer should be aware of such possibility and get familiar with project dependencies.&lt;/p&gt;&#xA;&lt;p&gt;Except for the fact that C++ makes it incredibly hard to bundle additional dependencies. It was designed before Internet-aware package managers were a thing. Some decisions have been made that made sense during that time. But new tools were being created and integration reached a new level. Multiple times I had to mentally sigh when I was asked by a student why it takes 4 hours of researching accompanied by trial and error to install OpenCV with CMake, while in Python it takes one &lt;code&gt;pip&lt;/code&gt; command. The situation is bad and it's unlikely that it'll improve.&lt;/p&gt;&#xA;&lt;h2&gt;Every tool has its purpose&lt;/h2&gt;&#xA;&lt;p&gt;Every tool has its purpose and while C++ may as well be an academic language, I do not believe the pros outweight the cons in terms of learning programming. Make a distinction that is already omnipresent - don't use one tool to do everything, even though such a tool &lt;em&gt;can&lt;/em&gt; be used with everything. Want to learn programming and get hooked? Chances are that Python, Kotlin, C# or TypeScript will be much more engaging and pleasurable experience. Want to start with or migrate to low-level language? Choose C or C++, but remember - nowadays C++ is not really used as a &amp;quot;&lt;em&gt;just&lt;/em&gt; more powerful C&amp;quot;. The &amp;quot;modern&amp;quot; part of it is more common and it's not really a tool used to primarily interact with hardware directly. Its aim is to provide a high level of abstraction with almost zero-cost overhead. This comes with complexity.&lt;/p&gt;&#xA;&lt;h2&gt;What to choose, then?&lt;/h2&gt;&#xA;&lt;p&gt;Ultimately, this is your question about your situation. You have learnt some basics of C++, good. It's not bad to make a transition to another language, nor is it bad to stay with C++. Ask yourself whether you're enjoying C++. If yes, try to delve deeper. If not, make a change. A programmer ough to know more than one tool, so learning more languages is inevitable.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;A word of disclaimer - I have been programming in C++ for almost ten years. It is (and has always been) my primary language. I am engaged in both business solutions and education and, unfortunately, I more and more believe that my favorite tool (C++) is becoming more and more ill-suited for being an academic tool. Want to teach high-level? Use Kotlin, Python, TS, C# or Java (or other tools that make it easier by doing some work for you). Want to teach low-level? Use C.&lt;/p&gt;&#xA;&lt;p&gt;Don't bother with the fact that C++ &lt;em&gt;can&lt;/em&gt; do both of those things, unless you have a &lt;em&gt;very&lt;/em&gt; good curriculum planned. &amp;quot;Can&amp;quot; doesn't mean &amp;quot;should&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastEditorUserId="11453" LastEditDate="2022-01-31T21:36:02.167" LastActivityDate="2022-01-31T21:36:02.167" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7264" PostTypeId="1" AcceptedAnswerId="7265" CreationDate="2022-02-01T11:36:07.163" Score="1" ViewCount="168" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;What comes after learning basic and object oriented programming in C++ , I also cover file handling .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="11579" LastActivityDate="2022-02-01T13:49:32.460" Title="What comes after learning object oriented programming in C++?" Tags="|self-learning|programming|secondary-education|" AnswerCount="1" CommentCount="0" ClosedDate="2022-02-06T14:30:19.270" ContentLicense="CC BY-SA 4.0" />
  <row Id="7265" PostTypeId="2" ParentId="7264" CreationDate="2022-02-01T13:49:32.460" Score="2" Body="&lt;p&gt;There are many bits in the Standard Template Library that you should know about&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;random, chrono&lt;/li&gt;&#xA;&lt;li&gt;have you learned all your containers? &lt;code&gt;unordered_map&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;I really like &lt;code&gt;std::optional&lt;/code&gt; and &lt;code&gt;variant&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Do you know what structured bindings are?&lt;/li&gt;&#xA;&lt;li&gt;Smart pointers are very important.&lt;/li&gt;&#xA;&lt;li&gt;Move semantics.&lt;/li&gt;&#xA;&lt;li&gt;Oh, templates and template meta programming.&lt;/li&gt;&#xA;&lt;li&gt;Lambdas.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;That should keep you busy for the next year or two.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-02-01T13:49:32.460" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7266" PostTypeId="1" CreationDate="2022-02-01T15:23:26.073" Score="4" ViewCount="415" Body="&lt;p&gt;I teach programming to a science/engineering students. Here is a typical sequence of assignments for a beginning programming class:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Arithmetic and conditionals: does &lt;code&gt;x&lt;/code&gt; divide &lt;code&gt;y&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Looping: is a number prime&lt;/li&gt;&#xA;&lt;li&gt;Functions: test prime-ness&lt;/li&gt;&#xA;&lt;li&gt;Object-oriented: make a &lt;code&gt;primegenerator&lt;/code&gt; class with a &lt;code&gt;nextprime&lt;/code&gt; method.&lt;/li&gt;&#xA;&lt;li&gt;All together: test the hypothesis that each prime is the average of two other primes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Apart from side-effect-free coding, does FP offer anything in this sort of exercise set?&lt;/p&gt;&#xA;&lt;p&gt;Bigger project: write a &lt;code&gt;person&lt;/code&gt; class, and model diseases: the person has an &lt;code&gt;infect&lt;/code&gt; method and a &lt;code&gt;nextday&lt;/code&gt; method, and after a fixed number of days, they are healthy again. Now make a &lt;code&gt;population&lt;/code&gt; class which contains a bunch of &lt;code&gt;person&lt;/code&gt;s, and model disease propagation. Again a &lt;code&gt;nextday&lt;/code&gt; method, where in each day people can infect each other with some probability, or they are vaccinated. Do parameter studies of herd immunity.&lt;/p&gt;&#xA;&lt;p&gt;Is any of this more elegantly expressible in an FP manner? What are the sort of semi-realistic assignments you would give in an FP course? And what difference does FP make?&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-02-02T02:42:46.517" LastActivityDate="2022-02-06T04:08:22.930" Title="What sort of programming assignments do you give in an FP course?" Tags="|curriculum-design|exercises|functional-programming|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7267" PostTypeId="2" ParentId="7266" CreationDate="2022-02-01T15:36:51.213" Score="2" Body="&lt;p&gt;FP naturally lends itself to recursive problems, so anything with trees or lists is good.  It also lends itself quite naturally towards more mathematical problems, so you could consider something like a sudoku solver or a credit card number validator.&lt;/p&gt;&#xA;&lt;p&gt;Because of immutability, concurrency is far safer.&lt;/p&gt;&#xA;&lt;p&gt;Your set of five questions would work very well in FP, though obviously step 4 would be modified.&lt;/p&gt;&#xA;&lt;p&gt;In response to your request for clarification (though I am not a great FP expert), here is how I would approach that problem.  I would not create an object.  The first three methods would be essentially exactly as you described, though they would have to be recursive.&lt;/p&gt;&#xA;&lt;p&gt;If I were in a lazy language like Haskell, I would define function 4 as an infinite series of numbers that passed the test in function 3.  If I were in an eager language like the primary branch of Scheme, I would instead create a &lt;code&gt;next-prime&lt;/code&gt; method that takes a prime number as an argument, and finds the next one.&lt;/p&gt;&#xA;&lt;p&gt;For the final challenge (#5), I would create a method that tests the hypothesis up to a given number, passed in as an argument.  As you can see, all of the functions I've described are stateless.&lt;/p&gt;&#xA;&lt;p&gt;The sickness modeling problem is fine, though it would involve passing a fair amount of state information from one function call to the next.&lt;/p&gt;&#xA;&lt;p&gt;It's also worth noting that some of the benefits feel less extreme than they did 20 years ago, since the major imperative languages have taken pains to bring many of the great FP tools into their own workspaces.  (Lambdas, map/apply/reduce, etc)  As a result, you can do a lot of FP or FP-adjacent coding in modern &amp;quot;imperative&amp;quot; languages, and you can gain the benefits as well.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-02-02T04:39:34.350" LastActivityDate="2022-02-02T04:39:34.350" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7268" PostTypeId="2" ParentId="7266" CreationDate="2022-02-01T17:27:57.660" Score="1" Body="&lt;h1&gt;Why FP?&lt;/h1&gt;&#xA;&lt;p&gt;One overarching reason for FP is to get conspective views on a given subject in a couple of lines.  Ideally a couple of lines but as far as possible within a page.&lt;/p&gt;&#xA;&lt;p&gt;Why does Doug McIlroy describe McCarthy's first Lisp lecture as the The Most Significant &lt;a href=&quot;http://www.paulgraham.com/mcilroy.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Science talk&lt;/a&gt; he ever attended??&lt;/p&gt;&#xA;&lt;p&gt;What was done is (to me) less important than the last line:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;One could go home and build it oneself without any instruction book&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is what I mean by &lt;strong&gt;conspective&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Alan Kay says that studying Lisp's eval-apply pair &lt;a href=&quot;https://stackoverflow.com/questions/34888245/alan-kays-eval-apply-einstein-moment&quot;&gt;increased his understanding of CS&lt;/a&gt; by a factor of hundred.&lt;/p&gt;&#xA;&lt;p&gt;So to take Alan Kay's example:&lt;/p&gt;&#xA;&lt;p&gt;The Lisp interpreter in Lisp is hardly a pageful&lt;/p&gt;&#xA;&lt;p&gt;Which means that that page, presumably coverable in one lecture, could be said &lt;strong&gt;to cover the field of language implementation.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now can McCarthy's one page lisp in lisp be compared with gcc's &lt;a href=&quot;https://en.wikipedia.org/wiki/GNU_Compiler_Collection&quot; rel=&quot;nofollow noreferrer&quot;&gt;15 million lines&lt;/a&gt;??&lt;/p&gt;&#xA;&lt;p&gt;Some answers may be&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Lisp-in-lisp is a toy gcc is real&lt;/li&gt;&#xA;&lt;li&gt;Apples-n-oranges comparison&lt;/li&gt;&#xA;&lt;li&gt;Oh gcc is many languages, many machines...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I think all such answers miss the point.&lt;/p&gt;&#xA;&lt;p&gt;Sure there's &amp;quot;more&amp;quot; happening in all-of-gcc than in a pageful-of-lisp.  But if all those 15 million lines cannot be squeezed into a sumary of &amp;quot;all thats here&amp;quot; something crucial is lacking in our communication and ultimately &lt;strong&gt;in our understanding.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is after all Einstein in a different guise: &lt;em&gt;You do not understand something unless you can explain it to your grandmother&lt;/em&gt; (&lt;a href=&quot;https://skeptics.stackexchange.com/questions/8742/did-einstein-say-if-you-cant-explain-it-simply-you-dont-understand-it-well-en&quot;&gt;or a 6-year old or a barmaid&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Of course people do dig into gcc starting zero and there are intros to the field as there are intros to all fields egs&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the chapters of a compiler book&lt;/li&gt;&#xA;&lt;li&gt;a block diagram of main parts of toolchain&lt;/li&gt;&#xA;&lt;li&gt;a UML diagram&lt;/li&gt;&#xA;&lt;li&gt;etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;But in FP there is a a very special extra possibility: &lt;strong&gt;Show that conspectus as executable code&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Compared to that all the above have a quality of hand-waving&lt;/p&gt;&#xA;&lt;p&gt;Let me (for now) put down a few files from my laptop taught at various times.&#xA;Depending the nature of your appetite I can flesh out/further explain/add different.&lt;/p&gt;&#xA;&lt;h2&gt;Notes on non-standard notation&lt;/h2&gt;&#xA;&lt;h3&gt;1. function-call notation&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;c.[1,2]&lt;/code&gt; would look like &lt;code&gt;c([1,2])&lt;/code&gt; in conventional C-family language style.&lt;br /&gt;&#xA;ie&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;C family :&lt;code&gt;f(x)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Haskell family &lt;code&gt;f x&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Dijkstra functional notation: &lt;code&gt;f.x&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;ie &lt;code&gt;f.x&lt;/code&gt; is the Dijkstra form of the more usual &lt;code&gt;f(x)&lt;/code&gt; ie function call.&#xA;I could give justifications/explanations for the Dijkstra notation (if desired).&lt;/p&gt;&#xA;&lt;h3&gt;2. Algebraic Datatypes&lt;/h3&gt;&#xA;&lt;p&gt;Things like &lt;code&gt;L&lt;/code&gt;, &lt;code&gt;I&lt;/code&gt; are constructors of &lt;a href=&quot;https://en.wikipedia.org/wiki/Algebraic_data_type&quot; rel=&quot;nofollow noreferrer&quot;&gt;algebraic data types&lt;/a&gt;. The small notational wrinkle carrying a large semantic load here is tiny fact of &amp;quot;initial letter capital implies data constructor not normal function&amp;quot;.  For this Fortranism  — identical in my notation to Haskell — my embarrassed apologies .&lt;/p&gt;&#xA;&lt;h3&gt;3. Interactions&lt;/h3&gt;&#xA;&lt;p&gt;One interacts with the system by typing something at the &lt;code&gt;? &lt;/code&gt; prompt.&lt;br /&gt;&#xA;The system responds with a result (as any interpreter does). &lt;strong&gt;And its type&lt;/strong&gt;&lt;br /&gt;&#xA;Pedagogically this is a big deal: Types serve as a beginner cyclist's guide wheels&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The user almost never gives a type&lt;/li&gt;&#xA;&lt;li&gt;The system invariably responds with a type as if to say: &lt;em&gt;Your answer is this, and its type according to me is this.&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you (Victor) have some (standard) FPL preference, I can try moving to that... For now the Catalan example is shown also in Python&lt;/p&gt;&#xA;&lt;h1&gt;Combinatorics&lt;/h1&gt;&#xA;&lt;h2&gt;Catalan Numbers&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt; -- Implements the 3rd (or 2nd) interpretation from here&#xA; -- https://en.wikipedia.org/wiki/Catalan_number#Applications_in_combinatorics&#xA;  &#xA; ctype Tree a where&#xA;     I : Tree.t → Tree.t → Tree.t  -- I:  &amp;quot;Internal node&amp;quot;&#xA;     L : t → Tree.t                -- L:  &amp;quot;Leaf node&amp;quot;&#xA;  &#xA; c: ℒ.t → ℒ.(Tree.t)&#xA;&#xA; c.[x]  = [L.x]&#xA; c.ls   = [I.x.y | i ∈ [1...length.ls -1], (l,r) = splitAt.i.ls, x ∈ c.l, y ∈ c.r]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Example usage:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? c.[1,2]&#xA;[I.(L.1).(L.2)] : ℒ.(Tree.ℤ)&#xA;? c.[1,2,3]&#xA;[I.(L.1).(I.(L.2).(L.3)), I.(I.(L.1).(L.2)).(L.3)] : ℒ.(Tree.ℤ)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now if you see those 2 lines defining the Catalan enumerator &lt;code&gt;c&lt;/code&gt;.&#xA;And now see the definition from &lt;a href=&quot;https://en.wikipedia.org/wiki/Catalan_number#Properties&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia&lt;/a&gt;, you can see the closeness of the parallel&#xA;&lt;span class=&quot;math-container&quot;&gt;$$\begin{aligned}C_0 &amp;amp;= 1\\&#xA;C_{n+1} &amp;amp;= \sum_{i=0}^{n}C_iC_{n-i}\quad\text{for }n\ge 0\end{aligned}$$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;h3&gt;Catalan explanation&lt;/h3&gt;&#xA;&lt;p&gt;So the verbalization of catalan enumeration would go like this:&lt;/p&gt;&#xA;&lt;h3&gt;Trivial case&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;c&lt;/code&gt; for a singleton list is a singleton answer: just a L(eaf) node&lt;/p&gt;&#xA;&lt;h3&gt;Recursive case&lt;/h3&gt;&#xA;&lt;p&gt;For a list of greater than 1 element (called &lt;code&gt;ls&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Generate all &lt;code&gt;i&lt;/code&gt;s from &lt;code&gt;[1... length.ls -1]&lt;/code&gt;&#xA;More usually the &lt;code&gt;length.ls - 1&lt;/code&gt; may look &lt;code&gt;length(ls) - 1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;For each such &lt;code&gt;i&lt;/code&gt; split the list &lt;code&gt;ls&lt;/code&gt; at &lt;code&gt;i&lt;/code&gt;&#xA;Call the two halves &lt;code&gt;l&lt;/code&gt; and &lt;code&gt;r&lt;/code&gt;&lt;br /&gt;&#xA;1,2 Basically generate all &lt;em&gt;non-trivial ie non-empty splits of the input&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Generate all Catalan enumerations for &lt;code&gt;l&lt;/code&gt; (the &lt;code&gt;c.l&lt;/code&gt; recursive call) Likewise &lt;code&gt;r&lt;/code&gt;&#xA;Note these are LISTS of catalan enumerations internal-to-the-recursion generated&#xA;For each &lt;code&gt;x&lt;/code&gt; ∈ &lt;code&gt;l&lt;/code&gt;-part and each &lt;code&gt;y&lt;/code&gt; ∈ &lt;code&gt;r&lt;/code&gt;-part...&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Collect the node (at the head of the list comprehension) &lt;code&gt;I.x.y&lt;/code&gt;&#xA;(&lt;code&gt;I&lt;/code&gt; stands for internal node like  &lt;code&gt;L&lt;/code&gt; stands for Leaf)&lt;/p&gt;&#xA;&lt;p&gt;The telegraphic names like &lt;code&gt;L&lt;/code&gt; &lt;code&gt;I&lt;/code&gt; are for a reason: we make tree &lt;strong&gt;values&lt;/strong&gt; with them; that value making becomes clunky with &amp;quot;readable&amp;quot; so-called constructors. ie we want to decide &lt;em&gt;at which point&lt;/em&gt; to optimize readability.  The point of interaction called &lt;em&gt;interaction-with-the-REPL&lt;/em&gt; is by and large simply not available with a compiled language like C++/Java.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;Python equivalent of Catalan&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;def c(ls):&#xA;    if len(ls)==1:&#xA;        x = ls[0]&#xA;        return [('L',x)]&#xA;    else: &#xA;        r = range(1,len(ls))&#xA;        return [('I',x,y) for i in r for x in c(ls[i:]) for y in c(ls[:i])]&#xA;&#xA;def interm(ls):&#xA;    r = range(1,len(ls))&#xA;    return [(ls[:i], ls[i:]) for i in r]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Just load this up into python&lt;/li&gt;&#xA;&lt;li&gt;Try out &lt;code&gt;interm&lt;/code&gt; first to get the sense of &lt;em&gt;all non trivial splits&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;ie try first &lt;code&gt;interm([1])&lt;/code&gt;, &lt;code&gt;interm([1,2])&lt;/code&gt;, &lt;code&gt;interm([1,2,3])&lt;/code&gt; etc&lt;/li&gt;&#xA;&lt;li&gt;Finally try &lt;code&gt;c([1])&lt;/code&gt;, &lt;code&gt;c([1,2])&lt;/code&gt;, &lt;code&gt;c([1,2,3])&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h1&gt;Interpreter-n-Compiler&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt;ctype Exp where&#xA;   L :Int → Exp&#xA;   Add, Mul: Exp → Exp →Exp&#xA;&#xA;eval:Exp         → Int&#xA;&#xA;eval.(L.x)       = x &#xA;eval.(Add.e1.e2) = eval.e1 + eval.e2 &#xA;eval.(Mul.e1.e2) = eval.e1 * eval.e2 &#xA;&#xA;&#xA;ctype Instr where&#xA;   Opd: Int → Instr    -- Opd = OPeranD; it loads its arg onto the stack&#xA;   AddI, MulI: Instr&#xA;&#xA;compile: Exp        → ℒ.Instr&#xA;&#xA;compile.(L.x)       = [Opd.x]                            &#xA;compile.(Add.e1.e2) = compile.e1 ++ compile.e2 ++ [AddI]  &#xA;compile.(Mul.e1.e2) = compile.e1 ++ compile.e2 ++ [MulI]  &#xA;&#xA; &#xA;mac: ℒ.Instr → ℒ.ℤ → ℒ.ℤ&#xA;&#xA;mac. [].        stk    = stk                      &#xA;mac. ((Opd.x) :: is).stk      = mac.is.(x :: stk) &#xA;mac. (AddI :: is).(r::l::stk) = mac.is.(l+r::stk) &#xA;mac. (MulI :: is).(r::l::stk) = mac.is.(l*r::stk) &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Showing the interpreter run:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? eval.(Add.(L.3).(L.4))&#xA;7 : ℤ&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Then the compiler&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? compile.(Add.(L.3).(L.4))&#xA;[Opd.3, Opd.4, AddI] : ℒ.Instr&#xA;? compile.(Add.(L.3).(L.4))&#xA;[Opd.3, Opd.4, AddI] : ℒ.Instr&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Finally showing the output of the compiler given to the machine results in the top of the stack having same result as the interpreter&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? mac.(compile.(Add.(L.3).(L.4))).[]&#xA;[7] : ℒ.ℤ&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;Summary&lt;/h1&gt;&#xA;&lt;p&gt;The two lines definition of &lt;code&gt;c&lt;/code&gt; capture the essence of catalan numbers.&#xA;The 4 lines eval + 4 lines compile + 5 lines machine capture a semester's worth of compiler construction.&lt;/p&gt;&#xA;&lt;p&gt;One can of course keep fleshing out the details to one's taste.&lt;/p&gt;&#xA;&lt;p&gt;But the summary is a lynchpin to understanding&lt;br /&gt;&#xA;(in my understanding )&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Added Later&lt;/h2&gt;&#xA;&lt;p&gt;Since you're making some efforts into understanding this (combinatorics part) I made another more detailed explanatory &lt;a href=&quot;https://cseducators.stackexchange.com/a/7280/8837&quot;&gt;answer&lt;/a&gt; (hopefully!)&lt;/p&gt;&#xA;&lt;p&gt;It strongly distinguishes between&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;counting&lt;/em&gt; which must invariably be something from ℕ&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;enumerating&lt;/em&gt; which actually creates the entities being counted&lt;/li&gt;&#xA;&lt;li&gt;with the convention that if the first is &lt;code&gt;foo&lt;/code&gt; the second is &lt;code&gt;fooE&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What I've called &lt;code&gt;c&lt;/code&gt; here should (in this new convention) be &lt;code&gt;cE&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;And that &lt;code&gt;cE&lt;/code&gt; returns a list whose &lt;em&gt;length&lt;/em&gt; is the catalan number known in standard combinatorics accounts eg wikipedia&lt;/p&gt;&#xA;&lt;p&gt;After you get that I'll uniformly change the convention and remove this &amp;quot;Added later&amp;quot;&lt;br /&gt;&#xA;[It'd be rude to change a text notations while someone is reading!!&lt;br /&gt;&#xA;For now I've changed the confusing type &lt;code&gt;[a]&lt;/code&gt; to &lt;code&gt;ℒ.t&lt;/code&gt; ]&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-02-06T04:08:22.930" LastActivityDate="2022-02-06T04:08:22.930" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7269" PostTypeId="1" AcceptedAnswerId="7270" CreationDate="2022-02-02T13:16:01.113" Score="17" ViewCount="7997" Body="&lt;p&gt;I am a TA for an undergraduate CS module at university in the UK and was in charge of marking coursework. The assignment contains three parts: report, code and video presentation. I found that 10 students submitted code that was a bit too similar to some blog posts. I gave the students 0 for the programming assignment, and now they are complaining.&lt;/p&gt;&#xA;&lt;p&gt;For the first  complaint, I made a report containing screen shots of the students submission and the blog post. I also commented on how the assignment could be better, but now there is another student complaining. What if all the others complain too?&lt;/p&gt;&#xA;&lt;p&gt;This is my first time as a TA and the first time I have to deal with plagiarism. All communication between me and students goes through the lecturer. They complain to him, he passes on the message and replies to them based on what I say.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!&lt;/li&gt;&#xA;&lt;li&gt;How can I help the students improve rather than just say 'you got 0 for plagiarism'?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11620" LastActivityDate="2022-02-05T08:57:06.703" Title="What to tell students that plagiarised their programming assignment?" Tags="|programming|assessment|plagiarism|" AnswerCount="9" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7270" PostTypeId="2" ParentId="7269" CreationDate="2022-02-02T13:29:13.620" Score="24" Body="&lt;p&gt;As a TA you are working for a professor. They are fundamentally responsible for grading. It would have been better had you checked with the prof before assigning grades and getting advice. But what you did is reasonable.&lt;/p&gt;&#xA;&lt;p&gt;I think you are covered on proof, given that you took screen shots. But it is the prof who will decide on how to handle the complaints. If they behave well they will back you up, though possibly with accommodations. But let the prof decide, with your advice. Don't try to take too much responsibility for the outcome.&lt;/p&gt;&#xA;&lt;p&gt;Long term, the prof might think about not giving assignments that can be easily plagiarized, but that isn't your responsibility.&lt;/p&gt;&#xA;&lt;p&gt;As for helping them, they need a good and proper definition of plagiarism and and explanation of why it is wrong, both ethically and pedagogically. They have failed to learn something as well as crossed an ethical line.&lt;/p&gt;&#xA;&lt;p&gt;A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade.&lt;/p&gt;&#xA;&lt;p&gt;So, you need to bring it to the prof's attention. In some large classes with many TAs there is a &amp;quot;head TA&amp;quot;. In that case, bring it to them first as they likely have more experience than yourself.&lt;/p&gt;&#xA;&lt;p&gt;The complaints, themselves, those already posted and future ones, should be referred upwards also.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-02-02T14:54:02.127" LastActivityDate="2022-02-02T14:54:02.127" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7271" PostTypeId="2" ParentId="7269" CreationDate="2022-02-02T13:47:33.000" Score="29" Body="&lt;p&gt;While there are an infinity of ways to write code that accomplishes any task, in tasks simple enough for labs, there are usually only two to four &lt;strong&gt;reasonable&lt;/strong&gt; approaches for each step, and certain amounts of fluency in coding practice will tend to bring approaches even further in line.&lt;/p&gt;&#xA;&lt;p&gt;So, in a lab project that has, say, three essential steps to it, there will be something like eight to sixty-four reasonable approaches to the whole thing.  If even one of the steps only has two reasonable approaches, then you'll be down to sixteen reasonable approaches at the maximum.  You're well into the territory in which you should see some &lt;em&gt;very&lt;/em&gt; similar student responses, even if everyone is doing their own work.&lt;/p&gt;&#xA;&lt;p&gt;Even with a fairly complex prompt, there will be many students who take roughly the same approach to many portions of it.&lt;/p&gt;&#xA;&lt;p&gt;The person who copied the comments very obviously plagiarized, and I would pursue that with the professor with confidence.  However, I am personally reticent to wield the Plagiarism Hammer unless the proof is pretty incontrovertible for the reasons described above.  The video by the students is also evidence of thorough understanding, so you can use that to either strengthen or weaken your suspicions of cheating.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, of course, it is for your professor to decide whether to pursue these matters, and I hope that you alerted the professor to the matter right at the start.  If you haven't, talk to them right away.  They need to know about these issues before a student or parent goes off to a dean to complain about the class.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-02-02T13:47:33.000" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="7272" PostTypeId="1" AcceptedAnswerId="7273" CreationDate="2022-02-02T15:23:58.827" Score="5" ViewCount="154" Body="&lt;p&gt;Someone I follow on social media is a freshman at university in a non-technical major, but she has a required data science course using Python, pandas and Jupyter Lab. She requested help from her followers, I offered to help, and she accepted. We spent an hour or two and I helped her complete her assignment while trying to coach her on fundamentals as best I could, given the fact that she is a beginner at all of the technologies involved, plus programming in general. (The assignment was to load a CSV file into a data frame and plot it in a couple of ways to get different insights into the data.) She was very happy with the session and asked if I would agree to tutor her for pay for the rest of the semester, and she made it clear that she wanted help with her homework specifically. I'm a programming professional with a lot of experience in the technologies but no formal experience tutoring and no need for extra income. I agreed to tutor her.&lt;/p&gt;&#xA;&lt;p&gt;My question for the community is, how can I structure my tutoring so that she learns this subject and the sessions are not just me telling her how to do the assignment? Now that I have agreed to be her tutor I feel a responsibility to educate her and not just help her get better grades on her homework. Should I ask her to share her learning materials and assignments with me before her tutoring session? Should I give her readings to look at in preparation for our tutoring sessions? She is not passionate about computing, but if she is going to attain competency in this subject and do well on exams, she will need to fill in fundamentals of programming and of all these technologies, and doing this may not be what she wants from our tutoring sessions; I'm thinking she wants to come out of them with her homework done.&lt;/p&gt;&#xA;&lt;p&gt;Many thanks for any feedback!&lt;/p&gt;&#xA;" OwnerUserId="11621" LastActivityDate="2022-02-02T16:10:14.713" Title="Data science tutoring without just doing my student's homework" Tags="|programming|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7273" PostTypeId="2" ParentId="7272" CreationDate="2022-02-02T16:10:14.713" Score="4" Body="&lt;p&gt;So, I think that you're feeling trapped because you feel like there is a mismatch between her desires and your value.  If, indeed, what she's looking for is homework help, I don't believe that there is a satisfying way forward from your current mind-frame.&lt;/p&gt;&#xA;&lt;p&gt;I'd like to offer a slightly different lens, though, that might help you see your way to a different approach.  The way forward involves asking a new central question.&lt;/p&gt;&#xA;&lt;p&gt;The Central Question that you must ask yourself is, &lt;strong&gt;if we assume that she will never directly touch data science or programming again after college, what of value can she nevertheless glean from this course and from your time with her?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If your answer is &lt;em&gt;no value&lt;/em&gt;, then you are not seeing your own topic deeply enough.  There are central ideas of any field that can serve us well outside of that field.&lt;/p&gt;&#xA;&lt;p&gt;(Note that there is a deeper economy-of-brain notion here: we make use of the patterns &lt;em&gt;(think of a constellation of neurons and synapses)&lt;/em&gt; that we have developed to develop new patterns, even when the source of the the original brain-pattern isn't directly invoked.  That is how we learn!  This also means that the richer patterns of thought that we develop have an outsized impact on our later development, even if we don't realize that we are using them.)&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, your answer to the &lt;em&gt;central question&lt;/em&gt; should guide your approach.  Help her with the homework, but also help guide her towards meaningful connections to (and mental hooks into) the material that will help guide her thinking even outside of this field.&lt;/p&gt;&#xA;&lt;p&gt;In other words, since she is not interested in the topic for itself, instead try to curate a journey through some of the more meaningful implications of the topic that she can utilize for the rest of her life.&lt;/p&gt;&#xA;&lt;p&gt;Taken in this light, helping her with her homework becomes a more valuable proposition.  She does better in the course, learns it more deeply, and also learns how the topic can help her in the rest of her life.  You get to help someone, and have a reason to try to make deeper connections with your own field.&lt;/p&gt;&#xA;&lt;p&gt;Good luck with your tutee!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-02-02T16:10:14.713" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7274" PostTypeId="2" ParentId="7269" CreationDate="2022-02-03T02:59:47.123" Score="12" Body="&#xA;&lt;p&gt;I had had many years of industrial assembler experience before I did my degree, so the assembler module was a cakewalk for me, but a quagmire for my fellow students.&lt;/p&gt;&#xA;&lt;p&gt;I was prevailed upon to demystify the use of stacks and pointers and suchlike, so I used a spare room one day to explain the concepts. Obviously, I used examples.&lt;/p&gt;&#xA;&lt;p&gt;For a later assignment, a number of student made submissions using remarkably similar techniques and were individually interviewed by the academics who smelt plagiarism.&lt;/p&gt;&#xA;&lt;p&gt;Fortunately, when I learns 'em, they stays learned, so they were able to adapt the techniques they used to other scenarios that the academics proposed, proving that they actually knew the subject and weren't mechanically copying.&lt;/p&gt;&#xA;&#xA;&lt;p&gt;I'd say that it's up to the academics to conduct any investigation and execute any students or appropriate remedies where the plagiarism is proved. As a TA, my opinion is that your actions should be limited to drawing the attention of the academics to your suspicions.&lt;/p&gt;&#xA;" OwnerUserId="11625" LastActivityDate="2022-02-03T02:59:47.123" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7275" PostTypeId="2" ParentId="7269" CreationDate="2022-02-03T04:12:58.520" Score="8" Body="&lt;p&gt;There is a point where you should award some marks for the code being complete and producing the output. If the code is only part of the assessment and the student was not capable of writing it themselves, then the other elements are likely to be of low quality. It is reasonable to assume that &lt;em&gt;correct&lt;/em&gt; code in many cases &lt;em&gt;should&lt;/em&gt; look similar, so to award a &lt;em&gt;&lt;strong&gt;Zero&lt;/strong&gt;&lt;/em&gt; would mean you are certain that plagiarism or collusion has occurred, in which case you should have no problem defending your assessment.&lt;/p&gt;&#xA;&lt;p&gt;Most institutions would have a clear policy around plagiarism, if you have such a policy then when there is a dispute or challenge to your assessment on the grounds of plagiarism you need only to remind the students of the policy, that policy should guide you on both how it is detected and what the penalties are.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you do not have a policy on plagiarism, then be sure to establish one, even if it is a preference that might be hard to enforce, make it clear &lt;em&gt;before&lt;/em&gt; the assessment task that plagiarism and collusion are not going to be tolerated.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;One strategy to discourage plagiarism in programming is to encourage creativity, by requiring students to design their own models and scenarios and even the test harnesses to demonstrate certain techniques. It takes a lot of work, and you can't rely as much on automation for reviews, but even if the students source blocks of logic from SO or each other, if the models they are applying the logic to are unique then they will still have to understand the code to make it work.&lt;/p&gt;&#xA;&lt;p&gt;You can also complete an assessment over time, or turn submission into more of a folio of work, apart from making it easier to detect plagiarism as the complexity of the assessment content goes up, you can lower the bar in terms of effort required by the student, especially if there is a chance to complete the tasks during class times.&lt;/p&gt;&#xA;&lt;p&gt;As to how to help the students improve when they are caught out, give them the opportunity to re-submit, but this time give them a &lt;em&gt;different&lt;/em&gt; assessment item. With different requirements they can not simply re-write the syntax from the previous submission, they will be forced to think about it even if they are going to apply some or all of the code in the first assessment.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A simple trick here is to change the subject or topic of the content. This will actually help you identify if they understand the difference between encapsulating abstract concepts and the business domain concepts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Whilst facetious, it must be recognised that the point of learning is not to re-invent everything, but that we should continue to evolve and build upon established concepts. This is true for programming as much as other domains. The reality of how programming is applied in commercial contexts is that there is a lot of skill in locating and understanding the correct pattern or solution to apply to a logical problem domain and how to implement it correctly.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In layman's terms this is effective use of &lt;code&gt;Cut'n'Paste&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A good developer does not re-invent the wheel, they determine how to fit the a standard wheel implementation into their model.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I can't help but share &lt;a href=&quot;https://stackoverflow.blog/2019/12/19/what-senior-developers-can-learn-from-beginners/?cb=1&amp;amp;_ga=2.139093171.1049773760.1643802433-513005019.1591708658&quot;&gt;my favourite quote from Eric Lippert&lt;/a&gt;:&lt;br /&gt;&#xA;&lt;em&gt;The notion that programming can be principled — that we proceed by understanding the abstractions afforded by the language, and then match those abstractions to a model of the business domain of the program — is apparently never taught to a great many programmers. Rather, many programmers proceed as though they’re exploring an undiscovered country, and going down paths more or less at random and hoping they end up somewhere good, no matter how twisted the path is that gets them there.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It is true there may be a unique solution to every problem, the construct of institutionalized education is such that many problem statements used in assessments have been used before, so avoiding plagiarism from sites like SO would require your assessment criteria itself to unique. Try assessing Fizz-Buzz in a room of students with no external communications, depending on how you have taught the concepts there is likely to be a strong commonality in the style, layout and logical expressions utilised to produce the result. Programming is &lt;em&gt;very&lt;/em&gt; logical, just like mathematics there are &lt;em&gt;right&lt;/em&gt; answers and many that are clearly &lt;em&gt;wrong&lt;/em&gt;. But the processes used to work out the result will be influenced by the tuition and other experiences of the student, if all their experiences and learning is shared or taught from a common source, then it makes sense that the outcomes would be similar from students across a class or cohort.&lt;/p&gt;&#xA;&lt;p&gt;Although not very practical, to determine plagiarism, you should be looking for the personal quirks of one student to be reflected in the others, try comparing the mistakes or omissions, as opposed to the correct elements. Or the reverse, that the quirks of the submission are not consistent with any previous work from that same student. If in the other elements the student has demonstrated a genuine understanding of the code, and an ability to recreate it if given ample opportunity, then whilst you can disapprove of it, without stronger grounds or investigation it should be marked according to its content.&lt;/p&gt;&#xA;" OwnerUserId="11481" LastEditorUserId="11481" LastEditDate="2022-02-03T06:21:28.323" LastActivityDate="2022-02-03T06:21:28.323" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7276" PostTypeId="2" ParentId="7269" CreationDate="2022-02-03T11:22:34.133" Score="7" Body="&lt;p&gt;Students cooperate.  This should be encouraged.  The whole idea of stackexchange.com is cooperation.  And it is a very good idea.&lt;/p&gt;&#xA;&lt;p&gt;The problem is drawing the line between cooperation and plagiarism.&lt;/p&gt;&#xA;&lt;p&gt;My personal definition in cases like this hinges on the question &amp;quot;Has the student learned the lesson?&amp;quot;.  Yes means cooperation, no means plagiarism.&lt;/p&gt;&#xA;&lt;p&gt;So, if you have the manpower to spare, call in each suspect separately and ask them to explain their code.&lt;/p&gt;&#xA;&lt;p&gt;If they can explain it, they have cooperated.&#xA;If they can't, they have plagiarized.&lt;/p&gt;&#xA;&lt;p&gt;Note that this is not a code review.  It is a test to see if they understand their own code, and this should be made clear to them.&lt;/p&gt;&#xA;" OwnerUserId="1055" LastActivityDate="2022-02-03T11:22:34.133" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7277" PostTypeId="2" ParentId="7269" CreationDate="2022-02-03T18:16:43.950" Score="2" Body="&lt;p&gt;As TA you need to be aware of your end goal. Do you wish to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects.&lt;/p&gt;&#xA;&lt;p&gt;I would go this route only in cases of blatant and repeated offenses.&lt;/p&gt;&#xA;&lt;p&gt;I suggest solving the cases internally and turning them into teachable moments.&lt;/p&gt;&#xA;&lt;p&gt;Invite the suspected students one by one and explain that their solution looks suspiciously similar to a blog post. Ask them to explain the similarity. Of course, initially, all students will deny any wrongdoing. However, you can inquire about the details and ask them to expand their solution on the spot.&lt;/p&gt;&#xA;&lt;p&gt;One of three things will happen:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Their answers will expose the plagiarism. Punish them as you and your prof see fit.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;You will find that students indeed got overly inspired by the solution online, however their understanding of it matches the course objectives. Warn them about copying stuff from the internet and let them go.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There is nothing inherently wrong with using resources online to solve problems. Especially, in a field like CS. The issue is if they do it without much understanding.&lt;/p&gt;&#xA;&lt;ol start=&quot;3&quot;&gt;&#xA;&lt;li&gt;Your suspicions will be removed because there are only so many ways to solve the problem.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;In either case, update the assignment to minimize the chances that there is a solution online.&lt;/p&gt;&#xA;" OwnerUserId="11632" LastActivityDate="2022-02-03T18:16:43.950" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7278" PostTypeId="2" ParentId="7269" CreationDate="2022-02-03T20:23:09.327" Score="3" Body="&lt;h2&gt;How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!&lt;/h2&gt;&#xA;&lt;p&gt;For code, I've found Stanford's &lt;a href=&quot;https://theory.stanford.edu/%7Eaiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MOSS (Measure of Software Similarity)&lt;/a&gt; to be an extremely useful tool. It compares submissions based on similarities in the abstract syntax tree rather than at the text level, so it sees right through attempts to hide plagiarism by renaming variables and reordering functions.  It also lets you feed it any example or template code you provided the students, so you don't get a bunch of false positives for people who copied a few lines from the lecture slides.&lt;/p&gt;&#xA;&lt;p&gt;It's designed to detect plagiarism between students, rather than from online sources, but there's nothing stopping you from grabbing some sample code off the web and including it along with the regular submissions.&lt;/p&gt;&#xA;&lt;p&gt;The output will be a list of assignment pairs, sorted by similarity. You can then click on each pair to see the similar parts highlighted. It is, like all such tools, to be used to get a shortlist of assignments you need to look at more closely, rather than a substitute for for hand-checking. That said, the false positive rate was very low in my experience, and there was usually a big drop in similarity scores where the plagiarized assignments ended and the ones that used similar ideas began.&lt;/p&gt;&#xA;&lt;h2&gt;How can I help the students improve rather than just say 'you got 0 for plagiarism'?&lt;/h2&gt;&#xA;&lt;p&gt;If you want to give them the benefit of the doubt, you can tell them:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&amp;quot;If you use material you got from somewhere else, cite it. It doesn't matter if you rephrase it; if you use someone else's ideas, give them credit. Sometimes an idea is common knowledge and doesn't need to be cited, but you can't go wrong by erring on the side of citing (or by asking the TA or professor).&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;If your submission consists entirely of code you found on the web, and you cite it properly, you won't get a zero for plagiarism. You will get a zero because the assignment was to &lt;em&gt;write code&lt;/em&gt; and you didn't do that.&amp;quot;  (I failed to include this caveat once; you can guess what the results were.)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Having done so, if they still plagiarize, they're beyond help. Failure to know what constitutes plagiarism may be the fault of their grade school teachers who failed to explain it properly. If, knowing the definition, they still do it, it's a failure of ethics. Give them a zero and inform the professor so they can be sent to the academic misconduct board. It's hard not to feel bad if the consequences are severe, but dishonesty is harmful (or even dangerous) in science and engineering. Going easy on the cheater risks harming others. (This assumes that you're &lt;em&gt;certain&lt;/em&gt; they plagiarized. Throw the book at them if you can prove it, but keep the standards of proof high enough to eliminate false positives.)&lt;/p&gt;&#xA;" OwnerUserId="827" LastEditorUserId="827" LastEditDate="2022-02-03T20:42:50.527" LastActivityDate="2022-02-03T20:42:50.527" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7279" PostTypeId="2" ParentId="7269" CreationDate="2022-02-04T11:49:42.200" Score="2" Body="&lt;p&gt;Can you arrange a class with the Student, Lecturer and you. Let them write one of the program (simplest one) on a piece of paper.&lt;/p&gt;&#xA;&lt;p&gt;The students who can write it correctly without a code editor are the ones who understands the concept however lazy to write it all over again - we can somehow let them go with a good grade because the purpose of teaching them is complete.&lt;/p&gt;&#xA;&lt;p&gt;Those students who can't do are the one should get a Zero plus a self guilt that everyone now knows they copied their assignments without knowing a bit how it is done. I am sure they won't repeat the same thing again and you will not have to say them that &amp;quot;You copied the assignments&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="11640" LastActivityDate="2022-02-04T11:49:42.200" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7280" PostTypeId="2" ParentId="7266" CreationDate="2022-02-04T17:01:57.877" Score="1" Body="&lt;p&gt;My &lt;a href=&quot;https://cseducators.stackexchange.com/a/7268/8837&quot;&gt;other answer&lt;/a&gt; was a kind of trailer of how FP as a teaching strategy can be used in various areas.  Since OP showed an interest in combinatorics I've opened that up in greater detail below.&lt;/p&gt;&#xA;&lt;h2&gt;Combinatorics : Conspectus&lt;/h2&gt;&#xA;&lt;p&gt;To the lay-person combinatorics consists of some formula eg &lt;span class=&quot;math-container&quot;&gt;$n!$&lt;/span&gt; &lt;span class=&quot;math-container&quot;&gt;$\binom{n}{r}$&lt;/span&gt;&lt;br /&gt;&#xA;&lt;sub&gt; I will write it in the older style as &lt;span class=&quot;math-container&quot;&gt;${}^n\!C_r$&lt;/span&gt; so that making a &lt;code&gt;c&lt;/code&gt; function becomes straightforward map&#xA;&lt;/sub&gt;&lt;/p&gt;&#xA;&lt;p&gt;But where do these formulae come from??&lt;/p&gt;&#xA;&lt;h2&gt;Enumerative Processes&lt;/h2&gt;&#xA;&lt;p&gt;There are certain sets/lists/processes whose size/length/what-have-you are the context of these formulae&lt;/p&gt;&#xA;&lt;p&gt;To be more concrete:&#xA;Given set &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt; having &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; elements the powerset of &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt; is &lt;span class=&quot;math-container&quot;&gt;$\wp(S)$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\begin{aligned}\text{Where if} \quad \vert S\vert &amp;amp;= n\\     &#xA;\text{Then }\quad \vert\wp(S)\vert &amp;amp;= 2^n&#xA;\end{aligned}$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;In short combinatorics straddles two worlds:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;One where things like &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\wp(S)$&lt;/span&gt; etc live&lt;/li&gt;&#xA;&lt;li&gt;One where things like &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$2^n$&lt;/span&gt; live&lt;/li&gt;&#xA;&lt;li&gt;Mappings like the &lt;span class=&quot;math-container&quot;&gt;$\vert \cdot \vert$&lt;/span&gt; (size) function that steps from one to the other world&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Now a strange phenomenon: Clearly the second world &lt;em&gt;derives&lt;/em&gt; from the first, yet the second is formalized as the standard formulae of combinatorics the first remains more informal... pictures, descriptions, English text...&lt;/p&gt;&#xA;&lt;p&gt;What would it take to formalize the first world also and &lt;em&gt;from there&lt;/em&gt; the mapping to the second??&lt;/p&gt;&#xA;&lt;p&gt;IMHO it would be a better presentation of the combinatorial identities&lt;/p&gt;&#xA;&lt;h2&gt;Notational Notes&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;If the numerical function is &lt;code&gt;foo&lt;/code&gt;, I'll call the enumerative function &lt;code&gt;fooE&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The function call &lt;code&gt;foo.x.y&lt;/code&gt; can be written infix as&lt;br /&gt;&#xA;&lt;code&gt;x `foo` y&lt;/code&gt; :&#xA;With this, we can read &lt;span class=&quot;math-container&quot;&gt;${}^n\!C_r$&lt;/span&gt; &amp;quot;en-see-aar&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ℒ.t&lt;/code&gt; is the type List-of-t (t is an arbitrary type). &lt;code&gt;ℒ.ℕ&lt;/code&gt; etc are specific list types&lt;/li&gt;&#xA;&lt;li&gt;Its de-ASCII-ized eg &lt;code&gt;∈&lt;/code&gt; not &lt;code&gt;&amp;lt;-&lt;/code&gt;, &lt;code&gt;ℒ.t&lt;/code&gt; not &lt;code&gt;[t]&lt;/code&gt; etc. If someone actually gets round to &lt;a href=&quot;https://github.com/rusimody/gofer&quot; rel=&quot;nofollow noreferrer&quot;&gt;compiling it&lt;/a&gt; and trying out: please ask me! I can give literal running code if desired.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;Some examples&lt;/h2&gt;&#xA;&lt;h3&gt;1. Powerset of a set&lt;/h3&gt;&#xA;&lt;p&gt;If &lt;span class=&quot;math-container&quot;&gt;$S = \{a,b,c\}$&lt;/span&gt; then&lt;br /&gt;&#xA;&lt;span class=&quot;math-container&quot;&gt;$\wp(S) = \{\emptyset, a, b, c, ab, ac, bc, abc\}$&lt;/span&gt;&lt;br /&gt;&#xA;&lt;sub&gt;Dropping brackets and commas for obvious reasons! ie read &lt;span class=&quot;math-container&quot;&gt;$ab$&lt;/span&gt; as &lt;span class=&quot;math-container&quot;&gt;$\{a,b\}$&lt;/span&gt; &lt;/sub&gt;&lt;/p&gt;&#xA;&lt;p&gt;For a finite set of &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; elements, lets write &lt;code&gt;pE&lt;/code&gt; ie powerset enumerator&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pE :   ℒ.t → ℒ.(ℒ.t))&#xA;pE.     [] = [[]]&#xA;pE.(x::xs) = concat.[[s, x::s] | s ∈ pE.xs]&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It should be clear that pE starts with a singleton list&#xA;And at every stage its size doubles&lt;/p&gt;&#xA;&lt;p&gt;So that there is the clear correlation between &lt;span class=&quot;math-container&quot;&gt;$\wp(S)$&lt;/span&gt; &lt;em&gt;construction&lt;/em&gt; and &lt;span class=&quot;math-container&quot;&gt;$\wp(S)$&lt;/span&gt; size&lt;/p&gt;&#xA;&lt;p&gt;We can formalize this by actually writing &lt;code&gt;p&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;p :  ℕ  → ℕ   -- p is good ol power of 2&#xA;p.   0  = 1&#xA;p.(n+1) = 2*p.n&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Usage&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? pE.&amp;quot;abc&amp;quot;&#xA;[[], &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;ab&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;ac&amp;quot;, &amp;quot;bc&amp;quot;, &amp;quot;abc&amp;quot;] : ℒ.(ℒ.Char))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And defining identity:  &lt;code&gt;length.(pE.l)&lt;/code&gt; &lt;span class=&quot;math-container&quot;&gt;$=$&lt;/span&gt; &lt;code&gt;p.(length.l)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h3&gt;2. Combinations&lt;/h3&gt;&#xA;&lt;p&gt;Also known as the binomial coefficient &lt;span class=&quot;math-container&quot;&gt;${}^n\!C_r$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;But what exactly does it count??&lt;/p&gt;&#xA;&lt;p&gt;If &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt; is an &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;-set &lt;span class=&quot;math-container&quot;&gt;${}^n\!C_r$&lt;/span&gt; is the &lt;strong&gt;number&lt;/strong&gt; of all &lt;span class=&quot;math-container&quot;&gt;$r$&lt;/span&gt; length subsets of &lt;span class=&quot;math-container&quot;&gt;$S$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;But what are those (sub)sets &lt;strong&gt;themselves&lt;/strong&gt;? Lets make that explicit&lt;/p&gt;&#xA;&lt;p&gt;So here's the Pascal triangle — classic version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;1&#xA;1 1&#xA;1 2 1&#xA;1 3 3 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Pascal triangle showing the universal set from which the combinations are made for each row&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;1               ∅&#xA;1 1             a&#xA;1 2 1           ab&#xA;1 3 3 1         abc&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Above with the specific sets at each level made explicit&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;counts&lt;/th&gt;&#xA;&lt;th&gt;base set S&lt;/th&gt;&#xA;&lt;th&gt;all combs&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;1&lt;/td&gt;&#xA;&lt;td&gt;∅&lt;/td&gt;&#xA;&lt;td&gt;«∅»&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;1 1&lt;/td&gt;&#xA;&lt;td&gt;a&lt;/td&gt;&#xA;&lt;td&gt;«∅,{a}»&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;1 2 1&lt;/td&gt;&#xA;&lt;td&gt;ab&lt;/td&gt;&#xA;&lt;td&gt;«∅, {a, b} {ab}»&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;1 3 3 1&lt;/td&gt;&#xA;&lt;td&gt;abc&lt;/td&gt;&#xA;&lt;td&gt;«∅, {a, b, c} {ab, bc, ac} {abc}»&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The parallel between first and third column should be patent enough.&lt;br /&gt;&#xA;Lets anyhow capture that in a pair of functions: &lt;code&gt;cE&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cE : ℒ.t → ℕ → ℒ.(ℒ.t)&#xA;[]      `cE` (r+1) = []&#xA;xs      `cE` 0     = [[]]&#xA;(x::xs) `cE` r     = xs `cE` r ++ [x::y | y ∈ xs `cE` (r-1)]&#xA;&#xA;&#xA;c : ℕ → ℕ → ℕ&#xA;0     `c` (r+1) = 0&#xA;n     `c` 0     = 1&#xA;(n+1) `c` r     = n `c` r + n `c` (r-1)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Note that the &lt;span class=&quot;math-container&quot;&gt;$c$&lt;/span&gt; def is just the classic Pascal identity:&#xA;&lt;span class=&quot;math-container&quot;&gt;${}^{n+1}\!C_r  = {}^n\!C_r + {}^n\!C_{r-1}$&lt;/span&gt;. And &lt;code&gt;cE&lt;/code&gt; explains why that&lt;/p&gt;&#xA;&lt;p&gt;Usage:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;? 5 `c` 2&#xA;10 : ℕ&#xA;? [5 `c` i | i ∈ [0...5]]&#xA;[1, 5, 10, 10, 5, 1] : ℒ.ℕ&#xA;&#xA;? &amp;quot;abcde&amp;quot; `cE` 2&#xA;[&amp;quot;de&amp;quot;, &amp;quot;ce&amp;quot;, &amp;quot;cd&amp;quot;, &amp;quot;be&amp;quot;, &amp;quot;bd&amp;quot;, &amp;quot;bc&amp;quot;, &amp;quot;ae&amp;quot;, &amp;quot;ad&amp;quot;, &amp;quot;ac&amp;quot;, &amp;quot;ab&amp;quot;] : ℒ.(ℒ.Char)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So as for the relation between &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;pE&lt;/code&gt; likewise between &lt;code&gt;c&lt;/code&gt; and &lt;code&gt;cE&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;And the defining identity between &lt;code&gt;c&lt;/code&gt; and &lt;code&gt;cE&lt;/code&gt;: &lt;code&gt;length.(l `cE` r)&lt;/code&gt; &lt;span class=&quot;math-container&quot;&gt;$=$&lt;/span&gt; &lt;code&gt;(length.l) `c` r&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note the types:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;c&lt;/code&gt; takes 2 numbers (ℕ) &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;r&lt;/code&gt; and returns an ℕ&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cE&lt;/code&gt; takes a list (&lt;code&gt;ℒ.t&lt;/code&gt;) and an ℕ and returns a &lt;code&gt;ℒ.(ℒ.t)&lt;/code&gt; type list&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Philosophical Slant&lt;/h2&gt;&#xA;&lt;p&gt;The above is a foray into basic combinatorics.&lt;br /&gt;&#xA;And combinatorics is math!&lt;/p&gt;&#xA;&lt;p&gt;So there's a definite slant:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Math is the primary topic of this&lt;/li&gt;&#xA;&lt;li&gt;That it runs on a computer is secondary&lt;/li&gt;&#xA;&lt;li&gt;You could call it &lt;em&gt;executable math&lt;/em&gt; but note that...&lt;/li&gt;&#xA;&lt;li&gt;...  we need to stop thinking of programs as &lt;strong&gt;executing&lt;/strong&gt; and start thinking of them as calculators &lt;strong&gt;evaluating over sophisticated data structures&lt;/strong&gt;&lt;br /&gt;&#xA;vide &lt;a href=&quot;https://cseducators.stackexchange.com/questions/1090/how-should-the-paradigm-shift-associated-with-functional-programming-be-approach/7262#7262&quot;&gt;other answer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;(With nod to @ScottRowe) &lt;strong&gt;It's all about data; only peripherally about computation!&lt;/strong&gt;&lt;br /&gt;&#xA;And &lt;em&gt;function&lt;/em&gt;-al programming is a particularly inept description of it...&lt;br /&gt;&#xA;But we seem stuck with that term for now.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-02-05T13:16:04.760" LastActivityDate="2022-02-05T13:16:04.760" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7281" PostTypeId="2" ParentId="7269" CreationDate="2022-02-05T08:57:06.703" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;What to tell students that plagiarised their programming assignment?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://honesty.uark.edu/policy/index.php#sanction-rubric&quot; rel=&quot;nofollow noreferrer&quot;&gt;Where I went to school&lt;/a&gt;, one would tell the students, &lt;em&gt;&amp;quot;You have now received a grade of&lt;/em&gt; F &lt;em&gt;for this course. For this violation of the University's Academic Integrity Policy, you have been given 1.0 sanction points. An accumuation of 1.5 sanction points will result—depending on the circumstances—in your suspension or expulsion from this school.&amp;quot;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How can I prove plagiarism?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;At my school, the standard is Preponderance of Evidence, which means &lt;em&gt;&amp;quot;evidence...of greater weight...than evidence to the contrary&amp;quot;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So it's your evidence against theirs (and if they're relying on a 1-2% difference in word choices as their evidence, then I pity them).&lt;/p&gt;&#xA;" OwnerUserId="11643" LastActivityDate="2022-02-05T08:57:06.703" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7284" PostTypeId="2" ParentId="7154" CreationDate="2022-02-11T14:12:56.643" Score="6" Body="&lt;p&gt;One thing I haven't seen from any other answer: How much and what kind of math should be taught?&lt;/p&gt;&#xA;&lt;p&gt;I studied at a University where the CS is a small sidekick to the Math department. Basically all discussions about the CS curriculum revolved around the theme of what kind of math do CS student need. The mathematicians obviously (and in my opinion oblivious to real application) argued for more and more formal math. The CS people (with some backup from physicists chipping in) argued for a more streamlined, less formal, more application specific math classes.&lt;/p&gt;&#xA;&lt;p&gt;The math department usually came out on top and so I had to take classes in analysis, linear algebra, numerical analysis, statistics and formal logic with regular math students. A few years late in the advanced CS or engineering classes the profs complained that we couldn't actually use any of the math we learned.&#xA;No mathematician will actually show you HOW to solve differential equations, do FFT or Laplace transforms. They just prove that it is solvable...&lt;/p&gt;&#xA;" OwnerUserId="11138" LastActivityDate="2022-02-11T14:12:56.643" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7285" PostTypeId="2" ParentId="1090" CreationDate="2022-02-14T17:05:35.853" Score="2" Body="&lt;p&gt;In response to comments on the other &lt;a href=&quot;https://cseducators.stackexchange.com/a/7262/8837&quot;&gt;answer&lt;/a&gt;, I'll take a C running example:&lt;br /&gt;&#xA;To detect whether an unsigned number &lt;code&gt;x&lt;/code&gt; is a power of 2.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Using ideas from FP to move from one version to next&lt;/li&gt;&#xA;&lt;li&gt;Entirely staying within C as coding language&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;The Base C version&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;#define even(x) (((x) &amp;amp; 0x1) == 0)&#xA;int ip2(unsigned x)&#xA;{&#xA;  if (x==0) return false;&#xA;  while (even(x) &amp;amp;&amp;amp; x &amp;gt; 1)&#xA;    x &amp;gt;&amp;gt;= 1;&#xA;  if (x == 1)&#xA;    return true;&#xA;  else&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;a. Recursive Version&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2a(unsigned x)&#xA;{&#xA;  if (x==0) return false;&#xA;  if (x==1) return true;&#xA;  if (even(x))&#xA;    return ip2a(x&amp;gt;&amp;gt;1);&#xA;  else&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;b. Eliding the zero check&lt;/h2&gt;&#xA;&lt;p&gt;The zero case is odd and special; we'll come back to it later&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2b(unsigned x)&#xA;{&#xA;  if (x==1) return true;&#xA;  if (even(x))&#xA;    return ip2b(x&amp;gt;&amp;gt;1);&#xA;  else&#xA;    return false;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;c. Transforming &lt;code&gt;if-else&lt;/code&gt; to &lt;code&gt;?:&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Identity&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;if C&#xA;  return a;&#xA;else&#xA;  return b;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is equivalent to&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;  return C ? a : b;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2c(unsigned x)&#xA;{&#xA;  if (x==1) return true;&#xA;  return even(x) ? ip2c(x&amp;gt;&amp;gt;1) : false;&#xA;}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;d. Using identity connecting &lt;code&gt;?:&lt;/code&gt; to &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Identity&lt;/strong&gt;&lt;br /&gt;&#xA;For boolean &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;a ? b : false&lt;/code&gt; $\equiv$ &lt;code&gt;a &amp;amp;&amp;amp; b&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2d(unsigned x)&#xA;{&#xA;  if (x==1) return true;&#xA;  return even(x) &amp;amp;&amp;amp; ip2d(x&amp;gt;&amp;gt;1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;e. Remove C 'laziness'&lt;/h2&gt;&#xA;&lt;p&gt;Can we functionalize this further?&lt;br /&gt;&#xA;Notice that I've done the C programmer's typical laziness of avoiding writing an &lt;code&gt;else&lt;/code&gt; clause&lt;br /&gt;&#xA;Reintroducing&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2e(unsigned x)&#xA;{&#xA;  if (x==1)&#xA;    return true;&#xA;  else&#xA;    return even(x) &amp;amp;&amp;amp; ip2e(x&amp;gt;&amp;gt;1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;f. Re-apply &lt;code&gt;if&lt;/code&gt; to &lt;code&gt;?:&lt;/code&gt; transformation&lt;/h2&gt;&#xA;&lt;p&gt;This &lt;strong&gt;seemingly&lt;/strong&gt; more complex as in nested version is again amenable to the transformation above. [There's a lesson here!]&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2f(unsigned x)&#xA;{&#xA;   return x==1 ? true : even(x) &amp;amp;&amp;amp; ip2f(x&amp;gt;&amp;gt;1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;g. Using identity connecting &lt;code&gt;?:&lt;/code&gt; to &lt;code&gt;||&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Identity&lt;/strong&gt;&lt;br /&gt;&#xA;Analogous to the &lt;code&gt;?:&lt;/code&gt; to &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; we have for &lt;code&gt;||&lt;/code&gt;&lt;br /&gt;&#xA;For boolean &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;a ? true: b&lt;/code&gt; $\equiv$ &lt;code&gt;a || b&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2g(unsigned x)&#xA;{&#xA;   return x==1 || even(x) &amp;amp;&amp;amp; ip2g(x&amp;gt;&amp;gt;1);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Verbalization&lt;/h2&gt;&#xA;&lt;p&gt;Notice how smoothly this verbalizes:&#xA;For &lt;code&gt;x&lt;/code&gt; to be a power of 2&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Either &lt;code&gt;x&lt;/code&gt; is 1 (trivial case)... Or...&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;x&lt;/code&gt; is even and its half is also a power of 2&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;h. Stop??&lt;/h2&gt;&#xA;&lt;p&gt;At this stage we could stop...&lt;br /&gt;&#xA;But this is an infinite loop for &lt;code&gt;x==0&lt;/code&gt;!!&lt;br /&gt;&#xA;(We removed the zero check earlier remember??)&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2h(unsigned x)&#xA;{&#xA;  return x == 0 ? false : (x==1 || even(x) &amp;amp;&amp;amp; ip2h(x&amp;gt;&amp;gt;1));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;i. Again &lt;code&gt;?:&lt;/code&gt; to &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2i(unsigned x)&#xA;{&#xA;  return x == 0 &amp;amp;&amp;amp; (x == 1 || even(x) &amp;amp;&amp;amp; ip2i(x&amp;gt;&amp;gt;1));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;So...???&lt;/h1&gt;&#xA;&lt;p&gt;Q: So are you SERIOUSLY suggesting this way of writing &lt;code&gt;ip2&lt;/code&gt;?!?&lt;/p&gt;&#xA;&lt;p&gt;A: No this is not a serious suggestion of &lt;code&gt;ip2&lt;/code&gt;.&lt;br /&gt;&#xA;Nor is it a serious suggestion of recursion.&#xA;It is a serious suggestion of&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;how to use algebraic identities to transform programs into other equivalent programs&lt;/li&gt;&#xA;&lt;li&gt;And of giving the boolean type a more first class status. [O how I miss Pascal!]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All of which is about the possibility that whatever the language one needs to use, functional thinking is applicable.&lt;/p&gt;&#xA;&lt;h1&gt;¿Efficiency?&lt;/h1&gt;&#xA;&lt;p&gt;Yeah efficiency:&#xA;This is classic KaR C&#xA;No recursion; no loop;&lt;br /&gt;&#xA;Not just constant time; but just 3 operations!!!&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-C prettyprint-override&quot;&gt;&lt;code&gt;int ip2KaR(unsigned x)&#xA;{&#xA;  return (x &amp;amp; (x-1)) == 0;&#xA;}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you enjoy that look at the Henry Warren's book &lt;a href=&quot;https://en.wikipedia.org/wiki/Hacker%27s_Delight&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacker's Delight&lt;/a&gt;&lt;br /&gt;&#xA;Which is the above multiplied thousand-fold!!&lt;/p&gt;&#xA;&lt;p&gt;But believe me: For the beginning student worrying about efficiency before basics of semantics is invariably a wrong priority!&lt;br /&gt;&#xA;[My minority opinion of course!]&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-02-14T18:04:24.893" LastActivityDate="2022-02-14T18:04:24.893" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7286" PostTypeId="2" ParentId="17" CreationDate="2022-02-14T18:16:30.653" Score="2" Body="&lt;p&gt;You're working in an office. If a question comes up, the first person you consult is yourself. If the person to consult doesn't know the answer, they consult their manager, and upon receiving the answer pass it down the hierarchy again. Recurse until you have the answer.&lt;/p&gt;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ask( person from, person to ):&#xA;  if not: from knows the answer&#xA;     ask( from's manager, from )&#xA;  tell( from, to )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and invoke this with&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ask(me,me)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;(You still have to define &lt;code&gt;tell(from,to)&lt;/code&gt; and make sure that's a no-op if &lt;code&gt;from==to&lt;/code&gt;.)&lt;/p&gt;&#xA;&lt;p&gt;I like this example because it is not trivially iteratable as tail recursion. This explicitly goes up and down the stack.&lt;/p&gt;&#xA;&lt;p&gt;Next step: if you ask something of someone, you take out a notepad to record what they tell you. If that person doesn't know, they take out a notepad and ask further. Now you know where stack overflow comes from: there is a bunch of notepads open simultaneously, and they all take up some amount of memory.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-02-15T20:23:17.307" LastActivityDate="2022-02-15T20:23:17.307" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7287" PostTypeId="2" ParentId="4689" CreationDate="2022-02-14T18:26:47.790" Score="1" Body="&lt;p&gt;I don't think inheritance is terribly important so I don't spend much time on it.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;First I let students define a &lt;code&gt;Point&lt;/code&gt; class, which just contains two coordinate.&lt;/li&gt;&#xA;&lt;li&gt;Then they write a &lt;code&gt;Rectangle&lt;/code&gt; class, where a rectangle (axi-parallel) is constructed from point/height/width.&lt;/li&gt;&#xA;&lt;li&gt;The rectangle class has methods such as &lt;code&gt;area&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Then write a &lt;code&gt;Square&lt;/code&gt; class, constructed from only point/width.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;They need to figure out&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How to let the square constructor use the rectangle one, and&lt;/li&gt;&#xA;&lt;li&gt;See for themselves that the square immediately has an &lt;code&gt;area&lt;/code&gt; function, which it inherits.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;And that's about it for inheritance in my class. I give them some pretty stiff programming projects, and none of those really need inheritance.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-02-14T18:26:47.790" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7288" PostTypeId="2" ParentId="1090" CreationDate="2022-02-16T18:50:32.817" Score="0" Body="&lt;p&gt;Functional programming is mostly about unlearning bad habits. The best was it to not be taught them in the first place.&lt;/p&gt;&#xA;&lt;p&gt;You don't need to teach the more advanced bits to beginners. However also don't teach mutation.&lt;/p&gt;&#xA;&lt;p&gt;I teach python, but the examples that I give to the students have a functional style. I just avoid the bits of procedural, that should be tough much later. MUCH LATER after the student has learnt all of functional techniques.&lt;/p&gt;&#xA;&lt;p&gt;In structure and interpretation of computer programs, we are introduced to mutation in hour 20. After lists, inheritance, lambdas, etc, …&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-02-16T18:50:32.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7289" PostTypeId="1" CreationDate="2022-02-16T19:02:34.257" Score="33" ViewCount="11189" Body="&lt;p&gt;My students have been trained to use tools in the web-browser: cloud word-processors, web-sites, etc.&lt;/p&gt;&#xA;&lt;p&gt;When I try to teach programming on the computer: using programs that are on the local computer. They find it difficult.&lt;/p&gt;&#xA;&lt;p&gt;I do a demo. I then show the class one step at a time, what to do.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Close web-browser.&lt;/li&gt;&#xA;&lt;li&gt;Go to start menu, and open xyz program.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As I look around the room, one or two students at this step re-open the web-browser, and start attempting to follow the instructions there.&lt;/p&gt;&#xA;&lt;p&gt;What can I do about this? In terms of:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mitigation: what can I do to improve my instruction?&lt;/li&gt;&#xA;&lt;li&gt;Prevention: what can I do in the years leading up to this? Will it help?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Age: Key-stage 3 — Year 7 to 9 — age 11 → 14.&#xA;I am encountering the problem in Year 9.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="1293" LastEditDate="2022-08-10T15:53:54.023" LastActivityDate="2022-11-21T06:50:29.417" Title="Problems with students stuck in web-browser and what to do about it" Tags="|programming|best-practice|" AnswerCount="11" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7290" PostTypeId="2" ParentId="7289" CreationDate="2022-02-16T23:48:29.743" Score="0" Body="&lt;p&gt;The server and client world are getting ever more indistinguishable. Some programming languages pull dynamically libraries from the web during build. At the tender age of your students maybe not bother them with distinctions that are pretty vague. Meaning: let them use online programming tools.&lt;/p&gt;&#xA;&lt;p&gt;I know, not quite the answer you wanted.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-02-16T23:48:29.743" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7291" PostTypeId="2" ParentId="7289" CreationDate="2022-02-17T00:50:42.080" Score="50" Body="&lt;p&gt;In terms of instruction, especially at the beginning, I find it helpful to ask my students why I'm doing something at every step while demonstrating:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I'm going to open the start menu, why am I going to do that?&lt;/li&gt;&#xA;&lt;li&gt;I'm going to click xyz program, why am I going to do that?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Sometimes that leads down a rabbit hole of explanation, but ultimately it serves several purposes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;if nobody knows the answer as to why I'm doing it then I know it's something that requires more explanation&lt;/li&gt;&#xA;&lt;li&gt;if somebody knows the &amp;quot;wrong&amp;quot; information then it's a chance to correct it&lt;/li&gt;&#xA;&lt;li&gt;if somebody knows the correct answer it gets said out loud for all the other students to hear&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This approach has really helped me to address problems that I wouldn't have otherwise discovered, as it forces me to slow down on a task that I could normally just fly through, and I get immediate feedback every step of the way.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I also like to use categorisation exercises. The students I work with are older, but with that group I find that many of my students &lt;em&gt;do&lt;/em&gt; use desktop applications in their personal computer usage. I also find that 99% of the desktop applications they use are video games, but for a simple prompt like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;What do you do on your computer?&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;with hypothetical answers like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&amp;quot;Watch YouTube/Netflix&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;Play League of Legends&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;Play VALORANT&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;TikTok/Instagram&amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Could be put into categories like:&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th style=&quot;text-align: center;&quot;&gt;Web Applications&lt;/th&gt;&#xA;&lt;th style=&quot;text-align: center;&quot;&gt;Mobile Applications&lt;/th&gt;&#xA;&lt;th style=&quot;text-align: center;&quot;&gt;Desktop Application&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;YouTube&lt;/td&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;TikTok&lt;/td&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;League of Legends&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;Netflix&lt;/td&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;Instagram&lt;/td&gt;&#xA;&lt;td style=&quot;text-align: center;&quot;&gt;VALORANT&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Now, not everything can be categorised 100% neatly, but this type of activity can help to provide a frame of reference built upon the things they already use/are familiar with. Then you can put any future Desktop Applications that you're going to use in class into the &amp;quot;Desktop Application&amp;quot; column. This can help to solidify &lt;em&gt;why&lt;/em&gt; the desktop application is not online even if the understanding is limited to &amp;quot;because it's the same way I open X game&amp;quot;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;In terms of prevention, it can be very helpful to determine the initial source of misunderstanding or misinformation.&lt;/p&gt;&#xA;&lt;p&gt;People who interact with computers for a living often use (and talk about) computers differently than the &amp;quot;average&amp;quot; person. I have found many schools choose to move to a singular technology (because software is expensive). The potential exists that a lot of these students are learning how to interact with these programs from instructors who also don't understand the differences themselves.&lt;/p&gt;&#xA;&lt;p&gt;For example, we moved from the desktop application versions of the Microsoft Suite (like Microsoft Word) to Microsoft Office 365 several years ago. However, many of the non-computer faculty are still telling students &amp;quot;Open up Microsoft Word&amp;quot; by which they currently mean:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Open up a web browser&lt;/li&gt;&#xA;&lt;li&gt;Log into your Student Account&lt;/li&gt;&#xA;&lt;li&gt;Go to the Microsoft Office 365 Link&lt;/li&gt;&#xA;&lt;li&gt;Choose Word from the list of Virtual Applications&lt;/li&gt;&#xA;&lt;li&gt;Create a new document&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Beyond this, many of these courses &lt;em&gt;are&lt;/em&gt; entirely contained within a web browser (read: there is no reason to open any other desktop application to complete all of the work for the course). This sometimes results in faculty telling their students things along the lines of &amp;quot;You never need to open anything other than Chrome&amp;quot; (the web browser that is default on the student machines).&lt;/p&gt;&#xA;&lt;p&gt;Our student work stations are configured to empty various folders on log out. So students need to have their work saved to their cloud storage &lt;em&gt;not&lt;/em&gt; on the device itself. Because of this, many of my students are initially uncomfortable having files local to the machine (even temporarily) because they've been repeatedly taught that anything they save to the computer will be lost if it's not in cloud storage.&lt;/p&gt;&#xA;&lt;p&gt;I say all of this, not to push the issue onto other departments/teachers, but rather that it &lt;em&gt;is&lt;/em&gt; useful to know what misinformation the students have. It's good to know if there are students in the classroom who:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;believe they are going to get in trouble for exploring other parts of the computer than the web browser&lt;/li&gt;&#xA;&lt;li&gt;believe that opening the Office365 Word web application through their browser is what it means to open a desktop application&lt;/li&gt;&#xA;&lt;li&gt;believe that they should never save something to the computer itself for fear of losing it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you can determine exactly why opening the web browser is the default action for your students you will have an easier time in correcting the behaviour. In my experience, for some students it has been as simple as saying, &amp;quot;I know this is different than most of your classes, but in here you're allowed to do x, y, and z. If you break it we'll figure out how to fix it.&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="11624" LastEditorUserId="11624" LastEditDate="2022-02-17T14:24:09.160" LastActivityDate="2022-02-17T14:24:09.160" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7292" PostTypeId="2" ParentId="7289" CreationDate="2022-02-17T10:44:49.613" Score="6" Body="&lt;p&gt;You say:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Go to start menu, and...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;One thing I've noticed is that using the Microsoft Start menu is a bit odd. There is the Search box, but I always switch that off because it takes up space and isn't needed. You can and should literally click the icon then just start typing 'excel' or whatever. Yes, even though it looks like there is no place to type. This makes people's eyes cross and usually they refuse to do it.&lt;/p&gt;&#xA;&lt;p&gt;I basically don't use desktop shortcuts / icons anymore, I just type. I don't use menus or try to find anything in the system screens. So learning to type letters on nothing is unintuitive, but it's the Way.&lt;/p&gt;&#xA;&lt;p&gt;Similarly I gave up keeping bookmarks / favorites in the browser. I type a few letters and browser history shows it. In my workplace directory, 3 letters of someone's last name finds them.&lt;/p&gt;&#xA;&lt;p&gt;I gave in to the Microsoft default folder names long ago. I still don't like the Library concept though.&lt;/p&gt;&#xA;&lt;p&gt;So I just wonder if you lost your students at hello, er... Start?&lt;/p&gt;&#xA;" OwnerUserId="5349" LastActivityDate="2022-02-17T10:44:49.613" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7293" PostTypeId="2" ParentId="7289" CreationDate="2022-02-17T17:28:09.683" Score="19" Body="&lt;p&gt;I (thankfully) haven't had the problem you mention quite to the degree that you are having it, but I am seeing more and more of this issue with my students generally.&lt;/p&gt;&#xA;&lt;p&gt;My focus in this answer is practical: what you might actually do with your students.&lt;/p&gt;&#xA;&lt;p&gt;Instructionally, you've already found the weakness: they are unaware of where their computer ends, where the internet begins, and how an individual computer is partitioned and organized into &amp;quot;files&amp;quot; and &amp;quot;directories&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;So, my explanation to students would begin exactly there:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Hey folks, I know that all of our computers are connected to the internet, and we use apps, and some of them are on the internet, and some of them are on our computer, and some of them are some kind of mix.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The problem is that it's really hard to tell &lt;em&gt;where&lt;/em&gt; things are.  Today, we're going to focus on that, and in particular, we're going to talk about how the computer in front of you is organized.  It's actually a pretty simple system, but you're forgiven for not knowing.  Our modern computer ecosystem, with everything on the cloud, and phones organized into some kind of &amp;quot;apps&amp;quot; view, can make it very hard to see.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;So, the first thing I'm going to do is ask you to &lt;em&gt;disconnect from the wifi&lt;/em&gt;.  Get off the internet.  It feels funny, right?  Don't worry, you won't get hurt, and we'll all go back on in a few minutes.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is everyone off?  Excellent.  Now, you're looking at your computer, all by itself.  Are there still files on there?  Of course there are.  Let's take a bit of a look ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;What follows is a bit of a guided lesson on the idea of a root directory, sub directories, files, and the organizing principle that directories allow us to group things together, and sub-directories allow us to group together sub-groups of that stuff, and sub-sub-directories allow us ... and so on and so forth, fractally.&lt;/p&gt;&#xA;&lt;p&gt;Depending on the level of your students, I might steer clear of a command prompt for the first few minutes, or even for the first day.  Let them get used to finding things using the mouse and the system GUI before entering into a CLI.  The GUI allows them to &lt;em&gt;see&lt;/em&gt;, and that is a big advantage right now.&lt;/p&gt;&#xA;&lt;p&gt;Also, emphasize the &lt;em&gt;why&lt;/em&gt; of it all at every step.  &lt;em&gt;Why&lt;/em&gt; are things in directories?  &lt;em&gt;Why&lt;/em&gt; are some directories in other directories?  How does this help to organize the computer internally?  How does this help organize the student on the computer?&lt;/p&gt;&#xA;&lt;p&gt;After you've done directories and files, and come back around to the CLI equivalents, I'd connect back to the internet and talk briefly about the idea of a URL as something that answered the central problem at the beginning of the internet: &lt;em&gt;how can a computer find something that's NOT in its own directories?&lt;/em&gt;  The internet was built around getting to files, just like our directory structure!&lt;/p&gt;&#xA;&lt;p&gt;I wouldn't dwell here, explore it in any real depth, or expand on it much.  My goal, having already talked about directory heirarchies, would be to make Very Firm the distinction between &lt;em&gt;here&lt;/em&gt; and &lt;em&gt;elsewhere&lt;/em&gt;, and to make clear that all of it comes down to files, and how we can organize files so that they can be found.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-02-17T18:31:40.540" LastActivityDate="2022-02-17T18:31:40.540" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7294" PostTypeId="2" ParentId="7289" CreationDate="2022-02-17T17:51:43.983" Score="8" Body="&lt;p&gt;I think your students may have &lt;a href=&quot;https://www.npr.org/2019/10/31/774838891/its-a-smartphone-life-more-than-half-of-u-s-children-now-have-one&quot; rel=&quot;noreferrer&quot;&gt;more experience&lt;/a&gt; with &lt;em&gt;smartphones&lt;/em&gt; than with computers. So if you can explain it in cell phone terms, it may make more sense to them. The Start Menu is like the app drawer. The desktop is like the home screen. The taskbar is like swapping apps. Win+D is a shortcut to get to the desktop, like tapping the Home icon/dot/button on a phone.&lt;/p&gt;&#xA;&lt;p&gt;And if you can reduce steps, that will help as well. I suggest a permanent icon on the desktop, so this can be two steps: 1) Use Win+D to get to the Desktop (home screen). 2) Double click on the icon to launch the application.&lt;/p&gt;&#xA;&lt;p&gt;This doesn't solve the long term issues of having no idea how computers work, but exposure over time will at least help with that.&lt;/p&gt;&#xA;" OwnerUserId="1407" LastActivityDate="2022-02-17T17:51:43.983" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7295" PostTypeId="2" ParentId="7289" CreationDate="2022-02-17T19:01:53.403" Score="-1" Body="&lt;p&gt;A comment to my other Answer suggested that this would be useful information, but I felt it was tangential to that answer so here is another one.&lt;/p&gt;&#xA;&lt;p&gt;Consider that voice is becoming the default way to tell a computing device something, and for it to respond. Office 365 has Dictation built in, and it works well. Even children can now accidentally get their invisible pal to order things.&lt;/p&gt;&#xA;&lt;p&gt;In this situation, how would anyone know what is on their device, and why would they care? Perhaps we need to advance teaching beyond what we do now, to what people will be doing very soon?&lt;/p&gt;&#xA;&lt;p&gt;Humans have used primarily voice to interact with other beings since long before Cuneiform became the killer app 5000 years ago. It seems vastly the easiest way, and can be used while doing other things.&lt;/p&gt;&#xA;" OwnerUserId="5349" LastEditorUserId="5349" LastEditDate="2022-02-20T13:50:23.567" LastActivityDate="2022-02-20T13:50:23.567" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="7296" PostTypeId="1" AcceptedAnswerId="7299" CreationDate="2022-02-18T15:41:53.423" Score="2" ViewCount="594" Body="&lt;h2&gt;Videos tutorials&lt;/h2&gt;&#xA;&lt;p&gt;When I start learning C++ form video tutorials I grasp lot of concepts. But after some time I realize in this course that too many topics like (operator overloading, nested classes etc.) are missing or not clearly defend.&lt;/p&gt;&#xA;&lt;h2&gt;Documentation / Books&lt;/h2&gt;&#xA;&lt;p&gt;In this category, in my observation is that when I open some C++ random books or documentations like(Geek for Geek) there is almost every single thing that I want to learn through video tutorials.&#xA;But in my case, I think this is my problem... when I start learning some thing form these source like book or doc. I don't understand some points / topics .&lt;/p&gt;&#xA;&lt;h2&gt;Question&lt;/h2&gt;&#xA;&lt;p&gt;Which resource is best for learning (Computer science skills, programming etc. )&#xA;How to find best learning source as a beginner.&lt;/p&gt;&#xA;&lt;h2&gt;Beginner&lt;/h2&gt;&#xA;&lt;p&gt;When a beginner starts learning some new thing like programming language and they start learning form some random stuff and after some thing they realize I am just wasting my time, just like my case I haven't wasted my time but I think my concepts are not good / clear  and same situation happens. I saw my friends they start learning C++ after some time they leave  programming and I think they hate it.&lt;/p&gt;&#xA;" OwnerUserId="11579" LastEditorUserId="1293" LastEditDate="2022-02-18T15:57:43.320" LastActivityDate="2022-02-19T04:18:24.213" Title="Which resource is best for learning something new in computer science?" Tags="|self-learning|programming|secondary-education|active-learning|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7297" PostTypeId="2" ParentId="7296" CreationDate="2022-02-18T16:13:05.937" Score="7" Body="&lt;p&gt;It is interesting that you have tagged this question with &lt;a href=&quot;/questions/tagged/active-learning&quot; class=&quot;post-tag&quot; title=&quot;show questions tagged &amp;#39;active-learning&amp;#39;&quot; rel=&quot;tag&quot;&gt;active-learning&lt;/a&gt;, but none of the things you describe are actually active.&lt;/p&gt;&#xA;&lt;p&gt;Watching videos, no matter how good, or reading books is passive. What you need is to become more active in your learning, but it is difficult to do it on your own without guidance.&lt;/p&gt;&#xA;&lt;p&gt;The key to learning almost anything is reinforcement and feedback. Reinforcement comes when you do some things repeatedly so that your brain wiring changes. But it is possible to reinforce bad habits as well as good, hence the need for feedback in what you do.&lt;/p&gt;&#xA;&lt;p&gt;Combine the above with active learning and the implication is that you spend at least as much time doing exercises and, in CS, in programming, as you do in reading or watching video. Most books and some videos suggest exercises, but neither provides feedback. Even a provided answer key is a wobbly crutch unless you use it wisely and only after you have created some answers or programs.&lt;/p&gt;&#xA;&lt;p&gt;Also, learning the syntax and semantics of a language is insufficient to truly learn much of anything unless you are already a skilled programmer. The key is learning how to put the various bits and pieces to create something that is both correct and maintainable.&lt;/p&gt;&#xA;&lt;p&gt;If you absolutely can't find a human to guide you in your learning then a possibility is to find someone else like yourself and try to learn together. Challenge one another. Give each other feedback. Find books or whatever that have a lot of exercises or, more importantly, lots of difficult projects. Short programs may be needed at the beginning, but you have to learn to go beyond that.&lt;/p&gt;&#xA;&lt;p&gt;Learn something about testing, especially test-first development. Learn something about pair programming if you can find a partner. Find a challenging project. Learn something about design patterns.&lt;/p&gt;&#xA;&lt;p&gt;A simple computer simulator with an assembly language.&lt;/p&gt;&#xA;&lt;p&gt;A board game where the computer manages the game or even plays one side. Checkers, Chutes and Ladders, ...&lt;/p&gt;&#xA;&lt;p&gt;A dungeons and dragons world with People and monsters, things including magic things, and places including passages between them. It needn't even be graphical.&lt;/p&gt;&#xA;&lt;p&gt;An RPN calculator.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-02-18T16:13:05.937" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7298" PostTypeId="2" ParentId="7296" CreationDate="2022-02-18T17:19:59.940" Score="2" Body="&lt;p&gt;It is possible to learn from tutorial sites and youtube videos, but you have to be careful. For instance, I never open links to &amp;quot;geeks for geeks&amp;quot; because of the low quality. On the other hand, I recommended &amp;quot;C++ weekly&amp;quot; to you (there are over 300 episodes) which is made by an expert, and each video is very focused. &lt;code&gt;learncpp.com&lt;/code&gt; is also recommended.&lt;/p&gt;&#xA;&lt;p&gt;But as the author of several textbooks I'd say, find out what the recommended textbooks are in the field you are interested in, and then take the time to work your way through such a book. That was you get material in a logical progression and from a unified point of view.&lt;/p&gt;&#xA;&lt;p&gt;And then it depends on what field you are interested in. It's hard to say anything about &amp;quot;in computer science&amp;quot; in general.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-02-18T17:19:59.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7299" PostTypeId="2" ParentId="7296" CreationDate="2022-02-19T04:18:24.213" Score="8" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;&amp;quot;The problem with teaching yourself is that you have a great student, but a terrible teacher.&amp;quot;&lt;/em&gt; -- author unknown&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You've keyed into one of the primary problems of teaching yourself.  Without expertise, how do you know what to study in the first place?&lt;/p&gt;&#xA;&lt;p&gt;Buffy is absolutely right that building projects is vital to learning.&lt;/p&gt;&#xA;&lt;p&gt;I also wanted to share with you a textbook strategy for when you are forced to learn a new topic on your own.  A textbook is typically designed to give you a good representation of the basics of a topic.  In fact, outlining what the important areas of a topic &lt;em&gt;are&lt;/em&gt; is one of the most valuable things that a textbook does!&lt;/p&gt;&#xA;&lt;p&gt;However, textbooks can also be difficult to follow, particularly when you lack background knowledge in the field.  And when you get stuck, there is no one to ask.&lt;/p&gt;&#xA;&lt;p&gt;By contrast, Youtube videos and tutorials are often easy to follow, but they are also very narrow in scope, and they never give you a sense of whether you are seeing the larger picture.&lt;/p&gt;&#xA;&lt;p&gt;A reasonable way to get a solid foundation, then, to use a mix of different approaches taken in tandem.&lt;/p&gt;&#xA;&lt;p&gt;Find a textbook, and work through it, a bit at a time.  If there is something you don't understand, mark it and move on.  When you've read your fill, go back and look over what you've marked.&lt;/p&gt;&#xA;&lt;p&gt;Some of it will be clear to you on this second read, or based on information that came later in the book.  This is perfect!&lt;/p&gt;&#xA;&lt;p&gt;Some of it will still be unclear.  You now have your target for tutorials for the evening.&lt;/p&gt;&#xA;&lt;p&gt;Now, what this does it make sure that you have a solid, well-rounded foundation in an area, even without the benefit of a teacher.&lt;/p&gt;&#xA;&lt;p&gt;However, enthusiasm also counts for a lot in learning.  You are more likely to be able to follow through on learning about things you find interesting!  So don't be afraid to stray from the textbook to pursue interesting side-areas.  But when you've had your fill, come back to the textbook.  The textbook is what will make sure that your basic understandings are well-rounded and relatively complete.&lt;/p&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-02-19T04:18:24.213" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7300" PostTypeId="2" ParentId="7289" CreationDate="2022-02-19T14:50:48.847" Score="3" Body="&lt;p&gt;&lt;strong&gt;Start them with a command-line-only OS (on a real personal computer).&lt;/strong&gt; It gives them enough mental separation. Then you can approach things from below.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Also, teach them the basics of computing first&lt;/strong&gt;, before teaching them programming. Including the inner-platform effect (the software design anti-pattern that modern browsers are based on).&lt;/p&gt;&#xA;&lt;p&gt;Remember: They are clearly not computer users and only ever used fixed-function appliances that just happened to be implemented using a computer (which they never accessed or even could access). You’re basically surprised why a car driver opens the car door instead of getting below the car.&lt;/p&gt;&#xA;&lt;p&gt;Finally, if you meet a stubborn web disciple (like from the church of WhatWG), just point them to &lt;a href=&quot;https://copy.sh/v86/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://copy.sh/v86/&lt;/a&gt;. Preferably as a link that boots an image where Chrome is set to autostart, with the same link you just gave them set as the homepage. :D&lt;/p&gt;&#xA;" OwnerDisplayName="anon" LastActivityDate="2022-02-19T14:50:48.847" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7301" PostTypeId="2" ParentId="7289" CreationDate="2022-02-19T19:58:41.893" Score="0" Body="&lt;p&gt;One has to see the current state of the art; eg &lt;a href=&quot;https://consumer.huawei.com/sa-en/offer/huawei-super-device&quot; rel=&quot;nofollow noreferrer&quot;&gt;super device&lt;/a&gt;, which are connected or even foldable desktops. The actual difference is the file-system being used; unless they would understand the difference in between eg. a local &lt;code&gt;file://&lt;/code&gt; or &lt;code&gt;content://&lt;/code&gt; URI and a remote &lt;code&gt;https://&lt;/code&gt; URI, this all might be difficult to understand. A SSD and a local HTTP server could be used to demonstrate the difference. Then one can also show removal USB storage, etc. Offline mode also demonstrates the difference. One may have to teach the very basics, in terms of a) physical hardware and b) remote services. The behavior might stem from being used to eg. a Chromebook. See &lt;a href=&quot;https://www.oreilly.com/content/3-strategies-to-change-user-behavior/&quot; rel=&quot;nofollow noreferrer&quot;&gt;3 strategies to change user behavior&lt;/a&gt;. And the idea is not even completely wrong; &lt;a href=&quot;https://aws.amazon.com/cloud9&quot; rel=&quot;nofollow noreferrer&quot;&gt;AWS Cloud9&lt;/a&gt; might be an option. Or how about running a ChromeOS device in an Android emulator, just to show what it is?&lt;/p&gt;&#xA;&lt;p&gt;Directly letting them compare a local IDE with a cloud IDE would show the possibilities and limitations of each of the environments. I mean, one just would have to develop a teaching program which both kinds of students can apply; eg. instead of saying &amp;quot;open your local shell prompt&amp;quot; this would be &amp;quot;open your &lt;code&gt;gcloud ssh&lt;/code&gt; shell prompt&amp;quot; (in a browser window). Alike this, nobody would have to feel &amp;quot;wrong&amp;quot; for simply not knowing it any better and they could compare. Then one can start teasing them, eg. with commands that may work locally but not remotely, or the other way around (always two students, who can compare).&lt;/p&gt;&#xA;" OwnerUserId="11742" LastEditorUserId="11742" LastEditDate="2022-02-20T02:00:46.390" LastActivityDate="2022-02-20T02:00:46.390" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7302" PostTypeId="2" ParentId="7289" CreationDate="2022-02-23T13:28:14.590" Score="0" Body="&lt;p&gt;Depending on your classroom hardware, the most straightforward way it to get them coding in VS Code on a small Unity project.&lt;/p&gt;&#xA;&lt;p&gt;This demonstrates two things:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;File structure of a project&lt;/li&gt;&#xA;&lt;li&gt;Command line to build/debug the project&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You could use &amp;quot;Hello World&amp;quot; from the command line, but Unity will hook them b/c it's very visual and a game engine they recognize.&lt;/p&gt;&#xA;&lt;p&gt;Check out &lt;a href=&quot;http://coffeebreakcodes.com/sample-projects-unity/&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://coffeebreakcodes.com/sample-projects-unity/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="11770" LastActivityDate="2022-02-23T13:28:14.590" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7304" PostTypeId="2" ParentId="7289" CreationDate="2022-02-24T11:09:06.397" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;When I try to teach programming on the computer: using programs that are on the local computer. They find it difficult.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Then don't! I mean, knowing how to use programs on the local computer is certainly worthwhile, but if you're teaching them programming and they're &amp;quot;stuck&amp;quot; in a web browser, teach them how to code within a web browser.&lt;/p&gt;&#xA;&lt;p&gt;I find &lt;a href=&quot;http://gitpod.io&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://gitpod.io&lt;/a&gt; (which is available for free) immensely useful (don't worry, you don't actually need to know git to get started with it). It provides the student, within a few seconds, with a pre-built coding environment (which you, as the teacher, can customize using &lt;code&gt;.gitpod.yml&lt;/code&gt;), without making any assumptions about what kind of computer they have or what software is installed on it, other than &amp;quot;a reasonably modern browser&amp;quot;. It's a wonderful teaching tool - it allows students to spend less time on getting their environment set up just right (what if a subset of your students use a mac? linux? a chromebook? an older version of Windows? a Windows computer set up with an alternative shell, meaning there is no start menu?) and drops them right into, effectively, VS Code set up just-as-the-teacher-intended.&lt;/p&gt;&#xA;&lt;p&gt;You can have completely separate classes on &amp;quot;how to use a local computer&amp;quot;, which, amusingly, is also best accomplished using a virtual environment in the browser, to neutralize the differences between their computers.&lt;/p&gt;&#xA;" OwnerUserId="11779" LastActivityDate="2022-02-24T11:09:06.397" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7305" PostTypeId="2" ParentId="7289" CreationDate="2022-02-24T14:52:41.067" Score="3" Body="&lt;p&gt;As for your purpose - teaching to write programs, I would say, switch to a web based dev environment like &lt;a href=&quot;https://replit.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;repl.it&lt;/a&gt;.  This will allow your students to start making programs and learning your curriculum.  This should solve the immediate issue at hand.&lt;/p&gt;&#xA;&lt;p&gt;On to the &amp;quot;browser mindset,&amp;quot; and a long term fix, it sounds like there has been a major missing piece of instruction leading up your class.  I would guess there was no instruction on how to use a general purpose computer, (or at the very least, how to use Windows.)  Coving this topic would allow the children to understand that computers are used for more than just accessing the internet to consume content - something a few adults I know need help with.&lt;/p&gt;&#xA;" OwnerUserId="11781" LastActivityDate="2022-02-24T14:52:41.067" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7306" PostTypeId="1" CreationDate="2022-02-27T07:48:18.680" Score="2" ViewCount="122" Body="&lt;p&gt;I was tasked to help in the practical sessions of the Machine Learning course in my university, the plan was to give exactly the same materials as &lt;a href=&quot;https://www.coursera.org/learn/machine-learning&quot; rel=&quot;nofollow noreferrer&quot;&gt;this course&lt;/a&gt;. We should be teaching the assignments of this course as lab sessions.&lt;/p&gt;&#xA;&lt;p&gt;The main problem is that this course is being given as the main source for teaching ML in the university(lectures and lab session), I don't have any previous teaching experience but I personally think that it is better  to teach using some famous textbook like Ethem Alpaydin's Intro to ML book.&lt;/p&gt;&#xA;&lt;p&gt;I'm looking mainly for the pros and cons of both approaches if you have any experience with any(or both) of them.&lt;/p&gt;&#xA;" OwnerUserId="11797" LastEditorUserId="9847" LastEditDate="2022-02-27T16:25:16.797" LastActivityDate="2022-02-27T16:25:16.797" Title="ML Andrew Ng course as practical university course" Tags="|teaching-analogy|machine-learning|" AnswerCount="0" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7307" PostTypeId="1" CreationDate="2022-03-02T05:10:05.127" Score="6" ViewCount="4926" Body="&lt;p&gt;Today I saw a lot of C++ libraries and frameworks on &lt;a href=&quot;https://gitee.com/leslie_lee/awesome-cpp#awesome-cc&quot; rel=&quot;nofollow noreferrer&quot;&gt;Awesome C/C++&lt;/a&gt;. Now I am confused as to which should I learn, or does it depends upon my choice?&lt;/p&gt;&#xA;&lt;p&gt;I want to learn C++ libraries and frameworks, for GUI development, but I don't know which is beginner friendly.&lt;/p&gt;&#xA;" OwnerUserId="11579" LastEditorUserId="11823" LastEditDate="2022-03-16T17:49:45.253" LastActivityDate="2024-02-24T11:49:18.873" Title="Which C++ libraries and frameworks should I learn for GUI development?" Tags="|self-learning|secondary-education|c++|" AnswerCount="5" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7308" PostTypeId="2" ParentId="7307" CreationDate="2022-03-02T09:02:41.793" Score="9" Body="&lt;p&gt;I think it depends on the domain that you are using C++ for. There are a lot of libraries that you can learn how to use and then never use them in your life, but when you know exactly what you need then it is easier to find libraries that would help you.&lt;/p&gt;&#xA;&lt;p&gt;In general, I think it is a good idea to learn the standard template library (STL), it provides four components called algorithms, containers, functions, and iterators. I think most C++ programmers have used it at some point.&lt;/p&gt;&#xA;&lt;p&gt;You can also check the BOOST libraries, check their website &lt;a href=&quot;https://www.boost.org/&quot; rel=&quot;noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For other domains there are tons of libraries that you can learn, for various computer vision utilities you can learn opencv for example, for developing machine learning models you can learn tensorflow for example.&lt;/p&gt;&#xA;" OwnerUserId="11797" LastEditorUserId="11797" LastEditDate="2022-03-02T10:26:01.683" LastActivityDate="2022-03-02T10:26:01.683" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7309" PostTypeId="2" ParentId="7307" CreationDate="2022-03-02T18:09:06.973" Score="5" Body="&lt;p&gt;That's a very long list, and as others have said, you could burn a load of time and not ever use the knowledge. Also the list is 7 years since the last update, so it's hardly current. Quite a few of the things listed are niche - I haven't encountered them in 20 years working with C++ - or dead (broken links).&lt;/p&gt;&#xA;&lt;p&gt;As far as choosing a GUI toolkit goes, the objective advice is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pick something that runs in the environment you need to work in (don't learn Microsoft Foundation Classes if you want to run on a Mac).&lt;/li&gt;&#xA;&lt;li&gt;Pick something current and well supported (don't learn Microsoft Foundation Classes).&lt;/li&gt;&#xA;&lt;li&gt;Pick something well-known that you are likely to be able to use in the future.&#xA;Subjectively, I would suggest that QT, GTK+ or possibly WxWidgets are the three libraries likely to meet these requirements - but depending on the environment and licensing model that you want, you may disagree.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11817" LastActivityDate="2022-03-02T18:09:06.973" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7310" PostTypeId="2" ParentId="7307" CreationDate="2022-03-02T20:09:57.210" Score="5" Body="&lt;p&gt;As others said learning stl and getting a look at boost is probably a good idea. For Gui / rich clients, Gtk/QT/wx. But you asked for something to see on screen, you could look for graphics library, often used to make games. opengl/DirectX for low level, a bit more high sdl/sfml or go for full engines ogre3d...&lt;/p&gt;&#xA;&lt;p&gt;There is a lot of c++ libraries and as a self learning person, you will be guided by tutorials, you'll find on internet, so choose something you are interested in, something that you can run on the target and development device (portability), and something widely supported.&lt;/p&gt;&#xA;&lt;p&gt;In each case, you must compare each libraries to see wich one is the easiest to fullfill your goal, there is no global answer. In the case of Gui widget for example, i advise you to try at least 2 and see wich one better fill your need. try to do a demo application with Qt and gtk for example, see how thoses library are differents and weight your needs.&lt;/p&gt;&#xA;" OwnerUserId="11818" LastEditorUserId="11818" LastEditDate="2022-03-02T20:17:56.450" LastActivityDate="2022-03-02T20:17:56.450" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7311" PostTypeId="2" ParentId="7307" CreationDate="2022-03-03T05:39:51.383" Score="1" Body="&lt;p&gt;To call now popular microservices you need libjson-c and libcurl. It may be any other json library or framework, i believe for C++ rapidjson will be better, but curl has no options (libwebsockets?).&#xA;Also librdkafka (librdkafka++ for C++) to connect to Apache Kafka and libavro to describe data.&#xA;To understand how microservices work in general, you may wish to look into event libraries like libevent, libev, libuv. Some xml handling may be needed, this is done by libxml2 (if you are using oracle you can use oracle xdk).&lt;/p&gt;&#xA;" OwnerUserId="11820" LastActivityDate="2022-03-03T05:39:51.383" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7312" PostTypeId="1" AcceptedAnswerId="7315" CreationDate="2022-03-06T14:53:35.130" Score="3" ViewCount="452" Body="&lt;p&gt;Could any one suggest me a easy book to learn AT&amp;amp;T syntax of x86 assembly programming so that I can understand the code of xv6 OS better?&lt;/p&gt;&#xA;&lt;p&gt;Respected Ben. I. had suggested me this &lt;a href=&quot;https://en.wikibooks.org/wiki/X86_Assembly&quot; rel=&quot;nofollow noreferrer&quot;&gt;free book&lt;/a&gt;. But this is a wiki book and at places it shows:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/HLd6F.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/HLd6F.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since it is a community maintained book? And at places there are prompts of clean up, I guess the book contains everything correct. Because I am a self learner and I do not want to learn anything wrong.&lt;/p&gt;&#xA;&lt;p&gt;Is there any book easy book written by some author?&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2022-03-19T02:29:08.007" Title="Could any one suggest me an easy book to learn AT&amp;T syntax of x86 assembly programming so that I can understand the code of xv6 better?" Tags="|resource-request|architecture|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7313" PostTypeId="1" CreationDate="2022-03-09T22:05:46.610" Score="3" ViewCount="252" Body="&lt;p&gt;I'm not entirely sure if this is an international phenomenon, but every time I tutor students (Usually approximately age 14, and mostly without prior knowledge in programming) I ask myself the question I asked above.&lt;/p&gt;&#xA;&lt;p&gt;By block graphics I don't mean simple patterns on a screen, which could be seen as an algorithmic exercise, but complete borders, screen colors, menus etc.&#xA;Didn't they update their curricula for about two decades?&#xA;Do they want to teach thoroughly that the DOS-window and Windows use different encodings?&#xA;Any other ideas?&lt;/p&gt;&#xA;&lt;p&gt;If they would teach ncurses the students would learn some real-world software development by reading the documentation of a library and also they wouldn't learn something nobody would ever use in the real world.&lt;/p&gt;&#xA;&lt;p&gt;Another option would be to just skip user interfaces in DOS, which would definitely some saved time that could be &amp;quot;invested&amp;quot; in some other topics.&lt;/p&gt;&#xA;" OwnerUserId="8354" LastEditorUserId="204" LastEditDate="2022-04-13T23:21:39.997" LastActivityDate="2022-04-13T23:21:39.997" Title="Why are block graphics being taught? (either &quot;instead of ncurses&quot; or &quot;at all&quot;)" Tags="|c|gui|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7314" PostTypeId="2" ParentId="7313" CreationDate="2022-03-09T22:27:54.287" Score="3" Body="&lt;p&gt;I have not taught any of that myself, so I will not give a full-throated defense of the practice, but I will point to something you might not have thought of.&lt;/p&gt;&#xA;&lt;p&gt;The purpose of a lab assignment is typically to get students to understand and work with a series of concepts being taught in class.  That might mean that we focus on outdated technology, if the underlying learning goal is clearer there.&lt;/p&gt;&#xA;&lt;p&gt;When I teach students about the basics of assembly, program pointers, and stack pointers, I don't delve into x86 assembly.  It's too rich, too difficult, and (most importantly) obscures too many of the details I am trying to teach them.  Instead, I use 6502.  No one pretends that it's even remotely modern!  I'm not tricking my students into thinking that they're learning the cutting edge.  But the ideas that I am trying to get them to understand are there, on the surface, in a rich (and idea-rich) enough environment  that students can delve.&lt;/p&gt;&#xA;&lt;p&gt;Similarly, when I want to teach about manual buffer overflows, fuzzing, and shellcodes, I go back to a *nix virtual machine from the early 1990s, before there were stack protections.  My learning goals are best served when the activity is hard, but nevertheless approachable enough that they can have some success at it with a bit of focus and guidance.&lt;/p&gt;&#xA;&lt;p&gt;I never have to pretend that this is cutting-edge stuff, and the students never think that it is.  I content, instead, that this is an excellent environment to learn the fundamentals of what a buffer overflow attack is, and how it works in an environment that is (again) quite rich, but lacking any sort of modern stack protections.  I want them to do it by hand because I want them to really understand it, so I don't want those protections.&lt;/p&gt;&#xA;&lt;p&gt;When I teach students about processor architecture, I again head towards a fake model processor.  It's not that modern processors are uninteresting!  It's that they obscure the fundamental basics that I need to show them.  I use a fictional processor designed by some other teachers that put the fetch-execute cycle at the forefront, and have the students implement that.&lt;/p&gt;&#xA;&lt;p&gt;So, it could be that, as you say, the professors are simply being lazy.  Alternatively, it could be that the older system has educational benefits specifically because it does not do a lot of more modern stuff that obscures the concepts that the professor is trying to get students to understand.&lt;/p&gt;&#xA;&lt;p&gt;For more specific than that, you'd probably have to ask the teacher directly :)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-03-09T22:27:54.287" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7315" PostTypeId="2" ParentId="7312" CreationDate="2022-03-19T02:29:08.007" Score="3" Body="&lt;p&gt;Learn to Program with Assembly by Jonathan Bartlett (2021) is a great one.&lt;/p&gt;&#xA;&lt;p&gt;It teaches assembly programming for x86-64 processors using AT&amp;amp;T syntax and the GNU Assembler.  It's a follow up to his 2005 text, Programming from the Ground Up, on the same topic.&lt;/p&gt;&#xA;&lt;p&gt;I'm trying to learn AT&amp;amp;T syntax assembly as well, and I haven't found an equivalent text published in the last decade.&lt;/p&gt;&#xA;&lt;p&gt;Good luck&lt;/p&gt;&#xA;" OwnerUserId="11879" LastActivityDate="2022-03-19T02:29:08.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7316" PostTypeId="1" AcceptedAnswerId="7317" CreationDate="2022-03-25T19:32:11.233" Score="1" ViewCount="213" Body="&lt;p&gt;If a question (eg free response 2015 #3) has the following criteria:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;+1 Accesses all necessary elements of entries (No bounds errors) &lt;br&gt;&lt;br&gt;&#xA;+1 Returns identified value or returns 0 if no entry exists in entries with row index row and column index col&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;... and the student prematurely exits a loop with this common if-else return mistake:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for(SparseArrayEntry entry : entries) {&#xA;    if(entry.getRow() == row &amp;amp;&amp;amp; entry.getCol() == col) {&#xA;        return entry.getValue();&#xA;    } else { // mistake, loop will only ever run once&#xA;        return 0; // should do this return after loop&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Does the student lose both of the above points because 1) the premature return prevents accessing all necessary elements, and 2) a zero might be returned in spite of the fact an entry does exist.&lt;/p&gt;&#xA;&lt;p&gt;It feels like double jeopardy but I was hoping an AP grader or someone with more experience teaching the course could weigh in on the decision.&lt;/p&gt;&#xA;" OwnerUserId="2122" LastEditorUserId="2122" LastEditDate="2022-03-26T23:04:50.127" LastActivityDate="2022-05-11T16:26:59.087" Title="APCSA 2015 Q3, grading criteria" Tags="|ap-computer-science-a|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7317" PostTypeId="2" ParentId="7316" CreationDate="2022-03-26T03:32:05.310" Score="2" Body="&lt;p&gt;I am also not an AP Grader, though I have taught the class for well over a decade now, and I am pretty sure about this would be approached on the actual AP test.&lt;/p&gt;&#xA;&lt;p&gt;(If you pursue this further, and I do turn out to be wrong, please post a new answer with a correction.)&lt;/p&gt;&#xA;&lt;p&gt;There are two considerations:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;My understanding has been that every area of code is examined in isolation, and examined as if all of the code around it were good.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Furthermore, the first rubric point concerns itself with the loop, and the second point with the return.  This is a philosophical separation in addition to the code separation I outlined above.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;For both reasons, then, since the loop itself is fine, the student would receive that point.  However, the student would lose the second point, since they are returning the wrong answer much of the time.&lt;/p&gt;&#xA;&lt;p&gt;The reason for the separation of concerns in point 1 is because otherwise you get into sudden death scenarios where one small mistake brings you from 5 points on a large item to 0, since none of the items are ever actually fulfilled.  Such scores are clearly out of line with the work produced by the students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-03-26T03:32:05.310" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7318" PostTypeId="1" CreationDate="2022-03-26T11:04:49.320" Score="0" ViewCount="273" Body="&lt;p&gt;Fellow programmers. I am currently learning java and python in my Master's degree (introduction) and I did those languages 2 years ago. And when I revisited for the units I feel like I have basic understanding but the foundation isn't concrete and keep messing up syntaxes between languages. So I want to read a book that will actually help me grow.&lt;/p&gt;&#xA;&lt;p&gt;I thank you in advance for your recommendations :)&lt;/p&gt;&#xA;" OwnerUserId="11902" OwnerDisplayName="Syed Istiak Raihan" LastEditorUserId="1293" LastEditDate="2022-03-26T11:42:01.243" LastActivityDate="2023-05-03T12:30:26.997" Title="Best books for solid foundation build up for python and java" Tags="|self-learning|programming|java|python|" AnswerCount="3" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7319" PostTypeId="2" ParentId="7316" CreationDate="2022-03-28T13:43:43.853" Score="0" Body="&lt;p&gt;I don't educate on the AP level, but let me trot out one or two of my hobby horses^W^W things that I try to teach my students.&lt;/p&gt;&#xA;&lt;p&gt;One. I object to this code structure. Semantically, a loop serves to compute something, so you want a code structure&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int your_result;&#xA;for (whatever) { do something }&#xA;return your_result.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;By having the return in the loop you subvert this structure, conflating the loop and the surrounding function.&lt;/p&gt;&#xA;&lt;p&gt;I try to prevent this sort of construct by showing how to derive code by textual refinement. You go from&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// compute a result&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;result = compute_result()&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;to&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;function compute_result() {&#xA;    result = init;&#xA;    // do all tests&#xA;    return result;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;to the full code. (This principle of textual refinement also postpones introducing local variables to the last moment, so they automatically are in the correct scope!)&lt;/p&gt;&#xA;&lt;p&gt;Two. Loops that serve some test are (usually) either a for-all predicate or a there-is predicate. So, with the above structure, this is a there-exists problem:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;bool element_is_present = false;&#xA;for ( elements )&#xA;  if ( condition )&#xA;     element_is_present = true;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and then you can jump out of the loop prematurely because a single true test is enough for the conclusion. And then refine this loop to suit the problem.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-03-28T13:43:43.853" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7320" PostTypeId="1" CreationDate="2022-03-30T09:11:25.207" Score="10" ViewCount="6045" Body="&lt;p&gt;Why do we practice printing patterns while coding? Patterns like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;1&#xA;1 2&#xA;1 2 3&#xA;1 2&#xA;1&#xA;&#xA;1&#xA;2 3&#xA;4 5 6&#xA;7 8 9 10&#xA;11 12 13 14 15, etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Are these kinds of pattern questions just for fun and to get better at using loops, or are there any interesting applications of these types of pattern questions? Or any interesting math behind them?&lt;/p&gt;&#xA;" OwnerUserId="11914" LastEditorUserId="1314" LastEditDate="2022-04-02T04:58:50.747" LastActivityDate="2022-04-06T02:14:54.097" Title="Why do we practice printing patterns while coding?" Tags="|programming|exercises|" AnswerCount="8" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7321" PostTypeId="2" ParentId="7320" CreationDate="2022-03-30T10:54:36.983" Score="9" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Are these kinds of pattern questions just for fun and to get better at&#xA;using loops [...] ?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Absolutely yes. Practical applications of such patterns nearly don't exist. It's good training for control constructs like loops, and you can immediately see whether you got it right.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2022-03-30T10:54:36.983" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7322" PostTypeId="2" ParentId="7320" CreationDate="2022-03-30T17:37:31.477" Score="2" Body="&lt;p&gt;I let my students generate Pascal's triangle as a data structure. That's an exercise in loops.&lt;/p&gt;&#xA;&lt;p&gt;And then they have print the triangle modulo some number n: print a star when the entry modulo n is zero, a space otherwise. Instant fractals!&lt;/p&gt;&#xA;&lt;p&gt;So there you essentially need to generate screen output.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-03-30T17:37:31.477" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7323" PostTypeId="2" ParentId="7320" CreationDate="2022-03-30T19:16:53.290" Score="31" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Why do we practice printing patterns while coding?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Because bugs love to hide in &lt;a href=&quot;https://cseducators.stackexchange.com/a/4303/1401&quot;&gt;loops&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Talk students into using &lt;a href=&quot;https://softwareengineering.stackexchange.com/a/315968/131624&quot;&gt;loops&lt;/a&gt; to print these patterns and they will create bugs. Tracking down and squishing bugs in the confusing code this exercise produces is a skill that will last as long as their coding career.&lt;/p&gt;&#xA;&lt;p&gt;Fail to talk them into using loops and you'll find they very wisely write a bug free print statement for each line of your output. Which solves the problem without learning the lesson. Have a good explanation why this isn't preferred. Understand that you likely wont find a good technical explanation. Sometimes pros do the same thing. It's called loop unrolling.&lt;/p&gt;&#xA;&lt;p&gt;Don't claim loops are more flexible, efficient, or readable. They aren't. Loops just follow patterns. Sometimes they are a good way to express the pattern. Capturing a pattern in a loop gives you expressive power. It lets you create, manipulate, and display things that follow the pattern.&lt;/p&gt;&#xA;&lt;p&gt;This is an exercise in pattern recognition, loop construction, and debugging. Pull this off and I consider you a real coder.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;are there any interesting applications of these types of pattern questions?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Absolutely. They range from silly toys most often used in job interviews:&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fizz_buzz&quot; rel=&quot;noreferrer&quot;&gt;FizzBuzz&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;To beefy algorithms used to keep growing networks working:&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm&quot; rel=&quot;noreferrer&quot;&gt;Dijkstra's_algorithm&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;While they have wildly different applications, both really just manipulate numbers to follow a pattern.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="1401" LastEditDate="2022-03-30T21:37:57.520" LastActivityDate="2022-03-30T21:37:57.520" CommentCount="26" ContentLicense="CC BY-SA 4.0" />
  <row Id="7324" PostTypeId="2" ParentId="7320" CreationDate="2022-03-30T20:25:12.737" Score="1" Body="&lt;p&gt;Patterns are everywhere in programming, and pattern recognition is the skill that is often so noticeably absent in fresh grads. They would often prefer to copy and paste code ad infinitum rather than recognize a pattern and avoid repetition through better design, inheritance, modularity, decorators, etc. Good question.&lt;/p&gt;&#xA;" OwnerUserId="11915" LastActivityDate="2022-03-30T20:25:12.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7325" PostTypeId="2" ParentId="7320" CreationDate="2022-03-31T12:59:12.197" Score="2" Body="&lt;p&gt;I think examples like these&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-text prettyprint-override&quot;&gt;&lt;code&gt;1&#xA;1 2&#xA;1 2 3&#xA;1 2&#xA;1&#xA;&#xA;1 &#xA;2 3&#xA;4 5 6&#xA;7 8 9 10&#xA;11 12 13 14 15 etc.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;serve different purposes, e.g.:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Recognize or derive a construction (input)pattern from the optical (output) pattern&lt;/li&gt;&#xA;&lt;li&gt;Numbers are probably the most primitive example of unique absolutely order-able items&lt;/li&gt;&#xA;&lt;li&gt;It's probably rather easy to verify whether the solution is correct (comparing outputs)&lt;/li&gt;&#xA;&lt;li&gt;the human brain is rather good detecting and recognizing patterns&lt;/li&gt;&#xA;&lt;li&gt;Adding details like fancy strings instead of simple digits will just hide the essential structure&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;BTW: The first example is a stack where elements are popped from the right, while the second example is a stack where elements are popped at the left ;-)&lt;/p&gt;&#xA;" OwnerUserId="11293" LastActivityDate="2022-03-31T12:59:12.197" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7326" PostTypeId="2" ParentId="7320" CreationDate="2022-03-31T16:12:08.250" Score="6" Body="&lt;p&gt;I was skeptical about this as well. Those pictures feel like a cheesy attempt to make programming cool, from an era when that meant ASCII graphics; or the sort of cutsie junk we need to keep the attention of non-majors. But I've come around to realize they're nice teaching examples of nested loops, at a few levels.&lt;/p&gt;&#xA;&lt;p&gt;The way nested loops work isn't obvious. Showing how &lt;code&gt;for i=1 to 8; { for j=1 to 5; print &amp;quot;*&amp;quot; }&lt;/code&gt; actually prints 40 stars (and not 13) is helpful. Adding the newline for that 8x5 box is a nice way to visualize how the loops run.&lt;/p&gt;&#xA;&lt;p&gt;Making a silly right triangle with &lt;code&gt;for i=0 to 7; for j=0 to i&lt;/code&gt; introduces the idea of using the outer loop variable to influence the inner loop. That's an idea we'll need later for O(&lt;span class=&quot;math-container&quot;&gt;$n^2$&lt;/span&gt;) selection and insertion sorts. Different patterns allow us to use i in different places &lt;code&gt;j=i to WIDTH&lt;/code&gt; (right-triangle on right edge) or even both sides -- &lt;code&gt;j=i to WIDTH-i&lt;/code&gt; (pyramid).&lt;/p&gt;&#xA;&lt;p&gt;More complex things, pyramids or X's or a hollow square, are nice practice with 0-based index math -- how i runs from 0 to HEIGHT-1 and how to plug that into &lt;code&gt;j&amp;lt;HEIGHT-i&lt;/code&gt; to reason about the length of the 1st and last row. Off-by-one errors are very easy to spot in these pictures.&lt;/p&gt;&#xA;&lt;p&gt;All of this is nice for ComSci majors who'll need to be good with this stuff for their algorithms classes. But even for an aspiring web developer in a 2-year program, these are a quick warm-up for creating a table, before adding all of the mark-up.&lt;/p&gt;&#xA;&lt;p&gt;Coding note: the examples change a little for console vs. graphical system, but not the essence. If printed on a simple console, sometimes the inner loop must run 0 to WIDTH, with the interesting part inside. Ex: &lt;code&gt;if(i&amp;lt;WIDTH-j) ch=&amp;quot; &amp;quot;; else ch=&amp;quot;*&amp;quot;;&lt;/code&gt;. Whereas with a graphical system, the inner loop can do the work: &lt;code&gt;j=WIDTH-i to WIDTH; colorBox(i,j)&lt;/code&gt;. Or on a console we can fake that by &amp;quot;printing&amp;quot; into a 2D array which a function displays later.&lt;/p&gt;&#xA;" OwnerUserId="8773" LastEditorUserId="8773" LastEditDate="2022-04-01T01:41:10.760" LastActivityDate="2022-04-01T01:41:10.760" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7328" PostTypeId="1" CreationDate="2022-04-01T07:20:18.343" Score="8" ViewCount="303" Body="&lt;p&gt;As an experienced programmer and frequent user of Stack Overflow, I often run into this problem. I try to tell people calmly to read the documentation for whatever it is they are trying to use - but this often doesn't resolve the issue even when it seems like it ought to. Sometimes a direct link is needed (with an anchor to the appropriate part of the page); perhaps a relevant quotation, or even my own rephrasing or explanation.&lt;/p&gt;&#xA;&lt;p&gt;Because I'm accustomed to doing my own research, and to the actual process of reading and understanding documentation, I'm often a little mystified here. I get the suspicion that common &amp;quot;documentation-ese&amp;quot; writing conventions are just not intuitive for a lot of people, whereas I've become so accustomed to typical documentation writing style that I don't notice any issues.&lt;/p&gt;&#xA;&lt;p&gt;Am I correct in my suspicion, for example, that new students commonly get confused because they don't know how to parse the usual descriptions of a function signature (e.g. with optional parameters in square brackets, the special meaning of &lt;code&gt;...&lt;/code&gt;, the way that Python documentation used &lt;code&gt;/&lt;/code&gt; to separate positional-only arguments for C-level functions even before native Python support was added for them...)? If so, are there resources that explain this sort of thing? I've evaluated many &amp;quot;learn to program with X as your first language&amp;quot; books over the years, and I can't recall any that get into that material.&lt;/p&gt;&#xA;&lt;p&gt;What other things cause confusion? Is there something about, for example, the layout of a typical documentation page that inhibits students from drawing connections? Recently I got feedback complaining that some documentation didn't appear to &amp;quot;indicate what classes the methods come from&amp;quot; (which seems rather dubious, and which inspired me to ask the question).&lt;/p&gt;&#xA;&lt;p&gt;Knowing what needs to be mentioned, is any special approach needed to explain the task of reading documentation? Or should I think of it like any other subject? I have it in my long-term plans to write one of those learn-to-program books myself, and I'd like to break the mold by including something useful on the topic.&lt;/p&gt;&#xA;" OwnerUserId="11923" LastEditorUserId="11923" LastEditDate="2022-04-01T08:08:18.913" LastActivityDate="2022-04-07T23:05:18.520" Title="What things aren't obvious about reading documentation? How can I explain to others how to do it?" Tags="|documentation|conceptual-frameworks|" AnswerCount="7" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7329" PostTypeId="2" ParentId="7328" CreationDate="2022-04-01T13:02:46.350" Score="4" Body="&lt;p&gt;I have a partial answer, perhaps, as to why it is so hard for novices to learn from documentation. But the answer isn't universal and doesn't apply to all products/languages.&lt;/p&gt;&#xA;&lt;p&gt;There are some companies (I remember Sun Microsystems) that employ people to write documentation who are expert writers rather than expert geeks. They need to be able to talk to geeks and to write in such a way that the uber geeks agree is accurate, but their focus was on reader understanding. A friend of mine once did this for Sun.&lt;/p&gt;&#xA;&lt;p&gt;But there are other places in which the geeks themselves write the docs. There might be a lot of reasons for this and it might require the backing of a large company to do otherwise, but such documentation can fail users.&lt;/p&gt;&#xA;&lt;p&gt;I recently reviewed the documentation and tutorials for a product in development. The docs were written by the same folks that did the product. The problem was that in order to understand the documentation you also needed to already deeply understand the problem the product was trying to solve (not a novice attribute) as well as the basic overall UI that the product used. This was probably comprehensible to someone already deeply immersed in the problem space as well as having a lot of experience with similar UI structures.&lt;/p&gt;&#xA;&lt;p&gt;One of the reasons, perhaps, that you can get away with it is that you already have the background of the entire platform structure that novices don't have. So it is all &amp;quot;Greek&amp;quot; to them. (&amp;quot;Geek&amp;quot; to them??).&lt;/p&gt;&#xA;&lt;p&gt;A solution, though expensive, is to have different documentation for different experience levels. This is why textbooks exist, actually, and why clear explanation is so valued there. Professional level books are pretty much closed to novices before they go through the apprenticeship needed to grok it properly. And, I remember that after going through the three semester Calculus sequence in college, I then went through several semesters of Advanced Calculus and Analysis, where it became clearer.&lt;/p&gt;&#xA;&lt;p&gt;Few shortcuts to real learning, I'm afraid.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-04-01T13:02:46.350" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7330" PostTypeId="2" ParentId="7328" CreationDate="2022-04-01T13:13:41.640" Score="3" Body="&lt;p&gt;I don't believe there is anything special to reading documentation. As most things programming related, it's a bit of basic knowledge and a lot of experience. You obviously need a basic understanding of the language (or whatever the docu is about) and the &amp;quot;grammar&amp;quot; which is used for syntax, optional command line or function arguments and the like. But at my Uni this (along with more extensive formal grammar) was covered in the first semester.&lt;/p&gt;&#xA;&lt;p&gt;To put it another way: If I completed my 5 year CS degree without ever looking at documentation I wouldn't suddenly go &amp;quot;I'm not prepared for this&amp;quot; when handed my first manual.&lt;/p&gt;&#xA;&lt;p&gt;If I had to point out something it would probably be&lt;/p&gt;&#xA;&lt;p&gt;a) Documentation (apart from the most common languages) in my experiance is rated on a scale ranging from &amp;quot;patchy&amp;quot; to &amp;quot;non-existant&amp;quot;.&lt;br /&gt;&#xA;The people who wrote it are usually experts on the subject and rather spend their time being experts than write documentation for other people. So a lot of things get left out because either they are obvious to them (and not you) or they just don't have the time or feel like it. So reading documentation sometimes can be a bit of a guessing game. With more experience it get's easier to fill in the gaps.&lt;/p&gt;&#xA;&lt;p&gt;b) Even if patchy, documentation sometimes can be massive and feel intimidating. E.g. the reference manual for one of the smaller microcontrollers I'm using, has about 1600 pages. And that's only hardware. The programming manual is another 2000 pages. So you have to know exactly what you problem is and where to look.&lt;/p&gt;&#xA;&lt;p&gt;So if people are &amp;quot;lost&amp;quot; when reading documentation, I don't think it's because the are missing the vital &amp;quot;magic documentation reading skill&amp;quot; but it's rather a symptom of deeper issues with the problem or programming in general.&lt;/p&gt;&#xA;" OwnerUserId="11138" LastActivityDate="2022-04-01T13:13:41.640" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7331" PostTypeId="2" ParentId="7328" CreationDate="2022-04-01T13:14:43.287" Score="2" Body="&lt;p&gt;Documentations are written in a very specific format that follows certain rules. When were those rules explained to a person who starts learning programming?&lt;/p&gt;&#xA;&lt;p&gt;People look for patterns in order to manage in situations not entirely familiar to them. What patterns do documentations follow that new programmers are familiar with?&lt;/p&gt;&#xA;&lt;p&gt;I don't think there are many.&lt;/p&gt;&#xA;&lt;p&gt;The closest you can get is reading an encyclopedia or a dictionary, but not many people do that. What happens then if a person tries to find a definiton for a term they are unfamiliar with? They most probably simply google it. But what are they looking for and what is the best search result for them? One that uses that term in a familiar constructs. One that shows examples. One that consists of multiple explanations trying to present different points of view, so the person reading it can graps the topic as best and as easily as possible.&lt;/p&gt;&#xA;&lt;p&gt;Where do we find those elements in documentations?&lt;/p&gt;&#xA;&lt;p&gt;Now, think about what makes a given documentation &lt;em&gt;great&lt;/em&gt;. I am sure you have seen better and worse documentations. Try to think what disinguished those bad documentations from the good documentations.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes it's about examples. Sometimes it's about very specific terminology used. Many documentations fail to acknowledge the fact that they need to be &lt;em&gt;both&lt;/em&gt; accurate enough for an expert &lt;em&gt;and&lt;/em&gt; written in a language that is simple enough that an inexperienced user should be able to exctract information from it. This is extremely hard to do.&lt;/p&gt;&#xA;&lt;p&gt;So, to summarize, I believe that the initial problems with extracting information from a given documentation is a combination of unfamiliarity and complexity of the tool. Documentation &lt;em&gt;seems&lt;/em&gt; straightforward, but in reality it's really hard to create one that is both accurate and easy to understand.&lt;/p&gt;&#xA;&lt;p&gt;That's why I believe teaching how to read documentations and getting familiar with them should be a thing. It will just save so much time for everyone.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastActivityDate="2022-04-01T13:14:43.287" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7332" PostTypeId="2" ParentId="7328" CreationDate="2022-04-01T15:15:23.583" Score="4" Body="&lt;p&gt;I think that both of the posters so far (Fureesh and Buffy) have great insights.  I would only add one more piece I've observed from my own students.  It starts with the observation that most people don't particularly enjoy reading dry text, and will give up easily if it becomes impenetrable.&lt;/p&gt;&#xA;&lt;p&gt;I can't find it now, but I recall some literacy studies that suggest that kids start to give up on text if more than one in ten sentences are too hard.  Since I can't find it, take the number ten with a giant grain of salt.  What's important here is that there was &lt;strong&gt;a&lt;/strong&gt; number, and that it was possible to characterize motivation as a function of the percentage of non-understood items within the overall text.  What's also important is that adults aren't truly so different from kids.&lt;/p&gt;&#xA;&lt;p&gt;So, take a look at Oracle's documentation for &lt;a href=&quot;https://docs.oracle.com/javase/7/docs/api/java/lang/String.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java's String class&lt;/a&gt;.  It is, by my estimate, pretty excellent documentation.  It has nice text at the top that outlines the basics of the structure, a list of method calls, and then a write-up of each call.  It's very helpful, and I've referred to it many times over the course of my career.&lt;/p&gt;&#xA;&lt;p&gt;But now view it from the perspective of a real beginner who is just learning about Strings (think about how &lt;em&gt;beginner&lt;/em&gt; that is), and the entire document becomes very different.  We start with a bunch of totally impenetrable header stuff, like implemented interfaces.&lt;/p&gt;&#xA;&lt;p&gt;When we get to a text introduction, we start with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;The &lt;code&gt;String&lt;/code&gt; class represents character strings.&amp;quot;  All string literals in Java programs, such as &lt;code&gt;&amp;quot;abc&amp;quot;&lt;/code&gt;, are implemented as instances of this class.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So far ,that might be okay.  For the beginner, character isn't a fully fleshed-out concept, but... we might be able to deal with this.  And the next sentence is possibly excellent:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;All string literals in Java programs, such as &lt;code&gt;&amp;quot;abc&amp;quot;&lt;/code&gt;, are implemented as instances of this class.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Though, again, there are some large concepts that you need to understand before it makes &lt;em&gt;sense&lt;/em&gt;.  But it reads a bit like &lt;code&gt;&amp;quot;abc&amp;quot;&lt;/code&gt; is an example of String, and that's a comprehensible idea.&lt;/p&gt;&#xA;&lt;p&gt;Then, immediately:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Strings are constant; their values cannot be changed after they are created.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Wait, what?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;String buffers support mutable strings.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We're very lost now.  Is a string buffer a string?  Is that a reference to something else?  What is mutable, exactly?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Because String objects are immutable they can be shared. For example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    String str = &amp;quot;abc&amp;quot;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is equivalent to:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    char data[] = {'a', 'b', 'c'};&#xA;    String str = new String(data);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Well, that's confusing, not least because the &lt;em&gt;example&lt;/em&gt; doesn't appear to match with the sentence leading up to it.  But, for the beginner, we are now looking at a series of glyphs.  Just the line &lt;code&gt;char data[] = {'a', 'b', 'c'};&lt;/code&gt; has many, many concepts locked into it.  There is precious little chance of someone just learning about strings making heads or tails of that code.&lt;/p&gt;&#xA;&lt;p&gt;It honestly doesn't get much better as you head into the rest of the document.  For the beginner, the documentation is not at all helpful without a teacher to walk through it with them.&lt;/p&gt;&#xA;&lt;p&gt;I assume that most people had a similar experience to me with &lt;code&gt;man&lt;/code&gt; pages, and couldn't make sense of them until someone broke it down first.  Maybe other people didn't have those sorts of troubles, but I'm pretty sure that the norm is for people to find them very confusing at first.&lt;/p&gt;&#xA;&lt;p&gt;Anyway, consider, then, what is likely the early experience that learners will have with documentation.  It wasn't useful!  The early lesson, it seems, is that documentation is dense, full of needless foreign concepts, and not that helpful.&lt;/p&gt;&#xA;&lt;p&gt;The students will nevertheless go off and find other information that is more helpful.  After all, they still need to do whatever it is that they need to do.  Where do they go?  A friend, a YouTube tutorial, an article, whatever.&lt;/p&gt;&#xA;&lt;p&gt;It is perfectly natural, then, that as they develop, they continue to (a) go to the kinds of resources that they have found helpful in the past, and (b) therefore don't develop their skills in documentation comprehension.&lt;/p&gt;&#xA;&lt;p&gt;I think, then, that something like what you propose, with explicit guidance about how to deal with documentation for people at a more professional stage, could be very useful indeed, since at that point, they are more ready to deal with what they'll find there.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-04-01T15:15:23.583" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7333" PostTypeId="2" ParentId="7320" CreationDate="2022-04-02T07:55:20.943" Score="1" Body="&lt;p&gt;Most people understand the basis of numerical sequences and can see how one set of digits changes with each iteration.&lt;/p&gt;&#xA;&lt;p&gt;This makes numerical sequences a very good fit for teaching people iterations and iterations are usually done in a loop.&lt;/p&gt;&#xA;&lt;p&gt;The two examples you provide show two different types of loops. One appears to be sequential numbers, increasing by one digit for each line of the output, and the other repeats the same numbers, increases and then decreases the number of digits in the output.&lt;/p&gt;&#xA;&lt;p&gt;The display of those simple numerical digits are a lot easier to understand than my description.&lt;/p&gt;&#xA;" OwnerUserId="11933" LastActivityDate="2022-04-02T07:55:20.943" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7334" PostTypeId="2" ParentId="7328" CreationDate="2022-04-02T08:59:43.140" Score="4" Body="&lt;p&gt;In some cases, I suspect the problem may be that the student doesn't really &lt;em&gt;want&lt;/em&gt; to understand, they want to &lt;em&gt;do&lt;/em&gt; (e.g. complete the lab exercise or coursework).  Unfortunately these days there is an awful lot of code examples easily available on-line in tutorials and e.g. stack exchange, and it is often easier to search for existing code that is similar to your problem and cut-and-paste to get your program working.  Understanding the programming language and the documentation is often hard work as a learner and there isn't an immediate benefit from making that effort (but very large benefits much later on).  I suspect that I wasn't very good with deferred rewards when I was a student, but I had the advantage of learning to program before the WWW existed, so I didn't have the option.  When I am teaching I try to emphasise the benefits of understanding what you are doing, rather than just trying to get it to work, but to some extent I think this is a life-skill that can only really be learned by experience.&lt;/p&gt;&#xA;&lt;p&gt;To answer the question more directly, the thing that may not be obvious to the student is &lt;em&gt;why&lt;/em&gt; being able read the documentation is an important skill worth learning, despite not being the fastest solution to the problem immediately facing them.&lt;/p&gt;&#xA;&lt;p&gt;I dread to think what effect &lt;a href=&quot;https://openai.com/blog/openai-codex/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codex&lt;/a&gt; and &lt;a href=&quot;https://copilot.github.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CoPilot&lt;/a&gt; will have on learning to program.  I'm not against the use of tools in programming, far from it, but tools for experts can get in the way of learning the fundamentals.  I'd be glad to hear of any work that has been done on this!&lt;/p&gt;&#xA;" OwnerUserId="11932" LastEditorUserId="11932" LastEditDate="2022-04-02T09:17:48.860" LastActivityDate="2022-04-02T09:17:48.860" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7335" PostTypeId="2" ParentId="5245" CreationDate="2022-04-02T09:59:05.243" Score="0" Body="&lt;p&gt;&amp;quot;and I began doing the work out of it on my own for fun.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;This is a &lt;em&gt;&lt;strong&gt;great&lt;/strong&gt;&lt;/em&gt; advantage for a programmer - you have your own motivation for doing it!  As well as teaching programming, I also have hobby programming projects that I do just for fun.  A lot of programming can only be learned by experience, so having the motivation to program is invaluable.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;(who can't even do math)&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Don't be too critical of your mathematics skills, you may find that at some point you find a programming task that needs more maths skills that you currently have and that gives you the motivation to improve your maths skills.  That was definitely true for me - I was not particularly good at maths when I was at school, but as I went through my undergraduate degree and my PhD I had to learn maths to do things I wanted to do (first electronics and then machine learning and signal processing).  Motivation is very important and often you just need to find it.&lt;/p&gt;&#xA;&lt;p&gt;For getting a job in programming, without having formal qualifications, then getting a portfolio of software that you have written (e.g. a GitHub repository) may be a way of demonstrating to employers what you can do.&lt;/p&gt;&#xA;&lt;p&gt;Another thing that may help is participating in large-scale open-source projects.  You can learn a lot by going through code written by experienced programmers and understanding why the code was written in the way it was.  You may also be able to make contributions to the project (e.g. tidying up code, bug-fixes or porting it to new environments).  One advantage of this for people with autistic spectrum disorders is that the communication tends to be via electronic forums, where terse, direct communication is perfectly acceptable and there tends to be less subtext than in face-to-face communication.  This may be good for confidence building and gaining experience in the team work and communication aspects of software construction.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastEditorUserId="11932" LastEditDate="2022-04-02T10:04:07.683" LastActivityDate="2022-04-02T10:04:07.683" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7336" PostTypeId="2" ParentId="7328" CreationDate="2022-04-03T05:30:33.000" Score="2" Body="&lt;p&gt;Documentation is to (e.g.) a stack overflow answer as a dictionary is to a textbook of english. (Or, put another way - by the logic of this question, english language SE would/should have very few questions.) Documentation has certain rules, yes, and these are mainly necessary because it is so compressed from a standard explanation. Instead of saying &amp;quot;The function takes in x, which is an integer which tells the function what power to raise the number to, as well as y, which is an optional boolean (i.e. true/false value) that ...&amp;quot; this all boils down to five or six words of documentation.&lt;/p&gt;&#xA;&lt;p&gt;Worse, this compression is accentuated by the use of jargon that a newer user likely isn't familiar with (e.g., 'bool' short for 'boolean' short for 'a value that can be true or false' - and this is all very abstract! if you haven't ever seen a use for a boolean value in programming, you'd sure have some questions at this). Also, much like a dictionary, the examples are brief, often unexplained, and at the bottom of the page.&lt;/p&gt;&#xA;&lt;p&gt;And further, using documentation requires that you know &lt;em&gt;what to search in the documentation&lt;/em&gt; in the first place! If you don't know what you don't know, documentation is a useless tool (see also the oft-mentioned problem on stack overflow of over-constraining what the answer must look like, as in, 'how do I sort this list in [xyz] way' instead of 'how can I best store this data'). For instance - I took Spanish in high school, and while I did own a Spanish-English dictionary, my use of it was sketchy at best because I did not know enough Spanish to tell whether I was conjugating the translated words properly, appropriately accounting for connotation, and so forth. (Spoiler: I almost certainly was not.)&lt;/p&gt;&#xA;&lt;p&gt;Together, all of this combines to create a tool that is useful if you already know what you're doing and need a reference, but almost actively detrimental if you do not know what you're doing.&lt;/p&gt;&#xA;&lt;p&gt;So, in terms of approaching how to use documentation with students, I think the answer is a combination of two things. First, don't advise defaulting to using documentation to solve your problems. I do think it's a bit amusing you brought up the Stack Overflow 'check the documentation!' thing, because while I do agree a decent percentage of the time that a google search would have helped everyone involved, there's also a decent percentage of the time that the OP was looking for the function that the documentation page linked references - that is, saying 'well just look at the documentation page for [function]!' is equivalent to saying 'well just check the oscilloscope manual!' when someone asks what &lt;em&gt;tool&lt;/em&gt; they should be using.&lt;/p&gt;&#xA;&lt;p&gt;To again overuse the dictionary-documentation analogy, when writing, I rarely check the dictionary if I'm looking for a word - I'll check thesaurus.com to find a word that's closer to the meaning and connotation I'm looking for, maybe check articles about similar topics to see what their word choice is like, and so forth. I rarely crack open a dictionary, because searching for a word that 'fits' would mean going from a to z, and I fall down enough rabbit holes as is. The first place I check when trying to solve a programming problem is ~80% of the time 'stack overflow how to [task] python.' If I have a question about a specific function, then I check the documentation.&lt;/p&gt;&#xA;&lt;p&gt;In terms of understanding documentation, I'd say your best strategy is likely to be looking at documentation pages for functions that the students &lt;em&gt;are&lt;/em&gt; familiar with, in order to explore documentation layout and have them find the pieces they know should be there. Alternatively, for a less-familiar function, cross referencing the documentation with Stack Overflow q&amp;amp;a for more contextualized examples, and also attempting running the function and messing around with the inputs is probably a good strategy. But also, a lot of the functions these students would likely be using might be better explained on YouTube or Stack Overflow! By the time they need documentation, there's a not insignificant chance they'll have gained the knowledge to understand it via programmer osmosis (a dangerous thing to assume, I'm aware).&lt;/p&gt;&#xA;" OwnerUserId="919" LastActivityDate="2022-04-03T05:30:33.000" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7337" PostTypeId="2" ParentId="7328" CreationDate="2022-04-05T02:13:58.693" Score="0" Body="&lt;p&gt;As I've heard it put: &amp;quot;Unix documentation is written in such a way that, when you finally figure it out for yourself, you can never say that it didn't say so in the first pace&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;This points to the fact that reading documentation is a different process from reading ordinary prose. For documentation you have to engage with the prose:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;you read it&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you think &amp;quot;that can never be true&amp;quot;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you try to think of a counter example&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;you read the documentation again to see why your example is wrong,&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;6 7 8 rinse and repeat.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This &amp;quot;struggle against the documentation&amp;quot; is frustrating and tiresome. Many people give up pretty early in the game.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="1067" LastEditDate="2022-04-07T23:05:18.520" LastActivityDate="2022-04-07T23:05:18.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7338" PostTypeId="2" ParentId="7320" CreationDate="2022-04-05T16:32:35.767" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Are these kinds of pattern questions just for fun and to get better at using loops, or are there any interesting applications of these types of pattern questions? Or any interesting math behind them?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;All of the above.&lt;/p&gt;&#xA;&lt;p&gt;Fun is important. If learners aren't having fun, they're likely to quit. As an educator working with young children to adults from all walks of life, I've seen a lot of folks lose interest in programming, often because (I suspect) they didn't see the magic and power in it. Sure, for some learners, jumping into business applications might feel more purposeful than playing with patterns, so there is audience-specificity here.&lt;/p&gt;&#xA;&lt;p&gt;There's something magical about loops and iterative processes in general. Being able to write a few lines of code and generate a pattern involves making the leap from 1 to 2 to 3 to an arbitrary &lt;code&gt;n&lt;/code&gt;. Generalizing code and figuring out which parts are dynamic (i.e. parameters and variables) is a critical skill in programming. These loops provide visual feedback for this process and allow students to iterate on naive, hardcoded attempts until they've generalized the logic.&lt;/p&gt;&#xA;&lt;p&gt;If you think of the characters on the screen as pixels, these nested loop exercises translate very well into computer graphics. I have a &lt;a href=&quot;https://cseducators.stackexchange.com/questions/349/what-program-follows-hello-world/7112#7112&quot;&gt;post&lt;/a&gt; on how you can animate these patterns. This is a useful teaching approach for languages other than Scratch and JavaScript that don't have a particularly easy way to make images and animations other than ASCII.&lt;/p&gt;&#xA;&lt;p&gt;ASCII text applications like this connect students to computer history while increasing their comfort working in the always-relevant terminal ecosystem. &lt;a href=&quot;https://en.wikipedia.org/wiki/ASCII_art&quot; rel=&quot;nofollow noreferrer&quot;&gt;ASCII art&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Interactive_fiction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Text adventures&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Creative_coding&quot; rel=&quot;nofollow noreferrer&quot;&gt;creative coding&lt;/a&gt;, &lt;a href=&quot;https://www.10print.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;10 PRINT&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/FIGlet&quot; rel=&quot;nofollow noreferrer&quot;&gt;Figlet banners&lt;/a&gt; and other console-based applications are just as fun and useful today as they've ever been. npm is chock full of packages for &lt;a href=&quot;https://www.npmjs.com/package/chalkercli&quot; rel=&quot;nofollow noreferrer&quot;&gt;animations&lt;/a&gt;, &lt;a href=&quot;https://www.npmjs.com/package/ora&quot; rel=&quot;nofollow noreferrer&quot;&gt;spinners&lt;/a&gt;, &lt;a href=&quot;https://www.npmjs.com/package/cfonts&quot; rel=&quot;nofollow noreferrer&quot;&gt;banners&lt;/a&gt; and &lt;a href=&quot;https://www.npmjs.com/package/chalk&quot; rel=&quot;nofollow noreferrer&quot;&gt;colors&lt;/a&gt; to create user-friendly command line tools for programmers.&lt;/p&gt;&#xA;&lt;p&gt;From a purely technical perspective, these exercises provide great opportunities for nesting conditions in loops, counting forwards and backwards, incrementing by something other than 1, understanding when &lt;code&gt;for&lt;/code&gt; vs &lt;code&gt;while&lt;/code&gt; is appropriate, getting comfortable with string manipulation and building up to arrays and functions. Given the fun factor and possibilities available, I don't think building an introductory course around ASCII patterns is a particulary absurd idea.&lt;/p&gt;&#xA;&lt;p&gt;In regards to math, there can be as much or as little of it as you want in making these patterns. Consider patterns in &lt;a href=&quot;https://en.wikipedia.org/wiki/Triangular_number&quot; rel=&quot;nofollow noreferrer&quot;&gt;triangular numbers&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Pascal%27s_triangle&quot; rel=&quot;nofollow noreferrer&quot;&gt;Pascal's Triangle&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Cellular_automaton&quot; rel=&quot;nofollow noreferrer&quot;&gt;cellular automata&lt;/a&gt;, for starters. For the right audience, integrating trigonometric functions like sine and cosine functions can provide a great extension of possibilities. &lt;a href=&quot;https://en.wikipedia.org/wiki/L-system&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fractals&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Fractal&quot; rel=&quot;nofollow noreferrer&quot;&gt;L-Systems&lt;/a&gt; can be fun to play with, given the right resolution and reasonably experienced coders.&lt;/p&gt;&#xA;&lt;p&gt;Finally, as an educator, puzzles like these offer a great source of assignments that are relatively difficult to find direct solutions for on the internet, potentially helping combat plagiarism. It's easy to communicate the deliverables by showing a few example runs and explaining that it should work on any &lt;code&gt;n&lt;/code&gt;. These problems are language-agnostic.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://codegolf.stackexchange.com/&quot;&gt;Code Golf SE&lt;/a&gt; has over 1000 posts in the &lt;a href=&quot;https://codegolf.stackexchange.com/questions/tagged/ascii-art&quot;&gt;ascii-art&lt;/a&gt; tag ripe for exploration. &lt;a href=&quot;https://www.codewars.com/kata/search?q=ascii&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codewars&lt;/a&gt; has a good deal of ASCII shape printing problems with test cases (disclosure: I consult for the company that owns Codewars).&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-04-06T02:14:54.097" LastActivityDate="2022-04-06T02:14:54.097" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7339" PostTypeId="1" CreationDate="2022-04-07T10:50:19.353" Score="12" ViewCount="2055" Body="&lt;p&gt;New Artificial Intelligence (AI) programming tools like &lt;a href=&quot;https://openai.com/blog/openai-codex/&quot; rel=&quot;noreferrer&quot;&gt;Codex&lt;/a&gt; and &lt;a href=&quot;https://copilot.github.com/&quot; rel=&quot;noreferrer&quot;&gt;CoPilot&lt;/a&gt; can (to some extent) generate code in different programming languages from natural language descriptions.  Obviously at the moment these AI tools are based on text matching and don't actually have any understanding of the specifications or the code, but can help in producing programs by eliminating some of the &amp;quot;boilerplate&amp;quot; programming tasks.  I am concerned that these tools will make learning to program more difficult as they do not encourage students to understand what they are doing, because the can generate the code for the sort of simple pedagogical/andragogical tasks we often use when teaching programming (it is bad enough that there are already solutions for these problems available on-line).&lt;/p&gt;&#xA;&lt;p&gt;I also wonder if these tools are likely to change the job market in ways that will affect admissions.  If these tools take a lot of junior programming jobs, and the job market will be focussed on senior programmers or programmers with specialist skills (e.g. hardware/OS or mathematics), that may limit interest in CS.&lt;/p&gt;&#xA;&lt;p&gt;Are there any solutions to encouraging students to really understand what they are doing when they can get the computer to generate the code for them?&lt;/p&gt;&#xA;" OwnerUserId="11932" LastEditorUserId="11932" LastEditDate="2022-04-07T11:44:38.873" LastActivityDate="2022-05-01T21:10:23.023" Title="What effect will AI tools like Codex and CoPilot have on teaching programming (and admissions)" Tags="|programming|artificial-intelligence|programming-environment|" AnswerCount="5" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7340" PostTypeId="2" ParentId="5451" CreationDate="2022-04-07T11:15:14.023" Score="0" Body="&lt;p&gt;Is programming being taught from an abstract perspective?  Some students when taught from an abstract perspective seem to treat statements as magic incantations that cause the computer to do something without seeing that there is an underlying structure to the language that is imposed by the nature of the hardware.  If students have some understanding of how computers actually work and how programming languages match up with capabilities of the hardware, then they are more likely to try and see underlying meaning in the statements comprising the program.  This will mean their underlying mental model will be more correct and their intuition about what will happen will be better.&lt;/p&gt;&#xA;&lt;p&gt;I don't think this is a problem with imperative langauges, but an abstract/practical issue.  Some students like an abstract perspective, others can't deal with it at all, so no &amp;quot;one size fits all&amp;quot; strategy will be effective.&lt;/p&gt;&#xA;&lt;p&gt;I like @buffy's suggestion to use testing, as to test effectively you need to be able to predict what the code &lt;em&gt;should&lt;/em&gt; do to make the test cases, which encourages students to understand the code.  Getting students to do bug fixing is also useful, as again that involves looking at code and trying to understand why it is doing what it is doing, in order to work out how to fix it.  The coursework I set for my second year university C++ class involves writing code, testing, bug fixing and refactoring, and it seems to work quite well.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-04-07T11:15:14.023" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7341" PostTypeId="2" ParentId="7339" CreationDate="2022-04-07T13:16:17.773" Score="11" Body="&lt;p&gt;There are two cases actually. One is programming education directed at the vocational market and the other is computer science education. The latter isn't really about programming.&lt;/p&gt;&#xA;&lt;p&gt;For the first case, if programming skills become obsolete then people will need to take up other things to get a job. They might not be computer related at all. Buggy makers still exist, but it is a niche market.&lt;/p&gt;&#xA;&lt;p&gt;For computer science education, on the other hand, the curriculum will change. It will still be necessary to produce programs in the early part of the curriculum, but different tools will be used, possibly AI tools. For the later part of the curriculum programming in some high level language will probably still be needed, just to drive the understanding of future academics. Algorithmic thinking will likely still be needed for a couple of generations minimum. Producing better AI tools will require deep understanding, some of it at least related to programming.&lt;/p&gt;&#xA;&lt;p&gt;There are relatively few places now where 360 assembly language is the first course taught as it was many years ago when that was the only available tool. Now we use higher level languages that permit a more abstract view of a program and we have compilers that translate the higher level constructs directly into machine code. An assembly language is probably taught somewhere, though, perhaps in an architecture course. The same will likely be true as we advance, with the lower level tools replaced by higher level ones, including AI.&lt;/p&gt;&#xA;&lt;p&gt;So, things will change, but not fundamentally for, I predict, quite a long time. I once met Joel Moses who predicted (around 1973 or so) that FULL AI was only about ten years away. And so it has remained ever since.&lt;/p&gt;&#xA;&lt;p&gt;All advances make the solution of harder problems more amenable to solution. As AI advances it should be the same.&lt;/p&gt;&#xA;&lt;p&gt;In truth, I find current AI to be a pretty restricted thing. One can solve certain sorts of problems, but the methods and results are pretty constrained, and often erroneous. It is difficult to trust a lot of AI, even things like neural networks if it can't give a verifiable explanation of how it arrives at its outputs. Too much of it fails that test. In particular, the driving data of a lot of AI is, itself, flawed and in ways we don't understand yet.&lt;/p&gt;&#xA;&lt;p&gt;A CS education is directed at more than practitioners. It is an exercise in changing the brain. Many bachelors graduates go into programming as a first task, but that isn't why the major exists. The same is true of most other undergraduate degrees.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;One test you could use to determine whether a program producing AI has &amp;quot;arrived&amp;quot; is whether it can produce itself. A &lt;a href=&quot;https://en.wikipedia.org/wiki/Quine_(computing)&quot; rel=&quot;noreferrer&quot;&gt;Quine&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-04-07T13:31:44.033" LastActivityDate="2022-04-07T13:31:44.033" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7342" PostTypeId="2" ParentId="7339" CreationDate="2022-04-07T20:17:39.567" Score="5" Body="&lt;p&gt;I don't think AI code is a serious game-changer for hiring or education in the short term, even giving it the benefit of the doubt in terms of its power, which is still limited. You mention the problem of students plagiarizing solutions available online, but hired humans are likely just as big of a contributor to cheating, and similar to AI in that the cheater need only state the specification to get the code.&lt;/p&gt;&#xA;&lt;p&gt;Sure, AI assistants are more accessible than tracking down (and potentially paying) a human to complete an assignment, but at the end of the day the outcome is more or less the same, assuming the cheating isn't caught: a student gets a good grade on an assignment, course or exam that they didn't deserve, or a prospective employee gets hired for a job they're unqualified for.&lt;/p&gt;&#xA;&lt;p&gt;The problem in both student and employee cases is that they've created an unsustainable situation in their immediate future. For the student, later assignments/exams/courses are going to get harder, and if they've never built a solid conceptual foundation, then they'll either have to come clean and work extra hard to fill in knowledge gaps, or they'll have to resort to further cheating to keep up appearances. Same for the employee: they're hired, but it'll likely be a huge struggle if they're unqualified, with disastrous consequences for them and the employer. And these are the &amp;quot;lucky&amp;quot; ones who weren't caught immediately.&lt;/p&gt;&#xA;&lt;p&gt;The techniques for catching cheaters don't seem significantly different between AI and existing cheating approaches. For example, you can ask students/candidates to explain their code verbally (written responses are easily hired out to a human) and/or watch the solution coded live. Of course, verbal isn't a perfect foil or terribly scalable (I've participated in MOOC classes of over 500 students to a teaching staff of about a dozen), complicated by remote hiring/learning.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, it's fairly easy to programmatically compare submitted code against the output of the most popular AI tools using &lt;a href=&quot;https://theory.stanford.edu/%7Eaiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Moss&lt;/a&gt;. This suggests that human-hired plagiarism might be harder to detect than AI because it's more likely to be unique, unless the hired coder didn't bother to try to make it look unplagiarized or used an AI solution on behalf of the student/candidate.&lt;/p&gt;&#xA;&lt;p&gt;If, someday, real-world programming tasks can be completed purely with AI assistance and no understanding is needed, there'll likely be new technical problems. Exams and assignments will be less about whether or not a solution can be coded and understood line-by-line and more about whether the right problem is being solved, how the AI tool was guided, fine-tuning parameters, system-level design, and so forth. A lot of these new requirements smell a lot like much high-level data science, deep learning and ML. Higher levels of abstraction entail different problems rather than an elimination of problems altogether. The trouble is that high-level tools make it easy to solve low-level tasks, which is nothing new (for example, &lt;a href=&quot;https://godbolt.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;godbolt&lt;/a&gt; for completing assembly assignments).&lt;/p&gt;&#xA;&lt;p&gt;A lot of this makes me think of doping in biking, using data science to optimize shot locations in basketball, Stockfish in chess, auto-tune in music, etc. If everyone is cheating, is anyone cheating, or is that just the new rules of the game? Where do we draw the line between using an available powerful tool effectively versus a cheat? Technological innovation can create this turmoil, but unlike bike doping, it's still hard to cheat a whole CS degree, bootcamp or job with AI code. And if it gets to the point where you can, that'll be the time to reassess the game (or find stricter ways to cling to and enforce the old rules).&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-04-07T21:25:16.647" LastActivityDate="2022-04-07T21:25:16.647" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7343" PostTypeId="2" ParentId="7339" CreationDate="2022-04-08T15:38:09.910" Score="4" Body="&lt;p&gt;There's another aspect to the impact of these tools on teaching programming that is worth considering, as reported in the paper, 'The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming' given at the Australasian Computing Education Conference (ACE) in Feb 2022. That is the potential impact of student use of them to solve standard introductory programming problems.&lt;/p&gt;&#xA;&lt;p&gt;From the abstract, 'In this work, we explore how Codex performs on typical introductory programming problems. We report its performance on real questions taken from introductory programming exams and compare it to results from students who took these same exams under normal conditions, demonstrating that Codex outscores most students.'&lt;/p&gt;&#xA;&lt;p&gt;The paper is available as Open Access from the ACM Digital Library.&lt;/p&gt;&#xA;&lt;p&gt;DoI: &lt;a href=&quot;https://doi.org/10.1145/3511861.3511863&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://doi.org/10.1145/3511861.3511863&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="484" LastActivityDate="2022-04-08T15:38:09.910" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7344" PostTypeId="2" ParentId="5451" CreationDate="2022-04-13T23:01:47.670" Score="0" Body="&lt;p&gt;I get the feeling that we are teaching in the wrong order. We should teach functional first.&lt;/p&gt;&#xA;&lt;p&gt;In your first bullet point, it looks like you students are trying to invent a list comprehension/mapper. It may be easier to teach them how to do it this way that to teach how to implement it procedurally.&lt;/p&gt;&#xA;&lt;p&gt;The 2nd point is just missing that there is more that one input.&lt;/p&gt;&#xA;&lt;p&gt;The 3rd I would introduce &lt;code&gt;foreach&lt;/code&gt; loops before general purpose loops.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-04-13T23:01:47.670" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7346" PostTypeId="1" CreationDate="2022-04-16T09:52:24.597" Score="1" ViewCount="84" Body="&lt;p&gt;Bit of a flimsy question, but here goes...&lt;/p&gt;&#xA;&lt;p&gt;My understanding is that multithreading is now a staple of the vast majority of university comp sci programming modules (where the programming language being taught has support for multithreading). Given that multithreading has really only come into its own in the past 20 years or so, since the advent of multicore processors, I'm wondering if anyone knows the rate at which multithreading became a standard subject covered in programming modules (i.e. the implementation and analysis of small multithreaded programs, as opposed to the high-level study of it in an OS architecture module, for example). Did it take a while for universities' syllabuses to catch up?&lt;/p&gt;&#xA;&lt;p&gt;Answers based on personal experience only are fully welcome!&lt;/p&gt;&#xA;" OwnerUserId="11957" LastEditorUserId="11957" LastEditDate="2022-04-16T11:07:21.217" LastActivityDate="2022-04-16T11:07:21.217" Title="Multithreading in Programming modules" Tags="|concurrency|" AnswerCount="0" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7347" PostTypeId="1" AcceptedAnswerId="7362" CreationDate="2022-04-18T10:53:18.060" Score="4" ViewCount="339" Body="&lt;p&gt;I am faculty of computer science. Currently, I am teaching a design and analysis of algorithms course to second-year undergraduate students. This is my second semester of teaching before this I have done a Teaching assistantship during my Ph.D.&lt;/p&gt;&#xA;&lt;p&gt;I am feeling like 50 percent of my class is not understanding what I try to teach in the class there 10-15 percent of students have understood the content I have taught. This observation comes from the result of the quiz I conducted last week.&lt;/p&gt;&#xA;&lt;p&gt;I have tried my best to teach algorithms, I use slides and a board (50-50 percent time). Always starts with two-three examples and then discusses the cases of algorithms and ask questions in between trying to take the response from students and at the end presents the algorithm. I do problem-solving one time a week.&lt;/p&gt;&#xA;&lt;p&gt;I want to engage students to participate in the class but only fractions of them seems interested like 20-30 percent. When I do problem-solving then participation is more it is around 50 percent.&lt;/p&gt;&#xA;&lt;p&gt;Kindly suggest some techniques to make the course more interactive and create interest in most of the students.&lt;/p&gt;&#xA;" OwnerUserId="11594" LastEditorUserId="1293" LastEditDate="2022-08-10T15:49:59.907" LastActivityDate="2023-02-02T09:25:20.623" Title="How to teach algorithms in an interactive way" Tags="|algorithms|" AnswerCount="4" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7349" PostTypeId="2" ParentId="4605" CreationDate="2022-04-26T17:28:18.577" Score="1" Body="&lt;ol&gt;&#xA;&lt;li&gt;As mentioned in a comment: start with high level constructs when possible.&lt;/li&gt;&#xA;&lt;li&gt;In some assignments I give students the main program, and then tell them, write the data structures and functions that make this work. That way you're forcing them to use the high level constructs, and maybe they'll see that the shorter/more elegant expression is preferable.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-04-26T17:28:18.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7350" PostTypeId="1" CreationDate="2022-04-27T06:15:49.110" Score="3" ViewCount="181" Body="&lt;p&gt;In most courses, the professor's job is to give the lectures, while the TAs' job is to grade the homework. But in some courses, giving the lectures is often a routine and repetitive task: the material is almost the same each year, the slides are already available. A good graduate student can probably give the lectures relatively well. In contrast, grading the homework is a much deeper task. In programming, there is no single &amp;quot;correct answer&amp;quot;. Each solution is unique - particularly in advanced courses, in which the homework involves creativity and ingenuity (e.g. programming a game or a GUI). Grading homework requires reading each particular piece of work and giving individual feedback - both on code correctness and on software engineering practices. This requires deep understanding of the material, as well as a lot of experience in programming.&lt;/p&gt;&#xA;&lt;p&gt;Question: does it make sense, in advanced programming courses, to switch the roles between the professor and the TAs: let a TA give the lectures (based on material prepared by the professor), and have the professor use the teaching time for grading homework and providing feedback?&lt;/p&gt;&#xA;&lt;p&gt;EDIT: My course has about 200 students, one professor in charge, and about 5 TAs (it changes from year to year, but this is the scale).&lt;/p&gt;&#xA;" OwnerUserId="1873" LastEditorUserId="1873" LastEditDate="2022-04-29T10:12:41.197" LastActivityDate="2022-05-11T14:50:17.420" Title="In programming courses, should homework grading be the job of the TA or the professor?" Tags="|programming|homework|course-design|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7351" PostTypeId="2" ParentId="7350" CreationDate="2022-04-27T14:47:42.380" Score="2" Body="&lt;p&gt;I hate to say that &amp;quot;it depends&amp;quot;, but it really does depend.  Brian's comment about cultural norms being different is well taken, but if you have the choice available to you, and you are the person running the course, and the workload is reasonable either way, then you are best positioned to decide which aspect of the course you want to have the most control over.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I would always choose lecture, but partly that's because I lecture well, and partly because I feel that the lecturer is the person that students think of as their teacher.&lt;/p&gt;&#xA;&lt;p&gt;However, that would be &lt;em&gt;my&lt;/em&gt; choice.  You could always come to the first day, do the general course introduction, introduce (and praise!) the TA you are leaving the students with, let the students know about your office hours and email address, and then be off about your way.&lt;/p&gt;&#xA;&lt;p&gt;If you take that path, I would make it a point to visit many of the classes, both to make sure that the TAs are doing a good job, and to keep a presence among the students.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-04-27T14:47:42.380" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7352" PostTypeId="1" CreationDate="2022-04-27T19:47:15.157" Score="3" ViewCount="215" Body="&lt;p&gt;As a python interested guy i have seen the syntactic sugar of a decorator like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;@decorator&#xA;def decorated_method(self):&#xA;    return &amp;quot;Hello&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So, it's a sort of higher order function in python, but my question is:&#xA;Are there other patterns or ways to express the same idea of decorating beyond idiomatic python features, some more general concept under the computer science field?&lt;/p&gt;&#xA;&lt;p&gt;Once upon a time in a nodejs course, the teacher mentioned &amp;quot;function decorations&amp;quot; but i didn't make sense of it clearly. Regards!&lt;/p&gt;&#xA;" OwnerUserId="11996" LastEditorUserId="204" LastEditDate="2022-05-01T12:11:59.053" LastActivityDate="2022-05-06T05:57:56.900" Title="How can i explain the concept of decoration from the computer science perspective" Tags="|programming|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7353" PostTypeId="2" ParentId="7352" CreationDate="2022-04-27T21:39:10.727" Score="3" Body="&lt;p&gt;You already said it yourself, the Python decorator is just syntactic sugar for a &lt;a href=&quot;https://en.wikipedia.org/wiki/Higher-order_function&quot; rel=&quot;nofollow noreferrer&quot;&gt;high order function&lt;/a&gt;. When more than one decorator is applied, like in the example below, we could say it is also a kind of &lt;a href=&quot;https://en.wikipedia.org/wiki/Function_composition&quot; rel=&quot;nofollow noreferrer&quot;&gt;function composition&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;@f1(arg)&#xA;@f2&#xA;def func(): pass&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;is equivalent to&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;def func(): pass&#xA;func = f1(arg)(f2(func))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The Python &lt;a href=&quot;https://peps.python.org/pep-0318/&quot; rel=&quot;nofollow noreferrer&quot;&gt;PEP 318&lt;/a&gt; where this feature was originally presented, mentions that:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;There’s been a number of complaints about the choice of the name ‘decorator’ for this feature. The major one is that the name is not consistent with its use in the &lt;a href=&quot;https://web.archive.org/web/20031204182047/http://patterndigest.com/patterns/Decorator.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;GoF book&lt;/a&gt;. The name ‘decorator’ probably owes more to its use in the compiler area – a syntax tree is walked and annotated. It’s quite possible that a better name may turn up.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;A decorator is just a pattern, what matters usually is the intent. In object-oriented languages, you would implement it with a class decorator, and in functional languages, you'd resort to a function decorator.&lt;/p&gt;&#xA;" OwnerUserId="11997" LastEditorUserId="11997" LastEditDate="2022-04-28T03:47:43.407" LastActivityDate="2022-04-28T03:47:43.407" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7354" PostTypeId="2" ParentId="7350" CreationDate="2022-04-29T12:27:36.857" Score="1" Body="&lt;p&gt;First, the scenario you describe isn't workable as it is the professor who is ultimately responsible for the course. A problem that is likely to arise is that the quality of lectures would be spotty, with some being fine and others not. I'd guess that students would notice this and complain about the variability. It is also an imbalance of time and effort. Lecturing takes up relatively little time compared to grading. A professor personally grading 200 programs seems impossible if any feedback is to be given. And with five TAs or so, I don't see a way that work load can be balanced. Five lecturers every day? Probably not. TAs only working one day a week for an hour or so while the professor grades 200 papers every week? Unworkable.&lt;/p&gt;&#xA;&lt;p&gt;A deeper problem in STEM fields is that graduate students may have an imperfect understanding of the topic (though professors might also, I suppose) and, through lack of deep insight mislead students. I developed very deep insight into real analysis (I'm trained in maths), but not really until I'd finished my doctoral research. Up until then I had a somewhat mechanical understanding. But it is that insight that lets a professor guide students toward a goal.&lt;/p&gt;&#xA;&lt;p&gt;Related to this is that TAs, assuming that they are students, may have the misconception that lectures are about facts rather than about driving the learning of the students. It is too easy to make assumptions about students (and their understanding) if you are one yourself and are biased by your own learning modes and practices. New professors sometimes have the same problems, as I did. Experience, however, gives you a better and more productive view. I've given one absolutely &amp;quot;perfect&amp;quot; lecture from which the students learned exactly nothing. I learned my lesson. One hard lesson for professors to learn, though they must if they are to be effective, is that nearly every one of their students is not like themselves and learns differently than they did and has different goals than they do. TAs are unlikely to have this sophistication about teaching and leaning.&lt;/p&gt;&#xA;&lt;p&gt;To answer your objections to the &amp;quot;standard&amp;quot; practice, note that it is the responsibility of the professor not only to lecture, but to provide a proper grading rubric that can be followed by those less adept in the subject and that can be justified to students. Lacking that, chaos can ensue. One way to develop a rubric is for the professor to look at a few papers randomly before making the rubric so as to see what sort of guidance the TAs need to follow and what sorts of messages need to be given to the students.&lt;/p&gt;&#xA;&lt;p&gt;Another adaptation that reduces the variability of grades given by TAs is to have each TA responsible for some of the questions for all of the students, rather than all of the questions for some of the students. That is how we handled major exams back in the day (last century).&lt;/p&gt;&#xA;&lt;p&gt;Another good practice is to have the professor meet with the TAs as a group and encourage them to bring up any difficult issues they have seen since the prior meeting. The professor and TAs become a team.&lt;/p&gt;&#xA;&lt;p&gt;However, there is some value in letting (or requiring) TAs to conduct occasional lectures. If a professor gives a TA a couple of weeks to prepare a lecture on a specific topic, reviews their lecture notes, and attends the lecture then it can be beneficial to the training of the TA without being disruptive to the students. I was given such a task by a professor even as an ordinary student in a course. As an undergraduate it was a very difficult task, done fairly poorly, but a good experience. I got feedback from both peers and the professor.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-04-29T12:45:20.040" LastActivityDate="2022-04-29T12:45:20.040" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7355" PostTypeId="2" ParentId="7347" CreationDate="2022-04-30T02:07:53.230" Score="1" Body="&lt;p&gt;CS50 was open-source last time I checked... it's a very well designed curriculum. I remember there were people worlwide using their material to teach computer science. Just make sure their policies and licenses haven't change.&lt;/p&gt;&#xA;&lt;p&gt;CS50 is the introductory course of Computer Science by Harvard University. You can find the material at &lt;a href=&quot;https://www.edx.org/course/introduction-computer-science-harvardx-cs50x&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.edx.org/course/introduction-computer-science-harvardx-cs50x&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="12005" LastActivityDate="2022-04-30T02:07:53.230" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7356" PostTypeId="2" ParentId="7350" CreationDate="2022-05-01T03:12:53.923" Score="3" Body="&lt;p&gt;I have taught the same programming class a couple of times. While I let the TA(s) do the grading, I&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;have kept notes from previous iterations teaching, describing most of the common errors / inelegancies, and the TAs get this from me. I don't just give them the &amp;quot;perfect&amp;quot; solution.&lt;/li&gt;&#xA;&lt;li&gt;still make a cursory pass through homework submissions, half an hour before class time, so that I can show the class the various approaches that were taken, and what I like/dislike about them. Students actually like that: &amp;quot;Hey, he showed our solution as as good one!&amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I think this approach catches most of your objections that grading requires deeper understanding.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-05-01T05:33:28.210" LastActivityDate="2022-05-01T05:33:28.210" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7357" PostTypeId="2" ParentId="7350" CreationDate="2022-05-01T03:48:52.667" Score="1" Body="&lt;p&gt;I've been thinking about this for a few days now, and I realize that I need to post another answer.  I now affirmatively do not believe that you should make the switch that you propose, and I see it as potentially harmful to the students.&lt;/p&gt;&#xA;&lt;p&gt;If you are coming to the conclusion that the grading must be done at a deeper level of understanding than &lt;em&gt;the people who you believe should lecture the course could understand&lt;/em&gt;, then you are grading at an inappropriately deep level for the learning objectives of the course.&lt;/p&gt;&#xA;&lt;p&gt;You are setting up students to do well or do poorly based upon criteria that you do not expect them to understand prior to entering the course, nor wish to explain to them in the course itself.  The grading will, then, seem (rightfully!) arbitrary to the students, who are, after all, coming into the class to learn the &lt;em&gt;course material&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If your TAs can't understand what differentiates a strong lab from a weak one, then your assignment is not being clearly defined for your target audience (your students).&lt;/p&gt;&#xA;&lt;p&gt;Instead, then, I propose that you pour your energies into defining for both student and TA alike what you would hope to get out of a strong answer, and what criteria they will be judged by, in detail.  If there is enough detail in the information that you provide to the students that your TAs can then grade closely to the standard that you would like, a basic fairness will have been maintained, and everyone involved (students, TA, and, honestly, even you as the instructor!) will learn more from the experience.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-05-01T03:48:52.667" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7358" PostTypeId="2" ParentId="7339" CreationDate="2022-05-01T12:27:56.367" Score="1" Body="&lt;p&gt;I was thinking about this over the week.&lt;/p&gt;&#xA;&lt;h1&gt;First how will it affect programming outside of education.&lt;/h1&gt;&#xA;&lt;p&gt;We have in the past invented higher level languages, that replace lower level languages. So nothing new. However we will NEVER get to the point that we can just write in English. This is because English is a terrible programming language: too ambiguous.&lt;/p&gt;&#xA;&lt;h1&gt;So what will the AI be good at?&lt;/h1&gt;&#xA;&lt;p&gt;It will get good at solving standard very well specified problems, with little ambiguity. That is the sort of problem that one would see in an academic assessment.&lt;/p&gt;&#xA;&lt;h1&gt;So what does this mean?&lt;/h1&gt;&#xA;&lt;p&gt;It is little different in type to the problem of assigning students to write an assembler-language program, and they writing it in &lt;code&gt;C&lt;/code&gt;, compiling it, and handing in the result, Using a calculator, or downloading an answer off of the web.&lt;/p&gt;&#xA;&lt;h1&gt;What to do about it&lt;/h1&gt;&#xA;&lt;p&gt;Adapt: I will leave this for others to consider how. But not we have done it before. There is nothing now here.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2022-05-01T21:10:23.023" LastActivityDate="2022-05-01T21:10:23.023" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7359" PostTypeId="2" ParentId="4427" CreationDate="2022-05-01T13:47:33.747" Score="2" Body="&lt;p&gt;The compiler enforces the rules, everything else is a guideline.  It is a bit like ending a sentence with a preposition, about which Winston Churchill said:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;“This is the sort of [English] up with which I will not put.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In order to satisfy that &lt;em&gt;guideline&lt;/em&gt; of English usage, sometimes we would end up with an extremely awkward sentence construction.  So being a good writer/orator means knowing when to be flexible about the guidelines.  Programming is no different.  Avoid early returns (if that is the local culture) unless the code ends up being too cryptic in an effort to avoid them.  We should encourage the student to develop their judgement about code quality, rather than blindly enforcing guidelines.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-05-01T13:47:33.747" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7360" PostTypeId="2" ParentId="7339" CreationDate="2022-05-01T17:40:32.540" Score="1" Body="&lt;p&gt;Isn't this the next step in the natural progress of computer sciences?&lt;/p&gt;&#xA;&lt;p&gt;New &amp;quot;layers of abstractions&amp;quot; were constantly introduced, over decades.&lt;/p&gt;&#xA;&lt;p&gt;CS moved on&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;from machine instructions to assembly code&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;from assembly code to high-level languages like C&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;from high-level-languages to 4th level languages like SQL&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;from declarative languages to no-code/rapid-application developments&#xA;environments,&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;and now the AI-powered tools like Copilot are here (based on language models and knowledge graphs)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;They will just become part of the curriculum.&lt;/p&gt;&#xA;&lt;p&gt;None of these developments  have made any previous body of knowledge obsolete. Neither when they were new, nor when they matured over the years.&lt;/p&gt;&#xA;&lt;p&gt;Each time there were some people concerned that old-school skills will die out, or this will degrade students capabilities.&lt;/p&gt;&#xA;&lt;p&gt;(Students' average apperception might still go down, due to other reasons: computer hardware that cannot be tampered with; greater societal inequality; underfunding of teaching and education in general,... all of which are more serious threats that the rise of AI-based programming aids.)&lt;/p&gt;&#xA;" OwnerUserId="8768" LastEditorUserId="8768" LastEditDate="2022-05-01T18:02:48.773" LastActivityDate="2022-05-01T18:02:48.773" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7361" PostTypeId="2" ParentId="7347" CreationDate="2022-05-01T17:54:48.617" Score="2" Body="&lt;p&gt;You could provide working code, load it into an IDE, and start a debugger. Stop at lines of code that are interesting. Or make a dump of data structures that are interesting. Perhaps during each iteration (or before and after an operation. To show how linked lists can grow, for example.&lt;br /&gt;&#xA;Demonstrating the basic usage of a debugger is valuable to anyone.&lt;/p&gt;&#xA;&lt;p&gt;You could also Benchmark some different variants/implementations of certain algorithms and ask in advance, which variant might run faster. You could do this in form of a poll (in your videoconferencing software) or just asking &amp;quot;Raise your arm if you think algo 1 is faster&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Let them benchmark on their machines and report results, to demonstrate that some results depend on hardware, on many factors.&lt;/p&gt;&#xA;" OwnerUserId="8768" LastActivityDate="2022-05-01T17:54:48.617" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7362" PostTypeId="2" ParentId="7347" CreationDate="2022-05-01T18:25:17.073" Score="4" Body="&lt;p&gt;I'm a bit worried about the scale here, but I often did some interesting things when there were fewer than about 30 students. Maybe you can make it work. I'll give a couple of examples using sorting. To do them you need a bunch of cards (maybe bigger than index cards at this scale) and a marking pen.&lt;/p&gt;&#xA;&lt;p&gt;Call it playtime. (Done with university students in a CS major)&lt;/p&gt;&#xA;&lt;p&gt;Write a bunch of integers on individual cards (probably about eight cards). Hand them out to a bunch of students, one card each. Have them stand in line facing the class with the numbers in random sequence, cards visible.&lt;/p&gt;&#xA;&lt;p&gt;Insertion  sort:&lt;/p&gt;&#xA;&lt;p&gt;Have one student not in the line point to the second person in the line from the left side of the line.&lt;/p&gt;&#xA;&lt;p&gt;Pull the person pointed to out of line, compare their number with that of the first person and if the number is less, push (gently) the first person down to the now empty (right) slot to make a slot for the one you pulled out and push them into the open slot.&lt;/p&gt;&#xA;&lt;p&gt;Tell the &amp;quot;pointing student&amp;quot; to point one person farther on. Go there, pull that person out of line and then move down toward the left, pushing people right as long as their number is larger than the one you've pulled out. Put them into the now empty slot. Repeat.&lt;/p&gt;&#xA;&lt;p&gt;The quadratic sorts are all pretty easy to manage. The faster ones can be done (with mistakes and lots of laughing) using some students as data and other students as pointers. Merge sort might be the hardest, but note that with some practice it can be done in parallel. But first practice merging as a separate &amp;quot;play&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;For quick sort you might be able to have about 16 data points and fewer might not give enough data to help the students grok the method.&lt;/p&gt;&#xA;&lt;p&gt;Searching is also possible and a bit simpler. One or several &amp;quot;pointer&amp;quot; students to keep track of things.&lt;/p&gt;&#xA;&lt;p&gt;I also did some general recursion lessons having one student with a &amp;quot;base case&amp;quot; script and adding additional students to a list with a different script that, say, either returned a value or passed the process down toward the base case. I'd guess that tree algorithms might be too messy to manage, though.&lt;/p&gt;&#xA;&lt;p&gt;You can do something similar (with care) to teach linear recursion by adapting &lt;a href=&quot;https://www.nurseryrhymes.org/there-was-an-old-lady-who-swallowed-a-fly.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;There was an old lady who swallowed a fly&lt;/a&gt; into what I called choir practice. The base case is &amp;quot;'I don't know why she swallowed a fly, perhaps she'll die'&amp;quot;. You need to be choir director feeding the initial lines of each verse and handing a card to a new student with their lines.&lt;/p&gt;&#xA;&lt;p&gt;You say, at one point, &amp;quot;There was an old woman who swallowed a cat. Imagine that, to swallow a cat&amp;quot;. Hand a new student the card &amp;quot;She swallowed the cat to catch the bird&amp;quot; who reads the card aloud, and points to (recurses) to the next person whose card gets read again (&amp;quot;She swallowed the bird to catch the spider&amp;quot;) and passes control (points to) the next student.&lt;/p&gt;&#xA;&lt;p&gt;Note that you (choir director) terminates when you reach the &amp;quot;horse&amp;quot; verse.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-05-01T20:53:39.373" LastActivityDate="2022-05-01T20:53:39.373" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7363" PostTypeId="1" CreationDate="2022-05-02T15:50:03.180" Score="2" ViewCount="55" Body="&lt;p&gt;I have recently switch from SmallBasic to Python for my introduction to programming course.  I have managed to translate everything from one language to the other... with a single difficulty.&lt;/p&gt;&#xA;&lt;p&gt;Over the decade of teaching the course I amassed dozens of examples. Examples twenty five lines or less showing the basics. Examples with hundreds of lines showing what is possible. Programs to that stick to the basics and will run on any system. Programs that do amazing things by importing libraries.  Programs that follow the one command per line rule. Programs that squish as much onto a line as possible.&lt;/p&gt;&#xA;&lt;p&gt;And now I have none of it for Python. I have found a few examples here and there, but it requires a lot of searching.&lt;/p&gt;&#xA;&lt;p&gt;What I'm looking for is a place where people share their Python accomplishments. Little test apps that show off an idea.  Something big they managed cram into a few lines.  Something expansive that takes up multiple files.&lt;/p&gt;&#xA;&lt;p&gt;Does this Python corner of the internet exist?&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-02T15:50:03.180" Title="Python Code Sharing Forum" Tags="|python|code-example|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7364" PostTypeId="1" CreationDate="2022-05-04T01:04:52.867" Score="4" ViewCount="198" Body="&lt;p&gt;I have a PhD in computer science (A fresh graduate). My bachelor's major is similar to CS but without algorithms (It's a discipline between business and CS).&lt;/p&gt;&#xA;&lt;p&gt;I am quite good at AI research but my coding skills are not that good. I lost two AI research job offers, from Google and Amazon, because of my coding tests. All the other interviews were very good (as the HR staff told me).&lt;/p&gt;&#xA;&lt;p&gt;How can I practice/learn algorithm coding and improve it? Is there a platform or a course that will help me with this?&lt;/p&gt;&#xA;&lt;p&gt;Just to give you some intuition about my level. For instance, I know how the recursion function works, and I can solve basic problems, but when I face a new problem I find it hard to be solved.&lt;/p&gt;&#xA;" OwnerUserId="12012" LastActivityDate="2022-05-13T13:04:43.150" Title="Suggestions to improve my algorithm coding skills" Tags="|programming|algorithms|python|recursion|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7365" PostTypeId="2" ParentId="5023" CreationDate="2022-05-04T04:37:46.310" Score="-1" Body="&lt;p&gt;We count from 1 because we started counting before the zero was invented.&lt;/p&gt;&#xA;&lt;p&gt;We should have all switched to the new, lowest digit when it was invented but this habit was impossible to kill so we stuck to 1.&lt;/p&gt;&#xA;&lt;p&gt;The revolution that came with the zero is called &lt;a href=&quot;https://en.wikipedia.org/wiki/Positional_notation&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Positional_notation&lt;/a&gt;, also known as &amp;quot;place-value&amp;quot;. Positional notation allowed us to &lt;em&gt;re-use the same digits&lt;/em&gt; to count tens, hundreds, thousands, etc. If you pay attention, you'll notice that tens, hundreds and thousands all  start with the new, lowest digit: zero. But for units it was too late; too hard to change.&lt;/p&gt;&#xA;&lt;p&gt;However many programming languages &lt;em&gt;did&lt;/em&gt; the switch and count all digits from zero because keeping units special and different from all other digits creates irregularities and edge cases; see examples at &lt;a href=&quot;https://en.wikipedia.org/wiki/Zero-based_numbering#Numerical_properties&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikipedia.org/wiki/Zero-based_numbering#Numerical_properties&lt;/a&gt; and in some of the other answers here.&lt;/p&gt;&#xA;" OwnerUserId="12015" LastActivityDate="2022-05-04T04:37:46.310" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7366" PostTypeId="2" ParentId="7364" CreationDate="2022-05-05T15:52:45.370" Score="3" Body="&lt;p&gt;The way to learn something is to practice it. It is no different from yourself. Get a good book on algorithms, maybe one that is Python Specific or one more general. I've always liked David Gries' &lt;em&gt;The Science of Programming&lt;/em&gt;, though it isn't strictly an algorithms book. But it has lots of exercises on algorithmic thinking.&lt;/p&gt;&#xA;&lt;p&gt;But the key is to do all of the exercises in the book. If the book doesn't have lots of exercises then get a different one.&lt;/p&gt;&#xA;&lt;p&gt;The classic book is &lt;em&gt;Data Structures and Algorithms&lt;/em&gt; by Aho, Hopcroft, and Ullman, though it is a bit old now.&lt;/p&gt;&#xA;&lt;p&gt;Neither of those is Python specific, which could be a good thing.&lt;/p&gt;&#xA;&lt;p&gt;If you have a trusted colleague you might get them to look at and comment on some of your solutions. That feedback can be very valuable.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-05-05T15:52:45.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7367" PostTypeId="2" ParentId="7352" CreationDate="2022-05-06T05:57:56.900" Score="1" Body="&lt;p&gt;All a decorator does is it allows you to build upon your function in some way i.e. it's a higher-order function. Ultimately, I prefer explaining them by &amp;quot;unrolling&amp;quot; the decorator.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;# This:&#xA;@decorator&#xA;def foo(...):&#xA;    ...&#xA;&#xA;# Becomes this:&#xA;def _foo(...):&#xA;    ...&#xA;&#xA;def foo(...):&#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can also express the same logic using OOP.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;from abc import ABC, abstractmethod&#xA;&#xA;&#xA;class Decorator(ABC):&#xA;&#xA;    def foo(...):&#xA;        ...&#xA;&#xA;    @abstractmethod&#xA;    def _foo(...):&#xA;        ...&#xA;&#xA;&#xA;class Foo(Decorator):&#xA;&#xA;    def _foo(...):&#xA;        ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Inheritance makes sense in this case because you're essentially encapsulating logic that subclasses share. This example doesn't always work because you might want to use different method names for example, but concept is definitely there, and there's more sophisticated ways you can work around it all.&lt;/p&gt;&#xA;&lt;p&gt;Ultimately however, decorators are higher-order functions. With that, I would suggest exercising them with some restraint, remembering that higher-order functions are for when you need the function itself and cannot separate the logic from it.&lt;/p&gt;&#xA;&lt;p&gt;Common examples where using decorators might overcomplicate things in my experience include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Pre-/post-processing e.g. input checking, which should just be a function call at the start/end(s) of your function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;# Turn this:&#xA;@type_check&#xA;def foo(...):&#xA;    ...&#xA;&#xA;# Into this:&#xA;def foo(...):&#xA;    type_check(...)&#xA;    ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Treating the function call like a block of code e.g. for timing, which can be done using &lt;code&gt;with&lt;/code&gt; blocks instead.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;# Turn this:&#xA;@timed&#xA;def foo(...):&#xA;    ...&#xA;&#xA;# Into this:&#xA;def foo(...):&#xA;    with Timer():&#xA;        ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Decorators are good for cases where the function being decorated is itself necessary, such as a function which needs to be saved to an API library that will call it for your API.&lt;/p&gt;&#xA;" OwnerUserId="12023" LastActivityDate="2022-05-06T05:57:56.900" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7368" PostTypeId="2" ParentId="4605" CreationDate="2022-05-06T06:37:40.340" Score="1" Body="&lt;p&gt;I have spent a lot of time on chatrooms/forums helping people with their programs, and over time what I've found is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide partially written code to help them feel comfortable with it. Be sure the code you give is clear &lt;strong&gt;and concise&lt;/strong&gt;. It needs to focus on the point and avoid being more confusing than it must be. (I find this helpful for people asking for help.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give solid reasons for &lt;strong&gt;why&lt;/strong&gt; they should use something. If you just tell them &amp;quot;this does X&amp;quot; without explaining why they would want something like &amp;quot;X&amp;quot;, then they'll never know when they should use it over something else. If you're teaching these advanced concepts, there should be a reason you're teaching them.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure they try it. For many, code snippets during lectures are nothing more than code snippets. People tend to have more attachment to their own code because they understand their own code more than a stranger's. This means they aren't really understanding why the code you're showing them actually matters to them.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Now, that's cool and all, but how should you actually integrate this advice into a classroom setting? I'm not a teacher, but here's some ideas:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Provide partially written code alongside assignments as &lt;strong&gt;hints&lt;/strong&gt;. Whether or not a student uses it is up to them, but it'll encourage them to think about stuff like &amp;quot;where should I use this?&amp;quot; and &amp;quot;how should I fill this in?&amp;quot;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make it obvious how the given reasons for using something over something else would apply. If you're going over lists vs sets, then even have them implement something simple using both ways so that they can see the difference first-hand.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Give them a reason to look back on their own code. For example, have them do peer reviews after they finish the assignment. Most students won't look at their code after they've turned it in, so they don't learn from their own mistakes.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12023" LastActivityDate="2022-05-06T06:37:40.340" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7370" PostTypeId="2" ParentId="7364" CreationDate="2022-05-08T20:06:07.750" Score="2" Body="&lt;p&gt;It seems that you are a good researcher, but you have applied to the companies where the top most priority is coding. The first thing is the Object Oriented Programming and Data Structures. I have heard that google provides you some problems and then you need to do some code to solve it. Your code should be neat and clean and time efficient.&lt;/p&gt;&#xA;&lt;p&gt;Now, as you are applying as a PhD candidate, but you did not mention your test experience.&lt;/p&gt;&#xA;&lt;p&gt;But to gain experience in coding you need to pick a pen and paper. Pick any data structure and algorithms book and practice problems mentioned there. I advise you to do practice in Python as this will also help you in AI.&lt;/p&gt;&#xA;&lt;p&gt;As you are doing research in AI then start paraticing Keras (Python Library) also this will help you to know OOPS concept very well.&lt;/p&gt;&#xA;" OwnerUserId="12031" LastActivityDate="2022-05-08T20:06:07.750" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7371" PostTypeId="2" ParentId="7364" CreationDate="2022-05-10T01:39:29.683" Score="1" Body="&lt;p&gt;Computer science as practiced in an industrial setting is usually &lt;em&gt;applied&lt;/em&gt; computer science. Outputs are typically products that consist largely of software, but may also involve hardware, documentation, publications, and patents. That means that pure computer science is enriched with elements of software engineering (an engineering discipline) and programming (a craft). As with other crafts, one becomes more proficient by &lt;strong&gt;practice&lt;/strong&gt;, especially when doing so with guidance from a more senior practitioner, e.g. via code review.&lt;/p&gt;&#xA;&lt;p&gt;Typical discoveries when transitioning from theory to working code are &amp;quot;integers are not unbounded&amp;quot; and &amp;quot;floating-point arithmetic is not math&amp;quot;, plus how many different ways one can commit off-by-one errors. An interesting account of one such exercise is given by R. Lesuisse, &amp;quot;Some lessons drawn from the history of the binary search algorithm&amp;quot;, &lt;em&gt;The Computer Journal&lt;/em&gt;, Vol. 26, No. 2, 1983, pp. 154-163 (&lt;a href=&quot;https://academic.oup.com/comjnl/article-pdf/26/2/154/880257/260154.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;online&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Then, the important errors found in the 26 published algorithms are pointed out, with an attempt at discussing why these errors were made.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;One modern way to practice the craft of programming is to provide answers to questions posed on our companion site &lt;a href=&quot;https://stackoverflow.com/&quot;&gt;Stackoverflow&lt;/a&gt;, especially when they include concise self-contained code with a test scaffold. This is one way how I as a retired software engineer with a CS degree try too keep my skills fresh. I highly recommend lurking on the site for a few weeks prior to writing a first answer to develop a feel for what are considered good and poor answers in this specific context.&lt;/p&gt;&#xA;&lt;p&gt;Interview questions in an industrial setting that involve programming often use simple algorithmic concepts and simple data structures such tables, arrays, linked lists, or bit manipulation of integers. They are designed to be solved in a relatively brief amount of time, and besides testing basic algorithmic understanding tend to check whether an interviewee demonstrates reasonable fluency in the language of implementation. A starter question may be a simple as an implementation of &lt;a href=&quot;https://en.wikipedia.org/wiki/Fizz_buzz&quot; rel=&quot;nofollow noreferrer&quot;&gt;FizzBuzz&lt;/a&gt;, of which stories circulate that it trips up a fair number of candidates. If they are posed in an interactive setting, the questions may also be designed to assess how a candidate reacts to hints and guidance by the interviewer and allow on-the-fly adjustments to the degree of difficulty.&lt;/p&gt;&#xA;&lt;p&gt;Interview question therefore frequently differ from questions posed in classical algorithm (text) books, and are covered by specialized publications such as Gayle Laakmann, &lt;em&gt;Cracking the Coding Interview&lt;/em&gt; or Adnan Aziz and Amit Prakash, &lt;em&gt;Algorithms for Interviews&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But working out answers to text book questions can help gain proficiency. When I studied CS in the 1980s, a starting point was provided by Niklaus Wirth's two books &lt;em&gt;Systematic Programming&lt;/em&gt; and &lt;em&gt;Algorithms + Data Structures = Programs&lt;/em&gt;, followed up by Aho, Hopcraft, Ullman &lt;em&gt;The Design and Analysis of Computer Programs&lt;/em&gt;, David Gries &lt;em&gt;The Science of Programming&lt;/em&gt;, and Jon Bentley's &lt;em&gt;Programming Pearls&lt;/em&gt;. Of these, the books by Bentley and Wirth are closest to what one is likely to encounter in a programming interview. The book by Gries is mostly about constructing correct programs and probably the least helpful in the present context. However, all of them are showing their age four decades after first publication. My recommendation for a modern work would be Steven S. Skiena &lt;em&gt;The Algorithm Design Manual, 2nd ed.&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastEditorUserId="1940" LastEditDate="2022-05-10T04:51:48.430" LastActivityDate="2022-05-10T04:51:48.430" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7372" PostTypeId="2" ParentId="7364" CreationDate="2022-05-10T13:13:22.280" Score="4" Body="&lt;p&gt;Find a project and chase it down, bit by bit. And keep it fun.  If you aren't enjoying the process you won't keep at it. Depending on disposition I would suggest an arcade style game, a machine learning project, or maybe picking up a micro controller and delving into physical computing. In general though, the more time you spend coding the more confident you will be during those interview tasks. He is a list of stuff to get you started in no particular order.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Games -&lt;/strong&gt;&lt;/em&gt; Having fun building skills&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Cargobot - This is a silly little game in iOS, where you use program blocks to move a loading robot around.  The hook is that the programs you develop lean heavily into recursion.&lt;/li&gt;&#xA;&lt;li&gt;Human Resource Machine and 7 Billion Humans. Two more silly iOS games. These two focus on low level coding with 7 Billion Humans encouraging though in parallel processing.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Books -&lt;/strong&gt;&lt;/em&gt; Digging Deep&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Algorithms in... a series of books by Robert Sedgewick that detail... well... algorithms. I have the C++ version on my shelf and page through it now and again when I want to make my head hurt.  If you have the time it is good practice to flip to a page at random and attempt to implement the algorithm listed.&lt;/li&gt;&#xA;&lt;li&gt;Hitchhikers Guide to Programming Languages / Competitive Programming 3. Nothing like a good programming competition to get you thinking about how to improve your code. Both of these books discuss algorithms that pop up regularly at collegiate programming competitions. It is a great way to get a sampling of practical applications of algorithms.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Websites -&lt;/strong&gt;&lt;/em&gt; Practice, Practice, Practice&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Codingbat.com - a website specifically designed to help people pass the coding challenges on job interviews&lt;/li&gt;&#xA;&lt;li&gt;ProjectEuler.net - Problem solving in the extreme. Every problem produces a single number as the solution. Some you can do in your head, some may require a spread sheet, some require serious computational thinking.&lt;/li&gt;&#xA;&lt;li&gt;open.Kattis.com - An active competition server with problems ranging from Hello World to How the Hell do you do that.&lt;/li&gt;&#xA;&lt;li&gt;CodeWars.com - How fast can you solve the problems.  Pitting speed and creativity against others in live contests. The best part is that you can share you solution when each contest is done.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;It is worth saying again: Find a project, something fun, and chase it down. It will keep you going, and give you something to brag about during interviews.&lt;/p&gt;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-10T13:13:22.280" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7373" PostTypeId="1" CreationDate="2022-05-11T10:34:22.003" Score="4" ViewCount="3430" Body="&lt;p&gt;I'm trying to teach C++ to postgraduate students, some of whom have no coding experience. A previous lecturer has left powerpoint presentations and videos but they're simply not engaging enough and nothing sticks in the student's minds. We teach Python via Jupyter notebooks, which works well, although the subject matter is easier. I found an C++ version of jupyter notebooks but I'm not sure it's appropriate for C++ (It's not helped C+ is such a big sprawling language that it's hard to cut down easily.&lt;/p&gt;&#xA;&lt;p&gt;What is considered best practice for teaching C++ in 2022. I'm leaning towards thinking a traditional lecture is pretty much the worst way to go, but I'm not sure whether it's just difficult regardless.&lt;/p&gt;&#xA;&lt;p&gt;What do you think is a realistic level for students to get to learning C++, given 40 hours of labs, seminars and zoom meetings (in total)?&lt;/p&gt;&#xA;" OwnerUserId="12035" LastEditorUserId="12035" LastEditDate="2022-05-11T13:14:08.720" LastActivityDate="2022-05-17T11:13:28.733" Title="Redesigning a C++ Course" Tags="|course-design|" AnswerCount="7" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="7374" PostTypeId="2" ParentId="7373" CreationDate="2022-05-11T13:52:16.200" Score="4" Body="&lt;p&gt;I agree that pure lecturing is really bad. I let students do lots of exercises, including during class time. (And just to prove that lecturing is bad: two minutes after they have seen something on a slide they can not remember it for their lab exercise.)&lt;/p&gt;&#xA;&lt;p&gt;The reason I like doing labs in lecture time is that I walk through the class (with a co-teacher) and look over everyone's shoulder. Tell them &amp;quot;That's good&amp;quot; or &amp;quot;I see you're stuck, take a look at....&amp;quot; or &amp;quot;You can do it that way, but I like .... because ....&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Feel free to use my book. Item 3 on: &lt;a href=&quot;https://theartofhpc.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://theartofhpc.com/&lt;/a&gt; It comes with sources for the slides, lots of example programs, and skeleton codes for exercises to get them started. Everything is up to C++17 standards. There are also some fairly nifty end-of-semester coding projects.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-05-11T13:52:16.200" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7375" PostTypeId="2" ParentId="7373" CreationDate="2022-05-11T14:17:13.010" Score="7" Body="&lt;p&gt;You are looking at a room full of post-grad students, who are thus convinced of their superior intelligence, some of whom have zero programing experience... I think your only hope is to lean into &lt;em&gt;&lt;strong&gt;live coding&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Whatever you do, don't try to start off with a huge example that shows everything all at once, thinking that you will slowly introduce and describe the basics after the fact.  This will only intimidate and discourage the newbies.&lt;/p&gt;&#xA;&lt;p&gt;Start off with the basics, move as quickly as the students will allow and demonstrate everything in the compiler yourself as you go along. In addition to seeing the concepts work in the real world, the code they are creating also acts as note taking and gives them a reference for the future.&lt;/p&gt;&#xA;&lt;p&gt;Once you are rolling you can fast forward through topics when you see that the students are groking the basics. Covering everything, but spending as little time on it as possible: This is an IDE, it lets you build and compile a program. Commands look like this, notice the dot / arrow notation, it will become important.  Variables have a type and hold values. Basic arithmetic looks like this, notice how values are accumulated. Looping and conditions are managed thusly, see how we can nest the structures together. Methods help with organization and are the most awesome boring topic in existence.&lt;/p&gt;&#xA;&lt;p&gt;What will make all of this stick is having the students code it along with you. Create a basic program demonstrating it all live as you type it in, while the students follow along tying it in on their own computers. Pause after each major topic to give them a chance to solve a mini problem where they use the tool on their own.&lt;/p&gt;&#xA;&lt;p&gt;Stay away from pointers and references. I know the ideas are at the core of C/C++ but * and -&amp;gt; notation is enough to send any newbie away screaming.&lt;/p&gt;&#xA;&lt;p&gt;After each meeting, leave them with some homework. Have them create a project that highlights what they learned, incorporating as many of the past topics as possible. Make the projects as fun and interesting as possible, incorporating graphics as much as you can, even if this means giving them 90% of an app as a starting framework for them to build on.&lt;/p&gt;&#xA;&lt;p&gt;The more experienced the students get, the more confident they get in their ability, the more time you can spend on lecture instead of demonstration.&lt;/p&gt;&#xA;&lt;p&gt;Finally, save class structure for the very end.  After they have been creating static methods and local/global variables for a while, the idea of encapsulating it all into an object that can have multiple instances should now fit into their brains. This is also the time to introduce the idea of pointers and references.&lt;/p&gt;&#xA;&lt;p&gt;Now... does all that qualify as best practice? Meh, I don't think there is such a thing in teaching. While I can back it up by mentioning that I have 15 years of experience teaching at both the high school and college level, it is all of course only my humble opinion.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-11T14:17:13.010" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7376" PostTypeId="2" ParentId="7350" CreationDate="2022-05-11T14:50:17.420" Score="1" Body="&lt;p&gt;I'm going to jump in with an answer that doesn't really apply to your situation. It does however address a key point that you made -- Each solution is unique.&lt;/p&gt;&#xA;&lt;p&gt;The short answer is &amp;quot;both&amp;quot;. Ideally the class is taking place in a teaching lab, and each student (or small group of students) is seated at a computer and they are trying out the ideas as the teacher demonstrates the concept through live coding. After the initial introduction, the students are then given a task to accomplish with the professor and TA's circulating to answer questions, give suggestions, and evaluating results. All of this happening as the students are working on the problems. This kind of live milestone / monitor grading provides the best feedback and chance for understanding. Formative assessment at its finest.&lt;/p&gt;&#xA;&lt;p&gt;Now, with 200 students in the room, I am imaging the classes are lectures held in a large hall and that there are few if any computers present. I would still propose that the students would be best served with the six of you maintaining office hours in the lab and evaluating code while the students are present at a computer instead of collecting the code and staring at a cold and unresponsive display.&lt;/p&gt;&#xA;&lt;p&gt;And I say this as an AP reader who has done exactly that for endless hours.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-11T14:50:17.420" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7377" PostTypeId="2" ParentId="2632" CreationDate="2022-05-11T15:40:20.763" Score="0" Body="&lt;p&gt;I know I am very late to this party (and this idiom), but..&lt;/p&gt;&#xA;&lt;p&gt;The trick to teaching loops is pink hippos.&lt;/p&gt;&#xA;&lt;p&gt;There are five basic parts to a loop.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Control Init (initialize the control variable)&lt;/li&gt;&#xA;&lt;li&gt;Loop Back Spot (a stupid name for the place the code jumps back to)&lt;/li&gt;&#xA;&lt;li&gt;Work (what you are repeating in the loop)&lt;/li&gt;&#xA;&lt;li&gt;Control Step (changing the loop control variable)&lt;/li&gt;&#xA;&lt;li&gt;Exit Check (checking the exit condition and jumping back as needed)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Take a for loop (java for example)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;  for (int ii = 2; ii &amp;lt; 20; ii = ii + 2)&#xA;     System.out.println(ii);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;with the parts labeled:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;  &amp;lt;loop back spot&amp;gt; for (&amp;lt;control init&amp;gt;; &amp;lt;exit check&amp;gt;; &amp;lt;control step&amp;gt;) &#xA;                        &amp;lt;work&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To demonstrate this in class I take out of large jar with 30 little pink hippos and write the five parts left to right across the board.  I then have five students come up to the front of the class room and stand under each of the loop parts. The one under the control step gets the jar of hippos.&lt;/p&gt;&#xA;&lt;p&gt;I then have a sixth student join the group at the front as the computer to run the code. The computer student receives one hippo at the start from the first student. That students job is done. The computer student then moves right passing the loop spot to the student at work. The student standing there then rights number of hippos the computer student is holding on the board.  The exit check student then evaluates the total hippos and gets to declare if the computer student is done. Not enough hippos! Go back to the loop back spot. Continue with the computer student having to hang onto an increasingly hilarious number of hippos. As this is taking place I'm pointing out the order that things happen, and important details like you will never have a value outside the range while inside the for loop.&lt;/p&gt;&#xA;&lt;p&gt;The important points are made, and the students have a clear visual to hang the somewhat esoteric idea onto.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-11T15:40:20.763" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7378" PostTypeId="2" ParentId="7316" CreationDate="2022-05-11T16:26:59.087" Score="2" Body="&lt;p&gt;I know this is coming a week after you wanted it... but, I am an APCS-A teacher and I have been a AP Reader in the past.&lt;/p&gt;&#xA;&lt;p&gt;The scoring guidelines are applied thusly:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;mistake in the code causes bounds error  - Deduct the point for accessing array&lt;/li&gt;&#xA;&lt;li&gt;having deducted a point, pretend the problem is fixed&lt;/li&gt;&#xA;&lt;li&gt;continue scoring with fix&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The goal is to not have a single issue rob a student of all the points.&lt;/p&gt;&#xA;&lt;p&gt;The one exception is the &amp;quot;did they get it right&amp;quot; point. This would be the result of debate with your elbow partner, the table leader and the question leaders.&lt;/p&gt;&#xA;&lt;p&gt;In your specific example the student would probably lose both points as the guideline is specifically mentioning a completed condition that was never reached.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-11T16:26:59.087" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7379" PostTypeId="1" CreationDate="2022-05-12T09:08:44.370" Score="45" ViewCount="10940" Body="&lt;p&gt;Following a discussion on the Academia SE, I would like to seek views here among Computer Science Educators on whether a mark of zero should be awarded if a student submits a program that does not compile for an undergraduate programming assignment.  I will add an answer giving my view on this, but only later on so as not to bias the discussion.  I'd be very grateful for your views.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastEditorUserId="953" LastEditDate="2022-05-13T05:09:55.600" LastActivityDate="2023-01-02T14:22:14.850" Title="If a program does not compile, should it get a mark of zero?" Tags="|programming|undergraduate|grading|auto-graders|" AnswerCount="22" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7380" PostTypeId="2" ParentId="1205" CreationDate="2022-05-12T10:12:49.863" Score="1" Body="&lt;p&gt;My development team (Mrs Marsupial) implemented an application and later a server (because COVID necessitated more remote learning) that solves a lot of these difficulties.  The student uploads their code and the server compiles and runs their code (fairly securely using docker) and the uses LaTeX to generate a .PDF file containing (i) their code suitably formatted and with the files in the correct order; (ii) any compile messages; (iii) the output of their program and (iv) any messages sent to stderr by their program.  Most of the time, if the program works correctly you can just get on with marking the program and adding feedback (I use an ipad to annotate the pdf directly, more time consuming than annotating paper, but still reasonable).  For each module there is am XML file of metadata specifying what files are needed, which data files should be downloaded for testing the program and output files that should be included in the .PDF.&lt;/p&gt;&#xA;&lt;p&gt;If the program doesn't work, the .pdf file contains an embedded .zip file containing the code (in a consistent format) so the marker can extract the code and investigate the problem.&lt;/p&gt;&#xA;&lt;p&gt;This has reduced marking time very substantially and the students seem to like it as well as they can see exactly what the marker sees (no more &amp;quot;it works on my computer&amp;quot;) and also the server keeps a reliably time-stamped record of what was uploaded in case of problems later and the students are encouraged to make regular provisional submissions (no more &amp;quot;my hard drive failed&amp;quot; etc.)&lt;/p&gt;&#xA;&lt;p&gt;We are looking to add extra features such as plagiarism detection and more automated code analysis.  However, a lot of programming is not whether the computer understands the code, but whether a human reader does, so there are some aspects of programming that simply cannot be marked automatically (and when computers can do that, we probably won't need programmers anymore ;o)&lt;/p&gt;&#xA;&lt;p&gt;P.S. I use a simple BASH script to email the feedback to the students, which is much easier than messing around with BlackBoard etc.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-05-12T10:12:49.863" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7381" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T11:30:14.783" Score="51" Body="&lt;p&gt;Of course not, and I have trouble believing that anyone would truly entertain the other position in any serious way.  The closest analog in another field would be if you were to present an essay in a history class, and the professor reserved a technical score of zero if they found any grammatical errors.&lt;/p&gt;&#xA;&lt;p&gt;Let's clear something up: a compiler error is an indicator of a problem in an assignment, and might well mean that the assignment is terrible. But it's only a clue, not a given.  A compiler error in and of itself is only a clue, and there are enough reasons why something might not compile that &lt;em&gt;aren't&lt;/em&gt; terribly concerning that the answer to &amp;quot;doesn't compile = automatic zero&amp;quot; should simply not be true.&lt;/p&gt;&#xA;&lt;p&gt;Let's break that down a little.  There are so many reasons something might not compile that are not under the students control, but could simply be environment-specific.  I can't tell you the number of times a &lt;code&gt;package&lt;/code&gt; statement at the top of a submitted Java file does not reflect my own directory structure.  It compiled fine on the student's computer, and they were unaware of the name of the directory I'd be using to check their work.  The appropriate deduction is no deduction.&lt;/p&gt;&#xA;&lt;p&gt;We have students do large, group projects at the end of the year, and these get presented to the entire department in a CS Fair.  I've had students submit android applications, iphone apps, web apps, unity projects, and do, so many other things.  I quickly realized that I had to see the stuff working on &lt;em&gt;their&lt;/em&gt; computer, not on my own.  I would never even attempt to set up all of the environments I'd need to try it.&lt;/p&gt;&#xA;&lt;p&gt;Then there are small accidents.  A student recently submitted a Java file to me where everything worked, except for an added &lt;code&gt;v&lt;/code&gt; at the beginning of the file, rendering the first command as &lt;code&gt;vimport&lt;/code&gt;.  Her code was otherwise excellent.&lt;/p&gt;&#xA;&lt;p&gt;When I asked the student, she explained to me that she had opened the file up to make sure that she was submitting the correct version, and must have accidentally pressed a key prior to closing it.  Her IDE auto-saves, so there was no Save prompt to warn her of the change&#xA;Any of these is sufficient to make the answer to the question (as posed) an emphatic &lt;em&gt;no.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Furthermore, students regularly submit work that &lt;em&gt;works&lt;/em&gt;, but is terribly made.  Once again, the compiler does not tell us anything relevant to grading.&lt;/p&gt;&#xA;&lt;p&gt;The compiler can be a good first check of the work, and you might decide to deduct 5 points (instead of the zero I believe is proper) simply because it does not compile, but consider my poor &lt;code&gt;v&lt;/code&gt; student, and you can immediately see why more than that would be unfair.&lt;/p&gt;&#xA;&lt;p&gt;Philosophically, we are there to check student understanding and work, and as the prior to examples illustrate, compiling is a poor proxy for these.  It is a clue, but nothing more.&lt;/p&gt;&#xA;&lt;p&gt;If it doesn't compile, that suggests that there is &lt;em&gt;possibly&lt;/em&gt; a serious problem, but that's all it can tell us.  For the rest, we actually have to take the time to read through the submitted work, just like every other professor in every other field.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-05-13T12:41:29.823" LastActivityDate="2022-05-13T12:41:29.823" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7382" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T12:59:03.363" Score="11" Body="&lt;p&gt;I imagine this debate arises from two basic truisms: 1) the fact that nearly all programming languages have simple frame works that allow empty programs to be built in just a few lines; and 2) that even first semester students should be able to iron out basic syntax errors (or have had time to ask for help) by the time they are submitting their first project. Creating a functional program is trivial.&lt;/p&gt;&#xA;&lt;p&gt;Borrowing the imagery from another poster... this is like an English teacher who is confronted with a paper illegibly scratched out in pencil, filled with grammar errors and spelling mistakes. Submitting a project that doesn't compile shows a level of inattentiveness and lack of effort so grand that a zero may be the only way to get through to the student.&lt;/p&gt;&#xA;&lt;p&gt;With that in mind I can think of several scenarios where the debate of &amp;quot;Zero; to be or not to be?&amp;quot; is actually a question.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The student hit the &amp;quot;j&amp;quot; key as they were in the process of submitting the project and the compiler kicks a syntax error. It is obvious what the problem is and the teacher fixes the problem in less time then it would take to give a zero. This is also true of other issues like misaligned paths or unwanted package commands, where the code compiles and runs on the student computer but not on the teachers computer. Fix the problem, and grade the project as if the problem wasn't there.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;em&gt;The following points address situations when, without taking the time to ask for help, the student willfully submits a project that doesn't compile and run.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;p&gt;The student is taking a high level course, attention to detail is part of the grade and the student has been submitting projects for multiple semesters. The student should know enough to check their work. In this case I would consider a zero, or at least dropping the score by a full letter grade.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Projects shouldn't be collected in the first place. Programming is a collaborative art. Students should be encouraged to assist each other and ask for help from the teacher. Anything short of copying the code from another student is allowed. In this environment projects are evaluated as soon as the student completes the task, at the students computer, while the student is sitting there. This allows the teacher to judge success, offer assistance when help is needed and give suggestions for improvements. Formative assessment at its best. This works with even large groups of students because projects are scored based on milestones. When you complete a milestone, your grade jumps up to the next level. Evaluations take just a few seconds because the teacher knows what to expect at each milestone. &lt;em&gt;And&lt;/em&gt; the first milestone is always &amp;quot;Did you get the project to run&amp;quot;. Zeros do happen on rare occasions, but it takes a lot of will to fail in this environment.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The instructor is using an auto grader to accept project submissions. This type of system provides the student with instant feed back. First time students will be confronted with the problems as they occur, learning how to fix them and when to ask for help. Veterans will know that a submission doesn't qualify as a program if the system won't run it and will earn the zero it receives.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="12011" LastEditorUserId="12011" LastEditDate="2022-05-13T12:38:28.937" LastActivityDate="2022-05-13T12:38:28.937" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7383" PostTypeId="2" ParentId="4427" CreationDate="2022-05-12T14:05:15.430" Score="3" Body="&lt;p&gt;This discussion is adjacent to one of the longest running religious wars in Computer Science - is the &amp;quot;goto&amp;quot; command evil.&lt;/p&gt;&#xA;&lt;p&gt;Return, break, continue and even the much reviled goto all do the same thing. They disrupt the flow of the code. If you have a math background and think in algorithms then nothing could be more crazy making than a mid-function return because it makes it all but impossible to create proofs of the validity of the code.  If you have an engineering background, are familiar with the code a compiler produces and the clock cycles needed to complete a task then there is nothing more beautiful then a simple jump command.&lt;/p&gt;&#xA;&lt;p&gt;Two of the venerable grey beards of our discipline Niklaus Wirth and Linus Torvalds have drastically different takes on the topic.  There is a famous exchange with Torvalds where he spells out his point of view (and his opinion of Wirth) in unambiguous detail: &lt;a href=&quot;https://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Using Goto in Linux Kernel Code&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;What it comes down to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you like pretty code, sometimes at the expense of readability, then you hate jumps of any kind.&lt;/li&gt;&#xA;&lt;li&gt;If speed and efficiency is your thing, then its jumping all the way.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12011" LastEditorUserId="12011" LastEditDate="2022-05-19T16:34:49.947" LastActivityDate="2022-05-19T16:34:49.947" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7384" PostTypeId="2" ParentId="5245" CreationDate="2022-05-12T15:28:05.637" Score="1" Body="&lt;p&gt;&lt;strong&gt;Never give up, never surrender.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I have a learning disability. The official diagnosis is low fluency. Functionally it means that I don't remember shit. Joking aside, my memory is image based. I don't retain words or numbers and my only hope of retaining an idea is to create a visual to hang it on. In grade school all of the standardized tests had me on the very low end of average, and all of the teachers thought I was a moron. Even after my discovery of programming and the knock on respect it earned me, I still struggled through high school.&lt;/p&gt;&#xA;&lt;p&gt;But that struggle doesn't define me.&lt;/p&gt;&#xA;&lt;p&gt;I got my first gig as a programmer because I could do the work. I was a professional developer for twelve years. I checked out after the Dot.Com bubble, returning to school with the idea of teaching. This is when I had the Ed-psych testing done and found that what I had been calling Autism and Dyslexia actually had a underlying cause. I taught myself techniques and managed to earn a masters degree in the process.&lt;/p&gt;&#xA;&lt;p&gt;It has been another twelve years and I have seen just about every imaginable type of student in my classroom.&lt;/p&gt;&#xA;&lt;p&gt;Anyone can learn to program.  Anyone with a little drive can learn to program well. I have seen it in countless students. I have seen it in myself.&lt;/p&gt;&#xA;&lt;p&gt;You can do this. Programming isn't an exercises in recall or memory. Every programmer leans into the code completion tools of the compilers while having a browser window open to Google and Stack Overflow. The only trick to getting good is to make it fun for yourself.  For me it was building games. It may be painful now, but it will become easier. Little by little. Step by Step.&lt;/p&gt;&#xA;&lt;p&gt;Watch youTube videos, following along and create their projects with them. Lean into sites like &lt;a href=&quot;https://codingbat.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codingbat&lt;/a&gt; and &lt;a href=&quot;https://www.hackerrank.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hackerrank&lt;/a&gt; to build the reflexes. Don't let a week go by without writing some code.&lt;/p&gt;&#xA;&lt;p&gt;When you get there, when you develop the chops, the person doing the highering isn't going to care about your back ground, or what your process is. If you can get the job done, it won't matter if Autistic is written down next to your name somewhere.&lt;/p&gt;&#xA;&lt;p&gt;Again, &lt;em&gt;Never give up, Never surrender.&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="12011" LastEditorUserId="12011" LastEditDate="2022-05-13T14:53:59.227" LastActivityDate="2022-05-13T14:53:59.227" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7385" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T18:32:38.337" Score="30" Body="&lt;p&gt;Following further with &lt;strong&gt;@Ben I.&lt;/strong&gt;'s answer, I think the real problem is often not giving feedback about whether the program builds to the student in an inspectable and rapid manner, while also allowing multiple submission attempts. (in a worst case, for example, an email attachment that comes back with a grade after the due date)&lt;/p&gt;&#xA;&lt;p&gt;Instead, have a workflow where they upload a specific format to a build server, or better, submit via version-control.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Then&lt;/em&gt; their program &lt;em&gt;must&lt;/em&gt; build there and the system &lt;em&gt;must&lt;/em&gt; give back meaningful feedback (such as compiler/interpreter warnings and full or reduced test case results), and then they can choose a successful build as their submission.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Simple Workflow&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;student creates work submission&lt;/li&gt;&#xA;&lt;li&gt;(after due date) final grade results come in (no opportunity to try teacher's environment unless they crashed office hours)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Better Workflow&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;student creates work submission&lt;/li&gt;&#xA;&lt;li&gt;remotely build program -&amp;gt; feedback to student&lt;/li&gt;&#xA;&lt;li&gt;remotely test program -&amp;gt; feedback to student&lt;/li&gt;&#xA;&lt;li&gt;student has opportunity to submit assignment for grade&lt;/li&gt;&#xA;&lt;li&gt;(after due date) final grade results come in (perhaps run against a much larger test suite with those results)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This doesn't necessarily mean that you should or should not assign zero points to a submission that fails to build, but gives the option of letting the first few or a subset be acceptable! .. Rather, collecting the submissions will help make your/the department's build system more robust and also give a good understanding to yourself (and the class!) about what could be done to help them structure and format programs to build!&lt;/p&gt;&#xA;" OwnerUserId="3350" LastEditorUserId="3350" LastEditDate="2022-05-12T20:29:04.423" LastActivityDate="2022-05-12T20:29:04.423" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7387" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T20:53:32.347" Score="18" Body="&lt;p&gt;I think giving a zero for a non-compiling program can be reasonable and expected behavior in many circumstances. It's &lt;em&gt;pretty close&lt;/em&gt; to what I do now (more below).&lt;/p&gt;&#xA;&lt;h1&gt;The Original Academia SE Question&lt;/h1&gt;&#xA;&lt;p&gt;Note that the consensus in the motivating Academia SE question seems to mostly be that this would be the base expectation (mostly now moved from comments to chat: &lt;a href=&quot;https://academia.stackexchange.com/questions/185044/grading-on-a-curve-in-required-doctoral-course-failing-as-a-result&quot;&gt;https://academia.stackexchange.com/questions/185044/grading-on-a-curve-in-required-doctoral-course-failing-as-a-result&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;A few selections from different users in that chat:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Drake P: ... for the future, you should know that it's very standard&#xA;to give 0s for code that doesn't compile, even at the undergrad level,&#xA;as it makes grading ungodly for teachers otherwise...&lt;/p&gt;&#xA;&lt;p&gt;ilkkachu: what's so tough here? If your code doesn't compile, it&#xA;doesn't work. Nothing gets done. Expecting to get a good grade for&#xA;code that doesn't work sounds like expecting to get a good grade for&#xA;presenting e.g. mathematical proofs or other logical conclusions that&#xA;are totally false...&lt;/p&gt;&#xA;&lt;p&gt;RBarryYou: Technically, a &amp;quot;program that doesn't compile&amp;quot;, isn't&#xA;actually a program. And given how easy it is to check that it does&#xA;actually compile, this seems like an obvious requirement for all but&#xA;the most introductory CS and programming classes.&lt;/p&gt;&#xA;&lt;p&gt;forest: It's not like you don't know if the code compiles until after&#xA;you submit it. If the code doesn't compile, then fix it first.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;My Experience and Practice&lt;/h1&gt;&#xA;&lt;p&gt;I teach the first two semesters of programming with C++ in a two-year CS degree at an open-admissions community college in the northeast U.S., with generally very weak students. The assignment submissions I get are pretty frequently massively scrambled up, nonsensical, often show no understanding of the assignment, and no evidence of testing. There is no lower bound to the quality. So taking a random file and laboring on my end to make sense of it or fix it can take an unbounded amount of time and effort. Therefore it seems reasonable to use compilation as a first-pass check to see if the student has done the basics of making something that &lt;em&gt;satisfies the definition of a program&lt;/em&gt; under our language rules. No, I'm not going to try and make sense or fix student work otherwise. Or, more accurately: I've tried that in the past and it's impossible in most circumstances where the code doesn't at least compile.&lt;/p&gt;&#xA;&lt;p&gt;Now, does a non-compiling assignment get an immediate zero from me? Actually, no. It does get a zero for the correctness &amp;amp; user interface components, which account for 70% of the grade rubric. I still almost always award points for readability &amp;amp; documentation components, which are worth 30%. However -- the only reason I'm willing to do that is that I've written a &lt;a href=&quot;https://github.com/danielrcollins1/StyleChecker&quot; rel=&quot;nofollow noreferrer&quot;&gt;custom style checker&lt;/a&gt; which automates that part of the process for the things I care about (and we've specified in class). If I didn't have that tool available, then it's pretty likely I'd give a zero for the whole thing, and not spend time and headache trying to make sense of a non-program.&lt;/p&gt;&#xA;&lt;h1&gt;Justifying the Grade to Stakeholders&lt;/h1&gt;&#xA;&lt;p&gt;In addition to the preceding, there's the issue of &lt;em&gt;justifying&lt;/em&gt; the grade being given. If I just mark a zero or low grade for something, a student (rightfully) will ask, &amp;quot;Why did I get a low grade?&amp;quot;, and I need to have a clear response. I even need to think about the student challenging the grade I give at the department or college administration level. By being able to point to the clear and objective evidence of the compiler's failure on the student's submission, I have the strongest possible justification for the lowest-level grade being given.&lt;/p&gt;&#xA;&lt;p&gt;We've made the point that non-compiling programs are most often garbage nonsense. In other answers and comments we also see some sentiments like this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;jamesdlin: Then your policy should be to give 0% for submitting&#xA;nonsense, not for submitting code with a compilation error.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;But &amp;quot;this is nonsense&amp;quot; won't be a comprehensible or satisfying response to the student, nor defensible at the administrative level if challenged. Pointing to the objective non-compiling issue is greatly clarifying for all involved. (In fact, if I didn't keenly highlight the compiling issue as a top priority, some of my students would likely not grok its importance at all, and never prioritize it as something they need to try and make happen.) Otherwise, finding ways to document and defend an evaluation of &amp;quot;this is nonsense&amp;quot; will take an egregious amount of time. This is analogous to the issue of &lt;a href=&quot;https://matheducators.stackexchange.com/questions/13423/what-are-the-minimum-criteria-when-checking-homework-for-completion-only&quot;&gt;&amp;quot;grading for completion&amp;quot;&lt;/a&gt; on elementary mathematics homework, for example, which I've also found to be unworkable in my context and experience.&lt;/p&gt;&#xA;&lt;h1&gt;Response to Other Answers&lt;/h1&gt;&#xA;&lt;p&gt;I think some of the answers in the &amp;quot;do not give zero&amp;quot; camp interpret the question too narrowly to make a point. My interpretation is that we're looking for a best-practice that's profitable in a general case. I wouldn't argue for &lt;em&gt;entirely mindlessly&lt;/em&gt; giving zeroes. For instance, I would assume that most of Ben's examples have been double-checked and taken off the table as possibilities. For my courses, I specify the standard environment and IDE on the syllabus. It's the same thing used in lectures, labs, and on my test machine for grading. If a submission doesn't compile, I double-check, and confirm it's due to something in violation of our protocols.&lt;/p&gt;&#xA;&lt;p&gt;I think it's interesting that several of the &amp;quot;do not give zero&amp;quot; advocates, in the comments, have indicated that they are forced to deal with some kind of strange, out-of-control build environments. For example, the OP writes (in a comment under gnasher729's answer):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;an issue that may prevent compilation is that my institution requires&#xA;an LTS (Long Term Support) version of Java and we were using LTS11&#xA;(which is a bit long in the tooth) as LTS17 arrived just too late to&#xA;be installed before the start of the academic year. Some students&#xA;installed a more recent release (my instructions showed how to install&#xA;LTS11 for compatibility) and their IDE prompted them to use more&#xA;recent language features (switch) and their code doesn't compile&#xA;despite being legal. Similar story for C++17 and C++20.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;... a student installs the most recent toolchain rather than the one I&#xA;tell them to (back in October) and has forgotten months later when the&#xA;coursework is due (it is a full year course)... It is perfectly&#xA;reasonable for a good student to have a more up to date toolchain for&#xA;work on other projects (best if students enjoy hobby programming - it&#xA;is something I encourage).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And Ben I. in comments under his answer says:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I, for instance, am required to take submissions through a system&#xA;called &amp;quot;Schoology&amp;quot;, which requires students to compress java files&#xA;prior to submission (dont ask, it's really a problem).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Okay, so if you're teaching with an out-of-control build environment and routinely get &amp;quot;legal but doesn't compile&amp;quot; submissions, then I guess you have to deal with that. I'll say that in my situation the idea of students maintaining multiple build environments and toolsets is completely unimaginable and not something I've ever heard of, or that my students could conceivably be expected to manage. I feel highly responsible (and take quite a bit of time) in trying to ensure that there's one consistent environment used in the labs, lectures, my grading suite, etc., and oversee practice with it every week, so that students can develop confidence in their on-ramp. In 20 years I've simply never gotten an &amp;quot;oops I wrote this correctly for a different environment&amp;quot; submission. It's good for all of us to bear in mind the &lt;a href=&quot;https://academia.meta.stackexchange.com/questions/4471/academia-varies-more-than-you-think-it-does-the-movie&quot;&gt;&amp;quot;Academia varies more than you think it does&amp;quot;&lt;/a&gt; principle. But my advice would be that if you are in that situation, then &lt;em&gt;get your build environment under control&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h1&gt;The Case of Autograders&lt;/h1&gt;&#xA;&lt;p&gt;As an added data point that such a practice is fairly common, consider the fairly widespread practice of using software autograder tools for programming assignments. E.g., one suggested at my school, used widely elsewhere at CUNY, is &lt;a href=&quot;https://gradescope-autograders.readthedocs.io/en/latest/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gradescope&lt;/a&gt; (there are many others going back more than a decade now). The essence of a tool like this is that an automated suite compiles, throws certain inputs, and matches against expected outputs. There is, e.g., no facility for interface, readability, or documentation point awards. In short, there is no way for a tool like this to award any positive points for a program that fails to compile.&lt;/p&gt;&#xA;&lt;p&gt;Is it reasonable to argue against using a tool like that? Sure, and I did so, and we declined to use it in our department. But that's because I wanted to give more feedback and points for styling issues with first-time programmers. From what I'm told of the widespread usage of this tool elsewhere in our system, that must be fairly rare.  But is it completely unimaginable to use an autograder, in light of their giving zero to anything that doesn't compile? It seems hard to make sense of that, given their widespread usage.&lt;/p&gt;&#xA;&lt;h1&gt;More Evidence of Student Practices&lt;/h1&gt;&#xA;&lt;p&gt;In addition to all that, an interesting added observation has appeared in the last year -- partly related to pandemic restrictions, I've switched to giving programming tests on a computer with the standard IDE available for students to use on the test. And the lectern computer in the classroom is set up by default to display what's happening on the student computer monitors, so I've accidentally found myself watching students code test questions in real-time just recently.&lt;/p&gt;&#xA;&lt;p&gt;What I've learned is that -- despite my constant verbal and written recommendations -- the majority of our first-year CS major students will write code for the entirety of a project (e.g., on the final exam about 65 lines code across 6 different functions) without ever trying to compile any of it. At that point they'll hit the &amp;quot;compile&amp;quot; button for the first time and get a huge cascade of errors. Then they'll deal with those errors one at a time trying to get the compile to work -- frequently changing things even further from a correct solution, and adding more code that makes even less sense.&lt;/p&gt;&#xA;&lt;p&gt;So having seen that widespread behavior for the first time, I'm even less happy about awarding partial credit for code that &amp;quot;kind-of-sort-of&amp;quot; echoes a correct solution, when I now know that it wasn't the product of students actually understanding what they wrote, but rather a semi-random process of shoveling fuzz at the compiler. Furthermore, I feel additionally motivated to try and communicate that a process like this is highly unlikely to actually produce a workable large project. They should be writing, compiling, and testing small components -- and apparently the current incentives are negative for practicing that behavior. If we made additional emphasis om the requirement to compile before earning any points, then perhaps students like mine would attend to that correct process more closely.&lt;/p&gt;&#xA;&lt;h1&gt;Conclusion&lt;/h1&gt;&#xA;&lt;p&gt;So: I do give zeroes for non-compilation, at least for a majority component of an assignment's grade. That's after double-checking for unforeseen causes that I failed to define properly for students -- which in practice hasn't happened in some years. Other credit is available for styling &amp;amp; documentation. But I've found it generally impossible to &amp;quot;fix&amp;quot; submissions from my students, and I use compiling as a first-pass to see whether something which counts as a program has been submitted.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, evidence is that it's probably pretty widespread for other CS instructors to not go to the trouble that I do, and likely have a process that gives a zero by default for non-programs (e.g., with a standard autograder tool). If I attended someone else's class myself, that would be my default expectation.&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2022-12-25T04:36:30.543" LastActivityDate="2022-12-25T04:36:30.543" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7388" PostTypeId="2" ParentId="7373" CreationDate="2022-05-12T21:02:16.043" Score="-2" Body="&lt;p&gt;You need to stay within the zone of proximal development.&lt;/p&gt;&#xA;&lt;p&gt;Learning C++, and learning to program at the same time, is too big a step. People can not learn too much at one time.&lt;/p&gt;&#xA;&lt;p&gt;Therefore students should first learn to program, then (if needed) learn C++.&lt;/p&gt;&#xA;&lt;p&gt;The ideal language to use when learning to program will be a language that does not need learning, because it has no or little syntax.&lt;/p&gt;&#xA;&lt;p&gt;In by experience, (tutoring university students, and working with graduates) Java it too complex to use as a teaching language. Students spend too much time stuck, too much time trying to learn the language, while still having no idea how to program. They can learn to program, because they don't know the language. They can learn the language, because they can't program. If they don't get help to learn to program via a different language, or have “the right stuff“, then they end up not being able to program.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-05-12T21:02:16.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7389" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T21:15:36.633" Score="54" Body="&lt;p&gt;This answer assumes that the course's goal is to teach programming (as opposed to teaching advanced algorithms or numerics etc. to which the programming would only be an end). In that case I'd hold: It is a hard requirement that the program builds.&lt;/p&gt;&#xA;&lt;p&gt;It's not so much that the submission would be &lt;em&gt;graded&lt;/em&gt; with zero points; it's rather that it will be &lt;em&gt;rejected&lt;/em&gt; because &lt;strong&gt;it is not gradable.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This should, of course, be announced beforehand, together with a defined development environment and, if possible, a &amp;quot;grading machine&amp;quot; that can be used to check the program before submission. Ideally, there would be an automated submit/build mechanism as suggested in other answers.&lt;/p&gt;&#xA;&lt;p&gt;Rationale:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Programming is the topic here. A program that doesn't build doesn't meet the minimal requirements for submission. It's like asking to grade an architect's house which collapses. &amp;quot;But it has a beautiful stairwell, if you'd only care to dig through the rubble!&amp;quot; No thanks.&lt;/li&gt;&#xA;&lt;li&gt;The teacher's time is limited. Grading by reading would take too long.&lt;/li&gt;&#xA;&lt;li&gt;The &amp;quot;must build&amp;quot; criteria is self-understood in the real world. It is good to get used to it. The customer won't pay you for a system that doesn't run, and the professor won't grade you.&lt;/li&gt;&#xA;&lt;li&gt;The programming environments for teaching programming are typically plain vanilla installations of Linux/gcc or the like which are easy to reproduce and are fairly compatible on the source code level.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Note because of ongoing discussion: No rule is absolute, nor should it be. This answer concerns programs that are submitted in a flawed state, not weird, unusual occurrences.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastEditorUserId="1675" LastEditDate="2022-05-15T11:55:02.730" LastActivityDate="2022-05-15T11:55:02.730" CommentCount="19" ContentLicense="CC BY-SA 4.0" />
  <row Id="7390" PostTypeId="2" ParentId="7379" CreationDate="2022-05-12T22:45:31.333" Score="13" Body="&lt;p&gt;As a blanket policy, I would say that automatically assigning a grade of zero for any submission that doesn't compile is completely unreasonable. Aside from the reasons that &lt;a href=&quot;https://cseducators.stackexchange.com/a/7381/1319&quot;&gt;Ben I. has already listed&lt;/a&gt;, depending on how you are accepting programming assignment submissions, the student's program may even have been corrupted by your university's e-mail servers (I personally remember this happening multiple times when I was in undergrad, including at least one case where empty .zip files were delivered to the professor and others where the e-mail just didn't show up at all.)&lt;/p&gt;&#xA;&lt;p&gt;Unless you have a system like what &lt;a href=&quot;https://cseducators.stackexchange.com/a/7385/1319&quot;&gt;ti7 suggested&lt;/a&gt; where students are submitting to a build server via a version control system directly with a strictly consistent build environment, corruption in transmission (e.g. by spam filters or virus scans) as well as configuration management problems are almost always a possibility. Giving a student a zero because the university's IT interfered with the submission or because you had a different version of the build tools, your environment was set up slightly differently, paths were different, etc. is completely unreasonable. Even deducting points for that is unreasonable unless you very clearly and precisely defined the environment and the student obviously strayed in a non-trivial way from what was defined. To give another example from personal experience, I recall a situation where I spent days trying to debug a program only to find that the professor was building and running it on a completely different operating system than the one my submission had been written for (and the one I wrote it for and documented it was written for was explicitly allowed for the assignment.)&lt;/p&gt;&#xA;&lt;p&gt;Now with all of that being said, on the flip side, if a student submits complete gibberish that makes no sense either to a compiler or upon manual inspection of the source and/or demonstrates no intent to even try to complete the assignment, then a grade of zero would be reasonable. But that would be true regardless of whether the program compiles or not. For example, it would be completely reasonable to assign a grade of zero if a student submits even a working &amp;quot;Hello World!&amp;quot; program for an assignment where they were supposed to implement some complex data structure. Or if the assignment was in Java, but the student submitted a program in &lt;a href=&quot;https://en.wikipedia.org/wiki/Whitespace_(programming_language)&quot; rel=&quot;noreferrer&quot;&gt;Whitespace&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Cases in between those extremes should receive grades between those extremes. A large, complex program submission that would have worked perfectly, had it not lacked a single semi-colon is a completely different animal from a case where the student didn't even try. It may deserve a few points off, but not a failing grade, let alone a zero. A program submission that demonstrates the student was trying, but just not getting it may deserve a failing grade, but probably not zero.&lt;/p&gt;&#xA;" OwnerUserId="1319" LastActivityDate="2022-05-12T22:45:31.333" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7391" PostTypeId="2" ParentId="7373" CreationDate="2022-05-12T23:13:32.047" Score="1" Body="&lt;p&gt;I also teach at the University level and have found great success in teaching C++ by doing visual &amp;amp; interactive program examples, exercises and assignments.&lt;/p&gt;&#xA;&lt;p&gt;Something like the Coding Train's &lt;a href=&quot;https://youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intro Programming&lt;/a&gt; but with C++. You could use &lt;a href=&quot;https://www.raylib.com/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;raylib&lt;/a&gt; to help provide simple drawing and interactivity.&lt;/p&gt;&#xA;&lt;p&gt;Hope this helps!&lt;/p&gt;&#xA;" OwnerUserId="12056" LastActivityDate="2022-05-12T23:13:32.047" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7392" PostTypeId="2" ParentId="7373" CreationDate="2022-05-12T23:31:12.540" Score="4" Body="&lt;p&gt;Your instincts are correct - there are alternatives to lecturing, but &lt;a href=&quot;https://teaching.berkeley.edu/news/lecture-or-not-lecture-how-about-maybe-0&quot; rel=&quot;nofollow noreferrer&quot;&gt;every pedagogical method has its place&lt;/a&gt;. I generally reserve lectures as an opportunity to highlight a few difficult concepts from the text and address questions.&lt;/p&gt;&#xA;&lt;p&gt;I favor OER textbooks, a flipped classroom, and students working on assignments in class. Assignments could be either straight programming tasks or guided exercises. Not sure what content you plan to focus or how dirty you want to get, but there are several decent C++ OER books based on Sphinx/docutils:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://opendsa-server.cs.vt.edu&quot; rel=&quot;nofollow noreferrer&quot;&gt;OpenDSA&lt;/a&gt; is an interactive open data structures textbook, but people are growing it beyond data structures content. It has config files allowing you to customize your own textbook. I used it years ago, but found working in the environment harder than I liked.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://runestone.academy/user/login?_next=/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Runestone Academy&lt;/a&gt; is a general framework for creating interactive OER. My current textbook uses Runestone, but I self-host (on GitHub pages) so that the book is 100% free for students. Runestone can host your course for you, but there are some (small) fees for students. I have not looked deeply into it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Both of these environments support assessments in the text, but otherwise, the details are different. If you are already familiar with &lt;a href=&quot;https://www.sphinx-doc.org/en/master/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Sphinx-doc&lt;/a&gt;, I think Runestone has a short learning curve. If you want to see a self-hosted example (&lt;a href=&quot;https://daveparillo.github.io/cisc187-reader/index.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;my textbook&lt;/a&gt;). &lt;a href=&quot;https://github.com/DaveParillo/cisc187-reader&quot; rel=&quot;nofollow noreferrer&quot;&gt;Book source&lt;/a&gt; is on GitHub. A &lt;a href=&quot;https://github.com/DaveParillo/cisc192-reader&quot; rel=&quot;nofollow noreferrer&quot;&gt;first semester version&lt;/a&gt; based on &lt;a href=&quot;https://open.umn.edu/opentextbooks/textbooks/how-to-think-like-a-computer-scientist-c-version&quot; rel=&quot;nofollow noreferrer&quot;&gt;How to Think Like a Computer Scientist&lt;/a&gt; is a work in progress. You could look at that outline to get a sense of what is reasonable for a single semester.&lt;/p&gt;&#xA;&lt;p&gt;Another thing to consider are the assignments themselves. Most of my assignments are in the style of &lt;a href=&quot;https://exercism.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;Exercism.io&lt;/a&gt;. Students are presented with a programming problem and they need to write code that passes the unit tests. Most students find this approach both challenging and engaging.&lt;/p&gt;&#xA;&lt;p&gt;Another approach useful in a flipped classroom is POGIL. There is a Process Oriented Guided Inquiry Learning &lt;a href=&quot;https://cspogil.org/Home&quot; rel=&quot;nofollow noreferrer&quot;&gt;(POGIL) in Computer Science&lt;/a&gt; group and they provide activities, training, mentoring, and POGIL workshops-on-request. I have found them to be quite responsive and helpful.&lt;/p&gt;&#xA;&lt;p&gt;Whatever you do, focus on getting students to write code. You can listen to classical music your whole life and never learn to play an instrument. Programming is not a spectator sport.&lt;/p&gt;&#xA;&lt;p&gt;As far as content, I prefer to teach a more modern version of C++. Generally, I'm in alignment with &lt;a href=&quot;https://cseducators.stackexchange.com/a/7375/12055&quot;&gt;codingCat&lt;/a&gt; - I focus on coding as much as is possible -&amp;gt; the type system, string and vector first, then functions, structures, and classes mostly in that order - although I use &lt;a href=&quot;https://en.cppreference.com/w/cpp/named_req/PODType&quot; rel=&quot;nofollow noreferrer&quot;&gt;POD's&lt;/a&gt; from the first few weeks. I will say that unlike codingCat, I cover pointers and references (not in that order) when I cover passing semantics for functions.  Something to consider is that if you focus on (post?)-modern C++, you can write much more code that appears to have pass by value semantics, but isn't (move semantics).  You can have your examples look simple and then once the basics are understood explain the magic that make the simple looking stuff happen (e.g. move semantics).&lt;/p&gt;&#xA;&lt;p&gt;I see a lot of courses in a big hurry to teach OO right away. There are a lot of pitfalls to be aware of in OO and C++ is already a language with more pitfalls than most. Classes are collections of functions and data. If students can't write decent functions, then they are unlikely to write decent classes. Classes are everything that functions are and &lt;em&gt;&lt;strong&gt;more&lt;/strong&gt;&lt;/em&gt;. Also, C++ is a multi-paradigm language - people need to expect that not everything will be in a class. This can become a religious war, but I assume you have a course outline you are required to follow, so do what you have to do.&lt;/p&gt;&#xA;" OwnerUserId="12055" LastActivityDate="2022-05-12T23:31:12.540" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7393" PostTypeId="2" ParentId="7373" CreationDate="2022-05-13T01:27:34.087" Score="0" Body="&lt;p&gt;If the point is to learn C++, you must learn C. Must. You must understand addresses, pointers, structures, argument passing, memory allocation, the stack and a backtrace. You must understand implicit conversions and the difference between floating point and integer math and the limits and sizes of built-in types. You must understand linkage. Any way you do it, you can't escape these topics.&lt;/p&gt;&#xA;" OwnerUserId="12059" LastActivityDate="2022-05-13T01:27:34.087" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7394" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T06:37:19.480" Score="7" Body="&lt;p&gt;As a former IT Lecturer, In My point of view, as the first step in practical examination students can be given a &lt;strong&gt;&amp;quot;Written-test&amp;quot;&lt;/strong&gt; where they can write the Algorithm &amp;amp; pseudo code/logic of the program so that we can also evaluate the level of knowledge of that student before compiling the program code.&#xA;Also, they can be awarded several credits if the logic &amp;amp; algorithm, even if the student failed to compile the program on running.&lt;/p&gt;&#xA;" OwnerUserId="12065" LastActivityDate="2022-05-13T06:37:19.480" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7395" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T08:17:05.990" Score="16" Body="&lt;h3&gt;I enforced this exact policy (&amp;quot;doesn't compile = failure&amp;quot;)&lt;/h3&gt;&#xA;&lt;p&gt;For several years I was the assessor on a postgraduate course on C++ (&lt;em&gt;Financial computing with C++&lt;/em&gt;) given at the mathematics department, and I enforced this exact policy. If a student submitted work to me that didn't compile, it would get an immediate &amp;quot;D&amp;quot; grade (the lowest score on the scale, corresponding to 0%). Typically about 1-2 students a week would get stung by this for the first few weeks of the course. No exceptions, zero sympathy, without remorse, etc. Of course when students couldn't achieve code that compiled, it would be extremely frustrating for them to be in this scenario, but there was good reason for enforcing this, which I'll explain. Furthermore, I was also a student on this same course, so can understand the exact same pressure to get code past the compilation milestone, by any means necessary, even if the code becomes hacky.&lt;/p&gt;&#xA;&lt;h3&gt;Why enforce such a strict policy&lt;/h3&gt;&#xA;&lt;p&gt;If the goal of the course is to teach numerical algorithms, computational linear algebra, or advanced scientific computing, or anything similar where the aim of the course is to teach the core science, then it's very rare to see anything use a compiled language, and I would be more inclined to disagree with such a policy. However, when courses are aiming to teach high performance computing languages and software engineering as its primary skill, compilation is essential. There are a few reasons for this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Code that doesn't compile would be rejected without question in any commercial or professional setting, without a moment's hesitation, as other answers have highlighted.&lt;/li&gt;&#xA;&lt;li&gt;A program that doesn't compile isn't really a program.&lt;/li&gt;&#xA;&lt;li&gt;Getting code to compile is a key skill, and crucially it is something the students are able to iterate on themselves before it needs to be submitted. That the code doesn't compile shouldn't surprise them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Is it just compilation?&lt;/h3&gt;&#xA;&lt;p&gt;Having code which compiles is the absolute baseline. However, it is not the last hurdle. If the program always encounters a runtime error straight after launch or gets caught in an infinite loop, these are viewed with equal frustration from the assessor, and if the code always seg faulted immediately, it would also fail for similar reasons. However, the compiler is usually your friend giving tips and suggestions about whats it's complaining about.&lt;/p&gt;&#xA;&lt;h3&gt;Can the students be safeguarded?&lt;/h3&gt;&#xA;&lt;p&gt;It will vary from course to course, but naturally it is in &lt;em&gt;everyone's&lt;/em&gt; interest if the code compiles. For our particular setting, we went to great lengths to set all the students up with a system agnostic build environment, used the same compiler, and shipped all the external libraries they would need with the projects. We also did a 2 day setup to ensure everyone could build and run a hello world, the homework assignments, and the exam assignments.&lt;/p&gt;&#xA;&lt;p&gt;At the start of the course, I would tell all the students directly that failure to compile would result in a fail grade (for all the reasons stated above), and set out similar grading criteria.&lt;/p&gt;&#xA;&lt;h3&gt;The myth that this is easier for the assessor&lt;/h3&gt;&#xA;&lt;p&gt;There seems to be the idea/myth that such a blanket policy is an easy option for the assessor. As someone who marked 30 or more code submissions each week, this is absolutely wrong. When a code came along that did not compile, while it got a failure immediately, the marking was not done there. I then had to go into the source code, set it up, compile, and then debug the compilation problems, so I could explain to the students what they needed to change and explain the compiler warnings/errors. Code that compiled but was wrong is easier to debug, but code that doesn't compile is a nightmare. Certainly it takes 10x longer than other mistakes that did compile, and it certainly was a lose-lose situation for the student and the assessor.&lt;/p&gt;&#xA;&lt;h1&gt;Corner cases&lt;/h1&gt;&#xA;&lt;p&gt;While I agree there is scope for arguably valid corner cases, I have never seen one in the wild after having been marking these examples for several years, so think this is a null argument.&lt;/p&gt;&#xA;" OwnerUserId="2993" LastActivityDate="2022-05-13T08:17:05.990" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7396" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T08:42:53.423" Score="7" Body="&lt;p&gt;I never understood why to otherwise highly intelligent people this is even a question. Like: Is an empty file to you literally the same as a 99.9% correct code with that missing semicolon or whatever ?&lt;/p&gt;&#xA;&lt;p&gt;There is literally nothing more to say here except a clear and resounding &lt;strong&gt;NO&lt;/strong&gt; you should obviously not award 0% of the points to a submission that may be 99% correct.&lt;/p&gt;&#xA;" OwnerUserId="11461" LastActivityDate="2022-05-13T08:42:53.423" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7397" PostTypeId="2" ParentId="7373" CreationDate="2022-05-13T10:42:52.337" Score="1" Body="&lt;p&gt;I teach C and C++ in the second year, who were taught Java in the previous year by myself and a colleague.  Due to COVID I pre-recorded the lectures I used to give so that the students could watch them in their own time.  I indexed the videos at each change of slide so that they could easily navigate to the bit they wanted, which seemed a good compromise between having lots of short unconnected videos and an overly long traditional lecture.  The idea was that they would watch the videos, and if they had questions or wanted me to go over examples of something, they could let me know (via a discussion forum) and I would give a live lecture later in the week (just before the lab) which would be a mixture of explaining answers to questions with new slides generated for that week, informal Q&amp;amp;A and live programming demos (my traditional lectures also had lots of that).&lt;/p&gt;&#xA;&lt;p&gt;This approach seems to work well - many students are uncomfortable asking questions out loud in a live lecture, but were much more comfortable with the chat facility used in the remote live lectures, so there was much more interaction than before and I could be more responsive to student's difficulties/questions.&lt;/p&gt;&#xA;&lt;p&gt;Different people like to learn in different ways, and this approach works whether you actually &lt;em&gt;like&lt;/em&gt; watching formal programming lectures, or just want to watch them in sped-up 10 minutes sections, or ignore them altogether and read books/experiment with the computer.&lt;/p&gt;&#xA;&lt;p&gt;The key thing is for the lab classes and exercises to be well designed and get the concepts in the right order.&lt;/p&gt;&#xA;&lt;p&gt;As we do C and then C++, we cover pointers and memory allocation in C.  Note: we teach C and C++ as distinct goals, we are not teaching C purely as a prelude to C++. This is a major stumbling block for students to it is important they understand it properly at an early stage.  As they have done Java the year before, they find the concept of the variable actually being the object (rather than a reference) rather difficult and they tend to write very inefficient C++ code, so that is also something to emphasize early.  Being from a Java background they have difficulties with C++ references because Java references are epsilon different from a C pointer and the terminology confuses.  I approach classes via structs which we did earlier in the C part of the course.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastEditorUserId="11932" LastEditDate="2022-05-17T11:13:28.733" LastActivityDate="2022-05-17T11:13:28.733" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7398" PostTypeId="1" AcceptedAnswerId="7409" CreationDate="2022-05-13T12:28:19.573" Score="3" ViewCount="430" Body="&lt;p&gt;While searching on the internet I found  almost every programming language said implement your own factorial function, rather than giving built-in function for it.&#xA;Some of &lt;a href=&quot;https://stackoverflow.com/questions/50132863/is-there-any-built-in-factorial-function-in-c&quot;&gt;stackoverflow answers&lt;/a&gt; mention that it is too easy to implement that is why they leave it to programmers. However, then the question arise, why&#xA;the language designer can code and implement very complex function in built in library, but not the easy factorial why?&lt;/p&gt;&#xA;" OwnerUserId="5828" LastEditorUserId="204" LastEditDate="2022-05-18T09:16:23.230" LastActivityDate="2022-05-18T09:16:23.230" Title="why programming languages does not have factorial function?" Tags="|c++|mathematics|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7399" PostTypeId="2" ParentId="7364" CreationDate="2022-05-13T13:04:43.150" Score="1" Body="&lt;p&gt;As it is famous among programmers practice is the only key&#xA;first of all you should know some common algorithms which are handy when we solve problems and interview&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/most-important-type-of-algorithms/&quot; rel=&quot;nofollow noreferrer&quot;&gt;important-type-of-algorithms&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;then you should also &lt;a href=&quot;https://www.geeksforgeeks.org/sorting-algorithms/&quot; rel=&quot;nofollow noreferrer&quot;&gt;sorting-algorithms&lt;/a&gt;&#xA;you don't need to practice all you can google most common sorting algos&lt;/p&gt;&#xA;&lt;p&gt;now comes the real beast&#xA;linked list, arrays trees and other Data Structures&lt;/p&gt;&#xA;&lt;p&gt;to practice and learn them follwing resources are best known:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://neetcode.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://neetcode.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://leetcode.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://leetcode.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.hackerrank.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.hackerrank.com/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="5828" LastActivityDate="2022-05-13T13:04:43.150" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7400" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T13:09:06.660" Score="7" Body="&lt;p&gt;Former student perspective here. A lot of people mentioned that in a commercial or professional enviornment, code that doesn't compile would be worthless. I would pose the following counter argument to that. While I was attending university, I rarely saw or have ever seen students treat being a student like a full time job doing 40 hours a week of both visting lectures and studying at home. Some may have come close to it while others simply couldn't due to working second or third jobs on the side.&lt;/p&gt;&#xA;&lt;p&gt;A student who has to split his attention to multiple courses and probably has to work a second job shouldn't have to uphold the same standard of &lt;em&gt;&amp;quot;doesn't work = failure&amp;quot;&lt;/em&gt; as someone working a paid full time job as a software developer.&lt;/p&gt;&#xA;&lt;p&gt;Students will make mistakes, sometimes quite silly, sometimes more serious but it feels incredibly unfair and bitter if the turned in work isn't even properly looked at.&lt;/p&gt;&#xA;" OwnerUserId="12075" LastActivityDate="2022-05-13T13:09:06.660" CommentCount="23" ContentLicense="CC BY-SA 4.0" />
  <row Id="7401" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T13:13:48.657" Score="10" Body="&lt;p&gt;It is an important but quite simple-to-answer question once you adopt a certain mindset. First, we need to ask ourselves: if the only thing that supposedly matters is whether the code compiles or not, why aren't students just told to send compiled binaries instead? The answer to that question is quite obvious: we are supposed to grade the source code, not just the executable it creates. If the source does not compile by the virtue of some factor, why should educators suddenly not care about the human-readable content of the file? Equating that situation to a student sending a corrupted or password-encrypted file is quite disrespectful and unfair to the student's time and effort, and honestly shows what could be interpreted as educator's laziness. And especially more so if the compiler error is caused by something that could be fixed within less than a minute, like a missing semicolon or a stray character.&lt;/p&gt;&#xA;&lt;p&gt;If you really do want to reject programs based on technical aspects like compiler errors, instruct students not to send source code at all and tell them to send just the compiled binaries instead. Otherwise, it is intellectually dishonest.&lt;/p&gt;&#xA;" OwnerUserId="12078" LastEditorUserId="12078" LastEditDate="2022-05-13T13:21:09.693" LastActivityDate="2022-05-13T13:21:09.693" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7402" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T14:03:32.970" Score="9" Body="&lt;p&gt;My policy when correcting assignments for a similar course was close to this but also addresses some of the criticisms:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Students are aware that they shall submit compiling code. They are sufficiently trained to at least locate sources of the vast majority of errors they can possibly encounter.&lt;/li&gt;&#xA;&lt;li&gt;If a student cannot get a part of the code to compile, they shall also submit the most complete code that does compile or similar and comment on this, e.g., like: “When I try to add this functionality, I get this compiler error. I fail to make sense of this, because …”&lt;/li&gt;&#xA;&lt;li&gt;If the student did not make use of the previous point and their code fails to compile, I spend less than a minute trying to fix the code myself.&lt;/li&gt;&#xA;&lt;li&gt;Any other non-compiling solution gets zero points, and I don’t spend further time on it.&lt;/li&gt;&#xA;&lt;li&gt;In this case, the student is granted the opportunity to fix their solution (without substantial changes) or demonstrate that it compiles on their machine. In that case, I will grade the assignment as usual. Since I can easily compare both solutions, this cannot be abused to gain time.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So, in other words, if your code does not compile, your submission should appropriately reflect that or it is upon you to convince me that you had reason to believe you submitted compiling code (and you get a delayed feedback).&lt;/p&gt;&#xA;&lt;p&gt;The rationale is that unlike most errors you can make in assignments, failure to compile is a problem that is straightforward to notice before submission. Thus students should at the very least notice and comment on it. Last-minute typos or environment differences pose an exception to this, but those are straightforward to clarify as per the last of the above points.&lt;/p&gt;&#xA;&lt;p&gt;I think a reasonable analogue to non-compiling code is: In a physics lab course, a student misunderstood how to read a measurement device and thinks any value yielded by the device is zero. The student doesn’t remark that something is wrong during the experiment or in their report, but instead blindly uses the zeros and obtains a totally nonsensical result for a natural constant.&lt;/p&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditDate="2022-05-14T07:53:16.207" LastActivityDate="2022-05-14T07:53:16.207" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7403" PostTypeId="2" ParentId="7398" CreationDate="2022-05-13T14:41:53.077" Score="2" Body="&lt;p&gt;Let's take C as an example The programming language C was created without any built in functions. This was a very deliberate choice.&lt;/p&gt;&#xA;&lt;p&gt;When you create a helper such as a factorial function you are placing flag in the ground that says &amp;quot;this is how things are done&amp;quot;. That may seem great at the moment of inception, but may greatly diminish the future of the language. It may rob future developers of the ability improve the logic of a tool due to the need to maintain legacy code.&lt;/p&gt;&#xA;&lt;p&gt;User interface is another reason that most modern languages lack built in functions. When you create a UI function, you are tying the language to the platform it was designed on.&lt;/p&gt;&#xA;&lt;p&gt;Functions are left to the developer to maintain the utility of the language.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-13T14:41:53.077" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7404" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T14:50:19.973" Score="2" Body="&lt;p&gt;Non-compilation should be a zero if and only if learning to debug compilation errors is outside the scope of the course.&lt;/p&gt;&#xA;&lt;p&gt;The purpose of any course is to cultivate understanding of the material, and in order to achieve that, the professor and TAs must be able to generate useful feedback on the subject and students must be able to receive it.&lt;/p&gt;&#xA;&lt;p&gt;If the subject is &amp;quot;C++ for beginners,&amp;quot; a question about the message &amp;quot;foobar is declared but not defined&amp;quot; is germane for office hours, and a submission failing with such an error message should be treated as a problem understanding the course material. The grader should be able to provide useful feedback, and should search the rest of the submission for other successes/failures of understanding (i.e. give partial credit.)&lt;/p&gt;&#xA;&lt;p&gt;If the subject is &amp;quot;building widgets with C++&amp;quot; and requires the former as a prerequisite, compilation failures no longer represent a problem understanding the course material, but rather a problem in the student's understanding of their prerequisite courses. Providing useful feedback would be harder for the grader for two reasons - first, the material is more complex, and harder to assess for partial credit without the assistance of automated tools that only work on a compiled submission. Second, if the grader is a graduate or undergraduate TA, they may have no experience teaching the content of the beginner level course. They could fix the problem themselves, but may struggle to explain the fix in a pedagogically useful way.&lt;/p&gt;&#xA;&lt;p&gt;In such a higher-level course, boneheaded mistakes (like accidentally editing a file before submission, or messing with environment settings and forgetting to set them back to course-default before testing a submission) can be covered by an allowance for resubmission. If the student understands their prerequisites, they'll have no issue resubmitting working code once alerted to the issue by the zero (or, ideally, by the build server when attempting a submission.)&lt;/p&gt;&#xA;&lt;p&gt;But if the student really doesn't understand their prerequisites, that needs to be treated as a problem that will prevent them from succeeding in the course. Even if the grader puts in the extra effort to give them detailed feedback (partial credit) the student will be unprepared to receive and integrate that feedback, wasting both people's time and endangering the student's chances of success.&lt;/p&gt;&#xA;" OwnerUserId="11357" LastActivityDate="2022-05-13T14:50:19.973" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7405" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T15:05:11.483" Score="2" Body="&lt;p&gt;A program will very often compile or not compile depending on its environment. Larger programs distributed as source code will often have configuration lines containing hundreds and hundreds of lines to configure the program to compile and run on a particular version.&lt;/p&gt;&#xA;&lt;p&gt;For example, where I work a program may be required to run on MacOS, with different processors, with different SDKs, and on an iPhone, iPad, Apple Watch, Apple TV, simulators for the last four running on different processors. And we haven't even started looking at different Windows or Linux versions, Android, and then at more obscure machines. Getting a program to work on all versions is a lot of work.&lt;/p&gt;&#xA;&lt;p&gt;If you just use a Mac, a Linux box, and a Windows PC, chances that a non-trivial program compiles on all three if it was only tested on one are low. If it doesn't compile on &lt;em&gt;your&lt;/em&gt; machine, there's a good chance that &lt;em&gt;you&lt;/em&gt; couldn't make it work on both your and my machine.&lt;/p&gt;&#xA;" OwnerUserId="4529" LastActivityDate="2022-05-13T15:05:11.483" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7406" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T15:30:59.520" Score="2" Body="&lt;p&gt;TBH it depends on the level of abstraction, and hence, the likelihood that build fails result from compilation errors. If the program is written in a low-level language like C with strict regards to the runtime environment then you can rest assured the project should be a fail since the student was most probably aware of their build failing...&lt;/p&gt;&#xA;&lt;p&gt;But in a higher-level language like Java, you can experience build failures when running the code in new environments with different configs, different user permissions, different platform features, the list goes on.&lt;/p&gt;&#xA;&lt;p&gt;Having said that, if you can &lt;strong&gt;ensure&lt;/strong&gt; that build failures are a direct result of failing the exercise in the question, i.e. getting to code to work, then it would be understandable to fail any programs that don't build. However this criteria is full of asterixis, mainly the question of &amp;quot;how can the student prove their build succeeded?&amp;quot;. For less experienced programmers, it would be fair to allow them to demonstrate a build on their local machine. However, more advanced students should be aware of the circumstances when deploying to external environments.&lt;/p&gt;&#xA;&lt;p&gt;The real question to ask is how trivial is the build error? Is it due to semantics? In which case it's a definite fail... is it due to mismatching configurations? discrepancies in runtime environments, execution platforms, external tools and dependencies? Then that's a less fundamental failure in my opinion.&lt;/p&gt;&#xA;&lt;p&gt;As the teacher, you should really clarify the conditions for a build failure, i.e. the machine that their code will be built on. If possible, provide them with a virtual machine to deploy to (or some other pre-configured device). If possible, ask them to submit pre-compiled executables/binaries should their build fail or simply ask for a live demonstration orchestrated entirely by the student (especially convenient for remote-learners).&lt;/p&gt;&#xA;" OwnerUserId="12080" LastActivityDate="2022-05-13T15:30:59.520" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7407" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T20:14:51.117" Score="4" Body="&lt;p&gt;I think zeroes for anything other than completely missing work are a sign of teacher laziness. The professional way to do this is to have a rubric. One element of the rubric can be &amp;quot;code compiles.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;If it doesn't, there are several things you can do:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If it's possible (that is, wasn't turned in on the last day of the semester), give it back to the student and tell them to fix the errors and make sure it compiles. Then grade it.&lt;/li&gt;&#xA;&lt;li&gt;If that's not an option, first see just how far is it from compiling? If the compiler finds a single error like a variable with the wrong case or a missing semicolon, I'd just make the change, deduct some points for not making sure it compiles, then run it and grade it.&lt;/li&gt;&#xA;&lt;li&gt;If it's not even close to compiling, and would take a lot of work to get it there, I'd look through the code to see if it's implementing the expected algorithms more or less correctly and in the right order. Any decent programming teacher should be able to see if a program is on the right track or not even close without having to run it. I'd give them points on the rubric for places I can see they did the right thing and deduct all the points for not compiling. They'd get a bad grade but not a zero.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12089" LastActivityDate="2022-05-13T20:14:51.117" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7408" PostTypeId="2" ParentId="7379" CreationDate="2022-05-13T23:06:00.187" Score="2" Body="&lt;h1&gt;Yes&lt;/h1&gt;&#xA;&lt;p&gt;Your job as an educator is not only to teach the knowledge of the subject at hand but also to prepare the student for the application of said knowledge in the real world.&lt;/p&gt;&#xA;&lt;p&gt;No one gets credit for software that fails to compile when they start working in the real world. It is better to set that expectation now than when their job and livelihood depend on it.&lt;/p&gt;&#xA;" OwnerUserId="2947" LastActivityDate="2022-05-13T23:06:00.187" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7409" PostTypeId="2" ParentId="7398" CreationDate="2022-05-13T23:45:48.133" Score="6" Body="&lt;p&gt;Most programming languages don't have any built-in functions and such additional functions are provided by &amp;quot;standard library&amp;quot; of sorts. This answer addresses why factorial is unlikely to be found in &amp;quot;standard library&amp;quot; either.&lt;/p&gt;&#xA;&lt;p&gt;Factorial is a function that is very rarely used in general purpose code (outside of basic recursion exercises) and requires extreme care when used. So general-purpose &amp;quot;standard&amp;quot; library (included or merged with a language) does not benefit much with providing one.&lt;/p&gt;&#xA;&lt;p&gt;Specific concerns:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;for majority of languages that have fixed-size integer values there is extremely small range of input values that are acceptable (1-14 for 32-bit integers) - having table for such a small range is preferable when it actually needed. This is quite different for majority of other common functions that have much large usable range of input values (something like &amp;quot;+&amp;quot; would work safely for up to INT_MAX/2 values).&lt;/li&gt;&#xA;&lt;li&gt;it is very impractical to be defined in non-integer types as values are very quickly go out of precision range and become estimates. Each program needs to assess how to handle such losses and one generic implementation (usually unintentionally hiding exact details) become mostly useless.&lt;/li&gt;&#xA;&lt;li&gt;for languages that allow unbounded integer types it grows far too quickly to be safe to use in general code anyway - performance is almost unpredictable and memory usage would grow too quickly. Again, calling for every specific case to pick specialized implementations and possibly calling for alternative approaches altogether.&lt;/li&gt;&#xA;&lt;li&gt;in many cases (i.e. Taylor series) code naturally computes &lt;code&gt;n!&lt;/code&gt; in the process avoiding O(n) cost of computation for each iteration or the actual result needs only part of the factorial (C(n,k)). Such cases likely occur in specialized applications that would use a library specific to the domain rather than generic one lessening need for factorial to be in the standard library.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="11495" LastActivityDate="2022-05-13T23:45:48.133" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7410" PostTypeId="2" ParentId="7379" CreationDate="2022-05-14T00:43:52.393" Score="3" Body="&lt;p&gt;Imagine you are an English literature instructor. You assign your class an essay on how Shakespeare uses foreshadowing in Macbeth. You receive the following submissions:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Shakespeare Macbeth -&amp;gt; Banquo. The foreshadowing Macduff, eeeeeeeee. ❤︎ Billy. The per./ &lt;strong&gt;TRUMP&lt;/strong&gt;. x &amp;lt;= 53.3. Quadrila&lt;em&gt;t&lt;/em&gt;erals cast. :), asdfpom, :-( salad regurgitate Hamlet, fly bar rat indoors necro: cup hole pole blanket! foreshadow&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This isn't an essay. It is incomprehensible garbage, the equivalent to &lt;a href=&quot;https://meta.stackexchange.com/q/115627/336163&quot;&gt;gibberish&lt;/a&gt; on Stack Exchange and &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikipedia:Patent_nonsense&quot; rel=&quot;nofollow noreferrer&quot;&gt;patent nonsense&lt;/a&gt; on Wikipedia. This can't be graded because it can't be understood in any meaningful way as an attempt at an essay. The output of the process of reading this (the comprehension of the student's thesis in your mind) is undefined. Since it can't be graded, it can't be assigned &lt;em&gt;any&lt;/em&gt; points. Assigning points would require you to understand &lt;em&gt;why&lt;/em&gt; it is worthy of those points, which is impossible because you can't even understand it.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Yes, foreshadowing is used in Shakespeare's Macbeth. By turning Macbeth into a ghost, Banquo foreshadows the death of all of the kings. We see this on the seventh page when Malcolm is all like, &amp;quot;WTF is this shit, noob? Now you die by sword!!&amp;quot;. Everyone dies and foreshadows the rise of Episode Two, which was supposed to come out in 1620 but never did. From this, we can see that Macbeth is the best book ever written and should be recommended to all children.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a &lt;em&gt;terrible&lt;/em&gt; essay, but it &lt;em&gt;is&lt;/em&gt; an essay. It attempts, however incompetently, to address the subject matter. You can read this essay and comprehend it enough to determine what the student expressed and what sort of grade might be appropriate. You can tell that the student recognized that the story involves kings, a sword, a ghost, and character death. You might give the student a few points for recognizing these things.&lt;/p&gt;&#xA;&lt;p&gt;So, the same analogy works with code. Code that doesn't compile, like RBarryYou said, isn't a program at all. It can't be run, and its output is therefore undefined in the same way that the output of an incomprehensible &amp;quot;essay&amp;quot; is undefined. Code that runs, but doesn't accomplish the requirements specified in the assignment, is like a bad essay that you can at least read. Such an essay doesn't adequately address all of the requirements of your assessment rubric, but you can at least identify what it &lt;em&gt;does&lt;/em&gt; address and how it addresses it.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="1931" LastEditDate="2022-05-14T01:08:53.250" LastActivityDate="2022-05-14T01:08:53.250" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7411" PostTypeId="2" ParentId="7398" CreationDate="2022-05-14T18:20:54.107" Score="4" Body="&lt;p&gt;First of all, keep in mind that &amp;quot;language&amp;quot;, &amp;quot;implementation&amp;quot; and &amp;quot;standard library&amp;quot; are separate concepts. Languages are implementation blueprints that may not prescribe a standard library.&lt;/p&gt;&#xA;&lt;p&gt;Factorial is built-in to standard implementations of Julia, R and Python (at the time of writing), which makes sense because these are mathematics-oriented, high-level languages. For the audience of these languages, it's a common task that should be easy. The expectation/flavor of these languages is &amp;quot;import solution&amp;quot;, rather than &amp;quot;write it yourself&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;As far as I know, there's nothing in the Python language specification requiring implementations to have a &lt;code&gt;math&lt;/code&gt; module, and whether that &lt;code&gt;math&lt;/code&gt; module must have a &lt;code&gt;factorial&lt;/code&gt; method. The creators/maintainers of CPython (the reference implementation of Python) thought it'd be a good idea to include &lt;code&gt;math&lt;/code&gt; and &lt;code&gt;math.factorial&lt;/code&gt; though, and it's a pretty safe bet that most other implementations will follow suit, because it's a function that fits well with Python's &amp;quot;batteries mostly included&amp;quot; philosophy.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, C has no such factorial function because it'd just be extra bloat. It's not a common task in the language. The flavor of C is low-level and bare-bones. C is a substrate to build up from, opting-in to necessary functionality. It hearkens from an era when every byte of space mattered (we're talking a few megabytes for the whole system). For embedded or system engineers, a huge standard library filled with things they're not using would only get in the way of their goals. There's no need to buy a car if you just want a chair to sit in. The Go language follows a similar philosophy: we'll give you just the primitives, you write the abstractions you need (or install a package).&lt;/p&gt;&#xA;&lt;p&gt;Adding more stuff to a programming language specification itself and/or an implementation of that specification takes maintainence work, so it's not free lunch even when it does align. Taking the car analogy further, putting computers in every part of the car sounds great until there's a chip shortage or people figure out how to hack them, and it turns out to be a huge design liability. Sometimes less is more.&lt;/p&gt;&#xA;&lt;p&gt;Based on this, we can infer that which functionality is built into the standard library and which isn't is pretty much a judgment call. Do language or implementation designers/maintainers find it important for the goals of the language? Then include it. If not, don't. Sometimes, it's unclear and maintainers and designers disagree about what should be included and what shouldn't. If something is included, is it a built-in (no import) or included but require import?&lt;/p&gt;&#xA;&lt;p&gt;In Python, &lt;code&gt;factorial&lt;/code&gt; is not a built-in likely because it isn't common enough to warrant core functionality and makes the most sense tucked in the &lt;code&gt;math&lt;/code&gt; module. This is a design decision that can evolve: &lt;code&gt;reduce&lt;/code&gt; was removed as a built-in and relegated to a standard library module (functools) because the creator of Python wanted to de-emphasize functional programming and avoid overuse.&lt;/p&gt;&#xA;&lt;p&gt;I should also say that whether a function is easy to write or not is probably seldom much of a factor in whether it's included. It's a question of anticipating needs relative to costs.&lt;/p&gt;&#xA;&lt;p&gt;If you want a language that magically does &amp;quot;all the things&amp;quot; (especially math things), Wolfram Alpha comes to mind.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-05-14T21:51:44.463" LastActivityDate="2022-05-14T21:51:44.463" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7412" PostTypeId="1" CreationDate="2022-05-14T18:43:36.460" Score="6" ViewCount="406" Body="&lt;p&gt;There is a school of thought that it couldn't matter less which programming language is chosen as one's first programming language. The official position of a well known internet community dedicated to programming is that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No programming language is designed to be beginner friendly.&lt;/li&gt;&#xA;&lt;li&gt;One will not use their first language to develop things worthy to be published, instead one will only use it to learn basic concepts, therefore arguments such as &amp;quot;&lt;em&gt;to do X you may use Y, but A is instead used to do B&lt;/em&gt;&amp;quot; only provide cognitive overload for beginners.&lt;/li&gt;&#xA;&lt;li&gt;There is no reason to believe that the choice of the first programming language impacts the effects of learning in any way, so the whole discussion is groundless. (Mods say they will only consider differing opinions on this point if scientific papers are brought to support them)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Therefore, the said online community bans asking questions like &amp;quot;&lt;em&gt;Which programming language should I pick to learn how to program?&lt;/em&gt;&amp;quot; and if such a question is asked then it bans giving any answer other than &amp;quot;&lt;em&gt;It does not matter; pick absolutely any, flip a coin if you like, and stick to this choice&lt;/em&gt;&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Intuitively I find this position surprising? I would say that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some languages have significantly more gotchas than others. C or C++, in particular, have numerous unobvious rules which, if violated, result in UB. It can easily happen that a program starts misbehaving after a seemingly innocous modification in code is made because of hard to spot UB introduced somewhere else. This seems to be a horrible and a very frustrating experience for beginners.&lt;/li&gt;&#xA;&lt;li&gt;A person interested in doing a particular thing might want to be able to scratch their first, even very rudimentary programs in this field. For example, contrary to what is claimed above, a person interested in doing gamedev might be far more interested to scratch their first simplistic games in Unity3D than learn lots of stuff that is too abstract and too unintersting for them because due to the lack of domain knowledge they chose ASM as their first language (since they were not told which lang is good for gamedev, but instead they were told to pick any random language).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Is there any reason to believe that the choice of one's first programming language matters at all?&lt;/p&gt;&#xA;" OwnerUserId="12104" LastActivityDate="2022-05-26T00:57:37.900" Title="Is the choice of the first programming language relevant?" Tags="|language-choice|" AnswerCount="6" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7413" PostTypeId="2" ParentId="7412" CreationDate="2022-05-14T21:42:09.763" Score="4" Body="&lt;p&gt;I don't believe that there is any real research on the question, so what you will get here is essentially philosophy and guesswork, buttressed by informal observations.&lt;/p&gt;&#xA;&lt;p&gt;I know that there are others in this site who feel strongly in the affirmative, and I will let them argue their own points of view.&lt;/p&gt;&#xA;&lt;p&gt;For myself, I suspect that it doesn't matter &lt;em&gt;much&lt;/em&gt;.  At the end of the day, we must learn about (and integrate) so very many abstractions, so very many mechanisms, and so many paradigms of thinking before we are professionally competent.  Essentially all of our current professionals began in one of four ways: with imperative programming, with procedural programming, with object oriented programming, or with functional programming.&lt;/p&gt;&#xA;&lt;p&gt;All of them proceeded and became professionals.&lt;/p&gt;&#xA;&lt;p&gt;Within our own four-year program, we have experimented with objects first, procedural first, and imperative first.  (We teach FP, but we have not tried it at the outset of the program.)  I have not noticed &lt;em&gt;any&lt;/em&gt; discernable difference in the quality of our seniors, other than the general rise in quality you'd expect from a faculty that is becoming more experienced and constantly making changes and tweaks together.&lt;/p&gt;&#xA;&lt;p&gt;That said, we have over time gravitated towards objects-&lt;em&gt;early&lt;/em&gt;, typically in about month 4 of study.  What we found was that, in general, libraries are high-abstraction, so when we ordered things from higher-abstraction to lower-abstraction (such as Java ArrayLists before arrays), it enables kids to work on fun personal projects a little earlier, and that that can be highly rewarding.&lt;/p&gt;&#xA;&lt;p&gt;Even if we haven't found giant qualitative differences in the results of students several years in, that in itself is a worthwhile reward.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-05-14T21:42:09.763" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7414" PostTypeId="2" ParentId="7412" CreationDate="2022-05-15T13:10:37.940" Score="2" Body="&lt;p&gt;When teaching more or less &lt;em&gt;anything&lt;/em&gt; it is best if students are able to understand what they are doing as fully as possible.  &amp;quot;Doing without understanding&amp;quot; is a particularly bad approach to programming and unfortunately is very common these days because the amount of on-line tutorial material and overly-helpful (from a learning perspective) tools that make it easy to do typical pedagogical/andralogical exercises without any  real fundamental understanding of what is actually going on.  The choice of programming language can encourage or discourage this.  C++ is (these days) a particularly bad choice of first programming language as the students will be using a lot of advanced techniques whenever they use the libraries (e.g. std::string is a template) and the error messages they get from the compiler will only be understandable if you know those techniques.  Understanding compiler messages is a &lt;em&gt;very&lt;/em&gt; important skill to learn.  Similarly, IDEs encourage you to use things like move semantics (static analyser) and the students will often put them in without knowing what they are doing.  Much as I love C++, Java is a better choice of programming language.&lt;/p&gt;&#xA;&lt;p&gt;So if you have a choice, choose a language with the features you need, and which can be explained in a progressive way, always building on things that the student is able to understand well at the time when they first introduced.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-05-15T13:10:37.940" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7415" PostTypeId="2" ParentId="7379" CreationDate="2022-05-15T13:57:57.860" Score="0" Body="&lt;p&gt;In my opinion, no, but I wouldn’t criticize any other instructor from grading otherwise. It really depends on the goals of the course and the goals (and rubric) for the specific assignment. I can see the instructor writing the assignment in such a way that if it doesn’t compile, the grade &lt;em&gt;must be&lt;/em&gt; zero.&lt;/p&gt;&#xA;" OwnerUserId="12116" LastActivityDate="2022-05-15T13:57:57.860" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7416" PostTypeId="2" ParentId="7412" CreationDate="2022-05-15T17:47:42.847" Score="1" Body="&lt;p&gt;Of course it is highly relevant. Optimally, you would prefer to start teaching with a more high-level language like Python, not low level one as C or assembler, nor outright bugged one as C++. Otherwise, you are going to have to flood the beginners' minds with insane amounts of details that are completely irrelevant from a beginner's point of view before they are capable of writing even a simple &amp;quot;Hello World&amp;quot;; the students would get the impression that programming is about memorizing gibberish, magical incantations that most often look like badly misspelled words, like &lt;code&gt;main(int argc, char **argv)&lt;/code&gt;, &lt;code&gt;scanf(&amp;quot;%d&amp;quot;,&amp;amp;x)&lt;/code&gt; or &lt;code&gt;.globl _start:&lt;/code&gt; instead of being about logical algorithmic thinking. Best strategy for satisfying teaching/learning experience is to teach students the most powerful concepts in the context of their current knowledge levels -- otherwise, it is more reminiscent of regurgitating loose pieces of information in the students' general direction, rather than teaching them to do anything useful.&lt;/p&gt;&#xA;&lt;p&gt;Let's say that all they know is printing and reading from the terminal, and you want to teach them how have a program ask for user's age and name, and then print a personalized greeting message using that age and name. It is much less productive and pleasant if beforehand they are forced to learn a bunch of completely irrelevant details for the time being, like in case of C: the concept of a call stack, the difference between how a computer treats numbers versus lines of text, the fact how the numeric variable is storing the number like one would expect but the variable representing line of text actually only stores an address of a remote location where the line of text begins, difference between passing by value versus passing by reference, the fact that arrays are similar to pointers but also not really that similar -- which is all required before one can fully comprehend why the cryptic gibberish incantation for reading a line of text with &amp;quot;scanf&amp;quot; does not need an ampersand added to the name of variable representing a line of text, while the ampersand is needed in case of reading a number. In such case, students are forced to learn a whole lot of details that won't be actually useful for them until much later in their education, and that is discouraging. Good education is about filtering the information you are passing to students to distill the most relevant pieces, not about regurgitating all the random and unrelated chunks at them.&lt;/p&gt;&#xA;" OwnerUserId="12078" LastEditorUserId="12078" LastEditDate="2022-05-16T19:49:21.110" LastActivityDate="2022-05-16T19:49:21.110" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7417" PostTypeId="2" ParentId="7412" CreationDate="2022-05-16T13:23:27.043" Score="3" Body="&lt;p&gt;The choice of starting language is relevant in its ability to keep a students interest. In the early days of the micro computer BASIC developed itself as the ultimate learning language. It was ubiquitous, part of all of the early micro computers. Popular dialects such as MS BASIC, Apple BASIC, Commodore BASIC all were easy to start with providing quick and impressive feedback almost immediately. Once you got rolling you could build nearly anything with BASIC that the computer was capable of. I doubt I would have become a professional programmer if not for BASIC.  You could get your start easily on your own, and without switching languages accomplish something truly impressive.&lt;/p&gt;&#xA;&lt;p&gt;On the flip side BASIC was reviled by most of industry and academia because of the &amp;quot;bad habits&amp;quot; it taught. If you want to be simultaneously impressed and horrified pick up a back issue of &lt;a href=&quot;https://archive.org/details/creativecomputing&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Creative Computing&amp;quot;&lt;/a&gt; or the book &amp;quot;Games in BASIC&amp;quot; by David Ahl.&lt;/p&gt;&#xA;&lt;p&gt;Most modern languages are both a hit and a miss when it comes to learning how to program.&lt;/p&gt;&#xA;&lt;p&gt;Block languages will get you started, but are rarely flexible enough to do anything real. You can do anything in C/C++ but pointer notation is incomprehensible to most newbies. Java eliminates the need for memory management, but the cross platformness of it make doing anything impressive problematic. Javascript is straight forward and ubiquitous, but is overly focused on the web. Python comes close, but its syntax encourages incomprehensible one liners that can scare even practiced coders away.&lt;/p&gt;&#xA;&lt;p&gt;The language you start off with matters... but it won't really make a difference. All programming languages are both perfect and horrible.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-16T13:23:27.043" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7418" PostTypeId="2" ParentId="7379" CreationDate="2022-05-16T21:10:22.003" Score="4" Body="&lt;p&gt;No.&lt;/p&gt;&#xA;&lt;p&gt;Some of the answers suggest that one would never get credit for a non-compiling piece of code when working in industry. I don't think this is true. People get &amp;quot;credit&amp;quot; for: power point presentations describing what they plan to do, power point presentations describing what they have done so far and pseudo-code that doesn't compile anywhere or on anything. Yes, they eventually have to produce code (if that is their job rather than specifying requirements, etc.), but aren't the goals of university education for the student to learn and show that they've learned something, rather than everything?&lt;/p&gt;&#xA;&lt;p&gt;If you are going to do this, you should be very clear about it and know that you are encouraging some students to learn less than they would otherwise and to turn in less-complete work or even garbage that compiles rather than, as someone said above, 99.9% correct work.&lt;/p&gt;&#xA;" OwnerUserId="12127" LastActivityDate="2022-05-16T21:10:22.003" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7419" PostTypeId="2" ParentId="7412" CreationDate="2022-05-18T01:26:07.803" Score="3" Body="&lt;p&gt;My 2cents on this topic. I certainly do not know if the first programming language has life long impacts (as an old guy whose first programming language was COBOL I sincerely hope there is none :-)&lt;/p&gt;&#xA;&lt;p&gt;But there are measurable effects of the programming language in relation to students outcomes in a CS1 course. Let me unashamedly plug in my own research &lt;a href=&quot;https://dl.acm.org/doi/abs/10.1145/3152894&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dl.acm.org/doi/abs/10.1145/3152894&lt;/a&gt; (this is behind pay wall - there is a non pay-walled version &lt;a href=&quot;https://www.researchgate.net/profile/Jacques-Wainer/publication/327005495_A_Controlled_Experiment_on_Python_vs_C_for_an_Introductory_Programming_Course_Students%27_Outcomes/links/5c239be4299bf12be39c13d1/A-Controlled-Experiment-on-Python-vs-C-for-an-Introductory-Programming-Course-Students-Outcomes.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Copying from the abstract:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;We performed a controlled experiment comparing a C and a Python&#xA;Introductory Programming course. Three faculty members at University&#xA;of Campinas, Brazil, taught the same CS1 course for the same majors in&#xA;two different semesters, one version in Python and one in C, with a&#xA;total of 391 students involved in the experiment. We measured the&#xA;dropout rate, the failure rate, the grades on the two exams, the&#xA;proportion of completed lab assignments, and the number of submissions&#xA;per completed assignment.&#xA;...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We observed no difference in the dropout rate, and the difference in the failure rate was in favor of Python but not significant. All others were significant in favor of using Python.&lt;/p&gt;&#xA;&lt;p&gt;We did not measure &lt;em&gt;why&lt;/em&gt; Python is better, but one can list some reasonable possibilities:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;simpler syntax&lt;/li&gt;&#xA;&lt;li&gt;no need for type declaration (which may be a problem later in the student's carreer)&lt;/li&gt;&#xA;&lt;li&gt;Python lists as a container type with a simpler semantics and syntax than C arrays (including bound checks, syntactic representation, extensibility)&lt;/li&gt;&#xA;&lt;li&gt;lack of call by reference&lt;/li&gt;&#xA;&lt;li&gt;lack of pointers&lt;/li&gt;&#xA;&lt;li&gt;interactive environment&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I have another research (still unpublished) that Python as a first language does not negatively impact student's outcomes in a C based CS2 (data structures) course.&lt;/p&gt;&#xA;&lt;p&gt;So Python is better than C for a CS1 course and has no nagative effect in a CS2 course. How does it impact the rest of the student's programming/CS career, we do not know.&lt;/p&gt;&#xA;&lt;p&gt;I also think that the third programming language in a student's learning experience should be a functional programming. Unfortunately not only I do not have experiments regarding that, but in my department I can only teach a functional programming as their &lt;em&gt;fourth&lt;/em&gt; language (after Python, C and Java) Not that there is a big loss of being the fourth language instead of the third, but I fear that after a semester of Java and OO development we lost some of those young minds - some of them will never see programming as fun again!! :-)&lt;/p&gt;&#xA;" OwnerUserId="9463" LastActivityDate="2022-05-18T01:26:07.803" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7420" PostTypeId="2" ParentId="5245" CreationDate="2022-05-18T16:18:13.733" Score="2" Body="&lt;p&gt;I have to note that this question cannot really be expected to result in generating any other answers than &lt;em&gt;&amp;quot;no, you should not stop and never give up, you can do it&amp;quot;&lt;/em&gt; phrased in slightly different flavours, as any answer telling you to do otherwise would most probably be considered a violation of this site's code of conduct. The way this question is formulated is personal and therefore it is impossible for you to receive the full spectrum of ideas.&lt;/p&gt;&#xA;&lt;p&gt;Having said that, I would advise you to consider different possibilities. It depens on you where you feel like you could continue in the face of difficulties, and where is the right moment to give up. Life is such that one cannot reasonably expect to achieve any success without difficult struggles and resilience. However, there is absolutely no reason for anyone to force him/herself to continue sacrificing his/her time and effort on something that does not result in any measurable progress. We are all born with our distinct set of strengths and weaknesses, and acknowledging them is an important step in personal growth and development. One of the most important signs of emotional strength and maturity is being aware of one's limitations, acknowledging, and accepting them.&lt;/p&gt;&#xA;&lt;p&gt;In conclusion, I would encourage you to try it out and have fun learning, but at the same time I would completely advise against &lt;em&gt;&amp;quot;never giving up no matter what&amp;quot;&lt;/em&gt; because that is just an one-dimensional, simplified non-answer platitude that cannot be reasonably extrapolated from answerers to your individual circumstances. Therefore, don't get discouraged easily, sacrifice a fair amount of your time and effort if you face any difficulties, but always remember that it is okay to give up and try something different if you decide that you don't feel like learning that anymore -- nobody will blame you for that. In the world, there are limitless ways of achieving fulfillment, and always have in mind that learning programming is just one of them. For example, could a man 160 cm (5'3'') tall achieve success as an NBA player? Indeed, just look up Tyrone Muggsy Bogues. However, could any man of that height dreaming about be reasonably expected to never ever give up? Should he be blamed if he decided that he is just not cut for it? My answer to both of those questions would be &amp;quot;no&amp;quot;. Bogues was an outlier, and remember that there are a lot of men who are above 200 cm (6'7'') in height, and still didn't make it to the NBA. Have fun, give it a solid go, but never limit yourself by accepting the notion of &lt;em&gt;&amp;quot;never giving up&amp;quot;&lt;/em&gt; to learn programming. The only thing you should never give up is finding your own personal fulfillment; whether it is done via programming or something completely different, is just a detail.&lt;/p&gt;&#xA;" OwnerUserId="12134" LastEditorUserId="12134" LastEditDate="2022-05-18T16:41:06.230" LastActivityDate="2022-05-18T16:41:06.230" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7421" PostTypeId="2" ParentId="4427" CreationDate="2022-05-19T20:06:02.767" Score="1" Body="&lt;p&gt;Forcing the students not to return early is bad, and forcing them to do so is bad as well. See, the issue of whether or not one should use early returns is not only superficial, but also primarily opinion-based, as both approaches are valid considering the individual circumstances. A teacher should not enter the overly authoritative role and impose their subjective stylistic preferences on students. From my own perspective, which is the one of a student, I had encountered a lot of teachers who have been presenting subjective opinions as objective standards, and personal whims as supposedly written gospel. All it succeeded in achieving was confusing all the students from the beginning, and setting all of them for numerous surprising awakenings once a teacher's God-given truth turned out to be a matter of taste, and thus nonsense.&lt;/p&gt;&#xA;" OwnerUserId="12078" LastActivityDate="2022-05-19T20:06:02.767" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7422" PostTypeId="1" CreationDate="2022-05-20T17:22:05.477" Score="2" ViewCount="112" Body="&lt;p&gt;I am thinking to start an online course in one of the educational online platforms, e.g. Coursera, Udemy, EDX or other. Does anyone have such an experience? What are some things I have to keep in mind in order to succeed?&lt;/p&gt;&#xA;&lt;p&gt;Thank you in advance!&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="1293" LastEditDate="2022-05-20T18:37:57.850" LastActivityDate="2023-01-24T15:29:52.850" Title="Any experiences on online paid courses (udemy, coursera, edx?" Tags="|self-learning|online|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7423" PostTypeId="1" AcceptedAnswerId="7424" CreationDate="2022-05-23T23:33:16.760" Score="3" ViewCount="336" Body="&lt;p&gt;I am with the complication of having to choose a career, I am 17 years old and I see that programming is giving a lot of work in Argentina but some concepts confuse me, I just read this &lt;a href=&quot;https://aprendelo.org/que-estudiar-para-ser-programador/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://aprendelo.org/que-estudiar-para-ser-programador/&lt;/a&gt; but I do not know if it is for me, I did a tutorial on YouTube on how to make a calculator in JavaScript and I feel that there are things that are very in the air when they talk about loops and indexes, I feel that I cannot imagine some things that seem to be easy for everyone when they talk.&lt;/p&gt;&#xA;&lt;p&gt;so I would like to know if there is any programming language that does not have a high level of abstraction, at the moment I am starting with html and CSS, I am going to add JavaScript because from what the tutorial says it is something that is in high demand and can help me to get a job, is it ok or am I wasting my time?&lt;/p&gt;&#xA;&lt;p&gt;Thanks.&lt;/p&gt;&#xA;" OwnerUserId="12152" LastEditorUserId="12078" LastEditDate="2022-06-06T14:44:21.283" LastActivityDate="2022-06-06T23:11:41.163" Title="How can I understand if programming is for me?" Tags="|self-learning|" AnswerCount="4" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7424" PostTypeId="2" ParentId="7423" CreationDate="2022-05-24T08:33:23.090" Score="5" Body="&lt;p&gt;Firstly, html/css are not programming languages though they are languages.&#xA;Javascript is a programming language but JS/Web is far from being the best entry into CS — the area is &lt;a href=&quot;https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f&quot; rel=&quot;nofollow noreferrer&quot;&gt;in so much flux&lt;/a&gt; that what's hot today becomes passe next year.  (Tnx &lt;a href=&quot;https://cseducators.stackexchange.com/a/6998/8837&quot;&gt;Qiulang&lt;/a&gt; for that ref!) And so coming to anything with even moderate stability and lastingness is next to impossible.&lt;/p&gt;&#xA;&lt;p&gt;And as your link indicates there are other areas to get into&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mobile apps (Android/IOS)&lt;/li&gt;&#xA;&lt;li&gt;IOT&lt;/li&gt;&#xA;&lt;li&gt;ML&lt;/li&gt;&#xA;&lt;li&gt;Crypto and Blockchain&lt;/li&gt;&#xA;&lt;li&gt;Cloud&lt;/li&gt;&#xA;&lt;li&gt;Dozens other areas which are hot; that is to say where the jobs are&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;But &lt;em&gt;where the jobs are&lt;/em&gt; and &lt;em&gt;what gets you a job&lt;/em&gt;, especially a well-paid one, are far from being the same thing.  That latter is usually called CS or principles of programming or software engineering... and other names (with nuanced distinctions).&lt;/p&gt;&#xA;&lt;p&gt;I'll stick to Programming-focused CS&lt;/p&gt;&#xA;&lt;h1&gt;Mindset needed for CS&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Causality Oriented&lt;/li&gt;&#xA;&lt;li&gt;Value Neutral&lt;/li&gt;&#xA;&lt;li&gt;Mathematical&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The last can be expanded again to Math, Engineering/technology and Language (linguistics).&lt;/p&gt;&#xA;&lt;p&gt;Let me elaborate on each of these:&lt;/p&gt;&#xA;&lt;h2&gt;Causality oriented&lt;/h2&gt;&#xA;&lt;p&gt;For a programmer, causality oriented thinking is a very basic requirement.&#xA;Its a bit easier if we start with the debugging process.  You've done something. Its not working as desired.  How do you go about correcting the fault.  For that you've to follow a causal chain backwards: Z was unsatisfactory, Y causes/preceded Z. Is Y ok? If not from Y to ... All the way back to the start C,B,A (the start if necessary)&lt;/p&gt;&#xA;&lt;p&gt;So clearly debugging is about following backward causality.  But even designing and programming is about causality.  E.W. Dijkstra showed that it is backward causality driven backward leading to seeming forward flow. &lt;a href=&quot;https://cs.stackexchange.com/a/143671/24043&quot;&gt;See&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The very first COBOL program I wrote — about a 100 lines — gave me 300 errors! I was quite shaken. I fortunately discovered that I had forgotten an important mantra called &lt;code&gt;PROCEDURE DIVISION.&lt;/code&gt;  Many of my classmates were less fortunate.  I remember one that was particularly scarred by the editor &lt;code&gt;vi&lt;/code&gt;, the only available editor then.  He exemplified what one wag has said about &lt;code&gt;vi&lt;/code&gt;, that it's a program that either beeps or corrupts the file.  For one who understands &lt;code&gt;vi&lt;/code&gt; this is a joke but for the noob it can be traumatic!&#xA;If he had understood a single word that defines &lt;code&gt;vi&lt;/code&gt; — &lt;em&gt;modal&lt;/em&gt; — and spent half an hour understanding how modality defines &lt;code&gt;vi&lt;/code&gt;'s behavior, his trauma would have vanished. Instead he chose to (try to) learn it by rote — i.e. &lt;em&gt;non-causally&lt;/em&gt; — and found it traumatic.&lt;/p&gt;&#xA;&lt;p&gt;This comes to the next point:&lt;/p&gt;&#xA;&lt;h2&gt;Neutrality&lt;/h2&gt;&#xA;&lt;p&gt;When you are given an error by a mechanical system do you get upset? Offended? Terrorized?&lt;/p&gt;&#xA;&lt;p&gt;It's amusing when it's someone else in &lt;a href=&quot;https://youtu.be/ZSljO3DqDDU&quot; rel=&quot;nofollow noreferrer&quot;&gt;a movie&lt;/a&gt;. It's not when it's you. &lt;strong&gt;And its a choice.&lt;/strong&gt;&#xA;Machines don't think, they don't choose, they don't &lt;em&gt;intend&lt;/em&gt;.  &lt;strong&gt;We&lt;/strong&gt; do these things — or at least should!&#xA;When you are a computer scientist, you don't stop being a human being. So you of course have your thoughts, values, intentions. &lt;strong&gt;But you must keep them to yourself, and not impose them on inanimate objects!&lt;/strong&gt;  Easier said than done since we all know of being in the position of the man  in the video above!&lt;/p&gt;&#xA;&lt;p&gt;One of the challenges I face as a programming teacher is to convince students to &lt;strong&gt;Read the error message!&lt;/strong&gt;  For example in Python when you get an error you'll usually get&#xA;(a) the error (exception name)&#xA;(b) the file/line where it occurred&#xA;(c) a trace of the preceding events — the causal chain — that led to that &amp;quot;event&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;If you read these details you can start following the causal chain backwards and locate and correct the problem.  But if you are freaked out by the error as though someone scolded you, you'll never get there.  To not get freaked out you need to be &lt;em&gt;neutral&lt;/em&gt;. And &lt;em&gt;curious/interested&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h3&gt;Personal (controversial?) opinion&lt;/h3&gt;&#xA;&lt;p&gt;I believe you need to have an autistic streak to be a good programmer.  Of course &lt;em&gt;literally&lt;/em&gt; this is not true ... there are obviously many good programmers who are not autistic.  But I conjecture that they are good because they're bimodal — i.e. they work in autist-mode when dealing with machines and human/empathic mode when dealing with human (and other) beings.&#xA;You don't have to become Dr. Spock and use nothing but rationality everywhere.&#xA;What is non-negotiable is that you use pure rationality when dealing with machines.&lt;/p&gt;&#xA;&lt;h1&gt;Mathematics&lt;/h1&gt;&#xA;&lt;p&gt;Dijkstra, an idiosyncratic but great CS-ist and CS teacher, punchily made the case that CS should be approached and taught as though it's a branch of pure formal math. See &lt;a href=&quot;https://dl.acm.org/doi/10.1145/76380.76381&quot; rel=&quot;nofollow noreferrer&quot;&gt;CACM&lt;/a&gt; for his view and the subsequent heated discussion.&#xA;While this is not exactly my opinion, I do believe that math is more central to CS than most practitioners/teachers believe.&#xA;My own view is more nuanced:&lt;/p&gt;&#xA;&lt;h1&gt;Three legs of CS&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Introduction_to_Automata_Theory,_Languages,_and_Computation&quot; rel=&quot;nofollow noreferrer&quot;&gt;Classic accounts&lt;/a&gt; of (theoretical) CS are often based around the 3 pillars of CS:&#xA;(a) Automata (machines)&#xA;(b) Languages&#xA;(c) Computation.&lt;/p&gt;&#xA;&lt;p&gt;These 3 areas have 3 characteristic and quite contrasting modes of approach.  CS-ists need to be fine with &lt;em&gt;all three.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Briefly&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Computation is math and is essentially about the infinite.&lt;/li&gt;&#xA;&lt;li&gt;Machines are finite and is where the engineering/technology considerations lie.&lt;/li&gt;&#xA;&lt;li&gt;Languages link the above two and is, for any programmer, the center-point where the action happens.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A programmer needs to be fine with all these modes of thinking.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-05-24T17:26:51.120" LastActivityDate="2022-05-24T17:26:51.120" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7425" PostTypeId="2" ParentId="7423" CreationDate="2022-05-25T15:29:36.047" Score="2" Body="&lt;p&gt;How do you decided if programming is for you? Have some fun with it.&lt;/p&gt;&#xA;&lt;p&gt;Pick up your phone, laptop or tablet and look for games that have programming as a mechanic. Two favorites of mine are &lt;a href=&quot;https://apps.apple.com/us/app/cargo-bot/id519690804&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cargobot&lt;/a&gt; (iPad) and &lt;a href=&quot;https://store.steampowered.com/app/375820/Human_Resource_Machine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Human Resource Machine&lt;/a&gt; (iOS and Steam). If you have fun solving the puzzles you might be ready for the next step.&lt;/p&gt;&#xA;&lt;p&gt;Download an IDE that is easy to understand in a language the is fun to use. I would suggest &lt;a href=&quot;https://thonny.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Thonny.org&lt;/a&gt; which will install Python for you.&lt;/p&gt;&#xA;&lt;p&gt;Now that you have a fun language and an easy to use system, the trick is to keep it fun. The way I keep it fun is to try to solve some problem, write a game, or draw a picture. Keep it small so you aren't overwhelmed. If you do a search on &amp;quot;Python Turtle Example&amp;quot; or &amp;quot;Python Turtle Game&amp;quot; you will find a bunch of straight forward examples. At the beginning, skip any example if you see the keywords &amp;quot;self&amp;quot; or &amp;quot;class&amp;quot;. Those are related to objects and classes and are too much for a newbie.&lt;/p&gt;&#xA;&lt;p&gt;Once you find an example that you think you can follow, don't just copy and paste it.  Type it in by hand. The process of typing in the commands one at a time will internalize the process, and help the ideas sink in.  If you come to anything you don't understand don't let it go. Search the net for an explanation.  Don't know what &amp;quot;def&amp;quot; means... search &amp;quot;python def&amp;quot;. Never seen &amp;quot;for&amp;quot; used like that... search &amp;quot;python for loop&amp;quot;.  Don't understand why every program has import at the top... search &amp;quot;python import&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The trick to knowing if you are cut out for programming is how you dealt with frustration you encountered during your exploration. If you found confusion as an opportunity to learn new things... if you were comfortable with not knowing all of the answers... if after fighting a block for two days and finally finding the answer you burst into hysterical laughter and ran to show your friends... well... then programming might be right for you.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastActivityDate="2022-05-25T15:29:36.047" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7426" PostTypeId="2" ParentId="7423" CreationDate="2022-05-25T18:28:20.630" Score="2" Body="&lt;p&gt;Only you can decide if programming is for you, but I'll try to offer a bit of context for making the call.&lt;/p&gt;&#xA;&lt;p&gt;The TL;DR is that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It's normal to feel intimidated, that everyone is better than you, or frustrated by syntax or concepts. This is pretty much the universal state of affairs. Initial frustration doesn't necessarily mean your medium or long-term outcomes will be poor.&lt;/li&gt;&#xA;&lt;li&gt;If one area of programming doesn't interest you or a project is too difficult, it's OK to set it aside and try something else (including things other than programming). Learning doesn't have to be all-or-nothing.&lt;/li&gt;&#xA;&lt;li&gt;Stick to easier (but sufficiently challenging) projects, keeping in mind that almost everything winds up needing more effort than it seems.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;First of all, programming is difficult. There are endless unforeseeable frustrations in store, and it'll always seem much more complex than it should. Part of learning to program, in my experience, is coming to expect and enjoy the difficulties and failures as much as the apps you'll build. The feeling of overcoming the challenges makes it fun for me. For other people, the product is more fun than the process. This can vary from project to project and over time.&lt;/p&gt;&#xA;&lt;p&gt;That's not to say some things won't be easy, but those are usually the surprises rather than the common cases. The question is whether the time, energy and opportunity cost of learning to program is worth it over any alternative ways to spend your resources.&lt;/p&gt;&#xA;&lt;p&gt;It's critical to have the motivation to want to do it in spite of the inevitable frustrations. For a lot of beginners I've worked with, the initial learning curve is too steep and they move on to other things that interest them more. There's just not enough payoff for the effort for them. They wanted to make a Minecraft but only wound up with a console-based calculator after weeks of effort. That's fine.&lt;/p&gt;&#xA;&lt;p&gt;I've seen students initially struggle mightily with the most minor of syntax issues and appear to be on the verge of quitting, later to move on to successful programming careers. I've seen other students who seem to be learning rapidly and excelling, only to lose interest and quit (possibly temporarily). It's easy to think that initial hurdles and frustrations are indicators of a lack of aptitude, but I'm not sure if it's a strong predictor of long-term results. The key factor seems to be the urge from within to put effort and time into it, and that's not something you can force (but it can be nurtured).&lt;/p&gt;&#xA;&lt;p&gt;For starters, I suggest picking easy, education-focused languages like &lt;a href=&quot;https://scratch.mit.edu&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch&lt;/a&gt; and focusing on simple tasks that are challenging but not insurmountable. Try basic programming challenges on sites like &lt;a href=&quot;https://open.kattis.com/problems&quot; rel=&quot;nofollow noreferrer&quot;&gt;Kattis&lt;/a&gt; or &lt;a href=&quot;https://www.codewars.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codewars&lt;/a&gt; (disclosure: I work for Codewars). Working with peers, a tutor or taking a class makes it easier to get yourself over the initial hurdles. Grab beginner-level books in areas of interest and work through them. Keeping it simple and building a solid foundation is a key way to avoiding feeling overwhelmed to the point of quitting.&lt;/p&gt;&#xA;&lt;p&gt;If you embark on a project or technology that seems out of your comfort/interest zone, it's OK to set it aside and either revisit it later or abandon it entirely. I've dropped classes and set countless projects aside, putting the concepts on a &amp;quot;to learn&amp;quot; list. Later, I've found that I was able to finish some of these projects once the right opportunity came along, although the &amp;quot;to learn&amp;quot; list is ever-expanding since programming is an extremely broad field. There's no way to learn everything, so deciding where to focus energy is a key skill to develop. It's hard to know what one's interests might be initially, so don't be afraid to experiment.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I feel that I can not imagine some things that seem to be easy for everyone when they talk.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Feeling like everyone else isn't struggling but you are can be a sign of &lt;a href=&quot;https://en.wikipedia.org/wiki/Impostor_syndrome&quot; rel=&quot;nofollow noreferrer&quot;&gt;impostor syndrome&lt;/a&gt;. I've dealt with it during my programming career. I'm not sure I have much concrete advice other than to suggest that it's widespread and likely that others feel much the same as you. Sometimes you're the most knowledgeable in the group and sometimes you're the least. It's good to pursue both scenarios regularly and be comfortable with both. Even when you may feel the least skilled, there are ideas and perspectives you can offer a project or a team; try to find them. Sometimes, just being another person to contribute makes your skills and time valuable, and that's OK too in some projects.&lt;/p&gt;&#xA;&lt;p&gt;If other things interest you more than programming, it's OK to pursue those. Whatever time you &lt;em&gt;did&lt;/em&gt; spend on programming won't be wasted, since computer and problem-solving skills translate to pretty much any other area of life you wind up in. Learning programming doesn't have to be all-or-nothing and is highly multi-disciplinary.&lt;/p&gt;&#xA;&lt;p&gt;For example, knowing a bit of JavaScript and having some familiarity with the browser console can help you diagnose and fix problems with many websites, like broken modals. You can write simple &lt;a href=&quot;https://en.wikipedia.org/wiki/Userscript&quot; rel=&quot;nofollow noreferrer&quot;&gt;userscripts&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Bookmarklet&quot; rel=&quot;nofollow noreferrer&quot;&gt;bookmarklets&lt;/a&gt; to avoid repetitive tasks or make a website more usable. Being able to write basic HTML and CSS can help you make or customize a blog or personal page and get your ideas on the internet. Practical books like &lt;a href=&quot;https://automatetheboringstuff.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Automate the Boring Stuff with Python&lt;/a&gt; are great ways to pick up enough scripting skills to manipulate spreadsheets, rename files in bulk, pull data off the internet programmatically and other tasks that will come in handy if you use computers often. I find it empowering to be able to control the thing we spend a good chunk of our lives on, even in a small capacity. Learning a bit about operating systems, mobile app development, smart phone technology or networking is useful due to their ubiquity. At the very least, you'll enhance your appreciation of the technology.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastActivityDate="2022-05-25T18:28:20.630" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7427" PostTypeId="2" ParentId="7412" CreationDate="2022-05-26T00:44:36.047" Score="2" Body="&lt;p&gt;Logically the answer to your question is &amp;quot;yes it matters&amp;quot;. Teaching machine code as a first language is probably not a great idea. But what are the considerations on why it matters?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Feedback and the ability to create small working projects quickly. Being able to create working (and even graphical) examples is incredibly motivating and helpful. JavaScript would be a good example.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Similarity to widely used imperative languages. It will give the student a clearer idea and perspective on what programming is about, which is definitely within the purview of education. Sure, they'll figure it out through time and experience, but why not help them? Lisp might be a bad choice here.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Simplicity and elegance of the language. Beginners should be focusing their time on learning fundamentals, not in figuring out esoteric shell quoting rules.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Well established and supported language. Don't use the newest shiniest language for teaching (or anything else). Having access to resources, debuggers, forums, libraries, source code examples, etc is vital for beginners and old people alike.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12170" LastEditorUserId="12170" LastEditDate="2022-05-26T00:57:37.900" LastActivityDate="2022-05-26T00:57:37.900" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7428" PostTypeId="1" AcceptedAnswerId="7433" CreationDate="2022-05-29T17:35:46.863" Score="0" ViewCount="183" Body="&lt;p&gt;&lt;strong&gt;Question Background:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I am CS students . Now a day lot of peoples are learning and earning through -&amp;gt;  blogging , affiliate marketing , E-commerce etc . And also provides these type of services !&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question in Detail :&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Part 1:&lt;/strong&gt;&#xA;I want to know that these services or whatever fields are included in computer science or not . why ?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;part 2:&lt;/strong&gt;&#xA;And i also want to know that there is lot of software development fields like software development , app dev. , web dev. etc are included in cs or not .&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question Summary:&lt;/strong&gt;&#xA;How i determined that , which skill or subject i am learning is part or field or computer science or not , means on which bases i know that i determined it . for example i am learning game development then how i know that is it part of computer science or not ?&lt;/p&gt;&#xA;" OwnerUserId="11579" LastActivityDate="2022-06-02T03:03:43.003" Title="Is blogging , affiliate marketing , E-commerce etc are the fields of Computer Science" Tags="|self-learning|programming|secondary-education|active-learning|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7429" PostTypeId="2" ParentId="213" CreationDate="2022-05-29T18:06:22.103" Score="1" Body="&lt;p&gt;Since this question was posted, I have come to realise that a ruler is not a metaphor for this think. It is the think. Zero indexing is simply measuring the distance from the start. There are many examples of this in the other answers.&lt;/p&gt;&#xA;&lt;p&gt;We need to not see the index as on ordinal number, but as the distance from the start.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-05-29T18:06:22.103" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7430" PostTypeId="1" CreationDate="2022-05-30T09:13:40.807" Score="3" ViewCount="58" Body="&lt;p&gt;I am still trying to improve the understanding of amortized analysis by students (as in a previous &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7003/example-of-amortized-analysis-of-algorithms-rather-than-data-structures&quot;&gt;question&lt;/a&gt;). In many textbooks such as &lt;a href=&quot;https://mitpress.mit.edu/books/introduction-algorithms-fourth-edition&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;the CLRS&lt;/em&gt;&lt;/a&gt;, three methods are presented: aggregate, accounting, and potential. My question concerns the links and differences between accounting and potential method, and was actually inspired by questions from my students.&lt;/p&gt;&#xA;&lt;p&gt;In the accounting method, one has to define a &lt;em&gt;money cost&lt;/em&gt; for each operation, and show that at each step, the account contains enough money to pay for the actual cost of the operation. Otherwise stated, one needs to show that the account always has a nonnegative amount of money. To formally prove the nonnegativity of the account, a possibility that I like to present to my student is to relate the amount of money on the account with some quantity in the problem: For instance, for the amortized analysis of a binary counter, one can prove that the money on the account is always twice the number of &lt;code&gt;1&lt;/code&gt; in the counter at each step.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;My question:&lt;/strong&gt; &amp;quot;My&amp;quot; proof technique makes the accounting method very close (almost identical) to the potential method. The money on the account defines more or less a potential function. &lt;em&gt;From a pedagogical perspective&lt;/em&gt; (which is what I am interested in, of course), what is the best solution?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Present both methods as completely distinct, and maybe avoid &amp;quot;my&amp;quot; proof technique;&lt;/li&gt;&#xA;&lt;li&gt;Present both methods separately and show that they are two ways of presenting the same idea;&lt;/li&gt;&#xA;&lt;li&gt;Present the potential method, and then the accounting method as a way to define a potential function;&lt;/li&gt;&#xA;&lt;li&gt;Something else...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="10594" LastActivityDate="2022-05-30T09:13:40.807" Title="Accounting and potential methods in amortized analysis" Tags="|algorithms|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7431" PostTypeId="2" ParentId="7428" CreationDate="2022-05-30T11:17:13.313" Score="6" Body="&lt;p&gt;None of those are computer science, no.  It's hard to say what computer science &lt;em&gt;is&lt;/em&gt; because it is a bit of a historical mish-mash, but blogging, e-commerce, and affiliate marketing are not anywhere in this field.&lt;/p&gt;&#xA;&lt;p&gt;Game programming intersects with CS, however.&lt;/p&gt;&#xA;&lt;p&gt;Computer Science is, depending on who you ask, programming (think software engineers), computer hardware, architecture and networks (think I.T., network people, or the folks who design the next processor Intel is going to put out), or theory associated with computation (think mathematicians).&lt;/p&gt;&#xA;&lt;p&gt;As you can see, marketing, which is its own completely separate field, is nowhere near any of those categories.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-05-30T11:17:13.313" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7432" PostTypeId="2" ParentId="7428" CreationDate="2022-05-31T14:33:31.593" Score="1" Body="&lt;p&gt;Computer Science was started by mathematicians, Alan Turing being the prime example. It quickly merged with engineering as a way to create the machines that were being theorized.&lt;/p&gt;&#xA;&lt;p&gt;If the topic in question can be accomplished without having to concern yourself with coding or hardware, it probably doesn't fall under the umbrella of computer science.&lt;/p&gt;&#xA;" OwnerUserId="12011" LastEditorUserId="12011" LastEditDate="2022-06-01T12:09:11.373" LastActivityDate="2022-06-01T12:09:11.373" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7433" PostTypeId="2" ParentId="7428" CreationDate="2022-06-02T03:03:43.003" Score="1" Body="&lt;p&gt;It's the same difference between auto manufacturing and auto racing.&lt;/p&gt;&#xA;&lt;p&gt;Blogging, affiliate marketing, E-commerce etc. relate to computer science because computer science creates their engines. But it doesn't create their content.&lt;/p&gt;&#xA;&lt;p&gt;The site we're using right now exists because some computer scientist developers created the web service that lets us write content for it. We're not doing computer science when we post here. We're just using it. That's the difference. Contributing content is not computer science.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastActivityDate="2022-06-02T03:03:43.003" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7437" PostTypeId="1" CreationDate="2022-06-06T11:12:01.290" Score="18" ViewCount="8980" Body="&lt;p&gt;This question is bothering me since I started using Stack Exchange. I just want to share examples of people that made me surprised.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://crypto.stackexchange.com/questions/100450/how-to-prove-that-crc-with-an-initial-value-of-zero-is-linear&quot;&gt;How to prove that CRC - Cyclic Redundancy Checksum - with an initial value of zero is linear?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://crypto.stackexchange.com/questions/98009/could-this-be-a-secure-multiparty-secret-sharing-scheme&quot;&gt;Could this be a secure multiparty secret sharing scheme?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://crypto.stackexchange.com/questions/99875/can-there-be-identical-elliptic-curve-groups-of-points-from-different-irreducibl&quot;&gt;Can there be identical elliptic curve groups of points from different irreducible polynomials in binary extension fields?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I am talking about the users who are doing the math in answers. It is not joke math, it is serious math that is too tough for me to understand.&lt;/p&gt;&#xA;&lt;p&gt;I am undergraduate student who is graduated from college. But we never had to do such theoretical questions in college. It was mostly numbers based instead of formulas based. And we didn't learn to do such proofs even though we did study theory of computation. We didn't have to prove a lot of dangerous looking things in that subject as well. Instead it was included for few marks and we were supposed to write the gist of that (rather than proving them).&lt;/p&gt;&#xA;&lt;p&gt;We did discrete mathematics as well and we never had to study about such stuff. It was about graph theory and stuff, and our exams never tested us on deriving something, nor did the teacher's slides focus on it.&lt;/p&gt;&#xA;&lt;p&gt;But this is really making me hurt that I don't know what almost everyone knows in CS.&lt;/p&gt;&#xA;&lt;p&gt;Almost all posts of Yuval Filmus in cs.stackexchange.com surprises me. He has an unimaginable amount of knowledge and can prove anything and everything. How can one become near to that level of rigour? Honestly, this surprises me thus I am asking. I studied computer engineering in college which is a mixture of CS and electronics/communication engineering.&lt;/p&gt;&#xA;" OwnerUserId="12217" LastEditorUserId="12285" LastEditDate="2022-09-22T15:56:13.550" LastActivityDate="2022-09-24T20:30:59.823" Title="How does one become great at computer science mathematics?" Tags="|self-learning|" AnswerCount="8" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7438" PostTypeId="2" ParentId="7437" CreationDate="2022-06-06T13:23:13.957" Score="8" Body="&lt;p&gt;There is math and math and ... and math. [See &lt;a href=&quot;https://www.youtube.com/watch?v=OmJ-4B-mS-Y&quot; rel=&quot;nofollow noreferrer&quot;&gt;Map of Math&lt;/a&gt;].&#xA;Its very important to not get sidetracked by getting dazzled!&lt;/p&gt;&#xA;&lt;p&gt;Just as there is music and music ... and music.&lt;/p&gt;&#xA;&lt;p&gt;Let's look a little deeper at the music analogy.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Just sticking to piano. Compare&lt;br /&gt;&#xA;&lt;a href=&quot;https://www.youtube.com/watch?v=p1-uOCXQ_0I&quot; rel=&quot;nofollow noreferrer&quot;&gt;Horowitz&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=bzMyhzadzTQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;Art Tatum&lt;/a&gt; and &lt;a href=&quot;https://youtu.be/X7ti6HUX5xQ&quot; rel=&quot;nofollow noreferrer&quot;&gt;Utsav Lal&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Or &lt;a href=&quot;https://www.youtube.com/watch?v=kbJcQYVtZMo&quot; rel=&quot;nofollow noreferrer&quot;&gt;Beethoven&lt;/a&gt; with &lt;a href=&quot;https://www.youtube.com/watch?v=r9UjNZXmpwk&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dagar brothers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Its not often that devotees of one form will be drawn (much) to the others.&lt;/p&gt;&#xA;&lt;p&gt;More important:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Practice of one form will not conduce to (much) development on the other sides&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Yeah...Yeah. There are famous exceptions like Ravi Shankar &lt;a href=&quot;https://youtu.be/hg6nTQFHf78&quot; rel=&quot;nofollow noreferrer&quot;&gt;collaborating&lt;/a&gt; with Yehudi Menuhin. But &lt;em&gt;these are exceptions!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Two points I'd like to leave you with:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;99.9% of those who are inspired to play an instrument by looking at someone like Horowitz will not even nearly approximate Horowitz&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;95% of those who do try (assuming the attempt is not a trivial 1 month attempt) will go on to become better than they were before.&lt;br /&gt;&#xA;See this compressed &lt;a href=&quot;https://www.youtube.com/watch?v=OOLkwCLaad0&quot; rel=&quot;nofollow noreferrer&quot;&gt;progress story&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So just as in music there is no alternative but to practice, math is likewise.  Take the area you want to be good at...&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;And work at it!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;PS. Yuval Filmus usually writes at CS-SE.&lt;br /&gt;&#xA;All your examples are from Crypto-SE.&#xA;Notice? They are different!&lt;/p&gt;&#xA;&lt;p&gt;PPS. If Yuval Filmus is your idol you should ask Yuval Filmus!&#xA;Maybe on CS-SE... Maybe on meta-CS-SE&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Added later&lt;/h2&gt;&#xA;&lt;p&gt;This &lt;a href=&quot;https://youtu.be/eSFA1Fp8jcU&quot; rel=&quot;nofollow noreferrer&quot;&gt;YouTube video&lt;/a&gt; seems like a nifty taste of the difference between CS-math &amp;amp; math-math.&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-06-20T04:37:10.743" LastActivityDate="2022-06-20T04:37:10.743" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7439" PostTypeId="2" ParentId="7437" CreationDate="2022-06-06T13:33:30.773" Score="9" Body="&lt;p&gt;What you have discovered is that there is a vast difference between math and CS. Each of those fields can in some ways apply the other for some things but the thinking process is quite different.&lt;/p&gt;&#xA;&lt;p&gt;The math you need for things like cryptography is quite advanced and depends on a deep knowledge of other things.&lt;/p&gt;&#xA;&lt;p&gt;If you want to learn mathematics, then you need to study mathematics. The sorts of things you study from math in an undergraduate CS program is a tiny fraction of math as a whole. Discrete math is important to a lot of CS so it is normally studied. But number theory is pretty esoteric and requires its own insights. Insight in math isn't easily transferred from one subfield to another.&lt;/p&gt;&#xA;&lt;p&gt;Crypto isn't my field (or interest) so I can't provide specific guidance, but if I wanted to study it, I'd find a good book and see whether I could understand it or had to go back to basics.&lt;/p&gt;&#xA;&lt;p&gt;I'd also look at the requirements of a good cryptography course at a good university and look at what prerequisites are needed.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://math.duke.edu/courses/mathematical-cryptography&quot; rel=&quot;noreferrer&quot;&gt;Duke University course&lt;/a&gt; has many prerequisites including multivariate calculus, linear algebra and differential equations. I'm guessing that your undergrad CS program didn't include much of that.&lt;/p&gt;&#xA;&lt;p&gt;Note also that crypto stands on the cusp between math and CS and requires applications of both fields. It is an applied field with theoretical underpinnings. If you studied a rather different applied math field (engineering) then they might be lots of gaps.&lt;/p&gt;&#xA;&lt;p&gt;Get studying.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-06-06T13:49:36.737" LastActivityDate="2022-06-06T13:49:36.737" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7440" PostTypeId="2" ParentId="7437" CreationDate="2022-06-06T13:48:03.270" Score="24" Body="&lt;p&gt;What makes you think that &amp;quot;almost everyone&amp;quot; knows things like elliptic curves (your 3rd link)? That is pretty advanced math. In fact, it was developed by mathematicians who may not have been programmers at all. Don't feel bad that with only undergraduate knowledge you haven't mastered all of this.&lt;/p&gt;&#xA;&lt;p&gt;Computers were developed for doing computations. Ballistic trajectories and such. Those computations come from physics, and as such have been studied long before there were electronic computers. So a good part of computer science consists of other sciences (graph theory, partial differential equation solving, cryptography) that happen to suit being done on a computer. To know all of this you'd need to study all those other sciences.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-09-24T20:30:59.823" LastActivityDate="2022-09-24T20:30:59.823" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7441" PostTypeId="2" ParentId="7437" CreationDate="2022-06-06T14:08:04.857" Score="19" Body="&lt;p&gt;Computer science emerged out of a branch of mathematics, and many of the sub-branches of modern computer science also emerged from branches of mathematics.  That means that there are deep, pervasive links between the two fields, and you don't have to dig too far to find them.&lt;/p&gt;&#xA;&lt;p&gt;However, it is usually unnecessary to be fluent in the parent mathematical field in order to be an excellent practitioner of the child CS field.&lt;/p&gt;&#xA;&lt;p&gt;The reason that your undergraduate program didn't cover the mathematics so deeply is because the deeper mathematics mostly doesn't help you to engineer, produce, or code better, and what gains there are falter in the face of a simple cost-benefit analysis.  It takes a &lt;strong&gt;lot&lt;/strong&gt; of effort and time to become a Yuval Filmus, who is, after all, a mathematician, and the benefits to coding and engineering are quite small relative to that effort.&lt;/p&gt;&#xA;&lt;p&gt;If your goal is engineering, then, your efforts are better spent elsewhere.&lt;/p&gt;&#xA;&lt;p&gt;Now that my answer is done, I will also dispense some advice:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you are fascinated by the mathematics, then that is a reward in and of itself, and the meager gains in engineering will be well worth it because, given the expense of learning the mathematics, few of your peers will be able to do the handful of new things that you can now do.  Therefore, if you are interested in the mathematics for the sake of the mathematics and interest, absolutely pursue it.  You'll gain good rewards, both in life and in engineering.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;However, if you are interested in the mathematics mostly for the gains you'll get as an engineer, I would not advise you to head far in that direction.  You will find it a very difficult hill to climb.  It won't feel especially rewarding, it &lt;em&gt;will&lt;/em&gt; feel especially hard, and the engineering rewards will be few and far between.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-06-06T14:08:04.857" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7442" PostTypeId="2" ParentId="7437" CreationDate="2022-06-06T23:01:28.533" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;But this is really making me hurt that i don't know what almost everyone knows in cs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Why?&lt;/p&gt;&#xA;&lt;p&gt;This is the most important question... why is that? What does it matter?&lt;/p&gt;&#xA;&lt;p&gt;There is a much more philosophical question at the heart of this post that I think you need to address. For example, what is &amp;quot;joke math&amp;quot;? What is serious math? Your version of serious math to me is joke math to me, and my version of serious math is joke math to a MSc/PhD. For this reason, I don't think it's worth talking about because it's too subjective and ill-defined. This becomes a fruitless endeavor because every time you get better, your window will shift, and it's a never ending chase that you don't resolve if your intention is to &amp;quot;become good at math&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Ask yourself another question, suppose you got all this information in the span of a second, then what? I suspect you would feel happy for a brief period and be back to the same empty void that is making you &amp;quot;really hurt&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;I disagree with people telling you to study math here, I think you should do that &lt;em&gt;after&lt;/em&gt; you have spent time figuring out, deeply, why you feel this way, and whether it is a phantom of inadequacy or not. Only then can you decide for yourself whether pursuing mathematics more formally is something you should consider. Life is unbelievably short, make your time worth it.&lt;/p&gt;&#xA;" OwnerUserId="12226" LastActivityDate="2022-06-06T23:01:28.533" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7443" PostTypeId="2" ParentId="7423" CreationDate="2022-06-06T23:11:41.163" Score="3" Body="&lt;p&gt;I've found out a few quick shortcuts to answer this. What I'm about to say is not a complete answer, but I've found it to be so common with everyone I've worked with and all of my friends in the &amp;quot;programming&amp;quot; field that I think it's a good heuristic to determine early whether your &lt;em&gt;chances&lt;/em&gt; of liking programming are high.&lt;/p&gt;&#xA;&lt;p&gt;If you enjoy optimizing things, get irritated with repetition and wanted to do something to automate it away, enjoy games like factorio, and have at least a little bit of fun doing math and solving problems, then there's a reasonable chance that you will like it. My hypothesis here is that the things that give the dopamine rush which programming does tends to be present in what I listed. Obviously this is a far from exclusive list, so YMMV.&lt;/p&gt;&#xA;&lt;p&gt;Programming seems hard at first but that's because it requires spending a few weeks (or more) seeing solutions to a variety of things before you learn how to map a problem onto something being solved by a computer.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;says it is something that is in high demand and can help me to get a job, is it ok or am I wasting my time?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think pursuing programming &lt;em&gt;just because&lt;/em&gt; it is in high demand is a mistake for many reasons. The field is also quite demanding at times and I would hate to be in this field if I didn't love it as much as I do. Start doing it out of curiosity, and if you find yourself hooked, &lt;em&gt;then&lt;/em&gt; consider it a career move.&lt;/p&gt;&#xA;" OwnerUserId="12226" LastActivityDate="2022-06-06T23:11:41.163" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7444" PostTypeId="1" CreationDate="2022-06-06T23:14:46.850" Score="3" ViewCount="68" Body="&lt;p&gt;I have recently been reminded again (through lots of pain) why I wanted to do my masters in CS instead of mathematics. Its not that I can't do an MSc in mathematics, its just that I don't enjoy analysis or geometry at all, and my development in those two fields have been very slow. On the other hand, I am in love with combinatorics and graph theory, and have done a lot of research projects (individual reading) in graph and hypergraph theory, this is why I think a CS MSc would fit me better.&lt;/p&gt;&#xA;&lt;p&gt;However, back in March I decided to do a math MSc, since the tuition fee for a CS MSc is ~5 times the tuition for a math MSc. My idea is to hit as many classes in theoretical CS as possible, and barely take the required math classes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; Is it a sane (possible gotchas, looking for unforeseen problems) decision to focus on CS classes in a math MSc? (in other words, I &lt;em&gt;want&lt;/em&gt; a CS degree, but circumstances dictate that I enter a math program)&lt;/p&gt;&#xA;&lt;p&gt;My own considerations are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;While I do not enjoy mathematics that much, I am still strong in it, apart from geometry. I'm hoping that I can keep on developing/using my probability theory or combinatorics. I will not be hindered by abstract algebra either.&lt;/li&gt;&#xA;&lt;li&gt;Apart from graph theory, I almost have no CS background. I have been doing extensive projects with pandas, and used a lot of MatLab for my thesis, but that is about the extent of my programming skills. I don't know how to use any technologies (I still don't know how to properly use requests, still can't figure out how to multithread properly, only a partial understanding of SQLalchemy).&lt;/li&gt;&#xA;&lt;li&gt;I don't know if this is just a temporary case of 'grass is greener next on the other side'.&lt;/li&gt;&#xA;&lt;li&gt;I have seen massive improvements in my math skills between the first, second, and third year. Though somehow I'm still skeptical that I actually understand anything apart from graph theory.&lt;/li&gt;&#xA;&lt;li&gt;Were I to do this, I would pick mostly machine learning classes (there aren't that many OpRes classes in the univ I will go to, otherwise I would focus on it instead). I'm very skeptical that machine learning is something you learn in two years. I'm afraid of being in the same situation as I have now, having only theoretical understanding of things (I'm finishing a BSc in pure maths, the kids doing physics are better in calculus then I am).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12227" LastActivityDate="2022-06-06T23:14:46.850" Title="Doing basically a CS MSc under a mathematics MSc program?" Tags="|mathematics|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7445" PostTypeId="1" CreationDate="2022-06-07T12:05:16.107" Score="5" ViewCount="161" Body="&lt;p&gt;I teach Computer Science courses. Ideally, I would like to have all teaching materials in a website: slides, animation of data structures operations, live coding to illustrate the basic data structures operations, etc.&lt;/p&gt;&#xA;&lt;p&gt;What would be your recommended technology to achieve these or part of?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="204" LastEditDate="2022-06-10T21:13:30.667" LastActivityDate="2022-07-03T12:05:28.660" Title="What is the technology (or combination of technologies) one would use to create slides, animations and live coding for lectures?" Tags="|programming|data-structure|lecture-tools|" AnswerCount="1" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7446" PostTypeId="2" ParentId="17" CreationDate="2022-06-07T18:12:48.647" Score="3" Body="&lt;p&gt;A new answer for this came to me today. Infinite indirect recursion:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Pete and Repete are in a tree. Pete falls out. Who's left?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="65" LastEditorUserId="65" LastEditDate="2022-06-08T19:25:13.250" LastActivityDate="2022-06-08T19:25:13.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7447" PostTypeId="2" ParentId="7437" CreationDate="2022-06-09T06:48:20.893" Score="3" Body="&lt;p&gt;As others have pointed out, you shouldn't really feel bad about not knowing these things; you say you have studied computer engineering rather than computer science, and there seems to be, in many places, a distinction between 'engineering' and 'science' in that the engineers learn how to do things - the formulas, algorithms etc - whereas the scientists learn why you should use certain formulas and algorithms. And that leaves us with a lot of computer engineers who feel frustrated that they don't understand theory better (as well as a number of computer scientists who couldn't string a piece of code together if their lives depended on it).&lt;/p&gt;&#xA;&lt;p&gt;You should see your frustration as a good thing - it makes you want to learn more. The process of learning can be deeply rewarding in itself and on top of that, there are many indications that continuing to learn all your life may be an important factor in avoiding dementia in later life.&lt;/p&gt;&#xA;" OwnerUserId="12241" LastActivityDate="2022-06-09T06:48:20.893" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7449" PostTypeId="2" ParentId="4717" CreationDate="2022-06-09T22:32:18.500" Score="1" Body="&lt;p&gt;In my textbook, I say, &amp;quot;In its most basic form, an interface is an offer to sign a contract.&amp;quot;   It consists of a collection of method headers; classes sign the contract by implementing the interface.  I then proceed from there to discuss interfaces, polymorphism, and the Visibility and Delegation priciples.&lt;/p&gt;&#xA;&lt;p&gt;This allows me to defer the development of static methods and data and default methods in interfaces.&lt;/p&gt;&#xA;" OwnerUserId="21" LastActivityDate="2022-06-09T22:32:18.500" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7450" PostTypeId="2" ParentId="7379" CreationDate="2022-06-10T02:40:21.260" Score="1" Body="&lt;p&gt;Let me poke a hole in the “real world” argument.  I work in the real world. And what we value more than anything is readable code.&lt;/p&gt;&#xA;&lt;p&gt;Why? Because all code is broken. But I can fix readable code.&lt;/p&gt;&#xA;&lt;p&gt;Give me code that works 99 times out of 100 that no one understands and you’re likely to kill someone.&lt;/p&gt;&#xA;&lt;p&gt;But yeah, teachers are busy. Grade as best you can. Just remember these kids will code things that might some day be used to keep you alive.&lt;/p&gt;&#xA;&lt;p&gt;I’d fail the ones that don’t build that you can’t see how to fix. That’s not readable code.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="1401" LastEditDate="2022-06-10T02:46:25.287" LastActivityDate="2022-06-10T02:46:25.287" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7451" PostTypeId="2" ParentId="7437" CreationDate="2022-06-14T19:06:45.683" Score="3" Body="&lt;p&gt;You are asking two related questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Does college prepare one to answer random questions on &lt;a href=&quot;https://crypto.stackexchange.com&quot;&gt;Cryptography&lt;/a&gt;?&lt;/li&gt;&#xA;&lt;li&gt;How does one get better at answering such questions?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The first question is answered (implicitly) in your post:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;We never had to do such theoretical questions in college. We didn't learn to do such proofs. Our exams never tested us on deriving something.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The only conclusion is that your college education didn't focus on theorem proving; it had different aims, presumably preparing you for the job market.&lt;/p&gt;&#xA;&lt;p&gt;Is this typical? Are you lacking knowledge which is commonplace in CS, to paraphrase your penultimate paragraph? Let's break this down to two questions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Do CS programs usually aim at imparting theorem proving skills?&lt;/li&gt;&#xA;&lt;li&gt;Are CS programs which aim at imparting such skills successful in imparting them?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The answer to the first question depends on the type of the program: the country, the type of academic institution, and so on. In Israel, traditionally CS programs are highly theoretical, whereas in the US, only half the degree is focused on the major, and the mathematical level is dramatically lower (proof-based math classes, which our undergraduates start taking during their very first semester, are delayed until the third year in the US).&lt;/p&gt;&#xA;&lt;p&gt;The answer to the second question depends on many factors, include student motivation. According to my experience, the typical student can write a proof (they have to, in order to pass some of the more theoretical classes), but they don't have a deep understanding of the material, and so won't be able to answer random questions on Cryptography.&lt;/p&gt;&#xA;&lt;p&gt;Indeed, people who are answering such questions are mostly (though not exclusively) experts on the topic, who have spent many years honing the relevant skills. It's not fair to compare yourself, a college graduate, to someone who is doing their PhD, let alone someone who is faculty. You simply have less experience than these folks. Moreover, people doing their PhD are more naturally inclined toward mathematical thinking (that's why they chose to do a PhD in such a topic), and so they are (much) better than average; all the more so for faculty.&lt;/p&gt;&#xA;&lt;p&gt;Finally, how do you get better? Study, Practice, and Talent (a complex combination of nature and nurture). But first, you need to have realistic expectations so you don't get discourage. Don't expect to be at the level of a world expert right away. You get better with time. Studying in a structured setting and collaborating with peers and more senior experts is a great help. Research is a lifelong endeavor, and we are constantly learning and improving. This is a big topic which really merits its own separate discussion.&lt;/p&gt;&#xA;" OwnerUserId="1536" LastActivityDate="2022-06-14T19:06:45.683" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7452" PostTypeId="2" ParentId="7437" CreationDate="2022-06-15T21:16:17.043" Score="1" Body="&lt;p&gt;If by mathematics you mean exactly that, mathematics, not including logic or even if you mean the kind of mathematics used in cryptography, then I don't have much to add.&lt;/p&gt;&#xA;&lt;p&gt;However, if you mean a mathematical approach to computer science or programming then have a look at the following keywords: formal methods, formal verification, model checking, SMT solvers, Event-B, Hoare-Floyd logic, the Z formal notation, the Coq proof assistant, Isabelle/HOL, Temporal Logic of Actions (TLA), Communicating Sequential Processes (CSP), &lt;span class=&quot;math-container&quot;&gt;$\pi$&lt;/span&gt;-calculus, linear time temporal logic (LTL), type theory, category theory, relation algebra, and a very long etcetera.&lt;/p&gt;&#xA;&lt;p&gt;All that is mathematics for computer science. Most of those topics has nothing to do with traditional math such as calculus, linear algebra, geometry, continuous functions, integrals, derivatives, etc.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Ben I&amp;quot; said in an answer above:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The reason that your undergraduate program didn't cover the&#xA;mathematics so deeply is because the deeper mathematics mostly doesn't&#xA;help you to engineer, produce, or code better, and what gains there&#xA;are falter in the face of a simple cost-benefit analysis.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In my opinion this is not right. There's a body of mathematics and logic that is tantamount to your value as a software developer. Unfortunately, most CS curricula don't tech that or does it in optional courses, while forcing you to take courses on mathematics which will not help you to maximize your programming/CS skills.&lt;/p&gt;&#xA;" OwnerUserId="12264" LastActivityDate="2022-06-15T21:16:17.043" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7454" PostTypeId="2" ParentId="2897" CreationDate="2022-06-18T18:02:25.337" Score="1" Body="&lt;p&gt;&lt;a href=&quot;https://ohmygit.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Oh My Git!&lt;/a&gt; is a free game that teaches Git.  It explains:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Commits&lt;/li&gt;&#xA;&lt;li&gt;Branches&lt;/li&gt;&#xA;&lt;li&gt;Merging and conflict resolution&lt;/li&gt;&#xA;&lt;li&gt;Remotes repositories&lt;/li&gt;&#xA;&lt;li&gt;Restoring files&lt;/li&gt;&#xA;&lt;li&gt;Bisect&lt;/li&gt;&#xA;&lt;li&gt;Stashing&lt;/li&gt;&#xA;&lt;li&gt;Tags&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;It includes a nice graph display of all commits, branches, tags, etc. and HEAD. Git commands can either be entered into a built-in terminal or by &amp;quot;playing cards&amp;quot;: There is e.g. a card with &amp;quot;git checkout&amp;quot; and a short description written on it, which you can drag onto a commit or a branch name to checkout.&lt;/p&gt;&#xA;&lt;p&gt;I haven't tried it with Git beginners yet, but I myself quite liked playing it and could imagine that especially the cards feature could be helpful to students.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2022-06-18T18:02:25.337" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7455" PostTypeId="1" CreationDate="2022-06-19T13:01:40.970" Score="4" ViewCount="71" Body="&lt;p&gt;My team of tutors and lecturers aims to have a centralized repository of programming tasks. The idea is to have a database to which we can easily add new tasks, modify the existing ones and group them into their respective theme.&lt;/p&gt;&#xA;&lt;p&gt;For example, the task that requires the student to create a stateful lambda that recursively computes the Fibonacci sequence would be labeled (or tagged) with &lt;code&gt;lambda&lt;/code&gt; and &lt;code&gt;recursion&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;We aim to be able to easily query those tasks using not only tags, but other means of specification, for example tools used in the associated solutions. That implies we also wish to associate the tasks with other things, among them solutions, commentary-based recordings and possible reference materials.&lt;/p&gt;&#xA;&lt;p&gt;What we have looked at so far:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;GitHub&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pros:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easily accessible;&lt;/li&gt;&#xA;&lt;li&gt;Perfect for reviewing changes;&lt;/li&gt;&#xA;&lt;li&gt;Very convenient views of some of the files;&lt;/li&gt;&#xA;&lt;li&gt;Externally set up;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;cons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Poor support for tagging and grouping files (tasks);&lt;/li&gt;&#xA;&lt;li&gt;No support for associating files (cross-referencing is error prone);&lt;/li&gt;&#xA;&lt;li&gt;No support for querying and filtering the tasks;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Relational database&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pros:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easily accessible, since we are all programmers;&lt;/li&gt;&#xA;&lt;li&gt;Good association mechanisms;&lt;/li&gt;&#xA;&lt;li&gt;Great support for queries;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;cons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Poor support of visual browsing;&lt;/li&gt;&#xA;&lt;li&gt;Would have to be internally set up;&lt;/li&gt;&#xA;&lt;li&gt;Certain file types would require to be stored externally to the DB and references from within it;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MS Teams' private Team files&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;pros:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easily accessible;&lt;/li&gt;&#xA;&lt;li&gt;Good visual browsing;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;cons:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Slow;&lt;/li&gt;&#xA;&lt;li&gt;Poor support for associations;&lt;/li&gt;&#xA;&lt;li&gt;Poor support for modification;&lt;/li&gt;&#xA;&lt;li&gt;No support for querying and filtering the tasks;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As you can see, all of the aforementioned tools have serious issues. Are there any tools specificalyl designed to solve this problems? Of course there is always an idea to create one and run it on university's server, but before we jump into doing that, we would like to explore ready-to-use possibilities.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastActivityDate="2022-11-05T21:51:04.093" Title="What are some suitable persistence services for storing programming tasks?" Tags="|lecture-tools|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7456" PostTypeId="1" CreationDate="2022-06-21T17:24:03.747" Score="1" ViewCount="143" Body="&lt;p&gt;Taking course B or C is required for my school's computer science program. Is course A, which I have taken equivalent to course B or C?&lt;/p&gt;&#xA;&lt;p&gt;Course A:&lt;/p&gt;&#xA;&lt;p&gt;Computer Science II (CSII) is the continuation of Computer Science I. The purpose of CSII is to expand students' understanding of Computer Science and computer programming, assuming that they have the basic knowledge of the Python language. The course introduce another programming language - Java - and also focuses on the pure Object-Oriented features of Java, such as inheritance, polymorphism, and exceptions, as well as on simple data structures (lists, stacks, and queues) and algorithms (searching and sorting). By the end of the semester students will be able to develop sizable computer programs in Java.&lt;/p&gt;&#xA;&lt;p&gt;Course B:&lt;/p&gt;&#xA;&lt;p&gt;Introduction to principles of computer science. Information structures, functional programming, object-oriented programming, grammars, logic, logic programming, correctness, algorithms, complexity analysis, finite-state machines, basic processor architecture, and theoretical limitations.&lt;/p&gt;&#xA;&lt;p&gt;Course C:&lt;/p&gt;&#xA;&lt;p&gt;Accelerated breadth-first introduction to computer science as a discipline for students (usually first-year) who have a strong programming background. Computational models of functional, object-oriented, and logic programming. Data structures and algorithm analysis. Computer logic and architecture. Grammars and parsing. Regular expressions. Computability. Extensive practice constructing applications from principles, using a variety of languages.&lt;/p&gt;&#xA;" OwnerUserId="12287" LastEditorUserId="27" LastEditDate="2022-06-22T14:44:05.297" LastActivityDate="2022-06-22T14:44:05.297" Title="Would these two computer science courses count as equivalent?" Tags="|undergraduate|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7457" PostTypeId="2" ParentId="7456" CreationDate="2022-06-21T18:29:43.380" Score="6" Body="&lt;p&gt;If you mean equivalent for purposes of substitution in a given curriculum at a particular university, then it is up to them.&lt;/p&gt;&#xA;&lt;p&gt;However, they don't seem equivalent to me in any sense. The first is intended to provide some initial programming competence and the second is an overview of the field. If the second course doesn't require programming then it is unlikely to be very deep on most of those topics.&lt;/p&gt;&#xA;&lt;p&gt;I think the audience for the courses is different and a university requiring both is likely to require the first before the second if the latter has any rigor.&lt;/p&gt;&#xA;&lt;p&gt;But an admissions committee might let a person substitute one for the other (or not).&lt;/p&gt;&#xA;&lt;p&gt;Addressing a comment, I don't think that course 1 is sufficient to avoid taking one of the others. The intent and coverage are very different. Both give you a breadth of knowledge that is needed to do computer science beyond (mere) programming. Without one of those courses you might be handicapped in later courses.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-06-21T19:37:27.627" LastActivityDate="2022-06-21T19:37:27.627" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7458" PostTypeId="2" ParentId="7456" CreationDate="2022-06-21T21:50:42.380" Score="4" Body="&lt;p&gt;Buffy is absolutely correct.  A is different in both spirit and content to both B and C, with very little overlap.  B does mention Object Orientated Programming, so there is an overlap.  But B at its core, is an introduction to the principles of Computer Science, which A (a fast-paced introductory programming course) doesn't even touch upon.&lt;/p&gt;&#xA;&lt;p&gt;Functional programming and logic programming are different entire paradigms of programming, just like Object programming is a paradigm.  You will likely find nothing you are familiar with there, and certainly nothing even breathed about in course A.&lt;/p&gt;&#xA;&lt;p&gt;As Buffy pointed out, any university can choose to give credit where it would like, but there is very nearly zero overlap between A and either B or C, so it seems unlikely to me that they would grant your request.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-06-21T21:50:42.380" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7460" PostTypeId="1" CreationDate="2022-06-23T17:58:51.303" Score="5" ViewCount="307" Body="&lt;p&gt;The situation of students in these countries is terrible. In paper, every information for CS is available in paper. And it's correct for 70% of content. Mainly the content available that is of high quality for free are &amp;quot;textbooks&amp;quot;. That too thanks to those great sites that I can't name here. Nobody from these countries even in their dreams would be able to afford even a single textbook for 1 subject if they had to pay the prices for it.&lt;/p&gt;&#xA;&lt;p&gt;I am blaming nobody for this whole situation, not even government. The blame game is meaningless and doesn't give anyone anything.&lt;/p&gt;&#xA;&lt;p&gt;The teaching is horrible. Nobody wants to stay in these countries. So what do the students do? They graduate, maybe with a good gpa. Their ultimate goal in the mind is to do GRE, and study in USA and settle there. They don't seek for any other jobs. They just apply for teaching in the college that they studied in. This is about 30% of the teachers.&lt;/p&gt;&#xA;&lt;p&gt;Then there is no research facilities available (except just for the name). So it doesn't attract people who would like to really deal with the subject. Rather a different set of people that you can understand what I am saying.&lt;/p&gt;&#xA;&lt;p&gt;I don't blame any teachers. They have been taught by teachers similar to them. The quality of teaching is atrocious. For a moment, I would assume teaching is subjective and discount them on that. But their slides preparation is dangerous. They go to google, search for the &amp;quot;abcd-slide&amp;quot; and download the first google search. Don't even give credits and edit their  own name on it. Voila, you made  a slide.&lt;/p&gt;&#xA;&lt;p&gt;Don't even imagine about complaining anything to management. I know friends who got failed because they asked for extra classes of a professor. Supposedly the ego of professor was too big.  Nobody can do anything, because it is university and rightly so, teachers have huge amount of power.&lt;/p&gt;&#xA;&lt;p&gt;I don't have problems with slides. In my terrible journey of learning computer science in this country, slides in internet were my best friends that I could never meet. In the sense, that they are very rare. It is  very easy to understand stuffs written in a slide compared to what is written in textbooks. Obviously. I want to clarify this that I don't have problem with slides as many students in this region actually have started to think &amp;quot;slides are the problem&amp;quot;, and if the teachers taught in whiteboard/blackboard, everything will be fine.&lt;/p&gt;&#xA;&lt;p&gt;Yes there are MIT, NPTEL to name a few. But firstly our course evaluation was so different from what is taught there, secondly, most students could never follow what's being taught there. They of course were the best minds of USA, India etc, there is zero doubt about that, but the target students of those courses were maybe not us. Even when we learnt something totally and watched those courses, it would still confuse us.&lt;/p&gt;&#xA;&lt;p&gt;The only best friend of us have been those textbooks. And honestly, having to download 50 different textbooks and read 5-10 of them for finding 1 information is really inefficient way of learning and I am not sure if everyone in the world is doing the same. If they are, it would feel comforting haha.&lt;/p&gt;&#xA;&lt;p&gt;There are articles in internet for sure. But there are two types of articles-:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Written by companies&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Written by random users&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Those written by companies do offer some value even though most of them are prefer to teach in higher level abstracting the details required for computer science but those written by random users are mostly copied from the same source and the quality is nowhere compared to textbooks and depth of information is lacking. A good site out of these is &amp;quot;GFG&amp;quot;. It is very decent compared to whatever is available online.&lt;/p&gt;&#xA;&lt;p&gt;Most of us had no idea what a good class would look like until we found an online course of some great teachers. Luckily they were pretty cheap and affordable. We learnt what we were really missing that day. And honestly, there is no way a student from these countries would ever even catch up a serious student from those countries I'm talking about even though &amp;quot;it's CS&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;There are forums for learning. But the thing is we can never use this forum to learn MISSING cs concepts. Because forums have quality standard. They want quality questions. And in no world, a guy who don't even have a textbook that is designed for his university course and examinations(or any reference material) is asking a great question. And questions of these people is never suited for these forum. The literal question most of the times becomes &amp;quot;where can I find this information&amp;quot; &amp;quot;what is this question  called&amp;quot; &amp;quot;where can I find explanations for this example&amp;quot;. And rightly so, these questions are removed and these questions must be removed to keep the quality standard of site to the highest level. Nobody owes anyone anything and we aren't complaining that to anyone.&lt;/p&gt;&#xA;&lt;p&gt;Wikipedia is also helpful for some of the concepts for sure. Specially it's helpful when you already know the fundaments and just want to look for extra reference. Eg-: you already know about certain algorithm but you want to see some exceptional cases. I don't think it's a great source of learning material for learning something for the first time.&lt;/p&gt;&#xA;&lt;p&gt;Another wonderful source of information can be research papers. But most research papers seem to be teaching something additional i.e if you are learning about MPLS for exam(hypothetical), they are teaching a modified MPLS technology and talk little bit about the original MPLS. And it is well researched fact that research paper are extremely technical in nature(not sure if technical is the right word, books are also technical but they are easier to understand, want to say that research papers aren't easy to grasp).&lt;/p&gt;&#xA;&lt;p&gt;Then youtube, you can't forget it. It's good and decent for understanding surface level materials.  There are lots of videos for sure but they are not very satisfactory. And nobody should blame anyone for not providing the best materials for free.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Any information is better than bad or information.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then there are some sites like udemy that provides paid courses. They weren't even available in this country since a long time.(There was no payment method). One course that we did there was lifechanging. Everything was easy when there was proper guidance. You could spend time on extra learnings, proofs, theories that are in research papers when you understood what's taught easily. There might be other sites but their pricing is just too big that nobody is going to be able to pay. (As there are no part time jobs in these countries, forget part time jobs even qualified and talented people are jobless).&lt;/p&gt;&#xA;&lt;p&gt;Since there is no official textbook for exams point of view and syllabus point of view. And since they have kept some topics in exam that honestly can't be googled and found anywhere, and which gets skipped by professors and their slides, it is just terrible terrible environment for students.&lt;/p&gt;&#xA;&lt;p&gt;Sorry if this became a rant, but I am trying to get some constructive thoughts about these situation. We don't need advice as me and my friends have graduated or near graduation already.&lt;/p&gt;&#xA;&lt;p&gt;Is there anything that anyone could do to at least help these students in these under developing countries with worst environment for education?&lt;/p&gt;&#xA;" OwnerUserId="12291" LastEditorUserId="1293" LastEditDate="2022-08-10T15:55:10.707" LastActivityDate="2022-08-10T15:55:10.707" Title="Can we do anything to help CS students from 3rd world under developed countries?" Tags="|resource-request|advising|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7461" PostTypeId="2" ParentId="7460" CreationDate="2022-06-24T07:52:59.643" Score="2" Body="&lt;p&gt;Mahatma Gandhi:&lt;br /&gt;&#xA;&lt;em&gt;Be the change you wish to see in the world&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;More apocryphally seen in this&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/EBFNhm.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/EBFNhm.jpg&quot; alt=&quot;Jesus_on_bench&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It may help to see yourself in the center of 3 concentric circles in a large square&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Innermost : circle of action&lt;/li&gt;&#xA;&lt;li&gt;Next : circle of influence&lt;/li&gt;&#xA;&lt;li&gt;Outer : circle of knowledge (information/news)&lt;/li&gt;&#xA;&lt;li&gt;Outermost square : region of ignorance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In more detail&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There are some things you an actually do&lt;/li&gt;&#xA;&lt;li&gt;There are some things you can't directly do but can convince/plead/cajole/force others to do&lt;/li&gt;&#xA;&lt;li&gt;There are some things you can do nothing about&lt;/li&gt;&#xA;&lt;li&gt;And there's the infinitely wider universe of things you really know zero about in which the question of doing anything does not even arise.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you want to stay positive and useful to yourself and others, it's better to stay closer to the start of these lists, or in the inner circles.&lt;/p&gt;&#xA;&lt;p&gt;Jordan Peterson literally asks young people in the dumps to start by cleaning their room.  Whether that works for you literally or metaphorically you can decide.  But something thereabouts is a good idea.&lt;/p&gt;&#xA;&lt;p&gt;After then &lt;em&gt;very gingerly&lt;/em&gt; you can start trying to change things near you -- parents, teachers, friends... But be careful to aim small &lt;em&gt;and achieve&lt;/em&gt; rather than aim grand and fall on our face.&lt;/p&gt;&#xA;&lt;p&gt;Beyond that is a danger zone.  Say I don't like the situation in Ukraine.  Thinking carefully, I quickly see that the answer to &lt;em&gt;What can I do about it?&lt;/em&gt; is an unequivocal &lt;strong&gt;Nothing&lt;/strong&gt;.  From there, if I think this through properly(!) I see that while I can do nothing useful, I am wasting time, energy and most important my vital force on these thoughts.&lt;/p&gt;&#xA;&lt;p&gt;This is ultimately the beginning and end of all spiritual practice -- pull the mind out of useless associative wandering and direct it to something purposive.&lt;/p&gt;&#xA;&lt;p&gt;And beyond that is a vast infinite unknown.  The situation on the 13th planet of Sirius is vastly worse than here on earth. And if you think &amp;quot;BS!&amp;quot; to that you dont really have to leave earth.  Just randomly pick one of the 180 countries on earth. A good many are worse off than you.  [It's easy enough to see that: the folks who are really badly off probably cant get onto the net to ask as you are doing]  Note I am not belittling your predicament.  Just trying to give some perspective and cajoling you to back off into a circle where you can make a difference however small.&lt;/p&gt;&#xA;&lt;h2&gt;Be Good&lt;/h2&gt;&#xA;&lt;p&gt;Your entire plea can be summed up as &lt;em&gt;These folks X-Y-Z need help!&lt;/em&gt; Notice that nobody here knows their predicament and what will help them better than you!&lt;/p&gt;&#xA;&lt;p&gt;Just a small step now: Jump in!&lt;/p&gt;&#xA;&lt;p&gt;Here's one very rich, very very successful, &lt;em&gt;and very very very helpful man&lt;/em&gt; showing the way better than I can:&#xA;&lt;a href=&quot;http://www.paulgraham.com/good.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Be good&lt;/a&gt;. It's worth a read.&lt;/p&gt;&#xA;&lt;p&gt;I'll leave you with two sayings:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The Vedanta master Ramana Maharshi was asked: &lt;em&gt;How to find my guru?&lt;/em&gt; He said: &lt;em&gt;Work with what you have and your guru will appear.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Richard Bach in the book &lt;em&gt;Illusions&lt;/em&gt; said: &lt;em&gt;Here is a test to see if the purpose of your life is fulfilled. If you're alive it isn't.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;More Practical Advice&lt;/h2&gt;&#xA;&lt;p&gt;Take up the published curricula of some well established universities and collect the courses: eg DBMS, OS, Compilers... a bunch of programming courses, some hardware exposure, some theory, a bunch of background math courses, fancy new age stuff (Cloud, Blockchain, machine learning, IOT da-da-da).  Start figuring out what of these call you and delve deeper into that. Just be careful of getting sucked into the new-n-fancy before a minimum familiarity with the basics.&lt;/p&gt;&#xA;&lt;p&gt;And programming is important; &lt;em&gt;but it's not all there is to CS!&lt;/em&gt;&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2022-07-05T06:21:21.820" LastActivityDate="2022-07-05T06:21:21.820" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7463" PostTypeId="2" ParentId="7445" CreationDate="2022-06-30T21:59:10.510" Score="3" Body="&lt;h3&gt;Use &lt;a href=&quot;https://revealjs.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;RevealJS&lt;/a&gt;.&lt;/h3&gt;&#xA;&lt;p&gt;Initially when this question was asked I was adopting &lt;a href=&quot;https://revealjs.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;RevealJS&lt;/a&gt; for my own slides after I had witnessed some of my colleagues using it. At that point my knowledge about the framework was incomplete. However, I am very happy to come back here and see that &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7445/what-is-the-technology-or-combination-of-technologies-one-would-use-to-create#comment20368_7445&quot;&gt;it has already been mentioned in the comments&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;RevealJS is amazing. Even the &lt;a href=&quot;https://revealjs.com/installation/#full-setup&quot; rel=&quot;nofollow noreferrer&quot;&gt;full setup&lt;/a&gt; is extremely simple and it comes with &lt;a href=&quot;https://revealjs.com/?demo&quot; rel=&quot;nofollow noreferrer&quot;&gt;a demo&lt;/a&gt; (which you can run after installing the framework) which demonstrates the full potential of the framework... by using it! Something catches your eye? Examine how it behaves by inspecting the code, tweak it and include it in your slides!&lt;/p&gt;&#xA;&lt;p&gt;RevealJS is open source. It's extremely important for content creators and for support paired with an amazing community.&lt;/p&gt;&#xA;&lt;p&gt;RevealJS is simple. You can kickstart the entire presentation by simply editing the demo. It's easy to use pre-existing tools that enable you to do everything you have listed:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Slides&lt;/strong&gt; - The integral part of the framework. As simple as adding a &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; element.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Animations&lt;/strong&gt; - Sometimes we need to draw more attention to certain transitions. RevealJS comes with some ready-to-use animations, but nothing is stopping you from creating your own transitions!&lt;/p&gt;&#xA;&lt;p&gt;In addition to that, there are many built-in animations dedicated to code. Want to highlight a specific line? A section of lines? Animate the highlighting in a specific order? As simple as specifying which lines you wish to highlight in which order.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live coding&lt;/strong&gt; - Well, depending on the language, it's either trivial to embed it (web-based elements &lt;em&gt;just work&lt;/em&gt; out of the box) or to use some other, external sources. For example, given the fact that RevealJS is web-based, it's trivial to embed any website data to it. &lt;a href=&quot;https://replit.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://replit.com/&lt;/a&gt; or &lt;a href=&quot;https://godbolt.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://godbolt.org/&lt;/a&gt; are as easy to add to your slides as it can get.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All in all, it's easy to use, easy to navigate, easy to pick up and I am yet to encounter something that will turn out to be a major flaw in that framework.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastEditorUserId="11453" LastEditDate="2022-07-03T12:05:28.660" LastActivityDate="2022-07-03T12:05:28.660" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7464" PostTypeId="2" ParentId="7460" CreationDate="2022-07-04T07:44:15.677" Score="1" Body="&lt;p&gt;Software development is one of the freest things to learn, relative to other fields; with the exception of a computer on which to develop, which is an inherent requirement for writing software. Languages and compilers are freely distributed. Most (if not all) have freeware IDEs that you can develop in. There are quite frankly a lot of resources and discussions online on software development, and a lot of people are freely putting in time to help other (StackExchange being a great example).&lt;/p&gt;&#xA;&lt;p&gt;The only limiting factor is &lt;strong&gt;knowledge&lt;/strong&gt;. This is where the paid part comes in: textbooks, courses, and teachers.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Those [textbooks] written by companies do offer some value even though most of them are prefer to teach in higher level abstracting the details required for computer science but those written by random users are mostly copied from the same source and the quality is nowhere compared to textbooks and depth of information is lacking.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;That increase in quality is why you're paying for it. It takes effort to both explore the field more in-depth and explain it in a student-friendly way. That effort is what you're paying for (I'm sidestepping any discussion on unreasonable markup on books because it's not something we can change nor concretely address here).&lt;/p&gt;&#xA;&lt;p&gt;However, these paid resources are not inherently necessary in order to develop software. Obviously they help reduce the initial effort required to get going, but nothing is stopping you from providing this knowledge yourself.&lt;/p&gt;&#xA;&lt;p&gt;Taking an analogy: other than buying the instrument itself, it doesn't cost any money to learn how to play said instrument. However, if you want to learn better or more quickly, this is done by having a teacher involved, who you obviously have to compensate for their time and expertise. Money can improve the quality of your learning process, but the instrument can be learned without spending more money if you so choose - it'll just take you more trial and error, time and effort.&lt;/p&gt;&#xA;&lt;p&gt;Teachers inherently need to understand their curriculum, and they could therefore be making their own materials to help students learn the subject. Those self-made resources might not be as in-depth as some of the paid alternatives are, but you can definitely get students started on the basics of development and how to self-learn based on available free online resources.&lt;br /&gt;&#xA;Continuing the analogy, anyone who can play this instrument can give you a rudimentary set of exercises to learn the instrument. It might not be as good as a professional educator's, but it'll still be better than nothing.&lt;/p&gt;&#xA;&lt;p&gt;What you're really driving at here is not a lack of teaching materials, it's a lack of quality in the available teaching due to a shortage of experienced people (since they prefer moving abroad). That's an economic argument more so than it is an academic one.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The teaching is horrible. Nobody wants to stay in these countries. So what do the students do? They graduate, maybe with a good gpa. Their ultimate goal in the mind is to do GRE, and study in USA and settle there.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a classic &amp;quot;brain drain&amp;quot;, and it does significantly hamper both the economy and academia of the country being drained. However, this is not something that can be solved from the perspective of the academia. It is a large scale economic situation that would require turning the entire country's economy around in a way that people want to be part of it, as that is currently not the case.&lt;/p&gt;&#xA;&lt;p&gt;It sucks. I very much agree with that. But in scope of what we can answer in this community, this is not something we can impact or change; it is something we cannot change and therefore have to accept it the way it is.&lt;/p&gt;&#xA;&lt;p&gt;New Zealand is a great example of a country struck by brain drain, as a lot of kiwis are able to freely move to Australia and make more money and have  more affordable housing (relative to their income).&lt;br /&gt;&#xA;And NZ is not able to come up with a simple solution to combat this probem. They try, e.g. by increasing the interest rate on student loans when the student moves abroad soon after graduating. These are significant changes to the interest rate, and it is &lt;em&gt;still&lt;/em&gt; financially viable to move abroad and compensate for the increased loan repayments.&lt;/p&gt;&#xA;&lt;p&gt;This is not a simple problem to solve, and it cannot be solved on the level of educators.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2022-07-04T07:44:15.677" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7465" PostTypeId="1" CreationDate="2022-07-04T22:13:00.553" Score="2" ViewCount="238" Body="&lt;p&gt;This semester my students had to submit a project. Small, yet rich in functionality console application written in C++. They had 8 weeks during which I was always available for consultations. In addition to that, I have scheduled some extra time for students to consult their ideas, implementation and ponder over some of their problems.&lt;/p&gt;&#xA;&lt;p&gt;Majority of the submitted projects were of a quite high quality. However, some of them used tools that were neither covered nor are particularly advised by the external sources. On the contrary, actually.&lt;/p&gt;&#xA;&lt;p&gt;For example, one of the students (out of ~1000) used a bunch of &lt;code&gt;goto&lt;/code&gt;s. We are teaching Modern C++ and we have never covered &lt;code&gt;goto&lt;/code&gt;s during the laboratories. They were briefly &lt;em&gt;mentioned&lt;/em&gt; during lectures, but it was more of a &amp;quot;we don't do that here&amp;quot; comment.&lt;/p&gt;&#xA;&lt;p&gt;Another submitted project was covered with &lt;code&gt;#region&lt;/code&gt;s. As far as I am aware, even in C# it's no longer a practice.&lt;/p&gt;&#xA;&lt;p&gt;During the course we have frequently commented on the importance of code quality, not merely the solution being functional. During the defense of the project I took my time explaining why such approaches are undesirable, but I was not convinced about the course of action regarding the grade. A part of the grade was being dedicated to code quality and usage of proper tools. The students knew it the whole time. While I &lt;em&gt;could&lt;/em&gt; see some negative points being assigned for using &lt;code&gt;goto&lt;/code&gt; since it was mentioned in the lectures that students should not use that unless there really is no better way of achieving the desired goal, I am really unsure what to do about &lt;code&gt;#region&lt;/code&gt;s or other obscure approaches that do not apply to C++.&lt;/p&gt;&#xA;&lt;p&gt;Are there preferred way to approach problems like this?&lt;/p&gt;&#xA;" OwnerUserId="11453" LastEditorUserId="204" LastEditDate="2022-07-16T16:42:55.220" LastActivityDate="2022-07-16T16:42:55.220" Title="How to approach students who submit their work which consists of frowned upon tools?" Tags="|project|grading|advising|" AnswerCount="3" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7466" PostTypeId="2" ParentId="7465" CreationDate="2022-07-04T23:34:20.920" Score="4" Body="&lt;p&gt;My recommendation is that, for purposes of grading, that you take no action at all. You haven't indicated that you were clear with the students that such &amp;quot;outside the box&amp;quot; tools were not to be used, so it would be changing the rules after the game is played to deduct points now.&lt;/p&gt;&#xA;&lt;p&gt;The grading rubric used by graders needs to be clear and specific. It needs to be developed along with the exercise prior to giving he assignment, not after it has been completed by students. It doesn't need to be revealed to students, but the instruction given to students needs to be completely consistent with it. If this was not anticipated, then you are ethically a bit stuck. Treat it as a learning exercise for the next time you give a programming exercise. If this is important for grading then make it equally important for instruction.&lt;/p&gt;&#xA;&lt;p&gt;However, there is the possibility that the code was found, not written by the students, so you might need to explore that.&lt;/p&gt;&#xA;&lt;p&gt;It is also possible that a few students in your huge class had previous knowledge and habits about coding that they fell back on. Some students in an &amp;quot;elementary&amp;quot; course know quite a lot about coding, though perhaps not very sophisticated. Someone who had done assembly programming in the past might naturally want to use goto in spite of your admonitions.&lt;/p&gt;&#xA;&lt;p&gt;You might, however, want to have a conversation with the students to see &amp;quot;why&amp;quot; they coded as they did. It might give you some insight about how things occurred.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-07-05T19:01:13.417" LastActivityDate="2022-07-05T19:01:13.417" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7467" PostTypeId="2" ParentId="7465" CreationDate="2022-07-05T02:41:02.597" Score="1" Body="&lt;p&gt;My recommendation is just a bit harsher than that softy, Buffy (all of whose advice is very good, by the way).&lt;/p&gt;&#xA;&lt;p&gt;I will often deduct a few points (not much) to create just enough sting to get students to pay attention to how to improve.  How many points are needed depends a lot on the population of students you've got.  I've taught in a lot of different environments, and I've found that 1 percentage point can be enough for some kids, while 3 or 5 is more liable to catch the attention of others.&lt;/p&gt;&#xA;&lt;p&gt;If the mistake is egregious enough, I might even go as high as 10, but, again, the purpose is to catch students attention, not to punish, so it would have to be both a very small assignment (with little impact on their larger grade) and a less grade-conscious population for me to go so high.&lt;/p&gt;&#xA;&lt;p&gt;I would then put a fairly lengthy note explaining the bad practice, and I'd make sure that the note is prominently referenced next to their grade (e.g. &lt;em&gt;&lt;strong&gt;see important note at the end&lt;/strong&gt;&lt;/em&gt; or some such.)&lt;/p&gt;&#xA;&lt;p&gt;An alternative approach is to make a far larger deduction, but write a note saying to see you for a chance to earn the points back.  Whether or not something like this is appropriate depends on your institution and circumstances, so I can't comment.  I will say that it can really help students learn, and it's an approach that they often appreciate because it both helps them to grow and is pretty non-punitive.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-07-05T11:24:45.820" LastActivityDate="2022-07-05T11:24:45.820" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7469" PostTypeId="2" ParentId="7465" CreationDate="2022-07-05T09:00:23.787" Score="0" Body="&lt;p&gt;Let me answer from the perspective of a seasoned software developer.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;During the course we have frequently commented on the importance of&#xA;code quality, not merely the solution being functional.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I suppose you made clear that code quality becomes relevant for the grading, hopefully indicating how much influence that aspect has.&lt;/p&gt;&#xA;&lt;p&gt;Using features that haven't been covered in your course is not a bad thing in itself. Generally, it shows initiative on the side of the student. But with freedom comes responsibility. So, using &amp;quot;outside-the-course&amp;quot; features can earn bonus as well as malus points.&lt;/p&gt;&#xA;&lt;p&gt;You mention two different aspects:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;goto&lt;/code&gt; statements. As more or less every source about &lt;code&gt;goto&lt;/code&gt; statements makes it clear that they should be avoided as much as possible, a student using them should have known that. That's worth a big malus.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;#region&lt;/code&gt; / &lt;code&gt;#endregion&lt;/code&gt; blocks. The intentions are good, to help some editors with structuring the code. But an internet search should have revealed that #region is not a standard C++ construct, making the code dependant on some specific compiler. I'd just comment on the problems, and not subtract any points.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2022-07-05T09:00:23.787" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7470" PostTypeId="1" AcceptedAnswerId="7471" CreationDate="2022-07-07T22:51:24.367" Score="3" ViewCount="1255" Body="&lt;p&gt;I am really interested in diving into leetcode. However, I want a solid foundation on data structures and algorithms being used to solve the problems in Leetcode. Please recommend to me some books/resources which would help me. Thanks&lt;/p&gt;&#xA;" OwnerUserId="12323" LastActivityDate="2022-07-25T18:59:48.383" Title="Which is the best book for algorithms before I dive into Leetcode?" Tags="|programming|algorithms|data-structure|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7471" PostTypeId="2" ParentId="7470" CreationDate="2022-07-11T11:21:56.623" Score="4" Body="&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/0262033844&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Cormen's,  Leiserson's, Rivest's and Stein's &lt;em&gt;Introduction to Algorithms and Data Structures&lt;/em&gt;&lt;/a&gt; is widely considered a most great book on the topic in question.&lt;/p&gt;&#xA;&lt;p&gt;Even when googling &lt;a href=&quot;https://www.google.com/search?q=best+algorithms+and+data+structures+book&amp;amp;sxsrf=ALiCzsZ5I-dytHJJnMHcmYHgrK4U1t-ANg%3A1657538086381&amp;amp;ei=JgbMYuTzFvHFrgTC_rC4DA&amp;amp;ved=0ahUKEwjkntzG2vD4AhXxoosKHUI_DMcQ4dUDCA4&amp;amp;uact=5&amp;amp;oq=best+algorithms+and+data+structures+book&amp;amp;gs_lcp=Cgdnd3Mtd2l6EAMyBQgAEIAEMgUIABCABDIGCAAQHhAWMgYIABAeEBYyBggAEB4QFjIGCAAQHhAWMgYIABAeEBY6BwgAEEcQsAM6BwgAELADEEM6CggAEOQCELADGAE6EgguEMcBENEDEMgDELADEEMYAjoMCC4QyAMQsAMQQxgCSgQIQRgASgQIRhgBUKYEWJ4GYI0HaAJwAXgAgAF1iAGrApIBAzIuMZgBAKABAcgBDsABAdoBBggBEAEYCdoBBggCEAEYCA&amp;amp;sclient=gws-wiz&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;best algorithms and data structures book&amp;quot;&lt;/a&gt;, &lt;a href=&quot;https://www.tableau.com/learn/articles/books-about-data-structures-algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;first&lt;/a&gt; &lt;a href=&quot;https://www.interviewbit.com/blog/data-structures-and-algorithms-books/&quot; rel=&quot;nofollow noreferrer&quot;&gt;few&lt;/a&gt; &lt;a href=&quot;https://www.guru99.com/data-structure-algorithms-books.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;links&lt;/a&gt; place it at the top of their lists. Some even mention that it's sometimes called &amp;quot;the bible of algorithms&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;That book covers not only the basics, but also topics above the &amp;quot;standard&amp;quot; level of Leetcode exercises. I highly recommend starting with it. After you finish it, I believe the best course of action is to reserach individual topics that cought your interest.&lt;/p&gt;&#xA;&lt;p&gt;There is one more thing I would like to touch on. A mistake some people make is trying to read those kind of books from cover to cover and only afterwards jump into coding. This approach is, most of the time, very inefficient. Once you learn an algorithm or a data structure, try using it, implementing it, and tweaking it. Experiment with the knowledge you are gathering on your way, rather than trying to isolate it.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastEditorUserId="11453" LastEditDate="2022-07-23T13:11:26.820" LastActivityDate="2022-07-23T13:11:26.820" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7474" PostTypeId="1" CreationDate="2022-07-26T06:16:51.853" Score="6" ViewCount="79" Body="&lt;p&gt;I advise several teams of undergraduate students in their final project. It is an annual softward-development project that they do during their 3rd year of studies. Most of them develop a web application in a topic they choose. The development proceeds in several phases. One of the final phases, after the application itself is mostly ready, is to give the application to end users (e.g. family and friends), watch them use the application, ask for their feedback, and prepare a report on issues such as: ease of use, enjoyment, user interface, unexpected errors, etc. This report is 10% of the final grade.&lt;/p&gt;&#xA;&lt;p&gt;Most teams do a pretty good job, but some teams submit a report with generic answers, and I have a gut feeling that they made it up  (or, at least, did not do much effort to elicit substantial feedback from the users). This is quite understandable, since they do not intend to bring this application to the market - they just want to get the grade and proceed with their other chores.&lt;/p&gt;&#xA;&lt;p&gt;My question: how can I incentivize students to take this exercise more seriously?&lt;/p&gt;&#xA;&lt;p&gt;One thing I considered is: after they submit the report, I can test the system by my own. For every bug that I find, deduct 10% of the grade for this phase. This will incentivize them to test the system thouroughly for bugs. But this does not handle other usability issues that are not proper bugs.&lt;/p&gt;&#xA;&lt;p&gt;What else can I do to incentivize students to test their system with end-users?&lt;/p&gt;&#xA;" OwnerUserId="1873" LastActivityDate="2022-07-27T12:08:34.763" Title="How can I incentivize students to test their applications with end users?" Tags="|project|grading|unit-testing|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7475" PostTypeId="2" ParentId="7474" CreationDate="2022-07-27T03:32:13.550" Score="3" Body="&lt;p&gt;You're at something of a dead end.  The problem is intrinsic to the assignment; they are aware that, once their project is done, very little is likely to come of it.  Thus, it isn't worth putting real, hefty effort into obtaining serious feedback -- to what practical end?&lt;/p&gt;&#xA;&lt;p&gt;You say that most students find the exercise worthwhile enough to engage in, but those who do not are not being irrational actors.&lt;/p&gt;&#xA;&lt;p&gt;You can try to incentivize this with grades, but I would suggest that all this would do is cause those who already are disinterested to take a bit more trouble to cover up their tracks.&lt;/p&gt;&#xA;&lt;p&gt;Again, if I were in your position, I wouldn't lean into the grade aspect.  That feels like force, and is fighting against what you want to achieve, which is intrinsic motivation.&lt;/p&gt;&#xA;&lt;p&gt;What you want, of course, is for them to see the value in it and take it seriously.  So what, then, is the value proposition for the students?  If I were in your position, I would begin there.&lt;/p&gt;&#xA;&lt;p&gt;Motivation starts from within, so if you want serious work on obtaining feedback, you need to explain why this part is important.  You can say that it is particularly important to &lt;em&gt;you&lt;/em&gt;, and that will move the needle somewhat (it really will!), but you must also undertake the comparatively harder effort of explaining what you hope the students will get out of this portion if they take it seriously, why you believe it will be valuable to them, and thus the approach that they should take.&lt;/p&gt;&#xA;&lt;p&gt;When the students see value in it, you will see the results.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-07-27T03:32:13.550" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7476" PostTypeId="2" ParentId="7474" CreationDate="2022-07-27T12:08:34.763" Score="6" Body="&lt;p&gt;Rather than just try to motivate them, you can change the structure of the assignment. Testing on family members and friends seems like it is the problem.&lt;/p&gt;&#xA;&lt;p&gt;Instead, break the assignment into two parts: building and testing. Teams build their own product and, at some point, are matched with another team who's assignment is to test the first team's work. Both parts are graded; the quality of the build and the quality of the test you provide for the other team you were matched with.&lt;/p&gt;&#xA;&lt;p&gt;So, team A's product is tested by team B. Team B's product is tested by team C (which might be A, or not). Team B gets a grade for its own product and on the quality of the feedback provided to A.&lt;/p&gt;&#xA;&lt;p&gt;You will have to explain some things about the testing part. The purpose is not to tear down the other team, but to provide them feedback on what needs fixing. This can also provide a way to encourage writing along with development, which is something many students need to practice.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-07-27T12:08:34.763" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7477" PostTypeId="2" ParentId="7318" CreationDate="2022-07-28T11:52:26.027" Score="0" Body="&lt;p&gt;Books completely cannot provide a glance/solid foundation, as it depends on how you are utilizing the acquired knowledge from books in practical.&lt;/p&gt;&#xA;&lt;p&gt;The book &amp;quot;&lt;strong&gt;&lt;a href=&quot;https://www.amazon.in/Python-Programming-Introduction-Computer-Science/dp/1887902996#customerReviews&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python Programming - An introduction to computer science&lt;/a&gt;&lt;/strong&gt;&amp;quot; - It offers you strong foundation on the subject and apt for reading by beginners with clear explanations.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.amazon.in/Java-Complete-Reference-Eleventh/dp/1260440230&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java - The Complete Reference by Herbert Schildt&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Instead of downloading source code, its better to type and run in the IDEs. Half-learning is dangerous even for beginners.&lt;/p&gt;&#xA;&lt;p&gt;The beginners of today will be the masters of tomorrow.&lt;/p&gt;&#xA;" OwnerDisplayName="anon" LastActivityDate="2022-07-28T11:52:26.027" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7478" PostTypeId="1" AcceptedAnswerId="7481" CreationDate="2022-07-30T17:55:05.297" Score="14" ViewCount="5274" Body="&lt;p&gt;I am an undergraduate computer science student. I have completed two out four years of my degree. I have not had an interaction with any Lisp family of languages. I have strong background in C, Java, x86 assembly and Javascript (at least that's what I think).&lt;/p&gt;&#xA;&lt;p&gt;I have read that Lisp can teach me some of the core computer science concepts. I am currently stuck in the choice between How to Design Programs (HTDP) and Structure and Interpretation of Computer Programs (SICP). I have read about 50-70 pages of HTDP and it feels quite beginner. So, I did some research on SICP and found SICP teaches Scheme. I have also read that Scheme is old and learning Racket would be a better choice. Which book should I choose?&lt;/p&gt;&#xA;&lt;p&gt;Note: I wish to pursue further education in Computer Science possibly in researching about Programming Languages.&lt;/p&gt;&#xA;" OwnerUserId="12383" LastEditorUserId="12383" LastEditDate="2022-07-31T08:02:01.420" LastActivityDate="2022-08-01T14:23:30.143" Title="Which book should I choose to get into the Lisp World?" Tags="|functional-programming|scheme|" AnswerCount="5" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7479" PostTypeId="2" ParentId="7478" CreationDate="2022-07-30T19:29:57.100" Score="6" Body="&lt;p&gt;The problem with learning any of the Lisp family of languages after learning several others is that Lisp and its progeny use a different paradigm. Changing paradigms implies changing the &lt;em&gt;way you think&lt;/em&gt;. It isn't about syntax, but about a mental model of the nature of computation.&lt;/p&gt;&#xA;&lt;p&gt;There is nothing naive about SICP, but you need to get beyond the first few pages. Once you have internalized the thought process, you can move to other functional languages, just as you can move from Java to Python, say.&lt;/p&gt;&#xA;&lt;p&gt;The big difference between pure functional languages and those you already know is the replacement of &amp;quot;state&amp;quot; represented by variables with &amp;quot;expressions&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Racket and Scheme share many things, including an abstract syntax. But the most important thing they share is the computing model; the paradigm and that will be the biggest hurddle.&lt;/p&gt;&#xA;&lt;p&gt;But, either of those books should be fine for a first look at FP. The authors are among the finest around and all have a very deep knowledge of their respective topics.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-07-30T19:29:57.100" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7480" PostTypeId="2" ParentId="7478" CreationDate="2022-07-31T15:12:06.617" Score="7" Body="&lt;p&gt;As someone points out in the comments, Racket is a Scheme implementation. But I wouldn't worry about which Lisp variant you learn at first, not even whether it's a Lisp-2 (Lisp) or Lisp-1 (Scheme); the things you need to learn initially will be taught pretty much as well in any variant.&lt;/p&gt;&#xA;&lt;p&gt;The book I recommend you start with is &lt;a href=&quot;https://felleisen.org/matthias/BTLS-index.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;The Little Schemer&lt;/em&gt;&lt;/a&gt; by Daniel Friedman.&lt;/p&gt;&#xA;&lt;p&gt;The first few chapters are essentially simple exercises that will introduce you to the basic idioms used by many functional programming languages that imperative programmers are generally not used to, including manipulation and use of singly-linked lists, iteration via recursion (rather than loops), functions as first-class objects, lambdas (anonymous functions), and so on. The book's question-and-answer format helps you &lt;em&gt;practice&lt;/em&gt; with these idioms; this is key because easy and fluent use of them is absolutely essential in most functional programming languages, even ones as different from Lisp as Haskell or ML.&lt;/p&gt;&#xA;&lt;p&gt;The later chapters of the book go deeper into what you might call the very heart of functional programming, covering both things less discussed, such as currying, and some fairly complex things, such as the applicative-order &lt;em&gt;Y&lt;/em&gt; combinator. The book ends with the following; if you have difficulty wrapping your mind around it, well, that's why you need to do the exercises in the book:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;(define Y&#xA;  (lambda (le)&#xA;    ((lambda (f) (f f))&#xA;     (lambda (f)&#xA;       (le (lambda (x) ((f f) x)))))))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;From the start you may find that short (less than 200 page) book looks overly simple; don't be fooled. Depending on your previous experience, some parts may indeed actually be simple for you, but if so, you'll get through them quickly and waste little time. But if there are any questions that you don't &lt;em&gt;fully&lt;/em&gt; understand, don't skip them; go back and contemplate them and do your own exercises based on them until you are confident you have mastered them.&lt;/p&gt;&#xA;&lt;p&gt;The book can easily be worked through with pen and paper, and that's the way I recommend you do it. However, if you feel you want to use an interpreter, almost any Lisp or Scheme interpreter will do, though you may have to look up a few details for your particular version of Lisp or Scheme that differ from the book. The book does have some footnotes giving Lisp equivalents of the Scheme functions/macros they use, where the Lisp functions/macros differ.&lt;/p&gt;&#xA;" OwnerUserId="3707" LastActivityDate="2022-07-31T15:12:06.617" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7481" PostTypeId="2" ParentId="7478" CreationDate="2022-07-31T15:49:12.897" Score="27" Body="&lt;p&gt;&lt;em&gt;How to Design Programs&lt;/em&gt; is a truly fantastic text. Should you choose to read it, I suspect you will be able to learn many useful things from it. However, I hesitate to recommend it as an answer to your question as-stated for two reasons:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;HtDP is ultimately a textbook, and it is not written to be read front to back. Rather, it is primarily intended to be used alongside a course taught by an instructor who knows how to use it most appropriately.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;More bluntly, HtDP is simply not a book about Lisp.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Yes, HtDP uses a programming language (or, more accurately, a family of programming languages) that happens to be a Lisp. But this is somewhat incidental, and the book can be adapted to other languages (and sometimes is in practice). Moreover, the language used by HtDP is &lt;strong&gt;not&lt;/strong&gt; Racket, nor is it even Scheme—instead, HtDP uses a family of languages specifically designed for teaching, which intentionally lack many of the features that are traditionally considered the qualities that make Lisps interesting.&lt;/p&gt;&#xA;&lt;p&gt;So what &lt;em&gt;is&lt;/em&gt; HtDP about? True to its name, it is a book about how to design programs. It is not about how to design &lt;em&gt;Lisp&lt;/em&gt; programs, and although it certainly does have a somewhat functional bent, its ideas are applicable to all programming languages. This is why it is often used as an introductory text. The Lisp is not the point, so if you want to learn about Lisp, HtDP is not going to leave you terribly satisfied.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Given the above, it may sound like I am strongly recommending that you read &lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt;, instead, and that is not entirely untrue. Unlike HtDP, SICP is &lt;em&gt;not&lt;/em&gt; an introductory text (as much as people sometimes seem to pretend otherwise), but it’s also not really about Lisp, either. Rather, SICP covers some of the foundational ideas in the field of programming languages, and it explores these via simple interpreters written in Scheme. Many of the ideas in SICP are definitely “Lispy” in some sense, and you say you’re interested in perhaps pursuing the field of programming languages, in which case I suspect you will find SICP quite edifying. On the other hand, I personally think many of its ideas are presented better elsewhere (though many would disagree, so YMMV).&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, the question comes down to what you &lt;em&gt;really&lt;/em&gt; want to learn about. Here are a few possibilities:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to learn about writing programs in Lisp or about functional programming more generally, I recommend reading &lt;a href=&quot;https://docs.racket-lang.org/guide/index.html&quot; rel=&quot;noreferrer&quot;&gt;The Racket Guide&lt;/a&gt;. The Racket Guide does not exactly present itself as a book, but it is structured like one, and it provides a very thorough introduction to programming in a full-featured Lisp that covers everything from the bare basics to compile-time metaprogramming to higher-order contracts. The Racket Guide is a wonderful resource that will give you everything you need to start writing real Lisp programs (and then some).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to explore the foundations of programming languages using a Lisp as a vehicle, then I recommend &lt;a href=&quot;http://cs.brown.edu/courses/cs173/2012/book/&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;Programming Languages: Application and Interpretation&lt;/em&gt;&lt;/a&gt; by Shriram Krishnamurthi. PLAI covers much of the same content as SICP, but it does so in a more precise and less handwavy way, and it also covers more topics, such as garbage collection.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you want to learn specifically how to &lt;em&gt;implement&lt;/em&gt; a simple Lisp, then I actually think it’s quite possibly more illustrative to do that in a language that &lt;em&gt;isn’t&lt;/em&gt; a Lisp. &lt;a href=&quot;https://wespiser.com/writings/wyas/00_overview.html&quot; rel=&quot;noreferrer&quot;&gt;Write You A Scheme&lt;/a&gt; uses Haskell as its implementation language of choice, which I think provides a particularly lucid grounding for the ideas it introduces.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ultimately, all of the things I’ve mentioned here—including both HtDP and SICP—are good reading, so I wouldn’t worry too much about which one you pick. It would certainly be counterproductive to feel overwhelmed by choice and not end up reading &lt;em&gt;any&lt;/em&gt; of them, so don’t get stuck in analysis paralysis. But personally, based on the contents of your question, I think The Racket Guide and PLAI would both be great choices to help you get started on your journey into Lisp and programming languages.&lt;/p&gt;&#xA;&lt;p&gt;(Disclaimer: I am a regular contributor to Racket and am currently employed working on GHC, the Haskell compiler. I like to think my suggestions are relatively unbiased in spite of my personal interests, but then, we all do. :))&lt;/p&gt;&#xA;" OwnerUserId="2915" LastEditorUserId="2915" LastEditDate="2022-07-31T15:54:32.807" LastActivityDate="2022-07-31T15:54:32.807" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7482" PostTypeId="2" ParentId="7478" CreationDate="2022-08-01T05:23:58.620" Score="4" Body="&lt;p&gt;The best book to get into Lisp is Peter Norvig's &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1558601910&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;PAIP&lt;/a&gt; - it showcases the core Lisp multi-paradigm approach and also some unique Lisp features that make it suitable for solving problems dealing with knowledge manipulation.&lt;/p&gt;&#xA;&lt;p&gt;The other great book for those who, like you, have significant conventional programming experience is Peter Seibel's &lt;a href=&quot;http://www.gigamonkeys.com/book/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Practical Common Lisp&lt;/a&gt; which introduces Lisp in the familiar context of those language's approaches.&lt;/p&gt;&#xA;&lt;p&gt;Finally, for those who have very little programming experience or for kids, Conrad Barski's &lt;a href=&quot;http://landoflisp.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Land of Lisp&lt;/a&gt; may be a good accessible and light-hearted introductory book.&lt;/p&gt;&#xA;" OwnerUserId="12401" LastActivityDate="2022-08-01T05:23:58.620" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7483" PostTypeId="1" CreationDate="2022-08-01T05:37:29.413" Score="0" ViewCount="205" Body="&lt;p&gt;I am a professional programmer and when I came across David Gries' book(rather expensive) and his &lt;a href=&quot;https://www.cs.cornell.edu/gries/Logic/intro.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;website&lt;/a&gt; I was fascinated. This wasn't how I learnt to code(mainly Java but also basic Haskell and Ocaml ). But I couldn't understand how this mode of logic or math can be applied to application code.&#xA;So I seek some guidance from those who really code like this. Can one read this rigorous book and learn to code ( mainly functional programming languages ) ? Is this logic and math directly applicable to code ?&lt;/p&gt;&#xA;" OwnerUserId="12400" LastActivityDate="2023-11-07T10:18:30.987" Title="How do I apply 'A Logical Approach to Discrete Math' to programming?" Tags="|boolean-algebra|discrete-math|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7484" PostTypeId="2" ParentId="7478" CreationDate="2022-08-01T14:23:30.143" Score="1" Body="&lt;p&gt;Frame challenge, don't &lt;em&gt;start&lt;/em&gt; with a book. Start with Problem 1 on &lt;a href=&quot;https://projecteuler.net/archives&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler&lt;/a&gt; (spoiler, Problem 1 is just Fizz Buzz) and Google/Stack Overflow/language documentation and just write some code. Your first code will be terrible Lisp since your brain will still want to work procedurally and that's OK, imo actually experiencing this is the best way to really &lt;em&gt;know&lt;/em&gt; how Lisp is different from procedural code.&lt;/p&gt;&#xA;&lt;p&gt;I think Project Euler is particularly good for this because a) a lot of the questions have very elegant recursive solutions so the reward for writing idiomatic Lisp is high, and b) there are usually several Lisp solutions posted in the forums for easy problems so you can see how other people solved the same problem. (Plus you get a bonus of seeing how people solved it in other languages.)&lt;/p&gt;&#xA;&lt;p&gt;Then you can go read a book and build an academic understanding on top of your intuitive understanding.&lt;/p&gt;&#xA;" OwnerUserId="1407" LastActivityDate="2022-08-01T14:23:30.143" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7485" PostTypeId="1" CreationDate="2022-08-02T21:42:45.687" Score="4" ViewCount="65" Body="&lt;p&gt;An early step of building students' QIS knowledge is understanding superposition in a 2-state system. What are effective metaphors and actual systems for teaching the concept of uperposition, that a thing is actually in both states?&lt;/p&gt;&#xA;" OwnerUserId="765" LastActivityDate="2022-08-04T04:11:57.457" Title="To introduce quantum computing, what metaphors/actual examples of 2-state systems work for teaching, and what misconceptions might they introduce?" Tags="|quantum-computing|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7486" PostTypeId="2" ParentId="7485" CreationDate="2022-08-04T01:41:39.050" Score="1" Body="&lt;p&gt;I don't know of anything that quite mimics it in regular life, though you could go through a sort of imagined construction that mimics the idea fairly well:&lt;/p&gt;&#xA;&lt;p&gt;There is a beach ball, and it is formed by a circular bit at one end, and the strips of plastic, like so:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/75c3A.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/75c3A.png&quot; alt=&quot;Beach Ball from https://www.senteqdirect.co.uk/wp-content/uploads/2019/04/GiantBB.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let's imagine that the circle on the other side is black, so we have a white circle and a black circle on opposite ends, and delightful, rainbow strips of plastic for the rest of the ball.&lt;/p&gt;&#xA;&lt;p&gt;I'll put a strong magnet on the white circle, and on the black circle on the other side.  Now they're magnetized!  But we've faced the magnets in opposite directions, so that either side of the ball will be attracted or repelled the same way by any magnet we hold nearby.&lt;/p&gt;&#xA;&lt;p&gt;I want to know whether the white circle is facing north or south.  And this is one of the key ideas: those are the only two possible answers!  North, or south.&lt;/p&gt;&#xA;&lt;p&gt;If I put it like so, then it will be facing north.  If I turn it around, the white circle is now facing south.&lt;/p&gt;&#xA;&lt;p&gt;Now I spin it haphazardly, and it winds up facing mostly towards the floor and a bit that way, we can again the question: is it facing north or south?  But now it's more complicated, of course.&lt;/p&gt;&#xA;&lt;p&gt;You might first object, and say it is not facing north or south at all. We even just &lt;em&gt;said&lt;/em&gt; that it is facing towards the floor and a bit that way.  But I will point out that we stipulated that there are only two possible answers.  There is only North, and there is only South.  So, is it facing north?  Or south?&lt;/p&gt;&#xA;&lt;p&gt;The answer is... sort of north... and sort of south... and, we call this superposition.  In a world in which everything must be characterized purely by north and by south, it is some of both.  That's what superposition means.  It means it's facing a different way entirely.&lt;/p&gt;&#xA;&lt;p&gt;When we do this with real quantum states, we can't see the balls with our eyes.  Instead, we must make a measurement.  For that, we have to go back to those two magnets we placed onto the black and white circles.&lt;/p&gt;&#xA;&lt;p&gt;What we can do is essentially place a stick with a powerful magnet on the end in the direction we want to measure.  The magnet is powerful enough that the ball will definitely rotate to meet the stick.&lt;/p&gt;&#xA;&lt;p&gt;Once it's on the stick, I can look at the end and see if I have captured the black end or the white end, and now I know whether it's facing north or south.&lt;/p&gt;&#xA;&lt;p&gt;If the ball is rotated 90% before we start, there's no way to know what answer I'll get out.  In fact, assuming my ball is really good, there's essentially a 50/50 shot that I will find the white circle facing north or south.  There's no way to know which way it will turn.  That's a perfect superposition.&lt;/p&gt;&#xA;&lt;p&gt;So a few takeaways: if I can only read the state with a magnetic stick like this, is there any way to read the state of the qbit without also modifying the state?&lt;/p&gt;&#xA;&lt;p&gt;No?  Well, there &lt;em&gt;is&lt;/em&gt; a way, actually.  The only way is if it already happens to be facing due north or due south.  Otherwise, my reading the qbit will force it to conform to the reading stick.  In other words, figuring out which way the ball is facing will also change which way the ball is facing.  It will face it either exactly towards, or exactly away from, the magnet I'm using to read its position.&lt;/p&gt;&#xA;&lt;p&gt;Second, is there any way to tell, just by placing our magnet stick, where the ball was actually facing before we started to measure?  What do you think?&lt;/p&gt;&#xA;&lt;p&gt;The answer is no.  We have to choose an orientation, and then make our &amp;quot;read&amp;quot; along that orientation.  What we get out of that read is probabilistic.  We hope that whatever program we ran on this qbit faced the qbit sufficiently north or south that we can rely on our reading, but in truth we probably have to run our program a bunch of times before we can get a firm sense about the result with any confidence.&lt;/p&gt;&#xA;&lt;p&gt;Thirdly, and finally, there's actually a key difference between a qbit in superposition and this beach ball: we said that if the superposition is 90 degrees off, there's a 50/50 shot that the ball will read as north or south.  That remains true for qbits as well.&lt;/p&gt;&#xA;&lt;p&gt;But if you only rotate 15 degrees from north, this life-sized beach ball will always read as north, because that is the closest magnet.  But this part is a bit different for real qbits.  Our qbit will only read as north 85% of the time, and the other 15% it will read as south.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-08-04T04:11:57.457" LastActivityDate="2022-08-04T04:11:57.457" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7487" PostTypeId="1" CreationDate="2022-08-05T14:57:23.740" Score="2" ViewCount="108" Body="&lt;p&gt;It seems that the most popular source on the internet on this topic is &lt;a href=&quot;https://www.bigocheatsheet.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.bigocheatsheet.com/&lt;/a&gt;:&#xA;&lt;a href=&quot;https://i.stack.imgur.com/nef2h.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nef2h.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Best,_worst_and_average_case#Sorting_algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wikipedia&lt;/a&gt; and basically any other similar table I find on the internet copy this one.&lt;/p&gt;&#xA;&lt;p&gt;There are some things that without a brief explanation are very difficult for me to understand or are a bit confusing. For example, as a user &lt;a href=&quot;https://cs.stackexchange.com/questions/82669/why-is-big-o-not-defined-here-for-a-hash-table&quot;&gt;mentions here&lt;/a&gt;, comparing the access time of BST vs array can be &amp;quot;unfair... since in a BST, 'Access' also gives you the i-th smallest element, whereas in a simple array you get only some element&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;I wonder if anyone knows of a good source that concisely explains the differences in complexity of those operations for those structures, without me having to read 14 lengthy wikipedia articles.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, there is the problem that now I don't trust that sources either, since with my little knowledge on the subject I have found an error. I mean, &lt;a href=&quot;https://stackoverflow.com/questions/56206535/what-is-the-time-complexity-for-deletion-in-singly-and-doubly-linked-lists&quot;&gt;Insertion and deletion in Singly-Linked List is not O(1) but O(n)&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I would appreciate if someone can give me a hand.&lt;/p&gt;&#xA;" OwnerUserId="12430" LastEditorUserId="27" LastEditDate="2022-08-05T18:21:32.107" LastActivityDate="2022-08-05T19:21:39.537" Title="Does anyone know of any reliable summary of the complexity of common data structure operations?" Tags="|resource-request|algorithms|data-structure|complexity-theory|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7488" PostTypeId="2" ParentId="7487" CreationDate="2022-08-05T19:02:08.900" Score="1" Body="&lt;p&gt;I worry that you are asking for learning and insight without putting in the work that it requires. Having a &amp;quot;quick hit&amp;quot; explanation of some phenomenon doesn't mean that you actually understand it. Whatever is wrong with reading fourteen wikipedia pages? What is wrong with finding a good book on algorithms and data structures and doing a lot of the exercises in it? That is how learning is attained.&lt;/p&gt;&#xA;&lt;p&gt;Shallow knowledge won't take you very far.&lt;/p&gt;&#xA;&lt;p&gt;There is a book I like a lot, though it is old and now (sometimes) expensive unless you can find a used copy (or a library copy). &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/038790641X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Science of Programming: David Gries&lt;/a&gt;. David was once a mentor of mine and I learned a huge amount from his work. It is actually a book about programming, as the name implies, but it has a lot to say about data structures and efficiency of algorithms.&lt;/p&gt;&#xA;&lt;p&gt;The big idea in the book is programming with pre and post-conditions and program invariants. Big, big idea.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-05T19:21:39.537" LastActivityDate="2022-08-05T19:21:39.537" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7490" PostTypeId="5" CreationDate="2022-08-08T14:51:27.303" Score="0" Body="&lt;p&gt;Some educational systems are designed so that students don't meet in a classroom but take instruction remotely. Open University UK is such a place.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:51:27.303" LastActivityDate="2022-08-08T14:51:27.303" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7491" PostTypeId="4" CreationDate="2022-08-08T14:51:27.303" Score="0" Body="For questions about educational systems and programs where the students are at a distance from their instructors. Students might never come in direct contact with instructors, or such contact might occur infrequently. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:51:27.303" LastActivityDate="2022-08-08T14:51:27.303" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7492" PostTypeId="5" CreationDate="2022-08-08T14:55:50.393" Score="0" Body="&lt;p&gt;Some coursework, whether for credit or not, can occur in an exclusively online context.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:55:50.393" LastActivityDate="2022-08-08T14:55:50.393" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7493" PostTypeId="4" CreationDate="2022-08-08T14:55:50.393" Score="0" Body="For questions about teaching and learning that occurs exclusively online. This is distinct from [tag:distance-learning] which might have online components or not. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:55:50.393" LastActivityDate="2022-08-08T14:55:50.393" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7494" PostTypeId="5" CreationDate="2022-08-08T14:59:10.997" Score="0" Body="&lt;p&gt;Curriculum questions concern the collection of courses to be included in some specific educational program.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:59:10.997" LastActivityDate="2022-08-08T14:59:10.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7495" PostTypeId="4" CreationDate="2022-08-08T14:59:10.997" Score="0" Body="For questions specifically related to overall curriculum design. This is distinct from course design, which is more limited. Questions about which courses are appropriate to include in an educational program. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-08T14:59:10.997" LastActivityDate="2022-08-08T14:59:10.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7496" PostTypeId="5" CreationDate="2022-08-09T15:47:09.273" Score="0" Body="&lt;p&gt;Polymorphism permits the substitution of a value of one type for that of another related type. The relation is normally a common ancestor type (class). Polymorphism permits a program to change its behavior dynamically.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:47:09.273" LastActivityDate="2022-08-09T15:47:09.273" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7497" PostTypeId="4" CreationDate="2022-08-09T15:47:09.273" Score="0" Body="For questions related to dynamic polymorphism as exhibited in object-oriented programming languages." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:47:09.273" LastActivityDate="2022-08-09T15:47:09.273" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7498" PostTypeId="5" CreationDate="2022-08-09T15:50:31.710" Score="0" Body="&lt;p&gt;Kotlin is a modern programming language. See &lt;a href=&quot;https://kotlinlang.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;kotlinlang.org&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:50:31.710" LastActivityDate="2022-08-09T15:50:31.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7499" PostTypeId="4" CreationDate="2022-08-09T15:50:31.710" Score="0" Body="For questions specific to the Kotlin programming language. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:50:31.710" LastActivityDate="2022-08-09T15:50:31.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7500" PostTypeId="5" CreationDate="2022-08-09T15:52:39.973" Score="0" Body="&lt;p&gt;Objects First courses typically teach objects and reference variables very early. Perhaps before introducing built-in primitive data types.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:52:39.973" LastActivityDate="2022-08-09T15:52:39.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7501" PostTypeId="4" CreationDate="2022-08-09T15:52:39.973" Score="0" Body="For questions related to organizing early programming language courses by using objects (and usually classes) from the very beginning. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:52:39.973" LastActivityDate="2022-08-09T15:52:39.973" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7502" PostTypeId="5" CreationDate="2022-08-09T15:55:55.033" Score="0" Body="&lt;p&gt;Information Theory is commonly attributed to Claude Shannon and, among many other things explains things like why computers use binary logic and the limits of data translation.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:55:55.033" LastActivityDate="2022-08-09T15:55:55.033" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7503" PostTypeId="4" CreationDate="2022-08-09T15:55:55.033" Score="0" Body="For questions specifically about Information Theory. Information theory is the scientific study of the quantification, storage, and communication of digital information (Wikipedia)." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T15:55:55.033" LastActivityDate="2022-08-09T15:55:55.033" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7504" PostTypeId="5" CreationDate="2022-08-09T22:05:14.250" Score="0" Body="&lt;p&gt;High school (Secondary Education) students learning Computer Science can be at any level. The level will vary with the school. Typically high school is when students are first introduced to Computer Science.&lt;/p&gt;&#xA;&lt;p&gt;The tag is especially relevant for questions relating to subject matter taught in High School as well as for appropriate methodologies for the associated age group.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T22:05:14.250" LastActivityDate="2022-08-09T22:05:14.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7505" PostTypeId="4" CreationDate="2022-08-09T22:05:14.250" Score="0" Body="Questions about CS teaching secondary education (high school) level students. This should be used when the context or level of the answer or question is that of high school students. In many cases, an AP tag is more appropriate because AP classes are typically taught in high school." OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-09T22:14:54.483" LastActivityDate="2022-08-09T22:14:54.483" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7506" PostTypeId="1" CreationDate="2022-08-10T14:03:06.217" Score="1" ViewCount="236" Body="&lt;h2&gt;Why This Question&lt;/h2&gt;&#xA;&lt;p&gt;Hi i am Computer Science student. As a computer science student I want to know the definition of computer science .&#xA;yes !! i know some definition but these are not satisfactory , you guys have a question why   these definition are not  satisfactory   because there are some which not have clear meaning and not understandable . There are few examples :&lt;/p&gt;&#xA;&lt;h2&gt;1. Wikipedia :##&lt;/h2&gt;&#xA;&lt;p&gt;Computer science is the study of computation, automation, and information.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This Wikipedia  definition is not clear meaning like there is keyword use &amp;quot;information &amp;quot;. I don't understand why CS is study of information ??&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2&gt;2.UNIVERSITY OF MARYLAND&lt;/h2&gt;&#xA;&lt;p&gt;Computer Science is the study of computers and computational systems. Unlike electrical and computer engineers, computer scientists deal mostly with software and software systems; this includes their theory, design, development, and application.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;This definition sounds like Computer definition .&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2&gt;3. Some Random Top Web  :&lt;/h2&gt;&#xA;&lt;p&gt;Computer Science is study of computer and  computation as well as  theoretical and  practical  application of computer .&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In this definition  there is some thing which is don't think any sense &amp;quot;cs is study of practical  application of computer &amp;quot; so i think 100k +   applicating of computer are there and these are computer science ... no sense&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;What I Need&lt;/h1&gt;&#xA;&lt;p&gt;I need just a Computer science definition . Which have and make sense and also have clear meaning&lt;/p&gt;&#xA;" OwnerUserId="11579" LastActivityDate="2022-09-12T12:55:34.310" Title="What is standard definition of Computer Science" Tags="|self-learning|secondary-education|active-learning|cs-theory|" AnswerCount="2" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7507" PostTypeId="2" ParentId="7506" CreationDate="2022-08-10T14:27:04.690" Score="3" Body="&lt;p&gt;What you seek doesn't really exist.  &amp;quot;Computer Science&amp;quot; is an umbrella term that was coined in 1956.  According to the Wikipedia article, there were a bunch of terms that were proposed for the field:&lt;/p&gt;&#xA;&lt;p&gt;Turingineer, turologist, flow-charts-man, applied meta-mathematician, applied epistemologist, computing science, datalogy, computics, and information and mathematics.&lt;/p&gt;&#xA;&lt;p&gt;Note that &amp;quot;information&amp;quot; is still in there -- information theory is one of the foundational mathematical fields of computer science.  Without it, computers probably wouldn't exist.&lt;/p&gt;&#xA;&lt;p&gt;So, the reason it's an umbrella term is based on where it came from.  What we call computer science was birthed out of various, closely related fields of mathematics.  (I'd suggest that computational theory, set theory/boolean algebra, category theory, and information theory are the biggest four, but there were many more, and others may make a case that some of the other fields were also totally central.)&lt;/p&gt;&#xA;&lt;p&gt;Early computer science departments were traditionally smaller departments within mathematics departments.&lt;/p&gt;&#xA;&lt;p&gt;Over time, however, programming, software engineering, programming, artificial intelligence, information systems, information technology, machine learning, networking, cryptography, etc, etc, etc, etc, etc, etc have all become prominent fields in their own right, and by historical accident have all remained under the umbrella term of computer science.&lt;/p&gt;&#xA;&lt;p&gt;Some people feel very strongly that the mathematical stuff should no longer be included in the term, and some people feel equally strongly that the newer, more practical stuff should instead be excluded.  Where we are now is essentially a confusing mish-mosh wherein anything that is either related to computers or related to the math around computers can reasonably claim to be under the big computer science umbrella.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-08-10T14:27:04.690" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7508" PostTypeId="5" CreationDate="2022-08-10T15:44:01.767" Score="0" Body="" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-10T15:44:01.767" LastActivityDate="2022-08-10T15:44:01.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7509" PostTypeId="4" CreationDate="2022-08-10T15:44:01.767" Score="0" Body="For questions concerning publishing opportunities for students in computing programs. " OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-08-10T15:44:01.767" LastActivityDate="2022-08-10T15:44:01.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7511" PostTypeId="2" ParentId="2612" CreationDate="2022-08-11T20:42:16.623" Score="2" Body="&lt;p&gt;One activity we did at a training was to come up with an algorithm for passing in papers.  Give students a paper with questions about themselves and when it comes time to pass them in tell them you want the papers passed in in such a way that the papers are upside down (to protect privacy) and in a stack on one desk in such a way that when you flip over the final stack they are in the same order as the way the students are currently sitting.  Let the students make suggestions on how this can be accomplished.&lt;/p&gt;&#xA;" OwnerUserId="12448" LastActivityDate="2022-08-11T20:42:16.623" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7512" PostTypeId="1" AcceptedAnswerId="7513" CreationDate="2022-08-12T06:58:34.210" Score="1" ViewCount="149" Body="&lt;p&gt;I am an undergraduate CS student half way through my degree. I have started taking an online(Youtube) course on Programming Languages. The course contents include the following topics:&lt;/p&gt;&#xA;&lt;p&gt;First-class functions, Pattern Matching, Type Inference, Type classes, Monads, Continuations, Objects &amp;amp; Inheritance, Modules, Generics, Memory Management, Concurrency.&#xA;The course is primarily using Haskell and JavaScript to teach these concepts.&lt;/p&gt;&#xA;&lt;p&gt;Now, I am not entirely sure whether a course on Compiler Construction is a prerequisite to this course or not. What other courses should be a prerequisite to this course?&lt;/p&gt;&#xA;&lt;p&gt;Note: I have not had a course on Compiler Construction (CC) yet (I am currently in 5th semester of my degree and CC course is offered in the 7th), although I have a little bit of experience of programming in functional languages.&lt;/p&gt;&#xA;" OwnerUserId="12383" LastActivityDate="2022-08-31T21:57:35.583" Title="Should an undergraduate course on Programming Languages precede or succeed the course on Compiler Construction?" Tags="|functional-programming|compiling|language-types|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7513" PostTypeId="2" ParentId="7512" CreationDate="2022-08-12T11:32:09.583" Score="4" Body="&lt;p&gt;Typically a CS curriculum will have Programming Languages (or Programming Language Principles) either prior to Compiler Construction or concurrent with it. The course you describe is more like a &amp;quot;Principles&amp;quot; course.&lt;/p&gt;&#xA;&lt;p&gt;Having the compiler course after the principles course has the advantage that it is reasonable to make the source language in the compiler course more &amp;quot;interesting&amp;quot;. Normally a compiler is built for a single language so it is a bit more specific than the &amp;quot;languages&amp;quot; or &amp;quot;principles&amp;quot; course.&lt;/p&gt;&#xA;&lt;p&gt;It is possible to do the compiler course first, but it would probably need to use a simpler &amp;quot;source&amp;quot; language than if the students had more breadth of experience.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2022-08-12T11:32:09.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7514" PostTypeId="1" CreationDate="2022-08-21T23:17:16.567" Score="2" ViewCount="139" Body="&lt;p&gt;I will be teaching 2 AP CS courses, along with 6th and 7th grade intro to computer science. I'm debating on whether teaching JavaScript (using CodeHS) to 7th graders would be an appropriate introduction or focus on the basics such as HTML/CSS. I worry that CodeHS would be too advanced(?)&lt;/p&gt;&#xA;&lt;p&gt;For the 6th graders I plan to use Scratch as an introduction to programming. Does this sequence make sense?&lt;/p&gt;&#xA;" OwnerDisplayName="user12474" LastEditorUserId="27" LastEditDate="2022-08-24T20:25:59.470" LastActivityDate="2022-08-26T20:55:54.293" Title="First Time teaching 6th &amp; 7th grade computer science" Tags="|curriculum-design|programming|secondary-education|scratch|scope|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7515" PostTypeId="2" ParentId="7347" CreationDate="2022-08-22T06:52:18.267" Score="2" Body="&lt;p&gt;I used to teach some search and sorting algorithms but now my favorite teaching example is &lt;a href=&quot;https://en.wikipedia.org/wiki/Euclidean_algorithm&quot; rel=&quot;nofollow noreferrer&quot;&gt;Euclidean algorithm&lt;/a&gt; (GCD), for couple of reasons,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;It was probably the oldest algorithm. I can also talk about some history, one of my favorite subjects, but more importantly makes kids engaged.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Let them prove it themselves. It is quite easy and again makes them engaged.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Help them review/refresh recursion.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The most important reason I used it now is that the most popular video stream website in China, called &lt;a href=&quot;https://www.bilibili.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;bilibili&lt;/a&gt; (you can see it as the top TikTok competitor in China for young generation) crashed for almost 10 hours in 2021.07.13 for exactly a hidden bug in its implementation for GCD, written lua, &lt;a href=&quot;https://mp.weixin.qq.com/s/nGtC5lBX_Iaj57HIdXq3Qg&quot; rel=&quot;nofollow noreferrer&quot;&gt;check here for detailed&lt;/a&gt;, but it is in Chinese. So I will briefly explain here: they developed this innocent lua script for GCD for their &lt;a href=&quot;https://openresty.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OpenResty&lt;/a&gt; web server. In 2021.07.13 under an extremely rare condition, the b parameter it got was '0' instead of 0, so the lua script  became an infinite loop and drain the whole computer cluster to death.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This real life example makes the whole discussion &amp;quot;interactive&amp;quot;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/RiiMR.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/RiiMR.png&quot; alt=&quot;GCD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;Recently I teach the binary search and re-read this old article again &amp;quot;&lt;a href=&quot;https://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken&lt;/a&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I remember vividly Jon Bentley's first Algorithms lecture at CMU,&#xA;where he asked all of us incoming Ph.D. students to write a binary&#xA;search, and then dissected one of our implementations in front of the&#xA;class. Of course it was broken, as were most of our implementations.&#xA;This made a real impression on me ...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So maybe like what he described there, ask your students to implement a binary search in class. I don't do that because my students are highschoolers but for college students I feel it is appropriate.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-02-02T09:25:20.623" LastActivityDate="2023-02-02T09:25:20.623" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7517" PostTypeId="2" ParentId="2612" CreationDate="2022-08-22T18:49:14.097" Score="2" Body="&lt;p&gt;I am a new CS teacher that utilized some of the suggestions I found here and elsewhere. While my target group is younger than your's (5-7 grade), the following were used and worked anywhere from great to phenomenal.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Sort Yourselves&amp;quot; were a series of challenges including the sort alphabetically as was mentioned by another in this post. From there I had them sort themselves in a line based on birth month and then group themselves based on favorite color. These last two I had them do without verbally communicating which added a degree of difficulty requiring them to find creative ways to communicate what they needed to.&lt;/p&gt;&#xA;&lt;p&gt;Another amazing activity, though it can get out of hand depending on the excitability level of your class, is &amp;quot;My Teacher is a Robot&amp;quot;. This again is utilized from someone else's suggestion, where you as the teacher act like a robot while the students must give you commands to complete a simple task, such as go and open the classroom door. I had them work as tables and anytime the &amp;quot;stop&amp;quot; command was given, the next table got to have a turn commanding the robot. It was great fun as they found out that giving a robot a simple &amp;quot;walk forward&amp;quot; command can lead to your robot running into walls and knocking over empty chairs while a simple &amp;quot;turn&amp;quot; command can leave the robot spinning in place. Overall, 10/10 great activity to introduce students to coding concepts.&lt;/p&gt;&#xA;&lt;p&gt;The last activity that I came up with was a game of sharks and minnows. We had just finished a lesson on cyber security and played the game from the perspective of a anti-virus developer, where the shark is the starting anti-virus and the minnows are the viruses. As viruses get caught by the anti-virus, the developer sees the hole were the virus was trying to get through and plugging that hole (where the minnows must stop where they were tagged and in subsequent rounds must try to tag other minnows trying to get by without moving from their spot). Really demonstrates how different viruses may act differently and how as more holes are filled, it becomes harder and harder for viruses to make it through to the computer.&lt;/p&gt;&#xA;" OwnerUserId="12479" LastActivityDate="2022-08-22T18:49:14.097" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7518" PostTypeId="2" ParentId="7514" CreationDate="2022-08-24T20:35:41.813" Score="2" Body="&lt;p&gt;I have a few thoughts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Scratch is wonderful, and very appropriate to that age group.  TinkerCAD is another great alternative.&lt;/li&gt;&#xA;&lt;li&gt;HTML/CSS is fine as an entree into JavaScript for front end web development, but is not, itself, programming.  The &amp;quot;ML&amp;quot; in HTML stands for &amp;quot;Markup Language&amp;quot;, and is essentially text formatting, like a word processor.  You can center, bold, change font sizes, insert images, etcetera, etcetera.  I am being a bit reductionist here, but I would not consider HTML/CSS to be either sufficient or even especially helpful in preparing students for the APs.  For that, they need some programming.&lt;/li&gt;&#xA;&lt;li&gt;I seem to recall that there is a visual scripting language that translates to python in real time, and you can view them side by side.  (I don't recall who has this.  Perhaps it is codingrooms?  I will try to figure it out and edit this answer.)  In any case, that could be a good way to bridge the gap between your 6th and 7th grade curriculums. Start your students on the visual side, and then have them slowly transition over to the text side. Eventually, put them in an environment in which there is no visual side.&lt;/li&gt;&#xA;&lt;li&gt;CodeHS is &lt;em&gt;fantastic&lt;/em&gt;, and will work well for you.  They have lots of stuff there, and there is certainly material that is appropriately leveled for 7th graders who have already had Scratch experience.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastActivityDate="2022-08-24T20:35:41.813" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7519" PostTypeId="2" ParentId="7514" CreationDate="2022-08-26T20:55:54.293" Score="4" Body="&lt;p&gt;Concur with @Ben about HTML5 (see disclaimer, below).&lt;/p&gt;&#xA;&lt;p&gt;Recommend investigating the &lt;a href=&quot;https://www.csfieldguide.org.nz/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Computer Science Field Guide&lt;/a&gt; (don't be distracted by the TLD, the Curriculum Guides include AP-CSP. (and New Zealand is more advanced in this field than many?most other countries!) The activities are a mix of 'play' and serious (thinking) challenge.&lt;/p&gt;&#xA;&lt;p&gt;Just as HTML's declarative approach is not an ideal preparation for procedural languages, many are also concerned that 'going straight to the computer' is an invitation to 'consumer-mode' thinking - for what do most &lt;em&gt;prefer&lt;/em&gt; to use their tablets/portables? Whereas &amp;quot;computational thinking&amp;quot; is the desired outcome. Accordingly, please review the &lt;a href=&quot;https://www.csunplugged.org/en/&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged series&lt;/a&gt;, which invites the discovery of many CS concepts 'in real life', before implementing solutions in Scratch or Python. (I regularly take-on adults who say &amp;quot;I couldn't do computing&amp;quot; or &amp;quot;I'm hopeless at all that math-stuff&amp;quot; with CS Unplugged's exercise in finding the highest number from a list, using values 'hidden' inside take-out cups - and before you/they know it, describing their thought-pattern reveals an algorithm!). Thus, design-first, develop tests/a proof, and then implement on-computer! NB much of that material seems aimed at younger students, but will depend upon their previous experience.&lt;/p&gt;&#xA;&lt;p&gt;For yourself, and in the same pattern, please review &lt;a href=&quot;https://www.edx.org/course/teaching-computational-thinking&quot; rel=&quot;nofollow noreferrer&quot;&gt;Teaching Computational Thinking&lt;/a&gt;. NB the course as-described seems longer/more-involved than it needs to be, depending upon your own background and judicious choice of topics to suit your target age-group.&lt;/p&gt;&#xA;&lt;p&gt;Regards =dn (Disclaimer: I use the edX platform for HTML5 training (adult/vocational))&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2022-08-26T20:55:54.293" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7523" PostTypeId="2" ParentId="7512" CreationDate="2022-08-31T21:57:35.583" Score="3" Body="&lt;p&gt;I teach a Programming Language Principles before a Compiler course. I do have to talk a little about compilers, about 1 hour, just to discuss the compiled/interpreted distinction.&lt;/p&gt;&#xA;&lt;p&gt;It is useful to teach this course after a Data Structure course (taught in C) so one can discuss complexity of some recursive code (naive reversing a list for example if the list is a linked list...) and give some intuition to the students on how some data types are implemented.&lt;/p&gt;&#xA;" OwnerUserId="9463" LastActivityDate="2022-08-31T21:57:35.583" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7524" PostTypeId="1" CreationDate="2022-09-04T12:22:13.943" Score="2" ViewCount="94" Body="&lt;p&gt;rI am a teacher in germany (high school) and I am searching for algorithms, that solve interesting problems using no data structure or linear data structures only. The goal is to motivate the students and to show them use cases which are not artificial. The algorithm need to be easy to understand and should be explainable/programmable in one (or two) lessons.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What should be exluded&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Algorithms that sort/search, because this is educated seperately.&lt;/li&gt;&#xA;&lt;li&gt;Algorithms using a tree or graph data structure, because these data structures are only for advanced courses.&lt;/li&gt;&#xA;&lt;li&gt;Algorithms that need more than one (or two) hours to teach.&lt;/li&gt;&#xA;&lt;li&gt;Algorithms which are &amp;quot;classic&amp;quot;. Meaning I am searching for not so well known algorithms.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;What I have so far&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The following german page &lt;a href=&quot;https://algo.rwth-aachen.de/%7Ealgorithmus/liste.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithm of the week&lt;/a&gt; has some very interesting algorithms. I like especially:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Algorithm 6: Pledge-Algorithm for finding the exit of a Labyrinth. Perhaps this is too complicated. The movement of the &amp;quot;roboter&amp;quot; is easy, but one has to prepare the labyrinth software and the students program only a part of the software. Therefore the students need to get along in an already programmed code, which might be too difficult.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Algorithm 13: Explaines the computation of the ISBN of books (error detection code). This algorithm does not need any data structure.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Algorithm 33: Detects in an election, if some person has over 50 % of the votes using a stack only. The algorithm is quite clever and does not count the votes for each person.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Algorithm 36: Schedules a tournament of n teams (n even) where each team has to play against all other teams. The algorithm does this in the minimal amount of rounds (n-1) and in each round there are n:2 parallel games. This can be implemented with a queue or a list.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I also like Algorithm 41 (simulated annealing) but this may be too difficult, it depends on the problem. I don't like the use case &amp;quot;traveling salesman&amp;quot; this is too artificial, because the distances between points are &amp;quot;flying distances&amp;quot;. If one takes real places - e.g. from the area the stundents know - on a map, then it gets to complicated, because only strees can be used.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I also like Algorithm 42 (smallest circle containing a set of points), it is randomized and very clever, but the implementation would be far too difficult.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The following book was suggested: &lt;a href=&quot;https://algs4.cs.princeton.edu/home/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms 4ed by Sedgewick and Wayne &lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I try to explain, why this is not exactly what a I am searching.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter I: Everything is abstract here, there is no context. The data structures are there but they are not used to solve anything. I really like the 3-Sum problem, for teaching nested loops. But also, here is missing the context. What is beeing solved with 3-sum? Out of my head would be the smallest circle of a set of points. But this is still no context. The context would be &amp;quot;there are houses on a plane and the people are arguing, where the new hospital/fire station should be build&amp;quot;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter II: Sorting --&amp;gt; I excluded this.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter III: Searching --&amp;gt; I forgot to excluded this, its educated together with sorting.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter IV: Graphs --&amp;gt; I excluded this, because its a beginner course. I really like to teach dijkstra, breadth-first-search, etc... there are many cool real life examples.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter V: Strings --&amp;gt; Nothing there I see, which has a nice context. Many algorithms there need trees/graphs. Although I favour Huffmann-Encoding. Implementing it is really hard. That would be possible at the end of the course (3rd year).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Chapter VI: Nice! But for my course, way too complicated. I will have a look at &amp;quot;Particle Collisions&amp;quot;. I am teaching quite early the collisions against the &amp;quot;wall&amp;quot; (only horizontal and vertical). But the collisions against other particals would be interesting.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To clarify: I am searching for a good &lt;strong&gt;problem/context&lt;/strong&gt;. A particle collision would be still an abstract algorithm. The problem/context would be for example: Simulating how a virus distributes.&lt;/p&gt;&#xA;&lt;p&gt;Thank you for your ideas/help!&#xA;Benjamin&lt;/p&gt;&#xA;" OwnerUserId="12512" LastEditorUserId="12512" LastEditDate="2022-09-06T15:23:49.820" LastActivityDate="2022-09-14T06:00:27.850" Title="Searching for algorithms using array, stack, queue, List or no data structure solving interesting problems" Tags="|programming|secondary-education|student-motivation|algorithms|data-structure|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7525" PostTypeId="2" ParentId="7524" CreationDate="2022-09-05T13:54:51.847" Score="2" Body="&lt;ul&gt;&#xA;&lt;li&gt;Experimental test of the Collatz conjecture (no data: just a couple of nested loops)&lt;/li&gt;&#xA;&lt;li&gt;Experimental test that each prime is equi-distant between two other primes (corollary of the Goldbach conjecture&lt;/li&gt;&#xA;&lt;li&gt;Store Pascal's triangle in a linear array (hey, we don't have triangular arrays and a square array is wasteful) and print the values modulo some int. In fact, print &amp;quot;*&amp;quot; if the modulo is nonzero, space otherwise. Instant fractal!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Random thought: algorithms are usually taught in the context of a programming language (as opposed to &amp;quot;article in journal of algorithms&amp;quot; style) so you can not entirely divorce the discussion of an algorithm from a discussion of the programming language. And then there are algorithms that are not overly deep, but where the implementation is interesting.&lt;/p&gt;&#xA;&lt;p&gt;In that spirit:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Write a zero finder, first by bisection, then by Newton. Implementation aspects: 1. dealing with a function pointer 2. in the Newton method dealing with the fact that you may not have the derivative function.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;See my point? Given a function it's not hard to write a program to find its zeros (or at least one), but writing a general purpose piece of software is harder and more interesting.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2022-09-05T14:13:57.400" LastActivityDate="2022-09-05T14:13:57.400" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7526" PostTypeId="2" ParentId="7524" CreationDate="2022-09-05T21:04:24.723" Score="3" Body="&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/032157351X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Algorithms 4ed by Sedgewick and Wayne&lt;/a&gt; have a lot of exercices and projects. You can see some of them on the &lt;a href=&quot;https://algs4.cs.princeton.edu/home/&quot; rel=&quot;nofollow noreferrer&quot;&gt;book site&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.beecrowd.com.br/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Beecrowd&lt;/a&gt; have a lot of &lt;a href=&quot;https://www.beecrowd.com.br/judge/en/problems/index/1&quot; rel=&quot;nofollow noreferrer&quot;&gt;begginer&lt;/a&gt; and &lt;a href=&quot;https://www.beecrowd.com.br/judge/en/problems/index/2&quot; rel=&quot;nofollow noreferrer&quot;&gt;ad-hoc&lt;/a&gt; problems. Since you need something less theoretical, I think it can help you.&lt;/p&gt;&#xA;" OwnerUserId="8199" LastEditorUserId="8199" LastEditDate="2022-09-06T17:10:42.643" LastActivityDate="2022-09-06T17:10:42.643" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7527" PostTypeId="1" AcceptedAnswerId="7530" CreationDate="2022-09-08T04:03:38.120" Score="2" ViewCount="164" Body="&lt;p&gt;When teaching algorithm (high school) I always go with some sorting &amp;amp; searching algorithms and believe that should be &lt;strong&gt;enough&lt;/strong&gt;, or at least lay a good foundation for them.&lt;/p&gt;&#xA;&lt;p&gt;But I have come to realize that teaching algorithms for &lt;strong&gt;string processing&lt;/strong&gt; may also be necessary. For starters, a) every programming languages have the standard library for string processing. b) since we are Chinese we hit the Chinese garbled characters on webpages from time to time but kids in high school normally have a hard time to understand ascii vs unicode and all kinds encoding like UTF8, UTF16. c) I do believe they will deal with string process someday just like they will deal with sorting/searching.&lt;/p&gt;&#xA;&lt;p&gt;So any advice how to teach string algorithm? Do I teach them KMP or some other substring searching algorithm? Do I teach them Regular Expressions, know what that is and how to use them? I don't have much experience in this and the only material I have now is &lt;a href=&quot;https://algs4.cs.princeton.edu/50strings/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://algs4.cs.princeton.edu/50strings/&lt;/a&gt; I feel it is quite difficult for high school kids.&lt;/p&gt;&#xA;&lt;p&gt;From the comment I got I think I should make it clear my goal. I want to teach them some very basic string algorithms, i.e. some string algorithms that I will argue very programmer should know.  Using sorting &amp;amp; searching algorithm as comparison, there are some very basic sorting &amp;amp; searching algorithms I think very programmer should know, elementary sorts if not Quicksort (if not Quicksort but the concept of divide and conquer),  binary search, etc.&lt;/p&gt;&#xA;&lt;p&gt;Joel Spolsky wrote an article a long time ago &lt;a href=&quot;https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets&lt;/a&gt; &amp;quot;if you are a programmer working in 2003 and you don’t know the basics of characters, character sets, encodings, and Unicode, and I catch you ...&amp;quot; In 2022 now but I find the situation doesn't improve much.&lt;/p&gt;&#xA;&lt;p&gt;What are the string algorithms very programmer should know ? Or is there any of, e.g does KMP or any substring search algorithm fit this category ?&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2022-09-09T03:12:23.723" LastActivityDate="2022-11-10T06:58:40.163" Title="Teaching ideas for string algorithm?" Tags="|lesson-ideas|algorithms|" AnswerCount="4" CommentCount="16" ContentLicense="CC BY-SA 4.0" />
  <row Id="7528" PostTypeId="2" ParentId="7527" CreationDate="2022-09-09T11:43:11.803" Score="1" Body="&lt;p&gt;Right-justify text in a monospaced font. If you give the input as a long string, this requires searching for spaces, breaking into substrings, and then inserting more spaces.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-09-09T11:43:11.803" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7529" PostTypeId="2" ParentId="7527" CreationDate="2022-09-09T16:12:41.647" Score="3" Body="&lt;p&gt;A few ideas:&lt;/p&gt;&#xA;&lt;p&gt;You can use bitwise operations to have students change text from &lt;code&gt;lowercase&lt;/code&gt; to &lt;code&gt;CAPS&lt;/code&gt; and back.  It's a pretty neat illustration of some of the cleverness that went into the original ASCII table.&lt;/p&gt;&#xA;&lt;p&gt;You could have them try to convert an int to a string manually, and back.&lt;/p&gt;&#xA;&lt;p&gt;You could have them create a standard, four-function calculator.  I once gave this lab as a way to teach students how to do GUIs in Java, but I quickly discovered that what I had actually given was a String processing lab, because that was where the students had all of their challenges.&lt;/p&gt;&#xA;&lt;p&gt;There is a lot of processing around the string in the screen.  What happens on the screen, for instance, as you type the sequence &lt;code&gt;0 0 0 - 1 0 = . . 0 0 5 . =&lt;/code&gt;?  You would want to provide a pre-coded interface that already has pressable buttons, and enough demonstration code to show how to get a button to change what's on the screen and the current &amp;quot;remembered&amp;quot; number.  (The On/Off button is a good one to implement in advance as model code.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-09-10T13:17:53.203" LastActivityDate="2022-09-10T13:17:53.203" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7530" PostTypeId="2" ParentId="7527" CreationDate="2022-09-09T16:37:31.577" Score="4" Body="&lt;p&gt;Based on the question and follow-up comments, there appears to be uncertainty in your goals and student learning outcomes. If you clarify those goals, then it should be pretty apparent which string topics to cover.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that strings (or any other data structure, primitive data type, algorithm domain or just about anything else in computers) have no inherent value to anyone, especially students. They're a means to achieving other ends. The rule of thumb is to start with the goal, then teach only whatever is necessary for students to achieve that goal.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps your goals are to teach algorithms to improve critical thinking, prepare students for a CS degree in college and prepare them for job interviews (if job interviews still give Leetcode-style questions by the time they're entering the workforce). If so, determine their experience level and pick problems of an appropriate difficulty. Few high school students I know of are interested in or at a level where KMP or Sedgewick would be appropriate.&lt;/p&gt;&#xA;&lt;p&gt;At a beginning level, students should be able to index, iterate, concat, split, join, slice, search, adjust case and be comfortable working with common string library functions in their language. Students in an algorithms-focused course can then reimplement these library functions from first principles. Then consider functions that build on top of these primitive operations such as palindrome and isogram detectors and command line projects like &lt;a href=&quot;https://en.wikipedia.org/wiki/Mad_Libs&quot; rel=&quot;nofollow noreferrer&quot;&gt;Mad Libs&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Hangman_(game)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hangman&lt;/a&gt; &lt;sup&gt;(possibly no longer a politically viable name)&lt;/sup&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Wordle&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wordle&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind arrays and strings are pretty similar as sequences of characters, so you may wish to emphasize this and teach the two concepts more or less as one, especially if you're working with C.&lt;/p&gt;&#xA;&lt;p&gt;Now, if your goal is student engagement with less of an interest in college prep, consider games, animations, creative coding and web apps. Here, teach strings on a purely pragmatic, as-needed basis rather than on an &amp;quot;every programmer should know&amp;quot; basis (paraphrasing Spolsky's quote which really refers to professional programmers in the early 2000s, not hobbyists or students). Algorithms are important, but if you're working in a high-level language and focused on high-level goals, they're a black box students can simply invoke.&lt;/p&gt;&#xA;&lt;p&gt;Regex is probably too much, but if validation comes up in the process of making an app, I'll give students a simple regex pattern and explain the basics, like &lt;code&gt;\d&lt;/code&gt;, &lt;code&gt;.&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt; and &lt;code&gt;*&lt;/code&gt;. I know professional programmers who don't touch regex, so it seems safe to file away. For the CS prep folks, a bit of exposure to the concept is fine in high school, but that's about it. I don't recall using regex at all in graduate CS even though I'm the sort of person who'd be looking for opportunities to use it.&lt;/p&gt;&#xA;&lt;p&gt;Unicode is a dry, messy industry/&amp;quot;real world&amp;quot; problem that doesn't need to be discussed much in high school. It's better to hide the &lt;a href=&quot;https://suricrasia.online/iceberg/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ugly, dumpster fire side of programming&lt;/a&gt; for a bit. Unicode is a topic that regularly brings full-grown adult programmers with years of experience to tears&lt;sup&gt;&lt;em&gt;1&lt;/em&gt;&lt;/sup&gt;. Students will have enough frustrations to keep them busy working within a well-scoped sandbox. Expand the bounds over time, try to avoid unnecessary contrivances and acknowledge when you are simplifying things, but try to keep the rails on the crib. Like dumping all of your problems and dark secrets on the first date, showing too much mess up front scares most people off.&lt;/p&gt;&#xA;&lt;p&gt;I believe you're coming from a country and language where Unicode is a large part of everyday life. I live in the USA where we can pretty safely stuff Unicode under the table during high school and pretend it doesn't exist. Then when students enter the workforce, show them the mess, bait-and-switch style. By then, it's too late and they have to deal with uber-frustrating Unicode problems nobody else wants to touch so they can pay off their debt.&lt;/p&gt;&#xA;&lt;p&gt;If you accept the terms and conditions and really want to go into Unicode, maybe an image-to-unicode converter or command-line interface that uses &lt;a href=&quot;https://en.wikipedia.org/wiki/Box-drawing_character&quot; rel=&quot;nofollow noreferrer&quot;&gt;box-drawing characters&lt;/a&gt; would be exciting. You could maybe sneak some vegetables into the pizza if there are any pressing lessons you want students to learn. Emojis are another thing that seems fun and elegant until you try to use them in a real app and encounter the edge cases, but they can be OK for education&lt;sup&gt;&lt;em&gt;2&lt;/em&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;&lt;em&gt;1. See &lt;a href=&quot;https://github.com/minimaxir/big-list-of-naughty-strings/tree/db33ec7b1d5d9616a88c76394b7d0897bd0b97eb#why-test-naughty-strings&quot; rel=&quot;nofollow noreferrer&quot;&gt;this animation of Twitter giving an internal server error when tweeting a zero-width Unicode character&lt;/a&gt;.&lt;/em&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;&lt;em&gt;2. As long as you're ready for them to inexplicably show up funny on Jane or Jimmy's computer and spend 3 hours trying to figure out why.&lt;/em&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-09-13T00:45:49.787" LastActivityDate="2022-09-13T00:45:49.787" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7531" PostTypeId="1" AcceptedAnswerId="7533" CreationDate="2022-09-12T08:14:34.997" Score="0" ViewCount="68" Body="&lt;p&gt;I'm teaching a course on Mobile App Development. I was thinking of ditching XML and doing Jetpack Compose for UI development. I find compose more intuitive and productive. XML has a larger market share / legacy code but Compose is the new big thing.&lt;/p&gt;&#xA;&lt;p&gt;What do you think? Teaching Compose instead of XML to beginner students &lt;em&gt;(who already know programming btw)&lt;/em&gt; is a good idea?&lt;/p&gt;&#xA;" OwnerUserId="11521" LastActivityDate="2022-09-12T10:23:05.650" Title="Android Course: XML or Compose?" Tags="|app-development|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7533" PostTypeId="2" ParentId="7531" CreationDate="2022-09-12T10:23:05.650" Score="2" Body="&lt;p&gt;Jetpack Compose is absolutely amazing. It has a &lt;a href=&quot;https://app.slack.com/client/T09229ZC6/CJLTWPH7S&quot; rel=&quot;nofollow noreferrer&quot;&gt;great community&lt;/a&gt; (&lt;a href=&quot;https://kotlinlang.org/community/&quot; rel=&quot;nofollow noreferrer&quot;&gt;kotlinlang slack&lt;/a&gt; - compose channel), a huge power behind it and there already is quite a number of &lt;a href=&quot;https://www.youtube.com/watch?v=cDabx3SjuOY&amp;amp;list=PLQkwcJG4YTCSpJ2NLhDTHhi6XBNfk9WiC&quot; rel=&quot;nofollow noreferrer&quot;&gt;very decent tutorials&lt;/a&gt; on it.&lt;/p&gt;&#xA;&lt;p&gt;On one hand one may argue that XMLs are simpler. I would say that this is pretty much never the case - they are more &lt;em&gt;familiar&lt;/em&gt;. Jetpack Compose seems to be successor of Android (at least&lt;sup&gt;1&lt;/sup&gt;) UI development, so students may find it very motivating that they are being taught &lt;em&gt;the new thing&lt;/em&gt; that may as well be the norm in the future. While some of the concerns regarding usefulness of teaching (potentially) outdated tools are inherently wrong, one must remember that students' motivation plays a big role in courses.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, there is an advantage to Compose that cannot be overlooked - it uses Kotlin. The very language used for expressing parts of the system (mobile application) matters. A lot. So now, instead of learning Kotlin, learning XML and learning how to bind the two, students can... simply learn Kotlin. Yes, they need to learn &lt;em&gt;which&lt;/em&gt; functions to invoke in Compose, but they would've had to do it with XML too. Just with tags, not functions.&lt;/p&gt;&#xA;&lt;p&gt;It would seem like Compose is the clear winner here, but (in my opinion - unfortunately) it is not the case. Compose is a very young framework. Its adaptation will take a long time and, if your goal is to prepare your students for being able to work with mobile development as soon as possible, learning XML will be way more beneficial to them.&lt;/p&gt;&#xA;&lt;p&gt;If it was up to me, I wouldn't focus on aiming to make the students employable as quickly as possible. I would show them things that are more powerful, simpler, more elegant and easier to integrate. I would show them Compose.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;I say &lt;em&gt;at least&lt;/em&gt;, because I have been using Compose for things like Desktop development too. It's a little lacking there, but apart from it being a little incomplete (makes sense, since it's a fairly young framework), it is the best GUI library I have ever touched.&lt;/p&gt;&#xA;" OwnerUserId="11453" LastActivityDate="2022-09-12T10:23:05.650" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7534" PostTypeId="2" ParentId="7506" CreationDate="2022-09-12T12:55:34.310" Score="1" Body="&lt;p&gt;computer science refers to designing and building computers and programs. Information technology, on the other hand, refers to maintaining and process of identifying those computers and their networks, systems, and databases to ensure they run smoothly and peacefully&lt;/p&gt;&#xA;" OwnerUserId="12535" LastActivityDate="2022-09-12T12:55:34.310" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7535" PostTypeId="2" ParentId="7524" CreationDate="2022-09-14T06:00:27.850" Score="1" Body="&lt;p&gt;&lt;strong&gt;Classics&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reverse&lt;/li&gt;&#xA;&lt;li&gt;Rotate&lt;/li&gt;&#xA;&lt;li&gt;(Advanced) &lt;code&gt;reverse_until&lt;/code&gt;, &lt;code&gt;rotate&lt;/code&gt; revisited, and &lt;code&gt;inplace_merge&lt;/code&gt;. However, without bisects, which you don't want, they make no sense.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pure math&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DCD&lt;/li&gt;&#xA;&lt;li&gt;Binary GCD&lt;/li&gt;&#xA;&lt;li&gt;Exponentiation by squaring&lt;/li&gt;&#xA;&lt;li&gt;Fibonacci&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Naive&lt;/li&gt;&#xA;&lt;li&gt;In linear time&lt;/li&gt;&#xA;&lt;li&gt;In logarithmic time&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Misc&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;N Queens&lt;/li&gt;&#xA;&lt;li&gt;N-bit full adder&lt;/li&gt;&#xA;&lt;li&gt;(Advanced) &lt;a href=&quot;https://www.jmeiners.com/efficient-programming-with-components/10_binary_counter.html#L10.-Balanced-binary-reduction&quot; rel=&quot;nofollow noreferrer&quot;&gt;Binary counter&lt;/a&gt;. Read the link. It is a sheer pleasure and plenty of context/motivation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="182" LastActivityDate="2022-09-14T06:00:27.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7536" PostTypeId="1" CreationDate="2022-09-14T08:25:39.397" Score="4" ViewCount="388" Body="&lt;p&gt;I have some students who will major in CS next year. I have taught them some basic algorithms (sorting &amp;amp; searching), e.g. check here &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7347/how-to-teach-algorithms-in-an-interactive-way/7515#7515&quot;&gt;How to teach algorithms in an interactive way&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7527/teaching-ideas-for-string-algorithm&quot;&gt;Teaching ideas for string algorithm?&lt;/a&gt;. I teach they to write some simple python scripts, e.g. &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6699/what-are-good-practical-labs-and-activities-for-loops&quot;&gt;What are good, practical labs and activities for loops?&lt;/a&gt; and &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6709/some-real-practical-example-to-teach-object-oriented-concepts-and-programming-i&quot;&gt;Some real practical example to teach object-oriented concepts and programming (in python)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I want to recommend some books for them (also asked by some students). So I do some research and find this article &lt;a href=&quot;https://ebookfriendly.com/most-popular-college-books-us-infographics/the-most-popular-college-books-in-the-us-computer-science/&quot; rel=&quot;nofollow noreferrer&quot;&gt;the most frequently assigned computer science college books in US&lt;/a&gt;. I don't know if their data is credible or not (I feel not). I really frown on this book list. I agree with  &amp;quot;introduction to algorithms&amp;quot; (although I prefer Sedgewick's &amp;quot;Algorithms&amp;quot;) but other books really are not that good. I would rather recommend &amp;quot;Code Complete&amp;quot;(or &amp;quot;Clean Code&amp;quot;) instead of some book for a specific programing language.&lt;/p&gt;&#xA;&lt;p&gt;My first question, how do you interpret this book list? I feel they are poor recommendation/assigned books for a mediocre college in China (I can say this with confidence as I am Chinese)&lt;/p&gt;&#xA;&lt;p&gt;My second question, what is your recommendation? The goal is to help them keep interested in CS. If the reading can help them better prepare for their undergraduate study that is a plus. When thinking about my recommendation I reread Paul Graham's &amp;quot;Hackers &amp;amp; Painters&amp;quot;(he talked about his high school life in the book) but I found I didn't enjoy reading it this time. It feels old and outdated.&lt;/p&gt;&#xA;&lt;p&gt;The comment from &amp;quot;njuffa&amp;quot; mentioned &amp;quot;Programming Pearls&amp;quot;. There are couple of reasons I didn't consider &amp;quot;Programming Pearls&amp;quot;.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I try to avoid c++. I believe c++ should not be kids' first or second language. As a matter of fact I will advice them learn c++ until they absolute must, say a job/project requires to use c++.&lt;/li&gt;&#xA;&lt;li&gt;If I remember correctly the book is mainly about algorithm, but then we already have enough books for algorithm, e.g. I would rather recommend &amp;quot;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1617292230&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Grokking Algorithms: An Illustrated Guide for Programmers and Other Curious People&lt;/a&gt;&amp;quot; instead of a book in 1999.&lt;/li&gt;&#xA;&lt;li&gt;I normally don't recommend any &amp;quot;old&amp;quot; book for my students, (whether we should still read &amp;quot;The Mythical Man-Month&amp;quot; can be another topic) but this lead to my next point.&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;The Pragmatic Programmer&amp;quot; 1st version also published in 1999 but I see it has a 20th Anniversary Edition. I don't read this new edition. So if you read this new edition will you recommend it to undergraduate student ?&lt;/li&gt;&#xA;&lt;li&gt;I am thinking about recommending books about Operating Systems because they heard these terms iOS, watchOS, macOS all the time. But I can't find an easy one. Most books about Operating Systems are too thick and I believe they will study OS theory in college, so I just need some easy(interesting if possible) introduction material.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;BTW, I asked a related question here &amp;quot;&lt;a href=&quot;https://skeptics.stackexchange.com/questions/53799/do-the-most-popular-college-books-in-the-us-include-the-communist-manifesto&quot;&gt;Do the most popular college books in the US include &amp;quot;The Communist Manifesto&amp;quot; &amp;amp; &amp;quot;The Republic&amp;quot;?&lt;/a&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;I found Cormen answered a similar question on quora &lt;a href=&quot;https://www.quora.com/What-is-the-best-introduction-to-computer-science-books&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;What is the best introduction to computer science books?&lt;/a&gt;, to quote&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;At Dartmouth, we do not assign a textbook in our introductory course.&#xA;We use a set of lecture notes on the Web that Devin Balkcom, Hany&#xA;Farid, and I have written over the years. So, my answer is that I have&#xA;no answer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And Alan Kay answered this on quora &lt;a href=&quot;https://www.quora.com/What-are-the-best-books-to-understand-computer-science-concepts&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;What are the best books to understand computer science concepts?&amp;quot;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;By far the best book for the general public — the one I always&#xA;recommend — is “The Pattern on the Stone” by Danny Hillis.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I never heard of &amp;quot;The Pattern on the Stone&amp;quot; and I find it is also an old book.&lt;/p&gt;&#xA;&lt;p&gt;So I guess I have asked a difficult question.&lt;/p&gt;&#xA;&lt;p&gt;--- update 2023.2.12---&lt;/p&gt;&#xA;&lt;p&gt;I find this serial &lt;a href=&quot;https://www.youtube.com/playlist?list=PLzdnOPI1iJNcsRwJhvksEo1tJqjIqWbN-&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;How Computer Works&amp;quot;&lt;/a&gt; by &lt;a href=&quot;https://code.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://code.org/&lt;/a&gt; is quite good. I have checked many videos there &lt;a href=&quot;https://www.youtube.com/@codeorg&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/@codeorg&lt;/a&gt; and highly recommend them. It is a pity it only has an English version.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-02-12T05:37:04.163" LastActivityDate="2023-03-05T02:20:37.893" Title="Book recommendation for high school students who will major in CS?" Tags="|self-learning|programming|secondary-education|undergraduate|" AnswerCount="5" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7537" PostTypeId="2" ParentId="7536" CreationDate="2022-09-16T17:49:40.360" Score="3" Body="&lt;p&gt;In my experience, most professional software engineering books (Mythical Man-Month, Pragmatic Programmer, Clean Code, Code Complete) and college-level algorithms books (Sedgewick, Cormen, Skiena, Roughgarden, Kleinberg, Dasgupta, etc) are too heavy for high schoolers. Many of my graduate-level CS classmates weren't able to penetrate Cormen (1300+ pages!) and struggled with Dasgupta. Most of the business concerns and subtle design tradeoffs discussed in software engineering books aren't relevant to high school students because they're not in the industry and aren't designing, building or maintaining large-scale production applications or systems.&lt;/p&gt;&#xA;&lt;p&gt;High schoolers mostly want to have fun, make hands-on games and apps, work with robotics (LEGO Mindstorms, Arduino, Raspberry Pi) and explore the fundamentals and &amp;quot;greatest hits&amp;quot; of computing. There should be a balance between big, high-level concepts presented in a nutshell and plenty of relatively sandboxed hands-on projects that offer a strong fun-to-effort ratio. The goal for engagement is to reduce frustration and present content that feels relevant. Material should be challenging, but not overly so.&lt;/p&gt;&#xA;&lt;p&gt;In-depth advanced algorithm analysis, inner workings of operating systems (schedulers, memory models, etc) and deep tradeoffs in software engineering are out of scope. They'll learn about these things in their college and professional careers and on an as-needed basis.&lt;/p&gt;&#xA;&lt;p&gt;There's a good deal of tension teaching algorithms in general, because the topic is often seen as dry and impractical. Attitudes about algorithms have shifted over the past decade in their use in hiring, with potential transitive impacts on education. Algorithms aren't necessary for everyday professional software engineering work. There are high school level competitive programming teams througout the world focused on algorithms, but this is a select minority of students, not representative of a high school class curriculum.&lt;/p&gt;&#xA;&lt;p&gt;Given this context, I'd suggest one of a few approaches:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Don't use a textbook at all and teach algorithms using online resources and practical problems. I'll admit I've generally only skimmed most of the 20+ textbooks I've been assigned throughout my computing education. I'm not sure they're necessary or relevant for most courses these days given the abundance of high-quality online options (assuming good curation). Consider &lt;a href=&quot;https://www.khanacademy.org/computing/computer-science/algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;Khan Academy&lt;/a&gt; for starters.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Use an algorithms textbook, but pick something short, accessible and practical. I agree that it's a good idea to steer clear of books older than a decade or so and try to avoid C++ and functional languages (Racket, Scheme, Haskell) in favor of Python or JS. Choose one with simple explanations, more code and less math. Here are a couple suggestions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Algorithms for Dummies (mentioned in the comments). This book is well-written, easy to understand and focuses on real-world concerns. For topics that are difficult or theoretical, the author sticks to big takeaways and fostering an appreciation for the impact the algorithms have had on software.&lt;/li&gt;&#xA;&lt;li&gt;Grokking Algorithms (mentioned in the original post). This book has fun illustrations, presents the material with a light, accessible tone and sticks to core topics, avoiding esoteric college-level concepts like B-trees, FFT, NP-Complete reductions, Master Theorem and so on.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Both books use Python.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If your curriculum permits it, sneak algorithms in the back door via games. I like &lt;a href=&quot;https://inventwithpython.com/invent4thed/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Invent Your Own Computer Games with Python&lt;/a&gt; (and just about anything by Al Sweigart), with the caveat that the algorithms it covers (such as simple game AI) might leave gaps if you're expecting a comprehensive understanding of algorithm fundamentals. On the flip side, it's fun and the algorithms will feel immediately relevant and applicable.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;These books are either very affordable or available &lt;a href=&quot;https://greenteapress.com/free_books.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;for free&lt;/a&gt; online.&lt;/p&gt;&#xA;&lt;p&gt;Sort of an aside, but while &lt;a href=&quot;https://greenteapress.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Green Tea Press&lt;/a&gt; doesn't have a self-proclaimed algorithms book per se, it offers accessible books on a variety of adjacent subjects that teach algorithmic thinking and data structures. Check out Allen's &lt;a href=&quot;https://greenteapress.com/wp/textbook-manifesto/&quot; rel=&quot;nofollow noreferrer&quot;&gt;textbook manifesto&lt;/a&gt; while you're there.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.csunplugged.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;CS Unplugged&lt;/a&gt; is also worth mentioning for the concept in spite of its grade-school audience. I like the idea of going hands-on and offline with algorithm instruction when possible, although I haven't battle tested this much in my own teaching. Algorithms are particularly amenable to worked examples on paper, teaching students how to simulate the computer executing the algorithm step-by-step, think through the program flow and develop test cases to discover bugs.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2022-09-16T23:28:01.633" LastActivityDate="2022-09-16T23:28:01.633" CommentCount="15" ContentLicense="CC BY-SA 4.0" />
  <row Id="7538" PostTypeId="1" AcceptedAnswerId="7540" CreationDate="2022-09-17T14:02:47.670" Score="2" ViewCount="542" Body="&lt;p&gt;I'm a CS graduate from poor and underdeveloped country so my education might not be upto the standard so pardon me for that.&lt;/p&gt;&#xA;&lt;p&gt;I'm planning to learn full stack web development for job. Be it MEAN, MERN, python django sqlite etc&lt;/p&gt;&#xA;&lt;p&gt;I want a &amp;quot;URL shortener&amp;quot;, it's built already. That too in form of tutorials. There are codes around the internet telling how to do each part of this system. Most actually only write codes in their tutorials and not make tutorials independent of code.&lt;/p&gt;&#xA;&lt;p&gt;How do I build something without looking at other's code? For eg: I want to build a &amp;quot;URL shortner&amp;quot;, where can I learn about &amp;quot;URL Shortener&amp;quot; system independent of code.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;URL Shortner&amp;quot; is just an example. The software could be anything.&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="12659" LastEditDate="2022-11-05T01:48:49.663" LastActivityDate="2022-11-05T01:48:49.663" Title="How to actually learn while building dummy applications that have already been built?" Tags="|self-learning|programming|active-learning|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7539" PostTypeId="1" CreationDate="2022-09-20T17:53:28.330" Score="3" ViewCount="41" Body="&lt;p&gt;We used to use Repl.it for embedding code in Canvas courses so that students could quickly and easily engage with programming after watching a video or reading content in Canvas. However, they changed their offering and the iframes are no longer editable within Canvas.&lt;/p&gt;&#xA;&lt;p&gt;We are looking for an alternative tool that would let instructors prepopulate code and then let students modify, compile and run it within a browser. They would all be short code snippets. But it needs to support Python and C/C++.&lt;/p&gt;&#xA;&lt;p&gt;The only tool we have found so far is Vocareum which looks promising, but I was wondering if anyone knew of any other similar tools we could compare to.&lt;/p&gt;&#xA;" OwnerUserId="12555" LastActivityDate="2022-09-20T17:53:28.330" Title="Are there any tools for embedding editable code samples in Canvas?" Tags="|lecture-tools|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7540" PostTypeId="2" ParentId="7538" CreationDate="2022-09-21T17:34:32.987" Score="6" Body="&lt;p&gt;I think you shouldn't be reaching for a tutorial for this project at all. Tutorials are great for learning a new language, tool or approach, but they aren't that relevant when you want to build a project in a stack you're already familiar with.&lt;/p&gt;&#xA;&lt;p&gt;So then I would recommend you to go through two phases here:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you don't feel comfortable with the stack yet, or with full stack development in general, keep doing tutorials / courses, without worrying about what the example project is. The projects are there just as examples of how to apply the tool/technique.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Once you feel you're ready to tackle a particular project that you're personally interested in, such as the URL shortener, put the tutorials aside, and start from a blank project. Follow @ggorlen's suggestion and try to break the problem apart and tackle each part/component with the tools you're now familiar with.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You can refer back in phase 2 to the tutorials you've done in phase 1, but try to avoid looking for new tutorials specific to the problem at hand, since that could rob you of the learning experience. I would suggest only looking at tutorials, or Stack Overflow, if you feel you're really stuck with a particular technical issue, and even then, I would advise that you try to look for something that has nothing to do with the particular project.&lt;/p&gt;&#xA;&lt;p&gt;And the most important thing - have fun :)&lt;/p&gt;&#xA;" OwnerUserId="2119" LastEditorUserId="2119" LastEditDate="2022-09-22T13:46:25.100" LastActivityDate="2022-09-22T13:46:25.100" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7541" PostTypeId="1" CreationDate="2022-09-22T01:49:35.567" Score="1" ViewCount="52" Body="&lt;p&gt;I'm a former professional programmer and I switched to private tutoring of math and CS about five years ago. For the past two years I've mainly tutored competitive programming to high school students. I'm getting burned out on it - I think I love regular projects more than competitions - so I'm looking to move into teaching languages and projects to middle/high school students.&lt;/p&gt;&#xA;&lt;p&gt;I'm good at teaching Python to beginners and I have experience with making dynamic web pages with JavaScript.&lt;/p&gt;&#xA;&lt;p&gt;I'm not experienced with creating apps for IOS or Android, and I've done no robot coding.&lt;/p&gt;&#xA;&lt;p&gt;I'm wondering how often students want to create an app or do robot coding as their first project. And if there are any other common topics/projects that students (middle school/high school) request.&lt;/p&gt;&#xA;&lt;p&gt;This kind of tutoring is mainly aimed at students who are not getting a CS curriculum in their schools; either they're too young for it to have started or they want to cover areas not covered by their schools.&lt;/p&gt;&#xA;&lt;p&gt;Also, whether students are more often determined in what projects they want to do, or whether they are flexible. I imagine that web pages with JavaScript are cool enough to appeal to almost any student.&lt;/p&gt;&#xA;" OwnerUserId="9246" LastActivityDate="2022-09-22T01:49:35.567" Title="Private tutoring middle school and high school students: most common requests" Tags="|project|javascript|html|robotics|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7544" PostTypeId="1" CreationDate="2022-09-27T06:31:54.623" Score="1" ViewCount="39" Body="&lt;p&gt;What do you think about the following course outline for the course &amp;quot;&lt;strong&gt;Mobile App Development&lt;/strong&gt;&amp;quot;? I'm doing Compose, only last few lectures are reserved for XML layouts.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://docs.google.com/spreadsheets/d/1OWIkcwJ8OpKFy0Kz7PW91HnrEmiuEgBa9PrNCElED8k/edit?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.google.com/spreadsheets/d/1OWIkcwJ8OpKFy0Kz7PW91HnrEmiuEgBa9PrNCElED8k/edit?usp=sharing&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Do you think any topic is missing? or any present topic should be replaced? Detailed feedback is appreciated.&lt;/p&gt;&#xA;" OwnerUserId="11521" LastEditorUserId="27" LastEditDate="2022-09-27T20:39:48.363" LastActivityDate="2022-09-27T20:39:48.363" Title="Feedback: Mobile Development Course Outline" Tags="|curriculum-review|app-development|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7546" PostTypeId="1" CreationDate="2022-10-03T13:33:02.710" Score="3" ViewCount="472" Body="&lt;p&gt;I'm helping a 10-year-old learn to program simple games in Scratch. He's expressed interest in making a simple 3D game. Is there any Scratch-like environment or programming language for creating simple 3D games?&lt;/p&gt;&#xA;&lt;p&gt;I want to avoid typing code.&lt;/p&gt;&#xA;" OwnerUserId="12582" LastEditorUserId="12659" LastEditDate="2022-11-10T09:48:42.457" LastActivityDate="2023-11-22T08:34:40.373" Title="Scratch-like environment for 3D game programming" Tags="|resource-request|primary-school|scratch|" AnswerCount="5" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7547" PostTypeId="2" ParentId="7546" CreationDate="2022-10-05T19:42:39.573" Score="2" Body="&lt;p&gt;I'm not sure it's at the right level for a 10-year-old, as it's aimed for professional developers, but you can write game logic in Unreal Engine without any code, using its &lt;strong&gt;Blueprints&lt;/strong&gt; visual scripting tool. Here's the official quick start guide - &lt;a href=&quot;https://docs.unrealengine.com/5.0/en-US/quick-start-guide-for-blueprints-visual-scripting-in-unreal-engine/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.unrealengine.com/5.0/en-US/quick-start-guide-for-blueprints-visual-scripting-in-unreal-engine/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2022-10-05T19:42:39.573" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7548" PostTypeId="1" CreationDate="2022-10-08T06:45:59.867" Score="0" ViewCount="111" Body="&lt;p&gt;I study computer science. In my course problems are in a web page and there are described what the program should do and what the screen should be seen after an example run. The solutions are checked by computer and the grader outputs the differences between my output and the expected output.&lt;/p&gt;&#xA;&lt;p&gt;Now I have done exercise and by example the run, it gives the correct answer. The automatic checker shows that my code has a mistake. What should I do in a situation that in my opinion, the example run goes well and the program satisfies the needs the description tells but automatic grader shows a mistake of the form like there is an extra space or tab or newline somewhere? Note that in the assignment there was not specified such a thing. Is the case that I have found another solution to the problem, or am I expected to modify the code until the automatic grader shows no mistake, or should I ask the lecturer to manually check my solution, or ask the lecturer more detailed assignment? The source code of the automatic checker is not available for me.&lt;/p&gt;&#xA;" OwnerUserId="12596" LastEditorUserId="1293" LastEditDate="2022-10-12T15:41:43.863" LastActivityDate="2022-10-12T16:04:21.567" Title="An automatic grader won't accept my solution. What should I do?" Tags="|self-learning|programming|undergraduate|auto-graders|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7549" PostTypeId="2" ParentId="7546" CreationDate="2022-10-08T10:23:32.990" Score="0" Body="&lt;p&gt;Have they done 2D games yet? If so then a next step may be parallax scroll, or other pseudo 3D effects. I imagine that the math of full 3D will be very hard (Vectors, trigonometry, …).&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-10-08T10:23:32.990" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7550" PostTypeId="2" ParentId="7538" CreationDate="2022-10-08T13:33:30.950" Score="2" Body="&lt;p&gt;Here is a simple kata:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Write a program that does nothing&lt;/li&gt;&#xA;&lt;li&gt;Test&lt;/li&gt;&#xA;&lt;li&gt;Extend program to accepts a web-request&lt;/li&gt;&#xA;&lt;li&gt;Test&lt;/li&gt;&#xA;&lt;li&gt;Extend program to return a redirect to a specific page&lt;/li&gt;&#xA;&lt;li&gt;Test&lt;/li&gt;&#xA;&lt;li&gt;Extend program to return a redirect to one of two pages&lt;/li&gt;&#xA;&lt;li&gt;Test&lt;/li&gt;&#xA;&lt;li&gt;Extend program to return a redirect to one of many pages (probably want to use a key:value store (hash map).&lt;/li&gt;&#xA;&lt;li&gt;Test&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You will probably break it up into smaller steps, with more testing.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The next day do it again, this time write unit tests.&lt;/li&gt;&#xA;&lt;li&gt;The next day do it again, this time write the unit test before you write the code (test driven). Write one test, run it, fail, fix code under test, test, pass, repeat.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Next, do it a different way: if you used a HTTP library, then do it without (just use the socket library).&lt;/p&gt;&#xA;&lt;p&gt;Repeat this kata at least 5 times. On separate days. Then choose a new kata. But this time (and all future times) do test driven from the start.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-10-08T13:33:30.950" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7551" PostTypeId="2" ParentId="4974" CreationDate="2022-10-12T10:29:41.523" Score="0" Body="&lt;p&gt;I will have to disagree with Buffy that the pair programing is a bad idea in your case. As a matter of fact I think the pair programing is a bad idea in general and I never see it work in real situation but that is another big topic.&lt;/p&gt;&#xA;&lt;p&gt;My suggestion is to let them &lt;strong&gt;update/write&lt;/strong&gt; the team's technical document, be it high level design documents, technical spec or even good/up-to-date code comments. If you are those &amp;quot;agile teams&amp;quot; that we don't really have a decent document then let them make one.&lt;/p&gt;&#xA;&lt;p&gt;I believe the document is always a technical debt for any fast moving team. Let the newcomers update/write technical documents to explain how the system works, how a piece of codes work, make the existing document up to date.&lt;/p&gt;&#xA;&lt;p&gt;To write a good document they need to get their hands dirty, consult with the old guys etc to understand how things work. Writing a good document that people actually will read and refer to is also a challenge to the newcomer and benefit the whole team in the end.&lt;/p&gt;&#xA;&lt;p&gt;This article &lt;a href=&quot;https://evanlimanto.github.io/2019/10/06/so-youre-a-new-grad-software-engineer.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;So You're A New Grad Software Engineer&lt;/a&gt; resonates with me.&lt;/p&gt;&#xA;&lt;p&gt;Another answer mentioned test driven development, which I am not so sure about either. Of course test drive development is another big topic like pair programming. Personally I tend to  agree with the points &lt;a href=&quot;https://hackernoon.com/test-driven-development-is-fundamentally-wrong-hor3z4d&quot; rel=&quot;nofollow noreferrer&quot;&gt;Test-Driven Development is Fundamentally Wrong&lt;/a&gt; made, writing tests afterward (not beforehand) makes much more sense. &amp;quot;Were I to follow the TDD architecture I would have to constantly revisit my tests, review all of them, revising them to match my discoveries.&amp;quot; because there will be always things that I didn’t think of until I really implement them and &amp;quot;Because the same blind spots that I had in design will appear in my tests.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;I don't mean to provide an answer just to argue/disagree the existing answers. One of reasons I answer the question is that I would like to know 4 years later, when looking back, does the pair programming/test drive development really help you bring up the newcomers? (if the OP would answer it) If yes it will also change (a little bit) my attitude towards pair programming and test-driven development.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2022-10-12T11:46:39.350" LastActivityDate="2022-10-12T11:46:39.350" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7552" PostTypeId="2" ParentId="7548" CreationDate="2022-10-12T15:48:29.890" Score="3" Body="&lt;p&gt;No, it won't (or shouldn't) be something like spacing and such.&lt;/p&gt;&#xA;&lt;p&gt;My best guess is that you have done inadequate testing of the code and that for some inputs, say, it gives the wrong answer.&lt;/p&gt;&#xA;&lt;p&gt;I don't know the internals of the auto-grader though, and it is possible that it has an error or is using an incorrect rubric. This might be possible for an insufficiently tested grader, just as you might have an error for insufficiently tested code.&lt;/p&gt;&#xA;&lt;p&gt;If the grader was created by an instructor, then they might also be incorporating a style guide into the rubric. In that case it could actually be spacing or line breaks or indentation or anything that annoys the grader. But the same would be the case for a human grader.&lt;/p&gt;&#xA;&lt;p&gt;Yes, if you can't identify the error or why it indicates an error, talk to the instructor.&lt;/p&gt;&#xA;&lt;p&gt;You don't indicate what your level of learning is, but assuming you are a raw novice at it, perhaps the issue is that you were guided too much by the sample input and output and not enough by the problem description. That is pretty common for beginners. I remember first learning to program (deep in the previous century: FORTRN IV, self taught) and making such errors.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-10-12T16:04:21.567" LastActivityDate="2022-10-12T16:04:21.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7553" PostTypeId="2" ParentId="961" CreationDate="2022-10-13T08:28:56.503" Score="2" Body="&lt;p&gt;I always have mixed feelings about TDD. If TDD is to emphasize the important to writing test code, yes by all means. But if TDD is to make you to write test code &lt;strong&gt;before&lt;/strong&gt; implementation, &lt;strong&gt;NO&lt;/strong&gt; I am totally against it.&lt;/p&gt;&#xA;&lt;p&gt;There is a lot of exploratory &amp;amp; discovery in the development process and only when you actually implement something (through experiment and iteration) you will know what good tests should look like.  To exaggerate my point a little bit, if my Function X should take a name and output a greeting with that name, then writing the test code beforehand for my Function X sounds pretty sweet. Anything more complicated than that will make writing test code beforehand quite pointless. You may also refer to &lt;a href=&quot;https://hackernoon.com/test-driven-development-is-fundamentally-wrong-hor3z4d&quot; rel=&quot;nofollow noreferrer&quot;&gt;Test-Driven Development is Fundamentally Wrong&lt;/a&gt;. There are only some rare occasions that I find writing test first may make sense, one of them is to implement a homegrown bitarray (one of my assignments to the student) because even I have not figured out how to implement it I know what bitarray should behave so I can write test code first.&lt;/p&gt;&#xA;&lt;p&gt;But this is a site for teaching and my answer is not to argue with others. Part of reason I answered it is I saw your words &amp;quot;&lt;em&gt;Even though the teachers &lt;strong&gt;invariably encourage it&lt;/strong&gt; and present it as a useful strategy&lt;/em&gt;&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;As a teacher I will first emphasize the importance of writing test, then introduce TDD. But I emphasize that I am personally against writing test before implementation, but there are also many people embrace that idea, you probably need to try it yourself to figure out whether that is for you or not.&lt;/p&gt;&#xA;&lt;p&gt;One of teacher's job to make students's eye open. So I may even go further (not for high school students) to mention that even we all agree writing unit test is a must but there is a crazy company called Tictok that they don't really write unit test and they still makes a huge success, check here for the detailed &amp;quot;&lt;a href=&quot;https://www.youtube.com/watch?v=RNUrZFkHXlo&quot; rel=&quot;nofollow noreferrer&quot;&gt;5 crazy things about working for Tiktok&lt;/a&gt;&amp;quot;(youtube video) or here, &lt;a href=&quot;https://twitter.com/LucasOuYang/status/1493408428626100226&quot; rel=&quot;nofollow noreferrer&quot;&gt;the text version&lt;/a&gt; . The point here is that there are many ways to do things and your job as a student to experience as much as possible.&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;After reading &amp;quot;&lt;a href=&quot;https://neugierig.org/software/blog/2022/12/chrome.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chrome, 10 years later&lt;/a&gt;&amp;quot; I got another surprise, just like when I watched that Tiktok video. It makes me think again is UT really that important?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Working with Apple.&lt;/p&gt;&#xA;&lt;p&gt;In retrospect I enjoyed this a lot, for two reasons. One is that&#xA;getting code review from experienced engineers is one of the best ways&#xA;to grow as a programmer, and the Apple engineers came from a totally&#xA;foreign engineering culture — no unit tests! no comments! — that also&#xA;was clearly producing a high-quality product.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-02-20T10:07:27.813" LastActivityDate="2023-02-20T10:07:27.813" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7554" PostTypeId="1" CreationDate="2022-10-14T10:04:01.750" Score="3" ViewCount="72" Body="&lt;p&gt;To quote from &lt;a href=&quot;https://curriculumredesign.org/wp-content/uploads/AIED-Book-Excerpt-CCR.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Artificial Intelligence in Education&lt;/a&gt; by Charles Fadel etc.,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Assessments define the education we get.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;How can I automate the assessment design task using AI? Could anyone please provide some approved strategies?&lt;/p&gt;&#xA;" OwnerUserId="12575" LastEditorUserId="12575" LastEditDate="2022-10-24T14:44:46.290" LastActivityDate="2022-10-24T14:44:46.290" Title="Are there some strategies to automatically generate assessment questions and answers?" Tags="|assessment|artificial-intelligence|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7557" PostTypeId="2" ParentId="6705" CreationDate="2022-10-22T01:04:20.553" Score="1" Body="&lt;p&gt;Try:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;AWS tutorials &lt;a href=&quot;https://aws.amazon.com/braket/getting-started/?braket-blogs.sort-by=item.additionalFields.createdDate&amp;amp;braket-blogs.sort-order=desc&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://aws.amazon.com/braket/getting-started/?braket-blogs.sort-by=item.additionalFields.createdDate&amp;amp;braket-blogs.sort-order=desc&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;IBM tutorials &lt;a href=&quot;https://qiskit.org/textbook/preface.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://qiskit.org/textbook/preface.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Explore using:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Drag gates onto a circuit using Quirk. Click Menu button to access tutorials. &lt;a href=&quot;https://algassert.com/quirk#circuit=%7B%22cols%22:%5B%5B%22H%22%5D,%5B%22%E2%80%A2%22,%22X%22%5D%5D%7D&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22%E2%80%A2%22,%22X%22]]}&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="765" LastActivityDate="2022-10-22T01:04:20.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7558" PostTypeId="1" CreationDate="2022-10-25T10:16:14.863" Score="1" ViewCount="168" Body="&lt;p&gt;We're having a project work where university won't guide us at all. I've decided to use MERN stack to build a website. But I'm confused on what topics should I learn in html, css, javascript etc.&lt;/p&gt;&#xA;&lt;p&gt;What topics of javascript would be relevant to web development and in what order should they be learnt? Or do I just learn enough to write hello world and move on directly to building? I tried doing that with django, but it didn't work well for me. I fixed codes using stackoverflow but I was learning really nothing. If I had to create that project from scratch by just using google, I could not be able to reproduce it. That's why I'm trying to be more objective in how I approach this learning.&lt;/p&gt;&#xA;&lt;p&gt;There are sites that are popular like &amp;quot;The Odin Project&amp;quot; for MERN. But what for other things that aren't having such dedicated websites? How do we figure out what topics should we learn?&lt;/p&gt;&#xA;&lt;p&gt;For eg: In university courses, we've a syllabus for everything.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.inspirenignite.com/mh/csc303-discrete-structures-syllabus-for-cs-3rd-sem-2017-pattern-mumbai-university/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.inspirenignite.com/mh/csc303-discrete-structures-syllabus-for-cs-3rd-sem-2017-pattern-mumbai-university/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is the syllabus of Discrete Mathematics of Mumbai University. It's not like everything in the world about discrete math was taught in this syllabus/contents. But enough was taught so that students could learn other concepts and other courses of Undergraduate that have discrete math as preriquisites. That's exactly what I'm needing.&lt;/p&gt;&#xA;&lt;p&gt;Not knowing the contents that I should be studying would require me to study this book &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1118026691&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691&lt;/a&gt; from start to finish which is very tough for anyone to do.&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="12659" LastEditDate="2022-11-05T07:34:10.337" LastActivityDate="2023-12-27T07:17:50.157" Title="How to know what topics to study while learning to build website?" Tags="|self-learning|programming|web-development|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7559" PostTypeId="2" ParentId="7546" CreationDate="2022-10-27T16:06:21.633" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I want to avoid typing code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Unfortunately don't have an exact solution for what you're looking for as this does involve typing code, &lt;em&gt;but&lt;/em&gt; I thought perhaps you could find this answer insightful and at least a more approachable solution than some others.&lt;/p&gt;&#xA;&lt;p&gt;I took a single game development class in school and we used processingJS(now &lt;a href=&quot;https://p5js.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;p5js&lt;/a&gt;) as a low-level engine for drawing content in a browser to build simple web-based games including some in 3D. At the time, Khan Academy had some great interactive courses that used processingJS from drawing shapes, to making those shapes move, to building rudimentary games and all of the setup was done for you inside of KA. Looking now I can find &lt;a href=&quot;https://www.khanacademy.org/computing/computer-programming/programming-games-visualizations#programming-3d-shapes&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; which is different than what I used in the past as times have changed and I think this uses HTML5 canvas in place of processing, but it still seems like a pretty good intro into game development.&lt;/p&gt;&#xA;&lt;p&gt;p5js in particular was originally developed &amp;quot;for creative coding, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else&amp;quot; (&lt;a href=&quot;https://p5js.org/#:%7E:text=p5.js%20is%20a%20JavaScript%20library%20for%20creative%20coding%2C%20with%20a%20focus%20on%20making%20coding%20accessible%20and%20inclusive%20for%20artists%2C%20designers%2C%20educators%2C%20beginners%2C%20and%20anyone%20else!&quot; rel=&quot;nofollow noreferrer&quot;&gt;link&lt;/a&gt;) so it could be a good place to start dipping into programming for non-programmers. It's also web-based so setup/installation isn't too terrible since you're building for any browser and it means any games you make can easily publish to the web and be playable from anywhere. There are also a ton of resources online - here are some examples to give you a feel:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/c/TheCodingTrain&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/c/TheCodingTrain&lt;/a&gt; - a YouTube channel with a bunch of beginner programming with P5.JS and then live coding of things like the snake game or space invaders&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://openprocessing.org/sketch/923164/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://openprocessing.org/sketch/923164/&lt;/a&gt; - I &lt;em&gt;believe&lt;/em&gt; this is processing/p5js&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://p5js.org/learn/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://p5js.org/learn/&lt;/a&gt; - there's a 3D section in here too&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Going this route also has the added benefit of extending deeper with more full-featured game engines like &lt;a href=&quot;https://phaser.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Phaser&lt;/a&gt; which is also in JavaScript.&lt;/p&gt;&#xA;" OwnerUserId="12663" LastActivityDate="2022-10-27T16:06:21.633" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7560" PostTypeId="1" CreationDate="2022-10-29T05:01:13.407" Score="4" ViewCount="186" Body="&lt;p&gt;I am looking for a good textbook to teach freshman (or some sophomores) introductory to software engineering.&#xA;Specially, need that the textbook has example labs/projects for the whole semester included in instructor resources. There are many good software engineering books but they do not have labs/project examples.&#xA;Since these students might not have adequate programming ability yet, I plan to focus on more abstract level assignments and do not expect them to code the projects.&#xA;The main purpose is to teach them how a software product could be developed and designed.&lt;/p&gt;&#xA;&lt;p&gt;So could anyone suggest a textbook of introductory software engineering that has abstract level level labs/projects ?&lt;br /&gt;&#xA;Labs/projects at abstract level using UML could be an option but hopefully, it cover only basic UML ideas/concepts since students might not have enough OOP concepts yet.&#xA;If so, could anyone also suggest simple UML reference books ? Thanks&lt;/p&gt;&#xA;" OwnerUserId="12670" LastActivityDate="2024-02-21T21:57:05.047" Title="Seek for textbook suggestions of introductory software engineering" Tags="|project|introductory-lesson|textbook|labs|" AnswerCount="2" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7562" PostTypeId="2" ParentId="7151" CreationDate="2022-11-05T04:35:07.947" Score="0" Body="&lt;p&gt;It's very likely that the most pragmatical approach is that you reach the employment and labor programs office &amp;quot;near&amp;quot; to you, I mean the one that could help you due to your nationality or place of residence. I'm afraid that in computer science field, it's very likely that they will point you to places sponsored by foundations linked to Industry leaders like Oracle, Microsft, Google. Hopefully there might be programs supported by public funds but they usually are pointed to the education system.&lt;/p&gt;&#xA;&lt;p&gt;I don't know how the initiative of having a compentency based system to develop a work force that meet the employeers requirements have reach employers and educators related to &lt;em&gt;computer science&lt;/em&gt;. This system have a competency framework used to structure a set of national standards for competency. Each competency standard set the competency assesment requirements  that include knowledge, skills and values.&lt;/p&gt;&#xA;&lt;p&gt;Several years ago the International Labor Organization, the United Nations and others promoted the creation of the above system. Unfortunately there isn't much about this in sites like Wikipedia, I have only found this article &lt;a href=&quot;https://en.wikipedia.org/wiki/Competence_(human_resources)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Competence (human resources)&lt;/a&gt;, and most of the search results that I have found are pdfs (very likely they are obsolete), point to old websites which the original content is not in English like &lt;a href=&quot;https://www.eccc.edu.pl/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.eccc.edu.pl/&lt;/a&gt; (European Digital Competence Certificate) or point to sites focused in other disciplines like Health Sciences.&lt;/p&gt;&#xA;" OwnerUserId="12659" LastEditorUserId="12659" LastEditDate="2022-11-05T04:41:49.670" LastActivityDate="2022-11-05T04:41:49.670" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7563" PostTypeId="2" ParentId="7455" CreationDate="2022-11-05T21:51:04.093" Score="1" Body="&lt;p&gt;I think that you should consider to split the &amp;quot;programming task&amp;quot; content and the other content that you want to manage according an appropriate mindset for each content type and their life cycle.&lt;/p&gt;&#xA;&lt;p&gt;One idea is to split them in&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;student work related files&lt;/em&gt; (most of the &amp;quot;programming tasks&amp;quot; content, I think),&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;instructional content&lt;/em&gt; (keep the instructions separate from the student work related files)&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;reference material&lt;/em&gt;,&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;assets associations&lt;/em&gt; (most of the tagging might be better to be managed of a specialized tool)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Something like the above will give you a balance between order and flexibility. Also it might give you a base to choose a &amp;quot;base tool&amp;quot; and extend it by using appropriate plugins / add-ons.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;Student Work Related Files&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I think that the &amp;quot;programming tasks&amp;quot; mainly include source files, code libraries, technical reference material. I imagine that most of these files might need to be copied by the students and you might want some of them being managed through a template engine so each student or student team will have their unique copy.&lt;/p&gt;&#xA;&lt;p&gt;You might need to update them frequently to make them effective based on the student cohort characteristics and the enviroment effects on them.&lt;/p&gt;&#xA;&lt;p&gt;You might want to generate the student copies when the lesson start, so you will be able to include the latest version or make &amp;quot;last minute&amp;quot; changes i.e. when the material is related to emerging technologies or looking to have a &amp;quot;state of the art&amp;quot; mood or due to students needs and environmental changes.&lt;/p&gt;&#xA;&lt;p&gt;You might want to tag these materials with very specific tags including metrics about their effectives as learning resources. A tool like GitHub might work very well, I think.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Instructional Content&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This refers mainly to the instructions for students. While it migth make sense to have this together with the work related files i.e. as a Readme.md, IHMO, this content requires educator mindset, i.e. you might need to share these with instructional designers and educative program managers that might know nothigh about GitHub and the specific technologies. This instructions will not change as frequently as the student work files. You might want to tag this content using certain educative framework / taxonomy that might not be as specific as the one used for the student work related files.&lt;/p&gt;&#xA;&lt;p&gt;This kind of content might have schedules related to the whole academic year cicle or program life cicle, i.e., each class should have a copy create at the begining of the the academic year cicle or intermediate terms.&lt;/p&gt;&#xA;&lt;p&gt;For this you might be better managed in a general CMS / LMS. It might be possible to use GitHub but it will require a different file structure and addition / update procedures than the student work related files.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Reference Material&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Past lecture recordings, other kind of videos, classic booksetc. These are resources that are added but not edited. This type of material could be on a CMS or even on a GitHub repo but more oriented to be used as a library, archive but it is very likely that it will be distributed rather than centralized in an unique place. The clasification usually will be done using someting more close to traditional library classification methodologies, problebly this should be done in next category.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Assests Association&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The point of managing this type of content by separate is to be able to organize your &amp;quot;heavie assets&amp;quot; (in other space / tools) without having to move them around frequently, including those that you are not able to move around at all.&lt;/p&gt;&#xA;&lt;p&gt;The &amp;quot;tradidional&amp;quot; way is to use links and back links. You might use a relational database having records for each of the other content types including their metadata and a related table with a pair of fields one for the type of link and another for the actual link.&lt;/p&gt;&#xA;&lt;p&gt;Another posibility is to play with &amp;quot;embedding&amp;quot;, &amp;quot;blending&amp;quot;, &amp;quot;knowledge graph&amp;quot;, &amp;quot;mind mapping&amp;quot; on a content delivery tool. For this you could use MS Teams maybe extended with some plug-ins / add-ons.&lt;/p&gt;&#xA;" OwnerUserId="12659" LastActivityDate="2022-11-05T21:51:04.093" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7564" PostTypeId="2" ParentId="7558" CreationDate="2022-11-07T03:20:45.450" Score="1" Body="&lt;p&gt;That is a great question that also bothers me sometimes. During my excavation on what to study to become a Blockchain developer I stumbled accros a fresh website that helped me learn all the necessary things to become one. The site is called: &lt;a href=&quot;https://roadmap.sh/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://roadmap.sh/&lt;/a&gt;, which is a site of &amp;quot;road maps&amp;quot; to learn about various topics.&lt;/p&gt;&#xA;" OwnerUserId="12695" LastEditorUserId="27" LastEditDate="2022-11-07T14:42:59.563" LastActivityDate="2022-11-07T14:42:59.563" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7565" PostTypeId="2" ParentId="7546" CreationDate="2022-11-10T06:37:54.643" Score="0" Body="&lt;p&gt;This isn't 3d, but a good next step for visual programming after scratch is Snap!. This is a more complex spin-off of Scratch, which adds more programming concepts to the same familiar style of visual language (such as local variables, functions, arguments, and return values)&lt;/p&gt;&#xA;&lt;p&gt;An alternative to this is to teach a text-based programming language with a simple 2d game canvas, such as Python and PyGame. This is another way to introduce more programming concepts, and this is more like the programming most programmers do.&lt;/p&gt;&#xA;&lt;p&gt;For 3d visual programming, there is Unreal Engine blueprints. Everything about 3d is more complex, and the unreal-engine visual scripting is going to have many many concepts foreign to a scratch programmer, but if the student is resourceful they can learn quite a bit from youtube tutorials.&lt;/p&gt;&#xA;" OwnerUserId="12705" LastActivityDate="2022-11-10T06:37:54.643" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7566" PostTypeId="2" ParentId="7527" CreationDate="2022-11-10T06:58:40.163" Score="2" Body="&lt;p&gt;In modern systems we have separated text processing into two levels.&lt;/p&gt;&#xA;&lt;p&gt;At the high-level, we deal with &amp;quot;strings&amp;quot;, which have an opaque underlying encoding. This is a useful place to teach things like sorting, searching, and find-replace. It could also involve regex, in some sort of lesson looking for patterns in text fragments.&lt;/p&gt;&#xA;&lt;p&gt;At the low-level, we have text-encodings, such as ASCII, UTF-8, UCS-2, etc. etc. I recommend avoiding this in any youth programming class, unless students are pushing for it, or you have a very specific text-processing task in mind. Character encodings (outside of ASCII) are very very complex, and have many dirty real world issues that are not suitable for students doing early programming education. They can learn this if they are doing advanced university research or paid programming.&lt;/p&gt;&#xA;" OwnerUserId="12705" LastActivityDate="2022-11-10T06:58:40.163" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7568" PostTypeId="1" AcceptedAnswerId="7571" CreationDate="2022-11-12T12:45:53.747" Score="4" ViewCount="85" Body="&lt;p&gt;The more experience I have in teaching CS the more I become convinced that one of the most difficult ideas to grasp for (beginner) students is that of &lt;em&gt;changing the inputs&lt;/em&gt; (if not the most difficult of all).&#xA;This is so trivial and basic for us that I think we struggle to understand what's so difficult in it, at least I do.&#xA;This point is what I call the algebraic aspect of computation, because, at a beginner level, it has something to do with the meaning of the dreaded &lt;code&gt;x&lt;/code&gt; in mathematics that so many students seem to fail to understand, which is to say, the idea of &lt;em&gt;variables&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In today's frustration I bring you the case of my students who, having nonetheless spent weeks copying and writing formulas in a spreadsheet, still persist in writing formulas without variables, even in cases where it's &amp;quot;just so obvious&amp;quot; that we want a result of a computation &lt;em&gt;with some data&lt;/em&gt;: they just read the data and write a constant in the formula. &lt;strong&gt;I can't understand the reasoning behind this: what, in their opinion, is the usefulness of writing such a formula?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;It became quite apparent observing them when doing it correctly that their only drive to use variables (cell references) is &lt;em&gt;&amp;quot;the teacher wants it so&amp;quot;&lt;/em&gt;: of course this means that they have no will whatsoever of doing it when I'm not watching.&lt;/p&gt;&#xA;&lt;p&gt;There's even another, so to say interesting, fact: when they need a small computation for themselves, they prefer going to their backpack, take out a calculator and doing it with maybe many calculation steps and often incur some errors and &lt;em&gt;doing it again maybe from the beginning because they lost the intermediate results&lt;/em&gt; instead of using 2 or 3 cells of the spreadsheet that they have ready in front of them.&#xA;Fully oblivious of the usefulness of the tool that we have studied for months.&lt;/p&gt;&#xA;&lt;p&gt;I know that this student behaviour is not new and I'm sure a lot of teachers have dealt with it.&lt;/p&gt;&#xA;&lt;p&gt;The main way I (desperately) try to make them aware of all this is by saying &lt;em&gt;and demonstrating with lots of examples&lt;/em&gt; that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We want it to work when we change data.&lt;/li&gt;&#xA;&lt;li&gt;We want to be able to use the same formula for many other cases (copy and make a long table).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;em&gt;But this seems highly ineffective&lt;/em&gt;: no connection with their inner drive, even when we beforehand state the computation that we're going to realize and see that it &lt;em&gt;naturally wants to be repeated in different cases&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It struck me recently that, in asking them a question of the kind &amp;quot;what's the result of such and such step of our computation&amp;quot; (we did a thing made of 3 steps: &lt;span class=&quot;math-container&quot;&gt;$f(g(h(x)))$&lt;/span&gt;) they wrote &amp;quot;7&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Again, fully oblivious of the fact that &amp;quot;the step&amp;quot; can and will be done with differing inputs (of course we had done it and saw it on the screen and remarked it many times).&lt;/p&gt;&#xA;&lt;p&gt;I'd like to ask if you can share your experience or intuitions about this issue, and if you have any suggestions.&#xA;Especially since it's so foundational that nothing can be done in computing without this awareness, besides of course they merely copying what I do or guessing what I want from them without having any clue about the meaning.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that the goal for the students in these classes is to learn to use a spreadsheet and, in the minds of those who have no idea who the students are, make some data analysis.&#xA;Keep in mind, moreover, that these students are not going to be scientists of any kind, the opposite: they are those that struggle a lot in understanding sentences in our own native language and make plenty of grammatical errors.&#xA;We talk about 14-15 years old who have no passion for studying and are there only because school is mandatory, struggling with mathematics and logic.&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2022-11-16T13:25:47.957" Title="The algebraic aspect of computation, or how to make them understand the usefulness and the meaning of variables" Tags="|variables|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7569" PostTypeId="1" CreationDate="2022-11-14T11:56:24.887" Score="2" ViewCount="60" Body="&lt;p&gt;I’m looking for solved and unsolved assignments of JavaScript to practice.&lt;/p&gt;&#xA;&lt;p&gt;My goals are both, practice javascript to learn to program as well as practice javascript to be able to design MERN applications and APIs. So, I need both fundamentals practice as well as advanced practice.&lt;/p&gt;&#xA;&lt;p&gt;I’ve heard about codewars, leetcode but there are probably thousands of questions there. Is there a curated list of like 100 problems only that cover most concepts?&lt;/p&gt;&#xA;&lt;p&gt;Is practicing Data structures and algorithms, numerical methods, computer graphics algorithms and Object oriented programming etc a good way to learn to program javascript?&lt;/p&gt;&#xA;&lt;p&gt;I’m looking to practice js in console as well as with User Interface(building small web apps).&lt;/p&gt;&#xA;&lt;p&gt;My research has got me this websites:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.jschallenger.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.jschallenger.com/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://exercism.org/tracks/javascript/exercises&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://exercism.org/tracks/javascript/exercises&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It should be noted that I already have programming experience in university, I just could not excel at it like my friend. eg: I still have trouble to make stars printing programs which used to be a common exercise in the past.&lt;/p&gt;&#xA;&lt;p&gt;I think programming fundamentals is all about looping so a practice material that helps me with looping concepts will be really helpful.&lt;/p&gt;&#xA;&lt;p&gt;These are the things that I wish to practice:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Rd1or.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Rd1or.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="12544" LastEditDate="2022-11-18T01:38:05.890" LastActivityDate="2022-11-18T01:38:05.890" Title="What are some resources to practice javascript while learning it?" Tags="|self-learning|programming|resource-request|exercises|javascript|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7570" PostTypeId="2" ParentId="7568" CreationDate="2022-11-14T15:00:09.593" Score="4" Body="&lt;p&gt;This isn't going to be limited to spreadsheet programming, but, more generally, to any sort of programming with mutable data. This excludes pure functional programming, but includes things like procedural programming and object-oriented programming, at least.&lt;/p&gt;&#xA;&lt;p&gt;The main issue, I think, is that the word &amp;quot;variable&amp;quot; is used in different senses when we program and in different senses in mathematics from which the programming terminology was evolved. I think the problem is most acute with younger students who are learning programming along with algebra rather than, say, calculus.&lt;/p&gt;&#xA;&lt;p&gt;Distinguish two cases: First is 0 = 2x * 8. Second is y = 2x * 8.&lt;/p&gt;&#xA;&lt;p&gt;In both of these the word &amp;quot;variable&amp;quot; is often used, though &amp;quot;unknown&amp;quot; might be used in either case, though more likely the first.&lt;/p&gt;&#xA;&lt;p&gt;But in the first case, x doesn't vary if the equation is to be true. There is only one value that makes it work. In quadratic equations there might be two values, but, still, fixed, though possibly unknown values.&lt;/p&gt;&#xA;&lt;p&gt;In the second case we are describing the functional relationship between two (or more, in more complicated examples) variables. So, we also write the second case as f(x) = 2x * 8, naming the relationship as &amp;quot;f&amp;quot;. But if you set a value for either x or y, the value(s) of the other is determined. It becomes fixed, not variable.&lt;/p&gt;&#xA;&lt;p&gt;I think you need to get over this hurdle with students before you are likely to resolve your difficulty. With many, a logical explanation might work, but I'm not sure all are yet sufficiently sophisticated to grok it. After all, their forebrains are still developing and with it their ability to think abstractly, though it develops rather quickly starting at that age.&lt;/p&gt;&#xA;&lt;p&gt;The other difficulty is that the notion of a &amp;quot;variable&amp;quot; is not consistent in programming. For some, it is a &amp;quot;box&amp;quot; into which you can put a &amp;quot;value&amp;quot;. And the value in the box is mutable. For others, a variable assignment is a &amp;quot;name&amp;quot; that you associate with a value. The latter is the case with functional programming, of course, but the former is often used in languages that have something like C or FORTRAN as an ancestor.&lt;/p&gt;&#xA;&lt;p&gt;I'm not certain how I can guide your students learning spreadsheets, since I don't know their backgrounds, but if they have some prior experience with C-like programming, they might have this confusion about the nature of a variable. I think, however, that you want them to think of a &amp;quot;variable&amp;quot; in the functional sense, not the &amp;quot;unknown&amp;quot; sense.&lt;/p&gt;&#xA;&lt;p&gt;And, with unsophisticated thinkers, a set of simple examples might work, at least initially, using the &amp;quot;box&amp;quot; with a value concept (though I don't like that idea generally). But, suppose you put a 5 in &amp;quot;this&amp;quot; box? What will show up in &amp;quot;that&amp;quot; box? Suppose it is a 9 instead? Thus, starting with a simple two cell &amp;quot;spreadsheet&amp;quot; might get them thinking as you'd like. Then, develop a more sophisticated model with one or more intermediate &amp;quot;boxes&amp;quot; related to other &amp;quot;boxes&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The development of abstraction capabilities in the young mind can't be overlooked, however. Psychologists tell us that it won't likely be fully developed until around 25 years old. There are some (well known) exceptions, of course, but the young mind needs a more sophisticated brain, which is developing in those years.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Let me add some additional advice since you say the students aren't particularly enthusiastic about the topic, but are required to take it. Perhaps you should evaluate your overall goals for student education and ask whether spreadsheets is the best vehicle for achieving them. Perhaps some other area of CS (or even math) would better meet their needs. It might even be that the very &amp;quot;concrete&amp;quot; visual representation in a spreadsheet is actually contributing to the issue. If the goal is to increase their abstraction capabilities then there might be a better vehicle.&lt;/p&gt;&#xA;&lt;p&gt;While recent spreadsheet programs are technically Turing Complete, I find them about as easy to program for complex tasks as I would a Turing Machine itself. I've known some who can do that, but I don't find it easy to conceptualize in that way.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-11-16T11:50:19.017" LastActivityDate="2022-11-16T11:50:19.017" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7571" PostTypeId="2" ParentId="7568" CreationDate="2022-11-14T22:48:23.147" Score="4" Body="&lt;p&gt;I love Buffy's answer!&lt;/p&gt;&#xA;&lt;p&gt;On a very practical level, though, I suspect that they won't convert over to using formulas until it makes their lives significantly easier.  Using lots of rows of data along with drag-downs is an easy way to accomplish this.&lt;/p&gt;&#xA;&lt;p&gt;You can use fake data as long as you make it plausible, and then it can be fun.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Here are some statistics for 350 heavy players of &amp;quot;Call of Duty: Warzone&amp;quot;, &amp;quot;Animal Crossings: New Horizons&amp;quot;, and &amp;quot;Among Us&amp;quot;.  We need to figure out who the top 5 overall players are.  First, we have to figure out an &lt;em&gt;adjusted score&lt;/em&gt; for each game, since the scores don't compare in any obvious way across games.  Then, we'll need to create rankings.  Then we'll have to average performance across the three games to figure out who is best.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;... it's not a perfect example, but it is something that would be basically impossible to do without using cell references.&lt;/p&gt;&#xA;&lt;p&gt;Anything with several columns and many rows of data will do, and the more fun the data itself is, the more fun the class will have if they're not naturally motivated by the topic itself.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-11-16T13:25:47.957" LastActivityDate="2022-11-16T13:25:47.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7572" PostTypeId="1" AcceptedAnswerId="7645" CreationDate="2022-11-16T00:49:57.440" Score="1" ViewCount="284" Body="&lt;p&gt;Besides the 2 mathematicians quoted below and me, who else has touted free dissemination &lt;em&gt;&lt;strong&gt;to students&lt;/strong&gt;&lt;/em&gt; of detailed solutions, to EVERY exercise and problem (like in textbooks)? I uphold this wholeheartedly! This free dissemination ought to be the norm!&lt;/p&gt;&#xA;&lt;p&gt;I do NOT refer to snippety one-line answers at the back of a textbook, student solution manuals that solve merely some or half of the exercises, or solution manuals  restricted to instructors.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Robert  Ash (1935-2015), &lt;a href=&quot;https://faculty.math.illinois.edu/%7Er-ash/RV/RVPreface.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Preface&lt;/a&gt; to &lt;a href=&quot;https://faculty.math.illinois.edu/%7Er-ash/RV.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;em&gt;Real Variables with Basic Metric Space Topology&lt;/em&gt;&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I rely especially on one of the most useful of all learning devices: the inclusion of detailed solutions to exercises. Solutions to problems are commonplace in elementary texts but quite rare (although equally valuable) at the upper division undergraduate and graduate level. This feature makes the&#xA;book suitable for independent study, and further widens the audience.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;David Patrick, &lt;em&gt;Introduction to Counting and Probability&lt;/em&gt; (2005), page v.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;However,&#xA;if you are using this book on your own to learn independently, then you probably have a copy of the&#xA;solution book, in which case there are some very important things to keep in mind:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure that you make a serious attempt at the problem before looking at the solution. Don't&#xA;use the solution book as a crutch to avoid really thinking about a problem first. You should think&#xA;&lt;em&gt;hard&lt;/em&gt; about a problem before deciding to give up and look at the solution.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;After you solve a problem, it's usually a good idea to read the solution, even if you think you know&#xA;how to solve the problem. The solution that's in the solution book might show you a quicker or&#xA;more concise way to solve the problem, or it might have a completely different solution method&#xA;that you might not have thought of. [emboldening mine]&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you have to look at the solution in order to solve a problem, make sure that you make a note of&#xA;that problem. Come back to it in a week or two to make sure that you are able to solve it on your&#xA;own, without resorting to the solution.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="12719" LastEditorUserId="27" LastEditDate="2022-11-16T13:31:27.857" LastActivityDate="2023-02-22T10:55:13.977" Title="What computer scientists have advocated for freely publicizing detailed solutions, to every exercise?" Tags="|exercises|" AnswerCount="3" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7574" PostTypeId="1" CreationDate="2022-11-20T16:34:19.530" Score="2" ViewCount="534" Body="&lt;p&gt;The title uses the phrase “get into”, though it have broad connotations yet all I meant by that was simply entering into the field of CS for formal job opportunities.&lt;/p&gt;&#xA;&lt;p&gt;I have a decent knowledge of Bachelors level of Mathematics, but I lack any B.S. or B.Sc. degree in Mathematics. After completing my school, I enrolled in a college for Bachelor of Arts and I shall be completing it this academic year. During these 2 and a half years I was studying Mathematics by self. My subjects in B.A. are: Political Science, Economics, Sociology. Mathematics, Political Science and Sociology offers very little job opportunities, as far as I have found. By seeing this world, I got this belief that due to globalisation and ubiquitous nature of Computers, no one can find himself jobless if he has any &lt;strong&gt;degree&lt;/strong&gt; in CS (I’m not sure if knowledge alone is helpful, because it is not in my country).&lt;/p&gt;&#xA;&lt;p&gt;I would like to make transition from Mathematics to Computer Science, but I don’t know the way. I have tried looking up the various fields of CS and found that we can broadly classify them as under:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Developers&lt;/li&gt;&#xA;&lt;li&gt;Security&lt;/li&gt;&#xA;&lt;li&gt;Data Analysis&lt;/li&gt;&#xA;&lt;li&gt;Theoretical Computer Science&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Most of the courses in CS make people a developer or a data analyst, and a relatively less number of people go in security field (these are my findings, and they maybe not completely right). Theoretical Computer Science seems more like “the one less travelled by”.&lt;/p&gt;&#xA;&lt;p&gt;I’m no longer 15 or 16 years old that I can simply pick up any of thousands of resources available teaching Python or C++. I have already given my 2.5 years to B.A., and 6 months more to give. I cannot afford to do any course in college for more than two years after this.&lt;/p&gt;&#xA;&lt;p&gt;I was thinking as I have Economics as one of the subjects in my B.A., I should &lt;em&gt;augment&lt;/em&gt; (if something like that is possible) it with Computer Science. Maths might take me &lt;em&gt;into&lt;/em&gt; Computer Science and then I shall use it in the field of Economics. As per my knowledge, only financial institutions (like stock markets) seem to be using CS.&lt;/p&gt;&#xA;&lt;p&gt;The users in their replies can assume that the OP is not restricted to national boundaries and may opt for international colleges/jobs too.&lt;/p&gt;&#xA;" OwnerUserId="12737" LastActivityDate="2022-11-24T19:37:41.840" Title="How to get into Computer Science from Mathematics background for opening job opportunities?" Tags="|self-learning|mathematics|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7575" PostTypeId="2" ParentId="7574" CreationDate="2022-11-20T21:26:13.047" Score="4" Body="&lt;p&gt;The one thing you don't mention is programming. You need to be a competent programmer to go very far in CS. You probably need more than one language, say an OO language (java, python) and another, either more procedural (C) or functional (Scheme, ML). Different languages require a different mind-set so start with one and get competent in it.&lt;/p&gt;&#xA;&lt;p&gt;The best way, after some initial study is to do some project that is large and defined by someone else. Perhaps you can find descriptions of &amp;quot;term projects&amp;quot; in books or online.&lt;/p&gt;&#xA;&lt;p&gt;Once you have programming skills you want to gain competence in data structures and algorithms. There are a lot of good books on this. This is a fairly mathematical study.&lt;/p&gt;&#xA;&lt;p&gt;A good fusion book, combining the above, but useful after you've studied both is &lt;em&gt;The Science of Programming&lt;/em&gt; by David Gries, which is old, but still relevant. It is more in the procedural family, but combines ideas of programming and data structures.&lt;/p&gt;&#xA;&lt;p&gt;For the rest, find a good department of CS somewhere and look at what they have online about their curriculum. The required undergraduate courses give a good basis as an outline of further study even if you do it on your own. Some will list required text books.&lt;/p&gt;&#xA;&lt;p&gt;The hardest part of self study is getting feedback on your efforts. It is one thing to do a lot of exercises from textbooks, but it is another to assure that you have gathered the right insights and don't have misconceptions.&lt;/p&gt;&#xA;&lt;p&gt;As for your list of areas for a career, note that Theoretical CS is mostly an academic area requiring a doctorate for entry. The others are practiced in some large companies (Google, IBM, Oracle, ...), but theoreticians are a bit rare there.&lt;/p&gt;&#xA;&lt;p&gt;Note also, that with a bachelor's degree, even in a different field, you can possibly get in to a funded doctoral program that will pay all fees and provide a living stipend if you have a frugal lifestyle.&lt;/p&gt;&#xA;&lt;p&gt;Note that Software Engineering is related to CS, not quite the same, and more amenable to a non-academic career. You can find curricula for SE online, just as for CS. Software Engineering includes things like Human Factors.&lt;/p&gt;&#xA;&lt;p&gt;Higher level math is a bit harder to follow on your own, as insight is much more subtle there with feedback likely more important for most people.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-11-20T21:52:02.217" LastActivityDate="2022-11-20T21:52:02.217" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7577" PostTypeId="2" ParentId="7572" CreationDate="2022-11-21T19:26:37.390" Score="5" Body="&lt;p&gt;I'm against publishing answers to exercises. Credentials: I'm in the situation that I have several textbooks to my name, all of which have exercises with not-published solutions. (Only if an instructor mails me, from an &lt;code&gt;.edu&lt;/code&gt; address, and with promises of confidentiality, I will send them the solutions manual. Maybe.)&lt;/p&gt;&#xA;&lt;p&gt;I teach from my textbooks multiple times. So I'd like to assign exercises this year, and again next year, maybe with a minor tweak. I can not do that if the answers are out in the wild.&lt;/p&gt;&#xA;&lt;p&gt;Designing good exercises is hard! I do not have the time to come up with a dozen (number of weeks in a typical semester) brand-new problems every time I teach my courses.&lt;/p&gt;&#xA;&lt;p&gt;So what do I give students after they have been graded? I discuss their submissions, point out what's good, and what they missed. But I still don't give them full worked-out solutions.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-11-21T19:26:37.390" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7578" PostTypeId="2" ParentId="544" CreationDate="2022-11-23T13:48:06.277" Score="1" Body="&lt;p&gt;An interface is an artifact that exists between two or more abstractions. It states &lt;em&gt;what&lt;/em&gt; capabilities a given abstraction has to offer its users. It does not say &lt;em&gt;how&lt;/em&gt;. The &lt;em&gt;what&lt;/em&gt; part is an interface, and the &lt;em&gt;how&lt;/em&gt; part is the implementation. &lt;a href=&quot;https://blog.pragmaticengineer.com/a-philosophy-of-software-design-review/&quot; rel=&quot;nofollow noreferrer&quot;&gt;A good interface is deep&lt;/a&gt; (the implementation has much more volume than the interface). Its a characteristic that makes it similar to a physical contract.&lt;/p&gt;&#xA;&lt;p&gt;How does it correspond to an interface? You sign a six-page-long contract - that corresponds to a proportionally small interface of your abstraction. Then you provide your service or a product - that corresponds to a proportionally deep implementation hiding a lot of domain, and contract-specific complexity. The contract not only enforces mutual obligations but also gives you (as a service provider) a lot of freedom in execution, as long as you don’t breach the terms, and meet the essential KPIs.&lt;/p&gt;&#xA;&lt;p&gt;As real-life contract - an interface is a basis for collaboration. I've written more about the topic &lt;a href=&quot;https://medium.com/p/575553dcb6a2&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="12730" LastActivityDate="2022-11-23T13:48:06.277" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7579" PostTypeId="2" ParentId="7574" CreationDate="2022-11-24T19:37:41.840" Score="1" Body="&lt;p&gt;You can complete your current degree and go into the online post-bacc program at Boulder for 1-1/2 years for another BS. Or you could transfer to Oregon State's online BS program in CS. Its course choice is broader. Many people go a cheaper route and apply to Georgia Tech's online MS program, but the workload is steep, so if you're still slow at debugging, completion would be difficult. It's difficult enough for those with comp sci degrees.&lt;/p&gt;&#xA;&lt;p&gt;Online programs in Europe would be cheaper than OSU/Boulder. I haven't looked into them and so can't comment beyond the difference in expense. Avoid SNHU. Cheap but the instruction is erratic. Not a respected degree (ranks outside of top 200).&lt;/p&gt;&#xA;&lt;p&gt;Graduating from your current program and then earning an online graduate certificate might be an option too.&lt;/p&gt;&#xA;" OwnerUserId="12332" LastActivityDate="2022-11-24T19:37:41.840" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7580" PostTypeId="1" CreationDate="2022-11-25T23:55:55.337" Score="4" ViewCount="59" Body="&lt;p&gt;I teach an algorithmics course at a level equivalent to first year of college. I discovered &lt;a href=&quot;https://www.tice-education.fr/index.php/tous-les-articles-er-ressources/articles-informatiques/582-larp-logiciel-dalgorithmes-et-de-resolution-de-problemes&quot; rel=&quot;nofollow noreferrer&quot;&gt;LARP&lt;/a&gt; (sorry it's in french), a software that allows to draw organigrams, run them, debug them step by step and even generate pseudo-code from the organigram.&lt;/p&gt;&#xA;&lt;p&gt;It is great as a first introduction to thinking logically without the burden of the syntax. Yet it's runnable, so they can easily catch mistakes.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately it looks like it hasn't been maintained for a while. It doesn't run on Linux (with wine) and isn't open source, therefore I can't update it myself.&lt;/p&gt;&#xA;&lt;p&gt;I am looking for an alternative that would allow the same basic features, but that would run on windows, Linux and mac. Bonus point if it's a free software.&lt;/p&gt;&#xA;" OwnerUserId="12793" LastEditorUserId="104" LastEditDate="2022-11-26T01:38:12.570" LastActivityDate="2022-12-26T02:18:26.870" Title="Software for runnable algorithmic organigrams" Tags="|resource-request|algorithms|computational-thinking|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7581" PostTypeId="2" ParentId="7580" CreationDate="2022-11-26T01:44:08.817" Score="2" Body="&lt;p&gt;I don't know of a visual-oriented tool anything like LARP, which looks very interesting. If you're unable to find a replacement for that, perhaps you could move up one level of abstraction and work with something which appears to use a pseudo-code input, with most of the supporting code automated. Multi-OS, free, OSS, GPL license. Oh, yea, it's also in French and aimed at French educational standards.&#xA;&lt;a href=&quot;https://www.xm1math.net/algobox/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.xm1math.net/algobox/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2022-11-26T01:44:08.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7583" PostTypeId="1" AcceptedAnswerId="7584" CreationDate="2022-11-27T17:42:32.137" Score="1" ViewCount="130" Body="&lt;p&gt;I spent some years only learning C++ from online websites and YouTube videos. I went over basic stuff like variables, functions, pointers, references, and so on, as well as OOP concepts like classes, operator overloading, inheritance, virtual functions, and so on, and I did some template exercises. But every time I move on to the next topic, I find myself forgetting what I learned before. Then I noticed that I needed to make software that covered all those C++ concepts (I know some programmers may have gone through this and decided to do what I'm going to do now).&lt;/p&gt;&#xA;&lt;p&gt;I'd like to know if there is such a thing as minimal software designed to cover most of the C++ concepts that work together, and it must be small software;  (not writing an operating system). I know this question sounds strange, but I'm going to give it a try and just want to gain some time if someone has done this before. Thank you all; I may be lucky if someone there designed such a thing.&lt;/p&gt;&#xA;" OwnerUserId="12796" LastActivityDate="2022-12-10T10:07:33.350" Title="Small software that covers most c++ core concepts?" Tags="|c++|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7584" PostTypeId="2" ParentId="7583" CreationDate="2022-11-28T21:19:06.150" Score="2" Body="&lt;p&gt;I've written a C++ (and Fortran2008) textbook for an engineering audience. In addition to teaching the things that I think they should know, it has a good number of programming projects that are designed to exercise their C++ skills. &lt;a href=&quot;https://theartofhpc.com/isp.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://theartofhpc.com/isp.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2022-11-28T21:19:06.150" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7585" PostTypeId="1" CreationDate="2022-12-02T19:38:54.223" Score="5" ViewCount="155" Body="&lt;p&gt;I teach a middle school coding course. We have done a very basic python introduction. For their first project, they wrote and coded their own MadLibs. For the upcoming project, they are going to choose from a list of projects using variables, numbers, and operators (mostly basic calculators, tip calculator, etc.).&lt;/p&gt;&#xA;&lt;p&gt;The issue comes in that I have one student who has a concussion and limited screen time making it impossible for them to complete this project by the end of the quarter. Does anyone have any ideas for an unplugged project that would parallel what the others are working on?&lt;/p&gt;&#xA;&lt;p&gt;UPDATE: I ended up doubling the work for the project (create two projects instead of one) and letting the students work in partners. That way she could assist in the actual coding and work on paper for everything else instead of having to be solely responsible for the computer code. I believe the student is also going to save some of their limited screen time for my class to help get the project done. Thanks everyone!&lt;/p&gt;&#xA;" OwnerUserId="12819" LastEditorUserId="12819" LastEditDate="2022-12-08T14:22:54.653" LastActivityDate="2024-01-28T22:01:20.160" Title="Unplugged Project Idea" Tags="|resource-request|project|python|differentiation|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7586" PostTypeId="2" ParentId="7583" CreationDate="2022-12-10T10:07:33.350" Score="0" Body="&lt;h1&gt;Why your are struggling&lt;/h1&gt;&#xA;&lt;p&gt;C++ is hard, very hard. C++ is 10 times bigger than C (this was true 10 years ago when C++ was a lot smaller). It is very hard to learn, and very hard to use even after you have learnt it.&lt;/p&gt;&#xA;&lt;p&gt;When I programmed it C++, I found it faster to first write the program in another language, then translate it manually into C++. (not just compared with my self, this made me faster than others in the team).&lt;/p&gt;&#xA;&lt;p&gt;It is better to separate learning to program from learning the language. There are examples of teachers teaching one language, then at the end of the course, teaching how to translate into C++ and 2 or 3 other languages. This was done more quickly and more successfully that taking the shorter route and teaching C++ direct.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, learn all of these concepts in a language that is much much easier to learn. Then if need it learn the language.&lt;/p&gt;&#xA;&lt;h1&gt;Some suggestions&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scratch (first language)&lt;/li&gt;&#xA;&lt;li&gt;Berkeley snap (1st or 2nd language, depending)&lt;/li&gt;&#xA;&lt;li&gt;Python (used my many schools, but not perfect) (used by real programmers)&lt;/li&gt;&#xA;&lt;li&gt;Lisp (A very simple language, can learn in a few minutes, so you can focus on learning to program) (use the resource design and interpretation of computer programs — available in book and video form)&lt;/li&gt;&#xA;&lt;li&gt;Rust (Fastest growing language by use. It makes C++ obsolete. It was designed to be fast, but also safe, and easy to use compared to fast low-level languages)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2022-12-10T10:07:33.350" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7587" PostTypeId="2" ParentId="5947" CreationDate="2022-12-13T18:51:40.007" Score="0" Body="&lt;p&gt;I would recommend starting by writing versions of classic games, like space invaders, asteroid or centipede, without using a games engine, just some library like &lt;a href=&quot;https://www.libsdl.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;SDL&lt;/a&gt; that allows you to get things on the screen relatively easily.  That was you will see the parts of the game where good data structures and algorithms and maths (and to a lesser extent coding tricks) that you need to write efficient code.  It will teach you a lot more than using games engines written by others.  It is also more rewarding as you will have written a larger proportion of the game yourself.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-12-13T18:51:40.007" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7588" PostTypeId="2" ParentId="7572" CreationDate="2022-12-13T19:16:55.787" Score="2" Body="&lt;p&gt;In a world with ChatGPT and other similar tools, publishing detailed solutions to all exercises and problems will lead to a world where there is no problem that can be set where the student can't get ChatGPT to give them the answer (and explanation).  The only way to avoid that is likely to be to set abstruse exercises that are hard to understand, hard for students to grasp, and of low educational value.&lt;/p&gt;&#xA;&lt;p&gt;At the end of the day, there are skills, such as maths and programming that you can only really learn or be good at by doing them for yourself.  Looking at worked solutions is a bit like going to the gym and watching someone else pump iron.  It will teach you how to use the gym equipment, but it won't make you any stronger.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2022-12-13T19:16:55.787" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7589" PostTypeId="1" CreationDate="2022-12-20T10:39:42.887" Score="1" ViewCount="70" Body="&lt;p&gt;Is there a book or online course teaching basic logic and simple logic circuits via the Redstone mechanic in the game Minecraft? Similar to Nand2Tetris, but simpler and with a younger target demographic (motivated 12-14 year olds). Think starting with binary number representation, continuing with logic gates, simple circuits like ripple carry adder etc.&lt;/p&gt;&#xA;" OwnerUserId="12873" LastActivityDate="2024-01-28T19:06:50.760" Title="Book / Course Teaching Basic Logic Circuits Via Minecraft Redstone To A Young Target Demographic" Tags="|secondary-education|primary-school|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7591" PostTypeId="1" CreationDate="2022-12-21T04:27:48.210" Score="0" ViewCount="25" Body="&lt;p&gt;I am trying to source for PC parts for a hands-on workshop. The goal is for students to learn how to assemble the main components of a PC into a desktop casing.&#xA;Due to the limited duration of the workshop (60 minutes) I am looking for parts that easily slot into a casing ... very much like a LEGO set.&#xA;Do you know of a place online I can purchase such a basic set of PC parts.&#xA;My alternative is to source regular PC parts but I was wondering if there is such a learning set out there for children.&#xA;Thank you.&lt;/p&gt;&#xA;" OwnerUserId="12877" LastActivityDate="2022-12-21T04:27:48.210" Title="Sourcing PC parts for a hands-on workshop" Tags="|hardware|" AnswerCount="0" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7592" PostTypeId="2" ParentId="7580" CreationDate="2022-12-26T02:18:26.870" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://sourceforge.net/projects/pseint/&quot; rel=&quot;nofollow noreferrer&quot;&gt;PseInt&lt;/a&gt; may help, it is placed in Sourceforge.net&#xA;Check some screenshots&#xA;&lt;a href=&quot;https://i.stack.imgur.com/m313l.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/m313l.png&quot; alt=&quot;code and flowchart&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/Ykd77.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Ykd77.png&quot; alt=&quot;flowchart classic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/OI9gq.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/OI9gq.png&quot; alt=&quot;flowchart nassi-shneiderman&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9368" LastActivityDate="2022-12-26T02:18:26.870" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7593" PostTypeId="1" AcceptedAnswerId="7595" CreationDate="2022-12-26T10:50:33.877" Score="2" ViewCount="150" Body="&lt;p&gt;I've just been prompted to think about this by reading this dated question: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/6459/jackson-based-ide-for-programming&quot;&gt;Jackson based IDE for programming&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;But the issue had already been on my mind recently.&lt;/p&gt;&#xA;&lt;p&gt;Why do attempts at &amp;quot;visual designers&amp;quot;, visual programming, and diagrammatic representations of programs persist?&lt;/p&gt;&#xA;&lt;p&gt;I'm not talking about ad-hoc diagrams for human consumption, either to explain concepts or to supplement something that is found to be difficult to express in a particular programming language.&lt;/p&gt;&#xA;&lt;p&gt;I mean visuals and diagrams that are systematic in some way, and which attempt to cover the same ground as written programming languages. A systematic approach which basically starts from the idea that &lt;em&gt;everything&lt;/em&gt; is difficult to express in a written programming language, and therefore a visual method should be used instead.&lt;/p&gt;&#xA;&lt;p&gt;It seems to me there have been a variety of schemes over many decades now, and all eventually seem to fall by the wayside.&lt;/p&gt;&#xA;&lt;p&gt;Untrained novices seem not to be automatically drawn to such diagrammatic representations, and experts tend to shun them either as simplistic or as obscuring.&lt;/p&gt;&#xA;&lt;p&gt;But they are often advocated for as something that somehow makes things easier - either for novices or for experienced practitioners.&lt;/p&gt;&#xA;&lt;p&gt;What are the views and experiences of educators on the effectiveness of &amp;quot;visual programming languages&amp;quot;, either as teaching aids or as something that really helps productivity?&lt;/p&gt;&#xA;" OwnerUserId="9075" LastEditorUserId="204" LastEditDate="2022-12-28T14:33:36.207" LastActivityDate="2023-02-08T09:21:39.217" Title="Why visual program design?" Tags="|programming|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7594" PostTypeId="2" ParentId="7593" CreationDate="2022-12-26T23:14:29.830" Score="1" Body="&lt;p&gt;Probably the closest modern thing to what you want is UML (Unified Modeling Language). Lots of object oriented design gets expressed in formal or informal UML and there are a lot of tools for creating them. A google search for &amp;quot;object oriented diagramming&amp;quot; will turn up several options.&lt;/p&gt;&#xA;&lt;p&gt;Flow charts went out of vogue a long time ago, along with common (all?) use of goto statements. The problem with both is that there are too many degrees of freedom with them, leading to a tendency toward short term solutions (quick &amp;amp; dirty) where long term software reliability and maintainability is required.&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&quot;https://en.wikipedia.org/wiki/Goto#Criticism&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia for goto criticism&lt;/a&gt;. David Gries (Cornell prof and important author) always referred to flow charts as &amp;quot;flaw charts&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;It is too easy, with the old tools, to put bugs in and too hard to get them out.&lt;/p&gt;&#xA;&lt;p&gt;I've built some pretty sophisticated stuff with OO (Java, Python, Ruby) but very simplified UML was always enough. Just enough to show the relationships between important modules.&lt;/p&gt;&#xA;&lt;p&gt;A programming environment that integrates Java programming with simplified UML is &lt;a href=&quot;https://bluej.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;bluej&lt;/a&gt;. The site also includes many programming projects for beginners.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2022-12-26T23:23:22.313" LastActivityDate="2022-12-26T23:23:22.313" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7595" PostTypeId="2" ParentId="7593" CreationDate="2022-12-27T03:12:29.797" Score="2" Body="&lt;p&gt;I'm an advocate for limited use of visual programming.  First, for elementary and middle school kids, languages like Scratch (or variations, such as is used by Lego robotics) seem to work well.&lt;/p&gt;&#xA;&lt;p&gt;I have no quantitative data, but I have taught it myself to middle school students, and I speak to a LOT of computer science teachers during the course of my duties, so I have some comfort in the assertion that it helps at these lower levels.&lt;/p&gt;&#xA;&lt;p&gt;Second, there is a reason that devices like FSMs are traditionally diagram-based: they are extremely hard to flow when provided as text.  So areas that traditionally use FSMs, such as animation controllers in Unity, naturally wind up in the visual programming sphere, sometimes augmented just a bit with written programming.&lt;/p&gt;&#xA;&lt;p&gt;Finally, there are other environments where visual programming has entered the professional sphere, such as Blueprints in Unreal.  They provide limited functionality, but the functionality they provide is a very useful subset, and (take this next with a grain of salt, I have used Unity but never Unreal) allow game designers to do more substantial work without having to ping the developers constantly.&lt;/p&gt;&#xA;&lt;p&gt;It's hard for me to imagine that we, as highly visual AND highly verbal creatures, would uniformly find that either written programming or visual programming is always a better approach.  We are excellent and processing information in both spheres, with somewhat different strengths in each.  I would actually expect that, given the ideal circumstances, we would most naturally gravitate towards a combination of the two, such as the two major game engines have done.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2022-12-28T04:51:51.800" LastActivityDate="2022-12-28T04:51:51.800" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7596" PostTypeId="2" ParentId="7593" CreationDate="2022-12-27T21:00:03.823" Score="1" Body="&lt;p&gt;Christopher Alexander (the [building] architect and author of the first pattern language book), has stated that words are much better than diagrams when expressing what is wanted in a design. Diagrams always accidentally specify arbitrary things. E.g it is impossible to show a straight line without giving its length. But with words we can say “straight line”. With the diagram we can draw the line, but have to add the words “not to scale”. The words alone are simpler.&lt;/p&gt;&#xA;&lt;p&gt;Visual programming can however be useful as a way to teach programming. See &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Scratch from MIT&lt;/a&gt; for young kids, &lt;a href=&quot;https://snap.berkeley.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Snap from Berkeley&lt;/a&gt;, or many of their derivatives.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2022-12-27T21:06:58.373" LastActivityDate="2022-12-27T21:06:58.373" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7597" PostTypeId="2" ParentId="544" CreationDate="2022-12-28T19:43:20.373" Score="1" Body="&lt;p&gt;If I were asked to describe how a pin-and-tumbler lock works - the kind of lock most of the developed world have on their front doors - I cannot imagine that the word &amp;quot;contract&amp;quot; would find its way into the explanation.&lt;/p&gt;&#xA;&lt;p&gt;This is despite the fact that, if you squint really hard, the relationship between the key (on the one hand) and the keyway and pins (on the other hand) does involve some kind of match, and the existence of the lock and key does in some sense govern the relationship between householder and strangers.&lt;/p&gt;&#xA;&lt;p&gt;There's probably already a number of people who have no ready idea how pin-and-tumbler locks work to understand this analogy, and many more who would wonder where on Earth I pulled this from.&lt;/p&gt;&#xA;&lt;p&gt;Likewise, many middle-age adults (let alone high school students) would have no clear idea what a &amp;quot;contract&amp;quot; even is, beyond some kind of lengthy document written in small print, that some corporation imposes on you as part of ordinary and necessary daily dealings &lt;em&gt;in order to evade their legal liabilities&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Even if you ask a lawyer, they'd say a contract involves offer and acceptance, consideration on both sides, an intention to enter legal relations, and so on.&lt;/p&gt;&#xA;&lt;p&gt;Does any of this seem to have the remotest connection to defining an &amp;quot;interface&amp;quot; in an OO programming language? I would say not.&lt;/p&gt;&#xA;&lt;p&gt;I think that OO programming is actually very complicated to explain, both in computer science terms, and in terms of a certain philosophy or ideology that is associated with &amp;quot;pure&amp;quot; OO programming.&lt;/p&gt;&#xA;&lt;p&gt;To add to the hassle, mainstream programming languages are a muddied synthesis of both OO concepts and non-OO concepts (with the non-OO concepts being something that don't reconcile with the OO concepts), and the most compelling demonstrations of the capabilities of OO programming involve software development being done at quite some scale with a division of labour (which is at odds with how most young programmers practice coding, which is as a solitary activity, and at odds with their industrial experience, which is zero).&lt;/p&gt;&#xA;&lt;p&gt;Quite frankly, I would not even try to teach interfaces to high school students in terms of abstract concepts - unless you're dealing with a classroom of savants.&lt;/p&gt;&#xA;&lt;p&gt;I would either just declare the concept to be something that is advanced beyond the level of your course, or I would demonstrate some practical examples of how interfaces can be used, without trying to explain their conceptual nature in a generalised fashion.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2022-12-28T19:43:20.373" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7598" PostTypeId="1" AcceptedAnswerId="7606" CreationDate="2023-01-02T06:29:00.923" Score="3" ViewCount="205" Body="&lt;p&gt;My background:&#xA;I have completed courses in HTML, CSS, Bootstrap and JavaScript and I can read and write code in these languages.&lt;/p&gt;&#xA;&lt;p&gt;I want to learn React and I want to build frontends of websites.&lt;/p&gt;&#xA;&lt;p&gt;What's the best way to learn React for my case? Which books, courses and tutorials are recommendend? Which projects are recommended?&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="9426" LastEditDate="2023-01-06T09:32:38.787" LastActivityDate="2023-03-17T14:28:43.713" Title="How to learn React JS?" Tags="|self-learning|javascript|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7599" PostTypeId="2" ParentId="7379" CreationDate="2023-01-02T14:22:14.850" Score="2" Body="&lt;p&gt;I don't, because when I grade a programming assignment, then I have a checklist of things I expect the student to understand. I grade the assignment by giving points about whether or not the student has demonstrated understanding of that concept. Here is one from my last test:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Demonstrated understanding of program input (2 points)&lt;/li&gt;&#xA;&lt;li&gt;Demonstrated understanding of variables (2 points)&lt;/li&gt;&#xA;&lt;li&gt;Demonstrated understanding of loops (2 points)&lt;/li&gt;&#xA;&lt;li&gt;Demonstrated understanding of branches (2 points)&lt;/li&gt;&#xA;&lt;li&gt;Able to implement a simple algorithm according to specification (4 points)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;One student didn't remember exactly how to write a loop in that programming language, so they couldn't get the program to compile. Which means no points for understanding loops. And I wasn't sure that what they thought how loops work would have resulted in the correct algorithm. So I could not award them those points either.&lt;/p&gt;&#xA;&lt;p&gt;But what they &lt;strong&gt;had&lt;/strong&gt; demonstrated was that they understood how to receive user input, how variables work and how branches work. So I awarded them 6/12 points.&lt;/p&gt;&#xA;" OwnerUserId="1577" LastActivityDate="2023-01-02T14:22:14.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7600" PostTypeId="2" ParentId="544" CreationDate="2023-01-03T08:27:07.110" Score="0" Body="&lt;p&gt;Rather than thinking of motivating examples, I prefer to teach it from the perspective of polymorphism.  The mechanism of polymorphism &lt;strong&gt;requires&lt;/strong&gt; an object referenced by a reference of the interface type to have a valid implementation of the method (and implementing the interface allows the compiler to enforce that requirement).  So rather than teaching it as being merely a contract, I teach it as being part of a key mechanism in the Java programming language.  I think it is important that students learn the underlying logic of a programming language and I think it is better to teach the principles rather than just presenting lots of examples and hoping the students will infer the mechanism for themselves (some will, some won't).  Of course you need examples as well, to show the cool stuff you can do with the mechanism.&lt;/p&gt;&#xA;&lt;p&gt;Of course this isn't the only use for interfaces, but it explains &lt;em&gt;why&lt;/em&gt; the interface enforces a contract of sorts.  Those other uses can be explained later, and when you do, the students will already understand that implementing an interface enforces a contract, so they can focus on the new use, rather than the mechanism.&lt;/p&gt;&#xA;" OwnerUserId="11932" LastActivityDate="2023-01-03T08:27:07.110" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7601" PostTypeId="2" ParentId="7589" CreationDate="2023-01-03T17:48:46.287" Score="0" Body="&lt;p&gt;Well, here is what i will do.&lt;/p&gt;&#xA;&lt;p&gt;I won't start with a topic like logic gates,  as i believe that there are some prerequisites you need to be familiar with to grasp it, so:&lt;/p&gt;&#xA;&lt;p&gt;Before starting with any course, or textbook, i'd sit down and talk to him. Straight like that, i'd explain what is a system, that not everything works using the system taught, and introduce him to binary numbers.&lt;/p&gt;&#xA;&lt;p&gt;After that, i'd teach basic electric circuits, Ohm's law, KCL and KVL.&lt;/p&gt;&#xA;&lt;p&gt;Then, when he is ready to attack logic gates, i'd explain what a logic gate is, you can use &lt;a href=&quot;https://www.explainthatstuff.com/logicgates.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; if needed.&lt;/p&gt;&#xA;&lt;p&gt;Now that he is ready, is there a book teaching it via minecraft? not that i know of, yet there  is the minecraft education edition, and it has some lessons regarding logic gates and applications in the game, see &lt;a href=&quot;https://education.minecraft.net/en-us/challenges/redstone-vault&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hope i helped.&lt;/p&gt;&#xA;" OwnerUserId="12918" LastActivityDate="2023-01-03T17:48:46.287" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7602" PostTypeId="2" ParentId="7585" CreationDate="2023-01-03T18:14:36.400" Score="0" Body="&lt;p&gt;Well, if i may, i'll start with sort of a background.&lt;/p&gt;&#xA;&lt;p&gt;Where i am from, computer science students to take the AP equivalent course in their high school year, are asked to write code on a paper, they do not get to check it on VS or whatever software they use.&lt;/p&gt;&#xA;&lt;p&gt;Now, what does that have to do with anything?&lt;/p&gt;&#xA;&lt;p&gt;Your student should not be in front of a screen to work on his project. He can write code on pen and paper, and during his screen time, add what he worked on.&#xA;Not only do i find it nice, as it may be a great memory, to come back in a few years and see his first coding project, and all the syntax fixing, designing, calculations etc he worked on (I keep of all my projects and when feeling nostalgic i love coming back to it), but it could very much help him, as being able to spot mistakes in your work in this case, will benefit him more than any project he would do. He would be able to make benefits from everything, and improve.&lt;/p&gt;&#xA;&lt;p&gt;Now, regarding the project idea, it would be wonderfull if you could edit the question and give a brief overview of the syllabus, and i can give an idea that suits it, but for now:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Game dev&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;(1) Snake&lt;/p&gt;&#xA;&lt;p&gt;(2) Ping Pong against a wall&lt;/p&gt;&#xA;&lt;p&gt;(3)Quiz&lt;/p&gt;&#xA;&lt;p&gt;(4) Hangman&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;General ideas&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;(1) Password generator&lt;/p&gt;&#xA;&lt;p&gt;(2) Basic encrypt/ decrypt software&lt;/p&gt;&#xA;&lt;p&gt;(3) chess clock&lt;/p&gt;&#xA;&lt;p&gt;(5) typer test&lt;/p&gt;&#xA;&lt;p&gt;Hope it helped.&lt;/p&gt;&#xA;" OwnerUserId="12918" LastActivityDate="2023-01-03T18:14:36.400" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7603" PostTypeId="2" ParentId="7536" CreationDate="2023-01-06T19:32:12.577" Score="0" Body="&lt;p&gt;The Innovators: How a Group of Hackers, Geniuses and Geeks Created the Digital Revolution by Walter Isaacson.&#xA;Book Review:&lt;a href=&quot;https://www.goodreads.com/book/show/21856367-the-innovators&quot; rel=&quot;nofollow noreferrer&quot;&gt;Read Review here&lt;/a&gt;!&lt;/p&gt;&#xA;" OwnerUserId="8120" LastActivityDate="2023-01-06T19:32:12.577" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7604" PostTypeId="2" ParentId="5671" CreationDate="2023-01-06T19:46:46.837" Score="2" Body="&lt;p&gt;Creating appealing slides using markdown and publishing them online using github or netlify is another exciting way to create slides. My Slides hosted at GitHub Pages: &lt;a href=&quot;https://manoov.github.io/slides/moodle_fop-2022/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://manoov.github.io/slides/moodle_fop-2022/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8120" LastActivityDate="2023-01-06T19:46:46.837" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7605" PostTypeId="2" ParentId="44" CreationDate="2023-01-10T13:17:00.137" Score="1" Body="&lt;p&gt;I highly recommend &lt;a href=&quot;https://www.codelobster.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Codelobster IDE&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It includes great HTML/CSS/JS autocomlete and context help&lt;/p&gt;&#xA;" OwnerUserId="12941" LastActivityDate="2023-01-10T13:17:00.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7606" PostTypeId="2" ParentId="7598" CreationDate="2023-01-12T08:27:30.803" Score="3" Body="&lt;p&gt;I suggest learning through projects and documentation rather than books in this case. React has very good documentation and there are hundreds of thousands of React questions and answers on Stack Overflow you can consult if you get stuck as you work on projects. There are few technologies with as abundant support as React.&lt;/p&gt;&#xA;&lt;p&gt;Books are wonderful, but React evolves quickly and books don't. I prefer books for topics that change slowly, like algorithms, computer organization and software engineering principles. Books tend to offer deep, conceptual dives, but what ultimately made React comprehensible for me was playing with code in a hands-on manner and consulting resources on an as-needed basis. The hardest parts of learning React are the many weird gotchas and counterintuitive rules, which aren't easily grasped except by facing them head-on as you code.&lt;/p&gt;&#xA;&lt;p&gt;Here's a general outline you could follow:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Work through the official &lt;a href=&quot;https://react.dev/learn/tutorial-tic-tac-toe&quot; rel=&quot;nofollow noreferrer&quot;&gt;React tutorial&lt;/a&gt;. You'll build tic tac toe, which will teach you most of the basic React concepts: JSX, rendering, props, state, event handling, lists and keys. It'll also ensure you're up to speed on JS basics like arrow functions, mapping over arrays, etc.&lt;/p&gt;&#xA;&lt;p&gt;This tutorial has been updated to use functional components and hooks. Bear in mind that this newer approach was preceded by class components, which you may see from time to time when looking for help on Stack Overflow and in older books.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Read through the &lt;a href=&quot;https://react.dev/learn&quot; rel=&quot;nofollow noreferrer&quot;&gt;getting started&lt;/a&gt; sections of the official docs.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make a few simple projects from scratch on your own. The idea here is to run into problems and debug them by searching Stack Overflow and the React docs. Suggested toy projects:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Click counter (click a button to increase a counter value--the &amp;quot;hello world&amp;quot; of React; teaches basic state and event handling)&lt;/li&gt;&#xA;&lt;li&gt;Celsius to Fahrenheit converter, or anything with a form input or two.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Rock_paper_scissors&quot; rel=&quot;nofollow noreferrer&quot;&gt;Rock, Paper, Scissors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;A to-do list with child components and an array of objects in the parent component. If you're feeling ambitious, add local storage via a &lt;a href=&quot;https://react.dev/learn/reusing-logic-with-custom-hooks&quot; rel=&quot;nofollow noreferrer&quot;&gt;custom hook&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A calculator&lt;/li&gt;&#xA;&lt;li&gt;A music player (a list of buttons that play/pause audio on click)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Now you're ready for the &lt;a href=&quot;https://react.dev/reference/react/useEffect&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;useEffect&lt;/code&gt;&lt;/a&gt; hook, which is tricky to learn but essential. Make a project that uses &lt;code&gt;fetch&lt;/code&gt; to call a REST API. You can use &lt;a href=&quot;https://jsonplaceholder.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://jsonplaceholder.com/&lt;/a&gt; or another API you like. You should be able to fetch a list of comments or posts and display that list, both when a component loads and on a button click. Consider also coding a clock or pomodoro timer app, keeping in mind these can be difficult.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Add the React Router package and create a multi-page application of your choosing.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;With these basics under your belt, you should be equipped to create a larger project and explore the React ecosystem under your own steam.&lt;/p&gt;&#xA;&lt;p&gt;Here are a few other things you may want to explore once you've mastered the basics and made a few apps on your own:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Advanced concepts from the React docs like &lt;a href=&quot;https://react.dev/reference/react/useContext&quot; rel=&quot;nofollow noreferrer&quot;&gt;context&lt;/a&gt; and &lt;a href=&quot;https://react.dev/reference/react/useRef&quot; rel=&quot;nofollow noreferrer&quot;&gt;refs&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Deeper backend integration (if you're not a backend engineer, you can mock &lt;code&gt;fetch&lt;/code&gt; and keep a fake database in local storage for starters, although this hits limits like authentication quickly)&lt;/li&gt;&#xA;&lt;li&gt;Unit testing with Jest and React Testing Library&lt;/li&gt;&#xA;&lt;li&gt;Integration testing with Playwright, Puppeteer or Cucumber&lt;/li&gt;&#xA;&lt;li&gt;UI frameworks like Material, Semantic, Tailwind or Bootstrap&lt;/li&gt;&#xA;&lt;li&gt;Styled components&lt;/li&gt;&#xA;&lt;li&gt;Redux&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2023-03-17T14:28:43.713" LastActivityDate="2023-03-17T14:28:43.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7607" PostTypeId="2" ParentId="3623" CreationDate="2023-01-13T12:58:56.677" Score="1" Body="&lt;p&gt;You want an approach that aligns to the problems typed functional programming languages like Haskell lend themselves well to. That is to say, Category Theory + Tensor data. So the best problems to solve would likely be those involving linear algebra.&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start with implementing scalar arithmetic (custom types and functions and all. Intro to Monads / Maybe for NaNs and such)(1 hour)&lt;/li&gt;&#xA;&lt;li&gt;next ask them to build on the last example but implement vectors (again, all custom types, higher order functions)(1 hour)&lt;/li&gt;&#xA;&lt;li&gt;next ask them to do the same but with Matrix (Kernels, Images, custom types, higher order functions)(1 hour)&lt;/li&gt;&#xA;&lt;li&gt;next ask them to do the same but a linear solver (so det, eigenvectors and values)(1 hour)&lt;/li&gt;&#xA;&lt;li&gt;finally ask them implement Principal Components Analysis (so learn about files and loading data)(1 hour)&lt;/li&gt;&#xA;&lt;li&gt;leave them with a question at the end to further build off the work:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What is the principal component of a tensor? (if they coded things right, they'll have a joy of exploration )&lt;/li&gt;&#xA;&lt;li&gt;How would you implement formulas and derivative functions? (abstract a part of the linear solver from before)&lt;/li&gt;&#xA;&lt;li&gt;How would you implement graphs and graphing algorithms? (matrix implementation vs association list)&lt;/li&gt;&#xA;&lt;li&gt;How would you rewrite the library for Tensors of infinite size, or how would you implement dynamic programming problems? (intro to functional reactive streams)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="12947" LastActivityDate="2023-01-13T12:58:56.677" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7608" PostTypeId="2" ParentId="7044" CreationDate="2023-01-18T07:22:52.030" Score="3" Body="&lt;p&gt;The &amp;quot;Introduction to Algorithms&amp;quot; text by Cormen, Leiserson, Rivest, and Stein uses pseudocode (so, not any particular programming language), but assumes an introductory programming course as a prerequisite.&lt;/p&gt;&#xA;&lt;p&gt;If you want students to develop algorithmic thinking skills as part of an introductory programming course, consider the textbook &amp;quot;Introduction to Computation and Programming using Python&amp;quot; by John Guttag.  Many interesting problems are discussed there, including bisection search, Newton-Raphson, and sorting and searching algorithms.  Most introductory programming texts place too much emphasis on syntax, whereas this book by Guttag introduces a minimal amount of Python syntax and focuses on computational and algorithmic thinking.&lt;/p&gt;&#xA;" OwnerUserId="12959" LastActivityDate="2023-01-18T07:22:52.030" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7609" PostTypeId="1" AcceptedAnswerId="7610" CreationDate="2023-01-20T12:28:47.390" Score="3" ViewCount="187" Body="&lt;p&gt;I'm in the verge of giving up programming and wondering what could I do before I give up to make sure I did what everyone did.&lt;/p&gt;&#xA;&lt;p&gt;I've a bachelors degree in computer science. I didn't do it as well as I'd have liked to do, but that degree has gave me familiarity with most terms used in basic programming.&lt;/p&gt;&#xA;&lt;p&gt;I spent last 2.5 months working on web development(I'm learning MERN). I learnt html,css,bootstrap, javascript and react till date(In bootcamp), but I failed to learn React. Even javascript, i'm no expert at. Even css, I learnt the basics but I'm not an expert when it comes to building half decent sites. Same for bootstrap. I can carve a site using html,css,bootstrap but it won't look good. I was completely  impossible to learn when it came to react. Whenever I saw usage of useEffect and useState hooks and we start making changes in 10 different files for it, it confused me and I understood nothing.&lt;/p&gt;&#xA;&lt;p&gt;I had access to world's best resources to learn books, tutorials, blogs, youtube, udemy etc. I had access to forums like this to get help and support but still this was tough for me.&lt;/p&gt;&#xA;&lt;p&gt;I feel unlucky, sad and hopeless atm. Friends who were weaker than me in conventional college studies and academia have done jobs and internships but I'm failing to even learn something properly. I'm not jealous of them but just feel trash about myself.&lt;/p&gt;&#xA;&lt;p&gt;People say do projects to learn but I really don't know how that works. For eg: &lt;a href=&quot;https://codepen.io/pelko/pen/MWBpNmL&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://codepen.io/pelko/pen/MWBpNmL&lt;/a&gt; This project. I make stupid stuffs like these and can't produce a good output that is playable. It's too hard for me.&#xA;These are some of my projects.&#xA;&lt;a href=&quot;https://htmlcssbasicsite999.netlify.app/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://htmlcssbasicsite999.netlify.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://counterapp999.netlify.app/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://counterapp999.netlify.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://dicegame999.netlify.app/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dicegame999.netlify.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://digitalclock999.netlify.app/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://digitalclock999.netlify.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://portfoliosite999.netlify.app/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://portfoliosite999.netlify.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I did all these projects without looking any tutorials.&lt;/p&gt;&#xA;&lt;p&gt;I keep forgetting how I built something time and again. I nowadays try my best to add documentation though.&lt;/p&gt;&#xA;&lt;p&gt;I'm 70% sure to give up programming but still I&amp;quot;d like to make sure I follow advices from fellow forum users about it who've spent their life around programming.&lt;/p&gt;&#xA;&lt;p&gt;In 3 months, I am seeing no progress, except few days like:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;When I carved a site on my own using html,css without looking tutorials.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;When I carved a site on my own using bootstrap without looking tutorials.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;My problems:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I've not break through'ed in programming. If I can make anything with javascript that's over 500 lines of code, I'd consider that a breakthrough. I'm aware LOC aren't a good metric but please try to understand what I'm trying to say. A big application using programming.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Even in css, I failed to make presentable sites. The coding bootcamp I feel is going too fast as well. Same for bootstrap, I made sites but I failed ot create beautiful sites. People recommend me frontendmentor.io but IDK what to do there? It looks sketchy to me. If there is something that can teach me css, I'd be so grateful.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;After watching tutorials, I can't repeat what they've done in tutorial without watching the tutorial of project even though I understand each and every step they do in project.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I still am not fluent in ES6. I can't think in ES6. Arrow functions, map, reduce etc. I Understand them, but using them is different ballgame.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you understand my situation, please guide me. I don't need roadmaps, any more tutorials but plain old guidance and advice on what to do by people who went through this situation&lt;/p&gt;&#xA;" OwnerUserId="12962" LastActivityDate="2023-01-20T13:18:11.860" Title="What should I do Before I give up programming?" Tags="|self-learning|" AnswerCount="1" CommentCount="1" ClosedDate="2023-01-20T13:19:06.233" ContentLicense="CC BY-SA 4.0" />
  <row Id="7610" PostTypeId="2" ParentId="7609" CreationDate="2023-01-20T13:18:11.860" Score="6" Body="&lt;p&gt;So, first, know that I'm going to close this question.  Please don't be offended!  But it's off-topic for this site, which is for CS teachers to ask and answer about cs education.&lt;/p&gt;&#xA;&lt;p&gt;But I'm going to give an answer first anyway.  It sounds like you're despairing, and possibly depressed, and upset by the speed at which you are picking up various frameworks.&lt;/p&gt;&#xA;&lt;p&gt;Take a breath - you will be okay!  If you want to continue in this field, understand that all of our educations are uneven, and frameworks are &lt;em&gt;hard&lt;/em&gt;.  Frameworks are inherently &lt;em&gt;abstractions that provide architecture&lt;/em&gt;, so it takes a lot of absorption before you can make concrete things with them with any confidence.&lt;/p&gt;&#xA;&lt;p&gt;There's an expression, &amp;quot;watch your pennies, and your dollars will watch themselves&amp;quot; that applies here.  Calmly learn little bits each day, and eventually the framework will come into view.  Because they're hard, but they aren't infinite.&lt;/p&gt;&#xA;&lt;p&gt;I know that it can be hard to receive this while you're in the middle of such struggles, but it really will get better.  Keep going a bit at a time.  Once you've mastered a few frameworks, you will find that it's a little easier to pick up new ones.  Over time, you will begin to also pick up architecture itself, which will help you speed up the rate at which you pick up new technologies.&lt;/p&gt;&#xA;&lt;p&gt;So, that's the advice: one step at a time, keep practicing, keep learning, keep going.  It &lt;em&gt;will&lt;/em&gt; eventually click into place.  And in the meantime, all you can do is keep trying to learn and grow.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-01-20T13:18:11.860" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7611" PostTypeId="2" ParentId="7560" CreationDate="2023-01-24T15:20:40.947" Score="0" Body="&lt;p&gt;The book to learn UML concepts sis by side with software engineering:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.google.co.in/books/edition/The_Elements_of_UML_TM_2_0_Style/s1sIlw83-pQC?hl=en&amp;amp;gbpv=1&quot; rel=&quot;nofollow noreferrer&quot;&gt;Ambler, S. W. (2005). The Elements of UML 2.0 Style. United Kingdom: Cambridge University Press.&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="8120" LastActivityDate="2023-01-24T15:20:40.947" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7612" PostTypeId="2" ParentId="7422" CreationDate="2023-01-24T15:29:52.850" Score="1" Body="&lt;p&gt;My experience successfully completing a course on Coursera:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Enjoy learning first. Do incremental learning and track your progress periodically.&lt;/li&gt;&#xA;&lt;li&gt;Peer-graded submissions allow you to give and receive feedback from peers; you'll be amazed to learn about other people's points of view and gain insights from a different perspective...&lt;/li&gt;&#xA;&lt;li&gt;Mark the deadlines on your calendar so you don't forget about quizzes and assignments.&lt;/li&gt;&#xA;&lt;li&gt;Finally you will be able to obtain a verifiable e-certificate...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="8120" LastActivityDate="2023-01-24T15:29:52.850" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7613" PostTypeId="2" ParentId="5176" CreationDate="2023-01-25T11:43:41.673" Score="2" Body="&lt;p&gt;I just taught my 8yo daugter to count in binary, in her head, &amp;amp; very quickly.&lt;br&gt;&lt;/p&gt;&#xA;&lt;p&gt;First we count in base-10:&lt;br&gt;&#xA;&lt;em&gt;&lt;strong&gt;&amp;quot;Count from 0 to 100&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;&#xA;0,1,2,3,4,5,6,7,8,9 ... 98,99,100.&lt;br&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then base-8&lt;br&gt;&#xA;&lt;em&gt;&lt;strong&gt;&amp;quot;Count from 0 to 100 and skip every number with an 8 or 9&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;&#xA;0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,20,21 .... 75,76,77,100&lt;/p&gt;&#xA;&lt;p&gt;Then base-5&lt;br&gt;&#xA;&lt;em&gt;&lt;strong&gt;&amp;quot;Count from 0 to 100 and skip every number with a 5,6,7,8 or 9&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;&#xA;0,1,2,3,4,10,11,12,13,14,20,21 ... 43,44,100&lt;br&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then base-2 or binary.&lt;br&gt;&#xA;&lt;em&gt;&lt;strong&gt;&amp;quot;Count from 0 to 1000 and skip every number with a 2,3,4,5,6,7,8 or 9&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;&#xA;0,1,10,11,100,101 ... 1000&lt;br&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then to understand the value of each binary numbers, write down the sequence in a table 0 is 0, 1 is 1, 10 is 2, 11 is 3 etc&lt;br&gt;&lt;/p&gt;&#xA;&lt;p&gt;She quickly realised she was 1000 years old.&lt;br&gt;&lt;/p&gt;&#xA;" OwnerUserId="12971" LastActivityDate="2023-01-25T11:43:41.673" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7616" PostTypeId="1" CreationDate="2023-02-01T11:12:16.920" Score="1" ViewCount="113" Body="&lt;p&gt;When analyzing asymptotic complexity of functions we have big-O, which is an upper bound. We also have big-Omega, which is a lower bound, and even though it might not seem very useful at first to have a lower bound (&amp;quot;my program will always take longer time than this&amp;quot;), we can use it when explaining big-Theta.&lt;/p&gt;&#xA;&lt;p&gt;But how do we explain why we want the notions of small-o and small-omega? They are like big-O and big-Omega, except that they can not be tight bounds. Can we explain why we want to have bounds that are explicitly not tight?&lt;/p&gt;&#xA;" OwnerUserId="1366" LastActivityDate="2023-02-11T13:47:06.590" Title="Why do we want small-o and small-omega?" Tags="|complexity-theory|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7617" PostTypeId="2" ParentId="7616" CreationDate="2023-02-01T23:22:02.160" Score="3" Body="&lt;p&gt;Who is this &amp;quot;we&amp;quot; of which you speak? Note that Big-O and related concepts precedes the computational and algorithmic use. It is a concept of mathematics that is useful in analyzing the asymptotic behavior of functions: no computers need apply.&lt;/p&gt;&#xA;&lt;p&gt;It has been applied to algorithmic analysis since the behavior of algorithms, usually, on large sets of data, can be described in mathematical (functional) terms.&lt;/p&gt;&#xA;&lt;p&gt;See the &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_O_notation&quot; rel=&quot;nofollow noreferrer&quot;&gt;wikipedia article&lt;/a&gt; for a discussion and comparison of the various concepts.&lt;/p&gt;&#xA;&lt;p&gt;But to answer part of your question explicitly, if we know that a process with behavior g is efficiently computable (wrt time) and f = o(g), then one with behavior f will also be efficiently computable (yes, I'm using imprecise language here). Similar things can be said for the other measures. In fact, small-o gives more information about the relationship of functions asymptotically than Big-O does if you consider the limit definitions of the concepts.&lt;/p&gt;&#xA;&lt;p&gt;Also note that Big-O doesn't necessarily imply a &amp;quot;tight&amp;quot; upper bound, though we do search for such.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-02-01T23:22:02.160" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7618" PostTypeId="1" CreationDate="2023-02-02T10:27:37.393" Score="0" ViewCount="66" Body="&lt;p&gt;I would like to become a good Libreoffice Calc user. How should I learn to use it, as I don't have any real business cases to solve but I would like to learn those? I have studied a good skills on Python and a very basics of R. I don't want to spend money more than 100 € for learning.&lt;/p&gt;&#xA;" OwnerUserId="13006" LastActivityDate="2023-02-02T17:14:01.460" Title="How to learn Libreoffice Calc?" Tags="|self-learning|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7619" PostTypeId="2" ParentId="7618" CreationDate="2023-02-02T17:14:01.460" Score="1" Body="&lt;p&gt;It's a bit hard to answer since you have no stated goal, so we need to speak in generalities.  To learn LibreOffice Calc, you can:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Explore the interface and familiarize yourself with the different features and tools, like entering data, creating formulas, formatting cells, creating charts, filtering and sorting, and pivot tables.&lt;/li&gt;&#xA;&lt;li&gt;Read through official documentation and user guides.&lt;/li&gt;&#xA;&lt;li&gt;There are plenty of tutorials available on the LibreOffice website and on YouTube.&lt;/li&gt;&#xA;&lt;li&gt;Create some practice projects for yourself.  Here are some challenges you might consider: &lt;a href=&quot;https://ryanstutorials.net/programming-challenges/spreadsheet-challenges.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://ryanstutorials.net/programming-challenges/spreadsheet-challenges.php&lt;/a&gt; or &lt;a href=&quot;https://en.wikiversity.org/wiki/Spreadsheets/Spreadsheet_challenges&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://en.wikiversity.org/wiki/Spreadsheets/Spreadsheet_challenges&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Good luck!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-02-02T17:14:01.460" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7620" PostTypeId="2" ParentId="7616" CreationDate="2023-02-07T00:46:51.160" Score="1" Body="&lt;p&gt;If you want to see if a number is prime naively you try all of its potential factors. A little more cleverness shows that &lt;code&gt;sqrt(n)&lt;/code&gt; factors are enough.&lt;/p&gt;&#xA;&lt;p&gt;One of the best methods is the Quadratic Sieve, which takes &lt;code&gt;exp( sqrt( ln n lnln n ))&lt;/code&gt; which is &lt;code&gt;o(sqrt(n))&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://mathworld.wolfram.com/QuadraticSieve.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://mathworld.wolfram.com/QuadraticSieve.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I know that you can't teach the quadratic sieve to your students, but they will understand the complexity of the naive algorithm, and that it start taking lots of time for large numbers: just code it out. Now &amp;quot;little-oh&amp;quot; means that for n large enough this is more than 5 times as fast. And for even larger n it's 50 times as fast. And for much much larger n it's 500 times as fast. Et cetera.&lt;/p&gt;&#xA;&lt;p&gt;So big-oh tells you how fast an algorithm is, little-oh tells you that it's essentially faster than another algorithm.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2023-02-11T13:47:06.590" LastActivityDate="2023-02-11T13:47:06.590" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7621" PostTypeId="1" CreationDate="2023-02-08T06:04:11.870" Score="9" ViewCount="3454" Body="&lt;p&gt;How do you learn problem solving. Programming is all about problem solving. Whenever I try any new problems, I can't solve them. How does this ability to tackle a new problem by yourself come? How do you practice it? How to be creative problem solver? I am wording my question in different words, but they all mean the same thing.&lt;/p&gt;&#xA;&lt;p&gt;After how much time do you give up on a problem and look at its solution when learning problem solving as a beginner? What is the guide to &amp;quot;Learning how to learn problem solving&amp;quot;?&lt;/p&gt;&#xA;&lt;p&gt;Most of the guidance online seem to be about roadmaps like &amp;quot;Learn Data structures and algorithms first, then learn object oriented programming, practice hackerrank problems&amp;quot; etc. I want something different. How do you keep belief that if you keep practising one day you'll be able to solve any new problems?&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="204" LastEditDate="2023-02-12T22:39:05.480" LastActivityDate="2023-02-14T03:46:01.977" Title="How does the ability to solve a new problem come to a person?" Tags="|self-learning|programming|" AnswerCount="8" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7622" PostTypeId="2" ParentId="7593" CreationDate="2023-02-08T09:21:39.217" Score="1" Body="&lt;p&gt;State diagrams equipped with an animation facility are great tools for communicating temporal behaviour. David Harel introduced &lt;a href=&quot;https://en.wikipedia.org//wiki/State_diagram#Harel_statechart&quot; rel=&quot;nofollow noreferrer&quot;&gt;StateCharts&lt;/a&gt; to add &lt;em&gt;hierarchy&lt;/em&gt; and &lt;em&gt;concurrency&lt;/em&gt; to overcome the inherent limitation in plain state diagrams - they did not scale well. Back in the day an expensive tool was developed that would make the would-be developer create the diagrams as if in a drawing program. That was a failure. Moreover, the original StateCharts had some semantic issues (leading to 95+ published papers on their semantics), nowadays resolved in, e.g., &lt;a href=&quot;https://rtsys.informatik.uni-kiel.de/%7Ebiblio/downloads/papers/pldi14.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;SCCharts&lt;/a&gt; for which a family of IDEs is &lt;a href=&quot;https://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/Overview&quot; rel=&quot;nofollow noreferrer&quot;&gt;available&lt;/a&gt;. What these newer versions have in common is that the pretty diagrams are &lt;em&gt;derived by the tool&lt;/em&gt; from the textual representation, i.e., good old-fashioned textual code.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;&#xA;A classical instance of visual programming has been retired in favour of textual programming augmented with powerful visualisation.&lt;/p&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-02-08T09:21:39.217" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7623" PostTypeId="2" ParentId="7536" CreationDate="2023-02-08T09:29:57.180" Score="2" Body="&lt;p&gt;One book I'd recommend is C. Papadimitriou's &lt;a href=&quot;https://en.wikipedia.org/wiki/Logicomix&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logicomix&lt;/a&gt;. It's a graphic novel introducing aspiring students to one of the great challenges in CS: undecidability, and how it came about in maths. CS is more than writing python or &lt;span class=&quot;math-container&quot;&gt;$\langle$&lt;/span&gt;insert whatever language gets you a BS job these days&lt;span class=&quot;math-container&quot;&gt;$\rangle$&lt;/span&gt;.&lt;/p&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-02-08T09:29:57.180" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7624" PostTypeId="2" ParentId="7621" CreationDate="2023-02-08T11:17:39.307" Score="10" Body="&lt;p&gt;Basic problem solving can be learned in a straightforward way. Advanced skills come with experience, and of course, there are a few people gifted with a good intuition.&lt;/p&gt;&#xA;&lt;p&gt;Most of the time, problem solving boils down to:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Find a solution that fulfills some condition.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;E.g. to find prime numbers, that means:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Find integers that are divisible only by itself or by 1.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is the analysis phase. It &amp;quot;translates&amp;quot; from the terms asked for (&amp;quot;prime number&amp;quot;) to some more detailed technical description, and it can be a challenge on its own. But it's crucial.&lt;/p&gt;&#xA;&lt;p&gt;Before trying to solve a problem, make sure you have a thorough understanding, in our case understanding what it means to be a prime number. To practice that, explain the term to someone else. Your fellow will hopefully ask questions if your explanation isn't clear. And you will quite often find that, having to explain something to someone else, makes you look at the topic in a new way, so you yourself detect gaps in your understanding.&lt;/p&gt;&#xA;&lt;p&gt;When the problem is understood, first aim for a &lt;a href=&quot;https://en.wikipedia.org/wiki/KISS_principle&quot; rel=&quot;noreferrer&quot;&gt;simple-and-stupid&lt;/a&gt; approach:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What type of &amp;quot;things&amp;quot; can become a solution? Integers. So, enumerate all integers, e.g. in a loop.&lt;/li&gt;&#xA;&lt;li&gt;What is the condition that they have to fulfill? Divisibility by nothing else than by itself or by 1. So, write a function &lt;code&gt;isPrime(number)&lt;/code&gt; that checks for all relevant divisors between &lt;code&gt;2&lt;/code&gt; and &lt;code&gt;number-1&lt;/code&gt;, that there never is a zero division remainder.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In at least 90 percent of all real-world programming, this simple-and-stupid approach is the way to go. The main exception is job interviews done by misguided recruiters, and of course coding challenges like hackerrank.&lt;/p&gt;&#xA;&lt;p&gt;Of course, there are as well real-world situations where the simple approach is not good enough, e.g. in terms of efficiency. Then start to think about optimizations or different ways to do it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Keeping the simple approach, are there cases that can be excluded early from the testing? E.g. we know that (apart from 2) no even number is a prime, so our integer-enumeration can omit them.&lt;/li&gt;&#xA;&lt;li&gt;Also keeping the simple approach, you might observe that trying to divide e.g. 51 by numbers above 7 is useless: If it had a divisor above 7, then it also needed another one below 7, which the testing had already found earlier. With 51, there is a divisor 17, but that one needs another divisor being 3, and this one has already been checked before encountering the 17. So, the divisor check only needs to loop up to the square root of the number to be tested.&lt;/li&gt;&#xA;&lt;li&gt;Instead of checking every single number for being prime, we can turn the question upside down: From a list of integers, eliminate all the non-prime ones. What is left over, must be the primes. This is done in the famous &lt;a href=&quot;https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes&quot; rel=&quot;noreferrer&quot;&gt;Sieve of Eratosthenes&lt;/a&gt;. And you see, finding such an approach can promote you to the &amp;quot;hall of fame&amp;quot; of computer science, depending on the creativity of the algorithm. So, don't be too disappointed if you don't find such an algorithm on your own.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;When writing production-quality code, the most important quality is readability, making it easy for your fellows to understand what you are doing. Here, the simple approach shines, as the code you write very closely follows the problem description. Typically, the more you optimize, the less the result still matches the original problem structure, often making it hard to understand what's going on under the hood.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastEditorUserId="3966" LastEditDate="2023-02-08T11:34:42.883" LastActivityDate="2023-02-08T11:34:42.883" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7625" PostTypeId="2" ParentId="7621" CreationDate="2023-02-08T14:18:24.100" Score="6" Body="&lt;p&gt;What I would tell my students, at least at the beginning, is that &amp;quot;seeing&amp;quot; how to solve novel problems really just means &amp;quot;seeing&amp;quot; how to (1) separate a problem into its component parts, and (2) learning a programming vocabulary that allows you solve very small problems.&lt;/p&gt;&#xA;&lt;p&gt;Later, as you mature, you will better distinguish good programming from bad, but at the start, those are the two skills you need.&lt;/p&gt;&#xA;&lt;p&gt;I suspect that there are already classes of problems that you can solve.  Can you make a function that takes a number and doubles it?  Can you make a function that takes two numbers and subtracts them?  Can you make a function that takes 5 numbers and gives you back a + b - c * d + e?  If so, then you are well on your way. Making functions is one of the main techniques we use to turn problems into smaller subcomponents.&lt;/p&gt;&#xA;&lt;p&gt;Let's say you wanted to create a game without a game engine (NOT a good idea for a beginner!).  You want your character to create a bullet that will fly at an enemy.  It will be a tracking bullet, no aiming needed.  What are the sub-problems?&lt;/p&gt;&#xA;&lt;p&gt;Perhaps you thought of something like:&lt;/p&gt;&#xA;&lt;p&gt;a. create a bullet by the location of the player&#xA;b. figure out which direction to send the bullet&#xA;c. move the bullet a little bit towards that direction&#xA;d. check whether it has hit the enemy&#xA;e. if it has, do damage to the enemy&#xA;f. if it hasn't, go back to b again&lt;/p&gt;&#xA;&lt;p&gt;If you see that, then the next step is to take any one of those sub-problems and break IT into its sub-problems.  And so on and so forth.  At some point, most of those sub-problems get small enough that they become pretty trivial.&lt;/p&gt;&#xA;&lt;p&gt;You see?&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-02-08T14:18:24.100" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7626" PostTypeId="2" ParentId="7621" CreationDate="2023-02-08T15:10:48.440" Score="3" Body="&lt;p&gt;First, there are different sorts of programming problems. Many require some domain knowledge to solve them. And if you work within a domain, then practice solving problems in that domain will serve you well.&lt;/p&gt;&#xA;&lt;p&gt;Some &amp;quot;elementary&amp;quot; programming problems, such as determining whether a number is prime, require a bit of math knowledge. Some others, such as building web sites require a lot of knowledge of various kinds, some technical and some in the realm of human computer interaction (interfaces, say).&lt;/p&gt;&#xA;&lt;p&gt;Some problems are just plain tricky and are intended to be such. But those aren't the sorts of things that a working computer scientist will find the most valuable in a career. Fun, though. But, again, practice with those leads to some insight, perhaps into the way that such problem creators think about things.&lt;/p&gt;&#xA;&lt;p&gt;A database theory course, for example, will require some deep thought into complex data structures (b-trees and such) and also into language design and implementation. Complex stuff that requires domain knowledge background.&lt;/p&gt;&#xA;&lt;p&gt;But, in general, the two main elements are sufficient domain knowledge and enough practice to apply it effectively. Practice with simpler problems may supply sufficient insight to give you a hook to solve more complex problems, but you need that underlying knowledge first.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-02-08T15:10:48.440" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7627" PostTypeId="2" ParentId="7621" CreationDate="2023-02-08T22:51:31.713" Score="7" Body="&lt;p&gt;The problem with being a beginner (in any subject) is that you lack the vocabulary or experience to know how a problem can be decomposed into smaller parts. Or your understanding of the problem comes with faulty assumptions because you don't know what you don't know.&lt;/p&gt;&#xA;&lt;p&gt;There are several aspects of problem solving. Some of these you can work on directly, but some portion of &amp;quot;programmer problem solving&amp;quot; only comes from experience and knowing what tools are available.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Knowledge areas of problem solving:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scope - Understanding what qualifies as &amp;quot;solving&amp;quot; the problem. Restrictions on solutions.&lt;/li&gt;&#xA;&lt;li&gt;Composition - Knowing how to break down the problem.&lt;/li&gt;&#xA;&lt;li&gt;Experience - Knowing what tools, &amp;quot;tricks,&amp;quot; and algorithms are available and/or relevant.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Scope&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you don't know where you're going, how will you know when you have arrived? For any problem, it's a good idea to formulate (i.e., write down) what will qualify as a solution. Does your solution need to work for all positive integers? Does it need to work for strings shorter than a certain length? Does it matter how long it takes to find a solution? Does it matter if there is &amp;quot;invalid&amp;quot; input to your algorithm?&lt;/p&gt;&#xA;&lt;p&gt;There are plenty other kinds of questions you can ask about what your solution should look like. In general, you should look at the problem and think if there are any ways you can be &amp;quot;lazy&amp;quot;. If the problem statement only asks about positive integers, maybe you can avoid a complication with negative numbers by simply not allowing those in your algorithm. You should make a list (at least mentally) of what options you have for &amp;quot;widening&amp;quot; or &amp;quot;narrowing&amp;quot; your solution, as long as it still meets the acceptance criteria.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Composition: Decomposition&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;For any problem (in general) that you don't have an immediate answer for, it's a good idea to write down a list of steps that need to happen. This doesn't need to be in code, just an outline of how to work through the problem. Sometimes it's helpful to start at &amp;quot;the solution&amp;quot; and work backwards to &amp;quot;the beginning.&amp;quot; Sometimes you know where you start, but are missing some steps along the way. Just list as much as you can and leave some question marks &amp;quot;??&amp;quot; in the spots you aren't sure about. I'll have some more to say in the &amp;quot;Experience,&amp;quot; section but pencil in your best guess about what solution would look like in this step.&lt;/p&gt;&#xA;&lt;p&gt;At this step, you need to continue to break down each individual step in your solution until it's described in a way that you can implement. For example, what does &amp;quot;iterate the primes less than one million&amp;quot; mean? I can immediately picture a sieve solution and know how I would write that. If you don't have a similar mental picture, then this needs to be decomposed further.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;iterate the primes less than one million&#xA;&lt;ul&gt;&#xA;&lt;li&gt;build a list of integers less than one million&lt;/li&gt;&#xA;&lt;li&gt;iterate the list and cross out every second number&lt;/li&gt;&#xA;&lt;li&gt;find the first number after 2 (which is 3), and iterate the list, crossing out every 3rd item.&lt;/li&gt;&#xA;&lt;li&gt;find the first number after 3 (which is 5), and iterate the list, crossing out every 5th item.&lt;/li&gt;&#xA;&lt;li&gt;find the first number after 5 (which is 7), and iterate the list, crossing out every 7th item.&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you think very long about the above example, you will notice it is not very efficient. It's often best not to worry &lt;em&gt;too&lt;/em&gt; much about efficiency until after you have a working solution. But do keep in mind the scope of the problem, sometimes this is an important consideration.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Composition: Resolution&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;One of the marvels of the human brains is &lt;a href=&quot;https://xkcd.com/242/&quot; rel=&quot;noreferrer&quot;&gt;the ability to recognize patterns&lt;/a&gt;. If you can find a &amp;quot;template&amp;quot; or a &amp;quot;recipe&amp;quot; to apply in more than one situation, then you can be a programmer (more in the &amp;quot;Experience&amp;quot; section).&lt;/p&gt;&#xA;&lt;p&gt;As far as programming puzzles, it's often helpful to solve a single case. It's a good idea to start with the simplest possible scenario: zero, NULL, &amp;quot;&amp;quot;, etc. What happens using your solution with that input? What happens if you use the &amp;quot;next&amp;quot; input? It really depends on the problem for how you work this step. If your problem is about positive integers, then putting inputs and outputs into a spreadsheet might be helpful. You can try plotting different sets of input and output data.&lt;/p&gt;&#xA;&lt;p&gt;If your proposed solution can be succinctly described in the same way you would an algorithm, then maybe you can use induction to prove your solution is valid for all (within range) inputs. &lt;code&gt;x =&amp;gt; x + 1&lt;/code&gt;, etc.&lt;/p&gt;&#xA;&lt;p&gt;More formally, you want to propose a hypothesis, test it, and then prove it. Of course &amp;quot;prove it&amp;quot; can mean different things, but as a programmer, &amp;quot;proof&amp;quot; often means meeting acceptance criteria.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Can you tell what comes next: &lt;code&gt;517, 518, 519, 520, 521, ...&lt;/code&gt;? Like I mentioned above, pattern recognition is essential to being a programmer. You can take an educated guess that &lt;code&gt;522&lt;/code&gt; should come next in the sequence because you are familiar with &amp;quot;numbers&amp;quot; and use them extensively (maybe more than you would like). But more abstractly, what happened:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You saw a sequence of numbers&lt;/li&gt;&#xA;&lt;li&gt;problem: continue the sequence&lt;/li&gt;&#xA;&lt;li&gt;You drew on your experience with &amp;quot;numbers&amp;quot; that they are nicely &amp;quot;lined up&amp;quot; in a sequence&lt;/li&gt;&#xA;&lt;li&gt;You adjusted your general knowledge of numbers and sequence and realized it fits this pattern: [x], one after [x], one after that, and one after &lt;em&gt;that&lt;/em&gt;, and so on&lt;/li&gt;&#xA;&lt;li&gt;You hypothesize, therefore, the solution is &lt;code&gt;522, 523, 524, ..&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;(Probably -- my hope, for this example -- you don't stare at sequences of &lt;code&gt;517, 518, 519, 520, 521, 522, 523, 524, ...&lt;/code&gt; all day, otherwise you would just recite a &lt;em&gt;fact&lt;/em&gt; rather than step through the above problem solving steps)&lt;/p&gt;&#xA;&lt;p&gt;That was a rather contrived example, but the purpose was to draw attention to the above steps. This only works because you have some &amp;quot;experience&amp;quot; to draw on. You have, in your &amp;quot;experience belt&amp;quot;, a relevant tool to use: knowledge that integers continue in sequence. Programming challenges are no different.&lt;/p&gt;&#xA;&lt;p&gt;This is the reason to understand data structures and algorithms. Both of these are essential &lt;em&gt;tools&lt;/em&gt; that you need to be familiar with in order to solve programming problems. Some data structures are essential to solve certain types of problems, especially when considered under specific constraints. If you have a programming problem, and you have a bunch of data in a collection, and you need to access an arbitrary item in a few steps without iterating the entire collection, you need to know about &lt;em&gt;hashing&lt;/em&gt; and related concepts (another contrived example, there's obviously more than one solution). This isn't something you would happen to know before hand, either you are taught about this, or learn it on your own, but you can't solve this problem without having some kind of experience to draw on.&lt;/p&gt;&#xA;&lt;p&gt;How you gain experience is up to you (university, code academy, hobby projects, internship, etc). Learning by doing will be the most effective. Knowing how much experience you need is up to you. The depth of computer science is absolutely endless, no one will ever know everything relevant to programming (in practice, or academically), but the more experience you have, and the more tools are available to use, the better equipped you will be to solve problems in the future.&lt;/p&gt;&#xA;" OwnerUserId="4995" LastActivityDate="2023-02-08T22:51:31.713" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7628" PostTypeId="2" ParentId="7621" CreationDate="2023-02-09T10:46:28.627" Score="3" Body="&lt;p&gt;Your examples (Roman to integer, update snake) are problems that  may not need as much creativity as you seem to think (and they are not really &amp;quot;new&amp;quot; ;-) ).&lt;/p&gt;&#xA;&lt;p&gt;My strategy would be to approach them incrementally. If we take the Roman number conversion as an example: I wouldn't exactly know a general algorithm off the cuff, if that's any consolation. I would approach the problem &lt;strong&gt;incrementally.&lt;/strong&gt; Start with single letter numbers, continue with monotonously falling sequences, finally consider the difficult case with non-monotonous sequences. At each step, observe how you, as a human, solve it. Try to make the strategy you follow unconsciously explicit. Play through edge cases first in &lt;em&gt;Gedankenexperiments,&lt;/em&gt; and then in tests.&lt;/p&gt;&#xA;&lt;p&gt;The latter step — non-monotonous sequences where sub-numbers must be subtracted — is the difficult one. I'd tinker around with special cases until I notice a pattern, either in the data or the program. This pattern will lead to a generalization, a true algorithm: Roman numbers are additions and subtractions of sub-numbers: They are nested. Therefore, parsing can probably be recursive.&lt;/p&gt;&#xA;&lt;p&gt;It is not uncommon to see the best (perhaps &amp;quot;true&amp;quot;) solution only after many iterations, perhaps when revisiting code after while. But working iteratively will get you there, eventually, even if the best algorithm is different from your original approach.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastActivityDate="2023-02-09T10:46:28.627" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7629" PostTypeId="2" ParentId="7621" CreationDate="2023-02-09T18:06:56.573" Score="1" Body="&lt;p&gt;At first writing programs to solve new problems seems like an impossible task.&lt;/p&gt;&#xA;&lt;p&gt;This is in part because everything is new at once.&lt;/p&gt;&#xA;&lt;p&gt;Experienced programmers tend to forget the large amount of knowledge we need to just get started.  Each little bit of knowledge is trivial, but there just so many little bits. I'm not just talking about the programming language, but basic things like &amp;quot;What is a file?&amp;quot; and &amp;quot;What do you mean, 'æ'&#xA;is not a letter?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Sure, you can look things up, but then you lose track of your thoughts.&lt;/p&gt;&#xA;&lt;p&gt;And when things go wrong, as they always do, you don't understand what because there so many things you are uncertain about.&lt;/p&gt;&#xA;&lt;p&gt;The second main stumbling block is that the most powerful problem solving technique is recognition.  You remember that you have solved a similar problem before.  But you haven't solved any problems before, this is impossible.&lt;/p&gt;&#xA;&lt;p&gt;The way past both of these problems is &lt;strong&gt;practice&lt;/strong&gt;.  And this is hard work.&lt;/p&gt;&#xA;&lt;p&gt;When reading a tutorial, type in the examples given.  Even the most trivial ones.  Typing things in gives you better memory than just reading them.&lt;/p&gt;&#xA;&lt;p&gt;This will teach you some of those trivial bits of knowledge you need.  And every example is a solution to a problem, which adds to your store of problems you have solved before.&lt;/p&gt;&#xA;&lt;p&gt;And then there is the exercises.  At first, you can't solve them.  So, you look at the solution.  And then?  Move on to the next problem?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;WRONG&lt;/strong&gt;  You job has just started.&lt;/p&gt;&#xA;&lt;p&gt;First, type in the solution.  Muscle memory is good memory.&lt;/p&gt;&#xA;&lt;p&gt;Second, read the solution until you understand it.&lt;/p&gt;&#xA;&lt;p&gt;Third, clear the screen and try to solve the problem again.  The solution doesn't have to identical, it just has to work.  In fact, it is better if you &lt;em&gt;don't&lt;/em&gt; get an identical answer.&lt;/p&gt;&#xA;&lt;p&gt;Fourth, find out why that didn't work.  Give it a good try before giving up and looking at the solution again.&lt;/p&gt;&#xA;&lt;p&gt;Fifth, every time you look at the solution, you must clear the screen and start solving from scratch again.&lt;/p&gt;&#xA;&lt;p&gt;Sixth, when you have finally solved it, take a short break before moving on to the next exercise. Hurray!&lt;/p&gt;&#xA;&lt;p&gt;Seventh, the next day go back to the first exercise again and solve it from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Eighth, the next week go back to the first exercise again and solve it from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Ninth, the next month go back to the first exercise again and solve it from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Tenth, maybe, the next year go back to the first exercise again and solve it from scratch.&lt;/p&gt;&#xA;&lt;p&gt;At this point this problem should be firmed lodged in your library of problems you know the solutions to.&lt;/p&gt;&#xA;" OwnerUserId="1055" LastActivityDate="2023-02-09T18:06:56.573" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7630" PostTypeId="1" AcceptedAnswerId="7633" CreationDate="2023-02-10T15:25:39.537" Score="1" ViewCount="36" Body="&lt;p&gt;I have been learning a lot of low-level computer science concepts lately.&lt;/p&gt;&#xA;&lt;p&gt;I have heard google developing a TPU (Tensor Processing Unit) which is an &amp;quot;AI Accelerator&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;This sounds interesting and I was wondering where should I start if I need to advance in one of these fields. Provided I have no knowledge of AI and ML.&lt;/p&gt;&#xA;&lt;p&gt;Should I buy some ML courses and learn all the math? How should I go about this?&lt;/p&gt;&#xA;" OwnerUserId="13045" LastActivityDate="2023-02-11T17:50:41.227" Title="Where to start while learning about AI Hardware" Tags="|artificial-intelligence|machine-learning|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7631" PostTypeId="1" AcceptedAnswerId="7638" CreationDate="2023-02-10T17:18:30.647" Score="4" ViewCount="60" Body="&lt;p&gt;We would like to use an interactive system for polls in our lectures.&#xA;What would be alternatives to ahaslides.com that are e.g. opensource or self-hostable?&lt;/p&gt;&#xA;" OwnerUserId="13046" LastEditorUserId="13046" LastEditDate="2023-02-12T07:38:11.430" LastActivityDate="2023-02-13T17:16:37.743" Title="What are ahaslides.com alternatives for interactive polls during a lecture?" Tags="|lecture-tools|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7632" PostTypeId="2" ParentId="7536" CreationDate="2023-02-11T07:21:57.563" Score="3" Body="&lt;p&gt;While not exactly a textbook, &lt;em&gt;&lt;strong&gt;Code: The Hidden Language of Computer Hardware and Software&lt;/strong&gt;&lt;/em&gt; is one of the most important and influential books in my early times, when I was a high-schooler.&lt;/p&gt;&#xA;&lt;p&gt;Getting a top-down view on how a computer works early on is highly beneficial to one's later detailed study of computer architecture. This book explains various components of a computer in simple terms, like binary and 2's complement representation of numbers, logic gates, storage and computation units, and assembles a primitive computer from the ground-up. It covers basic topics from courses like &lt;em&gt;Digital Circuit Design&lt;/em&gt;, &lt;em&gt;Introduction to Computer Systems&lt;/em&gt;, &lt;em&gt;Computer Science: A Programmer's Perspective&lt;/em&gt;, and serves as a perfect entry point for those interested in learning CS.&lt;/p&gt;&#xA;" OwnerUserId="6186" LastActivityDate="2023-02-11T07:21:57.563" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7633" PostTypeId="2" ParentId="7630" CreationDate="2023-02-11T13:45:02.733" Score="2" Body="&lt;p&gt;It's important that you puncture through the hype. What happens in AI / DL are fairly common algorithms. In particular, computationally it almost all comes down to matrix-matrix multiplication. And the TPU is a dedicated processor for doing matmatmult. That's all.&lt;/p&gt;&#xA;&lt;p&gt;So why? Well, I'm assuming you understand where matrix-matrix multiplication comes into the DL story.&lt;/p&gt;&#xA;&lt;p&gt;The matmatmult algorithm is very easy to code: it's literally 4 lines for a triply-nested loop. However, coding it that way gives you very low performance on modern processors. You can execute this much more efficiently, if you think a lot harder about it and code it more sophisticatedly; see &lt;a href=&quot;https://dl.acm.org/doi/10.1145/1356052.1356053&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dl.acm.org/doi/10.1145/1356052.1356053&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;From the extreme regularity of this operation it's also great for GPUs, which give you more bang for the buck, so they are popular in DL. And if you strip almost all instruction decoding out of your processor, and you hardwire the inner part of the matmatmult in a circuit, you get your TPU.&lt;/p&gt;&#xA;&lt;p&gt;So that's what it is: a dedicated matrix-matrix-multiplication processor. Not much intelligence to it, right?&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2023-02-11T17:50:41.227" LastActivityDate="2023-02-11T17:50:41.227" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7634" PostTypeId="2" ParentId="7631" CreationDate="2023-02-11T17:32:39.763" Score="4" Body="&lt;p&gt;&lt;a href=&quot;https://trypingo.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;PINGO&lt;/strong&gt;&lt;/a&gt; might suit your needs (see also the &lt;a href=&quot;https://trypingo.com/en/features/&quot; rel=&quot;nofollow noreferrer&quot;&gt;list of features&lt;/a&gt;). The project is (or was) associated with the German Universität Paderborn.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://github.com/PingoUPB/PINGOWebApp&quot; rel=&quot;nofollow noreferrer&quot;&gt;source code&lt;/a&gt; is available and licensed under the Eclipse Public License v1.0 (which is an &lt;a href=&quot;https://opensource.org/licenses/alphabetical&quot; rel=&quot;nofollow noreferrer&quot;&gt;OSI-approved&lt;/a&gt; open source license).&lt;/p&gt;&#xA;&lt;p&gt;A (German) &lt;a href=&quot;https://blogs.uni-paderborn.de/pingo/opensource/&quot; rel=&quot;nofollow noreferrer&quot;&gt;blog post&lt;/a&gt; by the PINGO developers mentions that using the source code, you can technically host an instance yourself, however, they don't offer any support.&lt;/p&gt;&#xA;" OwnerUserId="793" LastActivityDate="2023-02-11T17:32:39.763" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7635" PostTypeId="2" ParentId="7631" CreationDate="2023-02-12T16:44:58.597" Score="3" Body="&lt;p&gt;I don't know about open source, but as I understand it, Kahoot!, Google Forms, Poll Everywhere, Slido, and Mentimeter are all integrable into Google Slides, and all have free tiers that allow you to do what you are asking for.&lt;/p&gt;&#xA;&lt;p&gt;The advantage of the freemium services is that they are simple and tend to work out of the box.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-02-12T16:44:58.597" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7636" PostTypeId="2" ParentId="7621" CreationDate="2023-02-12T22:59:31.197" Score="0" Body="&lt;p&gt;A few things you can do:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Practice (starting on simple problems)&lt;/li&gt;&#xA;&lt;li&gt;Use test-driven-development.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1&gt;Test-driven-development&lt;/h1&gt;&#xA;&lt;h2&gt;Do tiny steps&lt;/h2&gt;&#xA;&lt;p&gt;Solve a simpler problem first. E.g for Roman to Arabic conversion. Solve&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;i → 1&lt;/li&gt;&#xA;&lt;li&gt;ii → 2&lt;/li&gt;&#xA;&lt;li&gt;iii → 3&lt;/li&gt;&#xA;&lt;li&gt;iiii → 4&lt;/li&gt;&#xA;&lt;li&gt;iiiii → 5&lt;/li&gt;&#xA;&lt;li&gt;v → 5&lt;/li&gt;&#xA;&lt;li&gt;vi → 6&lt;/li&gt;&#xA;&lt;li&gt;⋮&lt;/li&gt;&#xA;&lt;li&gt;iv → 4&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However, to do it properly, one would not decide the next step before completing the current step.&lt;/p&gt;&#xA;&lt;h2&gt;Automated testing&lt;/h2&gt;&#xA;&lt;p&gt;Write an automated test for the next step, before trying to solve it.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-02-12T22:59:31.197" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7637" PostTypeId="1" AcceptedAnswerId="7640" CreationDate="2023-02-13T02:48:24.287" Score="5" ViewCount="64" Body="&lt;p&gt;When teaching my students about different sort algorithms, I would like to give them a virtual hand of cards to sort so they can try out an algorithm by dragging and dropping to reorder the cards. Is there an online simulator for this?&lt;/p&gt;&#xA;&lt;p&gt;I am not asking for a visualization, which demonstrates sort algorithms step-by-step. I am looking for a site where the student has to move the items.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2023-02-14T05:22:56.103" Title="Is there an online drag-and-drop interactive sort simulator?" Tags="|resource-request|algorithms|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7638" PostTypeId="2" ParentId="7631" CreationDate="2023-02-13T17:16:37.743" Score="2" Body="&lt;p&gt;According to &lt;a href=&quot;https://alternativeto.net/software/ahaslides/?license=opensource&quot; rel=&quot;nofollow noreferrer&quot;&gt;alternative.to&lt;/a&gt;, there are multiple open source competitors apart from PINGO:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://classquiz.de/&quot; rel=&quot;nofollow noreferrer&quot;&gt;ClassQuiz&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://particify.de/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Particify&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://claper.co/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Claper&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="13047" LastActivityDate="2023-02-13T17:16:37.743" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7639" PostTypeId="2" ParentId="7621" CreationDate="2023-02-14T03:46:01.977" Score="0" Body="&lt;p&gt;You are in a forest, with no belongings other than the shirt and shorts you're wearing. You want to be sheltered from the rain because you don't want your hair to get wet. Start.&lt;/p&gt;&#xA;&lt;p&gt;Genuinely try to come up with a realistic rough description of what you would do before reading on.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;After how much time do you give up on a problem and look at its solution&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&amp;quot;Its solution&amp;quot; implies that there is One True Solution, which is not the case and likely the source of why you think you can't find &amp;quot;the&amp;quot; solution.&lt;/p&gt;&#xA;&lt;p&gt;While building a 12 bedroom mansion would definitely be a solution to the problem, you probably don't know how to build one from scratch, and it's significantly disproportionate to the scope of the problem.&lt;/p&gt;&#xA;&lt;p&gt;But I didn't ask you to build a mansion. There are countless ways to solve it. Some are obvious, others require some lateral thinking.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Build a 12 bedroom mansion&lt;/li&gt;&#xA;&lt;li&gt;Build a tent&lt;/li&gt;&#xA;&lt;li&gt;Build a canopy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;More importantly, I didn't even ask you to build a shelter either. The only thing that you have been given is a requirement: don't get your hair wet.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use one of your clothes as a hat.&lt;/li&gt;&#xA;&lt;li&gt;Craft a makeshift umbrella&lt;/li&gt;&#xA;&lt;li&gt;Find a tree you can hide under when it rains&lt;/li&gt;&#xA;&lt;li&gt;Wander around and look for a cave&lt;/li&gt;&#xA;&lt;li&gt;Shave off your hair. Can't get wet what you don't have.&lt;/li&gt;&#xA;&lt;li&gt;Stop caring about having wet hair&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All of these are solutions in a way. Maybe some of these introduce secondary problems and therefore invalidate them as a good solution, but that depends on a lot of context.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Most of the guidance online seem to be about roadmaps like &amp;quot;Learn Data structures and algorithms first, then learn object oriented programming, practice hackerrank problems&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Advice like this is often not helpful in the way that the advice giver thinks. They're listing necessary pieces to the puzzle, but this is not always something you can just learn one after the other without any context until you can put it all to good use at the end. People usually don't learn this way.&lt;/p&gt;&#xA;&lt;p&gt;A much more intuitive way to learn is to &lt;strong&gt;try&lt;/strong&gt;. Achieve at least something, even if it only works in a subset of cases, or achieves only part of the goal.&lt;/p&gt;&#xA;&lt;p&gt;Once you've reached that point, take a step back and play around with what you've got. Do you see any small issues that you know how to solve/improve? Can you find some edge cases that you've forgotten?&lt;/p&gt;&#xA;&lt;p&gt;Only when it feels &lt;em&gt;impossible&lt;/em&gt; to improve on it further, that is when you check others' work and see what they could come up with. Is it notably better than yours? What did they do differently?&lt;/p&gt;&#xA;&lt;p&gt;It might be easier to learn how others' solutions differ from yours, rather than learning how to build others' solutions from the get go. In the former scenario, you've already built up an understanding of the problem domain and are therefore more receptive to alternate solutions and improvements.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2023-02-14T03:46:01.977" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7640" PostTypeId="2" ParentId="7637" CreationDate="2023-02-14T05:22:56.103" Score="4" Body="&lt;p&gt;I found a website: &lt;a href=&quot;https://deck.of.cards/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://deck.of.cards/&lt;/a&gt;. It doesn't know anything about computer science or sorting, but I was able to use it to demonstrate insertion sort and let my students practice, which is all I needed.&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2023-02-14T05:22:56.103" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7641" PostTypeId="2" ParentId="5990" CreationDate="2023-02-15T11:38:31.027" Score="0" Body="&lt;p&gt;For this purpose I'd recommend the combinatorics chapters of &lt;a href=&quot;https://courses.csail.mit.edu/6.042/spring18/mcs.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lehman, Leighton, Meyers&lt;/a&gt;. Yes, it's nominally a postgrad course, but it doesn't really show in the prerequisite knowledge assumed.&lt;/p&gt;&#xA;&lt;p&gt;As an aside: claiming that combinatorics don't matter in SE work is disingenuous.&lt;/p&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-02-15T11:38:31.027" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7642" PostTypeId="1" CreationDate="2023-02-18T15:59:23.863" Score="0" ViewCount="53" Body="&lt;p&gt;It's demanded to design a simplified machine (computer) and its emulator.&#xA;First I need to do the design of this machine and here is some &lt;strong&gt;ideas I've thought about:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Components: main memory, ALU, RI, RIM, RAM, CO, ACC&lt;/li&gt;&#xA;&lt;li&gt;Instruction of 16bits&lt;/li&gt;&#xA;&lt;li&gt;Instruction format: I'm thinking about making two address instructions but still thinking about the positioning of each field of the instruction&lt;/li&gt;&#xA;&lt;li&gt;Instruction set: addition, subtraction, shift, logic AND and OR,  store and load the accumulator data, conditional and unconditional jump, (multiplication and division: I'm not very confident about these two because they seem to be a bit complicated)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Problems I've come across:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I find this first approach very simple and want to develop it a bit more but it should still be easy to make its emulator and not very complicated.&lt;/li&gt;&#xA;&lt;li&gt;I want to add more registers like index register, general purpose register but I don't know if that would be hard to do.&lt;/li&gt;&#xA;&lt;li&gt;I can't find enough resources to get more ideas for the design of the machine.&lt;/li&gt;&#xA;&lt;li&gt;For the emulator I don't really know where to start and which programming language&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="13077" LastEditorUserId="694" LastEditDate="2023-02-19T21:28:10.917" LastActivityDate="2023-02-24T14:15:53.320" Title="Suggestions and resources for the conception of a pedagogic machine (computer) and its emulator?" Tags="|resource-request|programming|project|resource-information|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7643" PostTypeId="1" AcceptedAnswerId="7644" CreationDate="2023-02-20T13:21:54.787" Score="2" ViewCount="54" Body="&lt;p&gt;I see a lot of hype regarding cyber/network security. And also find an unending list of books and courses for the same.&lt;/p&gt;&#xA;&lt;p&gt;As I have been working on system software projects for the last couple of months, such as OSes and compilers, I want to delve deep into system security.&lt;/p&gt;&#xA;&lt;p&gt;I can find some material online like malware analysis and cryptanalysis etc. But where do I start if I want to go deeper into System Security?&lt;/p&gt;&#xA;&lt;p&gt;P.S. I am a CS Undergrad.&lt;/p&gt;&#xA;" OwnerUserId="13045" LastActivityDate="2023-02-20T14:55:40.193" Title="System Security related study material suggestions" Tags="|security|operating-systems|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7644" PostTypeId="2" ParentId="7643" CreationDate="2023-02-20T14:55:40.193" Score="3" Body="&lt;p&gt;It's a great field to explore!&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://pages.cs.wisc.edu/%7Eremzi/OSTEP/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Operating Systems, Three Easy Pieces&lt;/a&gt; is a way to continue your exploration of OS, and is free online.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/047008023X&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Shellcoder's Handbook&lt;/a&gt; has been recommended to me before, though it is not free.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/1593271441&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;Hacking: The Art of Exploitation&lt;/a&gt; is great, and it goes into fuzzing and manual attacks nicely. I use this textbook with my students. (Note that the contents are rather out of date, but also get at difficult ideas that underlie more modern attacks)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Reverse Engineering for Beginners has also been recommended to me, and is free.  I have not read it myself.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And, of course, you should join CTFs.  There are simply hundreds of them, and there are contests you can join all year long.  PicoCTF is nominally aimed at high school, but it is a particularly good one to get started with because it starts the level quite low, and the challenges get progressively harder until they are quite advanced, even for undergrads.  You would have to identify yourself as an adult, which would make you ineligible for prizes, but the contest is otherwise free, and unlike many CTFs, it is explicitly designed to teach.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-02-20T14:55:40.193" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7645" PostTypeId="2" ParentId="7572" CreationDate="2023-02-22T10:55:13.977" Score="2" Body="&lt;p&gt;The lure to recycle past problems is great. It's so great to save work. It's so great to reduce risk by using exercises that worked well in the past. I used to succumb to that lure early on. Students told me decades ago that this is a terrible mistake. Especially the good/ambitious students become disenfranchised in courses where it's known that problems are recycled. The students argued that recycling exercises that are worth marks - be it for exams or graded homework - rewards being well-connected rather than able to solve the problems themselves. That's when I changed. I never regretted the change.&lt;/p&gt;&#xA;&lt;p&gt;If one resists that lure, there's more work to create new problems every session, more risk that the problems are not that good, but there are also sizeable benefits:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;discussing solutions in detail leads to learning (I used to ask for volunteers who wanted their solutions discussed, anonymised 2 of those solutions, typically a good and a bad one, and then discussed the good and the bad of each in class)&lt;/li&gt;&#xA;&lt;li&gt;cheating by copying from previous cohorts is eradicated&lt;/li&gt;&#xA;&lt;li&gt;contract cheating is more expensive and easier to spot on the usual sites such as freelancer.com&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-02-22T10:55:13.977" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7646" PostTypeId="2" ParentId="7642" CreationDate="2023-02-24T14:15:53.320" Score="1" Body="&lt;p&gt;There are tools available which you may be able to use or adapt for your course. Specifically I am thinking of &lt;a href=&quot;https://www.nand2tetris.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Nand To Tetris&lt;/a&gt;. I began the course many years ago but did not finish.  I also build some of the early parts in &lt;a href=&quot;https://sourceforge.net/projects/circuit/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Logisim&lt;/a&gt;, may be too low-level for what you are looking for, or it may be useful for building your project as I see &amp;quot;Andy&amp;quot; &lt;a href=&quot;https://www.andyexplainstech.com/articles/cpu-basics-building-cpu-logisim&quot; rel=&quot;nofollow noreferrer&quot;&gt;built a CPU&lt;/a&gt; using Logisim.&lt;/p&gt;&#xA;&lt;p&gt;From the Site:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The site contains all the project materials and tools necessary for building a general-purpose computer system and a modern software hierarchy from the ground up.&lt;/p&gt;&#xA;&lt;p&gt;The materials are aimed at students, instructors, and self-learners. Everything is free and open-source, as long as you operate in a non-profit, educational setting.&lt;/p&gt;&#xA;&lt;p&gt;The materials also support two courses that we now teach on-line: Nand2Tetris Part I (hardware projects/chapters 1-6), and Nand2Tetris Part II (software projects/chapters 7-12). These courses are aimed at learners who wish to take the course at their own pace.&lt;/p&gt;&#xA;&lt;p&gt;Nand to Tetris courses are taught at 400+ universities, high schools, and bootcamps. The students who take them range from high schoolers to Ph.D. students to Google engineers. Here is the extended course syllabus.&lt;/p&gt;&#xA;&lt;p&gt;​Instructors: For additional course materials, contact schocken@gmail.com&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I recall getting stuck at one point when there was only the book, but Coursera later hosted a &lt;a href=&quot;https://www.coursera.org/learn/build-a-computer&quot; rel=&quot;nofollow noreferrer&quot;&gt;course on this&lt;/a&gt; and the videos were very helpful.&lt;/p&gt;&#xA;&lt;p&gt;At the least, you may get some ideas or inspiration from these resources.&lt;/p&gt;&#xA;" OwnerUserId="2706" LastActivityDate="2023-02-24T14:15:53.320" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7647" PostTypeId="1" AcceptedAnswerId="7648" CreationDate="2023-02-27T16:59:10.487" Score="2" ViewCount="70" Body="&lt;p&gt;I am reading the book: Hacking: The Art of Exploitation, and the author has provided examples of buffer overflow attacks and nop-sled exploits.&lt;/p&gt;&#xA;&lt;p&gt;I somehow can’t run these examples on my MacOS/Linux as they seem to have patched these vulnerabilities.&lt;/p&gt;&#xA;&lt;p&gt;Is there an Operating System which is so basic when it comes to security, that I can play around with these exploits?&lt;/p&gt;&#xA;" OwnerUserId="13045" LastActivityDate="2023-03-02T14:48:35.337" Title="Which OS is best if I want to play around with exploits?" Tags="|security|operating-systems|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7648" PostTypeId="2" ParentId="7647" CreationDate="2023-02-27T19:03:42.507" Score="2" Body="&lt;p&gt;That's a really good book that I use with my students!&lt;/p&gt;&#xA;&lt;p&gt;The book comes with a CD that has an image that you can run in Oracle VirtualBox.  You'll also find all of the book examples preloaded there, and the text outputs in the book itself are from that system.  IIRC, it's a dated system from the early 90's with all sorts of protections disabled.&lt;/p&gt;&#xA;&lt;p&gt;Obviously, &amp;quot;Hacking: The Art of Exploitation&amp;quot; is not meant to show you anything especially modern, but instead it guides you through hands-on exploits and teaches foundational ideas about how hacking really works.  It's a wild ride - enjoy it!&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-03-02T14:48:35.337" LastActivityDate="2023-03-02T14:48:35.337" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7650" PostTypeId="1" CreationDate="2023-03-01T07:43:53.487" Score="1" ViewCount="65" Body="&lt;p&gt;This question is not quite appropriate for the community but at my low level of expertise, someone may have an answer. I am retired and using computing as a hobby. My main interest is in things like ant nest simulations, slime moulds, Euler Project, etc. Up until now I have been using javascript (self taught therefore some holes in my knowledge). To me javascript seems to have a text-orientation as opposed to mathematics, which appears to be a secondary concern, and it is very finnicky. I wonder if javascript is the most appropriate language for a hobbyist in my situation. Is there a more appropriate language? I presume other languages have equivalents to D3.js. My other languages are Fortran (1974) and a bit of Java. Thanks.&lt;/p&gt;&#xA;" OwnerUserId="13113" LastEditorUserId="1293" LastEditDate="2023-03-01T11:47:23.817" LastActivityDate="2023-03-15T10:42:29.070" Title="Best language for graphics and general math problem solving for amateur" Tags="|self-learning|language-choice|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7651" PostTypeId="2" ParentId="7650" CreationDate="2023-03-01T11:53:25.710" Score="2" Body="&lt;p&gt;In some ways, the language you know best is the best language, but there are some caveats. Or, at least a language with the same underlying paradigm as the one(s) you know: procedural, OO, functional,...&lt;/p&gt;&#xA;&lt;p&gt;If you are willing to learn a new language, it is more likely to be the available libraries that already exist and that are useful to your needs that is more important than the language itself.&lt;/p&gt;&#xA;&lt;p&gt;I do most everything in Java and find the existing libraries very useful. In other OO languages, I've had to work hard to incorporate other libraries, not built for the language at hand, but available to import. IIRC, Python had that issue in the past, but suspect that problem is solved.&lt;/p&gt;&#xA;&lt;p&gt;In general, investigate available libraries that are part of the language &amp;quot;package&amp;quot;. Perhaps look at some existing projects and see if they seem reasonably similar to what you want to do.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-03-01T11:53:25.710" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7652" PostTypeId="2" ParentId="7650" CreationDate="2023-03-01T17:28:31.597" Score="0" Body="&lt;p&gt;I concur with Buffy that the language you know is largely the best language to work with, particularly because you're not working on particularly &lt;em&gt;specialized&lt;/em&gt; problems.  There is a mathematical bent to what you are doing, but that is well within the capabilities of essentially any language.&lt;/p&gt;&#xA;&lt;p&gt;If you want something more mathematically oriented, you could try Python (it has very good libraries), R, MATLAB, or (if you want a wilder adventure) Mathematica or Scheme, but I don't expect you'll find a significant speed-up in your work flow.&lt;/p&gt;&#xA;&lt;p&gt;Now, that said, I wrote that list of languages in the order I expect you'd find most-to-least familiar. So if you are just looking to expand your programming horizons, take my list in reverse and go one some crazy, mind-expanding adventures.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-03-15T10:42:29.070" LastActivityDate="2023-03-15T10:42:29.070" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7655" PostTypeId="2" ParentId="7536" CreationDate="2023-03-05T02:20:37.893" Score="0" Body="&lt;p&gt;I have been searching my own answer for the past several months, now I have two books added to the list,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&amp;quot;&lt;a href=&quot;https://code.energy/computer-science-distilled/&quot; rel=&quot;nofollow noreferrer&quot;&gt;computer science distilled&lt;/a&gt;&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;&lt;a href=&quot;https://www.howcomputersreallywork.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;How Computers Really Work&lt;/a&gt;&amp;quot;, check here for its &lt;a href=&quot;https://nostarch.com/how-computers-really-work&quot; rel=&quot;nofollow noreferrer&quot;&gt;table of contents&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The &amp;quot;computer science distilled&amp;quot; has only 181 pages so it is an easier read, while &amp;quot;How Computers Really Work&amp;quot; covers the basic concepts of OS, which is one of the things I was looking for. They are both an easy read for my targeted audiences, which is an important factor when I think about my recommendations.&lt;/p&gt;&#xA;&lt;p&gt;Both books cover the basic of digital circuits, so I had a brief discussion with &lt;a href=&quot;https://cseducators.stackexchange.com/users/3524/bob-brown&quot;&gt;Bob Brown&lt;/a&gt; here &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3986/explaining-the-value-of-knowledge-of-digital-logic&quot;&gt;Explaining the Value of Knowledge of Digital Logic&lt;/a&gt; and found out he also wrote a free introductory book for the similar purpose &lt;a href=&quot;https://professorbrown.net/concepts/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9884" LastActivityDate="2023-03-05T02:20:37.893" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7656" PostTypeId="2" ParentId="7033" CreationDate="2023-03-07T08:50:06.650" Score="2" Body="&lt;p&gt;Trying to keep up with web development is hard. Every year there are new tools , new frameworks, new way to do things. But surprisingly I find the following Dinosaurs serials Peter Jang wrote in 2017 &amp;amp; 2018 are still the best materials I would recommend to the new comers. To me it is quite insane that what he wrote in 2017/2018 still stands in 2023.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Modern JavaScript Explained For Dinosaurs&amp;quot;&lt;/a&gt; mainly focus on the tools (including nodejs) used front end development. I can't find any other articles to better explain tools used in front end. For example, even the &lt;a href=&quot;https://webpack.js.org/concepts/&quot; rel=&quot;nofollow noreferrer&quot;&gt;webpack official document&lt;/a&gt; lacks of good explanation of what module bundler is, why use it, or why use it with babel.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/actualize-network/modern-html-explained-for-dinosaurs-65e56af2981&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Modern HTML Explained For Dinosaurs&amp;quot;&lt;/a&gt; is the longest article among this serial (it says 34 minutes to read but it probably takes longer to read it though)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/actualize-network/modern-css-explained-for-dinosaurs-5226febe3525&quot; rel=&quot;nofollow noreferrer&quot;&gt;&amp;quot;Modern CSS Explained For Dinosaurs&amp;quot;&lt;/a&gt;. From my own experience web developer often overlook the importance of css.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I know the question was asked about online course but I have not found a good course to cover them all and up to day.If you are new to web development this serial may take couple of days to digest as you may further google the terms mentioned in the articles. Only after that I would then recommend to learn the framework like react/vue/angular.&lt;/p&gt;&#xA;&lt;p&gt;If you want to learn the modern javascript I would recommend &lt;a href=&quot;https://javascript.info/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://javascript.info/&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="9884" LastActivityDate="2023-03-07T08:50:06.650" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7657" PostTypeId="1" CreationDate="2023-03-07T18:43:34.567" Score="6" ViewCount="185" Body="&lt;p&gt;I'm teaching a course on Intro to Theoretical CS, which is a compulsory course for CS majors. &lt;br /&gt;&#xA;A pre-requisite is Math for CS and a co-requisite is Design of Algorithms.&lt;/p&gt;&#xA;&lt;p&gt;In this course we also cover basics of formal verification - such as Linear Temporal Logic, and Proof systems like natural deduction.&#xA;I'd like to show students some applications of formal verification, through a hands-on (programming) assignment where they can formally verify a simple software program.&lt;/p&gt;&#xA;&lt;p&gt;This is a large class, so I'd prefer if the assignment can be automatically graded.&lt;/p&gt;&#xA;&lt;p&gt;What tools are available which have a nice command line interface, and what programs would be simple enough so that students will easily be able to write specifications in LTL?&lt;/p&gt;&#xA;&lt;p&gt;Any other ideas on how best to give students a hands-on experience with formal verification?&lt;/p&gt;&#xA;" OwnerUserId="13135" LastEditorUserId="13135" LastEditDate="2023-03-08T18:33:56.447" LastActivityDate="2023-03-08T18:33:56.447" Title="How to design an assignment on applications of Formal Verification?" Tags="|programming|lesson-ideas|assessment|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7658" PostTypeId="2" ParentId="7657" CreationDate="2023-03-07T21:58:56.610" Score="4" Body="&lt;p&gt;LTL is really only useful for concurrency. So you want a problem from that space. I'd consider using &lt;a href=&quot;https://spinroot.com/spin/whatispin.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;spin&lt;/a&gt;. Its specification language (Promela) lets you express processes, shared variables, and message passing. You can write simple LTL properties as well. And then the actual spin tool lets you check that your code satisfies the properties. Students don't get bogged down in pen-and-paper proofs in a deduction system for LTL while you have a way to automatically grade submissions.&lt;/p&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-03-07T21:58:56.610" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7659" PostTypeId="2" ParentId="812" CreationDate="2023-03-11T11:22:42.897" Score="2" Body="&lt;h1&gt;CLI vs GUI&lt;/h1&gt;&#xA;&lt;h2&gt;CLI&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easier to use&lt;/li&gt;&#xA;&lt;li&gt;Easier to learn&lt;/li&gt;&#xA;&lt;li&gt;Better for instructing computer what to do.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;GUI&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easier to use&lt;/li&gt;&#xA;&lt;li&gt;Easier to learn&lt;/li&gt;&#xA;&lt;li&gt;Better for visualising: looking at images, charts, graphs, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Easy to use&lt;/h2&gt;&#xA;&lt;p&gt;There are two definitions of &amp;quot;easy to use&amp;quot;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Meaning 1: easy to learn.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Meaning 2: easy to do for someone with experience.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We often get stuck in the local minima of meaning 1, and don't put in the effort to achieve meaning 2.&lt;/p&gt;&#xA;&lt;h2&gt;Easy to learn&lt;/h2&gt;&#xA;&lt;p&gt;There are two definitions of &amp;quot;easy to learn&amp;quot;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Meaning 1: Without reference to manuals or examples, a learner can figure it out by playing with the tool.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Meaning 2: easy to figure out by examples.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Easy to learn — meaning 2&lt;/h3&gt;&#xA;&lt;p&gt;E.G.&lt;/p&gt;&#xA;&lt;p&gt;This answer, and everything on stack-overflow, is written in Markdown. If the reader wants to know how I did something, then they just need to look at the Markdown. If it was done in a WYSIWYG (what you see is what you get) editor, such as a word processor, then they are out of luck. There is just no way to find out.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, I can give students examples (heading, bullet lists, etc). Students can study these, and try them out for themselves.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-03-11T11:22:42.897" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7660" PostTypeId="2" ParentId="812" CreationDate="2023-03-18T13:13:44.130" Score="0" Body="&lt;p&gt;Here in 2023, I'd be asking &amp;quot;does the command line &lt;em&gt;even have&lt;/em&gt; value?&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;In my view, the command line is completely superseded for interactive use. It might be useful as an aid to teaching scripting/programming principles, but not as a generally useful tool in itself.&lt;/p&gt;&#xA;&lt;p&gt;I learnt computing in the era when you often had to use the DOS command line to get things done. But I can't remember the last time I had to do so, and I'm sure it didn't involve issuing more than one command.&lt;/p&gt;&#xA;&lt;p&gt;It seems there would be no justification for routinely teaching any of the details of command-line environments nowadays.&lt;/p&gt;&#xA;&lt;p&gt;The combination of GUI (for discoverability or infrequent use) and scripting language (for documenting or executing pre-planned sequences of commands) has been king in usability for at least 25 years.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-03-18T13:13:44.130" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7661" PostTypeId="1" CreationDate="2023-03-22T13:53:58.067" Score="3" ViewCount="81" Body="&lt;p&gt;I told students that singly linked lists can have cycles. A student asked &lt;em&gt;why&lt;/em&gt; one would. Are there good examples, or is it just something that comes up on job interviews?&lt;/p&gt;&#xA;" OwnerUserId="283" LastActivityDate="2023-03-29T11:12:28.303" Title="What is a motivating example for a cyclic linked list?" Tags="|data-structure|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7662" PostTypeId="2" ParentId="7661" CreationDate="2023-03-22T17:19:24.590" Score="2" Body="&lt;p&gt;Real world examples, used by people all the time, would be playing board games and card games where each player gets a turn, in order. Real world examples, used by computers all the time, could include multitasking for the CPU, where each process is given an opportunity to use the processor for some of it's work, each in turn. Real world examples for applications at the regular software developer's role could include a scheduling system for technicians on service work orders, to determine which person is assigned the next task, and after the last one in the list, the first one is next. Polling systems, where on central system regularly requests updated data, sales figures perhaps, from satellite offices, going from the first to the last and returning to the first.&lt;/p&gt;&#xA;&lt;p&gt;Based on this sampling I'm sure you can find examples your students would relate to either from their life in school, or projects they have in their coursework.&lt;/p&gt;&#xA;" OwnerUserId="104" LastActivityDate="2023-03-22T17:19:24.590" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7663" PostTypeId="2" ParentId="7661" CreationDate="2023-03-22T17:39:50.263" Score="2" Body="&lt;p&gt;As Gypsy Spellweaver proposed, I think that task schedulers are a good example, but I'd just like to put in another voice towards video games.&lt;/p&gt;&#xA;&lt;p&gt;A roller coaster track that the player builds is a good example, and so is a cyclic board in a game like Loop Hero.&lt;/p&gt;&#xA;&lt;p&gt;But we can also think about scenes in Unity.  You are on the main menu, which is a scene that is found... how?  It is a memory address.  You click &amp;quot;Play&amp;quot;, and it loads a new scene.  How does it find that?  Again, by memory address.  When you reach the end of your run, you are brought back to the main menu.&lt;/p&gt;&#xA;&lt;p&gt;Or perhaps you are first brought to an intermediary scene, with a score report.&lt;/p&gt;&#xA;&lt;p&gt;This is a natural cyclic linked list of size 2 (or 3).  The only wrinkle is that the nodes of the list are extremely complex, but a linked list it is nevertheless!  And the reasons for it are, I would hope, pretty intuitive.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-03-22T17:39:50.263" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7664" PostTypeId="2" ParentId="961" CreationDate="2023-03-24T21:44:49.797" Score="0" Body="&lt;p&gt;When I was in industry, my boss said to me: this test driven development thing, [that we introduced recently] its real value is not that it finds bugs, or that we can re-factor without fear. The real value is that it saves us time, because it makes us think before writing the code.&lt;/p&gt;&#xA;&lt;h1&gt;How to encourage its use&lt;/h1&gt;&#xA;&lt;p&gt;For the project, give them code that is already weeks into development, complete with unit-tests. Then, have them add features to the code. Using TDD.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-03-24T21:44:49.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7665" PostTypeId="2" ParentId="7661" CreationDate="2023-03-25T10:13:36.670" Score="1" Body="&lt;p&gt;One classic use is to implement a queue as a circular list. The reference to the queue itself is a &amp;quot;pointer&amp;quot; (or suchlike) to the tail, with the tail pointing to the head.&lt;/p&gt;&#xA;&lt;p&gt;It is then easy to add items (nodes) at the tail and remove them at the head.&lt;/p&gt;&#xA;&lt;p&gt;Another is to implement a set of tasks that must be performed in the same order repeatedly. A &amp;quot;trigger&amp;quot; is used as needed to advance the cycle and begin the next task. Some calendar tasks might be like that.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2023-03-29T11:12:28.303" LastActivityDate="2023-03-29T11:12:28.303" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7666" PostTypeId="2" ParentId="4057" CreationDate="2023-03-27T01:27:57.963" Score="1" Body="&lt;h1&gt;Introduction&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Read the question; these Educational Materials are for Children under age 16.&lt;/p&gt;&#xA;&lt;p&gt;Do use overly sophisticated in overly-technical language when editing this particular wiki&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The question was:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;What is Quick and easy intro to computer science for kids for an Engineering Field Day&amp;quot; It might be best to divide the kids into groups.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;My packet of educational materials below is mostly only for teaching kids who can read big kid books (or even books for adults).&lt;/p&gt;&#xA;&lt;p&gt;Instructions on how to print this packet of educational materials is provided at the end of this post.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;A Packet for Kids &amp;amp; Adults on How to Write Code&lt;/h1&gt;&#xA;&lt;p&gt;In this packet, we will learn about a language used to write computer programs known as &lt;em&gt;&lt;strong&gt;python&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1&gt;Installing an IDE&lt;/h1&gt;&#xA;&lt;p&gt;I recommend something called an &lt;strong&gt;IDE&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I recommend installing something called &amp;quot;PyCharm&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Google &amp;quot;PyCharm&amp;quot; to find it.&lt;/p&gt;&#xA;&lt;h1&gt;Your First Computer Program&lt;/h1&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;print(&amp;quot;hello world&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;When I first installed pyCharm many years ago I could not figure out how to get it to run the program.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/D6Kyh.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/D6Kyh.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Click the green triangle-shaped button in the upper-right corner of PyCharm to run your program.&lt;/p&gt;&#xA;&lt;p&gt;In my day, the green triangle shaped button was a lot smaller and more difficult to see.&lt;/p&gt;&#xA;&lt;h1&gt;What are Strings?&lt;/h1&gt;&#xA;&lt;p&gt;Computer scientists sometimes write code which translates English into Spanish.&lt;/p&gt;&#xA;&lt;p&gt;For example, we might have:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;INPUT:  the English phrase &lt;code&gt;Blue Fish&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;OUTPUT: the Spanish phrase &lt;code&gt;Pez Azul&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/mbADBm.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/mbADBm.jpg&quot; alt=&quot;a picture of a blue fish with both Spanish and English words. I drew it in the GNU image manipulation program&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want to write code, then you need to be familiar with something which computer scientists and programmers call &amp;quot;&lt;strong&gt;strings&lt;/strong&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;In order to store text and translate text from one language to another on a computer, then you need to store your text inside of a &lt;strong&gt;string&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let us talk about three different types of strings:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Binary Strings&lt;/li&gt;&#xA;&lt;li&gt;ASCII Strings&lt;/li&gt;&#xA;&lt;li&gt;Unicode Strings.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;When a &lt;strong&gt;string&lt;/strong&gt; contains only ones and zeros, it is known as a &lt;strong&gt;binary string&lt;/strong&gt;. An example of a &lt;strong&gt;binary string&lt;/strong&gt; is shown below:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-non prettyprint-override&quot;&gt;&lt;code&gt;001010101010111111000100101000101010101&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Nothing but ones and zeros is difficult for people to understand.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, &lt;strong&gt;ASCII encoding&lt;/strong&gt; was invented.&lt;/p&gt;&#xA;&lt;p&gt;To oversimplify things, &lt;strong&gt;ASCII encoding&lt;/strong&gt; is a set of rules for converting for converting letters, such as the letter &lt;code&gt;A&lt;/code&gt;, into 1s and 0s.&lt;/p&gt;&#xA;&lt;p&gt;If you use &lt;strong&gt;ASCII encoding&lt;/strong&gt; to translate &lt;code&gt;A&lt;/code&gt; into a binary string, the result is &lt;code&gt;01000001&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;An &lt;strong&gt;ASCII string&lt;/strong&gt; can store text written English, French, German, or other languages from Western Europe.&lt;/p&gt;&#xA;&lt;p&gt;A lot of people use something called &lt;strong&gt;unicode&lt;/strong&gt; to represent letters written in several of the worlds alphabets.&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Greek Letters (Ελληνικά)&lt;/td&gt;&#xA;&lt;td&gt;Oriya&lt;/td&gt;&#xA;&lt;td&gt;Korean Letters (한글)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Russian Letters (ру́сский)&lt;/td&gt;&#xA;&lt;td&gt;Tamil&lt;/td&gt;&#xA;&lt;td&gt;Ethiopian Letters (ግዕዝ)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Armenian Letters  (Հայոց գրեր)&lt;/td&gt;&#xA;&lt;td&gt;Telugu (తెలుగు)&lt;/td&gt;&#xA;&lt;td&gt;Cherokee Letters (ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;Kannada (ಕನ್ನಡ)&lt;/td&gt;&#xA;&lt;td&gt;Plains Cree (ᓀᐦᐃᔭᐍᐏᐣ)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Hebrew (אלפבית)&lt;/td&gt;&#xA;&lt;td&gt;Malayalam (മലയാളം)&lt;/td&gt;&#xA;&lt;td&gt;Khmer (ភាសាខ្មែរ / ខេមរភាសា)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Arabic (الْأَبْجَدِيَّة الْعَرَبِيَّة)&lt;/td&gt;&#xA;&lt;td&gt;Sinhala (සිංහල අක්ෂර මාලාව)&lt;/td&gt;&#xA;&lt;td&gt;Mongolian&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Syriac (ܐܠܦ ܒܝܬ ܣܘܪܝܝܐ)&lt;/td&gt;&#xA;&lt;td&gt;Thai  (อักษรไทย)&lt;/td&gt;&#xA;&lt;td&gt;Japanese Kanji and Kana  (漢字仮名)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Thaana   (ތާނަ )&lt;/td&gt;&#xA;&lt;td&gt;Lao (ອັກສອນລາວ)&lt;/td&gt;&#xA;&lt;td&gt;Manderin Chinese ( 官话 )&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Devanagari (नागरी)&lt;/td&gt;&#xA;&lt;td&gt;Tibetan  (བོད་སྐད་)&lt;/td&gt;&#xA;&lt;td&gt;Korean ()&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Bengali (বাংলা বর্ণমালা বা লিপি)&lt;/td&gt;&#xA;&lt;td&gt;Myanmar&lt;/td&gt;&#xA;&lt;td&gt;Japanese Hiragana  (平仮名, ひらがな)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Gurmukhi (ਗੁਰਮੁਖੀ)&lt;/td&gt;&#xA;&lt;td&gt;Georgian&lt;/td&gt;&#xA;&lt;td&gt;Katakana  (片仮名、カタカナ)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;In this packet, we will show strings in &lt;strong&gt;ASCII&lt;/strong&gt; instead of &lt;strong&gt;unicode&lt;/strong&gt; because &lt;strong&gt;unicode&lt;/strong&gt; is complicated for some Americans and Europeans.&lt;/p&gt;&#xA;&lt;p&gt;If you want to, you can put only one or two words inside of a &lt;em&gt;&lt;strong&gt;text string&lt;/strong&gt;&lt;/em&gt; . If you want to, write two or three words in the space below:&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&lt;hr /&gt;&#xA;&lt;p&gt;A name for someone's favorite food might be an example of a &lt;em&gt;&lt;strong&gt;text string&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A text string can also be the title of of a book, such a book you like.&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;A text string can also be the entire contents of a book, such as  &lt;strong&gt;One fish, two fish, red fish, blue fish&lt;/strong&gt; by &lt;a href=&quot;https://en.wikipedia.org/wiki/Dr._Seuss&quot; rel=&quot;nofollow noreferrer&quot;&gt;Dr. Seuss&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;One fish, Two fish, Red fish, Blue fish,&#xA;Black fish, Blue fish, Old fish, New fish.&#xA;This one has a little car.&#xA;This one has a little star.&#xA;[...SNIP...]&#xA;Where do they come from? I can't say.&#xA;But I bet they have come a long, long way.&#xA;we see them come, we see them go.&#xA;Some are fast. Some are slow.&#xA;Some are high. Some are low.&#xA;Not one of them is like another.&#xA;Don't ask us why, go ask your mother. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The Collected Works of William Shakespeare would be an example of a very long &lt;em&gt;&lt;strong&gt;text string&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The simplest &lt;em&gt;&lt;strong&gt;text strings&lt;/strong&gt;&lt;/em&gt; contain only one letter.&lt;/p&gt;&#xA;&lt;h2&gt;The text string Containing the letter &lt;code&gt;A&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;A&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;The text string Containing the letter &lt;code&gt;B&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;B&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;The text string Containing the letter &lt;code&gt;B&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;C&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Most people want to have things inside of their text strings other than &lt;em&gt;&lt;strong&gt;letters&lt;/strong&gt;&lt;/em&gt; such as &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;Z&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Most people like having space characters.&lt;/p&gt;&#xA;&lt;p&gt;Otherwise, we have have:&lt;/p&gt;&#xA;&lt;p&gt;Mostpeoplelikehavingspacecharacters.&lt;/p&gt;&#xA;&lt;p&gt;As a second example we have &lt;strong&gt;The Little Car String&lt;/strong&gt; :&lt;/p&gt;&#xA;&lt;h1&gt;The Little Car String with Spaces&lt;/h1&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;This one has a little car.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;The Little Car String without Spaces&lt;/h1&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;Thisonehasalittlecar.    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In general, each of the &lt;em&gt;things&lt;/em&gt; contained in a text string is known as a &lt;strong&gt;character&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Space-characters might not be letters, but they are &lt;strong&gt;characters&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Without line-feed *&lt;strong&gt;characters&lt;/strong&gt; everything would all be all be on one very long line going off to the right.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;One fish Two fish Red fish Blue fish Black fish Blue fish Old fish New fish. This one has a little car. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We can insert some line-feeds to have a text string appear on multiple lines&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;One fish&#xA;Two fish&#xA;Red fish&#xA;Blue fish&#xA;Black fish&#xA;Blue fish&#xA;Old fish&#xA;New fish.&#xA;This one&#xA;has a&#xA;little car. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;All of the letters and other things inside of an ASCII string are called &amp;quot;&lt;strong&gt;characters&lt;/strong&gt;&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;CAT.DOG&lt;/code&gt; is a text string.&lt;/p&gt;&#xA;&lt;p&gt;The letter &lt;code&gt;C&lt;/code&gt; in &lt;code&gt;CAT.DOG&lt;/code&gt; is a character.&lt;/p&gt;&#xA;&lt;p&gt;The period dot in &lt;code&gt;CAT.DOG&lt;/code&gt; is also a character.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;&lt;strong&gt;characters&lt;/strong&gt;&amp;quot;&#xA;Otherwise, &lt;code&gt;CAT DOG&lt;/code&gt; would be just &lt;code&gt;CAT DOG&lt;/code&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Additional Notes&lt;/h1&gt;&#xA;&lt;h2&gt;How to Print This Stuff Out on Paper&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Select all of the text in this post.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Copy the text&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to copy text on Windows press the control-key Ctrl&amp;lt;\kbd&amp;gt; and  C &amp;lt;\kbd&amp;gt; at the same time.&lt;/li&gt;&#xA;&lt;li&gt;to copy text on Apple Mac/iOS press  ⌘ Command &amp;lt;\kbd&amp;gt; and  C &amp;lt;\kbd&amp;gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Paste the text into a word processor such as Microsoft Word, &lt;a href=&quot;https://ubuntu.com/download/desktop&quot; rel=&quot;nofollow noreferrer&quot;&gt;office libre&lt;/a&gt;, or &lt;em&gt;Pages&lt;/em&gt; on Apple Macintosh iOS&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;to past text on Windows press the control-key Ctrl&amp;lt;\kbd&amp;gt; and  V &amp;lt;\kbd&amp;gt; at the same time.&lt;/li&gt;&#xA;&lt;li&gt;to paste text on Apple Mac/iOS press  ⌘ Command &amp;lt;\kbd&amp;gt; and  V &amp;lt;\kbd&amp;gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Print it as ink on a sheet of physical paper&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2&gt;Where to Get Cheap Used Laptop Computer&lt;/h2&gt;&#xA;&lt;p&gt;I recommend buying used laptops off of &lt;a href=&quot;https://www.ebay.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;eBay&lt;/a&gt; for less than 30 USD each.&lt;/p&gt;&#xA;&lt;p&gt;If you are worried about a used laptop being infected with a virus or having pornography on it, then google &amp;quot;how to install ubuntu os&lt;a href=&quot;https://ubuntu.com/download/desktop&quot; rel=&quot;nofollow noreferrer&quot;&gt;2&lt;/a&gt;&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;If you re-install the operating system (OS), the viruses will be inert and the pornography will outside of the index for in-use hard-drive space.&lt;/p&gt;&#xA;&lt;p&gt;Make sure that the laptop you buy has more than 16GB of RAM.&lt;/p&gt;&#xA;&lt;p&gt;The number one reason a computer is too slow is not enough RAM (random access memory).&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-03-27T01:27:57.963" CommentCount="0" CommunityOwnedDate="2023-03-27T01:27:57.963" ContentLicense="CC BY-SA 4.0" />
  <row Id="7667" PostTypeId="1" CreationDate="2023-03-27T01:35:35.373" Score="2" ViewCount="581" Body="&lt;p&gt;When a student is first learning about class inheritance it is nice to use an example from every-day life. For example, &lt;code&gt;Plastic Cups&lt;/code&gt; are &lt;code&gt;Cups&lt;/code&gt; and &lt;code&gt;GlassCups&lt;/code&gt; are also &lt;code&gt;Cups&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;class Cup:   &#xA;    pass&#xA;&#xA;class PlasticCup(Cup):&#xA;    pass  &#xA;&#xA;class PaperCup(Cup):&#xA;    pass  &#xA;&#xA;class RoughHewnWoodenCup(Cup):&#xA;    pass  &#xA;&#xA;class Glass(Cup):&#xA;    pass  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I am aware that interface classes exist, wrapper classes exist, etc...&lt;/p&gt;&#xA;&lt;p&gt;I think that when dealing with new students the principle of inheritance is best explained with analogies to life outside of writing code.&lt;/p&gt;&#xA;&lt;p&gt;For example, &lt;code&gt;PlasticCups&lt;/code&gt; are &lt;code&gt;Cups&lt;/code&gt;, so &lt;code&gt;PlasticCups&lt;/code&gt; inherit from the &lt;code&gt;Cup&lt;/code&gt; class.&lt;/p&gt;&#xA;&lt;p&gt;I have an example using Cups but my questions is,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What Examples of class inhertance can you provide which do not talk about drinking vessels for beverages such as water or fruit juice?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Your answer need not use python-style syntax. Use whatever syntax you prefer.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-10T00:22:18.193" Title="What is an example of class inheritance in every-day life which is easy to write in an object-oriented language?" Tags="|object-oriented-paradigm|code-example|objects-first|" AnswerCount="5" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7668" PostTypeId="2" ParentId="7667" CreationDate="2023-03-27T12:02:49.907" Score="2" Body="&lt;p&gt;It depends on the goal.  For an initial, highly intuitive brush, I've frequently used animals. They share some advantages over cups.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;There are a &lt;em&gt;lot&lt;/em&gt; of them.&lt;/li&gt;&#xA;&lt;li&gt;They already come pre-categorized into class trees thanks to hundreds of years of labor by thousands of people.&lt;/li&gt;&#xA;&lt;li&gt;It's not just a good example, it is quite real. Animals utilize genuine inheritance. Racoons are able to produce bile for the same reason that we are, because we inherited the DNA for a gallbladder from our common ancestors, and the behaviors of these organs is essentially the same for both species.&lt;sup&gt;1&lt;/sup&gt;&lt;/li&gt;&#xA;&lt;li&gt;Animals don't just do well to explain inheritance, but lend themselves towards a lot more advanced thinking.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;They clearly lend themselves to inheritance well, because they are genuine manifestations of it in nature. (All mammals growHair(), but along the tree, rodentia's approach would implement that as fur, and the naked mole rat would have to override that yet again.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;At this point it's worth noting that I do not advocate sticking to only this example. Once it has been made intuitive, it's time to move on and have students try it in other contexts.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The example also readily (happily!) switches over to teaching abstract classes once students are ready. &lt;em&gt;(Earlier we examined a fictional animal system. But there was a bit of a problem before that we didn't delve into. Let's look at this now: I can instantiate a&lt;/em&gt; &lt;em&gt;&lt;strong&gt;poecilia latipina,&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;but what would it mean to instantiate a fish?? That shouldn't be possible! &amp;quot;Fish&amp;quot; isn't a specific fish, it's an abstract idea of fish...)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;It also lends itself to interfaces.  &lt;em&gt;(Earlier, we looked at a fictional animal inheritance system.  It had another problem!  We might start with the idea that birds fly, but what of penguins? Or bats? We need a new tool for this action.)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want them to think deeply about OOP (&lt;em&gt;after&lt;/em&gt; they've learned the pieces of it well) have them consider &lt;a href=&quot;https://en.m.wikipedia.org/wiki/Carcinisation&quot; rel=&quot;nofollow noreferrer&quot;&gt;carcinization&lt;/a&gt;. How would something like that be represented in OOP? To my taste, there is no fixed answer, but it's an interesting question and lends itself to deeper thinking about both OOP and biology.&lt;/p&gt;&#xA;&lt;p&gt;#Bad Coding Practice in the Animal Kingdom#&lt;/p&gt;&#xA;&lt;p&gt;There was an objection in the comments section, pointing out that it is bad practice to have a child's interface become larger than the parent interface. I would strenuously argue that, while this is true, we are still duty-bound to explain what inheritance can do, and in languages like Java and C++, we are able to expand the interface. We must make the mechanics of this as intuitive as the rest.&lt;/p&gt;&#xA;&lt;p&gt;It's also worth noting that all of this animal stuff probably takes no more than 15 (cumulative!) minutes over three different days. I also heavily lean into good coding practice in my courses, but I do it in many passes.&lt;/p&gt;&#xA;&lt;p&gt;This is an example from nature. It does not follow good coding style, but that's not necessarily a flaw. It is perfectly reasonable to revisit the animal example later on and talk about why we might not want to allow children to expand interfaces in our own programming projects.&lt;/p&gt;&#xA;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; You may notice an apparent difference between biological and OOP inheritance in that due to limited lifespan, we are not literally handing our bilirubin to our ancestor in order to make the bile - we instead inherit the mechanism to do it ourselves.  However, I would argue that this is worth mentioning, but not a difference that you would want to lean into too hard in the classroom, as this passing of information up and down the hierarchy breaks OOP's metaphor. We are not meant to even be aware of such cross-generational passing when we use an object in OOP. It is only important briefly when coding the object itself.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-03-28T13:34:22.473" LastActivityDate="2023-03-28T13:34:22.473" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7669" PostTypeId="2" ParentId="7667" CreationDate="2023-03-27T15:10:17.487" Score="8" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;I think that when dealing with new students the principle of inheritance is best explained with analogies to life outside of writing code.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'm not so sure. I prefer to use application-centric examples because the connection between the example and an actual program that students care about is clear.&lt;/p&gt;&#xA;&lt;p&gt;Students are likely never going to write a program dealing with cups, cars or animals or most of the other examples that are typically brought out in courses, leading to a &amp;quot;why should I care?&amp;quot; effect.&lt;/p&gt;&#xA;&lt;p&gt;I prefer to simply jump right into the actual use case for inheritance. If there is no immediate use case, then I'd try to invent one that motivates a situation where it's awkward not to use inheritance, then show how inheritance solves the problem elegantly. If I can't, then it's probably not useful to teach inheritance at this point (assuming I have control over the curriculum).&lt;/p&gt;&#xA;&lt;p&gt;For example, if the course deals with back end programming, perhaps a &lt;code&gt;User&lt;/code&gt; class with a &lt;code&gt;Moderator&lt;/code&gt; subclass which is a &lt;code&gt;User&lt;/code&gt; with the ability to delete comments would be a useful motivation. Another &lt;code&gt;User&lt;/code&gt; could be &lt;code&gt;UnconfirmedUser&lt;/code&gt; which needs email confirmation to become a &lt;code&gt;User&lt;/code&gt;. Since just about everyone is familiar with signing up for apps and posting in comment threads (feel free to call the activity &amp;quot;Reddit comments&amp;quot; or similar), the example will immediately connect to an app the students can grasp and realize.&lt;/p&gt;&#xA;&lt;p&gt;For a course that involves game programming, creating a tree of &lt;code&gt;Entity&lt;/code&gt; classes that have &lt;code&gt;Player&lt;/code&gt; and &lt;code&gt;Enemy&lt;/code&gt; (with further subclasses for different types of enemies) could neatly illustrate avoiding repetition and using polymorphism to loop over the &lt;code&gt;Entities&lt;/code&gt; and &lt;code&gt;.render()&lt;/code&gt; each one regardless of its type. If you don't have easy access to graphics, this could be part of a text adventure game.&lt;/p&gt;&#xA;&lt;p&gt;Also in the graphics domain could be a &lt;code&gt;Shape&lt;/code&gt; superclass with derived &lt;code&gt;Rectangle&lt;/code&gt;, &lt;code&gt;Triangle&lt;/code&gt;, &lt;code&gt;Square&lt;/code&gt;, etc (with &lt;code&gt;Square&lt;/code&gt; being derived from a &lt;code&gt;Rectangle&lt;/code&gt;). Most languages have lightweight graphics libraries (often turtle graphics) to enable your students to draw these shapes. Seeing them on the screen is much more concrete than printing out properties of cups or animals.&lt;/p&gt;&#xA;&lt;p&gt;If you're totally set on &amp;quot;real life&amp;quot; (exists physically) over &amp;quot;real world&amp;quot; (exists in code people actually write), there are still many options that cover both: e-commerce &lt;code&gt;Product&lt;/code&gt;s with derived categories, &lt;code&gt;Employee&lt;/code&gt; classes with &lt;code&gt;Manager&lt;/code&gt;, &lt;code&gt;Intern&lt;/code&gt; subclasses (a bit boring and enterprisey), a Minecraft-related inventory system &lt;code&gt;Item&lt;/code&gt; or &lt;code&gt;Mineral&lt;/code&gt; which maps to physical items, etc.&lt;/p&gt;&#xA;&lt;p&gt;It's a good instinct to be practical, but keeping one foot firmly in the computer application world keeps the gap bridged and avoids contrivance.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastActivityDate="2023-03-27T15:10:17.487" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7670" PostTypeId="2" ParentId="7667" CreationDate="2023-03-27T23:30:23.997" Score="0" Body="&lt;p&gt;This is a harder question than it seems if you want to get across the idea that a type hierarchy should contain variations but with the &lt;em&gt;same interface&lt;/em&gt;. If the interface gets extended as you go down the hierarchy then you have the problem that you too-often need to do type casting of variables (Java) or risk runtime failure (Python) if you make certain assignments and then try to message the referenced object.&lt;/p&gt;&#xA;&lt;p&gt;In particular, I try to get this idea across early, since if it isn't taught and the opposite process is, it can be very hard to unlearn bad (IMO) habits and replace them. It was for me in fact.&lt;/p&gt;&#xA;&lt;p&gt;It is the same problem you get using too many if-statements and the program becomes so ad-hoc that it is difficult to understand, much less modify.&lt;/p&gt;&#xA;&lt;p&gt;Your example of cups is pretty good, I think, since cups should all be able to have the same usages (think UI). So, I'd try to think about things in real life that are basically alike, but have variations.&lt;/p&gt;&#xA;&lt;p&gt;Clothing fits that in some ways. There are many variations on &amp;quot;skirt&amp;quot; or &amp;quot;pants&amp;quot; or &amp;quot;jacket&amp;quot; that all interface to the world in the same way. They have color, closure methods, sizes, etc. but a visit to a clothing store will give you a sense of the variations.&lt;/p&gt;&#xA;&lt;p&gt;I'll also note that all of the keys on my current keyboard have the same &amp;quot;interface&amp;quot; but all perform a different task.&lt;/p&gt;&#xA;&lt;p&gt;Smartphones are pretty generic, actually, in spite of the marketing hype. Mine is probably a lot like yours.&lt;/p&gt;&#xA;&lt;p&gt;Vehicle is a poor choice unless you restrict things greatly. Buses and cars seem to need different interfaces. But, within a narrow range, it might be made to work. If you ask for the &amp;quot;fare&amp;quot; for buses, but not cars then you get in to trouble.&lt;/p&gt;&#xA;&lt;p&gt;Note that I try to build software, and teach how to build it, so that objects can be responsible for their own actions and when I ask an object to do something it should be able to respond without me knowing (or specifying) its precise implementation.&lt;/p&gt;&#xA;&lt;p&gt;So, I find problems when the interface and the implementation are too tightly bound together. When I need to do such things. I'd rather extend the interface explicitly (Java, again) and then implement the new interface than simply add public methods to something with a more general interface. Then, (more Java), you can let variables have interface types, rather than concrete types.&lt;/p&gt;&#xA;&lt;p&gt;FWIW, I can't always accomplish that, but it is a goal and it results in better code.&lt;/p&gt;&#xA;&lt;p&gt;As I said in a comment to another question, the Linnaeus hierarchy of the animal kingdom consists entirely of abstract &amp;quot;classes&amp;quot; except at the leaves of the structure. I think that is important to keep in mind.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2023-03-29T11:15:17.023" LastActivityDate="2023-03-29T11:15:17.023" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7671" PostTypeId="2" ParentId="7667" CreationDate="2023-03-29T09:48:54.957" Score="0" Body="&lt;p&gt;Real world examples are good, before you get to coding. Use them first to explain the idea. Then introduce a coding problem: How can we use this idea to simplify this code.&lt;/p&gt;&#xA;&lt;p&gt;Some languages prevent the most powerful use of this idea. E.g Java only allows multiple inheritance of interfaces. Eiffel, Python (it's a duck), and Rust, don't have this problem.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-03-29T09:48:54.957" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7672" PostTypeId="1" CreationDate="2023-03-30T10:57:10.497" Score="2" ViewCount="52" Body="&lt;p&gt;At our university we notice that our first years students' &amp;quot;computer literacy&amp;quot; is declining over the years, probably because of the rise of smartphone usage, replacing regular computer use.&lt;/p&gt;&#xA;&lt;p&gt;We are looking for a textbook that would help these students, age around 18, understand more of computers and computing in general. Examples of topics would be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;history of the computer&lt;/li&gt;&#xA;&lt;li&gt;different hardware parts of a computer&lt;/li&gt;&#xA;&lt;li&gt;how does software and programming work&lt;/li&gt;&#xA;&lt;li&gt;how do companies use computers (office applications, administrative applications, business intelligence)&lt;/li&gt;&#xA;&lt;li&gt;what is networking, the internet, cloud computing,  how does it work&lt;/li&gt;&#xA;&lt;li&gt;how to use AI&lt;/li&gt;&#xA;&lt;li&gt;computer security&lt;/li&gt;&#xA;&lt;li&gt;...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Can anyone recommend a textbook or resources about this?&lt;/p&gt;&#xA;" OwnerUserId="13205" LastActivityDate="2023-05-06T01:35:58.700" Title="Computer literacy textbook for first years students in higher education" Tags="|digital-literacy|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7673" PostTypeId="1" CreationDate="2023-03-30T13:34:14.437" Score="0" ViewCount="24" Body="&lt;p&gt;There are domain-specific large language models such as &lt;a href=&quot;https://github.com/microsoft/BioGPT#pre-trained-models&quot; rel=&quot;nofollow noreferrer&quot;&gt;BioGPT&lt;/a&gt; that are fine-tuned for biology-related tasks, but they are targeted towards researchers and workers in that field.&lt;/p&gt;&#xA;&lt;p&gt;If we want to develop a language model for educational use by teachers and students, what pedagogical skills and procedural knowledge should be embedded into it? What tasks should be designed to train the model to effectively utilize those skills?&lt;/p&gt;&#xA;" OwnerUserId="12575" LastActivityDate="2023-03-30T13:34:14.437" Title="How can we tailor a large language model for educational purposes by incorporating instructional and pedagogical-specific skills and knowledge?" Tags="|artificial-intelligence|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7674" PostTypeId="1" CreationDate="2023-03-31T07:27:20.093" Score="0" ViewCount="97" Body="&lt;p&gt;I have been learning rust since 2021. I followed different courses from YouTube and others. Then I shifted towards books to learn rust and right now after two years I am doing same thing and learning rust from documents from the webs.&lt;/p&gt;&#xA;&lt;p&gt;My main point to learn rust is that when I am learning form YouTube playlist of Indian YouTuber basically the playlist is well-designed, but there are some main concepts missing, so I shifted books to learn advance topics of rust. After reading half of different books I think I know rust so decide to create some projects. After creating all this stuff, I realized I am stuck again in some topics and some concepts are missing, or I don't know them.&lt;/p&gt;&#xA;&lt;p&gt;After that right now after 2 year I am learning rust again.&lt;/p&gt;&#xA;&lt;p&gt;My main question is what is the best way to learn a new framework / language, and how to avoid the loop where I am stuck.&lt;/p&gt;&#xA;" OwnerUserId="11579" LastEditorUserId="204" LastEditDate="2023-05-21T08:44:03.057" LastActivityDate="2023-05-21T08:44:03.057" Title="what is a good way to learn new framework / language?" Tags="|self-learning|programming|resource-request|best-practice|struggling-students|" AnswerCount="1" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7675" PostTypeId="1" CreationDate="2023-04-05T06:33:44.817" Score="0" ViewCount="115" Body="&lt;p&gt;Which one is better way in programmig:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;If you have a problem for programming, try to search solution from the Internet.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Learn useful parts of the programming language by heart and learn how to apply those well. Then you can spend your days without Internet just by programming. You get your things done although someone might have put some part of the code somewhere on the Internet.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="13228" LastActivityDate="2023-05-29T20:09:15.417" Title="Is it useful to search code from the Internet?" Tags="|programming|" AnswerCount="3" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7676" PostTypeId="2" ParentId="7675" CreationDate="2023-04-05T18:51:08.203" Score="2" Body="&lt;p&gt;Available code in the internet are made to be find, however Internet doenst like very much when you ask for code that are not of common use.&#xA;If you &amp;quot;learn useful parts of the programming language by heart and learn how to apply those well&amp;quot; then you will be in full control and will not be in a inpass because of inflexible code/framework from the Internet.&lt;/p&gt;&#xA;" OwnerUserId="13229" LastActivityDate="2023-04-05T18:51:08.203" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7677" PostTypeId="2" ParentId="7674" CreationDate="2023-04-05T20:16:14.580" Score="-1" Body="&lt;p&gt;If you are self-taught, understanding the concepts may require a hard sciences course before studying the framework or programming language. Dedicated instructors or support should be available to facilitate learning. You usually learn by looking for examples and asking on forums. Some things are just too hard to work on or learn when you're not getting paid.&lt;/p&gt;&#xA;" OwnerUserId="13229" LastActivityDate="2023-04-05T20:16:14.580" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7678" PostTypeId="1" AcceptedAnswerId="7693" CreationDate="2023-04-06T09:28:52.673" Score="0" ViewCount="56" Body="&lt;p&gt;I got a low paid unity job with my beginner-intermediate knowledge of unity. Now what unity skills and other technologies I should be learning to get a high paying job that requires experience and a bunch of skillsets related to game dev?&#xA;(example: like some high paying job descriptions require backend integration)&#xA;It would be great if someone with game dev experience could list it all.&lt;/p&gt;&#xA;" OwnerUserId="8470" LastEditorUserId="204" LastEditDate="2023-05-17T20:05:27.027" LastActivityDate="2023-05-17T20:05:27.027" Title="What unity skills and other technologies I need for high paying Unity jobs?" Tags="|programming|game-design|" AnswerCount="1" CommentCount="3" ClosedDate="2023-05-29T10:37:55.553" ContentLicense="CC BY-SA 4.0" />
  <row Id="7679" PostTypeId="1" CreationDate="2023-04-06T15:25:27.830" Score="2" ViewCount="139" Body="&lt;p&gt;I am teacher in high school, and I would like to teach socket programming. How can I teach socket programming?&lt;/p&gt;&#xA;" OwnerUserId="9368" LastActivityDate="2023-05-17T20:16:03.133" Title="How can I teach socket programming?" Tags="|programming|networks|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7680" PostTypeId="2" ParentId="7679" CreationDate="2023-04-06T15:59:13.903" Score="3" Body="&lt;p&gt;We are developing a couple units on Sockets for our post-AP students. It is a work in progress.&lt;/p&gt;&#xA;&lt;p&gt;We begin with 2-3 days about the OSI model. There are some great videos from Crash Course Computer Science and Code.org about how networks work that you can center around.&lt;/p&gt;&#xA;&lt;p&gt;Then for 2-3 days we teach the concept of threading and race conditions.&lt;/p&gt;&#xA;&lt;p&gt;Finally, we begin writing some simple client/server Java apps -- beginning with very basic ones that just say hello, to multi-user chat servers that pass Strings as their messages (students have a lab where they need to add new message types), to adding objects that are passed as messages instead of Strings, to creating a networked turn-based JavaFx game like Othello.&lt;/p&gt;&#xA;" OwnerUserId="192" LastActivityDate="2023-04-06T15:59:13.903" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7681" PostTypeId="1" CreationDate="2023-04-19T16:25:04.243" Score="2" ViewCount="198" Body="&lt;p&gt;I am looking for project ideas in theory of computing that I can assign to my students in lieu of a final exam.&lt;/p&gt;&#xA;" OwnerUserId="13253" LastActivityDate="2024-02-01T21:47:42.187" Title="Theory of Computing project topics" Tags="|lesson-ideas|cs-theory|" AnswerCount="3" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7683" PostTypeId="2" ParentId="7681" CreationDate="2023-04-19T19:59:21.383" Score="2" Body="&lt;p&gt;Here are a few projects that you could use:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A Turing Machine simulator that, given a specification of a machine and an input, finds some way to simulate the behavior of the machine and provide some sort of (compact) readout of the tape and final state.&lt;/li&gt;&#xA;&lt;li&gt;If you're looking for a bit of fun, use said TM simulator to enter into a contest (I do this with my own students): a variant of the Busy Beaver where the machine must halt on its own before a specified deadline.  Students are free to take as many attempts as they'd like. However, velocity matters, because the final run must be complete by the deadline (typically at the start of class on a certain date), and you will examine all final readouts during that class.  The person or team with the most &amp;quot;1&amp;quot;s on their tape is declared the winner. I call it the Daring Duck, and I have &lt;a href=&quot;https://cseducators.stackexchange.com/a/7240/27&quot;&gt;outlined details of the project here&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A much harder project, if you're looking for that, is to have students create turing machine calculators.  The TM should be able to perform any of the four basic arithmetic operations.  For an activity like this, I would recommend using a tool like &lt;a href=&quot;https://www.turingmachinesimulator.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Turing Machine Simulator&lt;/a&gt;, as it provides excellent visualization of what the TM itself is doing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-04-19T20:05:43.173" LastActivityDate="2023-04-19T20:05:43.173" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7684" PostTypeId="2" ParentId="7681" CreationDate="2023-04-19T20:09:50.097" Score="4" Body="&lt;p&gt;If you're looking for something &lt;em&gt;much&lt;/em&gt; harder than my &lt;a href=&quot;https://cseducators.stackexchange.com/a/7683/27&quot;&gt;other answer&lt;/a&gt;, and your CT course has covered lambda calculus, you can have the students create an untyped lambda calculus REPL, with inputs/outputs that look like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; ; just a blank line&#xA;&amp;gt;&#xA;&amp;gt; justanatom&#xA;justanatom&#xA;&amp;gt; x;withcommentnospaces&#xA;x&#xA;&amp;gt; 0 = \f.\x.x&#xA;Added (λf.(λx.x)) as 0&#xA;&amp;gt; succ = \n.\f.\x.f (n f x)&#xA;Added (λn.(λf.(λx.(f ((n f) x))))) as succ&#xA;&amp;gt; 1 = run succ 0&#xA;Added (λf.(λx.(f x))) as 1&#xA;&amp;gt; + = λm.λn.λf.λx.(m f) ((n f) x)&#xA;Added (λm.(λn.(λf.(λx.((m f) ((n f) x)))))) as +&#xA;&amp;gt; * = λn.λm.λf.λx.n (m f) x&#xA;Added (λn.(λm.(λf.(λx.((n (m f)) x))))) as *&#xA;&amp;gt; 2 = run succ 1&#xA;Added (λf.(λx.(f (f x)))) as 2&#xA;&amp;gt; 3 = run + 2 1&#xA;Added (λf.(λx.(f (f (f x))))) as 3&#xA;&amp;gt; 4 = run * 2 2&#xA;Added (λf.(λx.(f (f (f (f x)))))) as 4&#xA;&amp;gt; 5 = (λf.(λx.(f (f (f (f (f x)))))))&#xA;Added (λf.(λx.(f (f (f (f (f x))))))) as 5&#xA;&amp;gt; 7 = run succ (succ 5)&#xA;Added (λf.(λx.(f (f (f (f (f (f (f x))))))))) as 7&#xA;&amp;gt; pred = λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)&#xA;Added (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u))))) as pred&#xA;&amp;gt; 6 = run pred 7&#xA;Added (λf.(λx.(f (f (f (f (f (f x)))))))) as 6&#xA;&amp;gt; - = λm.λn.(n pred) m&#xA;Added (λm.(λn.((n (λn.(λf.(λx.(((n (λg.(λh.(h (g f))))) (λu.x)) (λu.u)))))) m))) as -&#xA;&amp;gt; 10 = run succ (+ 3 6)&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f (f (f x)))))))))))) as 10&#xA;&amp;gt; 9 = run pred 10&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f (f x))))))))))) as 9&#xA;&amp;gt; 8 = run - 10 2&#xA;Added (λf.(λx.(f (f (f (f (f (f (f (f x)))))))))) as 8&#xA;&amp;gt; true = λx.λy.x&#xA;Added (λx.(λy.x)) as true&#xA;&amp;gt; false = 0&#xA;Added (λf.(λx.x)) as false&#xA;&amp;gt; not = λp.p false true&#xA;Added (λp.((p (λf.(λx.x))) (λx.(λy.x)))) as not&#xA;&amp;gt; even? = λn.n not true&#xA;Added (λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) as even?&#xA;&amp;gt; odd? = \x.not (even? x)&#xA;Added (λx.((λp.((p (λf.(λx.x))) (λx.(λy.x)))) ((λn.((n (λp.((p (λf.(λx.x))) (λx.(λy.x))))) (λx.(λy.x)))) x))) as odd?&#xA;&amp;gt; run even? 0&#xA;true&#xA;&amp;gt; run even? 5&#xA;false&#xA;&amp;gt; run (λy.λx.(x y)) (x x) &#xA;(λx.(x (x x)))&#xA;&amp;gt; run (\x. \x . x) y z&#xA;z&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Fair warning: I do this with my students. The project can be devastatingly difficult for students at this level, and takes every bit of programming knowledge and computational theory know-how that they've developed to create.  You'll want to create a gentle, alternate grading rubric for projects that don't really come together before the deadline.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2024-02-01T21:47:42.187" LastActivityDate="2024-02-01T21:47:42.187" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7686" PostTypeId="2" ParentId="7679" CreationDate="2023-04-22T09:18:15.710" Score="3" Body="&lt;p&gt;I teach socket programming to undergraduates at university level 5 in the UK (Sophomore) and have done this in multiple languages over a considerable period. This is done as an exercise component in a course unit that covers the layered models, protocol specifications and other theoretical topics.&lt;/p&gt;&#xA;&lt;p&gt;It can be taught at another level but the students would need to have some existing coding experience first. The language that you use for the sockets affects the exercise difficulty substantially. I find that C# and Java work satisfactorily whereas it is quite a problem in Python and too detailed in &lt;strong&gt;C&lt;/strong&gt;. The differences are due to subtleties in the socket APIs for those languages in areas such as how deadlocks and interrupts are handled which can confuse a novice.&lt;/p&gt;&#xA;&lt;p&gt;I have a YouTube Video series which focuses on developing a client-server application using C# which may give an idea on the subject.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2023-04-22T09:18:15.710" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7687" PostTypeId="2" ParentId="7681" CreationDate="2023-04-24T19:20:11.627" Score="2" Body="&lt;p&gt;Have them write a translator from non-deterministic automata to the equivalent deterministic ones. For regular languages you know that they recognize the same languages. I'd have to look up how that is for context-free/sensitive. ND Push-down automata with multiple stacks are more powerful than their D equivalent; let them test an example.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2023-04-24T19:20:11.627" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7688" PostTypeId="1" CreationDate="2023-04-25T16:53:29.057" Score="5" ViewCount="85" Body="&lt;p&gt;I teach Web Foundations at a local code school. I give the students a final project where they have to develop some sort of website of their choosing. They have to have 5 pages of content, and they have to include a bit of JavaScript or jQuery. They know with jQuery how to add and remove and toggle a class. We've discussed much more than that, but that is what they have mainly absorbed. The projects are not required to be mobile ready, so they usually will not do a hamburger menu.&lt;/p&gt;&#xA;&lt;p&gt;I try giving my students ideas on what they can do to put jQuery in their site, but many times I run dry of ideas. A carousel seems like a lot of code and something that would be hard for them to do without simply copying the code from an article or page. I have suggested to someone to have a fake submit with an HTML form. But I'm trying to get more ideas.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone know of a resource (web page, book, etc.) that specifically focuses on short jQuery scripts that can be added to a web page for a variety of purposes or effects? I would like to show my students such a resource so they could review it and maybe get ideas for things they could do themselves with not a lot of jQuery. Maybe take something from the ideas and morph it into their own thing.&lt;/p&gt;&#xA;&lt;p&gt;I know Codepen has many examples of things involving a bit but not a ton of jQuery. The problem with Codepen is that there is no way to do any sort of focused filter or search for such types of projects (which would have to filter out things such as SCSS since they are just learning basics). I'm just hoping maybe someone has put out a resource specifically about short jQuery scripts.&lt;/p&gt;&#xA;&lt;p&gt;Thanks!&lt;/p&gt;&#xA;" OwnerUserId="13268" LastActivityDate="2023-05-16T03:44:57.080" Title="Resource for short jQuery additions to websites" Tags="|javascript|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7689" PostTypeId="2" ParentId="7688" CreationDate="2023-04-25T17:07:25.957" Score="2" Body="&lt;p&gt;I guess my first thought would be &lt;a href=&quot;https://jqueryui.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;jQuery UI&lt;/a&gt;, which is possibly exactly what you are looking for.&lt;/p&gt;&#xA;&lt;p&gt;A secondary approach (which you should be probably doing in any case) is to make sure that you save past student projects.  You can choose to make these &amp;quot;visible&amp;quot; to current students, because over time they will create their own &amp;quot;library&amp;quot; of sorts, with internet search eventually being the lookup for snippets for the behaviors the students see.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-04-25T18:46:35.007" LastActivityDate="2023-04-25T18:46:35.007" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7690" PostTypeId="1" CreationDate="2023-04-26T03:00:36.990" Score="0" ViewCount="87" Body="&lt;p&gt;What is an exhaustive as possible list of examples of floating-point literals as they are written in source code?&lt;/p&gt;&#xA;&lt;p&gt;That is, the float is not parsed from a text file with arbitrary floats.&lt;/p&gt;&#xA;&lt;p&gt;The float literal must is written in correct syntax for a programming language such that one or both of the following:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the computer language is mainstream today.&lt;/li&gt;&#xA;&lt;li&gt;the computer language was main-stream in the past.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;double-precision is allowed, single-precision is allowed, any precision is allowed, base 16, base 8, etc...&lt;/p&gt;&#xA;&lt;p&gt;If you understand the question, then you can stop reading the question now.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;The string representation you provide for floating point must be used by the parser, or interpreter, or compiler for source code in one or more language which is well-used in the present or was well-used used in the past such as &lt;a href=&quot;https://en.wikipedia.org/wiki/JavaScript&quot; rel=&quot;nofollow noreferrer&quot;&gt;java-script&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/HTML&quot; rel=&quot;nofollow noreferrer&quot;&gt;HTML&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Python_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;python&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/C%2B%2B&quot; rel=&quot;nofollow noreferrer&quot;&gt;C++&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Fortran&quot; rel=&quot;nofollow noreferrer&quot;&gt;Fortran&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/X86_assembly_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;Intel x86 assembly&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Java&quot; rel=&quot;nofollow noreferrer&quot;&gt;Java&lt;/a&gt;, etc...&lt;/p&gt;&#xA;&lt;p&gt;If the terms &amp;quot;mainstream&amp;quot; and &amp;quot;well-used&amp;quot; are too subjective for your taste, then the following list might help:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/X86_assembly_language&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Intel x86 Assembly language&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fortran&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Fortran&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/C_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&#xA;&lt;a href=&quot;https://en.wikipedia.org/wiki/Java_(programming_language)&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&#xA;ABAP&lt;br /&gt;&#xA;ABL&lt;br /&gt;&#xA;Ada&lt;br /&gt;&#xA;Assembly&lt;br /&gt;&#xA;Awk&lt;br /&gt;&#xA;Bash (Bourne Again Shell) script&lt;br /&gt;&#xA;C&lt;br /&gt;&#xA;C#&lt;br /&gt;&#xA;C++&lt;br /&gt;&#xA;CFML&lt;br /&gt;&#xA;COBOL&lt;br /&gt;&#xA;D&lt;br /&gt;&#xA;Dart&lt;br /&gt;&#xA;Delphi/Object&lt;br /&gt;&#xA;F#&lt;br /&gt;&#xA;Fortran&lt;br /&gt;&#xA;FoxPro&lt;br /&gt;&#xA;Go&lt;br /&gt;&#xA;Groovy&lt;br /&gt;&#xA;Haskell&lt;br /&gt;&#xA;Java&lt;br /&gt;&#xA;JavaScript&lt;br /&gt;&#xA;Julia&#xA;Kotlin&lt;br /&gt;&#xA;Lisp&lt;br /&gt;&#xA;Logo&lt;br /&gt;&#xA;Lua&lt;br /&gt;&#xA;MATLAB&lt;br /&gt;&#xA;Objective-C&lt;br /&gt;&#xA;OpenEdge&lt;br /&gt;&#xA;Perl&lt;br /&gt;&#xA;PHP&lt;br /&gt;&#xA;PL/SQL&lt;br /&gt;&#xA;PowerShell&lt;br /&gt;&#xA;Prolog&lt;br /&gt;&#xA;Python&lt;br /&gt;&#xA;R&#xA;Ruby&#xA;Rust&lt;br /&gt;&#xA;SAS&#xA;Scala&#xA;Scheme&#xA;Scratch&#xA;SQL&lt;br /&gt;&#xA;Swift&lt;br /&gt;&#xA;Transact-SQL&lt;br /&gt;&#xA;TypeScript&lt;br /&gt;&#xA;Visual&lt;br /&gt;&#xA;Visual Basic&lt;br /&gt;&#xA;Zig&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a publicly editable wiki, so feel free to add more to it.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-04-26T06:23:39.317" Title="What is a fairly exhaustive list for how decimal numbers are written in source code?" Tags="|floating-point|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7691" PostTypeId="2" ParentId="7690" CreationDate="2023-04-26T03:00:36.990" Score="1" Body="&lt;p&gt;3.14e2&lt;br /&gt;&#xA;3.14e-67f&lt;br /&gt;&#xA;.14E4f&lt;br /&gt;&#xA;0x10.1p0&lt;br /&gt;&#xA;0x1p5&lt;br /&gt;&#xA;0x1e5&lt;br /&gt;&#xA;3.14'15'92&lt;br /&gt;&#xA;3.14e-4932l&lt;br /&gt;&#xA;3.14e38f&lt;br /&gt;&#xA;3.14e38&lt;br /&gt;&#xA;3.14e38l&lt;br /&gt;&#xA;3.14_15F&lt;br /&gt;&#xA;10_000_000.0&lt;br /&gt;&#xA;+1.23E+1&lt;br /&gt;&#xA;3.1415926D0&lt;br /&gt;&#xA;5.d0&lt;br /&gt;&#xA;1.&lt;br /&gt;&#xA;0xfadebeep-8&lt;/p&gt;&#xA;" OwnerUserId="9253" LastEditorUserId="1940" LastEditDate="2023-04-26T06:23:39.317" LastActivityDate="2023-04-26T06:23:39.317" CommentCount="1" CommunityOwnedDate="2023-04-26T03:00:36.990" ContentLicense="CC BY-SA 4.0" />
  <row Id="7692" PostTypeId="2" ParentId="7318" CreationDate="2023-04-29T19:11:19.420" Score="1" Body="&lt;p&gt;There is not best book.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The answer to your question is &amp;quot;ANY&amp;quot;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Just try any book for 1-2 chapters. Switch to another book, the a third. You will like 1 of the 3 more than the other two. Continue with it. There is no best book. Moreover, asking for recommendations sets up an expectation of something good that won't be fulfilled.&lt;/p&gt;&#xA;" OwnerUserId="13288" LastActivityDate="2023-04-29T19:11:19.420" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7693" PostTypeId="2" ParentId="7678" CreationDate="2023-04-29T19:18:56.080" Score="1" Body="&lt;p&gt;Find 10 job listings for high-paying Unity jobs at companies you would actually work for, in location you would be okay living in (moving to).&#xA;Find 10 more job listings with nearly identical role/psotion titles, bit are either far away (even in a different country), or in an industry or company you wouldn't want to work for or in.&lt;/p&gt;&#xA;&lt;p&gt;Download the text, or otherwise paste it all into Notepad++. Trim the excess. Keep the company descriptions but in a separate file. There are two main areas on any job listing: responsibilities, and qualifications&lt;/p&gt;&#xA;&lt;p&gt;Your goal is to find the pattern in these. Group them together. Be sure to annotate in some way a responsibility&amp;quot; or qualifications that is a &amp;quot;nice to have&amp;quot; versus a &amp;quot;need to have&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Once you've done this, you will know exactly what to learn, or that you'd better move somewhere else if you ever want to make good money. You can follow up this exercise with looking ad 10 LinkedIn profiles of people in the industry who are either making a lot with Unity, have high-skill, or both.&lt;/p&gt;&#xA;" OwnerUserId="13288" LastActivityDate="2023-04-29T19:18:56.080" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7694" PostTypeId="1" CreationDate="2023-05-02T17:01:53.620" Score="7" ViewCount="2348" Body="&lt;p&gt;Given the following:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog rover = new Puppy(&amp;quot;rover&amp;quot;);  // Where Puppy extends Dog &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;A student asked why would you ever want or need a Dog variable point to a Puppy object? The only answer I could come up with is the following:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Suppose we have a game program with Dogs and Puppies. A Puppy may have&#xA;some special attributes and methods that a Dog does not have. Over the&#xA;course of the game we may want our variable &amp;quot;rover&amp;quot; to be able to&#xA;point to a Dog instead of a Puppy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'm comfortable with this answer but are there other kinds of use cases where having a Parent variable point to a Child class would be useful?&lt;/p&gt;&#xA;&lt;p&gt;UPDATE: Thank you everyone for your answers.  It's not clear that I'm communicating the question properly or that respondents understand the question I'm trying to ask.  Let me try again:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog Rover = new Puppy(&amp;quot;Rover&amp;quot;);   //case 1&#xA;Puppy Rover = new Puppy(&amp;quot;Rover&amp;quot;); //case 2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In both cases Puppy extends Dog.  Other than the reason stated in the&#xA;original post are there any use cases where case 1 allows us to do something&#xA;that case 2 would not?&lt;/p&gt;&#xA;&lt;p&gt;It seems in the answers provided (certainly for the&#xA;ones using an ArrayList) we can add to the ArrayList either case 1 or case 2&#xA;and have the same functionality.  In other words, there is no inherent&#xA;advantage of one case over the other.&lt;/p&gt;&#xA;&lt;p&gt;Whether we use a Dog variable or a&#xA;Puppy variable we will still access to the overridden methods, and since a&#xA;Puppy is a Dog we may add either to a ArrayList.&lt;/p&gt;&#xA;&lt;p&gt;I'm just trying to confirm that I'm not missing something.  If I am missing something, a really clear example would be greatly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="13299" LastEditorUserId="13299" LastEditDate="2023-05-04T17:26:17.070" LastActivityDate="2024-02-12T00:46:14.843" Title="Parent class variable pointing to Child class" Tags="|java|object-oriented-paradigm|" AnswerCount="16" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7695" PostTypeId="2" ParentId="7694" CreationDate="2023-05-02T18:04:16.503" Score="7" Body="&lt;p&gt;A common case is if there are multiple subtypes of Dog, you might create an ArrayList which can hold any type of dog.&lt;/p&gt;&#xA;&lt;p&gt;Or you might have a method that takes a reference to a Dog (doesn't care what subtype of dog) and does something with it. So, you will pass in a Puppy object but will now be referring to it as a Dog object.&lt;/p&gt;&#xA;" OwnerUserId="192" LastActivityDate="2023-05-02T18:04:16.503" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7696" PostTypeId="2" ParentId="7694" CreationDate="2023-05-02T18:17:29.720" Score="14" Body="&lt;p&gt;Just to add on to Bryan R's response, upcasting is typically automatic, as a side-effect of data structures or methods that store or utilize a parent type.  There's not &lt;em&gt;much&lt;/em&gt; point to the example in the question.&lt;/p&gt;&#xA;&lt;p&gt;You'll typically find code more like this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Puppy rover = new Puppy(&amp;quot;rover&amp;quot;);  // Where Puppy extends Dog &#xA;walk(rover);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Where walk, elsewhere, would be defined as:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public void walk (Dog d) {&#xA;   // whatever code you'd like for dog walking&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;All use of &lt;code&gt;d&lt;/code&gt; within the &lt;code&gt;walk&lt;/code&gt; method has been upcasted just by nature of calling walk.&lt;/p&gt;&#xA;&lt;p&gt;Alternatively, you might do:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;List&amp;lt;Animal&amp;gt; astoundingMenagerie = new ArrayList&amp;lt;Animal&amp;gt;();&#xA;astoundingMenagerie.add(rover);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Once again, rover will be upcast by nature of being added to &lt;code&gt;astoundingMenagerie&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When I teach this stuff in my topic, I actually keep examples like this close at hand, because the question of &lt;em&gt;why&lt;/em&gt; really is at the core of how students make sense of new material.  I will explain the purpose early on, and also explain the purpose of examples like you've placed in your question: they are a reasonable way to help students get a feel for the mechanics of polymorphism &lt;em&gt;even though they are not really reflective of code that students will typically see in the field.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;As we go through, I'll periodically re-announce that this particular code is silly, but let's see if we can understand what it's doing.&lt;/p&gt;&#xA;&lt;p&gt;Eventually, we come back around to healthier use, but with the mechanics safely mastered.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-05-02T18:17:29.720" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7697" PostTypeId="2" ParentId="7694" CreationDate="2023-05-03T09:07:46.593" Score="4" Body="&lt;p&gt;I think we often confuse the idea of inheritance when we start thinking about it as one comes before the other. Really it's just a tool to reuse functionality and handle things in a uniform way.&lt;/p&gt;&#xA;&lt;p&gt;Consider the example of a staffing system at a company.&lt;/p&gt;&#xA;&lt;p&gt;A base class could be &amp;quot;Employee&amp;quot; which contains all functionality that every employee can do. We can then have various other classes, security, HR...etc that have elevated functions.&lt;/p&gt;&#xA;&lt;p&gt;There could be a function to raise an issue with HR. This is a function of all employees, but it will have to make use of a HR class employee.&lt;/p&gt;&#xA;&lt;p&gt;Therefore the base class &amp;quot;Employee&amp;quot; will have to refer to the sub-class &amp;quot;HR&amp;quot;.&lt;/p&gt;&#xA;" OwnerUserId="1853" LastActivityDate="2023-05-03T09:07:46.593" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7698" PostTypeId="2" ParentId="7694" CreationDate="2023-05-03T12:27:13.553" Score="3" Body="&lt;p&gt;This is the same as when we very commonly do&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Collection&amp;lt;Whatever&amp;gt; toys = new Arraylist&amp;lt;&amp;gt;();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Why do we declare &lt;code&gt;toys&lt;/code&gt; as a Collection yet then instantiate an ArrayList?&lt;/p&gt;&#xA;&lt;p&gt;Reasons can include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The implementation we want might change and we want to decouple the implementation from the use of the object&lt;/li&gt;&#xA;&lt;li&gt;Collection is an interface, so cannot be directly instantiated&lt;/li&gt;&#xA;&lt;li&gt;We want to build a collection of these objects and it is immediately clear we're better off using a super class.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Concretely, this code does not need to change if we change list implementation or even start using a set:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;private Collection&amp;lt;Whatever&amp;gt; processStuff(Collection&amp;lt;Whatever&amp;gt; c) {&#xA;    c.forEach(...);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In general you want to be agnostic as possible to implementation so your code is less brittle.&lt;/p&gt;&#xA;" OwnerUserId="13305" LastActivityDate="2023-05-03T12:27:13.553" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7699" PostTypeId="2" ParentId="7318" CreationDate="2023-05-03T12:30:26.997" Score="0" Body="&lt;p&gt;&lt;strong&gt;Python: Violent Python&lt;/strong&gt;&#xA;A book about practical, hacky, fun uses of Python. Think variety, challenging and networking.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Java: Effective Java&lt;/strong&gt;&#xA;A book about OOP best practices and designs in Java. Helps solidify simple concepts, introduces some design patterns and Java specific pitfalls. Think design, principles and ultimately enterprise architectures.&lt;/p&gt;&#xA;" OwnerUserId="13305" LastActivityDate="2023-05-03T12:30:26.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7700" PostTypeId="2" ParentId="7694" CreationDate="2023-05-03T13:03:13.347" Score="3" Body="&lt;p&gt;This applies mostly to Java, though you can do something similar in Python.&lt;/p&gt;&#xA;&lt;p&gt;But my preference in this case is for Dog to be an interface, not a class. The interface defines the public protocol for messaging &amp;quot;Dog&amp;quot; objects in classes that implement Dog.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, a variable in Java can have an interface type and it is perfectly natural to do so in this case. You are saying that the rover variable is currently referencing a Puppy object, but could reference any other sort of Dog.&lt;/p&gt;&#xA;&lt;p&gt;This gives a slightly more abstract view of your program.&lt;/p&gt;&#xA;&lt;p&gt;If you have a lot of concrete classes that extend one another, especially if they extend the public methods (i.e. the interface) then programming becomes harder as you have to keep track of the specifics at every point in the program. &amp;quot;Is this &lt;em&gt;really&lt;/em&gt; &lt;strong&gt;just&lt;/strong&gt; a Dog or is it &lt;em&gt;really&lt;/em&gt; some subclass object.&lt;/p&gt;&#xA;&lt;p&gt;In my (experienced) view, every explicit cast to a variable, allowing access to subclass methods, is a &amp;quot;Code Smell&amp;quot;. A flaw in the program, just as is a deeply nested if-elseif-else structure. Cleaner code is possible and it is easier to maintain.&lt;/p&gt;&#xA;&lt;p&gt;And, as to terminology in what you wrote, a Dog &lt;em&gt;object&lt;/em&gt; doesn't point to a Puppy object, The variable rover is a reference to an object, not an object.&lt;/p&gt;&#xA;&lt;p&gt;In Python you create &amp;quot;interfaces&amp;quot; as classes in which the methods have empty bodies: pass. There is a syntactic difference, but not a semantic one.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-05-03T13:03:13.347" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7701" PostTypeId="2" ParentId="7694" CreationDate="2023-05-03T13:21:06.953" Score="4" Body="&lt;p&gt;&lt;em&gt;As written&lt;/em&gt;, you can understand the student's confusion:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog rover = new Puppy( &amp;quot;Rover&amp;quot; );&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can &amp;quot;see&amp;quot; that you're creating an instance of Puppy, so why would you put it into a Dog variable?&lt;br /&gt;&#xA;Answer?  Polymorphism.&#xA;OK, maybe not Week 1, but you can work up to it.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps some clearer examples might be:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog rover = petStore.buy( &amp;quot;Rover&amp;quot; ); // You could buy *any* kind of dog. &#xA;&#xA;Dog rover = new ThreeLeggedDog( &amp;quot;Hopalong&amp;quot; ); &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Any dog can be asked to walk but each will do so &lt;em&gt;in its own way&lt;/em&gt; (i.e. according to its own implementation of the &lt;code&gt;walk&lt;/code&gt; method.  If a particular kind of &amp;quot;dog&amp;quot; &lt;em&gt;cannot&lt;/em&gt; do so , then its implementation should throw an Exception.  This follows the Object Oriented design principle, &amp;quot;Tell, don't Ask&amp;quot;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog dog = new Puppy( &amp;quot;Rover&amp;quot; ); &#xA;dog.walk();                     // Off he goes! &#xA;&#xA;dog = new ThreeLeggedDog( &amp;quot;Hopalong&amp;quot; ); &#xA;dog.walk();                     // Not as pretty, but gets there&#xA;&#xA;dog = new DogFish( &amp;quot;Floop&amp;quot; );   // I know, I know; but it's better than NoLeggedDog!&#xA;dog.walk();                     // Throws a CannotWalkException.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13307" LastActivityDate="2023-05-03T13:21:06.953" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7703" PostTypeId="2" ParentId="7688" CreationDate="2023-05-03T19:41:54.937" Score="2" Body="&lt;p&gt;One possibility is a kind of tabbed layout. It can be implemented with only a few basic tools like &lt;code&gt;hide&lt;/code&gt;, &lt;code&gt;show&lt;/code&gt; and &lt;code&gt;toggle&lt;/code&gt;. To make it fancier, you can ask your student to add animations like &lt;code&gt;fadeIn&lt;/code&gt; or changing the background color.&lt;/p&gt;&#xA;&lt;p&gt;Here's a &lt;a href=&quot;https://codepen.io/alexlime/pen/DjYwJz&quot; rel=&quot;nofollow noreferrer&quot;&gt;codepen&lt;/a&gt; example I found.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/KTVSt.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/KTVSt.png&quot; alt=&quot;a tab layout&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="3496" LastActivityDate="2023-05-03T19:41:54.937" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7704" PostTypeId="2" ParentId="7694" CreationDate="2023-05-04T08:05:49.947" Score="0" Body="&lt;p&gt;A common use-case for me is having a single Dog collection as an ItemsSource for a CollectionView (or ListView) and then using an DataTemplateSelector to decide how to show a Puppy vs a Dog in the View. This also makes it a personal choice whether Dog is a class that Puppy inherits or Dog is an interface that Puppy implements.&lt;/p&gt;&#xA;" OwnerUserId="13312" LastActivityDate="2023-05-04T08:05:49.947" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7705" PostTypeId="2" ParentId="7694" CreationDate="2023-05-04T23:12:44.157" Score="5" Body="&lt;p&gt;This sort of thing happens all the time—is &lt;em&gt;guaranteed&lt;/em&gt; to happen‚—if &lt;code&gt;Dog&lt;/code&gt; is an &lt;a href=&quot;https://en.wikipedia.org/wiki/Interface_(Java)&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;interface&lt;/em&gt;&lt;/a&gt; or an &lt;a href=&quot;https://en.wikipedia.org/wiki/Abstract_type&quot; rel=&quot;noreferrer&quot;&gt;&lt;em&gt;abstract class&lt;/em&gt;&lt;/a&gt;. You've got this type, &lt;code&gt;Dog&lt;/code&gt; that is declared because there are operations that you can perform on any kind of dog (e.g., &lt;code&gt;stroke&lt;/code&gt;, &lt;code&gt;call&lt;/code&gt;, &lt;code&gt;feed&lt;/code&gt;, &lt;code&gt;scold&lt;/code&gt;) but it is impossible to instantiate any object that is purely and only a &lt;code&gt;Dog&lt;/code&gt;. The only objects you actually can instantiate are some specific &lt;em&gt;kind&lt;/em&gt; of dog.&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2023-05-04T23:12:44.157" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7706" PostTypeId="2" ParentId="7694" CreationDate="2023-05-05T00:38:20.670" Score="2" Body="&lt;p&gt;A variable may contain different values at different times. For instance, we could have:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog petersPet = new Poodle(&amp;quot;Tiny&amp;quot;); &#xA;// but then, petersPet dies!&#xA;// so he gets a new one:&#xA;peterPet = new Labrador(&amp;quot;Spot&amp;quot;); // surely Labradors are more robust?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or a variable might contain a different value in different circumstances:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog petersPet;&#xA;if (peter.isRich()) {&#xA;    petersPet = new Labrador(&amp;quot;Spot&amp;quot;);&#xA;} else {&#xA;    petersPet = new Poodle(&amp;quot;Tiny&amp;quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or we might want to intentionally write our code agnostic of the particular breed, so we can reuse it for different breeds. For instance, if we write:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class PoodleParlour {&#xA;    public void pamper(Poodle poodle) {&#xA;        // ...&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;our parlor won't get much business, because it only admits a single kind of Dog. If Peter gets a Labrador, he needs to find a new parlor. And woe is him if nobody has thought to open a LabradorParlor yet! On the other hand, if there was a&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class DogParlour {&#xA;    public void pamper(Dog dog) {&#xA;        // ...&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;that parlour could serve all dog owners, ensuring that every dog can be pampered. (Of course, there is a trade off here, because a DogParlour able to handle all kinds of breeds might be harder to make that one that can only handle a particular breed ...)&lt;/p&gt;&#xA;&lt;p&gt;PS: You may have noticed that I changed your example to refer to breeds rather than Puppies. The reason is that in most object oriented programming languages, the type of an object is immutable throughout its lifetime. Your design of creating a different class for Puppies is therefore problematic, because it implies that Puppies remain Puppies throughout their lifetime. In particular, it means that when the dog comes of age, a new AdultDog object would have to be created, and everyone who knew about the Puppy would have to be told to use the AdultDog instead. And if you forget one, that person will continue to use the Puppy, causing different objects with possibly different states to exist for the same dog. That gets messy real quick!&lt;/p&gt;&#xA;" OwnerUserId="1775" LastActivityDate="2023-05-05T00:38:20.670" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7707" PostTypeId="2" ParentId="7679" CreationDate="2023-05-05T03:26:45.610" Score="3" Body="&lt;p&gt;(am not an educator but) someone I knew had a class where they wrote an IRC client. It is quite a simple protocol, but not too simple, that seems quite good for teaching. The teacher provided the server, and the student was to write a program that would connect to the server, join a channel and allow the user to read messages and send messages. The language was Java (same as the rest of the course).&lt;/p&gt;&#xA;&lt;p&gt;IRC is quite a simple protocol, but not too simple. It can be debugged with a screen and keyboard. It seems ideal for learning. The protocol is text-based and looks like &lt;a href=&quot;http://chi.cs.uchicago.edu/chirc/irc_examples.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;, so an early iteration of the student's program can let them directly interact with the IRC connection, without processing the commands or responses.&lt;/p&gt;&#xA;&lt;p&gt;If threads are used, Python's threading model (with the GIL) could make it a better choice as no synchronization is usually needed. But don't make the student learn a new language just for socket programming, obviously.&lt;/p&gt;&#xA;" OwnerUserId="1275" LastActivityDate="2023-05-05T03:26:45.610" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7708" PostTypeId="2" ParentId="7672" CreationDate="2023-05-05T03:40:57.550" Score="2" Body="&lt;p&gt;(I am not an educator, so this answer is probably quite stupid, but) Frame challenge: Is it actually relevant?&lt;/p&gt;&#xA;&lt;p&gt;I feel that teaching the broad overview of something not immediately useful is often not useful. For example another question where somebody said they taught the OSI model before sockets. Why? I don't think as a student I would remember that very easily. I surely saw the OSI model early on, but I &lt;em&gt;properly&lt;/em&gt; learned it &lt;em&gt;after&lt;/em&gt; that, when I delved deeper into networking.&lt;/p&gt;&#xA;&lt;p&gt;History of a computer is useful insofar as it helps to understand some design decisions today (such as filesystems and user accounts) but otherwise not relevant. Filesystems - that &lt;a href=&quot;https://futurism.com/the-byte/gen-z-kids-file-systems&quot; rel=&quot;nofollow noreferrer&quot;&gt;Gen Z doesn't know about&lt;/a&gt; - become relevant on day 1 since many programming languages are designed for use with file systems, but do you learn how they work from a book, or do you learn by doing?&lt;/p&gt;&#xA;&lt;p&gt;The distinction between CPU and RAM becomes relevant when you get into cache optimization. Not before. One thing my university did do was have everyone assemble a computer and install an operating system in the first week. It was memorable, because it was hands-on, but I'm not sure how useful it actually was for teaching. Maybe it helped to get students hooked a little.&lt;/p&gt;&#xA;&lt;p&gt;Design of software on smartphones and the web (and even tablets and laptops!) often actually &lt;em&gt;suffers&lt;/em&gt; because it's designed by people thinking with a desktop way of mind. They are fundamentally not the same kind of device - even though they all have processors - and we should not expect stuff to carry over any more than we should expect mainframe software to carry over to microcomputers. Insisting that everyone becomes desktop-centric might actually be doing them a disservice, just like writing desktop software by pretending the desktop is a mainframe.&lt;/p&gt;&#xA;&lt;p&gt;Most people coming into a computer programming class don't know how software and programming work. That's the point of the class.&lt;/p&gt;&#xA;&lt;p&gt;How companies use computers seems completely off-topic. &lt;strong&gt;Why&lt;/strong&gt; companies and offices? Why not how some restaurant servers use tablet computers to take your order, why not how people browse their social media on the train? Why not how Google serves search queries? It's fine background information (if so, include all of these, not just one); I don't really see how it's something worth explicitly learning about. Certainly students will do a little of all of these in the projects they'll do throughout their education.&lt;/p&gt;&#xA;&lt;p&gt;Networking, AI and security are big enough to be entire courses of their own, but you can give tasters: connect to a chat server and chat; either make something with a pre-made AI model (e.g. using the huggingface transformers library) or classify MNIST digits using an AI framework (your choice); try to hack a given program with some obvious bugs.&lt;/p&gt;&#xA;" OwnerUserId="1275" LastEditorUserId="1275" LastEditDate="2023-05-06T01:35:58.700" LastActivityDate="2023-05-06T01:35:58.700" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7709" PostTypeId="2" ParentId="7694" CreationDate="2023-05-05T14:05:16.247" Score="1" Body="&lt;p&gt;Ok, so I just read your edit about how the example of assigning a &lt;code&gt;Puppy&lt;/code&gt; to a &lt;code&gt;Dog&lt;/code&gt; collection is missing the point, because you don't need to declare &lt;code&gt;dog&lt;/code&gt; as a &lt;code&gt;Dog&lt;/code&gt; to achieve that.&lt;/p&gt;&#xA;&lt;p&gt;And you're right.&lt;/p&gt;&#xA;&lt;p&gt;So, here are some examples of &lt;em&gt;why&lt;/em&gt; you may actually want to declare &lt;code&gt;dog&lt;/code&gt; as a &lt;code&gt;Dog&lt;/code&gt; instead of a &lt;code&gt;Puppy&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;1.- To invoke static methods of the appropriate type.&lt;/p&gt;&#xA;&lt;p&gt;Yeah, yeah, we all know you shouldn't call static methods from variables. But you &lt;em&gt;can&lt;/em&gt;. And, if for whatever reason you do so, the called method will depend on the &lt;em&gt;declared&lt;/em&gt; type, not on the instance type.&lt;br /&gt;&#xA;Example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class Dog {&#xA;    public static void petInfo() {&#xA;        System.out.println(&amp;quot;Dogs are the best!&amp;quot;);&#xA;    }&#xA;}&#xA;&#xA;class Puppy extends Dog {&#xA;    public static void petInfo() {&#xA;        System.out.println(&amp;quot;Puppies are baby dogs. Treat them well and they will grow up to be awesome dogs!&amp;quot;);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Of course, if with the above code you do this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;        Dog dog = new Dog();&#xA;        Puppy puppy = new Puppy();&#xA;&#xA;        dog.petInfo();&#xA;        puppy.petInfo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You will get this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dogs are the best!&#xA;Puppies are baby dogs. Treat them well and they will grow up to be awesome dogs!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But what if you do this?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;        Dog doggy = new Puppy();&#xA;        doggy.petInfo();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you do that, even though &lt;code&gt;doggy&lt;/code&gt; is still a &lt;code&gt;Puppy&lt;/code&gt;, you are treating it like a &lt;code&gt;Dog&lt;/code&gt;, and so you'll get:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dogs are the best!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;Using the same variable for &lt;s&gt;another&lt;/s&gt; &amp;quot;the same&amp;quot; dog.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Usually, puppies grow up and become dogs. This is something they do on their own; you don't have to go to the pet store and give them your puppy so they give you an adult dog in return (not in my country, at least!).&lt;/p&gt;&#xA;&lt;p&gt;So, something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class Dog {&#xA;    String name;&#xA;&#xA;    public Dog(String name) {&#xA;        this.name = name;&#xA;    }&#xA;&#xA;    public Dog(Puppy puppy) {&#xA;        this.name = puppy.name;&#xA;        // Establish adult dog attributes based on puppy attributes&#xA;    }&#xA;&#xA;    public Dog growUp() {&#xA;        System.out.println(&amp;quot;I already did!&amp;quot;);&#xA;        return this;&#xA;    }&#xA;&#xA;    public void bark() {&#xA;        System.out.println(&amp;quot;I am &amp;quot; + name + &amp;quot; and I say: WOOF!&amp;quot;);&#xA;    }&#xA;}&#xA;&#xA;class Puppy extends Dog {&#xA;    public Puppy(String name) {&#xA;        super(name);&#xA;    }&#xA;&#xA;    public void bark() {&#xA;        System.out.println(&amp;quot;I am &amp;quot; + name + &amp;quot; and I say: bark!&amp;quot;);&#xA;    }&#xA;&#xA;    public Dog growUp() {&#xA;        System.out.println(&amp;quot;Wow! I feel stronger!&amp;quot;);&#xA;        return new Dog(this);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Behold: the miracle of life!&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;        Dog doggy = new Puppy(&amp;quot;Doggy&amp;quot;);&#xA;        doggy.bark();&#xA;        doggy = doggy.growUp();&#xA;        doggy.bark();&#xA;&#xA;---&#xA;&#xA;I am Doggy and I say: bark!&#xA;Wow! I feel stronger!&#xA;I am Doggy and I say: WOOF!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13318" LastActivityDate="2023-05-05T14:05:16.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7710" PostTypeId="2" ParentId="7694" CreationDate="2023-05-05T16:01:16.810" Score="2" Body="&lt;p&gt;The three best reasons I can think of as to why this principle is important in practice is the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Collections&lt;/li&gt;&#xA;&lt;li&gt;Interfaces (Liskov substitution principle)&lt;/li&gt;&#xA;&lt;li&gt;Factory Functions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As for how to teach these concepts to CS 101 students with the &lt;code&gt;Dog&lt;/code&gt; and &lt;code&gt;Puppy&lt;/code&gt; example, I'd go with the following.&lt;/p&gt;&#xA;&lt;p&gt;(Forgive me if there are some bugs in the following code, as my Java is a bit rusty.)&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Collections&lt;/h2&gt;&#xA;&lt;p&gt;At first glance, it might seem odd to assign a value to a variable when the value and the variable aren't the exact same type. I mean, this is just weird:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog dog = new Puppy(&amp;quot;Rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I mean, if you know &lt;code&gt;dog&lt;/code&gt; is a &lt;code&gt;Puppy&lt;/code&gt;, why not just make the &lt;code&gt;dog&lt;/code&gt; variable a &lt;code&gt;Puppy&lt;/code&gt; type?&lt;/p&gt;&#xA;&lt;p&gt;Ah, but what if you were working at a shelter and had more than one dog of various ages?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;ArrayList&amp;lt;Dog&amp;gt; dogs = ?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;All puppies are dogs, but not all dogs are puppies. Sometimes you need to give a dog special treatment based on whether it's an adult or just a puppy. On the other hand, you still want to keep track of them all, and it would be inconvenient to have a different list for every type of dog.&lt;/p&gt;&#xA;&lt;p&gt;This is where inheritance comes in. Because every &lt;code&gt;Puppy&lt;/code&gt; is a &lt;code&gt;Dog&lt;/code&gt;, you can have puppies and adult dogs in the same list with no issue. And thanks to polymorphism, you can even give them their special treatment.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;class Dog {&#xA;  ...&#xA;  public void feed() {&#xA;    System.out.println(&amp;quot;Gave &amp;quot; + this.getName() + &amp;quot; 1 can of regular adult dog-food.&amp;quot;);&#xA;  }&#xA;}&#xA;&#xA;class Puppy extends Dog() {&#xA;  @override&#xA;  public void feed() {&#xA;    System.out.println(&amp;quot;Gave &amp;quot; + this.getName() + &amp;quot; 1 can of special Puppy-Gro food.&amp;quot;);&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;ArrayList&amp;lt;Dog&amp;gt; dogs = new ArrayList&amp;lt;&amp;gt;() {{&#xA;  add(new Dog(&amp;quot;Fido&amp;quot;));&#xA;  add(new Dog(&amp;quot;Rover&amp;quot;));&#xA;  add(new Puppy(&amp;quot;Fido&amp;quot;));&#xA;  add(new Dog(&amp;quot;Max&amp;quot;));&#xA;  add(new Puppy(&amp;quot;Chief Masterson&amp;quot;));&#xA;}};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;There's no reason why you can't extend this concept to other types of dogs, too. In addition to &lt;code&gt;Dog&lt;/code&gt; and &lt;code&gt;Puppy&lt;/code&gt;, you can have &lt;code&gt;OldDog&lt;/code&gt;, &lt;code&gt;ThreeLeggedDog&lt;/code&gt;, &lt;code&gt;SmallDog&lt;/code&gt;, &lt;code&gt;SuperFullOfEnergyDog&lt;/code&gt;, and &lt;code&gt;Labradoodle&lt;/code&gt;, with each one extending and overriding &lt;code&gt;Dog&lt;/code&gt; in their own way to ensure that each kind of dog gets its special treatment but can still happily co-exist with the other dogs in the &lt;code&gt;ArrayLst&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Interfaces (LSV)&lt;/h2&gt;&#xA;&lt;p&gt;The more nebulous concept of interfaces might be a bit beyond a 101 student, but their usage should still be understandable. Imagine we had another class that did something with a &lt;code&gt;Dog&lt;/code&gt; that was given to it:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;class DogFeeder {&#xA;  public void feed(?) {&#xA;    ?&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In order to feed every dog the food it needs, we would need to create a function that took each kind of dog and treated it accordingly:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public void feedPuppy(Puppy puppy) {&#xA;  System.out.println(&amp;quot;Gave &amp;quot; + puppy.getName() + &amp;quot; 1 can of Special Puppy-Gro food.&amp;quot;);&#xA;}&#xA;&#xA;public void feedOldDog(OldDog oldDog) {&#xA;  System.out.println(&amp;quot;Gave &amp;quot; + oldDog.getName() + &amp;quot; 1 can of Goodest-Boi Max Comfort food.&amp;quot;);&#xA;}&#xA;&#xA;public void feedLabradoodle(Labradoodle labradoodle) {&#xA;  System.out.println(&amp;quot;Gave &amp;quot; + labradoodle + &amp;quot; 1 can of Finest Imported French Cuisine For Dogs food.&amp;quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This quickly gets cumbersome. We would need to define a new function for every type of dog that existed.&lt;/p&gt;&#xA;&lt;p&gt;However, looking at the strings that get printed, there is also a definite pattern. We can utilize that and once again employ polymorphism to greatly simplify our feed methods down to just a single function:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;class Puppy extends Dog {&#xA;  ...&#xA;  @override&#xA;  String getFavoriteFood() {&#xA;    return &amp;quot;Special Puppy-Gro&amp;quot;;&#xA;  }&#xA;}&#xA;&#xA;class OldDog extends Dog {&#xA;  ...&#xA;  @override&#xA;  String getFavoriteFood() {&#xA;    return &amp;quot;Goodest-Boi Max Comfort&amp;quot;;&#xA;  }&#xA;}&#xA;&#xA;class Labradoodle extends Dog {&#xA;  ...&#xA;  @override&#xA;  String getFavoriteFood() {&#xA;    return &amp;quot;Finest Imported French Cuisine For Dogs&amp;quot;;&#xA;  }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public void feedDog(Dog dog) {&#xA;  System.out.println(&amp;quot;Gave &amp;quot; + dog.getName() + &amp;quot; 1 can of &amp;quot; + dog.getFavoriteFood() + &amp;quot; food.&amp;quot;);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Factory Functions&lt;/h2&gt;&#xA;&lt;p&gt;Now a student might look at this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog dog = new Puppy(&amp;quot;Rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And wonder why we couldn't just do this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Puppy puppy = new Puppy(&amp;quot;Rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And sure, we could do that. But what if you had a method that returned a &lt;code&gt;Dog&lt;/code&gt; and you didn't know what kind of &lt;code&gt;Dog&lt;/code&gt; it returned?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;? dog = Shelter.findDog(&amp;quot;Rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What kind of dog is &lt;code&gt;Shelter.findDog&lt;/code&gt; going to return? Can you assume it's a &lt;code&gt;Puppy&lt;/code&gt;? Not really, since they might have an older dog named &amp;quot;Rover&amp;quot;. But if we don't know it's a puppy, how are we supposed to know if we can treat it like a puppy?&lt;/p&gt;&#xA;&lt;p&gt;Now imagine in this scenario you are the manager of the shelter. It's 6:00 PM, and it's time to feed all the dogs. You have a lot of dogs, though, so you need to delegate. You get one of your subordinates and assign them a dog named &amp;quot;Rover&amp;quot; to feed, reading off the next name on your checklist.&lt;/p&gt;&#xA;&lt;p&gt;The dog might be a puppy, an old dog, or a labradoodle, and the kind of dog determines how they need to be fed. But as the manager, you don't really care about those specifics. All you care about is ensuring the dog gets fed. Let the employee figure out how to actually feed it.&lt;/p&gt;&#xA;&lt;p&gt;In that case, it doesn't matter what type of dog it is. You can just say it is a &lt;code&gt;Dog&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog rover = Shelter.findDog(&amp;quot;Rover&amp;quot;);&#xA;employee.assignToFeed(rover);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In this scenario, &lt;code&gt;rover&lt;/code&gt; could be &lt;code&gt;Puppy&lt;/code&gt;, &lt;code&gt;OldDog&lt;/code&gt;, or any number of other subclass of &lt;code&gt;Dog&lt;/code&gt;. But as the manager, you don't care what kind of dog it is. You just fetch the dog from the &lt;code&gt;Shelter.findDog&lt;/code&gt; method and delegate it off to some &lt;code&gt;employee&lt;/code&gt; that can worry about the specifics.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Afterword&lt;/h2&gt;&#xA;&lt;p&gt;At the end of the day, the student is right. There isn't much reason to do this directly:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog dog = new Puppy(&amp;quot;Rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But that specific example isn't important to the lesson. What's important is the student understands that you &lt;em&gt;can&lt;/em&gt; assign a &lt;code&gt;Puppy&lt;/code&gt; value to a &lt;code&gt;Dog&lt;/code&gt; variable. Because once they understand that, it opens up a whole slew of other practices and concepts that wouldn't be possible without that one simple fact.&lt;/p&gt;&#xA;&lt;p&gt;Many times, programmers write code that doesn't care about the specifics of how some class operates (and, in fact, this is by design if the programmer is following SOLID principles). If the object looks like a &lt;code&gt;Dog&lt;/code&gt;, eats like a &lt;code&gt;Dog&lt;/code&gt;, and barks like a &lt;code&gt;Dog&lt;/code&gt;, then often times there isn't a good reason to worry over whether it's a &lt;code&gt;Puppy&lt;/code&gt; or a &lt;code&gt;Labradoodle&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is a fundamental concept that forms the foundation of abstraction, and abstraction is a big part of modern development.&lt;/p&gt;&#xA;" OwnerUserId="13320" LastActivityDate="2023-05-05T16:01:16.810" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7711" PostTypeId="2" ParentId="7694" CreationDate="2023-05-06T18:37:05.043" Score="1" Body="&lt;p&gt;I think, the answer is tangential to polymorphism and use of collections of objects others have mentioned. IMO, that doesn't get to the bottom of what's happening in real-world applications vs sample code.&lt;/p&gt;&#xA;&lt;p&gt;Let's reiterate the question and try to answer it directly. Why would a variable be typed with a Parent class instead of the exact Child class being instantiated and assigned to it?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog rover = new Puppy(&amp;quot;Rover&amp;quot;);    // why this&#xA;Puppy rover = new Puppy(&amp;quot;Rover&amp;quot;);  // instead of this?&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The thing is real-world applications do not ever have either of these statements. It's a sample code to demonstrate OOP principles for educational purposes. The only place where such code does occur is fixtures of automated tests.&lt;/p&gt;&#xA;&lt;p&gt;In real apps it's not feasible to hard-code and statically compile direct object instantiation of domain entities. Instead, objects are being created dynamically in the following ways:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Instantiate from user input (to persist in a database)&lt;/li&gt;&#xA;&lt;li&gt;Deserialize from data stored in the database&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Both use cases cannot possibly enumerate and account for every Child class. The solution is to generalize intended functionality in a Parent class and leverage the polymorphism to invoke specifics of the respective Child classes.&lt;/p&gt;&#xA;&lt;p&gt;The real code would look like so:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;Dog dog = petStore.buy(dogName);&#xA;owner.pets.add(dog);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Note that neither the string literal &lt;code&gt;&amp;quot;Rover&amp;quot;&lt;/code&gt; nor the variable named &lt;code&gt;rover&lt;/code&gt; of type &lt;code&gt;Puppy&lt;/code&gt; make sense in the dynamic code that should be able to handle an arbitrary pet. A generalized variable &lt;code&gt;Dog dog&lt;/code&gt; represents a user-defined dog of any kind where the variable &lt;code&gt;dogName&lt;/code&gt; is initialized dynamically from the user input.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Dog rover&lt;/code&gt; is one step closer to the dynamic implementation than &lt;code&gt;Puppy rover&lt;/code&gt;. The author is having the dynamic implementation in the back of their head while proving a static example.&lt;/p&gt;&#xA;" OwnerUserId="13323" LastEditorUserId="13323" LastEditDate="2023-05-07T01:44:16.847" LastActivityDate="2023-05-07T01:44:16.847" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7712" PostTypeId="1" CreationDate="2023-05-08T20:33:43.193" Score="1" ViewCount="107" Body="&lt;p&gt;I'm using GitHub classroom for the college B.Sc. course I am teaching.&lt;/p&gt;&#xA;&lt;p&gt;Several GitHub accounts have joined the classroom which seem unrelated to students. I'm suspecting these accounts are related to fraudulant activity taking place (possibly students paying people to write assignments for them).&lt;/p&gt;&#xA;&lt;p&gt;There are several signs that raised my suspicions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;These accounts only joined the classroom but did not link to any names in the classroom roster.&lt;/li&gt;&#xA;&lt;li&gt;A few of them are completely new accounts that were created and immediately afterwards joined the classroom.&lt;/li&gt;&#xA;&lt;li&gt;A couple are accounts of experienced software developers (or at least people claiming to be ones).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Apparently there is no option to block unautherized people accepting my assignment links and getting access to the assignment without authorization, but tbh, even if there was one, it wouldn't do much good (if it wasn't possible to join directly, they could just as well zip the assignment folder and send it to them by email).&lt;/p&gt;&#xA;&lt;p&gt;I think the only plausible solution is probably to have students defend their work in a frontal setting but I do not have the time and resources to do that, and anyway it would be very difficult to justify an accusation of cheating based on such (the student will just claim he forgot or find some other excuse).&lt;/p&gt;&#xA;&lt;p&gt;Does anyone have any experience/advice with such fraudlant activity?&lt;/p&gt;&#xA;&lt;p&gt;Did anyone manage to get GitHub to provide any information about such accounts?&#xA;For example, if I had evidence from GitHub about someone regularly visiting various student assignments I could possibly file an official request for the police to investigate (I assume it's a longshot and there are probably privacy concerns but I thought I might ask).&lt;/p&gt;&#xA;" OwnerUserId="13171" LastActivityDate="2023-05-08T20:33:43.193" Title="Suspicious activity in GitHub Classroom" Tags="|cheating|github|" AnswerCount="0" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7713" PostTypeId="2" ParentId="7667" CreationDate="2023-05-10T00:22:18.193" Score="4" Body="&lt;p&gt;This isn't as clear cut as your question would have it be. There are several cases where a solution, proposed to be solved by inheritance, could be solved in different ways. For example, your paper/glass cup example is prone to arguments that the material should be a property of the class, not a derivation of the class itself.&lt;/p&gt;&#xA;&lt;p&gt;Don't do this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I need the perfect example so that I can demonstrate all of the inheritance use cases.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Do this instead:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I want to showcase this particular behavior. What example would work well to make the behavior seem intuitive?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Instead of looking for the right example, first consider what you're trying to demonstrate. Usually, this will be a particular behavior (in this case of inheritance). This will help you identify in shaping an example that makes the intended demonstration seem like the most intuitive solution to the problem.&lt;/p&gt;&#xA;&lt;p&gt;For example, I could focus on polymorphism, specifically the ability to implicitly cast to a base class when passing derived instances into methods. The behavior I'm trying to demonstrate would be something like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;MethodA only accepts a &lt;code&gt;DerivedA&lt;/code&gt;.&lt;br /&gt;&#xA;MethodB only accepts a &lt;code&gt;DerivedB&lt;/code&gt;.&lt;br /&gt;&#xA;MethodC accepts any kind of &lt;code&gt;Base&lt;/code&gt; such as &lt;code&gt;DerivedA&lt;/code&gt; or &lt;code&gt;DerivedB&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;To put it plainly: some methods are picky, others are not. I can now think of an example that is very similar to this.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Carnivores only eat meat.&lt;br /&gt;&#xA;Herbivores only eat plants.&lt;br /&gt;&#xA;Omnivores eat any kind of food, such as meat or plants.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And there you have it, an example that intuitively already matches the kind of behavior that I'm trying to demonstrate.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Food {}&#xA;&#xA;public class Meat : Food {}&#xA;public class Steak : Meat {}&#xA;public class Drumstick : Meat {}&#xA;&#xA;public class Plant : Food {}&#xA;public class Grass : Plant {}&#xA;public class Leaves : Plant {}&#xA;&#xA;public class Carnivore&#xA;{&#xA;    public void Eat(Meat meat) {}&#xA;}&#xA;&#xA;public class Herbivore&#xA;{&#xA;    public void Eat(Plant plant) {}&#xA;}&#xA;&#xA;public class Omnivore&#xA;{&#xA;    public void Eat(Food food) {}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And its usage:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;var steak = new Steak();&#xA;var drumstick = new Drumstick();&#xA;var grass = new Grass();&#xA;var leaves = new Leaves();&#xA;&#xA;var cat = new Carnivore();&#xA;cat.Eat(steak);&#xA;cat.Eat(drumstick);&#xA;cat.Eat(grass);             // Compiler error - not a Meat!&#xA;cat.Eat(leaves);            // Compiler error - not a Meat!&#xA;&#xA;var cow = new Herbivore();&#xA;cow.Eat(steak);             // Compiler error - not a Plant!&#xA;cow.Eat(drumstick);         // Compiler error - not a Plant!&#xA;cow.Eat(grass);             &#xA;cow.Eat(leaves);            &#xA;&#xA;var human = new Omnivore();&#xA;human.Eat(steak);             &#xA;human.Eat(drumstick);         &#xA;human.Eat(grass);             &#xA;human.Eat(leaves);  &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Is it a perfectly realistic example? No. Not every herbivore eats leaves &lt;em&gt;and&lt;/em&gt; grass. Humans don't eat any and all plant products either. But it is the nature of examples that they are simplistic representations. They are simplistic by nature because it makes them easier to digest for students who are being introduced to something new.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;To summarize&lt;/strong&gt;&lt;br /&gt;&#xA;Tailor your examples to what you're specifically trying to teach. Don't try to pursue the perfect example to be used in all use cases.&lt;br /&gt;&#xA;By maximizing the relevance of the specific example, you minimize the student's required acceptance of what you're trying to showcase.&lt;/p&gt;&#xA;&lt;p&gt;Avoid reusing the same examples across multiple behaviors, unless you are absolutely certain that the example is equally intuitive for both cases.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2023-05-10T00:22:18.193" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7714" PostTypeId="2" ParentId="7694" CreationDate="2023-05-10T02:04:00.667" Score="0" Body="&lt;p&gt;The example code is prone to immediate misunderstanding. To cut a long story short, I don't think you should be trying to fix students' understanding of your example by answering their questions, I think you should scrap the example you're using and come up with something that aligns to what you're actually trying to teach.&lt;/p&gt;&#xA;&lt;h2&gt;Why it's a bad example&lt;/h2&gt;&#xA;&lt;p&gt;A puppy is a dog, but its puppy-ness is decided by its age, not an intrinsic quality of the creature itself. At some point in time, a puppy ceases to be a puppy but remains to be a dog.&lt;/p&gt;&#xA;&lt;p&gt;There is no language concept that accounts for this. As the educator, you are responsible for your examples being correct (if simplistic) representations of what you're trying to teach, and I believe you set yourself up for failure with this example.&lt;/p&gt;&#xA;&lt;p&gt;You're also mixing your topics between overriding methods and using polymorphism, which are distinct concepts. The goal of doing &lt;code&gt;Base var = new Derived()&lt;/code&gt; is not related to the idea of overriding base methods in an unobtrusive way.&lt;/p&gt;&#xA;&lt;h2&gt;A better example&lt;/h2&gt;&#xA;&lt;p&gt;Inheritance is an intrinsic quality that is immutable. A puppy will cease to be a puppy, but a golden retriever will always be a golden retriever. Therefore, dog breeds are a better example.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Dog {}&#xA;&#xA;public class GoldenRetriever : Dog {}&#xA;&#xA;public class Beagle : Dog {}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Demonstrating the right behavior&lt;/h2&gt;&#xA;&lt;p&gt;You should also use your example to highlight the behavior that actually makes a difference. For example, what is meaningfully different between this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog rover = new Beagle();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Beagle rover = new Beagle();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Overridden methods are &lt;strong&gt;not&lt;/strong&gt; the difference, because overridden methods are methods that both &lt;code&gt;Beagle&lt;/code&gt; and &lt;code&gt;Dog&lt;/code&gt; have access to.&lt;/p&gt;&#xA;&lt;p&gt;What makes a difference here is methods that &lt;code&gt;Beagle&lt;/code&gt; has access to &lt;em&gt;but &lt;code&gt;Dog&lt;/code&gt; does &lt;strong&gt;not&lt;/strong&gt;&lt;/em&gt;. In other words, methods of &lt;code&gt;Beagle&lt;/code&gt; that do not override any prior &lt;code&gt;Dog&lt;/code&gt; methods.&lt;/p&gt;&#xA;&lt;p&gt;I picked &lt;code&gt;Beagle&lt;/code&gt; specifically because it is a hunting dog and not every dog can hunt. This presents a good example on such a non-overridden method.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class Dog &#xA;{&#xA;    public void Pet();&#xA;}&#xA;&#xA;public class Beagle : Dog&#xA;{&#xA;    public void Hunt();&#xA;}&#xA;&#xA;Beagle rover1 = new Beagle();&#xA;rover1.Pet();&#xA;rover1.Hunt();&#xA;&#xA;Dog rover2 = new Beagle();&#xA;rover2.Pet();&#xA;rover2.Hunt();  // Error!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Explaining the right reason&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Suppose we have a game program with Dogs and Puppies. A Puppy may have some special attributes and methods that a Dog does not have. Over the course of the game we may want our variable &amp;quot;rover&amp;quot; to be able to point to a Dog instead of a Puppy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In a vacuum, your explanation is something that relates to how we use inheritance.&lt;/p&gt;&#xA;&lt;p&gt;However, you didn't really answer the question that was asked, because the question was being asked about your example, and your example does not demonstrate the intention to assign different dog instances to this variable.&lt;/p&gt;&#xA;&lt;p&gt;A more appropriat answer to address the student's confusion would be:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You're right, in the current scenario it doesn't make sense for us to restrict the type from &lt;code&gt;Puppy&lt;/code&gt; to &lt;code&gt;Dog&lt;/code&gt;. We lose information and gain nothing from doing so. However, this is a basic example to get you to understand &lt;em&gt;how&lt;/em&gt; it works, not &lt;em&gt;why&lt;/em&gt; we use it.&lt;/p&gt;&#xA;&lt;p&gt;Consider the following example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public class DogHouse&#xA;{&#xA;    public Dog Dog { get; set; }&#xA;}&#xA;&#xA;var rover = new Beagle();&#xA;&#xA;var dogHouse = new DogHouse();&#xA;dogHouse.Dog = rover;&#xA;&#xA;var dogFromTheDogHouse = dogHouse.Dog;&#xA;&#xA;dogFromTheDogHouse.Hunt(); // Error!&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This example highlights the key difference. Once you've downgraded your dog from a &lt;code&gt;Beagle&lt;/code&gt; to a &lt;code&gt;Dog&lt;/code&gt;, you lose the ability to address its &lt;code&gt;Beagle&lt;/code&gt;-specific features.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2023-05-10T02:04:00.667" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7716" PostTypeId="2" ParentId="7694" CreationDate="2023-05-12T00:37:44.087" Score="2" Body="&lt;p&gt;When I was first learning Java, I encountered a variable of some concrete type being assigned to a variable of some interface type. I was a bit confused as to why someone would do that. A cohort explained it this way:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Assigning a variable of a concrete class to a variable of type interface means that the user of the interface variable is only interested in those facets of the concrete class that are exposed by the interface. Consider the Java &lt;code&gt;Comparable&lt;/code&gt; interface. When used with a sorting method, it signals that the only thing one cares about in the concrete class is the ability to compare objects (i.e. the &lt;code&gt;compareTo&lt;/code&gt; method). Everything else is irrelevant.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The same is true when you assign a member of a child class to a variable of the parent class. It means you are not interested in the additional functionality of the child class, only that which is shared with the parent class. When you invoke a method that is shared between the parent and child (i.e. the child overrides the implementation of the parent), you execute the child's method. This is exactly as expected as the concrete class is actually the child class, even though only the methods of the parent class are visible.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2023-05-12T00:37:44.087" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7717" PostTypeId="1" CreationDate="2023-05-13T10:43:25.540" Score="4" ViewCount="846" Body="&lt;p&gt;I'm using GitHub Classroom for my class.&lt;/p&gt;&#xA;&lt;p&gt;I wrote an assignment and pushed it together with the solution to a private repo in my org.&lt;/p&gt;&#xA;&lt;p&gt;The assignment includes parts of the solution for the students to use as a skeleton.&lt;/p&gt;&#xA;&lt;p&gt;I'm wondering if in this case, students that use GitHub Copilot, while working on the skeleton, might get autocompletions from Copilot that are taken from the actual solution that I wrote and pushed into the private repo.&lt;/p&gt;&#xA;" OwnerUserId="13171" LastActivityDate="2023-05-13T10:43:25.540" Title="Is GitHub Copilot constantly training on private data?" Tags="|github|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7718" PostTypeId="2" ParentId="7694" CreationDate="2023-05-15T02:47:38.677" Score="0" Body="&lt;p&gt;In your example you had somthing similair to the following:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-None prettyprint-override&quot;&gt;&lt;code&gt;Dog&#xA;├─ Puppy&#xA;├─ AdultDog&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Another example might be as follows:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// comments: drinking vessels, goblets, glasses, mugs and more....&#xA;&#xA;Cup&#xA;├─ PlasticCup&#xA;├─ GlassCup&#xA;├─ RoughHewnWoodenCup&#xA;├─ CoffeeMug&#xA;├─ PorcelinTeaBowl. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note that the terms shown below all have the same meaning:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&amp;quot;sub-class&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;derrived-class&amp;quot;&lt;/li&gt;&#xA;&lt;li&gt;&amp;quot;child-class&amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Perhaps all Cups have a method named &lt;code&gt;wash()&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Also, perhaps rough hewn wooden cups should not be put in a dish-washing machine. Wood tends to warp, rot and fall apart in steamy hot water.&lt;/p&gt;&#xA;&lt;p&gt;Thus, each type of cup shall have a different implementation of the method named &lt;code&gt;wash()&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// this is written in pseudo-code, not Java&#xA;define function wash(WoodenCup woodzy) {&#xA;    dump_in_kitchen_sink(woodzy);  &#xA;    return woodzy;&#xA;    // return to what you were doing before&#xA;    // somone told you to wash the wooden cup named `woodzy`   &#xA;}&#xA;&#xA;define function wash(GlassCup glassy) {&#xA;    dump_in_kitchen_sink(glassy);  &#xA;&#xA;    // imagine that dishwasher is a global variable &#xA;&#xA;    dishwasher.insert_into_in_top_rack(glassy);&#xA;&#xA;    return glassy;&#xA;&#xA;    // return to what you were doing before&#xA;    // somone told you to wash the &#xA;    // glass cup named `glassy`   &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Extentions of the cup the class might have methods of the same name as the parent super-class,  ut the methods to do thing different.&lt;/p&gt;&#xA;&lt;p&gt;Washing a wood cup might be a different process or procedure than washing a cup made out of glass.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-15T02:47:38.677" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7719" PostTypeId="2" ParentId="7688" CreationDate="2023-05-16T02:38:10.423" Score="1" Body="&lt;p&gt;I would rather suggest you think twice about using jQuery. But instead of listing my reasons for not using it, you may check this github article published in &lt;strong&gt;2018&lt;/strong&gt;, &lt;a href=&quot;https://github.blog/2018-09-06-removing-jquery-from-github-frontend/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Removing jQuery from GitHub.com frontend&lt;/a&gt; and its updated version &lt;a href=&quot;https://github.blog/2021-05-04-how-we-use-web-components-at-github/&quot; rel=&quot;nofollow noreferrer&quot;&gt;How we use Web Components at GitHub&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Gitlab did the same as, &lt;a href=&quot;https://gitlab.com/groups/gitlab-org/-/epics/3417&quot; rel=&quot;nofollow noreferrer&quot;&gt;Remove jQuery from GitLabs Frontend code&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;So unless you have a specific need to jQuery (then we better discuss it, e.g &lt;a href=&quot;https://thenewstack.io/why-outdated-jquery-is-still-the-dominant-javascript-library/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The WordPress Factor&lt;/a&gt;), do not. For example, for learning purposes, I would rather suggest using  vanilla modern JS to do it.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-05-16T03:44:57.080" LastActivityDate="2023-05-16T03:44:57.080" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7720" PostTypeId="1" CreationDate="2023-05-16T15:56:27.277" Score="0" ViewCount="56" Body="&lt;p&gt;Here is my situation. I teach a 'Programming with classes' course.  The students are given a design of class to implement in c#. They will then create a .cs file for the class.  I would like to give them the option of uploading (Or some other method) that file to a program that will then test their class and methods for certain inputs and outputs.  The class and methods would be expected to follow the design EXACTLY.&lt;/p&gt;&#xA;&lt;p&gt;EDIT:&lt;br /&gt;&#xA;Looking to automate this testing as well through a C# app that I build or other means.&lt;/p&gt;&#xA;&lt;p&gt;What tools exist to help perform this type of task?&lt;/p&gt;&#xA;" OwnerUserId="13350" LastActivityDate="2023-05-31T08:50:09.153" Title="How can I unit test a class in a .cs file that is uploaded or otherwise provided to me?" Tags="|unit-testing|" AnswerCount="2" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7721" PostTypeId="2" ParentId="7720" CreationDate="2023-05-16T17:17:35.540" Score="1" Body="&lt;p&gt;You're essentially looking for unit testing.  In C#, I am partial to nunit, though there are other testing suites, and they all do roughly the same thing.&lt;/p&gt;&#xA;&lt;p&gt;Here's a breakdown of an nunit test:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cs prettyprint-override&quot;&gt;&lt;code&gt;[TestFixture] // 2&#xA;public class CalculatorTests // 1&#xA;{&#xA;   [Test] // 4&#xA;   public void Sum_of_two_numbers() // 3&#xA;   {&#xA;      // Arrange&#xA;      double first = 10;&#xA;      double second = 20;&#xA;      var calculator = new Calculator();&#xA;&#xA;      // Act&#xA;      double result = calculator.Sum(first, second);&#xA;&#xA;      // Assert&#xA;      Assert.Equal(30, result);&#xA;   }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A class serves as a &lt;em&gt;container&lt;/em&gt; for a series of tests.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;TextFixture&lt;/code&gt; attribute lets Nunit know about (1).  Test frameworks do automated discovery of tests.&lt;/li&gt;&#xA;&lt;li&gt;The name of the unit test.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;[Test]&lt;/code&gt; attribute tells Nunit that we are declaring a test.&lt;/li&gt;&#xA;&lt;li&gt;The ARRANGE section of a test creates the conditions for the test. This setup is trivial, but the arrange section can be quite complex!&lt;/li&gt;&#xA;&lt;li&gt;The ACT section of a test actually runs the test or tests.&lt;/li&gt;&#xA;&lt;li&gt;The ASSERT section makes sure that the appropriate result(s) took place.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you want a web tool that simplifies your workflow tremendously, you can use something like GitHub Classroom or CodingRooms, which will both accept submissions and apply the tests automatically (and give you a nice readout as well!), though be aware that these are both paid platforms.  (I was especially impressed by CodingRooms at a workshop I attended.)&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-05-16T17:17:35.540" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7722" PostTypeId="2" ParentId="7675" CreationDate="2023-05-17T20:11:33.053" Score="3" Body="&lt;p&gt;Although programming languages are not like human languages. I think an analogy will fit this question.&lt;/p&gt;&#xA;&lt;p&gt;Can you learn a foreign language by memorising phrases?&lt;/p&gt;&#xA;&lt;p&gt;Answer: it may help, but you won't be fluent or even close.&#xA;You need to learn to program.&#xA;However, yes. You will have some memorised phrases. And you will look stuff up.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-05-17T20:11:33.053" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7723" PostTypeId="2" ParentId="7679" CreationDate="2023-05-17T20:16:03.133" Score="1" Body="&lt;p&gt;This is very advanced, However.&lt;/p&gt;&#xA;&lt;p&gt;Consider using a Unix shell (e.g. &lt;code&gt;bash&lt;/code&gt;). Start with (anonymous) pipes. e.g. &lt;code&gt;ls | less&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;After that, when you need 2-way or remote communication, you can introduce sockets.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-05-17T20:16:03.133" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7724" PostTypeId="1" CreationDate="2023-05-18T13:56:58.743" Score="2" ViewCount="134" Body="&lt;p&gt;I've noticed with new programmers, primarily those using GUIs (e.g. Matlab, Rstudio, Spyder) that there is a strong tendency to for them to have a giant file, e.g. &lt;code&gt;allmycode.R&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Within that file, there are many unrelated (or partially related) blocks of code.  To do an analysis, they interactively do something like&lt;/p&gt;&#xA;&lt;p&gt;a) run block 1&lt;/p&gt;&#xA;&lt;p&gt;b) then block 5&lt;/p&gt;&#xA;&lt;p&gt;c) then block 3&lt;/p&gt;&#xA;&lt;p&gt;d) then the last line of block 6&lt;/p&gt;&#xA;&lt;p&gt;Obviously, this programming style is very challenging from a reproducibility standpoint and makes it hard for more advanced users to help them.  It's like they are using implied Go-To statements that only they know about.&lt;/p&gt;&#xA;&lt;p&gt;Questions :&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is there a name for this type of programming 'style'?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I want to know so I have the words to use with Google to find a solution that helps me educate users when they stumble with this.&lt;/p&gt;&#xA;" OwnerUserId="13366" LastActivityDate="2023-06-04T10:55:58.390" Title="When people program with GUIs in a Go-To type fashion?" Tags="|programming-environment|gui|goto|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7725" PostTypeId="1" CreationDate="2023-05-20T22:39:45.890" Score="0" ViewCount="117" Body="&lt;p&gt;The term hacker didn't originate at MIT rail road club, it's as ancient as press, or mass publications, and the same argument still exists.  How do we tie the common definition and word use by reference of documents to show the absolutely obvious and easily understood process as confirmation of the proper definition?&lt;/p&gt;&#xA;" OwnerUserId="13372" LastActivityDate="2024-02-16T13:02:15.270" Title="What's the difference between a Hacker and a Cracker as an Ethics Discussion?" Tags="|programming|coding-style|ethics|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7726" PostTypeId="2" ParentId="7725" CreationDate="2023-05-20T22:39:45.890" Score="0" Body="&lt;p&gt;The etymology of the word harkens back to the term &amp;quot;Hack&amp;quot; which means the prolific writer or &amp;quot;Hack Writer&amp;quot;, usually for cheap hire churning out material to be published at a low rate of payment or return. Which in turn comes from the term &amp;quot;Hackney&amp;quot; or hackney horse for hire.&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Hack&amp;quot; also refers to &amp;quot;a rack for feeding cattle&amp;quot; Webster's Dictionary of &amp;quot;Hack&amp;quot; 1828 is the other side of the coin in the print publishing game of widespread consumption of written content. It’s an obvious prolific or at least long-suffering attempt term, and words do not usually appear out of nothingness. It was looked at as a hire-a-writer for cheap, back in the 1990s when even the most elite programmers might make twice the minimum wage. (I know I was there, a ComSec officer that was part of the tech transfer that created the internet. I wrote the first social app for law enforcement and the very first web login and user management, as well as forums such as this one. Those existed before in what were called BBS (Bulletin Board Service of individual computers with direct dial-in modems, but of the web, I’m the progenitor.&lt;/p&gt;&#xA;&lt;p&gt;The basic context of the word hack is easily attributable to computer programming from a text line, to tenaciously keep at an initially unrewarding and terrifically difficult task. Its initially positive connotation became derogatory by those railing against those with authority over computers and the now commercially worldwide accessible Internet which was built by &amp;quot;hackers&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Hack, besides referring to the numerous poorly paid writers of the paper press age, hired by publishers to turn out content, also refers to a “rack to feed cattle from” Websters 1928 (along with nearly 5 dozen definitions), but essentially someone who keeps at something, often beyond the norm, social or peer pressures, or even showing a profit, or someone hired to churn out code. I.E. hard working programmers.&lt;/p&gt;&#xA;&lt;p&gt;Somehow… through some antagonism of those trying to break or rail against the growing dominance of computers, and those who are their masters, the term was confused with Crackers, those trying to break the “coders” or “hackers” work. “Cracking the code” is as old as encryption or secret messages, notable in computers the famous Alan Turing was a Cracker who broke the NAZI Enigma machine.&lt;/p&gt;&#xA;&lt;p&gt;They are in no way synonyms. It’s Hacker vs Cracker, Cracker vs Hacker, Farmer/Builder vs Maruader kind of thing. Hackers can exist without Crackers.. but Crackers are a subgroup dependent on what Hackers build… encryption vs cracking basically.&#xA;Hack means to keep at something, tenaciously. Computer programming is several times over applicable as requiring a “Hack” or called “Hacker” in that way they are the same word, the ancillary meanings are at best poetic license, the workhorse on which the site, bank, store, program, communication, or social media depends on.&lt;/p&gt;&#xA;&lt;p&gt;Before SAAS became popular, there was one computer guy per office of publications, the those that drift towards them.&lt;/p&gt;&#xA;&lt;p&gt;There are several coding playlists from BEAD.LLC youtube links.&lt;/p&gt;&#xA;&lt;p&gt;To find a Cracker is much like looking for any type of crime, to find groups with kiddie scripts or credit card numbers, easy to hack, harder to use without being caught as everything on the internet is trackable, it’s usually only used to harass/cause damage. Such as someone passing out stolen numbers and someone sending a rose to everyone in a women's dorm. A package purchased goes to someone’s door, which is why those who have them sell them instead of using them, it takes a series of fools, probably easy to find. The dark web has them, torrents, for instance, and some people selling email addresses to spammers, simply annoying, even being a low-paid writing hack pays better.&lt;/p&gt;&#xA;" OwnerUserId="13372" LastActivityDate="2023-05-20T22:39:45.890" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7727" PostTypeId="1" CreationDate="2023-05-21T17:42:16.960" Score="3" ViewCount="80" Body="&lt;p&gt;I am scheduled to teach a &amp;quot;Computer Science Theory&amp;quot; course. Topics include: Turing Machines, Languages, Automata (DFA, NFA), etc. I would like to make it less boring and more practical for students. My idea is to add some coding assignments where students are required to program (Python, Java) some of the machines used in the course. Some hints/suggestions/materials would be very useful and appreciated. Does anyone have such experience or do you know of any course applying similar approach?&lt;/p&gt;&#xA;" OwnerUserId="6410" LastEditorUserId="27" LastEditDate="2023-05-21T19:15:44.263" LastActivityDate="2023-05-23T17:51:15.587" Title="Any experience/resources on teaching computer science theory with a practical approach?" Tags="|computational-thinking|cs-theory|turing-machines|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7728" PostTypeId="2" ParentId="7727" CreationDate="2023-05-21T19:25:59.713" Score="3" Body="&lt;p&gt;My course takes this approach.  I have the students create a DFA and an NFA runner, and later, a TM runner as well.  We skip PDAs - they turned out to be monstrously difficult for the students to deal with. It turns out that implementing nondeterministic stacks is just a bit too abstractly difficult for many of my students.&lt;/p&gt;&#xA;&lt;p&gt;I will give you warning of a few traps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Many students don't think to test the smallest possible machines (e.g. one state, either as accept or not)&lt;/li&gt;&#xA;&lt;li&gt;NFAs are harder than they sound.  I specify a maximum depth (such as 50 rounds) to prevent infinite looping on epsilons.&lt;/li&gt;&#xA;&lt;li&gt;Turing Machines are relatively easy to code up. What's nice is to give them something to actually code up on them. I've created a little competition, which I've &lt;a href=&quot;https://cseducators.stackexchange.com/a/7683/27&quot;&gt;earlier outlined here&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-05-22T14:39:19.673" LastActivityDate="2023-05-22T14:39:19.673" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7734" PostTypeId="1" AcceptedAnswerId="7735" CreationDate="2023-05-23T22:38:50.933" Score="5" ViewCount="107" Body="&lt;p&gt;I am anticipating a blind student in a class I teach in an upcoming semester, and I am preparing for this by asking around if anyone has had this situation for a discrete structures / theory of computation course with finite automata, pushdown automata, and Turing Machines.  JFLAP doesn't appear to be accessible.  I found one journal article on attempts to make it accessible to the visually impaired, but I don't really see any further advances on that.&lt;/p&gt;&#xA;&lt;p&gt;I would like to know what options I might have to help this (and other) student in this position.&lt;/p&gt;&#xA;" OwnerUserId="13401" LastEditorUserId="27" LastEditDate="2024-03-02T23:03:24.897" LastActivityDate="2024-03-02T23:03:24.897" Title="Teaching state transition diagrams to visually impaired (blind) students" Tags="|adult-education|computational-thinking|discrete-math|accessibility|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7735" PostTypeId="2" ParentId="7734" CreationDate="2023-05-24T01:10:10.693" Score="4" Body="&lt;p&gt;Oof, this is tricky.  It's traditionally so visual!&lt;/p&gt;&#xA;&lt;p&gt;Can this student read Braile?&lt;/p&gt;&#xA;&lt;p&gt;One option (if you have a TA, they could help prepare these) would be to use a builder toy with balls and transitions (something like &lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/B0BFX1W252&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt;, perhaps) and preprinted braile labels on stickers that the student could hold for key examples.  Make sure to include an arrow somewhere on each transition.&lt;/p&gt;&#xA;&lt;p&gt;Improvised examples, such as in response to questions, would be trickier - you may have to construct the model and simply have a fellow student explain what each transition does as the blind student holds and feels it.&lt;/p&gt;&#xA;&lt;p&gt;You could also bring in a Pez dispenser and some Pez candy for pushdown automata to help visualize the stack.  (This is actually useful for sighted students as well.)&lt;/p&gt;&#xA;&lt;p&gt;Finally, for both the stack in PDAs and the tape in turing machines, puffy stickers (such as a sheet of star stickers and a sheet of round stickers) might give the student a fighting chance to explore the state of operations along with the class.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-05-24T01:10:10.693" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7736" PostTypeId="2" ParentId="7724" CreationDate="2023-05-24T02:50:38.167" Score="1" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;The determined Real Programmer can write FORTRAN programs in any language.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.ecb.torontomu.ca/%7Eelf/hack/realmen.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Real Programmers don't use Pascal&lt;/a&gt; Ed Post 1982.&lt;br /&gt;&#xA;For more context see the refs &lt;a href=&quot;https://en.m.wikipedia.org/wiki/Real_Programmers_Don%27t_Use_Pascal&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt; for how the meme has been taken further.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Note&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Real&lt;/em&gt; is really sarcastic!&lt;/li&gt;&#xA;&lt;li&gt;The broadside against Fortran was needed in 1982. Today it could be Java/JS/Python/PHP...&#xA;Anything used by just too many (non)programmers to be able to maintain a half-decent average user profile.&lt;/li&gt;&#xA;&lt;li&gt;Yeah, it's an elitist outlook. Education is inherently elitist.&lt;/li&gt;&#xA;&lt;li&gt;I also have some personal misgivings about this quote since one of my best teachers was &lt;em&gt;A Real Fortran Programmer!&lt;/em&gt; He was as engaging in his Numerical Analysis and Linear Algebra classes as he was doggedly committed to Fortran IV (No Fortran 77 even!)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There is likely also a very prosaic reason for your finding. The kids of today are computer savvy, but in a bizarre way: they use their devices 95% of the time as dialup modems to the internet and then social media. They don't know about the computer as a serious entity in it's own right. See right here&#xA;&lt;a href=&quot;https://cseducators.stackexchange.com/questions/3535/introducing-file-systems-to-students-who-really-dont-understand&quot;&gt;What's a directory&lt;/a&gt;?, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/5551/what-is-a-file/&quot;&gt;What's a file&lt;/a&gt;?&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2023-05-24T14:39:04.780" LastActivityDate="2023-05-24T14:39:04.780" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7737" PostTypeId="1" CreationDate="2023-05-25T22:27:57.937" Score="0" ViewCount="106" Body="&lt;p&gt;A lot of teaching examples of &lt;em&gt;off-by-one&lt;/em&gt; errors which educators provide to their students involve &lt;strong&gt;for&lt;/strong&gt;-loops.&lt;/p&gt;&#xA;&lt;p&gt;For example, we might have the following for-loop:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cpp prettyprint-override&quot;&gt;&lt;code&gt;// Array `A` contains `50` names indexed from `0` to `49`  &#xA;//&#xA;//     0 ... Orquil Bolouri&#xA;//     1 ... Manuel Tobellon&#xA;//     2 ... Kabatha Dowling&#xA;//     3 ... Lornton Krowley&#xA;&#xA;Toni Toson&#xA;// `numel(A)` returns the number of elements in array `A`   &#xA;// `numel(A)` represents the number `50` in this context &#xA;&#xA;for k from 0 to numel(A) {&#xA;    first_name = get_first_name(A); &#xA;    print(first_name);  &#xA;}    &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1&gt;What are examples of off-by-one Error in the &amp;quot;&lt;em&gt;Real World&lt;/em&gt;&amp;quot;?&lt;/h1&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-31T21:45:22.387" Title="What are some teaching examples for a lesson on off-by-one errors which do not involve a for-loop or array indexing?" Tags="|resource-request|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7738" PostTypeId="2" ParentId="7737" CreationDate="2023-05-25T22:27:57.937" Score="0" Body="&lt;p&gt;This is a community-editable wiki. Feel free to edit it.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Example of Three Languages and Only Two Compilers&lt;/h1&gt;&#xA;&lt;p&gt;Suppose that someone is writing code for a text-adventure video-game where they want to translate a large number of simple sentences from natural language into python, with an intermediate language in between.&lt;/p&gt;&#xA;&lt;p&gt;You might assume that there are 3 compilers for 3 languages, but there are one 2 compilers.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;A language of short simple (not complex or compound) alpha-numeric German sentences.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;kombinieren Mehl, Wasser, Basilikum und Knoblauch&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;A middle language of highly structured German verbs and nouns with order of operations specified with parentheses, square-brackets, curly-braces, etc...&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;kombinieren(Mehl, Wasser, Basilikum, Knoblauch)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;python.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Example of Shelves for a Closet Full of Shoes&lt;/h1&gt;&#xA;&lt;p&gt;Imagine a large-household where rooms are given to guests or rented out to tenants.&lt;/p&gt;&#xA;&lt;p&gt;The number of shelves is different than the number of shelf-spaces on which shoes can be placed.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-25T22:27:57.937" CommentCount="0" CommunityOwnedDate="2023-05-25T22:27:57.937" ContentLicense="CC BY-SA 4.0" />
  <row Id="7739" PostTypeId="1" CreationDate="2023-05-26T03:46:08.043" Score="0" ViewCount="35" Body="&lt;p&gt;These are the things in backend that confuse me a lot.&#xA;&lt;a href=&quot;https://github.com/Lucifergene/Docker-Mern&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/Lucifergene/Docker-Mern&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let's take this code for example.&#xA;Say I'm in server folder.&lt;/p&gt;&#xA;&lt;p&gt;I can't understand how config models routes and index.js relate to each other. And how do I write one?&lt;/p&gt;&#xA;&lt;p&gt;Even for client part,  I've trouble in understanding how files relate to each other.&lt;/p&gt;&#xA;&lt;p&gt;For example, I'm here. &lt;a href=&quot;https://github.com/Lucifergene/Docker-Mern/tree/master/client/app&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/Lucifergene/Docker-Mern/tree/master/client/app&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I've tough time understanding how those files connect to each other. (I've done a MERN course worth 90 hrs already from a bootcamp).&lt;/p&gt;&#xA;&lt;p&gt;I had to quit web development altogether and get some other job just because of this. But now, I am reigniting my desire to learn backend development as I'm not really a frontend person.&lt;/p&gt;&#xA;&lt;p&gt;I've few project ideas as well.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;CS Notes selling site for my country.&lt;/li&gt;&#xA;&lt;li&gt;blog website&lt;/li&gt;&#xA;&lt;li&gt;Reminder in calendar.&lt;/li&gt;&#xA;&lt;li&gt;Video watched percentage calculator from a playlist. Like in udemy.&lt;/li&gt;&#xA;&lt;li&gt;Another blog where anyone can create an account and post.&lt;/li&gt;&#xA;&lt;li&gt;Locally hosted book search engine for pdf files. Like google books.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;These are some of the project ideas of software development. Some are web, some are desktop based while some are android based.&lt;/p&gt;&#xA;&lt;p&gt;I just shared this so that it could help users in answering the question.&lt;/p&gt;&#xA;" OwnerUserId="12544" LastActivityDate="2023-05-26T03:46:08.043" Title="How to learn how files are connected to each other, routing,database connection in software development?" Tags="|programming|web-development|app-development|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7740" PostTypeId="1" AcceptedAnswerId="7763" CreationDate="2023-05-26T06:47:18.960" Score="9" ViewCount="384" Body="&lt;p&gt;I have noticed that in many &lt;em&gt;computer science&lt;/em&gt; courses, professors tend to focus on teaching &lt;code&gt;C++11&lt;/code&gt; as the primary version of the &lt;code&gt;C++&lt;/code&gt; programming language, rather than covering newer versions such as &lt;code&gt;C++14&lt;/code&gt;, &lt;code&gt;C++17&lt;/code&gt;, or &lt;code&gt;C++20&lt;/code&gt;. I'm curious about the reasons behind this approach and whether it's common across different academic institutions.&lt;/p&gt;&#xA;&lt;p&gt;I took plenty &lt;code&gt;C++&lt;/code&gt; courses at &amp;quot;my&amp;quot; (I don't own it...) university including &lt;strong&gt;OOP&lt;/strong&gt;, &lt;strong&gt;Data Structures&lt;/strong&gt;, &lt;strong&gt;Algorithms and Analysis of them&lt;/strong&gt;,... and they always wanted us to compile the code with specific flags (Most of them don't matter, like &lt;code&gt;-Wall&lt;/code&gt; or &lt;code&gt;-Werror&lt;/code&gt;) such as &lt;code&gt;-std=c++11&lt;/code&gt;. I never really noticed that in the lower level courses, but as you move up you start to notice some things aren't available in &lt;code&gt;C++11&lt;/code&gt;, and those might be the solution to your problem.&lt;/p&gt;&#xA;&lt;p&gt;Specifically, I would like to know:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What are the main factors that influence professors' decisions to teach C++11 over newer versions?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Are there any significant differences or challenges associated with teaching newer versions of C++ in a classroom setting?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;How does this choice impact students' learning experiences and their preparedness for industry standards?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Are there any educational resources or case studies available that discuss the benefits and drawbacks of teaching different versions of C++?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I appreciate any insights or experiences shared by educators, professionals, or students who have encountered this teaching approach in computer science programs. Additionally, if there are alternative teaching strategies that incorporate more recent &lt;code&gt;C++&lt;/code&gt; versions, I would be interested to learn about those as well. Thank you!&lt;/p&gt;&#xA;&lt;p&gt;P.S I'm sorry is I offended anyone by including &lt;em&gt;(all)&lt;/em&gt; in the question title.&lt;/p&gt;&#xA;" OwnerUserId="13406" LastEditorUserId="13406" LastEditDate="2023-05-26T06:49:24.167" LastActivityDate="2023-11-04T22:44:36.287" Title="Why do (all) professors teach C++ 11?" Tags="|language-choice|c++|classroom-environment|" AnswerCount="4" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7741" PostTypeId="1" AcceptedAnswerId="7789" CreationDate="2023-05-26T08:37:56.033" Score="1" ViewCount="67" Body="&lt;p&gt;Good afternoon, colleagues!&lt;/p&gt;&#xA;&lt;p&gt;We are now preparing to launch a new training program, which will be designed for government managers and policy makers whose competencies will include managing big data. The problem is that the courses for them should be without mathematics and programming, because the target group of applicants are humanities.&lt;/p&gt;&#xA;&lt;p&gt;After some thought, we came to the conclusion that it makes sense for us to develop four subjects: data science, decision support systems, data mining, and big data management infrastructure.  We already had work on all of these subjects, but there's a lot of math involved.&lt;/p&gt;&#xA;&lt;p&gt;Basically, one could focus on what a manager can use (including some useful applied tools), how it all works in general terms, and the methods of rational thinking, critical thinking and decision-making (including those based on big data, the modern philosophy of causality - by Judah Perle, for example).&lt;/p&gt;&#xA;&lt;p&gt;What experience do you have in teaching these kinds of programs, what advice do you have for this kind of audience? Perhaps there are some recognized courses already that we don't know about so we don't have to reinvent the wheel?&lt;/p&gt;&#xA;" OwnerUserId="6387" LastEditorUserId="6387" LastEditDate="2023-05-26T10:21:34.980" LastActivityDate="2023-06-04T09:33:07.787" Title="Big Data Analytics for Policy Making with No Math inside" Tags="|curriculum-design|databases|information-technology|course-design|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7742" PostTypeId="2" ParentId="7737" CreationDate="2023-05-27T11:54:02.490" Score="5" Body="&lt;p&gt;Probably the most common out by one error is the fence-post error.&lt;/p&gt;&#xA;&lt;p&gt;In a linear fence, the number of posts is one more than the number of panels.&#xA;It is important to know whether you are counting fence-posts or panels. And, to know which quantity you want to know. Then you can adjust.&lt;/p&gt;&#xA;&lt;p&gt;You can build a lesson around this concept, before bringing it back to programming.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-05-27T11:54:02.490" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7743" PostTypeId="1" CreationDate="2023-05-28T00:31:03.647" Score="8" ViewCount="7351" Body="&lt;p&gt;The example of a for-loop offered in introductory texts is often very contrived.&lt;/p&gt;&#xA;&lt;p&gt;For example, we might have:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for k starting at 1 and ending at 30 {&#xA;    display(A[k]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;When a student asks for a real-world example, what might we give them?&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-10-28T13:45:44.613" Title="What is a real-world example of a for-loop?" Tags="|code-example|" AnswerCount="21" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7744" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T00:31:03.647" Score="2" Body="&lt;p&gt;Sometimes, people press the caps lock key on a computer keyboard.&lt;/p&gt;&#xA;&lt;p&gt;Other times, people write in all lower case.&lt;/p&gt;&#xA;&lt;p&gt;There are &lt;a href=&quot;https://convertcase.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;websites&lt;/a&gt; where people copy and paste their text to fix it quickly instead of re-typing everything with their fingers.&lt;/p&gt;&#xA;&lt;p&gt;The owners of such websites are paid money to publish advertisements in the left and right margin of the website.&lt;/p&gt;&#xA;&lt;p&gt;The following python script will convert any string into TitleCase.&lt;/p&gt;&#xA;&lt;p&gt;For example, if you make a header on Stack Exchange, you might want to make the leftmost letter in each word capitalized unless the word contains three or fewer characters.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;# A Guide on For Loops #&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Below is the for-loop written in python:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;olist = list() &#xA;&#xA;    for iword in iwords:&#xA;        # `oword` is output word&#xA;        if len(iword) &amp;gt; 3:&#xA;            oword = iword[0].upper() + iword[1:].lower()&#xA;        else:&#xA;            oword = iword.lower()&#xA;        olist.append(oword)&#xA;    &#xA;    space = &amp;quot; &amp;quot;&#xA;    owords = space.join(olist)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Is we embellish a little bit, we might get the following:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;# output list&#xA;&#xA;def convert_to_title_case(iiwords:str):&#xA;    &amp;quot;&amp;quot;&amp;quot;&#xA;    &amp;quot;&amp;quot;&amp;quot;&#xA;    &#xA;    # begin code to convert strings and lists alike into strings &#xA;    iwords = iiwords &#xA;    if hasattr(iwords, &amp;quot;__iter__&amp;quot;):&#xA;        iwords = &amp;quot;&amp;quot;.join(str(x) for x in iwords)&#xA;    iwords = str(iwords)&#xA;    iwords = iter(iwords)&#xA;    # end code to conert strings a list into strings  &#xA;&#xA;    olist = list() &#xA;&#xA;    for iword in iwords:&#xA;        # `oword` is output word&#xA;        if len(iword) &amp;gt; 3:&#xA;            oword = iword[0].upper() + iword[1:].lower()&#xA;        else:&#xA;            oword = iword.lower()&#xA;        olist.append(oword)&#xA;    &#xA;    # chr(32) is a single space character &#xA;    # chr(9)  is a tab character &#xA;    owords = chr(32).join(olist)&#xA;    &#xA;    return owords &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Below, we see the code being tested:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;# input text&#xA;itext = &amp;quot;A BoOk On YuUcA PlAnTs of NoRTH AND SOUTH aMERICA&amp;quot;&#xA;# aka, A Book on Environmentally Friendly Alternative to&#xA;#     * Ballpoint Pens&#xA;#     * Paint Brushes for outlines of cartoon characters&#xA;#     * Paint Brushes for Continous Line Drawings and One-Line Drawings &#xA;#     * Background Art Having Lots of Dry Grass Growing   &#xA;&#xA;# input words&#xA;iwords = itext.split()&#xA;&#xA;# fix the capitalization of words&#xA;owords = convert_to_title_case(iwords)&#xA;&#xA;# display the final results &#xA;print(owords)&#xA;&#xA;# HOW TO SEND SOMEWHERE OTHER THAN THE SCREEN YOU SEE WITH YOUR EYEBALLS&#xA;#  &#xA;# MAYBE SAVE STUFF TO FILE &#xA;#&#xA;# import io&#xA;# ostrm = io.StringIO()&#xA;# print(owords, file=ostrm)&#xA;# ostrm.close() &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-28T00:31:03.647" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7745" PostTypeId="1" CreationDate="2023-05-28T01:46:06.863" Score="1" ViewCount="113" Body="&lt;p&gt;When teaching computer programming, occasionally students who are interested in music ask instructors for how a double ended queue could be useful in the music industry.&lt;/p&gt;&#xA;&lt;p&gt;What is a &amp;quot;&lt;em&gt;real-world&lt;/em&gt;&amp;quot; or &amp;quot;&lt;em&gt;real-life&lt;/em&gt;&amp;quot; application of double-ended queues and computer programming for people interested in music?&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-31T20:27:20.840" Title="What is a musical application of linked lists?" Tags="|code-example|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7746" PostTypeId="2" ParentId="7745" CreationDate="2023-05-28T01:46:06.863" Score="1" Body="&lt;p&gt;I am hoping that someone else will post an answer better written than this one.&lt;/p&gt;&#xA;&lt;p&gt;One application of double-ended queues to real-life musical applications is to make sure that an internet-based music playlist or internet based radio station does not play a song that was one of the most recent 10, 20, or 30 songs you heard.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;from collections import deque&#xA;import random  &#xA;&#xA;class SongGetter:  &#xA;    # create a double-ended queue   &#xA;    forbidden_songs = deque()&#xA;    &#xA;    @classmethod&#xA;    def get_song_old_imp(cls):&#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;           Faux implementation of how some internet radio service&#xA;           or playlist shuffler currently gets music&#xA;&#xA;           This is a temporary place-holder of the code to be wrapped&#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;        songs = [&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song1&amp;quot;,&#xA;            &amp;quot;song2&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song3&amp;quot;,&#xA;            &amp;quot;song4&amp;quot;,&#xA;            &amp;quot;song5&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song9&amp;quot;,&#xA;            &amp;quot;song10&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song11&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song12&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song13&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;THE OFT REPEATED SONG&amp;quot;,&#xA;            &amp;quot;song14&amp;quot;&#xA;        ]&#xA;        try:&#xA;            song = songs[cls.old_song_idx]&#xA;        except IndexError:&#xA;            cls.old_song_idx = 0 &#xA;            song = songs[cls.old_song_idx]&#xA;            &#xA;        cls.old_song_idx += 1&#xA;        return song&#xA;            &#xA;    old_song_idx = 0 &#xA;        &#xA;    @classmethod&#xA;    def get_song_new_imp(cls):  &#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;        New Implementation of `Get a Song`&#xA;        ------------------------------------------&#xA;        If&#xA;            the new song is something we've listened to recently,&#xA;        then&#xA;            get a different song &#xA;        &amp;quot;&amp;quot;&amp;quot;   &#xA;        #      &#xA;        return cls.impimp()&#xA;        &#xA;    @classmethod&#xA;    def second_impimp(cls):&#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;          &#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;    &#xA;        next_song = cls.get_song_old_imp()&#xA;        &#xA;        while next_song in cls.forbidden_songs:&#xA;            next_song = cls.get_song_old_imp()&#xA;            &#xA;        cls.forbidden_songs.append(next_song)&#xA;        &#xA;        # unban the oldest song in the set of all banned songs &#xA;        cls.forbidden_songs.popleft()&#xA;            &#xA;        return next_song&#xA;        &#xA;    &#xA;    @classmethod&#xA;    def first_impimp(cls):  &#xA;        &amp;quot;&amp;quot;&amp;quot;&#xA;        What to do the first time Starbucks Coffee opens in the morning&#xA;        or the &amp;quot;radio&amp;quot;/internet playlist begins &#xA;        &amp;quot;&amp;quot;&amp;quot;   &#xA;        # get a song the old way you did last month        &#xA;        next_song = cls.get_song_old_imp()&#xA;        &#xA;        while next_song in cls.forbidden_songs:&#xA;            next_song = cls.get_song_old_imp()&#xA;            &#xA;        cls.forbidden_songs.append(next_song)&#xA;        &#xA;        if len(cls.forbidden_songs) &amp;gt;= 10:&#xA;            # if we have banned (forbidden) 10 or more songs today&#xA;            # we need to start un-banning the oldest banned song &#xA;            cls.impimp = cls.second_impimp&#xA;            &#xA;        return next_song&#xA;        &#xA;    # `imp imp` is the `implementation of the implementation`&#xA;    impimp = first_impimp&#xA;            &#xA;   &#xA;#####################################################333&#xA;&#xA;for _ in range(50):    &#xA;    song = SongGetter.get_song_new_imp()&#xA;    play(song)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-05-28T01:46:06.863" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7747" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T02:43:01.707" Score="8" Body="&lt;p&gt;The conventional &lt;code&gt;for&lt;/code&gt; loop (in the c-like languages, at least) is a low-level iteration structure, and there are two challenges.  The first is to understand the mechanics of the thing, and the second is to grok its purpose.&lt;/p&gt;&#xA;&lt;p&gt;You are only asking about the latter, but I would caution not to dismiss the simple examples - they are the best tools for the former.  Without those mechanics, there is no fluency in the mind of the budding coder, and without that fluidity, they have an uphill battle to use the idea to build later ideas.&lt;/p&gt;&#xA;&lt;p&gt;That said, for loops are great for going through an array or a string, or for iterating up to a certain predetermined point.&lt;/p&gt;&#xA;&lt;p&gt;There comes a time when you will point out that &lt;code&gt;for&lt;/code&gt; loops and &lt;code&gt;while&lt;/code&gt; loops are equally powerful, but have to nevertheless explain that we use the former when we want to keep all of the iteration information together at the top, which is typically when the loop is simple, incremental, and stops at a known point.  For all other, more complicated situations, we tend towards &lt;code&gt;while&lt;/code&gt; loops instead.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-05-29T10:27:11.067" LastActivityDate="2023-05-29T10:27:11.067" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7748" PostTypeId="2" ParentId="7740" CreationDate="2023-05-28T09:43:55.553" Score="9" Body="&lt;p&gt;The advantage of C++ for teaching programming is that it is &lt;em&gt;reasonably&lt;/em&gt; close to the actual raw workings of the computer whilst being high level &lt;em&gt;enough&lt;/em&gt; to teach higher level concepts. The features added in recent versions of C++ are mostly features designed to &lt;em&gt;avoid&lt;/em&gt; working with lower level workings so using these features detracts from the pedagogical advantages of C++.&lt;/p&gt;&#xA;&lt;p&gt;There's also probably some aspect that CS Professors are not necessarily interested in keeping up with the bleeding edge of C++ language design and fashion. These are not relevant to the kind of things that most Computer Scientists are doing. Many departments agree which language to use for base courses at the departmental level and these discussions and any changes can be highly political. This is a considerably obstacle to change.&lt;/p&gt;&#xA;&lt;p&gt;How well it prepares you for industry depends on where you end up, there are plenty of C++ jobs out there with companies that don't use modern C++ features (the last one I had was using C++14, and used their own libraries rather than STL for most everything). But in any case, fresh graduates are expected to need six to twelve months to become properly productive in the workplace anyway, so it's not a particularly big deal whether or not you've learnt some corner of the STL.&lt;/p&gt;&#xA;" OwnerUserId="2172" LastEditorUserId="2172" LastEditDate="2023-05-28T11:25:39.780" LastActivityDate="2023-05-28T11:25:39.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7749" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T09:47:20.397" Score="4" Body="&lt;p&gt;There are a bunch of real-life algorithms that can be represented using for loops. Some examples:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Emptying your suitcase in an orderly manner after returning from a journey:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;for item in suitcase:&#xA;    destination = designated_place(item)&#xA;    item.move(destination)&#xA;&#xA;suitcase.move(designated_place(suitcase))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Remove a specific card from a deck:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;for card in deck:&#xA;    if card == ACE_OF_SPADES:&#xA;        deck.remove(card)&#xA;        break&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Disposing of a bunch of cardboard boxes of different sizes into a distant garbage bin:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;pile_of_flattened_boxes = pile()&#xA;for box in boxes:&#xA;    for other_box in boxes:&#xA;        if box &amp;lt; other_box:&#xA;            box.flatten()&#xA;            pile_of_flattened_boxes.add(box)&#xA;            break&#xA;    else:&#xA;        largest_box = box&#xA;&#xA;for box in pile_of_flattened_boxes:&#xA;    largest_box.add(box)&#xA;&#xA;largest_box.move_to(garbage)&#xA;largest_box.empty_into(garbage)&#xA;largest_box.flatten()&#xA;garbage.add(largest_box)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="25" LastEditorUserId="25" LastEditDate="2023-05-28T09:54:04.877" LastActivityDate="2023-05-28T09:54:04.877" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7750" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T10:27:28.643" Score="2" Body="&lt;p&gt;Loading suitcases onto a train might work:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for entry in one through the number of suitcases on the platform {&#xA;    load the entry'th suitcase onto the train&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But how about this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;while there is a suitcase on the platform {&#xA;    load suitcase onto the train&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;code&gt;while&lt;/code&gt; loops, after all, are just syntactic sugar on top of &lt;code&gt;for&lt;/code&gt; loops.&lt;/p&gt;&#xA;&lt;p&gt;Or how about this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for each suitcase on the platform {&#xA;    load suitcase onto the train&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;code&gt;for each&lt;/code&gt; loops, after all, are just syntactic sugar on top of &lt;code&gt;while&lt;/code&gt; loops.&lt;/p&gt;&#xA;&lt;p&gt;Plain &lt;code&gt;for&lt;/code&gt; loops are rare in modern software, because we have better tools available in modern languages. Why not prepare students for real-life code by teaching them the simplest, most powerful, &lt;em&gt;and&lt;/em&gt; most intuitive loop structure?&lt;/p&gt;&#xA;" OwnerUserId="2972" LastActivityDate="2023-05-28T10:27:28.643" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7751" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T11:38:08.627" Score="2" Body="&lt;p&gt;Are you teaching programming in a specific language, or computer science?&lt;/p&gt;&#xA;&lt;p&gt;If the latter, then I would start with the concept of a functional mapping applied to the elements of a set: for example, given a set containing the names of countries, you want a set containing pictures of their flags. Then you explain that in low-level procedural languages, there is a for-loop which is commonly used to implement functional mappings of that kind; though it can also be used in other ways, because it may process the elements of the set in a defined order, and it can be stateful. So it can be used for an abstract &amp;quot;reduce&amp;quot; operation as well as an abstract &amp;quot;map&amp;quot; operation.&lt;/p&gt;&#xA;" OwnerUserId="2936" LastActivityDate="2023-05-28T11:38:08.627" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7752" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T13:11:02.933" Score="17" Body="&lt;p&gt;Dealing cards in a poker game.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for i from 1 to 5: # 5 cards in a hand&#xA;    for each player:&#xA;        deal a card to the player&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And then playing the game is also like a &lt;code&gt;for&lt;/code&gt; loop. You loop around the table, giving each player an opportunity to make a bet or fold. But this might be better done using a &lt;code&gt;while&lt;/code&gt; loop rather than a &lt;code&gt;for&lt;/code&gt; loop.&lt;/p&gt;&#xA;" OwnerUserId="1471" LastEditorUserId="1471" LastEditDate="2023-05-29T13:02:40.160" LastActivityDate="2023-05-29T13:02:40.160" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="7753" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T13:32:24.517" Score="0" Body="&lt;p&gt;Actually, every hand (hour, minute and second) in a clock is a (nested) for loop which does an action of rotating a hand by certain degrees once every second&lt;/p&gt;&#xA;" OwnerUserId="13423" LastActivityDate="2023-05-28T13:32:24.517" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7754" PostTypeId="2" ParentId="7743" CreationDate="2023-05-28T15:34:35.137" Score="3" Body="&lt;p&gt;In statistics and data science, there are many real-world applications where for loops make sense. One of the simplest examples that they can do themselves is calculating the arithmetic average or mean of a group of numbers in something like an array, a vector, a list, etc. Or finding the max/min values. Or sorting the values. And so on.&lt;/p&gt;&#xA;&lt;p&gt;Looping through files is another one with tons of applications.&lt;/p&gt;&#xA;&lt;p&gt;For people interested in eventually learning about computer graphics, there's looping through the pixels of an image or even the screen.&lt;/p&gt;&#xA;" OwnerUserId="9738" LastActivityDate="2023-05-28T15:34:35.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7755" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T01:04:03.857" Score="12" Body="&lt;h4&gt;Reading a book&lt;/h4&gt;&#xA;&lt;p&gt;Reading a book is probably the easiest example.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int numPages = myBook.PageCount();&#xA;for (int page = 1; page &amp;lt;= numPages; page++)&#xA;{ &#xA;    Literacy.ReadPage(myBook.Pages[page]);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This example also naturally displays &lt;em&gt;nested&lt;/em&gt; for loops. Each page has a set of lines to iterate over, each line has a set of words, and each word has a set of characters. You can even expand the nesting in the opposite direction - multiple books might be contained in a shelf, multiple shelves might be contained in a library, and multiple libraries might be contained in a library consortium.&lt;/p&gt;&#xA;" OwnerUserId="1931" LastEditorUserId="1931" LastEditDate="2023-05-29T01:10:34.957" LastActivityDate="2023-05-29T01:10:34.957" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7756" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T09:59:43.333" Score="0" Body="&lt;p&gt;Say you have a class with 31 students and you want to split them into 5 groups.&lt;/p&gt;&#xA;&lt;p&gt;You tell the leftmost student of the first row to say 1, then the next person to the right 2, then 3, then 4, then 5, and then the next one says 1 again, and so on.&lt;/p&gt;&#xA;&lt;p&gt;That's a for loop that you can do and also execute while explaining it to the class.&lt;/p&gt;&#xA;" OwnerUserId="13428" LastEditorUserId="1035" LastEditDate="2023-05-29T10:38:31.417" LastActivityDate="2023-05-29T10:38:31.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7757" PostTypeId="1" CreationDate="2023-05-29T14:59:20.047" Score="25" ViewCount="6699" Body="&lt;p&gt;The students I teach at a middle school in Beijing normally have a limited vocabulary. They struggle to come up with decent variable names and function names. Most of the time they just name variables as a, b, and c, and function names as ab, ac, and ad. Considering their vocabulary, telling them to use a meaningful name seems pointless.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes kids will use &lt;a href=&quot;https://www.twinkl.com.tw/teaching-wiki/pinyin&quot; rel=&quot;nofollow noreferrer&quot;&gt;pinyin&lt;/a&gt;,  a system to spell Chinese Characters with the Latin alphabet based on their pronunciation, to name the function, e.g. &lt;code&gt;fabs&lt;/code&gt; in Chinese pinyin is &amp;quot;jueduizhi&amp;quot;, so instead of &lt;code&gt;fabs(x)&lt;/code&gt; they call it &lt;code&gt;jueduizhi(x)&lt;/code&gt;. That seems to be a workable solution although it looks strange at first.&lt;/p&gt;&#xA;&lt;p&gt;I am a non-native English speaker myself but I have forgotten how I got through this obstacle. But I know naming may be hard for native English speakers too, otherwise, there wouldn't be the &lt;a href=&quot;https://martinfowler.com/bliki/TwoHardThings.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;two hard things&lt;/a&gt; joke. The answer given by &lt;a href=&quot;https://cseducators.stackexchange.com/a/7784/9884&quot;&gt;@bta&lt;/a&gt; gives me valuable input and also reminds me of my Objective-C days that Apple has some &lt;a href=&quot;https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;guidelines for naming&lt;/a&gt;, e.g. &amp;quot;&lt;em&gt;The use of 'get' is unnecessary, unless one or more values are returned &lt;strong&gt;indirectly&lt;/strong&gt;.&lt;/em&gt;&amp;quot; But that is another topic.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone have a similar situation to mine (not necessarily Chinese)? Any suggestion on how I teach these students to name their variables and functions better? Or does it not matter at this stage (when they try to learn the basic programming concepts)?&lt;/p&gt;&#xA;&lt;p&gt;P.S. I would like to add this article as an anecdote to my question: &lt;a href=&quot;https://thoughtbot.com/blog/learning-japanese-the-rubyist-way&quot; rel=&quot;nofollow noreferrer&quot;&gt;Learning Japanese the Rubyist way&lt;/a&gt;. And it would be interesting if I can get someone from Japan to answer this question.&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-06-02T07:15:47.347" LastActivityDate="2023-06-03T17:43:39.950" Title="Non-native English speakers struggle to come up with decent variable names and function names" Tags="|lesson-ideas|secondary-education|" AnswerCount="10" CommentCount="22" ContentLicense="CC BY-SA 4.0" />
  <row Id="7758" PostTypeId="2" ParentId="7757" CreationDate="2023-05-29T15:45:36.653" Score="19" Body="&lt;p&gt;The point of good variable/function/class naming is to express problem semantics to readers, including the programmers. If your readers are primarily French speakers, use good French naming for everything.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, most programming environments don't support Chinese and Japanese (or Navajo or ...) characters directly, or it would be proper to use those. But students should be encouraged to find names in their own language that correctly represent the intent of the program item and then, if the programming system won't directly support it and will only accept, say, Latin style alphabets, then a system like pinyin should be fine.&lt;/p&gt;&#xA;&lt;p&gt;I'm assuming, however, that a reader, reading pinyin will associate the word(s) with the right concept and that the translation doesn't lose too much actual meaning.&lt;/p&gt;&#xA;&lt;p&gt;Maybe the problem is yours if you aren't a native (-ish) Chinese speaker. But I shouldn't have to use French words unless I were writing for a French speaking audience.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Caveat: If a language can be written with unicode characters then large subsets of Chinese and Japanese and some others can be directly used. Java is an example. IIRC, though, keyboard entry is complicated.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2023-05-31T17:26:28.507" LastActivityDate="2023-05-31T17:26:28.507" CommentCount="14" ContentLicense="CC BY-SA 4.0" />
  <row Id="7759" PostTypeId="2" ParentId="7740" CreationDate="2023-05-29T15:52:02.163" Score="5" Body="&lt;p&gt;In regards to &amp;quot;How does this choice impact students' [...] preparedness for industry standards?&amp;quot;, as a software engineer working in industry (now retired), I would not expect a negative impact based on my experience. Side remark: The use of &lt;code&gt;-Wall -Werror&lt;/code&gt; is an industry best practice.&lt;/p&gt;&#xA;&lt;p&gt;Having worked in a number of Silicon Valley companies I observe that industry is often slow in utilizing new language features for production code, for practical reasons. New language features may be used in research or exploratory code by a small subset of the company's engineers.&lt;/p&gt;&#xA;&lt;p&gt;The availability of new language features is tied to newer toolchain versions, and most companies value toolchain stability in their development work. It is not out of the ordinary to find a company having standardized on a five year old toolchain, for example because newer versions have been found to contain functional bugs or introduce performance regressions in the company's money-making products. This conservative approach can also be seen in the choice of default compiler offered on various Linux distros, where enterprise level RHEL 8 might ship with gcc 8.x, while at the same time Ubuntu 22 (possibly preferred by researchers and hobbyists) might ship with gcc 11.x.&lt;/p&gt;&#xA;&lt;p&gt;It is also the case that, for a variety of reasons, different toolchains adopt support for new language standards at different speeds. See the &lt;a href=&quot;https://en.cppreference.com/w/cpp/compiler_support&quot; rel=&quot;nofollow noreferrer&quot;&gt;compiler support matrix&lt;/a&gt; at the CPP Reference website for example. This comes into play when a product needs to be supported across multiple platforms, some of which may not be known yet. In that case it makes sense to restrict oneself to the use of a minimum language standard that is supported &amp;quot;everywhere&amp;quot;. From what I can see, at the moment that would still seem to be C++11.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastEditorUserId="1940" LastEditDate="2023-05-29T16:16:02.023" LastActivityDate="2023-05-29T16:16:02.023" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7760" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T16:07:28.903" Score="6" Body="&lt;p&gt;As a maybe overly simplistic example: Say you want to make mashed potatoes.  To make it easier we'll focus on one part of the process: prepping 5 potatoes.&lt;/p&gt;&#xA;&lt;p&gt;First, you would peel one, cut it up, and place it in a pot to be boiled.  Then, you would go through the same process with the second potato and continue with each potato until you are done.&lt;/p&gt;&#xA;&lt;p&gt;Ex:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;For Each Potato {&#xA;    peel the potato&#xA;    slice the potato&#xA;    place it in a pot&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;OR&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for potato starting at 1 and ending at 5 {&#xA;    peeled_potato = peel(potato);&#xA;    sliced_potato = slice(peeled_potato);&#xA;    place_in_pot = into_pot(sliced_potato);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Depending on your student, this may not fit culturally; however, I would argue a similarly structured recipe could be found in most cultures.  And yes, I'm assuming the student understands the basic idea of a recipe.&lt;/p&gt;&#xA;" OwnerUserId="13433" LastActivityDate="2023-05-29T16:07:28.903" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7761" PostTypeId="2" ParentId="7745" CreationDate="2023-05-29T17:42:15.173" Score="0" Body="&lt;p&gt;Music is not my field, and I may be the least musical person you'd ever come across, but I remember that it was once a &amp;quot;thing&amp;quot; to play records backwards and look for satanic messages. Since you can iterate a doubly linked list from either end, such a list containing sufficiently short passages might serve for this.&lt;/p&gt;&#xA;&lt;p&gt;Oddly enough, I am &lt;em&gt;today&lt;/em&gt; building a circular linked list in Python out of double linked nodes to serve as either a stack or queue.&lt;/p&gt;&#xA;&lt;p&gt;A DJ might find such a thing useful if the direction of iteration could be reversed at any moment.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Welcome to Heaven. Here is your harp.&#xA;Welcome to Hell. Here is your accordion.&lt;/p&gt;&#xA;&lt;p&gt;(source: Far Side comics)&lt;/p&gt;&#xA;&lt;p&gt;As a kid, my instrument was accordion (badly played).&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-05-29T17:42:15.173" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7762" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T17:42:47.820" Score="0" Body="&lt;pre&gt;&lt;code&gt;foreach (&lt;span class=&quot;math-container&quot;&gt;$item in $&lt;/span&gt;HoneyDoList)&#xA;{&#xA;    $item.do()&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="3132" LastActivityDate="2023-05-29T17:42:47.820" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7763" PostTypeId="2" ParentId="7740" CreationDate="2023-05-29T19:32:28.017" Score="7" Body="&lt;p&gt;As a professor who teaches C++17/20(/23: &lt;code&gt;mdspan&lt;/code&gt; for scientific computing): the 11 standard was the big evolution, and 14/17 are only minor improvements over it. If you learn C++11 lambdas, it's unlikely you need the 14/17 improvements in your first, maybe even second, semester of coding.&lt;/p&gt;&#xA;&lt;p&gt;So I'd consider the &lt;code&gt;-std=c++11&lt;/code&gt; flag as a minimum for modern C++, as opposed to your grandparent's C++.&lt;/p&gt;&#xA;&lt;p&gt;That said, I like &lt;code&gt;std::optional&lt;/code&gt; and structured bindings, and I teach those. This fall will be the first time I include &lt;code&gt;std::ranges&lt;/code&gt; which I think is fairly elegant. Wish me luck :-)&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://theartofhpc.com/isp.html&quot; rel=&quot;noreferrer&quot;&gt;https://theartofhpc.com/isp.html&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2023-05-29T19:42:33.473" LastActivityDate="2023-05-29T19:42:33.473" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7764" PostTypeId="2" ParentId="7745" CreationDate="2023-05-29T19:41:22.963" Score="0" Body="&lt;p&gt;Repeat signs, Segno, Coda, are all examples of linking of sections. The &amp;quot;London Manuscript&amp;quot; (&lt;a href=&quot;https://imslp.org/wiki/Manuscript,_GB-Lbl_Add._MS_29987_(Various)&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://imslp.org/wiki/Manuscript,_GB-Lbl_Add._MS_29987_(Various)&lt;/a&gt;) even contains many directions &amp;quot;when you get here jump to there&amp;quot;, giving in fact a DAG rather than a list.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2023-05-29T19:41:22.963" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7765" PostTypeId="2" ParentId="7675" CreationDate="2023-05-29T20:09:15.417" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Is it useful to search code from the Internet?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Yes.&lt;/p&gt;&#xA;&lt;p&gt;You won't be a good writer without reading a lot. You won't be a good programmer without reading lots of other people's code. As you gather experience, you'll get better at figuring which is good code. That's a big problem for novices in any field though.&lt;/p&gt;&#xA;&lt;p&gt;Searching code does not mean finding it and pasting it into your project. It means reading to understand what techniques the programmer used, learning those techniques, and then applying it on your own.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Which one is better way in programming&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Neither is better. You need to be fluent in both.&lt;/p&gt;&#xA;&lt;p&gt;There's dearth of formal (as in &amp;quot;we paid competent people to write it&amp;quot;) technical documentation for large systems built from disparate blocks, and many of the problems people run into are only &amp;quot;documented&amp;quot; because someone else ran into them and figured a solution, often at some pain. So searching solutions on Internet is a critically useful skill to have.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, if all you do is search other people's solutions, you won't innovate much. So there's a balance. You read code to learn, not to copy.&lt;/p&gt;&#xA;" OwnerUserId="9440" LastActivityDate="2023-05-29T20:09:15.417" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7766" PostTypeId="2" ParentId="961" CreationDate="2023-05-29T20:15:16.307" Score="0" Body="&lt;p&gt;Any technique of reasonable complexity requires fluency and experience. People who use TDD/BDD are using it as one of the many tools. Starting a new project with these tools enabled should take a competent professional very little time. Minutes for small projects like utility libraries. So the idea that it takes &amp;quot;more time&amp;quot; is like arguing that riding a bike takes too long vs walking - if you don't know how to ride a bike efficiently and are just learning and are wobbly and falling a lot and don't feel safe. Same with TDD/BDD. For a novice it's just as big of a deal as learning to ride a bike. A year later they won't even remember why it was supposedly a big deal. It's just something you do.&lt;/p&gt;&#xA;&lt;p&gt;Many programming environments make testing almost zero-effort. Say python doctests. Most Python IDEs let you run those tests from a keyboard shortcut, or a menu/toolbar control. Setup is minimal.&lt;/p&gt;&#xA;&lt;p&gt;Tests also highlight how hard it may be to write bug-free software. Even &amp;quot;simple&amp;quot; library code may have serious bugs lurking within. If you don't test well, you'll only find them when things don't work or work flakily.&lt;/p&gt;&#xA;" OwnerUserId="9440" LastActivityDate="2023-05-29T20:15:16.307" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7767" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T21:40:14.840" Score="2" Body="&lt;p&gt;Given it is to students.. rollcall?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for i from 0 to num_students&#xA;   print &amp;quot;${students[i]}!?&amp;quot; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13435" LastActivityDate="2023-05-29T21:40:14.840" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7768" PostTypeId="2" ParentId="7743" CreationDate="2023-05-29T22:38:03.323" Score="0" Body="&lt;p&gt;(Inefficient) Sorting is a/several for-loop(s). Look through all books in the library and find all where the name of the author begins with A. Loop through all &amp;quot;A-books&amp;quot; and find all where the second character of the name is B, rinse and repeat.&lt;/p&gt;&#xA;" OwnerUserId="6187" LastActivityDate="2023-05-29T22:38:03.323" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7769" PostTypeId="2" ParentId="7743" CreationDate="2023-05-30T01:39:44.017" Score="0" Body="&lt;p&gt;A classic example would be a simple traffic control signal, using for loops for delays to control the cycling of the signals at a 4 way intersection. This could be possible with a simple 8 bit processor (such as 8051) and not require any ram, just rom and registers, and input and output pins connected to sensors and switches. A true state machine where the state would be which for loop the controller was currently at.&lt;/p&gt;&#xA;" OwnerUserId="8428" LastActivityDate="2023-05-30T01:39:44.017" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7770" PostTypeId="2" ParentId="7757" CreationDate="2023-05-30T05:09:32.230" Score="7" Body="&lt;p&gt;Not an educator but a CS student, reading your description of the challenges your students face when it comes to naming variables and functions resonated with me. As a non-native English speaker myself, I have experienced similar situations as a student.&lt;/p&gt;&#xA;&lt;p&gt;I am originally from Slovenia and moved to Seattle to pursue a major in Computer Science. English not being my first language, I initially struggled with expressing my thoughts effectively in programming. However, one of my professors shared a valuable insight that I believe might apply to your students as well. They emphasized that as long as the code is &lt;strong&gt;logically sound&lt;/strong&gt; and the &lt;strong&gt;purpose&lt;/strong&gt; of variables and functions is &lt;strong&gt;clear&lt;/strong&gt;, the exact choice of names becomes &lt;strong&gt;less crucial&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Given the limited vocabulary of your students, it may seem challenging to encourage them to use meaningful names. However, it is important to emphasize the logical clarity of their code rather than solely focusing on the names. Encourage them to use naming conventions that make sense within their context, such as pinyin in the case of Chinese students. While it may sound unusual, it serves its purpose of conveying meaning within their linguistic capabilities.&lt;/p&gt;&#xA;&lt;p&gt;Furthermore, you can gradually introduce additional vocabulary to expand their options for naming. Incorporating activities that promote vocabulary development and discussing the importance of meaningful names can help them gradually improve their skills. Might be a shot in the dark but you could potentially introduce them to &lt;a href=&quot;https://en.wikipedia.org/wiki/Metasyntactic_variable&quot; rel=&quot;nofollow noreferrer&quot;&gt;Metasyntactic variable names&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;One possible solution could be documenting code, nothing too fancy but just adding a comment above. Its purpose is to explain what it does. Note that programmers might go for a different style of documenting their code. I would suggest not &amp;quot;dumping&amp;quot; everything on them at once (speaking from experience I hated it at first, but now I see why it's important), but introduce them to a simple one-line comment. Later on, you can tell them to list &lt;code&gt;pre&lt;/code&gt; and &lt;code&gt;post&lt;/code&gt; conditions and even &lt;code&gt;invariants&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void swap(int *num_1, int *num_2)&#xA;{&#xA;    int temp = *num_1;&#xA;    *num_1 = *num_2;&#xA;    *num_2 = temp;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now the code above is pretty much self-explanatory, it takes in two integer pointers and swaps them. It arguably needs no documentation.&lt;/p&gt;&#xA;&lt;p&gt;Now let's look at this example:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void ab(int* a, int* b)&#xA;{&#xA;    int c = *a;&#xA;    *a = *b;&#xA;    *b = c;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is still somewhat self-explanatory but without prior &lt;code&gt;C++&lt;/code&gt; or programming knowledge someone wouldn't know what's going on. To solve this problem we could simply do something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// {Zamenja 2 stevili} (Slovenian)&#xA;// {Translates to: Swaps 2 numbers}&#xA;void ab(int* a, int* b)&#xA;{&#xA;    int c = *a;&#xA;    *a = *b;&#xA;    *b = c;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// {&#xA;// desc: Zamenja 2 stevili (Slovenian)&#xA;// param: a -&amp;gt; pointer na prvo stevilo&#xA;// param: b -&amp;gt; pointer na drugo stevilo&#xA;//&#xA;// English translation:&#xA;//&#xA;// desc: Swaps 2 numbers&#xA;// param: a -&amp;gt; pointer to the first integer&#xA;// param: b -&amp;gt; pointer to the second integer&#xA;// }&#xA;void ab(int* a, int* b)&#xA;{&#xA;    int c = *a;&#xA;    *a = *b;&#xA;    *b = c;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or if you want to be fancy and use &lt;code&gt;doxygen&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;/**&#xA; * @brief Zamenja 2 stevili (Slovenian)&#xA; * @param a pointer to the first integer&#xA; * @param b pointer to the second integer&#xA; */&#xA;void ab(int* a, int* b)&#xA;{&#xA;    int c = *a;&#xA;    *a = *b;&#xA;    *b = c;&#xA;}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now this results in some code that is a little more readable and someone else might have a better idea of what's going on.&lt;/p&gt;&#xA;&lt;p&gt;On that note I would like to add that naming variables like &lt;code&gt;s&lt;/code&gt; or &lt;code&gt;r&lt;/code&gt; and so on is considered bad practice, this is the stuff they do in &lt;code&gt;code-golf&lt;/code&gt; and &lt;code&gt;dynamic programming&lt;/code&gt;, what I presented is only a shorthand solution and not a long term one.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; I'm assuming you all speak the same language and there is no language barrier.&lt;/p&gt;&#xA;&lt;p&gt;Best of luck in your teaching career.&lt;/p&gt;&#xA;" OwnerUserId="13406" LastEditorUserId="13406" LastEditDate="2023-05-31T00:32:41.940" LastActivityDate="2023-05-31T00:32:41.940" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7771" PostTypeId="2" ParentId="7743" CreationDate="2023-05-30T10:17:34.010" Score="2" Body="&lt;p&gt;Read the student list to them.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;For every student on the list  &#xA;  Is the student present? Yes/No&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is a simple classroom example of a for loop.&lt;/p&gt;&#xA;&lt;p&gt;If you were asked to showcase a while() loop, have them imagine having a bag of chips&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;While bag not empty&#xA;  Eat one chip &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13443" LastActivityDate="2023-05-30T10:17:34.010" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7772" PostTypeId="2" ParentId="7743" CreationDate="2023-05-30T14:46:54.153" Score="0" Body="&lt;p&gt;Any time you repeat a task and keep count of the number of iterations to make sure you do it the right amount of times, you're effectively performing a for loop.&lt;/p&gt;&#xA;&lt;p&gt;For example (pun intended) if I need to pick 12 carrots from the garden I will count up in my head every time I pick one until I reach 12. I am affectively performing&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for (int numCarrots=0; numCarrots&amp;lt;12; numCarrots++)&#xA;{&#xA;    pickCarrot();&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is different from a while loop, because I am not counting the number of carrots in my hand each time I add another one.&lt;/p&gt;&#xA;&lt;p&gt;Another example could be counting money. If you want to count \$1000 in \$10 bills, it's often easier to make to count 10 stacks of 10 bills than counting 100 bills without mistakes.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;for (int hundreds=0; hundreds&amp;lt;10; hundreds ++)&#xA;{&#xA;    for (int bills=0; tens&amp;lt;10; tens++)&#xA;    {&#xA;         addBill();&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="5071" LastActivityDate="2023-05-30T14:46:54.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7773" PostTypeId="2" ParentId="7743" CreationDate="2023-05-30T19:05:19.160" Score="1" Body="&lt;p&gt;A straightforward example would be calculating a factorial:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int factorial = 1;&#xA;for (int i=1; i&amp;lt;=n; i++)&#xA;{&#xA;    factorial = factorial * i;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13454" LastActivityDate="2023-05-30T19:05:19.160" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7774" PostTypeId="2" ParentId="7743" CreationDate="2023-05-30T21:38:18.247" Score="0" Body="&lt;p&gt;If you work at a zen university you can give your student a live implementation of the following code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;while(answer(&amp;quot;Is this a loop?&amp;quot;)!=&amp;quot;yes&amp;quot;) cane.strike(student);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;At any other place, just asking this question repeatedly several times should work. If the student does not get it, I would explain the joke after several failed attempts.&lt;/p&gt;&#xA;" OwnerUserId="13457" LastActivityDate="2023-05-30T21:38:18.247" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7775" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T01:27:27.130" Score="3" Body="&lt;p&gt;Names should be descriptive for the audience of the source code. If everyone who looks at that code understands Chinese, there is nothing wrong with using Chinese names, and if you use a programming language that struggles with Chinese characters (do such languages still exist?), you can always transliterate to latin characters.&lt;/p&gt;&#xA;&lt;p&gt;Alternatively, they can use English. In the age of machine translation, translating a term doesn't take much time. Even before machine translation, online dictionaries were a thing. Open the website, type your word, press Enter, and behold a set of translations to choose from :-)&lt;/p&gt;&#xA;&lt;p&gt;It can also make sense to mix these approaches. In many programs I have written, I used English for IT concepts, and German for business concepts (the requirements document was in German, but the software libraries we used were in English). It may look weird to mix languages, but it worked very well. After all, the purpose of naming is to clearly convey information, not dazzle the audience with your mastery of the literary arts.&lt;/p&gt;&#xA;&lt;p&gt;(What one shouldn't do in professional code is mix languages arbitrarily, switching seemingly at random. The same thing should have the same name throughout the entire source code)&lt;/p&gt;&#xA;" OwnerUserId="1775" LastEditorUserId="1775" LastEditDate="2023-05-31T01:34:02.083" LastActivityDate="2023-05-31T01:34:02.083" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7776" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T02:11:41.473" Score="3" Body="&lt;p&gt;Native English-speaking computer science students also have trouble coming up with good names!&lt;/p&gt;&#xA;&lt;p&gt;In my opinion using &lt;em&gt;pinyin&lt;/em&gt; is fine. In some ways it will be helpful for new students as they will get a clue of what their code is and what language keywords and 'Base Class Library' functions, etc. are.&lt;/p&gt;&#xA;&lt;p&gt;You could look and see if there is another programming language, you could use, which supports Unicode characters in variable names.&lt;/p&gt;&#xA;&lt;p&gt;I know this is possible in C#. See &lt;em&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names&quot; rel=&quot;nofollow noreferrer&quot;&gt;C# identifier naming rules and conventions&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sometimes you may need to start a variable with a Latin printable character for the first 'letter'. Something like an underscore.&lt;/p&gt;&#xA;" OwnerUserId="13461" LastEditorUserId="1314" LastEditDate="2023-06-01T23:58:24.133" LastActivityDate="2023-06-01T23:58:24.133" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7777" PostTypeId="2" ParentId="7743" CreationDate="2023-05-31T05:20:21.103" Score="0" Body="&lt;p&gt;Imagine noting down all the purchases you made in a month in some journal. Adding the cost of each purchase to a running total via calculator can be thought of via for-loop: iterate over each element and add to some defined variable.&lt;/p&gt;&#xA;" OwnerUserId="13462" LastActivityDate="2023-05-31T05:20:21.103" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7778" PostTypeId="2" ParentId="7743" CreationDate="2023-05-31T07:18:03.870" Score="0" Body="&lt;p&gt;Ah well, why not. :)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;int age;&#xA;for(age = 0; age &amp;lt; 90; age++)&#xA;{&#xA;    switch (arr[i])&#xA;    {&#xA;    case 0 ... 6:&#xA;        Cry();&#xA;        ShitPants();&#xA;        break;&#xA;    case 7 ... 18:&#xA;        School();&#xA;        break;&#xA;    case 19 ... 70:&#xA;        Work();&#xA;        break;&#xA;    case 71 ... 80:&#xA;        Reminiscing(&amp;quot;Back in my day...&amp;quot;);&#xA;        break;  &#xA;    case 81 ... 90:&#xA;        Cry();&#xA;        ShitPants();&#xA;        break;  &#xA;    default:&#xA;        Matrix.Broken(&amp;quot;You managed to brake the system.&amp;quot;);&#xA;        break;&#xA;    }&#xA;}&#xA;Die();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or just calculate your average grade. (Not sure about the american folks, but over here we grade 1 to 10)&lt;/p&gt;&#xA;" OwnerUserId="13465" LastEditorUserId="13465" LastEditDate="2023-05-31T09:16:23.160" LastActivityDate="2023-05-31T09:16:23.160" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7779" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T08:10:55.890" Score="6" Body="&lt;p&gt;Why not use Chinese directly?&lt;/p&gt;&#xA;&lt;p&gt;Here's a Python 3 script with normal ASCII, Devanagari (Hindi) and Chinese. This is both in identifiers (variables, function names) and also in strings.&lt;/p&gt;&#xA;&lt;h2&gt;Table&lt;/h2&gt;&#xA;&lt;p&gt;Ive used google translate used to make this table since I know exactly zero Chinese!&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;English (ASCII)&lt;/th&gt;&#xA;&lt;th&gt;Hindi&lt;/th&gt;&#xA;&lt;th&gt;Chinese&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;fool&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;बेवकूफ&lt;/td&gt;&#xA;&lt;td&gt;傻子&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;नाम&lt;/td&gt;&#xA;&lt;td&gt;姓名&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;unknown&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;अजाना&lt;/td&gt;&#xA;&lt;td&gt;未知&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;Hello&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;नमस्ते&lt;/td&gt;&#xA;&lt;td&gt;你好&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;x&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;एक्स (transliteration)&lt;/td&gt;&#xA;&lt;td&gt;x (as is)&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&lt;h2&gt;Multilingual code&lt;/h2&gt;&#xA;&lt;p&gt;Note the code below is rather poor on many counts! It's just a couple of lines to demo Python doing multilingual strings and identifiers.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;# ASCII&#xA;def fool(unknown): #  fool is to make foo translatable!&#xA;                   #  normally I'd use x for unknown&#xA;    name = input()&#xA;    for x in range(4):&#xA;        print(&amp;quot;Hello %s %d %s&amp;quot; % (name, x, unknown))&#xA;        &#xA;# Devanagari&#xA;def बेवकूफ(अजाना):&#xA;    नाम = input()&#xA;    for एक्स in range(4): # literal transliteration of x&#xA;        print(&amp;quot;नमस्ते %s %d %s&amp;quot; % (नाम, एक्स, अजाना))&#xA;&#xA;&#xA;# Chinese&#xA;def 傻子(未知):&#xA;    姓名 = input()&#xA;    for x in range(4): # Ive no idea about transliteration!!&#xA;        print(&amp;quot;你好 %s %d %s&amp;quot; % (姓名, x, 未知))&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Here's a session showing ASCII and Chinese usage&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; fool(42)&#xA;rusi&#xA;Hello rusi 0 42&#xA;Hello rusi 1 42&#xA;Hello rusi 2 42&#xA;Hello rusi 3 42&#xA;&#xA;&amp;gt;&amp;gt;&amp;gt; 傻子(42)&#xA;习近平&#xA;你好 习近平 0 42&#xA;你好 习近平 1 42&#xA;你好 习近平 2 42&#xA;你好 习近平 3 42&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Note 1&lt;/h3&gt;&#xA;&lt;p&gt;There are reasons for having strong reservations for how unicode has been adopted (but not adapted!) into Python -- and for that matter most modern languages.&lt;/p&gt;&#xA;&lt;p&gt;Here's a Python (3 only) program.&lt;br /&gt;&#xA;Note: Its Python 3 only not 2 which will immediately give syntax error on the 2nd line!&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;#! /usr/bin/env python3&#xA;A = 1&#xA;Α = 2&#xA;А = 3&#xA;# The 1 and 2 should be overwritten by the 3 right??&#xA;print(&amp;quot;And now the miracle [A, A, A] is %s&amp;quot; % [A, Α, А])&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And a run:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-py prettyprint-override&quot;&gt;&lt;code&gt;~:$ python3 unipython.py &#xA;And now the miracle [A, A, A] is [1, 2, 3]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So Python has A being 1,2, and 3 &lt;strong&gt;at the same time&lt;/strong&gt;?!?!&lt;/p&gt;&#xA;&lt;p&gt;Strange aint it?&lt;/p&gt;&#xA;&lt;blockquote class=&quot;spoiler&quot;&gt;&#xA;&lt;p&gt; Well they are not 3 A's but one Greek alpha, one Russian (Cyrillic) A and one good ol ASCII A!&#xA;&#xA;Who'd have guessed?!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3&gt;Note 2&lt;/h3&gt;&#xA;&lt;p&gt;As pointed out in other answers and comments unicode identifiers is the norm not the exception nowadays.&lt;/p&gt;&#xA;&lt;p&gt;Here's C (gcc). Seems to work well enough&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;int foo(int x)&#xA;{ return x + 1;}&#xA;&#xA;int फू(int अ)&#xA;{ return अ + 1;}&#xA;&#xA;int main()&#xA;{&#xA;  printf(&amp;quot;Hello %d\n&amp;quot;, फू(42));&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2&gt;Note 3&lt;/h2&gt;&#xA;&lt;p&gt;As said above the norm nowadays is that languages support unicode source code.  However the nuances across languages is a veritable worm-can.&lt;/p&gt;&#xA;&lt;p&gt;Eg in Python &lt;code&gt;ﬂag&lt;/code&gt; and &lt;code&gt;flag&lt;/code&gt; are the same.&lt;br /&gt;&#xA;In Haskell they are different&lt;/p&gt;&#xA;&lt;h2&gt;More Philosophical objections&lt;/h2&gt;&#xA;&lt;p&gt;Ive shown above that Python (and many other languages) will allow &lt;strong&gt;user-defined variables/functions/classes&lt;/strong&gt; to be from a vastly wider character set than ASCII.&lt;/p&gt;&#xA;&lt;p&gt;What about builtin functions/types/classes?&lt;/p&gt;&#xA;&lt;p&gt;Well you could introduce a 'translation-library' that maps Chinese versions of the 50 most used library entities into Chinese.&lt;/p&gt;&#xA;&lt;p&gt;Laborious but doable&lt;/p&gt;&#xA;&lt;p&gt;But then what about keywords — if,while,def,class...??&#xA;More laborious — recompile Python with all these keywords localized.&lt;/p&gt;&#xA;&lt;p&gt;Does it stop here?  What will you do when your kids need to progress beyond your classes to reading the docs?&lt;/p&gt;&#xA;&lt;p&gt;All of this is possible but as you go further afield from my toy examples above it quickly gets tedious and intractable.&lt;/p&gt;&#xA;&lt;p&gt;OTOH none of these are rhetorical questions. With 1.4 billion population, China could dedicate a couple of thousand to heavy-lifting the localization effort.&lt;/p&gt;&#xA;&lt;p&gt;So at a single individual level you need to think through where you draw your lines...&lt;/p&gt;&#xA;&lt;h2&gt;Personal Note&lt;/h2&gt;&#xA;&lt;p&gt;At a more personal level I strongly believe that &lt;strong&gt;beginning&lt;/strong&gt; students should not be made to break their heads over large ugly real world languages like Python/C++/Java but learn to experience the richness of programming in a controlled baby nursery — which in your case would mean not burdening your kids with programming &lt;em&gt;and&lt;/em&gt; a foreign language &lt;em&gt;simultaneously&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;Full Languages List&lt;/h2&gt;&#xA;&lt;p&gt;Apart from Python, C, Haskell that Ive talked of above what of the dozens of other languages?  Rosetta code has a &lt;a href=&quot;https://rosettacode.org/wiki/Unicode_variable_names&quot; rel=&quot;nofollow noreferrer&quot;&gt;conspective list&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2&gt;References&lt;/h2&gt;&#xA;&lt;p&gt;Here are some Python 3 references that may be useful&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3.11/reference/lexical_analysis.html#identifiers&quot; rel=&quot;nofollow noreferrer&quot;&gt;Python identifiers lexical structure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://peps.python.org/pep-3131/&quot; rel=&quot;nofollow noreferrer&quot;&gt;The Python Design Document&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/howto/unicode.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;General Python Unicode Howto&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://mail.python.org/pipermail/python-3000/2007-May/007524.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;The mailing list discussion&lt;/a&gt; (started by a French-Japanese-English trilingual)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://unicodebook.readthedocs.io/unicode.html#categories&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unicode letter categories&lt;/a&gt; — not Python specific&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.hieuthi.com/blog/2021/07/22/unicode-categories-cjk-ideographs.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Unicode categories and CJK ideograph complications&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&quot;http://blog.languager.org/search/label/Unicode&quot; rel=&quot;nofollow noreferrer&quot;&gt;My own thoughts on programming using unicode&lt;/a&gt; — can be whimsical!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2023-05-31T19:22:41.950" LastActivityDate="2023-05-31T19:22:41.950" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="7780" PostTypeId="2" ParentId="7720" CreationDate="2023-05-31T08:39:50.990" Score="0" Body="&lt;p&gt;Consider the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a C# unit test project, push this to github.&lt;/li&gt;&#xA;&lt;li&gt;Create some interfaces that your students have to implement.&lt;/li&gt;&#xA;&lt;li&gt;Create test scripts that test the implementations of these interfaces. (&lt;a href=&quot;https://cseducators.stackexchange.com/a/7721/13465.&quot;&gt;https://cseducators.stackexchange.com/a/7721/13465.&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Create a branch for each student, give them only access to their own branch.&lt;/li&gt;&#xA;&lt;li&gt;Use GitHub actions to automatically run the unity tests when a student pushes their code.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I'm not quite sure about the possibilities in GitHub when it comes to rights and visibility settings. You wouldn't want students to see their classmates code of course.&lt;/p&gt;&#xA;&lt;p&gt;One way around this would be to let the students fork your repo and make pull requests. I think its possible to let Github check the pull requests using your test cases.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;An alternative, that I think is better anyway.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create repo A containing the interfaces.&lt;/li&gt;&#xA;&lt;li&gt;Create repo B containing the test project. Using repo A as a submodule. Repo B should be private, so the students can't see your test code.&lt;/li&gt;&#xA;&lt;li&gt;Create repo C containing one example of an implemented interface.&lt;/li&gt;&#xA;&lt;li&gt;Let the students fork repo C and let them create pull requests when they are finished. (Git will track when students did their work, so no more excuses for missing deadlines.)&lt;/li&gt;&#xA;&lt;li&gt;Configure repo C so pull requests are verified by the code in repo A. (Not sure if this is possible, I assume it is.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="13465" LastEditorUserId="13465" LastEditDate="2023-05-31T08:50:09.153" LastActivityDate="2023-05-31T08:50:09.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7781" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T10:47:00.317" Score="1" Body="&lt;p&gt;As others say, good naming is hard even for native English speakers.&lt;/p&gt;&#xA;&lt;p&gt;I don't think there is a straightforward curriculum to follow that makes one good at naming, or a simple criteria against which to measure success.&lt;/p&gt;&#xA;&lt;p&gt;At the stage of learning programming, when there is still plenty to learn, it might not be important for chosen names to always be great names.&lt;/p&gt;&#xA;&lt;p&gt;However, I would suggest having regular discussion about the importance of naming, and have examples of good naming schemes for pupils to consider and absorb.&lt;/p&gt;&#xA;&lt;p&gt;A pre-requisite for naming in English is to be deeply familiar with English. Exposure to a large amount of vocabulary, and examples of existing software naming schemes are also useful.&lt;/p&gt;&#xA;&lt;p&gt;To become skilled at naming, a person generally has to be interested in language, to some degree for its own sake.&lt;/p&gt;&#xA;&lt;p&gt;Some others here have also said names don't matter too much in programming. That can be true in limited cases, but as a general statement nothing could be more preposterously false.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-05-31T10:47:00.317" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7782" PostTypeId="2" ParentId="7737" CreationDate="2023-05-31T12:04:40.407" Score="2" Body="&lt;p&gt;I'm unclear if &amp;quot;real world&amp;quot; means a programming or non-programming context, but an infamous real-world example of this was following the introduction of the Julian calendar, by Julius Caesar in 46 BC.&lt;/p&gt;&#xA;&lt;p&gt;There was widespread misunderstanding about the then-new 4-year cycle of the leap day, and it was instead observed every 3 years in the pattern of 1-2-3-leap-2-3-leap-2-3-leap.&lt;/p&gt;&#xA;&lt;p&gt;This practice today is called &amp;quot;inclusive counting&amp;quot;, where the last year of one cycle is also considered to be first year of the next cycle, and was a more common practice at the time.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-05-31T12:04:40.407" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7783" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T15:09:19.007" Score="5" Body="&lt;p&gt;I'll be provocative: English is the &lt;em&gt;lingua franca&lt;/em&gt; of computer science. Ideally, every CS professional should be able to understand basic English technical texts. At a minimum, a software engineer should be able to write and read programs with English variable names and basic comments.&lt;/p&gt;&#xA;&lt;p&gt;I understand that the vocabulary of your students is limited; it is the job of the institution at which they learn to improve it to the minimum described above. If possible, the programming course should be accompanied by a 1-or 2-hours/week language course providing the specific vocabulary needed for the programming tasks. If that's not possible, fill the gap yourself. Simple English is incredibly simple, certainly from a Chinese perspective. Your students can already read the Latin alphabet. What's needed on top are a few dozen words, plus a few words of the respective problem domain for each programming task. Modern IDEs even have spell checkers.&lt;/p&gt;&#xA;&lt;p&gt;I also understand that I may be narrow-minded and have it backwards: I may live to see Chinese programmers making the same claim with respect to Chinese. But we ain't there yet, so do your students a favor and require English names for variables and functions.&lt;/p&gt;&#xA;" OwnerUserId="1675" LastActivityDate="2023-05-31T15:09:19.007" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7784" PostTypeId="2" ParentId="7757" CreationDate="2023-05-31T16:55:08.977" Score="2" Body="&lt;p&gt;You didn't mention what programming language(s) you're working with, but the way &lt;a href=&quot;https://en.wikipedia.org/wiki/PowerShell&quot; rel=&quot;nofollow noreferrer&quot;&gt;PowerShell&lt;/a&gt; names things might be helpful here.&lt;/p&gt;&#xA;&lt;p&gt;Functions have names like &lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Get-Process&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Get-Process&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/clear-itemproperty&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Clear-ItemProperty&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Get-Process&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;Write-Host&lt;/code&gt;&lt;/a&gt;, etc.  They're all of the form &amp;quot;verb dash noun&amp;quot;.  There's a predefined &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands&quot; rel=&quot;nofollow noreferrer&quot;&gt;list of verbs&lt;/a&gt; that they encourage you to use whenever possible.  When naming function parameters, they have predefined &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/standard-cmdlet-parameter-names-and-types&quot; rel=&quot;nofollow noreferrer&quot;&gt;lists of common parameter names&lt;/a&gt; along with their standard meaning.&lt;/p&gt;&#xA;&lt;p&gt;PowerShell does this for the sake of consistency, but an approach like this could help a non-native speaker as well.  Those lists of words can be augmented with a description in their native language.  Naming something consists of selecting the relevant noun and verb from the list (substituting a native language word when needed).  Over time, the students will learn the vocabulary and not need the lists any more. Since they're using the same standard words as the built-in system functions, they're also learning how to interpret those functions without needing to look up and translate their documentation.&lt;/p&gt;&#xA;&lt;p&gt;I'm not necessarily saying that you should teach them using PowerShell (that sounds quite awful, actually).  You can follow a similar idea and create a naming convention for whatever language you're using.  You'll have to build your own noun/verb lists, but you'll have the opportunity to fine-tune them based on your specific curriculum and assignments.&lt;/p&gt;&#xA;&lt;p&gt;Standard library functions frequently have cryptic names, but you can create a helper header/library that provides wrappers around the relevant functions using the common naming convention. My CS teacher actually did that for us even though there wasn't a language issue. It helped focus on &lt;em&gt;concepts&lt;/em&gt; instead of a specific language's library syntax, simplified many interfaces, and gave the instructor a place to inject helper code that made grading easier or that simulated errors.&lt;/p&gt;&#xA;&lt;p&gt;You can strip back the layers in a more advanced course, after they're comfortable with the fundamentals.&lt;/p&gt;&#xA;" OwnerUserId="13469" LastEditorUserId="13469" LastEditDate="2023-06-02T01:11:25.500" LastActivityDate="2023-06-02T01:11:25.500" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7785" PostTypeId="2" ParentId="7745" CreationDate="2023-05-31T19:59:21.780" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;occasionally students who are interested in music ask instructors for how a double ended queue could be useful in the music industry.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a rather unusual situation and I'm surprised it arises for you often enough to ask about it here. You might want to elaborate more on &lt;em&gt;why&lt;/em&gt; this particular question comes up so often (I'd expect it to come up, say, once in a teaching career). Do your culinary students ask where double-ended queues (&amp;quot;deques&amp;quot;) show up in that field?&lt;/p&gt;&#xA;&lt;p&gt;If there's no obvious application you can think of for deques in music, it's OK to say &amp;quot;there are no obvious applications I can think of for deques in music&amp;quot; rather than scraping around a mostly empty barrel and stretching the truth to come up with something.&lt;/p&gt;&#xA;&lt;p&gt;Linked lists in general are low-level data structures primarily used in systems-level applications. Double-ended queues are even more specialized. They're basically unnecessary for most day to day, business application-level development. Most of the time, a simple array is sufficient, and most languages don't have deques built-in to the standard library (Java, Python and I think C++ and C# are exceptions that come to mind).&lt;/p&gt;&#xA;&lt;p&gt;With that in mind, the operating system running your musical applications is very probably using them, as well as potentially the software running whatever audio system you're using, but that's low-level and perhaps unsatisfying, since the data structure is probably not doing anything obviously &lt;em&gt;musical&lt;/em&gt; here.&lt;/p&gt;&#xA;&lt;p&gt;Scoping appears to be necessary. &amp;quot;Music programming&amp;quot; is a large expanse ranging from extremely low-level DSP engineering all w to extremely high-level music creation applications like Audacity, Lilypond, Ableton, Cubase, Reaktor, etc. Middle-level applications like Max/MSP, Tidalcycles and Supercollider exist as well. Zooming out to &amp;quot;the music industry&amp;quot; is even broader, and linked lists and deques surely appear in operating systems of people working in the music industry (again, unsatisfying and vague, probably not what the asker wanted to hear).&lt;/p&gt;&#xA;&lt;p&gt;If your students are asking about music-making techniques that could use linked lists or deques, you could probably treat a linear song structure as a sequence of linked nodes, but this isn't too helpful or interesting (and would probably involve duplicate nodes). Deques can be used for rotating purposes, which might imply a looping structure of some sort, but since this is so unusual and we're breaking a sweat to come up with something, we'd better just admit it. An array would be just as useful for storing, looping and forward/reversing a musical piece, with the bonus of constant-time random access. A deque is appropriate when you want to dequeue or prepend nodes to the front of a structure in constant time.&lt;/p&gt;&#xA;&lt;p&gt;I'd suffice to say that deques are a fundamental data structure in the low-level systems world, and then ask the student which level of abstraction and what domain they're interested in (it could be they don't even care about music production, and just want to know whether a deque could be used in a playlist app, or something like that).&lt;/p&gt;&#xA;&lt;p&gt;When a strange, overly-broad question arises, it's important to follow up and ask for clarification to understand what prompted the question and determine the motivation of the asker. Once the scope is appropriately refined and the intent is obvious, a satisfying answer will be much easier to provide.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2023-05-31T20:27:20.840" LastActivityDate="2023-05-31T20:27:20.840" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7786" PostTypeId="2" ParentId="7737" CreationDate="2023-05-31T21:45:22.387" Score="2" Body="&lt;p&gt;Basically anything involving intervals, discrete and continuous.&lt;/p&gt;&#xA;&lt;p&gt;What is the distance between 1 and 10? &lt;code&gt;10 - 1 = 9&lt;/code&gt;, but:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If these are kilometer posts, it's 9 kilometers along the road.&lt;/li&gt;&#xA;&lt;li&gt;If these are buildings, there are 8 buildings between buildings 1 and 10.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="4010" LastActivityDate="2023-05-31T21:45:22.387" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7787" PostTypeId="2" ParentId="7757" CreationDate="2023-06-01T15:46:37.493" Score="3" Body="&lt;p&gt;In my experience, it is in general hugely unreasonable to expect non-native middle schoolers to have any decent vocabulary of English. Granted, the English used in programming is not English in its entirety but it is still a lot to learn. Pinyin works fine for now, let them be.&lt;/p&gt;&#xA;&lt;p&gt;To put things in perspective, non-native middle schoolers may be tested on 1000~2000 English words. Obviously not everyone will know all of them, and even less of them well. Even if English used in programming is very limited, there might still be a few hundred words that is commonly used. Asking the students to know them well is too much.&lt;/p&gt;&#xA;&lt;p&gt;But make no mistake, English is the &lt;em&gt;de facto&lt;/em&gt; standard language, and it should be made clear to them they should learn some English if they want to pursue programming further. The reasons why are innumerable&lt;/p&gt;&#xA;&lt;h3&gt;Official documentation, books and tutorials&lt;/h3&gt;&#xA;&lt;p&gt;Not knowing the vocabulary will limit the resources available to you. It is simply a fact that English resources are currently the best.&lt;/p&gt;&#xA;&lt;h3&gt;Googling and Stack Exchange&lt;/h3&gt;&#xA;&lt;p&gt;The fact that you're asking &lt;em&gt;here&lt;/em&gt;, instead of say zhihu, is proof that knowing English is a great advantage. If you google in English, you get Stack Overflow. You'd be surprised how many people googled the wrong keywords, found nothing and gave up.&lt;/p&gt;&#xA;&lt;h3&gt;Standard libraries and builtins&lt;/h3&gt;&#xA;&lt;p&gt;These are not changeable and all of them relies on English. For example, in C++ it is &lt;em&gt;required&lt;/em&gt; that your member functions are &lt;code&gt;begin&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt; to enable range based for loops.&lt;/p&gt;&#xA;&lt;h3&gt;Tooling&lt;/h3&gt;&#xA;&lt;p&gt;There are tooling that relies on how English works. For example, pytest uses &lt;code&gt;test_*&lt;/code&gt; and &lt;code&gt;Test*&lt;/code&gt; as a signature that the objects are items for testing purposes.&lt;/p&gt;&#xA;&lt;p&gt;The list goes on. As you might imagine, software &lt;em&gt;really&lt;/em&gt; &lt;strong&gt;really&lt;/strong&gt; cares about consistency.&lt;/p&gt;&#xA;&lt;p&gt;Using Unicode characters is even worse for tooling:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Regex support for non-ascii characters is usually poor to non-existent.&lt;/li&gt;&#xA;&lt;li&gt;Go (the language) uses uppercase letters to indicate exported names.&lt;/li&gt;&#xA;&lt;li&gt;The way whitespace plays with different languages is hugely variable.&lt;/li&gt;&#xA;&lt;li&gt;Languages going from right to left is likely impossible to work with for many tools.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="9169" LastEditorUserId="9169" LastEditDate="2023-06-01T19:21:25.193" LastActivityDate="2023-06-01T19:21:25.193" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7788" PostTypeId="2" ParentId="7757" CreationDate="2023-06-01T18:32:16.863" Score="1" Body="&lt;h1&gt;Some simple rules.&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Design the code to be readable&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use the language of the domain: use the business language and natural language of the project. Most languages support unicode. e.g. &lt;code&gt;火出口&lt;/code&gt; (it says fire exit in very bad Chinese: literally file exile mouth).&lt;/li&gt;&#xA;&lt;li&gt;When naming things consider how they are used, over what they do: Consider what how they will look when used: e.g. &lt;code&gt;if cat.height &amp;gt; 3*meters then direction.set(away from cat), run(fast)&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To help with this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Actions should have verb-phrases for names. e.g. &lt;code&gt;run&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;, &lt;code&gt;open&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Booleans, and functions returning a boolean should have an adjective-phrase. e.g. &lt;code&gt;is running&lt;/code&gt;, &lt;code&gt;is open&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Non boolean objects, and functions returning such, should have noun-phrase names. e.g. &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;door&lt;/code&gt;, &lt;code&gt;big cat&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Sometimes you will need enumerations to pass in to a procedure, these will often be adverbs. e.g. &lt;code&gt;quickly&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Most of this is general advice. However back to the non-English and English speaker. So if they can type their native language, then do that. I cannot think of a language that does not support Unicode names. E.g. these do support it: &lt;code&gt;C&lt;/code&gt;, &lt;code&gt;python&lt;/code&gt;, &lt;code&gt;rust&lt;/code&gt;, &lt;a href=&quot;https://scratch.mit.edu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;scratch&lt;/code&gt;&lt;/a&gt;, …&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="694" LastEditDate="2023-06-03T17:43:39.950" LastActivityDate="2023-06-03T17:43:39.950" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7789" PostTypeId="2" ParentId="7741" CreationDate="2023-06-04T09:33:07.787" Score="2" Body="&lt;p&gt;There's quite some ambiguity about what &amp;quot;managing big data&amp;quot; means, especially once you must avoid both mathematics and programming.&lt;/p&gt;&#xA;&lt;p&gt;It's rather like setting up a program for financial management, that mustn't mention accountancy!&lt;/p&gt;&#xA;&lt;p&gt;I also think you'd be patronising your audience when attempting to teach them &amp;quot;rational thinking, critical thinking, and decision-making&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;If you attempted to launch a very high-level philosophical programme, my fear would be that the substance of the curriculum, the materials available in the form of textbooks and published works, the length of time available on the course, and your academic credentials or industry reputation, would not be sufficient to support it.&lt;/p&gt;&#xA;&lt;p&gt;If such philosophical programmes useful to management were widely available and at a high quality, practitioners who do understand programming would already be snapping your hand off for it, before you even get to humanities graduates who don't want to understand the basic details of data processing, and yet somehow end up in charge of it.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-06-04T09:33:07.787" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7790" PostTypeId="2" ParentId="7724" CreationDate="2023-06-04T10:55:58.390" Score="1" Body="&lt;p&gt;I use a term for that style, which is &amp;quot;driving seat&amp;quot; programming.&lt;/p&gt;&#xA;&lt;p&gt;The analogy is that you have to be at the screen and keyboard constantly for the computer to make any progress, like being in the driving seat of a car.&lt;/p&gt;&#xA;&lt;p&gt;It's actually not uncommon amongst casual programmers. They approach computers - not unreasonably - as machines that assist them to do tasks they'd otherwise have to do by hand.&lt;/p&gt;&#xA;&lt;p&gt;So the idea that they remain in the driving seat is not disturbing to them. If you were walking and now you're driving, you've not lost, you've won. If you're using a calculator instead of working out on paper, you've won.&lt;/p&gt;&#xA;&lt;p&gt;What professional programmers understand is that computers are not there merely to assist us with our own tasks, but assist others with theirs, and ideally to operate as autonomously as possible from human attention.&lt;/p&gt;&#xA;&lt;p&gt;Our work is to configure a business in such a way that computers operate with maximum autonomy in performing necessary tasks, and that inputs of human labour into those tasks are minimised and made as straightforward as possible.&lt;/p&gt;&#xA;&lt;p&gt;Where labour is still required (whether our own or anyone's), a remaining goal is to release that labour as much as possible from rigid schedules of attendance or need for immediate reaction to the condition of the computer, both so that labour (including our own) is available to be deployed elsewhere on useful terms, and so that the computer moves along reliably enough to make its use worthwhile.&lt;/p&gt;&#xA;&lt;p&gt;It's much more difficult to program for other people, or for autonomous operation, than for yourself as an operator.&lt;/p&gt;&#xA;&lt;p&gt;I'd guess that it's still useful for people to be able to program for their own use - just as not every student of English needs to aspire to be a novelist, and even the most rudimentary skills are better than illiteracy. So I don't think it would pay to set the standard too high.&lt;/p&gt;&#xA;&lt;p&gt;If you wanted to have a discussion with your students, you'd be making the point that professional programming is about designing programs which require interaction as minimally and infrequently as possible.&lt;/p&gt;&#xA;&lt;p&gt;Minimally, in that work for the operator should be reduced to as few steps as possible, and each step should be triggered by the least effort possible.&lt;/p&gt;&#xA;&lt;p&gt;Infrequently, in that engagement or availability to engage is required as rarely and on as least strict schedule as possible.&lt;/p&gt;&#xA;&lt;p&gt;Students should also be capable of conceiving and considering contingencies and variable circumstances before they arise in practice - including breakdowns, or the need to intervene and control - and apply the same analysis so that effort always remains as minimal and infrequent as possible.&lt;/p&gt;&#xA;&lt;p&gt;The complexities of this analysis are what make it a difficult job in practice, that few people seem able to cope with effectively.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-06-04T10:55:58.390" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7791" PostTypeId="1" CreationDate="2023-06-05T06:10:17.383" Score="1" ViewCount="27" Body="&lt;p&gt;I am a master's student. During my bachelor's, our curriculum primarily focussed on CPU architecture. There are excellent textbooks and video lectures which deal with the CPU architecture in depth.&lt;/p&gt;&#xA;&lt;p&gt;I was looking for a similar course for the GPU architecture in general. Considering NVIDIA GPUs, for example. (Given that NVIDIA is a beast in the GPU market, and comes up with many new optimizations now and then).&lt;/p&gt;&#xA;&lt;p&gt;For example, a course that explains the basic architecture of the modern GPUs. The basics of CUDA runtime API. Then CUDA driver API. And then slowly moves on to advanced GPU topics like Unified Virtual Memory, CUDA streams, etc.&lt;/p&gt;&#xA;&lt;p&gt;The official NVIDIA site has listings or blogs about the updates and features introduced. But honestly speaking, I find it difficult to understand them, because I do not have that good background.&lt;/p&gt;&#xA;&lt;p&gt;Please can anyone guide me with a course (a video lecture series specifically, so that I can watch it at my own pace, I find starting with video lectures easier) so that after watching that, I am at ease reading the NVIDIA GPU blogs. Kickstart kind of course. But which goes into depth and also covers advanced topics.&lt;/p&gt;&#xA;&lt;p&gt;I want to do research in the GPU subsystem. So, I need in-depth knowledge regarding the same.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2023-06-05T06:10:17.383" Title="Video lecture series which covers CUDA and GPU related concepts from basics to advanced level" Tags="|self-learning|resource-request|architecture|gpu|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7792" PostTypeId="5" CreationDate="2023-06-05T06:12:06.917" Score="0" Body="" OwnerUserId="-1" LastEditorUserId="-1" LastEditDate="2023-06-05T06:12:06.917" LastActivityDate="2023-06-05T06:12:06.917" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7793" PostTypeId="4" CreationDate="2023-06-05T06:12:06.917" Score="0" Body="Questions concerning the Graphic Processing Units (GPUs), or General Purpose Graphic Processing Unit (GPGPUs)" OwnerUserId="9124" LastEditorUserId="9124" LastEditDate="2023-07-12T20:11:45.323" LastActivityDate="2023-07-12T20:11:45.323" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7794" PostTypeId="2" ParentId="4416" CreationDate="2023-06-05T18:00:24.750" Score="3" Body="&lt;p&gt;You asked,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Does there exist a pencil &amp;amp; paper activity involving blockchain ciphers which is suitable for preschoolers?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The answer is &lt;strong&gt;no&lt;/strong&gt;. However, you might be able to teach such things to children who like math or science in middle school (American grades 6, 7, &amp;amp; 8). If you re-ask your question, but use the phrase &amp;quot;children 12 years of age and older&amp;quot; you might get better quality answers.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-06-05T18:00:24.750" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7795" PostTypeId="1" CreationDate="2023-06-06T01:29:24.897" Score="1" ViewCount="171" Body="&lt;p&gt;When teaching python to new students in middle school (or any age group), the students sometimes find the &lt;a href=&quot;https://docs.python.org/3/library/stdtypes.html?highlight=str%20strip#str.startswith&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;python documentation&lt;/strong&gt;&lt;/a&gt; to be a bit overwhelming.&lt;/p&gt;&#xA;&lt;p&gt;What is a short, easy-to-understand description of &lt;code&gt;str.strip()&lt;/code&gt; for strings, which a person with limited experience with computer programming would understand?&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-09-03T18:32:08.527" Title="What Informal Description Might Help Beginning Students Understand Python's `str.strip()` method?" Tags="|resource-request|lesson-ideas|introductory-lesson|" AnswerCount="6" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7796" PostTypeId="2" ParentId="7795" CreationDate="2023-06-06T01:29:24.897" Score="1" Body="&lt;p&gt;The phone number &lt;code&gt;&amp;quot;(303) 719 -7210⎵⎵⎵⎵&amp;quot;&lt;/code&gt; has some spaces &lt;code&gt;⎵&lt;/code&gt; on the right-hand side.&lt;/p&gt;&#xA;&lt;p&gt;Most computers do not like spaces.&lt;/p&gt;&#xA;&lt;p&gt;We can delete the spaces from the right-hand side.&lt;/p&gt;&#xA;&lt;p&gt;Be careful, &lt;code&gt;⎵&lt;/code&gt; is not a space; we only write &lt;code&gt;⎵&lt;/code&gt; in this example because &lt;code&gt;⎵&lt;/code&gt; is easier to see with your eyes than an actual space character&lt;/p&gt;&#xA;&lt;p&gt;space is &lt;code&gt;chr(32)&lt;/code&gt; or character number 32 in the ASCII character set.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;# `iphone` stands for `input phone number`   &#xA;iphone = &amp;quot;(303) 719-7210    &amp;quot;&#xA;&#xA;# output phone number&#xA;ophone = iphone.strip()   &#xA;&#xA;# ophone = &amp;quot;(303) 719-7210&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;INPUT&lt;/th&gt;&#xA;&lt;th&gt;OUTPUT&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵⎵⎵0. Biodegradable Bowl\n\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;0. Biodegradable Bowl&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Alicia\rSanz\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Alicia\rSanz&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nAna\nFigueroa\t&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Ana\nFigueroa&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\tAriadna\tManzanares &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Ariadna\tManzanares&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\rBriana\nCoronil\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Briana\nCoronil&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nDrp\nKilling\t&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Drp\nKilling&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\rElding\tDawn\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Elding\tDawn&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\rGefa Fortune &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Gefa Fortune&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nGaren Beak\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Garen Beak&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\rHariett Candalia⎵⎵⎵&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Hariett Candalia&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Inmaculada\nFragan &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Inmaculada\nFragan&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nJuana\tPrats\n&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Juana\tPrats&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Laura\tAgramonte &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Laura\tAgramonte&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\tMara\rJos\rSenz &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Mara\rJos\rSenz&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nMetnain\nMetnar\nGlory &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Metnain\nMetnar\nGlory&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\nOctavia Sarmiento\t&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Octavia Sarmiento&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\tSeii\rSeir\rEnchantment\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Seii\rSeir\rEnchantment&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Sk Wekan⎵&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Sakie Wekan&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Silvia\rSanders\r&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Sivlia\rSanders&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;\tTal\rConversation\n&lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Tal\rConversation&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;code&gt;⎵Yolanda\nNavarro &lt;/code&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;code&gt;Yolanda\nNavarro&lt;/code&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;" OwnerUserId="9253" LastEditorUserId="-1" LastEditDate="2023-08-29T13:29:42.980" LastActivityDate="2023-08-29T13:29:42.980" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7799" PostTypeId="1" CreationDate="2023-06-06T20:40:54.160" Score="0" ViewCount="57" Body="&lt;p&gt;In computer programming, the word &lt;em&gt;&lt;strong&gt;render&lt;/strong&gt;&lt;/em&gt; means to turn typed written code into a pretty picture for people to look at.&lt;/p&gt;&#xA;&lt;p&gt;Outside of computer science, the word &lt;em&gt;&lt;strong&gt;render&lt;/strong&gt;&lt;/em&gt; means somthing like &amp;quot;boil ingredients in a metal pot until some final result is produced&amp;quot;.&lt;/p&gt;&#xA;&lt;h1&gt;What formal definition for &lt;em&gt;&lt;strong&gt;render&lt;/strong&gt;&lt;/em&gt; would you put in a textbook on computer science?&lt;/h1&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Difficult to Understand Input&lt;/h3&gt;&#xA;&lt;pre class=&quot;lang-latex prettyprint-override&quot;&gt;&lt;code&gt;R = \begin{bmatrix}&#xA;&#xA;&#xA;\mathbf{881}   &amp;amp;  \mathbf{836}   &amp;amp;  \mathbf{775}   &amp;amp;  \mathbf{829}   &amp;amp;  \mathbf{782}   &amp;amp;  \mathbf{927}   &amp;amp;  \mathbf{539}   &amp;amp;  \mathbf{122}   &amp;amp;  \mathbf{855}   &amp;amp;  \mathbf{273}   &amp;amp;  \\&#xA;&#xA;\mathbf{862}   &amp;amp;  \mathbf{599}   &amp;amp;  \mathbf{192}   &amp;amp;  \mathbf{291}   &amp;amp;  \mathbf{311}   &amp;amp;  \mathbf{737}   &amp;amp;  \mathbf{231}   &amp;amp;  \mathbf{218}   &amp;amp;  \mathbf{349}   &amp;amp;  \mathbf{874}   &amp;amp;  \\&#xA;&#xA;\mathbf{398}   &amp;amp;  \mathbf{149}   &amp;amp;  \mathbf{465}   &amp;amp;  \mathbf{869}   &amp;amp;  \mathbf{529}   &amp;amp;  \mathbf{836}   &amp;amp;  \mathbf{728}   &amp;amp;  \mathbf{914}   &amp;amp;  \mathbf{689}   &amp;amp;  \mathbf{253}   &amp;amp;  \\&#xA;&#xA;\mathbf{671}   &amp;amp;  \mathbf{636}   &amp;amp;  \mathbf{963}   &amp;amp;  \mathbf{852}   &amp;amp;  \mathbf{942}   &amp;amp;  \mathbf{964}   &amp;amp;  \mathbf{183}   &amp;amp;  \mathbf{643}   &amp;amp;  \mathbf{427}   &amp;amp;  \mathbf{726}   &amp;amp;  \\&#xA;&#xA;\mathbf{522}   &amp;amp;  \mathbf{143}   &amp;amp;  \mathbf{568}   &amp;amp;  \mathbf{722}   &amp;amp;  \mathbf{191}   &amp;amp;  \mathbf{834}   &amp;amp;  \mathbf{428}   &amp;amp;  \mathbf{326}   &amp;amp;  \mathbf{318}   &amp;amp;  \mathbf{936}   &amp;amp;  \\&#xA;&#xA;\mathbf{918}   &amp;amp;  \mathbf{825}   &amp;amp;  \mathbf{697}   &amp;amp;  \mathbf{615}   &amp;amp;  \mathbf{439}   &amp;amp;  \mathbf{998}   &amp;amp;  \mathbf{785}   &amp;amp;  \mathbf{367}   &amp;amp;  \mathbf{132}   &amp;amp;  \mathbf{637}   &amp;amp;  \\&#xA;&#xA;\mathbf{479}   &amp;amp;  \mathbf{394}   &amp;amp;  \mathbf{555}   &amp;amp;  \mathbf{841}   &amp;amp;  \mathbf{745}   &amp;amp;  \mathbf{436}   &amp;amp;  \mathbf{272}   &amp;amp;  \mathbf{617}   &amp;amp;  \mathbf{665}   &amp;amp;  \mathbf{828}   &amp;amp;  \\&#xA;&#xA;\mathbf{349}   &amp;amp;  \mathbf{614}   &amp;amp;  \mathbf{836}   &amp;amp;  \mathbf{579}   &amp;amp;  \mathbf{775}   &amp;amp;  \mathbf{365}   &amp;amp;  \mathbf{511}   &amp;amp;  \mathbf{218}   &amp;amp;  \mathbf{462}   &amp;amp;  \mathbf{585}   &amp;amp;  \\&#xA;&#xA;\mathbf{485}   &amp;amp;  \mathbf{475}   &amp;amp;  \mathbf{156}   &amp;amp;  \mathbf{473}   &amp;amp;  \mathbf{527}   &amp;amp;  \mathbf{585}   &amp;amp;  \mathbf{894}   &amp;amp;  \mathbf{931}   &amp;amp;  \mathbf{614}   &amp;amp;  \mathbf{234}   &amp;amp;  \\&#xA;&#xA;\mathbf{331}   &amp;amp;  \mathbf{437}   &amp;amp;  \mathbf{556}   &amp;amp;  \mathbf{395}   &amp;amp;  \mathbf{324}   &amp;amp;  \mathbf{673}   &amp;amp;  \mathbf{395}   &amp;amp;  \mathbf{145}   &amp;amp;  \mathbf{411}   &amp;amp;  \mathbf{654}   &amp;amp;  \\&#xA;&#xA;\end{bmatrix}&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Easier to Understand Output&lt;/h1&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://quicklatex.com/cache3/2c/ql_da58a2c2eda3fac5413cb2046ef6782c_l3.png&quot; alt=&quot;a screen capture of a ten by ten matrix full of numbers&quot; /&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Neither the input, nor the output, in my example is easy to read.&lt;/p&gt;&#xA;&lt;p&gt;However, the output is &lt;em&gt;&lt;strong&gt;easier&lt;/strong&gt;&lt;/em&gt; for the human eye (and/or visual cortex) to perceive.&lt;/p&gt;&#xA;&lt;p&gt;The word &amp;quot;render&amp;quot; is used in the videogame industry to mean&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;make the trees, airplanes, people, swords, dragons, etc...   &lt;strong&gt;LOOK&lt;/strong&gt; like trees, airplanes, people, swords, &amp;amp; dragons.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I am still not sure that is an acceptable definition to use with students.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-06-07T14:07:10.147" Title="How would you define the word &quot;render&quot; in the vocabulary list, or define &quot;render&quot; for a text/exam, for a course on computer science?" Tags="|lesson-ideas|textbook|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7800" PostTypeId="2" ParentId="7799" CreationDate="2023-06-07T14:07:10.147" Score="1" Body="&lt;p&gt;To render is to undergo some transformative process that yields something.  To render a graphic is to transform it to something viewable. To render fat is transform it to a purified form (such as shmaltz or tallow).&lt;/p&gt;&#xA;&lt;p&gt;To render a table is &lt;em&gt;exactly the same usage&lt;/em&gt; as rendering a graphic, as in your written example.  Note that in that example, I believe that they are saying they they make the &lt;em&gt;files holding the graphic information&lt;/em&gt; look like (be visible as) the things they represent.&lt;/p&gt;&#xA;&lt;p&gt;As an aside, I semi-regularly point to etymologies of key words that students need to understand.  Those etymologies are usually quite clarifying.  &amp;quot;Static&amp;quot; always seems like a weird word to represent the concept it represents in OOP until you see its etymology, and suddenly its linkage with unmoving things becomes much clearer.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-06-07T14:07:10.147" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7802" PostTypeId="1" CreationDate="2023-06-10T09:19:04.500" Score="2" ViewCount="174" Body="&lt;p&gt;I'm currently doing my teacher preparation in Germany and next year I have to teach programming in python to high school students. The students only have 90 min of computer science every week and the contents of these courses are variables, functions, input and output, for and while loops and conditionals.&lt;/p&gt;&#xA;&lt;p&gt;My idea is to use exercises on codewars for this course, because the students get a immediate feedback and are motivate to get some points.&lt;/p&gt;&#xA;&lt;p&gt;My idea is to start with using python as a calculator to compute something simple. Then write simple functions like &lt;code&gt;square&lt;/code&gt; to extend the calculator. Then introduce other types like strings and booleans and write more simple functions.&lt;/p&gt;&#xA;&lt;p&gt;Then I will introduce conditionals to solve problems like this:&#xA;&lt;a href=&quot;https://www.codewars.com/kata/53369039d7ab3ac506000467&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/kata/53369039d7ab3ac506000467&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;One of my problem is that &lt;code&gt;else&lt;/code&gt; and &lt;code&gt;elif&lt;/code&gt; are not really necessary here.&lt;/p&gt;&#xA;&lt;p&gt;After this I will teach variables, &lt;code&gt;print&lt;/code&gt; and &lt;code&gt;input&lt;/code&gt; to make some interactive programs.&#xA;For example I want to make an interactive program that uses the solution for this kata&#xA;&lt;a href=&quot;https://www.codewars.com/kata/5672a98bdbdd995fad00000f&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/kata/5672a98bdbdd995fad00000f&lt;/a&gt;&#xA;to play &amp;quot;Rock, Paper, Scissors&amp;quot;. I think it is necessary to explain the difference between return and print here.&lt;/p&gt;&#xA;&lt;p&gt;After this I will introduce &lt;code&gt;for&lt;/code&gt; loops and use it to print the numbers from o to 100 or something similar. Then I will teach the accumulator pattern to solve katas like this &lt;a href=&quot;https://www.codewars.com/kata/57a049e253ba33ac5e000212&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/kata/57a049e253ba33ac5e000212&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the end I will introduce &lt;code&gt;while&lt;/code&gt; loops, because it is the most difficult concept.&#xA;The students can solve katas like this with while loops: &lt;a href=&quot;https://www.codewars.com/kata/563b662a59afc2b5120000c6&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/kata/563b662a59afc2b5120000c6&lt;/a&gt; and&#xA;&lt;a href=&quot;https://www.codewars.com/kata/5286b2e162056fd0cb000c20&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.codewars.com/kata/5286b2e162056fd0cb000c20&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;What do you think about that. I already found a lot of good exercises on codewars but I'm not sure if this is a good approach.&lt;/p&gt;&#xA;&lt;p&gt;Can you please give me feedback about this idea?&lt;/p&gt;&#xA;" OwnerUserId="13508" LastEditorUserId="27" LastEditDate="2023-06-15T15:42:40.583" LastActivityDate="2024-03-26T03:09:06.123" Title="Use codewars in class" Tags="|programming|curriculum-review|lesson-order|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7803" PostTypeId="2" ParentId="7795" CreationDate="2023-06-12T16:28:01.250" Score="1" Body="&lt;p&gt;&lt;code&gt;strip&lt;/code&gt; removes characters from the beginning and end of a string&lt;/p&gt;&#xA;&lt;p&gt;The removed characters can be passed as the first argument to &lt;code&gt;strip&lt;/code&gt;.  If none are specified &lt;code&gt;strip&lt;/code&gt; will remove whitespace (&lt;code&gt;\n&lt;/code&gt; &lt;code&gt;\t&lt;/code&gt; &lt;code&gt;\r&lt;/code&gt; and space usually).&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;strip&lt;/code&gt; does &lt;em&gt;NOT&lt;/em&gt; remove characters from the middle of a string.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux&#xA;Type &amp;quot;help&amp;quot;, &amp;quot;copyright&amp;quot;, &amp;quot;credits&amp;quot; or &amp;quot;license&amp;quot; for more information.&#xA;&amp;gt;&amp;gt;&amp;gt; print ('x y'.strip())&#xA;x y&#xA;&amp;gt;&amp;gt;&amp;gt; print ('x y'.strip(' '))&#xA;x y&#xA;&amp;gt;&amp;gt;&amp;gt; print (' x y'.strip(' '))&#xA;x y&#xA;&amp;gt;&amp;gt;&amp;gt; print (' x y '.strip(' '))&#xA;x y&#xA;&amp;gt;&amp;gt;&amp;gt; print (('\&amp;quot;{0}\&amp;quot;').format(' x y '.strip(' ')))&#xA;&amp;quot;x y&amp;quot;&#xA;&amp;gt;&amp;gt;&amp;gt; print (('\&amp;quot;{0}\&amp;quot;').format('x y '.strip(' ')))&#xA;&amp;quot;x y&amp;quot;&#xA;&amp;gt;&amp;gt;&amp;gt; print (('\&amp;quot;{0}\&amp;quot;').format('x\ty '.strip(' ')))&#xA;&amp;quot;x  y&amp;quot;&#xA;&amp;gt;&amp;gt;&amp;gt; print (('\&amp;quot;{0}\&amp;quot;').format('x\ty '.strip()))&#xA;&amp;quot;x  y&amp;quot;&#xA;&amp;gt;&amp;gt;&amp;gt; 'www.example.com'.strip('am')&#xA;'www.example.co'&#xA;&amp;gt;&amp;gt;&amp;gt; 'www.example.com'.strip('xa')&#xA;'www.example.com'&#xA;&amp;gt;&amp;gt;&amp;gt; 'www.example.com'.strip('ple')&#xA;'www.example.com'&#xA;&amp;gt;&amp;gt;&amp;gt; &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13516" LastActivityDate="2023-06-12T16:28:01.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7804" PostTypeId="2" ParentId="7795" CreationDate="2023-06-14T11:28:50.757" Score="1" Body="&lt;p&gt;I suggest&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Strings can contain characters that you can't see such as spaces between words, or marking the end of a line. &lt;code&gt;str.strip&lt;/code&gt; will remove these characters if they occur at the start or end of the string but not in the middle. This is useful because often when you chop up a longer string into words or lines you are left with these invisible characters around the pieces that you want.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This introduces the idea of whitespace, explains what strip does, and explains why you may want to use it, without getting bogged down in technical details that are not necessary to understand at this stage.&lt;/p&gt;&#xA;" OwnerUserId="2172" LastActivityDate="2023-06-14T11:28:50.757" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7806" PostTypeId="2" ParentId="7795" CreationDate="2023-06-15T15:40:33.617" Score="3" Body="&lt;p&gt;All of the explanations in the other answers are fine for &lt;code&gt;strip()&lt;/code&gt;, and will do very well for students who have a good intuition for what strings and characters are. But in truth, for students with good intuitions about those concepts, essentially any explanation of &lt;code&gt;strip&lt;/code&gt; will do - it's a very sensible operation, and not hard to understand if you have the background knowledge.&lt;/p&gt;&#xA;&lt;p&gt;But in my experience, &lt;code&gt;strip()&lt;/code&gt; is often introduced (often &lt;em&gt;must&lt;/em&gt; be introduced, because it is needed for some lab assignment or another) prior to all of the students having a firm grasp on what a character is, and on what a string is.&lt;/p&gt;&#xA;&lt;p&gt;So we proceed!  If I give a reasonable explanation of the function and find that some of my students are still somewhat confused, I move on to what characters are, starting with the fact that everything that comes from the keyboard, including enter, are characters, and that there are even characters that don't use any space at all.&lt;/p&gt;&#xA;&lt;p&gt;Then we talk (only very briefly!) about strings as arrays of such characters, and wind our way back to strip.&lt;/p&gt;&#xA;&lt;p&gt;I would caution newer teachers to temper their expectations at this point in our journey.  There are genuinely a lot of small abstractions built up in that short conversation, and it may take students some time to absorb all of them, so comprehension may not really be 100% yet.  But students should absolutely come out with the idea that &lt;code&gt;strip()&lt;/code&gt; creates a sort of &amp;quot;cleaned up&amp;quot; version of the string, but with the cleaning only done on the outsides.  The rest may take a bit longer to catch up, and that is okay.  Building firm mental models takes time.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-06-15T15:40:33.617" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7807" PostTypeId="2" ParentId="7795" CreationDate="2023-06-24T00:05:21.360" Score="2" Body="&lt;p&gt;I would introduce this with a problem/relatable example, such as:&lt;/p&gt;&#xA;&lt;p&gt;I'd make a little text-based program that printed out:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Welcome to Birdr, your favorite social media site for bird-watching.&#xA;Would you like to make an account?&#xA;&amp;gt; Yes&#xA;What is your first name?&#xA;&amp;gt; [I'd ask the students for a fake first name]&#xA;What is your last name?&#xA;&amp;gt; [I'd ask the students for a fake last name]&#xA;Welcome, [First Last]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;When typing in the students' suggestions for names, I'd pretend to be having difficulty typing. I'd make a big show of hunting for letters, struggling with capitalization, etc. and I'd make sure to leave several spaces at the beginning and end of words.&lt;/p&gt;&#xA;&lt;p&gt;Then, once the program had run, I'd ask the class the following questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How is this working? What have we learned about so far that's being used here? (Printing, input, variables, strings). I'd show them the source code at this point, which would have been hidden until now.&lt;/li&gt;&#xA;&lt;li&gt;Look at this weird formatting (e.g., &lt;code&gt;Welcome,   Harry      Potter &lt;/code&gt;), why is that happening? (I typed extra spaces around both words)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Often, when we're getting user input, people will make mistakes like adding extra spaces before or after words. Luckily, there's a way to clean that up! We can use Python's &lt;code&gt;strip()&lt;/code&gt; function. &lt;code&gt;strip()&lt;/code&gt; gets rid of extra &amp;quot;whitespace&amp;quot; before and after a string. Whitespace is stuff like spaces.&lt;/p&gt;&#xA;&lt;p&gt;I'd show adding it in and then running the program again. Then we'd talk about the difference between using it on each of the inputted variables vs using it on the concatenated string and we'd see an example of each. I'd ask the students to point out the difference and ask them to hypothesize why they were different.&lt;/p&gt;&#xA;&lt;p&gt;Finally, I'd ask the class to brainstorm other situations that &lt;code&gt;strip()&lt;/code&gt; might be useful.&lt;/p&gt;&#xA;" OwnerUserId="6308" LastActivityDate="2023-06-24T00:05:21.360" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7808" PostTypeId="1" CreationDate="2023-06-25T10:08:37.057" Score="2" ViewCount="263" Body="&lt;p&gt;While many good books deal with CPU architecture in detail, for instance, &lt;em&gt;Computer Architecture: A Quantitative Approach&lt;/em&gt; by &lt;em&gt;Patterson et al.&lt;/em&gt;, and also some books deal with the hardware/software interface (CPU and the Operating Systems), for instance, &lt;em&gt;Computer Organization and Design: The Hardware/Software Interface&lt;/em&gt; by &lt;em&gt;Patterson et al.&lt;/em&gt; and Operating System books like the &lt;em&gt;OSTEP&lt;/em&gt; by &lt;em&gt;Remzi et al.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The books mentioned above, quite nicely and in good depth, cover the CPU architecture, page tables (the hardware and software contract), context switching, etc. But I don't know any book which deals with the same for GPUs.&lt;/p&gt;&#xA;&lt;p&gt;Recently I was reading a research paper &lt;em&gt;GPUvm: GPU Virtualization at the Hypervisor&lt;/em&gt; by &lt;em&gt;Yusuke Suzuki et al.&lt;/em&gt;, where the authors were mentioning about GPU page tables, GPU contexts, GPU channels, PCIe BARs, MMIO (how CPU communicates with the GPU using MMIO and when it uses DMA).&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/YtjSK.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/YtjSK.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/VGZw3.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/VGZw3.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;They also talk about Unified Memory, how it works (in detail at the hardware level), and how things go hand in hand with the GPU driver, for instance, the open-source driver for Nvidia GPUs (Nouveau).&lt;/p&gt;&#xA;&lt;p&gt;I am very eager to know about the GPU architecture in detail. Especially the hardware/software interface, which explains the whys and hows I currently have in mind.&lt;/p&gt;&#xA;&lt;p&gt;Any help shall be highly appreciated.&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2023-06-25T10:08:37.057" Title="Books or resources for GPU architecture" Tags="|self-learning|resource-request|architecture|gpu|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7809" PostTypeId="1" CreationDate="2023-06-28T09:38:50.073" Score="4" ViewCount="810" Body="&lt;p&gt;I came across this question, &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/43528/im-graduating-with-a-computer-science-degree-but-i-dont-feel-like-i-know-how-t?answertab=scoredesc#tab-top&quot;&gt;I'm graduating with a Computer Science degree but I don't feel like I know how to program&lt;/a&gt; on &lt;a href=&quot;https://softwareengineering.stackexchange.com/&quot;&gt;https://softwareengineering.stackexchange.com/&lt;/a&gt;. It has &lt;strong&gt;1050&lt;/strong&gt; upvotes and &lt;strong&gt;130&lt;/strong&gt; answers so far. But it was asked in 2010 and I don't know how much has changed. Then I found here a similar question asked in 2021  &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7094/i-am-a-cs-student-but-i-dont-know-how-to-code-projects-how-do-i-learn-this&quot;&gt;I am a CS student, but I don&amp;#39;t know how to code projects. How do I learn this?&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;So is this common if students study in some average colleges? If it is what is the reason?&lt;/p&gt;&#xA;&lt;p&gt;--- update ---&lt;/p&gt;&#xA;&lt;p&gt;I did some research and found these two articles may explain it a little bit.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A Q&amp;amp;A on quora &lt;a href=&quot;https://www.quora.com/How-common-is-it-to-graduate-with-a-Computer-Science-degree-and-you-dont-know-how-to-code&quot; rel=&quot;nofollow noreferrer&quot;&gt;How common is it to graduate with a Computer Science degree and you don't know how to code?&lt;/a&gt;. &lt;a href=&quot;https://qr.ae/py5nwE&quot; rel=&quot;nofollow noreferrer&quot;&gt;One of the answers&lt;/a&gt; said,&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;More common than you think... I did great on all my projects, but none&#xA;required a front end or a database. How could I do anything&#xA;meaningful? Sure, I could take data and inputs and make things work&#xA;how I wanted, and I could meet the requirements given to me, but it&#xA;seemed like my best work was fairly trivial compared to “real&#xA;software.” I’d never made something “pretty” or impressive.&lt;/p&gt;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&lt;p&gt;Now, you should be able to code small programs ... plenty of grads&#xA;finish thinking, “I can’t code.” In reality, they can’t code to the&#xA;point where they can make a mobile app, a fancy website, or a complete&#xA;system. That isn’t “I can’t code” and is instead “I don’t know what’s&#xA;expected of a new software engineer.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ol start=&quot;2&quot;&gt;&#xA;&lt;li&gt;&lt;a href=&quot;https://www.freecodecamp.org/news/is-it-computer-science-or-programming-c01383dacc9c/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Is It &amp;quot;Computer Science&amp;quot; or &amp;quot;Programming&amp;quot;?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;As a computer science major myself, I can tell you firsthand that&#xA;computer science involves writing very little code — especially at the&#xA;higher levels. If I had to arbitrarily assign a percentage to “math v.&#xA;programming”, I would say that computer science is at least 80% math&#xA;and at most 20% programming.&lt;/p&gt;&#xA;&lt;p&gt;...&lt;/p&gt;&#xA;&lt;p&gt;computer science majors are not necessarily good programmers. Granted,&#xA;they show a higher aptitude towards becoming a good programmer, but&#xA;they rarely know how to code anything useful coming out of college&#xA;with a computer science degree&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;But I hope to see someone with first-hand experience explaining it.&lt;/p&gt;&#xA;&lt;p&gt;BTW, I am not looking for an answer about what students should do to deal with the situation as the 130 answers on SE are enough. I want to know if this is the case in 2023. If yes, what could be the reason(s)?&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-07-12T04:54:16.440" LastActivityDate="2023-09-03T18:42:41.427" Title="Is it common that CS graduates have a hard time programming?" Tags="|programming|undergraduate|assessment|" AnswerCount="4" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7810" PostTypeId="2" ParentId="5906" CreationDate="2023-06-28T19:01:26.740" Score="1" Body="&lt;p&gt;This question was asked 3 years ago when ChatGPT didn't exist yet. Nowadays I would say (in addition to several excellent answers above) that the use of techniques not already taught is a sign that the student got some LLM to generate the answer. The answer from a chatbot can very well be correct, but it will also be more sophisticated than the student could have come up with on their own.&lt;/p&gt;&#xA;&lt;p&gt;So you can either not allow this, or insist that the student be able to justify every single line in their code.&lt;/p&gt;&#xA;" OwnerUserId="6346" LastActivityDate="2023-06-28T19:01:26.740" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7811" PostTypeId="1" CreationDate="2023-06-29T08:01:16.137" Score="2" ViewCount="34" Body="&lt;p&gt;I'm trying to teach the basics of benchmarking and optimising .NET code. This is to other established engineers, not university students.&lt;/p&gt;&#xA;&lt;p&gt;I want to start off with a badly optimised algorithm and then we can interactively optimise during the talk.&lt;/p&gt;&#xA;&lt;p&gt;Has anyone got good example algorithms that have a reasonable looking naive implementation but also reasonably obvious paths to optimisation that I could use for this?&lt;/p&gt;&#xA;&lt;p&gt;My initial thought is a prime finder, but I was hoping for something a little more interesting and that doesn't rely on my audience knowing about some of the less obvious mathematical properties optimising a prime finder requires.&lt;/p&gt;&#xA;" OwnerUserId="11354" LastActivityDate="2023-06-29T08:01:16.137" Title="Good example for a live optimisation exercise" Tags="|exercises|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7814" PostTypeId="2" ParentId="4416" CreationDate="2023-07-05T15:16:57.837" Score="1" Body="&lt;p&gt;I am a preschool teacher and a former CS/IT worker. Yes, you can teach CS to preschoolers. It is a part of the Digital Citizen lesson planning that is common across the board. I would say use colors and simple numbers/letters.&lt;/p&gt;&#xA;&lt;p&gt;Ex- Red and Blue make Purple, Uppercase and Lowercase letters, ect.&#xA;Making a game out of it using their bodies instead is the easiest way. That way you can &amp;quot;show&amp;quot; the CS skills happening in real-time and they really are learning it. Sounds odd, sure but trust when they get to Kindergarten it will show that they did learn it!! Kudos to you for implementing it!!&lt;/p&gt;&#xA;&lt;p&gt;Red - Jump&#xA;A- Turn Right&#xA;Blue - Spin&#xA;B - Turn Left&lt;/p&gt;&#xA;&lt;p&gt;Hopefully, this is making sense!! Preschoolers do code for whoever said no. It is clear that this question is hard if you are not in the classroom directly. I have done this before and trust me when I say make it BIG! So they can see the coding happening on the ground. Preschool and Tech are my little niche as most PK teachers hate &amp;quot;screen time&amp;quot; or anything to do with tech in the classroom because they are choosing to not figure it out.&lt;/p&gt;&#xA;&lt;p&gt;Resources Below for verification:&#xA;&lt;a href=&quot;https://k12cs.org/pre-k/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://k12cs.org/pre-k/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hope that helps!!&lt;/p&gt;&#xA;&lt;p&gt;Play is the work of the Child!&#xA;-Teacher Kelly&lt;/p&gt;&#xA;" OwnerUserId="13594" LastActivityDate="2023-07-05T15:16:57.837" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7815" PostTypeId="2" ParentId="7809" CreationDate="2023-07-07T07:05:25.027" Score="3" Body="&lt;p&gt;Computer Science is related to Programming the same as e.g. Physics is related to Electrical Engineering.&lt;/p&gt;&#xA;&lt;p&gt;One deals with the scientific background, and the other teaches how to make things that are useful, reliable, safe, cost-efficient, maintainable and so on.&lt;/p&gt;&#xA;&lt;p&gt;It would be nice to have distinct Software Engineering university programs, distinct from Computer Science, but even such a degree would only half-prepare you for any real job. Comparable: someone with a degree in Electrical Engineering will still need lots of experience before successfully designing e.g. the next iPhone (and most probably no single person will do that, but a large team of specialists). And someone with a Physics degree will even be less prepared.&lt;/p&gt;&#xA;&lt;p&gt;And as programs are among the most complex things that mankind produces, creating them (so that they show the above-mentioned properties) is far from trivial.&lt;/p&gt;&#xA;&lt;p&gt;As someone working in the software industry for some decades now, I can tell you some things from experience:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Nobody ever is perfect in programming. We all have strengths and weaknesses.&lt;/li&gt;&#xA;&lt;li&gt;There is no perfect code. You'll always find aspects that could be improved. But often enough, it's the correct decision not to improve, because the gain isn't worth the effort.&lt;/li&gt;&#xA;&lt;li&gt;Rely on experienced peers to guide you in aspects that you haven't mastered yet.&lt;/li&gt;&#xA;&lt;li&gt;There is no such thing as a full-stack developer. Nobody masters everything from User Experience down to Data Services with high production-level quality. If a single-person project covers all that, you'll surely find lots of deficiencies. Again, rely on a team.&lt;/li&gt;&#xA;&lt;li&gt;Every team and every product has its own philosophy, guidelines, tools, style and so on, and nobody expects a newcomer to embrace that within the first week on the job.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So, yes, if you want to go into programming from &amp;quot;just&amp;quot; a Computer Science degree, expect a steep learning curve. But everybody in the industry knows that and is willing to train you on the job. And the learning curve will never end. Embrace that, it's part of the fun.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-07-07T07:05:25.027" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7816" PostTypeId="1" CreationDate="2023-07-11T14:56:46.597" Score="6" ViewCount="74" Body="&lt;p&gt;I am preparing an educational course on software legacy code and refactoring. Every topic is introduced as a group discussion to establish the vocabulary. It is then followed by a matching practical coding dojo with a kata dedicated to the same topic.&lt;/p&gt;&#xA;&lt;p&gt;The target audience is a group of software engineers who are comfortable with the principles of coding dojos, they have completed a half dozen of dojos already. They are experienced with applying TDD to katas where the objective was to write new code from scratch.&lt;/p&gt;&#xA;&lt;p&gt;The new course is focused on working with legacy code: getting it under test, isolation of dependencies, safe refactoring etc. One of the topics I want to explore is that removal of code that is no longer useful is a valuable approach when working with legacy code.&lt;/p&gt;&#xA;&lt;p&gt;I am looking for ideas and inspiration for designing a matching kata. I.e. I need to prepare a body of code and formulate an assignment for it. One of the feasible solutions to this assignment should involve removal a significant portion of the original code.&lt;/p&gt;&#xA;&lt;p&gt;There are many catalogues on the web of ideas for katas and even ready-made repositories to be used as starting points. But I am yet to find one that would closely match my intention.&lt;/p&gt;&#xA;&lt;p&gt;Most of the katas that start from a pre-existing non-empty code repository expect a student to transform it to a repository of a roughly the same size. I am looking for ideas where the resulting code is notably smaller compared to the starting point. The reasons for the initial volume could be different and combined in the same project: plain old copy-paste abuse, violation of YAGNI principle (having features that nobody asked for), various code smells that provoke code bloat etc.&lt;/p&gt;&#xA;&lt;p&gt;I am not looking for a ready solution, but for ideas of how I could create such a &amp;quot;Code Deletion Kata&amp;quot; for my course.&lt;/p&gt;&#xA;" OwnerUserId="13614" LastEditorUserId="1401" LastEditDate="2023-07-12T17:48:50.950" LastActivityDate="2023-07-15T21:02:15.780" Title="Designing of code kata focused on _deleting_ code as a primary goal" Tags="|programming|" AnswerCount="3" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7817" PostTypeId="2" ParentId="7816" CreationDate="2023-07-11T16:03:19.243" Score="3" Body="&lt;p&gt;One of the main causes of a need to delete code is a changed requirement. Take the &lt;a href=&quot;https://codingdojo.org/kata/Bowling/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bowling Kata&lt;/a&gt; for example. Imagine a student has completed this assignment. Now tell them, they need to create a version where spares are not a thing. That will lead to deleting code.&lt;/p&gt;&#xA;&lt;p&gt;If you really want to throw them in the deep end of maintenance coding make them make this change in another students Bowling Kata. Obviously you will need to have reviewed this code so you understand just how much pain you're asking the student to endure but remember, this pain is what you're trying to teach them.&lt;/p&gt;&#xA;&lt;p&gt;If the student that authored the code first is in the class this also offers a chance for a peer code review. But for the first year you'll likely find you have more students than useable Bowling Kata code. It's OK to pick a few good ones to share among the many.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastEditorUserId="1401" LastEditDate="2023-07-11T16:13:31.717" LastActivityDate="2023-07-11T16:13:31.717" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7818" PostTypeId="2" ParentId="7816" CreationDate="2023-07-13T11:14:28.943" Score="3" Body="&lt;p&gt;The most common form of code re-factoring that involves code reduction in the absence of changed requirements is the replacement of common code sections by functions or methods. Secondly code can also  be reduced by the use of exceptions and thirdly code can be reduced by better data structuring.&lt;/p&gt;&#xA;&lt;p&gt;As a Kata is about repetition of small increments of learning, it would  be best to do this in several distinct Kata. I imagine the following set of Kata might be instructive:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Replacement of repeated sequences of identical code by functions (or macros) that involve no arguments&lt;/li&gt;&#xA;&lt;li&gt;Replacement of repeated sequences of identical code by functions (or macros) that require parameterisation&lt;/li&gt;&#xA;&lt;li&gt;The use of exceptions, break and return to reduce long control structures&lt;/li&gt;&#xA;&lt;li&gt;Replacement of several basic type variables by structured compound types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;One could go further and start introducing the power of generics but at this stage start with sme basics.&lt;/p&gt;&#xA;" OwnerUserId="694" LastActivityDate="2023-07-13T11:14:28.943" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7819" PostTypeId="2" ParentId="7795" CreationDate="2023-07-15T20:53:30.263" Score="2" Body="&lt;p&gt;Start with why:&lt;/p&gt;&#xA;&lt;p&gt;e.g. user input sometimes has leading and trailing space. The user does not see this space. To the user this is equivalent. Therefore it should be equivalent (to there being no leading and trailing space).&lt;/p&gt;&#xA;&lt;p&gt;Then, it would be nice to have a way to solve this problem.&lt;/p&gt;&#xA;&lt;p&gt;Then, Oh look, we have a way to solve this problem.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2023-07-16T11:06:43.320" LastActivityDate="2023-07-16T11:06:43.320" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7820" PostTypeId="2" ParentId="7816" CreationDate="2023-07-15T21:02:15.780" Score="0" Body="&lt;p&gt;As well as delete it because it is not used.&#xA;I think &lt;strong&gt;generalisation&lt;/strong&gt;, is a big reason to delete code.&lt;/p&gt;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;functions and procedures, replacing sequences&lt;/li&gt;&#xA;&lt;li&gt;parametrised functions and procedures, replacing non parametrised&lt;/li&gt;&#xA;&lt;li&gt;function/procedure passing (lambdas), to provide strategies, to replace special purpose versions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-07-15T21:02:15.780" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7821" PostTypeId="2" ParentId="7809" CreationDate="2023-07-15T21:10:04.527" Score="1" Body="&lt;p&gt;There is a difference between, learning a programming language and learning to program. May people graduate having not get learnt the language, and therefore not properly started to learn to program.&lt;/p&gt;&#xA;&lt;p&gt;This is because of poor choice of language. This in turn is because the choice of language is motivated by what was used in industry 20 years ago, and not by what will help the students learn no program.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-07-15T21:10:04.527" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7825" PostTypeId="1" CreationDate="2023-07-18T05:13:09.687" Score="2" ViewCount="105" Body="&lt;p&gt;I'm finding SQL subqueries tough to understand and write.&lt;/p&gt;&#xA;&lt;p&gt;When I ask how I can make it easier to write subqueries, the first response people give is &amp;quot;practice&amp;quot;. But what do I practice? Where do I practice subqueries?&lt;/p&gt;&#xA;&lt;p&gt;HackerRank problems are tough for my level. What are places who teach and practice subqueries?&lt;/p&gt;&#xA;&lt;p&gt;Will learning relational algebra and calculus help me to learn SQL subqueries?&lt;/p&gt;&#xA;" OwnerUserId="12478" LastEditorUserId="2485" LastEditDate="2023-09-04T02:43:22.433" LastActivityDate="2023-09-04T02:43:22.433" Title="Will learning relational algebra and calculus help me to learn SQL subqueries?" Tags="|self-learning|databases|sql|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7826" PostTypeId="2" ParentId="7825" CreationDate="2023-07-20T14:21:08.757" Score="1" Body="&lt;p&gt;You can find the official tutorial on SQL subqueries at: &lt;a href=&quot;https://beginner-sql-tutorial.com/sql-subquery.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://beginner-sql-tutorial.com/sql-subquery.htm&lt;/a&gt;. The explanation there seems clear enough.&lt;/p&gt;&#xA;&lt;p&gt;However, I found that understanding both Relational Algebra and Relational Calculus to be very helpful in understanding the underlying structures behind relational databases and SQL in general.&lt;/p&gt;&#xA;&lt;p&gt;If SQL is important to your studies or career, either or both of Relational Algebra and Relational Calculus should be a help as is some understanding of Entity Relationship design process.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-07-20T14:21:08.757" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7827" PostTypeId="1" CreationDate="2023-07-21T06:13:54.870" Score="3" ViewCount="344" Body="&lt;p&gt;I've to get FE exam to get licensed as an engineer in Nepal. I want to learn everything properly because I feel I didn't learn to the extent that I could in college. My first hitlist is operating system and Database Management System as these two are also little bit used in my job(Linuxadmin job that requires some bit of sql)&lt;/p&gt;&#xA;&lt;p&gt;What's the best book about operating system? In college I read tanenbaum and hated every pages of it because it didn't go to much handholding that I wanted. I am weird because I want handholding in book that assumes I've no preriquisites while teaching. I don't need to make an operating system. Just clear my fundamentals and become an operating system knowledgeable person. Likewise I read computer networks by stallings and I was quite meh about it. The book was good in pieces and definitely better writing than tanenbaum but I'm not exactly impressed.&lt;/p&gt;&#xA;&lt;p&gt;I've tried the book &amp;quot;Linux with Operating system concepts&amp;quot; and didn't find it good. I'm a hands on person nowadays so would love a book that has good exercises. When I say hands on, I don't want books that teach Linux. I already know Linux commands. I explicitly want to study the operating system fundamentals like process synchronization, memory management, secondary storage working etc.&lt;/p&gt;&#xA;&lt;p&gt;The other book is by Galvin. But silber something also wrote this and I didn't like his DBMS book.&lt;/p&gt;&#xA;&lt;p&gt;​There was 1 good book when I was in college I don't remember. If it was 3 easy pieces or something. It had dinosaurs in it. Probably galvin book.&lt;/p&gt;&#xA;&lt;p&gt;Anyway, recommend me? I will also purchase a competitive exam practice questions book for GATE which is the toughest exam for engineering computer science.&lt;/p&gt;&#xA;&lt;p&gt;About courses, I found NPTEL courses from top IITs too tough to understand. Are there any new online courses in the market at the moment. I studied operating system in college in around 2020.&lt;/p&gt;&#xA;&lt;p&gt;Please recommend and help me in my journey. I also have purchased a course from Prateek jain academy which is well over 50+ hrs but I am failing to see any value in it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://bctengineeringnotes.blogspot.com/2019/04/operating-system.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://bctengineeringnotes.blogspot.com/2019/04/operating-system.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;These are the concepts that I want to study.&lt;/p&gt;&#xA;&lt;p&gt;Although I'm studying for competitive exams, I explictly want to improve my knowlege in operating systems. Because I've found concepts of subjects like operating systems, computer networks, database management systems, distributed systems etc are very important in software and IT industry. Having basics of those strong is important. That's why I am studying all of operating systems(more than required in competitive exam)&lt;/p&gt;&#xA;&lt;p&gt;PS I've already started learning  about Operating Systems from an online course that I said I bought. I am starting from synchronization and I'd be honest, it's tricky. Are there any tips to learn this tricky concepts like this? I have had a hard time learning about tricky concepts like serializability in database as well. Any guidance will be extremely valuable.&lt;/p&gt;&#xA;" OwnerUserId="12544" LastActivityDate="2023-07-21T09:00:15.547" Title="Books and courses to learn Operating Systems Fundamentals?" Tags="|self-learning|textbook|operating-systems|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7828" PostTypeId="2" ParentId="7827" CreationDate="2023-07-21T09:00:15.547" Score="2" Body="&lt;p&gt;The &amp;quot;dinosaur book&amp;quot; is &lt;em&gt;Operating System Concepts&lt;/em&gt; by Abraham Silberschatz. It is good and has a recent edition, but it isn't cheap. Another classic book is &lt;em&gt;Modern Operating Systems&lt;/em&gt; by Andrew Tanenbaum and Herbert Bos. It is also good, but not so recent.&lt;/p&gt;&#xA;&lt;p&gt;A book about Linux is a bit narrow as not all operating systems are derived from Unix.  And not all Unix derived systems are like Linux.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-07-21T09:00:15.547" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7829" PostTypeId="1" CreationDate="2023-07-22T05:54:12.527" Score="3" ViewCount="180" Body="&lt;p&gt;I've reached a point of no return in my learning computer science journey. I know little bit of basics, but advanced stuff in computer science I really don't know. By advanced stuff, I mean subjects taught in 3rd and 4th year of typical CS degree (which are also called core CS subjects in some parts of the world, subjects like Operating System, Database,Computer Networks, Artificial Intelligence etc).&lt;/p&gt;&#xA;&lt;p&gt;I'm really bothered by it. I want to learn Computer Science. I'm already graduated though, but I graduated from almost a degree farm (I didn't know when  I joined), so my graduation doesn't mean much.&lt;/p&gt;&#xA;&lt;p&gt;About me, I find Electronics part of computer science easier though. I finally want to study OS, DBMS, CN, DSA, AI etc like taught in college  level course and I want to do it right.  Feel confident in my learning.&lt;/p&gt;&#xA;&lt;p&gt;I've identified the bottleneck in my learning and I want to improve. How do I do it?&lt;/p&gt;&#xA;" OwnerUserId="12544" LastEditorUserId="12544" LastEditDate="2023-07-23T17:40:02.017" LastActivityDate="2023-11-04T02:21:53.747" Title="How does one overcome &quot;Computer Science Learning Plateau&quot;?" Tags="|self-learning|" AnswerCount="3" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7830" PostTypeId="2" ParentId="7829" CreationDate="2023-07-22T14:18:48.620" Score="2" Body="&lt;p&gt;I'm not sure what you're asking, really.  Choose one of the topics that is most interesting and begin there, and then absolutely commit to spending time with it regularly.&lt;/p&gt;&#xA;&lt;p&gt;If it were me, I'd use an online course (such as the ones that MIT, Harvard, or CMU post) to get going, and supplement that with an approachable textbook and resources such as StackExchange, YouTube, and ChatGPT to help when the inevitable confusions arise.&lt;/p&gt;&#xA;&lt;p&gt;The best textbooks for this purpose also come with exercises, though make sure that at least some answers are in the book (or posted elsewhere) so that you can get a sense of how well you're doing.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-07-22T14:18:48.620" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7831" PostTypeId="2" ParentId="7829" CreationDate="2023-07-24T10:28:36.807" Score="3" Body="&lt;p&gt;IMHO, you have not &amp;quot;identified your bottleneck&amp;quot;. You have found out that the field of CS is a very broad one, and that there are quite some sub-fields you haven't mastered (yet).&lt;/p&gt;&#xA;&lt;p&gt;Let me tell you that you're not alone, that probably nobody in the CS field covers all the subjects you mentioned, and that's perfectly okay.&lt;/p&gt;&#xA;&lt;p&gt;It is good to have a rough understanding of most of these fields, but you need to concentrate on just one subject and become fluent there, be it Operating Systems, Compilerts, Databases, IT Security, Artificial Intelligence, Embedded Control Systems or whatever. You should base that decision on your preferences, capabilities and of course the job market.&lt;/p&gt;&#xA;&lt;p&gt;If you feel attracted to Electronics, then embedded control systems might be a way to go. There aren't too many developers out there capable of understanding both worlds, the electronics hardware and software development, so it might be an interesting niche.&lt;/p&gt;&#xA;&lt;p&gt;What are your plans for the future?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you want to add some more steps of formal education, look for an institution offering appropriate courses or programs, covering the specializations that are of interest to you. But you already have a degree, so do you think the new one will significantly improve your chances of getting a job, and not be a waste of time?&lt;/li&gt;&#xA;&lt;li&gt;If you want to get employed as a software developer, start applying for jobs now, and in parallel, start some project of your own (or contribute in an open source one), so you get experience in bigger projects instead of small exercises, something that can be a door opener (&amp;quot;I'm one of the main contributors to &amp;quot;).&lt;/li&gt;&#xA;&lt;li&gt;If you want to start a freelancer career, find some unique selling point, some specific experience, something that distinguishes you from the millions of other developers. And again, experience in handling bigger projects will be important.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-07-24T10:28:36.807" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7832" PostTypeId="1" AcceptedAnswerId="7833" CreationDate="2023-07-24T11:52:58.743" Score="0" ViewCount="42" Body="&lt;p&gt;Unable to find out how the C-language lexical analyzer would tokenize the declaration of a static array.&#xA;Say, int i[3]= {1,2,3};&lt;/p&gt;&#xA;&lt;p&gt;The lexical analyzer would need to differentiate between just an integer identifier i, and a static array of size 3.&lt;/p&gt;&#xA;&lt;p&gt;Am confused how the lexical analyzer would make tokens.&lt;/p&gt;&#xA;&lt;p&gt;Tried Holub's book, among others, but couldn't find anything.&lt;/p&gt;&#xA;" OwnerUserId="13661" LastActivityDate="2023-07-24T13:15:36.950" Title="C language tokenizer output for static integer array" Tags="|compiling|" AnswerCount="1" CommentCount="2" ClosedDate="2023-07-25T00:05:21.583" ContentLicense="CC BY-SA 4.0" />
  <row Id="7833" PostTypeId="2" ParentId="7832" CreationDate="2023-07-24T13:15:36.950" Score="1" Body="&lt;p&gt;Generally speaking a lexer (tokenizer) isn't concerned with semantics, only with classifying symbols, so i is just an &lt;em&gt;identifier&lt;/em&gt; without meaning. It is the semantic analysis that connects the symbols with meaning. So, in the lex analysis no &amp;quot;distinguishing&amp;quot; needs to be done and generally won't be (can't be) if the tokenizing is single pass without backtracking. When i is analyzed, even the left bracket hasn't yet been considered.&lt;/p&gt;&#xA;&lt;p&gt;It is possible, of course, to combine lex analysis (words) and semantic (meaning) analysis but it isn't normally done.&lt;/p&gt;&#xA;&lt;p&gt;At the end of lexical analysis you have a list of all of the symbols in the program, those known (int, say) and those user defined, such as identifiers.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-07-24T13:15:36.950" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7834" PostTypeId="1" CreationDate="2023-07-24T17:29:35.693" Score="2" ViewCount="34" Body="&lt;p&gt;Any detailed video lecture series which explains each component of the modern Linux memory management subsystem in great detail, with code walk-through, and good slides?&lt;/p&gt;&#xA;" OwnerUserId="9124" LastActivityDate="2023-07-24T17:29:35.693" Title="A video lecture series which explains the modern linux memory management subsystem in detail with code walk through" Tags="|resource-request|operating-systems|linux|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7839" PostTypeId="2" ParentId="7825" CreationDate="2023-07-29T10:13:18.737" Score="2" Body="&lt;p&gt;Learning the algebraic nature of SQL will certainly help you master it.&lt;/p&gt;&#xA;&lt;p&gt;A number of warnings though.&lt;/p&gt;&#xA;&lt;p&gt;First, &amp;quot;relational algebra&amp;quot; when referred to in the academic sense - typically meaning the theory as devised by EF Codd across the 1970s - does not fully correspond to SQL today or explain all parts of it.&lt;/p&gt;&#xA;&lt;p&gt;It is better to think of SQL as based upon or inspired by Codd's original work. My own opinion nowadays is that SQL also draws some conceptual inspiration from the work of KE Iverson and his language APL - a colleague of Codd's at IBM. At any rate, we are several decades along now.&lt;/p&gt;&#xA;&lt;p&gt;Second, even when Codd's relational algebra is being taught, it often isn't taught well in my opinion.&lt;/p&gt;&#xA;&lt;p&gt;Codd's own writings are probably the best sources on Codd, but they are relatively brief and clearly speak to expert computer scientists who would have understood a great deal tacitly - I don't know how someone unfamiliar with SQL would fare in interpreting them.&lt;/p&gt;&#xA;&lt;p&gt;Another more particular problem about Codd's RA is that it is often not taught well in a way that actual or would-be SQL practitioners would find useful, and will often make claims about RA which are false and misleading about SQL.&lt;/p&gt;&#xA;&lt;p&gt;Most prominent amongst these, in my opinion, are the claims that SQL works with sets, and that those sets are (by definition) unordered. In fact, SQL works with so-called &amp;quot;bags&amp;quot; or &amp;quot;multi-sets&amp;quot; from a theoretical perspective, and the stored data is very often ordered but SQL operators are lax and inconsistent about preserving a particular order (in ways that defy simple summary, and for reasons that require deep explanation).&lt;/p&gt;&#xA;&lt;p&gt;Third, there are dialectical differences between different SQL engines and vendors. These dialectical differences can concern both syntax and actual functionality.&lt;/p&gt;&#xA;&lt;p&gt;There are also a number of operators in modern SQL which have no real analogy at all in Codd's RA, but do fit better into the more general framework of Iverson.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-07-29T10:13:18.737" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7841" PostTypeId="1" CreationDate="2023-07-31T06:31:41.073" Score="1" ViewCount="40" Body="&lt;p&gt;When testing software, does people prove some part of the program to work as they want like mathematicians prove their methods to be correct?&lt;/p&gt;&#xA;" OwnerUserId="13679" LastActivityDate="2023-07-31T10:02:15.150" Title="Can one prove a part of the program to be correct rather than test it?" Tags="|mathematics|unit-testing|" AnswerCount="1" CommentCount="3" ClosedDate="2023-07-31T13:34:32.287" ContentLicense="CC BY-SA 4.0" />
  <row Id="7842" PostTypeId="2" ParentId="7841" CreationDate="2023-07-31T10:02:15.150" Score="1" Body="&lt;p&gt;Yes, in theory, but not in practice.&lt;/p&gt;&#xA;&lt;p&gt;The problem is that a &amp;quot;proof&amp;quot;, like a program, might be flawed.&lt;/p&gt;&#xA;&lt;p&gt;Some things, however, aren't amenable to proof if they depend on things that can't be controlled (race conditions, for example). Modern hardware is much more complex than simple models imply.&lt;/p&gt;&#xA;&lt;p&gt;Don Knuth once said of an algorithm: &amp;quot;Beware of bugs in the above code; I have only proved it correct, not tried it.&amp;quot;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;In theory, theory is the same as practice, but not in practice.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-07-31T10:02:15.150" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7843" PostTypeId="1" AcceptedAnswerId="7844" CreationDate="2023-07-31T12:24:53.043" Score="0" ViewCount="161" Body="&lt;p&gt;Why do many CS students and researchers write their publications with LaTeX although it is much heavier than wkhtmltopdf?&lt;/p&gt;&#xA;" OwnerUserId="13681" LastActivityDate="2023-11-04T01:55:21.630" Title="Why is LaTeX so popular when writing papers?" Tags="|latex|" AnswerCount="3" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7844" PostTypeId="2" ParentId="7843" CreationDate="2023-07-31T18:01:56.047" Score="0" Body="&lt;p&gt;Journals, conferences want a 'house look' ie fonts, spacing, columns etc.&lt;/p&gt;&#xA;&lt;p&gt;So they typically&#xA;&lt;strong&gt;mandate&lt;/strong&gt; Latex ... yes with some latitude. So they may say: For MSWord authoring use xyz, for Latex use abc. The xyz/abc specs being quite detailed.&lt;/p&gt;&#xA;&lt;p&gt;See for example the &lt;a href=&quot;https://www.ieee.org/conferences/publishing/templates.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;IEEE recommended template&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;PS Count me among the people that suffer Latex but the html,css,JS morass is inarguably worse!&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2023-08-01T00:35:11.933" LastActivityDate="2023-08-01T00:35:11.933" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7845" PostTypeId="1" AcceptedAnswerId="7850" CreationDate="2023-08-01T02:55:13.580" Score="0" ViewCount="66" Body="&lt;p&gt;Request to vet the evaluation for given two grammars, handling&#xA;arithmetic expressions, having two precedence classes of operators:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;addop= {+,-}, mulop = {*,/}, &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;such that:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;precedence(mulop) &amp;gt; precedence (addop)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;My intent to introduce this example was to show how the C compiler, uses the &lt;em&gt;left-to-right associativity&lt;/em&gt; to process a smallish arithmetic expression, as shown below:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;200+300+400-50*10/5*2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Also, wanted to show the same expression processed under right-to-left associativity.&#xA;This was to give a suitable small (&lt;em&gt;though irrelevant example, as the C compiler follows only left-to-right associativity for these four operators&lt;/em&gt;) example, as the C compiler also has many operators where right-to-left associativity is followed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;But, still have to search for good examples for those operators, as well as to search for different examples, for more levels of precedence , than just two; as the C-compiler has 15 levels of precedence.&#xA;Hence, request for sources for the same too.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;For the case of left-to-right associativity, have a small parsing grammar:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;expr -&amp;gt; expr + term | exp - term | term&#xA;term -&amp;gt; term * factor | term / factor | factor&#xA;factor -&amp;gt; factor digit | digit&#xA;digit -&amp;gt; 0|1|2|...|9&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This grammar is also fit for BUP (bottom-up parsing), as left recursion is not a problem for BUP.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Though not needed, but it gels in the class to state that, the C-compiler is based on BUP.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the absence of latex skills, to draw binary trees; have shown the similar effect, by the order imposed by the enclosing parenthesis:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;((200+300)+400)-(((50*10)/5)*2))&#xA;=&amp;gt; 900 - ((100)*2)&#xA;=&amp;gt; 700&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Right-to-left associativity&lt;/strong&gt;&#xA;The corresponding grammar is:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;expr -&amp;gt; term + expr | term - expr | term&#xA;term -&amp;gt; factor * term | factor / term | factor&#xA;factor -&amp;gt; digit factor | digit&#xA;digit -&amp;gt; 0|1|2|...|9&#xA;&#xA;((200+(300+(400-((50*(10/(5*2)))))&#xA;=&amp;gt; ((200+(300+(400-((50)))&#xA;=&amp;gt; 850&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="13661" LastEditorUserId="13661" LastEditDate="2023-08-01T06:07:34.363" LastActivityDate="2023-08-06T11:47:39.927" Title="Processing of arithmetic expressions, under both types of associativity" Tags="|compiling|" AnswerCount="1" CommentCount="9" ClosedDate="2023-08-11T11:42:16.510" ContentLicense="CC BY-SA 4.0" />
  <row Id="7846" PostTypeId="2" ParentId="7843" CreationDate="2023-08-01T15:55:24.060" Score="1" Body="&lt;p&gt;I think this &lt;a href=&quot;https://info.arxiv.org/help/faq/whytex.html#&quot; rel=&quot;nofollow noreferrer&quot;&gt;webpage on arXiv&lt;/a&gt; might help you get perspective on why LaTeX is valued by the academic and research community.&lt;/p&gt;&#xA;&lt;p&gt;Then on this &lt;a href=&quot;https://info.arxiv.org/help/submit.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;arXiv page&lt;/a&gt; you find this wording:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Our goal is to store articles in formats that are highly portable and stable over time. Currently, the best choice is TeX/LaTeX.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;And when one looks at the mirror image &lt;em&gt;crank&lt;/em&gt; website vixra.org, you notice that very few of these authors use LaTeX!&lt;/p&gt;&#xA;&lt;p&gt;Then of course for computer scientists, LaTeX is the brainchild of the preeminent computer scientist Donald Knuth.&lt;/p&gt;&#xA;" OwnerUserId="12804" LastEditorUserId="12804" LastEditDate="2023-08-01T16:43:52.897" LastActivityDate="2023-08-01T16:43:52.897" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7847" PostTypeId="2" ParentId="7809" CreationDate="2023-08-02T15:34:44.610" Score="1" Body="&lt;p&gt;Without doxxing myself, I want to tell I was one of the guy who asked a question.&lt;/p&gt;&#xA;&lt;p&gt;I will tell you exactly why I ended up like that:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;IMO part of programming which is problem solving, you need to be grow with. I didn't say born with but grow with. It is not something a 4 year degree can teach to everyone.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We were taught too many courses in college. I studied computer engineering and we had 7-8 subjects per semester worth 100 marks of theory and 25-50 marks of practical. I really didn't know what the hell was that. I was learning literally nothing like that. Exams used to be 1 month(too much gap during exam) and semester used to be max 90 days and classes used to be around 30 days.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Too few hrs taught by professors.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;0 focus in practical. We were literally given codes and asked to copy paste it and present the output. There were classes where we had to do our own research like in SQL class and (surprise surprise, I am working as a sql administrator atm...that's how much impact a college course could make).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The teaching was unprofessional. This problem is probably specific to Nepal. There is huge brain drain here and quality of teaching is horrendous. At that time, I didn't have access to udemy as there was no way to pay online in Nepal. But now I've it and it has became hell easier to learn.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;No books. This was another problem. Libraries were empty. There were only 1 book of each subjects given. There was no culture of studying in library. I agree that I studied in a rather shittier college but I believe studying should be a norm in no matter how bad a college is.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lack of awareness among students. Lack of knowledge to &amp;quot;how to learn&amp;quot;. The mental health of students in situations like this and many. I will never end writing this. But these are the core issues.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The way to solve this problem is simple.&lt;/p&gt;&#xA;&lt;p&gt;Make exercises based curriculum, take lab exams(i.e writing code) of every subjects in computer science seriously(yes there were no lab exams in our college only theory written exams), give challenging homeworks like our sql teacher gave us, do strict plaigarism checking and so on. But I know it's never happening in my country.&lt;/p&gt;&#xA;" OwnerUserId="12544" LastActivityDate="2023-08-02T15:34:44.610" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7848" PostTypeId="1" AcceptedAnswerId="7849" CreationDate="2023-08-04T18:04:16.830" Score="3" ViewCount="147" Body="&lt;p&gt;I took a course on web page development. The lecturer said that one should always write web pages such that validator produces no errors.&lt;/p&gt;&#xA;&lt;p&gt;I also know a person who has studied economics and business. He said that perfectionism is bad, one should do the work good enough that customer is satisfied.&lt;/p&gt;&#xA;&lt;p&gt;So what do the computer scientists teach about this? How much perfectionism is needed in programming or web development? Is it needed to write always code that follows the standards or is sometimes nonperfect code acceptable?&lt;/p&gt;&#xA;" OwnerUserId="13696" LastActivityDate="2023-08-28T08:54:19.900" Title="Should a programmer always write code that validator produces no errors?" Tags="|programming|" AnswerCount="4" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7849" PostTypeId="2" ParentId="7848" CreationDate="2023-08-05T11:55:16.470" Score="3" Body="&lt;p&gt;This depends on the purpose of the code. If it is code for your own use and you can accept and tolerate errors then being a bit sloppy about correctness is fine.&lt;/p&gt;&#xA;&lt;p&gt;But for public facing code, such as that supporting a web site all care should be taken to eliminate errors other than things like simple spelling errors in user facing text. But if the code supports the behavior of the site then it should be as error-free as you can make it. But even those simple spelling errors have an effect on your reputation.&lt;/p&gt;&#xA;&lt;p&gt;The analogy with economics/business doesn't hold up as those are human endeavors with the possibility of divergent views about what is correct and so &amp;quot;perfection&amp;quot; is only in the eyes of one beholder. Programming, on the other hand, is a technical pursuit in which the standards are much clearer.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, errors in a web site can potentially open the site and its underlying servers to attack. This would be especially important if any user identifiable information is maintained on the server, but also if you desire continued operation under your own control.&lt;/p&gt;&#xA;&lt;p&gt;If a validator indicates errors then you should determine why and how to correct them. Being sloppy about accepting errors has cost people and companies both in money and in reputation. Get it right.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="204" LastEditDate="2023-08-28T08:47:57.480" LastActivityDate="2023-08-28T08:47:57.480" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7850" PostTypeId="2" ParentId="7845" CreationDate="2023-08-06T11:47:39.927" Score="1" Body="&lt;p&gt;the examples you gave are correctly parenthesized w.r.t. the associativity of the two grammars and the evaluation order is correct. Consequently, results are correct as well.&lt;/p&gt;&#xA;&lt;p&gt;You can try this yourself employing &lt;code&gt;GOLD Parser Builder&lt;/code&gt; (it is available for free), it is a simple but intuitive BUP compiler-compiler that let's you specify a grammar, parse some input string and see:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;the reduction order,&lt;/li&gt;&#xA;&lt;li&gt;the corresponding derivation tree.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Inspecting it, you will reach the same conclusion.&lt;/p&gt;&#xA;" OwnerUserId="13703" LastActivityDate="2023-08-06T11:47:39.927" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7851" PostTypeId="1" AcceptedAnswerId="7852" CreationDate="2023-08-08T13:17:56.290" Score="3" ViewCount="148" Body="&lt;p&gt;I'm having trouble succesfully teaching integration to trainee that are not from a computer science background.&lt;/p&gt;&#xA;&lt;p&gt;Basically they have a training of 3 months around C/C++/Python/Software Testing/Electronics and the part where I'm training them: embedded linux.&lt;/p&gt;&#xA;&lt;p&gt;As you might have already guessed they don't have that much time to consolidate their knowings so  when they arrive to my 5 day training on Embedded Linux they don't know much about compilation, Makefile, CPU architecture or even Linux.&lt;/p&gt;&#xA;&lt;p&gt;The subject I'm giving them is to develop C program that will read an I2C sensor using a real boards and sensors (not raspberry pi, real industrial eval boards). Once the software is developped we are integrating it using Yocto (basically an Embedded Linux distribution generator).&lt;/p&gt;&#xA;&lt;p&gt;Even given their initial low level, they end up going through the training, it's very hard for them of course but we get there, so it's definitevely in their reach.&lt;/p&gt;&#xA;&lt;p&gt;The problem I'm facing is that they are not very happy about what they did because of all the suffering that was needed, but I don't really know how to introduce small victory without giving them every thing and keeping them from learning stuff.&lt;/p&gt;&#xA;&lt;p&gt;Besides the introduction on Linux, Yocto, CPUs, compilation I'm giving the first day, I'm also giving them high level instructions to guide them through their learning and of course my full support during the session.&lt;/p&gt;&#xA;&lt;p&gt;My high level instructions are more like a plan for example : develop a Hello World, cross compile it, bring it on target (using scp), integrate it using Yocto, plug in the sensor (read the schematic of the board to find the proper GPIO), use i2ctools to detect the sensor on target, read a simple register on the target using C, read the temperature, write a proper userspace application ...&lt;/p&gt;&#xA;&lt;p&gt;During the session if they are blocked on a problem I'll give them some help and/or proper documentation. Plus of course I walk around the room asking if any one needs help and I ask them questions about what they are currently doing.&lt;/p&gt;&#xA;&lt;p&gt;So what I'm really wondering is how to make them being satisfy with what they have achieves even if that was hard.&lt;/p&gt;&#xA;&lt;p&gt;With embedded systems it's true that most of the time you're struggling because you have partial informations, because your system is not standard or even because you're knowledge is not enough for the task at hand, so in the end you are always in the dark until you figured out all your problems and voilà it works you're supposed to be satisfied. How can I help them while they are in the dark and guide them through that final satisfaction that they seems to be completely missing?&lt;/p&gt;&#xA;&lt;p&gt;How would you guide them so that they are satisfied about their learning without first showing (even partially) the answers? For example I rather have them write the worst buggy piece of code before telling them &amp;quot;may be we should refactor your code with init functions write functions and so on so that we know what piece of it is problematic&amp;quot;, instead of directly giving them a template with a structured code and empty function. I think it's a good thing to learn through errors mostly in that kind of context where it's safe to fail.&lt;/p&gt;&#xA;&lt;p&gt;How do you guys handle that kind of situation ?&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="1213" LastEditDate="2023-09-25T08:18:58.783" LastActivityDate="2023-09-26T22:01:25.660" Title="How to teach hardware-software integration to new developers?" Tags="|programming|student-motivation|compiling|industry-training|linux|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7852" PostTypeId="2" ParentId="7851" CreationDate="2023-08-08T19:14:22.663" Score="6" Body="&lt;p&gt;Why are you making them reinvent everything?  I know that there are people who believe that you learn more powerfully if you generate everything yourself, but I do not believe that research backs that position.  The approach of giving absolutely nothing often leads to muddy understandings, and sometimes even to trauma (extreme frustration) that dissuades further exploration.&lt;/p&gt;&#xA;&lt;p&gt;If you want an excellent breakdown of what is known about how we learn, take a look at &lt;a href=&quot;https://nap.nationalacademies.org/catalog/24783/how-people-learn-ii-learners-contexts-and-cultures&quot; rel=&quot;nofollow noreferrer&quot;&gt;How People Learn ii&lt;/a&gt; - this no-nonsense volume walks through what we know about learning (meaning what results are solid and thoroughly supported by multiple research studies and multiple researchers over time), as well as compelling ideas that are (at least for now) less supported, and takes pains as well to point out ideas that have been overturned.&lt;/p&gt;&#xA;&lt;p&gt;We do not learn things deeply on our first brush with a topic.  We learn deeply through repeated exposure and by examining simple, known ideas in new light, thereby interconnecting it with other topics and allowing us to boil the essence of an idea into a more abstract form.  That's why many teachers arrange their curricula into something of a spiral, where you go over the same material, but more deeply, at each pass.&lt;/p&gt;&#xA;&lt;p&gt;I would highly recommend scaffolding over multiple activities rather than forcing students to do everything from scratch.  With scaffolding, the general process is &amp;quot;I do, we do, you do.&amp;quot;  So, you begin by demonstrating something, then there are various levels of mixed activities while they work with progressively less support, and finally finishes with the students able to utilize the learning goals independently.  This provides more reliable learning, but with comparatively little trauma.&lt;/p&gt;&#xA;&lt;p&gt;To give deeper understanding, make sure that later activities utilize the skills of the prior activities.  That will allow your students to keep revisiting the old ideas in new light, which will help with encoding (through repetition) and abstraction (through exposure in different context or in different ways.)&lt;/p&gt;&#xA;&lt;p&gt;There are limits to what you can teach in just three days, but you can make sure that a few core ideas are learned well, and that your trainees have a toolkit of less deeply understood techniques that they can use to get by while they continue to learn in the field.&lt;/p&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2023-08-23T20:49:30.153" LastActivityDate="2023-08-23T20:49:30.153" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7854" PostTypeId="2" ParentId="7848" CreationDate="2023-08-09T20:46:52.917" Score="4" Body="&lt;p&gt;I would say that this is cultural decision rather than an objective one. It really doesn't matter that much when you're working alone on a small project that no one's livelihood depends on. But when you're working with people over a long period of time, and there are real stakes to errors or loss of productivity, this becomes an important decision. And in this sense, for a long-term project, I would define 'yourself in 6 months' as a different person.&lt;/p&gt;&#xA;&lt;p&gt;I would agree that perfectionism as such is bad, but that's almost a tautology, since the word &amp;quot;perfectionism&amp;quot; has negative connotations. The term I'd recommend instead is &amp;quot;pragmatism&amp;quot;, which I'd define as such - we want to build our systems in such a manner that will provide the most long-term benefit for the least effort.&lt;/p&gt;&#xA;&lt;p&gt;This is clearly a tradeoff, and the particular point on this scale which we would consider &amp;quot;pragmatic&amp;quot; will vary strongly between projects. For example, when you're looking to build a web application to quickly capture an emerging market, you should absolutely &amp;quot;move fast and break things&amp;quot;, since the benefit from the system depends so strongly on time-to-market, and in any case, the code is likely to be rewritten many times, as you iterate on the product to find that elusive &amp;quot;product-market fit&amp;quot;. But on the other hand, if you're coding for a space mission, and you know that any code change after launch, if even possible, would have a non-negligible likelihood of bricking the system and causing a hundred million dollar loss, pragmatism will absolutely lean towards dealing with every single validator issue.&lt;/p&gt;&#xA;&lt;p&gt;In general, in every project, this should be a conversation between all stakeholders, on &amp;quot;what pragmatism means to us&amp;quot;. Or in other words, which types of issues we are willing to live with, and which types of issues are high-risk and likely to cause us more trouble later than the cost of dealing with them early. And then once the decision is made, I would encourage the team to put that into code as linter settings (preferably in a shared pre-commit hook in the source control system). These linter settings would define which types of issues will block a change from being integrated, and which ones are actually ok. And even then, teams can decide to &amp;quot;silence&amp;quot; a particular linter issue, but that would then need to be an explicit decision.&lt;/p&gt;&#xA;&lt;p&gt;To sum up and circle back to your question, this is the manner in which I would teach this - the value of validator/linter warnings is a cultural issue for a particular team working on a particular project, which aims to pragmatically reduce the risk of project failure and wasted effort, and should be defined as code itself, which can then evolve as the project itself evolves.&lt;/p&gt;&#xA;" OwnerUserId="2119" LastActivityDate="2023-08-09T20:46:52.917" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7855" PostTypeId="2" ParentId="7848" CreationDate="2023-08-10T13:28:40.373" Score="1" Body="&lt;p&gt;As others already said, it highly depends on context: If your company specializes in prototypes and proof-of-concept, perfection (in certain aspects) is unnecessary and not productive. If you can fix a rare error by turning it off and on again it, why spend weeks or months debugging that one special case.&#xA;Of course, you can't do that everywhere, think planes, medical devices, power plant etc.&lt;/p&gt;&#xA;&lt;p&gt;Let's have a closer look at the statement &amp;quot;perfectionism is bad, one should do the work good enough that customer is satisfied&amp;quot;. On the surface it seems like a reasonable statement, why do more work than necessary? If you look a bit closer, you'll see that it doesn't hold up or is too simplified to be useful:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;First of all, what if &amp;quot;the customer&amp;quot; demands perfection? For example, in regulated fields like medical or aviation, you have to deliver (close to) perfect code, otherwise you just don't get approved.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Then, there is a number of companies who are quite successfully distinguishing themselves from their competitors by not just being good enough but as close to perfect as possible. (And others don't even satisfy the customers needs but the product is so cheep that no one complains).&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Software engineering is also notorious for having a large discrepancy between what a customer 'wants' and what a customer 'needs', so using customers as requirement engineers &lt;em&gt;might&lt;/em&gt; backfire. (If you customer says he needs 'Blockchain' or 'AI', there is a high chance that he &lt;em&gt;actually&lt;/em&gt; needs to be laughed at). You as the developer should do the cost/benefit etc. analysis of what level of perfection is required.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Only looking at the end product, fails to see the whole picture. You can develop a product in two ways: First-time-right or a number of iterations. Both might lead to the same result, but the way there may differ vastly depending on the cost of each iteration, number of iterations and the cost to actually get it right on the first try.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So back to education, what is being taught (from my experience)? Perfection would be nice, but usually not achievable. There is no such thing as a bug free software, and then teach you methods to try and reduce number of bugs. There is also the mandatory &amp;quot;cost to fix a bug increases exponentially over time&amp;quot;-slide, indication to fix your bugs as early as possible. But what if your software is never intended to reach a maintenance state? Then you have the type of error or warning. If my 5000 lines of C code compile with 2 warnings, I will make very sure to get rid of these warnings or make sure they are REALLY not a problem. If my 50 lines of Verilog produce 200 Warnings, I don't actually care.&lt;/p&gt;&#xA;&lt;p&gt;TLDR: My teachers have taught me and I always told others &amp;quot;well, it depends..&amp;quot;&lt;/p&gt;&#xA;" OwnerUserId="11138" LastActivityDate="2023-08-10T13:28:40.373" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7857" PostTypeId="2" ParentId="7809" CreationDate="2023-08-18T00:55:08.903" Score="5" Body="&lt;p&gt;You can replace &amp;quot;Computer Science Degree&amp;quot; with &amp;quot;Coding boot camp&amp;quot; or &amp;quot;Software engineering degree&amp;quot; and you have the same problem. New graduates do not have the experience to make them as productive as someone with 20 years of experience. I have about 20 years of experience now. When I think back to what I was like 20 years ago, it's pretty amazing how far I've come. Things that I struggled with for days and even weeks are almost like muscle memory now.&lt;/p&gt;&#xA;&lt;p&gt;This is natural.&lt;/p&gt;&#xA;&lt;p&gt;This topic has been a burning thorn in my side for years. I've hired people. I've put together teams, trained, mentored. Almost every project I've ever been on has been a near panic to get done. There is a tremendous amount of pressure on developers to produce because we are typically paid more than the average worker, and by the time we put fingers to keyboard, your customer has spent weeks to months getting things prepared. They are anxious to see progress, so they pressure us to write code quickly.&lt;/p&gt;&#xA;&lt;p&gt;This is also natural.&lt;/p&gt;&#xA;&lt;p&gt;Comparing myself now to myself 20 years ago provides some insights:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Customers were in a panic 20 years ago to build software.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Customers are still in a panic 20 years later.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The difference is now I have 20 years of experience, so I can work faster. The time pressure is less intense now.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The constant time pressure has made me a bit... stubborn. And a little cranky. Maybe this last point is irrelevant. It also might be why the pressure doesn't bother me as much anymore.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I've worked for large corporations, start-ups, and government organizations. The one common thing I've noticed is that employers expect a new college graduate to produce reems of code just like their senior developers. There is a complete mismatch between what new graduates can offer and what employers expect. Perhaps this is cultural where I'm from, but the blame gets placed on colleges for not preparing students for &amp;quot;the real world.&amp;quot; Students are also blamed because they didn't get experience before graduating college. How can students get experience when entry-level jobs require... &lt;em&gt;experience&lt;/em&gt;!?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Let's do a full stop on the topic of computer science for a moment and talk about bricklayers — people who build brick walls for an occupation. &lt;a href=&quot;https://bricklayers.org/training&quot; rel=&quot;noreferrer&quot;&gt;Apprenticeship programs&lt;/a&gt; exist to guide new workers along a journey of learning and practical experience. Classroom training is coupled with boots-on-the-ground work on real projects under the tutelage of a more experienced person. This recipe has been repeated in many occupations way before computers were invented. &lt;strong&gt;This is the missing piece in software engineering.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I used to blame colleges for lousy college graduates. This is a crap way to think about the situation. College can't get you the 3 years of experience you need to take start producing code efficiently. College provides the theoretical foundation upon which the &amp;quot;real world&amp;quot; is built. College graduates think they can't program because the can't! And they shouldn't be expected to! They haven't programmed yet!&lt;/p&gt;&#xA;&lt;p&gt;We, as employers, need to abandon the idea that college graduates are magical, mythical beings who don't need to &lt;a href=&quot;https://www.norvig.com/21-days.html&quot; rel=&quot;noreferrer&quot;&gt;bang their heads on 10,000 little problems for 10 years&lt;/a&gt;. I keep hearing about a shortage of programmers, but there is no shortage of people applying for these jobs with computer science degrees. We, as &lt;em&gt;employees&lt;/em&gt;, need to stop blaming ourselves and our colleges. It takes time to learn programming no matter which college you went to or which degree you got.&lt;/p&gt;&#xA;&lt;p&gt;The software development industry has a complete lack of organization to build up it's own workforce. College graduates cannot be blamed for this. Colleges cannot be blamed for this. Our perspective on this problem is all wrong. Until employers recognize the need for apprenticeship-style work experiences, we will always have a &amp;quot;shortage&amp;quot; of developers, and college graduates will always feel laughably inadequate for their first programming job. That being said, software engineering apprenticeships are becoming a real thing now, and it's about time.&lt;/p&gt;&#xA;&lt;p&gt;I should get off my soapbox now. It's getting late.&lt;/p&gt;&#xA;" OwnerUserId="5110" LastActivityDate="2023-08-18T00:55:08.903" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7858" PostTypeId="2" ParentId="7734" CreationDate="2023-08-19T11:54:28.350" Score="1" Body="&lt;p&gt;Surely the main challenge is allowing the situation to be appreciated by word and by touch?&lt;/p&gt;&#xA;&lt;p&gt;I'm not well-informed in the issue, but I assume blind students still have a mental representation of space and time, and can in principle read and appreciate any diagrams in which all encoded information has a 3D representation (such as embossed paper, texture variations, and so on).&lt;/p&gt;&#xA;&lt;p&gt;I also assume they can write and (especially) draw, given suitable tooling.&lt;/p&gt;&#xA;&lt;p&gt;Obviously also, you're dealing with someone with full hearing and verbal language capacity, and who might well be quite skilled at absorbing verbal explanations which most people would prefer in written form.&lt;/p&gt;&#xA;&lt;p&gt;You'll probably also find that, where the sighted embellish diagrams systematically with colour and other intrinsically visual features, the blind are likely to find analogies in the quality of speech (or mechanically-generated noises).&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2023-08-19T11:54:28.350" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7859" PostTypeId="1" CreationDate="2023-08-21T15:15:21.560" Score="1" ViewCount="60" Body="&lt;p&gt;My son is looking to retrain in data sciences and has been researching online boot camps such as Springboard and Le Wagon. These appear to be genuine companies, but it's hard to sift through the reviews online to work out which are genuine.&lt;/p&gt;&#xA;&lt;p&gt;They both offer money back guarantees that sound great, but having read the small print I doubt they pay out often!&lt;/p&gt;&#xA;&lt;p&gt;My son is 31 years of age and has a music degree and currently teaches English in China.&lt;/p&gt;&#xA;&lt;p&gt;He is specifically interested in Python &amp;amp; data analytics having dabbled to an extent in his spare time.&lt;/p&gt;&#xA;&lt;p&gt;He thinks that the boot camps are pretty much a waste of time and that he may be better off doing an online masters in computer science.&lt;/p&gt;&#xA;&lt;p&gt;If anyone has any experience in online training and is able to offer an opinion as to how best to do so and launch yourself in a career in computer science, any views would be appreciated.&lt;/p&gt;&#xA;" OwnerUserId="13752" LastEditorUserId="13752" LastEditDate="2023-08-28T10:09:08.783" LastActivityDate="2024-03-31T15:12:46.390" Title="Online bootcamps" Tags="|self-learning|online|" AnswerCount="1" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="7860" PostTypeId="2" ParentId="7848" CreationDate="2023-08-27T21:48:24.827" Score="2" Body="&lt;ul&gt;&#xA;&lt;li&gt;Web-browsers vary when processing code that is not valid.&lt;/li&gt;&#xA;&lt;li&gt;Web-browsers have varying quirks.&lt;/li&gt;&#xA;&lt;li&gt;Web-browsers are lax at telling you that the code is not valid.&lt;/li&gt;&#xA;&lt;li&gt;You have no control on which web-browser your users use.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;More generally,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Adding more code to a working but not correct code base can break it in unpredictable ways. This can take a long time to find the cause and fix.&lt;/li&gt;&#xA;&lt;li&gt;Running the validator is cheep, or can be (hook automated tests on to save or commit: the earlier the better).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Therefore, run your code through a validator.&lt;/p&gt;&#xA;&lt;p&gt;Or hire a very large technical support team to take customers phone calls, and to tell them to use xxxxxxxxx web-browser. And, allocate more time/people(beware &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Mythical_Man-Month&quot; rel=&quot;nofollow noreferrer&quot;&gt;MMT&lt;/a&gt;) to write the code.&lt;/p&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2023-08-28T08:54:19.900" LastActivityDate="2023-08-28T08:54:19.900" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7861" PostTypeId="1" CreationDate="2023-09-01T16:28:19.090" Score="4" ViewCount="143" Body="&lt;p&gt;So to elaborate I am what I consider an intermediate level software developer.&lt;/p&gt;&#xA;&lt;p&gt;I have worked as a web-developer for 3-4 years. I worked mainly on front end projects before I started my current job as a software developer.&lt;/p&gt;&#xA;&lt;p&gt;I have been at my present position for 4-5 years.&lt;/p&gt;&#xA;&lt;p&gt;I make plugins for an engineering firm.&lt;/p&gt;&#xA;&lt;p&gt;At this point, I have made and am actively maintaining about 40+ python repositories.&lt;/p&gt;&#xA;&lt;p&gt;I have been tasked with creating a free-standing desktop tool for employees in the company to sign their work. Let us call it the &lt;em&gt;&lt;strong&gt;signer project&lt;/strong&gt;&lt;/em&gt;. The goal of the &lt;em&gt;&lt;strong&gt;signer project&lt;/strong&gt;&lt;/em&gt; is to better estimate the progress and time consumption of our projects.&lt;/p&gt;&#xA;&lt;p&gt;On the &lt;em&gt;&lt;strong&gt;signer project&lt;/strong&gt;&lt;/em&gt;, I have done the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I created the data-base&lt;/li&gt;&#xA;&lt;li&gt;created a Login.&lt;/li&gt;&#xA;&lt;li&gt;created the record-Handler&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For all intents and purposes, the project does what it is supposed to do. However, the project is not good.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is slow&lt;/li&gt;&#xA;&lt;li&gt;The user-interface (UI) freezes all the time&lt;/li&gt;&#xA;&lt;li&gt;The user-interface (UI) does not update properly&lt;/li&gt;&#xA;&lt;li&gt;I can't get the loading bar to show up.&lt;/li&gt;&#xA;&lt;li&gt;I can't figure out multithreading for the life of me.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It is a barely functional mess.&lt;/p&gt;&#xA;&lt;p&gt;I am clearly out of my league and need more training.&lt;/p&gt;&#xA;&lt;p&gt;I'm working my masters degree but the program is severely outdated, purely theoretical and isn't teaching me anything new or significant.&lt;/p&gt;&#xA;&lt;p&gt;I don't have mentors at work I'm the first and only programmer in the company.&lt;/p&gt;&#xA;&lt;p&gt;I'm going through a million tutorials videos, documentation and textbooks and have made a lot of progress like that but the information is scattered and fragmented.&lt;/p&gt;&#xA;&lt;p&gt;Is this really the best way to learn this? Are there any independent companies or training academies that could help?&lt;/p&gt;&#xA;" OwnerUserId="13788" LastEditorUserId="13300" LastEditDate="2023-12-13T14:31:21.593" LastActivityDate="2023-12-13T14:31:21.593" Title="I'm an intermediate level developer trying to level up my skill set what resources could I use to do so?" Tags="|industry-training|" AnswerCount="4" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7862" PostTypeId="2" ParentId="7861" CreationDate="2023-09-02T06:22:32.260" Score="3" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;But its a piece of shit. Its slow, the UI freezes all the time and doesn't update properly, [...]. its a barely functional mess.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This sounds like a highly typical, possibly above-average software product. Most apps are lucky to &amp;quot;do what they're supposed to&amp;quot;, and if they do, then they probably cost 10 times more than the estimate or took 5 times longer than expected to build.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I'm [...] an intermediate level [...] software dev clearly out of my league&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You're probably much better at software engineering than you think--you have almost a decade of professional experience across the full stack, plus Master's level theoretical knowledge and a clear drive to improve. Since you're in the job and have written the app, not to mention 40 plugins, you're probably in your league as much as anyone. You may have impostor syndrome (I do too).&lt;/p&gt;&#xA;&lt;p&gt;If you haven't received serious direct negative feedback, your shortcomings may only be visible to yourself. If you have received negative feedback, you could ask the person giving feedback for actionable details and use that as a guide. Or, if it's just one person's opinion, they might be overly harsh. Some managers are tough even when their reports deliver above-average work.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I'm going through a million tutorials videos, documentation and textbooks and have made a lot of progress like that but the information is scattered and fragmented...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Yes, most information is cobbled together. Software and software engineers are imperfect--we're all pretty much hacking away at crumbling monoliths of garbage in various stages of decay, grafting on new features in an ad-hoc basis and ultimately having to throw it out or pass it on to the next unlucky team of engineers. Most documentation, tutorials and resources are narrow-perspective attempts at making sense of the mess, or pitch promising philosophies that fall apart when applied to real projects.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;is this really the best way to learn this?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'd say so. You're learning by experience, working on an actual product that has users. That's the best education you can ask for, at least for whatever skill set your job demands.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Are there any independent companies or training academies that could help?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Perhaps, but don't expect any silver bullets. I'd be wary of training academies and bootcamps. Most of the ones I've seen are fine, but as always, you get what you put in, and nothing is a one-stop-shop. There's a profit motive, instructors are overworked and some students cheat their way through, wasting their opportunities.&lt;/p&gt;&#xA;&lt;p&gt;I provide 1:1 programming mentorship as a side gig and I think my clients are the type who benefit from personalized support, but improvement is usually slow and requires a good deal of time and effort. I've never been one to pursue mentors, and maybe this attitude has held me back a bit. Personalized mentorship may be better for you than group programs (I'm not advertising my services specifically here). In my experience, personal mentorship tends to force one to confront potentially uncomfortable skill gaps.&lt;/p&gt;&#xA;&lt;p&gt;Once you're working on a product, the likelihood that training will be directly relevant to doing your immediate job is pretty unlikely, as you're probably experiencing in the Master's program. Facing the project head-on and engaging with your team, manager, reports, clients, customers and/or stakeholders, then pursuing whatever resources you need to deliver value to them seems like the best way to proceed, especially at this stage in your career.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2023-09-02T06:43:19.183" LastActivityDate="2023-09-02T06:43:19.183" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7863" PostTypeId="2" ParentId="7861" CreationDate="2023-09-03T16:29:14.923" Score="0" Body="&lt;ul&gt;&#xA;&lt;li&gt;Learn and use a revision control tool.&lt;/li&gt;&#xA;&lt;li&gt;Learn and do test driven development.&lt;/li&gt;&#xA;&lt;li&gt;Learn and almost always use functional programming (in all languages).&lt;/li&gt;&#xA;&lt;li&gt;Do deliberate practice, with feedback: Do programming katas. Do the same one every day for a week.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Bonus: Do the structure and interpretation of computer programs course. A book is available, e-book and the lecture videos are freely available online.&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-09-03T16:29:14.923" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7867" PostTypeId="1" CreationDate="2023-09-08T10:43:40.960" Score="0" ViewCount="63" Body="&lt;p&gt;Writing Quality Assurance course test scripts for software products is a critical part of ensuring the quality and reliability of the software. Test scripts are sets of instructions that QA testers follow to verify that the software functions correctly and meets its requirements.&lt;/p&gt;&#xA;" OwnerUserId="9859" LastActivityDate="2023-10-16T13:08:46.217" Title="How do I learn how to write QA test scripts for software products?" Tags="|unit-testing|" AnswerCount="1" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7873" PostTypeId="2" ParentId="7867" CreationDate="2023-09-16T12:29:59.333" Score="1" Body="&lt;p&gt;Think like the user from hell.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Check that it dose what it should. (knowledge of the spec is needed for this one)&lt;/li&gt;&#xA;&lt;li&gt;Check that you can achieve the goals of a user, easily. (user insight is needed for this one)&lt;/li&gt;&#xA;&lt;li&gt;Check that it does not break, including giving wrong results (some sort of insight of what can go wrong in the software/hardware is useful for this one).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Depending on which of the roles that you will be doing. You may benefit from:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Legal knowledge: it does not do what you want, but it meets the spec, so hand over the moneys.&lt;/li&gt;&#xA;&lt;li&gt;Business/user experience, that is having a deep knowledge of the users of the system. What task are they trying to get done. What is the easiest way to get it done.&lt;/li&gt;&#xA;&lt;li&gt;Programming experience. I would leave these tests to the programmers.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="204" LastEditorUserId="204" LastEditDate="2023-09-16T12:35:33.287" LastActivityDate="2023-09-16T12:35:33.287" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7874" PostTypeId="1" CreationDate="2023-09-16T14:06:23.780" Score="0" ViewCount="71" Body="&lt;p&gt;I've just finished reading Eric Matthes' Python Crash Course. A book which I found great to learn Python within a short time. The learning process wasn't really hard for me as I was already familiar with programming in other languages. Now I'm done with it and I've just started learning Django since the past few days. Meanwhile, I want to keep practicing Python to avoid forgetting advanced Python topics such as OOP. I've been searching and experimenting different resources these past couple of weeks. I tried some online courses covering real world projects, creating GUI with Tkinter, Implementing useful algorithms, etc. But I didn't find any of them really suitable for what I'm looking for. I even asked GPT (!) for some suggestions and I got to know some famous books such as Python Playground, Python Projects and The big book of small python projects, but I just can't stop feeling uneasy about the issue and finding a good resource for this matter to keep on working on more Python projects beside the Django learning, in order to solidify my Python knowledge and avoide forgetting anything. So I wanted to ask someone who has more experience in Python learning journy. Is there anything you guys wanna recommend me? Any advices?&lt;/p&gt;&#xA;" OwnerUserId="13823" LastActivityDate="2023-09-16T15:04:00.600" Title="How do I solidify my Python skills?" Tags="|programming|python|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7875" PostTypeId="2" ParentId="7874" CreationDate="2023-09-16T15:04:00.600" Score="3" Body="&lt;p&gt;If you want to learn Python (or anything) practice it, and not just on easy exercises. My best advice is to take on a large project, even one that you have done before in another OOP language, if that is in your skill set, and build it in Python.&lt;/p&gt;&#xA;&lt;p&gt;Even better, let someone else specify the project and give you feedback on your product. Even better, if they are a better Python programmer than you, they can give you feedback on your &amp;quot;mad skilz&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;One problem with a language like Python, when you know another language is that you might find yourself writing &amp;quot;misspelled Java&amp;quot; (or whatever). Python requires a different mindset (experience speaking as I have written books in both languages). And to by &amp;quot;pythonic&amp;quot;, if that is your goal, requires something more.&lt;/p&gt;&#xA;&lt;p&gt;But if you want to be an olympic swimmer, then you swim a lot, and not just easy splashing in the pool.&lt;/p&gt;&#xA;&lt;p&gt;Perhaps one of the books you already have suggests a large project. Even if it isn't a Python book, it might do fine. Write programs and test them. Make them correct. Make them pretty.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-09-16T15:04:00.600" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7877" PostTypeId="2" ParentId="6438" CreationDate="2023-09-18T15:06:59.580" Score="0" Body="&lt;p&gt;The next step after studying computer networks is this:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://ioesyllabus.blogspot.com/2015/05/internet-and-intranet-ct-754-syllabus.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://ioesyllabus.blogspot.com/2015/05/internet-and-intranet-ct-754-syllabus.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.raijeewan.com.np/document/NETWORKING%20WITH%20IPV6%20%20Syllabus.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.raijeewan.com.np/document/NETWORKING%20WITH%20IPV6%20%20Syllabus.pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Focus on depth of TCP IP protcols. SSH, DNS, HTTP etc each of them deserve their separate course. So, think about it.&lt;/p&gt;&#xA;&lt;p&gt;You could follow&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://rads.stackoverflow.com/amzn/click/com/B00STLTH74&quot; rel=&quot;nofollow noreferrer&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.amazon.com/Networking-Systems-Administrators-Mastery-Book-ebook/dp/B00STLTH74&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This book as well.&lt;/p&gt;&#xA;&lt;p&gt;Good luck.&lt;/p&gt;&#xA;" OwnerUserId="12478" LastEditorUserId="12478" LastEditDate="2023-09-19T00:56:16.153" LastActivityDate="2023-09-19T00:56:16.153" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7878" PostTypeId="1" CreationDate="2023-09-19T00:44:56.107" Score="0" ViewCount="93" Body="&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;For Linux System Administrator. I don't need CCNA cert. I don't need to be explicitly a network engineer. I just need to be able to troubleshoot network related issues.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Already Tried&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Googling and learning. Didn't work. I need to have a good grasp of concepts taught in college at first! No next question. Thankfully not my first time learning the college textbook on Networks.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Roadmap&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Step 1)&#xA;I don't like tanenbaum, so these are the books that I'll buy and read.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fourouzan networks&lt;/li&gt;&#xA;&lt;li&gt;Stallings networks&lt;/li&gt;&#xA;&lt;li&gt;TCP IP by philip miller book&lt;/li&gt;&#xA;&lt;li&gt;Comptia network+/A+ good book&lt;/li&gt;&#xA;&lt;li&gt;CCNA official cert guide book&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Step 2)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Networking for Systems Administrators (It Mastery)&#xA;Michael W Lucas&lt;/li&gt;&#xA;&lt;li&gt;TCP/IP Network Administration oreilly&lt;/li&gt;&#xA;&lt;li&gt;The Practice of System and Network Administration oreilly&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Step 3)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DNS and BIND oreilly&lt;/li&gt;&#xA;&lt;li&gt;Wireshark course&lt;/li&gt;&#xA;&lt;li&gt;HTTP the definitive guide, oreilly&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Critique this roadmap and add your valuable input here. If you've any books suggestions on the way, do share! If I could get apprenticeship/internship in networks, it'd be great, but I don't have one atm and I'm working as a linuxadmin. This whole would take me about 1.5 years to complete along with my job. Thus I want to know that if learning all these would be well worth it? Tell me if I can cut out some garbage here.&lt;/p&gt;&#xA;" OwnerUserId="12478" LastEditorUserId="27" LastEditDate="2023-09-19T11:31:05.063" LastActivityDate="2024-03-26T05:03:15.340" Title="Critique my roadmap to learn computer networking?" Tags="|networks|curriculum-review|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7879" PostTypeId="1" AcceptedAnswerId="7893" CreationDate="2023-09-21T07:55:32.633" Score="2" ViewCount="62" Body="&lt;p&gt;I'm planning to start university next year. I'd like to study programming and electronics, and one of the countries I'm considering for my education is Austria.&lt;/p&gt;&#xA;&lt;p&gt;Which university in Austria can you recommend for studying programming and electronics?&lt;/p&gt;&#xA;" OwnerUserId="13841" LastEditorUserId="9426" LastEditDate="2023-09-27T14:27:37.897" LastActivityDate="2023-10-09T17:52:02.683" Title="Studying electronics and programming in Austria" Tags="|student-motivation|student-perceptions|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7882" PostTypeId="2" ParentId="7851" CreationDate="2023-09-26T22:01:25.660" Score="1" Body="&lt;p&gt;Late answer, but IMO, &amp;quot;real industrial eval boards&amp;quot; that are capable of running Linux sound like overkill if the only goal is to &amp;quot;to develop C program that will read an I2C sensor.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Have you considered using something like NXP's &amp;quot;Freedom&amp;quot; line of eval boards? The big win is the IDE. Last time I used it it was Eclipse-based, and when you opened a new project, you could just select the specific board by model number from a drop-down menu, and it would configure the project for you. You just jump in writing C or C++ code, and then you build the project, program the board, and start it running in a debugger all with a single button press.&lt;/p&gt;&#xA;&lt;p&gt;The only hardware you need to program the board is a standard USB cable, But to round out the picture, you'll probably want a TTL-level serial port adapter and a terminal emulator for the development PC so that your students can interact with their programs via UART.&lt;/p&gt;&#xA;&lt;p&gt;Configuring and using the UART is just a matter of a few calls to libraries that come with the IDE. There's probably also library support for reading and writing I2C space. (You might want to either encourage them or discourage them from using that, depending on what you're trying to teach them.)&lt;/p&gt;&#xA;&lt;p&gt;The IDE was free (last time I used it). Terminal emulator software can be found for free. The boards can be had for less than $20/each (U.S.A., I don't know about where you live), and serial port adapters for about the same price.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;P.S., Similar products are available from ST Microelectronics.&lt;/p&gt;&#xA;" OwnerUserId="1269" LastActivityDate="2023-09-26T22:01:25.660" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7883" PostTypeId="1" CreationDate="2023-09-29T05:23:24.753" Score="0" ViewCount="79" Body="&lt;p&gt;database&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;navathe/elmasri&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;connally begg&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;date&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;korth&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;gehrke/ramakrishnan&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design 2nd Edition&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;database systems peter rob, coronel&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Celko&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These are the books I'm planning to purchase to learn database. (Books are really cheap in Nepal and I'm employed as Linuxadmin).&lt;/p&gt;&#xA;&lt;p&gt;I am not a fan of books though. I like video courses.&lt;/p&gt;&#xA;&lt;p&gt;I already have hands on sql experience. But I feel learning sql is the tip of iceberg of database knowledge pool.&lt;/p&gt;&#xA;&lt;p&gt;But the only decent course that I could find is this CMU course.&#xA;&lt;a href=&quot;https://www.youtube.com/watch?v=uikbtpVZS2s&amp;amp;list=PLSE8ODhjZXjaKScG3l0nuOiDTTqpfnWFf&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.youtube.com/watch?v=uikbtpVZS2s&amp;amp;list=PLSE8ODhjZXjaKScG3l0nuOiDTTqpfnWFf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;But I prefer reading 10 different books for 1 concept rather than watching 1 2 hrs video.&lt;/p&gt;&#xA;&lt;p&gt;Do you guys have any idea on other resources that I can purchase to learn database? My goal is database fundamentals, I already know sql to some extent.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://ioesyllabus.blogspot.com/2015/05/database-management-systems-syllabus.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://ioesyllabus.blogspot.com/2015/05/database-management-systems-syllabus.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is the syllabus I want to follow.&lt;/p&gt;&#xA;" OwnerUserId="12478" LastEditorUserId="12478" LastEditDate="2023-09-29T06:50:45.357" LastActivityDate="2024-02-27T17:02:25.340" Title="How to learn database management systems?" Tags="|self-learning|databases|sql|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7885" PostTypeId="2" ParentId="7883" CreationDate="2023-09-30T15:04:03.350" Score="0" Body="&lt;p&gt;You can also read the book &amp;quot;Database System Concepts&amp;quot;-  Henry F. Korth, S. Sudarshan, Abraham Silberschatz. I hope it will help you to build the database concepts and the book simply describes the concepts!&lt;/p&gt;&#xA;" OwnerUserId="13297" LastEditorUserId="13297" LastEditDate="2023-09-30T15:05:21.347" LastActivityDate="2023-09-30T15:05:21.347" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7886" PostTypeId="1" CreationDate="2023-10-04T12:40:36.447" Score="2" ViewCount="53" Body="&lt;p&gt;Sometime in the last few months here on SE I saw a link to a major language style guide that walked through the thought process of refining very short comments in code. I think it took an example verbose function-header comment and cut it down in about five phases until it was only a few words. It was for a fairly well-known language, but not C, C++, or Java (may or may not be for Python).&lt;/p&gt;&#xA;&lt;p&gt;Now I'd like to provide this to my students, but I didn't save the link. Anyone know what style guide provided this detailed walkthrough on how short a useful comment can be?&lt;/p&gt;&#xA;" OwnerUserId="8137" LastEditorUserId="8137" LastEditDate="2023-10-04T13:40:39.637" LastActivityDate="2023-10-05T11:34:32.767" Title="Style guide for short comments?" Tags="|coding-style|" AnswerCount="1" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7887" PostTypeId="1" AcceptedAnswerId="7891" CreationDate="2023-10-05T03:55:13.550" Score="1" ViewCount="101" Body="&lt;p&gt;I am a cse undergrad currently in my second year&#xA;I know C,C++ and Python.&#xA;and have basic understanding of datastructures and algos&#xA;and I am currently reading concrete maths to better understand Taocp by knuth.&lt;/p&gt;&#xA;&lt;p&gt;I want to start with assembly because I want to understand Memory management and&#xA;I have heard it makes you better at writing programs in general.&lt;/p&gt;&#xA;&lt;p&gt;I am a bit confused where to start and what resources to learn from.&#xA;I aim to read and understand Taocp&#xA;and from what I have learned so far the book uses mix and mmix assembly which are hypothetical languages used only in book.&lt;/p&gt;&#xA;&lt;p&gt;should I learn mix and continue taocp or should I learn other assembly languages and come back to taocp when I will have better understanding of programming overall.&lt;/p&gt;&#xA;&lt;p&gt;so far what I have learned is there are different assembly for different architectures of cpu. which one will be better suited for me and will learning one assembly give me overall idea and make learning other assembly relatively easy? or other assembly are completely different on their own and will take same amount of efforts?&lt;/p&gt;&#xA;&lt;p&gt;and Is learning from Taocp a realistic goal for me? will it do me any good to try to learn from it with my current knowledge? should I continue to read it, or stop and come back later and if yes when?&lt;/p&gt;&#xA;" OwnerUserId="13905" LastActivityDate="2023-10-07T11:39:48.420" Title="Learning Assembly and Taocp" Tags="|self-learning|assembly|" AnswerCount="2" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7888" PostTypeId="1" CreationDate="2023-10-05T07:54:18.243" Score="1" ViewCount="26" Body="&lt;p&gt;I'm wondering about this. LVMs are so interesting and useful, but they are very complicated for my brain. I'm pretty sure this is due to lack of my preriquisites of computer science concepts.&#xA;So, I want to learn what concepts should I learn first in order to grasp LVMs concepts effectively. Only computer science concepts. I can't afford to learn OS from start to finish, so do tell me the core concepts in order. I'll read them myself.&lt;/p&gt;&#xA;" OwnerUserId="12478" LastActivityDate="2023-10-05T07:54:18.243" Title="What operating system concepts should I be fluent with to understand LVM in UNIX operating systems?" Tags="|operating-systems|linux|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7889" PostTypeId="2" ParentId="7886" CreationDate="2023-10-05T11:34:32.767" Score="2" Body="&lt;p&gt;I've been searching around, and I found a very cool resource that may well be the one you saw.  I'm certainly going to share this with my students:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/&quot;&gt;https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The writeup is humorous as well, which I think my students will appreciate.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-10-05T11:34:32.767" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7891" PostTypeId="2" ParentId="7887" CreationDate="2023-10-06T19:55:17.020" Score="3" Body="&lt;p&gt;The Art of Computer Programming is commonly known to be a hard read and  demanding to study fully. Very few have actually done so. Many just use it as a reference to occasionally get a deep understanding of a specific subject, for example a sorting algorithm. That said, it's a very thorough work of extremely high quality.&#xA;Knuth chose a very-close-to-the-machine language because he wanted to give algorithm examples free from ambiguities as is often the case using higher level languages, if you don't know them fully.&#xA;If your primary aim is to learn assembly language and accompanying hardware functionality, you are probably better off going elsewhere. Take a look at&#xA;&lt;em&gt;Code: The Hidden Language of Computer Hardware and Software&lt;/em&gt;&#xA;by Charles Petzold&#xA;or&#xA;&lt;em&gt;The Elements of Computing Systems: Building a Modern Computer from First Principles&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="10801" LastEditorUserId="10801" LastEditDate="2023-10-06T20:39:37.263" LastActivityDate="2023-10-06T20:39:37.263" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7892" PostTypeId="2" ParentId="7887" CreationDate="2023-10-07T11:39:48.420" Score="2" Body="&lt;p&gt;I am a retired software engineer with a CS degree who participated in the development of both hardware and software at various Silicon Valley companies. I have owned multiple editions of TAOCP over four decades, starting with when I was an undergrad.&lt;/p&gt;&#xA;&lt;p&gt;TAOCP is special in that it offers enormous depth in addition to considerable breadth, and it is basically free of errors. It is a reliable &lt;em&gt;reference&lt;/em&gt; that provides an authoritative and comprehensive overview of the state of the art at the time of publication. It is therefore an excellent starting point for one's own research, even more so because it also provides a plethora of references to original publications. There are probably some people who utilize TAOCP in the manner of a text book, but this is not something I could recommend. From a didactic standpoint I have always considered the reliance on MIX a sub-optimal choice, but I can understand Knuth's motivation for choosing that path.&lt;/p&gt;&#xA;&lt;p&gt;I have programmed professionally in various assembly languages (Z80, x86, SPARC, ARM) and do not see their utility in the area of memory management, unless we have different ideas of what that entails. Knowledge of assembly languages is useful in performance-focused software work, such as high-performance libraries and optimizing compiler code generation. It can also be useful when interfacing directly with computer hardware, for example in driver software or embedded products. In addition, such knowledge is helpful when designing or extending an instruction set architecture as part of processor designs such as RISC-V.&lt;/p&gt;&#xA;&lt;p&gt;The most widely-used assembly languages are currently those for x86-64 and ARM processors in both 32-bit and 64-bit incarnations. Going by my own experience, these are probably best learned from studying relevant open source projects and inspecting compiler-generated code with the vendor documentation in hand, complemented by hands-on experimentation. This latter part I consider essential. Being familiar with MIX from TAOCP does not really add value. In addition to the utilitarian benefits enumerated above, having knowledge of assembly-language programming enhances one's overall understanding (mental model) of how high-level software constructs ultimately are mapped to the underlying processor hardware. In that sense one could claim that it makes one a better programmer or software engineer overall.&lt;/p&gt;&#xA;&lt;p&gt;While knowledge of assembly-language programming was a bit of a necessity in the early days of computing (the first computer I worked with sported a 2 &lt;strong&gt;MHz&lt;/strong&gt; processor and a whopping 16 &lt;strong&gt;KB&lt;/strong&gt; of system memory), the importance of such knowledge has decreased over time. For example, the last performance libraries I worked on before retiring were written entirely in a subset of C++. You may discover that in addition to some  practical benefits there is also a certain &lt;em&gt;fun&lt;/em&gt; aspect to assembly-language programming, but I suspect that is very much a matter of individual tastes.&lt;/p&gt;&#xA;" OwnerUserId="1940" LastActivityDate="2023-10-07T11:39:48.420" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7893" PostTypeId="2" ParentId="7879" CreationDate="2023-10-09T17:52:02.683" Score="2" Body="&lt;p&gt;There are several options. First, you should decide whether you would like to study at a university or a &amp;quot;university of applied sciences&amp;quot; (FH).&lt;/p&gt;&#xA;&lt;p&gt;FHs are more like schools. You have a fixed schedule, you are part of a (relatively small) class and the focus is more on actually doing the stuff you learn about. The teachers are often not scientists but professionals of this field.&lt;/p&gt;&#xA;&lt;p&gt;On universities on the other hand, you usually need to take care about your which courses you take and you decide how much time you want to spend on the studies. The teachers are often scientists and the contents of the courses is often more about how things work and not only how to apply them.&lt;/p&gt;&#xA;&lt;p&gt;There are three technical universities in Austria. Most well known are the TU Wien (Vienna) and the TU Graz, the third one is the JKU (Linz). You need to decide if you want to live in a big city like Vienna or prefer smaller cities like Graz or Linz.&lt;/p&gt;&#xA;&lt;p&gt;Do you speak German? As far as I've seen, the Computer Science Bachelor's programme at the TU Wien is German only. For Graz and Linz I found info that &amp;quot;many courses are offered in English&amp;quot;. But this means not all are offered in English.&lt;/p&gt;&#xA;&lt;p&gt;At the FHs, there are some programmes offered in English: &lt;a href=&quot;https://www.fachhochschulen.ac.at/studiengaenge?tx_solr%5Bfilter%5D%5B0%5D=studyarea%3ATechnik&amp;amp;tx_solr%5Bfilter%5D%5B1%5D=studyareasub%3AInformatik&amp;amp;tx_solr%5Bfilter%5D%5B2%5D=language%3AEnglisch&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.fachhochschulen.ac.at/...&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="13939" LastActivityDate="2023-10-09T17:52:02.683" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7895" PostTypeId="2" ParentId="5358" CreationDate="2023-10-11T13:06:20.170" Score="2" Body="&lt;p&gt;&lt;a href=&quot;https://www.PySimpleGUI.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;PySimpleGUI&lt;/a&gt; will do what you're after, starting right from the start of teaching Python.  The &lt;a href=&quot;https://eCookbook.PySimpleGUI.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;eCookbook&lt;/a&gt; will enable you to see how the architecture looks/works without installing anyone on your computer.  If you like it, you can pip install PySimpleGUI and start coding desktop GUI applications.  Most courses wait until object-oriented programming is taught, which means at the end of the course, if at all.&lt;/p&gt;&#xA;&lt;p&gt;PySimpleGUI was designed to get around this problem, enabling beginners to make GUI applications without limiting the problem set to only simple applications.  The &amp;quot;Simple&amp;quot; is a description of the ease of programming GUIs, &lt;strong&gt;not&lt;/strong&gt; the simplicity/complexity of the GUI and the problems it can solve.&lt;/p&gt;&#xA;&lt;p&gt;(Full disclosure, PSG is a project that I created, maintain, and extend.  However, I'm not here trying to promoting myself (I dislike fame), but instead trying to be helpful.)&lt;/p&gt;&#xA;" OwnerUserId="8530" LastEditorUserId="27" LastEditDate="2023-10-12T13:26:01.763" LastActivityDate="2023-10-12T13:26:01.763" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7896" PostTypeId="1" CreationDate="2023-10-13T05:36:37.733" Score="3" ViewCount="78" Body="&lt;p&gt;I've realized the value of computer science textbooks. As a web developer, I want to learn about security from an application's perspective. Something like how to prevent site from XSS, CSRF, SQL injection, File Traversal Vulnerability. I want a textbook to learn it.&lt;/p&gt;&#xA;&lt;p&gt;What I know?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fourouzan Network Security&lt;/li&gt;&#xA;&lt;li&gt;Stallings network security&lt;/li&gt;&#xA;&lt;li&gt;Kauffman series in network security&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;But the issue is that these books only briefly talk about these concepts, I want a little bit more detail. I don't want practical though. I want to understand how to hack briefly, but I want to understand how to secure web apps in detail.&lt;/p&gt;&#xA;&lt;p&gt;Please rcommend me some books to learn it. Specially computer textbooks.&lt;/p&gt;&#xA;" OwnerUserId="12478" LastEditorUserId="27" LastEditDate="2023-10-13T11:40:46.393" LastActivityDate="2023-10-14T09:32:21.370" Title="Textbooks for Learning website security as a web developer?" Tags="|self-learning|security|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7897" PostTypeId="2" ParentId="7896" CreationDate="2023-10-14T09:32:21.370" Score="3" Body="&lt;p&gt;While this may not class as &amp;quot;textbook&amp;quot; one of the best sources of instruction on securing web applications is the the Open Worldwide Application Security Project (OWASP)&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&quot;https://owasp.org/Top10/&quot; rel=&quot;nofollow noreferrer&quot;&gt;OWASP Top Ten&lt;/a&gt; provides detail on the ten most common mistakes/vulnerabilities that appear in Web Applications, how to prevent them, likely scenarios and a host of references.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A01 Broken Access Control&lt;/li&gt;&#xA;&lt;li&gt;A02 Cryptographic Failures&lt;/li&gt;&#xA;&lt;li&gt;A03 Injection&lt;/li&gt;&#xA;&lt;li&gt;A04 Insecure Design&lt;/li&gt;&#xA;&lt;li&gt;A05 Security Misconfiguration&lt;/li&gt;&#xA;&lt;li&gt;A06 Vulnerable and Outdated Components&lt;/li&gt;&#xA;&lt;li&gt;A07 Identification and Authentication Failures&lt;/li&gt;&#xA;&lt;li&gt;A08 Software and Data Integrity Failures&lt;/li&gt;&#xA;&lt;li&gt;A09 Security Logging and Monitoring Failures&lt;/li&gt;&#xA;&lt;li&gt;A10 Server Side Request Forgery (SSRF)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This will give you what you have asked for in your headline &amp;quot;how to learn website security&amp;quot; however it will not answer your different question further down your post &amp;quot;I want to understand how to hack.&amp;quot; You will gain some perspective on that, but OWASP Top Ten is very much focused on defending and securing.&lt;/p&gt;&#xA;&lt;p&gt;If you are interested in learning more, I would suggest visiting &lt;a href=&quot;https://security.stackexchange.com/&quot;&gt;Information Security Stack Exchange&lt;/a&gt; as this is our bread and butter over there. We look at everything from web security to physical security, strategy to policy, red teaming to blue teaming etc.&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2023-10-14T09:32:21.370" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7898" PostTypeId="1" CreationDate="2023-10-15T05:05:36.007" Score="2" ViewCount="131" Body="&lt;p&gt;I work in distributed systems and I need to learn the general architecture of it.&lt;/p&gt;&#xA;&lt;p&gt;Here's the general level roadmap that I want to follow.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Go via distributed system/computing textbooks.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Read system design books/do system design courses.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I am only asking for distributed system/computing textbooks in this QNA.&lt;/p&gt;&#xA;&lt;p&gt;What I don't want:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Designing data intensive applications by Martin Kleppman.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What I want?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Books like Distributed Operating Systems: Concepts and Design PK Sinha&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Distributed Systems: Concepts &amp;amp; Design by Colouris&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Mukesh Singhal Distributed Computing&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I don't prefer Tanenbaum simply because he's not my type of writer.&lt;/p&gt;&#xA;&lt;p&gt;Do you've anything else on your mind?&lt;/p&gt;&#xA;&lt;p&gt;For courses:&lt;/p&gt;&#xA;&lt;p&gt;I'll take system design courses from one website, be it udemy, youtube or anywhere else.&lt;/p&gt;&#xA;&lt;p&gt;The courses on distributed systems are sold as &amp;quot;software architecture&amp;quot; &amp;quot;system design&amp;quot; :D And I'm going to search for them.&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2023-10-15T05:05:36.007" Title="Best books to learn distributed systems/computing?" Tags="|self-learning|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7899" PostTypeId="1" CreationDate="2023-10-17T02:36:18.343" Score="2" ViewCount="68" Body="&lt;p&gt;Please recommend some books/courses.&#xA;My problem is this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This is not the first time I am studying computer networks. I studied in CS degree.&lt;/li&gt;&#xA;&lt;li&gt;I bought Kurose Ross, Fourouzan books on networking and feel like did a big mistake as they contain information which I already know of.&lt;/li&gt;&#xA;&lt;li&gt;I also bought Douglas Comer Internetworking With TCP/IP and it seems good. Recommend me something more like this.&lt;/li&gt;&#xA;&lt;li&gt;CCNA is too cisco centric and I looked at net+ and it looks so basic.&lt;/li&gt;&#xA;&lt;li&gt;I know at this level I should be reading books specialized on DNS, SSL, SSH...etc to learn advanced concepts, but I want a refresher which is a bit challenging.&lt;/li&gt;&#xA;&lt;li&gt;Books like unix network programming aren't necessary for me as I am not a systems programmer. I want helicopter view of how networking concepts will be useful for me to design a system. For example: Leaky bucket is used in api rate limiting. Like that. Something that makes things fun for me.&lt;/li&gt;&#xA;&lt;li&gt;I've bought books/courses on wireshark, web security etc and I think that's helping me. So recommend something like that.&lt;/li&gt;&#xA;&lt;li&gt;As  a system administrator, I need to understand how networking commands work under the hood so that I can troubleshoot them. Not how they're programmed, but how they work from the view of computer networking.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.cbtnuggets.com/blog/technology/programming/20-essential-linux-network-monitoring-and-configuration-commands&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.cbtnuggets.com/blog/technology/programming/20-essential-linux-network-monitoring-and-configuration-commands&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;These are the commands I need to know of how they work. I've already read the man pages of most of these commands. They tell stuffs from unix pov, but I want to learn the networking pov of these commands.&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2023-10-17T02:36:18.343" Title="Best books/courses to learn Computer Networks from a backend web developer's perspective?" Tags="|self-learning|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7900" PostTypeId="1" CreationDate="2023-10-21T02:12:14.357" Score="0" ViewCount="97" Body="&lt;p&gt;My name is David Buzatto and I am a teacher of several subjects on a Computer Science course. One of these subjects is Theory of Computation and, this semester, I decided to implement a simulator of finite automata, pushdown automata and Turing machines, with the aim of using it instead of the already known JFLAP. I would like if, if possible, someone could test it and critique the current version of the tool. Why? Well, my biggest concern is: does it work as expected? It is very difficult to test for possible corner cases. Although JFLAP is the &amp;quot;standard&amp;quot;, I think this tool is a little complicated to use in some points, especially in relation to the construction of state machines. I tried to create something more user friendly.&lt;/p&gt;&#xA;&lt;p&gt;The current tool features are:&lt;/p&gt;&#xA;&lt;h2&gt;Finite Automata (FA)&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Full support for Deterministic and Nondeterministic Finite Automata modeling, test and simulation;&lt;/li&gt;&#xA;&lt;li&gt;Create, edit, save and save as image;&lt;/li&gt;&#xA;&lt;li&gt;Support to add all missing transitions;&lt;/li&gt;&#xA;&lt;li&gt;Support for removal of inaccessible and useless states;&lt;/li&gt;&#xA;&lt;li&gt;Conversion from Nondeterministic Finite Automaton to Deterministic Finite Automaton;&lt;/li&gt;&#xA;&lt;li&gt;Deterministic Finite Automaton minimization;&lt;/li&gt;&#xA;&lt;li&gt;Regular Operations:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Union;&lt;/li&gt;&#xA;&lt;li&gt;Concatenation;&lt;/li&gt;&#xA;&lt;li&gt;Kleene Star;&lt;/li&gt;&#xA;&lt;li&gt;Complement;&lt;/li&gt;&#xA;&lt;li&gt;Intersection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Pushdown Automata (PDA)&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Full support for Deterministic and Nondeterministic Pushdown Automata modeling, test and simulation;&lt;/li&gt;&#xA;&lt;li&gt;Create, edit, save and save as image;&lt;/li&gt;&#xA;&lt;li&gt;Conversion from Final State to Empty Stack and vice-versa acceptance types.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2&gt;Turing Machines (TM)&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Full support for Deterministic Turing Machines modeling, test and simulation;&lt;/li&gt;&#xA;&lt;li&gt;Support for Nondeterministic Turing Machines modeling;&lt;/li&gt;&#xA;&lt;li&gt;Create, edit, save and save as image;&lt;/li&gt;&#xA;&lt;li&gt;Automatic detection of infine loops, i.e., Turing Machines that never halt.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You can download it here &lt;a href=&quot;https://github.com/davidbuzatto/YAAS/releases/tag/v1.0.1&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/davidbuzatto/YAAS/releases/tag/v1.0.1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Best regards!&lt;/p&gt;&#xA;" OwnerUserId="8199" LastEditorUserId="8199" LastEditDate="2023-10-21T21:55:28.940" LastActivityDate="2023-10-28T07:54:34.503" Title="Could anyone test and criticize my automaton simulator?" Tags="|cs-theory|turing-machines|" AnswerCount="0" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7902" PostTypeId="2" ParentId="7878" CreationDate="2023-10-28T02:16:30.170" Score="0" Body="&lt;p&gt;what level are you starting from? because if you want to mainly deal with network issues, then it's best to know what are you doing instead of how to do it. it seems to me that if you don't know anything about networks then starting with something like Fourouzan networks, which (if i'm not wrong) teaches you how to create and handle networks might be less useful for what you're seeking. this isn't a book, but my (and also most people i know that deal with networks) #1 suggestion is &lt;a href=&quot;https://youtube.com/playlist?list=PLIFyRwBY_4bRLmKfP1KnZA6rZbRHtxmXi&amp;amp;si=sK-6m4yPSIrtN1qS&quot; rel=&quot;nofollow noreferrer&quot;&gt;networking fundamentals&lt;/a&gt;, which is a youtube course that teaches you the fundamentals of networks. even if you have a little bit of knowledge around how the internet works, i would still recommend this course, since it helps in refreshing your memory and making sure you know every layer properly.&lt;/p&gt;&#xA;" OwnerUserId="13989" LastActivityDate="2023-10-28T02:16:30.170" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7903" PostTypeId="2" ParentId="7802" CreationDate="2023-10-28T02:28:13.830" Score="0" Body="&lt;p&gt;i tried this already, and honestly, teaching using exercises is really a hit or miss. if the students like doing the questions, then the entire year will be fun, if they think of the questions like homework, then it's like your class is just homework and homework with nothing else to do. from my experience, it's best to use project based learning instead of question based. i like using &lt;a href=&quot;https://youtu.be/rfscVS0vtbw?si=hEc9K7t4ju7Dy5-y&quot; rel=&quot;nofollow noreferrer&quot;&gt;this video&lt;/a&gt; to explain the complicated stuff, and after they learn some amount of things, give them a fun project to work on. this is a bit safer than question based learning, but i only tried question based learning twice and never did it again, so it might work for you.&lt;/p&gt;&#xA;" OwnerUserId="13989" LastActivityDate="2023-10-28T02:28:13.830" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7906" PostTypeId="1" CreationDate="2023-10-29T21:30:51.233" Score="3" ViewCount="40" Body="&lt;p&gt;I am teaching Operating Systems to Computer Science Majors, generally juniors and seniors. In order to better explain it I want to create or have a simulator or game to illustrate memory management: segmented memory vs. paged memory, demand paging, page replacement algorithms and so on. Have you come across anything along those lines?&lt;/p&gt;&#xA;" OwnerUserId="522" LastActivityDate="2023-10-29T21:30:51.233" Title="Simulator or game to teach operating system principles" Tags="|operating-systems|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7907" PostTypeId="2" ParentId="7861" CreationDate="2023-11-02T10:25:03.800" Score="2" Body="&lt;p&gt;When I'm reading what you're saying, there's something lacking: where are your tests? If you're not automatically testing complex software, it will inevitably become a mess. Tests are crucial for measuring the quality of the software and preventing regressions. If you're the sole developer in your company, this will provide you with a significant advantage. Once something is done, you'll never have to do it again. You might fix bugs and add features, but you'll have complete mastery over what your software does and does not do.&lt;/p&gt;&#xA;&lt;p&gt;Start by rethinking the problem in its simplest terms: what is the core feature? Isolate it and thoroughly test it. I would even recommend rewriting the core feature using Test-Driven Development (TDD) or, at the very least, extensive unit testing. Once you're satisfied, integrate it back into the existing software. In some cases, you might find it more cost-effective and efficient to rewrite the entire existing codebase with proper tests, especially if it's a mess.&lt;/p&gt;&#xA;&lt;p&gt;Threads are not as complicated as they may seem when you truly understand and test what they do. Whenever you're in doubt about their behavior, simply write a test to examine it. When you encounter a bug, create a test to reproduce it.&lt;/p&gt;&#xA;&lt;p&gt;I highly recommend reading 'Clean Code,' which can greatly help in understanding how to properly structure your functions and code.&lt;/p&gt;&#xA;&lt;p&gt;I understand that it can be challenging to find time to think and rewrite parts of the software when you're deep in dealing with bugs. However, when you're burdened with a substantial amount of technical debt, you're already losing time. The only way out is to take the challenging path and make the necessary changes to clean the foundations of your software.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastActivityDate="2023-11-02T10:25:03.800" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7908" PostTypeId="1" CreationDate="2023-11-02T18:52:15.410" Score="5" ViewCount="84" Body="&lt;p&gt;I'm taking a class on Logic in Computer Science, and we've covered propositional logic, predicate logic and second-order logic. Students are familiar with model theory.&lt;/p&gt;&#xA;&lt;p&gt;They are also acquainted with  theory of computation (turing machines, halting problem, etc).&lt;/p&gt;&#xA;&lt;p&gt;Now I'm planning to teach a few classes on Godel's Incompleteness Theorem (total 3 to 6 hours of lecture).&lt;/p&gt;&#xA;&lt;p&gt;However, this topic is known to be confusing, especially philosophically - so I'm wondering how I should go about teaching this topic while still keeping it interesting. Any ideas?&lt;/p&gt;&#xA;" OwnerUserId="13954" LastActivityDate="2023-11-02T18:52:15.410" Title="How to teach Godel's incompleteness Theorems?" Tags="|best-practice|mathematics|cs-theory|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7909" PostTypeId="1" CreationDate="2023-11-04T00:41:58.923" Score="0" ViewCount="26" Body="&lt;p&gt;The following is an example of the type of table we wish to show to students. However, we desire to use larger fonts, more vivid highly-saturated colors (purple, golden yellow, and/or other colors), and other aesthetically pleasing features?&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;T&lt;/th&gt;&#xA;&lt;th&gt;h&lt;/th&gt;&#xA;&lt;th&gt;e&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;c&lt;/th&gt;&#xA;&lt;th&gt;h&lt;/th&gt;&#xA;&lt;th&gt;i&lt;/th&gt;&#xA;&lt;th&gt;l&lt;/th&gt;&#xA;&lt;th&gt;d&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;s&lt;/th&gt;&#xA;&lt;th&gt;a&lt;/th&gt;&#xA;&lt;th&gt;t&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;o&lt;/th&gt;&#xA;&lt;th&gt;n&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;t&lt;/th&gt;&#xA;&lt;th&gt;h&lt;/th&gt;&#xA;&lt;th&gt;e&lt;/th&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;s&lt;/th&gt;&#xA;&lt;th&gt;w&lt;/th&gt;&#xA;&lt;th&gt;i&lt;/th&gt;&#xA;&lt;th&gt;n&lt;/th&gt;&#xA;&lt;th&gt;g&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;84&lt;/td&gt;&#xA;&lt;td&gt;104&lt;/td&gt;&#xA;&lt;td&gt;101&lt;/td&gt;&#xA;&lt;td&gt;32&lt;/td&gt;&#xA;&lt;td&gt;99&lt;/td&gt;&#xA;&lt;td&gt;104&lt;/td&gt;&#xA;&lt;td&gt;105&lt;/td&gt;&#xA;&lt;td&gt;108&lt;/td&gt;&#xA;&lt;td&gt;100&lt;/td&gt;&#xA;&lt;td&gt;32&lt;/td&gt;&#xA;&lt;td&gt;115&lt;/td&gt;&#xA;&lt;td&gt;97&lt;/td&gt;&#xA;&lt;td&gt;116&lt;/td&gt;&#xA;&lt;td&gt;32&lt;/td&gt;&#xA;&lt;td&gt;111&lt;/td&gt;&#xA;&lt;td&gt;110&lt;/td&gt;&#xA;&lt;td&gt;32&lt;/td&gt;&#xA;&lt;td&gt;116&lt;/td&gt;&#xA;&lt;td&gt;104&lt;/td&gt;&#xA;&lt;td&gt;101&lt;/td&gt;&#xA;&lt;td&gt;32&lt;/td&gt;&#xA;&lt;td&gt;115&lt;/td&gt;&#xA;&lt;td&gt;119&lt;/td&gt;&#xA;&lt;td&gt;105&lt;/td&gt;&#xA;&lt;td&gt;110&lt;/td&gt;&#xA;&lt;td&gt;103&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;However, I imagine that some students would have difficulty paying attention to a slide-show presentation having a lot of small mono-spaced white letters on a black background.&lt;/p&gt;&#xA;&lt;p&gt;What resources for teaching are there for artistically drawn tables using rich deep colors and beautifully-to-look at fonts for students who enjoy feeling happier and more entertained?&lt;/p&gt;&#xA;&lt;p&gt;In case you are curious, an example of code which prints out an ASCII table to the console displaying the ASCII number for each character is shown below. I can produce ugly tables, but how can we convert the ugly-looking tables into nice-looking tables?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;import sys&#xA;import io&#xA;&#xA;&#xA;def make_table(istring: str, file=sys.stdout) -&amp;gt; str:&#xA;    nchars = 4&#xA;    ostrm = io.StringIO()&#xA;    tops = tuple(&#xA;        ch.ljust(nchars) for ch in istring&#xA;    )&#xA;&#xA;    mids = list()&#xA;&#xA;    for top in tops:&#xA;        print(type(top), top)&#xA;        if &amp;quot;|&amp;quot; in top:&#xA;            mid = &amp;quot;|&amp;quot;&#xA;        else:&#xA;            mid = nchars * &amp;quot;-&amp;quot;&#xA;        mids.append(mid)&#xA;&#xA;    bots = tuple(&#xA;        str(ord(ch)).ljust(nchars) for ch in istring&#xA;    )&#xA;&#xA;    print(&amp;quot;| &amp;quot;, end=&amp;quot;&amp;quot;)&#xA;    print(*tops, sep=&amp;quot; | &amp;quot;, end=&amp;quot; |\n&amp;quot;, file=file)&#xA;&#xA;    print(&amp;quot;|-&amp;quot;, end=&amp;quot;&amp;quot;, file=file)&#xA;    print(*mids, sep=&amp;quot;-|-&amp;quot;, end=&amp;quot;-|\n&amp;quot;, file=file)&#xA;&#xA;    print(&amp;quot;| &amp;quot;, end=&amp;quot;&amp;quot;, file=file)&#xA;    print(*bots, sep=&amp;quot; | &amp;quot;, end=&amp;quot; |\n&amp;quot;, file=file)&#xA;&#xA;    ostr = ostrm.getvalue()&#xA;    ostrm.close()&#xA;    return ostr&#xA;&#xA;&#xA;#################################################&#xA;&#xA;# input string&#xA;istring = &amp;quot;The cat sat on a laptop&amp;quot;&#xA;&#xA;make_table(istring)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;pre class=&quot;lang-None prettyprint-override&quot;&gt;&lt;code&gt;| T    | h    | e    |      | c    | h    | i    | l    | d    |      | s    | a    | t    |      | o    | n    |      | t    | h    | e    |      | s    | w    | i    | n    | g    |&#xA;|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|&#xA;| 84   | 104  | 101  | 32   | 99   | 104  | 105  | 108  | 100  | 32   | 115  | 97   | 116  | 32   | 111  | 110  | 32   | 116  | 104  | 101  | 32   | 115  | 119  | 105  | 110  | 103  |&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T00:41:58.923" Title="Where can I find some artistically drawn tables demonstrating how a string of text can be stored in ASCII encoding?" Tags="|resource-request|" AnswerCount="0" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7910" PostTypeId="2" ParentId="7861" CreationDate="2023-11-04T01:28:38.990" Score="1" Body="&lt;p&gt;There are a lot of different coding boot camps, but I cannot say which of the boot-camps actually teach anything useful.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I hope that you would ask the following questions:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Is relocation required or can the training be done at home using a computer at home?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;if I have to sit in a chair inside of the same room as the trainer or instructor, what city, state, and country in the location of the training?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How much money is it for the training programme out of my pocket?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How much time will it take to complete the training?&#xA;What is the job I would be doing when you are done training me.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What job would be I be prepared for when you are done training me?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;That is, we have the following key questions for coding boot-camps and training programmes:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;and 2. Where is it?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How much money?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;How much time?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;What job would be I be prepared for when you are done training me?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;I recommend look at existing spreadsheets, or making your own spreadsheet.&lt;/p&gt;&#xA;&lt;p&gt;Someone made &lt;a href=&quot;https://docs.google.com/spreadsheets/d/1pRJt1ikggKueyhb9yM33Hi-OBP2NxyRZF_GbzMGMr9M/edit?usp=sharing&quot; rel=&quot;nofollow noreferrer&quot;&gt;this&lt;/a&gt; spreadsheet.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Here is a different spreadsheet, which is mostly empty, but the column headers show what information I recommend that you take under consideration:&lt;/p&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;_&lt;/th&gt;&#xA;&lt;th&gt;Where is&lt;br&gt;the&lt;br&gt;boot-camp?&lt;/th&gt;&#xA;&lt;th&gt;How much&lt;br&gt;money&lt;br&gt;is the&lt;br&gt;boot-camp?&lt;/th&gt;&#xA;&lt;th&gt;How much&lt;br&gt;time until&lt;br&gt;finish training?&lt;/th&gt;&#xA;&lt;th&gt;What is the job?&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;a href=&quot;https://www.appacademy.io/&quot; rel=&quot;nofollow noreferrer&quot;&gt;App Academy&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;a href=&quot;https://flatironschool.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Flatiron School&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;a href=&quot;https://info.codingdojo.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coding Dojo&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;a href=&quot;https://www.synergisticit.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Synergistic IT&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td&gt;at home (no moving)&lt;/td&gt;&#xA;&lt;td&gt;$30,000&lt;/td&gt;&#xA;&lt;td&gt;self-paced but avg 5 to 6 months&lt;/td&gt;&#xA;&lt;td&gt;???&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;a href=&quot;https://designlab.com/ux-academy/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Design Lab&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&lt;hr /&gt;&#xA;&lt;p&gt;Here is bulleted list of the names of &amp;quot;&lt;em&gt;universities&lt;/em&gt;&amp;quot; (?) or coding bootcamps.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Lambda&lt;/li&gt;&#xA;&lt;li&gt;Thinkful&lt;/li&gt;&#xA;&lt;li&gt;General Assembly&lt;/li&gt;&#xA;&lt;li&gt;Codewords Software&lt;/li&gt;&#xA;&lt;li&gt;Bloc Web Developer Track&lt;/li&gt;&#xA;&lt;li&gt;Hack Reactor Bootcamp&lt;/li&gt;&#xA;&lt;li&gt;Flatiron School Software Immersive&lt;/li&gt;&#xA;&lt;li&gt;Full Stack Academy&lt;/li&gt;&#xA;&lt;li&gt;CodeSmith&lt;/li&gt;&#xA;&lt;li&gt;App Academy&lt;/li&gt;&#xA;&lt;li&gt;Software Guild&lt;/li&gt;&#xA;&lt;li&gt;Epicodus&lt;/li&gt;&#xA;&lt;li&gt;Spring Board&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;None of these institutions is &lt;a href=&quot;https://en.wikipedia.org/wiki/Higher_Learning_Commission&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;accredited&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Please be carful; some of these coding bootcamps are degree farms.&lt;/p&gt;&#xA;&lt;p&gt;A degree farm is a business which will give you a diploma in return for money, but you do not actually learn anything useful while you are a student there.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T01:28:38.990" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7911" PostTypeId="2" ParentId="7843" CreationDate="2023-11-04T01:55:21.630" Score="0" Body="&lt;p&gt;In your question, you made the claim that &lt;a href=&quot;https://wkhtmltopdf.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;wkhtmltopdf&lt;/strong&gt;&lt;/a&gt; is better than &lt;a href=&quot;https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference&quot;&gt;&lt;strong&gt;LaTeX&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That is your opinion.&lt;/p&gt;&#xA;&lt;p&gt;It is analogous to claiming that the color blue is better than the color red.&lt;/p&gt;&#xA;&lt;p&gt;Likewise, there exist people who say that they enjoy the taste of boiled mashed carrots over the taste of boiled mashed potatoes.&lt;/p&gt;&#xA;&lt;p&gt;I am not sure that everyone is already familiar with &lt;a href=&quot;https://wkhtmltopdf.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;wkhtmltopdf&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://wkhtmltopdf.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;wkhtmltopdf&lt;/strong&gt;&lt;/a&gt; is a tool which converts webpages into PDF files. a PDF file is easily printed out on eight and a half by elevent sheets of paper.&lt;/p&gt;&#xA;&lt;p&gt;There are some computer scientists who do not know how to read or write hyper-text-mark-up-language.&lt;/p&gt;&#xA;&lt;p&gt;If you do not know how to write hyper-text mark-up language, then you could use &lt;a href=&quot;https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference&quot;&gt;&lt;strong&gt;LaTeX&lt;/strong&gt;&lt;/a&gt; instead of &lt;a href=&quot;https://wkhtmltopdf.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;wkhtmltopdf&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;My favorite alternative to &lt;strong&gt;LaTeX&lt;/strong&gt; is stack exchange mark-up language with the &lt;strong&gt;MathJax&lt;/strong&gt; plug-in. You might desire something like &lt;a href=&quot;https://en.wikipedia.org/wiki/BibTeX&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;BibTex&lt;/strong&gt;&lt;/a&gt; to deal with citations and references.&lt;/p&gt;&#xA;&lt;p&gt;It is possible to write an academic paper in &lt;strong&gt;Libre Office&lt;/strong&gt;, but &lt;strong&gt;TeX&lt;/strong&gt; pre-dates &lt;strong&gt;Libre Office&lt;/strong&gt; and &lt;strong&gt;Microsoft Word&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That is, some people learned how to use &lt;strong&gt;TeX&lt;/strong&gt;, and when they got older, never learned how to use &lt;strong&gt;Microsoft Word&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Most academic journals accept papers written in &lt;code&gt;.doc&lt;/code&gt; format these days (files encoded using the &lt;a href=&quot;https://en.wikipedia.org/wiki/Microsoft&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Microsoft&lt;/strong&gt;&lt;/a&gt; standards).&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T01:55:21.630" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7912" PostTypeId="2" ParentId="7829" CreationDate="2023-11-04T02:21:53.747" Score="2" Body="&lt;p&gt;In your original question, you asked somthing like,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I want to study:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Operating Systems (OS)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Database Managements Systems (DBMS)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Computer Networks and the Internet (CN)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Data Structures and Algorithms (DSA)&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Artificial Intelligence (AI)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;Data Structures and Algorithms&lt;/h2&gt;&#xA;&lt;p&gt;For Data Structures and Algorithms (DSA), I recommend reading the following book:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Introduction_to_Algorithms&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;strong&gt;Introduction to Algorithms&lt;/strong&gt;&lt;/a&gt; by Cormen, Leiserson, Rivest, and Stein&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I will nickname the book  &lt;em&gt;&lt;strong&gt;CLRS&lt;/strong&gt;&lt;/em&gt; in the remainder of this answer to your question.&lt;/p&gt;&#xA;&lt;p&gt;Please note that &lt;em&gt;&lt;strong&gt;CLRS&lt;/strong&gt;&lt;/em&gt; is more than 30 years old.&lt;/p&gt;&#xA;&lt;p&gt;Due to its age, &lt;em&gt;&lt;strong&gt;CLRS&lt;/strong&gt;&lt;/em&gt; contains some anachronistic features.&lt;/p&gt;&#xA;&lt;p&gt;If you decide to read the book, then I recommend that you:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;NOT&lt;/strong&gt; write &lt;em&gt;proofs of correctness&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;NOT&lt;/strong&gt; read &lt;em&gt;proofs of correctness&lt;/em&gt; either.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;that you do draw lots of pictures of linked-lists, trees, etc...&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make a few simple examples, and play with your examples. Avoid mathematical generalities or vagueness .&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Re-write the pseudo-code in the book with the &lt;a href=&quot;https://en.wikipedia.org/wiki/Don%27t_repeat_yourself#:%7E:text=%22Don%27t%20repeat%20yourself%22,redundancy%20in%20the%20first%20place.&quot; rel=&quot;nofollow noreferrer&quot;&gt;do not repeat yourself&lt;/a&gt; principle in mind. The authors originally put all of there code inside of one function. Really, they should put code for inserting a node into a linked-list inside of a class method named somthing like &lt;code&gt;LinkedList.insert()&lt;/code&gt; and call the method on an as-needed basis. At one point, the authors tend to repeat the same few lines of code all throughout a larger script in order to do some simple operation on a linked list. They are trying to do much more complicated than a linked list, so the code for &lt;code&gt;LinkedList.insert()&lt;/code&gt; should be compartmentalized into its own little compartment or re-usable module.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Re-write the pseudo-code in the book in a real language, like python.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Make sure that fewer pre-conditions are required. Sometimes the authors made weird assumptions about how input data was formatted. In general, I recommend writing two methods: &lt;strong&gt;ONE&lt;/strong&gt; an interface which checks the inputs for validity. &lt;strong&gt;TWO&lt;/strong&gt; an implementation method which never checks inputs. For example, do not check that all numbers are greater than zero in the implementation method, but do check in the interface method.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There are some very complicated data-structures in the book I refer to as &lt;strong&gt;CLRS&lt;/strong&gt;; it's not just arrays and linked lists.&lt;/p&gt;&#xA;&lt;p&gt;For example, in the appendix of one of the older editions of the book they have Tarjan's &lt;a href=&quot;https://en.wikipedia.org/wiki/Splay_tree&quot; rel=&quot;nofollow noreferrer&quot;&gt;Splay Trees&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T02:21:53.747" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7913" PostTypeId="2" ParentId="5906" CreationDate="2023-11-04T02:39:32.820" Score="0" Body="&lt;h1&gt;When to disallow techniques or language constructs&lt;/h1&gt;&#xA;&lt;p&gt;The primary benefit of prohibiting the use of techniques/language constructs that have not been taught yet is to have students implement somthing rather than have it implemented for them.&lt;/p&gt;&#xA;&lt;p&gt;For example you could ask students to write code to compute the length of a null-terminated string without using any kind of built-in &lt;code&gt;length&lt;/code&gt; method for a &lt;code&gt;string&lt;/code&gt; class.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-None prettyprint-override&quot;&gt;&lt;code&gt;# memory addresses are like hotel rooms where you can store things.  &#xA;#&#xA;# reserve a hotel room and nickname the hotel room `len`  &#xA;#&#xA;# store the number zero in the hotel room nicknamed `len`&#xA;#&#xA;# for each character `ch` in string of characters `chs` { &#xA;#     &#xA;#     if character `ch` is null {&#xA;#         stop what you are doing.&#xA;#         exit this for-loop&#xA;#         you reached the end of the loop&#xA;#     } end if statement &#xA;#     &#xA;#     if you are reading this line, then `ch` is not NULL&#xA;#     &#xA;#     pull the number out of hotel room labeled `len`     &#xA;#&#xA;#     add one to the number in the hotel room labeled `len`&#xA;#&#xA;#     put the result back into the hotel room labeled `len`  &#xA;#&#xA;#     go back to the top of this for-loop and do it all over again. &#xA;#&#xA;# } end for-loop &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;def length(chs:str):  &#xA;    len = 0;&#xA;    for ch in chs:&#xA;        if ch == NULL:&#xA;            break; &#xA;        len += 1&#xA;    return len&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;For-Loops&lt;/h1&gt;&#xA;&lt;p&gt;You mentioned for-loops in your original question.&lt;/p&gt;&#xA;&lt;p&gt;If you are going to disallow for-each-loops, then I doubt you would get past writing &lt;code&gt;print(&amp;quot;Hello World&amp;quot;)&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A for-each-loop is simple enough that someone who does not know how to do any math other than addition and subtraction could write a for-each-loop.&lt;/p&gt;&#xA;&lt;p&gt;If you have many different things (noun-like objects) which need the same task performed (verb-like objects), then a for-loop is used to verb each noun.&lt;/p&gt;&#xA;&lt;p&gt;If you have a more than one or two cupcakes, you will need somthing like a for-loop to put frosting on top of each cupcake.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-python prettyprint-override&quot;&gt;&lt;code&gt;frsting = make_cream_cheese_frosting(this_sugar, this_cream_cheese); &#xA; &#xA;for each cupcake in cupcakes:&#xA;    cupcake.append(fsting)&#xA;&#xA;for each student in students:&#xA;    students.insert(cupcake)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T02:39:32.820" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7914" PostTypeId="2" ParentId="7483" CreationDate="2023-11-04T03:52:21.360" Score="0" Body="&lt;h1&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;Studying logic and discrete mathematics prepares students for a powerful realization in their life:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Computer programmers use English words &lt;em&gt;&lt;strong&gt;very differently&lt;/strong&gt;&lt;/em&gt; than people outside of the profession of computer programming do.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The English word &lt;code&gt;mist&lt;/code&gt; is used to describe times when you can see, smell, or taste that there are thousands of tiny droplets of water in the air.&lt;/p&gt;&#xA;&lt;p&gt;The word &lt;code&gt;mist&lt;/code&gt; is also a word in German, not just English. However, &lt;code&gt;mist&lt;/code&gt; has a very different meaning in German than in English. I will let you look-up what it means. As a hint, the answer is &lt;em&gt;not&lt;/em&gt; &lt;code&gt;nebel&lt;/code&gt; and the answer is not fog or aerosolized water spray.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Logical Disjunction&lt;/h1&gt;&#xA;&lt;p&gt;Studying logic and discrete mathematics prepares students for the fact that computer programmers use the word &lt;code&gt;or&lt;/code&gt; differently than people outside of the profession do.&lt;/p&gt;&#xA;&lt;p&gt;In computer programming the word &lt;code&gt;or&lt;/code&gt; is used the same way as the word &lt;code&gt;or&lt;/code&gt; is used by mathematicians.&lt;/p&gt;&#xA;&lt;p&gt;However, Americans use the word &lt;code&gt;or&lt;/code&gt; differently in mathematics and computer programming than they do in every-day life.&lt;/p&gt;&#xA;&lt;p&gt;Suppose that &lt;code&gt;King Soopers&lt;/code&gt; might be the name posted on a sign hung above one building where food is sold.&lt;/p&gt;&#xA;&lt;p&gt;Also, &lt;code&gt;Mi Pueblo Market&lt;/code&gt; might be the name posted above a different building where food is sold, a building at least 100 meters away from &lt;code&gt;King Soopers&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Someone might say:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;We need spinach, eggs, cheese, and flour. Should we go to &lt;code&gt;King Soopers&lt;/code&gt; &lt;strong&gt;OR&lt;/strong&gt; &lt;code&gt;Mi Pueblo Market&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In somthing related to common English parlance, we have:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;# THIS USAGE IS *MORE* CONSISTENT WITH THE ENGLISH LANGUAGE, THAN CONSISTENT WITH MATH, RELATIVLY SPEAKING&#xA; &#xA;or(a, b)          = exactly one of {a, b} is true&#xA;or(a, b, c)       = exactly one of {a, b, c} is true&#xA;or(a, b, c, d)    = exactly one of {a, b, c, d} is true&#xA;or(a, b, c, d, e) = exactly one of {a, b, c, d, e} is true&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In logic, mathematics, and computer science,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The statement &lt;code&gt;x1 or x2 or... xn&lt;/code&gt;&lt;br /&gt;&#xA;... means the same thing as...&lt;br /&gt;&#xA;the statement &lt;code&gt;one or more of the statements x1 though xn is true&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Studying logic and discrete mathematics prepares students for the fact that computer programmers use English words differently than normal people do.&lt;/p&gt;&#xA;&lt;p&gt;The following argument is valid in English, but is invalid in mathematical logic:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Axiom 1. (We went to King Soopers for the groceries) &lt;strong&gt;or&lt;/strong&gt; (we went to Mi Pueblo Market for the groceries).&lt;/p&gt;&#xA;&lt;p&gt;Axiom 2. It is not the case that (we went to King Soopers for the groceries).&lt;/p&gt;&#xA;&lt;p&gt;Conclusion. We must have gone to to Mi Pueblo Market for the groceries.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The standards for the English language define the word &lt;strong&gt;OR&lt;/strong&gt; differently for English than for &lt;strong&gt;OR&lt;/strong&gt; in logic.&lt;/p&gt;&#xA;&lt;p&gt;The German word &lt;code&gt;mist&lt;/code&gt; has the same meaning as the English word &lt;code&gt;manure&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A string of text, such as &lt;code&gt;mist&lt;/code&gt; or the word &lt;code&gt;or&lt;/code&gt; can have different meanings in different languages.&lt;/p&gt;&#xA;&lt;p&gt;Mathematics is a different language than English. The word &lt;code&gt;or&lt;/code&gt; has a meaning in computer programming which seems alien to many people who know English, but who do not know very much mathematics or much about computer programming either.&lt;/p&gt;&#xA;&lt;p&gt;In a programming language named &lt;a href=&quot;https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference&quot;&gt;MathJax&lt;/a&gt; some people write &lt;code&gt;lor&lt;/code&gt; for &lt;code&gt;logical-or&lt;/code&gt; instead of writing &lt;code&gt;or&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Writing &lt;code&gt;lor&lt;/code&gt; in computer programmes and writing &lt;code&gt;or&lt;/code&gt; in English makes it very clear that the two words are different, but most computer programmers just write &lt;code&gt;or&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;The Universal Quantifier ∀&lt;/h1&gt;&#xA;&lt;p&gt;Studying logic and discrete mathematics prepares students for the fact that computer programmers use the following words and phrases differently than people outside of the profession of computer programming do.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;all&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;every&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;for any&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;for each&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Suppose that someone does &lt;strong&gt;not&lt;/strong&gt; own a coin-operated laundromat.&lt;/p&gt;&#xA;&lt;p&gt;The following statement is &lt;strong&gt;FALSE&lt;/strong&gt; in English:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;three of the washing machines inside of my coin-operated laundromat are broken.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The statement about three washing machines is &lt;strong&gt;TRUE&lt;/strong&gt; in mathematical logic.&lt;/p&gt;&#xA;&lt;p&gt;In mathematical logic, statements about non-existent things are always true.&lt;/p&gt;&#xA;&lt;p&gt;In the English language, if something does not exist, then all statements about that thing are false.&lt;/p&gt;&#xA;&lt;p&gt;For example, the statement &lt;code&gt;Joe's step-father's brother's pet monkey likes to play the drums&lt;/code&gt; is false in English when:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Joe does not exist.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Joe exists, but Joe has no step-father&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Joe exists, and Joe has a step-father, but Joe's step-father has no brother.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Joe exists, and Joe has a step-father, and the step-father has a brother, but the brother does not have a pet monkey.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Joe exists, and Joe has a step-father, and the step-father has a brother, and the brother has a pet monkey, but it is not true that the monkey likes to play the drums.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In mathematical logic, if the category of things satisfying some property ends up being an empty category, then everything about that category is true.&lt;/p&gt;&#xA;&lt;p&gt;Suppose that there was an elementary school in the year 2020 in some city.&lt;/p&gt;&#xA;&lt;p&gt;Also, suppose that every child in that school had a cubby where a &lt;em&gt;&lt;strong&gt;cubby&lt;/strong&gt;&lt;/em&gt; is a plastic or wood bin which people put things in.&lt;/p&gt;&#xA;&lt;p&gt;Suppose that Jill ate her snack, it is the end of the day, and she only has 20 minutes left before she goes home.&lt;/p&gt;&#xA;&lt;p&gt;Consider the following statement:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;For any snack, x, in Jill's Cubby, snack x is a Twinkie.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;That statement is false in English, because there do not exist any snacks inside of Jill's cubby.&lt;/p&gt;&#xA;&lt;p&gt;However, that statement is true in mathematical logic, discrete mathematics, and computer programming, because there do not exist any snacks inside of Jill's cubby.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Final Remarks&lt;/h1&gt;&#xA;&lt;p&gt;I am too tired to explain everything now, but suffice it to say that the key words and phrases to learn about are show below:&lt;/p&gt;&#xA;&lt;h1&gt;Predicates of One Input&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical  Identity&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;I(x)&lt;/code&gt; is true no matter what &lt;code&gt;x&lt;/code&gt; is.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical Contradiction&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;NO(x)&lt;/code&gt; is false no matter what &lt;code&gt;x&lt;/code&gt; is.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical Negation&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;NO(x)&lt;/code&gt; is false if &lt;code&gt;x&lt;/code&gt; is true and &lt;code&gt;NO(x)&lt;/code&gt; is true if &lt;code&gt;x&lt;/code&gt; is false.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Predicates of Two Inputs&lt;/h1&gt;&#xA;&lt;p&gt;There are 16 predicates such that each predicate has two inputs, but only four of them are shown below:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Binary Logical Identity&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;I(x, y)&lt;/code&gt; is always true. It does not matter if &lt;code&gt;x&lt;/code&gt; is true or false, &lt;code&gt;I(x, y)&lt;/code&gt; is still true. It does not matter if &lt;code&gt;y&lt;/code&gt; is true or false either. We could write &lt;code&gt;∀ x, y ∈ {0, 1}, I(x, y) = 1&lt;/code&gt; or &lt;code&gt;for any x element of the category 0 or 1 and for any y element of the category 0 or 1, the identity of x and y is 1&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Binary Logical Contradiction&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;I(x, y)&lt;/code&gt; is always false. It does not matter if &lt;code&gt;x&lt;/code&gt; is true or false, &lt;code&gt;I(x, y)&lt;/code&gt; is still true. It does not matter if &lt;code&gt;y&lt;/code&gt; is true or false either.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical Conjunction&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;LAND(x, y)&lt;/code&gt; is true if and only if &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; are both true.  Did you brush your teeth &lt;em&gt;&lt;strong&gt;AND&lt;/strong&gt;&lt;/em&gt; put your sort your clean laundry so that the clean socks are not mixed with shirts and shirt are not mixed together with pants?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical Disjunction&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;LOR(x1, x2, x3, ....)&lt;/code&gt;. For example, You may take an apple &lt;em&gt;&lt;strong&gt;and/or&lt;/strong&gt;&lt;/em&gt; a piece of candy from Sam's house on Halloweens. Logical disjunction is the same as the English phrase &lt;code&gt;and/or&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Logical Implication&lt;/strong&gt;&lt;/em&gt; ... &lt;code&gt;NO(x)&lt;/code&gt; is false if &lt;code&gt;x&lt;/code&gt; is true and &lt;code&gt;NO(x)&lt;/code&gt; is true if &lt;code&gt;x&lt;/code&gt; is false.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1&gt;Predicates of Three or More Inputs&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;We can have logical conjunction &lt;code&gt;LAND(x1, x2, x3, ... xn)&lt;/code&gt; with three or more inputs. The output is true if and only if all of the inputs are true. If one or more inputs are false, the whole thing is false.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;We can have logical disjunction &lt;code&gt;LOR(x1, x2, x3, ... xn)&lt;/code&gt; with three or more inputs. The output is true if and only if at least one of the inputs is true. If false of the inputs are false, then the output of &lt;code&gt;LOR&lt;/code&gt; is false.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;Set Theory&lt;/h1&gt;&#xA;&lt;p&gt;Sets are categories of things.&lt;/p&gt;&#xA;&lt;p&gt;berries are an example of a subset of the set all edible fruits and vegetables.&lt;/p&gt;&#xA;&lt;p&gt;The number &lt;code&gt;1&lt;/code&gt; is an element of &lt;code&gt;{1, 2, 3}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The number &lt;code&gt;5&lt;/code&gt; is *&lt;strong&gt;not&lt;/strong&gt; an element of &lt;code&gt;{1, 2, 3}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Suppose that:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;a peanut is inside of a can of other peanuts.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;the can is inside of Joe's car&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;...then...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the peanut is &lt;strong&gt;not&lt;/strong&gt; inside of Joe's car&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Why? Because if the can of peanuts is a &lt;em&gt;&lt;strong&gt;set&lt;/strong&gt;&lt;/em&gt; and Joe's car is a &lt;em&gt;&lt;strong&gt;set&lt;/strong&gt;&lt;/em&gt;, then we have the element-of operator &lt;code&gt;∈&lt;/code&gt; is not transitive.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;em&gt;&lt;strong&gt;Transitive Property&lt;/strong&gt;&lt;/em&gt; of English words like &lt;code&gt;in&lt;/code&gt;, was fun for certain strange mathematically inclined people, like myself, to learn about, and might be fun for you too.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;The Universal Quantifier&lt;/h1&gt;&#xA;&lt;p&gt;Learn how to compute whether a statement is true or false when the statement contains a word or phrase such as &lt;code&gt;any&lt;/code&gt; or &lt;code&gt;all&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h1&gt;The Existential Quantifier&lt;/h1&gt;&#xA;&lt;p&gt;Learn how to compute whether a statement is true or false when the statement contains a word or phrase such as &lt;code&gt;at least one&lt;/code&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9253" LastActivityDate="2023-11-04T03:52:21.360" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7916" PostTypeId="2" ParentId="7740" CreationDate="2023-11-04T22:44:36.287" Score="3" Body="&lt;p&gt;I'm no teacher, though following the community online I have the impression that too many students are exposed to C++98/03, pre-standard C++ or C in their C++ courses. If they all would be making the jump to C++11, we would give them a better experience.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I don't see much difference between C++11 and C++17 while the latter provides quite some quality-of-life improvements.&lt;/p&gt;&#xA;&lt;p&gt;An argument I've heard before was that universities teach what the industry uses. Following that reasoning I would not expect C++20, however C++17 should follow that rule.&lt;/p&gt;&#xA;&lt;p&gt;I also believe that we, as a community, should make a better stand on what versions our considered outdated. I was glad to see boost drop C++98 requirements, though that's just a first step.&lt;/p&gt;&#xA;" OwnerUserId="14016" LastActivityDate="2023-11-04T22:44:36.287" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7917" PostTypeId="1" CreationDate="2023-11-05T12:27:52.897" Score="1" ViewCount="212" Body="&lt;p&gt;When my students (high school students) asked me &amp;quot;Why Are There So Many Programming Languages?&amp;quot; I don't want to give them an answer that is too pedantic (so they won't respond &amp;quot;Tl;dr&amp;quot;). I came up with a short list,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Different tools for different jobs. Many languages were invented and developed for specific needs(even though through their evolution they are all able to solve some common problems).&lt;/li&gt;&#xA;&lt;li&gt;Big tech companies invented their own programming languages to solve specific problems, java, c#, go, Swift to name a few. These languages have their own goals and priorities, which are not in line with existing ones.&lt;/li&gt;&#xA;&lt;li&gt;People love to invent new things and programming language is no different. People often say &amp;quot;Each language has its own unique characteristics that would make it suitable to solve a particular problem.&amp;quot; But I would like to put it another way, each language bears the characteristics that come from their inventors's experiences/strengths/lessons learned with the languages they used before.&lt;/li&gt;&#xA;&lt;li&gt;People have different tastes, personal preferences, or philosophies, when they don't like language A, they invent language B. &lt;strong&gt;I will emphasize this one to my students.&lt;/strong&gt; When I search answers to this question I don't see many mentioned this. But think it is an important reason. For example, I hate C++, to me it is an ugly language. I read somewhere (I can't find it now), golang inventors don't like C++ too(same as Java inventor I think), so they invent their own languages.&lt;/li&gt;&#xA;&lt;li&gt;Technology is evolving. So people and big companies always feel the need to design a new language to better harness the new technology. The latest example of this may be &lt;a href=&quot;https://www.modular.com/mojo&quot; rel=&quot;nofollow noreferrer&quot;&gt;mojo&lt;/a&gt; although reading its introduction I can't help saying WHY and again?!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The list is no doubt not exhaustive (and they overlap) but I try to make them not be too pedantic or too boring. For example, I particularly stay away from the reasons like &amp;quot;different programming languages are based on different programming &lt;strong&gt;paradigms&lt;/strong&gt;&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Can you guys help me compile a list or give an answer that high school students can appreciate?&lt;/p&gt;&#xA;&lt;p&gt;I searched cseducators site and found &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7186/why-isnt-there-one-language-to-use-instead-of-different-programming-languages&quot;&gt;Why isn&amp;#39;t there one language to use instead of different programming languages?&lt;/a&gt;, I am afraid most of the answers there will get a Tl;dr response from highschoolers ( at least from my students).&lt;/p&gt;&#xA;" OwnerUserId="9884" LastEditorUserId="9884" LastEditDate="2023-11-10T08:50:22.120" LastActivityDate="2023-11-10T08:50:22.120" Title="The answers to &quot;Why Are There So Many Programming Languages?&quot; for high school students, not too pedantic" Tags="|programming|secondary-education|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7918" PostTypeId="2" ParentId="7917" CreationDate="2023-11-05T12:48:46.083" Score="5" Body="&lt;p&gt;If a language becomes popular, two things happen. Both of them lead to new ideas and that leads to new languages, some of which are just refinements on existing languages.&lt;/p&gt;&#xA;&lt;p&gt;The first issue is that when there are a lot of users, flaws in a language become more apparent. For example, in C it is far to easy to make memory errors with things like null-terminated strings. Skilled programmers (and not everyone is sufficiently skilled) can avoid these with sufficient care, though taking care is hard.&lt;/p&gt;&#xA;&lt;p&gt;The second issue is that when there are a lot of &lt;em&gt;communicating&lt;/em&gt; users of a language, styles of programming in that language emerge. Some of them are to avoid the potential errors mentioned above, but there are other things that are found useful.&lt;/p&gt;&#xA;&lt;p&gt;Both of the above lead to new languages. Strings in Java, say, are pretty safe and don't lead to memory errors. OO is, among other things a &lt;em&gt;style&lt;/em&gt; of programming quite different from C, which is a procedural language. In OO languages, one's thought process is pushed toward &amp;quot;things&amp;quot; with behavior (objects). In procedural languages (of which Modula is perhaps the best embodiment, one things about actions, not things, and actions have sub-actions (nested procedures).&lt;/p&gt;&#xA;&lt;p&gt;There is also a general trend away from hardware considerations toward more conceptual things. In fact the normal concept of how hardware behaves isn't really how it works anymore with modern CPUs and GPUs. This makes a more abstract representation of a program more desirable as it permits execution on various kinds of hardware.&lt;/p&gt;&#xA;&lt;p&gt;So, lots of languages is really a feature of progress in thinking about the nature of programs and how to implement them effectively and efficiently. Higher level abstractions, such as are possible in Haskell and Python make programming easier.&lt;/p&gt;&#xA;&lt;p&gt;If we &amp;quot;stick&amp;quot; with one language, that progress in thinking would stop. The same thing is true in most other aspects of life as well. People's thinking advances, so we expect processes to advance as well.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note that the above isn't intended to be comprehensive. There are other reasons. I've created languages just for use with my students in the compiler course as they embody &amp;quot;interesting&amp;quot; concepts in translation.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastEditorUserId="1293" LastEditDate="2023-11-05T13:09:33.497" LastActivityDate="2023-11-05T13:09:33.497" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7919" PostTypeId="1" AcceptedAnswerId="7920" CreationDate="2023-11-06T15:21:27.847" Score="3" ViewCount="134" Body="&lt;p&gt;In a computer science course, is it a good idea to create automatically graded problems that allow students only a couple of attempts and give fewer points if he or she answers many times? Namely, it will give some experience that in work life, do not publish unfinished code. But it would make people shy to show their efforts.&lt;/p&gt;&#xA;" OwnerUserId="14023" LastEditorUserId="14023" LastEditDate="2023-11-06T16:10:21.687" LastActivityDate="2023-11-07T18:05:55.997" Title="Should a student be allowed to try to answer a question only a few times?" Tags="|auto-graders|" AnswerCount="4" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7920" PostTypeId="2" ParentId="7919" CreationDate="2023-11-06T18:29:42.043" Score="4" Body="&lt;p&gt;I used to think about a similar setup in my earlier years of teaching CS, but now I'm about 15 years in, and I don't see the benefits.&lt;/p&gt;&#xA;&lt;p&gt;I'm trying to imagine a work environment in which intermediate work should be hidden from view, and the only thing I can think of is poisonous workplaces where either fear of job security or fear of humiliation prevents employees from truly collaborating.  Certainly, this would not lead to smarter work.&lt;/p&gt;&#xA;&lt;p&gt;Within a school situation, I can, perhaps, imagine a benefit to assessments, but they are already typically time limited.&lt;/p&gt;&#xA;&lt;p&gt;Beyond assessments, I simply cannot imagine a learning benefit that students would obtain from such restrictions.  I can guess is that it might be a misguided attempt to get students to code more thoughtfully, and code less by brownian motion.  But I don't believe that it will achieve those ends.  At best, it will cause students to code off to the side, and then paste in their code when they believe it is complete.  This increases their setup work, and gives them an extra task at the end, but those tasks do not forward any particular learning goals.&lt;/p&gt;&#xA;&lt;p&gt;I would steer clear.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2023-11-06T18:29:42.043" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7921" PostTypeId="2" ParentId="7919" CreationDate="2023-11-07T09:04:37.413" Score="4" Body="&lt;p&gt;My assumption is that you want to teach a professional, quality-oriented mindset about software development.&lt;/p&gt;&#xA;&lt;p&gt;If you want to resemble professional software development (at least to some degree), I'd recommend a two-level approach.&lt;/p&gt;&#xA;&lt;p&gt;Typically, we write code and check it locally against some test cases before we &amp;quot;publish&amp;quot; it. So, there's a two-step process:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;With the local checks, it does not matter how often we check and fail. It might take some time, but will help to improve quality.&lt;/li&gt;&#xA;&lt;li&gt;If published code fails, we (our company) might get a problem, with customers complaining, or even financial losses.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So, an important step in development is to decide when my code is production-ready.&lt;/p&gt;&#xA;&lt;p&gt;For teaching such a mindset, a grader that penalizes failed attempts is a useful element, to be used for &amp;quot;published&amp;quot; code.&lt;/p&gt;&#xA;&lt;p&gt;But then you'll also want to teach your students how to do the local tests, and that's a whole topic in itself: designing for testability, creating test cases that cover relevant situations, using unit testing frameworks etc.&lt;/p&gt;&#xA;&lt;p&gt;So, for general CS courses, I'd refrain from penalizing failed attempts, and only do it in quality-focussed courses.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-11-07T09:04:37.413" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7922" PostTypeId="2" ParentId="7483" CreationDate="2023-11-07T10:18:30.987" Score="3" Body="&lt;p&gt;I'd rephrase the question as &lt;em&gt;Should I apply 'A Logical Approach to Discrete Math' to programming, and if so, how?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;My answer to the rephrased question is &lt;em&gt;No&lt;/em&gt;. Logic is a must but that approach doesn't work well.&lt;/p&gt;&#xA;&lt;p&gt;Back in the 90ies we tested the book by using it to teach undergrads. The outcome was discouraging. Most students got lost in the myriad of rewrite rules and failed to see the forest for the trees. While doing so, they missed out on heaps of other relevant material typically taught under the discrete maths umbrella.&lt;/p&gt;&#xA;&lt;p&gt;Nowadays, I'd argue that students are better served with a course along the lines of &lt;a href=&quot;https://courses.csail.mit.edu/6.042/spring18/mcs.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Lehman, Leighton, and Meyer's course at MIT&lt;/a&gt;, which is much stronger on intuitions and content. Combine that with &lt;a href=&quot;https://www.cs.ox.ac.uk/publications/books/PfS/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Morgan's 'Programming from Specifications&lt;/a&gt; for learning how to use logical reasoning to derive beautiful imperative code.&lt;/p&gt;&#xA;&lt;p&gt;For rigorous functional programming, equational reasoning comes in handy, yet I'd warn against pursuing that the Schneider &amp;amp; Gries way. There is no need to turn students into symbol-pushing rewrite systems. Computers are much better at that.&lt;/p&gt;&#xA;&lt;p&gt;Once the value of logic (so far, propositional and predicate logic) is established, other logics can be introduced, for instance, temporal logic in the context of a course on concurrency.&lt;/p&gt;&#xA;" OwnerUserId="13024" LastActivityDate="2023-11-07T10:18:30.987" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7923" PostTypeId="2" ParentId="7919" CreationDate="2023-11-07T17:12:42.850" Score="1" Body="&lt;p&gt;As is often the case, it depends on the goals of the course, the subject matter, the experience level of the students, the nature of the assignment and expected student outcomes.&lt;/p&gt;&#xA;&lt;p&gt;But generally speaking, if you allow students infinite runs on a test suite with no penalty and allow them to see output, the risk is that they'll learn to lean too heavily on the test suite and won't learn to think through their code mentally or anticipate edge cases. These skills are important in actual development, when they're the ones writing the test suite and need to imagine how the software will be used to anticipate as many failure states and usability issues as possible.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, if you pass restrictions on submissions, it can be discouraging to students, especially those first starting out. If the written specification isn't clear, students may feel that you're unfairly throwing obstacles in their way. In an extreme case, where no test harness is provided, even the basic header of the function can be frustrating to write. Providing basic tests ensures the input and output formats are respected, allowing the student to move on to the implementation logic.&lt;/p&gt;&#xA;&lt;p&gt;The parameters or knobs you have for autograding are typically (beyond penalizing repeated submissions mentioned in the question):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do you provide test cases used for final grading up front?&lt;/li&gt;&#xA;&lt;li&gt;Do you hide or show test case input to the student when they submit their code?&lt;/li&gt;&#xA;&lt;li&gt;Do you hide or show student code output sent to the grading suite?&lt;/li&gt;&#xA;&lt;li&gt;Do you hide or show correctness for submitted solutions?&lt;/li&gt;&#xA;&lt;li&gt;Do you limit the number or frequency of submissions?&lt;/li&gt;&#xA;&lt;li&gt;Do you penalize submissions beyond a limit?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In all cases, you can answer with &amp;quot;none, some, or all&amp;quot;. If &amp;quot;some&amp;quot;, then you can choose the extent.&lt;/p&gt;&#xA;&lt;p&gt;A reasonable common-case approach might be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Provide some small test cases to students in full to get them started&lt;/li&gt;&#xA;&lt;li&gt;Students can run the sample tests as many times as they want&lt;/li&gt;&#xA;&lt;li&gt;Students can see their input and output on sample tests&lt;/li&gt;&#xA;&lt;li&gt;Encourage students to supplement the sample tests with their own tests&lt;/li&gt;&#xA;&lt;li&gt;Reserve some test cases as &amp;quot;hidden&amp;quot; submission-only tests which typically cover edge cases and performance concerns that push the code to the limits of the written specification&lt;/li&gt;&#xA;&lt;li&gt;Possibly show output on hidden tests (keeping in mind that this can be abused to reveal inputs as well)&lt;/li&gt;&#xA;&lt;li&gt;Limit submissions to some reasonable amount, say, 25, to prevent brute-forcing the autograder&lt;/li&gt;&#xA;&lt;li&gt;Don't penalize repeated submissions, or, if you do, use a very generous threshold.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As always, be clear and consistent about how you're setting these knobs, both to yourself and to your students. Prepare to adjust the knobs after each cohort.&lt;/p&gt;&#xA;&lt;p&gt;Regardless of what you feel is appropriate, communicate how tests and grading work, then stick to it on each assignment. Start with an easy assignment to get students into the grading flow, then ramp up difficulty.&lt;/p&gt;&#xA;&lt;p&gt;If you do withhold information, or penalize or limit repeated attempts, explain why.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2023-11-07T17:28:39.717" LastActivityDate="2023-11-07T17:28:39.717" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7924" PostTypeId="2" ParentId="7919" CreationDate="2023-11-07T18:05:55.997" Score="1" Body="&lt;p&gt;I believe there is a case for limiting the number of submissions. As the feedback from each test cases shows the input, their output and the correct output, the students have all the information needed to run their own tests. They can change their code, try the input and see how it compares to the correct output. I don't believe it is useful to simply make a change and throw it at the autograder hoping the results are correct. A student is not learning debugging skills if they simply rely on the autograder.&lt;/p&gt;&#xA;&lt;p&gt;To do this, the instructor may specify two values: the time between submissions, and the total submissions over the life of the assignment. The instructor may choose to set neither and then the students have unlimited tries, throttled only by the turnaround of the autograder.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2023-11-07T18:05:55.997" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7925" PostTypeId="1" AcceptedAnswerId="7926" CreationDate="2023-11-16T12:12:19.193" Score="1" ViewCount="54" Body="&lt;p&gt;How do I learn it? Watching lectures haven't been helping a lot. I want to solve &amp;quot;solved problems&amp;quot; but I'm not finding anything that has solved problems.&lt;/p&gt;&#xA;&lt;p&gt;Please guide me. Complexity analysis of algorithms mean big oh, theta, omega... etc.&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2023-11-17T14:23:08.207" Title="Courses for understanding complexity analysis of algorithms" Tags="|algorithms|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7926" PostTypeId="2" ParentId="7925" CreationDate="2023-11-17T14:23:08.207" Score="2" Body="&lt;p&gt;Most textbooks have some discussion of solved problems along with the theory. They also have exercises for the students and some provide solutions to (some of) the exercises. But they are designed for classroom use in which student work is given feedback by an instructor. It is that feedback that you are missing and it is both necessary and difficult to get for someone studying on their own. That is why self study can be far less useful and efficient than taking a course with a skilled instructor.&lt;/p&gt;&#xA;&lt;p&gt;Note, importantly (importantly), that reading solutions isn't nearly the same thing as creating solutions. Learning (true learning) is an active sport, not a passive one. You can't learn this stuff any better than you can learn to swim by watching the olympics. But also note that those olympic swimmers worked with a coach to improve their form. They got feedback throughout their training.&lt;/p&gt;&#xA;&lt;p&gt;Repetition and feedback are key to learning. If you can find a way to get that feedback you will progress much faster. One way that might be open to you if you can't take a course is to find someone else with similar interests. Then do the work and exchange papers, giving feedback to each other. It isn't perfect, but better than nothing.&lt;/p&gt;&#xA;&lt;p&gt;And &amp;quot;unsolved&amp;quot; problems are unlikely to help you. A lot of people have probably been trying to solve them for a long time and they have already developed the necessary skills.&lt;/p&gt;&#xA;&lt;p&gt;Failing everything else, find a good textbook and carefully read the text. Then attempt the exercises there, which are tailored to the textual development.&lt;/p&gt;&#xA;&lt;p&gt;You can also write programs to implement the algorithms and instrument them to determine their behavior, though this, in itself, is a skill that needs to be learned. Count and report the important computations (tests, swaps, ...). Run on many data sets and evaluate the results to see if they match the theory. Much harder, actually, than just taking a course with a good instructor.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-11-17T14:23:08.207" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7928" PostTypeId="1" AcceptedAnswerId="7933" CreationDate="2023-11-19T17:26:52.820" Score="2" ViewCount="119" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; How important is the &lt;code&gt;try ... catch&lt;/code&gt; syntax when starting out with learning Java?&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Background&lt;/em&gt;: I'm teaching A level CS in the UK (age 16-18) and we're using Java as our primary language.  The students are already familiar with python.&lt;/p&gt;&#xA;&lt;p&gt;To teach common data types (such as queues and stacks), we code them.  Due to specification considerations, the underlying structure is an array (fixed length, single type).  There are a couple of places where we need to code a message that might not always work, such as removing an element from an empty queue or putting an element on a full stack.  In python, I'd just return &lt;code&gt;False&lt;/code&gt; from the method - it's not perfect but pedagogically it allows me to focus on other things.  In Java, I have to return something of the right signature, so if something goes wrong then I need to throw an exception.  But then in the main program I need to have a &lt;code&gt;try ... catch&lt;/code&gt; structure.&lt;/p&gt;&#xA;&lt;p&gt;The goal is to use the program to understand the data type, while getting a bit more experience with Java.  So I don't want to throw too much at the students all in one go, and &lt;code&gt;try ... catch&lt;/code&gt; is not something they are used to.  I understand its importance as a programming paradigm but am just trying to sequence the introduction of concepts and figure out where this one should be introduced.&lt;/p&gt;&#xA;" OwnerUserId="1637" LastActivityDate="2023-11-26T21:04:27.767" Title="When teaching Java, should I teach try-catch from the outset?" Tags="|java|programming-paradigms|" AnswerCount="5" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7929" PostTypeId="2" ParentId="7928" CreationDate="2023-11-19T20:17:07.460" Score="2" Body="&lt;p&gt;You may need to teach this concept, but I'd do it at the point it becomes be best option. If things can fail, some sort of test or similar action is needed.&lt;/p&gt;&#xA;&lt;p&gt;For a list of objects, one can return null in many cases (unless null is a valid value). If a list contains non-negatives you can return -1, say, and test for it. This implies you have already taught other structured statements, such as if-else, etc. So, such statements are no longer a mystery to them.&lt;/p&gt;&#xA;&lt;p&gt;After you have done this a few times you can discuss the more subtle cases.&lt;/p&gt;&#xA;&lt;p&gt;First, show them a program that fails (crashes) due to this sort of situation. Then show how a program can recover from such a situation with a try-catch. It shouldn't need to be a big step.&lt;/p&gt;&#xA;&lt;p&gt;First examples might do no more than give better error messages before halting. Once the structure and execution are clear you can do more with actual recovery.&lt;/p&gt;&#xA;&lt;p&gt;And, Python can &lt;em&gt;raise&lt;/em&gt; and catch exceptions also, in which case you might draw on their knowledge of that language.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-11-19T20:17:07.460" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7930" PostTypeId="1" AcceptedAnswerId="7931" CreationDate="2023-11-19T22:54:24.007" Score="1" ViewCount="49" Body="&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; I'm looking for a replacement for the primitive array data type in Java that works better with generic data types.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Background&lt;/em&gt;: I'm teaching A level CS in the UK (age 16-18) and we're using Java as our primary language. The students are already familiar with python.&lt;/p&gt;&#xA;&lt;p&gt;To teach some data types, we're coding them in Java. The specification regards a fixed-length, single type array as a primitive data type so to code, say, a queue we build a class with an array to hold the data in the queue and then add methods accordingly.  The array data type in Java matches that of the specification nicely, so this works quite well.&lt;/p&gt;&#xA;&lt;p&gt;Partly for my own interest (I have experience of other languages, but haven't done much Java before) but also because I like to have an example for the students of &amp;quot;what if you wanted to do a bit more&amp;quot;, then I wanted to extend my queue class to have a generic type.  But this seems quite complicated since the primitive array type doesn't work well with generic types (this is well explored over on StackOverflow, see &lt;a href=&quot;https://stackoverflow.com/questions/529085/how-to-create-a-generic-array-in-java&quot;&gt;https://stackoverflow.com/questions/529085/how-to-create-a-generic-array-in-java&lt;/a&gt; for example) - unlike in other similar languages, such as C#.&lt;/p&gt;&#xA;&lt;p&gt;So my question is as to whether there is a replacement for the array data type in Java which is sufficiently similar to array that it doesn't change the learning experience (so, single data type and fixed length) but which can take a generic type.&lt;/p&gt;&#xA;" OwnerUserId="1637" LastActivityDate="2023-11-20T00:07:25.553" Title="Is there an array-like data type in Java that can cope with generic types better than the built-in array?" Tags="|java|arrays|data-types|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7931" PostTypeId="2" ParentId="7930" CreationDate="2023-11-20T00:07:25.553" Score="2" Body="&lt;p&gt;You probably want an &lt;a href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;ArrayList&lt;/a&gt;. They can be resized, however. Python has a similar thing.&lt;/p&gt;&#xA;&lt;p&gt;You should become familiar with the oracle docs of which the above link is a part. They are quite informative.&lt;/p&gt;&#xA;&lt;p&gt;An older type is the Vector, but it has been largely replaced by ArrayList.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-11-20T00:07:25.553" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7932" PostTypeId="2" ParentId="7928" CreationDate="2023-11-20T09:54:37.067" Score="2" Body="&lt;p&gt;This answer is based on a software engineering point of view, in not teaching things that contradict best practices. (And there are lots of misconceptions and bad practices around exception handling, both in &amp;quot;professional&amp;quot; code as well as in lots of web resources, showing that many developers were trained the wrong way.)&lt;/p&gt;&#xA;&lt;p&gt;To me the most important concept is that a method has a contract, something it is supposed to do (documented in a Javadoc comment), and that sometimes it cannot fulfill that contract, which it MUST communicate to its caller, and (by modern best practice) SHOULD do by throwing an exception.&lt;/p&gt;&#xA;&lt;p&gt;As soon as methods arise that can really fail (and that's how I understand your question), please throw exceptions. Special return values like &lt;code&gt;-1&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; have been the standard in the 1970s, and there is good reason why nowadays they have been replaced by exceptions.&lt;/p&gt;&#xA;&lt;p&gt;Of course, going into details of exception handling will take quite some time in your course. But you can use a shortcut with something like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Here's a method that can fail. When we detect the failure situation,&#xA;we &lt;code&gt;throw new Exception(&amp;quot;description text&amp;quot;);&lt;/code&gt;. That's a special way of exitting,&#xA;telling the caller that we failed. It has to be declared&#xA;in the method header with a &lt;code&gt;throws Exception&lt;/code&gt; clause. Further on,&#xA;we'll learn that there are lots of different exception types, and&#xA;various ways what to do in case of an exception, instead of aborting&#xA;the whole program. But for the moment, that's enough for us to know.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Don't catch exceptions. Catching an exception means that a caller can fulfill its job even though the callee failed, which is rarely true. So this should only be covered under a &amp;quot;Recovering from problems&amp;quot; topic.&lt;/p&gt;&#xA;&lt;p&gt;If you don't want to follow this path, and instead want to return a special value, make sure that every caller checks whether it got the special return value, and then returns with its special return value and so on. Experience told us that this was very often forgotten, making the following steps produce nonsense, and leading to bugs that were hard to analyze and fix. This finally led to the wide-spread adoption of the &amp;quot;exceptions&amp;quot; pattern.&lt;/p&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-11-20T09:54:37.067" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7933" PostTypeId="2" ParentId="7928" CreationDate="2023-11-21T20:48:23.867" Score="2" Body="&lt;p&gt;I'm not sure what the progression is in your education system, but the one I went through to learn programming as a complete novice in Java (~2015, in the USA, at a community college) went roughly like this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Semester 1: hello world, variables, primitive types, operations, conditions, loops, arrays, lists, simple methods like a temperature converter, basic language features like rounding numbers and algorithms like searching for an item in a list and bubble sort.&lt;/li&gt;&#xA;&lt;li&gt;Semester 2: classes, multi-file programs, simple GUI programs (Java swing), basic recursion with integers or arrays, error handling, 2d arrays and basic Java collections.&lt;/li&gt;&#xA;&lt;li&gt;Semester 3: data structures and algorithms, including time complexity, bags, linked lists, stacks, queues, trees, graphs and operations on these data structures like sorting, searching, adding, removing, inserting and internal operations necessary to maintain the integrity of the data structure.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;High school students I work with nowadays tend to go through something similar, except they start with Python in semester 1, or maybe with Scratch if they're younger, (not counting the countless possible detours into robotics, Lego Mindstorms, Minecraft modding, etc).&lt;/p&gt;&#xA;&lt;p&gt;In any case, by the time students learn stacks and queues, it's assumed that the basic language features like error handling have been covered to the extent that students have at least a fundamental level of proficiency/familiarity with them. If this is not the case, it shouldn't be too much of a stretch to cover a topic like error handling, at least in a way that makes it minimally usable within the context of your class.&lt;/p&gt;&#xA;&lt;p&gt;On a deeper level, if it does feel like a stretch to &amp;quot;ramp up&amp;quot; students on error handling, and they aren't arriving with any experience in it, maybe your curriculum is teaching data structures too early, without adequate fundamentals in place. A data structure course will be painful for any students that aren't comfortable with classes or collections, for example. Rudimentary error handling seems to fit into this prerequisite category.&lt;/p&gt;&#xA;&lt;p&gt;Method contracts are very important for data structures and algorithms, as &lt;a href=&quot;https://cseducators.stackexchange.com/a/7932/9426&quot;&gt;this answer&lt;/a&gt; points out. Thinking about how a method should behave in exceptional cases is important. Promoting language conventions is important. The habits and skills students develop in reimplementing classic data structures teach key software engineering principles which students will likely use in their career more than the algorithm logic.&lt;/p&gt;&#xA;&lt;p&gt;Most textbooks for third-semester data structures and algorithms use errors. Returning false to indicate failure won't help you searching for an element in a &lt;code&gt;Boolean&lt;/code&gt; collection. Returning null can occasionally be acceptable, but means that data structures can't store null values, and calling code needs to assert or handle the possibility of a failure, effectively approximating &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt; but without the explicitness and safety net. Returning -1 is standard for &amp;quot;index of&amp;quot; searches, because it's not a possible return value.&lt;/p&gt;&#xA;&lt;p&gt;Sure, some language like JavaScript tend to avoid throwing errors (popping an empty array returns undefined, for example: &lt;code&gt;[].pop()&lt;/code&gt;), but I don't think this is necessarily a good way to teach data structures and algorithms in Java. The contracts are less clear and subtle bugs can easily occur. In a course that does use JS or Python to teach data structures, I'd be more inclined to follow the conventions of the language. Along that line of thought, if in doubt when teaching a Java data structures course, it seems reasonable to follow the contracts given by &lt;code&gt;java.util.Collections&lt;/code&gt;. The merit of using Java for teaching is the explicitness of the language, types, generics, clear method contracts, named exceptions, class organization, and so forth. Taking pains to avoid any of these concepts feels like a missed opportunity to use the language as it was designed.&lt;/p&gt;&#xA;&lt;p&gt;Given your circumstances, if you feel &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt; is too much for your students to handle, you can still teach students about errors in general and let them throw uncaught errors. You can provide test harnesses or boilerplate that uses &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt; or JUnit assertions as examples. In some ways, throwing and letting the program fail is less work than handling exceptional cases at every branch after every method call that may fail.&lt;/p&gt;&#xA;&lt;p&gt;You can simplify exceptions in the following ways, summarizing and extending ideas from above:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In general, permit programs to crash, preferably with a clear message. This is the lesser evil than continuing on with unhandled illegal state. If there's a contract violation, students should report it as soon as possible rather than allow the program to potentially silently mess up critical data or crash in a spot far removed from the violation. &lt;code&gt;catch&lt;/code&gt; is a necessary but dangerous tool that can be misused to suppress problems.&lt;/li&gt;&#xA;&lt;li&gt;Use only &lt;code&gt;throw&lt;/code&gt; and &lt;code&gt;throws&lt;/code&gt; and de-emphasize or skip &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Offer test harnesses and boilerplate that handles errors with &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt; or JUnit assertions. From the start, novice Java students won't understand what &lt;code&gt;public static void main(String[] args)&lt;/code&gt; means, so they're used to a certain amount of accepting things on faith temporarily.&lt;/li&gt;&#xA;&lt;li&gt;Don't worry too much about error classes and inheritance. Explicit consideration for the exceptional state is the main part, so just using &lt;code&gt;IllegalStateException&lt;/code&gt; or even &lt;code&gt;Exception&lt;/code&gt; can be permissible for the purposes of simplicity.&lt;/li&gt;&#xA;&lt;li&gt;If you do catch errors, maybe allow &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/319088/is-indiscriminately-catching-exceptions-pokemon-exception-handling-ever-accept&quot;&gt;Pokemon exception handling&lt;/a&gt; for starters, with a cautionary note.&lt;/li&gt;&#xA;&lt;li&gt;If &lt;code&gt;throw&lt;/code&gt; is too much, stick to &lt;code&gt;assert&lt;/code&gt;. This ensures the students are thinking carefully about pre/post conditions and contracts, without any syntactical complexity or work to be done in the caller. The gotchas here, though, are that assertions are disabled by default, and that &lt;code&gt;assert&lt;/code&gt; statements &lt;a href=&quot;https://stackoverflow.com/a/47131532/6243352&quot;&gt;should be side-effect free&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here are some code snippets to help make the above suggestions more concrete.&lt;/p&gt;&#xA;&lt;p&gt;Stage 1: just add &lt;code&gt;assert&lt;/code&gt; (and compile with &lt;code&gt;-ea&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;import java.util.ArrayList;&#xA;&#xA;class Stack&amp;lt;T&amp;gt; {&#xA;    private ArrayList&amp;lt;T&amp;gt; stack;&#xA;    &#xA;    public Stack() {&#xA;        stack = new ArrayList&amp;lt;&amp;gt;();&#xA;    }&#xA;&#xA;    public void push(T element) {&#xA;        stack.add(element);&#xA;    }&#xA;&#xA;    public T pop() {&#xA;        assert !stack.isEmpty() : &amp;quot;Tried to pop an empty stack&amp;quot;;&#xA;        return stack.remove(stack.size() - 1);&#xA;    }&#xA;}&#xA;&#xA;public class Main {&#xA;    public static void main(String[] args) {&#xA;        var stack = new Stack&amp;lt;Integer&amp;gt;();&#xA;        stack.push(1);&#xA;        stack.push(2);&#xA;        System.out.println(stack.pop());&#xA;        System.out.println(stack.pop());&#xA;        System.out.println(stack.pop()); // crashes&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You could go a step further and add pre/post condition assertions to help solidify the contract.&lt;/p&gt;&#xA;&lt;p&gt;If the asserts stopping the test harness is a problem, you can have students comment out and label these lines by the error they trigger, disable the &lt;code&gt;-ea&lt;/code&gt; flag or use separate harness programs for each assertion failure &amp;quot;test&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Stage 2: add &lt;code&gt;throw&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;import java.lang.IllegalStateException;&#xA;import java.util.ArrayList;&#xA;&#xA;class Stack&amp;lt;T&amp;gt; {&#xA;    private ArrayList&amp;lt;T&amp;gt; stack;&#xA;    &#xA;    public Stack() {&#xA;        stack = new ArrayList&amp;lt;&amp;gt;();&#xA;    }&#xA;&#xA;    public void push(T element) {&#xA;        stack.add(element);&#xA;    }&#xA;&#xA;    public T pop() {&#xA;        if (stack.isEmpty()) {&#xA;            throw new IllegalStateException(&amp;quot;Tried to pop an empty stack&amp;quot;);&#xA;        }&#xA;&#xA;        return stack.remove(stack.size() - 1);&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Optionally, provide a simple test harness for the student with &lt;code&gt;try&lt;/code&gt;/&lt;code&gt;catch&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-java prettyprint-override&quot;&gt;&lt;code&gt;public class Main {&#xA;    public static void main(String[] args) {&#xA;        var stack = new Stack&amp;lt;Integer&amp;gt;();&#xA;        stack.push(1);&#xA;        stack.push(2);&#xA;        System.out.println(stack.pop());&#xA;        System.out.println(stack.pop());&#xA;&#xA;        try {&#xA;            System.out.println(stack.pop());&#xA;        }&#xA;        catch (IllegalStateException ex) {&#xA;            System.err.println(ex); &#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Hopefully one of these seems doable.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2023-11-21T21:15:43.053" LastActivityDate="2023-11-21T21:15:43.053" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7934" PostTypeId="2" ParentId="7546" CreationDate="2023-11-22T08:34:40.373" Score="0" Body="&lt;p&gt;there is a new startup that does that:&#xA;&lt;a href=&quot;https://edu.cospaces.io/Studio&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://edu.cospaces.io/Studio&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="14075" LastActivityDate="2023-11-22T08:34:40.373" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7935" PostTypeId="2" ParentId="7928" CreationDate="2023-11-26T20:50:35.180" Score="1" Body="&lt;p&gt;In Java and many other languages that followed it, Exceptions are un-exceptional: e.g. it is not exceptional to get to the end of a file.&lt;/p&gt;&#xA;&lt;p&gt;Your example of removing an item from an empty list, is a contract pre-condition violation. Add a method &lt;code&gt;bool list.is_empty()&lt;/code&gt;. Then a pre-condition &lt;code&gt;!is_empty()&lt;/code&gt;. If the precondition is not met, then throw an error. Don't catch it, as it indicates a programming error: the program should have checked the pre-condition.&lt;/p&gt;&#xA;&lt;p&gt;More importantly, are exceptions in the syllabus?&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-11-26T20:50:35.180" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7936" PostTypeId="2" ParentId="7928" CreationDate="2023-11-26T21:04:27.767" Score="1" Body="&lt;p&gt;Create a type value or error (but nothing else: so not object)&lt;/p&gt;&#xA;&lt;p&gt;e.g.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;class value_or_error {&#xA;    private int _value;&#xA;    private bool _is_error;&#xA;&#xA;    public bool is_error(){&#xA;       return _is_error();&#xA;    }&#xA;    public int value() {&#xA;       if _is_error then throw;&#xA;       return _value;&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Sorry if it does not compile (no javac installed)&lt;/p&gt;&#xA;" OwnerUserId="204" LastActivityDate="2023-11-26T21:04:27.767" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7937" PostTypeId="1" CreationDate="2023-11-27T07:46:43.677" Score="2" ViewCount="68" Body="&lt;p&gt;I am looking for a coding exercise that could be assigned to students and will give them practice with writing &lt;a href=&quot;https://en.wikipedia.org/wiki/Memory_safety&quot; rel=&quot;nofollow noreferrer&quot;&gt;memory-safe&lt;/a&gt; code.  In particular, I am looking for some exercise that students would have to implement in C, and where if they aren't cautious, it would be easy to introduce a memory-safety vulnerability -- e.g., an array out-of-bounds bug, or a &lt;a href=&quot;https://en.wikipedia.org/wiki/Buffer_overflow&quot; rel=&quot;nofollow noreferrer&quot;&gt;buffer overrun vulnerability&lt;/a&gt;.  Can anyone suggest a programming exercise that might be suitable?&lt;/p&gt;&#xA;&lt;p&gt;I am hoping that having the experience of writing code that turns out to contain such a vulnerability might motivate interest in tools and techniques to assist with ensuring code is memory-safe.&lt;/p&gt;&#xA;&lt;p&gt;To give an analogy: one classic exercise is to implement binary search in a sorted array.  If you're not careful, it's easy to introduce an off-by-one bug into your code, so this is a good exercise to motivate loop invariants as a technique for writing correct code.  Is there a coding exercise like this, aimed not at off-by-one bugs and loop variants, but at memory safety or buffer overruns or array bounds errors?&lt;/p&gt;&#xA;" OwnerUserId="1106" LastEditorUserId="1106" LastEditDate="2023-11-28T05:12:20.730" LastActivityDate="2023-12-11T21:50:10.090" Title="Coding exercises that test memory safety" Tags="|programming|exercises|security|" AnswerCount="1" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7938" PostTypeId="1" CreationDate="2023-11-27T10:33:26.213" Score="1" ViewCount="87" Body="&lt;p&gt;According to a computer science teacher, it is beneficial to create methods that fit within a single screen. While I understand the importance of crafting concise and straightforward functions that can be easily comprehended at a glance, the question arises: why is the limit set at precisely one screen? How should one approach writing a switch-case condition with multiple lines of code or handling substantial hardcoded data?&lt;/p&gt;&#xA;" OwnerUserId="14083" LastActivityDate="2023-11-27T12:48:38.127" Title="Why is it considered undesirable for a function to exceed the dimensions of a single screen?" Tags="|programming|" AnswerCount="2" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7939" PostTypeId="2" ParentId="7938" CreationDate="2023-11-27T12:28:42.137" Score="3" Body="&lt;p&gt;There are lots of different coding standards. Typically, every workplace and project tends to have its own. So, &amp;quot;fit within a single screen&amp;quot; is not a universally-adopted guideline, but something that can quite plausibly be chosen regarding method size and complexity.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;While I understand the importance of crafting concise and&#xA;straightforward functions that can be easily comprehended at a glance, [...]&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;That's the point. If you allow for methods to exceed the screen size, it's no longer possible to even see all of it at once.&lt;/p&gt;&#xA;&lt;p&gt;Of course, &amp;quot;screen size&amp;quot; is hard to define. Which screen resolution? Which font and size and line spacing? How much space dedicated to task bar, window frame, toolbar and so on?&lt;/p&gt;&#xA;&lt;p&gt;It's all about readability, and these rules should be taken as guidelines. Typically, in a method that spans e.g. 100 lines of code, you can identify subtasks and give them names that describe the task, i.e. to introduce methods for these subtasks.&lt;/p&gt;&#xA;&lt;p&gt;Or from another point of view:&lt;/p&gt;&#xA;&lt;p&gt;By introducing classes and methods, we create the problem-specific language that we want to use when writing our higher-level solutions. Don't take the language as a fixed thing. No, every class and method that you write adds a word to the vocabulary of your problem-specific language, and it's your choice what that language finally looks like.&lt;/p&gt;&#xA;&lt;p&gt;So, if there is a method that you do not like (e.g. because it is too long or otherwise too hard to understand), then:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Either this method in itself does too much. As a hint, look at its name. Is that a word that you would like to have in your vocabulary, expressing some concise action? Or is it a mess of things that just accidentally happen one after another in a given program?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Or the steps necessary to fulfill its jobs are just so complicated that they cannot be expressed in a few lines, using the language at hand. If you were free to invent your own language, how would you write the method? It's quite possible that you can come close to that language, by introducing the appropriate methods and letting the method under consideration call them.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To your concrete questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;A switch-case condition with multiple lines of code, I'd break down in one method call per case. E.g. in a &lt;code&gt;paint()&lt;/code&gt; method that switches on type, the methods might become &lt;code&gt;paintRectangle()&lt;/code&gt;, &lt;code&gt;paintLine()&lt;/code&gt;, &lt;code&gt;paintCircle()&lt;/code&gt; and so on. Then the &lt;code&gt;paint()&lt;/code&gt; method still has the switch-case, but the individual blocks are only one-liners now, with a name that clearly states their purpose.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;If you need substantial handcoded data, make sure the array/structure/whatever gets a name, either by making the data a constant or a read-only static field (whatever your programming language calls it) or the result of a &lt;code&gt;createMyHandcodedData()&lt;/code&gt; method. And if it isn't obvious why the data have exactly the content you handcoded, explain it in a comment.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-11-27T12:28:42.137" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7940" PostTypeId="2" ParentId="7938" CreationDate="2023-11-27T12:48:38.127" Score="1" Body="&lt;p&gt;There is an issue beyond screen size that is important to consider. In fact, &amp;quot;screen size&amp;quot; seems awfully long and would be for the (Java, Python,,,) code that I write. Anything longer than five lines or so is too much and much (not all - see below) of my code is like that. But, it isn't artificially broken up just to be short. Each method captures a single idea and the code isn't complex (no/few nested structures for example). The complexity is in the interactions of objects.&lt;/p&gt;&#xA;&lt;p&gt;The real problem is that our minds have a limited ability to juggle deep complexity with many parts. But deeply nested code structures are like that, so writing short(er) methods makes it harder to exceed the &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Magical_Number_Seven%2C_Plus_or_Minus_Two&quot; rel=&quot;nofollow noreferrer&quot;&gt;magic rule of seven&lt;/a&gt;. Then keeping a method to a single page (actually much less) is easy and natural.&lt;/p&gt;&#xA;&lt;p&gt;So, I would state a somewhat different rule for my students: minimize the nesting of code in any given method. If it is more than two it starts to be harder to grok and easier to introduce errors. That is also the &lt;a href=&quot;https://en.wikipedia.org/wiki/KISS_principle&quot; rel=&quot;nofollow noreferrer&quot;&gt;KISS principle&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, while it is useful to be able to see a method all at once without scrolling, the more important thing is that you can &lt;em&gt;understand&lt;/em&gt; the method yourself without needing to take notes or re-consider or wander off into dead ends.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Some code doesn't work that way, however. The logic of a program can usually be constructed with (very) short methods using modern &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_design_pattern&quot; rel=&quot;nofollow noreferrer&quot;&gt;design patterns&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But GUI code, depending on pre-built libraries is often long and fairly boring. There may not be much structure to the code, but it can require long sequences of statements to build a user interface. That code can be long (pages, perhaps) but is easy to understand.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Note (joke) about short methods. Have a team of 10 people write a 1000 line program by having each person write 100 lines, independently. Person A writes the first 100 lines while person B writes the next 100 lines, etc, all together.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2023-11-27T12:48:38.127" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7941" PostTypeId="2" ParentId="1226" CreationDate="2023-12-01T17:29:38.747" Score="1" Body="&lt;p&gt;This year, I used the example of student grades that seemed to work pretty well (C++):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;Student&lt;/code&gt; class has a private &lt;code&gt;_grade&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Every student can see every other student's grade.&lt;/li&gt;&#xA;&lt;li&gt;However, an &lt;code&gt;InsuranceCompany&lt;/code&gt; cannot see a student's grade.&lt;/li&gt;&#xA;&lt;li&gt;For convenience, I want that a &lt;code&gt;Teacher&lt;/code&gt; can see and change a &lt;code&gt;Student&lt;/code&gt;'s grade. For this reason, the &lt;code&gt;Student&lt;/code&gt; defines the &lt;code&gt;Teacher&lt;/code&gt; as &lt;code&gt;friend&lt;/code&gt;.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Of course, the &lt;code&gt;Teacher&lt;/code&gt; does not define the &lt;code&gt;Student&lt;/code&gt; as &lt;code&gt;friend&lt;/code&gt;, so the student cannot see the teacher's grade.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Regarding &lt;code&gt;protected&lt;/code&gt;, one can use students of specific programs or levels.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The fact that &amp;quot;every student can see each other student's grade&amp;quot; seemed to concern my students and stick quite well, triggering interesting questions (&lt;em&gt;&amp;quot;but how I can do that per object?&amp;quot;&lt;/em&gt;).&lt;/p&gt;&#xA;" OwnerUserId="14093" LastActivityDate="2023-12-01T17:29:38.747" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7942" PostTypeId="1" AcceptedAnswerId="7953" CreationDate="2023-12-06T02:50:14.070" Score="2" ViewCount="202" Body="&lt;p&gt;I am currently a senior in high school who runs a club centered around teaching C++ to interested people. However, my fellow board members and I have recognized that our style of teaching the programming language is very sequential and lecture-like if that makes sense.&#xA;If anyone has experience in running clubs, teaching software development and/or programming languages, or if you just have ideas that might benefit the club as a whole, it'd be much appreciated.&lt;/p&gt;&#xA;" OwnerUserId="14107" LastEditorUserId="27" LastEditDate="2023-12-13T14:31:55.060" LastActivityDate="2024-02-12T17:49:18.413" Title="Teaching a coding language in an interactive way for a school club" Tags="|programming|lesson-ideas|object-oriented-paradigm|c++|" AnswerCount="2" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7943" PostTypeId="1" CreationDate="2023-12-06T14:37:16.603" Score="1" ViewCount="42" Body="&lt;p&gt;Say problems like this. I am not looking to the solution of this problem alone. I am looking for a mindset of visualization that you have devised as a trick for yourself.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Find the value of q in terms of n?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;function fun(n) {&#xA;  let i,&#xA;    j,&#xA;    p,&#xA;    q = 0;&#xA;  for (i = 1; i &amp;lt;= n; ++i) {&#xA;    p = 0;&#xA;    for (j = n; j &amp;gt; 1; j = j / 2) {&#xA;      ++p;&#xA;    }&#xA;    for (k = 1; k &amp;lt; p; k = k * 2) {&#xA;      ++q;&#xA;    }&#xA;  }&#xA;  return q;&#xA;}&#xA;&#xA;let val_q = fun(36);&#xA;console.log(val_q);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I want to learn how to learn it.&lt;/p&gt;&#xA;&lt;p&gt;Like is there some visualization techniques that you've devised that helps in solving these kind of problems by hand.&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2023-12-06T14:37:16.603" Title="Is there any visualization techniques to solve time complexity problems?" Tags="|algorithms|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7945" PostTypeId="1" CreationDate="2023-12-10T12:50:18.397" Score="1" ViewCount="44" Body="&lt;p&gt;I am a cse undergrad and I have recently finished basics of c++ language to further improve my command on it I was looking forward to making a project.&#xA;I am thinking of a simple ray tracer .I know c++ basics , basic&#xA;Data-structures and some algorithms . Is my project overambitious? or should I first learn more before tackling it?&lt;/p&gt;&#xA;" OwnerUserId="13905" LastActivityDate="2023-12-10T12:50:18.397" Title="Beginner project in c++" Tags="|programming|project|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7946" PostTypeId="2" ParentId="7937" CreationDate="2023-12-11T21:50:10.090" Score="3" Body="&lt;h3&gt;Exercises for array bounds&lt;/h3&gt;&#xA;&lt;p&gt;String manipulation code very often runs into array bounds.&lt;/p&gt;&#xA;&lt;p&gt;For simple exercises, arrange two-part problems where the first part allocates memory for a string and the second part modifies that string in place. This forces students to distinguish between the data size and the allocated size. For example: read a line from a file by growing a buffer until you find a newline; then perform some transformation that might expand the line (e.g. a substring replacement or a format conversion).&lt;/p&gt;&#xA;&lt;p&gt;For some more complex exercises, do some parsing of binary protocols with length-value encodings. This is a very common source of buffer overflows in real-world code. For example, &lt;a href=&quot;https://www.kb.cert.org/vuls/id/512705&quot; rel=&quot;nofollow noreferrer&quot;&gt;one that allowed exploiting computers provided that they were powered off&lt;/a&gt;! (A bug in a Wake-on-LAN implementation in network card firmware.) This forces students to distinguish between the purported size (encoded in the string) and the actual size (bounded by the size of the complete input).&lt;/p&gt;&#xA;&lt;h3&gt;Exercises for memory management&lt;/h3&gt;&#xA;&lt;p&gt;In high-quality C code bases, buffer overflows tend to be rare, because it's not that hard to be disciplined about them. Memory management bugs are harder. Manual memory management is hard, and often the reason you need it is that you can't be very disciplined about it. So you should train your students to watch out for use-after-free and double-free, as well as memory leaks.&lt;/p&gt;&#xA;&lt;p&gt;A very common case for a memory management bug is a program that needs to allocate two resources (such as two malloc'ed objects), and where a recoverable error can happen either after obtaining the first resource or after obtaining the second resource.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If the cleanup code tries to access the a resource whose allocation failed, you may have an access to uninitialized memory (possibly leading to dereferencing an arbitrary pointer object). In more disciplined code, where all pointers are initialized to &lt;code&gt;NULL&lt;/code&gt;, you have a null pointer dereference.&lt;/li&gt;&#xA;&lt;li&gt;If the cleanup code tries to access one of the resources after it has deallocated it, you may have a use-after-free.&lt;/li&gt;&#xA;&lt;li&gt;If the cleanup code ends up freeing a resource twice (e.g. due to partial cleanup on a specific error path followed by a generic cleanup), you may have a double free.&lt;/li&gt;&#xA;&lt;li&gt;If some cleanup code is missing, you may have a memory leak.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here are a few examples of long-lived programs that allocate multiple resources for a single task:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A server allocates a send buffer and a receive buffer.&lt;/li&gt;&#xA;&lt;li&gt;A data processing server, or a data processing interactive tool, that allocates multiple buffers to process each request.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Memory management errors also arise in code that manipulates complex data structures (trees, linked lists, hash tables, graphs, …). But that tends to make for more advanced exercises because the parts about the data structure itself are usually complex.&lt;/p&gt;&#xA;&lt;h3&gt;Tooling&lt;/h3&gt;&#xA;&lt;p&gt;Please teach your students tooling that can help them. As a practitioner, I find &lt;a href=&quot;https://github.com/google/sanitizers/wiki/AddressSanitizer&quot; rel=&quot;nofollow noreferrer&quot;&gt;ASan (Address Sanitizer)&lt;/a&gt; very useful. It will find most out-of-bounds accesses, use-after-free/double-free and memory leaks as long as there is a test case that reaches them.&lt;/p&gt;&#xA;" OwnerUserId="124" LastActivityDate="2023-12-11T21:50:10.090" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7947" PostTypeId="1" CreationDate="2023-12-18T18:45:47.210" Score="2" ViewCount="156" Body="&lt;p&gt;In general I don't mind them looking up stuff online, but the other day a bunch of them really ticked me off when they found a solution online that was pretty much explicitly marked as &amp;quot;bad idea&amp;quot; in the lecture slides &amp;amp; book. What explains this tendency to search for everything online and what do I do against it?&lt;/p&gt;&#xA;&lt;p&gt;In case you're interested: the problem was &amp;quot;how to generate random numbers in C++&amp;quot;. ChatGPT and other sources give you a nice bit of code with a modern Mersenne Twister generator, properly seeded. ChatGPT gives you a suitable main program that demonstrates it. Sure. But don't put those lines in a function because then you re-seed the generator every time you call the function, and you basically use the seed function as the generator. Solution: declare everything &lt;code&gt;static&lt;/code&gt;. It's in my notes.&lt;/p&gt;&#xA;&lt;p&gt;Other example. They do several exercises about C++ &amp;quot;smart pointers&amp;quot; which are (repeatedly) told are better than old-style C pointers, which I in fact don't teach. Still the latter show up in project code. Not in homework code, because there I explicitly tell them what to do.&lt;/p&gt;&#xA;&lt;p&gt;How about I conclude lectures with &amp;quot;Idioms to avoid and that will be downgraded&amp;quot;?&lt;/p&gt;&#xA;" OwnerUserId="6346" LastEditorUserId="6346" LastEditDate="2023-12-19T14:27:01.913" LastActivityDate="2024-02-03T02:27:25.233" Title="How do I get students to look at course materials, rather than google?" Tags="|c++|online|pointers|random|" AnswerCount="2" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7948" PostTypeId="2" ParentId="7947" CreationDate="2023-12-19T09:52:55.910" Score="4" Body="&lt;p&gt;TL;DR Alas, that won't happen.&lt;/p&gt;&#xA;&lt;p&gt;It's very hard for authors to make their information as accessible as Google or ChatGPT results. So, when competing with these resources, you'll always loose in the typical lazy student/developer mindset. The radical conclusion would be to give up on lecture slides or books &lt;strong&gt;as a reference resource&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Better embrace Google &amp;amp; Co and have some lectures about how to best use them. Teach your students how they can decide whether an example found online matches the current task.&lt;/p&gt;&#xA;&lt;p&gt;Insist that software has to fulfill requirements, and e.g. random number generators have to produce a nice distribution of values if called multiple times. Provide a testbed that checks whether the students' random number generators fulfill at least the most basic properties.&lt;/p&gt;&#xA;&lt;p&gt;Teach them what to do if their solution attempt fails, i.e. analyzing and debugging their programs.&lt;/p&gt;&#xA;&lt;p&gt;And regarding random number generators:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Is it important for a professional developer to be able to write a good random number generator? I don't think so. Never written one in my 30+ yrs developer career.&lt;/li&gt;&#xA;&lt;li&gt;Is it important to understand what properties a good random number generator should have? Absolutely. Especially important is the ability to switch between two different usages: an unpredictable behaviour in production code, and a reproducible one for testing purposes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;" OwnerUserId="3966" LastActivityDate="2023-12-19T09:52:55.910" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7949" PostTypeId="1" CreationDate="2023-12-26T19:46:04.857" Score="0" ViewCount="22" Body="&lt;p&gt;I have a JavaScript library with LOTS of demos. And I'm going to teach a group of students on how to use it next summer.&lt;/p&gt;&#xA;&lt;p&gt;I want the students to be able to edit &amp;amp; run the demos in the browser without downloading the repo to their computers.&lt;/p&gt;&#xA;&lt;p&gt;This is to avoid having them to learn how to use the desktop with all the subtleties of a dev server, git &amp;amp; github, node, npm, bundling, OS differences and so on. The students are noobies and I need to keep it simple.&lt;/p&gt;&#xA;&lt;p&gt;How can I use a playground (codepen, jsben, jsfiddle, etc) to edit &amp;amp; run the demos?&lt;/p&gt;&#xA;&lt;p&gt;The repo &lt;a href=&quot;https://code.agentscript.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;is here&lt;/a&gt;, and the typical demo directory would be &lt;a href=&quot;https://code.agentscript.org/views2/&quot; rel=&quot;nofollow noreferrer&quot;&gt;like this&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="14153" LastActivityDate="2023-12-26T19:46:04.857" Title="How do I use a playground to clone and modify demos from a github repo?" Tags="|javascript|github|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7951" PostTypeId="2" ParentId="7942" CreationDate="2023-12-29T10:46:00.500" Score="2" Body="&lt;p&gt;I teach python using &lt;a href=&quot;https://jupyterlab.readthedocs.io/en/stable/&quot; rel=&quot;nofollow noreferrer&quot;&gt;jupyter-lab&lt;/a&gt;. I can create my notebooks in jupyter with interactive exercises and share them with my students.&lt;/p&gt;&#xA;" OwnerUserId="14158" LastActivityDate="2023-12-29T10:46:00.500" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7953" PostTypeId="2" ParentId="7942" CreationDate="2024-01-10T02:04:26.190" Score="6" Body="&lt;p&gt;Lectures? Boring.&lt;/p&gt;&#xA;&lt;p&gt;Give me a puzzle. Who can modify this code so the computer says their name? Can you make it add 2 plus 2? How would you get it to list prime numbers?&lt;/p&gt;&#xA;&lt;p&gt;Show me the challenge. Then reveal the tools. Do it this way and I’ll stop asking if this will be on the test.&lt;/p&gt;&#xA;" OwnerUserId="1401" LastActivityDate="2024-01-10T02:04:26.190" CommentCount="12" ContentLicense="CC BY-SA 4.0" />
  <row Id="7955" PostTypeId="1" CreationDate="2024-01-15T09:08:29.977" Score="2" ViewCount="140" Body="&lt;p&gt;How to learn/teach what does &lt;span class=&quot;math-container&quot;&gt;$O(n)$&lt;/span&gt; etc. means when one measures algorithmic complexity? I mean, if &lt;span class=&quot;math-container&quot;&gt;$f$&lt;/span&gt; is a function in mathematical sense, then &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt; notation is defined rigorously in the book &amp;quot;Asymptotic Analysis&amp;quot; by J.D. Murray. But sometimes computer science teachers gives an algorithm and says its time complexity is for example &lt;span class=&quot;math-container&quot;&gt;$O(n)$&lt;/span&gt;. But do we need a mathematical function &lt;span class=&quot;math-container&quot;&gt;$f$&lt;/span&gt; that gives a pseudocode as an input and a mathematical function &lt;span class=&quot;math-container&quot;&gt;$g$&lt;/span&gt; as an output and then we say &lt;span class=&quot;math-container&quot;&gt;$f(algorithm)=f(g)=O(something)$&lt;/span&gt;?&lt;/p&gt;&#xA;" OwnerUserId="14201" LastEditorUserId="14201" LastEditDate="2024-01-15T09:11:42.693" LastActivityDate="2024-01-23T10:27:57.787" Title="How to teach algorithm performances can be measured as $O(f)$?" Tags="|algorithms|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7956" PostTypeId="2" ParentId="7955" CreationDate="2024-01-16T05:36:20.973" Score="3" Body="&lt;h2&gt;Short answer&lt;/h2&gt;&#xA;&lt;p&gt;Asymptotic analysis — of which &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt; is the most (over)used 'operator' — does not 'measure performance', instead it provides sophisticated math tools to talk about performance at multiple levels of 'coarseness', usually called 'abstractions'.&lt;/p&gt;&#xA;&lt;p&gt;Need to start by saying your 'equation'&lt;br /&gt;&#xA;&lt;span class=&quot;math-container&quot;&gt;$f(algorithm)=f(g)=O(something)$&lt;/span&gt;&lt;br /&gt;&#xA;looks garbled. Could you give the exact form with context in the book/reference you're following?&lt;br /&gt;&#xA;Anyways for now...&lt;/p&gt;&#xA;&lt;h2&gt;Some clarifying comments&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The symbol '&lt;span class=&quot;math-container&quot;&gt;$=$&lt;/span&gt;' is an abuse of notation and is inconsistent with normal math usage (not to mention assignment in imperative programming).&lt;br /&gt;&#xA;eg. say we have &lt;span class=&quot;math-container&quot;&gt;$n = O(n^{3})$&lt;/span&gt;.&lt;br /&gt;&#xA;The precise form would use '&lt;span class=&quot;math-container&quot;&gt;$\in$&lt;/span&gt;'&lt;br /&gt;&#xA;ie.&#xA;&lt;span class=&quot;math-container&quot;&gt;$n \in O(n^3)$&lt;/span&gt;.&lt;br /&gt;&#xA;Put differently, a term like &lt;span class=&quot;math-container&quot;&gt;$O(n^{3})$&lt;/span&gt; looks like an expression (function) but in fact it is a family (class, set, ...) of functions.&lt;/li&gt;&#xA;&lt;li&gt;For that (and other) reasons, big &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt; is almost always the wrong asymptotic that's (over)used. Mostly one wants big &lt;span class=&quot;math-container&quot;&gt;$\Theta$&lt;/span&gt;. Even small &lt;span class=&quot;math-container&quot;&gt;$o$&lt;/span&gt; is usually more appropriate.&lt;/li&gt;&#xA;&lt;li&gt;Asymptotic classes like &lt;span class=&quot;math-container&quot;&gt;$O$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$o$&lt;/span&gt;, &lt;span class=&quot;math-container&quot;&gt;$\Theta$&lt;/span&gt; don't 'measure performance'. Rather they give a vast pallette of differently coarse families of equivalence classes from which we may choose in order to zoom in or out to make suitably narrow — aka precise — or broad — aka vague — statements.&lt;br /&gt;&#xA;Note: 'Precise' is not necessarily 'good' because it can be uselessly overdetailed and pernickety.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h1&gt;Example&lt;/h1&gt;&#xA;&lt;p&gt;Say 2 algorithms both have average case time complexity:&#xA;&lt;span class=&quot;math-container&quot;&gt;$\Theta(n \log n)$&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Still on refinement one may be &lt;span class=&quot;math-container&quot;&gt;$\Theta(2n \log n)$&lt;/span&gt;,&lt;br /&gt;&#xA;whereas the other,  &lt;span class=&quot;math-container&quot;&gt;$\Theta(5n \log n)$&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So ignoring the constant factors, they are equivalent, introducing them they differ.&lt;/p&gt;&#xA;&lt;p&gt;One can continue:&lt;br /&gt;&#xA;Say on further analysis it turns out to be:&lt;/p&gt;&#xA;&lt;p&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta({5 n \log n} + 3)$&lt;/span&gt; vs. &lt;span class=&quot;math-container&quot;&gt;$\Theta(2n\log n + 100)$&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now &lt;em&gt;asymptotically&lt;/em&gt;, ie as &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; gets large, the first will be worse than the second, but if the &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; is typically quite small the first would be preferable.&lt;/p&gt;&#xA;&lt;h2&gt;Summary&lt;/h2&gt;&#xA;&lt;div class=&quot;s-table-container&quot;&gt;&#xA;&lt;table class=&quot;s-table&quot;&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th&gt;&lt;/th&gt;&#xA;&lt;th&gt;Algo1&lt;/th&gt;&#xA;&lt;th&gt;Algo2&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\textrm{Identical, too coarse}$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(n \log n)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(n \log n)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\textrm{Algo1 better}$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(2n \log n)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(5n \log n)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\textrm{Both better &amp;amp; worse}$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(2n \log n+100)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;td&gt;&lt;span class=&quot;math-container&quot;&gt;$\Theta(5n \log n + 3)$&lt;/span&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&lt;hr /&gt;&#xA;&lt;p&gt;Note: See &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7955/how-to-teach-algorithm-performances-can-be-measured-as-of/7956#comment21617_7956&quot;&gt;comment by Stef&lt;/a&gt; that makes my answer more correct&lt;/p&gt;&#xA;" OwnerUserId="8837" LastEditorUserId="8837" LastEditDate="2024-01-23T10:27:57.787" LastActivityDate="2024-01-23T10:27:57.787" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="7957" PostTypeId="1" CreationDate="2024-01-16T14:37:05.697" Score="5" ViewCount="163" Body="&lt;p&gt;As a computer science educator, I have extensively researched various books for relevant examples to teach programming concepts, particularly Object-Oriented Programming (OOP). A recurring challenge I've encountered is the lack of concrete examples illustrating OOP principles, especially inheritance, beyond the frequently cited Shape/Triangle/Square or Animal/Cat/Mouse analogies.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, the use of Run-Time Type Information (RTTI) often includes controversial or incorrect examples (such as improper use of typeid). In several texts, design patterns are illustrated with examples far removed from the computing domain. For instance, using the Observer pattern to notify Readers of a Library about a new Newsletter seems impractical.&lt;/p&gt;&#xA;&lt;p&gt;I am somewhat disappointed by the scarcity of accessible and relevant examples for my students. While there are indeed complex, real-world applications of polymorphism, reflection, and the Visitor pattern, these are often too intricate for classroom discussion. Consequently, I find myself reverting to the simpler, albeit less practical, examples I initially sought to avoid.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone have advice or resources for effectively teaching programming concepts, particularly OOP, in a way that resonates with students and transcends these common, over-simplified analogies?&lt;/p&gt;&#xA;" OwnerUserId="6890" LastActivityDate="2024-03-14T22:58:31.567" Title="Seeking Effective Examples to Teach OOP Concepts Beyond Common Analogies" Tags="|programming|teaching-analogy|object-oriented-paradigm|" AnswerCount="5" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7958" PostTypeId="2" ParentId="7957" CreationDate="2024-01-16T18:59:55.957" Score="5" Body="&lt;p&gt;An idea I have though a bit about is using several puzzles to illustrate some OOP concepts. Consider Sudoku and KenKen. Both are played on a square board and share the constraint that the values in row/column are unique. But there is a third constraint. For Sudoku, all the values in an area must be unique. In KenKen, the values in an area are combined with a mathematical operaton and the result must match what is given. Furthermore, in Sudoku, all the &amp;quot;areas&amp;quot; have the same size/shape. In KenKen, the &amp;quot;areas&amp;quot; may be irregular and have different sizes.&lt;/p&gt;&#xA;&lt;p&gt;Now think about the search for a solution. At a high level it is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Select a value for some empty square.&lt;/li&gt;&#xA;&lt;li&gt;Determine if the game is in a valid state. If it is, return to step 1.&lt;/li&gt;&#xA;&lt;li&gt;If the state is not valid, undo the previous selection and try again.&lt;/li&gt;&#xA;&lt;li&gt;Continue until you find a solution&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So one could have the base class implement the basic algorithm, but defer to the child class for evaluating constraints. Now you have a hierarchy. There are many puzzles that fit this pattern.&lt;/p&gt;&#xA;&lt;p&gt;Another game I like is &lt;a href=&quot;https://krazydad.com/twonottouch/&quot; rel=&quot;noreferrer&quot;&gt;TwoNotTouch&lt;/a&gt;. The constraints for this are are different, but it shares the idea of &amp;quot;irregular&amp;quot; areas with KenKen. So, how does one represent the areas for reading a puzzle from a file? One can use a list of cells for each area, or use a grid a letters, where each letter represents one area. You can use the same strategy for describing the areas in both games. The constraints are a bit different, but that may just result in a wider hierarchy.&lt;/p&gt;&#xA;&lt;p&gt;Continuing with games, but thinking of reflection, consider a two person game in which the two &amp;quot;players&amp;quot; are bots developed as part of the assignment. You want each student to write a class (perhaps their name, e.g. &lt;em&gt;Fritz.java&lt;/em&gt;), that implements an interface or extends an abstract class. When you want to run a tournament among all the students, the driver program takes two class names, then uses reflection to find and call a constructor for the class. After that, everything is done via the methods of the interface/abstract class. Simple, but effective use of reflection.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastActivityDate="2024-01-16T18:59:55.957" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7960" PostTypeId="2" ParentId="7957" CreationDate="2024-01-20T19:46:53.950" Score="4" Body="&lt;p&gt;Somewhat depends upon the age/type of the trainees. Employees want relevance to their work. High school students rarely do more than think they know about business...&lt;/p&gt;&#xA;&lt;p&gt;Just about everyone knows about retail stores. Accordingly, classes such as Product and Person. An order is a non-obvious entity and creates interaction/interface between a Customer type of Person and Product. Products are seen slightly differently by Customers compared with the Purchasing Department's view. There's also plenty of room for subtle distinctions, eg discounts by product or by quantity/retail-value, and complications, eg period during which 'special price' is available.&#xA;StaffMember( Person ) and Customer( Person ) demonstrate inheritance. Given that they and Supplier all have addresses, there is plenty of scope for composition. The necessity to compute sales-taxes and similar yields opportunity to look at polymorphism - what does it mean in xyz-situation. (am presuming illustrations of abstraction and encapsulation are inherent in this scenario).&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2024-01-20T19:46:53.950" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7961" PostTypeId="2" ParentId="7957" CreationDate="2024-01-22T18:51:06.773" Score="2" Body="&lt;p&gt;I'm slightly confused by your question, as you talk about needing to teach inheritance (which is typically right at the beginning of OOP), and then mention the Visitor Pattern, which would typically be taught much, much later.&lt;/p&gt;&#xA;&lt;p&gt;The silly examples you give are fine for teaching the &lt;em&gt;mechanics&lt;/em&gt; of inheritance and polymorphism within your language of choice, and that is a real benefit.  But to go beyond mechanics into real function and object patterns, you obviously need to go beyond those toy examples.&lt;/p&gt;&#xA;&lt;p&gt;I constantly use games.  Games can be structured to have literally any set of rules that you'd like in order to motivate any pattern you'd like to meet.&lt;/p&gt;&#xA;&lt;p&gt;I've come to use Greenfoot for teaching advanced object patterns (a full year after I teach inheritance).  The patterns end up very clear within Greenfoot's simple environment, and Greenfoot generates something like a UML class diagram, which helps to illustrate what's happening.  These are still toy programs, but I've found that students grasp the patterns very well after building them out in this simple environment with the tiny games as an easy illustration of the behaviors we are creating.  I can then verbally go through where else you might use the pattern to help them see it more broadly.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-01-22T18:51:06.773" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7963" PostTypeId="2" ParentId="5023" CreationDate="2024-01-25T11:33:15.673" Score="4" Body="&lt;p&gt;Human counting intuitively revolves around two &lt;strong&gt;different&lt;/strong&gt; cases:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;The total element count in a list or a collection:&lt;/p&gt;&#xA;&lt;p&gt;We do so by assigning '1' to the first element and counting upwards (Rarely, we may choose to assign '0' to the first element, as in the floor counting system in the UK where the first floor is called 'Ground floor'). Example: Counting the total apples in a bag by starting the count from 1.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The total distance traveled from the first position:&lt;/p&gt;&#xA;&lt;p&gt;We do so by assigning a certain value to the starting position, and then adding the offset on it as we traverse a certain distance. Now, what value to assign to the starting position to simplify the calculation? As you might have probably guessed, assigning 0 to the starting position makes calculation much easier. Example: Measuring the distance means keeping the measuring tape such that the &amp;quot;zero&amp;quot; reading is at the starting position. This is what others have pointed out as well.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Let's get to the world of computers. When we talk about the first element of an array being called '0', we are not talking about the element count, but rather the position in the array, just like in the &lt;strong&gt;second case above&lt;/strong&gt;. It's essential to recognize this distinction, as our intuition might lead us to compare computer numbering with the first case in human counting. So assigning '0' to the first value of the array simplifies indexing. This means in a computer's memory, the address of the next element can be determined using the offset rule.&lt;/p&gt;&#xA;&lt;p&gt;While compiler optimizations might have likely been implemented to accommodate this convention, the influence of languages like C, which starts indexing from '0' (unlike FORTRAN that starts from '1'), has solidified this approach. Just like there is no need to alter a measuring tape where the reading starts with 1 instead of 0, even though human brain is already &amp;quot;optimized&amp;quot; (smart) to calculate the distance even if the reading started from 1.&lt;/p&gt;&#xA;" OwnerUserId="14223" LastEditorUserId="14223" LastEditDate="2024-01-25T13:02:22.993" LastActivityDate="2024-01-25T13:02:22.993" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7964" PostTypeId="1" CreationDate="2024-01-26T00:39:24.537" Score="0" ViewCount="41" Body="&lt;p&gt;I have some experience in the initial stages of maths olympiads. So , a curiosity arises whether the problem solving methods and the difficulty of the methods given in any advanced computer science degrees and programming in professional world harder than the problems in international mathematical Olympiad?&lt;/p&gt;&#xA;" OwnerUserId="14160" LastActivityDate="2024-01-26T00:39:24.537" Title="Problems in maths competition vs problems in advanced cs degree and programming" Tags="|secondary-education|mathematics|" AnswerCount="0" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7965" PostTypeId="1" AcceptedAnswerId="7966" CreationDate="2024-01-27T15:21:43.900" Score="2" ViewCount="55" Body="&lt;p&gt;I'm teaching a a high-school classes on front-end JavaSript development. What is overwhelming in specifically JavaScript is the large number of seemingly disparate ways of doing the same thing. Like functions. I've identified three ways of declaring functions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Classic: &lt;code&gt;function &amp;lt;name&amp;gt; ( &amp;lt;param&amp;gt; ) { &amp;lt;body }&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;(fat) Arrow: &lt;code&gt;const &amp;lt;name&amp;gt; = ( &amp;lt;param-list&amp;gt; ) =&amp;gt; { &amp;lt;body }&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Class member: &lt;code&gt;class &amp;lt;class-name&amp;gt; { &amp;lt;name&amp;gt; ( &amp;lt;param-list&amp;gt; ) { &amp;lt;body&amp;gt; }&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;As I tend to use and push the module and encapsulation traits in JavaScript I also want to go with the latter but omitting the keyword &lt;code&gt;function&lt;/code&gt; makes it less transferable to learn other languages. Number 2. has it benefits (immutable and used for anonymous or lambda) and pitfalls (no hoisting) and 1. has the clear advantage of looking more like other imperative and oop languages and makes it &lt;strong&gt;clear&lt;/strong&gt; that it is a &lt;em&gt;function&lt;/em&gt; by saying so.&lt;/p&gt;&#xA;&lt;p&gt;What should I be starting with?&lt;/p&gt;&#xA;" OwnerUserId="14225" LastEditorUserId="14225" LastEditDate="2024-01-27T21:15:25.597" LastActivityDate="2024-02-01T07:33:15.117" Title="teaching javascript functions" Tags="|secondary-education|javascript|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7966" PostTypeId="2" ParentId="7965" CreationDate="2024-01-27T21:22:39.377" Score="3" Body="&lt;p&gt;The differences you mention are pretty negligible, so whichever style students want to use should be fine. It's unfortunate that there are multiple styles, but it's normal for mainstream languages, and most of the critical differences (mostly binding &lt;code&gt;this&lt;/code&gt;) won't matter to students at first.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Here are responses to your specific concerns:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;hoisting&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I don't think hoisting (or lack thereof) is a big issue. Generally speaking, it's sensible to expect things to be defined before they're used, so if anything, this is a point in favor of &lt;code&gt;const&lt;/code&gt; over &lt;code&gt;function&lt;/code&gt;. Hoisting is only a pitfall if you're used to it, and then it's not there all of a sudden.&lt;/p&gt;&#xA;&lt;p&gt;If students are arriving with some exposure to an OO language like Java or C#, they may be used to &amp;quot;hoisting&amp;quot;, but functions are always methods in classes and order doesn't matter. That's its own thing and the behavior is no different in JS classes.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;omitting the keyword &lt;code&gt;function&lt;/code&gt; makes it less transferable to teaching learning other languages&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Actually, most languages don't use the word &lt;code&gt;function&lt;/code&gt; in their definitions of functions: Java, C#, C++ and C are a stylistic family that use something like &lt;code&gt;int foo() {}&lt;/code&gt; to declare a function. Ruby and Python use &lt;code&gt;def&lt;/code&gt; (as in &lt;a href=&quot;https://en.wikipedia.org/wiki/Def_Jam_Recordings&quot; rel=&quot;nofollow noreferrer&quot;&gt;Def Jam&lt;/a&gt;). Perl uses &lt;code&gt;sub&lt;/code&gt;. Rust uses &lt;code&gt;fn&lt;/code&gt;, Kotlin uses &lt;code&gt;fun&lt;/code&gt; and Swift and Go use &lt;code&gt;func&lt;/code&gt;, close but not quite. Bash has an optional &lt;code&gt;function&lt;/code&gt; keyword (but it's optional, and Bash!). Only R, Lua and PHP come to mind as explicitly using &lt;code&gt;function&lt;/code&gt;. PHP's arrow equivalent uses &lt;code&gt;fn&lt;/code&gt; because it's really annoying to write &lt;code&gt;function&lt;/code&gt; in every &lt;code&gt;array_map&lt;/code&gt; call, like JS.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[&lt;code&gt;function&lt;/code&gt;] has the clear advantage of looking more like other imperative and oop languages&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I'll grant that the lack of &lt;code&gt;=&amp;gt;&lt;/code&gt; and required braces makes a &lt;code&gt;function&lt;/code&gt; definition &lt;em&gt;feel&lt;/em&gt; less &amp;quot;functional&amp;quot; and closer to imperative Java/C++/C#-family languages. JS isn't special in having anonymous/lambda/arrow-style functions, only somewhat special in that they're typically used for top-level assignments.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;As I tend to use the module and encapsulation traits in JavaScript...&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Using modules to group functions doesn't imply classes, necessarily. By the time classes are introduced to students (usually too early in most curricula, in my opinion, given that I don't use them all that often in day to day JS coding--closures and modules without classes are usually plenty of encapsulation), students will be able to navigate the unfortunate fact that the syntax differs between standalone functions and class methods.&lt;/p&gt;&#xA;&lt;p&gt;Actually, object literals are probably the worst offender here, since:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-js prettyprint-override&quot;&gt;&lt;code&gt;const o = {&#xA;  foo() {},&#xA;  bar: () =&amp;gt; {},&#xA;  baz: function () {},&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The top style is preferred, but the choice mainly boils down to how you want to bind &lt;code&gt;this&lt;/code&gt;, which is generally out of scope for most first semester students.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[fat arrow] is immutable&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think you mean &amp;quot;reassignable&amp;quot;, since you can technically add properties and mutate the arrow function, even if &lt;code&gt;const&lt;/code&gt;. &lt;code&gt;const&lt;/code&gt; saves a rare function redefinition name clash, but that's about it--not enough to force a decision either way. Also, if students don't use &lt;code&gt;const&lt;/code&gt;, it's reassignable as well as mutable.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[fat arrow] is used for anonymous or lambda&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Yeah, this is common, although &lt;code&gt;function&lt;/code&gt; can be used for any anonymous or &amp;quot;lambda&amp;quot; (not actually a thing in JS; I'd avoid the term) cases. They'll definitely be seeing &lt;code&gt;[&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;].forEach(e =&amp;gt; console.log(e))&lt;/code&gt; rather than &lt;code&gt;[&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;].forEach(function (e) {console.log(e);})&lt;/code&gt; before long, which is why you can't get away with ignoring arrow syntax, even if it's not actually necessary.&lt;/p&gt;&#xA;&lt;p&gt;I'd be remiss to mention one significant pitfall with arrow functions, which is the implicit return value. Students will probably be bitten by mistakes like &lt;code&gt;[1, 2, 3].map(e =&amp;gt; { e * e })&lt;/code&gt; and &lt;code&gt;[1, 2, 3].map(e =&amp;gt; return e * e)&lt;/code&gt; at some point and wonder why they're getting weird results and syntax errors. You can cover these cases when the time is right, and start out with always using braces and &lt;code&gt;return&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Ditto for arrow argument parentheses--I'm used to omitting them on single-argument parameters, but for beginners it's probably better to always use them (although, yet again, they'll inevitably encounter them in the wild).&lt;/p&gt;&#xA;&lt;p&gt;On a similar topic, should students use the &lt;code&gt;var&lt;/code&gt; keyword since it's closer to &amp;quot;variable&amp;quot; than &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;const&lt;/code&gt;, which probably make little sense initially? I'd suggest not, since &lt;code&gt;var&lt;/code&gt; is worse in every regard than &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;. As with the &lt;code&gt;function&lt;/code&gt; versus arrow debate, I'll mention that &lt;code&gt;var&lt;/code&gt; exists in case they see it in the wild, but tell students to avoid using it in their own programs unless they're trying to write code that'll run in old IE versions without transpilation.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;If you've read through this post and you're still on the fence, then I'd recommend using arrow functions and &lt;code&gt;const&lt;/code&gt; for everything. It's common to see these days, will unavoidably be seen in callbacks, and has more predictable &lt;code&gt;this&lt;/code&gt; behavior. You'll still need to mention that students may encounter the &lt;code&gt;function&lt;/code&gt; version from time to time, and that it's occasionally used to allow special &lt;code&gt;this&lt;/code&gt; binding in callbacks. You can skip the second half of that explanation if they're not to objects and &lt;code&gt;this&lt;/code&gt; yet.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, if you feel &lt;code&gt;function&lt;/code&gt; is clearer for beginners, that's an acceptable position. Go for it. But as above, you'll still have to introduce arrow functions more or less as soon as you get to callbacks. A rule like &amp;quot;use &lt;code&gt;function&lt;/code&gt; for all standalone function definitions and use arrow functions for all callbacks&amp;quot; is a sensible approach to take, although I'd leave the decision ultimately up to students and wouldn't deduct points (I'd issue a warning for mixing styles arbitrarily).&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2024-02-01T07:33:15.117" LastActivityDate="2024-02-01T07:33:15.117" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7968" PostTypeId="1" CreationDate="2024-01-29T09:29:47.473" Score="1" ViewCount="30" Body="&lt;p&gt;Some CS students (university level) are attracted to the profession because it promises a well-paying job after graduation, others because they are actually interested in CS as a science.&lt;/p&gt;&#xA;&lt;p&gt;In my experience, the extrinsically motivated students often have some kind of &amp;quot;internal resistance&amp;quot; towards learning theory, formalization, abstractions, and the like, which typically appear in Bachelor's level computer science courses.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Are there some scientific studies that show that the successful software engineers in practice (those working on more interesting projects, being able to job-hop whenever they want to, etc.) tend to also understand the theory of CS well?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To also motivate the extrinsically motivated learners, it would be useful to show these in the classroom. While there are, for instance, special issues of journals about &lt;a href=&quot;https://dl.acm.org/toc/cacm/2003/46/9&quot; rel=&quot;nofollow noreferrer&quot;&gt;teaching the fundamentals of CS&lt;/a&gt; that talk about the importance of understanding abstractions, theory, maths, and the like. To prevent the view that this is just stuff that academics who never met the real world think is important, it would be great to have some studies that show that most successful software engineers in industry learned the foundations.&lt;/p&gt;&#xA;&lt;p&gt;There is a lot of flexibility regarding what exactly is shown in the scientific study -- what is important is showing that spending time to really understand the foundations pays off in the long run.&lt;/p&gt;&#xA;" OwnerUserId="14233" LastActivityDate="2024-01-29T09:29:47.473" Title="Reference Request: Study on the connection between Abstraction/Theory abilities and Software Engineering Skills" Tags="|student-motivation|cs-theory|" AnswerCount="0" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7970" PostTypeId="1" CreationDate="2024-02-01T12:28:49.460" Score="1" ViewCount="44" Body="&lt;p&gt;I teach 'operations research' at a university where students have moderate skills in very theoretical topics. I'd like to create some problems related to approximation algorithms, with the final question requiring proof regarding performance guarantees. My students might not be able to tackle anything more difficult than, for instance, proving that the NextFit algorithm for the bin-packing problem is 2*OPT by grouping consecutive boxes. Are you aware of other problems and algorithms where performance guarantees could be proven in such an easy way?&lt;/p&gt;&#xA;" OwnerUserId="13424" LastActivityDate="2024-02-01T12:28:49.460" Title="Examples of very easy approximation algorithms" Tags="|exercises|" AnswerCount="0" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7971" PostTypeId="1" CreationDate="2024-02-01T14:31:23.200" Score="3" ViewCount="124" Body="&lt;p&gt;Just as the title says.  If you're wondering why I'm asking, here's why:&lt;/p&gt;&#xA;&lt;p&gt;I've recently started teaching Python programming at a community college.  My class is geared towards non-CS majors.  There are a few STEM people there, and for the most part they do OK.  Some of the students are liberal arts majors or business majors who have a variety of motivations for taking this class.&lt;/p&gt;&#xA;&lt;p&gt;I have a certain student, call her Emma, who was basically lost from Day 1.  After the first lecture, she approached me during office hours and said she was &amp;quot;already lost&amp;quot;.  I asked her what she had trouble with, and she said &amp;quot;everything&amp;quot;.  I asked her to show me what she had.&lt;/p&gt;&#xA;&lt;p&gt;She turned on her computer to reveal that she had typed out (in Microsoft Word):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Paint C Hello World D&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It turned out that she hadn't even managed to properly install Python or Visual Studio Code.  After about 20 minutes, we finally proceeded to begin programming and I asked her to compare her code to mine.  She spent about 2 minutes looking back and forth between our screens, and was unable to find any mistake.  This lead to me also having to show her how to type parentheses on a keyboard.&lt;/p&gt;&#xA;&lt;p&gt;This is an extreme case, but there are a few others in the class like this.  During the second week, we'd moved on to learning about variables.&lt;/p&gt;&#xA;&lt;p&gt;We had the code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;a = 5&#xA;b = 3&#xA;c = a + b&#xA;print(c)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now I was working with another student, and I posed the question: &amp;quot;If I changed a to 15 and b to 10, but left everything else the same, what would the program print?&amp;quot;  Total look of confusion on the student's face.&lt;/p&gt;&#xA;&lt;p&gt;In the past I have certainly had students who struggled with things, say, once we got to things like loops or recursion or even functions.  But those students pulled through and at least were able to pass the class if did enough practice problems to fake it until the final.&lt;/p&gt;&#xA;&lt;p&gt;These guys though are something else.  Also, the people in the past who struggled on Day 1 or 2, usually had the self-awareness to drop the course.&lt;/p&gt;&#xA;" OwnerUserId="14239" LastActivityDate="2024-03-18T12:54:33.020" Title="Are there people who just can't learn to program?" Tags="|python|struggling-students|" AnswerCount="2" CommentCount="5" ClosedDate="2024-02-01T17:41:19.890" ContentLicense="CC BY-SA 4.0" />
  <row Id="7972" PostTypeId="2" ParentId="7971" CreationDate="2024-02-01T15:42:55.230" Score="1" Body="&lt;p&gt;When I was a student I studied math, physics and computer science, and my observation when I was a student was that both in math and in physics, the hardest-working students got the best results, whereas in computer science, you could tell from day 1 which students would get the best result, and no amount of personal work from the students appeared to change that. So indeed there appeared to be some kind of innate abilities of some students to perform much better by immediately grasping the logical aspects of computer science.&lt;/p&gt;&#xA;&lt;p&gt;Or maybe it's not about innate ability, but about prior work, as pointed out by Steve in comments:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I suspect this is because there is actually both a hidden curriculum and a set of cognitive skills required for CS, and the difference is between the people who self-learn the curriculum and put in the hard work many years before the course starts, and those who are reliant on actually being taught during the course.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Note that in the previous paragraphs I wrote &amp;quot;computer science&amp;quot; and not &amp;quot;programming&amp;quot;. Programming classes at university were universally terrible and ineffective. I think there were two main issues with programming classes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The teachers usually tried to teach something that was halfway between &amp;quot;programming&amp;quot; and &amp;quot;computer science&amp;quot;; they taught programming in a particular programming language, but instead of teaching this language in depth with all of its peculiarities, they tried to only use this language to illustrate general computer science and programming concepts, and the result of all this was a lot of confusion and very imprecise concepts all around. It's not possible to teach language C properly if you insist on talking about &amp;quot;invariables&amp;quot; and &amp;quot;outvariables&amp;quot; instead of explaining what's a pointer and what is the purpose of the &lt;code&gt;const&lt;/code&gt; keyword.&lt;/li&gt;&#xA;&lt;li&gt;The classes were lesson-driven, with at least as much time spent listening to a teacher standing in front of a blackboard than time spent in front of an actual computer. I believe programming can be learned much more effectively if the student has access to a text-editor and a compiler; the actual programming tasks that the student will work on are a lot more important than any lesson that can be taught at the blackboard.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Then I went to a school dedicated to programming and there, the hardest-working students got the best result, regardless of their initial ability. But the teaching was completely project-driven and not lesson-driven, which was much better-suited for programming in my opinion. So it's not just the students, it's also the way of teaching.&lt;/p&gt;&#xA;&lt;p&gt;Also, in my experience, students whose first programming language is python tend to do a lot worse than students whose first programming language is any of C, Haskell, QBasic, or anything else really. There are several reasons for that.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Python tries to make everything easy, so that it's possible to write programs that appear to work, without developing any deep understanding of what's going on behind the scene; but python's logic is really weird and different from other programming languages. &amp;quot;What is a variable?&amp;quot; is an easily-answerable question in most programming languages, but a surprisingly hard question in python.&lt;/li&gt;&#xA;&lt;li&gt;Python is an interpreted language. Notice how in a previous paragraph I said a student should have access to a compiler. The compiler will help them learn about types, will tell them their errors, etc. But python doesn't have a compiler. Forget the &lt;code&gt;return&lt;/code&gt; keyword at the end of a function in any other programming language, the compiler will immediately tell you &amp;quot;Hey! Missing return at the end of function that must return a value!&amp;quot;. Forget the &lt;code&gt;return&lt;/code&gt; keyword at the end of a function in python, and the interpreter will silently and happily make your function return &lt;code&gt;None&lt;/code&gt; without complaining about your error. Make an obvious error such as mistyping a keyword or variable name, and the interpreter will not even complain until it reaches the particular line that has the error, which might be a while if it's hidden in an else-branch after a for-loop.&lt;/li&gt;&#xA;&lt;li&gt;Python sucks for functional programming. Functional programming is actually a lot more natural than imperative programming, since it behaves a lot closer to human logic than to computer logic. But python sucks at it, for a variety of reasons. Recursion is terribly slow and limited to 100 recursive calls, there is no way to write a tail-recursive function, and the mutable/non-mutable distinction between different types of variables behaves well with for-loop but very unintuitively with functional calls, which makes it much harder for student to write correct functional code. An algorithm that was supposed to be O(n) can easily turn out as O(n^2) or O(n^3) in python because of a misunderstanding of how mutable variables behave when they're passed to functions in python. The simple fact that &lt;code&gt;a += b&lt;/code&gt; and &lt;code&gt;a = a + b&lt;/code&gt; mean two very different things inside a function call in python is a good example of this.&lt;/li&gt;&#xA;&lt;li&gt;Variable binding in python is dynamic rather than scoped. This makes it a lot harder to reason mathematically and logically about python programs, and makes it a lot harder for students to apply in a python programming class what they learned in a computer science class.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4&gt;Conclusion&lt;/h4&gt;&#xA;&lt;p&gt;Yes, innate ability tends to be more important in computer science than in other topics, but if programming is taught by precise practice more than by theoretical lessons, then this becomes less of an issue.&lt;/p&gt;&#xA;" OwnerUserId="10968" LastEditorUserId="10968" LastEditDate="2024-03-18T12:54:33.020" LastActivityDate="2024-03-18T12:54:33.020" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7973" PostTypeId="2" ParentId="7971" CreationDate="2024-02-01T17:23:00.393" Score="1" Body="&lt;p&gt;I will speak in general terms.  For any given topic or skill, there are going to be people who just can't get it.  You have people who have been expats or immigrants in a country for 30 years, and can't learn a new language; there are people who can't grasp any kind of mathematics beyond arithmetic.  &lt;a href=&quot;https://bettermarketing.pub/the-a-w-third-pounder-failed-because-people-didnt-understand-fractions-a86b966a973a&quot; rel=&quot;nofollow noreferrer&quot;&gt;Heck, at one point people thought they were getting conned because a restaurant was selling a third-pounder.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;My guess would be that you are probably bound to find more people who would find programming difficult than people who find programming easy.  Sure, some people would be able to get into the basics, but few people could put together a meaningful project.&lt;/p&gt;&#xA;&lt;p&gt;Also: I'm pretty sure that the students you mentioned probably have other learning issues.  I once had a student who was dyslexic.  English was also his second language.  His spelling in his native language was atrocious, and while he could kind of explain how to program something, he would consistently misspell keywords and variables, rendering any program he made pretty useless.&lt;/p&gt;&#xA;" OwnerUserId="14240" LastActivityDate="2024-02-01T17:23:00.393" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7974" PostTypeId="2" ParentId="7947" CreationDate="2024-02-03T02:27:25.233" Score="1" Body="&lt;p&gt;I think in this day and age it's unavoidable.  Short of cutting off the internet, students are going to look things up when stuck.  And heck, even the pros will sometimes resort to getting ideas from StackOverflow once in a while.&lt;/p&gt;&#xA;&lt;p&gt;In my class, I have a &amp;quot;Many Small Programs&amp;quot; approach which takes the form of mini-projects that have to be done in groups.  I teach an elective that meets 3 times a week.  Each project is broken up into modules that an individual student can do in 30-40 minutes.  Before they turn on their computers they'd at least have to write down the task in pseudocode using paper and pencil, if for nothing else to show that they've planned it out before actually coding.&lt;/p&gt;&#xA;" OwnerUserId="14240" LastActivityDate="2024-02-03T02:27:25.233" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7975" PostTypeId="2" ParentId="6547" CreationDate="2024-02-03T03:07:36.810" Score="0" Body="&lt;p&gt;I am very confused. There are some fundamental hurdles that I need to cover before I can consider learning anything. Also my learning style is visual/kinesthetic. Watching and having the ability to ask questions while internally analysing why things are done the way they are.&lt;/p&gt;&#xA;&lt;p&gt;If lessons are being taught in the hypothetical, it's easier for the focus to get bogged down on the &amp;quot;story&amp;quot; rather than what it means. Also while you are seeing the lesson from the first floor of the building (with all other floors out of sight/mind) the mentee could be viewing the lesson from floor 5, acutely aware of the happenings on all other floors. Making the lesson on floor 1 that seems pointedly obvious, seemingly hard to distinguish and apply to relevant examples.&lt;/p&gt;&#xA;&lt;p&gt;Suggestion: have a clear conversation, set some boundaries/define some reality so as to give the student a solid point to work backwards from. It sounds like the student is eager to learn, just needs less analogies and more real time information to analyse.&lt;/p&gt;&#xA;" OwnerUserId="14243" LastEditorUserId="-1" LastEditDate="2024-02-17T21:16:31.570" LastActivityDate="2024-02-17T21:16:31.570" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7978" PostTypeId="1" AcceptedAnswerId="7984" CreationDate="2024-02-10T08:53:58.693" Score="5" ViewCount="492" Body="&lt;p&gt;I'm soon going to introduce product types (C &lt;code&gt;struct&lt;/code&gt; and the like in different languages).&#xA;The audience is 17 year old with a long term goal in scientific studies, who have by now a very limited knowledge of programming, mainly only basic loops in C with integers and integer arrays.&lt;/p&gt;&#xA;&lt;p&gt;I would like to motivate the need and usefulness of this concept, knowing that they're going to say &amp;quot;but we like to do everything with our basic &lt;code&gt;int&lt;/code&gt;s&amp;quot;.&#xA;I would moreover like to propose examples that are interesting, realistic, and with a glimpse to theoretical aspects (I am going to tell them not too late that what we are doing is a cartesian product of the considered base types).&lt;/p&gt;&#xA;&lt;p&gt;By now, my main idea is the classic points in the plane, maybe complex numbers.&#xA;It's very good for my goals (there are reasons why it's a classic), but it has the only disadvantage that the two combined base types are the same.&#xA;The risk is that, having them already been exposed to arrays, their first impression of &lt;code&gt;struct&lt;/code&gt; is a needless complication when they could have easily used an array of length 2.&lt;/p&gt;&#xA;&lt;p&gt;Of course there are all those &amp;quot;real (accountant) world&amp;quot; situations, where I put together a name and an age, or an item and a price and so on.&#xA;But the students are in science education, I'm not particularly fond of accounting and administrative applications, and most of all I would like to avoid the consolidation of the view that computer science is a tool for accountants.&#xA;Instead, I'd prefer something about science or computing.&lt;/p&gt;&#xA;&lt;p&gt;There is also the obvious construction of a linked list in C, but it's too complicated for them: no pointers.&lt;/p&gt;&#xA;&lt;p&gt;Put somehow differently, from another angle (their): why would I want to define a new type if I do not do software engineering? I can bring all my data in primitive and disaggregated form as I have done for years: the advantage of creating a new type is not worth the burden of having to learn things.&#xA;Where even is this advantage again?&#xA;(Writing this line I am remembering of blub language and how it's difficult to make these motivations even for experienced computer scientists, doing it for young students does not seem an easy thing, seen from here).&lt;/p&gt;&#xA;&lt;p&gt;I'd like instead that they could be put in a situation where they &lt;em&gt;want&lt;/em&gt; to construct new types.&lt;/p&gt;&#xA;&lt;p&gt;Any suggestions?&lt;/p&gt;&#xA;&lt;p&gt;(I have asked chatGPT too and it seems to be stuck in my same position).&lt;/p&gt;&#xA;" OwnerUserId="6546" LastActivityDate="2024-02-12T10:12:30.403" Title="Introduction to product type: motivation and examples" Tags="|student-motivation|data-structure|struggling-students|" AnswerCount="4" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7979" PostTypeId="2" ParentId="7978" CreationDate="2024-02-10T13:35:37.827" Score="5" Body="&lt;p&gt;I have a few thoughts for you. First, a useful context to consider is Machine Learning, which is both scientific, and regularly involves mixed data types.  Your administrative examples could pretty easily be recast to machine learning examples with just a tiny bit of massaging.  Mathematical examples tend purely towards numbers, so might pose exactly the motivational difficulty for the topic that you've fingered.&lt;/p&gt;&#xA;&lt;p&gt;That said, a simple idea for a first motivating example is a standard (x,y) plane point, but with a label.  So, place point A at (0,10) and point B at (10,-10).  Heck, create 26 points, one for each letter of the alphabet, at random places.  Or any largish number of points, arranged however you'd wish.&lt;/p&gt;&#xA;&lt;p&gt;Then calculate the midpoints.  Since there are a lot of points, you'll naturally want a function.&lt;/p&gt;&#xA;&lt;p&gt;The need for the structure comes as so: you can't return something like &lt;code&gt;[label:&amp;quot;midpoint between A and B&amp;quot;,x:5,y:-5]&lt;/code&gt; as an array, and the number of points would make the results impractical to interpret without the labels.  Hence, we really need the struct.&lt;/p&gt;&#xA;&lt;p&gt;If you really want to dig into the example, you could try doing it without the struct first, and the kids will see how difficult it becomes before the struct simplifies everything.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-02-10T13:35:37.827" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7980" PostTypeId="2" ParentId="7978" CreationDate="2024-02-11T01:29:33.537" Score="7" Body="&lt;p&gt;First thing first, a C function may not return an array (without some hoops jumping). It may however return a struct, fair and square: struct is a value, array is not.&lt;/p&gt;&#xA;&lt;p&gt;Structural values arise naturally in many contexts. Unfortunately, most of them are recursive, which you rule out. The non-recursive example - off the top of my head - would be tokenizing a programming language, where a token is comprised of a &lt;code&gt;type&lt;/code&gt;, and a &lt;code&gt;value&lt;/code&gt; (and a type of &lt;code&gt;value&lt;/code&gt; depends on &lt;code&gt;type&lt;/code&gt;). I don't know if you consider it too complicated for your students.&lt;/p&gt;&#xA;&lt;p&gt;Now to the real point. Structs is not about Cartesian products. They are not about the computational power. They are about the expressiveness. Reconsider complex numbers.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;void add(double z1[2], double z2[2], double result[2]);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;vs&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;struct complex {&#xA;    double re;&#xA;    double im;&#xA;}&#xA;&#xA;struct complex add(complex z1, complex z2);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Which one is more expressive? Which one is less error-prone?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;Yes, you could do everything with the basic &lt;code&gt;int&lt;/code&gt;s, but why should you?&lt;/p&gt;&#xA;" OwnerUserId="182" LastEditorUserId="182" LastEditDate="2024-02-11T01:36:59.983" LastActivityDate="2024-02-11T01:36:59.983" CommentCount="8" ContentLicense="CC BY-SA 4.0" />
  <row Id="7981" PostTypeId="2" ParentId="7978" CreationDate="2024-02-11T21:34:03.887" Score="2" Body="&lt;p&gt;The other answers suggest using &lt;code&gt;struct&lt;/code&gt; to implement complex coordinates. While these may be familiar to students with a scientific background, they suffer from the fact that they're homogeneous, so could easily be implemented as &lt;code&gt;int complexnum[2];&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What makes structures interesting is that they collect heterogeneous types, so you should use that kind of example to motivate. While it's not science-related, a simple phone directory will be something they can relate to.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;struct contact {&#xA;    char name[100];&#xA;    char address[100];&#xA;    char city[20];&#xA;    char state[200];&#xA;    char zip[10];&#xA;    char phone[20];&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you want something more scientitic, make this a catalog of stars. This will contain the name (a string), magnitude (float), astronomical coordinates (two floats).&lt;/p&gt;&#xA;" OwnerUserId="1471" LastActivityDate="2024-02-11T21:34:03.887" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7982" PostTypeId="2" ParentId="7957" CreationDate="2024-02-12T00:33:07.220" Score="3" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Consequently, I find myself reverting to the simpler, albeit less practical, examples I initially sought to avoid.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I empathize with having long round trips to then have to come back to the conclusion you start off trying to avoid. It sucks but it's a fact of life that not every attempt to improve something ends up successful. Sometimes the journey teaches you why the thing you disliked is actually better than you were giving it credit for.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I've encountered is the lack of concrete examples illustrating OOP principles, especially inheritance, beyond the frequently cited Shape/Triangle/Square or Animal/Cat/Mouse analogies.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The reason these examples are so common is because they're really good examples. Not so much to explore the technical concept in all of its depth, but because &lt;strong&gt;students require no business context to understand these concepts&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The point of an example is to &lt;em&gt;quickly&lt;/em&gt; showcase your topic. &amp;quot;Quick&amp;quot; is an operative word there, no one wants to sit through a long buildup for a throwaway example. This is why all good examples use a context that the intended recipients are familiar with, e.g. using a sports analogy with a sports fan. It cuts down on the boring and distracting buildup time.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;I'm not continuing down this train of thought but just to point out here that it's about the relative size between setup cost and example lifetime. If you're going to work with this example across the entire curriculum (building on it as you go), then it's okay if you need to spend a short amount of time to set up the example context. But this would require you to model a significant part of your curriculum around that example, which is a bit out of scope for this question.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In several texts, design patterns are illustrated with examples far removed from the computing domain.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Removing it from the computing context is one of the main points of these examples. Students are focusing on learning this new computing topic, and throwing even more computing context at them is not going help their digestion of this information.&lt;br /&gt;&#xA;Instead, it's better for them to focus on something that &lt;em&gt;isn't&lt;/em&gt; foreign to them, so they relax their focus and consider something they're already familiar with, and at the end of the example they suddenly realize that this idea applies to the foreign topic (computing) as well.&lt;/p&gt;&#xA;&lt;p&gt;Even all the way back in ancient Greece, complicated psychological or social issues (or narrative plots on such at topic) would be explained using nature analogies. The uneducated (or low educated) would understand the workings of nature, and these nature analogies would be used to explain what would otherwise be a more abstract and complicated topic to them.&lt;br /&gt;&#xA;Explaining the intricate justification and morality of why a killing is not always a murder; e.g. when in defense of others, is a difficult subject to discuss today, let alone back then. But pointing out that a [insert local animal] would attack you if you threaten her children (and would not have attacked you if you have not threatened her children) is much easier to innately understand if you've lived around this animal.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;To a very real degree, fairy tales perform this exact role for children. Rather than being taught some abstract lesson on how to behave, they are instead told a story with characters whose motives they understand (protagonists are often lacking information or maturity), with consequences that seem obvious, and the narrative supports an idea/conclusion that the child can then transplant onto their real life without needing to find out in real life why things are this way.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;teaching programming concepts, particularly OOP, in a way that resonates with students and transcends these &lt;strong&gt;common&lt;/strong&gt;, over-simplified analogies?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Commonality is a good thing, not a bad thing.&lt;/p&gt;&#xA;&lt;p&gt;However, the example only needs to be as common as your students' knowledge is. If you're dealing with a very diverse crowd, this will inherently limit you to very common experiences that all students will be familiar with. The weather, everyday life, stuff everyone learns in school.&lt;/p&gt;&#xA;&lt;p&gt;However, if the students share more commonalities (compared to what you'd expect from a random collection of people), e.g. they're all avid gamers, that gives you additional common contexts to use for your examples, which is likely going to open some doors.&lt;/p&gt;&#xA;&lt;p&gt;Based on your question it seems to me that you're judging examples by how deeply correct they and are glossing over how unfamiliar the students likely are with the computing context that you're already familiar with.&lt;/p&gt;&#xA;&lt;p&gt;Unless this is an advanced course that inherently focuses on these kinds of deep dives, I would re-evaluate if your metric is right for your target audience.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastEditorUserId="2164" LastEditDate="2024-02-13T22:17:55.250" LastActivityDate="2024-02-13T22:17:55.250" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7983" PostTypeId="2" ParentId="7694" CreationDate="2024-02-12T00:46:14.843" Score="1" Body="&lt;pre&gt;&lt;code&gt;Dog rover = new Puppy(&amp;quot;rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The main thing to consider here is that this is not the main purpose of polymorphism. It is indeed unnecessary to use the base &lt;code&gt;Dog&lt;/code&gt; type here since you've hardcoded the &lt;code&gt;Puppy&lt;/code&gt; type already.&lt;/p&gt;&#xA;&lt;p&gt;But what about this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog myNewDog = AdoptRandomDog();&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You don't know whether you adopted a &amp;quot;normal&amp;quot; dog or a puppy.&lt;/p&gt;&#xA;&lt;p&gt;And what about this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;public void Pat(Dog dog)&#xA;{&#xA;    // ...&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You don't need to know whether a dog is a puppy in order to be able to pat them.&lt;/p&gt;&#xA;&lt;p&gt;Which brings us back to:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Dog rover = new Puppy(&amp;quot;rover&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Yes, the student is correct that this is not a good example of &lt;em&gt;useful&lt;/em&gt; polymorphism.&lt;/p&gt;&#xA;&lt;p&gt;However, while it's not very useful this syntax is correct, simply because it is a logical consequence of introducing polymorphism to the language, which is useful in the other examples I showed above.&lt;/p&gt;&#xA;" OwnerUserId="2164" LastActivityDate="2024-02-12T00:46:14.843" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7984" PostTypeId="2" ParentId="7978" CreationDate="2024-02-12T10:12:30.403" Score="6" Body="&lt;p&gt;The primary purpose of abstractions is to give names to collections of more basic ideas. Instead of writing, &amp;quot;I traveled by putting one foot in front of the other such that at least one foot was always on the ground,&amp;quot; we instead write, &amp;quot;I walked.&amp;quot; Not only is the second version shorter, but it unifies several discrete motions into a single action so that the reader can understand with less thought. The first sentence requires the reader to take multiple ideas (&amp;quot;traveled,&amp;quot; &amp;quot;one foot in front of the other,&amp;quot; &amp;quot;one foot always on the ground&amp;quot;) and compose them in their head to arrive at the idea being communicated. Writing only in only the most basic ideas forces the reader to do more work. We want computers to do the work!&lt;/p&gt;&#xA;&lt;p&gt;If your students have learned about functions, you can make this comparison:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A function is a collection of instructions that has been given a name.&lt;/li&gt;&#xA;&lt;li&gt;A struct is a collection of data that has been given a name.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Since your class is science-oriented, let's make a catalogue of planets. Please forgive any language errors as C is not my primary language.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;struct Planet&#xA;{&#xA;    char *name;&#xA;    double mass; /* kg */&#xA;    double length_of_year; /* Earth days */&#xA;    double distance_from_sun; /* km */&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Even if the data fields are homogenous, you can still emphasize the importance of names. For example, let's consider Kepler's third law: the ratio of the square of a planet's year to the cube of the planet's distance from the sun is a constant. We can verify this law by printing the ratio for each planet.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;#include &amp;lt;math.h&amp;gt;&#xA;&#xA;Planet mercury;&#xA;mercury.name = &amp;quot;Mercury&amp;quot;;&#xA;mercury.mass = 3.3e23;&#xA;mercury.length_of_year = 115.88;&#xA;mercury.distance_from_sun = 57.91e6;&#xA;&#xA;/* all the other planets */&#xA;&#xA;Planet solar_system[10] = {mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto, sedna};&#xA;&#xA;for(int i = 0; i &amp;lt; 10; i++)&#xA;{&#xA;    Planet planet = solar_system[i];&#xA;    double kepler_ratio = pow(planet.length_of_year, 2)/pow(planet.distance_from_sun, 3);&#xA;    printf(&amp;quot;%s: %e&amp;quot;, planet.name, kepler_ratio);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now imagine the same code using just &lt;code&gt;double[3]&lt;/code&gt; to store the data of each planet.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-c prettyprint-override&quot;&gt;&lt;code&gt;double solar_system[10][3] = {{3.3e23, 115.88, 57.91e6}, /* etc. */};&#xA;char *planet_names[10] = {&amp;quot;Mercury&amp;quot;, &amp;quot;Venus&amp;quot;, /* etc. */};&#xA;&#xA;for(int i = 0; i &amp;lt; 10; i++)&#xA;{&#xA;    double planet_data[3] = solar_system[i];&#xA;    double kepler_ratio = pow(planet_data[1], 2)/pow(planet_data[2], 3);&#xA;    printf(&amp;quot;%s: %e&amp;quot;, planet_name[i], kepler_ratio);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can ask your class,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Are we sure we got the subscripts right?&lt;/li&gt;&#xA;&lt;li&gt;Are the names of the planets matched up with the data in the other array?&lt;/li&gt;&#xA;&lt;li&gt;What happens when we realize that the planet masses aren't used and delete that data?&lt;/li&gt;&#xA;&lt;li&gt;How much time to you want to spend counting indices to get the right data in the right place when we have a computer sitting right here that can count for us?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Sure, you could read the comments (if there are any and they are correct) on the arrays to see what each index means. But, the first version is easier to read. Why is it easier to read? We are using names that humans understand. Instead of interpreting code, the reader is interpreting human language. In the first version with the struct, we only have to check that the code correctly implements Kepler's third law.&lt;/p&gt;&#xA;&lt;p&gt;We humans have problems we want to solve, and computers are one tool that can help. As much as possible, we want to express our problems in human terms that we can understand. The only thing a computer understands is voltages on wires (even &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt; are symbolic abstractions of electrical activity). The purpose of a compiler/interpreter is to automatically translate human concepts into machine activity. The closer that the code we write approaches human language and ideas, the easier it is to understand and debug.&lt;/p&gt;&#xA;" OwnerUserId="14256" LastActivityDate="2024-02-12T10:12:30.403" CommentCount="6" ContentLicense="CC BY-SA 4.0" />
  <row Id="7987" PostTypeId="2" ParentId="6910" CreationDate="2024-02-12T19:48:55.787" Score="1" Body="&lt;p&gt;In Python, if a program which is fed certain inputs produces certain outputs, then in the absence of deliberate randomness, those outputs will determined by the program and its inputs.  While it's possible that a program might be erroneous and yet produce correct output for some inputs (e.g. if a program is supposed to accept a number and output its square, but instead it simply multiplies the number by 3, such a program would produce correct results when fed 0 or 3 as input), the fact that a program is observed to ever produces correct results for a particular input would generally imply that it would always produce correct results &lt;em&gt;when fed that same input&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In C, by contrast, there are a wide range of constructs over which the Standard waives jurisdiction, which will almost always be processed in sensible fashion, but might occasionally have arbitrary disruptive side effects.  Suppose a program would sometimes call a function like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;unsigned mul(unsigned short x, unsigned short y) { return x*y; }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;for values of &lt;code&gt;x&lt;/code&gt; in the range &lt;code&gt;INT_MAX/y+1&lt;/code&gt; to &lt;code&gt;UINT_MAX/y&lt;/code&gt;.  Should the function be viewed as &amp;quot;perfectly normal when targeting any machine designed in the last few decades&amp;quot;, &amp;quot;correct but non-portable&amp;quot;, or &amp;quot;erroneous&amp;quot;?  Should it be expected to to be free of side effects in any build that isn't expressly configured to trap overflows, or should it be recognized as potentially affecting the behavior of calling code in weird and bizarre ways?&lt;/p&gt;&#xA;&lt;p&gt;Such issues don't exist in Python.  Having as a first language one where constructs are unambiguously correct or erroneous seems better than having one where an implementation might process a construct in an expected manner 99.99% of the time, but &lt;em&gt;by design&lt;/em&gt; process it nonsensically under rare and unpredictable circumstances.&lt;/p&gt;&#xA;" OwnerUserId="2073" LastActivityDate="2024-02-12T19:48:55.787" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7988" PostTypeId="2" ParentId="5995" CreationDate="2024-02-13T16:30:17.227" Score="2" Body="&lt;p&gt;It's quite common to feel a bit perplexed by structures initially. However, from my experience teaching C, structures tend to be one of the most comprehensible concepts in the language. They closely resemble Object-Oriented Programming (OOP) principles, aligning well with the expectations of those new to programming.&lt;/p&gt;&#xA;&lt;p&gt;Nevertheless, directly introducing structures in that way may not be the most straightforward or pedagogical approach. The example provided, such as:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cpp prettyprint-override&quot;&gt;&lt;code&gt;struct MyshoppingCart   // struct definition&#xA;{&#xA;  int orangeNos;&#xA;  float grainKgs;            // struct members&#xA;  float meatKgs;&#xA;} cartM, cartW;     // struct variables declaration type 1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can do something way more explicit :&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-cpp prettyprint-override&quot;&gt;&lt;code&gt;struct MyshoppingCart   // struct definition&#xA;{&#xA;  int orangeNos; // member orangeNos of MyshoppingCart&#xA;  float grainKgs; // member grainKgs of MyshoppingCart&#xA;  float meatKgs; // member meatKgs of MyshoppingCart&#xA;};&#xA;&#xA;struct MyshoppingCart cartM;&#xA;struct MyshoppingCart cartW;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I believe explicitness is crucial, especially in teaching. Understanding the distinction between structure definition and declaration is crutial, but the mixed declaration and definition syntax isn't.&lt;/p&gt;&#xA;&lt;p&gt;It's more beneficial to grasp these nuances when encountering such syntax in real-world scenarios after gaining proficiency in C. At that point, one can reflect on the syntax and question its usage, fostering a deeper understanding. And choose wether he want to use or not this kind of unexplicit and confusing syntax.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="27" LastEditDate="2024-02-16T21:19:08.747" LastActivityDate="2024-02-16T21:19:08.747" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7989" PostTypeId="1" AcceptedAnswerId="7990" CreationDate="2024-02-15T17:05:58.050" Score="5" ViewCount="2005" Body="&lt;p&gt;At my university, my fellow students and I cannot apply practical subjects well... For example, when we are asked to do a software project, we cannot analyze its requirements to know the steps that must be followed to do so, and we cannot translate what we learned in theoretical subjects into practical application easily... How can I develop? My skills are in the practical aspect of programming...and what are the best ways to raise my skills in practical applications of computer skills in general?&#xA;The project requirements were:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h3&gt;Computer Programming 2: Final Project&lt;/h3&gt;&#xA;&lt;p&gt;Make a C++ program to manage students records and grades. Every student record must have:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;id &amp;gt;&amp;gt; a variable of type: int.&lt;/li&gt;&#xA;&lt;li&gt;first_name &amp;gt;&amp;gt; a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special&#xA;characters], and the first letter should be capitalized.&lt;/li&gt;&#xA;&lt;li&gt;last_name &amp;gt;&amp;gt; a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special&#xA;characters], and the first letter should be capitalized.&lt;/li&gt;&#xA;&lt;li&gt;major &amp;gt;&amp;gt; a variable of type: string, this variable should contain one of the following values (“IT”, “IS”, “CS”, “CYS”) all letters&#xA;should be capitalized.&lt;/li&gt;&#xA;&lt;li&gt;level &amp;gt;&amp;gt; a variable of type: int, should be from 1 to 4 only.&lt;/li&gt;&#xA;&lt;li&gt;marks[] &amp;gt;&amp;gt; an array of type: int, the content of each index in the array will represent the marks of one subject which will be between 0&#xA;– 100.&lt;/li&gt;&#xA;&lt;li&gt;size &amp;gt;&amp;gt; a const variable of type: int, should be 6 [ no need to ask the user ] this would be the size of the marks[] array.&lt;/li&gt;&#xA;&lt;li&gt;total_marks &amp;gt;&amp;gt; a variable of type: int, which is the sum of all the subjects in the marks[] array. This means that the number in this&#xA;variable should be between 0 – 600.&lt;/li&gt;&#xA;&lt;li&gt;grade &amp;gt;&amp;gt; a variable of type: float, this variable contains the result of dividing total_marks and size.&lt;/li&gt;&#xA;&lt;li&gt;student &amp;gt;&amp;gt; an array of type: Student, the type you will create as a struct.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;Software Requirements Specifications (SRS) :&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The program should contain:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Functions: all of the program’s main operations should be done using functions.&lt;/li&gt;&#xA;&lt;li&gt;Structs: the student will be created not as a single variable, but as a struct.&lt;/li&gt;&#xA;&lt;li&gt;Arrays: as mentioned in the previous section, the marks will be an array. And you will also have an array of the student struct.&lt;/li&gt;&#xA;&lt;li&gt;Files: the data in the program will be stored/restored from a file.&lt;/li&gt;&#xA;&lt;li&gt;Header file: this is a library that you will create and make all of the functions and structs inside of it. Then you will include it in your project as well as some of the main built-in header files you  will include such as iostream, … etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The Main Menu of your program should look something like this:&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add a new Student Record.&lt;/li&gt;&#xA;&lt;li&gt;Edit a Student Record.&lt;/li&gt;&#xA;&lt;li&gt;Delete a Student Record.&lt;/li&gt;&#xA;&lt;li&gt;Search for a Student Record.&lt;br /&gt;&#xA;o Search by the student’s id&lt;br /&gt;&#xA;o Search by the student’s name&lt;/li&gt;&#xA;&lt;li&gt;Display All of the Students Records.&lt;br /&gt;&#xA;o Display the students ordered by id.&lt;br /&gt;&#xA;o Display the students ordered by name.&lt;br /&gt;&#xA;o Display the students ordered by grade.&lt;/li&gt;&#xA;&lt;li&gt;Exit.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;" OwnerUserId="14261" LastEditorUserId="660" LastEditDate="2024-02-17T21:16:12.963" LastActivityDate="2024-04-01T13:33:28.857" Title="What is the best way to learn practical programming when school doesn't help?" Tags="|self-learning|programming|" AnswerCount="4" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="7990" PostTypeId="2" ParentId="7989" CreationDate="2024-02-15T19:48:08.633" Score="6" Body="&lt;p&gt;To translate a program specification like this into a working program, a few things are required.&lt;/p&gt;&#xA;&lt;p&gt;First, you'll need an understanding of what's being asked. Define all terms in the assignment. For example, do you know what a &amp;quot;struct&amp;quot; is? How about a &amp;quot;function&amp;quot;? If a term is unclear, revisit earlier lectures or research online or in your textbook. Write down any knowledge gaps and build up from first principles, writing simple standalone programs that help you learn about one concept in isolation from the overwhelming complexity of the full app.&lt;/p&gt;&#xA;&lt;p&gt;Once you've defined the problem, break the problem down into small enough pieces that you can begin making progress on something, even if it's just printing &amp;quot;hello world&amp;quot; on the screen. Once you have that, work on the next achievable step, such as creating an integer &lt;code&gt;id&lt;/code&gt;, or a &lt;code&gt;Student&lt;/code&gt; struct with an integer id, and print that. If you're not sure about how to use structs, you could ignore that requirement in the short term and use loose variables, or begin working on something else, like displaying the main menu. Programs are developed incrementally, using temporarily simplified requirements. Re-compile your code after every change and verify that it still works.&lt;/p&gt;&#xA;&lt;p&gt;Functions are a useful simplifying tool. Once you have a piece of working code in a function, you can verify its inputs and outputs on its own, then set it aside and call it when you need it, without worrying about the steps inside it, like you do when you use a C++ library function.&lt;/p&gt;&#xA;&lt;p&gt;But if you haven't used functions, that's OK--parts of the program can be written without them, then you can refactor to add functions later. Same with user interaction--you can skip that and hardcode the user input initially. Likewise, you can skip the file storage requirement at first and have the program work in memory only. Then, once that's working, introduce the file storage functionality.&lt;/p&gt;&#xA;&lt;p&gt;Another simplification opportunity are the student record operations. You'll eventually need to add, edit, delete, search and list student records, but for starters, set most of these operations aside and just focus on listing student records from hardcoded data. Then work in the other behaviors one by one, verifying as you go.&lt;/p&gt;&#xA;&lt;p&gt;To summarize:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Understand the problem. Confront any knowledge gaps as soon as possible.&lt;/li&gt;&#xA;&lt;li&gt;Break the problem down into small pieces and begin working on the first one. Temporarily simplify requirements, and don't be afraid to go all the way back to first principles if necessary to find a foundation to build on.&lt;/li&gt;&#xA;&lt;li&gt;Compile and run frequently, fixing errors and validating your code as you work, using multiple inputs. Debugging and testing are important skills which take practice.&lt;/li&gt;&#xA;&lt;li&gt;Build on your sub-problem solutions, gradually introducing complexity until all the pieces work together and you've solved the large problem.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;By the way, the process I've described can take an unbounded amount of time, so I suggest beginning it as soon as you receive an assignment (or sooner, preparing your fundamentals independently by working on basic exercises, similar to learning a musical instrument).&lt;/p&gt;&#xA;&lt;p&gt;See also: &lt;a href=&quot;https://ericlippert.com/2014/03/21/find-a-simpler-problem/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Find a Simpler Problem&lt;/a&gt; by Eric Lippert.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;On a broader level, when you're facing a difficult problem, it's normal to want to blame your circumstances (professor, school, etc) but doing so will only harm yourself. You'll inevitably encounter unhelpful professors (later: coworkers, clients, etc), but don't let them stop you from reaching your goals. Try to reframe &amp;quot;we cannot&amp;quot; into &amp;quot;we cannot right now, but if we develop a plan and build in small steps, we can&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Real world software specifications are often much less concrete than this assignment. But regardless of whether you're a student or professional, if you're truly stuck after applying the strategies in this post, you can ask professors, colleagues and clients for clarification (but sometimes you won't get much!).&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2024-02-17T03:20:59.243" LastActivityDate="2024-02-17T03:20:59.243" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7991" PostTypeId="2" ParentId="7989" CreationDate="2024-02-15T21:00:34.330" Score="2" Body="&lt;p&gt;The lab requirements you've outlines are very concrete and straightforward.  If many students in your class are having trouble decomposing the problem into sub-problems, then that suggests to me that the course might be simply moving too quickly.&lt;/p&gt;&#xA;&lt;p&gt;Since you are not free to change the pacing of the course, I strongly recommend building some side-projects in C++.  You can work on something you'd find fun, or you can use a site like &lt;a href=&quot;https://projecteuler.net/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Project Euler&lt;/a&gt; to give you some interesting problems to tackle.  The goal here is to simply give yourself some time to code and absorb some of the ideas better.  This extra time can help you to construct firmer mental models of what programs do and how they work.  Even a little bit of progress in this will be likely to help you enormously in your course.&lt;/p&gt;&#xA;&lt;p&gt;These core ideas (input and output, problem decomposition) take time to digest, so I recommend giving yourself that time.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-02-15T21:00:34.330" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7992" PostTypeId="2" ParentId="6034" CreationDate="2024-02-15T21:07:48.427" Score="2" Body="&lt;p&gt;You could print the source code on regular 8.5&amp;quot;x11&amp;quot; paper and cut it into strips, optionally with line numbers on the back to represent the correct answer.&lt;/p&gt;&#xA;&lt;p&gt;If cutting papers for all of your students is too much labor, you could scramble the source code lines in the text editor, print the scrambled paper and give it to students to cut and reassemble using scissors and tape or glue.&lt;/p&gt;&#xA;&lt;p&gt;If asking students to cut and reassemble is too much work for them, you could add random integers to each line and ask students to give you the series of integers that orders the program correctly, then let them manipulate the paper as they need without having to worry about reassembly.&lt;/p&gt;&#xA;&lt;p&gt;If you want reusable versions, consider printing on reinforced card stock and/or laminating each strip. A hole punch and string can help keep each program together.&lt;/p&gt;&#xA;&lt;p&gt;If you need to show the problem to the whole class, you could print on transparency paper and use a projector. If electric power isn't available, printing each source line in a large font on paper and using painter's tape to adhere to a wall may suffice.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.hybridclassroom.com/blog/?p=1351&quot; rel=&quot;nofollow noreferrer&quot;&gt;This blog post&lt;/a&gt; has a &lt;a href=&quot;https://www.hybridclassroom.com/blog/wp-content/uploads/2018/11/parsons_solution-703x1024.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;picture of a Parson's problem on paper&lt;/a&gt; to help illustrate the ideas here (please ignore their &lt;code&gt;eval(input())&lt;/code&gt; security holes!). Here's the &lt;a href=&quot;https://web.archive.org/web/20230127045123/https://www.hybridclassroom.com/blog/?p=1351&quot; rel=&quot;nofollow noreferrer&quot;&gt;Wayback link for posterity&lt;/a&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9426" LastEditorUserId="9426" LastEditDate="2024-02-15T21:44:13.213" LastActivityDate="2024-02-15T21:44:13.213" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7993" PostTypeId="2" ParentId="7989" CreationDate="2024-02-16T19:45:26.813" Score="2" Body="&lt;p&gt;I think that one key issue I see all the time is asking students to build contrived applications. You need to give them an actual problem to solve. The final assignment you were given seems pretty lazily thrown together by the professor. This is why it's hard to take what you were taught and apply it.&lt;/p&gt;&#xA;&lt;p&gt;Anecdote: My little brother almost dropped out of college because he just couldn't grasp calculus and failed the class. He ultimately went back the next year and had a different professor, and now he's published a paper and is on a fast track to be a professor at that college. He told me that it all came down to the difference in teaching style. He said the second time it was easy and intuitive.&lt;/p&gt;&#xA;&lt;p&gt;The ultimate point here, is that you're paying that school to teach you. If that teacher is doing a poor job, you should find a different teacher, or a different school/program.&lt;/p&gt;&#xA;&lt;p&gt;I've worked with quite a few people now who took an online code camp course, and they have all turned out to be good hires.&lt;/p&gt;&#xA;" OwnerUserId="14267" LastEditorUserId="27" LastEditDate="2024-02-25T20:13:23.063" LastActivityDate="2024-02-25T20:13:23.063" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="7994" PostTypeId="2" ParentId="7560" CreationDate="2024-02-20T18:28:06.723" Score="2" Body="&lt;p&gt;We have added a course at Colorado State University called &amp;quot;Software Construction&amp;quot;. It is typically taken by second year students after two semesters of courses taught using Java (intro and data structures). It is a prequel to the &amp;quot;software Engineering&amp;quot; course. Both feature semester long projects of different complexities. The difference is that the first course, all assignments are individual. In the second course, all assignments are done by a group.&lt;/p&gt;&#xA;&lt;p&gt;We have chosen to use two books &amp;quot;Clean Code&amp;quot; and &amp;quot;Clean Architecture&amp;quot;, both by Robert C Martin, for these courses. We feel that they give a excellent overview of topics we wish to cover. Unfortunately, the books don't contain complete projects.&lt;/p&gt;&#xA;&lt;p&gt;For a semester long project, we have adapted project ideas from other courses, simplifying structure, and providing some chunks of functionality. We assume a certain level of programming capability for students enrolled in the course.&lt;/p&gt;&#xA;&lt;p&gt;You might also look at the book &amp;quot;Polymorphism: As It Is Played&amp;quot; by Joseph Bergin. It really details test driven development in the context of writing a calculator program. This would make a nice project having students complete the code, or implement a RPN calculator.&lt;/p&gt;&#xA;" OwnerUserId="4301" LastEditorUserId="4301" LastEditDate="2024-02-21T21:57:05.047" LastActivityDate="2024-02-21T21:57:05.047" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7995" PostTypeId="2" ParentId="7307" CreationDate="2024-02-24T11:49:18.873" Score="1" Body="&lt;p&gt;I would suggest you this course on Udemy. A quick, easy and less costly way to learn GUI in C++. There is the link &lt;a href=&quot;https://www.udemy.com/course/visualcpp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.udemy.com/course/visualcpp/&lt;/a&gt; (&lt;a href=&quot;https://www.udemy.com/course/visualcpp/&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.udemy.com/course/visualcpp/&lt;/a&gt;)&lt;/p&gt;&#xA;" OwnerUserId="14285" LastActivityDate="2024-02-24T11:49:18.873" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7996" PostTypeId="1" CreationDate="2024-02-26T09:50:47.877" Score="1" ViewCount="62" Body="&lt;p&gt;As an experienced computer science educator, I find myself grappling with multifaceted challenges, including students lacking effective learning methods, the difficulty in crafting exercises that strike the right difficulty balance, and the dwindling motivation of students to acquire new skills. Moreover, grading has become a puzzle in an environment where students may not be sufficiently challenged, leading to a diminished investment in their education.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Main Question:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can computer science educators holistically address the&#xA;interconnected challenges of designing effective exercises,&#xA;motivating students to invest in their learning, and implementing&#xA;grading strategies that reflect true skill acquisition, especially in&#xA;the context of the rising influence of AI and the impact of the&#xA;COVID-19 pandemic on students?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Subquestions:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Exercise Design and AI Influence:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;It’s been hard to offer students some exercises to help them learn the basis. They won’t really work on them and directly use AI tools, and then once I’d ask them to solve more complex exercises they will struggle and fail.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How can educators design exercises that challenge students while&#xA;considering the prevalence of AI tools, ensuring that the learning&#xA;process remains hands-on and engaging?&lt;/li&gt;&#xA;&lt;li&gt;Are there strategies for crafting exercises that encourage&#xA;foundational understanding without being overly simplistic or easily&#xA;solved with AI assistance?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Motivation and Learning Environment:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In an era marked by reduced student motivation, compounded by the&#xA;effects of COVID-19, what approaches can be adopted to create an&#xA;engaging learning environment that fosters intrinsic motivation and&#xA;active participation?&lt;/li&gt;&#xA;&lt;li&gt;How can real-world applications and&#xA;collaborative learning be integrated to revive students' enthusiasm&#xA;for acquiring new skills?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Grading Strategies and Student Investment:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Given the challenge of grading in an environment where students may&#xA;lack motivation and skills, what grading methods can effectively&#xA;assess skill acquisition and incentivize continuous learning and&#xA;improvement?&lt;/li&gt;&#xA;&lt;li&gt;Are there grading systems that explicitly link grades to students' effort, growth, and overall investment in the learning process?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;PS: I'm not anti AI tools, as I'm using them a lot as what they are designed to be : tools. However, students usually use them to replace their learning and replace them actually doing the work, that leads to a very poor understanding of thing. In the long run they will fail to grasp the real challenge of CS jobs in the future.&lt;/p&gt;&#xA;" OwnerUserId="4900" LastEditorUserId="4900" LastEditDate="2024-02-28T13:52:42.913" LastActivityDate="2024-03-02T07:43:20.720" Title="Navigating New Challenges in CS Education (AI, COVID, Motivations, Grades, Exercices...)" Tags="|exercises|active-learning|ai|" AnswerCount="1" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="7998" PostTypeId="2" ParentId="7996" CreationDate="2024-03-02T07:43:20.720" Score="2" Body="&lt;p&gt;Personal preference: ask folk to turn-off personal devices (they are a distraction to others, not just user) and if there's something impressively urgent, take it to the other side of the door - a better location! I'm also old-fashioned in recommending the use of log-/lab-books, both for lecture-notes and for jotting ideas and recording decisions/progress during dev.work, eg why did I decide to 'go that way'. NB course admin-stuff includes research papers supporting 'paper over screen'.&lt;/p&gt;&#xA;&lt;p&gt;The GAI genie is out of the bottle. The only way to stuff it back in would be to ban Internet connections! That said, such tools offer the lazy student (who cannot see longer-term beyond his/her current assignment) a 'cognitive by-pass' short-cut. Hence, your question! Nevertheless, don't forget that many will go on to use such tools to assist them in the work-place. So, if a professional tool, shouldn't we be teaching best use of same, not banning it?&lt;/p&gt;&#xA;&lt;p&gt;Accordingly, we have to adapt. Perhaps alter practical-exercises to include a viva-voce component? Trainees return with their completed work. Ask for outline of solutions, eg some use for-loop, others while. Taking one group at a time, request show code. Anyone different? Ask another (in group) for walk-through - someone not understanding will fail at this point. Look at the names - ChatGPT often uses x, y, z (like) choices in cookie-cutter solutions, rather than descriptive names (isn't naming one of the most difficult tasks in coding?). Exposed? Grade goes down! Next ask A.N.Other who claims same solution, and ask for demonstration of a minor change - again, cannot be achieved if do not understand original work. eg original assignment: print all digits from zero to nine, and next step becomes: only odd numbers (thus Beginners will add a 'guard' if-statement, but could require more advanced to substitute a generator within the for-control (am talking Python here)).&lt;/p&gt;&#xA;&lt;p&gt;GitHub Copilot docs acknowledge this: “You are responsible for ensuring the security and quality of your code. We recommend you take the same precautions when using code generated by GitHub Copilot that you would when using any code you didn’t write yourself. These precautions include rigorous testing, IP scanning, and tracking for security vulnerabilities.” Need we say more?&lt;/p&gt;&#xA;&lt;p&gt;As mentioned, if 'cheat' on early work, unable to complete later - particularly if build on earlier submissions. Thus, warn of grading system - unlikely that first, trivial, assignments are weighted equally with more advanced work. So, is it worth any anxiety? Similarly, if claims of 'faster development' are to be believed, shorten assignment dates, and leave more time for later work which will better expose who-knows-what.&lt;/p&gt;&#xA;&lt;p&gt;Issues described are disconnect between intrinsic and extrinsic motivation. At the level of a trade/professional course, the former should be the driving force. We encourage, shape, direct, mentor, etc. Again, what is work-place scenario? Will 'boss' be interested in 'baby-ing' new hires?&lt;/p&gt;&#xA;&lt;p&gt;Agree with what saying. Anyone can help an A+ student achieve a few more percent after this course. The person who can take a D-student and help him/her to a B result, that's an achievement. May I refer you to an old joke: How many psychologists does it take to change a light-bulb? None - but the light-bulb has to want to change!&lt;/p&gt;&#xA;&lt;p&gt;Without more detail of the specific course(s) it might be difficult to offer help beyond such generalisations. However, happy to discuss and hope to learn from each-other...&lt;/p&gt;&#xA;" OwnerUserId="5598" LastActivityDate="2024-03-02T07:43:20.720" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7999" PostTypeId="1" AcceptedAnswerId="8000" CreationDate="2024-03-02T20:45:40.620" Score="5" ViewCount="149" Body="&lt;p&gt;Teaching CS concepts to students who have no signs of visual impairment is already quite challenging in nature. I would like to know how does college CS professors present some of the visual topics to students who cannot see them.&lt;/p&gt;&#xA;&lt;p&gt;For example, when discussing data structures, such as a graph, trees, etc, how do professors communicate the visual aspects of these structures to a student who might not be able to see them? I would imagine that failing to &amp;quot;picture&amp;quot; the structure will make it harder not just for those who can see, but even harder for those who cannot.&lt;/p&gt;&#xA;&lt;p&gt;Has anyone had any experience in this?&lt;/p&gt;&#xA;" OwnerUserId="14297" LastEditorUserId="27" LastEditDate="2024-03-02T23:03:47.713" LastActivityDate="2024-03-14T13:14:13.043" Title="How to present data structure concepts effectively to a blind student?" Tags="|secondary-education|accessibility|" AnswerCount="2" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8000" PostTypeId="2" ParentId="7999" CreationDate="2024-03-02T23:16:00.093" Score="4" Body="&lt;p&gt;First, good on you for trying to figure this out in advance.&lt;/p&gt;&#xA;&lt;p&gt;I'd direct you to a few other questions on this site for some context: &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7734/teaching-state-transition-diagrams-to-visually-impaired-blind-students&quot;&gt;Teaching state transition diagrams to visually impaired (blind) students&lt;/a&gt;, &lt;a href=&quot;https://cseducators.stackexchange.com/questions/3441/teaching-a-blind-high-school-student&quot;&gt;Teaching a blind high school student&lt;/a&gt;, and from our sister site, &lt;a href=&quot;https://matheducators.stackexchange.com/questions/2623/how-do-blind-people-learn-mathematics&quot;&gt;https://matheducators.stackexchange.com/questions/2623/how-do-blind-people-learn-mathematics&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Many colleges appear to offer services to blind students, including the possibility of someone accompanying them to lessons.&lt;/p&gt;&#xA;&lt;p&gt;For especially visual portions of lessons, such as trees, you can build models using legos and pipe cleaners, and have a guide, or even just a friendly student, modify the model as you lecture.&lt;/p&gt;&#xA;&lt;p&gt;But more importantly than any of these things would probably be to sit down with the student in question before class starts, and discuss what they might find helpful.  You can bring your ideas, but also listen to what they say.  They are more familiar with this process than you are, and will probably be able to give you a very good sense of what they need in order to learn.&lt;/p&gt;&#xA;&lt;p&gt;I'd make it a point to meet with this student twice more: once after a few weeks, and once midway through the semester, to check in and see how things are going, and find out if there are any further adaptations you need to make.&lt;/p&gt;&#xA;&lt;p&gt;With some forethought, I'm sure you can made an excellent class for your blind student!&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-03-02T23:16:00.093" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="8001" PostTypeId="1" CreationDate="2024-03-04T01:27:02.193" Score="1" ViewCount="57" Body="&lt;p&gt;I tried submitting &lt;a href=&quot;https://networkengineering.stackexchange.com/questions/85239/for-teaching-basic-dns-to-ip-translation-to-a-lay-audience-in-a-mooc-would-there&quot;&gt;this question to Network Engineering StackExchange&lt;/a&gt;, but they said it wasn't in their scope. So can see what happens here in Computer Science Educators StackExchange.&lt;/p&gt;&#xA;&lt;p&gt;On Coursera I'm taking Technical Support Fundamentals which is the first course in the Google IT Support Professional Certificate and I'm currently on module 4 which is on networking.&lt;/p&gt;&#xA;&lt;p&gt;This is training/education designed for a general audience where there isn't any particular prerequisite to have prior IT or computing experience.&lt;/p&gt;&#xA;&lt;p&gt;So there's a basic introduction to networking, and then a specific example where the IP address 172.217.6.46 is given, and the viewer is asked to put that IP address into a web browser.&lt;/p&gt;&#xA;&lt;p&gt;I tried this and there wasn't any response, and then I tried pinging 172.217.6.46 and got no response as well.&lt;/p&gt;&#xA;&lt;p&gt;But in the video it shows the Google home page showing up.&lt;/p&gt;&#xA;&lt;p&gt;The idea was to show the students that one can type in an IP address instead of a domain name and that a well-known website will then pop up.&lt;/p&gt;&#xA;&lt;p&gt;With all of the infrastructure in place perhaps it's not really so easy to have a single static IP for an example like that in a MOOC that is going to work in multiple different locations across different countries to bring up say Google or another well-known website. I suppose a network engineer could more precisely speak to this question.&lt;/p&gt;&#xA;&lt;p&gt;Anyway, the course in the English language, but there's people all over the world who speak English, and my understanding is that the course is open to people from all different countries.&lt;/p&gt;&#xA;&lt;p&gt;Maybe another way to do the example would be for the teacher to use either a website or the command line to do a DNS lookup, and then to put the IP address returned into a web browser, and show that the website comes up.&lt;/p&gt;&#xA;&lt;p&gt;The students could then do that as well, and as long as the DNS lookup method works, and the other parts work, the website should also come up on the student's machine.&lt;/p&gt;&#xA;&lt;p&gt;This is actually what I just kind of automatically did right after the example didn't work right away.&lt;/p&gt;&#xA;&lt;p&gt;In the post on Network Engineering I also added some more stuff, but perhaps I'll just keep this one shorter.&lt;/p&gt;&#xA;&lt;p&gt;My impression so far is that there isn't infrastructure to rapidly fix bugs/errors in the course materials. But maybe eventually they do go through the errata and fix bugs.&lt;/p&gt;&#xA;&lt;p&gt;As I said in the first version posted on the Network Engineering StackExchange they could add a pop-up to that video so that it lets people know that the example will not work. Just like what they did for the one on Installing Windows 10, where after the speaker said that Windows 10 is the latest version of Windows they added a pop-up adding that as of October 5, 2021, Windows 11 is the latest version of Windows.&lt;/p&gt;&#xA;&lt;p&gt;So as for the one on Network Engineering I can provide a link to the video on Coursera. There is a Coursera paywall; however, it seems that there's also three free trial videos.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://www.coursera.org/learn/technical-support-fundamentals/lecture/sLQ8s/the-web&quot; rel=&quot;nofollow noreferrer&quot;&gt;Coursera -&amp;gt; Technical Support Fundamentals -&amp;gt; Module 4 -&amp;gt;  The Web&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;(at about 1:47 in the video the IP address 172.217.6.46 is given which in the video goes to Google's homepage, but which didn't work for me)&lt;/p&gt;&#xA;&lt;p&gt;So can see how it goes with this post before possibly posting to the Coursera discussion forum for the class on that matter.&lt;/p&gt;&#xA;" OwnerUserId="14303" LastEditorUserId="14303" LastEditDate="2024-03-04T07:29:48.853" LastActivityDate="2024-04-01T14:07:04.760" Title="For teaching basic DNS to IP translation to a lay audience in a MOOC would there a way to have a static IP that would map to a well known website?" Tags="|networks|" AnswerCount="1" CommentCount="11" ContentLicense="CC BY-SA 4.0" />
  <row Id="8002" PostTypeId="1" AcceptedAnswerId="8006" CreationDate="2024-03-07T15:24:22.770" Score="11" ViewCount="7602" Body="&lt;p&gt;Why is stuff like&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;database administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Linux administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;network administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;etc. not prioritized? I used to think programming is the end of the road, but I realized there is much more to computer science than software development. I know the &amp;quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/Stockholm_syndrome&quot; rel=&quot;noreferrer&quot;&gt;Stockholm syndrome&lt;/a&gt;&amp;quot; and we'd say &amp;quot;They're easier to learn than programming&amp;quot;, but that's not my concern. What I am saying is when we say &amp;quot;final year project&amp;quot; in computer science, why does it have to be a software? Why not other stuff? Not everyone &lt;em&gt;can&lt;/em&gt; be a software developer even if they &lt;em&gt;work&lt;/em&gt; really hard for it which was the case for me. I can code, but I can't develop software.&lt;/p&gt;&#xA;&lt;p&gt;I wish I had realized it sooner. Why is it like that?&lt;/p&gt;&#xA;" OwnerUserId="13955" LastEditorUserId="1314" LastEditDate="2024-03-10T07:23:12.037" LastActivityDate="2024-03-12T09:40:38.017" Title="Why is &quot;programming&quot; so much prioritized in a computer science degree?" Tags="|programming|" AnswerCount="8" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="8003" PostTypeId="2" ParentId="8002" CreationDate="2024-03-07T16:07:36.380" Score="5" Body="&lt;p&gt;From Wikipedia (but you can get very similar definitions from anywhere):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Computer science is the study of computation, information, and automation. Computer science spans theoretical disciplines (such as algorithms, theory of computation, and information theory) to applied disciplines (including the design and implementation of hardware and software). Though more often considered an academic discipline, computer science is closely related to computer programming.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Database administration is a rather different discipline to Computer Science. In fact you can approach it with no comp sci background.&lt;/p&gt;&#xA;&lt;p&gt;Network administration, similarly, can be approached without any comp sci background. It is a different discipline.&lt;/p&gt;&#xA;&lt;p&gt;Even Linux administration can be done without being able to code, although it would help.&lt;/p&gt;&#xA;&lt;p&gt;If you can code, by definition you are developing software - so maybe there is a language or terminology barrier here.&lt;/p&gt;&#xA;" OwnerUserId="2357" LastActivityDate="2024-03-07T16:07:36.380" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="8004" PostTypeId="2" ParentId="8002" CreationDate="2024-03-07T23:30:13.303" Score="15" Body="&lt;p&gt;All of the things you mention aren't really CS, but rather management of various kinds. CS is a theoretical field at base, and some &amp;quot;vocational&amp;quot; programs will teach the applied things that you have mentioned. A CS program makes you a creator, not a manager if done well.&lt;/p&gt;&#xA;&lt;p&gt;A CS database course is theoretical, probably dealing with the data structures used to efficiently store and retrieve large amounts of data. But it isn't about administering a database and managing servers and security, and such.&lt;/p&gt;&#xA;&lt;p&gt;A CS operating systems course will discuss principles of implementation of an OS, such a Kernel processes. It may focus on a linux like structure, but is probably more general. Micro Kernels are (to me) an interesting thing, unlike what you see in linux.&lt;/p&gt;&#xA;&lt;p&gt;A CS Networking course will discuss things like compression, encryption, bandwidth, network topologies, and on and on, but isn't about administering networks, by which you likely mean administering a single node in a network and dealing with servers, outages, attacks, and such.&lt;/p&gt;&#xA;&lt;p&gt;CS is about the future of things. Its intent is to prepare people to create new things, not manage existing things. Vocational programs are for the latter.&lt;/p&gt;&#xA;&lt;p&gt;And, coding is a tool used in all of these things. It isn't the main purpose, but it is how we create things in CS, so is an essential skill. It isn't that it is &amp;quot;prioritized&amp;quot; actually, but without it you have no tool to create anything. (Well, math is a pretty good tool also for this.)&lt;/p&gt;&#xA;&lt;p&gt;It might better be said that a CS program prioritizes &amp;quot;algorithms&amp;quot; (algorithmics) rather than programming. Algorithms are a higher level way of thinking. Algorithms are often &lt;em&gt;implemented&lt;/em&gt; in programs, and programs are used for testing, but they are, at base, highly conceptual.&lt;/p&gt;&#xA;&lt;p&gt;All of the subfields mentioned here depend on specialized efficient algorithms for their proper action and usability.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2024-03-07T23:30:13.303" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8005" PostTypeId="2" ParentId="8002" CreationDate="2024-03-08T08:34:44.053" Score="33" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;Why are stuffs like&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;database administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;linux administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;network administration&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;etc not prioritized?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Because they are only tangentially related to Computer Science. Programming is more closely related to Computer Science, but the two are still very different and distinct. I challenge you to read through a dozen or so typical questions on &lt;a href=&quot;https://stackoverflow.com/questions/?pagesize=50&quot;&gt;Stack Overflow&lt;/a&gt; and &lt;a href=&quot;https://cs.stackexchange.com/questions/?pagesize=50&quot;&gt;Computer Science Stack Exchange&lt;/a&gt; or even  &lt;a href=&quot;https://cstheory.stackexchange.com/questions/?pagesize=50&quot;&gt;Theoretical Computer Science Stack Exchange&lt;/a&gt; and analyze their differences.&lt;/p&gt;&#xA;&lt;h1&gt;Computer Science vs. Programming&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;Computer Science&lt;/em&gt; is a really bad name, because it confuses a &lt;em&gt;tool&lt;/em&gt; with the &lt;em&gt;object of study&lt;/em&gt;. &lt;a href=&quot;https://quoteinvestigator.com/2021/04/02/computer-science/&quot; rel=&quot;noreferrer&quot;&gt;It has been said that Computer Science is really a misnomer, and is akin to calling Astronomy &amp;quot;Telescope Science&amp;quot;&lt;/a&gt; – just because computers can be used to investigate information and processes doesn't mean that they are somehow inherent to that science, just like the fact telescopes can be used to investigate planets and stars doesn't mean that telescopes are somehow inherent to astronomy.&lt;/p&gt;&#xA;&lt;p&gt;Computer Science isn't about computers. It is about Comput&lt;strong&gt;ation&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There are some languages, for example German, French, and Italian, where the scientific discipline makes no reference to computers at all: in German, it is called &lt;em&gt;Informatik&lt;/em&gt;, in French &lt;em&gt;informatique&lt;/em&gt;, in Italian &lt;em&gt;informatica&lt;/em&gt; – all are a neologism based on &lt;em&gt;information&lt;/em&gt; and the Greek suffix &lt;em&gt;-ik&lt;/em&gt;, formed similar to &lt;em&gt;mathemetics&lt;/em&gt;. In Spanish, it is called &lt;em&gt;ciencias de la informática&lt;/em&gt; (similar to German, French, and Italian) or &lt;em&gt;ciencias de la computación&lt;/em&gt;: note the subtle difference to English, it is the science of comput&lt;strong&gt;ation&lt;/strong&gt;, not the science of comput&lt;strong&gt;ers&lt;/strong&gt;. Danish uses the terms &lt;em&gt;datalogi&lt;/em&gt; (a neologism formed by combining &lt;em&gt;data&lt;/em&gt; with the &lt;em&gt;-logi&lt;/em&gt; suffix as in geology, meteorology, metrology, etc.) for the stricter sense of the science of information, data, computation, and processes, and &lt;em&gt;informatik&lt;/em&gt; for a broader inter-disciplinary view of the effects of &amp;quot;datalogi&amp;quot; on society, politics, humanity, and the broader world in general; what might be called &lt;em&gt;Social Informatics&lt;/em&gt; in English.&lt;/p&gt;&#xA;&lt;p&gt;As you can see, in many languages, there is a clear distinction made between &amp;quot;Informatics&amp;quot; and computers. It is a rather unfortunate accident of history that the language which confuses the two also happens to be the lingua franca for it.&lt;/p&gt;&#xA;&lt;p&gt;I always thought it was a little harsh and arrogant, but there is a kernel of truth in what my Informatics professor said in the first lecture: &amp;quot;if you expect to learn programming, the trade school is on the other side of town&amp;quot;. We &lt;em&gt;did&lt;/em&gt;, in fact, do &lt;em&gt;some&lt;/em&gt; programming: we constructed Turing Machines, wrote some λ-calculus expressions, constructed some Petri Nets, NFAs, DFAs, PDAs, and Mealy machines, we wrote some &lt;code&gt;WHILE&lt;/code&gt; and &lt;code&gt;LOOP&lt;/code&gt; language code (teaching languages designed to teach the difference between bounded and unbounded loops), some Gofer (a teaching variant of Haskell), some MIPS assembly, some Python, some GJ (Martin Odersky's variant of Java with parametric polymorphism), and probably many others I forgot. But it was all in service of teaching a specific concept, such as the difference between primitive-recursive and general-recursive functions.&lt;/p&gt;&#xA;&lt;p&gt;Computer Science is the science of computation, information, data, and processes. Computers and programs are tools which &lt;em&gt;can&lt;/em&gt; be used to study Computer Science, but they are not its subjects. Designing a new routing protocol will definitely involve computer science, but configuring a switch does not. Designing a new data structure for efficient storage and retrieval of databases from SSDs will involve Computer Science, but configuring PostgreSQL does not. Replacing Linux's task scheduler with a starvation-free variant will involve Computer Science, but configuring logging does not.&lt;/p&gt;&#xA;&lt;p&gt;I'm not saying any of these are not important, quite the opposite. But they are not Computer Science, so why should they be taught as part of Computer Science? Knowing how to change a tyre is also an important skill, but that doesn't mean it should be taught as part of a Chemistry degree.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What I am saying is when we say &amp;quot;final year project&amp;quot; in computer science, why does it have to be a software?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If your final year project is writing software, I would argue you are not studying Computer Science, you are studying programming. There is nothing wrong with studying programming, nor is there anything wrong with studying database administration, Linux administration, network administration, or other IT topics, but it's just not Computer Science.&lt;/p&gt;&#xA;&lt;p&gt;I would expect a final year project in Computer Science to be something like designing a new data structure or a new algorithm, proving properties of an algorithm or data structure, etc. A final year project in Computer Science &lt;em&gt;can&lt;/em&gt;, of course &lt;em&gt;include&lt;/em&gt; a program which demonstrates or exemplifies the subject matter. For example, a ride sharing app, for which you prove a certain optimality property for its matching algorithm. But simply writing a program does not demonstrate understanding of Computer Science.&lt;/p&gt;&#xA;" OwnerUserId="945" LastActivityDate="2024-03-08T08:34:44.053" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8006" PostTypeId="2" ParentId="8002" CreationDate="2024-03-08T14:45:10.493" Score="21" Body="&lt;p&gt;The realm of computing encompasses a vast array of fields, each specializing in various aspects of computer technology, from software development to hardware engineering, and beyond.  Importantly, none of these fields (except for some the math that became computer science) existed before computers.&lt;/p&gt;&#xA;&lt;p&gt;The list of computer fields is growing constantly, and new subspecialties are emerging.  Software Engineering is turning into an entire field that is separate from programming.  Machine learning has transformed over the last ten years from a side curiosity within computer science to its own entire subfield.  Cloud engineering has become a new and separate area.&lt;/p&gt;&#xA;&lt;p&gt;There are probably more than a hundred distinct fields at this point - far too many to enumerate here, and not a useful exercise, since which fields are in and out would be subject to reasonable debate, and the list is getting bigger all the time.&lt;/p&gt;&#xA;&lt;p&gt;The term &amp;quot;Computer Science&amp;quot; still has an unfortunate double usage, with some people referring to the theoretical, mathematical underpinnings of computation, and others referring to programming.  (I personally think of programming as a distinct field that once emerged from computer science, but has since grown its own independence.)&lt;/p&gt;&#xA;&lt;p&gt;As others have pointed out, the areas that you are targeting are under the auspices of IT, which is also a vast field that is splintering into subfields.  There are programs to study IT, and certifications to gain.  The three specific areas you mentioned are often grouped together - you can spend your whole life working in that arena, and make a great difference to people by creating and maintaining reliable infrastructure that allows them to do whatever it is that they need to get done.&lt;/p&gt;&#xA;&lt;p&gt;If you're not great at making software, that isn't really a hindrance - go and pursue some IT certifications and work.  It's not computer science, but it is an important field in its own right, and can bring quite a lot of satisfaction.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-03-08T14:45:10.493" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8007" PostTypeId="1" CreationDate="2024-03-09T13:07:08.297" Score="4" ViewCount="110" Body="&lt;p&gt;It's a known fact that computer science is inherently a tough field to grasp concepts because of its abstract nature and interdependency with lots of concepts at once.&lt;/p&gt;&#xA;&lt;p&gt;What study techniques besides active recall, repetition(and those general study tips found in Ali Abdaal's youtube video) are useful to actually understand &amp;quot;tough concepts&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Some methods I've devised so far:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Start with exercises on textbook and study in order to solve them.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Study in Iteration Based Model. Example study chapter 1 in first iteration. Skip some topics. When you come back after ending the current iteration by studying every chapters to next iteration, you again study chapter 1's skipped topics.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What else novelty methods you follow? I find computer science too tough to &amp;quot;actually understand&amp;quot;, easier to &amp;quot;bluff&amp;quot;. The weird thing is that I am a Computer Science grad and I still feel lacking in &amp;quot;actual&amp;quot; computer science.&lt;/p&gt;&#xA;&lt;p&gt;When I try to build softwares, write SQL, performance tune the system, develop games etc I always find myself coming back to the concepts of these subjects:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;distributed systems, computing and algorithms&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;database management systems&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;operating systems&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;computer networks&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;network and web security&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;data structures and algorithms&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;computer graphics, linear algebra&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;artificial intelligence, neural networks&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;computer organization and architecture, embedded systems&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;etc. It bothers me a lot that I am not proficient in all of these things. I accept that these things are tough but I really want to learn no matter how much time it takes me. So I want to learn the study techniques for it.&lt;/p&gt;&#xA;&lt;p&gt;For example: Today I was studying about 3d transformations(Guess which transformation is that? :D) and today I feel hopeless. This is not the first time I am studying about 3d transformations, I studied them in college few years back. Now, I am restudying computer science for my passion fulfillment.&lt;/p&gt;&#xA;&lt;p&gt;I feel hopeless and feel that &amp;quot;I will never be able to learn&amp;quot;, which is mainly due to my lack of belief in techniques to learn. I know this might be slightly off topic, but I want to note this point.&lt;/p&gt;&#xA;&lt;p&gt;I love computers science and I've brought tons of books to study computer science, ranging from dbms, os, computer network, security, distributed systems, computer graphics etc. I recently thinking of purchasing a book on linear algebra as I feel math is the foundations for the most stuff in computer science.&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2024-03-23T07:23:59.530" Title="Novel Study Techniques to Study Computer Science Concepts?" Tags="|self-learning|undergraduate|" AnswerCount="2" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="8008" PostTypeId="2" ParentId="8002" CreationDate="2024-03-10T13:42:46.610" Score="7" Body="&lt;p&gt;Other answers have explained how these Information Technology fields are separate from &amp;quot;Computer Science&amp;quot;, and deserve their own curricula. I'm going to give a somewhat different view.&lt;/p&gt;&#xA;&lt;p&gt;I have been a programmer for many decades, and my undergraduate education (in the early 80's) was in computer science and software engineering. But during my career I have had many roles: software developer, system/network administrator, and customer technical support.&lt;/p&gt;&#xA;&lt;p&gt;In all these professions, I found that my CS/programming background was an important contributor to my success. It's important to understand how computer systems work in order to be able to manage and support them. I've had colleagues who didn't have similar background, and they often learned to do things by rote, without really understanding &lt;em&gt;why&lt;/em&gt; they worked; acting without understanding makes you less flexible and creative.&lt;/p&gt;&#xA;&lt;p&gt;Furthermore, programming comes up &lt;strong&gt;all the time&lt;/strong&gt; in various IT roles. As a system administrator, you often have to write scripts to automate your processes. In tech support, I would write programs to reproduce problems or test solutions, and I would often read the code of the software I was supporting to find the cause of a problem and figure out how to work around it.&lt;/p&gt;&#xA;&lt;p&gt;In my opinion, a solid base in programming is important for a career in any other computer-related field. While it's possible to be effective without it, I don't think you can excel at them.&lt;/p&gt;&#xA;" OwnerUserId="1471" LastActivityDate="2024-03-10T13:42:46.610" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="8009" PostTypeId="2" ParentId="8002" CreationDate="2024-03-10T21:50:11.080" Score="2" Body="&lt;p&gt;Computer Science basically follows a &amp;quot;make your tools&amp;quot; approach:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There have been people who just wanted to publish some books and found typesetting to be lacking, so they had to develop TeX first (Donald E Knuth).&lt;/li&gt;&#xA;&lt;li&gt;Others were not content with the state of programming, so they conceived a new language (Niklaus Wirth, and many others).&lt;/li&gt;&#xA;&lt;li&gt;Even large operating systems are in the reach of a single dedicated developer (Linus Tovalds).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Nowadays you don't have to build all tools yourself anymore - that was quite different when I started - but nevertheless you &lt;em&gt;can&lt;/em&gt; do so. Or read the code of existing software (if it is open source), find and fix errors, and thus contribute.&lt;/p&gt;&#xA;&lt;p&gt;In contrast, just &lt;em&gt;administering&lt;/em&gt; tools which others conceived is considered to be a much more simple occupation. No need to go to university to do that. Here in Germany we have the &lt;em&gt;Fachinformatiker&lt;/em&gt;, it's a recognized occupation requiring formal training (like hairdresser or electrician) - but not a degree.&lt;/p&gt;&#xA;&lt;p&gt;In addition, administration of black box &amp;quot;products&amp;quot; has a comparatively short half-value period... most products I worked with then are obsolete and forgotten now. The knowledge and experience in building systems is not.&lt;/p&gt;&#xA;" OwnerUserId="1332" LastEditorUserId="1332" LastEditDate="2024-03-12T09:40:38.017" LastActivityDate="2024-03-12T09:40:38.017" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="8010" PostTypeId="2" ParentId="8002" CreationDate="2024-03-11T12:18:27.827" Score="2" Body="&lt;h1&gt;&lt;strong&gt;It is not&lt;/strong&gt;&lt;/h1&gt;&#xA;&lt;p&gt;(at my university)&lt;/p&gt;&#xA;&lt;p&gt;Also the stuff you list is all &amp;quot;administrative&amp;quot; tasks. Aka something that has littel to no place in an academic education.&lt;/p&gt;&#xA;&lt;p&gt;My bachelor only had one programming class required, and looking back that was instrumental because you can't really just drily talk about how software engineering works without having done any of it (even though coding is just a fraction of it, it is the most necessary part of it).&lt;/p&gt;&#xA;&lt;p&gt;And then you need to be able to code for the higher courses. You don't learn it there but it is assumed that you can do it, similarily to the ability to write.&lt;/p&gt;&#xA;&lt;p&gt;Except for some practical courses or focused-on-programming courses (like object-oriented programming patterns) it is absolutely not overemphasized and you can graduate your bachelors without actually being able to program perfectly fine (semi-cheat your way through one single easy exam)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;But let's go back to the stuff you'd like to see:&lt;/strong&gt;&#xA;the admin stuff you list is the equivalent to jus coding. That's not what you study for. &amp;quot;just coders&amp;quot; come from a couple of weeks bootcamps, software engineers come from multi year degrees. Similarily your admin stuff is learned (in Germany) in a practical education, not at university/college. Because that's what it is.&lt;/p&gt;&#xA;" OwnerUserId="9981" LastActivityDate="2024-03-11T12:18:27.827" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8011" PostTypeId="2" ParentId="8007" CreationDate="2024-03-11T20:22:31.577" Score="2" Body="&lt;p&gt;It sounds like you are interested in the untaught discipline of software engineering. Untaught because the only thing that comes close is a CS degree, and the average CS professors wouldn't be caught dead doing something so plebian as engineering.&lt;/p&gt;&#xA;&lt;p&gt;One book I recommend is Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin.&lt;/p&gt;&#xA;&lt;p&gt;It has a lot of good advice that will teach you how to write professional code with practices that future you/ people who work on anything you build/maintain will thank you for.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Computer programing&lt;/strong&gt;, is not a science. It is (when done correctly) engineering. The way you get better at engineering is not by reading books on engineering (though they help). It is by practicing engineering, by building things, making mistakes, and learning from those mistakes.&lt;/p&gt;&#xA;&lt;p&gt;You want to become a good programmer? Start programming! Don't however follow a programming tutorial. Instead use a tutorial to decide what you are going to make (so that you don't try to make something to complicated) and then build it without following a tutorial (Looking up and researching how to build individual pieces) This will teach you how to build/implement/use the building blocks so that you can reuse them on other projects... Instead of teaching you how to build a website that you can post pictures on, or whatever the tutorial was for.&lt;/p&gt;&#xA;" OwnerUserId="14332" LastEditorUserId="14332" LastEditDate="2024-03-13T16:25:39.833" LastActivityDate="2024-03-13T16:25:39.833" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8012" PostTypeId="2" ParentId="8002" CreationDate="2024-03-11T22:22:15.087" Score="2" Body="&lt;p&gt;As a CS graduate who has spent most of his career programming, I feel you. There are a lot of factors playing into the answer. Here are some of my favorites:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Nowadays, someone interested in spinning up or maintaining a database, network, or Linux instance for work should get a degree ending with &amp;quot;Information Systems.&amp;quot;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;At my university, we had the Computer Information Systems degree, but I've seen other schools with Business Information Systems and Management Information Systems.&lt;/li&gt;&#xA;&lt;li&gt;If you didn't realize this issue early in your college career, then your counselor is partly to blame. They should have warned you.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Another answer talks about the linguistics of the term &amp;quot;Computer Science,&amp;quot; so I'll briefly touch on that:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The roots of Computer Science go back to the WWII and early Cold War eras, where the field was heavily pioneered by Americans and Brits (who both speak English). So the English term for Computer Science actually predates what we now call a computer. Back then, a computer was a person performing computations.&lt;/li&gt;&#xA;&lt;li&gt;Other languages picked up their equivalent terms over the next several years/decades, largely with less baggage.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Early computer science dealt with the study of what kinds of computation that a machine could carry out. This study is unavoidably linked to programming. After all, when you want to prove out a new algorithm, data structure, or computability limit, writing a program is the most straightforward tool you have for that.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Remember, SQL, Linux, and networking were all developed in the 1970s, a full generation after computer programming.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The world of computers moves too fast for the legacy university system. Consider this: It takes a university department years of debate and research to develop changes to their curricula standards. That's fine for pretty much every other field, but in the world of computers, the things that could be studied changes significantly &lt;em&gt;while creating the standards&lt;/em&gt; for the department.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Even in the other sciences, which change faster than the arts, things don't move so fast that a class curriculum is basically outdated by the time it sees print.&lt;/li&gt;&#xA;&lt;li&gt;This rate of change naturally pushes the academic study of this field towards things that don't change so quickly, like algorithms, data structures, security fundamentals, core hardware architectures, machine languages, etc. Imagine a person learning all the intricate details of Java in the year 2005 (which would have seemed reasonable at the time). That would have been useless information only 15 years later, long before that person retired.&lt;/li&gt;&#xA;&lt;li&gt;I should note that I don't disagree with how colleges/universities handle this issue, nor do I think that Computer Science degrees are useless. I've personally found it very helpful to understand hardware fundamentals, programming paradigms, and the like, despite the fact that I rarely use those knowledge sets directly now that I'm in my career.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are other pieces to the puzzle that your question tugs at, but these are the pieces that have resonated with me as I've talked with others in the 10 years since I graduated. Hopefully something here was useful to you. GL!&lt;/p&gt;&#xA;" OwnerUserId="14334" LastActivityDate="2024-03-11T22:22:15.087" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8013" PostTypeId="2" ParentId="8007" CreationDate="2024-03-14T11:40:37.597" Score="2" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;It's a known fact that computer science is inherently a tough field to grasp concepts because of its abstract nature and interdependency with lots of concepts at once.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think computer science is tough for several reasons - but not necessarily because of its abstractness or the interdependency of many concepts.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;An ill-defined and overly-general field&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Computer science is an ill-defined field of modern vintage, that has arisen primarily so that academia can study and teach topics associated with the industrial and military application of computers.&lt;/p&gt;&#xA;&lt;p&gt;Because a computer science curriculum doubles as a trade school for all kinds of professional roles in industry, there are many different demands made of it, which leads to highly general curriculums with teaching spread thinly, and with only smaller parts of the curriculum actually being relevant to any individual student/practitioner.&lt;/p&gt;&#xA;&lt;p&gt;Courses would seem easier if more specific content was taught with an appropriate amount of time allocated, but then the course would no longer be &amp;quot;computer science&amp;quot; but something far more specific.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;A field poorly understood by academia&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The concepts and their relationships, and methods of teaching them, are still not really a settled &amp;quot;science&amp;quot; at all.&lt;/p&gt;&#xA;&lt;p&gt;A large number of &amp;quot;styles&amp;quot; or &amp;quot;philosophies&amp;quot; of programming, for example, are often rooted in deep conceptual conflicts in the academic realm covered by computer science.&lt;/p&gt;&#xA;&lt;p&gt;And although programming languages are typically covered by &amp;quot;computer science&amp;quot;, few are willing to accept (for example) that the design or study of programming languages is at all &amp;quot;scientific&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Poor systems of teaching&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Another problem is that professional practitioners who are also clear thinkers and excellent communicators, are often in market demand industrially, and this typically leads to a starvation of talent in teaching and academia where salaries and conditions have deteriorated over the decades, which then exacerbates the relative shortage of well-taught students amongst the next generation.&lt;/p&gt;&#xA;&lt;p&gt;With poor pay and conditions, you then potentially end up with teachers and professors who are less suited to teaching this particular subject (and might even end up being drawn from backgrounds in adjacent fields of study, like mathematics, which are not full-square with computer science).&lt;/p&gt;&#xA;&lt;p&gt;And many of the things first taught in university computer science courses, should probably be start to be taught to primary school children. You wouldn't expect to put a student on a university physics course who hadn't learned decimal arithmetic in school yet. You wouldn't expect to put a student on a university chemistry course who hadn't heard of the atom yet. Why should a university computer science course have to cover basic binary concepts?&lt;/p&gt;&#xA;&lt;p&gt;Indeed, those who are effective as professionals are invariably self-learners, because there is a large amount of learning necessary relative to the small amount provided formally and effectively in school and university curriculums.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastEditorUserId="9075" LastEditDate="2024-03-23T07:23:59.530" LastActivityDate="2024-03-23T07:23:59.530" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="8014" PostTypeId="2" ParentId="7999" CreationDate="2024-03-14T13:14:13.043" Score="2" Body="&lt;p&gt;As a blind student, you may have no concept of visualisation, but I assume you must still have some concept of space, of geography and navigation, and of the placement of physical objects, since this can be sensed by touch, by hearing, and so on.&lt;/p&gt;&#xA;&lt;p&gt;Data structures are about structuring the placement of data within a system of addressing.&lt;/p&gt;&#xA;&lt;p&gt;This placement is important in computing because computers operate upon data, but the procedures used to drive the computer invariably reference &lt;em&gt;areas of data storage&lt;/em&gt; (with each area distinguished by its address).&lt;/p&gt;&#xA;&lt;p&gt;Whereas a food recipe for example may say &amp;quot;get the flour, get the butter, get the sugar&amp;quot;, a typical computer program says &amp;quot;get the contents of the container labelled 'flour' in the cupboard labelled 'pantry', get the contents of the container labelled 'butter' in the appliance labelled 'fridge', get the contents of the container labelled 'sugar' on the surface labelled 'worktop'&amp;quot;, and it works with whatever those contents are, or crashes if the kitchen layout is altered and the location no longer exists.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2024-03-14T13:14:13.043" CommentCount="9" ContentLicense="CC BY-SA 4.0" />
  <row Id="8015" PostTypeId="2" ParentId="7957" CreationDate="2024-03-14T22:58:31.567" Score="0" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;these are often too intricate for classroom discussion. Consequently, I find myself reverting to the simpler, albeit less practical, examples I initially sought to avoid.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I think the problem is that many educators start with the idea that objects are a basic concept, and the design of systems of objects from scratch ought to be simple to teach to students who have no prior commercial or professional experience.&lt;/p&gt;&#xA;&lt;p&gt;In reality, systems of objects are more suited to applications which are non-trivial (in the sense that the development is too much for one person to handle alone), and one does not necessarily have to be taught how to design libraries of objects in order to understand how to use existing object-oriented libraries within what is essentially standard procedural code.&lt;/p&gt;&#xA;&lt;p&gt;Once you're digging into how to design whole systems of objects (which is the necessary context to discuss inheritance), you're really at quite an advanced level of design complexity.&lt;/p&gt;&#xA;&lt;p&gt;It's like discussing the design principles of buildings with flying buttresses, with young apprentices who haven't laid a brick in the field yet. You just wouldn't do it - in the medieval world, the audience for any serious discussion of designing buildings with flying buttresses, would be master masons.&lt;/p&gt;&#xA;&lt;p&gt;It's a number of years since I've written any code that involved designing systems of objects (as opposed to merely using pre-made objects from standard libraries), so the fine details of examples are fading from memory, but I'm sure each and every attempt to use inheritance resulted in code that was ultimately far more difficult to deal with (including reading, maintaining, and re-adapting to change) than alternative approaches not involving inheritance, and the attempts were quickly undone.&lt;/p&gt;&#xA;&lt;p&gt;Even with screens/visual forms where there seemed to be an element of common layout, inheritance (speaking in the context of Winforms here) always seemed eventually to lead to more pain than it was worth, and copy-and-paste or repetition was the way to go. My understanding from discussion and from wide reading, is that I'm not alone in these experiences.&lt;/p&gt;&#xA;&lt;p&gt;My advice would be to heed the fact that most object-oriented design is not a simple topic to teach nor appropriate for beginners, and that the difficulty finding scenarios that are both plausible/practical and simple to describe in a classroom, is the symptom of the fact.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2024-03-14T22:58:31.567" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8016" PostTypeId="1" CreationDate="2024-03-16T23:03:07.523" Score="3" ViewCount="46" Body="&lt;p&gt;As an educator, I've created a course with assignments featuring automated tests via browxy.com, an online solution. However, I'm concerned that students may seek solutions from external sources, such as ChatGPT, compromising the integrity of the assessments. I'm currently exploring strategies to mitigate this issue, such as modifying the problems. Have you encountered similar challenges, and if so, how have you addressed them effectively?&lt;/p&gt;&#xA;" OwnerUserId="14350" LastActivityDate="2024-03-17T11:50:14.917" Title="What strategies can be implemented to prevent students from cheating while completing online assignments?" Tags="|lesson-ideas|curriculum-design|" AnswerCount="1" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8017" PostTypeId="2" ParentId="8016" CreationDate="2024-03-17T11:50:14.917" Score="4" Body="&lt;p&gt;You first used the term &amp;quot;assignment&amp;quot;, and then &amp;quot;assessment&amp;quot;. I would start by asking the question of yourself, which is the predominant purpose of the activity?&lt;/p&gt;&#xA;&lt;p&gt;I don't think here are any great answers to be had if you want your labs to be a significant source of grades.  It used to be that it was practical to have lab coding assignments as the bulk of the grades, but I suspect those days are gone. LLMs can competently code essentially any good lab that we can create, because good labs are deeply organized things, and they work towards LLMs strengths.&lt;/p&gt;&#xA;&lt;p&gt;The best way I've encountered to deal with it so far is to keep assessments to things the students do in front of you, ideally on paper. Labs, then, become rich learning environments in which to wrestle with, and hopefully master, the material.&lt;/p&gt;&#xA;&lt;p&gt;Then inform students of the structure.  *These labs are practice for your tests. I strongly recommend using then as learning opportunities. I've put a lot of work into making sure that they'll be good ones. That said, if you cheat, it will come back at you on the tests, which is where you prove that mastery to me.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;This setup has the side benefit of encouraging students to think about how they can best arrange their own learning, and making explicit how your course materials are designed to support them.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-03-17T11:50:14.917" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8018" PostTypeId="1" CreationDate="2024-03-17T16:45:05.850" Score="0" ViewCount="88" Body="&lt;p&gt;Take a computer scientist with some skills of imperative, functional, and declarative programming languages excluding Python and knowing almost nothing about machine learning (e.g., he/she did 0 to 1 exercises on neural nets in his/her graduate studies decades ago). The exact portfolio of the programming languages that the individual knows probably doesn't matter, and for the sake of a concrete example, let's assume C, C++, C#, Spec#, Java, Assembler, Fortran, Pascal, Basic, JavaScript, VBScript, shell scripts, Maple, ML, LISP, F#, spreadsheet calculation, Boogie, Prolog, LaTeX, HTML, JSON, some basic CSS, some basic SQL.&lt;/p&gt;&#xA;&lt;p&gt;How long would he/she need to learn Python including the necessary libraries? He/she would learn himself/herself using publicly available online tutorials. We'd like to have a concrete estimation, say, in person-days assuming a standard working of, say, 8 full working hours.&lt;/p&gt;&#xA;&lt;p&gt;The goal would be to prepare for a course on the foundations of machine learning. The exact contents of the course probably doesn't matter, and for the sake of an example, let's assume supervised learning, unsupervised learning, evaluation and improvement, introduction to deep learning, basics in neural networks, convolutional neural network (CNN), transfer learning, regional CNN, methods of creative image generation, recurrent neural networks, word processing using neural networks, language models, deep reinforcement learning, Bayesian neural networks, project work); this course does require Python (and no other programming language). Though there's a preparatory course in Python taking 4 weeks, this preparatory course (1) is directed to more general public (programming beginners, computer scientists, IT specialists, people with experience in engineering or data analysis and specialists with relevant professional experience) and (2) prepares for a bunch of other topics as well (Scrum, requirements engineering, data engineering, cloud computing, Linux admin &amp;amp; engineering, backend development, Design thinking, software testing, Azure, data analytics, spatial analysis, frontend development, cloud administration, CCNA, statistics, big data, data manager, …); so the only conclusion we can make is an upper bound of 4 weeks = 20 person-days.&lt;/p&gt;&#xA;" OwnerUserId="14351" LastEditorUserId="14351" LastEditDate="2024-03-19T18:14:28.720" LastActivityDate="2024-03-19T18:14:28.720" Title="How long would it take an average theoretical computer scientist to learn Python to prepare for learning machine learning?" Tags="|python|machine-learning|" AnswerCount="1" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8019" PostTypeId="2" ParentId="8018" CreationDate="2024-03-18T13:57:00.127" Score="5" Body="&lt;p&gt;Actually your question is unanswerable, or, more precisely, has only a meaningless answer. Note that a uniform distribution has a perfectly well defined &amp;quot;average&amp;quot; (mean, median, whatever) but the average is entirely worthless as a prediction in any particular case.&lt;/p&gt;&#xA;&lt;p&gt;I taught CS for 30 some years and have a working knowledge of only some of those things you assume as background. I never bothered with the details of javascript, for example, though I understand its principles and origin. I never had a project that required it, so why bother.&lt;/p&gt;&#xA;&lt;p&gt;Furthermore, how long it would take and individual to learn this with some instruction would depend on the nature of the instruction. A basic general course in Python would almost certainly &amp;quot;teach&amp;quot; things that such a person doesn't need taught. A tailored course would bring them up to speed much faster.&lt;/p&gt;&#xA;&lt;p&gt;Once you understand the fundamentals of OO programming (say with Java) and you understand the difference between statically and dynamically typed languages (say with knowledge of Scheme), then &amp;quot;learning&amp;quot; Python is very quick, being mostly a syntax issue.&lt;/p&gt;&#xA;&lt;p&gt;The libraries are a different matter, of course, but with adequate commentary and a way to find the relevant things, the learning curve isn't very long.&lt;/p&gt;&#xA;&lt;p&gt;But without those fundamentals, or with wasting time on things that don't need to be learned with only new syntax, a lot of wheel spinning will occur.&lt;/p&gt;&#xA;&lt;p&gt;If you want to teach a course that is tailored to bringing the &amp;quot;average&amp;quot; CS person up to speed then first, learn you audience. Teach what they need to know. Express it in language they already understand. Then it can be quick.&lt;/p&gt;&#xA;&lt;p&gt;Note that the main difficulty in learning a new language is that there may be a paradigm shift required. A paradigm assumes a way of thinking. A C programmer thinks about solutions in a different way than a Python programmer does, but a Java and a Python programmer think a lot alike (with a few key differences). Syntax is easy. Paradigms are hard.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2024-03-18T13:57:00.127" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8020" PostTypeId="1" CreationDate="2024-03-22T19:28:27.673" Score="2" ViewCount="39" Body="&lt;p&gt;I'm experimenting with using &lt;a href=&quot;https://theory.stanford.edu/%7Eaiken/moss/&quot; rel=&quot;nofollow noreferrer&quot;&gt;MOSS&lt;/a&gt; to help detect plagiarism in student code.&lt;/p&gt;&#xA;&lt;p&gt;In my first experiment with real code, I am confused with the results;&#xA;Some pairs of students were flagged as having code in common, other pairs had the same code but it wasn't flagged.&lt;/p&gt;&#xA;&lt;p&gt;In most cases the common code was boilerplate provided by me, and I used the &lt;code&gt;-b&lt;/code&gt; flag to tell MOSS to ignore this code in similarity detection.&lt;/p&gt;&#xA;&lt;p&gt;In the screenshots below, the first correctly ignores identical code at the start of the file (boilerplate).&lt;/p&gt;&#xA;&lt;p&gt;In the second image, the boilerplate at the start for the file is flagged as a &amp;quot;match&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Both images are results from the same assignment with the following command&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;moss.pl -l cc -b Observer_Worksheet.cpp ./*/*.cpp&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;What is going on here?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/jrgSQ.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/jrgSQ.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/sGgf2.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/sGgf2.png&quot; alt=&quot;enter image description here&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;" OwnerUserId="14365" LastEditorUserId="14365" LastEditDate="2024-03-23T15:46:20.590" LastActivityDate="2024-03-23T15:46:20.590" Title="MOSS flags boilerplate code as similar in some pairs but not flagged in other pairs" Tags="|plagiarism|" AnswerCount="0" CommentCount="5" ContentLicense="CC BY-SA 4.0" />
  <row Id="8021" PostTypeId="1" CreationDate="2024-03-23T00:47:36.357" Score="5" ViewCount="209" Body="&lt;p&gt;I was hoping that in this year's Software Engineering class, our capstone for Computer Science, could implement a disciplined automated test strategy for their Java project. Now, with only seven weeks left my students have not gotten that started.&lt;/p&gt;&#xA;&lt;p&gt;I figured that jUnit, because it's so widely used, would be relatively accessible. However, it seems to have a lot of complexity. Specifically, the inexperienced DevOps students — who only work 18 days before switching teams — would have to dive into Maven or Gradle to get the correct artifacts.&lt;/p&gt;&#xA;&lt;p&gt;Also, when programming my students would need to ramp up almost instantly on Java annotations, when many of them are relatively inexperienced.&lt;/p&gt;&#xA;&lt;p&gt;I am dying for some kind of Java unit-testing package that will:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;easily plug in to a project as one or two JAR files&lt;/li&gt;&#xA;&lt;li&gt;allow students to adapt their own tests quickly by using a &lt;code&gt;Test&lt;/code&gt; interface of some sort&lt;/li&gt;&#xA;&lt;li&gt;have a minimal framework that will run all the tests and emit the results&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Maybe there's a wrapper for jUnit that will do this? I don't know.&lt;/p&gt;&#xA;&lt;p&gt;Thanks in advance for any suggestions.&lt;/p&gt;&#xA;" OwnerUserId="8756" LastActivityDate="2024-03-24T15:03:48.953" Title="Are jUnit or TestNG simple enough for undergraduates to apply in a matter of weeks? What alternative?" Tags="|programming|java|unit-testing|" AnswerCount="2" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="8022" PostTypeId="2" ParentId="8021" CreationDate="2024-03-23T03:27:43.743" Score="4" Body="&lt;p&gt;Good on you for adding this into your class!&#xA;But I admit that sounds it like a lot in a short time to me.&lt;/p&gt;&#xA;&lt;p&gt;My only practical thoughts are to (1) provide some starter code that gets the lab project going and also provides some sample tests, and (2) temper your expectations of the tests that the students do produce being very good.&lt;/p&gt;&#xA;&lt;p&gt;Oh, and give lots and lots and lots of gradle support. For students new to gradle, that is a bit like landing on a foreign planet.&lt;/p&gt;&#xA;&lt;p&gt;Learning to write tests, at least the mechanical part, isn't so hard if the setup is done and there is a model. JUnit is fairly straightforward!  But learning to create a good test suite takes far longer to learn, and there's as much art to it as science.  You can (and should!) give them some guidance, but I'd still grade that aspect quite gently.&lt;/p&gt;&#xA;" OwnerUserId="27" LastActivityDate="2024-03-23T03:27:43.743" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8023" PostTypeId="2" ParentId="8021" CreationDate="2024-03-24T15:03:48.953" Score="2" Body="&lt;p&gt;If you are willing to use TDD, even in an elementary course there is a solution. I've used it, though with older students.&lt;/p&gt;&#xA;&lt;p&gt;On the first day of the term, give a demo about how to develop a piece of software using test first but with only small pieces of a larger program. Describe how the test tests requirements and then writing a small piece of the program makes the tests pass. One or two tests. A few lines of code.&lt;/p&gt;&#xA;&lt;p&gt;Then, when you give assignments, instead of giving them as a narrative describing the entire program, divide it up into &amp;quot;stories&amp;quot; as is done in Extreme Programming,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The display initially has zero value.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;When a number key is pressed, the display takes that value.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Etc.&lt;/p&gt;&#xA;&lt;p&gt;Then have the program built in the order of those stories.&lt;/p&gt;&#xA;&lt;p&gt;Using this technique you can, in parallel, introduce the programming concepts that you need in the course.&lt;/p&gt;&#xA;&lt;p&gt;Another way to say this is that you don't, initially, have the students divide up the required program into individual parts/tasks. You do that for them. At some point you can make the stories bigger and require more in problem decomposition but that also helps them understand that problem decomposition and program composition are different if complementary processes.&lt;/p&gt;&#xA;&lt;p&gt;I also incorporated pair programming into this, but you may not want to go that far.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2024-03-24T15:03:48.953" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8024" PostTypeId="1" AcceptedAnswerId="8025" CreationDate="2024-03-25T10:45:17.483" Score="4" ViewCount="5669" Body="&lt;p&gt;Is it normal that a computer science educator teaches something and gives no reference nor proof that his method is useful? What should a student do if he was taught something that sounds useful but not the best possible practice?&lt;/p&gt;&#xA;" OwnerUserId="14373" LastActivityDate="2024-03-28T13:16:50.797" Title="Should a cs teacher teach non-scientific methods?" Tags="|introductory-lesson|" AnswerCount="6" CommentCount="10" ContentLicense="CC BY-SA 4.0" />
  <row Id="8025" PostTypeId="2" ParentId="8024" CreationDate="2024-03-25T13:00:18.330" Score="15" Body="&lt;p&gt;From your tone, I gather that you are asking about a practice that you disagree with.  Since we're speaking in extremely broad generalities, and general procedure that you could follow is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Ask the professor follow-up questions.  You are there to learn!&lt;/li&gt;&#xA;&lt;li&gt;Absolutely follow the professor's advice during that course.  To do otherwise would be disrespectful.&lt;/li&gt;&#xA;&lt;li&gt;Try to seek out additional sources of information, and think about how &lt;em&gt;you&lt;/em&gt; would approach the issue in order to solve whatever problems the professor's technique solves later, when you are not constrained by the professor's directives.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;" OwnerUserId="27" LastEditorUserId="27" LastEditDate="2024-03-25T14:50:12.473" LastActivityDate="2024-03-25T14:50:12.473" CommentCount="4" ContentLicense="CC BY-SA 4.0" />
  <row Id="8026" PostTypeId="2" ParentId="8024" CreationDate="2024-03-26T00:17:16.733" Score="13" Body="&lt;p&gt;My opinion, which seemed to work pretty well while I taught, is that in-class examples should never be &amp;quot;best practice&amp;quot;. Learning ComSci is like learning to drive in a big empty parking lot, then on empty streets; or hammering nails into just a board at first -- it's better to learn the basics without a lot of distractions.&lt;/p&gt;&#xA;&lt;p&gt;One problem is that &amp;quot;real world&amp;quot; examples blow up with details until they take too much time and make no sense. I've seen textbooks with try/catch error-detection around every example, or preferring member function examples over plain functions. Here's a decent example of a cascading-if which would never be used in practice:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;if n==1 print(&amp;quot;one&amp;quot;)&#xA;else if n==2 print(&amp;quot;two)&#xA;else if n==3 {&#xA;  print(&amp;quot;three&amp;quot;)&#xA;}&#xA;else ...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We could search for a real example, but it might use enumerated types ( which haven't been covered in class yet) and maybe the real thing it deals with is tristrips vs. quads vs. quadstrips in GPU graphics - making it very long, hard to read and impossible for students to try it on their own.&lt;/p&gt;&#xA;&lt;p&gt;Another problem is that best practices change plenty over time and place. Time-wise we went from needing to know Design Patterns in an interview to &amp;quot;Design Patterns are Ruining Code&amp;quot;. We went from checking pre-conditions to try-catch to adding a new &amp;quot;throws&amp;quot; annotation. And for style (how to name variables, etc...) -- who knows. Place-wise you'll see programming Q's here where one person's solution is another's &amp;quot;I'd be fired if I wrote code like that&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;But most important, I feel, is programming is more like math. Maybe we drill on things like 7x4, but there aren't flash cards for &amp;quot;4x^2+5x-6&amp;quot;. You learn the factoring trick. Once you know how to factor, integrate by parts, and so on, you can attack new math problems with a combination. And those tricks are learned using abstract non-real-world examples. Many programming problems are the same. Once someone has used simple examples to learn if's, loops, lists, nested loops, classes... they'll know how to break up a big problems into &amp;quot;use a list for this&amp;quot; and so on.&lt;/p&gt;&#xA;&lt;p&gt;Put another way, coding bootcamps emphasize solving real-world problems. And a criticism is that their graduates can only do those exact things, and aren't so great at new stuff.&lt;/p&gt;&#xA;" OwnerUserId="8773" LastActivityDate="2024-03-26T00:17:16.733" CommentCount="7" ContentLicense="CC BY-SA 4.0" />
  <row Id="8027" PostTypeId="2" ParentId="8024" CreationDate="2024-03-26T11:46:45.420" Score="1" Body="&lt;p&gt;I agree with the others that if someone tells/teaches you something and you think there's a flaw in that, ask/challenge them about it. That is valid about anything in life and not limited to classes in university.&lt;/p&gt;&#xA;&lt;p&gt;As Owen Reynolds had said in their answer, there is often merit in doing things not the optimal way. A good example for this is bubble sort. Bubble sort is an extremely inefficient sorting algorithm and I can't think of any real life application at the top of my head. But, it is relatively easy to understand and to code. The next step is then to evaluate your code. Is it up to standards, are there better ways to do it? This is called refactoring. In real life, you rarely end up with the best solution on the first try. Often you discover hidden edge cases or other things along the way that require you to update your solution.&lt;/p&gt;&#xA;&lt;p&gt;I would say that refactoring skills are one of the most important skills you can have as a programmer, because you need to be able to understand code, its implications and come up with a better solution that doesn't have those shortcomings.&lt;/p&gt;&#xA;&lt;p&gt;From this perspective, I think it's a fruitful lesson to teach and talk about bubble sort. If you start with e.g. merge sort right away, you might discover bubble sort later and think &amp;quot;oh, this looks much simpler&amp;quot; and just use that, because you never learned why it's inefficient.&lt;/p&gt;&#xA;&lt;p&gt;All in all, we can just speculate because there's no information from you, but I'd give your professor the benefit of the doubt.&lt;/p&gt;&#xA;" OwnerUserId="13430" LastActivityDate="2024-03-26T11:46:45.420" CommentCount="3" ContentLicense="CC BY-SA 4.0" />
  <row Id="8028" PostTypeId="2" ParentId="8024" CreationDate="2024-03-26T21:22:25.973" Score="6" Body="&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;quot;but not the best possible practice&amp;quot;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;And you of course know what the best possible practice is. On a side note you might want to look up the &lt;a href=&quot;https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect&quot; rel=&quot;noreferrer&quot;&gt;dunning kruger effect&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;There are best practices... and there are best practices.&lt;/h2&gt;&#xA;&lt;h3&gt;Engineering best practices.&lt;/h3&gt;&#xA;&lt;p&gt;Always use library methods instead of making your own. Don't reinvent the wheel etc...&lt;/p&gt;&#xA;&lt;p&gt;None of which are followed in CS classes because you want students to learn how to write a bubble sort, quicksort, merge sort, binary tree, etc... because the experience of building those algorithms makes for a better programmer.&lt;/p&gt;&#xA;&lt;h3&gt;style best practices&lt;/h3&gt;&#xA;&lt;p&gt;Such as using descriptive names for variables, and methods. And not using magic numbers... And yes &lt;code&gt;const int FIVE = 5;&lt;/code&gt; is still a magic number. where as &lt;code&gt;const int WEEK_WORK_DAYS = 5&lt;/code&gt; is not a magic number. Because FIVE doesn't have a meaning attached to it.&lt;/p&gt;&#xA;&lt;p&gt;Some of those don't really matter such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Spaces instead of tabs (unless you think tabs are better, in which case Die Heretic Scum).&lt;/li&gt;&#xA;&lt;li&gt;Or how to place curly brackets.&lt;/li&gt;&#xA;&lt;li&gt;The number of spaces in an indent (3,4... just be consistent).&lt;/li&gt;&#xA;&lt;li&gt;snake_case vs camelCase vs CamelCase (again just be consistent).&lt;/li&gt;&#xA;&lt;li&gt;This list is really long...&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The biggest style best practice is of course what your customer IE the professor tells you to do. As long as your code is readible and maintainable...&lt;/p&gt;&#xA;&lt;p&gt;The customer is &amp;quot;always right on matters of style&amp;quot; after all&lt;/p&gt;&#xA;&lt;h3&gt;There are good design practices, or perhaps best known method:&lt;/h3&gt;&#xA;&lt;p&gt;I would read stuff by Robert C. Martin for a better answer then I want to put in a here... But basically it boils down to decouple your stuff. Write unit tests where possible. Write integration tests. Write functional tests. Don't have code behavior rely on hidden state (avoid global variables) if at all possible... Etc.&lt;/p&gt;&#xA;&lt;p&gt;Use design patterns that make sense for the problem you are solving. E.G. don't hammer in screws.&lt;/p&gt;&#xA;" OwnerUserId="14332" LastEditorUserId="14332" LastEditDate="2024-03-26T21:38:58.413" LastActivityDate="2024-03-26T21:38:58.413" CommentCount="1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8029" PostTypeId="2" ParentId="8024" CreationDate="2024-03-27T10:17:42.963" Score="9" Body="&lt;p&gt;There is a misunderstanding here: The &amp;quot;scientific method&amp;quot; has nothing to do with &amp;quot;methods&amp;quot; taught in CS.&lt;/p&gt;&#xA;&lt;p&gt;The scientific method, in the shortest possible explanation, means that statements about reality need to be falsifiable - and that all those statements are only to be considered &amp;quot;true&amp;quot; until falsified.&lt;/p&gt;&#xA;&lt;p&gt;Methods in CS are practical precepts of how to solve whatever problem at hand. These kinds of problems are (for sure in an environment where there is a teacher in front of a class) &lt;em&gt;not&lt;/em&gt; unsolved problems of how the universe works, but simple tasks designed to allow pupils to practice whatever toolset they have been taught so far.&lt;/p&gt;&#xA;&lt;p&gt;Asking whether a CS teacher is being &amp;quot;scientific&amp;quot; is a category error - it simply makes no sense.&lt;/p&gt;&#xA;&lt;p&gt;As to your underlying question: no, your teacher has to prove nothing to you. He is there to enable you to learn facts and practices which give you a tiny, initial peek into what CS is about. What that is is not like following a tutorial on the 'net or some web site. Whatever he is teaching is very likely structured more along didactic lines then what is &amp;quot;best practice&amp;quot;. It is most likely mostly designed to get you thinking in CS terms to be able to come up with your own solutions later. It is very unlikely that you will actually use anything you learned in school verbatim later in your professional life.&lt;/p&gt;&#xA;&lt;p&gt;From a business perspective, if I employ someone fresh out of school or uni, I would not expect them to know even the tiniest bit of practice relevant to what we are doing in the real world. We are also not solving scientific problems; we are creating software, or building technical solutions (cloud stuff etc.). There is very little science involved.&lt;/p&gt;&#xA;&lt;p&gt;If you use CS for actual science work (i.e., building some simulation as a physicist to work out some theories), then the science is what you are going while writing your paper; not the software you are building. The software is, at best, a practical application or demonstration of your theory, not even a scientific proof (&lt;em&gt;that&lt;/em&gt; can only come from observing reality).&lt;/p&gt;&#xA;&lt;p&gt;If the science you are working on is actual CS, for example, you want to invent a new sorting algorithm or something along those lines, then of course the programm you write after thinking long and hard about it is more &amp;quot;scientific&amp;quot; in that it &lt;em&gt;may&lt;/em&gt; be the actual experiment which proves or disproves your new theory, but then again I can think of only very few instances where such a program would be considered a scientific proof for anything - actual proofs are, even in CS, mostly something you do with your brain, pen and paper. Importantly, this kind of stuff is not part of any curriculum where a teacher stands in front of a class; this would be PhD material.&lt;/p&gt;&#xA;&lt;p&gt;All of this is for practical CS courses (where methods are actually taught). If you are in a Theoretical CS course, you will mostly be learning math-like definitions, axioms and proofs based on them - they also do not follow the scientific method per se, but build a mathematical/logical building which is open to inspection for everyone. If you believe, in a Theoretical CS course, that something is wrong, then your best recourse is to ask the teacher to explain it again. It is incredibly likely that you simply misunderstood (partly due to maybe missing some facts still).&lt;/p&gt;&#xA;" OwnerUserId="652" LastEditorUserId="652" LastEditDate="2024-03-27T10:26:14.673" LastActivityDate="2024-03-27T10:26:14.673" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8030" PostTypeId="2" ParentId="8024" CreationDate="2024-03-28T13:16:50.797" Score="0" Body="&lt;p&gt;From what I get in the comments that has nothing to do with &amp;quot;being scientific&amp;quot; and more to do with &amp;quot;industry standards&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;The truth is in pure CS you're technically just supposed to learn the general concepts, ideas and ways to tackle problems. So if that is about the mathematical or logical basis and your teacher doesn't explain them or elaborate why they are optimal and in what circumstances, you should definitely ask follow-up questions.&lt;/p&gt;&#xA;&lt;p&gt;While if it's just about style and preferences or about the quirks of specific programming languages and whatnot (not the level of paradigms but implementation details), then those are elements that are changing rapidly, might be subject to personal or domain specific preferences, generally differ between programmers or whatnot. So unless the code is broken just go along with it and later do it as you prefer or as your internal style guide and whatnot advices.&lt;/p&gt;&#xA;&lt;p&gt;Also you should keep in mind that &amp;quot;optimization&amp;quot; is not an objective criteria. It's just &amp;quot;the best (with respect to a set of condition)&amp;quot;. So the fastest code is likely just a list of binary commands, cutting all the unnecessary stuff and making use of all the specific quirks of the hardware that you actually work on.&lt;/p&gt;&#xA;&lt;p&gt;Now if you design simulations which should really be optimized for speed or work with a fixed unalterable set of hardware where you try to get the most out of what you have, then that might make sense.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand if you don't have these limitations, the code may end up being hard to read, comprehend and maintain and a pain in the ass to port to any other system. So an update is likely going to come in the form of new hardware and a new software basically from scratch.&lt;/p&gt;&#xA;&lt;p&gt;So with modern tech and the requirements being not about nanoseconds, but rather about &amp;quot;not-looking-like-it's-frozen&amp;quot; you could trade absolutely optimized time, for developer friendliness, maintainer friendliness and maybe even user friendliness. So rather than &lt;code&gt;wd&lt;/code&gt; you might be able to write &amp;quot;&lt;code&gt;week_days&lt;/code&gt;&amp;quot; and waste a few bits of memory for the extra chars of the name, but ultimately probably safe a lot of time with regards to documenting the code and have other people be able to comprehend it without a glossary.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand what is considered the &amp;quot;best style&amp;quot; and the best approach of doing something with respect to all these fuzzy objectives that aren't computable by hard science, well these could change over time anyway so you probably just need to keep up with the development anyway so zoning in on one thing might not be the best idea.&lt;/p&gt;&#xA;&lt;p&gt;So from a CS perspective it's more important to know what is happening on a conceptual level and what the advantages, drawbacks and pitfalls of various methods are. So are you optimizing for memory, stability, best case, average case, worst case and so on and if you know what they do and how they do it, finding out what the best practice of implementing that is, is just looking it up.&lt;/p&gt;&#xA;" OwnerUserId="11921" LastActivityDate="2024-03-28T13:16:50.797" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8031" PostTypeId="1" CreationDate="2024-03-29T10:50:24.203" Score="0" ViewCount="45" Body="&lt;p&gt;After studying 4 years in university, I've concluded that computer science is all about taking &amp;quot;clever&amp;quot; decisions. Programming in real world at any product based company is the same, you use your &amp;quot;cleverness&amp;quot; to write code. I find it tiring to solve puzzles but am determined to be a good computer science person, so how do I start to make myself more clever?&lt;/p&gt;&#xA;" OwnerUserId="13955" LastActivityDate="2024-03-29T17:50:15.770" Title="How to become clever as a Computer Science Graduate?" Tags="|computational-thinking|" AnswerCount="3" CommentCount="2" ContentLicense="CC BY-SA 4.0" />
  <row Id="8032" PostTypeId="2" ParentId="8031" CreationDate="2024-03-29T12:04:14.127" Score="2" Body="&lt;p&gt;It's not about cleverness. From the outside, it might look like cleverness, because sometimes people like to hide the process they used to arrive at their answer. This is cultural in mathematics and in some areas of computer science (think about &lt;span class=&quot;math-container&quot;&gt;$\epsilon-\delta$&lt;/span&gt; proofs, where the choice of &lt;span class=&quot;math-container&quot;&gt;$\delta$&lt;/span&gt; seems totally unmotivated and clever at first, but there's a method to choosing it where you write the proof backwards).&lt;/p&gt;&#xA;&lt;p&gt;In reality, almost every single time someone does something &amp;quot;clever&amp;quot;, they were following their own step-by-step problem solving algorithm. We teach our undergraduate students &lt;a href=&quot;https://medium.com/enjoy-algorithm/four-steps-of-polyas-problem-solving-techniques-80eb39d51c94&quot; rel=&quot;nofollow noreferrer&quot;&gt;Polya's method&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I encourage you to study that method and start to see how you've implicitly used it in other times you've solved a problem (including a programming problem). Then, start to be intentional about using this method when faced with new problems. By doing common-sense things like breaking a hard problem into simpler pieces, you can start to solve harder problems than you could before. Eventually this becomes second nature and looks from the outside like &amp;quot;cleverness&amp;quot; but there is a method to it.&lt;/p&gt;&#xA;&lt;p&gt;Also, as a student, don't be afraid to ask a professor or teaching assistant how they came up with some specific thing to do. And they can walk you through why they thought to try that. Meta-cognitive thinking is something you should nurture while a student. There's a large amount of literature about how to teach students to think metacognitively and see the big picture that's guiding the whole subject, rather than just a series of clever tricks. Look for the big picture!&lt;/p&gt;&#xA;" OwnerUserId="294" LastEditorUserId="9426" LastEditDate="2024-03-29T17:50:15.770" LastActivityDate="2024-03-29T17:50:15.770" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8033" PostTypeId="2" ParentId="8031" CreationDate="2024-03-29T13:35:51.693" Score="0" Body="&lt;p&gt;As a so-called clever person, I've never once in my life asked myself or anyone else &amp;quot;how to become clever&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;Nor do I view computer science as being about &amp;quot;clever decisions&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;I received the designation of &amp;quot;clever&amp;quot; even as a child because I pay attention to things that are not generally attended to (at least when controlled for age and for the effect of adult direction), and more proficiency than average in certain areas.&lt;/p&gt;&#xA;&lt;p&gt;Notice the locality and relativity of these claims. The next kid could be juggling 10 tennis balls whilst balancing on a beach ball, and they'll call me clever if I can do it with 11 tennis balls (even though in any objective sense, the difference in capability is not very significant).&lt;/p&gt;&#xA;&lt;p&gt;So the average person who has a huge welter of ordinary and quite useful capabilities is always by definition &amp;quot;not clever&amp;quot;, no matter what it is they can in fact do.&lt;/p&gt;&#xA;&lt;p&gt;I also never really lifted a finger to be clever if it didn't please my curiosity. You don't get clever on willpower and goal-setting. I've become clever doing things I already liked doing. I think I'm better at certain things because I enjoy doing them more than average, and that enjoyment drives me to do them more than others would (especially those running on the fumes of willpower alone).&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Computer science&amp;quot; is broadly the academic study of designing/configuring data processing machinery as we know it.&lt;/p&gt;&#xA;&lt;p&gt;Obviously practising in the field of computing involves clever decisions and not stupid ones, but that is no more particular to computing than any other activity. There's no human activity in which proficiency is defined by making stupid decisions. Chess is about clever decisions. Negotiating a sale is about clever decisions. Driving a car is about clever decisions. Baking a cake is about clever decisions.&lt;/p&gt;&#xA;&lt;p&gt;If you're not good at computer science, which may be why it seems to require a cleverness you don't think you have, then my advice would be to give it up for something you are actually good at &lt;em&gt;and enjoy doing&lt;/em&gt;.&lt;/p&gt;&#xA;" OwnerUserId="9075" LastActivityDate="2024-03-29T13:35:51.693" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8034" PostTypeId="2" ParentId="8031" CreationDate="2024-03-29T13:55:17.817" Score="1" Body="&lt;p&gt;If you are programming only for yourself, or doing something like creating games, then cleverness might be a goal. You want to surprise users and there are few consequences for breaking the rules.&lt;/p&gt;&#xA;&lt;p&gt;But if you are asking about programming in the commercial, product driven, world, then cleverness may be the last thing on the menu. Much more important are fulfilling the requirements of the application, which is specified by others, in a way that is maintainable, extendable, and secure. None of that is clever. It is more of an engineering concern. It is, in fact, the reason that agile software development and design patterns came to be. It is why C++ has evolved into a (largely) safe language if used in the modern way. It is why OO programming, when done well, controls access to fields.&lt;/p&gt;&#xA;&lt;p&gt;I'd guess that your algorithms course stressed correctness and how to prove it. Some of the algorithms seem clever if you've never seen them before, but they have a long history and a solid basis for known efficiency and correctness.&lt;/p&gt;&#xA;&lt;p&gt;Don't be misled. Work to become more &lt;em&gt;grounded&lt;/em&gt; not more clever.&lt;/p&gt;&#xA;" OwnerUserId="1293" LastActivityDate="2024-03-29T13:55:17.817" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8036" PostTypeId="2" ParentId="7859" CreationDate="2024-03-31T15:12:46.390" Score="1" Body="&lt;p&gt;As a professor, I get questions like this a lot. My usual advice is that there are TONS of free resources online, and I would delay on boot-camps until one really needs the specialized knowledge they offer, right before getting a job. For someone without an undergraduate degree in computer science, who has only &amp;quot;dabbled a bit,&amp;quot; I'd recommend looking at the curricula of a few undergrad computer science programs (and maybe data science programs in this case). He can then partake in some MOOCs to go over the low-level courses and start building a foundation (the bootcamp is not really about foundation). If he wants to practice programming, there are plenty of free online tools like &lt;a href=&quot;https://codingbat.com/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt;. For data science, there's also DataCamp, but a lot of academics boycotted them a few years ago.&lt;/p&gt;&#xA;&lt;p&gt;My advice is to try to develop a foundation from books, syllabi of courses, MOOCs, and free online tools. There's no way to do this other than putting in the work, and the bootcamp is not going to magically obviate the need for this fundamental baseline work. An online master's degree could indeed be a good idea, but to even get accepted, the student will need these fundamentals from the undergraduate curriculum.&lt;/p&gt;&#xA;&lt;p&gt;Once the student has mastered the basics, a bootcamp could be useful for specific applications of the foundational knowledge to the area in question, e.g., machine learning for financial applications. The bootcamp might also have tips about how specifically to get jobs in that area. I know people who have said that bootcamps helped them get jobs, but that was only once they already had a strong grounding in the foundations.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2024-03-31T15:12:46.390" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8037" PostTypeId="2" ParentId="7066" CreationDate="2024-03-31T15:21:59.240" Score="1" Body="&lt;p&gt;As a university professor, I get questions like this a lot, from students who want to use their summers productively. I &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7859/online-bootcamps/8036#8036&quot;&gt;just wrote an answer&lt;/a&gt; about MOOCs (massive online open course; often free) vs online degrees vs bootcamps, that might be relevant. The point is that there are TONS of free resources, and you really shouldn't pay for an online course until you've got the basics down (which you can do via free courses).&lt;/p&gt;&#xA;&lt;p&gt;My general advice is that, if you're trying to learn something normally taught at a university, you'd be better off following an actual university syllabus, a well-known textbook, and perhaps some videos that go through the material. For the basics of &amp;quot;how to code&amp;quot; there are plenty of free online resources you can use to sharpen your skills (like &lt;a href=&quot;https://codingbat.com/python&quot; rel=&quot;nofollow noreferrer&quot;&gt;CodingBat&lt;/a&gt;), but it's really best to get the fundamentals from an actual university curriculum. If you learn how to program from a blog, you will probably end up with all sorts of bad habits that you have to un-learn later. Also, it reinforces the wrong idea that CS is about programming. Actually, it's about problem solving and computational thinking, and that difference matters a lot as you go on to courses beyond the intro level.&lt;/p&gt;&#xA;&lt;p&gt;That said, if you are trying to self-study an undergraduate CS degree with online resources, you might end up kissing a lot of frogs before you find something good. When you ask &amp;quot;is it worth the time,&amp;quot; usually the answer is to just try it. If you've gotten the basics from a book/syllabus/MOOC, then you can start to judge if the online course you're taking is useful to you or not. Lastly, after you get the foundation, it's good to do some self-driven projects and host them on your GitHub, to show a portfolio of work you've done that illustrates you've actually understood and synthesized the material you self-studied. Just saying &amp;quot;I completed online courses X,Y,Z&amp;quot; is not really going to be enough to get a job.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2024-03-31T15:21:59.240" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
  <row Id="8038" PostTypeId="2" ParentId="7051" CreationDate="2024-03-31T15:33:45.873" Score="1" Body="&lt;p&gt;There are &lt;a href=&quot;https://cseducators.stackexchange.com/questions/7051/applications-of-euclidean-geometry#comment21589_7051&quot;&gt;TONS of uses&lt;/a&gt; of Euclidean geometry in CS, &lt;em&gt;especially&lt;/em&gt; in Machine Learning (ML). Indeed, even &lt;a href=&quot;https://en.wikipedia.org/wiki/Euclidean_geometry&quot; rel=&quot;nofollow noreferrer&quot;&gt;the wikipedia article&lt;/a&gt; for Euclidean geometry lists many including graphics, computer vision, and game design (all mentioned in the comments) plus computer-aided design, computer-aided manufacturing, circuit design, and in various fields of engineering where a computer scientist's work might be used (stress analysis, thermal engineering, mechanical systems, wing design, satellites). So this answers question (2).&lt;/p&gt;&#xA;&lt;p&gt;Additionally, the principles of geometry are extremely helpful in machine learning. For example, one way to think about (multivariate) linear regression is as a projection from a vector in an &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt;-dimensional vector space (where &lt;span class=&quot;math-container&quot;&gt;$n$&lt;/span&gt; is the number of individuals in your data set) representing the response variable &lt;span class=&quot;math-container&quot;&gt;$y$&lt;/span&gt;, to the subspace spanned by the explanatory variables &lt;span class=&quot;math-container&quot;&gt;$x_i$&lt;/span&gt;. Matrix multiplication is a linear transformation, doing a geometric operation like a rotation. This is super relevant when you do principal component analysis (and Fourier analysis), SVD, separating hyperplanes, and lots of other standard machine learning techniques. Let me turn to question (1):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;(1)    Are there any applications of Algebra or Calculus or even Physics in CS or similar fields like data science and machine learning?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Yes, of course. First of all, in CS we care about the asymptotic time complexity of algorithms, e.g., a polynomial time algorithm is better than an exponential time one. So this is an application of algebra. There are plenty of times you have to take a limit as &lt;span class=&quot;math-container&quot;&gt;$n\to \infty$&lt;/span&gt; of a quotient like &lt;span class=&quot;math-container&quot;&gt;$P(n)/Q(n)$&lt;/span&gt;, and that uses your precalculus and calculus knowledge. In addition, the famous algorithm &lt;strong&gt;gradient descent&lt;/strong&gt; (very common in data science and ML) involves following the direction of the gradient, a vector that you compute using calculus. As well, most statistical models (an essential part of data science) are fit by minimizing a quantity like the residual sum of squares. That can be done by taking (partial) derivatives and setting them equal to zero, and then solving (using algebra) for the parameter values that achieve this minimum. There are far too many applications to list, but hopefully this short advertisement will convince readers of the importance of high school math, calculus, and linear algebra, for anyone interested in doing cool and powerful work in data science and machine learning. The more linear algebra you know, the better you will be at solving ML problems efficiently.&lt;/p&gt;&#xA;" OwnerUserId="294" LastActivityDate="2024-03-31T15:33:45.873" CommentCount="0" ContentLicense="CC BY-SA 4.0" />
</posts>